nmrium 1.10.1 → 1.12.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/BrushTracker1D.d.ts.map +1 -1
- package/lib/component/1d/BrushTracker1D.js +7 -0
- package/lib/component/1d/BrushTracker1D.js.map +1 -1
- package/lib/component/1d/FloatPublicationString.d.ts.map +1 -1
- package/lib/component/1d/FloatPublicationString.js +170 -109
- package/lib/component/1d/FloatPublicationString.js.map +1 -1
- package/lib/component/1d/FloatingRanges.d.ts.map +1 -1
- package/lib/component/1d/FloatingRanges.js +3 -3
- package/lib/component/1d/FloatingRanges.js.map +1 -1
- package/lib/component/1d/SVGContent1D.js +1 -1
- package/lib/component/1d/SVGContent1D.js.map +1 -1
- package/lib/component/1d/inset/DraggableInset.d.ts.map +1 -1
- package/lib/component/1d/inset/DraggableInset.js +4 -4
- package/lib/component/1d/inset/DraggableInset.js.map +1 -1
- package/lib/component/1d/matrix/Boxplot.js +1 -1
- package/lib/component/1d/matrix/Stocsy.js +1 -1
- package/lib/component/1d/multiplicityTree/MultiplicityTree.js +2 -2
- package/lib/component/1d/multiplicityTree/MultiplicityTree.js.map +1 -1
- package/lib/component/1d/peaks/PeakAnnotations.js +2 -2
- package/lib/component/1d/peaks/PeakAnnotations.js.map +1 -1
- package/lib/component/1d/peaks/PeakAnnotationsSpreadMode.js +1 -1
- package/lib/component/1d/peaks/PeakAnnotationsSpreadMode.js.map +1 -1
- package/lib/component/1d/peaks/Peaks.js +2 -2
- package/lib/component/1d/peaks/Peaks.js.map +1 -1
- package/lib/component/1d/ranges/Range.d.ts +1 -1
- package/lib/component/1d/ranges/Range.js +3 -3
- package/lib/component/1d/ranges/Range.js.map +1 -1
- package/lib/component/1d/ranges/Ranges.js +2 -2
- package/lib/component/1d/ranges/Ranges.js.map +1 -1
- package/lib/component/1d/ranges/RangesIntegrals.js +1 -1
- package/lib/component/1d/ranges/useAssignmentsPopoverActionsButtons.d.ts +1 -1
- package/lib/component/1d/ranges/useAssignmentsPopoverActionsButtons.d.ts.map +1 -1
- package/lib/component/1d/ranges/useAssignmentsPopoverActionsButtons.js +4 -4
- package/lib/component/1d/ranges/useAssignmentsPopoverActionsButtons.js.map +1 -1
- package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.d.ts.map +1 -1
- package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.js +14 -5
- package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.js.map +1 -1
- package/lib/component/1d-2d/components/SpectrumInfoBlock.d.ts.map +1 -1
- package/lib/component/1d-2d/components/SpectrumInfoBlock.js +2 -2
- package/lib/component/1d-2d/components/SpectrumInfoBlock.js.map +1 -1
- package/lib/component/2d/FooterBanner.d.ts +1 -1
- package/lib/component/2d/SVGContent2D.d.ts +1 -1
- package/lib/component/2d/YAxis.js +3 -3
- package/lib/component/2d/YAxis.js.map +1 -1
- package/lib/component/2d/ft/FTContainer.d.ts +1 -1
- package/lib/component/2d/tools/XYLabelPointer.d.ts +1 -1
- package/lib/component/2d/useTracesSpectra.js +1 -1
- package/lib/component/2d/zones/SignalsGuideLines.js +5 -5
- package/lib/component/2d/zones/SignalsGuideLines.js.map +1 -1
- package/lib/component/2d/zones/Zone.js +1 -1
- package/lib/component/2d/zones/Zone.js.map +1 -1
- package/lib/component/EventsTrackers/BrushTracker.d.ts +1 -1
- package/lib/component/EventsTrackers/BrushTracker.d.ts.map +1 -1
- package/lib/component/EventsTrackers/KeysListenerTracker.d.ts.map +1 -1
- package/lib/component/EventsTrackers/KeysListenerTracker.js +9 -3
- package/lib/component/EventsTrackers/KeysListenerTracker.js.map +1 -1
- package/lib/component/context/LoggerContext.d.ts +1 -0
- package/lib/component/context/LoggerContext.d.ts.map +1 -1
- package/lib/component/context/LoggerContext.js.map +1 -1
- package/lib/component/context/PreferencesContext.d.ts +1 -1
- package/lib/component/context/PreferencesContext.d.ts.map +1 -1
- package/lib/component/elements/ActionsButtonsPopover.d.ts +9 -5
- package/lib/component/elements/ActionsButtonsPopover.d.ts.map +1 -1
- package/lib/component/elements/ActionsButtonsPopover.js +42 -10
- package/lib/component/elements/ActionsButtonsPopover.js.map +1 -1
- package/lib/component/elements/Alert.d.ts.map +1 -1
- package/lib/component/elements/Alert.js +3 -2
- package/lib/component/elements/Alert.js.map +1 -1
- package/lib/component/elements/DraggableDialog.d.ts +1 -1
- package/lib/component/elements/DraggableDialog.d.ts.map +1 -1
- package/lib/component/elements/NextPrev.d.ts.map +1 -1
- package/lib/component/elements/NextPrev.js +23 -4
- package/lib/component/elements/NextPrev.js.map +1 -1
- package/lib/component/elements/StandardDialog.d.ts +3 -0
- package/lib/component/elements/StandardDialog.d.ts.map +1 -0
- package/lib/component/elements/StandardDialog.js +7 -0
- package/lib/component/elements/StandardDialog.js.map +1 -0
- package/lib/component/elements/ToolbarPopoverItem.d.ts +7 -2
- package/lib/component/elements/ToolbarPopoverItem.d.ts.map +1 -1
- package/lib/component/elements/ToolbarPopoverItem.js +6 -2
- package/lib/component/elements/ToolbarPopoverItem.js.map +1 -1
- package/lib/component/elements/export/ExportManager.js +1 -1
- package/lib/component/elements/export/ExportManager.js.map +1 -1
- package/lib/component/elements/export/ExportOptionsModal.js +3 -2
- package/lib/component/elements/export/ExportOptionsModal.js.map +1 -1
- package/lib/component/elements/export/utilities/exportOptionValidationSchema.d.ts +1 -1
- package/lib/component/elements/print/PrintContent.d.ts.map +1 -1
- package/lib/component/elements/print/PrintContent.js +3 -2
- package/lib/component/elements/print/PrintContent.js.map +1 -1
- package/lib/component/header/Header.js +1 -1
- package/lib/component/header/Header.js.map +1 -1
- package/lib/component/hooks/useActiveNucleusTab.js +1 -1
- package/lib/component/hooks/useActiveNucleusTab.js.map +1 -1
- package/lib/component/hooks/useActiveSpectrumRangesViewState.js +1 -1
- package/lib/component/hooks/useDatumWithSpectraStatistics.js +1 -1
- package/lib/component/hooks/useDatumWithSpectraStatistics.js.map +1 -1
- package/lib/component/hooks/useExport.d.ts +7 -7
- package/lib/component/hooks/useExport.d.ts.map +1 -1
- package/lib/component/hooks/useExport.js +23 -43
- package/lib/component/hooks/useExport.js.map +1 -1
- package/lib/component/hooks/useSVGUnitConverter.d.ts.map +1 -1
- package/lib/component/hooks/useSVGUnitConverter.js +12 -9
- package/lib/component/hooks/useSVGUnitConverter.js.map +1 -1
- package/lib/component/hooks/useSaveSettings.d.ts.map +1 -1
- package/lib/component/hooks/useSaveSettings.js +3 -2
- package/lib/component/hooks/useSaveSettings.js.map +1 -1
- package/lib/component/hooks/useSetActiveSpectrumAction.d.ts.map +1 -1
- package/lib/component/hooks/useSetActiveSpectrumAction.js +3 -1
- package/lib/component/hooks/useSetActiveSpectrumAction.js.map +1 -1
- package/lib/component/hooks/useTextMetrics.d.ts +16 -1
- package/lib/component/hooks/useTextMetrics.d.ts.map +1 -1
- package/lib/component/hooks/useTextMetrics.js +43 -15
- package/lib/component/hooks/useTextMetrics.js.map +1 -1
- package/lib/component/hooks/useToggleSpectraVisibility.js +1 -1
- package/lib/component/hooks/use_acs_settings.d.ts +4 -0
- package/lib/component/hooks/use_acs_settings.d.ts.map +1 -0
- package/lib/component/hooks/use_acs_settings.js +21 -0
- package/lib/component/hooks/use_acs_settings.js.map +1 -0
- package/lib/component/hooks/use_publication_strings.d.ts +9 -0
- package/lib/component/hooks/use_publication_strings.d.ts.map +1 -0
- package/lib/component/hooks/use_publication_strings.js +42 -0
- package/lib/component/hooks/use_publication_strings.js.map +1 -0
- package/lib/component/loader/useLoadFiles.d.ts.map +1 -1
- package/lib/component/loader/useLoadFiles.js +81 -86
- package/lib/component/loader/useLoadFiles.js.map +1 -1
- package/lib/component/main/ErrorOverlay.d.ts.map +1 -1
- package/lib/component/main/ErrorOverlay.js +6 -1
- package/lib/component/main/ErrorOverlay.js.map +1 -1
- package/lib/component/main/InnerNMRiumContents.d.ts.map +1 -1
- package/lib/component/main/InnerNMRiumContents.js +1 -2
- package/lib/component/main/InnerNMRiumContents.js.map +1 -1
- package/lib/component/main/NMRiumViewer.js +2 -2
- package/lib/component/main/NMRiumViewer.js.map +1 -1
- package/lib/component/main/NMRiumViewerWrapper.d.ts.map +1 -1
- package/lib/component/main/NMRiumViewerWrapper.js +9 -3
- package/lib/component/main/NMRiumViewerWrapper.js.map +1 -1
- package/lib/component/modal/AboutPredictionModal.js +2 -2
- package/lib/component/modal/AboutPredictionModal.js.map +1 -1
- package/lib/component/modal/AboutSpectrumSimulationModal.js +2 -2
- package/lib/component/modal/AboutSpectrumSimulationModal.js.map +1 -1
- package/lib/component/modal/EditPeakShapeModal.d.ts.map +1 -1
- package/lib/component/modal/EditPeakShapeModal.js +4 -3
- package/lib/component/modal/EditPeakShapeModal.js.map +1 -1
- package/lib/component/modal/ExportAsJcampModal.d.ts.map +1 -1
- package/lib/component/modal/ExportAsJcampModal.js +3 -2
- package/lib/component/modal/ExportAsJcampModal.js.map +1 -1
- package/lib/component/modal/ImportPublicationStringModal.d.ts.map +1 -1
- package/lib/component/modal/ImportPublicationStringModal.js +3 -2
- package/lib/component/modal/ImportPublicationStringModal.js.map +1 -1
- package/lib/component/modal/LoadJCAMPModal.d.ts.map +1 -1
- package/lib/component/modal/LoadJCAMPModal.js +3 -2
- package/lib/component/modal/LoadJCAMPModal.js.map +1 -1
- package/lib/component/modal/LogsHistoryModal.d.ts.map +1 -1
- package/lib/component/modal/LogsHistoryModal.js +3 -2
- package/lib/component/modal/LogsHistoryModal.js.map +1 -1
- package/lib/component/modal/MoleculeAutoLabelsDatabaseModal.d.ts +6 -0
- package/lib/component/modal/MoleculeAutoLabelsDatabaseModal.d.ts.map +1 -0
- package/lib/component/modal/MoleculeAutoLabelsDatabaseModal.js +128 -0
- package/lib/component/modal/MoleculeAutoLabelsDatabaseModal.js.map +1 -0
- package/lib/component/modal/MoleculeStructureEditorModal.d.ts.map +1 -1
- package/lib/component/modal/MoleculeStructureEditorModal.js +4 -3
- package/lib/component/modal/MoleculeStructureEditorModal.js.map +1 -1
- package/lib/component/modal/MultipletAnalysisModal.d.ts.map +1 -1
- package/lib/component/modal/MultipletAnalysisModal.js +2 -2
- package/lib/component/modal/MultipletAnalysisModal.js.map +1 -1
- package/lib/component/modal/PredictSpectraModal.d.ts.map +1 -1
- package/lib/component/modal/PredictSpectraModal.js +3 -2
- package/lib/component/modal/PredictSpectraModal.js.map +1 -1
- package/lib/component/modal/PublicationStringModal.d.ts +10 -1
- package/lib/component/modal/PublicationStringModal.d.ts.map +1 -1
- package/lib/component/modal/PublicationStringModal.js +89 -77
- package/lib/component/modal/PublicationStringModal.js.map +1 -1
- package/lib/component/modal/SaveAsModal.d.ts.map +1 -1
- package/lib/component/modal/SaveAsModal.js +6 -9
- package/lib/component/modal/SaveAsModal.js.map +1 -1
- package/lib/component/modal/aboutUs/AboutUsModal.js +2 -2
- package/lib/component/modal/aboutUs/AboutUsModal.js.map +1 -1
- package/lib/component/modal/changeSum/ChangeSumModal.d.ts.map +1 -1
- package/lib/component/modal/changeSum/ChangeSumModal.js +2 -2
- package/lib/component/modal/changeSum/ChangeSumModal.js.map +1 -1
- package/lib/component/modal/changeSum/SelectMolecule.js +4 -1
- package/lib/component/modal/changeSum/SelectMolecule.js.map +1 -1
- package/lib/component/modal/editRange/EditRangeModal.js +1 -1
- package/lib/component/modal/editRange/forms/components/NewSignalTab.js +1 -1
- package/lib/component/modal/metaImportation/MetaImportationModal.d.ts.map +1 -1
- package/lib/component/modal/metaImportation/MetaImportationModal.js +3 -2
- package/lib/component/modal/metaImportation/MetaImportationModal.js.map +1 -1
- package/lib/component/modal/setting/{GeneralSettings.d.ts → general_settings.d.ts} +1 -1
- package/lib/component/modal/setting/general_settings.d.ts.map +1 -0
- package/lib/component/modal/setting/{GeneralSettings.js → general_settings.js} +11 -5
- package/lib/component/modal/setting/general_settings.js.map +1 -0
- package/lib/component/modal/setting/settings-tabs/DatabasesTabContent.js +1 -1
- package/lib/component/modal/setting/settings-tabs/DatabasesTabContent.js.map +1 -1
- package/lib/component/modal/setting/settings-tabs/DisplayTabContent.js +1 -1
- package/lib/component/modal/setting/settings-tabs/DisplayTabContent.js.map +1 -1
- package/lib/component/modal/setting/settings-tabs/ExternalAPIsTabContent.js +1 -1
- package/lib/component/modal/setting/settings-tabs/ExternalAPIsTabContent.js.map +1 -1
- package/lib/component/modal/setting/settings-tabs/GeneralTabContent.js +1 -1
- package/lib/component/modal/setting/settings-tabs/GeneralTabContent.js.map +1 -1
- package/lib/component/modal/setting/settings-tabs/InfoBlockTabContent.js +1 -1
- package/lib/component/modal/setting/settings-tabs/InfoBlockTabContent.js.map +1 -1
- package/lib/component/modal/setting/settings-tabs/NucleiTabContent.js +1 -1
- package/lib/component/modal/setting/settings-tabs/NucleiTabContent.js.map +1 -1
- package/lib/component/modal/setting/settings-tabs/OnLoadProcessingTabContent.js +1 -1
- package/lib/component/modal/setting/settings-tabs/OnLoadProcessingTabContent.js.map +1 -1
- package/lib/component/modal/setting/settings-tabs/SpectraColorsTabContent.js +1 -1
- package/lib/component/modal/setting/settings-tabs/SpectraColorsTabContent.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/general_settings.d.ts +8 -0
- package/lib/component/modal/setting/tanstack_general_settings/general_settings.d.ts.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/general_settings.js +65 -0
- package/lib/component/modal/setting/tanstack_general_settings/general_settings.js.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.d.ts +624 -0
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.d.ts.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.js +42 -0
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.js.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_footer.d.ts +624 -0
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_footer.d.ts.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_footer.js +22 -0
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_footer.js.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.d.ts +7 -0
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.d.ts.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.js +50 -0
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.js.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header_actions_buttons.d.ts +7 -0
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header_actions_buttons.d.ts.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header_actions_buttons.js +105 -0
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header_actions_buttons.js.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.d.ts +622 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.d.ts.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.fields.d.ts +55 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.fields.d.ts.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.fields.js +123 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.fields.js.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.js +11 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.js.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/general_tab.d.ts +622 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/general_tab.d.ts.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/general_tab.js +34 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/general_tab.js.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/import_filters_tab.d.ts +622 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/import_filters_tab.d.ts.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/import_filters_tab.js +26 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/import_filters_tab.js.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/nuclei_tab.d.ts +622 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/nuclei_tab.d.ts.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/nuclei_tab.js +123 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/nuclei_tab.js.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/panels_tab.d.ts +622 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/panels_tab.d.ts.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/panels_tab.js +40 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/panels_tab.js.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/utils/checkUniqueByKey.d.ts +10 -0
- package/lib/component/modal/setting/tanstack_general_settings/utils/checkUniqueByKey.d.ts.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/utils/checkUniqueByKey.js +40 -0
- package/lib/component/modal/setting/tanstack_general_settings/utils/checkUniqueByKey.js.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/export_tab_validation.d.ts +166 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/export_tab_validation.d.ts.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/export_tab_validation.js +58 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/export_tab_validation.js.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/general_tab_validation.d.ts +40 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/general_tab_validation.d.ts.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/general_tab_validation.js +37 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/general_tab_validation.js.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/import_filters_tab_validation.d.ts +37 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/import_filters_tab_validation.d.ts.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/import_filters_tab_validation.js +26 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/import_filters_tab_validation.js.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/nuclei_tab_validation.d.ts +9 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/nuclei_tab_validation.d.ts.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/nuclei_tab_validation.js +18 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/nuclei_tab_validation.js.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/panels_tab_validation.d.ts +167 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/panels_tab_validation.d.ts.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/panels_tab_validation.js +69 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/panels_tab_validation.js.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation.d.ts +342 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation.d.ts.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation.js +51 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation.js.map +1 -0
- package/lib/component/panels/MoleculesPanel/MoleculeOptionsPanel.js +2 -2
- package/lib/component/panels/MoleculesPanel/MoleculeOptionsPanel.js.map +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculePanel.js +2 -2
- package/lib/component/panels/MoleculesPanel/MoleculePanel.js.map +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.d.ts.map +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +75 -20
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js.map +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculeStructure.d.ts +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculeStructure.js +4 -4
- package/lib/component/panels/MoleculesPanel/MoleculeStructure.js.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/hooks/useExtractAtomAssignmentLabel.js +1 -1
- package/lib/component/panels/MoleculesPanel/hooks/useExtractAtomAssignmentLabel.js.map +1 -1
- package/lib/component/panels/MoleculesPanel/utilities/extractFromAtom.d.ts +1 -1
- package/lib/component/panels/MoleculesPanel/utilities/getAssignIds.js +1 -1
- package/lib/component/panels/MoleculesPanel/utilities/getCurrentDiaIDsToHighlight.d.ts +1 -1
- package/lib/component/panels/MoleculesPanel/utilities/getHighlightsOnHover.d.ts +1 -1
- package/lib/component/panels/MoleculesPanel/utilities/getHighlightsOnHover.d.ts.map +1 -1
- package/lib/component/panels/MoleculesPanel/utilities/getHighlightsOnHover.js +1 -1
- package/lib/component/panels/MoleculesPanel/utilities/getHighlightsOnHover.js.map +1 -1
- package/lib/component/panels/MoleculesPanel/utilities/getUniqueDiaIDs.d.ts +1 -1
- package/lib/component/panels/Panels.d.ts +0 -9
- package/lib/component/panels/Panels.d.ts.map +1 -1
- package/lib/component/panels/Panels.js +13 -54
- package/lib/component/panels/Panels.js.map +1 -1
- package/lib/component/panels/RangesPanel/RangesHeader.d.ts.map +1 -1
- package/lib/component/panels/RangesPanel/RangesHeader.js +23 -15
- package/lib/component/panels/RangesPanel/RangesHeader.js.map +1 -1
- package/lib/component/panels/RangesPanel/RangesTableRow.js +1 -1
- package/lib/component/panels/RangesPanel/RangesTableRow.js.map +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentColumn.d.ts +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentColumn.d.ts.map +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentColumn.js +2 -2
- package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentColumn.js.map +1 -1
- package/lib/component/panels/SpectraPanel/SpectraTable.js +1 -1
- package/lib/component/panels/SummaryPanel/SetMolecularFormulaModal.d.ts.map +1 -1
- package/lib/component/panels/SummaryPanel/SetMolecularFormulaModal.js +3 -2
- package/lib/component/panels/SummaryPanel/SetMolecularFormulaModal.js.map +1 -1
- package/lib/component/panels/SummaryPanel/SetShiftTolerancesModal.d.ts.map +1 -1
- package/lib/component/panels/SummaryPanel/SetShiftTolerancesModal.js +3 -2
- package/lib/component/panels/SummaryPanel/SetShiftTolerancesModal.js.map +1 -1
- package/lib/component/panels/databasePanel/DatabaseInfo.js +1 -1
- package/lib/component/panels/databasePanel/DatabasePanel.js +1 -1
- package/lib/component/panels/databasePanel/DatabaseStructureSearchModal.js +2 -2
- package/lib/component/panels/databasePanel/DatabaseStructureSearchModal.js.map +1 -1
- package/lib/component/panels/databasePanel/DatabaseTable.js +1 -1
- package/lib/component/panels/databasePanel/DatabaseTable.js.map +1 -1
- package/lib/component/panels/filtersPanel/Filters/FiltersSectionsPanel.d.ts +1 -1
- package/lib/component/panels/filtersPanel/Filters/FiltersSectionsPanel.d.ts.map +1 -1
- package/lib/component/panels/filtersPanel/Filters/FiltersSectionsPanel.js +1 -1
- package/lib/component/panels/header/DefaultPanelHeader.d.ts.map +1 -1
- package/lib/component/panels/header/DefaultPanelHeader.js +2 -1
- package/lib/component/panels/header/DefaultPanelHeader.js.map +1 -1
- package/lib/component/panels/hooks/useMoleculeAnnotationCore.js +1 -1
- package/lib/component/panels/hooks/useMoleculeAnnotationCore.js.map +1 -1
- package/lib/component/panels/hooks/useTogglePanel.d.ts.map +1 -1
- package/lib/component/panels/hooks/useTogglePanel.js +4 -3
- package/lib/component/panels/hooks/useTogglePanel.js.map +1 -1
- package/lib/component/panels/informationPanel/InformationEditionModal.d.ts.map +1 -1
- package/lib/component/panels/informationPanel/InformationEditionModal.js +3 -2
- package/lib/component/panels/informationPanel/InformationEditionModal.js.map +1 -1
- package/lib/component/panels/informationPanel/InformationPanel.d.ts.map +1 -1
- package/lib/component/panels/informationPanel/InformationPanel.js +38 -3
- package/lib/component/panels/informationPanel/InformationPanel.js.map +1 -1
- package/lib/component/reducer/actions/AssignmentsActions.js +3 -3
- package/lib/component/reducer/actions/CorrelationsActions.js +2 -2
- package/lib/component/reducer/actions/DatabaseActions.js +1 -1
- package/lib/component/reducer/actions/DomainActions.js +1 -1
- package/lib/component/reducer/actions/InsetActions.js +2 -2
- package/lib/component/reducer/actions/LoadAction.d.ts.map +1 -1
- package/lib/component/reducer/actions/LoadAction.js +8 -2
- package/lib/component/reducer/actions/LoadAction.js.map +1 -1
- package/lib/component/reducer/actions/MoleculeActions.d.ts +23 -1
- package/lib/component/reducer/actions/MoleculeActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/MoleculeActions.js +5 -5
- package/lib/component/reducer/actions/MoleculeActions.js.map +1 -1
- package/lib/component/reducer/actions/PreferencesActions.js +1 -1
- package/lib/component/reducer/actions/RangesActions.d.ts +1 -1
- package/lib/component/reducer/actions/RangesActions.js +2 -2
- package/lib/component/reducer/actions/RangesActions.js.map +1 -1
- package/lib/component/reducer/actions/SpectraActions.d.ts +2 -1
- package/lib/component/reducer/actions/SpectraActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/SpectraActions.js +3 -3
- package/lib/component/reducer/actions/SpectraActions.js.map +1 -1
- package/lib/component/reducer/actions/ToolsActions.js +2 -2
- package/lib/component/reducer/actions/ZonesActions.d.ts +1 -1
- package/lib/component/reducer/actions/ZonesActions.js +2 -2
- package/lib/component/reducer/helper/get2DRange.d.ts +1 -1
- package/lib/component/reducer/preferences/actions/analyzeSpectra.d.ts +2 -1
- package/lib/component/reducer/preferences/actions/analyzeSpectra.d.ts.map +1 -1
- package/lib/component/reducer/preferences/actions/analyzeSpectra.js +10 -0
- package/lib/component/reducer/preferences/actions/analyzeSpectra.js.map +1 -1
- package/lib/component/reducer/preferences/actions/toggleOpenSplitPanel.d.ts +4 -0
- package/lib/component/reducer/preferences/actions/toggleOpenSplitPanel.d.ts.map +1 -0
- package/lib/component/reducer/preferences/actions/toggleOpenSplitPanel.js +9 -0
- package/lib/component/reducer/preferences/actions/toggleOpenSplitPanel.js.map +1 -0
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js +1 -1
- package/lib/component/reducer/preferences/preferencesReducer.d.ts +8 -1
- package/lib/component/reducer/preferences/preferencesReducer.d.ts.map +1 -1
- package/lib/component/reducer/preferences/preferencesReducer.js +8 -3
- package/lib/component/reducer/preferences/preferencesReducer.js.map +1 -1
- package/lib/component/toolbar/ToolBar.d.ts.map +1 -1
- package/lib/component/toolbar/ToolBar.js +11 -8
- package/lib/component/toolbar/ToolBar.js.map +1 -1
- package/lib/component/toolbar/toolbarMenu.d.ts +5 -1
- package/lib/component/toolbar/toolbarMenu.d.ts.map +1 -1
- package/lib/component/toolbar/toolbarMenu.js +1 -1
- package/lib/component/toolbar/toolbarMenu.js.map +1 -1
- package/lib/component/utility/export.d.ts +2 -1
- package/lib/component/utility/export.d.ts.map +1 -1
- package/lib/component/utility/export.js +6 -2
- package/lib/component/utility/export.js.map +1 -1
- package/lib/component/workspaces/workspaceDefaultProperties.d.ts.map +1 -1
- package/lib/component/workspaces/workspaceDefaultProperties.js +3 -0
- package/lib/component/workspaces/workspaceDefaultProperties.js.map +1 -1
- package/lib/data/PredictionManager.js +1 -1
- package/lib/data/SpectraManager.d.ts +1 -1
- package/lib/data/SpectraManager.d.ts.map +1 -1
- package/lib/data/SpectraManager.js +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/autoRangesDetection.js +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectRanges.js +1 -1
- package/lib/data/data1d/multipleSpectraAnalysis.d.ts +1 -0
- package/lib/data/data1d/multipleSpectraAnalysis.d.ts.map +1 -1
- package/lib/data/data1d/multipleSpectraAnalysis.js +14 -0
- package/lib/data/data1d/multipleSpectraAnalysis.js.map +1 -1
- package/lib/data/data2d/Spectrum2D/contours.d.ts.map +1 -1
- package/lib/data/data2d/Spectrum2D/contours.js +13 -6
- package/lib/data/data2d/Spectrum2D/contours.js.map +1 -1
- package/lib/data/molecules/MoleculeManager.d.ts +6 -1
- package/lib/data/molecules/MoleculeManager.d.ts.map +1 -1
- package/lib/data/molecules/MoleculeManager.js +3 -2
- package/lib/data/molecules/MoleculeManager.js.map +1 -1
- package/lib/data/utilities/FindUtilities.js +2 -2
- package/lib/utils/clipboard/clipboardComponents.js +2 -2
- package/lib/utils/clipboard/clipboardComponents.js.map +1 -1
- package/lib/versionInfo.js +1 -1
- package/package.json +45 -45
- package/src/component/1d/BrushTracker1D.tsx +8 -0
- package/src/component/1d/FloatPublicationString.tsx +275 -177
- package/src/component/1d/FloatingRanges.tsx +1 -3
- package/src/component/1d/SVGContent1D.tsx +1 -1
- package/src/component/1d/inset/DraggableInset.tsx +2 -4
- package/src/component/1d/integral/IntegralResizable.tsx +1 -1
- package/src/component/1d/matrix/Boxplot.tsx +1 -1
- package/src/component/1d/matrix/Stocsy.tsx +1 -1
- package/src/component/1d/multiAnalysis/AnalysisRange.tsx +1 -1
- package/src/component/1d/multiplicityTree/MultiplicityTree.tsx +2 -2
- package/src/component/1d/peaks/PeakAnnotations.tsx +2 -2
- package/src/component/1d/peaks/PeakAnnotationsSpreadMode.tsx +2 -2
- package/src/component/1d/peaks/Peaks.tsx +2 -2
- package/src/component/1d/ranges/Range.tsx +5 -5
- package/src/component/1d/ranges/Ranges.tsx +2 -2
- package/src/component/1d/ranges/RangesIntegrals.tsx +1 -1
- package/src/component/1d/ranges/useAssignmentsPopoverActionsButtons.tsx +5 -5
- package/src/component/1d/tool/BaseLineZones.tsx +1 -1
- package/src/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.tsx +14 -6
- package/src/component/1d-2d/components/SpectrumInfoBlock.tsx +1 -2
- package/src/component/2d/FooterBanner.tsx +1 -1
- package/src/component/2d/SVGContent2D.tsx +1 -1
- package/src/component/2d/YAxis.tsx +3 -3
- package/src/component/2d/ft/FTContainer.tsx +1 -1
- package/src/component/2d/tools/XYLabelPointer.tsx +1 -1
- package/src/component/2d/useTracesSpectra.ts +1 -1
- package/src/component/2d/zones/SignalsGuideLines.tsx +5 -5
- package/src/component/2d/zones/Zone.tsx +1 -1
- package/src/component/EventsTrackers/BrushTracker.tsx +1 -1
- package/src/component/EventsTrackers/KeysListenerTracker.tsx +9 -3
- package/src/component/context/LoggerContext.tsx +9 -0
- package/src/component/context/PreferencesContext.tsx +1 -1
- package/src/component/elements/ActionsButtonsPopover.tsx +80 -24
- package/src/component/elements/Alert.tsx +4 -2
- package/src/component/elements/DraggableDialog.tsx +2 -2
- package/src/component/elements/NextPrev.tsx +28 -4
- package/src/component/elements/StandardDialog.tsx +11 -0
- package/src/component/elements/ToolbarPopoverItem.tsx +16 -3
- package/src/component/elements/export/ExportManager.tsx +1 -1
- package/src/component/elements/export/ExportOptionsModal.tsx +3 -3
- package/src/component/elements/print/PrintContent.tsx +4 -9
- package/src/component/header/Header.tsx +1 -1
- package/src/component/hooks/useActiveNucleusTab.ts +1 -1
- package/src/component/hooks/useActiveSpectrumRangesViewState.ts +1 -1
- package/src/component/hooks/useDatumWithSpectraStatistics.ts +1 -1
- package/src/component/hooks/useExport.tsx +36 -66
- package/src/component/hooks/useSVGUnitConverter.ts +13 -9
- package/src/component/hooks/useSaveSettings.tsx +4 -3
- package/src/component/hooks/useSetActiveSpectrumAction.ts +3 -2
- package/src/component/hooks/useTextMetrics.ts +66 -18
- package/src/component/hooks/useToggleSpectraVisibility.tsx +1 -1
- package/src/component/hooks/use_acs_settings.ts +27 -0
- package/src/component/hooks/use_publication_strings.ts +67 -0
- package/src/component/loader/useLoadFiles.ts +134 -111
- package/src/component/main/ErrorOverlay.tsx +11 -2
- package/src/component/main/InnerNMRiumContents.tsx +6 -9
- package/src/component/main/NMRiumViewer.tsx +3 -3
- package/src/component/main/NMRiumViewerWrapper.tsx +12 -6
- package/src/component/modal/AboutPredictionModal.tsx +3 -3
- package/src/component/modal/AboutSpectrumSimulationModal.tsx +3 -3
- package/src/component/modal/EditPeakShapeModal.tsx +5 -4
- package/src/component/modal/ExportAsJcampModal.tsx +4 -3
- package/src/component/modal/ImportPublicationStringModal.tsx +4 -3
- package/src/component/modal/LoadJCAMPModal.tsx +4 -3
- package/src/component/modal/LogsHistoryModal.tsx +4 -3
- package/src/component/modal/MoleculeAutoLabelsDatabaseModal.tsx +220 -0
- package/src/component/modal/MoleculeStructureEditorModal.tsx +9 -4
- package/src/component/modal/MultipletAnalysisModal.tsx +3 -3
- package/src/component/modal/PredictSpectraModal.tsx +4 -3
- package/src/component/modal/PublicationStringModal.tsx +234 -134
- package/src/component/modal/SaveAsModal.tsx +18 -50
- package/src/component/modal/aboutUs/AboutUsModal.tsx +3 -3
- package/src/component/modal/changeSum/ChangeSumModal.tsx +5 -4
- package/src/component/modal/changeSum/SelectMolecule.tsx +23 -23
- package/src/component/modal/editRange/EditRangeModal.tsx +1 -1
- package/src/component/modal/editRange/forms/components/NewSignalTab.tsx +1 -1
- package/src/component/modal/metaImportation/MetaImportationModal.tsx +4 -3
- package/src/component/modal/setting/{GeneralSettings.tsx → general_settings.tsx} +34 -4
- package/src/component/modal/setting/settings-tabs/DatabasesTabContent.tsx +1 -1
- package/src/component/modal/setting/settings-tabs/DisplayTabContent.tsx +1 -1
- package/src/component/modal/setting/settings-tabs/ExternalAPIsTabContent.tsx +1 -1
- package/src/component/modal/setting/settings-tabs/GeneralTabContent.tsx +1 -1
- package/src/component/modal/setting/settings-tabs/InfoBlockTabContent.tsx +1 -1
- package/src/component/modal/setting/settings-tabs/NucleiTabContent.tsx +1 -1
- package/src/component/modal/setting/settings-tabs/OnLoadProcessingTabContent.tsx +1 -1
- package/src/component/modal/setting/settings-tabs/SpectraColorsTabContent.tsx +1 -1
- package/src/component/modal/setting/tanstack_general_settings/general_settings.tsx +106 -0
- package/src/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.tsx +69 -0
- package/src/component/modal/setting/tanstack_general_settings/general_settings_dialog_footer.tsx +39 -0
- package/src/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.tsx +98 -0
- package/src/component/modal/setting/tanstack_general_settings/general_settings_dialog_header_actions_buttons.tsx +218 -0
- package/src/component/modal/setting/tanstack_general_settings/tabs/export_tab.fields.tsx +231 -0
- package/src/component/modal/setting/tanstack_general_settings/tabs/export_tab.tsx +24 -0
- package/src/component/modal/setting/tanstack_general_settings/tabs/general_tab.tsx +94 -0
- package/src/component/modal/setting/tanstack_general_settings/tabs/import_filters_tab.tsx +72 -0
- package/src/component/modal/setting/tanstack_general_settings/tabs/nuclei_tab.tsx +261 -0
- package/src/component/modal/setting/tanstack_general_settings/tabs/panels_tab.tsx +150 -0
- package/src/component/modal/setting/tanstack_general_settings/utils/checkUniqueByKey.ts +55 -0
- package/src/component/modal/setting/tanstack_general_settings/validation/export_tab_validation.ts +63 -0
- package/src/component/modal/setting/tanstack_general_settings/validation/general_tab_validation.ts +42 -0
- package/src/component/modal/setting/tanstack_general_settings/validation/import_filters_tab_validation.ts +26 -0
- package/src/component/modal/setting/tanstack_general_settings/validation/nuclei_tab_validation.ts +21 -0
- package/src/component/modal/setting/tanstack_general_settings/validation/panels_tab_validation.ts +80 -0
- package/src/component/modal/setting/tanstack_general_settings/validation.ts +66 -0
- package/src/component/panels/MoleculesPanel/MoleculeOptionsPanel.tsx +2 -2
- package/src/component/panels/MoleculesPanel/MoleculePanel.tsx +2 -2
- package/src/component/panels/MoleculesPanel/MoleculePanelHeader.tsx +106 -21
- package/src/component/panels/MoleculesPanel/MoleculeStructure.tsx +5 -5
- package/src/component/panels/MoleculesPanel/hooks/useAtomAssignment.tsx +21 -21
- package/src/component/panels/MoleculesPanel/hooks/useExtractAtomAssignmentLabel.ts +1 -1
- package/src/component/panels/MoleculesPanel/utilities/extractFromAtom.ts +1 -1
- package/src/component/panels/MoleculesPanel/utilities/getAssignIds.ts +1 -1
- package/src/component/panels/MoleculesPanel/utilities/getCurrentDiaIDsToHighlight.ts +1 -1
- package/src/component/panels/MoleculesPanel/utilities/getHighlightsOnHover.ts +2 -2
- package/src/component/panels/MoleculesPanel/utilities/getUniqueDiaIDs.ts +1 -1
- package/src/component/panels/Panels.tsx +5 -93
- package/src/component/panels/RangesPanel/RangesHeader.tsx +34 -29
- package/src/component/panels/RangesPanel/RangesTableRow.tsx +1 -1
- package/src/component/panels/RangesPanel/TableColumns/SignalAssignmentColumn.tsx +3 -3
- package/src/component/panels/SpectraPanel/SpectraTable.tsx +1 -1
- package/src/component/panels/SummaryPanel/SetMolecularFormulaModal.tsx +4 -3
- package/src/component/panels/SummaryPanel/SetShiftTolerancesModal.tsx +4 -3
- package/src/component/panels/databasePanel/DatabaseInfo.tsx +1 -1
- package/src/component/panels/databasePanel/DatabasePanel.tsx +1 -1
- package/src/component/panels/databasePanel/DatabaseStructureSearchModal.tsx +3 -3
- package/src/component/panels/databasePanel/DatabaseTable.tsx +1 -1
- package/src/component/panels/filtersPanel/Filters/FiltersSectionsPanel.tsx +1 -1
- package/src/component/panels/header/DefaultPanelHeader.tsx +2 -1
- package/src/component/panels/hooks/useMoleculeAnnotationCore.ts +1 -1
- package/src/component/panels/hooks/useTogglePanel.ts +4 -3
- package/src/component/panels/informationPanel/InformationEditionModal.tsx +4 -3
- package/src/component/panels/informationPanel/InformationPanel.tsx +83 -2
- package/src/component/reducer/actions/AssignmentsActions.ts +3 -3
- package/src/component/reducer/actions/CorrelationsActions.ts +2 -2
- package/src/component/reducer/actions/DatabaseActions.ts +1 -1
- package/src/component/reducer/actions/DomainActions.ts +1 -1
- package/src/component/reducer/actions/InsetActions.ts +2 -2
- package/src/component/reducer/actions/LoadAction.ts +17 -3
- package/src/component/reducer/actions/MoleculeActions.ts +7 -5
- package/src/component/reducer/actions/PreferencesActions.ts +1 -1
- package/src/component/reducer/actions/RangesActions.ts +4 -4
- package/src/component/reducer/actions/SpectraActions.ts +7 -3
- package/src/component/reducer/actions/ToolsActions.ts +2 -2
- package/src/component/reducer/actions/ZonesActions.ts +3 -3
- package/src/component/reducer/helper/get2DRange.ts +1 -1
- package/src/component/reducer/preferences/actions/analyzeSpectra.ts +16 -0
- package/src/component/reducer/preferences/actions/toggleOpenSplitPanel.ts +18 -0
- package/src/component/reducer/preferences/panelsPreferencesDefaultValues.ts +1 -1
- package/src/component/reducer/preferences/preferencesReducer.ts +24 -3
- package/src/component/toolbar/ToolBar.tsx +15 -10
- package/src/component/toolbar/toolbarMenu.tsx +13 -2
- package/src/component/utility/export.ts +7 -1
- package/src/component/workspaces/workspaceDefaultProperties.ts +5 -1
- package/src/data/PredictionManager.ts +1 -1
- package/src/data/SpectraManager.ts +2 -2
- package/src/data/data1d/Spectrum1D/ranges/autoRangesDetection.ts +1 -1
- package/src/data/data1d/Spectrum1D/ranges/detectRanges.ts +1 -1
- package/src/data/data1d/multipleSpectraAnalysis.ts +20 -0
- package/src/data/data2d/Spectrum2D/contours.ts +16 -6
- package/src/data/molecules/MoleculeManager.ts +7 -2
- package/src/data/utilities/FindUtilities.ts +2 -2
- package/src/utils/clipboard/clipboardComponents.tsx +3 -3
- package/src/versionInfo.ts +1 -1
- package/lib/component/modal/setting/GeneralSettings.d.ts.map +0 -1
- package/lib/component/modal/setting/GeneralSettings.js.map +0 -1
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import styled from '@emotion/styled';
|
|
2
|
-
import type { BoundingBox } from '@zakodium/nmrium-core';
|
|
3
|
-
import {
|
|
4
|
-
import { useEffect, useState } from 'react';
|
|
2
|
+
import type { BoundingBox, Spectrum, TextStyle } from '@zakodium/nmrium-core';
|
|
3
|
+
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
5
4
|
import { BsArrowsMove } from 'react-icons/bs';
|
|
6
|
-
import { FaTimes } from 'react-icons/fa';
|
|
5
|
+
import { FaEdit, FaTimes } from 'react-icons/fa';
|
|
7
6
|
import { Rnd } from 'react-rnd';
|
|
7
|
+
import { SVGStyledText } from 'react-science/ui';
|
|
8
8
|
|
|
9
|
-
import { isSpectrum1D } from '../../data/data1d/Spectrum1D/
|
|
9
|
+
import { isSpectrum1D } from '../../data/data1d/Spectrum1D/index.js';
|
|
10
10
|
import { useChartData } from '../context/ChartContext.js';
|
|
11
11
|
import { useDispatch } from '../context/DispatchContext.js';
|
|
12
12
|
import { useGlobal } from '../context/GlobalContext.js';
|
|
13
13
|
import type { ActionsButtonsPopoverProps } from '../elements/ActionsButtonsPopover.js';
|
|
14
14
|
import { ActionsButtonsPopover } from '../elements/ActionsButtonsPopover.js';
|
|
15
|
-
import { useActiveNucleusTab } from '../hooks/useActiveNucleusTab.ts';
|
|
16
|
-
import { usePanelPreferences } from '../hooks/usePanelPreferences.js';
|
|
17
15
|
import { useSVGUnitConverter } from '../hooks/useSVGUnitConverter.js';
|
|
18
|
-
import
|
|
19
|
-
import { useTextMetrics } from '../hooks/useTextMetrics.ts';
|
|
16
|
+
import { useTextMetrics } from '../hooks/useTextMetrics.js';
|
|
20
17
|
import { useCheckExportStatus } from '../hooks/useViewportSize.js';
|
|
18
|
+
import { useACSSettings } from '../hooks/use_acs_settings.js';
|
|
19
|
+
import { usePublicationStrings } from '../hooks/use_publication_strings.js';
|
|
20
|
+
import { PublicationStringModal } from '../modal/PublicationStringModal.js';
|
|
21
21
|
|
|
22
22
|
const ReactRnd = styled(Rnd)`
|
|
23
23
|
border: 1px solid transparent;
|
|
@@ -34,19 +34,29 @@ const ReactRnd = styled(Rnd)`
|
|
|
34
34
|
|
|
35
35
|
interface UseWrapSVGTextParams {
|
|
36
36
|
text: string;
|
|
37
|
+
style: TextStyle;
|
|
37
38
|
width: number;
|
|
38
|
-
fontSize: number;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
function useWrapSVGText(params: UseWrapSVGTextParams) {
|
|
42
|
-
const { text, width,
|
|
43
|
-
|
|
42
|
+
const { text, width, style } = params;
|
|
43
|
+
|
|
44
|
+
const debugCanvas = false;
|
|
45
|
+
const labelSize = style.fontSize ?? 12;
|
|
46
|
+
// ctx used only for debug canvas purpose.
|
|
47
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
48
|
+
const { getTextWidth, ctx } = useTextMetrics({
|
|
49
|
+
labelSize,
|
|
50
|
+
labelStyle: style.fontStyle,
|
|
51
|
+
labelWeight: style.fontWeight,
|
|
52
|
+
debugCanvasWidth: debugCanvas ? width : undefined,
|
|
53
|
+
});
|
|
44
54
|
|
|
45
55
|
const formattedText = text
|
|
46
56
|
.replaceAll(/<sup>(?<n>.*?)<\/sup>/g, '++$1++ ')
|
|
47
57
|
.replaceAll(/<i>(?<j>.*?)<\/i>/g, '**$1**');
|
|
48
58
|
|
|
49
|
-
const lineHeight =
|
|
59
|
+
const lineHeight = labelSize * 1.6;
|
|
50
60
|
|
|
51
61
|
const lines: string[][] = [];
|
|
52
62
|
let line: string[] = [];
|
|
@@ -68,33 +78,69 @@ function useWrapSVGText(params: UseWrapSVGTextParams) {
|
|
|
68
78
|
}
|
|
69
79
|
if (line.length > 0) lines.push(line);
|
|
70
80
|
|
|
81
|
+
useEffect(() => {
|
|
82
|
+
if (!debugCanvas) return;
|
|
83
|
+
if (!ctx) return;
|
|
84
|
+
|
|
85
|
+
ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height);
|
|
86
|
+
let y = lineHeight;
|
|
87
|
+
for (const line of lines) {
|
|
88
|
+
let x = 0;
|
|
89
|
+
for (const word of line) {
|
|
90
|
+
const isSuper = word.startsWith('++') && word.endsWith('++');
|
|
91
|
+
const isItalic = word.startsWith('**') && word.endsWith('**');
|
|
92
|
+
const baseLine = ctx.textBaseline;
|
|
93
|
+
|
|
94
|
+
let finalWord = `${word} `;
|
|
95
|
+
if (isSuper) {
|
|
96
|
+
finalWord = word.replaceAll('++', '');
|
|
97
|
+
|
|
98
|
+
ctx.textBaseline = 'bottom';
|
|
99
|
+
} else if (isItalic) {
|
|
100
|
+
finalWord = word.replaceAll('**', '');
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
ctx?.fillText(finalWord, x, y);
|
|
104
|
+
x += getTextWidth(finalWord);
|
|
105
|
+
|
|
106
|
+
ctx.textBaseline = baseLine;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
y += lineHeight;
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
|
|
71
113
|
return { lines, lineHeight };
|
|
72
114
|
}
|
|
73
115
|
|
|
74
116
|
interface PublicationTextProps {
|
|
75
117
|
text: string;
|
|
76
|
-
|
|
118
|
+
textStyle?: TextStyle;
|
|
77
119
|
width: number;
|
|
78
|
-
padding?: number;
|
|
79
120
|
}
|
|
80
121
|
|
|
81
122
|
function PublicationText(props: PublicationTextProps) {
|
|
82
|
-
const {
|
|
123
|
+
const { text, textStyle = {}, width } = props;
|
|
124
|
+
const padding = 10;
|
|
83
125
|
const boxWidth = width - padding * 2;
|
|
84
126
|
|
|
127
|
+
const textStyleWithSize = {
|
|
128
|
+
...textStyle,
|
|
129
|
+
fontSize: textStyle.fontSize ?? 12,
|
|
130
|
+
};
|
|
85
131
|
const { lineHeight, lines } = useWrapSVGText({
|
|
86
132
|
width: boxWidth,
|
|
87
|
-
|
|
133
|
+
style: textStyleWithSize,
|
|
88
134
|
text,
|
|
89
135
|
});
|
|
90
136
|
|
|
91
137
|
return (
|
|
92
138
|
<g transform={`translate(${padding} ${padding})`}>
|
|
93
139
|
{lines.map((line, lineIndex) => (
|
|
94
|
-
<
|
|
140
|
+
<SVGStyledText
|
|
95
141
|
// eslint-disable-next-line react/no-array-index-key
|
|
96
142
|
key={lineIndex}
|
|
97
|
-
|
|
143
|
+
{...textStyleWithSize}
|
|
98
144
|
fontFamily="Arial"
|
|
99
145
|
y={lineIndex * lineHeight}
|
|
100
146
|
dominantBaseline="hanging"
|
|
@@ -102,8 +148,12 @@ function PublicationText(props: PublicationTextProps) {
|
|
|
102
148
|
{line.map((word, wordIndex) => {
|
|
103
149
|
if (word.startsWith('++') && word.endsWith('++')) {
|
|
104
150
|
return (
|
|
105
|
-
|
|
106
|
-
|
|
151
|
+
<tspan
|
|
152
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
153
|
+
key={wordIndex}
|
|
154
|
+
baselineShift="super"
|
|
155
|
+
fontSize={Math.floor((5 / 6) * textStyleWithSize.fontSize)}
|
|
156
|
+
>
|
|
107
157
|
{word.replaceAll('++', '')}
|
|
108
158
|
</tspan>
|
|
109
159
|
);
|
|
@@ -119,7 +169,7 @@ function PublicationText(props: PublicationTextProps) {
|
|
|
119
169
|
return <tspan key={wordIndex}>{word} </tspan>;
|
|
120
170
|
}
|
|
121
171
|
})}
|
|
122
|
-
</
|
|
172
|
+
</SVGStyledText>
|
|
123
173
|
))}
|
|
124
174
|
</g>
|
|
125
175
|
);
|
|
@@ -127,50 +177,115 @@ function PublicationText(props: PublicationTextProps) {
|
|
|
127
177
|
|
|
128
178
|
interface DraggablePublicationStringProps {
|
|
129
179
|
value: string;
|
|
130
|
-
|
|
131
|
-
|
|
180
|
+
bounding: BoundingBox;
|
|
181
|
+
nucleus: string;
|
|
182
|
+
spectrum: Spectrum;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
function useBoundingBox(externalBoundingPercent: BoundingBox) {
|
|
186
|
+
const { percentToPixel, pixelToPercent } = useSVGUnitConverter();
|
|
187
|
+
|
|
188
|
+
const convertToPixel = useCallback(
|
|
189
|
+
(bounding: Partial<BoundingBox>) => {
|
|
190
|
+
const { x, y, height, width } = bounding;
|
|
191
|
+
const output: Partial<BoundingBox> = {};
|
|
192
|
+
|
|
193
|
+
if (typeof x === 'number') {
|
|
194
|
+
output.x = percentToPixel(x, 'x');
|
|
195
|
+
}
|
|
196
|
+
if (typeof y === 'number') {
|
|
197
|
+
output.y = percentToPixel(y, 'y');
|
|
198
|
+
}
|
|
199
|
+
if (typeof width === 'number') {
|
|
200
|
+
output.width = width;
|
|
201
|
+
}
|
|
202
|
+
if (typeof height === 'number') {
|
|
203
|
+
output.height = height;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
return output;
|
|
207
|
+
},
|
|
208
|
+
[percentToPixel],
|
|
209
|
+
);
|
|
210
|
+
|
|
211
|
+
const convertToPercent = useCallback(
|
|
212
|
+
(bounding: Partial<BoundingBox>) => {
|
|
213
|
+
const { x, y, height, width } = bounding;
|
|
214
|
+
const output: Partial<BoundingBox> = {};
|
|
215
|
+
|
|
216
|
+
if (typeof x === 'number') {
|
|
217
|
+
output.x = pixelToPercent(x, 'x');
|
|
218
|
+
}
|
|
219
|
+
if (typeof y === 'number') {
|
|
220
|
+
output.y = pixelToPercent(y, 'y');
|
|
221
|
+
}
|
|
222
|
+
if (typeof width === 'number') {
|
|
223
|
+
output.width = width;
|
|
224
|
+
}
|
|
225
|
+
if (typeof height === 'number') {
|
|
226
|
+
output.height = height;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
return output;
|
|
230
|
+
},
|
|
231
|
+
[pixelToPercent],
|
|
232
|
+
);
|
|
233
|
+
|
|
234
|
+
const [bounding, setBounding] = useState<BoundingBox>(() => {
|
|
235
|
+
return convertToPixel(externalBoundingPercent) as BoundingBox;
|
|
236
|
+
});
|
|
237
|
+
|
|
238
|
+
useEffect(() => {
|
|
239
|
+
setBounding(convertToPixel(externalBoundingPercent) as BoundingBox);
|
|
240
|
+
}, [convertToPixel, externalBoundingPercent]);
|
|
241
|
+
|
|
242
|
+
return {
|
|
243
|
+
bounding,
|
|
244
|
+
setBounding,
|
|
245
|
+
convertToPixel,
|
|
246
|
+
convertToPercent,
|
|
247
|
+
};
|
|
132
248
|
}
|
|
133
249
|
|
|
134
250
|
function DraggablePublicationString(props: DraggablePublicationStringProps) {
|
|
135
|
-
const {
|
|
251
|
+
const {
|
|
252
|
+
value,
|
|
253
|
+
bounding: externalBoundingInPercent,
|
|
254
|
+
nucleus,
|
|
255
|
+
spectrum,
|
|
256
|
+
} = props;
|
|
257
|
+
const spectrumKey = spectrum.id;
|
|
258
|
+
|
|
136
259
|
const dispatch = useDispatch();
|
|
137
260
|
const { viewerRef } = useGlobal();
|
|
138
|
-
const [bounding, setBounding] = useState<BoundingBox>(externalBounding);
|
|
139
261
|
const [isMoveActive, setIsMoveActive] = useState(false);
|
|
140
|
-
const { percentToPixel, pixelToPercent } = useSVGUnitConverter();
|
|
141
262
|
const isExportProcessStart = useCheckExportStatus();
|
|
263
|
+
const acsOptions = useACSSettings(nucleus);
|
|
264
|
+
const [isDialogOpen, setIsDialogOpen] = useState(false);
|
|
142
265
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
function handleResize(
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
...convertToPercent(internalBounding),
|
|
156
|
-
}));
|
|
266
|
+
const { bounding, setBounding, convertToPercent } = useBoundingBox(
|
|
267
|
+
externalBoundingInPercent,
|
|
268
|
+
);
|
|
269
|
+
|
|
270
|
+
function handleResize(bounding: Pick<BoundingBox, 'height' | 'width'>) {
|
|
271
|
+
setBounding((prevBounding) => {
|
|
272
|
+
return {
|
|
273
|
+
...prevBounding,
|
|
274
|
+
width: bounding.width,
|
|
275
|
+
height: bounding.height,
|
|
276
|
+
};
|
|
277
|
+
});
|
|
157
278
|
}
|
|
158
279
|
|
|
159
|
-
function handleDrag(
|
|
280
|
+
function handleDrag(newPosition: Pick<BoundingBox, 'x' | 'y'>) {
|
|
160
281
|
setBounding((prevBounding) => ({
|
|
161
282
|
...prevBounding,
|
|
162
|
-
...
|
|
283
|
+
...newPosition,
|
|
163
284
|
}));
|
|
164
285
|
}
|
|
286
|
+
|
|
165
287
|
function handleChangeInsetBounding(bounding: Partial<BoundingBox>) {
|
|
166
|
-
|
|
167
|
-
typeof bounding?.width === 'number' &&
|
|
168
|
-
typeof bounding?.height === 'number'
|
|
169
|
-
) {
|
|
170
|
-
const { width, height } = externalBounding;
|
|
171
|
-
bounding.width += width;
|
|
172
|
-
bounding.height += height;
|
|
173
|
-
}
|
|
288
|
+
setBounding((prev) => ({ ...prev, ...bounding }));
|
|
174
289
|
|
|
175
290
|
dispatch({
|
|
176
291
|
type: 'CHANGE_RANGES_VIEW_FLOATING_BOX_BOUNDING',
|
|
@@ -182,45 +297,6 @@ function DraggablePublicationString(props: DraggablePublicationStringProps) {
|
|
|
182
297
|
});
|
|
183
298
|
}
|
|
184
299
|
|
|
185
|
-
function convertToPixel(bounding: Partial<BoundingBox>) {
|
|
186
|
-
const { x, y, height, width } = bounding;
|
|
187
|
-
const output: Partial<BoundingBox> = {};
|
|
188
|
-
|
|
189
|
-
if (x) {
|
|
190
|
-
output.x = percentToPixel(x, 'x');
|
|
191
|
-
}
|
|
192
|
-
if (y) {
|
|
193
|
-
output.y = percentToPixel(y, 'y');
|
|
194
|
-
}
|
|
195
|
-
if (width) {
|
|
196
|
-
output.width = width;
|
|
197
|
-
}
|
|
198
|
-
if (height) {
|
|
199
|
-
output.height = height;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
return output;
|
|
203
|
-
}
|
|
204
|
-
function convertToPercent(bounding: Partial<BoundingBox>) {
|
|
205
|
-
const { x, y, height, width } = bounding;
|
|
206
|
-
const output: Partial<BoundingBox> = {};
|
|
207
|
-
|
|
208
|
-
if (x) {
|
|
209
|
-
output.x = pixelToPercent(x, 'x');
|
|
210
|
-
}
|
|
211
|
-
if (y) {
|
|
212
|
-
output.y = pixelToPercent(y, 'y');
|
|
213
|
-
}
|
|
214
|
-
if (width) {
|
|
215
|
-
output.width = width;
|
|
216
|
-
}
|
|
217
|
-
if (height) {
|
|
218
|
-
output.height = height;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
return output;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
300
|
function handleRemove() {
|
|
225
301
|
dispatch({
|
|
226
302
|
type: 'TOGGLE_RANGES_VIEW_PROPERTY',
|
|
@@ -231,12 +307,19 @@ function DraggablePublicationString(props: DraggablePublicationStringProps) {
|
|
|
231
307
|
const actionButtons: ActionsButtonsPopoverProps['buttons'] = [
|
|
232
308
|
{
|
|
233
309
|
icon: <BsArrowsMove />,
|
|
234
|
-
|
|
235
310
|
intent: 'none',
|
|
236
311
|
title: 'Move publication string',
|
|
237
312
|
style: { cursor: 'move' },
|
|
238
313
|
className: 'handle',
|
|
239
314
|
},
|
|
315
|
+
{
|
|
316
|
+
icon: <FaEdit />,
|
|
317
|
+
intent: 'primary',
|
|
318
|
+
title: 'Configure publication string',
|
|
319
|
+
onClick: () => {
|
|
320
|
+
setIsDialogOpen(true);
|
|
321
|
+
},
|
|
322
|
+
},
|
|
240
323
|
{
|
|
241
324
|
icon: <FaTimes />,
|
|
242
325
|
intent: 'danger',
|
|
@@ -246,115 +329,130 @@ function DraggablePublicationString(props: DraggablePublicationStringProps) {
|
|
|
246
329
|
];
|
|
247
330
|
if (!viewerRef || !value) return null;
|
|
248
331
|
|
|
249
|
-
const { width, height, x
|
|
250
|
-
|
|
251
|
-
const x = percentToPixel(xInPercent, 'x');
|
|
252
|
-
const y = percentToPixel(yInPercent, 'y');
|
|
332
|
+
const { width, height, x = 0, y = 0 } = bounding;
|
|
253
333
|
|
|
254
334
|
if (isExportProcessStart) {
|
|
255
335
|
return (
|
|
256
336
|
<g transform={`translate(${x} ${y})`}>
|
|
257
|
-
<PublicationText
|
|
337
|
+
<PublicationText
|
|
338
|
+
text={value}
|
|
339
|
+
width={width}
|
|
340
|
+
textStyle={acsOptions.textStyle}
|
|
341
|
+
/>
|
|
258
342
|
</g>
|
|
259
343
|
);
|
|
260
344
|
}
|
|
261
345
|
|
|
262
346
|
return (
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
targetProps={{ style: { width: '100%', height: '100%' } }}
|
|
296
|
-
space={2}
|
|
297
|
-
{...(isMoveActive && { isOpen: true })}
|
|
298
|
-
x={x}
|
|
299
|
-
y={y}
|
|
347
|
+
<>
|
|
348
|
+
<ReactRnd
|
|
349
|
+
position={{ x, y }}
|
|
350
|
+
size={{ width: width || 'auto', height: height || 'auto' }}
|
|
351
|
+
minWidth={100}
|
|
352
|
+
minHeight={50}
|
|
353
|
+
dragHandleClassName="handle"
|
|
354
|
+
enableUserSelectHack={false}
|
|
355
|
+
bounds={`#${viewerRef.id}`}
|
|
356
|
+
onResize={(e, dir, eRef, size, position) => {
|
|
357
|
+
handleResize({
|
|
358
|
+
...position,
|
|
359
|
+
height: eRef.clientHeight,
|
|
360
|
+
width: eRef.clientWidth,
|
|
361
|
+
});
|
|
362
|
+
}}
|
|
363
|
+
onResizeStop={(e, dir, eRef, size, position) => {
|
|
364
|
+
handleChangeInsetBounding({
|
|
365
|
+
...position,
|
|
366
|
+
height: eRef.clientHeight,
|
|
367
|
+
width: eRef.clientWidth,
|
|
368
|
+
});
|
|
369
|
+
}}
|
|
370
|
+
onDragStart={() => setIsMoveActive(true)}
|
|
371
|
+
onDrag={(e, data) => {
|
|
372
|
+
handleDrag({ x: data.x, y: data.y });
|
|
373
|
+
}}
|
|
374
|
+
onDragStop={(e, data) => {
|
|
375
|
+
handleChangeInsetBounding({ x: data.x, y: data.y });
|
|
376
|
+
setIsMoveActive(false);
|
|
377
|
+
}}
|
|
378
|
+
resizeHandleWrapperStyle={{ backgroundColor: 'white' }}
|
|
300
379
|
>
|
|
301
|
-
<
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
380
|
+
<ActionsButtonsPopover
|
|
381
|
+
buttons={actionButtons}
|
|
382
|
+
fill
|
|
383
|
+
positioningStrategy="fixed"
|
|
384
|
+
direction="row"
|
|
385
|
+
targetProps={{ style: { width: '100%', height: '100%' } }}
|
|
386
|
+
space={2}
|
|
387
|
+
{...(isMoveActive && { isOpen: true })}
|
|
388
|
+
x={x}
|
|
389
|
+
y={y}
|
|
390
|
+
>
|
|
391
|
+
<svg
|
|
392
|
+
width={width || 'auto'}
|
|
393
|
+
height={height || 'auto'}
|
|
394
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
395
|
+
>
|
|
396
|
+
<PublicationText
|
|
397
|
+
text={value}
|
|
398
|
+
width={width}
|
|
399
|
+
textStyle={acsOptions.textStyle}
|
|
400
|
+
/>
|
|
401
|
+
</svg>
|
|
402
|
+
</ActionsButtonsPopover>
|
|
403
|
+
</ReactRnd>
|
|
404
|
+
<PublicationStringModal
|
|
405
|
+
isOpen={isDialogOpen}
|
|
406
|
+
onClose={() => setIsDialogOpen(false)}
|
|
407
|
+
acsExportOptions={acsOptions}
|
|
408
|
+
spectrum={spectrum}
|
|
409
|
+
allowTextStyle
|
|
410
|
+
/>
|
|
411
|
+
</>
|
|
306
412
|
);
|
|
307
413
|
}
|
|
308
414
|
|
|
309
|
-
function usePublicationString() {
|
|
310
|
-
const spectra = useSpectraByActiveNucleus();
|
|
311
|
-
const activeTab = useActiveNucleusTab();
|
|
312
|
-
const rangesPreferences = usePanelPreferences('ranges', activeTab);
|
|
313
|
-
|
|
314
|
-
const output: Record<string, string> = {};
|
|
315
|
-
|
|
316
|
-
for (const spectrum of spectra) {
|
|
317
|
-
if (!isSpectrum1D(spectrum)) {
|
|
318
|
-
continue;
|
|
319
|
-
}
|
|
320
|
-
const { id: spectrumKey, info, ranges } = spectrum;
|
|
321
|
-
|
|
322
|
-
if (!Array.isArray(ranges?.values) || ranges.values.length === 0) {
|
|
323
|
-
continue;
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
const { originFrequency: observedFrequency, nucleus } = info;
|
|
327
|
-
|
|
328
|
-
const value = rangesToACS(ranges.values, {
|
|
329
|
-
nucleus, // '19f'
|
|
330
|
-
deltaFormat: rangesPreferences.deltaPPM.format,
|
|
331
|
-
couplingFormat: rangesPreferences.coupling.format,
|
|
332
|
-
observedFrequency, //400
|
|
333
|
-
});
|
|
334
|
-
|
|
335
|
-
output[spectrumKey] = value;
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
return output;
|
|
339
|
-
}
|
|
340
|
-
|
|
341
415
|
export function FloatPublicationString() {
|
|
342
|
-
const publicationString =
|
|
416
|
+
const publicationString = usePublicationStrings();
|
|
343
417
|
const {
|
|
418
|
+
data: spectra,
|
|
344
419
|
view: { ranges },
|
|
345
420
|
} = useChartData();
|
|
346
|
-
const
|
|
421
|
+
const spectraMap = useMemo(() => {
|
|
422
|
+
const map = new Map<string, Spectrum>();
|
|
423
|
+
|
|
424
|
+
for (const spectrum of spectra) {
|
|
425
|
+
map.set(spectrum.id, spectrum);
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
return map;
|
|
429
|
+
}, [spectra]);
|
|
430
|
+
const options = useMemo(() => {
|
|
431
|
+
return Object.entries(ranges).map(([spectrumKey, viewOptions]) => ({
|
|
432
|
+
spectrum: spectraMap.get(spectrumKey),
|
|
433
|
+
viewOptions,
|
|
434
|
+
}));
|
|
435
|
+
}, [ranges, spectraMap]);
|
|
436
|
+
|
|
437
|
+
return options.map((options) => {
|
|
438
|
+
const { viewOptions, spectrum } = options;
|
|
347
439
|
|
|
348
|
-
return options.map(([spectrumKey, viewOptions]) => {
|
|
349
440
|
const { showPublicationString, publicationStringBounding } = viewOptions;
|
|
350
441
|
if (!showPublicationString) return null;
|
|
442
|
+
if (!isSpectrum1D(spectrum)) return null;
|
|
443
|
+
|
|
444
|
+
const {
|
|
445
|
+
id,
|
|
446
|
+
info: { nucleus },
|
|
447
|
+
} = spectrum;
|
|
351
448
|
|
|
352
449
|
return (
|
|
353
450
|
<DraggablePublicationString
|
|
354
|
-
key={
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
451
|
+
key={id}
|
|
452
|
+
spectrum={spectrum}
|
|
453
|
+
nucleus={nucleus}
|
|
454
|
+
bounding={publicationStringBounding}
|
|
455
|
+
value={publicationString[id]}
|
|
358
456
|
/>
|
|
359
457
|
);
|
|
360
458
|
});
|
|
@@ -16,7 +16,7 @@ import { useDispatch } from '../context/DispatchContext.js';
|
|
|
16
16
|
import { useGlobal } from '../context/GlobalContext.js';
|
|
17
17
|
import type { ActionsButtonsPopoverProps } from '../elements/ActionsButtonsPopover.js';
|
|
18
18
|
import { ActionsButtonsPopover } from '../elements/ActionsButtonsPopover.js';
|
|
19
|
-
import { useActiveNucleusTab } from '../hooks/useActiveNucleusTab.
|
|
19
|
+
import { useActiveNucleusTab } from '../hooks/useActiveNucleusTab.js';
|
|
20
20
|
import { usePanelPreferences } from '../hooks/usePanelPreferences.js';
|
|
21
21
|
import { useSVGUnitConverter } from '../hooks/useSVGUnitConverter.js';
|
|
22
22
|
import useSpectraByActiveNucleus from '../hooks/useSpectraPerNucleus.js';
|
|
@@ -301,7 +301,6 @@ function DraggableRanges(props: DraggablePublicationStringProps) {
|
|
|
301
301
|
dragHandleClassName="handle"
|
|
302
302
|
enableUserSelectHack={false}
|
|
303
303
|
bounds={`#${viewerRef.id}`}
|
|
304
|
-
style={{ zIndex: 1 }}
|
|
305
304
|
onDragStart={() => setIsMoveActive(true)}
|
|
306
305
|
onResize={(e, dir, eRef, size, position) =>
|
|
307
306
|
handleResize({ ...size, ...position })
|
|
@@ -322,7 +321,6 @@ function DraggableRanges(props: DraggablePublicationStringProps) {
|
|
|
322
321
|
buttons={actionButtons}
|
|
323
322
|
fill
|
|
324
323
|
positioningStrategy="fixed"
|
|
325
|
-
position="top-left"
|
|
326
324
|
direction="row"
|
|
327
325
|
targetProps={{ style: { width: '100%', height: '100%' } }}
|
|
328
326
|
space={2}
|
|
@@ -1,6 +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.
|
|
3
|
+
import { ShareDataProvider } from '../context/ShareDataContext.js';
|
|
4
4
|
|
|
5
5
|
import { ApodizationLine } from './ApodizationLine.js';
|
|
6
6
|
import ExclusionZonesAnnotations from './ExclusionZonesAnnotations.js';
|
|
@@ -15,14 +15,14 @@ import { FaSitemap, FaTimes } from 'react-icons/fa';
|
|
|
15
15
|
import { LuMessageSquareText } from 'react-icons/lu';
|
|
16
16
|
import { Rnd } from 'react-rnd';
|
|
17
17
|
|
|
18
|
-
import { isSpectrum1D } from '../../../data/data1d/Spectrum1D/isSpectrum1D.
|
|
18
|
+
import { isSpectrum1D } from '../../../data/data1d/Spectrum1D/isSpectrum1D.js';
|
|
19
19
|
import { SVGRootContainer } from '../../1d-2d/components/SVGRootContainer.js';
|
|
20
20
|
import { useDispatch } from '../../context/DispatchContext.js';
|
|
21
21
|
import { useGlobal } from '../../context/GlobalContext.js';
|
|
22
22
|
import type { ActionsButtonsPopoverProps } from '../../elements/ActionsButtonsPopover.js';
|
|
23
23
|
import { ActionsButtonsPopover } from '../../elements/ActionsButtonsPopover.js';
|
|
24
24
|
import { useSVGUnitConverter } from '../../hooks/useSVGUnitConverter.js';
|
|
25
|
-
import useSpectrum from '../../hooks/useSpectrum.
|
|
25
|
+
import useSpectrum from '../../hooks/useSpectrum.js';
|
|
26
26
|
import { useCheckExportStatus } from '../../hooks/useViewportSize.js';
|
|
27
27
|
import { booleanToString } from '../../utility/booleanToString.js';
|
|
28
28
|
import type { FilterType } from '../../utility/filterType.js';
|
|
@@ -189,7 +189,6 @@ export function DraggableInset(props: Inset) {
|
|
|
189
189
|
dragHandleClassName="handle"
|
|
190
190
|
enableUserSelectHack={false}
|
|
191
191
|
bounds={`#${viewerRef.id}`}
|
|
192
|
-
style={{ zIndex: 1 }}
|
|
193
192
|
onDragStart={() => setIsMoveActive(true)}
|
|
194
193
|
onResize={(e, dir, eRef, size, position) =>
|
|
195
194
|
handleResize({ ...size, ...position })
|
|
@@ -210,7 +209,6 @@ export function DraggableInset(props: Inset) {
|
|
|
210
209
|
buttons={actionButtons}
|
|
211
210
|
fill
|
|
212
211
|
positioningStrategy="fixed"
|
|
213
|
-
position="top-left"
|
|
214
212
|
direction="row"
|
|
215
213
|
targetProps={{ style: { width: '100%', height: '100%' } }}
|
|
216
214
|
space={2}
|
|
@@ -5,7 +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.
|
|
8
|
+
import type { Position } from '../../elements/resizer/SVGResizer.js';
|
|
9
9
|
import { useHighlight } from '../../highlight/index.js';
|
|
10
10
|
import { useResizerStatus } from '../../hooks/useResizerStatus.js';
|
|
11
11
|
import useSpectrum from '../../hooks/useSpectrum.js';
|
|
@@ -7,7 +7,7 @@ import { useMemo } from 'react';
|
|
|
7
7
|
|
|
8
8
|
import { useChartData } from '../../context/ChartContext.js';
|
|
9
9
|
import { useScaleChecked } from '../../context/ScaleContext.js';
|
|
10
|
-
import { useActiveNucleusTab } from '../../hooks/useActiveNucleusTab.
|
|
10
|
+
import { useActiveNucleusTab } from '../../hooks/useActiveNucleusTab.js';
|
|
11
11
|
import { usePanelPreferences } from '../../hooks/usePanelPreferences.js';
|
|
12
12
|
import { PathBuilder } from '../../utility/PathBuilder.js';
|
|
13
13
|
import { getYScaleWithRation } from '../utilities/scale.js';
|