handsontable 11.1.0 → 12.1.0
Sign up to get free protection for your applications and to get access to all the features.
- package/3rdparty/walkontable/src/border.js +120 -98
- package/3rdparty/walkontable/src/border.mjs +120 -94
- package/3rdparty/walkontable/src/cell/coords.js +59 -17
- package/3rdparty/walkontable/src/cell/coords.mjs +55 -17
- package/3rdparty/walkontable/src/cell/range.d.ts +10 -2
- package/3rdparty/walkontable/src/cell/range.js +278 -99
- package/3rdparty/walkontable/src/cell/range.mjs +273 -99
- 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 +99 -66
- package/3rdparty/walkontable/src/event.mjs +99 -63
- package/3rdparty/walkontable/src/facade/core.js +251 -0
- package/3rdparty/walkontable/src/facade/core.mjs +243 -0
- package/3rdparty/walkontable/src/index.js +2 -46
- package/3rdparty/walkontable/src/index.mjs +3 -13
- package/3rdparty/walkontable/src/overlay/_base.js +124 -57
- package/3rdparty/walkontable/src/overlay/_base.mjs +124 -57
- package/3rdparty/walkontable/src/overlay/bottom.js +96 -80
- package/3rdparty/walkontable/src/overlay/bottom.mjs +96 -80
- package/3rdparty/walkontable/src/overlay/{bottomLeftCorner.js → bottomInlineStartCorner.js} +45 -62
- package/3rdparty/walkontable/src/overlay/{bottomLeftCorner.mjs → bottomInlineStartCorner.mjs} +44 -61
- 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} +113 -82
- package/3rdparty/walkontable/src/overlay/{left.mjs → inlineStart.mjs} +112 -81
- package/3rdparty/walkontable/src/overlay/top.js +93 -68
- package/3rdparty/walkontable/src/overlay/top.mjs +93 -68
- 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 +225 -156
- package/3rdparty/walkontable/src/overlays.mjs +224 -154
- package/3rdparty/walkontable/src/renderer/cells.js +4 -3
- package/3rdparty/walkontable/src/renderer/cells.mjs +4 -3
- package/3rdparty/walkontable/src/renderer/colGroup.js +2 -2
- package/3rdparty/walkontable/src/renderer/colGroup.mjs +2 -2
- package/3rdparty/walkontable/src/renderer/columnHeaders.js +2 -2
- package/3rdparty/walkontable/src/renderer/columnHeaders.mjs +2 -2
- package/3rdparty/walkontable/src/renderer/rowHeaders.js +2 -2
- package/3rdparty/walkontable/src/renderer/rowHeaders.mjs +2 -2
- package/3rdparty/walkontable/src/renderer/rows.js +2 -2
- package/3rdparty/walkontable/src/renderer/rows.mjs +2 -2
- package/3rdparty/walkontable/src/scroll.js +125 -104
- package/3rdparty/walkontable/src/scroll.mjs +124 -104
- package/3rdparty/walkontable/src/selection.js +10 -14
- package/3rdparty/walkontable/src/selection.mjs +10 -12
- package/3rdparty/walkontable/src/settings.js +235 -126
- package/3rdparty/walkontable/src/settings.mjs +235 -125
- package/3rdparty/walkontable/src/table/bottom.js +16 -5
- package/3rdparty/walkontable/src/table/bottom.mjs +15 -5
- package/3rdparty/walkontable/src/table/{bottomLeftCorner.js → bottomInlineStartCorner.js} +27 -15
- package/3rdparty/walkontable/src/table/{bottomLeftCorner.mjs → bottomInlineStartCorner.mjs} +26 -15
- package/3rdparty/walkontable/src/table/{left.js → inlineStart.js} +23 -15
- package/3rdparty/walkontable/src/table/{left.mjs → inlineStart.mjs} +22 -15
- package/3rdparty/walkontable/src/table/master.js +22 -12
- package/3rdparty/walkontable/src/table/master.mjs +22 -12
- 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 +16 -5
- package/3rdparty/walkontable/src/table/top.mjs +15 -5
- package/3rdparty/walkontable/src/table/{topLeftCorner.js → topInlineStartCorner.js} +27 -15
- package/3rdparty/walkontable/src/table/{topLeftCorner.mjs → topInlineStartCorner.mjs} +26 -15
- package/3rdparty/walkontable/src/table.js +235 -140
- package/3rdparty/walkontable/src/table.mjs +231 -134
- package/3rdparty/walkontable/src/types.js +103 -0
- package/3rdparty/walkontable/src/types.mjs +102 -0
- package/3rdparty/walkontable/src/utils/column.js +22 -33
- package/3rdparty/walkontable/src/utils/column.mjs +22 -30
- package/3rdparty/walkontable/src/utils/orderView/sharedView.js +2 -2
- package/3rdparty/walkontable/src/utils/orderView/sharedView.mjs +2 -2
- package/3rdparty/walkontable/src/utils/row.js +9 -4
- package/3rdparty/walkontable/src/utils/row.mjs +9 -4
- package/3rdparty/walkontable/src/viewport.js +89 -100
- package/3rdparty/walkontable/src/viewport.mjs +89 -97
- package/CHANGELOG.md +92 -0
- package/LICENSE.txt +1 -1
- package/README.md +0 -1
- 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 +6 -1
- package/core.js +508 -80
- package/core.mjs +517 -92
- package/dataMap/index.js +4 -0
- package/dataMap/index.mjs +2 -1
- package/dataMap/metaManager/index.js +2 -2
- package/dataMap/metaManager/index.mjs +2 -2
- package/dataMap/metaManager/metaLayers/globalMeta.js +4 -0
- package/dataMap/metaManager/metaLayers/globalMeta.mjs +4 -0
- package/dataMap/metaManager/metaLayers/tableMeta.js +2 -2
- package/dataMap/metaManager/metaLayers/tableMeta.mjs +2 -2
- package/dataMap/metaManager/metaSchema.js +282 -187
- package/dataMap/metaManager/metaSchema.mjs +282 -187
- package/dataMap/metaManager/mods/extendMetaProperties.js +126 -0
- package/dataMap/metaManager/mods/extendMetaProperties.mjs +113 -0
- package/dataMap/replaceData.js +3 -17
- package/dataMap/replaceData.mjs +3 -17
- package/dist/handsontable.css +268 -92
- package/dist/handsontable.full.css +269 -103
- package/dist/handsontable.full.js +41990 -35658
- package/dist/handsontable.full.min.css +9 -9
- package/dist/handsontable.full.min.js +144 -144
- package/dist/handsontable.js +29561 -25597
- package/dist/handsontable.min.css +8 -8
- package/dist/handsontable.min.js +4 -4
- package/dist/languages/all.js +131 -34
- 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/cs-CZ.js +167 -0
- package/dist/languages/cs-CZ.min.js +1 -0
- package/dist/languages/de-CH.js +31 -29
- package/dist/languages/de-CH.min.js +1 -1
- package/dist/languages/de-DE.js +4 -2
- package/dist/languages/de-DE.min.js +1 -1
- package/dist/languages/en-US.js +4 -2
- package/dist/languages/en-US.min.js +1 -1
- package/dist/languages/es-MX.js +4 -2
- package/dist/languages/es-MX.min.js +1 -1
- package/dist/languages/fr-FR.js +4 -2
- package/dist/languages/fr-FR.min.js +1 -1
- package/dist/languages/it-IT.js +4 -2
- package/dist/languages/it-IT.min.js +1 -1
- package/dist/languages/ja-JP.js +36 -38
- package/dist/languages/ja-JP.min.js +1 -1
- package/dist/languages/ko-KR.js +36 -39
- package/dist/languages/ko-KR.min.js +1 -1
- package/dist/languages/lv-LV.js +2 -2
- package/dist/languages/lv-LV.min.js +1 -1
- package/dist/languages/nb-NO.js +2 -2
- package/dist/languages/nb-NO.min.js +1 -1
- package/dist/languages/nl-NL.js +2 -2
- package/dist/languages/nl-NL.min.js +1 -1
- package/dist/languages/pl-PL.js +2 -2
- package/dist/languages/pl-PL.min.js +1 -1
- package/dist/languages/pt-BR.js +2 -2
- package/dist/languages/pt-BR.min.js +1 -1
- package/dist/languages/ru-RU.js +2 -2
- package/dist/languages/ru-RU.min.js +1 -1
- package/dist/languages/sr-SP.js +171 -0
- package/dist/languages/sr-SP.min.js +1 -0
- package/dist/languages/zh-CN.js +24 -24
- package/dist/languages/zh-CN.min.js +1 -1
- package/dist/languages/zh-TW.js +24 -24
- package/dist/languages/zh-TW.min.js +1 -1
- package/editorManager.js +120 -267
- package/editorManager.mjs +128 -278
- package/editors/autocompleteEditor/autocompleteEditor.js +22 -25
- package/editors/autocompleteEditor/autocompleteEditor.mjs +22 -25
- package/editors/baseEditor/baseEditor.js +205 -34
- package/editors/baseEditor/baseEditor.mjs +200 -32
- package/editors/checkboxEditor/checkboxEditor.js +2 -2
- package/editors/checkboxEditor/checkboxEditor.mjs +2 -2
- package/editors/dateEditor/dateEditor.js +21 -8
- package/editors/dateEditor/dateEditor.mjs +22 -9
- package/editors/dropdownEditor/dropdownEditor.js +3 -3
- package/editors/dropdownEditor/dropdownEditor.mjs +3 -3
- package/editors/handsontableEditor/handsontableEditor.js +106 -55
- package/editors/handsontableEditor/handsontableEditor.mjs +106 -55
- package/editors/index.d.ts +3 -0
- package/editors/index.js +6 -0
- package/editors/index.mjs +3 -1
- package/editors/numericEditor/numericEditor.js +2 -2
- package/editors/numericEditor/numericEditor.mjs +2 -2
- package/editors/passwordEditor/passwordEditor.js +3 -3
- package/editors/passwordEditor/passwordEditor.mjs +3 -3
- package/editors/selectEditor/selectEditor.js +65 -110
- package/editors/selectEditor/selectEditor.mjs +66 -109
- package/editors/textEditor/caretPositioner.js +49 -0
- package/editors/textEditor/caretPositioner.mjs +42 -0
- package/editors/textEditor/textEditor.js +205 -181
- package/editors/textEditor/textEditor.mjs +199 -179
- 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 +4 -2
- package/eventManager.mjs +4 -2
- package/helpers/mixed.js +2 -2
- package/helpers/mixed.mjs +2 -2
- package/i18n/languages/ar-AR.js +41 -0
- package/i18n/languages/ar-AR.mjs +17 -0
- package/i18n/languages/cs-CZ.js +40 -0
- package/i18n/languages/cs-CZ.mjs +16 -0
- package/i18n/languages/index.js +12 -0
- package/i18n/languages/index.mjs +4 -1
- package/i18n/languages/sr-SP.js +40 -0
- package/i18n/languages/sr-SP.mjs +16 -0
- package/index.d.ts +4 -0
- package/languages/all.js +131 -34
- package/languages/ar-AR.js +167 -0
- package/languages/ar-AR.mjs +19 -0
- package/languages/cs-CZ.js +167 -0
- package/languages/cs-CZ.mjs +18 -0
- package/languages/de-CH.js +31 -29
- package/languages/de-DE.js +4 -2
- package/languages/en-US.js +4 -2
- package/languages/es-MX.js +4 -2
- package/languages/fr-FR.js +4 -2
- package/languages/index.js +131 -34
- package/languages/index.mjs +4 -1
- package/languages/it-IT.js +4 -2
- package/languages/ja-JP.js +36 -38
- package/languages/ko-KR.js +36 -39
- package/languages/lv-LV.js +2 -2
- package/languages/nb-NO.js +2 -2
- package/languages/nl-NL.js +2 -2
- package/languages/pl-PL.js +2 -2
- package/languages/pt-BR.js +2 -2
- package/languages/ru-RU.js +2 -2
- package/languages/sr-SP.js +171 -0
- package/languages/sr-SP.mjs +18 -0
- package/languages/zh-CN.js +24 -24
- package/languages/zh-TW.js +24 -24
- package/package.json +44 -4
- package/pluginHooks.js +49 -13
- package/pluginHooks.mjs +49 -13
- package/plugins/autoColumnSize/autoColumnSize.js +15 -10
- package/plugins/autoColumnSize/autoColumnSize.mjs +15 -10
- package/plugins/autoRowSize/autoRowSize.js +14 -9
- package/plugins/autoRowSize/autoRowSize.mjs +14 -9
- package/plugins/autofill/autofill.js +49 -33
- package/plugins/autofill/autofill.mjs +49 -32
- 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 +67 -4
- package/plugins/base/base.mjs +66 -4
- package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.js +3 -3
- package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.mjs +3 -3
- package/plugins/bindRowsWithHeaders/maps/looseBindsMap.js +3 -3
- package/plugins/bindRowsWithHeaders/maps/looseBindsMap.mjs +3 -3
- package/plugins/bindRowsWithHeaders/maps/strictBindsMap.js +3 -3
- package/plugins/bindRowsWithHeaders/maps/strictBindsMap.mjs +3 -3
- package/plugins/collapsibleColumns/collapsibleColumns.js +27 -9
- package/plugins/collapsibleColumns/collapsibleColumns.mjs +27 -9
- package/plugins/columnSorting/columnSorting.js +5 -7
- package/plugins/columnSorting/columnSorting.mjs +5 -6
- package/plugins/columnSummary/columnSummary.js +3 -3
- package/plugins/columnSummary/columnSummary.mjs +3 -3
- package/plugins/comments/commentEditor.js +18 -2
- package/plugins/comments/commentEditor.mjs +19 -3
- package/plugins/comments/comments.js +57 -46
- package/plugins/comments/comments.mjs +58 -46
- package/plugins/contextMenu/contextMenu.js +10 -6
- package/plugins/contextMenu/contextMenu.mjs +10 -6
- package/plugins/contextMenu/menu.js +222 -110
- package/plugins/contextMenu/menu.mjs +219 -111
- package/plugins/contextMenu/predefinedItems/columnLeft.js +12 -4
- package/plugins/contextMenu/predefinedItems/columnLeft.mjs +11 -4
- package/plugins/contextMenu/predefinedItems/columnRight.js +9 -9
- package/plugins/contextMenu/predefinedItems/columnRight.mjs +9 -9
- package/plugins/contextMenu/utils.js +2 -2
- package/plugins/contextMenu/utils.mjs +2 -2
- package/plugins/copyPaste/copyPaste.js +31 -21
- package/plugins/copyPaste/copyPaste.mjs +30 -21
- package/plugins/customBorders/contextMenuItem/left.js +4 -3
- package/plugins/customBorders/contextMenuItem/left.mjs +4 -3
- package/plugins/customBorders/contextMenuItem/right.js +4 -3
- package/plugins/customBorders/contextMenuItem/right.mjs +4 -3
- package/plugins/customBorders/customBorders.js +144 -87
- package/plugins/customBorders/customBorders.mjs +143 -85
- package/plugins/customBorders/utils.js +131 -27
- package/plugins/customBorders/utils.mjs +115 -27
- package/plugins/dragToScroll/dragToScroll.js +10 -5
- package/plugins/dragToScroll/dragToScroll.mjs +10 -5
- package/plugins/dropdownMenu/dropdownMenu.js +9 -7
- package/plugins/dropdownMenu/dropdownMenu.mjs +9 -7
- package/plugins/exportFile/exportFile.js +2 -2
- package/plugins/exportFile/exportFile.mjs +2 -2
- package/plugins/exportFile/types/csv.js +2 -2
- package/plugins/exportFile/types/csv.mjs +2 -2
- package/plugins/filters/component/actionBar.js +2 -2
- package/plugins/filters/component/actionBar.mjs +2 -2
- package/plugins/filters/component/condition.js +3 -3
- package/plugins/filters/component/condition.mjs +3 -3
- package/plugins/filters/component/operators.js +2 -2
- package/plugins/filters/component/operators.mjs +2 -2
- package/plugins/filters/component/value.js +3 -3
- package/plugins/filters/component/value.mjs +3 -3
- package/plugins/filters/filters.js +11 -8
- package/plugins/filters/filters.mjs +11 -8
- package/plugins/filters/ui/input.js +3 -3
- package/plugins/filters/ui/input.mjs +3 -3
- package/plugins/filters/ui/link.js +3 -3
- package/plugins/filters/ui/link.mjs +3 -3
- package/plugins/filters/ui/multipleSelect.js +18 -31
- package/plugins/filters/ui/multipleSelect.mjs +18 -31
- package/plugins/filters/ui/radioInput.js +3 -3
- package/plugins/filters/ui/radioInput.mjs +3 -3
- package/plugins/filters/ui/select.js +4 -4
- package/plugins/filters/ui/select.mjs +4 -4
- package/plugins/formulas/formulas.js +14 -9
- package/plugins/formulas/formulas.mjs +14 -9
- package/plugins/hiddenColumns/contextMenuItem/hideColumn.js +2 -4
- package/plugins/hiddenColumns/contextMenuItem/hideColumn.mjs +2 -4
- package/plugins/hiddenColumns/contextMenuItem/showColumn.js +5 -5
- package/plugins/hiddenColumns/contextMenuItem/showColumn.mjs +5 -5
- package/plugins/hiddenColumns/hiddenColumns.js +9 -4
- package/plugins/hiddenColumns/hiddenColumns.mjs +9 -4
- package/plugins/hiddenRows/contextMenuItem/hideRow.js +2 -4
- package/plugins/hiddenRows/contextMenuItem/hideRow.mjs +2 -4
- package/plugins/hiddenRows/contextMenuItem/showRow.js +5 -5
- package/plugins/hiddenRows/contextMenuItem/showRow.mjs +5 -5
- package/plugins/hiddenRows/hiddenRows.js +9 -4
- package/plugins/hiddenRows/hiddenRows.mjs +9 -4
- package/plugins/manualColumnFreeze/contextMenuItem/freezeColumn.js +1 -1
- package/plugins/manualColumnFreeze/contextMenuItem/freezeColumn.mjs +1 -1
- package/plugins/manualColumnFreeze/contextMenuItem/unfreezeColumn.js +1 -1
- package/plugins/manualColumnFreeze/contextMenuItem/unfreezeColumn.mjs +1 -1
- package/plugins/manualColumnFreeze/manualColumnFreeze.js +54 -15
- package/plugins/manualColumnFreeze/manualColumnFreeze.mjs +49 -15
- package/plugins/manualColumnMove/manualColumnMove.js +70 -70
- package/plugins/manualColumnMove/manualColumnMove.mjs +71 -71
- package/plugins/manualColumnMove/ui/_base.js +25 -12
- package/plugins/manualColumnMove/ui/_base.mjs +24 -12
- package/plugins/manualColumnMove/ui/backlight.js +3 -3
- package/plugins/manualColumnMove/ui/backlight.mjs +3 -3
- package/plugins/manualColumnMove/ui/guideline.js +3 -3
- package/plugins/manualColumnMove/ui/guideline.mjs +3 -3
- package/plugins/manualColumnResize/manualColumnResize.js +37 -21
- package/plugins/manualColumnResize/manualColumnResize.mjs +37 -21
- package/plugins/manualRowMove/manualRowMove.js +26 -34
- package/plugins/manualRowMove/manualRowMove.mjs +26 -34
- package/plugins/manualRowMove/ui/backlight.js +3 -3
- package/plugins/manualRowMove/ui/backlight.mjs +3 -3
- package/plugins/manualRowMove/ui/guideline.js +3 -3
- package/plugins/manualRowMove/ui/guideline.mjs +3 -3
- package/plugins/manualRowResize/manualRowResize.js +34 -19
- package/plugins/manualRowResize/manualRowResize.mjs +34 -19
- package/plugins/mergeCells/calculations/autofill.js +6 -5
- package/plugins/mergeCells/calculations/autofill.mjs +6 -4
- package/plugins/mergeCells/calculations/selection.js +9 -4
- package/plugins/mergeCells/calculations/selection.mjs +9 -4
- package/plugins/mergeCells/cellCoords.js +16 -4
- package/plugins/mergeCells/cellCoords.mjs +16 -3
- package/plugins/mergeCells/cellsCollection.js +30 -23
- package/plugins/mergeCells/cellsCollection.mjs +30 -22
- package/plugins/mergeCells/mergeCells.js +94 -61
- package/plugins/mergeCells/mergeCells.mjs +94 -59
- package/plugins/multiColumnSorting/multiColumnSorting.js +4 -6
- package/plugins/multiColumnSorting/multiColumnSorting.mjs +4 -5
- package/plugins/multipleSelectionHandles/multipleSelectionHandles.js +51 -57
- package/plugins/multipleSelectionHandles/multipleSelectionHandles.mjs +52 -57
- package/plugins/nestedHeaders/nestedHeaders.js +31 -20
- package/plugins/nestedHeaders/nestedHeaders.mjs +31 -20
- package/plugins/nestedHeaders/stateManager/utils.js +3 -4
- package/plugins/nestedHeaders/stateManager/utils.mjs +3 -4
- package/plugins/nestedHeaders/utils/ghostTable.js +114 -75
- package/plugins/nestedHeaders/utils/ghostTable.mjs +114 -74
- package/plugins/nestedRows/nestedRows.js +9 -4
- package/plugins/nestedRows/nestedRows.mjs +9 -4
- package/plugins/nestedRows/ui/collapsing.js +2 -2
- package/plugins/nestedRows/ui/collapsing.mjs +2 -2
- package/plugins/nestedRows/ui/contextMenu.js +2 -2
- package/plugins/nestedRows/ui/contextMenu.mjs +2 -2
- package/plugins/nestedRows/ui/headers.js +2 -2
- package/plugins/nestedRows/ui/headers.mjs +2 -2
- package/plugins/nestedRows/utils/rowMoveController.js +2 -4
- package/plugins/nestedRows/utils/rowMoveController.mjs +2 -3
- package/plugins/persistentState/persistentState.js +9 -4
- package/plugins/persistentState/persistentState.mjs +9 -4
- package/plugins/search/search.js +9 -4
- package/plugins/search/search.mjs +9 -4
- package/plugins/touchScroll/touchScroll.js +27 -21
- package/plugins/touchScroll/touchScroll.mjs +27 -21
- package/plugins/trimRows/trimRows.js +9 -4
- package/plugins/trimRows/trimRows.mjs +9 -4
- package/plugins/undoRedo/undoRedo.js +53 -47
- package/plugins/undoRedo/undoRedo.mjs +53 -46
- 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/visualSelection.js +94 -220
- package/selection/highlight/visualSelection.mjs +91 -213
- package/selection/mouseEventHandler.js +15 -10
- package/selection/mouseEventHandler.mjs +15 -9
- package/selection/range.js +4 -5
- package/selection/range.mjs +4 -5
- package/selection/selection.js +35 -22
- package/selection/selection.mjs +35 -20
- package/selection/transformation.js +4 -6
- package/selection/transformation.mjs +4 -5
- 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 +185 -0
- package/shortcuts/manager.mjs +176 -0
- package/shortcuts/recorder.js +192 -0
- package/shortcuts/recorder.mjs +180 -0
- package/shortcuts/utils.js +77 -0
- package/shortcuts/utils.mjs +54 -0
- package/tableView.js +164 -84
- package/tableView.mjs +164 -74
- package/translations/changesObservable/observer.js +0 -1
- package/translations/changesObservable/observer.mjs +0 -1
- package/translations/indexMapper.d.ts +3 -1
- package/translations/indexMapper.js +89 -11
- package/translations/indexMapper.mjs +91 -20
- package/translations/mapCollections/aggregatedCollection.js +2 -2
- package/translations/mapCollections/aggregatedCollection.mjs +2 -2
- package/translations/maps/hidingMap.js +4 -2
- package/translations/maps/hidingMap.mjs +4 -2
- package/translations/maps/indexMap.js +2 -0
- package/translations/maps/indexMap.mjs +2 -0
- package/translations/maps/indexesSequence.js +5 -3
- package/translations/maps/indexesSequence.mjs +5 -3
- package/translations/maps/linkedPhysicalIndexToValueMap.js +5 -3
- package/translations/maps/linkedPhysicalIndexToValueMap.mjs +5 -3
- package/translations/maps/physicalIndexToValueMap.js +5 -3
- package/translations/maps/physicalIndexToValueMap.mjs +5 -3
- package/translations/maps/trimmingMap.js +4 -2
- package/translations/maps/trimmingMap.mjs +4 -2
- 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 +1 -1
- package/utils/ghostTable.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,7 +30,6 @@ 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"); } }
|
@@ -38,102 +38,145 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
38
38
|
|
39
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
40
|
|
41
|
-
|
42
|
-
|
43
|
-
import
|
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; }
|
42
|
+
|
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) {
|