nmrium 0.36.0 → 0.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/component/1d/FooterBanner.js +1 -1
- package/lib/component/1d/Viewer1D.js +26 -21
- package/lib/component/1d/integral/Integral.d.ts +2 -6
- package/lib/component/1d/integral/IntegralResizable.d.ts +2 -6
- package/lib/component/1d/integral/IntegralResizable.js +2 -3
- package/lib/component/1d/multiAnalysis/MultiAnalysisRanges.js +1 -1
- package/lib/component/1d/multiplicityTree/MultiplicityTree.js +7 -9
- package/lib/component/1d/peaks/PeakAnnotation.js +1 -2
- package/lib/component/1d/ranges/Range.js +9 -8
- package/lib/component/1d/ranges/Ranges.js +5 -7
- package/lib/component/1d/tool/BaseLineZones.js +1 -2
- package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.js +4 -5
- package/lib/component/1d-2d/components/FloatMoleculeStructures/index.js +13 -17
- package/lib/component/2d/1d-tracer/Left1DChart.js +1 -1
- package/lib/component/2d/1d-tracer/VerticalSliceChart.js +1 -1
- package/lib/component/2d/Chart2D.js +1 -1
- package/lib/component/2d/Viewer2D.js +10 -9
- package/lib/component/2d/fid/FidCanvas.js +4 -6
- package/lib/component/2d/ft/Contours.js +1 -7
- package/lib/component/2d/utilities/DimensionLayout.d.ts +9 -24
- package/lib/component/2d/utilities/scale.d.ts +2 -1
- package/lib/component/2d/utilities/scale.js +1 -1
- package/lib/component/2d/zones/Zones.js +1 -1
- package/lib/component/EventsTrackers/KeysListenerTracker.js +28 -21
- package/lib/component/NMRium.d.ts +2 -0
- package/lib/component/NMRium.js +22 -15
- package/lib/component/assignment/AssignmentsReducer.d.ts +1 -1
- package/lib/component/context/DispatchContext.d.ts +23 -3
- package/lib/component/context/DispatchContext.js +1 -1
- package/lib/component/context/LoggerContext.js +1 -1
- package/lib/component/elements/Button.js +7 -9
- package/lib/component/elements/IsotopesViewer.js +1 -1
- package/lib/component/elements/ReactTable/ReactTable.js +1 -2
- package/lib/component/elements/RemoveAssignmentsButton.d.ts +4 -0
- package/lib/component/{panels/RangesPanel/TableColumns → elements}/RemoveAssignmentsButton.js +14 -1
- package/lib/component/elements/formik/FormikCheckBox.js +1 -1
- package/lib/component/elements/formik/FormikColorInput.js +1 -1
- package/lib/component/elements/formik/FormikColorPicker.js +1 -1
- package/lib/component/elements/formik/FormikColumnFormatField.js +1 -1
- package/lib/component/elements/formik/FormikInput.js +1 -1
- package/lib/component/elements/formik/FormikSelect.js +2 -2
- package/lib/component/elements/formik/FormikSlider.js +1 -1
- package/lib/component/elements/formik/FormikTextarea.js +2 -2
- package/lib/component/header/ApodizationOptionsPanel.js +4 -5
- package/lib/component/header/AutoPeakPickingOptionPanel.js +1 -2
- package/lib/component/header/BaseLineCorrectionPanel.js +4 -5
- package/lib/component/header/Header.js +5 -7
- package/lib/component/header/PhaseCorrectionPanel.js +7 -8
- package/lib/component/header/RangesPickingOptionPanel.js +1 -2
- package/lib/component/header/ZeroFillingOptionsPanel.js +3 -11
- package/lib/component/header/Zones2DOptionPanel.js +5 -6
- package/lib/component/hooks/useExport.js +1 -0
- package/lib/component/hooks/useToolsFunctions.js +8 -10
- package/lib/component/loader/DropZone.js +4 -5
- package/lib/component/loader/NoData.js +1 -1
- package/lib/component/modal/AboutPredictionModal.d.ts +2 -0
- package/lib/component/modal/AboutPredictionModal.js +49 -0
- package/lib/component/modal/AlignSpectraModal.js +1 -2
- package/lib/component/modal/EditPeakShapeModal.js +1 -2
- package/lib/component/modal/ImportPublicationStringModal.js +1 -2
- package/lib/component/modal/LoadJCAMPModal.js +2 -3
- package/lib/component/modal/MoleculeStructureEditorModal.js +24 -19
- package/lib/component/modal/PredictSpectraModal.js +24 -21
- package/lib/component/modal/changeSum/SelectMolecule.js +1 -1
- package/lib/component/modal/editRange/EditRangeModal.js +3 -4
- package/lib/component/modal/editRange/forms/components/AddSignalFormTab.js +2 -2
- package/lib/component/modal/editRange/forms/components/CouplingsTable.js +1 -1
- package/lib/component/modal/metaImportation/MetaImportationModal.js +2 -3
- package/lib/component/modal/setting/settings-tabs/DatabasesTabContent.js +4 -4
- package/lib/component/modal/setting/settings-tabs/FormattingTabContent.js +2 -2
- package/lib/component/modal/setting/settings-tabs/InfoBlockTabContent.js +2 -2
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignmentTable.js +1 -2
- package/lib/component/panels/AutomaticAssignment/useAutoAssignments.js +7 -6
- package/lib/component/panels/InformationPanel.js +6 -6
- package/lib/component/panels/IntegralsPanel/IntegralPanel.js +11 -20
- package/lib/component/panels/IntegralsPanel/IntegralTable.js +27 -23
- package/lib/component/panels/IntegralsPanel/IntegralsPreferences.js +8 -5
- package/lib/component/panels/MatrixGenerationPanel/ExclusionsZonesTable.js +1 -1
- package/lib/component/panels/MatrixGenerationPanel/FiltersOptions.js +4 -4
- package/lib/component/panels/MatrixGenerationPanel/MatrixGenerationPanel.js +1 -2
- package/lib/component/panels/MoleculesPanel/MoleculeHeader.js +1 -2
- package/lib/component/panels/MoleculesPanel/MoleculePanel.js +10 -13
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.d.ts +1 -0
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +7 -7
- package/lib/component/panels/MoleculesPanel/Utilities.d.ts +4 -1
- package/lib/component/panels/MoleculesPanel/Utilities.js +2 -2
- package/lib/component/panels/MoleculesPanel/useAtomAssignment.js +8 -9
- package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.js +3 -4
- package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisTable.js +1 -2
- package/lib/component/panels/MultipleSpectraAnalysisPanel/preferences/AnalysisTablePreferences.js +2 -2
- package/lib/component/panels/MultipleSpectraAnalysisPanel/preferences/LegendsPreferences.js +2 -2
- package/lib/component/panels/MultipleSpectraAnalysisPanel/preferences/MultipleAnalysisCodeEditor.js +1 -1
- package/lib/component/panels/Panels.js +1 -1
- package/lib/component/panels/PeaksPanel/PeaksPanel.js +4 -5
- package/lib/component/panels/PeaksPanel/PeaksTable.js +4 -5
- package/lib/component/panels/RangesPanel/RangesHeader.js +12 -15
- package/lib/component/panels/RangesPanel/RangesPanel.js +24 -29
- package/lib/component/panels/RangesPanel/RangesTableRow.d.ts +0 -1
- package/lib/component/panels/RangesPanel/RangesTableRow.js +0 -11
- package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js +2 -3
- package/lib/component/panels/RangesPanel/TableColumns/RelativeColumn.js +3 -3
- package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.js +2 -3
- package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.js +1 -2
- package/lib/component/panels/RangesPanel/hooks/useEditRangeModal.d.ts +1 -1
- package/lib/component/panels/RangesPanel/hooks/useEditRangeModal.js +16 -14
- package/lib/component/panels/SpectrumsPanel/SpectraPanelHeader.js +16 -16
- package/lib/component/panels/SpectrumsPanel/SpectraPreferences.js +2 -2
- package/lib/component/panels/SpectrumsPanel/SpectraTable.js +7 -5
- package/lib/component/panels/SpectrumsPanel/SpectrumsTabs.js +4 -5
- package/lib/component/panels/SpectrumsPanel/base/ShowHideSpectrumButton.js +3 -7
- package/lib/component/panels/SpectrumsPanel/base/SpectraColumnsManager.js +1 -1
- package/lib/component/panels/SpectrumsPanel/base/setting/SpectrumSetting.js +4 -2
- package/lib/component/panels/SpectrumsPanel/base/setting/processSnapPlot.js +2 -2
- package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +4 -8
- package/lib/component/panels/SummaryPanel/SummaryPanel.js +39 -34
- package/lib/component/panels/SummaryPanel/utilities/Utilities.js +1 -1
- package/lib/component/panels/ZonesPanel/TableColumns/ActionsColumn.d.ts +2 -21
- package/lib/component/panels/ZonesPanel/TableColumns/ActionsColumn.js +22 -20
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumn.d.ts +4 -5
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumn.js +12 -16
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.d.ts +3 -7
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.js +2 -2
- package/lib/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.d.ts +2 -2
- package/lib/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.js +6 -7
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.d.ts +4 -5
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.js +27 -19
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumns.d.ts +3 -7
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumns.js +2 -2
- package/lib/component/panels/ZonesPanel/ZonesPanel.js +15 -18
- package/lib/component/panels/ZonesPanel/ZonesTable.js +2 -51
- package/lib/component/panels/ZonesPanel/ZonesTableRow.d.ts +3 -3
- package/lib/component/panels/ZonesPanel/ZonesTableRow.js +2 -22
- package/lib/component/panels/ZonesPanel/hooks/useMapZones.d.ts +16 -0
- package/lib/component/panels/ZonesPanel/hooks/useMapZones.js +52 -0
- package/lib/component/panels/databasePanel/DatabasePanel.js +9 -7
- package/lib/component/panels/filtersPanel/FilterPanel.js +1 -2
- package/lib/component/panels/filtersPanel/FiltersTable.js +8 -9
- package/lib/component/panels/header/DefaultPanelHeader.js +1 -1
- package/lib/component/panels/header/SpectraAutomaticPickingButton.js +2 -3
- package/lib/component/panels/predictionPanel/PredictionPanel.js +10 -6
- package/lib/component/reducer/IgnoreActions.d.ts +2 -1
- package/lib/component/reducer/IgnoreActions.js +35 -32
- package/lib/component/reducer/Reducer.d.ts +8 -5
- package/lib/component/reducer/Reducer.js +199 -221
- package/lib/component/reducer/actions/AssignmentsActions.d.ts +7 -6
- package/lib/component/reducer/actions/AssignmentsActions.js +2 -2
- package/lib/component/reducer/actions/CorrelationsActions.d.ts +21 -13
- package/lib/component/reducer/actions/CorrelationsActions.js +25 -20
- package/lib/component/reducer/actions/DatabaseActions.d.ts +15 -2
- package/lib/component/reducer/actions/DatabaseActions.js +5 -2
- package/lib/component/reducer/actions/DimensionsActions.d.ts +8 -3
- package/lib/component/reducer/actions/DimensionsActions.js +3 -5
- package/lib/component/reducer/actions/DomainActions.d.ts +11 -5
- package/lib/component/reducer/actions/DomainActions.js +13 -19
- package/lib/component/reducer/actions/FiltersActions.d.ts +70 -23
- package/lib/component/reducer/actions/FiltersActions.js +250 -255
- package/lib/component/reducer/actions/GlobalActions.d.ts +7 -2
- package/lib/component/reducer/actions/GlobalActions.js +3 -3
- package/lib/component/reducer/actions/IntegralsActions.d.ts +28 -7
- package/lib/component/reducer/actions/IntegralsActions.js +16 -15
- package/lib/component/reducer/actions/LoadActions.d.ts +23 -5
- package/lib/component/reducer/actions/LoadActions.js +65 -57
- package/lib/component/reducer/actions/MoleculeActions.d.ts +38 -9
- package/lib/component/reducer/actions/MoleculeActions.js +53 -20
- package/lib/component/reducer/actions/PeaksActions.d.ts +39 -8
- package/lib/component/reducer/actions/PeaksActions.js +19 -11
- package/lib/component/reducer/actions/PreferencesActions.d.ts +8 -3
- package/lib/component/reducer/actions/PreferencesActions.js +22 -7
- package/lib/component/reducer/actions/RangesActions.d.ts +85 -18
- package/lib/component/reducer/actions/RangesActions.js +80 -65
- package/lib/component/reducer/actions/SpectraAnalysisAction.d.ts +7 -1
- package/lib/component/reducer/actions/SpectrumsActions.d.ts +57 -24
- package/lib/component/reducer/actions/SpectrumsActions.js +69 -60
- package/lib/component/reducer/actions/ToolsActions.d.ts +59 -21
- package/lib/component/reducer/actions/ToolsActions.js +54 -32
- package/lib/component/reducer/actions/ZonesActions.d.ts +79 -15
- package/lib/component/reducer/actions/ZonesActions.js +68 -49
- package/lib/component/reducer/helper/Zoom1DManager.d.ts +6 -5
- package/lib/component/reducer/helper/Zoom1DManager.js +1 -1
- package/lib/component/reducer/helper/ZoomHistoryManager.js +2 -2
- package/lib/component/reducer/helper/get2DRange.d.ts +7 -1
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js +1 -0
- package/lib/component/reducer/preferences/preferencesReducer.d.ts +1 -1
- package/lib/component/reducer/types/ActionType.d.ts +6 -0
- package/lib/component/reducer/types/ActionType.js +1 -0
- package/lib/component/toolbar/BasicToolBar.js +6 -9
- package/lib/component/toolbar/FunctionToolBar.js +4 -9
- package/lib/component/toolbar/ToolBar.js +1 -1
- package/lib/component/toolbar/ToolTypes.d.ts +2 -2
- package/lib/component/utility/Events.d.ts +4 -4
- package/lib/component/utility/Events.js +2 -2
- package/lib/component/utility/GroupByInfoKey.js +1 -1
- package/lib/component/utility/getSpectraObjectPaths.js +1 -1
- package/lib/component/workspaces/Workspace.d.ts +2 -1
- package/lib/component/workspaces/exercise.js +31 -0
- package/lib/component/workspaces/workspaceDefaultProperties.js +1 -0
- package/lib/data/PredictionManager.d.ts +5 -8
- package/lib/data/PredictionManager.js +3 -3
- package/lib/data/data1d/Spectrum1D/getSpectrumErrorValue.js +1 -1
- package/lib/data/data1d/Spectrum1D/initiateDatum1D.js +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/changeRangeRelativeValue.d.ts +2 -3
- package/lib/data/data1d/Spectrum1D/ranges/changeRangeRelativeValue.js +5 -4
- package/lib/data/data1d/Spectrum1D/ranges/generateSpectrumFromRanges.d.ts +5 -3
- package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.d.ts +1 -35
- package/lib/data/data1d/Spectrum1D/ranges/mapRanges.d.ts +2 -35
- package/lib/data/data1d/filter1d/baselineCorrection.d.ts +7 -10
- package/lib/data/data1d/multipleSpectraAnalysis.d.ts +1 -1
- package/lib/data/data2d/Processing2D.d.ts +3 -3
- package/lib/data/data2d/Spectrum2D/contours.d.ts +1 -4
- package/lib/data/data2d/Spectrum2D/contours.js +0 -1
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.js +1 -1
- package/lib/data/data2d/Spectrum2D/zones/changeZoneSignal.d.ts +5 -1
- package/lib/data/data2d/Spectrum2D/zones/changeZoneSignal.js +6 -8
- package/lib/data/data2d/Spectrum2D/zones/detectZonesManual.d.ts +2 -0
- package/lib/data/data2d/Spectrum2D/zones/initiateZones.d.ts +2 -0
- package/lib/data/data2d/Spectrum2D/zones/mapZones.d.ts +2 -0
- package/lib/data/matrixGeneration.js +4 -2
- package/lib/data/molecules/Molecule.d.ts +3 -3
- package/lib/data/molecules/MoleculeManager.d.ts +5 -5
- package/lib/data/molecules/MoleculeManager.js +1 -1
- package/lib/data/utilities/ZoneUtilities.js +0 -1
- package/lib/data/utilities/generateColor.js +1 -1
- package/lib/data/utilities/isNumber.d.ts +1 -0
- package/lib/data/utilities/isNumber.js +3 -0
- package/lib/types/NMRiumGeneralPreferences.d.ts +1 -0
- package/lib/versionInfo.js +1 -1
- package/lib-cjs/component/1d/FooterBanner.js +1 -1
- package/lib-cjs/component/1d/Viewer1D.js +25 -20
- package/lib-cjs/component/1d/integral/IntegralResizable.js +2 -3
- package/lib-cjs/component/1d/multiAnalysis/MultiAnalysisRanges.js +1 -1
- package/lib-cjs/component/1d/multiplicityTree/MultiplicityTree.js +7 -9
- package/lib-cjs/component/1d/peaks/PeakAnnotation.js +1 -2
- package/lib-cjs/component/1d/ranges/Range.js +9 -8
- package/lib-cjs/component/1d/ranges/Ranges.js +5 -7
- package/lib-cjs/component/1d/tool/BaseLineZones.js +1 -2
- package/lib-cjs/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.js +4 -5
- package/lib-cjs/component/1d-2d/components/FloatMoleculeStructures/index.js +13 -17
- package/lib-cjs/component/2d/1d-tracer/Left1DChart.js +1 -1
- package/lib-cjs/component/2d/1d-tracer/VerticalSliceChart.js +1 -1
- package/lib-cjs/component/2d/Chart2D.js +1 -1
- package/lib-cjs/component/2d/Viewer2D.js +10 -9
- package/lib-cjs/component/2d/fid/FidCanvas.js +4 -6
- package/lib-cjs/component/2d/ft/Contours.js +1 -7
- package/lib-cjs/component/2d/utilities/scale.js +1 -1
- package/lib-cjs/component/2d/zones/Zones.js +1 -1
- package/lib-cjs/component/EventsTrackers/KeysListenerTracker.js +28 -21
- package/lib-cjs/component/NMRium.js +19 -12
- package/lib-cjs/component/context/DispatchContext.js +1 -1
- package/lib-cjs/component/context/LoggerContext.js +1 -1
- package/lib-cjs/component/elements/Button.js +7 -9
- package/lib-cjs/component/elements/IsotopesViewer.js +1 -1
- package/lib-cjs/component/elements/ReactTable/ReactTable.js +1 -2
- package/lib-cjs/component/{panels/RangesPanel/TableColumns → elements}/RemoveAssignmentsButton.js +15 -2
- package/lib-cjs/component/elements/Tab/Tabs.js +1 -1
- package/lib-cjs/component/elements/formik/FormikCheckBox.js +1 -1
- package/lib-cjs/component/elements/formik/FormikColorInput.js +1 -1
- package/lib-cjs/component/elements/formik/FormikColorPicker.js +1 -1
- package/lib-cjs/component/elements/formik/FormikColumnFormatField.js +1 -1
- package/lib-cjs/component/elements/formik/FormikInput.js +1 -1
- package/lib-cjs/component/elements/formik/FormikSelect.js +2 -2
- package/lib-cjs/component/elements/formik/FormikSlider.js +1 -1
- package/lib-cjs/component/elements/formik/FormikTextarea.js +2 -2
- package/lib-cjs/component/header/ApodizationOptionsPanel.js +3 -4
- package/lib-cjs/component/header/AutoPeakPickingOptionPanel.js +1 -2
- package/lib-cjs/component/header/BaseLineCorrectionPanel.js +4 -5
- package/lib-cjs/component/header/Header.js +5 -7
- package/lib-cjs/component/header/PhaseCorrectionPanel.js +7 -8
- package/lib-cjs/component/header/RangesPickingOptionPanel.js +1 -2
- package/lib-cjs/component/header/ZeroFillingOptionsPanel.js +3 -11
- package/lib-cjs/component/header/Zones2DOptionPanel.js +5 -6
- package/lib-cjs/component/highlight/index.js +1 -1
- package/lib-cjs/component/hooks/useExport.js +1 -0
- package/lib-cjs/component/hooks/useTableSortBy.js +1 -1
- package/lib-cjs/component/hooks/useToolsFunctions.js +8 -10
- package/lib-cjs/component/hooks/useXYReduce.js +1 -1
- package/lib-cjs/component/loader/DropZone.js +4 -5
- package/lib-cjs/component/loader/NoData.js +1 -1
- package/lib-cjs/component/modal/AboutPredictionModal.js +54 -0
- package/lib-cjs/component/modal/AlignSpectraModal.js +1 -2
- package/lib-cjs/component/modal/EditPeakShapeModal.js +1 -2
- package/lib-cjs/component/modal/ImportPublicationStringModal.js +1 -2
- package/lib-cjs/component/modal/LoadJCAMPModal.js +2 -3
- package/lib-cjs/component/modal/MoleculeStructureEditorModal.js +24 -19
- package/lib-cjs/component/modal/PredictSpectraModal.js +24 -21
- package/lib-cjs/component/modal/changeSum/SelectMolecule.js +1 -1
- package/lib-cjs/component/modal/editRange/EditRangeModal.js +3 -4
- package/lib-cjs/component/modal/editRange/forms/components/AddSignalFormTab.js +2 -2
- package/lib-cjs/component/modal/editRange/forms/components/CouplingsTable.js +1 -1
- package/lib-cjs/component/modal/metaImportation/MetaImportationModal.js +2 -3
- package/lib-cjs/component/modal/setting/settings-tabs/DatabasesTabContent.js +4 -4
- package/lib-cjs/component/modal/setting/settings-tabs/FormattingTabContent.js +2 -2
- package/lib-cjs/component/modal/setting/settings-tabs/InfoBlockTabContent.js +2 -2
- package/lib-cjs/component/panels/AutomaticAssignment/AutomaticAssignmentTable.js +1 -2
- package/lib-cjs/component/panels/AutomaticAssignment/useAutoAssignments.js +7 -6
- package/lib-cjs/component/panels/InformationPanel.js +6 -6
- package/lib-cjs/component/panels/IntegralsPanel/IntegralPanel.js +11 -20
- package/lib-cjs/component/panels/IntegralsPanel/IntegralTable.js +27 -23
- package/lib-cjs/component/panels/IntegralsPanel/IntegralsPreferences.js +7 -4
- package/lib-cjs/component/panels/MatrixGenerationPanel/ExclusionsZonesTable.js +1 -1
- package/lib-cjs/component/panels/MatrixGenerationPanel/FiltersOptions.js +4 -4
- package/lib-cjs/component/panels/MatrixGenerationPanel/MatrixGenerationPanel.js +1 -2
- package/lib-cjs/component/panels/MoleculesPanel/MoleculeHeader.js +1 -2
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanel.js +10 -13
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanelHeader.js +7 -7
- package/lib-cjs/component/panels/MoleculesPanel/Utilities.js +2 -2
- package/lib-cjs/component/panels/MoleculesPanel/useAtomAssignment.js +8 -9
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.js +3 -4
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisTable.js +1 -2
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/preferences/AnalysisTablePreferences.js +2 -2
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/preferences/LegendsPreferences.js +2 -2
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/preferences/MultipleAnalysisCodeEditor.js +1 -1
- package/lib-cjs/component/panels/Panels.js +1 -1
- package/lib-cjs/component/panels/PeaksPanel/PeaksPanel.js +4 -5
- package/lib-cjs/component/panels/PeaksPanel/PeaksTable.js +4 -5
- package/lib-cjs/component/panels/RangesPanel/RangesHeader.js +12 -15
- package/lib-cjs/component/panels/RangesPanel/RangesPanel.js +24 -29
- package/lib-cjs/component/panels/RangesPanel/RangesTableRow.js +0 -12
- package/lib-cjs/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js +2 -3
- package/lib-cjs/component/panels/RangesPanel/TableColumns/RelativeColumn.js +3 -3
- package/lib-cjs/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.js +2 -3
- package/lib-cjs/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.js +1 -2
- package/lib-cjs/component/panels/RangesPanel/hooks/useEditRangeModal.js +16 -14
- package/lib-cjs/component/panels/SpectrumsPanel/SpectraPanelHeader.js +16 -16
- package/lib-cjs/component/panels/SpectrumsPanel/SpectraPreferences.js +2 -2
- package/lib-cjs/component/panels/SpectrumsPanel/SpectraTable.js +7 -5
- package/lib-cjs/component/panels/SpectrumsPanel/SpectrumsTabs.js +4 -5
- package/lib-cjs/component/panels/SpectrumsPanel/base/ShowHideSpectrumButton.js +3 -7
- package/lib-cjs/component/panels/SpectrumsPanel/base/SpectraColumnsManager.js +1 -1
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/SpectrumSetting.js +4 -2
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/processSnapPlot.js +2 -2
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +4 -8
- package/lib-cjs/component/panels/SummaryPanel/SummaryPanel.js +39 -34
- package/lib-cjs/component/panels/SummaryPanel/utilities/Utilities.js +1 -1
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/ActionsColumn.js +22 -20
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumn.js +12 -19
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.js +2 -2
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.js +6 -7
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.js +27 -22
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumns.js +2 -2
- package/lib-cjs/component/panels/ZonesPanel/ZonesPanel.js +15 -18
- package/lib-cjs/component/panels/ZonesPanel/ZonesTable.js +2 -51
- package/lib-cjs/component/panels/ZonesPanel/ZonesTableRow.js +1 -21
- package/lib-cjs/component/panels/ZonesPanel/hooks/useMapZones.js +56 -0
- package/lib-cjs/component/panels/databasePanel/DatabasePanel.js +8 -6
- package/lib-cjs/component/panels/filtersPanel/FilterPanel.js +1 -2
- package/lib-cjs/component/panels/filtersPanel/FiltersTable.js +8 -9
- package/lib-cjs/component/panels/header/DefaultPanelHeader.js +1 -1
- package/lib-cjs/component/panels/header/SpectraAutomaticPickingButton.js +2 -3
- package/lib-cjs/component/panels/predictionPanel/PredictionPanel.js +10 -6
- package/lib-cjs/component/reducer/IgnoreActions.js +35 -55
- package/lib-cjs/component/reducer/Reducer.js +199 -221
- package/lib-cjs/component/reducer/actions/AssignmentsActions.js +3 -3
- package/lib-cjs/component/reducer/actions/CorrelationsActions.js +23 -18
- package/lib-cjs/component/reducer/actions/DatabaseActions.js +4 -1
- package/lib-cjs/component/reducer/actions/DimensionsActions.js +3 -6
- package/lib-cjs/component/reducer/actions/DomainActions.js +15 -23
- package/lib-cjs/component/reducer/actions/FiltersActions.js +267 -272
- package/lib-cjs/component/reducer/actions/GlobalActions.js +4 -4
- package/lib-cjs/component/reducer/actions/IntegralsActions.js +19 -18
- package/lib-cjs/component/reducer/actions/LoadActions.js +68 -60
- package/lib-cjs/component/reducer/actions/MoleculeActions.js +56 -23
- package/lib-cjs/component/reducer/actions/PeaksActions.js +23 -15
- package/lib-cjs/component/reducer/actions/PreferencesActions.js +24 -9
- package/lib-cjs/component/reducer/actions/RangesActions.js +81 -64
- package/lib-cjs/component/reducer/actions/SpectrumsActions.js +77 -67
- package/lib-cjs/component/reducer/actions/ToolsActions.js +54 -31
- package/lib-cjs/component/reducer/actions/ZonesActions.js +73 -52
- package/lib-cjs/component/reducer/core/Constants.js +1 -1
- package/lib-cjs/component/reducer/helper/Zoom1DManager.js +2 -2
- package/lib-cjs/component/reducer/helper/ZoomHistoryManager.js +2 -2
- package/lib-cjs/component/reducer/preferences/panelsPreferencesDefaultValues.js +1 -0
- package/lib-cjs/component/reducer/types/ActionType.js +2 -0
- package/lib-cjs/component/toolbar/BasicToolBar.js +6 -9
- package/lib-cjs/component/toolbar/FunctionToolBar.js +4 -9
- package/lib-cjs/component/toolbar/ToolBar.js +1 -1
- package/lib-cjs/component/utility/GroupByInfoKey.js +1 -1
- package/lib-cjs/component/utility/getSpectraObjectPaths.js +1 -1
- package/lib-cjs/component/workspaces/exercise.js +31 -0
- package/lib-cjs/component/workspaces/workspaceDefaultProperties.js +1 -0
- package/lib-cjs/data/PredictionManager.js +3 -3
- package/lib-cjs/data/SpectraManager.js +1 -1
- package/lib-cjs/data/data1d/Spectrum1D/getSpectrumErrorValue.js +1 -1
- package/lib-cjs/data/data1d/Spectrum1D/initiateDatum1D.js +1 -1
- package/lib-cjs/data/data1d/Spectrum1D/ranges/changeRangeRelativeValue.js +5 -4
- package/lib-cjs/data/data1d/multipleSpectraAnalysis.js +2 -2
- package/lib-cjs/data/data2d/Spectrum2D/contours.js +0 -1
- package/lib-cjs/data/data2d/Spectrum2D/initiateDatum2D.js +1 -1
- package/lib-cjs/data/data2d/Spectrum2D/zones/changeZoneSignal.js +6 -8
- package/lib-cjs/data/matrixGeneration.js +4 -2
- package/lib-cjs/data/molecules/MoleculeManager.js +1 -1
- package/lib-cjs/data/utilities/ZoneUtilities.js +0 -1
- package/lib-cjs/data/utilities/generateColor.js +1 -1
- package/lib-cjs/data/utilities/isNumber.js +7 -0
- package/lib-cjs/versionInfo.js +1 -1
- package/package.json +35 -34
- package/lib/component/panels/RangesPanel/TableColumns/RemoveAssignmentsButton.d.ts +0 -3
- package/lib/component/reducer/actions/HistoryActions.d.ts +0 -4
- package/lib/component/reducer/actions/HistoryActions.js +0 -40
- package/lib/component/reducer/types/HistoryTypes.d.ts +0 -4
- package/lib/component/reducer/types/HistoryTypes.js +0 -4
- package/lib/component/reducer/types/Types.d.ts +0 -132
- package/lib/component/reducer/types/Types.js +0 -126
- package/lib/component/toolbar/HistoryToolBar.d.ts +0 -8
- package/lib/component/toolbar/HistoryToolBar.js +0 -30
- package/lib/data/utilities/isMolFileEmpty.d.ts +0 -1
- package/lib/data/utilities/isMolFileEmpty.js +0 -6
- package/lib-cjs/component/reducer/actions/HistoryActions.js +0 -45
- package/lib-cjs/component/reducer/types/HistoryTypes.js +0 -7
- package/lib-cjs/component/reducer/types/Types.js +0 -131
- package/lib-cjs/component/toolbar/HistoryToolBar.js +0 -35
- package/lib-cjs/data/utilities/isMolFileEmpty.js +0 -10
|
@@ -28,7 +28,7 @@ function FiltersOptions() {
|
|
|
28
28
|
return values.filters.map((filter, index) => {
|
|
29
29
|
return ((0, jsx_runtime_1.jsx)(GroupPane_1.GroupPane
|
|
30
30
|
// eslint-disable-next-line react/no-array-index-key
|
|
31
|
-
, { text: `${index + 1} - ${(0, matrixGeneration_1.normalCase)(filter.name)} options`, style: { ...MatrixGenerationPanel_1.GroupPanelStyle, container: { padding: 0 } }, renderHeader: (text) => ((0, jsx_runtime_1.jsx)(FiltersPanelGroupHeader, {
|
|
31
|
+
, { text: `${index + 1} - ${(0, matrixGeneration_1.normalCase)(filter.name)} options`, style: { ...MatrixGenerationPanel_1.GroupPanelStyle, container: { padding: 0 } }, renderHeader: (text) => ((0, jsx_runtime_1.jsx)(FiltersPanelGroupHeader, { index, text, name: filter.name })), children: (0, jsx_runtime_1.jsx)(Fields, { filter: filter, basePath: `filters.${index}` }) }, `${index}`));
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
34
|
exports.FiltersOptions = FiltersOptions;
|
|
@@ -89,11 +89,11 @@ function FiltersPanelGroupHeader({ index, name }) {
|
|
|
89
89
|
function handelSelectFilter(value, index) {
|
|
90
90
|
const filters = values.filters.slice(0);
|
|
91
91
|
filters.splice(index, 1, value);
|
|
92
|
-
setFieldValue('filters', filters);
|
|
92
|
+
void setFieldValue('filters', filters);
|
|
93
93
|
}
|
|
94
94
|
function handleAdd(index) {
|
|
95
95
|
if (values.filters) {
|
|
96
|
-
setFieldValue('filters', [
|
|
96
|
+
void setFieldValue('filters', [
|
|
97
97
|
...values.filters.slice(0, index),
|
|
98
98
|
MatrixGenerationPanel_1.DEFAULT_MATRIX_FILTERS[0],
|
|
99
99
|
...values.filters.slice(index),
|
|
@@ -101,7 +101,7 @@ function FiltersPanelGroupHeader({ index, name }) {
|
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
function handleDelete(index) {
|
|
104
|
-
setFieldValue('filters', values.filters.filter((_, i) => i !== index));
|
|
104
|
+
void setFieldValue('filters', values.filters.filter((_, i) => i !== index));
|
|
105
105
|
}
|
|
106
106
|
return ((0, jsx_runtime_1.jsxs)("div", { className: "section-header", style: { display: 'flex', padding: '5px 0px' }, children: [(0, jsx_runtime_1.jsxs)("p", { style: { flex: 1, ...MatrixGenerationPanel_1.GroupPanelStyle.header }, children: [index + 1, "-"] }), (0, jsx_runtime_1.jsx)(Select_1.default, { value: name, items: MatrixGenerationPanel_1.DEFAULT_MATRIX_FILTERS, onChange: (value) => handelSelectFilter(value, index), style: { width: '100%' }, returnValue: false, itemTextField: "name", itemValueField: "name", textRender: (text) => (0, matrixGeneration_1.normalCase)(text) }), (0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex' }, children: [(0, jsx_runtime_1.jsx)(Button_1.default.Danger, { fill: "outline", onClick: () => handleDelete(index), children: (0, jsx_runtime_1.jsx)(fa_1.FaTimes, {}) }), (0, jsx_runtime_1.jsx)(Button_1.default.Done, { fill: "outline", onClick: () => handleAdd(index + 1), style: { marginLeft: '5px' }, children: (0, jsx_runtime_1.jsx)(fa_1.FaPlus, {}) })] })] }));
|
|
107
107
|
}
|
|
@@ -47,7 +47,6 @@ const FormikInput_1 = __importDefault(require("../../elements/formik/FormikInput
|
|
|
47
47
|
const FormikOnChange_1 = __importDefault(require("../../elements/formik/FormikOnChange"));
|
|
48
48
|
const usePanelPreferences_1 = require("../../hooks/usePanelPreferences");
|
|
49
49
|
const useToolsFunctions_1 = __importDefault(require("../../hooks/useToolsFunctions"));
|
|
50
|
-
const Types_1 = require("../../reducer/types/Types");
|
|
51
50
|
const ToolTypes_1 = require("../../toolbar/ToolTypes");
|
|
52
51
|
const export_1 = require("../../utility/export");
|
|
53
52
|
const BasicPanelStyle_1 = require("../extra/BasicPanelStyle");
|
|
@@ -96,7 +95,7 @@ function MatrixGenerationPanel() {
|
|
|
96
95
|
(0, export_1.exportAsMatrix)(data, 'Spectra Matrix');
|
|
97
96
|
}
|
|
98
97
|
function handleSave(options) {
|
|
99
|
-
dispatch({ type:
|
|
98
|
+
dispatch({ type: 'APPLY_SIGNAL_PROCESSING_FILTER', payload: { options } });
|
|
100
99
|
}
|
|
101
100
|
function handleOnChange(options) {
|
|
102
101
|
preferences.dispatch({
|
|
@@ -9,7 +9,6 @@ const react_mf_1 = require("react-mf");
|
|
|
9
9
|
const MoleculeManager_1 = require("../../../data/molecules/MoleculeManager");
|
|
10
10
|
const DispatchContext_1 = require("../../context/DispatchContext");
|
|
11
11
|
const EditableColumn_1 = __importDefault(require("../../elements/EditableColumn"));
|
|
12
|
-
const Types_1 = require("../../reducer/types/Types");
|
|
13
12
|
const styles = {
|
|
14
13
|
toolbar: {
|
|
15
14
|
display: 'flex',
|
|
@@ -37,7 +36,7 @@ function MoleculeHeader(props) {
|
|
|
37
36
|
}, [molecules]);
|
|
38
37
|
const saveLabelHandler = (0, react_1.useCallback)((id, event) => {
|
|
39
38
|
const label = event.target.value;
|
|
40
|
-
dispatch({ type:
|
|
39
|
+
dispatch({ type: 'CHANGE_MOLECULE_LABEL', payload: { label, id } });
|
|
41
40
|
}, [dispatch]);
|
|
42
41
|
return ((0, jsx_runtime_1.jsxs)("div", { style: styles.toolbar, children: [(0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex' }, children: [(0, jsx_runtime_1.jsx)("span", { children: "Label" }), (0, jsx_runtime_1.jsx)(EditableColumn_1.default, { value: currentMolecule.label, style: styles.labelInput, validate: validateLabel, onSave: (event) => saveLabelHandler(currentMolecule.id, event), textOverFlowEllipses: true })] }), (0, jsx_runtime_1.jsxs)("span", { children: [(0, jsx_runtime_1.jsx)(react_mf_1.MF, { mf: currentMolecule.mf }), " - ", currentMolecule.mw?.toFixed(2)] })] }));
|
|
43
42
|
}
|
|
@@ -15,7 +15,6 @@ const DispatchContext_1 = require("../../context/DispatchContext");
|
|
|
15
15
|
const NextPrev_1 = __importDefault(require("../../elements/NextPrev"));
|
|
16
16
|
const useSpectrum_1 = __importDefault(require("../../hooks/useSpectrum"));
|
|
17
17
|
const MoleculeStructureEditorModal_1 = require("../../modal/MoleculeStructureEditorModal");
|
|
18
|
-
const Types_1 = require("../../reducer/types/Types");
|
|
19
18
|
const MoleculeHeader_1 = __importDefault(require("./MoleculeHeader"));
|
|
20
19
|
const MoleculePanelHeader_1 = __importDefault(require("./MoleculePanelHeader"));
|
|
21
20
|
const useAtomAssignment_1 = __importDefault(require("./useAtomAssignment"));
|
|
@@ -70,7 +69,7 @@ function MoleculePanelInner({ zones, ranges, molecules: moleculesProp, molecules
|
|
|
70
69
|
const handleReplaceMolecule = (0, react_2.useCallback)((molecule, molfile) => {
|
|
71
70
|
const { id, label } = molecule;
|
|
72
71
|
dispatch({
|
|
73
|
-
type:
|
|
72
|
+
type: 'SET_MOLECULE',
|
|
74
73
|
payload: { molfile, id, label },
|
|
75
74
|
});
|
|
76
75
|
}, [dispatch]);
|
|
@@ -96,16 +95,14 @@ function MoleculePanel({ onMoleculeChange, children, actionsOptions, emptyTextSt
|
|
|
96
95
|
const data = (0, useSpectrum_1.default)(emptyData);
|
|
97
96
|
const ranges = data?.ranges || {};
|
|
98
97
|
const zones = data?.zones || {};
|
|
99
|
-
return ((0, jsx_runtime_1.jsx)(MemoizedMoleculePanel, {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
emptyTextStyle,
|
|
109
|
-
}, children: children }));
|
|
98
|
+
return ((0, jsx_runtime_1.jsx)(MemoizedMoleculePanel, { molecules,
|
|
99
|
+
moleculesView,
|
|
100
|
+
displayerMode,
|
|
101
|
+
activeTab,
|
|
102
|
+
ranges,
|
|
103
|
+
zones,
|
|
104
|
+
onMoleculeChange,
|
|
105
|
+
actionsOptions,
|
|
106
|
+
emptyTextStyle, children: children }));
|
|
110
107
|
}
|
|
111
108
|
exports.default = MoleculePanel;
|
|
@@ -20,14 +20,14 @@ const MenuButton_1 = __importDefault(require("../../elements/MenuButton"));
|
|
|
20
20
|
const ToolTip_1 = __importDefault(require("../../elements/ToolTip/ToolTip"));
|
|
21
21
|
const Alert_1 = require("../../elements/popup/Alert");
|
|
22
22
|
const Modal_1 = require("../../elements/popup/Modal");
|
|
23
|
+
const AboutPredictionModal_1 = __importDefault(require("../../modal/AboutPredictionModal"));
|
|
23
24
|
const PredictSpectraModal_1 = __importDefault(require("../../modal/PredictSpectraModal"));
|
|
24
|
-
const Types_1 = require("../../reducer/types/Types");
|
|
25
25
|
const export_1 = require("../../utility/export");
|
|
26
26
|
const toolbarStyle = (0, react_1.css) `
|
|
27
27
|
display: flex;
|
|
28
28
|
flex-direction: row;
|
|
29
29
|
border-bottom: 0.55px solid rgb(240 240 240);
|
|
30
|
-
padding:
|
|
30
|
+
padding: 2px 5px;
|
|
31
31
|
|
|
32
32
|
button svg {
|
|
33
33
|
fill: #4e4e4e;
|
|
@@ -135,14 +135,14 @@ function MoleculePanelHeader({ currentIndex, molecules, moleculesView, onMolecul
|
|
|
135
135
|
]);
|
|
136
136
|
const handlePaste = (0, react_2.useCallback)(() => {
|
|
137
137
|
void navigator.clipboard.readText().then((molfile) => {
|
|
138
|
-
dispatch({ type:
|
|
138
|
+
dispatch({ type: 'ADD_MOLECULE', payload: { molfile } });
|
|
139
139
|
});
|
|
140
140
|
}, [dispatch]);
|
|
141
141
|
const handleDelete = (0, react_2.useCallback)(() => {
|
|
142
142
|
if (molecules[currentIndex]?.id) {
|
|
143
143
|
onMoleculeIndexChange(0);
|
|
144
144
|
dispatch({
|
|
145
|
-
type:
|
|
145
|
+
type: 'DELETE_MOLECULE',
|
|
146
146
|
payload: { id: molecules[currentIndex].id, assignmentData },
|
|
147
147
|
});
|
|
148
148
|
}
|
|
@@ -162,18 +162,18 @@ function MoleculePanelHeader({ currentIndex, molecules, moleculesView, onMolecul
|
|
|
162
162
|
}, [modal, molecules, currentIndex]);
|
|
163
163
|
function floatMoleculeHandler() {
|
|
164
164
|
dispatch({
|
|
165
|
-
type:
|
|
165
|
+
type: 'FLOAT_MOLECULE_OVER_SPECTRUM',
|
|
166
166
|
payload: { id: moleculeKey },
|
|
167
167
|
});
|
|
168
168
|
}
|
|
169
169
|
function showAtomNumbersHandler() {
|
|
170
170
|
dispatch({
|
|
171
|
-
type:
|
|
171
|
+
type: 'TOGGLE_MOLECULE_ATOM_NUMBER',
|
|
172
172
|
payload: { id: moleculeKey },
|
|
173
173
|
});
|
|
174
174
|
}
|
|
175
175
|
const hasMolecules = molecules && molecules.length > 0;
|
|
176
|
-
return ((0, jsx_runtime_1.jsxs)("div", { css: toolbarStyle, children: [!actionsOptions.hideExport && ((0, jsx_runtime_1.jsx)(MenuButton_1.default, { component: (0, jsx_runtime_1.jsx)(fa_1.FaFileExport, {}), toolTip: "Export As", items: MOL_EXPORT_MENU, onClick: exportHandler })), !actionsOptions.hidePast && ((0, jsx_runtime_1.jsx)(ToolTip_1.default, { title: "Paste molfile", popupPlacement: "left", children: (0, jsx_runtime_1.jsx)("button", { className: "bar-button", type: "button", onClick: handlePaste, children: (0, jsx_runtime_1.jsx)(fa_1.FaPaste, {}) }) })), !actionsOptions.hideAdd && ((0, jsx_runtime_1.jsx)(ToolTip_1.default, { title: "Add molecule", popupPlacement: "left", children: (0, jsx_runtime_1.jsx)("button", { className: "bar-button", type: "button", onClick: onOpenMoleculeEditor, children: (0, jsx_runtime_1.jsx)(fa_1.FaPlus, {}) }) })), !actionsOptions.hideDelete && ((0, jsx_runtime_1.jsx)(ToolTip_1.default, { title: "Delete molecule", popupPlacement: "left", children: (0, jsx_runtime_1.jsx)("button", { className: "bar-button", type: "button", onClick: handleDelete, children: (0, jsx_runtime_1.jsx)(fa_1.FaRegTrashAlt, {}) }) })), !actionsOptions.hidePredict && hasMolecules && ((0, jsx_runtime_1.jsx)(ButtonToolTip_1.default, { popupTitle: "Predict spectra", popupPlacement: "left", onClick: openPredictSpectraModal, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrFt, {}) })), (0, jsx_runtime_1.jsx)(ActiveButton_1.default, { value: moleculesView?.[moleculeKey]?.floating.visible || false, popupTitle: "Float molecule", popupPlacement: "left", onClick: floatMoleculeHandler, disabled: !hasMolecules, children: (0, jsx_runtime_1.jsx)(io5_1.IoOpenOutline, {}) }), (0, jsx_runtime_1.jsx)(ActiveButton_1.default, { style: { marginLeft: '2px' }, value: moleculesView?.[moleculeKey]?.showAtomNumber || false, popupTitle: "Show atom number", popupPlacement: "left", onClick: showAtomNumbersHandler, disabled: !hasMolecules, children: (0, jsx_runtime_1.jsx)("p", { style: atomLabelStyle, children: "#" }) }), (0, jsx_runtime_1.jsxs)("p", { children: [molecules &&
|
|
176
|
+
return ((0, jsx_runtime_1.jsxs)("div", { css: toolbarStyle, children: [actionsOptions?.showAboutPredict && (0, jsx_runtime_1.jsx)(AboutPredictionModal_1.default, {}), !actionsOptions.hideExport && ((0, jsx_runtime_1.jsx)(MenuButton_1.default, { component: (0, jsx_runtime_1.jsx)(fa_1.FaFileExport, {}), toolTip: "Export As", items: MOL_EXPORT_MENU, onClick: exportHandler })), !actionsOptions.hidePast && ((0, jsx_runtime_1.jsx)(ToolTip_1.default, { title: "Paste molfile", popupPlacement: "left", children: (0, jsx_runtime_1.jsx)("button", { className: "bar-button", type: "button", onClick: handlePaste, children: (0, jsx_runtime_1.jsx)(fa_1.FaPaste, {}) }) })), !actionsOptions.hideAdd && ((0, jsx_runtime_1.jsx)(ToolTip_1.default, { title: "Add molecule", popupPlacement: "left", children: (0, jsx_runtime_1.jsx)("button", { className: "bar-button", type: "button", onClick: onOpenMoleculeEditor, children: (0, jsx_runtime_1.jsx)(fa_1.FaPlus, {}) }) })), !actionsOptions.hideDelete && ((0, jsx_runtime_1.jsx)(ToolTip_1.default, { title: "Delete molecule", popupPlacement: "left", children: (0, jsx_runtime_1.jsx)("button", { className: "bar-button", type: "button", onClick: handleDelete, children: (0, jsx_runtime_1.jsx)(fa_1.FaRegTrashAlt, {}) }) })), !actionsOptions.hidePredict && hasMolecules && ((0, jsx_runtime_1.jsx)(ButtonToolTip_1.default, { popupTitle: "Predict spectra", popupPlacement: "left", onClick: openPredictSpectraModal, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrFt, {}) })), (0, jsx_runtime_1.jsx)(ActiveButton_1.default, { value: moleculesView?.[moleculeKey]?.floating.visible || false, popupTitle: "Float molecule", popupPlacement: "left", onClick: floatMoleculeHandler, disabled: !hasMolecules, children: (0, jsx_runtime_1.jsx)(io5_1.IoOpenOutline, {}) }), (0, jsx_runtime_1.jsx)(ActiveButton_1.default, { style: { marginLeft: '2px' }, value: moleculesView?.[moleculeKey]?.showAtomNumber || false, popupTitle: "Show atom number", popupPlacement: "left", onClick: showAtomNumbersHandler, disabled: !hasMolecules, children: (0, jsx_runtime_1.jsx)("p", { style: atomLabelStyle, children: "#" }) }), (0, jsx_runtime_1.jsxs)("p", { children: [molecules &&
|
|
177
177
|
molecules.length > 0 &&
|
|
178
178
|
`${+(currentIndex + 1)} / ${molecules.length}`, ' '] })] }));
|
|
179
179
|
}
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.toggleDiaIDs = exports.getCurrentDiaIDsToHighlight = exports.getHighlightsOnHover = exports.findDatumAndSignalIndex = exports.extractFromAtom = void 0;
|
|
4
4
|
function getElements(activeTab) {
|
|
5
5
|
const nuclei = activeTab.split(',');
|
|
6
|
-
return nuclei.map((nucleus) => nucleus.
|
|
6
|
+
return nuclei.map((nucleus) => nucleus.replaceAll(/\d/g, ''));
|
|
7
7
|
}
|
|
8
8
|
/**
|
|
9
9
|
* Returns the OCL id(s) and number of atoms of an atom when hovering over
|
|
@@ -106,6 +106,6 @@ function toggleDiaIDs(diaIDs, atomInformation) {
|
|
|
106
106
|
_diaIDs.push(oclID);
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
|
-
return
|
|
109
|
+
return { diaIDs: _diaIDs, nbAtoms: tempNbAtoms };
|
|
110
110
|
}
|
|
111
111
|
exports.toggleDiaIDs = toggleDiaIDs;
|
|
@@ -12,7 +12,6 @@ const DispatchContext_1 = require("../../context/DispatchContext");
|
|
|
12
12
|
const Alert_1 = require("../../elements/popup/Alert");
|
|
13
13
|
const highlight_1 = require("../../highlight");
|
|
14
14
|
const Constants_1 = require("../../reducer/core/Constants");
|
|
15
|
-
const Types_1 = require("../../reducer/types/Types");
|
|
16
15
|
const Utilities_1 = require("./Utilities");
|
|
17
16
|
function useAtomAssignment({ displayerMode, activeTab: nucleus, zones, ranges, }) {
|
|
18
17
|
const alert = (0, Alert_1.useAlert)();
|
|
@@ -132,13 +131,13 @@ function useAtomAssignment({ displayerMode, activeTab: nucleus, zones, ranges, }
|
|
|
132
131
|
else {
|
|
133
132
|
_diaIDs = range?.signals[signalIndex]?.diaIDs || [];
|
|
134
133
|
}
|
|
135
|
-
const
|
|
134
|
+
const { diaIDs, nbAtoms } = toggleAssignment(_diaIDs, atomInformation);
|
|
136
135
|
dispatch({
|
|
137
|
-
type:
|
|
136
|
+
type: 'SET_DIAID_RANGE',
|
|
138
137
|
payload: {
|
|
139
138
|
nbAtoms,
|
|
140
|
-
|
|
141
|
-
diaIDs
|
|
139
|
+
range,
|
|
140
|
+
diaIDs,
|
|
142
141
|
signalIndex,
|
|
143
142
|
},
|
|
144
143
|
});
|
|
@@ -152,13 +151,13 @@ function useAtomAssignment({ displayerMode, activeTab: nucleus, zones, ranges, }
|
|
|
152
151
|
else {
|
|
153
152
|
_diaIDs = zone?.signals[signalIndex][axis]?.diaIDs || [];
|
|
154
153
|
}
|
|
155
|
-
const
|
|
154
|
+
const { diaIDs, nbAtoms } = toggleAssignment(_diaIDs, atomInformation);
|
|
156
155
|
dispatch({
|
|
157
|
-
type:
|
|
156
|
+
type: 'SET_ZONE_DIAID',
|
|
158
157
|
payload: {
|
|
159
158
|
nbAtoms,
|
|
160
|
-
|
|
161
|
-
diaIDs
|
|
159
|
+
zone,
|
|
160
|
+
diaIDs,
|
|
162
161
|
axis,
|
|
163
162
|
signalIndex,
|
|
164
163
|
},
|
package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.js
CHANGED
|
@@ -19,7 +19,6 @@ const Alert_1 = require("../../elements/popup/Alert");
|
|
|
19
19
|
const Modal_1 = require("../../elements/popup/Modal");
|
|
20
20
|
const usePanelPreferences_1 = require("../../hooks/usePanelPreferences");
|
|
21
21
|
const AlignSpectraModal_1 = __importDefault(require("../../modal/AlignSpectraModal"));
|
|
22
|
-
const Types_1 = require("../../reducer/types/Types");
|
|
23
22
|
const export_1 = require("../../utility/export");
|
|
24
23
|
const getSpectraByNucleus_1 = require("../../utility/getSpectraByNucleus");
|
|
25
24
|
const BasicPanelStyle_1 = require("../extra/BasicPanelStyle");
|
|
@@ -46,10 +45,10 @@ function MultipleSpectraAnalysisPanelInner({ activeTab, spectra, showLegend, })
|
|
|
46
45
|
setFlipStatus(false);
|
|
47
46
|
}, []);
|
|
48
47
|
const showTrackerHandler = (0, react_2.useCallback)(() => {
|
|
49
|
-
dispatch({ type:
|
|
48
|
+
dispatch({ type: 'TOGGLE_SPECTRA_LEGEND' });
|
|
50
49
|
}, [dispatch]);
|
|
51
50
|
const openAlignSpectra = (0, react_2.useCallback)(() => {
|
|
52
|
-
dispatch({ type:
|
|
51
|
+
dispatch({ type: 'RESET_SELECTED_TOOL' });
|
|
53
52
|
modal.show((0, jsx_runtime_1.jsx)(AlignSpectraModal_1.default, { nucleus: activeTab }), {
|
|
54
53
|
isBackgroundBlur: false,
|
|
55
54
|
position: Alert_1.positions.TOP_CENTER,
|
|
@@ -85,6 +84,6 @@ function MultipleSpectraAnalysisPanel() {
|
|
|
85
84
|
if (!activeTab) {
|
|
86
85
|
return (0, jsx_runtime_1.jsx)("div", {});
|
|
87
86
|
}
|
|
88
|
-
return ((0, jsx_runtime_1.jsx)(MemoizedMultipleSpectraAnalysisPanel, {
|
|
87
|
+
return ((0, jsx_runtime_1.jsx)(MemoizedMultipleSpectraAnalysisPanel, { activeTab, displayerKey, spectra, showLegend }));
|
|
89
88
|
}
|
|
90
89
|
exports.default = MultipleSpectraAnalysisPanel;
|
package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisTable.js
CHANGED
|
@@ -11,7 +11,6 @@ const ReactTable_1 = __importDefault(require("../../elements/ReactTable/ReactTab
|
|
|
11
11
|
const addCustomColumn_1 = __importDefault(require("../../elements/ReactTable/utility/addCustomColumn"));
|
|
12
12
|
const useFormatNumberByNucleus_1 = require("../../hooks/useFormatNumberByNucleus");
|
|
13
13
|
const usePanelPreferences_1 = require("../../hooks/usePanelPreferences");
|
|
14
|
-
const Types_1 = require("../../reducer/types/Types");
|
|
15
14
|
const Evaluate_1 = __importDefault(require("../../utility/Evaluate"));
|
|
16
15
|
const NoTableData_1 = __importDefault(require("../extra/placeholder/NoTableData"));
|
|
17
16
|
const AnalysisCell_1 = __importDefault(require("./base/AnalysisCell"));
|
|
@@ -85,7 +84,7 @@ function MultipleSpectraAnalysisTable({ data, activeTab, resortSpectra, }) {
|
|
|
85
84
|
function handleSortEnd(data) {
|
|
86
85
|
if (resortSpectra) {
|
|
87
86
|
dispatch({
|
|
88
|
-
type:
|
|
87
|
+
type: 'ORDER_MULTIPLE_SPECTRA_ANALYSIS',
|
|
89
88
|
payload: {
|
|
90
89
|
data,
|
|
91
90
|
},
|
|
@@ -16,7 +16,7 @@ const inputStyle = { input: { width: '100%', fontSize: '1.15em' } };
|
|
|
16
16
|
function AnalysisTablePreferences() {
|
|
17
17
|
const { values: { analysisOptions: { columns }, }, setFieldValue, } = (0, formik_1.useFormikContext)();
|
|
18
18
|
const addNewColumn = (0, react_1.useCallback)((index, columns) => {
|
|
19
|
-
setFieldValue('analysisOptions.columns', [
|
|
19
|
+
void setFieldValue('analysisOptions.columns', [
|
|
20
20
|
...columns,
|
|
21
21
|
{
|
|
22
22
|
tempKey: '',
|
|
@@ -28,7 +28,7 @@ function AnalysisTablePreferences() {
|
|
|
28
28
|
]);
|
|
29
29
|
}, [setFieldValue]);
|
|
30
30
|
const handleDelete = (0, react_1.useCallback)((index, columns) => {
|
|
31
|
-
setFieldValue('analysisOptions.columns', columns.filter((_, colIndex) => colIndex !== index));
|
|
31
|
+
void setFieldValue('analysisOptions.columns', columns.filter((_, colIndex) => colIndex !== index));
|
|
32
32
|
}, [setFieldValue]);
|
|
33
33
|
const COLUMNS = (0, react_1.useMemo)(() => {
|
|
34
34
|
return [
|
package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/preferences/LegendsPreferences.js
CHANGED
|
@@ -44,11 +44,11 @@ function LegendsPreferences() {
|
|
|
44
44
|
else {
|
|
45
45
|
columns.push(emptyField);
|
|
46
46
|
}
|
|
47
|
-
setFieldValue('legendsFields', columns);
|
|
47
|
+
void setFieldValue('legendsFields', columns);
|
|
48
48
|
}, [setFieldValue]);
|
|
49
49
|
const deleteHandler = (0, react_1.useCallback)((data, index) => {
|
|
50
50
|
const _fields = data.filter((_, columnIndex) => columnIndex !== index);
|
|
51
|
-
setFieldValue('legendsFields', _fields);
|
|
51
|
+
void setFieldValue('legendsFields', _fields);
|
|
52
52
|
}, [setFieldValue]);
|
|
53
53
|
const COLUMNS = (0, react_1.useMemo)(() => [
|
|
54
54
|
{
|
|
@@ -152,6 +152,6 @@ function PanelsInner({ displayerMode: displayedMode }) {
|
|
|
152
152
|
const MemoizedPanels = (0, react_1.memo)(PanelsInner);
|
|
153
153
|
function Panels() {
|
|
154
154
|
const { displayerMode, toolOptions: { selectedTool }, } = (0, ChartContext_1.useChartData)();
|
|
155
|
-
return (0, jsx_runtime_1.jsx)(MemoizedPanels, {
|
|
155
|
+
return (0, jsx_runtime_1.jsx)(MemoizedPanels, { displayerMode, selectedTool });
|
|
156
156
|
}
|
|
157
157
|
exports.default = Panels;
|
|
@@ -22,7 +22,6 @@ const useActiveSpectrumPeaksViewState_1 = require("../../hooks/useActiveSpectrum
|
|
|
22
22
|
const useCheckExperimentalFeature_1 = __importDefault(require("../../hooks/useCheckExperimentalFeature"));
|
|
23
23
|
const useFormatNumberByNucleus_1 = require("../../hooks/useFormatNumberByNucleus");
|
|
24
24
|
const useSpectrum_1 = __importDefault(require("../../hooks/useSpectrum"));
|
|
25
|
-
const Types_1 = require("../../reducer/types/Types");
|
|
26
25
|
const BasicPanelStyle_1 = require("../extra/BasicPanelStyle");
|
|
27
26
|
const DefaultPanelHeader_1 = __importDefault(require("../header/DefaultPanelHeader"));
|
|
28
27
|
const PreferencesHeader_1 = __importDefault(require("../header/PreferencesHeader"));
|
|
@@ -38,7 +37,7 @@ function PeaksPanelInner({ peaks, info, xDomain, activeTab, peaksViewState, }) {
|
|
|
38
37
|
const isExperimental = (0, useCheckExperimentalFeature_1.default)();
|
|
39
38
|
const settingRef = (0, react_2.useRef)();
|
|
40
39
|
const yesHandler = (0, react_2.useCallback)(() => {
|
|
41
|
-
dispatch({ type:
|
|
40
|
+
dispatch({ type: 'DELETE_PEAK', payload: {} });
|
|
42
41
|
}, [dispatch]);
|
|
43
42
|
const handleDeleteAll = (0, react_2.useCallback)(() => {
|
|
44
43
|
modal.showConfirmDialog({
|
|
@@ -83,14 +82,14 @@ function PeaksPanelInner({ peaks, info, xDomain, activeTab, peaksViewState, }) {
|
|
|
83
82
|
const [from, to] = xDomain;
|
|
84
83
|
const filterPeaks = peaks.values.filter((peak) => (0, isInRange_1.default)(peak.x, { from, to }));
|
|
85
84
|
if (filterPeaks.length <= 4) {
|
|
86
|
-
dispatch({ type:
|
|
85
|
+
dispatch({ type: 'OPTIMIZE_PEAKS', payload: { peaks: filterPeaks } });
|
|
87
86
|
}
|
|
88
87
|
else {
|
|
89
88
|
alert.error('optimization can be done on no more than 4 peaks');
|
|
90
89
|
}
|
|
91
90
|
};
|
|
92
91
|
function toggleViewProperty(key) {
|
|
93
|
-
dispatch({ type:
|
|
92
|
+
dispatch({ type: 'TOGGLE_PEAKS_VIEW_PROPERTY', payload: { key } });
|
|
94
93
|
}
|
|
95
94
|
return ((0, jsx_runtime_1.jsxs)("div", { css: [
|
|
96
95
|
BasicPanelStyle_1.tablePanelStyle,
|
|
@@ -116,6 +115,6 @@ function PeaksPanel() {
|
|
|
116
115
|
const { peaks, info } = (0, useSpectrum_1.default)(emptyData);
|
|
117
116
|
const preferences = (0, PreferencesContext_1.usePreferences)();
|
|
118
117
|
const peaksViewState = (0, useActiveSpectrumPeaksViewState_1.useActiveSpectrumPeaksViewState)();
|
|
119
|
-
return ((0, jsx_runtime_1.jsx)(MemoizedPeaksPanel, {
|
|
118
|
+
return ((0, jsx_runtime_1.jsx)(MemoizedPeaksPanel, { peaks, info, xDomain, activeTab, preferences, peaksViewState }));
|
|
120
119
|
}
|
|
121
120
|
exports.default = PeaksPanel;
|
|
@@ -15,7 +15,6 @@ const Modal_1 = require("../../elements/popup/Modal");
|
|
|
15
15
|
const options_1 = require("../../elements/popup/options");
|
|
16
16
|
const usePanelPreferences_1 = require("../../hooks/usePanelPreferences");
|
|
17
17
|
const EditPeakShapeModal_1 = __importDefault(require("../../modal/EditPeakShapeModal"));
|
|
18
|
-
const Types_1 = require("../../reducer/types/Types");
|
|
19
18
|
const formatNumber_1 = require("../../utility/formatNumber");
|
|
20
19
|
const NoTableData_1 = __importDefault(require("../extra/placeholder/NoTableData"));
|
|
21
20
|
function handleActiveRow(row) {
|
|
@@ -30,8 +29,8 @@ function PeaksTable({ activeTab, data }) {
|
|
|
30
29
|
e.stopPropagation();
|
|
31
30
|
const params = row.original;
|
|
32
31
|
dispatch({
|
|
33
|
-
type:
|
|
34
|
-
|
|
32
|
+
type: 'DELETE_PEAK',
|
|
33
|
+
payload: { id: params.id },
|
|
35
34
|
});
|
|
36
35
|
}, [dispatch]);
|
|
37
36
|
const editPeakHandler = (0, react_1.useCallback)((e, row) => {
|
|
@@ -44,8 +43,8 @@ function PeaksTable({ activeTab, data }) {
|
|
|
44
43
|
});
|
|
45
44
|
}, [modal, peaksPreferences]);
|
|
46
45
|
const saveDeltaPPMRefsHandler = (0, react_1.useCallback)((event, row) => {
|
|
47
|
-
const
|
|
48
|
-
dispatch({ type:
|
|
46
|
+
const shift = Number.parseFloat(event.target.value) - Number.parseFloat(row.x);
|
|
47
|
+
dispatch({ type: 'SHIFT_SPECTRUM', payload: { shift } });
|
|
49
48
|
}, [dispatch]);
|
|
50
49
|
const COLUMNS = (0, react_1.useMemo)(() => [
|
|
51
50
|
{
|
|
@@ -16,13 +16,11 @@ const AssignmentsContext_1 = require("../../assignment/AssignmentsContext");
|
|
|
16
16
|
const DispatchContext_1 = require("../../context/DispatchContext");
|
|
17
17
|
const ActiveButton_1 = __importDefault(require("../../elements/ActiveButton"));
|
|
18
18
|
const ButtonToolTip_1 = __importDefault(require("../../elements/ButtonToolTip"));
|
|
19
|
-
const ToggleButton_1 = __importDefault(require("../../elements/ToggleButton"));
|
|
20
19
|
const Alert_1 = require("../../elements/popup/Alert");
|
|
21
20
|
const Modal_1 = require("../../elements/popup/Modal");
|
|
22
21
|
const usePanelPreferences_1 = require("../../hooks/usePanelPreferences");
|
|
23
22
|
const CopyClipboardModal_1 = __importDefault(require("../../modal/CopyClipboardModal"));
|
|
24
23
|
const ChangeSumModal_1 = __importDefault(require("../../modal/changeSum/ChangeSumModal"));
|
|
25
|
-
const Types_1 = require("../../reducer/types/Types");
|
|
26
24
|
const export_1 = require("../../utility/export");
|
|
27
25
|
const formatNumber_1 = require("../../utility/formatNumber");
|
|
28
26
|
const DefaultPanelHeader_1 = __importDefault(require("../header/DefaultPanelHeader"));
|
|
@@ -52,8 +50,8 @@ function RangesHeader({ id, ranges, info, onUnlink, onFilterActivated, onSetting
|
|
|
52
50
|
const assignmentData = (0, AssignmentsContext_1.useAssignmentData)();
|
|
53
51
|
const currentSum = (0, get_1.default)(ranges, 'options.sum', null);
|
|
54
52
|
const rangesPreferences = (0, usePanelPreferences_1.usePanelPreferences)('ranges', activeTab);
|
|
55
|
-
const changeRangesSumHandler = (0, react_2.useCallback)((
|
|
56
|
-
dispatch({ type:
|
|
53
|
+
const changeRangesSumHandler = (0, react_2.useCallback)((options) => {
|
|
54
|
+
dispatch({ type: 'CHANGE_RANGE_SUM', payload: { options } });
|
|
57
55
|
modal.close();
|
|
58
56
|
}, [dispatch, modal]);
|
|
59
57
|
const showChangeRangesSumModal = (0, react_2.useCallback)(() => {
|
|
@@ -78,8 +76,8 @@ function RangesHeader({ id, ranges, info, onUnlink, onFilterActivated, onSetting
|
|
|
78
76
|
text: 'Yes',
|
|
79
77
|
handler: () => {
|
|
80
78
|
dispatch({
|
|
81
|
-
type:
|
|
82
|
-
payload: {
|
|
79
|
+
type: 'DELETE_RANGE',
|
|
80
|
+
payload: { assignmentData },
|
|
83
81
|
});
|
|
84
82
|
},
|
|
85
83
|
},
|
|
@@ -88,13 +86,13 @@ function RangesHeader({ id, ranges, info, onUnlink, onFilterActivated, onSetting
|
|
|
88
86
|
});
|
|
89
87
|
}, [assignmentData, dispatch, modal]);
|
|
90
88
|
const handleSetShowMultiplicityTrees = (0, react_2.useCallback)(() => {
|
|
91
|
-
dispatch({ type:
|
|
89
|
+
dispatch({ type: 'SHOW_MULTIPLICITY_TREES', payload: { id } });
|
|
92
90
|
}, [dispatch, id]);
|
|
93
91
|
const handleShowIntegrals = (0, react_2.useCallback)(() => {
|
|
94
|
-
dispatch({ type:
|
|
92
|
+
dispatch({ type: 'SHOW_RANGES_INTEGRALS', payload: { id } });
|
|
95
93
|
}, [dispatch, id]);
|
|
96
94
|
const handleShowJGraph = (0, react_2.useCallback)(() => {
|
|
97
|
-
dispatch({ type:
|
|
95
|
+
dispatch({ type: 'SHOW_J_GRAPH', payload: { id } });
|
|
98
96
|
}, [dispatch, id]);
|
|
99
97
|
const saveToClipboardHandler = (0, react_2.useCallback)((value) => {
|
|
100
98
|
void (async () => {
|
|
@@ -126,17 +124,16 @@ function RangesHeader({ id, ranges, info, onUnlink, onFilterActivated, onSetting
|
|
|
126
124
|
rangesPreferences?.deltaPPM?.format,
|
|
127
125
|
saveToClipboardHandler,
|
|
128
126
|
]);
|
|
129
|
-
const changeSumConstantFlagHandler = (0, react_2.useCallback)((
|
|
127
|
+
const changeSumConstantFlagHandler = (0, react_2.useCallback)(() => {
|
|
130
128
|
dispatch({
|
|
131
|
-
type:
|
|
132
|
-
payload: flag,
|
|
129
|
+
type: 'CHANGE_RANGES_SUM_FLAG',
|
|
133
130
|
});
|
|
134
131
|
}, [dispatch]);
|
|
135
132
|
const { editRange } = (0, useEditRangeModal_1.default)();
|
|
136
133
|
const addRangeHandler = (0, react_2.useCallback)(() => {
|
|
137
134
|
dispatch({
|
|
138
|
-
type:
|
|
139
|
-
payload: {
|
|
135
|
+
type: 'ADD_RANGE',
|
|
136
|
+
payload: {},
|
|
140
137
|
});
|
|
141
138
|
editRange(true);
|
|
142
139
|
}, [dispatch, editRange]);
|
|
@@ -144,6 +141,6 @@ function RangesHeader({ id, ranges, info, onUnlink, onFilterActivated, onSetting
|
|
|
144
141
|
? `Change ranges sum (${Number(currentSum).toFixed(2)})`
|
|
145
142
|
: 'Change ranges sum', popupPlacement: "right", onClick: showChangeRangesSumModal, className: "btn icon", children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrSum, {}) }), (0, jsx_runtime_1.jsx)(ButtonToolTip_1.default, { popupTitle: "Remove all assignments", popupPlacement: "right", onClick: handleOnRemoveAssignments, disabled: !ranges?.values || ranges.values.length === 0, className: "btn icon", children: (0, jsx_runtime_1.jsx)(fa_1.FaUnlink, {}) }), (0, jsx_runtime_1.jsx)(ActiveButton_1.default, { popupTitle: showMultiplicityTrees
|
|
146
143
|
? 'Hide multiplicity trees in spectrum'
|
|
147
|
-
: 'Show multiplicity trees in spectrum', popupPlacement: "right", onClick: handleSetShowMultiplicityTrees, value: showMultiplicityTrees, disabled: !ranges?.values || ranges.values.length === 0, children: (0, jsx_runtime_1.jsx)(fa_1.FaSitemap, { style: { pointerEvents: 'none', fontSize: '12px' } }) }), (0, jsx_runtime_1.jsx)(ActiveButton_1.default, { popupTitle: showJGraph ? 'Hide J Graph' : 'Show J Graph', popupPlacement: "right", onClick: handleShowJGraph, value: showJGraph, disabled: !ranges?.values || ranges.values.length === 0, children: (0, jsx_runtime_1.jsx)(fa_1.FaChartBar, { style: { pointerEvents: 'none', fontSize: '12px' } }) }), (0, jsx_runtime_1.jsx)(ActiveButton_1.default, { popupTitle: showRangesIntegrals ? 'Hide integrals' : 'Show integrals', popupPlacement: "right", onClick: handleShowIntegrals, value: showRangesIntegrals, disabled: !ranges?.values || ranges.values.length === 0, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrIntegrate, { style: { pointerEvents: 'none', fontSize: '12px' } }) }), (0, jsx_runtime_1.jsx)(
|
|
144
|
+
: 'Show multiplicity trees in spectrum', popupPlacement: "right", onClick: handleSetShowMultiplicityTrees, value: showMultiplicityTrees, disabled: !ranges?.values || ranges.values.length === 0, children: (0, jsx_runtime_1.jsx)(fa_1.FaSitemap, { style: { pointerEvents: 'none', fontSize: '12px' } }) }), (0, jsx_runtime_1.jsx)(ActiveButton_1.default, { popupTitle: showJGraph ? 'Hide J Graph' : 'Show J Graph', popupPlacement: "right", onClick: handleShowJGraph, value: showJGraph, disabled: !ranges?.values || ranges.values.length === 0, children: (0, jsx_runtime_1.jsx)(fa_1.FaChartBar, { style: { pointerEvents: 'none', fontSize: '12px' } }) }), (0, jsx_runtime_1.jsx)(ActiveButton_1.default, { popupTitle: showRangesIntegrals ? 'Hide integrals' : 'Show integrals', popupPlacement: "right", onClick: handleShowIntegrals, value: showRangesIntegrals, disabled: !ranges?.values || ranges.values.length === 0, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrIntegrate, { style: { pointerEvents: 'none', fontSize: '12px' } }) }), (0, jsx_runtime_1.jsx)(ActiveButton_1.default, { className: "icon", popupTitle: "Fix integral values", popupPlacement: "right", onClick: changeSumConstantFlagHandler, value: ranges?.options?.isSumConstant, children: (0, jsx_runtime_1.jsx)(im_1.ImLink, {}) }), (0, jsx_runtime_1.jsx)(ButtonToolTip_1.default, { popupTitle: "Add range", popupPlacement: "right", onClick: addRangeHandler, className: "btn icon", disabled: !ranges?.values, children: (0, jsx_runtime_1.jsx)(fa_1.FaPlus, {}) })] }) }));
|
|
148
145
|
}
|
|
149
146
|
exports.default = RangesHeader;
|
|
@@ -16,7 +16,6 @@ const Alert_1 = require("../../elements/popup/Alert");
|
|
|
16
16
|
const usePanelPreferences_1 = require("../../hooks/usePanelPreferences");
|
|
17
17
|
const useSpectrum_1 = __importDefault(require("../../hooks/useSpectrum"));
|
|
18
18
|
const Reducer_1 = require("../../reducer/Reducer");
|
|
19
|
-
const Types_1 = require("../../reducer/types/Types");
|
|
20
19
|
const export_1 = require("../../utility/export");
|
|
21
20
|
const BasicPanelStyle_1 = require("../extra/BasicPanelStyle");
|
|
22
21
|
const NoTableData_1 = __importDefault(require("../extra/placeholder/NoTableData"));
|
|
@@ -66,9 +65,9 @@ function RangesTablePanelInner({ id, ranges, data, info, xDomain, preferences, a
|
|
|
66
65
|
}, [isFilterActive, ranges.values, xDomain]);
|
|
67
66
|
const unlinkRangeHandler = (0, react_2.useCallback)((rangeData, signalIndex = -1) => {
|
|
68
67
|
dispatch({
|
|
69
|
-
type:
|
|
68
|
+
type: 'UNLINK_RANGE',
|
|
70
69
|
payload: {
|
|
71
|
-
rangeData,
|
|
70
|
+
range: rangeData,
|
|
72
71
|
assignmentData,
|
|
73
72
|
signalIndex,
|
|
74
73
|
},
|
|
@@ -117,17 +116,15 @@ function RangesTablePanelInner({ id, ranges, data, info, xDomain, preferences, a
|
|
|
117
116
|
position: relative;
|
|
118
117
|
}
|
|
119
118
|
`,
|
|
120
|
-
], children: [!isFlipped && ((0, jsx_runtime_1.jsx)(RangesHeader_1.default, {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
isFilterActive,
|
|
130
|
-
}, onUnlink: unlinkRangeHandler, onFilterActivated: filterHandler, onSettingClick: settingsPanelHandler, filterCounter: rangesData.length })), isFlipped && ((0, jsx_runtime_1.jsx)(PreferencesHeader_1.default, { onSave: saveSettingHandler, onClose: settingsPanelHandler })), (0, jsx_runtime_1.jsx)("div", { className: "inner-container", children: !isFlipped ? ((0, jsx_runtime_1.jsx)("div", { className: "table-container", children: rangesData && rangesData.length > 0 ? ((0, jsx_runtime_1.jsx)(RangesTable_1.default, { activeTab: activeTab, tableData: rangesData, onUnlink: unlinkRangeHandler, contextMenu: rangesContextMenuOptions, onContextMenuSelect: contextMenuSelectHandler, preferences: preferences, info: info })) : ((0, jsx_runtime_1.jsx)(NoTableData_1.default, {})) })) : ((0, jsx_runtime_1.jsx)(RangesPreferences_1.default, { ref: settingRef })) })] }));
|
|
119
|
+
], children: [!isFlipped && ((0, jsx_runtime_1.jsx)(RangesHeader_1.default, { id,
|
|
120
|
+
ranges,
|
|
121
|
+
info,
|
|
122
|
+
activeTab,
|
|
123
|
+
molecules,
|
|
124
|
+
showRangesIntegrals,
|
|
125
|
+
showMultiplicityTrees,
|
|
126
|
+
showJGraph,
|
|
127
|
+
isFilterActive, onUnlink: unlinkRangeHandler, onFilterActivated: filterHandler, onSettingClick: settingsPanelHandler, filterCounter: rangesData.length })), isFlipped && ((0, jsx_runtime_1.jsx)(PreferencesHeader_1.default, { onSave: saveSettingHandler, onClose: settingsPanelHandler })), (0, jsx_runtime_1.jsx)("div", { className: "inner-container", children: !isFlipped ? ((0, jsx_runtime_1.jsx)("div", { className: "table-container", children: rangesData && rangesData.length > 0 ? ((0, jsx_runtime_1.jsx)(RangesTable_1.default, { activeTab: activeTab, tableData: rangesData, onUnlink: unlinkRangeHandler, contextMenu: rangesContextMenuOptions, onContextMenuSelect: contextMenuSelectHandler, preferences: preferences, info: info })) : ((0, jsx_runtime_1.jsx)(NoTableData_1.default, {})) })) : ((0, jsx_runtime_1.jsx)(RangesPreferences_1.default, { ref: settingRef })) })] }));
|
|
131
128
|
}
|
|
132
129
|
const MemoizedRangesTablePanel = (0, react_2.memo)(RangesTablePanelInner);
|
|
133
130
|
const emptyData = { ranges: {}, data: {}, info: {} };
|
|
@@ -136,20 +133,18 @@ function RangesTablePanel() {
|
|
|
136
133
|
const { displayerKey, xDomain, view: { spectra: { activeTab }, }, molecules, toolOptions: { selectedTool }, view: { ranges: rangeState }, } = (0, ChartContext_1.useChartData)();
|
|
137
134
|
const { showMultiplicityTrees, showRangesIntegrals, showJGraph } = (0, react_2.useMemo)(() => rangeState.find((r) => r.spectrumID === id) || Reducer_1.rangeStateInit, [id, rangeState]);
|
|
138
135
|
const rangesPreferences = (0, usePanelPreferences_1.usePanelPreferences)('ranges', activeTab);
|
|
139
|
-
return ((0, jsx_runtime_1.jsx)(MemoizedRangesTablePanel, {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
molecules,
|
|
153
|
-
} }));
|
|
136
|
+
return ((0, jsx_runtime_1.jsx)(MemoizedRangesTablePanel, { id,
|
|
137
|
+
ranges,
|
|
138
|
+
data,
|
|
139
|
+
info,
|
|
140
|
+
showMultiplicityTrees,
|
|
141
|
+
showJGraph,
|
|
142
|
+
showRangesIntegrals,
|
|
143
|
+
selectedTool,
|
|
144
|
+
displayerKey,
|
|
145
|
+
preferences: rangesPreferences,
|
|
146
|
+
xDomain,
|
|
147
|
+
activeTab,
|
|
148
|
+
molecules }));
|
|
154
149
|
}
|
|
155
150
|
exports.default = RangesTablePanel;
|
|
@@ -3,7 +3,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.AssignmentColumnCssStyle = void 0;
|
|
7
6
|
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
8
7
|
/** @jsxImportSource @emotion/react */
|
|
9
8
|
const react_1 = require("@emotion/react");
|
|
@@ -28,17 +27,6 @@ const HighlightedRowStyle = (0, react_1.css) `
|
|
|
28
27
|
const ConstantlyHighlightedRowStyle = (0, react_1.css) `
|
|
29
28
|
background-color: #f5f5dc;
|
|
30
29
|
`;
|
|
31
|
-
exports.AssignmentColumnCssStyle = (0, react_1.css) `
|
|
32
|
-
.remove-assignment {
|
|
33
|
-
visibility: hidden;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
&:hover {
|
|
37
|
-
.remove-assignment {
|
|
38
|
-
visibility: visible;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
`;
|
|
42
30
|
function RangesTableRow({ rowData, onUnlink, onContextMenuSelect, contextMenu = [], preferences, info, }) {
|
|
43
31
|
const assignmentData = (0, AssignmentsContext_1.useAssignmentData)();
|
|
44
32
|
const assignmentRange = (0, AssignmentsContext_1.useAssignment)(rowData.id);
|