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,3 +1,4 @@
|
|
|
1
|
+
import { useMemo } from 'react';
|
|
1
2
|
import { useChartData } from '../context/ChartContext.js';
|
|
2
3
|
function truncate(value, numberOfDigits = 0) {
|
|
3
4
|
const power = 10 ** numberOfDigits;
|
|
@@ -11,14 +12,16 @@ export function convertPercentToPixel(value, baseValue) {
|
|
|
11
12
|
}
|
|
12
13
|
export function useSVGUnitConverter() {
|
|
13
14
|
const { width, height } = useChartData();
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
return useMemo(() => {
|
|
16
|
+
function pixelToPercent(value, axis) {
|
|
17
|
+
const size = axis === 'x' ? width : height;
|
|
18
|
+
return convertPixelToPercent(value, size);
|
|
19
|
+
}
|
|
20
|
+
function percentToPixel(value, axis) {
|
|
21
|
+
const size = axis === 'x' ? width : height;
|
|
22
|
+
return convertPercentToPixel(value, size);
|
|
23
|
+
}
|
|
24
|
+
return { pixelToPercent, percentToPixel };
|
|
25
|
+
}, [width, height]);
|
|
23
26
|
}
|
|
24
27
|
//# sourceMappingURL=useSVGUnitConverter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSVGUnitConverter.js","sourceRoot":"","sources":["../../../src/component/hooks/useSVGUnitConverter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,SAAS,QAAQ,CAAC,KAAU,EAAE,cAAc,GAAG,CAAC;IAC9C,MAAM,KAAK,GAAG,EAAE,IAAI,cAAc,CAAC;IACnC,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,GAAG,KAAK,CAAC;AAC3C,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,KAAa,EAAE,SAAiB;IACpE,OAAO,QAAQ,CAAC,CAAC,KAAK,GAAG,SAAS,CAAC,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC;AAChD,CAAC;AACD,MAAM,UAAU,qBAAqB,CAAC,KAAa,EAAE,SAAiB;IACpE,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,GAAG,GAAG,CAAC,GAAG,SAAS,CAAC,CAAC;AAC/C,CAAC;AAED,MAAM,UAAU,mBAAmB;IACjC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,YAAY,EAAE,CAAC;IAEzC,SAAS,cAAc,CAAC,KAAa,EAAE,IAAe;
|
|
1
|
+
{"version":3,"file":"useSVGUnitConverter.js","sourceRoot":"","sources":["../../../src/component/hooks/useSVGUnitConverter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,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|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSaveSettings.d.ts","sourceRoot":"","sources":["../../../src/component/hooks/useSaveSettings.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"useSaveSettings.d.ts","sourceRoot":"","sources":["../../../src/component/hooks/useSaveSettings.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAkBvD,wBAAgB,eAAe;4BAwBE,OAAO,CAAC,SAAS,CAAC;;EAmElD"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Button,
|
|
2
|
+
import { Button, DialogBody, DialogFooter } from '@blueprintjs/core';
|
|
3
3
|
import { revalidateLogic } from '@tanstack/react-form';
|
|
4
4
|
import { useRef } from 'react';
|
|
5
5
|
import { useForm as useReactScienceForm, useOnOff } from 'react-science/ui';
|
|
6
6
|
import { z } from 'zod/v4';
|
|
7
7
|
import { usePreferences } from '../context/PreferencesContext.js';
|
|
8
8
|
import { useToaster } from '../context/ToasterContext.js';
|
|
9
|
+
import { StandardDialog } from "../elements/StandardDialog.js";
|
|
9
10
|
import { useWorkspaceAction } from './useWorkspaceAction.js';
|
|
10
11
|
const schema = z.object({
|
|
11
12
|
workspaceName: z
|
|
@@ -47,7 +48,7 @@ export function useSaveSettings() {
|
|
|
47
48
|
return {
|
|
48
49
|
saveSettings,
|
|
49
50
|
SaveSettingsModal: () => {
|
|
50
|
-
return (_jsx(
|
|
51
|
+
return (_jsx(StandardDialog, { style: { width: 500 }, onClose: closeDialog, isOpen: isOpenDialog, title: "Save workspace", role: "dialog", children: _jsxs("form", { noValidate: true, onSubmit: (event) => {
|
|
51
52
|
event.preventDefault();
|
|
52
53
|
void form.handleSubmit();
|
|
53
54
|
}, children: [_jsx(DialogBody, { children: _jsx(form.AppField, { name: "workspaceName", children: (field) => (_jsx(field.Input, { layout: "inline", autoFocus: true, label: "New Workspace name", placeholder: "Enter workspace name", helpText: "Please enter a new user workspace name in order to save your changes locally", required: true })) }) }), _jsx(DialogFooter, { actions: _jsxs(_Fragment, { children: [_jsx(Button, { intent: "danger", variant: "outlined", onClick: () => closeDialog(), children: "Cancel" }), _jsx(form.AppForm, { children: _jsx(form.SubmitButton, { intent: "success", children: "Save workspace" }) })] }) })] }) }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSaveSettings.js","sourceRoot":"","sources":["../../../src/component/hooks/useSaveSettings.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"useSaveSettings.js","sourceRoot":"","sources":["../../../src/component/hooks/useSaveSettings.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5E,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAE3B,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,+BAAgC,CAAC;AAEhE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;IACtB,aAAa,EAAE,CAAC;SACb,MAAM,EAAE;SACR,IAAI,EAAE;SACN,GAAG,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,iDAA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ACtB,OAAO,CACL,KAAC,cAAc,IACb,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,EACrB,OAAO,EAAE,WAAW,EACpB,MAAM,EAAE,YAAY,EACpB,KAAK,EAAC,gBAAgB,EACtB,IAAI,EAAC,QAAQ,YAEb,gBACE,UAAU,QACV,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;wBAClB,KAAK,CAAC,cAAc,EAAE,CAAC;wBACvB,KAAK,IAAI,CAAC,YAAY,EAAE,CAAC;oBAC3B,CAAC,aAED,KAAC,UAAU,cACT,KAAC,IAAI,CAAC,QAAQ,IAAC,IAAI,EAAC,eAAe,YAChC,CAAC,KAAK,EAAE,EAAE,CAAC,CACV,KAAC,KAAK,CAAC,KAAK,IACV,MAAM,EAAC,QAAQ,EACf,SAAS,QACT,KAAK,EAAC,oBAAoB,EAC1B,WAAW,EAAC,sBAAsB,EAClC,QAAQ,EAAC,8EAA8E,EACvF,QAAQ,SACR,CACH,GACa,GACL,EAEb,KAAC,YAAY,IACX,OAAO,EACL,8BACE,KAAC,MAAM,IACL,MAAM,EAAC,QAAQ,EACf,OAAO,EAAC,UAAU,EAClB,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,EAAE,uBAGrB,EACT,KAAC,IAAI,CAAC,OAAO,cACX,KAAC,IAAI,CAAC,YAAY,IAAC,MAAM,EAAC,SAAS,+BAEf,GACP,IACd,GAEL,IACG,GACQ,CAClB,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSetActiveSpectrumAction.d.ts","sourceRoot":"","sources":["../../../src/component/hooks/useSetActiveSpectrumAction.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useSetActiveSpectrumAction.d.ts","sourceRoot":"","sources":["../../../src/component/hooks/useSetActiveSpectrumAction.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAG1E,wBAAgB,0BAA0B;+BAGN,iBAAiB,MAAM,MAAM;EAchE"}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
+
import { useChartData } from '../context/ChartContext.js';
|
|
1
2
|
import { useDispatch } from '../context/DispatchContext.js';
|
|
2
3
|
import { getModifiers } from '../context/KeyModifierContext.js';
|
|
3
4
|
export function useSetActiveSpectrumAction() {
|
|
4
5
|
const dispatch = useDispatch();
|
|
6
|
+
const { data: spectra } = useChartData();
|
|
5
7
|
function setActiveSpectrum(event, id) {
|
|
6
8
|
setTimeout(() => {
|
|
7
9
|
const { ctrlKey, shiftKey } = getModifiers(event);
|
|
8
10
|
const modifier = `shift[${shiftKey ? 'true' : 'false'}]_ctrl[${ctrlKey ? 'true' : 'false'}]`;
|
|
9
11
|
dispatch({
|
|
10
12
|
type: 'CHANGE_ACTIVE_SPECTRUM',
|
|
11
|
-
payload: { modifier, id },
|
|
13
|
+
payload: { modifier, id, sortedSpectra: spectra },
|
|
12
14
|
});
|
|
13
15
|
}, 0);
|
|
14
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSetActiveSpectrumAction.js","sourceRoot":"","sources":["../../../src/component/hooks/useSetActiveSpectrumAction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAE5D,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAEhE,MAAM,UAAU,0BAA0B;IACxC,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"useSetActiveSpectrumAction.js","sourceRoot":"","sources":["../../../src/component/hooks/useSetActiveSpectrumAction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAE5D,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAEhE,MAAM,UAAU,0BAA0B;IACxC,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAC/B,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,YAAY,EAAE,CAAC;IACzC,SAAS,iBAAiB,CAAC,KAAwB,EAAE,EAAU;QAC7D,UAAU,CAAC,GAAG,EAAE;YACd,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;YAClD,MAAM,QAAQ,GAAG,SAAS,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,UACnD,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OACrB,GAAG,CAAC;YACJ,QAAQ,CAAC;gBACP,IAAI,EAAE,wBAAwB;gBAC9B,OAAO,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,aAAa,EAAE,OAAO,EAAE;aAClD,CAAC,CAAC;QACL,CAAC,EAAE,CAAC,CAAC,CAAC;IACR,CAAC;IAED,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAC/B,CAAC"}
|
|
@@ -1,4 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
interface UseTextMetricsOptions {
|
|
2
|
+
labelSize?: number;
|
|
3
|
+
labelStyle?: string;
|
|
4
|
+
labelWeight?: string;
|
|
5
|
+
/**
|
|
6
|
+
* Dev purpose only.
|
|
7
|
+
* Set a width to see the canvas used to measure text.
|
|
8
|
+
*/
|
|
9
|
+
debugCanvasWidth?: number;
|
|
10
|
+
}
|
|
11
|
+
export declare function useTextMetrics(options?: UseTextMetricsOptions): {
|
|
2
12
|
getTextWidth: (text: string) => number;
|
|
13
|
+
/**
|
|
14
|
+
* @deprecated Use only for debug mode
|
|
15
|
+
*/
|
|
16
|
+
ctx: CanvasRenderingContext2D | null;
|
|
3
17
|
};
|
|
18
|
+
export {};
|
|
4
19
|
//# sourceMappingURL=useTextMetrics.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTextMetrics.d.ts","sourceRoot":"","sources":["../../../src/component/hooks/useTextMetrics.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useTextMetrics.d.ts","sourceRoot":"","sources":["../../../src/component/hooks/useTextMetrics.ts"],"names":[],"mappings":"AAEA,UAAU,qBAAqB;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,wBAAgB,cAAc,CAAC,OAAO,GAAE,qBAA0B;yBAYpC,MAAM,KAAG,MAAM;IAMzC;;OAEG;;EAGN"}
|
|
@@ -1,21 +1,49 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useEffect, useMemo } from 'react';
|
|
2
|
+
export function useTextMetrics(options = {}) {
|
|
3
|
+
const { labelSize = 12, labelStyle = 'normal', labelWeight = 'normal', debugCanvasWidth, } = options;
|
|
4
|
+
const canvas = useCanvas(debugCanvasWidth);
|
|
5
|
+
const ctx = canvas.getContext('2d');
|
|
6
|
+
if (ctx)
|
|
7
|
+
ctx.font = `${labelStyle} ${labelWeight} ${labelSize}px Arial`;
|
|
8
|
+
function getTextWidth(text) {
|
|
9
|
+
return measureTextWidth(ctx, text);
|
|
10
|
+
}
|
|
11
|
+
return {
|
|
12
|
+
getTextWidth,
|
|
13
|
+
/**
|
|
14
|
+
* @deprecated Use only for debug mode
|
|
15
|
+
*/
|
|
16
|
+
ctx,
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
function useCanvas(width) {
|
|
20
|
+
const canvas = useMemo(() => {
|
|
21
|
+
const canvas = document.createElement('canvas');
|
|
22
|
+
if (width) {
|
|
23
|
+
canvas.width = width;
|
|
24
|
+
canvas.height = 450;
|
|
25
|
+
}
|
|
26
|
+
canvas.style.position = 'absolute';
|
|
27
|
+
canvas.style.bottom = '0';
|
|
28
|
+
canvas.style.left = '0';
|
|
29
|
+
canvas.style.zIndex = '100';
|
|
30
|
+
canvas.style.opacity = '50%';
|
|
31
|
+
canvas.style.background = 'white';
|
|
32
|
+
return canvas;
|
|
33
|
+
}, [width]);
|
|
34
|
+
useEffect(() => {
|
|
35
|
+
if (!width)
|
|
36
|
+
return;
|
|
37
|
+
document.body.append(canvas);
|
|
38
|
+
return () => {
|
|
39
|
+
canvas.remove();
|
|
40
|
+
};
|
|
41
|
+
}, [canvas, width]);
|
|
42
|
+
return canvas;
|
|
43
|
+
}
|
|
2
44
|
function measureTextWidth(context, text) {
|
|
3
45
|
if (!context)
|
|
4
46
|
return 0;
|
|
5
47
|
return Math.round(context.measureText(text).width);
|
|
6
48
|
}
|
|
7
|
-
export function useTextMetrics(labelSize = 12) {
|
|
8
|
-
const contextRef = useRef(null);
|
|
9
|
-
if (!contextRef.current) {
|
|
10
|
-
const canvas = document.createElement('canvas');
|
|
11
|
-
contextRef.current = canvas.getContext('2d');
|
|
12
|
-
if (contextRef.current) {
|
|
13
|
-
contextRef.current.font = `${labelSize}px Arial`;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
function getTextWidth(text) {
|
|
17
|
-
return measureTextWidth(contextRef.current, text);
|
|
18
|
-
}
|
|
19
|
-
return { getTextWidth };
|
|
20
|
-
}
|
|
21
49
|
//# sourceMappingURL=useTextMetrics.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTextMetrics.js","sourceRoot":"","sources":["../../../src/component/hooks/useTextMetrics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"useTextMetrics.js","sourceRoot":"","sources":["../../../src/component/hooks/useTextMetrics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAc3C,MAAM,UAAU,cAAc,CAAC,UAAiC,EAAE;IAChE,MAAM,EACJ,SAAS,GAA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,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAE7B,OAAO,GAAG,EAAE;YACV,MAAM,CAAC,MAAM,EAAE,CAAC;QAClB,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC;IAEpB,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAS,gBAAgB,CACvB,OAAwC,EACxC,IAAY;IAEZ,IAAI,CAAC,OAAO;QAAE,OAAO,CAAC,CAAC;IACvB,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC;AACrD,CAAC"}
|
|
@@ -3,7 +3,7 @@ import { FaEye, FaEyeSlash, FaMinus, FaPlus } from 'react-icons/fa';
|
|
|
3
3
|
import { GrRadialSelected } from 'react-icons/gr';
|
|
4
4
|
import { TooltipHelpContent } from 'react-science/ui';
|
|
5
5
|
import { useDispatch } from '../context/DispatchContext.js';
|
|
6
|
-
import { useActiveNucleusTab } from
|
|
6
|
+
import { useActiveNucleusTab } from './useActiveNucleusTab.js';
|
|
7
7
|
export function useToggleSpectraVisibility(props = {}) {
|
|
8
8
|
const { enableHideAll = true, enableHideSelected = true, enableShowAll = true, enableShowSelectedOnly = true, enableShowSelected = true, } = props;
|
|
9
9
|
const dispatch = useDispatch();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use_acs_settings.d.ts","sourceRoot":"","sources":["../../../src/component/hooks/use_acs_settings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAe9D,wBAAgB,oBAAoB,qBAInC;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,oBAKzD"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { usePreferences } from "../context/PreferencesContext.js";
|
|
2
|
+
import { useActiveNucleusTab } from "./useActiveNucleusTab.js";
|
|
3
|
+
const defaultOptions = {
|
|
4
|
+
signalKind: 'signal',
|
|
5
|
+
ascending: true,
|
|
6
|
+
format: 'IMJA',
|
|
7
|
+
couplingFormat: '0.00',
|
|
8
|
+
deltaFormat: '0.00',
|
|
9
|
+
textStyle: {},
|
|
10
|
+
};
|
|
11
|
+
export function useActiveACSSettings() {
|
|
12
|
+
const nucleus = useActiveNucleusTab();
|
|
13
|
+
return useACSSettings(nucleus);
|
|
14
|
+
}
|
|
15
|
+
export function useACSSettings(nucleus) {
|
|
16
|
+
const { current } = usePreferences();
|
|
17
|
+
if (!nucleus)
|
|
18
|
+
return structuredClone(defaultOptions);
|
|
19
|
+
return current.acsExportSettings[nucleus] || structuredClone(defaultOptions);
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=use_acs_settings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use_acs_settings.js","sourceRoot":"","sources":["../../../src/component/hooks/use_acs_settings.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAmC,CAAC;AAEnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D,MAAM,cAAc,GAAqB;IACvC,UAAU,EAAE,QAAQ;IACpB,SAAS,EAAE,IAAI;IACf,MAAM,EAAE,MAAM;IACd,cAAc,EAAE,MAAM;IACtB,WAAW,EAAE,MAAM;IACnB,SAAS,EAAE,EAAE;CACd,CAAC;AAEF,MAAM,UAAU,oBAAoB;IAClC,MAAM,OAAO,GAAG,mBAAmB,EAAE,CAAC;IAEtC,OAAO,cAAc,CAAC,OAAO,CAAC,CAAC;AACjC,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,OAA2B;IACxD,MAAM,EAAE,OAAO,EAAE,GAAG,cAAc,EAAE,CAAC;IACrC,IAAI,CAAC,OAAO;QAAE,OAAO,eAAe,CAAC,cAAc,CAAC,CAAC;IAErD,OAAO,OAAO,CAAC,iBAAiB,CAAC,OAAO,CAAC,IAAI,eAAe,CAAC,cAAc,CAAC,CAAC;AAC/E,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ACSExportOptions, Spectrum } from '@zakodium/nmrium-core';
|
|
2
|
+
export declare function usePublicationStrings(): Record<string, string>;
|
|
3
|
+
interface BuildPublicationStringOptions {
|
|
4
|
+
spectrum: Spectrum;
|
|
5
|
+
acs: ACSExportOptions;
|
|
6
|
+
}
|
|
7
|
+
export declare function buildPublicationString(options: BuildPublicationStringOptions): string;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=use_publication_strings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use_publication_strings.d.ts","sourceRoot":"","sources":["../../../src/component/hooks/use_publication_strings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAUxE,wBAAgB,qBAAqB,2BAmBpC;AAED,UAAU,6BAA6B;IACrC,QAAQ,EAAE,QAAQ,CAAC;IACnB,GAAG,EAAE,gBAAgB,CAAC;CACvB;AACD,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,6BAA6B,UA+B5E"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { rangesToACS } from 'nmr-processing';
|
|
2
|
+
import { assert } from 'react-science/ui';
|
|
3
|
+
import { isSpectrum1D } from "../../data/data1d/Spectrum1D/index.js";
|
|
4
|
+
import useSpectraByActiveNucleus from "./useSpectraPerNucleus.js";
|
|
5
|
+
import { useActiveACSSettings } from "./use_acs_settings.js";
|
|
6
|
+
export function usePublicationStrings() {
|
|
7
|
+
const spectra = useSpectraByActiveNucleus();
|
|
8
|
+
const acs = useActiveACSSettings();
|
|
9
|
+
const output = {};
|
|
10
|
+
for (const spectrum of spectra) {
|
|
11
|
+
if (!isSpectrum1D(spectrum))
|
|
12
|
+
continue;
|
|
13
|
+
const { id, ranges } = spectrum;
|
|
14
|
+
if (!Array.isArray(ranges?.values) || ranges.values.length === 0) {
|
|
15
|
+
continue;
|
|
16
|
+
}
|
|
17
|
+
output[id] = buildPublicationString({ spectrum, acs });
|
|
18
|
+
}
|
|
19
|
+
return output;
|
|
20
|
+
}
|
|
21
|
+
export function buildPublicationString(options) {
|
|
22
|
+
const { spectrum, acs } = options;
|
|
23
|
+
assert(isSpectrum1D(spectrum));
|
|
24
|
+
const { info, ranges: { values }, } = spectrum;
|
|
25
|
+
const { originFrequency, nucleus } = info;
|
|
26
|
+
const { signalKind, format, couplingFormat, ...otherOptions } = acs;
|
|
27
|
+
const ranges = signalKind === 'all'
|
|
28
|
+
? values
|
|
29
|
+
: values.filter((range) => range.signals?.some((signal) => signal.kind === 'signal'));
|
|
30
|
+
const rangesToACSOptions = {
|
|
31
|
+
nucleus,
|
|
32
|
+
observedFrequency: originFrequency,
|
|
33
|
+
...otherOptions,
|
|
34
|
+
format: '',
|
|
35
|
+
};
|
|
36
|
+
if (format !== 'D') {
|
|
37
|
+
rangesToACSOptions.format = format;
|
|
38
|
+
rangesToACSOptions.couplingFormat = couplingFormat;
|
|
39
|
+
}
|
|
40
|
+
return rangesToACS(ranges, rangesToACSOptions);
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=use_publication_strings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use_publication_strings.js","sourceRoot":"","sources":["../../../src/component/hooks/use_publication_strings.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,OAAO,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAErE,OAAO,yBAAyB,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAE7D,MAAM,UAAU,qBAAqB;IACnC,MAAM,OAAO,GAA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B,GAAuB;QAC7C,OAAO;QACP,iBAAiB,EAAE,eAAe;QAClC,GAAG,YAAY;QACf,MAAM,EAAE,EAAE;KACX,CAAC;IAEF,IAAI,MAAM,KAAK,GAAG,EAAE,CAAC;QACnB,kBAAkB,CAAC,MAAM,GAAG,MAAM,CAAC;QACnC,kBAAkB,CAAC,cAAc,GAAG,cAAc,CAAC;IACrD,CAAC;IAED,OAAO,WAAW,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;AACjD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLoadFiles.d.ts","sourceRoot":"","sources":["../../../src/component/loader/useLoadFiles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useLoadFiles.d.ts","sourceRoot":"","sources":["../../../src/component/loader/useLoadFiles.ts"],"names":[],"mappings":"AAgBA,wBAAgB,YAAY,CAAC,qBAAqB,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,WAoH7D,IAAI,EAAE,UAcjB"}
|
|
@@ -15,102 +15,97 @@ export function useLoadFiles(onOpenMetaInformation) {
|
|
|
15
15
|
const { logger } = useLogger();
|
|
16
16
|
const experimentalFeatures = useCheckExperimentalFeature();
|
|
17
17
|
const core = useCore();
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
onOpenMetaInformation(files[0]);
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
const nmriumArchiveFiles = [];
|
|
28
|
-
const otherFiles = [];
|
|
29
|
-
let nmriumState;
|
|
30
|
-
let containsNmrium;
|
|
31
|
-
let parseMetaFileResult = null;
|
|
32
|
-
const { onLoadProcessing, spectraColors, defaultMoleculeSettings } = workspacePreferences;
|
|
33
|
-
const { nmrLoaders: selector } = preferences.current;
|
|
34
|
-
const parsingOptions = {
|
|
35
|
-
selector,
|
|
36
|
-
logger: logger.child({ context: 'nmr-processing' }),
|
|
37
|
-
onLoadProcessing,
|
|
38
|
-
experimentalFeatures,
|
|
39
|
-
};
|
|
40
|
-
let aggregator;
|
|
41
|
-
let fileCollection;
|
|
42
|
-
let selectorRoot;
|
|
43
|
-
let resetSourceObject = false;
|
|
44
|
-
if (files.length === 1 && files[0].name.endsWith('.nmrium.zip')) {
|
|
45
|
-
const [state, ium] = await core.readNMRiumArchive(files[0].stream(), parsingOptions);
|
|
46
|
-
nmriumState = state;
|
|
47
|
-
containsNmrium = true;
|
|
48
|
-
aggregator = ium;
|
|
49
|
-
}
|
|
50
|
-
else {
|
|
51
|
-
for (const file of files) {
|
|
52
|
-
if (file.name.endsWith('.nmrium.zip')) {
|
|
53
|
-
nmriumArchiveFiles.push(file);
|
|
54
|
-
}
|
|
55
|
-
else {
|
|
56
|
-
otherFiles.push(file);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
if (nmriumArchiveFiles.length > 0) {
|
|
60
|
-
await Promise.all(nmriumArchiveFiles.map((file) => loadFiles([file])));
|
|
61
|
-
}
|
|
62
|
-
fileCollection = await new FileCollection().appendFileList(otherFiles);
|
|
63
|
-
const metaFile = Object.values(fileCollection.files).find((file) => isMetaFile(file));
|
|
64
|
-
if (metaFile) {
|
|
65
|
-
parseMetaFileResult = await parseMetaFile(metaFile);
|
|
66
|
-
}
|
|
67
|
-
({ nmriumState, containsNmrium, selectorRoot } = await core.read(fileCollection, parsingOptions));
|
|
68
|
-
if (containsNmrium) {
|
|
69
|
-
resetSourceObject = true;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
if (nmriumState.settings) {
|
|
73
|
-
dispatchPreferences({
|
|
74
|
-
type: 'SET_WORKSPACE',
|
|
75
|
-
payload: {
|
|
76
|
-
data: nmriumState.settings,
|
|
77
|
-
workspaceSource: 'nmriumFile',
|
|
78
|
-
},
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
dispatch({
|
|
82
|
-
type: 'LOAD_DROP_FILES',
|
|
18
|
+
const dispatchPayload = useCallback((payload) => {
|
|
19
|
+
const { nmriumState } = payload;
|
|
20
|
+
const { spectraColors, defaultMoleculeSettings } = workspacePreferences;
|
|
21
|
+
if (nmriumState.settings) {
|
|
22
|
+
dispatchPreferences({
|
|
23
|
+
type: 'SET_WORKSPACE',
|
|
83
24
|
payload: {
|
|
84
|
-
nmriumState,
|
|
85
|
-
|
|
86
|
-
parseMetaFileResult,
|
|
87
|
-
spectraColors,
|
|
88
|
-
aggregator,
|
|
89
|
-
fileCollection,
|
|
90
|
-
selectorRoot,
|
|
91
|
-
resetSourceObject,
|
|
92
|
-
defaultMoleculeSettings,
|
|
25
|
+
data: nmriumState.settings,
|
|
26
|
+
workspaceSource: 'nmriumFile',
|
|
93
27
|
},
|
|
94
28
|
});
|
|
95
29
|
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
30
|
+
dispatch({
|
|
31
|
+
type: 'LOAD_DROP_FILES',
|
|
32
|
+
payload: { ...payload, spectraColors, defaultMoleculeSettings },
|
|
33
|
+
});
|
|
34
|
+
}, [dispatch, dispatchPreferences, workspacePreferences]);
|
|
35
|
+
const loadNmriumArchives = useCallback(async (file, parsingOptions) => {
|
|
36
|
+
const [nmriumState, aggregator] = await core.readNMRiumArchive(file.stream(), parsingOptions);
|
|
37
|
+
dispatchPayload({ nmriumState, aggregator, containsNmrium: true });
|
|
38
|
+
}, [core, dispatchPayload]);
|
|
39
|
+
const loadFileCollection = useCallback(async (fileCollection, metaFile, parsingOptions) => {
|
|
40
|
+
const parseMetaFileResult = metaFile
|
|
41
|
+
? await parseMetaFile(metaFile)
|
|
42
|
+
: null;
|
|
43
|
+
const { nmriumState, containsNmrium, selectorRoot, fileCollection: sanitizedCollection, } = await core.read(fileCollection, parsingOptions);
|
|
44
|
+
const resetSourceObject = containsNmrium;
|
|
45
|
+
dispatchPayload({
|
|
46
|
+
nmriumState,
|
|
47
|
+
containsNmrium,
|
|
48
|
+
parseMetaFileResult,
|
|
49
|
+
fileCollection: sanitizedCollection,
|
|
50
|
+
selectorRoot,
|
|
51
|
+
resetSourceObject,
|
|
103
52
|
});
|
|
53
|
+
}, [core, dispatchPayload]);
|
|
54
|
+
const currentPreferences = preferences.current;
|
|
55
|
+
const loadUserFiles = useCallback(async (files) => {
|
|
56
|
+
if (onOpenMetaInformation && files.length === 1 && isMetaFile(files[0])) {
|
|
57
|
+
onOpenMetaInformation(files[0]);
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
const { onLoadProcessing } = workspacePreferences;
|
|
61
|
+
const { nmrLoaders: selector } = currentPreferences;
|
|
62
|
+
const parsingOptions = {
|
|
63
|
+
selector,
|
|
64
|
+
logger: logger.child({ context: 'nmr-processing' }),
|
|
65
|
+
onLoadProcessing,
|
|
66
|
+
experimentalFeatures,
|
|
67
|
+
};
|
|
68
|
+
const groupedFiles = await groupFiles(files);
|
|
69
|
+
const { nmriumArchiveFiles, fileCollection, metaFile } = groupedFiles;
|
|
70
|
+
if (nmriumArchiveFiles.length > 0) {
|
|
71
|
+
await Promise.all(nmriumArchiveFiles.map((file) => loadNmriumArchives(file, parsingOptions)));
|
|
72
|
+
}
|
|
73
|
+
await loadFileCollection(fileCollection, metaFile, parsingOptions);
|
|
104
74
|
}, [
|
|
105
|
-
core,
|
|
106
|
-
dispatch,
|
|
107
|
-
dispatchPreferences,
|
|
108
75
|
experimentalFeatures,
|
|
76
|
+
loadFileCollection,
|
|
77
|
+
loadNmriumArchives,
|
|
109
78
|
logger,
|
|
110
79
|
onOpenMetaInformation,
|
|
111
|
-
|
|
112
|
-
toaster,
|
|
80
|
+
currentPreferences,
|
|
113
81
|
workspacePreferences,
|
|
114
82
|
]);
|
|
83
|
+
return useCallback((files) => {
|
|
84
|
+
dispatch({ type: 'SET_LOADING_FLAG', payload: { isLoading: true } });
|
|
85
|
+
loadUserFiles(files)
|
|
86
|
+
.catch((error) => {
|
|
87
|
+
toaster.show({ message: error.message, intent: 'danger' });
|
|
88
|
+
logger.error(error);
|
|
89
|
+
})
|
|
90
|
+
.finally(() => {
|
|
91
|
+
dispatch({ type: 'SET_LOADING_FLAG', payload: { isLoading: false } });
|
|
92
|
+
});
|
|
93
|
+
}, [dispatch, loadUserFiles, logger, toaster]);
|
|
94
|
+
}
|
|
95
|
+
async function groupFiles(files) {
|
|
96
|
+
const nmriumArchiveFiles = [];
|
|
97
|
+
const otherFiles = [];
|
|
98
|
+
for (const file of files) {
|
|
99
|
+
// eslint-disable-next-line no-await-in-loop
|
|
100
|
+
const header = await file.slice(0, 128).arrayBuffer();
|
|
101
|
+
if (FileCollection.isIum(header, 'chemical/x-nmrium+zip')) {
|
|
102
|
+
nmriumArchiveFiles.push(file);
|
|
103
|
+
continue;
|
|
104
|
+
}
|
|
105
|
+
otherFiles.push(file);
|
|
106
|
+
}
|
|
107
|
+
const fileCollection = await new FileCollection().appendFileList(otherFiles);
|
|
108
|
+
const metaFile = Object.values(fileCollection.files).find((file) => isMetaFile(file));
|
|
109
|
+
return { nmriumArchiveFiles, fileCollection, metaFile };
|
|
115
110
|
}
|
|
116
111
|
//# sourceMappingURL=useLoadFiles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLoadFiles.js","sourceRoot":"","sources":["../../../src/component/loader/useLoadFiles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useLoadFiles.js","sourceRoot":"","sources":["../../../src/component/loader/useLoadFiles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAEpC,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AAEpD,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,SAAS,EAA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,IAAI,EAAE,kBAAkB,EAAE,OAAO,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;QACxE,CAAC,CAAC,CAAC;IACP,CAAC,EACD,CAAC,QAAQ,EAAE,aAAa,EAAE,MAAM,EAAE,OAAO,CAAC,CAC3C,CAAC;AACJ,CAAC;AAED,KAAK,UAAU,UAAU,CAAC,KAAa;IACrC,MAAM,kBAAkB,GAAW,EAAE,CAAC;IACtC,MAAM,UAAU,GAAW,EAAE,CAAC;IAE9B,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,4CAA4C;QAC5C,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC;QAEtD,IAAI,cAAc,CAAC,KAAK,CAAC,MAAM,EAAE,uBAAuB,CAAC,EAAE,CAAC;YAC1D,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC9B,SAAS;QACX,CAAC;QAED,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC;IAED,MAAM,cAAc,GAAG,MAAM,IAAI,cAAc,EAAE,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;IAC7E,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CACjE,UAAU,CAAC,IAAI,CAAC,CACjB,CAAC;IAEF,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,QAAQ,EAAE,CAAC;AAC1D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorOverlay.d.ts","sourceRoot":"","sources":["../../../src/component/main/ErrorOverlay.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ErrorOverlay.d.ts","sourceRoot":"","sources":["../../../src/component/main/ErrorOverlay.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAmB1D,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAK,EAAE,aAAa,2CAkBxD"}
|
|
@@ -16,6 +16,11 @@ const Details = styled.details `
|
|
|
16
16
|
white-space: pre-wrap;
|
|
17
17
|
`;
|
|
18
18
|
export default function ErrorOverlay(props) {
|
|
19
|
-
|
|
19
|
+
const error = props.error;
|
|
20
|
+
const message = error && typeof error === 'object' && 'message' in error
|
|
21
|
+
? error.message
|
|
22
|
+
: null;
|
|
23
|
+
const stack = error && typeof error === 'object' && 'stack' in error ? error.stack : null;
|
|
24
|
+
return (_jsxs("div", { style: { margin: 25 }, children: [_jsx(WrongP, { children: "Something went wrong." }), _jsxs(Details, { children: [_jsx("p", { style: { textDecoration: 'underline' }, children: message }), stack] })] }));
|
|
20
25
|
}
|
|
21
26
|
//# sourceMappingURL=ErrorOverlay.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorOverlay.js","sourceRoot":"","sources":["../../../src/component/main/ErrorOverlay.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"ErrorOverlay.js","sourceRoot":"","sources":["../../../src/component/main/ErrorOverlay.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAIrC,MAAM,MAAM,GAAG,MAAM,CAAC,CAAC,CAAA;;;;;;CAMtB,CAAC;AAEF,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAA;;;;;;;CAO7B,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAoB;IACvD,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;IAC1B,MAAM,OAAO,GACX,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,IAAI,KAAK;QACtD,CAAC,CAAC,KAAK,CAAC,OAAO;QACf,CAAC,CAAC,IAAI,CAAC;IACX,MAAM,KAAK,GACT,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;IAE9E,OAAO,CACL,eAAK,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,aACxB,KAAC,MAAM,wCAA+B,EACtC,MAAC,OAAO,eACN,YAAG,KAAK,EAAE,EAAE,cAAc,EAAE,WAAW,EAAE,YAAG,OAAoB,GAAK,EACpE,KAAkB,IACX,IACN,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InnerNMRiumContents.d.ts","sourceRoot":"","sources":["../../../src/component/main/InnerNMRiumContents.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAyB,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"InnerNMRiumContents.d.ts","sourceRoot":"","sources":["../../../src/component/main/InnerNMRiumContents.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAyB,SAAS,EAAE,MAAM,OAAO,CAAC;AAoB5E,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AA6C5D,UAAU,wBAAwB;IAChC,SAAS,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC;IACpC,UAAU,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;IACtC,kBAAkB,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;IAC9C,OAAO,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;IACnC,SAAS,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;IACrC,MAAM,EAAE,YAAY,CAAC,YAAY,CAAC,CAAC;CACpC;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,2CAuGlE"}
|
|
@@ -11,7 +11,6 @@ import { ExportManagerController } from '../elements/export/ExportManager.js';
|
|
|
11
11
|
import { PrintContent } from '../elements/print/PrintContent.js';
|
|
12
12
|
import { Header } from '../header/Header.js';
|
|
13
13
|
import DropZone from '../loader/DropZone.js';
|
|
14
|
-
import { PanelOpenProviderProvider } from '../panels/Panels.js';
|
|
15
14
|
import { PanelsBar } from '../panels/PanelsBar.js';
|
|
16
15
|
import ToolBar from '../toolbar/ToolBar.js';
|
|
17
16
|
import { useNMRiumRefAPI } from './NMRiumRefAPI.js';
|
|
@@ -92,7 +91,7 @@ export function InnerNMRiumContents(props) {
|
|
|
92
91
|
display: 'flex',
|
|
93
92
|
flexDirection: 'row',
|
|
94
93
|
height: '100%',
|
|
95
|
-
}, children: [_jsx(KeysListenerTracker, { mainDivRef: mainDivRef }),
|
|
94
|
+
}, children: [_jsx(KeysListenerTracker, { mainDivRef: mainDivRef }), _jsx(ToolBar, {}), _jsx(NMRiumViewerWrapper, { viewerRef: viewerRef, emptyText: emptyText }), _jsx(PanelsBar, {}), _jsx("div", { ref: elementsWrapperRef, id: "main-wrapper", style: {
|
|
96
95
|
position: 'absolute',
|
|
97
96
|
pointerEvents: 'none',
|
|
98
97
|
zIndex: 10,
|