nmrium 0.34.0 → 0.35.0-pre.1683280699
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/LinesSeries.js +4 -5
- package/lib/component/1d/jCouplingGraph/JsCouplings.d.ts +1 -1
- package/lib/component/1d/multiplicityTree/LevelNode.d.ts +1 -1
- package/lib/component/1d/multiplicityTree/MultiplicityTree.d.ts +5 -7
- package/lib/component/1d/multiplicityTree/MultiplicityTree.js +142 -160
- package/lib/component/1d/multiplicityTree/StringNode.d.ts +1 -1
- package/lib/component/1d/multiplicityTree/buildTreeNode.d.ts +1 -1
- package/lib/component/1d/peaks/usePeakShapesPath.d.ts +4 -4
- package/lib/component/1d/ranges/AssignmentActionsButtons.d.ts +11 -0
- package/lib/component/1d/ranges/AssignmentActionsButtons.js +11 -0
- package/lib/component/1d/ranges/Range.d.ts +3 -10
- package/lib/component/1d/ranges/Range.js +32 -45
- package/lib/component/1d/ranges/Ranges.js +1 -1
- package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.d.ts +1 -2
- package/lib/component/1d-2d/components/FloatMoleculeStructures/index.d.ts +1 -2
- package/lib/component/2d/1d-tracer/Left1DChart.d.ts +2 -2
- package/lib/component/2d/1d-tracer/Top1DChart.d.ts +2 -2
- package/lib/component/2d/Chart2D.d.ts +2 -2
- package/lib/component/2d/ft/Contours.js +13 -13
- package/lib/component/2d/ft/FTContainer.d.ts +2 -2
- package/lib/component/2d/zones/Signal.d.ts +1 -1
- package/lib/component/2d/zones/Signal.js +1 -2
- package/lib/component/2d/zones/SignalCrosshair.d.ts +1 -1
- package/lib/component/2d/zones/SignalCrosshair.js +0 -1
- package/lib/component/2d/zones/Zone.d.ts +2 -2
- package/lib/component/NMRium.d.ts +2 -5
- package/lib/component/NMRium.js +10 -2
- package/lib/component/assignment/AssignmentsReducer.d.ts +1 -2
- package/lib/component/assignment/actions/removeAssignment.js +2 -2
- package/lib/component/context/PreferencesContext.d.ts +10 -21
- package/lib/component/context/PreferencesContext.js +4 -7
- package/lib/component/elements/Button.d.ts +4 -2
- package/lib/component/elements/Button.js +26 -15
- package/lib/component/elements/Input.js +38 -46
- package/lib/component/elements/NumberInput.d.ts +4 -12
- package/lib/component/elements/NumberInput.js +10 -40
- package/lib/component/elements/ReactTable/Elements/ReactTableRow.d.ts +2 -4
- package/lib/component/elements/ReactTable/Elements/ReactTableRow.js +3 -2
- package/lib/component/elements/ReactTable/ReactTable.d.ts +7 -6
- package/lib/component/elements/ReactTable/ReactTable.js +3 -12
- package/lib/component/elements/ReactTable/Style.js +0 -8
- package/lib/component/elements/formik/FormikNumberInput.d.ts +1 -1
- package/lib/component/elements/formik/FormikNumberInput.js +13 -3
- package/lib/component/header/ApodizationOptionsPanel.js +2 -12
- package/lib/component/header/AutoPeakPickingOptionPanel.js +11 -15
- package/lib/component/header/BaseLineCorrectionPanel.js +2 -12
- package/lib/component/header/Header.js +2 -2
- package/lib/component/header/PhaseCorrectionPanel.d.ts +2 -0
- package/lib/component/header/{ManualPhaseCorrectionPanel.js → PhaseCorrectionPanel.js} +23 -22
- package/lib/component/header/RangesPickingOptionPanel.js +17 -28
- package/lib/component/header/ZeroFillingOptionsPanel.js +1 -2
- package/lib/component/header/Zones2DOptionPanel.js +16 -23
- package/lib/component/highlight/index.d.ts +2 -2
- package/lib/component/hooks/useCheckToolsVisibility.d.ts +1 -2
- package/lib/component/hooks/useDatumWithSpectraStatistics.d.ts +2 -3
- package/lib/component/hooks/useFilter.d.ts +1 -1
- package/lib/component/hooks/useSpectraPerNucleus.d.ts +2 -3
- package/lib/component/hooks/useSpectrum.d.ts +2 -3
- package/lib/component/modal/EditPeakShapeModal.d.ts +2 -2
- package/lib/component/modal/ExportAsJcampModal.d.ts +8 -0
- package/lib/component/modal/ExportAsJcampModal.js +62 -0
- package/lib/component/modal/MultipletAnalysisModal.d.ts +2 -2
- package/lib/component/modal/changeSum/ChangeSumModal.d.ts +1 -1
- package/lib/component/modal/editRange/EditRangeModal.js +1 -1
- package/lib/component/modal/editRange/forms/components/SignalsForm.d.ts +1 -1
- package/lib/component/modal/editZone/EditPathLengthFormik.js +11 -14
- package/lib/component/modal/editZone/EditZoneModal.js +1 -1
- package/lib/component/modal/setting/settings-tabs/ToolsTabContent.js +1 -1
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignment.js +1 -1
- package/lib/component/panels/AutomaticAssignment/useAutoAssignments.d.ts +2 -2
- package/lib/component/panels/IntegralsPanel/IntegralPanel.d.ts +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralPanel.js +3 -3
- package/lib/component/panels/IntegralsPanel/IntegralTable.d.ts +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralsPreferences.js +8 -5
- package/lib/component/panels/MatrixGenerationPanel/MatrixGenerationPanel.js +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +1 -1
- package/lib/component/panels/MoleculesPanel/Utilities.d.ts +2 -3
- package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.js +1 -1
- package/lib/component/panels/PanelNoData.d.ts +6 -0
- package/lib/component/panels/PanelNoData.js +24 -0
- package/lib/component/panels/PeaksPanel/PeaksPanel.d.ts +2 -2
- package/lib/component/panels/PeaksPanel/PeaksPanel.js +1 -1
- package/lib/component/panels/RangesPanel/RangesHeader.js +4 -4
- package/lib/component/panels/RangesPanel/RangesPanel.js +12 -7
- package/lib/component/panels/RangesPanel/RangesTable.d.ts +4 -5
- package/lib/component/panels/RangesPanel/RangesTable.js +4 -14
- package/lib/component/panels/RangesPanel/RangesTableRow.d.ts +5 -4
- package/lib/component/panels/RangesPanel/RangesTableRow.js +15 -11
- package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.d.ts +6 -5
- package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js +37 -33
- package/lib/component/panels/RangesPanel/TableColumns/RemoveAssignmentsButton.d.ts +4 -0
- package/lib/component/panels/RangesPanel/TableColumns/RemoveAssignmentsButton.js +8 -0
- package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.d.ts +2 -3
- package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.js +6 -11
- package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaHzColumn.d.ts +1 -1
- package/lib/component/panels/RangesPanel/hooks/useMapRanges.d.ts +1 -1
- package/lib/component/panels/SpectrumsPanel/SpectraPanelHeader.js +1 -1
- package/lib/component/panels/SpectrumsPanel/SpectraTable.d.ts +3 -4
- package/lib/component/panels/SpectrumsPanel/SpectraTable.js +65 -17
- package/lib/component/panels/SpectrumsPanel/base/ColorIndicator.d.ts +1 -2
- package/lib/component/panels/SpectrumsPanel/base/ShowHideSpectrumButton.d.ts +3 -4
- package/lib/component/panels/SpectrumsPanel/base/SpectrumName.d.ts +2 -3
- package/lib/component/panels/SpectrumsPanel/base/setting/SpectrumSetting.js +0 -1
- package/lib/component/panels/SpectrumsPanel/base/setting/processSnapPlot.d.ts +2 -3
- package/lib/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +11 -8
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/EditPathLength.d.ts +1 -1
- package/lib/component/panels/SummaryPanel/utilities/Utilities.d.ts +4 -5
- package/lib/component/panels/ZonesPanel/ZonesPanel.js +1 -1
- package/lib/component/panels/ZonesPanel/ZonesTable.d.ts +1 -2
- package/lib/component/panels/ZonesPanel/ZonesTable.js +3 -13
- package/lib/component/panels/ZonesPanel/ZonesTableRow.d.ts +3 -3
- package/lib/component/panels/ZonesPanel/ZonesTableRow.js +3 -2
- package/lib/component/panels/databasePanel/DatabasePanel.js +77 -7
- package/lib/component/panels/databasePanel/DatabasePreferences.js +1 -1
- package/lib/component/panels/databasePanel/DatabaseTable.d.ts +2 -1
- package/lib/component/panels/databasePanel/DatabaseTable.js +17 -9
- package/lib/component/panels/filtersPanel/FiltersTable.js +16 -30
- package/lib/component/panels/header/DefaultPanelHeader.js +1 -1
- package/lib/component/panels/header/PreferencesHeader.js +1 -1
- package/lib/component/reducer/IgnoreActions.js +0 -1
- package/lib/component/reducer/Reducer.d.ts +4 -960
- package/lib/component/reducer/Reducer.js +3 -7
- package/lib/component/reducer/actions/AssignmentsActions.js +2 -4
- package/lib/component/reducer/actions/DatabaseActions.js +1 -1
- package/lib/component/reducer/actions/DomainActions.d.ts +5 -6
- package/lib/component/reducer/actions/DomainActions.js +17 -11
- package/lib/component/reducer/actions/FiltersActions.d.ts +14 -19
- package/lib/component/reducer/actions/FiltersActions.js +257 -152
- package/lib/component/reducer/actions/LoadActions.d.ts +2 -3
- package/lib/component/reducer/actions/LoadActions.js +1 -1
- package/lib/component/reducer/actions/PeaksActions.d.ts +1 -1
- package/lib/component/reducer/actions/PeaksActions.js +6 -2
- package/lib/component/reducer/actions/PreferencesActions.js +3 -0
- package/lib/component/reducer/actions/RangesActions.d.ts +1 -1
- package/lib/component/reducer/actions/RangesActions.js +19 -11
- package/lib/component/reducer/actions/SpectrumsActions.js +15 -13
- package/lib/component/reducer/actions/ToolsActions.d.ts +6 -2
- package/lib/component/reducer/actions/ToolsActions.js +41 -38
- package/lib/component/reducer/actions/ZonesActions.d.ts +1 -1
- package/lib/component/reducer/actions/ZonesActions.js +7 -3
- package/lib/component/reducer/helper/ZoomHistoryManager.d.ts +1 -1
- package/lib/component/reducer/helper/ZoomHistoryManager.js +6 -3
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js +1 -0
- package/lib/component/reducer/preferences/preferencesReducer.d.ts +3 -4843
- package/lib/component/reducer/preferences/preferencesReducer.js +1 -4
- package/lib/component/reducer/types/Types.d.ts +0 -2
- package/lib/component/reducer/types/Types.js +0 -2
- package/lib/component/toolbar/BasicToolBar.js +3 -3
- package/lib/component/toolbar/FunctionToolBar.js +2 -2
- package/lib/component/toolbar/ToolTypes.d.ts +1 -2
- package/lib/component/toolbar/ToolTypes.js +13 -13
- package/lib/component/utility/getSpectraByNucleus.d.ts +2 -3
- package/lib/component/utility/getSpectraObjectPaths.d.ts +2 -3
- package/lib/component/workspaces/Workspace.d.ts +1 -0
- package/lib/component/workspaces/assignment.js +1 -1
- package/lib/component/workspaces/basic.js +1 -1
- package/lib/component/workspaces/embedded.js +1 -1
- package/lib/component/workspaces/exercise.js +1 -1
- package/lib/component/workspaces/prediction.js +1 -1
- package/lib/component/workspaces/process1D.js +1 -1
- package/lib/component/workspaces/workspaceDefaultProperties.js +1 -1
- package/lib/data/Filters.d.ts +0 -4
- package/lib/data/Filters.js +0 -4
- package/lib/data/FiltersManager.d.ts +17 -5
- package/lib/data/FiltersManager.js +21 -14
- package/lib/data/PredictionManager.d.ts +2 -3
- package/lib/data/SpectraManager.d.ts +11 -0
- package/lib/data/SpectraManager.js +47 -5
- package/lib/data/data1d/Spectrum1D/SumManager.d.ts +1 -2
- package/lib/data/data1d/Spectrum1D/convertDataToFloat64Array.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/generateJGraphData.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/generateSpectrumFromPublicationString.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/get1DDataXY.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/getShiftX.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/getShiftX.js +3 -3
- package/lib/data/data1d/Spectrum1D/getSpectrumErrorValue.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/getSpectrumErrorValue.js +2 -2
- package/lib/data/data1d/Spectrum1D/initiateDatum1D.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/initiateDatum1D.js +16 -17
- package/lib/data/data1d/Spectrum1D/integrals/changeIntegralsRelative.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/integrals/changeIntegralsRelative.js +7 -7
- package/lib/data/data1d/Spectrum1D/integrals/checkIntegralKind.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/integrals/initiateIntegrals.d.ts +3 -3
- package/lib/data/data1d/Spectrum1D/integrals/initiateIntegrals.js +2 -2
- package/lib/data/data1d/Spectrum1D/integrals/mapIntegrals.d.ts +3 -4
- package/lib/data/data1d/Spectrum1D/integrals/mapIntegrals.js +3 -3
- package/lib/data/data1d/Spectrum1D/integrals/updateIntegrals.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/integrals/updateIntegrals.js +3 -3
- package/lib/data/data1d/Spectrum1D/integrals/updateIntegralsRelativeValues.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/integrals/updateIntegralsRelativeValues.js +2 -2
- package/lib/data/data1d/Spectrum1D/integrals/updateRelatives.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/isRangeAssigned.d.ts +2 -0
- package/lib/data/data1d/Spectrum1D/isRangeAssigned.js +10 -0
- package/lib/data/data1d/Spectrum1D/isSpectrum1D.d.ts +2 -3
- package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.js +5 -5
- package/lib/data/data1d/Spectrum1D/peaks/initiatePeaks.d.ts +3 -3
- package/lib/data/data1d/Spectrum1D/peaks/initiatePeaks.js +2 -2
- package/lib/data/data1d/Spectrum1D/peaks/lookupPeak.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/peaks/mapPeaks.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/peaks/mapPeaks.js +7 -7
- package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.d.ts +3 -3
- package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.js +5 -5
- package/lib/data/data1d/Spectrum1D/peaks/updatePeaks.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/peaks/updatePeaks.js +2 -2
- package/lib/data/data1d/Spectrum1D/ranges/addRange.d.ts +8 -9
- package/lib/data/data1d/Spectrum1D/ranges/addRange.js +13 -7
- package/lib/data/data1d/Spectrum1D/ranges/autoRangesDetection.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/ranges/autoRangesDetection.js +3 -3
- package/lib/data/data1d/Spectrum1D/ranges/changeRange.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/ranges/changeRange.js +13 -7
- package/lib/data/data1d/Spectrum1D/ranges/changeRangeRelativeValue.d.ts +3 -3
- package/lib/data/data1d/Spectrum1D/ranges/changeRangeRelativeValue.js +9 -9
- package/lib/data/data1d/Spectrum1D/ranges/changeRangeSignal.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/ranges/changeRangeSignal.js +6 -5
- package/lib/data/data1d/Spectrum1D/ranges/checkRangeKind.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectRange.d.ts +3 -2
- package/lib/data/data1d/Spectrum1D/ranges/detectRange.js +3 -3
- package/lib/data/data1d/Spectrum1D/ranges/detectRanges.d.ts +10 -9
- package/lib/data/data1d/Spectrum1D/ranges/detectRanges.js +6 -6
- package/lib/data/data1d/Spectrum1D/ranges/detectSignal.d.ts +1 -0
- package/lib/data/data1d/Spectrum1D/ranges/detectSignal.js +1 -0
- package/lib/data/data1d/Spectrum1D/ranges/generateSpectrumFromRanges.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.d.ts +7 -7
- package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.js +2 -2
- package/lib/data/data1d/Spectrum1D/ranges/mapRanges.d.ts +7 -7
- package/lib/data/data1d/Spectrum1D/ranges/mapRanges.js +7 -7
- package/lib/data/data1d/Spectrum1D/ranges/updateRanges.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/ranges/updateRanges.js +3 -3
- package/lib/data/data1d/Spectrum1D/ranges/updateRangesRelativeValues.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/ranges/updateRangesRelativeValues.js +2 -2
- package/lib/data/data1d/filter1d/apodization.d.ts +8 -6
- package/lib/data/data1d/filter1d/apodization.js +4 -0
- package/lib/data/data1d/filter1d/baselineCorrection.d.ts +6 -4
- package/lib/data/data1d/filter1d/baselineCorrection.js +4 -0
- package/lib/data/data1d/filter1d/digitalFilter.d.ts +7 -6
- package/lib/data/data1d/filter1d/digitalFilter.js +15 -11
- package/lib/data/data1d/filter1d/equallySpaced.d.ts +5 -5
- package/lib/data/data1d/filter1d/equallySpaced.js +10 -10
- package/lib/data/data1d/filter1d/exclusionZones.d.ts +7 -5
- package/lib/data/data1d/filter1d/exclusionZones.js +13 -9
- package/lib/data/data1d/filter1d/fft.d.ts +6 -4
- package/lib/data/data1d/filter1d/fft.js +27 -23
- package/lib/data/data1d/filter1d/phaseCorrection.d.ts +6 -5
- package/lib/data/data1d/filter1d/phaseCorrection.js +22 -17
- package/lib/data/data1d/filter1d/shiftX.d.ts +5 -3
- package/lib/data/data1d/filter1d/shiftX.js +7 -3
- package/lib/data/data1d/filter1d/signalProcessing.d.ts +7 -5
- package/lib/data/data1d/filter1d/signalProcessing.js +15 -11
- package/lib/data/data1d/filter1d/utils/padDataToNextPowerOfTwo.d.ts +2 -2
- package/lib/data/data1d/filter1d/utils/padDataToNextPowerOfTwo.js +6 -6
- package/lib/data/data1d/filter1d/zeroFilling.d.ts +7 -6
- package/lib/data/data1d/filter1d/zeroFilling.js +15 -11
- package/lib/data/data1d/multipleSpectraAnalysis.d.ts +4 -5
- package/lib/data/data2d/Spectrum2D/contours.d.ts +2 -2
- package/lib/data/data2d/Spectrum2D/contours.js +5 -4
- package/lib/data/data2d/Spectrum2D/get2DColor.d.ts +1 -1
- package/lib/data/data2d/Spectrum2D/get2DSpectrumErrorValue.d.ts +2 -2
- package/lib/data/data2d/Spectrum2D/get2DSpectrumErrorValue.js +2 -2
- package/lib/data/data2d/Spectrum2D/getMissingProjection.d.ts +2 -3
- package/lib/data/data2d/Spectrum2D/getShift.d.ts +2 -2
- package/lib/data/data2d/Spectrum2D/getShift.js +3 -3
- package/lib/data/data2d/Spectrum2D/getSlice.d.ts +4 -4
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.d.ts +2 -2
- package/lib/data/data2d/Spectrum2D/isSpectrum2D.d.ts +2 -3
- package/lib/data/data2d/Spectrum2D/zones/changeZoneSignal.d.ts +2 -2
- package/lib/data/data2d/Spectrum2D/zones/changeZoneSignal.js +4 -4
- package/lib/data/data2d/Spectrum2D/zones/detectZones.d.ts +1 -1
- package/lib/data/data2d/Spectrum2D/zones/detectZonesManual.d.ts +4 -10
- package/lib/data/data2d/Spectrum2D/zones/getDetectionZones.d.ts +2 -2
- package/lib/data/data2d/Spectrum2D/zones/getDetectionZones.js +4 -4
- package/lib/data/data2d/Spectrum2D/zones/initiateZones.d.ts +6 -12
- package/lib/data/data2d/Spectrum2D/zones/initiateZones.js +2 -2
- package/lib/data/data2d/Spectrum2D/zones/isZoneExists.d.ts +2 -2
- package/lib/data/data2d/Spectrum2D/zones/isZoneExists.js +3 -3
- package/lib/data/data2d/Spectrum2D/zones/mapZones.d.ts +6 -12
- package/lib/data/data2d/Spectrum2D/zones/mapZones.js +1 -0
- package/lib/data/data2d/Spectrum2D/zones/updateZones.d.ts +2 -2
- package/lib/data/data2d/Spectrum2D/zones/updateZones.js +2 -2
- package/lib/data/data2d/filter2d/shiftX.d.ts +6 -4
- package/lib/data/data2d/filter2d/shiftX.js +10 -6
- package/lib/data/data2d/filter2d/shiftY.d.ts +5 -3
- package/lib/data/data2d/filter2d/shiftY.js +5 -1
- package/lib/data/getDefaultMatrixFilters.d.ts +1 -1
- package/lib/data/molecules/MoleculeManager.d.ts +1 -1
- package/lib/data/molecules/MoleculeManager.js +2 -2
- package/lib/data/parseMeta/linkMetaWithSpectra.d.ts +2 -3
- package/lib/data/types/common/Info.d.ts +1 -0
- package/lib/data/types/data1d/ComplexData1D.d.ts +1 -1
- package/lib/data/types/data1d/RangeDetectionResult.d.ts +1 -1
- package/lib/data/types/data1d/index.d.ts +0 -11
- package/lib/data/types/data2d/index.d.ts +0 -7
- package/lib/data/utilities/FindUtilities.d.ts +7 -9
- package/lib/data/utilities/RangeUtilities.d.ts +7 -2
- package/lib/data/utilities/RangeUtilities.js +9 -16
- package/lib/data/utilities/ZoneUtilities.d.ts +1 -1
- package/lib/data/utilities/ZoneUtilities.js +6 -6
- package/lib/data/utilities/calculateSanPlot.d.ts +2 -3
- package/lib/data/utilities/convertSpectraListToObject.d.ts +2 -3
- package/lib/data/utilities/generateColor.d.ts +1 -1
- package/lib/types/NMRiumDataReturn.d.ts +2 -3
- package/lib/types/NMRiumToolBarPreferences.d.ts +1 -1
- package/lib/versionInfo.js +1 -1
- package/lib-cjs/component/1d/LinesSeries.js +4 -5
- package/lib-cjs/component/1d/multiplicityTree/MultiplicityTree.js +144 -160
- package/lib-cjs/component/1d/ranges/AssignmentActionsButtons.js +18 -0
- package/lib-cjs/component/1d/ranges/Range.js +31 -44
- package/lib-cjs/component/1d/ranges/Ranges.js +1 -1
- package/lib-cjs/component/2d/ft/Contours.js +13 -13
- package/lib-cjs/component/2d/zones/Signal.js +1 -2
- package/lib-cjs/component/2d/zones/SignalCrosshair.js +0 -1
- package/lib-cjs/component/NMRium.js +10 -2
- package/lib-cjs/component/assignment/actions/removeAssignment.js +2 -2
- package/lib-cjs/component/context/PreferencesContext.js +4 -7
- package/lib-cjs/component/elements/Button.js +26 -15
- package/lib-cjs/component/elements/Input.js +37 -45
- package/lib-cjs/component/elements/NumberInput.js +8 -38
- package/lib-cjs/component/elements/ReactTable/Elements/ReactTableRow.js +3 -2
- package/lib-cjs/component/elements/ReactTable/ReactTable.js +3 -12
- package/lib-cjs/component/elements/ReactTable/Style.js +0 -8
- package/lib-cjs/component/elements/formik/FormikNumberInput.js +13 -3
- package/lib-cjs/component/header/ApodizationOptionsPanel.js +1 -11
- package/lib-cjs/component/header/AutoPeakPickingOptionPanel.js +33 -14
- package/lib-cjs/component/header/BaseLineCorrectionPanel.js +1 -11
- package/lib-cjs/component/header/Header.js +2 -2
- package/lib-cjs/component/header/{ManualPhaseCorrectionPanel.js → PhaseCorrectionPanel.js} +24 -23
- package/lib-cjs/component/header/RangesPickingOptionPanel.js +38 -26
- package/lib-cjs/component/header/ZeroFillingOptionsPanel.js +0 -1
- package/lib-cjs/component/header/Zones2DOptionPanel.js +37 -21
- package/lib-cjs/component/modal/ExportAsJcampModal.js +67 -0
- package/lib-cjs/component/modal/editRange/EditRangeModal.js +1 -1
- package/lib-cjs/component/modal/editZone/EditPathLengthFormik.js +11 -14
- package/lib-cjs/component/modal/editZone/EditZoneModal.js +1 -1
- package/lib-cjs/component/modal/setting/settings-tabs/ToolsTabContent.js +1 -1
- package/lib-cjs/component/panels/AutomaticAssignment/AutomaticAssignment.js +1 -1
- package/lib-cjs/component/panels/IntegralsPanel/IntegralPanel.js +3 -3
- package/lib-cjs/component/panels/IntegralsPanel/IntegralsPreferences.js +8 -5
- package/lib-cjs/component/panels/MatrixGenerationPanel/MatrixGenerationPanel.js +1 -1
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanelHeader.js +1 -1
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.js +1 -1
- package/lib-cjs/component/panels/PanelNoData.js +28 -0
- package/lib-cjs/component/panels/PeaksPanel/PeaksPanel.js +1 -1
- package/lib-cjs/component/panels/RangesPanel/RangesHeader.js +4 -4
- package/lib-cjs/component/panels/RangesPanel/RangesPanel.js +12 -7
- package/lib-cjs/component/panels/RangesPanel/RangesTable.js +4 -14
- package/lib-cjs/component/panels/RangesPanel/RangesTableRow.js +15 -10
- package/lib-cjs/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js +36 -32
- package/lib-cjs/component/panels/RangesPanel/TableColumns/RemoveAssignmentsButton.js +12 -0
- package/lib-cjs/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.js +6 -11
- package/lib-cjs/component/panels/SpectrumsPanel/SpectraPanelHeader.js +1 -1
- package/lib-cjs/component/panels/SpectrumsPanel/SpectraTable.js +63 -15
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/SpectrumSetting.js +0 -1
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +11 -8
- package/lib-cjs/component/panels/ZonesPanel/ZonesPanel.js +1 -1
- package/lib-cjs/component/panels/ZonesPanel/ZonesTable.js +2 -12
- package/lib-cjs/component/panels/ZonesPanel/ZonesTableRow.js +3 -2
- package/lib-cjs/component/panels/databasePanel/DatabasePanel.js +76 -6
- package/lib-cjs/component/panels/databasePanel/DatabasePreferences.js +1 -1
- package/lib-cjs/component/panels/databasePanel/DatabaseTable.js +15 -7
- package/lib-cjs/component/panels/filtersPanel/FiltersTable.js +16 -30
- package/lib-cjs/component/panels/header/DefaultPanelHeader.js +1 -1
- package/lib-cjs/component/panels/header/PreferencesHeader.js +1 -1
- package/lib-cjs/component/reducer/IgnoreActions.js +0 -1
- package/lib-cjs/component/reducer/Reducer.js +3 -7
- package/lib-cjs/component/reducer/actions/AssignmentsActions.js +2 -4
- package/lib-cjs/component/reducer/actions/DatabaseActions.js +1 -1
- package/lib-cjs/component/reducer/actions/DomainActions.js +17 -11
- package/lib-cjs/component/reducer/actions/FiltersActions.js +257 -153
- package/lib-cjs/component/reducer/actions/LoadActions.js +1 -1
- package/lib-cjs/component/reducer/actions/PeaksActions.js +6 -2
- package/lib-cjs/component/reducer/actions/PreferencesActions.js +3 -0
- package/lib-cjs/component/reducer/actions/RangesActions.js +19 -11
- package/lib-cjs/component/reducer/actions/SpectrumsActions.js +13 -11
- package/lib-cjs/component/reducer/actions/ToolsActions.js +38 -35
- package/lib-cjs/component/reducer/actions/ZonesActions.js +7 -3
- package/lib-cjs/component/reducer/helper/ZoomHistoryManager.js +6 -3
- package/lib-cjs/component/reducer/preferences/panelsPreferencesDefaultValues.js +1 -0
- package/lib-cjs/component/reducer/preferences/preferencesReducer.js +1 -4
- package/lib-cjs/component/reducer/types/Types.js +2 -4
- package/lib-cjs/component/toolbar/BasicToolBar.js +3 -3
- package/lib-cjs/component/toolbar/FunctionToolBar.js +2 -2
- package/lib-cjs/component/toolbar/ToolTypes.js +13 -13
- package/lib-cjs/component/workspaces/assignment.js +1 -1
- package/lib-cjs/component/workspaces/basic.js +1 -1
- package/lib-cjs/component/workspaces/embedded.js +1 -1
- package/lib-cjs/component/workspaces/exercise.js +1 -1
- package/lib-cjs/component/workspaces/prediction.js +1 -1
- package/lib-cjs/component/workspaces/process1D.js +1 -1
- package/lib-cjs/component/workspaces/workspaceDefaultProperties.js +1 -1
- package/lib-cjs/data/Filters.js +1 -5
- package/lib-cjs/data/FiltersManager.js +22 -14
- package/lib-cjs/data/SpectraManager.js +48 -5
- package/lib-cjs/data/data1d/Spectrum1D/get1DDataXY.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/getShiftX.js +3 -3
- package/lib-cjs/data/data1d/Spectrum1D/getSpectrumErrorValue.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/initiateDatum1D.js +16 -17
- package/lib-cjs/data/data1d/Spectrum1D/integrals/changeIntegralsRelative.js +7 -7
- package/lib-cjs/data/data1d/Spectrum1D/integrals/initiateIntegrals.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/integrals/mapIntegrals.js +3 -3
- package/lib-cjs/data/data1d/Spectrum1D/integrals/updateIntegrals.js +3 -3
- package/lib-cjs/data/data1d/Spectrum1D/integrals/updateIntegralsRelativeValues.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/isRangeAssigned.js +14 -0
- package/lib-cjs/data/data1d/Spectrum1D/peaks/autoPeakPicking.js +5 -5
- package/lib-cjs/data/data1d/Spectrum1D/peaks/initiatePeaks.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/peaks/mapPeaks.js +7 -7
- package/lib-cjs/data/data1d/Spectrum1D/peaks/optimizePeaks.js +5 -5
- package/lib-cjs/data/data1d/Spectrum1D/peaks/updatePeaks.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/ranges/addRange.js +13 -7
- package/lib-cjs/data/data1d/Spectrum1D/ranges/autoRangesDetection.js +3 -3
- package/lib-cjs/data/data1d/Spectrum1D/ranges/changeRange.js +13 -7
- package/lib-cjs/data/data1d/Spectrum1D/ranges/changeRangeRelativeValue.js +9 -9
- package/lib-cjs/data/data1d/Spectrum1D/ranges/changeRangeSignal.js +6 -5
- package/lib-cjs/data/data1d/Spectrum1D/ranges/detectRange.js +3 -3
- package/lib-cjs/data/data1d/Spectrum1D/ranges/detectRanges.js +6 -6
- package/lib-cjs/data/data1d/Spectrum1D/ranges/detectSignal.js +1 -0
- package/lib-cjs/data/data1d/Spectrum1D/ranges/initiateRanges.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/ranges/mapRanges.js +7 -7
- package/lib-cjs/data/data1d/Spectrum1D/ranges/updateRanges.js +3 -3
- package/lib-cjs/data/data1d/Spectrum1D/ranges/updateRangesRelativeValues.js +2 -2
- package/lib-cjs/data/data1d/filter1d/apodization.js +5 -1
- package/lib-cjs/data/data1d/filter1d/baselineCorrection.js +5 -1
- package/lib-cjs/data/data1d/filter1d/digitalFilter.js +16 -12
- package/lib-cjs/data/data1d/filter1d/equallySpaced.js +10 -10
- package/lib-cjs/data/data1d/filter1d/exclusionZones.js +14 -10
- package/lib-cjs/data/data1d/filter1d/fft.js +27 -23
- package/lib-cjs/data/data1d/filter1d/phaseCorrection.js +23 -18
- package/lib-cjs/data/data1d/filter1d/shiftX.js +8 -4
- package/lib-cjs/data/data1d/filter1d/signalProcessing.js +16 -12
- package/lib-cjs/data/data1d/filter1d/utils/padDataToNextPowerOfTwo.js +6 -6
- package/lib-cjs/data/data1d/filter1d/zeroFilling.js +16 -12
- package/lib-cjs/data/data2d/Spectrum2D/contours.js +5 -4
- package/lib-cjs/data/data2d/Spectrum2D/get2DSpectrumErrorValue.js +2 -2
- package/lib-cjs/data/data2d/Spectrum2D/getShift.js +3 -3
- package/lib-cjs/data/data2d/Spectrum2D/zones/changeZoneSignal.js +4 -4
- package/lib-cjs/data/data2d/Spectrum2D/zones/getDetectionZones.js +4 -4
- package/lib-cjs/data/data2d/Spectrum2D/zones/initiateZones.js +2 -2
- package/lib-cjs/data/data2d/Spectrum2D/zones/isZoneExists.js +3 -3
- package/lib-cjs/data/data2d/Spectrum2D/zones/mapZones.js +1 -0
- package/lib-cjs/data/data2d/Spectrum2D/zones/updateZones.js +2 -2
- package/lib-cjs/data/data2d/filter2d/shiftX.js +11 -7
- package/lib-cjs/data/data2d/filter2d/shiftY.js +6 -2
- package/lib-cjs/data/molecules/MoleculeManager.js +2 -2
- package/lib-cjs/data/utilities/RangeUtilities.js +9 -16
- package/lib-cjs/data/utilities/ZoneUtilities.js +6 -6
- package/lib-cjs/versionInfo.js +1 -1
- package/package.json +37 -36
- package/lib/component/header/ManualPhaseCorrectionPanel.d.ts +0 -2
- package/lib/data/data1d/filter1d/centerMean.d.ts +0 -13
- package/lib/data/data1d/filter1d/centerMean.js +0 -37
- package/lib/data/data1d/filter1d/fromTo.d.ts +0 -13
- package/lib/data/data1d/filter1d/fromTo.js +0 -31
- package/lib/data/data1d/filter1d/pareto.d.ts +0 -13
- package/lib/data/data1d/filter1d/pareto.js +0 -29
- package/lib/data/data1d/filter1d/standardDeviation.d.ts +0 -13
- package/lib/data/data1d/filter1d/standardDeviation.js +0 -37
- package/lib/data/types/data1d/Data1D.d.ts +0 -5
- package/lib/data/types/data1d/Data1D.js +0 -1
- package/lib/data/types/data1d/Datum1D.d.ts +0 -23
- package/lib/data/types/data1d/Datum1D.js +0 -1
- package/lib/data/types/data1d/Display1D.d.ts +0 -5
- package/lib/data/types/data1d/Display1D.js +0 -1
- package/lib/data/types/data1d/Info1D.d.ts +0 -8
- package/lib/data/types/data1d/Info1D.js +0 -1
- package/lib/data/types/data1d/Integral.d.ts +0 -10
- package/lib/data/types/data1d/Integral.js +0 -1
- package/lib/data/types/data1d/Integrals.d.ts +0 -6
- package/lib/data/types/data1d/Integrals.js +0 -1
- package/lib/data/types/data1d/Peak.d.ts +0 -5
- package/lib/data/types/data1d/Peak.js +0 -1
- package/lib/data/types/data1d/Peaks.d.ts +0 -5
- package/lib/data/types/data1d/Peaks.js +0 -1
- package/lib/data/types/data1d/Range.d.ts +0 -11
- package/lib/data/types/data1d/Range.js +0 -1
- package/lib/data/types/data1d/Ranges.d.ts +0 -6
- package/lib/data/types/data1d/Ranges.js +0 -1
- package/lib/data/types/data1d/Signal1D.d.ts +0 -5
- package/lib/data/types/data1d/Signal1D.js +0 -1
- package/lib/data/types/data1d/SumOptions.d.ts +0 -7
- package/lib/data/types/data1d/SumOptions.js +0 -1
- package/lib/data/types/data2d/Data2D.d.ts +0 -20
- package/lib/data/types/data2d/Data2D.js +0 -1
- package/lib/data/types/data2d/Datum2D.d.ts +0 -19
- package/lib/data/types/data2d/Datum2D.js +0 -1
- package/lib/data/types/data2d/Display2D.d.ts +0 -11
- package/lib/data/types/data2d/Display2D.js +0 -1
- package/lib/data/types/data2d/Info2D.d.ts +0 -5
- package/lib/data/types/data2d/Info2D.js +0 -1
- package/lib/data/types/data2d/Signal2D.d.ts +0 -7
- package/lib/data/types/data2d/Signal2D.js +0 -1
- package/lib/data/types/data2d/Signal2DAxisData.d.ts +0 -4
- package/lib/data/types/data2d/Signal2DAxisData.js +0 -1
- package/lib/data/types/data2d/Zone.d.ts +0 -9
- package/lib/data/types/data2d/Zone.js +0 -1
- package/lib/data/types/data2d/Zone2DAxisData.d.ts +0 -6
- package/lib/data/types/data2d/Zone2DAxisData.js +0 -1
- package/lib/data/types/data2d/Zones.d.ts +0 -7
- package/lib/data/types/data2d/Zones.js +0 -1
- package/lib-cjs/data/data1d/filter1d/centerMean.js +0 -43
- package/lib-cjs/data/data1d/filter1d/fromTo.js +0 -37
- package/lib-cjs/data/data1d/filter1d/pareto.js +0 -35
- package/lib-cjs/data/data1d/filter1d/standardDeviation.js +0 -43
- package/lib-cjs/data/types/data1d/Data1D.js +0 -2
- package/lib-cjs/data/types/data1d/Datum1D.js +0 -2
- package/lib-cjs/data/types/data1d/Display1D.js +0 -2
- package/lib-cjs/data/types/data1d/Info1D.js +0 -2
- package/lib-cjs/data/types/data1d/Integral.js +0 -2
- package/lib-cjs/data/types/data1d/Integrals.js +0 -2
- package/lib-cjs/data/types/data1d/Peak.js +0 -2
- package/lib-cjs/data/types/data1d/Peaks.js +0 -2
- package/lib-cjs/data/types/data1d/Range.js +0 -2
- package/lib-cjs/data/types/data1d/Ranges.js +0 -2
- package/lib-cjs/data/types/data1d/Signal1D.js +0 -2
- package/lib-cjs/data/types/data1d/SumOptions.js +0 -2
- package/lib-cjs/data/types/data2d/Data2D.js +0 -2
- package/lib-cjs/data/types/data2d/Datum2D.js +0 -2
- package/lib-cjs/data/types/data2d/Display2D.js +0 -2
- package/lib-cjs/data/types/data2d/Info2D.js +0 -2
- package/lib-cjs/data/types/data2d/Signal2D.js +0 -2
- package/lib-cjs/data/types/data2d/Signal2DAxisData.js +0 -2
- package/lib-cjs/data/types/data2d/Zone.js +0 -2
- package/lib-cjs/data/types/data2d/Zone2DAxisData.js +0 -2
- package/lib-cjs/data/types/data2d/Zones.js +0 -2
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { get1DDataXY } from '../../data/data1d/Spectrum1D/get1DDataXY';
|
|
3
|
+
import { isSpectrum1D } from '../../data/data1d/Spectrum1D/isSpectrum1D';
|
|
3
4
|
import { useChartData } from '../context/ChartContext';
|
|
4
5
|
import { useActiveSpectra } from '../hooks/useActiveSpectra';
|
|
5
6
|
import Line from './Line';
|
|
6
7
|
function LinesSeries() {
|
|
7
|
-
const { data,
|
|
8
|
+
const { data, displayerKey, xDomains } = useChartData();
|
|
8
9
|
const activeSpectra = useActiveSpectra();
|
|
9
|
-
|
|
10
|
-
return (_jsxs("g", { clipPath: `url(#${displayerKey}clip-chart-1d)`, className: "spectrums", children: [
|
|
11
|
-
?.filter((d) => d.display.isVisible === true && xDomains[d.id])
|
|
12
|
-
.map((d, i) => (_jsx("g", { id: d.id, children: _jsx(Line, { display: d.display, id: d.id, data: get1DDataXY(d), index: i }) }, d.id))), activeSpectra?.map((activeSpectrum) => (_jsx("use", { href: `#${activeSpectrum.id}` }, activeSpectrum.id)))] }));
|
|
10
|
+
const spectra = (data?.filter((d) => isSpectrum1D(d) && d.display.isVisible && xDomains[d.id]) || []);
|
|
11
|
+
return (_jsxs("g", { clipPath: `url(#${displayerKey}clip-chart-1d)`, className: "spectrums", children: [spectra.map((d, i) => (_jsx("g", { id: d.id, children: _jsx(Line, { display: d.display, id: d.id, data: get1DDataXY(d), index: i }) }, d.id))), activeSpectra?.map((activeSpectrum) => (_jsx("use", { href: `#${activeSpectrum.id}` }, activeSpectrum.id)))] }));
|
|
13
12
|
}
|
|
14
13
|
export default LinesSeries;
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
import { Range } from 'nmr-load-save';
|
|
2
2
|
import { CSSProperties } from 'react';
|
|
3
|
-
import { Signal1D } from '../../../data/types/data1d';
|
|
4
3
|
interface MultiplicityTreeProps {
|
|
5
|
-
|
|
6
|
-
rangeTo: number;
|
|
7
|
-
signal: Signal1D;
|
|
4
|
+
range: Range;
|
|
8
5
|
labelOptions?: {
|
|
9
6
|
distance: number;
|
|
10
7
|
fontSize: CSSProperties['fontSize'];
|
|
11
8
|
};
|
|
9
|
+
onUnlink: (index: number) => void;
|
|
12
10
|
}
|
|
13
|
-
declare function MultiplicityTree(
|
|
14
|
-
export
|
|
11
|
+
export declare function MultiplicityTree(props: MultiplicityTreeProps): import("@emotion/react/jsx-runtime").JSX.Element | null;
|
|
12
|
+
export {};
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
2
2
|
/** @jsxImportSource @emotion/react */
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { css } from '@emotion/react';
|
|
4
|
+
import { useMemo } from 'react';
|
|
5
5
|
import { useAssignment, } from '../../assignment/AssignmentsContext';
|
|
6
6
|
import { useChartData } from '../../context/ChartContext';
|
|
7
7
|
import { useScaleChecked } from '../../context/ScaleContext';
|
|
8
8
|
import { HighlightEventSource, useHighlight } from '../../highlight';
|
|
9
|
-
import
|
|
9
|
+
import useSpectrum from '../../hooks/useSpectrum';
|
|
10
10
|
import { hasCouplingConstant, checkMultiplicity, } from '../../panels/extra/utilities/MultiplicityUtilities';
|
|
11
|
-
import {
|
|
12
|
-
import { assert } from '../../utility/assert';
|
|
11
|
+
import { AssignmentActionsButtons } from '../ranges/AssignmentActionsButtons';
|
|
13
12
|
import LevelNode from './LevelNode';
|
|
14
13
|
import StringNode from './StringNode';
|
|
15
14
|
import TreeNodes from './TreeNodes';
|
|
@@ -19,178 +18,161 @@ const styles = {
|
|
|
19
18
|
opacity: 0.6,
|
|
20
19
|
strokeWidth: 1,
|
|
21
20
|
};
|
|
21
|
+
const cssStyle = css `
|
|
22
|
+
.signal-target {
|
|
23
|
+
visibility: hidden;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&:hover {
|
|
27
|
+
.signal-target {
|
|
28
|
+
visibility: visible;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
`;
|
|
32
|
+
const BOX_PADDING = 5;
|
|
22
33
|
function extractID(assignment) {
|
|
23
34
|
return [assignment.id].concat(assignment.assigned?.x || []);
|
|
24
35
|
}
|
|
25
|
-
function
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
36
|
+
function InnerMultiplicityTree({ labelOptions, onUnlink, data, width: widthProp, index, }) {
|
|
37
|
+
const { startX, signal, width, height, startY } = data;
|
|
38
|
+
const { scaleX } = useScaleChecked();
|
|
39
|
+
const showLabels = width / widthProp >= 0.1;
|
|
40
|
+
labelOptions = labelOptions || {
|
|
41
|
+
distance: 10,
|
|
42
|
+
fontSize: 11,
|
|
43
|
+
};
|
|
32
44
|
const assignment = useAssignment(signal.id);
|
|
33
45
|
const highlight = useHighlight(extractID(assignment), {
|
|
34
46
|
type: HighlightEventSource.SIGNAL,
|
|
35
47
|
});
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
48
|
+
function assignHandler() {
|
|
49
|
+
assignment.setActive('x');
|
|
50
|
+
}
|
|
51
|
+
function unAssignHandler() {
|
|
52
|
+
onUnlink(index);
|
|
53
|
+
}
|
|
54
|
+
const isHighlighted = highlight.isActive || assignment.isActive;
|
|
55
|
+
return (_jsxs("g", { style: isHighlighted ? { ...styles, opacity: 1, strokeWidth: 1.5 } : styles, ...{
|
|
56
|
+
onMouseEnter: () => {
|
|
57
|
+
assignment.show('x');
|
|
58
|
+
highlight.show();
|
|
59
|
+
},
|
|
60
|
+
onMouseLeave: () => {
|
|
61
|
+
assignment.hide();
|
|
62
|
+
highlight.hide();
|
|
63
|
+
},
|
|
64
|
+
}, pointerEvents: "bounding-box", ...(!assignment.isActive && { css: cssStyle }), children: [drawTree(data, { scaleX, labelOptions, showLabels }), _jsx("rect", { x: startX - BOX_PADDING, y: startY - BOX_PADDING, width: width + BOX_PADDING * 2, height: height + BOX_PADDING * 2, fill: isHighlighted ? '#ff6f0057' : 'transparent', "data-no-export": "true" }), _jsx(AssignmentActionsButtons, { className: "signal-target", isActive: !!(assignment.isActive || signal?.diaIDs), y: startY, x: scaleX()(signal.delta) - 30, onAssign: assignHandler, onUnAssign: unAssignHandler, borderRadius: 16 })] }));
|
|
65
|
+
}
|
|
66
|
+
export function MultiplicityTree(props) {
|
|
67
|
+
const { width } = useChartData();
|
|
68
|
+
const spectrum = useSpectrum(null);
|
|
69
|
+
const { scaleX, scaleY } = useScaleChecked();
|
|
70
|
+
const treeData = useMemo(() => spectrum
|
|
71
|
+
? getTree(props.range, spectrum, { scaleX, scaleY })
|
|
72
|
+
: [], [props.range, scaleX, scaleY, spectrum]);
|
|
73
|
+
if (!spectrum)
|
|
74
|
+
return null;
|
|
75
|
+
return (_jsx("g", { children: treeData?.map((data, index) => (_jsx(InnerMultiplicityTree, { index: index, data: data, width: width, ...props }, data.signal.id))) }));
|
|
76
|
+
}
|
|
77
|
+
function getTree(range, spectrum, scale) {
|
|
78
|
+
const SHIFT_X = 30;
|
|
79
|
+
const treeResult = [];
|
|
80
|
+
const { signals = [], ...otherRangeProps } = range;
|
|
81
|
+
for (const signal of signals) {
|
|
82
|
+
const isMassive = !checkMultiplicity(signal.multiplicity, ['m']);
|
|
58
83
|
const length = signal?.multiplicity?.length || 0;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
levelHeight: _treeLevelHeight,
|
|
66
|
-
});
|
|
67
|
-
setDrawInFullRange(_drawInFullRange);
|
|
68
|
-
}, [
|
|
69
|
-
labelOptions.distance,
|
|
70
|
-
scaleX,
|
|
71
|
-
signal.multiplicity,
|
|
72
|
-
xRange.x1,
|
|
73
|
-
xRange.x2,
|
|
74
|
-
]);
|
|
75
|
-
useEffect(() => {
|
|
76
|
-
if (treeProps.width / width >= 0.1) {
|
|
77
|
-
setShowLabels(true);
|
|
78
|
-
}
|
|
79
|
-
else {
|
|
80
|
-
setShowLabels(false);
|
|
81
|
-
}
|
|
82
|
-
}, [treeProps.width, width]);
|
|
83
|
-
const startY = useMemo(() => {
|
|
84
|
-
let yMax;
|
|
85
|
-
for (const [i, _x] of spectrumData.data.x.entries()) {
|
|
86
|
-
if (_x >= rangeFrom &&
|
|
87
|
-
_x <= rangeTo &&
|
|
88
|
-
(!yMax || spectrumData.data.re[i] > yMax)) {
|
|
89
|
-
yMax = spectrumData.data.re[i];
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
return scaleY(spectrumData.id)(yMax) - treeProps.height - 30;
|
|
93
|
-
}, [
|
|
94
|
-
spectrumData.data.x,
|
|
95
|
-
spectrumData.data.re,
|
|
96
|
-
spectrumData.id,
|
|
97
|
-
scaleY,
|
|
98
|
-
treeProps.height,
|
|
99
|
-
rangeFrom,
|
|
100
|
-
rangeTo,
|
|
101
|
-
]);
|
|
102
|
-
const treeNodesData = useMemo(() => {
|
|
84
|
+
let width = 0;
|
|
85
|
+
let height = 0;
|
|
86
|
+
let levelHeight = 0;
|
|
87
|
+
let nodes = [];
|
|
88
|
+
let startX = 0;
|
|
89
|
+
const { from, to } = range;
|
|
103
90
|
if (signal.multiplicity) {
|
|
104
|
-
const buildTreeNodesData = createTreeNodes(signal,
|
|
91
|
+
const buildTreeNodesData = createTreeNodes(signal, spectrum);
|
|
105
92
|
const jIndices = signal.multiplicity
|
|
106
93
|
.split('')
|
|
107
94
|
.map((_mult, i) => (hasCouplingConstant(_mult) ? i : undefined))
|
|
108
95
|
.filter((_i) => _i !== undefined);
|
|
109
|
-
|
|
96
|
+
nodes = buildTreeNodesData(0, jIndices, [], signal.delta);
|
|
110
97
|
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
98
|
+
// +2 because of multiplicity text and start level node before the actual tree starts
|
|
99
|
+
// 2* for levels between nodes (edges)
|
|
100
|
+
if (isMassive) {
|
|
101
|
+
startX = scale.scaleX()(to);
|
|
102
|
+
width = Math.abs(scale.scaleX()(from)) - Math.abs(startX);
|
|
103
|
+
height = width / 3;
|
|
104
|
+
levelHeight = height / (length + 2);
|
|
116
105
|
}
|
|
117
106
|
else {
|
|
118
|
-
const
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
if (_treeNodeData._startX > _xRange.x2) {
|
|
130
|
-
_xRange.x2 = _treeNodeData._startX;
|
|
131
|
-
}
|
|
107
|
+
const treeRange = getTreeRange(nodes, signal.delta);
|
|
108
|
+
startX = scale.scaleX()(treeRange.to);
|
|
109
|
+
width = Math.abs(scale.scaleX()(treeRange.from)) - Math.abs(startX);
|
|
110
|
+
height = width / 2;
|
|
111
|
+
if (signal.multiplicity !== 's') {
|
|
112
|
+
levelHeight = height / (2 * length + 2);
|
|
113
|
+
height = width / 2;
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
levelHeight = 3;
|
|
117
|
+
height = levelHeight * 4;
|
|
132
118
|
}
|
|
133
|
-
setXRange(_xRange);
|
|
134
119
|
}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
120
|
+
const startY = scale.scaleY(spectrum.id)(getStartY(spectrum, { from, to })) -
|
|
121
|
+
height -
|
|
122
|
+
SHIFT_X;
|
|
123
|
+
treeResult.push({
|
|
124
|
+
isMassive,
|
|
125
|
+
startX,
|
|
126
|
+
startY,
|
|
127
|
+
width,
|
|
128
|
+
height,
|
|
129
|
+
levelHeight,
|
|
130
|
+
nodes,
|
|
131
|
+
signal,
|
|
132
|
+
range: otherRangeProps,
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
return treeResult;
|
|
136
|
+
}
|
|
137
|
+
function getStartY(spectrum, options) {
|
|
138
|
+
const { data: { x, re }, } = spectrum;
|
|
139
|
+
const { from, to } = options;
|
|
140
|
+
let max = Number.NEGATIVE_INFINITY;
|
|
141
|
+
for (const i in x) {
|
|
142
|
+
if (x[i] >= from && x[i] <= to && re[i] > max) {
|
|
143
|
+
max = re[i];
|
|
158
144
|
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
return
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
}
|
|
193
|
-
},
|
|
194
|
-
}, children: multiplicityTree }));
|
|
145
|
+
}
|
|
146
|
+
return max;
|
|
147
|
+
}
|
|
148
|
+
function getTreeRange(nodes, delta) {
|
|
149
|
+
const range = { from: delta, to: delta };
|
|
150
|
+
for (const node of nodes) {
|
|
151
|
+
if (node._startX < range.from) {
|
|
152
|
+
range.from = node._startX;
|
|
153
|
+
}
|
|
154
|
+
if (node._startX > range.to) {
|
|
155
|
+
range.to = node._startX;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
return range;
|
|
159
|
+
}
|
|
160
|
+
function drawTree(treeData, { scaleX, labelOptions, showLabels }) {
|
|
161
|
+
const { isMassive, signal, levelHeight, range, nodes, startY } = treeData;
|
|
162
|
+
// const { levelHeight } = treeProps;
|
|
163
|
+
// first tree level
|
|
164
|
+
const firstLevelStartY = startY;
|
|
165
|
+
let _startY = firstLevelStartY;
|
|
166
|
+
// second tree level
|
|
167
|
+
const secondLevelStartY = startY + levelHeight;
|
|
168
|
+
_startY = secondLevelStartY;
|
|
169
|
+
// third tree level
|
|
170
|
+
_startY += levelHeight;
|
|
171
|
+
if (isMassive) {
|
|
172
|
+
const _rangeFrom = scaleX()(range.from);
|
|
173
|
+
const _rangeTo = scaleX()(range.to);
|
|
174
|
+
const pathData = `M ${_rangeFrom} ${_startY + levelHeight} ${_rangeFrom} ${_startY} ${scaleX()(signal.delta)} ${_startY} ${_rangeTo} ${_startY} ${_rangeTo} ${_startY + levelHeight}`;
|
|
175
|
+
return (_jsxs("g", { children: [_jsx(StringNode, { signal: signal, startY: firstLevelStartY, levelHeight: levelHeight, fontSize: labelOptions.fontSize, showLabels: showLabels }), _jsx(LevelNode, { signal: signal, startY: secondLevelStartY, levelHeight: levelHeight }), _jsx("path", { d: pathData, stroke: "blue", fill: "none" })] }));
|
|
176
|
+
}
|
|
177
|
+
return (_jsxs("g", { children: [_jsx(StringNode, { signal: signal, startY: firstLevelStartY, levelHeight: levelHeight, fontSize: labelOptions.fontSize, showLabels: showLabels }), _jsx(LevelNode, { signal: signal, startY: secondLevelStartY, levelHeight: levelHeight }), _jsx(TreeNodes, { nodesData: nodes, signalID: nodes, showLabels: showLabels, startY: startY, labelOptions: labelOptions, levelHeight: levelHeight })] }));
|
|
195
178
|
}
|
|
196
|
-
export default MultiplicityTree;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Signal1D } from '
|
|
1
|
+
import { Signal1D } from 'nmr-load-save';
|
|
2
2
|
declare function createTreeNodes(signal: Signal1D, spectrumData: any): (multiplicityIndex: any, jIndices: any, treeNodesData: any, startX: any) => any;
|
|
3
3
|
export default createTreeNodes;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Spectrum1D, Peak1D } from 'nmr-load-save';
|
|
2
2
|
type PeaksShapesOptions = {
|
|
3
3
|
target: 'peakShape';
|
|
4
|
-
peak:
|
|
4
|
+
peak: Peak1D;
|
|
5
5
|
} | {
|
|
6
6
|
target: 'peaksSum';
|
|
7
|
-
peaks:
|
|
7
|
+
peaks: Peak1D[];
|
|
8
8
|
};
|
|
9
|
-
export declare function usePeakShapesPath(spectrum:
|
|
9
|
+
export declare function usePeakShapesPath(spectrum: Spectrum1D): (options: PeaksShapesOptions) => {
|
|
10
10
|
path: string;
|
|
11
11
|
fill: string;
|
|
12
12
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ButtonProps } from '../../elements/Button';
|
|
3
|
+
export interface AssignmentActionsButtonsProps extends Omit<ButtonProps, 'children' | 'onClick'> {
|
|
4
|
+
isActive: boolean;
|
|
5
|
+
x?: number;
|
|
6
|
+
y?: number;
|
|
7
|
+
className?: string;
|
|
8
|
+
onAssign: ButtonProps['onClick'];
|
|
9
|
+
onUnAssign: ButtonProps['onClick'];
|
|
10
|
+
}
|
|
11
|
+
export declare function AssignmentActionsButtons(props: AssignmentActionsButtonsProps): JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { FaLink, FaMinus } from 'react-icons/fa';
|
|
3
|
+
import Button from '../../elements/Button';
|
|
4
|
+
const styles = {
|
|
5
|
+
button: { width: '16px', height: '16px', padding: 0 },
|
|
6
|
+
icon: { fontSize: 9, margin: 'auto' },
|
|
7
|
+
};
|
|
8
|
+
export function AssignmentActionsButtons(props) {
|
|
9
|
+
const { isActive, onAssign, onUnAssign, x = 0, y = 5, className = 'target', ...otherProps } = props;
|
|
10
|
+
return (_jsxs("foreignObject", { width: "16px", height: "34px", x: x, y: y, className: className, "data-no-export": "true", children: [_jsx(Button, { theme: "success", style: styles.button, onClick: onAssign, ...otherProps, children: _jsx(FaLink, { style: styles.icon }) }), isActive && (_jsx(Button, { theme: "danger", style: { ...styles.button, marginTop: '2px' }, onClick: onUnAssign, ...otherProps, children: _jsx(FaMinus, { style: styles.icon }) }))] }));
|
|
11
|
+
}
|
|
@@ -1,16 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface RangeData {
|
|
3
|
-
id: string;
|
|
4
|
-
from: number;
|
|
5
|
-
to: number;
|
|
6
|
-
integration: number;
|
|
7
|
-
signals: Signal1D[];
|
|
8
|
-
}
|
|
1
|
+
import { Range as RangeType } from 'nmr-load-save';
|
|
9
2
|
interface RangeProps {
|
|
10
3
|
showMultiplicityTrees: boolean;
|
|
11
4
|
selectedTool: string;
|
|
12
|
-
|
|
5
|
+
range: RangeType;
|
|
13
6
|
relativeFormat: string;
|
|
14
7
|
}
|
|
15
|
-
declare function Range({
|
|
8
|
+
declare function Range({ range, showMultiplicityTrees, selectedTool, relativeFormat, }: RangeProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
16
9
|
export default Range;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
2
2
|
/** @jsxImportSource @emotion/react */
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
|
+
import { isRangeAssigned } from '../../../data/data1d/Spectrum1D/isRangeAssigned';
|
|
4
5
|
import { checkRangeKind } from '../../../data/utilities/RangeUtilities';
|
|
5
6
|
import { useAssignment, useAssignmentData, } from '../../assignment/AssignmentsContext';
|
|
6
7
|
import { filterForIDsWithAssignment } from '../../assignment/utilities/filterForIDsWithAssignment';
|
|
@@ -9,41 +10,25 @@ import { useGlobal } from '../../context/GlobalContext';
|
|
|
9
10
|
import { useScaleChecked } from '../../context/ScaleContext';
|
|
10
11
|
import Resizer from '../../elements/resizer/Resizer';
|
|
11
12
|
import { HighlightEventSource, useHighlight } from '../../highlight';
|
|
12
|
-
import { RESIZE_RANGE } from '../../reducer/types/Types';
|
|
13
|
+
import { RESIZE_RANGE, UNLINK_RANGE } from '../../reducer/types/Types';
|
|
13
14
|
import { options } from '../../toolbar/ToolTypes';
|
|
14
15
|
import { IntegralIndicator } from '../integral/IntegralIndicator';
|
|
15
|
-
import MultiplicityTree from '../multiplicityTree/MultiplicityTree';
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
@-moz-document url-prefix("") {
|
|
20
|
-
pointer-events: fill;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.highlight {
|
|
24
|
-
fill: transparent;
|
|
25
|
-
}
|
|
26
|
-
|
|
16
|
+
import { MultiplicityTree } from '../multiplicityTree/MultiplicityTree';
|
|
17
|
+
import { AssignmentActionsButtons } from './AssignmentActionsButtons';
|
|
18
|
+
const style = css `
|
|
27
19
|
.target {
|
|
28
20
|
visibility: hidden;
|
|
29
21
|
}
|
|
30
|
-
`;
|
|
31
|
-
const stylesHighlighted = css `
|
|
32
|
-
pointer-events: bounding-box;
|
|
33
|
-
|
|
34
|
-
@-moz-document url-prefix("") {
|
|
35
|
-
pointer-events: fill;
|
|
36
|
-
}
|
|
37
22
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
23
|
+
&:hover {
|
|
24
|
+
.target {
|
|
25
|
+
visibility: visible;
|
|
26
|
+
}
|
|
42
27
|
}
|
|
43
28
|
`;
|
|
44
|
-
function Range({
|
|
29
|
+
function Range({ range, showMultiplicityTrees, selectedTool, relativeFormat, }) {
|
|
45
30
|
const { viewerRef } = useGlobal();
|
|
46
|
-
const { id, integration, signals } =
|
|
31
|
+
const { id, integration, signals, diaIDs } = range;
|
|
47
32
|
const assignmentData = useAssignmentData();
|
|
48
33
|
const assignmentRange = useAssignment(id);
|
|
49
34
|
const highlightRange = useHighlight([assignmentRange.id].concat(assignmentRange.assigned?.x || []).concat(filterForIDsWithAssignment(assignmentData, signals.map((_signal) => _signal.id))), { type: HighlightEventSource.RANGE, extra: { id } });
|
|
@@ -54,7 +39,7 @@ function Range({ rangeData, showMultiplicityTrees, selectedTool, relativeFormat,
|
|
|
54
39
|
dispatch({
|
|
55
40
|
type: RESIZE_RANGE,
|
|
56
41
|
data: {
|
|
57
|
-
...
|
|
42
|
+
...range,
|
|
58
43
|
from: scaleX().invert(position.x2),
|
|
59
44
|
to: scaleX().invert(position.x1),
|
|
60
45
|
},
|
|
@@ -68,27 +53,29 @@ function Range({ rangeData, showMultiplicityTrees, selectedTool, relativeFormat,
|
|
|
68
53
|
assignmentRange.hide();
|
|
69
54
|
highlightRange.hide();
|
|
70
55
|
}
|
|
71
|
-
function
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
56
|
+
function unAssignHandler(signalIndex = -1) {
|
|
57
|
+
dispatch({
|
|
58
|
+
type: UNLINK_RANGE,
|
|
59
|
+
payload: {
|
|
60
|
+
rangeData: range,
|
|
61
|
+
assignmentData,
|
|
62
|
+
signalIndex,
|
|
63
|
+
},
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
function assignHandler() {
|
|
67
|
+
if (!isBlockedByEditing) {
|
|
75
68
|
assignmentRange.setActive('x');
|
|
76
69
|
}
|
|
77
70
|
}
|
|
78
|
-
const from = scaleX()(
|
|
79
|
-
const to = scaleX()(
|
|
80
|
-
const isNotSignal = !checkRangeKind(
|
|
81
|
-
|
|
71
|
+
const from = scaleX()(range.from);
|
|
72
|
+
const to = scaleX()(range.to);
|
|
73
|
+
const isNotSignal = !checkRangeKind(range);
|
|
74
|
+
const isHighlighted = isBlockedByEditing || highlightRange.isActive || assignmentRange.isActive;
|
|
75
|
+
const isAssigned = isRangeAssigned(range);
|
|
76
|
+
return (_jsxs("g", { "data-test-id": "range", style: { outline: 'none' }, onMouseEnter: mouseEnterHandler, onMouseLeave: mouseLeaveHandler, ...(!assignmentRange.isActive && { css: style }), children: [_jsx(Resizer, { tag: "svg", initialPosition: { x1: to, x2: from }, onEnd: handleOnStopResizing, parentElement: viewerRef, disabled: selectedTool !== options.rangePicking.id, children: ({ x1, x2 }, isActive) => {
|
|
82
77
|
const width = x2 - x1;
|
|
83
|
-
return (_jsxs("g", {
|
|
84
|
-
|
|
85
|
-
assignmentRange.isActive ||
|
|
86
|
-
isActive
|
|
87
|
-
? stylesHighlighted
|
|
88
|
-
: stylesOnHover, children: [_jsx("rect", { width: width, height: "100%", className: "highlight", "data-no-export": "true" }), _jsx(IntegralIndicator, { value: integration, format: relativeFormat, width: width, opacity: isNotSignal ? 0.5 : 1 })] }));
|
|
89
|
-
} }, `${id}_${to}_${from}`), showMultiplicityTrees &&
|
|
90
|
-
signals &&
|
|
91
|
-
signals.length > 0 &&
|
|
92
|
-
signals.map((_signal) => (_jsx(MultiplicityTree, { rangeFrom: rangeData.from, rangeTo: rangeData.to, signal: _signal }, _signal.id)))] }, id));
|
|
78
|
+
return (_jsxs("g", { children: [isAssigned && !isHighlighted && !isActive && (_jsx("rect", { width: width, height: "10px", fill: "#ffd700", opacity: "0.35", "data-no-export": "true" })), _jsx("rect", { width: width, height: "100%", fill: isHighlighted || isActive ? '#ff6f0057' : 'transparent', "data-no-export": "true" }), _jsx(IntegralIndicator, { value: integration, format: relativeFormat, width: width, opacity: isNotSignal ? 0.5 : 1 })] }));
|
|
79
|
+
} }, `${id}_${to}_${from}`), showMultiplicityTrees && (_jsx(MultiplicityTree, { range: range, onUnlink: unAssignHandler })), _jsx(AssignmentActionsButtons, { isActive: !!(assignmentRange.isActive || diaIDs), x: from - 16, onAssign: assignHandler, onUnAssign: () => unAssignHandler() })] }, id));
|
|
93
80
|
}
|
|
94
81
|
export default Range;
|
|
@@ -8,7 +8,7 @@ import { rangeStateInit } from '../../reducer/Reducer';
|
|
|
8
8
|
import Range from './Range';
|
|
9
9
|
import RangeIntegral from './RangeIntegral';
|
|
10
10
|
function RangesInner({ ranges, displayerKey, selectedTool, showMultiplicityTrees, showRangesIntegrals, relativeFormat, }) {
|
|
11
|
-
return (_jsx("g", { clipPath: `url(#${displayerKey}clip-chart-1d)`, children: ranges?.values?.map((range) => (_jsxs(Fragment, { children: [_jsx(Range, {
|
|
11
|
+
return (_jsx("g", { clipPath: `url(#${displayerKey}clip-chart-1d)`, children: ranges?.values?.map((range) => (_jsxs(Fragment, { children: [_jsx(Range, { range: range, selectedTool: selectedTool, showMultiplicityTrees: showMultiplicityTrees, relativeFormat: relativeFormat }), showRangesIntegrals && _jsx(RangeIntegral, { range: range })] }, range.id))) }));
|
|
12
12
|
}
|
|
13
13
|
const MemoizedRanges = memo(RangesInner);
|
|
14
14
|
export default function Ranges() {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
+
import { Ranges, Zones } from 'nmr-load-save';
|
|
1
2
|
import { MoleculeView, StateMoleculeExtended } from '../../../../data/molecules/Molecule';
|
|
2
|
-
import { Ranges } from '../../../../data/types/data1d/index';
|
|
3
|
-
import { Zones } from '../../../../data/types/data2d/index';
|
|
4
3
|
import { DISPLAYER_MODE } from '../../../reducer/core/Constants';
|
|
5
4
|
interface DraggableStructureProps {
|
|
6
5
|
zones: Zones;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { Zones, Ranges } from 'nmr-load-save';
|
|
2
3
|
import { MoleculesView, StateMoleculeExtended } from '../../../../data/molecules/Molecule';
|
|
3
|
-
import { Ranges } from '../../../../data/types/data1d/index';
|
|
4
|
-
import { Zones } from '../../../../data/types/data2d/index';
|
|
5
4
|
import { DISPLAYER_MODE } from '../../../reducer/core/Constants';
|
|
6
5
|
interface FloatMoleculeStructuresProps {
|
|
7
6
|
zones: Zones;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { Spectrum1D } from 'nmr-load-save';
|
|
3
3
|
interface Left1DChartProps {
|
|
4
4
|
margin?: number;
|
|
5
|
-
data:
|
|
5
|
+
data: Spectrum1D;
|
|
6
6
|
}
|
|
7
7
|
declare function Left1DChart({ margin: marginValue, data: spectrum, }: Left1DChartProps): JSX.Element | null;
|
|
8
8
|
declare const _default: import("react").MemoExoticComponent<typeof Left1DChart>;
|