nmrium 0.29.0 → 0.30.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 +47 -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/IntegralResizable.js +5 -4
- package/lib/component/1d/LinesSeries.js +6 -6
- package/lib/component/1d/Viewer1D.js +7 -12
- 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/multiAnalysis/AnalysisRange.js +16 -14
- package/lib/component/1d/multiplicityTree/MultiplicityTree.js +3 -4
- 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 +26 -0
- package/lib/component/1d/peaks/PeaksShapes.d.ts +3 -0
- package/lib/component/1d/peaks/PeaksShapes.js +35 -0
- package/lib/component/1d/peaks/usePeakShapesPath.d.ts +13 -0
- package/lib/component/1d/peaks/usePeakShapesPath.js +45 -0
- package/lib/component/1d/ranges/Range.js +4 -4
- package/lib/component/2d/FooterBanner.js +2 -2
- package/lib/component/2d/Viewer2D.js +2 -2
- 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/EventsTrackers/KeysListenerTracker.js +91 -52
- 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/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 +49 -46
- 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/useCheckToolsVisibility.d.ts +10 -1
- package/lib/component/hooks/useCheckToolsVisibility.js +31 -1
- package/lib/component/hooks/useFilter.d.ts +1 -0
- package/lib/component/hooks/useFilter.js +7 -0
- package/lib/component/hooks/useToolsFunctions.js +1 -1
- package/lib/component/loader/DropZone.js +1 -1
- 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 +1 -1
- package/lib/component/modal/editRange/EditRangeModal.js +2 -2
- 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 +13 -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/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/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.js +1 -1
- 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/SpectrumListItem.js +1 -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 +1 -2
- package/lib/component/panels/ZonesPanel/TableColumns/ActionsColumn.js +1 -1
- package/lib/component/panels/databasePanel/DatabasePanel.js +4 -12
- 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 +4 -0
- package/lib/component/reducer/Reducer.d.ts +37 -6
- package/lib/component/reducer/Reducer.js +25 -5
- package/lib/component/reducer/actions/FiltersActions.d.ts +13 -7
- package/lib/component/reducer/actions/FiltersActions.js +165 -29
- package/lib/component/reducer/actions/IntegralsActions.js +2 -2
- package/lib/component/reducer/actions/MoleculeActions.js +27 -14
- package/lib/component/reducer/actions/PeaksActions.d.ts +4 -1
- package/lib/component/reducer/actions/PeaksActions.js +38 -5
- package/lib/component/reducer/actions/RangesActions.js +2 -2
- package/lib/component/reducer/actions/SpectrumsActions.js +1 -1
- package/lib/component/reducer/actions/ToolsActions.js +9 -72
- package/lib/component/reducer/helper/getStrongestPeak.d.ts +7 -0
- package/lib/component/reducer/helper/getStrongestPeak.js +14 -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 +7 -0
- package/lib/component/reducer/types/Types.js +7 -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 +2 -2
- package/lib/component/tool/FloatMoleculeStructures/DraggableStructure.js +14 -6
- package/lib/component/tool/FloatMoleculeStructures/index.d.ts +3 -2
- package/lib/component/tool/FloatMoleculeStructures/index.js +13 -6
- package/lib/component/toolbar/BasicToolBar.js +3 -8
- package/lib/component/toolbar/FunctionToolBar.js +11 -23
- package/lib/component/toolbar/ToolTypes.d.ts +7 -1
- package/lib/component/toolbar/ToolTypes.js +119 -9
- package/lib/component/utility/util/nmredata/addZones.js +3 -3
- 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 +4 -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 -1
- package/lib/data/SpectraManager.js +2 -8
- 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 +4 -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 +1 -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/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/migration/MigrationManager.d.ts +1 -1
- package/lib/data/migration/MigrationManager.js +3 -1
- package/lib/data/migration/migrateToVersion3.d.ts +1 -0
- package/lib/data/migration/migrateToVersion3.js +55 -0
- package/lib/data/molecules/Molecule.d.ts +15 -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 +75 -0
- package/lib-cjs/component/1d/Chart1D.js +4 -2
- package/lib-cjs/component/1d/ExclusionZoneAnnotation.js +15 -8
- package/lib-cjs/component/1d/IntegralResizable.js +4 -3
- package/lib-cjs/component/1d/LinesSeries.js +5 -5
- package/lib-cjs/component/1d/Viewer1D.js +7 -12
- 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/multiAnalysis/AnalysisRange.js +15 -13
- package/lib-cjs/component/1d/multiplicityTree/MultiplicityTree.js +1 -2
- package/lib-cjs/component/1d/{PeakAnnotation.js → peaks/PeakAnnotation.js} +8 -9
- package/lib-cjs/component/1d/peaks/PeakAnnotations.js +31 -0
- package/lib-cjs/component/1d/peaks/PeaksShapes.js +40 -0
- package/lib-cjs/component/1d/peaks/usePeakShapesPath.js +49 -0
- package/lib-cjs/component/1d/ranges/Range.js +3 -3
- package/lib-cjs/component/2d/FooterBanner.js +2 -2
- package/lib-cjs/component/2d/Viewer2D.js +2 -2
- package/lib-cjs/component/2d/zones/Signal.js +3 -3
- package/lib-cjs/component/2d/zones/Zone.js +3 -3
- package/lib-cjs/component/EventsTrackers/KeysListenerTracker.js +89 -50
- 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/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 +70 -44
- package/lib-cjs/component/header/Zones2DOptionPanel.js +11 -13
- package/lib-cjs/component/highlight/index.js +20 -18
- package/lib-cjs/component/hooks/useCheckToolsVisibility.js +31 -1
- package/lib-cjs/component/hooks/useFilter.js +14 -0
- package/lib-cjs/component/hooks/useToolsFunctions.js +1 -1
- package/lib-cjs/component/loader/DropZone.js +1 -1
- 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 +1 -1
- package/lib-cjs/component/modal/editRange/EditRangeModal.js +2 -2
- 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 +13 -13
- package/lib-cjs/component/modal/setting/WorkspaceItem.js +2 -2
- 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/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 +1 -1
- 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/SpectrumListItem.js +1 -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 +1 -2
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/ActionsColumn.js +1 -1
- package/lib-cjs/component/panels/databasePanel/DatabasePanel.js +4 -12
- 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 +4 -0
- package/lib-cjs/component/reducer/Reducer.js +25 -8
- package/lib-cjs/component/reducer/actions/FiltersActions.js +170 -29
- package/lib-cjs/component/reducer/actions/IntegralsActions.js +2 -2
- package/lib-cjs/component/reducer/actions/MoleculeActions.js +27 -14
- package/lib-cjs/component/reducer/actions/PeaksActions.js +40 -4
- package/lib-cjs/component/reducer/actions/RangesActions.js +2 -2
- package/lib-cjs/component/reducer/actions/SpectrumsActions.js +1 -1
- package/lib-cjs/component/reducer/actions/ToolsActions.js +8 -71
- package/lib-cjs/component/reducer/helper/getStrongestPeak.js +18 -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 +10 -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 +12 -4
- package/lib-cjs/component/tool/FloatMoleculeStructures/index.js +13 -6
- package/lib-cjs/component/toolbar/BasicToolBar.js +3 -8
- package/lib-cjs/component/toolbar/FunctionToolBar.js +10 -22
- package/lib-cjs/component/toolbar/ToolTypes.js +119 -9
- package/lib-cjs/component/utility/util/nmredata/addZones.js +3 -6
- 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 +4 -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 +2 -8
- 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 +4 -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 +1 -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/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/migration/MigrationManager.js +3 -1
- package/lib-cjs/data/migration/migrateToVersion3.js +58 -0
- 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 +32 -31
- package/lib/component/1d/PeakAnnotations.js +0 -41
- package/lib/data/data1d/filter1d/lineBroadening.d.ts +0 -14
- package/lib/data/data1d/filter1d/lineBroadening.js +0 -57
- 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/data/data1d/filter1d/lineBroadening.js +0 -63
- package/lib-cjs/data/utilities/generateID.js +0 -12
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { v4 } from '@lukeed/uuid';
|
|
1
2
|
import { original } from 'immer';
|
|
2
3
|
import { xFindClosestIndex } from 'ml-spectra-processing';
|
|
3
|
-
import { getShiftX, lookupPeak, autoPeakPicking, } from '../../../data/data1d/Spectrum1D';
|
|
4
|
-
import generateID from '../../../data/utilities/generateID';
|
|
4
|
+
import { getShiftX, lookupPeak, autoPeakPicking, optimizePeaks, } from '../../../data/data1d/Spectrum1D';
|
|
5
5
|
import { options } from '../../toolbar/ToolTypes';
|
|
6
6
|
import getRange from '../helper/getRange';
|
|
7
7
|
function addPeak(draft, mouseCoordinates) {
|
|
@@ -19,7 +19,7 @@ function addPeak(draft, mouseCoordinates) {
|
|
|
19
19
|
const shiftX = getShiftX(draft.data[index]);
|
|
20
20
|
if (candidatePeak) {
|
|
21
21
|
const peak = {
|
|
22
|
-
id:
|
|
22
|
+
id: v4(),
|
|
23
23
|
originalX: candidatePeak.x - shiftX,
|
|
24
24
|
x: candidatePeak.x,
|
|
25
25
|
y: candidatePeak.y,
|
|
@@ -41,7 +41,7 @@ function addPeaks(draft, action) {
|
|
|
41
41
|
const shiftX = getShiftX(draft.data[index]);
|
|
42
42
|
if (peak && !datumOriginal.peaks.values.some((p) => p.x === peak.x)) {
|
|
43
43
|
const newPeak = {
|
|
44
|
-
id:
|
|
44
|
+
id: v4(),
|
|
45
45
|
originalX: peak.x - shiftX,
|
|
46
46
|
x: peak.x,
|
|
47
47
|
y: peak.y,
|
|
@@ -65,6 +65,20 @@ function deletePeak(draft, peakData) {
|
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
+
function handleOptimizePeaks(draft, action) {
|
|
69
|
+
const { peaks } = action.payload;
|
|
70
|
+
if (draft.activeSpectrum?.id) {
|
|
71
|
+
const { index } = draft.activeSpectrum;
|
|
72
|
+
const datum = draft.data[index];
|
|
73
|
+
const [from, to] = draft.xDomain;
|
|
74
|
+
const newPeaks = optimizePeaks(draft.data[index], {
|
|
75
|
+
from,
|
|
76
|
+
to,
|
|
77
|
+
peaks,
|
|
78
|
+
});
|
|
79
|
+
datum.peaks.values = newPeaks;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
68
82
|
function handleAutoPeakPicking(draft, autOptions) {
|
|
69
83
|
if (draft.activeSpectrum?.id) {
|
|
70
84
|
draft.toolOptions.selectedTool = options.zoom.id;
|
|
@@ -82,4 +96,23 @@ function handleAutoPeakPicking(draft, autOptions) {
|
|
|
82
96
|
datum.peaks.values = datum.peaks.values.concat(peaks);
|
|
83
97
|
}
|
|
84
98
|
}
|
|
85
|
-
|
|
99
|
+
function changePeakShapeHandler(draft, action) {
|
|
100
|
+
const { shape, id } = action.payload;
|
|
101
|
+
if (draft.activeSpectrum?.id) {
|
|
102
|
+
const { index } = draft.activeSpectrum;
|
|
103
|
+
const datum = draft.data[index];
|
|
104
|
+
const peakIndex = datum.peaks.values.findIndex((peak) => peak.id === id);
|
|
105
|
+
if (peakIndex !== -1) {
|
|
106
|
+
datum.peaks.values[peakIndex].shape = shape;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
function handleShowPeaksShapes(draft, action) {
|
|
111
|
+
const { key } = action.payload;
|
|
112
|
+
const peaksOptions = draft.toolOptions.data.peaksOptions;
|
|
113
|
+
draft.toolOptions.data.peaksOptions = {
|
|
114
|
+
...peaksOptions,
|
|
115
|
+
[key]: !peaksOptions[key],
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
export { addPeak, addPeaks, deletePeak, handleAutoPeakPicking, handleOptimizePeaks, changePeakShapeHandler, handleShowPeaksShapes, };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { v4 } from '@lukeed/uuid';
|
|
1
2
|
import { original } from 'immer';
|
|
2
3
|
import cloneDeep from 'lodash/cloneDeep';
|
|
3
4
|
import { xFindClosestIndex } from 'ml-spectra-processing';
|
|
@@ -7,7 +8,6 @@ import { DatumKind, SignalKindsToInclude, } from '../../../data/constants/Signal
|
|
|
7
8
|
import { addRange, changeRangeSignal, detectRanges, updateRangesRelativeValues, changeRange, changeRangeRelativeValue, updateXShift, } from '../../../data/data1d/Spectrum1D';
|
|
8
9
|
import { setSumOptions } from '../../../data/data1d/Spectrum1D/SumManager';
|
|
9
10
|
import { unlink, unlinkInAssignmentData, } from '../../../data/utilities/RangeUtilities';
|
|
10
|
-
import generateID from '../../../data/utilities/generateID';
|
|
11
11
|
import getRange from '../helper/getRange';
|
|
12
12
|
import { handleUpdateCorrelations } from './CorrelationsActions';
|
|
13
13
|
import { setDomain, setIntegralsYDomain } from './DomainActions';
|
|
@@ -114,7 +114,7 @@ function handleSaveEditedRange(draft, action) {
|
|
|
114
114
|
unlinkInAssignmentData(assignmentData, [_editedRowData]);
|
|
115
115
|
const rangeIndex = getRangeIndex(state, index, _editedRowData.id);
|
|
116
116
|
if (_editedRowData.id === 'new') {
|
|
117
|
-
_editedRowData.id =
|
|
117
|
+
_editedRowData.id = v4();
|
|
118
118
|
}
|
|
119
119
|
draft.data[index].ranges.values.splice(rangeIndex, 1, _editedRowData);
|
|
120
120
|
updateRangesRelativeValues(draft.data[index]);
|
|
@@ -107,7 +107,7 @@ function handleChangeActiveSpectrum(draft, activeSpectrum) {
|
|
|
107
107
|
* if the new active spectrum different than the previous active spectrum fid then refresh the domain andf the mode.
|
|
108
108
|
*/
|
|
109
109
|
if (draft.toolOptions.data.activeFilterID) {
|
|
110
|
-
resetSpectrumByFilter(draft
|
|
110
|
+
resetSpectrumByFilter(draft);
|
|
111
111
|
}
|
|
112
112
|
else if (refreshDomain) {
|
|
113
113
|
setDomain(draft);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { original
|
|
1
|
+
import { v4 } from '@lukeed/uuid';
|
|
2
|
+
import { original } from 'immer';
|
|
3
3
|
import { xFindClosestIndex } from 'ml-spectra-processing';
|
|
4
|
-
import generateID from '../../../data/utilities/generateID';
|
|
5
4
|
import { getYScale, getXScale } from '../../1d/utilities/scale';
|
|
6
5
|
import { LAYOUT } from '../../2d/utilities/DimensionLayout';
|
|
7
6
|
import { get2DYScale } from '../../2d/utilities/scale';
|
|
@@ -11,70 +10,8 @@ import { DISPLAYER_MODE, MARGIN } from '../core/Constants';
|
|
|
11
10
|
import { setZoom, wheelZoom, ZoomType } from '../helper/Zoom1DManager';
|
|
12
11
|
import zoomHistoryManager from '../helper/ZoomHistoryManager';
|
|
13
12
|
import { setDomain, setIntegralsYDomain, setMode, } from './DomainActions';
|
|
14
|
-
import { calculateBaseLineCorrection, resetSpectrumByFilter, } from './FiltersActions';
|
|
13
|
+
import { calculateBaseLineCorrection, resetSpectrumByFilter, setFilterChanges, } from './FiltersActions';
|
|
15
14
|
import { changeSpectrumVerticalAlignment } from './PreferencesActions';
|
|
16
|
-
function getStrongestPeak(draft) {
|
|
17
|
-
const { activeSpectrum, data } = draft;
|
|
18
|
-
if (activeSpectrum) {
|
|
19
|
-
const activeData = data[activeSpectrum?.index].data;
|
|
20
|
-
const strongestPeakValue = max(activeData.re);
|
|
21
|
-
const index = activeData.re.findIndex((val) => val === strongestPeakValue);
|
|
22
|
-
return {
|
|
23
|
-
xValue: activeData.x[index],
|
|
24
|
-
yValue: strongestPeakValue,
|
|
25
|
-
index,
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
function checkFilterHasTempData(selectedToolId) {
|
|
30
|
-
return [options.phaseCorrection.id, options.baselineCorrection.id].includes(selectedToolId);
|
|
31
|
-
}
|
|
32
|
-
function setFilterChanges(draft, selectedFilterID) {
|
|
33
|
-
const activeSpectrumId = draft.activeSpectrum?.id;
|
|
34
|
-
// If the user selects the filter from the filters list or selects its tool and has a record in the filter list for preview and edit
|
|
35
|
-
if (checkFilterHasTempData(selectedFilterID)) {
|
|
36
|
-
//return back the spectra data to point of time before applying a specific filter
|
|
37
|
-
const dataSavePoint = resetSpectrumByFilter(draft, selectedFilterID, {
|
|
38
|
-
updateDomain: false,
|
|
39
|
-
rollback: true,
|
|
40
|
-
searchBy: 'name',
|
|
41
|
-
returnCurrentDatum: true,
|
|
42
|
-
});
|
|
43
|
-
// create a temporary clone of the data
|
|
44
|
-
draft.tempData = current(draft).data;
|
|
45
|
-
if (dataSavePoint) {
|
|
46
|
-
draft.tempData[dataSavePoint?.index] = dataSavePoint?.datum;
|
|
47
|
-
}
|
|
48
|
-
switch (selectedFilterID) {
|
|
49
|
-
case options.phaseCorrection.id: {
|
|
50
|
-
// look for the strongest peak to set it as a pivot
|
|
51
|
-
const { xValue, index } = getStrongestPeak(draft) || {
|
|
52
|
-
xValue: 0,
|
|
53
|
-
index: 0,
|
|
54
|
-
};
|
|
55
|
-
draft.toolOptions.data.pivot = { value: xValue, index };
|
|
56
|
-
break;
|
|
57
|
-
}
|
|
58
|
-
case options.baselineCorrection.id: {
|
|
59
|
-
if (draft.activeSpectrum?.id) {
|
|
60
|
-
const baselineCorrectionFilter = current(draft).data[draft.activeSpectrum.index].filters.find((filter) => filter.name === options.baselineCorrection.id);
|
|
61
|
-
draft.toolOptions.data.baselineCorrection.zones =
|
|
62
|
-
baselineCorrectionFilter
|
|
63
|
-
? baselineCorrectionFilter.value.zones
|
|
64
|
-
: [];
|
|
65
|
-
}
|
|
66
|
-
break;
|
|
67
|
-
}
|
|
68
|
-
default:
|
|
69
|
-
break;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
else if (checkFilterHasTempData(draft.toolOptions.selectedTool)) {
|
|
73
|
-
draft.toolOptions.data.activeFilterID = null;
|
|
74
|
-
const spectrumIndex = draft.data.findIndex((spectrum) => spectrum.id === activeSpectrumId);
|
|
75
|
-
draft.data[spectrumIndex].data = draft.tempData[spectrumIndex].data;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
15
|
function resetTool(draft, setDefaultTool = true) {
|
|
79
16
|
// reset temp range
|
|
80
17
|
setSelectedOptionPanel(draft, null);
|
|
@@ -126,9 +63,9 @@ function setSelectedOptionPanel(draft, selectedOptionPanel) {
|
|
|
126
63
|
draft.toolOptions.selectedOptionPanel = selectedOptionPanel;
|
|
127
64
|
}
|
|
128
65
|
function setSpectrumsVerticalAlign(draft) {
|
|
129
|
-
const align = ['stack', '
|
|
130
|
-
? '
|
|
131
|
-
: '
|
|
66
|
+
const align = ['stack', 'bottom'].includes(draft.verticalAlign.align)
|
|
67
|
+
? 'center'
|
|
68
|
+
: 'bottom';
|
|
132
69
|
changeSpectrumVerticalAlignment(draft, { align });
|
|
133
70
|
}
|
|
134
71
|
function handleChangeSpectrumDisplayMode(draft) {
|
|
@@ -148,7 +85,7 @@ function handleAddBaseLineZone(draft, { from, to }) {
|
|
|
148
85
|
}
|
|
149
86
|
const zones = draft.toolOptions.data.baselineCorrection.zones;
|
|
150
87
|
zones.push({
|
|
151
|
-
id:
|
|
88
|
+
id: v4(),
|
|
152
89
|
from: zone[0],
|
|
153
90
|
to: zone[1],
|
|
154
91
|
});
|
|
@@ -303,7 +240,7 @@ function hasAcceptedSpectrum(draft, index) {
|
|
|
303
240
|
}
|
|
304
241
|
function setMargin(draft) {
|
|
305
242
|
if (draft.displayerMode === DISPLAYER_MODE.DM_2D &&
|
|
306
|
-
draft.toolOptions.selectedTool !== options.
|
|
243
|
+
draft.toolOptions.selectedTool !== options.slicing.id) {
|
|
307
244
|
const top = hasAcceptedSpectrum(draft, 0)
|
|
308
245
|
? MARGIN['2D'].top
|
|
309
246
|
: MARGIN['1D'].top;
|
|
@@ -312,7 +249,7 @@ function setMargin(draft) {
|
|
|
312
249
|
: MARGIN['1D'].left;
|
|
313
250
|
draft.margin = { ...MARGIN['2D'], top, left };
|
|
314
251
|
}
|
|
315
|
-
else if (draft.toolOptions.selectedTool === options.
|
|
252
|
+
else if (draft.toolOptions.selectedTool === options.slicing.id) {
|
|
316
253
|
draft.margin = MARGIN['2D'];
|
|
317
254
|
}
|
|
318
255
|
else if (draft.displayerMode === DISPLAYER_MODE.DM_1D) {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { max } from 'd3';
|
|
2
|
+
export function getStrongestPeak(draft) {
|
|
3
|
+
const { activeSpectrum, data } = draft;
|
|
4
|
+
if (activeSpectrum) {
|
|
5
|
+
const activeData = data[activeSpectrum?.index].data;
|
|
6
|
+
const strongestPeakValue = max(activeData.re);
|
|
7
|
+
const index = activeData.re.findIndex((val) => val === strongestPeakValue);
|
|
8
|
+
return {
|
|
9
|
+
xValue: activeData.x[index],
|
|
10
|
+
yValue: strongestPeakValue,
|
|
11
|
+
index,
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { v4 } from '@lukeed/uuid';
|
|
2
2
|
import { getLocalStorage, storeData } from '../../../utility/LocalStorage';
|
|
3
3
|
export function addWorkspace(draft, action) {
|
|
4
4
|
const { workspace: workspaceName, data: { display, general, formatting, databases }, } = action.payload;
|
|
@@ -10,7 +10,7 @@ export function addWorkspace(draft, action) {
|
|
|
10
10
|
formatting,
|
|
11
11
|
databases,
|
|
12
12
|
};
|
|
13
|
-
const newWorkspaceKey =
|
|
13
|
+
const newWorkspaceKey = v4();
|
|
14
14
|
const localData = getLocalStorage('nmr-general-settings');
|
|
15
15
|
localData.workspaces[newWorkspaceKey] = newWorkSpace;
|
|
16
16
|
storeData('nmr-general-settings', JSON.stringify(localData));
|
|
@@ -36,6 +36,9 @@ const getPeaksDefaultValues = (nucleus) => {
|
|
|
36
36
|
deltaHz: { show: false, format: '0.00' },
|
|
37
37
|
peakWidth: { show: false, format: '0.00' },
|
|
38
38
|
intensity: { show: true, format: '0.00' },
|
|
39
|
+
showKind: true,
|
|
40
|
+
fwhm: { show: true, format: '0.00000' },
|
|
41
|
+
mu: { show: false, format: '0.00000' },
|
|
39
42
|
};
|
|
40
43
|
return getPreferences(preferences, nucleus);
|
|
41
44
|
};
|
|
@@ -42,8 +42,6 @@ declare const preferencesReducer: (base: {
|
|
|
42
42
|
readonly label: string;
|
|
43
43
|
readonly display: {
|
|
44
44
|
readonly general?: {
|
|
45
|
-
readonly disableMultipletAnalysis?: boolean | undefined;
|
|
46
|
-
readonly hideSetSumFromMolecule?: boolean | undefined;
|
|
47
45
|
readonly hideGeneralSettings?: boolean | undefined;
|
|
48
46
|
readonly experimentalFeatures?: {
|
|
49
47
|
readonly display: boolean;
|
|
@@ -107,24 +105,25 @@ declare const preferencesReducer: (base: {
|
|
|
107
105
|
} | undefined;
|
|
108
106
|
} | undefined;
|
|
109
107
|
readonly toolBarButtons?: {
|
|
110
|
-
readonly
|
|
111
|
-
readonly
|
|
108
|
+
readonly zoom?: boolean | undefined;
|
|
109
|
+
readonly zoomOut?: boolean | undefined;
|
|
112
110
|
readonly import?: boolean | undefined;
|
|
113
111
|
readonly exportAs?: boolean | undefined;
|
|
114
112
|
readonly spectraStackAlignments?: boolean | undefined;
|
|
115
113
|
readonly spectraCenterAlignments?: boolean | undefined;
|
|
116
114
|
readonly realImaginary?: boolean | undefined;
|
|
117
|
-
readonly
|
|
118
|
-
readonly
|
|
119
|
-
readonly
|
|
120
|
-
readonly
|
|
121
|
-
readonly
|
|
122
|
-
readonly
|
|
123
|
-
readonly
|
|
124
|
-
readonly
|
|
125
|
-
readonly
|
|
126
|
-
readonly
|
|
127
|
-
readonly
|
|
115
|
+
readonly peakPicking?: boolean | undefined;
|
|
116
|
+
readonly integral?: boolean | undefined;
|
|
117
|
+
readonly zonePicking?: boolean | undefined;
|
|
118
|
+
readonly slicing?: boolean | undefined;
|
|
119
|
+
readonly rangePicking?: boolean | undefined;
|
|
120
|
+
readonly zeroFilling?: boolean | undefined;
|
|
121
|
+
readonly apodization?: boolean | undefined;
|
|
122
|
+
readonly phaseCorrection?: boolean | undefined;
|
|
123
|
+
readonly baselineCorrection?: boolean | undefined;
|
|
124
|
+
readonly fastFourierTransform?: boolean | undefined;
|
|
125
|
+
readonly multipleSpectraAnalysis?: boolean | undefined;
|
|
126
|
+
readonly exclusionZones?: boolean | undefined;
|
|
128
127
|
} | undefined;
|
|
129
128
|
};
|
|
130
129
|
readonly general: {
|
|
@@ -162,6 +161,15 @@ declare const preferencesReducer: (base: {
|
|
|
162
161
|
readonly show: boolean;
|
|
163
162
|
readonly format: string;
|
|
164
163
|
};
|
|
164
|
+
readonly showKind: boolean;
|
|
165
|
+
readonly fwhm: {
|
|
166
|
+
readonly show: boolean;
|
|
167
|
+
readonly format: string;
|
|
168
|
+
};
|
|
169
|
+
readonly mu: {
|
|
170
|
+
readonly show: boolean;
|
|
171
|
+
readonly format: string;
|
|
172
|
+
};
|
|
165
173
|
};
|
|
166
174
|
};
|
|
167
175
|
} | undefined;
|
|
@@ -7,7 +7,7 @@ import { removeWorkspace } from './actions/removeWorkspace';
|
|
|
7
7
|
import { setPanelsPreferences } from './actions/setPanelsPreferences';
|
|
8
8
|
import { setPreferences } from './actions/setPreferences';
|
|
9
9
|
import { setWorkspace } from './actions/setWorkspace';
|
|
10
|
-
const LOCAL_STORAGE_VERSION =
|
|
10
|
+
const LOCAL_STORAGE_VERSION = 10;
|
|
11
11
|
export const WORKSPACES = [
|
|
12
12
|
{
|
|
13
13
|
key: 'default',
|
|
@@ -14,6 +14,7 @@ export declare const LOAD_ZIP_FILE = "LOAD_ZIP_FILE";
|
|
|
14
14
|
export declare const LOAD_JDF_FILE = "LOAD_JDF_FILE";
|
|
15
15
|
export declare const ADD_PEAK = "ADD_PEAK";
|
|
16
16
|
export declare const ADD_PEAKS = "ADD_PEAKS";
|
|
17
|
+
export declare const CHANGE_PEAK_SHAPE = "CHANGE_PEAK_SHAPE";
|
|
17
18
|
export declare const DELETE_PEAK_NOTATION = "DELETE_PEAK_NOTATION";
|
|
18
19
|
export declare const SHIFT_SPECTRUM = "SHIFT_SPECTRUM";
|
|
19
20
|
export declare const SET_X_DOMAIN = "SET_X_DOMAIN";
|
|
@@ -53,14 +54,19 @@ export declare const ENABLE_FILTER = "ENABLE_FILTER";
|
|
|
53
54
|
export declare const DELETE_FILTER = "DELETE_FILTER";
|
|
54
55
|
export declare const DELETE_SPECTRA_FILTER = "DELETE_SPECTRA_FILTER";
|
|
55
56
|
export declare const APPLY_ZERO_FILLING_FILTER = "APPLY_ZERO_FILLING_FILTER";
|
|
57
|
+
export declare const APPLY_APODIZATION_FILTER = "APPLY_APODIZATION_FILTER";
|
|
56
58
|
export declare const APPLY_FFT_FILTER = "APPLY_FFT_FILTER";
|
|
57
59
|
export declare const CALCULATE_MANUAL_PHASE_CORRECTION_FILTER = "CALCULATE_MANUAL_PHASE_CORRECTION_FILTER";
|
|
58
60
|
export declare const CALCULATE_BASE_LINE_CORRECTION_FILTER = "CALCULATE_BASE_LINE_CORRECTION_FILTER";
|
|
61
|
+
export declare const CALCULATE_APODIZATION_FILTER = "CALCULATE_APODIZATION_FILTER`";
|
|
62
|
+
export declare const CALCULATE_ZERO_FILLING_FILTER = "CALCULATE_ZERO_FILLING_FILTER`";
|
|
59
63
|
export declare const APPLY_MANUAL_PHASE_CORRECTION_FILTER = "APPLY_MANUAL_PHASE_CORRECTION_FILTER";
|
|
60
64
|
export declare const APPLY_AUTO_PHASE_CORRECTION_FILTER = "APPLY_AUTO_PHASE_CORRECTION_FILTER";
|
|
61
65
|
export declare const APPLY_ABSOLUTE_FILTER = "APPLY_ABSOLUTE_FILTER";
|
|
66
|
+
export declare const DISABLE_FILTER_LIVE_PREVIEW = "DISABLE_FILTER_LIVE_PREVIEW`";
|
|
62
67
|
export declare const SET_VERTICAL_INDICATOR_X_POSITION = "SET_VERTICAL_INDICATOR_X_POSITION";
|
|
63
68
|
export declare const AUTO_PEAK_PICKING = "AUTO_PEAK_PICKING";
|
|
69
|
+
export declare const OPTIMIZE_PEAKS = "OPTIMIZE_PEAKS";
|
|
64
70
|
export declare const AUTO_RANGES_DETECTION = "AUTO_RANGES_DETECTION";
|
|
65
71
|
export declare const AUTO_ZONES_DETECTION = "AUTO_ZONES_DETECTION";
|
|
66
72
|
export declare const DELETE_RANGE = "DELETE_RANGE";
|
|
@@ -126,3 +132,4 @@ export declare const RESURRECTING_SPECTRUM_FROM_RANGES = "RESURRECTING_SPECTRUM_
|
|
|
126
132
|
export declare const RESURRECTING_SPECTRUM_FROM_JCAMP = "RESURRECTING_SPECTRUM_FROM_JCAMP";
|
|
127
133
|
export declare const SHOW_J_GRAPH = "SHOW_J_GRAPH";
|
|
128
134
|
export declare const SET_AUTOMATIC_ASSIGNMENTS = "SET_AUTOMATIC_ASSIGNMENTS";
|
|
135
|
+
export declare const TOGGLE_PEAKS_SHAPES = "TOGGLE_PEAKS_SHAPES";
|
|
@@ -8,6 +8,7 @@ export const LOAD_ZIP_FILE = 'LOAD_ZIP_FILE';
|
|
|
8
8
|
export const LOAD_JDF_FILE = 'LOAD_JDF_FILE';
|
|
9
9
|
export const ADD_PEAK = 'ADD_PEAK';
|
|
10
10
|
export const ADD_PEAKS = 'ADD_PEAKS';
|
|
11
|
+
export const CHANGE_PEAK_SHAPE = 'CHANGE_PEAK_SHAPE';
|
|
11
12
|
export const DELETE_PEAK_NOTATION = 'DELETE_PEAK_NOTATION';
|
|
12
13
|
export const SHIFT_SPECTRUM = 'SHIFT_SPECTRUM';
|
|
13
14
|
export const SET_X_DOMAIN = 'SET_X_DOMAIN';
|
|
@@ -47,14 +48,19 @@ export const ENABLE_FILTER = 'ENABLE_FILTER';
|
|
|
47
48
|
export const DELETE_FILTER = 'DELETE_FILTER';
|
|
48
49
|
export const DELETE_SPECTRA_FILTER = 'DELETE_SPECTRA_FILTER';
|
|
49
50
|
export const APPLY_ZERO_FILLING_FILTER = 'APPLY_ZERO_FILLING_FILTER';
|
|
51
|
+
export const APPLY_APODIZATION_FILTER = 'APPLY_APODIZATION_FILTER';
|
|
50
52
|
export const APPLY_FFT_FILTER = 'APPLY_FFT_FILTER';
|
|
51
53
|
export const CALCULATE_MANUAL_PHASE_CORRECTION_FILTER = 'CALCULATE_MANUAL_PHASE_CORRECTION_FILTER';
|
|
52
54
|
export const CALCULATE_BASE_LINE_CORRECTION_FILTER = 'CALCULATE_BASE_LINE_CORRECTION_FILTER';
|
|
55
|
+
export const CALCULATE_APODIZATION_FILTER = 'CALCULATE_APODIZATION_FILTER`';
|
|
56
|
+
export const CALCULATE_ZERO_FILLING_FILTER = 'CALCULATE_ZERO_FILLING_FILTER`';
|
|
53
57
|
export const APPLY_MANUAL_PHASE_CORRECTION_FILTER = 'APPLY_MANUAL_PHASE_CORRECTION_FILTER';
|
|
54
58
|
export const APPLY_AUTO_PHASE_CORRECTION_FILTER = 'APPLY_AUTO_PHASE_CORRECTION_FILTER';
|
|
55
59
|
export const APPLY_ABSOLUTE_FILTER = 'APPLY_ABSOLUTE_FILTER';
|
|
60
|
+
export const DISABLE_FILTER_LIVE_PREVIEW = 'DISABLE_FILTER_LIVE_PREVIEW`';
|
|
56
61
|
export const SET_VERTICAL_INDICATOR_X_POSITION = 'SET_VERTICAL_INDICATOR_X_POSITION';
|
|
57
62
|
export const AUTO_PEAK_PICKING = 'AUTO_PEAK_PICKING';
|
|
63
|
+
export const OPTIMIZE_PEAKS = 'OPTIMIZE_PEAKS';
|
|
58
64
|
export const AUTO_RANGES_DETECTION = 'AUTO_RANGES_DETECTION';
|
|
59
65
|
export const AUTO_ZONES_DETECTION = 'AUTO_ZONES_DETECTION';
|
|
60
66
|
export const DELETE_RANGE = 'DELETE_RANGE';
|
|
@@ -120,3 +126,4 @@ export const RESURRECTING_SPECTRUM_FROM_RANGES = 'RESURRECTING_SPECTRUM_FROM_RAN
|
|
|
120
126
|
export const RESURRECTING_SPECTRUM_FROM_JCAMP = 'RESURRECTING_SPECTRUM_FROM_JCAMP';
|
|
121
127
|
export const SHOW_J_GRAPH = 'SHOW_J_GRAPH';
|
|
122
128
|
export const SET_AUTOMATIC_ASSIGNMENTS = 'SET_AUTOMATIC_ASSIGNMENTS';
|
|
129
|
+
export const TOGGLE_PEAKS_SHAPES = 'TOGGLE_PEAKS_SHAPES';
|
|
@@ -14,14 +14,15 @@ const styles = {
|
|
|
14
14
|
};
|
|
15
15
|
const allowTools = [
|
|
16
16
|
options.zoom.id,
|
|
17
|
+
options.apodization.id,
|
|
17
18
|
options.zeroFilling.id,
|
|
18
19
|
options.peakPicking.id,
|
|
19
20
|
options.integral.id,
|
|
20
21
|
options.phaseCorrection.id,
|
|
21
22
|
options.baselineCorrection.id,
|
|
22
|
-
options.
|
|
23
|
-
options.
|
|
24
|
-
options.
|
|
23
|
+
options.rangePicking.id,
|
|
24
|
+
options.zonePicking.id,
|
|
25
|
+
options.slicing.id,
|
|
25
26
|
options.editRange.id,
|
|
26
27
|
options.multipleSpectraAnalysis.id,
|
|
27
28
|
options.exclusionZones.id,
|
|
@@ -15,12 +15,13 @@ const styles = {
|
|
|
15
15
|
};
|
|
16
16
|
const allowTools = [
|
|
17
17
|
options.zoom.id,
|
|
18
|
-
options.
|
|
18
|
+
options.apodization.id,
|
|
19
|
+
options.equalizer.id,
|
|
19
20
|
options.baselineCorrection.id,
|
|
20
|
-
options.
|
|
21
|
-
options.
|
|
21
|
+
options.zonePicking.id,
|
|
22
|
+
options.slicing.id,
|
|
22
23
|
options.integral.id,
|
|
23
|
-
options.
|
|
24
|
+
options.rangePicking.id,
|
|
24
25
|
options.editRange.id,
|
|
25
26
|
options.multipleSpectraAnalysis.id,
|
|
26
27
|
options.exclusionZones.id,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StateMoleculeExtended } from '../../../data/molecules/Molecule';
|
|
2
2
|
import { Ranges } from '../../../data/types/data1d';
|
|
3
3
|
import { Zones } from '../../../data/types/data2d';
|
|
4
4
|
import { DISPLAYER_MODE } from '../../reducer/core/Constants';
|
|
5
5
|
interface DraggableStructureProps {
|
|
6
6
|
zones: Zones;
|
|
7
7
|
ranges: Ranges;
|
|
8
|
-
molecule:
|
|
8
|
+
molecule: StateMoleculeExtended;
|
|
9
9
|
activeTab: string;
|
|
10
10
|
displayerMode: DISPLAYER_MODE;
|
|
11
11
|
index?: number;
|
|
@@ -2,14 +2,14 @@ import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
|
2
2
|
/** @jsxImportSource @emotion/react */
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
4
|
import OCL from 'openchemlib/full';
|
|
5
|
-
import { useCallback
|
|
5
|
+
import { useCallback } from 'react';
|
|
6
6
|
import OCLnmr from 'react-ocl-nmr';
|
|
7
7
|
import { useDispatch } from '../../context/DispatchContext';
|
|
8
8
|
import { useGlobal } from '../../context/GlobalContext';
|
|
9
9
|
import SVGDraggable from '../../elements/draggble/SVGDraggable';
|
|
10
10
|
import { useMoleculeEditor } from '../../modal/MoleculeStructureEditorModal';
|
|
11
11
|
import useAtomAssignment from '../../panels/MoleculesPanel/useAtomAssignment';
|
|
12
|
-
import { FLOAT_MOLECULE_OVER_SPECTRUM } from '../../reducer/types/Types';
|
|
12
|
+
import { FLOAT_MOLECULE_OVER_SPECTRUM, SET_MOLECULE, } from '../../reducer/types/Types';
|
|
13
13
|
import ActionsButton from './ActionsButton';
|
|
14
14
|
const style = css `
|
|
15
15
|
border: 1px solid transparent;
|
|
@@ -27,7 +27,6 @@ const style = css `
|
|
|
27
27
|
`;
|
|
28
28
|
export function DraggableStructure(props) {
|
|
29
29
|
const { zones, ranges, molecule, activeTab, displayerMode, index } = props;
|
|
30
|
-
const [molfile, setMolFile] = useState(molecule.molfile);
|
|
31
30
|
const { viewerRef } = useGlobal();
|
|
32
31
|
const dispatch = useDispatch();
|
|
33
32
|
const openMoleculeEditor = useMoleculeEditor();
|
|
@@ -35,10 +34,19 @@ export function DraggableStructure(props) {
|
|
|
35
34
|
const floatMoleculeHandler = useCallback(() => {
|
|
36
35
|
dispatch({
|
|
37
36
|
type: FLOAT_MOLECULE_OVER_SPECTRUM,
|
|
38
|
-
payload: {
|
|
37
|
+
payload: { id: molecule.id },
|
|
39
38
|
});
|
|
40
39
|
}, [dispatch, molecule]);
|
|
41
|
-
return (_jsx(SVGDraggable, { width: 150, height: 100, initialPosition: { x: 100, y: 50 }, dragHandleClassName: "handle", parentElement: viewerRef, children: (width, height) => (_jsxs("foreignObject", { width: width, height: height + 30, "data-replace-float-structure": "true", css: style, onDoubleClick: () => openMoleculeEditor(molecule), children: [_jsx(ActionsButton, { onFloatBtnClick: floatMoleculeHandler }), _jsx(OCLnmr, { OCL: OCL, autoCrop: true, id: `molSVG${index || ''}`, width: width - 20, height: height, molfile: molfile, setSelectedAtom: handleOnClickAtom, atomHighlightColor: currentDiaIDsToHighlight?.length > 0 ? 'red' : '#FFD700', atomHighlightOpacity: 0.35, highlights: currentDiaIDsToHighlight?.length > 0
|
|
40
|
+
return (_jsx(SVGDraggable, { width: 150, height: 100, initialPosition: { x: 100, y: 50 }, dragHandleClassName: "handle", parentElement: viewerRef, children: (width, height) => (_jsxs("foreignObject", { width: width, height: height + 30, "data-replace-float-structure": "true", css: style, onDoubleClick: () => openMoleculeEditor(molecule), children: [_jsx(ActionsButton, { onFloatBtnClick: floatMoleculeHandler }), _jsx(OCLnmr, { OCL: OCL, 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
|
|
42
41
|
? currentDiaIDsToHighlight
|
|
43
|
-
: assignedDiaIDsMerged, setHoverAtom: handleOnAtomHover, setMolfile:
|
|
42
|
+
: assignedDiaIDsMerged, setHoverAtom: handleOnAtomHover, setMolfile: (molfile) => {
|
|
43
|
+
dispatch({
|
|
44
|
+
type: SET_MOLECULE,
|
|
45
|
+
payload: {
|
|
46
|
+
molfile,
|
|
47
|
+
id: molecule.id,
|
|
48
|
+
label: molecule.label,
|
|
49
|
+
},
|
|
50
|
+
});
|
|
51
|
+
} })] })) }, molecule.id));
|
|
44
52
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { FloatingMolecules, StateMoleculeExtended } from '../../../data/molecules/Molecule';
|
|
3
3
|
import { Ranges } from '../../../data/types/data1d';
|
|
4
4
|
import { Zones } from '../../../data/types/data2d';
|
|
5
5
|
import { DISPLAYER_MODE } from '../../reducer/core/Constants';
|
|
6
6
|
interface FloatMoleculeStructuresProps {
|
|
7
7
|
zones: Zones;
|
|
8
8
|
ranges: Ranges;
|
|
9
|
-
molecules: Array<
|
|
9
|
+
molecules: Array<StateMoleculeExtended>;
|
|
10
|
+
floatingMolecules: Array<FloatingMolecules>;
|
|
10
11
|
activeTab: string;
|
|
11
12
|
displayerMode: DISPLAYER_MODE;
|
|
12
13
|
}
|
|
@@ -4,21 +4,28 @@ import { useChartData } from '../../context/ChartContext';
|
|
|
4
4
|
import useSpectrum from '../../hooks/useSpectrum';
|
|
5
5
|
import { DraggableStructure } from './DraggableStructure';
|
|
6
6
|
export function FloatMoleculeStructuresInner(props) {
|
|
7
|
-
const { zones, ranges, molecules, activeTab, displayerMode } = props;
|
|
8
|
-
if (!
|
|
7
|
+
const { zones, ranges, floatingMolecules, molecules, activeTab, displayerMode, } = props;
|
|
8
|
+
if (!floatingMolecules || floatingMolecules.length === 0)
|
|
9
9
|
return null;
|
|
10
|
-
return (_jsx("g", { children:
|
|
11
|
-
.filter((molecule) => molecule.
|
|
12
|
-
.map((molecule) => (_jsx(DraggableStructure, { ...{
|
|
10
|
+
return (_jsx("g", { children: floatingMolecules
|
|
11
|
+
.filter((molecule) => molecule.visible)
|
|
12
|
+
.map((molecule) => (_jsx(DraggableStructure, { ...{
|
|
13
|
+
zones,
|
|
14
|
+
ranges,
|
|
15
|
+
activeTab,
|
|
16
|
+
displayerMode,
|
|
17
|
+
molecule: molecules.find((m) => m.id === molecule.id),
|
|
18
|
+
} }, molecule.id))) }));
|
|
13
19
|
}
|
|
14
20
|
const MemoizedFloatMoleculeStructures = memo(FloatMoleculeStructuresInner);
|
|
15
21
|
const emptyData = { ranges: {}, zones: {} };
|
|
16
22
|
export default function FloatMoleculeStructures() {
|
|
17
|
-
const { molecules, displayerMode, activeTab } = useChartData();
|
|
23
|
+
const { molecules, displayerMode, activeTab, view: { floatingMolecules }, } = useChartData();
|
|
18
24
|
const data = useSpectrum(emptyData);
|
|
19
25
|
const ranges = data?.ranges || {};
|
|
20
26
|
const zones = data?.zones || {};
|
|
21
27
|
return (_jsx(MemoizedFloatMoleculeStructures, { ...{
|
|
28
|
+
floatingMolecules,
|
|
22
29
|
molecules,
|
|
23
30
|
displayerMode,
|
|
24
31
|
activeTab,
|
|
@@ -16,7 +16,6 @@ import useExport from '../hooks/useExport';
|
|
|
16
16
|
import useToolsFunctions from '../hooks/useToolsFunctions';
|
|
17
17
|
import ImportPublicationStringModal from '../modal/ImportPublicationStringModal';
|
|
18
18
|
import LoadJCAMPModal from '../modal/LoadJCAMPModal';
|
|
19
|
-
import { DISPLAYER_MODE } from '../reducer/core/Constants';
|
|
20
19
|
import { LOAD_JCAMP_FILE, SET_LOADING_FLAG } from '../reducer/types/Types';
|
|
21
20
|
const IMPORT_MENU = [
|
|
22
21
|
{
|
|
@@ -67,7 +66,7 @@ const EXPORT_MENU = [
|
|
|
67
66
|
label: 'Copy image to Clipboard ( Press Ctrl + C )',
|
|
68
67
|
},
|
|
69
68
|
];
|
|
70
|
-
function BasicToolBarInner({ info, verticalAlign,
|
|
69
|
+
function BasicToolBarInner({ info, verticalAlign, ftCounter, fidCounter, activeSpectrum, }) {
|
|
71
70
|
const dispatch = useDispatch();
|
|
72
71
|
const alert = useAlert();
|
|
73
72
|
const modal = useModal();
|
|
@@ -151,13 +150,9 @@ function BasicToolBarInner({ info, verticalAlign, displayerMode, ftCounter, fidC
|
|
|
151
150
|
}, items: importMenu })), isButtonVisible('exportAs') && (_jsx(ToolbarMenu, { component: _jsx(FaFileExport, {}), toolTip: "Export As", onClick: (element) => {
|
|
152
151
|
exportHandler(element);
|
|
153
152
|
return null;
|
|
154
|
-
}, items: EXPORT_MENU })),
|
|
155
|
-
isButtonVisible('spectraStackAlignments') &&
|
|
153
|
+
}, items: EXPORT_MENU })), isButtonVisible('spectraStackAlignments') &&
|
|
156
154
|
ftCounter > 1 &&
|
|
157
|
-
(info?.isFt || !activeSpectrum) && (_jsx(Toolbar.Item, { id: "spectra-alignment", className: "cheminfo", title: "Spectra alignment ( Press s )", onClick: changeDisplayViewModeHandler, children: verticalAlign.align === 'stack' ? (_jsx(SvgNmrOverlay3Aligned, {})) : (_jsx(SvgNmrOverlay3, {})) })),
|
|
158
|
-
isButtonVisible('realImaginary') &&
|
|
159
|
-
info.isComplex && (_jsx(Toolbar.Item, { id: "display", title: isRealSpectrumShown ? 'Display Real ' : 'Display Imaginary', onClick: changeSpectrumViewHandler, className: "cheminfo", children: _jsx(SvgNmrRealImag, {}) })), displayerMode === DISPLAYER_MODE.DM_1D &&
|
|
160
|
-
isButtonVisible('spectraCenterAlignments') &&
|
|
155
|
+
(info?.isFt || !activeSpectrum) && (_jsx(Toolbar.Item, { id: "spectra-alignment", className: "cheminfo", title: "Spectra alignment ( Press s )", onClick: changeDisplayViewModeHandler, children: verticalAlign.align === 'stack' ? (_jsx(SvgNmrOverlay3Aligned, {})) : (_jsx(SvgNmrOverlay3, {})) })), isButtonVisible('realImaginary') && info.isComplex && (_jsx(Toolbar.Item, { id: "display", title: isRealSpectrumShown ? 'Display Real ' : 'Display Imaginary', onClick: changeSpectrumViewHandler, className: "cheminfo", children: _jsx(SvgNmrRealImag, {}) })), isButtonVisible('spectraCenterAlignments') &&
|
|
161
156
|
(ftCounter > 0 || fidCounter > 0) && (_jsx(Toolbar.Item, { id: "baseline-position", title: verticalAlign.align === 'bottom'
|
|
162
157
|
? 'Baseline Center ( Press c )'
|
|
163
158
|
: 'Baseline Bottom ( Press c )', onClick: alignSpectrumsVerticallyHandler, className: "cheminfo", children: _jsx("div", { style: { fontSize: 24 }, children: verticalAlign.align === 'bottom' ? (_jsx(SvgNmrAlignCenter, {})) : (_jsx(SvgNmrAlignBottom, {})) }) }))] }));
|