nmrium 0.36.0 → 0.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/component/1d/FooterBanner.js +1 -1
- package/lib/component/1d/Viewer1D.js +26 -21
- package/lib/component/1d/integral/Integral.d.ts +2 -6
- package/lib/component/1d/integral/IntegralResizable.d.ts +2 -6
- package/lib/component/1d/integral/IntegralResizable.js +2 -3
- package/lib/component/1d/multiAnalysis/MultiAnalysisRanges.js +1 -1
- package/lib/component/1d/multiplicityTree/MultiplicityTree.js +7 -9
- package/lib/component/1d/peaks/PeakAnnotation.js +1 -2
- package/lib/component/1d/ranges/Range.js +9 -8
- package/lib/component/1d/ranges/Ranges.js +5 -7
- package/lib/component/1d/tool/BaseLineZones.js +1 -2
- package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.js +4 -5
- package/lib/component/1d-2d/components/FloatMoleculeStructures/index.js +13 -17
- package/lib/component/2d/1d-tracer/Left1DChart.js +1 -1
- package/lib/component/2d/1d-tracer/VerticalSliceChart.js +1 -1
- package/lib/component/2d/Chart2D.js +1 -1
- package/lib/component/2d/Viewer2D.js +10 -9
- package/lib/component/2d/fid/FidCanvas.js +4 -6
- package/lib/component/2d/ft/Contours.js +1 -7
- package/lib/component/2d/utilities/DimensionLayout.d.ts +9 -24
- package/lib/component/2d/utilities/scale.d.ts +2 -1
- package/lib/component/2d/utilities/scale.js +1 -1
- package/lib/component/2d/zones/Zones.js +1 -1
- package/lib/component/EventsTrackers/KeysListenerTracker.js +28 -21
- package/lib/component/NMRium.d.ts +2 -0
- package/lib/component/NMRium.js +22 -15
- package/lib/component/assignment/AssignmentsReducer.d.ts +1 -1
- package/lib/component/context/DispatchContext.d.ts +23 -3
- package/lib/component/context/DispatchContext.js +1 -1
- package/lib/component/context/LoggerContext.js +1 -1
- package/lib/component/elements/Button.js +7 -9
- package/lib/component/elements/IsotopesViewer.js +1 -1
- package/lib/component/elements/ReactTable/ReactTable.js +1 -2
- package/lib/component/elements/RemoveAssignmentsButton.d.ts +4 -0
- package/lib/component/{panels/RangesPanel/TableColumns → elements}/RemoveAssignmentsButton.js +14 -1
- package/lib/component/elements/formik/FormikCheckBox.js +1 -1
- package/lib/component/elements/formik/FormikColorInput.js +1 -1
- package/lib/component/elements/formik/FormikColorPicker.js +1 -1
- package/lib/component/elements/formik/FormikColumnFormatField.js +1 -1
- package/lib/component/elements/formik/FormikInput.js +1 -1
- package/lib/component/elements/formik/FormikSelect.js +2 -2
- package/lib/component/elements/formik/FormikSlider.js +1 -1
- package/lib/component/elements/formik/FormikTextarea.js +2 -2
- package/lib/component/header/ApodizationOptionsPanel.js +4 -5
- package/lib/component/header/AutoPeakPickingOptionPanel.js +1 -2
- package/lib/component/header/BaseLineCorrectionPanel.js +4 -5
- package/lib/component/header/Header.js +5 -7
- package/lib/component/header/PhaseCorrectionPanel.js +7 -8
- package/lib/component/header/RangesPickingOptionPanel.js +1 -2
- package/lib/component/header/ZeroFillingOptionsPanel.js +3 -11
- package/lib/component/header/Zones2DOptionPanel.js +5 -6
- package/lib/component/hooks/useExport.js +1 -0
- package/lib/component/hooks/useToolsFunctions.js +8 -10
- package/lib/component/loader/DropZone.js +4 -5
- package/lib/component/loader/NoData.js +1 -1
- package/lib/component/modal/AboutPredictionModal.d.ts +2 -0
- package/lib/component/modal/AboutPredictionModal.js +49 -0
- package/lib/component/modal/AlignSpectraModal.js +1 -2
- package/lib/component/modal/EditPeakShapeModal.js +1 -2
- package/lib/component/modal/ImportPublicationStringModal.js +1 -2
- package/lib/component/modal/LoadJCAMPModal.js +2 -3
- package/lib/component/modal/MoleculeStructureEditorModal.js +24 -19
- package/lib/component/modal/PredictSpectraModal.js +24 -21
- package/lib/component/modal/changeSum/SelectMolecule.js +1 -1
- package/lib/component/modal/editRange/EditRangeModal.js +3 -4
- package/lib/component/modal/editRange/forms/components/AddSignalFormTab.js +2 -2
- package/lib/component/modal/editRange/forms/components/CouplingsTable.js +1 -1
- package/lib/component/modal/metaImportation/MetaImportationModal.js +2 -3
- package/lib/component/modal/setting/settings-tabs/DatabasesTabContent.js +4 -4
- package/lib/component/modal/setting/settings-tabs/FormattingTabContent.js +2 -2
- package/lib/component/modal/setting/settings-tabs/InfoBlockTabContent.js +2 -2
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignmentTable.js +1 -2
- package/lib/component/panels/AutomaticAssignment/useAutoAssignments.js +7 -6
- package/lib/component/panels/InformationPanel.js +6 -6
- package/lib/component/panels/IntegralsPanel/IntegralPanel.js +11 -20
- package/lib/component/panels/IntegralsPanel/IntegralTable.js +27 -23
- package/lib/component/panels/IntegralsPanel/IntegralsPreferences.js +8 -5
- package/lib/component/panels/MatrixGenerationPanel/ExclusionsZonesTable.js +1 -1
- package/lib/component/panels/MatrixGenerationPanel/FiltersOptions.js +4 -4
- package/lib/component/panels/MatrixGenerationPanel/MatrixGenerationPanel.js +1 -2
- package/lib/component/panels/MoleculesPanel/MoleculeHeader.js +1 -2
- package/lib/component/panels/MoleculesPanel/MoleculePanel.js +10 -13
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.d.ts +1 -0
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +7 -7
- package/lib/component/panels/MoleculesPanel/Utilities.d.ts +4 -1
- package/lib/component/panels/MoleculesPanel/Utilities.js +2 -2
- package/lib/component/panels/MoleculesPanel/useAtomAssignment.js +8 -9
- package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.js +3 -4
- package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisTable.js +1 -2
- package/lib/component/panels/MultipleSpectraAnalysisPanel/preferences/AnalysisTablePreferences.js +2 -2
- package/lib/component/panels/MultipleSpectraAnalysisPanel/preferences/LegendsPreferences.js +2 -2
- package/lib/component/panels/MultipleSpectraAnalysisPanel/preferences/MultipleAnalysisCodeEditor.js +1 -1
- package/lib/component/panels/Panels.js +1 -1
- package/lib/component/panels/PeaksPanel/PeaksPanel.js +4 -5
- package/lib/component/panels/PeaksPanel/PeaksTable.js +4 -5
- package/lib/component/panels/RangesPanel/RangesHeader.js +12 -15
- package/lib/component/panels/RangesPanel/RangesPanel.js +24 -29
- package/lib/component/panels/RangesPanel/RangesTableRow.d.ts +0 -1
- package/lib/component/panels/RangesPanel/RangesTableRow.js +0 -11
- package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js +2 -3
- package/lib/component/panels/RangesPanel/TableColumns/RelativeColumn.js +3 -3
- package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.js +2 -3
- package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.js +1 -2
- package/lib/component/panels/RangesPanel/hooks/useEditRangeModal.d.ts +1 -1
- package/lib/component/panels/RangesPanel/hooks/useEditRangeModal.js +16 -14
- package/lib/component/panels/SpectrumsPanel/SpectraPanelHeader.js +16 -16
- package/lib/component/panels/SpectrumsPanel/SpectraPreferences.js +2 -2
- package/lib/component/panels/SpectrumsPanel/SpectraTable.js +7 -5
- package/lib/component/panels/SpectrumsPanel/SpectrumsTabs.js +4 -5
- package/lib/component/panels/SpectrumsPanel/base/ShowHideSpectrumButton.js +3 -7
- package/lib/component/panels/SpectrumsPanel/base/SpectraColumnsManager.js +1 -1
- package/lib/component/panels/SpectrumsPanel/base/setting/SpectrumSetting.js +4 -2
- package/lib/component/panels/SpectrumsPanel/base/setting/processSnapPlot.js +2 -2
- package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +4 -8
- package/lib/component/panels/SummaryPanel/SummaryPanel.js +39 -34
- package/lib/component/panels/SummaryPanel/utilities/Utilities.js +1 -1
- package/lib/component/panels/ZonesPanel/TableColumns/ActionsColumn.d.ts +2 -21
- package/lib/component/panels/ZonesPanel/TableColumns/ActionsColumn.js +22 -20
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumn.d.ts +4 -5
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumn.js +12 -16
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.d.ts +3 -7
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.js +2 -2
- package/lib/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.d.ts +2 -2
- package/lib/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.js +6 -7
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.d.ts +4 -5
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.js +27 -19
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumns.d.ts +3 -7
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumns.js +2 -2
- package/lib/component/panels/ZonesPanel/ZonesPanel.js +15 -18
- package/lib/component/panels/ZonesPanel/ZonesTable.js +2 -51
- package/lib/component/panels/ZonesPanel/ZonesTableRow.d.ts +3 -3
- package/lib/component/panels/ZonesPanel/ZonesTableRow.js +2 -22
- package/lib/component/panels/ZonesPanel/hooks/useMapZones.d.ts +16 -0
- package/lib/component/panels/ZonesPanel/hooks/useMapZones.js +52 -0
- package/lib/component/panels/databasePanel/DatabasePanel.js +9 -7
- package/lib/component/panels/filtersPanel/FilterPanel.js +1 -2
- package/lib/component/panels/filtersPanel/FiltersTable.js +8 -9
- package/lib/component/panels/header/DefaultPanelHeader.js +1 -1
- package/lib/component/panels/header/SpectraAutomaticPickingButton.js +2 -3
- package/lib/component/panels/predictionPanel/PredictionPanel.js +10 -6
- package/lib/component/reducer/IgnoreActions.d.ts +2 -1
- package/lib/component/reducer/IgnoreActions.js +35 -32
- package/lib/component/reducer/Reducer.d.ts +8 -5
- package/lib/component/reducer/Reducer.js +199 -221
- package/lib/component/reducer/actions/AssignmentsActions.d.ts +7 -6
- package/lib/component/reducer/actions/AssignmentsActions.js +2 -2
- package/lib/component/reducer/actions/CorrelationsActions.d.ts +21 -13
- package/lib/component/reducer/actions/CorrelationsActions.js +25 -20
- package/lib/component/reducer/actions/DatabaseActions.d.ts +15 -2
- package/lib/component/reducer/actions/DatabaseActions.js +5 -2
- package/lib/component/reducer/actions/DimensionsActions.d.ts +8 -3
- package/lib/component/reducer/actions/DimensionsActions.js +3 -5
- package/lib/component/reducer/actions/DomainActions.d.ts +11 -5
- package/lib/component/reducer/actions/DomainActions.js +13 -19
- package/lib/component/reducer/actions/FiltersActions.d.ts +70 -23
- package/lib/component/reducer/actions/FiltersActions.js +250 -255
- package/lib/component/reducer/actions/GlobalActions.d.ts +7 -2
- package/lib/component/reducer/actions/GlobalActions.js +3 -3
- package/lib/component/reducer/actions/IntegralsActions.d.ts +28 -7
- package/lib/component/reducer/actions/IntegralsActions.js +16 -15
- package/lib/component/reducer/actions/LoadActions.d.ts +23 -5
- package/lib/component/reducer/actions/LoadActions.js +65 -57
- package/lib/component/reducer/actions/MoleculeActions.d.ts +38 -9
- package/lib/component/reducer/actions/MoleculeActions.js +53 -20
- package/lib/component/reducer/actions/PeaksActions.d.ts +39 -8
- package/lib/component/reducer/actions/PeaksActions.js +19 -11
- package/lib/component/reducer/actions/PreferencesActions.d.ts +8 -3
- package/lib/component/reducer/actions/PreferencesActions.js +22 -7
- package/lib/component/reducer/actions/RangesActions.d.ts +85 -18
- package/lib/component/reducer/actions/RangesActions.js +80 -65
- package/lib/component/reducer/actions/SpectraAnalysisAction.d.ts +7 -1
- package/lib/component/reducer/actions/SpectrumsActions.d.ts +57 -24
- package/lib/component/reducer/actions/SpectrumsActions.js +69 -60
- package/lib/component/reducer/actions/ToolsActions.d.ts +59 -21
- package/lib/component/reducer/actions/ToolsActions.js +54 -32
- package/lib/component/reducer/actions/ZonesActions.d.ts +79 -15
- package/lib/component/reducer/actions/ZonesActions.js +68 -49
- package/lib/component/reducer/helper/Zoom1DManager.d.ts +6 -5
- package/lib/component/reducer/helper/Zoom1DManager.js +1 -1
- package/lib/component/reducer/helper/ZoomHistoryManager.js +2 -2
- package/lib/component/reducer/helper/get2DRange.d.ts +7 -1
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js +1 -0
- package/lib/component/reducer/preferences/preferencesReducer.d.ts +1 -1
- package/lib/component/reducer/types/ActionType.d.ts +6 -0
- package/lib/component/reducer/types/ActionType.js +1 -0
- package/lib/component/toolbar/BasicToolBar.js +6 -9
- package/lib/component/toolbar/FunctionToolBar.js +4 -9
- package/lib/component/toolbar/ToolBar.js +1 -1
- package/lib/component/toolbar/ToolTypes.d.ts +2 -2
- package/lib/component/utility/Events.d.ts +4 -4
- package/lib/component/utility/Events.js +2 -2
- package/lib/component/utility/GroupByInfoKey.js +1 -1
- package/lib/component/utility/getSpectraObjectPaths.js +1 -1
- package/lib/component/workspaces/Workspace.d.ts +2 -1
- package/lib/component/workspaces/exercise.js +31 -0
- package/lib/component/workspaces/workspaceDefaultProperties.js +1 -0
- package/lib/data/PredictionManager.d.ts +5 -8
- package/lib/data/PredictionManager.js +3 -3
- package/lib/data/data1d/Spectrum1D/getSpectrumErrorValue.js +1 -1
- package/lib/data/data1d/Spectrum1D/initiateDatum1D.js +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/changeRangeRelativeValue.d.ts +2 -3
- package/lib/data/data1d/Spectrum1D/ranges/changeRangeRelativeValue.js +5 -4
- package/lib/data/data1d/Spectrum1D/ranges/generateSpectrumFromRanges.d.ts +5 -3
- package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.d.ts +1 -35
- package/lib/data/data1d/Spectrum1D/ranges/mapRanges.d.ts +2 -35
- package/lib/data/data1d/filter1d/baselineCorrection.d.ts +7 -10
- package/lib/data/data1d/multipleSpectraAnalysis.d.ts +1 -1
- package/lib/data/data2d/Processing2D.d.ts +3 -3
- package/lib/data/data2d/Spectrum2D/contours.d.ts +1 -4
- package/lib/data/data2d/Spectrum2D/contours.js +0 -1
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.js +1 -1
- package/lib/data/data2d/Spectrum2D/zones/changeZoneSignal.d.ts +5 -1
- package/lib/data/data2d/Spectrum2D/zones/changeZoneSignal.js +6 -8
- package/lib/data/data2d/Spectrum2D/zones/detectZonesManual.d.ts +2 -0
- package/lib/data/data2d/Spectrum2D/zones/initiateZones.d.ts +2 -0
- package/lib/data/data2d/Spectrum2D/zones/mapZones.d.ts +2 -0
- package/lib/data/matrixGeneration.js +4 -2
- package/lib/data/molecules/Molecule.d.ts +3 -3
- package/lib/data/molecules/MoleculeManager.d.ts +5 -5
- package/lib/data/molecules/MoleculeManager.js +1 -1
- package/lib/data/utilities/ZoneUtilities.js +0 -1
- package/lib/data/utilities/generateColor.js +1 -1
- package/lib/data/utilities/isNumber.d.ts +1 -0
- package/lib/data/utilities/isNumber.js +3 -0
- package/lib/types/NMRiumGeneralPreferences.d.ts +1 -0
- package/lib/versionInfo.js +1 -1
- package/lib-cjs/component/1d/FooterBanner.js +1 -1
- package/lib-cjs/component/1d/Viewer1D.js +25 -20
- package/lib-cjs/component/1d/integral/IntegralResizable.js +2 -3
- package/lib-cjs/component/1d/multiAnalysis/MultiAnalysisRanges.js +1 -1
- package/lib-cjs/component/1d/multiplicityTree/MultiplicityTree.js +7 -9
- package/lib-cjs/component/1d/peaks/PeakAnnotation.js +1 -2
- package/lib-cjs/component/1d/ranges/Range.js +9 -8
- package/lib-cjs/component/1d/ranges/Ranges.js +5 -7
- package/lib-cjs/component/1d/tool/BaseLineZones.js +1 -2
- package/lib-cjs/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.js +4 -5
- package/lib-cjs/component/1d-2d/components/FloatMoleculeStructures/index.js +13 -17
- package/lib-cjs/component/2d/1d-tracer/Left1DChart.js +1 -1
- package/lib-cjs/component/2d/1d-tracer/VerticalSliceChart.js +1 -1
- package/lib-cjs/component/2d/Chart2D.js +1 -1
- package/lib-cjs/component/2d/Viewer2D.js +10 -9
- package/lib-cjs/component/2d/fid/FidCanvas.js +4 -6
- package/lib-cjs/component/2d/ft/Contours.js +1 -7
- package/lib-cjs/component/2d/utilities/scale.js +1 -1
- package/lib-cjs/component/2d/zones/Zones.js +1 -1
- package/lib-cjs/component/EventsTrackers/KeysListenerTracker.js +28 -21
- package/lib-cjs/component/NMRium.js +19 -12
- package/lib-cjs/component/context/DispatchContext.js +1 -1
- package/lib-cjs/component/context/LoggerContext.js +1 -1
- package/lib-cjs/component/elements/Button.js +7 -9
- package/lib-cjs/component/elements/IsotopesViewer.js +1 -1
- package/lib-cjs/component/elements/ReactTable/ReactTable.js +1 -2
- package/lib-cjs/component/{panels/RangesPanel/TableColumns → elements}/RemoveAssignmentsButton.js +15 -2
- package/lib-cjs/component/elements/Tab/Tabs.js +1 -1
- package/lib-cjs/component/elements/formik/FormikCheckBox.js +1 -1
- package/lib-cjs/component/elements/formik/FormikColorInput.js +1 -1
- package/lib-cjs/component/elements/formik/FormikColorPicker.js +1 -1
- package/lib-cjs/component/elements/formik/FormikColumnFormatField.js +1 -1
- package/lib-cjs/component/elements/formik/FormikInput.js +1 -1
- package/lib-cjs/component/elements/formik/FormikSelect.js +2 -2
- package/lib-cjs/component/elements/formik/FormikSlider.js +1 -1
- package/lib-cjs/component/elements/formik/FormikTextarea.js +2 -2
- package/lib-cjs/component/header/ApodizationOptionsPanel.js +3 -4
- package/lib-cjs/component/header/AutoPeakPickingOptionPanel.js +1 -2
- package/lib-cjs/component/header/BaseLineCorrectionPanel.js +4 -5
- package/lib-cjs/component/header/Header.js +5 -7
- package/lib-cjs/component/header/PhaseCorrectionPanel.js +7 -8
- package/lib-cjs/component/header/RangesPickingOptionPanel.js +1 -2
- package/lib-cjs/component/header/ZeroFillingOptionsPanel.js +3 -11
- package/lib-cjs/component/header/Zones2DOptionPanel.js +5 -6
- package/lib-cjs/component/highlight/index.js +1 -1
- package/lib-cjs/component/hooks/useExport.js +1 -0
- package/lib-cjs/component/hooks/useTableSortBy.js +1 -1
- package/lib-cjs/component/hooks/useToolsFunctions.js +8 -10
- package/lib-cjs/component/hooks/useXYReduce.js +1 -1
- package/lib-cjs/component/loader/DropZone.js +4 -5
- package/lib-cjs/component/loader/NoData.js +1 -1
- package/lib-cjs/component/modal/AboutPredictionModal.js +54 -0
- package/lib-cjs/component/modal/AlignSpectraModal.js +1 -2
- package/lib-cjs/component/modal/EditPeakShapeModal.js +1 -2
- package/lib-cjs/component/modal/ImportPublicationStringModal.js +1 -2
- package/lib-cjs/component/modal/LoadJCAMPModal.js +2 -3
- package/lib-cjs/component/modal/MoleculeStructureEditorModal.js +24 -19
- package/lib-cjs/component/modal/PredictSpectraModal.js +24 -21
- package/lib-cjs/component/modal/changeSum/SelectMolecule.js +1 -1
- package/lib-cjs/component/modal/editRange/EditRangeModal.js +3 -4
- package/lib-cjs/component/modal/editRange/forms/components/AddSignalFormTab.js +2 -2
- package/lib-cjs/component/modal/editRange/forms/components/CouplingsTable.js +1 -1
- package/lib-cjs/component/modal/metaImportation/MetaImportationModal.js +2 -3
- package/lib-cjs/component/modal/setting/settings-tabs/DatabasesTabContent.js +4 -4
- package/lib-cjs/component/modal/setting/settings-tabs/FormattingTabContent.js +2 -2
- package/lib-cjs/component/modal/setting/settings-tabs/InfoBlockTabContent.js +2 -2
- package/lib-cjs/component/panels/AutomaticAssignment/AutomaticAssignmentTable.js +1 -2
- package/lib-cjs/component/panels/AutomaticAssignment/useAutoAssignments.js +7 -6
- package/lib-cjs/component/panels/InformationPanel.js +6 -6
- package/lib-cjs/component/panels/IntegralsPanel/IntegralPanel.js +11 -20
- package/lib-cjs/component/panels/IntegralsPanel/IntegralTable.js +27 -23
- package/lib-cjs/component/panels/IntegralsPanel/IntegralsPreferences.js +7 -4
- package/lib-cjs/component/panels/MatrixGenerationPanel/ExclusionsZonesTable.js +1 -1
- package/lib-cjs/component/panels/MatrixGenerationPanel/FiltersOptions.js +4 -4
- package/lib-cjs/component/panels/MatrixGenerationPanel/MatrixGenerationPanel.js +1 -2
- package/lib-cjs/component/panels/MoleculesPanel/MoleculeHeader.js +1 -2
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanel.js +10 -13
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanelHeader.js +7 -7
- package/lib-cjs/component/panels/MoleculesPanel/Utilities.js +2 -2
- package/lib-cjs/component/panels/MoleculesPanel/useAtomAssignment.js +8 -9
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.js +3 -4
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisTable.js +1 -2
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/preferences/AnalysisTablePreferences.js +2 -2
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/preferences/LegendsPreferences.js +2 -2
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/preferences/MultipleAnalysisCodeEditor.js +1 -1
- package/lib-cjs/component/panels/Panels.js +1 -1
- package/lib-cjs/component/panels/PeaksPanel/PeaksPanel.js +4 -5
- package/lib-cjs/component/panels/PeaksPanel/PeaksTable.js +4 -5
- package/lib-cjs/component/panels/RangesPanel/RangesHeader.js +12 -15
- package/lib-cjs/component/panels/RangesPanel/RangesPanel.js +24 -29
- package/lib-cjs/component/panels/RangesPanel/RangesTableRow.js +0 -12
- package/lib-cjs/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js +2 -3
- package/lib-cjs/component/panels/RangesPanel/TableColumns/RelativeColumn.js +3 -3
- package/lib-cjs/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.js +2 -3
- package/lib-cjs/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.js +1 -2
- package/lib-cjs/component/panels/RangesPanel/hooks/useEditRangeModal.js +16 -14
- package/lib-cjs/component/panels/SpectrumsPanel/SpectraPanelHeader.js +16 -16
- package/lib-cjs/component/panels/SpectrumsPanel/SpectraPreferences.js +2 -2
- package/lib-cjs/component/panels/SpectrumsPanel/SpectraTable.js +7 -5
- package/lib-cjs/component/panels/SpectrumsPanel/SpectrumsTabs.js +4 -5
- package/lib-cjs/component/panels/SpectrumsPanel/base/ShowHideSpectrumButton.js +3 -7
- package/lib-cjs/component/panels/SpectrumsPanel/base/SpectraColumnsManager.js +1 -1
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/SpectrumSetting.js +4 -2
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/processSnapPlot.js +2 -2
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +4 -8
- package/lib-cjs/component/panels/SummaryPanel/SummaryPanel.js +39 -34
- package/lib-cjs/component/panels/SummaryPanel/utilities/Utilities.js +1 -1
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/ActionsColumn.js +22 -20
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumn.js +12 -19
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.js +2 -2
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.js +6 -7
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.js +27 -22
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumns.js +2 -2
- package/lib-cjs/component/panels/ZonesPanel/ZonesPanel.js +15 -18
- package/lib-cjs/component/panels/ZonesPanel/ZonesTable.js +2 -51
- package/lib-cjs/component/panels/ZonesPanel/ZonesTableRow.js +1 -21
- package/lib-cjs/component/panels/ZonesPanel/hooks/useMapZones.js +56 -0
- package/lib-cjs/component/panels/databasePanel/DatabasePanel.js +8 -6
- package/lib-cjs/component/panels/filtersPanel/FilterPanel.js +1 -2
- package/lib-cjs/component/panels/filtersPanel/FiltersTable.js +8 -9
- package/lib-cjs/component/panels/header/DefaultPanelHeader.js +1 -1
- package/lib-cjs/component/panels/header/SpectraAutomaticPickingButton.js +2 -3
- package/lib-cjs/component/panels/predictionPanel/PredictionPanel.js +10 -6
- package/lib-cjs/component/reducer/IgnoreActions.js +35 -55
- package/lib-cjs/component/reducer/Reducer.js +199 -221
- package/lib-cjs/component/reducer/actions/AssignmentsActions.js +3 -3
- package/lib-cjs/component/reducer/actions/CorrelationsActions.js +23 -18
- package/lib-cjs/component/reducer/actions/DatabaseActions.js +4 -1
- package/lib-cjs/component/reducer/actions/DimensionsActions.js +3 -6
- package/lib-cjs/component/reducer/actions/DomainActions.js +15 -23
- package/lib-cjs/component/reducer/actions/FiltersActions.js +267 -272
- package/lib-cjs/component/reducer/actions/GlobalActions.js +4 -4
- package/lib-cjs/component/reducer/actions/IntegralsActions.js +19 -18
- package/lib-cjs/component/reducer/actions/LoadActions.js +68 -60
- package/lib-cjs/component/reducer/actions/MoleculeActions.js +56 -23
- package/lib-cjs/component/reducer/actions/PeaksActions.js +23 -15
- package/lib-cjs/component/reducer/actions/PreferencesActions.js +24 -9
- package/lib-cjs/component/reducer/actions/RangesActions.js +81 -64
- package/lib-cjs/component/reducer/actions/SpectrumsActions.js +77 -67
- package/lib-cjs/component/reducer/actions/ToolsActions.js +54 -31
- package/lib-cjs/component/reducer/actions/ZonesActions.js +73 -52
- package/lib-cjs/component/reducer/core/Constants.js +1 -1
- package/lib-cjs/component/reducer/helper/Zoom1DManager.js +2 -2
- package/lib-cjs/component/reducer/helper/ZoomHistoryManager.js +2 -2
- package/lib-cjs/component/reducer/preferences/panelsPreferencesDefaultValues.js +1 -0
- package/lib-cjs/component/reducer/types/ActionType.js +2 -0
- package/lib-cjs/component/toolbar/BasicToolBar.js +6 -9
- package/lib-cjs/component/toolbar/FunctionToolBar.js +4 -9
- package/lib-cjs/component/toolbar/ToolBar.js +1 -1
- package/lib-cjs/component/utility/GroupByInfoKey.js +1 -1
- package/lib-cjs/component/utility/getSpectraObjectPaths.js +1 -1
- package/lib-cjs/component/workspaces/exercise.js +31 -0
- package/lib-cjs/component/workspaces/workspaceDefaultProperties.js +1 -0
- package/lib-cjs/data/PredictionManager.js +3 -3
- package/lib-cjs/data/SpectraManager.js +1 -1
- package/lib-cjs/data/data1d/Spectrum1D/getSpectrumErrorValue.js +1 -1
- package/lib-cjs/data/data1d/Spectrum1D/initiateDatum1D.js +1 -1
- package/lib-cjs/data/data1d/Spectrum1D/ranges/changeRangeRelativeValue.js +5 -4
- package/lib-cjs/data/data1d/multipleSpectraAnalysis.js +2 -2
- package/lib-cjs/data/data2d/Spectrum2D/contours.js +0 -1
- package/lib-cjs/data/data2d/Spectrum2D/initiateDatum2D.js +1 -1
- package/lib-cjs/data/data2d/Spectrum2D/zones/changeZoneSignal.js +6 -8
- package/lib-cjs/data/matrixGeneration.js +4 -2
- package/lib-cjs/data/molecules/MoleculeManager.js +1 -1
- package/lib-cjs/data/utilities/ZoneUtilities.js +0 -1
- package/lib-cjs/data/utilities/generateColor.js +1 -1
- package/lib-cjs/data/utilities/isNumber.js +7 -0
- package/lib-cjs/versionInfo.js +1 -1
- package/package.json +35 -34
- package/lib/component/panels/RangesPanel/TableColumns/RemoveAssignmentsButton.d.ts +0 -3
- package/lib/component/reducer/actions/HistoryActions.d.ts +0 -4
- package/lib/component/reducer/actions/HistoryActions.js +0 -40
- package/lib/component/reducer/types/HistoryTypes.d.ts +0 -4
- package/lib/component/reducer/types/HistoryTypes.js +0 -4
- package/lib/component/reducer/types/Types.d.ts +0 -132
- package/lib/component/reducer/types/Types.js +0 -126
- package/lib/component/toolbar/HistoryToolBar.d.ts +0 -8
- package/lib/component/toolbar/HistoryToolBar.js +0 -30
- package/lib/data/utilities/isMolFileEmpty.d.ts +0 -1
- package/lib/data/utilities/isMolFileEmpty.js +0 -6
- package/lib-cjs/component/reducer/actions/HistoryActions.js +0 -45
- package/lib-cjs/component/reducer/types/HistoryTypes.js +0 -7
- package/lib-cjs/component/reducer/types/Types.js +0 -131
- package/lib-cjs/component/toolbar/HistoryToolBar.js +0 -35
- package/lib-cjs/data/utilities/isMolFileEmpty.js +0 -10
|
@@ -9,8 +9,6 @@ import Label from '../elements/Label';
|
|
|
9
9
|
import Select from '../elements/Select';
|
|
10
10
|
import { useFilter } from '../hooks/useFilter';
|
|
11
11
|
import useSpectrum from '../hooks/useSpectrum';
|
|
12
|
-
import { APPLY_ZERO_FILLING_FILTER, CALCULATE_ZERO_FILLING_FILTER, RESET_SELECTED_TOOL, } from '../reducer/types/Types';
|
|
13
|
-
import { options } from '../toolbar/ToolTypes';
|
|
14
12
|
import { headerLabelStyle } from './Header';
|
|
15
13
|
import { HeaderContainer } from './HeaderContainer';
|
|
16
14
|
const Sizes = generateNumbersPowerOfX(8, 21);
|
|
@@ -31,7 +29,7 @@ function ZeroFillingOptionsInnerPanel(props) {
|
|
|
31
29
|
const [size, setSize] = useState(props.size);
|
|
32
30
|
function handleApplyFilter() {
|
|
33
31
|
dispatch({
|
|
34
|
-
type: APPLY_ZERO_FILLING_FILTER,
|
|
32
|
+
type: 'APPLY_ZERO_FILLING_FILTER',
|
|
35
33
|
payload: {
|
|
36
34
|
nbPoints: size,
|
|
37
35
|
},
|
|
@@ -39,12 +37,12 @@ function ZeroFillingOptionsInnerPanel(props) {
|
|
|
39
37
|
}
|
|
40
38
|
function handleCancelFilter() {
|
|
41
39
|
dispatch({
|
|
42
|
-
type: RESET_SELECTED_TOOL,
|
|
40
|
+
type: 'RESET_SELECTED_TOOL',
|
|
43
41
|
});
|
|
44
42
|
}
|
|
45
43
|
function dispatchLiveChanges(nbPoints) {
|
|
46
44
|
dispatch({
|
|
47
|
-
type: CALCULATE_ZERO_FILLING_FILTER,
|
|
45
|
+
type: 'CALCULATE_ZERO_FILLING_FILTER',
|
|
48
46
|
payload: {
|
|
49
47
|
nbPoints,
|
|
50
48
|
},
|
|
@@ -63,12 +61,6 @@ function ZeroFillingOptionsInnerPanel(props) {
|
|
|
63
61
|
function checkChangeHandler(event) {
|
|
64
62
|
const checked = event.target.checked;
|
|
65
63
|
setLivePreview(checked);
|
|
66
|
-
if (!checked) {
|
|
67
|
-
//disable filter Live preview
|
|
68
|
-
dispatch({
|
|
69
|
-
payload: { selectedTool: options.zeroFilling.id },
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
64
|
}
|
|
73
65
|
return (_jsxs(HeaderContainer, { children: [_jsx(Label, { title: "Size: ", style: headerLabelStyle, children: _jsx(Select, { items: Sizes, style: { marginLeft: 10, marginRight: 10 }, value: size, onChange: handleChangeSizeHandler }) }), _jsx(Label, { title: "Live preview ", htmlFor: "livePreview", style: headerLabelStyle, children: _jsx(CheckBox, { name: "livePreview", defaultChecked: true, onChange: checkChangeHandler }) }), _jsx(ActionButtons, { onDone: handleApplyFilter, onCancel: handleCancelFilter })] }));
|
|
74
66
|
}
|
|
@@ -7,26 +7,25 @@ import Button from '../elements/Button';
|
|
|
7
7
|
import Label from '../elements/Label';
|
|
8
8
|
import FormikNumberInput from '../elements/formik/FormikNumberInput';
|
|
9
9
|
import FormikOnChange from '../elements/formik/FormikOnChange';
|
|
10
|
-
import { AUTO_ZONES_DETECTION, CHANGE_ZONES_NOISE_FACTOR, } from '../reducer/types/Types';
|
|
11
10
|
import { headerLabelStyle } from './Header';
|
|
12
11
|
import { HeaderContainer } from './HeaderContainer';
|
|
13
12
|
const validationSchema = Yup.object().shape({
|
|
14
|
-
|
|
13
|
+
zonesNoiseFactor: Yup.number().min(0).required(),
|
|
15
14
|
});
|
|
16
15
|
const initialValues = {
|
|
17
|
-
|
|
16
|
+
zonesNoiseFactor: 1,
|
|
18
17
|
};
|
|
19
18
|
function Zones2DOptionPanel() {
|
|
20
19
|
const dispatch = useDispatch();
|
|
21
20
|
const handleZonesPicking = useCallback((values) => {
|
|
22
21
|
dispatch({
|
|
23
|
-
type: AUTO_ZONES_DETECTION,
|
|
22
|
+
type: 'AUTO_ZONES_DETECTION',
|
|
24
23
|
payload: values,
|
|
25
24
|
});
|
|
26
25
|
}, [dispatch]);
|
|
27
26
|
const handleChangeNoiseFactory = useCallback((values) => {
|
|
28
|
-
dispatch({ type: CHANGE_ZONES_NOISE_FACTOR, payload: values });
|
|
27
|
+
dispatch({ type: 'CHANGE_ZONES_NOISE_FACTOR', payload: values });
|
|
29
28
|
}, [dispatch]);
|
|
30
|
-
return (_jsx(HeaderContainer, { children: _jsx(Formik, { onSubmit: handleZonesPicking, initialValues: initialValues, validationSchema: validationSchema, children: ({ handleSubmit, isValid }) => (_jsxs(_Fragment, { children: [_jsx(Label, { title: "Noise factor :", htmlFor: "livePreview", style: headerLabelStyle, children: _jsx(FormikNumberInput, { name: "
|
|
29
|
+
return (_jsx(HeaderContainer, { children: _jsx(Formik, { onSubmit: handleZonesPicking, initialValues: initialValues, validationSchema: validationSchema, children: ({ handleSubmit, isValid }) => (_jsxs(_Fragment, { children: [_jsx(Label, { title: "Noise factor :", htmlFor: "livePreview", style: headerLabelStyle, children: _jsx(FormikNumberInput, { name: "zonesNoiseFactor", style: { width: '50px' }, min: 0 }) }), _jsx(FormikOnChange, { enableValidation: true, onChange: handleChangeNoiseFactory }), _jsx(Button.Done, { onClick: () => handleSubmit(), style: { margin: '0 10px' }, disabled: !isValid, children: "Auto Zones Picking" })] })) }) }));
|
|
31
30
|
}
|
|
32
31
|
export default Zones2DOptionPanel;
|
|
@@ -33,6 +33,7 @@ export default function useExport() {
|
|
|
33
33
|
const fileName = state.data[0]?.info?.name;
|
|
34
34
|
const exportedData = toJSON(state, preferencesState, {
|
|
35
35
|
exportTarget: 'nmrium',
|
|
36
|
+
view: true,
|
|
36
37
|
});
|
|
37
38
|
await exportAsJSON(exportedData, fileName, spaceIndent, isCompressed);
|
|
38
39
|
hideLoading();
|
|
@@ -5,8 +5,6 @@ import { useToggleAccordion } from 'react-science/ui';
|
|
|
5
5
|
import { useDispatch } from '../context/DispatchContext';
|
|
6
6
|
import { useAlert } from '../elements/popup/Alert';
|
|
7
7
|
import { TOOLS_PANELS_ACCORDION } from '../panels/Panels';
|
|
8
|
-
import { ZoomType } from '../reducer/helper/Zoom1DManager';
|
|
9
|
-
import { CHANGE_SPECTRUM_DISPLAY_VIEW_MODE, FULL_ZOOM_OUT, SET_SELECTED_TOOL, SET_SPECTRUMS_VERTICAL_ALIGN, TOGGLE_REAL_IMAGINARY_VISIBILITY, } from '../reducer/types/Types';
|
|
10
8
|
import { options } from '../toolbar/ToolTypes';
|
|
11
9
|
export default function useToolsFunctions() {
|
|
12
10
|
const dispatch = useDispatch();
|
|
@@ -28,15 +26,15 @@ export default function useToolsFunctions() {
|
|
|
28
26
|
openPanel(TOOLS_PANELS_ACCORDION[selectedTool]);
|
|
29
27
|
}
|
|
30
28
|
dispatch({
|
|
31
|
-
type: SET_SELECTED_TOOL,
|
|
29
|
+
type: 'SET_SELECTED_TOOL',
|
|
32
30
|
payload: { selectedTool: selectedTool || options.zoom.id },
|
|
33
31
|
});
|
|
34
32
|
}, [alert, dispatch, openPanel]);
|
|
35
33
|
const handleFullZoomOut = useCallback(() => {
|
|
36
34
|
if (debounceClickEventsRef.current.clicks.length === 0) {
|
|
37
35
|
dispatch({
|
|
38
|
-
type: FULL_ZOOM_OUT,
|
|
39
|
-
zoomType:
|
|
36
|
+
type: 'FULL_ZOOM_OUT',
|
|
37
|
+
payload: { zoomType: 'HORIZONTAL' },
|
|
40
38
|
});
|
|
41
39
|
}
|
|
42
40
|
const callback = lodashDebounce(() => {
|
|
@@ -48,25 +46,25 @@ export default function useToolsFunctions() {
|
|
|
48
46
|
lodashMap(debounceClickEventsRef.current.clicks, (debounce) => debounce.cancel());
|
|
49
47
|
debounceClickEventsRef.current.clicks = [];
|
|
50
48
|
dispatch({
|
|
51
|
-
type: FULL_ZOOM_OUT,
|
|
49
|
+
type: 'FULL_ZOOM_OUT',
|
|
50
|
+
payload: {},
|
|
52
51
|
});
|
|
53
52
|
}
|
|
54
53
|
}, [dispatch, debounceClickEventsRef]);
|
|
55
54
|
const changeDisplayViewModeHandler = useCallback(() => {
|
|
56
55
|
dispatch({
|
|
57
|
-
type: CHANGE_SPECTRUM_DISPLAY_VIEW_MODE,
|
|
56
|
+
type: 'CHANGE_SPECTRUM_DISPLAY_VIEW_MODE',
|
|
58
57
|
});
|
|
59
58
|
}, [dispatch]);
|
|
60
59
|
const changeSpectrumViewHandler = useCallback(() => {
|
|
61
60
|
dispatch({
|
|
62
|
-
type: TOGGLE_REAL_IMAGINARY_VISIBILITY,
|
|
63
|
-
isRealSpectrumVisible: !isRealSpectrumShown,
|
|
61
|
+
type: 'TOGGLE_REAL_IMAGINARY_VISIBILITY',
|
|
64
62
|
});
|
|
65
63
|
setIsRealSpectrumShown(!isRealSpectrumShown);
|
|
66
64
|
}, [dispatch, isRealSpectrumShown]);
|
|
67
65
|
const alignSpectrumsVerticallyHandler = useCallback(() => {
|
|
68
66
|
dispatch({
|
|
69
|
-
type: SET_SPECTRUMS_VERTICAL_ALIGN,
|
|
67
|
+
type: 'SET_SPECTRUMS_VERTICAL_ALIGN',
|
|
70
68
|
});
|
|
71
69
|
}, [dispatch]);
|
|
72
70
|
return {
|
|
@@ -15,7 +15,6 @@ import { usePreferences } from '../context/PreferencesContext';
|
|
|
15
15
|
import { useAlert } from '../elements/popup/Alert';
|
|
16
16
|
import { useCheckToolsVisibility } from '../hooks/useCheckToolsVisibility';
|
|
17
17
|
import { useMetaInformationImportationModal } from '../modal/metaImportation/index';
|
|
18
|
-
import { SET_LOADING_FLAG, LOAD_DROP_FILES } from '../reducer/types/Types';
|
|
19
18
|
const style = css `
|
|
20
19
|
height: 100%;
|
|
21
20
|
background-color: #b5b5b599;
|
|
@@ -83,9 +82,9 @@ function DropZone(props) {
|
|
|
83
82
|
});
|
|
84
83
|
}
|
|
85
84
|
dispatch({
|
|
86
|
-
type: LOAD_DROP_FILES,
|
|
85
|
+
type: 'LOAD_DROP_FILES',
|
|
87
86
|
payload: {
|
|
88
|
-
|
|
87
|
+
nmriumState,
|
|
89
88
|
containsNmrium,
|
|
90
89
|
onLoadProcessing: current.onLoadProcessing,
|
|
91
90
|
parseMetaFileResult,
|
|
@@ -99,11 +98,11 @@ function DropZone(props) {
|
|
|
99
98
|
reportError(error);
|
|
100
99
|
}
|
|
101
100
|
finally {
|
|
102
|
-
dispatch({ type: SET_LOADING_FLAG, isLoading: false });
|
|
101
|
+
dispatch({ type: 'SET_LOADING_FLAG', payload: { isLoading: false } });
|
|
103
102
|
}
|
|
104
103
|
}
|
|
105
104
|
function onDrop(droppedFiles) {
|
|
106
|
-
dispatch({ type: SET_LOADING_FLAG, isLoading: true });
|
|
105
|
+
dispatch({ type: 'SET_LOADING_FLAG', payload: { isLoading: true } });
|
|
107
106
|
void loadFilesHandler(droppedFiles);
|
|
108
107
|
}
|
|
109
108
|
const isImportEnabled = isToolEnabled('import');
|
|
@@ -31,7 +31,7 @@ function NoData({ isEmpty = true, emptyText = 'Drag and drop here a JCAMP-DX, Br
|
|
|
31
31
|
if (!isEmpty) {
|
|
32
32
|
return null;
|
|
33
33
|
}
|
|
34
|
-
return (_jsx("div", { style: { ...styles.container, ...style }, ...(canOpenLoader && { onClick: openLoader }), children: _jsx("
|
|
34
|
+
return (_jsx("div", { style: { ...styles.container, ...style }, ...(canOpenLoader && { onClick: openLoader }), children: _jsx("div", { style: styles.text, children: isToolEnabled('import')
|
|
35
35
|
? emptyText
|
|
36
36
|
: 'Importation feature has been disabled' }) }));
|
|
37
37
|
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "@emotion/react/jsx-runtime";
|
|
2
|
+
/** @jsxImportSource @emotion/react */
|
|
3
|
+
import { css } from '@emotion/react';
|
|
4
|
+
import { FaInfo } from 'react-icons/fa';
|
|
5
|
+
import { Modal, useOnOff } from 'react-science/ui';
|
|
6
|
+
import Button from '../elements/Button';
|
|
7
|
+
const styles = css `
|
|
8
|
+
width: 600px;
|
|
9
|
+
|
|
10
|
+
.content {
|
|
11
|
+
padding: 2em;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
ul {
|
|
15
|
+
list-style-type: disc;
|
|
16
|
+
margin-left: 25px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
p,
|
|
20
|
+
li {
|
|
21
|
+
user-select: text;
|
|
22
|
+
font-size: 1.1em;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
a {
|
|
26
|
+
color: #00bcd4;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
a:hover,
|
|
30
|
+
a:focus {
|
|
31
|
+
text-decoration: underline;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.header span {
|
|
35
|
+
color: #464646;
|
|
36
|
+
font-size: 15px;
|
|
37
|
+
flex: 1;
|
|
38
|
+
user-select: none;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
p {
|
|
42
|
+
padding: 0.8em 0;
|
|
43
|
+
}
|
|
44
|
+
`;
|
|
45
|
+
function AboutPredictionModal() {
|
|
46
|
+
const [isOpenDialog, openDialog, closeDialog] = useOnOff(false);
|
|
47
|
+
return (_jsxs(_Fragment, { children: [_jsx(Button.BarButton, { onClick: openDialog, tooltipOrientation: "horizontal", toolTip: "About Prediction", children: _jsx(FaInfo, {}) }), _jsx(Modal, { hasCloseButton: true, isOpen: isOpenDialog, onRequestClose: closeDialog, children: _jsxs("div", { css: styles, children: [_jsx(Modal.Header, { children: _jsx("div", { className: "header", children: _jsx("span", { children: "About Prediction" }) }) }), _jsx(Modal.Body, { children: _jsxs("div", { className: "content", children: [_jsx("p", { children: "If you are using our tools please cite us:" }), _jsxs("ul", { children: [_jsxs("li", { children: ["Banfi, D.; Patiny, L.", ' ', _jsx("a", { href: "http://dx.doi.org/10.2533/chimia.2008.280", target: "_blank", rel: "noreferrer", children: "www.nmrdb.org: Resurrecting and processing NMR spectra on-line" }), ' ', "Chimia, 2008, 62(4), 280-281."] }), _jsxs("li", { children: ["Andr\u00E9s M. Castillo, Luc Patiny and Julien Wist.", ' ', _jsx("a", { href: "http://dx.doi.org/10.1016/j.jmr.2010.12.008", target: "_blank", rel: "noreferrer", children: "Fast and Accurate Algorithm for the Simulation of NMR spectra of Large Spin Systems" }), ". Journal of Magnetic Resonance 2011."] })] }), _jsx("p", { children: "1H NMR prediction was possible thanks to the tool of the FCT-Universidade NOVA de Lisboa developed by Yuri Binev and Joao Aires-de-Sousa:" }), _jsxs("ul", { children: [_jsxs("li", { children: ["Y. Binev, M.M. Marques, J. Aires-de-Sousa,", ' ', _jsx("a", { href: "http://dx.doi.org/10.1021/ci700172n", target: "_blank", rel: "noreferrer", children: "Prediction of 1H NMR coupling constants with associative neural networks trained for chemical shifts" }), ' ', "J. Chem. Inf. Model. 2007, 47/(6), 2089-2097."] }), _jsxs("li", { children: ["Aires-de-Sousa, M. Hemmer, J. Gasteiger,", ' ', _jsx("a", { href: "http://dx.doi.org/10.1021/ac010737m", target: "_blank", rel: "noreferrer", children: "\u201C Prediction of 1H NMR Chemical Shifts Using Neural Networks\u201D" }), ", Analytical Chemistry, 2002, 74(1), 80-90."] })] }), _jsx("p", { children: "13 NMR prediction was possible thanks to NMRshiftDB:" }), _jsx("ul", { children: _jsxs("li", { children: ["Steinbeck, Christoph, Stefan Krause, and Stefan Kuhn.", ' ', _jsx("a", { href: "http://dx.doi.org/10.1021/ci0341363", target: "_blank", rel: "noreferrer", children: "NMRShiftDB Constructing a Free Chemical Information System with Open-Source Components." }), ' ', "Journal of chemical information and computer sciences, 2003, 43(6): 1733-1739."] }) })] }) })] }) })] }));
|
|
48
|
+
}
|
|
49
|
+
export default AboutPredictionModal;
|
|
@@ -9,7 +9,6 @@ import CloseButton from '../elements/CloseButton';
|
|
|
9
9
|
import Label from '../elements/Label';
|
|
10
10
|
import Select from '../elements/Select';
|
|
11
11
|
import FormikInput from '../elements/formik/FormikInput';
|
|
12
|
-
import { ALIGN_SPECTRA } from '../reducer/types/Types';
|
|
13
12
|
import Events from '../utility/Events';
|
|
14
13
|
import { ModalStyles } from './ModalStyle';
|
|
15
14
|
const baseList = [{ key: 1, value: 'manual', label: 'Manual' }];
|
|
@@ -29,7 +28,7 @@ function AlignSpectraModal({ onClose = () => null, nucleus, }) {
|
|
|
29
28
|
refForm.current.submitForm();
|
|
30
29
|
}, []);
|
|
31
30
|
const submitHandler = useCallback((values) => {
|
|
32
|
-
dispatch({ type: ALIGN_SPECTRA, payload: values });
|
|
31
|
+
dispatch({ type: 'ALIGN_SPECTRA', payload: values });
|
|
33
32
|
onClose();
|
|
34
33
|
}, [dispatch, onClose]);
|
|
35
34
|
useEffect(() => {
|
|
@@ -10,7 +10,6 @@ import CloseButton from '../elements/CloseButton';
|
|
|
10
10
|
import Label from '../elements/Label';
|
|
11
11
|
import Select from '../elements/Select';
|
|
12
12
|
import FormikInput from '../elements/formik/FormikInput';
|
|
13
|
-
import { CHANGE_PEAK_SHAPE } from '../reducer/types/Types';
|
|
14
13
|
import { formatNumber } from '../utility/formatNumber';
|
|
15
14
|
import { ModalStyles } from './ModalStyle';
|
|
16
15
|
const styles = css `
|
|
@@ -68,7 +67,7 @@ function EditPeakShapeModal({ onClose = () => null, peak, peaksPreferences, }) {
|
|
|
68
67
|
const [kind, setKind] = useState(peak.shape?.kind);
|
|
69
68
|
const changePeakShapeHandler = useCallback((values) => {
|
|
70
69
|
dispatch({
|
|
71
|
-
type: CHANGE_PEAK_SHAPE,
|
|
70
|
+
type: 'CHANGE_PEAK_SHAPE',
|
|
72
71
|
payload: {
|
|
73
72
|
id: peak.id,
|
|
74
73
|
shape: {
|
|
@@ -9,7 +9,6 @@ import Button from '../elements/Button';
|
|
|
9
9
|
import CloseButton from '../elements/CloseButton';
|
|
10
10
|
import FormikTextarea from '../elements/formik/FormikTextarea';
|
|
11
11
|
import { useAlert } from '../elements/popup/Alert';
|
|
12
|
-
import { GENERATE_SPECTRUM_FROM_PUBLICATION_STRING } from '../reducer/types/Types';
|
|
13
12
|
import { ModalStyles } from './ModalStyle';
|
|
14
13
|
const styles = css `
|
|
15
14
|
width: 600px;
|
|
@@ -42,7 +41,7 @@ function ImportPublicationStringModal({ onClose, }) {
|
|
|
42
41
|
const hideLoading = await alert.showLoading('Generate spectrum from publication string in progress');
|
|
43
42
|
setTimeout(() => {
|
|
44
43
|
dispatch({
|
|
45
|
-
type: GENERATE_SPECTRUM_FROM_PUBLICATION_STRING,
|
|
44
|
+
type: 'GENERATE_SPECTRUM_FROM_PUBLICATION_STRING',
|
|
46
45
|
payload: values,
|
|
47
46
|
});
|
|
48
47
|
hideLoading();
|
|
@@ -7,7 +7,6 @@ import { useDispatch } from '../context/DispatchContext';
|
|
|
7
7
|
import Button from '../elements/Button';
|
|
8
8
|
import CloseButton from '../elements/CloseButton';
|
|
9
9
|
import { useAlert } from '../elements/popup/Alert/Context';
|
|
10
|
-
import { LOAD_DROP_FILES } from '../reducer/types/Types';
|
|
11
10
|
import { extractFileMetaFromPath } from '../utility/FileUtility';
|
|
12
11
|
const styles = css `
|
|
13
12
|
display: flex;
|
|
@@ -75,8 +74,8 @@ export default function LoadJCAMPModal({ onClose, startLoading, }) {
|
|
|
75
74
|
entries: [{ relativePath: pathname, baseURL: origin }],
|
|
76
75
|
}).then((nmriumState) => {
|
|
77
76
|
dispatch({
|
|
78
|
-
type: LOAD_DROP_FILES,
|
|
79
|
-
payload: {
|
|
77
|
+
type: 'LOAD_DROP_FILES',
|
|
78
|
+
payload: { nmriumState, resetSourceObject: false },
|
|
80
79
|
});
|
|
81
80
|
onClose?.();
|
|
82
81
|
});
|
|
@@ -2,12 +2,10 @@ import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
|
2
2
|
/** @jsxImportSource @emotion/react */
|
|
3
3
|
import { useState, useEffect, useCallback } from 'react';
|
|
4
4
|
import { StructureEditor } from 'react-ocl/full';
|
|
5
|
-
import { isMolFileEmpty } from '../../data/utilities/isMolFileEmpty';
|
|
6
5
|
import { useDispatch } from '../context/DispatchContext';
|
|
7
6
|
import ActionButtons from '../elements/ActionButtons';
|
|
8
7
|
import { useModal } from '../elements/popup/Modal';
|
|
9
8
|
import { positions } from '../elements/popup/options';
|
|
10
|
-
import { SET_MOLECULE, ADD_MOLECULE } from '../reducer/types/Types';
|
|
11
9
|
import { ModalStyles } from './ModalStyle';
|
|
12
10
|
function MoleculeStructureEditorModal(props) {
|
|
13
11
|
const { onClose = () => null, selectedMolecule } = props;
|
|
@@ -21,28 +19,35 @@ function MoleculeStructureEditorModal(props) {
|
|
|
21
19
|
setMolfile(null);
|
|
22
20
|
}
|
|
23
21
|
}, [selectedMolecule]);
|
|
24
|
-
const cb = useCallback((newMolfile) => {
|
|
25
|
-
|
|
22
|
+
const cb = useCallback((newMolfile, molecule) => {
|
|
23
|
+
if (molecule.getAllAtoms() === 0) {
|
|
24
|
+
setMolfile(null);
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
setMolfile(newMolfile);
|
|
28
|
+
}
|
|
26
29
|
}, [setMolfile]);
|
|
27
30
|
const handleClose = useCallback(() => {
|
|
28
31
|
onClose();
|
|
29
32
|
}, [onClose]);
|
|
30
33
|
const handleSave = useCallback(() => {
|
|
31
|
-
if (
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
34
|
+
if (molfile) {
|
|
35
|
+
if (selectedMolecule) {
|
|
36
|
+
const { id, label } = selectedMolecule;
|
|
37
|
+
dispatch({
|
|
38
|
+
type: 'SET_MOLECULE',
|
|
39
|
+
payload: {
|
|
40
|
+
molfile,
|
|
41
|
+
id,
|
|
42
|
+
label,
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
onClose('replace');
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
dispatch({ type: 'ADD_MOLECULE', payload: { molfile } });
|
|
49
|
+
onClose('new');
|
|
50
|
+
}
|
|
46
51
|
}
|
|
47
52
|
}, [dispatch, selectedMolecule, molfile, onClose]);
|
|
48
53
|
return (_jsxs("div", { css: ModalStyles, children: [_jsx(StructureEditor, { initialMolfile: selectedMolecule?.molfile, svgMenu: true, fragment: false, onChange: cb }), _jsx("div", { className: "footer-container", children: _jsx(ActionButtons, { style: { flexDirection: 'row-reverse', margin: 0 }, onDone: handleSave, doneLabel: "Save", onCancel: handleClose }) })] }));
|
|
@@ -18,7 +18,6 @@ import FormikErrorsSummary from '../elements/formik/FormikErrorsSummary';
|
|
|
18
18
|
import FormikInput from '../elements/formik/FormikInput';
|
|
19
19
|
import FormikSelect from '../elements/formik/FormikSelect';
|
|
20
20
|
import { useAlert } from '../elements/popup/Alert';
|
|
21
|
-
import { PREDICT_SPECTRA, SET_LOADING_FLAG } from '../reducer/types/Types';
|
|
22
21
|
import { useStateWithLocalStorage } from '../utility/LocalStorage';
|
|
23
22
|
import { ModalStyles } from './ModalStyle';
|
|
24
23
|
const styles = css `
|
|
@@ -133,26 +132,30 @@ function PredictSpectraModal({ onClose = () => null, molfile, }) {
|
|
|
133
132
|
}, [predictionPreferences, predictionIndex]);
|
|
134
133
|
const submitHandler = useCallback((values) => {
|
|
135
134
|
void (async () => {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
135
|
+
if (molfile) {
|
|
136
|
+
setPredictionPreferences({ ...values, isApproved });
|
|
137
|
+
dispatch({
|
|
138
|
+
type: 'SET_LOADING_FLAG',
|
|
139
|
+
payload: {
|
|
140
|
+
isLoading: true,
|
|
141
|
+
},
|
|
142
|
+
});
|
|
143
|
+
const predictedSpectra = Object.entries(values.spectra)
|
|
144
|
+
.map(([key, value]) => {
|
|
145
|
+
if (value) {
|
|
146
|
+
return key;
|
|
147
|
+
}
|
|
148
|
+
return undefined;
|
|
149
|
+
})
|
|
150
|
+
.join(',');
|
|
151
|
+
const hideLoading = await alert.showLoading(`Predict ${predictedSpectra} in progress`);
|
|
152
|
+
dispatch({
|
|
153
|
+
type: 'PREDICT_SPECTRA',
|
|
154
|
+
payload: { molfile, options: values },
|
|
155
|
+
});
|
|
156
|
+
hideLoading();
|
|
157
|
+
onClose();
|
|
158
|
+
}
|
|
156
159
|
})();
|
|
157
160
|
}, [alert, dispatch, isApproved, molfile, onClose, setPredictionPreferences]);
|
|
158
161
|
const approveCheckHandler = useCallback((e) => {
|
|
@@ -54,7 +54,7 @@ export default function SelectMolecule(props) {
|
|
|
54
54
|
}, [currentIndex, element, molecules]);
|
|
55
55
|
const setValue = useCallback((index) => {
|
|
56
56
|
setCurrentIndex(index);
|
|
57
|
-
setFieldValue(props.name, molecules[index]);
|
|
57
|
+
void setFieldValue(props.name, molecules[index]);
|
|
58
58
|
}, [molecules, props.name, setFieldValue]);
|
|
59
59
|
useEffect(() => {
|
|
60
60
|
if (molecules && molecules.length > 0) {
|
|
@@ -15,7 +15,6 @@ import FormikOnChange from '../../elements/formik/FormikOnChange';
|
|
|
15
15
|
import { usePanelPreferences } from '../../hooks/usePanelPreferences';
|
|
16
16
|
import useSpectrum from '../../hooks/useSpectrum';
|
|
17
17
|
import { hasCouplingConstant } from '../../panels/extra/utilities/MultiplicityUtilities';
|
|
18
|
-
import { UPDATE_RANGE } from '../../reducer/types/Types';
|
|
19
18
|
import { formatNumber } from '../../utility/formatNumber';
|
|
20
19
|
import SignalsForm from './forms/components/SignalsForm';
|
|
21
20
|
import editRangeFormValidation from './forms/validation/EditRangeValidation';
|
|
@@ -103,12 +102,12 @@ function EditRangeModal({ onSaveEditRangeModal = () => null, onCloseEditRangeMod
|
|
|
103
102
|
multiplicity,
|
|
104
103
|
coupling: '',
|
|
105
104
|
};
|
|
106
|
-
if (hasCouplingConstant(multiplicity) && signal?.js) {
|
|
105
|
+
if (hasCouplingConstant(multiplicity) && signal?.js.length > 0) {
|
|
107
106
|
js = { ...signal.js[counterJ] };
|
|
108
107
|
js.coupling = Number(formatNumber(js.coupling, rangesPreferences.coupling.format));
|
|
109
108
|
counterJ++;
|
|
110
109
|
}
|
|
111
|
-
js.multiplicity = translateMultiplet(js.multiplicity ||
|
|
110
|
+
js.multiplicity = translateMultiplet(js.multiplicity || multiplicity);
|
|
112
111
|
couplings.push(js);
|
|
113
112
|
}
|
|
114
113
|
}
|
|
@@ -127,7 +126,7 @@ function EditRangeModal({ onSaveEditRangeModal = () => null, onCloseEditRangeMod
|
|
|
127
126
|
return value;
|
|
128
127
|
})) {
|
|
129
128
|
dispatch({
|
|
130
|
-
type: UPDATE_RANGE,
|
|
129
|
+
type: 'UPDATE_RANGE',
|
|
131
130
|
payload: { range: { ...range, signals } },
|
|
132
131
|
});
|
|
133
132
|
}
|
|
@@ -44,8 +44,8 @@ function AddSignalFormTab({ onFocus, onBlur, range, preferences }, ref) {
|
|
|
44
44
|
js: [{ multiplicity: translateMultiplet('m'), coupling: '' }],
|
|
45
45
|
};
|
|
46
46
|
const _signals = values.signals.slice().concat(newSignal);
|
|
47
|
-
setFieldValue('signals', _signals);
|
|
48
|
-
setFieldValue('activeTab', String(_signals.length - 1));
|
|
47
|
+
void setFieldValue('signals', _signals);
|
|
48
|
+
void setFieldValue('activeTab', String(_signals.length - 1));
|
|
49
49
|
}, [setFieldValue, values.signals]);
|
|
50
50
|
const validation = useMemo(() => {
|
|
51
51
|
return Yup.object().shape({
|
|
@@ -39,7 +39,7 @@ function CouplingsTable({ push, remove, onFocus, onBlur, }) {
|
|
|
39
39
|
const { values, setFieldValue } = useFormikContext();
|
|
40
40
|
const multiplicityChangeHandler = useCallback((value, name) => {
|
|
41
41
|
if (!hasCouplingConstant(value)) {
|
|
42
|
-
setFieldValue(name, '');
|
|
42
|
+
void setFieldValue(name, '');
|
|
43
43
|
}
|
|
44
44
|
}, [setFieldValue]);
|
|
45
45
|
const couplingsList = lodashGet(values, `signals[${values.activeTab}].js`, []);
|
|
@@ -13,7 +13,6 @@ import ReactTable from '../../elements/ReactTable/ReactTable';
|
|
|
13
13
|
import FormikInput from '../../elements/formik/FormikInput';
|
|
14
14
|
import FormikSelect from '../../elements/formik/FormikSelect';
|
|
15
15
|
import { useAlert } from '../../elements/popup/Alert/Context';
|
|
16
|
-
import { IMPORT_SPECTRA_META_INFO } from '../../reducer/types/Types';
|
|
17
16
|
import { convertPathArrayToString } from '../../utility/convertPathArrayToString';
|
|
18
17
|
import { getSpectraObjectPaths } from '../../utility/getSpectraObjectPaths';
|
|
19
18
|
import { ModalStyles } from '../ModalStyle';
|
|
@@ -132,7 +131,7 @@ function MetaImportationModal({ onClose, file }) {
|
|
|
132
131
|
}
|
|
133
132
|
catch (error) {
|
|
134
133
|
if (error instanceof TargetPathError) {
|
|
135
|
-
formRef.current?.setFieldValue('target', null);
|
|
134
|
+
void formRef.current?.setFieldValue('target', null);
|
|
136
135
|
formRef.current?.setFieldError('target', '');
|
|
137
136
|
}
|
|
138
137
|
alert.error(error.message);
|
|
@@ -161,7 +160,7 @@ function MetaImportationModal({ onClose, file }) {
|
|
|
161
160
|
}
|
|
162
161
|
function handleImport() {
|
|
163
162
|
dispatch({
|
|
164
|
-
type: IMPORT_SPECTRA_META_INFO,
|
|
163
|
+
type: 'IMPORT_SPECTRA_META_INFO',
|
|
165
164
|
payload: { spectraMeta: matches },
|
|
166
165
|
});
|
|
167
166
|
onClose?.();
|
|
@@ -36,7 +36,7 @@ function DatabasesTabContent({ currentWorkspace, originalWorkspaces, }) {
|
|
|
36
36
|
function deleteHandler(index) {
|
|
37
37
|
const _database = databases.data.slice();
|
|
38
38
|
_database.splice(index, 1);
|
|
39
|
-
setFieldValue('databases.data', _database);
|
|
39
|
+
void setFieldValue('databases.data', _database);
|
|
40
40
|
}
|
|
41
41
|
function addHandler() {
|
|
42
42
|
const newDatabase = {
|
|
@@ -45,17 +45,17 @@ function DatabasesTabContent({ currentWorkspace, originalWorkspaces, }) {
|
|
|
45
45
|
url: '',
|
|
46
46
|
enabled: true,
|
|
47
47
|
};
|
|
48
|
-
setFieldValue('databases.data', [...databases.data, newDatabase]);
|
|
48
|
+
void setFieldValue('databases.data', [...databases.data, newDatabase]);
|
|
49
49
|
}
|
|
50
50
|
function resetHandler() {
|
|
51
51
|
const workSpaceDisplayPreferences = getPreferencesByWorkspace(currentWorkspace, originalWorkspaces);
|
|
52
52
|
const database = workSpaceDisplayPreferences.databases.data;
|
|
53
|
-
setFieldValue('databases.data', database);
|
|
53
|
+
void setFieldValue('databases.data', database);
|
|
54
54
|
}
|
|
55
55
|
return (_jsx("fieldset", { onClick: (e) => {
|
|
56
56
|
if (e.target.checked) {
|
|
57
57
|
e.target.checked = false;
|
|
58
|
-
setFieldValue('databases.defaultDatabase', '');
|
|
58
|
+
void setFieldValue('databases.defaultDatabase', '');
|
|
59
59
|
}
|
|
60
60
|
}, children: _jsx(GroupPane, { text: "Databases", renderHeader: (text) => {
|
|
61
61
|
return (_jsx(DataBaseHeader, { text: text, onReset: resetHandler, onAdd: addHandler }));
|
|
@@ -59,7 +59,7 @@ function FormattingTabContent() {
|
|
|
59
59
|
_nuclei[nucleus] = nuclei[nucleus];
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
setFieldValue('formatting.nuclei', _nuclei);
|
|
62
|
+
void setFieldValue('formatting.nuclei', _nuclei);
|
|
63
63
|
}
|
|
64
64
|
function addHandler() {
|
|
65
65
|
const newFormat = {
|
|
@@ -69,7 +69,7 @@ function FormattingTabContent() {
|
|
|
69
69
|
};
|
|
70
70
|
const key = v4();
|
|
71
71
|
const newNuclei = { ...nuclei, [key]: newFormat };
|
|
72
|
-
setFieldValue('formatting.nuclei', newNuclei);
|
|
72
|
+
void setFieldValue('formatting.nuclei', newNuclei);
|
|
73
73
|
}
|
|
74
74
|
const nucleiList = Object.keys(nuclei);
|
|
75
75
|
return (_jsx(GroupPane, { text: "Number formatting for crosshair and info line", children: _jsx("div", { css: styles, children: _jsxs("table", { children: [_jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { className: "counter-col", children: "#" }), _jsx("th", { className: "nucleus-label-col", children: "Nucleus " }), _jsx("th", { className: "nucleus-format-input-col", children: "\u03B4 (ppm)" }), _jsx("th", { className: "nucleus-format-input-col", children: "Coupling (Hz)" }), _jsx("th", { className: "nucleus-format-input-col" })] }) }), _jsx("tbody", { children: nucleiList?.map((key, index) => {
|
|
@@ -38,11 +38,11 @@ function InfoBlockTabContent() {
|
|
|
38
38
|
else {
|
|
39
39
|
columns.push(emptyField);
|
|
40
40
|
}
|
|
41
|
-
setFieldValue('infoBlock.fields', columns);
|
|
41
|
+
void setFieldValue('infoBlock.fields', columns);
|
|
42
42
|
}, [setFieldValue]);
|
|
43
43
|
const deleteHandler = useCallback((data, index) => {
|
|
44
44
|
const _fields = data.filter((_, columnIndex) => columnIndex !== index);
|
|
45
|
-
setFieldValue('infoBlock.fields', _fields);
|
|
45
|
+
void setFieldValue('infoBlock.fields', _fields);
|
|
46
46
|
}, [setFieldValue]);
|
|
47
47
|
const COLUMNS = useMemo(() => [
|
|
48
48
|
{
|
|
@@ -3,14 +3,13 @@ import { SvgNmrAssignment } from 'cheminfo-font';
|
|
|
3
3
|
import { useCallback, useMemo, memo } from 'react';
|
|
4
4
|
import { useDispatch } from '../../context/DispatchContext';
|
|
5
5
|
import ReactTable from '../../elements/ReactTable/ReactTable';
|
|
6
|
-
import { SET_AUTOMATIC_ASSIGNMENTS } from '../../reducer/types/Types';
|
|
7
6
|
function AutomaticAssignmentTable({ data }) {
|
|
8
7
|
const dispatch = useDispatch();
|
|
9
8
|
const assignHandler = useCallback((e, row) => {
|
|
10
9
|
e.preventDefault();
|
|
11
10
|
e.stopPropagation();
|
|
12
11
|
dispatch({
|
|
13
|
-
type: SET_AUTOMATIC_ASSIGNMENTS,
|
|
12
|
+
type: 'SET_AUTOMATIC_ASSIGNMENTS',
|
|
14
13
|
payload: { assignments: row.original.assignment },
|
|
15
14
|
});
|
|
16
15
|
}, [dispatch]);
|