nmrium 1.10.1 → 1.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/component/1d/BrushTracker1D.d.ts.map +1 -1
- package/lib/component/1d/BrushTracker1D.js +7 -0
- package/lib/component/1d/BrushTracker1D.js.map +1 -1
- package/lib/component/1d/FloatPublicationString.d.ts.map +1 -1
- package/lib/component/1d/FloatPublicationString.js +170 -109
- package/lib/component/1d/FloatPublicationString.js.map +1 -1
- package/lib/component/1d/FloatingRanges.d.ts.map +1 -1
- package/lib/component/1d/FloatingRanges.js +3 -3
- package/lib/component/1d/FloatingRanges.js.map +1 -1
- package/lib/component/1d/SVGContent1D.js +1 -1
- package/lib/component/1d/SVGContent1D.js.map +1 -1
- package/lib/component/1d/inset/DraggableInset.d.ts.map +1 -1
- package/lib/component/1d/inset/DraggableInset.js +4 -4
- package/lib/component/1d/inset/DraggableInset.js.map +1 -1
- package/lib/component/1d/matrix/Boxplot.js +1 -1
- package/lib/component/1d/matrix/Stocsy.js +1 -1
- package/lib/component/1d/multiplicityTree/MultiplicityTree.js +2 -2
- package/lib/component/1d/multiplicityTree/MultiplicityTree.js.map +1 -1
- package/lib/component/1d/peaks/PeakAnnotations.js +2 -2
- package/lib/component/1d/peaks/PeakAnnotations.js.map +1 -1
- package/lib/component/1d/peaks/PeakAnnotationsSpreadMode.js +1 -1
- package/lib/component/1d/peaks/PeakAnnotationsSpreadMode.js.map +1 -1
- package/lib/component/1d/peaks/Peaks.js +2 -2
- package/lib/component/1d/peaks/Peaks.js.map +1 -1
- package/lib/component/1d/ranges/Range.d.ts +1 -1
- package/lib/component/1d/ranges/Range.js +3 -3
- package/lib/component/1d/ranges/Range.js.map +1 -1
- package/lib/component/1d/ranges/Ranges.js +2 -2
- package/lib/component/1d/ranges/Ranges.js.map +1 -1
- package/lib/component/1d/ranges/RangesIntegrals.js +1 -1
- package/lib/component/1d/ranges/useAssignmentsPopoverActionsButtons.d.ts +1 -1
- package/lib/component/1d/ranges/useAssignmentsPopoverActionsButtons.d.ts.map +1 -1
- package/lib/component/1d/ranges/useAssignmentsPopoverActionsButtons.js +4 -4
- package/lib/component/1d/ranges/useAssignmentsPopoverActionsButtons.js.map +1 -1
- package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.d.ts.map +1 -1
- package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.js +14 -5
- package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.js.map +1 -1
- package/lib/component/1d-2d/components/SpectrumInfoBlock.d.ts.map +1 -1
- package/lib/component/1d-2d/components/SpectrumInfoBlock.js +2 -2
- package/lib/component/1d-2d/components/SpectrumInfoBlock.js.map +1 -1
- package/lib/component/2d/FooterBanner.d.ts +1 -1
- package/lib/component/2d/SVGContent2D.d.ts +1 -1
- package/lib/component/2d/YAxis.js +3 -3
- package/lib/component/2d/YAxis.js.map +1 -1
- package/lib/component/2d/ft/FTContainer.d.ts +1 -1
- package/lib/component/2d/tools/XYLabelPointer.d.ts +1 -1
- package/lib/component/2d/useTracesSpectra.js +1 -1
- package/lib/component/2d/zones/SignalsGuideLines.js +5 -5
- package/lib/component/2d/zones/SignalsGuideLines.js.map +1 -1
- package/lib/component/2d/zones/Zone.js +1 -1
- package/lib/component/2d/zones/Zone.js.map +1 -1
- package/lib/component/EventsTrackers/BrushTracker.d.ts +1 -1
- package/lib/component/EventsTrackers/BrushTracker.d.ts.map +1 -1
- package/lib/component/EventsTrackers/KeysListenerTracker.d.ts.map +1 -1
- package/lib/component/EventsTrackers/KeysListenerTracker.js +9 -3
- package/lib/component/EventsTrackers/KeysListenerTracker.js.map +1 -1
- package/lib/component/context/LoggerContext.d.ts +1 -0
- package/lib/component/context/LoggerContext.d.ts.map +1 -1
- package/lib/component/context/LoggerContext.js.map +1 -1
- package/lib/component/context/PreferencesContext.d.ts +1 -1
- package/lib/component/context/PreferencesContext.d.ts.map +1 -1
- package/lib/component/elements/ActionsButtonsPopover.d.ts +9 -5
- package/lib/component/elements/ActionsButtonsPopover.d.ts.map +1 -1
- package/lib/component/elements/ActionsButtonsPopover.js +42 -10
- package/lib/component/elements/ActionsButtonsPopover.js.map +1 -1
- package/lib/component/elements/Alert.d.ts.map +1 -1
- package/lib/component/elements/Alert.js +3 -2
- package/lib/component/elements/Alert.js.map +1 -1
- package/lib/component/elements/DraggableDialog.d.ts +1 -1
- package/lib/component/elements/DraggableDialog.d.ts.map +1 -1
- package/lib/component/elements/NextPrev.d.ts.map +1 -1
- package/lib/component/elements/NextPrev.js +23 -4
- package/lib/component/elements/NextPrev.js.map +1 -1
- package/lib/component/elements/StandardDialog.d.ts +3 -0
- package/lib/component/elements/StandardDialog.d.ts.map +1 -0
- package/lib/component/elements/StandardDialog.js +7 -0
- package/lib/component/elements/StandardDialog.js.map +1 -0
- package/lib/component/elements/ToolbarPopoverItem.d.ts +7 -2
- package/lib/component/elements/ToolbarPopoverItem.d.ts.map +1 -1
- package/lib/component/elements/ToolbarPopoverItem.js +6 -2
- package/lib/component/elements/ToolbarPopoverItem.js.map +1 -1
- package/lib/component/elements/export/ExportManager.js +1 -1
- package/lib/component/elements/export/ExportManager.js.map +1 -1
- package/lib/component/elements/export/ExportOptionsModal.js +3 -2
- package/lib/component/elements/export/ExportOptionsModal.js.map +1 -1
- package/lib/component/elements/export/utilities/exportOptionValidationSchema.d.ts +1 -1
- package/lib/component/elements/print/PrintContent.d.ts.map +1 -1
- package/lib/component/elements/print/PrintContent.js +3 -2
- package/lib/component/elements/print/PrintContent.js.map +1 -1
- package/lib/component/header/Header.js +1 -1
- package/lib/component/header/Header.js.map +1 -1
- package/lib/component/hooks/useActiveNucleusTab.js +1 -1
- package/lib/component/hooks/useActiveNucleusTab.js.map +1 -1
- package/lib/component/hooks/useActiveSpectrumRangesViewState.js +1 -1
- package/lib/component/hooks/useDatumWithSpectraStatistics.js +1 -1
- package/lib/component/hooks/useDatumWithSpectraStatistics.js.map +1 -1
- package/lib/component/hooks/useExport.d.ts +7 -7
- package/lib/component/hooks/useExport.d.ts.map +1 -1
- package/lib/component/hooks/useExport.js +23 -43
- package/lib/component/hooks/useExport.js.map +1 -1
- package/lib/component/hooks/useSVGUnitConverter.d.ts.map +1 -1
- package/lib/component/hooks/useSVGUnitConverter.js +12 -9
- package/lib/component/hooks/useSVGUnitConverter.js.map +1 -1
- package/lib/component/hooks/useSaveSettings.d.ts.map +1 -1
- package/lib/component/hooks/useSaveSettings.js +3 -2
- package/lib/component/hooks/useSaveSettings.js.map +1 -1
- package/lib/component/hooks/useSetActiveSpectrumAction.d.ts.map +1 -1
- package/lib/component/hooks/useSetActiveSpectrumAction.js +3 -1
- package/lib/component/hooks/useSetActiveSpectrumAction.js.map +1 -1
- package/lib/component/hooks/useTextMetrics.d.ts +16 -1
- package/lib/component/hooks/useTextMetrics.d.ts.map +1 -1
- package/lib/component/hooks/useTextMetrics.js +43 -15
- package/lib/component/hooks/useTextMetrics.js.map +1 -1
- package/lib/component/hooks/useToggleSpectraVisibility.js +1 -1
- package/lib/component/hooks/use_acs_settings.d.ts +4 -0
- package/lib/component/hooks/use_acs_settings.d.ts.map +1 -0
- package/lib/component/hooks/use_acs_settings.js +21 -0
- package/lib/component/hooks/use_acs_settings.js.map +1 -0
- package/lib/component/hooks/use_publication_strings.d.ts +9 -0
- package/lib/component/hooks/use_publication_strings.d.ts.map +1 -0
- package/lib/component/hooks/use_publication_strings.js +42 -0
- package/lib/component/hooks/use_publication_strings.js.map +1 -0
- package/lib/component/loader/useLoadFiles.d.ts.map +1 -1
- package/lib/component/loader/useLoadFiles.js +81 -86
- package/lib/component/loader/useLoadFiles.js.map +1 -1
- package/lib/component/main/ErrorOverlay.d.ts.map +1 -1
- package/lib/component/main/ErrorOverlay.js +6 -1
- package/lib/component/main/ErrorOverlay.js.map +1 -1
- package/lib/component/main/InnerNMRiumContents.d.ts.map +1 -1
- package/lib/component/main/InnerNMRiumContents.js +1 -2
- package/lib/component/main/InnerNMRiumContents.js.map +1 -1
- package/lib/component/main/NMRiumViewer.js +2 -2
- package/lib/component/main/NMRiumViewer.js.map +1 -1
- package/lib/component/main/NMRiumViewerWrapper.d.ts.map +1 -1
- package/lib/component/main/NMRiumViewerWrapper.js +9 -3
- package/lib/component/main/NMRiumViewerWrapper.js.map +1 -1
- package/lib/component/modal/AboutPredictionModal.js +2 -2
- package/lib/component/modal/AboutPredictionModal.js.map +1 -1
- package/lib/component/modal/AboutSpectrumSimulationModal.js +2 -2
- package/lib/component/modal/AboutSpectrumSimulationModal.js.map +1 -1
- package/lib/component/modal/EditPeakShapeModal.d.ts.map +1 -1
- package/lib/component/modal/EditPeakShapeModal.js +4 -3
- package/lib/component/modal/EditPeakShapeModal.js.map +1 -1
- package/lib/component/modal/ExportAsJcampModal.d.ts.map +1 -1
- package/lib/component/modal/ExportAsJcampModal.js +3 -2
- package/lib/component/modal/ExportAsJcampModal.js.map +1 -1
- package/lib/component/modal/ImportPublicationStringModal.d.ts.map +1 -1
- package/lib/component/modal/ImportPublicationStringModal.js +3 -2
- package/lib/component/modal/ImportPublicationStringModal.js.map +1 -1
- package/lib/component/modal/LoadJCAMPModal.d.ts.map +1 -1
- package/lib/component/modal/LoadJCAMPModal.js +3 -2
- package/lib/component/modal/LoadJCAMPModal.js.map +1 -1
- package/lib/component/modal/LogsHistoryModal.d.ts.map +1 -1
- package/lib/component/modal/LogsHistoryModal.js +3 -2
- package/lib/component/modal/LogsHistoryModal.js.map +1 -1
- package/lib/component/modal/MoleculeAutoLabelsDatabaseModal.d.ts +6 -0
- package/lib/component/modal/MoleculeAutoLabelsDatabaseModal.d.ts.map +1 -0
- package/lib/component/modal/MoleculeAutoLabelsDatabaseModal.js +128 -0
- package/lib/component/modal/MoleculeAutoLabelsDatabaseModal.js.map +1 -0
- package/lib/component/modal/MoleculeStructureEditorModal.d.ts.map +1 -1
- package/lib/component/modal/MoleculeStructureEditorModal.js +4 -3
- package/lib/component/modal/MoleculeStructureEditorModal.js.map +1 -1
- package/lib/component/modal/MultipletAnalysisModal.d.ts.map +1 -1
- package/lib/component/modal/MultipletAnalysisModal.js +2 -2
- package/lib/component/modal/MultipletAnalysisModal.js.map +1 -1
- package/lib/component/modal/PredictSpectraModal.d.ts.map +1 -1
- package/lib/component/modal/PredictSpectraModal.js +3 -2
- package/lib/component/modal/PredictSpectraModal.js.map +1 -1
- package/lib/component/modal/PublicationStringModal.d.ts +10 -1
- package/lib/component/modal/PublicationStringModal.d.ts.map +1 -1
- package/lib/component/modal/PublicationStringModal.js +89 -77
- package/lib/component/modal/PublicationStringModal.js.map +1 -1
- package/lib/component/modal/SaveAsModal.d.ts.map +1 -1
- package/lib/component/modal/SaveAsModal.js +6 -9
- package/lib/component/modal/SaveAsModal.js.map +1 -1
- package/lib/component/modal/aboutUs/AboutUsModal.js +2 -2
- package/lib/component/modal/aboutUs/AboutUsModal.js.map +1 -1
- package/lib/component/modal/changeSum/ChangeSumModal.d.ts.map +1 -1
- package/lib/component/modal/changeSum/ChangeSumModal.js +2 -2
- package/lib/component/modal/changeSum/ChangeSumModal.js.map +1 -1
- package/lib/component/modal/changeSum/SelectMolecule.js +4 -1
- package/lib/component/modal/changeSum/SelectMolecule.js.map +1 -1
- package/lib/component/modal/editRange/EditRangeModal.js +1 -1
- package/lib/component/modal/editRange/forms/components/NewSignalTab.js +1 -1
- package/lib/component/modal/metaImportation/MetaImportationModal.d.ts.map +1 -1
- package/lib/component/modal/metaImportation/MetaImportationModal.js +3 -2
- package/lib/component/modal/metaImportation/MetaImportationModal.js.map +1 -1
- package/lib/component/modal/setting/{GeneralSettings.d.ts → general_settings.d.ts} +1 -1
- package/lib/component/modal/setting/general_settings.d.ts.map +1 -0
- package/lib/component/modal/setting/{GeneralSettings.js → general_settings.js} +11 -5
- package/lib/component/modal/setting/general_settings.js.map +1 -0
- package/lib/component/modal/setting/settings-tabs/DatabasesTabContent.js +1 -1
- package/lib/component/modal/setting/settings-tabs/DatabasesTabContent.js.map +1 -1
- package/lib/component/modal/setting/settings-tabs/DisplayTabContent.js +1 -1
- package/lib/component/modal/setting/settings-tabs/DisplayTabContent.js.map +1 -1
- package/lib/component/modal/setting/settings-tabs/ExternalAPIsTabContent.js +1 -1
- package/lib/component/modal/setting/settings-tabs/ExternalAPIsTabContent.js.map +1 -1
- package/lib/component/modal/setting/settings-tabs/GeneralTabContent.js +1 -1
- package/lib/component/modal/setting/settings-tabs/GeneralTabContent.js.map +1 -1
- package/lib/component/modal/setting/settings-tabs/InfoBlockTabContent.js +1 -1
- package/lib/component/modal/setting/settings-tabs/InfoBlockTabContent.js.map +1 -1
- package/lib/component/modal/setting/settings-tabs/NucleiTabContent.js +1 -1
- package/lib/component/modal/setting/settings-tabs/NucleiTabContent.js.map +1 -1
- package/lib/component/modal/setting/settings-tabs/OnLoadProcessingTabContent.js +1 -1
- package/lib/component/modal/setting/settings-tabs/OnLoadProcessingTabContent.js.map +1 -1
- package/lib/component/modal/setting/settings-tabs/SpectraColorsTabContent.js +1 -1
- package/lib/component/modal/setting/settings-tabs/SpectraColorsTabContent.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/general_settings.d.ts +8 -0
- package/lib/component/modal/setting/tanstack_general_settings/general_settings.d.ts.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/general_settings.js +65 -0
- package/lib/component/modal/setting/tanstack_general_settings/general_settings.js.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.d.ts +624 -0
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.d.ts.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.js +42 -0
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.js.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_footer.d.ts +624 -0
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_footer.d.ts.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_footer.js +22 -0
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_footer.js.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.d.ts +7 -0
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.d.ts.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.js +50 -0
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.js.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header_actions_buttons.d.ts +7 -0
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header_actions_buttons.d.ts.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header_actions_buttons.js +105 -0
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header_actions_buttons.js.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.d.ts +622 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.d.ts.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.fields.d.ts +55 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.fields.d.ts.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.fields.js +123 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.fields.js.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.js +11 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.js.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/general_tab.d.ts +622 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/general_tab.d.ts.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/general_tab.js +34 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/general_tab.js.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/import_filters_tab.d.ts +622 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/import_filters_tab.d.ts.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/import_filters_tab.js +26 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/import_filters_tab.js.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/nuclei_tab.d.ts +622 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/nuclei_tab.d.ts.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/nuclei_tab.js +123 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/nuclei_tab.js.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/panels_tab.d.ts +622 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/panels_tab.d.ts.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/panels_tab.js +40 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/panels_tab.js.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/utils/checkUniqueByKey.d.ts +10 -0
- package/lib/component/modal/setting/tanstack_general_settings/utils/checkUniqueByKey.d.ts.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/utils/checkUniqueByKey.js +40 -0
- package/lib/component/modal/setting/tanstack_general_settings/utils/checkUniqueByKey.js.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/export_tab_validation.d.ts +166 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/export_tab_validation.d.ts.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/export_tab_validation.js +58 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/export_tab_validation.js.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/general_tab_validation.d.ts +40 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/general_tab_validation.d.ts.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/general_tab_validation.js +37 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/general_tab_validation.js.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/import_filters_tab_validation.d.ts +37 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/import_filters_tab_validation.d.ts.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/import_filters_tab_validation.js +26 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/import_filters_tab_validation.js.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/nuclei_tab_validation.d.ts +9 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/nuclei_tab_validation.d.ts.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/nuclei_tab_validation.js +18 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/nuclei_tab_validation.js.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/panels_tab_validation.d.ts +167 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/panels_tab_validation.d.ts.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/panels_tab_validation.js +69 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/panels_tab_validation.js.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation.d.ts +342 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation.d.ts.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation.js +51 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation.js.map +1 -0
- package/lib/component/panels/MoleculesPanel/MoleculeOptionsPanel.js +2 -2
- package/lib/component/panels/MoleculesPanel/MoleculeOptionsPanel.js.map +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculePanel.js +2 -2
- package/lib/component/panels/MoleculesPanel/MoleculePanel.js.map +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.d.ts.map +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +75 -20
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js.map +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculeStructure.d.ts +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculeStructure.js +4 -4
- package/lib/component/panels/MoleculesPanel/MoleculeStructure.js.map +1 -1
- package/lib/component/panels/MoleculesPanel/hooks/useAtomAssignment.js +17 -17
- package/lib/component/panels/MoleculesPanel/hooks/useAtomAssignment.js.map +1 -1
- package/lib/component/panels/MoleculesPanel/hooks/useExtractAtomAssignmentLabel.js +1 -1
- package/lib/component/panels/MoleculesPanel/hooks/useExtractAtomAssignmentLabel.js.map +1 -1
- package/lib/component/panels/MoleculesPanel/utilities/extractFromAtom.d.ts +1 -1
- package/lib/component/panels/MoleculesPanel/utilities/getAssignIds.js +1 -1
- package/lib/component/panels/MoleculesPanel/utilities/getCurrentDiaIDsToHighlight.d.ts +1 -1
- package/lib/component/panels/MoleculesPanel/utilities/getHighlightsOnHover.d.ts +1 -1
- package/lib/component/panels/MoleculesPanel/utilities/getHighlightsOnHover.d.ts.map +1 -1
- package/lib/component/panels/MoleculesPanel/utilities/getHighlightsOnHover.js +1 -1
- package/lib/component/panels/MoleculesPanel/utilities/getHighlightsOnHover.js.map +1 -1
- package/lib/component/panels/MoleculesPanel/utilities/getUniqueDiaIDs.d.ts +1 -1
- package/lib/component/panels/Panels.d.ts +0 -9
- package/lib/component/panels/Panels.d.ts.map +1 -1
- package/lib/component/panels/Panels.js +13 -54
- package/lib/component/panels/Panels.js.map +1 -1
- package/lib/component/panels/RangesPanel/RangesHeader.d.ts.map +1 -1
- package/lib/component/panels/RangesPanel/RangesHeader.js +23 -15
- package/lib/component/panels/RangesPanel/RangesHeader.js.map +1 -1
- package/lib/component/panels/RangesPanel/RangesTableRow.js +1 -1
- package/lib/component/panels/RangesPanel/RangesTableRow.js.map +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentColumn.d.ts +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentColumn.d.ts.map +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentColumn.js +2 -2
- package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentColumn.js.map +1 -1
- package/lib/component/panels/SpectraPanel/SpectraTable.js +1 -1
- package/lib/component/panels/SummaryPanel/SetMolecularFormulaModal.d.ts.map +1 -1
- package/lib/component/panels/SummaryPanel/SetMolecularFormulaModal.js +3 -2
- package/lib/component/panels/SummaryPanel/SetMolecularFormulaModal.js.map +1 -1
- package/lib/component/panels/SummaryPanel/SetShiftTolerancesModal.d.ts.map +1 -1
- package/lib/component/panels/SummaryPanel/SetShiftTolerancesModal.js +3 -2
- package/lib/component/panels/SummaryPanel/SetShiftTolerancesModal.js.map +1 -1
- package/lib/component/panels/databasePanel/DatabaseInfo.js +1 -1
- package/lib/component/panels/databasePanel/DatabasePanel.js +1 -1
- package/lib/component/panels/databasePanel/DatabaseStructureSearchModal.js +2 -2
- package/lib/component/panels/databasePanel/DatabaseStructureSearchModal.js.map +1 -1
- package/lib/component/panels/databasePanel/DatabaseTable.js +1 -1
- package/lib/component/panels/databasePanel/DatabaseTable.js.map +1 -1
- package/lib/component/panels/filtersPanel/Filters/FiltersSectionsPanel.d.ts +1 -1
- package/lib/component/panels/filtersPanel/Filters/FiltersSectionsPanel.d.ts.map +1 -1
- package/lib/component/panels/filtersPanel/Filters/FiltersSectionsPanel.js +1 -1
- package/lib/component/panels/header/DefaultPanelHeader.d.ts.map +1 -1
- package/lib/component/panels/header/DefaultPanelHeader.js +2 -1
- package/lib/component/panels/header/DefaultPanelHeader.js.map +1 -1
- package/lib/component/panels/hooks/useMoleculeAnnotationCore.js +1 -1
- package/lib/component/panels/hooks/useMoleculeAnnotationCore.js.map +1 -1
- package/lib/component/panels/hooks/useTogglePanel.d.ts.map +1 -1
- package/lib/component/panels/hooks/useTogglePanel.js +4 -3
- package/lib/component/panels/hooks/useTogglePanel.js.map +1 -1
- package/lib/component/panels/informationPanel/InformationEditionModal.d.ts.map +1 -1
- package/lib/component/panels/informationPanel/InformationEditionModal.js +3 -2
- package/lib/component/panels/informationPanel/InformationEditionModal.js.map +1 -1
- package/lib/component/panels/informationPanel/InformationPanel.d.ts.map +1 -1
- package/lib/component/panels/informationPanel/InformationPanel.js +38 -3
- package/lib/component/panels/informationPanel/InformationPanel.js.map +1 -1
- package/lib/component/reducer/actions/AssignmentsActions.js +3 -3
- package/lib/component/reducer/actions/CorrelationsActions.js +2 -2
- package/lib/component/reducer/actions/DatabaseActions.js +1 -1
- package/lib/component/reducer/actions/DomainActions.js +1 -1
- package/lib/component/reducer/actions/InsetActions.js +2 -2
- package/lib/component/reducer/actions/LoadAction.d.ts.map +1 -1
- package/lib/component/reducer/actions/LoadAction.js +8 -2
- package/lib/component/reducer/actions/LoadAction.js.map +1 -1
- package/lib/component/reducer/actions/MoleculeActions.d.ts +23 -1
- package/lib/component/reducer/actions/MoleculeActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/MoleculeActions.js +5 -5
- package/lib/component/reducer/actions/MoleculeActions.js.map +1 -1
- package/lib/component/reducer/actions/PreferencesActions.js +1 -1
- package/lib/component/reducer/actions/RangesActions.d.ts +1 -1
- package/lib/component/reducer/actions/RangesActions.js +2 -2
- package/lib/component/reducer/actions/RangesActions.js.map +1 -1
- package/lib/component/reducer/actions/SpectraActions.d.ts +2 -1
- package/lib/component/reducer/actions/SpectraActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/SpectraActions.js +3 -3
- package/lib/component/reducer/actions/SpectraActions.js.map +1 -1
- package/lib/component/reducer/actions/ToolsActions.js +2 -2
- package/lib/component/reducer/actions/ZonesActions.d.ts +1 -1
- package/lib/component/reducer/actions/ZonesActions.js +2 -2
- package/lib/component/reducer/helper/get2DRange.d.ts +1 -1
- package/lib/component/reducer/preferences/actions/analyzeSpectra.d.ts +2 -1
- package/lib/component/reducer/preferences/actions/analyzeSpectra.d.ts.map +1 -1
- package/lib/component/reducer/preferences/actions/analyzeSpectra.js +10 -0
- package/lib/component/reducer/preferences/actions/analyzeSpectra.js.map +1 -1
- package/lib/component/reducer/preferences/actions/toggleOpenSplitPanel.d.ts +4 -0
- package/lib/component/reducer/preferences/actions/toggleOpenSplitPanel.d.ts.map +1 -0
- package/lib/component/reducer/preferences/actions/toggleOpenSplitPanel.js +9 -0
- package/lib/component/reducer/preferences/actions/toggleOpenSplitPanel.js.map +1 -0
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js +1 -1
- package/lib/component/reducer/preferences/preferencesReducer.d.ts +8 -1
- package/lib/component/reducer/preferences/preferencesReducer.d.ts.map +1 -1
- package/lib/component/reducer/preferences/preferencesReducer.js +8 -3
- package/lib/component/reducer/preferences/preferencesReducer.js.map +1 -1
- package/lib/component/toolbar/ToolBar.d.ts.map +1 -1
- package/lib/component/toolbar/ToolBar.js +11 -8
- package/lib/component/toolbar/ToolBar.js.map +1 -1
- package/lib/component/toolbar/toolbarMenu.d.ts +5 -1
- package/lib/component/toolbar/toolbarMenu.d.ts.map +1 -1
- package/lib/component/toolbar/toolbarMenu.js +1 -1
- package/lib/component/toolbar/toolbarMenu.js.map +1 -1
- package/lib/component/utility/export.d.ts +2 -1
- package/lib/component/utility/export.d.ts.map +1 -1
- package/lib/component/utility/export.js +6 -2
- package/lib/component/utility/export.js.map +1 -1
- package/lib/component/workspaces/workspaceDefaultProperties.d.ts.map +1 -1
- package/lib/component/workspaces/workspaceDefaultProperties.js +3 -0
- package/lib/component/workspaces/workspaceDefaultProperties.js.map +1 -1
- package/lib/data/PredictionManager.js +1 -1
- package/lib/data/SpectraManager.d.ts +1 -1
- package/lib/data/SpectraManager.d.ts.map +1 -1
- package/lib/data/SpectraManager.js +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/autoRangesDetection.js +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectRanges.js +1 -1
- package/lib/data/data1d/multipleSpectraAnalysis.d.ts +1 -0
- package/lib/data/data1d/multipleSpectraAnalysis.d.ts.map +1 -1
- package/lib/data/data1d/multipleSpectraAnalysis.js +14 -0
- package/lib/data/data1d/multipleSpectraAnalysis.js.map +1 -1
- package/lib/data/data2d/Spectrum2D/contours.d.ts.map +1 -1
- package/lib/data/data2d/Spectrum2D/contours.js +13 -6
- package/lib/data/data2d/Spectrum2D/contours.js.map +1 -1
- package/lib/data/molecules/MoleculeManager.d.ts +6 -1
- package/lib/data/molecules/MoleculeManager.d.ts.map +1 -1
- package/lib/data/molecules/MoleculeManager.js +3 -2
- package/lib/data/molecules/MoleculeManager.js.map +1 -1
- package/lib/data/utilities/FindUtilities.js +2 -2
- package/lib/utils/clipboard/clipboardComponents.js +2 -2
- package/lib/utils/clipboard/clipboardComponents.js.map +1 -1
- package/lib/versionInfo.js +1 -1
- package/package.json +45 -45
- package/src/component/1d/BrushTracker1D.tsx +8 -0
- package/src/component/1d/FloatPublicationString.tsx +275 -177
- package/src/component/1d/FloatingRanges.tsx +1 -3
- package/src/component/1d/SVGContent1D.tsx +1 -1
- package/src/component/1d/inset/DraggableInset.tsx +2 -4
- package/src/component/1d/integral/IntegralResizable.tsx +1 -1
- package/src/component/1d/matrix/Boxplot.tsx +1 -1
- package/src/component/1d/matrix/Stocsy.tsx +1 -1
- package/src/component/1d/multiAnalysis/AnalysisRange.tsx +1 -1
- package/src/component/1d/multiplicityTree/MultiplicityTree.tsx +2 -2
- package/src/component/1d/peaks/PeakAnnotations.tsx +2 -2
- package/src/component/1d/peaks/PeakAnnotationsSpreadMode.tsx +2 -2
- package/src/component/1d/peaks/Peaks.tsx +2 -2
- package/src/component/1d/ranges/Range.tsx +5 -5
- package/src/component/1d/ranges/Ranges.tsx +2 -2
- package/src/component/1d/ranges/RangesIntegrals.tsx +1 -1
- package/src/component/1d/ranges/useAssignmentsPopoverActionsButtons.tsx +5 -5
- package/src/component/1d/tool/BaseLineZones.tsx +1 -1
- package/src/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.tsx +14 -6
- package/src/component/1d-2d/components/SpectrumInfoBlock.tsx +1 -2
- package/src/component/2d/FooterBanner.tsx +1 -1
- package/src/component/2d/SVGContent2D.tsx +1 -1
- package/src/component/2d/YAxis.tsx +3 -3
- package/src/component/2d/ft/FTContainer.tsx +1 -1
- package/src/component/2d/tools/XYLabelPointer.tsx +1 -1
- package/src/component/2d/useTracesSpectra.ts +1 -1
- package/src/component/2d/zones/SignalsGuideLines.tsx +5 -5
- package/src/component/2d/zones/Zone.tsx +1 -1
- package/src/component/EventsTrackers/BrushTracker.tsx +1 -1
- package/src/component/EventsTrackers/KeysListenerTracker.tsx +9 -3
- package/src/component/context/LoggerContext.tsx +9 -0
- package/src/component/context/PreferencesContext.tsx +1 -1
- package/src/component/elements/ActionsButtonsPopover.tsx +80 -24
- package/src/component/elements/Alert.tsx +4 -2
- package/src/component/elements/DraggableDialog.tsx +2 -2
- package/src/component/elements/NextPrev.tsx +28 -4
- package/src/component/elements/StandardDialog.tsx +11 -0
- package/src/component/elements/ToolbarPopoverItem.tsx +16 -3
- package/src/component/elements/export/ExportManager.tsx +1 -1
- package/src/component/elements/export/ExportOptionsModal.tsx +3 -3
- package/src/component/elements/print/PrintContent.tsx +4 -9
- package/src/component/header/Header.tsx +1 -1
- package/src/component/hooks/useActiveNucleusTab.ts +1 -1
- package/src/component/hooks/useActiveSpectrumRangesViewState.ts +1 -1
- package/src/component/hooks/useDatumWithSpectraStatistics.ts +1 -1
- package/src/component/hooks/useExport.tsx +36 -66
- package/src/component/hooks/useSVGUnitConverter.ts +13 -9
- package/src/component/hooks/useSaveSettings.tsx +4 -3
- package/src/component/hooks/useSetActiveSpectrumAction.ts +3 -2
- package/src/component/hooks/useTextMetrics.ts +66 -18
- package/src/component/hooks/useToggleSpectraVisibility.tsx +1 -1
- package/src/component/hooks/use_acs_settings.ts +27 -0
- package/src/component/hooks/use_publication_strings.ts +67 -0
- package/src/component/loader/useLoadFiles.ts +134 -111
- package/src/component/main/ErrorOverlay.tsx +11 -2
- package/src/component/main/InnerNMRiumContents.tsx +6 -9
- package/src/component/main/NMRiumViewer.tsx +3 -3
- package/src/component/main/NMRiumViewerWrapper.tsx +12 -6
- package/src/component/modal/AboutPredictionModal.tsx +3 -3
- package/src/component/modal/AboutSpectrumSimulationModal.tsx +3 -3
- package/src/component/modal/EditPeakShapeModal.tsx +5 -4
- package/src/component/modal/ExportAsJcampModal.tsx +4 -3
- package/src/component/modal/ImportPublicationStringModal.tsx +4 -3
- package/src/component/modal/LoadJCAMPModal.tsx +4 -3
- package/src/component/modal/LogsHistoryModal.tsx +4 -3
- package/src/component/modal/MoleculeAutoLabelsDatabaseModal.tsx +220 -0
- package/src/component/modal/MoleculeStructureEditorModal.tsx +9 -4
- package/src/component/modal/MultipletAnalysisModal.tsx +3 -3
- package/src/component/modal/PredictSpectraModal.tsx +4 -3
- package/src/component/modal/PublicationStringModal.tsx +234 -134
- package/src/component/modal/SaveAsModal.tsx +18 -50
- package/src/component/modal/aboutUs/AboutUsModal.tsx +3 -3
- package/src/component/modal/changeSum/ChangeSumModal.tsx +5 -4
- package/src/component/modal/changeSum/SelectMolecule.tsx +23 -23
- package/src/component/modal/editRange/EditRangeModal.tsx +1 -1
- package/src/component/modal/editRange/forms/components/NewSignalTab.tsx +1 -1
- package/src/component/modal/metaImportation/MetaImportationModal.tsx +4 -3
- package/src/component/modal/setting/{GeneralSettings.tsx → general_settings.tsx} +34 -4
- package/src/component/modal/setting/settings-tabs/DatabasesTabContent.tsx +1 -1
- package/src/component/modal/setting/settings-tabs/DisplayTabContent.tsx +1 -1
- package/src/component/modal/setting/settings-tabs/ExternalAPIsTabContent.tsx +1 -1
- package/src/component/modal/setting/settings-tabs/GeneralTabContent.tsx +1 -1
- package/src/component/modal/setting/settings-tabs/InfoBlockTabContent.tsx +1 -1
- package/src/component/modal/setting/settings-tabs/NucleiTabContent.tsx +1 -1
- package/src/component/modal/setting/settings-tabs/OnLoadProcessingTabContent.tsx +1 -1
- package/src/component/modal/setting/settings-tabs/SpectraColorsTabContent.tsx +1 -1
- package/src/component/modal/setting/tanstack_general_settings/general_settings.tsx +106 -0
- package/src/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.tsx +69 -0
- package/src/component/modal/setting/tanstack_general_settings/general_settings_dialog_footer.tsx +39 -0
- package/src/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.tsx +98 -0
- package/src/component/modal/setting/tanstack_general_settings/general_settings_dialog_header_actions_buttons.tsx +218 -0
- package/src/component/modal/setting/tanstack_general_settings/tabs/export_tab.fields.tsx +231 -0
- package/src/component/modal/setting/tanstack_general_settings/tabs/export_tab.tsx +24 -0
- package/src/component/modal/setting/tanstack_general_settings/tabs/general_tab.tsx +94 -0
- package/src/component/modal/setting/tanstack_general_settings/tabs/import_filters_tab.tsx +72 -0
- package/src/component/modal/setting/tanstack_general_settings/tabs/nuclei_tab.tsx +261 -0
- package/src/component/modal/setting/tanstack_general_settings/tabs/panels_tab.tsx +150 -0
- package/src/component/modal/setting/tanstack_general_settings/utils/checkUniqueByKey.ts +55 -0
- package/src/component/modal/setting/tanstack_general_settings/validation/export_tab_validation.ts +63 -0
- package/src/component/modal/setting/tanstack_general_settings/validation/general_tab_validation.ts +42 -0
- package/src/component/modal/setting/tanstack_general_settings/validation/import_filters_tab_validation.ts +26 -0
- package/src/component/modal/setting/tanstack_general_settings/validation/nuclei_tab_validation.ts +21 -0
- package/src/component/modal/setting/tanstack_general_settings/validation/panels_tab_validation.ts +80 -0
- package/src/component/modal/setting/tanstack_general_settings/validation.ts +66 -0
- package/src/component/panels/MoleculesPanel/MoleculeOptionsPanel.tsx +2 -2
- package/src/component/panels/MoleculesPanel/MoleculePanel.tsx +2 -2
- package/src/component/panels/MoleculesPanel/MoleculePanelHeader.tsx +106 -21
- package/src/component/panels/MoleculesPanel/MoleculeStructure.tsx +5 -5
- package/src/component/panels/MoleculesPanel/hooks/useAtomAssignment.tsx +21 -21
- package/src/component/panels/MoleculesPanel/hooks/useExtractAtomAssignmentLabel.ts +1 -1
- package/src/component/panels/MoleculesPanel/utilities/extractFromAtom.ts +1 -1
- package/src/component/panels/MoleculesPanel/utilities/getAssignIds.ts +1 -1
- package/src/component/panels/MoleculesPanel/utilities/getCurrentDiaIDsToHighlight.ts +1 -1
- package/src/component/panels/MoleculesPanel/utilities/getHighlightsOnHover.ts +2 -2
- package/src/component/panels/MoleculesPanel/utilities/getUniqueDiaIDs.ts +1 -1
- package/src/component/panels/Panels.tsx +5 -93
- package/src/component/panels/RangesPanel/RangesHeader.tsx +34 -29
- package/src/component/panels/RangesPanel/RangesTableRow.tsx +1 -1
- package/src/component/panels/RangesPanel/TableColumns/SignalAssignmentColumn.tsx +3 -3
- package/src/component/panels/SpectraPanel/SpectraTable.tsx +1 -1
- package/src/component/panels/SummaryPanel/SetMolecularFormulaModal.tsx +4 -3
- package/src/component/panels/SummaryPanel/SetShiftTolerancesModal.tsx +4 -3
- package/src/component/panels/databasePanel/DatabaseInfo.tsx +1 -1
- package/src/component/panels/databasePanel/DatabasePanel.tsx +1 -1
- package/src/component/panels/databasePanel/DatabaseStructureSearchModal.tsx +3 -3
- package/src/component/panels/databasePanel/DatabaseTable.tsx +1 -1
- package/src/component/panels/filtersPanel/Filters/FiltersSectionsPanel.tsx +1 -1
- package/src/component/panels/header/DefaultPanelHeader.tsx +2 -1
- package/src/component/panels/hooks/useMoleculeAnnotationCore.ts +1 -1
- package/src/component/panels/hooks/useTogglePanel.ts +4 -3
- package/src/component/panels/informationPanel/InformationEditionModal.tsx +4 -3
- package/src/component/panels/informationPanel/InformationPanel.tsx +83 -2
- package/src/component/reducer/actions/AssignmentsActions.ts +3 -3
- package/src/component/reducer/actions/CorrelationsActions.ts +2 -2
- package/src/component/reducer/actions/DatabaseActions.ts +1 -1
- package/src/component/reducer/actions/DomainActions.ts +1 -1
- package/src/component/reducer/actions/InsetActions.ts +2 -2
- package/src/component/reducer/actions/LoadAction.ts +17 -3
- package/src/component/reducer/actions/MoleculeActions.ts +7 -5
- package/src/component/reducer/actions/PreferencesActions.ts +1 -1
- package/src/component/reducer/actions/RangesActions.ts +4 -4
- package/src/component/reducer/actions/SpectraActions.ts +7 -3
- package/src/component/reducer/actions/ToolsActions.ts +2 -2
- package/src/component/reducer/actions/ZonesActions.ts +3 -3
- package/src/component/reducer/helper/get2DRange.ts +1 -1
- package/src/component/reducer/preferences/actions/analyzeSpectra.ts +16 -0
- package/src/component/reducer/preferences/actions/toggleOpenSplitPanel.ts +18 -0
- package/src/component/reducer/preferences/panelsPreferencesDefaultValues.ts +1 -1
- package/src/component/reducer/preferences/preferencesReducer.ts +24 -3
- package/src/component/toolbar/ToolBar.tsx +15 -10
- package/src/component/toolbar/toolbarMenu.tsx +13 -2
- package/src/component/utility/export.ts +7 -1
- package/src/component/workspaces/workspaceDefaultProperties.ts +5 -1
- package/src/data/PredictionManager.ts +1 -1
- package/src/data/SpectraManager.ts +2 -2
- package/src/data/data1d/Spectrum1D/ranges/autoRangesDetection.ts +1 -1
- package/src/data/data1d/Spectrum1D/ranges/detectRanges.ts +1 -1
- package/src/data/data1d/multipleSpectraAnalysis.ts +20 -0
- package/src/data/data2d/Spectrum2D/contours.ts +16 -6
- package/src/data/molecules/MoleculeManager.ts +7 -2
- package/src/data/utilities/FindUtilities.ts +2 -2
- package/src/utils/clipboard/clipboardComponents.tsx +3 -3
- package/src/versionInfo.ts +1 -1
- package/lib/component/modal/setting/GeneralSettings.d.ts.map +0 -1
- package/lib/component/modal/setting/GeneralSettings.js.map +0 -1
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
import { Classes, NumericInput } from '@blueprintjs/core';
|
|
2
|
+
import styled from '@emotion/styled';
|
|
3
|
+
import { useStore } from '@tanstack/react-form';
|
|
4
|
+
import { useCallback, useMemo } from 'react';
|
|
5
|
+
import { FaPlus, FaRegTrashAlt } from 'react-icons/fa';
|
|
6
|
+
import { Button, withForm } from 'react-science/ui';
|
|
7
|
+
import type { CellProps } from 'react-table';
|
|
8
|
+
|
|
9
|
+
import { GroupPane } from '../../../../elements/GroupPane.js';
|
|
10
|
+
import { Input2 } from '../../../../elements/Input2.js';
|
|
11
|
+
import type { Column } from '../../../../elements/ReactTable/ReactTable.js';
|
|
12
|
+
import ReactTable from '../../../../elements/ReactTable/ReactTable.js';
|
|
13
|
+
import { Section } from '../../general_settings.js';
|
|
14
|
+
import { defaultGeneralSettingsFormValues } from '../validation.js';
|
|
15
|
+
|
|
16
|
+
interface NucleiFormElement {
|
|
17
|
+
nucleus: string;
|
|
18
|
+
ppmFormat: string;
|
|
19
|
+
hzFormat: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const emptyNucleiFormElement: NucleiFormElement = {
|
|
23
|
+
nucleus: '',
|
|
24
|
+
ppmFormat: '0.00',
|
|
25
|
+
hzFormat: '0.00',
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export const NucleiTab = withForm({
|
|
29
|
+
defaultValues: defaultGeneralSettingsFormValues,
|
|
30
|
+
render: function Render({ form }) {
|
|
31
|
+
const fields = useStore(form.store, (state) => state.values.nuclei);
|
|
32
|
+
|
|
33
|
+
const handleAdd = useCallback(
|
|
34
|
+
(data: readonly NucleiFormElement[], index: number) => {
|
|
35
|
+
let columns: NucleiFormElement[] = [];
|
|
36
|
+
|
|
37
|
+
if (data) {
|
|
38
|
+
columns = [
|
|
39
|
+
...data.slice(0, index),
|
|
40
|
+
emptyNucleiFormElement,
|
|
41
|
+
...data.slice(index),
|
|
42
|
+
];
|
|
43
|
+
} else {
|
|
44
|
+
columns.push(emptyNucleiFormElement);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
form.setFieldValue('nuclei', columns);
|
|
48
|
+
},
|
|
49
|
+
[form],
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
const handleDelete = useCallback(
|
|
53
|
+
(data: readonly NucleiFormElement[], formElement: NucleiFormElement) => {
|
|
54
|
+
const fields = data.filter((element) => {
|
|
55
|
+
return element.nucleus !== formElement.nucleus;
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
form.setFieldValue('nuclei', fields);
|
|
59
|
+
},
|
|
60
|
+
[form],
|
|
61
|
+
);
|
|
62
|
+
|
|
63
|
+
const COLUMNS = useMemo<Array<Column<NucleiFormElement>>>(
|
|
64
|
+
() => [
|
|
65
|
+
{
|
|
66
|
+
Header: 'Nucleus',
|
|
67
|
+
style: { padding: 0 },
|
|
68
|
+
Cell: ({ row: { index } }: CellProps<NucleiFormElement>) => {
|
|
69
|
+
return (
|
|
70
|
+
<form.Field key={index} name={`nuclei[${index}].nucleus`}>
|
|
71
|
+
{(subField) => (
|
|
72
|
+
<Input2
|
|
73
|
+
style={{
|
|
74
|
+
backgroundColor: 'transparent',
|
|
75
|
+
boxShadow: 'none',
|
|
76
|
+
}}
|
|
77
|
+
value={subField.state.value}
|
|
78
|
+
onChange={subField.handleChange}
|
|
79
|
+
/>
|
|
80
|
+
)}
|
|
81
|
+
</form.Field>
|
|
82
|
+
);
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
Header: 'δ (ppm)',
|
|
87
|
+
style: { padding: 0 },
|
|
88
|
+
Cell: ({ row: { index } }: CellProps<NucleiFormElement>) => {
|
|
89
|
+
return (
|
|
90
|
+
<form.Field key={index} name={`nuclei[${index}].ppmFormat`}>
|
|
91
|
+
{(subField) => (
|
|
92
|
+
<Input2
|
|
93
|
+
style={{
|
|
94
|
+
backgroundColor: 'transparent',
|
|
95
|
+
boxShadow: 'none',
|
|
96
|
+
}}
|
|
97
|
+
value={subField.state.value}
|
|
98
|
+
onChange={subField.handleChange}
|
|
99
|
+
/>
|
|
100
|
+
)}
|
|
101
|
+
</form.Field>
|
|
102
|
+
);
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
Header: 'Coupling (Hz)',
|
|
107
|
+
style: { padding: 0 },
|
|
108
|
+
Cell: ({ row: { index } }: CellProps<NucleiFormElement>) => {
|
|
109
|
+
return (
|
|
110
|
+
<form.Field key={index} name={`nuclei[${index}].hzFormat`}>
|
|
111
|
+
{(subField) => (
|
|
112
|
+
<Input2
|
|
113
|
+
style={{
|
|
114
|
+
backgroundColor: 'transparent',
|
|
115
|
+
boxShadow: 'none',
|
|
116
|
+
}}
|
|
117
|
+
value={subField.state.value}
|
|
118
|
+
onChange={subField.handleChange}
|
|
119
|
+
/>
|
|
120
|
+
)}
|
|
121
|
+
</form.Field>
|
|
122
|
+
);
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
Header: 'Axis from',
|
|
127
|
+
style: { padding: 0 },
|
|
128
|
+
Cell: ({ row: { index } }: CellProps<NucleiFormElement>) => {
|
|
129
|
+
return (
|
|
130
|
+
<form.Field key={index} name={`nuclei[${index}].axisFrom`}>
|
|
131
|
+
{(subField) => (
|
|
132
|
+
<NumericInput
|
|
133
|
+
style={{
|
|
134
|
+
backgroundColor: 'transparent',
|
|
135
|
+
boxShadow: 'none',
|
|
136
|
+
}}
|
|
137
|
+
value={Number(subField.state.value) || undefined}
|
|
138
|
+
fill
|
|
139
|
+
onValueChange={(valueAsNumber) =>
|
|
140
|
+
subField.handleChange(valueAsNumber)
|
|
141
|
+
}
|
|
142
|
+
/>
|
|
143
|
+
)}
|
|
144
|
+
</form.Field>
|
|
145
|
+
);
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
Header: 'Axis to',
|
|
150
|
+
style: { padding: 0 },
|
|
151
|
+
Cell: ({ row: { index } }: CellProps<NucleiFormElement>) => {
|
|
152
|
+
return (
|
|
153
|
+
<form.Field key={index} name={`nuclei[${index}].axisTo`}>
|
|
154
|
+
{(subField) => (
|
|
155
|
+
<NumericInput
|
|
156
|
+
style={{
|
|
157
|
+
backgroundColor: 'transparent',
|
|
158
|
+
boxShadow: 'none',
|
|
159
|
+
}}
|
|
160
|
+
value={Number(subField.state.value) || undefined}
|
|
161
|
+
fill
|
|
162
|
+
onValueChange={(valueAsNumber) =>
|
|
163
|
+
subField.handleChange(valueAsNumber)
|
|
164
|
+
}
|
|
165
|
+
/>
|
|
166
|
+
)}
|
|
167
|
+
</form.Field>
|
|
168
|
+
);
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
Header: '',
|
|
173
|
+
style: {
|
|
174
|
+
width: 60,
|
|
175
|
+
},
|
|
176
|
+
id: 'op-buttons',
|
|
177
|
+
Cell: ({
|
|
178
|
+
row: { original, index: rowIndex },
|
|
179
|
+
data,
|
|
180
|
+
}: CellProps<NucleiFormElement>) => {
|
|
181
|
+
return (
|
|
182
|
+
<Buttons>
|
|
183
|
+
<Button
|
|
184
|
+
size="small"
|
|
185
|
+
variant="outlined"
|
|
186
|
+
intent="success"
|
|
187
|
+
onClick={() => handleAdd(data, rowIndex + 1)}
|
|
188
|
+
>
|
|
189
|
+
<FaPlus className={Classes.ICON} />
|
|
190
|
+
</Button>
|
|
191
|
+
<Button
|
|
192
|
+
size="small"
|
|
193
|
+
variant="outlined"
|
|
194
|
+
intent="danger"
|
|
195
|
+
onClick={() => handleDelete(data, original)}
|
|
196
|
+
>
|
|
197
|
+
<FaRegTrashAlt className={Classes.ICON} />
|
|
198
|
+
</Button>
|
|
199
|
+
</Buttons>
|
|
200
|
+
);
|
|
201
|
+
},
|
|
202
|
+
},
|
|
203
|
+
],
|
|
204
|
+
[form, handleAdd, handleDelete],
|
|
205
|
+
);
|
|
206
|
+
|
|
207
|
+
return (
|
|
208
|
+
<GroupPane
|
|
209
|
+
text="Number formatting for crosshair and info line and axis domain"
|
|
210
|
+
renderHeader={(text) => {
|
|
211
|
+
return (
|
|
212
|
+
<FieldsBlockHeader text={text} onAdd={() => handleAdd(fields, 0)} />
|
|
213
|
+
);
|
|
214
|
+
}}
|
|
215
|
+
>
|
|
216
|
+
<ReactTable
|
|
217
|
+
style={{
|
|
218
|
+
'thead tr th': { zIndex: 1 },
|
|
219
|
+
td: { padding: 0 },
|
|
220
|
+
}}
|
|
221
|
+
rowStyle={{
|
|
222
|
+
hover: { backgroundColor: '#f7f7f7' },
|
|
223
|
+
active: { backgroundColor: '#f5f5f5' },
|
|
224
|
+
}}
|
|
225
|
+
data={fields}
|
|
226
|
+
columns={COLUMNS}
|
|
227
|
+
emptyDataRowText="No Nucleus"
|
|
228
|
+
/>
|
|
229
|
+
</GroupPane>
|
|
230
|
+
);
|
|
231
|
+
},
|
|
232
|
+
});
|
|
233
|
+
|
|
234
|
+
interface FieldsBlockHeaderProps {
|
|
235
|
+
onAdd: () => void;
|
|
236
|
+
text: string;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
function FieldsBlockHeader(props: FieldsBlockHeaderProps) {
|
|
240
|
+
const { onAdd, text } = props;
|
|
241
|
+
return (
|
|
242
|
+
<Section>
|
|
243
|
+
<p style={{ flex: 1 }}>{text}</p>
|
|
244
|
+
|
|
245
|
+
<Button
|
|
246
|
+
size="small"
|
|
247
|
+
variant="outlined"
|
|
248
|
+
intent="success"
|
|
249
|
+
tooltipProps={{ content: '', disabled: true }}
|
|
250
|
+
onClick={onAdd}
|
|
251
|
+
>
|
|
252
|
+
Add nuclei preferences
|
|
253
|
+
</Button>
|
|
254
|
+
</Section>
|
|
255
|
+
);
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
const Buttons = styled.div`
|
|
259
|
+
display: flex;
|
|
260
|
+
justify-content: space-evenly;
|
|
261
|
+
`;
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { withFieldGroup, withForm } from 'react-science/ui';
|
|
2
|
+
|
|
3
|
+
import { displayPanelsStatus } from '../validation/panels_tab_validation.js';
|
|
4
|
+
import { defaultGeneralSettingsFormValues } from '../validation.js';
|
|
5
|
+
|
|
6
|
+
export const PanelsTab = withForm({
|
|
7
|
+
defaultValues: defaultGeneralSettingsFormValues,
|
|
8
|
+
render: ({ form }) => {
|
|
9
|
+
const { Section, AppField } = form;
|
|
10
|
+
return (
|
|
11
|
+
<>
|
|
12
|
+
<Section title="Panels bar">
|
|
13
|
+
<AppField name="display.general.hidePanelsBar">
|
|
14
|
+
{({ Checkbox }) => <Checkbox label="Hide panels bar" />}
|
|
15
|
+
</AppField>
|
|
16
|
+
</Section>
|
|
17
|
+
|
|
18
|
+
<SpectraSettings form={form} fields="display.panels" />
|
|
19
|
+
<Spectra1dSettings form={form} fields="display.panels" />
|
|
20
|
+
<Spectra2dSettings form={form} fields="display.panels" />
|
|
21
|
+
<ChemicalSettings form={form} fields="display.panels" />
|
|
22
|
+
</>
|
|
23
|
+
);
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
const SpectraSettings = withFieldGroup({
|
|
28
|
+
defaultValues: defaultGeneralSettingsFormValues.display.panels,
|
|
29
|
+
render: ({ group }) => {
|
|
30
|
+
const { Section, AppField } = group;
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<Section title="Spectra">
|
|
34
|
+
<AppField name="spectraPanel">
|
|
35
|
+
{({ Select }) => (
|
|
36
|
+
<Select label="Spectra selection" items={displayPanelsStatus} />
|
|
37
|
+
)}
|
|
38
|
+
</AppField>
|
|
39
|
+
<AppField name="informationPanel">
|
|
40
|
+
{({ Select }) => (
|
|
41
|
+
<Select label="Information" items={displayPanelsStatus} />
|
|
42
|
+
)}
|
|
43
|
+
</AppField>
|
|
44
|
+
<AppField name="processingsPanel">
|
|
45
|
+
{({ Select }) => (
|
|
46
|
+
<Select label="Processing" items={displayPanelsStatus} />
|
|
47
|
+
)}
|
|
48
|
+
</AppField>
|
|
49
|
+
<AppField name="multipleSpectraAnalysisPanel">
|
|
50
|
+
{({ Select }) => (
|
|
51
|
+
<Select
|
|
52
|
+
label="Multiple spectra analysis"
|
|
53
|
+
items={displayPanelsStatus}
|
|
54
|
+
/>
|
|
55
|
+
)}
|
|
56
|
+
</AppField>
|
|
57
|
+
</Section>
|
|
58
|
+
);
|
|
59
|
+
},
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
const Spectra1dSettings = withFieldGroup({
|
|
63
|
+
defaultValues: defaultGeneralSettingsFormValues.display.panels,
|
|
64
|
+
render: ({ group }) => {
|
|
65
|
+
const { Section, AppField } = group;
|
|
66
|
+
|
|
67
|
+
return (
|
|
68
|
+
<Section title="Spectra 1D">
|
|
69
|
+
<AppField name="peaksPanel">
|
|
70
|
+
{({ Select }) => <Select label="Peaks" items={displayPanelsStatus} />}
|
|
71
|
+
</AppField>
|
|
72
|
+
<AppField name="integralsPanel">
|
|
73
|
+
{({ Select }) => (
|
|
74
|
+
<Select label="Integrals" items={displayPanelsStatus} />
|
|
75
|
+
)}
|
|
76
|
+
</AppField>
|
|
77
|
+
<AppField name="rangesPanel">
|
|
78
|
+
{({ Select }) => (
|
|
79
|
+
<Select
|
|
80
|
+
label="Ranges / Multiplet analysis"
|
|
81
|
+
items={displayPanelsStatus}
|
|
82
|
+
/>
|
|
83
|
+
)}
|
|
84
|
+
</AppField>
|
|
85
|
+
<AppField name="matrixGenerationPanel">
|
|
86
|
+
{({ Select }) => (
|
|
87
|
+
<Select label="Matrix generation" items={displayPanelsStatus} />
|
|
88
|
+
)}
|
|
89
|
+
</AppField>
|
|
90
|
+
<AppField name="simulationPanel">
|
|
91
|
+
{({ Select }) => (
|
|
92
|
+
<Select label="Spectrum simulation" items={displayPanelsStatus} />
|
|
93
|
+
)}
|
|
94
|
+
</AppField>
|
|
95
|
+
</Section>
|
|
96
|
+
);
|
|
97
|
+
},
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
const Spectra2dSettings = withFieldGroup({
|
|
101
|
+
defaultValues: defaultGeneralSettingsFormValues.display.panels,
|
|
102
|
+
render: ({ group }) => {
|
|
103
|
+
const { Section, AppField } = group;
|
|
104
|
+
|
|
105
|
+
return (
|
|
106
|
+
<Section title="Spectra 2D">
|
|
107
|
+
<AppField name="zonesPanel">
|
|
108
|
+
{({ Select }) => <Select label="Zones" items={displayPanelsStatus} />}
|
|
109
|
+
</AppField>
|
|
110
|
+
</Section>
|
|
111
|
+
);
|
|
112
|
+
},
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
const ChemicalSettings = withFieldGroup({
|
|
116
|
+
defaultValues: defaultGeneralSettingsFormValues.display.panels,
|
|
117
|
+
render: ({ group }) => {
|
|
118
|
+
const { Section, AppField } = group;
|
|
119
|
+
|
|
120
|
+
return (
|
|
121
|
+
<Section title="Chemicals">
|
|
122
|
+
<AppField name="structuresPanel">
|
|
123
|
+
{({ Select }) => (
|
|
124
|
+
<Select label="Chemical structures" items={displayPanelsStatus} />
|
|
125
|
+
)}
|
|
126
|
+
</AppField>
|
|
127
|
+
<AppField name="summaryPanel">
|
|
128
|
+
{({ Select }) => (
|
|
129
|
+
<Select label="Summary" items={displayPanelsStatus} />
|
|
130
|
+
)}
|
|
131
|
+
</AppField>
|
|
132
|
+
<AppField name="databasePanel">
|
|
133
|
+
{({ Select }) => (
|
|
134
|
+
<Select label="Databases" items={displayPanelsStatus} />
|
|
135
|
+
)}
|
|
136
|
+
</AppField>
|
|
137
|
+
<AppField name="predictionPanel">
|
|
138
|
+
{({ Select }) => (
|
|
139
|
+
<Select label="Prediction" items={displayPanelsStatus} />
|
|
140
|
+
)}
|
|
141
|
+
</AppField>
|
|
142
|
+
<AppField name="automaticAssignmentPanel">
|
|
143
|
+
{({ Select }) => (
|
|
144
|
+
<Select label="Automatic assignment" items={displayPanelsStatus} />
|
|
145
|
+
)}
|
|
146
|
+
</AppField>
|
|
147
|
+
</Section>
|
|
148
|
+
);
|
|
149
|
+
},
|
|
150
|
+
});
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { RefinementCtx } from 'zod';
|
|
2
|
+
|
|
3
|
+
interface CheckUniqueByKeyOptions<T> {
|
|
4
|
+
data?: T[];
|
|
5
|
+
checkKey: keyof T;
|
|
6
|
+
basePath?: string;
|
|
7
|
+
context: RefinementCtx;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function checkUniqueByKey<T>(options: CheckUniqueByKeyOptions<T>) {
|
|
11
|
+
const { data, checkKey, context, basePath = '' } = options;
|
|
12
|
+
|
|
13
|
+
if (!data) return true;
|
|
14
|
+
|
|
15
|
+
const matchesFrequencies: Record<
|
|
16
|
+
string,
|
|
17
|
+
{ value: number; fieldsIndexes: number[] }
|
|
18
|
+
> = {};
|
|
19
|
+
let index = 0;
|
|
20
|
+
for (const datum of data) {
|
|
21
|
+
let key;
|
|
22
|
+
const matchValue = datum[checkKey];
|
|
23
|
+
|
|
24
|
+
if (typeof matchValue === 'string') {
|
|
25
|
+
key = matchValue.toLowerCase();
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
if (key) {
|
|
29
|
+
if (matchesFrequencies[key]) {
|
|
30
|
+
++matchesFrequencies[key].value;
|
|
31
|
+
matchesFrequencies[key].fieldsIndexes.push(index);
|
|
32
|
+
} else {
|
|
33
|
+
matchesFrequencies[key] = { value: 1, fieldsIndexes: [index] };
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
index++;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
for (const key in matchesFrequencies) {
|
|
40
|
+
const { value, fieldsIndexes } = matchesFrequencies[key];
|
|
41
|
+
if (value > 1) {
|
|
42
|
+
for (const index of fieldsIndexes) {
|
|
43
|
+
context.addIssue({
|
|
44
|
+
code: 'custom',
|
|
45
|
+
message: `${key} must be unique`,
|
|
46
|
+
path: basePath
|
|
47
|
+
? [basePath, index, String(checkKey)]
|
|
48
|
+
: [index, String(checkKey)],
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return true;
|
|
55
|
+
}
|
package/src/component/modal/setting/tanstack_general_settings/validation/export_tab_validation.ts
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { Layout, PageSizeName } from '@zakodium/nmrium-core';
|
|
2
|
+
import { units } from '@zakodium/nmrium-core';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
|
|
5
|
+
const exportSizes: PageSizeName[] = [
|
|
6
|
+
'Letter',
|
|
7
|
+
'Legal',
|
|
8
|
+
'Tabloid',
|
|
9
|
+
'Executive',
|
|
10
|
+
'Statement',
|
|
11
|
+
'Folio',
|
|
12
|
+
'A3',
|
|
13
|
+
'A4',
|
|
14
|
+
'A5',
|
|
15
|
+
'B4',
|
|
16
|
+
'B5',
|
|
17
|
+
];
|
|
18
|
+
const exportLayouts: Layout[] = ['portrait', 'landscape'];
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* @see {import("@zakodium/nmrium-core").BaseExportSettings}
|
|
22
|
+
*/
|
|
23
|
+
const baseExportSettings = z.object({
|
|
24
|
+
useDefaultSettings: z.boolean(),
|
|
25
|
+
dpi: z.coerce.number<string>(),
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* @see {import("@zakodium/nmrium-core").BasicExportSettings}
|
|
30
|
+
*/
|
|
31
|
+
const basicExportSettings = z.object({
|
|
32
|
+
mode: z.literal('basic'),
|
|
33
|
+
...baseExportSettings.shape,
|
|
34
|
+
size: z.enum(exportSizes),
|
|
35
|
+
layout: z.enum(exportLayouts),
|
|
36
|
+
});
|
|
37
|
+
/**
|
|
38
|
+
* @see {import("@zakodium/nmrium-core").AdvanceExportSettings}
|
|
39
|
+
*/
|
|
40
|
+
const advancedExportSettings = z.object({
|
|
41
|
+
mode: z.literal('advance'),
|
|
42
|
+
...baseExportSettings.shape,
|
|
43
|
+
width: z.coerce.number<string>(),
|
|
44
|
+
height: z.coerce.number<string>(),
|
|
45
|
+
unit: z.enum(units.map((u) => u.unit)),
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* @see {import("@zakodium/nmrium-core").ExportSettings}
|
|
50
|
+
*/
|
|
51
|
+
export const exportSettingsValidation = z.discriminatedUnion('mode', [
|
|
52
|
+
basicExportSettings,
|
|
53
|
+
advancedExportSettings,
|
|
54
|
+
]);
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* @see {import("@zakodium/nmrium-core").ExportPreferences}
|
|
58
|
+
*/
|
|
59
|
+
export const exportPreferencesValidation = z.object({
|
|
60
|
+
png: exportSettingsValidation,
|
|
61
|
+
svg: exportSettingsValidation,
|
|
62
|
+
clipboard: exportSettingsValidation,
|
|
63
|
+
});
|
package/src/component/modal/setting/tanstack_general_settings/validation/general_tab_validation.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
import type { LoggerType } from '../../../../context/LoggerContext.js';
|
|
4
|
+
|
|
5
|
+
const loggingLevel: LoggerType[] = [
|
|
6
|
+
'fatal',
|
|
7
|
+
'error',
|
|
8
|
+
'warn',
|
|
9
|
+
'info',
|
|
10
|
+
'debug',
|
|
11
|
+
'trace',
|
|
12
|
+
'silent',
|
|
13
|
+
];
|
|
14
|
+
|
|
15
|
+
export const peaksLabelValidation = z.object({
|
|
16
|
+
marginTop: z.coerce.number().int().min(0),
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
export const generalValidation = z.object({
|
|
20
|
+
dimmedSpectraOpacity: z.coerce.number().min(0).max(1),
|
|
21
|
+
invert: z.boolean(),
|
|
22
|
+
invertScroll: z.boolean(),
|
|
23
|
+
spectraRendering: z.enum([
|
|
24
|
+
'auto',
|
|
25
|
+
'optimizeSpeed',
|
|
26
|
+
'crispEdges',
|
|
27
|
+
'geometricPrecision',
|
|
28
|
+
]),
|
|
29
|
+
popupLoggingLevel: z.enum(loggingLevel).optional(),
|
|
30
|
+
loggingLevel: z.enum(loggingLevel).optional(),
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
export const displayGeneralValidation = z
|
|
34
|
+
.object({
|
|
35
|
+
experimentalFeatures: z
|
|
36
|
+
.object({
|
|
37
|
+
display: z.boolean(),
|
|
38
|
+
})
|
|
39
|
+
.optional(),
|
|
40
|
+
hidePanelsBar: z.boolean().optional(),
|
|
41
|
+
})
|
|
42
|
+
.optional();
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
export const nmrLoadersGeneralDataSelection = [
|
|
4
|
+
{ label: 'FT', value: 'ft' } as const,
|
|
5
|
+
{ label: 'FID', value: 'fid' } as const,
|
|
6
|
+
{ label: 'Both', value: 'both' } as const,
|
|
7
|
+
{ label: 'Prefer FT', value: 'preferFT' } as const,
|
|
8
|
+
{ label: 'Prefer FID', value: 'preferFID' } as const,
|
|
9
|
+
];
|
|
10
|
+
const nmrLoadersGeneralValidation = z.object({
|
|
11
|
+
dataSelection: z
|
|
12
|
+
.enum(nmrLoadersGeneralDataSelection.map(({ value }) => value))
|
|
13
|
+
.optional(),
|
|
14
|
+
keep1D: z.boolean().optional(),
|
|
15
|
+
keep2D: z.boolean().optional(),
|
|
16
|
+
onlyReal: z.boolean().optional(),
|
|
17
|
+
});
|
|
18
|
+
const nmrLoadersBrukerValidation = z.object({
|
|
19
|
+
processingNumbers: z.string().optional(),
|
|
20
|
+
experimentNumbers: z.string().optional(),
|
|
21
|
+
onlyFirstProcessedData: z.boolean().optional(),
|
|
22
|
+
});
|
|
23
|
+
export const nmrLoadersValidation = z.object({
|
|
24
|
+
general: nmrLoadersGeneralValidation,
|
|
25
|
+
bruker: nmrLoadersBrukerValidation,
|
|
26
|
+
});
|
package/src/component/modal/setting/tanstack_general_settings/validation/nuclei_tab_validation.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
import { checkUniqueByKey } from '../utils/checkUniqueByKey.js';
|
|
4
|
+
|
|
5
|
+
export const nucleiValidation = z
|
|
6
|
+
.array(
|
|
7
|
+
z.object({
|
|
8
|
+
nucleus: z.string({ error: 'Nucleus is a required field' }),
|
|
9
|
+
ppmFormat: z.string({ error: 'PPM format is a required field' }),
|
|
10
|
+
hzFormat: z.string({ error: 'Hz format is a required field' }),
|
|
11
|
+
axisFrom: z.coerce.number().optional(),
|
|
12
|
+
axisTo: z.coerce.number().optional(),
|
|
13
|
+
}),
|
|
14
|
+
)
|
|
15
|
+
.superRefine((nuclei, ctx) => {
|
|
16
|
+
checkUniqueByKey({
|
|
17
|
+
data: nuclei,
|
|
18
|
+
checkKey: 'nucleus',
|
|
19
|
+
context: ctx,
|
|
20
|
+
});
|
|
21
|
+
});
|
package/src/component/modal/setting/tanstack_general_settings/validation/panels_tab_validation.ts
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
export const displayPanelsStatus = [
|
|
4
|
+
{ label: 'Hidden', value: 'hidden' } as const,
|
|
5
|
+
{ label: 'Available', value: 'available' } as const,
|
|
6
|
+
{ label: 'Active', value: 'active' } as const,
|
|
7
|
+
{ label: 'Open', value: 'open' } as const,
|
|
8
|
+
];
|
|
9
|
+
|
|
10
|
+
type PanelStatus = (typeof displayPanelsStatus)[number]['value'];
|
|
11
|
+
const panelStatusValidation = z.enum(displayPanelsStatus.map((s) => s.value));
|
|
12
|
+
|
|
13
|
+
const panelCodec = z.codec(
|
|
14
|
+
panelStatusValidation,
|
|
15
|
+
z
|
|
16
|
+
.object({
|
|
17
|
+
display: z.boolean(),
|
|
18
|
+
visible: z.boolean(),
|
|
19
|
+
open: z.boolean().optional(),
|
|
20
|
+
})
|
|
21
|
+
.optional(),
|
|
22
|
+
{
|
|
23
|
+
encode: (status) => {
|
|
24
|
+
const { display = false, visible = false, open = false } = status ?? {};
|
|
25
|
+
let value: PanelStatus = 'hidden';
|
|
26
|
+
const isActive = visible && display;
|
|
27
|
+
|
|
28
|
+
if (isActive && open) {
|
|
29
|
+
value = 'open';
|
|
30
|
+
} else if (isActive) {
|
|
31
|
+
value = 'active';
|
|
32
|
+
} else if (visible) {
|
|
33
|
+
value = 'available';
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
return value;
|
|
37
|
+
},
|
|
38
|
+
decode: (status) => {
|
|
39
|
+
let visible = false;
|
|
40
|
+
let display = false;
|
|
41
|
+
let open = false;
|
|
42
|
+
|
|
43
|
+
if (status === 'available') {
|
|
44
|
+
visible = true;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
if (status === 'active') {
|
|
48
|
+
visible = true;
|
|
49
|
+
display = true;
|
|
50
|
+
}
|
|
51
|
+
if (status === 'open') {
|
|
52
|
+
visible = true;
|
|
53
|
+
display = true;
|
|
54
|
+
open = true;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
return { open, visible, display };
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
);
|
|
61
|
+
|
|
62
|
+
export const displayPanelsValidation = z
|
|
63
|
+
.object({
|
|
64
|
+
spectraPanel: panelCodec,
|
|
65
|
+
informationPanel: panelCodec,
|
|
66
|
+
peaksPanel: panelCodec,
|
|
67
|
+
integralsPanel: panelCodec,
|
|
68
|
+
rangesPanel: panelCodec,
|
|
69
|
+
structuresPanel: panelCodec,
|
|
70
|
+
processingsPanel: panelCodec,
|
|
71
|
+
zonesPanel: panelCodec,
|
|
72
|
+
summaryPanel: panelCodec,
|
|
73
|
+
multipleSpectraAnalysisPanel: panelCodec,
|
|
74
|
+
databasePanel: panelCodec,
|
|
75
|
+
predictionPanel: panelCodec,
|
|
76
|
+
automaticAssignmentPanel: panelCodec,
|
|
77
|
+
matrixGenerationPanel: panelCodec,
|
|
78
|
+
simulationPanel: panelCodec,
|
|
79
|
+
})
|
|
80
|
+
.optional();
|