handsontable 12.2.0 → 12.3.0-next-9dc4f5d-20221209
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
@@ -0,0 +1,269 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
require("core-js/modules/es.symbol.to-primitive.js");
|
4
|
+
require("core-js/modules/es.date.to-primitive.js");
|
5
|
+
require("core-js/modules/es.symbol.js");
|
6
|
+
require("core-js/modules/es.symbol.description.js");
|
7
|
+
require("core-js/modules/es.number.constructor.js");
|
8
|
+
require("core-js/modules/es.symbol.iterator.js");
|
9
|
+
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); }
|
10
|
+
exports.__esModule = true;
|
11
|
+
exports.CopyableRangesFactory = void 0;
|
12
|
+
exports.normalizeRanges = normalizeRanges;
|
13
|
+
require("core-js/modules/es.array.index-of.js");
|
14
|
+
require("core-js/modules/es.array.iterator.js");
|
15
|
+
require("core-js/modules/es.object.to-string.js");
|
16
|
+
require("core-js/modules/es.string.iterator.js");
|
17
|
+
require("core-js/modules/es.weak-map.js");
|
18
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
19
|
+
require("core-js/modules/es.weak-set.js");
|
20
|
+
var _array = require("../../helpers/array");
|
21
|
+
var _number = require("../../helpers/number");
|
22
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
23
|
+
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); } }
|
24
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
25
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
26
|
+
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); }
|
27
|
+
function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
|
28
|
+
function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
|
29
|
+
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
30
|
+
function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
|
31
|
+
function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
|
32
|
+
function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
|
33
|
+
function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
|
34
|
+
function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
|
35
|
+
function _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError("attempted to set read only private field"); } descriptor.value = value; } }
|
36
|
+
var _selectedRange = /*#__PURE__*/new WeakMap();
|
37
|
+
var _countRows = /*#__PURE__*/new WeakMap();
|
38
|
+
var _countColumns = /*#__PURE__*/new WeakMap();
|
39
|
+
var _rowsLimit = /*#__PURE__*/new WeakMap();
|
40
|
+
var _columnsLimit = /*#__PURE__*/new WeakMap();
|
41
|
+
var _countColumnHeaders = /*#__PURE__*/new WeakMap();
|
42
|
+
var _trimColumnsRange = /*#__PURE__*/new WeakSet();
|
43
|
+
var _trimRowsRange = /*#__PURE__*/new WeakSet();
|
44
|
+
/**
|
45
|
+
* The utils class produces the selection ranges in the `{startRow, startCol, endRow, endCol}` format
|
46
|
+
* based on the current table selection. The CopyPaste plugin consumes that ranges to generate
|
47
|
+
* appropriate data ready to copy to the clipboard.
|
48
|
+
*
|
49
|
+
* @private
|
50
|
+
*/
|
51
|
+
var CopyableRangesFactory = /*#__PURE__*/function () {
|
52
|
+
/**
|
53
|
+
* @type {CellRange}
|
54
|
+
*/
|
55
|
+
|
56
|
+
/**
|
57
|
+
* @type {function(): number}
|
58
|
+
*/
|
59
|
+
|
60
|
+
/**
|
61
|
+
* @type {function(): number}
|
62
|
+
*/
|
63
|
+
|
64
|
+
/**
|
65
|
+
* @type {function(): number}
|
66
|
+
*/
|
67
|
+
|
68
|
+
/**
|
69
|
+
* @type {function(): number}
|
70
|
+
*/
|
71
|
+
|
72
|
+
/**
|
73
|
+
* @type {function(): number}
|
74
|
+
*/
|
75
|
+
|
76
|
+
/* eslint-disable jsdoc/require-description-complete-sentence */
|
77
|
+
/**
|
78
|
+
* @param {{
|
79
|
+
* countRows: function(): number,
|
80
|
+
* countColumns: function(): number,
|
81
|
+
* rowsLimit: function(): number,
|
82
|
+
* columnsLimit: function(): number,
|
83
|
+
* countColumnHeaders: function(): number
|
84
|
+
* }} dependencies The utils class dependencies.
|
85
|
+
*/
|
86
|
+
function CopyableRangesFactory(_ref) {
|
87
|
+
var countRows = _ref.countRows,
|
88
|
+
countColumns = _ref.countColumns,
|
89
|
+
rowsLimit = _ref.rowsLimit,
|
90
|
+
columnsLimit = _ref.columnsLimit,
|
91
|
+
countColumnHeaders = _ref.countColumnHeaders;
|
92
|
+
_classCallCheck(this, CopyableRangesFactory);
|
93
|
+
_classPrivateMethodInitSpec(this, _trimRowsRange);
|
94
|
+
_classPrivateMethodInitSpec(this, _trimColumnsRange);
|
95
|
+
_classPrivateFieldInitSpec(this, _selectedRange, {
|
96
|
+
writable: true,
|
97
|
+
value: void 0
|
98
|
+
});
|
99
|
+
_classPrivateFieldInitSpec(this, _countRows, {
|
100
|
+
writable: true,
|
101
|
+
value: void 0
|
102
|
+
});
|
103
|
+
_classPrivateFieldInitSpec(this, _countColumns, {
|
104
|
+
writable: true,
|
105
|
+
value: void 0
|
106
|
+
});
|
107
|
+
_classPrivateFieldInitSpec(this, _rowsLimit, {
|
108
|
+
writable: true,
|
109
|
+
value: void 0
|
110
|
+
});
|
111
|
+
_classPrivateFieldInitSpec(this, _columnsLimit, {
|
112
|
+
writable: true,
|
113
|
+
value: void 0
|
114
|
+
});
|
115
|
+
_classPrivateFieldInitSpec(this, _countColumnHeaders, {
|
116
|
+
writable: true,
|
117
|
+
value: void 0
|
118
|
+
});
|
119
|
+
_classPrivateFieldSet(this, _countRows, countRows);
|
120
|
+
_classPrivateFieldSet(this, _countColumns, countColumns);
|
121
|
+
_classPrivateFieldSet(this, _rowsLimit, rowsLimit);
|
122
|
+
_classPrivateFieldSet(this, _columnsLimit, columnsLimit);
|
123
|
+
_classPrivateFieldSet(this, _countColumnHeaders, countColumnHeaders);
|
124
|
+
}
|
125
|
+
/* eslint-enable jsdoc/require-description-complete-sentence */
|
126
|
+
|
127
|
+
/**
|
128
|
+
* Sets the selection range to be processed.
|
129
|
+
*
|
130
|
+
* @param {CellRange} selectedRange The selection range represented by the CellRange class.
|
131
|
+
*/
|
132
|
+
_createClass(CopyableRangesFactory, [{
|
133
|
+
key: "setSelectedRange",
|
134
|
+
value: function setSelectedRange(selectedRange) {
|
135
|
+
_classPrivateFieldSet(this, _selectedRange, selectedRange);
|
136
|
+
}
|
137
|
+
|
138
|
+
/**
|
139
|
+
* Returns a new coords object within the dataset range (cells) with `startRow`, `startCol`, `endRow`
|
140
|
+
* and `endCol` keys.
|
141
|
+
*
|
142
|
+
* @returns {{startRow: number, startCol: number, endRow: number, endCol: number} | null}
|
143
|
+
*/
|
144
|
+
}, {
|
145
|
+
key: "getCellsRange",
|
146
|
+
value: function getCellsRange() {
|
147
|
+
if (_classPrivateFieldGet(this, _countRows).call(this) === 0 || _classPrivateFieldGet(this, _countColumns).call(this) === 0) {
|
148
|
+
return null;
|
149
|
+
}
|
150
|
+
var _classPrivateFieldGet2 = _classPrivateFieldGet(this, _selectedRange).getTopStartCorner(),
|
151
|
+
startRow = _classPrivateFieldGet2.row,
|
152
|
+
startCol = _classPrivateFieldGet2.col;
|
153
|
+
var _classPrivateFieldGet3 = _classPrivateFieldGet(this, _selectedRange).getBottomEndCorner(),
|
154
|
+
endRow = _classPrivateFieldGet3.row,
|
155
|
+
endCol = _classPrivateFieldGet3.col;
|
156
|
+
var finalEndRow = _classPrivateMethodGet(this, _trimRowsRange, _trimRowsRange2).call(this, startRow, endRow);
|
157
|
+
var finalEndCol = _classPrivateMethodGet(this, _trimColumnsRange, _trimColumnsRange2).call(this, startCol, endCol);
|
158
|
+
var isRangeTrimmed = endRow !== finalEndRow || endCol !== finalEndCol;
|
159
|
+
return {
|
160
|
+
isRangeTrimmed: isRangeTrimmed,
|
161
|
+
startRow: startRow,
|
162
|
+
startCol: startCol,
|
163
|
+
endRow: finalEndRow,
|
164
|
+
endCol: finalEndCol
|
165
|
+
};
|
166
|
+
}
|
167
|
+
|
168
|
+
/**
|
169
|
+
* Returns a new coords object within the most-bottom column headers range with `startRow`,
|
170
|
+
* `startCol`, `endRow` and `endCol` keys.
|
171
|
+
*
|
172
|
+
* @returns {{startRow: number, startCol: number, endRow: number, endCol: number} | null}
|
173
|
+
*/
|
174
|
+
}, {
|
175
|
+
key: "getMostBottomColumnHeadersRange",
|
176
|
+
value: function getMostBottomColumnHeadersRange() {
|
177
|
+
if (_classPrivateFieldGet(this, _countColumns).call(this) === 0 || _classPrivateFieldGet(this, _countColumnHeaders).call(this) === 0) {
|
178
|
+
return null;
|
179
|
+
}
|
180
|
+
var _classPrivateFieldGet4 = _classPrivateFieldGet(this, _selectedRange).getTopStartCorner(),
|
181
|
+
startCol = _classPrivateFieldGet4.col;
|
182
|
+
var _classPrivateFieldGet5 = _classPrivateFieldGet(this, _selectedRange).getBottomEndCorner(),
|
183
|
+
endCol = _classPrivateFieldGet5.col;
|
184
|
+
var finalEndCol = _classPrivateMethodGet(this, _trimColumnsRange, _trimColumnsRange2).call(this, startCol, endCol);
|
185
|
+
var isRangeTrimmed = endCol !== finalEndCol;
|
186
|
+
return {
|
187
|
+
isRangeTrimmed: isRangeTrimmed,
|
188
|
+
startRow: -1,
|
189
|
+
startCol: startCol,
|
190
|
+
endRow: -1,
|
191
|
+
endCol: finalEndCol
|
192
|
+
};
|
193
|
+
}
|
194
|
+
|
195
|
+
/**
|
196
|
+
* Returns a new coords object within all column headers layers (including nested headers) range with
|
197
|
+
* `startRow`, `startCol`, `endRow` and `endCol` keys.
|
198
|
+
*
|
199
|
+
* @returns {{startRow: number, startCol: number, endRow: number, endCol: number} | null}
|
200
|
+
*/
|
201
|
+
}, {
|
202
|
+
key: "getAllColumnHeadersRange",
|
203
|
+
value: function getAllColumnHeadersRange() {
|
204
|
+
if (_classPrivateFieldGet(this, _countColumns).call(this) === 0 || _classPrivateFieldGet(this, _countColumnHeaders).call(this) === 0) {
|
205
|
+
return null;
|
206
|
+
}
|
207
|
+
var _classPrivateFieldGet6 = _classPrivateFieldGet(this, _selectedRange).getTopStartCorner(),
|
208
|
+
startCol = _classPrivateFieldGet6.col;
|
209
|
+
var _classPrivateFieldGet7 = _classPrivateFieldGet(this, _selectedRange).getBottomEndCorner(),
|
210
|
+
endCol = _classPrivateFieldGet7.col;
|
211
|
+
var finalEndCol = _classPrivateMethodGet(this, _trimColumnsRange, _trimColumnsRange2).call(this, startCol, endCol);
|
212
|
+
var isRangeTrimmed = endCol !== finalEndCol;
|
213
|
+
return {
|
214
|
+
isRangeTrimmed: isRangeTrimmed,
|
215
|
+
startRow: -_classPrivateFieldGet(this, _countColumnHeaders).call(this),
|
216
|
+
startCol: startCol,
|
217
|
+
endRow: -1,
|
218
|
+
endCol: finalEndCol
|
219
|
+
};
|
220
|
+
}
|
221
|
+
|
222
|
+
/**
|
223
|
+
* Trimmed the columns range to the limit.
|
224
|
+
*
|
225
|
+
* @param {*} startColumn The lowest column index in the range.
|
226
|
+
* @param {*} endColumn The highest column index in the range.
|
227
|
+
* @returns {number} Returns trimmed column index if it exceeds the limit.
|
228
|
+
*/
|
229
|
+
}]);
|
230
|
+
return CopyableRangesFactory;
|
231
|
+
}();
|
232
|
+
/**
|
233
|
+
* Returns an object with `rows` and `columns` keys. The arrays contains sorted indexes
|
234
|
+
* generated according to the given `ranges` array.
|
235
|
+
*
|
236
|
+
* @param {Array<{startRow: number, startCol: number, endRow: number, endCol: number}>} ranges The range to process.
|
237
|
+
* @returns {{rows: number[], columns: number[]}}
|
238
|
+
*/
|
239
|
+
exports.CopyableRangesFactory = CopyableRangesFactory;
|
240
|
+
function _trimColumnsRange2(startColumn, endColumn) {
|
241
|
+
return Math.min(endColumn, Math.max(startColumn + _classPrivateFieldGet(this, _columnsLimit).call(this) - 1, startColumn));
|
242
|
+
}
|
243
|
+
function _trimRowsRange2(startRow, endRow) {
|
244
|
+
return Math.min(endRow, Math.max(startRow + _classPrivateFieldGet(this, _rowsLimit).call(this) - 1, startRow));
|
245
|
+
}
|
246
|
+
function normalizeRanges(ranges) {
|
247
|
+
var rows = [];
|
248
|
+
var columns = [];
|
249
|
+
(0, _array.arrayEach)(ranges, function (range) {
|
250
|
+
var minRow = Math.min(range.startRow, range.endRow);
|
251
|
+
var maxRow = Math.max(range.startRow, range.endRow);
|
252
|
+
(0, _number.rangeEach)(minRow, maxRow, function (row) {
|
253
|
+
if (rows.indexOf(row) === -1) {
|
254
|
+
rows.push(row);
|
255
|
+
}
|
256
|
+
});
|
257
|
+
var minColumn = Math.min(range.startCol, range.endCol);
|
258
|
+
var maxColumn = Math.max(range.startCol, range.endCol);
|
259
|
+
(0, _number.rangeEach)(minColumn, maxColumn, function (column) {
|
260
|
+
if (columns.indexOf(column) === -1) {
|
261
|
+
columns.push(column);
|
262
|
+
}
|
263
|
+
});
|
264
|
+
});
|
265
|
+
return {
|
266
|
+
rows: rows,
|
267
|
+
columns: columns
|
268
|
+
};
|
269
|
+
}
|
@@ -0,0 +1,264 @@
|
|
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
|
+
import "core-js/modules/es.array.index-of.js";
|
3
|
+
import "core-js/modules/es.array.iterator.js";
|
4
|
+
import "core-js/modules/es.object.to-string.js";
|
5
|
+
import "core-js/modules/es.string.iterator.js";
|
6
|
+
import "core-js/modules/es.weak-map.js";
|
7
|
+
import "core-js/modules/web.dom-collections.iterator.js";
|
8
|
+
import "core-js/modules/es.weak-set.js";
|
9
|
+
import "core-js/modules/es.symbol.to-primitive.js";
|
10
|
+
import "core-js/modules/es.date.to-primitive.js";
|
11
|
+
import "core-js/modules/es.symbol.js";
|
12
|
+
import "core-js/modules/es.symbol.description.js";
|
13
|
+
import "core-js/modules/es.number.constructor.js";
|
14
|
+
import "core-js/modules/es.symbol.iterator.js";
|
15
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
16
|
+
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); } }
|
17
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
18
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
19
|
+
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); }
|
20
|
+
function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
|
21
|
+
function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
|
22
|
+
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
23
|
+
function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
|
24
|
+
function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
|
25
|
+
function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
|
26
|
+
function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
|
27
|
+
function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
|
28
|
+
function _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError("attempted to set read only private field"); } descriptor.value = value; } }
|
29
|
+
import { arrayEach } from "../../helpers/array.mjs";
|
30
|
+
import { rangeEach } from "../../helpers/number.mjs";
|
31
|
+
/**
|
32
|
+
* The utils class produces the selection ranges in the `{startRow, startCol, endRow, endCol}` format
|
33
|
+
* based on the current table selection. The CopyPaste plugin consumes that ranges to generate
|
34
|
+
* appropriate data ready to copy to the clipboard.
|
35
|
+
*
|
36
|
+
* @private
|
37
|
+
*/
|
38
|
+
var _selectedRange = /*#__PURE__*/new WeakMap();
|
39
|
+
var _countRows = /*#__PURE__*/new WeakMap();
|
40
|
+
var _countColumns = /*#__PURE__*/new WeakMap();
|
41
|
+
var _rowsLimit = /*#__PURE__*/new WeakMap();
|
42
|
+
var _columnsLimit = /*#__PURE__*/new WeakMap();
|
43
|
+
var _countColumnHeaders = /*#__PURE__*/new WeakMap();
|
44
|
+
var _trimColumnsRange = /*#__PURE__*/new WeakSet();
|
45
|
+
var _trimRowsRange = /*#__PURE__*/new WeakSet();
|
46
|
+
export var CopyableRangesFactory = /*#__PURE__*/function () {
|
47
|
+
/**
|
48
|
+
* @type {CellRange}
|
49
|
+
*/
|
50
|
+
|
51
|
+
/**
|
52
|
+
* @type {function(): number}
|
53
|
+
*/
|
54
|
+
|
55
|
+
/**
|
56
|
+
* @type {function(): number}
|
57
|
+
*/
|
58
|
+
|
59
|
+
/**
|
60
|
+
* @type {function(): number}
|
61
|
+
*/
|
62
|
+
|
63
|
+
/**
|
64
|
+
* @type {function(): number}
|
65
|
+
*/
|
66
|
+
|
67
|
+
/**
|
68
|
+
* @type {function(): number}
|
69
|
+
*/
|
70
|
+
|
71
|
+
/* eslint-disable jsdoc/require-description-complete-sentence */
|
72
|
+
/**
|
73
|
+
* @param {{
|
74
|
+
* countRows: function(): number,
|
75
|
+
* countColumns: function(): number,
|
76
|
+
* rowsLimit: function(): number,
|
77
|
+
* columnsLimit: function(): number,
|
78
|
+
* countColumnHeaders: function(): number
|
79
|
+
* }} dependencies The utils class dependencies.
|
80
|
+
*/
|
81
|
+
function CopyableRangesFactory(_ref) {
|
82
|
+
var countRows = _ref.countRows,
|
83
|
+
countColumns = _ref.countColumns,
|
84
|
+
rowsLimit = _ref.rowsLimit,
|
85
|
+
columnsLimit = _ref.columnsLimit,
|
86
|
+
countColumnHeaders = _ref.countColumnHeaders;
|
87
|
+
_classCallCheck(this, CopyableRangesFactory);
|
88
|
+
_classPrivateMethodInitSpec(this, _trimRowsRange);
|
89
|
+
_classPrivateMethodInitSpec(this, _trimColumnsRange);
|
90
|
+
_classPrivateFieldInitSpec(this, _selectedRange, {
|
91
|
+
writable: true,
|
92
|
+
value: void 0
|
93
|
+
});
|
94
|
+
_classPrivateFieldInitSpec(this, _countRows, {
|
95
|
+
writable: true,
|
96
|
+
value: void 0
|
97
|
+
});
|
98
|
+
_classPrivateFieldInitSpec(this, _countColumns, {
|
99
|
+
writable: true,
|
100
|
+
value: void 0
|
101
|
+
});
|
102
|
+
_classPrivateFieldInitSpec(this, _rowsLimit, {
|
103
|
+
writable: true,
|
104
|
+
value: void 0
|
105
|
+
});
|
106
|
+
_classPrivateFieldInitSpec(this, _columnsLimit, {
|
107
|
+
writable: true,
|
108
|
+
value: void 0
|
109
|
+
});
|
110
|
+
_classPrivateFieldInitSpec(this, _countColumnHeaders, {
|
111
|
+
writable: true,
|
112
|
+
value: void 0
|
113
|
+
});
|
114
|
+
_classPrivateFieldSet(this, _countRows, countRows);
|
115
|
+
_classPrivateFieldSet(this, _countColumns, countColumns);
|
116
|
+
_classPrivateFieldSet(this, _rowsLimit, rowsLimit);
|
117
|
+
_classPrivateFieldSet(this, _columnsLimit, columnsLimit);
|
118
|
+
_classPrivateFieldSet(this, _countColumnHeaders, countColumnHeaders);
|
119
|
+
}
|
120
|
+
/* eslint-enable jsdoc/require-description-complete-sentence */
|
121
|
+
|
122
|
+
/**
|
123
|
+
* Sets the selection range to be processed.
|
124
|
+
*
|
125
|
+
* @param {CellRange} selectedRange The selection range represented by the CellRange class.
|
126
|
+
*/
|
127
|
+
_createClass(CopyableRangesFactory, [{
|
128
|
+
key: "setSelectedRange",
|
129
|
+
value: function setSelectedRange(selectedRange) {
|
130
|
+
_classPrivateFieldSet(this, _selectedRange, selectedRange);
|
131
|
+
}
|
132
|
+
|
133
|
+
/**
|
134
|
+
* Returns a new coords object within the dataset range (cells) with `startRow`, `startCol`, `endRow`
|
135
|
+
* and `endCol` keys.
|
136
|
+
*
|
137
|
+
* @returns {{startRow: number, startCol: number, endRow: number, endCol: number} | null}
|
138
|
+
*/
|
139
|
+
}, {
|
140
|
+
key: "getCellsRange",
|
141
|
+
value: function getCellsRange() {
|
142
|
+
if (_classPrivateFieldGet(this, _countRows).call(this) === 0 || _classPrivateFieldGet(this, _countColumns).call(this) === 0) {
|
143
|
+
return null;
|
144
|
+
}
|
145
|
+
var _classPrivateFieldGet2 = _classPrivateFieldGet(this, _selectedRange).getTopStartCorner(),
|
146
|
+
startRow = _classPrivateFieldGet2.row,
|
147
|
+
startCol = _classPrivateFieldGet2.col;
|
148
|
+
var _classPrivateFieldGet3 = _classPrivateFieldGet(this, _selectedRange).getBottomEndCorner(),
|
149
|
+
endRow = _classPrivateFieldGet3.row,
|
150
|
+
endCol = _classPrivateFieldGet3.col;
|
151
|
+
var finalEndRow = _classPrivateMethodGet(this, _trimRowsRange, _trimRowsRange2).call(this, startRow, endRow);
|
152
|
+
var finalEndCol = _classPrivateMethodGet(this, _trimColumnsRange, _trimColumnsRange2).call(this, startCol, endCol);
|
153
|
+
var isRangeTrimmed = endRow !== finalEndRow || endCol !== finalEndCol;
|
154
|
+
return {
|
155
|
+
isRangeTrimmed: isRangeTrimmed,
|
156
|
+
startRow: startRow,
|
157
|
+
startCol: startCol,
|
158
|
+
endRow: finalEndRow,
|
159
|
+
endCol: finalEndCol
|
160
|
+
};
|
161
|
+
}
|
162
|
+
|
163
|
+
/**
|
164
|
+
* Returns a new coords object within the most-bottom column headers range with `startRow`,
|
165
|
+
* `startCol`, `endRow` and `endCol` keys.
|
166
|
+
*
|
167
|
+
* @returns {{startRow: number, startCol: number, endRow: number, endCol: number} | null}
|
168
|
+
*/
|
169
|
+
}, {
|
170
|
+
key: "getMostBottomColumnHeadersRange",
|
171
|
+
value: function getMostBottomColumnHeadersRange() {
|
172
|
+
if (_classPrivateFieldGet(this, _countColumns).call(this) === 0 || _classPrivateFieldGet(this, _countColumnHeaders).call(this) === 0) {
|
173
|
+
return null;
|
174
|
+
}
|
175
|
+
var _classPrivateFieldGet4 = _classPrivateFieldGet(this, _selectedRange).getTopStartCorner(),
|
176
|
+
startCol = _classPrivateFieldGet4.col;
|
177
|
+
var _classPrivateFieldGet5 = _classPrivateFieldGet(this, _selectedRange).getBottomEndCorner(),
|
178
|
+
endCol = _classPrivateFieldGet5.col;
|
179
|
+
var finalEndCol = _classPrivateMethodGet(this, _trimColumnsRange, _trimColumnsRange2).call(this, startCol, endCol);
|
180
|
+
var isRangeTrimmed = endCol !== finalEndCol;
|
181
|
+
return {
|
182
|
+
isRangeTrimmed: isRangeTrimmed,
|
183
|
+
startRow: -1,
|
184
|
+
startCol: startCol,
|
185
|
+
endRow: -1,
|
186
|
+
endCol: finalEndCol
|
187
|
+
};
|
188
|
+
}
|
189
|
+
|
190
|
+
/**
|
191
|
+
* Returns a new coords object within all column headers layers (including nested headers) range with
|
192
|
+
* `startRow`, `startCol`, `endRow` and `endCol` keys.
|
193
|
+
*
|
194
|
+
* @returns {{startRow: number, startCol: number, endRow: number, endCol: number} | null}
|
195
|
+
*/
|
196
|
+
}, {
|
197
|
+
key: "getAllColumnHeadersRange",
|
198
|
+
value: function getAllColumnHeadersRange() {
|
199
|
+
if (_classPrivateFieldGet(this, _countColumns).call(this) === 0 || _classPrivateFieldGet(this, _countColumnHeaders).call(this) === 0) {
|
200
|
+
return null;
|
201
|
+
}
|
202
|
+
var _classPrivateFieldGet6 = _classPrivateFieldGet(this, _selectedRange).getTopStartCorner(),
|
203
|
+
startCol = _classPrivateFieldGet6.col;
|
204
|
+
var _classPrivateFieldGet7 = _classPrivateFieldGet(this, _selectedRange).getBottomEndCorner(),
|
205
|
+
endCol = _classPrivateFieldGet7.col;
|
206
|
+
var finalEndCol = _classPrivateMethodGet(this, _trimColumnsRange, _trimColumnsRange2).call(this, startCol, endCol);
|
207
|
+
var isRangeTrimmed = endCol !== finalEndCol;
|
208
|
+
return {
|
209
|
+
isRangeTrimmed: isRangeTrimmed,
|
210
|
+
startRow: -_classPrivateFieldGet(this, _countColumnHeaders).call(this),
|
211
|
+
startCol: startCol,
|
212
|
+
endRow: -1,
|
213
|
+
endCol: finalEndCol
|
214
|
+
};
|
215
|
+
}
|
216
|
+
|
217
|
+
/**
|
218
|
+
* Trimmed the columns range to the limit.
|
219
|
+
*
|
220
|
+
* @param {*} startColumn The lowest column index in the range.
|
221
|
+
* @param {*} endColumn The highest column index in the range.
|
222
|
+
* @returns {number} Returns trimmed column index if it exceeds the limit.
|
223
|
+
*/
|
224
|
+
}]);
|
225
|
+
return CopyableRangesFactory;
|
226
|
+
}();
|
227
|
+
|
228
|
+
/**
|
229
|
+
* Returns an object with `rows` and `columns` keys. The arrays contains sorted indexes
|
230
|
+
* generated according to the given `ranges` array.
|
231
|
+
*
|
232
|
+
* @param {Array<{startRow: number, startCol: number, endRow: number, endCol: number}>} ranges The range to process.
|
233
|
+
* @returns {{rows: number[], columns: number[]}}
|
234
|
+
*/
|
235
|
+
function _trimColumnsRange2(startColumn, endColumn) {
|
236
|
+
return Math.min(endColumn, Math.max(startColumn + _classPrivateFieldGet(this, _columnsLimit).call(this) - 1, startColumn));
|
237
|
+
}
|
238
|
+
function _trimRowsRange2(startRow, endRow) {
|
239
|
+
return Math.min(endRow, Math.max(startRow + _classPrivateFieldGet(this, _rowsLimit).call(this) - 1, startRow));
|
240
|
+
}
|
241
|
+
export function normalizeRanges(ranges) {
|
242
|
+
var rows = [];
|
243
|
+
var columns = [];
|
244
|
+
arrayEach(ranges, function (range) {
|
245
|
+
var minRow = Math.min(range.startRow, range.endRow);
|
246
|
+
var maxRow = Math.max(range.startRow, range.endRow);
|
247
|
+
rangeEach(minRow, maxRow, function (row) {
|
248
|
+
if (rows.indexOf(row) === -1) {
|
249
|
+
rows.push(row);
|
250
|
+
}
|
251
|
+
});
|
252
|
+
var minColumn = Math.min(range.startCol, range.endCol);
|
253
|
+
var maxColumn = Math.max(range.startCol, range.endCol);
|
254
|
+
rangeEach(minColumn, maxColumn, function (column) {
|
255
|
+
if (columns.indexOf(column) === -1) {
|
256
|
+
columns.push(column);
|
257
|
+
}
|
258
|
+
});
|
259
|
+
});
|
260
|
+
return {
|
261
|
+
rows: rows,
|
262
|
+
columns: columns
|
263
|
+
};
|
264
|
+
}
|
@@ -1,5 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
+
require("core-js/modules/es.symbol.iterator.js");
|
3
4
|
exports.__esModule = true;
|
4
5
|
exports.createElement = createElement;
|
5
6
|
exports.deactivateElement = deactivateElement;
|
@@ -9,6 +10,11 @@ require("core-js/modules/es.object.to-string.js");
|
|
9
10
|
require("core-js/modules/es.string.iterator.js");
|
10
11
|
require("core-js/modules/es.weak-set.js");
|
11
12
|
require("core-js/modules/web.dom-collections.iterator.js");
|
13
|
+
require("core-js/modules/es.symbol.to-primitive.js");
|
14
|
+
require("core-js/modules/es.date.to-primitive.js");
|
15
|
+
require("core-js/modules/es.symbol.js");
|
16
|
+
require("core-js/modules/es.symbol.description.js");
|
17
|
+
require("core-js/modules/es.number.constructor.js");
|
12
18
|
require("core-js/modules/es.weak-map.js");
|
13
19
|
var _eventManager = _interopRequireDefault(require("../../eventManager"));
|
14
20
|
var _localHooks = _interopRequireDefault(require("../../mixins/localHooks"));
|
@@ -16,13 +22,17 @@ var _object = require("../../helpers/object");
|
|
16
22
|
var _browser = require("../../helpers/browser");
|
17
23
|
var _element = require("../../helpers/dom/element");
|
18
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
25
|
+
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); }
|
19
26
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
20
|
-
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); } }
|
27
|
+
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); } }
|
21
28
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
29
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
30
|
+
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); }
|
22
31
|
/**
|
23
32
|
* @private
|
24
33
|
* @class FocusableWrapper
|
25
|
-
*/
|
34
|
+
*/
|
35
|
+
var FocusableWrapper = /*#__PURE__*/function () {
|
26
36
|
function FocusableWrapper(container) {
|
27
37
|
_classCallCheck(this, FocusableWrapper);
|
28
38
|
this.rootDocument = container.defaultView ? container : container.ownerDocument;
|
@@ -1,20 +1,30 @@
|
|
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
|
import "core-js/modules/es.array.iterator.js";
|
2
3
|
import "core-js/modules/es.object.to-string.js";
|
3
4
|
import "core-js/modules/es.string.iterator.js";
|
4
5
|
import "core-js/modules/es.weak-set.js";
|
5
6
|
import "core-js/modules/web.dom-collections.iterator.js";
|
6
7
|
import "core-js/modules/es.weak-map.js";
|
8
|
+
import "core-js/modules/es.symbol.to-primitive.js";
|
9
|
+
import "core-js/modules/es.date.to-primitive.js";
|
10
|
+
import "core-js/modules/es.symbol.js";
|
11
|
+
import "core-js/modules/es.symbol.description.js";
|
12
|
+
import "core-js/modules/es.number.constructor.js";
|
13
|
+
import "core-js/modules/es.symbol.iterator.js";
|
7
14
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
8
|
-
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); } }
|
15
|
+
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); } }
|
9
16
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
17
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
18
|
+
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); }
|
10
19
|
import EventManager from "../../eventManager.mjs";
|
11
20
|
import localHooks from "../../mixins/localHooks.mjs";
|
12
21
|
import { mixin } from "../../helpers/object.mjs";
|
13
22
|
import { isMobileBrowser } from "../../helpers/browser.mjs";
|
14
|
-
import { selectElementIfAllowed } from "../../helpers/dom/element.mjs";
|
15
|
-
|
16
|
-
|
17
|
-
|
23
|
+
import { selectElementIfAllowed } from "../../helpers/dom/element.mjs";
|
24
|
+
/**
|
25
|
+
* @private
|
26
|
+
* @class FocusableWrapper
|
27
|
+
*/
|
18
28
|
var FocusableWrapper = /*#__PURE__*/function () {
|
19
29
|
function FocusableWrapper(container) {
|
20
30
|
_classCallCheck(this, FocusableWrapper);
|
@@ -1,15 +1,29 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
+
require("core-js/modules/es.symbol.to-primitive.js");
|
4
|
+
require("core-js/modules/es.date.to-primitive.js");
|
5
|
+
require("core-js/modules/es.symbol.js");
|
6
|
+
require("core-js/modules/es.symbol.description.js");
|
7
|
+
require("core-js/modules/es.object.to-string.js");
|
8
|
+
require("core-js/modules/es.number.constructor.js");
|
9
|
+
require("core-js/modules/es.symbol.iterator.js");
|
10
|
+
require("core-js/modules/es.array.iterator.js");
|
11
|
+
require("core-js/modules/es.string.iterator.js");
|
12
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
13
|
+
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); }
|
3
14
|
exports.__esModule = true;
|
4
15
|
exports.default = void 0;
|
5
16
|
var _clipboardData = _interopRequireDefault(require("./clipboardData"));
|
6
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
7
|
-
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); } }
|
18
|
+
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); } }
|
8
19
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
20
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
21
|
+
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); }
|
9
22
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
10
23
|
/**
|
11
24
|
* @private
|
12
|
-
*/
|
25
|
+
*/
|
26
|
+
var PasteEvent = /*#__PURE__*/_createClass(function PasteEvent() {
|
13
27
|
_classCallCheck(this, PasteEvent);
|
14
28
|
this.clipboardData = new _clipboardData.default();
|
15
29
|
});
|