nmrium 0.29.0 → 0.31.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/README.md +12 -2
- package/lib/component/1d/ApodizationLine.d.ts +3 -0
- package/lib/component/1d/ApodizationLine.js +49 -0
- package/lib/component/1d/Chart1D.js +4 -2
- package/lib/component/1d/ExclusionZoneAnnotation.d.ts +1 -1
- package/lib/component/1d/ExclusionZoneAnnotation.js +14 -7
- package/lib/component/1d/FooterBanner.js +3 -1
- package/lib/component/1d/IntegralResizable.js +5 -4
- package/lib/component/1d/IntegralsSeries.js +3 -1
- package/lib/component/1d/LinesSeries.js +7 -5
- package/lib/component/1d/SpectraTracker.js +1 -1
- package/lib/component/1d/Viewer1D.js +10 -13
- package/lib/component/1d/database/DatabaseElements.js +2 -2
- package/lib/component/1d/database/DatabaseSpectrum.js +3 -3
- package/lib/component/1d/database/ResurrectedDatabaseRanges.js +3 -3
- package/lib/component/1d/jCouplingGraph/JGraph.js +5 -1
- package/lib/component/1d/multiAnalysis/AnalysisRange.js +16 -14
- package/lib/component/1d/multiAnalysis/MultiAnalysisRanges.js +1 -1
- package/lib/component/1d/multiplicityTree/MultiplicityTree.js +6 -5
- package/lib/component/1d/{PeakAnnotation.d.ts → peaks/PeakAnnotation.d.ts} +1 -2
- package/lib/component/1d/{PeakAnnotation.js → peaks/PeakAnnotation.js} +8 -9
- package/lib/component/1d/{PeakAnnotations.d.ts → peaks/PeakAnnotations.d.ts} +0 -0
- package/lib/component/1d/peaks/PeakAnnotations.js +28 -0
- package/lib/component/1d/peaks/PeaksShapes.d.ts +3 -0
- package/lib/component/1d/peaks/PeaksShapes.js +37 -0
- package/lib/component/1d/peaks/usePeakShapesPath.d.ts +13 -0
- package/lib/component/1d/peaks/usePeakShapesPath.js +49 -0
- package/lib/component/1d/ranges/Range.js +4 -4
- package/lib/component/1d/ranges/Ranges.js +8 -2
- package/lib/component/1d/tool/PeakPointer.js +3 -1
- package/lib/component/1d/tool/XLabelPointer.js +3 -1
- package/lib/component/2d/Contours.js +3 -1
- package/lib/component/2d/FooterBanner.js +5 -3
- package/lib/component/2d/Viewer2D.js +6 -6
- package/lib/component/2d/XAxis.js +2 -2
- package/lib/component/2d/YAxis.js +2 -2
- package/lib/component/2d/tools/XYLabelPointer.js +3 -1
- package/lib/component/2d/tools/slicing/SlicingView.js +3 -1
- package/lib/component/2d/zones/IndicationLines.js +1 -1
- package/lib/component/2d/zones/Signal.d.ts +3 -2
- package/lib/component/2d/zones/Signal.js +3 -3
- package/lib/component/2d/zones/Zone.d.ts +1 -1
- package/lib/component/2d/zones/Zone.js +4 -4
- package/lib/component/2d/zones/Zones.js +14 -19
- package/lib/component/EventsTrackers/KeysListenerTracker.js +91 -52
- package/lib/component/NMRium.d.ts +2 -0
- package/lib/component/NMRium.js +14 -3
- package/lib/component/assignment/AssignmentsContext.d.ts +1 -1
- package/lib/component/context/GlobalContext.d.ts +1 -1
- package/lib/component/context/GlobalContext.js +3 -3
- package/lib/component/elements/ActiveButton.d.ts +17 -0
- package/lib/component/elements/ActiveButton.js +28 -0
- package/lib/component/elements/Button.d.ts +6 -6
- package/lib/component/elements/Button.js +5 -5
- package/lib/component/elements/ButtonToolTip.js +1 -1
- package/lib/component/elements/CheckBox.d.ts +2 -6
- package/lib/component/elements/CheckBox.js +4 -6
- package/lib/component/elements/Input.d.ts +5 -4
- package/lib/component/elements/Input.js +1 -1
- package/lib/component/elements/Label.d.ts +8 -6
- package/lib/component/elements/Label.js +3 -3
- package/lib/component/elements/MoleculeSelection.d.ts +2 -2
- package/lib/component/elements/MoleculeSelection.js +1 -1
- package/lib/component/elements/NextPrev.js +1 -1
- package/lib/component/elements/ReactTable/Elements/ReactTableRow.d.ts +2 -2
- package/lib/component/elements/ReactTable/Elements/ReactTableRow.js +2 -2
- package/lib/component/elements/ReactTable/ReactTable.d.ts +2 -2
- package/lib/component/elements/Select.d.ts +7 -11
- package/lib/component/elements/Select.js +6 -8
- package/lib/component/elements/Tab/Tab.js +1 -1
- package/lib/component/elements/Table/Table.d.ts +1 -2
- package/lib/component/elements/Table/Table.js +2 -2
- package/lib/component/elements/ToggleButton.d.ts +1 -2
- package/lib/component/elements/ToggleButton.js +3 -2
- package/lib/component/elements/accordion/AccordionItem.js +2 -2
- package/lib/component/elements/formik/FormikNumberInput.d.ts +1 -1
- package/lib/component/elements/formik/FormikOnChange.d.ts +3 -2
- package/lib/component/elements/formik/FormikOnChange.js +11 -5
- package/lib/component/elements/popup/Modal/ConfirmDialog.js +1 -1
- package/lib/component/elements/popup/Modal/Provider.d.ts +3 -3
- package/lib/component/elements/popup/Modal/Provider.js +8 -11
- package/lib/component/elements/resizer/DivResizer.js +3 -3
- package/lib/component/elements/resizer/Resizer.d.ts +1 -0
- package/lib/component/elements/resizer/SVGResizer.js +3 -3
- package/lib/component/header/ApodizationOptionsPanel.d.ts +2 -0
- package/lib/component/header/ApodizationOptionsPanel.js +81 -0
- package/lib/component/header/AutoPeakPickingOptionPanel.d.ts +2 -1
- package/lib/component/header/AutoPeakPickingOptionPanel.js +40 -36
- package/lib/component/header/BaseLineCorrectionPanel.d.ts +1 -2
- package/lib/component/header/BaseLineCorrectionPanel.js +84 -52
- package/lib/component/header/Header.js +5 -2
- package/lib/component/header/HeaderContainer.d.ts +7 -0
- package/lib/component/header/HeaderContainer.js +10 -0
- package/lib/component/header/ManualPhaseCorrectionPanel.js +27 -29
- package/lib/component/header/RangesPickingOptionPanel.js +19 -21
- package/lib/component/header/ZeroFillingOptionsPanel.js +52 -47
- package/lib/component/header/Zones2DOptionPanel.js +11 -13
- package/lib/component/highlight/index.d.ts +27 -10
- package/lib/component/highlight/index.js +19 -17
- package/lib/component/hooks/useActiveSpectrumStyleOptions.js +2 -2
- package/lib/component/hooks/useCheckToolsVisibility.d.ts +10 -1
- package/lib/component/hooks/useCheckToolsVisibility.js +31 -1
- package/lib/component/hooks/useDatumWithSpectraStatistics.js +3 -1
- package/lib/component/hooks/useExport.d.ts +0 -1
- package/lib/component/hooks/useExport.js +1 -17
- package/lib/component/hooks/useFilter.d.ts +1 -0
- package/lib/component/hooks/useFilter.js +7 -0
- package/lib/component/hooks/useIntegralPath.js +5 -2
- package/lib/component/hooks/useNucleus.js +4 -4
- package/lib/component/hooks/useSpectraPerNucleus.js +1 -1
- package/lib/component/hooks/useSpectrum.js +3 -1
- package/lib/component/hooks/useToolsFunctions.js +1 -1
- package/lib/component/loader/DropZone.js +8 -148
- package/lib/component/modal/AlignSpectraModal.js +1 -2
- package/lib/component/modal/EditPeakShapeModal.d.ts +9 -0
- package/lib/component/modal/EditPeakShapeModal.js +85 -0
- package/lib/component/modal/MoleculeStructureEditorModal.d.ts +3 -3
- package/lib/component/modal/MoleculeStructureEditorModal.js +2 -3
- package/lib/component/modal/MultipleSpectraFiltersModal/index.js +1 -2
- package/lib/component/modal/PredictSpectraModal.js +1 -1
- package/lib/component/modal/changeSum/ChangeSumModal.d.ts +1 -1
- package/lib/component/modal/changeSum/ChangeSumModal.js +9 -11
- package/lib/component/modal/changeSum/SelectMolecule.js +2 -2
- package/lib/component/modal/editRange/EditRangeModal.js +3 -3
- package/lib/component/modal/editRange/forms/components/CouplingsTable.js +4 -9
- package/lib/component/modal/setting/DatabasesTabContent.js +2 -2
- package/lib/component/modal/setting/DisplayTabContent.js +1 -1
- package/lib/component/modal/setting/FormattingTabContent.js +2 -2
- package/lib/component/modal/setting/GeneralSettings.js +1 -1
- package/lib/component/modal/setting/ToolsTabContent.js +17 -13
- package/lib/component/modal/setting/WorkspaceItem.d.ts +2 -2
- package/lib/component/modal/setting/WorkspaceItem.js +2 -2
- package/lib/component/panels/IntegralsPanel/IntegralPanel.js +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralTable.js +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculeHeader.d.ts +3 -3
- package/lib/component/panels/MoleculesPanel/MoleculeHeader.js +3 -3
- package/lib/component/panels/MoleculesPanel/MoleculePanel.d.ts +5 -4
- package/lib/component/panels/MoleculesPanel/MoleculePanel.js +13 -10
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.d.ts +4 -2
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +6 -6
- package/lib/component/panels/MoleculesPanel/Utilities.d.ts +1 -2
- package/lib/component/panels/MoleculesPanel/useAtomAssignment.d.ts +5 -3
- package/lib/component/panels/MoleculesPanel/useAtomAssignment.js +12 -4
- package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.js +1 -1
- package/lib/component/panels/Panels.js +3 -3
- package/lib/component/panels/PeaksPanel/PeaksPanel.js +47 -22
- package/lib/component/panels/PeaksPanel/PeaksPreferences.js +17 -0
- package/lib/component/panels/PeaksPanel/PeaksTable.js +44 -13
- package/lib/component/panels/RangesPanel/RangesHeader.d.ts +2 -1
- package/lib/component/panels/RangesPanel/RangesHeader.js +10 -9
- package/lib/component/panels/RangesPanel/RangesPanel.js +7 -3
- package/lib/component/panels/RangesPanel/RangesTableRow.js +4 -4
- package/lib/component/panels/RangesPanel/TableColumns/ActionsColumn.js +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js +3 -2
- package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.d.ts +3 -3
- package/lib/component/panels/RangesPanel/hooks/useMapRanges.js +3 -3
- package/lib/component/panels/SpectrumsPanel/SpectraPanelHeader.js +3 -1
- package/lib/component/panels/SpectrumsPanel/SpectrumListItem.js +1 -1
- package/lib/component/panels/SpectrumsPanel/SpectrumsTabs.js +3 -1
- package/lib/component/panels/SpectrumsPanel/base/ColorIndicator.js +2 -2
- package/lib/component/panels/SpectrumsPanel/base/ShowHideMarkersButton.d.ts +1 -1
- package/lib/component/panels/SpectrumsPanel/base/ShowHideMarkersButton.js +4 -1
- package/lib/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +4 -4
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/MoveLink.js +1 -2
- package/lib/component/panels/SummaryPanel/SummaryPanel.js +2 -3
- package/lib/component/panels/SummaryPanel/utilities/useInView.js +3 -1
- package/lib/component/panels/ZonesPanel/TableColumns/ActionsColumn.js +1 -1
- package/lib/component/panels/ZonesPanel/ZonesPanel.js +19 -10
- package/lib/component/panels/databasePanel/DatabasePanel.js +5 -13
- package/lib/component/panels/databasePanel/DatabaseTable.js +3 -3
- package/lib/component/panels/filtersPanel/FilterPanel.js +1 -1
- package/lib/component/panels/filtersPanel/FiltersTable.js +2 -2
- package/lib/component/panels/header/DefaultPanelHeader.js +3 -12
- package/lib/component/panels/header/SpectraAutomaticPickingButton.js +1 -1
- package/lib/component/panels/predictionPanel/PredictionOptions.d.ts +2 -1
- package/lib/component/panels/predictionPanel/PredictionOptions.js +2 -2
- package/lib/component/panels/predictionPanel/PredictionPanel.js +15 -3
- package/lib/component/reducer/IgnoreActions.js +5 -0
- package/lib/component/reducer/Reducer.d.ts +141 -51
- package/lib/component/reducer/Reducer.js +69 -45
- package/lib/component/reducer/actions/DomainActions.d.ts +1 -1
- package/lib/component/reducer/actions/DomainActions.js +11 -9
- package/lib/component/reducer/actions/FiltersActions.d.ts +13 -7
- package/lib/component/reducer/actions/FiltersActions.js +326 -204
- package/lib/component/reducer/actions/IntegralsActions.js +15 -10
- package/lib/component/reducer/actions/LoadActions.d.ts +2 -5
- package/lib/component/reducer/actions/LoadActions.js +19 -34
- package/lib/component/reducer/actions/MoleculeActions.d.ts +2 -1
- package/lib/component/reducer/actions/MoleculeActions.js +48 -19
- package/lib/component/reducer/actions/PeaksActions.d.ts +4 -1
- package/lib/component/reducer/actions/PeaksActions.js +52 -13
- package/lib/component/reducer/actions/PreferencesActions.js +8 -10
- package/lib/component/reducer/actions/RangesActions.d.ts +3 -3
- package/lib/component/reducer/actions/RangesActions.js +87 -29
- package/lib/component/reducer/actions/SpectraAnalysisAction.js +5 -5
- package/lib/component/reducer/actions/SpectrumsActions.js +14 -11
- package/lib/component/reducer/actions/ToolsActions.js +47 -95
- package/lib/component/reducer/actions/ZonesActions.d.ts +4 -1
- package/lib/component/reducer/actions/ZonesActions.js +68 -17
- package/lib/component/reducer/helper/Zoom1DManager.js +2 -1
- package/lib/component/reducer/helper/getActiveSpectrumOrFail.d.ts +3 -0
- package/lib/component/reducer/helper/getActiveSpectrumOrFail.js +6 -0
- package/lib/component/reducer/helper/getSpectrum.js +3 -2
- package/lib/component/reducer/helper/getStrongestPeak.d.ts +7 -0
- package/lib/component/reducer/helper/getStrongestPeak.js +15 -0
- package/lib/component/reducer/preferences/actions/addWorkspace.js +2 -2
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js +3 -0
- package/lib/component/reducer/preferences/preferencesReducer.d.ts +23 -15
- package/lib/component/reducer/preferences/preferencesReducer.js +1 -1
- package/lib/component/reducer/types/Types.d.ts +12 -0
- package/lib/component/reducer/types/Types.js +12 -0
- package/lib/component/tool/BrushX.js +1 -1
- package/lib/component/tool/BrushXY.js +4 -3
- package/lib/component/tool/CrossLinePointer.js +5 -4
- package/lib/component/tool/FloatMoleculeStructures/DraggableStructure.d.ts +8 -2
- package/lib/component/tool/FloatMoleculeStructures/DraggableStructure.js +22 -7
- package/lib/component/tool/FloatMoleculeStructures/index.d.ts +3 -2
- package/lib/component/tool/FloatMoleculeStructures/index.js +19 -6
- package/lib/component/toolbar/BasicToolBar.js +7 -14
- package/lib/component/toolbar/FunctionToolBar.js +13 -23
- package/lib/component/toolbar/ToolTypes.d.ts +7 -1
- package/lib/component/toolbar/ToolTypes.js +119 -9
- package/lib/component/utility/assert.d.ts +1 -0
- package/lib/component/utility/assert.js +5 -0
- package/lib/component/workspaces/Workspace.d.ts +4 -1
- package/lib/component/workspaces/basic.js +12 -11
- package/lib/component/workspaces/embedded.js +14 -13
- package/lib/component/workspaces/exercise.js +10 -6
- package/lib/component/workspaces/prediction.js +14 -13
- package/lib/component/workspaces/process1D.js +20 -19
- package/lib/component/workspaces/workspaceDefaultProperties.js +14 -15
- package/lib/constants.js +1 -1
- package/lib/data/Filters.d.ts +2 -2
- package/lib/data/Filters.js +2 -2
- package/lib/data/FiltersManager.js +3 -3
- package/lib/data/PredictionManager.d.ts +0 -1
- package/lib/data/PredictionManager.js +15 -15
- package/lib/data/SpectraManager.d.ts +2 -5
- package/lib/data/SpectraManager.js +4 -95
- package/lib/data/constants/SignalsKinds.d.ts +0 -1
- package/lib/data/constants/SignalsKinds.js +0 -8
- package/lib/data/data1d/Data1DManager.js +5 -5
- package/lib/data/data1d/Spectrum1D/SumManager.d.ts +5 -5
- package/lib/data/data1d/Spectrum1D/SumManager.js +18 -12
- package/lib/data/data1d/Spectrum1D/generateJGraphData.js +2 -2
- package/lib/data/data1d/Spectrum1D/index.d.ts +2 -1
- package/lib/data/data1d/Spectrum1D/index.js +2 -1
- package/lib/data/data1d/Spectrum1D/initiateDatum1D.js +3 -3
- package/lib/data/data1d/Spectrum1D/integrals/changeIntegralsRelative.js +1 -1
- package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.js +5 -2
- package/lib/data/data1d/Spectrum1D/peaks/mapPeaks.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/peaks/mapPeaks.js +15 -16
- package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.d.ts +8 -0
- package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.js +24 -0
- package/lib/data/data1d/Spectrum1D/ranges/addRange.js +3 -3
- package/lib/data/data1d/Spectrum1D/ranges/autoRangesDetection.js +2 -0
- package/lib/data/data1d/Spectrum1D/ranges/changeRangeRelativeValue.js +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectRange.js +2 -2
- package/lib/data/data1d/Spectrum1D/ranges/mapRanges.js +3 -3
- package/lib/data/data1d/database.js +4 -6
- package/lib/data/data1d/filter1d/apodization.d.ts +25 -0
- package/lib/data/data1d/filter1d/apodization.js +63 -0
- package/lib/data/data1d/filter1d/baselineCorrection.d.ts +24 -7
- package/lib/data/data1d/filter1d/baselineCorrection.js +10 -17
- package/lib/data/data1d/filter1d/fft.js +11 -0
- package/lib/data/data1d/filter1d/utils/padDataToNextPowerOfTwo.d.ts +2 -0
- package/lib/data/data1d/filter1d/utils/padDataToNextPowerOfTwo.js +35 -0
- package/lib/data/data1d/filter1d/zeroFillingAndApodization.d.ts +9 -0
- package/lib/data/data1d/filter1d/zeroFillingAndApodization.js +24 -0
- package/lib/data/data2d/Processing2D.d.ts +3 -3
- package/lib/data/data2d/Processing2D.js +3 -2
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.js +3 -3
- package/lib/data/data2d/Spectrum2D/zones/detectZones.js +3 -3
- package/lib/data/data2d/Spectrum2D/zones/detectZonesManual.js +3 -3
- package/lib/data/data2d/Spectrum2D/zones/getDetectionZones.d.ts +1 -1
- package/lib/data/molecules/Molecule.d.ts +20 -6
- package/lib/data/molecules/Molecule.js +5 -8
- package/lib/data/molecules/MoleculeManager.d.ts +4 -4
- package/lib/data/molecules/MoleculeManager.js +5 -5
- package/lib/data/types/data1d/SumOptions.d.ts +1 -1
- package/lib/data/utilities/generateNumbersPowerOfX.d.ts +0 -1
- package/lib/data/utilities/generateNumbersPowerOfX.js +0 -1
- package/lib/data/utilities/isInRange.d.ts +7 -0
- package/lib/data/utilities/isInRange.js +4 -0
- package/lib/types/NMRiumDataReturn.d.ts +2 -2
- package/lib/types/NMRiumGeneralPreferences.d.ts +0 -2
- package/lib/types/NMRiumToolBarPreferences.d.ts +14 -13
- package/lib/versionInfo.js +1 -1
- package/lib-cjs/component/1d/ApodizationLine.js +77 -0
- package/lib-cjs/component/1d/Chart1D.js +4 -2
- package/lib-cjs/component/1d/ExclusionZoneAnnotation.js +15 -8
- package/lib-cjs/component/1d/FooterBanner.js +3 -1
- package/lib-cjs/component/1d/IntegralResizable.js +4 -3
- package/lib-cjs/component/1d/IntegralsSeries.js +3 -1
- package/lib-cjs/component/1d/LinesSeries.js +6 -4
- package/lib-cjs/component/1d/SpectraTracker.js +1 -1
- package/lib-cjs/component/1d/Viewer1D.js +10 -13
- package/lib-cjs/component/1d/database/DatabaseElements.js +1 -1
- package/lib-cjs/component/1d/database/DatabaseSpectrum.js +2 -2
- package/lib-cjs/component/1d/database/ResurrectedDatabaseRanges.js +2 -2
- package/lib-cjs/component/1d/jCouplingGraph/JGraph.js +5 -1
- package/lib-cjs/component/1d/multiAnalysis/AnalysisRange.js +15 -13
- package/lib-cjs/component/1d/multiAnalysis/MultiAnalysisRanges.js +1 -1
- package/lib-cjs/component/1d/multiplicityTree/MultiplicityTree.js +4 -3
- package/lib-cjs/component/1d/{PeakAnnotation.js → peaks/PeakAnnotation.js} +8 -9
- package/lib-cjs/component/1d/peaks/PeakAnnotations.js +33 -0
- package/lib-cjs/component/1d/peaks/PeaksShapes.js +42 -0
- package/lib-cjs/component/1d/peaks/usePeakShapesPath.js +53 -0
- package/lib-cjs/component/1d/ranges/Range.js +3 -3
- package/lib-cjs/component/1d/ranges/Ranges.js +7 -1
- package/lib-cjs/component/1d/tool/PeakPointer.js +3 -1
- package/lib-cjs/component/1d/tool/XLabelPointer.js +3 -1
- package/lib-cjs/component/2d/Contours.js +3 -1
- package/lib-cjs/component/2d/FooterBanner.js +5 -3
- package/lib-cjs/component/2d/Viewer2D.js +6 -6
- package/lib-cjs/component/2d/XAxis.js +2 -2
- package/lib-cjs/component/2d/YAxis.js +2 -2
- package/lib-cjs/component/2d/tools/XYLabelPointer.js +3 -1
- package/lib-cjs/component/2d/tools/slicing/SlicingView.js +3 -1
- package/lib-cjs/component/2d/zones/IndicationLines.js +1 -1
- package/lib-cjs/component/2d/zones/Signal.js +3 -3
- package/lib-cjs/component/2d/zones/Zone.js +3 -3
- package/lib-cjs/component/2d/zones/Zones.js +13 -18
- package/lib-cjs/component/EventsTrackers/KeysListenerTracker.js +89 -50
- package/lib-cjs/component/NMRium.js +14 -3
- package/lib-cjs/component/context/GlobalContext.js +4 -4
- package/lib-cjs/component/elements/ActiveButton.js +33 -0
- package/lib-cjs/component/elements/Button.js +5 -5
- package/lib-cjs/component/elements/ButtonToolTip.js +1 -1
- package/lib-cjs/component/elements/CheckBox.js +3 -5
- package/lib-cjs/component/elements/Input.js +1 -1
- package/lib-cjs/component/elements/Label.js +3 -3
- package/lib-cjs/component/elements/MoleculeSelection.js +1 -1
- package/lib-cjs/component/elements/NextPrev.js +1 -1
- package/lib-cjs/component/elements/ReactTable/Elements/ReactTableRow.js +1 -1
- package/lib-cjs/component/elements/Select.js +6 -8
- package/lib-cjs/component/elements/Tab/Tab.js +1 -1
- package/lib-cjs/component/elements/Table/Table.js +2 -2
- package/lib-cjs/component/elements/ToggleButton.js +3 -2
- package/lib-cjs/component/elements/accordion/AccordionItem.js +2 -2
- package/lib-cjs/component/elements/formik/FormikOnChange.js +10 -4
- package/lib-cjs/component/elements/popup/Modal/ConfirmDialog.js +1 -1
- package/lib-cjs/component/elements/popup/Modal/Provider.js +8 -11
- package/lib-cjs/component/elements/resizer/DivResizer.js +3 -3
- package/lib-cjs/component/elements/resizer/SVGResizer.js +2 -2
- package/lib-cjs/component/header/ApodizationOptionsPanel.js +110 -0
- package/lib-cjs/component/header/AutoPeakPickingOptionPanel.js +39 -35
- package/lib-cjs/component/header/BaseLineCorrectionPanel.js +82 -49
- package/lib-cjs/component/header/Header.js +5 -2
- package/lib-cjs/component/header/HeaderContainer.js +14 -0
- package/lib-cjs/component/header/ManualPhaseCorrectionPanel.js +26 -28
- package/lib-cjs/component/header/RangesPickingOptionPanel.js +19 -21
- package/lib-cjs/component/header/ZeroFillingOptionsPanel.js +73 -45
- package/lib-cjs/component/header/Zones2DOptionPanel.js +11 -13
- package/lib-cjs/component/highlight/index.js +20 -18
- package/lib-cjs/component/hooks/useActiveSpectrumStyleOptions.js +2 -2
- package/lib-cjs/component/hooks/useCheckToolsVisibility.js +31 -1
- package/lib-cjs/component/hooks/useDatumWithSpectraStatistics.js +3 -1
- package/lib-cjs/component/hooks/useExport.js +0 -16
- package/lib-cjs/component/hooks/useFilter.js +14 -0
- package/lib-cjs/component/hooks/useIntegralPath.js +5 -2
- package/lib-cjs/component/hooks/useNucleus.js +4 -4
- package/lib-cjs/component/hooks/useSpectraPerNucleus.js +1 -1
- package/lib-cjs/component/hooks/useSpectrum.js +3 -1
- package/lib-cjs/component/hooks/useToolsFunctions.js +1 -1
- package/lib-cjs/component/loader/DropZone.js +7 -150
- package/lib-cjs/component/modal/AlignSpectraModal.js +1 -2
- package/lib-cjs/component/modal/EditPeakShapeModal.js +113 -0
- package/lib-cjs/component/modal/MoleculeStructureEditorModal.js +2 -3
- package/lib-cjs/component/modal/MultipleSpectraFiltersModal/index.js +1 -2
- package/lib-cjs/component/modal/PredictSpectraModal.js +1 -1
- package/lib-cjs/component/modal/changeSum/ChangeSumModal.js +9 -11
- package/lib-cjs/component/modal/changeSum/SelectMolecule.js +2 -2
- package/lib-cjs/component/modal/editRange/EditRangeModal.js +3 -3
- package/lib-cjs/component/modal/editRange/forms/components/CouplingsTable.js +3 -8
- package/lib-cjs/component/modal/setting/DatabasesTabContent.js +2 -2
- package/lib-cjs/component/modal/setting/DisplayTabContent.js +1 -1
- package/lib-cjs/component/modal/setting/FormattingTabContent.js +2 -2
- package/lib-cjs/component/modal/setting/GeneralSettings.js +1 -1
- package/lib-cjs/component/modal/setting/ToolsTabContent.js +17 -13
- package/lib-cjs/component/modal/setting/WorkspaceItem.js +2 -2
- package/lib-cjs/component/panels/IntegralsPanel/IntegralPanel.js +1 -1
- package/lib-cjs/component/panels/IntegralsPanel/IntegralTable.js +1 -1
- package/lib-cjs/component/panels/MoleculesPanel/MoleculeHeader.js +3 -3
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanel.js +12 -9
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanelHeader.js +6 -6
- package/lib-cjs/component/panels/MoleculesPanel/useAtomAssignment.js +11 -3
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.js +1 -1
- package/lib-cjs/component/panels/Panels.js +3 -3
- package/lib-cjs/component/panels/PeaksPanel/PeaksPanel.js +45 -20
- package/lib-cjs/component/panels/PeaksPanel/PeaksPreferences.js +17 -0
- package/lib-cjs/component/panels/PeaksPanel/PeaksTable.js +42 -11
- package/lib-cjs/component/panels/RangesPanel/RangesHeader.js +10 -9
- package/lib-cjs/component/panels/RangesPanel/RangesPanel.js +7 -3
- package/lib-cjs/component/panels/RangesPanel/RangesTableRow.js +3 -3
- package/lib-cjs/component/panels/RangesPanel/TableColumns/ActionsColumn.js +1 -1
- package/lib-cjs/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js +2 -1
- package/lib-cjs/component/panels/RangesPanel/hooks/useMapRanges.js +3 -6
- package/lib-cjs/component/panels/SpectrumsPanel/SpectraPanelHeader.js +3 -1
- package/lib-cjs/component/panels/SpectrumsPanel/SpectrumListItem.js +1 -1
- package/lib-cjs/component/panels/SpectrumsPanel/SpectrumsTabs.js +3 -1
- package/lib-cjs/component/panels/SpectrumsPanel/base/ColorIndicator.js +2 -2
- package/lib-cjs/component/panels/SpectrumsPanel/base/ShowHideMarkersButton.js +4 -1
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +4 -4
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/editLink/MoveLink.js +1 -2
- package/lib-cjs/component/panels/SummaryPanel/SummaryPanel.js +2 -3
- package/lib-cjs/component/panels/SummaryPanel/utilities/useInView.js +3 -1
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/ActionsColumn.js +1 -1
- package/lib-cjs/component/panels/ZonesPanel/ZonesPanel.js +18 -9
- package/lib-cjs/component/panels/databasePanel/DatabasePanel.js +5 -13
- package/lib-cjs/component/panels/databasePanel/DatabaseTable.js +2 -2
- package/lib-cjs/component/panels/filtersPanel/FilterPanel.js +1 -1
- package/lib-cjs/component/panels/filtersPanel/FiltersTable.js +2 -2
- package/lib-cjs/component/panels/header/DefaultPanelHeader.js +3 -12
- package/lib-cjs/component/panels/header/SpectraAutomaticPickingButton.js +1 -1
- package/lib-cjs/component/panels/predictionPanel/PredictionOptions.js +2 -2
- package/lib-cjs/component/panels/predictionPanel/PredictionPanel.js +15 -3
- package/lib-cjs/component/reducer/IgnoreActions.js +5 -0
- package/lib-cjs/component/reducer/Reducer.js +72 -50
- package/lib-cjs/component/reducer/actions/DomainActions.js +11 -9
- package/lib-cjs/component/reducer/actions/FiltersActions.js +332 -205
- package/lib-cjs/component/reducer/actions/IntegralsActions.js +15 -10
- package/lib-cjs/component/reducer/actions/LoadActions.js +18 -36
- package/lib-cjs/component/reducer/actions/MoleculeActions.js +49 -19
- package/lib-cjs/component/reducer/actions/PeaksActions.js +54 -12
- package/lib-cjs/component/reducer/actions/PreferencesActions.js +8 -10
- package/lib-cjs/component/reducer/actions/RangesActions.js +87 -29
- package/lib-cjs/component/reducer/actions/SpectraAnalysisAction.js +5 -5
- package/lib-cjs/component/reducer/actions/SpectrumsActions.js +14 -11
- package/lib-cjs/component/reducer/actions/ToolsActions.js +46 -94
- package/lib-cjs/component/reducer/actions/ZonesActions.js +71 -17
- package/lib-cjs/component/reducer/helper/Zoom1DManager.js +2 -1
- package/lib-cjs/component/reducer/helper/getActiveSpectrumOrFail.js +10 -0
- package/lib-cjs/component/reducer/helper/getSpectrum.js +3 -2
- package/lib-cjs/component/reducer/helper/getStrongestPeak.js +19 -0
- package/lib-cjs/component/reducer/preferences/actions/addWorkspace.js +2 -5
- package/lib-cjs/component/reducer/preferences/panelsPreferencesDefaultValues.js +3 -0
- package/lib-cjs/component/reducer/preferences/preferencesReducer.js +1 -1
- package/lib-cjs/component/reducer/types/Types.js +15 -3
- package/lib-cjs/component/tool/BrushX.js +1 -1
- package/lib-cjs/component/tool/BrushXY.js +4 -3
- package/lib-cjs/component/tool/CrossLinePointer.js +5 -4
- package/lib-cjs/component/tool/FloatMoleculeStructures/DraggableStructure.js +21 -6
- package/lib-cjs/component/tool/FloatMoleculeStructures/index.js +19 -6
- package/lib-cjs/component/toolbar/BasicToolBar.js +7 -14
- package/lib-cjs/component/toolbar/FunctionToolBar.js +12 -22
- package/lib-cjs/component/toolbar/ToolTypes.js +119 -9
- package/lib-cjs/component/utility/assert.js +9 -0
- package/lib-cjs/component/workspaces/basic.js +12 -11
- package/lib-cjs/component/workspaces/embedded.js +14 -13
- package/lib-cjs/component/workspaces/exercise.js +10 -6
- package/lib-cjs/component/workspaces/prediction.js +14 -13
- package/lib-cjs/component/workspaces/process1D.js +20 -19
- package/lib-cjs/component/workspaces/workspaceDefaultProperties.js +14 -15
- package/lib-cjs/constants.js +1 -1
- package/lib-cjs/data/Filters.js +3 -3
- package/lib-cjs/data/FiltersManager.js +3 -6
- package/lib-cjs/data/PredictionManager.js +15 -15
- package/lib-cjs/data/SpectraManager.js +5 -100
- package/lib-cjs/data/constants/SignalsKinds.js +0 -8
- package/lib-cjs/data/data1d/Data1DManager.js +5 -5
- package/lib-cjs/data/data1d/Spectrum1D/SumManager.js +18 -12
- package/lib-cjs/data/data1d/Spectrum1D/generateJGraphData.js +2 -5
- package/lib-cjs/data/data1d/Spectrum1D/index.js +3 -1
- package/lib-cjs/data/data1d/Spectrum1D/initiateDatum1D.js +3 -3
- package/lib-cjs/data/data1d/Spectrum1D/integrals/changeIntegralsRelative.js +1 -1
- package/lib-cjs/data/data1d/Spectrum1D/peaks/autoPeakPicking.js +5 -2
- package/lib-cjs/data/data1d/Spectrum1D/peaks/mapPeaks.js +15 -19
- package/lib-cjs/data/data1d/Spectrum1D/peaks/optimizePeaks.js +28 -0
- package/lib-cjs/data/data1d/Spectrum1D/ranges/addRange.js +3 -3
- package/lib-cjs/data/data1d/Spectrum1D/ranges/autoRangesDetection.js +2 -0
- package/lib-cjs/data/data1d/Spectrum1D/ranges/changeRangeRelativeValue.js +1 -1
- package/lib-cjs/data/data1d/Spectrum1D/ranges/detectRange.js +2 -5
- package/lib-cjs/data/data1d/Spectrum1D/ranges/mapRanges.js +3 -6
- package/lib-cjs/data/data1d/database.js +4 -6
- package/lib-cjs/data/data1d/filter1d/apodization.js +70 -0
- package/lib-cjs/data/data1d/filter1d/baselineCorrection.js +11 -18
- package/lib-cjs/data/data1d/filter1d/fft.js +11 -0
- package/lib-cjs/data/data1d/filter1d/utils/padDataToNextPowerOfTwo.js +39 -0
- package/lib-cjs/data/data1d/filter1d/zeroFillingAndApodization.js +30 -0
- package/lib-cjs/data/data2d/Processing2D.js +3 -2
- package/lib-cjs/data/data2d/Spectrum2D/initiateDatum2D.js +3 -6
- package/lib-cjs/data/data2d/Spectrum2D/zones/detectZones.js +3 -6
- package/lib-cjs/data/data2d/Spectrum2D/zones/detectZonesManual.js +3 -6
- package/lib-cjs/data/molecules/Molecule.js +5 -8
- package/lib-cjs/data/molecules/MoleculeManager.js +5 -5
- package/lib-cjs/data/utilities/generateNumbersPowerOfX.js +0 -1
- package/lib-cjs/data/utilities/isInRange.js +7 -0
- package/lib-cjs/versionInfo.js +1 -1
- package/package.json +36 -35
- package/lib/component/1d/PeakAnnotations.js +0 -41
- package/lib/component/utility/nmredataToNmrium.d.ts +0 -4
- package/lib/component/utility/nmredataToNmrium.js +0 -66
- package/lib/component/utility/nmriumToNmredata.d.ts +0 -2
- package/lib/component/utility/nmriumToNmredata.js +0 -80
- package/lib/component/utility/util/nmredata/addRanges.d.ts +0 -1
- package/lib/component/utility/util/nmredata/addRanges.js +0 -52
- package/lib/component/utility/util/nmredata/addSource.d.ts +0 -6
- package/lib/component/utility/util/nmredata/addSource.js +0 -54
- package/lib/component/utility/util/nmredata/addZones.d.ts +0 -1
- package/lib/component/utility/util/nmredata/addZones.js +0 -41
- package/lib/component/utility/util/nmredata/flat2DSignals.d.ts +0 -1
- package/lib/component/utility/util/nmredata/flat2DSignals.js +0 -7
- package/lib/component/utility/util/nmredata/get1DSignals.d.ts +0 -10
- package/lib/component/utility/util/nmredata/get1DSignals.js +0 -96
- package/lib/component/utility/util/nmredata/get2DSignals.d.ts +0 -8
- package/lib/component/utility/util/nmredata/get2DSignals.js +0 -59
- package/lib/component/utility/util/nmredata/getCouplingObserved.d.ts +0 -1
- package/lib/component/utility/util/nmredata/getCouplingObserved.js +0 -11
- package/lib/component/utility/util/nmredata/getLabels.d.ts +0 -9
- package/lib/component/utility/util/nmredata/getLabels.js +0 -66
- package/lib/component/utility/util/nmredata/getToFix.d.ts +0 -1
- package/lib/component/utility/util/nmredata/getToFix.js +0 -19
- package/lib/data/data1d/filter1d/lineBroadening.d.ts +0 -14
- package/lib/data/data1d/filter1d/lineBroadening.js +0 -57
- package/lib/data/migration/MigrationManager.d.ts +0 -2
- package/lib/data/migration/MigrationManager.js +0 -17
- package/lib/data/migration/changeKeys.d.ts +0 -1
- package/lib/data/migration/changeKeys.js +0 -9
- package/lib/data/migration/migrateToVersion1.d.ts +0 -11
- package/lib/data/migration/migrateToVersion1.js +0 -32
- package/lib/data/migration/migrateToVersion2.d.ts +0 -1
- package/lib/data/migration/migrateToVersion2.js +0 -111
- package/lib/data/utilities/generateID.d.ts +0 -1
- package/lib/data/utilities/generateID.js +0 -9
- package/lib-cjs/component/1d/PeakAnnotations.js +0 -46
- package/lib-cjs/component/utility/nmredataToNmrium.js +0 -73
- package/lib-cjs/component/utility/nmriumToNmredata.js +0 -87
- package/lib-cjs/component/utility/util/nmredata/addRanges.js +0 -56
- package/lib-cjs/component/utility/util/nmredata/addSource.js +0 -61
- package/lib-cjs/component/utility/util/nmredata/addZones.js +0 -48
- package/lib-cjs/component/utility/util/nmredata/flat2DSignals.js +0 -11
- package/lib-cjs/component/utility/util/nmredata/get1DSignals.js +0 -100
- package/lib-cjs/component/utility/util/nmredata/get2DSignals.js +0 -63
- package/lib-cjs/component/utility/util/nmredata/getCouplingObserved.js +0 -15
- package/lib-cjs/component/utility/util/nmredata/getLabels.js +0 -70
- package/lib-cjs/component/utility/util/nmredata/getToFix.js +0 -23
- package/lib-cjs/data/data1d/filter1d/lineBroadening.js +0 -63
- package/lib-cjs/data/migration/MigrationManager.js +0 -24
- package/lib-cjs/data/migration/changeKeys.js +0 -13
- package/lib-cjs/data/migration/migrateToVersion1.js +0 -35
- package/lib-cjs/data/migration/migrateToVersion2.js +0 -114
- package/lib-cjs/data/utilities/generateID.js +0 -12
|
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.handleAutoSpectraZonesDetection = exports.changeZonesFactorHandler = exports.handleSetSignalPathLength = exports.handleSetDiaIDZone = exports.handleSaveEditedZone = exports.handleUnlinkZone = exports.handleChangeZoneSignalKind = exports.changeZoneSignalDelta = exports.handleDeleteZone = exports.handleDeleteSignal = exports.handleAutoZonesDetection = exports.add2dZoneHandler = void 0;
|
|
29
|
+
exports.handleShowPeaks = exports.handleShowSignals = exports.handleShowZones = exports.handleAutoSpectraZonesDetection = exports.changeZonesFactorHandler = exports.handleSetSignalPathLength = exports.handleSetDiaIDZone = exports.handleSaveEditedZone = exports.handleUnlinkZone = exports.handleChangeZoneSignalKind = exports.changeZoneSignalDelta = exports.handleDeleteZone = exports.handleDeleteSignal = exports.handleAutoZonesDetection = exports.add2dZoneHandler = void 0;
|
|
30
30
|
const immer_1 = require("immer");
|
|
31
31
|
const cloneDeep_1 = __importDefault(require("lodash/cloneDeep"));
|
|
32
32
|
const nmr_correlation_1 = require("nmr-correlation");
|
|
@@ -35,6 +35,7 @@ const FiltersManager = __importStar(require("../../../data/FiltersManager"));
|
|
|
35
35
|
const SignalsKinds_1 = require("../../../data/constants/SignalsKinds");
|
|
36
36
|
const Spectrum2D_1 = require("../../../data/data2d/Spectrum2D");
|
|
37
37
|
const ZoneUtilities_1 = require("../../../data/utilities/ZoneUtilities");
|
|
38
|
+
const Reducer_1 = require("../Reducer");
|
|
38
39
|
const get2DRange_1 = __importDefault(require("../helper/get2DRange"));
|
|
39
40
|
const CorrelationsActions_1 = require("./CorrelationsActions");
|
|
40
41
|
const DomainActions_1 = require("./DomainActions");
|
|
@@ -43,8 +44,9 @@ function changeZonesFactorHandler(draft, action) {
|
|
|
43
44
|
}
|
|
44
45
|
exports.changeZonesFactorHandler = changeZonesFactorHandler;
|
|
45
46
|
function add2dZoneHandler(draft, action) {
|
|
46
|
-
|
|
47
|
-
|
|
47
|
+
const activeSpectrum = draft.view.spectra.activeSpectra[draft.view.spectra.activeTab];
|
|
48
|
+
if (activeSpectrum?.id) {
|
|
49
|
+
const { index } = activeSpectrum;
|
|
48
50
|
const drawnZone = (0, get2DRange_1.default)(draft, action);
|
|
49
51
|
const datum = draft.data[index];
|
|
50
52
|
const zones = (0, Spectrum2D_1.detectZonesManual)((0, immer_1.original)(datum), {
|
|
@@ -58,8 +60,9 @@ function add2dZoneHandler(draft, action) {
|
|
|
58
60
|
}
|
|
59
61
|
exports.add2dZoneHandler = add2dZoneHandler;
|
|
60
62
|
function handleAutoZonesDetection(draft, detectionOptions) {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
+
const activeSpectrum = draft.view.spectra.activeSpectra[draft.view.spectra.activeTab];
|
|
64
|
+
if (activeSpectrum?.id) {
|
|
65
|
+
const { index } = activeSpectrum;
|
|
63
66
|
const [fromX, toX] = draft.xDomain;
|
|
64
67
|
const [fromY, toY] = draft.yDomain;
|
|
65
68
|
detectionOptions.selectedZone = { fromX, toX, fromY, toY };
|
|
@@ -87,8 +90,9 @@ function handleAutoSpectraZonesDetection(draft) {
|
|
|
87
90
|
exports.handleAutoSpectraZonesDetection = handleAutoSpectraZonesDetection;
|
|
88
91
|
function changeZoneSignalDelta(draft, action) {
|
|
89
92
|
const { zoneID, signal } = action.payload;
|
|
90
|
-
|
|
91
|
-
|
|
93
|
+
const activeSpectrum = draft.view.spectra.activeSpectra[draft.view.spectra.activeTab];
|
|
94
|
+
if (activeSpectrum?.id) {
|
|
95
|
+
const { index } = activeSpectrum;
|
|
92
96
|
const { xShift, yShift } = (0, Spectrum2D_1.changeZoneSignal)(draft.data[index], zoneID, signal);
|
|
93
97
|
let filters = [];
|
|
94
98
|
if (xShift !== 0) {
|
|
@@ -109,8 +113,9 @@ function getZoneIndex(state, spectrumIndex, zoneID) {
|
|
|
109
113
|
}
|
|
110
114
|
function handleChangeZoneSignalKind(draft, action) {
|
|
111
115
|
const state = (0, immer_1.original)(draft);
|
|
112
|
-
|
|
113
|
-
|
|
116
|
+
const activeSpectrum = state.view.spectra.activeSpectra[state.view.spectra.activeTab];
|
|
117
|
+
if (activeSpectrum?.id) {
|
|
118
|
+
const { index } = activeSpectrum;
|
|
114
119
|
const { rowData, value } = action.payload;
|
|
115
120
|
const zoneIndex = getZoneIndex(state, index, rowData.id);
|
|
116
121
|
const _zone = draft.data[index].zones.values[zoneIndex];
|
|
@@ -124,8 +129,9 @@ function handleChangeZoneSignalKind(draft, action) {
|
|
|
124
129
|
exports.handleChangeZoneSignalKind = handleChangeZoneSignalKind;
|
|
125
130
|
function handleDeleteZone(draft, action) {
|
|
126
131
|
const state = (0, immer_1.original)(draft);
|
|
127
|
-
|
|
128
|
-
|
|
132
|
+
const activeSpectrum = state.view.spectra.activeSpectra[state.view.spectra.activeTab];
|
|
133
|
+
if (activeSpectrum?.id) {
|
|
134
|
+
const { index } = activeSpectrum;
|
|
129
135
|
const { id, assignmentData } = action.payload;
|
|
130
136
|
if (id) {
|
|
131
137
|
const zone = draft.data[index].zones.values.find((zone) => zone.id === id);
|
|
@@ -181,8 +187,9 @@ function handleSetSignalPathLength(draft, action) {
|
|
|
181
187
|
exports.handleSetSignalPathLength = handleSetSignalPathLength;
|
|
182
188
|
function handleUnlinkZone(draft, action) {
|
|
183
189
|
const state = (0, immer_1.original)(draft);
|
|
184
|
-
|
|
185
|
-
|
|
190
|
+
const activeSpectrum = state.view.spectra.activeSpectra[state.view.spectra.activeTab];
|
|
191
|
+
if (activeSpectrum?.id) {
|
|
192
|
+
const { index } = activeSpectrum;
|
|
186
193
|
const { zoneData = null, assignmentData, isOnZoneLevel = undefined, signalIndex = -1, axis = undefined, } = action.payload;
|
|
187
194
|
if (zoneData) {
|
|
188
195
|
// remove assignments in global state
|
|
@@ -204,8 +211,9 @@ function handleUnlinkZone(draft, action) {
|
|
|
204
211
|
exports.handleUnlinkZone = handleUnlinkZone;
|
|
205
212
|
function handleSetDiaIDZone(draft, action) {
|
|
206
213
|
const state = (0, immer_1.original)(draft);
|
|
207
|
-
|
|
208
|
-
|
|
214
|
+
const activeSpectrum = state.view.spectra.activeSpectra[state.view.spectra.activeTab];
|
|
215
|
+
if (activeSpectrum?.id) {
|
|
216
|
+
const { index } = activeSpectrum;
|
|
209
217
|
const { zoneData, diaIDs, axis, signalIndex, nbAtoms } = action.payload;
|
|
210
218
|
const getNbAtoms = (input, current = 0) => input + current;
|
|
211
219
|
const zoneIndex = getZoneIndex(state, index, zoneData.id);
|
|
@@ -223,8 +231,9 @@ function handleSetDiaIDZone(draft, action) {
|
|
|
223
231
|
exports.handleSetDiaIDZone = handleSetDiaIDZone;
|
|
224
232
|
function handleSaveEditedZone(draft, action) {
|
|
225
233
|
const state = (0, immer_1.original)(draft);
|
|
226
|
-
|
|
227
|
-
|
|
234
|
+
const activeSpectrum = state.view.spectra.activeSpectra[state.view.spectra.activeTab];
|
|
235
|
+
if (activeSpectrum?.id) {
|
|
236
|
+
const { index } = activeSpectrum;
|
|
228
237
|
const { editedRowData } = action.payload;
|
|
229
238
|
delete editedRowData.tableMetaInfo;
|
|
230
239
|
const zoneIndex = getZoneIndex(state, index, editedRowData.id);
|
|
@@ -238,6 +247,51 @@ function handleSaveEditedZone(draft, action) {
|
|
|
238
247
|
}
|
|
239
248
|
}
|
|
240
249
|
exports.handleSaveEditedZone = handleSaveEditedZone;
|
|
250
|
+
function handleShowZones(draft, action) {
|
|
251
|
+
const { id } = action.payload;
|
|
252
|
+
const zone = draft.view.zones.find((r) => r.spectrumID === id);
|
|
253
|
+
if (zone) {
|
|
254
|
+
zone.showZones = !zone.showZones;
|
|
255
|
+
}
|
|
256
|
+
else {
|
|
257
|
+
draft.view.zones.push({
|
|
258
|
+
spectrumID: id,
|
|
259
|
+
...Reducer_1.zoneStateInit,
|
|
260
|
+
showZones: !Reducer_1.zoneStateInit.showZones,
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
exports.handleShowZones = handleShowZones;
|
|
265
|
+
function handleShowSignals(draft, action) {
|
|
266
|
+
const { id } = action.payload;
|
|
267
|
+
const zone = draft.view.zones.find((r) => r.spectrumID === id);
|
|
268
|
+
if (zone) {
|
|
269
|
+
zone.showSignals = !zone.showSignals;
|
|
270
|
+
}
|
|
271
|
+
else {
|
|
272
|
+
draft.view.zones.push({
|
|
273
|
+
spectrumID: id,
|
|
274
|
+
...Reducer_1.zoneStateInit,
|
|
275
|
+
showSignals: !Reducer_1.zoneStateInit.showSignals,
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
exports.handleShowSignals = handleShowSignals;
|
|
280
|
+
function handleShowPeaks(draft, action) {
|
|
281
|
+
const { id } = action.payload;
|
|
282
|
+
const zone = draft.view.zones.find((r) => r.spectrumID === id);
|
|
283
|
+
if (zone) {
|
|
284
|
+
zone.showPeaks = !zone.showPeaks;
|
|
285
|
+
}
|
|
286
|
+
else {
|
|
287
|
+
draft.view.zones.push({
|
|
288
|
+
spectrumID: id,
|
|
289
|
+
...Reducer_1.zoneStateInit,
|
|
290
|
+
showPeaks: !Reducer_1.zoneStateInit.showPeaks,
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
exports.handleShowPeaks = handleShowPeaks;
|
|
241
295
|
function handleOnChangeZonesData(draft) {
|
|
242
296
|
(0, CorrelationsActions_1.handleUpdateCorrelations)(draft);
|
|
243
297
|
}
|
|
@@ -18,7 +18,8 @@ function wheelZoom(event, domain, zoomOptions = {}) {
|
|
|
18
18
|
}
|
|
19
19
|
exports.wheelZoom = wheelZoom;
|
|
20
20
|
function setZoom(draft, options = {}) {
|
|
21
|
-
const { height, margin
|
|
21
|
+
const { height, margin } = draft;
|
|
22
|
+
const activeSpectrum = draft.view.spectra.activeSpectra[draft.view.spectra.activeTab];
|
|
22
23
|
const { scale = 1, spectrumID = null } = options;
|
|
23
24
|
if (activeSpectrum === null && spectrumID === null) {
|
|
24
25
|
const { shareYDomain, yDomain, yDomains } = draft.originDomain;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getActiveSpectrumOrFail = void 0;
|
|
4
|
+
const assert_1 = require("../../utility/assert");
|
|
5
|
+
function getActiveSpectrumOrFail(draft) {
|
|
6
|
+
const activeSpectrum = draft.view.spectra.activeSpectra[draft.view.spectra.activeTab];
|
|
7
|
+
(0, assert_1.assert)(activeSpectrum !== null, 'Active spectrum must have id');
|
|
8
|
+
return activeSpectrum;
|
|
9
|
+
}
|
|
10
|
+
exports.getActiveSpectrumOrFail = getActiveSpectrumOrFail;
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getSpectrum = void 0;
|
|
4
4
|
function getSpectrum(state, value) {
|
|
5
|
+
const activeSpectrum = state.view.spectra.activeSpectra[state.view.spectra.activeTab];
|
|
5
6
|
if (value === undefined) {
|
|
6
|
-
if (
|
|
7
|
-
const index =
|
|
7
|
+
if (activeSpectrum?.id) {
|
|
8
|
+
const index = activeSpectrum.index;
|
|
8
9
|
return state.data[index];
|
|
9
10
|
}
|
|
10
11
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getStrongestPeak = void 0;
|
|
4
|
+
const d3_1 = require("d3");
|
|
5
|
+
function getStrongestPeak(draft) {
|
|
6
|
+
const { data } = draft;
|
|
7
|
+
const activeSpectrum = draft.view.spectra.activeSpectra[draft.view.spectra.activeTab];
|
|
8
|
+
if (activeSpectrum) {
|
|
9
|
+
const activeData = data[activeSpectrum?.index].data;
|
|
10
|
+
const strongestPeakValue = (0, d3_1.max)(activeData.re);
|
|
11
|
+
const index = activeData.re.findIndex((val) => val === strongestPeakValue);
|
|
12
|
+
return {
|
|
13
|
+
xValue: activeData.x[index],
|
|
14
|
+
yValue: strongestPeakValue,
|
|
15
|
+
index,
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.getStrongestPeak = getStrongestPeak;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.addWorkspace = void 0;
|
|
7
|
-
const
|
|
4
|
+
const uuid_1 = require("@lukeed/uuid");
|
|
8
5
|
const LocalStorage_1 = require("../../../utility/LocalStorage");
|
|
9
6
|
function addWorkspace(draft, action) {
|
|
10
7
|
const { workspace: workspaceName, data: { display, general, formatting, databases }, } = action.payload;
|
|
@@ -16,7 +13,7 @@ function addWorkspace(draft, action) {
|
|
|
16
13
|
formatting,
|
|
17
14
|
databases,
|
|
18
15
|
};
|
|
19
|
-
const newWorkspaceKey = (0,
|
|
16
|
+
const newWorkspaceKey = (0, uuid_1.v4)();
|
|
20
17
|
const localData = (0, LocalStorage_1.getLocalStorage)('nmr-general-settings');
|
|
21
18
|
localData.workspaces[newWorkspaceKey] = newWorkSpace;
|
|
22
19
|
(0, LocalStorage_1.storeData)('nmr-general-settings', JSON.stringify(localData));
|
|
@@ -42,6 +42,9 @@ const getPeaksDefaultValues = (nucleus) => {
|
|
|
42
42
|
deltaHz: { show: false, format: '0.00' },
|
|
43
43
|
peakWidth: { show: false, format: '0.00' },
|
|
44
44
|
intensity: { show: true, format: '0.00' },
|
|
45
|
+
showKind: true,
|
|
46
|
+
fwhm: { show: true, format: '0.00000' },
|
|
47
|
+
mu: { show: false, format: '0.00000' },
|
|
45
48
|
};
|
|
46
49
|
return getPreferences(preferences, nucleus);
|
|
47
50
|
};
|
|
@@ -13,7 +13,7 @@ const removeWorkspace_1 = require("./actions/removeWorkspace");
|
|
|
13
13
|
const setPanelsPreferences_1 = require("./actions/setPanelsPreferences");
|
|
14
14
|
const setPreferences_1 = require("./actions/setPreferences");
|
|
15
15
|
const setWorkspace_1 = require("./actions/setWorkspace");
|
|
16
|
-
const LOCAL_STORAGE_VERSION =
|
|
16
|
+
const LOCAL_STORAGE_VERSION = 10;
|
|
17
17
|
exports.WORKSPACES = [
|
|
18
18
|
{
|
|
19
19
|
key: 'default',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
5
|
-
exports.SET_AUTOMATIC_ASSIGNMENTS = exports.SHOW_J_GRAPH = exports.RESURRECTING_SPECTRUM_FROM_JCAMP = exports.RESURRECTING_SPECTRUM_FROM_RANGES = exports.GENERATE_SPECTRUM_FROM_PUBLICATION_STRING = exports.AUTO_ZONES_SPECTRA_PICKING = exports.AUTO_RANGES_SPECTRA_PICKING = exports.SHOW_RANGES_INTEGRALS = exports.SHOW_MULTIPLICTY_TREES = exports.UPDATE_RANGE = exports.CHANGE_ZONES_NOISE_FACTOR = exports.CHANGE_INTEGRALS_SUM_FLAG = exports.CHANGE_RANGES_SUM_FLAG = exports.DELETE_EXCLUSION_ZONE = exports.ADD_EXCLUSION_ZONE = exports.APPLY_MULTIPLE_SPECTRA_FILTER = exports.SET_MOUSE_OVER_DISPLAYER = exports.RESET_SPECTRA_SCALE = exports.SET_SPECTRA_SAME_TOP = exports.PREDICT_SPECTRA = exports.SET_DIAID_ZONE = exports.UNLINK_ZONE = void 0;
|
|
3
|
+
exports.DELETE_FILTER = exports.ENABLE_FILTER = exports.RESET_DOMAIN = exports.BRUSH_END = exports.RESIZE_INTEGRAL = exports.CHANGE_SPECTRUM_DISPLAY_VIEW_MODE = exports.DELETE_SPECTRA = exports.SET_CORRELATIONS_TOLERANCE = exports.SET_CORRELATIONS_MF = exports.DELETE_CORRELATION = exports.SET_CORRELATIONS = exports.SET_CORRELATION = exports.CHANGE_MOLECULE_LABEL = exports.CHANGE_FLOAT_MOLECULE_POSITION = exports.FLOAT_MOLECULE_OVER_SPECTRUM = exports.DELETE_MOLECULE = exports.SET_MOLECULE = exports.ADD_MOLECULE = exports.SET_ZOOM = exports.TOGGLE_REAL_IMAGINARY_VISIBILITY = exports.DELETE_INTEGRAL = exports.ADD_INTEGRAL = exports.CHANGE_SPECTRUM_COLOR = exports.CHANGE_ACTIVE_SPECTRUM = exports.CHANGE_PEAKS_MARKERS_VISIBILITY = exports.CHANGE_VISIBILITY = exports.FULL_ZOOM_OUT = exports.CHANGE_SPECTRUM_TYPE = exports.CHANGE_SPECTRUM_SETTING = exports.SET_SELECTED_FILTER = exports.SET_SELECTED_TOOL = exports.SET_DIMENSIONS = exports.SET_WIDTH = exports.SET_ORIGINAL_DOMAIN = exports.SET_Y_DOMAIN = exports.SET_X_DOMAIN = exports.SHIFT_SPECTRUM = exports.DELETE_PEAK_NOTATION = exports.CHANGE_PEAK_SHAPE = exports.ADD_PEAKS = exports.ADD_PEAK = exports.LOAD_DROP_FILES = exports.LOAD_JDF_FILE = exports.LOAD_ZIP_FILE = exports.LOAD_MOL_FILE = exports.LOAD_NMREDATA_FILE = exports.LOAD_JCAMP_FILE = exports.LOAD_JSON_FILE = exports.SAVE_DATA_AS_JSON = exports.INITIATE = void 0;
|
|
4
|
+
exports.ANALYZE_SPECTRA = exports.CHANGE_INTEGRAL_RELATIVE = exports.SET_DIAID_RANGE = exports.UNLINK_RANGE = exports.SAVE_EDITED_RANGE = exports.CHANGE_RANGE_SIGNAL_KIND = exports.CHANGE_RANGE_SIGNAL_VALUE = exports.CHANGE_RANGE_RELATIVE = exports.SET_FILTER_SNAPSHOT = exports.ADD_MISSING_PROJECTION = exports.SET_2D_SIGNAL_PATH_LENGTH = exports.DELETE_2D_SIGNAL = exports.DELETE_2D_ZONE = exports.ADD_2D_ZONE = exports.SET_2D_LEVEL = exports.ADD_RANGE = exports.CHANGE_RANGE_SUM = exports.RESIZE_RANGE = exports.APPLY_KEY_PREFERENCES = exports.SET_KEY_PREFERENCES = exports.APPLY_BASE_LINE_CORRECTION_FILTER = exports.DELETE_BASE_LINE_ZONE = exports.ADD_BASE_LINE_ZONE = exports.CHANGE_INTEGRAL_SUM = exports.SET_ACTIVE_TAB = exports.CHANGE_INTEGRAL_DATA = exports.SAVE_AS_SVG = exports.SET_SPECTRUMS_VERTICAL_ALIGN = exports.RESET_SELECTED_TOOL = exports.SET_LOADING_FLAG = exports.SET_SELECTED_OPTIONS_PANEL = exports.DELETE_1D_SIGNAL = exports.DELETE_RANGE = exports.AUTO_ZONES_DETECTION = exports.AUTO_RANGES_DETECTION = exports.OPTIMIZE_PEAKS = exports.AUTO_PEAK_PICKING = exports.SET_VERTICAL_INDICATOR_X_POSITION = exports.DISABLE_FILTER_LIVE_PREVIEW = exports.APPLY_ABSOLUTE_FILTER = exports.APPLY_AUTO_PHASE_CORRECTION_FILTER = exports.APPLY_MANUAL_PHASE_CORRECTION_FILTER = exports.CALCULATE_ZERO_FILLING_FILTER = exports.CALCULATE_APODIZATION_FILTER = exports.CALCULATE_BASE_LINE_CORRECTION_FILTER = exports.CALCULATE_MANUAL_PHASE_CORRECTION_FILTER = exports.APPLY_FFT_FILTER = exports.APPLY_APODIZATION_FILTER = exports.APPLY_ZERO_FILLING_FILTER = exports.DELETE_SPECTRA_FILTER = void 0;
|
|
5
|
+
exports.TOGGLE_PEAKS_SHAPES = exports.SET_AUTOMATIC_ASSIGNMENTS = exports.SHOW_J_GRAPH = exports.RESURRECTING_SPECTRUM_FROM_JCAMP = exports.RESURRECTING_SPECTRUM_FROM_RANGES = exports.GENERATE_SPECTRUM_FROM_PUBLICATION_STRING = exports.SHOW_ZONES_PEAKS = exports.SHOW_ZONES_SIGNALS = exports.SHOW_ZONES = exports.AUTO_ZONES_SPECTRA_PICKING = exports.AUTO_RANGES_SPECTRA_PICKING = exports.SHOW_RANGES_INTEGRALS = exports.SHOW_MULTIPLICTY_TREES = exports.UPDATE_RANGE = exports.CHANGE_ZONES_NOISE_FACTOR = exports.CHANGE_INTEGRALS_SUM_FLAG = exports.CHANGE_RANGES_SUM_FLAG = exports.DELETE_EXCLUSION_ZONE = exports.ADD_EXCLUSION_ZONE = exports.APPLY_MULTIPLE_SPECTRA_FILTER = exports.SET_MOUSE_OVER_DISPLAYER = exports.RESET_SPECTRA_SCALE = exports.SET_SPECTRA_SAME_TOP = exports.PREDICT_SPECTRA = exports.SET_DIAID_ZONE = exports.UNLINK_ZONE = exports.SAVE_EDITED_ZONE = exports.CHANGE_ZONE_SIGNAL_KIND = exports.CHANGE_ZONE_SIGNAL_VALUE = exports.ALIGN_SPECTRA = exports.FILTER_SPECTRA_COLUMN = exports.SET_ANALYZE_SPECTRA_COLUMNS = exports.RESIZE_ANALYZE_SPECTRA_RANGE = exports.DELETE_ANALYZE_SPECTRA_RANGE = void 0;
|
|
6
6
|
exports.INITIATE = 'INITIATE';
|
|
7
7
|
exports.SAVE_DATA_AS_JSON = 'SAVE_DATA_AS_JSON';
|
|
8
8
|
exports.LOAD_JSON_FILE = 'LOAD_JSON_FILE';
|
|
@@ -11,8 +11,10 @@ exports.LOAD_NMREDATA_FILE = 'LOAD_NMREDATA_FILE';
|
|
|
11
11
|
exports.LOAD_MOL_FILE = 'LOAD_MOL_FILE';
|
|
12
12
|
exports.LOAD_ZIP_FILE = 'LOAD_ZIP_FILE';
|
|
13
13
|
exports.LOAD_JDF_FILE = 'LOAD_JDF_FILE';
|
|
14
|
+
exports.LOAD_DROP_FILES = 'LOAD_DROP_FILES';
|
|
14
15
|
exports.ADD_PEAK = 'ADD_PEAK';
|
|
15
16
|
exports.ADD_PEAKS = 'ADD_PEAKS';
|
|
17
|
+
exports.CHANGE_PEAK_SHAPE = 'CHANGE_PEAK_SHAPE';
|
|
16
18
|
exports.DELETE_PEAK_NOTATION = 'DELETE_PEAK_NOTATION';
|
|
17
19
|
exports.SHIFT_SPECTRUM = 'SHIFT_SPECTRUM';
|
|
18
20
|
exports.SET_X_DOMAIN = 'SET_X_DOMAIN';
|
|
@@ -37,6 +39,7 @@ exports.ADD_MOLECULE = 'ADD_MOLECULE';
|
|
|
37
39
|
exports.SET_MOLECULE = 'SET_MOLECULE';
|
|
38
40
|
exports.DELETE_MOLECULE = 'DELETE_MOLECULE';
|
|
39
41
|
exports.FLOAT_MOLECULE_OVER_SPECTRUM = 'FLOAT_MOLECULE_OVER_SPECTRUM';
|
|
42
|
+
exports.CHANGE_FLOAT_MOLECULE_POSITION = 'CHANGE_FLOAT_MOLECULE_POSITION';
|
|
40
43
|
exports.CHANGE_MOLECULE_LABEL = 'CHANGE_MOLECULE_LABEL';
|
|
41
44
|
exports.SET_CORRELATION = 'SET_CORRELATION';
|
|
42
45
|
exports.SET_CORRELATIONS = 'SET_CORRELATIONS';
|
|
@@ -52,14 +55,19 @@ exports.ENABLE_FILTER = 'ENABLE_FILTER';
|
|
|
52
55
|
exports.DELETE_FILTER = 'DELETE_FILTER';
|
|
53
56
|
exports.DELETE_SPECTRA_FILTER = 'DELETE_SPECTRA_FILTER';
|
|
54
57
|
exports.APPLY_ZERO_FILLING_FILTER = 'APPLY_ZERO_FILLING_FILTER';
|
|
58
|
+
exports.APPLY_APODIZATION_FILTER = 'APPLY_APODIZATION_FILTER';
|
|
55
59
|
exports.APPLY_FFT_FILTER = 'APPLY_FFT_FILTER';
|
|
56
60
|
exports.CALCULATE_MANUAL_PHASE_CORRECTION_FILTER = 'CALCULATE_MANUAL_PHASE_CORRECTION_FILTER';
|
|
57
61
|
exports.CALCULATE_BASE_LINE_CORRECTION_FILTER = 'CALCULATE_BASE_LINE_CORRECTION_FILTER';
|
|
62
|
+
exports.CALCULATE_APODIZATION_FILTER = 'CALCULATE_APODIZATION_FILTER`';
|
|
63
|
+
exports.CALCULATE_ZERO_FILLING_FILTER = 'CALCULATE_ZERO_FILLING_FILTER`';
|
|
58
64
|
exports.APPLY_MANUAL_PHASE_CORRECTION_FILTER = 'APPLY_MANUAL_PHASE_CORRECTION_FILTER';
|
|
59
65
|
exports.APPLY_AUTO_PHASE_CORRECTION_FILTER = 'APPLY_AUTO_PHASE_CORRECTION_FILTER';
|
|
60
66
|
exports.APPLY_ABSOLUTE_FILTER = 'APPLY_ABSOLUTE_FILTER';
|
|
67
|
+
exports.DISABLE_FILTER_LIVE_PREVIEW = 'DISABLE_FILTER_LIVE_PREVIEW`';
|
|
61
68
|
exports.SET_VERTICAL_INDICATOR_X_POSITION = 'SET_VERTICAL_INDICATOR_X_POSITION';
|
|
62
69
|
exports.AUTO_PEAK_PICKING = 'AUTO_PEAK_PICKING';
|
|
70
|
+
exports.OPTIMIZE_PEAKS = 'OPTIMIZE_PEAKS';
|
|
63
71
|
exports.AUTO_RANGES_DETECTION = 'AUTO_RANGES_DETECTION';
|
|
64
72
|
exports.AUTO_ZONES_DETECTION = 'AUTO_ZONES_DETECTION';
|
|
65
73
|
exports.DELETE_RANGE = 'DELETE_RANGE';
|
|
@@ -120,8 +128,12 @@ exports.SHOW_MULTIPLICTY_TREES = 'SHOW_MULTIPLICTY_TREES';
|
|
|
120
128
|
exports.SHOW_RANGES_INTEGRALS = 'SHOW_RANGES_INTEGRALS';
|
|
121
129
|
exports.AUTO_RANGES_SPECTRA_PICKING = 'AUTO_RANGES_SPECTRA_PICKING';
|
|
122
130
|
exports.AUTO_ZONES_SPECTRA_PICKING = 'AUTO_ZONES_SPECTRA_PICKING';
|
|
131
|
+
exports.SHOW_ZONES = 'SHOW_ZONES';
|
|
132
|
+
exports.SHOW_ZONES_SIGNALS = 'SHOW_ZONES_SIGNALS';
|
|
133
|
+
exports.SHOW_ZONES_PEAKS = 'SHOW_ZONES_PEAKS';
|
|
123
134
|
exports.GENERATE_SPECTRUM_FROM_PUBLICATION_STRING = 'GENERATE_SPECTRUM_FROM_PUBLICATION_STRING';
|
|
124
135
|
exports.RESURRECTING_SPECTRUM_FROM_RANGES = 'RESURRECTING_SPECTRUM_FROM_RANGES';
|
|
125
136
|
exports.RESURRECTING_SPECTRUM_FROM_JCAMP = 'RESURRECTING_SPECTRUM_FROM_JCAMP';
|
|
126
137
|
exports.SHOW_J_GRAPH = 'SHOW_J_GRAPH';
|
|
127
138
|
exports.SET_AUTOMATIC_ASSIGNMENTS = 'SET_AUTOMATIC_ASSIGNMENTS';
|
|
139
|
+
exports.TOGGLE_PEAKS_SHAPES = 'TOGGLE_PEAKS_SHAPES';
|
|
@@ -20,7 +20,7 @@ const allowTools = [
|
|
|
20
20
|
ToolTypes_1.options.integral.id,
|
|
21
21
|
ToolTypes_1.options.phaseCorrection.id,
|
|
22
22
|
ToolTypes_1.options.baselineCorrection.id,
|
|
23
|
-
ToolTypes_1.options.
|
|
23
|
+
ToolTypes_1.options.rangePicking.id,
|
|
24
24
|
ToolTypes_1.options.exclusionZones.id,
|
|
25
25
|
];
|
|
26
26
|
function BrushX() {
|
|
@@ -17,14 +17,15 @@ const styles = {
|
|
|
17
17
|
};
|
|
18
18
|
const allowTools = [
|
|
19
19
|
ToolTypes_1.options.zoom.id,
|
|
20
|
+
ToolTypes_1.options.apodization.id,
|
|
20
21
|
ToolTypes_1.options.zeroFilling.id,
|
|
21
22
|
ToolTypes_1.options.peakPicking.id,
|
|
22
23
|
ToolTypes_1.options.integral.id,
|
|
23
24
|
ToolTypes_1.options.phaseCorrection.id,
|
|
24
25
|
ToolTypes_1.options.baselineCorrection.id,
|
|
25
|
-
ToolTypes_1.options.
|
|
26
|
-
ToolTypes_1.options.
|
|
27
|
-
ToolTypes_1.options.
|
|
26
|
+
ToolTypes_1.options.rangePicking.id,
|
|
27
|
+
ToolTypes_1.options.zonePicking.id,
|
|
28
|
+
ToolTypes_1.options.slicing.id,
|
|
28
29
|
ToolTypes_1.options.editRange.id,
|
|
29
30
|
ToolTypes_1.options.multipleSpectraAnalysis.id,
|
|
30
31
|
ToolTypes_1.options.exclusionZones.id,
|
|
@@ -17,12 +17,13 @@ const styles = {
|
|
|
17
17
|
};
|
|
18
18
|
const allowTools = [
|
|
19
19
|
ToolTypes_1.options.zoom.id,
|
|
20
|
-
ToolTypes_1.options.
|
|
20
|
+
ToolTypes_1.options.apodization.id,
|
|
21
|
+
ToolTypes_1.options.equalizer.id,
|
|
21
22
|
ToolTypes_1.options.baselineCorrection.id,
|
|
22
|
-
ToolTypes_1.options.
|
|
23
|
-
ToolTypes_1.options.
|
|
23
|
+
ToolTypes_1.options.zonePicking.id,
|
|
24
|
+
ToolTypes_1.options.slicing.id,
|
|
24
25
|
ToolTypes_1.options.integral.id,
|
|
25
|
-
ToolTypes_1.options.
|
|
26
|
+
ToolTypes_1.options.rangePicking.id,
|
|
26
27
|
ToolTypes_1.options.editRange.id,
|
|
27
28
|
ToolTypes_1.options.multipleSpectraAnalysis.id,
|
|
28
29
|
ToolTypes_1.options.exclusionZones.id,
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.DraggableStructure = void 0;
|
|
6
|
+
exports.DraggableStructure = exports.DRAGGABLE_STRUCTURE_INITIAL_POSITION = void 0;
|
|
7
7
|
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
8
8
|
/** @jsxImportSource @emotion/react */
|
|
9
9
|
const react_1 = require("@emotion/react");
|
|
@@ -31,9 +31,9 @@ const style = (0, react_1.css) `
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
`;
|
|
34
|
+
exports.DRAGGABLE_STRUCTURE_INITIAL_POSITION = { x: 100, y: 50 };
|
|
34
35
|
function DraggableStructure(props) {
|
|
35
|
-
const { zones, ranges, molecule, activeTab, displayerMode, index } = props;
|
|
36
|
-
const [molfile, setMolFile] = (0, react_2.useState)(molecule.molfile);
|
|
36
|
+
const { zones, ranges, molecule, activeTab, displayerMode, index, position = exports.DRAGGABLE_STRUCTURE_INITIAL_POSITION, } = props;
|
|
37
37
|
const { viewerRef } = (0, GlobalContext_1.useGlobal)();
|
|
38
38
|
const dispatch = (0, DispatchContext_1.useDispatch)();
|
|
39
39
|
const openMoleculeEditor = (0, MoleculeStructureEditorModal_1.useMoleculeEditor)();
|
|
@@ -41,11 +41,26 @@ function DraggableStructure(props) {
|
|
|
41
41
|
const floatMoleculeHandler = (0, react_2.useCallback)(() => {
|
|
42
42
|
dispatch({
|
|
43
43
|
type: Types_1.FLOAT_MOLECULE_OVER_SPECTRUM,
|
|
44
|
-
payload: {
|
|
44
|
+
payload: { id: molecule.id },
|
|
45
45
|
});
|
|
46
46
|
}, [dispatch, molecule]);
|
|
47
|
-
|
|
47
|
+
const dragFloatMoleculeHandler = (0, react_2.useCallback)((position) => {
|
|
48
|
+
dispatch({
|
|
49
|
+
type: Types_1.CHANGE_FLOAT_MOLECULE_POSITION,
|
|
50
|
+
payload: { id: molecule.id, position },
|
|
51
|
+
});
|
|
52
|
+
}, [dispatch, molecule]);
|
|
53
|
+
return ((0, jsx_runtime_1.jsx)(SVGDraggable_1.default, { width: 150, height: 100, initialPosition: position, dragHandleClassName: "handle", parentElement: viewerRef, onEnd: dragFloatMoleculeHandler, children: (width, height) => ((0, jsx_runtime_1.jsxs)("foreignObject", { width: width, height: height + 30, "data-replace-float-structure": "true", css: style, onDoubleClick: () => openMoleculeEditor(molecule), children: [(0, jsx_runtime_1.jsx)(ActionsButton_1.default, { onFloatBtnClick: floatMoleculeHandler }), (0, jsx_runtime_1.jsx)(react_ocl_nmr_1.default, { OCL: full_1.default, autoCrop: true, id: `molSVG${index || ''}`, width: width - 20, height: height, molfile: molecule.molfile, setSelectedAtom: handleOnClickAtom, atomHighlightColor: currentDiaIDsToHighlight?.length > 0 ? 'red' : '#FFD700', atomHighlightOpacity: 0.35, highlights: currentDiaIDsToHighlight?.length > 0
|
|
48
54
|
? currentDiaIDsToHighlight
|
|
49
|
-
: assignedDiaIDsMerged, setHoverAtom: handleOnAtomHover, setMolfile:
|
|
55
|
+
: assignedDiaIDsMerged, setHoverAtom: handleOnAtomHover, setMolfile: (molfile) => {
|
|
56
|
+
dispatch({
|
|
57
|
+
type: Types_1.SET_MOLECULE,
|
|
58
|
+
payload: {
|
|
59
|
+
molfile,
|
|
60
|
+
id: molecule.id,
|
|
61
|
+
label: molecule.label,
|
|
62
|
+
},
|
|
63
|
+
});
|
|
64
|
+
} })] })) }, molecule.id));
|
|
50
65
|
}
|
|
51
66
|
exports.DraggableStructure = DraggableStructure;
|
|
@@ -8,24 +8,37 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
8
8
|
const react_1 = require("react");
|
|
9
9
|
const ChartContext_1 = require("../../context/ChartContext");
|
|
10
10
|
const useSpectrum_1 = __importDefault(require("../../hooks/useSpectrum"));
|
|
11
|
+
const assert_1 = require("../../utility/assert");
|
|
11
12
|
const DraggableStructure_1 = require("./DraggableStructure");
|
|
12
13
|
function FloatMoleculeStructuresInner(props) {
|
|
13
|
-
const { zones, ranges, molecules, activeTab, displayerMode } = props;
|
|
14
|
-
if (!
|
|
14
|
+
const { zones, ranges, floatingMolecules, molecules, activeTab, displayerMode, } = props;
|
|
15
|
+
if (!floatingMolecules || floatingMolecules.length === 0)
|
|
15
16
|
return null;
|
|
16
|
-
return ((0, jsx_runtime_1.jsx)("g", { children:
|
|
17
|
-
.filter((molecule) => molecule.
|
|
18
|
-
.map((
|
|
17
|
+
return ((0, jsx_runtime_1.jsx)("g", { children: floatingMolecules
|
|
18
|
+
.filter((molecule) => molecule.visible)
|
|
19
|
+
.map(({ id, position }) => {
|
|
20
|
+
const molecule = molecules.find((m) => m.id === id);
|
|
21
|
+
(0, assert_1.assert)(molecule !== undefined, 'molecule should be defined');
|
|
22
|
+
return ((0, jsx_runtime_1.jsx)(DraggableStructure_1.DraggableStructure, { ...{
|
|
23
|
+
zones,
|
|
24
|
+
ranges,
|
|
25
|
+
activeTab,
|
|
26
|
+
displayerMode,
|
|
27
|
+
position,
|
|
28
|
+
molecule,
|
|
29
|
+
} }, id));
|
|
30
|
+
}) }));
|
|
19
31
|
}
|
|
20
32
|
exports.FloatMoleculeStructuresInner = FloatMoleculeStructuresInner;
|
|
21
33
|
const MemoizedFloatMoleculeStructures = (0, react_1.memo)(FloatMoleculeStructuresInner);
|
|
22
34
|
const emptyData = { ranges: {}, zones: {} };
|
|
23
35
|
function FloatMoleculeStructures() {
|
|
24
|
-
const { molecules, displayerMode, activeTab } = (0, ChartContext_1.useChartData)();
|
|
36
|
+
const { molecules, displayerMode, view: { floatingMolecules, spectra: { activeTab }, }, } = (0, ChartContext_1.useChartData)();
|
|
25
37
|
const data = (0, useSpectrum_1.default)(emptyData);
|
|
26
38
|
const ranges = data?.ranges || {};
|
|
27
39
|
const zones = data?.zones || {};
|
|
28
40
|
return ((0, jsx_runtime_1.jsx)(MemoizedFloatMoleculeStructures, { ...{
|
|
41
|
+
floatingMolecules,
|
|
29
42
|
molecules,
|
|
30
43
|
displayerMode,
|
|
31
44
|
activeTab,
|
|
@@ -21,7 +21,7 @@ const useExport_1 = __importDefault(require("../hooks/useExport"));
|
|
|
21
21
|
const useToolsFunctions_1 = __importDefault(require("../hooks/useToolsFunctions"));
|
|
22
22
|
const ImportPublicationStringModal_1 = __importDefault(require("../modal/ImportPublicationStringModal"));
|
|
23
23
|
const LoadJCAMPModal_1 = __importDefault(require("../modal/LoadJCAMPModal"));
|
|
24
|
-
const
|
|
24
|
+
const Reducer_1 = require("../reducer/Reducer");
|
|
25
25
|
const Types_1 = require("../reducer/types/Types");
|
|
26
26
|
const IMPORT_MENU = [
|
|
27
27
|
{
|
|
@@ -72,7 +72,7 @@ const EXPORT_MENU = [
|
|
|
72
72
|
label: 'Copy image to Clipboard ( Press Ctrl + C )',
|
|
73
73
|
},
|
|
74
74
|
];
|
|
75
|
-
function BasicToolBarInner({ info, verticalAlign,
|
|
75
|
+
function BasicToolBarInner({ info, verticalAlign, ftCounter, fidCounter, activeSpectrum, }) {
|
|
76
76
|
const dispatch = (0, DispatchContext_1.useDispatch)();
|
|
77
77
|
const alert = (0, Alert_1.useAlert)();
|
|
78
78
|
const modal = (0, Modal_1.useModal)();
|
|
@@ -85,7 +85,7 @@ function BasicToolBarInner({ info, verticalAlign, displayerMode, ftCounter, fidC
|
|
|
85
85
|
: IMPORT_MENU.filter((item) => item.id !== 'importPublicationString');
|
|
86
86
|
}, [isExperimentalFeature]);
|
|
87
87
|
const { isRealSpectrumShown, changeSpectrumViewHandler, changeDisplayViewModeHandler, alignSpectrumsVerticallyHandler, } = (0, useToolsFunctions_1.default)();
|
|
88
|
-
const { saveAsSVGHandler, saveAsPNGHandler, saveAsJSONHandler,
|
|
88
|
+
const { saveAsSVGHandler, saveAsPNGHandler, saveAsJSONHandler, saveToClipboardHandler, saveAsHandler, } = (0, useExport_1.default)();
|
|
89
89
|
const LoadJacmpHandler = (0, react_1.useCallback)((file) => {
|
|
90
90
|
if (file) {
|
|
91
91
|
dispatch({ type: Types_1.LOAD_JCAMP_FILE, files: [file] });
|
|
@@ -133,9 +133,6 @@ function BasicToolBarInner({ info, verticalAlign, displayerMode, ftCounter, fidC
|
|
|
133
133
|
case 'advance_save':
|
|
134
134
|
void saveAsHandler();
|
|
135
135
|
break;
|
|
136
|
-
case 'nmre':
|
|
137
|
-
void saveAsNMREHandler();
|
|
138
|
-
break;
|
|
139
136
|
case 'copy':
|
|
140
137
|
void saveToClipboardHandler();
|
|
141
138
|
break;
|
|
@@ -147,7 +144,6 @@ function BasicToolBarInner({ info, verticalAlign, displayerMode, ftCounter, fidC
|
|
|
147
144
|
saveAsPNGHandler,
|
|
148
145
|
saveAsJSONHandler,
|
|
149
146
|
saveAsHandler,
|
|
150
|
-
saveAsNMREHandler,
|
|
151
147
|
saveToClipboardHandler,
|
|
152
148
|
]);
|
|
153
149
|
return ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [isButtonVisible('import') && ((0, jsx_runtime_1.jsx)(ToolbarMenu_1.default, { component: (0, jsx_runtime_1.jsx)(fa_1.FaFileImport, {}), toolTip: "Import", onClick: (element) => {
|
|
@@ -156,20 +152,17 @@ function BasicToolBarInner({ info, verticalAlign, displayerMode, ftCounter, fidC
|
|
|
156
152
|
}, items: importMenu })), isButtonVisible('exportAs') && ((0, jsx_runtime_1.jsx)(ToolbarMenu_1.default, { component: (0, jsx_runtime_1.jsx)(fa_1.FaFileExport, {}), toolTip: "Export As", onClick: (element) => {
|
|
157
153
|
exportHandler(element);
|
|
158
154
|
return null;
|
|
159
|
-
}, items: EXPORT_MENU })),
|
|
160
|
-
isButtonVisible('spectraStackAlignments') &&
|
|
155
|
+
}, items: EXPORT_MENU })), isButtonVisible('spectraStackAlignments') &&
|
|
161
156
|
ftCounter > 1 &&
|
|
162
|
-
(info?.isFt || !activeSpectrum) && ((0, jsx_runtime_1.jsx)(analysis_ui_components_1.Toolbar.Item, { id: "spectra-alignment", className: "cheminfo", title: "Spectra alignment ( Press s )", onClick: changeDisplayViewModeHandler, children: verticalAlign.align === 'stack' ? ((0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrOverlay3Aligned, {})) : ((0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrOverlay3, {})) })),
|
|
163
|
-
isButtonVisible('realImaginary') &&
|
|
164
|
-
info.isComplex && ((0, jsx_runtime_1.jsx)(analysis_ui_components_1.Toolbar.Item, { id: "display", title: isRealSpectrumShown ? 'Display Real ' : 'Display Imaginary', onClick: changeSpectrumViewHandler, className: "cheminfo", children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrRealImag, {}) })), displayerMode === Constants_1.DISPLAYER_MODE.DM_1D &&
|
|
165
|
-
isButtonVisible('spectraCenterAlignments') &&
|
|
157
|
+
(info?.isFt || !activeSpectrum) && ((0, jsx_runtime_1.jsx)(analysis_ui_components_1.Toolbar.Item, { id: "spectra-alignment", className: "cheminfo", title: "Spectra alignment ( Press s )", onClick: changeDisplayViewModeHandler, children: verticalAlign.align === 'stack' ? ((0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrOverlay3Aligned, {})) : ((0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrOverlay3, {})) })), isButtonVisible('realImaginary') && info.isComplex && ((0, jsx_runtime_1.jsx)(analysis_ui_components_1.Toolbar.Item, { id: "display", title: isRealSpectrumShown ? 'Display Real ' : 'Display Imaginary', onClick: changeSpectrumViewHandler, className: "cheminfo", children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrRealImag, {}) })), isButtonVisible('spectraCenterAlignments') &&
|
|
166
158
|
(ftCounter > 0 || fidCounter > 0) && ((0, jsx_runtime_1.jsx)(analysis_ui_components_1.Toolbar.Item, { id: "baseline-position", title: verticalAlign.align === 'bottom'
|
|
167
159
|
? 'Baseline Center ( Press c )'
|
|
168
160
|
: 'Baseline Bottom ( Press c )', onClick: alignSpectrumsVerticallyHandler, className: "cheminfo", children: (0, jsx_runtime_1.jsx)("div", { style: { fontSize: 24 }, children: verticalAlign.align === 'bottom' ? ((0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrAlignCenter, {})) : ((0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrAlignBottom, {})) }) }))] }));
|
|
169
161
|
}
|
|
170
162
|
const MemoizedBasicToolBar = (0, react_1.memo)(BasicToolBarInner);
|
|
171
163
|
function BasicToolBar() {
|
|
172
|
-
const {
|
|
164
|
+
const { verticalAlign, displayerMode, view: { spectra: { activeTab }, }, } = (0, ChartContext_1.useChartData)();
|
|
165
|
+
const activeSpectrum = (0, Reducer_1.useActiveSpectrum)();
|
|
173
166
|
const { info, fidCounter, ftCounter } = (0, useDatumWithSpectraStatistics_1.default)();
|
|
174
167
|
return ((0, jsx_runtime_1.jsx)(MemoizedBasicToolBar, { ...{
|
|
175
168
|
info,
|