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
|
@@ -37,8 +37,6 @@ const Label_1 = __importDefault(require("../elements/Label"));
|
|
|
37
37
|
const Select_1 = __importDefault(require("../elements/Select"));
|
|
38
38
|
const useFilter_1 = require("../hooks/useFilter");
|
|
39
39
|
const useSpectrum_1 = __importDefault(require("../hooks/useSpectrum"));
|
|
40
|
-
const Types_1 = require("../reducer/types/Types");
|
|
41
|
-
const ToolTypes_1 = require("../toolbar/ToolTypes");
|
|
42
40
|
const Header_1 = require("./Header");
|
|
43
41
|
const HeaderContainer_1 = require("./HeaderContainer");
|
|
44
42
|
const Sizes = (0, generateNumbersPowerOfX_1.default)(8, 21);
|
|
@@ -59,7 +57,7 @@ function ZeroFillingOptionsInnerPanel(props) {
|
|
|
59
57
|
const [size, setSize] = (0, react_1.useState)(props.size);
|
|
60
58
|
function handleApplyFilter() {
|
|
61
59
|
dispatch({
|
|
62
|
-
type:
|
|
60
|
+
type: 'APPLY_ZERO_FILLING_FILTER',
|
|
63
61
|
payload: {
|
|
64
62
|
nbPoints: size,
|
|
65
63
|
},
|
|
@@ -67,12 +65,12 @@ function ZeroFillingOptionsInnerPanel(props) {
|
|
|
67
65
|
}
|
|
68
66
|
function handleCancelFilter() {
|
|
69
67
|
dispatch({
|
|
70
|
-
type:
|
|
68
|
+
type: 'RESET_SELECTED_TOOL',
|
|
71
69
|
});
|
|
72
70
|
}
|
|
73
71
|
function dispatchLiveChanges(nbPoints) {
|
|
74
72
|
dispatch({
|
|
75
|
-
type:
|
|
73
|
+
type: 'CALCULATE_ZERO_FILLING_FILTER',
|
|
76
74
|
payload: {
|
|
77
75
|
nbPoints,
|
|
78
76
|
},
|
|
@@ -91,12 +89,6 @@ function ZeroFillingOptionsInnerPanel(props) {
|
|
|
91
89
|
function checkChangeHandler(event) {
|
|
92
90
|
const checked = event.target.checked;
|
|
93
91
|
setLivePreview(checked);
|
|
94
|
-
if (!checked) {
|
|
95
|
-
//disable filter Live preview
|
|
96
|
-
dispatch({
|
|
97
|
-
payload: { selectedTool: ToolTypes_1.options.zeroFilling.id },
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
92
|
}
|
|
101
93
|
return ((0, jsx_runtime_1.jsxs)(HeaderContainer_1.HeaderContainer, { children: [(0, jsx_runtime_1.jsx)(Label_1.default, { title: "Size: ", style: Header_1.headerLabelStyle, children: (0, jsx_runtime_1.jsx)(Select_1.default, { items: Sizes, style: { marginLeft: 10, marginRight: 10 }, value: size, onChange: handleChangeSizeHandler }) }), (0, jsx_runtime_1.jsx)(Label_1.default, { title: "Live preview ", htmlFor: "livePreview", style: Header_1.headerLabelStyle, children: (0, jsx_runtime_1.jsx)(CheckBox_1.default, { name: "livePreview", defaultChecked: true, onChange: checkChangeHandler }) }), (0, jsx_runtime_1.jsx)(ActionButtons_1.default, { onDone: handleApplyFilter, onCancel: handleCancelFilter })] }));
|
|
102
94
|
}
|
|
@@ -35,26 +35,25 @@ const Button_1 = __importDefault(require("../elements/Button"));
|
|
|
35
35
|
const Label_1 = __importDefault(require("../elements/Label"));
|
|
36
36
|
const FormikNumberInput_1 = __importDefault(require("../elements/formik/FormikNumberInput"));
|
|
37
37
|
const FormikOnChange_1 = __importDefault(require("../elements/formik/FormikOnChange"));
|
|
38
|
-
const Types_1 = require("../reducer/types/Types");
|
|
39
38
|
const Header_1 = require("./Header");
|
|
40
39
|
const HeaderContainer_1 = require("./HeaderContainer");
|
|
41
40
|
const validationSchema = Yup.object().shape({
|
|
42
|
-
|
|
41
|
+
zonesNoiseFactor: Yup.number().min(0).required(),
|
|
43
42
|
});
|
|
44
43
|
const initialValues = {
|
|
45
|
-
|
|
44
|
+
zonesNoiseFactor: 1,
|
|
46
45
|
};
|
|
47
46
|
function Zones2DOptionPanel() {
|
|
48
47
|
const dispatch = (0, DispatchContext_1.useDispatch)();
|
|
49
48
|
const handleZonesPicking = (0, react_1.useCallback)((values) => {
|
|
50
49
|
dispatch({
|
|
51
|
-
type:
|
|
50
|
+
type: 'AUTO_ZONES_DETECTION',
|
|
52
51
|
payload: values,
|
|
53
52
|
});
|
|
54
53
|
}, [dispatch]);
|
|
55
54
|
const handleChangeNoiseFactory = (0, react_1.useCallback)((values) => {
|
|
56
|
-
dispatch({ type:
|
|
55
|
+
dispatch({ type: 'CHANGE_ZONES_NOISE_FACTOR', payload: values });
|
|
57
56
|
}, [dispatch]);
|
|
58
|
-
return ((0, jsx_runtime_1.jsx)(HeaderContainer_1.HeaderContainer, { children: (0, jsx_runtime_1.jsx)(formik_1.Formik, { onSubmit: handleZonesPicking, initialValues: initialValues, validationSchema: validationSchema, children: ({ handleSubmit, isValid }) => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Label_1.default, { title: "Noise factor :", htmlFor: "livePreview", style: Header_1.headerLabelStyle, children: (0, jsx_runtime_1.jsx)(FormikNumberInput_1.default, { name: "
|
|
57
|
+
return ((0, jsx_runtime_1.jsx)(HeaderContainer_1.HeaderContainer, { children: (0, jsx_runtime_1.jsx)(formik_1.Formik, { onSubmit: handleZonesPicking, initialValues: initialValues, validationSchema: validationSchema, children: ({ handleSubmit, isValid }) => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Label_1.default, { title: "Noise factor :", htmlFor: "livePreview", style: Header_1.headerLabelStyle, children: (0, jsx_runtime_1.jsx)(FormikNumberInput_1.default, { name: "zonesNoiseFactor", style: { width: '50px' }, min: 0 }) }), (0, jsx_runtime_1.jsx)(FormikOnChange_1.default, { enableValidation: true, onChange: handleChangeNoiseFactory }), (0, jsx_runtime_1.jsx)(Button_1.default.Done, { onClick: () => handleSubmit(), style: { margin: '0 10px' }, disabled: !isValid, children: "Auto Zones Picking" })] })) }) }));
|
|
59
58
|
}
|
|
60
59
|
exports.default = Zones2DOptionPanel;
|
|
@@ -16,7 +16,7 @@ var HighlightEventSource;
|
|
|
16
16
|
HighlightEventSource["DATABASE"] = "DATABASE";
|
|
17
17
|
HighlightEventSource["ATOM"] = "ATOM";
|
|
18
18
|
HighlightEventSource["UNKNOWN"] = "UNKNOWN";
|
|
19
|
-
})(HighlightEventSource
|
|
19
|
+
})(HighlightEventSource || (exports.HighlightEventSource = HighlightEventSource = {}));
|
|
20
20
|
const HightLightStyle = {
|
|
21
21
|
backgroundColor: '#ff6f0091',
|
|
22
22
|
};
|
|
@@ -38,6 +38,7 @@ function useExport() {
|
|
|
38
38
|
const fileName = state.data[0]?.info?.name;
|
|
39
39
|
const exportedData = (0, SpectraManager_1.toJSON)(state, preferencesState, {
|
|
40
40
|
exportTarget: 'nmrium',
|
|
41
|
+
view: true,
|
|
41
42
|
});
|
|
42
43
|
await (0, export_1.exportAsJSON)(exportedData, fileName, spaceIndent, isCompressed);
|
|
43
44
|
hideLoading();
|
|
@@ -11,7 +11,7 @@ var SortType;
|
|
|
11
11
|
SortType["ASCENDING"] = "asc";
|
|
12
12
|
SortType["DESCENDING"] = "desc";
|
|
13
13
|
SortType["ORIGINAL"] = "original";
|
|
14
|
-
})(SortType
|
|
14
|
+
})(SortType || (exports.SortType = SortType = {}));
|
|
15
15
|
function useTableSortBy(items, config = null) {
|
|
16
16
|
const [sortConfig, setSortConfig] = (0, react_1.useState)(config);
|
|
17
17
|
const sortedItems = (0, react_1.useMemo)(() => {
|
|
@@ -10,8 +10,6 @@ const ui_1 = require("react-science/ui");
|
|
|
10
10
|
const DispatchContext_1 = require("../context/DispatchContext");
|
|
11
11
|
const Alert_1 = require("../elements/popup/Alert");
|
|
12
12
|
const Panels_1 = require("../panels/Panels");
|
|
13
|
-
const Zoom1DManager_1 = require("../reducer/helper/Zoom1DManager");
|
|
14
|
-
const Types_1 = require("../reducer/types/Types");
|
|
15
13
|
const ToolTypes_1 = require("../toolbar/ToolTypes");
|
|
16
14
|
function useToolsFunctions() {
|
|
17
15
|
const dispatch = (0, DispatchContext_1.useDispatch)();
|
|
@@ -33,15 +31,15 @@ function useToolsFunctions() {
|
|
|
33
31
|
openPanel(Panels_1.TOOLS_PANELS_ACCORDION[selectedTool]);
|
|
34
32
|
}
|
|
35
33
|
dispatch({
|
|
36
|
-
type:
|
|
34
|
+
type: 'SET_SELECTED_TOOL',
|
|
37
35
|
payload: { selectedTool: selectedTool || ToolTypes_1.options.zoom.id },
|
|
38
36
|
});
|
|
39
37
|
}, [alert, dispatch, openPanel]);
|
|
40
38
|
const handleFullZoomOut = (0, react_1.useCallback)(() => {
|
|
41
39
|
if (debounceClickEventsRef.current.clicks.length === 0) {
|
|
42
40
|
dispatch({
|
|
43
|
-
type:
|
|
44
|
-
zoomType:
|
|
41
|
+
type: 'FULL_ZOOM_OUT',
|
|
42
|
+
payload: { zoomType: 'HORIZONTAL' },
|
|
45
43
|
});
|
|
46
44
|
}
|
|
47
45
|
const callback = (0, debounce_1.default)(() => {
|
|
@@ -53,25 +51,25 @@ function useToolsFunctions() {
|
|
|
53
51
|
(0, map_1.default)(debounceClickEventsRef.current.clicks, (debounce) => debounce.cancel());
|
|
54
52
|
debounceClickEventsRef.current.clicks = [];
|
|
55
53
|
dispatch({
|
|
56
|
-
type:
|
|
54
|
+
type: 'FULL_ZOOM_OUT',
|
|
55
|
+
payload: {},
|
|
57
56
|
});
|
|
58
57
|
}
|
|
59
58
|
}, [dispatch, debounceClickEventsRef]);
|
|
60
59
|
const changeDisplayViewModeHandler = (0, react_1.useCallback)(() => {
|
|
61
60
|
dispatch({
|
|
62
|
-
type:
|
|
61
|
+
type: 'CHANGE_SPECTRUM_DISPLAY_VIEW_MODE',
|
|
63
62
|
});
|
|
64
63
|
}, [dispatch]);
|
|
65
64
|
const changeSpectrumViewHandler = (0, react_1.useCallback)(() => {
|
|
66
65
|
dispatch({
|
|
67
|
-
type:
|
|
68
|
-
isRealSpectrumVisible: !isRealSpectrumShown,
|
|
66
|
+
type: 'TOGGLE_REAL_IMAGINARY_VISIBILITY',
|
|
69
67
|
});
|
|
70
68
|
setIsRealSpectrumShown(!isRealSpectrumShown);
|
|
71
69
|
}, [dispatch, isRealSpectrumShown]);
|
|
72
70
|
const alignSpectrumsVerticallyHandler = (0, react_1.useCallback)(() => {
|
|
73
71
|
dispatch({
|
|
74
|
-
type:
|
|
72
|
+
type: 'SET_SPECTRUMS_VERTICAL_ALIGN',
|
|
75
73
|
});
|
|
76
74
|
}, [dispatch]);
|
|
77
75
|
return {
|
|
@@ -8,7 +8,7 @@ var XYReducerDomainAxis;
|
|
|
8
8
|
(function (XYReducerDomainAxis) {
|
|
9
9
|
XYReducerDomainAxis["XAxis"] = "XAxis";
|
|
10
10
|
XYReducerDomainAxis["YAxis"] = "YAxis";
|
|
11
|
-
})(XYReducerDomainAxis
|
|
11
|
+
})(XYReducerDomainAxis || (exports.XYReducerDomainAxis = XYReducerDomainAxis = {}));
|
|
12
12
|
function useXYReduce(domainAxis) {
|
|
13
13
|
const { width, xDomain, yDomain } = (0, ChartContext_1.useChartData)();
|
|
14
14
|
return (0, react_1.useCallback)((data) => {
|
|
@@ -17,7 +17,6 @@ const PreferencesContext_1 = require("../context/PreferencesContext");
|
|
|
17
17
|
const Alert_1 = require("../elements/popup/Alert");
|
|
18
18
|
const useCheckToolsVisibility_1 = require("../hooks/useCheckToolsVisibility");
|
|
19
19
|
const index_1 = require("../modal/metaImportation/index");
|
|
20
|
-
const Types_1 = require("../reducer/types/Types");
|
|
21
20
|
const style = (0, react_1.css) `
|
|
22
21
|
height: 100%;
|
|
23
22
|
background-color: #b5b5b599;
|
|
@@ -85,9 +84,9 @@ function DropZone(props) {
|
|
|
85
84
|
});
|
|
86
85
|
}
|
|
87
86
|
dispatch({
|
|
88
|
-
type:
|
|
87
|
+
type: 'LOAD_DROP_FILES',
|
|
89
88
|
payload: {
|
|
90
|
-
|
|
89
|
+
nmriumState,
|
|
91
90
|
containsNmrium,
|
|
92
91
|
onLoadProcessing: current.onLoadProcessing,
|
|
93
92
|
parseMetaFileResult,
|
|
@@ -101,11 +100,11 @@ function DropZone(props) {
|
|
|
101
100
|
reportError(error);
|
|
102
101
|
}
|
|
103
102
|
finally {
|
|
104
|
-
dispatch({ type:
|
|
103
|
+
dispatch({ type: 'SET_LOADING_FLAG', payload: { isLoading: false } });
|
|
105
104
|
}
|
|
106
105
|
}
|
|
107
106
|
function onDrop(droppedFiles) {
|
|
108
|
-
dispatch({ type:
|
|
107
|
+
dispatch({ type: 'SET_LOADING_FLAG', payload: { isLoading: true } });
|
|
109
108
|
void loadFilesHandler(droppedFiles);
|
|
110
109
|
}
|
|
111
110
|
const isImportEnabled = isToolEnabled('import');
|
|
@@ -33,7 +33,7 @@ function NoData({ isEmpty = true, emptyText = 'Drag and drop here a JCAMP-DX, Br
|
|
|
33
33
|
if (!isEmpty) {
|
|
34
34
|
return null;
|
|
35
35
|
}
|
|
36
|
-
return ((0, jsx_runtime_1.jsx)("div", { style: { ...styles.container, ...style }, ...(canOpenLoader && { onClick: openLoader }), children: (0, jsx_runtime_1.jsx)("
|
|
36
|
+
return ((0, jsx_runtime_1.jsx)("div", { style: { ...styles.container, ...style }, ...(canOpenLoader && { onClick: openLoader }), children: (0, jsx_runtime_1.jsx)("div", { style: styles.text, children: isToolEnabled('import')
|
|
37
37
|
? emptyText
|
|
38
38
|
: 'Importation feature has been disabled' }) }));
|
|
39
39
|
}
|
|
@@ -14,7 +14,6 @@ const CloseButton_1 = __importDefault(require("../elements/CloseButton"));
|
|
|
14
14
|
const Label_1 = __importDefault(require("../elements/Label"));
|
|
15
15
|
const Select_1 = __importDefault(require("../elements/Select"));
|
|
16
16
|
const FormikInput_1 = __importDefault(require("../elements/formik/FormikInput"));
|
|
17
|
-
const Types_1 = require("../reducer/types/Types");
|
|
18
17
|
const Events_1 = __importDefault(require("../utility/Events"));
|
|
19
18
|
const ModalStyle_1 = require("./ModalStyle");
|
|
20
19
|
const baseList = [{ key: 1, value: 'manual', label: 'Manual' }];
|
|
@@ -34,7 +33,7 @@ function AlignSpectraModal({ onClose = () => null, nucleus, }) {
|
|
|
34
33
|
refForm.current.submitForm();
|
|
35
34
|
}, []);
|
|
36
35
|
const submitHandler = (0, react_1.useCallback)((values) => {
|
|
37
|
-
dispatch({ type:
|
|
36
|
+
dispatch({ type: 'ALIGN_SPECTRA', payload: values });
|
|
38
37
|
onClose();
|
|
39
38
|
}, [dispatch, onClose]);
|
|
40
39
|
(0, react_1.useEffect)(() => {
|
|
@@ -38,7 +38,6 @@ const CloseButton_1 = __importDefault(require("../elements/CloseButton"));
|
|
|
38
38
|
const Label_1 = __importDefault(require("../elements/Label"));
|
|
39
39
|
const Select_1 = __importDefault(require("../elements/Select"));
|
|
40
40
|
const FormikInput_1 = __importDefault(require("../elements/formik/FormikInput"));
|
|
41
|
-
const Types_1 = require("../reducer/types/Types");
|
|
42
41
|
const formatNumber_1 = require("../utility/formatNumber");
|
|
43
42
|
const ModalStyle_1 = require("./ModalStyle");
|
|
44
43
|
const styles = (0, react_1.css) `
|
|
@@ -96,7 +95,7 @@ function EditPeakShapeModal({ onClose = () => null, peak, peaksPreferences, }) {
|
|
|
96
95
|
const [kind, setKind] = (0, react_2.useState)(peak.shape?.kind);
|
|
97
96
|
const changePeakShapeHandler = (0, react_2.useCallback)((values) => {
|
|
98
97
|
dispatch({
|
|
99
|
-
type:
|
|
98
|
+
type: 'CHANGE_PEAK_SHAPE',
|
|
100
99
|
payload: {
|
|
101
100
|
id: peak.id,
|
|
102
101
|
shape: {
|
|
@@ -37,7 +37,6 @@ const Button_1 = __importDefault(require("../elements/Button"));
|
|
|
37
37
|
const CloseButton_1 = __importDefault(require("../elements/CloseButton"));
|
|
38
38
|
const FormikTextarea_1 = __importDefault(require("../elements/formik/FormikTextarea"));
|
|
39
39
|
const Alert_1 = require("../elements/popup/Alert");
|
|
40
|
-
const Types_1 = require("../reducer/types/Types");
|
|
41
40
|
const ModalStyle_1 = require("./ModalStyle");
|
|
42
41
|
const styles = (0, react_1.css) `
|
|
43
42
|
width: 600px;
|
|
@@ -70,7 +69,7 @@ function ImportPublicationStringModal({ onClose, }) {
|
|
|
70
69
|
const hideLoading = await alert.showLoading('Generate spectrum from publication string in progress');
|
|
71
70
|
setTimeout(() => {
|
|
72
71
|
dispatch({
|
|
73
|
-
type:
|
|
72
|
+
type: 'GENERATE_SPECTRUM_FROM_PUBLICATION_STRING',
|
|
74
73
|
payload: values,
|
|
75
74
|
});
|
|
76
75
|
hideLoading();
|
|
@@ -12,7 +12,6 @@ const DispatchContext_1 = require("../context/DispatchContext");
|
|
|
12
12
|
const Button_1 = __importDefault(require("../elements/Button"));
|
|
13
13
|
const CloseButton_1 = __importDefault(require("../elements/CloseButton"));
|
|
14
14
|
const Context_1 = require("../elements/popup/Alert/Context");
|
|
15
|
-
const Types_1 = require("../reducer/types/Types");
|
|
16
15
|
const FileUtility_1 = require("../utility/FileUtility");
|
|
17
16
|
const styles = (0, react_1.css) `
|
|
18
17
|
display: flex;
|
|
@@ -80,8 +79,8 @@ function LoadJCAMPModal({ onClose, startLoading, }) {
|
|
|
80
79
|
entries: [{ relativePath: pathname, baseURL: origin }],
|
|
81
80
|
}).then((nmriumState) => {
|
|
82
81
|
dispatch({
|
|
83
|
-
type:
|
|
84
|
-
payload: {
|
|
82
|
+
type: 'LOAD_DROP_FILES',
|
|
83
|
+
payload: { nmriumState, resetSourceObject: false },
|
|
85
84
|
});
|
|
86
85
|
onClose?.();
|
|
87
86
|
});
|
|
@@ -8,12 +8,10 @@ const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
|
8
8
|
/** @jsxImportSource @emotion/react */
|
|
9
9
|
const react_1 = require("react");
|
|
10
10
|
const full_1 = require("react-ocl/full");
|
|
11
|
-
const isMolFileEmpty_1 = require("../../data/utilities/isMolFileEmpty");
|
|
12
11
|
const DispatchContext_1 = require("../context/DispatchContext");
|
|
13
12
|
const ActionButtons_1 = __importDefault(require("../elements/ActionButtons"));
|
|
14
13
|
const Modal_1 = require("../elements/popup/Modal");
|
|
15
14
|
const options_1 = require("../elements/popup/options");
|
|
16
|
-
const Types_1 = require("../reducer/types/Types");
|
|
17
15
|
const ModalStyle_1 = require("./ModalStyle");
|
|
18
16
|
function MoleculeStructureEditorModal(props) {
|
|
19
17
|
const { onClose = () => null, selectedMolecule } = props;
|
|
@@ -27,28 +25,35 @@ function MoleculeStructureEditorModal(props) {
|
|
|
27
25
|
setMolfile(null);
|
|
28
26
|
}
|
|
29
27
|
}, [selectedMolecule]);
|
|
30
|
-
const cb = (0, react_1.useCallback)((newMolfile) => {
|
|
31
|
-
|
|
28
|
+
const cb = (0, react_1.useCallback)((newMolfile, molecule) => {
|
|
29
|
+
if (molecule.getAllAtoms() === 0) {
|
|
30
|
+
setMolfile(null);
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
setMolfile(newMolfile);
|
|
34
|
+
}
|
|
32
35
|
}, [setMolfile]);
|
|
33
36
|
const handleClose = (0, react_1.useCallback)(() => {
|
|
34
37
|
onClose();
|
|
35
38
|
}, [onClose]);
|
|
36
39
|
const handleSave = (0, react_1.useCallback)(() => {
|
|
37
|
-
if (
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
40
|
+
if (molfile) {
|
|
41
|
+
if (selectedMolecule) {
|
|
42
|
+
const { id, label } = selectedMolecule;
|
|
43
|
+
dispatch({
|
|
44
|
+
type: 'SET_MOLECULE',
|
|
45
|
+
payload: {
|
|
46
|
+
molfile,
|
|
47
|
+
id,
|
|
48
|
+
label,
|
|
49
|
+
},
|
|
50
|
+
});
|
|
51
|
+
onClose('replace');
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
dispatch({ type: 'ADD_MOLECULE', payload: { molfile } });
|
|
55
|
+
onClose('new');
|
|
56
|
+
}
|
|
52
57
|
}
|
|
53
58
|
}, [dispatch, selectedMolecule, molfile, onClose]);
|
|
54
59
|
return ((0, jsx_runtime_1.jsxs)("div", { css: ModalStyle_1.ModalStyles, children: [(0, jsx_runtime_1.jsx)(full_1.StructureEditor, { initialMolfile: selectedMolecule?.molfile, svgMenu: true, fragment: false, onChange: cb }), (0, jsx_runtime_1.jsx)("div", { className: "footer-container", children: (0, jsx_runtime_1.jsx)(ActionButtons_1.default, { style: { flexDirection: 'row-reverse', margin: 0 }, onDone: handleSave, doneLabel: "Save", onCancel: handleClose }) })] }));
|
|
@@ -46,7 +46,6 @@ const FormikErrorsSummary_1 = __importDefault(require("../elements/formik/Formik
|
|
|
46
46
|
const FormikInput_1 = __importDefault(require("../elements/formik/FormikInput"));
|
|
47
47
|
const FormikSelect_1 = __importDefault(require("../elements/formik/FormikSelect"));
|
|
48
48
|
const Alert_1 = require("../elements/popup/Alert");
|
|
49
|
-
const Types_1 = require("../reducer/types/Types");
|
|
50
49
|
const LocalStorage_1 = require("../utility/LocalStorage");
|
|
51
50
|
const ModalStyle_1 = require("./ModalStyle");
|
|
52
51
|
const styles = (0, react_1.css) `
|
|
@@ -161,26 +160,30 @@ function PredictSpectraModal({ onClose = () => null, molfile, }) {
|
|
|
161
160
|
}, [predictionPreferences, predictionIndex]);
|
|
162
161
|
const submitHandler = (0, react_2.useCallback)((values) => {
|
|
163
162
|
void (async () => {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
163
|
+
if (molfile) {
|
|
164
|
+
setPredictionPreferences({ ...values, isApproved });
|
|
165
|
+
dispatch({
|
|
166
|
+
type: 'SET_LOADING_FLAG',
|
|
167
|
+
payload: {
|
|
168
|
+
isLoading: true,
|
|
169
|
+
},
|
|
170
|
+
});
|
|
171
|
+
const predictedSpectra = Object.entries(values.spectra)
|
|
172
|
+
.map(([key, value]) => {
|
|
173
|
+
if (value) {
|
|
174
|
+
return key;
|
|
175
|
+
}
|
|
176
|
+
return undefined;
|
|
177
|
+
})
|
|
178
|
+
.join(',');
|
|
179
|
+
const hideLoading = await alert.showLoading(`Predict ${predictedSpectra} in progress`);
|
|
180
|
+
dispatch({
|
|
181
|
+
type: 'PREDICT_SPECTRA',
|
|
182
|
+
payload: { molfile, options: values },
|
|
183
|
+
});
|
|
184
|
+
hideLoading();
|
|
185
|
+
onClose();
|
|
186
|
+
}
|
|
184
187
|
})();
|
|
185
188
|
}, [alert, dispatch, isApproved, molfile, onClose, setPredictionPreferences]);
|
|
186
189
|
const approveCheckHandler = (0, react_2.useCallback)((e) => {
|
|
@@ -59,7 +59,7 @@ function SelectMolecule(props) {
|
|
|
59
59
|
}, [currentIndex, element, molecules]);
|
|
60
60
|
const setValue = (0, react_2.useCallback)((index) => {
|
|
61
61
|
setCurrentIndex(index);
|
|
62
|
-
setFieldValue(props.name, molecules[index]);
|
|
62
|
+
void setFieldValue(props.name, molecules[index]);
|
|
63
63
|
}, [molecules, props.name, setFieldValue]);
|
|
64
64
|
(0, react_2.useEffect)(() => {
|
|
65
65
|
if (molecules && molecules.length > 0) {
|
|
@@ -20,7 +20,6 @@ const FormikOnChange_1 = __importDefault(require("../../elements/formik/FormikOn
|
|
|
20
20
|
const usePanelPreferences_1 = require("../../hooks/usePanelPreferences");
|
|
21
21
|
const useSpectrum_1 = __importDefault(require("../../hooks/useSpectrum"));
|
|
22
22
|
const MultiplicityUtilities_1 = require("../../panels/extra/utilities/MultiplicityUtilities");
|
|
23
|
-
const Types_1 = require("../../reducer/types/Types");
|
|
24
23
|
const formatNumber_1 = require("../../utility/formatNumber");
|
|
25
24
|
const SignalsForm_1 = __importDefault(require("./forms/components/SignalsForm"));
|
|
26
25
|
const EditRangeValidation_1 = __importDefault(require("./forms/validation/EditRangeValidation"));
|
|
@@ -108,12 +107,12 @@ function EditRangeModal({ onSaveEditRangeModal = () => null, onCloseEditRangeMod
|
|
|
108
107
|
multiplicity,
|
|
109
108
|
coupling: '',
|
|
110
109
|
};
|
|
111
|
-
if ((0, MultiplicityUtilities_1.hasCouplingConstant)(multiplicity) && signal?.js) {
|
|
110
|
+
if ((0, MultiplicityUtilities_1.hasCouplingConstant)(multiplicity) && signal?.js.length > 0) {
|
|
112
111
|
js = { ...signal.js[counterJ] };
|
|
113
112
|
js.coupling = Number((0, formatNumber_1.formatNumber)(js.coupling, rangesPreferences.coupling.format));
|
|
114
113
|
counterJ++;
|
|
115
114
|
}
|
|
116
|
-
js.multiplicity = (0, nmr_processing_1.translateMultiplet)(js.multiplicity ||
|
|
115
|
+
js.multiplicity = (0, nmr_processing_1.translateMultiplet)(js.multiplicity || multiplicity);
|
|
117
116
|
couplings.push(js);
|
|
118
117
|
}
|
|
119
118
|
}
|
|
@@ -132,7 +131,7 @@ function EditRangeModal({ onSaveEditRangeModal = () => null, onCloseEditRangeMod
|
|
|
132
131
|
return value;
|
|
133
132
|
})) {
|
|
134
133
|
dispatch({
|
|
135
|
-
type:
|
|
134
|
+
type: 'UPDATE_RANGE',
|
|
136
135
|
payload: { range: { ...range, signals } },
|
|
137
136
|
});
|
|
138
137
|
}
|
|
@@ -72,8 +72,8 @@ function AddSignalFormTab({ onFocus, onBlur, range, preferences }, ref) {
|
|
|
72
72
|
js: [{ multiplicity: (0, nmr_processing_1.translateMultiplet)('m'), coupling: '' }],
|
|
73
73
|
};
|
|
74
74
|
const _signals = values.signals.slice().concat(newSignal);
|
|
75
|
-
setFieldValue('signals', _signals);
|
|
76
|
-
setFieldValue('activeTab', String(_signals.length - 1));
|
|
75
|
+
void setFieldValue('signals', _signals);
|
|
76
|
+
void setFieldValue('activeTab', String(_signals.length - 1));
|
|
77
77
|
}, [setFieldValue, values.signals]);
|
|
78
78
|
const validation = (0, react_2.useMemo)(() => {
|
|
79
79
|
return Yup.object().shape({
|
|
@@ -44,7 +44,7 @@ function CouplingsTable({ push, remove, onFocus, onBlur, }) {
|
|
|
44
44
|
const { values, setFieldValue } = (0, formik_1.useFormikContext)();
|
|
45
45
|
const multiplicityChangeHandler = (0, react_2.useCallback)((value, name) => {
|
|
46
46
|
if (!(0, MultiplicityUtilities_1.hasCouplingConstant)(value)) {
|
|
47
|
-
setFieldValue(name, '');
|
|
47
|
+
void setFieldValue(name, '');
|
|
48
48
|
}
|
|
49
49
|
}, [setFieldValue]);
|
|
50
50
|
const couplingsList = (0, get_1.default)(values, `signals[${values.activeTab}].js`, []);
|
|
@@ -41,7 +41,6 @@ const ReactTable_1 = __importDefault(require("../../elements/ReactTable/ReactTab
|
|
|
41
41
|
const FormikInput_1 = __importDefault(require("../../elements/formik/FormikInput"));
|
|
42
42
|
const FormikSelect_1 = __importDefault(require("../../elements/formik/FormikSelect"));
|
|
43
43
|
const Context_1 = require("../../elements/popup/Alert/Context");
|
|
44
|
-
const Types_1 = require("../../reducer/types/Types");
|
|
45
44
|
const convertPathArrayToString_1 = require("../../utility/convertPathArrayToString");
|
|
46
45
|
const getSpectraObjectPaths_1 = require("../../utility/getSpectraObjectPaths");
|
|
47
46
|
const ModalStyle_1 = require("../ModalStyle");
|
|
@@ -160,7 +159,7 @@ function MetaImportationModal({ onClose, file }) {
|
|
|
160
159
|
}
|
|
161
160
|
catch (error) {
|
|
162
161
|
if (error instanceof parseMeta_1.TargetPathError) {
|
|
163
|
-
formRef.current?.setFieldValue('target', null);
|
|
162
|
+
void formRef.current?.setFieldValue('target', null);
|
|
164
163
|
formRef.current?.setFieldError('target', '');
|
|
165
164
|
}
|
|
166
165
|
alert.error(error.message);
|
|
@@ -189,7 +188,7 @@ function MetaImportationModal({ onClose, file }) {
|
|
|
189
188
|
}
|
|
190
189
|
function handleImport() {
|
|
191
190
|
dispatch({
|
|
192
|
-
type:
|
|
191
|
+
type: 'IMPORT_SPECTRA_META_INFO',
|
|
193
192
|
payload: { spectraMeta: matches },
|
|
194
193
|
});
|
|
195
194
|
onClose?.();
|
|
@@ -41,7 +41,7 @@ function DatabasesTabContent({ currentWorkspace, originalWorkspaces, }) {
|
|
|
41
41
|
function deleteHandler(index) {
|
|
42
42
|
const _database = databases.data.slice();
|
|
43
43
|
_database.splice(index, 1);
|
|
44
|
-
setFieldValue('databases.data', _database);
|
|
44
|
+
void setFieldValue('databases.data', _database);
|
|
45
45
|
}
|
|
46
46
|
function addHandler() {
|
|
47
47
|
const newDatabase = {
|
|
@@ -50,17 +50,17 @@ function DatabasesTabContent({ currentWorkspace, originalWorkspaces, }) {
|
|
|
50
50
|
url: '',
|
|
51
51
|
enabled: true,
|
|
52
52
|
};
|
|
53
|
-
setFieldValue('databases.data', [...databases.data, newDatabase]);
|
|
53
|
+
void setFieldValue('databases.data', [...databases.data, newDatabase]);
|
|
54
54
|
}
|
|
55
55
|
function resetHandler() {
|
|
56
56
|
const workSpaceDisplayPreferences = (0, getPreferencesByWorkspace_1.getPreferencesByWorkspace)(currentWorkspace, originalWorkspaces);
|
|
57
57
|
const database = workSpaceDisplayPreferences.databases.data;
|
|
58
|
-
setFieldValue('databases.data', database);
|
|
58
|
+
void setFieldValue('databases.data', database);
|
|
59
59
|
}
|
|
60
60
|
return ((0, jsx_runtime_1.jsx)("fieldset", { onClick: (e) => {
|
|
61
61
|
if (e.target.checked) {
|
|
62
62
|
e.target.checked = false;
|
|
63
|
-
setFieldValue('databases.defaultDatabase', '');
|
|
63
|
+
void setFieldValue('databases.defaultDatabase', '');
|
|
64
64
|
}
|
|
65
65
|
}, children: (0, jsx_runtime_1.jsx)(GroupPane_1.GroupPane, { text: "Databases", renderHeader: (text) => {
|
|
66
66
|
return ((0, jsx_runtime_1.jsx)(DataBaseHeader, { text: text, onReset: resetHandler, onAdd: addHandler }));
|
|
@@ -64,7 +64,7 @@ function FormattingTabContent() {
|
|
|
64
64
|
_nuclei[nucleus] = nuclei[nucleus];
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
|
-
setFieldValue('formatting.nuclei', _nuclei);
|
|
67
|
+
void setFieldValue('formatting.nuclei', _nuclei);
|
|
68
68
|
}
|
|
69
69
|
function addHandler() {
|
|
70
70
|
const newFormat = {
|
|
@@ -74,7 +74,7 @@ function FormattingTabContent() {
|
|
|
74
74
|
};
|
|
75
75
|
const key = (0, uuid_1.v4)();
|
|
76
76
|
const newNuclei = { ...nuclei, [key]: newFormat };
|
|
77
|
-
setFieldValue('formatting.nuclei', newNuclei);
|
|
77
|
+
void setFieldValue('formatting.nuclei', newNuclei);
|
|
78
78
|
}
|
|
79
79
|
const nucleiList = Object.keys(nuclei);
|
|
80
80
|
return ((0, jsx_runtime_1.jsx)(GroupPane_1.GroupPane, { text: "Number formatting for crosshair and info line", children: (0, jsx_runtime_1.jsx)("div", { css: styles, children: (0, jsx_runtime_1.jsxs)("table", { children: [(0, jsx_runtime_1.jsx)("thead", { children: (0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("th", { className: "counter-col", children: "#" }), (0, jsx_runtime_1.jsx)("th", { className: "nucleus-label-col", children: "Nucleus " }), (0, jsx_runtime_1.jsx)("th", { className: "nucleus-format-input-col", children: "\u03B4 (ppm)" }), (0, jsx_runtime_1.jsx)("th", { className: "nucleus-format-input-col", children: "Coupling (Hz)" }), (0, jsx_runtime_1.jsx)("th", { className: "nucleus-format-input-col" })] }) }), (0, jsx_runtime_1.jsx)("tbody", { children: nucleiList?.map((key, index) => {
|
|
@@ -43,11 +43,11 @@ function InfoBlockTabContent() {
|
|
|
43
43
|
else {
|
|
44
44
|
columns.push(emptyField);
|
|
45
45
|
}
|
|
46
|
-
setFieldValue('infoBlock.fields', columns);
|
|
46
|
+
void setFieldValue('infoBlock.fields', columns);
|
|
47
47
|
}, [setFieldValue]);
|
|
48
48
|
const deleteHandler = (0, react_1.useCallback)((data, index) => {
|
|
49
49
|
const _fields = data.filter((_, columnIndex) => columnIndex !== index);
|
|
50
|
-
setFieldValue('infoBlock.fields', _fields);
|
|
50
|
+
void setFieldValue('infoBlock.fields', _fields);
|
|
51
51
|
}, [setFieldValue]);
|
|
52
52
|
const COLUMNS = (0, react_1.useMemo)(() => [
|
|
53
53
|
{
|
|
@@ -8,14 +8,13 @@ const cheminfo_font_1 = require("cheminfo-font");
|
|
|
8
8
|
const react_1 = require("react");
|
|
9
9
|
const DispatchContext_1 = require("../../context/DispatchContext");
|
|
10
10
|
const ReactTable_1 = __importDefault(require("../../elements/ReactTable/ReactTable"));
|
|
11
|
-
const Types_1 = require("../../reducer/types/Types");
|
|
12
11
|
function AutomaticAssignmentTable({ data }) {
|
|
13
12
|
const dispatch = (0, DispatchContext_1.useDispatch)();
|
|
14
13
|
const assignHandler = (0, react_1.useCallback)((e, row) => {
|
|
15
14
|
e.preventDefault();
|
|
16
15
|
e.stopPropagation();
|
|
17
16
|
dispatch({
|
|
18
|
-
type:
|
|
17
|
+
type: 'SET_AUTOMATIC_ASSIGNMENTS',
|
|
19
18
|
payload: { assignments: row.original.assignment },
|
|
20
19
|
});
|
|
21
20
|
}, [dispatch]);
|
|
@@ -10,7 +10,6 @@ const react_1 = require("react");
|
|
|
10
10
|
const ChartContext_1 = require("../../context/ChartContext");
|
|
11
11
|
const DispatchContext_1 = require("../../context/DispatchContext");
|
|
12
12
|
const Alert_1 = require("../../elements/popup/Alert");
|
|
13
|
-
const Types_1 = require("../../reducer/types/Types");
|
|
14
13
|
const assert_1 = require("../../utility/assert");
|
|
15
14
|
function mapSpectra(data) {
|
|
16
15
|
return data.map((spectrum) => {
|
|
@@ -34,10 +33,12 @@ function useAutoAssignments() {
|
|
|
34
33
|
const alert = (0, Alert_1.useAlert)();
|
|
35
34
|
const [assignments, setAssignments] = (0, react_1.useState)([]);
|
|
36
35
|
function restAssignments() {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
if (originData.current) {
|
|
37
|
+
dispatch({
|
|
38
|
+
type: 'SET_AUTOMATIC_ASSIGNMENTS',
|
|
39
|
+
payload: { assignments: originData.current },
|
|
40
|
+
});
|
|
41
|
+
}
|
|
41
42
|
}
|
|
42
43
|
function getAssignments() {
|
|
43
44
|
void (async () => {
|
|
@@ -53,7 +54,7 @@ function useAutoAssignments() {
|
|
|
53
54
|
}, { minScore: 0 });
|
|
54
55
|
if (result[0]?.assignment) {
|
|
55
56
|
dispatch({
|
|
56
|
-
type:
|
|
57
|
+
type: 'SET_AUTOMATIC_ASSIGNMENTS',
|
|
57
58
|
payload: { assignments: result[0].assignment },
|
|
58
59
|
});
|
|
59
60
|
}
|