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
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Spectrum1D } from '@zakodium/nmrium-core';
|
|
2
2
|
|
|
3
3
|
interface RangeSignalOption {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
rangeId: string;
|
|
5
|
+
signalId: string;
|
|
6
6
|
newSignalValue: number;
|
|
7
7
|
}
|
|
8
8
|
|
|
@@ -10,15 +10,15 @@ export function changeRangeSignal(
|
|
|
10
10
|
spectrum: Spectrum1D,
|
|
11
11
|
options: RangeSignalOption,
|
|
12
12
|
) {
|
|
13
|
-
const {
|
|
13
|
+
const { rangeId, signalId, newSignalValue } = options;
|
|
14
14
|
|
|
15
15
|
let shiftValue = 0;
|
|
16
16
|
const rangeIndex = spectrum.ranges.values.findIndex(
|
|
17
|
-
(range) => range.id ===
|
|
17
|
+
(range) => range.id === rangeId,
|
|
18
18
|
);
|
|
19
19
|
if (rangeIndex !== -1) {
|
|
20
20
|
const signalIndex = spectrum.ranges.values[rangeIndex].signals.findIndex(
|
|
21
|
-
(signal) => signal.id ===
|
|
21
|
+
(signal) => signal.id === signalId,
|
|
22
22
|
);
|
|
23
23
|
const signal = spectrum.ranges.values[rangeIndex].signals[signalIndex];
|
|
24
24
|
shiftValue = newSignalValue - signal.delta;
|
|
@@ -5,23 +5,14 @@ import { isProton } from '../../../utilities/isProton.ts';
|
|
|
5
5
|
import type { SumParams } from '../SumManager.js';
|
|
6
6
|
import { initSumOptions } from '../SumManager.js';
|
|
7
7
|
|
|
8
|
-
import
|
|
8
|
+
import type { AutoRangesDetectionOptions } from './autoRangesDetection.js';
|
|
9
|
+
import { autoRangesDetection } from './autoRangesDetection.js';
|
|
9
10
|
|
|
10
|
-
interface DetectRangesOptions {
|
|
11
|
+
export interface DetectRangesOptions {
|
|
11
12
|
windowFromIndex?: number;
|
|
12
13
|
windowToIndex?: number;
|
|
13
|
-
rangePicking:
|
|
14
|
-
|
|
15
|
-
compile?: boolean; //default true
|
|
16
|
-
frequencyCluster?: number; // default 16
|
|
17
|
-
clean?: number; // default 0.3
|
|
18
|
-
keepPeaks?: boolean; //default true
|
|
19
|
-
};
|
|
20
|
-
peakPicking: {
|
|
21
|
-
thresholdFactor?: number; // default 8
|
|
22
|
-
minMaxRatio?: number; // default 0.1
|
|
23
|
-
direction?: 'negative' | 'positive' | 'both'; //default positive
|
|
24
|
-
};
|
|
14
|
+
rangePicking: Exclude<AutoRangesDetectionOptions['rangePicking'], undefined>;
|
|
15
|
+
peakPicking: Exclude<AutoRangesDetectionOptions['peakPicking'], undefined>;
|
|
25
16
|
impurities?: {
|
|
26
17
|
solvent: string;
|
|
27
18
|
};
|
|
@@ -60,7 +60,7 @@ export function initiateDatum2D(
|
|
|
60
60
|
options: InitiateDatum2DOptions = {},
|
|
61
61
|
): Spectrum2D {
|
|
62
62
|
const { usedColors, colors } = options;
|
|
63
|
-
const datum:
|
|
63
|
+
const datum: Spectrum2D = {
|
|
64
64
|
...spectrum,
|
|
65
65
|
id: spectrum.id || crypto.randomUUID(),
|
|
66
66
|
display: initiateDisplay(spectrum, { usedColors, colors }),
|
|
@@ -77,7 +77,7 @@ export function initiateDatum2D(
|
|
|
77
77
|
datum.originalData = datum.data;
|
|
78
78
|
datum.filters = initiateFilters(spectrum?.filters);
|
|
79
79
|
|
|
80
|
-
datum.zones = initiateZones(spectrum, datum
|
|
80
|
+
datum.zones = initiateZones(spectrum, datum);
|
|
81
81
|
|
|
82
82
|
//reapply filters after load the original data
|
|
83
83
|
Filters2DManager.reapplyFilters(datum);
|
|
@@ -4,11 +4,9 @@ import { isNumber } from '../../../utilities/isNumber.js';
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
*
|
|
7
|
-
* @param
|
|
8
|
-
* @param
|
|
9
|
-
* @param
|
|
10
|
-
* @param {number} signal.y
|
|
11
|
-
* @param {string} signal.id
|
|
7
|
+
* @param spectrum
|
|
8
|
+
* @param zoneID
|
|
9
|
+
* @param signal
|
|
12
10
|
*/
|
|
13
11
|
export function changeZoneSignal(
|
|
14
12
|
spectrum: Spectrum2D,
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import type { Zone } from '@zakodium/nmr-types';
|
|
2
|
+
import type { Spectrum2D } from '@zakodium/nmrium-core';
|
|
2
3
|
import { mapZones } from 'nmr-processing';
|
|
3
4
|
|
|
4
5
|
import type { DetectionZonesOptions } from './getDetectionZones.js';
|
|
5
6
|
import { getDetectionZones } from './getDetectionZones.js';
|
|
6
7
|
|
|
7
8
|
export function detectZones(
|
|
8
|
-
datum:
|
|
9
|
+
datum: Spectrum2D,
|
|
9
10
|
options: DetectionZonesOptions,
|
|
10
11
|
): Zone[] {
|
|
11
12
|
const zones = getDetectionZones(datum, options);
|
|
12
13
|
|
|
13
|
-
return mapZones(zones
|
|
14
|
+
return mapZones(zones, datum);
|
|
14
15
|
}
|
|
@@ -1,27 +1,29 @@
|
|
|
1
1
|
import type { Zone } from '@zakodium/nmr-types';
|
|
2
|
+
import type { Spectrum2D } from '@zakodium/nmrium-core';
|
|
2
3
|
import { mapZones } from 'nmr-processing';
|
|
3
4
|
|
|
4
5
|
import type { DetectionZonesOptions } from './getDetectionZones.js';
|
|
5
6
|
import { getDetectionZones } from './getDetectionZones.js';
|
|
6
7
|
|
|
8
|
+
type DetectZonesManualOptions = Pick<
|
|
9
|
+
DetectionZonesOptions,
|
|
10
|
+
'selectedZone' | 'thresholdFactor' | 'maxPercentCutOff'
|
|
11
|
+
>;
|
|
12
|
+
|
|
7
13
|
/**
|
|
8
14
|
*
|
|
9
|
-
* @param
|
|
10
|
-
* @param
|
|
11
|
-
* @param {object} options.selectedZone
|
|
12
|
-
* @param {number} options.selectedZone.fromX
|
|
13
|
-
* @param {number} options.selectedZone.fromY
|
|
14
|
-
* @param {number} options.selectedZone.toX
|
|
15
|
-
* @param {number} options.selectedZone.toY
|
|
16
|
-
* @param {number} options.thresholdFactor
|
|
17
|
-
* @param {boolean} options.convolutionByFFT
|
|
15
|
+
* @param spectrum
|
|
16
|
+
* @param options
|
|
18
17
|
*/
|
|
19
|
-
export function detectZonesManual(
|
|
20
|
-
|
|
21
|
-
options
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
const zones = getDetectionZones(
|
|
18
|
+
export function detectZonesManual(
|
|
19
|
+
spectrum: Spectrum2D,
|
|
20
|
+
options: DetectZonesManualOptions,
|
|
21
|
+
): Zone[] {
|
|
22
|
+
const { spectralWidth, originFrequency } = spectrum.info;
|
|
23
|
+
const zones = getDetectionZones(spectrum, {
|
|
24
|
+
...options,
|
|
25
|
+
tolerances: spectralWidth.map((sw, i) => sw * originFrequency[i]),
|
|
26
|
+
});
|
|
25
27
|
let { fromX, fromY, toX, toY } = options.selectedZone;
|
|
26
28
|
if (fromX > toX) [fromX, toX] = [toX, fromX];
|
|
27
29
|
if (fromX > toX) [fromY, toY] = [toY, fromY];
|
|
@@ -30,5 +32,6 @@ export function detectZonesManual(datum: any, options: DetectionZonesOptions) {
|
|
|
30
32
|
x: { from: fromX, to: toX },
|
|
31
33
|
y: { from: fromY, to: toY },
|
|
32
34
|
};
|
|
33
|
-
|
|
35
|
+
|
|
36
|
+
return mapZones(zones, spectrum);
|
|
34
37
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import type { Info2D } from '@zakodium/nmr-types';
|
|
1
2
|
import type { Spectrum2D } from '@zakodium/nmrium-core';
|
|
3
|
+
import type { NmrData2DContent, NmrData2DFt } from 'cheminfo-types';
|
|
2
4
|
import { xyzAutoZonesPicking } from 'nmr-processing';
|
|
3
5
|
|
|
4
6
|
export interface DetectionZonesOptions {
|
|
@@ -11,70 +13,46 @@ export interface DetectionZonesOptions {
|
|
|
11
13
|
thresholdFactor: number;
|
|
12
14
|
maxPercentCutOff: number;
|
|
13
15
|
tolerances?: number[];
|
|
14
|
-
convolutionByFFT?: boolean;
|
|
15
|
-
enhanceSymmetry?: boolean;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
*
|
|
20
|
-
* @param
|
|
21
|
-
* @param
|
|
22
|
-
* @param {number} options.selectedZone.fromX
|
|
23
|
-
* @param {number} options.selectedZone.fromY
|
|
24
|
-
* @param {number} options.selectedZone.toX
|
|
25
|
-
* @param {number} options.selectedZone.toY
|
|
26
|
-
* @param {number} options.thresholdFactor
|
|
27
|
-
* @param {boolean} options.convolutionByFFT
|
|
20
|
+
* @param spectrum
|
|
21
|
+
* @param options
|
|
28
22
|
*/
|
|
29
23
|
export function getDetectionZones(
|
|
30
24
|
spectrum: Spectrum2D,
|
|
31
25
|
options: DetectionZonesOptions,
|
|
32
26
|
) {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
if (selectedZone) {
|
|
36
|
-
options.enhanceSymmetry = false;
|
|
37
|
-
dataMatrix = getSubMatrix(spectrum, selectedZone);
|
|
38
|
-
} else {
|
|
39
|
-
dataMatrix = spectrum.data;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
return autoZonesDetection(dataMatrix, {
|
|
43
|
-
...options,
|
|
44
|
-
info: spectrum.info,
|
|
45
|
-
});
|
|
27
|
+
const dataMatrix = getSubMatrix(spectrum, options.selectedZone);
|
|
28
|
+
return autoZonesDetection(dataMatrix, spectrum.info, options);
|
|
46
29
|
}
|
|
47
30
|
|
|
48
|
-
function autoZonesDetection(
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
info: { nucleus: nuclei, originFrequency },
|
|
56
|
-
} = options;
|
|
57
|
-
|
|
58
|
-
const { enhanceSymmetry = nuclei[0] === nuclei[1] } = options;
|
|
31
|
+
function autoZonesDetection(
|
|
32
|
+
data: NmrData2DContent,
|
|
33
|
+
info: Info2D,
|
|
34
|
+
options: DetectionZonesOptions,
|
|
35
|
+
) {
|
|
36
|
+
const { tolerances, thresholdFactor, maxPercentCutOff } = options;
|
|
37
|
+
const { nucleus: nuclei, originFrequency } = info;
|
|
59
38
|
|
|
60
|
-
|
|
39
|
+
return xyzAutoZonesPicking(data, {
|
|
61
40
|
nuclei,
|
|
62
41
|
tolerances,
|
|
63
42
|
observedFrequencies: originFrequency,
|
|
64
43
|
thresholdFactor,
|
|
65
44
|
realTopDetection: true,
|
|
66
|
-
clean,
|
|
67
45
|
maxPercentCutOff,
|
|
68
|
-
enhanceSymmetry,
|
|
69
|
-
convolutionByFFT,
|
|
46
|
+
enhanceSymmetry: false,
|
|
70
47
|
});
|
|
71
|
-
|
|
72
|
-
return zones;
|
|
73
48
|
}
|
|
74
49
|
|
|
75
|
-
function getSubMatrix(
|
|
50
|
+
function getSubMatrix(
|
|
51
|
+
datum: Spectrum2D,
|
|
52
|
+
selectedZone: DetectionZonesOptions['selectedZone'],
|
|
53
|
+
): NmrData2DContent {
|
|
76
54
|
const { fromX, toX, fromY, toY } = selectedZone;
|
|
77
|
-
const data = datum.data.rr;
|
|
55
|
+
const data = (datum.data as NmrData2DFt).rr;
|
|
78
56
|
const xStep = (data.maxX - data.minX) / (data.z[0].length - 1);
|
|
79
57
|
const yStep = (data.maxY - data.minY) / (data.z.length - 1);
|
|
80
58
|
let xIndexFrom = Math.max(Math.floor((fromX - data.minX) / xStep), 0);
|
|
@@ -91,20 +69,14 @@ function getSubMatrix(datum: any, selectedZone: any) {
|
|
|
91
69
|
if (xIndexFrom > xIndexTo) [xIndexFrom, xIndexTo] = [xIndexTo, xIndexFrom];
|
|
92
70
|
if (yIndexFrom > yIndexTo) [yIndexFrom, yIndexTo] = [yIndexTo, yIndexFrom];
|
|
93
71
|
|
|
94
|
-
const
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
minX: data.minX + xIndexFrom * xStep,
|
|
98
|
-
maxY: data.minY + yIndexTo * yStep,
|
|
99
|
-
minY: data.minY + yIndexFrom * yStep,
|
|
100
|
-
};
|
|
101
|
-
let maxZ = Number.MIN_SAFE_INTEGER;
|
|
102
|
-
let minZ = Number.MAX_SAFE_INTEGER;
|
|
72
|
+
const z: NmrData2DContent['z'] = [];
|
|
73
|
+
let maxZ = Number.MAX_SAFE_INTEGER;
|
|
74
|
+
let minZ = Number.MIN_SAFE_INTEGER;
|
|
103
75
|
|
|
104
76
|
const nbXPoints = xIndexTo - xIndexFrom + 1;
|
|
105
77
|
|
|
106
78
|
for (let j = yIndexFrom; j < yIndexTo; j++) {
|
|
107
|
-
const row = new
|
|
79
|
+
const row = new Float64Array(nbXPoints);
|
|
108
80
|
let xIndex = xIndexFrom;
|
|
109
81
|
for (let i = 0; i < nbXPoints; i++) {
|
|
110
82
|
row[i] = data.z[j][xIndex++];
|
|
@@ -113,9 +85,16 @@ function getSubMatrix(datum: any, selectedZone: any) {
|
|
|
113
85
|
if (maxZ < rowValue) maxZ = rowValue;
|
|
114
86
|
if (minZ > rowValue) minZ = rowValue;
|
|
115
87
|
}
|
|
116
|
-
|
|
88
|
+
z.push(row);
|
|
117
89
|
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
90
|
+
|
|
91
|
+
return {
|
|
92
|
+
z,
|
|
93
|
+
maxX: data.minX + xIndexTo * xStep,
|
|
94
|
+
minX: data.minX + xIndexFrom * xStep,
|
|
95
|
+
maxY: data.minY + yIndexTo * yStep,
|
|
96
|
+
minY: data.minY + yIndexFrom * yStep,
|
|
97
|
+
maxZ,
|
|
98
|
+
minZ,
|
|
99
|
+
};
|
|
121
100
|
}
|
|
@@ -4,7 +4,8 @@ import { Molecule } from 'openchemlib';
|
|
|
4
4
|
import getAtomsFromMF from '../utilities/getAtomsFromMF.js';
|
|
5
5
|
|
|
6
6
|
export interface StateMoleculeExtended
|
|
7
|
-
extends
|
|
7
|
+
extends
|
|
8
|
+
Required<Pick<StateMolecule, 'id' | 'molfile' | 'label'>>,
|
|
8
9
|
Omit<StateMolecule, 'id' | 'molfile' | 'label'> {
|
|
9
10
|
mf: string;
|
|
10
11
|
em: number;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { Range } from '@zakodium/nmr-types';
|
|
2
2
|
|
|
3
|
-
export interface RangeDetectionResult
|
|
4
|
-
|
|
3
|
+
export interface RangeDetectionResult extends Omit<
|
|
4
|
+
Range,
|
|
5
|
+
'integration' | 'kind' | 'signals'
|
|
6
|
+
> {
|
|
5
7
|
absolute: number;
|
|
6
8
|
min: number;
|
|
7
9
|
max: number;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import type { Range, Signal1D, Signal2D, Zone } from '@zakodium/nmr-types';
|
|
2
2
|
import type { Spectrum1D, Spectrum2D, Spectrum } from '@zakodium/nmrium-core';
|
|
3
3
|
|
|
4
|
+
import { isSpectrum1D } from '../data1d/Spectrum1D/index.ts';
|
|
5
|
+
import { isSpectrum2D } from '../data2d/Spectrum2D/index.ts';
|
|
6
|
+
|
|
4
7
|
function findSpectrum(
|
|
5
8
|
spectraData: Spectrum[],
|
|
6
9
|
spectrumID: string,
|
|
@@ -75,14 +78,12 @@ function findRangeOrZoneID(
|
|
|
75
78
|
checkIsVisible: boolean,
|
|
76
79
|
) {
|
|
77
80
|
const spectrum = findSpectrum(spectraData, experimentID, checkIsVisible);
|
|
78
|
-
if (spectrum) {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
if (zone) return zone.id;
|
|
85
|
-
}
|
|
81
|
+
if (isSpectrum1D(spectrum)) {
|
|
82
|
+
const range = findRange(spectrum, signalID);
|
|
83
|
+
if (range) return range.id;
|
|
84
|
+
} else if (isSpectrum2D(spectrum)) {
|
|
85
|
+
const zone = findZone(spectrum, signalID);
|
|
86
|
+
if (zone) return zone.id;
|
|
86
87
|
}
|
|
87
88
|
return undefined;
|
|
88
89
|
}
|
|
@@ -36,7 +36,8 @@ interface CFBP {
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
interface ClipboardFallbackProps
|
|
39
|
-
extends
|
|
39
|
+
extends
|
|
40
|
+
CFBP,
|
|
40
41
|
Partial<Omit<ClipboardFallbackReadProps, 'mode' | 'label' | 'onDismiss'>>,
|
|
41
42
|
Partial<
|
|
42
43
|
Omit<ClipboardFallbackReadTextProps, 'mode' | 'label' | 'onDismiss'>
|
|
@@ -16,11 +16,11 @@ interface UseClipboardReturn {
|
|
|
16
16
|
/**
|
|
17
17
|
* Fallback on 'read' mode
|
|
18
18
|
*/
|
|
19
|
-
read: () => Promise<ClipboardItems |
|
|
19
|
+
read: () => Promise<ClipboardItems | null>;
|
|
20
20
|
/**
|
|
21
21
|
* Fallback on 'readText' mode
|
|
22
22
|
*/
|
|
23
|
-
readText: () => Promise<string |
|
|
23
|
+
readText: () => Promise<string | null>;
|
|
24
24
|
/**
|
|
25
25
|
* Fallback on 'write' mode with blobs (get blob for each first type for each item) state
|
|
26
26
|
*/
|
|
@@ -115,20 +115,26 @@ export function useClipboard(): UseClipboardReturn {
|
|
|
115
115
|
|
|
116
116
|
const clipboardAPI = useMemo(
|
|
117
117
|
() => ({
|
|
118
|
-
|
|
118
|
+
/**
|
|
119
|
+
* Attempt to read clipboard items. Sets the fallback and returns `null` if the attempt failed.
|
|
120
|
+
*/
|
|
121
|
+
async read(): Promise<ClipboardItems | null> {
|
|
119
122
|
try {
|
|
120
123
|
return await read();
|
|
121
|
-
} catch
|
|
124
|
+
} catch {
|
|
122
125
|
setShouldFallback('read');
|
|
123
|
-
|
|
126
|
+
return null;
|
|
124
127
|
}
|
|
125
128
|
},
|
|
126
|
-
|
|
129
|
+
/**
|
|
130
|
+
* Attempt to read text from the clipboard. Sets the fallback and returns `null` if the attempt failed.
|
|
131
|
+
*/
|
|
132
|
+
async readText(): Promise<string | null> {
|
|
127
133
|
try {
|
|
128
134
|
return await readText();
|
|
129
|
-
} catch
|
|
135
|
+
} catch {
|
|
130
136
|
setShouldFallback('readText');
|
|
131
|
-
|
|
137
|
+
return null;
|
|
132
138
|
}
|
|
133
139
|
},
|
|
134
140
|
async write(data: ClipboardItems): Promise<void> {
|
package/src/versionInfo.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default { version: 'v1.
|
|
1
|
+
export default { version: 'v1.10.1' };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { OnHoverEvent, RowSpanTags } from '../RangesTableRow.js';
|
|
2
|
-
import type { RangeData } from '../hooks/useMapRanges.js';
|
|
3
|
-
type RangeAssignmentColumnProps = OnHoverEvent & RowSpanTags & {
|
|
4
|
-
row: RangeData;
|
|
5
|
-
};
|
|
6
|
-
export declare function RangeAssignmentColumn({ row, onHover, rowSpanTags, }: RangeAssignmentColumnProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export {};
|
|
8
|
-
//# sourceMappingURL=RangeAssignmentColumn.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RangeAssignmentColumn.d.ts","sourceRoot":"","sources":["../../../../../src/component/panels/RangesPanel/TableColumns/RangeAssignmentColumn.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAE1D,KAAK,0BAA0B,GAAG,YAAY,GAC5C,WAAW,GAAG;IAAE,GAAG,EAAE,SAAS,CAAA;CAAE,CAAC;AAEnC,wBAAgB,qBAAqB,CAAC,EACpC,GAAG,EACH,OAAO,EACP,WAAW,GACZ,EAAE,0BAA0B,2CAuB5B"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useDispatch } from '../../../context/DispatchContext.js';
|
|
3
|
-
import { EditableColumn } from '../../../elements/EditableColumn.js';
|
|
4
|
-
export function RangeAssignmentColumn({ row, onHover, rowSpanTags, }) {
|
|
5
|
-
const dispatch = useDispatch();
|
|
6
|
-
function saveHandler(event) {
|
|
7
|
-
dispatch({
|
|
8
|
-
type: 'CHANGE_RANGE_ASSIGNMENT_LABEL',
|
|
9
|
-
payload: {
|
|
10
|
-
value: event.target.value,
|
|
11
|
-
rangeId: row.id,
|
|
12
|
-
},
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
return (_jsx("td", { ...rowSpanTags, ...onHover, children: _jsx(EditableColumn, { value: row?.assignment || '', onSave: saveHandler, style: { padding: '0.1rem 0.4rem' }, type: "text" }) }));
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=RangeAssignmentColumn.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RangeAssignmentColumn.js","sourceRoot":"","sources":["../../../../../src/component/panels/RangesPanel/TableColumns/RangeAssignmentColumn.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAOrE,MAAM,UAAU,qBAAqB,CAAC,EACpC,GAAG,EACH,OAAO,EACP,WAAW,GACgB;IAC3B,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAE/B,SAAS,WAAW,CAAC,KAAU;QAC7B,QAAQ,CAAC;YACP,IAAI,EAAE,+BAA+B;YACrC,OAAO,EAAE;gBACP,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK;gBACzB,OAAO,EAAE,GAAG,CAAC,EAAE;aAChB;SACF,CAAC,CAAC;IACL,CAAC;IAED,OAAO,CACL,gBAAQ,WAAW,KAAM,OAAO,YAC9B,KAAC,cAAc,IACb,KAAK,EAAE,GAAG,EAAE,UAAU,IAAI,EAAE,EAC5B,MAAM,EAAE,WAAW,EACnB,KAAK,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE,EACnC,IAAI,EAAC,MAAM,GACX,GACC,CACN,CAAC;AACJ,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { AssignmentsData } from '../../../assignment/AssignmentsContext.js';
|
|
2
|
-
import type { RangeColumnProps } from '../RangesTableRow.js';
|
|
3
|
-
interface RemoveAssignmentsButtonProps {
|
|
4
|
-
onUnlink?: (element: any, b: boolean) => void;
|
|
5
|
-
}
|
|
6
|
-
interface RangAssignmentColumnProps extends Omit<RangeColumnProps, 'format'>, RemoveAssignmentsButtonProps {
|
|
7
|
-
assignment: AssignmentsData;
|
|
8
|
-
highlight: {
|
|
9
|
-
isActive: boolean;
|
|
10
|
-
};
|
|
11
|
-
onLink?: (a: any, b: any) => void;
|
|
12
|
-
highlightData: any;
|
|
13
|
-
}
|
|
14
|
-
declare function RangeAssignmentsColumn({ row, assignment, highlight, onLink, onUnlink, rowSpanTags, onHover, highlightData, }: RangAssignmentColumnProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
declare const _default: import("react").MemoExoticComponent<typeof RangeAssignmentsColumn>;
|
|
16
|
-
export default _default;
|
|
17
|
-
//# sourceMappingURL=RangeAssignmentsColumn.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RangeAssignmentsColumn.d.ts","sourceRoot":"","sources":["../../../../../src/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAC;AAEjF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAoB7D,UAAU,4BAA4B;IACpC,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;CAC/C;AACD,UAAU,yBACR,SAAQ,IAAI,CAAC,gBAAgB,EAAE,QAAQ,CAAC,EACtC,4BAA4B;IAC9B,UAAU,EAAE,eAAe,CAAC;IAC5B,SAAS,EAAE;QACT,QAAQ,EAAE,OAAO,CAAC;KACnB,CAAC;IACF,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;IAClC,aAAa,EAAE,GAAG,CAAC;CACpB;AAED,iBAAS,sBAAsB,CAAC,EAC9B,GAAG,EACH,UAAU,EACV,SAAS,EACT,MAAM,EACN,QAAQ,EACR,WAAW,EACX,OAAO,EACP,aAAa,GACd,EAAE,yBAAyB,2CAsC3B;;AAED,wBAA4C"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { memo } from 'react';
|
|
3
|
-
import { AssignmentsCell } from '../../../elements/AssignmentsCell.js';
|
|
4
|
-
const columnStyle = {
|
|
5
|
-
padding: 0,
|
|
6
|
-
textAlign: 'center',
|
|
7
|
-
verticalAlign: 'middle',
|
|
8
|
-
};
|
|
9
|
-
function getStyle(flag, isCompletelyAssigned) {
|
|
10
|
-
if (flag) {
|
|
11
|
-
return {
|
|
12
|
-
color: 'red',
|
|
13
|
-
fontWeight: 'bold',
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
else if (isCompletelyAssigned) {
|
|
17
|
-
return { color: 'green', fontWeight: 'bold' };
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
return { color: 'black', fontWeight: 'normal' };
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
function RangeAssignmentsColumn({ row, assignment, highlight, onLink, onUnlink, rowSpanTags, onHover, highlightData, }) {
|
|
24
|
-
const diaIDs = row.diaIDs ?? [];
|
|
25
|
-
const flag = assignment.isActive ||
|
|
26
|
-
assignment.isHighlighted ||
|
|
27
|
-
(highlight.isActive &&
|
|
28
|
-
highlightData.highlight.sourceData?.type !== 'SIGNAL');
|
|
29
|
-
const isCompletelyAssigned = Math.round(row.integration) === row?.nbAtoms;
|
|
30
|
-
let totalNumberOfAtoms = row?.nbAtoms || 0;
|
|
31
|
-
for (const signal of row?.signals || []) {
|
|
32
|
-
totalNumberOfAtoms += signal?.nbAtoms || 0;
|
|
33
|
-
}
|
|
34
|
-
return (_jsx(AssignmentsCell, { ...rowSpanTags, style: {
|
|
35
|
-
...columnStyle,
|
|
36
|
-
...rowSpanTags.style,
|
|
37
|
-
}, ...onHover, onClick: (e) => onLink?.(e, assignment), hideRemoveAssignmentButton: diaIDs.length === 0, onRemove: (e) => onUnlink?.(e, true), children: (totalNumberOfAtoms > 0 || assignment.isActive) && (_jsxs(_Fragment, { children: [totalNumberOfAtoms, " ", ' ( ', _jsx("span", { style: getStyle(flag, isCompletelyAssigned), children: diaIDs.length }), ' ) '] })) }));
|
|
38
|
-
}
|
|
39
|
-
export default memo(RangeAssignmentsColumn);
|
|
40
|
-
//# sourceMappingURL=RangeAssignmentsColumn.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RangeAssignmentsColumn.js","sourceRoot":"","sources":["../../../../../src/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAG7B,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAGvE,MAAM,WAAW,GAAkB;IACjC,OAAO,EAAE,CAAC;IACV,SAAS,EAAE,QAAQ;IACnB,aAAa,EAAE,QAAQ;CACxB,CAAC;AAEF,SAAS,QAAQ,CAAC,IAAa,EAAE,oBAA6B;IAC5D,IAAI,IAAI,EAAE,CAAC;QACT,OAAO;YACL,KAAK,EAAE,KAAK;YACZ,UAAU,EAAE,MAAM;SACnB,CAAC;IACJ,CAAC;SAAM,IAAI,oBAAoB,EAAE,CAAC;QAChC,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC;IAChD,CAAC;SAAM,CAAC;QACN,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC;IAClD,CAAC;AACH,CAAC;AAeD,SAAS,sBAAsB,CAAC,EAC9B,GAAG,EACH,UAAU,EACV,SAAS,EACT,MAAM,EACN,QAAQ,EACR,WAAW,EACX,OAAO,EACP,aAAa,GACa;IAC1B,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,IAAI,EAAE,CAAC;IAChC,MAAM,IAAI,GACR,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,aAAa;QACxB,CAAC,SAAS,CAAC,QAAQ;YACjB,aAAa,CAAC,SAAS,CAAC,UAAU,EAAE,IAAI,KAAK,QAAQ,CAAC,CAAC;IAE3D,MAAM,oBAAoB,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,KAAK,GAAG,EAAE,OAAO,CAAC;IAE1E,IAAI,kBAAkB,GAAG,GAAG,EAAE,OAAO,IAAI,CAAC,CAAC;IAC3C,KAAK,MAAM,MAAM,IAAI,GAAG,EAAE,OAAO,IAAI,EAAE,EAAE,CAAC;QACxC,kBAAkB,IAAI,MAAM,EAAE,OAAO,IAAI,CAAC,CAAC;IAC7C,CAAC;IAED,OAAO,CACL,KAAC,eAAe,OACV,WAAW,EACf,KAAK,EAAE;YACL,GAAG,WAAW;YACd,GAAG,WAAW,CAAC,KAAK;SACrB,KACG,OAAO,EACL,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,EAC7C,0BAA0B,EAAE,MAAM,CAAC,MAAM,KAAK,CAAC,EAC/C,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,IAAI,CAAC,YAEnC,CAAC,kBAAkB,GAAG,CAAC,IAAI,UAAU,CAAC,QAAQ,CAAC,IAAI,CAClD,8BACG,kBAAkB,OAAG,KAAK,EAC3B,eAAM,KAAK,EAAE,QAAQ,CAAC,IAAI,EAAE,oBAAoB,CAAC,YAC9C,MAAM,CAAC,MAAM,GACT,EACN,KAAK,IACL,CACJ,GACe,CACnB,CAAC;AACJ,CAAC;AAED,eAAe,IAAI,CAAC,sBAAsB,CAAC,CAAC"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { useDispatch } from '../../../context/DispatchContext.js';
|
|
2
|
-
import { EditableColumn } from '../../../elements/EditableColumn.js';
|
|
3
|
-
import type { OnHoverEvent, RowSpanTags } from '../RangesTableRow.js';
|
|
4
|
-
import type { RangeData } from '../hooks/useMapRanges.js';
|
|
5
|
-
|
|
6
|
-
type RangeAssignmentColumnProps = OnHoverEvent &
|
|
7
|
-
RowSpanTags & { row: RangeData };
|
|
8
|
-
|
|
9
|
-
export function RangeAssignmentColumn({
|
|
10
|
-
row,
|
|
11
|
-
onHover,
|
|
12
|
-
rowSpanTags,
|
|
13
|
-
}: RangeAssignmentColumnProps) {
|
|
14
|
-
const dispatch = useDispatch();
|
|
15
|
-
|
|
16
|
-
function saveHandler(event: any) {
|
|
17
|
-
dispatch({
|
|
18
|
-
type: 'CHANGE_RANGE_ASSIGNMENT_LABEL',
|
|
19
|
-
payload: {
|
|
20
|
-
value: event.target.value,
|
|
21
|
-
rangeId: row.id,
|
|
22
|
-
},
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
return (
|
|
27
|
-
<td {...rowSpanTags} {...onHover}>
|
|
28
|
-
<EditableColumn
|
|
29
|
-
value={row?.assignment || ''}
|
|
30
|
-
onSave={saveHandler}
|
|
31
|
-
style={{ padding: '0.1rem 0.4rem' }}
|
|
32
|
-
type="text"
|
|
33
|
-
/>
|
|
34
|
-
</td>
|
|
35
|
-
);
|
|
36
|
-
}
|