nmrium 0.37.0 → 0.38.1
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/database/DatabaseSpectrum.js +2 -1
- 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 -1
- 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.js +15 -7
- 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/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 +4 -6
- 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/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.d.ts +1 -1
- 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 +10 -10
- 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.js +5 -6
- 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/TableColumns/RangeAssignmentsColumn.js +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/RelativeColumn.js +3 -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/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/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 -13
- package/lib/component/panels/ZonesPanel/TableColumns/ActionsColumn.js +22 -20
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumn.d.ts +2 -2
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumn.js +1 -1
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.d.ts +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 +2 -2
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.js +1 -1
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumns.d.ts +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/hooks/useMapZones.d.ts +16 -0
- package/lib/component/panels/ZonesPanel/hooks/useMapZones.js +52 -0
- package/lib/component/panels/databasePanel/DatabasePanel.js +15 -11
- 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 +4 -5
- 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 +202 -220
- 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 +52 -52
- package/lib/component/reducer/actions/MoleculeActions.d.ts +38 -9
- package/lib/component/reducer/actions/MoleculeActions.js +27 -18
- 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 +5 -3
- 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/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/data/PredictionManager.d.ts +7 -9
- 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/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/generateColor.js +1 -1
- package/lib/data/utilities/isNumber.d.ts +1 -0
- package/lib/data/utilities/isNumber.js +3 -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/database/DatabaseSpectrum.js +2 -1
- 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 -1
- 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 +15 -7
- 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/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 +4 -6
- 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/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 +10 -10
- 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 +5 -6
- 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/TableColumns/RangeAssignmentsColumn.js +1 -1
- package/lib-cjs/component/panels/RangesPanel/TableColumns/RelativeColumn.js +3 -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/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/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 +1 -1
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.js +6 -7
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.js +1 -1
- 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/hooks/useMapZones.js +56 -0
- package/lib-cjs/component/panels/databasePanel/DatabasePanel.js +14 -10
- 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 +4 -5
- package/lib-cjs/component/reducer/IgnoreActions.js +35 -55
- package/lib-cjs/component/reducer/Reducer.js +202 -220
- 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 +55 -55
- package/lib-cjs/component/reducer/actions/MoleculeActions.js +31 -22
- package/lib-cjs/component/reducer/actions/PeaksActions.js +23 -15
- package/lib-cjs/component/reducer/actions/PreferencesActions.js +7 -5
- 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/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/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/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/generateColor.js +1 -1
- package/lib-cjs/data/utilities/isNumber.js +7 -0
- package/lib-cjs/versionInfo.js +1 -1
- package/package.json +24 -23
- 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,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;
|
|
@@ -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
|
}
|
|
@@ -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.1' };
|
|
@@ -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:
|
|
@@ -36,8 +36,9 @@ function DatabaseSpectrum() {
|
|
|
36
36
|
const loadSpectrum = (0, react_1.useRef)((0, throttle_1.default)(async (baseURL, jcampRelativeURL) => {
|
|
37
37
|
try {
|
|
38
38
|
setLoading(true);
|
|
39
|
+
const url = new URL(jcampRelativeURL, baseURL);
|
|
39
40
|
const { data } = await (0, nmr_load_save_1.readFromWebSource)({
|
|
40
|
-
entries: [{ relativePath:
|
|
41
|
+
entries: [{ relativePath: url.pathname, baseURL: url.origin }],
|
|
41
42
|
});
|
|
42
43
|
setLoading(false);
|
|
43
44
|
const spectrum = data?.spectra?.[0] || null;
|
|
@@ -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;
|
|
@@ -59,15 +59,13 @@ function InnerMultiplicityTree({ labelOptions, onUnlink, data, width: widthProp,
|
|
|
59
59
|
onUnlink(index);
|
|
60
60
|
}
|
|
61
61
|
const isHighlighted = highlight.isActive || assignment.isActive;
|
|
62
|
-
return ((0, jsx_runtime_1.jsxs)("g", { style: isHighlighted ? { ...styles, opacity: 1, strokeWidth: 1.5 } : styles,
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
highlight.hide();
|
|
70
|
-
},
|
|
62
|
+
return ((0, jsx_runtime_1.jsxs)("g", { style: isHighlighted ? { ...styles, opacity: 1, strokeWidth: 1.5 } : styles, onMouseEnter: () => {
|
|
63
|
+
assignment.show('x');
|
|
64
|
+
highlight.show();
|
|
65
|
+
},
|
|
66
|
+
onMouseLeave: () => {
|
|
67
|
+
assignment.hide();
|
|
68
|
+
highlight.hide();
|
|
71
69
|
}, pointerEvents: "bounding-box", ...(!assignment.isActive && { css: cssStyle }), children: [drawTree(data, { scaleX, labelOptions, showLabels }), (0, jsx_runtime_1.jsx)("rect", { x: startX - BOX_PADDING, y: startY - BOX_PADDING, width: width + BOX_PADDING * 2, height: height + BOX_PADDING * 2, fill: isHighlighted ? '#ff6f0057' : 'transparent', "data-no-export": "true" }), (0, jsx_runtime_1.jsx)(AssignmentActionsButtons_1.AssignmentActionsButtons, { className: "signal-target", isActive: !!(assignment.isActive || signal?.diaIDs), y: startY, x: scaleX()(signal.delta) - 30, onAssign: assignHandler, onUnAssign: unAssignHandler, borderRadius: 16 })] }));
|
|
72
70
|
}
|
|
73
71
|
function MultiplicityTree(props) {
|
|
@@ -7,7 +7,6 @@ const react_2 = require("react");
|
|
|
7
7
|
const DispatchContext_1 = require("../../context/DispatchContext");
|
|
8
8
|
const highlight_1 = require("../../highlight");
|
|
9
9
|
const usePanelPreferences_1 = require("../../hooks/usePanelPreferences");
|
|
10
|
-
const Types_1 = require("../../reducer/types/Types");
|
|
11
10
|
const formatNumber_1 = require("../../utility/formatNumber");
|
|
12
11
|
const styles = (0, react_1.css) `
|
|
13
12
|
input {
|
|
@@ -55,7 +54,7 @@ value, color, nucleus, }) {
|
|
|
55
54
|
extra: { id },
|
|
56
55
|
});
|
|
57
56
|
const dispatch = (0, DispatchContext_1.useDispatch)();
|
|
58
|
-
const handleOnPeakChange = (0, react_2.useCallback)((e) => dispatch({ type:
|
|
57
|
+
const handleOnPeakChange = (0, react_2.useCallback)((e) => dispatch({ type: 'SHIFT_SPECTRUM', payload: { shift: e.shiftValue } }), [dispatch]);
|
|
59
58
|
(0, react_2.useLayoutEffect)(() => {
|
|
60
59
|
const textBox = refText.current?.getBBox();
|
|
61
60
|
setContainerSize({
|
|
@@ -15,7 +15,6 @@ const GlobalContext_1 = require("../../context/GlobalContext");
|
|
|
15
15
|
const ScaleContext_1 = require("../../context/ScaleContext");
|
|
16
16
|
const Resizer_1 = __importDefault(require("../../elements/resizer/Resizer"));
|
|
17
17
|
const highlight_1 = require("../../highlight");
|
|
18
|
-
const Types_1 = require("../../reducer/types/Types");
|
|
19
18
|
const ToolTypes_1 = require("../../toolbar/ToolTypes");
|
|
20
19
|
const IntegralIndicator_1 = require("../integral/IntegralIndicator");
|
|
21
20
|
const MultiplicityTree_1 = require("../multiplicityTree/MultiplicityTree");
|
|
@@ -42,11 +41,13 @@ function Range({ range, showMultiplicityTrees, selectedTool, relativeFormat, })
|
|
|
42
41
|
const isBlockedByEditing = selectedTool && selectedTool === ToolTypes_1.options.editRange.id;
|
|
43
42
|
function handleOnStopResizing(position) {
|
|
44
43
|
dispatch({
|
|
45
|
-
type:
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
44
|
+
type: 'RESIZE_RANGE',
|
|
45
|
+
payload: {
|
|
46
|
+
range: {
|
|
47
|
+
...range,
|
|
48
|
+
from: scaleX().invert(position.x2),
|
|
49
|
+
to: scaleX().invert(position.x1),
|
|
50
|
+
},
|
|
50
51
|
},
|
|
51
52
|
});
|
|
52
53
|
}
|
|
@@ -60,9 +61,9 @@ function Range({ range, showMultiplicityTrees, selectedTool, relativeFormat, })
|
|
|
60
61
|
}
|
|
61
62
|
function unAssignHandler(signalIndex = -1) {
|
|
62
63
|
dispatch({
|
|
63
|
-
type:
|
|
64
|
+
type: 'UNLINK_RANGE',
|
|
64
65
|
payload: {
|
|
65
|
-
|
|
66
|
+
range,
|
|
66
67
|
assignmentData,
|
|
67
68
|
signalIndex,
|
|
68
69
|
},
|
|
@@ -28,12 +28,10 @@ function Ranges() {
|
|
|
28
28
|
if (!spectrum?.display?.isVisible) {
|
|
29
29
|
return null;
|
|
30
30
|
}
|
|
31
|
-
return ((0, jsx_runtime_1.jsx)(MemoizedRanges, { ranges: spectrum.ranges,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
relativeFormat: rangesPreferences.relative.format,
|
|
37
|
-
} }));
|
|
31
|
+
return ((0, jsx_runtime_1.jsx)(MemoizedRanges, { ranges: spectrum.ranges, showMultiplicityTrees,
|
|
32
|
+
showRangesIntegrals,
|
|
33
|
+
selectedTool,
|
|
34
|
+
displayerKey,
|
|
35
|
+
relativeFormat: rangesPreferences.relative.format }));
|
|
38
36
|
}
|
|
39
37
|
exports.default = Ranges;
|
|
@@ -10,7 +10,6 @@ const ChartContext_1 = require("../../context/ChartContext");
|
|
|
10
10
|
const DispatchContext_1 = require("../../context/DispatchContext");
|
|
11
11
|
const ScaleContext_1 = require("../../context/ScaleContext");
|
|
12
12
|
const DeleteButton_1 = __importDefault(require("../../elements/DeleteButton"));
|
|
13
|
-
const Types_1 = require("../../reducer/types/Types");
|
|
14
13
|
const styles = (0, react_1.css) `
|
|
15
14
|
pointer-events: bounding-box;
|
|
16
15
|
user-select: 'none';
|
|
@@ -36,7 +35,7 @@ function BaseLineZones() {
|
|
|
36
35
|
const { scaleX } = (0, ScaleContext_1.useScaleChecked)();
|
|
37
36
|
const dispatch = (0, DispatchContext_1.useDispatch)();
|
|
38
37
|
const deleteRangeHandler = (id) => {
|
|
39
|
-
dispatch({ type:
|
|
38
|
+
dispatch({ type: 'DELETE_BASE_LINE_ZONE', payload: { id } });
|
|
40
39
|
};
|
|
41
40
|
const baseLineZones = toolOptions.data.baselineCorrection.zones;
|
|
42
41
|
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: baseLineZones.length > 0 && ((0, jsx_runtime_1.jsx)("g", { children: baseLineZones.map((zone) => ((0, jsx_runtime_1.jsxs)("g", { transform: `translate(${scaleX()(zone.to)},0)`, css: styles, children: [(0, jsx_runtime_1.jsx)(DeleteButton_1.default, { x: -20, y: 10, onDelete: () => deleteRangeHandler(zone.id) }), (0, jsx_runtime_1.jsx)("rect", { x: "0", width: `${scaleX()(zone.from) - scaleX()(zone.to)}`, className: "zone-area" })] }, zone.id))) })) }));
|
|
@@ -15,7 +15,6 @@ const DispatchContext_1 = require("../../../context/DispatchContext");
|
|
|
15
15
|
const GlobalContext_1 = require("../../../context/GlobalContext");
|
|
16
16
|
const MoleculeStructureEditorModal_1 = require("../../../modal/MoleculeStructureEditorModal");
|
|
17
17
|
const useAtomAssignment_1 = __importDefault(require("../../../panels/MoleculesPanel/useAtomAssignment"));
|
|
18
|
-
const Types_1 = require("../../../reducer/types/Types");
|
|
19
18
|
const ActionsButton_1 = __importDefault(require("./ActionsButton"));
|
|
20
19
|
const style = (0, react_1.css) `
|
|
21
20
|
border: 1px solid transparent;
|
|
@@ -46,7 +45,7 @@ function DraggableStructure(props) {
|
|
|
46
45
|
const { currentDiaIDsToHighlight, handleOnAtomHover, handleOnClickAtom, assignedDiaIDsMerged, } = (0, useAtomAssignment_1.default)({ zones, ranges, activeTab, displayerMode });
|
|
47
46
|
function floatMoleculeHandler() {
|
|
48
47
|
dispatch({
|
|
49
|
-
type:
|
|
48
|
+
type: 'FLOAT_MOLECULE_OVER_SPECTRUM',
|
|
50
49
|
payload: { id: molecule.id },
|
|
51
50
|
});
|
|
52
51
|
}
|
|
@@ -58,8 +57,8 @@ function DraggableStructure(props) {
|
|
|
58
57
|
bounding.height += height;
|
|
59
58
|
}
|
|
60
59
|
dispatch({
|
|
61
|
-
type:
|
|
62
|
-
payload: { id: molecule.id, bounding },
|
|
60
|
+
type: 'CHANGE_FLOAT_MOLECULE_POSITION',
|
|
61
|
+
payload: { id: molecule.id, bounding: bounding },
|
|
63
62
|
});
|
|
64
63
|
}
|
|
65
64
|
if (!viewerRef)
|
|
@@ -71,7 +70,7 @@ function DraggableStructure(props) {
|
|
|
71
70
|
? currentDiaIDsToHighlight
|
|
72
71
|
: assignedDiaIDsMerged, setHoverAtom: handleOnAtomHover, setMolfile: (molfile) => {
|
|
73
72
|
dispatch({
|
|
74
|
-
type:
|
|
73
|
+
type: 'SET_MOLECULE',
|
|
75
74
|
payload: {
|
|
76
75
|
molfile,
|
|
77
76
|
id: molecule.id,
|
|
@@ -20,15 +20,13 @@ function FloatMoleculeStructuresInner(props) {
|
|
|
20
20
|
.map(([id, moleculeView], index) => {
|
|
21
21
|
const molecule = molecules.find((m) => m.id === id);
|
|
22
22
|
(0, assert_1.assert)(molecule !== undefined, 'molecule should be defined');
|
|
23
|
-
return ((0, jsx_runtime_1.jsx)(DraggableStructure_1.DraggableStructure, {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
index,
|
|
31
|
-
} }, id));
|
|
23
|
+
return ((0, jsx_runtime_1.jsx)(DraggableStructure_1.DraggableStructure, { zones,
|
|
24
|
+
ranges,
|
|
25
|
+
activeTab,
|
|
26
|
+
displayerMode,
|
|
27
|
+
moleculeView,
|
|
28
|
+
molecule,
|
|
29
|
+
index }, id));
|
|
32
30
|
}) }));
|
|
33
31
|
}
|
|
34
32
|
exports.FloatMoleculeStructuresInner = FloatMoleculeStructuresInner;
|
|
@@ -39,13 +37,11 @@ function FloatMoleculeStructures() {
|
|
|
39
37
|
const data = (0, useSpectrum_1.default)(emptyData);
|
|
40
38
|
const ranges = data?.ranges || {};
|
|
41
39
|
const zones = data?.zones || {};
|
|
42
|
-
return ((0, jsx_runtime_1.jsx)(MemoizedFloatMoleculeStructures, {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
zones,
|
|
49
|
-
} }));
|
|
40
|
+
return ((0, jsx_runtime_1.jsx)(MemoizedFloatMoleculeStructures, { moleculesView,
|
|
41
|
+
molecules,
|
|
42
|
+
displayerMode,
|
|
43
|
+
activeTab,
|
|
44
|
+
ranges,
|
|
45
|
+
zones }));
|
|
50
46
|
}
|
|
51
47
|
exports.default = FloatMoleculeStructures;
|
|
@@ -44,7 +44,7 @@ function Left1DChart({ margin: marginValue = 10, data: spectrum, }) {
|
|
|
44
44
|
const { x, re: y } = spectrum.data;
|
|
45
45
|
const pathPoints = xyReduce({ x, y });
|
|
46
46
|
const pathBuilder = new PathBuilder_1.PathBuilder();
|
|
47
|
-
pathBuilder.moveTo(scaleY(pathPoints.y
|
|
47
|
+
pathBuilder.moveTo(scaleY(pathPoints.y.at(-1)), scaleX(pathPoints.x.at(-1)));
|
|
48
48
|
for (let i = pathPoints.x.length - 2; i >= 0; i--) {
|
|
49
49
|
pathBuilder.lineTo(scaleY(pathPoints.y[i]), scaleX(pathPoints.x[i]));
|
|
50
50
|
}
|