handsontable 12.2.0 → 12.3.0-next-bb1a7c2-20221208
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/3rdparty/walkontable/src/border.js +13 -6
- package/3rdparty/walkontable/src/border.mjs +12 -5
- package/3rdparty/walkontable/src/calculator/viewportColumns.js +10 -1
- package/3rdparty/walkontable/src/calculator/viewportColumns.mjs +10 -1
- package/3rdparty/walkontable/src/calculator/viewportRows.js +10 -1
- package/3rdparty/walkontable/src/calculator/viewportRows.mjs +10 -1
- package/3rdparty/walkontable/src/cell/coords.d.ts +1 -1
- package/3rdparty/walkontable/src/cell/coords.js +64 -26
- package/3rdparty/walkontable/src/cell/coords.mjs +64 -26
- package/3rdparty/walkontable/src/cell/range.d.ts +19 -16
- package/3rdparty/walkontable/src/cell/range.js +199 -104
- package/3rdparty/walkontable/src/cell/range.mjs +201 -106
- package/3rdparty/walkontable/src/core/_base.js +17 -3
- package/3rdparty/walkontable/src/core/_base.mjs +20 -6
- package/3rdparty/walkontable/src/core/clone.js +13 -7
- package/3rdparty/walkontable/src/core/clone.mjs +15 -9
- package/3rdparty/walkontable/src/core/core.js +8 -2
- package/3rdparty/walkontable/src/core/core.mjs +10 -4
- package/3rdparty/walkontable/src/event.js +10 -1
- package/3rdparty/walkontable/src/event.mjs +10 -1
- package/3rdparty/walkontable/src/facade/core.js +16 -2
- package/3rdparty/walkontable/src/facade/core.mjs +22 -8
- package/3rdparty/walkontable/src/filter/column.js +16 -2
- package/3rdparty/walkontable/src/filter/column.mjs +16 -2
- package/3rdparty/walkontable/src/filter/row.js +16 -2
- package/3rdparty/walkontable/src/filter/row.mjs +16 -2
- package/3rdparty/walkontable/src/overlay/_base.js +17 -3
- package/3rdparty/walkontable/src/overlay/_base.mjs +24 -10
- package/3rdparty/walkontable/src/overlay/bottom.js +13 -7
- package/3rdparty/walkontable/src/overlay/bottom.mjs +15 -9
- package/3rdparty/walkontable/src/overlay/bottomInlineStartCorner.js +8 -2
- package/3rdparty/walkontable/src/overlay/bottomInlineStartCorner.mjs +10 -4
- package/3rdparty/walkontable/src/overlay/inlineStart.js +8 -2
- package/3rdparty/walkontable/src/overlay/inlineStart.mjs +10 -4
- package/3rdparty/walkontable/src/overlay/top.js +13 -7
- package/3rdparty/walkontable/src/overlay/top.mjs +15 -9
- package/3rdparty/walkontable/src/overlay/topInlineStartCorner.js +13 -7
- package/3rdparty/walkontable/src/overlay/topInlineStartCorner.mjs +15 -9
- package/3rdparty/walkontable/src/overlays.js +69 -19
- package/3rdparty/walkontable/src/overlays.mjs +71 -21
- package/3rdparty/walkontable/src/renderer/_base.js +16 -2
- package/3rdparty/walkontable/src/renderer/_base.mjs +20 -6
- package/3rdparty/walkontable/src/renderer/cells.js +8 -2
- package/3rdparty/walkontable/src/renderer/cells.mjs +20 -14
- package/3rdparty/walkontable/src/renderer/colGroup.js +8 -2
- package/3rdparty/walkontable/src/renderer/colGroup.mjs +19 -13
- package/3rdparty/walkontable/src/renderer/columnHeaders.js +8 -2
- package/3rdparty/walkontable/src/renderer/columnHeaders.mjs +19 -13
- package/3rdparty/walkontable/src/renderer/index.js +16 -2
- package/3rdparty/walkontable/src/renderer/index.mjs +20 -6
- package/3rdparty/walkontable/src/renderer/rowHeaders.js +8 -2
- package/3rdparty/walkontable/src/renderer/rowHeaders.mjs +20 -14
- package/3rdparty/walkontable/src/renderer/rows.js +8 -3
- package/3rdparty/walkontable/src/renderer/rows.mjs +8 -3
- package/3rdparty/walkontable/src/renderer/table.js +16 -2
- package/3rdparty/walkontable/src/renderer/table.mjs +16 -2
- package/3rdparty/walkontable/src/scroll.js +16 -3
- package/3rdparty/walkontable/src/scroll.mjs +18 -5
- package/3rdparty/walkontable/src/selection.js +11 -5
- package/3rdparty/walkontable/src/selection.mjs +11 -5
- package/3rdparty/walkontable/src/settings.js +16 -2
- package/3rdparty/walkontable/src/settings.mjs +16 -2
- package/3rdparty/walkontable/src/table/bottom.js +8 -2
- package/3rdparty/walkontable/src/table/bottom.mjs +13 -7
- package/3rdparty/walkontable/src/table/bottomInlineStartCorner.js +8 -2
- package/3rdparty/walkontable/src/table/bottomInlineStartCorner.mjs +14 -8
- package/3rdparty/walkontable/src/table/inlineStart.js +8 -2
- package/3rdparty/walkontable/src/table/inlineStart.mjs +10 -4
- package/3rdparty/walkontable/src/table/master.js +8 -2
- package/3rdparty/walkontable/src/table/master.mjs +13 -7
- package/3rdparty/walkontable/src/table/mixin/calculatedColumns.js +12 -6
- package/3rdparty/walkontable/src/table/mixin/calculatedColumns.mjs +12 -6
- package/3rdparty/walkontable/src/table/mixin/calculatedRows.js +12 -6
- package/3rdparty/walkontable/src/table/mixin/calculatedRows.mjs +12 -6
- package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.js +12 -6
- package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.mjs +12 -6
- package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.js +12 -6
- package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.mjs +12 -6
- package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.js +12 -6
- package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.mjs +12 -6
- package/3rdparty/walkontable/src/table/top.js +8 -2
- package/3rdparty/walkontable/src/table/top.mjs +13 -7
- package/3rdparty/walkontable/src/table/topInlineStartCorner.js +8 -2
- package/3rdparty/walkontable/src/table/topInlineStartCorner.mjs +14 -8
- package/3rdparty/walkontable/src/table.js +13 -6
- package/3rdparty/walkontable/src/table.mjs +21 -14
- package/3rdparty/walkontable/src/utils/column.js +12 -2
- package/3rdparty/walkontable/src/utils/column.mjs +16 -6
- package/3rdparty/walkontable/src/utils/nodesPool.js +16 -2
- package/3rdparty/walkontable/src/utils/nodesPool.mjs +16 -2
- package/3rdparty/walkontable/src/utils/orderView/sharedView.js +8 -2
- package/3rdparty/walkontable/src/utils/orderView/sharedView.mjs +12 -6
- package/3rdparty/walkontable/src/utils/orderView/view.js +16 -2
- package/3rdparty/walkontable/src/utils/orderView/view.mjs +23 -9
- package/3rdparty/walkontable/src/utils/orderView/viewSize.js +16 -2
- package/3rdparty/walkontable/src/utils/orderView/viewSize.mjs +16 -2
- package/3rdparty/walkontable/src/utils/orderView/viewSizeSet.js +16 -2
- package/3rdparty/walkontable/src/utils/orderView/viewSizeSet.mjs +31 -17
- package/3rdparty/walkontable/src/utils/row.js +16 -2
- package/3rdparty/walkontable/src/utils/row.mjs +16 -2
- package/3rdparty/walkontable/src/viewport.js +16 -2
- package/3rdparty/walkontable/src/viewport.mjs +18 -4
- package/CHANGELOG.md +23 -0
- package/base.d.ts +1 -0
- package/base.js +7 -2
- package/base.mjs +9 -4
- package/cellTypes/index.mjs +4 -3
- package/core.d.ts +1 -1
- package/core.js +234 -122
- package/core.mjs +231 -119
- package/dataMap/dataMap.js +98 -28
- package/dataMap/dataMap.mjs +97 -27
- package/dataMap/dataSource.js +14 -2
- package/dataMap/dataSource.mjs +17 -5
- package/dataMap/metaManager/index.js +15 -2
- package/dataMap/metaManager/index.mjs +41 -28
- package/dataMap/metaManager/lazyFactoryMap.js +7 -1
- package/dataMap/metaManager/lazyFactoryMap.mjs +7 -1
- package/dataMap/metaManager/metaLayers/cellMeta.js +13 -8
- package/dataMap/metaManager/metaLayers/cellMeta.mjs +12 -7
- package/dataMap/metaManager/metaLayers/columnMeta.js +15 -2
- package/dataMap/metaManager/metaLayers/columnMeta.mjs +23 -9
- package/dataMap/metaManager/metaLayers/globalMeta.js +26 -2
- package/dataMap/metaManager/metaLayers/globalMeta.mjs +27 -3
- package/dataMap/metaManager/metaLayers/tableMeta.js +17 -3
- package/dataMap/metaManager/metaLayers/tableMeta.mjs +41 -27
- package/dataMap/metaManager/metaSchema.js +119 -66
- package/dataMap/metaManager/metaSchema.mjs +119 -66
- package/dataMap/metaManager/mods/dynamicCellMeta.js +12 -2
- package/dataMap/metaManager/mods/dynamicCellMeta.mjs +26 -16
- package/dataMap/metaManager/mods/extendMetaProperties.js +12 -2
- package/dataMap/metaManager/mods/extendMetaProperties.mjs +10 -1
- package/dataMap/metaManager/utils.js +44 -14
- package/dataMap/metaManager/utils.mjs +51 -20
- package/dataMap/replaceData.js +2 -1
- package/dataMap/replaceData.mjs +24 -22
- package/dist/handsontable.css +9 -9
- package/dist/handsontable.full.css +9 -9
- package/dist/handsontable.full.js +7350 -10885
- package/dist/handsontable.full.min.css +2 -2
- package/dist/handsontable.full.min.js +107 -113
- package/dist/handsontable.js +5800 -4499
- package/dist/handsontable.min.css +2 -2
- package/dist/handsontable.min.js +3 -3
- package/dist/languages/all.js +111 -65
- package/dist/languages/all.min.js +1 -1
- package/dist/languages/ar-AR.js +50 -4
- package/dist/languages/ar-AR.min.js +1 -1
- package/dist/languages/cs-CZ.js +52 -6
- package/dist/languages/cs-CZ.min.js +1 -1
- package/dist/languages/de-CH.js +52 -6
- package/dist/languages/de-CH.min.js +1 -1
- package/dist/languages/de-DE.js +53 -7
- package/dist/languages/de-DE.min.js +1 -1
- package/dist/languages/en-US.js +56 -10
- package/dist/languages/en-US.min.js +1 -1
- package/dist/languages/es-MX.js +56 -10
- package/dist/languages/es-MX.min.js +1 -1
- package/dist/languages/fr-FR.js +55 -9
- package/dist/languages/fr-FR.min.js +1 -1
- package/dist/languages/it-IT.js +55 -9
- package/dist/languages/it-IT.min.js +1 -1
- package/dist/languages/ja-JP.js +83 -33
- package/dist/languages/ja-JP.min.js +1 -1
- package/dist/languages/ko-KR.js +84 -33
- package/dist/languages/ko-KR.min.js +1 -1
- package/dist/languages/lv-LV.js +85 -33
- package/dist/languages/lv-LV.min.js +1 -1
- package/dist/languages/nb-NO.js +86 -33
- package/dist/languages/nb-NO.min.js +1 -1
- package/dist/languages/nl-NL.js +87 -33
- package/dist/languages/nl-NL.min.js +1 -1
- package/dist/languages/pl-PL.js +88 -33
- package/dist/languages/pl-PL.min.js +1 -1
- package/dist/languages/pt-BR.js +68 -19
- package/dist/languages/pt-BR.min.js +1 -1
- package/dist/languages/ru-RU.js +68 -19
- package/dist/languages/ru-RU.min.js +1 -1
- package/dist/languages/sr-SP.js +55 -6
- package/dist/languages/sr-SP.min.js +1 -1
- package/dist/languages/zh-CN.js +55 -6
- package/dist/languages/zh-CN.min.js +1 -1
- package/dist/languages/zh-TW.js +55 -6
- package/dist/languages/zh-TW.min.js +1 -1
- package/editorManager.js +18 -9
- package/editorManager.mjs +15 -6
- package/editors/autocompleteEditor/autocompleteEditor.js +10 -5
- package/editors/autocompleteEditor/autocompleteEditor.mjs +9 -4
- package/editors/baseEditor/baseEditor.js +11 -6
- package/editors/baseEditor/baseEditor.mjs +10 -5
- package/editors/checkboxEditor/checkboxEditor.js +6 -1
- package/editors/checkboxEditor/checkboxEditor.mjs +6 -1
- package/editors/dateEditor/dateEditor.js +6 -1
- package/editors/dateEditor/dateEditor.mjs +6 -1
- package/editors/dropdownEditor/dropdownEditor.js +6 -1
- package/editors/dropdownEditor/dropdownEditor.mjs +6 -1
- package/editors/handsontableEditor/handsontableEditor.js +6 -1
- package/editors/handsontableEditor/handsontableEditor.mjs +6 -1
- package/editors/index.mjs +4 -3
- package/editors/numericEditor/numericEditor.js +6 -1
- package/editors/numericEditor/numericEditor.mjs +6 -1
- package/editors/passwordEditor/passwordEditor.js +6 -1
- package/editors/passwordEditor/passwordEditor.mjs +6 -1
- package/editors/registry.js +3 -0
- package/editors/registry.mjs +5 -1
- package/editors/selectEditor/selectEditor.js +6 -1
- package/editors/selectEditor/selectEditor.mjs +6 -1
- package/editors/textEditor/caretPositioner.mjs +11 -10
- package/editors/textEditor/textEditor.js +7 -2
- package/editors/textEditor/textEditor.mjs +7 -2
- package/editors/timeEditor/timeEditor.js +6 -1
- package/editors/timeEditor/timeEditor.mjs +6 -1
- package/eventManager.js +24 -9
- package/eventManager.mjs +26 -11
- package/helpers/console.mjs +6 -5
- package/helpers/data.d.ts +0 -1
- package/helpers/data.js +0 -49
- package/helpers/data.mjs +1 -49
- package/helpers/dom/element.js +23 -0
- package/helpers/dom/element.mjs +30 -7
- package/helpers/feature.js +9 -36
- package/helpers/feature.mjs +3 -30
- package/helpers/function.mjs +7 -6
- package/helpers/mixed.js +2 -2
- package/helpers/mixed.mjs +9 -8
- package/helpers/object.js +15 -9
- package/helpers/object.mjs +17 -10
- package/helpers/string.mjs +7 -6
- package/helpers/templateLiteralTag.mjs +8 -7
- package/i18n/constants.js +49 -42
- package/i18n/constants.mjs +45 -41
- package/i18n/languages/ar-AR.js +12 -7
- package/i18n/languages/ar-AR.mjs +16 -2
- package/i18n/languages/cs-CZ.js +12 -7
- package/i18n/languages/cs-CZ.mjs +16 -2
- package/i18n/languages/de-CH.js +12 -7
- package/i18n/languages/de-CH.mjs +16 -2
- package/i18n/languages/de-DE.js +12 -7
- package/i18n/languages/de-DE.mjs +16 -2
- package/i18n/languages/en-US.js +13 -8
- package/i18n/languages/en-US.mjs +17 -3
- package/i18n/languages/es-MX.js +13 -8
- package/i18n/languages/es-MX.mjs +19 -4
- package/i18n/languages/fr-FR.js +12 -7
- package/i18n/languages/fr-FR.mjs +16 -2
- package/i18n/languages/it-IT.js +12 -7
- package/i18n/languages/it-IT.mjs +16 -2
- package/i18n/languages/ja-JP.js +12 -7
- package/i18n/languages/ja-JP.mjs +16 -2
- package/i18n/languages/ko-KR.js +12 -7
- package/i18n/languages/ko-KR.mjs +16 -2
- package/i18n/languages/lv-LV.js +13 -8
- package/i18n/languages/lv-LV.mjs +19 -5
- package/i18n/languages/nb-NO.js +12 -7
- package/i18n/languages/nb-NO.mjs +16 -2
- package/i18n/languages/nl-NL.js +13 -8
- package/i18n/languages/nl-NL.mjs +19 -5
- package/i18n/languages/pl-PL.js +13 -8
- package/i18n/languages/pl-PL.mjs +18 -4
- package/i18n/languages/pt-BR.js +12 -7
- package/i18n/languages/pt-BR.mjs +16 -2
- package/i18n/languages/ru-RU.js +12 -7
- package/i18n/languages/ru-RU.mjs +16 -2
- package/i18n/languages/sr-SP.js +12 -7
- package/i18n/languages/sr-SP.mjs +16 -2
- package/i18n/languages/zh-CN.js +12 -7
- package/i18n/languages/zh-CN.mjs +16 -2
- package/i18n/languages/zh-TW.js +12 -7
- package/i18n/languages/zh-TW.mjs +16 -2
- package/i18n/phraseFormatters/substituteVariables.mjs +9 -8
- package/i18n/utils.mjs +10 -9
- package/index.d.ts +9 -0
- package/index.js +4 -2
- package/index.mjs +2 -1
- package/languages/all.js +111 -65
- package/languages/ar-AR.js +50 -4
- package/languages/ar-AR.mjs +16 -2
- package/languages/cs-CZ.js +52 -6
- package/languages/cs-CZ.mjs +16 -2
- package/languages/de-CH.js +52 -6
- package/languages/de-CH.mjs +16 -2
- package/languages/de-DE.js +53 -7
- package/languages/de-DE.mjs +16 -2
- package/languages/en-US.js +56 -10
- package/languages/en-US.mjs +17 -3
- package/languages/es-MX.js +56 -10
- package/languages/es-MX.mjs +19 -4
- package/languages/fr-FR.js +55 -9
- package/languages/fr-FR.mjs +16 -2
- package/languages/index.js +111 -65
- package/languages/it-IT.js +55 -9
- package/languages/it-IT.mjs +16 -2
- package/languages/ja-JP.js +83 -33
- package/languages/ja-JP.mjs +16 -2
- package/languages/ko-KR.js +84 -33
- package/languages/ko-KR.mjs +16 -2
- package/languages/lv-LV.js +85 -33
- package/languages/lv-LV.mjs +19 -5
- package/languages/nb-NO.js +86 -33
- package/languages/nb-NO.mjs +16 -2
- package/languages/nl-NL.js +87 -33
- package/languages/nl-NL.mjs +19 -5
- package/languages/pl-PL.js +88 -33
- package/languages/pl-PL.mjs +18 -4
- package/languages/pt-BR.js +68 -19
- package/languages/pt-BR.mjs +16 -2
- package/languages/ru-RU.js +68 -19
- package/languages/ru-RU.mjs +16 -2
- package/languages/sr-SP.js +55 -6
- package/languages/sr-SP.mjs +16 -2
- package/languages/zh-CN.js +55 -6
- package/languages/zh-CN.mjs +16 -2
- package/languages/zh-TW.js +55 -6
- package/languages/zh-TW.mjs +16 -2
- package/mixins/hooksRefRegisterer.js +6 -3
- package/mixins/hooksRefRegisterer.mjs +6 -3
- package/mixins/localHooks.js +6 -3
- package/mixins/localHooks.mjs +6 -3
- package/package.json +2 -2
- package/pluginHooks.d.ts +7 -2
- package/pluginHooks.js +109 -24
- package/pluginHooks.mjs +109 -24
- package/plugins/autoColumnSize/autoColumnSize.js +7 -2
- package/plugins/autoColumnSize/autoColumnSize.mjs +7 -2
- package/plugins/autoRowSize/autoRowSize.js +16 -7
- package/plugins/autoRowSize/autoRowSize.mjs +16 -7
- package/plugins/autofill/autofill.js +7 -2
- package/plugins/autofill/autofill.mjs +7 -2
- package/plugins/base/base.js +8 -2
- package/plugins/base/base.mjs +8 -2
- package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.js +6 -1
- package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.mjs +6 -1
- package/plugins/bindRowsWithHeaders/maps/looseBindsMap.js +6 -1
- package/plugins/bindRowsWithHeaders/maps/looseBindsMap.mjs +6 -1
- package/plugins/bindRowsWithHeaders/maps/strictBindsMap.js +6 -1
- package/plugins/bindRowsWithHeaders/maps/strictBindsMap.mjs +6 -1
- package/plugins/collapsibleColumns/collapsibleColumns.js +10 -5
- package/plugins/collapsibleColumns/collapsibleColumns.mjs +9 -4
- package/plugins/columnSorting/columnSorting.js +8 -4
- package/plugins/columnSorting/columnSorting.mjs +8 -4
- package/plugins/columnSorting/columnStatesManager.js +12 -6
- package/plugins/columnSorting/columnStatesManager.mjs +9 -3
- package/plugins/columnSorting/rootComparator.mjs +8 -7
- package/plugins/columnSorting/sortFunction/checkbox.mjs +9 -8
- package/plugins/columnSorting/sortFunction/date.mjs +9 -8
- package/plugins/columnSorting/sortFunction/default.mjs +9 -8
- package/plugins/columnSorting/sortFunction/numeric.mjs +9 -8
- package/plugins/columnSummary/columnSummary.js +13 -8
- package/plugins/columnSummary/columnSummary.mjs +13 -8
- package/plugins/columnSummary/endpoints.js +17 -16
- package/plugins/columnSummary/endpoints.mjs +22 -21
- package/plugins/comments/commentEditor.js +16 -2
- package/plugins/comments/commentEditor.mjs +21 -7
- package/plugins/comments/comments.js +15 -4
- package/plugins/comments/comments.mjs +15 -4
- package/plugins/comments/displaySwitch.js +14 -1
- package/plugins/comments/displaySwitch.mjs +14 -1
- package/plugins/contextMenu/commandExecutor.js +22 -7
- package/plugins/contextMenu/commandExecutor.mjs +27 -12
- package/plugins/contextMenu/contextMenu.d.ts +4 -3
- package/plugins/contextMenu/contextMenu.js +7 -17
- package/plugins/contextMenu/contextMenu.mjs +7 -17
- package/plugins/contextMenu/cursor.js +16 -2
- package/plugins/contextMenu/cursor.mjs +21 -7
- package/plugins/contextMenu/itemsFactory.js +23 -8
- package/plugins/contextMenu/itemsFactory.mjs +28 -13
- package/plugins/contextMenu/menu.js +14 -3
- package/plugins/contextMenu/menu.mjs +13 -2
- package/plugins/contextMenu/predefinedItems/removeColumn.js +1 -1
- package/plugins/contextMenu/predefinedItems/removeColumn.mjs +1 -1
- package/plugins/contextMenu/predefinedItems/removeRow.js +1 -1
- package/plugins/contextMenu/predefinedItems/removeRow.mjs +1 -1
- package/plugins/contextMenu/predefinedItems.js +12 -7
- package/plugins/contextMenu/predefinedItems.mjs +14 -1
- package/plugins/contextMenu/utils.mjs +5 -4
- package/plugins/copyPaste/clipboardData.js +16 -2
- package/plugins/copyPaste/clipboardData.mjs +16 -2
- package/plugins/copyPaste/contextMenuItem/copy.js +4 -16
- package/plugins/copyPaste/contextMenuItem/copy.mjs +8 -7
- package/plugins/copyPaste/contextMenuItem/copyColumnHeadersOnly.js +35 -0
- package/plugins/copyPaste/contextMenuItem/copyColumnHeadersOnly.mjs +31 -0
- package/plugins/copyPaste/contextMenuItem/copyWithColumnGroupHeaders.js +35 -0
- package/plugins/copyPaste/contextMenuItem/copyWithColumnGroupHeaders.mjs +31 -0
- package/plugins/copyPaste/contextMenuItem/copyWithColumnHeaders.js +35 -0
- package/plugins/copyPaste/contextMenuItem/copyWithColumnHeaders.mjs +31 -0
- package/plugins/copyPaste/contextMenuItem/cut.mjs +5 -4
- package/plugins/copyPaste/copyPaste.d.ts +10 -2
- package/plugins/copyPaste/copyPaste.js +303 -202
- package/plugins/copyPaste/copyPaste.mjs +303 -202
- package/plugins/copyPaste/copyableRanges.js +269 -0
- package/plugins/copyPaste/copyableRanges.mjs +264 -0
- package/plugins/copyPaste/focusableElement.js +12 -2
- package/plugins/copyPaste/focusableElement.mjs +15 -5
- package/plugins/copyPaste/pasteEvent.js +16 -2
- package/plugins/copyPaste/pasteEvent.mjs +18 -4
- package/plugins/customBorders/contextMenuItem/bottom.mjs +5 -4
- package/plugins/customBorders/contextMenuItem/left.mjs +5 -4
- package/plugins/customBorders/contextMenuItem/noBorders.mjs +5 -4
- package/plugins/customBorders/contextMenuItem/right.mjs +5 -4
- package/plugins/customBorders/contextMenuItem/top.mjs +5 -4
- package/plugins/customBorders/customBorders.js +12 -7
- package/plugins/customBorders/customBorders.mjs +11 -6
- package/plugins/customBorders/utils.mjs +8 -7
- package/plugins/dragToScroll/dragToScroll.js +6 -1
- package/plugins/dragToScroll/dragToScroll.mjs +6 -1
- package/plugins/dropdownMenu/dropdownMenu.js +6 -1
- package/plugins/dropdownMenu/dropdownMenu.mjs +6 -1
- package/plugins/exportFile/dataProvider.js +13 -6
- package/plugins/exportFile/dataProvider.mjs +12 -5
- package/plugins/exportFile/exportFile.js +8 -3
- package/plugins/exportFile/exportFile.mjs +6 -1
- package/plugins/exportFile/typeFactory.js +14 -1
- package/plugins/exportFile/typeFactory.mjs +14 -1
- package/plugins/exportFile/types/_base.js +16 -2
- package/plugins/exportFile/types/_base.mjs +18 -4
- package/plugins/exportFile/types/csv.js +6 -1
- package/plugins/exportFile/types/csv.mjs +6 -1
- package/plugins/filters/component/_base.js +16 -2
- package/plugins/filters/component/_base.mjs +19 -5
- package/plugins/filters/component/actionBar.js +10 -4
- package/plugins/filters/component/actionBar.mjs +11 -5
- package/plugins/filters/component/condition.js +10 -4
- package/plugins/filters/component/condition.mjs +11 -5
- package/plugins/filters/component/operators.js +8 -3
- package/plugins/filters/component/operators.mjs +8 -3
- package/plugins/filters/component/value.js +9 -3
- package/plugins/filters/component/value.mjs +12 -6
- package/plugins/filters/condition/beginsWith.js +1 -1
- package/plugins/filters/condition/beginsWith.mjs +1 -1
- package/plugins/filters/condition/between.js +1 -1
- package/plugins/filters/condition/between.mjs +1 -1
- package/plugins/filters/condition/byValue.js +1 -1
- package/plugins/filters/condition/byValue.mjs +1 -1
- package/plugins/filters/condition/contains.js +1 -1
- package/plugins/filters/condition/contains.mjs +1 -1
- package/plugins/filters/condition/date/after.js +1 -1
- package/plugins/filters/condition/date/after.mjs +1 -1
- package/plugins/filters/condition/date/before.js +1 -1
- package/plugins/filters/condition/date/before.mjs +1 -1
- package/plugins/filters/condition/endsWith.js +1 -1
- package/plugins/filters/condition/endsWith.mjs +1 -1
- package/plugins/filters/condition/equal.js +1 -1
- package/plugins/filters/condition/equal.mjs +1 -1
- package/plugins/filters/condition/greaterThan.js +1 -1
- package/plugins/filters/condition/greaterThan.mjs +1 -1
- package/plugins/filters/condition/greaterThanOrEqual.js +1 -1
- package/plugins/filters/condition/greaterThanOrEqual.mjs +1 -1
- package/plugins/filters/condition/lessThan.js +1 -1
- package/plugins/filters/condition/lessThan.mjs +1 -1
- package/plugins/filters/condition/lessThanOrEqual.js +1 -1
- package/plugins/filters/condition/lessThanOrEqual.mjs +1 -1
- package/plugins/filters/conditionCollection.js +10 -4
- package/plugins/filters/conditionCollection.mjs +18 -12
- package/plugins/filters/conditionUpdateObserver.js +15 -2
- package/plugins/filters/conditionUpdateObserver.mjs +23 -10
- package/plugins/filters/constants.js +14 -1
- package/plugins/filters/constants.mjs +14 -1
- package/plugins/filters/dataFilter.js +16 -2
- package/plugins/filters/dataFilter.mjs +19 -5
- package/plugins/filters/filters.js +7 -2
- package/plugins/filters/filters.mjs +7 -2
- package/plugins/filters/ui/_base.js +12 -7
- package/plugins/filters/ui/_base.mjs +14 -1
- package/plugins/filters/ui/input.js +6 -1
- package/plugins/filters/ui/input.mjs +6 -1
- package/plugins/filters/ui/link.js +6 -1
- package/plugins/filters/ui/link.mjs +6 -1
- package/plugins/filters/ui/multipleSelect.js +14 -8
- package/plugins/filters/ui/multipleSelect.mjs +6 -1
- package/plugins/filters/ui/radioInput.js +6 -1
- package/plugins/filters/ui/radioInput.mjs +6 -1
- package/plugins/filters/ui/select.js +6 -1
- package/plugins/filters/ui/select.mjs +6 -1
- package/plugins/formulas/engine/register.mjs +6 -5
- package/plugins/formulas/engine/settings.js +12 -1
- package/plugins/formulas/engine/settings.mjs +12 -1
- package/plugins/formulas/formulas.js +24 -11
- package/plugins/formulas/formulas.mjs +24 -11
- package/plugins/hiddenColumns/contextMenuItem/hideColumn.js +1 -1
- package/plugins/hiddenColumns/contextMenuItem/hideColumn.mjs +6 -5
- package/plugins/hiddenColumns/contextMenuItem/showColumn.mjs +5 -4
- package/plugins/hiddenColumns/hiddenColumns.js +5 -1
- package/plugins/hiddenColumns/hiddenColumns.mjs +5 -1
- package/plugins/hiddenRows/contextMenuItem/hideRow.js +1 -1
- package/plugins/hiddenRows/contextMenuItem/hideRow.mjs +6 -5
- package/plugins/hiddenRows/contextMenuItem/showRow.mjs +5 -4
- package/plugins/hiddenRows/hiddenRows.js +5 -1
- package/plugins/hiddenRows/hiddenRows.mjs +5 -1
- package/plugins/index.mjs +4 -3
- package/plugins/manualColumnFreeze/contextMenuItem/freezeColumn.js +1 -1
- package/plugins/manualColumnFreeze/contextMenuItem/freezeColumn.mjs +6 -5
- package/plugins/manualColumnFreeze/contextMenuItem/unfreezeColumn.js +1 -1
- package/plugins/manualColumnFreeze/contextMenuItem/unfreezeColumn.mjs +6 -5
- package/plugins/manualColumnFreeze/manualColumnFreeze.js +6 -1
- package/plugins/manualColumnFreeze/manualColumnFreeze.mjs +6 -1
- package/plugins/manualColumnMove/manualColumnMove.js +6 -1
- package/plugins/manualColumnMove/manualColumnMove.mjs +6 -1
- package/plugins/manualColumnMove/ui/_base.js +14 -1
- package/plugins/manualColumnMove/ui/_base.mjs +14 -1
- package/plugins/manualColumnMove/ui/backlight.js +6 -1
- package/plugins/manualColumnMove/ui/backlight.mjs +6 -1
- package/plugins/manualColumnMove/ui/guideline.js +6 -1
- package/plugins/manualColumnMove/ui/guideline.mjs +6 -1
- package/plugins/manualColumnResize/manualColumnResize.js +6 -1
- package/plugins/manualColumnResize/manualColumnResize.mjs +6 -1
- package/plugins/manualRowMove/manualRowMove.js +6 -1
- package/plugins/manualRowMove/manualRowMove.mjs +6 -1
- package/plugins/manualRowMove/ui/_base.js +14 -1
- package/plugins/manualRowMove/ui/_base.mjs +14 -1
- package/plugins/manualRowMove/ui/backlight.js +6 -1
- package/plugins/manualRowMove/ui/backlight.mjs +6 -1
- package/plugins/manualRowMove/ui/guideline.js +6 -1
- package/plugins/manualRowMove/ui/guideline.mjs +6 -1
- package/plugins/manualRowResize/manualRowResize.js +6 -1
- package/plugins/manualRowResize/manualRowResize.mjs +6 -1
- package/plugins/mergeCells/calculations/autofill.js +13 -6
- package/plugins/mergeCells/calculations/autofill.mjs +15 -8
- package/plugins/mergeCells/calculations/selection.js +16 -2
- package/plugins/mergeCells/calculations/selection.mjs +16 -2
- package/plugins/mergeCells/cellCoords.js +16 -2
- package/plugins/mergeCells/cellCoords.mjs +21 -7
- package/plugins/mergeCells/cellsCollection.js +12 -5
- package/plugins/mergeCells/cellsCollection.mjs +14 -7
- package/plugins/mergeCells/contextMenuItem/toggleMerge.mjs +5 -4
- package/plugins/mergeCells/mergeCells.js +7 -2
- package/plugins/mergeCells/mergeCells.mjs +7 -2
- package/plugins/multiColumnSorting/multiColumnSorting.js +6 -1
- package/plugins/multiColumnSorting/multiColumnSorting.mjs +6 -1
- package/plugins/multiColumnSorting/rootComparator.mjs +8 -7
- package/plugins/multiColumnSorting/utils.mjs +4 -3
- package/plugins/multipleSelectionHandles/multipleSelectionHandles.js +6 -1
- package/plugins/multipleSelectionHandles/multipleSelectionHandles.mjs +6 -1
- package/plugins/nestedHeaders/nestedHeaders.js +124 -16
- package/plugins/nestedHeaders/nestedHeaders.mjs +131 -23
- package/plugins/nestedHeaders/stateManager/headersTree.js +10 -3
- package/plugins/nestedHeaders/stateManager/headersTree.mjs +10 -3
- package/plugins/nestedHeaders/stateManager/index.js +34 -14
- package/plugins/nestedHeaders/stateManager/index.mjs +67 -47
- package/plugins/nestedHeaders/stateManager/matrixGenerator.mjs +33 -31
- package/plugins/nestedHeaders/stateManager/nodeModifiers/collapse.mjs +18 -17
- package/plugins/nestedHeaders/stateManager/nodeModifiers/expand.mjs +17 -16
- package/plugins/nestedHeaders/stateManager/nodeModifiers/hideColumn.mjs +7 -6
- package/plugins/nestedHeaders/stateManager/nodeModifiers/index.mjs +2 -1
- package/plugins/nestedHeaders/stateManager/nodeModifiers/showColumn.mjs +7 -6
- package/plugins/nestedHeaders/stateManager/settingsNormalizer.mjs +41 -39
- package/plugins/nestedHeaders/stateManager/sourceSettings.js +11 -3
- package/plugins/nestedHeaders/stateManager/sourceSettings.mjs +23 -14
- package/plugins/nestedHeaders/utils/ghostTable.js +17 -3
- package/plugins/nestedHeaders/utils/ghostTable.mjs +24 -10
- package/plugins/nestedRows/data/dataManager.js +10 -4
- package/plugins/nestedRows/data/dataManager.mjs +12 -6
- package/plugins/nestedRows/nestedRows.js +6 -1
- package/plugins/nestedRows/nestedRows.mjs +6 -1
- package/plugins/nestedRows/ui/_base.js +16 -2
- package/plugins/nestedRows/ui/_base.mjs +16 -2
- package/plugins/nestedRows/ui/collapsing.js +8 -2
- package/plugins/nestedRows/ui/collapsing.mjs +14 -8
- package/plugins/nestedRows/ui/contextMenu.js +7 -2
- package/plugins/nestedRows/ui/contextMenu.mjs +6 -1
- package/plugins/nestedRows/ui/headers.js +8 -2
- package/plugins/nestedRows/ui/headers.mjs +14 -8
- package/plugins/nestedRows/utils/rowMoveController.js +11 -4
- package/plugins/nestedRows/utils/rowMoveController.mjs +25 -18
- package/plugins/persistentState/persistentState.js +6 -1
- package/plugins/persistentState/persistentState.mjs +6 -1
- package/plugins/persistentState/storage.js +16 -2
- package/plugins/persistentState/storage.mjs +19 -5
- package/plugins/registry.js +1 -1
- package/plugins/registry.mjs +3 -2
- package/plugins/search/search.js +6 -1
- package/plugins/search/search.mjs +6 -1
- package/plugins/touchScroll/touchScroll.js +6 -1
- package/plugins/touchScroll/touchScroll.mjs +6 -1
- package/plugins/trimRows/trimRows.js +5 -1
- package/plugins/trimRows/trimRows.mjs +5 -1
- package/plugins/undoRedo/undoRedo.js +50 -32
- package/plugins/undoRedo/undoRedo.mjs +50 -32
- package/registry.mjs +2 -1
- package/renderers/baseRenderer/baseRenderer.mjs +2 -1
- package/renderers/index.mjs +4 -3
- package/selection/highlight/highlight.js +10 -3
- package/selection/highlight/highlight.mjs +24 -17
- package/selection/highlight/types/activeHeader.js +13 -2
- package/selection/highlight/types/activeHeader.mjs +19 -7
- package/selection/highlight/types/area.js +13 -2
- package/selection/highlight/types/area.mjs +22 -10
- package/selection/highlight/types/cell.js +13 -2
- package/selection/highlight/types/cell.mjs +22 -10
- package/selection/highlight/types/customSelection.js +13 -2
- package/selection/highlight/types/customSelection.mjs +23 -11
- package/selection/highlight/types/fill.js +14 -3
- package/selection/highlight/types/fill.mjs +22 -10
- package/selection/highlight/types/header.js +13 -2
- package/selection/highlight/types/header.mjs +24 -12
- package/selection/highlight/types/index.js +14 -3
- package/selection/highlight/types/index.mjs +14 -3
- package/selection/highlight/visualSelection.js +11 -6
- package/selection/highlight/visualSelection.mjs +11 -6
- package/selection/mouseEventHandler.mjs +14 -13
- package/selection/range.js +9 -2
- package/selection/range.mjs +9 -2
- package/selection/selection.js +13 -6
- package/selection/selection.mjs +21 -14
- package/selection/transformation.js +16 -2
- package/selection/transformation.mjs +24 -10
- package/selection/utils.js +1 -1
- package/selection/utils.mjs +1 -1
- package/shortcuts/context.js +1 -1
- package/shortcuts/context.mjs +1 -1
- package/shortcuts/keyObserver.js +8 -4
- package/shortcuts/keyObserver.mjs +8 -4
- package/shortcuts/manager.js +1 -1
- package/shortcuts/manager.mjs +1 -1
- package/tableView.js +147 -68
- package/tableView.mjs +147 -68
- package/translations/changesObservable/observable.js +12 -2
- package/translations/changesObservable/observable.mjs +19 -9
- package/translations/changesObservable/observer.js +12 -2
- package/translations/changesObservable/observer.mjs +17 -7
- package/translations/indexMapper.js +12 -6
- package/translations/indexMapper.mjs +17 -11
- package/translations/mapCollections/aggregatedCollection.js +8 -2
- package/translations/mapCollections/aggregatedCollection.mjs +11 -5
- package/translations/mapCollections/mapCollection.js +10 -1
- package/translations/mapCollections/mapCollection.mjs +10 -1
- package/translations/maps/hidingMap.js +8 -2
- package/translations/maps/hidingMap.mjs +13 -7
- package/translations/maps/indexMap.js +16 -2
- package/translations/maps/indexMap.mjs +20 -6
- package/translations/maps/indexesSequence.js +8 -2
- package/translations/maps/indexesSequence.mjs +14 -8
- package/translations/maps/linkedPhysicalIndexToValueMap.js +12 -6
- package/translations/maps/linkedPhysicalIndexToValueMap.mjs +18 -12
- package/translations/maps/physicalIndexToValueMap.js +8 -2
- package/translations/maps/physicalIndexToValueMap.mjs +14 -8
- package/translations/maps/trimmingMap.js +8 -2
- package/translations/maps/trimmingMap.mjs +13 -7
- package/translations/maps/utils/actionsOnIndexes.mjs +9 -8
- package/translations/maps/utils/indexesSequence.mjs +10 -9
- package/translations/maps/utils/physicallyIndexed.mjs +11 -10
- package/utils/dataStructures/linkedList.js +21 -7
- package/utils/dataStructures/linkedList.mjs +21 -7
- package/utils/dataStructures/priorityMap.js +1 -1
- package/utils/dataStructures/priorityMap.mjs +1 -1
- package/utils/dataStructures/queue.js +16 -2
- package/utils/dataStructures/queue.mjs +16 -2
- package/utils/dataStructures/stack.js +16 -2
- package/utils/dataStructures/stack.mjs +16 -2
- package/utils/dataStructures/tree.js +8 -2
- package/utils/dataStructures/tree.mjs +8 -2
- package/utils/dataStructures/uniqueMap.js +1 -1
- package/utils/dataStructures/uniqueMap.mjs +1 -1
- package/utils/ghostTable.js +12 -5
- package/utils/ghostTable.mjs +12 -5
- package/utils/interval.js +23 -8
- package/utils/interval.mjs +18 -4
- package/utils/samplesGenerator.js +13 -3
- package/utils/samplesGenerator.mjs +15 -5
- package/validators/index.mjs +4 -3
package/shortcuts/manager.mjs
CHANGED
@@ -14,7 +14,7 @@ import { useRecorder } from "./recorder.mjs";
|
|
14
14
|
* @param {object} options The manager's options
|
15
15
|
* @param {EventTarget} options.ownerWindow A starting `window` element
|
16
16
|
* @param {Function} options.handleEvent A condition on which `event` is handled.
|
17
|
-
* @param {Function} options.beforeKeyDown A hook fired before the `keydown` event is handled. You can use it to [block a keyboard shortcut's actions](@/guides/accessories-and-menus/keyboard-shortcuts.md#
|
17
|
+
* @param {Function} options.beforeKeyDown A hook fired before the `keydown` event is handled. You can use it to [block a keyboard shortcut's actions](@/guides/accessories-and-menus/keyboard-shortcuts.md#block-a-keyboard-shortcut-s-actions).
|
18
18
|
* @param {Function} options.afterKeyDown A hook fired after the `keydown` event is handled
|
19
19
|
*/
|
20
20
|
export var createShortcutManager = function createShortcutManager(_ref) {
|
package/tableView.js
CHANGED
@@ -1,5 +1,7 @@
|
|
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");
|
3
5
|
require("core-js/modules/es.symbol.js");
|
4
6
|
require("core-js/modules/es.symbol.description.js");
|
5
7
|
require("core-js/modules/es.symbol.iterator.js");
|
@@ -7,6 +9,7 @@ require("core-js/modules/es.array.from.js");
|
|
7
9
|
require("core-js/modules/es.array.slice.js");
|
8
10
|
require("core-js/modules/es.function.name.js");
|
9
11
|
require("core-js/modules/es.regexp.exec.js");
|
12
|
+
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
13
|
exports.__esModule = true;
|
11
14
|
exports.default = void 0;
|
12
15
|
require("core-js/modules/es.array.iterator.js");
|
@@ -25,7 +28,7 @@ var _rootInstance = require("./utils/rootInstance");
|
|
25
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
26
29
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
27
30
|
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."); }
|
28
|
-
function _iterableToArrayLimit(arr, i) { var _i =
|
31
|
+
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; } }
|
29
32
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
30
33
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
31
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."); }
|
@@ -34,78 +37,123 @@ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symb
|
|
34
37
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
35
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; }
|
36
39
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
37
|
-
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); } }
|
40
|
+
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); } }
|
38
41
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
42
|
+
function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
|
43
|
+
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
44
|
+
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; }
|
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); }
|
47
|
+
function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
|
48
|
+
function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
|
49
|
+
function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
|
50
|
+
function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
|
51
|
+
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; } }
|
39
52
|
var privatePool = new WeakMap();
|
40
53
|
|
41
54
|
/**
|
42
55
|
* @class TableView
|
43
56
|
* @private
|
44
57
|
*/
|
58
|
+
var _columnHeadersCount = /*#__PURE__*/new WeakMap();
|
59
|
+
var _rowHeadersCount = /*#__PURE__*/new WeakMap();
|
45
60
|
var TableView = /*#__PURE__*/function () {
|
61
|
+
/**
|
62
|
+
* Instance of {@link Handsontable}.
|
63
|
+
*
|
64
|
+
* @private
|
65
|
+
* @type {Handsontable}
|
66
|
+
*/
|
67
|
+
|
68
|
+
/**
|
69
|
+
* Instance of {@link EventManager}.
|
70
|
+
*
|
71
|
+
* @private
|
72
|
+
* @type {EventManager}
|
73
|
+
*/
|
74
|
+
|
75
|
+
/**
|
76
|
+
* Current Handsontable's GridSettings object.
|
77
|
+
*
|
78
|
+
* @private
|
79
|
+
* @type {GridSettings}
|
80
|
+
*/
|
81
|
+
|
82
|
+
/**
|
83
|
+
* Main <THEAD> element.
|
84
|
+
*
|
85
|
+
* @private
|
86
|
+
* @type {HTMLTableSectionElement}
|
87
|
+
*/
|
88
|
+
|
89
|
+
/**
|
90
|
+
* Main <TBODY> element.
|
91
|
+
*
|
92
|
+
* @private
|
93
|
+
* @type {HTMLTableSectionElement}
|
94
|
+
*/
|
95
|
+
|
96
|
+
/**
|
97
|
+
* Main Walkontable instance.
|
98
|
+
*
|
99
|
+
* @private
|
100
|
+
* @type {Walkontable}
|
101
|
+
*/
|
102
|
+
|
103
|
+
/**
|
104
|
+
* Main Walkontable instance.
|
105
|
+
*
|
106
|
+
* @private
|
107
|
+
* @type {Walkontable}
|
108
|
+
*/
|
109
|
+
|
110
|
+
/**
|
111
|
+
* The total number of the column header renderers applied to the table through the
|
112
|
+
* `afterGetColumnHeaderRenderers` hook.
|
113
|
+
*
|
114
|
+
* @type {number}
|
115
|
+
*/
|
116
|
+
|
117
|
+
/**
|
118
|
+
* The total number of the row header renderers applied to the table through the
|
119
|
+
* `afterGetRowHeaderRenderers` hook.
|
120
|
+
*
|
121
|
+
* @type {number}
|
122
|
+
*/
|
123
|
+
|
124
|
+
/**
|
125
|
+
* The flag determines if the `adjustElementsSize` method call was made during
|
126
|
+
* the render suspending. If true, the method has to be triggered once after render
|
127
|
+
* resuming.
|
128
|
+
*
|
129
|
+
* @private
|
130
|
+
* @type {boolean}
|
131
|
+
*/
|
132
|
+
|
46
133
|
/**
|
47
134
|
* @param {Hanstontable} instance Instance of {@link Handsontable}.
|
48
135
|
*/
|
49
136
|
function TableView(instance) {
|
50
137
|
_classCallCheck(this, TableView);
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
138
|
+
_defineProperty(this, "instance", void 0);
|
139
|
+
_defineProperty(this, "eventManager", void 0);
|
140
|
+
_defineProperty(this, "settings", void 0);
|
141
|
+
_defineProperty(this, "THEAD", void 0);
|
142
|
+
_defineProperty(this, "TBODY", void 0);
|
143
|
+
_defineProperty(this, "_wt", void 0);
|
144
|
+
_defineProperty(this, "activeWt", void 0);
|
145
|
+
_classPrivateFieldInitSpec(this, _columnHeadersCount, {
|
146
|
+
writable: true,
|
147
|
+
value: 0
|
148
|
+
});
|
149
|
+
_classPrivateFieldInitSpec(this, _rowHeadersCount, {
|
150
|
+
writable: true,
|
151
|
+
value: 0
|
152
|
+
});
|
153
|
+
_defineProperty(this, "postponedAdjustElementsSize", false);
|
57
154
|
this.instance = instance;
|
58
|
-
|
59
|
-
|
60
|
-
*
|
61
|
-
* @private
|
62
|
-
* @type {EventManager}
|
63
|
-
*/
|
64
|
-
this.eventManager = new _eventManager.default(instance);
|
65
|
-
/**
|
66
|
-
* Current Handsontable's GridSettings object.
|
67
|
-
*
|
68
|
-
* @private
|
69
|
-
* @type {GridSettings}
|
70
|
-
*/
|
71
|
-
this.settings = instance.getSettings();
|
72
|
-
/**
|
73
|
-
* Main <THEAD> element.
|
74
|
-
*
|
75
|
-
* @private
|
76
|
-
* @type {HTMLTableSectionElement}
|
77
|
-
*/
|
78
|
-
this.THEAD = void 0;
|
79
|
-
/**
|
80
|
-
* Main <TBODY> element.
|
81
|
-
*
|
82
|
-
* @private
|
83
|
-
* @type {HTMLTableSectionElement}
|
84
|
-
*/
|
85
|
-
this.TBODY = void 0;
|
86
|
-
/**
|
87
|
-
* Main Walkontable instance.
|
88
|
-
*
|
89
|
-
* @private
|
90
|
-
* @type {Walkontable}
|
91
|
-
*/
|
92
|
-
this._wt = void 0;
|
93
|
-
/**
|
94
|
-
* Main Walkontable instance.
|
95
|
-
*
|
96
|
-
* @private
|
97
|
-
* @type {Walkontable}
|
98
|
-
*/
|
99
|
-
this.activeWt = void 0;
|
100
|
-
/**
|
101
|
-
* The flag determines if the `adjustElementsSize` method call was made during
|
102
|
-
* the render suspending. If true, the method has to be triggered once after render
|
103
|
-
* resuming.
|
104
|
-
*
|
105
|
-
* @private
|
106
|
-
* @type {boolean}
|
107
|
-
*/
|
108
|
-
this.postponedAdjustElementsSize = false;
|
155
|
+
this.eventManager = new _eventManager.default(this.instance);
|
156
|
+
this.settings = this.instance.getSettings();
|
109
157
|
privatePool.set(this, {
|
110
158
|
/**
|
111
159
|
* Defines if the text should be selected during mousemove.
|
@@ -663,6 +711,7 @@ var TableView = /*#__PURE__*/function () {
|
|
663
711
|
});
|
664
712
|
}
|
665
713
|
_this2.instance.runHooks('afterGetRowHeaderRenderers', headerRenderers);
|
714
|
+
_classPrivateFieldSet(_this2, _rowHeadersCount, headerRenderers.length);
|
666
715
|
return headerRenderers;
|
667
716
|
},
|
668
717
|
columnHeaders: function columnHeaders() {
|
@@ -676,6 +725,7 @@ var TableView = /*#__PURE__*/function () {
|
|
676
725
|
});
|
677
726
|
}
|
678
727
|
_this2.instance.runHooks('afterGetColumnHeaderRenderers', headerRenderers);
|
728
|
+
_classPrivateFieldSet(_this2, _columnHeadersCount, headerRenderers.length);
|
679
729
|
return headerRenderers;
|
680
730
|
},
|
681
731
|
columnWidth: function columnWidth(renderedColumnIndex) {
|
@@ -720,10 +770,14 @@ var TableView = /*#__PURE__*/function () {
|
|
720
770
|
return _this2.settings.fragmentSelection;
|
721
771
|
},
|
722
772
|
onWindowResize: function onWindowResize() {
|
723
|
-
if (
|
724
|
-
|
773
|
+
if (_this2.instance && !_this2.instance.isDestroyed) {
|
774
|
+
_this2.instance.refreshDimensions();
|
775
|
+
}
|
776
|
+
},
|
777
|
+
onContainerElementResize: function onContainerElementResize() {
|
778
|
+
if (_this2.instance && !_this2.instance.isDestroyed) {
|
779
|
+
_this2.instance.refreshDimensions();
|
725
780
|
}
|
726
|
-
_this2.instance.refreshDimensions();
|
727
781
|
},
|
728
782
|
onCellMouseDown: function onCellMouseDown(event, coords, TD, wt) {
|
729
783
|
var visualCoords = _this2.translateFromRenderableToVisualCoords(coords);
|
@@ -1124,7 +1178,7 @@ var TableView = /*#__PURE__*/function () {
|
|
1124
1178
|
* @private
|
1125
1179
|
* @param {number} visualColumnIndex Visual column index.
|
1126
1180
|
* @param {HTMLTableCellElement} TH The table header element.
|
1127
|
-
* @param {Function} label The function that returns the header label.
|
1181
|
+
* @param {Function} [label] The function that returns the header label.
|
1128
1182
|
* @param {number} [headerLevel=0] The index of header level counting from the top (positive
|
1129
1183
|
* values counting from 0 to N).
|
1130
1184
|
*/
|
@@ -1136,10 +1190,10 @@ var TableView = /*#__PURE__*/function () {
|
|
1136
1190
|
if (TH.firstChild) {
|
1137
1191
|
var container = TH.firstChild;
|
1138
1192
|
if ((0, _element.hasClass)(container, 'relative')) {
|
1139
|
-
this.updateCellHeader(container.querySelector('.colHeader'), visualColumnIndex, label);
|
1193
|
+
this.updateCellHeader(container.querySelector('.colHeader'), visualColumnIndex, label, headerLevel);
|
1140
1194
|
} else {
|
1141
1195
|
(0, _element.empty)(TH);
|
1142
|
-
this.appendColHeader(visualColumnIndex, TH, headerLevel);
|
1196
|
+
this.appendColHeader(visualColumnIndex, TH, label, headerLevel);
|
1143
1197
|
}
|
1144
1198
|
} else {
|
1145
1199
|
var rootDocument = this.instance.rootDocument;
|
@@ -1147,7 +1201,7 @@ var TableView = /*#__PURE__*/function () {
|
|
1147
1201
|
var span = rootDocument.createElement('span');
|
1148
1202
|
div.className = 'relative';
|
1149
1203
|
span.className = 'colHeader';
|
1150
|
-
this.updateCellHeader(span, visualColumnIndex, label);
|
1204
|
+
this.updateCellHeader(span, visualColumnIndex, label, headerLevel);
|
1151
1205
|
div.appendChild(span);
|
1152
1206
|
TH.appendChild(div);
|
1153
1207
|
}
|
@@ -1157,14 +1211,17 @@ var TableView = /*#__PURE__*/function () {
|
|
1157
1211
|
/**
|
1158
1212
|
* Updates header cell content.
|
1159
1213
|
*
|
1160
|
-
* @
|
1214
|
+
* @private
|
1161
1215
|
* @param {HTMLElement} element Element to update.
|
1162
1216
|
* @param {number} index Row index or column index.
|
1163
1217
|
* @param {Function} content Function which should be returns content for this cell.
|
1218
|
+
* @param {number} [headerLevel=0] The index of header level counting from the top (positive
|
1219
|
+
* values counting from 0 to N).
|
1164
1220
|
*/
|
1165
1221
|
}, {
|
1166
1222
|
key: "updateCellHeader",
|
1167
1223
|
value: function updateCellHeader(element, index, content) {
|
1224
|
+
var headerLevel = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
1168
1225
|
var renderedIndex = index;
|
1169
1226
|
var parentOverlay = this._wt.wtOverlays.getParentOverlay(element) || this._wt;
|
1170
1227
|
|
@@ -1177,7 +1234,7 @@ var TableView = /*#__PURE__*/function () {
|
|
1177
1234
|
}
|
1178
1235
|
}
|
1179
1236
|
if (renderedIndex > -1) {
|
1180
|
-
(0, _element.fastInnerHTML)(element, content(index));
|
1237
|
+
(0, _element.fastInnerHTML)(element, content(index, headerLevel));
|
1181
1238
|
} else {
|
1182
1239
|
// workaround for https://github.com/handsontable/handsontable/issues/1946
|
1183
1240
|
(0, _element.fastInnerText)(element, String.fromCharCode(160));
|
@@ -1291,6 +1348,28 @@ var TableView = /*#__PURE__*/function () {
|
|
1291
1348
|
return this.instance.columnIndexMapper.getVisualFromRenderableIndex(this.instance.view._wt.wtScroll.getLastVisibleColumn());
|
1292
1349
|
}
|
1293
1350
|
|
1351
|
+
/**
|
1352
|
+
* Returns the total count of the rendered column headers.
|
1353
|
+
*
|
1354
|
+
* @returns {number}
|
1355
|
+
*/
|
1356
|
+
}, {
|
1357
|
+
key: "getColumnHeadersCount",
|
1358
|
+
value: function getColumnHeadersCount() {
|
1359
|
+
return _classPrivateFieldGet(this, _columnHeadersCount);
|
1360
|
+
}
|
1361
|
+
|
1362
|
+
/**
|
1363
|
+
* Returns the total count of the rendered row headers.
|
1364
|
+
*
|
1365
|
+
* @returns {number}
|
1366
|
+
*/
|
1367
|
+
}, {
|
1368
|
+
key: "getRowHeadersCount",
|
1369
|
+
value: function getRowHeadersCount() {
|
1370
|
+
return _classPrivateFieldGet(this, _rowHeadersCount);
|
1371
|
+
}
|
1372
|
+
|
1294
1373
|
/**
|
1295
1374
|
* Destroys internal WalkOnTable's instance. Detaches all of the bonded listeners.
|
1296
1375
|
*
|
package/tableView.mjs
CHANGED
@@ -1,6 +1,7 @@
|
|
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 _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
2
3
|
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."); }
|
3
|
-
function _iterableToArrayLimit(arr, i) { var _i =
|
4
|
+
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; } }
|
4
5
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
5
6
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
6
7
|
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."); }
|
@@ -9,8 +10,18 @@ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symb
|
|
9
10
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
10
11
|
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; }
|
11
12
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
12
|
-
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); } }
|
13
|
+
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); } }
|
13
14
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
15
|
+
function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
|
16
|
+
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
17
|
+
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; }
|
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 _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
|
21
|
+
function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
|
22
|
+
function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
|
23
|
+
function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
|
24
|
+
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; } }
|
14
25
|
import "core-js/modules/es.array.iterator.js";
|
15
26
|
import "core-js/modules/es.object.to-string.js";
|
16
27
|
import "core-js/modules/es.string.iterator.js";
|
@@ -18,6 +29,8 @@ import "core-js/modules/es.weak-map.js";
|
|
18
29
|
import "core-js/modules/web.dom-collections.iterator.js";
|
19
30
|
import "core-js/modules/es.number.is-integer.js";
|
20
31
|
import "core-js/modules/es.number.constructor.js";
|
32
|
+
import "core-js/modules/es.symbol.to-primitive.js";
|
33
|
+
import "core-js/modules/es.date.to-primitive.js";
|
21
34
|
import "core-js/modules/es.symbol.js";
|
22
35
|
import "core-js/modules/es.symbol.description.js";
|
23
36
|
import "core-js/modules/es.symbol.iterator.js";
|
@@ -37,70 +50,105 @@ var privatePool = new WeakMap();
|
|
37
50
|
* @class TableView
|
38
51
|
* @private
|
39
52
|
*/
|
53
|
+
var _columnHeadersCount = /*#__PURE__*/new WeakMap();
|
54
|
+
var _rowHeadersCount = /*#__PURE__*/new WeakMap();
|
40
55
|
var TableView = /*#__PURE__*/function () {
|
56
|
+
/**
|
57
|
+
* Instance of {@link Handsontable}.
|
58
|
+
*
|
59
|
+
* @private
|
60
|
+
* @type {Handsontable}
|
61
|
+
*/
|
62
|
+
|
63
|
+
/**
|
64
|
+
* Instance of {@link EventManager}.
|
65
|
+
*
|
66
|
+
* @private
|
67
|
+
* @type {EventManager}
|
68
|
+
*/
|
69
|
+
|
70
|
+
/**
|
71
|
+
* Current Handsontable's GridSettings object.
|
72
|
+
*
|
73
|
+
* @private
|
74
|
+
* @type {GridSettings}
|
75
|
+
*/
|
76
|
+
|
77
|
+
/**
|
78
|
+
* Main <THEAD> element.
|
79
|
+
*
|
80
|
+
* @private
|
81
|
+
* @type {HTMLTableSectionElement}
|
82
|
+
*/
|
83
|
+
|
84
|
+
/**
|
85
|
+
* Main <TBODY> element.
|
86
|
+
*
|
87
|
+
* @private
|
88
|
+
* @type {HTMLTableSectionElement}
|
89
|
+
*/
|
90
|
+
|
91
|
+
/**
|
92
|
+
* Main Walkontable instance.
|
93
|
+
*
|
94
|
+
* @private
|
95
|
+
* @type {Walkontable}
|
96
|
+
*/
|
97
|
+
|
98
|
+
/**
|
99
|
+
* Main Walkontable instance.
|
100
|
+
*
|
101
|
+
* @private
|
102
|
+
* @type {Walkontable}
|
103
|
+
*/
|
104
|
+
|
105
|
+
/**
|
106
|
+
* The total number of the column header renderers applied to the table through the
|
107
|
+
* `afterGetColumnHeaderRenderers` hook.
|
108
|
+
*
|
109
|
+
* @type {number}
|
110
|
+
*/
|
111
|
+
|
112
|
+
/**
|
113
|
+
* The total number of the row header renderers applied to the table through the
|
114
|
+
* `afterGetRowHeaderRenderers` hook.
|
115
|
+
*
|
116
|
+
* @type {number}
|
117
|
+
*/
|
118
|
+
|
119
|
+
/**
|
120
|
+
* The flag determines if the `adjustElementsSize` method call was made during
|
121
|
+
* the render suspending. If true, the method has to be triggered once after render
|
122
|
+
* resuming.
|
123
|
+
*
|
124
|
+
* @private
|
125
|
+
* @type {boolean}
|
126
|
+
*/
|
127
|
+
|
41
128
|
/**
|
42
129
|
* @param {Hanstontable} instance Instance of {@link Handsontable}.
|
43
130
|
*/
|
44
131
|
function TableView(instance) {
|
45
132
|
_classCallCheck(this, TableView);
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
133
|
+
_defineProperty(this, "instance", void 0);
|
134
|
+
_defineProperty(this, "eventManager", void 0);
|
135
|
+
_defineProperty(this, "settings", void 0);
|
136
|
+
_defineProperty(this, "THEAD", void 0);
|
137
|
+
_defineProperty(this, "TBODY", void 0);
|
138
|
+
_defineProperty(this, "_wt", void 0);
|
139
|
+
_defineProperty(this, "activeWt", void 0);
|
140
|
+
_classPrivateFieldInitSpec(this, _columnHeadersCount, {
|
141
|
+
writable: true,
|
142
|
+
value: 0
|
143
|
+
});
|
144
|
+
_classPrivateFieldInitSpec(this, _rowHeadersCount, {
|
145
|
+
writable: true,
|
146
|
+
value: 0
|
147
|
+
});
|
148
|
+
_defineProperty(this, "postponedAdjustElementsSize", false);
|
52
149
|
this.instance = instance;
|
53
|
-
|
54
|
-
|
55
|
-
*
|
56
|
-
* @private
|
57
|
-
* @type {EventManager}
|
58
|
-
*/
|
59
|
-
this.eventManager = new EventManager(instance);
|
60
|
-
/**
|
61
|
-
* Current Handsontable's GridSettings object.
|
62
|
-
*
|
63
|
-
* @private
|
64
|
-
* @type {GridSettings}
|
65
|
-
*/
|
66
|
-
this.settings = instance.getSettings();
|
67
|
-
/**
|
68
|
-
* Main <THEAD> element.
|
69
|
-
*
|
70
|
-
* @private
|
71
|
-
* @type {HTMLTableSectionElement}
|
72
|
-
*/
|
73
|
-
this.THEAD = void 0;
|
74
|
-
/**
|
75
|
-
* Main <TBODY> element.
|
76
|
-
*
|
77
|
-
* @private
|
78
|
-
* @type {HTMLTableSectionElement}
|
79
|
-
*/
|
80
|
-
this.TBODY = void 0;
|
81
|
-
/**
|
82
|
-
* Main Walkontable instance.
|
83
|
-
*
|
84
|
-
* @private
|
85
|
-
* @type {Walkontable}
|
86
|
-
*/
|
87
|
-
this._wt = void 0;
|
88
|
-
/**
|
89
|
-
* Main Walkontable instance.
|
90
|
-
*
|
91
|
-
* @private
|
92
|
-
* @type {Walkontable}
|
93
|
-
*/
|
94
|
-
this.activeWt = void 0;
|
95
|
-
/**
|
96
|
-
* The flag determines if the `adjustElementsSize` method call was made during
|
97
|
-
* the render suspending. If true, the method has to be triggered once after render
|
98
|
-
* resuming.
|
99
|
-
*
|
100
|
-
* @private
|
101
|
-
* @type {boolean}
|
102
|
-
*/
|
103
|
-
this.postponedAdjustElementsSize = false;
|
150
|
+
this.eventManager = new EventManager(this.instance);
|
151
|
+
this.settings = this.instance.getSettings();
|
104
152
|
privatePool.set(this, {
|
105
153
|
/**
|
106
154
|
* Defines if the text should be selected during mousemove.
|
@@ -658,6 +706,7 @@ var TableView = /*#__PURE__*/function () {
|
|
658
706
|
});
|
659
707
|
}
|
660
708
|
_this2.instance.runHooks('afterGetRowHeaderRenderers', headerRenderers);
|
709
|
+
_classPrivateFieldSet(_this2, _rowHeadersCount, headerRenderers.length);
|
661
710
|
return headerRenderers;
|
662
711
|
},
|
663
712
|
columnHeaders: function columnHeaders() {
|
@@ -671,6 +720,7 @@ var TableView = /*#__PURE__*/function () {
|
|
671
720
|
});
|
672
721
|
}
|
673
722
|
_this2.instance.runHooks('afterGetColumnHeaderRenderers', headerRenderers);
|
723
|
+
_classPrivateFieldSet(_this2, _columnHeadersCount, headerRenderers.length);
|
674
724
|
return headerRenderers;
|
675
725
|
},
|
676
726
|
columnWidth: function columnWidth(renderedColumnIndex) {
|
@@ -715,10 +765,14 @@ var TableView = /*#__PURE__*/function () {
|
|
715
765
|
return _this2.settings.fragmentSelection;
|
716
766
|
},
|
717
767
|
onWindowResize: function onWindowResize() {
|
718
|
-
if (
|
719
|
-
|
768
|
+
if (_this2.instance && !_this2.instance.isDestroyed) {
|
769
|
+
_this2.instance.refreshDimensions();
|
770
|
+
}
|
771
|
+
},
|
772
|
+
onContainerElementResize: function onContainerElementResize() {
|
773
|
+
if (_this2.instance && !_this2.instance.isDestroyed) {
|
774
|
+
_this2.instance.refreshDimensions();
|
720
775
|
}
|
721
|
-
_this2.instance.refreshDimensions();
|
722
776
|
},
|
723
777
|
onCellMouseDown: function onCellMouseDown(event, coords, TD, wt) {
|
724
778
|
var visualCoords = _this2.translateFromRenderableToVisualCoords(coords);
|
@@ -1119,7 +1173,7 @@ var TableView = /*#__PURE__*/function () {
|
|
1119
1173
|
* @private
|
1120
1174
|
* @param {number} visualColumnIndex Visual column index.
|
1121
1175
|
* @param {HTMLTableCellElement} TH The table header element.
|
1122
|
-
* @param {Function} label The function that returns the header label.
|
1176
|
+
* @param {Function} [label] The function that returns the header label.
|
1123
1177
|
* @param {number} [headerLevel=0] The index of header level counting from the top (positive
|
1124
1178
|
* values counting from 0 to N).
|
1125
1179
|
*/
|
@@ -1131,10 +1185,10 @@ var TableView = /*#__PURE__*/function () {
|
|
1131
1185
|
if (TH.firstChild) {
|
1132
1186
|
var container = TH.firstChild;
|
1133
1187
|
if (hasClass(container, 'relative')) {
|
1134
|
-
this.updateCellHeader(container.querySelector('.colHeader'), visualColumnIndex, label);
|
1188
|
+
this.updateCellHeader(container.querySelector('.colHeader'), visualColumnIndex, label, headerLevel);
|
1135
1189
|
} else {
|
1136
1190
|
empty(TH);
|
1137
|
-
this.appendColHeader(visualColumnIndex, TH, headerLevel);
|
1191
|
+
this.appendColHeader(visualColumnIndex, TH, label, headerLevel);
|
1138
1192
|
}
|
1139
1193
|
} else {
|
1140
1194
|
var rootDocument = this.instance.rootDocument;
|
@@ -1142,7 +1196,7 @@ var TableView = /*#__PURE__*/function () {
|
|
1142
1196
|
var span = rootDocument.createElement('span');
|
1143
1197
|
div.className = 'relative';
|
1144
1198
|
span.className = 'colHeader';
|
1145
|
-
this.updateCellHeader(span, visualColumnIndex, label);
|
1199
|
+
this.updateCellHeader(span, visualColumnIndex, label, headerLevel);
|
1146
1200
|
div.appendChild(span);
|
1147
1201
|
TH.appendChild(div);
|
1148
1202
|
}
|
@@ -1152,14 +1206,17 @@ var TableView = /*#__PURE__*/function () {
|
|
1152
1206
|
/**
|
1153
1207
|
* Updates header cell content.
|
1154
1208
|
*
|
1155
|
-
* @
|
1209
|
+
* @private
|
1156
1210
|
* @param {HTMLElement} element Element to update.
|
1157
1211
|
* @param {number} index Row index or column index.
|
1158
1212
|
* @param {Function} content Function which should be returns content for this cell.
|
1213
|
+
* @param {number} [headerLevel=0] The index of header level counting from the top (positive
|
1214
|
+
* values counting from 0 to N).
|
1159
1215
|
*/
|
1160
1216
|
}, {
|
1161
1217
|
key: "updateCellHeader",
|
1162
1218
|
value: function updateCellHeader(element, index, content) {
|
1219
|
+
var headerLevel = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
1163
1220
|
var renderedIndex = index;
|
1164
1221
|
var parentOverlay = this._wt.wtOverlays.getParentOverlay(element) || this._wt;
|
1165
1222
|
|
@@ -1172,7 +1229,7 @@ var TableView = /*#__PURE__*/function () {
|
|
1172
1229
|
}
|
1173
1230
|
}
|
1174
1231
|
if (renderedIndex > -1) {
|
1175
|
-
fastInnerHTML(element, content(index));
|
1232
|
+
fastInnerHTML(element, content(index, headerLevel));
|
1176
1233
|
} else {
|
1177
1234
|
// workaround for https://github.com/handsontable/handsontable/issues/1946
|
1178
1235
|
fastInnerText(element, String.fromCharCode(160));
|
@@ -1286,6 +1343,28 @@ var TableView = /*#__PURE__*/function () {
|
|
1286
1343
|
return this.instance.columnIndexMapper.getVisualFromRenderableIndex(this.instance.view._wt.wtScroll.getLastVisibleColumn());
|
1287
1344
|
}
|
1288
1345
|
|
1346
|
+
/**
|
1347
|
+
* Returns the total count of the rendered column headers.
|
1348
|
+
*
|
1349
|
+
* @returns {number}
|
1350
|
+
*/
|
1351
|
+
}, {
|
1352
|
+
key: "getColumnHeadersCount",
|
1353
|
+
value: function getColumnHeadersCount() {
|
1354
|
+
return _classPrivateFieldGet(this, _columnHeadersCount);
|
1355
|
+
}
|
1356
|
+
|
1357
|
+
/**
|
1358
|
+
* Returns the total count of the rendered row headers.
|
1359
|
+
*
|
1360
|
+
* @returns {number}
|
1361
|
+
*/
|
1362
|
+
}, {
|
1363
|
+
key: "getRowHeadersCount",
|
1364
|
+
value: function getRowHeadersCount() {
|
1365
|
+
return _classPrivateFieldGet(this, _rowHeadersCount);
|
1366
|
+
}
|
1367
|
+
|
1289
1368
|
/**
|
1290
1369
|
* Destroys internal WalkOnTable's instance. Detaches all of the bonded listeners.
|
1291
1370
|
*
|