handsontable 11.0.0 → 12.0.0
Sign up to get free protection for your applications and to get access to all the features.
- 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
@@ -12,13 +12,13 @@ require("core-js/modules/web.dom-collections.iterator.js");
|
|
12
12
|
|
13
13
|
require("core-js/modules/es.array.slice.js");
|
14
14
|
|
15
|
-
require("core-js/modules/es.function.name.js");
|
16
|
-
|
17
15
|
require("core-js/modules/es.regexp.exec.js");
|
18
16
|
|
19
17
|
exports.__esModule = true;
|
20
18
|
exports.default = void 0;
|
21
19
|
|
20
|
+
require("core-js/modules/es.function.name.js");
|
21
|
+
|
22
22
|
require("core-js/modules/es.array.from.js");
|
23
23
|
|
24
24
|
require("core-js/modules/es.string.iterator.js");
|
@@ -29,11 +29,9 @@ require("core-js/modules/es.object.to-string.js");
|
|
29
29
|
|
30
30
|
require("core-js/modules/web.dom-collections.for-each.js");
|
31
31
|
|
32
|
-
var _element = require("
|
33
|
-
|
34
|
-
var _function = require("./../../../helpers/function");
|
32
|
+
var _element = require("../../../helpers/dom/element");
|
35
33
|
|
36
|
-
var
|
34
|
+
var _function = require("../../../helpers/function");
|
37
35
|
|
38
36
|
var _column = _interopRequireDefault(require("./filter/column"));
|
39
37
|
|
@@ -45,9 +43,7 @@ var _column2 = _interopRequireDefault(require("./utils/column"));
|
|
45
43
|
|
46
44
|
var _row2 = _interopRequireDefault(require("./utils/row"));
|
47
45
|
|
48
|
-
var
|
49
|
-
|
50
|
-
var _constants = require("./overlay/constants");
|
46
|
+
var _overlay = require("./overlay");
|
51
47
|
|
52
48
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
53
49
|
|
@@ -75,93 +71,138 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
75
71
|
|
76
72
|
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); } }
|
77
73
|
|
78
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
74
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
75
|
+
|
76
|
+
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; }
|
79
77
|
|
80
78
|
/**
|
81
|
-
*
|
79
|
+
* @todo These mixes are never added to the class Table, however their members are used here.
|
80
|
+
* @todo Continue: Potentially it works only, because some of these mixes are added to every inherited class.
|
81
|
+
* @todo Refactoring, move code from `if(this.isMaster)` into MasterTable, and others like that.
|
82
|
+
* @mixes stickyColumnsStart
|
83
|
+
* @mixes stickyRowsBottom
|
84
|
+
* @mixes stickyRowsTop
|
85
|
+
* @mixes calculatedRows
|
86
|
+
* @mixes calculatedColumns
|
87
|
+
* @abstract
|
82
88
|
*/
|
83
89
|
var Table = /*#__PURE__*/function () {
|
84
90
|
/**
|
85
|
-
*
|
86
|
-
*
|
91
|
+
* The walkontable settings.
|
92
|
+
*
|
93
|
+
* @protected
|
94
|
+
* @type {Settings}
|
95
|
+
*/
|
96
|
+
|
97
|
+
/**
|
98
|
+
* Indicates if the table has height bigger than 0px.
|
99
|
+
*
|
100
|
+
* @type {boolean}
|
101
|
+
*/
|
102
|
+
|
103
|
+
/**
|
104
|
+
* Indicates if the table has width bigger than 0px.
|
105
|
+
*
|
106
|
+
* @type {boolean}
|
107
|
+
*/
|
108
|
+
|
109
|
+
/**
|
110
|
+
* Indicates if the table is visible. By visible, it means that the holder
|
111
|
+
* element has CSS 'display' property different than 'none'.
|
112
|
+
*
|
113
|
+
* @type {boolean}
|
114
|
+
*/
|
115
|
+
|
116
|
+
/**
|
117
|
+
*
|
118
|
+
* @abstract
|
119
|
+
* @param {TableDao} dataAccessObject The data access object.
|
120
|
+
* @param {FacadeGetter} facadeGetter Function which return proper facade.
|
121
|
+
* @param {DomBindings} domBindings Bindings into DOM.
|
122
|
+
* @param {Settings} wtSettings The Walkontable settings.
|
123
|
+
* @param {'master'|CLONE_TYPES_ENUM} name Overlay name.
|
87
124
|
*/
|
88
|
-
function Table(
|
125
|
+
function Table(dataAccessObject, facadeGetter, domBindings, wtSettings, name) {
|
89
126
|
var _this = this;
|
90
127
|
|
91
128
|
_classCallCheck(this, Table);
|
92
129
|
|
93
|
-
|
94
|
-
* Indicates if this instance is of type `MasterTable` (i.e. It is NOT an overlay).
|
95
|
-
*
|
96
|
-
* @type {boolean}
|
97
|
-
*/
|
98
|
-
this.isMaster = !wotInstance.cloneOverlay; // "instanceof" operator isn't used, because it caused a circular reference in Webpack
|
130
|
+
_defineProperty(this, "wtSettings", null);
|
99
131
|
|
100
|
-
this
|
132
|
+
_defineProperty(this, "domBindings", void 0);
|
101
133
|
|
102
|
-
this
|
103
|
-
this.TABLE = table;
|
104
|
-
this.TBODY = null;
|
105
|
-
this.THEAD = null;
|
106
|
-
this.COLGROUP = null;
|
107
|
-
this.tableOffset = 0;
|
108
|
-
this.holderOffset = 0;
|
109
|
-
/**
|
110
|
-
* Indicates if the table has height bigger than 0px.
|
111
|
-
*
|
112
|
-
* @type {boolean}
|
113
|
-
*/
|
134
|
+
_defineProperty(this, "TBODY", null);
|
114
135
|
|
115
|
-
this
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
136
|
+
_defineProperty(this, "THEAD", null);
|
137
|
+
|
138
|
+
_defineProperty(this, "COLGROUP", null);
|
139
|
+
|
140
|
+
_defineProperty(this, "hasTableHeight", true);
|
141
|
+
|
142
|
+
_defineProperty(this, "hasTableWidth", true);
|
143
|
+
|
144
|
+
_defineProperty(this, "isTableVisible", false);
|
145
|
+
|
146
|
+
_defineProperty(this, "tableOffset", 0);
|
121
147
|
|
122
|
-
this
|
148
|
+
_defineProperty(this, "holderOffset", 0);
|
149
|
+
|
150
|
+
this.domBindings = domBindings;
|
123
151
|
/**
|
124
|
-
* Indicates if
|
125
|
-
* element has CSS 'display' property different than 'none'.
|
152
|
+
* Indicates if this instance is of type `MasterTable` (i.e. It is NOT an overlay).
|
126
153
|
*
|
127
154
|
* @type {boolean}
|
128
155
|
*/
|
129
156
|
|
130
|
-
this.
|
131
|
-
|
157
|
+
this.isMaster = name === 'master';
|
158
|
+
this.name = name;
|
159
|
+
this.dataAccessObject = dataAccessObject;
|
160
|
+
this.facadeGetter = facadeGetter;
|
161
|
+
this.wtSettings = wtSettings; // legacy support
|
162
|
+
|
163
|
+
this.instance = this.dataAccessObject.wot; // TODO refactoring: it might be removed here, and provides legacy support through facade.
|
164
|
+
|
165
|
+
this.wot = this.dataAccessObject.wot;
|
166
|
+
this.TABLE = domBindings.rootTable;
|
167
|
+
(0, _element.removeTextNodes)(this.TABLE); // TODO refactoring, to recognize the legitimacy of moving them into domBidings
|
168
|
+
|
132
169
|
this.spreader = this.createSpreader(this.TABLE);
|
133
170
|
this.hider = this.createHider(this.spreader);
|
134
171
|
this.holder = this.createHolder(this.hider);
|
135
172
|
this.wtRootElement = this.holder.parentNode;
|
136
173
|
|
137
174
|
if (this.isMaster) {
|
138
|
-
this.alignOverlaysWithTrimmingContainer();
|
175
|
+
this.alignOverlaysWithTrimmingContainer(); // todo wow, It calls method from child class (MasterTable).
|
139
176
|
}
|
140
177
|
|
141
178
|
this.fixTableDomTree();
|
142
|
-
this.rowFilter = null;
|
143
|
-
|
179
|
+
this.rowFilter = null; // TODO refactoring, eliminate all (re)creations of this object, then updates state when needed.
|
180
|
+
|
181
|
+
this.columnFilter = null; // TODO refactoring, eliminate all (re)creations of this object, then updates state when needed.
|
182
|
+
|
144
183
|
this.correctHeaderWidth = false;
|
145
|
-
var origRowHeaderWidth = this.
|
184
|
+
var origRowHeaderWidth = this.wtSettings.getSettingPure('rowHeaderWidth'); // Fix for jumping row headers (https://github.com/handsontable/handsontable/issues/3850)
|
146
185
|
|
147
|
-
this.
|
186
|
+
this.wtSettings.update('rowHeaderWidth', function () {
|
148
187
|
return _this._modifyRowHeaderWidth(origRowHeaderWidth);
|
149
|
-
};
|
188
|
+
});
|
189
|
+
this.rowUtils = new _row2.default(this.dataAccessObject, this.wtSettings); // TODO refactoring, It can be passed through IOC.
|
190
|
+
|
191
|
+
this.columnUtils = new _column2.default(this.dataAccessObject, this.wtSettings); // TODO refactoring, It can be passed through IOC.
|
150
192
|
|
151
|
-
this.rowUtils = new _row2.default(this.wot);
|
152
|
-
this.columnUtils = new _column2.default(this.wot);
|
153
193
|
this.tableRenderer = new _renderer.Renderer({
|
194
|
+
// TODO refactoring, It can be passed through IOC.
|
154
195
|
TABLE: this.TABLE,
|
155
196
|
THEAD: this.THEAD,
|
156
197
|
COLGROUP: this.COLGROUP,
|
157
198
|
TBODY: this.TBODY,
|
158
199
|
rowUtils: this.rowUtils,
|
159
200
|
columnUtils: this.columnUtils,
|
160
|
-
cellRenderer: this.
|
201
|
+
cellRenderer: this.wtSettings.getSettingPure('cellRenderer')
|
161
202
|
});
|
162
203
|
}
|
163
204
|
/**
|
164
|
-
* Returns a boolean that is true if this
|
205
|
+
* Returns a boolean that is true if this Table represents a specific overlay, identified by the overlay name.
|
165
206
|
* For MasterTable, it returns false.
|
166
207
|
*
|
167
208
|
* @param {string} overlayTypeName The overlay type.
|
@@ -172,7 +213,8 @@ var Table = /*#__PURE__*/function () {
|
|
172
213
|
_createClass(Table, [{
|
173
214
|
key: "is",
|
174
215
|
value: function is(overlayTypeName) {
|
175
|
-
|
216
|
+
// todo refactoring: eliminate all protected and private usages
|
217
|
+
return this.name === overlayTypeName;
|
176
218
|
}
|
177
219
|
/**
|
178
220
|
*
|
@@ -181,7 +223,7 @@ var Table = /*#__PURE__*/function () {
|
|
181
223
|
}, {
|
182
224
|
key: "fixTableDomTree",
|
183
225
|
value: function fixTableDomTree() {
|
184
|
-
var rootDocument = this.
|
226
|
+
var rootDocument = this.domBindings.rootDocument;
|
185
227
|
this.TBODY = this.TABLE.querySelector('tbody');
|
186
228
|
|
187
229
|
if (!this.TBODY) {
|
@@ -202,10 +244,6 @@ var Table = /*#__PURE__*/function () {
|
|
202
244
|
this.COLGROUP = rootDocument.createElement('colgroup');
|
203
245
|
this.TABLE.insertBefore(this.COLGROUP, this.THEAD);
|
204
246
|
}
|
205
|
-
|
206
|
-
if (this.wot.getSetting('columnHeaders').length && !this.THEAD.childNodes.length) {
|
207
|
-
this.THEAD.appendChild(rootDocument.createElement('TR'));
|
208
|
-
}
|
209
247
|
}
|
210
248
|
/**
|
211
249
|
* @param {HTMLTableElement} table An element to process.
|
@@ -219,7 +257,7 @@ var Table = /*#__PURE__*/function () {
|
|
219
257
|
var spreader;
|
220
258
|
|
221
259
|
if (!parent || parent.nodeType !== Node.ELEMENT_NODE || !(0, _element.hasClass)(parent, 'wtHolder')) {
|
222
|
-
spreader = this.
|
260
|
+
spreader = this.domBindings.rootDocument.createElement('div');
|
223
261
|
spreader.className = 'wtSpreader';
|
224
262
|
|
225
263
|
if (parent) {
|
@@ -245,7 +283,7 @@ var Table = /*#__PURE__*/function () {
|
|
245
283
|
var hider;
|
246
284
|
|
247
285
|
if (!parent || parent.nodeType !== Node.ELEMENT_NODE || !(0, _element.hasClass)(parent, 'wtHolder')) {
|
248
|
-
hider = this.
|
286
|
+
hider = this.domBindings.rootDocument.createElement('div');
|
249
287
|
hider.className = 'wtHider';
|
250
288
|
|
251
289
|
if (parent) {
|
@@ -271,7 +309,7 @@ var Table = /*#__PURE__*/function () {
|
|
271
309
|
var holder;
|
272
310
|
|
273
311
|
if (!parent || parent.nodeType !== Node.ELEMENT_NODE || !(0, _element.hasClass)(parent, 'wtHolder')) {
|
274
|
-
holder = this.
|
312
|
+
holder = this.domBindings.rootDocument.createElement('div');
|
275
313
|
holder.style.position = 'relative';
|
276
314
|
holder.className = 'wtHolder';
|
277
315
|
|
@@ -282,6 +320,7 @@ var Table = /*#__PURE__*/function () {
|
|
282
320
|
|
283
321
|
if (this.isMaster) {
|
284
322
|
holder.parentNode.className += 'ht_master handsontable';
|
323
|
+
holder.parentNode.setAttribute('dir', this.wtSettings.getSettingPure('rtlMode') ? 'rtl' : 'ltr');
|
285
324
|
}
|
286
325
|
|
287
326
|
holder.appendChild(hider);
|
@@ -301,14 +340,15 @@ var Table = /*#__PURE__*/function () {
|
|
301
340
|
key: "draw",
|
302
341
|
value: function draw() {
|
303
342
|
var fastDraw = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
304
|
-
var
|
305
|
-
var
|
306
|
-
|
307
|
-
|
308
|
-
var
|
309
|
-
var
|
343
|
+
var wtSettings = this.wtSettings;
|
344
|
+
var _this$dataAccessObjec = this.dataAccessObject,
|
345
|
+
wtOverlays = _this$dataAccessObjec.wtOverlays,
|
346
|
+
wtViewport = _this$dataAccessObjec.wtViewport;
|
347
|
+
var totalRows = wtSettings.getSetting('totalRows');
|
348
|
+
var totalColumns = wtSettings.getSetting('totalColumns');
|
349
|
+
var rowHeaders = wtSettings.getSetting('rowHeaders');
|
310
350
|
var rowHeadersCount = rowHeaders.length;
|
311
|
-
var columnHeaders =
|
351
|
+
var columnHeaders = wtSettings.getSetting('columnHeaders');
|
312
352
|
var columnHeadersCount = columnHeaders.length;
|
313
353
|
var syncScroll = false;
|
314
354
|
var runFastDraw = fastDraw;
|
@@ -317,10 +357,10 @@ var Table = /*#__PURE__*/function () {
|
|
317
357
|
this.holderOffset = (0, _element.offset)(this.holder);
|
318
358
|
runFastDraw = wtViewport.createRenderCalculators(runFastDraw);
|
319
359
|
|
320
|
-
if (rowHeadersCount && !
|
321
|
-
var leftScrollPos = wtOverlays.
|
360
|
+
if (rowHeadersCount && !wtSettings.getSetting('fixedColumnsStart')) {
|
361
|
+
var leftScrollPos = wtOverlays.inlineStartOverlay.getScrollPosition();
|
322
362
|
var previousState = this.correctHeaderWidth;
|
323
|
-
this.correctHeaderWidth = leftScrollPos
|
363
|
+
this.correctHeaderWidth = leftScrollPos !== 0;
|
324
364
|
|
325
365
|
if (previousState !== this.correctHeaderWidth) {
|
326
366
|
runFastDraw = false;
|
@@ -329,7 +369,7 @@ var Table = /*#__PURE__*/function () {
|
|
329
369
|
}
|
330
370
|
|
331
371
|
if (this.isMaster) {
|
332
|
-
syncScroll = wtOverlays.
|
372
|
+
syncScroll = wtOverlays.updateStateOfRendering();
|
333
373
|
}
|
334
374
|
|
335
375
|
if (runFastDraw) {
|
@@ -345,7 +385,7 @@ var Table = /*#__PURE__*/function () {
|
|
345
385
|
if (this.isMaster) {
|
346
386
|
this.tableOffset = (0, _element.offset)(this.TABLE);
|
347
387
|
} else {
|
348
|
-
this.tableOffset = this.
|
388
|
+
this.tableOffset = this.dataAccessObject.parentTableOffset;
|
349
389
|
}
|
350
390
|
|
351
391
|
var startRow = totalRows > 0 ? this.getFirstRenderedRow() : 0;
|
@@ -355,16 +395,17 @@ var Table = /*#__PURE__*/function () {
|
|
355
395
|
var performRedraw = true; // Only master table rendering can be skipped
|
356
396
|
|
357
397
|
if (this.isMaster) {
|
358
|
-
this.alignOverlaysWithTrimmingContainer();
|
398
|
+
this.alignOverlaysWithTrimmingContainer(); // todo It calls method from child class (MasterTable).
|
399
|
+
|
359
400
|
var skipRender = {};
|
360
|
-
this.
|
401
|
+
this.wtSettings.getSetting('beforeDraw', true, skipRender);
|
361
402
|
performRedraw = skipRender.skipRender !== true;
|
362
403
|
}
|
363
404
|
|
364
405
|
if (performRedraw) {
|
365
406
|
this.tableRenderer.setHeaderContentRenderers(rowHeaders, columnHeaders);
|
366
407
|
|
367
|
-
if (this.is(
|
408
|
+
if (this.is(_overlay.CLONE_BOTTOM) || this.is(_overlay.CLONE_BOTTOM_INLINE_START_CORNER)) {
|
368
409
|
// do NOT render headers on the bottom or bottom-left corner overlay
|
369
410
|
this.tableRenderer.setHeaderContentRenderers(rowHeaders, []);
|
370
411
|
}
|
@@ -374,21 +415,21 @@ var Table = /*#__PURE__*/function () {
|
|
374
415
|
var workspaceWidth;
|
375
416
|
|
376
417
|
if (this.isMaster) {
|
377
|
-
workspaceWidth = this.
|
378
|
-
this.
|
418
|
+
workspaceWidth = this.dataAccessObject.workspaceWidth;
|
419
|
+
this.dataAccessObject.wtViewport.containerWidth = null;
|
379
420
|
this.markOversizedColumnHeaders();
|
380
421
|
}
|
381
422
|
|
382
423
|
this.adjustColumnHeaderHeights();
|
383
424
|
|
384
|
-
if (this.isMaster || this.is(
|
425
|
+
if (this.isMaster || this.is(_overlay.CLONE_BOTTOM)) {
|
385
426
|
this.markOversizedRows();
|
386
427
|
}
|
387
428
|
|
388
429
|
if (this.isMaster) {
|
389
|
-
this.
|
390
|
-
this.
|
391
|
-
this.
|
430
|
+
this.dataAccessObject.wtViewport.createVisibleCalculators();
|
431
|
+
this.dataAccessObject.wtOverlays.refresh(false);
|
432
|
+
this.dataAccessObject.wtOverlays.applyToDOM();
|
392
433
|
var hiderWidth = (0, _element.outerWidth)(this.hider);
|
393
434
|
var tableWidth = (0, _element.outerWidth)(this.TABLE);
|
394
435
|
|
@@ -398,16 +439,16 @@ var Table = /*#__PURE__*/function () {
|
|
398
439
|
this.tableRenderer.renderer.colGroup.render();
|
399
440
|
}
|
400
441
|
|
401
|
-
if (workspaceWidth !== this.
|
442
|
+
if (workspaceWidth !== this.dataAccessObject.wtViewport.getWorkspaceWidth()) {
|
402
443
|
// workspace width changed though to shown/hidden vertical scrollbar. Let's reapply stretching
|
403
|
-
this.
|
444
|
+
this.dataAccessObject.wtViewport.containerWidth = null;
|
404
445
|
this.columnUtils.calculateWidths();
|
405
446
|
this.tableRenderer.renderer.colGroup.render();
|
406
447
|
}
|
407
448
|
|
408
|
-
this.
|
409
|
-
} else if (this.is(
|
410
|
-
this.
|
449
|
+
this.wtSettings.getSetting('onDraw', true);
|
450
|
+
} else if (this.is(_overlay.CLONE_BOTTOM)) {
|
451
|
+
this.dataAccessObject.cloneSource.wtOverlays.adjustElementsSize();
|
411
452
|
}
|
412
453
|
}
|
413
454
|
}
|
@@ -419,19 +460,19 @@ var Table = /*#__PURE__*/function () {
|
|
419
460
|
positionChanged = wtOverlays.bottomOverlay.resetFixedPosition() || positionChanged;
|
420
461
|
}
|
421
462
|
|
422
|
-
positionChanged = wtOverlays.
|
463
|
+
positionChanged = wtOverlays.inlineStartOverlay.resetFixedPosition() || positionChanged;
|
423
464
|
|
424
|
-
if (wtOverlays.
|
425
|
-
wtOverlays.
|
465
|
+
if (wtOverlays.topInlineStartCornerOverlay) {
|
466
|
+
wtOverlays.topInlineStartCornerOverlay.resetFixedPosition();
|
426
467
|
}
|
427
468
|
|
428
|
-
if (wtOverlays.
|
429
|
-
wtOverlays.
|
469
|
+
if (wtOverlays.bottomInlineStartCornerOverlay && wtOverlays.bottomInlineStartCornerOverlay.clone) {
|
470
|
+
wtOverlays.bottomInlineStartCornerOverlay.resetFixedPosition();
|
430
471
|
}
|
431
472
|
|
432
473
|
if (positionChanged) {
|
433
474
|
// It refreshes the cells borders caused by a 1px shift (introduced by overlays which add or
|
434
|
-
// remove `innerBorderTop` and `
|
475
|
+
// remove `innerBorderTop` and `innerBorderInlineStart` CSS classes to the DOM element. This happens
|
435
476
|
// when there is a switch between rendering from 0 to N rows/columns and vice versa).
|
436
477
|
wtOverlays.refreshAll();
|
437
478
|
wtOverlays.adjustElementsSize();
|
@@ -444,7 +485,7 @@ var Table = /*#__PURE__*/function () {
|
|
444
485
|
wtOverlays.syncScrollWithMaster();
|
445
486
|
}
|
446
487
|
|
447
|
-
|
488
|
+
this.dataAccessObject.drawn = true;
|
448
489
|
return this;
|
449
490
|
}
|
450
491
|
/**
|
@@ -454,18 +495,18 @@ var Table = /*#__PURE__*/function () {
|
|
454
495
|
}, {
|
455
496
|
key: "markIfOversizedColumnHeader",
|
456
497
|
value: function markIfOversizedColumnHeader(col) {
|
457
|
-
var sourceColIndex = this.
|
458
|
-
var level = this.
|
459
|
-
var defaultRowHeight = this.
|
498
|
+
var sourceColIndex = this.columnFilter.renderedToSource(col);
|
499
|
+
var level = this.wtSettings.getSetting('columnHeaders').length;
|
500
|
+
var defaultRowHeight = this.wtSettings.getSetting('defaultRowHeight');
|
460
501
|
var previousColHeaderHeight;
|
461
502
|
var currentHeader;
|
462
503
|
var currentHeaderHeight;
|
463
|
-
var columnHeaderHeightSetting = this.
|
504
|
+
var columnHeaderHeightSetting = this.wtSettings.getSetting('columnHeaderHeight') || [];
|
464
505
|
|
465
506
|
while (level) {
|
466
507
|
level -= 1;
|
467
|
-
previousColHeaderHeight = this.
|
468
|
-
currentHeader = this.
|
508
|
+
previousColHeaderHeight = this.getColumnHeaderHeight(level);
|
509
|
+
currentHeader = this.getColumnHeader(sourceColIndex, level);
|
469
510
|
|
470
511
|
if (!currentHeader) {
|
471
512
|
/* eslint-disable no-continue */
|
@@ -475,19 +516,19 @@ var Table = /*#__PURE__*/function () {
|
|
475
516
|
currentHeaderHeight = (0, _element.innerHeight)(currentHeader);
|
476
517
|
|
477
518
|
if (!previousColHeaderHeight && defaultRowHeight < currentHeaderHeight || previousColHeaderHeight < currentHeaderHeight) {
|
478
|
-
this.
|
519
|
+
this.dataAccessObject.wtViewport.oversizedColumnHeaders[level] = currentHeaderHeight;
|
479
520
|
}
|
480
521
|
|
481
522
|
if (Array.isArray(columnHeaderHeightSetting)) {
|
482
523
|
if (columnHeaderHeightSetting[level] !== null && columnHeaderHeightSetting[level] !== void 0) {
|
483
|
-
this.
|
524
|
+
this.dataAccessObject.wtViewport.oversizedColumnHeaders[level] = columnHeaderHeightSetting[level];
|
484
525
|
}
|
485
526
|
} else if (!isNaN(columnHeaderHeightSetting)) {
|
486
|
-
this.
|
527
|
+
this.dataAccessObject.wtViewport.oversizedColumnHeaders[level] = columnHeaderHeightSetting;
|
487
528
|
}
|
488
529
|
|
489
|
-
if (this.
|
490
|
-
this.
|
530
|
+
if (this.dataAccessObject.wtViewport.oversizedColumnHeaders[level] < (columnHeaderHeightSetting[level] || columnHeaderHeightSetting)) {
|
531
|
+
this.dataAccessObject.wtViewport.oversizedColumnHeaders[level] = columnHeaderHeightSetting[level] || columnHeaderHeightSetting; // eslint-disable-line max-len
|
491
532
|
}
|
492
533
|
}
|
493
534
|
}
|
@@ -498,10 +539,10 @@ var Table = /*#__PURE__*/function () {
|
|
498
539
|
}, {
|
499
540
|
key: "adjustColumnHeaderHeights",
|
500
541
|
value: function adjustColumnHeaderHeights() {
|
501
|
-
var
|
502
|
-
var children =
|
503
|
-
var oversizedColumnHeaders =
|
504
|
-
var columnHeaders =
|
542
|
+
var wtSettings = this.wtSettings;
|
543
|
+
var children = this.THEAD.childNodes;
|
544
|
+
var oversizedColumnHeaders = this.dataAccessObject.wtViewport.oversizedColumnHeaders;
|
545
|
+
var columnHeaders = wtSettings.getSetting('columnHeaders');
|
505
546
|
|
506
547
|
for (var i = 0, len = columnHeaders.length; i < len; i++) {
|
507
548
|
if (oversizedColumnHeaders[i]) {
|
@@ -521,20 +562,21 @@ var Table = /*#__PURE__*/function () {
|
|
521
562
|
}, {
|
522
563
|
key: "resetOversizedRows",
|
523
564
|
value: function resetOversizedRows() {
|
524
|
-
var
|
565
|
+
var wtSettings = this.wtSettings;
|
566
|
+
var wtViewport = this.dataAccessObject.wtViewport;
|
525
567
|
|
526
|
-
if (!this.isMaster && !this.is(
|
568
|
+
if (!this.isMaster && !this.is(_overlay.CLONE_BOTTOM)) {
|
527
569
|
return;
|
528
570
|
}
|
529
571
|
|
530
|
-
if (!
|
572
|
+
if (!wtSettings.getSetting('externalRowCalculator')) {
|
531
573
|
var rowsToRender = this.getRenderedRowsCount(); // Reset the oversized row cache for rendered rows
|
532
574
|
|
533
575
|
for (var visibleRowIndex = 0; visibleRowIndex < rowsToRender; visibleRowIndex++) {
|
534
576
|
var sourceRow = this.rowFilter.renderedToSource(visibleRowIndex);
|
535
577
|
|
536
|
-
if (
|
537
|
-
|
578
|
+
if (wtViewport.oversizedRows && wtViewport.oversizedRows[sourceRow]) {
|
579
|
+
wtViewport.oversizedRows[sourceRow] = void 0;
|
538
580
|
}
|
539
581
|
}
|
540
582
|
}
|
@@ -561,13 +603,14 @@ var Table = /*#__PURE__*/function () {
|
|
561
603
|
}, {
|
562
604
|
key: "refreshSelections",
|
563
605
|
value: function refreshSelections(fastDraw) {
|
564
|
-
var
|
606
|
+
var wtSettings = this.wtSettings;
|
607
|
+
var selections = this.dataAccessObject.selections;
|
565
608
|
|
566
|
-
if (!
|
609
|
+
if (!selections) {
|
567
610
|
return;
|
568
611
|
}
|
569
612
|
|
570
|
-
var highlights = Array.from(
|
613
|
+
var highlights = Array.from(selections);
|
571
614
|
var len = highlights.length;
|
572
615
|
|
573
616
|
if (fastDraw) {
|
@@ -600,7 +643,7 @@ var Table = /*#__PURE__*/function () {
|
|
600
643
|
}
|
601
644
|
}
|
602
645
|
|
603
|
-
var additionalClassesToRemove =
|
646
|
+
var additionalClassesToRemove = wtSettings.getSetting('onBeforeRemoveCellClassNames');
|
604
647
|
|
605
648
|
if (Array.isArray(additionalClassesToRemove)) {
|
606
649
|
for (var _i = 0; _i < additionalClassesToRemove.length; _i++) {
|
@@ -617,7 +660,7 @@ var Table = /*#__PURE__*/function () {
|
|
617
660
|
}
|
618
661
|
|
619
662
|
for (var _i3 = 0; _i3 < len; _i3++) {
|
620
|
-
highlights[_i3].draw(
|
663
|
+
highlights[_i3].draw(this.facadeGetter(), fastDraw);
|
621
664
|
}
|
622
665
|
}
|
623
666
|
/**
|
@@ -645,7 +688,7 @@ var Table = /*#__PURE__*/function () {
|
|
645
688
|
value: function getCell(coords) {
|
646
689
|
var row = coords.row;
|
647
690
|
var column = coords.col;
|
648
|
-
var hookResult = this.
|
691
|
+
var hookResult = this.wtSettings.getSetting('onModifyGetCellCoords', row, column);
|
649
692
|
|
650
693
|
if (hookResult && Array.isArray(hookResult)) {
|
651
694
|
var _hookResult = _slicedToArray(hookResult, 2);
|
@@ -741,7 +784,7 @@ var Table = /*#__PURE__*/function () {
|
|
741
784
|
return;
|
742
785
|
}
|
743
786
|
|
744
|
-
var rowHeadersCount = this.
|
787
|
+
var rowHeadersCount = this.wtSettings.getSetting('rowHeaders').length;
|
745
788
|
|
746
789
|
if (level >= rowHeadersCount) {
|
747
790
|
return;
|
@@ -765,7 +808,7 @@ var Table = /*#__PURE__*/function () {
|
|
765
808
|
}
|
766
809
|
|
767
810
|
var THs = [];
|
768
|
-
var rowHeadersCount = this.
|
811
|
+
var rowHeadersCount = this.wtSettings.getSetting('rowHeaders').length;
|
769
812
|
|
770
813
|
for (var renderedRowIndex = 0; renderedRowIndex < rowHeadersCount; renderedRowIndex++) {
|
771
814
|
var TR = this.TBODY.childNodes[this.rowFilter.sourceToRendered(row)];
|
@@ -803,12 +846,12 @@ var Table = /*#__PURE__*/function () {
|
|
803
846
|
var row = (0, _element.index)(TR);
|
804
847
|
var col = cellElement.cellIndex;
|
805
848
|
|
806
|
-
if ((0, _element.overlayContainsElement)(
|
849
|
+
if ((0, _element.overlayContainsElement)(_overlay.CLONE_TOP_INLINE_START_CORNER, cellElement, this.wtRootElement) || (0, _element.overlayContainsElement)(_overlay.CLONE_TOP, cellElement, this.wtRootElement)) {
|
807
850
|
if (CONTAINER.nodeName === 'THEAD') {
|
808
851
|
row -= CONTAINER.childNodes.length;
|
809
852
|
}
|
810
|
-
} else if ((0, _element.overlayContainsElement)(
|
811
|
-
var totalRows = this.
|
853
|
+
} else if ((0, _element.overlayContainsElement)(_overlay.CLONE_BOTTOM_INLINE_START_CORNER, cellElement, this.wtRootElement) || (0, _element.overlayContainsElement)(_overlay.CLONE_BOTTOM, cellElement, this.wtRootElement)) {
|
854
|
+
var totalRows = this.wtSettings.getSetting('totalRows');
|
812
855
|
row = totalRows - CONTAINER.childNodes.length + row;
|
813
856
|
} else if (CONTAINER === this.THEAD) {
|
814
857
|
row = this.rowFilter.visibleColHeadedRowToSourceRow(row);
|
@@ -816,13 +859,13 @@ var Table = /*#__PURE__*/function () {
|
|
816
859
|
row = this.rowFilter.renderedToSource(row);
|
817
860
|
}
|
818
861
|
|
819
|
-
if ((0, _element.overlayContainsElement)(
|
862
|
+
if ((0, _element.overlayContainsElement)(_overlay.CLONE_TOP_INLINE_START_CORNER, cellElement, this.wtRootElement) || (0, _element.overlayContainsElement)(_overlay.CLONE_INLINE_START, cellElement, this.wtRootElement) || (0, _element.overlayContainsElement)(_overlay.CLONE_BOTTOM_INLINE_START_CORNER, cellElement, this.wtRootElement)) {
|
820
863
|
col = this.columnFilter.offsettedTH(col);
|
821
864
|
} else {
|
822
865
|
col = this.columnFilter.visibleRowHeadedColumnToSourceColumn(col);
|
823
866
|
}
|
824
867
|
|
825
|
-
return
|
868
|
+
return this.wot.createCellCoords(row, col);
|
826
869
|
}
|
827
870
|
/**
|
828
871
|
* Check if any of the rendered rows is higher than expected, and if so, cache them.
|
@@ -831,12 +874,12 @@ var Table = /*#__PURE__*/function () {
|
|
831
874
|
}, {
|
832
875
|
key: "markOversizedRows",
|
833
876
|
value: function markOversizedRows() {
|
834
|
-
if (this.
|
877
|
+
if (this.wtSettings.getSetting('externalRowCalculator')) {
|
835
878
|
return;
|
836
879
|
}
|
837
880
|
|
838
881
|
var rowCount = this.TBODY.childNodes.length;
|
839
|
-
var expectedTableHeight = rowCount * this.
|
882
|
+
var expectedTableHeight = rowCount * this.wtSettings.getSetting('defaultRowHeight');
|
840
883
|
var actualTableHeight = (0, _element.innerHeight)(this.TBODY) - 1;
|
841
884
|
var previousRowHeight;
|
842
885
|
var rowInnerHeight;
|
@@ -844,7 +887,7 @@ var Table = /*#__PURE__*/function () {
|
|
844
887
|
var currentTr;
|
845
888
|
var rowHeader;
|
846
889
|
|
847
|
-
if (expectedTableHeight === actualTableHeight && !this.
|
890
|
+
if (expectedTableHeight === actualTableHeight && !this.wtSettings.getSetting('fixedRowsBottom')) {
|
848
891
|
// If the actual table height equals rowCount * default single row height, no row is oversized -> no need to iterate over them
|
849
892
|
return;
|
850
893
|
}
|
@@ -862,9 +905,9 @@ var Table = /*#__PURE__*/function () {
|
|
862
905
|
rowInnerHeight = (0, _element.innerHeight)(currentTr) - 1;
|
863
906
|
}
|
864
907
|
|
865
|
-
if (!previousRowHeight && this.
|
908
|
+
if (!previousRowHeight && this.wtSettings.getSetting('defaultRowHeight') < rowInnerHeight || previousRowHeight < rowInnerHeight) {
|
866
909
|
rowInnerHeight += 1;
|
867
|
-
this.
|
910
|
+
this.dataAccessObject.wtViewport.oversizedRows[sourceRowIndex] = rowInnerHeight;
|
868
911
|
}
|
869
912
|
}
|
870
913
|
}
|
@@ -892,7 +935,7 @@ var Table = /*#__PURE__*/function () {
|
|
892
935
|
return false;
|
893
936
|
}
|
894
937
|
|
895
|
-
var rowHeaders = this.
|
938
|
+
var rowHeaders = this.wtSettings.getSetting('rowHeaders');
|
896
939
|
var rowHeadersCount = rowHeaders.length;
|
897
940
|
return Math.abs(column) <= rowHeadersCount;
|
898
941
|
}
|
@@ -910,7 +953,7 @@ var Table = /*#__PURE__*/function () {
|
|
910
953
|
return false;
|
911
954
|
}
|
912
955
|
|
913
|
-
var columnHeaders = this.
|
956
|
+
var columnHeaders = this.wtSettings.getSetting('columnHeaders');
|
914
957
|
var columnHeadersCount = columnHeaders.length;
|
915
958
|
return Math.abs(row) <= columnHeadersCount;
|
916
959
|
}
|
@@ -1008,7 +1051,7 @@ var Table = /*#__PURE__*/function () {
|
|
1008
1051
|
*
|
1009
1052
|
* Negative column index is used to check the rows' headers.
|
1010
1053
|
*
|
1011
|
-
* For
|
1054
|
+
* For fixedColumnsStart: 1 the master overlay
|
1012
1055
|
* do not render this first columns.
|
1013
1056
|
* Headers -3 -2 -1 |
|
1014
1057
|
* +----+----+----║┄ ┄ +------+------+
|
@@ -1055,7 +1098,7 @@ var Table = /*#__PURE__*/function () {
|
|
1055
1098
|
* it is not possible to render headers partially. The "after" index can not be
|
1056
1099
|
* lower than -1.
|
1057
1100
|
*
|
1058
|
-
* For
|
1101
|
+
* For fixedColumnsStart: 1 the master overlay
|
1059
1102
|
* do not render this first columns.
|
1060
1103
|
* Headers -3 -2 -1 |
|
1061
1104
|
* +----+----+----║┄ ┄ +------+------+
|
@@ -1112,12 +1155,12 @@ var Table = /*#__PURE__*/function () {
|
|
1112
1155
|
}, {
|
1113
1156
|
key: "allRowsInViewport",
|
1114
1157
|
value: function allRowsInViewport() {
|
1115
|
-
return this.
|
1158
|
+
return this.wtSettings.getSetting('totalRows') === this.getVisibleRowsCount();
|
1116
1159
|
}
|
1117
1160
|
}, {
|
1118
1161
|
key: "allColumnsInViewport",
|
1119
1162
|
value: function allColumnsInViewport() {
|
1120
|
-
return this.
|
1163
|
+
return this.wtSettings.getSetting('totalColumns') === this.getVisibleColumnsCount();
|
1121
1164
|
}
|
1122
1165
|
/**
|
1123
1166
|
* Checks if any of the row's cells content exceeds its initial height, and if so, returns the oversized height.
|
@@ -1173,6 +1216,58 @@ var Table = /*#__PURE__*/function () {
|
|
1173
1216
|
value: function hasDefinedSize() {
|
1174
1217
|
return this.hasTableHeight && this.hasTableWidth;
|
1175
1218
|
}
|
1219
|
+
/**
|
1220
|
+
* Gets table's width. The returned width is the width of the rendered cells that fit in the
|
1221
|
+
* current viewport. The value may change depends on the viewport position (scroll position).
|
1222
|
+
*
|
1223
|
+
* @returns {number}
|
1224
|
+
*/
|
1225
|
+
|
1226
|
+
}, {
|
1227
|
+
key: "getWidth",
|
1228
|
+
value: function getWidth() {
|
1229
|
+
return (0, _element.outerWidth)(this.TABLE);
|
1230
|
+
}
|
1231
|
+
/**
|
1232
|
+
* Gets table's height. The returned height is the height of the rendered cells that fit in the
|
1233
|
+
* current viewport. The value may change depends on the viewport position (scroll position).
|
1234
|
+
*
|
1235
|
+
* @returns {number}
|
1236
|
+
*/
|
1237
|
+
|
1238
|
+
}, {
|
1239
|
+
key: "getHeight",
|
1240
|
+
value: function getHeight() {
|
1241
|
+
return (0, _element.outerHeight)(this.TABLE);
|
1242
|
+
}
|
1243
|
+
/**
|
1244
|
+
* Gets table's total width. The returned width is the width of all rendered cells (including headers)
|
1245
|
+
* that can be displayed in the table.
|
1246
|
+
*
|
1247
|
+
* @returns {number}
|
1248
|
+
*/
|
1249
|
+
|
1250
|
+
}, {
|
1251
|
+
key: "getTotalWidth",
|
1252
|
+
value: function getTotalWidth() {
|
1253
|
+
var width = (0, _element.outerWidth)(this.hider); // when the overlay's table does not have any cells the hider returns 0, get then width from the table element
|
1254
|
+
|
1255
|
+
return width !== 0 ? width : this.getWidth();
|
1256
|
+
}
|
1257
|
+
/**
|
1258
|
+
* Gets table's total height. The returned height is the height of all rendered cells (including headers)
|
1259
|
+
* that can be displayed in the table.
|
1260
|
+
*
|
1261
|
+
* @returns {number}
|
1262
|
+
*/
|
1263
|
+
|
1264
|
+
}, {
|
1265
|
+
key: "getTotalHeight",
|
1266
|
+
value: function getTotalHeight() {
|
1267
|
+
var height = (0, _element.outerHeight)(this.hider); // when the overlay's table does not have any cells the hider returns 0, get then height from the table element
|
1268
|
+
|
1269
|
+
return height !== 0 ? height : this.getHeight();
|
1270
|
+
}
|
1176
1271
|
/**
|
1177
1272
|
* Checks if the table is visible. It returns `true` when the holder element (or its parents)
|
1178
1273
|
* has CSS 'display' property different than 'none'.
|
@@ -1221,7 +1316,7 @@ var Table = /*#__PURE__*/function () {
|
|
1221
1316
|
var rowHeaderWidth = width;
|
1222
1317
|
|
1223
1318
|
if (typeof width !== 'number') {
|
1224
|
-
rowHeaderWidth = this.
|
1319
|
+
rowHeaderWidth = this.wtSettings.getSetting('defaultColumnWidth');
|
1225
1320
|
}
|
1226
1321
|
|
1227
1322
|
if (this.correctHeaderWidth) {
|