handsontable 12.0.0 → 12.1.1
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/clone.js +2 -2
- package/3rdparty/walkontable/src/core/clone.mjs +2 -2
- package/3rdparty/walkontable/src/core/core.js +2 -2
- package/3rdparty/walkontable/src/core/core.mjs +2 -2
- package/3rdparty/walkontable/src/overlay/bottom.js +20 -14
- package/3rdparty/walkontable/src/overlay/bottom.mjs +20 -14
- package/3rdparty/walkontable/src/overlay/bottomInlineStartCorner.js +14 -8
- package/3rdparty/walkontable/src/overlay/bottomInlineStartCorner.mjs +14 -8
- package/3rdparty/walkontable/src/overlay/inlineStart.js +14 -5
- package/3rdparty/walkontable/src/overlay/inlineStart.mjs +14 -5
- package/3rdparty/walkontable/src/overlay/top.js +12 -3
- package/3rdparty/walkontable/src/overlay/top.mjs +12 -3
- package/3rdparty/walkontable/src/overlay/topInlineStartCorner.js +3 -3
- package/3rdparty/walkontable/src/overlay/topInlineStartCorner.mjs +3 -3
- package/3rdparty/walkontable/src/overlays.js +2 -2
- package/3rdparty/walkontable/src/overlays.mjs +2 -2
- package/3rdparty/walkontable/src/renderer/cells.js +2 -2
- package/3rdparty/walkontable/src/renderer/cells.mjs +2 -2
- package/3rdparty/walkontable/src/renderer/colGroup.js +2 -2
- package/3rdparty/walkontable/src/renderer/colGroup.mjs +2 -2
- package/3rdparty/walkontable/src/renderer/columnHeaders.js +2 -2
- package/3rdparty/walkontable/src/renderer/columnHeaders.mjs +2 -2
- package/3rdparty/walkontable/src/renderer/rowHeaders.js +2 -2
- package/3rdparty/walkontable/src/renderer/rowHeaders.mjs +2 -2
- package/3rdparty/walkontable/src/renderer/rows.js +2 -2
- package/3rdparty/walkontable/src/renderer/rows.mjs +2 -2
- package/3rdparty/walkontable/src/scroll.js +111 -63
- package/3rdparty/walkontable/src/scroll.mjs +110 -63
- package/3rdparty/walkontable/src/table/bottom.js +2 -2
- package/3rdparty/walkontable/src/table/bottom.mjs +2 -2
- package/3rdparty/walkontable/src/table/bottomInlineStartCorner.js +2 -2
- package/3rdparty/walkontable/src/table/bottomInlineStartCorner.mjs +2 -2
- package/3rdparty/walkontable/src/table/inlineStart.js +2 -2
- package/3rdparty/walkontable/src/table/inlineStart.mjs +2 -2
- package/3rdparty/walkontable/src/table/master.js +2 -2
- package/3rdparty/walkontable/src/table/master.mjs +2 -2
- package/3rdparty/walkontable/src/table/top.js +2 -2
- package/3rdparty/walkontable/src/table/top.mjs +2 -2
- package/3rdparty/walkontable/src/table/topInlineStartCorner.js +2 -2
- package/3rdparty/walkontable/src/table/topInlineStartCorner.mjs +2 -2
- package/3rdparty/walkontable/src/utils/orderView/sharedView.js +2 -2
- package/3rdparty/walkontable/src/utils/orderView/sharedView.mjs +2 -2
- package/3rdparty/walkontable/src/viewport.js +14 -22
- package/3rdparty/walkontable/src/viewport.mjs +14 -22
- package/CHANGELOG.md +52 -0
- package/LICENSE.txt +1 -1
- package/base.js +2 -2
- package/base.mjs +2 -2
- package/core.js +39 -31
- package/core.mjs +39 -31
- package/dataMap/metaManager/metaSchema.js +165 -168
- package/dataMap/metaManager/metaSchema.mjs +165 -168
- package/dist/handsontable.css +18 -18
- package/dist/handsontable.full.css +19 -29
- package/dist/handsontable.full.js +13863 -12941
- package/dist/handsontable.full.min.css +5 -5
- package/dist/handsontable.full.min.js +134 -135
- package/dist/handsontable.js +4136 -3926
- package/dist/handsontable.min.css +4 -4
- package/dist/handsontable.min.js +4 -4
- package/dist/languages/all.js +97 -33
- package/dist/languages/all.min.js +1 -1
- package/dist/languages/cs-CZ.js +167 -0
- package/dist/languages/cs-CZ.min.js +1 -0
- package/dist/languages/de-CH.js +3 -2
- package/dist/languages/de-CH.min.js +1 -1
- package/dist/languages/de-DE.js +3 -2
- package/dist/languages/de-DE.min.js +1 -1
- package/dist/languages/en-US.js +3 -2
- package/dist/languages/en-US.min.js +1 -1
- package/dist/languages/es-MX.js +3 -2
- package/dist/languages/es-MX.min.js +1 -1
- package/dist/languages/fr-FR.js +3 -2
- package/dist/languages/fr-FR.min.js +1 -1
- package/dist/languages/it-IT.js +3 -2
- package/dist/languages/it-IT.min.js +1 -1
- package/dist/languages/ja-JP.js +36 -39
- package/dist/languages/ja-JP.min.js +1 -1
- package/dist/languages/ko-KR.js +2 -2
- package/dist/languages/ko-KR.min.js +1 -1
- package/dist/languages/lv-LV.js +2 -2
- package/dist/languages/lv-LV.min.js +1 -1
- package/dist/languages/nb-NO.js +2 -2
- package/dist/languages/nb-NO.min.js +1 -1
- package/dist/languages/nl-NL.js +2 -2
- package/dist/languages/nl-NL.min.js +1 -1
- package/dist/languages/pl-PL.js +2 -2
- package/dist/languages/pl-PL.min.js +1 -1
- package/dist/languages/pt-BR.js +2 -2
- package/dist/languages/pt-BR.min.js +1 -1
- package/dist/languages/ru-RU.js +2 -2
- package/dist/languages/ru-RU.min.js +1 -1
- package/dist/languages/sr-SP.js +171 -0
- package/dist/languages/sr-SP.min.js +1 -0
- package/dist/languages/zh-CN.js +24 -24
- package/dist/languages/zh-CN.min.js +1 -1
- package/dist/languages/zh-TW.js +2 -2
- package/dist/languages/zh-TW.min.js +1 -1
- package/editors/autocompleteEditor/autocompleteEditor.js +13 -14
- package/editors/autocompleteEditor/autocompleteEditor.mjs +13 -14
- package/editors/baseEditor/baseEditor.js +2 -2
- package/editors/baseEditor/baseEditor.mjs +2 -2
- package/editors/checkboxEditor/checkboxEditor.js +2 -2
- package/editors/checkboxEditor/checkboxEditor.mjs +2 -2
- package/editors/dateEditor/dateEditor.js +3 -3
- package/editors/dateEditor/dateEditor.mjs +3 -3
- package/editors/dropdownEditor/dropdownEditor.js +3 -3
- package/editors/dropdownEditor/dropdownEditor.mjs +3 -3
- package/editors/handsontableEditor/handsontableEditor.js +3 -3
- package/editors/handsontableEditor/handsontableEditor.mjs +3 -3
- package/editors/numericEditor/numericEditor.js +2 -2
- package/editors/numericEditor/numericEditor.mjs +2 -2
- package/editors/passwordEditor/passwordEditor.js +3 -3
- package/editors/passwordEditor/passwordEditor.mjs +3 -3
- package/editors/selectEditor/selectEditor.js +3 -3
- package/editors/selectEditor/selectEditor.mjs +3 -3
- package/editors/textEditor/textEditor.js +3 -3
- package/editors/textEditor/textEditor.mjs +3 -3
- package/editors/timeEditor/timeEditor.js +3 -3
- package/editors/timeEditor/timeEditor.mjs +3 -3
- package/helpers/mixed.js +2 -2
- package/helpers/mixed.mjs +2 -2
- package/i18n/languages/cs-CZ.js +40 -0
- package/i18n/languages/cs-CZ.mjs +16 -0
- package/i18n/languages/index.js +8 -0
- package/i18n/languages/index.mjs +3 -1
- package/i18n/languages/sr-SP.js +40 -0
- package/i18n/languages/sr-SP.mjs +16 -0
- package/languages/all.js +97 -33
- package/languages/cs-CZ.js +167 -0
- package/languages/cs-CZ.mjs +18 -0
- package/languages/de-CH.js +3 -2
- package/languages/de-DE.js +3 -2
- package/languages/en-US.js +3 -2
- package/languages/es-MX.js +3 -2
- package/languages/fr-FR.js +3 -2
- package/languages/index.js +97 -33
- package/languages/index.mjs +3 -1
- package/languages/it-IT.js +3 -2
- package/languages/ja-JP.js +36 -39
- package/languages/ko-KR.js +2 -2
- package/languages/lv-LV.js +2 -2
- package/languages/nb-NO.js +2 -2
- package/languages/nl-NL.js +2 -2
- package/languages/pl-PL.js +2 -2
- package/languages/pt-BR.js +2 -2
- package/languages/ru-RU.js +2 -2
- package/languages/sr-SP.js +171 -0
- package/languages/sr-SP.mjs +18 -0
- package/languages/zh-CN.js +24 -24
- package/languages/zh-TW.js +2 -2
- package/package.json +22 -2
- package/pluginHooks.js +46 -8
- package/pluginHooks.mjs +46 -8
- package/plugins/autoColumnSize/autoColumnSize.js +6 -6
- package/plugins/autoColumnSize/autoColumnSize.mjs +6 -6
- package/plugins/autoRowSize/autoRowSize.js +4 -4
- package/plugins/autoRowSize/autoRowSize.mjs +4 -4
- package/plugins/autofill/autofill.js +3 -3
- package/plugins/autofill/autofill.mjs +3 -3
- package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.js +3 -3
- package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.mjs +3 -3
- package/plugins/bindRowsWithHeaders/maps/looseBindsMap.js +3 -3
- package/plugins/bindRowsWithHeaders/maps/looseBindsMap.mjs +3 -3
- package/plugins/bindRowsWithHeaders/maps/strictBindsMap.js +3 -3
- package/plugins/bindRowsWithHeaders/maps/strictBindsMap.mjs +3 -3
- package/plugins/collapsibleColumns/collapsibleColumns.js +3 -3
- package/plugins/collapsibleColumns/collapsibleColumns.mjs +3 -3
- package/plugins/columnSorting/columnSorting.js +3 -3
- package/plugins/columnSorting/columnSorting.mjs +3 -3
- package/plugins/columnSummary/columnSummary.js +3 -3
- package/plugins/columnSummary/columnSummary.mjs +3 -3
- package/plugins/comments/commentEditor.js +2 -2
- package/plugins/comments/commentEditor.mjs +2 -2
- package/plugins/comments/comments.js +39 -31
- package/plugins/comments/comments.mjs +40 -32
- package/plugins/contextMenu/contextMenu.js +3 -3
- package/plugins/contextMenu/contextMenu.mjs +3 -3
- package/plugins/copyPaste/copyPaste.js +6 -6
- package/plugins/copyPaste/copyPaste.mjs +6 -6
- package/plugins/customBorders/customBorders.js +8 -7
- package/plugins/customBorders/customBorders.mjs +9 -8
- package/plugins/dragToScroll/dragToScroll.js +3 -3
- package/plugins/dragToScroll/dragToScroll.mjs +3 -3
- package/plugins/dropdownMenu/dropdownMenu.js +5 -4
- package/plugins/dropdownMenu/dropdownMenu.mjs +5 -4
- package/plugins/exportFile/exportFile.js +2 -2
- package/plugins/exportFile/exportFile.mjs +2 -2
- package/plugins/exportFile/types/csv.js +2 -2
- package/plugins/exportFile/types/csv.mjs +2 -2
- package/plugins/filters/component/actionBar.js +2 -2
- package/plugins/filters/component/actionBar.mjs +2 -2
- package/plugins/filters/component/condition.js +3 -3
- package/plugins/filters/component/condition.mjs +3 -3
- package/plugins/filters/component/operators.js +2 -2
- package/plugins/filters/component/operators.mjs +2 -2
- package/plugins/filters/component/value.js +3 -3
- package/plugins/filters/component/value.mjs +3 -3
- package/plugins/filters/filters.js +3 -3
- package/plugins/filters/filters.mjs +3 -3
- package/plugins/filters/ui/input.js +3 -3
- package/plugins/filters/ui/input.mjs +3 -3
- package/plugins/filters/ui/link.js +3 -3
- package/plugins/filters/ui/link.mjs +3 -3
- package/plugins/filters/ui/multipleSelect.js +3 -3
- package/plugins/filters/ui/multipleSelect.mjs +3 -3
- package/plugins/filters/ui/radioInput.js +3 -3
- package/plugins/filters/ui/radioInput.mjs +3 -3
- package/plugins/filters/ui/select.js +3 -3
- package/plugins/filters/ui/select.mjs +3 -3
- package/plugins/formulas/formulas.js +10 -5
- package/plugins/formulas/formulas.mjs +10 -5
- package/plugins/hiddenColumns/contextMenuItem/hideColumn.js +2 -4
- package/plugins/hiddenColumns/contextMenuItem/hideColumn.mjs +2 -4
- package/plugins/hiddenColumns/contextMenuItem/showColumn.js +3 -3
- package/plugins/hiddenColumns/contextMenuItem/showColumn.mjs +3 -3
- package/plugins/hiddenColumns/hiddenColumns.js +3 -3
- package/plugins/hiddenColumns/hiddenColumns.mjs +3 -3
- package/plugins/hiddenRows/contextMenuItem/hideRow.js +2 -4
- package/plugins/hiddenRows/contextMenuItem/hideRow.mjs +2 -4
- package/plugins/hiddenRows/contextMenuItem/showRow.js +3 -3
- package/plugins/hiddenRows/contextMenuItem/showRow.mjs +3 -3
- package/plugins/hiddenRows/hiddenRows.js +3 -3
- package/plugins/hiddenRows/hiddenRows.mjs +3 -3
- package/plugins/manualColumnFreeze/manualColumnFreeze.js +46 -20
- package/plugins/manualColumnFreeze/manualColumnFreeze.mjs +41 -20
- package/plugins/manualColumnMove/manualColumnMove.js +7 -18
- package/plugins/manualColumnMove/manualColumnMove.mjs +7 -18
- package/plugins/manualColumnMove/ui/backlight.js +3 -3
- package/plugins/manualColumnMove/ui/backlight.mjs +3 -3
- package/plugins/manualColumnMove/ui/guideline.js +3 -3
- package/plugins/manualColumnMove/ui/guideline.mjs +3 -3
- package/plugins/manualColumnResize/manualColumnResize.js +3 -3
- package/plugins/manualColumnResize/manualColumnResize.mjs +3 -3
- package/plugins/manualRowMove/manualRowMove.js +11 -29
- package/plugins/manualRowMove/manualRowMove.mjs +11 -29
- package/plugins/manualRowMove/ui/backlight.js +3 -3
- package/plugins/manualRowMove/ui/backlight.mjs +3 -3
- package/plugins/manualRowMove/ui/guideline.js +3 -3
- package/plugins/manualRowMove/ui/guideline.mjs +3 -3
- package/plugins/manualRowResize/manualRowResize.js +3 -3
- package/plugins/manualRowResize/manualRowResize.mjs +3 -3
- package/plugins/mergeCells/cellsCollection.js +3 -3
- package/plugins/mergeCells/cellsCollection.mjs +3 -3
- package/plugins/mergeCells/mergeCells.js +15 -15
- package/plugins/mergeCells/mergeCells.mjs +15 -15
- package/plugins/multiColumnSorting/multiColumnSorting.js +3 -3
- package/plugins/multiColumnSorting/multiColumnSorting.mjs +3 -3
- package/plugins/multipleSelectionHandles/multipleSelectionHandles.js +3 -3
- package/plugins/multipleSelectionHandles/multipleSelectionHandles.mjs +3 -3
- package/plugins/nestedHeaders/nestedHeaders.js +10 -6
- package/plugins/nestedHeaders/nestedHeaders.mjs +10 -6
- package/plugins/nestedHeaders/stateManager/utils.js +3 -4
- package/plugins/nestedHeaders/stateManager/utils.mjs +3 -4
- package/plugins/nestedHeaders/utils/ghostTable.js +114 -75
- package/plugins/nestedHeaders/utils/ghostTable.mjs +114 -74
- package/plugins/nestedRows/nestedRows.js +3 -3
- package/plugins/nestedRows/nestedRows.mjs +3 -3
- package/plugins/nestedRows/ui/collapsing.js +2 -2
- package/plugins/nestedRows/ui/collapsing.mjs +2 -2
- package/plugins/nestedRows/ui/contextMenu.js +2 -2
- package/plugins/nestedRows/ui/contextMenu.mjs +2 -2
- package/plugins/nestedRows/ui/headers.js +2 -2
- package/plugins/nestedRows/ui/headers.mjs +2 -2
- package/plugins/persistentState/persistentState.js +3 -3
- package/plugins/persistentState/persistentState.mjs +3 -3
- package/plugins/search/search.js +3 -3
- package/plugins/search/search.mjs +3 -3
- package/plugins/touchScroll/touchScroll.js +3 -3
- package/plugins/touchScroll/touchScroll.mjs +3 -3
- package/plugins/trimRows/trimRows.js +3 -3
- package/plugins/trimRows/trimRows.mjs +3 -3
- package/plugins/undoRedo/undoRedo.js +2 -2
- package/plugins/undoRedo/undoRedo.mjs +2 -2
- package/selection/highlight/visualSelection.js +83 -210
- package/selection/highlight/visualSelection.mjs +79 -202
- package/selection/selection.js +9 -3
- package/selection/selection.mjs +9 -3
- package/shortcuts/context.js +1 -1
- package/shortcuts/context.mjs +1 -1
- package/shortcuts/manager.js +3 -1
- package/shortcuts/manager.mjs +3 -1
- package/shortcuts/recorder.js +11 -2
- package/shortcuts/recorder.mjs +11 -2
- package/tableView.js +27 -5
- package/tableView.mjs +27 -5
- package/translations/indexMapper.d.ts +3 -1
- package/translations/indexMapper.js +88 -10
- package/translations/indexMapper.mjs +90 -19
- package/translations/mapCollections/aggregatedCollection.js +2 -2
- package/translations/mapCollections/aggregatedCollection.mjs +2 -2
- package/translations/maps/hidingMap.js +2 -2
- package/translations/maps/hidingMap.mjs +2 -2
- package/translations/maps/indexesSequence.js +3 -3
- package/translations/maps/indexesSequence.mjs +3 -3
- package/translations/maps/linkedPhysicalIndexToValueMap.js +3 -3
- package/translations/maps/linkedPhysicalIndexToValueMap.mjs +3 -3
- package/translations/maps/physicalIndexToValueMap.js +3 -3
- package/translations/maps/physicalIndexToValueMap.mjs +3 -3
- package/translations/maps/trimmingMap.js +2 -2
- package/translations/maps/trimmingMap.mjs +2 -2
@@ -131,7 +131,7 @@ var Viewport = /*#__PURE__*/function () {
|
|
131
131
|
}, {
|
132
132
|
key: "hasVerticalScroll",
|
133
133
|
value: function hasVerticalScroll() {
|
134
|
-
return this.
|
134
|
+
return this.wtTable.hider.offsetHeight > this.getWorkspaceHeight();
|
135
135
|
}
|
136
136
|
/**
|
137
137
|
* Checks if viewport has horizontal scroll.
|
@@ -142,7 +142,7 @@ var Viewport = /*#__PURE__*/function () {
|
|
142
142
|
}, {
|
143
143
|
key: "hasHorizontalScroll",
|
144
144
|
value: function hasHorizontalScroll() {
|
145
|
-
return this.
|
145
|
+
return this.wtTable.hider.offsetWidth > this.getWorkspaceWidth();
|
146
146
|
}
|
147
147
|
/**
|
148
148
|
* @param {number} from The visual column index from the width sum is start calculated.
|
@@ -197,24 +197,6 @@ var Viewport = /*#__PURE__*/function () {
|
|
197
197
|
* @returns {number}
|
198
198
|
*/
|
199
199
|
|
200
|
-
}, {
|
201
|
-
key: "getWorkspaceActualHeight",
|
202
|
-
value: function getWorkspaceActualHeight() {
|
203
|
-
return outerHeight(this.wtTable.TABLE);
|
204
|
-
}
|
205
|
-
/**
|
206
|
-
* @returns {number}
|
207
|
-
*/
|
208
|
-
|
209
|
-
}, {
|
210
|
-
key: "getWorkspaceActualWidth",
|
211
|
-
value: function getWorkspaceActualWidth() {
|
212
|
-
return outerWidth(this.wtTable.TABLE) || outerWidth(this.wtTable.TBODY) || outerWidth(this.wtTable.THEAD); // IE8 reports 0 as <table> offsetWidth;
|
213
|
-
}
|
214
|
-
/**
|
215
|
-
* @returns {number}
|
216
|
-
*/
|
217
|
-
|
218
200
|
}, {
|
219
201
|
key: "getColumnHeaderHeight",
|
220
202
|
value: function getColumnHeaderHeight() {
|
@@ -490,7 +472,12 @@ var Viewport = /*#__PURE__*/function () {
|
|
490
472
|
}
|
491
473
|
|
492
474
|
var startRow = proposedRowsVisibleCalculator.startRow,
|
493
|
-
endRow = proposedRowsVisibleCalculator.endRow;
|
475
|
+
endRow = proposedRowsVisibleCalculator.endRow; // if there are no fully visible rows at all, return false
|
476
|
+
|
477
|
+
if (startRow === null && endRow === null) {
|
478
|
+
return false;
|
479
|
+
}
|
480
|
+
|
494
481
|
var _this$rowsRenderCalcu = this.rowsRenderCalculator,
|
495
482
|
renderedStartRow = _this$rowsRenderCalcu.startRow,
|
496
483
|
renderedEndRow = _this$rowsRenderCalcu.endRow;
|
@@ -520,7 +507,12 @@ var Viewport = /*#__PURE__*/function () {
|
|
520
507
|
}
|
521
508
|
|
522
509
|
var startColumn = proposedColumnsVisibleCalculator.startColumn,
|
523
|
-
endColumn = proposedColumnsVisibleCalculator.endColumn;
|
510
|
+
endColumn = proposedColumnsVisibleCalculator.endColumn; // if there are no fully visible columns at all, return false
|
511
|
+
|
512
|
+
if (startColumn === null && endColumn === null) {
|
513
|
+
return false;
|
514
|
+
}
|
515
|
+
|
524
516
|
var _this$columnsRenderCa = this.columnsRenderCalculator,
|
525
517
|
renderedStartColumn = _this$columnsRenderCa.startColumn,
|
526
518
|
renderedEndColumn = _this$columnsRenderCa.endColumn;
|
package/CHANGELOG.md
CHANGED
@@ -8,6 +8,57 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
8
8
|
|
9
9
|
<!-- UNVERSIONED -->
|
10
10
|
|
11
|
+
## [12.1.1] - 2022-07-05
|
12
|
+
|
13
|
+
For more information on this release, see:
|
14
|
+
- [Release notes](https://handsontable.com/docs/release-notes/#_12-1-1)
|
15
|
+
|
16
|
+
### Fixed
|
17
|
+
- *Angular:* Fixed an issue where the installation of `@handsontable/angular` package failed for versions of Angular other than 9 [#9622](https://github.com/handsontable/handsontable/issues/9622)
|
18
|
+
|
19
|
+
## [12.1.0] - 2022-06-28
|
20
|
+
|
21
|
+
For more information on this release, see:
|
22
|
+
- [Release notes](https://handsontable.com/docs/release-notes/#_12-1-0)
|
23
|
+
- [Blog post](https://handsontable.com/blog/handsontable-12.1.0-data-grid-new-hooks-new-translations-and-rendering-improvements)
|
24
|
+
|
25
|
+
### Added
|
26
|
+
- Added smoother row and column moving when some row or columns are hidden. [#7613](https://github.com/handsontable/handsontable/issues/7613)
|
27
|
+
- Added `getNearestNotHiddenIndex()`, a new method that finds the visual index of the nearest not-hidden row or column and works even with large numbers of hidden rows or columns. The previous method, `getFirstNotHiddenIndex()`, still works, but is marked as deprecated. [#9064](https://github.com/handsontable/handsontable/issues/9064)
|
28
|
+
- Added a Czech translation. [#9343](https://github.com/handsontable/handsontable/issues/9343)
|
29
|
+
- Added a Serbian translation. [#9469](https://github.com/handsontable/handsontable/issues/9469)
|
30
|
+
- Added new hooks: `beforeColumnFreeze`, `afterColumnFreeze`, `beforeColumnUnfreeze`, and `afterColumnUnfreeze`. [#9248](https://github.com/handsontable/handsontable/issues/9248)
|
31
|
+
|
32
|
+
### Changed
|
33
|
+
- Replaced HTML entities appearing in Handsontable's license texts with canonical counterparts. [#9487](https://github.com/handsontable/handsontable/issues/9487)
|
34
|
+
- Updated the Pikaday optional dependency to 1.8.2, to let Handsontable work with Parcel 2 without errors. [#9410](https://github.com/handsontable/handsontable/issues/9410)
|
35
|
+
- *React:* Changed the wrapper's lifecycle methods, to let Handsontable work with React 17+ without warnings. [#8748](https://github.com/handsontable/handsontable/issues/8748)
|
36
|
+
- *Angular:* Moved the `@angular/core` dependency to peer dependencies. [#9574](https://github.com/handsontable/handsontable/issues/9574)
|
37
|
+
|
38
|
+
### Fixed
|
39
|
+
- Fixed an issue where dropdown and autocomplete cell editors rendered incorrectly if the `preventOverflow` option was set to `'horizontal'`. [#3828](https://github.com/handsontable/handsontable/issues/3828)
|
40
|
+
- Fixed an issue where frozen rows were getting duplicated. [#4454](https://github.com/handsontable/handsontable/issues/4454)
|
41
|
+
- Fixed an issue where comments rendered outside the viewport. [#4785](https://github.com/handsontable/handsontable/issues/4785)
|
42
|
+
- Fixed an issue where comments got positioned incorrectly when Handsontable ran within a scrollable element. [#6744](https://github.com/handsontable/handsontable/issues/6744)
|
43
|
+
- Fixed an issue that occurred when Handsontable ran within an HTML `<form>`: pressing <kbd>Enter</kbd> inside another form's `<input>` could open Handsontable's dropdown menu. [#9295](https://github.com/handsontable/handsontable/issues/9295)
|
44
|
+
- Fixed an issue where it was impossible to unmerge cells in the RTL layout direction. [#9362](https://github.com/handsontable/handsontable/issues/9362)
|
45
|
+
- Fixed an issue where columns wider than the viewport's width and rows higher than the viewport's height didn't render correctly. [#9473](https://github.com/handsontable/handsontable/issues/9473)
|
46
|
+
- Fixed an issue where dragging-to-scroll on mobile didn't work properly in the RTL layout direction. [#9475](https://github.com/handsontable/handsontable/issues/9475)
|
47
|
+
- Fixed an issue where hiding columns with nested headers caused incorrect column width calculation (for the `stretchH: 'all'` option). [#9496](https://github.com/handsontable/handsontable/issues/9496)
|
48
|
+
- Fixed an issue where `ShortcutManager` unnecessarily handled `keyup` events with no `key` defined. [#9562](https://github.com/handsontable/handsontable/issues/9562)
|
49
|
+
|
50
|
+
## [12.0.1] - 2022-05-16
|
51
|
+
|
52
|
+
For more information on this release, see:
|
53
|
+
- [Release notes](https://handsontable.com/docs/release-notes/#_12-0-1)
|
54
|
+
|
55
|
+
### Fixed
|
56
|
+
- Fixed an issue where checking or unchecking a checkbox in a row with `autoRowSize: true` and multi-line cell values caused rows to align incorrectly. [#7102](https://github.com/handsontable/handsontable/issues/7102)
|
57
|
+
- Fixed an issue where checking or unchecking a checkbox changed the cell width. [#8211](https://github.com/handsontable/handsontable/issues/8211)
|
58
|
+
- Fixed an issue where using a single Handsontable instance with multiple HyperFormula sheets could lead to an uncaught `TypeError`. [#8268](https://github.com/handsontable/handsontable/issues/8268)
|
59
|
+
- Fixed an issue where nested column headers didn't expand properly. [#9099](https://github.com/handsontable/handsontable/issues/9099)
|
60
|
+
- Fixed an issue where updating custom borders could lead to uncaught error exceptions. [#9455](https://github.com/handsontable/handsontable/issues/9455)
|
61
|
+
|
11
62
|
## [12.0.0] - 2022-04-28
|
12
63
|
|
13
64
|
For more information on this release, see:
|
@@ -34,6 +85,7 @@ For more information on this release, see:
|
|
34
85
|
- Changed two scripts of the main Handsontable workspace (`./`), to speed up the build process: now, the `npm run build` and `npm run test` scripts don't build or test the Handsontable examples (`./examples`). [#9412](https://github.com/handsontable/handsontable/issues/9412)
|
35
86
|
- Changed the version of the Moment.js dependency from 2.24.0 to 2.29.3, in reaction to a recently-found Moment.js security vulnerability that did not directly affect Handsontable. [#9381](https://github.com/handsontable/handsontable/issues/9381)
|
36
87
|
- Changed the version of the HyperFormula optional dependency from ^1.2.0 to ^2.0.0. [#9411](https://github.com/handsontable/handsontable/issues/9411)
|
88
|
+
- Changed an internal property name, from `hot.view.wt` to `hot.view._wt`, where `hot` is the name of your Handsontable instance. The intention of this change is to make it clear that Walkontable (Handsontable's rendering engine) is not a part of Handsontable's public API. [#8760](https://github.com/handsontable/handsontable/issues/8760)
|
37
89
|
|
38
90
|
### Fixed
|
39
91
|
- *React, Angular, Vue 2, Vue 3:* Fixed an issue where using `updateSettings()` caused problems for state managers. [#8372](https://github.com/handsontable/handsontable/issues/8372)
|
package/LICENSE.txt
CHANGED
@@ -18,7 +18,7 @@ license agreement.
|
|
18
18
|
In any case, you must not make any such use of this software as to develop software which may be
|
19
19
|
considered competitive with this software.
|
20
20
|
|
21
|
-
UNLESS EXPRESSLY AGREED OTHERWISE, HANDSONCODE PROVIDES THIS SOFTWARE ON AN
|
21
|
+
UNLESS EXPRESSLY AGREED OTHERWISE, HANDSONCODE PROVIDES THIS SOFTWARE ON AN "AS IS"
|
22
22
|
BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, AND IN NO EVENT AND UNDER NO
|
23
23
|
LEGAL THEORY, SHALL HANDSONCODE BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY DIRECT,
|
24
24
|
INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING FROM
|
package/base.js
CHANGED
@@ -52,8 +52,8 @@ Handsontable.Core = function (rootElement) {
|
|
52
52
|
Handsontable.DefaultSettings = (0, _dataMap.metaSchemaFactory)();
|
53
53
|
Handsontable.hooks = _pluginHooks.default.getSingleton();
|
54
54
|
Handsontable.packageName = 'handsontable';
|
55
|
-
Handsontable.buildDate = "
|
56
|
-
Handsontable.version = "12.
|
55
|
+
Handsontable.buildDate = "05/07/2022 15:06:36";
|
56
|
+
Handsontable.version = "12.1.1";
|
57
57
|
Handsontable.languages = {
|
58
58
|
dictionaryKeys: _registry.dictionaryKeys,
|
59
59
|
getLanguageDictionary: _registry.getLanguageDictionary,
|
package/base.mjs
CHANGED
@@ -37,8 +37,8 @@ Handsontable.Core = function (rootElement) {
|
|
37
37
|
Handsontable.DefaultSettings = metaSchemaFactory();
|
38
38
|
Handsontable.hooks = Hooks.getSingleton();
|
39
39
|
Handsontable.packageName = 'handsontable';
|
40
|
-
Handsontable.buildDate = "
|
41
|
-
Handsontable.version = "12.
|
40
|
+
Handsontable.buildDate = "05/07/2022 15:06:41";
|
41
|
+
Handsontable.version = "12.1.1";
|
42
42
|
Handsontable.languages = {
|
43
43
|
dictionaryKeys: dictionaryKeys,
|
44
44
|
getLanguageDictionary: getLanguageDictionary,
|
package/core.js
CHANGED
@@ -333,6 +333,12 @@ function Core(rootElement, userSettings) {
|
|
333
333
|
};
|
334
334
|
|
335
335
|
var selection = new _selection.Selection(tableMeta, {
|
336
|
+
rowIndexMapper: function rowIndexMapper() {
|
337
|
+
return instance.rowIndexMapper;
|
338
|
+
},
|
339
|
+
columnIndexMapper: function columnIndexMapper() {
|
340
|
+
return instance.columnIndexMapper;
|
341
|
+
},
|
336
342
|
countCols: function countCols() {
|
337
343
|
return instance.countCols();
|
338
344
|
},
|
@@ -2286,8 +2292,8 @@ function Core(rootElement, userSettings) {
|
|
2286
2292
|
* To replace Handsontable's [`data`](@/api/options.md#data) and reset states, use the [`loadData()`](#loaddata) method.
|
2287
2293
|
*
|
2288
2294
|
* Read more:
|
2289
|
-
* - [Binding to data
|
2290
|
-
* - [Saving data
|
2295
|
+
* - [Binding to data](@/guides/getting-started/binding-to-data.md)
|
2296
|
+
* - [Saving data](@/guides/getting-started/saving-data.md)
|
2291
2297
|
*
|
2292
2298
|
* @memberof Core#
|
2293
2299
|
* @function updateData
|
@@ -2330,8 +2336,8 @@ function Core(rootElement, userSettings) {
|
|
2330
2336
|
* To replace Handsontable's [`data`](@/api/options.md#data) without resetting states, use the [`updateData()`](#updatedata) method.
|
2331
2337
|
*
|
2332
2338
|
* Read more:
|
2333
|
-
* - [Binding to data
|
2334
|
-
* - [Saving data
|
2339
|
+
* - [Binding to data](@/guides/getting-started/binding-to-data.md)
|
2340
|
+
* - [Saving data](@/guides/getting-started/saving-data.md)
|
2335
2341
|
*
|
2336
2342
|
* @memberof Core#
|
2337
2343
|
* @function loadData
|
@@ -4243,7 +4249,7 @@ function Core(rootElement, userSettings) {
|
|
4243
4249
|
|
4244
4250
|
var getIndexToScroll = function getIndexToScroll(indexMapper, visualIndex) {
|
4245
4251
|
// Looking for a visual index on the right and then (when not found) on the left.
|
4246
|
-
return indexMapper.
|
4252
|
+
return indexMapper.getNearestNotHiddenIndex(visualIndex, 1, true);
|
4247
4253
|
};
|
4248
4254
|
/**
|
4249
4255
|
* Scroll viewport to coordinates specified by the `row` and `column` arguments.
|
@@ -4254,8 +4260,10 @@ function Core(rootElement, userSettings) {
|
|
4254
4260
|
* we are using the index for numbering only this rows which may be rendered (we don't consider hidden rows).
|
4255
4261
|
* @param {number} [column] Column index. If the last argument isn't defined we treat the index as a visual column index.
|
4256
4262
|
* Otherwise, we are using the index for numbering only this columns which may be rendered (we don't consider hidden columns).
|
4257
|
-
* @param {boolean} [snapToBottom=false] If `true`, viewport is scrolled to show the cell
|
4258
|
-
*
|
4263
|
+
* @param {boolean} [snapToBottom=false] If `true`, the viewport is scrolled to show the cell at the bottom of the table.
|
4264
|
+
* However, if the cell's height is greater than the table's viewport height, the cell is snapped to the top edge.
|
4265
|
+
* @param {boolean} [snapToRight=false] If `true`, the viewport is scrolled to show the cell at the right side of the table.
|
4266
|
+
* However, if the cell is wider than the table's viewport width, the cell is snapped to the left edge (or to the right edge, if the layout direction is set to `rtl`).
|
4259
4267
|
* @param {boolean} [considerHiddenIndexes=true] If `true`, we handle visual indexes, otherwise we handle only indexes which
|
4260
4268
|
* may be rendered when they are in the viewport (we don't consider hidden indexes as they aren't rendered).
|
4261
4269
|
* @returns {boolean} `true` if scroll was successful, `false` otherwise.
|
@@ -4499,7 +4507,7 @@ function Core(rootElement, userSettings) {
|
|
4499
4507
|
|
4500
4508
|
|
4501
4509
|
this.hasHook = function (key) {
|
4502
|
-
return _pluginHooks.default.getSingleton().has(key, instance);
|
4510
|
+
return _pluginHooks.default.getSingleton().has(key, instance) || _pluginHooks.default.getSingleton().has(key);
|
4503
4511
|
};
|
4504
4512
|
/**
|
4505
4513
|
* Adds listener to specified hook name (only for this Handsontable instance). After the listener is triggered,
|
@@ -4728,12 +4736,12 @@ function Core(rootElement, userSettings) {
|
|
4728
4736
|
};
|
4729
4737
|
|
4730
4738
|
var shortcutManager = (0, _shortcuts.createShortcutManager)({
|
4739
|
+
handleEvent: function handleEvent(event) {
|
4740
|
+
var isListening = instance.isListening();
|
4741
|
+
var isKeyboardEventWithKey = (event === null || event === void 0 ? void 0 : event.key) !== void 0;
|
4742
|
+
return isListening && isKeyboardEventWithKey;
|
4743
|
+
},
|
4731
4744
|
beforeKeyDown: function beforeKeyDown(event) {
|
4732
|
-
if (_this.isListening() === false) {
|
4733
|
-
// Performing action (executing a callback) and triggering hook only for listening Handsontable.
|
4734
|
-
return false;
|
4735
|
-
}
|
4736
|
-
|
4737
4745
|
return _this.runHooks('beforeKeyDown', event);
|
4738
4746
|
},
|
4739
4747
|
afterKeyDown: function afterKeyDown(event) {
|
@@ -4810,7 +4818,7 @@ function Core(rootElement, userSettings) {
|
|
4810
4818
|
keys: [['ArrowUp', 'Control/Meta']],
|
4811
4819
|
captureCtrl: true,
|
4812
4820
|
callback: function callback() {
|
4813
|
-
selection.setRangeStart(instance._createCellCoords(instance.rowIndexMapper.
|
4821
|
+
selection.setRangeStart(instance._createCellCoords(instance.rowIndexMapper.getNearestNotHiddenIndex(0, 1), instance.getSelectedRangeLast().highlight.col));
|
4814
4822
|
}
|
4815
4823
|
}, {
|
4816
4824
|
keys: [['ArrowUp', 'Shift']],
|
@@ -4825,7 +4833,7 @@ function Core(rootElement, userSettings) {
|
|
4825
4833
|
from = _instance$getSelected.from,
|
4826
4834
|
to = _instance$getSelected.to;
|
4827
4835
|
|
4828
|
-
var row = instance.rowIndexMapper.
|
4836
|
+
var row = instance.rowIndexMapper.getNearestNotHiddenIndex(0, 1);
|
4829
4837
|
selection.setRangeStart(from.clone());
|
4830
4838
|
selection.setRangeEnd(instance._createCellCoords(row, to.col));
|
4831
4839
|
},
|
@@ -4841,7 +4849,7 @@ function Core(rootElement, userSettings) {
|
|
4841
4849
|
keys: [['ArrowDown', 'Control/Meta']],
|
4842
4850
|
captureCtrl: true,
|
4843
4851
|
callback: function callback() {
|
4844
|
-
selection.setRangeStart(instance._createCellCoords(instance.rowIndexMapper.
|
4852
|
+
selection.setRangeStart(instance._createCellCoords(instance.rowIndexMapper.getNearestNotHiddenIndex(instance.countRows() - 1, -1), instance.getSelectedRangeLast().highlight.col));
|
4845
4853
|
}
|
4846
4854
|
}, {
|
4847
4855
|
keys: [['ArrowDown', 'Shift']],
|
@@ -4856,7 +4864,7 @@ function Core(rootElement, userSettings) {
|
|
4856
4864
|
from = _instance$getSelected2.from,
|
4857
4865
|
to = _instance$getSelected2.to;
|
4858
4866
|
|
4859
|
-
var row = instance.rowIndexMapper.
|
4867
|
+
var row = instance.rowIndexMapper.getNearestNotHiddenIndex(instance.countRows() - 1, -1);
|
4860
4868
|
selection.setRangeStart(from.clone());
|
4861
4869
|
selection.setRangeEnd(instance._createCellCoords(row, to.col));
|
4862
4870
|
},
|
@@ -4876,7 +4884,7 @@ function Core(rootElement, userSettings) {
|
|
4876
4884
|
|
4877
4885
|
var row = instance.getSelectedRangeLast().highlight.row;
|
4878
4886
|
|
4879
|
-
var column = (_instance$columnIndex = instance.columnIndexMapper).
|
4887
|
+
var column = (_instance$columnIndex = instance.columnIndexMapper).getNearestNotHiddenIndex.apply(_instance$columnIndex, _toConsumableArray(instance.isRtl() ? [instance.countCols() - 1, -1] : [0, 1]));
|
4880
4888
|
|
4881
4889
|
selection.setRangeStart(instance._createCellCoords(row, column));
|
4882
4890
|
}
|
@@ -4895,7 +4903,7 @@ function Core(rootElement, userSettings) {
|
|
4895
4903
|
from = _instance$getSelected3.from,
|
4896
4904
|
to = _instance$getSelected3.to;
|
4897
4905
|
|
4898
|
-
var column = (_instance$columnIndex2 = instance.columnIndexMapper).
|
4906
|
+
var column = (_instance$columnIndex2 = instance.columnIndexMapper).getNearestNotHiddenIndex.apply(_instance$columnIndex2, _toConsumableArray(instance.isRtl() ? [instance.countCols() - 1, -1] : [0, 1]));
|
4899
4907
|
|
4900
4908
|
selection.setRangeStart(from.clone());
|
4901
4909
|
selection.setRangeEnd(instance._createCellCoords(to.row, column));
|
@@ -4916,7 +4924,7 @@ function Core(rootElement, userSettings) {
|
|
4916
4924
|
|
4917
4925
|
var row = instance.getSelectedRangeLast().highlight.row;
|
4918
4926
|
|
4919
|
-
var column = (_instance$columnIndex3 = instance.columnIndexMapper).
|
4927
|
+
var column = (_instance$columnIndex3 = instance.columnIndexMapper).getNearestNotHiddenIndex.apply(_instance$columnIndex3, _toConsumableArray(instance.isRtl() ? [0, 1] : [instance.countCols() - 1, -1]));
|
4920
4928
|
|
4921
4929
|
selection.setRangeStart(instance._createCellCoords(row, column));
|
4922
4930
|
}
|
@@ -4935,7 +4943,7 @@ function Core(rootElement, userSettings) {
|
|
4935
4943
|
from = _instance$getSelected4.from,
|
4936
4944
|
to = _instance$getSelected4.to;
|
4937
4945
|
|
4938
|
-
var column = (_instance$columnIndex4 = instance.columnIndexMapper).
|
4946
|
+
var column = (_instance$columnIndex4 = instance.columnIndexMapper).getNearestNotHiddenIndex.apply(_instance$columnIndex4, _toConsumableArray(instance.isRtl() ? [0, 1] : [instance.countCols() - 1, -1]));
|
4939
4947
|
|
4940
4948
|
selection.setRangeStart(from.clone());
|
4941
4949
|
selection.setRangeEnd(instance._createCellCoords(to.row, column));
|
@@ -4949,7 +4957,7 @@ function Core(rootElement, userSettings) {
|
|
4949
4957
|
callback: function callback() {
|
4950
4958
|
var fixedColumns = parseInt(instance.getSettings().fixedColumnsStart, 10);
|
4951
4959
|
var row = instance.getSelectedRangeLast().highlight.row;
|
4952
|
-
var column = instance.columnIndexMapper.
|
4960
|
+
var column = instance.columnIndexMapper.getNearestNotHiddenIndex(fixedColumns, 1);
|
4953
4961
|
selection.setRangeStart(instance._createCellCoords(row, column));
|
4954
4962
|
},
|
4955
4963
|
runOnlyIf: function runOnlyIf() {
|
@@ -4958,7 +4966,7 @@ function Core(rootElement, userSettings) {
|
|
4958
4966
|
}, {
|
4959
4967
|
keys: [['Home', 'Shift']],
|
4960
4968
|
callback: function callback() {
|
4961
|
-
selection.setRangeEnd(instance._createCellCoords(selection.selectedRange.current().from.row, instance.columnIndexMapper.
|
4969
|
+
selection.setRangeEnd(instance._createCellCoords(selection.selectedRange.current().from.row, instance.columnIndexMapper.getNearestNotHiddenIndex(0, 1)));
|
4962
4970
|
}
|
4963
4971
|
}, {
|
4964
4972
|
keys: [['Home', 'Control/Meta']],
|
@@ -4966,8 +4974,8 @@ function Core(rootElement, userSettings) {
|
|
4966
4974
|
callback: function callback() {
|
4967
4975
|
var fixedRows = parseInt(instance.getSettings().fixedRowsTop, 10);
|
4968
4976
|
var fixedColumns = parseInt(instance.getSettings().fixedColumnsStart, 10);
|
4969
|
-
var row = instance.rowIndexMapper.
|
4970
|
-
var column = instance.columnIndexMapper.
|
4977
|
+
var row = instance.rowIndexMapper.getNearestNotHiddenIndex(fixedRows, 1);
|
4978
|
+
var column = instance.columnIndexMapper.getNearestNotHiddenIndex(fixedColumns, 1);
|
4971
4979
|
selection.setRangeStart(instance._createCellCoords(row, column));
|
4972
4980
|
},
|
4973
4981
|
runOnlyIf: function runOnlyIf() {
|
@@ -4977,7 +4985,7 @@ function Core(rootElement, userSettings) {
|
|
4977
4985
|
keys: [['End']],
|
4978
4986
|
captureCtrl: true,
|
4979
4987
|
callback: function callback() {
|
4980
|
-
selection.setRangeStart(instance._createCellCoords(instance.getSelectedRangeLast().highlight.row, instance.columnIndexMapper.
|
4988
|
+
selection.setRangeStart(instance._createCellCoords(instance.getSelectedRangeLast().highlight.row, instance.columnIndexMapper.getNearestNotHiddenIndex(instance.countCols() - 1, -1)));
|
4981
4989
|
},
|
4982
4990
|
runOnlyIf: function runOnlyIf() {
|
4983
4991
|
return instance.view.isMainTableNotFullyCoveredByOverlays();
|
@@ -4985,15 +4993,15 @@ function Core(rootElement, userSettings) {
|
|
4985
4993
|
}, {
|
4986
4994
|
keys: [['End', 'Shift']],
|
4987
4995
|
callback: function callback() {
|
4988
|
-
selection.setRangeEnd(instance._createCellCoords(selection.selectedRange.current().from.row, instance.columnIndexMapper.
|
4996
|
+
selection.setRangeEnd(instance._createCellCoords(selection.selectedRange.current().from.row, instance.columnIndexMapper.getNearestNotHiddenIndex(instance.countCols() - 1, -1)));
|
4989
4997
|
}
|
4990
4998
|
}, {
|
4991
4999
|
keys: [['End', 'Control/Meta']],
|
4992
5000
|
captureCtrl: true,
|
4993
5001
|
callback: function callback() {
|
4994
5002
|
var fixedRows = parseInt(instance.getSettings().fixedRowsBottom, 10);
|
4995
|
-
var row = instance.rowIndexMapper.
|
4996
|
-
var column = instance.columnIndexMapper.
|
5003
|
+
var row = instance.rowIndexMapper.getNearestNotHiddenIndex(instance.countRows() - fixedRows - 1, -1);
|
5004
|
+
var column = instance.columnIndexMapper.getNearestNotHiddenIndex(instance.countCols() - 1, -1);
|
4997
5005
|
selection.setRangeStart(instance._createCellCoords(row, column));
|
4998
5006
|
},
|
4999
5007
|
runOnlyIf: function runOnlyIf() {
|
@@ -5011,7 +5019,7 @@ function Core(rootElement, userSettings) {
|
|
5011
5019
|
to = _instance$getSelected5.to;
|
5012
5020
|
|
5013
5021
|
var nextRowIndexToSelect = Math.max(to.row - instance.countVisibleRows(), 0);
|
5014
|
-
var row = instance.rowIndexMapper.
|
5022
|
+
var row = instance.rowIndexMapper.getNearestNotHiddenIndex(nextRowIndexToSelect, 1);
|
5015
5023
|
|
5016
5024
|
if (row !== null) {
|
5017
5025
|
var coords = instance._createCellCoords(row, to.col);
|
@@ -5034,7 +5042,7 @@ function Core(rootElement, userSettings) {
|
|
5034
5042
|
to = _instance$getSelected6.to;
|
5035
5043
|
|
5036
5044
|
var nextRowIndexToSelect = Math.min(to.row + instance.countVisibleRows(), instance.countRows() - 1);
|
5037
|
-
var row = instance.rowIndexMapper.
|
5045
|
+
var row = instance.rowIndexMapper.getNearestNotHiddenIndex(nextRowIndexToSelect, -1);
|
5038
5046
|
|
5039
5047
|
if (row !== null) {
|
5040
5048
|
var coords = instance._createCellCoords(row, to.col);
|
package/core.mjs
CHANGED
@@ -273,6 +273,12 @@ export default function Core(rootElement, userSettings) {
|
|
273
273
|
};
|
274
274
|
|
275
275
|
var selection = new Selection(tableMeta, {
|
276
|
+
rowIndexMapper: function rowIndexMapper() {
|
277
|
+
return instance.rowIndexMapper;
|
278
|
+
},
|
279
|
+
columnIndexMapper: function columnIndexMapper() {
|
280
|
+
return instance.columnIndexMapper;
|
281
|
+
},
|
276
282
|
countCols: function countCols() {
|
277
283
|
return instance.countCols();
|
278
284
|
},
|
@@ -2226,8 +2232,8 @@ export default function Core(rootElement, userSettings) {
|
|
2226
2232
|
* To replace Handsontable's [`data`](@/api/options.md#data) and reset states, use the [`loadData()`](#loaddata) method.
|
2227
2233
|
*
|
2228
2234
|
* Read more:
|
2229
|
-
* - [Binding to data
|
2230
|
-
* - [Saving data
|
2235
|
+
* - [Binding to data](@/guides/getting-started/binding-to-data.md)
|
2236
|
+
* - [Saving data](@/guides/getting-started/saving-data.md)
|
2231
2237
|
*
|
2232
2238
|
* @memberof Core#
|
2233
2239
|
* @function updateData
|
@@ -2270,8 +2276,8 @@ export default function Core(rootElement, userSettings) {
|
|
2270
2276
|
* To replace Handsontable's [`data`](@/api/options.md#data) without resetting states, use the [`updateData()`](#updatedata) method.
|
2271
2277
|
*
|
2272
2278
|
* Read more:
|
2273
|
-
* - [Binding to data
|
2274
|
-
* - [Saving data
|
2279
|
+
* - [Binding to data](@/guides/getting-started/binding-to-data.md)
|
2280
|
+
* - [Saving data](@/guides/getting-started/saving-data.md)
|
2275
2281
|
*
|
2276
2282
|
* @memberof Core#
|
2277
2283
|
* @function loadData
|
@@ -4183,7 +4189,7 @@ export default function Core(rootElement, userSettings) {
|
|
4183
4189
|
|
4184
4190
|
var getIndexToScroll = function getIndexToScroll(indexMapper, visualIndex) {
|
4185
4191
|
// Looking for a visual index on the right and then (when not found) on the left.
|
4186
|
-
return indexMapper.
|
4192
|
+
return indexMapper.getNearestNotHiddenIndex(visualIndex, 1, true);
|
4187
4193
|
};
|
4188
4194
|
/**
|
4189
4195
|
* Scroll viewport to coordinates specified by the `row` and `column` arguments.
|
@@ -4194,8 +4200,10 @@ export default function Core(rootElement, userSettings) {
|
|
4194
4200
|
* we are using the index for numbering only this rows which may be rendered (we don't consider hidden rows).
|
4195
4201
|
* @param {number} [column] Column index. If the last argument isn't defined we treat the index as a visual column index.
|
4196
4202
|
* Otherwise, we are using the index for numbering only this columns which may be rendered (we don't consider hidden columns).
|
4197
|
-
* @param {boolean} [snapToBottom=false] If `true`, viewport is scrolled to show the cell
|
4198
|
-
*
|
4203
|
+
* @param {boolean} [snapToBottom=false] If `true`, the viewport is scrolled to show the cell at the bottom of the table.
|
4204
|
+
* However, if the cell's height is greater than the table's viewport height, the cell is snapped to the top edge.
|
4205
|
+
* @param {boolean} [snapToRight=false] If `true`, the viewport is scrolled to show the cell at the right side of the table.
|
4206
|
+
* However, if the cell is wider than the table's viewport width, the cell is snapped to the left edge (or to the right edge, if the layout direction is set to `rtl`).
|
4199
4207
|
* @param {boolean} [considerHiddenIndexes=true] If `true`, we handle visual indexes, otherwise we handle only indexes which
|
4200
4208
|
* may be rendered when they are in the viewport (we don't consider hidden indexes as they aren't rendered).
|
4201
4209
|
* @returns {boolean} `true` if scroll was successful, `false` otherwise.
|
@@ -4437,7 +4445,7 @@ export default function Core(rootElement, userSettings) {
|
|
4437
4445
|
|
4438
4446
|
|
4439
4447
|
this.hasHook = function (key) {
|
4440
|
-
return Hooks.getSingleton().has(key, instance);
|
4448
|
+
return Hooks.getSingleton().has(key, instance) || Hooks.getSingleton().has(key);
|
4441
4449
|
};
|
4442
4450
|
/**
|
4443
4451
|
* Adds listener to specified hook name (only for this Handsontable instance). After the listener is triggered,
|
@@ -4666,12 +4674,12 @@ export default function Core(rootElement, userSettings) {
|
|
4666
4674
|
};
|
4667
4675
|
|
4668
4676
|
var shortcutManager = createShortcutManager({
|
4677
|
+
handleEvent: function handleEvent(event) {
|
4678
|
+
var isListening = instance.isListening();
|
4679
|
+
var isKeyboardEventWithKey = (event === null || event === void 0 ? void 0 : event.key) !== void 0;
|
4680
|
+
return isListening && isKeyboardEventWithKey;
|
4681
|
+
},
|
4669
4682
|
beforeKeyDown: function beforeKeyDown(event) {
|
4670
|
-
if (_this.isListening() === false) {
|
4671
|
-
// Performing action (executing a callback) and triggering hook only for listening Handsontable.
|
4672
|
-
return false;
|
4673
|
-
}
|
4674
|
-
|
4675
4683
|
return _this.runHooks('beforeKeyDown', event);
|
4676
4684
|
},
|
4677
4685
|
afterKeyDown: function afterKeyDown(event) {
|
@@ -4748,7 +4756,7 @@ export default function Core(rootElement, userSettings) {
|
|
4748
4756
|
keys: [['ArrowUp', 'Control/Meta']],
|
4749
4757
|
captureCtrl: true,
|
4750
4758
|
callback: function callback() {
|
4751
|
-
selection.setRangeStart(instance._createCellCoords(instance.rowIndexMapper.
|
4759
|
+
selection.setRangeStart(instance._createCellCoords(instance.rowIndexMapper.getNearestNotHiddenIndex(0, 1), instance.getSelectedRangeLast().highlight.col));
|
4752
4760
|
}
|
4753
4761
|
}, {
|
4754
4762
|
keys: [['ArrowUp', 'Shift']],
|
@@ -4763,7 +4771,7 @@ export default function Core(rootElement, userSettings) {
|
|
4763
4771
|
from = _instance$getSelected.from,
|
4764
4772
|
to = _instance$getSelected.to;
|
4765
4773
|
|
4766
|
-
var row = instance.rowIndexMapper.
|
4774
|
+
var row = instance.rowIndexMapper.getNearestNotHiddenIndex(0, 1);
|
4767
4775
|
selection.setRangeStart(from.clone());
|
4768
4776
|
selection.setRangeEnd(instance._createCellCoords(row, to.col));
|
4769
4777
|
},
|
@@ -4779,7 +4787,7 @@ export default function Core(rootElement, userSettings) {
|
|
4779
4787
|
keys: [['ArrowDown', 'Control/Meta']],
|
4780
4788
|
captureCtrl: true,
|
4781
4789
|
callback: function callback() {
|
4782
|
-
selection.setRangeStart(instance._createCellCoords(instance.rowIndexMapper.
|
4790
|
+
selection.setRangeStart(instance._createCellCoords(instance.rowIndexMapper.getNearestNotHiddenIndex(instance.countRows() - 1, -1), instance.getSelectedRangeLast().highlight.col));
|
4783
4791
|
}
|
4784
4792
|
}, {
|
4785
4793
|
keys: [['ArrowDown', 'Shift']],
|
@@ -4794,7 +4802,7 @@ export default function Core(rootElement, userSettings) {
|
|
4794
4802
|
from = _instance$getSelected2.from,
|
4795
4803
|
to = _instance$getSelected2.to;
|
4796
4804
|
|
4797
|
-
var row = instance.rowIndexMapper.
|
4805
|
+
var row = instance.rowIndexMapper.getNearestNotHiddenIndex(instance.countRows() - 1, -1);
|
4798
4806
|
selection.setRangeStart(from.clone());
|
4799
4807
|
selection.setRangeEnd(instance._createCellCoords(row, to.col));
|
4800
4808
|
},
|
@@ -4814,7 +4822,7 @@ export default function Core(rootElement, userSettings) {
|
|
4814
4822
|
|
4815
4823
|
var row = instance.getSelectedRangeLast().highlight.row;
|
4816
4824
|
|
4817
|
-
var column = (_instance$columnIndex = instance.columnIndexMapper).
|
4825
|
+
var column = (_instance$columnIndex = instance.columnIndexMapper).getNearestNotHiddenIndex.apply(_instance$columnIndex, _toConsumableArray(instance.isRtl() ? [instance.countCols() - 1, -1] : [0, 1]));
|
4818
4826
|
|
4819
4827
|
selection.setRangeStart(instance._createCellCoords(row, column));
|
4820
4828
|
}
|
@@ -4833,7 +4841,7 @@ export default function Core(rootElement, userSettings) {
|
|
4833
4841
|
from = _instance$getSelected3.from,
|
4834
4842
|
to = _instance$getSelected3.to;
|
4835
4843
|
|
4836
|
-
var column = (_instance$columnIndex2 = instance.columnIndexMapper).
|
4844
|
+
var column = (_instance$columnIndex2 = instance.columnIndexMapper).getNearestNotHiddenIndex.apply(_instance$columnIndex2, _toConsumableArray(instance.isRtl() ? [instance.countCols() - 1, -1] : [0, 1]));
|
4837
4845
|
|
4838
4846
|
selection.setRangeStart(from.clone());
|
4839
4847
|
selection.setRangeEnd(instance._createCellCoords(to.row, column));
|
@@ -4854,7 +4862,7 @@ export default function Core(rootElement, userSettings) {
|
|
4854
4862
|
|
4855
4863
|
var row = instance.getSelectedRangeLast().highlight.row;
|
4856
4864
|
|
4857
|
-
var column = (_instance$columnIndex3 = instance.columnIndexMapper).
|
4865
|
+
var column = (_instance$columnIndex3 = instance.columnIndexMapper).getNearestNotHiddenIndex.apply(_instance$columnIndex3, _toConsumableArray(instance.isRtl() ? [0, 1] : [instance.countCols() - 1, -1]));
|
4858
4866
|
|
4859
4867
|
selection.setRangeStart(instance._createCellCoords(row, column));
|
4860
4868
|
}
|
@@ -4873,7 +4881,7 @@ export default function Core(rootElement, userSettings) {
|
|
4873
4881
|
from = _instance$getSelected4.from,
|
4874
4882
|
to = _instance$getSelected4.to;
|
4875
4883
|
|
4876
|
-
var column = (_instance$columnIndex4 = instance.columnIndexMapper).
|
4884
|
+
var column = (_instance$columnIndex4 = instance.columnIndexMapper).getNearestNotHiddenIndex.apply(_instance$columnIndex4, _toConsumableArray(instance.isRtl() ? [0, 1] : [instance.countCols() - 1, -1]));
|
4877
4885
|
|
4878
4886
|
selection.setRangeStart(from.clone());
|
4879
4887
|
selection.setRangeEnd(instance._createCellCoords(to.row, column));
|
@@ -4887,7 +4895,7 @@ export default function Core(rootElement, userSettings) {
|
|
4887
4895
|
callback: function callback() {
|
4888
4896
|
var fixedColumns = parseInt(instance.getSettings().fixedColumnsStart, 10);
|
4889
4897
|
var row = instance.getSelectedRangeLast().highlight.row;
|
4890
|
-
var column = instance.columnIndexMapper.
|
4898
|
+
var column = instance.columnIndexMapper.getNearestNotHiddenIndex(fixedColumns, 1);
|
4891
4899
|
selection.setRangeStart(instance._createCellCoords(row, column));
|
4892
4900
|
},
|
4893
4901
|
runOnlyIf: function runOnlyIf() {
|
@@ -4896,7 +4904,7 @@ export default function Core(rootElement, userSettings) {
|
|
4896
4904
|
}, {
|
4897
4905
|
keys: [['Home', 'Shift']],
|
4898
4906
|
callback: function callback() {
|
4899
|
-
selection.setRangeEnd(instance._createCellCoords(selection.selectedRange.current().from.row, instance.columnIndexMapper.
|
4907
|
+
selection.setRangeEnd(instance._createCellCoords(selection.selectedRange.current().from.row, instance.columnIndexMapper.getNearestNotHiddenIndex(0, 1)));
|
4900
4908
|
}
|
4901
4909
|
}, {
|
4902
4910
|
keys: [['Home', 'Control/Meta']],
|
@@ -4904,8 +4912,8 @@ export default function Core(rootElement, userSettings) {
|
|
4904
4912
|
callback: function callback() {
|
4905
4913
|
var fixedRows = parseInt(instance.getSettings().fixedRowsTop, 10);
|
4906
4914
|
var fixedColumns = parseInt(instance.getSettings().fixedColumnsStart, 10);
|
4907
|
-
var row = instance.rowIndexMapper.
|
4908
|
-
var column = instance.columnIndexMapper.
|
4915
|
+
var row = instance.rowIndexMapper.getNearestNotHiddenIndex(fixedRows, 1);
|
4916
|
+
var column = instance.columnIndexMapper.getNearestNotHiddenIndex(fixedColumns, 1);
|
4909
4917
|
selection.setRangeStart(instance._createCellCoords(row, column));
|
4910
4918
|
},
|
4911
4919
|
runOnlyIf: function runOnlyIf() {
|
@@ -4915,7 +4923,7 @@ export default function Core(rootElement, userSettings) {
|
|
4915
4923
|
keys: [['End']],
|
4916
4924
|
captureCtrl: true,
|
4917
4925
|
callback: function callback() {
|
4918
|
-
selection.setRangeStart(instance._createCellCoords(instance.getSelectedRangeLast().highlight.row, instance.columnIndexMapper.
|
4926
|
+
selection.setRangeStart(instance._createCellCoords(instance.getSelectedRangeLast().highlight.row, instance.columnIndexMapper.getNearestNotHiddenIndex(instance.countCols() - 1, -1)));
|
4919
4927
|
},
|
4920
4928
|
runOnlyIf: function runOnlyIf() {
|
4921
4929
|
return instance.view.isMainTableNotFullyCoveredByOverlays();
|
@@ -4923,15 +4931,15 @@ export default function Core(rootElement, userSettings) {
|
|
4923
4931
|
}, {
|
4924
4932
|
keys: [['End', 'Shift']],
|
4925
4933
|
callback: function callback() {
|
4926
|
-
selection.setRangeEnd(instance._createCellCoords(selection.selectedRange.current().from.row, instance.columnIndexMapper.
|
4934
|
+
selection.setRangeEnd(instance._createCellCoords(selection.selectedRange.current().from.row, instance.columnIndexMapper.getNearestNotHiddenIndex(instance.countCols() - 1, -1)));
|
4927
4935
|
}
|
4928
4936
|
}, {
|
4929
4937
|
keys: [['End', 'Control/Meta']],
|
4930
4938
|
captureCtrl: true,
|
4931
4939
|
callback: function callback() {
|
4932
4940
|
var fixedRows = parseInt(instance.getSettings().fixedRowsBottom, 10);
|
4933
|
-
var row = instance.rowIndexMapper.
|
4934
|
-
var column = instance.columnIndexMapper.
|
4941
|
+
var row = instance.rowIndexMapper.getNearestNotHiddenIndex(instance.countRows() - fixedRows - 1, -1);
|
4942
|
+
var column = instance.columnIndexMapper.getNearestNotHiddenIndex(instance.countCols() - 1, -1);
|
4935
4943
|
selection.setRangeStart(instance._createCellCoords(row, column));
|
4936
4944
|
},
|
4937
4945
|
runOnlyIf: function runOnlyIf() {
|
@@ -4949,7 +4957,7 @@ export default function Core(rootElement, userSettings) {
|
|
4949
4957
|
to = _instance$getSelected5.to;
|
4950
4958
|
|
4951
4959
|
var nextRowIndexToSelect = Math.max(to.row - instance.countVisibleRows(), 0);
|
4952
|
-
var row = instance.rowIndexMapper.
|
4960
|
+
var row = instance.rowIndexMapper.getNearestNotHiddenIndex(nextRowIndexToSelect, 1);
|
4953
4961
|
|
4954
4962
|
if (row !== null) {
|
4955
4963
|
var coords = instance._createCellCoords(row, to.col);
|
@@ -4972,7 +4980,7 @@ export default function Core(rootElement, userSettings) {
|
|
4972
4980
|
to = _instance$getSelected6.to;
|
4973
4981
|
|
4974
4982
|
var nextRowIndexToSelect = Math.min(to.row + instance.countVisibleRows(), instance.countRows() - 1);
|
4975
|
-
var row = instance.rowIndexMapper.
|
4983
|
+
var row = instance.rowIndexMapper.getNearestNotHiddenIndex(nextRowIndexToSelect, -1);
|
4976
4984
|
|
4977
4985
|
if (row !== null) {
|
4978
4986
|
var coords = instance._createCellCoords(row, to.col);
|