handsontable 12.2.0 → 12.3.0-next-bb1a7c2-20221208
Sign up to get free protection for your applications and to get access to all the features.
- 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
@@ -13,6 +13,9 @@ require("core-js/modules/es.regexp.exec.js");
|
|
13
13
|
require("core-js/modules/es.object.set-prototype-of.js");
|
14
14
|
require("core-js/modules/es.object.get-prototype-of.js");
|
15
15
|
require("core-js/modules/es.reflect.construct.js");
|
16
|
+
require("core-js/modules/es.symbol.to-primitive.js");
|
17
|
+
require("core-js/modules/es.date.to-primitive.js");
|
18
|
+
require("core-js/modules/es.number.constructor.js");
|
16
19
|
exports.__esModule = true;
|
17
20
|
exports.default = exports.PLUGIN_KEY = void 0;
|
18
21
|
require("core-js/modules/es.array.find.js");
|
@@ -20,6 +23,8 @@ require("core-js/modules/es.object.to-string.js");
|
|
20
23
|
require("core-js/modules/es.array.reduce.js");
|
21
24
|
require("core-js/modules/es.array.slice.js");
|
22
25
|
require("core-js/modules/es.array.splice.js");
|
26
|
+
require("core-js/modules/web.dom-collections.for-each.js");
|
27
|
+
require("core-js/modules/es.object.keys.js");
|
23
28
|
require("core-js/modules/es.array.sort.js");
|
24
29
|
require("core-js/modules/es.array.index-of.js");
|
25
30
|
require("core-js/modules/es.array.filter.js");
|
@@ -31,8 +36,10 @@ var _object = require("../../helpers/object");
|
|
31
36
|
var _utils = require("../contextMenu/utils");
|
32
37
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
33
38
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
34
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
39
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
35
40
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
41
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
42
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
36
43
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
37
44
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
38
45
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
@@ -48,7 +55,7 @@ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArra
|
|
48
55
|
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."); }
|
49
56
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
50
57
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
51
|
-
function _iterableToArrayLimit(arr, i) { var _i =
|
58
|
+
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; } }
|
52
59
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
53
60
|
var SHORTCUTS_GROUP = 'undoRedo';
|
54
61
|
var PLUGIN_KEY = 'undoRedo';
|
@@ -109,11 +116,9 @@ function UndoRedo(instance) {
|
|
109
116
|
});
|
110
117
|
instance.addHook('beforeRemoveRow', function (index, amount, logicRows, source) {
|
111
118
|
var wrappedAction = function wrappedAction() {
|
112
|
-
var
|
113
|
-
var
|
114
|
-
|
115
|
-
var removedData = (0, _object.deepClone)(originalData.slice(physicalRowIndex, physicalRowIndex + amount));
|
116
|
-
return new UndoRedo.RemoveRowAction(rowIndex, removedData, instance.getSettings().fixedRowsBottom, instance.getSettings().fixedRowsTop);
|
119
|
+
var physicalRowIndex = instance.toPhysicalRow(index);
|
120
|
+
var removedData = (0, _object.deepClone)(plugin.instance.getSourceData(physicalRowIndex, 0, physicalRowIndex + amount - 1, plugin.instance.countSourceCols() - 1));
|
121
|
+
return new UndoRedo.RemoveRowAction(physicalRowIndex, removedData, instance.getSettings().fixedRowsBottom, instance.getSettings().fixedRowsTop, instance.rowIndexMapper.getIndexesSequence());
|
117
122
|
};
|
118
123
|
plugin.done(wrappedAction, source);
|
119
124
|
});
|
@@ -477,24 +482,37 @@ UndoRedo.CreateRowAction.prototype.redo = function (instance, redoneCallback) {
|
|
477
482
|
* @param {Array} data The removed data.
|
478
483
|
* @param {number} fixedRowsBottom Number of fixed rows on the bottom. Remove row action change it sometimes.
|
479
484
|
* @param {number} fixedRowsTop Number of fixed rows on the top. Remove row action change it sometimes.
|
485
|
+
* @param {Array} rowIndexesSequence Row index sequence taken from the row index mapper.
|
480
486
|
*/
|
481
|
-
UndoRedo.RemoveRowAction = function (index, data, fixedRowsBottom, fixedRowsTop) {
|
487
|
+
UndoRedo.RemoveRowAction = function (index, data, fixedRowsBottom, fixedRowsTop, rowIndexesSequence) {
|
482
488
|
this.index = index;
|
483
489
|
this.data = data;
|
484
490
|
this.actionType = 'remove_row';
|
485
491
|
this.fixedRowsBottom = fixedRowsBottom;
|
486
492
|
this.fixedRowsTop = fixedRowsTop;
|
493
|
+
this.rowIndexesSequence = rowIndexesSequence;
|
487
494
|
};
|
488
495
|
(0, _object.inherit)(UndoRedo.RemoveRowAction, UndoRedo.Action);
|
489
496
|
UndoRedo.RemoveRowAction.prototype.undo = function (instance, undoneCallback) {
|
497
|
+
var _this2 = this;
|
490
498
|
var settings = instance.getSettings();
|
499
|
+
var changes = [];
|
491
500
|
|
492
501
|
// Changing by the reference as `updateSettings` doesn't work the best.
|
493
502
|
settings.fixedRowsBottom = this.fixedRowsBottom;
|
494
503
|
settings.fixedRowsTop = this.fixedRowsTop;
|
504
|
+
|
505
|
+
// Prepare the change list to fill the source data.
|
506
|
+
this.data.forEach(function (dataRow, rowIndexDelta) {
|
507
|
+
Object.keys(dataRow).forEach(function (columnProp) {
|
508
|
+
var columnIndex = parseInt(columnProp, 10);
|
509
|
+
changes.push([_this2.index + rowIndexDelta, isNaN(columnIndex) ? columnProp : columnIndex, dataRow[columnProp]]);
|
510
|
+
});
|
511
|
+
});
|
495
512
|
instance.alter('insert_row_above', this.index, this.data.length, 'UndoRedo.undo');
|
496
513
|
instance.addHookOnce('afterViewRender', undoneCallback);
|
497
|
-
instance.
|
514
|
+
instance.setSourceDataAtCell(changes, null, null, 'UndoRedo.undo');
|
515
|
+
instance.rowIndexMapper.setIndexesSequence(this.rowIndexesSequence);
|
498
516
|
};
|
499
517
|
UndoRedo.RemoveRowAction.prototype.redo = function (instance, redoneCallback) {
|
500
518
|
instance.addHookOnce('afterRemoveRow', redoneCallback);
|
@@ -549,14 +567,14 @@ UndoRedo.RemoveColumnAction = function (index, indexes, data, headers, columnPos
|
|
549
567
|
};
|
550
568
|
(0, _object.inherit)(UndoRedo.RemoveColumnAction, UndoRedo.Action);
|
551
569
|
UndoRedo.RemoveColumnAction.prototype.undo = function (instance, undoneCallback) {
|
552
|
-
var
|
570
|
+
var _this3 = this;
|
553
571
|
var settings = instance.getSettings();
|
554
572
|
|
555
573
|
// Changing by the reference as `updateSettings` doesn't work the best.
|
556
574
|
settings.fixedColumnsStart = this.fixedColumnsStart;
|
557
575
|
var ascendingIndexes = this.indexes.slice(0).sort();
|
558
576
|
var sortByIndexes = function sortByIndexes(elem, j, arr) {
|
559
|
-
return arr[
|
577
|
+
return arr[_this3.indexes.indexOf(ascendingIndexes[j])];
|
560
578
|
};
|
561
579
|
var removedDataLength = this.data.length;
|
562
580
|
var sortedData = [];
|
@@ -582,8 +600,8 @@ UndoRedo.RemoveColumnAction.prototype.undo = function (instance, undoneCallback)
|
|
582
600
|
instance.batchExecution(function () {
|
583
601
|
// Restore row sequence in a case when all columns are removed. the original
|
584
602
|
// row sequence is lost in that case.
|
585
|
-
instance.rowIndexMapper.setIndexesSequence(
|
586
|
-
instance.columnIndexMapper.setIndexesSequence(
|
603
|
+
instance.rowIndexMapper.setIndexesSequence(_this3.rowPositions);
|
604
|
+
instance.columnIndexMapper.setIndexesSequence(_this3.columnPositions);
|
587
605
|
}, true);
|
588
606
|
instance.addHookOnce('afterViewRender', undoneCallback);
|
589
607
|
instance.render();
|
@@ -609,12 +627,12 @@ UndoRedo.CellAlignmentAction = function (stateBefore, range, type, alignment) {
|
|
609
627
|
this.alignment = alignment;
|
610
628
|
};
|
611
629
|
UndoRedo.CellAlignmentAction.prototype.undo = function (instance, undoneCallback) {
|
612
|
-
var
|
630
|
+
var _this4 = this;
|
613
631
|
(0, _array.arrayEach)(this.range, function (range) {
|
614
632
|
range.forAll(function (row, col) {
|
615
633
|
// Alignment classes should only collected within cell ranges. We skip header coordinates.
|
616
634
|
if (row >= 0 && col >= 0) {
|
617
|
-
instance.setCellMeta(row, col, 'className',
|
635
|
+
instance.setCellMeta(row, col, 'className', _this4.stateBefore[row][col] || ' htLeft');
|
618
636
|
}
|
619
637
|
});
|
620
638
|
});
|
@@ -664,14 +682,14 @@ var MergeCellsAction = /*#__PURE__*/function (_UndoRedo$Action) {
|
|
664
682
|
_inherits(MergeCellsAction, _UndoRedo$Action);
|
665
683
|
var _super = _createSuper(MergeCellsAction);
|
666
684
|
function MergeCellsAction(instance, cellRange) {
|
667
|
-
var
|
685
|
+
var _this5;
|
668
686
|
_classCallCheck(this, MergeCellsAction);
|
669
|
-
|
670
|
-
|
671
|
-
var topStartCorner =
|
672
|
-
var bottomEndCorner =
|
673
|
-
|
674
|
-
return
|
687
|
+
_this5 = _super.call(this);
|
688
|
+
_this5.cellRange = cellRange;
|
689
|
+
var topStartCorner = _this5.cellRange.getTopStartCorner();
|
690
|
+
var bottomEndCorner = _this5.cellRange.getBottomEndCorner();
|
691
|
+
_this5.rangeData = instance.getData(topStartCorner.row, topStartCorner.col, bottomEndCorner.row, bottomEndCorner.col);
|
692
|
+
return _this5;
|
675
693
|
}
|
676
694
|
_createClass(MergeCellsAction, [{
|
677
695
|
key: "undo",
|
@@ -703,11 +721,11 @@ var UnmergeCellsAction = /*#__PURE__*/function (_UndoRedo$Action2) {
|
|
703
721
|
_inherits(UnmergeCellsAction, _UndoRedo$Action2);
|
704
722
|
var _super2 = _createSuper(UnmergeCellsAction);
|
705
723
|
function UnmergeCellsAction(instance, cellRange) {
|
706
|
-
var
|
724
|
+
var _this6;
|
707
725
|
_classCallCheck(this, UnmergeCellsAction);
|
708
|
-
|
709
|
-
|
710
|
-
return
|
726
|
+
_this6 = _super2.call(this);
|
727
|
+
_this6.cellRange = cellRange;
|
728
|
+
return _this6;
|
711
729
|
}
|
712
730
|
_createClass(UnmergeCellsAction, [{
|
713
731
|
key: "undo",
|
@@ -744,14 +762,14 @@ UndoRedo.RowMoveAction = function (rows, finalIndex) {
|
|
744
762
|
};
|
745
763
|
(0, _object.inherit)(UndoRedo.RowMoveAction, UndoRedo.Action);
|
746
764
|
UndoRedo.RowMoveAction.prototype.undo = function (instance, undoneCallback) {
|
747
|
-
var
|
765
|
+
var _this7 = this;
|
748
766
|
var manualRowMove = instance.getPlugin('manualRowMove');
|
749
767
|
var copyOfRows = [].concat(this.rows);
|
750
768
|
var rowsMovedUp = copyOfRows.filter(function (a) {
|
751
|
-
return a >
|
769
|
+
return a > _this7.finalIndex;
|
752
770
|
});
|
753
771
|
var rowsMovedDown = copyOfRows.filter(function (a) {
|
754
|
-
return a <=
|
772
|
+
return a <= _this7.finalIndex;
|
755
773
|
});
|
756
774
|
var allMovedRows = rowsMovedUp.sort(function (a, b) {
|
757
775
|
return b - a;
|
@@ -803,7 +821,7 @@ UndoRedo.prototype.init = function () {
|
|
803
821
|
* @private
|
804
822
|
*/
|
805
823
|
UndoRedo.prototype.registerShortcuts = function () {
|
806
|
-
var
|
824
|
+
var _this8 = this;
|
807
825
|
var shortcutManager = this.instance.getShortcutManager();
|
808
826
|
var gridContext = shortcutManager.getContext('grid');
|
809
827
|
var runOnlyIf = function runOnlyIf(event) {
|
@@ -817,12 +835,12 @@ UndoRedo.prototype.registerShortcuts = function () {
|
|
817
835
|
gridContext.addShortcuts([{
|
818
836
|
keys: [['Control/Meta', 'z']],
|
819
837
|
callback: function callback() {
|
820
|
-
|
838
|
+
_this8.undo();
|
821
839
|
}
|
822
840
|
}, {
|
823
841
|
keys: [['Control/Meta', 'y'], ['Control/Meta', 'Shift', 'z']],
|
824
842
|
callback: function callback() {
|
825
|
-
|
843
|
+
_this8.redo();
|
826
844
|
}
|
827
845
|
}], config);
|
828
846
|
};
|
@@ -1,7 +1,9 @@
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
2
2
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
3
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
3
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
4
4
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
5
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
6
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
5
7
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
6
8
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
7
9
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
@@ -17,13 +19,15 @@ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArra
|
|
17
19
|
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."); }
|
18
20
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
19
21
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
20
|
-
function _iterableToArrayLimit(arr, i) { var _i =
|
22
|
+
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; } }
|
21
23
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
22
24
|
import "core-js/modules/es.array.find.js";
|
23
25
|
import "core-js/modules/es.object.to-string.js";
|
24
26
|
import "core-js/modules/es.array.reduce.js";
|
25
27
|
import "core-js/modules/es.array.slice.js";
|
26
28
|
import "core-js/modules/es.array.splice.js";
|
29
|
+
import "core-js/modules/web.dom-collections.for-each.js";
|
30
|
+
import "core-js/modules/es.object.keys.js";
|
27
31
|
import "core-js/modules/es.array.sort.js";
|
28
32
|
import "core-js/modules/es.array.index-of.js";
|
29
33
|
import "core-js/modules/es.array.filter.js";
|
@@ -40,6 +44,9 @@ import "core-js/modules/es.regexp.exec.js";
|
|
40
44
|
import "core-js/modules/es.object.set-prototype-of.js";
|
41
45
|
import "core-js/modules/es.object.get-prototype-of.js";
|
42
46
|
import "core-js/modules/es.reflect.construct.js";
|
47
|
+
import "core-js/modules/es.symbol.to-primitive.js";
|
48
|
+
import "core-js/modules/es.date.to-primitive.js";
|
49
|
+
import "core-js/modules/es.number.constructor.js";
|
43
50
|
import Hooks from "../../pluginHooks.mjs";
|
44
51
|
import { arrayMap, arrayEach } from "../../helpers/array.mjs";
|
45
52
|
import { rangeEach } from "../../helpers/number.mjs";
|
@@ -103,11 +110,9 @@ function UndoRedo(instance) {
|
|
103
110
|
});
|
104
111
|
instance.addHook('beforeRemoveRow', function (index, amount, logicRows, source) {
|
105
112
|
var wrappedAction = function wrappedAction() {
|
106
|
-
var
|
107
|
-
var
|
108
|
-
|
109
|
-
var removedData = deepClone(originalData.slice(physicalRowIndex, physicalRowIndex + amount));
|
110
|
-
return new UndoRedo.RemoveRowAction(rowIndex, removedData, instance.getSettings().fixedRowsBottom, instance.getSettings().fixedRowsTop);
|
113
|
+
var physicalRowIndex = instance.toPhysicalRow(index);
|
114
|
+
var removedData = deepClone(plugin.instance.getSourceData(physicalRowIndex, 0, physicalRowIndex + amount - 1, plugin.instance.countSourceCols() - 1));
|
115
|
+
return new UndoRedo.RemoveRowAction(physicalRowIndex, removedData, instance.getSettings().fixedRowsBottom, instance.getSettings().fixedRowsTop, instance.rowIndexMapper.getIndexesSequence());
|
111
116
|
};
|
112
117
|
plugin.done(wrappedAction, source);
|
113
118
|
});
|
@@ -471,24 +476,37 @@ UndoRedo.CreateRowAction.prototype.redo = function (instance, redoneCallback) {
|
|
471
476
|
* @param {Array} data The removed data.
|
472
477
|
* @param {number} fixedRowsBottom Number of fixed rows on the bottom. Remove row action change it sometimes.
|
473
478
|
* @param {number} fixedRowsTop Number of fixed rows on the top. Remove row action change it sometimes.
|
479
|
+
* @param {Array} rowIndexesSequence Row index sequence taken from the row index mapper.
|
474
480
|
*/
|
475
|
-
UndoRedo.RemoveRowAction = function (index, data, fixedRowsBottom, fixedRowsTop) {
|
481
|
+
UndoRedo.RemoveRowAction = function (index, data, fixedRowsBottom, fixedRowsTop, rowIndexesSequence) {
|
476
482
|
this.index = index;
|
477
483
|
this.data = data;
|
478
484
|
this.actionType = 'remove_row';
|
479
485
|
this.fixedRowsBottom = fixedRowsBottom;
|
480
486
|
this.fixedRowsTop = fixedRowsTop;
|
487
|
+
this.rowIndexesSequence = rowIndexesSequence;
|
481
488
|
};
|
482
489
|
inherit(UndoRedo.RemoveRowAction, UndoRedo.Action);
|
483
490
|
UndoRedo.RemoveRowAction.prototype.undo = function (instance, undoneCallback) {
|
491
|
+
var _this2 = this;
|
484
492
|
var settings = instance.getSettings();
|
493
|
+
var changes = [];
|
485
494
|
|
486
495
|
// Changing by the reference as `updateSettings` doesn't work the best.
|
487
496
|
settings.fixedRowsBottom = this.fixedRowsBottom;
|
488
497
|
settings.fixedRowsTop = this.fixedRowsTop;
|
498
|
+
|
499
|
+
// Prepare the change list to fill the source data.
|
500
|
+
this.data.forEach(function (dataRow, rowIndexDelta) {
|
501
|
+
Object.keys(dataRow).forEach(function (columnProp) {
|
502
|
+
var columnIndex = parseInt(columnProp, 10);
|
503
|
+
changes.push([_this2.index + rowIndexDelta, isNaN(columnIndex) ? columnProp : columnIndex, dataRow[columnProp]]);
|
504
|
+
});
|
505
|
+
});
|
489
506
|
instance.alter('insert_row_above', this.index, this.data.length, 'UndoRedo.undo');
|
490
507
|
instance.addHookOnce('afterViewRender', undoneCallback);
|
491
|
-
instance.
|
508
|
+
instance.setSourceDataAtCell(changes, null, null, 'UndoRedo.undo');
|
509
|
+
instance.rowIndexMapper.setIndexesSequence(this.rowIndexesSequence);
|
492
510
|
};
|
493
511
|
UndoRedo.RemoveRowAction.prototype.redo = function (instance, redoneCallback) {
|
494
512
|
instance.addHookOnce('afterRemoveRow', redoneCallback);
|
@@ -543,14 +561,14 @@ UndoRedo.RemoveColumnAction = function (index, indexes, data, headers, columnPos
|
|
543
561
|
};
|
544
562
|
inherit(UndoRedo.RemoveColumnAction, UndoRedo.Action);
|
545
563
|
UndoRedo.RemoveColumnAction.prototype.undo = function (instance, undoneCallback) {
|
546
|
-
var
|
564
|
+
var _this3 = this;
|
547
565
|
var settings = instance.getSettings();
|
548
566
|
|
549
567
|
// Changing by the reference as `updateSettings` doesn't work the best.
|
550
568
|
settings.fixedColumnsStart = this.fixedColumnsStart;
|
551
569
|
var ascendingIndexes = this.indexes.slice(0).sort();
|
552
570
|
var sortByIndexes = function sortByIndexes(elem, j, arr) {
|
553
|
-
return arr[
|
571
|
+
return arr[_this3.indexes.indexOf(ascendingIndexes[j])];
|
554
572
|
};
|
555
573
|
var removedDataLength = this.data.length;
|
556
574
|
var sortedData = [];
|
@@ -576,8 +594,8 @@ UndoRedo.RemoveColumnAction.prototype.undo = function (instance, undoneCallback)
|
|
576
594
|
instance.batchExecution(function () {
|
577
595
|
// Restore row sequence in a case when all columns are removed. the original
|
578
596
|
// row sequence is lost in that case.
|
579
|
-
instance.rowIndexMapper.setIndexesSequence(
|
580
|
-
instance.columnIndexMapper.setIndexesSequence(
|
597
|
+
instance.rowIndexMapper.setIndexesSequence(_this3.rowPositions);
|
598
|
+
instance.columnIndexMapper.setIndexesSequence(_this3.columnPositions);
|
581
599
|
}, true);
|
582
600
|
instance.addHookOnce('afterViewRender', undoneCallback);
|
583
601
|
instance.render();
|
@@ -603,12 +621,12 @@ UndoRedo.CellAlignmentAction = function (stateBefore, range, type, alignment) {
|
|
603
621
|
this.alignment = alignment;
|
604
622
|
};
|
605
623
|
UndoRedo.CellAlignmentAction.prototype.undo = function (instance, undoneCallback) {
|
606
|
-
var
|
624
|
+
var _this4 = this;
|
607
625
|
arrayEach(this.range, function (range) {
|
608
626
|
range.forAll(function (row, col) {
|
609
627
|
// Alignment classes should only collected within cell ranges. We skip header coordinates.
|
610
628
|
if (row >= 0 && col >= 0) {
|
611
|
-
instance.setCellMeta(row, col, 'className',
|
629
|
+
instance.setCellMeta(row, col, 'className', _this4.stateBefore[row][col] || ' htLeft');
|
612
630
|
}
|
613
631
|
});
|
614
632
|
});
|
@@ -658,14 +676,14 @@ var MergeCellsAction = /*#__PURE__*/function (_UndoRedo$Action) {
|
|
658
676
|
_inherits(MergeCellsAction, _UndoRedo$Action);
|
659
677
|
var _super = _createSuper(MergeCellsAction);
|
660
678
|
function MergeCellsAction(instance, cellRange) {
|
661
|
-
var
|
679
|
+
var _this5;
|
662
680
|
_classCallCheck(this, MergeCellsAction);
|
663
|
-
|
664
|
-
|
665
|
-
var topStartCorner =
|
666
|
-
var bottomEndCorner =
|
667
|
-
|
668
|
-
return
|
681
|
+
_this5 = _super.call(this);
|
682
|
+
_this5.cellRange = cellRange;
|
683
|
+
var topStartCorner = _this5.cellRange.getTopStartCorner();
|
684
|
+
var bottomEndCorner = _this5.cellRange.getBottomEndCorner();
|
685
|
+
_this5.rangeData = instance.getData(topStartCorner.row, topStartCorner.col, bottomEndCorner.row, bottomEndCorner.col);
|
686
|
+
return _this5;
|
669
687
|
}
|
670
688
|
_createClass(MergeCellsAction, [{
|
671
689
|
key: "undo",
|
@@ -697,11 +715,11 @@ var UnmergeCellsAction = /*#__PURE__*/function (_UndoRedo$Action2) {
|
|
697
715
|
_inherits(UnmergeCellsAction, _UndoRedo$Action2);
|
698
716
|
var _super2 = _createSuper(UnmergeCellsAction);
|
699
717
|
function UnmergeCellsAction(instance, cellRange) {
|
700
|
-
var
|
718
|
+
var _this6;
|
701
719
|
_classCallCheck(this, UnmergeCellsAction);
|
702
|
-
|
703
|
-
|
704
|
-
return
|
720
|
+
_this6 = _super2.call(this);
|
721
|
+
_this6.cellRange = cellRange;
|
722
|
+
return _this6;
|
705
723
|
}
|
706
724
|
_createClass(UnmergeCellsAction, [{
|
707
725
|
key: "undo",
|
@@ -738,14 +756,14 @@ UndoRedo.RowMoveAction = function (rows, finalIndex) {
|
|
738
756
|
};
|
739
757
|
inherit(UndoRedo.RowMoveAction, UndoRedo.Action);
|
740
758
|
UndoRedo.RowMoveAction.prototype.undo = function (instance, undoneCallback) {
|
741
|
-
var
|
759
|
+
var _this7 = this;
|
742
760
|
var manualRowMove = instance.getPlugin('manualRowMove');
|
743
761
|
var copyOfRows = [].concat(this.rows);
|
744
762
|
var rowsMovedUp = copyOfRows.filter(function (a) {
|
745
|
-
return a >
|
763
|
+
return a > _this7.finalIndex;
|
746
764
|
});
|
747
765
|
var rowsMovedDown = copyOfRows.filter(function (a) {
|
748
|
-
return a <=
|
766
|
+
return a <= _this7.finalIndex;
|
749
767
|
});
|
750
768
|
var allMovedRows = rowsMovedUp.sort(function (a, b) {
|
751
769
|
return b - a;
|
@@ -797,7 +815,7 @@ UndoRedo.prototype.init = function () {
|
|
797
815
|
* @private
|
798
816
|
*/
|
799
817
|
UndoRedo.prototype.registerShortcuts = function () {
|
800
|
-
var
|
818
|
+
var _this8 = this;
|
801
819
|
var shortcutManager = this.instance.getShortcutManager();
|
802
820
|
var gridContext = shortcutManager.getContext('grid');
|
803
821
|
var runOnlyIf = function runOnlyIf(event) {
|
@@ -811,12 +829,12 @@ UndoRedo.prototype.registerShortcuts = function () {
|
|
811
829
|
gridContext.addShortcuts([{
|
812
830
|
keys: [['Control/Meta', 'z']],
|
813
831
|
callback: function callback() {
|
814
|
-
|
832
|
+
_this8.undo();
|
815
833
|
}
|
816
834
|
}, {
|
817
835
|
keys: [['Control/Meta', 'y'], ['Control/Meta', 'Shift', 'z']],
|
818
836
|
callback: function callback() {
|
819
|
-
|
837
|
+
_this8.redo();
|
820
838
|
}
|
821
839
|
}], config);
|
822
840
|
};
|
package/registry.mjs
CHANGED
@@ -10,7 +10,8 @@ import { registerAllEditors } from "./editors/index.mjs";
|
|
10
10
|
import { registerAllRenderers } from "./renderers/index.mjs";
|
11
11
|
import { registerAllValidators } from "./validators/index.mjs";
|
12
12
|
import { registerAllCellTypes } from "./cellTypes/index.mjs";
|
13
|
-
import { registerAllPlugins } from "./plugins/index.mjs";
|
13
|
+
import { registerAllPlugins } from "./plugins/index.mjs";
|
14
|
+
/* eslint-enable handsontable/restricted-module-imports */
|
14
15
|
export { registerAllEditors, registerAllRenderers, registerAllValidators, registerAllCellTypes, registerAllPlugins };
|
15
16
|
|
16
17
|
/**
|
@@ -1,6 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* Adds appropriate CSS class to table cell, based on cellProperties.
|
3
|
-
*/
|
3
|
+
*/
|
4
|
+
import { addClass, removeClass } from "../../helpers/dom/element.mjs";
|
4
5
|
export var RENDERER_TYPE = 'base';
|
5
6
|
|
6
7
|
/**
|
package/renderers/index.mjs
CHANGED
@@ -6,9 +6,10 @@ import { numericRenderer, RENDERER_TYPE as NUMERIC_RENDERER } from "./numericRen
|
|
6
6
|
import { passwordRenderer, RENDERER_TYPE as PASSWORD_RENDERER } from "./passwordRenderer/index.mjs";
|
7
7
|
import { textRenderer, RENDERER_TYPE as TEXT_RENDERER } from "./textRenderer/index.mjs";
|
8
8
|
import { timeRenderer, RENDERER_TYPE as TIME_RENDERER } from "./timeRenderer/index.mjs";
|
9
|
-
import { registerRenderer } from "./registry.mjs";
|
10
|
-
|
11
|
-
|
9
|
+
import { registerRenderer } from "./registry.mjs";
|
10
|
+
/**
|
11
|
+
* Registers all available renderers.
|
12
|
+
*/
|
12
13
|
export function registerAllRenderers() {
|
13
14
|
registerRenderer(autocompleteRenderer);
|
14
15
|
registerRenderer(baseRenderer);
|
@@ -23,9 +23,13 @@ require("core-js/modules/es.array.concat.js");
|
|
23
23
|
require("core-js/modules/es.symbol.iterator.js");
|
24
24
|
require("core-js/modules/es.symbol.js");
|
25
25
|
require("core-js/modules/es.symbol.description.js");
|
26
|
+
require("core-js/modules/es.symbol.to-primitive.js");
|
27
|
+
require("core-js/modules/es.date.to-primitive.js");
|
28
|
+
require("core-js/modules/es.number.constructor.js");
|
26
29
|
var _types = require("./types");
|
27
30
|
var _constants = require("./constants");
|
28
31
|
var _array = require("./../../helpers/array");
|
32
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
29
33
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
30
34
|
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."); }
|
31
35
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
@@ -34,10 +38,12 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
|
|
34
38
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
35
39
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
36
40
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
37
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
41
|
+
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; }
|
38
42
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
39
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
43
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
40
44
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
45
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
46
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
41
47
|
/**
|
42
48
|
* Highlight class responsible for managing Walkontable Selection classes.
|
43
49
|
*
|
@@ -52,7 +58,8 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
52
58
|
*
|
53
59
|
* @class Highlight
|
54
60
|
* @util
|
55
|
-
*/
|
61
|
+
*/
|
62
|
+
var Highlight = /*#__PURE__*/function (_Symbol$iterator) {
|
56
63
|
function Highlight(options) {
|
57
64
|
_classCallCheck(this, Highlight);
|
58
65
|
/**
|
@@ -1,3 +1,4 @@
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
1
2
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
2
3
|
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."); }
|
3
4
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
@@ -6,7 +7,7 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
|
|
6
7
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
7
8
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
8
9
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
9
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
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; }
|
10
11
|
import "core-js/modules/es.array.fill.js";
|
11
12
|
import "core-js/modules/es.array.iterator.js";
|
12
13
|
import "core-js/modules/es.map.js";
|
@@ -19,6 +20,9 @@ import "core-js/modules/es.array.concat.js";
|
|
19
20
|
import "core-js/modules/es.symbol.iterator.js";
|
20
21
|
import "core-js/modules/es.symbol.js";
|
21
22
|
import "core-js/modules/es.symbol.description.js";
|
23
|
+
import "core-js/modules/es.symbol.to-primitive.js";
|
24
|
+
import "core-js/modules/es.date.to-primitive.js";
|
25
|
+
import "core-js/modules/es.number.constructor.js";
|
22
26
|
import "core-js/modules/es.object.keys.js";
|
23
27
|
import "core-js/modules/es.array.filter.js";
|
24
28
|
import "core-js/modules/es.object.get-own-property-descriptor.js";
|
@@ -29,25 +33,28 @@ import "core-js/modules/es.array.slice.js";
|
|
29
33
|
import "core-js/modules/es.function.name.js";
|
30
34
|
import "core-js/modules/es.regexp.exec.js";
|
31
35
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
32
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
36
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
33
37
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
38
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
39
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
34
40
|
import { createHighlight } from "./types/index.mjs";
|
35
41
|
import { ACTIVE_HEADER_TYPE, AREA_TYPE, CELL_TYPE, CUSTOM_SELECTION_TYPE, FILL_TYPE, HEADER_TYPE } from "./constants.mjs";
|
36
|
-
import { arrayEach } from "./../../helpers/array.mjs";
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
42
|
+
import { arrayEach } from "./../../helpers/array.mjs";
|
43
|
+
/**
|
44
|
+
* Highlight class responsible for managing Walkontable Selection classes.
|
45
|
+
*
|
46
|
+
* With Highlight object you can manipulate four different highlight types:
|
47
|
+
* - `cell` can be added only to a single cell at a time and it defines currently selected cell;
|
48
|
+
* - `fill` can occur only once and its highlight defines selection of autofill functionality (managed by the plugin with the same name);
|
49
|
+
* - `areas` can be added to multiple cells at a time. This type highlights selected cell or multiple cells.
|
50
|
+
* The multiple cells have to be defined as an uninterrupted order (regular shape). Otherwise, the new layer of
|
51
|
+
* that type should be created to manage not-consecutive selection;
|
52
|
+
* - `header` can occur multiple times. This type is designed to highlight only headers. Like `area` type it
|
53
|
+
* can appear with multiple highlights (accessed under different level layers).
|
54
|
+
*
|
55
|
+
* @class Highlight
|
56
|
+
* @util
|
57
|
+
*/
|
51
58
|
var Highlight = /*#__PURE__*/function (_Symbol$iterator) {
|
52
59
|
function Highlight(options) {
|
53
60
|
_classCallCheck(this, Highlight);
|