handsontable 15.3.0 → 16.0.0-next-98c6ac7-20250707
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 +0 -3
- package/3rdparty/walkontable/src/core/_base.mjs +0 -3
- package/3rdparty/walkontable/src/core/clone.js +0 -1
- package/3rdparty/walkontable/src/core/clone.mjs +0 -1
- package/3rdparty/walkontable/src/core/core.js +0 -2
- package/3rdparty/walkontable/src/core/core.mjs +0 -2
- package/3rdparty/walkontable/src/facade/core.js +0 -3
- package/3rdparty/walkontable/src/facade/core.mjs +0 -3
- package/3rdparty/walkontable/src/index.js +1 -2
- package/3rdparty/walkontable/src/overlay/_base.js +1 -3
- package/3rdparty/walkontable/src/overlay/_base.mjs +1 -3
- package/3rdparty/walkontable/src/overlay/bottom.js +2 -2
- package/3rdparty/walkontable/src/overlay/bottom.mjs +2 -2
- package/3rdparty/walkontable/src/overlay/top.js +1 -1
- package/3rdparty/walkontable/src/overlay/top.mjs +1 -1
- package/3rdparty/walkontable/src/renderer/columnHeaders.js +1 -1
- package/3rdparty/walkontable/src/renderer/columnHeaders.mjs +2 -2
- package/3rdparty/walkontable/src/selection/border/border.js +17 -11
- package/3rdparty/walkontable/src/selection/border/border.mjs +17 -11
- package/3rdparty/walkontable/src/selection/border/utils.js +1 -1
- package/3rdparty/walkontable/src/selection/border/utils.mjs +1 -1
- package/3rdparty/walkontable/src/settings.js +3 -1
- package/3rdparty/walkontable/src/settings.mjs +3 -1
- package/3rdparty/walkontable/src/table.js +9 -6
- package/3rdparty/walkontable/src/table.mjs +9 -6
- package/3rdparty/walkontable/src/types.js +0 -1
- package/3rdparty/walkontable/src/types.mjs +0 -1
- package/3rdparty/walkontable/src/utils/column.js +1 -1
- package/3rdparty/walkontable/src/utils/column.mjs +1 -1
- package/3rdparty/walkontable/src/viewport.js +1 -1
- package/3rdparty/walkontable/src/viewport.mjs +1 -1
- package/CHANGELOG.md +53 -31
- package/README.md +10 -4
- package/base.js +2 -2
- package/base.mjs +2 -2
- package/cellTypes/registry.js +2 -3
- package/cellTypes/registry.mjs +1 -1
- package/core/coordsMapper/rangeToRenderableMapper.js +124 -0
- package/core/coordsMapper/rangeToRenderableMapper.mjs +120 -0
- package/core/focusCatcher/focusDetector.js +2 -2
- package/core/focusCatcher/focusDetector.mjs +2 -2
- package/core/hooks/constants.js +259 -1
- package/core/hooks/constants.mjs +259 -1
- package/core.d.ts +2 -0
- package/core.js +202 -58
- package/core.mjs +202 -58
- package/dataMap/dataMap.js +16 -30
- package/dataMap/dataMap.mjs +16 -30
- package/dataMap/metaManager/metaSchema.js +58 -0
- package/dataMap/metaManager/metaSchema.mjs +58 -0
- package/dist/handsontable.css +30 -4
- package/dist/handsontable.full.css +30 -4
- package/dist/handsontable.full.js +6073 -4352
- package/dist/handsontable.full.min.css +3 -3
- package/dist/handsontable.full.min.js +206 -206
- package/dist/handsontable.js +5751 -4037
- package/dist/handsontable.min.css +3 -3
- package/dist/handsontable.min.js +41 -41
- package/dist/languages/all.min.js +1 -1
- package/dist/languages/ar-AR.min.js +1 -1
- package/dist/languages/cs-CZ.min.js +1 -1
- package/dist/languages/de-CH.min.js +1 -1
- package/dist/languages/de-DE.min.js +1 -1
- package/dist/languages/en-US.min.js +1 -1
- package/dist/languages/es-MX.min.js +1 -1
- package/dist/languages/fa-IR.min.js +1 -1
- package/dist/languages/fr-FR.min.js +1 -1
- package/dist/languages/hr-HR.min.js +1 -1
- package/dist/languages/it-IT.min.js +1 -1
- package/dist/languages/ja-JP.min.js +1 -1
- package/dist/languages/ko-KR.min.js +1 -1
- package/dist/languages/lv-LV.min.js +1 -1
- package/dist/languages/nb-NO.min.js +1 -1
- package/dist/languages/nl-NL.min.js +1 -1
- package/dist/languages/pl-PL.min.js +1 -1
- package/dist/languages/pt-BR.min.js +1 -1
- package/dist/languages/ru-RU.min.js +1 -1
- package/dist/languages/sr-SP.min.js +1 -1
- package/dist/languages/zh-CN.min.js +1 -1
- package/dist/languages/zh-TW.min.js +1 -1
- package/editorManager.js +5 -1
- package/editorManager.mjs +5 -1
- package/editors/autocompleteEditor/autocompleteEditor.d.ts +0 -12
- package/editors/autocompleteEditor/autocompleteEditor.js +42 -69
- package/editors/autocompleteEditor/autocompleteEditor.mjs +43 -70
- package/editors/baseEditor/baseEditor.js +1 -1
- package/editors/baseEditor/baseEditor.mjs +1 -1
- package/editors/dateEditor/dateEditor.js +2 -8
- package/editors/dateEditor/dateEditor.mjs +3 -9
- package/editors/handsontableEditor/handsontableEditor.d.ts +8 -0
- package/editors/handsontableEditor/handsontableEditor.js +173 -17
- package/editors/handsontableEditor/handsontableEditor.mjs +173 -17
- package/editors/passwordEditor/passwordEditor.js +2 -0
- package/editors/passwordEditor/passwordEditor.mjs +2 -0
- package/editors/registry.js +2 -3
- package/editors/registry.mjs +1 -1
- package/editors/textEditor/textEditor.js +2 -0
- package/editors/textEditor/textEditor.mjs +2 -0
- package/helpers/a11y.js +2 -0
- package/helpers/a11y.mjs +1 -0
- package/helpers/dom/element.d.ts +1 -0
- package/helpers/dom/element.js +26 -1
- package/helpers/dom/element.mjs +25 -1
- package/helpers/mixed.js +4 -4
- package/helpers/mixed.mjs +4 -4
- package/i18n/languages/ar-AR.js +1 -2
- package/i18n/languages/cs-CZ.js +1 -2
- package/i18n/languages/de-CH.js +1 -2
- package/i18n/languages/de-DE.js +1 -2
- package/i18n/languages/en-US.js +1 -2
- package/i18n/languages/es-MX.js +1 -2
- package/i18n/languages/fa-IR.js +1 -2
- package/i18n/languages/fr-FR.js +1 -2
- package/i18n/languages/hr-HR.js +1 -2
- package/i18n/languages/it-IT.js +1 -2
- package/i18n/languages/ja-JP.js +1 -2
- package/i18n/languages/ko-KR.js +1 -2
- package/i18n/languages/lv-LV.js +1 -2
- package/i18n/languages/nb-NO.js +1 -2
- package/i18n/languages/nl-NL.js +1 -2
- package/i18n/languages/pl-PL.js +1 -2
- package/i18n/languages/pt-BR.js +1 -2
- package/i18n/languages/ru-RU.js +1 -2
- package/i18n/languages/sr-SP.js +1 -2
- package/i18n/languages/zh-CN.js +1 -2
- package/i18n/languages/zh-TW.js +1 -2
- package/i18n/phraseFormatters/index.js +2 -2
- package/i18n/phraseFormatters/index.mjs +1 -1
- package/i18n/registry.js +3 -4
- package/i18n/registry.mjs +1 -1
- package/index.js +1 -2
- package/package.json +10 -4
- package/plugins/autoColumnSize/autoColumnSize.js +47 -0
- package/plugins/autoColumnSize/autoColumnSize.mjs +47 -0
- package/plugins/autoRowSize/autoRowSize.js +45 -0
- package/plugins/autoRowSize/autoRowSize.mjs +45 -0
- package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.js +13 -0
- package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.mjs +13 -0
- package/plugins/collapsibleColumns/collapsibleColumns.js +31 -0
- package/plugins/collapsibleColumns/collapsibleColumns.mjs +31 -0
- package/plugins/columnSorting/sortService/registry.js +3 -4
- package/plugins/columnSorting/sortService/registry.mjs +1 -1
- package/plugins/columnSummary/columnSummary.js +33 -0
- package/plugins/columnSummary/columnSummary.mjs +33 -0
- package/plugins/comments/commentEditor.js +8 -2
- package/plugins/comments/commentEditor.mjs +8 -2
- package/plugins/comments/comments.js +59 -15
- package/plugins/comments/comments.mjs +60 -16
- package/plugins/comments/contextMenuItem/addEditComment.js +1 -2
- package/plugins/comments/contextMenuItem/readOnlyComment.js +1 -2
- package/plugins/comments/contextMenuItem/removeComment.js +1 -2
- package/plugins/contextMenu/contextMenu.js +1 -1
- package/plugins/contextMenu/contextMenu.mjs +1 -1
- package/plugins/contextMenu/menu/menu.js +12 -6
- package/plugins/contextMenu/menu/menu.mjs +13 -7
- package/plugins/contextMenu/predefinedItems/alignment.js +1 -2
- package/plugins/contextMenu/predefinedItems/clearColumn.js +1 -2
- package/plugins/contextMenu/predefinedItems/columnLeft.js +1 -2
- package/plugins/contextMenu/predefinedItems/columnRight.js +1 -2
- package/plugins/contextMenu/predefinedItems/index.js +1 -2
- package/plugins/contextMenu/predefinedItems/readOnly.js +1 -2
- package/plugins/contextMenu/predefinedItems/redo.js +1 -2
- package/plugins/contextMenu/predefinedItems/removeColumn.js +1 -2
- package/plugins/contextMenu/predefinedItems/removeRow.js +1 -2
- package/plugins/contextMenu/predefinedItems/rowAbove.js +1 -2
- package/plugins/contextMenu/predefinedItems/rowBelow.js +1 -2
- package/plugins/contextMenu/predefinedItems/undo.js +1 -2
- package/plugins/copyPaste/contextMenuItem/cut.js +1 -2
- package/plugins/customBorders/contextMenuItem/bottom.js +1 -2
- package/plugins/customBorders/contextMenuItem/left.js +1 -2
- package/plugins/customBorders/contextMenuItem/noBorders.js +1 -2
- package/plugins/customBorders/contextMenuItem/right.js +1 -2
- package/plugins/customBorders/contextMenuItem/top.js +1 -2
- package/plugins/customBorders/customBorders.js +1 -2
- package/plugins/dropdownMenu/dropdownMenu.js +16 -1
- package/plugins/dropdownMenu/dropdownMenu.mjs +16 -1
- package/plugins/exportFile/exportFile.js +59 -2
- package/plugins/exportFile/exportFile.mjs +58 -0
- package/plugins/filters/component/actionBar.js +1 -2
- package/plugins/filters/component/condition.js +1 -2
- package/plugins/filters/component/value.js +1 -2
- package/plugins/filters/condition/beginsWith.js +1 -2
- package/plugins/filters/condition/between.js +1 -2
- package/plugins/filters/condition/contains.js +1 -2
- package/plugins/filters/condition/date/after.js +1 -2
- package/plugins/filters/condition/date/before.js +1 -2
- package/plugins/filters/condition/date/today.js +1 -2
- package/plugins/filters/condition/date/tomorrow.js +1 -2
- package/plugins/filters/condition/date/yesterday.js +1 -2
- package/plugins/filters/condition/empty.js +1 -2
- package/plugins/filters/condition/endsWith.js +1 -2
- package/plugins/filters/condition/equal.js +1 -2
- package/plugins/filters/condition/greaterThan.js +1 -2
- package/plugins/filters/condition/greaterThanOrEqual.js +1 -2
- package/plugins/filters/condition/lessThan.js +1 -2
- package/plugins/filters/condition/lessThanOrEqual.js +1 -2
- package/plugins/filters/condition/none.js +1 -2
- package/plugins/filters/condition/notBetween.js +1 -2
- package/plugins/filters/condition/notContains.js +1 -2
- package/plugins/filters/condition/notEmpty.js +1 -2
- package/plugins/filters/condition/notEqual.js +1 -2
- package/plugins/filters/filters.js +76 -3
- package/plugins/filters/filters.mjs +75 -1
- package/plugins/filters/logicalOperations/conjunction.js +1 -2
- package/plugins/filters/logicalOperations/disjunction.js +1 -2
- package/plugins/filters/logicalOperations/disjunctionWithExtraCondition.js +1 -2
- package/plugins/filters/ui/_base.js +1 -2
- package/plugins/filters/ui/multipleSelect.js +1 -7
- package/plugins/filters/ui/multipleSelect.mjs +0 -5
- package/plugins/filters/ui/select.js +1 -2
- package/plugins/formulas/engine/register.js +3 -4
- package/plugins/formulas/engine/register.mjs +1 -1
- package/plugins/formulas/formulas.js +40 -41
- package/plugins/formulas/formulas.mjs +39 -40
- package/plugins/hiddenColumns/contextMenuItem/hideColumn.js +1 -2
- package/plugins/hiddenColumns/contextMenuItem/showColumn.js +1 -2
- package/plugins/hiddenColumns/hiddenColumns.js +64 -0
- package/plugins/hiddenColumns/hiddenColumns.mjs +64 -0
- package/plugins/hiddenRows/contextMenuItem/hideRow.js +1 -2
- package/plugins/hiddenRows/contextMenuItem/showRow.js +1 -2
- package/plugins/hiddenRows/hiddenRows.js +64 -0
- package/plugins/hiddenRows/hiddenRows.mjs +64 -0
- package/plugins/manualColumnFreeze/contextMenuItem/freezeColumn.js +1 -2
- package/plugins/manualColumnFreeze/contextMenuItem/unfreezeColumn.js +1 -2
- package/plugins/manualRowMove/manualRowMove.js +1 -1
- package/plugins/manualRowMove/manualRowMove.mjs +1 -1
- package/plugins/manualRowResize/manualRowResize.js +1 -1
- package/plugins/manualRowResize/manualRowResize.mjs +1 -1
- package/plugins/mergeCells/contextMenuItem/toggleMerge.js +1 -2
- package/plugins/mergeCells/mergeCells.js +56 -38
- package/plugins/mergeCells/mergeCells.mjs +56 -38
- package/plugins/mergeCells/utils.js +3 -4
- package/plugins/mergeCells/utils.mjs +3 -4
- package/plugins/nestedHeaders/nestedHeaders.js +37 -12
- package/plugins/nestedHeaders/nestedHeaders.mjs +37 -12
- package/plugins/nestedRows/nestedRows.js +12 -12
- package/plugins/nestedRows/nestedRows.mjs +12 -12
- package/plugins/nestedRows/ui/contextMenu.js +1 -2
- package/plugins/nestedRows/ui/headers.js +2 -3
- package/plugins/nestedRows/ui/headers.mjs +2 -3
- package/plugins/persistentState/persistentState.js +1 -1
- package/plugins/persistentState/persistentState.mjs +1 -1
- package/plugins/stretchColumns/calculator.js +3 -2
- package/plugins/stretchColumns/calculator.mjs +3 -2
- package/plugins/stretchColumns/stretchColumns.js +13 -0
- package/plugins/stretchColumns/stretchColumns.mjs +13 -0
- package/plugins/trimRows/trimRows.js +61 -0
- package/plugins/trimRows/trimRows.mjs +61 -0
- package/renderers/baseRenderer/baseRenderer.js +4 -0
- package/renderers/baseRenderer/baseRenderer.mjs +4 -0
- package/renderers/registry.js +2 -3
- package/renderers/registry.mjs +1 -1
- package/selection/mouseEventHandler.js +48 -13
- package/selection/mouseEventHandler.mjs +47 -13
- package/selection/range.js +73 -6
- package/selection/range.mjs +73 -6
- package/selection/selection.js +46 -32
- package/selection/selection.mjs +45 -30
- package/settings.d.ts +1 -0
- package/styles/handsontable.css +131 -55
- package/styles/handsontable.min.css +3 -3
- package/styles/ht-theme-horizon.css +296 -181
- package/styles/ht-theme-horizon.min.css +3 -3
- package/styles/ht-theme-main.css +314 -205
- package/styles/ht-theme-main.min.css +3 -3
- package/tableView.js +9 -20
- package/tableView.mjs +9 -20
- package/translations/indexMapper.js +9 -5
- package/translations/indexMapper.mjs +9 -5
- package/utils/paginator.js +13 -0
- package/utils/paginator.mjs +13 -0
- package/utils/staticRegister.js +24 -2
- package/utils/staticRegister.mjs +23 -2
- package/{3rdparty/walkontable/src/utils → utils}/stylesHandler.js +16 -30
- package/{3rdparty/walkontable/src/utils → utils}/stylesHandler.mjs +16 -30
- package/validators/registry.js +2 -3
- package/validators/registry.mjs +1 -1
@@ -7,8 +7,7 @@ function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("C
|
|
7
7
|
function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
|
8
8
|
function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
|
9
9
|
function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
|
10
|
-
import {
|
11
|
-
import { warn } from "../../../../helpers/console.mjs";
|
10
|
+
import { warn } from "../helpers/console.mjs";
|
12
11
|
const CLASSIC_THEME_DEFAULT_HEIGHT = 23;
|
13
12
|
|
14
13
|
/**
|
@@ -26,9 +25,10 @@ export class StylesHandler {
|
|
26
25
|
/**
|
27
26
|
* Initializes a new instance of the `StylesHandler` class.
|
28
27
|
*
|
29
|
-
* @param {
|
28
|
+
* @param {HTMLElement} rootElement - The root element of the instance.
|
29
|
+
* @param {Document} rootDocument - The root document of the instance.
|
30
30
|
*/
|
31
|
-
constructor(
|
31
|
+
constructor(_rootElement2, _rootDocument2) {
|
32
32
|
/**
|
33
33
|
* Calculates the row height based on the current theme and CSS variables.
|
34
34
|
*
|
@@ -81,8 +81,8 @@ export class StylesHandler {
|
|
81
81
|
* @private
|
82
82
|
*/
|
83
83
|
_classPrivateFieldInitSpec(this, _computedStyles, {});
|
84
|
-
_classPrivateFieldSet(_rootElement, this,
|
85
|
-
_classPrivateFieldSet(_rootDocument, this,
|
84
|
+
_classPrivateFieldSet(_rootElement, this, _rootElement2);
|
85
|
+
_classPrivateFieldSet(_rootDocument, this, _rootDocument2);
|
86
86
|
}
|
87
87
|
|
88
88
|
/**
|
@@ -136,11 +136,7 @@ export class StylesHandler {
|
|
136
136
|
return CLASSIC_THEME_DEFAULT_HEIGHT;
|
137
137
|
}
|
138
138
|
const calculatedRowHeight = _assertClassBrand(_StylesHandler_brand, this, _calculateRowHeight).call(this);
|
139
|
-
if (!calculatedRowHeight
|
140
|
-
warn(`The "${_classPrivateFieldGet(_themeName, this)}" theme is enabled, but its stylesheets are missing or not imported correctly. \
|
141
|
-
Import the correct CSS files in order to use that theme.`);
|
142
|
-
_classPrivateFieldSet(_isClassicTheme, this, true);
|
143
|
-
this.useTheme();
|
139
|
+
if (!calculatedRowHeight) {
|
144
140
|
return CLASSIC_THEME_DEFAULT_HEIGHT;
|
145
141
|
}
|
146
142
|
return calculatedRowHeight;
|
@@ -162,18 +158,24 @@ Import the correct CSS files in order to use that theme.`);
|
|
162
158
|
*/
|
163
159
|
useTheme(themeName) {
|
164
160
|
if (!themeName) {
|
165
|
-
|
161
|
+
_classPrivateFieldSet(_themeName, this, undefined);
|
166
162
|
_classPrivateFieldSet(_isClassicTheme, this, true);
|
167
|
-
|
163
|
+
_assertClassBrand(_StylesHandler_brand, this, _cacheStylesheetValues).call(this);
|
168
164
|
return;
|
169
165
|
}
|
170
166
|
if (themeName && themeName !== _classPrivateFieldGet(_themeName, this)) {
|
167
|
+
if (!/ht-theme-.*/.test(themeName)) {
|
168
|
+
warn(`Invalid theme name: ${themeName}. Please provide a valid theme name.`);
|
169
|
+
_classPrivateFieldSet(_themeName, this, undefined);
|
170
|
+
_classPrivateFieldSet(_isClassicTheme, this, false);
|
171
|
+
_assertClassBrand(_StylesHandler_brand, this, _cacheStylesheetValues).call(this);
|
172
|
+
return;
|
173
|
+
}
|
171
174
|
if (_classPrivateFieldGet(_themeName, this)) {
|
172
175
|
_assertClassBrand(_StylesHandler_brand, this, _clearCachedValues).call(this);
|
173
176
|
}
|
174
177
|
_classPrivateFieldSet(_themeName, this, themeName);
|
175
178
|
_classPrivateFieldSet(_isClassicTheme, this, false);
|
176
|
-
_assertClassBrand(_StylesHandler_brand, this, _applyClassNames).call(this);
|
177
179
|
_assertClassBrand(_StylesHandler_brand, this, _cacheStylesheetValues).call(this);
|
178
180
|
}
|
179
181
|
}
|
@@ -186,15 +188,6 @@ Import the correct CSS files in order to use that theme.`);
|
|
186
188
|
getThemeName() {
|
187
189
|
return _classPrivateFieldGet(_themeName, this);
|
188
190
|
}
|
189
|
-
|
190
|
-
/**
|
191
|
-
* Removes the theme-related class names from the root element.
|
192
|
-
*/
|
193
|
-
removeClassNames() {
|
194
|
-
if (hasClass(_classPrivateFieldGet(_rootElement, this), _classPrivateFieldGet(_themeName, this))) {
|
195
|
-
removeClass(_classPrivateFieldGet(_rootElement, this), _classPrivateFieldGet(_themeName, this));
|
196
|
-
}
|
197
|
-
}
|
198
191
|
}
|
199
192
|
function _calculateRowHeight() {
|
200
193
|
const lineHeightVarValue = this.getCSSVariableValue('line-height');
|
@@ -205,13 +198,6 @@ function _calculateRowHeight() {
|
|
205
198
|
}
|
206
199
|
return lineHeightVarValue + 2 * verticalPaddingVarValue + bottomBorderWidth;
|
207
200
|
}
|
208
|
-
/**
|
209
|
-
* Applies the necessary class names to the root element.
|
210
|
-
*/
|
211
|
-
function _applyClassNames() {
|
212
|
-
removeClass(_classPrivateFieldGet(_rootElement, this), /ht-theme-.*/g);
|
213
|
-
addClass(_classPrivateFieldGet(_rootElement, this), _classPrivateFieldGet(_themeName, this));
|
214
|
-
}
|
215
201
|
/**
|
216
202
|
* Caches the computed style values for the root element and `td` element.
|
217
203
|
*/
|
package/validators/registry.js
CHANGED
@@ -4,15 +4,14 @@ exports.__esModule = true;
|
|
4
4
|
exports.getValidator = _getItem;
|
5
5
|
exports.registerValidator = _register;
|
6
6
|
require("core-js/modules/es.error.cause.js");
|
7
|
-
var _staticRegister =
|
8
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
7
|
+
var _staticRegister = require("../utils/staticRegister");
|
9
8
|
const {
|
10
9
|
register,
|
11
10
|
getItem,
|
12
11
|
hasItem,
|
13
12
|
getNames,
|
14
13
|
getValues
|
15
|
-
} = (0, _staticRegister.
|
14
|
+
} = (0, _staticRegister.staticRegister)('validators');
|
16
15
|
|
17
16
|
/**
|
18
17
|
* Retrieve validator function.
|
package/validators/registry.mjs
CHANGED