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
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
import { workspaceDefaultProperties } from '../../../workspaces/workspaceDefaultProperties.js';
|
|
4
|
+
|
|
5
|
+
import { exportPreferencesValidation } from './validation/export_tab_validation.js';
|
|
6
|
+
import {
|
|
7
|
+
displayGeneralValidation,
|
|
8
|
+
generalValidation,
|
|
9
|
+
peaksLabelValidation,
|
|
10
|
+
} from './validation/general_tab_validation.js';
|
|
11
|
+
import { nmrLoadersValidation } from './validation/import_filters_tab_validation.js';
|
|
12
|
+
import { nucleiValidation } from './validation/nuclei_tab_validation.js';
|
|
13
|
+
import { displayPanelsValidation } from './validation/panels_tab_validation.js';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* The type for the workspace preferences is `WorkspaceWithSource`
|
|
17
|
+
* The form save / apply actions merge current workspace values with form values.
|
|
18
|
+
*
|
|
19
|
+
* @see {import('../../reducer/preferences/preferencesReducer.ts').WorkspaceWithSource}
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
const displayValidation = z.object({
|
|
23
|
+
general: displayGeneralValidation,
|
|
24
|
+
panels: displayPanelsValidation,
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export const workspaceValidation = z.object({
|
|
28
|
+
nuclei: nucleiValidation,
|
|
29
|
+
peaksLabel: peaksLabelValidation,
|
|
30
|
+
general: generalValidation,
|
|
31
|
+
display: displayValidation,
|
|
32
|
+
nmrLoaders: nmrLoadersValidation,
|
|
33
|
+
export: exportPreferencesValidation,
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
// This object is used to define type not real values. Do not use it as values
|
|
37
|
+
export const defaultGeneralSettingsFormValues: z.input<
|
|
38
|
+
typeof workspaceValidation
|
|
39
|
+
> = {
|
|
40
|
+
nuclei: nucleiValidation.encode(workspaceDefaultProperties.nuclei),
|
|
41
|
+
peaksLabel: {
|
|
42
|
+
marginTop: 0,
|
|
43
|
+
},
|
|
44
|
+
general: {
|
|
45
|
+
dimmedSpectraOpacity: 0,
|
|
46
|
+
invert: false,
|
|
47
|
+
invertScroll: false,
|
|
48
|
+
spectraRendering: 'auto',
|
|
49
|
+
loggingLevel: 'info',
|
|
50
|
+
popupLoggingLevel: 'info',
|
|
51
|
+
},
|
|
52
|
+
display: {
|
|
53
|
+
general: {
|
|
54
|
+
experimentalFeatures: {
|
|
55
|
+
display: false,
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
panels: displayPanelsValidation.encode(
|
|
59
|
+
workspaceDefaultProperties.display.panels,
|
|
60
|
+
),
|
|
61
|
+
},
|
|
62
|
+
nmrLoaders: nmrLoadersValidation.encode(
|
|
63
|
+
workspaceDefaultProperties.nmrLoaders,
|
|
64
|
+
),
|
|
65
|
+
export: exportPreferencesValidation.encode(workspaceDefaultProperties.export),
|
|
66
|
+
};
|
|
@@ -4,14 +4,14 @@ import type { BoundingBox, MoleculeView } from '@zakodium/nmrium-core';
|
|
|
4
4
|
import { useForm } from 'react-hook-form';
|
|
5
5
|
import * as Yup from 'yup';
|
|
6
6
|
|
|
7
|
-
import { usePreferences } from '../../context/PreferencesContext.
|
|
7
|
+
import { usePreferences } from '../../context/PreferencesContext.js';
|
|
8
8
|
import { CheckController } from '../../elements/CheckController.js';
|
|
9
9
|
import { GroupPane } from '../../elements/GroupPane.js';
|
|
10
10
|
import type { LabelStyle } from '../../elements/Label.js';
|
|
11
11
|
import Label from '../../elements/Label.js';
|
|
12
12
|
import { NumberInput2Controller } from '../../elements/NumberInput2Controller.js';
|
|
13
13
|
import { Select2Controller } from '../../elements/Select2Controller.js';
|
|
14
|
-
import PreferencesHeader from '../header/PreferencesHeader.
|
|
14
|
+
import PreferencesHeader from '../header/PreferencesHeader.js';
|
|
15
15
|
|
|
16
16
|
const atomAnnotations: Array<{
|
|
17
17
|
value: MoleculeView['atomAnnotation'];
|
|
@@ -13,9 +13,9 @@ import { NextPrev } from '../../elements/NextPrev.js';
|
|
|
13
13
|
import { useMoleculeEditor } from '../../modal/MoleculeStructureEditorModal.js';
|
|
14
14
|
|
|
15
15
|
import MoleculeHeader from './MoleculeHeader.js';
|
|
16
|
-
import { MoleculeOptionsPanel } from './MoleculeOptionsPanel.
|
|
16
|
+
import { MoleculeOptionsPanel } from './MoleculeOptionsPanel.js';
|
|
17
17
|
import MoleculePanelHeader from './MoleculePanelHeader.js';
|
|
18
|
-
import { MoleculeStructure } from './MoleculeStructure.
|
|
18
|
+
import { MoleculeStructure } from './MoleculeStructure.js';
|
|
19
19
|
|
|
20
20
|
const styles: Record<
|
|
21
21
|
'panel' | 'innerPanel' | 'molecule' | 'slider' | 'items',
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { Molecule } from 'openchemlib';
|
|
2
|
+
import { autoLabel } from 'openchemlib-utils';
|
|
2
3
|
import type { ReactNode } from 'react';
|
|
3
4
|
import { useCallback } from 'react';
|
|
4
5
|
import {
|
|
5
6
|
FaCopy,
|
|
7
|
+
FaDatabase,
|
|
6
8
|
FaDownload,
|
|
7
9
|
FaFileExport,
|
|
8
10
|
FaFileImage,
|
|
@@ -13,8 +15,8 @@ import {
|
|
|
13
15
|
} from 'react-icons/fa';
|
|
14
16
|
import { FaMaximize, FaMinimize } from 'react-icons/fa6';
|
|
15
17
|
import { IoOpenOutline } from 'react-icons/io5';
|
|
16
|
-
import { MdNumbers, MdOutlineLabelOff } from 'react-icons/md';
|
|
17
|
-
import { PanelHeader, Toolbar } from 'react-science/ui';
|
|
18
|
+
import { MdFlashAuto, MdNumbers, MdOutlineLabelOff } from 'react-icons/md';
|
|
19
|
+
import { PanelHeader, Toolbar, TooltipHelpContent } from 'react-science/ui';
|
|
18
20
|
|
|
19
21
|
import type {
|
|
20
22
|
MoleculesView,
|
|
@@ -28,55 +30,85 @@ import { ClipboardFallbackModal } from '../../../utils/clipboard/clipboardCompon
|
|
|
28
30
|
import { useClipboard } from '../../../utils/clipboard/clipboardHooks.js';
|
|
29
31
|
import { useDispatch } from '../../context/DispatchContext.js';
|
|
30
32
|
import { useGlobal } from '../../context/GlobalContext.js';
|
|
31
|
-
import { usePreferences } from '../../context/PreferencesContext.
|
|
33
|
+
import { usePreferences } from '../../context/PreferencesContext.js';
|
|
32
34
|
import { useToaster } from '../../context/ToasterContext.js';
|
|
33
35
|
import { useTopicMolecule } from '../../context/TopicMoleculeContext.js';
|
|
34
36
|
import type { ToolbarPopoverMenuItem } from '../../elements/ToolbarPopoverItem.js';
|
|
35
37
|
import { ToolbarPopoverItem } from '../../elements/ToolbarPopoverItem.js';
|
|
38
|
+
import { useDialogToggle } from '../../hooks/useDialogToggle.js';
|
|
36
39
|
import AboutPredictionModal from '../../modal/AboutPredictionModal.js';
|
|
40
|
+
import { MoleculeAutoLabelsDatabaseModal } from '../../modal/MoleculeAutoLabelsDatabaseModal.js';
|
|
37
41
|
import PredictSpectraModal from '../../modal/PredictSpectraModal.js';
|
|
38
|
-
import { booleanToString } from '../../utility/booleanToString.
|
|
42
|
+
import { booleanToString } from '../../utility/booleanToString.js';
|
|
39
43
|
import {
|
|
40
44
|
browserNotSupportedErrorToast,
|
|
41
45
|
copyPNGToClipboard,
|
|
46
|
+
exportAsMolfile,
|
|
42
47
|
exportAsSVG,
|
|
43
48
|
} from '../../utility/export.js';
|
|
44
|
-
import { useMoleculeAnnotationCore } from '../hooks/useMoleculeAnnotationCore.
|
|
49
|
+
import { useMoleculeAnnotationCore } from '../hooks/useMoleculeAnnotationCore.js';
|
|
50
|
+
|
|
51
|
+
type ExportOperation =
|
|
52
|
+
| 'CopyAsSmiles'
|
|
53
|
+
| 'CopyAsMolfileV3'
|
|
54
|
+
| 'SaveAsMolfileV3'
|
|
55
|
+
| 'CopyAsMolfileV2'
|
|
56
|
+
| 'SaveAsMolfileV2'
|
|
57
|
+
| 'CopyAsPng'
|
|
58
|
+
| 'SaveAsSvg';
|
|
59
|
+
|
|
60
|
+
interface ExportDataItem {
|
|
61
|
+
id: ExportOperation;
|
|
62
|
+
}
|
|
45
63
|
|
|
46
|
-
const MOL_EXPORT_MENU: ToolbarPopoverMenuItem
|
|
64
|
+
const MOL_EXPORT_MENU: Array<ToolbarPopoverMenuItem<ExportDataItem>> = [
|
|
47
65
|
{
|
|
48
66
|
icon: <FaCopy />,
|
|
49
67
|
text: 'Copy as SMILES',
|
|
50
68
|
data: {
|
|
51
|
-
id: '
|
|
69
|
+
id: 'CopyAsSmiles',
|
|
52
70
|
},
|
|
53
71
|
},
|
|
54
72
|
{
|
|
55
73
|
icon: <FaCopy />,
|
|
56
|
-
text: 'Copy as molfile
|
|
74
|
+
text: 'Copy as molfile V2',
|
|
57
75
|
data: {
|
|
58
|
-
id: '
|
|
76
|
+
id: 'CopyAsMolfileV2',
|
|
59
77
|
},
|
|
60
78
|
},
|
|
61
79
|
{
|
|
62
80
|
icon: <FaCopy />,
|
|
63
|
-
text: 'Copy as molfile
|
|
81
|
+
text: 'Copy as molfile V3',
|
|
82
|
+
data: {
|
|
83
|
+
id: 'CopyAsMolfileV3',
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
icon: <FaDownload />,
|
|
88
|
+
text: 'Save as molfile V2',
|
|
64
89
|
data: {
|
|
65
|
-
id: '
|
|
90
|
+
id: 'SaveAsMolfileV2',
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
icon: <FaDownload />,
|
|
95
|
+
text: 'Save as molfile V3',
|
|
96
|
+
data: {
|
|
97
|
+
id: 'SaveAsMolfileV3',
|
|
66
98
|
},
|
|
67
99
|
},
|
|
68
100
|
{
|
|
69
101
|
icon: <FaFileImage />,
|
|
70
102
|
text: 'Copy as PNG',
|
|
71
103
|
data: {
|
|
72
|
-
id: '
|
|
104
|
+
id: 'CopyAsPng',
|
|
73
105
|
},
|
|
74
106
|
},
|
|
75
107
|
{
|
|
76
108
|
icon: <FaDownload />,
|
|
77
109
|
text: 'Export as SVG',
|
|
78
110
|
data: {
|
|
79
|
-
id: '
|
|
111
|
+
id: 'SaveAsSvg',
|
|
80
112
|
},
|
|
81
113
|
},
|
|
82
114
|
];
|
|
@@ -111,6 +143,9 @@ export default function MoleculePanelHeader(props: MoleculePanelHeaderProps) {
|
|
|
111
143
|
current: { defaultMoleculeSettings },
|
|
112
144
|
} = usePreferences();
|
|
113
145
|
const moleculeKey = molecules?.[currentIndex]?.id;
|
|
146
|
+
const { dialog, openDialog, closeDialog } = useDialogToggle({
|
|
147
|
+
autoLabelDatabaseDialog: false,
|
|
148
|
+
});
|
|
114
149
|
const saveAsSVGHandler = useCallback(() => {
|
|
115
150
|
if (!rootRef) return;
|
|
116
151
|
exportAsSVG(`molSVG${currentIndex}`, {
|
|
@@ -161,29 +196,39 @@ export default function MoleculePanelHeader(props: MoleculePanelHeaderProps) {
|
|
|
161
196
|
);
|
|
162
197
|
|
|
163
198
|
const exportHandler = useCallback(
|
|
164
|
-
(selected
|
|
199
|
+
(selected?: ExportDataItem) => {
|
|
165
200
|
const m = molecules?.[currentIndex];
|
|
166
201
|
const molecule = Molecule.fromMolfile(m.molfile);
|
|
167
202
|
if (molecule) {
|
|
168
203
|
switch (selected?.id) {
|
|
169
|
-
case '
|
|
204
|
+
case 'CopyAsSmiles':
|
|
170
205
|
copyHandler(molecule.toIsomericSmiles(), 'SMILES');
|
|
171
206
|
|
|
172
207
|
break;
|
|
173
|
-
case '
|
|
208
|
+
case 'CopyAsMolfileV3':
|
|
174
209
|
copyHandler(m.molfile, 'MOLFile');
|
|
175
210
|
break;
|
|
176
|
-
case '
|
|
211
|
+
case 'SaveAsMolfileV3':
|
|
212
|
+
exportAsMolfile(m.molfile, m.label);
|
|
213
|
+
break;
|
|
214
|
+
case 'CopyAsMolfileV2': {
|
|
177
215
|
copyHandler(
|
|
178
216
|
molecule.toMolfile({ customLabelPosition: 'normal' }),
|
|
179
217
|
'MOLFile',
|
|
180
218
|
);
|
|
181
219
|
break;
|
|
182
220
|
}
|
|
183
|
-
case '
|
|
221
|
+
case 'SaveAsMolfileV2': {
|
|
222
|
+
exportAsMolfile(
|
|
223
|
+
molecule.toMolfile({ customLabelPosition: 'normal' }),
|
|
224
|
+
m.label,
|
|
225
|
+
);
|
|
226
|
+
break;
|
|
227
|
+
}
|
|
228
|
+
case 'CopyAsPng':
|
|
184
229
|
void saveAsPNGHandler();
|
|
185
230
|
break;
|
|
186
|
-
case '
|
|
231
|
+
case 'SaveAsSvg':
|
|
187
232
|
saveAsSVGHandler();
|
|
188
233
|
break;
|
|
189
234
|
default:
|
|
@@ -274,6 +319,20 @@ export default function MoleculePanelHeader(props: MoleculePanelHeaderProps) {
|
|
|
274
319
|
});
|
|
275
320
|
}
|
|
276
321
|
|
|
322
|
+
function autoLabels() {
|
|
323
|
+
const currentMolecule = molecules[currentIndex];
|
|
324
|
+
|
|
325
|
+
if (!currentMolecule) return;
|
|
326
|
+
const { id, label, molfile } = currentMolecule;
|
|
327
|
+
|
|
328
|
+
const molecule = Molecule.fromMolfile(molfile);
|
|
329
|
+
autoLabel(molecule);
|
|
330
|
+
dispatch({
|
|
331
|
+
type: 'SET_MOLECULE',
|
|
332
|
+
payload: { id, label, molfile: molecule.toMolfileV3() },
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
|
|
277
336
|
const hasMolecules = molecules && molecules.length > 0;
|
|
278
337
|
const showCounter = hasMolecules && renderSource !== 'predictionPanel';
|
|
279
338
|
const moreMenu: ToolbarPopoverMenuItem[] = [
|
|
@@ -295,6 +354,23 @@ export default function MoleculePanelHeader(props: MoleculePanelHeaderProps) {
|
|
|
295
354
|
disabled: !hasMolecules,
|
|
296
355
|
onClick: () => clearCustomAtomLabels(),
|
|
297
356
|
},
|
|
357
|
+
{
|
|
358
|
+
icon: <MdFlashAuto />,
|
|
359
|
+
text: 'Auto label atoms',
|
|
360
|
+
disabled: !hasMolecules,
|
|
361
|
+
tooltip: {
|
|
362
|
+
title: 'Auto label atoms',
|
|
363
|
+
description:
|
|
364
|
+
'Atoms are automatically labeled according to a predefined template database',
|
|
365
|
+
link: 'https://docs.nmrium.org/help/structure-labelling',
|
|
366
|
+
},
|
|
367
|
+
onClick: () => autoLabels(),
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
icon: <FaDatabase />,
|
|
371
|
+
text: 'Template database',
|
|
372
|
+
onClick: () => openDialog('autoLabelDatabaseDialog'),
|
|
373
|
+
},
|
|
298
374
|
];
|
|
299
375
|
|
|
300
376
|
const { handleChangeAtomAnnotation, isAnnotation } =
|
|
@@ -305,7 +381,10 @@ export default function MoleculePanelHeader(props: MoleculePanelHeaderProps) {
|
|
|
305
381
|
current={showCounter ? currentIndex + 1 : undefined}
|
|
306
382
|
total={showCounter ? molecules.length : undefined}
|
|
307
383
|
>
|
|
308
|
-
|
|
384
|
+
{dialog.autoLabelDatabaseDialog && (
|
|
385
|
+
<MoleculeAutoLabelsDatabaseModal onClose={closeDialog} />
|
|
386
|
+
)}
|
|
387
|
+
<Toolbar overflow="collapse">
|
|
309
388
|
{renderSource === 'predictionPanel' && <AboutPredictionModal />}
|
|
310
389
|
{renderSource === 'moleculePanel' && (
|
|
311
390
|
<ToolbarPopoverItem
|
|
@@ -350,7 +429,13 @@ export default function MoleculePanelHeader(props: MoleculePanelHeaderProps) {
|
|
|
350
429
|
disabled={!hasMolecules}
|
|
351
430
|
/>
|
|
352
431
|
<Toolbar.Item
|
|
353
|
-
tooltip={
|
|
432
|
+
tooltip={
|
|
433
|
+
<TooltipHelpContent
|
|
434
|
+
title={`${booleanToString(!isAnnotation('custom-labels'), { trueLabel: 'Display' })} custom atom labels`}
|
|
435
|
+
description="Custom atom labels can be displayed or hidden on the molecule structure"
|
|
436
|
+
link="https://docs.nmrium.org/help/structure-labelling/"
|
|
437
|
+
/>
|
|
438
|
+
}
|
|
354
439
|
icon={<FaRegBookmark />}
|
|
355
440
|
onClick={() => handleChangeAtomAnnotation('custom-labels')}
|
|
356
441
|
active={isAnnotation('custom-labels')}
|
|
@@ -5,12 +5,12 @@ import { MolfileSvgRenderer } from 'react-ocl';
|
|
|
5
5
|
import type { OCLnmrProps } from 'react-ocl-nmr';
|
|
6
6
|
import OCLnmr from 'react-ocl-nmr';
|
|
7
7
|
|
|
8
|
-
import type { StateMoleculeExtended } from '../../../data/molecules/Molecule.
|
|
9
|
-
import { useDispatch } from '../../context/DispatchContext.
|
|
10
|
-
import { useHighlightColor } from '../../hooks/useHighlightColor.
|
|
8
|
+
import type { StateMoleculeExtended } from '../../../data/molecules/Molecule.js';
|
|
9
|
+
import { useDispatch } from '../../context/DispatchContext.js';
|
|
10
|
+
import { useHighlightColor } from '../../hooks/useHighlightColor.js';
|
|
11
11
|
|
|
12
|
-
import useAtomAssignment from './hooks/useAtomAssignment.
|
|
13
|
-
import { useExtractAtomAssignmentLabel } from './hooks/useExtractAtomAssignmentLabel.
|
|
12
|
+
import useAtomAssignment from './hooks/useAtomAssignment.js';
|
|
13
|
+
import { useExtractAtomAssignmentLabel } from './hooks/useExtractAtomAssignmentLabel.js';
|
|
14
14
|
|
|
15
15
|
interface MoleculeStructureProps extends Pick<OCLnmrProps, 'width' | 'height'> {
|
|
16
16
|
moleculeView: MoleculeView;
|
|
@@ -3,30 +3,30 @@ import type { DiaIDAndInfo } from 'openchemlib-utils';
|
|
|
3
3
|
import type { MouseEvent } from 'react';
|
|
4
4
|
import { useMemo, useRef } from 'react';
|
|
5
5
|
|
|
6
|
-
import { isSpectrum1D } from '../../../../data/data1d/Spectrum1D/
|
|
7
|
-
import { isSpectrum2D } from '../../../../data/data2d/Spectrum2D/
|
|
8
|
-
import { ConcatenationString } from '../../../../data/utilities/Concatenation.
|
|
9
|
-
import checkModifierKeyActivated from '../../../../data/utilities/checkModifierKeyActivated.
|
|
10
|
-
import { useTracesSpectra } from '../../../2d/useTracesSpectra.
|
|
6
|
+
import { isSpectrum1D } from '../../../../data/data1d/Spectrum1D/index.js';
|
|
7
|
+
import { isSpectrum2D } from '../../../../data/data2d/Spectrum2D/index.js';
|
|
8
|
+
import { ConcatenationString } from '../../../../data/utilities/Concatenation.js';
|
|
9
|
+
import checkModifierKeyActivated from '../../../../data/utilities/checkModifierKeyActivated.js';
|
|
10
|
+
import { useTracesSpectra } from '../../../2d/useTracesSpectra.js';
|
|
11
11
|
import type {
|
|
12
12
|
Assignments,
|
|
13
13
|
Axis,
|
|
14
|
-
} from '../../../assignment/AssignmentsContext.
|
|
15
|
-
import { useAssignmentContext } from '../../../assignment/AssignmentsContext.
|
|
16
|
-
import { useChartData } from '../../../context/ChartContext.
|
|
17
|
-
import { useDispatch } from '../../../context/DispatchContext.
|
|
18
|
-
import { useToaster } from '../../../context/ToasterContext.
|
|
19
|
-
import type { HighlightEventSource } from '../../../highlight/index.
|
|
20
|
-
import { useHighlightData } from '../../../highlight/index.
|
|
21
|
-
import useSpectrum from '../../../hooks/useSpectrum.
|
|
22
|
-
import type { AtomData } from '../utilities/AtomData.
|
|
23
|
-
import { extractFromAtom } from '../utilities/extractFromAtom.
|
|
24
|
-
import { getAssignIds } from '../utilities/getAssignIds.
|
|
25
|
-
import { getCurrentDiaIDsToHighlight } from '../utilities/getCurrentDiaIDsToHighlight.
|
|
26
|
-
import { getHighlightsOnHover } from '../utilities/getHighlightsOnHover.
|
|
27
|
-
import { getUniqueDiaIDs } from '../utilities/getUniqueDiaIDs.
|
|
28
|
-
|
|
29
|
-
import { useExtractAtomAssignmentLabel } from './useExtractAtomAssignmentLabel.
|
|
14
|
+
} from '../../../assignment/AssignmentsContext.js';
|
|
15
|
+
import { useAssignmentContext } from '../../../assignment/AssignmentsContext.js';
|
|
16
|
+
import { useChartData } from '../../../context/ChartContext.js';
|
|
17
|
+
import { useDispatch } from '../../../context/DispatchContext.js';
|
|
18
|
+
import { useToaster } from '../../../context/ToasterContext.js';
|
|
19
|
+
import type { HighlightEventSource } from '../../../highlight/index.js';
|
|
20
|
+
import { useHighlightData } from '../../../highlight/index.js';
|
|
21
|
+
import useSpectrum from '../../../hooks/useSpectrum.js';
|
|
22
|
+
import type { AtomData } from '../utilities/AtomData.js';
|
|
23
|
+
import { extractFromAtom } from '../utilities/extractFromAtom.js';
|
|
24
|
+
import { getAssignIds } from '../utilities/getAssignIds.js';
|
|
25
|
+
import { getCurrentDiaIDsToHighlight } from '../utilities/getCurrentDiaIDsToHighlight.js';
|
|
26
|
+
import { getHighlightsOnHover } from '../utilities/getHighlightsOnHover.js';
|
|
27
|
+
import { getUniqueDiaIDs } from '../utilities/getUniqueDiaIDs.js';
|
|
28
|
+
|
|
29
|
+
import { useExtractAtomAssignmentLabel } from './useExtractAtomAssignmentLabel.js';
|
|
30
30
|
|
|
31
31
|
function flattenAssignedDiaIDs(assignments: Assignments) {
|
|
32
32
|
const assignedDiaIDs: string[] = [];
|
|
@@ -2,7 +2,7 @@ import { Molecule } from 'openchemlib';
|
|
|
2
2
|
import type { DiaIDAndInfo } from 'openchemlib-utils';
|
|
3
3
|
import { useRef } from 'react';
|
|
4
4
|
|
|
5
|
-
import { useTopicMolecule } from '../../../context/TopicMoleculeContext.
|
|
5
|
+
import { useTopicMolecule } from '../../../context/TopicMoleculeContext.js';
|
|
6
6
|
|
|
7
7
|
export function useExtractAtomAssignmentLabel() {
|
|
8
8
|
const topicMolecule = useTopicMolecule();
|
|
@@ -2,7 +2,7 @@ import type { DiaIDAndInfo } from 'openchemlib-utils';
|
|
|
2
2
|
|
|
3
3
|
import type { Axis } from '../../../assignment/AssignmentsContext.js';
|
|
4
4
|
|
|
5
|
-
import type { AtomData } from './AtomData.
|
|
5
|
+
import type { AtomData } from './AtomData.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Returns the OCL id(s) and number of atoms of an atom when hovering over
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Range, Zone } from '@zakodium/nmr-types';
|
|
2
2
|
import type { Spectrum } from '@zakodium/nmrium-core';
|
|
3
3
|
|
|
4
|
-
import { isSpectrum1D } from '../../../../data/data1d/Spectrum1D/isSpectrum1D.
|
|
4
|
+
import { isSpectrum1D } from '../../../../data/data1d/Spectrum1D/isSpectrum1D.js';
|
|
5
5
|
|
|
6
6
|
interface TargetAssignment {
|
|
7
7
|
key: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AssignmentContext } from '../../../assignment/AssignmentsContext.
|
|
1
|
+
import type { AssignmentContext } from '../../../assignment/AssignmentsContext.js';
|
|
2
2
|
|
|
3
3
|
export function getCurrentDiaIDsToHighlight(assignmentData: AssignmentContext) {
|
|
4
4
|
const { highlighted, data } = assignmentData;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { Spectrum } from '@zakodium/nmrium-core';
|
|
2
2
|
|
|
3
|
+
import type { AssignmentContext } from '../../../assignment/AssignmentsContext.js';
|
|
3
4
|
import { assignmentAxes } from '../../../assignment/AssignmentsContext.js';
|
|
4
|
-
import type { AssignmentContext } from '../../../assignment/AssignmentsContext.ts';
|
|
5
5
|
|
|
6
|
-
import { getAssignIds } from './getAssignIds.
|
|
6
|
+
import { getAssignIds } from './getAssignIds.js';
|
|
7
7
|
|
|
8
8
|
export function getHighlightsOnHover(
|
|
9
9
|
assignments: AssignmentContext,
|
|
@@ -1,83 +1,24 @@
|
|
|
1
1
|
import styled from '@emotion/styled';
|
|
2
2
|
import type { NMRiumPanelPreferences } from '@zakodium/nmrium-core';
|
|
3
|
-
import
|
|
4
|
-
import { createContext, memo, useContext, useMemo, useState } from 'react';
|
|
5
|
-
import { FaRegEdit } from 'react-icons/fa';
|
|
6
|
-
import type { ToolbarItemProps } from 'react-science/ui';
|
|
3
|
+
import { memo } from 'react';
|
|
7
4
|
import { Accordion, Toolbar } from 'react-science/ui';
|
|
8
5
|
|
|
9
6
|
import { usePreferences } from '../context/PreferencesContext.js';
|
|
10
|
-
import { useActiveSpectrum } from '../hooks/useActiveSpectrum.js';
|
|
11
|
-
import { useDialogToggle } from '../hooks/useDialogToggle.js';
|
|
12
7
|
|
|
13
8
|
import type { AccordionItem } from './accordionItems.js';
|
|
14
9
|
import { useAccordionItems } from './hooks/useAccordionItems.js';
|
|
15
10
|
import { useGetPanelOptions } from './hooks/useGetPanelOptions.js';
|
|
16
11
|
import { useTogglePanel } from './hooks/useTogglePanel.js';
|
|
17
|
-
import { InformationEditionModal } from './informationPanel/InformationEditionModal.js';
|
|
18
12
|
|
|
19
13
|
const Container = styled.div`
|
|
20
14
|
flex: 1 1 0%;
|
|
21
15
|
height: 100%;
|
|
22
16
|
width: 100%;
|
|
23
17
|
`;
|
|
24
|
-
interface PanelStateContext {
|
|
25
|
-
openSplitPane: () => void;
|
|
26
|
-
closeSplitPane: () => void;
|
|
27
|
-
isSplitPaneOpen: boolean;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
const AccordionContext = createContext<PanelStateContext | null>(null);
|
|
31
|
-
|
|
32
|
-
export function usePanelOpenState() {
|
|
33
|
-
const context = useContext(AccordionContext);
|
|
34
|
-
|
|
35
|
-
if (!context) {
|
|
36
|
-
throw new Error('Panel open context must be used within PanelOpenProvider');
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
return context;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export function PanelOpenProviderProvider({
|
|
43
|
-
children,
|
|
44
|
-
}: Required<PropsWithChildren>) {
|
|
45
|
-
const { current } = usePreferences();
|
|
46
|
-
|
|
47
|
-
const {
|
|
48
|
-
display: { general = {} },
|
|
49
|
-
} = current;
|
|
50
|
-
// TODO: make sure to move this state to the workspace once the refactoring of nmrium-core is finished.
|
|
51
|
-
const [isSplitPaneOpen, setIsSplitPaneOpen] = useState(
|
|
52
|
-
!general?.hidePanelOnLoad,
|
|
53
|
-
);
|
|
54
|
-
|
|
55
|
-
const state = useMemo(() => {
|
|
56
|
-
function openSplitPane() {
|
|
57
|
-
setIsSplitPaneOpen(true);
|
|
58
|
-
}
|
|
59
|
-
function closeSplitPane() {
|
|
60
|
-
setIsSplitPaneOpen(false);
|
|
61
|
-
}
|
|
62
|
-
return {
|
|
63
|
-
openSplitPane,
|
|
64
|
-
closeSplitPane,
|
|
65
|
-
isSplitPaneOpen,
|
|
66
|
-
};
|
|
67
|
-
}, [isSplitPaneOpen]);
|
|
68
|
-
|
|
69
|
-
return (
|
|
70
|
-
<AccordionContext.Provider value={state}>
|
|
71
|
-
{children}
|
|
72
|
-
</AccordionContext.Provider>
|
|
73
|
-
);
|
|
74
|
-
}
|
|
75
18
|
|
|
76
19
|
function PanelsInner() {
|
|
77
20
|
const getPanelPreferences = useGetPanelOptions();
|
|
78
|
-
|
|
79
|
-
informationModal: false,
|
|
80
|
-
});
|
|
21
|
+
|
|
81
22
|
const { dispatch } = usePreferences();
|
|
82
23
|
const items = useAccordionItems();
|
|
83
24
|
function isOpened(item: AccordionItem) {
|
|
@@ -95,10 +36,6 @@ function PanelsInner() {
|
|
|
95
36
|
|
|
96
37
|
return (
|
|
97
38
|
<Container>
|
|
98
|
-
<InformationEditionModal
|
|
99
|
-
isOpen={dialog.informationModal}
|
|
100
|
-
onCloseDialog={closeDialog}
|
|
101
|
-
/>
|
|
102
39
|
<Accordion>
|
|
103
40
|
{displayedPanels.map((item) => {
|
|
104
41
|
const { title, component, id } = item;
|
|
@@ -115,15 +52,7 @@ function PanelsInner() {
|
|
|
115
52
|
payload: { id, options: { open: isOpened } },
|
|
116
53
|
});
|
|
117
54
|
}}
|
|
118
|
-
renderToolbar={() =>
|
|
119
|
-
<RightButtons
|
|
120
|
-
id={id}
|
|
121
|
-
onEdit={(event) => {
|
|
122
|
-
event.stopPropagation();
|
|
123
|
-
openDialog('informationModal');
|
|
124
|
-
}}
|
|
125
|
-
/>
|
|
126
|
-
)}
|
|
55
|
+
renderToolbar={() => <RightButtons id={id} />}
|
|
127
56
|
>
|
|
128
57
|
{component}
|
|
129
58
|
</Accordion.Item>
|
|
@@ -134,12 +63,8 @@ function PanelsInner() {
|
|
|
134
63
|
);
|
|
135
64
|
}
|
|
136
65
|
|
|
137
|
-
function RightButtons(props: {
|
|
138
|
-
id
|
|
139
|
-
onEdit: ToolbarItemProps['onClick'];
|
|
140
|
-
}) {
|
|
141
|
-
const { onEdit, id } = props;
|
|
142
|
-
const activeSpectrum = useActiveSpectrum();
|
|
66
|
+
function RightButtons(props: { id: keyof NMRiumPanelPreferences }) {
|
|
67
|
+
const { id } = props;
|
|
143
68
|
const toggle = useTogglePanel();
|
|
144
69
|
function handleClosePanel(event: any) {
|
|
145
70
|
event?.stopPropagation();
|
|
@@ -148,19 +73,6 @@ function RightButtons(props: {
|
|
|
148
73
|
|
|
149
74
|
return (
|
|
150
75
|
<Toolbar>
|
|
151
|
-
{id === 'informationPanel' && (
|
|
152
|
-
<Toolbar.Item
|
|
153
|
-
disabled={!activeSpectrum}
|
|
154
|
-
tooltipProps={{ intent: !activeSpectrum ? 'danger' : 'none' }}
|
|
155
|
-
icon={<FaRegEdit />}
|
|
156
|
-
onClick={onEdit}
|
|
157
|
-
tooltip={
|
|
158
|
-
!activeSpectrum
|
|
159
|
-
? 'Select a spectrum to edit its meta information'
|
|
160
|
-
: 'Edit spectrum meta information'
|
|
161
|
-
}
|
|
162
|
-
/>
|
|
163
|
-
)}
|
|
164
76
|
<Toolbar.Item
|
|
165
77
|
icon="cross"
|
|
166
78
|
tooltip="Close panel"
|