nmrium 0.51.0 → 0.52.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/LinesSeries.js +1 -1
- package/lib/component/EventsTrackers/KeysListenerTracker.js +3 -3
- package/lib/component/context/DispatchContext.d.ts +1 -1
- package/lib/component/elements/Label.js +1 -1
- package/lib/component/header/ApodizationOptionsPanel.js +1 -1
- package/lib/component/header/AutoPeakPickingOptionPanel.js +1 -1
- package/lib/component/header/BaseLineCorrectionPanel.js +2 -2
- package/lib/component/header/Header.js +1 -1
- package/lib/component/header/PhaseCorrectionPanel.js +1 -1
- package/lib/component/header/PhaseCorrectionTwoDimensionsPanel.js +2 -2
- package/lib/component/header/RangesPickingOptionPanel.js +1 -1
- package/lib/component/header/ZeroFillingOptionsPanel.js +1 -1
- package/lib/component/header/Zones2DOptionPanel.js +6 -2
- package/lib/component/hooks/useToolsFunctions.d.ts +1 -1
- package/lib/component/hooks/useToolsFunctions.js +3 -3
- package/lib/component/modal/AboutPredictionModal.js +1 -1
- package/lib/component/modal/AboutSpectrumSimulationModal.js +1 -1
- package/lib/component/modal/EditPeakShapeModal.js +1 -1
- package/lib/component/modal/LoadJCAMPModal.js +1 -1
- package/lib/component/modal/LogsHistoryModal.js +1 -1
- package/lib/component/modal/MultipletAnalysisModal.js +1 -1
- package/lib/component/modal/SaveAsModal.js +2 -2
- package/lib/component/modal/editZone/EditPathLengthFormik.js +2 -2
- package/lib/component/modal/editZone/EditZoneModal.js +1 -1
- package/lib/component/modal/metaImportation/MetaImportationModal.js +1 -1
- package/lib/component/modal/setting/GeneralSettings.js +2 -2
- package/lib/component/modal/setting/settings-tabs/GeneralTabContent.js +1 -1
- package/lib/component/modal/setting/settings-tabs/InfoBlockTabContent.js +1 -1
- package/lib/component/modal/setting/settings-tabs/OnLoadProcessingTabContent.js +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralsPreferences.js +1 -1
- package/lib/component/panels/Panels.js +5 -5
- package/lib/component/panels/RangesPanel/RangesPanel.js +1 -1
- package/lib/component/panels/RangesPanel/RangesPreferences.js +1 -1
- package/lib/component/panels/SpectraPanel/SpectraPanelHeader.d.ts +5 -0
- package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/SpectraPanelHeader.js +8 -8
- package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/SpectraTable.js +1 -1
- package/lib/component/panels/SpectraPanel/SpectraTabs.d.ts +1 -0
- package/lib/component/panels/{SpectrumsPanel/SpectrumsTabs.js → SpectraPanel/SpectraTabs.js} +6 -6
- package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/SpectrumListPanel.js +2 -2
- package/lib/component/panels/databasePanel/DatabasePreferences.js +1 -1
- package/lib/component/panels/header/SpectraAutomaticPickingButton.js +1 -1
- package/lib/component/panels/multipleAnalysisPanel/AlignSpectra.js +1 -1
- package/lib/component/panels/multipleAnalysisPanel/AnalysisChart.js +2 -2
- package/lib/component/panels/multipleAnalysisPanel/MultipleSpectraAnalysisPanel.js +1 -1
- package/lib/component/panels/multipleAnalysisPanel/preferences/index.js +1 -1
- package/lib/component/panels/predictionPanel/PredictionOptionsPanel.js +2 -2
- package/lib/component/panels/predictionPanel/PredictionSimpleOptions.js +1 -1
- package/lib/component/panels/spectrumSimulation/SpectrumSimulationPreferences.js +1 -1
- package/lib/component/panels/spectrumSimulation/SpectrumSimulationSimpleOptions.js +1 -1
- package/lib/component/reducer/IgnoreActions.js +1 -1
- package/lib/component/reducer/Reducer.d.ts +1 -0
- package/lib/component/reducer/Reducer.js +17 -16
- package/lib/component/reducer/actions/DomainActions.js +3 -3
- package/lib/component/reducer/actions/LoadActions.js +1 -1
- package/lib/component/reducer/actions/PreferencesActions.js +2 -2
- package/lib/component/reducer/actions/ToolsActions.d.ts +3 -3
- package/lib/component/reducer/actions/ToolsActions.js +8 -8
- package/lib/component/reducer/actions/ZonesActions.d.ts +2 -0
- package/lib/component/reducer/actions/ZonesActions.js +5 -1
- package/lib/component/toolbar/ToolBar.js +15 -15
- package/lib/component/toolbar/toolbarMenu.js +4 -4
- package/lib/constants.js +5 -5
- package/lib/data/data2d/Spectrum2D/getSlice.js +1 -1
- package/lib/data/data2d/Spectrum2D/zones/getDetectionZones.d.ts +1 -0
- package/lib/versionInfo.js +1 -1
- package/package.json +2 -1
- package/lib/component/panels/SpectrumsPanel/SpectraPanelHeader.d.ts +0 -5
- package/lib/component/panels/SpectrumsPanel/SpectrumsTabs.d.ts +0 -1
- /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/SpectraPreferences.d.ts +0 -0
- /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/SpectraPreferences.js +0 -0
- /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/SpectraTable.d.ts +0 -0
- /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/SpectrumListPanel.d.ts +0 -0
- /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/ColorIndicator.d.ts +0 -0
- /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/ColorIndicator.js +0 -0
- /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/RenderAsHTML.d.ts +0 -0
- /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/RenderAsHTML.js +0 -0
- /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/ShowHideSpectrumButton.d.ts +0 -0
- /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/ShowHideSpectrumButton.js +0 -0
- /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/SpectraColumnsManager.d.ts +0 -0
- /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/SpectraColumnsManager.js +0 -0
- /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/SpectrumName.d.ts +0 -0
- /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/SpectrumName.js +0 -0
- /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/setting/PlotChart.d.ts +0 -0
- /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/setting/PlotChart.js +0 -0
- /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/setting/Spectrum1DHistogram.d.ts +0 -0
- /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/setting/Spectrum1DHistogram.js +0 -0
- /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/setting/Spectrum1DSetting.d.ts +0 -0
- /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/setting/Spectrum1DSetting.js +0 -0
- /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/setting/Spectrum2DHistogram.d.ts +0 -0
- /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/setting/Spectrum2DHistogram.js +0 -0
- /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/setting/Spectrum2DSetting.d.ts +0 -0
- /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/setting/Spectrum2DSetting.js +0 -0
- /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/setting/SpectrumSetting.d.ts +0 -0
- /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/setting/SpectrumSetting.js +0 -0
- /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/setting/processSnapPlot.d.ts +0 -0
- /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/setting/processSnapPlot.js +0 -0
- /package/lib/component/reducer/actions/{SpectrumsActions.d.ts → SpectraActions.d.ts} +0 -0
- /package/lib/component/reducer/actions/{SpectrumsActions.js → SpectraActions.js} +0 -0
|
@@ -27,7 +27,7 @@ function LinesSeries() {
|
|
|
27
27
|
const innerHeight = height - margin.bottom - SPECTRA_BOTTOM_MARGIN;
|
|
28
28
|
const spectra = (data?.filter((d) => isSpectrum1D(d) && d.display.isVisible && xDomains[d.id]) || []);
|
|
29
29
|
const { setActiveSpectrum } = useSetActiveSpectrumAction();
|
|
30
|
-
return (_jsxs("g", { clipPath: `url(#${displayerKey}clip-chart-1d)`, className: "
|
|
30
|
+
return (_jsxs("g", { clipPath: `url(#${displayerKey}clip-chart-1d)`, className: "spectra", children: [spectra.map((d, i) => (_jsxs("g", { children: [_jsx(Line, { display: d.display, id: d.id, data: get1DDataXY(d), index: i }), verticalAlign === 'stack' && selectedTool === 'zoom' && (_jsx("rect", { css: style, y: innerHeight - shiftY * i - BOX_SIZE / 2, x: margin.left, width: `${innerWidth}px`, height: `${BOX_SIZE}px`, onClick: (e) => {
|
|
31
31
|
setActiveSpectrum(e, d.id);
|
|
32
32
|
}, "data-no-export": "true" }))] }, d.id))), activeSpectra?.map((activeSpectrum) => (_jsx("use", { href: `#${activeSpectrum.id}` }, activeSpectrum.id)))] }));
|
|
33
33
|
}
|
|
@@ -24,7 +24,7 @@ function KeysListenerTracker(props) {
|
|
|
24
24
|
const modal = useModal();
|
|
25
25
|
const openLoader = useLoader();
|
|
26
26
|
const [isSaveModalOpened, openSaveAsDialog, closeSaveAsDialog] = useOnOff(false);
|
|
27
|
-
const { handleChangeOption, handleFullZoomOut,
|
|
27
|
+
const { handleChangeOption, handleFullZoomOut, alignSpectraVerticallyHandler, changeDisplayViewModeHandler, } = useToolsFunctions();
|
|
28
28
|
const { saveToClipboardHandler, saveAsJSONHandler } = useExport();
|
|
29
29
|
const isToolVisible = useCheckToolsVisibility();
|
|
30
30
|
const { highlight, remove } = useHighlightData();
|
|
@@ -354,7 +354,7 @@ function KeysListenerTracker(props) {
|
|
|
354
354
|
}
|
|
355
355
|
case 'c': {
|
|
356
356
|
if (allow1DTool && isToolVisible('spectraCenterAlignments')) {
|
|
357
|
-
|
|
357
|
+
alignSpectraVerticallyHandler();
|
|
358
358
|
}
|
|
359
359
|
break;
|
|
360
360
|
}
|
|
@@ -410,7 +410,7 @@ function KeysListenerTracker(props) {
|
|
|
410
410
|
toaster.show({ message: error.message, intent: 'danger' });
|
|
411
411
|
}
|
|
412
412
|
}, [
|
|
413
|
-
|
|
413
|
+
alignSpectraVerticallyHandler,
|
|
414
414
|
allow1DTool,
|
|
415
415
|
changeDisplayViewModeHandler,
|
|
416
416
|
dispatch,
|
|
@@ -11,8 +11,8 @@ import { MoleculeActions } from '../reducer/actions/MoleculeActions';
|
|
|
11
11
|
import { PeaksActions } from '../reducer/actions/PeaksActions';
|
|
12
12
|
import { PreferencesActions } from '../reducer/actions/PreferencesActions';
|
|
13
13
|
import { RangesActions } from '../reducer/actions/RangesActions';
|
|
14
|
+
import { SpectrumActions } from '../reducer/actions/SpectraActions';
|
|
14
15
|
import { SpectraAnalysisActions } from '../reducer/actions/SpectraAnalysisAction';
|
|
15
|
-
import { SpectrumActions } from '../reducer/actions/SpectrumsActions';
|
|
16
16
|
import { ToolsActions } from '../reducer/actions/ToolsActions';
|
|
17
17
|
import { ZonesActions } from '../reducer/actions/ZonesActions';
|
|
18
18
|
import { ActionType } from '../reducer/types/ActionType';
|
|
@@ -4,7 +4,7 @@ import { css } from '@emotion/react';
|
|
|
4
4
|
import Button from './Button';
|
|
5
5
|
export default function Label(props) {
|
|
6
6
|
const { title, shortTitle, className = '', children, style, description, renderTitle, ...otherProps } = props;
|
|
7
|
-
return (_jsxs("
|
|
7
|
+
return (_jsxs("label", { style: { display: 'flex', alignItems: 'center', ...style?.container }, ...otherProps, children: [_jsxs("span", { className: className, style: {
|
|
8
8
|
fontSize: '12px',
|
|
9
9
|
color: '#232323',
|
|
10
10
|
paddingRight: '10px',
|
|
@@ -62,7 +62,7 @@ function ApodizationOptionsInnerPanel(props) {
|
|
|
62
62
|
if (props.filter) {
|
|
63
63
|
formData = { ...initialValues, ...props.filter.value, livePreview: true };
|
|
64
64
|
}
|
|
65
|
-
return (_jsx(HeaderContainer, { children: _jsx(Formik, { onSubmit: (values) => handleApplyFilter(values), initialValues: formData, validationSchema: validationSchema, children: ({ submitForm }) => (_jsxs(_Fragment, { children: [_jsx(Label, { title: "Line broadening
|
|
65
|
+
return (_jsx(HeaderContainer, { children: _jsx(Formik, { onSubmit: (values) => handleApplyFilter(values), initialValues: formData, validationSchema: validationSchema, children: ({ submitForm }) => (_jsxs(_Fragment, { children: [_jsx(Label, { title: "Line broadening:", shortTitle: "LB:", style: headerLabelStyle, children: _jsx(FormikInput, { type: "number", name: "lineBroadening", min: 0, max: 1, step: 0.1, style: inputStyle, debounceTime: 250 }) }), _jsx(Label, { title: "Gauss broadening:", shortTitle: "GB:", style: headerLabelStyle, children: _jsx(FormikInput, { type: "number", name: "gaussBroadening", min: 0, max: 1, step: 0.1, style: inputStyle, debounceTime: 250 }) }), _jsx(Label, { title: "Line broadening center [0 - 1]:", shortTitle: "LB center:", style: headerLabelStyle, children: _jsx(FormikInput, { type: "number", name: "lineBroadeningCenter", min: 0, max: 1, step: 0.1, style: inputStyle, debounceTime: 250 }) }), _jsx(Label, { title: "Live preview", style: { label: { padding: '0 5px' } }, children: _jsx(FormikCheckBox, { name: "livePreview" }) }), _jsx(FormikOnChange, { onChange: (values) => handleApplyFilter(values, 'onChange'), enableOnload: true }), _jsx(ActionButtons, { onDone: submitForm, onCancel: handleCancelFilter })] })) }) }));
|
|
66
66
|
}
|
|
67
67
|
const MemoizedApodizationPanel = memo(ApodizationOptionsInnerPanel);
|
|
68
68
|
export default function ApodizationOptionsPanel() {
|
|
@@ -61,6 +61,6 @@ function AutoPeakPickingOptionPanel() {
|
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
return (_jsx(HeaderContainer, { children: _jsx(Formik, { initialValues: INIT_VALUES, onSubmit: handlePeakPicking, validationSchema: validationSchema, children: ({ handleSubmit, isValid }) => (_jsxs(_Fragment, { children: [_jsx(Label, { title: "Direction
|
|
64
|
+
return (_jsx(HeaderContainer, { children: _jsx(Formik, { initialValues: INIT_VALUES, onSubmit: handlePeakPicking, validationSchema: validationSchema, children: ({ handleSubmit, isValid }) => (_jsxs(_Fragment, { children: [_jsx(Label, { title: "Direction:", shortTitle: "", style: headerLabelStyle, children: _jsx(FormikSelect, { name: "direction", items: LookFor, style: { width: '85px' } }) }), _jsx(Label, { title: "Max number of peaks:", shortTitle: "Max peaks:", style: headerLabelStyle, children: _jsx(FormikInput, { type: "number", name: "maxNumberOfPeaks", style: inputStyle, min: 0, step: 1 }) }), _jsx(Label, { title: "Noise factor:", shortTitle: "Noise:", style: headerLabelStyle, children: _jsx(FormikInput, { type: "number", name: "noiseFactor", style: inputStyle, min: 0 }) }), _jsx(Label, { title: "Min/max Ratio:", shortTitle: "Ratio:", style: headerLabelStyle, children: _jsx(FormikInput, { type: "number", name: "minMaxRatio", style: inputStyle, step: 0.01, min: 0 }) }), _jsx(Button.Done, { onClick: () => handleSubmit(), style: { margin: '0 10px' }, disabled: !isValid, children: "Apply" })] })) }) }));
|
|
65
65
|
}
|
|
66
66
|
export default memo(AutoPeakPickingOptionPanel);
|
|
@@ -107,8 +107,8 @@ function BaseLineCorrectionInnerPanel(props) {
|
|
|
107
107
|
setAlgorithm(selectedAlgorithm);
|
|
108
108
|
}
|
|
109
109
|
const form = formData(algorithm, props?.filter?.value || {});
|
|
110
|
-
return (_jsxs(HeaderContainer, { children: [_jsx(Label, { title: "Algorithm: ", style: headerLabelStyle, children: _jsx(Select, { items: getAlgorithmsList(), value: algorithm, onChange: handleChangeAlgorithm }) }), _jsx(Formik, { onSubmit: (values) => handleApplyFilter(values), initialValues: form.values, validationSchema: form.validation, enableReinitialize: true, children: ({ submitForm }) => (_jsxs(_Fragment, { children: [algorithm && algorithm === 'airpls' && (_jsxs("div", { style: { display: 'flex' }, children: [_jsx(Label, { title: "
|
|
111
|
-
['autoPolynomial', 'polynomial'].includes(algorithm) && (_jsx(Label, { title: "
|
|
110
|
+
return (_jsxs(HeaderContainer, { children: [_jsx(Label, { title: "Algorithm: ", style: headerLabelStyle, children: _jsx(Select, { items: getAlgorithmsList(), value: algorithm, onChange: handleChangeAlgorithm }) }), _jsx(Formik, { onSubmit: (values) => handleApplyFilter(values), initialValues: form.values, validationSchema: form.validation, enableReinitialize: true, children: ({ submitForm }) => (_jsxs(_Fragment, { children: [algorithm && algorithm === 'airpls' && (_jsxs("div", { style: { display: 'flex' }, children: [_jsx(Label, { title: "Max iterations:", style: headerLabelStyle, children: _jsx(FormikInput, { type: "number", name: "maxIterations", debounceTime: 250, style: inputStyle }) }), _jsx(Label, { title: "Tolerance:", style: headerLabelStyle, children: _jsx(FormikInput, { type: "number", name: "tolerance", debounceTime: 250, style: inputStyle }) })] })), algorithm &&
|
|
111
|
+
['autoPolynomial', 'polynomial'].includes(algorithm) && (_jsx(Label, { title: "Degree [1 - 6]:", shortTitle: "Degree:", style: headerLabelStyle, children: _jsx(FormikInput, { type: "number", name: "degree", min: 1, max: 6, style: inputStyle, debounceTime: 250 }) })), _jsx(Label, { title: "Live preview", style: headerLabelStyle, children: _jsx(FormikCheckBox, { name: "livePreview" }) }), _jsx(FormikOnChange, { onChange: (values) => handleApplyFilter(values, 'onChange'), enableOnload: true }), _jsx(ActionButtons, { onDone: submitForm, onCancel: handleCancelFilter })] })) })] }));
|
|
112
112
|
}
|
|
113
113
|
const MemoizedBaseLineCorrectionPanel = memo(BaseLineCorrectionInnerPanel);
|
|
114
114
|
export default function BaseLineCorrectionPanel() {
|
|
@@ -105,7 +105,7 @@ function HeaderInner(props) {
|
|
|
105
105
|
alignItems: 'center',
|
|
106
106
|
}, children: [_jsx("div", { children: _jsx(Toolbar, { children: _jsx(AboutUsModal, {}) }) }), _jsx("div", { className: "toolOptionsPanel", style: { flex: 1 }, children: selectedPanel })] }), _jsxs(HeaderContainer, { style: {
|
|
107
107
|
alignItems: 'center',
|
|
108
|
-
}, children: [!hideWorkspaces && (_jsx(DropDownButton, { data: workspacesList, selectedKey: workspace.current, onSelect: changeWorkspaceHandler, renderItem: renderItem })), !hideGeneralSettings && _jsx(SaveButton, {}), !general?.hideLogs && _jsx(LogsHistoryModal, {}), _jsx("div", { children: _jsxs(Toolbar, { children: [!general?.hideHelp && (_jsx(Toolbar.Item, { id: "user-manual", title: "User manual", onClick: () => window.open(docsBaseUrl, '_blank'), icon: _jsx(FaQuestionCircle, {}) })), _jsx(Toolbar.Item, { id: "user-manual", title: "NMRium channel", onClick: () => window.open('https://www.youtube.com/@nmrium', '_blank'), icon: _jsx(FaFilm, {}) }), !hideGeneralSettings && (_jsx(GeneralSettingsModal, { height: height / 2 })), !fullscreen.isFullScreen && !general?.hideMaximize && (_jsx(Toolbar.Item, { id: "full-screen", onClick: fullscreen.toggle, title: "Full
|
|
108
|
+
}, children: [!hideWorkspaces && (_jsx(DropDownButton, { data: workspacesList, selectedKey: workspace.current, onSelect: changeWorkspaceHandler, renderItem: renderItem })), !hideGeneralSettings && _jsx(SaveButton, {}), !general?.hideLogs && _jsx(LogsHistoryModal, {}), _jsx("div", { children: _jsxs(Toolbar, { children: [!general?.hideHelp && (_jsx(Toolbar.Item, { id: "user-manual", title: "User manual", onClick: () => window.open(docsBaseUrl, '_blank'), icon: _jsx(FaQuestionCircle, {}) })), _jsx(Toolbar.Item, { id: "user-manual", title: "NMRium channel", onClick: () => window.open('https://www.youtube.com/@nmrium', '_blank'), icon: _jsx(FaFilm, {}) }), !hideGeneralSettings && (_jsx(GeneralSettingsModal, { height: height / 2 })), !fullscreen.isFullScreen && !general?.hideMaximize && (_jsx(Toolbar.Item, { id: "full-screen", onClick: fullscreen.toggle, title: "Full screen", className: "windowButton", icon: _jsx(FaRegWindowMaximize, {}) }))] }) })] })] }) }));
|
|
109
109
|
}
|
|
110
110
|
function SaveButton() {
|
|
111
111
|
const { workspace, workspaces, originalWorkspaces } = usePreferences();
|
|
@@ -133,5 +133,5 @@ export default function PhaseCorrectionPanel() {
|
|
|
133
133
|
type: 'RESET_SELECTED_TOOL',
|
|
134
134
|
});
|
|
135
135
|
}
|
|
136
|
-
return (_jsxs(HeaderContainer, { children: [_jsx("div", { style: { padding: '0 5px' }, children: _jsx(Select, { items: algorithms, filterable: false, itemsEqual: "value", ...defaultSelectProps, children: _jsx(Button, { text: phaseCorrectionTypeItem?.label, rightIcon: "double-caret-vertical" }) }) }), phaseCorrectionTypeItem?.value === 'manual' && (_jsxs(_Fragment, { children: [_jsx(Label, { title: "PH0
|
|
136
|
+
return (_jsxs(HeaderContainer, { children: [_jsx("div", { style: { padding: '0 5px' }, children: _jsx(Select, { items: algorithms, filterable: false, itemsEqual: "value", ...defaultSelectProps, children: _jsx(Button, { text: phaseCorrectionTypeItem?.label, rightIcon: "double-caret-vertical" }) }) }), phaseCorrectionTypeItem?.value === 'manual' && (_jsxs(_Fragment, { children: [_jsx(Label, { title: "PH0:", style: headerLabelStyle, children: _jsx(Input, { name: "ph0", style: inputStyle, onChange: handleInput, value: value.ph0, type: "number", debounceTime: 250 }) }), _jsx(Label, { title: "PH1:", style: headerLabelStyle, children: _jsx(Input, { name: "ph1", style: inputStyle, onChange: handleInput, value: value.ph1, type: "number", debounceTime: 250 }) }), _jsx(InputRange, { ref: ph0Ref, name: "ph0", label: "Change PH0 (click and drag)", shortLabel: "Ph0", style: { width: '20%' }, onChange: handleRangeChange }), _jsx(InputRange, { ref: ph1Ref, name: "ph1", label: "Change PH1 (click and drag)", shortLabel: "Ph1", style: { width: '20%' }, onChange: handleRangeChange })] })), _jsx(ActionButtons, { onDone: handleApplyFilter, onCancel: handleCancelFilter })] }));
|
|
137
137
|
}
|
|
@@ -147,9 +147,9 @@ export default function PhaseCorrectionTwoDimensionsPanel() {
|
|
|
147
147
|
function handleToggleAddTraceToBothDirections() {
|
|
148
148
|
dispatch({ type: 'TOGGLE_ADD_PHASE_CORRECTION_TRACE_TO_BOTH_DIRECTIONS' });
|
|
149
149
|
}
|
|
150
|
-
return (_jsxs(HeaderContainer, { style: { padding: '0 5px' }, children: [_jsx(Label, { title: "Direction
|
|
150
|
+
return (_jsxs(HeaderContainer, { style: { padding: '0 5px' }, children: [_jsx(Label, { title: "Direction:", style: headerLabelStyle, children: _jsxs(Toolbar, { children: [_jsx(Toolbar.Item, { css: css `
|
|
151
151
|
border: 1px solid #f7f7f7;
|
|
152
152
|
`, title: "Horizontal", icon: _jsx(FaRulerHorizontal, {}), active: activeTraceDirection === 'horizontal', onClick: () => onChangeHandler('horizontal') }), _jsx(Toolbar.Item, { css: css `
|
|
153
153
|
border: 1px solid #f7f7f7;
|
|
154
|
-
`, title: "Vertical", icon: _jsx(FaRulerVertical, {}), active: activeTraceDirection === 'vertical', onClick: () => onChangeHandler('vertical') })] }) }), _jsx("div", { style: { paddingRight: '5px' }, children: _jsx(Toolbar, { children: _jsx(Toolbar.Item, { title: "Add the trace in both directions", icon: _jsx(MdLooksTwo, {}), active: addTracesToBothDirections, onClick: handleToggleAddTraceToBothDirections }) }) }), _jsx(Label, { title: "PH0
|
|
154
|
+
`, title: "Vertical", icon: _jsx(FaRulerVertical, {}), active: activeTraceDirection === 'vertical', onClick: () => onChangeHandler('vertical') })] }) }), _jsx("div", { style: { paddingRight: '5px' }, children: _jsx(Toolbar, { children: _jsx(Toolbar.Item, { title: "Add the trace in both directions", icon: _jsx(MdLooksTwo, {}), active: addTracesToBothDirections, onClick: handleToggleAddTraceToBothDirections }) }) }), _jsx(Label, { title: "PH0:", style: headerLabelStyle, children: _jsx(Input, { name: "ph0", style: inputStyle, onChange: handleInput, value: value[activeTraceDirection].ph0, type: "number", debounceTime: 250 }) }), _jsx(Label, { title: "PH1:", style: headerLabelStyle, children: _jsx(Input, { name: "ph1", style: inputStyle, onChange: handleInput, value: value[activeTraceDirection].ph1, type: "number", debounceTime: 250 }) }), _jsx(InputRange, { ref: ph0Ref, name: "ph0", label: "Change PH0 (click and drag)", shortLabel: "Ph0", style: { width: '20%' }, onChange: handleRangeChange }), _jsx(InputRange, { ref: ph1Ref, name: "ph1", label: "Change PH1 (click and drag)", shortLabel: "Ph1", style: { width: '20%' }, onChange: handleRangeChange }), _jsx(ActionButtons, { onDone: handleApplyFilter, onCancel: handleCancelFilter })] }));
|
|
155
155
|
}
|
|
@@ -35,7 +35,7 @@ function RangesPickingOptionPanel() {
|
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
return (_jsx(HeaderContainer, { children: _jsx(Formik, { onSubmit: handleRangesPicking, initialValues: initialValues, validationSchema: validationSchema, children: ({ handleSubmit, isValid }) => (_jsxs(_Fragment, { children: [_jsx(Label, { title: "Detect negative
|
|
38
|
+
return (_jsx(HeaderContainer, { children: _jsx(Formik, { onSubmit: handleRangesPicking, initialValues: initialValues, validationSchema: validationSchema, children: ({ handleSubmit, isValid }) => (_jsxs(_Fragment, { children: [_jsx(Label, { title: "Detect negative", style: headerLabelStyle, children: _jsx(FormikCheckBox, { name: "lookNegative" }) }), _jsx(Label, { title: "Min/max ratio:", style: headerLabelStyle, children: _jsx(FormikInput, { type: "number", name: "minMaxRatio", style: {
|
|
39
39
|
input: {
|
|
40
40
|
width: '70px',
|
|
41
41
|
textAlign: 'center',
|
|
@@ -63,7 +63,7 @@ function ZeroFillingOptionsInnerPanel(props) {
|
|
|
63
63
|
type: 'RESET_SELECTED_TOOL',
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
|
-
return (_jsx(HeaderContainer, { children: _jsx(Formik, { onSubmit: (values) => handleApplyFilter(values), initialValues: { nbPoints: size, livePreview: true }, children: ({ submitForm }) => (_jsxs(_Fragment, { children: [_jsx(Label, { title: "Size:
|
|
66
|
+
return (_jsx(HeaderContainer, { children: _jsx(Formik, { onSubmit: (values) => handleApplyFilter(values), initialValues: { nbPoints: size, livePreview: true }, children: ({ submitForm }) => (_jsxs(_Fragment, { children: [_jsx(Label, { title: "Size:", style: headerLabelStyle, children: _jsx(FormikSelect, { items: Sizes, style: { marginLeft: 10, marginRight: 10 }, name: "nbPoints" }) }), _jsx(Label, { title: "Live preview", style: { label: { padding: '0 5px' } }, children: _jsx(FormikCheckBox, { name: "livePreview" }) }), _jsx(FormikOnChange, { onChange: (values) => handleApplyFilter(values, 'onChange'), enableOnload: true }), _jsx(ActionButtons, { onDone: submitForm, onCancel: handleCancelFilter })] })) }) }));
|
|
67
67
|
}
|
|
68
68
|
const MemoizedZeroFillingOptionsPanel = memo(ZeroFillingOptionsInnerPanel);
|
|
69
69
|
export default function ZeroFillingOptionsPanel() {
|
|
@@ -14,6 +14,7 @@ const validationSchema = Yup.object().shape({
|
|
|
14
14
|
});
|
|
15
15
|
const initialValues = {
|
|
16
16
|
zonesNoiseFactor: 1,
|
|
17
|
+
zonesMinMaxRatio: 0.03,
|
|
17
18
|
};
|
|
18
19
|
function Zones2DOptionPanel() {
|
|
19
20
|
const dispatch = useDispatch();
|
|
@@ -26,9 +27,12 @@ function Zones2DOptionPanel() {
|
|
|
26
27
|
const handleChangeNoiseFactory = useCallback((values) => {
|
|
27
28
|
dispatch({ type: 'CHANGE_ZONES_NOISE_FACTOR', payload: values });
|
|
28
29
|
}, [dispatch]);
|
|
29
|
-
return (_jsx(HeaderContainer, { children: _jsx(Formik, { onSubmit: handleZonesPicking, initialValues: initialValues, validationSchema: validationSchema, children: ({ handleSubmit, isValid }) => (_jsxs(_Fragment, { children: [_jsx(Label, { title: "Noise factor
|
|
30
|
+
return (_jsx(HeaderContainer, { children: _jsx(Formik, { onSubmit: handleZonesPicking, initialValues: initialValues, validationSchema: validationSchema, children: ({ handleSubmit, isValid }) => (_jsxs(_Fragment, { children: [_jsx(Label, { title: "Noise factor:", style: headerLabelStyle, children: _jsx(FormikInput, { type: "number", name: "zonesNoiseFactor", style: {
|
|
30
31
|
input: { width: '50px', textAlign: 'center' },
|
|
31
32
|
inputWrapper: { height: '100%' },
|
|
32
|
-
}, min: 0, step: 1 }) }), _jsx(
|
|
33
|
+
}, min: 0, step: 1 }) }), _jsx(Label, { title: "Min/max ratio:", style: headerLabelStyle, children: _jsx(FormikInput, { type: "number", name: "zonesMinMaxRatio", style: {
|
|
34
|
+
input: { width: '50px', textAlign: 'center' },
|
|
35
|
+
inputWrapper: { height: '100%' },
|
|
36
|
+
}, min: 0, step: 0.01 }) }), _jsx(FormikOnChange, { enableValidation: true, onChange: handleChangeNoiseFactory }), _jsx(Button.Done, { onClick: () => handleSubmit(), style: { margin: '0 10px' }, disabled: !isValid, children: "Auto Zones Picking" })] })) }) }));
|
|
33
37
|
}
|
|
34
38
|
export default Zones2DOptionPanel;
|
|
@@ -3,6 +3,6 @@ export default function useToolsFunctions(): {
|
|
|
3
3
|
handleFullZoomOut: () => void;
|
|
4
4
|
changeDisplayViewModeHandler: () => void;
|
|
5
5
|
changeSpectrumViewHandler: () => void;
|
|
6
|
-
|
|
6
|
+
alignSpectraVerticallyHandler: () => void;
|
|
7
7
|
isRealSpectrumShown: boolean;
|
|
8
8
|
};
|
|
@@ -66,9 +66,9 @@ export default function useToolsFunctions() {
|
|
|
66
66
|
});
|
|
67
67
|
setIsRealSpectrumShown(!isRealSpectrumShown);
|
|
68
68
|
}, [dispatch, isRealSpectrumShown]);
|
|
69
|
-
const
|
|
69
|
+
const alignSpectraVerticallyHandler = useCallback(() => {
|
|
70
70
|
dispatch({
|
|
71
|
-
type: '
|
|
71
|
+
type: 'SET_SPECTRA_VERTICAL_ALIGN',
|
|
72
72
|
});
|
|
73
73
|
}, [dispatch]);
|
|
74
74
|
return {
|
|
@@ -76,7 +76,7 @@ export default function useToolsFunctions() {
|
|
|
76
76
|
handleFullZoomOut,
|
|
77
77
|
changeDisplayViewModeHandler,
|
|
78
78
|
changeSpectrumViewHandler,
|
|
79
|
-
|
|
79
|
+
alignSpectraVerticallyHandler,
|
|
80
80
|
isRealSpectrumShown,
|
|
81
81
|
};
|
|
82
82
|
}
|
|
@@ -40,6 +40,6 @@ const styles = css `
|
|
|
40
40
|
`;
|
|
41
41
|
function AboutPredictionModal() {
|
|
42
42
|
const [isOpenDialog, openDialog, closeDialog] = useOnOff(false);
|
|
43
|
-
return (_jsxs(_Fragment, { children: [_jsx(Toolbar.Item, { icon: _jsx(FaInfo, {}), onClick: openDialog, title: "About
|
|
43
|
+
return (_jsxs(_Fragment, { children: [_jsx(Toolbar.Item, { icon: _jsx(FaInfo, {}), onClick: openDialog, title: "About prediction" }), _jsx(Dialog, { isOpen: isOpenDialog, onClose: closeDialog, title: "About prediction", style: { width: '600px' }, children: _jsxs(DialogBody, { css: styles, children: [_jsx("p", { children: "If you are using our tools please cite us:" }), _jsxs("ul", { children: [_jsxs("li", { children: ["Damiano Banfi and Luc Patiny", ' ', _jsx("a", { href: "http://dx.doi.org/10.2533/chimia.2008.280", target: "_blank", rel: "noreferrer", children: "www.nmrdb.org: Resurrecting and processing NMR spectra on-line" }), ' ', _jsx("i", { children: "Chimia" }), ", ", _jsx("b", { children: "2008" }), ", 62(4), 280-281."] }), _jsxs("li", { children: ["Andr\u00E9s M. Castillo, Luc Patiny and Julien Wist", ' ', _jsx("a", { href: "http://dx.doi.org/10.1016/j.jmr.2010.12.008", target: "_blank", rel: "noreferrer", children: "Fast and Accurate Algorithm for the Simulation of NMR spectra of Large Spin Systems" }), ' ', _jsx("i", { children: "Journal of Magnetic Resonance" }), " ", _jsx("b", { children: "2011" }), ", 209(2), 123-130."] })] }), _jsxs("p", { children: [_jsx("sup", { children: "1" }), "H NMR prediction is possible thanks to the tool of the FCT-Universidade NOVA de Lisboa developed by Yuri Binev and Joao Aires-de-Sousa:"] }), _jsxs("ul", { children: [_jsxs("li", { children: ["Yuri Binev, Maria M. B. Marques and Jo\u00E3o Aires-de-Sousa", ' ', _jsxs("a", { href: "http://dx.doi.org/10.1021/ci700172n", target: "_blank", rel: "noreferrer", children: ["Prediction of ", _jsx("sup", { children: "1" }), "H NMR coupling constants with associative neural networks trained for chemical shifts"] }), ' ', _jsx("i", { children: "J. Chem. Inf. Model." }), " ", _jsx("b", { children: "2007" }), ", 47(6), 2089-2097."] }), _jsxs("li", { children: ["Jo\u00E3o Aires-de-Sousa, Markus C. Hemmer and Johann Gasteiger", ' ', _jsxs("a", { href: "http://dx.doi.org/10.1021/ac010737m", target: "_blank", rel: "noreferrer", children: ["Prediction of ", _jsx("sup", { children: "1" }), "H NMR Chemical Shifts Using Neural Networks"] }), ", ", _jsx("i", { children: "Analytical Chemistry" }), ", ", _jsx("b", { children: "2002" }), ", 74(1), 80-90."] })] }), _jsxs("p", { children: [_jsx("sup", { children: "13" }), "C NMR prediction was possible thanks to NMRshiftDB:"] }), _jsx("ul", { children: _jsxs("li", { children: ["Steinbeck, Christoph, Stefan Krause, and Stefan Kuhn", ' ', _jsx("a", { href: "http://dx.doi.org/10.1021/ci0341363", target: "_blank", rel: "noreferrer", children: "NMRShiftDB Constructing a Free Chemical Information System with Open-Source Components" }), ' ', _jsx("i", { children: "Journal of chemical information and computer sciences" }), ",", ' ', _jsx("b", { children: "2003" }), ", 43(6): 1733-1739."] }) })] }) })] }));
|
|
44
44
|
}
|
|
45
45
|
export default AboutPredictionModal;
|
|
@@ -40,6 +40,6 @@ const styles = css `
|
|
|
40
40
|
`;
|
|
41
41
|
function AboutSpectrumSimulationModal() {
|
|
42
42
|
const [isOpenDialog, openDialog, closeDialog] = useOnOff(false);
|
|
43
|
-
return (_jsxs(_Fragment, { children: [_jsx(Toolbar, { children: _jsx(Toolbar.Item, { onClick: openDialog, title: "About
|
|
43
|
+
return (_jsxs(_Fragment, { children: [_jsx(Toolbar, { children: _jsx(Toolbar.Item, { onClick: openDialog, title: "About prediction", icon: _jsx(FaInfo, {}) }) }), _jsx(Dialog, { isOpen: isOpenDialog, onClose: closeDialog, title: "About spectrum simulation", style: { width: '600px' }, children: _jsxs(DialogBody, { css: styles, children: [_jsx("p", { children: "If you are using our tools please cite us:" }), _jsx("ul", { children: _jsxs("li", { children: ["Andr\u00E9s M. Castillo, Luc Patiny and Julien Wist", ' ', _jsx("a", { href: "http://dx.doi.org/10.1016/j.jmr.2010.12.008", target: "_blank", rel: "noreferrer", children: "Fast and Accurate Algorithm for the Simulation of NMR spectra of Large Spin Systems" }), ' ', _jsx("i", { children: "Journal of Magnetic Resonance" }), " ", _jsx("b", { children: "2011" }), ", 209(2), 123-130."] }) })] }) })] }));
|
|
44
44
|
}
|
|
45
45
|
export default AboutSpectrumSimulationModal;
|
|
@@ -79,6 +79,6 @@ function EditPeakShapeModal({ onClose = () => null, peak, peaksPreferences, }) {
|
|
|
79
79
|
}, [dispatch, onClose, peak.id]);
|
|
80
80
|
const values = getValues(peak, kind);
|
|
81
81
|
const valuePPM = formatNumber(peak.x, peaksPreferences.deltaPPM.format);
|
|
82
|
-
return (_jsxs("div", { css: [ModalStyles, styles], children: [_jsxs("div", { className: "header handle", children: [_jsxs("span", { children: [`Peak Shape Edition ( ${valuePPM} PPM)`, " "] }), _jsx(CloseButton, { title: "Close", onClick: () => onClose?.(), className: "close-bt" })] }), _jsx("div", { className: "inner-content", children: _jsx(Formik, { enableReinitialize: true, innerRef: refForm, initialValues: values, validationSchema: validation(kind), onSubmit: changePeakShapeHandler, children: _jsxs(_Fragment, { children: [_jsx(Label, { title: "
|
|
82
|
+
return (_jsxs("div", { css: [ModalStyles, styles], children: [_jsxs("div", { className: "header handle", children: [_jsxs("span", { children: [`Peak Shape Edition ( ${valuePPM} PPM)`, " "] }), _jsx(CloseButton, { title: "Close", onClick: () => onClose?.(), className: "close-bt" })] }), _jsx("div", { className: "inner-content", children: _jsx(Formik, { enableReinitialize: true, innerRef: refForm, initialValues: values, validationSchema: validation(kind), onSubmit: changePeakShapeHandler, children: _jsxs(_Fragment, { children: [_jsx(Label, { title: "Kind:", style: labelStyle, children: _jsx(Select, { items: KINDS, style: { margin: 0, height: 30 }, value: kind, onChange: (kind) => setKind(kind) }) }), _jsx(Label, { title: "FWHM:", style: labelStyle, children: _jsx(FormikInput, { name: "fwhm", style: inputStyle }) }), kind === 'pseudoVoigt' && (_jsx(Label, { title: "Mu:", style: labelStyle, children: _jsx(FormikInput, { name: "mu", style: inputStyle }) }))] }) }) }), _jsx("div", { className: "footer-container", children: _jsx(ActionButtons, { style: { flexDirection: 'row-reverse', margin: 0 }, onDone: () => refForm.current.submitForm(), doneLabel: "Save", onCancel: () => onClose?.() }) })] }));
|
|
83
83
|
}
|
|
84
84
|
export default EditPeakShapeModal;
|
|
@@ -62,7 +62,7 @@ export function LoadJCAMPModal({ onCloseDialog, isOpen }) {
|
|
|
62
62
|
onCloseDialog?.();
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
return (_jsxs(Dialog, { isOpen: true, onClose: onCloseDialog, title: "Load JCAMP
|
|
65
|
+
return (_jsxs(Dialog, { isOpen: true, onClose: onCloseDialog, title: "Load JCAMP", style: { minWidth: '400px' }, children: [_jsx(DialogBody, { css: css `
|
|
66
66
|
background-color: white;
|
|
67
67
|
`, children: _jsx(Formik, { initialValues: { url: '' }, validationSchema: loadFormValidation, onSubmit: loadJCAMPHandler, innerRef: ref, children: _jsx(Label, { title: "URL", style: labelStyle, children: _jsx(FormikError, { name: "url", style: { container: { flex: 1 } }, children: _jsx(FormikInput, { name: "url", type: "string", style: {
|
|
68
68
|
input: {
|
|
@@ -107,7 +107,7 @@ export function LogsHistoryModal(props) {
|
|
|
107
107
|
markAsRead();
|
|
108
108
|
closeDialog();
|
|
109
109
|
onClose?.();
|
|
110
|
-
}, title: "Logs
|
|
110
|
+
}, title: "Logs history", style: { width: '50vw', height: '50vh' }, children: [_jsx(DialogBody, { css: css `
|
|
111
111
|
background-color: white;
|
|
112
112
|
`, children: _jsx(ReactTable, { columns: COLUMNS, data: sortedLogs, emptyDataRowText: "No Logs", rowStyle: handleRowStyle }) }), _jsx(DialogFooter, { children: _jsx(Button.Danger, { onClick: () => logger.clear(), fill: "outline", children: _jsxs("div", { style: { display: 'flex', alignItems: 'center' }, children: [_jsx(FaRegTrashAlt, {}), _jsx("span", { style: { paddingLeft: '5px' }, children: "Clear Logs" })] }) }) })] })] }));
|
|
113
113
|
}
|
|
@@ -74,7 +74,7 @@ const loaderStyles = css `
|
|
|
74
74
|
}
|
|
75
75
|
`;
|
|
76
76
|
export default function MultipletAnalysisModal({ data, activeSpectrum, scaleX, startX, endX, onClose, isOpen, }) {
|
|
77
|
-
return (_jsx(Dialog, { isOpen: isOpen, onClose: () => onClose(), title: "Analyse
|
|
77
|
+
return (_jsx(Dialog, { isOpen: isOpen, onClose: () => onClose(), title: "Analyse multiplet", style: { width: 900, height: 400 }, children: _jsx(DialogBody, { css: styles, children: _jsx(InnerMultipleAnalysis, { data,
|
|
78
78
|
activeSpectrum,
|
|
79
79
|
scaleX,
|
|
80
80
|
startX,
|
|
@@ -64,8 +64,8 @@ function SaveAsModal(props) {
|
|
|
64
64
|
`, children: _jsx(Formik, { innerRef: refForm, initialValues: { ...INITIAL_VALUE, name: fileName }, onSubmit: submitHandler, children: _jsxs(_Fragment, { children: [_jsx(Label, { style: labelStyle, title: "Name", children: _jsx(FormikInput, { name: "name", className: "name", style: {
|
|
65
65
|
inputWrapper: { width: '100%' },
|
|
66
66
|
input: { padding: '5px', textAlign: 'left' },
|
|
67
|
-
} }) }), _jsx(Label, { style: labelStyle, title: "Compressed",
|
|
67
|
+
} }) }), _jsx(Label, { style: labelStyle, title: "Compressed", children: _jsx(FormikCheckBox, { name: "compressed" }) }), _jsx(Label, { style: labelStyle, title: "Pretty format", children: _jsx(FormikCheckBox, { name: "pretty" }) }), _jsx(Label, { style: labelStyle, title: "Include view", children: _jsx(FormikCheckBox, { name: "include.view" }) }), _jsx(Label, { style: labelStyle, title: "Include settings", children: _jsx(FormikCheckBox, { name: "include.settings" }) }), _jsx(Label, { style: labelStyle, title: "Include data", children: _jsx("div", { css: styles, children: _jsxs("div", { children: [_jsxs("label", { children: [_jsx(Field, { type: "radio", name: "include.dataType", value: DataExportOptions.ROW_DATA }), "Raw data"] }), _jsxs("label", { style: {
|
|
68
68
|
color: source ? 'black' : 'lightgray',
|
|
69
|
-
}, children: [_jsx(Field, { type: "radio", name: "include.dataType", value: DataExportOptions.DATA_SOURCE, disabled: !source }), "Data
|
|
69
|
+
}, children: [_jsx(Field, { type: "radio", name: "include.dataType", value: DataExportOptions.DATA_SOURCE, disabled: !source }), "Data source"] }), _jsxs("label", { children: [_jsx(Field, { type: "radio", name: "include.dataType", value: DataExportOptions.NO_DATA }), "No data"] })] }) }) })] }) }) }), _jsx(DialogFooter, { children: _jsx(ActionButtons, { style: { flexDirection: 'row-reverse', margin: 0 }, onDone: () => refForm.current.submitForm(), doneLabel: "Save", onCancel: () => onCloseDialog?.() }) })] }));
|
|
70
70
|
}
|
|
71
71
|
export default SaveAsModal;
|
|
@@ -47,14 +47,14 @@ const editPathLengthsStyles = css `
|
|
|
47
47
|
`;
|
|
48
48
|
function EditPathLengthFormik({ signalIndex }) {
|
|
49
49
|
const { errors, values, } = useFormikContext();
|
|
50
|
-
return (_jsxs("div", { css: editPathLengthsStyles, children: [_jsx("p", { children: "Setting of the minimum and maximum path length (J coupling)." }), _jsxs("div", { className: "input-container", children: [_jsx(Label, { title: "Min:
|
|
50
|
+
return (_jsxs("div", { css: editPathLengthsStyles, children: [_jsx("p", { children: "Setting of the minimum and maximum path length (J coupling)." }), _jsxs("div", { className: "input-container", children: [_jsx(Label, { title: "Min:", children: _jsx(FormikNumberInput, { name: `signals[${signalIndex}].j.pathLength.from`, defaultValue: values.signals[signalIndex].j?.pathLength?.from ||
|
|
51
51
|
DefaultPathLengths[values.experimentType]?.from ||
|
|
52
52
|
1, style: {
|
|
53
53
|
color: errors.signals?.[signalIndex].j?.pathLength?.from
|
|
54
54
|
? 'red'
|
|
55
55
|
: 'black',
|
|
56
56
|
}, min: 1, max: values.signals[signalIndex].j?.pathLength?.to ||
|
|
57
|
-
DefaultPathLengths[values.experimentType]?.to, pattern: "[1-9]+" }) }), _jsx(Label, { title: "Max:
|
|
57
|
+
DefaultPathLengths[values.experimentType]?.to, pattern: "[1-9]+" }) }), _jsx(Label, { title: "Max:", children: _jsx(FormikNumberInput, { name: `signals[${signalIndex}].j.pathLength.to`, defaultValue: values.signals[signalIndex].j?.pathLength?.to ||
|
|
58
58
|
DefaultPathLengths[values.experimentType]?.to ||
|
|
59
59
|
1, style: {
|
|
60
60
|
color: errors.signals?.[signalIndex].j?.pathLength?.to
|
|
@@ -96,6 +96,6 @@ function EditZoneModal({ onSaveEditZoneModal = () => null, onCloseEditZoneModal
|
|
|
96
96
|
}),
|
|
97
97
|
};
|
|
98
98
|
}, [rowData.signals, rowData.tableMetaInfo.experiment]);
|
|
99
|
-
return (_jsx("div", { css: styles, children: _jsx(Formik, { innerRef: formRef, initialValues: data, validationSchema: zoneFormValidation, onSubmit: handleOnSave, children: _jsxs(_Fragment, { children: [_jsxs("div", { className: "header handle", children: [_jsx(Button, { onClick: handleOnZoom, className: "zoom-button", children: _jsx(FaSearchPlus, { title: "Set to default view on range in spectrum" }) }), _jsx("span", { children: `Zone and Signal edition` }), _jsx(SaveButton, { onClick: () => formRef.current.submitForm(), title: "Save and
|
|
99
|
+
return (_jsx("div", { css: styles, children: _jsx(Formik, { innerRef: formRef, initialValues: data, validationSchema: zoneFormValidation, onSubmit: handleOnSave, children: _jsxs(_Fragment, { children: [_jsxs("div", { className: "header handle", children: [_jsx(Button, { onClick: handleOnZoom, className: "zoom-button", children: _jsx(FaSearchPlus, { title: "Set to default view on range in spectrum" }) }), _jsx("span", { children: `Zone and Signal edition` }), _jsx(SaveButton, { onClick: () => formRef.current.submitForm(), title: "Save and exit" }), _jsx(CloseButton, { title: "Close", onClick: handleOnClose })] }), _jsx(SignalsForm, {})] }) }) }));
|
|
100
100
|
}
|
|
101
101
|
export default EditZoneModal;
|
|
@@ -66,7 +66,7 @@ export function MetaImportationModal(props) {
|
|
|
66
66
|
const { isOpen, onCloseDialog, file } = props;
|
|
67
67
|
if (!isOpen)
|
|
68
68
|
return null;
|
|
69
|
-
return (_jsx(Dialog, { isOpen: true, title: "Import
|
|
69
|
+
return (_jsx(Dialog, { isOpen: true, title: "Import meta information", style: { width: 900, height: 600 }, onClose: onCloseDialog, children: _jsx(InnerMetaImportationModal, { onCloseDialog, file }) }));
|
|
70
70
|
}
|
|
71
71
|
function InnerMetaImportationModal({ file, onCloseDialog, }) {
|
|
72
72
|
const toaster = useToaster();
|
|
@@ -204,7 +204,7 @@ function GeneralSettingsModal({ height }) {
|
|
|
204
204
|
function handlePastWorkspaceAction() {
|
|
205
205
|
void readText().then(handlePastWorkspace);
|
|
206
206
|
}
|
|
207
|
-
return (_jsxs(_Fragment, { children: [_jsx(Toolbar.Item, { id: "general-settings", onClick: openDialog, title: "General settings", icon: _jsx(FaWrench, {}) }), _jsxs(Dialog, { isOpen: isOpenDialog, onClose: closeDialog, style: { maxWidth: 1000, width: '50vw', minWidth: 800 }, title: "General
|
|
207
|
+
return (_jsxs(_Fragment, { children: [_jsx(Toolbar.Item, { id: "general-settings", onClick: openDialog, title: "General settings", icon: _jsx(FaWrench, {}) }), _jsxs(Dialog, { isOpen: isOpenDialog, onClose: closeDialog, style: { maxWidth: 1000, width: '50vw', minWidth: 800 }, title: "General settings", icon: "cog", children: [_jsx("div", { children: _jsxs("div", { className: Classes.DIALOG_HEADER, style: {
|
|
208
208
|
cursor: 'default',
|
|
209
209
|
paddingTop: '10px',
|
|
210
210
|
boxShadow: 'none',
|
|
@@ -218,7 +218,7 @@ function GeneralSettingsModal({ height }) {
|
|
|
218
218
|
}, children: _jsx(FaPaste, {}) })] }) }), _jsx(DialogBody, { css: css `
|
|
219
219
|
padding: 0;
|
|
220
220
|
background-color: white;
|
|
221
|
-
`, children: _jsx("div", { css: styles, style: { height }, children: _jsx(Formik, { enableReinitialize: true, innerRef: refForm, initialValues: currentWorkspace, validationSchema: validation, onSubmit: submitHandler, validate: handleDisabledRestButton, children: _jsxs(Tabs, { position: PositionsEnum.LEFT, activeTab: activeTab, onClick: tabChangeHandler, children: [_jsx(Tab, { title: "General", tabid: "general", children: _jsx("div", { className: "inner-content", children: _jsx(GeneralTabContent, {}) }) }), _jsx(Tab, { title: "Formatting", tabid: "formatting", children: _jsx("div", { className: "inner-content", children: _jsx(FormattingTabContent, {}) }) }), _jsx(Tab, { title: "Panels", tabid: "display", children: _jsx("div", { className: "inner-content", children: _jsx(DisplayTabContent, {}) }) }), _jsx(Tab, { title: "Tools", tabid: "tools", children: _jsx("div", { className: "inner-content", children: _jsx(ToolsTabContent, {}) }) }), _jsx(Tab, { title: "Databases", tabid: "databases", children: _jsx("div", { className: "inner-content", children: _jsx(DatabasesTabContent, { currentWorkspace: workspaceName, originalWorkspaces: originalWorkspaces }) }) }), _jsx(Tab, { title: "Import filters", tabid: "importation-filters", children: _jsx("div", { className: "inner-content", children: _jsx(ImportationFiltersTabContent, {}) }) }), _jsx(Tab, { title: "Title
|
|
221
|
+
`, children: _jsx("div", { css: styles, style: { height }, children: _jsx(Formik, { enableReinitialize: true, innerRef: refForm, initialValues: currentWorkspace, validationSchema: validation, onSubmit: submitHandler, validate: handleDisabledRestButton, children: _jsxs(Tabs, { position: PositionsEnum.LEFT, activeTab: activeTab, onClick: tabChangeHandler, children: [_jsx(Tab, { title: "General", tabid: "general", children: _jsx("div", { className: "inner-content", children: _jsx(GeneralTabContent, {}) }) }), _jsx(Tab, { title: "Formatting", tabid: "formatting", children: _jsx("div", { className: "inner-content", children: _jsx(FormattingTabContent, {}) }) }), _jsx(Tab, { title: "Panels", tabid: "display", children: _jsx("div", { className: "inner-content", children: _jsx(DisplayTabContent, {}) }) }), _jsx(Tab, { title: "Tools", tabid: "tools", children: _jsx("div", { className: "inner-content", children: _jsx(ToolsTabContent, {}) }) }), _jsx(Tab, { title: "Databases", tabid: "databases", children: _jsx("div", { className: "inner-content", children: _jsx(DatabasesTabContent, { currentWorkspace: workspaceName, originalWorkspaces: originalWorkspaces }) }) }), _jsx(Tab, { title: "Import filters", tabid: "importation-filters", children: _jsx("div", { className: "inner-content", children: _jsx(ImportationFiltersTabContent, {}) }) }), _jsx(Tab, { title: "Title block", tabid: "title-block", children: _jsx("div", { className: "inner-content", children: _jsx(InfoBlockTabContent, {}) }) }), _jsx(Tab, { title: "Auto processing", tabid: "on-load-processing", children: _jsx("div", { className: "inner-content", children: _jsx(OnLoadProcessingTabContent, {}) }) }), _jsx(Tab, { title: "Spectra colors", tabid: "spectra-colors", children: _jsx("div", { className: "inner-content", children: _jsx(SpectraColorsTabContent, {}) }) })] }) }) }) }), _jsx(DialogFooter, { children: _jsxs("div", { style: { display: 'flex', justifyContent: 'flex-end' }, children: [_jsx(ActionButtons, { style: { flexDirection: 'row-reverse', margin: 0 }, onDone: () => refForm.current?.submitForm(), doneLabel: "Apply and Save", onCancel: () => {
|
|
222
222
|
closeDialog?.();
|
|
223
223
|
} }), _jsx(Button.Secondary, { style: { margin: '0 10px' }, onClick: applyPreferencesHandler, children: "Apply" })] }) })] }), _jsx(SaveSettingsModal, {}), _jsx(ClipboardFallbackModal, { mode: shouldFallback, onDismiss: cleanShouldFallback, onReadText: handlePastWorkspace, text: text, label: "Workspace" })] }));
|
|
224
224
|
}
|
|
@@ -33,6 +33,6 @@ const LOGS_LEVELS = Object.keys(LOGGER_LEVELS).map((level) => ({
|
|
|
33
33
|
value: level,
|
|
34
34
|
}));
|
|
35
35
|
function GeneralTabContent() {
|
|
36
|
-
return (_jsxs(_Fragment, { children: [_jsxs(GroupPane, { text: "General", children: [_jsx(Label, { title: "Opacity of dimmed spectra [
|
|
36
|
+
return (_jsxs(_Fragment, { children: [_jsxs(GroupPane, { text: "General", children: [_jsx(Label, { title: "Opacity of dimmed spectra [0 - 1]", style: labelStyle, children: _jsx(FormikInput, { name: "general.dimmedSpectraOpacity", checkValue: (value) => Number(value) >= 0 && Number(value) <= 1, type: "number", step: 0.1, min: 0, max: 1, style: { inputWrapper: { width: 60 } } }) }), _jsx(Label, { title: "Invert actions", style: labelStyle, children: _jsx(FormikCheckBox, { name: "general.invert", style: { container: { justifyContent: 'flex-start' } } }) })] }), _jsx(GroupPane, { text: "Experimental features", children: _jsx(Label, { title: "Enable experimental features", style: labelStyle, children: _jsx(FormikCheckBox, { name: "display.general.experimentalFeatures.display", style: { container: { justifyContent: 'flex-start' } } }) }) }), _jsx(GroupPane, { text: "Rendering", children: _jsx(Label, { title: "Spectra rendering", style: labelStyle, children: _jsx(FormikSelect, { items: SHAPE_RENDERING, name: "general.spectraRendering", style: { width: '150px' } }) }) }), _jsxs(GroupPane, { text: "Logging settings", children: [_jsx(Label, { title: "Level", style: labelStyle, children: _jsx(FormikSelect, { items: LOGS_LEVELS, name: "general.loggingLevel", style: { width: '100px' } }) }), _jsx(Label, { title: "Popup logging level", style: labelStyle, children: _jsx(FormikSelect, { items: LOGS_LEVELS, name: "general.popupLoggingLevel", style: { width: '100px' } }) })] })] }));
|
|
37
37
|
}
|
|
38
38
|
export default GeneralTabContent;
|
|
@@ -86,7 +86,7 @@ function InfoBlockTabContent() {
|
|
|
86
86
|
},
|
|
87
87
|
},
|
|
88
88
|
], [addHandler, datalist, deleteHandler, paths]);
|
|
89
|
-
return (_jsxs("div", { children: [_jsx(Label, { title: "Display spectrum info block",
|
|
89
|
+
return (_jsxs("div", { children: [_jsx(Label, { title: "Display spectrum info block", style: { wrapper: { padding: '10px 0' } }, children: _jsx(FormikCheckBox, { name: "infoBlock.visible" }) }), _jsx(GroupPane, { text: "Fields", renderHeader: (text) => {
|
|
90
90
|
return (_jsx(FieldsBlockHeader, { text: text, onAdd: () => addHandler(fields, 0) }));
|
|
91
91
|
}, children: _jsx(ReactTable, { style: {
|
|
92
92
|
'table, table td, table th': { border: 'none' },
|
|
@@ -9,7 +9,7 @@ import FormikCheckBox from '../../../elements/formik/FormikCheckBox';
|
|
|
9
9
|
function OnLoadProcessingTabContent() {
|
|
10
10
|
const { values } = useFormikContext();
|
|
11
11
|
const isExperimentalFeatures = values.display?.general?.experimentalFeatures?.display || false;
|
|
12
|
-
return (_jsxs("div", { children: [_jsx(Label, { title: "Enable auto processing
|
|
12
|
+
return (_jsxs("div", { children: [_jsx(Label, { title: "Enable auto processing on load", style: { wrapper: { padding: '10px 0' } }, children: _jsx(FormikCheckBox, { name: "onLoadProcessing.autoProcessing" }) }), isExperimentalFeatures && _jsx(AutoProcessingFilters, {})] }));
|
|
13
13
|
}
|
|
14
14
|
function AutoProcessingFilters() {
|
|
15
15
|
const { values } = useFormikContext();
|
|
@@ -72,7 +72,7 @@ function IntegralsPreferences(props, ref) {
|
|
|
72
72
|
formRef.current.submitForm();
|
|
73
73
|
},
|
|
74
74
|
}));
|
|
75
|
-
return (_jsx(PreferencesContainer, { children: _jsx(Formik, { initialValues: preferencesByNuclei, onSubmit: saveHandler, innerRef: formRef, children: _jsx(_Fragment, { children: nuclei?.map((n) => (_jsx(NucleusPreferences, { nucleus: n, fields: formatFields, renderTop: () => (_jsxs(_Fragment, { children: [_jsx(Label, { title: "Color", style: formatFieldLabelStyle, children: _jsxs("div", { style: { display: 'flex', padding: '2px 0' }, children: [_jsx("div", { style: { width: '23px' } }), _jsx(FormikColorPickerDropdown, { name: `nuclei.${n}.color` })] }) }), _jsx(Label, { title: "
|
|
75
|
+
return (_jsx(PreferencesContainer, { children: _jsx(Formik, { initialValues: preferencesByNuclei, onSubmit: saveHandler, innerRef: formRef, children: _jsx(_Fragment, { children: nuclei?.map((n) => (_jsx(NucleusPreferences, { nucleus: n, fields: formatFields, renderTop: () => (_jsxs(_Fragment, { children: [_jsx(Label, { title: "Color", style: formatFieldLabelStyle, children: _jsxs("div", { style: { display: 'flex', padding: '2px 0' }, children: [_jsx("div", { style: { width: '23px' } }), _jsx(FormikColorPickerDropdown, { name: `nuclei.${n}.color` })] }) }), _jsx(Label, { title: "Stroke width:", style: formatFieldLabelStyle, children: _jsxs("div", { style: { display: 'flex', padding: '2px 0' }, children: [_jsx("div", { style: { width: '23px' } }), _jsx(FormikInput, { name: `nuclei.${n}.strokeWidth`, type: "number", style: {
|
|
76
76
|
input: {
|
|
77
77
|
textAlign: 'center',
|
|
78
78
|
padding: '2px',
|
|
@@ -12,7 +12,7 @@ import MatrixGenerationPanel from './MatrixGenerationPanel/MatrixGenerationPanel
|
|
|
12
12
|
import MoleculePanel from './MoleculesPanel/MoleculePanel';
|
|
13
13
|
import PeaksPanel from './PeaksPanel/PeaksPanel';
|
|
14
14
|
import RangesPanel from './RangesPanel/RangesPanel';
|
|
15
|
-
import SpectrumListPanel from './
|
|
15
|
+
import SpectrumListPanel from './SpectraPanel/SpectrumListPanel';
|
|
16
16
|
import SummaryPanel from './SummaryPanel/SummaryPanel';
|
|
17
17
|
import ZonesPanel from './ZonesPanel/ZonesPanel';
|
|
18
18
|
import DatabasePanel from './databasePanel/DatabasePanel';
|
|
@@ -59,13 +59,13 @@ const accordionItems = [
|
|
|
59
59
|
mode: '1D',
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
|
-
title: 'Multiple
|
|
62
|
+
title: 'Multiple spectra analysis',
|
|
63
63
|
component: _jsx(MultipleSpectraAnalysisPanel, {}),
|
|
64
64
|
hidePreferenceKey: 'multipleSpectraAnalysisPanel',
|
|
65
65
|
mode: null,
|
|
66
66
|
},
|
|
67
67
|
{
|
|
68
|
-
title: 'Matrix
|
|
68
|
+
title: 'Matrix generation',
|
|
69
69
|
component: _jsx(MatrixGenerationPanel, {}),
|
|
70
70
|
hidePreferenceKey: 'matrixGenerationPanel',
|
|
71
71
|
mode: '1D',
|
|
@@ -95,7 +95,7 @@ const accordionItems = [
|
|
|
95
95
|
mode: null,
|
|
96
96
|
},
|
|
97
97
|
{
|
|
98
|
-
title: 'Automatic
|
|
98
|
+
title: 'Automatic assignment',
|
|
99
99
|
component: _jsx(AutomaticAssignment, {}),
|
|
100
100
|
hidePreferenceKey: 'automaticAssignmentPanel',
|
|
101
101
|
mode: null,
|
|
@@ -107,7 +107,7 @@ const accordionItems = [
|
|
|
107
107
|
mode: null,
|
|
108
108
|
},
|
|
109
109
|
{
|
|
110
|
-
title: 'Spectrum
|
|
110
|
+
title: 'Spectrum simulation',
|
|
111
111
|
component: _jsx(SpectrumSimulation, {}),
|
|
112
112
|
hidePreferenceKey: 'simulationPanel',
|
|
113
113
|
mode: '1D',
|
|
@@ -113,6 +113,6 @@ function RangesPreferences(props, ref) {
|
|
|
113
113
|
formRef.current.submitForm();
|
|
114
114
|
},
|
|
115
115
|
}), []);
|
|
116
|
-
return (_jsx(PreferencesContainer, { children: _jsx(Formik, { initialValues: preferencesByNuclei, enableReinitialize: true, onSubmit: saveHandler, innerRef: formRef, children: _jsx(_Fragment, { children: nuclei?.map((n) => (_jsx(NucleusPreferences, { nucleus: n, fields: formatFields, renderBottom: () => (_jsx(Label, { title: "J
|
|
116
|
+
return (_jsx(PreferencesContainer, { children: _jsx(Formik, { initialValues: preferencesByNuclei, enableReinitialize: true, onSubmit: saveHandler, innerRef: formRef, children: _jsx(_Fragment, { children: nuclei?.map((n) => (_jsx(NucleusPreferences, { nucleus: n, fields: formatFields, renderBottom: () => (_jsx(Label, { title: "J graph tolerance (Hz):", style: formatFieldLabelStyle, children: _jsxs("div", { style: { display: 'flex' }, children: [_jsx("div", { style: { width: '23px' } }), _jsx(FormikInput, { name: `nuclei.${n}.jGraphTolerance`, type: "number", style: formatFieldInputStyle })] }) })) }, n))) }) }) }));
|
|
117
117
|
}
|
|
118
118
|
export default forwardRef(RangesPreferences);
|
|
@@ -12,13 +12,13 @@ import useSpectrum from '../../hooks/useSpectrum';
|
|
|
12
12
|
import { getSpectraByNucleus } from '../../utility/getSpectraByNucleus';
|
|
13
13
|
import DefaultPanelHeader from '../header/DefaultPanelHeader';
|
|
14
14
|
import { SpectraAutomaticPickingButton } from '../header/SpectraAutomaticPickingButton';
|
|
15
|
-
function getMissingProjection(
|
|
15
|
+
function getMissingProjection(spectraData, activeTab) {
|
|
16
16
|
let nucleus = activeTab.split(',');
|
|
17
17
|
nucleus = nucleus[0] === nucleus[1] ? [nucleus[0]] : nucleus;
|
|
18
18
|
const missingNucleus = [];
|
|
19
19
|
for (const n of nucleus) {
|
|
20
|
-
const
|
|
21
|
-
if (!
|
|
20
|
+
const hasSpectra = spectraData.some((d) => d.info.nucleus === n);
|
|
21
|
+
if (!hasSpectra) {
|
|
22
22
|
missingNucleus.push(n);
|
|
23
23
|
}
|
|
24
24
|
}
|
|
@@ -42,13 +42,13 @@ function SpectraPanelHeaderInner({ data, activeSpectrum, activeSpectra, activeTa
|
|
|
42
42
|
],
|
|
43
43
|
});
|
|
44
44
|
}, [activeSpectra?.length, dispatch, modal]);
|
|
45
|
-
function
|
|
45
|
+
function showAllSpectraHandler() {
|
|
46
46
|
dispatch({
|
|
47
47
|
type: 'CHANGE_SPECTRA_VISIBILITY_BY_NUCLEUS',
|
|
48
48
|
payload: { nucleus: activeTab, flag: true },
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function hideAllSpectraHandler() {
|
|
52
52
|
dispatch({
|
|
53
53
|
type: 'CHANGE_SPECTRA_VISIBILITY_BY_NUCLEUS',
|
|
54
54
|
payload: { nucleus: activeTab, flag: false },
|
|
@@ -85,13 +85,13 @@ function SpectraPanelHeaderInner({ data, activeSpectrum, activeSpectra, activeTa
|
|
|
85
85
|
disabled: !hasActiveSpectra,
|
|
86
86
|
icon: _jsx(FaEyeSlash, {}),
|
|
87
87
|
title: 'Hide selected spectra',
|
|
88
|
-
onClick:
|
|
88
|
+
onClick: hideAllSpectraHandler,
|
|
89
89
|
},
|
|
90
90
|
{
|
|
91
91
|
disabled: !hasActiveSpectra,
|
|
92
92
|
icon: _jsx(FaEye, {}),
|
|
93
93
|
title: 'Show selected spectra',
|
|
94
|
-
onClick:
|
|
94
|
+
onClick: showAllSpectraHandler,
|
|
95
95
|
},
|
|
96
96
|
];
|
|
97
97
|
if (displayerMode === '2D' && activeSpectrum?.info.isFt) {
|
|
@@ -125,7 +125,7 @@ function SpectraPanelHeaderInner({ data, activeSpectrum, activeSpectra, activeTa
|
|
|
125
125
|
return (_jsx(DefaultPanelHeader, { onDelete: handleDelete, total: data?.length, counter: spectraLengthPerTab, deleteToolTip: "Delete selected spectra", disableDelete: !hasActiveSpectra, onSettingClick: onSettingClick, leftButtons: leftButtons }));
|
|
126
126
|
}
|
|
127
127
|
const MemoizedSpectraPanelHeader = memo(SpectraPanelHeaderInner);
|
|
128
|
-
export default function
|
|
128
|
+
export default function SpectraTabs({ onSettingClick, }) {
|
|
129
129
|
const { data, view: { spectra: { activeTab }, }, displayerMode, } = useChartData();
|
|
130
130
|
const spectrum = useSpectrum();
|
|
131
131
|
const activeSpectra = useActiveSpectra();
|