nmrium 1.9.0 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/component/1d/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 +16 -10
- 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 +27 -18
- 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 +24 -22
- 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 +25 -14
- 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 +32 -16
- 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,3 +1,5 @@
|
|
|
1
|
+
import { isSpectrum1D } from "../data1d/Spectrum1D/index.js";
|
|
2
|
+
import { isSpectrum2D } from "../data2d/Spectrum2D/index.js";
|
|
1
3
|
function findSpectrum(spectraData, spectrumID, checkIsVisible) {
|
|
2
4
|
const spectrum = spectraData.find((_spectrum) => _spectrum.id === spectrumID);
|
|
3
5
|
if (spectrum && checkIsVisible && !spectrum.display.isVisible) {
|
|
@@ -43,17 +45,15 @@ function findZone(spectrum, signalID) {
|
|
|
43
45
|
}
|
|
44
46
|
function findRangeOrZoneID(spectraData, experimentID, signalID, checkIsVisible) {
|
|
45
47
|
const spectrum = findSpectrum(spectraData, experimentID, checkIsVisible);
|
|
46
|
-
if (spectrum) {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
return zone.id;
|
|
56
|
-
}
|
|
48
|
+
if (isSpectrum1D(spectrum)) {
|
|
49
|
+
const range = findRange(spectrum, signalID);
|
|
50
|
+
if (range)
|
|
51
|
+
return range.id;
|
|
52
|
+
}
|
|
53
|
+
else if (isSpectrum2D(spectrum)) {
|
|
54
|
+
const zone = findZone(spectrum, signalID);
|
|
55
|
+
if (zone)
|
|
56
|
+
return zone.id;
|
|
57
57
|
}
|
|
58
58
|
return undefined;
|
|
59
59
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FindUtilities.js","sourceRoot":"","sources":["../../../src/data/utilities/FindUtilities.ts"],"names":[],"mappings":"AAGA,S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sources":["../../../src/utils/clipboard/clipboardComponents.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAsBhD,UAAU,IAAI;IACZ,IAAI,EAAE,aAAa,GAAG,SAAS,CAAC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,UAAU,sBACR,
|
|
1
|
+
{"version":3,"file":"clipboardComponents.d.ts","sourceRoot":"","sources":["../../../src/utils/clipboard/clipboardComponents.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAsBhD,UAAU,IAAI;IACZ,IAAI,EAAE,aAAa,GAAG,SAAS,CAAC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,UAAU,sBACR,SACE,IAAI,EACJ,OAAO,CAAC,IAAI,CAAC,0BAA0B,EAAE,MAAM,GAAG,OAAO,GAAG,WAAW,CAAC,CAAC,EACzE,OAAO,CACL,IAAI,CAAC,8BAA8B,EAAE,MAAM,GAAG,OAAO,GAAG,WAAW,CAAC,CACrE,EACD,OAAO,CAAC,IAAI,CAAC,2BAA2B,EAAE,MAAM,GAAG,OAAO,GAAG,WAAW,CAAC,CAAC,EAC1E,OAAO,CACL,IAAI,CAAC,+BAA+B,EAAE,MAAM,GAAG,OAAO,GAAG,WAAW,CAAC,CACtE;CAAG;AAgER;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,sBAAsB,kDAiBnE;AAED,UAAU,0BAA2B,SAAQ,IAAI;IAC/C,MAAM,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IAC7B,IAAI,EAAE,MAAM,CAAC;CACd;AAwCD,UAAU,8BAA+B,SAAQ,IAAI;IACnD,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,IAAI,EAAE,UAAU,CAAC;CAClB;AAyCD,UAAU,2BAA4B,SAAQ,IAAI;IAChD,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,EAAE,OAAO,CAAC;CACf;AAwCD,UAAU,+BAAgC,SAAQ,IAAI;IACpD,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,WAAW,CAAC;CACnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clipboardComponents.js","sourceRoot":"","sources":["../../../src/utils/clipboard/clipboardComponents.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEhE,OAAO,MAAM,MAAM,oCAAoC,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAIhF,MAAM,aAAa,GAAG,MAAM,CAAC,IAAI,CAAA;;;;;;;;;;;;CAYhC,CAAC;AAEF,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAA;;;;CAIzB,CAAC;
|
|
1
|
+
{"version":3,"file":"clipboardComponents.js","sourceRoot":"","sources":["../../../src/utils/clipboard/clipboardComponents.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEhE,OAAO,MAAM,MAAM,oCAAoC,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAIhF,MAAM,aAAa,GAAG,MAAM,CAAC,IAAI,CAAA;;;;;;;;;;;;CAYhC,CAAC;AAEF,MAAM,OAAO,GAAG,MA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@@ -6,11 +6,11 @@ interface UseClipboardReturn {
|
|
|
6
6
|
/**
|
|
7
7
|
* Fallback on 'read' mode
|
|
8
8
|
*/
|
|
9
|
-
read: () => Promise<ClipboardItems |
|
|
9
|
+
read: () => Promise<ClipboardItems | null>;
|
|
10
10
|
/**
|
|
11
11
|
* Fallback on 'readText' mode
|
|
12
12
|
*/
|
|
13
|
-
readText: () => Promise<string |
|
|
13
|
+
readText: () => Promise<string | null>;
|
|
14
14
|
/**
|
|
15
15
|
* Fallback on 'write' mode with blobs (get blob for each first type for each item) state
|
|
16
16
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clipboardHooks.d.ts","sourceRoot":"","sources":["../../../src/utils/clipboard/clipboardHooks.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,UAAU,kBAAkB;IAC1B;;OAEG;IACH;;OAEG;IACH,IAAI,EAAE,MAAM,OAAO,CAAC,cAAc,GAAG,
|
|
1
|
+
{"version":3,"file":"clipboardHooks.d.ts","sourceRoot":"","sources":["../../../src/utils/clipboard/clipboardHooks.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,UAAU,kBAAkB;IAC1B;;OAEG;IACH;;OAEG;IACH,IAAI,EAAE,MAAM,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAC3C;;OAEG;IACH,QAAQ,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACvC;;OAEG;IACH,KAAK,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/C;;OAEG;IACH,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAE3C;;OAEG;IACH;;;;;OAKG;IACH,gBAAgB,EAAE,CAChB,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE,WAAW,GAAG,YAAY,GAAG,MAAM,KACvC,OAAO,CAAC,IAAI,CAAC,CAAC;IAEnB;;OAEG;IACH;;OAEG;IACH,cAAc,EAAE,aAAa,GAAG,SAAS,CAAC;IAC1C;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB;;OAEG;IACH,KAAK,EAAE,IAAI,EAAE,GAAG,SAAS,CAAC;IAE1B;;;OAGG;IACH,mBAAmB,EAAE,MAAM,IAAI,CAAC;CACjC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAgB,YAAY,IAAI,kBAAkB,CA6EjD"}
|
|
@@ -44,22 +44,28 @@ export function useClipboard() {
|
|
|
44
44
|
setBlobs(undefined);
|
|
45
45
|
}, []);
|
|
46
46
|
const clipboardAPI = useMemo(() => ({
|
|
47
|
+
/**
|
|
48
|
+
* Attempt to read clipboard items. Sets the fallback and returns `null` if the attempt failed.
|
|
49
|
+
*/
|
|
47
50
|
async read() {
|
|
48
51
|
try {
|
|
49
52
|
return await read();
|
|
50
53
|
}
|
|
51
|
-
catch
|
|
54
|
+
catch {
|
|
52
55
|
setShouldFallback('read');
|
|
53
|
-
|
|
56
|
+
return null;
|
|
54
57
|
}
|
|
55
58
|
},
|
|
59
|
+
/**
|
|
60
|
+
* Attempt to read text from the clipboard. Sets the fallback and returns `null` if the attempt failed.
|
|
61
|
+
*/
|
|
56
62
|
async readText() {
|
|
57
63
|
try {
|
|
58
64
|
return await readText();
|
|
59
65
|
}
|
|
60
|
-
catch
|
|
66
|
+
catch {
|
|
61
67
|
setShouldFallback('readText');
|
|
62
|
-
|
|
68
|
+
return null;
|
|
63
69
|
}
|
|
64
70
|
},
|
|
65
71
|
async write(data) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clipboardHooks.js","sourceRoot":"","sources":["../../../src/utils/clipboard/clipboardHooks.ts"],"names":[],"mappings":"AAAA,OAAO,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C;QACD,KAAK,CAAC,gBAAgB,CAAC,IAAY,EAAE,IAAI,GAAG,YAAY;YACtD,IAAI,CAAC;gBACH,MAAM,IAAI,GAAG,MAAM,gBAAgB,CAAC;oBAClC,CAAC,IAAI,CAAC,EAAE,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC;iBACnC,CAAC,CAAC;gBACH,OAAO,MAAM,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;YAC7B,CAAC;YAAC,MAAM,CAAC;gBACP,OAAO,CAAC,IAAI,CAAC,CAAC;gBACd,iBAAiB,CAAC,WAAW,CAAC,CAAC;YACjC,CAAC;QACH,CAAC;QACD,KAAK,CAAC,SAAS,CAAC,IAAY;YAC1B,IAAI,CAAC;gBACH,OAAO,MAAM,SAAS,CAAC,IAAI,CAAC,CAAC;YAC/B,CAAC;YAAC,MAAM,CAAC;gBACP,OAAO,CAAC,IAAI,CAAC,CAAC;gBACd,iBAAiB,CAAC,WAAW,CAAC,CAAC;YACjC,CAAC;QACH,CAAC;KACF,CAAC,EACF,EAAE,CACH,CAAC;IAEF,OAAO;QACL,GAAG,YAAY;QACf,cAAc;QACd,IAAI;QACJ,KAAK;QACL,mBAAmB;KACpB,CAAC;AACJ,CAAC"}
|
package/lib/versionInfo.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"versionInfo.d.ts","sourceRoot":"","sources":["../src/versionInfo.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"versionInfo.d.ts","sourceRoot":"","sources":["../src/versionInfo.ts"],"names":[],"mappings":";;;AAAA,wBAAsC"}
|
package/lib/versionInfo.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export default { version: 'v1.
|
|
1
|
+
export default { version: 'v1.10.0' };
|
|
2
2
|
//# sourceMappingURL=versionInfo.js.map
|
package/lib/versionInfo.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"versionInfo.js","sourceRoot":"","sources":["../src/versionInfo.ts"],"names":[],"mappings":"AAAA,eAAe,EAAE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"versionInfo.js","sourceRoot":"","sources":["../src/versionInfo.ts"],"names":[],"mappings":"AAAA,eAAe,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nmrium",
|
|
3
3
|
"description": "React component to display and process nuclear magnetic resonance (NMR) spectra.",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.10.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
@@ -68,9 +68,10 @@
|
|
|
68
68
|
"@emotion/react": "^11.14.0",
|
|
69
69
|
"@emotion/styled": "^11.14.1",
|
|
70
70
|
"@hookform/resolvers": "^5.2.2",
|
|
71
|
-
"@
|
|
72
|
-
"@zakodium/
|
|
73
|
-
"@zakodium/nmrium-core
|
|
71
|
+
"@tanstack/react-form": "^1.23.8",
|
|
72
|
+
"@zakodium/nmr-types": "^0.5.0",
|
|
73
|
+
"@zakodium/nmrium-core": "^0.5.1",
|
|
74
|
+
"@zakodium/nmrium-core-plugins": "^0.6.20",
|
|
74
75
|
"@zakodium/pdnd-esm": "^1.0.2",
|
|
75
76
|
"@zip.js/zip.js": "^2.8.11",
|
|
76
77
|
"cheminfo-font": "^1.13.1",
|
|
@@ -82,10 +83,10 @@
|
|
|
82
83
|
"dlv": "^1.1.3",
|
|
83
84
|
"eventemitter3": "^5.0.1",
|
|
84
85
|
"fifo-logger": "^2.0.1",
|
|
85
|
-
"file-collection": "^6.
|
|
86
|
+
"file-collection": "^6.5.0",
|
|
86
87
|
"file-saver": "^2.0.5",
|
|
87
88
|
"get-jpaths": "^1.1.0",
|
|
88
|
-
"immer": "^
|
|
89
|
+
"immer": "^11.0.1",
|
|
89
90
|
"lodash": "^4.17.21",
|
|
90
91
|
"mf-parser": "^3.6.0",
|
|
91
92
|
"ml-array-mean": "^1.1.6",
|
|
@@ -96,9 +97,9 @@
|
|
|
96
97
|
"ml-spectra-processing": "^14.18.1",
|
|
97
98
|
"ml-tree-similarity": "^2.2.0",
|
|
98
99
|
"nmr-correlation": "2.3.3",
|
|
99
|
-
"nmr-processing": "^
|
|
100
|
+
"nmr-processing": "^22.0.0",
|
|
100
101
|
"numeral": "^2.0.6",
|
|
101
|
-
"openchemlib": "^9.18.
|
|
102
|
+
"openchemlib": "^9.18.2",
|
|
102
103
|
"openchemlib-utils": "^8.8.1",
|
|
103
104
|
"papaparse": "^5.5.3",
|
|
104
105
|
"react-d3-utils": "^3.1.2",
|
|
@@ -110,44 +111,45 @@
|
|
|
110
111
|
"react-mf": "^3.1.1",
|
|
111
112
|
"react-ocl": "^8.4.0",
|
|
112
113
|
"react-ocl-nmr": "^4.1.1",
|
|
113
|
-
"react-plot": "^3.1.
|
|
114
|
+
"react-plot": "^3.1.2",
|
|
114
115
|
"react-rnd": "^10.5.2",
|
|
115
|
-
"react-science": "^19.
|
|
116
|
+
"react-science": "^19.4.0",
|
|
116
117
|
"react-table": "^7.8.0",
|
|
117
118
|
"smart-array-filter": "^5.0.0",
|
|
118
|
-
"yup": "^1.7.1"
|
|
119
|
+
"yup": "^1.7.1",
|
|
120
|
+
"zod": "^4.1.12"
|
|
119
121
|
},
|
|
120
122
|
"devDependencies": {
|
|
121
123
|
"@blueprintjs/core": "^6.3.4",
|
|
122
124
|
"@blueprintjs/icons": "^6.3.1",
|
|
123
125
|
"@blueprintjs/select": "^6.0.8",
|
|
124
|
-
"@playwright/test": "^1.
|
|
126
|
+
"@playwright/test": "^1.57.0",
|
|
125
127
|
"@simbathesailor/use-what-changed": "^2.0.0",
|
|
126
128
|
"@types/d3-array": "^3.2.2",
|
|
127
129
|
"@types/d3-scale": "^4.0.9",
|
|
128
130
|
"@types/d3-zoom": "^3.0.8",
|
|
129
131
|
"@types/dlv": "^1.1.5",
|
|
130
132
|
"@types/file-saver": "^2.0.7",
|
|
131
|
-
"@types/lodash": "^4.17.
|
|
133
|
+
"@types/lodash": "^4.17.21",
|
|
132
134
|
"@types/node": "^24.10.1",
|
|
133
135
|
"@types/numeral": "^2.0.5",
|
|
134
|
-
"@types/papaparse": "^5.5.
|
|
136
|
+
"@types/papaparse": "^5.5.1",
|
|
135
137
|
"@types/react": "^18.3.13",
|
|
136
138
|
"@types/react-dom": "^18.3.1",
|
|
137
139
|
"@types/react-table": "^7.7.20",
|
|
138
140
|
"@vitejs/plugin-react": "^5.1.1",
|
|
139
|
-
"@vitest/coverage-v8": "^4.0.
|
|
141
|
+
"@vitest/coverage-v8": "^4.0.14",
|
|
140
142
|
"@zakodium/tsconfig": "^1.0.2",
|
|
141
143
|
"cross-env": "^10.1.0",
|
|
142
|
-
"cspell": "^9.
|
|
144
|
+
"cspell": "^9.4.0",
|
|
143
145
|
"eslint": "^9.39.1",
|
|
144
146
|
"eslint-config-cheminfo-react": "^19.0.0",
|
|
145
147
|
"eslint-config-cheminfo-typescript": "^21.0.1",
|
|
146
|
-
"knip": "^5.
|
|
148
|
+
"knip": "^5.71.0",
|
|
147
149
|
"modern-normalize": "^3.0.1",
|
|
148
150
|
"postcss": "^8.5.6",
|
|
149
151
|
"postcss-styled-syntax": "^0.7.1",
|
|
150
|
-
"prettier": "^3.
|
|
152
|
+
"prettier": "^3.7.3",
|
|
151
153
|
"rc-menu": "^9.16.1",
|
|
152
154
|
"react": "^18.3.1",
|
|
153
155
|
"react-dom": "^18.3.1",
|
|
@@ -155,13 +157,13 @@
|
|
|
155
157
|
"rimraf": "^6.1.2",
|
|
156
158
|
"rollup-plugin-analyzer": "^4.0.0",
|
|
157
159
|
"serve": "^14.2.5",
|
|
158
|
-
"stylelint": "^16.
|
|
160
|
+
"stylelint": "^16.26.1",
|
|
159
161
|
"stylelint-config-standard": "^39.0.1",
|
|
160
162
|
"typescript": "~5.9.3",
|
|
161
|
-
"vite": "^7.2.
|
|
162
|
-
"vitest": "^4.0.
|
|
163
|
+
"vite": "^7.2.6",
|
|
164
|
+
"vitest": "^4.0.14"
|
|
163
165
|
},
|
|
164
166
|
"volta": {
|
|
165
|
-
"node": "24.11.
|
|
167
|
+
"node": "24.11.1"
|
|
166
168
|
}
|
|
167
169
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PropsWithChildren } from 'react';
|
|
1
|
+
import type { MouseEvent, PropsWithChildren } from 'react';
|
|
2
2
|
import { useCallback, useRef, useState } from 'react';
|
|
3
3
|
import { useOnOff } from 'react-science/ui';
|
|
4
4
|
|
|
@@ -106,7 +106,7 @@ export function BrushTracker1D({ children }: Required<PropsWithChildren>) {
|
|
|
106
106
|
|
|
107
107
|
const [brushData, setBrushData] = useState<BrushTrackerData | null>(null);
|
|
108
108
|
|
|
109
|
-
function handleBrush(brushData:
|
|
109
|
+
function handleBrush(brushData: BrushTrackerData) {
|
|
110
110
|
const { mouseButton } = brushData;
|
|
111
111
|
const brushDataInPPM = convertToPPM(brushData);
|
|
112
112
|
|
|
@@ -120,7 +120,7 @@ export function BrushTracker1D({ children }: Required<PropsWithChildren>) {
|
|
|
120
120
|
dispatch({ type: 'MOVE', payload: { shiftX, shiftY: 0 } });
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
-
function handleInsetBrush(brushData:
|
|
123
|
+
function handleInsetBrush(brushData: BrushTrackerData) {
|
|
124
124
|
const { mouseButton } = brushData;
|
|
125
125
|
const brushDataInPPM = convertToPPM(brushData);
|
|
126
126
|
|
|
@@ -140,13 +140,13 @@ export function BrushTracker1D({ children }: Required<PropsWithChildren>) {
|
|
|
140
140
|
}
|
|
141
141
|
|
|
142
142
|
const handleBrushEnd = useCallback<OnBrush>(
|
|
143
|
-
(brushData) => {
|
|
143
|
+
(brushData: BrushTrackerData) => {
|
|
144
144
|
//reset the brush start
|
|
145
145
|
brushStartRef.current = null;
|
|
146
146
|
setBrushData(brushData);
|
|
147
147
|
const brushDataInPPM = convertToPPM(brushData);
|
|
148
148
|
|
|
149
|
-
const keyModifiers = getModifiersKey(brushData
|
|
149
|
+
const keyModifiers = getModifiersKey(brushData);
|
|
150
150
|
|
|
151
151
|
const selectRange = sortRange(brushDataInPPM.startX, brushDataInPPM.endX);
|
|
152
152
|
|
|
@@ -339,8 +339,8 @@ export function BrushTracker1D({ children }: Required<PropsWithChildren>) {
|
|
|
339
339
|
);
|
|
340
340
|
|
|
341
341
|
const handleOnDoubleClick = useCallback(
|
|
342
|
-
(event:
|
|
343
|
-
const keyModifiers = getModifiersKey(event
|
|
342
|
+
(event: MouseEvent) => {
|
|
343
|
+
const keyModifiers = getModifiersKey(event);
|
|
344
344
|
if (primaryKeyIdentifier === keyModifiers && !isClickDebounced) return;
|
|
345
345
|
|
|
346
346
|
dispatch({
|
|
@@ -352,8 +352,8 @@ export function BrushTracker1D({ children }: Required<PropsWithChildren>) {
|
|
|
352
352
|
);
|
|
353
353
|
|
|
354
354
|
const handleInsetOnDoubleClick = useCallback(
|
|
355
|
-
(event:
|
|
356
|
-
const keyModifiers = getModifiersKey(event
|
|
355
|
+
(event: MouseEvent) => {
|
|
356
|
+
const keyModifiers = getModifiersKey(event);
|
|
357
357
|
if (primaryKeyIdentifier === keyModifiers) return;
|
|
358
358
|
|
|
359
359
|
if (!inset) {
|
|
@@ -420,7 +420,7 @@ export function BrushTracker1D({ children }: Required<PropsWithChildren>) {
|
|
|
420
420
|
xPPM,
|
|
421
421
|
});
|
|
422
422
|
|
|
423
|
-
const keyModifiers = getModifiersKey(event
|
|
423
|
+
const keyModifiers = getModifiersKey(event);
|
|
424
424
|
|
|
425
425
|
switch (keyModifiers) {
|
|
426
426
|
case primaryKeyIdentifier: {
|
|
@@ -74,7 +74,7 @@ function FooterBannerInner({
|
|
|
74
74
|
return <FooterContainer />;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
function getXIndex(xPosition:
|
|
77
|
+
function getXIndex(xPosition: number) {
|
|
78
78
|
if (spectrum) {
|
|
79
79
|
const data = get1DDataXY(spectrum);
|
|
80
80
|
return xFindClosestIndex(data.x, scaleX().invert(xPosition));
|
|
@@ -82,7 +82,7 @@ function FooterBannerInner({
|
|
|
82
82
|
return 0;
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
function getYValue(xPosition:
|
|
85
|
+
function getYValue(xPosition: number) {
|
|
86
86
|
if (spectrum) {
|
|
87
87
|
const data = get1DDataXY(spectrum);
|
|
88
88
|
const xIndex = getXIndex(xPosition);
|
|
@@ -94,8 +94,8 @@ function HeadlightRectStackMode(props: HeadlightRectStackModeProps) {
|
|
|
94
94
|
x={margin.left}
|
|
95
95
|
width={`${innerWidth}px`}
|
|
96
96
|
height={`${BOX_SIZE}px`}
|
|
97
|
-
onClick={(
|
|
98
|
-
setActiveSpectrum(
|
|
97
|
+
onClick={(event) => {
|
|
98
|
+
setActiveSpectrum(event, spectrumID);
|
|
99
99
|
}}
|
|
100
100
|
data-no-export="true"
|
|
101
101
|
/>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ClipPathContainer } from '../1d-2d/components/ClipPathContainer.js';
|
|
2
2
|
import SpectrumInfoBlock from '../1d-2d/components/SpectrumInfoBlock.js';
|
|
3
|
+
import { ShareDataProvider } from '../context/ShareDataContext.tsx';
|
|
3
4
|
|
|
4
5
|
import { ApodizationLine } from './ApodizationLine.js';
|
|
5
6
|
import ExclusionZonesAnnotations from './ExclusionZonesAnnotations.js';
|
|
@@ -30,9 +31,12 @@ export function SVGContent1D() {
|
|
|
30
31
|
<IntegralsSeries />
|
|
31
32
|
<Peaks peaksSource="peaks" />
|
|
32
33
|
<RangesIntegrals />
|
|
33
|
-
<
|
|
34
|
+
<ShareDataProvider>
|
|
35
|
+
<Ranges />
|
|
36
|
+
<MultiplicityTrees />
|
|
37
|
+
</ShareDataProvider>
|
|
38
|
+
|
|
34
39
|
<Peaks peaksSource="ranges" />
|
|
35
|
-
<MultiplicityTrees />
|
|
36
40
|
<MultiAnalysisRanges />
|
|
37
41
|
<BaseLineZones />
|
|
38
42
|
<ExclusionZonesAnnotations />
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Tree } from 'ml-tree-similarity';
|
|
1
2
|
import { createTree } from 'ml-tree-similarity';
|
|
2
3
|
import type { CSSProperties } from 'react';
|
|
3
4
|
import { Fragment } from 'react';
|
|
@@ -93,9 +94,9 @@ interface TreeItem {
|
|
|
93
94
|
}
|
|
94
95
|
|
|
95
96
|
function mapTreeToArray(
|
|
96
|
-
node:
|
|
97
|
+
node: Tree | null,
|
|
97
98
|
level: number,
|
|
98
|
-
parentCenter = null,
|
|
99
|
+
parentCenter: number | null = null,
|
|
99
100
|
parentLevel = -1,
|
|
100
101
|
): TreeItem[] {
|
|
101
102
|
if (!node) return [];
|
|
@@ -12,8 +12,10 @@ export const insetMargin: Margin = {
|
|
|
12
12
|
left: 10,
|
|
13
13
|
} as const;
|
|
14
14
|
|
|
15
|
-
interface BaseInsetPagContextProps
|
|
16
|
-
|
|
15
|
+
interface BaseInsetPagContextProps extends Pick<
|
|
16
|
+
Inset,
|
|
17
|
+
'xDomain' | 'yDomain' | 'id' | 'spectrumKey' | 'view'
|
|
18
|
+
> {
|
|
17
19
|
width: number;
|
|
18
20
|
height: number;
|
|
19
21
|
}
|
|
@@ -5,6 +5,7 @@ import { useChartData } from '../../context/ChartContext.js';
|
|
|
5
5
|
import { useDispatch } from '../../context/DispatchContext.js';
|
|
6
6
|
import { useScaleChecked } from '../../context/ScaleContext.js';
|
|
7
7
|
import { ResizerWithScale } from '../../elements/ResizerWithScale.js';
|
|
8
|
+
import type { Position } from '../../elements/resizer/SVGResizer.tsx';
|
|
8
9
|
import { useHighlight } from '../../highlight/index.js';
|
|
9
10
|
import { useResizerStatus } from '../../hooks/useResizerStatus.js';
|
|
10
11
|
import useSpectrum from '../../hooks/useSpectrum.js';
|
|
@@ -41,7 +42,7 @@ function IntegralResizable({
|
|
|
41
42
|
extra: { id, spectrumID: spectrum.id },
|
|
42
43
|
});
|
|
43
44
|
|
|
44
|
-
function handleOnStopResizing(position:
|
|
45
|
+
function handleOnStopResizing(position: Position) {
|
|
45
46
|
dispatch({
|
|
46
47
|
type: 'RESIZE_INTEGRAL',
|
|
47
48
|
payload: {
|
|
@@ -43,7 +43,7 @@ interface UsePathAreaPoints {
|
|
|
43
43
|
y2: NumberArray;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
function useYScale(scaleRatio: number, yDomain:
|
|
46
|
+
function useYScale(scaleRatio: number, yDomain: number[]) {
|
|
47
47
|
const { margin, height } = useChartData();
|
|
48
48
|
const { spectraBottomMargin } = useScaleChecked();
|
|
49
49
|
|
|
@@ -59,7 +59,7 @@ function useYScale(scaleRatio: number, yDomain: any) {
|
|
|
59
59
|
function usePath(
|
|
60
60
|
pathPoints: UsePathLinePoints,
|
|
61
61
|
scaleRatio: number,
|
|
62
|
-
yDomain:
|
|
62
|
+
yDomain: number[],
|
|
63
63
|
) {
|
|
64
64
|
const { scaleX } = useScaleChecked();
|
|
65
65
|
const scaleY = useYScale(scaleRatio, yDomain);
|
|
@@ -78,7 +78,7 @@ function usePath(
|
|
|
78
78
|
function useAreaPath(
|
|
79
79
|
pathPoints: UsePathAreaPoints,
|
|
80
80
|
scaleRatio: number,
|
|
81
|
-
yDomain:
|
|
81
|
+
yDomain: number[],
|
|
82
82
|
) {
|
|
83
83
|
const { scaleX } = useScaleChecked();
|
|
84
84
|
const scaleY = useYScale(scaleRatio, yDomain);
|
|
@@ -4,6 +4,7 @@ import { useCallback } from 'react';
|
|
|
4
4
|
import { usePreferences } from '../../context/PreferencesContext.js';
|
|
5
5
|
import { useScaleChecked } from '../../context/ScaleContext.js';
|
|
6
6
|
import { ResizerWithScale } from '../../elements/ResizerWithScale.js';
|
|
7
|
+
import type { Position } from '../../elements/resizer/SVGResizer.tsx';
|
|
7
8
|
import { useHighlight } from '../../highlight/index.js';
|
|
8
9
|
import { useResizerStatus } from '../../hooks/useResizerStatus.js';
|
|
9
10
|
|
|
@@ -34,7 +35,7 @@ function AnalysisRange({
|
|
|
34
35
|
const { dispatch } = usePreferences();
|
|
35
36
|
|
|
36
37
|
const resizeEndHandler = useCallback(
|
|
37
|
-
(resized:
|
|
38
|
+
(resized: Position) => {
|
|
38
39
|
const { x1, x2 } = resized;
|
|
39
40
|
const start = scaleX().invert(x2);
|
|
40
41
|
const end = scaleX().invert(x1);
|
|
@@ -3,7 +3,6 @@ import type { Range } from '@zakodium/nmr-types';
|
|
|
3
3
|
import type { Spectrum1D } from '@zakodium/nmrium-core';
|
|
4
4
|
import { xFindClosestIndex } from 'ml-spectra-processing';
|
|
5
5
|
import { useRef } from 'react';
|
|
6
|
-
import { LuLink, LuUnlink } from 'react-icons/lu';
|
|
7
6
|
|
|
8
7
|
import { isSpectrum1D } from '../../../data/data1d/Spectrum1D/index.js';
|
|
9
8
|
import type { AssignmentsData } from '../../assignment/AssignmentsContext.js';
|
|
@@ -11,12 +10,12 @@ import { useAssignment } from '../../assignment/AssignmentsContext.js';
|
|
|
11
10
|
import { useChartData } from '../../context/ChartContext.js';
|
|
12
11
|
import { useDispatch } from '../../context/DispatchContext.js';
|
|
13
12
|
import { useScaleChecked } from '../../context/ScaleContext.js';
|
|
14
|
-
import type { ActionsButtonsPopoverProps } from '../../elements/ActionsButtonsPopover.js';
|
|
15
13
|
import { ActionsButtonsPopover } from '../../elements/ActionsButtonsPopover.js';
|
|
16
14
|
import { useHighlight } from '../../highlight/index.js';
|
|
17
15
|
import { useActiveSpectrum } from '../../hooks/useActiveSpectrum.ts';
|
|
18
16
|
import useSpectrum from '../../hooks/useSpectrum.js';
|
|
19
17
|
import { useIsInset } from '../inset/InsetProvider.js';
|
|
18
|
+
import { useAssignmentsPopoverActionsButtons } from '../ranges/useAssignmentsPopoverActionsButtons.tsx';
|
|
20
19
|
|
|
21
20
|
import type { TreeNodes } from './generateTreeNodes.js';
|
|
22
21
|
import { generateTreeNodes } from './generateTreeNodes.js';
|
|
@@ -76,7 +75,15 @@ function Tree(props: TreeProps) {
|
|
|
76
75
|
signalIndex,
|
|
77
76
|
range,
|
|
78
77
|
startY: originStartY,
|
|
79
|
-
treeNodes: {
|
|
78
|
+
treeNodes: {
|
|
79
|
+
multiplicity = '',
|
|
80
|
+
nodes,
|
|
81
|
+
min,
|
|
82
|
+
max,
|
|
83
|
+
signalKey,
|
|
84
|
+
diaIDs,
|
|
85
|
+
assignment: assignmentLabel,
|
|
86
|
+
},
|
|
80
87
|
} = props;
|
|
81
88
|
const { from, to } = range;
|
|
82
89
|
const { width } = useChartData();
|
|
@@ -118,6 +125,18 @@ function Tree(props: TreeProps) {
|
|
|
118
125
|
startY,
|
|
119
126
|
});
|
|
120
127
|
|
|
128
|
+
const hasDiaIDs = Array.isArray(diaIDs) && diaIDs.length > 0;
|
|
129
|
+
const isAssignmentActive = assignment.isActive;
|
|
130
|
+
|
|
131
|
+
const actionsButtons = useAssignmentsPopoverActionsButtons({
|
|
132
|
+
isUnAssignButtonVisible: isAssignmentActive || hasDiaIDs,
|
|
133
|
+
isAssignLabelButtonVisible: !assignmentLabel,
|
|
134
|
+
isUnAssignLabelButtonVisible: !!assignmentLabel,
|
|
135
|
+
onAssign: assignHandler,
|
|
136
|
+
onUnAssign: unAssignHandler,
|
|
137
|
+
rangeId: range.id,
|
|
138
|
+
});
|
|
139
|
+
|
|
121
140
|
if (!multiplicity) return null;
|
|
122
141
|
|
|
123
142
|
function assignHandler() {
|
|
@@ -127,38 +146,20 @@ function Tree(props: TreeProps) {
|
|
|
127
146
|
|
|
128
147
|
function unAssignHandler() {
|
|
129
148
|
dispatch({
|
|
130
|
-
type: '
|
|
149
|
+
type: 'UNASSIGN_1D_SIGNAL',
|
|
131
150
|
payload: {
|
|
132
151
|
rangeKey: range.id,
|
|
133
152
|
signalIndex,
|
|
134
153
|
},
|
|
135
154
|
});
|
|
136
155
|
}
|
|
137
|
-
|
|
138
|
-
const isAssignmentActive = assignment.isActive;
|
|
156
|
+
|
|
139
157
|
const isHighlighted = highlight.isActive || isAssignmentActive;
|
|
140
158
|
const padding = boxPadding * widthRatio;
|
|
141
159
|
const x = scaleX()(max) - padding;
|
|
142
160
|
const y = startY - headTextMargin - headerTextSize - padding;
|
|
143
161
|
const boxWidth = treeWidth + padding * 2;
|
|
144
162
|
const boxHeight = treeHeight + headTextMargin + headerTextSize + padding * 2;
|
|
145
|
-
|
|
146
|
-
const actionsButtons: ActionsButtonsPopoverProps['buttons'] = [
|
|
147
|
-
{
|
|
148
|
-
icon: <LuLink />,
|
|
149
|
-
onClick: assignHandler,
|
|
150
|
-
intent: 'success',
|
|
151
|
-
title: 'Assign range',
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
icon: <LuUnlink />,
|
|
155
|
-
onClick: () => unAssignHandler(),
|
|
156
|
-
intent: 'danger',
|
|
157
|
-
title: 'Unassign range',
|
|
158
|
-
visible: isAssignmentActive || hasDiaIDs,
|
|
159
|
-
},
|
|
160
|
-
];
|
|
161
|
-
|
|
162
163
|
const isOpen = isAssignBtnTrigged.current ? isAssignmentActive : undefined;
|
|
163
164
|
|
|
164
165
|
return (
|