nmrium 1.6.1 → 1.8.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/FloatingRanges.js +4 -4
- package/lib/component/1d/FloatingRanges.js.map +1 -1
- package/lib/component/1d/database/DatabaseSpectrum.js +1 -1
- package/lib/component/1d/database/DatabaseSpectrum.js.map +1 -1
- package/lib/component/1d/multiAnalysis/MultiAnalysisRanges.js +1 -1
- package/lib/component/1d/multiAnalysis/MultiAnalysisRanges.js.map +1 -1
- package/lib/component/1d/multiplicityTree/MultiplicityTree.d.ts.map +1 -1
- package/lib/component/1d/multiplicityTree/MultiplicityTree.js +4 -2
- package/lib/component/1d/multiplicityTree/MultiplicityTree.js.map +1 -1
- package/lib/component/1d/peaks/PeakAnnotations.d.ts.map +1 -1
- package/lib/component/1d/peaks/PeakAnnotations.js +2 -2
- package/lib/component/1d/peaks/PeakAnnotations.js.map +1 -1
- package/lib/component/1d/peaks/PeakAnnotationsSpreadMode.d.ts.map +1 -1
- package/lib/component/1d/peaks/PeakAnnotationsSpreadMode.js +4 -4
- package/lib/component/1d/peaks/PeakAnnotationsSpreadMode.js.map +1 -1
- package/lib/component/1d/peaks/Peaks.d.ts +4 -1
- package/lib/component/1d/peaks/Peaks.d.ts.map +1 -1
- package/lib/component/1d/peaks/Peaks.js +5 -2
- package/lib/component/1d/peaks/Peaks.js.map +1 -1
- package/lib/component/1d/ranges/Atoms.d.ts.map +1 -1
- package/lib/component/1d/ranges/Atoms.js +24 -9
- package/lib/component/1d/ranges/Atoms.js.map +1 -1
- package/lib/component/1d/ranges/Range.d.ts.map +1 -1
- package/lib/component/1d/ranges/Range.js +3 -3
- package/lib/component/1d/ranges/Range.js.map +1 -1
- package/lib/component/1d/ranges/RangesIntegrals.d.ts.map +1 -1
- package/lib/component/1d/ranges/RangesIntegrals.js +5 -3
- package/lib/component/1d/ranges/RangesIntegrals.js.map +1 -1
- package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.d.ts +2 -1
- package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.d.ts.map +1 -1
- package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.js +32 -41
- package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.js.map +1 -1
- package/lib/component/1d-2d/components/FloatMoleculeStructures/FloatMolecules.d.ts.map +1 -1
- package/lib/component/1d-2d/components/FloatMoleculeStructures/FloatMolecules.js.map +1 -1
- package/lib/component/2d/FooterBanner.js +2 -2
- package/lib/component/2d/FooterBanner.js.map +1 -1
- package/lib/component/2d/YAxis.d.ts +0 -1
- package/lib/component/2d/YAxis.d.ts.map +1 -1
- package/lib/component/2d/YAxis.js +11 -4
- package/lib/component/2d/YAxis.js.map +1 -1
- package/lib/component/2d/useTracesSpectra.d.ts.map +1 -1
- package/lib/component/2d/useTracesSpectra.js +2 -0
- package/lib/component/2d/useTracesSpectra.js.map +1 -1
- package/lib/component/2d/utilities/extractSpectrumSignals.d.ts +2 -9
- package/lib/component/2d/utilities/extractSpectrumSignals.d.ts.map +1 -1
- package/lib/component/2d/utilities/extractSpectrumSignals.js +4 -5
- package/lib/component/2d/utilities/extractSpectrumSignals.js.map +1 -1
- package/lib/component/2d/zones/SignalsGuideLines.d.ts.map +1 -1
- package/lib/component/2d/zones/SignalsGuideLines.js +7 -10
- package/lib/component/2d/zones/SignalsGuideLines.js.map +1 -1
- package/lib/component/2d/zones/ZonesAssignmentsLabels.d.ts.map +1 -1
- package/lib/component/2d/zones/ZonesAssignmentsLabels.js.map +1 -1
- package/lib/component/context/DispatchContext.d.ts +2 -2
- package/lib/component/context/DispatchContext.d.ts.map +1 -1
- package/lib/component/context/LoggerContext.d.ts.map +1 -1
- package/lib/component/context/LoggerContext.js +8 -9
- package/lib/component/context/LoggerContext.js.map +1 -1
- package/lib/component/context/PreferencesContext.d.ts +7 -3
- package/lib/component/context/PreferencesContext.d.ts.map +1 -1
- package/lib/component/context/PreferencesContext.js +1 -2
- package/lib/component/context/PreferencesContext.js.map +1 -1
- package/lib/component/elements/D3Axis.d.ts.map +1 -1
- package/lib/component/elements/D3Axis.js +1 -1
- package/lib/component/elements/D3Axis.js.map +1 -1
- package/lib/component/elements/Sections.js +1 -1
- package/lib/component/elements/Sections.js.map +1 -1
- package/lib/component/hooks/useActiveSpectrumRangesViewState.d.ts.map +1 -1
- package/lib/component/hooks/useActiveSpectrumRangesViewState.js +2 -2
- package/lib/component/hooks/useActiveSpectrumRangesViewState.js.map +1 -1
- package/lib/component/hooks/useExport.d.ts.map +1 -1
- package/lib/component/hooks/useExport.js +24 -6
- package/lib/component/hooks/useExport.js.map +1 -1
- package/lib/component/loader/Spinner.js +1 -1
- package/lib/component/loader/Spinner.js.map +1 -1
- package/lib/component/loader/useLoadFiles.d.ts.map +1 -1
- package/lib/component/loader/useLoadFiles.js +60 -25
- package/lib/component/loader/useLoadFiles.js.map +1 -1
- package/lib/component/main/InnerNMRium.d.ts.map +1 -1
- package/lib/component/main/InnerNMRium.js +4 -2
- package/lib/component/main/InnerNMRium.js.map +1 -1
- package/lib/component/main/NMRiumStateProvider.d.ts.map +1 -1
- package/lib/component/main/NMRiumStateProvider.js +17 -6
- package/lib/component/main/NMRiumStateProvider.js.map +1 -1
- package/lib/component/modal/LoadJCAMPModal.d.ts.map +1 -1
- package/lib/component/modal/LoadJCAMPModal.js +7 -3
- package/lib/component/modal/LoadJCAMPModal.js.map +1 -1
- package/lib/component/modal/MoleculeStructureEditorModal.d.ts.map +1 -1
- package/lib/component/modal/MoleculeStructureEditorModal.js +7 -3
- package/lib/component/modal/MoleculeStructureEditorModal.js.map +1 -1
- package/lib/component/modal/MultipletAnalysisModal.js +0 -2
- package/lib/component/modal/MultipletAnalysisModal.js.map +1 -1
- package/lib/component/modal/SaveAsModal.d.ts.map +1 -1
- package/lib/component/modal/SaveAsModal.js +10 -3
- package/lib/component/modal/SaveAsModal.js.map +1 -1
- package/lib/component/modal/changeSum/ChangeSumModalContents.d.ts.map +1 -1
- package/lib/component/modal/changeSum/ChangeSumModalContents.js +0 -2
- package/lib/component/modal/changeSum/ChangeSumModalContents.js.map +1 -1
- package/lib/component/modal/changeSum/SelectMolecule.d.ts.map +1 -1
- package/lib/component/modal/changeSum/SelectMolecule.js +0 -2
- package/lib/component/modal/changeSum/SelectMolecule.js.map +1 -1
- package/lib/component/modal/setting/settings-tabs/DatabasesTabContent.d.ts +2 -2
- package/lib/component/modal/setting/settings-tabs/DatabasesTabContent.d.ts.map +1 -1
- package/lib/component/modal/setting/settings-tabs/DatabasesTabContent.js +1 -2
- package/lib/component/modal/setting/settings-tabs/DatabasesTabContent.js.map +1 -1
- package/lib/component/modal/setting/settings-tabs/ToolsTabContent.d.ts.map +1 -1
- package/lib/component/modal/setting/settings-tabs/ToolsTabContent.js +16 -0
- package/lib/component/modal/setting/settings-tabs/ToolsTabContent.js.map +1 -1
- package/lib/component/modal/setting/settingsValidation.js +2 -2
- package/lib/component/modal/setting/settingsValidation.js.map +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralPanel.d.ts.map +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralPanel.js +2 -1
- package/lib/component/panels/IntegralsPanel/IntegralPanel.js.map +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralTable.d.ts +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralTable.d.ts.map +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralTable.js +4 -3
- package/lib/component/panels/IntegralsPanel/IntegralTable.js.map +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculeOptionsPanel.d.ts +6 -0
- package/lib/component/panels/MoleculesPanel/MoleculeOptionsPanel.d.ts.map +1 -0
- package/lib/component/panels/MoleculesPanel/MoleculeOptionsPanel.js +87 -0
- package/lib/component/panels/MoleculesPanel/MoleculeOptionsPanel.js.map +1 -0
- package/lib/component/panels/MoleculesPanel/MoleculePanel.d.ts.map +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculePanel.js +18 -28
- package/lib/component/panels/MoleculesPanel/MoleculePanel.js.map +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.d.ts.map +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +32 -25
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js.map +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculeStructure.d.ts +13 -0
- package/lib/component/panels/MoleculesPanel/MoleculeStructure.d.ts.map +1 -0
- package/lib/component/panels/MoleculesPanel/MoleculeStructure.js +66 -0
- package/lib/component/panels/MoleculesPanel/MoleculeStructure.js.map +1 -0
- package/lib/component/panels/MoleculesPanel/{useAtomAssignment.d.ts → hooks/useAtomAssignment.d.ts} +1 -1
- package/lib/component/panels/MoleculesPanel/hooks/useAtomAssignment.d.ts.map +1 -0
- package/lib/component/panels/MoleculesPanel/{useAtomAssignment.js → hooks/useAtomAssignment.js} +50 -19
- package/lib/component/panels/MoleculesPanel/hooks/useAtomAssignment.js.map +1 -0
- package/lib/component/panels/MoleculesPanel/hooks/useExtractAtomAssignmentLabel.d.ts +12 -0
- package/lib/component/panels/MoleculesPanel/hooks/useExtractAtomAssignmentLabel.d.ts.map +1 -0
- package/lib/component/panels/MoleculesPanel/hooks/useExtractAtomAssignmentLabel.js +58 -0
- package/lib/component/panels/MoleculesPanel/hooks/useExtractAtomAssignmentLabel.js.map +1 -0
- package/lib/component/panels/MoleculesPanel/utilities/AtomData.d.ts +5 -0
- package/lib/component/panels/MoleculesPanel/utilities/AtomData.d.ts.map +1 -0
- package/lib/component/panels/MoleculesPanel/utilities/AtomData.js +2 -0
- package/lib/component/panels/MoleculesPanel/utilities/AtomData.js.map +1 -0
- package/lib/component/panels/MoleculesPanel/utilities/extractFromAtom.d.ts +16 -0
- package/lib/component/panels/MoleculesPanel/utilities/extractFromAtom.d.ts.map +1 -0
- package/lib/component/panels/MoleculesPanel/utilities/extractFromAtom.js +47 -0
- package/lib/component/panels/MoleculesPanel/utilities/extractFromAtom.js.map +1 -0
- package/lib/component/panels/MoleculesPanel/utilities/getAssignIds.d.ts +18 -0
- package/lib/component/panels/MoleculesPanel/utilities/getAssignIds.d.ts.map +1 -0
- package/lib/component/panels/MoleculesPanel/utilities/getAssignIds.js +31 -0
- package/lib/component/panels/MoleculesPanel/utilities/getAssignIds.js.map +1 -0
- package/lib/component/panels/MoleculesPanel/utilities/getCurrentDiaIDsToHighlight.d.ts +3 -0
- package/lib/component/panels/MoleculesPanel/utilities/getCurrentDiaIDsToHighlight.d.ts.map +1 -0
- package/lib/component/panels/MoleculesPanel/utilities/getCurrentDiaIDsToHighlight.js +12 -0
- package/lib/component/panels/MoleculesPanel/utilities/getCurrentDiaIDsToHighlight.js.map +1 -0
- package/lib/component/panels/MoleculesPanel/utilities/getHighlightsOnHover.d.ts +4 -0
- package/lib/component/panels/MoleculesPanel/utilities/getHighlightsOnHover.d.ts.map +1 -0
- package/lib/component/panels/MoleculesPanel/utilities/getHighlightsOnHover.js +25 -0
- package/lib/component/panels/MoleculesPanel/utilities/getHighlightsOnHover.js.map +1 -0
- package/lib/component/panels/MoleculesPanel/utilities/getUniqueDiaIDs.d.ts +6 -0
- package/lib/component/panels/MoleculesPanel/utilities/getUniqueDiaIDs.d.ts.map +1 -0
- package/lib/component/panels/MoleculesPanel/utilities/getUniqueDiaIDs.js +18 -0
- package/lib/component/panels/MoleculesPanel/utilities/getUniqueDiaIDs.js.map +1 -0
- package/lib/component/panels/PeaksPanel/PeaksPanel.d.ts.map +1 -1
- package/lib/component/panels/PeaksPanel/PeaksPanel.js +24 -26
- package/lib/component/panels/PeaksPanel/PeaksPanel.js.map +1 -1
- package/lib/component/panels/PeaksPanel/PeaksTable.d.ts +1 -1
- package/lib/component/panels/PeaksPanel/PeaksTable.d.ts.map +1 -1
- package/lib/component/panels/PeaksPanel/PeaksTable.js +3 -2
- package/lib/component/panels/PeaksPanel/PeaksTable.js.map +1 -1
- package/lib/component/panels/RangesPanel/RangesHeader.d.ts.map +1 -1
- package/lib/component/panels/RangesPanel/RangesHeader.js +3 -2
- package/lib/component/panels/RangesPanel/RangesHeader.js.map +1 -1
- package/lib/component/panels/RangesPanel/RangesTable.d.ts +1 -1
- package/lib/component/panels/RangesPanel/RangesTable.d.ts.map +1 -1
- package/lib/component/panels/RangesPanel/RangesTable.js +2 -1
- package/lib/component/panels/RangesPanel/RangesTable.js.map +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js +2 -2
- package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js.map +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/RelativeColumn.js +2 -2
- package/lib/component/panels/RangesPanel/TableColumns/RelativeColumn.js.map +1 -1
- package/lib/component/panels/SpectraPanel/SpectraTable.d.ts.map +1 -1
- package/lib/component/panels/SpectraPanel/SpectraTable.js +3 -2
- package/lib/component/panels/SpectraPanel/SpectraTable.js.map +1 -1
- package/lib/component/panels/SummaryPanel/utilities/Utilities.js +2 -2
- package/lib/component/panels/SummaryPanel/utilities/Utilities.js.map +1 -1
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.js +1 -1
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.js.map +1 -1
- package/lib/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.d.ts.map +1 -1
- package/lib/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.js +0 -4
- package/lib/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.js.map +1 -1
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.js +8 -8
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.js.map +1 -1
- package/lib/component/panels/ZonesPanel/ZonesPanel.d.ts.map +1 -1
- package/lib/component/panels/ZonesPanel/ZonesPanel.js +6 -1
- package/lib/component/panels/ZonesPanel/ZonesPanel.js.map +1 -1
- package/lib/component/panels/ZonesPanel/ZonesTable.d.ts +8 -9
- package/lib/component/panels/ZonesPanel/ZonesTable.d.ts.map +1 -1
- package/lib/component/panels/ZonesPanel/ZonesTable.js +3 -2
- package/lib/component/panels/ZonesPanel/ZonesTable.js.map +1 -1
- package/lib/component/panels/ZonesPanel/ZonesTableRow.d.ts.map +1 -1
- package/lib/component/panels/ZonesPanel/ZonesTableRow.js +0 -2
- package/lib/component/panels/ZonesPanel/ZonesTableRow.js.map +1 -1
- package/lib/component/panels/ZonesPanel/hooks/useMapZones.d.ts +7 -7
- package/lib/component/panels/ZonesPanel/hooks/useMapZones.d.ts.map +1 -1
- package/lib/component/panels/ZonesPanel/hooks/useMapZones.js +3 -3
- package/lib/component/panels/ZonesPanel/hooks/useMapZones.js.map +1 -1
- package/lib/component/panels/databasePanel/DatabasePanel.d.ts.map +1 -1
- package/lib/component/panels/databasePanel/DatabasePanel.js +13 -10
- package/lib/component/panels/databasePanel/DatabasePanel.js.map +1 -1
- package/lib/component/panels/filtersPanel/Filters/hooks/usePhaseCorrectionTwoDimensions.d.ts.map +1 -1
- package/lib/component/panels/filtersPanel/Filters/hooks/usePhaseCorrectionTwoDimensions.js +0 -2
- package/lib/component/panels/filtersPanel/Filters/hooks/usePhaseCorrectionTwoDimensions.js.map +1 -1
- package/lib/component/panels/hooks/useMoleculeAnnotationCore.d.ts +9 -0
- package/lib/component/panels/hooks/useMoleculeAnnotationCore.d.ts.map +1 -0
- package/lib/component/panels/hooks/useMoleculeAnnotationCore.js +27 -0
- package/lib/component/panels/hooks/useMoleculeAnnotationCore.js.map +1 -0
- package/lib/component/panels/multipleAnalysisPanel/preferences/MultipleAnalysisCodeEditor.d.ts.map +1 -1
- package/lib/component/panels/multipleAnalysisPanel/preferences/MultipleAnalysisCodeEditor.js +0 -2
- package/lib/component/panels/multipleAnalysisPanel/preferences/MultipleAnalysisCodeEditor.js.map +1 -1
- package/lib/component/reducer/IgnoreActions.d.ts.map +1 -1
- package/lib/component/reducer/IgnoreActions.js +2 -1
- package/lib/component/reducer/IgnoreActions.js.map +1 -1
- package/lib/component/reducer/Reducer.d.ts +13 -1
- package/lib/component/reducer/Reducer.d.ts.map +1 -1
- package/lib/component/reducer/Reducer.js +10 -3
- package/lib/component/reducer/Reducer.js.map +1 -1
- package/lib/component/reducer/actions/DatabaseActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/DatabaseActions.js +2 -1
- package/lib/component/reducer/actions/DatabaseActions.js.map +1 -1
- package/lib/component/reducer/actions/IntegralsActions.js.map +1 -1
- package/lib/component/reducer/actions/{LoadActions.d.ts → LoadAction.d.ts} +16 -5
- package/lib/component/reducer/actions/LoadAction.d.ts.map +1 -0
- package/lib/component/reducer/actions/{LoadActions.js → LoadAction.js} +60 -16
- package/lib/component/reducer/actions/LoadAction.js.map +1 -0
- package/lib/component/reducer/actions/MoleculeActions.d.ts +22 -6
- package/lib/component/reducer/actions/MoleculeActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/MoleculeActions.js +43 -29
- package/lib/component/reducer/actions/MoleculeActions.js.map +1 -1
- package/lib/component/reducer/actions/RangesActions.d.ts +12 -6
- package/lib/component/reducer/actions/RangesActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/RangesActions.js +37 -16
- package/lib/component/reducer/actions/RangesActions.js.map +1 -1
- package/lib/component/reducer/actions/ZonesActions.d.ts +3 -3
- package/lib/component/reducer/actions/ZonesActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/ZonesActions.js +9 -4
- package/lib/component/reducer/actions/ZonesActions.js.map +1 -1
- package/lib/component/reducer/preferences/actions/changeDefaultMoleculeSettings.d.ts +4 -0
- package/lib/component/reducer/preferences/actions/changeDefaultMoleculeSettings.d.ts.map +1 -0
- package/lib/component/reducer/preferences/actions/changeDefaultMoleculeSettings.js +7 -0
- package/lib/component/reducer/preferences/actions/changeDefaultMoleculeSettings.js.map +1 -0
- package/lib/component/reducer/preferences/actions/initPreferences.d.ts.map +1 -1
- package/lib/component/reducer/preferences/actions/initPreferences.js +1 -2
- package/lib/component/reducer/preferences/actions/initPreferences.js.map +1 -1
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.d.ts.map +1 -1
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js +2 -1
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js.map +1 -1
- package/lib/component/reducer/preferences/preferencesReducer.d.ts +9 -8
- package/lib/component/reducer/preferences/preferencesReducer.d.ts.map +1 -1
- package/lib/component/reducer/preferences/preferencesReducer.js +3 -1
- package/lib/component/reducer/preferences/preferencesReducer.js.map +1 -1
- package/lib/component/toolbar/ToolTypes.d.ts.map +1 -1
- package/lib/component/toolbar/ToolTypes.js +1 -0
- package/lib/component/toolbar/ToolTypes.js.map +1 -1
- package/lib/component/utility/export.d.ts +3 -3
- package/lib/component/utility/export.d.ts.map +1 -1
- package/lib/component/utility/export.js +13 -21
- package/lib/component/utility/export.js.map +1 -1
- package/lib/component/utility/getClosePeak.js +1 -1
- package/lib/component/utility/getClosePeak.js.map +1 -1
- package/lib/component/utility/save_as.d.ts +9 -0
- package/lib/component/utility/save_as.d.ts.map +1 -0
- package/lib/component/utility/save_as.js +7 -0
- package/lib/component/utility/save_as.js.map +1 -0
- package/lib/component/workspaces/assignment.d.ts.map +1 -1
- package/lib/component/workspaces/assignment.js +7 -0
- package/lib/component/workspaces/assignment.js.map +1 -1
- package/lib/component/workspaces/basic.d.ts.map +1 -1
- package/lib/component/workspaces/basic.js +5 -0
- package/lib/component/workspaces/basic.js.map +1 -1
- package/lib/component/workspaces/embedded.d.ts.map +1 -1
- package/lib/component/workspaces/embedded.js +5 -0
- package/lib/component/workspaces/embedded.js.map +1 -1
- package/lib/component/workspaces/exercise.d.ts.map +1 -1
- package/lib/component/workspaces/exercise.js +5 -0
- package/lib/component/workspaces/exercise.js.map +1 -1
- package/lib/component/workspaces/prediction.d.ts.map +1 -1
- package/lib/component/workspaces/prediction.js +5 -0
- package/lib/component/workspaces/prediction.js.map +1 -1
- package/lib/component/workspaces/process1D.d.ts.map +1 -1
- package/lib/component/workspaces/process1D.js +6 -0
- package/lib/component/workspaces/process1D.js.map +1 -1
- package/lib/component/workspaces/workspaceDefaultProperties.d.ts.map +1 -1
- package/lib/component/workspaces/workspaceDefaultProperties.js +18 -0
- package/lib/component/workspaces/workspaceDefaultProperties.js.map +1 -1
- package/lib/data/PredictionManager.d.ts.map +1 -1
- package/lib/data/PredictionManager.js +13 -9
- package/lib/data/PredictionManager.js.map +1 -1
- package/lib/data/SpectraManager.d.ts +45 -4
- package/lib/data/SpectraManager.d.ts.map +1 -1
- package/lib/data/SpectraManager.js +69 -12
- package/lib/data/SpectraManager.js.map +1 -1
- package/lib/data/constants/signalsKinds.d.ts +1 -6
- package/lib/data/constants/signalsKinds.d.ts.map +1 -1
- package/lib/data/constants/signalsKinds.js +2 -17
- package/lib/data/constants/signalsKinds.js.map +1 -1
- package/lib/data/data1d/Spectrum1D/generateJGraphData.js +1 -1
- package/lib/data/data1d/Spectrum1D/generateJGraphData.js.map +1 -1
- package/lib/data/data1d/Spectrum1D/initiateDatum1D.js +16 -14
- package/lib/data/data1d/Spectrum1D/initiateDatum1D.js.map +1 -1
- package/lib/data/data1d/Spectrum1D/integrals/initiateIntegrals.d.ts +1 -10
- package/lib/data/data1d/Spectrum1D/integrals/initiateIntegrals.d.ts.map +1 -1
- package/lib/data/data1d/Spectrum1D/isRangeAssigned.d.ts.map +1 -1
- package/lib/data/data1d/Spectrum1D/isRangeAssigned.js.map +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/autoRangesDetection.d.ts.map +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/autoRangesDetection.js +6 -4
- package/lib/data/data1d/Spectrum1D/ranges/autoRangesDetection.js.map +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectRanges.d.ts.map +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectRanges.js +5 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectRanges.js.map +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectSignals.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectSignals.js +1 -1
- package/lib/data/data2d/Spectrum2D/contours.d.ts.map +1 -1
- package/lib/data/data2d/Spectrum2D/contours.js +1 -1
- package/lib/data/data2d/Spectrum2D/contours.js.map +1 -1
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.d.ts.map +1 -1
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.js +6 -4
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.js.map +1 -1
- package/lib/data/data2d/Spectrum2D/zones/detectZonesManual.d.ts +2 -2
- package/lib/data/data2d/Spectrum2D/zones/detectZonesManual.d.ts.map +1 -1
- package/lib/data/data2d/Spectrum2D/zones/initiateZones.d.ts +2 -2
- package/lib/data/data2d/Spectrum2D/zones/initiateZones.d.ts.map +1 -1
- package/lib/data/molecules/Molecule.d.ts +2 -22
- package/lib/data/molecules/Molecule.d.ts.map +1 -1
- package/lib/data/molecules/Molecule.js +3 -1
- package/lib/data/molecules/Molecule.js.map +1 -1
- package/lib/data/molecules/MoleculeManager.d.ts +3 -2
- package/lib/data/molecules/MoleculeManager.d.ts.map +1 -1
- package/lib/data/molecules/MoleculeManager.js +4 -2
- package/lib/data/molecules/MoleculeManager.js.map +1 -1
- package/lib/data/utilities/RangeUtilities.d.ts +3 -2
- package/lib/data/utilities/RangeUtilities.d.ts.map +1 -1
- package/lib/data/utilities/RangeUtilities.js +9 -3
- package/lib/data/utilities/RangeUtilities.js.map +1 -1
- package/lib/data/utilities/ZoneUtilities.d.ts.map +1 -1
- package/lib/data/utilities/ZoneUtilities.js +1 -2
- package/lib/data/utilities/ZoneUtilities.js.map +1 -1
- package/lib/data/utilities/isProton.d.ts +2 -0
- package/lib/data/utilities/isProton.d.ts.map +1 -0
- package/lib/data/utilities/isProton.js +4 -0
- package/lib/data/utilities/isProton.js.map +1 -0
- package/lib/versionInfo.js +1 -1
- package/package.json +32 -32
- package/src/component/1d/FloatingRanges.tsx +5 -5
- package/src/component/1d/database/DatabaseSpectrum.tsx +1 -1
- package/src/component/1d/multiAnalysis/MultiAnalysisRanges.tsx +1 -1
- package/src/component/1d/multiplicityTree/MultiplicityTree.tsx +4 -2
- package/src/component/1d/peaks/PeakAnnotations.tsx +2 -1
- package/src/component/1d/peaks/PeakAnnotationsSpreadMode.tsx +11 -1
- package/src/component/1d/peaks/Peaks.tsx +9 -3
- package/src/component/1d/ranges/Atoms.tsx +36 -13
- package/src/component/1d/ranges/Range.tsx +4 -3
- package/src/component/1d/ranges/RangesIntegrals.tsx +6 -2
- package/src/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.tsx +38 -78
- package/src/component/1d-2d/components/FloatMoleculeStructures/FloatMolecules.tsx +5 -2
- package/src/component/2d/FooterBanner.tsx +2 -2
- package/src/component/2d/YAxis.tsx +31 -13
- package/src/component/2d/useTracesSpectra.ts +3 -0
- package/src/component/2d/utilities/extractSpectrumSignals.ts +6 -16
- package/src/component/2d/zones/SignalsGuideLines.tsx +11 -9
- package/src/component/2d/zones/ZonesAssignmentsLabels.tsx +2 -3
- package/src/component/context/DispatchContext.tsx +2 -2
- package/src/component/context/LoggerContext.tsx +8 -11
- package/src/component/context/PreferencesContext.tsx +8 -5
- package/src/component/elements/D3Axis.tsx +1 -2
- package/src/component/elements/Sections.tsx +1 -1
- package/src/component/hooks/useActiveSpectrumRangesViewState.ts +2 -2
- package/src/component/hooks/useExport.tsx +38 -6
- package/src/component/loader/Spinner.tsx +1 -1
- package/src/component/loader/useLoadFiles.ts +79 -30
- package/src/component/main/InnerNMRium.tsx +6 -2
- package/src/component/main/NMRiumStateProvider.tsx +18 -7
- package/src/component/modal/LoadJCAMPModal.tsx +10 -5
- package/src/component/modal/MoleculeStructureEditorModal.tsx +11 -3
- package/src/component/modal/MultipletAnalysisModal.tsx +0 -2
- package/src/component/modal/SaveAsModal.tsx +35 -6
- package/src/component/modal/changeSum/ChangeSumModalContents.tsx +0 -2
- package/src/component/modal/changeSum/SelectMolecule.tsx +0 -2
- package/src/component/modal/setting/settings-tabs/DatabasesTabContent.tsx +1 -3
- package/src/component/modal/setting/settings-tabs/ToolsTabContent.tsx +16 -0
- package/src/component/modal/setting/settingsValidation.ts +2 -2
- package/src/component/panels/IntegralsPanel/IntegralPanel.tsx +2 -6
- package/src/component/panels/IntegralsPanel/IntegralTable.tsx +4 -3
- package/src/component/panels/MoleculesPanel/MoleculeOptionsPanel.tsx +160 -0
- package/src/component/panels/MoleculesPanel/MoleculePanel.tsx +77 -102
- package/src/component/panels/MoleculesPanel/MoleculePanelHeader.tsx +54 -35
- package/src/component/panels/MoleculesPanel/MoleculeStructure.tsx +117 -0
- package/src/component/panels/MoleculesPanel/{useAtomAssignment.tsx → hooks/useAtomAssignment.tsx} +71 -30
- package/src/component/panels/MoleculesPanel/hooks/useExtractAtomAssignmentLabel.ts +74 -0
- package/src/component/panels/MoleculesPanel/utilities/AtomData.ts +4 -0
- package/src/component/panels/MoleculesPanel/utilities/extractFromAtom.ts +63 -0
- package/src/component/panels/MoleculesPanel/utilities/getAssignIds.ts +59 -0
- package/src/component/panels/MoleculesPanel/utilities/getCurrentDiaIDsToHighlight.ts +12 -0
- package/src/component/panels/MoleculesPanel/utilities/getHighlightsOnHover.ts +36 -0
- package/src/component/panels/MoleculesPanel/utilities/getUniqueDiaIDs.ts +20 -0
- package/src/component/panels/PeaksPanel/PeaksPanel.tsx +25 -35
- package/src/component/panels/PeaksPanel/PeaksTable.tsx +3 -2
- package/src/component/panels/RangesPanel/RangesHeader.tsx +3 -2
- package/src/component/panels/RangesPanel/RangesTable.tsx +10 -8
- package/src/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.tsx +3 -3
- package/src/component/panels/RangesPanel/TableColumns/RelativeColumn.tsx +2 -2
- package/src/component/panels/SpectraPanel/SpectraTable.tsx +3 -2
- package/src/component/panels/SummaryPanel/utilities/Utilities.ts +2 -2
- package/src/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.tsx +1 -1
- package/src/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.tsx +0 -4
- package/src/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.tsx +9 -9
- package/src/component/panels/ZonesPanel/ZonesPanel.tsx +15 -5
- package/src/component/panels/ZonesPanel/ZonesTable.tsx +9 -10
- package/src/component/panels/ZonesPanel/ZonesTableRow.tsx +0 -2
- package/src/component/panels/ZonesPanel/hooks/useMapZones.ts +11 -11
- package/src/component/panels/databasePanel/DatabasePanel.tsx +18 -14
- package/src/component/panels/filtersPanel/Filters/hooks/usePhaseCorrectionTwoDimensions.tsx +0 -2
- package/src/component/panels/hooks/useMoleculeAnnotationCore.ts +36 -0
- package/src/component/panels/multipleAnalysisPanel/preferences/MultipleAnalysisCodeEditor.tsx +0 -2
- package/src/component/reducer/IgnoreActions.ts +2 -1
- package/src/component/reducer/Reducer.ts +28 -4
- package/src/component/reducer/actions/DatabaseActions.ts +3 -0
- package/src/component/reducer/actions/IntegralsActions.ts +1 -1
- package/src/component/reducer/actions/{LoadActions.ts → LoadAction.ts} +87 -25
- package/src/component/reducer/actions/MoleculeActions.ts +91 -44
- package/src/component/reducer/actions/RangesActions.ts +66 -30
- package/src/component/reducer/actions/ZonesActions.ts +18 -10
- package/src/component/reducer/preferences/actions/changeDefaultMoleculeSettings.ts +16 -0
- package/src/component/reducer/preferences/actions/initPreferences.ts +0 -3
- package/src/component/reducer/preferences/panelsPreferencesDefaultValues.ts +2 -1
- package/src/component/reducer/preferences/preferencesReducer.ts +20 -11
- package/src/component/toolbar/ToolTypes.ts +1 -0
- package/src/component/utility/export.ts +15 -20
- package/src/component/utility/getClosePeak.ts +1 -1
- package/src/component/utility/save_as.ts +16 -0
- package/src/component/workspaces/assignment.ts +7 -0
- package/src/component/workspaces/basic.ts +5 -0
- package/src/component/workspaces/embedded.ts +5 -0
- package/src/component/workspaces/exercise.ts +5 -0
- package/src/component/workspaces/prediction.ts +5 -0
- package/src/component/workspaces/process1D.ts +6 -0
- package/src/component/workspaces/workspaceDefaultProperties.ts +18 -0
- package/src/data/PredictionManager.ts +21 -14
- package/src/data/SpectraManager.ts +90 -19
- package/src/data/constants/signalsKinds.ts +5 -20
- package/src/data/data1d/Spectrum1D/generateJGraphData.ts +1 -1
- package/src/data/data1d/Spectrum1D/initiateDatum1D.ts +16 -16
- package/src/data/data1d/Spectrum1D/isRangeAssigned.ts +1 -0
- package/src/data/data1d/Spectrum1D/ranges/autoRangesDetection.ts +7 -4
- package/src/data/data1d/Spectrum1D/ranges/detectRanges.ts +8 -1
- package/src/data/data1d/Spectrum1D/ranges/detectSignals.ts +1 -1
- package/src/data/data2d/Spectrum2D/contours.ts +2 -3
- package/src/data/data2d/Spectrum2D/initiateDatum2D.ts +6 -7
- package/src/data/molecules/Molecule.ts +9 -23
- package/src/data/molecules/MoleculeManager.ts +10 -8
- package/src/data/utilities/RangeUtilities.ts +12 -4
- package/src/data/utilities/ZoneUtilities.ts +1 -3
- package/src/data/utilities/isProton.ts +3 -0
- package/src/index.tsx +0 -3
- package/src/versionInfo.ts +1 -1
- package/lib/component/panels/MoleculesPanel/Utilities.d.ts +0 -43
- package/lib/component/panels/MoleculesPanel/Utilities.d.ts.map +0 -1
- package/lib/component/panels/MoleculesPanel/Utilities.js +0 -126
- package/lib/component/panels/MoleculesPanel/Utilities.js.map +0 -1
- package/lib/component/panels/MoleculesPanel/useAtomAssignment.d.ts.map +0 -1
- package/lib/component/panels/MoleculesPanel/useAtomAssignment.js.map +0 -1
- package/lib/component/reducer/actions/LoadActions.d.ts.map +0 -1
- package/lib/component/reducer/actions/LoadActions.js.map +0 -1
- package/lib/component/utility/isHomoNuclear.d.ts +0 -2
- package/lib/component/utility/isHomoNuclear.d.ts.map +0 -1
- package/lib/component/utility/isHomoNuclear.js +0 -11
- package/lib/component/utility/isHomoNuclear.js.map +0 -1
- package/lib/data/types/common/SignalKind.d.ts +0 -2
- package/lib/data/types/common/SignalKind.d.ts.map +0 -1
- package/lib/data/types/common/SignalKind.js +0 -2
- package/lib/data/types/common/SignalKind.js.map +0 -1
- package/lib/utils/stringCapitalize.d.ts +0 -2
- package/lib/utils/stringCapitalize.d.ts.map +0 -1
- package/lib/utils/stringCapitalize.js +0 -4
- package/lib/utils/stringCapitalize.js.map +0 -1
- package/src/component/panels/MoleculesPanel/Utilities.ts +0 -186
- package/src/component/utility/isHomoNuclear.ts +0 -11
- package/src/data/types/common/SignalKind.ts +0 -10
- package/src/utils/stringCapitalize.ts +0 -3
|
@@ -8,6 +8,7 @@ import { CoreProvider } from '../context/CoreContext.js';
|
|
|
8
8
|
import { GlobalProvider } from '../context/GlobalContext.js';
|
|
9
9
|
import { KeyModifiersProvider } from '../context/KeyModifierContext.js';
|
|
10
10
|
import { LoggerProvider } from '../context/LoggerContext.js';
|
|
11
|
+
import type { PreferencesStateContext } from '../context/PreferencesContext.js';
|
|
11
12
|
import { PreferencesProvider } from '../context/PreferencesContext.js';
|
|
12
13
|
import { SortSpectraProvider } from '../context/SortSpectraContext.js';
|
|
13
14
|
import { ToasterProvider } from '../context/ToasterContext.js';
|
|
@@ -66,6 +67,10 @@ export function InnerNMRium(props: InnerNMRiumProps) {
|
|
|
66
67
|
initPreferencesState,
|
|
67
68
|
);
|
|
68
69
|
|
|
70
|
+
const preferencesProviderValue = useMemo<PreferencesStateContext>(() => {
|
|
71
|
+
return { ...preferencesState, dispatch: dispatchPreferences };
|
|
72
|
+
}, [preferencesState]);
|
|
73
|
+
|
|
69
74
|
useEffect(() => {
|
|
70
75
|
rootRef.current?.focus();
|
|
71
76
|
}, [isFullScreen]);
|
|
@@ -79,7 +84,6 @@ export function InnerNMRium(props: InnerNMRiumProps) {
|
|
|
79
84
|
workspace,
|
|
80
85
|
customWorkspaces,
|
|
81
86
|
currentWorkspace: settings?.currentWorkspace,
|
|
82
|
-
dispatch: dispatchPreferences,
|
|
83
87
|
},
|
|
84
88
|
});
|
|
85
89
|
}, [customWorkspaces, preferences, workspace]);
|
|
@@ -99,7 +103,7 @@ export function InnerNMRium(props: InnerNMRiumProps) {
|
|
|
99
103
|
viewerRef: viewerRef.current,
|
|
100
104
|
}}
|
|
101
105
|
>
|
|
102
|
-
<PreferencesProvider value={
|
|
106
|
+
<PreferencesProvider value={preferencesProviderValue}>
|
|
103
107
|
<LoggerProvider>
|
|
104
108
|
<KeyModifiersProvider>
|
|
105
109
|
<ToasterProvider>
|
|
@@ -52,7 +52,7 @@ export default function NMRiumStateProvider(props: NMRiumStateProviderProps) {
|
|
|
52
52
|
);
|
|
53
53
|
|
|
54
54
|
const {
|
|
55
|
-
|
|
55
|
+
sources,
|
|
56
56
|
data: spectraData,
|
|
57
57
|
molecules,
|
|
58
58
|
correlations,
|
|
@@ -71,17 +71,24 @@ export default function NMRiumStateProvider(props: NMRiumStateProviderProps) {
|
|
|
71
71
|
const { workspace, workspaces = {} } = preferencesState;
|
|
72
72
|
stateRef.current = toJSON(
|
|
73
73
|
core,
|
|
74
|
-
{
|
|
74
|
+
{
|
|
75
|
+
data: spectraData,
|
|
76
|
+
molecules,
|
|
77
|
+
correlations,
|
|
78
|
+
sources,
|
|
79
|
+
view,
|
|
80
|
+
actionType,
|
|
81
|
+
},
|
|
75
82
|
{ current: workspaces[workspace.current] },
|
|
76
83
|
{ serialize: false, exportTarget: 'onChange' },
|
|
77
|
-
);
|
|
84
|
+
) as NmriumState;
|
|
78
85
|
}, [
|
|
79
86
|
actionType,
|
|
80
87
|
core,
|
|
81
88
|
correlations,
|
|
82
89
|
molecules,
|
|
83
90
|
preferencesState,
|
|
84
|
-
|
|
91
|
+
sources,
|
|
85
92
|
spectraData,
|
|
86
93
|
view,
|
|
87
94
|
]);
|
|
@@ -91,7 +98,7 @@ export default function NMRiumStateProvider(props: NMRiumStateProviderProps) {
|
|
|
91
98
|
if (checkActionType(actionType)) {
|
|
92
99
|
handleChange.current?.(stateRef.current as NmriumState, 'data');
|
|
93
100
|
}
|
|
94
|
-
}, [actionType, correlations, molecules,
|
|
101
|
+
}, [actionType, correlations, molecules, sources, spectraData]);
|
|
95
102
|
|
|
96
103
|
useEffect(() => {
|
|
97
104
|
// trigger onChange callback if view object changed
|
|
@@ -111,7 +118,8 @@ export default function NMRiumStateProvider(props: NMRiumStateProviderProps) {
|
|
|
111
118
|
if (nmriumData) {
|
|
112
119
|
void core
|
|
113
120
|
.readNMRiumObject(nmriumData)
|
|
114
|
-
.then((
|
|
121
|
+
.then((result) => {
|
|
122
|
+
const [nmriumState, aggregator] = result;
|
|
115
123
|
if (nmriumState?.settings) {
|
|
116
124
|
dispatchPreferences({
|
|
117
125
|
type: 'SET_WORKSPACE',
|
|
@@ -121,7 +129,10 @@ export default function NMRiumStateProvider(props: NMRiumStateProviderProps) {
|
|
|
121
129
|
},
|
|
122
130
|
});
|
|
123
131
|
}
|
|
124
|
-
dispatch({
|
|
132
|
+
dispatch({
|
|
133
|
+
type: 'INITIATE',
|
|
134
|
+
payload: { nmriumState, aggregator },
|
|
135
|
+
});
|
|
125
136
|
})
|
|
126
137
|
.catch((error: unknown) => {
|
|
127
138
|
dispatch({ type: 'SET_LOADING_FLAG', payload: { isLoading: false } });
|
|
@@ -15,7 +15,6 @@ const allowedExtensions = new Set(['dx', 'jdx', 'jcamp']);
|
|
|
15
15
|
|
|
16
16
|
const loadFormValidation = Yup.object({
|
|
17
17
|
url: Yup.string()
|
|
18
|
-
.url()
|
|
19
18
|
.required()
|
|
20
19
|
.test(
|
|
21
20
|
'file type',
|
|
@@ -67,13 +66,19 @@ function InnerLoadJCAMPModal({ onCloseDialog }: InnerLoadJCAMPModalProps) {
|
|
|
67
66
|
});
|
|
68
67
|
const { pathname, origin } = new URL(url);
|
|
69
68
|
try {
|
|
70
|
-
const nmriumState
|
|
71
|
-
|
|
72
|
-
|
|
69
|
+
const [nmriumState, fileCollection, selectorRoot] =
|
|
70
|
+
await core.readFromWebSource({
|
|
71
|
+
entries: [{ relativePath: pathname, baseURL: origin }],
|
|
72
|
+
});
|
|
73
73
|
|
|
74
74
|
dispatch({
|
|
75
75
|
type: 'LOAD_DROP_FILES',
|
|
76
|
-
payload: {
|
|
76
|
+
payload: {
|
|
77
|
+
nmriumState,
|
|
78
|
+
resetSourceObject: false,
|
|
79
|
+
fileCollection,
|
|
80
|
+
selectorRoot,
|
|
81
|
+
},
|
|
77
82
|
});
|
|
78
83
|
} catch {
|
|
79
84
|
toaster.show({ message: `Failed to load ${url}`, intent: 'danger' });
|
|
@@ -8,6 +8,7 @@ import { useOnOff } from 'react-science/ui';
|
|
|
8
8
|
|
|
9
9
|
import type { StateMoleculeExtended } from '../../data/molecules/Molecule.js';
|
|
10
10
|
import { useDispatch } from '../context/DispatchContext.js';
|
|
11
|
+
import { usePreferences } from '../context/PreferencesContext.tsx';
|
|
11
12
|
import ActionButtons from '../elements/ActionButtons.js';
|
|
12
13
|
import { StyledDialogBody } from '../elements/StyledDialogBody.js';
|
|
13
14
|
|
|
@@ -24,10 +25,14 @@ function MoleculeStructureEditorModal(
|
|
|
24
25
|
const {
|
|
25
26
|
onClose = () => null,
|
|
26
27
|
selectedMolecule,
|
|
27
|
-
floatMoleculeOnSave
|
|
28
|
+
floatMoleculeOnSave,
|
|
28
29
|
isOpen = false,
|
|
29
30
|
} = props;
|
|
30
31
|
|
|
32
|
+
const {
|
|
33
|
+
current: { defaultMoleculeSettings },
|
|
34
|
+
} = usePreferences();
|
|
35
|
+
|
|
31
36
|
const initialMolfile = selectedMolecule?.molfile;
|
|
32
37
|
const initialEnhancedMolfile = useMemo(() => {
|
|
33
38
|
if (!initialMolfile) {
|
|
@@ -75,6 +80,7 @@ function MoleculeStructureEditorModal(
|
|
|
75
80
|
const editedMolecule = Molecule.fromMolfile(molfile);
|
|
76
81
|
const mappings =
|
|
77
82
|
initialEnhancedMolfile.topicMolecule.getDiaIDsMapping(editedMolecule);
|
|
83
|
+
|
|
78
84
|
dispatch({
|
|
79
85
|
type: 'SET_MOLECULE',
|
|
80
86
|
payload: {
|
|
@@ -91,6 +97,7 @@ function MoleculeStructureEditorModal(
|
|
|
91
97
|
payload: {
|
|
92
98
|
molfile,
|
|
93
99
|
floatMoleculeOnSave,
|
|
100
|
+
defaultMoleculeSettings,
|
|
94
101
|
},
|
|
95
102
|
});
|
|
96
103
|
onClose('new');
|
|
@@ -101,8 +108,9 @@ function MoleculeStructureEditorModal(
|
|
|
101
108
|
selectedMolecule,
|
|
102
109
|
initialEnhancedMolfile,
|
|
103
110
|
dispatch,
|
|
104
|
-
floatMoleculeOnSave,
|
|
105
111
|
onClose,
|
|
112
|
+
floatMoleculeOnSave,
|
|
113
|
+
defaultMoleculeSettings,
|
|
106
114
|
]);
|
|
107
115
|
|
|
108
116
|
return (
|
|
@@ -131,7 +139,7 @@ function MoleculeStructureEditorModal(
|
|
|
131
139
|
);
|
|
132
140
|
}
|
|
133
141
|
|
|
134
|
-
export function useMoleculeEditor(floatMoleculeOnSave
|
|
142
|
+
export function useMoleculeEditor(floatMoleculeOnSave?: boolean) {
|
|
135
143
|
const [isOpen, openModal, closeModal] = useOnOff(false);
|
|
136
144
|
const [molecule, setMolecule] = useState<StateMoleculeExtended | undefined>();
|
|
137
145
|
const modal = (
|
|
@@ -162,8 +162,6 @@ function InnerMultipleAnalysis(props: InnerMultipleAnalysisProps) {
|
|
|
162
162
|
debug: true,
|
|
163
163
|
},
|
|
164
164
|
});
|
|
165
|
-
// TODO: refactor to not use an effect
|
|
166
|
-
// eslint-disable-next-line react-hooks/set-state-in-effect
|
|
167
165
|
setCalcFinished(true);
|
|
168
166
|
setAnalysisData(result);
|
|
169
167
|
} catch (error) {
|
|
@@ -5,15 +5,18 @@ import {
|
|
|
5
5
|
Radio,
|
|
6
6
|
RadioGroup,
|
|
7
7
|
} from '@blueprintjs/core';
|
|
8
|
+
import { useMemo } from 'react';
|
|
8
9
|
import { Controller, useForm } from 'react-hook-form';
|
|
9
10
|
|
|
10
11
|
import type { ExportOptions } from '../../data/SpectraManager.js';
|
|
12
|
+
import { DataExportOptions } from '../../data/SpectraManager.js';
|
|
11
13
|
import { useChartData } from '../context/ChartContext.js';
|
|
12
14
|
import ActionButtons from '../elements/ActionButtons.js';
|
|
13
15
|
import { Input2Controller } from '../elements/Input2Controller.js';
|
|
14
16
|
import type { LabelStyle } from '../elements/Label.js';
|
|
15
17
|
import Label from '../elements/Label.js';
|
|
16
18
|
import { StyledDialogBody } from '../elements/StyledDialogBody.js';
|
|
19
|
+
import useCheckExperimentalFeature from '../hooks/useCheckExperimentalFeature.js';
|
|
17
20
|
import { useExport } from '../hooks/useExport.js';
|
|
18
21
|
|
|
19
22
|
const INITIAL_VALUE = {
|
|
@@ -21,7 +24,7 @@ const INITIAL_VALUE = {
|
|
|
21
24
|
compressed: false,
|
|
22
25
|
pretty: false,
|
|
23
26
|
include: {
|
|
24
|
-
dataType:
|
|
27
|
+
dataType: DataExportOptions.RAW_DATA,
|
|
25
28
|
view: false,
|
|
26
29
|
settings: false,
|
|
27
30
|
} satisfies ExportOptions,
|
|
@@ -56,8 +59,9 @@ function SaveAsModal(props: SaveAsModalProps) {
|
|
|
56
59
|
}
|
|
57
60
|
function InnerSaveAsModal(props: InnerSaveAsModalProps) {
|
|
58
61
|
const { onCloseDialog } = props;
|
|
59
|
-
const {
|
|
62
|
+
const { sources, data, aggregator } = useChartData();
|
|
60
63
|
const { saveHandler } = useExport();
|
|
64
|
+
const experimentalFlagEnabled = useCheckExperimentalFeature();
|
|
61
65
|
|
|
62
66
|
const fileName = data[0]?.info?.name;
|
|
63
67
|
|
|
@@ -69,6 +73,11 @@ function InnerSaveAsModal(props: InnerSaveAsModalProps) {
|
|
|
69
73
|
const { handleSubmit, control, register } = useForm({
|
|
70
74
|
defaultValues: { ...INITIAL_VALUE, name: fileName },
|
|
71
75
|
});
|
|
76
|
+
|
|
77
|
+
const containsLinkedFiles = useMemo(() => {
|
|
78
|
+
return aggregator.sources.some((s) => !s.baseURL?.startsWith('ium:'));
|
|
79
|
+
}, [aggregator]);
|
|
80
|
+
|
|
72
81
|
return (
|
|
73
82
|
<Dialog
|
|
74
83
|
isOpen
|
|
@@ -105,13 +114,33 @@ function InnerSaveAsModal(props: InnerSaveAsModalProps) {
|
|
|
105
114
|
const { value, ref, ...otherFieldProps } = field;
|
|
106
115
|
return (
|
|
107
116
|
<RadioGroup inline selectedValue={value} {...otherFieldProps}>
|
|
108
|
-
<Radio label="Raw data" value=
|
|
117
|
+
<Radio label="Raw data" value={DataExportOptions.RAW_DATA} />
|
|
109
118
|
<Radio
|
|
110
119
|
label="Data source"
|
|
111
|
-
value=
|
|
112
|
-
disabled={
|
|
120
|
+
value={DataExportOptions.DATA_SOURCE}
|
|
121
|
+
disabled={Object.keys(sources).length === 0}
|
|
113
122
|
/>
|
|
114
|
-
<Radio label="No data" value=
|
|
123
|
+
<Radio label="No data" value={DataExportOptions.NO_DATA} />
|
|
124
|
+
|
|
125
|
+
{/*
|
|
126
|
+
* Radio group works with Children.map.
|
|
127
|
+
* So Radio must be direct children of RadioGroup.
|
|
128
|
+
*/}
|
|
129
|
+
{experimentalFlagEnabled && (
|
|
130
|
+
<Radio
|
|
131
|
+
label="Full data (external data embed, experimental)"
|
|
132
|
+
value={DataExportOptions.SELF_CONTAINED}
|
|
133
|
+
/>
|
|
134
|
+
)}
|
|
135
|
+
{experimentalFlagEnabled && (
|
|
136
|
+
<Radio
|
|
137
|
+
label="Full data (external data linked, experimental)"
|
|
138
|
+
disabled={!containsLinkedFiles}
|
|
139
|
+
value={
|
|
140
|
+
DataExportOptions.SELF_CONTAINED_EXTERNAL_DATASOURCE
|
|
141
|
+
}
|
|
142
|
+
/>
|
|
143
|
+
)}
|
|
115
144
|
</RadioGroup>
|
|
116
145
|
);
|
|
117
146
|
}}
|
|
@@ -80,8 +80,6 @@ export function ChangeSumModalContents(props: ChangeSumModalContentsProps) {
|
|
|
80
80
|
|
|
81
81
|
useEffect(() => {
|
|
82
82
|
if (sumOptions?.sumAuto && panels?.structuresPanel?.display) {
|
|
83
|
-
// TODO: refactor to not use an effect
|
|
84
|
-
// eslint-disable-next-line react-hooks/set-state-in-effect
|
|
85
83
|
setActiveOption('auto');
|
|
86
84
|
const { mf, moleculeId: id } = sumOptions;
|
|
87
85
|
reset({
|
|
@@ -76,8 +76,6 @@ export default function SelectMolecule<
|
|
|
76
76
|
const index = value
|
|
77
77
|
? molecules.findIndex((molecule) => molecule.id === value.id)
|
|
78
78
|
: -1;
|
|
79
|
-
// TODO: refactor to not use an effect
|
|
80
|
-
// eslint-disable-next-line react-hooks/set-state-in-effect
|
|
81
79
|
setValue(index !== -1 ? index : 0);
|
|
82
80
|
}
|
|
83
81
|
}, [molecules, setValue, value]);
|
|
@@ -37,7 +37,7 @@ interface DatabasesTabContentProps {
|
|
|
37
37
|
originalWorkspaces: CustomWorkspaces;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
function DatabasesTabContent({
|
|
40
|
+
export default function DatabasesTabContent({
|
|
41
41
|
currentWorkspace,
|
|
42
42
|
originalWorkspaces,
|
|
43
43
|
}: DatabasesTabContentProps) {
|
|
@@ -276,5 +276,3 @@ function DataBaseHeader(props: DataBaseHeaderProps) {
|
|
|
276
276
|
</Section>
|
|
277
277
|
);
|
|
278
278
|
}
|
|
279
|
-
|
|
280
|
-
export default DatabasesTabContent;
|
|
@@ -60,6 +60,10 @@ const LIST: ListItem[] = [
|
|
|
60
60
|
label: 'Range picking',
|
|
61
61
|
name: 'rangePicking',
|
|
62
62
|
},
|
|
63
|
+
{
|
|
64
|
+
label: 'Inset',
|
|
65
|
+
name: 'inset',
|
|
66
|
+
},
|
|
63
67
|
{
|
|
64
68
|
label: 'Slicing',
|
|
65
69
|
name: 'slicing',
|
|
@@ -92,10 +96,22 @@ const LIST: ListItem[] = [
|
|
|
92
96
|
label: 'Fourier transform',
|
|
93
97
|
name: 'fft',
|
|
94
98
|
},
|
|
99
|
+
{
|
|
100
|
+
label: 'Fourier transform dimension one',
|
|
101
|
+
name: 'fftDimension1',
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
label: 'Fourier transform dimension two',
|
|
105
|
+
name: 'fftDimension2',
|
|
106
|
+
},
|
|
95
107
|
{
|
|
96
108
|
label: 'Phase correction',
|
|
97
109
|
name: 'phaseCorrection',
|
|
98
110
|
},
|
|
111
|
+
{
|
|
112
|
+
label: 'Two-Dimensional phase correction',
|
|
113
|
+
name: 'phaseCorrectionTwoDimensions',
|
|
114
|
+
},
|
|
99
115
|
{
|
|
100
116
|
label: 'Baseline correction',
|
|
101
117
|
name: 'baselineCorrection',
|
|
@@ -22,7 +22,7 @@ const databasesValidation = object().shape({
|
|
|
22
22
|
data: array().of(
|
|
23
23
|
object().shape({
|
|
24
24
|
label: string().trim().required('Label is a required field'),
|
|
25
|
-
url: string().trim().
|
|
25
|
+
url: string().trim().required('URL is a required field'),
|
|
26
26
|
}),
|
|
27
27
|
),
|
|
28
28
|
});
|
|
@@ -58,7 +58,7 @@ const externalAPIsValidation = array()
|
|
|
58
58
|
key: mixed<ExternalAPIKeyType>()
|
|
59
59
|
.oneOf(EXTERNAL_API_KEYS.map(({ key }) => key))
|
|
60
60
|
.required(),
|
|
61
|
-
serverLink: string().
|
|
61
|
+
serverLink: string().required(),
|
|
62
62
|
APIKey: string().required(),
|
|
63
63
|
}),
|
|
64
64
|
)
|
|
@@ -26,12 +26,8 @@ export interface IntegralPanelInnerProps {
|
|
|
26
26
|
xDomain: number[];
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
function IntegralPanelInner({
|
|
30
|
-
integrals,
|
|
31
|
-
info,
|
|
32
|
-
activeTab,
|
|
33
|
-
xDomain,
|
|
34
|
-
}: IntegralPanelInnerProps) {
|
|
29
|
+
function IntegralPanelInner(props: IntegralPanelInnerProps) {
|
|
30
|
+
const { integrals, info, activeTab, xDomain } = props;
|
|
35
31
|
const [filterIsActive, setFilterIsActive] = useState(false);
|
|
36
32
|
|
|
37
33
|
const dispatch = useDispatch();
|
|
@@ -29,7 +29,8 @@ interface IntegralTableProps
|
|
|
29
29
|
info: Info1D;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
function IntegralTable(
|
|
32
|
+
function IntegralTable(props: IntegralTableProps) {
|
|
33
|
+
const { activeTab, data, info } = props;
|
|
33
34
|
const dispatch = useDispatch();
|
|
34
35
|
|
|
35
36
|
const deleteIntegralHandler = useCallback(
|
|
@@ -179,11 +180,11 @@ function IntegralTable({ activeTab, data, info }: IntegralTableProps) {
|
|
|
179
180
|
return columns;
|
|
180
181
|
}, [COLUMNS, integralsPreferences]);
|
|
181
182
|
|
|
182
|
-
if (info
|
|
183
|
+
if (info.isFid) {
|
|
183
184
|
return <NoDataForFid />;
|
|
184
185
|
}
|
|
185
186
|
|
|
186
|
-
if (
|
|
187
|
+
if (data.length === 0) {
|
|
187
188
|
return <EmptyText text="No data" />;
|
|
188
189
|
}
|
|
189
190
|
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import styled from '@emotion/styled';
|
|
2
|
+
import { yupResolver } from '@hookform/resolvers/yup';
|
|
3
|
+
import type { BoundingBox, MoleculeView } from '@zakodium/nmrium-core';
|
|
4
|
+
import { useForm } from 'react-hook-form';
|
|
5
|
+
import * as Yup from 'yup';
|
|
6
|
+
|
|
7
|
+
import { usePreferences } from '../../context/PreferencesContext.tsx';
|
|
8
|
+
import { CheckController } from '../../elements/CheckController.js';
|
|
9
|
+
import { GroupPane } from '../../elements/GroupPane.js';
|
|
10
|
+
import type { LabelStyle } from '../../elements/Label.js';
|
|
11
|
+
import Label from '../../elements/Label.js';
|
|
12
|
+
import { NumberInput2Controller } from '../../elements/NumberInput2Controller.js';
|
|
13
|
+
import { Select2Controller } from '../../elements/Select2Controller.js';
|
|
14
|
+
import PreferencesHeader from '../header/PreferencesHeader.tsx';
|
|
15
|
+
|
|
16
|
+
const atomAnnotations: Array<{
|
|
17
|
+
value: MoleculeView['atomAnnotation'];
|
|
18
|
+
label: string;
|
|
19
|
+
}> = [
|
|
20
|
+
{ value: 'none', label: 'None' },
|
|
21
|
+
{ value: 'atom-numbers', label: 'Atoms number' },
|
|
22
|
+
{ value: 'custom-labels', label: 'Custom labels' },
|
|
23
|
+
];
|
|
24
|
+
const Container = styled.div`
|
|
25
|
+
display: flex;
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
height: 100%;
|
|
28
|
+
width: 100%;
|
|
29
|
+
`;
|
|
30
|
+
const InnerContainer = styled.div`
|
|
31
|
+
overflow: auto;
|
|
32
|
+
height: 100%;
|
|
33
|
+
display: block;
|
|
34
|
+
background-color: white;
|
|
35
|
+
`;
|
|
36
|
+
const boundingBoxSchema: Yup.ObjectSchema<BoundingBox> = Yup.object({
|
|
37
|
+
width: Yup.number().required().min(0, 'Width must be positive'),
|
|
38
|
+
height: Yup.number().required().min(0, 'Height must be positive'),
|
|
39
|
+
x: Yup.number().required(),
|
|
40
|
+
y: Yup.number().required(),
|
|
41
|
+
}).defined();
|
|
42
|
+
|
|
43
|
+
const moleculeViewSchema: Yup.ObjectSchema<MoleculeView> = Yup.object({
|
|
44
|
+
floating: Yup.object({
|
|
45
|
+
visible: Yup.boolean().required(),
|
|
46
|
+
bounding: boundingBoxSchema.required(),
|
|
47
|
+
}),
|
|
48
|
+
showLabel: Yup.boolean().required(),
|
|
49
|
+
atomAnnotation: Yup.mixed<'none' | 'atom-numbers' | 'custom-labels'>()
|
|
50
|
+
.oneOf(['none', 'atom-numbers', 'custom-labels'])
|
|
51
|
+
.required()
|
|
52
|
+
.default('none'),
|
|
53
|
+
}).defined();
|
|
54
|
+
|
|
55
|
+
const labelStyle: LabelStyle = {
|
|
56
|
+
label: { flex: 4, fontWeight: '500' },
|
|
57
|
+
wrapper: { flex: 8, display: 'flex', alignItems: 'center' },
|
|
58
|
+
container: { padding: '5px 0' },
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
const styles = {
|
|
62
|
+
select: {
|
|
63
|
+
width: '100%',
|
|
64
|
+
minWidth: '100px',
|
|
65
|
+
maxWidth: '280px',
|
|
66
|
+
height: 30,
|
|
67
|
+
margin: 0,
|
|
68
|
+
},
|
|
69
|
+
groupHeader: {
|
|
70
|
+
borderBottom: '1px solid #efefef',
|
|
71
|
+
paddingBottom: '5px',
|
|
72
|
+
fontWeight: '600',
|
|
73
|
+
color: '#005d9e',
|
|
74
|
+
},
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
interface MoleculeOptionsPanelProps {
|
|
78
|
+
onClose: () => void;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export function MoleculeOptionsPanel(props: MoleculeOptionsPanelProps) {
|
|
82
|
+
const { onClose } = props;
|
|
83
|
+
const {
|
|
84
|
+
current: { defaultMoleculeSettings },
|
|
85
|
+
} = usePreferences();
|
|
86
|
+
const { handleSubmit, control } = useForm<MoleculeView>({
|
|
87
|
+
defaultValues: defaultMoleculeSettings,
|
|
88
|
+
resolver: yupResolver(moleculeViewSchema),
|
|
89
|
+
});
|
|
90
|
+
const { dispatch } = usePreferences();
|
|
91
|
+
|
|
92
|
+
function handleSave() {
|
|
93
|
+
void handleSubmit((values) => {
|
|
94
|
+
dispatch({ type: 'CHANGE_DEFAULT_MOLECULE_SETTINGS', payload: values });
|
|
95
|
+
onClose();
|
|
96
|
+
})();
|
|
97
|
+
}
|
|
98
|
+
return (
|
|
99
|
+
<Container>
|
|
100
|
+
<PreferencesHeader onSave={handleSave} onClose={onClose} />
|
|
101
|
+
<InnerContainer>
|
|
102
|
+
<GroupPane
|
|
103
|
+
text="General"
|
|
104
|
+
style={{
|
|
105
|
+
header: styles.groupHeader,
|
|
106
|
+
}}
|
|
107
|
+
>
|
|
108
|
+
<Label title="Show label" style={labelStyle}>
|
|
109
|
+
<CheckController control={control} name="showLabel" />
|
|
110
|
+
</Label>
|
|
111
|
+
<Label title="Atom annotation" style={labelStyle}>
|
|
112
|
+
<Select2Controller
|
|
113
|
+
control={control}
|
|
114
|
+
items={atomAnnotations}
|
|
115
|
+
name="atomAnnotation"
|
|
116
|
+
/>
|
|
117
|
+
</Label>
|
|
118
|
+
</GroupPane>
|
|
119
|
+
<GroupPane
|
|
120
|
+
text="Size & position"
|
|
121
|
+
style={{
|
|
122
|
+
header: styles.groupHeader,
|
|
123
|
+
}}
|
|
124
|
+
>
|
|
125
|
+
<Label title="Floating molecule" style={labelStyle}>
|
|
126
|
+
<CheckController control={control} name="floating.visible" />
|
|
127
|
+
</Label>
|
|
128
|
+
<Label title="X (%)" style={labelStyle}>
|
|
129
|
+
<NumberInput2Controller
|
|
130
|
+
control={control}
|
|
131
|
+
name="floating.bounding.x"
|
|
132
|
+
fill
|
|
133
|
+
/>
|
|
134
|
+
</Label>
|
|
135
|
+
<Label title="Y (%)" style={labelStyle}>
|
|
136
|
+
<NumberInput2Controller
|
|
137
|
+
control={control}
|
|
138
|
+
name="floating.bounding.y"
|
|
139
|
+
fill
|
|
140
|
+
/>
|
|
141
|
+
</Label>
|
|
142
|
+
<Label title="Width" style={labelStyle}>
|
|
143
|
+
<NumberInput2Controller
|
|
144
|
+
control={control}
|
|
145
|
+
name="floating.bounding.width"
|
|
146
|
+
fill
|
|
147
|
+
/>
|
|
148
|
+
</Label>
|
|
149
|
+
<Label title="Height" style={labelStyle}>
|
|
150
|
+
<NumberInput2Controller
|
|
151
|
+
control={control}
|
|
152
|
+
name="floating.bounding.height"
|
|
153
|
+
fill
|
|
154
|
+
/>
|
|
155
|
+
</Label>
|
|
156
|
+
</GroupPane>
|
|
157
|
+
</InnerContainer>
|
|
158
|
+
</Container>
|
|
159
|
+
);
|
|
160
|
+
}
|