handsontable 14.4.0-next-1ffa7bc-20240606 → 14.5.0-next-ede811d-20240717
Sign up to get free protection for your applications and to get access to all the features.
- package/3rdparty/walkontable/src/calculator/renderAllColumns.js +1 -1
- package/3rdparty/walkontable/src/calculator/renderAllColumns.mjs +1 -1
- package/3rdparty/walkontable/src/calculator/renderAllRows.js +1 -1
- package/3rdparty/walkontable/src/calculator/renderAllRows.mjs +1 -1
- package/3rdparty/walkontable/src/calculator/viewportColumns.js +3 -3
- package/3rdparty/walkontable/src/calculator/viewportColumns.mjs +3 -3
- package/3rdparty/walkontable/src/calculator/viewportRows.js +3 -3
- package/3rdparty/walkontable/src/calculator/viewportRows.mjs +3 -3
- package/3rdparty/walkontable/src/cell/coords.js +3 -3
- package/3rdparty/walkontable/src/cell/coords.mjs +3 -3
- package/3rdparty/walkontable/src/cell/range.js +4 -4
- package/3rdparty/walkontable/src/cell/range.mjs +3 -3
- package/3rdparty/walkontable/src/core/_base.js +2 -2
- package/3rdparty/walkontable/src/core/_base.mjs +1 -1
- package/3rdparty/walkontable/src/core/clone.js +2 -2
- package/3rdparty/walkontable/src/core/clone.mjs +1 -1
- package/3rdparty/walkontable/src/core/core.js +17 -1
- package/3rdparty/walkontable/src/core/core.mjs +16 -0
- package/3rdparty/walkontable/src/event.js +2 -2
- package/3rdparty/walkontable/src/event.mjs +2 -2
- package/3rdparty/walkontable/src/facade/core.js +4 -1
- package/3rdparty/walkontable/src/facade/core.mjs +3 -0
- package/3rdparty/walkontable/src/filter/column.js +1 -1
- package/3rdparty/walkontable/src/filter/column.mjs +1 -1
- package/3rdparty/walkontable/src/filter/row.js +1 -1
- package/3rdparty/walkontable/src/filter/row.mjs +1 -1
- package/3rdparty/walkontable/src/index.js +1 -1
- package/3rdparty/walkontable/src/overlay/_base.js +2 -2
- package/3rdparty/walkontable/src/overlay/_base.mjs +1 -1
- package/3rdparty/walkontable/src/overlay/bottom.js +2 -2
- package/3rdparty/walkontable/src/overlay/bottom.mjs +1 -1
- package/3rdparty/walkontable/src/overlay/bottomInlineStartCorner.js +1 -1
- package/3rdparty/walkontable/src/overlay/inlineStart.js +1 -1
- package/3rdparty/walkontable/src/overlay/top.js +2 -2
- package/3rdparty/walkontable/src/overlay/top.mjs +1 -1
- package/3rdparty/walkontable/src/overlay/topInlineStartCorner.js +2 -2
- package/3rdparty/walkontable/src/overlay/topInlineStartCorner.mjs +1 -1
- package/3rdparty/walkontable/src/overlays.js +36 -4
- package/3rdparty/walkontable/src/overlays.mjs +36 -4
- package/3rdparty/walkontable/src/renderer/_base.js +2 -2
- package/3rdparty/walkontable/src/renderer/_base.mjs +1 -1
- package/3rdparty/walkontable/src/renderer/cells.js +2 -2
- package/3rdparty/walkontable/src/renderer/cells.mjs +1 -1
- package/3rdparty/walkontable/src/renderer/colGroup.js +1 -1
- package/3rdparty/walkontable/src/renderer/columnHeaders.js +1 -1
- package/3rdparty/walkontable/src/renderer/index.js +12 -1
- package/3rdparty/walkontable/src/renderer/index.mjs +11 -0
- package/3rdparty/walkontable/src/renderer/rowHeaders.js +2 -2
- package/3rdparty/walkontable/src/renderer/rowHeaders.mjs +1 -1
- package/3rdparty/walkontable/src/renderer/rows.js +2 -2
- package/3rdparty/walkontable/src/renderer/rows.mjs +1 -1
- package/3rdparty/walkontable/src/renderer/table.js +17 -2
- package/3rdparty/walkontable/src/renderer/table.mjs +17 -2
- package/3rdparty/walkontable/src/scroll.js +3 -3
- package/3rdparty/walkontable/src/scroll.mjs +3 -3
- package/3rdparty/walkontable/src/selection/index.js +1 -1
- package/3rdparty/walkontable/src/selection/manager.js +4 -4
- package/3rdparty/walkontable/src/selection/manager.mjs +3 -3
- package/3rdparty/walkontable/src/selection/scanner.js +3 -3
- package/3rdparty/walkontable/src/selection/scanner.mjs +3 -3
- package/3rdparty/walkontable/src/selection/selection.js +1 -1
- package/3rdparty/walkontable/src/settings.js +6 -2
- package/3rdparty/walkontable/src/settings.mjs +6 -2
- package/3rdparty/walkontable/src/table/bottom.js +1 -1
- package/3rdparty/walkontable/src/table/bottomInlineStartCorner.js +1 -1
- package/3rdparty/walkontable/src/table/inlineStart.js +1 -1
- package/3rdparty/walkontable/src/table/master.js +1 -1
- package/3rdparty/walkontable/src/table/top.js +1 -1
- package/3rdparty/walkontable/src/table/topInlineStartCorner.js +1 -1
- package/3rdparty/walkontable/src/table.js +3 -3
- package/3rdparty/walkontable/src/table.mjs +2 -2
- package/3rdparty/walkontable/src/utils/column.js +1 -1
- package/3rdparty/walkontable/src/utils/column.mjs +1 -1
- package/3rdparty/walkontable/src/utils/columnStretching.js +3 -3
- package/3rdparty/walkontable/src/utils/columnStretching.mjs +3 -3
- package/3rdparty/walkontable/src/utils/nodesPool.js +1 -1
- package/3rdparty/walkontable/src/utils/nodesPool.mjs +1 -1
- package/3rdparty/walkontable/src/utils/orderView/index.js +1 -1
- package/3rdparty/walkontable/src/utils/orderView/sharedView.js +1 -1
- package/3rdparty/walkontable/src/utils/orderView/view.js +2 -2
- package/3rdparty/walkontable/src/utils/orderView/view.mjs +1 -1
- package/3rdparty/walkontable/src/utils/orderView/viewSize.js +1 -1
- package/3rdparty/walkontable/src/utils/orderView/viewSize.mjs +1 -1
- package/3rdparty/walkontable/src/utils/orderView/viewSizeSet.js +2 -2
- package/3rdparty/walkontable/src/utils/orderView/viewSizeSet.mjs +1 -1
- package/3rdparty/walkontable/src/utils/row.js +17 -1
- package/3rdparty/walkontable/src/utils/row.mjs +17 -1
- package/CHANGELOG.md +27 -1
- package/base.js +3 -3
- package/base.mjs +2 -2
- package/cellTypes/registry.js +1 -1
- package/common.d.ts +3 -0
- package/core.d.ts +2 -0
- package/core.js +36 -31
- package/core.mjs +35 -30
- package/dataMap/dataMap.js +1 -1
- package/dataMap/dataMap.mjs +1 -1
- package/dataMap/dataSource.js +1 -1
- package/dataMap/dataSource.mjs +1 -1
- package/dataMap/index.js +1 -1
- package/dataMap/metaManager/index.js +1 -1
- package/dataMap/metaManager/lazyFactoryMap.js +1 -1
- package/dataMap/metaManager/lazyFactoryMap.mjs +1 -1
- package/dataMap/metaManager/metaLayers/cellMeta.js +2 -2
- package/dataMap/metaManager/metaLayers/cellMeta.mjs +1 -1
- package/dataMap/metaManager/metaLayers/columnMeta.js +2 -2
- package/dataMap/metaManager/metaLayers/columnMeta.mjs +1 -1
- package/dataMap/metaManager/metaLayers/globalMeta.js +2 -2
- package/dataMap/metaManager/metaLayers/globalMeta.mjs +1 -1
- package/dataMap/metaManager/metaLayers/tableMeta.js +1 -1
- package/dataMap/metaManager/metaLayers/tableMeta.mjs +1 -1
- package/dataMap/metaManager/metaSchema.js +25 -0
- package/dataMap/metaManager/metaSchema.mjs +25 -0
- package/dataMap/metaManager/mods/dynamicCellMeta.js +2 -2
- package/dataMap/metaManager/mods/dynamicCellMeta.mjs +1 -1
- package/dataMap/metaManager/mods/extendMetaProperties.js +3 -3
- package/dataMap/metaManager/mods/extendMetaProperties.mjs +3 -3
- package/dataMap/replaceData.js +1 -1
- package/dist/handsontable.css +134 -88
- package/dist/handsontable.full.css +134 -88
- package/dist/handsontable.full.js +2191 -1503
- package/dist/handsontable.full.min.css +7 -7
- package/dist/handsontable.full.min.js +86 -86
- package/dist/handsontable.js +2180 -1440
- package/dist/handsontable.min.css +6 -6
- package/dist/handsontable.min.js +23 -23
- package/dist/languages/all.js +3 -3
- package/dist/languages/ar-AR.js +3 -3
- package/dist/languages/cs-CZ.js +3 -3
- package/dist/languages/de-CH.js +3 -3
- package/dist/languages/de-DE.js +3 -3
- package/dist/languages/en-US.js +3 -3
- package/dist/languages/es-MX.js +3 -3
- package/dist/languages/fr-FR.js +3 -3
- package/dist/languages/hr-HR.js +3 -3
- package/dist/languages/it-IT.js +3 -3
- package/dist/languages/ja-JP.js +3 -3
- package/dist/languages/ko-KR.js +3 -3
- package/dist/languages/lv-LV.js +3 -3
- package/dist/languages/nb-NO.js +3 -3
- package/dist/languages/nl-NL.js +3 -3
- package/dist/languages/pl-PL.js +3 -3
- package/dist/languages/pt-BR.js +3 -3
- package/dist/languages/ru-RU.js +3 -3
- package/dist/languages/sr-SP.js +3 -3
- package/dist/languages/zh-CN.js +3 -3
- package/dist/languages/zh-TW.js +3 -3
- package/editorManager.js +4 -4
- package/editorManager.mjs +3 -3
- package/editors/autocompleteEditor/autocompleteEditor.js +3 -3
- package/editors/autocompleteEditor/autocompleteEditor.mjs +3 -3
- package/editors/baseEditor/baseEditor.js +2 -2
- package/editors/baseEditor/baseEditor.mjs +1 -1
- package/editors/dateEditor/dateEditor.js +2 -2
- package/editors/dateEditor/dateEditor.mjs +1 -1
- package/editors/dropdownEditor/dropdownEditor.js +1 -1
- package/editors/registry.js +1 -1
- package/editors/textEditor/textEditor.js +2 -2
- package/editors/textEditor/textEditor.mjs +1 -1
- package/eventManager.js +1 -1
- package/eventManager.mjs +1 -1
- package/focusManager.js +3 -3
- package/focusManager.mjs +3 -3
- package/helpers/dom/event.d.ts +1 -0
- package/helpers/dom/event.js +11 -0
- package/helpers/dom/event.mjs +10 -0
- package/helpers/mixed.js +3 -3
- package/helpers/mixed.mjs +2 -2
- package/helpers/string.js +1 -1
- package/i18n/languages/index.js +1 -1
- package/i18n/phraseFormatters/index.js +1 -1
- package/i18n/registry.js +1 -1
- package/index.js +1 -1
- package/languages/all.js +3 -3
- package/languages/ar-AR.js +3 -3
- package/languages/cs-CZ.js +3 -3
- package/languages/de-CH.js +3 -3
- package/languages/de-DE.js +3 -3
- package/languages/en-US.js +3 -3
- package/languages/es-MX.js +3 -3
- package/languages/fr-FR.js +3 -3
- package/languages/hr-HR.js +3 -3
- package/languages/index.js +3 -3
- package/languages/it-IT.js +3 -3
- package/languages/ja-JP.js +3 -3
- package/languages/ko-KR.js +3 -3
- package/languages/lv-LV.js +3 -3
- package/languages/nb-NO.js +3 -3
- package/languages/nl-NL.js +3 -3
- package/languages/pl-PL.js +3 -3
- package/languages/pt-BR.js +3 -3
- package/languages/ru-RU.js +3 -3
- package/languages/sr-SP.js +3 -3
- package/languages/zh-CN.js +3 -3
- package/languages/zh-TW.js +3 -3
- package/package.json +1 -5
- package/pluginHooks.d.ts +3 -1
- package/pluginHooks.js +12 -1
- package/pluginHooks.mjs +12 -1
- package/plugins/autoColumnSize/autoColumnSize.d.ts +1 -1
- package/plugins/autoColumnSize/autoColumnSize.js +123 -123
- package/plugins/autoColumnSize/autoColumnSize.mjs +122 -122
- package/plugins/autoRowSize/autoRowSize.d.ts +2 -1
- package/plugins/autoRowSize/autoRowSize.js +162 -100
- package/plugins/autoRowSize/autoRowSize.mjs +161 -99
- package/plugins/autofill/autofill.js +4 -4
- package/plugins/autofill/autofill.mjs +3 -3
- package/plugins/base/base.js +5 -5
- package/plugins/base/base.mjs +4 -4
- package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.js +4 -4
- package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.mjs +3 -3
- package/plugins/collapsibleColumns/collapsibleColumns.js +4 -4
- package/plugins/collapsibleColumns/collapsibleColumns.mjs +4 -4
- package/plugins/columnSorting/columnSorting.js +6 -5
- package/plugins/columnSorting/columnSorting.mjs +5 -4
- package/plugins/columnSorting/columnStatesManager.js +1 -1
- package/plugins/columnSorting/columnStatesManager.mjs +1 -1
- package/plugins/columnSorting/sortService/registry.js +1 -1
- package/plugins/columnSorting/utils.js +1 -1
- package/plugins/columnSummary/columnSummary.d.ts +1 -1
- package/plugins/columnSummary/columnSummary.js +4 -4
- package/plugins/columnSummary/columnSummary.mjs +3 -3
- package/plugins/columnSummary/endpoints.js +1 -1
- package/plugins/columnSummary/endpoints.mjs +1 -1
- package/plugins/comments/commentEditor.js +74 -39
- package/plugins/comments/commentEditor.mjs +73 -39
- package/plugins/comments/comments.js +25 -44
- package/plugins/comments/comments.mjs +25 -44
- package/plugins/comments/displaySwitch.js +2 -2
- package/plugins/comments/displaySwitch.mjs +1 -1
- package/plugins/comments/editorResizeObserver.js +100 -0
- package/plugins/comments/editorResizeObserver.mjs +95 -0
- package/plugins/contextMenu/commandExecutor.js +1 -1
- package/plugins/contextMenu/commandExecutor.mjs +1 -1
- package/plugins/contextMenu/contextMenu.js +4 -4
- package/plugins/contextMenu/contextMenu.mjs +3 -3
- package/plugins/contextMenu/itemsFactory.js +1 -1
- package/plugins/contextMenu/itemsFactory.mjs +1 -1
- package/plugins/contextMenu/menu/cursor.js +1 -1
- package/plugins/contextMenu/menu/cursor.mjs +1 -1
- package/plugins/contextMenu/menu/menu.js +5 -4
- package/plugins/contextMenu/menu/menu.mjs +4 -3
- package/plugins/contextMenu/menu/positioner.js +2 -2
- package/plugins/contextMenu/menu/positioner.mjs +2 -2
- package/plugins/copyPaste/copyPaste.js +5 -5
- package/plugins/copyPaste/copyPaste.mjs +4 -4
- package/plugins/copyPaste/copyableRanges.js +3 -3
- package/plugins/copyPaste/copyableRanges.mjs +3 -3
- package/plugins/copyPaste/pasteEvent.js +1 -1
- package/plugins/customBorders/contextMenuItem/index.js +1 -1
- package/plugins/customBorders/customBorders.js +3 -3
- package/plugins/customBorders/customBorders.mjs +3 -3
- package/plugins/dragToScroll/dragToScroll.js +4 -4
- package/plugins/dragToScroll/dragToScroll.mjs +4 -4
- package/plugins/dropdownMenu/dropdownMenu.js +5 -5
- package/plugins/dropdownMenu/dropdownMenu.mjs +4 -4
- package/plugins/exportFile/dataProvider.js +1 -1
- package/plugins/exportFile/dataProvider.mjs +1 -1
- package/plugins/exportFile/exportFile.js +1 -1
- package/plugins/exportFile/typeFactory.js +1 -1
- package/plugins/exportFile/types/_base.js +1 -1
- package/plugins/exportFile/types/_base.mjs +1 -1
- package/plugins/exportFile/types/csv.js +1 -1
- package/plugins/filters/component/_base.js +2 -2
- package/plugins/filters/component/_base.mjs +1 -1
- package/plugins/filters/component/actionBar.js +3 -3
- package/plugins/filters/component/actionBar.mjs +3 -3
- package/plugins/filters/component/condition.js +3 -3
- package/plugins/filters/component/condition.mjs +3 -3
- package/plugins/filters/component/operators.js +3 -3
- package/plugins/filters/component/operators.mjs +3 -3
- package/plugins/filters/component/value.js +3 -3
- package/plugins/filters/component/value.mjs +3 -3
- package/plugins/filters/condition/date/after.js +1 -1
- package/plugins/filters/condition/date/before.js +1 -1
- package/plugins/filters/condition/date/today.js +1 -1
- package/plugins/filters/condition/date/tomorrow.js +1 -1
- package/plugins/filters/condition/date/yesterday.js +1 -1
- package/plugins/filters/conditionCollection.js +2 -2
- package/plugins/filters/conditionCollection.mjs +1 -1
- package/plugins/filters/conditionUpdateObserver.js +4 -4
- package/plugins/filters/conditionUpdateObserver.mjs +3 -3
- package/plugins/filters/dataFilter.js +1 -1
- package/plugins/filters/dataFilter.mjs +1 -1
- package/plugins/filters/filters.js +5 -5
- package/plugins/filters/filters.mjs +4 -4
- package/plugins/filters/ui/_base.js +2 -2
- package/plugins/filters/ui/_base.mjs +1 -1
- package/plugins/filters/ui/input.js +3 -3
- package/plugins/filters/ui/input.mjs +3 -3
- package/plugins/filters/ui/link.js +2 -2
- package/plugins/filters/ui/link.mjs +2 -2
- package/plugins/filters/ui/multipleSelect.js +3 -3
- package/plugins/filters/ui/multipleSelect.mjs +3 -3
- package/plugins/filters/ui/radioInput.js +2 -2
- package/plugins/filters/ui/radioInput.mjs +2 -2
- package/plugins/filters/ui/select.js +3 -3
- package/plugins/filters/ui/select.mjs +3 -3
- package/plugins/formulas/engine/register.js +1 -1
- package/plugins/formulas/formulas.js +7 -7
- package/plugins/formulas/formulas.mjs +6 -6
- package/plugins/formulas/indexSyncer/axisSyncer.js +2 -2
- package/plugins/formulas/indexSyncer/axisSyncer.mjs +2 -2
- package/plugins/formulas/indexSyncer/index.js +3 -3
- package/plugins/formulas/indexSyncer/index.mjs +2 -2
- package/plugins/formulas/utils.js +1 -1
- package/plugins/hiddenColumns/hiddenColumns.js +4 -4
- package/plugins/hiddenColumns/hiddenColumns.mjs +3 -3
- package/plugins/hiddenRows/hiddenRows.js +4 -4
- package/plugins/hiddenRows/hiddenRows.mjs +3 -3
- package/plugins/manualColumnFreeze/manualColumnFreeze.js +4 -4
- package/plugins/manualColumnFreeze/manualColumnFreeze.mjs +3 -3
- package/plugins/manualColumnMove/manualColumnMove.js +4 -4
- package/plugins/manualColumnMove/manualColumnMove.mjs +3 -3
- package/plugins/manualColumnMove/ui/_base.js +1 -1
- package/plugins/manualColumnMove/ui/_base.mjs +1 -1
- package/plugins/manualColumnMove/ui/backlight.js +1 -1
- package/plugins/manualColumnMove/ui/guideline.js +1 -1
- package/plugins/manualColumnResize/manualColumnResize.js +3 -3
- package/plugins/manualColumnResize/manualColumnResize.mjs +3 -3
- package/plugins/manualRowMove/manualRowMove.js +4 -4
- package/plugins/manualRowMove/manualRowMove.mjs +3 -3
- package/plugins/manualRowMove/ui/_base.js +1 -1
- package/plugins/manualRowMove/ui/_base.mjs +1 -1
- package/plugins/manualRowMove/ui/backlight.js +1 -1
- package/plugins/manualRowMove/ui/guideline.js +1 -1
- package/plugins/manualRowResize/manualRowResize.js +3 -3
- package/plugins/manualRowResize/manualRowResize.mjs +3 -3
- package/plugins/mergeCells/calculations/autofill.js +2 -2
- package/plugins/mergeCells/calculations/autofill.mjs +2 -2
- package/plugins/mergeCells/calculations/selection.js +1 -1
- package/plugins/mergeCells/calculations/selection.mjs +1 -1
- package/plugins/mergeCells/cellCoords.js +81 -24
- package/plugins/mergeCells/cellCoords.mjs +81 -24
- package/plugins/mergeCells/cellsCollection.js +167 -91
- package/plugins/mergeCells/cellsCollection.mjs +166 -90
- package/plugins/mergeCells/contextMenuItem/toggleMerge.js +1 -1
- package/plugins/mergeCells/focusOrder.js +4 -4
- package/plugins/mergeCells/focusOrder.mjs +3 -3
- package/plugins/mergeCells/mergeCells.js +171 -122
- package/plugins/mergeCells/mergeCells.mjs +171 -122
- package/plugins/mergeCells/renderer.js +74 -0
- package/plugins/mergeCells/renderer.mjs +70 -0
- package/plugins/multiColumnSorting/multiColumnSorting.js +2 -1
- package/plugins/multiColumnSorting/multiColumnSorting.mjs +2 -1
- package/plugins/multiColumnSorting/utils.js +1 -1
- package/plugins/multiColumnSorting/utils.mjs +1 -1
- package/plugins/multipleSelectionHandles/multipleSelectionHandles.js +1 -1
- package/plugins/multipleSelectionHandles/multipleSelectionHandles.mjs +1 -1
- package/plugins/nestedHeaders/nestedHeaders.d.ts +1 -0
- package/plugins/nestedHeaders/nestedHeaders.js +20 -9
- package/plugins/nestedHeaders/nestedHeaders.mjs +20 -9
- package/plugins/nestedHeaders/stateManager/headersTree.js +3 -3
- package/plugins/nestedHeaders/stateManager/headersTree.mjs +2 -2
- package/plugins/nestedHeaders/stateManager/index.js +3 -3
- package/plugins/nestedHeaders/stateManager/index.mjs +2 -2
- package/plugins/nestedHeaders/stateManager/settingsNormalizer.js +5 -1
- package/plugins/nestedHeaders/stateManager/settingsNormalizer.mjs +5 -1
- package/plugins/nestedHeaders/stateManager/sourceSettings.js +2 -2
- package/plugins/nestedHeaders/stateManager/sourceSettings.mjs +2 -2
- package/plugins/nestedHeaders/stateManager/utils.js +6 -2
- package/plugins/nestedHeaders/stateManager/utils.mjs +6 -2
- package/plugins/nestedHeaders/utils/ghostTable.js +1 -1
- package/plugins/nestedHeaders/utils/ghostTable.mjs +1 -1
- package/plugins/nestedRows/data/dataManager.js +1 -1
- package/plugins/nestedRows/data/dataManager.mjs +1 -1
- package/plugins/nestedRows/nestedRows.js +5 -5
- package/plugins/nestedRows/nestedRows.mjs +4 -4
- package/plugins/nestedRows/ui/_base.js +1 -1
- package/plugins/nestedRows/ui/_base.mjs +1 -1
- package/plugins/nestedRows/ui/collapsing.js +1 -1
- package/plugins/nestedRows/ui/contextMenu.js +4 -4
- package/plugins/nestedRows/ui/contextMenu.mjs +3 -3
- package/plugins/nestedRows/ui/headers.js +1 -1
- package/plugins/nestedRows/utils/rowMoveController.js +1 -1
- package/plugins/nestedRows/utils/rowMoveController.mjs +1 -1
- package/plugins/persistentState/persistentState.js +2 -2
- package/plugins/persistentState/persistentState.mjs +1 -1
- package/plugins/persistentState/storage.js +1 -1
- package/plugins/persistentState/storage.mjs +1 -1
- package/plugins/search/search.js +3 -3
- package/plugins/search/search.mjs +3 -3
- package/plugins/touchScroll/touchScroll.js +3 -3
- package/plugins/touchScroll/touchScroll.mjs +3 -3
- package/plugins/trimRows/trimRows.js +3 -3
- package/plugins/trimRows/trimRows.mjs +3 -3
- package/plugins/undoRedo/undoRedo.js +38 -1
- package/plugins/undoRedo/undoRedo.mjs +37 -0
- package/renderers/autocompleteRenderer/autocompleteRenderer.js +1 -1
- package/renderers/checkboxRenderer/checkboxRenderer.js +1 -1
- package/renderers/numericRenderer/numericRenderer.js +1 -1
- package/renderers/registry.js +1 -1
- package/selection/highlight/highlight.js +3 -3
- package/selection/highlight/highlight.mjs +3 -3
- package/selection/highlight/types/activeHeader.js +1 -1
- package/selection/highlight/types/area.js +1 -1
- package/selection/highlight/types/areaLayered.js +1 -1
- package/selection/highlight/types/column.js +1 -1
- package/selection/highlight/types/customSelection.js +1 -1
- package/selection/highlight/types/fill.js +1 -1
- package/selection/highlight/types/focus.js +1 -1
- package/selection/highlight/types/header.js +1 -1
- package/selection/highlight/types/row.js +1 -1
- package/selection/highlight/visualSelection.js +1 -1
- package/selection/highlight/visualSelection.mjs +1 -1
- package/selection/index.js +1 -1
- package/selection/range.js +1 -1
- package/selection/range.mjs +1 -1
- package/selection/selection.js +8 -4
- package/selection/selection.mjs +7 -3
- package/selection/transformation.js +14 -4
- package/selection/transformation.mjs +13 -3
- package/settings.d.ts +1 -0
- package/shortcuts/utils.js +18 -27
- package/shortcuts/utils.mjs +18 -27
- package/tableView.js +126 -28
- package/tableView.mjs +125 -27
- package/translations/changesObservable/observable.js +2 -2
- package/translations/changesObservable/observable.mjs +2 -2
- package/translations/changesObservable/observer.js +3 -3
- package/translations/changesObservable/observer.mjs +2 -2
- package/translations/indexMapper.js +2 -2
- package/translations/indexMapper.mjs +1 -1
- package/translations/mapCollections/aggregatedCollection.js +1 -1
- package/translations/mapCollections/aggregatedCollection.mjs +1 -1
- package/translations/mapCollections/mapCollection.js +2 -2
- package/translations/mapCollections/mapCollection.mjs +1 -1
- package/translations/maps/indexMap.js +2 -2
- package/translations/maps/indexMap.mjs +1 -1
- package/translations/maps/linkedPhysicalIndexToValueMap.js +1 -1
- package/translations/maps/linkedPhysicalIndexToValueMap.mjs +1 -1
- package/utils/dataStructures/linkedList.js +1 -1
- package/utils/dataStructures/linkedList.mjs +1 -1
- package/utils/dataStructures/tree.js +1 -1
- package/utils/dataStructures/tree.mjs +1 -1
- package/utils/ghostTable.js +1 -1
- package/utils/ghostTable.mjs +1 -1
- package/utils/interval.js +4 -4
- package/utils/interval.mjs +4 -4
- package/utils/samplesGenerator.js +1 -1
- package/utils/samplesGenerator.mjs +1 -1
- package/validators/dateValidator/dateValidator.js +1 -1
- package/validators/registry.js +1 -1
- package/validators/timeValidator/timeValidator.js +1 -1
- package/plugins/mergeCells/utils.js +0 -28
- package/plugins/mergeCells/utils.mjs +0 -24
@@ -1,8 +1,8 @@
|
|
1
1
|
import "core-js/modules/es.error.cause.js";
|
2
2
|
import "core-js/modules/es.array.push.js";
|
3
|
-
function _classPrivateMethodInitSpec(
|
4
|
-
function _checkPrivateRedeclaration(
|
5
|
-
function _defineProperty(
|
3
|
+
function _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }
|
4
|
+
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
5
|
+
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; }
|
6
6
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
7
7
|
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); }
|
8
8
|
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"); }
|
@@ -195,6 +195,7 @@ export class ColumnSorting extends BasePlugin {
|
|
195
195
|
if (this.indexesSequenceCache !== null) {
|
196
196
|
this.hot.rowIndexMapper.setIndexesSequence(this.indexesSequenceCache.getValues());
|
197
197
|
this.hot.rowIndexMapper.unregisterMap(this.pluginKey);
|
198
|
+
this.indexesSequenceCache = null;
|
198
199
|
}
|
199
200
|
}, true);
|
200
201
|
this.hot.columnIndexMapper.unregisterMap(`${this.pluginKey}.columnMeta`);
|
@@ -582,8 +583,8 @@ export class ColumnSorting extends BasePlugin {
|
|
582
583
|
* @private
|
583
584
|
*/
|
584
585
|
sortByPresetSortStates(sortConfigs) {
|
586
|
+
this.hot.rowIndexMapper.setIndexesSequence(this.indexesSequenceCache.getValues());
|
585
587
|
if (sortConfigs.length === 0) {
|
586
|
-
this.hot.rowIndexMapper.setIndexesSequence(this.indexesSequenceCache.getValues());
|
587
588
|
return;
|
588
589
|
}
|
589
590
|
const indexesWithData = [];
|
@@ -5,7 +5,7 @@ require("core-js/modules/es.error.cause.js");
|
|
5
5
|
var _object = require("../../helpers/object");
|
6
6
|
var _translations = require("../../translations");
|
7
7
|
var _mixed = require("../../helpers/mixed");
|
8
|
-
function _defineProperty(
|
8
|
+
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; }
|
9
9
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
10
10
|
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); }
|
11
11
|
const inheritedColumnProperties = ['sortEmptyCells', 'indicator', 'headerAction', 'compareFunctionFactory'];
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import "core-js/modules/es.error.cause.js";
|
2
|
-
function _defineProperty(
|
2
|
+
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
3
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
4
4
|
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); }
|
5
5
|
import { isObject, objectEach } from "../../helpers/object.mjs";
|
@@ -8,7 +8,7 @@ var _checkbox = require("../sortFunction/checkbox");
|
|
8
8
|
var _date = require("../sortFunction/date");
|
9
9
|
var _time = require("../sortFunction/time");
|
10
10
|
var _staticRegister = _interopRequireDefault(require("../../../utils/staticRegister"));
|
11
|
-
function _interopRequireDefault(
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
12
12
|
const {
|
13
13
|
register: registerCompareFunctionFactory,
|
14
14
|
getItem: getGloballyCompareFunctionFactory,
|
@@ -19,7 +19,7 @@ var _object = require("../../helpers/object");
|
|
19
19
|
var _event = require("../../helpers/dom/event");
|
20
20
|
var _mixed = require("../../helpers/mixed");
|
21
21
|
var _sortService = require("./sortService");
|
22
|
-
function _interopRequireDefault(
|
22
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
23
23
|
const ASC_SORT_STATE = exports.ASC_SORT_STATE = 'asc';
|
24
24
|
const DESC_SORT_STATE = exports.DESC_SORT_STATE = 'desc';
|
25
25
|
const HEADER_SPAN_CLASS = exports.HEADER_SPAN_CLASS = 'colHeader';
|
@@ -18,7 +18,7 @@ export type DetailedSettings = {
|
|
18
18
|
customFunction: (this: ColumnSummary, endpoint: Endpoint) => number;
|
19
19
|
});
|
20
20
|
|
21
|
-
export type Settings = DetailedSettings[] | (() => DetailedSettings[]);
|
21
|
+
export type Settings = DetailedSettings[] | ((this: ColumnSummary) => DetailedSettings[]);
|
22
22
|
|
23
23
|
export interface Endpoint {
|
24
24
|
destinationRow: number;
|
@@ -7,10 +7,10 @@ var _object = require("../../helpers/object");
|
|
7
7
|
var _endpoints = _interopRequireDefault(require("./endpoints"));
|
8
8
|
var _templateLiteralTag = require("../../helpers/templateLiteralTag");
|
9
9
|
var _utils = require("./utils");
|
10
|
-
function _interopRequireDefault(
|
11
|
-
function _classPrivateMethodInitSpec(
|
12
|
-
function _checkPrivateRedeclaration(
|
13
|
-
function _defineProperty(
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
11
|
+
function _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }
|
12
|
+
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
13
|
+
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; }
|
14
14
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
15
15
|
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); }
|
16
16
|
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"); }
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import "core-js/modules/es.error.cause.js";
|
2
|
-
function _classPrivateMethodInitSpec(
|
3
|
-
function _checkPrivateRedeclaration(
|
4
|
-
function _defineProperty(
|
2
|
+
function _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }
|
3
|
+
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
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; }
|
5
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
6
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); }
|
7
7
|
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"); }
|
@@ -5,7 +5,7 @@ require("core-js/modules/es.error.cause.js");
|
|
5
5
|
require("core-js/modules/es.array.push.js");
|
6
6
|
var _array = require("../../helpers/array");
|
7
7
|
var _console = require("../../helpers/console");
|
8
|
-
function _defineProperty(
|
8
|
+
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; }
|
9
9
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
10
10
|
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); }
|
11
11
|
/**
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import "core-js/modules/es.error.cause.js";
|
2
2
|
import "core-js/modules/es.array.push.js";
|
3
|
-
function _defineProperty(
|
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; }
|
4
4
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
5
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); }
|
6
6
|
import { arrayEach } from "../../helpers/array.mjs";
|
@@ -3,15 +3,28 @@
|
|
3
3
|
exports.__esModule = true;
|
4
4
|
require("core-js/modules/es.error.cause.js");
|
5
5
|
var _element = require("../../helpers/dom/element");
|
6
|
-
|
7
|
-
|
8
|
-
|
6
|
+
var _object = require("../../helpers/object");
|
7
|
+
var _localHooks = _interopRequireDefault(require("../../mixins/localHooks"));
|
8
|
+
var _editorResizeObserver = require("./editorResizeObserver");
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
10
|
+
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
11
|
+
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
12
|
+
function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
|
13
|
+
function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
|
14
|
+
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"); }
|
9
15
|
/**
|
10
16
|
* Comment editor for the Comments plugin.
|
11
17
|
*
|
12
18
|
* @private
|
13
19
|
* @class CommentEditor
|
14
20
|
*/
|
21
|
+
var _rootDocument = /*#__PURE__*/new WeakMap();
|
22
|
+
var _isRtl = /*#__PURE__*/new WeakMap();
|
23
|
+
var _container = /*#__PURE__*/new WeakMap();
|
24
|
+
var _editor = /*#__PURE__*/new WeakMap();
|
25
|
+
var _editorStyle = /*#__PURE__*/new WeakMap();
|
26
|
+
var _hidden = /*#__PURE__*/new WeakMap();
|
27
|
+
var _resizeObserver = /*#__PURE__*/new WeakMap();
|
15
28
|
class CommentEditor {
|
16
29
|
static get CLASS_EDITOR_CONTAINER() {
|
17
30
|
return 'htCommentsContainer';
|
@@ -27,35 +40,47 @@ class CommentEditor {
|
|
27
40
|
}
|
28
41
|
|
29
42
|
/**
|
30
|
-
* @type {
|
43
|
+
* @type {Document}
|
31
44
|
*/
|
32
45
|
|
33
46
|
constructor(rootDocument, isRtl) {
|
34
|
-
|
47
|
+
var _this = this;
|
48
|
+
_classPrivateFieldInitSpec(this, _rootDocument, void 0);
|
35
49
|
/**
|
36
50
|
* @type {boolean}
|
37
51
|
*/
|
38
|
-
|
52
|
+
_classPrivateFieldInitSpec(this, _isRtl, false);
|
39
53
|
/**
|
40
54
|
* @type {HTMLElement}
|
41
55
|
*/
|
42
|
-
|
56
|
+
_classPrivateFieldInitSpec(this, _container, null);
|
43
57
|
/**
|
44
58
|
* @type {HTMLElement}
|
45
59
|
*/
|
46
|
-
|
60
|
+
_classPrivateFieldInitSpec(this, _editor, void 0);
|
47
61
|
/**
|
48
62
|
* @type {CSSStyleDeclaration}
|
49
63
|
*/
|
50
|
-
|
64
|
+
_classPrivateFieldInitSpec(this, _editorStyle, void 0);
|
51
65
|
/**
|
52
66
|
* @type {boolean}
|
53
67
|
*/
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
this
|
68
|
+
_classPrivateFieldInitSpec(this, _hidden, true);
|
69
|
+
/**
|
70
|
+
* @type {EditorResizeObserver}
|
71
|
+
*/
|
72
|
+
_classPrivateFieldInitSpec(this, _resizeObserver, new _editorResizeObserver.EditorResizeObserver());
|
73
|
+
_classPrivateFieldSet(_rootDocument, this, rootDocument);
|
74
|
+
_classPrivateFieldSet(_isRtl, this, isRtl);
|
75
|
+
_classPrivateFieldSet(_editor, this, this.createEditor());
|
76
|
+
_classPrivateFieldSet(_editorStyle, this, _classPrivateFieldGet(_editor, this).style);
|
77
|
+
_classPrivateFieldGet(_resizeObserver, this).setObservedElement(this.getInputElement());
|
78
|
+
_classPrivateFieldGet(_resizeObserver, this).addLocalHook('resize', function () {
|
79
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
80
|
+
args[_key] = arguments[_key];
|
81
|
+
}
|
82
|
+
return _this.runLocalHooks('resize', ...args);
|
83
|
+
});
|
59
84
|
this.hide();
|
60
85
|
}
|
61
86
|
|
@@ -66,8 +91,8 @@ class CommentEditor {
|
|
66
91
|
* @param {number} y Y position (in pixels).
|
67
92
|
*/
|
68
93
|
setPosition(x, y) {
|
69
|
-
this.
|
70
|
-
this.
|
94
|
+
_classPrivateFieldGet(_editorStyle, this).left = `${x}px`;
|
95
|
+
_classPrivateFieldGet(_editorStyle, this).top = `${y}px`;
|
71
96
|
}
|
72
97
|
|
73
98
|
/**
|
@@ -96,6 +121,13 @@ class CommentEditor {
|
|
96
121
|
};
|
97
122
|
}
|
98
123
|
|
124
|
+
/**
|
125
|
+
* Starts observing the editor size.
|
126
|
+
*/
|
127
|
+
observeSize() {
|
128
|
+
_classPrivateFieldGet(_resizeObserver, this).observe();
|
129
|
+
}
|
130
|
+
|
99
131
|
/**
|
100
132
|
* Reset the editor size to its initial state.
|
101
133
|
*/
|
@@ -119,18 +151,19 @@ class CommentEditor {
|
|
119
151
|
* Show the comments editor.
|
120
152
|
*/
|
121
153
|
show() {
|
122
|
-
this.
|
123
|
-
this
|
154
|
+
_classPrivateFieldGet(_editorStyle, this).display = 'block';
|
155
|
+
_classPrivateFieldSet(_hidden, this, false);
|
124
156
|
}
|
125
157
|
|
126
158
|
/**
|
127
159
|
* Hide the comments editor.
|
128
160
|
*/
|
129
161
|
hide() {
|
130
|
-
|
131
|
-
|
162
|
+
_classPrivateFieldGet(_resizeObserver, this).unobserve();
|
163
|
+
if (!_classPrivateFieldGet(_hidden, this)) {
|
164
|
+
_classPrivateFieldGet(_editorStyle, this).display = 'none';
|
132
165
|
}
|
133
|
-
this
|
166
|
+
_classPrivateFieldSet(_hidden, this, true);
|
134
167
|
}
|
135
168
|
|
136
169
|
/**
|
@@ -139,7 +172,7 @@ class CommentEditor {
|
|
139
172
|
* @returns {boolean}
|
140
173
|
*/
|
141
174
|
isVisible() {
|
142
|
-
return this.
|
175
|
+
return _classPrivateFieldGet(_editorStyle, this).display === 'block';
|
143
176
|
}
|
144
177
|
|
145
178
|
/**
|
@@ -168,7 +201,7 @@ class CommentEditor {
|
|
168
201
|
* @returns {boolean}
|
169
202
|
*/
|
170
203
|
isFocused() {
|
171
|
-
return this.
|
204
|
+
return _classPrivateFieldGet(_rootDocument, this).activeElement === this.getInputElement();
|
172
205
|
}
|
173
206
|
|
174
207
|
/**
|
@@ -184,18 +217,18 @@ class CommentEditor {
|
|
184
217
|
* @returns {HTMLElement}
|
185
218
|
*/
|
186
219
|
createEditor() {
|
187
|
-
const editor = this.
|
188
|
-
const
|
220
|
+
const editor = _classPrivateFieldGet(_rootDocument, this).createElement('div');
|
221
|
+
const textarea = _classPrivateFieldGet(_rootDocument, this).createElement('textarea');
|
189
222
|
editor.style.display = 'none';
|
190
|
-
this
|
191
|
-
this.
|
192
|
-
(0, _element.addClass)(this
|
193
|
-
this.
|
223
|
+
_classPrivateFieldSet(_container, this, _classPrivateFieldGet(_rootDocument, this).createElement('div'));
|
224
|
+
_classPrivateFieldGet(_container, this).setAttribute('dir', _classPrivateFieldGet(_isRtl, this) ? 'rtl' : 'ltr');
|
225
|
+
(0, _element.addClass)(_classPrivateFieldGet(_container, this), CommentEditor.CLASS_EDITOR_CONTAINER);
|
226
|
+
_classPrivateFieldGet(_rootDocument, this).body.appendChild(_classPrivateFieldGet(_container, this));
|
194
227
|
(0, _element.addClass)(editor, CommentEditor.CLASS_EDITOR);
|
195
|
-
(0, _element.addClass)(
|
196
|
-
|
197
|
-
editor.appendChild(
|
198
|
-
this.
|
228
|
+
(0, _element.addClass)(textarea, CommentEditor.CLASS_INPUT);
|
229
|
+
textarea.setAttribute('data-hot-input', true);
|
230
|
+
editor.appendChild(textarea);
|
231
|
+
_classPrivateFieldGet(_container, this).appendChild(editor);
|
199
232
|
return editor;
|
200
233
|
}
|
201
234
|
|
@@ -205,20 +238,22 @@ class CommentEditor {
|
|
205
238
|
* @returns {HTMLElement}
|
206
239
|
*/
|
207
240
|
getInputElement() {
|
208
|
-
return this.
|
241
|
+
return _classPrivateFieldGet(_editor, this).querySelector(`.${CommentEditor.CLASS_INPUT}`);
|
209
242
|
}
|
210
243
|
|
211
244
|
/**
|
212
245
|
* Destroy the comments editor.
|
213
246
|
*/
|
214
247
|
destroy() {
|
215
|
-
const containerParentElement = this
|
216
|
-
this.
|
217
|
-
this
|
218
|
-
this
|
248
|
+
const containerParentElement = _classPrivateFieldGet(_container, this) ? _classPrivateFieldGet(_container, this).parentNode : null;
|
249
|
+
_classPrivateFieldGet(_editor, this).parentNode.removeChild(_classPrivateFieldGet(_editor, this));
|
250
|
+
_classPrivateFieldSet(_editor, this, null);
|
251
|
+
_classPrivateFieldSet(_editorStyle, this, null);
|
252
|
+
_classPrivateFieldGet(_resizeObserver, this).destroy();
|
219
253
|
if (containerParentElement) {
|
220
|
-
containerParentElement.removeChild(this
|
254
|
+
containerParentElement.removeChild(_classPrivateFieldGet(_container, this));
|
221
255
|
}
|
222
256
|
}
|
223
257
|
}
|
258
|
+
(0, _object.mixin)(CommentEditor, _localHooks.default);
|
224
259
|
var _default = exports.default = CommentEditor;
|
@@ -1,14 +1,26 @@
|
|
1
1
|
import "core-js/modules/es.error.cause.js";
|
2
|
-
function
|
3
|
-
function
|
4
|
-
function
|
2
|
+
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
3
|
+
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
4
|
+
function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
|
5
|
+
function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
|
6
|
+
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"); }
|
5
7
|
import { addClass, outerWidth, outerHeight } from "../../helpers/dom/element.mjs";
|
8
|
+
import { mixin } from "../../helpers/object.mjs";
|
9
|
+
import localHooks from "../../mixins/localHooks.mjs";
|
10
|
+
import { EditorResizeObserver } from "./editorResizeObserver.mjs";
|
6
11
|
/**
|
7
12
|
* Comment editor for the Comments plugin.
|
8
13
|
*
|
9
14
|
* @private
|
10
15
|
* @class CommentEditor
|
11
16
|
*/
|
17
|
+
var _rootDocument = /*#__PURE__*/new WeakMap();
|
18
|
+
var _isRtl = /*#__PURE__*/new WeakMap();
|
19
|
+
var _container = /*#__PURE__*/new WeakMap();
|
20
|
+
var _editor = /*#__PURE__*/new WeakMap();
|
21
|
+
var _editorStyle = /*#__PURE__*/new WeakMap();
|
22
|
+
var _hidden = /*#__PURE__*/new WeakMap();
|
23
|
+
var _resizeObserver = /*#__PURE__*/new WeakMap();
|
12
24
|
class CommentEditor {
|
13
25
|
static get CLASS_EDITOR_CONTAINER() {
|
14
26
|
return 'htCommentsContainer';
|
@@ -24,35 +36,47 @@ class CommentEditor {
|
|
24
36
|
}
|
25
37
|
|
26
38
|
/**
|
27
|
-
* @type {
|
39
|
+
* @type {Document}
|
28
40
|
*/
|
29
41
|
|
30
42
|
constructor(rootDocument, isRtl) {
|
31
|
-
|
43
|
+
var _this = this;
|
44
|
+
_classPrivateFieldInitSpec(this, _rootDocument, void 0);
|
32
45
|
/**
|
33
46
|
* @type {boolean}
|
34
47
|
*/
|
35
|
-
|
48
|
+
_classPrivateFieldInitSpec(this, _isRtl, false);
|
36
49
|
/**
|
37
50
|
* @type {HTMLElement}
|
38
51
|
*/
|
39
|
-
|
52
|
+
_classPrivateFieldInitSpec(this, _container, null);
|
40
53
|
/**
|
41
54
|
* @type {HTMLElement}
|
42
55
|
*/
|
43
|
-
|
56
|
+
_classPrivateFieldInitSpec(this, _editor, void 0);
|
44
57
|
/**
|
45
58
|
* @type {CSSStyleDeclaration}
|
46
59
|
*/
|
47
|
-
|
60
|
+
_classPrivateFieldInitSpec(this, _editorStyle, void 0);
|
48
61
|
/**
|
49
62
|
* @type {boolean}
|
50
63
|
*/
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
this
|
64
|
+
_classPrivateFieldInitSpec(this, _hidden, true);
|
65
|
+
/**
|
66
|
+
* @type {EditorResizeObserver}
|
67
|
+
*/
|
68
|
+
_classPrivateFieldInitSpec(this, _resizeObserver, new EditorResizeObserver());
|
69
|
+
_classPrivateFieldSet(_rootDocument, this, rootDocument);
|
70
|
+
_classPrivateFieldSet(_isRtl, this, isRtl);
|
71
|
+
_classPrivateFieldSet(_editor, this, this.createEditor());
|
72
|
+
_classPrivateFieldSet(_editorStyle, this, _classPrivateFieldGet(_editor, this).style);
|
73
|
+
_classPrivateFieldGet(_resizeObserver, this).setObservedElement(this.getInputElement());
|
74
|
+
_classPrivateFieldGet(_resizeObserver, this).addLocalHook('resize', function () {
|
75
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
76
|
+
args[_key] = arguments[_key];
|
77
|
+
}
|
78
|
+
return _this.runLocalHooks('resize', ...args);
|
79
|
+
});
|
56
80
|
this.hide();
|
57
81
|
}
|
58
82
|
|
@@ -63,8 +87,8 @@ class CommentEditor {
|
|
63
87
|
* @param {number} y Y position (in pixels).
|
64
88
|
*/
|
65
89
|
setPosition(x, y) {
|
66
|
-
this.
|
67
|
-
this.
|
90
|
+
_classPrivateFieldGet(_editorStyle, this).left = `${x}px`;
|
91
|
+
_classPrivateFieldGet(_editorStyle, this).top = `${y}px`;
|
68
92
|
}
|
69
93
|
|
70
94
|
/**
|
@@ -93,6 +117,13 @@ class CommentEditor {
|
|
93
117
|
};
|
94
118
|
}
|
95
119
|
|
120
|
+
/**
|
121
|
+
* Starts observing the editor size.
|
122
|
+
*/
|
123
|
+
observeSize() {
|
124
|
+
_classPrivateFieldGet(_resizeObserver, this).observe();
|
125
|
+
}
|
126
|
+
|
96
127
|
/**
|
97
128
|
* Reset the editor size to its initial state.
|
98
129
|
*/
|
@@ -116,18 +147,19 @@ class CommentEditor {
|
|
116
147
|
* Show the comments editor.
|
117
148
|
*/
|
118
149
|
show() {
|
119
|
-
this.
|
120
|
-
this
|
150
|
+
_classPrivateFieldGet(_editorStyle, this).display = 'block';
|
151
|
+
_classPrivateFieldSet(_hidden, this, false);
|
121
152
|
}
|
122
153
|
|
123
154
|
/**
|
124
155
|
* Hide the comments editor.
|
125
156
|
*/
|
126
157
|
hide() {
|
127
|
-
|
128
|
-
|
158
|
+
_classPrivateFieldGet(_resizeObserver, this).unobserve();
|
159
|
+
if (!_classPrivateFieldGet(_hidden, this)) {
|
160
|
+
_classPrivateFieldGet(_editorStyle, this).display = 'none';
|
129
161
|
}
|
130
|
-
this
|
162
|
+
_classPrivateFieldSet(_hidden, this, true);
|
131
163
|
}
|
132
164
|
|
133
165
|
/**
|
@@ -136,7 +168,7 @@ class CommentEditor {
|
|
136
168
|
* @returns {boolean}
|
137
169
|
*/
|
138
170
|
isVisible() {
|
139
|
-
return this.
|
171
|
+
return _classPrivateFieldGet(_editorStyle, this).display === 'block';
|
140
172
|
}
|
141
173
|
|
142
174
|
/**
|
@@ -165,7 +197,7 @@ class CommentEditor {
|
|
165
197
|
* @returns {boolean}
|
166
198
|
*/
|
167
199
|
isFocused() {
|
168
|
-
return this.
|
200
|
+
return _classPrivateFieldGet(_rootDocument, this).activeElement === this.getInputElement();
|
169
201
|
}
|
170
202
|
|
171
203
|
/**
|
@@ -181,18 +213,18 @@ class CommentEditor {
|
|
181
213
|
* @returns {HTMLElement}
|
182
214
|
*/
|
183
215
|
createEditor() {
|
184
|
-
const editor = this.
|
185
|
-
const
|
216
|
+
const editor = _classPrivateFieldGet(_rootDocument, this).createElement('div');
|
217
|
+
const textarea = _classPrivateFieldGet(_rootDocument, this).createElement('textarea');
|
186
218
|
editor.style.display = 'none';
|
187
|
-
this
|
188
|
-
this.
|
189
|
-
addClass(this
|
190
|
-
this.
|
219
|
+
_classPrivateFieldSet(_container, this, _classPrivateFieldGet(_rootDocument, this).createElement('div'));
|
220
|
+
_classPrivateFieldGet(_container, this).setAttribute('dir', _classPrivateFieldGet(_isRtl, this) ? 'rtl' : 'ltr');
|
221
|
+
addClass(_classPrivateFieldGet(_container, this), CommentEditor.CLASS_EDITOR_CONTAINER);
|
222
|
+
_classPrivateFieldGet(_rootDocument, this).body.appendChild(_classPrivateFieldGet(_container, this));
|
191
223
|
addClass(editor, CommentEditor.CLASS_EDITOR);
|
192
|
-
addClass(
|
193
|
-
|
194
|
-
editor.appendChild(
|
195
|
-
this.
|
224
|
+
addClass(textarea, CommentEditor.CLASS_INPUT);
|
225
|
+
textarea.setAttribute('data-hot-input', true);
|
226
|
+
editor.appendChild(textarea);
|
227
|
+
_classPrivateFieldGet(_container, this).appendChild(editor);
|
196
228
|
return editor;
|
197
229
|
}
|
198
230
|
|
@@ -202,20 +234,22 @@ class CommentEditor {
|
|
202
234
|
* @returns {HTMLElement}
|
203
235
|
*/
|
204
236
|
getInputElement() {
|
205
|
-
return this.
|
237
|
+
return _classPrivateFieldGet(_editor, this).querySelector(`.${CommentEditor.CLASS_INPUT}`);
|
206
238
|
}
|
207
239
|
|
208
240
|
/**
|
209
241
|
* Destroy the comments editor.
|
210
242
|
*/
|
211
243
|
destroy() {
|
212
|
-
const containerParentElement = this
|
213
|
-
this.
|
214
|
-
this
|
215
|
-
this
|
244
|
+
const containerParentElement = _classPrivateFieldGet(_container, this) ? _classPrivateFieldGet(_container, this).parentNode : null;
|
245
|
+
_classPrivateFieldGet(_editor, this).parentNode.removeChild(_classPrivateFieldGet(_editor, this));
|
246
|
+
_classPrivateFieldSet(_editor, this, null);
|
247
|
+
_classPrivateFieldSet(_editorStyle, this, null);
|
248
|
+
_classPrivateFieldGet(_resizeObserver, this).destroy();
|
216
249
|
if (containerParentElement) {
|
217
|
-
containerParentElement.removeChild(this
|
250
|
+
containerParentElement.removeChild(_classPrivateFieldGet(_container, this));
|
218
251
|
}
|
219
252
|
}
|
220
253
|
}
|
254
|
+
mixin(CommentEditor, localHooks);
|
221
255
|
export default CommentEditor;
|