handsontable 15.0.1-next-ab94a4c-20250207 → 15.1.0-next-dfdf994-20250206
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 +51 -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
package/tableView.mjs
CHANGED
@@ -27,6 +27,7 @@ var _mouseDown = /*#__PURE__*/new WeakMap();
|
|
27
27
|
var _table = /*#__PURE__*/new WeakMap();
|
28
28
|
var _lastWidth = /*#__PURE__*/new WeakMap();
|
29
29
|
var _lastHeight = /*#__PURE__*/new WeakMap();
|
30
|
+
var _mouseDownLastPos = /*#__PURE__*/new WeakMap();
|
30
31
|
var _TableView_brand = /*#__PURE__*/new WeakSet();
|
31
32
|
class TableView {
|
32
33
|
/**
|
@@ -138,6 +139,12 @@ class TableView {
|
|
138
139
|
* @type {number}
|
139
140
|
*/
|
140
141
|
_classPrivateFieldInitSpec(this, _lastHeight, 0);
|
142
|
+
/**
|
143
|
+
* The last mouse position of the mousedown event.
|
144
|
+
*
|
145
|
+
* @type {{ x: number, y: number } | null}
|
146
|
+
*/
|
147
|
+
_classPrivateFieldInitSpec(this, _mouseDownLastPos, null);
|
141
148
|
this.hot = hotInstance;
|
142
149
|
this.eventManager = new EventManager(this.hot);
|
143
150
|
this.settings = this.hot.getSettings();
|
@@ -783,6 +790,10 @@ class TableView {
|
|
783
790
|
this.hot.listen();
|
784
791
|
this.activeWt = wt;
|
785
792
|
_classPrivateFieldSet(_mouseDown, this, true);
|
793
|
+
_classPrivateFieldSet(_mouseDownLastPos, this, {
|
794
|
+
x: event.clientX,
|
795
|
+
y: event.clientY
|
796
|
+
});
|
786
797
|
this.hot.runHooks('beforeOnCellMouseDown', event, visualCoords, TD, controller);
|
787
798
|
if (isImmediatePropagationStopped(event)) {
|
788
799
|
return;
|
@@ -832,7 +843,11 @@ class TableView {
|
|
832
843
|
if (isImmediatePropagationStopped(event)) {
|
833
844
|
return;
|
834
845
|
}
|
835
|
-
|
846
|
+
|
847
|
+
// Ignore mouseover events when the mouse has not moved. This solves an issue (#dev-1479) where
|
848
|
+
// column resizing triggered by the long text in the cell causes the mouseover event to be fired,
|
849
|
+
// thus selecting multiple cells with no user intention.
|
850
|
+
if (_classPrivateFieldGet(_mouseDown, this) && (!_classPrivateFieldGet(_mouseDownLastPos, this) || _classPrivateFieldGet(_mouseDownLastPos, this).x !== event.clientX || _classPrivateFieldGet(_mouseDownLastPos, this).y !== event.clientY)) {
|
836
851
|
handleMouseEvent(event, {
|
837
852
|
coords: visualCoords,
|
838
853
|
selection: this.hot.selection,
|
@@ -842,6 +857,7 @@ class TableView {
|
|
842
857
|
}
|
843
858
|
this.hot.runHooks('afterOnCellMouseOver', event, visualCoords, TD);
|
844
859
|
this.activeWt = this._wt;
|
860
|
+
_classPrivateFieldSet(_mouseDownLastPos, this, null);
|
845
861
|
},
|
846
862
|
onCellMouseUp: (event, coords, TD, wt) => {
|
847
863
|
const visualCoords = this.translateFromRenderableToVisualCoords(coords);
|
package/utils/autoResize.js
CHANGED
@@ -93,7 +93,7 @@ function createInputElementResizer(ownerDocument) {
|
|
93
93
|
body.appendChild(textContainer);
|
94
94
|
const paddingStart = parseInt(((_getComputedStyle = getComputedStyle(observedElement)) === null || _getComputedStyle === void 0 ? void 0 : _getComputedStyle.paddingInlineStart) || 0, 10);
|
95
95
|
const paddingEnd = parseInt(((_getComputedStyle2 = getComputedStyle(observedElement)) === null || _getComputedStyle2 === void 0 ? void 0 : _getComputedStyle2.paddingInlineEnd) || 0, 10);
|
96
|
-
const width = textContainer.clientWidth +
|
96
|
+
const width = textContainer.clientWidth + paddingStart + paddingEnd + 1;
|
97
97
|
body.removeChild(textContainer);
|
98
98
|
const elementStyle = observedElement.style;
|
99
99
|
elementStyle.height = `${defaults.minHeight}px`;
|
package/utils/autoResize.mjs
CHANGED
@@ -89,7 +89,7 @@ export function createInputElementResizer(ownerDocument) {
|
|
89
89
|
body.appendChild(textContainer);
|
90
90
|
const paddingStart = parseInt(((_getComputedStyle = getComputedStyle(observedElement)) === null || _getComputedStyle === void 0 ? void 0 : _getComputedStyle.paddingInlineStart) || 0, 10);
|
91
91
|
const paddingEnd = parseInt(((_getComputedStyle2 = getComputedStyle(observedElement)) === null || _getComputedStyle2 === void 0 ? void 0 : _getComputedStyle2.paddingInlineEnd) || 0, 10);
|
92
|
-
const width = textContainer.clientWidth +
|
92
|
+
const width = textContainer.clientWidth + paddingStart + paddingEnd + 1;
|
93
93
|
body.removeChild(textContainer);
|
94
94
|
const elementStyle = observedElement.style;
|
95
95
|
elementStyle.height = `${defaults.minHeight}px`;
|
package/utils/parseTable.js
CHANGED
@@ -75,7 +75,7 @@ function instanceToHTML(instance) {
|
|
75
75
|
if ((0, _mixed.isEmpty)(cellData)) {
|
76
76
|
cell = `<td ${attrs.join(' ')}></td>`;
|
77
77
|
} else {
|
78
|
-
const value = cellData.toString().replace(
|
78
|
+
const value = cellData.toString().replace(/</g, '<').replace(/>/g, '>').replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g, '<br>\r\n').replace(/\x20/gi, ' ').replace(/\t/gi, '	');
|
79
79
|
cell = `<td ${attrs.join(' ')}>${value}</td>`;
|
80
80
|
}
|
81
81
|
}
|
package/utils/parseTable.mjs
CHANGED
@@ -69,7 +69,7 @@ export function instanceToHTML(instance) {
|
|
69
69
|
if (isEmpty(cellData)) {
|
70
70
|
cell = `<td ${attrs.join(' ')}></td>`;
|
71
71
|
} else {
|
72
|
-
const value = cellData.toString().replace(
|
72
|
+
const value = cellData.toString().replace(/</g, '<').replace(/>/g, '>').replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g, '<br>\r\n').replace(/\x20/gi, ' ').replace(/\t/gi, '	');
|
73
73
|
cell = `<td ${attrs.join(' ')}>${value}</td>`;
|
74
74
|
}
|
75
75
|
}
|
@@ -60,7 +60,7 @@ dateValidator.VALIDATOR_TYPE = VALIDATOR_TYPE;
|
|
60
60
|
function correctFormat(value, dateFormat) {
|
61
61
|
const dateFromDate = (0, _moment.default)((0, _date.getNormalizedDate)(value));
|
62
62
|
const dateFromMoment = (0, _moment.default)(value, dateFormat);
|
63
|
-
const isAlphanumeric = value.search(/[A-z]/g) > -1;
|
63
|
+
const isAlphanumeric = value.search(/[A-Za-z]/g) > -1;
|
64
64
|
let date;
|
65
65
|
if (dateFromDate.isValid() && dateFromDate.format('x') === dateFromMoment.format('x') || !dateFromMoment.isValid() || isAlphanumeric) {
|
66
66
|
date = dateFromDate;
|
@@ -54,7 +54,7 @@ dateValidator.VALIDATOR_TYPE = VALIDATOR_TYPE;
|
|
54
54
|
export function correctFormat(value, dateFormat) {
|
55
55
|
const dateFromDate = moment(getNormalizedDate(value));
|
56
56
|
const dateFromMoment = moment(value, dateFormat);
|
57
|
-
const isAlphanumeric = value.search(/[A-z]/g) > -1;
|
57
|
+
const isAlphanumeric = value.search(/[A-Za-z]/g) > -1;
|
58
58
|
let date;
|
59
59
|
if (dateFromDate.isValid() && dateFromDate.format('x') === dateFromMoment.format('x') || !dateFromMoment.isValid() || isAlphanumeric) {
|
60
60
|
date = dateFromDate;
|