handsontable 16.0.1 → 16.1.0-next-abd8f2e-20250904
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/3rdparty/walkontable/src/overlays.js +12 -2
- package/3rdparty/walkontable/src/overlays.mjs +12 -2
- package/3rdparty/walkontable/src/viewport.js +2 -6
- package/3rdparty/walkontable/src/viewport.mjs +2 -6
- package/CHANGELOG.md +37 -0
- package/base.js +2 -2
- package/base.mjs +2 -2
- package/cellTypes/autocompleteType/accessors/index.js +7 -0
- package/cellTypes/autocompleteType/accessors/index.mjs +2 -0
- package/cellTypes/autocompleteType/accessors/valueGetter.js +14 -0
- package/cellTypes/autocompleteType/accessors/valueGetter.mjs +10 -0
- package/cellTypes/autocompleteType/accessors/valueSetter.js +25 -0
- package/cellTypes/autocompleteType/accessors/valueSetter.mjs +21 -0
- package/cellTypes/autocompleteType/autocompleteType.js +4 -1
- package/cellTypes/autocompleteType/autocompleteType.mjs +4 -1
- package/cellTypes/checkboxType/accessors/index.js +5 -0
- package/cellTypes/checkboxType/accessors/index.mjs +1 -0
- package/cellTypes/checkboxType/accessors/valueSetter.js +26 -0
- package/cellTypes/checkboxType/accessors/valueSetter.mjs +22 -0
- package/cellTypes/checkboxType/checkboxType.js +3 -1
- package/cellTypes/checkboxType/checkboxType.mjs +3 -1
- package/cellTypes/dropdownType/accessors/index.js +7 -0
- package/cellTypes/dropdownType/accessors/index.mjs +2 -0
- package/cellTypes/dropdownType/accessors/valueGetter.js +14 -0
- package/cellTypes/dropdownType/accessors/valueGetter.mjs +10 -0
- package/cellTypes/dropdownType/accessors/valueSetter.js +17 -0
- package/cellTypes/dropdownType/accessors/valueSetter.mjs +13 -0
- package/cellTypes/dropdownType/dropdownType.js +4 -1
- package/cellTypes/dropdownType/dropdownType.mjs +4 -1
- package/cellTypes/numericType/accessors/index.js +5 -0
- package/cellTypes/numericType/accessors/index.mjs +1 -0
- package/cellTypes/numericType/accessors/valueSetter.js +19 -0
- package/cellTypes/numericType/accessors/valueSetter.mjs +15 -0
- package/cellTypes/numericType/numericType.js +3 -1
- package/cellTypes/numericType/numericType.mjs +3 -1
- package/core/focusCatcher/index.js +37 -112
- package/core/focusCatcher/index.mjs +35 -110
- package/core/focusCatcher/utils.js +31 -0
- package/core/focusCatcher/utils.mjs +27 -0
- package/core/hooks/constants.js +242 -0
- package/core/hooks/constants.mjs +242 -0
- package/core/hooks/index.d.ts +22 -0
- package/core/viewportScroll/scrollStrategies/focusScroll.js +5 -1
- package/core/viewportScroll/scrollStrategies/focusScroll.mjs +5 -1
- package/core/viewportScroll/utils.js +1 -1
- package/core/viewportScroll/utils.mjs +1 -1
- package/core.d.ts +4 -0
- package/core.js +237 -139
- package/core.mjs +240 -142
- package/dataMap/dataMap.js +13 -3
- package/dataMap/dataMap.mjs +14 -4
- package/dataMap/dataSource.js +16 -0
- package/dataMap/dataSource.mjs +16 -0
- package/dataMap/metaManager/lazyFactoryMap.js +4 -3
- package/dataMap/metaManager/lazyFactoryMap.mjs +2 -1
- package/dataMap/metaManager/metaLayers/cellMeta.js +3 -2
- package/dataMap/metaManager/metaLayers/cellMeta.mjs +3 -2
- package/dataMap/metaManager/metaSchema.js +289 -4
- package/dataMap/metaManager/metaSchema.mjs +289 -4
- package/dataMap/metaManager/utils.js +0 -11
- package/dataMap/metaManager/utils.mjs +0 -10
- package/dataMap/replaceData.js +1 -0
- package/dataMap/replaceData.mjs +1 -0
- package/dist/handsontable.css +281 -4
- package/dist/handsontable.full.css +281 -4
- package/dist/handsontable.full.js +7844 -2990
- package/dist/handsontable.full.min.css +4 -5
- package/dist/handsontable.full.min.js +167 -165
- package/dist/handsontable.js +9639 -4806
- package/dist/handsontable.min.css +4 -4
- package/dist/handsontable.min.js +52 -50
- package/dist/languages/all.js +231 -21
- package/dist/languages/all.min.js +1 -1
- package/dist/languages/ar-AR.js +11 -1
- package/dist/languages/ar-AR.min.js +1 -1
- package/dist/languages/cs-CZ.js +11 -1
- package/dist/languages/cs-CZ.min.js +1 -1
- package/dist/languages/de-CH.js +11 -1
- package/dist/languages/de-CH.min.js +1 -1
- package/dist/languages/de-DE.js +11 -1
- package/dist/languages/de-DE.min.js +1 -1
- package/dist/languages/en-US.js +11 -1
- package/dist/languages/en-US.min.js +1 -1
- package/dist/languages/es-MX.js +11 -1
- package/dist/languages/es-MX.min.js +1 -1
- package/dist/languages/fa-IR.js +11 -1
- package/dist/languages/fa-IR.min.js +1 -1
- package/dist/languages/fr-FR.js +11 -1
- package/dist/languages/fr-FR.min.js +1 -1
- package/dist/languages/hr-HR.js +11 -1
- package/dist/languages/hr-HR.min.js +1 -1
- package/dist/languages/it-IT.js +11 -1
- package/dist/languages/it-IT.min.js +1 -1
- package/dist/languages/ja-JP.js +11 -1
- package/dist/languages/ja-JP.min.js +1 -1
- package/dist/languages/ko-KR.js +11 -1
- package/dist/languages/ko-KR.min.js +1 -1
- package/dist/languages/lv-LV.js +11 -1
- package/dist/languages/lv-LV.min.js +1 -1
- package/dist/languages/nb-NO.js +11 -1
- package/dist/languages/nb-NO.min.js +1 -1
- package/dist/languages/nl-NL.js +11 -1
- package/dist/languages/nl-NL.min.js +1 -1
- package/dist/languages/pl-PL.js +11 -1
- package/dist/languages/pl-PL.min.js +1 -1
- package/dist/languages/pt-BR.js +11 -1
- package/dist/languages/pt-BR.min.js +1 -1
- package/dist/languages/ru-RU.js +11 -1
- package/dist/languages/ru-RU.min.js +1 -1
- package/dist/languages/sr-SP.js +11 -1
- package/dist/languages/sr-SP.min.js +1 -1
- package/dist/languages/zh-CN.js +11 -1
- package/dist/languages/zh-CN.min.js +1 -1
- package/dist/languages/zh-TW.js +11 -1
- package/dist/languages/zh-TW.min.js +1 -1
- package/editorManager.js +4 -4
- package/editorManager.mjs +4 -4
- package/editors/autocompleteEditor/autocompleteEditor.js +50 -112
- package/editors/autocompleteEditor/autocompleteEditor.mjs +51 -113
- package/editors/baseEditor/baseEditor.js +10 -6
- package/editors/baseEditor/baseEditor.mjs +10 -6
- package/editors/handsontableEditor/handsontableEditor.js +9 -9
- package/editors/handsontableEditor/handsontableEditor.mjs +9 -9
- package/editors/textEditor/textEditor.js +0 -7
- package/editors/textEditor/textEditor.mjs +0 -7
- package/focusManager.js +2 -2
- package/focusManager.mjs +2 -2
- package/helpers/a11y.js +15 -2
- package/helpers/a11y.mjs +10 -2
- package/helpers/console.js +12 -0
- package/helpers/console.mjs +11 -0
- package/helpers/dom/element.js +4 -4
- package/helpers/dom/element.mjs +4 -4
- package/helpers/mixed.js +65 -2
- package/helpers/mixed.mjs +63 -2
- package/helpers/number.js +28 -0
- package/helpers/number.mjs +26 -0
- package/helpers/object.js +35 -0
- package/helpers/object.mjs +34 -0
- package/helpers/string.js +19 -0
- package/helpers/string.mjs +18 -0
- package/helpers/templateLiteralTag.js +57 -1
- package/helpers/templateLiteralTag.mjs +56 -1
- package/i18n/constants.js +13 -1
- package/i18n/constants.mjs +13 -1
- package/i18n/languages/ar-AR.js +11 -1
- package/i18n/languages/ar-AR.mjs +11 -1
- package/i18n/languages/cs-CZ.js +11 -1
- package/i18n/languages/cs-CZ.mjs +11 -1
- package/i18n/languages/de-CH.js +11 -1
- package/i18n/languages/de-CH.mjs +11 -1
- package/i18n/languages/de-DE.js +11 -1
- package/i18n/languages/de-DE.mjs +11 -1
- package/i18n/languages/en-US.js +11 -1
- package/i18n/languages/en-US.mjs +11 -1
- package/i18n/languages/es-MX.js +11 -1
- package/i18n/languages/es-MX.mjs +11 -1
- package/i18n/languages/fa-IR.js +11 -1
- package/i18n/languages/fa-IR.mjs +11 -1
- package/i18n/languages/fr-FR.js +11 -1
- package/i18n/languages/fr-FR.mjs +11 -1
- package/i18n/languages/hr-HR.js +11 -1
- package/i18n/languages/hr-HR.mjs +11 -1
- package/i18n/languages/it-IT.js +11 -1
- package/i18n/languages/it-IT.mjs +11 -1
- package/i18n/languages/ja-JP.js +11 -1
- package/i18n/languages/ja-JP.mjs +11 -1
- package/i18n/languages/ko-KR.js +11 -1
- package/i18n/languages/ko-KR.mjs +11 -1
- package/i18n/languages/lv-LV.js +11 -1
- package/i18n/languages/lv-LV.mjs +11 -1
- package/i18n/languages/nb-NO.js +11 -1
- package/i18n/languages/nb-NO.mjs +11 -1
- package/i18n/languages/nl-NL.js +11 -1
- package/i18n/languages/nl-NL.mjs +11 -1
- package/i18n/languages/pl-PL.js +11 -1
- package/i18n/languages/pl-PL.mjs +11 -1
- package/i18n/languages/pt-BR.js +11 -1
- package/i18n/languages/pt-BR.mjs +11 -1
- package/i18n/languages/ru-RU.js +11 -1
- package/i18n/languages/ru-RU.mjs +11 -1
- package/i18n/languages/sr-SP.js +11 -1
- package/i18n/languages/sr-SP.mjs +11 -1
- package/i18n/languages/zh-CN.js +11 -1
- package/i18n/languages/zh-CN.mjs +11 -1
- package/i18n/languages/zh-TW.js +11 -1
- package/i18n/languages/zh-TW.mjs +11 -1
- package/i18n/phraseFormatters/index.js +3 -1
- package/i18n/phraseFormatters/index.mjs +3 -1
- package/i18n/registry.js +5 -6
- package/i18n/registry.mjs +5 -6
- package/index.d.ts +27 -0
- package/languages/all.js +231 -21
- package/languages/ar-AR.js +11 -1
- package/languages/ar-AR.mjs +11 -1
- package/languages/cs-CZ.js +11 -1
- package/languages/cs-CZ.mjs +11 -1
- package/languages/de-CH.js +11 -1
- package/languages/de-CH.mjs +11 -1
- package/languages/de-DE.js +11 -1
- package/languages/de-DE.mjs +11 -1
- package/languages/en-US.js +11 -1
- package/languages/en-US.mjs +11 -1
- package/languages/es-MX.js +11 -1
- package/languages/es-MX.mjs +11 -1
- package/languages/fa-IR.js +11 -1
- package/languages/fa-IR.mjs +11 -1
- package/languages/fr-FR.js +11 -1
- package/languages/fr-FR.mjs +11 -1
- package/languages/hr-HR.js +11 -1
- package/languages/hr-HR.mjs +11 -1
- package/languages/index.js +231 -21
- package/languages/it-IT.js +11 -1
- package/languages/it-IT.mjs +11 -1
- package/languages/ja-JP.js +11 -1
- package/languages/ja-JP.mjs +11 -1
- package/languages/ko-KR.js +11 -1
- package/languages/ko-KR.mjs +11 -1
- package/languages/lv-LV.js +11 -1
- package/languages/lv-LV.mjs +11 -1
- package/languages/nb-NO.js +11 -1
- package/languages/nb-NO.mjs +11 -1
- package/languages/nl-NL.js +11 -1
- package/languages/nl-NL.mjs +11 -1
- package/languages/pl-PL.js +11 -1
- package/languages/pl-PL.mjs +11 -1
- package/languages/pt-BR.js +11 -1
- package/languages/pt-BR.mjs +11 -1
- package/languages/ru-RU.js +11 -1
- package/languages/ru-RU.mjs +11 -1
- package/languages/sr-SP.js +11 -1
- package/languages/sr-SP.mjs +11 -1
- package/languages/zh-CN.js +11 -1
- package/languages/zh-CN.mjs +11 -1
- package/languages/zh-TW.js +11 -1
- package/languages/zh-TW.mjs +11 -1
- package/mixins/localHooks.js +16 -0
- package/mixins/localHooks.mjs +16 -0
- package/package.json +19 -1
- package/plugins/autoRowSize/autoRowSize.js +43 -6
- package/plugins/autoRowSize/autoRowSize.mjs +43 -6
- package/plugins/autofill/autofill.js +50 -3
- package/plugins/autofill/autofill.mjs +50 -3
- package/plugins/base/base.js +86 -15
- package/plugins/base/base.mjs +87 -16
- package/plugins/collapsibleColumns/collapsibleColumns.js +4 -4
- package/plugins/collapsibleColumns/collapsibleColumns.mjs +4 -4
- package/plugins/columnSorting/columnSorting.js +3 -3
- package/plugins/columnSorting/columnSorting.mjs +3 -3
- package/plugins/comments/comments.js +52 -22
- package/plugins/comments/comments.mjs +52 -22
- package/plugins/comments/contextMenuItem/addEditComment.js +3 -3
- package/plugins/comments/contextMenuItem/addEditComment.mjs +3 -3
- package/plugins/comments/contextMenuItem/readOnlyComment.js +2 -2
- package/plugins/comments/contextMenuItem/readOnlyComment.mjs +2 -2
- package/plugins/comments/contextMenuItem/removeComment.js +2 -2
- package/plugins/comments/contextMenuItem/removeComment.mjs +2 -2
- package/plugins/contextMenu/contextMenu.js +4 -5
- package/plugins/contextMenu/contextMenu.mjs +4 -5
- package/plugins/contextMenu/menu/cursor.js +1 -1
- package/plugins/contextMenu/menu/cursor.mjs +1 -1
- package/plugins/contextMenu/menu/defaultShortcutsList.js +5 -5
- package/plugins/contextMenu/menu/defaultShortcutsList.mjs +5 -5
- package/plugins/contextMenu/menu/menu.js +3 -3
- package/plugins/contextMenu/menu/menu.mjs +3 -3
- package/plugins/contextMenu/menu/positioner.js +1 -1
- package/plugins/contextMenu/menu/positioner.mjs +1 -1
- package/plugins/contextMenu/predefinedItems/alignment.js +1 -1
- package/plugins/contextMenu/predefinedItems/alignment.mjs +1 -1
- package/plugins/contextMenu/predefinedItems/clearColumn.js +1 -1
- package/plugins/contextMenu/predefinedItems/clearColumn.mjs +1 -1
- package/plugins/contextMenu/predefinedItems/columnLeft.js +3 -3
- package/plugins/contextMenu/predefinedItems/columnLeft.mjs +3 -3
- package/plugins/contextMenu/predefinedItems/columnRight.js +3 -3
- package/plugins/contextMenu/predefinedItems/columnRight.mjs +3 -3
- package/plugins/contextMenu/predefinedItems/readOnly.js +1 -1
- package/plugins/contextMenu/predefinedItems/readOnly.mjs +1 -1
- package/plugins/contextMenu/predefinedItems/removeColumn.js +1 -1
- package/plugins/contextMenu/predefinedItems/removeColumn.mjs +1 -1
- package/plugins/contextMenu/predefinedItems/removeRow.js +1 -1
- package/plugins/contextMenu/predefinedItems/removeRow.mjs +1 -1
- package/plugins/contextMenu/predefinedItems/rowAbove.js +3 -3
- package/plugins/contextMenu/predefinedItems/rowAbove.mjs +3 -3
- package/plugins/contextMenu/predefinedItems/rowBelow.js +3 -3
- package/plugins/contextMenu/predefinedItems/rowBelow.mjs +3 -3
- package/plugins/copyPaste/contextMenuItem/copy.js +1 -1
- package/plugins/copyPaste/contextMenuItem/copy.mjs +1 -1
- package/plugins/copyPaste/contextMenuItem/copyColumnHeadersOnly.js +3 -3
- package/plugins/copyPaste/contextMenuItem/copyColumnHeadersOnly.mjs +3 -3
- package/plugins/copyPaste/contextMenuItem/copyWithColumnGroupHeaders.js +3 -3
- package/plugins/copyPaste/contextMenuItem/copyWithColumnGroupHeaders.mjs +3 -3
- package/plugins/copyPaste/contextMenuItem/copyWithColumnHeaders.js +3 -3
- package/plugins/copyPaste/contextMenuItem/copyWithColumnHeaders.mjs +3 -3
- package/plugins/copyPaste/contextMenuItem/cut.js +1 -1
- package/plugins/copyPaste/contextMenuItem/cut.mjs +1 -1
- package/plugins/copyPaste/copyPaste.js +75 -40
- package/plugins/copyPaste/copyPaste.mjs +76 -41
- package/plugins/customBorders/customBorders.js +1 -1
- package/plugins/customBorders/customBorders.mjs +1 -1
- package/plugins/dialog/dialog.d.ts +23 -0
- package/plugins/dialog/dialog.js +489 -0
- package/plugins/dialog/dialog.mjs +485 -0
- package/plugins/dialog/index.d.ts +1 -0
- package/plugins/dialog/index.js +7 -0
- package/plugins/dialog/index.mjs +1 -0
- package/plugins/dialog/ui.js +264 -0
- package/plugins/dialog/ui.mjs +259 -0
- package/plugins/dropdownMenu/dropdownMenu.js +5 -4
- package/plugins/dropdownMenu/dropdownMenu.mjs +5 -4
- package/plugins/filters/filters.js +2 -2
- package/plugins/filters/filters.mjs +2 -2
- package/plugins/hiddenColumns/contextMenuItem/hideColumn.js +3 -3
- package/plugins/hiddenColumns/contextMenuItem/hideColumn.mjs +3 -3
- package/plugins/hiddenColumns/contextMenuItem/showColumn.js +4 -4
- package/plugins/hiddenColumns/contextMenuItem/showColumn.mjs +4 -4
- package/plugins/hiddenRows/contextMenuItem/hideRow.js +3 -3
- package/plugins/hiddenRows/contextMenuItem/hideRow.mjs +3 -3
- package/plugins/hiddenRows/contextMenuItem/showRow.js +4 -4
- package/plugins/hiddenRows/contextMenuItem/showRow.mjs +4 -4
- package/plugins/index.d.ts +9 -0
- package/plugins/index.js +9 -0
- package/plugins/index.mjs +7 -1
- package/plugins/loading/content.js +36 -0
- package/plugins/loading/content.mjs +31 -0
- package/plugins/loading/index.d.ts +1 -0
- package/plugins/loading/index.js +7 -0
- package/plugins/loading/index.mjs +1 -0
- package/plugins/loading/loading.d.ts +19 -0
- package/plugins/loading/loading.js +292 -0
- package/plugins/loading/loading.mjs +287 -0
- package/plugins/manualColumnFreeze/contextMenuItem/freezeColumn.js +1 -1
- package/plugins/manualColumnFreeze/contextMenuItem/freezeColumn.mjs +1 -1
- package/plugins/manualColumnFreeze/contextMenuItem/unfreezeColumn.js +1 -1
- package/plugins/manualColumnFreeze/contextMenuItem/unfreezeColumn.mjs +1 -1
- package/plugins/manualColumnMove/manualColumnMove.js +3 -3
- package/plugins/manualColumnMove/manualColumnMove.mjs +3 -3
- 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 +4 -4
- package/plugins/manualRowResize/manualRowResize.js +5 -2
- package/plugins/manualRowResize/manualRowResize.mjs +5 -2
- package/plugins/mergeCells/contextMenuItem/toggleMerge.js +15 -15
- package/plugins/mergeCells/contextMenuItem/toggleMerge.mjs +15 -15
- package/plugins/mergeCells/focusOrder.js +75 -39
- package/plugins/mergeCells/focusOrder.mjs +75 -39
- package/plugins/mergeCells/mergeCells.js +26 -19
- package/plugins/mergeCells/mergeCells.mjs +26 -19
- package/plugins/mergeCells/renderer.js +14 -8
- package/plugins/mergeCells/renderer.mjs +14 -8
- package/plugins/multiColumnSorting/multiColumnSorting.js +3 -3
- package/plugins/multiColumnSorting/multiColumnSorting.mjs +3 -3
- package/plugins/multipleSelectionHandles/multipleSelectionHandles.js +3 -3
- package/plugins/multipleSelectionHandles/multipleSelectionHandles.mjs +3 -3
- package/plugins/nestedHeaders/nestedHeaders.js +47 -41
- package/plugins/nestedHeaders/nestedHeaders.mjs +47 -41
- package/plugins/nestedRows/nestedRows.js +3 -3
- package/plugins/nestedRows/nestedRows.mjs +3 -3
- package/plugins/nestedRows/ui/collapsing.js +1 -2
- package/plugins/nestedRows/ui/collapsing.mjs +1 -2
- package/plugins/nestedRows/ui/contextMenu.js +4 -4
- package/plugins/nestedRows/ui/contextMenu.mjs +4 -4
- package/plugins/nestedRows/ui/headers.js +4 -1
- package/plugins/nestedRows/ui/headers.mjs +4 -1
- package/plugins/pagination/focusController.js +27 -0
- package/plugins/pagination/focusController.mjs +23 -0
- package/plugins/pagination/index.d.ts +1 -0
- package/plugins/pagination/index.js +7 -0
- package/plugins/pagination/index.mjs +1 -0
- package/plugins/pagination/pagination.d.ts +52 -0
- package/plugins/pagination/pagination.js +1034 -0
- package/plugins/pagination/pagination.mjs +1030 -0
- package/plugins/pagination/strategies/autoPageSize.js +96 -0
- package/plugins/pagination/strategies/autoPageSize.mjs +92 -0
- package/plugins/pagination/strategies/fixedPageSize.js +88 -0
- package/plugins/pagination/strategies/fixedPageSize.mjs +84 -0
- package/plugins/pagination/strategies/index.js +22 -0
- package/plugins/pagination/strategies/index.mjs +18 -0
- package/plugins/pagination/ui.js +449 -0
- package/plugins/pagination/ui.mjs +443 -0
- package/plugins/pagination/utils.js +28 -0
- package/plugins/pagination/utils.mjs +24 -0
- package/plugins/stretchColumns/calculator.js +4 -0
- package/plugins/stretchColumns/calculator.mjs +4 -0
- package/plugins/stretchColumns/stretchColumns.js +1 -1
- package/plugins/stretchColumns/stretchColumns.mjs +1 -1
- package/plugins/undoRedo/actions/dataChange.js +17 -15
- package/plugins/undoRedo/actions/dataChange.mjs +17 -15
- package/renderers/checkboxRenderer/checkboxRenderer.js +3 -3
- package/renderers/checkboxRenderer/checkboxRenderer.mjs +3 -3
- package/selection/range.js +11 -0
- package/selection/range.mjs +11 -0
- package/selection/selection.js +163 -124
- package/selection/selection.mjs +163 -124
- package/selection/transformation/_base.js +448 -0
- package/selection/transformation/_base.mjs +443 -0
- package/selection/transformation/extender.js +55 -0
- package/selection/transformation/extender.mjs +51 -0
- package/selection/transformation/focus.js +77 -0
- package/selection/transformation/focus.mjs +73 -0
- package/selection/transformation/index.js +7 -0
- package/selection/transformation/index.mjs +2 -0
- package/selection/utils.js +2 -1
- package/selection/utils.mjs +2 -1
- package/settings.d.ts +10 -1
- package/shortcutContexts/commands/editor/fastOpen.js +1 -1
- package/shortcutContexts/commands/editor/fastOpen.mjs +1 -1
- package/shortcutContexts/commands/editor/open.js +10 -4
- package/shortcutContexts/commands/editor/open.mjs +10 -4
- package/shortcutContexts/commands/extendCellsSelection/down.js +1 -1
- package/shortcutContexts/commands/extendCellsSelection/down.mjs +1 -1
- package/shortcutContexts/commands/extendCellsSelection/downByViewportHeight.js +2 -2
- package/shortcutContexts/commands/extendCellsSelection/downByViewportHeight.mjs +2 -2
- package/shortcutContexts/commands/extendCellsSelection/left.js +1 -1
- package/shortcutContexts/commands/extendCellsSelection/left.mjs +1 -1
- package/shortcutContexts/commands/extendCellsSelection/right.js +1 -1
- package/shortcutContexts/commands/extendCellsSelection/right.mjs +1 -1
- package/shortcutContexts/commands/extendCellsSelection/toColumns.js +1 -1
- package/shortcutContexts/commands/extendCellsSelection/toColumns.mjs +1 -1
- package/shortcutContexts/commands/extendCellsSelection/toMostBottom.js +1 -1
- package/shortcutContexts/commands/extendCellsSelection/toMostBottom.mjs +1 -1
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.js +1 -1
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.mjs +1 -1
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.js +1 -1
- package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.mjs +1 -1
- package/shortcutContexts/commands/extendCellsSelection/toMostLeft.js +1 -1
- package/shortcutContexts/commands/extendCellsSelection/toMostLeft.mjs +1 -1
- package/shortcutContexts/commands/extendCellsSelection/toMostRight.js +1 -1
- package/shortcutContexts/commands/extendCellsSelection/toMostRight.mjs +1 -1
- package/shortcutContexts/commands/extendCellsSelection/toMostTop.js +1 -1
- package/shortcutContexts/commands/extendCellsSelection/toMostTop.mjs +1 -1
- package/shortcutContexts/commands/extendCellsSelection/toRows.js +1 -1
- package/shortcutContexts/commands/extendCellsSelection/toRows.mjs +1 -1
- package/shortcutContexts/commands/extendCellsSelection/up.js +1 -1
- package/shortcutContexts/commands/extendCellsSelection/up.mjs +1 -1
- package/shortcutContexts/commands/extendCellsSelection/upByViewportHeight.js +2 -2
- package/shortcutContexts/commands/extendCellsSelection/upByViewportHeight.mjs +2 -2
- package/shortcutContexts/commands/moveCellSelection/downByViewportHeight.js +2 -2
- package/shortcutContexts/commands/moveCellSelection/downByViewportHeight.mjs +2 -2
- package/shortcutContexts/commands/moveCellSelection/inlineEnd.js +5 -2
- package/shortcutContexts/commands/moveCellSelection/inlineEnd.mjs +5 -2
- package/shortcutContexts/commands/moveCellSelection/inlineStart.js +5 -2
- package/shortcutContexts/commands/moveCellSelection/inlineStart.mjs +5 -2
- package/shortcutContexts/commands/moveCellSelection/toMostBottom.js +1 -1
- package/shortcutContexts/commands/moveCellSelection/toMostBottom.mjs +1 -1
- package/shortcutContexts/commands/moveCellSelection/toMostInlineEnd.js +1 -1
- package/shortcutContexts/commands/moveCellSelection/toMostInlineEnd.mjs +1 -1
- package/shortcutContexts/commands/moveCellSelection/toMostInlineStart.js +1 -1
- package/shortcutContexts/commands/moveCellSelection/toMostInlineStart.mjs +1 -1
- package/shortcutContexts/commands/moveCellSelection/toMostLeft.js +1 -1
- package/shortcutContexts/commands/moveCellSelection/toMostLeft.mjs +1 -1
- package/shortcutContexts/commands/moveCellSelection/toMostRight.js +1 -1
- package/shortcutContexts/commands/moveCellSelection/toMostRight.mjs +1 -1
- package/shortcutContexts/commands/moveCellSelection/toMostTop.js +1 -1
- package/shortcutContexts/commands/moveCellSelection/toMostTop.mjs +1 -1
- package/shortcutContexts/commands/moveCellSelection/upByViewportHeight.js +2 -2
- package/shortcutContexts/commands/moveCellSelection/upByViewportHeight.mjs +2 -2
- package/shortcutContexts/commands/scrollToFocusedCell.js +1 -1
- package/shortcutContexts/commands/scrollToFocusedCell.mjs +1 -1
- package/shortcutContexts/grid.js +3 -3
- package/shortcutContexts/grid.mjs +3 -3
- package/shortcuts/context.js +4 -1
- package/shortcuts/context.mjs +4 -1
- package/shortcuts/manager.js +17 -3
- package/shortcuts/manager.mjs +17 -3
- package/styles/handsontable.css +288 -22
- package/styles/handsontable.min.css +3 -3
- package/styles/ht-theme-classic.css +828 -0
- package/styles/ht-theme-classic.min.css +30 -0
- package/styles/ht-theme-horizon.css +122 -26
- package/styles/ht-theme-horizon.min.css +3 -3
- package/styles/ht-theme-main.css +124 -28
- package/styles/ht-theme-main.min.css +3 -3
- package/tableView.js +61 -25
- package/tableView.mjs +61 -25
- package/utils/a11yAnnouncer.js +70 -0
- package/utils/a11yAnnouncer.mjs +64 -0
- package/{core/focusCatcher → utils}/focusDetector.js +30 -12
- package/{core/focusCatcher → utils}/focusDetector.mjs +30 -12
- package/utils/samplesGenerator.js +17 -1
- package/utils/samplesGenerator.mjs +17 -1
- package/utils/stylesHandler.js +23 -8
- package/utils/stylesHandler.mjs +23 -8
- package/utils/valueAccessors.js +45 -0
- package/utils/valueAccessors.mjs +40 -0
- package/validators/autocompleteValidator/autocompleteValidator.js +2 -1
- package/validators/autocompleteValidator/autocompleteValidator.mjs +2 -1
- package/selection/transformation.js +0 -335
- package/selection/transformation.mjs +0 -331
@@ -8,7 +8,7 @@ export default function hideColumnItem(hiddenColumnsPlugin) {
|
|
8
8
|
return {
|
9
9
|
key: 'hidden_columns_hide',
|
10
10
|
name() {
|
11
|
-
const selection = this.
|
11
|
+
const selection = this.getSelectedActive();
|
12
12
|
let pluralForm = 0;
|
13
13
|
if (Array.isArray(selection)) {
|
14
14
|
const [, fromColumn,, toColumn] = selection;
|
@@ -22,7 +22,7 @@ export default function hideColumnItem(hiddenColumnsPlugin) {
|
|
22
22
|
const {
|
23
23
|
from,
|
24
24
|
to
|
25
|
-
} = this.
|
25
|
+
} = this.getSelectedRangeActive();
|
26
26
|
const start = Math.max(Math.min(from.col, to.col), 0);
|
27
27
|
const end = Math.max(from.col, to.col);
|
28
28
|
const columnsToHide = [];
|
@@ -37,8 +37,8 @@ export default function hideColumnItem(hiddenColumnsPlugin) {
|
|
37
37
|
} else {
|
38
38
|
this.deselectCell();
|
39
39
|
}
|
40
|
-
this.render();
|
41
40
|
this.view.adjustElementsSize();
|
41
|
+
this.render();
|
42
42
|
},
|
43
43
|
disabled: false,
|
44
44
|
hidden() {
|
@@ -36,8 +36,8 @@ function showColumnItem(hiddenColumnsPlugin) {
|
|
36
36
|
|
37
37
|
// We render columns at first. It was needed for getting fixed columns.
|
38
38
|
// Please take a look at #6864 for broader description.
|
39
|
-
this.render();
|
40
39
|
this.view.adjustElementsSize();
|
40
|
+
this.render();
|
41
41
|
const allColumnsSelected = endVisualColumn - startVisualColumn + 1 === this.countCols();
|
42
42
|
|
43
43
|
// When all headers needs to be selected then do nothing. The header selection is
|
@@ -55,9 +55,9 @@ function showColumnItem(hiddenColumnsPlugin) {
|
|
55
55
|
return true;
|
56
56
|
}
|
57
57
|
columns.length = 0;
|
58
|
-
const
|
59
|
-
const visualStartColumn =
|
60
|
-
const visualEndColumn =
|
58
|
+
const selectedRangeActive = this.getSelectedRangeActive();
|
59
|
+
const visualStartColumn = selectedRangeActive.getTopStartCorner().col;
|
60
|
+
const visualEndColumn = selectedRangeActive.getBottomEndCorner().col;
|
61
61
|
const columnIndexMapper = this.columnIndexMapper;
|
62
62
|
const renderableStartColumn = columnIndexMapper.getRenderableFromVisualIndex(visualStartColumn);
|
63
63
|
const renderableEndColumn = columnIndexMapper.getRenderableFromVisualIndex(visualEndColumn);
|
@@ -31,8 +31,8 @@ export default function showColumnItem(hiddenColumnsPlugin) {
|
|
31
31
|
|
32
32
|
// We render columns at first. It was needed for getting fixed columns.
|
33
33
|
// Please take a look at #6864 for broader description.
|
34
|
-
this.render();
|
35
34
|
this.view.adjustElementsSize();
|
35
|
+
this.render();
|
36
36
|
const allColumnsSelected = endVisualColumn - startVisualColumn + 1 === this.countCols();
|
37
37
|
|
38
38
|
// When all headers needs to be selected then do nothing. The header selection is
|
@@ -50,9 +50,9 @@ export default function showColumnItem(hiddenColumnsPlugin) {
|
|
50
50
|
return true;
|
51
51
|
}
|
52
52
|
columns.length = 0;
|
53
|
-
const
|
54
|
-
const visualStartColumn =
|
55
|
-
const visualEndColumn =
|
53
|
+
const selectedRangeActive = this.getSelectedRangeActive();
|
54
|
+
const visualStartColumn = selectedRangeActive.getTopStartCorner().col;
|
55
|
+
const visualEndColumn = selectedRangeActive.getBottomEndCorner().col;
|
56
56
|
const columnIndexMapper = this.columnIndexMapper;
|
57
57
|
const renderableStartColumn = columnIndexMapper.getRenderableFromVisualIndex(visualStartColumn);
|
58
58
|
const renderableEndColumn = columnIndexMapper.getRenderableFromVisualIndex(visualEndColumn);
|
@@ -13,7 +13,7 @@ function hideRowItem(hiddenRowsPlugin) {
|
|
13
13
|
return {
|
14
14
|
key: 'hidden_rows_hide',
|
15
15
|
name() {
|
16
|
-
const selection = this.
|
16
|
+
const selection = this.getSelectedActive();
|
17
17
|
let pluralForm = 0;
|
18
18
|
if (Array.isArray(selection)) {
|
19
19
|
const [fromRow,, toRow] = selection;
|
@@ -27,7 +27,7 @@ function hideRowItem(hiddenRowsPlugin) {
|
|
27
27
|
const {
|
28
28
|
from,
|
29
29
|
to
|
30
|
-
} = this.
|
30
|
+
} = this.getSelectedRangeActive();
|
31
31
|
const start = Math.max(Math.min(from.row, to.row), 0);
|
32
32
|
const end = Math.max(from.row, to.row);
|
33
33
|
const rowsToHide = [];
|
@@ -42,8 +42,8 @@ function hideRowItem(hiddenRowsPlugin) {
|
|
42
42
|
} else {
|
43
43
|
this.deselectCell();
|
44
44
|
}
|
45
|
-
this.render();
|
46
45
|
this.view.adjustElementsSize();
|
46
|
+
this.render();
|
47
47
|
},
|
48
48
|
disabled: false,
|
49
49
|
hidden() {
|
@@ -8,7 +8,7 @@ export default function hideRowItem(hiddenRowsPlugin) {
|
|
8
8
|
return {
|
9
9
|
key: 'hidden_rows_hide',
|
10
10
|
name() {
|
11
|
-
const selection = this.
|
11
|
+
const selection = this.getSelectedActive();
|
12
12
|
let pluralForm = 0;
|
13
13
|
if (Array.isArray(selection)) {
|
14
14
|
const [fromRow,, toRow] = selection;
|
@@ -22,7 +22,7 @@ export default function hideRowItem(hiddenRowsPlugin) {
|
|
22
22
|
const {
|
23
23
|
from,
|
24
24
|
to
|
25
|
-
} = this.
|
25
|
+
} = this.getSelectedRangeActive();
|
26
26
|
const start = Math.max(Math.min(from.row, to.row), 0);
|
27
27
|
const end = Math.max(from.row, to.row);
|
28
28
|
const rowsToHide = [];
|
@@ -37,8 +37,8 @@ export default function hideRowItem(hiddenRowsPlugin) {
|
|
37
37
|
} else {
|
38
38
|
this.deselectCell();
|
39
39
|
}
|
40
|
-
this.render();
|
41
40
|
this.view.adjustElementsSize();
|
41
|
+
this.render();
|
42
42
|
},
|
43
43
|
disabled: false,
|
44
44
|
hidden() {
|
@@ -36,8 +36,8 @@ function showRowItem(hiddenRowsPlugin) {
|
|
36
36
|
|
37
37
|
// We render rows at first. It was needed for getting fixed rows.
|
38
38
|
// Please take a look at #6864 for broader description.
|
39
|
-
this.render();
|
40
39
|
this.view.adjustElementsSize();
|
40
|
+
this.render();
|
41
41
|
const allRowsSelected = endVisualRow - startVisualRow + 1 === this.countRows();
|
42
42
|
|
43
43
|
// When all headers needs to be selected then do nothing. The header selection is
|
@@ -55,9 +55,9 @@ function showRowItem(hiddenRowsPlugin) {
|
|
55
55
|
return true;
|
56
56
|
}
|
57
57
|
rows.length = 0;
|
58
|
-
const
|
59
|
-
const visualStartRow =
|
60
|
-
const visualEndRow =
|
58
|
+
const selectedRangeActive = this.getSelectedRangeActive();
|
59
|
+
const visualStartRow = selectedRangeActive.getTopStartCorner().row;
|
60
|
+
const visualEndRow = selectedRangeActive.getBottomEndCorner().row;
|
61
61
|
const rowIndexMapper = this.rowIndexMapper;
|
62
62
|
const renderableStartRow = rowIndexMapper.getRenderableFromVisualIndex(visualStartRow);
|
63
63
|
const renderableEndRow = rowIndexMapper.getRenderableFromVisualIndex(visualEndRow);
|
@@ -31,8 +31,8 @@ export default function showRowItem(hiddenRowsPlugin) {
|
|
31
31
|
|
32
32
|
// We render rows at first. It was needed for getting fixed rows.
|
33
33
|
// Please take a look at #6864 for broader description.
|
34
|
-
this.render();
|
35
34
|
this.view.adjustElementsSize();
|
35
|
+
this.render();
|
36
36
|
const allRowsSelected = endVisualRow - startVisualRow + 1 === this.countRows();
|
37
37
|
|
38
38
|
// When all headers needs to be selected then do nothing. The header selection is
|
@@ -50,9 +50,9 @@ export default function showRowItem(hiddenRowsPlugin) {
|
|
50
50
|
return true;
|
51
51
|
}
|
52
52
|
rows.length = 0;
|
53
|
-
const
|
54
|
-
const visualStartRow =
|
55
|
-
const visualEndRow =
|
53
|
+
const selectedRangeActive = this.getSelectedRangeActive();
|
54
|
+
const visualStartRow = selectedRangeActive.getTopStartCorner().row;
|
55
|
+
const visualEndRow = selectedRangeActive.getBottomEndCorner().row;
|
56
56
|
const rowIndexMapper = this.rowIndexMapper;
|
57
57
|
const renderableStartRow = rowIndexMapper.getRenderableFromVisualIndex(visualStartRow);
|
58
58
|
const renderableEndRow = rowIndexMapper.getRenderableFromVisualIndex(visualEndRow);
|
package/plugins/index.d.ts
CHANGED
@@ -27,11 +27,14 @@ import { MultiColumnSorting } from './multiColumnSorting';
|
|
27
27
|
import { MultipleSelectionHandles } from './multipleSelectionHandles';
|
28
28
|
import { NestedHeaders } from './nestedHeaders';
|
29
29
|
import { NestedRows } from './nestedRows';
|
30
|
+
import { Pagination } from './pagination';
|
30
31
|
import { PersistentState } from './persistentState';
|
31
32
|
import { Search } from './search';
|
32
33
|
import { StretchColumns } from './stretchColumns';
|
33
34
|
import { TouchScroll } from './touchScroll';
|
34
35
|
import { TrimRows } from './trimRows';
|
36
|
+
import { Dialog } from './dialog';
|
37
|
+
import { Loading } from './loading';
|
35
38
|
import { UndoRedo } from './undoRedo';
|
36
39
|
|
37
40
|
export interface Plugins {
|
@@ -64,11 +67,14 @@ export interface Plugins {
|
|
64
67
|
multipleSelectionHandles: MultipleSelectionHandles;
|
65
68
|
nestedHeaders: NestedHeaders;
|
66
69
|
nestedRows: NestedRows;
|
70
|
+
pagination: Pagination;
|
67
71
|
persistentState: PersistentState;
|
68
72
|
search: Search;
|
69
73
|
stretchColumns: StretchColumns;
|
70
74
|
touchScroll: TouchScroll;
|
71
75
|
trimRows: TrimRows;
|
76
|
+
dialog: Dialog;
|
77
|
+
loading: Loading;
|
72
78
|
undoRedo: UndoRedo;
|
73
79
|
}
|
74
80
|
|
@@ -105,10 +111,13 @@ export {
|
|
105
111
|
MultipleSelectionHandles,
|
106
112
|
NestedHeaders,
|
107
113
|
NestedRows,
|
114
|
+
Pagination,
|
108
115
|
PersistentState,
|
109
116
|
Search,
|
110
117
|
StretchColumns,
|
111
118
|
TouchScroll,
|
112
119
|
TrimRows,
|
120
|
+
Dialog,
|
121
|
+
Loading,
|
113
122
|
UndoRedo
|
114
123
|
};
|
package/plugins/index.js
CHANGED
@@ -60,6 +60,8 @@ var _nestedHeaders = require("./nestedHeaders");
|
|
60
60
|
exports.NestedHeaders = _nestedHeaders.NestedHeaders;
|
61
61
|
var _nestedRows = require("./nestedRows");
|
62
62
|
exports.NestedRows = _nestedRows.NestedRows;
|
63
|
+
var _pagination = require("./pagination");
|
64
|
+
exports.Pagination = _pagination.Pagination;
|
63
65
|
var _persistentState = require("./persistentState");
|
64
66
|
exports.PersistentState = _persistentState.PersistentState;
|
65
67
|
var _search = require("./search");
|
@@ -72,6 +74,10 @@ var _trimRows = require("./trimRows");
|
|
72
74
|
exports.TrimRows = _trimRows.TrimRows;
|
73
75
|
var _undoRedo = require("./undoRedo");
|
74
76
|
exports.UndoRedo = _undoRedo.UndoRedo;
|
77
|
+
var _dialog = require("./dialog");
|
78
|
+
exports.Dialog = _dialog.Dialog;
|
79
|
+
var _loading = require("./loading");
|
80
|
+
exports.Loading = _loading.Loading;
|
75
81
|
var _registry = require("./registry");
|
76
82
|
exports.registerPlugin = _registry.registerPlugin;
|
77
83
|
exports.getPlugin = _registry.getPlugin;
|
@@ -108,10 +114,13 @@ function registerAllPlugins() {
|
|
108
114
|
(0, _registry.registerPlugin)(_multipleSelectionHandles.MultipleSelectionHandles);
|
109
115
|
(0, _registry.registerPlugin)(_nestedHeaders.NestedHeaders);
|
110
116
|
(0, _registry.registerPlugin)(_nestedRows.NestedRows);
|
117
|
+
(0, _registry.registerPlugin)(_pagination.Pagination);
|
111
118
|
(0, _registry.registerPlugin)(_persistentState.PersistentState);
|
112
119
|
(0, _registry.registerPlugin)(_search.Search);
|
113
120
|
(0, _registry.registerPlugin)(_stretchColumns.StretchColumns);
|
114
121
|
(0, _registry.registerPlugin)(_touchScroll.TouchScroll);
|
115
122
|
(0, _registry.registerPlugin)(_trimRows.TrimRows);
|
116
123
|
(0, _registry.registerPlugin)(_undoRedo.UndoRedo);
|
124
|
+
(0, _registry.registerPlugin)(_dialog.Dialog);
|
125
|
+
(0, _registry.registerPlugin)(_loading.Loading);
|
117
126
|
}
|
package/plugins/index.mjs
CHANGED
@@ -27,12 +27,15 @@ import { MultiColumnSorting } from "./multiColumnSorting/index.mjs";
|
|
27
27
|
import { MultipleSelectionHandles } from "./multipleSelectionHandles/index.mjs";
|
28
28
|
import { NestedHeaders } from "./nestedHeaders/index.mjs";
|
29
29
|
import { NestedRows } from "./nestedRows/index.mjs";
|
30
|
+
import { Pagination } from "./pagination/index.mjs";
|
30
31
|
import { PersistentState } from "./persistentState/index.mjs";
|
31
32
|
import { Search } from "./search/index.mjs";
|
32
33
|
import { StretchColumns } from "./stretchColumns/index.mjs";
|
33
34
|
import { TouchScroll } from "./touchScroll/index.mjs";
|
34
35
|
import { TrimRows } from "./trimRows/index.mjs";
|
35
36
|
import { UndoRedo } from "./undoRedo/index.mjs";
|
37
|
+
import { Dialog } from "./dialog/index.mjs";
|
38
|
+
import { Loading } from "./loading/index.mjs";
|
36
39
|
import { registerPlugin } from "./registry.mjs";
|
37
40
|
/**
|
38
41
|
* Registers all available plugins.
|
@@ -66,12 +69,15 @@ export function registerAllPlugins() {
|
|
66
69
|
registerPlugin(MultipleSelectionHandles);
|
67
70
|
registerPlugin(NestedHeaders);
|
68
71
|
registerPlugin(NestedRows);
|
72
|
+
registerPlugin(Pagination);
|
69
73
|
registerPlugin(PersistentState);
|
70
74
|
registerPlugin(Search);
|
71
75
|
registerPlugin(StretchColumns);
|
72
76
|
registerPlugin(TouchScroll);
|
73
77
|
registerPlugin(TrimRows);
|
74
78
|
registerPlugin(UndoRedo);
|
79
|
+
registerPlugin(Dialog);
|
80
|
+
registerPlugin(Loading);
|
75
81
|
}
|
76
|
-
export { AutoColumnSize, Autofill, AutoRowSize, BasePlugin, BindRowsWithHeaders, CollapsibleColumns, ColumnSorting, ColumnSummary, Comments, ContextMenu, CopyPaste, CustomBorders, DragToScroll, DropdownMenu, ExportFile, Filters, Formulas, HiddenColumns, HiddenRows, ManualColumnFreeze, ManualColumnMove, ManualColumnResize, ManualRowMove, ManualRowResize, MergeCells, MultiColumnSorting, MultipleSelectionHandles, NestedHeaders, NestedRows, PersistentState, Search, StretchColumns, TouchScroll, TrimRows, UndoRedo };
|
82
|
+
export { AutoColumnSize, Autofill, AutoRowSize, BasePlugin, BindRowsWithHeaders, CollapsibleColumns, ColumnSorting, ColumnSummary, Comments, ContextMenu, CopyPaste, CustomBorders, DragToScroll, DropdownMenu, ExportFile, Filters, Formulas, HiddenColumns, HiddenRows, ManualColumnFreeze, ManualColumnMove, ManualColumnResize, ManualRowMove, ManualRowResize, MergeCells, MultiColumnSorting, MultipleSelectionHandles, NestedHeaders, NestedRows, Pagination, PersistentState, Search, StretchColumns, TouchScroll, TrimRows, UndoRedo, Dialog, Loading };
|
77
83
|
export { getPlugin, getPluginsNames, registerPlugin } from "./registry.mjs";
|
@@ -0,0 +1,36 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
exports.__esModule = true;
|
4
|
+
exports.loadingContent = loadingContent;
|
5
|
+
var _loading = require("./loading");
|
6
|
+
/* eslint-disable max-len */
|
7
|
+
|
8
|
+
/**
|
9
|
+
* @description
|
10
|
+
* The `loadingContent` function returns a HTML string with the loading content.
|
11
|
+
*
|
12
|
+
* @param {object} options Loading content options.
|
13
|
+
* @param {string} options.id Loading id.
|
14
|
+
* @param {string} options.icon Loading icon.
|
15
|
+
* @param {string} options.title Loading title.
|
16
|
+
* @param {string} options.description Loading description.
|
17
|
+
*
|
18
|
+
* @returns {string} HTML string with the loading content.
|
19
|
+
*/
|
20
|
+
function loadingContent(_ref) {
|
21
|
+
let {
|
22
|
+
id,
|
23
|
+
icon,
|
24
|
+
title,
|
25
|
+
description
|
26
|
+
} = _ref;
|
27
|
+
return `
|
28
|
+
<div class="${_loading.LOADING_CLASS_NAME}__content">
|
29
|
+
<i class="${_loading.LOADING_CLASS_NAME}__icon">${icon}</i>
|
30
|
+
<div class="${_loading.LOADING_CLASS_NAME}__text">
|
31
|
+
<h2 id="${id}-${_loading.PLUGIN_KEY}-title" class="${_loading.LOADING_CLASS_NAME}__title">${title}</h2>
|
32
|
+
${description ? `<p id="${id}-${_loading.PLUGIN_KEY}-description" class="${_loading.LOADING_CLASS_NAME}__description">${description}</p>` : ''}
|
33
|
+
</div>
|
34
|
+
</div>
|
35
|
+
`;
|
36
|
+
}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
/* eslint-disable max-len */
|
2
|
+
import { LOADING_CLASS_NAME, PLUGIN_KEY } from "./loading.mjs";
|
3
|
+
/**
|
4
|
+
* @description
|
5
|
+
* The `loadingContent` function returns a HTML string with the loading content.
|
6
|
+
*
|
7
|
+
* @param {object} options Loading content options.
|
8
|
+
* @param {string} options.id Loading id.
|
9
|
+
* @param {string} options.icon Loading icon.
|
10
|
+
* @param {string} options.title Loading title.
|
11
|
+
* @param {string} options.description Loading description.
|
12
|
+
*
|
13
|
+
* @returns {string} HTML string with the loading content.
|
14
|
+
*/
|
15
|
+
export function loadingContent(_ref) {
|
16
|
+
let {
|
17
|
+
id,
|
18
|
+
icon,
|
19
|
+
title,
|
20
|
+
description
|
21
|
+
} = _ref;
|
22
|
+
return `
|
23
|
+
<div class="${LOADING_CLASS_NAME}__content">
|
24
|
+
<i class="${LOADING_CLASS_NAME}__icon">${icon}</i>
|
25
|
+
<div class="${LOADING_CLASS_NAME}__text">
|
26
|
+
<h2 id="${id}-${PLUGIN_KEY}-title" class="${LOADING_CLASS_NAME}__title">${title}</h2>
|
27
|
+
${description ? `<p id="${id}-${PLUGIN_KEY}-description" class="${LOADING_CLASS_NAME}__description">${description}</p>` : ''}
|
28
|
+
</div>
|
29
|
+
</div>
|
30
|
+
`;
|
31
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './loading';
|
@@ -0,0 +1 @@
|
|
1
|
+
export { PLUGIN_KEY, PLUGIN_PRIORITY, Loading } from "./loading.mjs";
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import Core from '../../core';
|
2
|
+
import { BasePlugin } from '../base';
|
3
|
+
|
4
|
+
export interface LoadingConfig {
|
5
|
+
icon?: string;
|
6
|
+
title?: string;
|
7
|
+
description?: string;
|
8
|
+
}
|
9
|
+
|
10
|
+
export type Settings = boolean | LoadingConfig;
|
11
|
+
|
12
|
+
export class Loading extends BasePlugin {
|
13
|
+
constructor(hotInstance: Core);
|
14
|
+
|
15
|
+
isVisible(): boolean;
|
16
|
+
show(options?: LoadingConfig): void;
|
17
|
+
hide(): void;
|
18
|
+
update(options?: LoadingConfig): void;
|
19
|
+
}
|