handsontable 14.1.0-next-1211447-20240205 → 14.2.0-next-4873a35-20240228
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/core/_base.js +12 -0
- package/3rdparty/walkontable/src/core/_base.mjs +12 -0
- package/3rdparty/walkontable/src/scroll.js +131 -98
- package/3rdparty/walkontable/src/scroll.mjs +133 -100
- package/3rdparty/walkontable/src/selection/border/border.js +3 -3
- package/3rdparty/walkontable/src/selection/border/border.mjs +3 -3
- package/3rdparty/walkontable/src/table/mixin/calculatedColumns.js +26 -0
- package/3rdparty/walkontable/src/table/mixin/calculatedColumns.mjs +26 -0
- package/3rdparty/walkontable/src/table/mixin/calculatedRows.js +26 -0
- package/3rdparty/walkontable/src/table/mixin/calculatedRows.mjs +26 -0
- package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.js +20 -0
- package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.mjs +20 -0
- package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.js +20 -0
- package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.mjs +20 -0
- package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.js +20 -0
- package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.mjs +20 -0
- package/3rdparty/walkontable/src/table.js +2 -0
- package/3rdparty/walkontable/src/table.mjs +2 -0
- package/3rdparty/walkontable/src/viewport.js +9 -0
- package/3rdparty/walkontable/src/viewport.mjs +10 -1
- package/CHANGELOG.md +38 -0
- package/base.js +2 -2
- package/base.mjs +2 -2
- package/core/index.js +6 -0
- package/core/index.mjs +2 -1
- package/core/viewportScroll/index.js +65 -0
- package/core/viewportScroll/index.mjs +61 -0
- package/core/viewportScroll/scrollStrategies/columnHeaderScroll.js +20 -0
- package/core/viewportScroll/scrollStrategies/columnHeaderScroll.mjs +16 -0
- package/core/viewportScroll/scrollStrategies/cornerHeaderScroll.js +14 -0
- package/core/viewportScroll/scrollStrategies/cornerHeaderScroll.mjs +10 -0
- package/core/viewportScroll/scrollStrategies/multipleScroll.js +15 -0
- package/core/viewportScroll/scrollStrategies/multipleScroll.mjs +11 -0
- package/core/viewportScroll/scrollStrategies/noncontiguousScroll.js +15 -0
- package/core/viewportScroll/scrollStrategies/noncontiguousScroll.mjs +11 -0
- package/core/viewportScroll/scrollStrategies/rowHeaderScroll.js +20 -0
- package/core/viewportScroll/scrollStrategies/rowHeaderScroll.mjs +16 -0
- package/core/viewportScroll/scrollStrategies/singleScroll.js +46 -0
- package/core/viewportScroll/scrollStrategies/singleScroll.mjs +42 -0
- package/core.d.ts +1 -1
- package/core.js +11 -52
- package/core.mjs +12 -53
- package/dataMap/metaManager/index.js +1 -1
- package/dataMap/metaManager/index.mjs +1 -1
- package/dataMap/metaManager/metaLayers/cellMeta.js +6 -1
- package/dataMap/metaManager/metaLayers/cellMeta.mjs +6 -1
- package/dataMap/metaManager/metaSchema.js +36 -12
- package/dataMap/metaManager/metaSchema.mjs +36 -12
- package/dist/handsontable.css +2 -2
- package/dist/handsontable.full.css +2 -2
- package/dist/handsontable.full.js +2997 -1929
- package/dist/handsontable.full.min.css +2 -2
- package/dist/handsontable.full.min.js +42 -42
- package/dist/handsontable.js +2999 -1931
- package/dist/handsontable.min.css +2 -2
- package/dist/handsontable.min.js +25 -25
- package/dist/languages/all.js +130 -25
- package/dist/languages/all.min.js +1 -1
- package/dist/languages/hr-HR.js +167 -0
- package/dist/languages/hr-HR.min.js +1 -0
- package/editorManager.js +15 -4
- package/editorManager.mjs +15 -4
- package/editors/autocompleteEditor/autocompleteEditor.js +2 -2
- package/editors/autocompleteEditor/autocompleteEditor.mjs +2 -2
- package/editors/baseEditor/baseEditor.js +1 -1
- package/editors/baseEditor/baseEditor.mjs +1 -1
- package/editors/checkboxEditor/checkboxEditor.js +5 -4
- package/editors/checkboxEditor/checkboxEditor.mjs +5 -4
- package/editors/dateEditor/dateEditor.js +1 -1
- package/editors/dateEditor/dateEditor.mjs +1 -1
- package/editors/dropdownEditor/dropdownEditor.js +1 -1
- package/editors/dropdownEditor/dropdownEditor.mjs +1 -1
- package/editors/handsontableEditor/handsontableEditor.js +1 -1
- package/editors/handsontableEditor/handsontableEditor.mjs +1 -1
- package/editors/selectEditor/selectEditor.js +1 -1
- package/editors/selectEditor/selectEditor.mjs +1 -1
- package/editors/textEditor/textEditor.js +1 -2
- package/editors/textEditor/textEditor.mjs +1 -2
- package/editors/timeEditor/timeEditor.js +1 -1
- package/editors/timeEditor/timeEditor.mjs +1 -1
- package/helpers/mixed.js +2 -2
- package/helpers/mixed.mjs +2 -2
- package/helpers/moves.js +86 -0
- package/helpers/moves.mjs +82 -0
- package/i18n/languages/hr-HR.js +96 -0
- package/i18n/languages/hr-HR.mjs +90 -0
- package/i18n/languages/index.js +2 -0
- package/i18n/languages/index.mjs +2 -1
- package/languages/all.js +130 -25
- package/languages/hr-HR.js +167 -0
- package/languages/hr-HR.mjs +92 -0
- package/languages/index.js +130 -25
- package/languages/index.mjs +2 -1
- package/package.json +11 -1
- package/pluginHooks.d.ts +4 -2
- package/pluginHooks.js +33 -3
- package/pluginHooks.mjs +33 -3
- package/plugins/autoColumnSize/autoColumnSize.js +6 -1
- package/plugins/autoColumnSize/autoColumnSize.mjs +6 -1
- package/plugins/autoRowSize/autoRowSize.js +5 -0
- package/plugins/autoRowSize/autoRowSize.mjs +5 -0
- package/plugins/autofill/autofill.js +3 -2
- package/plugins/autofill/autofill.mjs +3 -2
- package/plugins/columnSummary/columnSummary.js +1 -1
- package/plugins/columnSummary/columnSummary.mjs +1 -1
- package/plugins/dropdownMenu/dropdownMenu.js +58 -4
- package/plugins/dropdownMenu/dropdownMenu.mjs +58 -4
- package/plugins/filters/component/value.js +51 -5
- package/plugins/filters/component/value.mjs +51 -5
- package/plugins/filters/utils.js +1 -1
- package/plugins/filters/utils.mjs +1 -1
- package/plugins/formulas/formulas.js +10 -1
- package/plugins/formulas/formulas.mjs +10 -1
- package/plugins/formulas/indexSyncer/axisSyncer.js +3 -75
- package/plugins/formulas/indexSyncer/axisSyncer.mjs +3 -75
- package/plugins/manualColumnResize/manualColumnResize.js +3 -0
- package/plugins/manualColumnResize/manualColumnResize.mjs +3 -0
- package/plugins/mergeCells/cellsCollection.js +1 -1
- package/plugins/mergeCells/cellsCollection.mjs +1 -1
- package/plugins/mergeCells/mergeCells.js +30 -0
- package/plugins/mergeCells/mergeCells.mjs +30 -0
- package/plugins/undoRedo/undoRedo.js +61 -14
- package/plugins/undoRedo/undoRedo.mjs +61 -14
- package/renderers/autocompleteRenderer/autocompleteRenderer.js +1 -1
- package/renderers/autocompleteRenderer/autocompleteRenderer.mjs +1 -1
- package/renderers/baseRenderer/baseRenderer.js +1 -1
- package/renderers/baseRenderer/baseRenderer.mjs +1 -1
- package/renderers/checkboxRenderer/checkboxRenderer.js +36 -8
- package/renderers/checkboxRenderer/checkboxRenderer.mjs +36 -8
- package/renderers/dateRenderer/dateRenderer.js +1 -1
- package/renderers/dateRenderer/dateRenderer.mjs +1 -1
- package/renderers/dropdownRenderer/dropdownRenderer.js +1 -1
- package/renderers/dropdownRenderer/dropdownRenderer.mjs +1 -1
- package/renderers/handsontableRenderer/handsontableRenderer.js +1 -1
- package/renderers/handsontableRenderer/handsontableRenderer.mjs +1 -1
- package/renderers/htmlRenderer/htmlRenderer.js +1 -1
- package/renderers/htmlRenderer/htmlRenderer.mjs +1 -1
- package/renderers/numericRenderer/index.js +2 -1
- package/renderers/numericRenderer/index.mjs +1 -1
- package/renderers/numericRenderer/numericRenderer.js +28 -13
- package/renderers/numericRenderer/numericRenderer.mjs +27 -13
- package/renderers/passwordRenderer/passwordRenderer.js +1 -1
- package/renderers/passwordRenderer/passwordRenderer.mjs +1 -1
- package/renderers/selectRenderer/selectRenderer.js +1 -1
- package/renderers/selectRenderer/selectRenderer.mjs +1 -1
- package/renderers/textRenderer/textRenderer.js +1 -1
- package/renderers/textRenderer/textRenderer.mjs +1 -1
- package/renderers/timeRenderer/timeRenderer.js +1 -1
- package/renderers/timeRenderer/timeRenderer.mjs +1 -1
- package/selection/mouseEventHandler.js +4 -0
- package/selection/mouseEventHandler.mjs +4 -0
- package/selection/selection.js +64 -5
- package/selection/selection.mjs +64 -5
- package/shortcuts/recorder.js +27 -8
- package/shortcuts/recorder.mjs +27 -8
- package/tableView.js +86 -5
- package/tableView.mjs +87 -6
- package/utils/autoResize.js +0 -1
- package/utils/autoResize.mjs +0 -1
- package/utils/ghostTable.js +6 -6
- package/utils/ghostTable.mjs +6 -6
- package/utils/parseTable.js +9 -1
- package/utils/parseTable.mjs +9 -1
package/utils/ghostTable.js
CHANGED
@@ -65,7 +65,7 @@ class GhostTable {
|
|
65
65
|
/**
|
66
66
|
* Add row.
|
67
67
|
*
|
68
|
-
* @param {number} row
|
68
|
+
* @param {number} row Visual row index.
|
69
69
|
* @param {Map} samples Samples Map object.
|
70
70
|
*/
|
71
71
|
addRow(row, samples) {
|
@@ -112,7 +112,7 @@ class GhostTable {
|
|
112
112
|
/**
|
113
113
|
* Add column.
|
114
114
|
*
|
115
|
-
* @param {number} column
|
115
|
+
* @param {number} column Visual column index.
|
116
116
|
* @param {Map} samples A map with sampled table values.
|
117
117
|
*/
|
118
118
|
addColumn(column, samples) {
|
@@ -244,7 +244,7 @@ class GhostTable {
|
|
244
244
|
/**
|
245
245
|
* Create table row element.
|
246
246
|
*
|
247
|
-
* @param {number} row
|
247
|
+
* @param {number} row Visual row index.
|
248
248
|
* @returns {DocumentFragment} Returns created table row elements.
|
249
249
|
*/
|
250
250
|
createRow(row) {
|
@@ -312,7 +312,7 @@ class GhostTable {
|
|
312
312
|
/**
|
313
313
|
* Create table column elements.
|
314
314
|
*
|
315
|
-
* @param {number} column
|
315
|
+
* @param {number} column Visual column index.
|
316
316
|
* @returns {DocumentFragment} Returns created column table column elements.
|
317
317
|
*/
|
318
318
|
createCol(column) {
|
@@ -392,10 +392,10 @@ class GhostTable {
|
|
392
392
|
if (row >= 0 && column >= 0) {
|
393
393
|
colspan = this.hot.getCellMeta(row, column).colspan;
|
394
394
|
}
|
395
|
-
let width = this.hot.
|
395
|
+
let width = this.hot.getColWidth(column);
|
396
396
|
if (colspan > 1) {
|
397
397
|
for (let nextColumn = column + 1; nextColumn < column + colspan; nextColumn++) {
|
398
|
-
width += this.hot.
|
398
|
+
width += this.hot.getColWidth(nextColumn);
|
399
399
|
}
|
400
400
|
}
|
401
401
|
col.style.width = `${width}px`;
|
package/utils/ghostTable.mjs
CHANGED
@@ -62,7 +62,7 @@ class GhostTable {
|
|
62
62
|
/**
|
63
63
|
* Add row.
|
64
64
|
*
|
65
|
-
* @param {number} row
|
65
|
+
* @param {number} row Visual row index.
|
66
66
|
* @param {Map} samples Samples Map object.
|
67
67
|
*/
|
68
68
|
addRow(row, samples) {
|
@@ -109,7 +109,7 @@ class GhostTable {
|
|
109
109
|
/**
|
110
110
|
* Add column.
|
111
111
|
*
|
112
|
-
* @param {number} column
|
112
|
+
* @param {number} column Visual column index.
|
113
113
|
* @param {Map} samples A map with sampled table values.
|
114
114
|
*/
|
115
115
|
addColumn(column, samples) {
|
@@ -241,7 +241,7 @@ class GhostTable {
|
|
241
241
|
/**
|
242
242
|
* Create table row element.
|
243
243
|
*
|
244
|
-
* @param {number} row
|
244
|
+
* @param {number} row Visual row index.
|
245
245
|
* @returns {DocumentFragment} Returns created table row elements.
|
246
246
|
*/
|
247
247
|
createRow(row) {
|
@@ -309,7 +309,7 @@ class GhostTable {
|
|
309
309
|
/**
|
310
310
|
* Create table column elements.
|
311
311
|
*
|
312
|
-
* @param {number} column
|
312
|
+
* @param {number} column Visual column index.
|
313
313
|
* @returns {DocumentFragment} Returns created column table column elements.
|
314
314
|
*/
|
315
315
|
createCol(column) {
|
@@ -389,10 +389,10 @@ class GhostTable {
|
|
389
389
|
if (row >= 0 && column >= 0) {
|
390
390
|
colspan = this.hot.getCellMeta(row, column).colspan;
|
391
391
|
}
|
392
|
-
let width = this.hot.
|
392
|
+
let width = this.hot.getColWidth(column);
|
393
393
|
if (colspan > 1) {
|
394
394
|
for (let nextColumn = column + 1; nextColumn < column + colspan; nextColumn++) {
|
395
|
-
width += this.hot.
|
395
|
+
width += this.hot.getColWidth(nextColumn);
|
396
396
|
}
|
397
397
|
}
|
398
398
|
col.style.width = `${width}px`;
|
package/utils/parseTable.js
CHANGED
@@ -5,6 +5,7 @@ exports._dataToHTML = _dataToHTML;
|
|
5
5
|
exports.htmlToGridSettings = htmlToGridSettings;
|
6
6
|
exports.instanceToHTML = instanceToHTML;
|
7
7
|
require("core-js/modules/es.array.push.js");
|
8
|
+
require("core-js/modules/es.string.replace-all.js");
|
8
9
|
var _mixed = require("./../helpers/mixed");
|
9
10
|
const ESCAPED_HTML_CHARS = {
|
10
11
|
' ': '\x20',
|
@@ -140,7 +141,14 @@ function htmlToGridSettings(element) {
|
|
140
141
|
if (typeof checkElement === 'string') {
|
141
142
|
const escapedAdjacentHTML = checkElement.replace(/<td\b[^>]*?>([\s\S]*?)<\/\s*td>/g, cellFragment => {
|
142
143
|
const openingTag = cellFragment.match(/<td\b[^>]*?>/g)[0];
|
143
|
-
const
|
144
|
+
const paragraphRegexp = /<p.*?>/g;
|
145
|
+
const cellValue = cellFragment.substring(openingTag.length, cellFragment.lastIndexOf('<')).trim() // Removing whitespaces from the start and the end of HTML fragment
|
146
|
+
.replaceAll(/\n\s+/g, ' ') // HTML tags may be split using multiple new lines and whitespaces
|
147
|
+
.replaceAll(paragraphRegexp, '\n') // Only paragraphs should split text using new line characters
|
148
|
+
.replace('\n', '') // First paragraph shouldn't start with new line characters
|
149
|
+
.replaceAll(/<\/(.*)>\s+$/mg, '</$1>') // HTML tags may end with whitespace.
|
150
|
+
.replace(/(<(?!br)([^>]+)>)/gi, '') // Removing HTML tags
|
151
|
+
.replaceAll(/^ $/mg, ''); // Removing single characters separating new lines
|
144
152
|
const closingTag = '</td>';
|
145
153
|
return `${openingTag}${cellValue}${closingTag}`;
|
146
154
|
});
|
package/utils/parseTable.mjs
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import "core-js/modules/es.array.push.js";
|
2
|
+
import "core-js/modules/es.string.replace-all.js";
|
2
3
|
import { isEmpty } from "./../helpers/mixed.mjs";
|
3
4
|
const ESCAPED_HTML_CHARS = {
|
4
5
|
' ': '\x20',
|
@@ -134,7 +135,14 @@ export function htmlToGridSettings(element) {
|
|
134
135
|
if (typeof checkElement === 'string') {
|
135
136
|
const escapedAdjacentHTML = checkElement.replace(/<td\b[^>]*?>([\s\S]*?)<\/\s*td>/g, cellFragment => {
|
136
137
|
const openingTag = cellFragment.match(/<td\b[^>]*?>/g)[0];
|
137
|
-
const
|
138
|
+
const paragraphRegexp = /<p.*?>/g;
|
139
|
+
const cellValue = cellFragment.substring(openingTag.length, cellFragment.lastIndexOf('<')).trim() // Removing whitespaces from the start and the end of HTML fragment
|
140
|
+
.replaceAll(/\n\s+/g, ' ') // HTML tags may be split using multiple new lines and whitespaces
|
141
|
+
.replaceAll(paragraphRegexp, '\n') // Only paragraphs should split text using new line characters
|
142
|
+
.replace('\n', '') // First paragraph shouldn't start with new line characters
|
143
|
+
.replaceAll(/<\/(.*)>\s+$/mg, '</$1>') // HTML tags may end with whitespace.
|
144
|
+
.replace(/(<(?!br)([^>]+)>)/gi, '') // Removing HTML tags
|
145
|
+
.replaceAll(/^ $/mg, ''); // Removing single characters separating new lines
|
138
146
|
const closingTag = '</td>';
|
139
147
|
return `${openingTag}${cellValue}${closingTag}`;
|
140
148
|
});
|