handsontable 12.2.0 → 12.3.0-next-9dc4f5d-20221209
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/border.js +13 -6
- package/3rdparty/walkontable/src/border.mjs +12 -5
- package/3rdparty/walkontable/src/calculator/viewportColumns.js +10 -1
- package/3rdparty/walkontable/src/calculator/viewportColumns.mjs +10 -1
- package/3rdparty/walkontable/src/calculator/viewportRows.js +10 -1
- package/3rdparty/walkontable/src/calculator/viewportRows.mjs +10 -1
- package/3rdparty/walkontable/src/cell/coords.d.ts +1 -1
- package/3rdparty/walkontable/src/cell/coords.js +64 -26
- package/3rdparty/walkontable/src/cell/coords.mjs +64 -26
- package/3rdparty/walkontable/src/cell/range.d.ts +19 -16
- package/3rdparty/walkontable/src/cell/range.js +199 -104
- package/3rdparty/walkontable/src/cell/range.mjs +201 -106
- package/3rdparty/walkontable/src/core/_base.js +17 -3
- package/3rdparty/walkontable/src/core/_base.mjs +20 -6
- package/3rdparty/walkontable/src/core/clone.js +13 -7
- package/3rdparty/walkontable/src/core/clone.mjs +15 -9
- package/3rdparty/walkontable/src/core/core.js +8 -2
- package/3rdparty/walkontable/src/core/core.mjs +10 -4
- package/3rdparty/walkontable/src/event.js +10 -1
- package/3rdparty/walkontable/src/event.mjs +10 -1
- package/3rdparty/walkontable/src/facade/core.js +16 -2
- package/3rdparty/walkontable/src/facade/core.mjs +22 -8
- package/3rdparty/walkontable/src/filter/column.js +16 -2
- package/3rdparty/walkontable/src/filter/column.mjs +16 -2
- package/3rdparty/walkontable/src/filter/row.js +16 -2
- package/3rdparty/walkontable/src/filter/row.mjs +16 -2
- package/3rdparty/walkontable/src/overlay/_base.js +17 -3
- package/3rdparty/walkontable/src/overlay/_base.mjs +24 -10
- package/3rdparty/walkontable/src/overlay/bottom.js +13 -7
- package/3rdparty/walkontable/src/overlay/bottom.mjs +15 -9
- package/3rdparty/walkontable/src/overlay/bottomInlineStartCorner.js +8 -2
- package/3rdparty/walkontable/src/overlay/bottomInlineStartCorner.mjs +10 -4
- package/3rdparty/walkontable/src/overlay/inlineStart.js +8 -2
- package/3rdparty/walkontable/src/overlay/inlineStart.mjs +10 -4
- package/3rdparty/walkontable/src/overlay/top.js +13 -7
- package/3rdparty/walkontable/src/overlay/top.mjs +15 -9
- package/3rdparty/walkontable/src/overlay/topInlineStartCorner.js +13 -7
- package/3rdparty/walkontable/src/overlay/topInlineStartCorner.mjs +15 -9
- package/3rdparty/walkontable/src/overlays.js +69 -19
- package/3rdparty/walkontable/src/overlays.mjs +71 -21
- package/3rdparty/walkontable/src/renderer/_base.js +16 -2
- package/3rdparty/walkontable/src/renderer/_base.mjs +20 -6
- package/3rdparty/walkontable/src/renderer/cells.js +8 -2
- package/3rdparty/walkontable/src/renderer/cells.mjs +20 -14
- package/3rdparty/walkontable/src/renderer/colGroup.js +8 -2
- package/3rdparty/walkontable/src/renderer/colGroup.mjs +19 -13
- package/3rdparty/walkontable/src/renderer/columnHeaders.js +8 -2
- package/3rdparty/walkontable/src/renderer/columnHeaders.mjs +19 -13
- package/3rdparty/walkontable/src/renderer/index.js +16 -2
- package/3rdparty/walkontable/src/renderer/index.mjs +20 -6
- package/3rdparty/walkontable/src/renderer/rowHeaders.js +8 -2
- package/3rdparty/walkontable/src/renderer/rowHeaders.mjs +20 -14
- package/3rdparty/walkontable/src/renderer/rows.js +8 -3
- package/3rdparty/walkontable/src/renderer/rows.mjs +8 -3
- package/3rdparty/walkontable/src/renderer/table.js +16 -2
- package/3rdparty/walkontable/src/renderer/table.mjs +16 -2
- package/3rdparty/walkontable/src/scroll.js +16 -3
- package/3rdparty/walkontable/src/scroll.mjs +18 -5
- package/3rdparty/walkontable/src/selection.js +11 -5
- package/3rdparty/walkontable/src/selection.mjs +11 -5
- package/3rdparty/walkontable/src/settings.js +16 -2
- package/3rdparty/walkontable/src/settings.mjs +16 -2
- package/3rdparty/walkontable/src/table/bottom.js +8 -2
- package/3rdparty/walkontable/src/table/bottom.mjs +13 -7
- package/3rdparty/walkontable/src/table/bottomInlineStartCorner.js +8 -2
- package/3rdparty/walkontable/src/table/bottomInlineStartCorner.mjs +14 -8
- package/3rdparty/walkontable/src/table/inlineStart.js +8 -2
- package/3rdparty/walkontable/src/table/inlineStart.mjs +10 -4
- package/3rdparty/walkontable/src/table/master.js +8 -2
- package/3rdparty/walkontable/src/table/master.mjs +13 -7
- package/3rdparty/walkontable/src/table/mixin/calculatedColumns.js +12 -6
- package/3rdparty/walkontable/src/table/mixin/calculatedColumns.mjs +12 -6
- package/3rdparty/walkontable/src/table/mixin/calculatedRows.js +12 -6
- package/3rdparty/walkontable/src/table/mixin/calculatedRows.mjs +12 -6
- package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.js +12 -6
- package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.mjs +12 -6
- package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.js +12 -6
- package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.mjs +12 -6
- package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.js +12 -6
- package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.mjs +12 -6
- package/3rdparty/walkontable/src/table/top.js +8 -2
- package/3rdparty/walkontable/src/table/top.mjs +13 -7
- package/3rdparty/walkontable/src/table/topInlineStartCorner.js +8 -2
- package/3rdparty/walkontable/src/table/topInlineStartCorner.mjs +14 -8
- package/3rdparty/walkontable/src/table.js +13 -6
- package/3rdparty/walkontable/src/table.mjs +21 -14
- package/3rdparty/walkontable/src/utils/column.js +12 -2
- package/3rdparty/walkontable/src/utils/column.mjs +16 -6
- package/3rdparty/walkontable/src/utils/nodesPool.js +16 -2
- package/3rdparty/walkontable/src/utils/nodesPool.mjs +16 -2
- package/3rdparty/walkontable/src/utils/orderView/sharedView.js +8 -2
- package/3rdparty/walkontable/src/utils/orderView/sharedView.mjs +12 -6
- package/3rdparty/walkontable/src/utils/orderView/view.js +16 -2
- package/3rdparty/walkontable/src/utils/orderView/view.mjs +23 -9
- package/3rdparty/walkontable/src/utils/orderView/viewSize.js +16 -2
- package/3rdparty/walkontable/src/utils/orderView/viewSize.mjs +16 -2
- package/3rdparty/walkontable/src/utils/orderView/viewSizeSet.js +16 -2
- package/3rdparty/walkontable/src/utils/orderView/viewSizeSet.mjs +31 -17
- package/3rdparty/walkontable/src/utils/row.js +16 -2
- package/3rdparty/walkontable/src/utils/row.mjs +16 -2
- package/3rdparty/walkontable/src/viewport.js +16 -2
- package/3rdparty/walkontable/src/viewport.mjs +18 -4
- package/CHANGELOG.md +23 -0
- package/base.d.ts +1 -0
- package/base.js +7 -2
- package/base.mjs +9 -4
- package/cellTypes/index.mjs +4 -3
- package/core.d.ts +1 -1
- package/core.js +234 -122
- package/core.mjs +231 -119
- package/dataMap/dataMap.js +98 -28
- package/dataMap/dataMap.mjs +97 -27
- package/dataMap/dataSource.js +14 -2
- package/dataMap/dataSource.mjs +17 -5
- package/dataMap/metaManager/index.js +15 -2
- package/dataMap/metaManager/index.mjs +41 -28
- package/dataMap/metaManager/lazyFactoryMap.js +7 -1
- package/dataMap/metaManager/lazyFactoryMap.mjs +7 -1
- package/dataMap/metaManager/metaLayers/cellMeta.js +13 -8
- package/dataMap/metaManager/metaLayers/cellMeta.mjs +12 -7
- package/dataMap/metaManager/metaLayers/columnMeta.js +15 -2
- package/dataMap/metaManager/metaLayers/columnMeta.mjs +23 -9
- package/dataMap/metaManager/metaLayers/globalMeta.js +26 -2
- package/dataMap/metaManager/metaLayers/globalMeta.mjs +27 -3
- package/dataMap/metaManager/metaLayers/tableMeta.js +17 -3
- package/dataMap/metaManager/metaLayers/tableMeta.mjs +41 -27
- package/dataMap/metaManager/metaSchema.js +119 -66
- package/dataMap/metaManager/metaSchema.mjs +119 -66
- package/dataMap/metaManager/mods/dynamicCellMeta.js +12 -2
- package/dataMap/metaManager/mods/dynamicCellMeta.mjs +26 -16
- package/dataMap/metaManager/mods/extendMetaProperties.js +12 -2
- package/dataMap/metaManager/mods/extendMetaProperties.mjs +10 -1
- package/dataMap/metaManager/utils.js +44 -14
- package/dataMap/metaManager/utils.mjs +51 -20
- package/dataMap/replaceData.js +2 -1
- package/dataMap/replaceData.mjs +24 -22
- package/dist/handsontable.css +9 -9
- package/dist/handsontable.full.css +9 -9
- package/dist/handsontable.full.js +7350 -10885
- package/dist/handsontable.full.min.css +2 -2
- package/dist/handsontable.full.min.js +107 -113
- package/dist/handsontable.js +5800 -4499
- package/dist/handsontable.min.css +2 -2
- package/dist/handsontable.min.js +3 -3
- package/dist/languages/all.js +111 -65
- package/dist/languages/all.min.js +1 -1
- package/dist/languages/ar-AR.js +50 -4
- package/dist/languages/ar-AR.min.js +1 -1
- package/dist/languages/cs-CZ.js +52 -6
- package/dist/languages/cs-CZ.min.js +1 -1
- package/dist/languages/de-CH.js +52 -6
- package/dist/languages/de-CH.min.js +1 -1
- package/dist/languages/de-DE.js +53 -7
- package/dist/languages/de-DE.min.js +1 -1
- package/dist/languages/en-US.js +56 -10
- package/dist/languages/en-US.min.js +1 -1
- package/dist/languages/es-MX.js +56 -10
- package/dist/languages/es-MX.min.js +1 -1
- package/dist/languages/fr-FR.js +55 -9
- package/dist/languages/fr-FR.min.js +1 -1
- package/dist/languages/it-IT.js +55 -9
- package/dist/languages/it-IT.min.js +1 -1
- package/dist/languages/ja-JP.js +83 -33
- package/dist/languages/ja-JP.min.js +1 -1
- package/dist/languages/ko-KR.js +84 -33
- package/dist/languages/ko-KR.min.js +1 -1
- package/dist/languages/lv-LV.js +85 -33
- package/dist/languages/lv-LV.min.js +1 -1
- package/dist/languages/nb-NO.js +86 -33
- package/dist/languages/nb-NO.min.js +1 -1
- package/dist/languages/nl-NL.js +87 -33
- package/dist/languages/nl-NL.min.js +1 -1
- package/dist/languages/pl-PL.js +88 -33
- package/dist/languages/pl-PL.min.js +1 -1
- package/dist/languages/pt-BR.js +68 -19
- package/dist/languages/pt-BR.min.js +1 -1
- package/dist/languages/ru-RU.js +68 -19
- package/dist/languages/ru-RU.min.js +1 -1
- package/dist/languages/sr-SP.js +55 -6
- package/dist/languages/sr-SP.min.js +1 -1
- package/dist/languages/zh-CN.js +55 -6
- package/dist/languages/zh-CN.min.js +1 -1
- package/dist/languages/zh-TW.js +55 -6
- package/dist/languages/zh-TW.min.js +1 -1
- package/editorManager.js +18 -9
- package/editorManager.mjs +15 -6
- package/editors/autocompleteEditor/autocompleteEditor.js +10 -5
- package/editors/autocompleteEditor/autocompleteEditor.mjs +9 -4
- package/editors/baseEditor/baseEditor.js +11 -6
- package/editors/baseEditor/baseEditor.mjs +10 -5
- package/editors/checkboxEditor/checkboxEditor.js +6 -1
- package/editors/checkboxEditor/checkboxEditor.mjs +6 -1
- package/editors/dateEditor/dateEditor.js +6 -1
- package/editors/dateEditor/dateEditor.mjs +6 -1
- package/editors/dropdownEditor/dropdownEditor.js +6 -1
- package/editors/dropdownEditor/dropdownEditor.mjs +6 -1
- package/editors/handsontableEditor/handsontableEditor.js +6 -1
- package/editors/handsontableEditor/handsontableEditor.mjs +6 -1
- package/editors/index.mjs +4 -3
- package/editors/numericEditor/numericEditor.js +6 -1
- package/editors/numericEditor/numericEditor.mjs +6 -1
- package/editors/passwordEditor/passwordEditor.js +6 -1
- package/editors/passwordEditor/passwordEditor.mjs +6 -1
- package/editors/registry.js +3 -0
- package/editors/registry.mjs +5 -1
- package/editors/selectEditor/selectEditor.js +6 -1
- package/editors/selectEditor/selectEditor.mjs +6 -1
- package/editors/textEditor/caretPositioner.mjs +11 -10
- package/editors/textEditor/textEditor.js +7 -2
- package/editors/textEditor/textEditor.mjs +7 -2
- package/editors/timeEditor/timeEditor.js +6 -1
- package/editors/timeEditor/timeEditor.mjs +6 -1
- package/eventManager.js +24 -9
- package/eventManager.mjs +26 -11
- package/helpers/console.mjs +6 -5
- package/helpers/data.d.ts +0 -1
- package/helpers/data.js +0 -49
- package/helpers/data.mjs +1 -49
- package/helpers/dom/element.js +23 -0
- package/helpers/dom/element.mjs +30 -7
- package/helpers/feature.js +9 -36
- package/helpers/feature.mjs +3 -30
- package/helpers/function.mjs +7 -6
- package/helpers/mixed.js +2 -2
- package/helpers/mixed.mjs +9 -8
- package/helpers/object.js +15 -9
- package/helpers/object.mjs +17 -10
- package/helpers/string.mjs +7 -6
- package/helpers/templateLiteralTag.mjs +8 -7
- package/i18n/constants.js +49 -42
- package/i18n/constants.mjs +45 -41
- package/i18n/languages/ar-AR.js +12 -7
- package/i18n/languages/ar-AR.mjs +16 -2
- package/i18n/languages/cs-CZ.js +12 -7
- package/i18n/languages/cs-CZ.mjs +16 -2
- package/i18n/languages/de-CH.js +12 -7
- package/i18n/languages/de-CH.mjs +16 -2
- package/i18n/languages/de-DE.js +12 -7
- package/i18n/languages/de-DE.mjs +16 -2
- package/i18n/languages/en-US.js +13 -8
- package/i18n/languages/en-US.mjs +17 -3
- package/i18n/languages/es-MX.js +13 -8
- package/i18n/languages/es-MX.mjs +19 -4
- package/i18n/languages/fr-FR.js +12 -7
- package/i18n/languages/fr-FR.mjs +16 -2
- package/i18n/languages/it-IT.js +12 -7
- package/i18n/languages/it-IT.mjs +16 -2
- package/i18n/languages/ja-JP.js +12 -7
- package/i18n/languages/ja-JP.mjs +16 -2
- package/i18n/languages/ko-KR.js +12 -7
- package/i18n/languages/ko-KR.mjs +16 -2
- package/i18n/languages/lv-LV.js +13 -8
- package/i18n/languages/lv-LV.mjs +19 -5
- package/i18n/languages/nb-NO.js +12 -7
- package/i18n/languages/nb-NO.mjs +16 -2
- package/i18n/languages/nl-NL.js +13 -8
- package/i18n/languages/nl-NL.mjs +19 -5
- package/i18n/languages/pl-PL.js +13 -8
- package/i18n/languages/pl-PL.mjs +18 -4
- package/i18n/languages/pt-BR.js +12 -7
- package/i18n/languages/pt-BR.mjs +16 -2
- package/i18n/languages/ru-RU.js +12 -7
- package/i18n/languages/ru-RU.mjs +16 -2
- package/i18n/languages/sr-SP.js +12 -7
- package/i18n/languages/sr-SP.mjs +16 -2
- package/i18n/languages/zh-CN.js +12 -7
- package/i18n/languages/zh-CN.mjs +16 -2
- package/i18n/languages/zh-TW.js +12 -7
- package/i18n/languages/zh-TW.mjs +16 -2
- package/i18n/phraseFormatters/substituteVariables.mjs +9 -8
- package/i18n/utils.mjs +10 -9
- package/index.d.ts +9 -0
- package/index.js +4 -2
- package/index.mjs +2 -1
- package/languages/all.js +111 -65
- package/languages/ar-AR.js +50 -4
- package/languages/ar-AR.mjs +16 -2
- package/languages/cs-CZ.js +52 -6
- package/languages/cs-CZ.mjs +16 -2
- package/languages/de-CH.js +52 -6
- package/languages/de-CH.mjs +16 -2
- package/languages/de-DE.js +53 -7
- package/languages/de-DE.mjs +16 -2
- package/languages/en-US.js +56 -10
- package/languages/en-US.mjs +17 -3
- package/languages/es-MX.js +56 -10
- package/languages/es-MX.mjs +19 -4
- package/languages/fr-FR.js +55 -9
- package/languages/fr-FR.mjs +16 -2
- package/languages/index.js +111 -65
- package/languages/it-IT.js +55 -9
- package/languages/it-IT.mjs +16 -2
- package/languages/ja-JP.js +83 -33
- package/languages/ja-JP.mjs +16 -2
- package/languages/ko-KR.js +84 -33
- package/languages/ko-KR.mjs +16 -2
- package/languages/lv-LV.js +85 -33
- package/languages/lv-LV.mjs +19 -5
- package/languages/nb-NO.js +86 -33
- package/languages/nb-NO.mjs +16 -2
- package/languages/nl-NL.js +87 -33
- package/languages/nl-NL.mjs +19 -5
- package/languages/pl-PL.js +88 -33
- package/languages/pl-PL.mjs +18 -4
- package/languages/pt-BR.js +68 -19
- package/languages/pt-BR.mjs +16 -2
- package/languages/ru-RU.js +68 -19
- package/languages/ru-RU.mjs +16 -2
- package/languages/sr-SP.js +55 -6
- package/languages/sr-SP.mjs +16 -2
- package/languages/zh-CN.js +55 -6
- package/languages/zh-CN.mjs +16 -2
- package/languages/zh-TW.js +55 -6
- package/languages/zh-TW.mjs +16 -2
- package/mixins/hooksRefRegisterer.js +6 -3
- package/mixins/hooksRefRegisterer.mjs +6 -3
- package/mixins/localHooks.js +6 -3
- package/mixins/localHooks.mjs +6 -3
- package/package.json +2 -2
- package/pluginHooks.d.ts +7 -2
- package/pluginHooks.js +109 -24
- package/pluginHooks.mjs +109 -24
- package/plugins/autoColumnSize/autoColumnSize.js +7 -2
- package/plugins/autoColumnSize/autoColumnSize.mjs +7 -2
- package/plugins/autoRowSize/autoRowSize.js +16 -7
- package/plugins/autoRowSize/autoRowSize.mjs +16 -7
- package/plugins/autofill/autofill.js +7 -2
- package/plugins/autofill/autofill.mjs +7 -2
- package/plugins/base/base.js +8 -2
- package/plugins/base/base.mjs +8 -2
- package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.js +6 -1
- package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.mjs +6 -1
- package/plugins/bindRowsWithHeaders/maps/looseBindsMap.js +6 -1
- package/plugins/bindRowsWithHeaders/maps/looseBindsMap.mjs +6 -1
- package/plugins/bindRowsWithHeaders/maps/strictBindsMap.js +6 -1
- package/plugins/bindRowsWithHeaders/maps/strictBindsMap.mjs +6 -1
- package/plugins/collapsibleColumns/collapsibleColumns.js +10 -5
- package/plugins/collapsibleColumns/collapsibleColumns.mjs +9 -4
- package/plugins/columnSorting/columnSorting.js +8 -4
- package/plugins/columnSorting/columnSorting.mjs +8 -4
- package/plugins/columnSorting/columnStatesManager.js +12 -6
- package/plugins/columnSorting/columnStatesManager.mjs +9 -3
- package/plugins/columnSorting/rootComparator.mjs +8 -7
- package/plugins/columnSorting/sortFunction/checkbox.mjs +9 -8
- package/plugins/columnSorting/sortFunction/date.mjs +9 -8
- package/plugins/columnSorting/sortFunction/default.mjs +9 -8
- package/plugins/columnSorting/sortFunction/numeric.mjs +9 -8
- package/plugins/columnSummary/columnSummary.js +13 -8
- package/plugins/columnSummary/columnSummary.mjs +13 -8
- package/plugins/columnSummary/endpoints.js +17 -16
- package/plugins/columnSummary/endpoints.mjs +22 -21
- package/plugins/comments/commentEditor.js +16 -2
- package/plugins/comments/commentEditor.mjs +21 -7
- package/plugins/comments/comments.js +15 -4
- package/plugins/comments/comments.mjs +15 -4
- package/plugins/comments/displaySwitch.js +14 -1
- package/plugins/comments/displaySwitch.mjs +14 -1
- package/plugins/contextMenu/commandExecutor.js +22 -7
- package/plugins/contextMenu/commandExecutor.mjs +27 -12
- package/plugins/contextMenu/contextMenu.d.ts +4 -3
- package/plugins/contextMenu/contextMenu.js +7 -17
- package/plugins/contextMenu/contextMenu.mjs +7 -17
- package/plugins/contextMenu/cursor.js +16 -2
- package/plugins/contextMenu/cursor.mjs +21 -7
- package/plugins/contextMenu/itemsFactory.js +23 -8
- package/plugins/contextMenu/itemsFactory.mjs +28 -13
- package/plugins/contextMenu/menu.js +14 -3
- package/plugins/contextMenu/menu.mjs +13 -2
- package/plugins/contextMenu/predefinedItems/removeColumn.js +1 -1
- package/plugins/contextMenu/predefinedItems/removeColumn.mjs +1 -1
- package/plugins/contextMenu/predefinedItems/removeRow.js +1 -1
- package/plugins/contextMenu/predefinedItems/removeRow.mjs +1 -1
- package/plugins/contextMenu/predefinedItems.js +12 -7
- package/plugins/contextMenu/predefinedItems.mjs +14 -1
- package/plugins/contextMenu/utils.mjs +5 -4
- package/plugins/copyPaste/clipboardData.js +16 -2
- package/plugins/copyPaste/clipboardData.mjs +16 -2
- package/plugins/copyPaste/contextMenuItem/copy.js +4 -16
- package/plugins/copyPaste/contextMenuItem/copy.mjs +8 -7
- package/plugins/copyPaste/contextMenuItem/copyColumnHeadersOnly.js +35 -0
- package/plugins/copyPaste/contextMenuItem/copyColumnHeadersOnly.mjs +31 -0
- package/plugins/copyPaste/contextMenuItem/copyWithColumnGroupHeaders.js +35 -0
- package/plugins/copyPaste/contextMenuItem/copyWithColumnGroupHeaders.mjs +31 -0
- package/plugins/copyPaste/contextMenuItem/copyWithColumnHeaders.js +35 -0
- package/plugins/copyPaste/contextMenuItem/copyWithColumnHeaders.mjs +31 -0
- package/plugins/copyPaste/contextMenuItem/cut.mjs +5 -4
- package/plugins/copyPaste/copyPaste.d.ts +10 -2
- package/plugins/copyPaste/copyPaste.js +303 -202
- package/plugins/copyPaste/copyPaste.mjs +303 -202
- package/plugins/copyPaste/copyableRanges.js +269 -0
- package/plugins/copyPaste/copyableRanges.mjs +264 -0
- package/plugins/copyPaste/focusableElement.js +12 -2
- package/plugins/copyPaste/focusableElement.mjs +15 -5
- package/plugins/copyPaste/pasteEvent.js +16 -2
- package/plugins/copyPaste/pasteEvent.mjs +18 -4
- package/plugins/customBorders/contextMenuItem/bottom.mjs +5 -4
- package/plugins/customBorders/contextMenuItem/left.mjs +5 -4
- package/plugins/customBorders/contextMenuItem/noBorders.mjs +5 -4
- package/plugins/customBorders/contextMenuItem/right.mjs +5 -4
- package/plugins/customBorders/contextMenuItem/top.mjs +5 -4
- package/plugins/customBorders/customBorders.js +12 -7
- package/plugins/customBorders/customBorders.mjs +11 -6
- package/plugins/customBorders/utils.mjs +8 -7
- package/plugins/dragToScroll/dragToScroll.js +6 -1
- package/plugins/dragToScroll/dragToScroll.mjs +6 -1
- package/plugins/dropdownMenu/dropdownMenu.js +6 -1
- package/plugins/dropdownMenu/dropdownMenu.mjs +6 -1
- package/plugins/exportFile/dataProvider.js +13 -6
- package/plugins/exportFile/dataProvider.mjs +12 -5
- package/plugins/exportFile/exportFile.js +8 -3
- package/plugins/exportFile/exportFile.mjs +6 -1
- package/plugins/exportFile/typeFactory.js +14 -1
- package/plugins/exportFile/typeFactory.mjs +14 -1
- package/plugins/exportFile/types/_base.js +16 -2
- package/plugins/exportFile/types/_base.mjs +18 -4
- package/plugins/exportFile/types/csv.js +6 -1
- package/plugins/exportFile/types/csv.mjs +6 -1
- package/plugins/filters/component/_base.js +16 -2
- package/plugins/filters/component/_base.mjs +19 -5
- package/plugins/filters/component/actionBar.js +10 -4
- package/plugins/filters/component/actionBar.mjs +11 -5
- package/plugins/filters/component/condition.js +10 -4
- package/plugins/filters/component/condition.mjs +11 -5
- package/plugins/filters/component/operators.js +8 -3
- package/plugins/filters/component/operators.mjs +8 -3
- package/plugins/filters/component/value.js +9 -3
- package/plugins/filters/component/value.mjs +12 -6
- package/plugins/filters/condition/beginsWith.js +1 -1
- package/plugins/filters/condition/beginsWith.mjs +1 -1
- package/plugins/filters/condition/between.js +1 -1
- package/plugins/filters/condition/between.mjs +1 -1
- package/plugins/filters/condition/byValue.js +1 -1
- package/plugins/filters/condition/byValue.mjs +1 -1
- package/plugins/filters/condition/contains.js +1 -1
- package/plugins/filters/condition/contains.mjs +1 -1
- package/plugins/filters/condition/date/after.js +1 -1
- package/plugins/filters/condition/date/after.mjs +1 -1
- package/plugins/filters/condition/date/before.js +1 -1
- package/plugins/filters/condition/date/before.mjs +1 -1
- package/plugins/filters/condition/endsWith.js +1 -1
- package/plugins/filters/condition/endsWith.mjs +1 -1
- package/plugins/filters/condition/equal.js +1 -1
- package/plugins/filters/condition/equal.mjs +1 -1
- package/plugins/filters/condition/greaterThan.js +1 -1
- package/plugins/filters/condition/greaterThan.mjs +1 -1
- package/plugins/filters/condition/greaterThanOrEqual.js +1 -1
- package/plugins/filters/condition/greaterThanOrEqual.mjs +1 -1
- package/plugins/filters/condition/lessThan.js +1 -1
- package/plugins/filters/condition/lessThan.mjs +1 -1
- package/plugins/filters/condition/lessThanOrEqual.js +1 -1
- package/plugins/filters/condition/lessThanOrEqual.mjs +1 -1
- package/plugins/filters/conditionCollection.js +10 -4
- package/plugins/filters/conditionCollection.mjs +18 -12
- package/plugins/filters/conditionUpdateObserver.js +15 -2
- package/plugins/filters/conditionUpdateObserver.mjs +23 -10
- package/plugins/filters/constants.js +14 -1
- package/plugins/filters/constants.mjs +14 -1
- package/plugins/filters/dataFilter.js +16 -2
- package/plugins/filters/dataFilter.mjs +19 -5
- package/plugins/filters/filters.js +7 -2
- package/plugins/filters/filters.mjs +7 -2
- package/plugins/filters/ui/_base.js +12 -7
- package/plugins/filters/ui/_base.mjs +14 -1
- package/plugins/filters/ui/input.js +6 -1
- package/plugins/filters/ui/input.mjs +6 -1
- package/plugins/filters/ui/link.js +6 -1
- package/plugins/filters/ui/link.mjs +6 -1
- package/plugins/filters/ui/multipleSelect.js +14 -8
- package/plugins/filters/ui/multipleSelect.mjs +6 -1
- package/plugins/filters/ui/radioInput.js +6 -1
- package/plugins/filters/ui/radioInput.mjs +6 -1
- package/plugins/filters/ui/select.js +6 -1
- package/plugins/filters/ui/select.mjs +6 -1
- package/plugins/formulas/engine/register.mjs +6 -5
- package/plugins/formulas/engine/settings.js +12 -1
- package/plugins/formulas/engine/settings.mjs +12 -1
- package/plugins/formulas/formulas.js +24 -11
- package/plugins/formulas/formulas.mjs +24 -11
- package/plugins/hiddenColumns/contextMenuItem/hideColumn.js +1 -1
- package/plugins/hiddenColumns/contextMenuItem/hideColumn.mjs +6 -5
- package/plugins/hiddenColumns/contextMenuItem/showColumn.mjs +5 -4
- package/plugins/hiddenColumns/hiddenColumns.js +5 -1
- package/plugins/hiddenColumns/hiddenColumns.mjs +5 -1
- package/plugins/hiddenRows/contextMenuItem/hideRow.js +1 -1
- package/plugins/hiddenRows/contextMenuItem/hideRow.mjs +6 -5
- package/plugins/hiddenRows/contextMenuItem/showRow.mjs +5 -4
- package/plugins/hiddenRows/hiddenRows.js +5 -1
- package/plugins/hiddenRows/hiddenRows.mjs +5 -1
- package/plugins/index.mjs +4 -3
- package/plugins/manualColumnFreeze/contextMenuItem/freezeColumn.js +1 -1
- package/plugins/manualColumnFreeze/contextMenuItem/freezeColumn.mjs +6 -5
- package/plugins/manualColumnFreeze/contextMenuItem/unfreezeColumn.js +1 -1
- package/plugins/manualColumnFreeze/contextMenuItem/unfreezeColumn.mjs +6 -5
- package/plugins/manualColumnFreeze/manualColumnFreeze.js +6 -1
- package/plugins/manualColumnFreeze/manualColumnFreeze.mjs +6 -1
- package/plugins/manualColumnMove/manualColumnMove.js +6 -1
- package/plugins/manualColumnMove/manualColumnMove.mjs +6 -1
- package/plugins/manualColumnMove/ui/_base.js +14 -1
- package/plugins/manualColumnMove/ui/_base.mjs +14 -1
- package/plugins/manualColumnMove/ui/backlight.js +6 -1
- package/plugins/manualColumnMove/ui/backlight.mjs +6 -1
- package/plugins/manualColumnMove/ui/guideline.js +6 -1
- package/plugins/manualColumnMove/ui/guideline.mjs +6 -1
- package/plugins/manualColumnResize/manualColumnResize.js +6 -1
- package/plugins/manualColumnResize/manualColumnResize.mjs +6 -1
- package/plugins/manualRowMove/manualRowMove.js +6 -1
- package/plugins/manualRowMove/manualRowMove.mjs +6 -1
- package/plugins/manualRowMove/ui/_base.js +14 -1
- package/plugins/manualRowMove/ui/_base.mjs +14 -1
- package/plugins/manualRowMove/ui/backlight.js +6 -1
- package/plugins/manualRowMove/ui/backlight.mjs +6 -1
- package/plugins/manualRowMove/ui/guideline.js +6 -1
- package/plugins/manualRowMove/ui/guideline.mjs +6 -1
- package/plugins/manualRowResize/manualRowResize.js +6 -1
- package/plugins/manualRowResize/manualRowResize.mjs +6 -1
- package/plugins/mergeCells/calculations/autofill.js +13 -6
- package/plugins/mergeCells/calculations/autofill.mjs +15 -8
- package/plugins/mergeCells/calculations/selection.js +16 -2
- package/plugins/mergeCells/calculations/selection.mjs +16 -2
- package/plugins/mergeCells/cellCoords.js +16 -2
- package/plugins/mergeCells/cellCoords.mjs +21 -7
- package/plugins/mergeCells/cellsCollection.js +12 -5
- package/plugins/mergeCells/cellsCollection.mjs +14 -7
- package/plugins/mergeCells/contextMenuItem/toggleMerge.mjs +5 -4
- package/plugins/mergeCells/mergeCells.js +7 -2
- package/plugins/mergeCells/mergeCells.mjs +7 -2
- package/plugins/multiColumnSorting/multiColumnSorting.js +6 -1
- package/plugins/multiColumnSorting/multiColumnSorting.mjs +6 -1
- package/plugins/multiColumnSorting/rootComparator.mjs +8 -7
- package/plugins/multiColumnSorting/utils.mjs +4 -3
- package/plugins/multipleSelectionHandles/multipleSelectionHandles.js +6 -1
- package/plugins/multipleSelectionHandles/multipleSelectionHandles.mjs +6 -1
- package/plugins/nestedHeaders/nestedHeaders.js +124 -16
- package/plugins/nestedHeaders/nestedHeaders.mjs +131 -23
- package/plugins/nestedHeaders/stateManager/headersTree.js +10 -3
- package/plugins/nestedHeaders/stateManager/headersTree.mjs +10 -3
- package/plugins/nestedHeaders/stateManager/index.js +34 -14
- package/plugins/nestedHeaders/stateManager/index.mjs +67 -47
- package/plugins/nestedHeaders/stateManager/matrixGenerator.mjs +33 -31
- package/plugins/nestedHeaders/stateManager/nodeModifiers/collapse.mjs +18 -17
- package/plugins/nestedHeaders/stateManager/nodeModifiers/expand.mjs +17 -16
- package/plugins/nestedHeaders/stateManager/nodeModifiers/hideColumn.mjs +7 -6
- package/plugins/nestedHeaders/stateManager/nodeModifiers/index.mjs +2 -1
- package/plugins/nestedHeaders/stateManager/nodeModifiers/showColumn.mjs +7 -6
- package/plugins/nestedHeaders/stateManager/settingsNormalizer.mjs +41 -39
- package/plugins/nestedHeaders/stateManager/sourceSettings.js +11 -3
- package/plugins/nestedHeaders/stateManager/sourceSettings.mjs +23 -14
- package/plugins/nestedHeaders/utils/ghostTable.js +17 -3
- package/plugins/nestedHeaders/utils/ghostTable.mjs +24 -10
- package/plugins/nestedRows/data/dataManager.js +10 -4
- package/plugins/nestedRows/data/dataManager.mjs +12 -6
- package/plugins/nestedRows/nestedRows.js +6 -1
- package/plugins/nestedRows/nestedRows.mjs +6 -1
- package/plugins/nestedRows/ui/_base.js +16 -2
- package/plugins/nestedRows/ui/_base.mjs +16 -2
- package/plugins/nestedRows/ui/collapsing.js +8 -2
- package/plugins/nestedRows/ui/collapsing.mjs +14 -8
- package/plugins/nestedRows/ui/contextMenu.js +7 -2
- package/plugins/nestedRows/ui/contextMenu.mjs +6 -1
- package/plugins/nestedRows/ui/headers.js +8 -2
- package/plugins/nestedRows/ui/headers.mjs +14 -8
- package/plugins/nestedRows/utils/rowMoveController.js +11 -4
- package/plugins/nestedRows/utils/rowMoveController.mjs +25 -18
- package/plugins/persistentState/persistentState.js +6 -1
- package/plugins/persistentState/persistentState.mjs +6 -1
- package/plugins/persistentState/storage.js +16 -2
- package/plugins/persistentState/storage.mjs +19 -5
- package/plugins/registry.js +1 -1
- package/plugins/registry.mjs +3 -2
- package/plugins/search/search.js +6 -1
- package/plugins/search/search.mjs +6 -1
- package/plugins/touchScroll/touchScroll.js +6 -1
- package/plugins/touchScroll/touchScroll.mjs +6 -1
- package/plugins/trimRows/trimRows.js +5 -1
- package/plugins/trimRows/trimRows.mjs +5 -1
- package/plugins/undoRedo/undoRedo.js +50 -32
- package/plugins/undoRedo/undoRedo.mjs +50 -32
- package/registry.mjs +2 -1
- package/renderers/baseRenderer/baseRenderer.mjs +2 -1
- package/renderers/index.mjs +4 -3
- package/selection/highlight/highlight.js +10 -3
- package/selection/highlight/highlight.mjs +24 -17
- package/selection/highlight/types/activeHeader.js +13 -2
- package/selection/highlight/types/activeHeader.mjs +19 -7
- package/selection/highlight/types/area.js +13 -2
- package/selection/highlight/types/area.mjs +22 -10
- package/selection/highlight/types/cell.js +13 -2
- package/selection/highlight/types/cell.mjs +22 -10
- package/selection/highlight/types/customSelection.js +13 -2
- package/selection/highlight/types/customSelection.mjs +23 -11
- package/selection/highlight/types/fill.js +14 -3
- package/selection/highlight/types/fill.mjs +22 -10
- package/selection/highlight/types/header.js +13 -2
- package/selection/highlight/types/header.mjs +24 -12
- package/selection/highlight/types/index.js +14 -3
- package/selection/highlight/types/index.mjs +14 -3
- package/selection/highlight/visualSelection.js +11 -6
- package/selection/highlight/visualSelection.mjs +11 -6
- package/selection/mouseEventHandler.mjs +14 -13
- package/selection/range.js +9 -2
- package/selection/range.mjs +9 -2
- package/selection/selection.js +13 -6
- package/selection/selection.mjs +21 -14
- package/selection/transformation.js +16 -2
- package/selection/transformation.mjs +24 -10
- package/selection/utils.js +1 -1
- package/selection/utils.mjs +1 -1
- package/shortcuts/context.js +1 -1
- package/shortcuts/context.mjs +1 -1
- package/shortcuts/keyObserver.js +8 -4
- package/shortcuts/keyObserver.mjs +8 -4
- package/shortcuts/manager.js +1 -1
- package/shortcuts/manager.mjs +1 -1
- package/tableView.js +147 -68
- package/tableView.mjs +147 -68
- package/translations/changesObservable/observable.js +12 -2
- package/translations/changesObservable/observable.mjs +19 -9
- package/translations/changesObservable/observer.js +12 -2
- package/translations/changesObservable/observer.mjs +17 -7
- package/translations/indexMapper.js +12 -6
- package/translations/indexMapper.mjs +17 -11
- package/translations/mapCollections/aggregatedCollection.js +8 -2
- package/translations/mapCollections/aggregatedCollection.mjs +11 -5
- package/translations/mapCollections/mapCollection.js +10 -1
- package/translations/mapCollections/mapCollection.mjs +10 -1
- package/translations/maps/hidingMap.js +8 -2
- package/translations/maps/hidingMap.mjs +13 -7
- package/translations/maps/indexMap.js +16 -2
- package/translations/maps/indexMap.mjs +20 -6
- package/translations/maps/indexesSequence.js +8 -2
- package/translations/maps/indexesSequence.mjs +14 -8
- package/translations/maps/linkedPhysicalIndexToValueMap.js +12 -6
- package/translations/maps/linkedPhysicalIndexToValueMap.mjs +18 -12
- package/translations/maps/physicalIndexToValueMap.js +8 -2
- package/translations/maps/physicalIndexToValueMap.mjs +14 -8
- package/translations/maps/trimmingMap.js +8 -2
- package/translations/maps/trimmingMap.mjs +13 -7
- package/translations/maps/utils/actionsOnIndexes.mjs +9 -8
- package/translations/maps/utils/indexesSequence.mjs +10 -9
- package/translations/maps/utils/physicallyIndexed.mjs +11 -10
- package/utils/dataStructures/linkedList.js +21 -7
- package/utils/dataStructures/linkedList.mjs +21 -7
- package/utils/dataStructures/priorityMap.js +1 -1
- package/utils/dataStructures/priorityMap.mjs +1 -1
- package/utils/dataStructures/queue.js +16 -2
- package/utils/dataStructures/queue.mjs +16 -2
- package/utils/dataStructures/stack.js +16 -2
- package/utils/dataStructures/stack.mjs +16 -2
- package/utils/dataStructures/tree.js +8 -2
- package/utils/dataStructures/tree.mjs +8 -2
- package/utils/dataStructures/uniqueMap.js +1 -1
- package/utils/dataStructures/uniqueMap.mjs +1 -1
- package/utils/ghostTable.js +12 -5
- package/utils/ghostTable.mjs +12 -5
- package/utils/interval.js +23 -8
- package/utils/interval.mjs +18 -4
- package/utils/samplesGenerator.js +13 -3
- package/utils/samplesGenerator.mjs +15 -5
- package/validators/index.mjs +4 -3
package/core.js
CHANGED
@@ -43,7 +43,8 @@ var _array = require("./helpers/array");
|
|
43
43
|
var _parseTable = require("./utils/parseTable");
|
44
44
|
var _registry = require("./plugins/registry");
|
45
45
|
var _registry2 = require("./renderers/registry");
|
46
|
-
var _registry3 = require("./
|
46
|
+
var _registry3 = require("./editors/registry");
|
47
|
+
var _registry4 = require("./validators/registry");
|
47
48
|
var _string = require("./helpers/string");
|
48
49
|
var _number = require("./helpers/number");
|
49
50
|
var _tableView = _interopRequireDefault(require("./tableView"));
|
@@ -53,7 +54,7 @@ var _translations = require("./translations");
|
|
53
54
|
var _rootInstance = require("./utils/rootInstance");
|
54
55
|
var _src = require("./3rdparty/walkontable/src");
|
55
56
|
var _pluginHooks = _interopRequireDefault(require("./pluginHooks"));
|
56
|
-
var
|
57
|
+
var _registry5 = require("./i18n/registry");
|
57
58
|
var _utils = require("./i18n/utils");
|
58
59
|
var _selection = require("./selection");
|
59
60
|
var _dataMap = require("./dataMap");
|
@@ -65,7 +66,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
65
66
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
66
67
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
67
68
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
68
|
-
function _iterableToArrayLimit(arr, i) { var _i =
|
69
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
69
70
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
70
71
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
71
72
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
@@ -85,37 +86,41 @@ var deprecationWarns = new Set();
|
|
85
86
|
* @class Core
|
86
87
|
* @description
|
87
88
|
*
|
88
|
-
* The `Handsontable` class
|
89
|
+
* The `Handsontable` class (known as the `Core`) lets you modify the grid's behavior by using Handsontable's public API methods.
|
90
|
+
*
|
91
|
+
* ::: only-for react
|
92
|
+
* To use these methods, associate a Handsontable instance with your instance
|
93
|
+
* of the [`HotTable` component](@/guides/getting-started/installation.md#use-the-hottable-component),
|
94
|
+
* by using React's `ref` feature (read more on the [Instance methods](@/guides/getting-started/react-methods.md) page).
|
95
|
+
* :::
|
89
96
|
*
|
90
97
|
* ## How to call a method
|
91
98
|
*
|
92
99
|
* ::: only-for javascript
|
93
100
|
* ```js
|
94
|
-
* //
|
101
|
+
* // create a Handsontable instance
|
95
102
|
* const hot = new Handsontable(document.getElementById('example'), options);
|
96
103
|
*
|
97
|
-
* //
|
104
|
+
* // call a method
|
98
105
|
* hot.setDataAtCell(0, 0, 'new value');
|
99
106
|
* ```
|
100
107
|
* :::
|
101
108
|
*
|
102
109
|
* ::: only-for react
|
103
|
-
* ```jsx
|
104
|
-
*
|
110
|
+
* ```jsx{3,7,13}
|
111
|
+
* import { useRef } from 'react';
|
105
112
|
*
|
106
|
-
*
|
113
|
+
* const hotTableComponent = useRef(null);
|
107
114
|
*
|
108
|
-
* // First, let's contruct Handsontable
|
109
115
|
* <HotTable
|
110
|
-
*
|
116
|
+
* // associate your `HotTable` component with a Handsontable instance
|
117
|
+
* ref={hotTableComponent}
|
111
118
|
* settings={options}
|
112
119
|
* />
|
113
120
|
*
|
114
|
-
*
|
115
|
-
*
|
116
|
-
*
|
117
|
-
* // Then, let's use the setDataAtCell method
|
118
|
-
* hot.setDataAtCell(0, 0, 'new value');
|
121
|
+
* // access the Handsontable instance, under the `.current.hotInstance` property
|
122
|
+
* // call a method
|
123
|
+
* hotTableComponent.current.hotInstance.setDataAtCell(0, 0, 'new value');
|
119
124
|
* ```
|
120
125
|
* :::
|
121
126
|
*
|
@@ -229,7 +234,7 @@ function Core(rootElement, userSettings) {
|
|
229
234
|
this.getDirectionFactor = function () {
|
230
235
|
return instance.isLtr() ? 1 : -1;
|
231
236
|
};
|
232
|
-
userSettings.language = (0,
|
237
|
+
userSettings.language = (0, _registry5.getValidLanguageCode)(userSettings.language);
|
233
238
|
var metaManager = new _dataMap.MetaManager(instance, userSettings, [_dataMap.DynamicCellMetaMod, _dataMap.ExtendMetaPropertiesMod]);
|
234
239
|
var tableMeta = metaManager.getTableMeta();
|
235
240
|
var globalMeta = metaManager.getGlobalMeta();
|
@@ -446,7 +451,8 @@ function Core(rootElement, userSettings) {
|
|
446
451
|
* @param {number} [amount=1] Amount of rows or columns to remove.
|
447
452
|
* @param {string} [source] Optional. Source of hook runner.
|
448
453
|
* @param {boolean} [keepEmptyRows] Optional. Flag for preventing deletion of empty rows.
|
449
|
-
*/
|
454
|
+
*/
|
455
|
+
alter: function alter(action, index) {
|
450
456
|
var _index, _index2;
|
451
457
|
var amount = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
|
452
458
|
var source = arguments.length > 3 ? arguments[3] : undefined;
|
@@ -521,7 +527,6 @@ function Core(rootElement, userSettings) {
|
|
521
527
|
rowDelta = _datamap$createRow.delta,
|
522
528
|
startRowPhysicalIndex = _datamap$createRow.startPhysicalIndex;
|
523
529
|
if (rowDelta) {
|
524
|
-
metaManager.createRow(startRowPhysicalIndex, amount);
|
525
530
|
var currentSelectedRange = selection.selectedRange.current();
|
526
531
|
var currentFromRange = currentSelectedRange === null || currentSelectedRange === void 0 ? void 0 : currentSelectedRange.from;
|
527
532
|
var currentFromRow = currentFromRange === null || currentFromRange === void 0 ? void 0 : currentFromRange.row;
|
@@ -577,7 +582,6 @@ function Core(rootElement, userSettings) {
|
|
577
582
|
colDelta = _datamap$createCol.delta,
|
578
583
|
startColumnPhysicalIndex = _datamap$createCol.startPhysicalIndex;
|
579
584
|
if (colDelta) {
|
580
|
-
metaManager.createColumn(startColumnPhysicalIndex, amount);
|
581
585
|
if (Array.isArray(tableMeta.colHeaders)) {
|
582
586
|
var spliceArray = [instance.toVisualColumn(startColumnPhysicalIndex), 0];
|
583
587
|
spliceArray.length += colDelta; // inserts empty (undefined) elements at the end of an array
|
@@ -640,7 +644,6 @@ function Core(rootElement, userSettings) {
|
|
640
644
|
if (!wasRemoved) {
|
641
645
|
return;
|
642
646
|
}
|
643
|
-
metaManager.removeRow(instance.toPhysicalRow(calcIndex), groupAmount);
|
644
647
|
var totalRows = instance.countRows();
|
645
648
|
var fixedRowsTop = tableMeta.fixedRowsTop;
|
646
649
|
if (fixedRowsTop >= calcIndex + 1) {
|
@@ -686,7 +689,6 @@ function Core(rootElement, userSettings) {
|
|
686
689
|
if (!wasRemoved) {
|
687
690
|
return;
|
688
691
|
}
|
689
|
-
metaManager.removeColumn(physicalColumnIndex, groupAmount);
|
690
692
|
var fixedColumnsStart = tableMeta.fixedColumnsStart;
|
691
693
|
if (fixedColumnsStart >= calcIndex + 1) {
|
692
694
|
tableMeta.fixedColumnsStart -= Math.min(groupAmount, fixedColumnsStart - calcIndex);
|
@@ -720,7 +722,8 @@ function Core(rootElement, userSettings) {
|
|
720
722
|
* Makes sure there are empty rows at the bottom of the table.
|
721
723
|
*
|
722
724
|
* @private
|
723
|
-
*/
|
725
|
+
*/
|
726
|
+
adjustRowsAndCols: function adjustRowsAndCols() {
|
724
727
|
var minRows = tableMeta.minRows;
|
725
728
|
var minSpareRows = tableMeta.minSpareRows;
|
726
729
|
var minCols = tableMeta.minCols;
|
@@ -846,7 +849,8 @@ function Core(rootElement, userSettings) {
|
|
846
849
|
* @param {Array} deltas The deltas array. A difference between values of adjacent cells.
|
847
850
|
* Useful **only** when the type of handled cells is `numeric`.
|
848
851
|
* @returns {object|undefined} Ending td in pasted area (only if any cell was changed).
|
849
|
-
*/
|
852
|
+
*/
|
853
|
+
populateFromArray: function populateFromArray(start, input, end, source, method, direction, deltas) {
|
850
854
|
// TODO: either remove or implement the `direction` argument. Currently it's not working at all.
|
851
855
|
var r;
|
852
856
|
var rlen;
|
@@ -1021,8 +1025,8 @@ function Core(rootElement, userSettings) {
|
|
1021
1025
|
var orgValueSchema = (0, _object.duckSchema)(Array.isArray(orgValue) ? orgValue : orgValue[0] || orgValue);
|
1022
1026
|
var valueSchema = (0, _object.duckSchema)(Array.isArray(value) ? value : value[0] || value);
|
1023
1027
|
|
1024
|
-
|
1025
|
-
if ((0, _object.isObjectEqual)(orgValueSchema, valueSchema)) {
|
1028
|
+
// Allow overwriting values with the same object-based schema or any array-based schema.
|
1029
|
+
if ((0, _object.isObjectEqual)(orgValueSchema, valueSchema) || Array.isArray(orgValueSchema) && Array.isArray(valueSchema)) {
|
1026
1030
|
value = (0, _object.deepClone)(value);
|
1027
1031
|
} else {
|
1028
1032
|
pushData = false;
|
@@ -1054,7 +1058,7 @@ function Core(rootElement, userSettings) {
|
|
1054
1058
|
*/
|
1055
1059
|
function setLanguage(languageCode) {
|
1056
1060
|
var normalizedLanguageCode = (0, _utils.normalizeLanguageCode)(languageCode);
|
1057
|
-
if ((0,
|
1061
|
+
if ((0, _registry5.hasLanguageDictionary)(normalizedLanguageCode)) {
|
1058
1062
|
instance.runHooks('beforeLanguageChange', normalizedLanguageCode);
|
1059
1063
|
globalMeta.language = normalizedLanguageCode;
|
1060
1064
|
instance.runHooks('afterLanguageChange', normalizedLanguageCode);
|
@@ -1106,6 +1110,16 @@ function Core(rootElement, userSettings) {
|
|
1106
1110
|
instance.runHooks('init');
|
1107
1111
|
this.forceFullRender = true; // used when data was changed
|
1108
1112
|
this.view.render();
|
1113
|
+
|
1114
|
+
// Run the logic only if it's the table's initialization and the root element is not visible.
|
1115
|
+
if (!!firstRun && instance.rootElement.offsetParent === null) {
|
1116
|
+
(0, _element.observeVisibilityChangeOnce)(instance.rootElement, function () {
|
1117
|
+
// Update the spreader size cache before rendering.
|
1118
|
+
instance.view._wt.wtOverlays.updateLastSpreaderSize();
|
1119
|
+
instance.render();
|
1120
|
+
instance.view.adjustElementsSize();
|
1121
|
+
});
|
1122
|
+
}
|
1109
1123
|
if (_typeof(firstRun) === 'object') {
|
1110
1124
|
instance.runHooks('afterChange', firstRun[0], firstRun[1]);
|
1111
1125
|
firstRun = false;
|
@@ -1259,9 +1273,7 @@ function Core(rootElement, userSettings) {
|
|
1259
1273
|
source: source
|
1260
1274
|
}),
|
1261
1275
|
numberOfCreatedRows = _datamap$createRow2.delta;
|
1262
|
-
if (numberOfCreatedRows
|
1263
|
-
metaManager.createRow(null, numberOfCreatedRows);
|
1264
|
-
} else {
|
1276
|
+
if (numberOfCreatedRows === 0) {
|
1265
1277
|
skipThisChange = true;
|
1266
1278
|
break;
|
1267
1279
|
}
|
@@ -1273,9 +1285,7 @@ function Core(rootElement, userSettings) {
|
|
1273
1285
|
source: source
|
1274
1286
|
}),
|
1275
1287
|
numberOfCreatedColumns = _datamap$createCol2.delta;
|
1276
|
-
if (numberOfCreatedColumns
|
1277
|
-
metaManager.createColumn(null, numberOfCreatedColumns);
|
1278
|
-
} else {
|
1288
|
+
if (numberOfCreatedColumns === 0) {
|
1279
1289
|
skipThisChange = true;
|
1280
1290
|
break;
|
1281
1291
|
}
|
@@ -2100,6 +2110,7 @@ function Core(rootElement, userSettings) {
|
|
2100
2110
|
dataSource: dataSource,
|
2101
2111
|
internalSource: 'updateData',
|
2102
2112
|
source: source,
|
2113
|
+
metaManager: metaManager,
|
2103
2114
|
firstRun: firstRun
|
2104
2115
|
});
|
2105
2116
|
};
|
@@ -2142,6 +2153,7 @@ function Core(rootElement, userSettings) {
|
|
2142
2153
|
dataSource: dataSource,
|
2143
2154
|
internalSource: 'loadData',
|
2144
2155
|
source: source,
|
2156
|
+
metaManager: metaManager,
|
2145
2157
|
firstRun: firstRun
|
2146
2158
|
});
|
2147
2159
|
};
|
@@ -3124,16 +3136,15 @@ function Core(rootElement, userSettings) {
|
|
3124
3136
|
this.isColumnModificationAllowed = function () {
|
3125
3137
|
return !(instance.dataType === 'object' || tableMeta.columns);
|
3126
3138
|
};
|
3127
|
-
var rendererLookup = (0, _data.cellMethodLookupFactory)('renderer');
|
3128
3139
|
|
3129
3140
|
/**
|
3130
3141
|
* Returns the cell renderer function by given `row` and `column` arguments.
|
3131
3142
|
*
|
3132
3143
|
* @memberof Core#
|
3133
3144
|
* @function getCellRenderer
|
3134
|
-
* @param {number|object}
|
3145
|
+
* @param {number|object} rowOrMeta Visual row index or cell meta object (see {@link Core#getCellMeta}).
|
3135
3146
|
* @param {number} column Visual column index.
|
3136
|
-
* @returns {Function}
|
3147
|
+
* @returns {Function} Returns the renderer function.
|
3137
3148
|
* @example
|
3138
3149
|
* ```js
|
3139
3150
|
* // Get cell renderer using `row` and `column` coordinates.
|
@@ -3142,8 +3153,12 @@ function Core(rootElement, userSettings) {
|
|
3142
3153
|
* hot.getCellRenderer(hot.getCellMeta(1, 1));
|
3143
3154
|
* ```
|
3144
3155
|
*/
|
3145
|
-
this.getCellRenderer = function (
|
3146
|
-
|
3156
|
+
this.getCellRenderer = function (rowOrMeta, column) {
|
3157
|
+
var cellRenderer = typeof rowOrMeta === 'number' ? instance.getCellMeta(rowOrMeta, column).renderer : rowOrMeta.renderer;
|
3158
|
+
if (typeof cellRenderer === 'string') {
|
3159
|
+
return (0, _registry2.getRenderer)(cellRenderer);
|
3160
|
+
}
|
3161
|
+
return (0, _mixed.isUndefined)(cellRenderer) ? (0, _registry2.getRenderer)('text') : cellRenderer;
|
3147
3162
|
};
|
3148
3163
|
|
3149
3164
|
/**
|
@@ -3151,9 +3166,9 @@ function Core(rootElement, userSettings) {
|
|
3151
3166
|
*
|
3152
3167
|
* @memberof Core#
|
3153
3168
|
* @function getCellEditor
|
3154
|
-
* @param {number}
|
3169
|
+
* @param {number} rowOrMeta Visual row index or cell meta object (see {@link Core#getCellMeta}).
|
3155
3170
|
* @param {number} column Visual column index.
|
3156
|
-
* @returns {Function}
|
3171
|
+
* @returns {Function|boolean} Returns the editor class or `false` is cell editor is disabled.
|
3157
3172
|
* @example
|
3158
3173
|
* ```js
|
3159
3174
|
* // Get cell editor class using `row` and `column` coordinates.
|
@@ -3162,31 +3177,36 @@ function Core(rootElement, userSettings) {
|
|
3162
3177
|
* hot.getCellEditor(hot.getCellMeta(1, 1));
|
3163
3178
|
* ```
|
3164
3179
|
*/
|
3165
|
-
this.getCellEditor = (
|
3166
|
-
|
3180
|
+
this.getCellEditor = function (rowOrMeta, column) {
|
3181
|
+
var cellEditor = typeof rowOrMeta === 'number' ? instance.getCellMeta(rowOrMeta, column).editor : rowOrMeta.editor;
|
3182
|
+
if (typeof cellEditor === 'string') {
|
3183
|
+
return (0, _registry3.getEditor)(cellEditor);
|
3184
|
+
}
|
3185
|
+
return (0, _mixed.isUndefined)(cellEditor) ? (0, _registry3.getEditor)('text') : cellEditor;
|
3186
|
+
};
|
3167
3187
|
|
3168
3188
|
/**
|
3169
3189
|
* Returns the cell validator by `row` and `column`.
|
3170
3190
|
*
|
3171
3191
|
* @memberof Core#
|
3172
3192
|
* @function getCellValidator
|
3173
|
-
* @param {number|object}
|
3193
|
+
* @param {number|object} rowOrMeta Visual row index or cell meta object (see {@link Core#getCellMeta}).
|
3174
3194
|
* @param {number} column Visual column index.
|
3175
3195
|
* @returns {Function|RegExp|undefined} The validator function.
|
3176
3196
|
* @example
|
3177
3197
|
* ```js
|
3178
|
-
* // Get cell
|
3198
|
+
* // Get cell validator using `row` and `column` coordinates.
|
3179
3199
|
* hot.getCellValidator(1, 1);
|
3180
|
-
* // Get cell
|
3200
|
+
* // Get cell validator using cell meta object.
|
3181
3201
|
* hot.getCellValidator(hot.getCellMeta(1, 1));
|
3182
3202
|
* ```
|
3183
3203
|
*/
|
3184
|
-
this.getCellValidator = function (
|
3185
|
-
var
|
3186
|
-
if (typeof
|
3187
|
-
|
3204
|
+
this.getCellValidator = function (rowOrMeta, column) {
|
3205
|
+
var cellValidator = typeof rowOrMeta === 'number' ? instance.getCellMeta(rowOrMeta, column).validator : rowOrMeta.validator;
|
3206
|
+
if (typeof cellValidator === 'string') {
|
3207
|
+
return (0, _registry4.getValidator)(cellValidator);
|
3188
3208
|
}
|
3189
|
-
return
|
3209
|
+
return cellValidator;
|
3190
3210
|
};
|
3191
3211
|
|
3192
3212
|
/**
|
@@ -3373,54 +3393,84 @@ function Core(rootElement, userSettings) {
|
|
3373
3393
|
};
|
3374
3394
|
|
3375
3395
|
/**
|
3376
|
-
*
|
3377
|
-
*
|
3396
|
+
* Gets the values of column headers (if column headers are [enabled](@/api/options.md#colheaders)).
|
3397
|
+
*
|
3398
|
+
* To get an array with the values of all
|
3399
|
+
* [bottom-most](@/guides/cell-features/clipboard.md#copy-with-headers) column headers,
|
3400
|
+
* call `getColHeader()` with no arguments.
|
3401
|
+
*
|
3402
|
+
* To get the value of the bottom-most header of a specific column, use the `column` parameter.
|
3403
|
+
*
|
3404
|
+
* To get the value of a [specific-level](@/guides/columns/column-groups.md) header
|
3405
|
+
* of a specific column, use the `column` and `headerLevel` parameters.
|
3406
|
+
*
|
3407
|
+
* Read more:
|
3408
|
+
* - [Guides: Column groups](@/guides/columns/column-groups.md)
|
3409
|
+
* - [Options: `colHeaders`](@/api/options.md#colheaders)
|
3410
|
+
* - [Guides: Copy with headers](@/guides/cell-features/clipboard.md#copy-with-headers)
|
3411
|
+
*
|
3412
|
+
* ```js
|
3413
|
+
* // get the contents of all bottom-most column headers
|
3414
|
+
* hot.getColHeader();
|
3415
|
+
*
|
3416
|
+
* // get the contents of the bottom-most header of a specific column
|
3417
|
+
* hot.getColHeader(5);
|
3418
|
+
*
|
3419
|
+
* // get the contents of a specific column header at a specific level
|
3420
|
+
* hot.getColHeader(5, -2);
|
3421
|
+
* ```
|
3378
3422
|
*
|
3379
3423
|
* @memberof Core#
|
3380
3424
|
* @function getColHeader
|
3381
|
-
* @param {number} [column]
|
3425
|
+
* @param {number} [column] A visual column index.
|
3426
|
+
* @param {number} [headerLevel=-1] (Since 12.3.0) Header level index. Accepts positive (0 to n)
|
3427
|
+
* and negative (-1 to -n) values. For positive values, 0 points to the
|
3428
|
+
* topmost header. For negative values, -1 points to the bottom-most
|
3429
|
+
* header (the header closest to the cells).
|
3382
3430
|
* @fires Hooks#modifyColHeader
|
3383
|
-
* @
|
3431
|
+
* @fires Hooks#modifyColumnHeaderValue
|
3432
|
+
* @returns {Array|string|number} Column header values.
|
3384
3433
|
*/
|
3385
3434
|
this.getColHeader = function (column) {
|
3435
|
+
var headerLevel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : -1;
|
3386
3436
|
var columnIndex = instance.runHooks('modifyColHeader', column);
|
3387
|
-
var result = tableMeta.colHeaders;
|
3388
3437
|
if (columnIndex === void 0) {
|
3389
3438
|
var out = [];
|
3390
3439
|
var ilen = instance.countCols();
|
3391
3440
|
for (var i = 0; i < ilen; i++) {
|
3392
3441
|
out.push(instance.getColHeader(i));
|
3393
3442
|
}
|
3394
|
-
|
3395
|
-
}
|
3396
|
-
|
3397
|
-
|
3398
|
-
|
3399
|
-
|
3400
|
-
|
3401
|
-
|
3402
|
-
|
3403
|
-
|
3443
|
+
return out;
|
3444
|
+
}
|
3445
|
+
var result = tableMeta.colHeaders;
|
3446
|
+
var translateVisualIndexToColumns = function translateVisualIndexToColumns(visualColumnIndex) {
|
3447
|
+
var arr = [];
|
3448
|
+
var columnsLen = instance.countCols();
|
3449
|
+
var index = 0;
|
3450
|
+
for (; index < columnsLen; index++) {
|
3451
|
+
if ((0, _function.isFunction)(tableMeta.columns) && tableMeta.columns(index)) {
|
3452
|
+
arr.push(index);
|
3404
3453
|
}
|
3405
|
-
return arr[visualColumnIndex];
|
3406
|
-
};
|
3407
|
-
var physicalColumn = instance.toPhysicalColumn(columnIndex);
|
3408
|
-
var prop = translateVisualIndexToColumns(physicalColumn);
|
3409
|
-
if (tableMeta.colHeaders === false) {
|
3410
|
-
result = null;
|
3411
|
-
} else if (tableMeta.columns && (0, _function.isFunction)(tableMeta.columns) && tableMeta.columns(prop) && tableMeta.columns(prop).title) {
|
3412
|
-
result = tableMeta.columns(prop).title;
|
3413
|
-
} else if (tableMeta.columns && tableMeta.columns[physicalColumn] && tableMeta.columns[physicalColumn].title) {
|
3414
|
-
result = tableMeta.columns[physicalColumn].title;
|
3415
|
-
} else if (Array.isArray(tableMeta.colHeaders) && tableMeta.colHeaders[physicalColumn] !== void 0) {
|
3416
|
-
result = tableMeta.colHeaders[physicalColumn];
|
3417
|
-
} else if ((0, _function.isFunction)(tableMeta.colHeaders)) {
|
3418
|
-
result = tableMeta.colHeaders(physicalColumn);
|
3419
|
-
} else if (tableMeta.colHeaders && typeof tableMeta.colHeaders !== 'string' && typeof tableMeta.colHeaders !== 'number') {
|
3420
|
-
result = (0, _data.spreadsheetColumnLabel)(columnIndex); // see #1458
|
3421
3454
|
}
|
3422
|
-
|
3423
|
-
|
3455
|
+
return arr[visualColumnIndex];
|
3456
|
+
};
|
3457
|
+
var physicalColumn = instance.toPhysicalColumn(columnIndex);
|
3458
|
+
var prop = translateVisualIndexToColumns(physicalColumn);
|
3459
|
+
if (tableMeta.colHeaders === false) {
|
3460
|
+
result = null;
|
3461
|
+
} else if (tableMeta.columns && (0, _function.isFunction)(tableMeta.columns) && tableMeta.columns(prop) && tableMeta.columns(prop).title) {
|
3462
|
+
result = tableMeta.columns(prop).title;
|
3463
|
+
} else if (tableMeta.columns && tableMeta.columns[physicalColumn] && tableMeta.columns[physicalColumn].title) {
|
3464
|
+
result = tableMeta.columns[physicalColumn].title;
|
3465
|
+
} else if (Array.isArray(tableMeta.colHeaders) && tableMeta.colHeaders[physicalColumn] !== void 0) {
|
3466
|
+
result = tableMeta.colHeaders[physicalColumn];
|
3467
|
+
} else if ((0, _function.isFunction)(tableMeta.colHeaders)) {
|
3468
|
+
result = tableMeta.colHeaders(physicalColumn);
|
3469
|
+
} else if (tableMeta.colHeaders && typeof tableMeta.colHeaders !== 'string' && typeof tableMeta.colHeaders !== 'number') {
|
3470
|
+
result = (0, _data.spreadsheetColumnLabel)(columnIndex); // see #1458
|
3471
|
+
}
|
3472
|
+
|
3473
|
+
result = instance.runHooks('modifyColumnHeaderValue', result, column, headerLevel);
|
3424
3474
|
return result;
|
3425
3475
|
};
|
3426
3476
|
|
@@ -3518,14 +3568,29 @@ function Core(rootElement, userSettings) {
|
|
3518
3568
|
};
|
3519
3569
|
|
3520
3570
|
/**
|
3521
|
-
* Returns
|
3571
|
+
* Returns a row's height, as recognized by Handsontable.
|
3522
3572
|
*
|
3523
|
-
*
|
3573
|
+
* Depending on your configuration, the method returns (in order of priority):
|
3574
|
+
* 1. The row height set by the [`ManualRowResize`](@/api/manualRowResize.md) plugin
|
3575
|
+
* (if the plugin is enabled).
|
3576
|
+
* 2. The row height set by the [`rowHeights`](@/api/options.md#rowheights) configuration option
|
3577
|
+
* (if the option is set).
|
3578
|
+
* 3. The row height as measured in the DOM by the [`AutoRowSize`](@/api/autoRowSize.md) plugin
|
3579
|
+
* (if the plugin is enabled).
|
3580
|
+
* 4. `undefined`, if neither [`ManualRowResize`](@/api/manualRowResize.md),
|
3581
|
+
* nor [`rowHeights`](@/api/options.md#rowheights),
|
3582
|
+
* nor [`AutoRowSize`](@/api/autoRowSize.md) is used.
|
3583
|
+
*
|
3584
|
+
* The height returned includes 1 px of the row's bottom border.
|
3585
|
+
*
|
3586
|
+
* Mind that this method is different from the
|
3587
|
+
* [`getRowHeight()`](@/api/autoRowSize.md#getrowheight) method
|
3588
|
+
* of the [`AutoRowSize`](@/api/autoRowSize.md) plugin.
|
3524
3589
|
*
|
3525
3590
|
* @memberof Core#
|
3526
3591
|
* @function getRowHeight
|
3527
|
-
* @param {number} row
|
3528
|
-
* @returns {number} The
|
3592
|
+
* @param {number} row A visual row index.
|
3593
|
+
* @returns {number|undefined} The height of the specified row, in pixels.
|
3529
3594
|
* @fires Hooks#modifyRowHeight
|
3530
3595
|
*/
|
3531
3596
|
this.getRowHeight = function (row) {
|
@@ -3697,35 +3762,48 @@ function Core(rootElement, userSettings) {
|
|
3697
3762
|
};
|
3698
3763
|
|
3699
3764
|
/**
|
3700
|
-
* Select
|
3701
|
-
*
|
3765
|
+
* Select a single cell, or a single range of adjacent cells.
|
3766
|
+
*
|
3767
|
+
* To select a cell, pass its visual row and column indexes, for example: `selectCell(2, 4)`.
|
3702
3768
|
*
|
3703
|
-
*
|
3704
|
-
*
|
3769
|
+
* To select a range, pass the visual indexes of the first and last cell in the range, for example: `selectCell(2, 4, 3, 5)`.
|
3770
|
+
*
|
3771
|
+
* If your columns have properties, you can pass those properties' values instead of column indexes, for example: `selectCell(2, 'first_name')`.
|
3772
|
+
*
|
3773
|
+
* By default, `selectCell()` also:
|
3774
|
+
* - Scrolls the viewport to the newly-selected cells.
|
3775
|
+
* - Switches the keyboard focus to Handsontable (by calling Handsontable's [`listen()`](#listen) method).
|
3705
3776
|
*
|
3706
3777
|
* @example
|
3707
3778
|
* ```js
|
3708
3779
|
* // select a single cell
|
3709
3780
|
* hot.selectCell(2, 4);
|
3710
|
-
*
|
3711
|
-
* hot.selectCell(2, 'address');
|
3781
|
+
*
|
3712
3782
|
* // select a range of cells
|
3713
3783
|
* hot.selectCell(2, 4, 3, 5);
|
3714
|
-
*
|
3715
|
-
*
|
3716
|
-
*
|
3717
|
-
*
|
3784
|
+
*
|
3785
|
+
* // select a single cell, using a column property
|
3786
|
+
* hot.selectCell(2, 'first_name');
|
3787
|
+
*
|
3788
|
+
* // select a range of cells, using column properties
|
3789
|
+
* hot.selectCell(2, 'first_name', 3, 'last_name');
|
3790
|
+
*
|
3791
|
+
* // select a range of cells, without scrolling to them
|
3792
|
+
* hot.selectCell(2, 4, 3, 5, false);
|
3793
|
+
*
|
3794
|
+
* // select a range of cells, without switching the keyboard focus to Handsontable
|
3795
|
+
* hot.selectCell(2, 4, 3, 5, null, false);
|
3718
3796
|
* ```
|
3719
3797
|
*
|
3720
3798
|
* @memberof Core#
|
3721
3799
|
* @function selectCell
|
3722
|
-
* @param {number} row
|
3723
|
-
* @param {number|string} column
|
3724
|
-
* @param {number} [endRow]
|
3725
|
-
* @param {number|string} [endColumn]
|
3726
|
-
* @param {boolean} [scrollToCell=true]
|
3727
|
-
* @param {boolean} [changeListener=true]
|
3728
|
-
* @returns {boolean} `true
|
3800
|
+
* @param {number} row A visual row index.
|
3801
|
+
* @param {number|string} column A visual column index (`number`), or a column property's value (`string`).
|
3802
|
+
* @param {number} [endRow] If selecting a range: the visual row index of the last cell in the range.
|
3803
|
+
* @param {number|string} [endColumn] If selecting a range: the visual column index (or a column property's value) of the last cell in the range.
|
3804
|
+
* @param {boolean} [scrollToCell=true] `true`: scroll the viewport to the newly-selected cells. `false`: keep the previous viewport.
|
3805
|
+
* @param {boolean} [changeListener=true] `true`: switch the keyboard focus to Handsontable. `false`: keep the previous keyboard focus.
|
3806
|
+
* @returns {boolean} `true`: the selection was successful, `false`: the selection failed.
|
3729
3807
|
*/
|
3730
3808
|
this.selectCell = function (row, column, endRow, endColumn) {
|
3731
3809
|
var scrollToCell = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
|
@@ -3737,24 +3815,48 @@ function Core(rootElement, userSettings) {
|
|
3737
3815
|
};
|
3738
3816
|
|
3739
3817
|
/**
|
3740
|
-
*
|
3741
|
-
*
|
3742
|
-
*
|
3818
|
+
* Select multiple cells or ranges of cells, adjacent or non-adjacent.
|
3819
|
+
*
|
3820
|
+
* You can pass one of the below:
|
3821
|
+
* - An array of arrays (which matches the output of Handsontable's [`getSelected()`](#getselected) method).
|
3822
|
+
* - An array of [`CellRange`](@/api/cellRange.md) objects (which matches the output of Handsontable's [`getSelectedRange()`](#getselectedrange) method).
|
3823
|
+
*
|
3824
|
+
* To select multiple cells, pass the visual row and column indexes of each cell, for example: `hot.selectCells([[1, 1], [5, 5]])`.
|
3825
|
+
*
|
3826
|
+
* To select multiple ranges, pass the visual indexes of the first and last cell in each range, for example: `hot.selectCells([[1, 1, 2, 2], [6, 2, 0, 2]])`.
|
3743
3827
|
*
|
3744
|
-
*
|
3745
|
-
*
|
3828
|
+
* If your columns have properties, you can pass those properties' values instead of column indexes, for example: `hot.selectCells([[1, 'first_name'], [5, 'last_name']])`.
|
3829
|
+
*
|
3830
|
+
* By default, `selectCell()` also:
|
3831
|
+
* - Scrolls the viewport to the newly-selected cells.
|
3832
|
+
* - Switches the keyboard focus to Handsontable (by calling Handsontable's [`listen()`](#listen) method).
|
3746
3833
|
*
|
3747
3834
|
* @example
|
3748
3835
|
* ```js
|
3749
|
-
* //
|
3836
|
+
* // select non-adjacent cells
|
3837
|
+
* hot.selectCells([[1, 1], [5, 5], [10, 10]]);
|
3838
|
+
*
|
3839
|
+
* // select non-adjacent ranges of cells
|
3840
|
+
* hot.selectCells([[1, 1, 2, 2], [10, 10, 20, 20]]);
|
3841
|
+
*
|
3842
|
+
* // select cells and ranges of cells
|
3750
3843
|
* hot.selectCells([[1, 1, 2, 2], [3, 3], [6, 2, 0, 2]]);
|
3751
|
-
*
|
3844
|
+
*
|
3845
|
+
* // select cells, using column properties
|
3752
3846
|
* hot.selectCells([[1, 'id', 2, 'first_name'], [3, 'full_name'], [6, 'last_name', 0, 'first_name']]);
|
3753
|
-
*
|
3847
|
+
*
|
3848
|
+
* // select multiple ranges, using an array of `CellRange` objects
|
3754
3849
|
* const selected = hot.getSelectedRange();
|
3755
3850
|
*
|
3756
3851
|
* selected[0].from.row = 0;
|
3757
3852
|
* selected[0].from.col = 0;
|
3853
|
+
* selected[0].to.row = 5;
|
3854
|
+
* selected[0].to.col = 5;
|
3855
|
+
*
|
3856
|
+
* selected[1].from.row = 10;
|
3857
|
+
* selected[1].from.col = 10;
|
3858
|
+
* selected[1].to.row = 20;
|
3859
|
+
* selected[1].to.col = 20;
|
3758
3860
|
*
|
3759
3861
|
* hot.selectCells(selected);
|
3760
3862
|
* ```
|
@@ -3762,12 +3864,12 @@ function Core(rootElement, userSettings) {
|
|
3762
3864
|
* @memberof Core#
|
3763
3865
|
* @since 0.38.0
|
3764
3866
|
* @function selectCells
|
3765
|
-
* @param {Array[]|CellRange[]} coords Visual
|
3766
|
-
*
|
3767
|
-
*
|
3768
|
-
* @param {boolean} [scrollToCell=true]
|
3769
|
-
* @param {boolean} [changeListener=true]
|
3770
|
-
* @returns {boolean} `true
|
3867
|
+
* @param {Array[]|CellRange[]} coords Visual coordinates,
|
3868
|
+
* passed either as an array of arrays (`[[rowStart, columnStart, rowEnd, columnEnd], ...]`)
|
3869
|
+
* or as an array of [`CellRange`](@/api/cellRange.md) objects.
|
3870
|
+
* @param {boolean} [scrollToCell=true] `true`: scroll the viewport to the newly-selected cells. `false`: keep the previous viewport.
|
3871
|
+
* @param {boolean} [changeListener=true] `true`: switch the keyboard focus to Handsontable. `false`: keep the previous keyboard focus.
|
3872
|
+
* @returns {boolean} `true`: the selection was successful, `false`: the selection failed.
|
3771
3873
|
*/
|
3772
3874
|
this.selectCells = function () {
|
3773
3875
|
var coords = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [[]];
|
@@ -3847,13 +3949,23 @@ function Core(rootElement, userSettings) {
|
|
3847
3949
|
};
|
3848
3950
|
|
3849
3951
|
/**
|
3850
|
-
* Select the whole table.
|
3952
|
+
* Select the whole table.
|
3953
|
+
*
|
3954
|
+
* The previous selection is overwritten.
|
3955
|
+
*
|
3956
|
+
* ```js
|
3957
|
+
* // select all cells in the table, including all headers
|
3958
|
+
* hot.selectAll();
|
3959
|
+
*
|
3960
|
+
* // select all cells in the table, without headers
|
3961
|
+
* hot.selectAll(false);
|
3962
|
+
* ```
|
3851
3963
|
*
|
3852
3964
|
* @since 0.38.2
|
3853
3965
|
* @memberof Core#
|
3854
3966
|
* @function selectAll
|
3855
|
-
* @param {boolean} [includeHeaders=true] `true
|
3856
|
-
* `false
|
3967
|
+
* @param {boolean} [includeHeaders=true] `true`: include all row, column and corner headers.
|
3968
|
+
* `false`: don't include any headers.
|
3857
3969
|
*/
|
3858
3970
|
this.selectAll = function () {
|
3859
3971
|
var includeHeaders = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
@@ -4169,7 +4281,7 @@ function Core(rootElement, userSettings) {
|
|
4169
4281
|
* @returns {string}
|
4170
4282
|
*/
|
4171
4283
|
this.getTranslatedPhrase = function (dictionaryKey, extraArguments) {
|
4172
|
-
return (0,
|
4284
|
+
return (0, _registry5.getTranslatedPhrase)(tableMeta.language, dictionaryKey, extraArguments);
|
4173
4285
|
};
|
4174
4286
|
|
4175
4287
|
/**
|