nmrium 0.36.0 → 0.38.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/FooterBanner.js +1 -1
- package/lib/component/1d/Viewer1D.js +26 -21
- package/lib/component/1d/integral/Integral.d.ts +2 -6
- package/lib/component/1d/integral/IntegralResizable.d.ts +2 -6
- package/lib/component/1d/integral/IntegralResizable.js +2 -3
- package/lib/component/1d/multiAnalysis/MultiAnalysisRanges.js +1 -1
- package/lib/component/1d/multiplicityTree/MultiplicityTree.js +7 -9
- package/lib/component/1d/peaks/PeakAnnotation.js +1 -2
- package/lib/component/1d/ranges/Range.js +9 -8
- package/lib/component/1d/ranges/Ranges.js +5 -7
- package/lib/component/1d/tool/BaseLineZones.js +1 -2
- package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.js +4 -5
- package/lib/component/1d-2d/components/FloatMoleculeStructures/index.js +13 -17
- package/lib/component/2d/1d-tracer/Left1DChart.js +1 -1
- package/lib/component/2d/1d-tracer/VerticalSliceChart.js +1 -1
- package/lib/component/2d/Chart2D.js +1 -1
- package/lib/component/2d/Viewer2D.js +10 -9
- package/lib/component/2d/fid/FidCanvas.js +4 -6
- package/lib/component/2d/ft/Contours.js +1 -7
- package/lib/component/2d/utilities/DimensionLayout.d.ts +9 -24
- package/lib/component/2d/utilities/scale.d.ts +2 -1
- package/lib/component/2d/utilities/scale.js +1 -1
- package/lib/component/2d/zones/Zones.js +1 -1
- package/lib/component/EventsTrackers/KeysListenerTracker.js +28 -21
- package/lib/component/NMRium.d.ts +2 -0
- package/lib/component/NMRium.js +22 -15
- package/lib/component/assignment/AssignmentsReducer.d.ts +1 -1
- package/lib/component/context/DispatchContext.d.ts +23 -3
- package/lib/component/context/DispatchContext.js +1 -1
- package/lib/component/context/LoggerContext.js +1 -1
- package/lib/component/elements/Button.js +7 -9
- package/lib/component/elements/IsotopesViewer.js +1 -1
- package/lib/component/elements/ReactTable/ReactTable.js +1 -2
- package/lib/component/elements/RemoveAssignmentsButton.d.ts +4 -0
- package/lib/component/{panels/RangesPanel/TableColumns → elements}/RemoveAssignmentsButton.js +14 -1
- package/lib/component/elements/formik/FormikCheckBox.js +1 -1
- package/lib/component/elements/formik/FormikColorInput.js +1 -1
- package/lib/component/elements/formik/FormikColorPicker.js +1 -1
- package/lib/component/elements/formik/FormikColumnFormatField.js +1 -1
- package/lib/component/elements/formik/FormikInput.js +1 -1
- package/lib/component/elements/formik/FormikSelect.js +2 -2
- package/lib/component/elements/formik/FormikSlider.js +1 -1
- package/lib/component/elements/formik/FormikTextarea.js +2 -2
- package/lib/component/header/ApodizationOptionsPanel.js +4 -5
- package/lib/component/header/AutoPeakPickingOptionPanel.js +1 -2
- package/lib/component/header/BaseLineCorrectionPanel.js +4 -5
- package/lib/component/header/Header.js +5 -7
- package/lib/component/header/PhaseCorrectionPanel.js +7 -8
- package/lib/component/header/RangesPickingOptionPanel.js +1 -2
- package/lib/component/header/ZeroFillingOptionsPanel.js +3 -11
- package/lib/component/header/Zones2DOptionPanel.js +5 -6
- package/lib/component/hooks/useExport.js +1 -0
- package/lib/component/hooks/useToolsFunctions.js +8 -10
- package/lib/component/loader/DropZone.js +4 -5
- package/lib/component/loader/NoData.js +1 -1
- package/lib/component/modal/AboutPredictionModal.d.ts +2 -0
- package/lib/component/modal/AboutPredictionModal.js +49 -0
- package/lib/component/modal/AlignSpectraModal.js +1 -2
- package/lib/component/modal/EditPeakShapeModal.js +1 -2
- package/lib/component/modal/ImportPublicationStringModal.js +1 -2
- package/lib/component/modal/LoadJCAMPModal.js +2 -3
- package/lib/component/modal/MoleculeStructureEditorModal.js +24 -19
- package/lib/component/modal/PredictSpectraModal.js +24 -21
- package/lib/component/modal/changeSum/SelectMolecule.js +1 -1
- package/lib/component/modal/editRange/EditRangeModal.js +3 -4
- package/lib/component/modal/editRange/forms/components/AddSignalFormTab.js +2 -2
- package/lib/component/modal/editRange/forms/components/CouplingsTable.js +1 -1
- package/lib/component/modal/metaImportation/MetaImportationModal.js +2 -3
- package/lib/component/modal/setting/settings-tabs/DatabasesTabContent.js +4 -4
- package/lib/component/modal/setting/settings-tabs/FormattingTabContent.js +2 -2
- package/lib/component/modal/setting/settings-tabs/InfoBlockTabContent.js +2 -2
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignmentTable.js +1 -2
- package/lib/component/panels/AutomaticAssignment/useAutoAssignments.js +7 -6
- package/lib/component/panels/InformationPanel.js +6 -6
- package/lib/component/panels/IntegralsPanel/IntegralPanel.js +11 -20
- package/lib/component/panels/IntegralsPanel/IntegralTable.js +27 -23
- package/lib/component/panels/IntegralsPanel/IntegralsPreferences.js +8 -5
- package/lib/component/panels/MatrixGenerationPanel/ExclusionsZonesTable.js +1 -1
- package/lib/component/panels/MatrixGenerationPanel/FiltersOptions.js +4 -4
- package/lib/component/panels/MatrixGenerationPanel/MatrixGenerationPanel.js +1 -2
- package/lib/component/panels/MoleculesPanel/MoleculeHeader.js +1 -2
- package/lib/component/panels/MoleculesPanel/MoleculePanel.js +10 -13
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.d.ts +1 -0
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +7 -7
- package/lib/component/panels/MoleculesPanel/Utilities.d.ts +4 -1
- package/lib/component/panels/MoleculesPanel/Utilities.js +2 -2
- package/lib/component/panels/MoleculesPanel/useAtomAssignment.js +8 -9
- package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.js +3 -4
- package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisTable.js +1 -2
- package/lib/component/panels/MultipleSpectraAnalysisPanel/preferences/AnalysisTablePreferences.js +2 -2
- package/lib/component/panels/MultipleSpectraAnalysisPanel/preferences/LegendsPreferences.js +2 -2
- package/lib/component/panels/MultipleSpectraAnalysisPanel/preferences/MultipleAnalysisCodeEditor.js +1 -1
- package/lib/component/panels/Panels.js +1 -1
- package/lib/component/panels/PeaksPanel/PeaksPanel.js +4 -5
- package/lib/component/panels/PeaksPanel/PeaksTable.js +4 -5
- package/lib/component/panels/RangesPanel/RangesHeader.js +12 -15
- package/lib/component/panels/RangesPanel/RangesPanel.js +24 -29
- package/lib/component/panels/RangesPanel/RangesTableRow.d.ts +0 -1
- package/lib/component/panels/RangesPanel/RangesTableRow.js +0 -11
- package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js +2 -3
- package/lib/component/panels/RangesPanel/TableColumns/RelativeColumn.js +3 -3
- package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.js +2 -3
- package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.js +1 -2
- package/lib/component/panels/RangesPanel/hooks/useEditRangeModal.d.ts +1 -1
- package/lib/component/panels/RangesPanel/hooks/useEditRangeModal.js +16 -14
- package/lib/component/panels/SpectrumsPanel/SpectraPanelHeader.js +16 -16
- package/lib/component/panels/SpectrumsPanel/SpectraPreferences.js +2 -2
- package/lib/component/panels/SpectrumsPanel/SpectraTable.js +7 -5
- package/lib/component/panels/SpectrumsPanel/SpectrumsTabs.js +4 -5
- package/lib/component/panels/SpectrumsPanel/base/ShowHideSpectrumButton.js +3 -7
- package/lib/component/panels/SpectrumsPanel/base/SpectraColumnsManager.js +1 -1
- package/lib/component/panels/SpectrumsPanel/base/setting/SpectrumSetting.js +4 -2
- package/lib/component/panels/SpectrumsPanel/base/setting/processSnapPlot.js +2 -2
- package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +4 -8
- package/lib/component/panels/SummaryPanel/SummaryPanel.js +39 -34
- package/lib/component/panels/SummaryPanel/utilities/Utilities.js +1 -1
- package/lib/component/panels/ZonesPanel/TableColumns/ActionsColumn.d.ts +2 -21
- package/lib/component/panels/ZonesPanel/TableColumns/ActionsColumn.js +22 -20
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumn.d.ts +4 -5
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumn.js +12 -16
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.d.ts +3 -7
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.js +2 -2
- package/lib/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.d.ts +2 -2
- package/lib/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.js +6 -7
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.d.ts +4 -5
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.js +27 -19
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumns.d.ts +3 -7
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumns.js +2 -2
- package/lib/component/panels/ZonesPanel/ZonesPanel.js +15 -18
- package/lib/component/panels/ZonesPanel/ZonesTable.js +2 -51
- package/lib/component/panels/ZonesPanel/ZonesTableRow.d.ts +3 -3
- package/lib/component/panels/ZonesPanel/ZonesTableRow.js +2 -22
- package/lib/component/panels/ZonesPanel/hooks/useMapZones.d.ts +16 -0
- package/lib/component/panels/ZonesPanel/hooks/useMapZones.js +52 -0
- package/lib/component/panels/databasePanel/DatabasePanel.js +9 -7
- package/lib/component/panels/filtersPanel/FilterPanel.js +1 -2
- package/lib/component/panels/filtersPanel/FiltersTable.js +8 -9
- package/lib/component/panels/header/DefaultPanelHeader.js +1 -1
- package/lib/component/panels/header/SpectraAutomaticPickingButton.js +2 -3
- package/lib/component/panels/predictionPanel/PredictionPanel.js +10 -6
- package/lib/component/reducer/IgnoreActions.d.ts +2 -1
- package/lib/component/reducer/IgnoreActions.js +35 -32
- package/lib/component/reducer/Reducer.d.ts +8 -5
- package/lib/component/reducer/Reducer.js +199 -221
- package/lib/component/reducer/actions/AssignmentsActions.d.ts +7 -6
- package/lib/component/reducer/actions/AssignmentsActions.js +2 -2
- package/lib/component/reducer/actions/CorrelationsActions.d.ts +21 -13
- package/lib/component/reducer/actions/CorrelationsActions.js +25 -20
- package/lib/component/reducer/actions/DatabaseActions.d.ts +15 -2
- package/lib/component/reducer/actions/DatabaseActions.js +5 -2
- package/lib/component/reducer/actions/DimensionsActions.d.ts +8 -3
- package/lib/component/reducer/actions/DimensionsActions.js +3 -5
- package/lib/component/reducer/actions/DomainActions.d.ts +11 -5
- package/lib/component/reducer/actions/DomainActions.js +13 -19
- package/lib/component/reducer/actions/FiltersActions.d.ts +70 -23
- package/lib/component/reducer/actions/FiltersActions.js +250 -255
- package/lib/component/reducer/actions/GlobalActions.d.ts +7 -2
- package/lib/component/reducer/actions/GlobalActions.js +3 -3
- package/lib/component/reducer/actions/IntegralsActions.d.ts +28 -7
- package/lib/component/reducer/actions/IntegralsActions.js +16 -15
- package/lib/component/reducer/actions/LoadActions.d.ts +23 -5
- package/lib/component/reducer/actions/LoadActions.js +65 -57
- package/lib/component/reducer/actions/MoleculeActions.d.ts +38 -9
- package/lib/component/reducer/actions/MoleculeActions.js +53 -20
- package/lib/component/reducer/actions/PeaksActions.d.ts +39 -8
- package/lib/component/reducer/actions/PeaksActions.js +19 -11
- package/lib/component/reducer/actions/PreferencesActions.d.ts +8 -3
- package/lib/component/reducer/actions/PreferencesActions.js +22 -7
- package/lib/component/reducer/actions/RangesActions.d.ts +85 -18
- package/lib/component/reducer/actions/RangesActions.js +80 -65
- package/lib/component/reducer/actions/SpectraAnalysisAction.d.ts +7 -1
- package/lib/component/reducer/actions/SpectrumsActions.d.ts +57 -24
- package/lib/component/reducer/actions/SpectrumsActions.js +69 -60
- package/lib/component/reducer/actions/ToolsActions.d.ts +59 -21
- package/lib/component/reducer/actions/ToolsActions.js +54 -32
- package/lib/component/reducer/actions/ZonesActions.d.ts +79 -15
- package/lib/component/reducer/actions/ZonesActions.js +68 -49
- package/lib/component/reducer/helper/Zoom1DManager.d.ts +6 -5
- package/lib/component/reducer/helper/Zoom1DManager.js +1 -1
- package/lib/component/reducer/helper/ZoomHistoryManager.js +2 -2
- package/lib/component/reducer/helper/get2DRange.d.ts +7 -1
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js +1 -0
- package/lib/component/reducer/preferences/preferencesReducer.d.ts +1 -1
- package/lib/component/reducer/types/ActionType.d.ts +6 -0
- package/lib/component/reducer/types/ActionType.js +1 -0
- package/lib/component/toolbar/BasicToolBar.js +6 -9
- package/lib/component/toolbar/FunctionToolBar.js +4 -9
- package/lib/component/toolbar/ToolBar.js +1 -1
- package/lib/component/toolbar/ToolTypes.d.ts +2 -2
- package/lib/component/utility/Events.d.ts +4 -4
- package/lib/component/utility/Events.js +2 -2
- package/lib/component/utility/GroupByInfoKey.js +1 -1
- package/lib/component/utility/getSpectraObjectPaths.js +1 -1
- package/lib/component/workspaces/Workspace.d.ts +2 -1
- package/lib/component/workspaces/exercise.js +31 -0
- package/lib/component/workspaces/workspaceDefaultProperties.js +1 -0
- package/lib/data/PredictionManager.d.ts +5 -8
- package/lib/data/PredictionManager.js +3 -3
- package/lib/data/data1d/Spectrum1D/getSpectrumErrorValue.js +1 -1
- package/lib/data/data1d/Spectrum1D/initiateDatum1D.js +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/changeRangeRelativeValue.d.ts +2 -3
- package/lib/data/data1d/Spectrum1D/ranges/changeRangeRelativeValue.js +5 -4
- package/lib/data/data1d/Spectrum1D/ranges/generateSpectrumFromRanges.d.ts +5 -3
- package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.d.ts +1 -35
- package/lib/data/data1d/Spectrum1D/ranges/mapRanges.d.ts +2 -35
- package/lib/data/data1d/filter1d/baselineCorrection.d.ts +7 -10
- package/lib/data/data1d/multipleSpectraAnalysis.d.ts +1 -1
- package/lib/data/data2d/Processing2D.d.ts +3 -3
- package/lib/data/data2d/Spectrum2D/contours.d.ts +1 -4
- package/lib/data/data2d/Spectrum2D/contours.js +0 -1
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.js +1 -1
- package/lib/data/data2d/Spectrum2D/zones/changeZoneSignal.d.ts +5 -1
- package/lib/data/data2d/Spectrum2D/zones/changeZoneSignal.js +6 -8
- package/lib/data/data2d/Spectrum2D/zones/detectZonesManual.d.ts +2 -0
- package/lib/data/data2d/Spectrum2D/zones/initiateZones.d.ts +2 -0
- package/lib/data/data2d/Spectrum2D/zones/mapZones.d.ts +2 -0
- package/lib/data/matrixGeneration.js +4 -2
- package/lib/data/molecules/Molecule.d.ts +3 -3
- package/lib/data/molecules/MoleculeManager.d.ts +5 -5
- package/lib/data/molecules/MoleculeManager.js +1 -1
- package/lib/data/utilities/ZoneUtilities.js +0 -1
- package/lib/data/utilities/generateColor.js +1 -1
- package/lib/data/utilities/isNumber.d.ts +1 -0
- package/lib/data/utilities/isNumber.js +3 -0
- package/lib/types/NMRiumGeneralPreferences.d.ts +1 -0
- package/lib/versionInfo.js +1 -1
- package/lib-cjs/component/1d/FooterBanner.js +1 -1
- package/lib-cjs/component/1d/Viewer1D.js +25 -20
- package/lib-cjs/component/1d/integral/IntegralResizable.js +2 -3
- package/lib-cjs/component/1d/multiAnalysis/MultiAnalysisRanges.js +1 -1
- package/lib-cjs/component/1d/multiplicityTree/MultiplicityTree.js +7 -9
- package/lib-cjs/component/1d/peaks/PeakAnnotation.js +1 -2
- package/lib-cjs/component/1d/ranges/Range.js +9 -8
- package/lib-cjs/component/1d/ranges/Ranges.js +5 -7
- package/lib-cjs/component/1d/tool/BaseLineZones.js +1 -2
- package/lib-cjs/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.js +4 -5
- package/lib-cjs/component/1d-2d/components/FloatMoleculeStructures/index.js +13 -17
- package/lib-cjs/component/2d/1d-tracer/Left1DChart.js +1 -1
- package/lib-cjs/component/2d/1d-tracer/VerticalSliceChart.js +1 -1
- package/lib-cjs/component/2d/Chart2D.js +1 -1
- package/lib-cjs/component/2d/Viewer2D.js +10 -9
- package/lib-cjs/component/2d/fid/FidCanvas.js +4 -6
- package/lib-cjs/component/2d/ft/Contours.js +1 -7
- package/lib-cjs/component/2d/utilities/scale.js +1 -1
- package/lib-cjs/component/2d/zones/Zones.js +1 -1
- package/lib-cjs/component/EventsTrackers/KeysListenerTracker.js +28 -21
- package/lib-cjs/component/NMRium.js +19 -12
- package/lib-cjs/component/context/DispatchContext.js +1 -1
- package/lib-cjs/component/context/LoggerContext.js +1 -1
- package/lib-cjs/component/elements/Button.js +7 -9
- package/lib-cjs/component/elements/IsotopesViewer.js +1 -1
- package/lib-cjs/component/elements/ReactTable/ReactTable.js +1 -2
- package/lib-cjs/component/{panels/RangesPanel/TableColumns → elements}/RemoveAssignmentsButton.js +15 -2
- package/lib-cjs/component/elements/Tab/Tabs.js +1 -1
- package/lib-cjs/component/elements/formik/FormikCheckBox.js +1 -1
- package/lib-cjs/component/elements/formik/FormikColorInput.js +1 -1
- package/lib-cjs/component/elements/formik/FormikColorPicker.js +1 -1
- package/lib-cjs/component/elements/formik/FormikColumnFormatField.js +1 -1
- package/lib-cjs/component/elements/formik/FormikInput.js +1 -1
- package/lib-cjs/component/elements/formik/FormikSelect.js +2 -2
- package/lib-cjs/component/elements/formik/FormikSlider.js +1 -1
- package/lib-cjs/component/elements/formik/FormikTextarea.js +2 -2
- package/lib-cjs/component/header/ApodizationOptionsPanel.js +3 -4
- package/lib-cjs/component/header/AutoPeakPickingOptionPanel.js +1 -2
- package/lib-cjs/component/header/BaseLineCorrectionPanel.js +4 -5
- package/lib-cjs/component/header/Header.js +5 -7
- package/lib-cjs/component/header/PhaseCorrectionPanel.js +7 -8
- package/lib-cjs/component/header/RangesPickingOptionPanel.js +1 -2
- package/lib-cjs/component/header/ZeroFillingOptionsPanel.js +3 -11
- package/lib-cjs/component/header/Zones2DOptionPanel.js +5 -6
- package/lib-cjs/component/highlight/index.js +1 -1
- package/lib-cjs/component/hooks/useExport.js +1 -0
- package/lib-cjs/component/hooks/useTableSortBy.js +1 -1
- package/lib-cjs/component/hooks/useToolsFunctions.js +8 -10
- package/lib-cjs/component/hooks/useXYReduce.js +1 -1
- package/lib-cjs/component/loader/DropZone.js +4 -5
- package/lib-cjs/component/loader/NoData.js +1 -1
- package/lib-cjs/component/modal/AboutPredictionModal.js +54 -0
- package/lib-cjs/component/modal/AlignSpectraModal.js +1 -2
- package/lib-cjs/component/modal/EditPeakShapeModal.js +1 -2
- package/lib-cjs/component/modal/ImportPublicationStringModal.js +1 -2
- package/lib-cjs/component/modal/LoadJCAMPModal.js +2 -3
- package/lib-cjs/component/modal/MoleculeStructureEditorModal.js +24 -19
- package/lib-cjs/component/modal/PredictSpectraModal.js +24 -21
- package/lib-cjs/component/modal/changeSum/SelectMolecule.js +1 -1
- package/lib-cjs/component/modal/editRange/EditRangeModal.js +3 -4
- package/lib-cjs/component/modal/editRange/forms/components/AddSignalFormTab.js +2 -2
- package/lib-cjs/component/modal/editRange/forms/components/CouplingsTable.js +1 -1
- package/lib-cjs/component/modal/metaImportation/MetaImportationModal.js +2 -3
- package/lib-cjs/component/modal/setting/settings-tabs/DatabasesTabContent.js +4 -4
- package/lib-cjs/component/modal/setting/settings-tabs/FormattingTabContent.js +2 -2
- package/lib-cjs/component/modal/setting/settings-tabs/InfoBlockTabContent.js +2 -2
- package/lib-cjs/component/panels/AutomaticAssignment/AutomaticAssignmentTable.js +1 -2
- package/lib-cjs/component/panels/AutomaticAssignment/useAutoAssignments.js +7 -6
- package/lib-cjs/component/panels/InformationPanel.js +6 -6
- package/lib-cjs/component/panels/IntegralsPanel/IntegralPanel.js +11 -20
- package/lib-cjs/component/panels/IntegralsPanel/IntegralTable.js +27 -23
- package/lib-cjs/component/panels/IntegralsPanel/IntegralsPreferences.js +7 -4
- package/lib-cjs/component/panels/MatrixGenerationPanel/ExclusionsZonesTable.js +1 -1
- package/lib-cjs/component/panels/MatrixGenerationPanel/FiltersOptions.js +4 -4
- package/lib-cjs/component/panels/MatrixGenerationPanel/MatrixGenerationPanel.js +1 -2
- package/lib-cjs/component/panels/MoleculesPanel/MoleculeHeader.js +1 -2
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanel.js +10 -13
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanelHeader.js +7 -7
- package/lib-cjs/component/panels/MoleculesPanel/Utilities.js +2 -2
- package/lib-cjs/component/panels/MoleculesPanel/useAtomAssignment.js +8 -9
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.js +3 -4
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisTable.js +1 -2
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/preferences/AnalysisTablePreferences.js +2 -2
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/preferences/LegendsPreferences.js +2 -2
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/preferences/MultipleAnalysisCodeEditor.js +1 -1
- package/lib-cjs/component/panels/Panels.js +1 -1
- package/lib-cjs/component/panels/PeaksPanel/PeaksPanel.js +4 -5
- package/lib-cjs/component/panels/PeaksPanel/PeaksTable.js +4 -5
- package/lib-cjs/component/panels/RangesPanel/RangesHeader.js +12 -15
- package/lib-cjs/component/panels/RangesPanel/RangesPanel.js +24 -29
- package/lib-cjs/component/panels/RangesPanel/RangesTableRow.js +0 -12
- package/lib-cjs/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js +2 -3
- package/lib-cjs/component/panels/RangesPanel/TableColumns/RelativeColumn.js +3 -3
- package/lib-cjs/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.js +2 -3
- package/lib-cjs/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.js +1 -2
- package/lib-cjs/component/panels/RangesPanel/hooks/useEditRangeModal.js +16 -14
- package/lib-cjs/component/panels/SpectrumsPanel/SpectraPanelHeader.js +16 -16
- package/lib-cjs/component/panels/SpectrumsPanel/SpectraPreferences.js +2 -2
- package/lib-cjs/component/panels/SpectrumsPanel/SpectraTable.js +7 -5
- package/lib-cjs/component/panels/SpectrumsPanel/SpectrumsTabs.js +4 -5
- package/lib-cjs/component/panels/SpectrumsPanel/base/ShowHideSpectrumButton.js +3 -7
- package/lib-cjs/component/panels/SpectrumsPanel/base/SpectraColumnsManager.js +1 -1
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/SpectrumSetting.js +4 -2
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/processSnapPlot.js +2 -2
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +4 -8
- package/lib-cjs/component/panels/SummaryPanel/SummaryPanel.js +39 -34
- package/lib-cjs/component/panels/SummaryPanel/utilities/Utilities.js +1 -1
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/ActionsColumn.js +22 -20
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumn.js +12 -19
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.js +2 -2
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.js +6 -7
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.js +27 -22
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumns.js +2 -2
- package/lib-cjs/component/panels/ZonesPanel/ZonesPanel.js +15 -18
- package/lib-cjs/component/panels/ZonesPanel/ZonesTable.js +2 -51
- package/lib-cjs/component/panels/ZonesPanel/ZonesTableRow.js +1 -21
- package/lib-cjs/component/panels/ZonesPanel/hooks/useMapZones.js +56 -0
- package/lib-cjs/component/panels/databasePanel/DatabasePanel.js +8 -6
- package/lib-cjs/component/panels/filtersPanel/FilterPanel.js +1 -2
- package/lib-cjs/component/panels/filtersPanel/FiltersTable.js +8 -9
- package/lib-cjs/component/panels/header/DefaultPanelHeader.js +1 -1
- package/lib-cjs/component/panels/header/SpectraAutomaticPickingButton.js +2 -3
- package/lib-cjs/component/panels/predictionPanel/PredictionPanel.js +10 -6
- package/lib-cjs/component/reducer/IgnoreActions.js +35 -55
- package/lib-cjs/component/reducer/Reducer.js +199 -221
- package/lib-cjs/component/reducer/actions/AssignmentsActions.js +3 -3
- package/lib-cjs/component/reducer/actions/CorrelationsActions.js +23 -18
- package/lib-cjs/component/reducer/actions/DatabaseActions.js +4 -1
- package/lib-cjs/component/reducer/actions/DimensionsActions.js +3 -6
- package/lib-cjs/component/reducer/actions/DomainActions.js +15 -23
- package/lib-cjs/component/reducer/actions/FiltersActions.js +267 -272
- package/lib-cjs/component/reducer/actions/GlobalActions.js +4 -4
- package/lib-cjs/component/reducer/actions/IntegralsActions.js +19 -18
- package/lib-cjs/component/reducer/actions/LoadActions.js +68 -60
- package/lib-cjs/component/reducer/actions/MoleculeActions.js +56 -23
- package/lib-cjs/component/reducer/actions/PeaksActions.js +23 -15
- package/lib-cjs/component/reducer/actions/PreferencesActions.js +24 -9
- package/lib-cjs/component/reducer/actions/RangesActions.js +81 -64
- package/lib-cjs/component/reducer/actions/SpectrumsActions.js +77 -67
- package/lib-cjs/component/reducer/actions/ToolsActions.js +54 -31
- package/lib-cjs/component/reducer/actions/ZonesActions.js +73 -52
- package/lib-cjs/component/reducer/core/Constants.js +1 -1
- package/lib-cjs/component/reducer/helper/Zoom1DManager.js +2 -2
- package/lib-cjs/component/reducer/helper/ZoomHistoryManager.js +2 -2
- package/lib-cjs/component/reducer/preferences/panelsPreferencesDefaultValues.js +1 -0
- package/lib-cjs/component/reducer/types/ActionType.js +2 -0
- package/lib-cjs/component/toolbar/BasicToolBar.js +6 -9
- package/lib-cjs/component/toolbar/FunctionToolBar.js +4 -9
- package/lib-cjs/component/toolbar/ToolBar.js +1 -1
- package/lib-cjs/component/utility/GroupByInfoKey.js +1 -1
- package/lib-cjs/component/utility/getSpectraObjectPaths.js +1 -1
- package/lib-cjs/component/workspaces/exercise.js +31 -0
- package/lib-cjs/component/workspaces/workspaceDefaultProperties.js +1 -0
- package/lib-cjs/data/PredictionManager.js +3 -3
- package/lib-cjs/data/SpectraManager.js +1 -1
- package/lib-cjs/data/data1d/Spectrum1D/getSpectrumErrorValue.js +1 -1
- package/lib-cjs/data/data1d/Spectrum1D/initiateDatum1D.js +1 -1
- package/lib-cjs/data/data1d/Spectrum1D/ranges/changeRangeRelativeValue.js +5 -4
- package/lib-cjs/data/data1d/multipleSpectraAnalysis.js +2 -2
- package/lib-cjs/data/data2d/Spectrum2D/contours.js +0 -1
- package/lib-cjs/data/data2d/Spectrum2D/initiateDatum2D.js +1 -1
- package/lib-cjs/data/data2d/Spectrum2D/zones/changeZoneSignal.js +6 -8
- package/lib-cjs/data/matrixGeneration.js +4 -2
- package/lib-cjs/data/molecules/MoleculeManager.js +1 -1
- package/lib-cjs/data/utilities/ZoneUtilities.js +0 -1
- package/lib-cjs/data/utilities/generateColor.js +1 -1
- package/lib-cjs/data/utilities/isNumber.js +7 -0
- package/lib-cjs/versionInfo.js +1 -1
- package/package.json +35 -34
- package/lib/component/panels/RangesPanel/TableColumns/RemoveAssignmentsButton.d.ts +0 -3
- package/lib/component/reducer/actions/HistoryActions.d.ts +0 -4
- package/lib/component/reducer/actions/HistoryActions.js +0 -40
- package/lib/component/reducer/types/HistoryTypes.d.ts +0 -4
- package/lib/component/reducer/types/HistoryTypes.js +0 -4
- package/lib/component/reducer/types/Types.d.ts +0 -132
- package/lib/component/reducer/types/Types.js +0 -126
- package/lib/component/toolbar/HistoryToolBar.d.ts +0 -8
- package/lib/component/toolbar/HistoryToolBar.js +0 -30
- package/lib/data/utilities/isMolFileEmpty.d.ts +0 -1
- package/lib/data/utilities/isMolFileEmpty.js +0 -6
- package/lib-cjs/component/reducer/actions/HistoryActions.js +0 -45
- package/lib-cjs/component/reducer/types/HistoryTypes.js +0 -7
- package/lib-cjs/component/reducer/types/Types.js +0 -131
- package/lib-cjs/component/toolbar/HistoryToolBar.js +0 -35
- package/lib-cjs/data/utilities/isMolFileEmpty.js +0 -10
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { Spectrum } from 'nmr-load-save';
|
|
2
|
+
export type Experiment = 'proton' | 'carbon' | 'cosy' | 'hsqc' | 'hmbc';
|
|
3
|
+
export type SpectraPredictionOptions = Record<Experiment, boolean>;
|
|
4
|
+
export type PredictedSpectraResult = Partial<Record<Experiment, Spectrum>>;
|
|
2
5
|
export interface PredictionOptions {
|
|
3
6
|
name: string;
|
|
4
7
|
frequency: number;
|
|
@@ -20,13 +23,7 @@ export interface PredictionOptions {
|
|
|
20
23
|
y: number;
|
|
21
24
|
};
|
|
22
25
|
};
|
|
23
|
-
spectra:
|
|
24
|
-
proton: boolean;
|
|
25
|
-
carbon: boolean;
|
|
26
|
-
cosy: boolean;
|
|
27
|
-
hsqc: boolean;
|
|
28
|
-
hmbc: boolean;
|
|
29
|
-
};
|
|
26
|
+
spectra: SpectraPredictionOptions;
|
|
30
27
|
}
|
|
31
28
|
export declare const defaultPredictionOptions: PredictionOptions;
|
|
32
29
|
export declare const FREQUENCIES: Array<{
|
|
@@ -34,4 +31,4 @@ export declare const FREQUENCIES: Array<{
|
|
|
34
31
|
label: string;
|
|
35
32
|
}>;
|
|
36
33
|
export declare function predictSpectra(molfile: string): Promise<any>;
|
|
37
|
-
export declare function generateSpectra(
|
|
34
|
+
export declare function generateSpectra(predictedSpectra: PredictedSpectraResult, inputOptions: PredictionOptions, color: string): Spectrum[];
|
|
@@ -48,11 +48,11 @@ export async function predictSpectra(molfile) {
|
|
|
48
48
|
},
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
|
-
export function generateSpectra(
|
|
51
|
+
export function generateSpectra(predictedSpectra, inputOptions, color) {
|
|
52
52
|
const spectra = [];
|
|
53
|
-
for (const experiment in
|
|
53
|
+
for (const experiment in predictedSpectra) {
|
|
54
54
|
if (inputOptions.spectra[experiment]) {
|
|
55
|
-
const spectrum =
|
|
55
|
+
const spectrum = predictedSpectra[experiment];
|
|
56
56
|
switch (experiment) {
|
|
57
57
|
case 'proton':
|
|
58
58
|
case 'carbon': {
|
|
@@ -25,7 +25,7 @@ export function initiateDatum1D(spectrum, options = {}) {
|
|
|
25
25
|
};
|
|
26
26
|
spectrumObj.originalInfo = spectrumObj.info;
|
|
27
27
|
spectrumObj.meta = { ...spectrum.meta };
|
|
28
|
-
spectrumObj.
|
|
28
|
+
spectrumObj.customInfo = { ...spectrum.customInfo };
|
|
29
29
|
spectrumObj.data = convertDataToFloat64Array(spectrum.data);
|
|
30
30
|
spectrumObj.originalData = spectrumObj.data;
|
|
31
31
|
spectrumObj.filters = Object.assign([], spectrum.filters); //array of object {name: "FilterName", options: FilterOptions = {value | object} }
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Spectrum1D } from 'nmr-load-save';
|
|
2
|
-
interface
|
|
2
|
+
export interface ChangeRangeRelativeValueProps {
|
|
3
3
|
id: string;
|
|
4
4
|
value: number;
|
|
5
5
|
}
|
|
@@ -8,5 +8,4 @@ interface RangeProps {
|
|
|
8
8
|
* @param {Spectrum1D} spectrum spectrum 1d
|
|
9
9
|
* @param {RangeProps} newRange
|
|
10
10
|
*/
|
|
11
|
-
export declare function changeRangeRelativeValue(spectrum: Spectrum1D,
|
|
12
|
-
export {};
|
|
11
|
+
export declare function changeRangeRelativeValue(spectrum: Spectrum1D, data: ChangeRangeRelativeValueProps): void;
|
|
@@ -3,12 +3,13 @@
|
|
|
3
3
|
* @param {Spectrum1D} spectrum spectrum 1d
|
|
4
4
|
* @param {RangeProps} newRange
|
|
5
5
|
*/
|
|
6
|
-
export function changeRangeRelativeValue(spectrum,
|
|
7
|
-
const
|
|
6
|
+
export function changeRangeRelativeValue(spectrum, data) {
|
|
7
|
+
const { id, value } = data;
|
|
8
|
+
const index = spectrum.ranges.values.findIndex((range) => range.id === id);
|
|
8
9
|
if (index !== -1 && spectrum.ranges.options.sum) {
|
|
9
10
|
const { absolute, integration } = spectrum.ranges.values[index];
|
|
10
|
-
const ratio = absolute /
|
|
11
|
-
const sum = (
|
|
11
|
+
const ratio = absolute / value;
|
|
12
|
+
const sum = (value / integration) * spectrum.ranges.options.sum;
|
|
12
13
|
spectrum.ranges.options = {
|
|
13
14
|
...spectrum.ranges.options,
|
|
14
15
|
mf: undefined,
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Spectrum1D } from 'nmr-load-save';
|
|
2
|
+
import { NMRRange } from 'nmr-processing';
|
|
2
3
|
import { UsedColors } from '../../../../types/UsedColors';
|
|
3
|
-
export
|
|
4
|
+
export interface ResurrectSpectrumInfo {
|
|
4
5
|
nucleus: string;
|
|
5
6
|
solvent: string;
|
|
6
7
|
name?: string;
|
|
7
8
|
frequency?: number;
|
|
8
9
|
color?: string;
|
|
9
|
-
}
|
|
10
|
+
}
|
|
11
|
+
export declare function generateSpectrumFromRanges(ranges: NMRRange[], info: ResurrectSpectrumInfo, usedColors: UsedColors): Spectrum1D;
|
|
@@ -9,39 +9,5 @@ export declare function initiateRanges(options: Partial<{
|
|
|
9
9
|
sumAuto: boolean;
|
|
10
10
|
};
|
|
11
11
|
} & Ranges & {
|
|
12
|
-
values:
|
|
13
|
-
absolute: number;
|
|
14
|
-
signals: {
|
|
15
|
-
originDelta: number | undefined;
|
|
16
|
-
delta: number;
|
|
17
|
-
multiplicity: string;
|
|
18
|
-
js: import("nmr-processing").Jcoupling[];
|
|
19
|
-
integration?: number | undefined;
|
|
20
|
-
diaIDs?: string[] | undefined;
|
|
21
|
-
nbAtoms?: number | undefined;
|
|
22
|
-
atoms?: number[] | undefined;
|
|
23
|
-
assignment?: string | undefined;
|
|
24
|
-
peaks?: import("nmr-processing").NMRPeak1D[] | undefined;
|
|
25
|
-
statistic?: {
|
|
26
|
-
mean: number;
|
|
27
|
-
sd: number;
|
|
28
|
-
min: number;
|
|
29
|
-
max: number;
|
|
30
|
-
nb: number;
|
|
31
|
-
} | undefined;
|
|
32
|
-
kind: string;
|
|
33
|
-
id: string;
|
|
34
|
-
}[];
|
|
35
|
-
originFrom: number | undefined;
|
|
36
|
-
originTo: number | undefined;
|
|
37
|
-
from: number;
|
|
38
|
-
to: number;
|
|
39
|
-
id: string;
|
|
40
|
-
kind: string;
|
|
41
|
-
integration: number;
|
|
42
|
-
nbAtoms?: number | undefined;
|
|
43
|
-
diaIDs?: string[] | undefined;
|
|
44
|
-
pubIntegral?: number | undefined;
|
|
45
|
-
multiplicity?: string | undefined;
|
|
46
|
-
}[];
|
|
12
|
+
values: any[];
|
|
47
13
|
};
|
|
@@ -1,37 +1,4 @@
|
|
|
1
1
|
import { Range, Spectrum1D } from 'nmr-load-save';
|
|
2
|
+
import { NMRRange } from 'nmr-processing';
|
|
2
3
|
import { MapOptions } from '../../../types/common/MapOptions';
|
|
3
|
-
export declare function mapRanges(ranges: Range[], spectrum: Spectrum1D, options?: MapOptions):
|
|
4
|
-
absolute: number;
|
|
5
|
-
signals: {
|
|
6
|
-
originDelta: number | undefined;
|
|
7
|
-
delta: number;
|
|
8
|
-
multiplicity: string;
|
|
9
|
-
js: import("nmr-processing").Jcoupling[];
|
|
10
|
-
integration?: number | undefined;
|
|
11
|
-
diaIDs?: string[] | undefined;
|
|
12
|
-
nbAtoms?: number | undefined;
|
|
13
|
-
atoms?: number[] | undefined;
|
|
14
|
-
assignment?: string | undefined;
|
|
15
|
-
peaks?: import("nmr-processing").NMRPeak1D[] | undefined;
|
|
16
|
-
statistic?: {
|
|
17
|
-
mean: number;
|
|
18
|
-
sd: number;
|
|
19
|
-
min: number;
|
|
20
|
-
max: number;
|
|
21
|
-
nb: number;
|
|
22
|
-
} | undefined;
|
|
23
|
-
kind: string;
|
|
24
|
-
id: string;
|
|
25
|
-
}[];
|
|
26
|
-
originFrom: number | undefined;
|
|
27
|
-
originTo: number | undefined;
|
|
28
|
-
from: number;
|
|
29
|
-
to: number;
|
|
30
|
-
id: string;
|
|
31
|
-
kind: string;
|
|
32
|
-
integration: number;
|
|
33
|
-
nbAtoms?: number | undefined;
|
|
34
|
-
diaIDs?: string[] | undefined;
|
|
35
|
-
pubIntegral?: number | undefined;
|
|
36
|
-
multiplicity?: string | undefined;
|
|
37
|
-
}[];
|
|
4
|
+
export declare function mapRanges(ranges: Range[] | NMRRange[], spectrum: Spectrum1D, options?: MapOptions): any[];
|
|
@@ -8,21 +8,18 @@ export declare const DOMAIN_UPDATE_RULES: Readonly<FilterDomainUpdateRules>;
|
|
|
8
8
|
* @param {Spectrum1D} spectrum
|
|
9
9
|
*/
|
|
10
10
|
export type BaselineAlgorithms = 'airpls' | 'polynomial';
|
|
11
|
+
export interface BaselineCorrectionZone {
|
|
12
|
+
from: number;
|
|
13
|
+
to: number;
|
|
14
|
+
id: string;
|
|
15
|
+
}
|
|
11
16
|
export interface PolynomialOptions {
|
|
12
|
-
zones:
|
|
13
|
-
from: number;
|
|
14
|
-
to: number;
|
|
15
|
-
id: string;
|
|
16
|
-
}>;
|
|
17
|
+
zones: BaselineCorrectionZone[];
|
|
17
18
|
algorithm: 'polynomial';
|
|
18
19
|
degree: number;
|
|
19
20
|
}
|
|
20
21
|
export interface AirplsOptions {
|
|
21
|
-
zones:
|
|
22
|
-
from: number;
|
|
23
|
-
to: number;
|
|
24
|
-
id: string;
|
|
25
|
-
}>;
|
|
22
|
+
zones: BaselineCorrectionZone[];
|
|
26
23
|
algorithm: 'airpls';
|
|
27
24
|
maxIterations: number;
|
|
28
25
|
tolerance: number;
|
|
@@ -27,7 +27,7 @@ export interface AnalysisOptions {
|
|
|
27
27
|
columns: SpectraAnalysisColumns;
|
|
28
28
|
columnIndex: number;
|
|
29
29
|
}
|
|
30
|
-
interface AnalysisRow extends RangeDetectionResult {
|
|
30
|
+
export interface AnalysisRow extends RangeDetectionResult {
|
|
31
31
|
SID: string;
|
|
32
32
|
colKey?: string;
|
|
33
33
|
value?: number;
|
|
@@ -25,8 +25,8 @@ export default class Processing2D {
|
|
|
25
25
|
wheel(value: any): void;
|
|
26
26
|
shiftWheel(value: any): never[] | undefined;
|
|
27
27
|
drawContours(): {
|
|
28
|
-
positive:
|
|
29
|
-
negative:
|
|
28
|
+
positive: Readonly<import("ml-conrec").DrawContourResult<"basic">>;
|
|
29
|
+
negative: Readonly<import("ml-conrec").DrawContourResult<"basic">>;
|
|
30
30
|
};
|
|
31
|
-
getContours(zoomLevel: any, options?: any):
|
|
31
|
+
getContours(zoomLevel: any, options?: any): Readonly<import("ml-conrec").DrawContourResult<"basic">>;
|
|
32
32
|
}
|
|
@@ -32,9 +32,6 @@ interface ReturnContoursManager {
|
|
|
32
32
|
}
|
|
33
33
|
declare function getDefaultContoursLevel(options: ContourOptions): Level;
|
|
34
34
|
declare function contoursManager(spectrumID: string, state: ContoursLevels, options: ContourOptions): ReturnContoursManager;
|
|
35
|
-
declare function drawContours(level: number, spectrum: Spectrum2D, negative?: boolean, quadrant?: string):
|
|
36
|
-
contours: any;
|
|
37
|
-
timeout: boolean;
|
|
38
|
-
};
|
|
35
|
+
declare function drawContours(level: number, spectrum: Spectrum2D, negative?: boolean, quadrant?: string): import("ml-conrec").DrawContourResult<"basic">;
|
|
39
36
|
export { drawContours, contoursManager, getDefaultContoursLevel, DEFAULT_CONTOURS_OPTIONS, };
|
|
40
37
|
export type { ContoursLevels, ReturnContoursManager, Level, LevelSign };
|
|
@@ -115,7 +115,6 @@ function getContours(zoomLevel, options) {
|
|
|
115
115
|
const { negative = false, timeout = 2000, nbLevels, data } = options;
|
|
116
116
|
const xs = getRange(data.minX, data.maxX, data.z[0].length);
|
|
117
117
|
const ys = getRange(data.minY, data.maxY, data.z.length);
|
|
118
|
-
// @ts-expect-error refactor Conrect class to accept Float32Array Array instead of an array of number
|
|
119
118
|
const conrec = new Conrec(data.z, { xs, ys, swapAxes: false });
|
|
120
119
|
const sanResult = calculateSanPlot('2D', data);
|
|
121
120
|
const median = sanResult.positive;
|
|
@@ -26,7 +26,7 @@ export function initiateDatum2D(spectrum, usedColors = {}) {
|
|
|
26
26
|
};
|
|
27
27
|
datum.originalInfo = datum.info;
|
|
28
28
|
datum.meta = { ...spectrum.meta };
|
|
29
|
-
datum.
|
|
29
|
+
datum.customInfo = { ...spectrum.customInfo };
|
|
30
30
|
datum.data = getData(datum, spectrum);
|
|
31
31
|
datum.originalData = datum.data;
|
|
32
32
|
datum.filters = Object.assign([], spectrum.filters);
|
|
@@ -7,7 +7,11 @@ import { Spectrum2D } from 'nmr-load-save';
|
|
|
7
7
|
* @param {number} signal.y
|
|
8
8
|
* @param {string} signal.id
|
|
9
9
|
*/
|
|
10
|
-
export declare function changeZoneSignal(spectrum: Spectrum2D, zoneID:
|
|
10
|
+
export declare function changeZoneSignal(spectrum: Spectrum2D, zoneID: string, signal: {
|
|
11
|
+
id?: string;
|
|
12
|
+
deltaX?: number;
|
|
13
|
+
deltaY?: number;
|
|
14
|
+
}): {
|
|
11
15
|
xShift: number;
|
|
12
16
|
yShift: number;
|
|
13
17
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isNumber } from '../../../utilities/isNumber';
|
|
1
2
|
/**
|
|
2
3
|
*
|
|
3
4
|
* @param {number} zoneID
|
|
@@ -6,19 +7,16 @@
|
|
|
6
7
|
* @param {number} signal.y
|
|
7
8
|
* @param {string} signal.id
|
|
8
9
|
*/
|
|
9
|
-
export function changeZoneSignal(spectrum, zoneID,
|
|
10
|
+
export function changeZoneSignal(spectrum, zoneID, signal) {
|
|
10
11
|
const zoneIndex = spectrum.zones.values.findIndex((zone) => zone.id === zoneID);
|
|
12
|
+
const { id, deltaX, deltaY } = signal;
|
|
11
13
|
if (zoneIndex !== -1) {
|
|
12
|
-
const signalIndex = spectrum.zones.values[zoneIndex].signals.findIndex((s) => s.id ===
|
|
14
|
+
const signalIndex = spectrum.zones.values[zoneIndex].signals.findIndex((s) => s.id === id);
|
|
13
15
|
const zone = spectrum.zones.values[zoneIndex];
|
|
14
16
|
if (signalIndex !== -1) {
|
|
15
17
|
const originalSignal = zone.signals[signalIndex];
|
|
16
|
-
const xShift =
|
|
17
|
-
|
|
18
|
-
: 0;
|
|
19
|
-
const yShift = newSignal?.y || newSignal?.y === 0
|
|
20
|
-
? newSignal.y - originalSignal.y?.delta
|
|
21
|
-
: 0;
|
|
18
|
+
const xShift = isNumber(deltaX) ? deltaX - originalSignal.x.delta : 0;
|
|
19
|
+
const yShift = isNumber(deltaY) ? deltaY - originalSignal.y?.delta : 0;
|
|
22
20
|
return { xShift, yShift };
|
|
23
21
|
}
|
|
24
22
|
}
|
|
@@ -26,11 +26,13 @@ export declare function detectZonesManual(datum: any, options: DetectionZonesOpt
|
|
|
26
26
|
x: {
|
|
27
27
|
originDelta: number;
|
|
28
28
|
delta: number;
|
|
29
|
+
nbAtoms?: number | undefined;
|
|
29
30
|
diaIDs?: string[] | undefined;
|
|
30
31
|
};
|
|
31
32
|
y: {
|
|
32
33
|
originDelta: number;
|
|
33
34
|
delta: number;
|
|
35
|
+
nbAtoms?: number | undefined;
|
|
34
36
|
diaIDs?: string[] | undefined;
|
|
35
37
|
};
|
|
36
38
|
sign?: number | undefined;
|
|
@@ -25,11 +25,13 @@ export declare function initiateZones(options: Partial<{
|
|
|
25
25
|
x: {
|
|
26
26
|
originDelta: number;
|
|
27
27
|
delta: number;
|
|
28
|
+
nbAtoms?: number | undefined;
|
|
28
29
|
diaIDs?: string[] | undefined;
|
|
29
30
|
};
|
|
30
31
|
y: {
|
|
31
32
|
originDelta: number;
|
|
32
33
|
delta: number;
|
|
34
|
+
nbAtoms?: number | undefined;
|
|
33
35
|
diaIDs?: string[] | undefined;
|
|
34
36
|
};
|
|
35
37
|
sign?: number | undefined;
|
|
@@ -16,11 +16,13 @@ export declare function mapZones(zones: Zone[], datum: Spectrum2D, options?: Map
|
|
|
16
16
|
x: {
|
|
17
17
|
originDelta: number;
|
|
18
18
|
delta: number;
|
|
19
|
+
nbAtoms?: number | undefined;
|
|
19
20
|
diaIDs?: string[] | undefined;
|
|
20
21
|
};
|
|
21
22
|
y: {
|
|
22
23
|
originDelta: number;
|
|
23
24
|
delta: number;
|
|
25
|
+
nbAtoms?: number | undefined;
|
|
24
26
|
diaIDs?: string[] | undefined;
|
|
25
27
|
};
|
|
26
28
|
sign?: number | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import lodashSet from 'lodash/set';
|
|
2
2
|
import filterXY from 'ml-signal-processing/FilterXYSchema.json';
|
|
3
3
|
export function normalCase(str) {
|
|
4
|
-
const result = str.
|
|
4
|
+
const result = str.replaceAll(/(?<upper>[A-Z])/g, ' $<upper>').trim();
|
|
5
5
|
return result.charAt(0).toUpperCase() + result.slice(1);
|
|
6
6
|
}
|
|
7
7
|
function isLeave(fieldOptions) {
|
|
@@ -99,7 +99,9 @@ function generateFilterOptions(properties) {
|
|
|
99
99
|
lodashSet(options, key, []);
|
|
100
100
|
break;
|
|
101
101
|
case 'select':
|
|
102
|
-
lodashSet(options, key, field.default
|
|
102
|
+
lodashSet(options, key, field.default
|
|
103
|
+
? field.default.replaceAll(/'|"/g, '')
|
|
104
|
+
: field.choices[0]);
|
|
103
105
|
break;
|
|
104
106
|
case 'string':
|
|
105
107
|
lodashSet(options, key, undefined);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export interface StateMolecule {
|
|
2
|
-
id
|
|
2
|
+
id?: string;
|
|
3
3
|
molfile: string;
|
|
4
|
-
label
|
|
4
|
+
label?: string;
|
|
5
5
|
}
|
|
6
|
-
export interface StateMoleculeExtended extends StateMolecule {
|
|
6
|
+
export interface StateMoleculeExtended extends Required<StateMolecule> {
|
|
7
7
|
mf: string;
|
|
8
8
|
em: number;
|
|
9
9
|
mw: number;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { StateMoleculeExtended } from './Molecule';
|
|
2
|
-
export declare function fromJSON(mols:
|
|
3
|
-
export declare function addMolfile(molecules:
|
|
4
|
-
export declare function setMolfile(molecules:
|
|
1
|
+
import { StateMolecule, StateMoleculeExtended } from './Molecule';
|
|
2
|
+
export declare function fromJSON(mols: StateMolecule[], reservedMolecules?: StateMolecule[]): StateMoleculeExtended[];
|
|
3
|
+
export declare function addMolfile(molecules: StateMoleculeExtended[], molfile: string): void;
|
|
4
|
+
export declare function setMolfile(molecules: StateMoleculeExtended[], currentMolecule: StateMolecule): void;
|
|
5
5
|
export declare function extractNumber(value: string): string | null;
|
|
6
|
-
export declare function extractLabelsNumbers(molecules:
|
|
6
|
+
export declare function extractLabelsNumbers(molecules: Pick<StateMolecule, 'label'>[]): number[];
|
|
7
7
|
export declare function getLabelNumber(reserveNumbers: number[]): number;
|
|
@@ -64,7 +64,7 @@ export function extractNumber(value) {
|
|
|
64
64
|
export function extractLabelsNumbers(molecules) {
|
|
65
65
|
const values = [];
|
|
66
66
|
for (const molecule of molecules) {
|
|
67
|
-
const value = extractNumber(molecule
|
|
67
|
+
const value = extractNumber(molecule?.label || '');
|
|
68
68
|
if (value) {
|
|
69
69
|
values.push(Number(value));
|
|
70
70
|
}
|
|
@@ -46,7 +46,6 @@ export function unlink(zone, isOnZoneLevel, signalIndex, axis) {
|
|
|
46
46
|
delete zone.signals[signalIndex][axis].diaIDs;
|
|
47
47
|
delete zone.signals[signalIndex][axis].nbAtoms;
|
|
48
48
|
}
|
|
49
|
-
setNbAtoms(zone, axis);
|
|
50
49
|
}
|
|
51
50
|
else if (axis !== undefined) {
|
|
52
51
|
resetDiaIDs(zone, axis);
|
|
@@ -52,7 +52,7 @@ export function generateColor(isRandom = false, usedColors = [], opacity = 100)
|
|
|
52
52
|
}
|
|
53
53
|
else {
|
|
54
54
|
const lum = -0.25;
|
|
55
|
-
let hex = String(`#${Math.random().toString(16).slice(2, 8).toUpperCase()}`).
|
|
55
|
+
let hex = String(`#${Math.random().toString(16).slice(2, 8).toUpperCase()}`).replaceAll(/[^\da-f]/gi, '');
|
|
56
56
|
if (hex.length < 6) {
|
|
57
57
|
hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];
|
|
58
58
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isNumber(value: any): value is number;
|
package/lib/versionInfo.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default { version: 'v0.
|
|
1
|
+
export default { version: 'v0.38.0' };
|
|
@@ -116,6 +116,6 @@ function FooterBanner() {
|
|
|
116
116
|
const { margin, width, height, view: { spectra: { activeTab }, }, } = (0, ChartContext_1.useChartData)();
|
|
117
117
|
const activeSpectrum = (0, useActiveSpectrum_1.useActiveSpectrum)();
|
|
118
118
|
const spectrum = (0, useSpectrum_1.default)(null);
|
|
119
|
-
return ((0, jsx_runtime_1.jsx)(MemoizedFooterBanner, {
|
|
119
|
+
return ((0, jsx_runtime_1.jsx)(MemoizedFooterBanner, { margin, width, height, activeSpectrum, spectrum, activeTab }));
|
|
120
120
|
}
|
|
121
121
|
exports.default = FooterBanner;
|
|
@@ -49,7 +49,6 @@ const MultipletAnalysisModal_1 = __importDefault(require("../modal/MultipletAnal
|
|
|
49
49
|
const Zoom1DManager_1 = require("../reducer/helper/Zoom1DManager");
|
|
50
50
|
const getRange_1 = __importDefault(require("../reducer/helper/getRange"));
|
|
51
51
|
const scaleReducer_1 = __importStar(require("../reducer/scaleReducer"));
|
|
52
|
-
const Types_1 = require("../reducer/types/Types");
|
|
53
52
|
const ToolTypes_1 = require("../toolbar/ToolTypes");
|
|
54
53
|
const Events_1 = __importDefault(require("../utility/Events"));
|
|
55
54
|
const Chart1D_1 = __importDefault(require("./Chart1D"));
|
|
@@ -125,8 +124,8 @@ function Viewer1D({ emptyText = undefined }) {
|
|
|
125
124
|
switch (selectedTool) {
|
|
126
125
|
case ToolTypes_1.options.integral.id:
|
|
127
126
|
dispatch({
|
|
128
|
-
type:
|
|
129
|
-
|
|
127
|
+
type: 'ADD_INTEGRAL',
|
|
128
|
+
payload: brushData,
|
|
130
129
|
});
|
|
131
130
|
break;
|
|
132
131
|
case ToolTypes_1.options.rangePicking.id: {
|
|
@@ -140,10 +139,8 @@ function Viewer1D({ emptyText = undefined }) {
|
|
|
140
139
|
const { fromIndex, toIndex } = (0, ml_spectra_processing_1.xGetFromToIndex)(x, { from, to });
|
|
141
140
|
if (toIndex - fromIndex <= detectSignal_1.MAX_LENGTH) {
|
|
142
141
|
dispatch({
|
|
143
|
-
type:
|
|
144
|
-
payload:
|
|
145
|
-
...brushData,
|
|
146
|
-
},
|
|
142
|
+
type: 'ADD_RANGE',
|
|
143
|
+
payload: brushData,
|
|
147
144
|
});
|
|
148
145
|
}
|
|
149
146
|
else {
|
|
@@ -168,20 +165,23 @@ function Viewer1D({ emptyText = undefined }) {
|
|
|
168
165
|
break;
|
|
169
166
|
case ToolTypes_1.options.peakPicking.id:
|
|
170
167
|
dispatch({
|
|
171
|
-
type:
|
|
172
|
-
|
|
168
|
+
type: 'ADD_PEAKS',
|
|
169
|
+
payload: brushData,
|
|
173
170
|
});
|
|
174
171
|
break;
|
|
175
172
|
case ToolTypes_1.options.baselineCorrection.id:
|
|
176
173
|
dispatch({
|
|
177
|
-
type:
|
|
178
|
-
|
|
174
|
+
type: 'ADD_BASE_LINE_ZONE',
|
|
175
|
+
payload: {
|
|
176
|
+
startX: brushData.startX,
|
|
177
|
+
endX: brushData.endX,
|
|
178
|
+
},
|
|
179
179
|
});
|
|
180
180
|
break;
|
|
181
181
|
case ToolTypes_1.options.exclusionZones.id:
|
|
182
182
|
dispatch({
|
|
183
|
-
type:
|
|
184
|
-
payload: {
|
|
183
|
+
type: 'ADD_EXCLUSION_ZONE',
|
|
184
|
+
payload: { startX: brushData.startX, endX: brushData.endX },
|
|
185
185
|
});
|
|
186
186
|
break;
|
|
187
187
|
case ToolTypes_1.options.matrixGenerationExclusionZones.id: {
|
|
@@ -208,7 +208,7 @@ function Viewer1D({ emptyText = undefined }) {
|
|
|
208
208
|
switch (selectedTool) {
|
|
209
209
|
default:
|
|
210
210
|
if (selectedTool != null) {
|
|
211
|
-
dispatch({ type:
|
|
211
|
+
dispatch({ type: 'BRUSH_END', payload: brushData });
|
|
212
212
|
}
|
|
213
213
|
break;
|
|
214
214
|
}
|
|
@@ -227,10 +227,13 @@ function Viewer1D({ emptyText = undefined }) {
|
|
|
227
227
|
alert,
|
|
228
228
|
]);
|
|
229
229
|
const handelOnDoubleClick = (0, react_1.useCallback)(() => {
|
|
230
|
-
dispatch({
|
|
230
|
+
dispatch({
|
|
231
|
+
type: 'FULL_ZOOM_OUT',
|
|
232
|
+
payload: { zoomType: Zoom1DManager_1.ZOOM_TYPES.STEP_HORIZONTAL },
|
|
233
|
+
});
|
|
231
234
|
}, [dispatch]);
|
|
232
235
|
const handleZoom = (0, react_1.useCallback)((event) => {
|
|
233
|
-
dispatch({ type:
|
|
236
|
+
dispatch({ type: 'SET_ZOOM', payload: { event, selectedTool } });
|
|
234
237
|
}, [dispatch, selectedTool]);
|
|
235
238
|
const mouseClick = (0, react_1.useCallback)((position) => {
|
|
236
239
|
const propagateEvent = () => {
|
|
@@ -246,8 +249,8 @@ function Viewer1D({ emptyText = undefined }) {
|
|
|
246
249
|
switch (selectedTool) {
|
|
247
250
|
case ToolTypes_1.options.peakPicking.id:
|
|
248
251
|
dispatch({
|
|
249
|
-
type:
|
|
250
|
-
|
|
252
|
+
type: 'ADD_PEAK',
|
|
253
|
+
payload: position,
|
|
251
254
|
});
|
|
252
255
|
break;
|
|
253
256
|
case ToolTypes_1.options.editRange.id:
|
|
@@ -261,8 +264,10 @@ function Viewer1D({ emptyText = undefined }) {
|
|
|
261
264
|
switch (selectedTool) {
|
|
262
265
|
case ToolTypes_1.options.phaseCorrection.id:
|
|
263
266
|
dispatch({
|
|
264
|
-
type:
|
|
265
|
-
|
|
267
|
+
type: 'SET_VERTICAL_INDICATOR_X_POSITION',
|
|
268
|
+
payload: {
|
|
269
|
+
position: position.x,
|
|
270
|
+
},
|
|
266
271
|
});
|
|
267
272
|
break;
|
|
268
273
|
default:
|
|
@@ -12,7 +12,6 @@ const GlobalContext_1 = require("../../context/GlobalContext");
|
|
|
12
12
|
const ScaleContext_1 = require("../../context/ScaleContext");
|
|
13
13
|
const Resizer_1 = __importDefault(require("../../elements/resizer/Resizer"));
|
|
14
14
|
const index_1 = require("../../highlight/index");
|
|
15
|
-
const Types_1 = require("../../reducer/types/Types");
|
|
16
15
|
const ToolTypes_1 = require("../../toolbar/ToolTypes");
|
|
17
16
|
const IntegralIndicator_1 = require("./IntegralIndicator");
|
|
18
17
|
const stylesOnHover = (0, react_1.css) `
|
|
@@ -55,9 +54,9 @@ function IntegralResizable({ integralData, integralFormat, }) {
|
|
|
55
54
|
});
|
|
56
55
|
function handleOnStopResizing(position) {
|
|
57
56
|
dispatch({
|
|
58
|
-
type:
|
|
57
|
+
type: 'RESIZE_INTEGRAL',
|
|
59
58
|
payload: {
|
|
60
|
-
|
|
59
|
+
integral: {
|
|
61
60
|
...integralData,
|
|
62
61
|
from: scaleX().invert(position.x2),
|
|
63
62
|
to: scaleX().invert(position.x1),
|
|
@@ -21,6 +21,6 @@ function MultiAnalysisRanges() {
|
|
|
21
21
|
const { view: { spectra: { activeTab }, }, displayerKey, } = (0, ChartContext_1.useChartData)();
|
|
22
22
|
const multipleSpectraAnalysis = (0, usePanelPreferences_1.usePanelPreferences)('multipleSpectraAnalysis', activeTab);
|
|
23
23
|
const columns = multipleSpectraAnalysis.analysisOptions.columns;
|
|
24
|
-
return ((0, jsx_runtime_1.jsx)(MemoizedMultiAnalysisRanges, {
|
|
24
|
+
return ((0, jsx_runtime_1.jsx)(MemoizedMultiAnalysisRanges, { columns, displayerKey, activeTab }));
|
|
25
25
|
}
|
|
26
26
|
exports.default = MultiAnalysisRanges;
|