nmrium 2.2.0 → 2.4.0
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/lib/component/1d/PredictionErrorsNotations.js +3 -3
- package/lib/component/1d/PredictionErrorsNotations.js.map +1 -1
- package/lib/component/1d/peaks/PeakEditionManager.d.ts +1 -1
- package/lib/component/1d/peaks/Peaks.d.ts.map +1 -1
- package/lib/component/1d/peaks/Peaks.js +2 -1
- package/lib/component/1d/peaks/Peaks.js.map +1 -1
- package/lib/component/1d/peaks/usePeakShapesPath.d.ts.map +1 -1
- package/lib/component/1d/peaks/usePeakShapesPath.js.map +1 -1
- package/lib/component/1d/ranges/AssignmentLabel.js +1 -1
- package/lib/component/1d/ranges/AssignmentLabel.js.map +1 -1
- package/lib/component/1d/ranges/FloatingRangeTablePreferencesModal.d.ts +9 -0
- package/lib/component/1d/ranges/FloatingRangeTablePreferencesModal.d.ts.map +1 -0
- package/lib/component/1d/ranges/FloatingRangeTablePreferencesModal.js +138 -0
- package/lib/component/1d/ranges/FloatingRangeTablePreferencesModal.js.map +1 -0
- package/lib/component/1d/ranges/FloatingRanges.d.ts.map +1 -0
- package/lib/component/1d/ranges/FloatingRanges.js +362 -0
- package/lib/component/1d/ranges/FloatingRanges.js.map +1 -0
- package/lib/component/1d/ranges/Ranges.js +2 -2
- package/lib/component/1d/ranges/Ranges.js.map +1 -1
- package/lib/component/1d-2d/FieldEdition.d.ts +2 -2
- package/lib/component/1d-2d/FieldEdition.d.ts.map +1 -1
- package/lib/component/1d-2d/FieldEdition.js +2 -2
- package/lib/component/1d-2d/FieldEdition.js.map +1 -1
- package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.js +7 -7
- package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.js.map +1 -1
- package/lib/component/1d-2d/tools/BrushXY.js +6 -6
- package/lib/component/1d-2d/tools/BrushXY.js.map +1 -1
- package/lib/component/2d/1d-tracer/Left1DChart.d.ts.map +1 -1
- package/lib/component/2d/1d-tracer/Left1DChart.js +6 -2
- package/lib/component/2d/1d-tracer/Left1DChart.js.map +1 -1
- package/lib/component/2d/1d-tracer/Ranges1D.d.ts +9 -0
- package/lib/component/2d/1d-tracer/Ranges1D.d.ts.map +1 -0
- package/lib/component/2d/1d-tracer/Ranges1D.js +76 -0
- package/lib/component/2d/1d-tracer/Ranges1D.js.map +1 -0
- package/lib/component/2d/1d-tracer/Signals1D.d.ts +11 -0
- package/lib/component/2d/1d-tracer/Signals1D.d.ts.map +1 -0
- package/lib/component/2d/1d-tracer/Signals1D.js +90 -0
- package/lib/component/2d/1d-tracer/Signals1D.js.map +1 -0
- package/lib/component/2d/1d-tracer/Top1DChart.d.ts.map +1 -1
- package/lib/component/2d/1d-tracer/Top1DChart.js +6 -2
- package/lib/component/2d/1d-tracer/Top1DChart.js.map +1 -1
- package/lib/component/2d/ft/FTContainer.d.ts.map +1 -1
- package/lib/component/2d/ft/FTContainer.js.map +1 -1
- package/lib/component/2d/zones/SignalsGuideLines.js +1 -1
- package/lib/component/2d/zones/SignalsGuideLines.js.map +1 -1
- package/lib/component/2d/zones/ZonesAssignmentsLabels.js +1 -1
- package/lib/component/2d/zones/ZonesAssignmentsLabels.js.map +1 -1
- package/lib/component/AnchorSVG.d.ts +37 -0
- package/lib/component/AnchorSVG.d.ts.map +1 -0
- package/lib/component/AnchorSVG.js +137 -0
- package/lib/component/AnchorSVG.js.map +1 -0
- package/lib/component/EventsTrackers/BrushTracker.d.ts.map +1 -1
- package/lib/component/EventsTrackers/BrushTracker.js +4 -0
- package/lib/component/EventsTrackers/BrushTracker.js.map +1 -1
- package/lib/component/SVGTable.d.ts +5 -3
- package/lib/component/SVGTable.d.ts.map +1 -1
- package/lib/component/SVGTable.js +16 -16
- package/lib/component/SVGTable.js.map +1 -1
- package/lib/component/context/KeyModifierContext.d.ts +1 -0
- package/lib/component/context/KeyModifierContext.d.ts.map +1 -1
- package/lib/component/context/KeyModifierContext.js +4 -0
- package/lib/component/context/KeyModifierContext.js.map +1 -1
- package/lib/component/context/LoggerContext.d.ts.map +1 -1
- package/lib/component/context/LoggerContext.js.map +1 -1
- package/lib/component/context/SortSpectraContext.d.ts.map +1 -1
- package/lib/component/context/SortSpectraContext.js.map +1 -1
- package/lib/component/elements/ActionsButtonsPopover.d.ts +2 -2
- package/lib/component/elements/ActionsButtonsPopover.d.ts.map +1 -1
- package/lib/component/elements/ActionsButtonsPopover.js +6 -9
- package/lib/component/elements/ActionsButtonsPopover.js.map +1 -1
- package/lib/component/elements/Button.d.ts.map +1 -1
- package/lib/component/elements/Button.js.map +1 -1
- package/lib/component/elements/DraggableDialog.d.ts.map +1 -1
- package/lib/component/elements/DraggableDialog.js +1 -2
- package/lib/component/elements/DraggableDialog.js.map +1 -1
- package/lib/component/elements/Sections.d.ts +3 -3
- package/lib/component/elements/Sections.d.ts.map +1 -1
- package/lib/component/elements/Sections.js +1 -1
- package/lib/component/elements/Sections.js.map +1 -1
- package/lib/component/elements/TabTitle.d.ts.map +1 -1
- package/lib/component/elements/TabTitle.js +2 -2
- package/lib/component/elements/TabTitle.js.map +1 -1
- package/lib/component/elements/ToolbarPopoverItem.d.ts +1 -0
- package/lib/component/elements/ToolbarPopoverItem.d.ts.map +1 -1
- package/lib/component/elements/ToolbarPopoverItem.js +10 -3
- package/lib/component/elements/ToolbarPopoverItem.js.map +1 -1
- package/lib/component/elements/dropDownButton/DropDownButton.d.ts.map +1 -1
- package/lib/component/elements/dropDownButton/DropDownButton.js +2 -2
- package/lib/component/elements/dropDownButton/DropDownButton.js.map +1 -1
- package/lib/component/elements/export/ExportOptionsModal.d.ts +1 -1
- package/lib/component/elements/export/ExportOptionsModal.d.ts.map +1 -1
- package/lib/component/elements/export/ExportOptionsModal.js +28 -110
- package/lib/component/elements/export/ExportOptionsModal.js.map +1 -1
- package/lib/component/elements/export/units.d.ts +0 -28
- package/lib/component/elements/export/units.d.ts.map +1 -1
- package/lib/component/elements/export/units.js +0 -5
- package/lib/component/elements/export/units.js.map +1 -1
- package/lib/component/elements/export/utilities/getExportOptions.d.ts.map +1 -1
- package/lib/component/elements/export/utilities/getExportOptions.js.map +1 -1
- package/lib/component/elements/print/pageSize.d.ts +1 -1
- package/lib/component/elements/print/pageSize.d.ts.map +1 -1
- package/lib/component/header/Header.d.ts.map +1 -1
- package/lib/component/header/Header.js +2 -4
- package/lib/component/header/Header.js.map +1 -1
- package/lib/component/hooks/useExport.d.ts.map +1 -1
- package/lib/component/hooks/useExport.js.map +1 -1
- package/lib/component/hooks/usePanelPreferences.d.ts +3 -3
- package/lib/component/hooks/usePanelPreferences.d.ts.map +1 -1
- package/lib/component/hooks/useSaveSettings.d.ts.map +1 -1
- package/lib/component/hooks/useSaveSettings.js +3 -6
- package/lib/component/hooks/useSaveSettings.js.map +1 -1
- package/lib/component/hooks/useTextMetrics.d.ts.map +1 -1
- package/lib/component/hooks/useTextMetrics.js +1 -0
- package/lib/component/hooks/useTextMetrics.js.map +1 -1
- package/lib/component/main/NMRiumViewer.js +1 -1
- package/lib/component/main/NMRiumViewer.js.map +1 -1
- package/lib/component/modal/EditPeakShapeModal.js +2 -2
- package/lib/component/modal/EditPeakShapeModal.js.map +1 -1
- package/lib/component/modal/PublicationStringModal.d.ts.map +1 -1
- package/lib/component/modal/PublicationStringModal.js +2 -6
- package/lib/component/modal/PublicationStringModal.js.map +1 -1
- package/lib/component/modal/SaveAsModal.d.ts +2 -2
- package/lib/component/modal/SaveAsModal.d.ts.map +1 -1
- package/lib/component/modal/SaveAsModal.js +40 -35
- package/lib/component/modal/SaveAsModal.js.map +1 -1
- package/lib/component/modal/aboutUs/AboutUsModal.d.ts.map +1 -1
- package/lib/component/modal/aboutUs/AboutUsModal.js +2 -4
- package/lib/component/modal/aboutUs/AboutUsModal.js.map +1 -1
- package/lib/component/modal/editRange/EditRangeModal.js +4 -3
- package/lib/component/modal/editRange/EditRangeModal.js.map +1 -1
- package/lib/component/modal/editRange/forms/components/NewSignalTab.d.ts.map +1 -1
- package/lib/component/modal/editRange/forms/components/NewSignalTab.js +39 -37
- package/lib/component/modal/editRange/forms/components/NewSignalTab.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/errors/context.d.ts +29 -29
- package/lib/component/modal/setting/tanstack_general_settings/errors/context.js +3 -3
- package/lib/component/modal/setting/tanstack_general_settings/errors/context.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/errors/renderer.d.ts +29 -29
- package/lib/component/modal/setting/tanstack_general_settings/errors/renderer.js +2 -2
- package/lib/component/modal/setting/tanstack_general_settings/errors/renderer.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/general_settings.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/general_settings.js +9 -12
- package/lib/component/modal/setting/tanstack_general_settings/general_settings.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.d.ts +29 -29
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.js +2 -2
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_footer.d.ts +24 -24
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.d.ts +29 -29
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.js +2 -2
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/hooks/use_safe_workspace.d.ts +4 -4
- package/lib/component/modal/setting/tanstack_general_settings/tabs/auto_processing_tab.d.ts +29 -29
- package/lib/component/modal/setting/tanstack_general_settings/tabs/auto_processing_tab.js +2 -2
- package/lib/component/modal/setting/tanstack_general_settings/tabs/auto_processing_tab.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/axis_tab.d.ts +24 -24
- package/lib/component/modal/setting/tanstack_general_settings/tabs/database_tab.d.ts +24 -24
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.d.ts +24 -24
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.fields.d.ts +14 -14
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.fields.js +2 -2
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.fields.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/external_api_tab.d.ts +24 -24
- package/lib/component/modal/setting/tanstack_general_settings/tabs/general_tab.d.ts +24 -24
- package/lib/component/modal/setting/tanstack_general_settings/tabs/import_filters_tab.d.ts +24 -24
- package/lib/component/modal/setting/tanstack_general_settings/tabs/nuclei_tab.d.ts +24 -24
- package/lib/component/modal/setting/tanstack_general_settings/tabs/panels_tab.d.ts +24 -24
- package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_colors_tab.d.ts +24 -24
- package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_label_tab.d.ts +24 -24
- package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_label_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_label_tab.js +3 -2
- package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_label_tab.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.d.ts +24 -24
- package/lib/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.js +3 -2
- package/lib/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/tools_tab.d.ts +24 -24
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.d.ts.map +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +30 -3
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js.map +1 -1
- package/lib/component/panels/PeaksPanel/PeaksPanel.d.ts.map +1 -1
- package/lib/component/panels/PeaksPanel/PeaksPanel.js +1 -9
- package/lib/component/panels/PeaksPanel/PeaksPanel.js.map +1 -1
- package/lib/component/panels/PeaksPanel/PeaksPreferences.js +18 -18
- package/lib/component/panels/PeaksPanel/PeaksPreferences.js.map +1 -1
- package/lib/component/panels/PeaksPanel/PeaksTable.d.ts.map +1 -1
- package/lib/component/panels/PeaksPanel/PeaksTable.js +17 -17
- package/lib/component/panels/PeaksPanel/PeaksTable.js.map +1 -1
- package/lib/component/panels/RangesPanel/RangesHeader.d.ts.map +1 -1
- package/lib/component/panels/RangesPanel/RangesHeader.js.map +1 -1
- package/lib/component/panels/RangesPanel/RangesPreferences.js +22 -22
- package/lib/component/panels/RangesPanel/RangesPreferences.js.map +1 -1
- package/lib/component/panels/RangesPanel/RangesTable.d.ts +2 -2
- package/lib/component/panels/RangesPanel/RangesTable.d.ts.map +1 -1
- package/lib/component/panels/RangesPanel/RangesTable.js +5 -4
- package/lib/component/panels/RangesPanel/RangesTable.js.map +1 -1
- package/lib/component/panels/RangesPanel/RangesTableRow.d.ts +2 -2
- package/lib/component/panels/RangesPanel/RangesTableRow.js +2 -2
- package/lib/component/panels/RangesPanel/RangesTableRow.js.map +1 -1
- package/lib/component/panels/SpectraPanel/SpectraTable.d.ts.map +1 -1
- package/lib/component/panels/SpectraPanel/SpectraTable.js +5 -1
- package/lib/component/panels/SpectraPanel/SpectraTable.js.map +1 -1
- package/lib/component/panels/SpectraPanel/base/RenderAsHTML.d.ts.map +1 -1
- package/lib/component/panels/SpectraPanel/base/RenderAsHTML.js +7 -4
- package/lib/component/panels/SpectraPanel/base/RenderAsHTML.js.map +1 -1
- package/lib/component/panels/SpectraPanel/base/SpectrumName.d.ts.map +1 -1
- package/lib/component/panels/SpectraPanel/base/SpectrumName.js +5 -1
- package/lib/component/panels/SpectraPanel/base/SpectrumName.js.map +1 -1
- package/lib/component/panels/SpectraPanel/base/setting/SpectrumSetting.d.ts.map +1 -1
- package/lib/component/panels/SpectraPanel/base/setting/SpectrumSetting.js +2 -2
- package/lib/component/panels/SpectraPanel/base/setting/SpectrumSetting.js.map +1 -1
- package/lib/component/panels/SummaryPanel/SummaryPanel.d.ts.map +1 -1
- package/lib/component/panels/SummaryPanel/SummaryPanel.js +7 -0
- package/lib/component/panels/SummaryPanel/SummaryPanel.js.map +1 -1
- package/lib/component/panels/filtersPanel/FilterPanel.d.ts.map +1 -1
- package/lib/component/panels/filtersPanel/FilterPanel.js +5 -2
- package/lib/component/panels/filtersPanel/FilterPanel.js.map +1 -1
- package/lib/component/panels/filtersPanel/Filters/base/BaseApodizationOptions.js +1 -1
- package/lib/component/panels/filtersPanel/Filters/base/BaseApodizationOptions.js.map +1 -1
- package/lib/component/panels/filtersPanel/processings_sections_panel.d.ts +2 -0
- package/lib/component/panels/filtersPanel/processings_sections_panel.d.ts.map +1 -0
- package/lib/component/panels/filtersPanel/processings_sections_panel.js +144 -0
- package/lib/component/panels/filtersPanel/processings_sections_panel.js.map +1 -0
- package/lib/component/panels/hooks/useMoleculeAnnotationCore.d.ts +3 -2
- package/lib/component/panels/hooks/useMoleculeAnnotationCore.d.ts.map +1 -1
- package/lib/component/panels/hooks/useMoleculeAnnotationCore.js +14 -8
- package/lib/component/panels/hooks/useMoleculeAnnotationCore.js.map +1 -1
- package/lib/component/panels/informationPanel/MixedValuesBadge.d.ts.map +1 -1
- package/lib/component/panels/informationPanel/MixedValuesBadge.js +2 -2
- package/lib/component/panels/informationPanel/MixedValuesBadge.js.map +1 -1
- package/lib/component/panels/informationPanel/SpectraPicker.d.ts.map +1 -1
- package/lib/component/panels/informationPanel/SpectraPicker.js +2 -2
- package/lib/component/panels/informationPanel/SpectraPicker.js.map +1 -1
- package/lib/component/reducer/Reducer.d.ts.map +1 -1
- package/lib/component/reducer/Reducer.js +2 -0
- package/lib/component/reducer/Reducer.js.map +1 -1
- package/lib/component/reducer/actions/CorrelationsActions.js +1 -1
- package/lib/component/reducer/actions/CorrelationsActions.js.map +1 -1
- package/lib/component/reducer/actions/DomainActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/DomainActions.js.map +1 -1
- package/lib/component/reducer/actions/FiltersActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/FiltersActions.js.map +1 -1
- package/lib/component/reducer/actions/LoadAction.d.ts.map +1 -1
- package/lib/component/reducer/actions/LoadAction.js.map +1 -1
- package/lib/component/reducer/actions/MoleculeActions.d.ts +9 -0
- package/lib/component/reducer/actions/MoleculeActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/RangesActions.d.ts +11 -2
- package/lib/component/reducer/actions/RangesActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/RangesActions.js +23 -5
- package/lib/component/reducer/actions/RangesActions.js.map +1 -1
- package/lib/component/reducer/actions/ToolsActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/ToolsActions.js +5 -17
- package/lib/component/reducer/actions/ToolsActions.js.map +1 -1
- package/lib/component/reducer/helper/getTraceSpectrumID.d.ts +5 -0
- package/lib/component/reducer/helper/getTraceSpectrumID.d.ts.map +1 -0
- package/lib/component/reducer/helper/getTraceSpectrumID.js +14 -0
- package/lib/component/reducer/helper/getTraceSpectrumID.js.map +1 -0
- package/lib/component/reducer/helper/setRangesViewProperty.d.ts.map +1 -1
- package/lib/component/reducer/helper/setRangesViewProperty.js.map +1 -1
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.d.ts.map +1 -1
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js +35 -26
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js.map +1 -1
- package/lib/component/reducer/preferences/preferencesReducer.d.ts +2 -2
- package/lib/component/reducer/preferences/preferencesReducer.d.ts.map +1 -1
- package/lib/component/reducer/preferences/utilities/initWorkspace.d.ts +2 -2
- package/lib/component/reducer/preferences/utilities/mapWorkspaces.d.ts +2 -2
- package/lib/component/reducer/preferences/utilities/mapWorkspaces.d.ts.map +1 -1
- package/lib/component/toolbar/ToolTypes.d.ts +2 -2
- package/lib/component/toolbar/nmr_toolbar.d.ts.map +1 -1
- package/lib/component/toolbar/nmr_toolbar.js +3 -1
- package/lib/component/toolbar/nmr_toolbar.js.map +1 -1
- package/lib/component/utility/CoreSlot.d.ts +27 -0
- package/lib/component/utility/CoreSlot.d.ts.map +1 -0
- package/lib/component/utility/CoreSlot.js +56 -0
- package/lib/component/utility/CoreSlot.js.map +1 -0
- package/lib/component/utility/export.d.ts.map +1 -1
- package/lib/component/utility/export.js +1 -0
- package/lib/component/utility/export.js.map +1 -1
- package/lib/data/PredictionManager.js.map +1 -1
- package/lib/data/constants/signalsKinds.d.ts +1 -2
- package/lib/data/constants/signalsKinds.d.ts.map +1 -1
- package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.d.ts.map +1 -1
- package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.js +1 -0
- package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.js.map +1 -1
- package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.d.ts.map +1 -1
- package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.js +35 -30
- package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.js.map +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectSignalsByMultipletAnalysis.d.ts.map +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectSignalsByMultipletAnalysis.js +1 -0
- package/lib/data/data1d/Spectrum1D/ranges/detectSignalsByMultipletAnalysis.js.map +1 -1
- package/lib/data/data1d/multipleSpectraAnalysis.d.ts +2 -2
- package/lib/data/matrixGeneration.d.ts.map +1 -1
- package/lib/data/matrixGeneration.js.map +1 -1
- package/lib/versionInfo.js +1 -1
- package/package.json +37 -37
- package/src/component/1d/PredictionErrorsNotations.tsx +5 -4
- package/src/component/1d/peaks/Peaks.tsx +5 -2
- package/src/component/1d/peaks/usePeakShapesPath.ts +0 -1
- package/src/component/1d/ranges/AssignmentLabel.tsx +1 -1
- package/src/component/1d/ranges/FloatingRangeTablePreferencesModal.tsx +238 -0
- package/src/component/1d/ranges/FloatingRanges.tsx +529 -0
- package/src/component/1d/ranges/Ranges.tsx +2 -2
- package/src/component/1d-2d/FieldEdition.tsx +4 -4
- package/src/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.tsx +8 -8
- package/src/component/1d-2d/tools/BrushXY.tsx +8 -8
- package/src/component/2d/1d-tracer/Left1DChart.tsx +24 -1
- package/src/component/2d/1d-tracer/Ranges1D.tsx +134 -0
- package/src/component/2d/1d-tracer/Signals1D.tsx +145 -0
- package/src/component/2d/1d-tracer/Top1DChart.tsx +29 -2
- package/src/component/2d/ft/FTContainer.tsx +1 -0
- package/src/component/2d/zones/SignalsGuideLines.tsx +1 -1
- package/src/component/2d/zones/ZonesAssignmentsLabels.tsx +1 -1
- package/src/component/AnchorSVG.tsx +370 -0
- package/src/component/EventsTrackers/BrushTracker.tsx +7 -2
- package/src/component/SVGTable.tsx +35 -33
- package/src/component/context/KeyModifierContext.tsx +6 -2
- package/src/component/context/LoggerContext.tsx +1 -7
- package/src/component/context/SortSpectraContext.tsx +1 -3
- package/src/component/elements/ActionsButtonsPopover.tsx +12 -14
- package/src/component/elements/Button.tsx +1 -6
- package/src/component/elements/DraggableDialog.tsx +1 -2
- package/src/component/elements/Sections.tsx +9 -7
- package/src/component/elements/TabTitle.tsx +7 -5
- package/src/component/elements/ToolbarPopoverItem.tsx +13 -2
- package/src/component/elements/dropDownButton/DropDownButton.tsx +7 -5
- package/src/component/elements/export/ExportOptionsModal.tsx +51 -280
- package/src/component/elements/export/units.ts +0 -6
- package/src/component/elements/export/utilities/getExportOptions.ts +1 -0
- package/src/component/elements/print/pageSize.ts +1 -1
- package/src/component/header/Header.tsx +2 -4
- package/src/component/hooks/useExport.tsx +1 -3
- package/src/component/hooks/usePanelPreferences.ts +4 -4
- package/src/component/hooks/useSaveSettings.tsx +4 -15
- package/src/component/hooks/useTextMetrics.ts +1 -0
- package/src/component/main/NMRiumViewer.tsx +1 -1
- package/src/component/modal/EditPeakShapeModal.tsx +2 -2
- package/src/component/modal/PublicationStringModal.tsx +5 -11
- package/src/component/modal/SaveAsModal.tsx +80 -82
- package/src/component/modal/aboutUs/AboutUsModal.tsx +5 -4
- package/src/component/modal/editRange/EditRangeModal.tsx +6 -4
- package/src/component/modal/editRange/forms/components/NewSignalTab.tsx +58 -58
- package/src/component/modal/setting/WorkspaceItem.tsx +2 -2
- package/src/component/modal/setting/tanstack_general_settings/errors/context.tsx +3 -3
- package/src/component/modal/setting/tanstack_general_settings/errors/renderer.tsx +2 -2
- package/src/component/modal/setting/tanstack_general_settings/general_settings.tsx +23 -29
- package/src/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.tsx +2 -2
- package/src/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.tsx +2 -2
- package/src/component/modal/setting/tanstack_general_settings/tabs/auto_processing_tab.tsx +2 -2
- package/src/component/modal/setting/tanstack_general_settings/tabs/export_tab.fields.tsx +2 -2
- package/src/component/modal/setting/tanstack_general_settings/tabs/spectra_label_tab.tsx +3 -2
- package/src/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.tsx +3 -2
- package/src/component/panels/MoleculesPanel/MoleculePanelHeader.tsx +41 -8
- package/src/component/panels/PeaksPanel/PeaksPanel.tsx +1 -8
- package/src/component/panels/PeaksPanel/PeaksPreferences.tsx +18 -18
- package/src/component/panels/PeaksPanel/PeaksTable.tsx +19 -17
- package/src/component/panels/RangesPanel/RangesHeader.tsx +1 -2
- package/src/component/panels/RangesPanel/RangesPanel.tsx +2 -2
- package/src/component/panels/RangesPanel/RangesPreferences.tsx +22 -22
- package/src/component/panels/RangesPanel/RangesTable.tsx +19 -17
- package/src/component/panels/RangesPanel/RangesTableRow.tsx +25 -25
- package/src/component/panels/SpectraPanel/SpectraTable.tsx +12 -1
- package/src/component/panels/SpectraPanel/base/RenderAsHTML.tsx +22 -4
- package/src/component/panels/SpectraPanel/base/SpectrumName.tsx +15 -6
- package/src/component/panels/SpectraPanel/base/setting/SpectrumSetting.tsx +3 -2
- package/src/component/panels/SummaryPanel/SummaryPanel.tsx +14 -16
- package/src/component/panels/filtersPanel/FilterPanel.tsx +10 -0
- package/src/component/panels/filtersPanel/Filters/base/BaseApodizationOptions.tsx +1 -0
- package/src/component/panels/filtersPanel/processings_sections_panel.tsx +324 -0
- package/src/component/panels/hooks/useMoleculeAnnotationCore.ts +17 -9
- package/src/component/panels/informationPanel/MixedValuesBadge.tsx +3 -2
- package/src/component/panels/informationPanel/SpectraPicker.tsx +12 -4
- package/src/component/panels/multipleAnalysisPanel/AnalysisChart.tsx +2 -2
- package/src/component/reducer/Reducer.ts +2 -0
- package/src/component/reducer/actions/CorrelationsActions.ts +1 -1
- package/src/component/reducer/actions/DomainActions.ts +1 -4
- package/src/component/reducer/actions/FiltersActions.ts +1 -2
- package/src/component/reducer/actions/LoadAction.ts +1 -3
- package/src/component/reducer/actions/RangesActions.ts +39 -5
- package/src/component/reducer/actions/ToolsActions.ts +5 -21
- package/src/component/reducer/helper/getTraceSpectrumID.tsx +25 -0
- package/src/component/reducer/helper/setRangesViewProperty.ts +1 -2
- package/src/component/reducer/preferences/panelsPreferencesDefaultValues.ts +32 -19
- package/src/component/reducer/preferences/preferencesReducer.ts +2 -2
- package/src/component/reducer/preferences/utilities/initWorkspace.ts +2 -2
- package/src/component/reducer/preferences/utilities/mapWorkspaces.ts +2 -2
- package/src/component/toolbar/ToolTypes.ts +2 -2
- package/src/component/toolbar/nmr_toolbar.tsx +3 -2
- package/src/component/utility/CoreSlot.tsx +126 -0
- package/src/component/utility/export.ts +1 -0
- package/src/data/PredictionManager.ts +4 -6
- package/src/data/constants/signalsKinds.ts +1 -1
- package/src/data/data1d/Spectrum1D/peaks/autoPeakPicking.ts +1 -0
- package/src/data/data1d/Spectrum1D/peaks/optimizePeaks.ts +35 -30
- package/src/data/data1d/Spectrum1D/ranges/detectSignalsByMultipletAnalysis.ts +1 -0
- package/src/data/data1d/multipleSpectraAnalysis.ts +2 -2
- package/src/data/matrixGeneration.ts +1 -5
- package/src/versionInfo.ts +1 -1
- package/lib/component/1d/FloatingRanges.d.ts.map +0 -1
- package/lib/component/1d/FloatingRanges.js +0 -263
- package/lib/component/1d/FloatingRanges.js.map +0 -1
- package/lib/component/elements/export/utilities/exportOptionValidationSchema.d.ts +0 -17
- package/lib/component/elements/export/utilities/exportOptionValidationSchema.d.ts.map +0 -1
- package/lib/component/elements/export/utilities/exportOptionValidationSchema.js +0 -79
- package/lib/component/elements/export/utilities/exportOptionValidationSchema.js.map +0 -1
- package/lib/component/elements/export/utilities/getModes.d.ts +0 -4
- package/lib/component/elements/export/utilities/getModes.d.ts.map +0 -1
- package/lib/component/elements/export/utilities/getModes.js +0 -11
- package/lib/component/elements/export/utilities/getModes.js.map +0 -1
- package/lib/component/utility/renderCoreSlot.d.ts +0 -11
- package/lib/component/utility/renderCoreSlot.d.ts.map +0 -1
- package/lib/component/utility/renderCoreSlot.js +0 -13
- package/lib/component/utility/renderCoreSlot.js.map +0 -1
- package/src/component/1d/FloatingRanges.tsx +0 -378
- package/src/component/elements/export/utilities/exportOptionValidationSchema.ts +0 -106
- package/src/component/elements/export/utilities/getModes.ts +0 -14
- package/src/component/utility/renderCoreSlot.tsx +0 -21
- /package/lib/component/1d/{FloatingRanges.d.ts → ranges/FloatingRanges.d.ts} +0 -0
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import type {
|
|
2
2
|
BaseNucleus1DPreferences,
|
|
3
3
|
BaseNucleus2DPreferences,
|
|
4
|
+
FloatingRangesTablePreferences,
|
|
4
5
|
MatrixGenerationOptions,
|
|
5
6
|
MultipleSpectraAnalysisPreferences,
|
|
6
7
|
PanelsPreferences,
|
|
7
8
|
PeaksNucleusPreferences,
|
|
9
|
+
RangesNucleusPreferences,
|
|
8
10
|
SpectraPreferences,
|
|
9
11
|
Zones1DNucleusPreferences,
|
|
10
12
|
Zones2DNucleusPreferences,
|
|
@@ -124,10 +126,8 @@ const getZoneDefaultValues = (nucleus?: string): PanelsPreferences['zones'] => {
|
|
|
124
126
|
}
|
|
125
127
|
};
|
|
126
128
|
|
|
127
|
-
const
|
|
128
|
-
|
|
129
|
-
): PanelsPreferences['ranges'] => {
|
|
130
|
-
const preferences = {
|
|
129
|
+
const createBaseRangesTablePreferences =
|
|
130
|
+
(): FloatingRangesTablePreferences => ({
|
|
131
131
|
showSerialNumber: true,
|
|
132
132
|
from: { show: false, format: '0.00' },
|
|
133
133
|
to: { show: false, format: '0.00' },
|
|
@@ -136,14 +136,25 @@ const getRangeDefaultValues = (
|
|
|
136
136
|
deltaPPM: { show: true, format: '0.00' },
|
|
137
137
|
deltaHz: { show: false, format: '0.00' },
|
|
138
138
|
coupling: { show: true, format: '0.00' },
|
|
139
|
-
jGraphTolerance: isProton(nucleus || '') ? 0.2 : nucleus === '13C' ? 2 : 0, //J Graph tolerance for: 1H: 0.2Hz 13C: 2Hz
|
|
140
139
|
showKind: true,
|
|
141
140
|
showMultiplicity: true,
|
|
142
141
|
showAssignment: true,
|
|
143
|
-
showDeleteAction: true,
|
|
144
|
-
showZoomAction: true,
|
|
145
|
-
showEditAction: true,
|
|
146
142
|
showAssignmentLabel: true,
|
|
143
|
+
signalKinds: ['signal'],
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
const getRangeDefaultValues = (
|
|
147
|
+
nucleus?: string,
|
|
148
|
+
): PanelsPreferences['ranges'] => {
|
|
149
|
+
const preferences: RangesNucleusPreferences = {
|
|
150
|
+
floatingTablePreferences: createBaseRangesTablePreferences(),
|
|
151
|
+
tablePreferences: {
|
|
152
|
+
...createBaseRangesTablePreferences(),
|
|
153
|
+
showDeleteAction: true,
|
|
154
|
+
showZoomAction: true,
|
|
155
|
+
showEditAction: true,
|
|
156
|
+
},
|
|
157
|
+
jGraphTolerance: isProton(nucleus || '') ? 0.2 : nucleus === '13C' ? 2 : 0, //J Graph tolerance for: 1H: 0.2Hz 13C: 2Hz
|
|
147
158
|
isSumConstant: true,
|
|
148
159
|
};
|
|
149
160
|
|
|
@@ -154,17 +165,19 @@ const getPeaksDefaultValues = (
|
|
|
154
165
|
nucleus?: string,
|
|
155
166
|
): PanelsPreferences['peaks'] => {
|
|
156
167
|
const preferences: PeaksNucleusPreferences = {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
+
tablePreferences: {
|
|
169
|
+
showSerialNumber: true,
|
|
170
|
+
deltaPPM: { show: true, format: '0.00' },
|
|
171
|
+
deltaHz: { show: false, format: '0.00' },
|
|
172
|
+
peakWidth: { show: false, format: '0.00' },
|
|
173
|
+
intensity: { show: true, format: '0.00' },
|
|
174
|
+
fwhm: { show: true, format: '0.00000' },
|
|
175
|
+
mu: { show: false, format: '0.00000' },
|
|
176
|
+
gamma: { show: false, format: '0.000' },
|
|
177
|
+
showKind: true,
|
|
178
|
+
showDeleteAction: true,
|
|
179
|
+
showEditPeakShapeAction: true,
|
|
180
|
+
},
|
|
168
181
|
defaultPeakShape: DEFAULT_PEAK_SHAPE,
|
|
169
182
|
};
|
|
170
183
|
return getPreferences(preferences, nucleus);
|
|
@@ -9,8 +9,8 @@ import type {
|
|
|
9
9
|
PanelPreferencesType,
|
|
10
10
|
PanelsPreferences,
|
|
11
11
|
PrintPageOptions,
|
|
12
|
-
WorkSpaceSource,
|
|
13
12
|
Workspace,
|
|
13
|
+
WorkspaceSource,
|
|
14
14
|
} from '@zakodium/nmrium-core';
|
|
15
15
|
import { CURRENT_EXPORT_VERSION, migrateSettings } from '@zakodium/nmrium-core';
|
|
16
16
|
import type { Draft } from 'immer';
|
|
@@ -223,7 +223,7 @@ export type PreferencesActions =
|
|
|
223
223
|
| CutSpectraAnalysisAction
|
|
224
224
|
| ToggleSplitPanelAction;
|
|
225
225
|
|
|
226
|
-
export type WorkspaceWithSource = Workspace & { source:
|
|
226
|
+
export type WorkspaceWithSource = Workspace & { source: WorkspaceSource };
|
|
227
227
|
type WorkspacesWithSource = Record<string, WorkspaceWithSource>;
|
|
228
228
|
|
|
229
229
|
export interface PreferencesState {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { WorkspaceSource } from '@zakodium/nmrium-core';
|
|
2
2
|
import lodashMerge from 'lodash/merge.js';
|
|
3
3
|
|
|
4
4
|
import { workspaceDefaultProperties } from '../../../workspaces/workspaceDefaultProperties.js';
|
|
@@ -6,7 +6,7 @@ import type { WorkspaceWithSource } from '../preferencesReducer.js';
|
|
|
6
6
|
|
|
7
7
|
export function initWorkspace(
|
|
8
8
|
preferences: any,
|
|
9
|
-
data: { source:
|
|
9
|
+
data: { source: WorkspaceSource; label: string },
|
|
10
10
|
): WorkspaceWithSource {
|
|
11
11
|
return lodashMerge({}, workspaceDefaultProperties, preferences, data);
|
|
12
12
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type {
|
|
2
|
-
WorkSpaceSource,
|
|
3
2
|
Workspace,
|
|
4
3
|
WorkspacePreferences,
|
|
4
|
+
WorkspaceSource,
|
|
5
5
|
} from '@zakodium/nmrium-core';
|
|
6
6
|
import lodashMerge from 'lodash/merge.js';
|
|
7
7
|
|
|
@@ -10,7 +10,7 @@ import { workspaceDefaultProperties } from '../../../workspaces/workspaceDefault
|
|
|
10
10
|
interface MapWorkspacesOptions {
|
|
11
11
|
ignoreKeys?: object;
|
|
12
12
|
mergeWithDefaultProperties?: boolean;
|
|
13
|
-
source?:
|
|
13
|
+
source?: WorkspaceSource;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
export function mapWorkspaces(
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Info1D, Info2D } from '@zakodium/nmr-types';
|
|
2
|
-
import type {
|
|
2
|
+
import type { NMRiumToolbarPreferences } from '@zakodium/nmrium-core';
|
|
3
3
|
import { Filters1D, Filters2D } from 'nmr-processing';
|
|
4
4
|
|
|
5
5
|
import type { DisplayerMode } from '../reducer/Reducer.js';
|
|
@@ -32,7 +32,7 @@ export interface ToolOptionItem {
|
|
|
32
32
|
isExperimental?: true;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
export type MainTool = keyof
|
|
35
|
+
export type MainTool = keyof NMRiumToolbarPreferences;
|
|
36
36
|
|
|
37
37
|
/**
|
|
38
38
|
* Tools that are selectable in panels, not in the main toolbar.
|
|
@@ -30,6 +30,7 @@ import { Toolbar, TooltipHelpContent } from 'react-science/ui';
|
|
|
30
30
|
import { isQuadrants2DSpectrum } from '../../data/data2d/Spectrum2D/isSpectrum2D.js';
|
|
31
31
|
import { useChartData } from '../context/ChartContext.js';
|
|
32
32
|
import { useDispatch } from '../context/DispatchContext.js';
|
|
33
|
+
import { useIsPrimaryKeyActivated } from '../context/KeyModifierContext.tsx';
|
|
33
34
|
import { useLoader } from '../context/LoaderContext.js';
|
|
34
35
|
import { usePreferences } from '../context/PreferencesContext.js';
|
|
35
36
|
import type { ToolbarPopoverMenuItem } from '../elements/ToolbarPopoverItem.js';
|
|
@@ -99,6 +100,7 @@ export default function NMRToolbar() {
|
|
|
99
100
|
const isButtonVisible = useCheckToolsVisibility();
|
|
100
101
|
const dispatch = useDispatch();
|
|
101
102
|
const spectrum = useSpectrum();
|
|
103
|
+
const isPrimaryKeyActivated = useIsPrimaryKeyActivated();
|
|
102
104
|
|
|
103
105
|
const {
|
|
104
106
|
isRealSpectrumShown,
|
|
@@ -234,8 +236,7 @@ export default function NMRToolbar() {
|
|
|
234
236
|
{ title: 'Horizontal', shortcuts: ['f'] },
|
|
235
237
|
{ title: 'Horizontal and Vertical', shortcuts: ['f', 'f'] },
|
|
236
238
|
],
|
|
237
|
-
description:
|
|
238
|
-
'Zoom out by double-clicking the left mouse button, and fully zoom out horizontally by pressing the key "f". Alternatively, press the key "ff" to fit the spectra horizontally and vertically.',
|
|
239
|
+
description: `Zoom out by ${isPrimaryKeyActivated ? 'Shift + ' : ''}double-clicking the left mouse button, and fully zoom out horizontally by pressing the key "f". Alternatively, press the key "ff" to fit the spectra horizontally and vertically.`,
|
|
239
240
|
link: 'https://docs.nmrium.org/help/zoom-and-scale',
|
|
240
241
|
},
|
|
241
242
|
onClick: handleFullZoomOut,
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import styled from '@emotion/styled';
|
|
2
|
+
import type {
|
|
3
|
+
PluginUIComponentProps,
|
|
4
|
+
ProcessingOperatorId,
|
|
5
|
+
ProcessingOperatorUIExpandedProps,
|
|
6
|
+
SupportedUISlot,
|
|
7
|
+
} from '@zakodium/nmrium-core';
|
|
8
|
+
import { castSlotProps } from '@zakodium/nmrium-core';
|
|
9
|
+
import type { ReactNode } from 'react';
|
|
10
|
+
import type { FallbackProps } from 'react-error-boundary';
|
|
11
|
+
import { ErrorBoundary } from 'react-error-boundary';
|
|
12
|
+
|
|
13
|
+
import { useCore } from '../context/CoreContext.tsx';
|
|
14
|
+
|
|
15
|
+
type SlotProps<Slot extends SupportedUISlot> =
|
|
16
|
+
Omit<Extract<PluginUIComponentProps, { slot: Slot }>, 'slot'> extends Record<
|
|
17
|
+
string,
|
|
18
|
+
never
|
|
19
|
+
>
|
|
20
|
+
? object
|
|
21
|
+
: Omit<Extract<PluginUIComponentProps, { slot: Slot }>, 'slot'>;
|
|
22
|
+
|
|
23
|
+
interface CoreSlotProps<Slot extends SupportedUISlot> {
|
|
24
|
+
slot: Slot;
|
|
25
|
+
fallback?: ReactNode;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Render all components registered in the given slot.
|
|
30
|
+
*/
|
|
31
|
+
export function CoreSlot<Slot extends SupportedUISlot>(
|
|
32
|
+
props: CoreSlotProps<Slot> & SlotProps<Slot>,
|
|
33
|
+
) {
|
|
34
|
+
const { slot, fallback, ...slotProps } = props;
|
|
35
|
+
castSlotProps(slotProps, slot);
|
|
36
|
+
|
|
37
|
+
const core = useCore();
|
|
38
|
+
|
|
39
|
+
const jsx = Array.from(core.slot(slot), ([key, Component]) => (
|
|
40
|
+
<Component key={key} {...slotProps} slot={slot} />
|
|
41
|
+
));
|
|
42
|
+
|
|
43
|
+
return jsx.length > 0 ? jsx : fallback;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
interface CoreOperatorNameProps<Id extends ProcessingOperatorId> {
|
|
47
|
+
id: Id;
|
|
48
|
+
fallback?: ReactNode;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function CoreOperatorName<Id extends ProcessingOperatorId>(
|
|
52
|
+
props: CoreOperatorNameProps<Id>,
|
|
53
|
+
) {
|
|
54
|
+
const { id, fallback } = props;
|
|
55
|
+
const core = useCore();
|
|
56
|
+
|
|
57
|
+
const operator = core.slotOperator(id);
|
|
58
|
+
if (!operator) return fallback;
|
|
59
|
+
|
|
60
|
+
return operator.name;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
interface CoreOperatorExtendedProps<Id extends ProcessingOperatorId> {
|
|
64
|
+
id: Id;
|
|
65
|
+
fallback?: ReactNode;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function CoreOperatorExpanded<Id extends ProcessingOperatorId>(
|
|
69
|
+
props: CoreOperatorExtendedProps<Id> & ProcessingOperatorUIExpandedProps<Id>,
|
|
70
|
+
) {
|
|
71
|
+
const { id, fallback, ...operatorProps } = props;
|
|
72
|
+
const core = useCore();
|
|
73
|
+
|
|
74
|
+
const operator = core.slotOperator(id);
|
|
75
|
+
const Expanded = operator?.Expanded;
|
|
76
|
+
if (!Expanded) return fallback;
|
|
77
|
+
|
|
78
|
+
return (
|
|
79
|
+
<ErrorBoundary
|
|
80
|
+
fallbackRender={(props) => (
|
|
81
|
+
<>
|
|
82
|
+
<ErrorOverlay {...props} />
|
|
83
|
+
{fallback}
|
|
84
|
+
</>
|
|
85
|
+
)}
|
|
86
|
+
>
|
|
87
|
+
<Expanded {...operatorProps} />
|
|
88
|
+
</ErrorBoundary>
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function ErrorOverlay(props: FallbackProps) {
|
|
93
|
+
const error = props.error;
|
|
94
|
+
const message =
|
|
95
|
+
error && typeof error === 'object' && 'message' in error
|
|
96
|
+
? error.message
|
|
97
|
+
: null;
|
|
98
|
+
const stack =
|
|
99
|
+
error && typeof error === 'object' && 'stack' in error ? error.stack : null;
|
|
100
|
+
|
|
101
|
+
return (
|
|
102
|
+
<ErrorOverlayStyled>
|
|
103
|
+
<p>Something went wrong.</p>
|
|
104
|
+
<details>
|
|
105
|
+
<summary>{message as ReactNode}</summary>
|
|
106
|
+
{stack as ReactNode}
|
|
107
|
+
</details>
|
|
108
|
+
</ErrorOverlayStyled>
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
const ErrorOverlayStyled = styled.div`
|
|
113
|
+
background: white;
|
|
114
|
+
padding-block: 10px;
|
|
115
|
+
|
|
116
|
+
> p {
|
|
117
|
+
margin: 0;
|
|
118
|
+
text-align: center;
|
|
119
|
+
font-size: 20px;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
details {
|
|
123
|
+
color: red;
|
|
124
|
+
white-space: pre-wrap;
|
|
125
|
+
}
|
|
126
|
+
`;
|
|
@@ -302,6 +302,7 @@ function copyDataURLClipboardFireFox(image: string) {
|
|
|
302
302
|
const range = document.createRange();
|
|
303
303
|
range.selectNode(img);
|
|
304
304
|
globalThis.getSelection()?.addRange(range);
|
|
305
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
305
306
|
document.execCommand('Copy');
|
|
306
307
|
img.remove();
|
|
307
308
|
}
|
|
@@ -343,12 +343,10 @@ function mapZones(zones: NMRZone[]): Zone[] {
|
|
|
343
343
|
kind: kind || 'signal',
|
|
344
344
|
x: { ...x, originalDelta: x.delta || 0 },
|
|
345
345
|
y: { ...y, originalDelta: y.delta || 0 },
|
|
346
|
-
peaks: peaks?.map(
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
}),
|
|
351
|
-
),
|
|
346
|
+
peaks: peaks?.map((peak): Peak2D => ({
|
|
347
|
+
...peak,
|
|
348
|
+
id: peak.id || crypto.randomUUID(),
|
|
349
|
+
})),
|
|
352
350
|
};
|
|
353
351
|
});
|
|
354
352
|
return {
|
|
@@ -48,6 +48,7 @@ export function autoPeakPicking(
|
|
|
48
48
|
sensitivity: 100,
|
|
49
49
|
shape: defaultPeakShape,
|
|
50
50
|
noiseLevel: noise * noiseFactor,
|
|
51
|
+
maxAbsoluteRatio: minMaxRatio, // Threshold to determine if a given peak should be considered as a noise
|
|
51
52
|
minMaxRatio, // Threshold to determine if a given peak should be considered as a noise
|
|
52
53
|
realTopDetection: true,
|
|
53
54
|
smoothY: false,
|
|
@@ -36,6 +36,9 @@ export function optimizePeaks(
|
|
|
36
36
|
groupingFactor: 10,
|
|
37
37
|
stages: [
|
|
38
38
|
{
|
|
39
|
+
// Stage 1: local stabilization
|
|
40
|
+
factorLimits: 2,
|
|
41
|
+
maxNumberOfPeaks: 40,
|
|
39
42
|
optimization: {
|
|
40
43
|
kind: 'lm',
|
|
41
44
|
options: { maxIterations: 20, errorTolerance: 1e-3 },
|
|
@@ -43,98 +46,100 @@ export function optimizePeaks(
|
|
|
43
46
|
parameters: {
|
|
44
47
|
fwhm: {
|
|
45
48
|
optimize: true,
|
|
46
|
-
min: (peak: any) => (peak.shape?.fwhm ?? 0)
|
|
49
|
+
min: (peak: any) => (peak.shape?.fwhm ?? 0) * 0.5,
|
|
47
50
|
max: (peak: any) => (peak.shape?.fwhm ?? 0) * 2,
|
|
48
51
|
},
|
|
49
52
|
mu: { optimize: false },
|
|
50
53
|
x: { optimize: false },
|
|
51
54
|
y: {
|
|
52
55
|
optimize: true,
|
|
53
|
-
init: (peak: any) => peak.y
|
|
56
|
+
init: (peak: any) => peak.y,
|
|
54
57
|
},
|
|
55
58
|
},
|
|
56
59
|
},
|
|
57
60
|
{
|
|
61
|
+
factorLimits: 2,
|
|
62
|
+
maxNumberOfPeaks: 40,
|
|
58
63
|
optimization: {
|
|
59
64
|
kind: 'lm',
|
|
60
|
-
options: { maxIterations: 20, errorTolerance:
|
|
65
|
+
options: { maxIterations: 20, errorTolerance: 1e-3 },
|
|
61
66
|
},
|
|
62
67
|
parameters: {
|
|
63
68
|
fwhm: {
|
|
64
69
|
optimize: true,
|
|
65
|
-
min: (peak: any) => (peak.shape?.fwhm ?? 0)
|
|
70
|
+
min: (peak: any) => (peak.shape?.fwhm ?? 0) * 0.5,
|
|
66
71
|
max: (peak: any) => (peak.shape?.fwhm ?? 0) * 2,
|
|
67
72
|
},
|
|
68
73
|
mu: { optimize: false },
|
|
69
74
|
x: { optimize: false },
|
|
70
75
|
y: {
|
|
71
76
|
optimize: true,
|
|
77
|
+
init: (peak: any) => peak.y,
|
|
72
78
|
},
|
|
73
79
|
},
|
|
74
80
|
},
|
|
75
81
|
{
|
|
82
|
+
// Stage 2: regroup into the real overlapping cluster
|
|
83
|
+
factorLimits: 2,
|
|
84
|
+
maxNumberOfPeaks: 40,
|
|
76
85
|
optimization: {
|
|
77
86
|
kind: 'lm',
|
|
78
|
-
options: { maxIterations:
|
|
87
|
+
options: { maxIterations: 25, errorTolerance: 1e-4 },
|
|
79
88
|
},
|
|
80
89
|
parameters: {
|
|
81
90
|
fwhm: {
|
|
82
91
|
optimize: true,
|
|
83
|
-
min: (peak: any) => (peak.shape?.fwhm ?? 0)
|
|
92
|
+
min: (peak: any) => (peak.shape?.fwhm ?? 0) * 0.5,
|
|
84
93
|
max: (peak: any) => (peak.shape?.fwhm ?? 0) * 2,
|
|
85
94
|
},
|
|
86
95
|
mu: { optimize: true },
|
|
87
96
|
x: { optimize: false },
|
|
88
|
-
y: {
|
|
89
|
-
optimize: true,
|
|
90
|
-
},
|
|
97
|
+
y: { optimize: true },
|
|
91
98
|
},
|
|
92
99
|
},
|
|
93
100
|
{
|
|
101
|
+
// Stage 3: final polish
|
|
102
|
+
factorLimits: 2,
|
|
103
|
+
maxNumberOfPeaks: 40,
|
|
94
104
|
optimization: {
|
|
95
105
|
kind: 'lm',
|
|
96
|
-
options: { maxIterations:
|
|
106
|
+
options: { maxIterations: 30, errorTolerance: 1e-5 },
|
|
97
107
|
},
|
|
98
108
|
parameters: {
|
|
99
109
|
fwhm: {
|
|
100
110
|
optimize: true,
|
|
101
|
-
min: (peak: any) => (peak.shape?.fwhm ?? 0)
|
|
102
|
-
max: (peak: any) => (peak.shape?.fwhm ?? 0) *
|
|
111
|
+
min: (peak: any) => (peak.shape?.fwhm ?? 0) * 0.5,
|
|
112
|
+
max: (peak: any) => (peak.shape?.fwhm ?? 0) * 2,
|
|
103
113
|
},
|
|
104
114
|
mu: { optimize: true },
|
|
105
|
-
x: {
|
|
106
|
-
y: { optimize: true },
|
|
107
|
-
},
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
optimization: {
|
|
111
|
-
kind: 'lm',
|
|
112
|
-
options: { maxIterations: 20, errorTolerance: 1e-4 },
|
|
113
|
-
},
|
|
114
|
-
parameters: {
|
|
115
|
-
fwhm: {
|
|
115
|
+
x: {
|
|
116
116
|
optimize: true,
|
|
117
|
-
min: (peak: any) => (peak.shape?.fwhm ?? 0) /
|
|
118
|
-
max: (peak: any) => (peak.shape?.fwhm ?? 0)
|
|
117
|
+
min: (peak: any) => peak.x - (peak.shape?.fwhm ?? 0) / 4,
|
|
118
|
+
max: (peak: any) => peak.x + (peak.shape?.fwhm ?? 0) / 4,
|
|
119
119
|
},
|
|
120
|
-
mu: { optimize: false },
|
|
121
|
-
x: { optimize: true },
|
|
122
120
|
y: { optimize: true },
|
|
123
121
|
},
|
|
124
122
|
},
|
|
125
123
|
{
|
|
124
|
+
// Stage 3: final polish
|
|
125
|
+
factorLimits: 2,
|
|
126
|
+
maxNumberOfPeaks: 40,
|
|
126
127
|
optimization: {
|
|
127
128
|
kind: 'lm',
|
|
128
|
-
options: { maxIterations:
|
|
129
|
+
options: { maxIterations: 30, errorTolerance: 1e-5 },
|
|
129
130
|
},
|
|
130
131
|
parameters: {
|
|
131
132
|
fwhm: {
|
|
132
133
|
optimize: true,
|
|
133
|
-
min: (peak: any) => (peak.shape?.fwhm ?? 0)
|
|
134
|
+
min: (peak: any) => (peak.shape?.fwhm ?? 0) * 0.5,
|
|
134
135
|
max: (peak: any) => (peak.shape?.fwhm ?? 0) * 2,
|
|
135
136
|
},
|
|
136
137
|
mu: { optimize: true },
|
|
137
|
-
x: {
|
|
138
|
+
x: {
|
|
139
|
+
optimize: true,
|
|
140
|
+
min: (peak: any) => peak.x - (peak.shape?.fwhm ?? 0) / 4,
|
|
141
|
+
max: (peak: any) => peak.x + (peak.shape?.fwhm ?? 0) / 4,
|
|
142
|
+
},
|
|
138
143
|
y: { optimize: true },
|
|
139
144
|
},
|
|
140
145
|
},
|
|
@@ -8,7 +8,7 @@ import type {
|
|
|
8
8
|
SpectraAnalysisColumns,
|
|
9
9
|
Spectrum1D,
|
|
10
10
|
Spectrum,
|
|
11
|
-
|
|
11
|
+
WorkspacePanelPreferences,
|
|
12
12
|
} from '@zakodium/nmrium-core';
|
|
13
13
|
import {
|
|
14
14
|
ANALYSIS_COLUMN_TYPES,
|
|
@@ -314,7 +314,7 @@ function calculate(
|
|
|
314
314
|
export function getDataAsString(
|
|
315
315
|
spectraAnalysis: SpectraAnalysisData,
|
|
316
316
|
spectra: Spectrum1D[],
|
|
317
|
-
spectraPanelPreferences:
|
|
317
|
+
spectraPanelPreferences: WorkspacePanelPreferences['spectra'],
|
|
318
318
|
) {
|
|
319
319
|
const spectraData = convertSpectraArrayToObject(spectra);
|
|
320
320
|
if (spectraAnalysis) {
|
|
@@ -32,11 +32,7 @@ interface BooleanField extends Field<boolean> {
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
type CommonField =
|
|
35
|
-
|
|
|
36
|
-
| StringField
|
|
37
|
-
| NumberField
|
|
38
|
-
| BooleanField
|
|
39
|
-
| LabelField;
|
|
35
|
+
SelectField | StringField | NumberField | BooleanField | LabelField;
|
|
40
36
|
|
|
41
37
|
interface ListField extends Field<string[]> {
|
|
42
38
|
type: 'list';
|
package/src/versionInfo.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default { version: 'v2.
|
|
1
|
+
export default { version: 'v2.4.0' };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FloatingRanges.d.ts","sourceRoot":"","sources":["../../../src/component/1d/FloatingRanges.tsx"],"names":[],"mappings":"AAoWA,wBAAgB,cAAc,2CAqB7B"}
|