nmrium 1.9.0 → 1.10.1
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/ApodizationLine.js +1 -1
- package/lib/component/1d/ApodizationLine.js.map +1 -1
- package/lib/component/1d/BrushTracker1D.d.ts.map +1 -1
- package/lib/component/1d/BrushTracker1D.js.map +1 -1
- package/lib/component/1d/FooterBanner.js.map +1 -1
- package/lib/component/1d/LinesSeries.js +2 -2
- package/lib/component/1d/LinesSeries.js.map +1 -1
- package/lib/component/1d/SVGContent1D.d.ts.map +1 -1
- package/lib/component/1d/SVGContent1D.js +2 -1
- package/lib/component/1d/SVGContent1D.js.map +1 -1
- package/lib/component/1d/SimilarityTree.d.ts.map +1 -1
- package/lib/component/1d/SimilarityTree.js.map +1 -1
- package/lib/component/1d/inset/InsetProvider.d.ts.map +1 -1
- package/lib/component/1d/inset/InsetProvider.js.map +1 -1
- package/lib/component/1d/integral/IntegralResizable.d.ts.map +1 -1
- package/lib/component/1d/integral/IntegralResizable.js.map +1 -1
- package/lib/component/1d/matrix/Boxplot.js.map +1 -1
- package/lib/component/1d/multiAnalysis/AnalysisRange.d.ts.map +1 -1
- package/lib/component/1d/multiAnalysis/AnalysisRange.js.map +1 -1
- package/lib/component/1d/multiplicityTree/MultiplicityTree.d.ts.map +1 -1
- package/lib/component/1d/multiplicityTree/MultiplicityTree.js +13 -20
- package/lib/component/1d/multiplicityTree/MultiplicityTree.js.map +1 -1
- package/lib/component/1d/multiplicityTree/generateTreeNodes.d.ts +1 -0
- package/lib/component/1d/multiplicityTree/generateTreeNodes.d.ts.map +1 -1
- package/lib/component/1d/multiplicityTree/generateTreeNodes.js +2 -1
- package/lib/component/1d/multiplicityTree/generateTreeNodes.js.map +1 -1
- package/lib/component/1d/peaks/PeakAnnotationsSpreadMode.d.ts.map +1 -1
- package/lib/component/1d/peaks/PeakAnnotationsSpreadMode.js.map +1 -1
- package/lib/component/1d/peaks/PeakEditionManager.d.ts.map +1 -1
- package/lib/component/1d/peaks/PeakEditionManager.js +2 -2
- package/lib/component/1d/peaks/PeakEditionManager.js.map +1 -1
- package/lib/component/1d/peaks/Peaks.d.ts +4 -1
- package/lib/component/1d/peaks/Peaks.d.ts.map +1 -1
- package/lib/component/1d/peaks/Peaks.js.map +1 -1
- package/lib/component/1d/ranges/AssignmentLabel.d.ts +2 -1
- package/lib/component/1d/ranges/AssignmentLabel.d.ts.map +1 -1
- package/lib/component/1d/ranges/AssignmentLabel.js +6 -4
- package/lib/component/1d/ranges/AssignmentLabel.js.map +1 -1
- package/lib/component/1d/ranges/Atoms.js +2 -2
- package/lib/component/1d/ranges/Atoms.js.map +1 -1
- package/lib/component/1d/ranges/Range.d.ts +2 -1
- package/lib/component/1d/ranges/Range.d.ts.map +1 -1
- package/lib/component/1d/ranges/Range.js +28 -56
- package/lib/component/1d/ranges/Range.js.map +1 -1
- package/lib/component/1d/ranges/Ranges.d.ts.map +1 -1
- package/lib/component/1d/ranges/Ranges.js +19 -13
- package/lib/component/1d/ranges/Ranges.js.map +1 -1
- package/lib/component/1d/ranges/useAssignmentsPopoverActionsButtons.d.ts +14 -0
- package/lib/component/1d/ranges/useAssignmentsPopoverActionsButtons.d.ts.map +1 -0
- package/lib/component/1d/ranges/useAssignmentsPopoverActionsButtons.js +67 -0
- package/lib/component/1d/ranges/useAssignmentsPopoverActionsButtons.js.map +1 -0
- package/lib/component/1d/tool/BaseLineZones.d.ts.map +1 -1
- package/lib/component/1d/tool/BaseLineZones.js.map +1 -1
- package/lib/component/1d/utilities/intersectionResolver.d.ts.map +1 -1
- package/lib/component/1d/utilities/intersectionResolver.js.map +1 -1
- package/lib/component/1d-2d/FieldEdition.d.ts.map +1 -1
- package/lib/component/1d-2d/FieldEdition.js.map +1 -1
- package/lib/component/2d/1d-tracer/VerticalSliceChart.js.map +1 -1
- package/lib/component/2d/1d-tracer/phase-correction-traces/PhaseTraces.js +1 -1
- package/lib/component/2d/1d-tracer/phase-correction-traces/PhaseTraces.js.map +1 -1
- package/lib/component/2d/1d-tracer/phase-correction-traces/SpectrumPhaseTrace.js +1 -1
- package/lib/component/2d/1d-tracer/phase-correction-traces/SpectrumPhaseTrace.js.map +1 -1
- package/lib/component/2d/BrushTracker2D.d.ts.map +1 -1
- package/lib/component/2d/BrushTracker2D.js +41 -46
- package/lib/component/2d/BrushTracker2D.js.map +1 -1
- package/lib/component/2d/FooterBanner.d.ts +2 -2
- package/lib/component/2d/FooterBanner.d.ts.map +1 -1
- package/lib/component/2d/FooterBanner.js +63 -97
- package/lib/component/2d/FooterBanner.js.map +1 -1
- package/lib/component/2d/SVGContent2D.d.ts +2 -2
- package/lib/component/2d/SVGContent2D.d.ts.map +1 -1
- package/lib/component/2d/SVGContent2D.js.map +1 -1
- package/lib/component/2d/SlicingView.js +1 -1
- package/lib/component/2d/SlicingView.js.map +1 -1
- package/lib/component/2d/Viewer2D.js +1 -1
- package/lib/component/2d/Viewer2D.js.map +1 -1
- package/lib/component/2d/ft/FTContainer.d.ts +2 -2
- package/lib/component/2d/ft/FTContainer.d.ts.map +1 -1
- package/lib/component/2d/ft/FTContainer.js +1 -1
- package/lib/component/2d/ft/FTContainer.js.map +1 -1
- package/lib/component/2d/tools/XYLabelPointer.d.ts +2 -2
- package/lib/component/2d/tools/XYLabelPointer.d.ts.map +1 -1
- package/lib/component/2d/tools/XYLabelPointer.js +10 -9
- package/lib/component/2d/tools/XYLabelPointer.js.map +1 -1
- package/lib/component/2d/useTracesSpectra.d.ts +3 -2
- package/lib/component/2d/useTracesSpectra.d.ts.map +1 -1
- package/lib/component/2d/useTracesSpectra.js +19 -12
- package/lib/component/2d/useTracesSpectra.js.map +1 -1
- package/lib/component/2d/utilities/extractSpectrumSignals.js +2 -2
- package/lib/component/2d/utilities/extractSpectrumSignals.js.map +1 -1
- package/lib/component/2d/zones/Signal.js.map +1 -1
- package/lib/component/2d/zones/SignalsGuideLines.d.ts.map +1 -1
- package/lib/component/2d/zones/SignalsGuideLines.js +15 -13
- package/lib/component/2d/zones/SignalsGuideLines.js.map +1 -1
- package/lib/component/2d/zones/ZonesAssignmentsLabels.js +1 -1
- package/lib/component/2d/zones/ZonesAssignmentsLabels.js.map +1 -1
- package/lib/component/EventsTrackers/BrushTracker.d.ts +5 -6
- package/lib/component/EventsTrackers/BrushTracker.d.ts.map +1 -1
- package/lib/component/EventsTrackers/BrushTracker.js +2 -0
- package/lib/component/EventsTrackers/BrushTracker.js.map +1 -1
- package/lib/component/assignment/utilities/getAssignments.js +1 -2
- package/lib/component/assignment/utilities/getAssignments.js.map +1 -1
- package/lib/component/context/KeyModifierContext.d.ts +3 -2
- package/lib/component/context/KeyModifierContext.d.ts.map +1 -1
- package/lib/component/context/KeyModifierContext.js +7 -4
- package/lib/component/context/KeyModifierContext.js.map +1 -1
- package/lib/component/elements/ActionsButtonsPopover.d.ts.map +1 -1
- package/lib/component/elements/ActionsButtonsPopover.js +17 -3
- package/lib/component/elements/ActionsButtonsPopover.js.map +1 -1
- package/lib/component/elements/AssignmentsCell.d.ts.map +1 -1
- package/lib/component/elements/AssignmentsCell.js.map +1 -1
- package/lib/component/elements/Button.d.ts.map +1 -1
- package/lib/component/elements/Button.js.map +1 -1
- package/lib/component/elements/CheckController.d.ts.map +1 -1
- package/lib/component/elements/CheckController.js.map +1 -1
- package/lib/component/elements/ContextMenuBluePrint.d.ts.map +1 -1
- package/lib/component/elements/ContextMenuBluePrint.js.map +1 -1
- package/lib/component/elements/D3Axis.d.ts.map +1 -1
- package/lib/component/elements/DraggableDialog.d.ts.map +1 -1
- package/lib/component/elements/DraggableDialog.js.map +1 -1
- package/lib/component/elements/Input.d.ts.map +1 -1
- package/lib/component/elements/Input.js.map +1 -1
- package/lib/component/elements/Input2.d.ts.map +1 -1
- package/lib/component/elements/Input2.js.map +1 -1
- package/lib/component/elements/Input2Controller.d.ts.map +1 -1
- package/lib/component/elements/Input2Controller.js.map +1 -1
- package/lib/component/elements/Label.d.ts.map +1 -1
- package/lib/component/elements/Label.js.map +1 -1
- package/lib/component/elements/NumberInput2.d.ts.map +1 -1
- package/lib/component/elements/NumberInput2.js.map +1 -1
- package/lib/component/elements/NumberInput2Controller.d.ts.map +1 -1
- package/lib/component/elements/NumberInput2Controller.js.map +1 -1
- package/lib/component/elements/ReactTable/ReactTable.d.ts.map +1 -1
- package/lib/component/elements/ReactTable/ReactTable.js.map +1 -1
- package/lib/component/elements/ReadOnly.d.ts.map +1 -1
- package/lib/component/elements/ReadOnly.js.map +1 -1
- package/lib/component/elements/Sections.js.map +1 -1
- package/lib/component/elements/Select.d.ts.map +1 -1
- package/lib/component/elements/Select.js.map +1 -1
- package/lib/component/elements/ToolbarPopoverItem.d.ts.map +1 -1
- package/lib/component/elements/export/ExportContent.d.ts.map +1 -1
- package/lib/component/elements/export/ExportContent.js.map +1 -1
- package/lib/component/elements/print/PrintContent.d.ts.map +1 -1
- package/lib/component/elements/print/PrintContent.js.map +1 -1
- package/lib/component/hooks/useActiveSpectrumIntegralsViewState.d.ts.map +1 -1
- package/lib/component/hooks/useActiveSpectrumIntegralsViewState.js +2 -4
- package/lib/component/hooks/useActiveSpectrumIntegralsViewState.js.map +1 -1
- package/lib/component/hooks/useActiveSpectrumPeaksViewState.d.ts.map +1 -1
- package/lib/component/hooks/useActiveSpectrumPeaksViewState.js +2 -4
- package/lib/component/hooks/useActiveSpectrumPeaksViewState.js.map +1 -1
- package/lib/component/hooks/useActiveSpectrumRangesViewState.d.ts.map +1 -1
- package/lib/component/hooks/useActiveSpectrumRangesViewState.js +2 -4
- package/lib/component/hooks/useActiveSpectrumRangesViewState.js.map +1 -1
- package/lib/component/hooks/useActiveSpectrumStyleOptions.js +2 -2
- package/lib/component/hooks/useActiveSpectrumStyleOptions.js.map +1 -1
- package/lib/component/hooks/useActiveSpectrumZonesViewState.d.ts.map +1 -1
- package/lib/component/hooks/useActiveSpectrumZonesViewState.js +2 -4
- package/lib/component/hooks/useActiveSpectrumZonesViewState.js.map +1 -1
- package/lib/component/hooks/useExport.js +1 -1
- package/lib/component/hooks/useExport.js.map +1 -1
- package/lib/component/hooks/useSaveSettings.d.ts.map +1 -1
- package/lib/component/hooks/useSaveSettings.js +28 -47
- package/lib/component/hooks/useSaveSettings.js.map +1 -1
- package/lib/component/hooks/useSetActiveSpectrumAction.d.ts +2 -1
- package/lib/component/hooks/useSetActiveSpectrumAction.d.ts.map +1 -1
- package/lib/component/hooks/useSetActiveSpectrumAction.js +2 -2
- package/lib/component/hooks/useSetActiveSpectrumAction.js.map +1 -1
- package/lib/component/hooks/useSpectrumWithDataSource.js +1 -1
- package/lib/component/hooks/useSpectrumWithDataSource.js.map +1 -1
- package/lib/component/hooks/useWorkspaceAction.d.ts +1 -1
- package/lib/component/hooks/useWorkspaceAction.d.ts.map +1 -1
- package/lib/component/hooks/useWorkspaceAction.js +3 -0
- package/lib/component/hooks/useWorkspaceAction.js.map +1 -1
- package/lib/component/modal/ImportPublicationStringModal.d.ts.map +1 -1
- package/lib/component/modal/ImportPublicationStringModal.js.map +1 -1
- package/lib/component/modal/changeSum/ChangeSumModal.d.ts.map +1 -1
- package/lib/component/modal/changeSum/ChangeSumModal.js.map +1 -1
- package/lib/component/modal/metaImportation/MetaImportationModal.d.ts.map +1 -1
- package/lib/component/modal/metaImportation/MetaImportationModal.js.map +1 -1
- package/lib/component/modal/setting/GeneralSettings.d.ts.map +1 -1
- package/lib/component/modal/setting/GeneralSettings.js +5 -1
- package/lib/component/modal/setting/GeneralSettings.js.map +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralTable.d.ts.map +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralTable.js.map +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.d.ts +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.d.ts.map +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +14 -10
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js.map +1 -1
- package/lib/component/panels/MoleculesPanel/hooks/useAtomAssignment.d.ts.map +1 -1
- package/lib/component/panels/MoleculesPanel/hooks/useAtomAssignment.js +17 -17
- package/lib/component/panels/MoleculesPanel/hooks/useAtomAssignment.js.map +1 -1
- package/lib/component/panels/MoleculesPanel/utilities/getAssignIds.d.ts.map +1 -1
- package/lib/component/panels/MoleculesPanel/utilities/getAssignIds.js +0 -3
- package/lib/component/panels/MoleculesPanel/utilities/getAssignIds.js.map +1 -1
- package/lib/component/panels/RangesPanel/RangesPanel.js +1 -1
- package/lib/component/panels/RangesPanel/RangesPanel.js.map +1 -1
- package/lib/component/panels/RangesPanel/RangesTable.d.ts.map +1 -1
- package/lib/component/panels/RangesPanel/RangesTable.js +1 -1
- package/lib/component/panels/RangesPanel/RangesTable.js.map +1 -1
- package/lib/component/panels/RangesPanel/RangesTableRow.d.ts.map +1 -1
- package/lib/component/panels/RangesPanel/RangesTableRow.js +5 -20
- package/lib/component/panels/RangesPanel/RangesTableRow.js.map +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/ActionsColumn.d.ts.map +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/ActionsColumn.js.map +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentColumn.d.ts +9 -0
- package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentColumn.d.ts.map +1 -0
- package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentColumn.js +19 -0
- package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentColumn.js.map +1 -0
- package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.d.ts.map +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.js.map +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.js +2 -2
- package/lib/component/panels/SummaryPanel/SummaryPanel.js +6 -6
- package/lib/component/panels/SummaryPanel/SummaryPanel.js.map +1 -1
- package/lib/component/panels/accordionItems.d.ts.map +1 -1
- package/lib/component/panels/accordionItems.js.map +1 -1
- package/lib/component/panels/extra/preferences/NucleusPreferences.d.ts.map +1 -1
- package/lib/component/panels/informationPanel/InformationEditionModal.d.ts.map +1 -1
- package/lib/component/panels/informationPanel/InformationEditionModal.js.map +1 -1
- package/lib/component/panels/predictionPanel/PredictionPanel.d.ts.map +1 -1
- package/lib/component/panels/predictionPanel/PredictionPanel.js +13 -9
- package/lib/component/panels/predictionPanel/PredictionPanel.js.map +1 -1
- package/lib/component/reducer/Reducer.js +7 -7
- package/lib/component/reducer/Reducer.js.map +1 -1
- package/lib/component/reducer/actions/AssignmentsActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/AssignmentsActions.js +9 -9
- package/lib/component/reducer/actions/AssignmentsActions.js.map +1 -1
- package/lib/component/reducer/actions/CorrelationsActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/CorrelationsActions.js +21 -21
- package/lib/component/reducer/actions/CorrelationsActions.js.map +1 -1
- package/lib/component/reducer/actions/DatabaseActions.js +1 -1
- package/lib/component/reducer/actions/DatabaseActions.js.map +1 -1
- package/lib/component/reducer/actions/DomainActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/DomainActions.js +10 -18
- package/lib/component/reducer/actions/DomainActions.js.map +1 -1
- package/lib/component/reducer/actions/FiltersActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/FiltersActions.js +28 -44
- package/lib/component/reducer/actions/FiltersActions.js.map +1 -1
- package/lib/component/reducer/actions/InsetActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/InsetActions.js +9 -18
- package/lib/component/reducer/actions/InsetActions.js.map +1 -1
- package/lib/component/reducer/actions/IntegralsActions.d.ts +1 -1
- package/lib/component/reducer/actions/IntegralsActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/IntegralsActions.js +43 -48
- package/lib/component/reducer/actions/IntegralsActions.js.map +1 -1
- package/lib/component/reducer/actions/MoleculeActions.d.ts +2 -1
- package/lib/component/reducer/actions/MoleculeActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/MoleculeActions.js +64 -10
- package/lib/component/reducer/actions/MoleculeActions.js.map +1 -1
- package/lib/component/reducer/actions/PeaksActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/PeaksActions.js +110 -121
- package/lib/component/reducer/actions/PeaksActions.js.map +1 -1
- package/lib/component/reducer/actions/PreferencesActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/PreferencesActions.js +2 -1
- package/lib/component/reducer/actions/PreferencesActions.js.map +1 -1
- package/lib/component/reducer/actions/RangesActions.d.ts +18 -18
- package/lib/component/reducer/actions/RangesActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/RangesActions.js +148 -171
- package/lib/component/reducer/actions/RangesActions.js.map +1 -1
- package/lib/component/reducer/actions/SpectraActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/SpectraActions.js +29 -31
- package/lib/component/reducer/actions/SpectraActions.js.map +1 -1
- package/lib/component/reducer/actions/ToolsActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/ToolsActions.js +10 -11
- package/lib/component/reducer/actions/ToolsActions.js.map +1 -1
- package/lib/component/reducer/actions/ZonesActions.d.ts +8 -9
- package/lib/component/reducer/actions/ZonesActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/ZonesActions.js +123 -151
- package/lib/component/reducer/actions/ZonesActions.js.map +1 -1
- package/lib/component/reducer/helper/get2DRange.d.ts +3 -1
- package/lib/component/reducer/helper/get2DRange.d.ts.map +1 -1
- package/lib/component/reducer/helper/get2DRange.js.map +1 -1
- package/lib/component/reducer/helper/getSpectrum.js +1 -1
- package/lib/component/reducer/helper/getSpectrum.js.map +1 -1
- package/lib/component/reducer/helper/setIntegralsViewProperty.js +1 -1
- package/lib/component/reducer/helper/setIntegralsViewProperty.js.map +1 -1
- package/lib/component/reducer/helper/setRangesViewProperty.js +1 -1
- package/lib/component/reducer/helper/setRangesViewProperty.js.map +1 -1
- package/lib/component/useWatchForm.d.ts.map +1 -1
- package/lib/component/useWatchForm.js.map +1 -1
- package/lib/component/utility/stackOverlappingLabels.d.ts +1 -1
- package/lib/component/utility/stackOverlappingLabels.d.ts.map +1 -1
- package/lib/component/utility/stackOverlappingLabels.js.map +1 -1
- package/lib/data/SpectraManager.d.ts.map +1 -1
- package/lib/data/SpectraManager.js.map +1 -1
- package/lib/data/data1d/Spectrum1D/isRangeAssigned.d.ts.map +1 -1
- package/lib/data/data1d/Spectrum1D/isRangeAssigned.js +0 -3
- package/lib/data/data1d/Spectrum1D/isRangeAssigned.js.map +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/autoRangesDetection.d.ts +8 -1
- package/lib/data/data1d/Spectrum1D/ranges/autoRangesDetection.d.ts.map +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/autoRangesDetection.js +1 -2
- package/lib/data/data1d/Spectrum1D/ranges/autoRangesDetection.js.map +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/changeRangeSignal.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/ranges/changeRangeSignal.js +3 -3
- package/lib/data/data1d/Spectrum1D/ranges/detectRanges.d.ts +4 -14
- package/lib/data/data1d/Spectrum1D/ranges/detectRanges.d.ts.map +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectRanges.js +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectRanges.js.map +1 -1
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.js.map +1 -1
- package/lib/data/data2d/Spectrum2D/zones/changeZoneSignal.d.ts +3 -5
- package/lib/data/data2d/Spectrum2D/zones/changeZoneSignal.d.ts.map +1 -1
- package/lib/data/data2d/Spectrum2D/zones/changeZoneSignal.js +3 -5
- package/lib/data/data2d/Spectrum2D/zones/changeZoneSignal.js.map +1 -1
- package/lib/data/data2d/Spectrum2D/zones/detectZones.d.ts +2 -1
- package/lib/data/data2d/Spectrum2D/zones/detectZones.d.ts.map +1 -1
- package/lib/data/data2d/Spectrum2D/zones/detectZones.js.map +1 -1
- package/lib/data/data2d/Spectrum2D/zones/detectZonesManual.d.ts +7 -63
- package/lib/data/data2d/Spectrum2D/zones/detectZonesManual.d.ts.map +1 -1
- package/lib/data/data2d/Spectrum2D/zones/detectZonesManual.js +9 -14
- package/lib/data/data2d/Spectrum2D/zones/detectZonesManual.js.map +1 -1
- package/lib/data/data2d/Spectrum2D/zones/getDetectionZones.d.ts +2 -10
- package/lib/data/data2d/Spectrum2D/zones/getDetectionZones.d.ts.map +1 -1
- package/lib/data/data2d/Spectrum2D/zones/getDetectionZones.js +23 -43
- package/lib/data/data2d/Spectrum2D/zones/getDetectionZones.js.map +1 -1
- package/lib/data/data2d/Spectrum2D/zones/initiateZones.d.ts +1 -54
- package/lib/data/data2d/Spectrum2D/zones/initiateZones.d.ts.map +1 -1
- package/lib/data/data2d/Spectrum2D/zones/initiateZones.js +1 -1
- package/lib/data/data2d/Spectrum2D/zones/initiateZones.js.map +1 -1
- package/lib/data/molecules/Molecule.d.ts.map +1 -1
- package/lib/data/molecules/Molecule.js.map +1 -1
- package/lib/data/types/data1d/RangeDetectionResult.d.ts.map +1 -1
- package/lib/data/utilities/FindUtilities.d.ts.map +1 -1
- package/lib/data/utilities/FindUtilities.js +11 -11
- package/lib/data/utilities/FindUtilities.js.map +1 -1
- package/lib/utils/clipboard/clipboardComponents.d.ts.map +1 -1
- package/lib/utils/clipboard/clipboardComponents.js.map +1 -1
- package/lib/utils/clipboard/clipboardHooks.d.ts +2 -2
- package/lib/utils/clipboard/clipboardHooks.d.ts.map +1 -1
- package/lib/utils/clipboard/clipboardHooks.js +10 -4
- package/lib/utils/clipboard/clipboardHooks.js.map +1 -1
- package/lib/versionInfo.d.ts.map +1 -1
- package/lib/versionInfo.js +1 -1
- package/lib/versionInfo.js.map +1 -1
- package/package.json +33 -31
- package/src/component/1d/ApodizationLine.tsx +1 -1
- package/src/component/1d/BrushTracker1D.tsx +10 -10
- package/src/component/1d/FooterBanner.tsx +2 -2
- package/src/component/1d/LinesSeries.tsx +2 -2
- package/src/component/1d/SVGContent1D.tsx +6 -2
- package/src/component/1d/SimilarityTree.tsx +3 -2
- package/src/component/1d/inset/InsetProvider.tsx +4 -2
- package/src/component/1d/integral/IntegralResizable.tsx +2 -1
- package/src/component/1d/matrix/Boxplot.tsx +3 -3
- package/src/component/1d/multiAnalysis/AnalysisRange.tsx +2 -1
- package/src/component/1d/multiplicityTree/MultiplicityTree.tsx +24 -23
- package/src/component/1d/multiplicityTree/generateTreeNodes.ts +10 -1
- package/src/component/1d/peaks/PeakAnnotationsSpreadMode.tsx +4 -2
- package/src/component/1d/peaks/PeakEditionManager.tsx +8 -3
- package/src/component/1d/peaks/Peaks.tsx +5 -1
- package/src/component/1d/ranges/AssignmentLabel.tsx +8 -5
- package/src/component/1d/ranges/Atoms.tsx +2 -2
- package/src/component/1d/ranges/Range.tsx +42 -74
- package/src/component/1d/ranges/Ranges.tsx +33 -28
- package/src/component/1d/ranges/useAssignmentsPopoverActionsButtons.tsx +93 -0
- package/src/component/1d/tool/BaseLineZones.tsx +2 -1
- package/src/component/1d/utilities/intersectionResolver.ts +3 -4
- package/src/component/1d-2d/FieldEdition.tsx +2 -2
- package/src/component/2d/1d-tracer/VerticalSliceChart.tsx +2 -2
- package/src/component/2d/1d-tracer/phase-correction-traces/PhaseTraces.tsx +1 -1
- package/src/component/2d/1d-tracer/phase-correction-traces/SpectrumPhaseTrace.tsx +1 -1
- package/src/component/2d/BrushTracker2D.tsx +50 -55
- package/src/component/2d/FooterBanner.tsx +80 -105
- package/src/component/2d/SVGContent2D.tsx +2 -3
- package/src/component/2d/SlicingView.tsx +1 -1
- package/src/component/2d/Viewer2D.tsx +2 -2
- package/src/component/2d/ft/FTContainer.tsx +4 -5
- package/src/component/2d/tools/XYLabelPointer.tsx +12 -11
- package/src/component/2d/useTracesSpectra.ts +28 -16
- package/src/component/2d/utilities/extractSpectrumSignals.ts +2 -2
- package/src/component/2d/zones/Signal.tsx +1 -1
- package/src/component/2d/zones/SignalsGuideLines.tsx +21 -19
- package/src/component/2d/zones/ZonesAssignmentsLabels.tsx +4 -4
- package/src/component/EventsTrackers/BrushTracker.tsx +24 -17
- package/src/component/assignment/utilities/getAssignments.ts +1 -2
- package/src/component/context/KeyModifierContext.tsx +13 -5
- package/src/component/elements/ActionsButtonsPopover.tsx +25 -8
- package/src/component/elements/AssignmentsCell.tsx +1 -2
- package/src/component/elements/Button.tsx +3 -2
- package/src/component/elements/CheckController.tsx +2 -1
- package/src/component/elements/ContextMenuBluePrint.tsx +2 -1
- package/src/component/elements/D3Axis.tsx +3 -3
- package/src/component/elements/DraggableDialog.tsx +2 -1
- package/src/component/elements/Input.tsx +4 -2
- package/src/component/elements/Input2.tsx +1 -2
- package/src/component/elements/Input2Controller.tsx +2 -1
- package/src/component/elements/Label.tsx +2 -1
- package/src/component/elements/NumberInput2.tsx +4 -2
- package/src/component/elements/NumberInput2Controller.tsx +3 -1
- package/src/component/elements/ReactTable/ReactTable.tsx +1 -3
- package/src/component/elements/ReadOnly.tsx +4 -2
- package/src/component/elements/Sections.tsx +5 -4
- package/src/component/elements/Select.tsx +4 -2
- package/src/component/elements/ToolbarPopoverItem.tsx +3 -3
- package/src/component/elements/export/ExportContent.tsx +1 -2
- package/src/component/elements/print/PrintContent.tsx +1 -2
- package/src/component/hooks/useActiveSpectrumIntegralsViewState.ts +2 -6
- package/src/component/hooks/useActiveSpectrumPeaksViewState.ts +2 -6
- package/src/component/hooks/useActiveSpectrumRangesViewState.ts +2 -6
- package/src/component/hooks/useActiveSpectrumStyleOptions.ts +2 -2
- package/src/component/hooks/useActiveSpectrumZonesViewState.ts +2 -6
- package/src/component/hooks/useExport.tsx +1 -1
- package/src/component/hooks/useSaveSettings.tsx +68 -81
- package/src/component/hooks/useSetActiveSpectrumAction.ts +3 -2
- package/src/component/hooks/useSpectrumWithDataSource.ts +1 -1
- package/src/component/hooks/useWorkspaceAction.ts +5 -0
- package/src/component/modal/ImportPublicationStringModal.tsx +1 -2
- package/src/component/modal/changeSum/ChangeSumModal.tsx +4 -2
- package/src/component/modal/metaImportation/MetaImportationModal.tsx +1 -2
- package/src/component/modal/setting/GeneralSettings.tsx +7 -2
- package/src/component/panels/IntegralsPanel/IntegralTable.tsx +4 -2
- package/src/component/panels/MoleculesPanel/MoleculePanelHeader.tsx +17 -13
- package/src/component/panels/MoleculesPanel/hooks/useAtomAssignment.tsx +17 -15
- package/src/component/panels/MoleculesPanel/utilities/getAssignIds.ts +0 -4
- package/src/component/panels/RangesPanel/RangesPanel.tsx +1 -1
- package/src/component/panels/RangesPanel/RangesTable.tsx +3 -8
- package/src/component/panels/RangesPanel/RangesTableRow.tsx +14 -47
- package/src/component/panels/RangesPanel/TableColumns/ActionsColumn.tsx +1 -2
- package/src/component/panels/RangesPanel/TableColumns/SignalAssignmentColumn.tsx +40 -0
- package/src/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.tsx +1 -2
- package/src/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.tsx +2 -2
- package/src/component/panels/SummaryPanel/SummaryPanel.tsx +6 -6
- package/src/component/panels/accordionItems.tsx +4 -2
- package/src/component/panels/extra/preferences/NucleusPreferences.tsx +2 -2
- package/src/component/panels/informationPanel/InformationEditionModal.tsx +4 -2
- package/src/component/panels/predictionPanel/PredictionPanel.tsx +17 -9
- package/src/component/reducer/Reducer.ts +8 -8
- package/src/component/reducer/actions/AssignmentsActions.ts +8 -13
- package/src/component/reducer/actions/CorrelationsActions.ts +21 -22
- package/src/component/reducer/actions/DatabaseActions.ts +1 -1
- package/src/component/reducer/actions/DomainActions.ts +16 -22
- package/src/component/reducer/actions/FiltersActions.ts +34 -58
- package/src/component/reducer/actions/InsetActions.ts +9 -19
- package/src/component/reducer/actions/IntegralsActions.ts +48 -59
- package/src/component/reducer/actions/MoleculeActions.ts +94 -14
- package/src/component/reducer/actions/PeaksActions.ts +112 -136
- package/src/component/reducer/actions/PreferencesActions.ts +4 -3
- package/src/component/reducer/actions/RangesActions.ts +196 -244
- package/src/component/reducer/actions/SpectraActions.ts +40 -45
- package/src/component/reducer/actions/ToolsActions.ts +9 -13
- package/src/component/reducer/actions/ZonesActions.ts +158 -218
- package/src/component/reducer/helper/get2DRange.ts +4 -1
- package/src/component/reducer/helper/getSpectrum.ts +1 -1
- package/src/component/reducer/helper/setIntegralsViewProperty.ts +1 -1
- package/src/component/reducer/helper/setRangesViewProperty.ts +1 -1
- package/src/component/useWatchForm.tsx +2 -1
- package/src/component/utility/stackOverlappingLabels.ts +4 -1
- package/src/data/SpectraManager.ts +0 -2
- package/src/data/data1d/Spectrum1D/isRangeAssigned.ts +0 -4
- package/src/data/data1d/Spectrum1D/ranges/autoRangesDetection.ts +15 -5
- package/src/data/data1d/Spectrum1D/ranges/changeRangeSignal.ts +5 -5
- package/src/data/data1d/Spectrum1D/ranges/detectRanges.ts +5 -14
- package/src/data/data2d/Spectrum2D/initiateDatum2D.ts +2 -2
- package/src/data/data2d/Spectrum2D/zones/changeZoneSignal.ts +3 -5
- package/src/data/data2d/Spectrum2D/zones/detectZones.ts +3 -2
- package/src/data/data2d/Spectrum2D/zones/detectZonesManual.ts +19 -16
- package/src/data/data2d/Spectrum2D/zones/getDetectionZones.ts +35 -56
- package/src/data/data2d/Spectrum2D/zones/initiateZones.ts +1 -1
- package/src/data/molecules/Molecule.ts +2 -1
- package/src/data/types/data1d/RangeDetectionResult.ts +4 -2
- package/src/data/utilities/FindUtilities.ts +9 -8
- package/src/utils/clipboard/clipboardComponents.tsx +2 -1
- package/src/utils/clipboard/clipboardHooks.ts +14 -8
- package/src/versionInfo.ts +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentColumn.d.ts +0 -8
- package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentColumn.d.ts.map +0 -1
- package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentColumn.js +0 -17
- package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentColumn.js.map +0 -1
- package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.d.ts +0 -17
- package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.d.ts.map +0 -1
- package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js +0 -40
- package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js.map +0 -1
- package/src/component/panels/RangesPanel/TableColumns/RangeAssignmentColumn.tsx +0 -36
- package/src/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.tsx +0 -89
|
@@ -36,8 +36,7 @@ interface InnerPrintFrameProps {
|
|
|
36
36
|
printPageOptions?: Partial<PrintPageOptions>;
|
|
37
37
|
}
|
|
38
38
|
interface PrintFrameProps
|
|
39
|
-
extends InnerPrintFrameProps,
|
|
40
|
-
Partial<BasePrintProps> {}
|
|
39
|
+
extends InnerPrintFrameProps, Partial<BasePrintProps> {}
|
|
41
40
|
|
|
42
41
|
export function PrintContent(props: PrintFrameProps) {
|
|
43
42
|
const [isPageOptionModalOpened, togglePageOptionDialog] =
|
|
@@ -22,12 +22,8 @@ export function useActiveSpectrumIntegralsViewState() {
|
|
|
22
22
|
return inset.view.integrals;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
if (
|
|
26
|
-
activeSpectrum
|
|
27
|
-
activeSpectrum?.selected &&
|
|
28
|
-
integrals[activeSpectrum?.id]
|
|
29
|
-
) {
|
|
30
|
-
return integrals[activeSpectrum?.id];
|
|
25
|
+
if (activeSpectrum?.selected && integrals[activeSpectrum.id]) {
|
|
26
|
+
return integrals[activeSpectrum.id];
|
|
31
27
|
} else {
|
|
32
28
|
return defaultIntegralsViewState;
|
|
33
29
|
}
|
|
@@ -24,12 +24,8 @@ export function useActiveSpectrumPeaksViewState() {
|
|
|
24
24
|
return inset.view.peaks;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
if (
|
|
28
|
-
activeSpectrum
|
|
29
|
-
activeSpectrum?.selected &&
|
|
30
|
-
peaks[activeSpectrum?.id]
|
|
31
|
-
) {
|
|
32
|
-
return peaks[activeSpectrum?.id];
|
|
27
|
+
if (activeSpectrum?.selected && peaks[activeSpectrum.id]) {
|
|
28
|
+
return peaks[activeSpectrum.id];
|
|
33
29
|
} else {
|
|
34
30
|
return defaultPeaksViewState;
|
|
35
31
|
}
|
|
@@ -40,12 +40,8 @@ export function useActiveSpectrumRangesViewState() {
|
|
|
40
40
|
return inset.view.ranges;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
if (
|
|
44
|
-
activeSpectrum
|
|
45
|
-
activeSpectrum?.selected &&
|
|
46
|
-
ranges[activeSpectrum?.id]
|
|
47
|
-
) {
|
|
48
|
-
return ranges[activeSpectrum?.id];
|
|
43
|
+
if (activeSpectrum?.selected && ranges[activeSpectrum.id]) {
|
|
44
|
+
return ranges[activeSpectrum.id];
|
|
49
45
|
} else {
|
|
50
46
|
return getDefaultRangesViewState(nucleus);
|
|
51
47
|
}
|
|
@@ -17,11 +17,11 @@ export default function useActiveSpectrumStyleOptions(
|
|
|
17
17
|
|
|
18
18
|
return useMemo(() => {
|
|
19
19
|
const index = activeSpectra?.findIndex(
|
|
20
|
-
(activeSpectrum) => activeSpectrum
|
|
20
|
+
(activeSpectrum) => activeSpectrum.selected && activeSpectrum.id === id,
|
|
21
21
|
);
|
|
22
22
|
let isNoneSelected = false;
|
|
23
23
|
isNoneSelected =
|
|
24
|
-
activeSpectra?.every((activeSpectrum) => !activeSpectrum
|
|
24
|
+
activeSpectra?.every((activeSpectrum) => !activeSpectrum.selected) ||
|
|
25
25
|
false;
|
|
26
26
|
|
|
27
27
|
const isActive =
|
|
@@ -18,12 +18,8 @@ export function useActiveSpectrumZonesViewState(): ZonesViewState {
|
|
|
18
18
|
view: { zones },
|
|
19
19
|
} = useChartData();
|
|
20
20
|
|
|
21
|
-
if (
|
|
22
|
-
activeSpectrum
|
|
23
|
-
activeSpectrum?.selected &&
|
|
24
|
-
zones[activeSpectrum?.id]
|
|
25
|
-
) {
|
|
26
|
-
return zones[activeSpectrum?.id];
|
|
21
|
+
if (activeSpectrum?.selected && zones[activeSpectrum.id]) {
|
|
22
|
+
return zones[activeSpectrum.id];
|
|
27
23
|
} else {
|
|
28
24
|
return defaultZonesViewState;
|
|
29
25
|
}
|
|
@@ -99,7 +99,7 @@ export function useExport() {
|
|
|
99
99
|
serializedState: blob,
|
|
100
100
|
});
|
|
101
101
|
const zipBlob = new Blob([archive], {
|
|
102
|
-
type: '
|
|
102
|
+
type: 'chemical/x-nmrium+zip',
|
|
103
103
|
});
|
|
104
104
|
saveAs({ blob: zipBlob, name, extension: '.nmrium.zip' });
|
|
105
105
|
} catch (error) {
|
|
@@ -1,124 +1,111 @@
|
|
|
1
|
-
import { Dialog, DialogBody, DialogFooter } from '@blueprintjs/core';
|
|
2
|
-
import
|
|
3
|
-
import { yupResolver } from '@hookform/resolvers/yup';
|
|
1
|
+
import { Button, Dialog, DialogBody, DialogFooter } from '@blueprintjs/core';
|
|
2
|
+
import { revalidateLogic } from '@tanstack/react-form';
|
|
4
3
|
import type { Workspace } from '@zakodium/nmrium-core';
|
|
5
4
|
import { useRef } from 'react';
|
|
6
|
-
import { useForm } from 'react-
|
|
7
|
-
import {
|
|
8
|
-
import * as Yup from 'yup';
|
|
5
|
+
import { useForm as useReactScienceForm, useOnOff } from 'react-science/ui';
|
|
6
|
+
import { z } from 'zod/v4';
|
|
9
7
|
|
|
10
8
|
import { usePreferences } from '../context/PreferencesContext.js';
|
|
11
9
|
import { useToaster } from '../context/ToasterContext.js';
|
|
12
|
-
import ActionButtons from '../elements/ActionButtons.js';
|
|
13
|
-
import { Input2Controller } from '../elements/Input2Controller.js';
|
|
14
10
|
|
|
15
11
|
import { useWorkspaceAction } from './useWorkspaceAction.js';
|
|
16
12
|
|
|
17
|
-
const schema =
|
|
18
|
-
workspaceName:
|
|
13
|
+
const schema = z.object({
|
|
14
|
+
workspaceName: z
|
|
15
|
+
.string()
|
|
16
|
+
.trim()
|
|
17
|
+
.min(1, { error: 'Workspace name must have at least one character' }),
|
|
19
18
|
});
|
|
20
19
|
|
|
21
|
-
function WorkspaceAddForm(props: any) {
|
|
22
|
-
const { className, message, control, onEnter } = props;
|
|
23
|
-
|
|
24
|
-
return (
|
|
25
|
-
<div className={className}>
|
|
26
|
-
<p style={{ paddingBottom: '10px' }}>{message}</p>
|
|
27
|
-
<Input2Controller
|
|
28
|
-
control={control}
|
|
29
|
-
name="workspaceName"
|
|
30
|
-
placeholder="Enter workspace Name"
|
|
31
|
-
style={{
|
|
32
|
-
width: '90%',
|
|
33
|
-
borderRadius: '5px',
|
|
34
|
-
}}
|
|
35
|
-
autoFocus
|
|
36
|
-
size="large"
|
|
37
|
-
onKeyDown={(event) => {
|
|
38
|
-
if (event.key === 'Enter') {
|
|
39
|
-
onEnter();
|
|
40
|
-
}
|
|
41
|
-
}}
|
|
42
|
-
/>
|
|
43
|
-
</div>
|
|
44
|
-
);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
20
|
export function useSaveSettings() {
|
|
48
21
|
const toaster = useToaster();
|
|
49
22
|
const [isOpenDialog, openDialog, closeDialog] = useOnOff(false);
|
|
50
23
|
const settingsRef = useRef<Workspace>();
|
|
51
24
|
const { current } = usePreferences();
|
|
52
|
-
|
|
53
|
-
defaultValues: { workspaceName: '' },
|
|
54
|
-
resolver: yupResolver(schema),
|
|
55
|
-
});
|
|
25
|
+
|
|
56
26
|
const { saveWorkspace, addNewWorkspace } = useWorkspaceAction();
|
|
57
|
-
function handleAddNewWorkspace({ workspaceName }: { workspaceName: string }) {
|
|
58
|
-
addNewWorkspace(workspaceName, settingsRef.current);
|
|
59
27
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
})
|
|
65
|
-
|
|
28
|
+
const form = useReactScienceForm({
|
|
29
|
+
defaultValues: { workspaceName: '' },
|
|
30
|
+
validationLogic: revalidateLogic({ modeAfterSubmission: 'change' }),
|
|
31
|
+
validators: { onDynamic: schema },
|
|
32
|
+
onSubmit: ({ value }) => {
|
|
33
|
+
const { workspaceName } = value;
|
|
34
|
+
addNewWorkspace(workspaceName, settingsRef.current);
|
|
35
|
+
closeDialog();
|
|
36
|
+
|
|
37
|
+
toaster.show({
|
|
38
|
+
message: 'Preferences saved successfully',
|
|
39
|
+
intent: 'success',
|
|
40
|
+
});
|
|
41
|
+
},
|
|
42
|
+
});
|
|
66
43
|
|
|
67
44
|
function saveSettings(values?: Partial<Workspace>) {
|
|
68
45
|
settingsRef.current = values as Workspace;
|
|
69
46
|
if (current.source !== 'user') {
|
|
70
|
-
reset(
|
|
47
|
+
form.reset();
|
|
71
48
|
openDialog();
|
|
72
49
|
} else {
|
|
73
50
|
saveWorkspace(values);
|
|
74
|
-
|
|
75
51
|
closeDialog();
|
|
76
52
|
}
|
|
77
53
|
}
|
|
54
|
+
|
|
78
55
|
return {
|
|
79
56
|
saveSettings,
|
|
80
57
|
SaveSettingsModal: () => {
|
|
81
58
|
return (
|
|
82
59
|
<Dialog
|
|
60
|
+
style={{ width: 500 }}
|
|
83
61
|
onClose={closeDialog}
|
|
84
62
|
isOpen={isOpenDialog}
|
|
85
63
|
title="Save workspace"
|
|
86
64
|
role="dialog"
|
|
87
65
|
>
|
|
88
|
-
<
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
66
|
+
<form
|
|
67
|
+
noValidate
|
|
68
|
+
onSubmit={(event) => {
|
|
69
|
+
event.preventDefault();
|
|
70
|
+
void form.handleSubmit();
|
|
71
|
+
}}
|
|
72
|
+
>
|
|
73
|
+
<DialogBody>
|
|
74
|
+
<form.AppField name="workspaceName">
|
|
75
|
+
{(field) => (
|
|
76
|
+
<field.Input
|
|
77
|
+
layout="inline"
|
|
78
|
+
autoFocus
|
|
79
|
+
label="New Workspace name"
|
|
80
|
+
placeholder="Enter workspace name"
|
|
81
|
+
helpText="Please enter a new user workspace name in order to save your changes locally"
|
|
82
|
+
required
|
|
83
|
+
/>
|
|
84
|
+
)}
|
|
85
|
+
</form.AppField>
|
|
86
|
+
</DialogBody>
|
|
87
|
+
|
|
88
|
+
<DialogFooter
|
|
89
|
+
actions={
|
|
90
|
+
<>
|
|
91
|
+
<Button
|
|
92
|
+
intent="danger"
|
|
93
|
+
variant="outlined"
|
|
94
|
+
onClick={() => closeDialog()}
|
|
95
|
+
>
|
|
96
|
+
Cancel
|
|
97
|
+
</Button>
|
|
98
|
+
<form.AppForm>
|
|
99
|
+
<form.SubmitButton intent="success">
|
|
100
|
+
Save workspace
|
|
101
|
+
</form.SubmitButton>
|
|
102
|
+
</form.AppForm>
|
|
103
|
+
</>
|
|
104
|
+
}
|
|
106
105
|
/>
|
|
107
|
-
</
|
|
106
|
+
</form>
|
|
108
107
|
</Dialog>
|
|
109
108
|
);
|
|
110
109
|
},
|
|
111
110
|
};
|
|
112
111
|
}
|
|
113
|
-
|
|
114
|
-
const DialogContent = styled(DialogBody)`
|
|
115
|
-
background-color: white;
|
|
116
|
-
text-align: center;
|
|
117
|
-
`;
|
|
118
|
-
|
|
119
|
-
const Title = styled.p`
|
|
120
|
-
font-size: 1em;
|
|
121
|
-
font-weight: bold;
|
|
122
|
-
padding: 0 30px;
|
|
123
|
-
text-align: left;
|
|
124
|
-
`;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { useDispatch } from '../context/DispatchContext.js';
|
|
2
|
+
import type { EventModifierKeys } from '../context/KeyModifierContext.js';
|
|
2
3
|
import { getModifiers } from '../context/KeyModifierContext.js';
|
|
3
4
|
|
|
4
5
|
export function useSetActiveSpectrumAction() {
|
|
5
6
|
const dispatch = useDispatch();
|
|
6
7
|
|
|
7
|
-
function setActiveSpectrum(
|
|
8
|
+
function setActiveSpectrum(event: EventModifierKeys, id: string) {
|
|
8
9
|
setTimeout(() => {
|
|
9
|
-
const { ctrlKey, shiftKey } = getModifiers(
|
|
10
|
+
const { ctrlKey, shiftKey } = getModifiers(event);
|
|
10
11
|
const modifier = `shift[${shiftKey ? 'true' : 'false'}]_ctrl[${
|
|
11
12
|
ctrlKey ? 'true' : 'false'
|
|
12
13
|
}]`;
|
|
@@ -27,7 +27,7 @@ export function useSpectrumWithDataSource(
|
|
|
27
27
|
return getSpectrum(dataSource, inset.spectrumKey, defaultValue);
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
if (dataSource && activeSpectrum?.
|
|
30
|
+
if (dataSource && activeSpectrum?.selected) {
|
|
31
31
|
return getSpectrum(dataSource, activeSpectrum.id, defaultValue);
|
|
32
32
|
}
|
|
33
33
|
|
|
@@ -64,10 +64,13 @@ export function useWorkspaceAction() {
|
|
|
64
64
|
|
|
65
65
|
function removeWorkspace(key: string) {
|
|
66
66
|
const settings = readSettings();
|
|
67
|
+
let isActiveWorkspace = false;
|
|
68
|
+
|
|
67
69
|
if (settings) {
|
|
68
70
|
// eslint-disable-next-line @typescript-eslint/no-dynamic-delete
|
|
69
71
|
delete settings.workspaces[key];
|
|
70
72
|
if (key === settings.currentWorkspace) {
|
|
73
|
+
isActiveWorkspace = true;
|
|
71
74
|
settings.currentWorkspace = 'default';
|
|
72
75
|
}
|
|
73
76
|
|
|
@@ -79,6 +82,8 @@ export function useWorkspaceAction() {
|
|
|
79
82
|
workspace: key,
|
|
80
83
|
},
|
|
81
84
|
});
|
|
85
|
+
|
|
86
|
+
return isActiveWorkspace;
|
|
82
87
|
}
|
|
83
88
|
|
|
84
89
|
function saveWorkspace(data?: Partial<Workspace>) {
|
|
@@ -17,8 +17,7 @@ interface InnerImportPublicationStringModalProps {
|
|
|
17
17
|
onClose: () => void;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
interface ImportPublicationStringModalProps
|
|
21
|
-
extends InnerImportPublicationStringModalProps {
|
|
20
|
+
interface ImportPublicationStringModalProps extends InnerImportPublicationStringModalProps {
|
|
22
21
|
isOpen: boolean;
|
|
23
22
|
}
|
|
24
23
|
|
|
@@ -5,8 +5,10 @@ import { Toolbar, useOnOff } from 'react-science/ui';
|
|
|
5
5
|
import type { ChangeSumModalContentsProps } from './ChangeSumModalContents.js';
|
|
6
6
|
import { ChangeSumModalContents } from './ChangeSumModalContents.js';
|
|
7
7
|
|
|
8
|
-
interface ChangeSumModalProps
|
|
9
|
-
|
|
8
|
+
interface ChangeSumModalProps extends Omit<
|
|
9
|
+
ChangeSumModalContentsProps,
|
|
10
|
+
'onClose'
|
|
11
|
+
> {
|
|
10
12
|
currentSum: number | null;
|
|
11
13
|
sumType: string;
|
|
12
14
|
disabled?: boolean;
|
|
@@ -93,8 +93,7 @@ interface InnerMetaImportationModalPropsProps {
|
|
|
93
93
|
file?: File;
|
|
94
94
|
onCloseDialog: () => void;
|
|
95
95
|
}
|
|
96
|
-
interface MetaImportationModalPropsProps
|
|
97
|
-
extends InnerMetaImportationModalPropsProps {
|
|
96
|
+
interface MetaImportationModalPropsProps extends InnerMetaImportationModalPropsProps {
|
|
98
97
|
isOpen: boolean;
|
|
99
98
|
}
|
|
100
99
|
|
|
@@ -148,6 +148,7 @@ function InnerGeneralSettingsModal(props: InnerGeneralSettingsModalProps) {
|
|
|
148
148
|
workspaces,
|
|
149
149
|
...preferences
|
|
150
150
|
} = usePreferences();
|
|
151
|
+
|
|
151
152
|
const { addNewWorkspace, removeWorkspace, setActiveWorkspace } =
|
|
152
153
|
useWorkspaceAction();
|
|
153
154
|
const baseWorkspaces = useWorkspacesList();
|
|
@@ -172,7 +173,11 @@ function InnerGeneralSettingsModal(props: InnerGeneralSettingsModalProps) {
|
|
|
172
173
|
}
|
|
173
174
|
|
|
174
175
|
function deleteWorkSpaceHandler(key: any) {
|
|
175
|
-
removeWorkspace(key);
|
|
176
|
+
const isActiveWorkspace = removeWorkspace(key);
|
|
177
|
+
if (!isActiveWorkspace) {
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
reset(workspaces.default);
|
|
176
181
|
}
|
|
177
182
|
|
|
178
183
|
function ChangeWorkspaceHandler(option: DropDownListItem) {
|
|
@@ -351,7 +356,7 @@ function WorkSpaceActionsButtons(props: any) {
|
|
|
351
356
|
reset(workSpaceDisplayPreferences);
|
|
352
357
|
}
|
|
353
358
|
|
|
354
|
-
function handlePasteWorkspace(text: string |
|
|
359
|
+
function handlePasteWorkspace(text: string | null) {
|
|
355
360
|
if (!text) return;
|
|
356
361
|
|
|
357
362
|
try {
|
|
@@ -23,8 +23,10 @@ import type { IntegralPanelInnerProps } from './IntegralPanel.js';
|
|
|
23
23
|
|
|
24
24
|
const selectStyle = { width: '100%', border: 'none' };
|
|
25
25
|
|
|
26
|
-
interface IntegralTableProps
|
|
27
|
-
|
|
26
|
+
interface IntegralTableProps extends Pick<
|
|
27
|
+
IntegralPanelInnerProps,
|
|
28
|
+
'activeTab'
|
|
29
|
+
> {
|
|
28
30
|
data: Integral[];
|
|
29
31
|
info: Info1D;
|
|
30
32
|
}
|
|
@@ -88,7 +88,7 @@ interface MoleculePanelHeaderProps {
|
|
|
88
88
|
onOpenMoleculeEditor: () => void;
|
|
89
89
|
renderSource?: 'moleculePanel' | 'predictionPanel';
|
|
90
90
|
onClickPreferences?: () => void;
|
|
91
|
-
|
|
91
|
+
onClickPasteMolecule?: () => void;
|
|
92
92
|
children?: ReactNode;
|
|
93
93
|
}
|
|
94
94
|
|
|
@@ -101,7 +101,7 @@ export default function MoleculePanelHeader(props: MoleculePanelHeaderProps) {
|
|
|
101
101
|
onOpenMoleculeEditor,
|
|
102
102
|
renderSource = 'moleculePanel',
|
|
103
103
|
onClickPreferences,
|
|
104
|
-
|
|
104
|
+
onClickPasteMolecule,
|
|
105
105
|
children,
|
|
106
106
|
} = props;
|
|
107
107
|
const { rootRef } = useGlobal();
|
|
@@ -118,6 +118,7 @@ export default function MoleculePanelHeader(props: MoleculePanelHeaderProps) {
|
|
|
118
118
|
fileName: 'molFile',
|
|
119
119
|
});
|
|
120
120
|
}, [rootRef, currentIndex]);
|
|
121
|
+
const topicMolecule = useTopicMolecule();
|
|
121
122
|
|
|
122
123
|
const saveAsPNGHandler = useCallback(async () => {
|
|
123
124
|
if (!rootRef) return;
|
|
@@ -194,7 +195,7 @@ export default function MoleculePanelHeader(props: MoleculePanelHeaderProps) {
|
|
|
194
195
|
);
|
|
195
196
|
|
|
196
197
|
function handlePasteMoleculeAction() {
|
|
197
|
-
|
|
198
|
+
onClickPasteMolecule?.();
|
|
198
199
|
void readText().then(handlePasteMolecule);
|
|
199
200
|
}
|
|
200
201
|
|
|
@@ -204,7 +205,8 @@ export default function MoleculePanelHeader(props: MoleculePanelHeaderProps) {
|
|
|
204
205
|
* @returns
|
|
205
206
|
*/
|
|
206
207
|
|
|
207
|
-
async function handlePasteMolecule(text
|
|
208
|
+
async function handlePasteMolecule(text: string | null) {
|
|
209
|
+
if (!text) return;
|
|
208
210
|
try {
|
|
209
211
|
const molecules = getMolecules(text);
|
|
210
212
|
dispatch({
|
|
@@ -222,14 +224,18 @@ export default function MoleculePanelHeader(props: MoleculePanelHeaderProps) {
|
|
|
222
224
|
}
|
|
223
225
|
|
|
224
226
|
const handleDelete = useCallback(() => {
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
payload: { id: molecules[currentIndex].id },
|
|
230
|
-
});
|
|
227
|
+
const id = molecules[currentIndex]?.id;
|
|
228
|
+
|
|
229
|
+
if (!id) {
|
|
230
|
+
return;
|
|
231
231
|
}
|
|
232
|
-
|
|
232
|
+
|
|
233
|
+
onMoleculeIndexChange?.(0);
|
|
234
|
+
dispatch({
|
|
235
|
+
type: 'DELETE_MOLECULE',
|
|
236
|
+
payload: { id, diaIDs: topicMolecule[id].diaIDsAndInfo },
|
|
237
|
+
});
|
|
238
|
+
}, [molecules, currentIndex, topicMolecule, onMoleculeIndexChange, dispatch]);
|
|
233
239
|
|
|
234
240
|
function floatMoleculeHandler() {
|
|
235
241
|
dispatch({
|
|
@@ -238,8 +244,6 @@ export default function MoleculePanelHeader(props: MoleculePanelHeaderProps) {
|
|
|
238
244
|
});
|
|
239
245
|
}
|
|
240
246
|
|
|
241
|
-
const topicMolecule = useTopicMolecule();
|
|
242
|
-
|
|
243
247
|
function expandMoleculeHydrogens(expand?: boolean) {
|
|
244
248
|
const molecule = molecules[currentIndex];
|
|
245
249
|
|
|
@@ -71,6 +71,11 @@ function getSignalsDiaIDs(
|
|
|
71
71
|
]);
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
+
function use1DSpectraTraces() {
|
|
75
|
+
const traces = useTracesSpectra();
|
|
76
|
+
return Object.values(traces).filter((spectrum) => spectrum !== null);
|
|
77
|
+
}
|
|
78
|
+
|
|
74
79
|
export default function useAtomAssignment() {
|
|
75
80
|
const {
|
|
76
81
|
data: spectra,
|
|
@@ -79,7 +84,7 @@ export default function useAtomAssignment() {
|
|
|
79
84
|
},
|
|
80
85
|
} = useChartData();
|
|
81
86
|
const spectrum = useSpectrum();
|
|
82
|
-
const tracesSpectra =
|
|
87
|
+
const tracesSpectra = use1DSpectraTraces();
|
|
83
88
|
|
|
84
89
|
const toaster = useToaster();
|
|
85
90
|
const dispatch = useDispatch();
|
|
@@ -108,7 +113,7 @@ export default function useAtomAssignment() {
|
|
|
108
113
|
|
|
109
114
|
if (isSpectrum2D(spectrum) && spectrumID) {
|
|
110
115
|
const traceSpectrum = tracesSpectra.find(
|
|
111
|
-
(traceSpectrum) => traceSpectrum
|
|
116
|
+
(traceSpectrum) => traceSpectrum?.id === spectrumID,
|
|
112
117
|
);
|
|
113
118
|
if (traceSpectrum) {
|
|
114
119
|
currentSpectrum = traceSpectrum;
|
|
@@ -150,16 +155,15 @@ export default function useAtomAssignment() {
|
|
|
150
155
|
|
|
151
156
|
let diaIDs: string[] = [];
|
|
152
157
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
}
|
|
158
|
+
//TODO: Refactor TargetAssignKeys after completing the 2D assignment and remove assignKeys.length !== 2 condition
|
|
159
|
+
if (assignKeys.length !== 2) return;
|
|
160
|
+
const [, { index: signalIndex }] = assignKeys;
|
|
161
|
+
diaIDs = range?.signals[signalIndex]?.diaIDs || [];
|
|
162
|
+
|
|
159
163
|
const uniqueDiaIDs = getUniqueDiaIDs(diaIDs, atom);
|
|
160
164
|
|
|
161
165
|
dispatch({
|
|
162
|
-
type: '
|
|
166
|
+
type: 'ASSIGN_1D_SIGNAL',
|
|
163
167
|
payload: {
|
|
164
168
|
nbAtoms: uniqueDiaIDs.nbAtoms,
|
|
165
169
|
diaIDs: uniqueDiaIDs.diaIDs,
|
|
@@ -183,12 +187,10 @@ export default function useAtomAssignment() {
|
|
|
183
187
|
|
|
184
188
|
let diaIDs: string[] = [];
|
|
185
189
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
diaIDs = zone?.signals[signalIndex][axis]?.diaIDs || [];
|
|
191
|
-
}
|
|
190
|
+
//TODO: Refactor TargetAssignKeys after completing the 2D assignment and remove assignKeys.length !== 2 condition
|
|
191
|
+
if (assignKeys.length !== 2) return;
|
|
192
|
+
const [, { index: signalIndex }] = assignKeys;
|
|
193
|
+
diaIDs = zone?.signals[signalIndex][axis]?.diaIDs || [];
|
|
192
194
|
|
|
193
195
|
const uniqueDiaIDs = getUniqueDiaIDs(diaIDs, atom);
|
|
194
196
|
dispatch({
|
|
@@ -33,10 +33,6 @@ export function getAssignIds(
|
|
|
33
33
|
for (let i = 0; i < data.length; i++) {
|
|
34
34
|
const datum = data[i];
|
|
35
35
|
|
|
36
|
-
if (datum.id === id) {
|
|
37
|
-
return [{ target, index: i, key: datum.id }];
|
|
38
|
-
}
|
|
39
|
-
|
|
40
36
|
const signalIndex = datum.signals.findIndex((signal) => signal.id === id);
|
|
41
37
|
if (signalIndex !== -1) {
|
|
42
38
|
const { id } = datum.signals[signalIndex];
|
|
@@ -132,14 +132,9 @@ function RangesTable(props: RangesTableProps) {
|
|
|
132
132
|
{preferences.coupling.show && <th>J (Hz)</th>}
|
|
133
133
|
|
|
134
134
|
{preferences.showAssignment && (
|
|
135
|
-
|
|
136
|
-
<
|
|
137
|
-
|
|
138
|
-
</th>
|
|
139
|
-
<th title="Assign ranges" style={{ minWidth: '50px' }}>
|
|
140
|
-
Σ
|
|
141
|
-
</th>
|
|
142
|
-
</>
|
|
135
|
+
<th title="Assign multiplets">
|
|
136
|
+
<FaLink style={{ fontSize: 10, margin: 'auto' }} />
|
|
137
|
+
</th>
|
|
143
138
|
)}
|
|
144
139
|
{preferences.showKind && <th>Kind</th>}
|
|
145
140
|
{showActions && <th>{''}</th>}
|