handsontable 0.0.0-next-a01036f-20230508 → 0.0.0-next-48677e7-20230509
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of handsontable might be problematic. Click here for more details.
- package/3rdparty/walkontable/src/cell/coords.js +40 -13
- package/3rdparty/walkontable/src/cell/coords.mjs +40 -13
- package/3rdparty/walkontable/src/cell/range.js +29 -25
- package/3rdparty/walkontable/src/cell/range.mjs +28 -24
- package/3rdparty/walkontable/src/core/_base.js +9 -3
- package/3rdparty/walkontable/src/core/_base.mjs +9 -3
- package/3rdparty/walkontable/src/core/clone.js +2 -2
- package/3rdparty/walkontable/src/core/clone.mjs +2 -2
- package/3rdparty/walkontable/src/core/core.js +3 -2
- package/3rdparty/walkontable/src/core/core.mjs +3 -2
- package/3rdparty/walkontable/src/event.js +12 -10
- package/3rdparty/walkontable/src/event.mjs +12 -10
- package/3rdparty/walkontable/src/facade/core.js +2 -2
- package/3rdparty/walkontable/src/facade/core.mjs +2 -2
- package/3rdparty/walkontable/src/index.js +10 -2
- package/3rdparty/walkontable/src/index.mjs +2 -2
- package/3rdparty/walkontable/src/overlay/_base.js +8 -7
- package/3rdparty/walkontable/src/overlay/_base.mjs +8 -7
- package/3rdparty/walkontable/src/overlay/bottom.js +7 -6
- package/3rdparty/walkontable/src/overlay/bottom.mjs +7 -6
- package/3rdparty/walkontable/src/overlay/inlineStart.js +2 -4
- package/3rdparty/walkontable/src/overlay/inlineStart.mjs +2 -4
- package/3rdparty/walkontable/src/overlay/top.js +9 -10
- package/3rdparty/walkontable/src/overlay/top.mjs +9 -10
- package/3rdparty/walkontable/src/overlay/topInlineStartCorner.js +12 -10
- package/3rdparty/walkontable/src/overlay/topInlineStartCorner.mjs +12 -10
- package/3rdparty/walkontable/src/overlays.js +64 -55
- package/3rdparty/walkontable/src/overlays.mjs +64 -55
- package/3rdparty/walkontable/src/renderer/table.js +2 -0
- package/3rdparty/walkontable/src/renderer/table.mjs +2 -0
- package/3rdparty/walkontable/src/scroll.js +23 -20
- package/3rdparty/walkontable/src/scroll.mjs +23 -20
- package/3rdparty/walkontable/src/{border.js → selection/border/border.js} +7 -12
- package/3rdparty/walkontable/src/{border.mjs → selection/border/border.mjs} +7 -12
- package/3rdparty/walkontable/src/selection/border/constants.js +18 -0
- package/3rdparty/walkontable/src/selection/border/constants.mjs +13 -0
- package/3rdparty/walkontable/src/selection/constants.js +63 -0
- package/3rdparty/walkontable/src/selection/constants.mjs +51 -0
- package/3rdparty/walkontable/src/selection/index.js +30 -0
- package/3rdparty/walkontable/src/selection/index.mjs +5 -0
- package/3rdparty/walkontable/src/selection/manager.js +334 -0
- package/3rdparty/walkontable/src/selection/manager.mjs +328 -0
- package/3rdparty/walkontable/src/selection/scanner.js +363 -0
- package/3rdparty/walkontable/src/selection/scanner.mjs +359 -0
- package/3rdparty/walkontable/src/selection/selection.js +133 -0
- package/3rdparty/walkontable/src/selection/selection.mjs +127 -0
- package/3rdparty/walkontable/src/settings.js +15 -13
- package/3rdparty/walkontable/src/settings.mjs +15 -13
- package/3rdparty/walkontable/src/table/mixin/calculatedColumns.js +9 -0
- package/3rdparty/walkontable/src/table/mixin/calculatedColumns.mjs +9 -0
- package/3rdparty/walkontable/src/table/mixin/calculatedRows.js +9 -0
- package/3rdparty/walkontable/src/table/mixin/calculatedRows.mjs +9 -0
- package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.js +9 -0
- package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.mjs +9 -0
- package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.js +9 -0
- package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.mjs +9 -0
- package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.js +9 -0
- package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.mjs +9 -0
- package/3rdparty/walkontable/src/table.js +33 -101
- package/3rdparty/walkontable/src/table.mjs +34 -102
- package/base.js +4 -2
- package/base.mjs +2 -2
- package/core.d.ts +4 -0
- package/core.js +52 -19
- package/core.mjs +52 -19
- package/dataMap/dataSource.js +5 -5
- package/dataMap/dataSource.mjs +5 -5
- package/dataMap/metaManager/metaSchema.js +8 -1
- package/dataMap/metaManager/metaSchema.mjs +8 -1
- package/dist/handsontable.css +7 -2
- package/dist/handsontable.full.css +7 -2
- package/dist/handsontable.full.js +9413 -9096
- package/dist/handsontable.full.min.css +3 -3
- package/dist/handsontable.full.min.js +115 -123
- package/dist/handsontable.js +9501 -9183
- package/dist/handsontable.min.css +3 -3
- package/dist/handsontable.min.js +3 -11
- package/dist/languages/all.js +0 -133
- package/dist/languages/ar-AR.js +0 -7
- package/dist/languages/cs-CZ.js +0 -7
- package/dist/languages/de-CH.js +0 -7
- package/dist/languages/de-DE.js +0 -7
- package/dist/languages/en-US.js +0 -7
- package/dist/languages/es-MX.js +0 -7
- package/dist/languages/fr-FR.js +0 -7
- package/dist/languages/it-IT.js +0 -7
- package/dist/languages/ja-JP.js +0 -7
- package/dist/languages/ko-KR.js +0 -7
- package/dist/languages/lv-LV.js +0 -7
- package/dist/languages/nb-NO.js +0 -7
- package/dist/languages/nl-NL.js +0 -7
- package/dist/languages/pl-PL.js +0 -7
- package/dist/languages/pt-BR.js +0 -7
- package/dist/languages/ru-RU.js +0 -7
- package/dist/languages/sr-SP.js +0 -7
- package/dist/languages/zh-CN.js +0 -7
- package/dist/languages/zh-TW.js +0 -7
- package/editorManager.js +7 -3
- package/editorManager.mjs +7 -3
- package/editors/textEditor/textEditor.js +3 -16
- package/editors/textEditor/textEditor.mjs +4 -17
- package/focusManager.d.ts +12 -0
- package/focusManager.js +249 -0
- package/focusManager.mjs +245 -0
- package/helpers/dom/element.js +11 -0
- package/helpers/dom/element.mjs +10 -0
- package/helpers/mixed.js +1 -1
- package/helpers/mixed.mjs +1 -1
- package/i18n/languages/ar-AR.js +1 -7
- package/i18n/languages/cs-CZ.js +1 -7
- package/i18n/languages/de-CH.js +1 -7
- package/i18n/languages/de-DE.js +1 -7
- package/i18n/languages/en-US.js +1 -7
- package/i18n/languages/es-MX.js +1 -7
- package/i18n/languages/fr-FR.js +1 -7
- package/i18n/languages/it-IT.js +1 -7
- package/i18n/languages/ja-JP.js +1 -7
- package/i18n/languages/ko-KR.js +1 -7
- package/i18n/languages/lv-LV.js +1 -7
- package/i18n/languages/nb-NO.js +1 -7
- package/i18n/languages/nl-NL.js +1 -7
- package/i18n/languages/pl-PL.js +1 -7
- package/i18n/languages/pt-BR.js +1 -7
- package/i18n/languages/ru-RU.js +1 -7
- package/i18n/languages/sr-SP.js +1 -7
- package/i18n/languages/zh-CN.js +1 -7
- package/i18n/languages/zh-TW.js +1 -7
- package/languages/all.js +0 -133
- package/languages/ar-AR.js +0 -7
- package/languages/cs-CZ.js +0 -7
- package/languages/de-CH.js +0 -7
- package/languages/de-DE.js +0 -7
- package/languages/en-US.js +0 -7
- package/languages/es-MX.js +0 -7
- package/languages/fr-FR.js +0 -7
- package/languages/index.js +0 -133
- package/languages/it-IT.js +0 -7
- package/languages/ja-JP.js +0 -7
- package/languages/ko-KR.js +0 -7
- package/languages/lv-LV.js +0 -7
- package/languages/nb-NO.js +0 -7
- package/languages/nl-NL.js +0 -7
- package/languages/pl-PL.js +0 -7
- package/languages/pt-BR.js +0 -7
- package/languages/ru-RU.js +0 -7
- package/languages/sr-SP.js +0 -7
- package/languages/zh-CN.js +0 -7
- package/languages/zh-TW.js +0 -7
- package/package.json +2 -3
- package/pluginHooks.js +7 -17
- package/pluginHooks.mjs +4 -16
- package/plugins/autoRowSize/autoRowSize.js +2 -2
- package/plugins/autoRowSize/autoRowSize.mjs +2 -2
- package/plugins/copyPaste/copyPaste.js +12 -93
- package/plugins/copyPaste/copyPaste.mjs +12 -93
- package/plugins/copyPaste/copyableRanges.js +31 -25
- package/plugins/copyPaste/copyableRanges.mjs +24 -18
- package/plugins/customBorders/customBorders.js +6 -2
- package/plugins/customBorders/customBorders.mjs +7 -3
- package/plugins/filters/filters.js +0 -5
- package/plugins/filters/filters.mjs +0 -5
- package/plugins/formulas/formulas.js +168 -190
- package/plugins/formulas/formulas.mjs +168 -190
- package/plugins/mergeCells/mergeCells.js +0 -16
- package/plugins/mergeCells/mergeCells.mjs +0 -16
- package/plugins/nestedHeaders/nestedHeaders.js +3 -4
- package/plugins/nestedHeaders/nestedHeaders.mjs +3 -4
- package/plugins/nestedHeaders/stateManager/headersTree.js +26 -23
- package/plugins/nestedHeaders/stateManager/headersTree.mjs +23 -20
- package/plugins/nestedHeaders/stateManager/index.js +3 -3
- package/plugins/nestedHeaders/stateManager/matrixGenerator.js +0 -1
- package/plugins/nestedHeaders/stateManager/settingsNormalizer.js +1 -1
- package/plugins/nestedHeaders/utils/ghostTable.js +35 -30
- package/plugins/nestedHeaders/utils/ghostTable.mjs +35 -30
- package/plugins/registry.js +1 -3
- package/plugins/undoRedo/undoRedo.js +1 -0
- package/plugins/undoRedo/undoRedo.mjs +1 -0
- package/renderers/baseRenderer/baseRenderer.js +3 -0
- package/renderers/baseRenderer/baseRenderer.mjs +3 -0
- package/selection/highlight/highlight.js +335 -133
- package/selection/highlight/highlight.mjs +325 -129
- package/selection/highlight/types/activeHeader.js +10 -9
- package/selection/highlight/types/activeHeader.mjs +10 -8
- package/selection/highlight/types/area.js +12 -27
- package/selection/highlight/types/area.mjs +16 -30
- package/selection/highlight/types/areaLayered.js +54 -0
- package/selection/highlight/types/areaLayered.mjs +49 -0
- package/selection/highlight/types/column.js +50 -0
- package/selection/highlight/types/column.mjs +45 -0
- package/selection/highlight/types/customSelection.js +7 -10
- package/selection/highlight/types/customSelection.mjs +7 -9
- package/selection/highlight/types/fill.js +5 -8
- package/selection/highlight/types/fill.mjs +5 -7
- package/selection/highlight/types/{cell.js → focus.js} +5 -8
- package/selection/highlight/types/{cell.mjs → focus.mjs} +5 -7
- package/selection/highlight/types/header.js +10 -20
- package/selection/highlight/types/header.mjs +10 -19
- package/selection/highlight/types/{index.js → row.js} +27 -31
- package/selection/highlight/types/{index.mjs → row.mjs} +24 -29
- package/selection/highlight/visualSelection.js +12 -21
- package/selection/highlight/visualSelection.mjs +12 -21
- package/selection/index.js +4 -7
- package/selection/index.mjs +2 -3
- package/selection/selection.js +88 -46
- package/selection/selection.mjs +82 -44
- package/settings.d.ts +1 -0
- package/tableView.js +94 -66
- package/tableView.mjs +94 -66
- package/translations/changesObservable/observable.js +46 -41
- package/translations/changesObservable/observable.mjs +41 -36
- package/translations/changesObservable/observer.js +1 -1
- package/translations/indexMapper.js +0 -21
- package/translations/indexMapper.mjs +0 -21
- package/utils/dataStructures/tree.js +18 -15
- package/utils/dataStructures/tree.mjs +18 -15
- package/utils/parseTable.js +1 -5
- package/utils/parseTable.mjs +1 -5
- package/3rdparty/walkontable/src/selection.js +0 -354
- package/3rdparty/walkontable/src/selection.mjs +0 -348
- package/plugins/copyPaste/focusableElement.js +0 -219
- package/plugins/copyPaste/focusableElement.mjs +0 -213
- package/plugins/formulas/indexSyncer/axisSyncer.js +0 -379
- package/plugins/formulas/indexSyncer/axisSyncer.mjs +0 -374
- package/plugins/formulas/indexSyncer/index.js +0 -225
- package/plugins/formulas/indexSyncer/index.mjs +0 -219
- package/selection/highlight/constants.js +0 -16
- package/selection/highlight/constants.mjs +0 -6
package/core.js
CHANGED
@@ -39,6 +39,7 @@ var _templateLiteralTag = require("./helpers/templateLiteralTag");
|
|
39
39
|
var _editorManager = _interopRequireDefault(require("./editorManager"));
|
40
40
|
var _eventManager = _interopRequireDefault(require("./eventManager"));
|
41
41
|
var _object = require("./helpers/object");
|
42
|
+
var _focusManager = _interopRequireDefault(require("./focusManager"));
|
42
43
|
var _array = require("./helpers/array");
|
43
44
|
var _parseTable = require("./utils/parseTable");
|
44
45
|
var _registry = require("./plugins/registry");
|
@@ -107,7 +108,7 @@ var deprecationWarns = new Set();
|
|
107
108
|
* :::
|
108
109
|
*
|
109
110
|
* ::: only-for react
|
110
|
-
* ```jsx
|
111
|
+
* ```jsx{3,7,13}
|
111
112
|
* import { useRef } from 'react';
|
112
113
|
*
|
113
114
|
* const hotTableComponent = useRef(null);
|
@@ -139,6 +140,7 @@ function Core(rootElement, userSettings) {
|
|
139
140
|
var dataSource;
|
140
141
|
var grid;
|
141
142
|
var editorManager;
|
143
|
+
var focusManager;
|
142
144
|
var firstRun = true;
|
143
145
|
if ((0, _rootInstance.hasValidParameter)(rootInstanceSymbol)) {
|
144
146
|
(0, _rootInstance.registerAsRootInstance)(this);
|
@@ -263,12 +265,6 @@ function Core(rootElement, userSettings) {
|
|
263
265
|
* @type {IndexMapper}
|
264
266
|
*/
|
265
267
|
this.rowIndexMapper = new _translations.IndexMapper();
|
266
|
-
this.columnIndexMapper.addLocalHook('indexesSequenceChange', function (source) {
|
267
|
-
instance.runHooks('afterColumnSequenceChange', source);
|
268
|
-
});
|
269
|
-
this.rowIndexMapper.addLocalHook('indexesSequenceChange', function (source) {
|
270
|
-
instance.runHooks('afterRowSequenceChange', source);
|
271
|
-
});
|
272
268
|
dataSource = new _dataSource.default(instance);
|
273
269
|
if (!this.rootElement.id || this.rootElement.id.substring(0, 3) === 'ht_') {
|
274
270
|
this.rootElement.id = this.guid; // if root element does not have an id, assign a random id
|
@@ -315,6 +311,12 @@ function Core(rootElement, userSettings) {
|
|
315
311
|
countRowsTranslated: function countRowsTranslated() {
|
316
312
|
return _this.view.countRenderableRows();
|
317
313
|
},
|
314
|
+
countRowHeaders: function countRowHeaders() {
|
315
|
+
return _this.countRowHeaders();
|
316
|
+
},
|
317
|
+
countColHeaders: function countColHeaders() {
|
318
|
+
return _this.countColHeaders();
|
319
|
+
},
|
318
320
|
getShortcutManager: function getShortcutManager() {
|
319
321
|
return instance.getShortcutManager();
|
320
322
|
},
|
@@ -1113,6 +1115,7 @@ function Core(rootElement, userSettings) {
|
|
1113
1115
|
this.updateSettings(tableMeta, true);
|
1114
1116
|
this.view = new _tableView.default(this);
|
1115
1117
|
editorManager = _editorManager.default.getInstance(instance, tableMeta, selection);
|
1118
|
+
focusManager = new _focusManager.default(instance);
|
1116
1119
|
instance.runHooks('init');
|
1117
1120
|
this.forceFullRender = true; // used when data was changed
|
1118
1121
|
this.view.render();
|
@@ -2448,13 +2451,11 @@ function Core(rootElement, userSettings) {
|
|
2448
2451
|
};
|
2449
2452
|
|
2450
2453
|
/**
|
2451
|
-
*
|
2452
|
-
*
|
2453
|
-
* For column headers and row headers, returns `null`.
|
2454
|
+
* Get value from the selected cell.
|
2454
2455
|
*
|
2455
2456
|
* @memberof Core#
|
2456
2457
|
* @function getValue
|
2457
|
-
* @returns {*}
|
2458
|
+
* @returns {*} Value of selected cell.
|
2458
2459
|
*/
|
2459
2460
|
this.getValue = function () {
|
2460
2461
|
var sel = instance.getSelectedLast();
|
@@ -3146,13 +3147,7 @@ function Core(rootElement, userSettings) {
|
|
3146
3147
|
};
|
3147
3148
|
|
3148
3149
|
/**
|
3149
|
-
* Checks if
|
3150
|
-
* and [configuration options](@/guides/getting-started/configuration-options.md)
|
3151
|
-
* allow for changing the number of columns.
|
3152
|
-
*
|
3153
|
-
* Returns `false` when your data is an array of objects,
|
3154
|
-
* or when you use the [`columns`](@/api/options.md#columns) option.
|
3155
|
-
* Otherwise, returns `true`.
|
3150
|
+
* Checks if the data format and config allows user to modify the column structure.
|
3156
3151
|
*
|
3157
3152
|
* @memberof Core#
|
3158
3153
|
* @function isColumnModificationAllowed
|
@@ -3718,6 +3713,30 @@ function Core(rootElement, userSettings) {
|
|
3718
3713
|
return instance.view._wt.drawn ? instance.view._wt.wtTable.getVisibleColumnsCount() : -1;
|
3719
3714
|
};
|
3720
3715
|
|
3716
|
+
/**
|
3717
|
+
* Returns the number of rendered row headers.
|
3718
|
+
*
|
3719
|
+
* @since 13.0.0
|
3720
|
+
* @memberof Core#
|
3721
|
+
* @function countRowHeaders
|
3722
|
+
* @returns {number} Number of row headers.
|
3723
|
+
*/
|
3724
|
+
this.countRowHeaders = function () {
|
3725
|
+
return this.view.getRowHeadersCount();
|
3726
|
+
};
|
3727
|
+
|
3728
|
+
/**
|
3729
|
+
* Returns the number of rendered column headers.
|
3730
|
+
*
|
3731
|
+
* @since 13.0.0
|
3732
|
+
* @memberof Core#
|
3733
|
+
* @function countColHeaders
|
3734
|
+
* @returns {number} Number of column headers.
|
3735
|
+
*/
|
3736
|
+
this.countColHeaders = function () {
|
3737
|
+
return this.view.getColumnHeadersCount();
|
3738
|
+
};
|
3739
|
+
|
3721
3740
|
/**
|
3722
3741
|
* Returns the number of empty rows. If the optional ending parameter is `true`, returns the
|
3723
3742
|
* number of empty rows at the bottom of the table.
|
@@ -4118,6 +4137,8 @@ function Core(rootElement, userSettings) {
|
|
4118
4137
|
if (datamap) {
|
4119
4138
|
datamap.destroy();
|
4120
4139
|
}
|
4140
|
+
instance.rowIndexMapper = null;
|
4141
|
+
instance.columnIndexMapper = null;
|
4121
4142
|
datamap = null;
|
4122
4143
|
grid = null;
|
4123
4144
|
selection = null;
|
@@ -4473,6 +4494,18 @@ function Core(rootElement, userSettings) {
|
|
4473
4494
|
this.getShortcutManager = function () {
|
4474
4495
|
return shortcutManager;
|
4475
4496
|
};
|
4497
|
+
|
4498
|
+
/**
|
4499
|
+
* Return the Focus Manager responsible for managing the browser's focus in the table.
|
4500
|
+
*
|
4501
|
+
* @memberof Core#
|
4502
|
+
* @since 13.0.0
|
4503
|
+
* @function getFocusManager
|
4504
|
+
* @returns {FocusManager}
|
4505
|
+
*/
|
4506
|
+
this.getFocusManager = function () {
|
4507
|
+
return focusManager;
|
4508
|
+
};
|
4476
4509
|
var gridContext = shortcutManager.addContext('grid');
|
4477
4510
|
var gridConfig = {
|
4478
4511
|
runOnlyIf: function runOnlyIf() {
|
@@ -4482,7 +4515,7 @@ function Core(rootElement, userSettings) {
|
|
4482
4515
|
};
|
4483
4516
|
shortcutManager.setActiveContextName('grid');
|
4484
4517
|
gridContext.addShortcuts([{
|
4485
|
-
keys: [['Control/Meta', 'A']],
|
4518
|
+
keys: [['Control/Meta', 'A'], ['Control/Meta', 'Shift', 'Space']],
|
4486
4519
|
callback: function callback() {
|
4487
4520
|
instance.selectAll();
|
4488
4521
|
}
|
package/core.mjs
CHANGED
@@ -48,6 +48,7 @@ import { toSingleLine } from "./helpers/templateLiteralTag.mjs";
|
|
48
48
|
import EditorManager from "./editorManager.mjs";
|
49
49
|
import EventManager from "./eventManager.mjs";
|
50
50
|
import { deepClone, duckSchema, isObjectEqual, isObject, deepObjectSize, hasOwnProperty, createObjectPropListener, objectEach } from "./helpers/object.mjs";
|
51
|
+
import FocusManager from "./focusManager.mjs";
|
51
52
|
import { arrayMap, arrayEach, arrayReduce, getDifferenceOfArrays, stringToArray, pivot } from "./helpers/array.mjs";
|
52
53
|
import { instanceToHTML } from "./utils/parseTable.mjs";
|
53
54
|
import { getPlugin, getPluginsNames } from "./plugins/registry.mjs";
|
@@ -102,7 +103,7 @@ var deprecationWarns = new Set();
|
|
102
103
|
* :::
|
103
104
|
*
|
104
105
|
* ::: only-for react
|
105
|
-
* ```jsx
|
106
|
+
* ```jsx{3,7,13}
|
106
107
|
* import { useRef } from 'react';
|
107
108
|
*
|
108
109
|
* const hotTableComponent = useRef(null);
|
@@ -134,6 +135,7 @@ export default function Core(rootElement, userSettings) {
|
|
134
135
|
var dataSource;
|
135
136
|
var grid;
|
136
137
|
var editorManager;
|
138
|
+
var focusManager;
|
137
139
|
var firstRun = true;
|
138
140
|
if (hasValidParameter(rootInstanceSymbol)) {
|
139
141
|
registerAsRootInstance(this);
|
@@ -258,12 +260,6 @@ export default function Core(rootElement, userSettings) {
|
|
258
260
|
* @type {IndexMapper}
|
259
261
|
*/
|
260
262
|
this.rowIndexMapper = new IndexMapper();
|
261
|
-
this.columnIndexMapper.addLocalHook('indexesSequenceChange', function (source) {
|
262
|
-
instance.runHooks('afterColumnSequenceChange', source);
|
263
|
-
});
|
264
|
-
this.rowIndexMapper.addLocalHook('indexesSequenceChange', function (source) {
|
265
|
-
instance.runHooks('afterRowSequenceChange', source);
|
266
|
-
});
|
267
263
|
dataSource = new DataSource(instance);
|
268
264
|
if (!this.rootElement.id || this.rootElement.id.substring(0, 3) === 'ht_') {
|
269
265
|
this.rootElement.id = this.guid; // if root element does not have an id, assign a random id
|
@@ -310,6 +306,12 @@ export default function Core(rootElement, userSettings) {
|
|
310
306
|
countRowsTranslated: function countRowsTranslated() {
|
311
307
|
return _this.view.countRenderableRows();
|
312
308
|
},
|
309
|
+
countRowHeaders: function countRowHeaders() {
|
310
|
+
return _this.countRowHeaders();
|
311
|
+
},
|
312
|
+
countColHeaders: function countColHeaders() {
|
313
|
+
return _this.countColHeaders();
|
314
|
+
},
|
313
315
|
getShortcutManager: function getShortcutManager() {
|
314
316
|
return instance.getShortcutManager();
|
315
317
|
},
|
@@ -1108,6 +1110,7 @@ export default function Core(rootElement, userSettings) {
|
|
1108
1110
|
this.updateSettings(tableMeta, true);
|
1109
1111
|
this.view = new TableView(this);
|
1110
1112
|
editorManager = EditorManager.getInstance(instance, tableMeta, selection);
|
1113
|
+
focusManager = new FocusManager(instance);
|
1111
1114
|
instance.runHooks('init');
|
1112
1115
|
this.forceFullRender = true; // used when data was changed
|
1113
1116
|
this.view.render();
|
@@ -2443,13 +2446,11 @@ export default function Core(rootElement, userSettings) {
|
|
2443
2446
|
};
|
2444
2447
|
|
2445
2448
|
/**
|
2446
|
-
*
|
2447
|
-
*
|
2448
|
-
* For column headers and row headers, returns `null`.
|
2449
|
+
* Get value from the selected cell.
|
2449
2450
|
*
|
2450
2451
|
* @memberof Core#
|
2451
2452
|
* @function getValue
|
2452
|
-
* @returns {*}
|
2453
|
+
* @returns {*} Value of selected cell.
|
2453
2454
|
*/
|
2454
2455
|
this.getValue = function () {
|
2455
2456
|
var sel = instance.getSelectedLast();
|
@@ -3141,13 +3142,7 @@ export default function Core(rootElement, userSettings) {
|
|
3141
3142
|
};
|
3142
3143
|
|
3143
3144
|
/**
|
3144
|
-
* Checks if
|
3145
|
-
* and [configuration options](@/guides/getting-started/configuration-options.md)
|
3146
|
-
* allow for changing the number of columns.
|
3147
|
-
*
|
3148
|
-
* Returns `false` when your data is an array of objects,
|
3149
|
-
* or when you use the [`columns`](@/api/options.md#columns) option.
|
3150
|
-
* Otherwise, returns `true`.
|
3145
|
+
* Checks if the data format and config allows user to modify the column structure.
|
3151
3146
|
*
|
3152
3147
|
* @memberof Core#
|
3153
3148
|
* @function isColumnModificationAllowed
|
@@ -3713,6 +3708,30 @@ export default function Core(rootElement, userSettings) {
|
|
3713
3708
|
return instance.view._wt.drawn ? instance.view._wt.wtTable.getVisibleColumnsCount() : -1;
|
3714
3709
|
};
|
3715
3710
|
|
3711
|
+
/**
|
3712
|
+
* Returns the number of rendered row headers.
|
3713
|
+
*
|
3714
|
+
* @since 13.0.0
|
3715
|
+
* @memberof Core#
|
3716
|
+
* @function countRowHeaders
|
3717
|
+
* @returns {number} Number of row headers.
|
3718
|
+
*/
|
3719
|
+
this.countRowHeaders = function () {
|
3720
|
+
return this.view.getRowHeadersCount();
|
3721
|
+
};
|
3722
|
+
|
3723
|
+
/**
|
3724
|
+
* Returns the number of rendered column headers.
|
3725
|
+
*
|
3726
|
+
* @since 13.0.0
|
3727
|
+
* @memberof Core#
|
3728
|
+
* @function countColHeaders
|
3729
|
+
* @returns {number} Number of column headers.
|
3730
|
+
*/
|
3731
|
+
this.countColHeaders = function () {
|
3732
|
+
return this.view.getColumnHeadersCount();
|
3733
|
+
};
|
3734
|
+
|
3716
3735
|
/**
|
3717
3736
|
* Returns the number of empty rows. If the optional ending parameter is `true`, returns the
|
3718
3737
|
* number of empty rows at the bottom of the table.
|
@@ -4113,6 +4132,8 @@ export default function Core(rootElement, userSettings) {
|
|
4113
4132
|
if (datamap) {
|
4114
4133
|
datamap.destroy();
|
4115
4134
|
}
|
4135
|
+
instance.rowIndexMapper = null;
|
4136
|
+
instance.columnIndexMapper = null;
|
4116
4137
|
datamap = null;
|
4117
4138
|
grid = null;
|
4118
4139
|
selection = null;
|
@@ -4468,6 +4489,18 @@ export default function Core(rootElement, userSettings) {
|
|
4468
4489
|
this.getShortcutManager = function () {
|
4469
4490
|
return shortcutManager;
|
4470
4491
|
};
|
4492
|
+
|
4493
|
+
/**
|
4494
|
+
* Return the Focus Manager responsible for managing the browser's focus in the table.
|
4495
|
+
*
|
4496
|
+
* @memberof Core#
|
4497
|
+
* @since 13.0.0
|
4498
|
+
* @function getFocusManager
|
4499
|
+
* @returns {FocusManager}
|
4500
|
+
*/
|
4501
|
+
this.getFocusManager = function () {
|
4502
|
+
return focusManager;
|
4503
|
+
};
|
4471
4504
|
var gridContext = shortcutManager.addContext('grid');
|
4472
4505
|
var gridConfig = {
|
4473
4506
|
runOnlyIf: function runOnlyIf() {
|
@@ -4477,7 +4510,7 @@ export default function Core(rootElement, userSettings) {
|
|
4477
4510
|
};
|
4478
4511
|
shortcutManager.setActiveContextName('grid');
|
4479
4512
|
gridContext.addShortcuts([{
|
4480
|
-
keys: [['Control/Meta', 'A']],
|
4513
|
+
keys: [['Control/Meta', 'A'], ['Control/Meta', 'Shift', 'Space']],
|
4481
4514
|
callback: function callback() {
|
4482
4515
|
instance.selectAll();
|
4483
4516
|
}
|
package/dataMap/dataSource.js
CHANGED
@@ -195,7 +195,7 @@ var DataSource = /*#__PURE__*/function () {
|
|
195
195
|
}
|
196
196
|
if (this.hot.hasHook('modifySourceData')) {
|
197
197
|
var valueHolder = (0, _object.createObjectPropListener)(value);
|
198
|
-
this.hot.runHooks('modifySourceData', row, column, valueHolder, 'set');
|
198
|
+
this.hot.runHooks('modifySourceData', row, this.propToCol(column), valueHolder, 'set');
|
199
199
|
if (valueHolder.isTouched()) {
|
200
200
|
value = valueHolder.value;
|
201
201
|
}
|
@@ -232,7 +232,7 @@ var DataSource = /*#__PURE__*/function () {
|
|
232
232
|
}
|
233
233
|
if (this.hot.hasHook('modifySourceData')) {
|
234
234
|
var valueHolder = (0, _object.createObjectPropListener)(result);
|
235
|
-
this.hot.runHooks('modifySourceData', row, column, valueHolder, 'get');
|
235
|
+
this.hot.runHooks('modifySourceData', row, this.colToProp(column), valueHolder, 'get');
|
236
236
|
if (valueHolder.isTouched()) {
|
237
237
|
result = valueHolder.value;
|
238
238
|
}
|
@@ -244,14 +244,14 @@ var DataSource = /*#__PURE__*/function () {
|
|
244
244
|
* Returns a single value from the data.
|
245
245
|
*
|
246
246
|
* @param {number} row Physical row index.
|
247
|
-
* @param {number}
|
247
|
+
* @param {number} column Visual column index.
|
248
248
|
* @returns {*}
|
249
249
|
*/
|
250
250
|
}, {
|
251
251
|
key: "getAtCell",
|
252
|
-
value: function getAtCell(row,
|
252
|
+
value: function getAtCell(row, column) {
|
253
253
|
var dataRow = this.modifyRowData(row);
|
254
|
-
return this.getAtPhysicalCell(row, this.colToProp(
|
254
|
+
return this.getAtPhysicalCell(row, this.colToProp(column), dataRow);
|
255
255
|
}
|
256
256
|
|
257
257
|
/**
|
package/dataMap/dataSource.mjs
CHANGED
@@ -191,7 +191,7 @@ var DataSource = /*#__PURE__*/function () {
|
|
191
191
|
}
|
192
192
|
if (this.hot.hasHook('modifySourceData')) {
|
193
193
|
var valueHolder = createObjectPropListener(value);
|
194
|
-
this.hot.runHooks('modifySourceData', row, column, valueHolder, 'set');
|
194
|
+
this.hot.runHooks('modifySourceData', row, this.propToCol(column), valueHolder, 'set');
|
195
195
|
if (valueHolder.isTouched()) {
|
196
196
|
value = valueHolder.value;
|
197
197
|
}
|
@@ -228,7 +228,7 @@ var DataSource = /*#__PURE__*/function () {
|
|
228
228
|
}
|
229
229
|
if (this.hot.hasHook('modifySourceData')) {
|
230
230
|
var valueHolder = createObjectPropListener(result);
|
231
|
-
this.hot.runHooks('modifySourceData', row, column, valueHolder, 'get');
|
231
|
+
this.hot.runHooks('modifySourceData', row, this.colToProp(column), valueHolder, 'get');
|
232
232
|
if (valueHolder.isTouched()) {
|
233
233
|
result = valueHolder.value;
|
234
234
|
}
|
@@ -240,14 +240,14 @@ var DataSource = /*#__PURE__*/function () {
|
|
240
240
|
* Returns a single value from the data.
|
241
241
|
*
|
242
242
|
* @param {number} row Physical row index.
|
243
|
-
* @param {number}
|
243
|
+
* @param {number} column Visual column index.
|
244
244
|
* @returns {*}
|
245
245
|
*/
|
246
246
|
}, {
|
247
247
|
key: "getAtCell",
|
248
|
-
value: function getAtCell(row,
|
248
|
+
value: function getAtCell(row, column) {
|
249
249
|
var dataRow = this.modifyRowData(row);
|
250
|
-
return this.getAtPhysicalCell(row, this.colToProp(
|
250
|
+
return this.getAtPhysicalCell(row, this.colToProp(column), dataRow);
|
251
251
|
}
|
252
252
|
|
253
253
|
/**
|
@@ -21,7 +21,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
21
21
|
* [Configuration options](@/guides/getting-started/configuration-options.md) let you heavily customize your Handsontable instance. For example, you can:
|
22
22
|
*
|
23
23
|
* - Enable and disable built-in features
|
24
|
-
* - Enable and configure additional [plugins](@/
|
24
|
+
* - Enable and configure additional [plugins](@/guides/tools-and-building/custom-plugins.md)
|
25
25
|
* - Personalize Handsontable's look
|
26
26
|
* - Adjust Handsontable's behavior
|
27
27
|
* - Implement your own custom features
|
@@ -2437,6 +2437,13 @@ var _default = function _default() {
|
|
2437
2437
|
* ```
|
2438
2438
|
*/
|
2439
2439
|
invalidCellClassName: 'htInvalid',
|
2440
|
+
/**
|
2441
|
+
* The `imeFastEdit` option allows using the "fast edit" feature for the IME users. It's disabled by default
|
2442
|
+
* because of its incompatibility with some of the accessibility features.
|
2443
|
+
*
|
2444
|
+
* Enabling this option can make a negative impact on how some screen readers handle reading the table cells.
|
2445
|
+
*/
|
2446
|
+
imeFastEdit: false,
|
2440
2447
|
/**
|
2441
2448
|
* The `isEmptyCol` option lets you define your own custom method
|
2442
2449
|
* for checking if a column at a given visual index is empty.
|
@@ -17,7 +17,7 @@ import { isObjectEqual } from "../../helpers/object.mjs";
|
|
17
17
|
* [Configuration options](@/guides/getting-started/configuration-options.md) let you heavily customize your Handsontable instance. For example, you can:
|
18
18
|
*
|
19
19
|
* - Enable and disable built-in features
|
20
|
-
* - Enable and configure additional [plugins](@/
|
20
|
+
* - Enable and configure additional [plugins](@/guides/tools-and-building/custom-plugins.md)
|
21
21
|
* - Personalize Handsontable's look
|
22
22
|
* - Adjust Handsontable's behavior
|
23
23
|
* - Implement your own custom features
|
@@ -2433,6 +2433,13 @@ export default (function () {
|
|
2433
2433
|
* ```
|
2434
2434
|
*/
|
2435
2435
|
invalidCellClassName: 'htInvalid',
|
2436
|
+
/**
|
2437
|
+
* The `imeFastEdit` option allows using the "fast edit" feature for the IME users. It's disabled by default
|
2438
|
+
* because of its incompatibility with some of the accessibility features.
|
2439
|
+
*
|
2440
|
+
* Enabling this option can make a negative impact on how some screen readers handle reading the table cells.
|
2441
|
+
*/
|
2442
|
+
imeFastEdit: false,
|
2436
2443
|
/**
|
2437
2444
|
* The `isEmptyCol` option lets you define your own custom method
|
2438
2445
|
* for checking if a column at a given visual index is empty.
|
package/dist/handsontable.css
CHANGED
@@ -25,8 +25,8 @@
|
|
25
25
|
* INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING FROM
|
26
26
|
* USE OR INABILITY TO USE THIS SOFTWARE.
|
27
27
|
*
|
28
|
-
* Version: 0.0.0-next-
|
29
|
-
* Release date: 28/03/2023 (built at
|
28
|
+
* Version: 0.0.0-next-48677e7-20230509
|
29
|
+
* Release date: 28/03/2023 (built at 09/05/2023 07:28:55)
|
30
30
|
*/
|
31
31
|
/**
|
32
32
|
* Fix for bootstrap styles
|
@@ -607,6 +607,11 @@ innerBorderBottom - Property controlled by bottom overlay
|
|
607
607
|
opacity: 0.58;
|
608
608
|
}
|
609
609
|
|
610
|
+
.handsontable tbody th.current,
|
611
|
+
.handsontable thead th.current {
|
612
|
+
box-shadow: inset 0 0 0 2px #5292f7;
|
613
|
+
}
|
614
|
+
|
610
615
|
.handsontable tbody th.ht__highlight,
|
611
616
|
.handsontable thead th.ht__highlight {
|
612
617
|
background-color: #dcdcdc;
|
@@ -25,8 +25,8 @@
|
|
25
25
|
* INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING FROM
|
26
26
|
* USE OR INABILITY TO USE THIS SOFTWARE.
|
27
27
|
*
|
28
|
-
* Version: 0.0.0-next-
|
29
|
-
* Release date: 28/03/2023 (built at
|
28
|
+
* Version: 0.0.0-next-48677e7-20230509
|
29
|
+
* Release date: 28/03/2023 (built at 09/05/2023 07:28:55)
|
30
30
|
*/
|
31
31
|
/**
|
32
32
|
* Fix for bootstrap styles
|
@@ -607,6 +607,11 @@ innerBorderBottom - Property controlled by bottom overlay
|
|
607
607
|
opacity: 0.58;
|
608
608
|
}
|
609
609
|
|
610
|
+
.handsontable tbody th.current,
|
611
|
+
.handsontable thead th.current {
|
612
|
+
box-shadow: inset 0 0 0 2px #5292f7;
|
613
|
+
}
|
614
|
+
|
610
615
|
.handsontable tbody th.ht__highlight,
|
611
616
|
.handsontable thead th.ht__highlight {
|
612
617
|
background-color: #dcdcdc;
|