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
|
@@ -2,9 +2,9 @@ import type { CSSProperties, RefObject } from 'react';
|
|
|
2
2
|
import { useDeferredValue, useEffect } from 'react';
|
|
3
3
|
|
|
4
4
|
import { FloatPublicationString } from '../1d/FloatPublicationString.js';
|
|
5
|
-
import { FloatingRanges } from '../1d/FloatingRanges.js';
|
|
6
5
|
import { Viewer1D } from '../1d/Viewer1D.js';
|
|
7
6
|
import { SpectraInsets } from '../1d/inset/SpectraInsets.js';
|
|
7
|
+
import { FloatingRanges } from '../1d/ranges/FloatingRanges.tsx';
|
|
8
8
|
import { FloatMolecules } from '../1d-2d/components/FloatMoleculeStructures/FloatMolecules.js';
|
|
9
9
|
import { SVGRootContainer } from '../1d-2d/components/SVGRootContainer.js';
|
|
10
10
|
import Viewer2D from '../2d/Viewer2D.js';
|
|
@@ -97,7 +97,7 @@ function InnerEditPeakShapeModal(props: Required<EditPeakShapeModalProps>) {
|
|
|
97
97
|
const { peak, onCloseDialog } = props;
|
|
98
98
|
const dispatch = useDispatch();
|
|
99
99
|
const activeTab = useActiveNucleusTab();
|
|
100
|
-
const
|
|
100
|
+
const { tablePreferences } = usePanelPreferences('peaks', activeTab);
|
|
101
101
|
|
|
102
102
|
const [kind, setKind] = useState<Kind>(peak.shape?.kind || 'gaussian');
|
|
103
103
|
const { handleSubmit, control, reset } = useForm<Shape>({
|
|
@@ -125,7 +125,7 @@ function InnerEditPeakShapeModal(props: Required<EditPeakShapeModalProps>) {
|
|
|
125
125
|
setKind(value);
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
const valuePPM = formatNumber(peak.x,
|
|
128
|
+
const valuePPM = formatNumber(peak.x, tablePreferences.deltaPPM.format);
|
|
129
129
|
|
|
130
130
|
return (
|
|
131
131
|
<StandardDialog
|
|
@@ -5,10 +5,9 @@ import type {
|
|
|
5
5
|
Spectrum1D,
|
|
6
6
|
Spectrum,
|
|
7
7
|
} from '@zakodium/nmrium-core';
|
|
8
|
-
import type { FormEvent } from 'react';
|
|
9
8
|
import {
|
|
9
|
+
AppForm,
|
|
10
10
|
FieldGroupSVGTextStyleFields,
|
|
11
|
-
Form,
|
|
12
11
|
assert,
|
|
13
12
|
svgTextStyleFieldsSchema,
|
|
14
13
|
useForm,
|
|
@@ -191,13 +190,8 @@ function InnerPublicationStringModal(props: InnerPublicationStringModalProps) {
|
|
|
191
190
|
|
|
192
191
|
if (!spectrum || !isSpectrum1D(spectrum)) return null;
|
|
193
192
|
|
|
194
|
-
function onSubmit(event: FormEvent<HTMLFormElement>) {
|
|
195
|
-
event.preventDefault();
|
|
196
|
-
void form.handleSubmit(event);
|
|
197
|
-
}
|
|
198
|
-
|
|
199
193
|
return (
|
|
200
|
-
|
|
194
|
+
<>
|
|
201
195
|
<StandardDialog
|
|
202
196
|
isOpen
|
|
203
197
|
title="Publication string"
|
|
@@ -207,7 +201,7 @@ function InnerPublicationStringModal(props: InnerPublicationStringModalProps) {
|
|
|
207
201
|
onClose={onClose}
|
|
208
202
|
style={{ minWidth: 600 }}
|
|
209
203
|
>
|
|
210
|
-
<
|
|
204
|
+
<AppForm form={form} layout="inline">
|
|
211
205
|
<HelpForm>This configuration is at the nucleus level.</HelpForm>
|
|
212
206
|
<StyledDialogBody>
|
|
213
207
|
<form.AppField name="acs.signalKind">
|
|
@@ -265,7 +259,7 @@ function InnerPublicationStringModal(props: InnerPublicationStringModalProps) {
|
|
|
265
259
|
</form.AppField>
|
|
266
260
|
)}
|
|
267
261
|
</DialogFooter>
|
|
268
|
-
</
|
|
262
|
+
</AppForm>
|
|
269
263
|
</StandardDialog>
|
|
270
264
|
|
|
271
265
|
<ClipboardFallbackModal
|
|
@@ -274,7 +268,7 @@ function InnerPublicationStringModal(props: InnerPublicationStringModalProps) {
|
|
|
274
268
|
text={text}
|
|
275
269
|
label="Preview publication string"
|
|
276
270
|
/>
|
|
277
|
-
|
|
271
|
+
</>
|
|
278
272
|
);
|
|
279
273
|
}
|
|
280
274
|
|
|
@@ -1,52 +1,48 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DialogBody, DialogFooter } from '@blueprintjs/core';
|
|
2
|
+
import { revalidateLogic } from '@tanstack/react-form';
|
|
2
3
|
import { useMemo } from 'react';
|
|
3
|
-
import {
|
|
4
|
+
import { AppForm, Button, useForm } from 'react-science/ui';
|
|
5
|
+
import { z } from 'zod/v4';
|
|
4
6
|
|
|
5
7
|
import { DataExportOptions } from '../../data/SpectraManager.js';
|
|
6
8
|
import { useChartData } from '../context/ChartContext.js';
|
|
7
|
-
import ActionButtons from '../elements/ActionButtons.js';
|
|
8
|
-
import { Input2Controller } from '../elements/Input2Controller.js';
|
|
9
|
-
import type { LabelStyle } from '../elements/Label.js';
|
|
10
|
-
import Label from '../elements/Label.js';
|
|
11
9
|
import { StandardDialog } from '../elements/StandardDialog.tsx';
|
|
12
|
-
import { StyledDialogBody } from '../elements/StyledDialogBody.js';
|
|
13
|
-
import type { SaveOptions } from '../hooks/useExport.js';
|
|
14
10
|
import { useExport } from '../hooks/useExport.js';
|
|
15
11
|
|
|
16
|
-
const
|
|
12
|
+
const formSchema = z.object({
|
|
13
|
+
name: z.string().min(1, { error: 'Name is required' }),
|
|
14
|
+
include: z.object({
|
|
15
|
+
dataType: z.enum([
|
|
16
|
+
'NO_DATA',
|
|
17
|
+
'SELF_CONTAINED',
|
|
18
|
+
'SELF_CONTAINED_EXTERNAL_DATASOURCE',
|
|
19
|
+
]),
|
|
20
|
+
view: z.boolean(),
|
|
21
|
+
settings: z.boolean(),
|
|
22
|
+
}),
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
const INITIAL_VALUE: z.input<typeof formSchema> = {
|
|
17
26
|
name: '',
|
|
18
27
|
include: {
|
|
19
|
-
dataType:
|
|
28
|
+
dataType: 'SELF_CONTAINED',
|
|
20
29
|
view: false,
|
|
21
30
|
settings: false,
|
|
22
31
|
},
|
|
23
32
|
};
|
|
24
33
|
|
|
25
|
-
const labelStyle: LabelStyle = {
|
|
26
|
-
label: {
|
|
27
|
-
flex: 4,
|
|
28
|
-
color: '#232323',
|
|
29
|
-
},
|
|
30
|
-
wrapper: {
|
|
31
|
-
flex: 8,
|
|
32
|
-
display: 'flex',
|
|
33
|
-
justifyContent: 'flex-start',
|
|
34
|
-
},
|
|
35
|
-
container: { padding: '5px 0' },
|
|
36
|
-
};
|
|
37
|
-
|
|
38
34
|
interface InnerSaveAsModalProps {
|
|
39
35
|
onCloseDialog: () => void;
|
|
40
36
|
}
|
|
37
|
+
|
|
41
38
|
interface SaveAsModalProps extends InnerSaveAsModalProps {
|
|
42
39
|
isOpen: boolean;
|
|
43
40
|
}
|
|
44
41
|
|
|
45
|
-
function SaveAsModal(props: SaveAsModalProps) {
|
|
42
|
+
export default function SaveAsModal(props: SaveAsModalProps) {
|
|
46
43
|
const { onCloseDialog, isOpen } = props;
|
|
47
44
|
|
|
48
45
|
if (!isOpen) return;
|
|
49
|
-
|
|
50
46
|
return <InnerSaveAsModal onCloseDialog={onCloseDialog} />;
|
|
51
47
|
}
|
|
52
48
|
|
|
@@ -54,21 +50,35 @@ function InnerSaveAsModal(props: InnerSaveAsModalProps) {
|
|
|
54
50
|
const { onCloseDialog } = props;
|
|
55
51
|
const { data, aggregator } = useChartData();
|
|
56
52
|
const { saveHandler } = useExport();
|
|
57
|
-
const fileName = data[0]?.info?.name;
|
|
58
53
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
54
|
+
const form = useForm({
|
|
55
|
+
defaultValues: { ...INITIAL_VALUE, name: data[0]?.info?.name ?? '' },
|
|
56
|
+
validators: { onDynamic: formSchema },
|
|
57
|
+
validationLogic: revalidateLogic({ modeAfterSubmission: 'change' }),
|
|
58
|
+
onSubmit: ({ value }) => {
|
|
59
|
+
const parsedValue = formSchema.parse(value);
|
|
60
|
+
saveHandler(parsedValue);
|
|
63
61
|
|
|
64
|
-
|
|
65
|
-
|
|
62
|
+
onCloseDialog();
|
|
63
|
+
},
|
|
66
64
|
});
|
|
67
65
|
|
|
68
66
|
const containsLinkedFiles = useMemo(() => {
|
|
69
67
|
return aggregator.sources.some((s) => !s.baseURL?.startsWith('ium:'));
|
|
70
68
|
}, [aggregator]);
|
|
71
69
|
|
|
70
|
+
const options = useMemo(() => {
|
|
71
|
+
return [
|
|
72
|
+
{ value: DataExportOptions.SELF_CONTAINED, label: 'Embed data' },
|
|
73
|
+
{
|
|
74
|
+
value: DataExportOptions.SELF_CONTAINED_EXTERNAL_DATASOURCE,
|
|
75
|
+
label: 'Link data',
|
|
76
|
+
disabled: !containsLinkedFiles,
|
|
77
|
+
},
|
|
78
|
+
{ value: DataExportOptions.NO_DATA, label: 'None' },
|
|
79
|
+
];
|
|
80
|
+
}, [containsLinkedFiles]);
|
|
81
|
+
|
|
72
82
|
return (
|
|
73
83
|
<StandardDialog
|
|
74
84
|
isOpen
|
|
@@ -76,57 +86,45 @@ function InnerSaveAsModal(props: InnerSaveAsModalProps) {
|
|
|
76
86
|
onClose={onCloseDialog}
|
|
77
87
|
style={{ width: 600 }}
|
|
78
88
|
>
|
|
79
|
-
<
|
|
80
|
-
<
|
|
81
|
-
<
|
|
82
|
-
name="name"
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
</Label>
|
|
117
|
-
</StyledDialogBody>
|
|
118
|
-
<DialogFooter>
|
|
119
|
-
<ActionButtons
|
|
120
|
-
style={{ flexDirection: 'row-reverse', margin: 0 }}
|
|
121
|
-
onDone={() => {
|
|
122
|
-
void handleSubmit(submitHandler)();
|
|
123
|
-
}}
|
|
124
|
-
doneLabel="Save"
|
|
125
|
-
onCancel={() => onCloseDialog?.()}
|
|
89
|
+
<AppForm form={form} layout="inline">
|
|
90
|
+
<DialogBody style={{ backgroundColor: 'white' }}>
|
|
91
|
+
<form.Section title="General information">
|
|
92
|
+
<form.AppField name="name">
|
|
93
|
+
{(field) => <field.Input label="Name" required autoFocus />}
|
|
94
|
+
</form.AppField>
|
|
95
|
+
</form.Section>
|
|
96
|
+
<form.Section title="Include">
|
|
97
|
+
<form.AppField name="include.view">
|
|
98
|
+
{(field) => <field.Checkbox label="View" />}
|
|
99
|
+
</form.AppField>
|
|
100
|
+
|
|
101
|
+
<form.AppField name="include.settings">
|
|
102
|
+
{(field) => <field.Checkbox label="Workspace" />}
|
|
103
|
+
</form.AppField>
|
|
104
|
+
|
|
105
|
+
<form.AppField name="include.dataType">
|
|
106
|
+
{(field) => (
|
|
107
|
+
<field.RadioGroup inline label="Data" options={options} />
|
|
108
|
+
)}
|
|
109
|
+
</form.AppField>
|
|
110
|
+
</form.Section>
|
|
111
|
+
</DialogBody>
|
|
112
|
+
|
|
113
|
+
<DialogFooter
|
|
114
|
+
actions={
|
|
115
|
+
<>
|
|
116
|
+
<Button
|
|
117
|
+
variant="outlined"
|
|
118
|
+
intent="danger"
|
|
119
|
+
onClick={() => onCloseDialog?.()}
|
|
120
|
+
>
|
|
121
|
+
Cancel
|
|
122
|
+
</Button>
|
|
123
|
+
<form.SubmitButton intent="success">Save</form.SubmitButton>
|
|
124
|
+
</>
|
|
125
|
+
}
|
|
126
126
|
/>
|
|
127
|
-
</
|
|
127
|
+
</AppForm>
|
|
128
128
|
</StandardDialog>
|
|
129
129
|
);
|
|
130
130
|
}
|
|
131
|
-
|
|
132
|
-
export default SaveAsModal;
|
|
@@ -3,11 +3,10 @@ import { SvgLogoNmrium } from 'cheminfo-font';
|
|
|
3
3
|
import { Toolbar, useOnOff } from 'react-science/ui';
|
|
4
4
|
|
|
5
5
|
import versionInfo from '../../../versionInfo.js';
|
|
6
|
-
import { useCore } from '../../context/CoreContext.js';
|
|
7
6
|
import Logo from '../../elements/Logo.js';
|
|
8
7
|
import { StandardDialog } from '../../elements/StandardDialog.tsx';
|
|
9
8
|
import { StyledDialogBody } from '../../elements/StyledDialogBody.js';
|
|
10
|
-
import {
|
|
9
|
+
import { CoreSlot } from '../../utility/CoreSlot.tsx';
|
|
11
10
|
|
|
12
11
|
import AboutUsZakodium from './AboutUsZakodium.js';
|
|
13
12
|
|
|
@@ -116,7 +115,6 @@ const modalContentFallback = (
|
|
|
116
115
|
|
|
117
116
|
function AboutUsModal() {
|
|
118
117
|
const [isOpenDialog, openDialog, closeDialog] = useOnOff(false);
|
|
119
|
-
const core = useCore();
|
|
120
118
|
|
|
121
119
|
return (
|
|
122
120
|
<>
|
|
@@ -137,7 +135,10 @@ function AboutUsModal() {
|
|
|
137
135
|
title="About NMRium"
|
|
138
136
|
>
|
|
139
137
|
<StyledDialogBody>
|
|
140
|
-
|
|
138
|
+
<CoreSlot
|
|
139
|
+
slot="topbar.about_us.modal"
|
|
140
|
+
fallback={modalContentFallback}
|
|
141
|
+
/>
|
|
141
142
|
</StyledDialogBody>
|
|
142
143
|
</StandardDialog>
|
|
143
144
|
</>
|
|
@@ -67,7 +67,7 @@ function InnerEditRangeModal(props: InnerEditRangeModalProps) {
|
|
|
67
67
|
const dispatch = useDispatch();
|
|
68
68
|
const range = useRange(rangeID);
|
|
69
69
|
const originalRangeRef = useRef(range);
|
|
70
|
-
const
|
|
70
|
+
const preferences = usePanelPreferences('ranges', activeTab);
|
|
71
71
|
|
|
72
72
|
function handleOnZoom() {
|
|
73
73
|
onZoom(range);
|
|
@@ -113,14 +113,16 @@ function InnerEditRangeModal(props: InnerEditRangeModalProps) {
|
|
|
113
113
|
},
|
|
114
114
|
});
|
|
115
115
|
|
|
116
|
-
if (!
|
|
116
|
+
if (!preferences || !range) {
|
|
117
117
|
return;
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
+
const { tablePreferences } = preferences;
|
|
121
|
+
|
|
120
122
|
const title = ` Range and Signal edition: ${formatNumber(
|
|
121
123
|
range?.from,
|
|
122
|
-
|
|
123
|
-
)} ppm to ${formatNumber(range?.to,
|
|
124
|
+
tablePreferences.from.format,
|
|
125
|
+
)} ppm to ${formatNumber(range?.to, tablePreferences.to.format)} ppm`;
|
|
124
126
|
|
|
125
127
|
return (
|
|
126
128
|
<TabsProvider defaultSelectedTabId={0}>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { yupResolver } from '@hookform/resolvers/yup';
|
|
1
|
+
import { revalidateLogic } from '@tanstack/react-form';
|
|
3
2
|
import type { Range } from '@zakodium/nmr-types';
|
|
4
3
|
import type { CSSProperties } from 'react';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
4
|
+
import { useMemo } from 'react';
|
|
5
|
+
import { useFormContext, useWatch } from 'react-hook-form';
|
|
6
|
+
import { AppForm, useForm } from 'react-science/ui';
|
|
7
|
+
import { z } from 'zod/v4';
|
|
8
|
+
import type { CheckParams } from 'zod/v4/core';
|
|
8
9
|
|
|
9
|
-
import { NumberInput2Controller } from '../../../../elements/NumberInput2Controller.js';
|
|
10
10
|
import { useTabsController } from '../../../../elements/TabsProvider.js';
|
|
11
11
|
import { useActiveNucleusTab } from '../../../../hooks/useActiveNucleusTab.js';
|
|
12
12
|
import { usePanelPreferences } from '../../../../hooks/usePanelPreferences.js';
|
|
@@ -42,31 +42,43 @@ export function NewSignalTab(props: NewSignalTabProps) {
|
|
|
42
42
|
const { selectedTabId: signalIndex, selectTab } = useTabsController();
|
|
43
43
|
const { signals } = useWatch();
|
|
44
44
|
const activeTab = useActiveNucleusTab();
|
|
45
|
-
const
|
|
45
|
+
const { tablePreferences } = usePanelPreferences('ranges', activeTab);
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
const schemaFormValidation = useMemo(() => {
|
|
48
|
+
return getSignalValidationSchema(range);
|
|
49
|
+
}, [range]);
|
|
50
|
+
|
|
51
|
+
function saveHandler({ delta }: z.infer<typeof schemaFormValidation>) {
|
|
48
52
|
const newSignal = {
|
|
49
53
|
multiplicity: 'm',
|
|
50
54
|
kind: 'signal',
|
|
51
|
-
delta
|
|
55
|
+
delta,
|
|
52
56
|
js: [{ multiplicity: 'm', coupling: '' }],
|
|
53
57
|
};
|
|
54
|
-
const _signals = signals.slice().concat(newSignal);
|
|
55
58
|
|
|
59
|
+
const _signals = [...signals, newSignal];
|
|
56
60
|
setValue('signals', _signals);
|
|
57
61
|
selectTab(_signals.length - 1);
|
|
58
62
|
}
|
|
59
|
-
|
|
63
|
+
|
|
64
|
+
const form = useForm({
|
|
60
65
|
defaultValues: {
|
|
61
|
-
delta: (range.from + range.to) / 2,
|
|
66
|
+
delta: String((range.from + range.to) / 2),
|
|
67
|
+
},
|
|
68
|
+
onSubmit: ({ value }) => {
|
|
69
|
+
const parsedValues = schemaFormValidation.parse(value);
|
|
70
|
+
saveHandler(parsedValues);
|
|
71
|
+
},
|
|
72
|
+
validationLogic: revalidateLogic({ modeAfterSubmission: 'change' }),
|
|
73
|
+
validators: {
|
|
74
|
+
onDynamic: schemaFormValidation,
|
|
62
75
|
},
|
|
63
|
-
resolver: yupResolver(getSignalValidationSchema(range)),
|
|
64
76
|
});
|
|
65
77
|
|
|
66
78
|
useEvent({
|
|
67
79
|
onClick: ({ xPPM, shiftKey }) => {
|
|
68
80
|
if (signalIndex === -1 && shiftKey) {
|
|
69
|
-
reset({ delta: xPPM });
|
|
81
|
+
form.reset({ delta: String(xPPM) });
|
|
70
82
|
}
|
|
71
83
|
},
|
|
72
84
|
onBrushEnd: (options) => {
|
|
@@ -75,65 +87,53 @@ export function NewSignalTab(props: NewSignalTabProps) {
|
|
|
75
87
|
shiftKey,
|
|
76
88
|
} = options;
|
|
77
89
|
if (signalIndex === -1 && shiftKey) {
|
|
78
|
-
reset({ delta: (to - from) / 2 + from });
|
|
90
|
+
form.reset({ delta: String((to - from) / 2 + from) });
|
|
79
91
|
}
|
|
80
92
|
},
|
|
81
93
|
});
|
|
82
94
|
|
|
83
|
-
useEffect(() => {
|
|
84
|
-
requestAnimationFrame(() => {
|
|
85
|
-
setTimeout(() => {
|
|
86
|
-
setFocus('delta', { shouldSelect: true });
|
|
87
|
-
}, 0);
|
|
88
|
-
});
|
|
89
|
-
});
|
|
90
|
-
|
|
91
95
|
return (
|
|
92
96
|
<div style={styles.container}>
|
|
93
97
|
<div style={styles.innerContainer}>
|
|
94
|
-
<
|
|
95
|
-
|
|
96
|
-
{
|
|
97
|
-
|
|
98
|
-
rangesPreferences.from.format,
|
|
99
|
-
)} ppm - ${formatNumber(range.to, rangesPreferences.to.format)} ppm`}
|
|
100
|
-
]:
|
|
101
|
-
</p>
|
|
102
|
-
<NumberInput2Controller
|
|
103
|
-
control={control}
|
|
104
|
-
name="delta"
|
|
105
|
-
placeholder={`𝛅(ppm)`}
|
|
106
|
-
autoSelect
|
|
107
|
-
fill
|
|
108
|
-
/>
|
|
109
|
-
<Button
|
|
110
|
-
intent="success"
|
|
111
|
-
style={{
|
|
112
|
-
marginTop: '20px',
|
|
98
|
+
<AppForm
|
|
99
|
+
form={form}
|
|
100
|
+
onSubmitMeta={(event) => {
|
|
101
|
+
event.stopPropagation();
|
|
113
102
|
}}
|
|
114
|
-
onClick={() => handleSubmit(saveHandler)()}
|
|
115
103
|
>
|
|
116
|
-
|
|
117
|
-
|
|
104
|
+
<form.AppField name="delta">
|
|
105
|
+
{(field) => (
|
|
106
|
+
<field.NumericInput
|
|
107
|
+
autoFocus
|
|
108
|
+
placeholder="𝛅(ppm)"
|
|
109
|
+
label="Edit or select a delta value of new signal"
|
|
110
|
+
helpText={`Value should be in range [${formatNumber(
|
|
111
|
+
range.from,
|
|
112
|
+
tablePreferences.from.format,
|
|
113
|
+
)} ppm - ${formatNumber(range.to, tablePreferences.to.format)} ppm]`}
|
|
114
|
+
/>
|
|
115
|
+
)}
|
|
116
|
+
</form.AppField>
|
|
117
|
+
|
|
118
|
+
<form.SubmitButton intent="success">Add a signal</form.SubmitButton>
|
|
119
|
+
</AppForm>
|
|
118
120
|
</div>
|
|
119
121
|
</div>
|
|
120
122
|
);
|
|
121
123
|
}
|
|
122
124
|
|
|
123
125
|
function getSignalValidationSchema(range: Range) {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
}
|
|
126
|
+
const params: CheckParams = {
|
|
127
|
+
error: (ctx) => {
|
|
128
|
+
const input = Number(ctx.input);
|
|
129
|
+
return `${input.toFixed(5)} ppm out of the range`;
|
|
130
|
+
},
|
|
131
|
+
};
|
|
131
132
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
.required(),
|
|
133
|
+
return z.object({
|
|
134
|
+
delta: z.coerce
|
|
135
|
+
.number<string>()
|
|
136
|
+
.min(range.from, params)
|
|
137
|
+
.max(range.to, params),
|
|
138
138
|
});
|
|
139
139
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { WorkspaceSource } from '@zakodium/nmrium-core';
|
|
2
2
|
import type { CSSProperties, ChangeEvent, MouseEvent } from 'react';
|
|
3
3
|
import { useState } from 'react';
|
|
4
4
|
import { Button } from 'react-science/ui';
|
|
@@ -115,7 +115,7 @@ const style = {
|
|
|
115
115
|
alignItems: 'center',
|
|
116
116
|
};
|
|
117
117
|
|
|
118
|
-
const WorkspaceIndicator = (props: { source:
|
|
118
|
+
const WorkspaceIndicator = (props: { source: WorkspaceSource }) => {
|
|
119
119
|
let letter = '';
|
|
120
120
|
let backgroundColor = 'red';
|
|
121
121
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useSelector } from '@tanstack/react-store';
|
|
2
2
|
import type { Dispatch, ReactNode, SetStateAction } from 'react';
|
|
3
3
|
import {
|
|
4
4
|
createContext,
|
|
@@ -38,9 +38,9 @@ export const GeneralSettingsErrorsOpenProvider = withForm({
|
|
|
38
38
|
render: function GeneralSettingsErrorsOpenProvider({ form, children }) {
|
|
39
39
|
const [isOpen, setIsOpen] = useState(false);
|
|
40
40
|
|
|
41
|
-
const submitCount =
|
|
41
|
+
const submitCount = useSelector(form.store, (s) => s.submissionAttempts);
|
|
42
42
|
const previousSubmitCount = useRef(submitCount);
|
|
43
|
-
const errorsCount =
|
|
43
|
+
const errorsCount = useSelector(form.store, (s) => {
|
|
44
44
|
const recordErrors = s.errorMap.onDynamic;
|
|
45
45
|
if (!recordErrors) return 0;
|
|
46
46
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Callout, Collapse } from '@blueprintjs/core';
|
|
2
2
|
import styled from '@emotion/styled';
|
|
3
|
-
import {
|
|
3
|
+
import { useSelector } from '@tanstack/react-store';
|
|
4
4
|
import { Button, withForm } from 'react-science/ui';
|
|
5
5
|
|
|
6
6
|
import {
|
|
@@ -15,7 +15,7 @@ export const GeneralSettingsErrorRenderer = withForm({
|
|
|
15
15
|
validators: { onDynamic: workspaceValidation },
|
|
16
16
|
render: function GeneralSettingsErrorRenderer({ form }) {
|
|
17
17
|
const { isOpen, setIsOpen } = useErrors();
|
|
18
|
-
const errors =
|
|
18
|
+
const errors = useSelector(form.store, (state) => {
|
|
19
19
|
return Object.values(state.errorMap.onDynamic ?? {}).flat();
|
|
20
20
|
});
|
|
21
21
|
|