handsontable 11.0.0 → 12.0.0
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 +121 -99
- package/3rdparty/walkontable/src/border.mjs +122 -96
- package/3rdparty/walkontable/src/calculator/viewportColumns.js +1 -1
- package/3rdparty/walkontable/src/calculator/viewportColumns.mjs +1 -1
- package/3rdparty/walkontable/src/calculator/viewportRows.js +1 -1
- package/3rdparty/walkontable/src/calculator/viewportRows.mjs +1 -1
- package/3rdparty/walkontable/src/cell/coords.js +60 -18
- package/3rdparty/walkontable/src/cell/coords.mjs +56 -18
- package/3rdparty/walkontable/src/cell/range.d.ts +10 -2
- package/3rdparty/walkontable/src/cell/range.js +279 -100
- package/3rdparty/walkontable/src/cell/range.mjs +274 -100
- package/3rdparty/walkontable/src/core/_base.js +452 -0
- package/3rdparty/walkontable/src/core/_base.mjs +440 -0
- package/3rdparty/walkontable/src/core/clone.js +97 -0
- package/3rdparty/walkontable/src/core/clone.mjs +80 -0
- package/3rdparty/walkontable/src/core/core.js +183 -0
- package/3rdparty/walkontable/src/core/core.mjs +160 -0
- package/3rdparty/walkontable/src/event.js +100 -67
- package/3rdparty/walkontable/src/event.mjs +100 -64
- package/3rdparty/walkontable/src/facade/core.js +251 -0
- package/3rdparty/walkontable/src/facade/core.mjs +243 -0
- package/3rdparty/walkontable/src/filter/column.js +1 -1
- package/3rdparty/walkontable/src/filter/column.mjs +1 -1
- package/3rdparty/walkontable/src/filter/row.js +1 -1
- package/3rdparty/walkontable/src/filter/row.mjs +1 -1
- package/3rdparty/walkontable/src/index.js +3 -47
- package/3rdparty/walkontable/src/index.mjs +3 -13
- package/3rdparty/walkontable/src/overlay/_base.js +125 -58
- package/3rdparty/walkontable/src/overlay/_base.mjs +126 -59
- package/3rdparty/walkontable/src/overlay/bottom.js +86 -76
- package/3rdparty/walkontable/src/overlay/bottom.mjs +86 -76
- package/3rdparty/walkontable/src/overlay/{bottomLeftCorner.js → bottomInlineStartCorner.js} +35 -58
- package/3rdparty/walkontable/src/overlay/{bottomLeftCorner.mjs → bottomInlineStartCorner.mjs} +34 -57
- package/3rdparty/walkontable/src/overlay/constants.js +25 -9
- package/3rdparty/walkontable/src/overlay/constants.mjs +14 -4
- package/3rdparty/walkontable/src/overlay/index.js +10 -19
- package/3rdparty/walkontable/src/overlay/index.mjs +4 -5
- package/3rdparty/walkontable/src/overlay/{left.js → inlineStart.js} +102 -80
- package/3rdparty/walkontable/src/overlay/{left.mjs → inlineStart.mjs} +101 -79
- package/3rdparty/walkontable/src/overlay/top.js +84 -79
- package/3rdparty/walkontable/src/overlay/top.mjs +84 -79
- package/3rdparty/walkontable/src/overlay/{topLeftCorner.js → topInlineStartCorner.js} +56 -57
- package/3rdparty/walkontable/src/overlay/{topLeftCorner.mjs → topInlineStartCorner.mjs} +51 -52
- package/3rdparty/walkontable/src/overlays.js +226 -157
- package/3rdparty/walkontable/src/overlays.mjs +226 -156
- package/3rdparty/walkontable/src/renderer/_base.js +1 -1
- package/3rdparty/walkontable/src/renderer/_base.mjs +1 -1
- package/3rdparty/walkontable/src/renderer/cells.js +5 -4
- package/3rdparty/walkontable/src/renderer/cells.mjs +5 -4
- package/3rdparty/walkontable/src/renderer/colGroup.js +3 -3
- package/3rdparty/walkontable/src/renderer/colGroup.mjs +3 -3
- package/3rdparty/walkontable/src/renderer/columnHeaders.js +3 -3
- package/3rdparty/walkontable/src/renderer/columnHeaders.mjs +3 -3
- package/3rdparty/walkontable/src/renderer/index.js +1 -1
- package/3rdparty/walkontable/src/renderer/index.mjs +1 -1
- package/3rdparty/walkontable/src/renderer/rowHeaders.js +3 -3
- package/3rdparty/walkontable/src/renderer/rowHeaders.mjs +3 -3
- package/3rdparty/walkontable/src/renderer/rows.js +3 -3
- package/3rdparty/walkontable/src/renderer/rows.mjs +3 -3
- package/3rdparty/walkontable/src/renderer/table.js +1 -1
- package/3rdparty/walkontable/src/renderer/table.mjs +1 -1
- package/3rdparty/walkontable/src/scroll.js +61 -88
- package/3rdparty/walkontable/src/scroll.mjs +61 -88
- package/3rdparty/walkontable/src/selection.js +12 -16
- package/3rdparty/walkontable/src/selection.mjs +12 -14
- package/3rdparty/walkontable/src/settings.js +236 -127
- package/3rdparty/walkontable/src/settings.mjs +236 -126
- package/3rdparty/walkontable/src/table/bottom.js +21 -6
- package/3rdparty/walkontable/src/table/bottom.mjs +20 -6
- package/3rdparty/walkontable/src/table/{bottomLeftCorner.js → bottomInlineStartCorner.js} +31 -15
- package/3rdparty/walkontable/src/table/{bottomLeftCorner.mjs → bottomInlineStartCorner.mjs} +30 -15
- package/3rdparty/walkontable/src/table/{left.js → inlineStart.js} +27 -15
- package/3rdparty/walkontable/src/table/{left.mjs → inlineStart.mjs} +26 -15
- package/3rdparty/walkontable/src/table/master.js +23 -13
- package/3rdparty/walkontable/src/table/master.mjs +23 -13
- 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/{stickyColumnsLeft.js → stickyColumnsStart.js} +13 -7
- package/3rdparty/walkontable/src/table/mixin/{stickyColumnsLeft.mjs → stickyColumnsStart.mjs} +13 -7
- package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.js +11 -5
- package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.mjs +11 -5
- package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.js +9 -3
- package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.mjs +9 -3
- package/3rdparty/walkontable/src/table/top.js +21 -6
- package/3rdparty/walkontable/src/table/top.mjs +20 -6
- package/3rdparty/walkontable/src/table/{topLeftCorner.js → topInlineStartCorner.js} +31 -15
- package/3rdparty/walkontable/src/table/{topLeftCorner.mjs → topInlineStartCorner.mjs} +30 -15
- package/3rdparty/walkontable/src/table.js +236 -141
- package/3rdparty/walkontable/src/table.mjs +232 -135
- package/3rdparty/walkontable/src/types.js +103 -0
- package/3rdparty/walkontable/src/types.mjs +102 -0
- package/3rdparty/walkontable/src/utils/column.js +23 -34
- package/3rdparty/walkontable/src/utils/column.mjs +23 -31
- package/3rdparty/walkontable/src/utils/nodesPool.js +1 -1
- package/3rdparty/walkontable/src/utils/nodesPool.mjs +1 -1
- package/3rdparty/walkontable/src/utils/orderView/sharedView.js +3 -3
- package/3rdparty/walkontable/src/utils/orderView/sharedView.mjs +3 -3
- package/3rdparty/walkontable/src/utils/orderView/view.js +1 -1
- package/3rdparty/walkontable/src/utils/orderView/view.mjs +1 -1
- package/3rdparty/walkontable/src/utils/orderView/viewSize.js +1 -1
- package/3rdparty/walkontable/src/utils/orderView/viewSize.mjs +1 -1
- package/3rdparty/walkontable/src/utils/orderView/viewSizeSet.js +1 -1
- package/3rdparty/walkontable/src/utils/orderView/viewSizeSet.mjs +1 -1
- package/3rdparty/walkontable/src/utils/row.js +10 -5
- package/3rdparty/walkontable/src/utils/row.mjs +10 -5
- package/3rdparty/walkontable/src/viewport.js +78 -81
- package/3rdparty/walkontable/src/viewport.mjs +78 -78
- package/CHANGELOG.md +94 -17
- package/README.md +10 -7
- package/base.js +2 -2
- package/base.mjs +2 -2
- package/cellTypes/timeType/timeType.d.ts +6 -6
- package/cellTypes/timeType/timeType.js +4 -5
- package/cellTypes/timeType/timeType.mjs +4 -5
- package/core.d.ts +9 -3
- package/core.js +590 -157
- package/core.mjs +599 -169
- package/dataMap/dataMap.js +2 -2
- package/dataMap/dataMap.mjs +2 -2
- package/dataMap/index.js +8 -0
- package/dataMap/index.mjs +3 -1
- package/dataMap/metaManager/index.js +3 -3
- package/dataMap/metaManager/index.mjs +3 -3
- package/dataMap/metaManager/lazyFactoryMap.js +1 -1
- package/dataMap/metaManager/lazyFactoryMap.mjs +1 -1
- package/dataMap/metaManager/metaLayers/cellMeta.js +1 -1
- package/dataMap/metaManager/metaLayers/cellMeta.mjs +1 -1
- package/dataMap/metaManager/metaLayers/columnMeta.js +1 -1
- package/dataMap/metaManager/metaLayers/columnMeta.mjs +1 -1
- package/dataMap/metaManager/metaLayers/globalMeta.js +7 -3
- package/dataMap/metaManager/metaLayers/globalMeta.mjs +7 -3
- package/dataMap/metaManager/metaLayers/tableMeta.js +3 -3
- package/dataMap/metaManager/metaLayers/tableMeta.mjs +3 -3
- package/dataMap/metaManager/metaSchema.js +2931 -2676
- package/dataMap/metaManager/metaSchema.mjs +2931 -2676
- package/dataMap/metaManager/mods/dynamicCellMeta.js +1 -1
- package/dataMap/metaManager/mods/dynamicCellMeta.mjs +1 -1
- package/dataMap/metaManager/mods/extendMetaProperties.js +126 -0
- package/dataMap/metaManager/mods/extendMetaProperties.mjs +113 -0
- package/dataMap/replaceData.js +140 -0
- package/dataMap/replaceData.mjs +124 -0
- package/dataSource.js +1 -1
- package/dataSource.mjs +1 -1
- package/dist/README.md +2 -2
- package/dist/handsontable.css +424 -166
- package/dist/handsontable.full.css +559 -298
- package/dist/handsontable.full.js +47163 -41289
- package/dist/handsontable.full.min.css +8 -13
- package/dist/handsontable.full.min.js +143 -142
- package/dist/handsontable.js +28270 -24105
- package/dist/handsontable.min.css +8 -11
- package/dist/handsontable.min.js +3 -3
- package/dist/languages/all.js +69 -38
- package/dist/languages/all.min.js +1 -1
- package/dist/languages/ar-AR.js +167 -0
- package/dist/languages/ar-AR.min.js +1 -0
- package/dist/languages/de-CH.js +32 -33
- package/dist/languages/de-CH.min.js +1 -1
- package/dist/languages/de-DE.js +5 -6
- package/dist/languages/de-DE.min.js +1 -1
- package/dist/languages/en-US.js +5 -6
- package/dist/languages/en-US.min.js +1 -1
- package/dist/languages/es-MX.js +5 -6
- package/dist/languages/es-MX.min.js +1 -1
- package/dist/languages/fr-FR.js +5 -6
- package/dist/languages/fr-FR.min.js +1 -1
- package/dist/languages/it-IT.js +5 -6
- package/dist/languages/it-IT.min.js +1 -1
- package/dist/languages/ja-JP.js +5 -6
- package/dist/languages/ja-JP.min.js +1 -1
- package/dist/languages/ko-KR.js +37 -42
- package/dist/languages/ko-KR.min.js +1 -1
- package/dist/languages/lv-LV.js +4 -6
- package/dist/languages/lv-LV.min.js +1 -1
- package/dist/languages/nb-NO.js +4 -6
- package/dist/languages/nb-NO.min.js +1 -1
- package/dist/languages/nl-NL.js +4 -6
- package/dist/languages/nl-NL.min.js +1 -1
- package/dist/languages/pl-PL.js +4 -6
- package/dist/languages/pl-PL.min.js +1 -1
- package/dist/languages/pt-BR.js +4 -6
- package/dist/languages/pt-BR.min.js +1 -1
- package/dist/languages/ru-RU.js +4 -6
- package/dist/languages/ru-RU.min.js +1 -1
- package/dist/languages/zh-CN.js +4 -6
- package/dist/languages/zh-CN.min.js +1 -1
- package/dist/languages/zh-TW.js +25 -27
- package/dist/languages/zh-TW.min.js +1 -1
- package/editorManager.js +121 -268
- package/editorManager.mjs +129 -279
- package/editors/autocompleteEditor/autocompleteEditor.js +19 -17
- package/editors/autocompleteEditor/autocompleteEditor.mjs +19 -17
- package/editors/baseEditor/baseEditor.js +207 -36
- package/editors/baseEditor/baseEditor.mjs +202 -34
- package/editors/checkboxEditor/checkboxEditor.js +3 -3
- package/editors/checkboxEditor/checkboxEditor.mjs +3 -3
- package/editors/dateEditor/dateEditor.js +22 -9
- package/editors/dateEditor/dateEditor.mjs +23 -10
- package/editors/dropdownEditor/dropdownEditor.js +4 -4
- package/editors/dropdownEditor/dropdownEditor.mjs +4 -4
- package/editors/handsontableEditor/handsontableEditor.js +107 -56
- package/editors/handsontableEditor/handsontableEditor.mjs +107 -56
- package/editors/index.d.ts +3 -0
- package/editors/index.js +6 -0
- package/editors/index.mjs +3 -1
- package/editors/numericEditor/numericEditor.js +3 -3
- package/editors/numericEditor/numericEditor.mjs +3 -3
- package/editors/passwordEditor/passwordEditor.js +4 -4
- package/editors/passwordEditor/passwordEditor.mjs +4 -4
- package/editors/selectEditor/selectEditor.js +66 -111
- package/editors/selectEditor/selectEditor.mjs +67 -110
- package/editors/textEditor/caretPositioner.js +49 -0
- package/editors/textEditor/caretPositioner.mjs +42 -0
- package/editors/textEditor/textEditor.js +206 -182
- package/editors/textEditor/textEditor.mjs +200 -180
- package/editors/timeEditor/index.d.ts +1 -0
- package/editors/timeEditor/index.js +9 -0
- package/editors/timeEditor/index.mjs +1 -0
- package/editors/timeEditor/timeEditor.d.ts +7 -0
- package/editors/timeEditor/timeEditor.js +105 -0
- package/editors/timeEditor/timeEditor.mjs +84 -0
- package/eventManager.js +11 -5
- package/eventManager.mjs +11 -5
- package/helpers/data.js +1 -1
- package/helpers/data.mjs +1 -1
- package/helpers/dom/element.js +1 -1
- package/helpers/dom/element.mjs +1 -1
- package/helpers/feature.js +1 -1
- package/helpers/feature.mjs +1 -1
- package/helpers/mixed.js +3 -3
- package/helpers/mixed.mjs +3 -3
- package/helpers/number.js +4 -4
- package/helpers/number.mjs +4 -4
- package/helpers/object.js +1 -1
- package/helpers/object.mjs +1 -1
- package/i18n/languages/ar-AR.js +41 -0
- package/i18n/languages/ar-AR.mjs +17 -0
- package/i18n/languages/de-CH.js +1 -1
- package/i18n/languages/de-DE.js +1 -1
- package/i18n/languages/en-US.js +1 -1
- package/i18n/languages/es-MX.js +1 -1
- package/i18n/languages/fr-FR.js +1 -1
- package/i18n/languages/index.js +4 -0
- package/i18n/languages/index.mjs +2 -1
- package/i18n/languages/it-IT.js +1 -1
- package/i18n/languages/ja-JP.js +1 -1
- package/i18n/languages/ko-KR.js +1 -1
- package/i18n/languages/lv-LV.js +1 -1
- package/i18n/languages/nb-NO.js +1 -1
- package/i18n/languages/nl-NL.js +1 -1
- package/i18n/languages/pl-PL.js +1 -1
- package/i18n/languages/pt-BR.js +1 -1
- package/i18n/languages/ru-RU.js +1 -1
- package/i18n/languages/zh-CN.js +1 -1
- package/i18n/languages/zh-TW.js +1 -1
- package/i18n/registry.js +1 -1
- package/index.d.ts +4 -0
- package/index.js +1 -1
- package/languages/all.js +69 -38
- package/languages/ar-AR.js +167 -0
- package/languages/ar-AR.mjs +19 -0
- package/languages/de-CH.js +32 -33
- package/languages/de-DE.js +5 -6
- package/languages/en-US.js +5 -6
- package/languages/es-MX.js +5 -6
- package/languages/fr-FR.js +5 -6
- package/languages/index.js +69 -38
- package/languages/index.mjs +2 -1
- package/languages/it-IT.js +5 -6
- package/languages/ja-JP.js +5 -6
- package/languages/ko-KR.js +37 -42
- package/languages/lv-LV.js +4 -6
- package/languages/nb-NO.js +4 -6
- package/languages/nl-NL.js +4 -6
- package/languages/pl-PL.js +4 -6
- package/languages/pt-BR.js +4 -6
- package/languages/ru-RU.js +4 -6
- package/languages/zh-CN.js +4 -6
- package/languages/zh-TW.js +25 -27
- package/package.json +26 -8
- package/pluginHooks.d.ts +2 -0
- package/pluginHooks.js +58 -27
- package/pluginHooks.mjs +58 -27
- package/plugins/autoColumnSize/autoColumnSize.js +14 -9
- package/plugins/autoColumnSize/autoColumnSize.mjs +14 -9
- package/plugins/autoRowSize/autoRowSize.js +15 -10
- package/plugins/autoRowSize/autoRowSize.mjs +15 -10
- package/plugins/autofill/autofill.js +50 -34
- package/plugins/autofill/autofill.mjs +50 -33
- package/plugins/autofill/utils.js +10 -11
- package/plugins/autofill/utils.mjs +10 -10
- package/plugins/base/base.d.ts +8 -2
- package/plugins/base/base.js +68 -5
- package/plugins/base/base.mjs +67 -5
- package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.js +4 -4
- package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.mjs +4 -4
- package/plugins/bindRowsWithHeaders/maps/looseBindsMap.js +4 -4
- package/plugins/bindRowsWithHeaders/maps/looseBindsMap.mjs +4 -4
- package/plugins/bindRowsWithHeaders/maps/strictBindsMap.js +4 -4
- package/plugins/bindRowsWithHeaders/maps/strictBindsMap.mjs +4 -4
- package/plugins/collapsibleColumns/collapsibleColumns.js +49 -30
- package/plugins/collapsibleColumns/collapsibleColumns.mjs +49 -30
- package/plugins/columnSorting/columnSorting.d.ts +1 -1
- package/plugins/columnSorting/columnSorting.js +10 -12
- package/plugins/columnSorting/columnSorting.mjs +10 -11
- package/plugins/columnSorting/columnStatesManager.js +3 -3
- package/plugins/columnSorting/columnStatesManager.mjs +3 -3
- package/plugins/columnSummary/columnSummary.js +4 -4
- package/plugins/columnSummary/columnSummary.mjs +4 -4
- package/plugins/columnSummary/endpoints.js +1 -1
- package/plugins/columnSummary/endpoints.mjs +1 -1
- package/plugins/comments/commentEditor.js +24 -4
- package/plugins/comments/commentEditor.mjs +25 -5
- package/plugins/comments/comments.js +63 -104
- package/plugins/comments/comments.mjs +63 -102
- package/plugins/comments/displaySwitch.js +1 -1
- package/plugins/comments/displaySwitch.mjs +1 -1
- package/plugins/contextMenu/commandExecutor.js +1 -1
- package/plugins/contextMenu/commandExecutor.mjs +1 -1
- package/plugins/contextMenu/contextMenu.js +11 -7
- package/plugins/contextMenu/contextMenu.mjs +11 -7
- package/plugins/contextMenu/cursor.js +1 -1
- package/plugins/contextMenu/cursor.mjs +1 -1
- package/plugins/contextMenu/itemsFactory.js +1 -1
- package/plugins/contextMenu/itemsFactory.mjs +1 -1
- package/plugins/contextMenu/menu.js +223 -111
- package/plugins/contextMenu/menu.mjs +220 -112
- package/plugins/contextMenu/predefinedItems/alignment.js +1 -1
- package/plugins/contextMenu/predefinedItems/clearColumn.js +1 -1
- package/plugins/contextMenu/predefinedItems/columnLeft.js +13 -5
- package/plugins/contextMenu/predefinedItems/columnLeft.mjs +11 -4
- package/plugins/contextMenu/predefinedItems/columnRight.js +10 -10
- package/plugins/contextMenu/predefinedItems/columnRight.mjs +9 -9
- package/plugins/contextMenu/predefinedItems/readOnly.js +1 -1
- package/plugins/contextMenu/predefinedItems/redo.js +1 -1
- package/plugins/contextMenu/predefinedItems/removeColumn.js +1 -1
- package/plugins/contextMenu/predefinedItems/removeRow.js +1 -1
- package/plugins/contextMenu/predefinedItems/rowAbove.js +1 -1
- package/plugins/contextMenu/predefinedItems/rowBelow.js +1 -1
- package/plugins/contextMenu/predefinedItems/undo.js +1 -1
- package/plugins/contextMenu/predefinedItems.js +1 -1
- package/plugins/contextMenu/utils.js +2 -2
- package/plugins/contextMenu/utils.mjs +2 -2
- package/plugins/copyPaste/clipboardData.js +1 -1
- package/plugins/copyPaste/clipboardData.mjs +1 -1
- package/plugins/copyPaste/contextMenuItem/copy.js +1 -1
- package/plugins/copyPaste/contextMenuItem/cut.js +1 -1
- package/plugins/copyPaste/copyPaste.js +29 -19
- package/plugins/copyPaste/copyPaste.mjs +28 -19
- package/plugins/copyPaste/focusableElement.js +1 -1
- package/plugins/copyPaste/focusableElement.mjs +1 -1
- package/plugins/copyPaste/pasteEvent.js +6 -2
- package/plugins/copyPaste/pasteEvent.mjs +6 -2
- package/plugins/customBorders/contextMenuItem/bottom.js +1 -1
- package/plugins/customBorders/contextMenuItem/left.js +5 -4
- package/plugins/customBorders/contextMenuItem/left.mjs +4 -3
- package/plugins/customBorders/contextMenuItem/noBorders.js +1 -1
- package/plugins/customBorders/contextMenuItem/right.js +5 -4
- package/plugins/customBorders/contextMenuItem/right.mjs +4 -3
- package/plugins/customBorders/contextMenuItem/top.js +1 -1
- package/plugins/customBorders/customBorders.js +141 -85
- package/plugins/customBorders/customBorders.mjs +139 -82
- package/plugins/customBorders/utils.js +131 -27
- package/plugins/customBorders/utils.mjs +115 -27
- package/plugins/dragToScroll/dragToScroll.js +11 -6
- package/plugins/dragToScroll/dragToScroll.mjs +11 -6
- package/plugins/dropdownMenu/dropdownMenu.js +8 -7
- package/plugins/dropdownMenu/dropdownMenu.mjs +8 -7
- package/plugins/exportFile/dataProvider.js +1 -1
- package/plugins/exportFile/dataProvider.mjs +1 -1
- package/plugins/exportFile/exportFile.js +3 -3
- package/plugins/exportFile/exportFile.mjs +3 -3
- package/plugins/exportFile/types/_base.js +1 -1
- package/plugins/exportFile/types/_base.mjs +1 -1
- package/plugins/exportFile/types/csv.js +3 -3
- package/plugins/exportFile/types/csv.mjs +3 -3
- package/plugins/filters/component/_base.js +1 -1
- package/plugins/filters/component/_base.mjs +1 -1
- package/plugins/filters/component/actionBar.js +3 -3
- package/plugins/filters/component/actionBar.mjs +3 -3
- package/plugins/filters/component/condition.js +4 -4
- package/plugins/filters/component/condition.mjs +4 -4
- package/plugins/filters/component/operators.js +3 -3
- package/plugins/filters/component/operators.mjs +3 -3
- package/plugins/filters/component/value.js +4 -4
- package/plugins/filters/component/value.mjs +4 -4
- package/plugins/filters/condition/beginsWith.js +1 -1
- package/plugins/filters/condition/between.js +1 -1
- package/plugins/filters/condition/contains.js +1 -1
- package/plugins/filters/condition/date/after.js +1 -1
- package/plugins/filters/condition/date/before.js +1 -1
- package/plugins/filters/condition/date/today.js +1 -1
- package/plugins/filters/condition/date/tomorrow.js +1 -1
- package/plugins/filters/condition/date/yesterday.js +1 -1
- package/plugins/filters/condition/empty.js +1 -1
- package/plugins/filters/condition/endsWith.js +1 -1
- package/plugins/filters/condition/equal.js +1 -1
- package/plugins/filters/condition/greaterThan.js +1 -1
- package/plugins/filters/condition/greaterThanOrEqual.js +1 -1
- package/plugins/filters/condition/lessThan.js +1 -1
- package/plugins/filters/condition/lessThanOrEqual.js +1 -1
- package/plugins/filters/condition/none.js +1 -1
- package/plugins/filters/condition/notBetween.js +1 -1
- package/plugins/filters/condition/notContains.js +1 -1
- package/plugins/filters/condition/notEmpty.js +1 -1
- package/plugins/filters/condition/notEqual.js +1 -1
- package/plugins/filters/conditionCollection.js +1 -1
- package/plugins/filters/conditionCollection.mjs +1 -1
- package/plugins/filters/conditionUpdateObserver.js +1 -1
- package/plugins/filters/conditionUpdateObserver.mjs +1 -1
- package/plugins/filters/dataFilter.js +1 -1
- package/plugins/filters/dataFilter.mjs +1 -1
- package/plugins/filters/filters.js +12 -9
- package/plugins/filters/filters.mjs +12 -9
- package/plugins/filters/logicalOperations/conjunction.js +1 -1
- package/plugins/filters/logicalOperations/disjunction.js +1 -1
- package/plugins/filters/logicalOperations/disjunctionWithExtraCondition.js +1 -1
- package/plugins/filters/ui/_base.js +2 -2
- package/plugins/filters/ui/_base.mjs +1 -1
- package/plugins/filters/ui/input.js +4 -4
- package/plugins/filters/ui/input.mjs +4 -4
- package/plugins/filters/ui/link.js +4 -4
- package/plugins/filters/ui/link.mjs +4 -4
- package/plugins/filters/ui/multipleSelect.js +19 -32
- package/plugins/filters/ui/multipleSelect.mjs +19 -32
- package/plugins/filters/ui/radioInput.js +4 -4
- package/plugins/filters/ui/radioInput.mjs +4 -4
- package/plugins/filters/ui/select.js +5 -5
- package/plugins/filters/ui/select.mjs +5 -5
- package/plugins/formulas/engine/register.js +1 -1
- package/plugins/formulas/engine/register.mjs +1 -1
- package/plugins/formulas/engine/settings.js +2 -2
- package/plugins/formulas/engine/settings.mjs +2 -2
- package/plugins/formulas/formulas.js +10 -10
- package/plugins/formulas/formulas.mjs +10 -10
- package/plugins/hiddenColumns/contextMenuItem/hideColumn.js +1 -1
- package/plugins/hiddenColumns/contextMenuItem/showColumn.js +3 -3
- package/plugins/hiddenColumns/contextMenuItem/showColumn.mjs +2 -2
- package/plugins/hiddenColumns/hiddenColumns.js +10 -5
- package/plugins/hiddenColumns/hiddenColumns.mjs +10 -5
- package/plugins/hiddenRows/contextMenuItem/hideRow.js +1 -1
- package/plugins/hiddenRows/contextMenuItem/showRow.js +3 -3
- package/plugins/hiddenRows/contextMenuItem/showRow.mjs +2 -2
- package/plugins/hiddenRows/hiddenRows.js +10 -5
- package/plugins/hiddenRows/hiddenRows.mjs +10 -5
- package/plugins/manualColumnFreeze/contextMenuItem/freezeColumn.js +2 -2
- package/plugins/manualColumnFreeze/contextMenuItem/freezeColumn.mjs +1 -1
- package/plugins/manualColumnFreeze/contextMenuItem/unfreezeColumn.js +2 -2
- package/plugins/manualColumnFreeze/contextMenuItem/unfreezeColumn.mjs +1 -1
- package/plugins/manualColumnFreeze/manualColumnFreeze.js +26 -13
- package/plugins/manualColumnFreeze/manualColumnFreeze.mjs +26 -13
- package/plugins/manualColumnMove/manualColumnMove.js +73 -62
- package/plugins/manualColumnMove/manualColumnMove.mjs +74 -63
- package/plugins/manualColumnMove/ui/_base.js +26 -13
- package/plugins/manualColumnMove/ui/_base.mjs +25 -13
- package/plugins/manualColumnMove/ui/backlight.js +4 -4
- package/plugins/manualColumnMove/ui/backlight.mjs +4 -4
- package/plugins/manualColumnMove/ui/guideline.js +4 -4
- package/plugins/manualColumnMove/ui/guideline.mjs +4 -4
- package/plugins/manualColumnResize/manualColumnResize.js +38 -22
- package/plugins/manualColumnResize/manualColumnResize.mjs +38 -22
- package/plugins/manualRowMove/manualRowMove.js +27 -17
- package/plugins/manualRowMove/manualRowMove.mjs +27 -17
- package/plugins/manualRowMove/ui/_base.js +1 -1
- package/plugins/manualRowMove/ui/_base.mjs +1 -1
- package/plugins/manualRowMove/ui/backlight.js +4 -4
- package/plugins/manualRowMove/ui/backlight.mjs +4 -4
- package/plugins/manualRowMove/ui/guideline.js +4 -4
- package/plugins/manualRowMove/ui/guideline.mjs +4 -4
- package/plugins/manualRowResize/manualRowResize.js +35 -20
- package/plugins/manualRowResize/manualRowResize.mjs +35 -20
- package/plugins/mergeCells/calculations/autofill.js +7 -6
- package/plugins/mergeCells/calculations/autofill.mjs +7 -5
- package/plugins/mergeCells/calculations/selection.js +10 -5
- package/plugins/mergeCells/calculations/selection.mjs +10 -5
- package/plugins/mergeCells/cellCoords.js +17 -5
- package/plugins/mergeCells/cellCoords.mjs +17 -4
- package/plugins/mergeCells/cellsCollection.js +28 -21
- package/plugins/mergeCells/cellsCollection.mjs +28 -20
- package/plugins/mergeCells/contextMenuItem/toggleMerge.js +1 -1
- package/plugins/mergeCells/mergeCells.js +83 -50
- package/plugins/mergeCells/mergeCells.mjs +83 -48
- package/plugins/multiColumnSorting/multiColumnSorting.js +5 -7
- package/plugins/multiColumnSorting/multiColumnSorting.mjs +5 -6
- package/plugins/multipleSelectionHandles/multipleSelectionHandles.js +52 -58
- package/plugins/multipleSelectionHandles/multipleSelectionHandles.mjs +53 -58
- package/plugins/nestedHeaders/nestedHeaders.js +26 -19
- package/plugins/nestedHeaders/nestedHeaders.mjs +26 -19
- package/plugins/nestedHeaders/stateManager/headersTree.js +3 -3
- package/plugins/nestedHeaders/stateManager/headersTree.mjs +3 -3
- package/plugins/nestedHeaders/stateManager/index.js +3 -3
- package/plugins/nestedHeaders/stateManager/index.mjs +3 -3
- package/plugins/nestedHeaders/stateManager/sourceSettings.js +3 -3
- package/plugins/nestedHeaders/stateManager/sourceSettings.mjs +3 -3
- package/plugins/nestedHeaders/utils/ghostTable.js +1 -1
- package/plugins/nestedHeaders/utils/ghostTable.mjs +1 -1
- package/plugins/nestedRows/data/dataManager.js +2 -2
- package/plugins/nestedRows/data/dataManager.mjs +2 -2
- package/plugins/nestedRows/nestedRows.js +11 -5
- package/plugins/nestedRows/nestedRows.mjs +11 -5
- package/plugins/nestedRows/ui/_base.js +6 -2
- package/plugins/nestedRows/ui/_base.mjs +6 -2
- package/plugins/nestedRows/ui/collapsing.js +3 -3
- package/plugins/nestedRows/ui/collapsing.mjs +3 -3
- package/plugins/nestedRows/ui/contextMenu.js +3 -3
- package/plugins/nestedRows/ui/contextMenu.mjs +3 -3
- package/plugins/nestedRows/ui/headers.js +3 -3
- package/plugins/nestedRows/ui/headers.mjs +3 -3
- package/plugins/nestedRows/utils/rowMoveController.js +3 -5
- package/plugins/nestedRows/utils/rowMoveController.mjs +3 -4
- package/plugins/persistentState/persistentState.js +10 -5
- package/plugins/persistentState/persistentState.mjs +10 -5
- package/plugins/persistentState/storage.js +1 -1
- package/plugins/persistentState/storage.mjs +1 -1
- package/plugins/search/search.js +10 -5
- package/plugins/search/search.mjs +10 -5
- package/plugins/touchScroll/touchScroll.js +32 -26
- package/plugins/touchScroll/touchScroll.mjs +32 -25
- package/plugins/trimRows/trimRows.js +10 -5
- package/plugins/trimRows/trimRows.mjs +10 -5
- package/plugins/undoRedo/index.js +1 -1
- package/plugins/undoRedo/undoRedo.js +54 -48
- package/plugins/undoRedo/undoRedo.mjs +54 -47
- package/renderers/autocompleteRenderer/autocompleteRenderer.js +1 -3
- package/renderers/autocompleteRenderer/autocompleteRenderer.mjs +1 -2
- package/renderers/checkboxRenderer/checkboxRenderer.js +48 -43
- package/renderers/checkboxRenderer/checkboxRenderer.mjs +48 -41
- package/renderers/index.d.ts +4 -1
- package/renderers/index.js +6 -0
- package/renderers/index.mjs +3 -1
- package/renderers/numericRenderer/numericRenderer.js +1 -0
- package/renderers/numericRenderer/numericRenderer.mjs +1 -0
- package/renderers/timeRenderer/index.d.ts +1 -0
- package/renderers/timeRenderer/index.js +9 -0
- package/renderers/timeRenderer/index.mjs +1 -0
- package/renderers/timeRenderer/timeRenderer.d.ts +5 -0
- package/renderers/timeRenderer/timeRenderer.js +31 -0
- package/renderers/timeRenderer/timeRenderer.mjs +20 -0
- package/selection/highlight/highlight.js +3 -3
- package/selection/highlight/highlight.mjs +3 -3
- package/selection/highlight/types/activeHeader.js +2 -2
- package/selection/highlight/types/activeHeader.mjs +2 -2
- package/selection/highlight/types/area.js +2 -2
- package/selection/highlight/types/area.mjs +2 -2
- package/selection/highlight/types/cell.js +2 -2
- package/selection/highlight/types/cell.mjs +2 -2
- package/selection/highlight/types/customSelection.js +2 -2
- package/selection/highlight/types/customSelection.mjs +2 -2
- package/selection/highlight/types/fill.js +2 -2
- package/selection/highlight/types/fill.mjs +2 -2
- package/selection/highlight/types/header.js +2 -2
- package/selection/highlight/types/header.mjs +2 -2
- package/selection/highlight/types/index.js +2 -2
- package/selection/highlight/types/index.mjs +2 -2
- package/selection/highlight/visualSelection.js +17 -16
- package/selection/highlight/visualSelection.mjs +18 -17
- package/selection/mouseEventHandler.js +15 -10
- package/selection/mouseEventHandler.mjs +15 -9
- package/selection/range.js +5 -6
- package/selection/range.mjs +5 -6
- package/selection/selection.js +27 -20
- package/selection/selection.mjs +27 -18
- package/selection/transformation.js +5 -7
- package/selection/transformation.mjs +5 -6
- package/selection/utils.js +1 -1
- package/selection/utils.mjs +1 -1
- package/settings.d.ts +3 -1
- package/shortcuts/context.d.ts +20 -0
- package/shortcuts/context.js +296 -0
- package/shortcuts/context.mjs +268 -0
- package/shortcuts/index.d.ts +1 -0
- package/shortcuts/index.js +8 -0
- package/shortcuts/index.mjs +1 -0
- package/shortcuts/keyObserver.js +67 -0
- package/shortcuts/keyObserver.mjs +58 -0
- package/shortcuts/manager.d.ts +10 -0
- package/shortcuts/manager.js +183 -0
- package/shortcuts/manager.mjs +174 -0
- package/shortcuts/recorder.js +183 -0
- package/shortcuts/recorder.mjs +171 -0
- package/shortcuts/utils.js +77 -0
- package/shortcuts/utils.mjs +54 -0
- package/tableView.js +138 -80
- package/tableView.mjs +138 -70
- package/translations/changesObservable/observable.js +1 -1
- package/translations/changesObservable/observable.mjs +1 -1
- package/translations/changesObservable/observer.js +1 -2
- package/translations/changesObservable/observer.mjs +1 -2
- package/translations/indexMapper.d.ts +1 -0
- package/translations/indexMapper.js +25 -2
- package/translations/indexMapper.mjs +24 -2
- package/translations/mapCollections/aggregatedCollection.js +3 -3
- package/translations/mapCollections/aggregatedCollection.mjs +3 -3
- package/translations/mapCollections/mapCollection.js +1 -1
- package/translations/mapCollections/mapCollection.mjs +1 -1
- package/translations/maps/hidingMap.js +5 -3
- package/translations/maps/hidingMap.mjs +5 -3
- package/translations/maps/indexMap.js +3 -1
- package/translations/maps/indexMap.mjs +3 -1
- package/translations/maps/indexesSequence.js +6 -4
- package/translations/maps/indexesSequence.mjs +6 -4
- package/translations/maps/linkedPhysicalIndexToValueMap.js +6 -4
- package/translations/maps/linkedPhysicalIndexToValueMap.mjs +6 -4
- package/translations/maps/physicalIndexToValueMap.js +6 -4
- package/translations/maps/physicalIndexToValueMap.mjs +6 -4
- package/translations/maps/trimmingMap.js +5 -3
- package/translations/maps/trimmingMap.mjs +5 -3
- package/utils/dataStructures/linkedList.js +3 -3
- package/utils/dataStructures/linkedList.mjs +3 -3
- package/utils/dataStructures/queue.js +1 -1
- package/utils/dataStructures/queue.mjs +1 -1
- package/utils/dataStructures/stack.js +1 -1
- package/utils/dataStructures/stack.mjs +1 -1
- package/utils/dataStructures/tree.js +3 -3
- package/utils/dataStructures/tree.mjs +3 -3
- package/utils/dataStructures/uniqueMap.js +14 -1
- package/utils/dataStructures/uniqueMap.mjs +14 -1
- package/utils/dataStructures/uniqueSet.js +9 -0
- package/utils/dataStructures/uniqueSet.mjs +9 -0
- package/utils/ghostTable.js +14 -3
- package/utils/ghostTable.mjs +15 -4
- package/utils/interval.js +1 -1
- package/utils/interval.mjs +1 -1
- package/utils/samplesGenerator.js +1 -1
- package/utils/samplesGenerator.mjs +1 -1
- package/3rdparty/walkontable/src/core.js +0 -309
- package/3rdparty/walkontable/src/core.mjs +0 -293
- package/3rdparty/walkontable/src/overlay/registerer.js +0 -70
- package/3rdparty/walkontable/src/overlay/registerer.mjs +0 -57
- package/utils/keyStateObserver.js +0 -121
- package/utils/keyStateObserver.mjs +0 -103
@@ -18,6 +18,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
18
18
|
|
19
19
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
20
20
|
|
21
|
+
import "core-js/modules/es.function.name.js";
|
21
22
|
import "core-js/modules/es.array.from.js";
|
22
23
|
import "core-js/modules/es.string.iterator.js";
|
23
24
|
import "core-js/modules/es.array.includes.js";
|
@@ -29,111 +30,153 @@ import "core-js/modules/es.symbol.iterator.js";
|
|
29
30
|
import "core-js/modules/es.array.iterator.js";
|
30
31
|
import "core-js/modules/web.dom-collections.iterator.js";
|
31
32
|
import "core-js/modules/es.array.slice.js";
|
32
|
-
import "core-js/modules/es.function.name.js";
|
33
33
|
import "core-js/modules/es.regexp.exec.js";
|
34
34
|
|
35
35
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
36
36
|
|
37
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); } }
|
38
38
|
|
39
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
39
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
40
|
+
|
41
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
40
42
|
|
41
|
-
import { hasClass, index, offset, removeClass, removeTextNodes, overlayContainsElement, closest, outerWidth, innerHeight, isVisible as _isVisible } from "
|
42
|
-
import { isFunction } from "
|
43
|
-
import CellCoords from "./cell/coords.mjs";
|
43
|
+
import { hasClass, index, offset, removeClass, removeTextNodes, overlayContainsElement, closest, outerHeight, outerWidth, innerHeight, isVisible as _isVisible } from "../../../helpers/dom/element.mjs";
|
44
|
+
import { isFunction } from "../../../helpers/function.mjs";
|
44
45
|
import ColumnFilter from "./filter/column.mjs";
|
45
46
|
import RowFilter from "./filter/row.mjs";
|
46
47
|
import { Renderer } from "./renderer/index.mjs";
|
47
48
|
import ColumnUtils from "./utils/column.mjs";
|
48
49
|
import RowUtils from "./utils/row.mjs";
|
49
|
-
import {
|
50
|
-
import { CLONE_TOP, CLONE_BOTTOM, CLONE_LEFT, CLONE_TOP_LEFT_CORNER, CLONE_BOTTOM_LEFT_CORNER } from "./overlay/constants.mjs";
|
50
|
+
import { CLONE_TOP, CLONE_BOTTOM, CLONE_INLINE_START, CLONE_TOP_INLINE_START_CORNER, CLONE_BOTTOM_INLINE_START_CORNER } from "./overlay/index.mjs";
|
51
51
|
/**
|
52
|
-
*
|
52
|
+
* @todo These mixes are never added to the class Table, however their members are used here.
|
53
|
+
* @todo Continue: Potentially it works only, because some of these mixes are added to every inherited class.
|
54
|
+
* @todo Refactoring, move code from `if(this.isMaster)` into MasterTable, and others like that.
|
55
|
+
* @mixes stickyColumnsStart
|
56
|
+
* @mixes stickyRowsBottom
|
57
|
+
* @mixes stickyRowsTop
|
58
|
+
* @mixes calculatedRows
|
59
|
+
* @mixes calculatedColumns
|
60
|
+
* @abstract
|
53
61
|
*/
|
54
62
|
|
55
63
|
var Table = /*#__PURE__*/function () {
|
56
64
|
/**
|
57
|
-
*
|
58
|
-
*
|
65
|
+
* The walkontable settings.
|
66
|
+
*
|
67
|
+
* @protected
|
68
|
+
* @type {Settings}
|
69
|
+
*/
|
70
|
+
|
71
|
+
/**
|
72
|
+
* Indicates if the table has height bigger than 0px.
|
73
|
+
*
|
74
|
+
* @type {boolean}
|
75
|
+
*/
|
76
|
+
|
77
|
+
/**
|
78
|
+
* Indicates if the table has width bigger than 0px.
|
79
|
+
*
|
80
|
+
* @type {boolean}
|
81
|
+
*/
|
82
|
+
|
83
|
+
/**
|
84
|
+
* Indicates if the table is visible. By visible, it means that the holder
|
85
|
+
* element has CSS 'display' property different than 'none'.
|
86
|
+
*
|
87
|
+
* @type {boolean}
|
88
|
+
*/
|
89
|
+
|
90
|
+
/**
|
91
|
+
*
|
92
|
+
* @abstract
|
93
|
+
* @param {TableDao} dataAccessObject The data access object.
|
94
|
+
* @param {FacadeGetter} facadeGetter Function which return proper facade.
|
95
|
+
* @param {DomBindings} domBindings Bindings into DOM.
|
96
|
+
* @param {Settings} wtSettings The Walkontable settings.
|
97
|
+
* @param {'master'|CLONE_TYPES_ENUM} name Overlay name.
|
59
98
|
*/
|
60
|
-
function Table(
|
99
|
+
function Table(dataAccessObject, facadeGetter, domBindings, wtSettings, name) {
|
61
100
|
var _this = this;
|
62
101
|
|
63
102
|
_classCallCheck(this, Table);
|
64
103
|
|
65
|
-
|
66
|
-
* Indicates if this instance is of type `MasterTable` (i.e. It is NOT an overlay).
|
67
|
-
*
|
68
|
-
* @type {boolean}
|
69
|
-
*/
|
70
|
-
this.isMaster = !wotInstance.cloneOverlay; // "instanceof" operator isn't used, because it caused a circular reference in Webpack
|
104
|
+
_defineProperty(this, "wtSettings", null);
|
71
105
|
|
72
|
-
this
|
106
|
+
_defineProperty(this, "domBindings", void 0);
|
73
107
|
|
74
|
-
this
|
75
|
-
this.TABLE = table;
|
76
|
-
this.TBODY = null;
|
77
|
-
this.THEAD = null;
|
78
|
-
this.COLGROUP = null;
|
79
|
-
this.tableOffset = 0;
|
80
|
-
this.holderOffset = 0;
|
81
|
-
/**
|
82
|
-
* Indicates if the table has height bigger than 0px.
|
83
|
-
*
|
84
|
-
* @type {boolean}
|
85
|
-
*/
|
108
|
+
_defineProperty(this, "TBODY", null);
|
86
109
|
|
87
|
-
this
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
*/
|
110
|
+
_defineProperty(this, "THEAD", null);
|
111
|
+
|
112
|
+
_defineProperty(this, "COLGROUP", null);
|
113
|
+
|
114
|
+
_defineProperty(this, "hasTableHeight", true);
|
93
115
|
|
94
|
-
this
|
116
|
+
_defineProperty(this, "hasTableWidth", true);
|
117
|
+
|
118
|
+
_defineProperty(this, "isTableVisible", false);
|
119
|
+
|
120
|
+
_defineProperty(this, "tableOffset", 0);
|
121
|
+
|
122
|
+
_defineProperty(this, "holderOffset", 0);
|
123
|
+
|
124
|
+
this.domBindings = domBindings;
|
95
125
|
/**
|
96
|
-
* Indicates if
|
97
|
-
* element has CSS 'display' property different than 'none'.
|
126
|
+
* Indicates if this instance is of type `MasterTable` (i.e. It is NOT an overlay).
|
98
127
|
*
|
99
128
|
* @type {boolean}
|
100
129
|
*/
|
101
130
|
|
102
|
-
this.
|
103
|
-
|
131
|
+
this.isMaster = name === 'master';
|
132
|
+
this.name = name;
|
133
|
+
this.dataAccessObject = dataAccessObject;
|
134
|
+
this.facadeGetter = facadeGetter;
|
135
|
+
this.wtSettings = wtSettings; // legacy support
|
136
|
+
|
137
|
+
this.instance = this.dataAccessObject.wot; // TODO refactoring: it might be removed here, and provides legacy support through facade.
|
138
|
+
|
139
|
+
this.wot = this.dataAccessObject.wot;
|
140
|
+
this.TABLE = domBindings.rootTable;
|
141
|
+
removeTextNodes(this.TABLE); // TODO refactoring, to recognize the legitimacy of moving them into domBidings
|
142
|
+
|
104
143
|
this.spreader = this.createSpreader(this.TABLE);
|
105
144
|
this.hider = this.createHider(this.spreader);
|
106
145
|
this.holder = this.createHolder(this.hider);
|
107
146
|
this.wtRootElement = this.holder.parentNode;
|
108
147
|
|
109
148
|
if (this.isMaster) {
|
110
|
-
this.alignOverlaysWithTrimmingContainer();
|
149
|
+
this.alignOverlaysWithTrimmingContainer(); // todo wow, It calls method from child class (MasterTable).
|
111
150
|
}
|
112
151
|
|
113
152
|
this.fixTableDomTree();
|
114
|
-
this.rowFilter = null;
|
115
|
-
|
153
|
+
this.rowFilter = null; // TODO refactoring, eliminate all (re)creations of this object, then updates state when needed.
|
154
|
+
|
155
|
+
this.columnFilter = null; // TODO refactoring, eliminate all (re)creations of this object, then updates state when needed.
|
156
|
+
|
116
157
|
this.correctHeaderWidth = false;
|
117
|
-
var origRowHeaderWidth = this.
|
158
|
+
var origRowHeaderWidth = this.wtSettings.getSettingPure('rowHeaderWidth'); // Fix for jumping row headers (https://github.com/handsontable/handsontable/issues/3850)
|
118
159
|
|
119
|
-
this.
|
160
|
+
this.wtSettings.update('rowHeaderWidth', function () {
|
120
161
|
return _this._modifyRowHeaderWidth(origRowHeaderWidth);
|
121
|
-
};
|
162
|
+
});
|
163
|
+
this.rowUtils = new RowUtils(this.dataAccessObject, this.wtSettings); // TODO refactoring, It can be passed through IOC.
|
164
|
+
|
165
|
+
this.columnUtils = new ColumnUtils(this.dataAccessObject, this.wtSettings); // TODO refactoring, It can be passed through IOC.
|
122
166
|
|
123
|
-
this.rowUtils = new RowUtils(this.wot);
|
124
|
-
this.columnUtils = new ColumnUtils(this.wot);
|
125
167
|
this.tableRenderer = new Renderer({
|
168
|
+
// TODO refactoring, It can be passed through IOC.
|
126
169
|
TABLE: this.TABLE,
|
127
170
|
THEAD: this.THEAD,
|
128
171
|
COLGROUP: this.COLGROUP,
|
129
172
|
TBODY: this.TBODY,
|
130
173
|
rowUtils: this.rowUtils,
|
131
174
|
columnUtils: this.columnUtils,
|
132
|
-
cellRenderer: this.
|
175
|
+
cellRenderer: this.wtSettings.getSettingPure('cellRenderer')
|
133
176
|
});
|
134
177
|
}
|
135
178
|
/**
|
136
|
-
* Returns a boolean that is true if this
|
179
|
+
* Returns a boolean that is true if this Table represents a specific overlay, identified by the overlay name.
|
137
180
|
* For MasterTable, it returns false.
|
138
181
|
*
|
139
182
|
* @param {string} overlayTypeName The overlay type.
|
@@ -144,7 +187,8 @@ var Table = /*#__PURE__*/function () {
|
|
144
187
|
_createClass(Table, [{
|
145
188
|
key: "is",
|
146
189
|
value: function is(overlayTypeName) {
|
147
|
-
|
190
|
+
// todo refactoring: eliminate all protected and private usages
|
191
|
+
return this.name === overlayTypeName;
|
148
192
|
}
|
149
193
|
/**
|
150
194
|
*
|
@@ -153,7 +197,7 @@ var Table = /*#__PURE__*/function () {
|
|
153
197
|
}, {
|
154
198
|
key: "fixTableDomTree",
|
155
199
|
value: function fixTableDomTree() {
|
156
|
-
var rootDocument = this.
|
200
|
+
var rootDocument = this.domBindings.rootDocument;
|
157
201
|
this.TBODY = this.TABLE.querySelector('tbody');
|
158
202
|
|
159
203
|
if (!this.TBODY) {
|
@@ -174,10 +218,6 @@ var Table = /*#__PURE__*/function () {
|
|
174
218
|
this.COLGROUP = rootDocument.createElement('colgroup');
|
175
219
|
this.TABLE.insertBefore(this.COLGROUP, this.THEAD);
|
176
220
|
}
|
177
|
-
|
178
|
-
if (this.wot.getSetting('columnHeaders').length && !this.THEAD.childNodes.length) {
|
179
|
-
this.THEAD.appendChild(rootDocument.createElement('TR'));
|
180
|
-
}
|
181
221
|
}
|
182
222
|
/**
|
183
223
|
* @param {HTMLTableElement} table An element to process.
|
@@ -191,7 +231,7 @@ var Table = /*#__PURE__*/function () {
|
|
191
231
|
var spreader;
|
192
232
|
|
193
233
|
if (!parent || parent.nodeType !== Node.ELEMENT_NODE || !hasClass(parent, 'wtHolder')) {
|
194
|
-
spreader = this.
|
234
|
+
spreader = this.domBindings.rootDocument.createElement('div');
|
195
235
|
spreader.className = 'wtSpreader';
|
196
236
|
|
197
237
|
if (parent) {
|
@@ -217,7 +257,7 @@ var Table = /*#__PURE__*/function () {
|
|
217
257
|
var hider;
|
218
258
|
|
219
259
|
if (!parent || parent.nodeType !== Node.ELEMENT_NODE || !hasClass(parent, 'wtHolder')) {
|
220
|
-
hider = this.
|
260
|
+
hider = this.domBindings.rootDocument.createElement('div');
|
221
261
|
hider.className = 'wtHider';
|
222
262
|
|
223
263
|
if (parent) {
|
@@ -243,7 +283,7 @@ var Table = /*#__PURE__*/function () {
|
|
243
283
|
var holder;
|
244
284
|
|
245
285
|
if (!parent || parent.nodeType !== Node.ELEMENT_NODE || !hasClass(parent, 'wtHolder')) {
|
246
|
-
holder = this.
|
286
|
+
holder = this.domBindings.rootDocument.createElement('div');
|
247
287
|
holder.style.position = 'relative';
|
248
288
|
holder.className = 'wtHolder';
|
249
289
|
|
@@ -254,6 +294,7 @@ var Table = /*#__PURE__*/function () {
|
|
254
294
|
|
255
295
|
if (this.isMaster) {
|
256
296
|
holder.parentNode.className += 'ht_master handsontable';
|
297
|
+
holder.parentNode.setAttribute('dir', this.wtSettings.getSettingPure('rtlMode') ? 'rtl' : 'ltr');
|
257
298
|
}
|
258
299
|
|
259
300
|
holder.appendChild(hider);
|
@@ -273,14 +314,15 @@ var Table = /*#__PURE__*/function () {
|
|
273
314
|
key: "draw",
|
274
315
|
value: function draw() {
|
275
316
|
var fastDraw = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
276
|
-
var
|
277
|
-
var
|
278
|
-
|
279
|
-
|
280
|
-
var
|
281
|
-
var
|
317
|
+
var wtSettings = this.wtSettings;
|
318
|
+
var _this$dataAccessObjec = this.dataAccessObject,
|
319
|
+
wtOverlays = _this$dataAccessObjec.wtOverlays,
|
320
|
+
wtViewport = _this$dataAccessObjec.wtViewport;
|
321
|
+
var totalRows = wtSettings.getSetting('totalRows');
|
322
|
+
var totalColumns = wtSettings.getSetting('totalColumns');
|
323
|
+
var rowHeaders = wtSettings.getSetting('rowHeaders');
|
282
324
|
var rowHeadersCount = rowHeaders.length;
|
283
|
-
var columnHeaders =
|
325
|
+
var columnHeaders = wtSettings.getSetting('columnHeaders');
|
284
326
|
var columnHeadersCount = columnHeaders.length;
|
285
327
|
var syncScroll = false;
|
286
328
|
var runFastDraw = fastDraw;
|
@@ -289,10 +331,10 @@ var Table = /*#__PURE__*/function () {
|
|
289
331
|
this.holderOffset = offset(this.holder);
|
290
332
|
runFastDraw = wtViewport.createRenderCalculators(runFastDraw);
|
291
333
|
|
292
|
-
if (rowHeadersCount && !
|
293
|
-
var leftScrollPos = wtOverlays.
|
334
|
+
if (rowHeadersCount && !wtSettings.getSetting('fixedColumnsStart')) {
|
335
|
+
var leftScrollPos = wtOverlays.inlineStartOverlay.getScrollPosition();
|
294
336
|
var previousState = this.correctHeaderWidth;
|
295
|
-
this.correctHeaderWidth = leftScrollPos
|
337
|
+
this.correctHeaderWidth = leftScrollPos !== 0;
|
296
338
|
|
297
339
|
if (previousState !== this.correctHeaderWidth) {
|
298
340
|
runFastDraw = false;
|
@@ -301,7 +343,7 @@ var Table = /*#__PURE__*/function () {
|
|
301
343
|
}
|
302
344
|
|
303
345
|
if (this.isMaster) {
|
304
|
-
syncScroll = wtOverlays.
|
346
|
+
syncScroll = wtOverlays.updateStateOfRendering();
|
305
347
|
}
|
306
348
|
|
307
349
|
if (runFastDraw) {
|
@@ -317,7 +359,7 @@ var Table = /*#__PURE__*/function () {
|
|
317
359
|
if (this.isMaster) {
|
318
360
|
this.tableOffset = offset(this.TABLE);
|
319
361
|
} else {
|
320
|
-
this.tableOffset = this.
|
362
|
+
this.tableOffset = this.dataAccessObject.parentTableOffset;
|
321
363
|
}
|
322
364
|
|
323
365
|
var startRow = totalRows > 0 ? this.getFirstRenderedRow() : 0;
|
@@ -327,16 +369,17 @@ var Table = /*#__PURE__*/function () {
|
|
327
369
|
var performRedraw = true; // Only master table rendering can be skipped
|
328
370
|
|
329
371
|
if (this.isMaster) {
|
330
|
-
this.alignOverlaysWithTrimmingContainer();
|
372
|
+
this.alignOverlaysWithTrimmingContainer(); // todo It calls method from child class (MasterTable).
|
373
|
+
|
331
374
|
var skipRender = {};
|
332
|
-
this.
|
375
|
+
this.wtSettings.getSetting('beforeDraw', true, skipRender);
|
333
376
|
performRedraw = skipRender.skipRender !== true;
|
334
377
|
}
|
335
378
|
|
336
379
|
if (performRedraw) {
|
337
380
|
this.tableRenderer.setHeaderContentRenderers(rowHeaders, columnHeaders);
|
338
381
|
|
339
|
-
if (this.is(CLONE_BOTTOM) || this.is(
|
382
|
+
if (this.is(CLONE_BOTTOM) || this.is(CLONE_BOTTOM_INLINE_START_CORNER)) {
|
340
383
|
// do NOT render headers on the bottom or bottom-left corner overlay
|
341
384
|
this.tableRenderer.setHeaderContentRenderers(rowHeaders, []);
|
342
385
|
}
|
@@ -346,8 +389,8 @@ var Table = /*#__PURE__*/function () {
|
|
346
389
|
var workspaceWidth;
|
347
390
|
|
348
391
|
if (this.isMaster) {
|
349
|
-
workspaceWidth = this.
|
350
|
-
this.
|
392
|
+
workspaceWidth = this.dataAccessObject.workspaceWidth;
|
393
|
+
this.dataAccessObject.wtViewport.containerWidth = null;
|
351
394
|
this.markOversizedColumnHeaders();
|
352
395
|
}
|
353
396
|
|
@@ -358,9 +401,9 @@ var Table = /*#__PURE__*/function () {
|
|
358
401
|
}
|
359
402
|
|
360
403
|
if (this.isMaster) {
|
361
|
-
this.
|
362
|
-
this.
|
363
|
-
this.
|
404
|
+
this.dataAccessObject.wtViewport.createVisibleCalculators();
|
405
|
+
this.dataAccessObject.wtOverlays.refresh(false);
|
406
|
+
this.dataAccessObject.wtOverlays.applyToDOM();
|
364
407
|
var hiderWidth = outerWidth(this.hider);
|
365
408
|
var tableWidth = outerWidth(this.TABLE);
|
366
409
|
|
@@ -370,16 +413,16 @@ var Table = /*#__PURE__*/function () {
|
|
370
413
|
this.tableRenderer.renderer.colGroup.render();
|
371
414
|
}
|
372
415
|
|
373
|
-
if (workspaceWidth !== this.
|
416
|
+
if (workspaceWidth !== this.dataAccessObject.wtViewport.getWorkspaceWidth()) {
|
374
417
|
// workspace width changed though to shown/hidden vertical scrollbar. Let's reapply stretching
|
375
|
-
this.
|
418
|
+
this.dataAccessObject.wtViewport.containerWidth = null;
|
376
419
|
this.columnUtils.calculateWidths();
|
377
420
|
this.tableRenderer.renderer.colGroup.render();
|
378
421
|
}
|
379
422
|
|
380
|
-
this.
|
423
|
+
this.wtSettings.getSetting('onDraw', true);
|
381
424
|
} else if (this.is(CLONE_BOTTOM)) {
|
382
|
-
this.
|
425
|
+
this.dataAccessObject.cloneSource.wtOverlays.adjustElementsSize();
|
383
426
|
}
|
384
427
|
}
|
385
428
|
}
|
@@ -391,19 +434,19 @@ var Table = /*#__PURE__*/function () {
|
|
391
434
|
positionChanged = wtOverlays.bottomOverlay.resetFixedPosition() || positionChanged;
|
392
435
|
}
|
393
436
|
|
394
|
-
positionChanged = wtOverlays.
|
437
|
+
positionChanged = wtOverlays.inlineStartOverlay.resetFixedPosition() || positionChanged;
|
395
438
|
|
396
|
-
if (wtOverlays.
|
397
|
-
wtOverlays.
|
439
|
+
if (wtOverlays.topInlineStartCornerOverlay) {
|
440
|
+
wtOverlays.topInlineStartCornerOverlay.resetFixedPosition();
|
398
441
|
}
|
399
442
|
|
400
|
-
if (wtOverlays.
|
401
|
-
wtOverlays.
|
443
|
+
if (wtOverlays.bottomInlineStartCornerOverlay && wtOverlays.bottomInlineStartCornerOverlay.clone) {
|
444
|
+
wtOverlays.bottomInlineStartCornerOverlay.resetFixedPosition();
|
402
445
|
}
|
403
446
|
|
404
447
|
if (positionChanged) {
|
405
448
|
// It refreshes the cells borders caused by a 1px shift (introduced by overlays which add or
|
406
|
-
// remove `innerBorderTop` and `
|
449
|
+
// remove `innerBorderTop` and `innerBorderInlineStart` CSS classes to the DOM element. This happens
|
407
450
|
// when there is a switch between rendering from 0 to N rows/columns and vice versa).
|
408
451
|
wtOverlays.refreshAll();
|
409
452
|
wtOverlays.adjustElementsSize();
|
@@ -416,7 +459,7 @@ var Table = /*#__PURE__*/function () {
|
|
416
459
|
wtOverlays.syncScrollWithMaster();
|
417
460
|
}
|
418
461
|
|
419
|
-
|
462
|
+
this.dataAccessObject.drawn = true;
|
420
463
|
return this;
|
421
464
|
}
|
422
465
|
/**
|
@@ -426,18 +469,18 @@ var Table = /*#__PURE__*/function () {
|
|
426
469
|
}, {
|
427
470
|
key: "markIfOversizedColumnHeader",
|
428
471
|
value: function markIfOversizedColumnHeader(col) {
|
429
|
-
var sourceColIndex = this.
|
430
|
-
var level = this.
|
431
|
-
var defaultRowHeight = this.
|
472
|
+
var sourceColIndex = this.columnFilter.renderedToSource(col);
|
473
|
+
var level = this.wtSettings.getSetting('columnHeaders').length;
|
474
|
+
var defaultRowHeight = this.wtSettings.getSetting('defaultRowHeight');
|
432
475
|
var previousColHeaderHeight;
|
433
476
|
var currentHeader;
|
434
477
|
var currentHeaderHeight;
|
435
|
-
var columnHeaderHeightSetting = this.
|
478
|
+
var columnHeaderHeightSetting = this.wtSettings.getSetting('columnHeaderHeight') || [];
|
436
479
|
|
437
480
|
while (level) {
|
438
481
|
level -= 1;
|
439
|
-
previousColHeaderHeight = this.
|
440
|
-
currentHeader = this.
|
482
|
+
previousColHeaderHeight = this.getColumnHeaderHeight(level);
|
483
|
+
currentHeader = this.getColumnHeader(sourceColIndex, level);
|
441
484
|
|
442
485
|
if (!currentHeader) {
|
443
486
|
/* eslint-disable no-continue */
|
@@ -447,19 +490,19 @@ var Table = /*#__PURE__*/function () {
|
|
447
490
|
currentHeaderHeight = innerHeight(currentHeader);
|
448
491
|
|
449
492
|
if (!previousColHeaderHeight && defaultRowHeight < currentHeaderHeight || previousColHeaderHeight < currentHeaderHeight) {
|
450
|
-
this.
|
493
|
+
this.dataAccessObject.wtViewport.oversizedColumnHeaders[level] = currentHeaderHeight;
|
451
494
|
}
|
452
495
|
|
453
496
|
if (Array.isArray(columnHeaderHeightSetting)) {
|
454
497
|
if (columnHeaderHeightSetting[level] !== null && columnHeaderHeightSetting[level] !== void 0) {
|
455
|
-
this.
|
498
|
+
this.dataAccessObject.wtViewport.oversizedColumnHeaders[level] = columnHeaderHeightSetting[level];
|
456
499
|
}
|
457
500
|
} else if (!isNaN(columnHeaderHeightSetting)) {
|
458
|
-
this.
|
501
|
+
this.dataAccessObject.wtViewport.oversizedColumnHeaders[level] = columnHeaderHeightSetting;
|
459
502
|
}
|
460
503
|
|
461
|
-
if (this.
|
462
|
-
this.
|
504
|
+
if (this.dataAccessObject.wtViewport.oversizedColumnHeaders[level] < (columnHeaderHeightSetting[level] || columnHeaderHeightSetting)) {
|
505
|
+
this.dataAccessObject.wtViewport.oversizedColumnHeaders[level] = columnHeaderHeightSetting[level] || columnHeaderHeightSetting; // eslint-disable-line max-len
|
463
506
|
}
|
464
507
|
}
|
465
508
|
}
|
@@ -470,10 +513,10 @@ var Table = /*#__PURE__*/function () {
|
|
470
513
|
}, {
|
471
514
|
key: "adjustColumnHeaderHeights",
|
472
515
|
value: function adjustColumnHeaderHeights() {
|
473
|
-
var
|
474
|
-
var children =
|
475
|
-
var oversizedColumnHeaders =
|
476
|
-
var columnHeaders =
|
516
|
+
var wtSettings = this.wtSettings;
|
517
|
+
var children = this.THEAD.childNodes;
|
518
|
+
var oversizedColumnHeaders = this.dataAccessObject.wtViewport.oversizedColumnHeaders;
|
519
|
+
var columnHeaders = wtSettings.getSetting('columnHeaders');
|
477
520
|
|
478
521
|
for (var i = 0, len = columnHeaders.length; i < len; i++) {
|
479
522
|
if (oversizedColumnHeaders[i]) {
|
@@ -493,20 +536,21 @@ var Table = /*#__PURE__*/function () {
|
|
493
536
|
}, {
|
494
537
|
key: "resetOversizedRows",
|
495
538
|
value: function resetOversizedRows() {
|
496
|
-
var
|
539
|
+
var wtSettings = this.wtSettings;
|
540
|
+
var wtViewport = this.dataAccessObject.wtViewport;
|
497
541
|
|
498
542
|
if (!this.isMaster && !this.is(CLONE_BOTTOM)) {
|
499
543
|
return;
|
500
544
|
}
|
501
545
|
|
502
|
-
if (!
|
546
|
+
if (!wtSettings.getSetting('externalRowCalculator')) {
|
503
547
|
var rowsToRender = this.getRenderedRowsCount(); // Reset the oversized row cache for rendered rows
|
504
548
|
|
505
549
|
for (var visibleRowIndex = 0; visibleRowIndex < rowsToRender; visibleRowIndex++) {
|
506
550
|
var sourceRow = this.rowFilter.renderedToSource(visibleRowIndex);
|
507
551
|
|
508
|
-
if (
|
509
|
-
|
552
|
+
if (wtViewport.oversizedRows && wtViewport.oversizedRows[sourceRow]) {
|
553
|
+
wtViewport.oversizedRows[sourceRow] = void 0;
|
510
554
|
}
|
511
555
|
}
|
512
556
|
}
|
@@ -533,13 +577,14 @@ var Table = /*#__PURE__*/function () {
|
|
533
577
|
}, {
|
534
578
|
key: "refreshSelections",
|
535
579
|
value: function refreshSelections(fastDraw) {
|
536
|
-
var
|
580
|
+
var wtSettings = this.wtSettings;
|
581
|
+
var selections = this.dataAccessObject.selections;
|
537
582
|
|
538
|
-
if (!
|
583
|
+
if (!selections) {
|
539
584
|
return;
|
540
585
|
}
|
541
586
|
|
542
|
-
var highlights = Array.from(
|
587
|
+
var highlights = Array.from(selections);
|
543
588
|
var len = highlights.length;
|
544
589
|
|
545
590
|
if (fastDraw) {
|
@@ -572,7 +617,7 @@ var Table = /*#__PURE__*/function () {
|
|
572
617
|
}
|
573
618
|
}
|
574
619
|
|
575
|
-
var additionalClassesToRemove =
|
620
|
+
var additionalClassesToRemove = wtSettings.getSetting('onBeforeRemoveCellClassNames');
|
576
621
|
|
577
622
|
if (Array.isArray(additionalClassesToRemove)) {
|
578
623
|
for (var _i = 0; _i < additionalClassesToRemove.length; _i++) {
|
@@ -589,7 +634,7 @@ var Table = /*#__PURE__*/function () {
|
|
589
634
|
}
|
590
635
|
|
591
636
|
for (var _i3 = 0; _i3 < len; _i3++) {
|
592
|
-
highlights[_i3].draw(
|
637
|
+
highlights[_i3].draw(this.facadeGetter(), fastDraw);
|
593
638
|
}
|
594
639
|
}
|
595
640
|
/**
|
@@ -617,7 +662,7 @@ var Table = /*#__PURE__*/function () {
|
|
617
662
|
value: function getCell(coords) {
|
618
663
|
var row = coords.row;
|
619
664
|
var column = coords.col;
|
620
|
-
var hookResult = this.
|
665
|
+
var hookResult = this.wtSettings.getSetting('onModifyGetCellCoords', row, column);
|
621
666
|
|
622
667
|
if (hookResult && Array.isArray(hookResult)) {
|
623
668
|
var _hookResult = _slicedToArray(hookResult, 2);
|
@@ -713,7 +758,7 @@ var Table = /*#__PURE__*/function () {
|
|
713
758
|
return;
|
714
759
|
}
|
715
760
|
|
716
|
-
var rowHeadersCount = this.
|
761
|
+
var rowHeadersCount = this.wtSettings.getSetting('rowHeaders').length;
|
717
762
|
|
718
763
|
if (level >= rowHeadersCount) {
|
719
764
|
return;
|
@@ -737,7 +782,7 @@ var Table = /*#__PURE__*/function () {
|
|
737
782
|
}
|
738
783
|
|
739
784
|
var THs = [];
|
740
|
-
var rowHeadersCount = this.
|
785
|
+
var rowHeadersCount = this.wtSettings.getSetting('rowHeaders').length;
|
741
786
|
|
742
787
|
for (var renderedRowIndex = 0; renderedRowIndex < rowHeadersCount; renderedRowIndex++) {
|
743
788
|
var TR = this.TBODY.childNodes[this.rowFilter.sourceToRendered(row)];
|
@@ -775,12 +820,12 @@ var Table = /*#__PURE__*/function () {
|
|
775
820
|
var row = index(TR);
|
776
821
|
var col = cellElement.cellIndex;
|
777
822
|
|
778
|
-
if (overlayContainsElement(
|
823
|
+
if (overlayContainsElement(CLONE_TOP_INLINE_START_CORNER, cellElement, this.wtRootElement) || overlayContainsElement(CLONE_TOP, cellElement, this.wtRootElement)) {
|
779
824
|
if (CONTAINER.nodeName === 'THEAD') {
|
780
825
|
row -= CONTAINER.childNodes.length;
|
781
826
|
}
|
782
|
-
} else if (overlayContainsElement(
|
783
|
-
var totalRows = this.
|
827
|
+
} else if (overlayContainsElement(CLONE_BOTTOM_INLINE_START_CORNER, cellElement, this.wtRootElement) || overlayContainsElement(CLONE_BOTTOM, cellElement, this.wtRootElement)) {
|
828
|
+
var totalRows = this.wtSettings.getSetting('totalRows');
|
784
829
|
row = totalRows - CONTAINER.childNodes.length + row;
|
785
830
|
} else if (CONTAINER === this.THEAD) {
|
786
831
|
row = this.rowFilter.visibleColHeadedRowToSourceRow(row);
|
@@ -788,13 +833,13 @@ var Table = /*#__PURE__*/function () {
|
|
788
833
|
row = this.rowFilter.renderedToSource(row);
|
789
834
|
}
|
790
835
|
|
791
|
-
if (overlayContainsElement(
|
836
|
+
if (overlayContainsElement(CLONE_TOP_INLINE_START_CORNER, cellElement, this.wtRootElement) || overlayContainsElement(CLONE_INLINE_START, cellElement, this.wtRootElement) || overlayContainsElement(CLONE_BOTTOM_INLINE_START_CORNER, cellElement, this.wtRootElement)) {
|
792
837
|
col = this.columnFilter.offsettedTH(col);
|
793
838
|
} else {
|
794
839
|
col = this.columnFilter.visibleRowHeadedColumnToSourceColumn(col);
|
795
840
|
}
|
796
841
|
|
797
|
-
return
|
842
|
+
return this.wot.createCellCoords(row, col);
|
798
843
|
}
|
799
844
|
/**
|
800
845
|
* Check if any of the rendered rows is higher than expected, and if so, cache them.
|
@@ -803,12 +848,12 @@ var Table = /*#__PURE__*/function () {
|
|
803
848
|
}, {
|
804
849
|
key: "markOversizedRows",
|
805
850
|
value: function markOversizedRows() {
|
806
|
-
if (this.
|
851
|
+
if (this.wtSettings.getSetting('externalRowCalculator')) {
|
807
852
|
return;
|
808
853
|
}
|
809
854
|
|
810
855
|
var rowCount = this.TBODY.childNodes.length;
|
811
|
-
var expectedTableHeight = rowCount * this.
|
856
|
+
var expectedTableHeight = rowCount * this.wtSettings.getSetting('defaultRowHeight');
|
812
857
|
var actualTableHeight = innerHeight(this.TBODY) - 1;
|
813
858
|
var previousRowHeight;
|
814
859
|
var rowInnerHeight;
|
@@ -816,7 +861,7 @@ var Table = /*#__PURE__*/function () {
|
|
816
861
|
var currentTr;
|
817
862
|
var rowHeader;
|
818
863
|
|
819
|
-
if (expectedTableHeight === actualTableHeight && !this.
|
864
|
+
if (expectedTableHeight === actualTableHeight && !this.wtSettings.getSetting('fixedRowsBottom')) {
|
820
865
|
// If the actual table height equals rowCount * default single row height, no row is oversized -> no need to iterate over them
|
821
866
|
return;
|
822
867
|
}
|
@@ -834,9 +879,9 @@ var Table = /*#__PURE__*/function () {
|
|
834
879
|
rowInnerHeight = innerHeight(currentTr) - 1;
|
835
880
|
}
|
836
881
|
|
837
|
-
if (!previousRowHeight && this.
|
882
|
+
if (!previousRowHeight && this.wtSettings.getSetting('defaultRowHeight') < rowInnerHeight || previousRowHeight < rowInnerHeight) {
|
838
883
|
rowInnerHeight += 1;
|
839
|
-
this.
|
884
|
+
this.dataAccessObject.wtViewport.oversizedRows[sourceRowIndex] = rowInnerHeight;
|
840
885
|
}
|
841
886
|
}
|
842
887
|
}
|
@@ -864,7 +909,7 @@ var Table = /*#__PURE__*/function () {
|
|
864
909
|
return false;
|
865
910
|
}
|
866
911
|
|
867
|
-
var rowHeaders = this.
|
912
|
+
var rowHeaders = this.wtSettings.getSetting('rowHeaders');
|
868
913
|
var rowHeadersCount = rowHeaders.length;
|
869
914
|
return Math.abs(column) <= rowHeadersCount;
|
870
915
|
}
|
@@ -882,7 +927,7 @@ var Table = /*#__PURE__*/function () {
|
|
882
927
|
return false;
|
883
928
|
}
|
884
929
|
|
885
|
-
var columnHeaders = this.
|
930
|
+
var columnHeaders = this.wtSettings.getSetting('columnHeaders');
|
886
931
|
var columnHeadersCount = columnHeaders.length;
|
887
932
|
return Math.abs(row) <= columnHeadersCount;
|
888
933
|
}
|
@@ -980,7 +1025,7 @@ var Table = /*#__PURE__*/function () {
|
|
980
1025
|
*
|
981
1026
|
* Negative column index is used to check the rows' headers.
|
982
1027
|
*
|
983
|
-
* For
|
1028
|
+
* For fixedColumnsStart: 1 the master overlay
|
984
1029
|
* do not render this first columns.
|
985
1030
|
* Headers -3 -2 -1 |
|
986
1031
|
* +----+----+----║┄ ┄ +------+------+
|
@@ -1027,7 +1072,7 @@ var Table = /*#__PURE__*/function () {
|
|
1027
1072
|
* it is not possible to render headers partially. The "after" index can not be
|
1028
1073
|
* lower than -1.
|
1029
1074
|
*
|
1030
|
-
* For
|
1075
|
+
* For fixedColumnsStart: 1 the master overlay
|
1031
1076
|
* do not render this first columns.
|
1032
1077
|
* Headers -3 -2 -1 |
|
1033
1078
|
* +----+----+----║┄ ┄ +------+------+
|
@@ -1084,12 +1129,12 @@ var Table = /*#__PURE__*/function () {
|
|
1084
1129
|
}, {
|
1085
1130
|
key: "allRowsInViewport",
|
1086
1131
|
value: function allRowsInViewport() {
|
1087
|
-
return this.
|
1132
|
+
return this.wtSettings.getSetting('totalRows') === this.getVisibleRowsCount();
|
1088
1133
|
}
|
1089
1134
|
}, {
|
1090
1135
|
key: "allColumnsInViewport",
|
1091
1136
|
value: function allColumnsInViewport() {
|
1092
|
-
return this.
|
1137
|
+
return this.wtSettings.getSetting('totalColumns') === this.getVisibleColumnsCount();
|
1093
1138
|
}
|
1094
1139
|
/**
|
1095
1140
|
* Checks if any of the row's cells content exceeds its initial height, and if so, returns the oversized height.
|
@@ -1145,6 +1190,58 @@ var Table = /*#__PURE__*/function () {
|
|
1145
1190
|
value: function hasDefinedSize() {
|
1146
1191
|
return this.hasTableHeight && this.hasTableWidth;
|
1147
1192
|
}
|
1193
|
+
/**
|
1194
|
+
* Gets table's width. The returned width is the width of the rendered cells that fit in the
|
1195
|
+
* current viewport. The value may change depends on the viewport position (scroll position).
|
1196
|
+
*
|
1197
|
+
* @returns {number}
|
1198
|
+
*/
|
1199
|
+
|
1200
|
+
}, {
|
1201
|
+
key: "getWidth",
|
1202
|
+
value: function getWidth() {
|
1203
|
+
return outerWidth(this.TABLE);
|
1204
|
+
}
|
1205
|
+
/**
|
1206
|
+
* Gets table's height. The returned height is the height of the rendered cells that fit in the
|
1207
|
+
* current viewport. The value may change depends on the viewport position (scroll position).
|
1208
|
+
*
|
1209
|
+
* @returns {number}
|
1210
|
+
*/
|
1211
|
+
|
1212
|
+
}, {
|
1213
|
+
key: "getHeight",
|
1214
|
+
value: function getHeight() {
|
1215
|
+
return outerHeight(this.TABLE);
|
1216
|
+
}
|
1217
|
+
/**
|
1218
|
+
* Gets table's total width. The returned width is the width of all rendered cells (including headers)
|
1219
|
+
* that can be displayed in the table.
|
1220
|
+
*
|
1221
|
+
* @returns {number}
|
1222
|
+
*/
|
1223
|
+
|
1224
|
+
}, {
|
1225
|
+
key: "getTotalWidth",
|
1226
|
+
value: function getTotalWidth() {
|
1227
|
+
var width = outerWidth(this.hider); // when the overlay's table does not have any cells the hider returns 0, get then width from the table element
|
1228
|
+
|
1229
|
+
return width !== 0 ? width : this.getWidth();
|
1230
|
+
}
|
1231
|
+
/**
|
1232
|
+
* Gets table's total height. The returned height is the height of all rendered cells (including headers)
|
1233
|
+
* that can be displayed in the table.
|
1234
|
+
*
|
1235
|
+
* @returns {number}
|
1236
|
+
*/
|
1237
|
+
|
1238
|
+
}, {
|
1239
|
+
key: "getTotalHeight",
|
1240
|
+
value: function getTotalHeight() {
|
1241
|
+
var height = outerHeight(this.hider); // when the overlay's table does not have any cells the hider returns 0, get then height from the table element
|
1242
|
+
|
1243
|
+
return height !== 0 ? height : this.getHeight();
|
1244
|
+
}
|
1148
1245
|
/**
|
1149
1246
|
* Checks if the table is visible. It returns `true` when the holder element (or its parents)
|
1150
1247
|
* has CSS 'display' property different than 'none'.
|
@@ -1193,7 +1290,7 @@ var Table = /*#__PURE__*/function () {
|
|
1193
1290
|
var rowHeaderWidth = width;
|
1194
1291
|
|
1195
1292
|
if (typeof width !== 'number') {
|
1196
|
-
rowHeaderWidth = this.
|
1293
|
+
rowHeaderWidth = this.wtSettings.getSetting('defaultColumnWidth');
|
1197
1294
|
}
|
1198
1295
|
|
1199
1296
|
if (this.correctHeaderWidth) {
|