nmrium 1.11.0 → 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/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 +2 -2
- 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 +3 -3
- 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 +4 -4
- 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 +6 -0
- 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/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/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.js +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.js +1 -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/main/NMRiumViewer.js +1 -1
- 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 +3 -5
- 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.map +1 -1
- package/lib/component/modal/MoleculeAutoLabelsDatabaseModal.js +4 -3
- package/lib/component/modal/MoleculeAutoLabelsDatabaseModal.js.map +1 -1
- 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 +3 -2
- 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/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 +7 -7
- 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.map +1 -1
- package/lib/component/panels/Panels.js +12 -25
- 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/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.js +4 -4
- package/lib/component/reducer/actions/LoadAction.js.map +1 -1
- package/lib/component/reducer/actions/MoleculeActions.js +3 -3
- 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 +1 -1
- package/lib/component/reducer/actions/SpectraActions.js +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/toggleOpenSplitPanel.d.ts +1 -1
- package/lib/component/reducer/preferences/actions/toggleOpenSplitPanel.js +1 -1
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js +1 -1
- package/lib/component/reducer/preferences/preferencesReducer.js +3 -3
- package/lib/component/toolbar/ToolBar.d.ts.map +1 -1
- package/lib/component/toolbar/ToolBar.js +5 -1
- package/lib/component/toolbar/ToolBar.js.map +1 -1
- package/lib/component/utility/export.js +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/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 +29 -29
- package/src/component/1d/FloatPublicationString.tsx +275 -176
- package/src/component/1d/FloatingRanges.tsx +1 -2
- package/src/component/1d/SVGContent1D.tsx +1 -1
- package/src/component/1d/inset/DraggableInset.tsx +2 -3
- 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 +3 -4
- 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 +6 -0
- 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/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 +1 -1
- package/src/component/hooks/useSVGUnitConverter.ts +13 -9
- package/src/component/hooks/useSaveSettings.tsx +4 -3
- package/src/component/hooks/useSetActiveSpectrumAction.ts +1 -1
- 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/main/NMRiumViewer.tsx +1 -1
- package/src/component/main/NMRiumViewerWrapper.tsx +3 -5
- 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 +5 -4
- 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 +4 -9
- package/src/component/modal/aboutUs/AboutUsModal.tsx +3 -3
- package/src/component/modal/changeSum/ChangeSumModal.tsx +4 -3
- 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 +14 -8
- 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 +4 -40
- 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/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 +4 -4
- package/src/component/reducer/actions/MoleculeActions.ts +3 -3
- package/src/component/reducer/actions/PreferencesActions.ts +1 -1
- package/src/component/reducer/actions/RangesActions.ts +3 -3
- package/src/component/reducer/actions/SpectraActions.ts +1 -1
- 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/toggleOpenSplitPanel.ts +2 -2
- package/src/component/reducer/preferences/panelsPreferencesDefaultValues.ts +1 -1
- package/src/component/reducer/preferences/preferencesReducer.ts +3 -3
- package/src/component/toolbar/ToolBar.tsx +6 -1
- package/src/component/utility/export.ts +1 -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/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,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DialogBody, DialogFooter } from '@blueprintjs/core';
|
|
2
2
|
import { yupResolver } from '@hookform/resolvers/yup';
|
|
3
3
|
import type { ParseResult } from 'papaparse';
|
|
4
4
|
import type { CSSProperties } from 'react';
|
|
@@ -24,6 +24,7 @@ import Label from '../../elements/Label.js';
|
|
|
24
24
|
import type { Column } from '../../elements/ReactTable/ReactTable.js';
|
|
25
25
|
import ReactTable from '../../elements/ReactTable/ReactTable.js';
|
|
26
26
|
import { Select2Controller } from '../../elements/Select2Controller.js';
|
|
27
|
+
import { StandardDialog } from '../../elements/StandardDialog.tsx';
|
|
27
28
|
import { convertPathArrayToString } from '../../utility/convertPathArrayToString.js';
|
|
28
29
|
import { getSpectraObjectPaths } from '../../utility/getSpectraObjectPaths.js';
|
|
29
30
|
|
|
@@ -103,14 +104,14 @@ export function MetaImportationModal(props: MetaImportationModalPropsProps) {
|
|
|
103
104
|
if (!isOpen) return null;
|
|
104
105
|
|
|
105
106
|
return (
|
|
106
|
-
<
|
|
107
|
+
<StandardDialog
|
|
107
108
|
isOpen
|
|
108
109
|
title="Import meta information"
|
|
109
110
|
style={{ width: 900, height: 600 }}
|
|
110
111
|
onClose={onCloseDialog}
|
|
111
112
|
>
|
|
112
113
|
<InnerMetaImportationModal {...{ onCloseDialog, file }} />
|
|
113
|
-
</
|
|
114
|
+
</StandardDialog>
|
|
114
115
|
);
|
|
115
116
|
}
|
|
116
117
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Classes,
|
|
1
|
+
import { Classes, DialogFooter, Tab, Tabs } from '@blueprintjs/core';
|
|
2
2
|
import styled from '@emotion/styled';
|
|
3
3
|
import { yupResolver } from '@hookform/resolvers/yup';
|
|
4
4
|
import type { Workspace } from '@zakodium/nmrium-core';
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
useFormContext,
|
|
11
11
|
useWatch,
|
|
12
12
|
} from 'react-hook-form';
|
|
13
|
-
import { FaBolt, FaPaste, FaRegCopy, FaWrench } from 'react-icons/fa';
|
|
13
|
+
import { FaBolt, FaCogs, FaPaste, FaRegCopy, FaWrench } from 'react-icons/fa';
|
|
14
14
|
import { Button, Toolbar, useOnOff } from 'react-science/ui';
|
|
15
15
|
|
|
16
16
|
import { ClipboardFallbackModal } from '../../../utils/clipboard/clipboardComponents.js';
|
|
@@ -23,9 +23,11 @@ import { useToaster } from '../../context/ToasterContext.js';
|
|
|
23
23
|
import ActionButtons from '../../elements/ActionButtons.js';
|
|
24
24
|
import type { LabelStyle } from '../../elements/Label.js';
|
|
25
25
|
import Label from '../../elements/Label.js';
|
|
26
|
+
import { StandardDialog } from '../../elements/StandardDialog.tsx';
|
|
26
27
|
import { StyledDialogBody } from '../../elements/StyledDialogBody.js';
|
|
27
28
|
import type { DropDownListItem } from '../../elements/dropDownButton/DropDownButton.js';
|
|
28
29
|
import DropDownButton from '../../elements/dropDownButton/DropDownButton.js';
|
|
30
|
+
import useCheckExperimentalFeature from '../../hooks/useCheckExperimentalFeature.js';
|
|
29
31
|
import { useSaveSettings } from '../../hooks/useSaveSettings.js';
|
|
30
32
|
import { useWorkspaceAction } from '../../hooks/useWorkspaceAction.js';
|
|
31
33
|
import type { WorkspaceWithSource } from '../../reducer/preferences/preferencesReducer.js';
|
|
@@ -45,6 +47,7 @@ import OnLoadProcessingTabContent from './settings-tabs/OnLoadProcessingTabConte
|
|
|
45
47
|
import SpectraColorsTabContent from './settings-tabs/SpectraColorsTabContent.js';
|
|
46
48
|
import ToolsTabContent from './settings-tabs/ToolsTabContent.js';
|
|
47
49
|
import { validation } from './settingsValidation.js';
|
|
50
|
+
import { GeneralSettings } from './tanstack_general_settings/general_settings.js';
|
|
48
51
|
|
|
49
52
|
export const Section = styled.div`
|
|
50
53
|
border-bottom: 0.55px solid #f9f9f9;
|
|
@@ -116,9 +119,19 @@ interface GeneralSettingsModalProps {
|
|
|
116
119
|
|
|
117
120
|
function GeneralSettingsModal(props: GeneralSettingsModalProps) {
|
|
118
121
|
const { ...otherProps } = props;
|
|
122
|
+
|
|
119
123
|
const [isOpenDialog, openDialog, closeDialog] = useOnOff(false);
|
|
124
|
+
const [
|
|
125
|
+
isOpenGeneralSettingsDialog,
|
|
126
|
+
openGeneralSettingsDialog,
|
|
127
|
+
closeGeneralSettingsDialog,
|
|
128
|
+
] = useOnOff(false);
|
|
129
|
+
|
|
120
130
|
const { saveSettings, SaveSettingsModal } = useSaveSettings();
|
|
121
131
|
|
|
132
|
+
// Boolean to check if we have to render the new general settings dialog
|
|
133
|
+
const isExperimentalFeatures = useCheckExperimentalFeature();
|
|
134
|
+
|
|
122
135
|
return (
|
|
123
136
|
<>
|
|
124
137
|
<Toolbar.Item
|
|
@@ -127,7 +140,16 @@ function GeneralSettingsModal(props: GeneralSettingsModalProps) {
|
|
|
127
140
|
tooltip="General settings"
|
|
128
141
|
icon={<FaWrench />}
|
|
129
142
|
/>
|
|
143
|
+
{isExperimentalFeatures && (
|
|
144
|
+
<Toolbar.Item
|
|
145
|
+
id="general-settings"
|
|
146
|
+
onClick={openGeneralSettingsDialog}
|
|
147
|
+
tooltip="General settings [dev]"
|
|
148
|
+
icon={<FaCogs />}
|
|
149
|
+
/>
|
|
150
|
+
)}
|
|
130
151
|
<SaveSettingsModal />
|
|
152
|
+
|
|
131
153
|
{isOpenDialog && (
|
|
132
154
|
<InnerGeneralSettingsModal
|
|
133
155
|
{...otherProps}
|
|
@@ -135,6 +157,14 @@ function GeneralSettingsModal(props: GeneralSettingsModalProps) {
|
|
|
135
157
|
onSave={saveSettings}
|
|
136
158
|
/>
|
|
137
159
|
)}
|
|
160
|
+
|
|
161
|
+
{isOpenGeneralSettingsDialog && (
|
|
162
|
+
<GeneralSettings
|
|
163
|
+
height={otherProps.height}
|
|
164
|
+
isOpen={isOpenGeneralSettingsDialog}
|
|
165
|
+
close={closeGeneralSettingsDialog}
|
|
166
|
+
/>
|
|
167
|
+
)}
|
|
138
168
|
</>
|
|
139
169
|
);
|
|
140
170
|
}
|
|
@@ -224,7 +254,7 @@ function InnerGeneralSettingsModal(props: InnerGeneralSettingsModalProps) {
|
|
|
224
254
|
|
|
225
255
|
return (
|
|
226
256
|
<FormProvider {...methods}>
|
|
227
|
-
<
|
|
257
|
+
<StandardDialog
|
|
228
258
|
isOpen
|
|
229
259
|
onClose={onCloseDialog}
|
|
230
260
|
style={{ maxWidth: 1000, width: '50vw', minWidth: 800 }}
|
|
@@ -320,7 +350,7 @@ function InnerGeneralSettingsModal(props: InnerGeneralSettingsModalProps) {
|
|
|
320
350
|
<DialogFooter>
|
|
321
351
|
<DialogActionButtons onCloseDialog={onCloseDialog} onSave={onSave} />
|
|
322
352
|
</DialogFooter>
|
|
323
|
-
</
|
|
353
|
+
</StandardDialog>
|
|
324
354
|
</FormProvider>
|
|
325
355
|
);
|
|
326
356
|
}
|
|
@@ -15,7 +15,7 @@ import type { NMRiumWorkspace } from '../../../main/index.js';
|
|
|
15
15
|
import type { WorkspaceWithSource } from '../../../reducer/preferences/preferencesReducer.js';
|
|
16
16
|
import { getPreferencesByWorkspace } from '../../../reducer/preferences/utilities/getPreferencesByWorkspace.js';
|
|
17
17
|
import { isGoogleDocument } from '../../../utility/isGoogleDocument.js';
|
|
18
|
-
import { Section } from '../
|
|
18
|
+
import { Section } from '../general_settings.js';
|
|
19
19
|
|
|
20
20
|
const StyledButton = styled(Button, {
|
|
21
21
|
shouldForwardProp(propName) {
|
|
@@ -10,7 +10,7 @@ import ReactTable from '../../../elements/ReactTable/ReactTable.js';
|
|
|
10
10
|
import type { CustomColumn } from '../../../elements/ReactTable/utility/addCustomColumn.js';
|
|
11
11
|
import { Select2 } from '../../../elements/Select2.js';
|
|
12
12
|
import type { WorkspaceWithSource } from '../../../reducer/preferences/preferencesReducer.js';
|
|
13
|
-
import { settingLabelStyle } from '../
|
|
13
|
+
import { settingLabelStyle } from '../general_settings.js';
|
|
14
14
|
|
|
15
15
|
const basePath = 'display.panels';
|
|
16
16
|
interface ListItem {
|
|
@@ -13,7 +13,7 @@ import type { Column } from '../../../elements/ReactTable/ReactTable.js';
|
|
|
13
13
|
import ReactTable from '../../../elements/ReactTable/ReactTable.js';
|
|
14
14
|
import { Select2Controller } from '../../../elements/Select2Controller.js';
|
|
15
15
|
import type { WorkspaceWithSource } from '../../../reducer/preferences/preferencesReducer.js';
|
|
16
|
-
import { Section } from '../
|
|
16
|
+
import { Section } from '../general_settings.js';
|
|
17
17
|
|
|
18
18
|
function getKeyPath<T extends keyof ExternalAPI>(
|
|
19
19
|
index: number,
|
|
@@ -7,7 +7,7 @@ import Label from '../../../elements/Label.js';
|
|
|
7
7
|
import { NumberInput2Controller } from '../../../elements/NumberInput2Controller.js';
|
|
8
8
|
import { Select2 } from '../../../elements/Select2.js';
|
|
9
9
|
import type { WorkspaceWithSource } from '../../../reducer/preferences/preferencesReducer.js';
|
|
10
|
-
import { settingLabelStyle } from '../
|
|
10
|
+
import { settingLabelStyle } from '../general_settings.js';
|
|
11
11
|
|
|
12
12
|
interface SelectItem {
|
|
13
13
|
label: string;
|
|
@@ -15,7 +15,7 @@ import ReactTable from '../../../elements/ReactTable/ReactTable.js';
|
|
|
15
15
|
import type { WorkspaceWithSource } from '../../../reducer/preferences/preferencesReducer.js';
|
|
16
16
|
import { convertPathArrayToString } from '../../../utility/convertPathArrayToString.js';
|
|
17
17
|
import { getSpectraObjectPaths } from '../../../utility/getSpectraObjectPaths.js';
|
|
18
|
-
import { Section, settingLabelStyle } from '../
|
|
18
|
+
import { Section, settingLabelStyle } from '../general_settings.js';
|
|
19
19
|
|
|
20
20
|
function getKeyPath<T extends keyof InfoBlockField>(
|
|
21
21
|
index: number,
|
|
@@ -12,7 +12,7 @@ import { NumberInput2Controller } from '../../../elements/NumberInput2Controller
|
|
|
12
12
|
import type { Column } from '../../../elements/ReactTable/ReactTable.js';
|
|
13
13
|
import ReactTable from '../../../elements/ReactTable/ReactTable.js';
|
|
14
14
|
import type { WorkspaceWithSource } from '../../../reducer/preferences/preferencesReducer.js';
|
|
15
|
-
import { Section } from '../
|
|
15
|
+
import { Section } from '../general_settings.js';
|
|
16
16
|
|
|
17
17
|
function getKeyPath<T extends keyof NucleiPreferences>(
|
|
18
18
|
index: number,
|
|
@@ -12,7 +12,7 @@ import Label from '../../../elements/Label.js';
|
|
|
12
12
|
import ReactTable from '../../../elements/ReactTable/ReactTable.js';
|
|
13
13
|
import type { CustomColumn } from '../../../elements/ReactTable/utility/addCustomColumn.js';
|
|
14
14
|
import type { WorkspaceWithSource } from '../../../reducer/preferences/preferencesReducer.js';
|
|
15
|
-
import { settingLabelStyle } from '../
|
|
15
|
+
import { settingLabelStyle } from '../general_settings.js';
|
|
16
16
|
|
|
17
17
|
function OnLoadProcessingTabContent() {
|
|
18
18
|
const { register, watch } = useFormContext<WorkspacePreferences>();
|
|
@@ -17,7 +17,7 @@ import ReactTable from '../../../elements/ReactTable/ReactTable.js';
|
|
|
17
17
|
import type { WorkspaceWithSource } from '../../../reducer/preferences/preferencesReducer.js';
|
|
18
18
|
import { convertPathArrayToString } from '../../../utility/convertPathArrayToString.js';
|
|
19
19
|
import { getSpectraObjectPaths } from '../../../utility/getSpectraObjectPaths.js';
|
|
20
|
-
import { Section, settingLabelStyle } from '../
|
|
20
|
+
import { Section, settingLabelStyle } from '../general_settings.js';
|
|
21
21
|
|
|
22
22
|
const colorInputStyle: CSSProperties = {
|
|
23
23
|
minWidth: '80px',
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { Dialog as BPDialog } from '@blueprintjs/core';
|
|
2
|
+
import styled from '@emotion/styled';
|
|
3
|
+
import { revalidateLogic } from '@tanstack/react-form';
|
|
4
|
+
import type { Workspace } from '@zakodium/nmrium-core';
|
|
5
|
+
import lodashMerge from 'lodash/merge.js';
|
|
6
|
+
import { Form, assert, assertUnreachable, useForm } from 'react-science/ui';
|
|
7
|
+
|
|
8
|
+
import { usePreferences } from '../../../context/PreferencesContext.js';
|
|
9
|
+
import { useSaveSettings } from '../../../hooks/useSaveSettings.js';
|
|
10
|
+
|
|
11
|
+
import { GeneralSettingsDialogBody } from './general_settings_dialog_body.js';
|
|
12
|
+
import { GeneralSettingsDialogFooter } from './general_settings_dialog_footer.js';
|
|
13
|
+
import { GeneralSettingsDialogHeader } from './general_settings_dialog_header.js';
|
|
14
|
+
import { workspaceValidation } from './validation.js';
|
|
15
|
+
|
|
16
|
+
interface GeneralSettingsProps {
|
|
17
|
+
isOpen: boolean;
|
|
18
|
+
close: () => void;
|
|
19
|
+
height?: number;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const Dialog = styled(BPDialog)`
|
|
23
|
+
max-width: 1000px;
|
|
24
|
+
width: 50vw;
|
|
25
|
+
min-width: 800px;
|
|
26
|
+
`;
|
|
27
|
+
|
|
28
|
+
type FormMeta = 'apply' | 'save';
|
|
29
|
+
export function GeneralSettings(props: GeneralSettingsProps) {
|
|
30
|
+
const { isOpen, close, height } = props;
|
|
31
|
+
|
|
32
|
+
const { current: currentWorkspace, dispatch } = usePreferences();
|
|
33
|
+
const { saveSettings } = useSaveSettings();
|
|
34
|
+
|
|
35
|
+
function onApply(data: Omit<Workspace, 'version' | 'label'>) {
|
|
36
|
+
dispatch({
|
|
37
|
+
type: 'APPLY_General_PREFERENCES',
|
|
38
|
+
payload: { data },
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
close();
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const form = useForm({
|
|
45
|
+
validators: {
|
|
46
|
+
onDynamic: workspaceValidation,
|
|
47
|
+
},
|
|
48
|
+
validationLogic: revalidateLogic({ mode: 'change' }),
|
|
49
|
+
defaultValues: workspaceValidation.encode(currentWorkspace),
|
|
50
|
+
onSubmitMeta: 'apply' satisfies FormMeta as FormMeta,
|
|
51
|
+
onSubmit: ({ value, meta }) => {
|
|
52
|
+
const safeParseResult = workspaceValidation.safeParse(value);
|
|
53
|
+
|
|
54
|
+
if (!safeParseResult.success) {
|
|
55
|
+
throw new Error('Failed to parse workspace validation');
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const safeValue = safeParseResult.data;
|
|
59
|
+
const mergedValues = lodashMerge({}, currentWorkspace, safeValue);
|
|
60
|
+
|
|
61
|
+
switch (meta) {
|
|
62
|
+
case 'apply':
|
|
63
|
+
onApply(mergedValues);
|
|
64
|
+
break;
|
|
65
|
+
case 'save':
|
|
66
|
+
saveSettings(mergedValues);
|
|
67
|
+
break;
|
|
68
|
+
default:
|
|
69
|
+
assertUnreachable(meta);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
close();
|
|
73
|
+
},
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
return (
|
|
77
|
+
<Dialog isOpen={isOpen} onClose={close} title="General settings" icon="cog">
|
|
78
|
+
<Form
|
|
79
|
+
layout="inline"
|
|
80
|
+
noValidate
|
|
81
|
+
onSubmit={(event) => {
|
|
82
|
+
event.preventDefault();
|
|
83
|
+
|
|
84
|
+
const nativeEvent = event.nativeEvent as SubmitEvent;
|
|
85
|
+
const submitter = nativeEvent.submitter as HTMLButtonElement | null;
|
|
86
|
+
assert(submitter, 'form event should have a submitter');
|
|
87
|
+
const action = submitter.dataset.action;
|
|
88
|
+
|
|
89
|
+
void form.handleSubmit(action as FormMeta);
|
|
90
|
+
}}
|
|
91
|
+
>
|
|
92
|
+
<form.Subscribe selector={(state) => state.values}>
|
|
93
|
+
{(values) => (
|
|
94
|
+
<GeneralSettingsDialogHeader
|
|
95
|
+
reset={form.reset}
|
|
96
|
+
currentValues={values}
|
|
97
|
+
/>
|
|
98
|
+
)}
|
|
99
|
+
</form.Subscribe>
|
|
100
|
+
|
|
101
|
+
<GeneralSettingsDialogBody form={form} height={height} />
|
|
102
|
+
<GeneralSettingsDialogFooter form={form} onCancel={close} />
|
|
103
|
+
</Form>
|
|
104
|
+
</Dialog>
|
|
105
|
+
);
|
|
106
|
+
}
|
package/src/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.tsx
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { Classes, Tab, Tabs as BPTabs } from '@blueprintjs/core';
|
|
2
|
+
import styled from '@emotion/styled';
|
|
3
|
+
import { withForm } from 'react-science/ui';
|
|
4
|
+
|
|
5
|
+
import { StyledDialogBody } from '../../../elements/StyledDialogBody.js';
|
|
6
|
+
|
|
7
|
+
import { ExportTab } from './tabs/export_tab.js';
|
|
8
|
+
import { GeneralTab } from './tabs/general_tab.js';
|
|
9
|
+
import { ImportFiltersTab } from './tabs/import_filters_tab.js';
|
|
10
|
+
import { NucleiTab } from './tabs/nuclei_tab.js';
|
|
11
|
+
import { PanelsTab } from './tabs/panels_tab.js';
|
|
12
|
+
import { defaultGeneralSettingsFormValues } from './validation.js';
|
|
13
|
+
|
|
14
|
+
const Tabs = styled(BPTabs)`
|
|
15
|
+
height: 100%;
|
|
16
|
+
|
|
17
|
+
div[role='tablist'] {
|
|
18
|
+
gap: 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&.${Classes.TABS}.${Classes.VERTICAL} > .${Classes.TAB_PANEL} {
|
|
22
|
+
/* Remove top margin of first form.Section */
|
|
23
|
+
margin-top: -15px;
|
|
24
|
+
|
|
25
|
+
/* Configure positioning and sizing */
|
|
26
|
+
max-height: 100%;
|
|
27
|
+
overflow: auto;
|
|
28
|
+
padding: 0 0.8rem 0.8rem;
|
|
29
|
+
width: 100%;
|
|
30
|
+
}
|
|
31
|
+
`;
|
|
32
|
+
|
|
33
|
+
const Div = styled.div<{ height?: number }>`
|
|
34
|
+
height: ${({ height }) => (height ? `${height}px` : 'auto')};
|
|
35
|
+
`;
|
|
36
|
+
|
|
37
|
+
export const GeneralSettingsDialogBody = withForm({
|
|
38
|
+
defaultValues: defaultGeneralSettingsFormValues,
|
|
39
|
+
props: {
|
|
40
|
+
height: undefined as number | undefined,
|
|
41
|
+
},
|
|
42
|
+
render: ({ height, form }) => {
|
|
43
|
+
return (
|
|
44
|
+
<StyledDialogBody>
|
|
45
|
+
<Div height={height}>
|
|
46
|
+
<Tabs vertical>
|
|
47
|
+
<Tab
|
|
48
|
+
title="General"
|
|
49
|
+
id="general"
|
|
50
|
+
panel={<GeneralTab form={form} />}
|
|
51
|
+
/>
|
|
52
|
+
|
|
53
|
+
<Tab title="Nuclei" id="nuclei" panel={<NucleiTab form={form} />} />
|
|
54
|
+
|
|
55
|
+
<Tab id="panels" title="Panels" panel={<PanelsTab form={form} />} />
|
|
56
|
+
|
|
57
|
+
<Tab
|
|
58
|
+
id="import-filters"
|
|
59
|
+
title="Import filters"
|
|
60
|
+
panel={<ImportFiltersTab form={form} />}
|
|
61
|
+
/>
|
|
62
|
+
|
|
63
|
+
<Tab id="export" title="Export" panel={<ExportTab form={form} />} />
|
|
64
|
+
</Tabs>
|
|
65
|
+
</Div>
|
|
66
|
+
</StyledDialogBody>
|
|
67
|
+
);
|
|
68
|
+
},
|
|
69
|
+
});
|
package/src/component/modal/setting/tanstack_general_settings/general_settings_dialog_footer.tsx
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { DialogFooter } from '@blueprintjs/core';
|
|
2
|
+
import styled from '@emotion/styled';
|
|
3
|
+
import { Button, withForm } from 'react-science/ui';
|
|
4
|
+
|
|
5
|
+
import { defaultGeneralSettingsFormValues } from './validation.js';
|
|
6
|
+
|
|
7
|
+
const Footer = styled.div`
|
|
8
|
+
display: flex;
|
|
9
|
+
justify-content: flex-end;
|
|
10
|
+
gap: 10px;
|
|
11
|
+
`;
|
|
12
|
+
|
|
13
|
+
export const GeneralSettingsDialogFooter = withForm({
|
|
14
|
+
props: {
|
|
15
|
+
onCancel: () => {
|
|
16
|
+
/* empty */
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
defaultValues: defaultGeneralSettingsFormValues,
|
|
20
|
+
render: ({ form, onCancel }) => {
|
|
21
|
+
return (
|
|
22
|
+
<form.AppForm>
|
|
23
|
+
<DialogFooter>
|
|
24
|
+
<Footer>
|
|
25
|
+
<Button variant="outlined" intent="danger" onClick={onCancel}>
|
|
26
|
+
Cancel
|
|
27
|
+
</Button>
|
|
28
|
+
<form.SubmitButton intent="success" data-action="save">
|
|
29
|
+
Apply and Save
|
|
30
|
+
</form.SubmitButton>
|
|
31
|
+
<form.SubmitButton intent="primary" data-action="apply">
|
|
32
|
+
Apply
|
|
33
|
+
</form.SubmitButton>
|
|
34
|
+
</Footer>
|
|
35
|
+
</DialogFooter>
|
|
36
|
+
</form.AppForm>
|
|
37
|
+
);
|
|
38
|
+
},
|
|
39
|
+
});
|
package/src/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.tsx
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { Classes } from '@blueprintjs/core';
|
|
2
|
+
import styled from '@emotion/styled';
|
|
3
|
+
import type { Workspace } from '@zakodium/nmrium-core';
|
|
4
|
+
import { useMemo } from 'react';
|
|
5
|
+
|
|
6
|
+
import type { ExtendedWorkspace } from '../../../context/PreferencesContext.js';
|
|
7
|
+
import {
|
|
8
|
+
usePreferences,
|
|
9
|
+
useWorkspacesList,
|
|
10
|
+
} from '../../../context/PreferencesContext.js';
|
|
11
|
+
import Label from '../../../elements/Label.js';
|
|
12
|
+
import type { DropDownListItem } from '../../../elements/dropDownButton/DropDownButton.js';
|
|
13
|
+
import DropDownButton from '../../../elements/dropDownButton/DropDownButton.js';
|
|
14
|
+
import { useWorkspaceAction } from '../../../hooks/useWorkspaceAction.js';
|
|
15
|
+
import WorkspaceItem from '../WorkspaceItem.js';
|
|
16
|
+
|
|
17
|
+
import { GeneralSettingsDialogHeaderActionsButtons } from './general_settings_dialog_header_actions_buttons.js';
|
|
18
|
+
|
|
19
|
+
interface GeneralSettingsDialogHeaderProps<T extends object> {
|
|
20
|
+
reset: (values?: T) => void;
|
|
21
|
+
currentValues: T;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function GeneralSettingsDialogHeader<T extends object>(
|
|
25
|
+
props: GeneralSettingsDialogHeaderProps<T>,
|
|
26
|
+
) {
|
|
27
|
+
const { reset, currentValues } = props;
|
|
28
|
+
|
|
29
|
+
const baseWorkspaces = useWorkspacesList();
|
|
30
|
+
const { workspaces, ...preferences } = usePreferences();
|
|
31
|
+
|
|
32
|
+
const { addNewWorkspace, removeWorkspace, setActiveWorkspace } =
|
|
33
|
+
useWorkspaceAction();
|
|
34
|
+
|
|
35
|
+
const workspacesList = useMemo(() => {
|
|
36
|
+
return baseWorkspaces.concat([
|
|
37
|
+
{
|
|
38
|
+
key: 'new',
|
|
39
|
+
label: 'Custom workspace',
|
|
40
|
+
} as any,
|
|
41
|
+
]);
|
|
42
|
+
}, [baseWorkspaces]);
|
|
43
|
+
|
|
44
|
+
function handleChangeWorkspace(option: DropDownListItem) {
|
|
45
|
+
setActiveWorkspace(option.key);
|
|
46
|
+
reset(workspaces[option.key] as T);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function handleDeleteWorkspace(key: string) {
|
|
50
|
+
const isActiveWorkspace = removeWorkspace(key);
|
|
51
|
+
|
|
52
|
+
if (!isActiveWorkspace) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
reset(workspaces.default as T);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function handleAddWorkspace(name: string) {
|
|
60
|
+
// TODO: change the as when the full form is done.
|
|
61
|
+
addNewWorkspace(name, currentValues as Workspace);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function renderItem(item: DropDownListItem) {
|
|
65
|
+
return (
|
|
66
|
+
<WorkspaceItem
|
|
67
|
+
item={item}
|
|
68
|
+
onSave={handleAddWorkspace}
|
|
69
|
+
onDelete={handleDeleteWorkspace}
|
|
70
|
+
/>
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return (
|
|
75
|
+
<DialogHeader className={Classes.DIALOG_HEADER}>
|
|
76
|
+
<Label title="Workspace">
|
|
77
|
+
<DropDownButton<ExtendedWorkspace>
|
|
78
|
+
data={workspacesList}
|
|
79
|
+
renderItem={renderItem}
|
|
80
|
+
selectedKey={preferences.workspace.current}
|
|
81
|
+
onSelect={handleChangeWorkspace}
|
|
82
|
+
/>
|
|
83
|
+
</Label>
|
|
84
|
+
|
|
85
|
+
<GeneralSettingsDialogHeaderActionsButtons<T>
|
|
86
|
+
reset={reset}
|
|
87
|
+
values={currentValues}
|
|
88
|
+
/>
|
|
89
|
+
</DialogHeader>
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
const DialogHeader = styled.div`
|
|
94
|
+
cursor: default;
|
|
95
|
+
padding-top: 10px;
|
|
96
|
+
box-shadow: none;
|
|
97
|
+
background-color: #f8f8f8;
|
|
98
|
+
`;
|