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
|
@@ -4,10 +4,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.resetSpectraScale = exports.setSpectraSameTopHandler = exports.setTab = exports.setActiveTab = exports.levelChangeHandler = exports.handelSetActiveTab = exports.zoomOut = exports.handleZoom = exports.setVerticalIndicatorXPosition = exports.handleBrushEnd = exports.handleToggleRealImaginaryVisibility = exports.handleDeleteBaseLineZone = exports.handleAddBaseLineZone = exports.handleChangeSpectrumDisplayMode = exports.setSpectrumsVerticalAlign = exports.setSelectedOptionPanel = exports.setSelectedTool = exports.resetSelectedTool = void 0;
|
|
7
|
-
const
|
|
7
|
+
const uuid_1 = require("@lukeed/uuid");
|
|
8
8
|
const immer_1 = require("immer");
|
|
9
9
|
const ml_spectra_processing_1 = require("ml-spectra-processing");
|
|
10
|
-
const generateID_1 = __importDefault(require("../../../data/utilities/generateID"));
|
|
11
10
|
const scale_1 = require("../../1d/utilities/scale");
|
|
12
11
|
const DimensionLayout_1 = require("../../2d/utilities/DimensionLayout");
|
|
13
12
|
const scale_2 = require("../../2d/utilities/scale");
|
|
@@ -19,68 +18,6 @@ const ZoomHistoryManager_1 = __importDefault(require("../helper/ZoomHistoryManag
|
|
|
19
18
|
const DomainActions_1 = require("./DomainActions");
|
|
20
19
|
const FiltersActions_1 = require("./FiltersActions");
|
|
21
20
|
const PreferencesActions_1 = require("./PreferencesActions");
|
|
22
|
-
function getStrongestPeak(draft) {
|
|
23
|
-
const { activeSpectrum, data } = draft;
|
|
24
|
-
if (activeSpectrum) {
|
|
25
|
-
const activeData = data[activeSpectrum?.index].data;
|
|
26
|
-
const strongestPeakValue = (0, d3_1.max)(activeData.re);
|
|
27
|
-
const index = activeData.re.findIndex((val) => val === strongestPeakValue);
|
|
28
|
-
return {
|
|
29
|
-
xValue: activeData.x[index],
|
|
30
|
-
yValue: strongestPeakValue,
|
|
31
|
-
index,
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
function checkFilterHasTempData(selectedToolId) {
|
|
36
|
-
return [ToolTypes_1.options.phaseCorrection.id, ToolTypes_1.options.baselineCorrection.id].includes(selectedToolId);
|
|
37
|
-
}
|
|
38
|
-
function setFilterChanges(draft, selectedFilterID) {
|
|
39
|
-
const activeSpectrumId = draft.activeSpectrum?.id;
|
|
40
|
-
// 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
|
|
41
|
-
if (checkFilterHasTempData(selectedFilterID)) {
|
|
42
|
-
//return back the spectra data to point of time before applying a specific filter
|
|
43
|
-
const dataSavePoint = (0, FiltersActions_1.resetSpectrumByFilter)(draft, selectedFilterID, {
|
|
44
|
-
updateDomain: false,
|
|
45
|
-
rollback: true,
|
|
46
|
-
searchBy: 'name',
|
|
47
|
-
returnCurrentDatum: true,
|
|
48
|
-
});
|
|
49
|
-
// create a temporary clone of the data
|
|
50
|
-
draft.tempData = (0, immer_1.current)(draft).data;
|
|
51
|
-
if (dataSavePoint) {
|
|
52
|
-
draft.tempData[dataSavePoint?.index] = dataSavePoint?.datum;
|
|
53
|
-
}
|
|
54
|
-
switch (selectedFilterID) {
|
|
55
|
-
case ToolTypes_1.options.phaseCorrection.id: {
|
|
56
|
-
// look for the strongest peak to set it as a pivot
|
|
57
|
-
const { xValue, index } = getStrongestPeak(draft) || {
|
|
58
|
-
xValue: 0,
|
|
59
|
-
index: 0,
|
|
60
|
-
};
|
|
61
|
-
draft.toolOptions.data.pivot = { value: xValue, index };
|
|
62
|
-
break;
|
|
63
|
-
}
|
|
64
|
-
case ToolTypes_1.options.baselineCorrection.id: {
|
|
65
|
-
if (draft.activeSpectrum?.id) {
|
|
66
|
-
const baselineCorrectionFilter = (0, immer_1.current)(draft).data[draft.activeSpectrum.index].filters.find((filter) => filter.name === ToolTypes_1.options.baselineCorrection.id);
|
|
67
|
-
draft.toolOptions.data.baselineCorrection.zones =
|
|
68
|
-
baselineCorrectionFilter
|
|
69
|
-
? baselineCorrectionFilter.value.zones
|
|
70
|
-
: [];
|
|
71
|
-
}
|
|
72
|
-
break;
|
|
73
|
-
}
|
|
74
|
-
default:
|
|
75
|
-
break;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
else if (checkFilterHasTempData(draft.toolOptions.selectedTool)) {
|
|
79
|
-
draft.toolOptions.data.activeFilterID = null;
|
|
80
|
-
const spectrumIndex = draft.data.findIndex((spectrum) => spectrum.id === activeSpectrumId);
|
|
81
|
-
draft.data[spectrumIndex].data = draft.tempData[spectrumIndex].data;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
21
|
function resetTool(draft, setDefaultTool = true) {
|
|
85
22
|
// reset temp range
|
|
86
23
|
setSelectedOptionPanel(draft, null);
|
|
@@ -120,7 +57,7 @@ function setSelectedTool(draft, action) {
|
|
|
120
57
|
setSelectedOptionPanel(draft, selectedTool);
|
|
121
58
|
}
|
|
122
59
|
if (ToolTypes_1.options[selectedTool].isFilter) {
|
|
123
|
-
setFilterChanges(draft, selectedTool);
|
|
60
|
+
(0, FiltersActions_1.setFilterChanges)(draft, selectedTool);
|
|
124
61
|
}
|
|
125
62
|
}
|
|
126
63
|
else {
|
|
@@ -135,9 +72,9 @@ function setSelectedOptionPanel(draft, selectedOptionPanel) {
|
|
|
135
72
|
}
|
|
136
73
|
exports.setSelectedOptionPanel = setSelectedOptionPanel;
|
|
137
74
|
function setSpectrumsVerticalAlign(draft) {
|
|
138
|
-
const align = ['stack', '
|
|
139
|
-
? '
|
|
140
|
-
: '
|
|
75
|
+
const align = ['stack', 'bottom'].includes(draft.verticalAlign.align)
|
|
76
|
+
? 'center'
|
|
77
|
+
: 'bottom';
|
|
141
78
|
(0, PreferencesActions_1.changeSpectrumVerticalAlignment)(draft, { align });
|
|
142
79
|
}
|
|
143
80
|
exports.setSpectrumsVerticalAlign = setSpectrumsVerticalAlign;
|
|
@@ -159,7 +96,7 @@ function handleAddBaseLineZone(draft, { from, to }) {
|
|
|
159
96
|
}
|
|
160
97
|
const zones = draft.toolOptions.data.baselineCorrection.zones;
|
|
161
98
|
zones.push({
|
|
162
|
-
id: (0,
|
|
99
|
+
id: (0, uuid_1.v4)(),
|
|
163
100
|
from: zone[0],
|
|
164
101
|
to: zone[1],
|
|
165
102
|
});
|
|
@@ -321,7 +258,7 @@ function hasAcceptedSpectrum(draft, index) {
|
|
|
321
258
|
}
|
|
322
259
|
function setMargin(draft) {
|
|
323
260
|
if (draft.displayerMode === Constants_1.DISPLAYER_MODE.DM_2D &&
|
|
324
|
-
draft.toolOptions.selectedTool !== ToolTypes_1.options.
|
|
261
|
+
draft.toolOptions.selectedTool !== ToolTypes_1.options.slicing.id) {
|
|
325
262
|
const top = hasAcceptedSpectrum(draft, 0)
|
|
326
263
|
? Constants_1.MARGIN['2D'].top
|
|
327
264
|
: Constants_1.MARGIN['1D'].top;
|
|
@@ -330,7 +267,7 @@ function setMargin(draft) {
|
|
|
330
267
|
: Constants_1.MARGIN['1D'].left;
|
|
331
268
|
draft.margin = { ...Constants_1.MARGIN['2D'], top, left };
|
|
332
269
|
}
|
|
333
|
-
else if (draft.toolOptions.selectedTool === ToolTypes_1.options.
|
|
270
|
+
else if (draft.toolOptions.selectedTool === ToolTypes_1.options.slicing.id) {
|
|
334
271
|
draft.margin = Constants_1.MARGIN['2D'];
|
|
335
272
|
}
|
|
336
273
|
else if (draft.displayerMode === Constants_1.DISPLAYER_MODE.DM_1D) {
|
|
@@ -0,0 +1,18 @@
|
|
|
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 { activeSpectrum, data } = draft;
|
|
7
|
+
if (activeSpectrum) {
|
|
8
|
+
const activeData = data[activeSpectrum?.index].data;
|
|
9
|
+
const strongestPeakValue = (0, d3_1.max)(activeData.re);
|
|
10
|
+
const index = activeData.re.findIndex((val) => val === strongestPeakValue);
|
|
11
|
+
return {
|
|
12
|
+
xValue: activeData.x[index],
|
|
13
|
+
yValue: strongestPeakValue,
|
|
14
|
+
index,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
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.APPLY_ZERO_FILLING_FILTER = exports.DELETE_SPECTRA_FILTER = 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.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_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.RESIZE_ANALYZE_SPECTRA_RANGE = exports.DELETE_ANALYZE_SPECTRA_RANGE = 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 = 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.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 = 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';
|
|
@@ -13,6 +13,7 @@ exports.LOAD_ZIP_FILE = 'LOAD_ZIP_FILE';
|
|
|
13
13
|
exports.LOAD_JDF_FILE = 'LOAD_JDF_FILE';
|
|
14
14
|
exports.ADD_PEAK = 'ADD_PEAK';
|
|
15
15
|
exports.ADD_PEAKS = 'ADD_PEAKS';
|
|
16
|
+
exports.CHANGE_PEAK_SHAPE = 'CHANGE_PEAK_SHAPE';
|
|
16
17
|
exports.DELETE_PEAK_NOTATION = 'DELETE_PEAK_NOTATION';
|
|
17
18
|
exports.SHIFT_SPECTRUM = 'SHIFT_SPECTRUM';
|
|
18
19
|
exports.SET_X_DOMAIN = 'SET_X_DOMAIN';
|
|
@@ -52,14 +53,19 @@ exports.ENABLE_FILTER = 'ENABLE_FILTER';
|
|
|
52
53
|
exports.DELETE_FILTER = 'DELETE_FILTER';
|
|
53
54
|
exports.DELETE_SPECTRA_FILTER = 'DELETE_SPECTRA_FILTER';
|
|
54
55
|
exports.APPLY_ZERO_FILLING_FILTER = 'APPLY_ZERO_FILLING_FILTER';
|
|
56
|
+
exports.APPLY_APODIZATION_FILTER = 'APPLY_APODIZATION_FILTER';
|
|
55
57
|
exports.APPLY_FFT_FILTER = 'APPLY_FFT_FILTER';
|
|
56
58
|
exports.CALCULATE_MANUAL_PHASE_CORRECTION_FILTER = 'CALCULATE_MANUAL_PHASE_CORRECTION_FILTER';
|
|
57
59
|
exports.CALCULATE_BASE_LINE_CORRECTION_FILTER = 'CALCULATE_BASE_LINE_CORRECTION_FILTER';
|
|
60
|
+
exports.CALCULATE_APODIZATION_FILTER = 'CALCULATE_APODIZATION_FILTER`';
|
|
61
|
+
exports.CALCULATE_ZERO_FILLING_FILTER = 'CALCULATE_ZERO_FILLING_FILTER`';
|
|
58
62
|
exports.APPLY_MANUAL_PHASE_CORRECTION_FILTER = 'APPLY_MANUAL_PHASE_CORRECTION_FILTER';
|
|
59
63
|
exports.APPLY_AUTO_PHASE_CORRECTION_FILTER = 'APPLY_AUTO_PHASE_CORRECTION_FILTER';
|
|
60
64
|
exports.APPLY_ABSOLUTE_FILTER = 'APPLY_ABSOLUTE_FILTER';
|
|
65
|
+
exports.DISABLE_FILTER_LIVE_PREVIEW = 'DISABLE_FILTER_LIVE_PREVIEW`';
|
|
61
66
|
exports.SET_VERTICAL_INDICATOR_X_POSITION = 'SET_VERTICAL_INDICATOR_X_POSITION';
|
|
62
67
|
exports.AUTO_PEAK_PICKING = 'AUTO_PEAK_PICKING';
|
|
68
|
+
exports.OPTIMIZE_PEAKS = 'OPTIMIZE_PEAKS';
|
|
63
69
|
exports.AUTO_RANGES_DETECTION = 'AUTO_RANGES_DETECTION';
|
|
64
70
|
exports.AUTO_ZONES_DETECTION = 'AUTO_ZONES_DETECTION';
|
|
65
71
|
exports.DELETE_RANGE = 'DELETE_RANGE';
|
|
@@ -125,3 +131,4 @@ exports.RESURRECTING_SPECTRUM_FROM_RANGES = 'RESURRECTING_SPECTRUM_FROM_RANGES';
|
|
|
125
131
|
exports.RESURRECTING_SPECTRUM_FROM_JCAMP = 'RESURRECTING_SPECTRUM_FROM_JCAMP';
|
|
126
132
|
exports.SHOW_J_GRAPH = 'SHOW_J_GRAPH';
|
|
127
133
|
exports.SET_AUTOMATIC_ASSIGNMENTS = 'SET_AUTOMATIC_ASSIGNMENTS';
|
|
134
|
+
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,
|
|
@@ -33,7 +33,6 @@ const style = (0, react_1.css) `
|
|
|
33
33
|
`;
|
|
34
34
|
function DraggableStructure(props) {
|
|
35
35
|
const { zones, ranges, molecule, activeTab, displayerMode, index } = props;
|
|
36
|
-
const [molfile, setMolFile] = (0, react_2.useState)(molecule.molfile);
|
|
37
36
|
const { viewerRef } = (0, GlobalContext_1.useGlobal)();
|
|
38
37
|
const dispatch = (0, DispatchContext_1.useDispatch)();
|
|
39
38
|
const openMoleculeEditor = (0, MoleculeStructureEditorModal_1.useMoleculeEditor)();
|
|
@@ -41,11 +40,20 @@ function DraggableStructure(props) {
|
|
|
41
40
|
const floatMoleculeHandler = (0, react_2.useCallback)(() => {
|
|
42
41
|
dispatch({
|
|
43
42
|
type: Types_1.FLOAT_MOLECULE_OVER_SPECTRUM,
|
|
44
|
-
payload: {
|
|
43
|
+
payload: { id: molecule.id },
|
|
45
44
|
});
|
|
46
45
|
}, [dispatch, molecule]);
|
|
47
|
-
return ((0, jsx_runtime_1.jsx)(SVGDraggable_1.default, { width: 150, height: 100, initialPosition: { x: 100, y: 50 }, dragHandleClassName: "handle", parentElement: viewerRef, 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: molfile, setSelectedAtom: handleOnClickAtom, atomHighlightColor: currentDiaIDsToHighlight?.length > 0 ? 'red' : '#FFD700', atomHighlightOpacity: 0.35, highlights: currentDiaIDsToHighlight?.length > 0
|
|
46
|
+
return ((0, jsx_runtime_1.jsx)(SVGDraggable_1.default, { width: 150, height: 100, initialPosition: { x: 100, y: 50 }, dragHandleClassName: "handle", parentElement: viewerRef, 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
47
|
? currentDiaIDsToHighlight
|
|
49
|
-
: assignedDiaIDsMerged, setHoverAtom: handleOnAtomHover, setMolfile:
|
|
48
|
+
: assignedDiaIDsMerged, setHoverAtom: handleOnAtomHover, setMolfile: (molfile) => {
|
|
49
|
+
dispatch({
|
|
50
|
+
type: Types_1.SET_MOLECULE,
|
|
51
|
+
payload: {
|
|
52
|
+
molfile,
|
|
53
|
+
id: molecule.id,
|
|
54
|
+
label: molecule.label,
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
} })] })) }, molecule.id));
|
|
50
58
|
}
|
|
51
59
|
exports.DraggableStructure = DraggableStructure;
|
|
@@ -10,22 +10,29 @@ const ChartContext_1 = require("../../context/ChartContext");
|
|
|
10
10
|
const useSpectrum_1 = __importDefault(require("../../hooks/useSpectrum"));
|
|
11
11
|
const DraggableStructure_1 = require("./DraggableStructure");
|
|
12
12
|
function FloatMoleculeStructuresInner(props) {
|
|
13
|
-
const { zones, ranges, molecules, activeTab, displayerMode } = props;
|
|
14
|
-
if (!
|
|
13
|
+
const { zones, ranges, floatingMolecules, molecules, activeTab, displayerMode, } = props;
|
|
14
|
+
if (!floatingMolecules || floatingMolecules.length === 0)
|
|
15
15
|
return null;
|
|
16
|
-
return ((0, jsx_runtime_1.jsx)("g", { children:
|
|
17
|
-
.filter((molecule) => molecule.
|
|
18
|
-
.map((molecule) => ((0, jsx_runtime_1.jsx)(DraggableStructure_1.DraggableStructure, { ...{
|
|
16
|
+
return ((0, jsx_runtime_1.jsx)("g", { children: floatingMolecules
|
|
17
|
+
.filter((molecule) => molecule.visible)
|
|
18
|
+
.map((molecule) => ((0, jsx_runtime_1.jsx)(DraggableStructure_1.DraggableStructure, { ...{
|
|
19
|
+
zones,
|
|
20
|
+
ranges,
|
|
21
|
+
activeTab,
|
|
22
|
+
displayerMode,
|
|
23
|
+
molecule: molecules.find((m) => m.id === molecule.id),
|
|
24
|
+
} }, molecule.id))) }));
|
|
19
25
|
}
|
|
20
26
|
exports.FloatMoleculeStructuresInner = FloatMoleculeStructuresInner;
|
|
21
27
|
const MemoizedFloatMoleculeStructures = (0, react_1.memo)(FloatMoleculeStructuresInner);
|
|
22
28
|
const emptyData = { ranges: {}, zones: {} };
|
|
23
29
|
function FloatMoleculeStructures() {
|
|
24
|
-
const { molecules, displayerMode, activeTab } = (0, ChartContext_1.useChartData)();
|
|
30
|
+
const { molecules, displayerMode, activeTab, view: { floatingMolecules }, } = (0, ChartContext_1.useChartData)();
|
|
25
31
|
const data = (0, useSpectrum_1.default)(emptyData);
|
|
26
32
|
const ranges = data?.ranges || {};
|
|
27
33
|
const zones = data?.zones || {};
|
|
28
34
|
return ((0, jsx_runtime_1.jsx)(MemoizedFloatMoleculeStructures, { ...{
|
|
35
|
+
floatingMolecules,
|
|
29
36
|
molecules,
|
|
30
37
|
displayerMode,
|
|
31
38
|
activeTab,
|
|
@@ -21,7 +21,6 @@ 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 Constants_1 = require("../reducer/core/Constants");
|
|
25
24
|
const Types_1 = require("../reducer/types/Types");
|
|
26
25
|
const IMPORT_MENU = [
|
|
27
26
|
{
|
|
@@ -72,7 +71,7 @@ const EXPORT_MENU = [
|
|
|
72
71
|
label: 'Copy image to Clipboard ( Press Ctrl + C )',
|
|
73
72
|
},
|
|
74
73
|
];
|
|
75
|
-
function BasicToolBarInner({ info, verticalAlign,
|
|
74
|
+
function BasicToolBarInner({ info, verticalAlign, ftCounter, fidCounter, activeSpectrum, }) {
|
|
76
75
|
const dispatch = (0, DispatchContext_1.useDispatch)();
|
|
77
76
|
const alert = (0, Alert_1.useAlert)();
|
|
78
77
|
const modal = (0, Modal_1.useModal)();
|
|
@@ -156,13 +155,9 @@ function BasicToolBarInner({ info, verticalAlign, displayerMode, ftCounter, fidC
|
|
|
156
155
|
}, 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
156
|
exportHandler(element);
|
|
158
157
|
return null;
|
|
159
|
-
}, items: EXPORT_MENU })),
|
|
160
|
-
isButtonVisible('spectraStackAlignments') &&
|
|
158
|
+
}, items: EXPORT_MENU })), isButtonVisible('spectraStackAlignments') &&
|
|
161
159
|
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') &&
|
|
160
|
+
(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
161
|
(ftCounter > 0 || fidCounter > 0) && ((0, jsx_runtime_1.jsx)(analysis_ui_components_1.Toolbar.Item, { id: "baseline-position", title: verticalAlign.align === 'bottom'
|
|
167
162
|
? 'Baseline Center ( Press c )'
|
|
168
163
|
: '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, {})) }) }))] }));
|
|
@@ -39,10 +39,9 @@ const ToggleButtonGroup_1 = __importDefault(require("../elements/toggle/ToggleBu
|
|
|
39
39
|
const useCheckToolsVisibility_1 = require("../hooks/useCheckToolsVisibility");
|
|
40
40
|
const useDatumWithSpectraStatistics_1 = __importDefault(require("../hooks/useDatumWithSpectraStatistics"));
|
|
41
41
|
const useToolsFunctions_1 = __importDefault(require("../hooks/useToolsFunctions"));
|
|
42
|
-
const Constants_1 = require("../reducer/core/Constants");
|
|
43
42
|
const Types_1 = require("../reducer/types/Types");
|
|
44
43
|
const ToolTypes_1 = require("./ToolTypes");
|
|
45
|
-
function FunctionToolBarInner({ defaultValue, activeSpectrum, info, datum,
|
|
44
|
+
function FunctionToolBarInner({ defaultValue, activeSpectrum, info, datum, ftCounter, }) {
|
|
46
45
|
const [option, setOption] = (0, react_1.useState)('');
|
|
47
46
|
const isButtonVisible = (0, useCheckToolsVisibility_1.useCheckToolsVisibility)();
|
|
48
47
|
const dispatch = (0, DispatchContext_1.useDispatch)();
|
|
@@ -61,32 +60,22 @@ function FunctionToolBarInner({ defaultValue, activeSpectrum, info, datum, displ
|
|
|
61
60
|
});
|
|
62
61
|
dispatch({ type: Types_1.SET_SELECTED_FILTER, selectedFilter: null });
|
|
63
62
|
}, [dispatch]);
|
|
64
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(ToggleButtonGroup_1.default, { value: option, onChange: handleChange, children: [isButtonVisible('
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
isButtonVisible('
|
|
68
|
-
isButtonVisible('rangePickingTool') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.rangesPicking.id, isVisible: !!(activeSpectrum && !info?.isFid), title: `${ToolTypes_1.options.rangesPicking.label} ( Press r )`, id: "ranges-pick", children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrRangePicking, {}) }, ToolTypes_1.options.rangesPicking.id)), displayerMode === Constants_1.DISPLAYER_MODE.DM_1D &&
|
|
69
|
-
isButtonVisible('multipleSpectraAnalysisTool') &&
|
|
70
|
-
ftCounter > 1 &&
|
|
71
|
-
mode === 'RTL' && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.multipleSpectraAnalysis.id, id: "multipleSpectraAnalysis", title: ToolTypes_1.options.multipleSpectraAnalysis.label, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrMultipleAnalysis, {}) }, ToolTypes_1.options.multipleSpectraAnalysis.id)), displayerMode === Constants_1.DISPLAYER_MODE.DM_1D &&
|
|
72
|
-
isButtonVisible('zeroFillingTool') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.zeroFilling.id, isVisible: Filters.zeroFilling.isApplicable({ info }), id: "zeroFilling", title: ToolTypes_1.options.zeroFilling.label, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrZeroFilling, {}) }, ToolTypes_1.options.zeroFilling.id)), displayerMode === Constants_1.DISPLAYER_MODE.DM_1D &&
|
|
73
|
-
isButtonVisible('phaseCorrectionTool') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.phaseCorrection.id, id: "phaseCorrection", title: `${ToolTypes_1.options.phaseCorrection.label} ( Press a )`, isVisible: !!(activeSpectrum &&
|
|
63
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(ToggleButtonGroup_1.default, { value: option, onChange: handleChange, children: [isButtonVisible('zoom') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.zoom.id, id: ToolTypes_1.options.zoom.id, title: `${ToolTypes_1.options.zoom.label} ( Press z )`, children: (0, jsx_runtime_1.jsx)("div", { style: { fontSize: 14 }, children: (0, jsx_runtime_1.jsx)(fa_1.FaSearchPlus, {}) }) }, ToolTypes_1.options.zoom.id)), isButtonVisible('zoomOut') && ((0, jsx_runtime_1.jsx)(analysis_ui_components_1.Toolbar.Item, { id: "zoom-out", onClick: handleFullZoomOut, title: "Horizontal zoom out ( Press f ), Horizontal and Vertical zoom out, double click ( Press ff )", children: (0, jsx_runtime_1.jsx)("div", { style: { fontSize: 14 }, children: (0, jsx_runtime_1.jsx)(fa_1.FaExpand, {}) }) })), isButtonVisible('peakPicking') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.peakPicking.id, title: `${ToolTypes_1.options.peakPicking.label} ( Press p )`, isVisible: !!(activeSpectrum && !info?.isFid), id: ToolTypes_1.options.peakPicking.id, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrPeakPicking, {}) }, ToolTypes_1.options.peakPicking.id)), isButtonVisible('integral') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.integral.id, isVisible: !!(activeSpectrum && !info?.isFid), id: ToolTypes_1.options.integral.id, title: `${ToolTypes_1.options.integral.label} ( Press i )`, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrIntegrate, {}) }, ToolTypes_1.options.integral.id)), isButtonVisible('zonePicking') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.zonePicking.id, id: ToolTypes_1.options.zonePicking.id, isVisible: !!(activeSpectrum && !info?.isFid), title: `${ToolTypes_1.options.zonePicking.label} ( Press r )`, children: (0, jsx_runtime_1.jsx)(fa_1.FaDiceFour, {}) }, ToolTypes_1.options.zonePicking.id)), isButtonVisible('slicing') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.slicing.id, isVisible: !!(activeSpectrum && !info?.isFid), id: ToolTypes_1.options.slicing.id, title: `${ToolTypes_1.options.slicing.label}`, children: (0, jsx_runtime_1.jsx)("p", { children: "Slic" }) }, ToolTypes_1.options.slicing.id)), isButtonVisible('rangePicking') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.rangePicking.id, isVisible: !!(activeSpectrum && !info?.isFid), title: `${ToolTypes_1.options.rangePicking.label} ( Press r )`, id: ToolTypes_1.options.rangePicking.id, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrRangePicking, {}) }, ToolTypes_1.options.rangePicking.id)), isButtonVisible('multipleSpectraAnalysis', {
|
|
64
|
+
checkSpectrumType: false,
|
|
65
|
+
}) &&
|
|
66
|
+
ftCounter > 1 && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.multipleSpectraAnalysis.id, id: ToolTypes_1.options.multipleSpectraAnalysis.id, title: ToolTypes_1.options.multipleSpectraAnalysis.label, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrMultipleAnalysis, {}) }, ToolTypes_1.options.multipleSpectraAnalysis.id)), isButtonVisible('apodization') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.apodization.id, isVisible: Filters.apodization.isApplicable({ info }), id: ToolTypes_1.options.apodization.id, title: ToolTypes_1.options.apodization.label, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrApodization, {}) }, ToolTypes_1.options.apodization.id)), isButtonVisible('zeroFilling') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.zeroFilling.id, isVisible: Filters.zeroFilling.isApplicable({ info }), id: ToolTypes_1.options.zeroFilling.id, title: ToolTypes_1.options.zeroFilling.label, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrZeroFilling, {}) }, ToolTypes_1.options.zeroFilling.id)), isButtonVisible('phaseCorrection') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.phaseCorrection.id, id: ToolTypes_1.options.phaseCorrection.id, title: `${ToolTypes_1.options.phaseCorrection.label} ( Press a )`, isVisible: !!(activeSpectrum &&
|
|
74
67
|
info &&
|
|
75
68
|
Filters.phaseCorrection.isApplicable({ info }) &&
|
|
76
|
-
datum.im), children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrPhaseCorrection, {}) }, ToolTypes_1.options.phaseCorrection.id)),
|
|
77
|
-
isButtonVisible('baselineCorrectionTool') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.baselineCorrection.id, id: "baselineCorrection", title: `${ToolTypes_1.options.baselineCorrection.label} ( Press b )`, isVisible: !!(activeSpectrum &&
|
|
69
|
+
datum.im), children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrPhaseCorrection, {}) }, ToolTypes_1.options.phaseCorrection.id)), isButtonVisible('baselineCorrection') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.baselineCorrection.id, id: ToolTypes_1.options.baselineCorrection.id, title: `${ToolTypes_1.options.baselineCorrection.label} ( Press b )`, isVisible: !!(activeSpectrum &&
|
|
78
70
|
info &&
|
|
79
|
-
Filters.baselineCorrection.isApplicable({ info })), children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrBaselineCorrection, {}) }, ToolTypes_1.options.baselineCorrection.id)),
|
|
80
|
-
isButtonVisible('
|
|
81
|
-
!info?.isFid &&
|
|
82
|
-
ftCounter > 0 && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.exclusionZones.id, title: `${ToolTypes_1.options.exclusionZones.label} ( Press e )`, id: "exclusionZones", children: (0, jsx_runtime_1.jsx)("div", { style: { fontSize: 18 }, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrMultipleAnalysis, {}) }) }, ToolTypes_1.options.exclusionZones.id))] }), displayerMode === Constants_1.DISPLAYER_MODE.DM_1D &&
|
|
83
|
-
isButtonVisible('FFTTool') &&
|
|
71
|
+
Filters.baselineCorrection.isApplicable({ info })), children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrBaselineCorrection, {}) }, ToolTypes_1.options.baselineCorrection.id)), isButtonVisible('exclusionZones', { checkSpectrumType: false }) &&
|
|
72
|
+
ftCounter > 0 && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.exclusionZones.id, title: `${ToolTypes_1.options.exclusionZones.label} ( Press e )`, id: ToolTypes_1.options.exclusionZones.id, children: (0, jsx_runtime_1.jsx)("div", { style: { fontSize: 18 }, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrMultipleAnalysis, {}) }) }, ToolTypes_1.options.exclusionZones.id))] }), isButtonVisible('fastFourierTransform') &&
|
|
84
73
|
info &&
|
|
85
|
-
Filters.fft.isApplicable({ info }) && ((0, jsx_runtime_1.jsx)(analysis_ui_components_1.Toolbar.Item, { id:
|
|
74
|
+
Filters.fft.isApplicable({ info }) && ((0, jsx_runtime_1.jsx)(analysis_ui_components_1.Toolbar.Item, { id: ToolTypes_1.options.fastFourierTransform.id, className: "cheminfo", title: ToolTypes_1.options.fastFourierTransform.label, onClick: handleOnFFTFilter, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrFourierTransform, {}) }))] }));
|
|
86
75
|
}
|
|
87
76
|
const MemoizedFunctionToolBar = (0, react_1.memo)(FunctionToolBarInner);
|
|
88
77
|
function FunctionToolBar({ defaultValue = ToolTypes_1.options.zoom.id, }) {
|
|
89
|
-
const { activeSpectrum, displayerMode, activeTab
|
|
78
|
+
const { activeSpectrum, displayerMode, activeTab } = (0, ChartContext_1.useChartData)();
|
|
90
79
|
const data = (0, useDatumWithSpectraStatistics_1.default)();
|
|
91
80
|
return ((0, jsx_runtime_1.jsx)(MemoizedFunctionToolBar, { ...{
|
|
92
81
|
...data,
|
|
@@ -94,7 +83,6 @@ function FunctionToolBar({ defaultValue = ToolTypes_1.options.zoom.id, }) {
|
|
|
94
83
|
displayerMode,
|
|
95
84
|
activeTab,
|
|
96
85
|
defaultValue,
|
|
97
|
-
mode,
|
|
98
86
|
} }));
|
|
99
87
|
}
|
|
100
88
|
exports.default = FunctionToolBar;
|