handsontable 14.6.1-next-689aaa6-20241016 → 15.0.0-next-4472a60-20241203
Sign up to get free protection for your applications and to get access to all the features.
- package/3rdparty/walkontable/src/calculator/calculationType/renderedColumns.js +23 -0
- package/3rdparty/walkontable/src/calculator/calculationType/renderedColumns.mjs +23 -0
- package/3rdparty/walkontable/src/calculator/calculationType/renderedRows.js +23 -0
- package/3rdparty/walkontable/src/calculator/calculationType/renderedRows.mjs +23 -0
- package/3rdparty/walkontable/src/calculator/index.js +1 -2
- package/3rdparty/walkontable/src/calculator/index.mjs +2 -2
- package/3rdparty/walkontable/src/calculator/viewportBase.js +2 -0
- package/3rdparty/walkontable/src/calculator/viewportBase.mjs +2 -0
- package/3rdparty/walkontable/src/calculator/viewportRows.js +3 -3
- package/3rdparty/walkontable/src/calculator/viewportRows.mjs +3 -3
- package/3rdparty/walkontable/src/core/_base.js +29 -23
- package/3rdparty/walkontable/src/core/_base.mjs +29 -23
- package/3rdparty/walkontable/src/core/clone.js +1 -0
- package/3rdparty/walkontable/src/core/clone.mjs +1 -0
- package/3rdparty/walkontable/src/core/core.js +2 -0
- package/3rdparty/walkontable/src/core/core.mjs +2 -0
- package/3rdparty/walkontable/src/facade/core.js +12 -6
- package/3rdparty/walkontable/src/facade/core.mjs +12 -6
- package/3rdparty/walkontable/src/index.js +0 -1
- package/3rdparty/walkontable/src/index.mjs +2 -2
- package/3rdparty/walkontable/src/overlay/_base.js +8 -1
- package/3rdparty/walkontable/src/overlay/_base.mjs +8 -1
- package/3rdparty/walkontable/src/overlay/bottom.js +5 -6
- package/3rdparty/walkontable/src/overlay/bottom.mjs +5 -6
- package/3rdparty/walkontable/src/overlay/index.js +2 -0
- package/3rdparty/walkontable/src/overlay/inlineStart.js +8 -7
- package/3rdparty/walkontable/src/overlay/inlineStart.mjs +9 -8
- package/3rdparty/walkontable/src/overlay/top.js +9 -8
- package/3rdparty/walkontable/src/overlay/top.mjs +10 -9
- package/3rdparty/walkontable/src/overlays.js +10 -26
- package/3rdparty/walkontable/src/overlays.mjs +10 -26
- package/3rdparty/walkontable/src/renderer/colGroup.js +1 -1
- package/3rdparty/walkontable/src/renderer/colGroup.mjs +1 -1
- package/3rdparty/walkontable/src/renderer/index.js +4 -2
- package/3rdparty/walkontable/src/renderer/index.mjs +4 -2
- package/3rdparty/walkontable/src/renderer/table.js +13 -4
- package/3rdparty/walkontable/src/renderer/table.mjs +13 -4
- package/3rdparty/walkontable/src/scroll.js +46 -37
- package/3rdparty/walkontable/src/scroll.mjs +46 -37
- package/3rdparty/walkontable/src/selection/border/border.js +52 -58
- package/3rdparty/walkontable/src/selection/border/border.mjs +53 -59
- package/3rdparty/walkontable/src/selection/border/utils.js +26 -0
- package/3rdparty/walkontable/src/selection/border/utils.mjs +22 -0
- package/3rdparty/walkontable/src/selection/index.js +6 -4
- package/3rdparty/walkontable/src/selection/index.mjs +1 -1
- package/3rdparty/walkontable/src/selection/manager.js +3 -0
- package/3rdparty/walkontable/src/selection/manager.mjs +3 -0
- package/3rdparty/walkontable/src/selection/scanner.js +46 -11
- package/3rdparty/walkontable/src/selection/scanner.mjs +46 -11
- package/3rdparty/walkontable/src/settings.js +8 -9
- package/3rdparty/walkontable/src/settings.mjs +8 -9
- package/3rdparty/walkontable/src/table/master.js +1 -1
- package/3rdparty/walkontable/src/table/master.mjs +2 -2
- package/3rdparty/walkontable/src/table.js +25 -36
- package/3rdparty/walkontable/src/table.mjs +25 -36
- package/3rdparty/walkontable/src/types.js +1 -0
- package/3rdparty/walkontable/src/types.mjs +1 -0
- package/3rdparty/walkontable/src/utils/column.js +1 -43
- package/3rdparty/walkontable/src/utils/column.mjs +1 -43
- package/3rdparty/walkontable/src/utils/stylesHandler.js +295 -0
- package/3rdparty/walkontable/src/utils/stylesHandler.mjs +291 -0
- package/3rdparty/walkontable/src/viewport.js +94 -91
- package/3rdparty/walkontable/src/viewport.mjs +95 -92
- package/CHANGELOG.md +36 -0
- package/README.md +1 -1
- package/base.js +4 -4
- package/base.mjs +3 -3
- package/core/focusCatcher/focusDetector.js +1 -0
- package/core/focusCatcher/focusDetector.mjs +1 -0
- package/core/hooks/bucket.js +184 -0
- package/core/hooks/bucket.mjs +180 -0
- package/{pluginHooks.mjs → core/hooks/constants.js} +38 -486
- package/{pluginHooks.js → core/hooks/constants.mjs} +34 -489
- package/{pluginHooks.d.ts → core/hooks/index.d.ts} +22 -25
- package/core/hooks/index.js +385 -0
- package/core/hooks/index.mjs +381 -0
- package/core/index.js +2 -0
- package/core.d.ts +5 -3
- package/core.js +77 -35
- package/core.mjs +69 -27
- package/dataMap/dataMap.js +3 -0
- package/dataMap/dataMap.mjs +3 -0
- package/dataMap/dataSource.js +2 -0
- package/dataMap/dataSource.mjs +2 -0
- package/dataMap/metaManager/index.js +2 -0
- package/dataMap/metaManager/index.mjs +2 -0
- package/dataMap/metaManager/metaSchema.js +91 -5
- package/dataMap/metaManager/metaSchema.mjs +91 -5
- package/dataMap/metaManager/mods/dynamicCellMeta.js +2 -3
- package/dataMap/metaManager/mods/dynamicCellMeta.mjs +1 -1
- package/dataMap/metaManager/mods/extendMetaProperties.js +2 -0
- package/dataMap/metaManager/mods/extendMetaProperties.mjs +2 -0
- package/dist/handsontable.css +84 -72
- package/dist/handsontable.full.css +317 -304
- package/dist/handsontable.full.js +14826 -7294
- package/dist/handsontable.full.min.css +15 -10
- package/dist/handsontable.full.min.js +262 -69
- package/dist/handsontable.js +7826 -5552
- package/dist/handsontable.min.css +10 -6
- package/dist/handsontable.min.js +33 -33
- package/dist/languages/all.js +1 -1
- package/dist/languages/ar-AR.js +1 -1
- package/dist/languages/cs-CZ.js +1 -1
- package/dist/languages/de-CH.js +1 -1
- package/dist/languages/de-DE.js +1 -1
- package/dist/languages/en-US.js +1 -1
- package/dist/languages/es-MX.js +1 -1
- package/dist/languages/fr-FR.js +1 -1
- package/dist/languages/hr-HR.js +1 -1
- package/dist/languages/it-IT.js +1 -1
- package/dist/languages/ja-JP.js +1 -1
- package/dist/languages/ko-KR.js +1 -1
- package/dist/languages/lv-LV.js +1 -1
- package/dist/languages/nb-NO.js +1 -1
- package/dist/languages/nl-NL.js +1 -1
- package/dist/languages/pl-PL.js +1 -1
- package/dist/languages/pt-BR.js +1 -1
- package/dist/languages/ru-RU.js +1 -1
- package/dist/languages/sr-SP.js +1 -1
- package/dist/languages/zh-CN.js +1 -1
- package/dist/languages/zh-TW.js +1 -1
- package/editorManager.js +2 -2
- package/editorManager.mjs +2 -2
- package/editors/autocompleteEditor/autocompleteEditor.js +34 -16
- package/editors/autocompleteEditor/autocompleteEditor.mjs +34 -16
- package/editors/baseEditor/baseEditor.js +25 -18
- package/editors/baseEditor/baseEditor.mjs +26 -19
- package/editors/dateEditor/dateEditor.js +9 -0
- package/editors/dateEditor/dateEditor.mjs +10 -1
- package/editors/dropdownEditor/dropdownEditor.js +4 -3
- package/editors/dropdownEditor/dropdownEditor.mjs +3 -1
- package/editors/handsontableEditor/handsontableEditor.js +36 -2
- package/editors/handsontableEditor/handsontableEditor.mjs +36 -2
- package/editors/passwordEditor/passwordEditor.js +18 -0
- package/editors/passwordEditor/passwordEditor.mjs +18 -0
- package/editors/registry.js +2 -2
- package/editors/registry.mjs +1 -1
- package/editors/selectEditor/selectEditor.js +20 -9
- package/editors/selectEditor/selectEditor.mjs +20 -9
- package/editors/textEditor/textEditor.js +5 -12
- package/editors/textEditor/textEditor.mjs +6 -13
- package/focusManager.js +5 -7
- package/focusManager.mjs +5 -7
- package/helpers/array.js +2 -0
- package/helpers/array.mjs +2 -0
- package/helpers/data.js +3 -0
- package/helpers/data.mjs +3 -0
- package/helpers/dom/element.js +39 -18
- package/helpers/dom/element.mjs +38 -17
- package/helpers/mixed.js +3 -3
- package/helpers/mixed.mjs +3 -3
- package/helpers/moves.js +3 -0
- package/helpers/moves.mjs +3 -0
- package/helpers/number.js +1 -0
- package/helpers/number.mjs +1 -0
- package/helpers/object.js +2 -0
- package/helpers/object.mjs +2 -0
- package/helpers/themes.js +17 -0
- package/helpers/themes.mjs +13 -0
- package/i18n/index.js +2 -0
- package/i18n/languages/index.d.ts +8 -0
- package/i18n/languages/ja-JP.d.ts +1 -1
- package/i18n/phraseFormatters/substituteVariables.js +1 -0
- package/i18n/phraseFormatters/substituteVariables.mjs +1 -0
- package/index.d.ts +9 -1
- package/languages/all.js +1 -1
- package/languages/ar-AR.js +1 -1
- package/languages/cs-CZ.js +1 -1
- package/languages/de-CH.js +1 -1
- package/languages/de-DE.js +1 -1
- package/languages/en-US.js +1 -1
- package/languages/es-MX.js +1 -1
- package/languages/fr-FR.js +1 -1
- package/languages/hr-HR.js +1 -1
- package/languages/index.js +1 -1
- package/languages/it-IT.js +1 -1
- package/languages/ja-JP.js +1 -1
- package/languages/ko-KR.js +1 -1
- package/languages/lv-LV.js +1 -1
- package/languages/nb-NO.js +1 -1
- package/languages/nl-NL.js +1 -1
- package/languages/pl-PL.js +1 -1
- package/languages/pt-BR.js +1 -1
- package/languages/ru-RU.js +1 -1
- package/languages/sr-SP.js +1 -1
- package/languages/zh-CN.js +1 -1
- package/languages/zh-TW.js +1 -1
- package/package.json +22 -7
- package/plugins/autoColumnSize/autoColumnSize.js +22 -27
- package/plugins/autoColumnSize/autoColumnSize.mjs +22 -27
- package/plugins/autoRowSize/autoRowSize.js +20 -22
- package/plugins/autoRowSize/autoRowSize.mjs +21 -23
- package/plugins/autofill/autofill.js +4 -5
- package/plugins/autofill/autofill.mjs +1 -1
- package/plugins/base/base.d.ts +1 -1
- package/plugins/base/base.js +41 -0
- package/plugins/base/base.mjs +42 -1
- package/plugins/base/index.js +2 -1
- package/plugins/base/index.mjs +1 -1
- package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.js +2 -5
- package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.mjs +2 -5
- package/plugins/columnSorting/columnSorting.js +5 -4
- package/plugins/columnSorting/columnSorting.mjs +3 -1
- package/plugins/columnSorting/columnStatesManager.js +1 -0
- package/plugins/columnSorting/columnStatesManager.mjs +1 -0
- package/plugins/columnSorting/utils.js +3 -0
- package/plugins/columnSorting/utils.mjs +3 -0
- package/plugins/columnSummary/endpoints.js +3 -0
- package/plugins/columnSummary/endpoints.mjs +3 -0
- package/plugins/comments/commentEditor.js +9 -0
- package/plugins/comments/commentEditor.mjs +9 -0
- package/plugins/comments/comments.js +24 -18
- package/plugins/comments/comments.mjs +26 -20
- package/plugins/comments/editorResizeObserver.js +2 -0
- package/plugins/comments/editorResizeObserver.mjs +2 -0
- package/plugins/contextMenu/contextMenu.d.ts +2 -1
- package/plugins/contextMenu/contextMenu.js +6 -7
- package/plugins/contextMenu/contextMenu.mjs +1 -1
- package/plugins/contextMenu/menu/index.js +2 -0
- package/plugins/contextMenu/menu/menu.js +10 -5
- package/plugins/contextMenu/menu/menu.mjs +11 -6
- package/plugins/contextMenu/menu/positioner.js +4 -2
- package/plugins/contextMenu/menu/positioner.mjs +4 -2
- package/plugins/contextMenu/menu/shortcuts.js +3 -1
- package/plugins/contextMenu/menu/shortcuts.mjs +3 -1
- package/plugins/contextMenu/predefinedItems/alignment.js +7 -84
- package/plugins/contextMenu/predefinedItems/alignment.mjs +8 -85
- package/plugins/contextMenu/utils.js +0 -10
- package/plugins/contextMenu/utils.mjs +0 -9
- package/plugins/copyPaste/copyPaste.d.ts +1 -0
- package/plugins/copyPaste/copyPaste.js +32 -23
- package/plugins/copyPaste/copyPaste.mjs +24 -15
- package/plugins/customBorders/utils.js +2 -0
- package/plugins/customBorders/utils.mjs +2 -0
- package/plugins/dropdownMenu/dropdownMenu.d.ts +2 -1
- package/plugins/dropdownMenu/dropdownMenu.js +6 -7
- package/plugins/dropdownMenu/dropdownMenu.mjs +1 -1
- package/plugins/exportFile/types/csv.js +1 -0
- package/plugins/exportFile/types/csv.mjs +1 -0
- package/plugins/filters/component/condition.js +2 -0
- package/plugins/filters/component/condition.mjs +2 -0
- package/plugins/filters/component/operators.js +2 -0
- package/plugins/filters/component/operators.mjs +2 -0
- package/plugins/filters/component/value.js +3 -0
- package/plugins/filters/component/value.mjs +3 -0
- package/plugins/filters/conditionCollection.js +3 -0
- package/plugins/filters/conditionCollection.mjs +3 -0
- package/plugins/filters/conditionUpdateObserver.js +2 -0
- package/plugins/filters/conditionUpdateObserver.mjs +2 -0
- package/plugins/filters/filters.js +43 -13
- package/plugins/filters/filters.mjs +43 -13
- package/plugins/filters/logicalOperations/conjunction.js +2 -0
- package/plugins/filters/logicalOperations/conjunction.mjs +2 -0
- package/plugins/filters/logicalOperations/disjunction.js +2 -0
- package/plugins/filters/logicalOperations/disjunction.mjs +2 -0
- package/plugins/filters/logicalOperations/disjunctionWithExtraCondition.js +2 -0
- package/plugins/filters/logicalOperations/disjunctionWithExtraCondition.mjs +2 -0
- package/plugins/filters/menu/focusController.js +38 -14
- package/plugins/filters/menu/focusController.mjs +38 -14
- package/plugins/filters/ui/multipleSelect.js +10 -0
- package/plugins/filters/ui/multipleSelect.mjs +10 -0
- package/plugins/formulas/engine/register.js +3 -0
- package/plugins/formulas/engine/register.mjs +3 -0
- package/plugins/formulas/engine/settings.js +3 -0
- package/plugins/formulas/engine/settings.mjs +3 -0
- package/plugins/formulas/formulas.js +12 -7
- package/plugins/formulas/formulas.mjs +6 -1
- package/plugins/formulas/indexSyncer/axisSyncer.js +3 -0
- package/plugins/formulas/indexSyncer/axisSyncer.mjs +3 -0
- package/plugins/hiddenColumns/contextMenuItem/showColumn.js +2 -0
- package/plugins/hiddenColumns/contextMenuItem/showColumn.mjs +2 -0
- package/plugins/hiddenColumns/hiddenColumns.js +22 -30
- package/plugins/hiddenColumns/hiddenColumns.mjs +18 -26
- package/plugins/hiddenRows/contextMenuItem/showRow.js +2 -0
- package/plugins/hiddenRows/contextMenuItem/showRow.mjs +2 -0
- package/plugins/hiddenRows/hiddenRows.js +21 -29
- package/plugins/hiddenRows/hiddenRows.mjs +17 -25
- package/plugins/index.d.ts +3 -0
- package/plugins/index.js +3 -0
- package/plugins/index.mjs +3 -1
- package/plugins/manualColumnFreeze/manualColumnFreeze.js +7 -5
- package/plugins/manualColumnFreeze/manualColumnFreeze.mjs +3 -1
- package/plugins/manualColumnMove/manualColumnMove.js +6 -6
- package/plugins/manualColumnMove/manualColumnMove.mjs +4 -4
- package/plugins/manualColumnResize/manualColumnResize.js +26 -12
- package/plugins/manualColumnResize/manualColumnResize.mjs +26 -12
- package/plugins/manualRowMove/manualRowMove.js +8 -6
- package/plugins/manualRowMove/manualRowMove.mjs +6 -4
- package/plugins/manualRowResize/manualRowResize.js +3 -2
- package/plugins/manualRowResize/manualRowResize.mjs +4 -3
- package/plugins/mergeCells/cellsCollection.js +19 -3
- package/plugins/mergeCells/cellsCollection.mjs +20 -4
- package/plugins/mergeCells/mergeCells.d.ts +6 -2
- package/plugins/mergeCells/mergeCells.js +84 -56
- package/plugins/mergeCells/mergeCells.mjs +82 -54
- package/plugins/mergeCells/renderer.js +13 -3
- package/plugins/mergeCells/renderer.mjs +13 -3
- package/plugins/multiColumnSorting/domHelpers.js +2 -0
- package/plugins/multiColumnSorting/domHelpers.mjs +2 -0
- package/plugins/nestedHeaders/nestedHeaders.js +63 -16
- package/plugins/nestedHeaders/nestedHeaders.mjs +63 -16
- package/plugins/nestedHeaders/stateManager/index.js +1 -0
- package/plugins/nestedHeaders/stateManager/index.mjs +1 -0
- package/plugins/nestedRows/nestedRows.js +3 -0
- package/plugins/nestedRows/nestedRows.mjs +3 -0
- package/plugins/nestedRows/ui/headers.js +7 -1
- package/plugins/nestedRows/ui/headers.mjs +7 -1
- package/plugins/nestedRows/utils/rowMoveController.js +4 -0
- package/plugins/nestedRows/utils/rowMoveController.mjs +4 -0
- package/plugins/persistentState/persistentState.js +4 -4
- package/plugins/persistentState/persistentState.mjs +1 -1
- package/plugins/stretchColumns/calculator.js +162 -0
- package/plugins/stretchColumns/calculator.mjs +158 -0
- package/plugins/stretchColumns/index.d.ts +1 -0
- package/plugins/stretchColumns/index.js +7 -0
- package/plugins/stretchColumns/index.mjs +1 -0
- package/plugins/stretchColumns/strategies/_base.js +85 -0
- package/plugins/stretchColumns/strategies/_base.mjs +81 -0
- package/plugins/stretchColumns/strategies/all.js +71 -0
- package/plugins/stretchColumns/strategies/all.mjs +67 -0
- package/plugins/stretchColumns/strategies/last.js +79 -0
- package/plugins/stretchColumns/strategies/last.mjs +75 -0
- package/plugins/stretchColumns/stretchColumns.d.ts +11 -0
- package/plugins/stretchColumns/stretchColumns.js +222 -0
- package/plugins/stretchColumns/stretchColumns.mjs +218 -0
- package/plugins/trimRows/trimRows.js +2 -0
- package/plugins/trimRows/trimRows.mjs +2 -0
- package/plugins/undoRedo/undoRedo.js +9 -5
- package/plugins/undoRedo/undoRedo.mjs +8 -3
- package/renderers/checkboxRenderer/checkboxRenderer.js +19 -8
- package/renderers/checkboxRenderer/checkboxRenderer.mjs +18 -7
- package/selection/index.js +2 -0
- package/selection/range.js +2 -0
- package/selection/range.mjs +2 -0
- package/selection/selection.js +7 -2
- package/selection/selection.mjs +7 -2
- package/selection/utils.js +2 -0
- package/selection/utils.mjs +2 -0
- package/settings.d.ts +4 -1
- package/shortcutContexts/commands/extendCellsSelection/downByViewportHeight.js +1 -1
- package/shortcutContexts/commands/extendCellsSelection/downByViewportHeight.mjs +1 -1
- package/shortcutContexts/commands/extendCellsSelection/upByViewportHeight.js +1 -1
- package/shortcutContexts/commands/extendCellsSelection/upByViewportHeight.mjs +1 -1
- package/shortcutContexts/commands/index.js +2 -0
- package/shortcutContexts/commands/index.mjs +2 -0
- package/shortcutContexts/commands/scrollToFocusedCell.js +4 -4
- package/shortcutContexts/commands/scrollToFocusedCell.mjs +4 -4
- package/shortcutContexts/index.js +2 -0
- package/shortcutContexts/index.mjs +2 -0
- package/shortcuts/context.js +3 -0
- package/shortcuts/context.mjs +3 -0
- package/shortcuts/recorder.js +3 -3
- package/shortcuts/recorder.mjs +3 -3
- package/shortcuts/utils.js +1 -0
- package/shortcuts/utils.mjs +1 -0
- package/styles/handsontable.css +2307 -0
- package/styles/handsontable.min.css +30 -0
- package/styles/ht-theme-horizon.css +607 -0
- package/styles/ht-theme-horizon.min.css +30 -0
- package/styles/ht-theme-main.css +613 -0
- package/styles/ht-theme-main.min.css +30 -0
- package/tableView.js +205 -33
- package/tableView.mjs +206 -34
- package/translations/changesObservable/observable.js +2 -0
- package/translations/changesObservable/observable.mjs +2 -0
- package/translations/index.js +2 -0
- package/translations/indexMapper.js +4 -0
- package/translations/indexMapper.mjs +4 -0
- package/translations/mapCollections/index.js +2 -0
- package/translations/mapCollections/mapCollection.js +2 -0
- package/translations/mapCollections/mapCollection.mjs +2 -0
- package/translations/maps/index.js +2 -0
- package/translations/maps/linkedPhysicalIndexToValueMap.js +1 -0
- package/translations/maps/linkedPhysicalIndexToValueMap.mjs +1 -0
- package/translations/maps/utils/actionsOnIndexes.js +2 -0
- package/translations/maps/utils/actionsOnIndexes.mjs +2 -0
- package/translations/maps/utils/physicallyIndexed.js +1 -0
- package/translations/maps/utils/physicallyIndexed.mjs +1 -0
- package/utils/autoResize.js +11 -3
- package/utils/autoResize.mjs +11 -3
- package/utils/dataStructures/priorityMap.js +1 -0
- package/utils/dataStructures/priorityMap.mjs +1 -0
- package/utils/dataStructures/uniqueMap.js +2 -0
- package/utils/dataStructures/uniqueMap.mjs +2 -0
- package/utils/ghostTable.js +7 -3
- package/utils/ghostTable.mjs +7 -3
- package/utils/parseTable.js +4 -0
- package/utils/parseTable.mjs +4 -0
- package/3rdparty/walkontable/src/selection/border/constants.js +0 -15
- package/3rdparty/walkontable/src/selection/border/constants.mjs +0 -12
- package/3rdparty/walkontable/src/utils/columnStretching.js +0 -197
- package/3rdparty/walkontable/src/utils/columnStretching.mjs +0 -193
package/tableView.mjs
CHANGED
@@ -9,7 +9,7 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
9
9
|
function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
|
10
10
|
function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
|
11
11
|
function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
|
12
|
-
import { addClass, clearTextSelection, empty, fastInnerHTML, fastInnerText, getScrollbarWidth, hasClass, isChildOf, isInput, isOutsideInput, isVisible, setAttribute, getParentWindow } from "./helpers/dom/element.mjs";
|
12
|
+
import { addClass, removeClass, clearTextSelection, empty, fastInnerHTML, fastInnerText, getScrollbarWidth, hasClass, isChildOf, isInput, isOutsideInput, isVisible, setAttribute, getParentWindow } from "./helpers/dom/element.mjs";
|
13
13
|
import EventManager from "./eventManager.mjs";
|
14
14
|
import { isImmediatePropagationStopped, isRightClick, isLeftClick } from "./helpers/dom/event.mjs";
|
15
15
|
import Walkontable from "./3rdparty/walkontable/src/index.mjs";
|
@@ -154,9 +154,10 @@ class TableView {
|
|
154
154
|
this.hot.runHooks('beforeRender', this.hot.forceFullRender);
|
155
155
|
if (this.postponedAdjustElementsSize) {
|
156
156
|
this.postponedAdjustElementsSize = false;
|
157
|
-
this.adjustElementsSize(
|
157
|
+
this.adjustElementsSize();
|
158
158
|
}
|
159
159
|
this._wt.draw(!this.hot.forceFullRender);
|
160
|
+
_assertClassBrand(_TableView_brand, this, _updateScrollbarClassNames).call(this);
|
160
161
|
this.hot.runHooks('afterRender', this.hot.forceFullRender);
|
161
162
|
this.hot.forceFullRender = false;
|
162
163
|
this.hot.renderCall = false;
|
@@ -194,38 +195,43 @@ class TableView {
|
|
194
195
|
* Scroll viewport to a cell.
|
195
196
|
*
|
196
197
|
* @param {CellCoords} coords Renderable cell coordinates.
|
197
|
-
* @param {
|
198
|
-
*
|
199
|
-
*
|
200
|
-
* @param {
|
198
|
+
* @param {'auto' | 'start' | 'end'} [horizontalSnap] If `'start'`, viewport is scrolled to show
|
199
|
+
* the cell on the left of the table. If `'end'`, viewport is scrolled to show the cell on the right of
|
200
|
+
* the table. When `'auto'`, the viewport is scrolled only when the column is outside of the viewport.
|
201
|
+
* @param {'auto' | 'top' | 'bottom'} [verticalSnap] If `'top'`, viewport is scrolled to show
|
202
|
+
* the cell on the top of the table. If `'bottom'`, viewport is scrolled to show the cell on the bottom of
|
203
|
+
* the table. When `'auto'`, the viewport is scrolled only when the row is outside of the viewport.
|
201
204
|
* @returns {boolean}
|
202
205
|
*/
|
203
|
-
scrollViewport(coords,
|
204
|
-
return this._wt.scrollViewport(coords,
|
206
|
+
scrollViewport(coords, horizontalSnap, verticalSnap) {
|
207
|
+
return this._wt.scrollViewport(coords, horizontalSnap, verticalSnap);
|
205
208
|
}
|
206
209
|
|
207
210
|
/**
|
208
211
|
* Scroll viewport to a column.
|
209
212
|
*
|
210
213
|
* @param {number} column Renderable column index.
|
211
|
-
* @param {
|
212
|
-
*
|
214
|
+
* @param {'auto' | 'start' | 'end'} [snap] If `'start'`, viewport is scrolled to show
|
215
|
+
* the cell on the left of the table. If `'end'`, viewport is scrolled to show the cell on the right of
|
216
|
+
* the table. When `'auto'`, the viewport is scrolled only when the column is outside of the viewport.
|
213
217
|
* @returns {boolean}
|
214
218
|
*/
|
215
|
-
scrollViewportHorizontally(column,
|
216
|
-
return this._wt.scrollViewportHorizontally(column,
|
219
|
+
scrollViewportHorizontally(column, snap) {
|
220
|
+
return this._wt.scrollViewportHorizontally(column, snap);
|
217
221
|
}
|
218
222
|
|
219
223
|
/**
|
220
224
|
* Scroll viewport to a row.
|
221
225
|
*
|
222
226
|
* @param {number} row Renderable row index.
|
223
|
-
* @param {
|
224
|
-
*
|
227
|
+
* @param {'auto' | 'top' | 'bottom'} [snap] If `'top'`, viewport is scrolled to show
|
228
|
+
* the cell on the top of the table. If `'bottom'`, viewport is scrolled to show the cell on
|
229
|
+
* the bottom of the table. When `'auto'`, the viewport is scrolled only when the row is outside of
|
230
|
+
* the viewport.
|
225
231
|
* @returns {boolean}
|
226
232
|
*/
|
227
|
-
scrollViewportVertically(row,
|
228
|
-
return this._wt.scrollViewportVertically(row,
|
233
|
+
scrollViewportVertically(row, snap) {
|
234
|
+
return this._wt.scrollViewportVertically(row, snap);
|
229
235
|
}
|
230
236
|
|
231
237
|
/**
|
@@ -583,6 +589,52 @@ class TableView {
|
|
583
589
|
return count;
|
584
590
|
}
|
585
591
|
|
592
|
+
/**
|
593
|
+
* Retrieves the styles handler from the Walkontable instance.
|
594
|
+
*
|
595
|
+
* @returns {StylesHandler} The styles handler instance.
|
596
|
+
*/
|
597
|
+
getStylesHandler() {
|
598
|
+
return this._wt.stylesHandler;
|
599
|
+
}
|
600
|
+
|
601
|
+
/**
|
602
|
+
* Returns the default row height.
|
603
|
+
*
|
604
|
+
* This method retrieves the default row height from the Walkontable styles handler.
|
605
|
+
*
|
606
|
+
* @returns {number} The default row height.
|
607
|
+
*/
|
608
|
+
getDefaultRowHeight() {
|
609
|
+
return this._wt.stylesHandler.getDefaultRowHeight();
|
610
|
+
}
|
611
|
+
|
612
|
+
/**
|
613
|
+
* Add a class name to the license information element.
|
614
|
+
*
|
615
|
+
* @param {string} className The class name to add.
|
616
|
+
*/
|
617
|
+
addClassNameToLicenseElement(className) {
|
618
|
+
var _this$hot$rootElement;
|
619
|
+
const licenseInfoElement = (_this$hot$rootElement = this.hot.rootElement.parentNode) === null || _this$hot$rootElement === void 0 ? void 0 : _this$hot$rootElement.querySelector('.hot-display-license-info');
|
620
|
+
if (licenseInfoElement) {
|
621
|
+
addClass(licenseInfoElement, className);
|
622
|
+
}
|
623
|
+
}
|
624
|
+
|
625
|
+
/**
|
626
|
+
* Remove a class name from the license information element.
|
627
|
+
*
|
628
|
+
* @param {string} className The class name to remove.
|
629
|
+
*/
|
630
|
+
removeClassNameFromLicenseElement(className) {
|
631
|
+
var _this$hot$rootElement2;
|
632
|
+
const licenseInfoElement = (_this$hot$rootElement2 = this.hot.rootElement.parentNode) === null || _this$hot$rootElement2 === void 0 ? void 0 : _this$hot$rootElement2.querySelector('.hot-display-license-info');
|
633
|
+
if (licenseInfoElement) {
|
634
|
+
removeClass(licenseInfoElement, className);
|
635
|
+
}
|
636
|
+
}
|
637
|
+
|
586
638
|
/**
|
587
639
|
* Checks if at least one cell than belongs to the main table is not covered by the top, left or
|
588
640
|
* bottom overlay.
|
@@ -609,7 +661,8 @@ class TableView {
|
|
609
661
|
isDataViewInstance: () => isRootInstance(this.hot),
|
610
662
|
preventOverflow: () => this.settings.preventOverflow,
|
611
663
|
preventWheel: () => this.settings.preventWheel,
|
612
|
-
|
664
|
+
viewportColumnRenderingThreshold: () => this.settings.viewportColumnRenderingThreshold,
|
665
|
+
viewportRowRenderingThreshold: () => this.settings.viewportRowRenderingThreshold,
|
613
666
|
data: (renderableRow, renderableColumn) => {
|
614
667
|
return this.hot.getDataAtCell(...this.translateFromRenderableToVisualIndex(renderableRow, renderableColumn));
|
615
668
|
},
|
@@ -692,7 +745,7 @@ class TableView {
|
|
692
745
|
const [visualRowIndex, visualColumnIndex] = this.translateFromRenderableToVisualIndex(renderedRowIndex, renderedColumnIndex);
|
693
746
|
|
694
747
|
// Coords may be modified. For example, by the `MergeCells` plugin. It should affect cell value and cell meta.
|
695
|
-
const modifiedCellCoords = this.hot.runHooks('modifyGetCellCoords', visualRowIndex, visualColumnIndex);
|
748
|
+
const modifiedCellCoords = this.hot.runHooks('modifyGetCellCoords', visualRowIndex, visualColumnIndex, false, 'meta');
|
696
749
|
let visualRowToCheck = visualRowIndex;
|
697
750
|
let visualColumnToCheck = visualColumnIndex;
|
698
751
|
if (Array.isArray(modifiedCellCoords)) {
|
@@ -815,7 +868,7 @@ class TableView {
|
|
815
868
|
},
|
816
869
|
beforeDraw: (force, skipRender) => this.beforeRender(force, skipRender),
|
817
870
|
onDraw: force => this.afterRender(force),
|
818
|
-
onBeforeViewportScrollVertically: renderableRow => {
|
871
|
+
onBeforeViewportScrollVertically: (renderableRow, snapping) => {
|
819
872
|
const rowMapper = this.hot.rowIndexMapper;
|
820
873
|
const areColumnHeadersSelected = renderableRow < 0;
|
821
874
|
let visualRow = renderableRow;
|
@@ -827,14 +880,14 @@ class TableView {
|
|
827
880
|
return renderableRow;
|
828
881
|
}
|
829
882
|
}
|
830
|
-
visualRow = this.hot.runHooks('beforeViewportScrollVertically', visualRow);
|
883
|
+
visualRow = this.hot.runHooks('beforeViewportScrollVertically', visualRow, snapping);
|
831
884
|
this.hot.runHooks('beforeViewportScroll');
|
832
885
|
if (!areColumnHeadersSelected) {
|
833
886
|
return rowMapper.getRenderableFromVisualIndex(visualRow);
|
834
887
|
}
|
835
888
|
return visualRow;
|
836
889
|
},
|
837
|
-
onBeforeViewportScrollHorizontally: renderableColumn => {
|
890
|
+
onBeforeViewportScrollHorizontally: (renderableColumn, snapping) => {
|
838
891
|
const columnMapper = this.hot.columnIndexMapper;
|
839
892
|
const areRowHeadersSelected = renderableColumn < 0;
|
840
893
|
let visualColumn = renderableColumn;
|
@@ -846,7 +899,7 @@ class TableView {
|
|
846
899
|
return renderableColumn;
|
847
900
|
}
|
848
901
|
}
|
849
|
-
visualColumn = this.hot.runHooks('beforeViewportScrollHorizontally', visualColumn);
|
902
|
+
visualColumn = this.hot.runHooks('beforeViewportScrollHorizontally', visualColumn, snapping);
|
850
903
|
this.hot.runHooks('beforeViewportScroll');
|
851
904
|
if (!areRowHeadersSelected) {
|
852
905
|
return columnMapper.getRenderableFromVisualIndex(visualColumn);
|
@@ -906,19 +959,15 @@ class TableView {
|
|
906
959
|
},
|
907
960
|
onBeforeTouchScroll: () => this.hot.runHooks('beforeTouchScroll'),
|
908
961
|
onAfterMomentumScroll: () => this.hot.runHooks('afterMomentumScroll'),
|
909
|
-
onBeforeStretchingColumnWidth: (stretchedWidth, renderedColumnIndex) => {
|
910
|
-
const visualColumnIndex = this.hot.columnIndexMapper.getVisualFromRenderableIndex(renderedColumnIndex);
|
911
|
-
return this.hot.runHooks('beforeStretchingColumnWidth', stretchedWidth, visualColumnIndex);
|
912
|
-
},
|
913
962
|
onModifyRowHeaderWidth: rowHeaderWidth => this.hot.runHooks('modifyRowHeaderWidth', rowHeaderWidth),
|
914
|
-
onModifyGetCellCoords: (renderableRowIndex, renderableColumnIndex, topmost) => {
|
963
|
+
onModifyGetCellCoords: (renderableRowIndex, renderableColumnIndex, topmost, source) => {
|
915
964
|
const rowMapper = this.hot.rowIndexMapper;
|
916
965
|
const columnMapper = this.hot.columnIndexMapper;
|
917
966
|
|
918
967
|
// Callback handle also headers. We shouldn't translate them.
|
919
968
|
const visualColumnIndex = renderableColumnIndex >= 0 ? columnMapper.getVisualFromRenderableIndex(renderableColumnIndex) : renderableColumnIndex;
|
920
969
|
const visualRowIndex = renderableRowIndex >= 0 ? rowMapper.getVisualFromRenderableIndex(renderableRowIndex) : renderableRowIndex;
|
921
|
-
const visualIndexes = this.hot.runHooks('modifyGetCellCoords', visualRowIndex, visualColumnIndex, topmost);
|
970
|
+
const visualIndexes = this.hot.runHooks('modifyGetCellCoords', visualRowIndex, visualColumnIndex, topmost, source);
|
922
971
|
if (Array.isArray(visualIndexes)) {
|
923
972
|
const [visualRowFrom, visualColumnFrom, visualRowTo, visualColumnTo] = visualIndexes;
|
924
973
|
|
@@ -926,6 +975,17 @@ class TableView {
|
|
926
975
|
return [visualRowFrom >= 0 ? rowMapper.getRenderableFromVisualIndex(rowMapper.getNearestNotHiddenIndex(visualRowFrom, 1)) : visualRowFrom, visualColumnFrom >= 0 ? columnMapper.getRenderableFromVisualIndex(columnMapper.getNearestNotHiddenIndex(visualColumnFrom, 1)) : visualColumnFrom, visualRowTo >= 0 ? rowMapper.getRenderableFromVisualIndex(rowMapper.getNearestNotHiddenIndex(visualRowTo, -1)) : visualRowTo, visualColumnTo >= 0 ? columnMapper.getRenderableFromVisualIndex(columnMapper.getNearestNotHiddenIndex(visualColumnTo, -1)) : visualColumnTo];
|
927
976
|
}
|
928
977
|
},
|
978
|
+
onModifyGetCoordsElement: (renderableRowIndex, renderableColumnIndex) => {
|
979
|
+
const rowMapper = this.hot.rowIndexMapper;
|
980
|
+
const columnMapper = this.hot.columnIndexMapper;
|
981
|
+
const visualColumnIndex = renderableColumnIndex >= 0 ? columnMapper.getVisualFromRenderableIndex(renderableColumnIndex) : renderableColumnIndex;
|
982
|
+
const visualRowIndex = renderableRowIndex >= 0 ? rowMapper.getVisualFromRenderableIndex(renderableRowIndex) : renderableRowIndex;
|
983
|
+
const visualIndexes = this.hot.runHooks('modifyGetCoordsElement', visualRowIndex, visualColumnIndex);
|
984
|
+
if (Array.isArray(visualIndexes)) {
|
985
|
+
const [visualRow, visualColumn] = visualIndexes;
|
986
|
+
return [visualRow >= 0 ? rowMapper.getRenderableFromVisualIndex(rowMapper.getNearestNotHiddenIndex(visualRow, 1)) : visualRow, visualColumn >= 0 ? columnMapper.getRenderableFromVisualIndex(columnMapper.getNearestNotHiddenIndex(visualColumn, 1)) : visualColumn];
|
987
|
+
}
|
988
|
+
},
|
929
989
|
viewportRowCalculatorOverride: calc => {
|
930
990
|
let viewportOffset = this.settings.viewportRowRenderingOffset;
|
931
991
|
if (viewportOffset === 'auto' && this.settings.fixedRowsTop) {
|
@@ -939,7 +999,7 @@ class TableView {
|
|
939
999
|
calc.startRow = Math.max(firstRenderedRow - viewportOffset, 0);
|
940
1000
|
calc.endRow = Math.min(lastRenderedRow + viewportOffset, renderableRows - 1);
|
941
1001
|
} else if (viewportOffset === 'auto') {
|
942
|
-
const offset = Math.ceil(lastRenderedRow / renderableRows * 12);
|
1002
|
+
const offset = Math.max(1, Math.ceil(lastRenderedRow / renderableRows * 12));
|
943
1003
|
calc.startRow = Math.max(firstRenderedRow - offset, 0);
|
944
1004
|
calc.endRow = Math.min(lastRenderedRow + offset, renderableRows - 1);
|
945
1005
|
}
|
@@ -960,7 +1020,7 @@ class TableView {
|
|
960
1020
|
calc.endColumn = Math.min(lastRenderedColumn + viewportOffset, renderableColumns - 1);
|
961
1021
|
}
|
962
1022
|
if (viewportOffset === 'auto') {
|
963
|
-
const offset = Math.ceil(lastRenderedColumn / renderableColumns * 6);
|
1023
|
+
const offset = Math.max(1, Math.ceil(lastRenderedColumn / renderableColumns * 6));
|
964
1024
|
calc.startColumn = Math.max(firstRenderedColumn - offset, 0);
|
965
1025
|
calc.endColumn = Math.min(lastRenderedColumn + offset, renderableColumns - 1);
|
966
1026
|
}
|
@@ -1262,7 +1322,9 @@ class TableView {
|
|
1262
1322
|
if (!this._wt.wtViewport.rowsRenderCalculator) {
|
1263
1323
|
return null;
|
1264
1324
|
}
|
1265
|
-
|
1325
|
+
const indexMapper = this.hot.rowIndexMapper;
|
1326
|
+
const visualRowIndex = indexMapper.getVisualFromRenderableIndex(this._wt.wtTable.getFirstRenderedRow());
|
1327
|
+
return indexMapper.getNearestNotHiddenIndex(visualRowIndex !== null && visualRowIndex !== void 0 ? visualRowIndex : 0, 1);
|
1266
1328
|
}
|
1267
1329
|
|
1268
1330
|
/**
|
@@ -1274,7 +1336,9 @@ class TableView {
|
|
1274
1336
|
if (!this._wt.wtViewport.rowsRenderCalculator) {
|
1275
1337
|
return null;
|
1276
1338
|
}
|
1277
|
-
|
1339
|
+
const indexMapper = this.hot.rowIndexMapper;
|
1340
|
+
const visualRowIndex = indexMapper.getVisualFromRenderableIndex(this._wt.wtTable.getLastRenderedRow());
|
1341
|
+
return indexMapper.getNearestNotHiddenIndex(visualRowIndex !== null && visualRowIndex !== void 0 ? visualRowIndex : this.hot.countRows() - 1, -1);
|
1278
1342
|
}
|
1279
1343
|
|
1280
1344
|
/**
|
@@ -1286,7 +1350,9 @@ class TableView {
|
|
1286
1350
|
if (!this._wt.wtViewport.columnsRenderCalculator) {
|
1287
1351
|
return null;
|
1288
1352
|
}
|
1289
|
-
|
1353
|
+
const indexMapper = this.hot.columnIndexMapper;
|
1354
|
+
const visualColumnIndex = indexMapper.getVisualFromRenderableIndex(this._wt.wtTable.getFirstRenderedColumn());
|
1355
|
+
return indexMapper.getNearestNotHiddenIndex(visualColumnIndex !== null && visualColumnIndex !== void 0 ? visualColumnIndex : 0, 1);
|
1290
1356
|
}
|
1291
1357
|
|
1292
1358
|
/**
|
@@ -1298,7 +1364,9 @@ class TableView {
|
|
1298
1364
|
if (!this._wt.wtViewport.columnsRenderCalculator) {
|
1299
1365
|
return null;
|
1300
1366
|
}
|
1301
|
-
|
1367
|
+
const indexMapper = this.hot.columnIndexMapper;
|
1368
|
+
const visualColumnIndex = indexMapper.getVisualFromRenderableIndex(this._wt.wtTable.getLastRenderedColumn());
|
1369
|
+
return indexMapper.getNearestNotHiddenIndex(visualColumnIndex !== null && visualColumnIndex !== void 0 ? visualColumnIndex : this.hot.countCols() - 1, -1);
|
1302
1370
|
}
|
1303
1371
|
|
1304
1372
|
/**
|
@@ -1460,6 +1528,16 @@ class TableView {
|
|
1460
1528
|
return this._wt.getOverlayByName(overlayName);
|
1461
1529
|
}
|
1462
1530
|
|
1531
|
+
/**
|
1532
|
+
* Gets the name of the overlay that currently renders the table. If the method is called out of the render cycle
|
1533
|
+
* the 'master' name is returned.
|
1534
|
+
*
|
1535
|
+
* @returns {string}
|
1536
|
+
*/
|
1537
|
+
getActiveOverlayName() {
|
1538
|
+
return this._wt.activeOverlayName;
|
1539
|
+
}
|
1540
|
+
|
1463
1541
|
/**
|
1464
1542
|
* Checks if the table is visible or not.
|
1465
1543
|
*
|
@@ -1468,6 +1546,80 @@ class TableView {
|
|
1468
1546
|
isVisible() {
|
1469
1547
|
return this._wt.wtTable.isVisible();
|
1470
1548
|
}
|
1549
|
+
|
1550
|
+
/**
|
1551
|
+
* Checks if the table has a horizontal scrollbar.
|
1552
|
+
*
|
1553
|
+
* @returns {boolean}
|
1554
|
+
*/
|
1555
|
+
hasVerticalScroll() {
|
1556
|
+
return this._wt.wtViewport.hasVerticalScroll();
|
1557
|
+
}
|
1558
|
+
|
1559
|
+
/**
|
1560
|
+
* Checks if the table has a vertical scrollbar.
|
1561
|
+
*
|
1562
|
+
* @returns {boolean}
|
1563
|
+
*/
|
1564
|
+
hasHorizontalScroll() {
|
1565
|
+
return this._wt.wtViewport.hasHorizontalScroll();
|
1566
|
+
}
|
1567
|
+
|
1568
|
+
/**
|
1569
|
+
* Gets the table's width.
|
1570
|
+
*
|
1571
|
+
* @returns {boolean}
|
1572
|
+
*/
|
1573
|
+
getTableWidth() {
|
1574
|
+
return this._wt.wtTable.getWidth();
|
1575
|
+
}
|
1576
|
+
|
1577
|
+
/**
|
1578
|
+
* Gets the table's height.
|
1579
|
+
*
|
1580
|
+
* @returns {boolean}
|
1581
|
+
*/
|
1582
|
+
getTableHeight() {
|
1583
|
+
return this._wt.wtTable.getHeight();
|
1584
|
+
}
|
1585
|
+
|
1586
|
+
/**
|
1587
|
+
* Gets the row header width. If there are multiple row headers, the width of
|
1588
|
+
* the sum of all of them is returned.
|
1589
|
+
*
|
1590
|
+
* @returns {number}
|
1591
|
+
*/
|
1592
|
+
getRowHeaderWidth() {
|
1593
|
+
return this._wt.wtViewport.getRowHeaderWidth();
|
1594
|
+
}
|
1595
|
+
|
1596
|
+
/**
|
1597
|
+
* Gets the column header height. If there are multiple column headers, the height
|
1598
|
+
* of the sum of all of them is returned.
|
1599
|
+
*
|
1600
|
+
* @returns {number}
|
1601
|
+
*/
|
1602
|
+
getColumnHeaderHeight() {
|
1603
|
+
return this._wt.wtViewport.getColumnHeaderHeight();
|
1604
|
+
}
|
1605
|
+
|
1606
|
+
/**
|
1607
|
+
* Checks if the table uses the window as a viewport and if there is a vertical scrollbar.
|
1608
|
+
*
|
1609
|
+
* @returns {boolean}
|
1610
|
+
*/
|
1611
|
+
isVerticallyScrollableByWindow() {
|
1612
|
+
return this._wt.wtViewport.isVerticallyScrollableByWindow();
|
1613
|
+
}
|
1614
|
+
|
1615
|
+
/**
|
1616
|
+
* Checks if the table uses the window as a viewport and if there is a horizontal scrollbar.
|
1617
|
+
*
|
1618
|
+
* @returns {boolean}
|
1619
|
+
*/
|
1620
|
+
isHorizontallyScrollableByWindow() {
|
1621
|
+
return this._wt.wtViewport.isHorizontallyScrollableByWindow();
|
1622
|
+
}
|
1471
1623
|
/**
|
1472
1624
|
* Destroys internal WalkOnTable's instance. Detaches all of the bonded listeners.
|
1473
1625
|
*
|
@@ -1490,4 +1642,24 @@ function _updateAriaColcount(delta) {
|
|
1490
1642
|
const colCount = _assertClassBrand(_TableView_brand, this, _getAriaColcount).call(this) + delta;
|
1491
1643
|
setAttribute(this.hot.rootElement, ...A11Y_COLCOUNT(colCount));
|
1492
1644
|
}
|
1645
|
+
/**
|
1646
|
+
* Updates the class names on the root element based on the presence of scrollbars.
|
1647
|
+
*
|
1648
|
+
* This method checks if the table has vertical and/or horizontal scrollbars and
|
1649
|
+
* adds or removes the corresponding class names (`htHasScrollY` and `htHasScrollX`)
|
1650
|
+
* to/from the root element.
|
1651
|
+
*/
|
1652
|
+
function _updateScrollbarClassNames() {
|
1653
|
+
const rootElement = this.hot.rootElement;
|
1654
|
+
if (this.hasVerticalScroll()) {
|
1655
|
+
addClass(rootElement, 'htHasScrollY');
|
1656
|
+
} else {
|
1657
|
+
removeClass(rootElement, 'htHasScrollY');
|
1658
|
+
}
|
1659
|
+
if (this.hasHorizontalScroll()) {
|
1660
|
+
addClass(rootElement, 'htHasScrollX');
|
1661
|
+
} else {
|
1662
|
+
removeClass(rootElement, 'htHasScrollX');
|
1663
|
+
}
|
1664
|
+
}
|
1493
1665
|
export default TableView;
|
@@ -9,6 +9,8 @@ require("core-js/modules/es.set.is-subset-of.v2.js");
|
|
9
9
|
require("core-js/modules/es.set.is-superset-of.v2.js");
|
10
10
|
require("core-js/modules/es.set.symmetric-difference.v2.js");
|
11
11
|
require("core-js/modules/es.set.union.v2.js");
|
12
|
+
require("core-js/modules/esnext.iterator.constructor.js");
|
13
|
+
require("core-js/modules/esnext.iterator.for-each.js");
|
12
14
|
var _observer = require("./observer");
|
13
15
|
var _utils = require("./utils");
|
14
16
|
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
@@ -6,6 +6,8 @@ import "core-js/modules/es.set.is-subset-of.v2.js";
|
|
6
6
|
import "core-js/modules/es.set.is-superset-of.v2.js";
|
7
7
|
import "core-js/modules/es.set.symmetric-difference.v2.js";
|
8
8
|
import "core-js/modules/es.set.union.v2.js";
|
9
|
+
import "core-js/modules/esnext.iterator.constructor.js";
|
10
|
+
import "core-js/modules/esnext.iterator.for-each.js";
|
9
11
|
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
10
12
|
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
11
13
|
function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
|
package/translations/index.js
CHANGED
@@ -9,6 +9,10 @@ require("core-js/modules/es.set.is-subset-of.v2.js");
|
|
9
9
|
require("core-js/modules/es.set.is-superset-of.v2.js");
|
10
10
|
require("core-js/modules/es.set.symmetric-difference.v2.js");
|
11
11
|
require("core-js/modules/es.set.union.v2.js");
|
12
|
+
require("core-js/modules/esnext.iterator.constructor.js");
|
13
|
+
require("core-js/modules/esnext.iterator.filter.js");
|
14
|
+
require("core-js/modules/esnext.iterator.map.js");
|
15
|
+
require("core-js/modules/esnext.iterator.some.js");
|
12
16
|
var _array = require("../helpers/array");
|
13
17
|
var _maps = require("./maps");
|
14
18
|
var _mapCollections = require("./mapCollections");
|
@@ -9,6 +9,10 @@ import "core-js/modules/es.set.is-subset-of.v2.js";
|
|
9
9
|
import "core-js/modules/es.set.is-superset-of.v2.js";
|
10
10
|
import "core-js/modules/es.set.symmetric-difference.v2.js";
|
11
11
|
import "core-js/modules/es.set.union.v2.js";
|
12
|
+
import "core-js/modules/esnext.iterator.constructor.js";
|
13
|
+
import "core-js/modules/esnext.iterator.filter.js";
|
14
|
+
import "core-js/modules/esnext.iterator.map.js";
|
15
|
+
import "core-js/modules/esnext.iterator.some.js";
|
12
16
|
import { arrayMap } from "../helpers/array.mjs";
|
13
17
|
import { createIndexMap, getListWithInsertedItems, getListWithRemovedItems, HidingMap, IndexesSequence, TrimmingMap } from "./maps/index.mjs";
|
14
18
|
import { AggregatedCollection, MapCollection } from "./mapCollections/index.mjs";
|
@@ -1,5 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
+
require("core-js/modules/esnext.iterator.constructor.js");
|
4
|
+
require("core-js/modules/esnext.iterator.for-each.js");
|
3
5
|
exports.__esModule = true;
|
4
6
|
var _aggregatedCollection = require("./aggregatedCollection");
|
5
7
|
Object.keys(_aggregatedCollection).forEach(function (key) {
|
@@ -3,6 +3,8 @@
|
|
3
3
|
exports.__esModule = true;
|
4
4
|
exports.getRegisteredMapsCounter = getRegisteredMapsCounter;
|
5
5
|
require("core-js/modules/es.error.cause.js");
|
6
|
+
require("core-js/modules/esnext.iterator.constructor.js");
|
7
|
+
require("core-js/modules/esnext.iterator.for-each.js");
|
6
8
|
var _mixed = require("../../helpers/mixed");
|
7
9
|
var _object = require("../../helpers/object");
|
8
10
|
var _localHooks = _interopRequireDefault(require("../../mixins/localHooks"));
|
@@ -1,4 +1,6 @@
|
|
1
1
|
import "core-js/modules/es.error.cause.js";
|
2
|
+
import "core-js/modules/esnext.iterator.constructor.js";
|
3
|
+
import "core-js/modules/esnext.iterator.for-each.js";
|
2
4
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
3
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
4
6
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
exports.__esModule = true;
|
4
4
|
require("core-js/modules/es.error.cause.js");
|
5
|
+
require("core-js/modules/esnext.iterator.map.js");
|
5
6
|
var _indexMap = require("./indexMap");
|
6
7
|
var _physicallyIndexed = require("./utils/physicallyIndexed");
|
7
8
|
var _indexesSequence = require("./utils/indexesSequence");
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import "core-js/modules/es.error.cause.js";
|
2
|
+
import "core-js/modules/esnext.iterator.map.js";
|
2
3
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
3
4
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
4
5
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
@@ -3,6 +3,8 @@
|
|
3
3
|
exports.__esModule = true;
|
4
4
|
exports.getDecreasedIndexes = getDecreasedIndexes;
|
5
5
|
exports.getIncreasedIndexes = getIncreasedIndexes;
|
6
|
+
require("core-js/modules/esnext.iterator.constructor.js");
|
7
|
+
require("core-js/modules/esnext.iterator.filter.js");
|
6
8
|
var _array = require("../../../helpers/array");
|
7
9
|
/**
|
8
10
|
* Transform mappings after removal.
|
@@ -3,6 +3,7 @@
|
|
3
3
|
exports.__esModule = true;
|
4
4
|
exports.getListWithInsertedItems = getListWithInsertedItems;
|
5
5
|
exports.getListWithRemovedItems = getListWithRemovedItems;
|
6
|
+
require("core-js/modules/esnext.iterator.map.js");
|
6
7
|
var _function = require("../../../helpers/function");
|
7
8
|
var _array = require("../../../helpers/array");
|
8
9
|
/**
|
package/utils/autoResize.js
CHANGED
@@ -48,6 +48,7 @@ function getComputedStyle(element) {
|
|
48
48
|
* @property {number} maxWidth The maximum width of the element.
|
49
49
|
* @property {number} minHeight The minimum height of the element.
|
50
50
|
* @property {number} maxHeight The maximum height of the element.
|
51
|
+
* @property {function(HTMLElement): string} textContent The function that returns the text content to measure.
|
51
52
|
*/
|
52
53
|
/**
|
53
54
|
* @typedef InputElementResizer
|
@@ -59,14 +60,18 @@ function getComputedStyle(element) {
|
|
59
60
|
* Creates an input element resizer.
|
60
61
|
*
|
61
62
|
* @param {Document} ownerDocument The document to create the resizer for.
|
63
|
+
* @param {InputElementResizerConfig} initialOptions The configuration to extend the defaults with.
|
62
64
|
* @returns {InputElementResizer}
|
63
65
|
*/
|
64
66
|
function createInputElementResizer(ownerDocument) {
|
67
|
+
let initialOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
65
68
|
const defaults = {
|
66
69
|
minHeight: 200,
|
67
70
|
maxHeight: 300,
|
68
71
|
minWidth: 100,
|
69
|
-
maxWidth: 300
|
72
|
+
maxWidth: 300,
|
73
|
+
textContent: element => element.value,
|
74
|
+
...initialOptions
|
70
75
|
};
|
71
76
|
const body = ownerDocument.body;
|
72
77
|
const textHolder = ownerDocument.createTextNode('');
|
@@ -77,7 +82,8 @@ function createInputElementResizer(ownerDocument) {
|
|
77
82
|
* Resizes the element.
|
78
83
|
*/
|
79
84
|
function resize() {
|
80
|
-
|
85
|
+
var _getComputedStyle, _getComputedStyle2;
|
86
|
+
textHolder.textContent = defaults.textContent(observedElement);
|
81
87
|
// Won't expand the element size for displaying body as for example, `grid`, `inline-grid` or `flex` with
|
82
88
|
// `flex-direction` set as `column`.
|
83
89
|
textContainer.style.position = 'absolute';
|
@@ -85,7 +91,9 @@ function createInputElementResizer(ownerDocument) {
|
|
85
91
|
textContainer.style.fontFamily = getComputedStyle(observedElement).fontFamily;
|
86
92
|
textContainer.style.whiteSpace = 'pre';
|
87
93
|
body.appendChild(textContainer);
|
88
|
-
const
|
94
|
+
const paddingStart = parseInt(((_getComputedStyle = getComputedStyle(observedElement)) === null || _getComputedStyle === void 0 ? void 0 : _getComputedStyle.paddingInlineStart) || 0, 10);
|
95
|
+
const paddingEnd = parseInt(((_getComputedStyle2 = getComputedStyle(observedElement)) === null || _getComputedStyle2 === void 0 ? void 0 : _getComputedStyle2.paddingInlineEnd) || 0, 10);
|
96
|
+
const width = textContainer.clientWidth + 2 + paddingStart + paddingEnd;
|
89
97
|
body.removeChild(textContainer);
|
90
98
|
const elementStyle = observedElement.style;
|
91
99
|
elementStyle.height = `${defaults.minHeight}px`;
|
package/utils/autoResize.mjs
CHANGED
@@ -44,6 +44,7 @@ function getComputedStyle(element) {
|
|
44
44
|
* @property {number} maxWidth The maximum width of the element.
|
45
45
|
* @property {number} minHeight The minimum height of the element.
|
46
46
|
* @property {number} maxHeight The maximum height of the element.
|
47
|
+
* @property {function(HTMLElement): string} textContent The function that returns the text content to measure.
|
47
48
|
*/
|
48
49
|
/**
|
49
50
|
* @typedef InputElementResizer
|
@@ -55,14 +56,18 @@ function getComputedStyle(element) {
|
|
55
56
|
* Creates an input element resizer.
|
56
57
|
*
|
57
58
|
* @param {Document} ownerDocument The document to create the resizer for.
|
59
|
+
* @param {InputElementResizerConfig} initialOptions The configuration to extend the defaults with.
|
58
60
|
* @returns {InputElementResizer}
|
59
61
|
*/
|
60
62
|
export function createInputElementResizer(ownerDocument) {
|
63
|
+
let initialOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
61
64
|
const defaults = {
|
62
65
|
minHeight: 200,
|
63
66
|
maxHeight: 300,
|
64
67
|
minWidth: 100,
|
65
|
-
maxWidth: 300
|
68
|
+
maxWidth: 300,
|
69
|
+
textContent: element => element.value,
|
70
|
+
...initialOptions
|
66
71
|
};
|
67
72
|
const body = ownerDocument.body;
|
68
73
|
const textHolder = ownerDocument.createTextNode('');
|
@@ -73,7 +78,8 @@ export function createInputElementResizer(ownerDocument) {
|
|
73
78
|
* Resizes the element.
|
74
79
|
*/
|
75
80
|
function resize() {
|
76
|
-
|
81
|
+
var _getComputedStyle, _getComputedStyle2;
|
82
|
+
textHolder.textContent = defaults.textContent(observedElement);
|
77
83
|
// Won't expand the element size for displaying body as for example, `grid`, `inline-grid` or `flex` with
|
78
84
|
// `flex-direction` set as `column`.
|
79
85
|
textContainer.style.position = 'absolute';
|
@@ -81,7 +87,9 @@ export function createInputElementResizer(ownerDocument) {
|
|
81
87
|
textContainer.style.fontFamily = getComputedStyle(observedElement).fontFamily;
|
82
88
|
textContainer.style.whiteSpace = 'pre';
|
83
89
|
body.appendChild(textContainer);
|
84
|
-
const
|
90
|
+
const paddingStart = parseInt(((_getComputedStyle = getComputedStyle(observedElement)) === null || _getComputedStyle === void 0 ? void 0 : _getComputedStyle.paddingInlineStart) || 0, 10);
|
91
|
+
const paddingEnd = parseInt(((_getComputedStyle2 = getComputedStyle(observedElement)) === null || _getComputedStyle2 === void 0 ? void 0 : _getComputedStyle2.paddingInlineEnd) || 0, 10);
|
92
|
+
const width = textContainer.clientWidth + 2 + paddingStart + paddingEnd;
|
85
93
|
body.removeChild(textContainer);
|
86
94
|
const elementStyle = observedElement.style;
|
87
95
|
elementStyle.height = `${defaults.minHeight}px`;
|
@@ -3,6 +3,7 @@
|
|
3
3
|
exports.__esModule = true;
|
4
4
|
exports.createPriorityMap = createPriorityMap;
|
5
5
|
require("core-js/modules/es.error.cause.js");
|
6
|
+
require("core-js/modules/esnext.iterator.map.js");
|
6
7
|
var _number = require("../../helpers/number");
|
7
8
|
var _function = require("../../helpers/function");
|
8
9
|
const ASC = exports.ASC = 'asc';
|