nmrium 1.11.0 → 2.0.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/database/DatabaseSpectrum.d.ts.map +1 -1
- package/lib/component/1d/database/DatabaseSpectrum.js +1 -1
- package/lib/component/1d/database/DatabaseSpectrum.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 +5 -19
- 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/Contours.d.ts.map +1 -1
- package/lib/component/2d/ft/Contours.js +10 -12
- package/lib/component/2d/ft/Contours.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/reduce2DSpectrum.d.ts +4 -0
- package/lib/component/hooks/reduce2DSpectrum.d.ts.map +1 -0
- package/lib/component/hooks/reduce2DSpectrum.js +60 -0
- package/lib/component/hooks/reduce2DSpectrum.js.map +1 -0
- package/lib/component/hooks/use2DReducer.d.ts +14 -0
- package/lib/component/hooks/use2DReducer.d.ts.map +1 -0
- package/lib/component/hooks/use2DReducer.js +30 -0
- package/lib/component/hooks/use2DReducer.js.map +1 -0
- 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/useCreateNmriumZip.d.ts +3 -0
- package/lib/component/hooks/useCreateNmriumZip.d.ts.map +1 -0
- package/lib/component/hooks/useCreateNmriumZip.js +28 -0
- package/lib/component/hooks/useCreateNmriumZip.js.map +1 -0
- package/lib/component/hooks/useDatumWithSpectraStatistics.js +1 -1
- package/lib/component/hooks/useDatumWithSpectraStatistics.js.map +1 -1
- package/lib/component/hooks/useExport.d.ts +8 -5
- package/lib/component/hooks/useExport.d.ts.map +1 -1
- package/lib/component/hooks/useExport.js +5 -22
- 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.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/loader/useLoadFiles.d.ts.map +1 -1
- package/lib/component/loader/useLoadFiles.js +4 -5
- package/lib/component/loader/useLoadFiles.js.map +1 -1
- package/lib/component/main/InnerNMRium.d.ts.map +1 -1
- package/lib/component/main/InnerNMRium.js +2 -2
- package/lib/component/main/InnerNMRium.js.map +1 -1
- package/lib/component/main/NMRium.d.ts +48 -3
- package/lib/component/main/NMRium.d.ts.map +1 -1
- package/lib/component/main/NMRium.js.map +1 -1
- package/lib/component/main/NMRiumRefAPI.d.ts +2 -0
- package/lib/component/main/NMRiumRefAPI.d.ts.map +1 -1
- package/lib/component/main/NMRiumRefAPI.js +4 -1
- package/lib/component/main/NMRiumRefAPI.js.map +1 -1
- package/lib/component/main/NMRiumStateProvider.d.ts +5 -2
- package/lib/component/main/NMRiumStateProvider.d.ts.map +1 -1
- package/lib/component/main/NMRiumStateProvider.js +36 -30
- package/lib/component/main/NMRiumStateProvider.js.map +1 -1
- 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 +7 -6
- 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} +12 -6
- 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 +10 -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 +82 -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 +1356 -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 +50 -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 +1356 -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 +1354 -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 +61 -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 +1354 -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 +110 -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/hooks/use_safe_workspace.d.ts +466 -0
- package/lib/component/modal/setting/tanstack_general_settings/hooks/use_safe_workspace.d.ts.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/hooks/use_safe_workspace.js +59 -0
- package/lib/component/modal/setting/tanstack_general_settings/hooks/use_safe_workspace.js.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/auto_processing_tab.d.ts +1354 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/auto_processing_tab.d.ts.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/auto_processing_tab.js +32 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/auto_processing_tab.js.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/database_tab.d.ts +1354 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/database_tab.d.ts.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/database_tab.js +80 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/database_tab.js.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.d.ts +1354 -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 +151 -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/external_api_tab.d.ts +1354 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/external_api_tab.d.ts.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/external_api_tab.js +58 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/external_api_tab.js.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/general_tab.d.ts +1354 -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 +1354 -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 +1354 -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 +76 -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 +1354 -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/tabs/spectra_colors_tab.d.ts +1354 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_colors_tab.d.ts.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_colors_tab.js +142 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_colors_tab.js.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.d.ts +1354 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.d.ts.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.js +112 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.js.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/tools_tab.d.ts +1354 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/tools_tab.d.ts.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/tools_tab.js +38 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/tools_tab.js.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/ui/table.d.ts +68 -0
- package/lib/component/modal/setting/tanstack_general_settings/ui/table.d.ts.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/ui/table.js +133 -0
- package/lib/component/modal/setting/tanstack_general_settings/ui/table.js.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/ui/table_section.d.ts +10 -0
- package/lib/component/modal/setting/tanstack_general_settings/ui/table_section.d.ts.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/ui/table_section.js +31 -0
- package/lib/component/modal/setting/tanstack_general_settings/ui/table_section.js.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/auto_processing_tab_validation.d.ts +71 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/auto_processing_tab_validation.d.ts.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/auto_processing_tab_validation.js +67 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/auto_processing_tab_validation.js.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/check_unique_by_key.d.ts +10 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/check_unique_by_key.d.ts.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/check_unique_by_key.js +40 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/check_unique_by_key.js.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/database_tab_validation.d.ts +11 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/database_tab_validation.d.ts.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/database_tab_validation.js +20 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/database_tab_validation.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/external_apis_validation.d.ts +32 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/external_apis_validation.d.ts.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/external_apis_validation.js +11 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/external_apis_validation.js.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/general_tab_validation.d.ts +42 -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 +34 -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 +17 -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 +19 -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 +187 -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 +77 -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/spectra_colors_tab_validation.d.ts +54 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/spectra_colors_tab_validation.d.ts.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/spectra_colors_tab_validation.js +22 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/spectra_colors_tab_validation.js.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/title_block_tab_validation.d.ts +55 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/title_block_tab_validation.d.ts.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/title_block_tab_validation.js +18 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/title_block_tab_validation.js.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/tools_tab_validation.d.ts +32 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/tools_tab_validation.d.ts.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/tools_tab_validation.js +34 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/tools_tab_validation.js.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/utils.d.ts +13 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/utils.d.ts.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/utils.js +20 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/utils.js.map +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation.d.ts +558 -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 +40 -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.d.ts.map +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculeStructure.js +31 -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/SpectraPanel/base/setting/Spectrum1DSetting.d.ts.map +1 -1
- package/lib/component/panels/SpectraPanel/base/setting/Spectrum1DSetting.js +3 -2
- package/lib/component/panels/SpectraPanel/base/setting/Spectrum1DSetting.js.map +1 -1
- package/lib/component/panels/SpectraPanel/base/setting/Spectrum2DSetting.d.ts +2 -1
- package/lib/component/panels/SpectraPanel/base/setting/Spectrum2DSetting.d.ts.map +1 -1
- package/lib/component/panels/SpectraPanel/base/setting/Spectrum2DSetting.js +8 -3
- package/lib/component/panels/SpectraPanel/base/setting/Spectrum2DSetting.js.map +1 -1
- package/lib/component/panels/SpectraPanel/base/setting/SpectrumSetting.js +1 -1
- package/lib/component/panels/SpectraPanel/base/setting/SpectrumSetting.js.map +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.d.ts.map +1 -1
- package/lib/component/panels/databasePanel/DatabasePanel.js +3 -3
- package/lib/component/panels/databasePanel/DatabasePanel.js.map +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 +27 -34
- package/lib/component/panels/filtersPanel/Filters/FiltersSectionsPanel.js.map +1 -1
- package/lib/component/panels/filtersPanel/Filters/base/BaseApodizationOptions.js +1 -1
- package/lib/component/panels/filtersPanel/Filters/base/BaseApodizationOptions.js.map +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/Reducer.d.ts.map +1 -1
- package/lib/component/reducer/Reducer.js +1 -3
- package/lib/component/reducer/Reducer.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/FiltersActions.d.ts +2 -4
- package/lib/component/reducer/actions/FiltersActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/FiltersActions.js +14 -5
- package/lib/component/reducer/actions/FiltersActions.js.map +1 -1
- package/lib/component/reducer/actions/InsetActions.js +2 -2
- package/lib/component/reducer/actions/LoadAction.d.ts +1 -4
- package/lib/component/reducer/actions/LoadAction.d.ts.map +1 -1
- package/lib/component/reducer/actions/LoadAction.js +12 -21
- package/lib/component/reducer/actions/LoadAction.js.map +1 -1
- package/lib/component/reducer/actions/MoleculeActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/MoleculeActions.js +6 -3
- 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 +1 -1
- package/lib/component/reducer/actions/SpectraActions.d.ts +5 -1
- package/lib/component/reducer/actions/SpectraActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/SpectraActions.js +5 -3
- package/lib/component/reducer/actions/SpectraActions.js.map +1 -1
- package/lib/component/reducer/actions/ToolsActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/ToolsActions.js +3 -3
- package/lib/component/reducer/actions/ToolsActions.js.map +1 -1
- 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/applyGeneralPreferences.d.ts.map +1 -1
- package/lib/component/reducer/preferences/actions/applyGeneralPreferences.js.map +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.d.ts +3 -3
- package/lib/component/reducer/preferences/preferencesReducer.d.ts.map +1 -1
- package/lib/component/reducer/preferences/preferencesReducer.js +4 -4
- 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 +12 -0
- package/lib/component/workspaces/workspaceDefaultProperties.js.map +1 -1
- package/lib/data/PredictionManager.d.ts.map +1 -1
- package/lib/data/PredictionManager.js +4 -1
- package/lib/data/PredictionManager.js.map +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/data2d/Spectrum2D/contours.d.ts +7 -6
- package/lib/data/data2d/Spectrum2D/contours.d.ts.map +1 -1
- package/lib/data/data2d/Spectrum2D/contours.js +22 -6
- package/lib/data/data2d/Spectrum2D/contours.js.map +1 -1
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.d.ts.map +1 -1
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.js +1 -10
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.js.map +1 -1
- package/lib/data/molecules/Molecule.d.ts +5 -1
- package/lib/data/molecules/Molecule.d.ts.map +1 -1
- package/lib/data/molecules/Molecule.js +9 -7
- package/lib/data/molecules/Molecule.js.map +1 -1
- package/lib/data/molecules/MoleculeManager.d.ts +0 -6
- package/lib/data/molecules/MoleculeManager.d.ts.map +1 -1
- package/lib/data/molecules/MoleculeManager.js +25 -25
- 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.d.ts.map +1 -1
- package/lib/versionInfo.js +1 -1
- package/lib/versionInfo.js.map +1 -1
- package/package.json +44 -43
- 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/database/DatabaseSpectrum.tsx +3 -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 +11 -24
- 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/Contours.tsx +14 -27
- 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 +81 -25
- 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/reduce2DSpectrum.ts +98 -0
- package/src/component/hooks/use2DReducer.tsx +56 -0
- package/src/component/hooks/useActiveNucleusTab.ts +1 -1
- package/src/component/hooks/useActiveSpectrumRangesViewState.ts +1 -1
- package/src/component/hooks/useCreateNmriumZip.ts +37 -0
- package/src/component/hooks/useDatumWithSpectraStatistics.ts +1 -1
- package/src/component/hooks/useExport.tsx +17 -32
- 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/loader/useLoadFiles.ts +6 -10
- package/src/component/main/InnerNMRium.tsx +4 -2
- package/src/component/main/NMRium.tsx +50 -2
- package/src/component/main/NMRiumRefAPI.ts +7 -1
- package/src/component/main/NMRiumStateProvider.tsx +57 -35
- 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 +8 -7
- 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} +36 -5
- 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 +132 -0
- package/src/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.tsx +116 -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 +105 -0
- package/src/component/modal/setting/tanstack_general_settings/general_settings_dialog_header_actions_buttons.tsx +199 -0
- package/src/component/modal/setting/tanstack_general_settings/hooks/use_safe_workspace.ts +95 -0
- package/src/component/modal/setting/tanstack_general_settings/tabs/auto_processing_tab.tsx +81 -0
- package/src/component/modal/setting/tanstack_general_settings/tabs/database_tab.tsx +210 -0
- package/src/component/modal/setting/tanstack_general_settings/tabs/export_tab.fields.tsx +271 -0
- package/src/component/modal/setting/tanstack_general_settings/tabs/export_tab.tsx +24 -0
- package/src/component/modal/setting/tanstack_general_settings/tabs/external_api_tab.tsx +150 -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 +192 -0
- package/src/component/modal/setting/tanstack_general_settings/tabs/panels_tab.tsx +150 -0
- package/src/component/modal/setting/tanstack_general_settings/tabs/spectra_colors_tab.tsx +352 -0
- package/src/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.tsx +248 -0
- package/src/component/modal/setting/tanstack_general_settings/tabs/tools_tab.tsx +155 -0
- package/src/component/modal/setting/tanstack_general_settings/ui/table.tsx +163 -0
- package/src/component/modal/setting/tanstack_general_settings/ui/table_section.tsx +52 -0
- package/src/component/modal/setting/tanstack_general_settings/validation/auto_processing_tab_validation.ts +73 -0
- package/src/component/modal/setting/tanstack_general_settings/validation/check_unique_by_key.ts +55 -0
- package/src/component/modal/setting/tanstack_general_settings/validation/database_tab_validation.ts +23 -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/external_apis_validation.ts +12 -0
- package/src/component/modal/setting/tanstack_general_settings/validation/general_tab_validation.ts +40 -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 +24 -0
- package/src/component/modal/setting/tanstack_general_settings/validation/panels_tab_validation.ts +88 -0
- package/src/component/modal/setting/tanstack_general_settings/validation/spectra_colors_tab_validation.ts +29 -0
- package/src/component/modal/setting/tanstack_general_settings/validation/title_block_tab_validation.ts +26 -0
- package/src/component/modal/setting/tanstack_general_settings/validation/tools_tab_validation.ts +34 -0
- package/src/component/modal/setting/tanstack_general_settings/validation/utils.ts +30 -0
- package/src/component/modal/setting/tanstack_general_settings/validation.ts +51 -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 +40 -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/SpectraPanel/base/setting/Spectrum1DSetting.tsx +3 -2
- package/src/component/panels/SpectraPanel/base/setting/Spectrum2DSetting.tsx +12 -4
- package/src/component/panels/SpectraPanel/base/setting/SpectrumSetting.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 +7 -5
- 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 +35 -50
- package/src/component/panels/filtersPanel/Filters/base/BaseApodizationOptions.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/Reducer.ts +1 -3
- 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/FiltersActions.ts +16 -10
- package/src/component/reducer/actions/InsetActions.ts +2 -2
- package/src/component/reducer/actions/LoadAction.ts +16 -31
- package/src/component/reducer/actions/MoleculeActions.ts +6 -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 +15 -7
- package/src/component/reducer/actions/ToolsActions.ts +5 -3
- package/src/component/reducer/actions/ZonesActions.ts +3 -3
- package/src/component/reducer/helper/get2DRange.ts +1 -1
- package/src/component/reducer/preferences/actions/applyGeneralPreferences.ts +1 -2
- 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 +7 -7
- package/src/component/toolbar/ToolBar.tsx +6 -1
- package/src/component/utility/export.ts +1 -1
- package/src/component/workspaces/workspaceDefaultProperties.ts +14 -1
- package/src/data/PredictionManager.ts +4 -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/data2d/Spectrum2D/contours.ts +28 -12
- package/src/data/data2d/Spectrum2D/initiateDatum2D.ts +1 -17
- package/src/data/molecules/Molecule.ts +17 -7
- package/src/data/molecules/MoleculeManager.ts +31 -29
- 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,199 @@
|
|
|
1
|
+
import { Classes } from '@blueprintjs/core';
|
|
2
|
+
import styled from '@emotion/styled';
|
|
3
|
+
import { useStore } from '@tanstack/react-form';
|
|
4
|
+
import type { Workspace } from '@zakodium/nmrium-core';
|
|
5
|
+
import { useCallback, useEffect, useRef } from 'react';
|
|
6
|
+
import { FaBolt, FaPaste, FaRegCopy } from 'react-icons/fa';
|
|
7
|
+
import { Button, withForm } from 'react-science/ui';
|
|
8
|
+
|
|
9
|
+
import { ClipboardFallbackModal } from '../../../../utils/clipboard/clipboardComponents.js';
|
|
10
|
+
import { useClipboard } from '../../../../utils/clipboard/clipboardHooks.js';
|
|
11
|
+
import { usePreferences } from '../../../context/PreferencesContext.js';
|
|
12
|
+
import { useToaster } from '../../../context/ToasterContext.js';
|
|
13
|
+
import type { WorkspaceWithSource } from '../../../reducer/preferences/preferencesReducer.ts';
|
|
14
|
+
import { getPreferencesByWorkspace } from '../../../reducer/preferences/utilities/getPreferencesByWorkspace.js';
|
|
15
|
+
|
|
16
|
+
import { unsafeWorkspaceToForm } from './hooks/use_safe_workspace.ts';
|
|
17
|
+
import { defaultGeneralSettingsFormValues } from './validation.ts';
|
|
18
|
+
|
|
19
|
+
export const GeneralSettingsDialogHeaderActionsButtons = withForm({
|
|
20
|
+
defaultValues: defaultGeneralSettingsFormValues,
|
|
21
|
+
render: function GeneralSettingsDialogHeaderActionsButtons({ form }) {
|
|
22
|
+
const { reset } = form;
|
|
23
|
+
|
|
24
|
+
const { dispatch, workspaces, ...preferences } = usePreferences();
|
|
25
|
+
const pasteRef = useRef<Record<string, Workspace> | null>(null);
|
|
26
|
+
|
|
27
|
+
const setWorkspaceSetting = useCallback(
|
|
28
|
+
(inputWorkspace: any) => {
|
|
29
|
+
const parseWorkspaceName = Object.keys(inputWorkspace)[0];
|
|
30
|
+
|
|
31
|
+
if (preferences.workspace.current === parseWorkspaceName) {
|
|
32
|
+
reset(inputWorkspace[parseWorkspaceName]);
|
|
33
|
+
} else if (workspaces[parseWorkspaceName]) {
|
|
34
|
+
pasteRef.current = inputWorkspace as unknown as Record<
|
|
35
|
+
string,
|
|
36
|
+
Workspace
|
|
37
|
+
>;
|
|
38
|
+
|
|
39
|
+
dispatch({
|
|
40
|
+
type: 'SET_WORKSPACE',
|
|
41
|
+
payload: {
|
|
42
|
+
workspace: parseWorkspaceName,
|
|
43
|
+
workspaceSource: 'any',
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
[dispatch, preferences.workspace, reset, workspaces],
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
useEffect(() => {
|
|
52
|
+
if (pasteRef.current) {
|
|
53
|
+
setWorkspaceSetting(pasteRef.current);
|
|
54
|
+
pasteRef.current = null;
|
|
55
|
+
}
|
|
56
|
+
}, [setWorkspaceSetting]);
|
|
57
|
+
|
|
58
|
+
return (
|
|
59
|
+
<WorkSpaceActionsButtons form={form} onPaste={setWorkspaceSetting} />
|
|
60
|
+
);
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
interface WorkSpaceActionsButtonsProps {
|
|
65
|
+
/**
|
|
66
|
+
* @param value - a JSON.parse result
|
|
67
|
+
*/
|
|
68
|
+
onPaste: (value: any) => void;
|
|
69
|
+
}
|
|
70
|
+
const workSpaceActionsButtonsProps: WorkSpaceActionsButtonsProps = {
|
|
71
|
+
onPaste: () => {},
|
|
72
|
+
};
|
|
73
|
+
const WorkSpaceActionsButtons = withForm({
|
|
74
|
+
defaultValues: defaultGeneralSettingsFormValues,
|
|
75
|
+
props: workSpaceActionsButtonsProps,
|
|
76
|
+
render: function WorkSpaceActionsButtons({ form, onPaste }) {
|
|
77
|
+
const { reset } = form;
|
|
78
|
+
const values = useStore(form.store, (state) => state.values);
|
|
79
|
+
|
|
80
|
+
const {
|
|
81
|
+
readText,
|
|
82
|
+
rawWriteWithType,
|
|
83
|
+
shouldFallback,
|
|
84
|
+
cleanShouldFallback,
|
|
85
|
+
text,
|
|
86
|
+
} = useClipboard();
|
|
87
|
+
|
|
88
|
+
const toaster = useToaster();
|
|
89
|
+
const isExperimentalFeatures = useStore(
|
|
90
|
+
form.store,
|
|
91
|
+
(state) => state.values.display?.general?.experimentalFeatures?.display,
|
|
92
|
+
);
|
|
93
|
+
|
|
94
|
+
const {
|
|
95
|
+
originalWorkspaces,
|
|
96
|
+
workspace: { current: workspaceName },
|
|
97
|
+
} = usePreferences();
|
|
98
|
+
|
|
99
|
+
function handleReset() {
|
|
100
|
+
const workSpaceDisplayPreferences = getPreferencesByWorkspace(
|
|
101
|
+
workspaceName,
|
|
102
|
+
originalWorkspaces,
|
|
103
|
+
) as WorkspaceWithSource;
|
|
104
|
+
|
|
105
|
+
reset(unsafeWorkspaceToForm(workSpaceDisplayPreferences));
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
function handlePasteWorkspaces(text: string | null) {
|
|
109
|
+
if (!text) return;
|
|
110
|
+
|
|
111
|
+
try {
|
|
112
|
+
const parseWorkspaces = JSON.parse(text);
|
|
113
|
+
onPaste(parseWorkspaces);
|
|
114
|
+
} catch {
|
|
115
|
+
toaster.show({ message: 'object parse error', intent: 'danger' });
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
cleanShouldFallback();
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
function handlePastWorkspaceAction() {
|
|
122
|
+
void readText().then(handlePasteWorkspaces);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
function handleCopyWorkspace() {
|
|
126
|
+
const data = { [workspaceName]: values };
|
|
127
|
+
void rawWriteWithType(JSON.stringify(data)).then(() => {
|
|
128
|
+
toaster.show({
|
|
129
|
+
message: 'Workspace copied to clipboard',
|
|
130
|
+
intent: 'success',
|
|
131
|
+
});
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
return (
|
|
136
|
+
<div
|
|
137
|
+
style={{
|
|
138
|
+
display: 'flex',
|
|
139
|
+
justifyContent: 'flex-start',
|
|
140
|
+
padding: '0 3px',
|
|
141
|
+
}}
|
|
142
|
+
>
|
|
143
|
+
<Button
|
|
144
|
+
variant="outlined"
|
|
145
|
+
intent="primary"
|
|
146
|
+
onClick={handleReset}
|
|
147
|
+
tooltipProps={{
|
|
148
|
+
content: 'Reset workspace preferences',
|
|
149
|
+
compact: true,
|
|
150
|
+
}}
|
|
151
|
+
disabled={form.state.isPristine}
|
|
152
|
+
>
|
|
153
|
+
<FaBolt className={Classes.ICON} />
|
|
154
|
+
</Button>
|
|
155
|
+
{isExperimentalFeatures && (
|
|
156
|
+
<>
|
|
157
|
+
<StyledButton
|
|
158
|
+
variant="outlined"
|
|
159
|
+
onClick={handleCopyWorkspace}
|
|
160
|
+
tooltipProps={{
|
|
161
|
+
content: 'Copy workspace preferences',
|
|
162
|
+
compact: true,
|
|
163
|
+
}}
|
|
164
|
+
marginHorizontal={5}
|
|
165
|
+
>
|
|
166
|
+
<FaRegCopy className={Classes.ICON} />
|
|
167
|
+
</StyledButton>
|
|
168
|
+
<Button
|
|
169
|
+
variant="outlined"
|
|
170
|
+
intent="success"
|
|
171
|
+
onClick={handlePastWorkspaceAction}
|
|
172
|
+
tooltipProps={{
|
|
173
|
+
content: 'Paste workspace preferences',
|
|
174
|
+
compact: true,
|
|
175
|
+
}}
|
|
176
|
+
>
|
|
177
|
+
<FaPaste className={Classes.ICON} />
|
|
178
|
+
</Button>
|
|
179
|
+
</>
|
|
180
|
+
)}
|
|
181
|
+
<ClipboardFallbackModal
|
|
182
|
+
mode={shouldFallback}
|
|
183
|
+
onDismiss={cleanShouldFallback}
|
|
184
|
+
onReadText={handlePasteWorkspaces}
|
|
185
|
+
text={text}
|
|
186
|
+
label="Workspace"
|
|
187
|
+
/>
|
|
188
|
+
</div>
|
|
189
|
+
);
|
|
190
|
+
},
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
const StyledButton = styled(Button, {
|
|
194
|
+
shouldForwardProp(propName) {
|
|
195
|
+
return propName !== 'marginHorizontal';
|
|
196
|
+
},
|
|
197
|
+
})<{ marginHorizontal: number }>`
|
|
198
|
+
margin: 0 ${(props) => props.marginHorizontal}px;
|
|
199
|
+
`;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import type { FifoLogger } from 'fifo-logger';
|
|
2
|
+
import lodashMergeWith from 'lodash/mergeWith.js';
|
|
3
|
+
import { useMemo } from 'react';
|
|
4
|
+
import type { z } from 'zod/v4';
|
|
5
|
+
|
|
6
|
+
import { useLogger } from '../../../../context/LoggerContext.tsx';
|
|
7
|
+
import { usePreferences } from '../../../../context/PreferencesContext.tsx';
|
|
8
|
+
import type { WorkspaceWithSource } from '../../../../reducer/preferences/preferencesReducer.ts';
|
|
9
|
+
import { workspaceDefaultProperties } from '../../../../workspaces/workspaceDefaultProperties.ts';
|
|
10
|
+
import {
|
|
11
|
+
defaultGeneralSettingsFormValues,
|
|
12
|
+
workspaceValidation,
|
|
13
|
+
} from '../validation.ts';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Best effort to return typesafe values for the form
|
|
17
|
+
* If one step does not work
|
|
18
|
+
* - warn zod result with workspace in context
|
|
19
|
+
* - fallback on the next step.
|
|
20
|
+
*
|
|
21
|
+
* 1. try to encode the current workspace
|
|
22
|
+
* 2. try to encode the current workspace merged with workspaceDefaultProperties
|
|
23
|
+
* 3. fallback on defaultGeneralSettingsFormValues (apply / save will lose current workspace values)
|
|
24
|
+
*
|
|
25
|
+
* NB: merge use a replacement array strategy.
|
|
26
|
+
*/
|
|
27
|
+
export function useDefaultValues() {
|
|
28
|
+
const { current: currentWorkspace } = usePreferences();
|
|
29
|
+
|
|
30
|
+
return useUnsafeWorkspaceToForm(currentWorkspace);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function useUnsafeWorkspaceToForm(
|
|
34
|
+
potentialUnsafeWorkspace: WorkspaceWithSource,
|
|
35
|
+
) {
|
|
36
|
+
const { logger } = useLogger();
|
|
37
|
+
|
|
38
|
+
return useMemo(() => {
|
|
39
|
+
return unsafeWorkspaceToForm(potentialUnsafeWorkspace, logger);
|
|
40
|
+
}, [potentialUnsafeWorkspace, logger]);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function unsafeWorkspaceToForm(
|
|
44
|
+
potentialUnsafeWorkspace: WorkspaceWithSource,
|
|
45
|
+
logger?: FifoLogger,
|
|
46
|
+
) {
|
|
47
|
+
const result = workspaceValidation.safeEncode(potentialUnsafeWorkspace);
|
|
48
|
+
if (result.success) return result.data;
|
|
49
|
+
|
|
50
|
+
const childLogger = logger?.child({ workspace: potentialUnsafeWorkspace });
|
|
51
|
+
|
|
52
|
+
childLogger?.warn(
|
|
53
|
+
result,
|
|
54
|
+
'Failed to encode current workspace, try to merge with current workspace default values',
|
|
55
|
+
);
|
|
56
|
+
const workspaceMergedWithDefault = lodashMergeWith(
|
|
57
|
+
{},
|
|
58
|
+
workspaceDefaultProperties,
|
|
59
|
+
potentialUnsafeWorkspace,
|
|
60
|
+
mergeReplaceArray,
|
|
61
|
+
);
|
|
62
|
+
const mergedResult = workspaceValidation.safeEncode(
|
|
63
|
+
workspaceMergedWithDefault,
|
|
64
|
+
);
|
|
65
|
+
if (mergedResult.success) return mergedResult.data;
|
|
66
|
+
|
|
67
|
+
childLogger?.warn(
|
|
68
|
+
mergedResult,
|
|
69
|
+
'Failed to encode workspace merged with default values, use current default values instead',
|
|
70
|
+
);
|
|
71
|
+
return defaultGeneralSettingsFormValues;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function formValueToWorkspace(
|
|
75
|
+
value: z.input<typeof workspaceValidation>,
|
|
76
|
+
baseValue: WorkspaceWithSource,
|
|
77
|
+
): WorkspaceWithSource {
|
|
78
|
+
const safeParseResult = workspaceValidation.safeParse(value);
|
|
79
|
+
|
|
80
|
+
if (!safeParseResult.success) {
|
|
81
|
+
throw new Error('Failed to parse workspace validation', {
|
|
82
|
+
cause: safeParseResult.error,
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
const safeValue = safeParseResult.data;
|
|
87
|
+
return lodashMergeWith({}, baseValue, safeValue, mergeReplaceArray);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
function mergeReplaceArray(obj: unknown, src: unknown) {
|
|
91
|
+
if (!Array.isArray(obj)) return;
|
|
92
|
+
if (!Array.isArray(src)) return;
|
|
93
|
+
|
|
94
|
+
return src;
|
|
95
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { useStore } from '@tanstack/react-form';
|
|
2
|
+
import { withForm } from 'react-science/ui';
|
|
3
|
+
|
|
4
|
+
import { getFilterLabel } from '../../../../../data/getFilterLabel.ts';
|
|
5
|
+
import type { FilterEntry } from '../../../../../data/types/common/FilterEntry.ts';
|
|
6
|
+
import { defaultGeneralSettingsFormValues } from '../validation.ts';
|
|
7
|
+
|
|
8
|
+
export const AutoProcessingTab = withForm({
|
|
9
|
+
defaultValues: defaultGeneralSettingsFormValues,
|
|
10
|
+
render: function Render({ form }) {
|
|
11
|
+
const isExperimentalFeatures = useStore(
|
|
12
|
+
form.store,
|
|
13
|
+
(state) => state.values.display.general?.experimentalFeatures?.display,
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<div>
|
|
18
|
+
<form.Section title="General">
|
|
19
|
+
<form.AppField name="onLoadProcessing.autoProcessing">
|
|
20
|
+
{(field) => (
|
|
21
|
+
<field.Checkbox label="Enable auto processing on load" />
|
|
22
|
+
)}
|
|
23
|
+
</form.AppField>
|
|
24
|
+
</form.Section>
|
|
25
|
+
{isExperimentalFeatures && <AutoProcessingTabs form={form} />}
|
|
26
|
+
</div>
|
|
27
|
+
);
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
const AutoProcessingTabs = withForm({
|
|
32
|
+
defaultValues: defaultGeneralSettingsFormValues,
|
|
33
|
+
render: function Render({ form }) {
|
|
34
|
+
const filters = useStore(
|
|
35
|
+
form.store,
|
|
36
|
+
(state) => state.values.onLoadProcessing.filters,
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
return (
|
|
40
|
+
<>
|
|
41
|
+
{Object.keys(filters || {}).map((nucleus) => (
|
|
42
|
+
<form.Section key={nucleus} title={`${nucleus} Filters`}>
|
|
43
|
+
<NucleusElement form={form} nucleus={nucleus} />
|
|
44
|
+
</form.Section>
|
|
45
|
+
))}
|
|
46
|
+
</>
|
|
47
|
+
);
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
const NucleusElement = withForm({
|
|
52
|
+
defaultValues: defaultGeneralSettingsFormValues,
|
|
53
|
+
props: {
|
|
54
|
+
nucleus: '',
|
|
55
|
+
},
|
|
56
|
+
render: function Render({ form, nucleus }) {
|
|
57
|
+
const elements = useStore(
|
|
58
|
+
form.store,
|
|
59
|
+
(state) => state.values.onLoadProcessing.filters?.[nucleus],
|
|
60
|
+
);
|
|
61
|
+
|
|
62
|
+
return (
|
|
63
|
+
<div>
|
|
64
|
+
{Object.keys(elements ?? {}).map((key) => {
|
|
65
|
+
return (
|
|
66
|
+
<form.AppField
|
|
67
|
+
key={key}
|
|
68
|
+
name={`onLoadProcessing.filters.${nucleus}.${key as FilterEntry['name']}`}
|
|
69
|
+
>
|
|
70
|
+
{(field) => (
|
|
71
|
+
<field.Checkbox
|
|
72
|
+
label={getFilterLabel(key as FilterEntry['name'])}
|
|
73
|
+
/>
|
|
74
|
+
)}
|
|
75
|
+
</form.AppField>
|
|
76
|
+
);
|
|
77
|
+
})}
|
|
78
|
+
</div>
|
|
79
|
+
);
|
|
80
|
+
},
|
|
81
|
+
});
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import { Classes } from '@blueprintjs/core';
|
|
2
|
+
import { useField } from '@tanstack/react-form';
|
|
3
|
+
import { createColumnHelper } from '@tanstack/react-table';
|
|
4
|
+
import { useCallback, useMemo } from 'react';
|
|
5
|
+
import { FaLink, FaPlus, FaRegTrashAlt } from 'react-icons/fa';
|
|
6
|
+
import { Button, withForm } from 'react-science/ui';
|
|
7
|
+
import type { z } from 'zod';
|
|
8
|
+
|
|
9
|
+
import { isGoogleDocument } from '../../../../utility/isGoogleDocument.ts';
|
|
10
|
+
import {
|
|
11
|
+
CellActions,
|
|
12
|
+
CellActionsButton,
|
|
13
|
+
CellCheckbox,
|
|
14
|
+
CellInput,
|
|
15
|
+
TableSettings,
|
|
16
|
+
} from '../ui/table.tsx';
|
|
17
|
+
import { TableSection } from '../ui/table_section.tsx';
|
|
18
|
+
import type { databasesValidation } from '../validation/database_tab_validation.ts';
|
|
19
|
+
import { defaultGeneralSettingsFormValues } from '../validation.ts';
|
|
20
|
+
|
|
21
|
+
type DatabaseForm = z.input<typeof databasesValidation>;
|
|
22
|
+
type DatabaseFormElement = DatabaseForm['data'][number];
|
|
23
|
+
|
|
24
|
+
function emptyDatabaseFormElement(): DatabaseFormElement {
|
|
25
|
+
return {
|
|
26
|
+
key: crypto.randomUUID(),
|
|
27
|
+
label: '',
|
|
28
|
+
url: '',
|
|
29
|
+
enabled: true,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export const DatabaseTab = withForm({
|
|
34
|
+
defaultValues: defaultGeneralSettingsFormValues,
|
|
35
|
+
render: function Render({ form }) {
|
|
36
|
+
const field = useField({ form, name: 'databases.data', mode: 'array' });
|
|
37
|
+
const { removeValue, insertValue } = field;
|
|
38
|
+
const { resetField, Field } = form;
|
|
39
|
+
|
|
40
|
+
const handleDelete = useCallback(
|
|
41
|
+
(index: number) => {
|
|
42
|
+
removeValue(index);
|
|
43
|
+
},
|
|
44
|
+
[removeValue],
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
const handleAdd = useCallback(
|
|
48
|
+
(index: number) => {
|
|
49
|
+
insertValue(index, emptyDatabaseFormElement());
|
|
50
|
+
},
|
|
51
|
+
[insertValue],
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
const handleReset = useCallback(() => {
|
|
55
|
+
resetField('databases');
|
|
56
|
+
}, [resetField]);
|
|
57
|
+
|
|
58
|
+
const COLUMNS = useMemo(() => {
|
|
59
|
+
const helper = createColumnHelper<DatabaseFormElement>();
|
|
60
|
+
return [
|
|
61
|
+
helper.accessor('label', {
|
|
62
|
+
meta: {
|
|
63
|
+
thStyle: {
|
|
64
|
+
minWidth: '100px',
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
cell: ({ row: { index } }) => (
|
|
68
|
+
<Field key={index} name={`databases.data[${index}].label`}>
|
|
69
|
+
{(subField) => (
|
|
70
|
+
<CellInput
|
|
71
|
+
value={subField.state.value}
|
|
72
|
+
onChange={subField.handleChange}
|
|
73
|
+
onBlur={subField.handleBlur}
|
|
74
|
+
/>
|
|
75
|
+
)}
|
|
76
|
+
</Field>
|
|
77
|
+
),
|
|
78
|
+
}),
|
|
79
|
+
helper.accessor('url', {
|
|
80
|
+
header: 'URL',
|
|
81
|
+
meta: {
|
|
82
|
+
thStyle: {
|
|
83
|
+
width: '100%',
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
cell: ({ row: { index } }) => (
|
|
87
|
+
<Field key={index} name={`databases.data[${index}].url`}>
|
|
88
|
+
{(subField) => (
|
|
89
|
+
<CellInput
|
|
90
|
+
value={subField.state.value}
|
|
91
|
+
onChange={subField.handleChange}
|
|
92
|
+
onBlur={subField.handleBlur}
|
|
93
|
+
/>
|
|
94
|
+
)}
|
|
95
|
+
</Field>
|
|
96
|
+
),
|
|
97
|
+
}),
|
|
98
|
+
helper.accessor('enabled', {
|
|
99
|
+
header: 'Enabled',
|
|
100
|
+
cell: ({ row: { index } }) => (
|
|
101
|
+
<Field key={index} name={`databases.data[${index}].enabled`}>
|
|
102
|
+
{(subField) => (
|
|
103
|
+
<CellCheckbox
|
|
104
|
+
checked={subField.state.value}
|
|
105
|
+
onChange={(event) => {
|
|
106
|
+
subField.handleChange(event.currentTarget.checked);
|
|
107
|
+
}}
|
|
108
|
+
onBlur={subField.handleBlur}
|
|
109
|
+
/>
|
|
110
|
+
)}
|
|
111
|
+
</Field>
|
|
112
|
+
),
|
|
113
|
+
}),
|
|
114
|
+
helper.display({
|
|
115
|
+
id: 'defaultDatabase',
|
|
116
|
+
header: 'Auto Load',
|
|
117
|
+
cell: ({
|
|
118
|
+
row: {
|
|
119
|
+
index,
|
|
120
|
+
original: { key },
|
|
121
|
+
},
|
|
122
|
+
}) => (
|
|
123
|
+
<Field key={index} name="databases.defaultDatabase">
|
|
124
|
+
{(subField) => (
|
|
125
|
+
<CellCheckbox
|
|
126
|
+
name={subField.name}
|
|
127
|
+
value={key}
|
|
128
|
+
checked={subField.state.value === key}
|
|
129
|
+
onChange={() => {
|
|
130
|
+
subField.handleChange(
|
|
131
|
+
subField.state.value === key ? '' : key,
|
|
132
|
+
);
|
|
133
|
+
}}
|
|
134
|
+
onBlur={subField.handleBlur}
|
|
135
|
+
/>
|
|
136
|
+
)}
|
|
137
|
+
</Field>
|
|
138
|
+
),
|
|
139
|
+
}),
|
|
140
|
+
helper.display({
|
|
141
|
+
id: 'actions',
|
|
142
|
+
cell: ({ row: { index, original } }) => (
|
|
143
|
+
<CellActions>
|
|
144
|
+
<CellActionsButton
|
|
145
|
+
intent="success"
|
|
146
|
+
onClick={() => handleAdd(index + 1)}
|
|
147
|
+
>
|
|
148
|
+
<FaPlus className={Classes.ICON} />
|
|
149
|
+
</CellActionsButton>
|
|
150
|
+
<CellActionsButton
|
|
151
|
+
intent="danger"
|
|
152
|
+
onClick={() => handleDelete(index)}
|
|
153
|
+
>
|
|
154
|
+
<FaRegTrashAlt className={Classes.ICON} />
|
|
155
|
+
</CellActionsButton>
|
|
156
|
+
|
|
157
|
+
{isGoogleDocument(original.url) && (
|
|
158
|
+
<CellActionsButton
|
|
159
|
+
intent="primary"
|
|
160
|
+
onClick={() => window.open(original.url, '_blank')}
|
|
161
|
+
tooltipProps={{ content: 'Open document', compact: true }}
|
|
162
|
+
>
|
|
163
|
+
<FaLink className={Classes.ICON} />
|
|
164
|
+
</CellActionsButton>
|
|
165
|
+
)}
|
|
166
|
+
</CellActions>
|
|
167
|
+
),
|
|
168
|
+
}),
|
|
169
|
+
];
|
|
170
|
+
}, [Field, handleAdd, handleDelete]);
|
|
171
|
+
|
|
172
|
+
return (
|
|
173
|
+
<TableSection
|
|
174
|
+
title="Databases"
|
|
175
|
+
actions={
|
|
176
|
+
<>
|
|
177
|
+
<Button
|
|
178
|
+
size="small"
|
|
179
|
+
variant="minimal"
|
|
180
|
+
intent="danger"
|
|
181
|
+
onClick={handleReset}
|
|
182
|
+
>
|
|
183
|
+
Reset Databases
|
|
184
|
+
</Button>
|
|
185
|
+
|
|
186
|
+
<Button
|
|
187
|
+
size="small"
|
|
188
|
+
variant="outlined"
|
|
189
|
+
intent="success"
|
|
190
|
+
onClick={() => handleAdd(0)}
|
|
191
|
+
>
|
|
192
|
+
Add Database
|
|
193
|
+
</Button>
|
|
194
|
+
</>
|
|
195
|
+
}
|
|
196
|
+
>
|
|
197
|
+
<TableSettings
|
|
198
|
+
data={field.state.value}
|
|
199
|
+
columns={COLUMNS}
|
|
200
|
+
getRowId={getRowId}
|
|
201
|
+
emptyContent="No database item"
|
|
202
|
+
/>
|
|
203
|
+
</TableSection>
|
|
204
|
+
);
|
|
205
|
+
},
|
|
206
|
+
});
|
|
207
|
+
|
|
208
|
+
function getRowId(row: DatabaseFormElement) {
|
|
209
|
+
return row.key;
|
|
210
|
+
}
|