handsontable 14.0.0-next-0f92d92-20231130 → 14.1.0-next-514dcd3-20240109
Sign up to get free protection for your applications and to get access to all the features.
- package/3rdparty/walkontable/src/calculator/index.js +11 -6
- package/3rdparty/walkontable/src/calculator/index.mjs +5 -3
- package/3rdparty/walkontable/src/calculator/renderAllColumns.js +50 -0
- package/3rdparty/walkontable/src/calculator/renderAllColumns.mjs +46 -0
- package/3rdparty/walkontable/src/calculator/renderAllRows.js +50 -0
- package/3rdparty/walkontable/src/calculator/renderAllRows.mjs +46 -0
- package/3rdparty/walkontable/src/calculator/viewportColumns.js +3 -124
- package/3rdparty/walkontable/src/calculator/viewportColumns.mjs +4 -126
- package/3rdparty/walkontable/src/calculator/viewportRows.js +3 -3
- package/3rdparty/walkontable/src/calculator/viewportRows.mjs +4 -5
- package/3rdparty/walkontable/src/cell/coords.d.ts +5 -5
- package/3rdparty/walkontable/src/cell/coords.js +2 -2
- package/3rdparty/walkontable/src/cell/coords.mjs +2 -2
- package/3rdparty/walkontable/src/cell/range.d.ts +5 -5
- package/3rdparty/walkontable/src/cell/range.js +16 -41
- package/3rdparty/walkontable/src/cell/range.mjs +16 -41
- package/3rdparty/walkontable/src/core/_base.js +2 -14
- package/3rdparty/walkontable/src/core/_base.mjs +2 -14
- 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 +0 -2
- package/3rdparty/walkontable/src/core/core.mjs +0 -2
- package/3rdparty/walkontable/src/facade/core.js +0 -9
- package/3rdparty/walkontable/src/facade/core.mjs +0 -9
- package/3rdparty/walkontable/src/filter/column.js +2 -2
- package/3rdparty/walkontable/src/filter/column.mjs +2 -2
- package/3rdparty/walkontable/src/filter/row.js +2 -2
- package/3rdparty/walkontable/src/filter/row.mjs +2 -2
- package/3rdparty/walkontable/src/index.js +3 -4
- package/3rdparty/walkontable/src/index.mjs +1 -2
- package/3rdparty/walkontable/src/overlay/_base.js +2 -2
- package/3rdparty/walkontable/src/overlay/_base.mjs +2 -2
- 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 +2 -2
- package/3rdparty/walkontable/src/overlay/top.mjs +2 -2
- package/3rdparty/walkontable/src/overlay/topInlineStartCorner.js +2 -2
- package/3rdparty/walkontable/src/overlay/topInlineStartCorner.mjs +2 -2
- package/3rdparty/walkontable/src/overlays.js +2 -5
- package/3rdparty/walkontable/src/overlays.mjs +2 -6
- package/3rdparty/walkontable/src/renderer/_base.js +2 -2
- package/3rdparty/walkontable/src/renderer/_base.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 +10 -0
- package/3rdparty/walkontable/src/renderer/colGroup.mjs +10 -0
- 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 +6 -5
- package/3rdparty/walkontable/src/renderer/rows.mjs +6 -5
- package/3rdparty/walkontable/src/renderer/table.js +2 -2
- package/3rdparty/walkontable/src/renderer/table.mjs +2 -2
- package/3rdparty/walkontable/src/scroll.js +4 -60
- package/3rdparty/walkontable/src/scroll.mjs +4 -60
- package/3rdparty/walkontable/src/selection/manager.js +0 -1
- package/3rdparty/walkontable/src/selection/manager.mjs +0 -1
- package/3rdparty/walkontable/src/settings.js +5 -2
- package/3rdparty/walkontable/src/settings.mjs +4 -2
- package/3rdparty/walkontable/src/table.js +2 -3
- package/3rdparty/walkontable/src/table.mjs +2 -3
- package/3rdparty/walkontable/src/utils/column.js +29 -14
- package/3rdparty/walkontable/src/utils/column.mjs +29 -14
- package/3rdparty/walkontable/src/utils/columnStretching.js +219 -0
- package/3rdparty/walkontable/src/utils/columnStretching.mjs +215 -0
- package/3rdparty/walkontable/src/utils/nodesPool.js +2 -2
- package/3rdparty/walkontable/src/utils/nodesPool.mjs +2 -2
- package/3rdparty/walkontable/src/utils/orderView/view.js +2 -2
- package/3rdparty/walkontable/src/utils/orderView/view.mjs +2 -2
- package/3rdparty/walkontable/src/utils/orderView/viewSize.js +2 -2
- package/3rdparty/walkontable/src/utils/orderView/viewSize.mjs +2 -2
- package/3rdparty/walkontable/src/utils/orderView/viewSizeSet.js +2 -2
- package/3rdparty/walkontable/src/utils/orderView/viewSizeSet.mjs +2 -2
- package/3rdparty/walkontable/src/utils/row.js +2 -2
- package/3rdparty/walkontable/src/utils/row.mjs +2 -2
- package/3rdparty/walkontable/src/viewport.js +22 -17
- package/3rdparty/walkontable/src/viewport.mjs +23 -18
- package/CHANGELOG.md +36 -0
- package/base.js +4 -2
- package/base.mjs +2 -2
- package/cellTypes/dropdownType/dropdownType.d.ts +6 -6
- package/cellTypes/dropdownType/dropdownType.js +4 -4
- package/cellTypes/dropdownType/dropdownType.mjs +4 -4
- package/core/focusCatcher/index.js +44 -6
- package/core/focusCatcher/index.mjs +44 -6
- package/core.d.ts +19 -19
- package/core.js +7 -12
- package/core.mjs +7 -12
- package/dataMap/dataMap.js +3 -2
- package/dataMap/dataMap.mjs +2 -2
- package/dataMap/dataSource.js +2 -2
- package/dataMap/dataSource.mjs +2 -2
- package/dataMap/metaManager/lazyFactoryMap.js +2 -2
- package/dataMap/metaManager/lazyFactoryMap.mjs +2 -2
- package/dataMap/metaManager/metaLayers/cellMeta.js +2 -2
- package/dataMap/metaManager/metaLayers/cellMeta.mjs +2 -2
- package/dataMap/metaManager/metaLayers/columnMeta.js +2 -2
- package/dataMap/metaManager/metaLayers/columnMeta.mjs +2 -2
- package/dataMap/metaManager/metaLayers/globalMeta.js +2 -2
- package/dataMap/metaManager/metaLayers/globalMeta.mjs +2 -2
- package/dataMap/metaManager/metaLayers/tableMeta.js +2 -2
- package/dataMap/metaManager/metaLayers/tableMeta.mjs +2 -2
- package/dataMap/metaManager/metaSchema.js +40 -25
- package/dataMap/metaManager/metaSchema.mjs +40 -25
- package/dataMap/metaManager/mods/dynamicCellMeta.js +2 -2
- package/dataMap/metaManager/mods/dynamicCellMeta.mjs +2 -2
- package/dataMap/metaManager/mods/extendMetaProperties.js +14 -2
- package/dataMap/metaManager/mods/extendMetaProperties.mjs +14 -2
- package/dist/handsontable.css +5 -5
- package/dist/handsontable.full.css +6 -6
- package/dist/handsontable.full.js +4835 -4508
- package/dist/handsontable.full.min.css +4 -4
- package/dist/handsontable.full.min.js +156 -154
- package/dist/handsontable.js +3441 -2825
- package/dist/handsontable.min.css +3 -3
- package/dist/handsontable.min.js +18 -15
- package/editorManager.js +5 -6
- package/editorManager.mjs +5 -6
- package/editors/autocompleteEditor/autocompleteEditor.js +2 -4
- package/editors/autocompleteEditor/autocompleteEditor.mjs +2 -4
- package/editors/baseEditor/baseEditor.d.ts +1 -1
- package/editors/baseEditor/baseEditor.js +2 -2
- package/editors/baseEditor/baseEditor.mjs +2 -2
- package/editors/dateEditor/dateEditor.d.ts +1 -1
- package/editors/dateEditor/dateEditor.js +29 -33
- package/editors/dateEditor/dateEditor.mjs +29 -33
- package/editors/handsontableEditor/handsontableEditor.js +0 -1
- package/editors/handsontableEditor/handsontableEditor.mjs +0 -1
- package/editors/selectEditor/selectEditor.js +8 -2
- package/editors/selectEditor/selectEditor.mjs +8 -2
- package/editors/textEditor/textEditor.js +2 -6
- package/editors/textEditor/textEditor.mjs +2 -6
- package/eventManager.js +4 -3
- package/eventManager.mjs +4 -3
- package/helpers/browser.js +5 -2
- package/helpers/browser.mjs +5 -2
- package/helpers/feature.js +10 -0
- package/helpers/feature.mjs +9 -0
- package/helpers/mixed.js +2 -2
- package/helpers/mixed.mjs +2 -2
- package/index.d.ts +12 -0
- package/package.json +13 -4
- package/pluginHooks.d.ts +10 -9
- package/pluginHooks.js +10 -8
- package/pluginHooks.mjs +7 -7
- package/plugins/autoColumnSize/autoColumnSize.d.ts +2 -2
- package/plugins/autoColumnSize/autoColumnSize.js +2 -2
- package/plugins/autoColumnSize/autoColumnSize.mjs +2 -2
- package/plugins/autoRowSize/autoRowSize.d.ts +3 -3
- package/plugins/autoRowSize/autoRowSize.js +2 -2
- package/plugins/autoRowSize/autoRowSize.mjs +2 -2
- package/plugins/autofill/autofill.js +2 -2
- package/plugins/autofill/autofill.mjs +2 -2
- package/plugins/base/base.js +2 -2
- package/plugins/base/base.mjs +2 -2
- package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.d.ts +1 -1
- package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.js +2 -2
- package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.mjs +2 -2
- package/plugins/collapsibleColumns/collapsibleColumns.js +2 -2
- package/plugins/collapsibleColumns/collapsibleColumns.mjs +2 -2
- package/plugins/columnSorting/columnSorting.js +2 -2
- package/plugins/columnSorting/columnSorting.mjs +2 -2
- package/plugins/columnSorting/columnStatesManager.js +2 -2
- package/plugins/columnSorting/columnStatesManager.mjs +2 -2
- package/plugins/columnSummary/columnSummary.d.ts +11 -11
- package/plugins/columnSummary/columnSummary.js +20 -5
- package/plugins/columnSummary/columnSummary.mjs +20 -5
- package/plugins/columnSummary/endpoints.js +19 -5
- package/plugins/columnSummary/endpoints.mjs +19 -5
- package/plugins/comments/commentEditor.js +2 -2
- package/plugins/comments/commentEditor.mjs +2 -2
- package/plugins/comments/comments.js +2 -2
- package/plugins/comments/comments.mjs +2 -2
- package/plugins/comments/displaySwitch.js +2 -2
- package/plugins/comments/displaySwitch.mjs +2 -2
- package/plugins/contextMenu/commandExecutor.js +2 -2
- package/plugins/contextMenu/commandExecutor.mjs +2 -2
- package/plugins/contextMenu/contextMenu.js +2 -2
- package/plugins/contextMenu/contextMenu.mjs +2 -2
- package/plugins/contextMenu/itemsFactory.js +2 -2
- package/plugins/contextMenu/itemsFactory.mjs +2 -2
- package/plugins/contextMenu/menu/cursor.js +2 -2
- package/plugins/contextMenu/menu/cursor.mjs +2 -2
- package/plugins/contextMenu/menu/menu.js +2 -2
- package/plugins/contextMenu/menu/menu.mjs +2 -2
- package/plugins/copyPaste/copyPaste.js +40 -6
- package/plugins/copyPaste/copyPaste.mjs +40 -6
- package/plugins/customBorders/customBorders.d.ts +17 -8
- package/plugins/customBorders/customBorders.js +2 -7
- package/plugins/customBorders/customBorders.mjs +2 -7
- package/plugins/customBorders/utils.js +0 -1
- package/plugins/customBorders/utils.mjs +0 -1
- package/plugins/dragToScroll/dragToScroll.d.ts +8 -1
- package/plugins/dragToScroll/dragToScroll.js +18 -22
- package/plugins/dragToScroll/dragToScroll.mjs +18 -22
- package/plugins/dropdownMenu/dropdownMenu.js +2 -2
- package/plugins/dropdownMenu/dropdownMenu.mjs +2 -2
- package/plugins/exportFile/dataProvider.js +2 -2
- package/plugins/exportFile/dataProvider.mjs +2 -2
- package/plugins/exportFile/exportFile.d.ts +18 -3
- package/plugins/exportFile/types/_base.js +2 -2
- package/plugins/exportFile/types/_base.mjs +2 -2
- package/plugins/filters/component/_base.js +2 -2
- package/plugins/filters/component/_base.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 +2 -2
- package/plugins/filters/component/condition.mjs +2 -2
- package/plugins/filters/component/operators.js +2 -2
- package/plugins/filters/component/operators.mjs +2 -2
- package/plugins/filters/component/value.js +2 -2
- package/plugins/filters/component/value.mjs +2 -2
- package/plugins/filters/conditionCollection.js +2 -2
- package/plugins/filters/conditionCollection.mjs +2 -2
- package/plugins/filters/conditionUpdateObserver.js +2 -2
- package/plugins/filters/conditionUpdateObserver.mjs +2 -2
- package/plugins/filters/dataFilter.js +2 -2
- package/plugins/filters/dataFilter.mjs +2 -2
- package/plugins/filters/filters.js +2 -2
- package/plugins/filters/filters.mjs +2 -2
- package/plugins/filters/ui/_base.js +2 -2
- package/plugins/filters/ui/_base.mjs +2 -2
- package/plugins/filters/ui/radioInput.js +1 -1
- package/plugins/filters/ui/radioInput.mjs +1 -1
- package/plugins/formulas/formulas.d.ts +1 -0
- package/plugins/formulas/formulas.js +2 -4
- package/plugins/formulas/formulas.mjs +2 -4
- package/plugins/formulas/indexSyncer/axisSyncer.js +0 -1
- package/plugins/formulas/indexSyncer/axisSyncer.mjs +0 -1
- package/plugins/manualColumnMove/ui/_base.js +2 -2
- package/plugins/manualColumnMove/ui/_base.mjs +2 -2
- package/plugins/manualColumnResize/manualColumnResize.js +6 -2
- package/plugins/manualColumnResize/manualColumnResize.mjs +6 -2
- package/plugins/manualRowMove/ui/_base.js +2 -2
- package/plugins/manualRowMove/ui/_base.mjs +2 -2
- package/plugins/manualRowResize/manualRowResize.js +7 -3
- package/plugins/manualRowResize/manualRowResize.mjs +7 -3
- package/plugins/mergeCells/calculations/autofill.js +2 -2
- package/plugins/mergeCells/calculations/autofill.mjs +2 -2
- package/plugins/mergeCells/calculations/selection.js +2 -2
- package/plugins/mergeCells/calculations/selection.mjs +2 -2
- package/plugins/mergeCells/cellCoords.js +2 -2
- package/plugins/mergeCells/cellCoords.mjs +2 -2
- package/plugins/mergeCells/cellsCollection.js +2 -2
- package/plugins/mergeCells/cellsCollection.mjs +2 -2
- package/plugins/mergeCells/mergeCells.js +2 -4
- package/plugins/mergeCells/mergeCells.mjs +2 -4
- package/plugins/multiColumnSorting/multiColumnSorting.js +2 -2
- package/plugins/multiColumnSorting/multiColumnSorting.mjs +2 -2
- package/plugins/multipleSelectionHandles/multipleSelectionHandles.d.ts +8 -1
- package/plugins/multipleSelectionHandles/multipleSelectionHandles.js +2 -2
- package/plugins/multipleSelectionHandles/multipleSelectionHandles.mjs +2 -2
- package/plugins/nestedHeaders/nestedHeaders.js +2 -3
- package/plugins/nestedHeaders/nestedHeaders.mjs +2 -3
- package/plugins/nestedHeaders/stateManager/headersTree.js +0 -1
- package/plugins/nestedHeaders/stateManager/headersTree.mjs +0 -1
- package/plugins/nestedHeaders/stateManager/sourceSettings.js +1 -1
- package/plugins/nestedHeaders/stateManager/sourceSettings.mjs +1 -1
- package/plugins/nestedHeaders/utils/ghostTable.js +2 -2
- package/plugins/nestedHeaders/utils/ghostTable.mjs +2 -2
- package/plugins/nestedRows/data/dataManager.js +2 -2
- package/plugins/nestedRows/data/dataManager.mjs +2 -2
- package/plugins/nestedRows/nestedRows.js +2 -2
- package/plugins/nestedRows/nestedRows.mjs +2 -2
- package/plugins/nestedRows/ui/_base.js +2 -2
- package/plugins/nestedRows/ui/_base.mjs +2 -2
- package/plugins/nestedRows/ui/contextMenu.js +2 -2
- package/plugins/nestedRows/ui/contextMenu.mjs +2 -2
- package/plugins/nestedRows/utils/rowMoveController.js +2 -2
- package/plugins/nestedRows/utils/rowMoveController.mjs +2 -2
- package/plugins/persistentState/persistentState.d.ts +5 -2
- package/plugins/persistentState/persistentState.js +2 -2
- package/plugins/persistentState/persistentState.mjs +2 -2
- package/plugins/persistentState/storage.js +2 -2
- package/plugins/persistentState/storage.mjs +2 -2
- package/plugins/search/search.js +2 -2
- package/plugins/search/search.mjs +2 -2
- package/plugins/touchScroll/touchScroll.js +2 -2
- package/plugins/touchScroll/touchScroll.mjs +2 -2
- package/plugins/trimRows/trimRows.js +2 -2
- package/plugins/trimRows/trimRows.mjs +2 -2
- package/plugins/undoRedo/undoRedo.d.ts +3 -0
- package/plugins/undoRedo/undoRedo.js +64 -7
- package/plugins/undoRedo/undoRedo.mjs +64 -7
- package/renderers/autocompleteRenderer/autocompleteRenderer.d.ts +1 -1
- package/renderers/autocompleteRenderer/autocompleteRenderer.js +0 -1
- package/renderers/autocompleteRenderer/autocompleteRenderer.mjs +0 -1
- package/renderers/baseRenderer/baseRenderer.d.ts +1 -1
- package/renderers/checkboxRenderer/checkboxRenderer.d.ts +1 -1
- package/renderers/checkboxRenderer/checkboxRenderer.js +0 -2
- package/renderers/checkboxRenderer/checkboxRenderer.mjs +0 -2
- package/renderers/dateRenderer/dateRenderer.d.ts +1 -1
- package/renderers/dropdownRenderer/dropdownRenderer.d.ts +5 -0
- package/renderers/dropdownRenderer/dropdownRenderer.js +23 -0
- package/renderers/dropdownRenderer/dropdownRenderer.mjs +19 -0
- package/renderers/dropdownRenderer/index.d.ts +1 -0
- package/renderers/dropdownRenderer/index.js +6 -0
- package/renderers/dropdownRenderer/index.mjs +1 -0
- package/renderers/handsontableRenderer/handsontableRenderer.d.ts +1 -1
- package/renderers/htmlRenderer/htmlRenderer.d.ts +1 -1
- package/renderers/index.d.ts +3 -0
- package/renderers/index.js +12 -0
- package/renderers/index.mjs +7 -1
- package/renderers/numericRenderer/numericRenderer.d.ts +1 -1
- package/renderers/passwordRenderer/passwordRenderer.d.ts +1 -1
- package/renderers/selectRenderer/selectRenderer.d.ts +1 -1
- package/renderers/textRenderer/textRenderer.d.ts +1 -1
- package/renderers/timeRenderer/timeRenderer.d.ts +1 -1
- package/selection/highlight/highlight.js +2 -3
- package/selection/highlight/highlight.mjs +2 -3
- package/selection/highlight/visualSelection.js +2 -2
- package/selection/highlight/visualSelection.mjs +2 -2
- package/selection/range.js +2 -2
- package/selection/range.mjs +2 -2
- package/selection/selection.js +2 -2
- package/selection/selection.mjs +2 -2
- package/settings.d.ts +27 -14
- package/tableView.js +4 -5
- package/tableView.mjs +4 -5
- package/translations/indexMapper.d.ts +1 -1
- package/translations/indexMapper.js +4 -3
- package/translations/indexMapper.mjs +2 -2
- package/translations/mapCollections/aggregatedCollection.js +2 -2
- package/translations/mapCollections/aggregatedCollection.mjs +2 -2
- package/translations/mapCollections/mapCollection.js +2 -2
- package/translations/mapCollections/mapCollection.mjs +2 -2
- package/translations/maps/indexMap.js +2 -2
- package/translations/maps/indexMap.mjs +2 -2
- package/translations/maps/linkedPhysicalIndexToValueMap.js +2 -2
- package/translations/maps/linkedPhysicalIndexToValueMap.mjs +2 -2
- package/utils/dataStructures/linkedList.js +2 -2
- package/utils/dataStructures/linkedList.mjs +2 -2
- package/utils/dataStructures/tree.js +2 -2
- package/utils/dataStructures/tree.mjs +2 -2
- package/utils/ghostTable.js +2 -2
- package/utils/ghostTable.mjs +2 -2
- package/utils/interval.js +2 -2
- package/utils/interval.mjs +2 -2
- package/utils/samplesGenerator.js +2 -2
- package/utils/samplesGenerator.mjs +2 -2
- package/validators/dropdownValidator/dropdownValidator.d.ts +5 -0
- package/validators/dropdownValidator/dropdownValidator.js +18 -0
- package/validators/dropdownValidator/dropdownValidator.mjs +14 -0
- package/validators/dropdownValidator/index.d.ts +1 -0
- package/validators/dropdownValidator/index.js +6 -0
- package/validators/dropdownValidator/index.mjs +1 -0
- package/validators/index.d.ts +2 -0
- package/validators/index.js +4 -0
- package/validators/index.mjs +3 -1
- package/validators/timeValidator/timeValidator.js +0 -1
- package/validators/timeValidator/timeValidator.mjs +0 -1
@@ -2,13 +2,13 @@
|
|
2
2
|
|
3
3
|
exports.__esModule = true;
|
4
4
|
var _dropdownEditor = require("../../editors/dropdownEditor");
|
5
|
-
var
|
6
|
-
var
|
5
|
+
var _dropdownRenderer = require("../../renderers/dropdownRenderer");
|
6
|
+
var _dropdownValidator = require("../../validators/dropdownValidator");
|
7
7
|
const CELL_TYPE = exports.CELL_TYPE = 'dropdown';
|
8
8
|
const DropdownCellType = exports.DropdownCellType = {
|
9
9
|
CELL_TYPE,
|
10
10
|
editor: _dropdownEditor.DropdownEditor,
|
11
11
|
// displays small gray arrow on right side of the cell
|
12
|
-
renderer:
|
13
|
-
validator:
|
12
|
+
renderer: _dropdownRenderer.dropdownRenderer,
|
13
|
+
validator: _dropdownValidator.dropdownValidator
|
14
14
|
};
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import { DropdownEditor } from "../../editors/dropdownEditor/index.mjs";
|
2
|
-
import {
|
3
|
-
import {
|
2
|
+
import { dropdownRenderer } from "../../renderers/dropdownRenderer/index.mjs";
|
3
|
+
import { dropdownValidator } from "../../validators/dropdownValidator/index.mjs";
|
4
4
|
export const CELL_TYPE = 'dropdown';
|
5
5
|
export const DropdownCellType = {
|
6
6
|
CELL_TYPE,
|
7
7
|
editor: DropdownEditor,
|
8
8
|
// displays small gray arrow on right side of the cell
|
9
|
-
renderer:
|
10
|
-
validator:
|
9
|
+
renderer: dropdownRenderer,
|
10
|
+
validator: dropdownValidator
|
11
11
|
};
|
@@ -12,14 +12,15 @@ var _focusDetector = require("./focusDetector");
|
|
12
12
|
* @param {Core} hot The Handsontable instance.
|
13
13
|
*/
|
14
14
|
function installFocusCatcher(hot) {
|
15
|
+
const clampCoordsIfNeeded = normalizeCoordsIfNeeded(hot);
|
15
16
|
let recentlyAddedFocusCoords;
|
16
17
|
const {
|
17
18
|
activate,
|
18
19
|
deactivate
|
19
20
|
} = (0, _focusDetector.installFocusDetector)(hot, {
|
20
21
|
onFocusFromTop() {
|
21
|
-
var
|
22
|
-
const mostTopStartCoords = (
|
22
|
+
var _clampCoordsIfNeeded;
|
23
|
+
const mostTopStartCoords = (_clampCoordsIfNeeded = clampCoordsIfNeeded(recentlyAddedFocusCoords)) !== null && _clampCoordsIfNeeded !== void 0 ? _clampCoordsIfNeeded : getMostTopStartPosition(hot);
|
23
24
|
if (mostTopStartCoords) {
|
24
25
|
hot.runHooks('modifyFocusOnTabNavigation', 'from_above', mostTopStartCoords);
|
25
26
|
hot.selectCell(mostTopStartCoords.row, mostTopStartCoords.col);
|
@@ -27,8 +28,8 @@ function installFocusCatcher(hot) {
|
|
27
28
|
hot.listen();
|
28
29
|
},
|
29
30
|
onFocusFromBottom() {
|
30
|
-
var
|
31
|
-
const mostBottomEndCoords = (
|
31
|
+
var _clampCoordsIfNeeded2;
|
32
|
+
const mostBottomEndCoords = (_clampCoordsIfNeeded2 = clampCoordsIfNeeded(recentlyAddedFocusCoords)) !== null && _clampCoordsIfNeeded2 !== void 0 ? _clampCoordsIfNeeded2 : getMostBottomEndPosition(hot);
|
32
33
|
if (mostBottomEndCoords) {
|
33
34
|
hot.runHooks('modifyFocusOnTabNavigation', 'from_below', mostBottomEndCoords);
|
34
35
|
hot.selectCell(mostBottomEndCoords.row, mostBottomEndCoords.col);
|
@@ -42,10 +43,12 @@ function installFocusCatcher(hot) {
|
|
42
43
|
};
|
43
44
|
let isSavingCoordsEnabled = true;
|
44
45
|
let isTabOrShiftTabPressed = false;
|
46
|
+
let preventViewportScroll = false;
|
45
47
|
hot.addHook('afterListen', () => deactivate());
|
46
48
|
hot.addHook('afterUnlisten', () => activate());
|
47
49
|
hot.addHook('afterSelection', (row, column, row2, column2, preventScrolling) => {
|
48
|
-
if (isTabOrShiftTabPressed && rowWrapState.wrapped && rowWrapState.flipped) {
|
50
|
+
if (isTabOrShiftTabPressed && (rowWrapState.wrapped && rowWrapState.flipped || preventViewportScroll)) {
|
51
|
+
preventViewportScroll = false;
|
49
52
|
preventScrolling.value = true;
|
50
53
|
}
|
51
54
|
if (isSavingCoordsEnabled) {
|
@@ -77,10 +80,16 @@ function installFocusCatcher(hot) {
|
|
77
80
|
hot.getShortcutManager().getContext('grid').addShortcuts([{
|
78
81
|
...shortcutOptions,
|
79
82
|
callback: () => {
|
83
|
+
const {
|
84
|
+
tabNavigation
|
85
|
+
} = hot.getSettings();
|
80
86
|
isTabOrShiftTabPressed = true;
|
81
|
-
if (hot.getSelectedRangeLast() && !
|
87
|
+
if (hot.getSelectedRangeLast() && !tabNavigation) {
|
82
88
|
isSavingCoordsEnabled = false;
|
83
89
|
}
|
90
|
+
if (!tabNavigation) {
|
91
|
+
preventViewportScroll = true;
|
92
|
+
}
|
84
93
|
},
|
85
94
|
position: 'before'
|
86
95
|
}, {
|
@@ -165,4 +174,33 @@ function getMostBottomEndPosition(hot) {
|
|
165
174
|
endColumn = -1;
|
166
175
|
}
|
167
176
|
return hot._createCellCoords((_rowIndexMapper$getVi = rowIndexMapper.getVisualFromRenderableIndex(bottomRow)) !== null && _rowIndexMapper$getVi !== void 0 ? _rowIndexMapper$getVi : bottomRow, (_columnIndexMapper$ge = columnIndexMapper.getVisualFromRenderableIndex(endColumn)) !== null && _columnIndexMapper$ge !== void 0 ? _columnIndexMapper$ge : endColumn);
|
177
|
+
}
|
178
|
+
|
179
|
+
/**
|
180
|
+
* Normalizes the coordinates (clamps to nearest visible cell position within dataset range).
|
181
|
+
*
|
182
|
+
* @param {Core} hot The Handsontable instance.
|
183
|
+
* @returns {function(Coords | undefined): Coords | null}
|
184
|
+
*/
|
185
|
+
function normalizeCoordsIfNeeded(hot) {
|
186
|
+
return coords => {
|
187
|
+
if (!coords) {
|
188
|
+
return null;
|
189
|
+
}
|
190
|
+
const mostTopStartCoords = getMostTopStartPosition(hot);
|
191
|
+
const mostBottomEndCoords = getMostBottomEndPosition(hot);
|
192
|
+
if (coords.col < mostTopStartCoords.col) {
|
193
|
+
coords.col = mostTopStartCoords.col;
|
194
|
+
}
|
195
|
+
if (coords.col > mostBottomEndCoords.col) {
|
196
|
+
coords.col = mostBottomEndCoords.col;
|
197
|
+
}
|
198
|
+
if (coords.row < mostTopStartCoords.row) {
|
199
|
+
coords.row = mostTopStartCoords.row;
|
200
|
+
}
|
201
|
+
if (coords.row > mostBottomEndCoords.row) {
|
202
|
+
coords.row = mostBottomEndCoords.row;
|
203
|
+
}
|
204
|
+
return coords;
|
205
|
+
};
|
168
206
|
}
|
@@ -8,14 +8,15 @@ import { installFocusDetector } from "./focusDetector.mjs";
|
|
8
8
|
* @param {Core} hot The Handsontable instance.
|
9
9
|
*/
|
10
10
|
export function installFocusCatcher(hot) {
|
11
|
+
const clampCoordsIfNeeded = normalizeCoordsIfNeeded(hot);
|
11
12
|
let recentlyAddedFocusCoords;
|
12
13
|
const {
|
13
14
|
activate,
|
14
15
|
deactivate
|
15
16
|
} = installFocusDetector(hot, {
|
16
17
|
onFocusFromTop() {
|
17
|
-
var
|
18
|
-
const mostTopStartCoords = (
|
18
|
+
var _clampCoordsIfNeeded;
|
19
|
+
const mostTopStartCoords = (_clampCoordsIfNeeded = clampCoordsIfNeeded(recentlyAddedFocusCoords)) !== null && _clampCoordsIfNeeded !== void 0 ? _clampCoordsIfNeeded : getMostTopStartPosition(hot);
|
19
20
|
if (mostTopStartCoords) {
|
20
21
|
hot.runHooks('modifyFocusOnTabNavigation', 'from_above', mostTopStartCoords);
|
21
22
|
hot.selectCell(mostTopStartCoords.row, mostTopStartCoords.col);
|
@@ -23,8 +24,8 @@ export function installFocusCatcher(hot) {
|
|
23
24
|
hot.listen();
|
24
25
|
},
|
25
26
|
onFocusFromBottom() {
|
26
|
-
var
|
27
|
-
const mostBottomEndCoords = (
|
27
|
+
var _clampCoordsIfNeeded2;
|
28
|
+
const mostBottomEndCoords = (_clampCoordsIfNeeded2 = clampCoordsIfNeeded(recentlyAddedFocusCoords)) !== null && _clampCoordsIfNeeded2 !== void 0 ? _clampCoordsIfNeeded2 : getMostBottomEndPosition(hot);
|
28
29
|
if (mostBottomEndCoords) {
|
29
30
|
hot.runHooks('modifyFocusOnTabNavigation', 'from_below', mostBottomEndCoords);
|
30
31
|
hot.selectCell(mostBottomEndCoords.row, mostBottomEndCoords.col);
|
@@ -38,10 +39,12 @@ export function installFocusCatcher(hot) {
|
|
38
39
|
};
|
39
40
|
let isSavingCoordsEnabled = true;
|
40
41
|
let isTabOrShiftTabPressed = false;
|
42
|
+
let preventViewportScroll = false;
|
41
43
|
hot.addHook('afterListen', () => deactivate());
|
42
44
|
hot.addHook('afterUnlisten', () => activate());
|
43
45
|
hot.addHook('afterSelection', (row, column, row2, column2, preventScrolling) => {
|
44
|
-
if (isTabOrShiftTabPressed && rowWrapState.wrapped && rowWrapState.flipped) {
|
46
|
+
if (isTabOrShiftTabPressed && (rowWrapState.wrapped && rowWrapState.flipped || preventViewportScroll)) {
|
47
|
+
preventViewportScroll = false;
|
45
48
|
preventScrolling.value = true;
|
46
49
|
}
|
47
50
|
if (isSavingCoordsEnabled) {
|
@@ -73,10 +76,16 @@ export function installFocusCatcher(hot) {
|
|
73
76
|
hot.getShortcutManager().getContext('grid').addShortcuts([{
|
74
77
|
...shortcutOptions,
|
75
78
|
callback: () => {
|
79
|
+
const {
|
80
|
+
tabNavigation
|
81
|
+
} = hot.getSettings();
|
76
82
|
isTabOrShiftTabPressed = true;
|
77
|
-
if (hot.getSelectedRangeLast() && !
|
83
|
+
if (hot.getSelectedRangeLast() && !tabNavigation) {
|
78
84
|
isSavingCoordsEnabled = false;
|
79
85
|
}
|
86
|
+
if (!tabNavigation) {
|
87
|
+
preventViewportScroll = true;
|
88
|
+
}
|
80
89
|
},
|
81
90
|
position: 'before'
|
82
91
|
}, {
|
@@ -161,4 +170,33 @@ function getMostBottomEndPosition(hot) {
|
|
161
170
|
endColumn = -1;
|
162
171
|
}
|
163
172
|
return hot._createCellCoords((_rowIndexMapper$getVi = rowIndexMapper.getVisualFromRenderableIndex(bottomRow)) !== null && _rowIndexMapper$getVi !== void 0 ? _rowIndexMapper$getVi : bottomRow, (_columnIndexMapper$ge = columnIndexMapper.getVisualFromRenderableIndex(endColumn)) !== null && _columnIndexMapper$ge !== void 0 ? _columnIndexMapper$ge : endColumn);
|
173
|
+
}
|
174
|
+
|
175
|
+
/**
|
176
|
+
* Normalizes the coordinates (clamps to nearest visible cell position within dataset range).
|
177
|
+
*
|
178
|
+
* @param {Core} hot The Handsontable instance.
|
179
|
+
* @returns {function(Coords | undefined): Coords | null}
|
180
|
+
*/
|
181
|
+
function normalizeCoordsIfNeeded(hot) {
|
182
|
+
return coords => {
|
183
|
+
if (!coords) {
|
184
|
+
return null;
|
185
|
+
}
|
186
|
+
const mostTopStartCoords = getMostTopStartPosition(hot);
|
187
|
+
const mostBottomEndCoords = getMostBottomEndPosition(hot);
|
188
|
+
if (coords.col < mostTopStartCoords.col) {
|
189
|
+
coords.col = mostTopStartCoords.col;
|
190
|
+
}
|
191
|
+
if (coords.col > mostBottomEndCoords.col) {
|
192
|
+
coords.col = mostBottomEndCoords.col;
|
193
|
+
}
|
194
|
+
if (coords.row < mostTopStartCoords.row) {
|
195
|
+
coords.row = mostTopStartCoords.row;
|
196
|
+
}
|
197
|
+
if (coords.row > mostBottomEndCoords.row) {
|
198
|
+
coords.row = mostBottomEndCoords.row;
|
199
|
+
}
|
200
|
+
return coords;
|
201
|
+
};
|
164
202
|
}
|
package/core.d.ts
CHANGED
@@ -32,7 +32,7 @@ export default class Core {
|
|
32
32
|
batchRender<R>(wrappedOperations: () => R): R;
|
33
33
|
clear(): void;
|
34
34
|
clearUndo(): void;
|
35
|
-
colToProp(
|
35
|
+
colToProp(column: number): string | number;
|
36
36
|
columnIndexMapper: IndexMapper;
|
37
37
|
constructor(element: Element, options: GridSettings);
|
38
38
|
container: HTMLElement;
|
@@ -54,22 +54,22 @@ export default class Core {
|
|
54
54
|
emptySelectedCells(): void;
|
55
55
|
forceFullRender: boolean;
|
56
56
|
getActiveEditor(): BaseEditor | undefined;
|
57
|
-
getCell(row: number,
|
57
|
+
getCell(row: number, column: number, topmost?: boolean): HTMLTableCellElement | null;
|
58
58
|
getCellEditor(cellMeta: CellMeta): BaseEditor;
|
59
|
-
getCellEditor(row: number,
|
60
|
-
getCellMeta(row: number,
|
59
|
+
getCellEditor(row: number, column: number): BaseEditor;
|
60
|
+
getCellMeta(row: number, column: number): CellProperties;
|
61
61
|
getCellMetaAtRow(row: number): CellProperties[];
|
62
62
|
getCellRenderer(cellMeta: CellMeta): BaseRenderer;
|
63
|
-
getCellRenderer(row: number,
|
63
|
+
getCellRenderer(row: number, column: number): BaseRenderer;
|
64
64
|
getCellsMeta(): CellProperties[];
|
65
65
|
getCellValidator(cellMeta: CellMeta): BaseValidator | RegExp | undefined;
|
66
|
-
getCellValidator(row: number,
|
66
|
+
getCellValidator(row: number, column: number): BaseValidator | RegExp | undefined;
|
67
67
|
getColHeader(): Array<number | string>;
|
68
68
|
getColHeader(column: number, headerLevel?: number): number | string;
|
69
|
-
getColWidth(
|
70
|
-
getCoords(
|
69
|
+
getColWidth(column: number): number;
|
70
|
+
getCoords(element: Element | null): CellCoords;
|
71
71
|
getCopyableData(row: number, column: number): string;
|
72
|
-
getCopyableText(startRow: number,
|
72
|
+
getCopyableText(startRow: number, startColumn: number, endRow: number, endColumn: number): string;
|
73
73
|
getData(row?: number, column?: number, row2?: number, column2?: number): CellValue[];
|
74
74
|
getDataAtCell(row: number, column: number): CellValue;
|
75
75
|
getDataAtCol(column: number): CellValue[];
|
@@ -105,7 +105,7 @@ export default class Core {
|
|
105
105
|
init(): () => void;
|
106
106
|
isColumnModificationAllowed(): boolean;
|
107
107
|
isDestroyed: boolean;
|
108
|
-
isEmptyCol(
|
108
|
+
isEmptyCol(column: number): boolean;
|
109
109
|
isEmptyRow(row: number): boolean;
|
110
110
|
isExecutionSuspended(): boolean;
|
111
111
|
isListening(): boolean;
|
@@ -116,12 +116,12 @@ export default class Core {
|
|
116
116
|
isUndoAvailable(): boolean;
|
117
117
|
listen(): void;
|
118
118
|
loadData(data: CellValue[][] | RowObject[], source?: string): void;
|
119
|
-
populateFromArray(row: number,
|
120
|
-
|
119
|
+
populateFromArray(row: number, column: number, input: CellValue[][], endRow?: number,
|
120
|
+
endColumn?: number, source?: string, method?: 'shift_down' | 'shift_right' | 'overwrite'): void;
|
121
121
|
propToCol(prop: string | number): string | number;
|
122
122
|
redo(): void;
|
123
123
|
refreshDimensions(): void;
|
124
|
-
removeCellMeta(row: number,
|
124
|
+
removeCellMeta(row: number, column: number, key: (keyof CellMeta) | string): void;
|
125
125
|
removeHook<K extends keyof Events>(key: K, callback: Events[K]): void;
|
126
126
|
render(): void;
|
127
127
|
renderCall: boolean;
|
@@ -136,21 +136,21 @@ export default class Core {
|
|
136
136
|
scrollViewportTo(row?: number, column?: number, snapToBottom?: boolean, snapToRight?: boolean, considerHiddenIndexes?: boolean): boolean;
|
137
137
|
scrollToFocusedCell(callback?: () => void): void;
|
138
138
|
selectAll(includeRowHeaders?: boolean, includeColumnHeaders?: boolean, options?: { focusPosition?: { row: number, col: number }, disableHeadersHighlight?: boolean }): void;
|
139
|
-
selectCell(row: number,
|
139
|
+
selectCell(row: number, column: number, endRow?: number, endColumn?: number, scrollToCell?: boolean, changeListener?: boolean): boolean;
|
140
140
|
selectCellByProp(row: number, prop: string, endRow?: number, endProp?: string, scrollToCell?: boolean): boolean;
|
141
141
|
selectCells(coords: Array<[number, number | string, number, number | string]> | CellRange[], scrollToCell?: boolean, changeListener?: boolean): boolean;
|
142
142
|
selectColumns(startColumn: number | string, endColumn?: number | string, focusPosition?: number): boolean;
|
143
143
|
selectRows(startRow: number, endRow?: number, focusPosition?: number): boolean;
|
144
|
-
setCellMeta(row: number,
|
145
|
-
setCellMeta<K extends keyof CellMeta>(row: number,
|
146
|
-
setCellMetaObject(row: number,
|
144
|
+
setCellMeta(row: number, column: number, key: string, val: any): void;
|
145
|
+
setCellMeta<K extends keyof CellMeta>(row: number, column: number, key: K, val: CellMeta[K]): void;
|
146
|
+
setCellMetaObject(row: number, column: number, prop: CellMeta): void;
|
147
147
|
setDataAtCell(changes: Array<[number, number, CellValue]>, source?: string): void;
|
148
|
-
setDataAtCell(row: number,
|
148
|
+
setDataAtCell(row: number, column: number, value: CellValue, source?: string): void;
|
149
149
|
setDataAtRowProp(changes: Array<[number, string | number, CellValue]>, source?: string): void;
|
150
150
|
setDataAtRowProp(row: number, prop: string, value: CellValue, source?: string): void;
|
151
151
|
setSourceDataAtCell(changes: Array<[number, string | number, CellValue]>, source?: string): void;
|
152
152
|
setSourceDataAtCell(row: number, column: number | string, value: CellValue, source?: string): void;
|
153
|
-
spliceCol(
|
153
|
+
spliceCol(column: number, index: number, amount: number, ...elements: CellValue[]): void;
|
154
154
|
spliceRow(row: number, index: number, amount: number, ...elements: CellValue[]): void;
|
155
155
|
suspendExecution(): void;
|
156
156
|
suspendRender(): void;
|
package/core.js
CHANGED
@@ -254,7 +254,6 @@ function Core(rootElement, userSettings) {
|
|
254
254
|
if (!this.rootElement.id || this.rootElement.id.substring(0, 3) === 'ht_') {
|
255
255
|
this.rootElement.id = this.guid; // if root element does not have an id, assign a random id
|
256
256
|
}
|
257
|
-
|
258
257
|
const visualToRenderableCoords = coords => {
|
259
258
|
const {
|
260
259
|
row: visualRow,
|
@@ -274,7 +273,6 @@ function Core(rootElement, userSettings) {
|
|
274
273
|
renderableRow >= 0 ? instance.rowIndexMapper.getVisualFromRenderableIndex(renderableRow) : renderableRow, renderableColumn >= 0 ? instance.columnIndexMapper.getVisualFromRenderableIndex(renderableColumn) : renderableColumn // eslint-disable-line max-len
|
275
274
|
);
|
276
275
|
};
|
277
|
-
|
278
276
|
let selection = new _selection.Selection(tableMeta, {
|
279
277
|
rowIndexMapper: instance.rowIndexMapper,
|
280
278
|
columnIndexMapper: instance.columnIndexMapper,
|
@@ -577,7 +575,6 @@ function Core(rootElement, userSettings) {
|
|
577
575
|
instance._refreshBorders(); // it will call render and prepare methods
|
578
576
|
}
|
579
577
|
}
|
580
|
-
|
581
578
|
break;
|
582
579
|
case 'insert_col_start':
|
583
580
|
case 'insert_col_end':
|
@@ -600,7 +597,6 @@ function Core(rootElement, userSettings) {
|
|
600
597
|
spliceArray.length += colDelta; // inserts empty (undefined) elements at the end of an array
|
601
598
|
Array.prototype.splice.apply(tableMeta.colHeaders, spliceArray); // inserts empty (undefined) elements into the colHeader array
|
602
599
|
}
|
603
|
-
|
604
600
|
const currentSelectedRange = selection.selectedRange.current();
|
605
601
|
const currentFromRange = currentSelectedRange === null || currentSelectedRange === void 0 ? void 0 : currentSelectedRange.from;
|
606
602
|
const currentFromColumn = currentFromRange === null || currentFromRange === void 0 ? void 0 : currentFromRange.col;
|
@@ -634,7 +630,6 @@ function Core(rootElement, userSettings) {
|
|
634
630
|
instance._refreshBorders(); // it will call render and prepare methods
|
635
631
|
}
|
636
632
|
}
|
637
|
-
|
638
633
|
break;
|
639
634
|
case 'remove_row':
|
640
635
|
const removeRow = indexes => {
|
@@ -730,7 +725,6 @@ function Core(rootElement, userSettings) {
|
|
730
725
|
grid.adjustRowsAndCols(); // makes sure that we did not add rows that will be removed in next refresh
|
731
726
|
}
|
732
727
|
},
|
733
|
-
|
734
728
|
/**
|
735
729
|
* Makes sure there are empty rows at the bottom of the table.
|
736
730
|
*
|
@@ -841,7 +835,13 @@ function Core(rootElement, userSettings) {
|
|
841
835
|
}
|
842
836
|
}
|
843
837
|
if (selectionChanged) {
|
844
|
-
|
838
|
+
if (fromCol < 0) {
|
839
|
+
instance.selectRows(fromRow, toRow, fromCol);
|
840
|
+
} else if (fromRow < 0) {
|
841
|
+
instance.selectColumns(fromCol, toCol, fromRow);
|
842
|
+
} else {
|
843
|
+
instance.selectCell(fromRow, fromCol, toRow, toCol);
|
844
|
+
}
|
845
845
|
}
|
846
846
|
});
|
847
847
|
}
|
@@ -1186,7 +1186,6 @@ function Core(rootElement, userSettings) {
|
|
1186
1186
|
}
|
1187
1187
|
callback(isValid); // called when async validators are resolved and beforeChange was not async
|
1188
1188
|
};
|
1189
|
-
|
1190
1189
|
for (let i = changes.length - 1; i >= 0; i--) {
|
1191
1190
|
const [row, prop,, newValue] = changes[i];
|
1192
1191
|
const col = datamap.propToCol(prop);
|
@@ -1456,7 +1455,6 @@ function Core(rootElement, userSettings) {
|
|
1456
1455
|
if (typeof input[i][1] !== 'number') {
|
1457
1456
|
throw new Error('Method `setDataAtCell` accepts row and column number as its parameters. If you want to use object property name, use method `setDataAtRowProp`'); // eslint-disable-line max-len
|
1458
1457
|
}
|
1459
|
-
|
1460
1458
|
if (input[i][1] >= this.countCols()) {
|
1461
1459
|
prop = input[i][1];
|
1462
1460
|
} else {
|
@@ -1587,7 +1585,6 @@ function Core(rootElement, userSettings) {
|
|
1587
1585
|
if (!(typeof input === 'object' && typeof input[0] === 'object')) {
|
1588
1586
|
throw new Error('populateFromArray parameter `input` must be an array of arrays'); // API changed in 0.9-beta2, let's check if you use it correctly
|
1589
1587
|
}
|
1590
|
-
|
1591
1588
|
const c = typeof endRow === 'number' ? instance._createCellCoords(endRow, endCol) : null;
|
1592
1589
|
return grid.populateFromArray(instance._createCellCoords(row, column), input, c, source, method);
|
1593
1590
|
};
|
@@ -3488,7 +3485,6 @@ function Core(rootElement, userSettings) {
|
|
3488
3485
|
} else if (tableMeta.colHeaders && typeof tableMeta.colHeaders !== 'string' && typeof tableMeta.colHeaders !== 'number') {
|
3489
3486
|
result = (0, _data.spreadsheetColumnLabel)(columnIndex); // see #1458
|
3490
3487
|
}
|
3491
|
-
|
3492
3488
|
result = instance.runHooks('modifyColumnHeaderValue', result, column, headerLevel);
|
3493
3489
|
return result;
|
3494
3490
|
};
|
@@ -4119,7 +4115,6 @@ function Core(rootElement, userSettings) {
|
|
4119
4115
|
};
|
4120
4116
|
/* eslint-enable prefer-rest-params */
|
4121
4117
|
}
|
4122
|
-
|
4123
4118
|
const {
|
4124
4119
|
row,
|
4125
4120
|
col,
|
package/core.mjs
CHANGED
@@ -249,7 +249,6 @@ export default function Core(rootElement, userSettings) {
|
|
249
249
|
if (!this.rootElement.id || this.rootElement.id.substring(0, 3) === 'ht_') {
|
250
250
|
this.rootElement.id = this.guid; // if root element does not have an id, assign a random id
|
251
251
|
}
|
252
|
-
|
253
252
|
const visualToRenderableCoords = coords => {
|
254
253
|
const {
|
255
254
|
row: visualRow,
|
@@ -269,7 +268,6 @@ export default function Core(rootElement, userSettings) {
|
|
269
268
|
renderableRow >= 0 ? instance.rowIndexMapper.getVisualFromRenderableIndex(renderableRow) : renderableRow, renderableColumn >= 0 ? instance.columnIndexMapper.getVisualFromRenderableIndex(renderableColumn) : renderableColumn // eslint-disable-line max-len
|
270
269
|
);
|
271
270
|
};
|
272
|
-
|
273
271
|
let selection = new Selection(tableMeta, {
|
274
272
|
rowIndexMapper: instance.rowIndexMapper,
|
275
273
|
columnIndexMapper: instance.columnIndexMapper,
|
@@ -572,7 +570,6 @@ export default function Core(rootElement, userSettings) {
|
|
572
570
|
instance._refreshBorders(); // it will call render and prepare methods
|
573
571
|
}
|
574
572
|
}
|
575
|
-
|
576
573
|
break;
|
577
574
|
case 'insert_col_start':
|
578
575
|
case 'insert_col_end':
|
@@ -595,7 +592,6 @@ export default function Core(rootElement, userSettings) {
|
|
595
592
|
spliceArray.length += colDelta; // inserts empty (undefined) elements at the end of an array
|
596
593
|
Array.prototype.splice.apply(tableMeta.colHeaders, spliceArray); // inserts empty (undefined) elements into the colHeader array
|
597
594
|
}
|
598
|
-
|
599
595
|
const currentSelectedRange = selection.selectedRange.current();
|
600
596
|
const currentFromRange = currentSelectedRange === null || currentSelectedRange === void 0 ? void 0 : currentSelectedRange.from;
|
601
597
|
const currentFromColumn = currentFromRange === null || currentFromRange === void 0 ? void 0 : currentFromRange.col;
|
@@ -629,7 +625,6 @@ export default function Core(rootElement, userSettings) {
|
|
629
625
|
instance._refreshBorders(); // it will call render and prepare methods
|
630
626
|
}
|
631
627
|
}
|
632
|
-
|
633
628
|
break;
|
634
629
|
case 'remove_row':
|
635
630
|
const removeRow = indexes => {
|
@@ -725,7 +720,6 @@ export default function Core(rootElement, userSettings) {
|
|
725
720
|
grid.adjustRowsAndCols(); // makes sure that we did not add rows that will be removed in next refresh
|
726
721
|
}
|
727
722
|
},
|
728
|
-
|
729
723
|
/**
|
730
724
|
* Makes sure there are empty rows at the bottom of the table.
|
731
725
|
*
|
@@ -836,7 +830,13 @@ export default function Core(rootElement, userSettings) {
|
|
836
830
|
}
|
837
831
|
}
|
838
832
|
if (selectionChanged) {
|
839
|
-
|
833
|
+
if (fromCol < 0) {
|
834
|
+
instance.selectRows(fromRow, toRow, fromCol);
|
835
|
+
} else if (fromRow < 0) {
|
836
|
+
instance.selectColumns(fromCol, toCol, fromRow);
|
837
|
+
} else {
|
838
|
+
instance.selectCell(fromRow, fromCol, toRow, toCol);
|
839
|
+
}
|
840
840
|
}
|
841
841
|
});
|
842
842
|
}
|
@@ -1181,7 +1181,6 @@ export default function Core(rootElement, userSettings) {
|
|
1181
1181
|
}
|
1182
1182
|
callback(isValid); // called when async validators are resolved and beforeChange was not async
|
1183
1183
|
};
|
1184
|
-
|
1185
1184
|
for (let i = changes.length - 1; i >= 0; i--) {
|
1186
1185
|
const [row, prop,, newValue] = changes[i];
|
1187
1186
|
const col = datamap.propToCol(prop);
|
@@ -1451,7 +1450,6 @@ export default function Core(rootElement, userSettings) {
|
|
1451
1450
|
if (typeof input[i][1] !== 'number') {
|
1452
1451
|
throw new Error('Method `setDataAtCell` accepts row and column number as its parameters. If you want to use object property name, use method `setDataAtRowProp`'); // eslint-disable-line max-len
|
1453
1452
|
}
|
1454
|
-
|
1455
1453
|
if (input[i][1] >= this.countCols()) {
|
1456
1454
|
prop = input[i][1];
|
1457
1455
|
} else {
|
@@ -1582,7 +1580,6 @@ export default function Core(rootElement, userSettings) {
|
|
1582
1580
|
if (!(typeof input === 'object' && typeof input[0] === 'object')) {
|
1583
1581
|
throw new Error('populateFromArray parameter `input` must be an array of arrays'); // API changed in 0.9-beta2, let's check if you use it correctly
|
1584
1582
|
}
|
1585
|
-
|
1586
1583
|
const c = typeof endRow === 'number' ? instance._createCellCoords(endRow, endCol) : null;
|
1587
1584
|
return grid.populateFromArray(instance._createCellCoords(row, column), input, c, source, method);
|
1588
1585
|
};
|
@@ -3483,7 +3480,6 @@ export default function Core(rootElement, userSettings) {
|
|
3483
3480
|
} else if (tableMeta.colHeaders && typeof tableMeta.colHeaders !== 'string' && typeof tableMeta.colHeaders !== 'number') {
|
3484
3481
|
result = spreadsheetColumnLabel(columnIndex); // see #1458
|
3485
3482
|
}
|
3486
|
-
|
3487
3483
|
result = instance.runHooks('modifyColumnHeaderValue', result, column, headerLevel);
|
3488
3484
|
return result;
|
3489
3485
|
};
|
@@ -4114,7 +4110,6 @@ export default function Core(rootElement, userSettings) {
|
|
4114
4110
|
};
|
4115
4111
|
/* eslint-enable prefer-rest-params */
|
4116
4112
|
}
|
4117
|
-
|
4118
4113
|
const {
|
4119
4114
|
row,
|
4120
4115
|
col,
|
package/dataMap/dataMap.js
CHANGED
@@ -10,8 +10,8 @@ var _array = require("../helpers/array");
|
|
10
10
|
var _number = require("../helpers/number");
|
11
11
|
var _mixed = require("../helpers/mixed");
|
12
12
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
13
|
-
function _toPropertyKey(
|
14
|
-
function _toPrimitive(
|
13
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
14
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
15
15
|
/*
|
16
16
|
This class contains open-source contributions covered by the MIT license.
|
17
17
|
|
@@ -33,6 +33,7 @@ The above copyright notice and this permission notice shall be included in all c
|
|
33
33
|
|
34
34
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
35
35
|
*/
|
36
|
+
|
36
37
|
/**
|
37
38
|
* Utility class that gets and saves data from/to the data source using mapping of columns numbers to object property names.
|
38
39
|
*
|
package/dataMap/dataMap.mjs
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
import "core-js/modules/es.error.cause.js";
|
2
2
|
import "core-js/modules/es.array.push.js";
|
3
3
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
4
|
-
function _toPropertyKey(
|
5
|
-
function _toPrimitive(
|
4
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
5
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
6
6
|
import { stringify } from "../3rdparty/SheetClip/index.mjs";
|
7
7
|
import { countFirstRowKeys } from "../helpers/data.mjs";
|
8
8
|
import { createObjectPropListener, deepClone, deepExtend, deepObjectSize, duckSchema, hasOwnProperty, isObject, objectEach } from "../helpers/object.mjs";
|
package/dataMap/dataSource.js
CHANGED
@@ -9,8 +9,8 @@ var _array = require("../helpers/array");
|
|
9
9
|
var _number = require("../helpers/number");
|
10
10
|
var _function = require("../helpers/function");
|
11
11
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
12
|
-
function _toPropertyKey(
|
13
|
-
function _toPrimitive(
|
12
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
13
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
14
14
|
/**
|
15
15
|
* @class DataSource
|
16
16
|
* @private
|
package/dataMap/dataSource.mjs
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
import "core-js/modules/es.array.push.js";
|
2
2
|
import "core-js/modules/es.error.cause.js";
|
3
3
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
4
|
-
function _toPropertyKey(
|
5
|
-
function _toPrimitive(
|
4
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
5
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
6
6
|
import { createObjectPropListener, getProperty, isObject, objectEach, setProperty } from "../helpers/object.mjs";
|
7
7
|
import { countFirstRowKeys } from "../helpers/data.mjs";
|
8
8
|
import { arrayEach } from "../helpers/array.mjs";
|
@@ -7,8 +7,8 @@ var _array = require("../../helpers/array");
|
|
7
7
|
var _utils = require("./utils");
|
8
8
|
let _Symbol$iterator;
|
9
9
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
10
|
-
function _toPropertyKey(
|
11
|
-
function _toPrimitive(
|
10
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
11
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
12
12
|
/* eslint-disable jsdoc/require-description-complete-sentence */
|
13
13
|
/**
|
14
14
|
* @class LazyFactoryMap
|
@@ -2,8 +2,8 @@ import "core-js/modules/es.error.cause.js";
|
|
2
2
|
let _Symbol$iterator;
|
3
3
|
import "core-js/modules/es.array.push.js";
|
4
4
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
5
|
-
function _toPropertyKey(
|
6
|
-
function _toPrimitive(
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
6
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
7
7
|
import { arrayFilter } from "../../helpers/array.mjs";
|
8
8
|
import { assert, isUnsignedNumber, isNullish } from "./utils.mjs";
|
9
9
|
/* eslint-disable jsdoc/require-description-complete-sentence */
|
@@ -8,8 +8,8 @@ var _utils = require("../utils");
|
|
8
8
|
var _lazyFactoryMap = _interopRequireDefault(require("../lazyFactoryMap"));
|
9
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
10
10
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
11
|
-
function _toPropertyKey(
|
12
|
-
function _toPrimitive(
|
11
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
12
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
13
13
|
/* eslint-disable jsdoc/require-description-complete-sentence */
|
14
14
|
/**
|
15
15
|
* @class CellMeta
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import "core-js/modules/es.array.push.js";
|
2
2
|
import "core-js/modules/es.error.cause.js";
|
3
3
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
4
|
-
function _toPropertyKey(
|
5
|
-
function _toPrimitive(
|
4
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
5
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
6
6
|
import { extend } from "../../../helpers/object.mjs";
|
7
7
|
import { extendByMetaType, assert, isUnsignedNumber } from "../utils.mjs";
|
8
8
|
import LazyFactoryMap from "../lazyFactoryMap.mjs";
|