handsontable 16.0.1-next-eee5f08-20250710 → 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 +32 -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
@@ -131,7 +131,7 @@ class Overlays {
|
|
131
131
|
return;
|
132
132
|
}
|
133
133
|
_classPrivateFieldSet(_containerDomResizeCount, this, _classPrivateFieldGet(_containerDomResizeCount, this) + 1);
|
134
|
-
if (_classPrivateFieldGet(_containerDomResizeCount, this) ===
|
134
|
+
if (_classPrivateFieldGet(_containerDomResizeCount, this) === 300) {
|
135
135
|
(0, _console.warn)('The ResizeObserver callback was fired too many times in direct succession.' + '\nThis may be due to an infinite loop caused by setting a dynamic height/width (for example, ' + 'with the `dvh` units) to a Handsontable container\'s parent. ' + '\nThe observer will be disconnected.');
|
136
136
|
this.resizeObserver.disconnect();
|
137
137
|
}
|
@@ -368,6 +368,10 @@ class Overlays {
|
|
368
368
|
* @param {boolean} preventDefault If `true`, the `preventDefault` will be called on event object.
|
369
369
|
*/
|
370
370
|
onCloneWheel(event, preventDefault) {
|
371
|
+
// Fix for Windows OS, where the ctrl key is used to zoom the page (issue #dev-2405).
|
372
|
+
if (event.ctrlKey) {
|
373
|
+
return;
|
374
|
+
}
|
371
375
|
const {
|
372
376
|
rootWindow
|
373
377
|
} = this.domBindings;
|
@@ -617,7 +621,13 @@ class Overlays {
|
|
617
621
|
const totalRows = this.wtSettings.getSetting('totalRows');
|
618
622
|
const headerRowSize = wtViewport.getRowHeaderWidth();
|
619
623
|
const headerColumnSize = wtViewport.getColumnHeaderHeight();
|
620
|
-
|
624
|
+
// The internal row height calculator contains a known issue that results in a 1px miscalculation.
|
625
|
+
// Ideally, this should be addressed at the core level. However, resolving it is non-trivial,
|
626
|
+
// as the flaw is embedded across multiple core modules and corresponding test cases.
|
627
|
+
// This limitation does not affect when the the external calculator is used (AutoRowSize), which
|
628
|
+
// computes heights accurately, so no adjustment is required when using it.
|
629
|
+
const hiderHeightComp = this.wtSettings.getSetting('externalRowCalculator') ? 0 : 1;
|
630
|
+
const proposedHiderHeight = headerColumnSize + this.topOverlay.sumCellSizes(0, totalRows) + hiderHeightComp;
|
621
631
|
const proposedHiderWidth = headerRowSize + this.inlineStartOverlay.sumCellSizes(0, totalColumns);
|
622
632
|
const hiderElement = wtTable.hider;
|
623
633
|
const hiderStyle = hiderElement.style;
|
@@ -128,7 +128,7 @@ class Overlays {
|
|
128
128
|
return;
|
129
129
|
}
|
130
130
|
_classPrivateFieldSet(_containerDomResizeCount, this, _classPrivateFieldGet(_containerDomResizeCount, this) + 1);
|
131
|
-
if (_classPrivateFieldGet(_containerDomResizeCount, this) ===
|
131
|
+
if (_classPrivateFieldGet(_containerDomResizeCount, this) === 300) {
|
132
132
|
warn('The ResizeObserver callback was fired too many times in direct succession.' + '\nThis may be due to an infinite loop caused by setting a dynamic height/width (for example, ' + 'with the `dvh` units) to a Handsontable container\'s parent. ' + '\nThe observer will be disconnected.');
|
133
133
|
this.resizeObserver.disconnect();
|
134
134
|
}
|
@@ -365,6 +365,10 @@ class Overlays {
|
|
365
365
|
* @param {boolean} preventDefault If `true`, the `preventDefault` will be called on event object.
|
366
366
|
*/
|
367
367
|
onCloneWheel(event, preventDefault) {
|
368
|
+
// Fix for Windows OS, where the ctrl key is used to zoom the page (issue #dev-2405).
|
369
|
+
if (event.ctrlKey) {
|
370
|
+
return;
|
371
|
+
}
|
368
372
|
const {
|
369
373
|
rootWindow
|
370
374
|
} = this.domBindings;
|
@@ -614,7 +618,13 @@ class Overlays {
|
|
614
618
|
const totalRows = this.wtSettings.getSetting('totalRows');
|
615
619
|
const headerRowSize = wtViewport.getRowHeaderWidth();
|
616
620
|
const headerColumnSize = wtViewport.getColumnHeaderHeight();
|
617
|
-
|
621
|
+
// The internal row height calculator contains a known issue that results in a 1px miscalculation.
|
622
|
+
// Ideally, this should be addressed at the core level. However, resolving it is non-trivial,
|
623
|
+
// as the flaw is embedded across multiple core modules and corresponding test cases.
|
624
|
+
// This limitation does not affect when the the external calculator is used (AutoRowSize), which
|
625
|
+
// computes heights accurately, so no adjustment is required when using it.
|
626
|
+
const hiderHeightComp = this.wtSettings.getSetting('externalRowCalculator') ? 0 : 1;
|
627
|
+
const proposedHiderHeight = headerColumnSize + this.topOverlay.sumCellSizes(0, totalRows) + hiderHeightComp;
|
618
628
|
const proposedHiderWidth = headerRowSize + this.inlineStartOverlay.sumCellSizes(0, totalColumns);
|
619
629
|
const hiderElement = wtTable.hider;
|
620
630
|
const hiderStyle = hiderElement.style;
|
@@ -151,15 +151,11 @@ class Viewport {
|
|
151
151
|
return documentElement.scrollWidth > documentElement.clientWidth;
|
152
152
|
}
|
153
153
|
const {
|
154
|
-
holder,
|
155
154
|
hider
|
156
155
|
} = this.wtTable;
|
157
|
-
const holderWidth = holder.clientWidth;
|
158
156
|
const hiderOffsetWidth = hider.offsetWidth;
|
159
|
-
|
160
|
-
|
161
|
-
}
|
162
|
-
return hiderOffsetWidth > this.getWorkspaceWidth();
|
157
|
+
const scrollbarWidth = this.hasVerticalScroll() ? (0, _element.getScrollbarWidth)() : 0;
|
158
|
+
return hiderOffsetWidth > this.getWorkspaceWidth() - scrollbarWidth;
|
163
159
|
}
|
164
160
|
|
165
161
|
/**
|
@@ -148,15 +148,11 @@ class Viewport {
|
|
148
148
|
return documentElement.scrollWidth > documentElement.clientWidth;
|
149
149
|
}
|
150
150
|
const {
|
151
|
-
holder,
|
152
151
|
hider
|
153
152
|
} = this.wtTable;
|
154
|
-
const holderWidth = holder.clientWidth;
|
155
153
|
const hiderOffsetWidth = hider.offsetWidth;
|
156
|
-
|
157
|
-
|
158
|
-
}
|
159
|
-
return hiderOffsetWidth > this.getWorkspaceWidth();
|
154
|
+
const scrollbarWidth = this.hasVerticalScroll() ? getScrollbarWidth() : 0;
|
155
|
+
return hiderOffsetWidth > this.getWorkspaceWidth() - scrollbarWidth;
|
160
156
|
}
|
161
157
|
|
162
158
|
/**
|
package/CHANGELOG.md
CHANGED
@@ -9,6 +9,38 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
9
9
|
|
10
10
|
<!-- UNVERSIONED -->
|
11
11
|
|
12
|
+
## [16.1.0] - 2025-09-11
|
13
|
+
|
14
|
+
### Added
|
15
|
+
- Add row pagination functionality [#11612](https://github.com/handsontable/handsontable/pull/11612)
|
16
|
+
- Added Dialog Plugin: Core Modal System [#11754](https://github.com/handsontable/handsontable/pull/11754)
|
17
|
+
- Implemented the `key`/`value` feature for the Autocomplete and Dropdown editors and the new `valueGetter` and `valueSetter` options. [#11773](https://github.com/handsontable/handsontable/pull/11773)
|
18
|
+
- Add support for a new `initialState` option [#11777](https://github.com/handsontable/handsontable/pull/11777)
|
19
|
+
- Added Dialog Loading Plugin [#11792](https://github.com/handsontable/handsontable/pull/11792)
|
20
|
+
|
21
|
+
### Changed
|
22
|
+
- Allow focus navigation between multiple selection layers [#11756](https://github.com/handsontable/handsontable/pull/11756)
|
23
|
+
- Change the input name of the internal focus catcher element [#11770](https://github.com/handsontable/handsontable/pull/11770)
|
24
|
+
- Added background color to holder element (`wtHolder`) [#11797](https://github.com/handsontable/handsontable/pull/11797)
|
25
|
+
|
26
|
+
### Fixed
|
27
|
+
- Fixed undo/redo actions with cell types other than `text` [#11656](https://github.com/handsontable/handsontable/pull/11656)
|
28
|
+
- Fixed an issue with incorrect row and column resizing that occurs when the user double-clicks a column or row separator to auto-size it and then moves the mouse [#11671](https://github.com/handsontable/handsontable/pull/11671)
|
29
|
+
- Fixed an issue with mouse wheel zooming on Windows [#11680](https://github.com/handsontable/handsontable/pull/11680)
|
30
|
+
- Fixed an issue with autocomplete sorting and options highlighting [#11708](https://github.com/handsontable/handsontable/pull/11708)
|
31
|
+
- Fix missing touchend entry handler that prevents editor to open on mobile devices [#11729](https://github.com/handsontable/handsontable/pull/11729)
|
32
|
+
- Fixed an issue with rows being misaligned with row headers when using `autoRowSize`. [#11736](https://github.com/handsontable/handsontable/pull/11736)
|
33
|
+
- Fixed an issues with visual layout inconsistencies with browser zoom and scaling [#11739](https://github.com/handsontable/handsontable/pull/11739)
|
34
|
+
- Fixed an issue with root-wrapper height [#11769](https://github.com/handsontable/handsontable/pull/11769)
|
35
|
+
- Fixed TypeError after undo opertation for nested rows data structure [#11793](https://github.com/handsontable/handsontable/pull/11793)
|
36
|
+
- Fixed `rowHeights` option for merged cells [#11795](https://github.com/handsontable/handsontable/pull/11795)
|
37
|
+
- Fixed themes visaul issues [#11805](https://github.com/handsontable/handsontable/pull/11805)
|
38
|
+
- Fixed table misalignment when new data is loaded [#11809](https://github.com/handsontable/handsontable/pull/11809)
|
39
|
+
- Angular: Fixed treeshaking mechanism (modularization) for angular-wrapper [#11738](https://github.com/handsontable/handsontable/pull/11738)
|
40
|
+
|
41
|
+
### Security
|
42
|
+
- Fixed the `critical` security vulnerabilities reported by `pnpm audit`. [#11798](https://github.com/handsontable/handsontable/pull/11798)
|
43
|
+
|
12
44
|
## [16.0.1] - 2025-07-10
|
13
45
|
|
14
46
|
### Fixed
|
package/base.js
CHANGED
@@ -45,8 +45,8 @@ Handsontable.hooks = _hooks.Hooks.getSingleton();
|
|
45
45
|
Handsontable.CellCoords = _src.CellCoords;
|
46
46
|
Handsontable.CellRange = _src.CellRange;
|
47
47
|
Handsontable.packageName = 'handsontable';
|
48
|
-
Handsontable.buildDate = "
|
49
|
-
Handsontable.version = "16.0
|
48
|
+
Handsontable.buildDate = "04/09/2025 07:50:37";
|
49
|
+
Handsontable.version = "16.1.0-next-abd8f2e-20250904";
|
50
50
|
Handsontable.languages = {
|
51
51
|
dictionaryKeys: _registry.dictionaryKeys,
|
52
52
|
getLanguageDictionary: _registry.getLanguageDictionary,
|
package/base.mjs
CHANGED
@@ -35,8 +35,8 @@ Handsontable.hooks = Hooks.getSingleton();
|
|
35
35
|
Handsontable.CellCoords = CellCoords;
|
36
36
|
Handsontable.CellRange = CellRange;
|
37
37
|
Handsontable.packageName = 'handsontable';
|
38
|
-
Handsontable.buildDate = "
|
39
|
-
Handsontable.version = "16.0
|
38
|
+
Handsontable.buildDate = "04/09/2025 07:50:42";
|
39
|
+
Handsontable.version = "16.1.0-next-abd8f2e-20250904";
|
40
40
|
Handsontable.languages = {
|
41
41
|
dictionaryKeys,
|
42
42
|
getLanguageDictionary,
|
@@ -0,0 +1,14 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
exports.__esModule = true;
|
4
|
+
exports.valueGetter = valueGetter;
|
5
|
+
var _object = require("../../../helpers/object");
|
6
|
+
/**
|
7
|
+
* Defines the value being displayed in an autocomplete-typed cells.
|
8
|
+
*
|
9
|
+
* @param {*} value The value to be displayed.
|
10
|
+
* @returns {*} The final value of the cell.
|
11
|
+
*/
|
12
|
+
function valueGetter(value) {
|
13
|
+
return (0, _object.isObject)(value) && value.value !== undefined ? value.value : value;
|
14
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { isObject } from "../../../helpers/object.mjs";
|
2
|
+
/**
|
3
|
+
* Defines the value being displayed in an autocomplete-typed cells.
|
4
|
+
*
|
5
|
+
* @param {*} value The value to be displayed.
|
6
|
+
* @returns {*} The final value of the cell.
|
7
|
+
*/
|
8
|
+
export function valueGetter(value) {
|
9
|
+
return isObject(value) && value.value !== undefined ? value.value : value;
|
10
|
+
}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
exports.__esModule = true;
|
4
|
+
exports.valueSetter = valueSetter;
|
5
|
+
var _object = require("../../../helpers/object");
|
6
|
+
var _mixed = require("../../../helpers/mixed");
|
7
|
+
/**
|
8
|
+
* Defines what value is set to an autocomplete-typed cell.
|
9
|
+
*
|
10
|
+
* @param {*} newValue The value to be set.
|
11
|
+
* @param {number} row The visual row index.
|
12
|
+
* @param {number} column The visual column index.
|
13
|
+
* @returns {*} The new value to be set.
|
14
|
+
*/
|
15
|
+
function valueSetter(newValue, row, column) {
|
16
|
+
const sourceDataAtCell = this.getSourceDataAtCell(this.toPhysicalRow(row), this.toPhysicalColumn(column));
|
17
|
+
const isKeyValueObject = obj => (0, _object.isObject)(obj) && (0, _mixed.isDefined)(obj.key) && (0, _mixed.isDefined)(obj.value);
|
18
|
+
if (isKeyValueObject(sourceDataAtCell)) {
|
19
|
+
return isKeyValueObject(newValue) ? newValue : {
|
20
|
+
key: newValue,
|
21
|
+
value: newValue
|
22
|
+
};
|
23
|
+
}
|
24
|
+
return newValue;
|
25
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import { isObject } from "../../../helpers/object.mjs";
|
2
|
+
import { isDefined } from "../../../helpers/mixed.mjs";
|
3
|
+
/**
|
4
|
+
* Defines what value is set to an autocomplete-typed cell.
|
5
|
+
*
|
6
|
+
* @param {*} newValue The value to be set.
|
7
|
+
* @param {number} row The visual row index.
|
8
|
+
* @param {number} column The visual column index.
|
9
|
+
* @returns {*} The new value to be set.
|
10
|
+
*/
|
11
|
+
export function valueSetter(newValue, row, column) {
|
12
|
+
const sourceDataAtCell = this.getSourceDataAtCell(this.toPhysicalRow(row), this.toPhysicalColumn(column));
|
13
|
+
const isKeyValueObject = obj => isObject(obj) && isDefined(obj.key) && isDefined(obj.value);
|
14
|
+
if (isKeyValueObject(sourceDataAtCell)) {
|
15
|
+
return isKeyValueObject(newValue) ? newValue : {
|
16
|
+
key: newValue,
|
17
|
+
value: newValue
|
18
|
+
};
|
19
|
+
}
|
20
|
+
return newValue;
|
21
|
+
}
|
@@ -4,10 +4,13 @@ exports.__esModule = true;
|
|
4
4
|
var _autocompleteEditor = require("../../editors/autocompleteEditor");
|
5
5
|
var _autocompleteRenderer = require("../../renderers/autocompleteRenderer");
|
6
6
|
var _autocompleteValidator = require("../../validators/autocompleteValidator");
|
7
|
+
var _accessors = require("./accessors");
|
7
8
|
const CELL_TYPE = exports.CELL_TYPE = 'autocomplete';
|
8
9
|
const AutocompleteCellType = exports.AutocompleteCellType = {
|
9
10
|
CELL_TYPE,
|
10
11
|
editor: _autocompleteEditor.AutocompleteEditor,
|
11
12
|
renderer: _autocompleteRenderer.autocompleteRenderer,
|
12
|
-
validator: _autocompleteValidator.autocompleteValidator
|
13
|
+
validator: _autocompleteValidator.autocompleteValidator,
|
14
|
+
valueGetter: _accessors.valueGetter,
|
15
|
+
valueSetter: _accessors.valueSetter
|
13
16
|
};
|
@@ -1,10 +1,13 @@
|
|
1
1
|
import { AutocompleteEditor } from "../../editors/autocompleteEditor/index.mjs";
|
2
2
|
import { autocompleteRenderer } from "../../renderers/autocompleteRenderer/index.mjs";
|
3
3
|
import { autocompleteValidator } from "../../validators/autocompleteValidator/index.mjs";
|
4
|
+
import { valueGetter, valueSetter } from "./accessors/index.mjs";
|
4
5
|
export const CELL_TYPE = 'autocomplete';
|
5
6
|
export const AutocompleteCellType = {
|
6
7
|
CELL_TYPE,
|
7
8
|
editor: AutocompleteEditor,
|
8
9
|
renderer: autocompleteRenderer,
|
9
|
-
validator: autocompleteValidator
|
10
|
+
validator: autocompleteValidator,
|
11
|
+
valueGetter,
|
12
|
+
valueSetter
|
10
13
|
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export { valueSetter } from "./valueSetter.mjs";
|
@@ -0,0 +1,26 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
exports.__esModule = true;
|
4
|
+
exports.valueSetter = valueSetter;
|
5
|
+
var _mixed = require("../../../helpers/mixed");
|
6
|
+
/**
|
7
|
+
* Defines what value is set to a checkbox-typed cell.
|
8
|
+
*
|
9
|
+
* @param {*} newValue The value to be set.
|
10
|
+
* @param {number} row The row index.
|
11
|
+
* @param {number} column The column index.
|
12
|
+
* @returns {*} The new value to be set.
|
13
|
+
*/
|
14
|
+
function valueSetter(newValue, row, column) {
|
15
|
+
const {
|
16
|
+
checkedTemplate,
|
17
|
+
uncheckedTemplate
|
18
|
+
} = this.getCellMeta(row, column);
|
19
|
+
const stringifiedValue = (0, _mixed.stringify)(newValue);
|
20
|
+
const isChecked = stringifiedValue === (0, _mixed.stringify)(checkedTemplate);
|
21
|
+
const isUnchecked = stringifiedValue === (0, _mixed.stringify)(uncheckedTemplate);
|
22
|
+
if (isChecked || isUnchecked) {
|
23
|
+
return isChecked ? checkedTemplate : uncheckedTemplate;
|
24
|
+
}
|
25
|
+
return newValue;
|
26
|
+
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { stringify } from "../../../helpers/mixed.mjs";
|
2
|
+
/**
|
3
|
+
* Defines what value is set to a checkbox-typed cell.
|
4
|
+
*
|
5
|
+
* @param {*} newValue The value to be set.
|
6
|
+
* @param {number} row The row index.
|
7
|
+
* @param {number} column The column index.
|
8
|
+
* @returns {*} The new value to be set.
|
9
|
+
*/
|
10
|
+
export function valueSetter(newValue, row, column) {
|
11
|
+
const {
|
12
|
+
checkedTemplate,
|
13
|
+
uncheckedTemplate
|
14
|
+
} = this.getCellMeta(row, column);
|
15
|
+
const stringifiedValue = stringify(newValue);
|
16
|
+
const isChecked = stringifiedValue === stringify(checkedTemplate);
|
17
|
+
const isUnchecked = stringifiedValue === stringify(uncheckedTemplate);
|
18
|
+
if (isChecked || isUnchecked) {
|
19
|
+
return isChecked ? checkedTemplate : uncheckedTemplate;
|
20
|
+
}
|
21
|
+
return newValue;
|
22
|
+
}
|
@@ -3,9 +3,11 @@
|
|
3
3
|
exports.__esModule = true;
|
4
4
|
var _checkboxEditor = require("../../editors/checkboxEditor");
|
5
5
|
var _checkboxRenderer = require("../../renderers/checkboxRenderer");
|
6
|
+
var _accessors = require("./accessors");
|
6
7
|
const CELL_TYPE = exports.CELL_TYPE = 'checkbox';
|
7
8
|
const CheckboxCellType = exports.CheckboxCellType = {
|
8
9
|
CELL_TYPE,
|
9
10
|
editor: _checkboxEditor.CheckboxEditor,
|
10
|
-
renderer: _checkboxRenderer.checkboxRenderer
|
11
|
+
renderer: _checkboxRenderer.checkboxRenderer,
|
12
|
+
valueSetter: _accessors.valueSetter
|
11
13
|
};
|
@@ -1,8 +1,10 @@
|
|
1
1
|
import { CheckboxEditor } from "../../editors/checkboxEditor/index.mjs";
|
2
2
|
import { checkboxRenderer } from "../../renderers/checkboxRenderer/index.mjs";
|
3
|
+
import { valueSetter } from "./accessors/index.mjs";
|
3
4
|
export const CELL_TYPE = 'checkbox';
|
4
5
|
export const CheckboxCellType = {
|
5
6
|
CELL_TYPE,
|
6
7
|
editor: CheckboxEditor,
|
7
|
-
renderer: checkboxRenderer
|
8
|
+
renderer: checkboxRenderer,
|
9
|
+
valueSetter
|
8
10
|
};
|
@@ -0,0 +1,14 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
exports.__esModule = true;
|
4
|
+
exports.valueGetter = valueGetter;
|
5
|
+
var _accessors = require("../../autocompleteType/accessors");
|
6
|
+
/**
|
7
|
+
* Defines the value being displayed in an dropdown-typed cells.
|
8
|
+
*
|
9
|
+
* @param {*} value The value to be displayed.
|
10
|
+
* @returns {*} The final value of the cell.
|
11
|
+
*/
|
12
|
+
function valueGetter(value) {
|
13
|
+
return _accessors.valueGetter.call(this, value);
|
14
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { valueGetter as autocompleteValueGetter } from "../../autocompleteType/accessors/index.mjs";
|
2
|
+
/**
|
3
|
+
* Defines the value being displayed in an dropdown-typed cells.
|
4
|
+
*
|
5
|
+
* @param {*} value The value to be displayed.
|
6
|
+
* @returns {*} The final value of the cell.
|
7
|
+
*/
|
8
|
+
export function valueGetter(value) {
|
9
|
+
return autocompleteValueGetter.call(this, value);
|
10
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
exports.__esModule = true;
|
4
|
+
exports.valueSetter = valueSetter;
|
5
|
+
var _accessors = require("../../autocompleteType/accessors");
|
6
|
+
/**
|
7
|
+
* Defines what value is set to an dropdown-typed cell.
|
8
|
+
*
|
9
|
+
* @param {*} newValue The value to be set.
|
10
|
+
* @param {number} row The row index.
|
11
|
+
* @param {number} column The column index.
|
12
|
+
* @param {object} cellMeta The cell meta object.
|
13
|
+
* @returns {*} The new value to be set.
|
14
|
+
*/
|
15
|
+
function valueSetter(newValue, row, column, cellMeta) {
|
16
|
+
return _accessors.valueSetter.call(this, newValue, row, column, cellMeta);
|
17
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { valueSetter as autocompleteValueSetter } from "../../autocompleteType/accessors/index.mjs";
|
2
|
+
/**
|
3
|
+
* Defines what value is set to an dropdown-typed cell.
|
4
|
+
*
|
5
|
+
* @param {*} newValue The value to be set.
|
6
|
+
* @param {number} row The row index.
|
7
|
+
* @param {number} column The column index.
|
8
|
+
* @param {object} cellMeta The cell meta object.
|
9
|
+
* @returns {*} The new value to be set.
|
10
|
+
*/
|
11
|
+
export function valueSetter(newValue, row, column, cellMeta) {
|
12
|
+
return autocompleteValueSetter.call(this, newValue, row, column, cellMeta);
|
13
|
+
}
|
@@ -4,6 +4,7 @@ exports.__esModule = true;
|
|
4
4
|
var _dropdownEditor = require("../../editors/dropdownEditor");
|
5
5
|
var _dropdownRenderer = require("../../renderers/dropdownRenderer");
|
6
6
|
var _dropdownValidator = require("../../validators/dropdownValidator");
|
7
|
+
var _accessors = require("./accessors");
|
7
8
|
const CELL_TYPE = exports.CELL_TYPE = 'dropdown';
|
8
9
|
const DropdownCellType = exports.DropdownCellType = {
|
9
10
|
CELL_TYPE,
|
@@ -12,5 +13,7 @@ const DropdownCellType = exports.DropdownCellType = {
|
|
12
13
|
// displays small gray arrow on right side of the cell
|
13
14
|
validator: _dropdownValidator.dropdownValidator,
|
14
15
|
filter: false,
|
15
|
-
strict: true
|
16
|
+
strict: true,
|
17
|
+
valueGetter: _accessors.valueGetter,
|
18
|
+
valueSetter: _accessors.valueSetter
|
16
19
|
};
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { DropdownEditor } from "../../editors/dropdownEditor/index.mjs";
|
2
2
|
import { dropdownRenderer } from "../../renderers/dropdownRenderer/index.mjs";
|
3
3
|
import { dropdownValidator } from "../../validators/dropdownValidator/index.mjs";
|
4
|
+
import { valueGetter, valueSetter } from "./accessors/index.mjs";
|
4
5
|
export const CELL_TYPE = 'dropdown';
|
5
6
|
export const DropdownCellType = {
|
6
7
|
CELL_TYPE,
|
@@ -9,5 +10,7 @@ export const DropdownCellType = {
|
|
9
10
|
// displays small gray arrow on right side of the cell
|
10
11
|
validator: dropdownValidator,
|
11
12
|
filter: false,
|
12
|
-
strict: true
|
13
|
+
strict: true,
|
14
|
+
valueGetter,
|
15
|
+
valueSetter
|
13
16
|
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export { valueSetter } from "./valueSetter.mjs";
|
@@ -0,0 +1,19 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
exports.__esModule = true;
|
4
|
+
exports.valueSetter = valueSetter;
|
5
|
+
var _number = require("../../../helpers/number");
|
6
|
+
var _utils = require("../../../dataMap/metaManager/utils");
|
7
|
+
/**
|
8
|
+
* Defines what value is set to a numeric-typed cell.
|
9
|
+
*
|
10
|
+
* @param {*} newValue The value to be set.
|
11
|
+
* @returns {*} The new value to be set.
|
12
|
+
*/
|
13
|
+
function valueSetter(newValue) {
|
14
|
+
if (typeof newValue === 'string' && (0, _number.isNumericLike)(newValue)) {
|
15
|
+
const parsedNumber = (0, _number.getParsedNumber)(newValue);
|
16
|
+
return (0, _utils.isNullish)(parsedNumber) ? newValue : parsedNumber;
|
17
|
+
}
|
18
|
+
return newValue;
|
19
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { isNumericLike, getParsedNumber } from "../../../helpers/number.mjs";
|
2
|
+
import { isNullish } from "../../../dataMap/metaManager/utils.mjs";
|
3
|
+
/**
|
4
|
+
* Defines what value is set to a numeric-typed cell.
|
5
|
+
*
|
6
|
+
* @param {*} newValue The value to be set.
|
7
|
+
* @returns {*} The new value to be set.
|
8
|
+
*/
|
9
|
+
export function valueSetter(newValue) {
|
10
|
+
if (typeof newValue === 'string' && isNumericLike(newValue)) {
|
11
|
+
const parsedNumber = getParsedNumber(newValue);
|
12
|
+
return isNullish(parsedNumber) ? newValue : parsedNumber;
|
13
|
+
}
|
14
|
+
return newValue;
|
15
|
+
}
|
@@ -4,11 +4,13 @@ exports.__esModule = true;
|
|
4
4
|
var _numericEditor = require("../../editors/numericEditor");
|
5
5
|
var _numericRenderer = require("../../renderers/numericRenderer");
|
6
6
|
var _numericValidator = require("../../validators/numericValidator");
|
7
|
+
var _accessors = require("./accessors");
|
7
8
|
const CELL_TYPE = exports.CELL_TYPE = 'numeric';
|
8
9
|
const NumericCellType = exports.NumericCellType = {
|
9
10
|
CELL_TYPE,
|
10
11
|
editor: _numericEditor.NumericEditor,
|
11
12
|
renderer: _numericRenderer.numericRenderer,
|
12
13
|
validator: _numericValidator.numericValidator,
|
13
|
-
dataType: 'number'
|
14
|
+
dataType: 'number',
|
15
|
+
valueSetter: _accessors.valueSetter
|
14
16
|
};
|
@@ -1,11 +1,13 @@
|
|
1
1
|
import { NumericEditor } from "../../editors/numericEditor/index.mjs";
|
2
2
|
import { numericRenderer } from "../../renderers/numericRenderer/index.mjs";
|
3
3
|
import { numericValidator } from "../../validators/numericValidator/index.mjs";
|
4
|
+
import { valueSetter } from "./accessors/index.mjs";
|
4
5
|
export const CELL_TYPE = 'numeric';
|
5
6
|
export const NumericCellType = {
|
6
7
|
CELL_TYPE,
|
7
8
|
editor: NumericEditor,
|
8
9
|
renderer: numericRenderer,
|
9
10
|
validator: numericValidator,
|
10
|
-
dataType: 'number'
|
11
|
+
dataType: 'number',
|
12
|
+
valueSetter
|
11
13
|
};
|