nmrium 0.38.0 → 0.38.2
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/ApodizationLine.js +27 -4
- package/lib/component/1d/ExclusionZoneAnnotation.js +1 -1
- package/lib/component/1d/ExclusionZonesAnnotations.js +1 -1
- package/lib/component/1d/FooterBanner.js +5 -5
- package/lib/component/1d/SpectraLegends.js +2 -3
- package/lib/component/1d/Viewer1D.js +1 -1
- package/lib/component/1d/database/DatabaseSpectrum.js +2 -1
- package/lib/component/1d/integral/Integral.d.ts +1 -1
- package/lib/component/1d/integral/IntegralResizable.d.ts +1 -1
- package/lib/component/1d/jCouplingGraph/JsCouplings.d.ts +1 -1
- package/lib/component/1d/multiAnalysis/MultiAnalysisRanges.js +2 -2
- package/lib/component/1d/multiplicityTree/LevelNode.d.ts +1 -1
- package/lib/component/1d/multiplicityTree/MultiplicityTree.d.ts +1 -1
- package/lib/component/1d/multiplicityTree/StringNode.d.ts +1 -1
- package/lib/component/1d/multiplicityTree/buildTreeNode.d.ts +1 -1
- package/lib/component/1d/peaks/usePeakShapesPath.d.ts +2 -1
- package/lib/component/1d/ranges/Range.d.ts +1 -1
- package/lib/component/1d/tool/PeakPointer.js +6 -6
- package/lib/component/1d/tool/XLabelPointer.js +5 -5
- package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.d.ts +1 -1
- package/lib/component/1d-2d/components/FloatMoleculeStructures/index.d.ts +1 -1
- package/lib/component/1d-2d/tools/BrushX.js +2 -3
- package/lib/component/1d-2d/tools/BrushXY.js +2 -3
- package/lib/component/1d-2d/tools/CrossLinePointer.js +4 -5
- package/lib/component/2d/Chart2D.js +4 -4
- package/lib/component/2d/FooterBanner.js +5 -5
- package/lib/component/2d/Viewer2D.js +1 -1
- package/lib/component/2d/tools/XYLabelPointer.js +5 -5
- package/lib/component/2d/zones/Signal.d.ts +1 -1
- package/lib/component/2d/zones/SignalCrosshair.d.ts +1 -1
- package/lib/component/2d/zones/Zone.d.ts +1 -1
- package/lib/component/EventsTrackers/BrushTracker.d.ts +20 -12
- package/lib/component/EventsTrackers/BrushTracker.js +35 -22
- package/lib/component/EventsTrackers/MouseTracker.d.ts +6 -2
- package/lib/component/EventsTrackers/MouseTracker.js +4 -1
- package/lib/component/NMRium.d.ts +4 -5
- package/lib/component/NMRium.js +11 -14
- package/lib/component/assignment/AssignmentsReducer.d.ts +2 -2
- package/lib/component/context/PreferencesContext.d.ts +6 -6
- package/lib/component/elements/Button.d.ts +13 -11
- package/lib/component/elements/Button.js +16 -25
- package/lib/component/elements/ColorInput.d.ts +0 -1
- package/lib/component/elements/ColorInput.js +2 -2
- package/lib/component/elements/EditableColumn.js +5 -2
- package/lib/component/elements/Input.js +2 -4
- package/lib/component/elements/Label.d.ts +1 -0
- package/lib/component/elements/Label.js +2 -2
- package/lib/component/elements/MolecularFormulaInput.d.ts +2 -2
- package/lib/component/elements/MolecularFormulaInput.js +15 -18
- package/lib/component/elements/NextPrev.d.ts +5 -3
- package/lib/component/elements/NextPrev.js +26 -8
- package/lib/component/elements/NumberInput.js +2 -2
- package/lib/component/elements/ReactTable/ReactTable.js +4 -4
- package/lib/component/elements/formik/FormikCheckBox.d.ts +2 -1
- package/lib/component/elements/formik/FormikCheckBox.js +2 -2
- package/lib/component/elements/formik/FormikColumnFormatField.d.ts +4 -0
- package/lib/component/elements/formik/FormikColumnFormatField.js +19 -16
- package/lib/component/elements/formik/FormikInput.js +10 -6
- package/lib/component/elements/formik/FormikSelect.js +1 -1
- package/lib/component/header/ApodizationOptionsPanel.js +4 -3
- package/lib/component/header/AutoPeakPickingOptionPanel.js +16 -7
- package/lib/component/header/BaseLineCorrectionPanel.js +5 -2
- package/lib/component/header/PhaseCorrectionPanel.js +5 -2
- package/lib/component/header/RangesPickingOptionPanel.js +15 -7
- package/lib/component/header/ZeroFillingOptionsPanel.js +1 -1
- package/lib/component/highlight/index.d.ts +1 -1
- package/lib/component/hooks/useActiveSpectra.d.ts +1 -1
- package/lib/component/hooks/useActiveSpectrum.d.ts +1 -1
- package/lib/component/hooks/useActiveSpectrumPeaksViewState.d.ts +1 -1
- package/lib/component/hooks/useCheckPointsNumberInWindowArea.d.ts +2 -0
- package/lib/component/hooks/useCheckPointsNumberInWindowArea.js +17 -0
- package/lib/component/hooks/useCheckToolsVisibility.d.ts +2 -2
- package/lib/component/hooks/useDatumWithSpectraStatistics.d.ts +3 -2
- package/lib/component/hooks/useExport.js +1 -1
- package/lib/component/hooks/useFilter.d.ts +2 -1
- package/lib/component/hooks/usePanelPreferences.d.ts +3 -3
- package/lib/component/hooks/usePanelPreferences.js +4 -0
- package/lib/component/hooks/useSaveSettings.d.ts +1 -1
- package/lib/component/hooks/useSaveSettings.js +1 -1
- package/lib/component/hooks/useVerticalAlign.d.ts +1 -1
- package/lib/component/loader/DropZone.js +1 -2
- package/lib/component/modal/EditPeakShapeModal.d.ts +2 -2
- package/lib/component/modal/LoadJCAMPModal.d.ts +3 -3
- package/lib/component/modal/LoadJCAMPModal.js +35 -66
- package/lib/component/modal/ModalStyle.js +0 -10
- package/lib/component/modal/MoleculeStructureEditorModal.d.ts +2 -1
- package/lib/component/modal/MoleculeStructureEditorModal.js +12 -6
- package/lib/component/modal/MultipletAnalysisModal.d.ts +2 -2
- package/lib/component/modal/PredictSpectraModal.d.ts +4 -2
- package/lib/component/modal/PredictSpectraModal.js +43 -105
- package/lib/component/modal/SaveAsModal.d.ts +2 -0
- package/lib/component/modal/SaveAsModal.js +21 -14
- package/lib/component/modal/changeSum/ChangeSumModal.js +25 -38
- package/lib/component/modal/editRange/forms/components/AddSignalFormTab.d.ts +1 -1
- package/lib/component/modal/editRange/forms/components/DeltaInput.js +2 -0
- package/lib/component/modal/editRange/forms/components/SignalsForm.d.ts +2 -2
- package/lib/component/modal/metaImportation/MetaImportationModal.js +15 -5
- package/lib/component/modal/setting/GeneralSettings.js +1 -6
- package/lib/component/modal/setting/settings-tabs/DatabasesTabContent.d.ts +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralPanel.d.ts +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralTable.d.ts +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralsPreferences.js +7 -15
- package/lib/component/panels/MoleculesPanel/MoleculeHeader.js +2 -2
- package/lib/component/panels/MoleculesPanel/MoleculePanel.d.ts +1 -11
- package/lib/component/panels/MoleculesPanel/MoleculePanel.js +20 -25
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.d.ts +6 -11
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +71 -81
- package/lib/component/panels/MoleculesPanel/Utilities.d.ts +1 -1
- package/lib/component/panels/MoleculesPanel/Utilities.js +3 -1
- package/lib/component/panels/MultipleSpectraAnalysisPanel/base/AnalysisColumnHeader.js +6 -6
- package/lib/component/panels/MultipleSpectraAnalysisPanel/preferences/AnalysisTablePreferences.js +2 -2
- package/lib/component/panels/MultipleSpectraAnalysisPanel/preferences/index.js +2 -2
- package/lib/component/panels/PeaksPanel/PeaksPanel.d.ts +1 -1
- package/lib/component/panels/RangesPanel/RangesHeader.js +39 -53
- package/lib/component/panels/RangesPanel/RangesPreferences.d.ts +1 -1
- package/lib/component/panels/RangesPanel/RangesPreferences.js +7 -22
- package/lib/component/panels/RangesPanel/RangesTable.d.ts +2 -2
- package/lib/component/panels/RangesPanel/RangesTableRow.d.ts +2 -2
- package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaHzColumn.d.ts +1 -1
- package/lib/component/panels/RangesPanel/hooks/useMapRanges.d.ts +1 -1
- package/lib/component/panels/SpectrumsPanel/SpectraTable.js +5 -1
- package/lib/component/panels/SpectrumsPanel/base/SpectraColumnsManager.js +10 -4
- package/lib/component/panels/SpectrumsPanel/base/setting/processSnapPlot.d.ts +2 -2
- package/lib/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +1 -1
- package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +1 -1
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/EditPathLength.d.ts +1 -1
- package/lib/component/panels/ZonesPanel/hooks/useMapZones.d.ts +1 -1
- package/lib/component/panels/databasePanel/DatabasePanel.d.ts +1 -1
- package/lib/component/panels/databasePanel/DatabasePanel.js +11 -28
- package/lib/component/panels/databasePanel/DatabasePreferences.js +2 -2
- package/lib/component/panels/header/DefaultPanelHeader.d.ts +2 -3
- package/lib/component/panels/header/DefaultPanelHeader.js +18 -26
- package/lib/component/panels/header/PanelHeader.d.ts +7 -0
- package/lib/component/panels/header/PanelHeader.js +12 -0
- package/lib/component/panels/predictionPanel/PredictionOptionsPanel.d.ts +9 -0
- package/lib/component/panels/predictionPanel/PredictionOptionsPanel.js +94 -0
- package/lib/component/panels/predictionPanel/PredictionPanel.d.ts +1 -1
- package/lib/component/panels/predictionPanel/PredictionPanel.js +107 -37
- package/lib/component/panels/predictionPanel/PredictionPreferences.d.ts +3 -0
- package/lib/component/panels/predictionPanel/PredictionPreferences.js +24 -0
- package/lib/component/panels/predictionPanel/PredictionSimpleOptions.d.ts +2 -0
- package/lib/component/panels/predictionPanel/PredictionSimpleOptions.js +44 -0
- package/lib/component/reducer/Reducer.d.ts +5 -87
- package/lib/component/reducer/Reducer.js +1 -25
- package/lib/component/reducer/actions/FiltersActions.d.ts +1 -2
- package/lib/component/reducer/actions/FiltersActions.js +47 -52
- package/lib/component/reducer/actions/HistoryActions.d.ts +4 -0
- package/lib/component/reducer/actions/HistoryActions.js +40 -0
- package/lib/component/reducer/actions/IntegralsActions.d.ts +1 -1
- package/lib/component/reducer/actions/LoadActions.d.ts +1 -2
- package/lib/component/reducer/actions/LoadActions.js +1 -1
- package/lib/component/reducer/actions/MoleculeActions.d.ts +7 -4
- package/lib/component/reducer/actions/MoleculeActions.js +57 -28
- package/lib/component/reducer/actions/PeaksActions.d.ts +1 -2
- package/lib/component/reducer/actions/PeaksActions.js +3 -3
- package/lib/component/reducer/actions/RangesActions.d.ts +4 -5
- package/lib/component/reducer/actions/RangesActions.js +5 -27
- package/lib/component/reducer/actions/SpectrumsActions.js +2 -2
- package/lib/component/reducer/actions/ToolsActions.d.ts +2 -2
- package/lib/component/reducer/actions/ZonesActions.d.ts +2 -1
- package/lib/component/reducer/actions/ZonesActions.js +1 -2
- package/lib/component/reducer/helper/getActiveSpectra.d.ts +1 -1
- package/lib/component/reducer/helper/getActiveSpectrum.d.ts +1 -1
- package/lib/component/reducer/helper/getVerticalAlign.d.ts +1 -1
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.d.ts +1 -1
- package/lib/component/reducer/preferences/preferencesReducer.d.ts +1 -1
- package/lib/component/reducer/preferences/utilities/getActiveWorkspace.d.ts +1 -1
- package/lib/component/reducer/preferences/utilities/getPreferencesByWorkspace.d.ts +2 -3
- package/lib/component/reducer/preferences/utilities/initWorkspace.d.ts +1 -1
- package/lib/component/reducer/preferences/utilities/mapNucleiFormatting.d.ts +1 -1
- package/lib/component/reducer/preferences/utilities/mapWorkspaces.d.ts +1 -1
- package/lib/component/toolbar/BasicToolBar.js +6 -11
- package/lib/component/toolbar/ToolTypes.d.ts +2 -2
- package/lib/component/toolbar/ToolTypes.js +1 -1
- package/lib/component/workspaces/assignment.d.ts +1 -1
- package/lib/component/workspaces/basic.d.ts +1 -1
- package/lib/component/workspaces/embedded.d.ts +1 -1
- package/lib/component/workspaces/exercise.d.ts +1 -1
- package/lib/component/workspaces/index.d.ts +6 -6
- package/lib/component/workspaces/prediction.d.ts +1 -1
- package/lib/component/workspaces/prediction.js +193 -0
- package/lib/component/workspaces/process1D.d.ts +1 -1
- package/lib/component/workspaces/workspaceDefaultProperties.d.ts +1 -1
- package/lib/component/workspaces/workspaceDefaultProperties.js +1 -1
- package/lib/data/PredictionManager.d.ts +2 -1
- package/lib/data/PredictionManager.js +16 -2
- package/lib/data/SpectraManager.d.ts +1 -2
- package/lib/data/constants/DefaultApodizationOptions.d.ts +2 -0
- package/lib/data/constants/DefaultApodizationOptions.js +5 -0
- package/lib/data/data1d/Spectrum1D/SumManager.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/convertDataToFloat64Array.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/generateJGraphData.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/index.d.ts +1 -5
- package/lib/data/data1d/Spectrum1D/index.js +1 -5
- package/lib/data/data1d/Spectrum1D/initiateDatum1D.js +3 -3
- package/lib/data/data1d/Spectrum1D/integrals/initiateIntegrals.d.ts +2 -1
- package/lib/data/data1d/Spectrum1D/integrals/initiateIntegrals.js +1 -1
- package/lib/data/data1d/Spectrum1D/isRangeAssigned.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.d.ts +2 -1
- package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.js +1 -2
- package/lib/data/data1d/Spectrum1D/peaks/initiatePeaks.d.ts +3 -2
- package/lib/data/data1d/Spectrum1D/peaks/initiatePeaks.js +1 -1
- package/lib/data/data1d/Spectrum1D/peaks/lookupPeak.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.d.ts +2 -1
- package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.js +1 -2
- package/lib/data/data1d/Spectrum1D/ranges/addRange.d.ts +7 -7
- package/lib/data/data1d/Spectrum1D/ranges/addRange.js +5 -24
- package/lib/data/data1d/Spectrum1D/ranges/autoRangesDetection.d.ts +2 -1
- package/lib/data/data1d/Spectrum1D/ranges/changeRange.d.ts +2 -1
- package/lib/data/data1d/Spectrum1D/ranges/changeRange.js +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/checkRangeKind.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectRange.js +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectRanges.js +1 -2
- package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.d.ts +37 -2
- package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.js +1 -1
- package/lib/data/data1d/database.js +2 -4
- package/lib/data/data1d/multipleSpectraAnalysis.d.ts +3 -30
- package/lib/data/data1d/multipleSpectraAnalysis.js +4 -15
- package/lib/data/data2d/Spectrum2D/getMissingProjection.d.ts +3 -2
- package/lib/data/data2d/Spectrum2D/getShift.js +1 -1
- package/lib/data/data2d/Spectrum2D/getSlice.d.ts +1 -1
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.js +1 -1
- package/lib/data/data2d/Spectrum2D/zones/detectZones.d.ts +1 -1
- package/lib/data/data2d/Spectrum2D/zones/detectZonesManual.d.ts +1 -1
- package/lib/data/data2d/Spectrum2D/zones/initiateZones.d.ts +3 -2
- package/lib/data/data2d/Spectrum2D/zones/isZoneExists.d.ts +2 -1
- package/lib/data/data2d/Spectrum2D/zones/mapZones.d.ts +3 -2
- package/lib/data/getDefaultMatrixFilters.d.ts +1 -1
- package/lib/data/types/data1d/ComplexData1D.d.ts +2 -2
- package/lib/data/types/data1d/RangeDetectionResult.d.ts +1 -1
- package/lib/data/utilities/FindUtilities.d.ts +2 -1
- package/lib/data/utilities/RangeUtilities.d.ts +1 -1
- package/lib/data/utilities/ZoneUtilities.d.ts +1 -1
- package/lib/data/utilities/calculateSanPlot.d.ts +2 -2
- package/lib/types/NMRiumDataReturn.d.ts +1 -3
- package/lib/versionInfo.js +1 -1
- package/lib-cjs/component/1d/ApodizationLine.js +28 -5
- package/lib-cjs/component/1d/ExclusionZoneAnnotation.js +3 -26
- package/lib-cjs/component/1d/ExclusionZonesAnnotations.js +5 -28
- package/lib-cjs/component/1d/FooterBanner.js +2 -2
- package/lib-cjs/component/1d/SpectraLegends.js +1 -2
- package/lib-cjs/component/1d/database/DatabaseSpectrum.js +2 -1
- package/lib-cjs/component/1d/multiAnalysis/MultiAnalysisRanges.js +2 -2
- package/lib-cjs/component/1d/tool/PeakPointer.js +3 -3
- package/lib-cjs/component/1d/tool/XLabelPointer.js +2 -2
- package/lib-cjs/component/1d-2d/tools/BrushX.js +1 -2
- package/lib-cjs/component/1d-2d/tools/BrushXY.js +1 -2
- package/lib-cjs/component/1d-2d/tools/CrossLinePointer.js +2 -3
- package/lib-cjs/component/2d/Chart2D.js +4 -4
- package/lib-cjs/component/2d/FooterBanner.js +2 -2
- package/lib-cjs/component/2d/tools/XYLabelPointer.js +2 -2
- package/lib-cjs/component/EventsTrackers/BrushTracker.js +36 -22
- package/lib-cjs/component/EventsTrackers/MouseTracker.js +4 -1
- package/lib-cjs/component/NMRium.js +8 -11
- package/lib-cjs/component/elements/Button.js +16 -25
- package/lib-cjs/component/elements/ColorInput.js +2 -2
- package/lib-cjs/component/elements/EditableColumn.js +5 -2
- package/lib-cjs/component/elements/Input.js +2 -4
- package/lib-cjs/component/elements/Label.js +2 -2
- package/lib-cjs/component/elements/MolecularFormulaInput.js +14 -16
- package/lib-cjs/component/elements/NextPrev.js +26 -8
- package/lib-cjs/component/elements/NumberInput.js +2 -2
- package/lib-cjs/component/elements/ReactTable/ReactTable.js +4 -4
- package/lib-cjs/component/elements/formik/FormikCheckBox.js +2 -2
- package/lib-cjs/component/elements/formik/FormikColumnFormatField.js +20 -16
- package/lib-cjs/component/elements/formik/FormikInput.js +10 -6
- package/lib-cjs/component/elements/formik/FormikSelect.js +1 -1
- package/lib-cjs/component/header/ApodizationOptionsPanel.js +6 -5
- package/lib-cjs/component/header/AutoPeakPickingOptionPanel.js +15 -6
- package/lib-cjs/component/header/BaseLineCorrectionPanel.js +6 -3
- package/lib-cjs/component/header/PhaseCorrectionPanel.js +6 -26
- package/lib-cjs/component/header/RangesPickingOptionPanel.js +15 -7
- package/lib-cjs/component/header/ZeroFillingOptionsPanel.js +2 -25
- package/lib-cjs/component/hooks/useCheckPointsNumberInWindowArea.js +24 -0
- package/lib-cjs/component/hooks/useExport.js +1 -1
- package/lib-cjs/component/hooks/usePanelPreferences.js +4 -0
- package/lib-cjs/component/hooks/useSaveSettings.js +1 -1
- package/lib-cjs/component/loader/DropZone.js +1 -2
- package/lib-cjs/component/modal/LoadJCAMPModal.js +60 -67
- package/lib-cjs/component/modal/ModalStyle.js +0 -10
- package/lib-cjs/component/modal/MoleculeStructureEditorModal.js +12 -6
- package/lib-cjs/component/modal/PredictSpectraModal.js +43 -126
- package/lib-cjs/component/modal/SaveAsModal.js +22 -14
- package/lib-cjs/component/modal/changeSum/ChangeSumModal.js +24 -37
- package/lib-cjs/component/modal/editRange/forms/components/DeltaInput.js +2 -0
- package/lib-cjs/component/modal/metaImportation/MetaImportationModal.js +15 -5
- package/lib-cjs/component/modal/setting/GeneralSettings.js +1 -6
- package/lib-cjs/component/panels/IntegralsPanel/IntegralsPreferences.js +6 -14
- package/lib-cjs/component/panels/MoleculesPanel/MoleculeHeader.js +2 -2
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanel.js +19 -24
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanelHeader.js +76 -86
- package/lib-cjs/component/panels/MoleculesPanel/Utilities.js +3 -1
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/base/AnalysisColumnHeader.js +6 -6
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/preferences/AnalysisTablePreferences.js +2 -2
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/preferences/index.js +2 -2
- package/lib-cjs/component/panels/RangesPanel/RangesHeader.js +38 -52
- package/lib-cjs/component/panels/RangesPanel/RangesPreferences.js +5 -20
- package/lib-cjs/component/panels/SpectrumsPanel/SpectraTable.js +5 -1
- package/lib-cjs/component/panels/SpectrumsPanel/base/SpectraColumnsManager.js +10 -4
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +1 -1
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +1 -1
- package/lib-cjs/component/panels/databasePanel/DatabasePanel.js +11 -28
- package/lib-cjs/component/panels/databasePanel/DatabasePreferences.js +25 -2
- package/lib-cjs/component/panels/header/DefaultPanelHeader.js +18 -26
- package/lib-cjs/component/panels/header/PanelHeader.js +15 -0
- package/lib-cjs/component/panels/predictionPanel/PredictionOptionsPanel.js +122 -0
- package/lib-cjs/component/panels/predictionPanel/PredictionPanel.js +107 -37
- package/lib-cjs/component/panels/predictionPanel/PredictionPreferences.js +29 -0
- package/lib-cjs/component/panels/predictionPanel/PredictionSimpleOptions.js +72 -0
- package/lib-cjs/component/reducer/Reducer.js +2 -27
- package/lib-cjs/component/reducer/actions/FiltersActions.js +66 -94
- package/lib-cjs/component/reducer/actions/HistoryActions.js +45 -0
- package/lib-cjs/component/reducer/actions/MoleculeActions.js +58 -32
- package/lib-cjs/component/reducer/actions/PeaksActions.js +3 -3
- package/lib-cjs/component/reducer/actions/RangesActions.js +7 -52
- package/lib-cjs/component/reducer/actions/SpectrumsActions.js +4 -27
- package/lib-cjs/component/reducer/actions/ZonesActions.js +4 -28
- package/lib-cjs/component/toolbar/BasicToolBar.js +5 -10
- package/lib-cjs/component/toolbar/ToolTypes.js +9 -32
- package/lib-cjs/component/workspaces/prediction.js +193 -0
- package/lib-cjs/component/workspaces/workspaceDefaultProperties.js +21 -44
- package/lib-cjs/data/PredictionManager.js +16 -2
- package/lib-cjs/data/constants/DefaultApodizationOptions.js +8 -0
- package/lib-cjs/data/data1d/Spectrum1D/index.js +7 -11
- package/lib-cjs/data/data1d/Spectrum1D/initiateDatum1D.js +9 -32
- package/lib-cjs/data/data1d/Spectrum1D/integrals/initiateIntegrals.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/peaks/autoPeakPicking.js +1 -2
- package/lib-cjs/data/data1d/Spectrum1D/peaks/initiatePeaks.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/peaks/optimizePeaks.js +1 -2
- package/lib-cjs/data/data1d/Spectrum1D/ranges/addRange.js +7 -26
- package/lib-cjs/data/data1d/Spectrum1D/ranges/changeRange.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/ranges/detectRange.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/ranges/detectRanges.js +3 -4
- package/lib-cjs/data/data1d/Spectrum1D/ranges/initiateRanges.js +2 -2
- package/lib-cjs/data/data1d/database.js +2 -4
- package/lib-cjs/data/data1d/multipleSpectraAnalysis.js +5 -16
- package/lib-cjs/data/data2d/Spectrum2D/getShift.js +3 -26
- package/lib-cjs/data/data2d/Spectrum2D/initiateDatum2D.js +2 -25
- package/lib-cjs/versionInfo.js +1 -1
- package/package.json +25 -25
- package/lib/component/panels/predictionPanel/PredictionOptions.d.ts +0 -7
- package/lib/component/panels/predictionPanel/PredictionOptions.js +0 -74
- package/lib/component/workspaces/Workspace.d.ts +0 -188
- package/lib/component/workspaces/Workspace.js +0 -1
- package/lib/data/Filters.d.ts +0 -12
- package/lib/data/Filters.js +0 -12
- package/lib/data/FiltersManager.d.ts +0 -30
- package/lib/data/FiltersManager.js +0 -175
- package/lib/data/data1d/Spectrum1D/getShiftX.d.ts +0 -2
- package/lib/data/data1d/Spectrum1D/getShiftX.js +0 -6
- package/lib/data/data1d/Spectrum1D/getSpectrumErrorValue.d.ts +0 -2
- package/lib/data/data1d/Spectrum1D/getSpectrumErrorValue.js +0 -4
- package/lib/data/data1d/Spectrum1D/integrals/checkIntegralKind.d.ts +0 -7
- package/lib/data/data1d/Spectrum1D/integrals/checkIntegralKind.js +0 -9
- package/lib/data/data1d/Spectrum1D/integrals/mapIntegrals.d.ts +0 -12
- package/lib/data/data1d/Spectrum1D/integrals/mapIntegrals.js +0 -36
- package/lib/data/data1d/Spectrum1D/integrals/updateIntegrals.d.ts +0 -2
- package/lib/data/data1d/Spectrum1D/integrals/updateIntegrals.js +0 -6
- package/lib/data/data1d/Spectrum1D/integrals/updateIntegralsRelativeValues.d.ts +0 -2
- package/lib/data/data1d/Spectrum1D/integrals/updateIntegralsRelativeValues.js +0 -5
- package/lib/data/data1d/Spectrum1D/integrals/updateRelatives.d.ts +0 -2
- package/lib/data/data1d/Spectrum1D/integrals/updateRelatives.js +0 -26
- package/lib/data/data1d/Spectrum1D/peaks/mapPeaks.d.ts +0 -3
- package/lib/data/data1d/Spectrum1D/peaks/mapPeaks.js +0 -45
- package/lib/data/data1d/Spectrum1D/peaks/updatePeaks.d.ts +0 -2
- package/lib/data/data1d/Spectrum1D/peaks/updatePeaks.js +0 -7
- package/lib/data/data1d/Spectrum1D/ranges/mapRanges.d.ts +0 -4
- package/lib/data/data1d/Spectrum1D/ranges/mapRanges.js +0 -78
- package/lib/data/data1d/Spectrum1D/ranges/updateRanges.d.ts +0 -2
- package/lib/data/data1d/Spectrum1D/ranges/updateRanges.js +0 -9
- package/lib/data/data1d/Spectrum1D/ranges/updateRangesRelativeValues.d.ts +0 -2
- package/lib/data/data1d/Spectrum1D/ranges/updateRangesRelativeValues.js +0 -5
- package/lib/data/data1d/filter1d/apodization.d.ts +0 -27
- package/lib/data/data1d/filter1d/apodization.js +0 -81
- package/lib/data/data1d/filter1d/baselineCorrection.d.ts +0 -33
- package/lib/data/data1d/filter1d/baselineCorrection.js +0 -51
- package/lib/data/data1d/filter1d/digitalFilter.d.ts +0 -20
- package/lib/data/data1d/filter1d/digitalFilter.js +0 -44
- package/lib/data/data1d/filter1d/equallySpaced.d.ts +0 -33
- package/lib/data/data1d/filter1d/equallySpaced.js +0 -52
- package/lib/data/data1d/filter1d/exclusionZones.d.ts +0 -15
- package/lib/data/data1d/filter1d/exclusionZones.js +0 -32
- package/lib/data/data1d/filter1d/fft.d.ts +0 -18
- package/lib/data/data1d/filter1d/fft.js +0 -90
- package/lib/data/data1d/filter1d/phaseCorrection.d.ts +0 -26
- package/lib/data/data1d/filter1d/phaseCorrection.js +0 -64
- package/lib/data/data1d/filter1d/shiftX.d.ts +0 -20
- package/lib/data/data1d/filter1d/shiftX.js +0 -26
- package/lib/data/data1d/filter1d/signalProcessing.d.ts +0 -26
- package/lib/data/data1d/filter1d/signalProcessing.js +0 -65
- package/lib/data/data1d/filter1d/utils/padDataToNextPowerOfTwo.d.ts +0 -2
- package/lib/data/data1d/filter1d/utils/padDataToNextPowerOfTwo.js +0 -35
- package/lib/data/data1d/filter1d/zeroFilling.d.ts +0 -22
- package/lib/data/data1d/filter1d/zeroFilling.js +0 -60
- package/lib/data/data2d/filter2d/shiftX.d.ts +0 -18
- package/lib/data/data2d/filter2d/shiftX.js +0 -27
- package/lib/data/data2d/filter2d/shiftY.d.ts +0 -18
- package/lib/data/data2d/filter2d/shiftY.js +0 -27
- package/lib/data/types/view-state/PeaksViewState.d.ts +0 -17
- package/lib/data/types/view-state/PeaksViewState.js +0 -1
- package/lib/types/NMRiumGeneralPreferences.d.ts +0 -7
- package/lib/types/NMRiumGeneralPreferences.js +0 -1
- package/lib/types/NMRiumPanelPreferences.d.ts +0 -17
- package/lib/types/NMRiumPanelPreferences.js +0 -1
- package/lib/types/NMRiumToolBarPreferences.d.ts +0 -22
- package/lib/types/NMRiumToolBarPreferences.js +0 -1
- package/lib/types/PanelPreferencesType.d.ts +0 -4
- package/lib/types/PanelPreferencesType.js +0 -1
- package/lib-cjs/component/panels/predictionPanel/PredictionOptions.js +0 -102
- package/lib-cjs/component/workspaces/Workspace.js +0 -2
- package/lib-cjs/data/Filters.js +0 -38
- package/lib-cjs/data/FiltersManager.js +0 -206
- package/lib-cjs/data/data1d/Spectrum1D/getShiftX.js +0 -33
- package/lib-cjs/data/data1d/Spectrum1D/getSpectrumErrorValue.js +0 -8
- package/lib-cjs/data/data1d/Spectrum1D/integrals/checkIntegralKind.js +0 -13
- package/lib-cjs/data/data1d/Spectrum1D/integrals/mapIntegrals.js +0 -40
- package/lib-cjs/data/data1d/Spectrum1D/integrals/updateIntegrals.js +0 -10
- package/lib-cjs/data/data1d/Spectrum1D/integrals/updateIntegralsRelativeValues.js +0 -9
- package/lib-cjs/data/data1d/Spectrum1D/integrals/updateRelatives.js +0 -30
- package/lib-cjs/data/data1d/Spectrum1D/peaks/mapPeaks.js +0 -49
- package/lib-cjs/data/data1d/Spectrum1D/peaks/updatePeaks.js +0 -11
- package/lib-cjs/data/data1d/Spectrum1D/ranges/mapRanges.js +0 -82
- package/lib-cjs/data/data1d/Spectrum1D/ranges/updateRanges.js +0 -13
- package/lib-cjs/data/data1d/Spectrum1D/ranges/updateRangesRelativeValues.js +0 -9
- package/lib-cjs/data/data1d/filter1d/apodization.js +0 -88
- package/lib-cjs/data/data1d/filter1d/baselineCorrection.js +0 -60
- package/lib-cjs/data/data1d/filter1d/digitalFilter.js +0 -50
- package/lib-cjs/data/data1d/filter1d/equallySpaced.js +0 -61
- package/lib-cjs/data/data1d/filter1d/exclusionZones.js +0 -38
- package/lib-cjs/data/data1d/filter1d/fft.js +0 -96
- package/lib-cjs/data/data1d/filter1d/phaseCorrection.js +0 -70
- package/lib-cjs/data/data1d/filter1d/shiftX.js +0 -32
- package/lib-cjs/data/data1d/filter1d/signalProcessing.js +0 -95
- package/lib-cjs/data/data1d/filter1d/utils/padDataToNextPowerOfTwo.js +0 -39
- package/lib-cjs/data/data1d/filter1d/zeroFilling.js +0 -66
- package/lib-cjs/data/data2d/filter2d/shiftX.js +0 -33
- package/lib-cjs/data/data2d/filter2d/shiftY.js +0 -33
- package/lib-cjs/data/types/view-state/PeaksViewState.js +0 -2
- package/lib-cjs/types/NMRiumGeneralPreferences.js +0 -2
- package/lib-cjs/types/NMRiumPanelPreferences.js +0 -2
- package/lib-cjs/types/NMRiumToolBarPreferences.js +0 -2
- package/lib-cjs/types/PanelPreferencesType.js +0 -2
|
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.labelStyle = void 0;
|
|
6
7
|
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
7
8
|
/** @jsxImportSource @emotion/react */
|
|
8
9
|
const react_1 = require("@emotion/react");
|
|
@@ -12,6 +13,7 @@ const SpectraManager_1 = require("../../data/SpectraManager");
|
|
|
12
13
|
const ChartContext_1 = require("../context/ChartContext");
|
|
13
14
|
const ActionButtons_1 = __importDefault(require("../elements/ActionButtons"));
|
|
14
15
|
const CloseButton_1 = __importDefault(require("../elements/CloseButton"));
|
|
16
|
+
const Label_1 = __importDefault(require("../elements/Label"));
|
|
15
17
|
const FormikCheckBox_1 = __importDefault(require("../elements/formik/FormikCheckBox"));
|
|
16
18
|
const FormikInput_1 = __importDefault(require("../elements/formik/FormikInput"));
|
|
17
19
|
const ModalStyle_1 = require("./ModalStyle");
|
|
@@ -20,15 +22,6 @@ const styles = (0, react_1.css) `
|
|
|
20
22
|
flex: 1;
|
|
21
23
|
}
|
|
22
24
|
|
|
23
|
-
.custom-label {
|
|
24
|
-
width: 100px;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.name {
|
|
28
|
-
width: 100% !important;
|
|
29
|
-
text-align: left !important;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
25
|
.data-export-group {
|
|
33
26
|
label {
|
|
34
27
|
margin-right: 10px;
|
|
@@ -50,6 +43,20 @@ const INITIAL_VALUE = {
|
|
|
50
43
|
settings: false,
|
|
51
44
|
},
|
|
52
45
|
};
|
|
46
|
+
exports.labelStyle = {
|
|
47
|
+
label: {
|
|
48
|
+
flex: 4,
|
|
49
|
+
fontSize: '12px',
|
|
50
|
+
fontWeight: 'bold',
|
|
51
|
+
color: '#232323',
|
|
52
|
+
},
|
|
53
|
+
wrapper: {
|
|
54
|
+
flex: 8,
|
|
55
|
+
display: 'flex',
|
|
56
|
+
justifyContent: 'flex-start',
|
|
57
|
+
},
|
|
58
|
+
container: { padding: '5px 0' },
|
|
59
|
+
};
|
|
53
60
|
function SaveAsModal({ onClose, onSave, name }) {
|
|
54
61
|
const refForm = (0, react_2.useRef)();
|
|
55
62
|
const { source } = (0, ChartContext_1.useChartData)();
|
|
@@ -60,10 +67,11 @@ function SaveAsModal({ onClose, onSave, name }) {
|
|
|
60
67
|
onSave(values);
|
|
61
68
|
onClose?.();
|
|
62
69
|
}, [onClose, onSave]);
|
|
63
|
-
return ((0, jsx_runtime_1.jsxs)("div", { css: [ModalStyle_1.ModalStyles, styles], children: [(0, jsx_runtime_1.jsxs)("div", { className: "header handle", children: [(0, jsx_runtime_1.jsx)("span", { children: "Save as ... " }), (0, jsx_runtime_1.jsx)(CloseButton_1.default, { onClick: onClose, className: "close-bt" })] }), (0, jsx_runtime_1.jsx)("div", { className: "inner-content", children: (0, jsx_runtime_1.jsx)(formik_1.Formik, { innerRef: refForm, initialValues: { ...INITIAL_VALUE, name }, onSubmit: submitHandler, children: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
70
|
+
return ((0, jsx_runtime_1.jsxs)("div", { css: [ModalStyle_1.ModalStyles, styles], children: [(0, jsx_runtime_1.jsxs)("div", { className: "header handle", children: [(0, jsx_runtime_1.jsx)("span", { children: "Save as ... " }), (0, jsx_runtime_1.jsx)(CloseButton_1.default, { onClick: onClose, className: "close-bt" })] }), (0, jsx_runtime_1.jsx)("div", { className: "inner-content", children: (0, jsx_runtime_1.jsx)(formik_1.Formik, { innerRef: refForm, initialValues: { ...INITIAL_VALUE, name }, onSubmit: submitHandler, children: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Label_1.default, { style: exports.labelStyle, title: "Name", children: (0, jsx_runtime_1.jsx)(FormikInput_1.default, { name: "name", className: "name", style: {
|
|
71
|
+
inputWrapper: { width: '100%' },
|
|
72
|
+
input: { padding: '5px', textAlign: 'left' },
|
|
73
|
+
} }) }), (0, jsx_runtime_1.jsx)(Label_1.default, { style: exports.labelStyle, title: "Compressed", children: (0, jsx_runtime_1.jsx)(FormikCheckBox_1.default, { name: "compressed" }) }), (0, jsx_runtime_1.jsx)(Label_1.default, { style: exports.labelStyle, title: "Pretty Format", children: (0, jsx_runtime_1.jsx)(FormikCheckBox_1.default, { name: "pretty" }) }), (0, jsx_runtime_1.jsx)(Label_1.default, { style: exports.labelStyle, title: "Include view", children: (0, jsx_runtime_1.jsx)(FormikCheckBox_1.default, { name: "include.view" }) }), (0, jsx_runtime_1.jsx)(Label_1.default, { style: exports.labelStyle, title: "Include settings", children: (0, jsx_runtime_1.jsx)(FormikCheckBox_1.default, { name: "include.settings" }) }), (0, jsx_runtime_1.jsx)(Label_1.default, { style: exports.labelStyle, title: "Include Data", children: (0, jsx_runtime_1.jsx)("div", { style: { display: 'flex', flexDirection: 'column' }, children: (0, jsx_runtime_1.jsxs)("div", { className: "data-export-group", children: [(0, jsx_runtime_1.jsxs)("label", { children: [(0, jsx_runtime_1.jsx)(formik_1.Field, { type: "radio", name: "include.dataType", value: SpectraManager_1.DataExportOptions.ROW_DATA }), "Raw Data"] }), (0, jsx_runtime_1.jsxs)("label", { style: {
|
|
74
|
+
color: source ? 'black' : 'lightgray',
|
|
75
|
+
}, children: [(0, jsx_runtime_1.jsx)(formik_1.Field, { type: "radio", name: "include.dataType", value: SpectraManager_1.DataExportOptions.DATA_SOURCE, disabled: !source }), "Data Source"] }), (0, jsx_runtime_1.jsxs)("label", { children: [(0, jsx_runtime_1.jsx)(formik_1.Field, { type: "radio", name: "include.dataType", value: SpectraManager_1.DataExportOptions.NO_DATA }), "No Data"] })] }) }) })] }) }) }), (0, jsx_runtime_1.jsx)("div", { className: "footer-container", children: (0, jsx_runtime_1.jsx)(ActionButtons_1.default, { style: { flexDirection: 'row-reverse', margin: 0 }, onDone: handleSave, doneLabel: "Save", onCancel: () => onClose?.() }) })] }));
|
|
68
76
|
}
|
|
69
77
|
exports.default = SaveAsModal;
|
|
@@ -33,6 +33,7 @@ const formik_1 = require("formik");
|
|
|
33
33
|
const react_2 = require("react");
|
|
34
34
|
const Yup = __importStar(require("yup"));
|
|
35
35
|
const PreferencesContext_1 = require("../../context/PreferencesContext");
|
|
36
|
+
const Button_1 = __importDefault(require("../../elements/Button"));
|
|
36
37
|
const CloseButton_1 = __importDefault(require("../../elements/CloseButton"));
|
|
37
38
|
const Tab_1 = __importDefault(require("../../elements/Tab/Tab"));
|
|
38
39
|
const Tabs_1 = __importDefault(require("../../elements/Tab/Tabs"));
|
|
@@ -71,38 +72,40 @@ const styles = (0, react_1.css) `
|
|
|
71
72
|
text-align: center;
|
|
72
73
|
}
|
|
73
74
|
}
|
|
74
|
-
|
|
75
|
-
.footer-container {
|
|
76
|
-
button {
|
|
77
|
-
width: 20%;
|
|
78
|
-
color: white;
|
|
79
|
-
background-color: gray !important;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
button:hover {
|
|
83
|
-
border: 1px solid gray;
|
|
84
|
-
color: gray;
|
|
85
|
-
background-color: white !important;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
75
|
`;
|
|
89
76
|
var SumSetOptions;
|
|
90
77
|
(function (SumSetOptions) {
|
|
91
78
|
SumSetOptions["Auto"] = "auto";
|
|
92
79
|
SumSetOptions["Manual"] = "manual";
|
|
93
80
|
})(SumSetOptions || (SumSetOptions = {}));
|
|
81
|
+
function getValidationSchema(option) {
|
|
82
|
+
switch (option) {
|
|
83
|
+
case SumSetOptions.Auto: {
|
|
84
|
+
return Yup.object({
|
|
85
|
+
molecule: Yup.object().required(),
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
case SumSetOptions.Manual: {
|
|
89
|
+
return Yup.object({
|
|
90
|
+
sum: Yup.number().required(),
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
default:
|
|
94
|
+
return null;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
94
97
|
function ChangeSumModal({ onSave, onClose, header, sumOptions, }) {
|
|
95
98
|
const { current: { display: { panels }, }, } = (0, PreferencesContext_1.usePreferences)();
|
|
96
99
|
const [setOption, setActiveOption] = (0, react_2.useState)(SumSetOptions.Auto);
|
|
97
100
|
const formRef = (0, react_2.useRef)(null);
|
|
98
|
-
|
|
101
|
+
function handleKeyDown(event) {
|
|
99
102
|
if (event.key === 'Enter') {
|
|
100
103
|
formRef.current.submitForm();
|
|
101
104
|
}
|
|
102
|
-
}
|
|
103
|
-
|
|
105
|
+
}
|
|
106
|
+
function onTabChangeHandler(tab) {
|
|
104
107
|
setActiveOption(tab.tabid);
|
|
105
|
-
}
|
|
108
|
+
}
|
|
106
109
|
(0, react_2.useEffect)(() => {
|
|
107
110
|
if (sumOptions?.sumAuto && panels?.structuresPanel?.display) {
|
|
108
111
|
setActiveOption(SumSetOptions.Auto);
|
|
@@ -117,7 +120,7 @@ function ChangeSumModal({ onSave, onClose, header, sumOptions, }) {
|
|
|
117
120
|
formRef.current.setValues({ sum: sumOptions?.sum || '', molecule: null });
|
|
118
121
|
}
|
|
119
122
|
}, [panels?.structuresPanel, sumOptions]);
|
|
120
|
-
|
|
123
|
+
function saveHandler(values) {
|
|
121
124
|
switch (setOption) {
|
|
122
125
|
case SumSetOptions.Auto: {
|
|
123
126
|
const { molecule: { mf, id: moleculeId }, } = values;
|
|
@@ -133,26 +136,10 @@ function ChangeSumModal({ onSave, onClose, header, sumOptions, }) {
|
|
|
133
136
|
return;
|
|
134
137
|
}
|
|
135
138
|
onClose();
|
|
136
|
-
}
|
|
137
|
-
const validationSchema = (0, react_2.useMemo)(() => {
|
|
138
|
-
switch (setOption) {
|
|
139
|
-
case SumSetOptions.Auto: {
|
|
140
|
-
return Yup.object({
|
|
141
|
-
molecule: Yup.object().required(),
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
case SumSetOptions.Manual: {
|
|
145
|
-
return Yup.object({
|
|
146
|
-
sum: Yup.number().required(),
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
default:
|
|
150
|
-
return null;
|
|
151
|
-
}
|
|
152
|
-
}, [setOption]);
|
|
139
|
+
}
|
|
153
140
|
const isStructurePanelVisible = panels?.structuresPanel?.display || false;
|
|
154
141
|
return (
|
|
155
142
|
// <div css={modalContainer}>
|
|
156
|
-
(0, jsx_runtime_1.jsxs)("div", { css: [ModalStyle_1.ModalStyles, styles], children: [(0, jsx_runtime_1.jsxs)("div", { className: "header handle", children: [(0, jsx_runtime_1.jsx)("span", { children: header }), (0, jsx_runtime_1.jsx)(CloseButton_1.default, { onClick: onClose })] }), (0, jsx_runtime_1.jsx)("div", { className: "tab-content", children: (0, jsx_runtime_1.jsx)(formik_1.Formik, { innerRef: formRef, onSubmit: saveHandler, initialValues: { sum:
|
|
143
|
+
(0, jsx_runtime_1.jsxs)("div", { css: [ModalStyle_1.ModalStyles, styles], children: [(0, jsx_runtime_1.jsxs)("div", { className: "header handle", children: [(0, jsx_runtime_1.jsx)("span", { children: header }), (0, jsx_runtime_1.jsx)(CloseButton_1.default, { onClick: onClose })] }), (0, jsx_runtime_1.jsx)("div", { className: "tab-content", children: (0, jsx_runtime_1.jsx)(formik_1.Formik, { innerRef: formRef, onSubmit: saveHandler, initialValues: { sum: '', molecule: null }, validationSchema: getValidationSchema(setOption), children: (0, jsx_runtime_1.jsxs)(Tabs_1.default, { activeTab: setOption, onClick: onTabChangeHandler, children: [isStructurePanelVisible && ((0, jsx_runtime_1.jsx)(Tab_1.default, { title: "Auto", tabid: SumSetOptions.Auto, children: (0, jsx_runtime_1.jsx)(SelectMolecule_1.default, { name: "molecule" }) })), (0, jsx_runtime_1.jsx)(Tab_1.default, { title: "Manual", tabid: SumSetOptions.Manual, children: (0, jsx_runtime_1.jsx)("div", { className: "manual-container", children: (0, jsx_runtime_1.jsx)(FormikInput_1.default, { name: "sum", type: "number", nullable: true, placeholder: "Enter the new value", onKeyDown: handleKeyDown }) }) })] }) }) }), (0, jsx_runtime_1.jsx)("div", { className: "footer-container", children: (0, jsx_runtime_1.jsx)(Button_1.default.Done, { onClick: () => formRef.current.submitForm(), style: { width: '80px' }, children: "Set" }) })] }));
|
|
157
144
|
}
|
|
158
145
|
exports.default = ChangeSumModal;
|
|
@@ -27,6 +27,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
30
|
+
/** @jsxImportSource @emotion/react */
|
|
30
31
|
const formik_1 = require("formik");
|
|
31
32
|
const react_1 = require("react");
|
|
32
33
|
const ui_1 = require("react-science/ui");
|
|
@@ -88,7 +89,7 @@ const rowColors = {
|
|
|
88
89
|
};
|
|
89
90
|
const validationSchema = Yup.object({
|
|
90
91
|
source: Yup.string().required(),
|
|
91
|
-
target: Yup.array(Yup.string()).min(1),
|
|
92
|
+
target: Yup.array(Yup.string()).min(1).required(),
|
|
92
93
|
});
|
|
93
94
|
function MetaImportationModal({ onClose, file }) {
|
|
94
95
|
const alert = (0, Context_1.useAlert)();
|
|
@@ -114,7 +115,9 @@ function MetaImportationModal({ onClose, file }) {
|
|
|
114
115
|
};
|
|
115
116
|
}, [file]);
|
|
116
117
|
function handleDrop(files) {
|
|
117
|
-
|
|
118
|
+
if (files[0]) {
|
|
119
|
+
handleParseFile(files[0]);
|
|
120
|
+
}
|
|
118
121
|
}
|
|
119
122
|
const errors = (0, parseMeta_1.mapErrors)(parseResult?.errors || []);
|
|
120
123
|
const metaData = parseResult?.data || [];
|
|
@@ -195,14 +198,21 @@ function MetaImportationModal({ onClose, file }) {
|
|
|
195
198
|
}
|
|
196
199
|
return ((0, jsx_runtime_1.jsxs)("div", { css: ModalStyle_1.ModalStyles, style: { overflow: 'hidden' }, children: [(0, jsx_runtime_1.jsxs)("div", { className: "header handle", children: [(0, jsx_runtime_1.jsx)("span", { children: "Import Meta Information" }), (0, jsx_runtime_1.jsx)(CloseButton_1.default, { onClick: onClose, className: "close-bt" })] }), (0, jsx_runtime_1.jsx)("div", { style: styles.container, children: (0, jsx_runtime_1.jsx)("div", { style: { flex: 1, width: '100%' }, children: !parseResult ? ((0, jsx_runtime_1.jsx)(ui_1.DropZone, { fileValidator: fileValidator, color: "gray", emptyText: "Drag and Drop CSV or tab-delimited file (.csv, .txt or .tsv)", onDrop: handleDrop })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { style: { height: '130px' }, children: [(0, jsx_runtime_1.jsx)(formik_1.Formik, { innerRef: formRef, initialValues: {
|
|
197
200
|
source: null,
|
|
198
|
-
target:
|
|
201
|
+
target: '',
|
|
199
202
|
}, onSubmit: handleLinkSpectra, validationSchema: validationSchema, children: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Label_1.default, { title: "Source field", style: { label: { width: '100px' } }, children: (0, jsx_runtime_1.jsx)(FormikSelect_1.default, { name: "source", items: (0, mapColumnToSelectItems_1.mapColumnToSelectItems)(parseResult?.meta.fields || []), style: {
|
|
200
203
|
width: '300px',
|
|
201
|
-
padding: '
|
|
204
|
+
padding: '5px',
|
|
202
205
|
margin: 0,
|
|
203
206
|
} }) }), (0, jsx_runtime_1.jsx)(Label_1.default, { title: "Target field path", style: {
|
|
204
207
|
label: { width: '100px', padding: '20px 0px' },
|
|
205
|
-
}, children: (0, jsx_runtime_1.jsx)(FormikInput_1.default, { name: "target", style: {
|
|
208
|
+
}, children: (0, jsx_runtime_1.jsx)(FormikInput_1.default, { name: "target", style: {
|
|
209
|
+
input: {
|
|
210
|
+
width: '300px',
|
|
211
|
+
textAlign: 'left',
|
|
212
|
+
padding: '5px',
|
|
213
|
+
fontSize: '14px',
|
|
214
|
+
},
|
|
215
|
+
}, placeholder: "Example: info.plus", datalist: datalist, nullable: true, mapOnChangeValue: (key) => paths?.[key] || null, mapValue: (paths) => (0, convertPathArrayToString_1.convertPathArrayToString)(paths) }) })] }) }), (0, jsx_runtime_1.jsx)(Button_1.default.Done, { onClick: () => formRef.current?.submitForm(), children: "Link Spectra" })] }), (0, jsx_runtime_1.jsx)("div", { style: { height: 'calc(100% - 160px)' }, children: (0, jsx_runtime_1.jsx)(ReactTable_1.default, { columns: columns, data: metaData, approxItemHeight: 25, approxColumnWidth: 100, enableVirtualScroll: true, enableColumnsVirtualScroll: true, activeRow: handleActiveRow, rowStyle: handleRowStyle }) })] })) }) }), (0, jsx_runtime_1.jsx)("div", { className: "footer-container", children: (0, jsx_runtime_1.jsx)(Button_1.default.Done, { onClick: handleImport, disabled: Object.keys(matches).length === 0, children: "Import" }) })] }));
|
|
206
216
|
}
|
|
207
217
|
function fileValidator(file) {
|
|
208
218
|
if (!(0, parseMeta_1.isMetaFile)(file)) {
|
|
@@ -9,6 +9,7 @@ const react_1 = require("react");
|
|
|
9
9
|
const PreferencesContext_1 = require("../../context/PreferencesContext");
|
|
10
10
|
const Label_1 = __importDefault(require("../../elements/Label"));
|
|
11
11
|
const FormikColorInput_1 = __importDefault(require("../../elements/formik/FormikColorInput"));
|
|
12
|
+
const FormikColumnFormatField_1 = require("../../elements/formik/FormikColumnFormatField");
|
|
12
13
|
const FormikNumberInput_1 = __importDefault(require("../../elements/formik/FormikNumberInput"));
|
|
13
14
|
const useNucleus_1 = __importDefault(require("../../hooks/useNucleus"));
|
|
14
15
|
const usePanelPreferences_1 = require("../../hooks/usePanelPreferences");
|
|
@@ -52,19 +53,10 @@ function IntegralsPreferences(props, ref) {
|
|
|
52
53
|
formRef.current.submitForm();
|
|
53
54
|
},
|
|
54
55
|
}));
|
|
55
|
-
return ((0, jsx_runtime_1.jsx)(PreferencesContainer_1.PreferencesContainer, { children: (0, jsx_runtime_1.jsx)(formik_1.Formik, { initialValues: preferencesByNuclei, onSubmit: saveHandler, innerRef: formRef, children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: nuclei?.map((n) => ((0, jsx_runtime_1.jsx)(NucleusPreferences_1.NucleusPreferences, { nucleus: n, fields: formatFields, renderTop: () => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(FormikColorInput_1.default, { name: `nuclei.${n}.color` }), (0, jsx_runtime_1.jsx)(Label_1.default, { title: "stroke width :", style: {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
flex: 2,
|
|
61
|
-
},
|
|
62
|
-
wrapper: {
|
|
63
|
-
flex: 4,
|
|
64
|
-
},
|
|
65
|
-
}, children: (0, jsx_runtime_1.jsx)(FormikNumberInput_1.default, { name: `nuclei.${n}.strokeWidth`, style: {
|
|
66
|
-
width: '60%',
|
|
67
|
-
textAlign: 'center',
|
|
68
|
-
}, min: 1, max: 9, pattern: "[1-9]+" }) })] })) }, n))) }) }) }));
|
|
56
|
+
return ((0, jsx_runtime_1.jsx)(PreferencesContainer_1.PreferencesContainer, { children: (0, jsx_runtime_1.jsx)(formik_1.Formik, { initialValues: preferencesByNuclei, onSubmit: saveHandler, innerRef: formRef, children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: nuclei?.map((n) => ((0, jsx_runtime_1.jsx)(NucleusPreferences_1.NucleusPreferences, { nucleus: n, fields: formatFields, renderTop: () => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Label_1.default, { title: "Color", style: FormikColumnFormatField_1.formatFieldLabelStyle, children: (0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', padding: '2px 0' }, children: [(0, jsx_runtime_1.jsx)("div", { style: { width: '23px' } }), (0, jsx_runtime_1.jsx)(FormikColorInput_1.default, { name: `nuclei.${n}.color` })] }) }), (0, jsx_runtime_1.jsx)(Label_1.default, { title: "stroke width :", style: FormikColumnFormatField_1.formatFieldLabelStyle, children: (0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', padding: '2px 0' }, children: [(0, jsx_runtime_1.jsx)("div", { style: { width: '23px' } }), (0, jsx_runtime_1.jsx)(FormikNumberInput_1.default, { name: `nuclei.${n}.strokeWidth`, style: {
|
|
57
|
+
width: '60%',
|
|
58
|
+
textAlign: 'center',
|
|
59
|
+
padding: '2px',
|
|
60
|
+
}, min: 1, max: 9, pattern: "[1-9]+" })] }) })] })) }, n))) }) }) }));
|
|
69
61
|
}
|
|
70
62
|
exports.default = (0, react_1.memo)((0, react_1.forwardRef)(IntegralsPreferences));
|
|
@@ -9,13 +9,13 @@ const react_mf_1 = require("react-mf");
|
|
|
9
9
|
const MoleculeManager_1 = require("../../../data/molecules/MoleculeManager");
|
|
10
10
|
const DispatchContext_1 = require("../../context/DispatchContext");
|
|
11
11
|
const EditableColumn_1 = __importDefault(require("../../elements/EditableColumn"));
|
|
12
|
+
const Label_1 = __importDefault(require("../../elements/Label"));
|
|
12
13
|
const styles = {
|
|
13
14
|
toolbar: {
|
|
14
15
|
display: 'flex',
|
|
15
16
|
borderBottom: '0.55px solid rgb(240, 240, 240)',
|
|
16
17
|
padding: '5px 10px',
|
|
17
18
|
justifyContent: 'space-between',
|
|
18
|
-
height: '35px',
|
|
19
19
|
},
|
|
20
20
|
labelInput: {
|
|
21
21
|
width: '150px',
|
|
@@ -38,6 +38,6 @@ function MoleculeHeader(props) {
|
|
|
38
38
|
const label = event.target.value;
|
|
39
39
|
dispatch({ type: 'CHANGE_MOLECULE_LABEL', payload: { label, id } });
|
|
40
40
|
}, [dispatch]);
|
|
41
|
-
return ((0, jsx_runtime_1.jsxs)("div", { style: styles.toolbar, children: [(0, jsx_runtime_1.
|
|
41
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: styles.toolbar, children: [(0, jsx_runtime_1.jsx)(Label_1.default, { title: "Label", children: (0, jsx_runtime_1.jsx)(EditableColumn_1.default, { value: currentMolecule.label, style: styles.labelInput, validate: validateLabel, onSave: (event) => saveLabelHandler(currentMolecule.id, event), textOverFlowEllipses: true }) }), (0, jsx_runtime_1.jsxs)("span", { children: [(0, jsx_runtime_1.jsx)(react_mf_1.MF, { mf: currentMolecule.mf }), " - ", currentMolecule.mw?.toFixed(2)] })] }));
|
|
42
42
|
}
|
|
43
43
|
exports.default = MoleculeHeader;
|
|
@@ -47,7 +47,8 @@ const styles = {
|
|
|
47
47
|
height: '100%',
|
|
48
48
|
}),
|
|
49
49
|
};
|
|
50
|
-
function MoleculePanelInner(
|
|
50
|
+
function MoleculePanelInner(props) {
|
|
51
|
+
const { zones, ranges, molecules: moleculesProp, moleculesView, activeTab, displayerMode, } = props;
|
|
51
52
|
const [currentIndex, setCurrentIndex] = (0, react_2.useState)(0);
|
|
52
53
|
const [molecules, setMolecules] = (0, react_2.useState)([]);
|
|
53
54
|
const dispatch = (0, DispatchContext_1.useDispatch)();
|
|
@@ -63,34 +64,31 @@ function MoleculePanelInner({ zones, ranges, molecules: moleculesProp, molecules
|
|
|
63
64
|
});
|
|
64
65
|
}
|
|
65
66
|
}, [molecules.length, moleculesProp]);
|
|
66
|
-
(
|
|
67
|
-
onMoleculeChange?.(molecules[currentIndex] || null);
|
|
68
|
-
}, [currentIndex, molecules, onMoleculeChange]);
|
|
69
|
-
const handleReplaceMolecule = (0, react_2.useCallback)((molecule, molfile) => {
|
|
67
|
+
function handleReplaceMolecule(molecule, molfile) {
|
|
70
68
|
const { id, label } = molecule;
|
|
71
69
|
dispatch({
|
|
72
70
|
type: 'SET_MOLECULE',
|
|
73
71
|
payload: { molfile, id, label },
|
|
74
72
|
});
|
|
75
|
-
}
|
|
76
|
-
|
|
73
|
+
}
|
|
74
|
+
function moleculeIndexHandler(index) {
|
|
77
75
|
setCurrentIndex(index);
|
|
78
|
-
}
|
|
79
|
-
return ((0, jsx_runtime_1.jsxs)("div", { css: styles.panel, children: [(0, jsx_runtime_1.jsx)(MoleculePanelHeader_1.default, { currentIndex: currentIndex, moleculesView: moleculesView, molecules: molecules, onOpenMoleculeEditor: () => openMoleculeEditor(), onMoleculeIndexChange: moleculeIndexHandler
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
76
|
+
}
|
|
77
|
+
return ((0, jsx_runtime_1.jsxs)("div", { css: styles.panel, children: [(0, jsx_runtime_1.jsx)(MoleculePanelHeader_1.default, { currentIndex: currentIndex, moleculesView: moleculesView, molecules: molecules, onOpenMoleculeEditor: () => openMoleculeEditor(), onMoleculeIndexChange: moleculeIndexHandler }), (0, jsx_runtime_1.jsx)("div", { css: styles.innerPanel, children: (0, jsx_runtime_1.jsx)("div", { css: styles.molecule, children: (0, jsx_runtime_1.jsx)(react_d3_utils_1.ResponsiveChart, { children: ({ height, width }) => {
|
|
78
|
+
return ((0, jsx_runtime_1.jsx)(NextPrev_1.default, { onChange: (slideIndex) => setCurrentIndex(slideIndex), defaultIndex: currentIndex, children: molecules && molecules.length > 0 ? (molecules.map((mol, index) => ((0, jsx_runtime_1.jsxs)("div", { css: styles.items, children: [(0, jsx_runtime_1.jsx)(MoleculeHeader_1.default, { currentMolecule: mol, molecules: molecules }), (0, jsx_runtime_1.jsx)("div", { css: styles.slider, className: "mol-svg-container", onDoubleClick: () => openMoleculeEditor(mol), style: {
|
|
79
|
+
backgroundColor: (index + 1) % 2 !== 0 ? '#fafafa' : 'white',
|
|
80
|
+
}, children: (0, jsx_runtime_1.jsx)(react_ocl_nmr_1.default, { OCL: full_1.default, id: `molSVG${index}`, width: width, height: height - 60, molfile: mol.molfile || '', setMolfile: (molfile) => handleReplaceMolecule(mol, molfile), setSelectedAtom: handleOnClickAtom, atomHighlightColor: currentDiaIDsToHighlight &&
|
|
81
|
+
currentDiaIDsToHighlight.length > 0
|
|
82
|
+
? 'red'
|
|
83
|
+
: '#FFD700', atomHighlightOpacity: 0.35, highlights: currentDiaIDsToHighlight &&
|
|
84
|
+
currentDiaIDsToHighlight.length > 0
|
|
85
|
+
? currentDiaIDsToHighlight
|
|
86
|
+
: assignedDiaIDsMerged, setHoverAtom: handleOnAtomHover, showAtomNumber: moleculesView?.[mol.id]?.showAtomNumber || false }) })] }, mol.id)))) : ((0, jsx_runtime_1.jsx)("div", { css: styles.slider, style: { height: '100%' }, onClick: () => openMoleculeEditor(), children: (0, jsx_runtime_1.jsx)("span", { children: "Click to draw molecule" }) })) }));
|
|
87
|
+
} }) }) })] }));
|
|
90
88
|
}
|
|
91
89
|
const MemoizedMoleculePanel = (0, react_2.memo)(MoleculePanelInner);
|
|
92
90
|
const emptyData = { ranges: {}, zones: {} };
|
|
93
|
-
function MoleculePanel(
|
|
91
|
+
function MoleculePanel() {
|
|
94
92
|
const { molecules, view: { molecules: moleculesView, spectra: { activeTab }, }, displayerMode, } = (0, ChartContext_1.useChartData)();
|
|
95
93
|
const data = (0, useSpectrum_1.default)(emptyData);
|
|
96
94
|
const ranges = data?.ranges || {};
|
|
@@ -100,9 +98,6 @@ function MoleculePanel({ onMoleculeChange, children, actionsOptions, emptyTextSt
|
|
|
100
98
|
displayerMode,
|
|
101
99
|
activeTab,
|
|
102
100
|
ranges,
|
|
103
|
-
zones
|
|
104
|
-
onMoleculeChange,
|
|
105
|
-
actionsOptions,
|
|
106
|
-
emptyTextStyle, children: children }));
|
|
101
|
+
zones }));
|
|
107
102
|
}
|
|
108
103
|
exports.default = MoleculePanel;
|