nmrium 0.21.0 → 0.22.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/ExclusionZonesAnnotations.js +1 -2
- package/lib/component/1d/Integral.js +1 -6
- package/lib/component/1d/Viewer1D.js +4 -4
- package/lib/component/1d/ranges/RangeIntegral.js +2 -6
- package/lib/component/1d/utilities/scale.d.ts +1 -1
- package/lib/component/1d/utilities/scale.js +7 -6
- package/lib/component/2d/Viewer2D.js +5 -5
- package/lib/component/NMRium.d.ts +2 -0
- package/lib/component/elements/EditableColumn.d.ts +1 -1
- package/lib/component/header/Header.js +3 -7
- package/lib/component/{1d/utilities → hooks}/useIntegralPath.d.ts +0 -0
- package/lib/component/hooks/useIntegralPath.js +53 -0
- package/lib/component/hooks/useToolsFunctions.js +4 -5
- package/lib/component/hooks/useXScale.d.ts +2 -0
- package/lib/component/hooks/useXScale.js +7 -0
- package/lib/component/modal/editRange/forms/validation/EditRangeValidation.js +1 -1
- package/lib/component/modal/editZone/EditPathLengthFormik.d.ts +5 -0
- package/lib/component/modal/editZone/EditPathLengthFormik.js +72 -0
- package/lib/component/modal/editZone/EditZoneModal.d.ts +8 -0
- package/lib/component/modal/editZone/EditZoneModal.js +96 -0
- package/lib/component/modal/editZone/SignalFormTab.d.ts +6 -0
- package/lib/component/modal/editZone/SignalFormTab.js +6 -0
- package/lib/component/modal/editZone/SignalsForm.d.ts +2 -0
- package/lib/component/modal/editZone/SignalsForm.js +62 -0
- package/lib/component/modal/editZone/validation/EditZoneValidation.d.ts +534 -0
- package/lib/component/modal/editZone/validation/EditZoneValidation.js +17 -0
- package/lib/component/modal/editZone/validation/isDefaultPathLength.d.ts +3 -0
- package/lib/component/modal/editZone/validation/isDefaultPathLength.js +7 -0
- package/lib/component/modal/setting/ControllersTabContent.js +1 -1
- package/lib/component/modal/setting/GeneralSettings.d.ts +1 -2
- package/lib/component/modal/setting/GeneralSettings.js +13 -5
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignment.d.ts +2 -0
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignment.js +13 -0
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignmentTable.d.ts +7 -0
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignmentTable.js +38 -0
- package/lib/component/panels/Panels.d.ts +1 -1
- package/lib/component/panels/Panels.js +10 -14
- package/lib/component/panels/RangesPanel/RangesPanel.js +2 -2
- package/lib/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +7 -2
- package/lib/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnHeader.js +7 -2
- package/lib/component/panels/SummaryPanel/CorrelationTable/Constants.d.ts +1 -6
- package/lib/component/panels/SummaryPanel/CorrelationTable/Constants.js +1 -7
- package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTable.d.ts +2 -3
- package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTable.js +4 -5
- package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.d.ts +2 -3
- package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +21 -25
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/EditLinkModal.js +24 -30
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/EditPathLength.d.ts +8 -0
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/EditPathLength.js +89 -0
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/MoveLink.d.ts +1 -1
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/MoveLink.js +1 -1
- package/lib/component/panels/SummaryPanel/SummaryPanel.js +39 -42
- package/lib/component/panels/SummaryPanel/utilities/IsInView.d.ts +6 -0
- package/lib/component/panels/SummaryPanel/utilities/IsInView.js +16 -0
- package/lib/component/panels/SummaryPanel/utilities/Utilities.d.ts +29 -0
- package/lib/component/panels/SummaryPanel/{Utilities.js → utilities/Utilities.js} +155 -19
- package/lib/component/panels/ZonesPanel/TableColumns/ActionsColumn.d.ts +1 -0
- package/lib/component/panels/ZonesPanel/TableColumns/ActionsColumn.js +26 -3
- package/lib/component/panels/ZonesPanel/ZonesPanel.js +12 -4
- package/lib/component/panels/ZonesPanel/ZonesTable.d.ts +3 -2
- package/lib/component/panels/ZonesPanel/ZonesTable.js +5 -2
- package/lib/component/reducer/IgnoreActions.js +2 -1
- package/lib/component/reducer/Reducer.d.ts +9 -23
- package/lib/component/reducer/Reducer.js +7 -8
- package/lib/component/reducer/actions/DatabaseActions.js +1 -1
- package/lib/component/reducer/actions/DomainActions.d.ts +3 -1
- package/lib/component/reducer/actions/DomainActions.js +20 -1
- package/lib/component/reducer/actions/IntegralsActions.js +2 -0
- package/lib/component/reducer/actions/LoadActions.js +22 -1
- package/lib/component/reducer/actions/PreferencesActions.js +0 -2
- package/lib/component/reducer/actions/RangesActions.js +3 -1
- package/lib/component/reducer/actions/SpectrumsActions.js +1 -1
- package/lib/component/reducer/actions/ToolsActions.js +31 -27
- package/lib/component/reducer/actions/ZonesActions.d.ts +3 -1
- package/lib/component/reducer/actions/ZonesActions.js +33 -2
- package/lib/component/reducer/helper/Zoom1DManager.d.ts +17 -21
- package/lib/component/reducer/helper/Zoom1DManager.js +53 -69
- package/lib/component/reducer/preferencesReducer.d.ts +1 -8
- package/lib/component/reducer/preferencesReducer.js +11 -1
- package/lib/component/reducer/types/Types.d.ts +3 -1
- package/lib/component/reducer/types/Types.js +3 -1
- package/lib/data/constants/DefaultPathLengths.d.ts +6 -0
- package/lib/data/constants/DefaultPathLengths.js +8 -0
- package/lib/data/data1d/Spectrum1D/getSpectrumErrorValue.d.ts +2 -0
- package/lib/data/data1d/Spectrum1D/getSpectrumErrorValue.js +4 -0
- package/lib/data/data1d/Spectrum1D/initiateDatum1D.js +7 -19
- package/lib/data/data1d/Spectrum1D/integrals/initiateIntegrals.d.ts +11 -0
- package/lib/data/data1d/Spectrum1D/integrals/initiateIntegrals.js +11 -0
- package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.js +2 -21
- package/lib/data/data1d/Spectrum1D/peaks/initiatePeaks.d.ts +9 -0
- package/lib/data/data1d/Spectrum1D/peaks/initiatePeaks.js +7 -0
- package/lib/data/data1d/Spectrum1D/peaks/mapPeaks.d.ts +2 -0
- package/lib/data/data1d/Spectrum1D/peaks/mapPeaks.js +29 -0
- package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.d.ts +13 -0
- package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.js +14 -0
- package/lib/data/data1d/Spectrum1D/ranges/mapRanges.js +13 -8
- package/lib/versionInfo.js +1 -1
- package/lib-cjs/component/1d/ExclusionZonesAnnotations.js +1 -2
- package/lib-cjs/component/1d/Integral.js +1 -6
- package/lib-cjs/component/1d/Viewer1D.js +4 -4
- package/lib-cjs/component/1d/ranges/RangeIntegral.js +2 -6
- package/lib-cjs/component/1d/utilities/scale.js +7 -6
- package/lib-cjs/component/2d/Viewer2D.js +4 -4
- package/lib-cjs/component/header/Header.js +3 -7
- package/lib-cjs/component/hooks/useIntegralPath.js +56 -0
- package/lib-cjs/component/hooks/useToolsFunctions.js +4 -5
- package/lib-cjs/component/hooks/useXScale.js +11 -0
- package/lib-cjs/component/modal/editRange/forms/validation/EditRangeValidation.js +1 -1
- package/lib-cjs/component/modal/editZone/EditPathLengthFormik.js +77 -0
- package/lib-cjs/component/modal/editZone/EditZoneModal.js +101 -0
- package/lib-cjs/component/modal/editZone/SignalFormTab.js +11 -0
- package/lib-cjs/component/modal/editZone/SignalsForm.js +67 -0
- package/lib-cjs/component/modal/editZone/validation/EditZoneValidation.js +38 -0
- package/lib-cjs/component/modal/editZone/validation/isDefaultPathLength.js +12 -0
- package/lib-cjs/component/modal/setting/ControllersTabContent.js +1 -1
- package/lib-cjs/component/modal/setting/GeneralSettings.js +12 -4
- package/lib-cjs/component/panels/AutomaticAssignment/AutomaticAssignment.js +18 -0
- package/lib-cjs/component/panels/AutomaticAssignment/AutomaticAssignmentTable.js +43 -0
- package/lib-cjs/component/panels/Panels.js +11 -15
- package/lib-cjs/component/panels/RangesPanel/RangesPanel.js +2 -2
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +7 -2
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnHeader.js +7 -2
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/Constants.js +1 -8
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/CorrelationTable.js +4 -5
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +21 -25
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/editLink/EditLinkModal.js +43 -30
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/editLink/EditPathLength.js +94 -0
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/editLink/MoveLink.js +1 -1
- package/lib-cjs/component/panels/SummaryPanel/SummaryPanel.js +38 -41
- package/lib-cjs/component/panels/SummaryPanel/utilities/IsInView.js +18 -0
- package/lib-cjs/component/panels/SummaryPanel/{Utilities.js → utilities/Utilities.js} +157 -19
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/ActionsColumn.js +24 -1
- package/lib-cjs/component/panels/ZonesPanel/ZonesPanel.js +12 -4
- package/lib-cjs/component/panels/ZonesPanel/ZonesTable.js +5 -2
- package/lib-cjs/component/reducer/IgnoreActions.js +2 -1
- package/lib-cjs/component/reducer/Reducer.js +7 -8
- package/lib-cjs/component/reducer/actions/DatabaseActions.js +2 -2
- package/lib-cjs/component/reducer/actions/DomainActions.js +21 -1
- package/lib-cjs/component/reducer/actions/IntegralsActions.js +2 -0
- package/lib-cjs/component/reducer/actions/LoadActions.js +22 -1
- package/lib-cjs/component/reducer/actions/PreferencesActions.js +0 -2
- package/lib-cjs/component/reducer/actions/RangesActions.js +2 -0
- package/lib-cjs/component/reducer/actions/SpectrumsActions.js +2 -2
- package/lib-cjs/component/reducer/actions/ToolsActions.js +38 -34
- package/lib-cjs/component/reducer/actions/ZonesActions.js +35 -2
- package/lib-cjs/component/reducer/helper/Zoom1DManager.js +55 -73
- package/lib-cjs/component/reducer/preferencesReducer.js +12 -2
- package/lib-cjs/component/reducer/types/Types.js +6 -4
- package/lib-cjs/data/constants/DefaultPathLengths.js +10 -0
- package/lib-cjs/data/data1d/Spectrum1D/getSpectrumErrorValue.js +8 -0
- package/lib-cjs/data/data1d/Spectrum1D/initiateDatum1D.js +7 -19
- package/lib-cjs/data/data1d/Spectrum1D/integrals/initiateIntegrals.js +18 -0
- package/lib-cjs/data/data1d/Spectrum1D/peaks/autoPeakPicking.js +2 -21
- package/lib-cjs/data/data1d/Spectrum1D/peaks/initiatePeaks.js +14 -0
- package/lib-cjs/data/data1d/Spectrum1D/peaks/mapPeaks.js +36 -0
- package/lib-cjs/data/data1d/Spectrum1D/ranges/initiateRanges.js +21 -0
- package/lib-cjs/data/data1d/Spectrum1D/ranges/mapRanges.js +13 -8
- package/lib-cjs/versionInfo.js +1 -1
- package/package.json +1 -1
- package/lib/component/1d/utilities/useIntegralPath.js +0 -63
- package/lib/component/panels/SummaryPanel/Utilities.d.ts +0 -25
- package/lib/component/reducer/actions/Zoom.d.ts +0 -16
- package/lib/component/reducer/actions/Zoom.js +0 -92
- package/lib-cjs/component/1d/utilities/useIntegralPath.js +0 -66
- package/lib-cjs/component/reducer/actions/Zoom.js +0 -116
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
import * as Yup from 'yup';
|
|
3
|
+
const useValidation = () => useMemo(() => {
|
|
4
|
+
return Yup.object().shape({
|
|
5
|
+
signals: Yup.array()
|
|
6
|
+
.of(Yup.object().shape({
|
|
7
|
+
j: Yup.object().shape({
|
|
8
|
+
pathLength: Yup.object().shape({
|
|
9
|
+
from: Yup.number().required().positive().integer(),
|
|
10
|
+
to: Yup.number().required().positive().integer(),
|
|
11
|
+
}),
|
|
12
|
+
}),
|
|
13
|
+
}))
|
|
14
|
+
.min(1, 'There must be at least one signal in a zone!'),
|
|
15
|
+
});
|
|
16
|
+
}, []);
|
|
17
|
+
export default useValidation;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import DefaultPathLengths from '../../../../data/constants/DefaultPathLengths';
|
|
2
|
+
function isDefaultPathLength(pathLength, experimentType) {
|
|
3
|
+
return (DefaultPathLengths[experimentType] &&
|
|
4
|
+
pathLength.from === DefaultPathLengths[experimentType].from &&
|
|
5
|
+
pathLength.to === DefaultPathLengths[experimentType].to);
|
|
6
|
+
}
|
|
7
|
+
export default isDefaultPathLength;
|
|
@@ -2,6 +2,6 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
2
2
|
import Label from '../../elements/Label';
|
|
3
3
|
import FormikInput from '../../elements/formik/FormikInput';
|
|
4
4
|
function ControllersTabContent() {
|
|
5
|
-
return (_jsxs(_Fragment, { children: [_jsx("p", { className: "section-header", children: "
|
|
5
|
+
return (_jsxs(_Fragment, { children: [_jsx("p", { className: "section-header", children: "Spectra" }, void 0), _jsx(Label, { title: "Transparency of Dimmed Spectra [ 0 - 1 ]", children: _jsx(FormikInput, { name: "controllers.dimmedSpectraTransparency", checkValue: (value) => value >= 0 && value <= 1, type: "number" }, void 0) }, void 0)] }, void 0));
|
|
6
6
|
}
|
|
7
7
|
export default ControllersTabContent;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
interface GeneralSettingsProps {
|
|
2
2
|
onClose?: () => void;
|
|
3
|
-
onSave?: () => void;
|
|
4
3
|
}
|
|
5
|
-
declare function GeneralSettings({ onClose
|
|
4
|
+
declare function GeneralSettings({ onClose }: GeneralSettingsProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
6
5
|
export default GeneralSettings;
|
|
@@ -7,7 +7,8 @@ import CloseButton from '../../elements/CloseButton';
|
|
|
7
7
|
import Tab from '../../elements/Tab/Tab';
|
|
8
8
|
import Tabs, { PositionsEnum } from '../../elements/Tab/Tabs';
|
|
9
9
|
import FormikForm from '../../elements/formik/FormikForm';
|
|
10
|
-
import {
|
|
10
|
+
import { useAlert } from '../../elements/popup/Alert';
|
|
11
|
+
import { SET_PREFERENCES, RESET_PREFERENCES, } from '../../reducer/preferencesReducer';
|
|
11
12
|
import ControllersTabContent from './ControllersTabContent';
|
|
12
13
|
import DisplayTabContent from './DisplayTabContent';
|
|
13
14
|
import FormattingTabContent from './FormattingTabContent';
|
|
@@ -138,20 +139,27 @@ const styles = css `
|
|
|
138
139
|
margin-bottom: 5px;
|
|
139
140
|
}
|
|
140
141
|
`;
|
|
141
|
-
function GeneralSettings({ onClose
|
|
142
|
+
function GeneralSettings({ onClose }) {
|
|
142
143
|
const [activeTab, setActiveTab] = useState('controllers');
|
|
143
144
|
const preferences = usePreferences();
|
|
145
|
+
const alert = useAlert();
|
|
144
146
|
const refForm = useRef();
|
|
145
147
|
const handleSave = useCallback(() => {
|
|
146
148
|
refForm.current.submitForm();
|
|
147
149
|
}, []);
|
|
150
|
+
const handleReset = useCallback(() => {
|
|
151
|
+
preferences.dispatch({ type: RESET_PREFERENCES });
|
|
152
|
+
alert.success('Settings saved successfully');
|
|
153
|
+
onClose?.();
|
|
154
|
+
}, [alert, onClose, preferences]);
|
|
148
155
|
const submitHandler = useCallback((values) => {
|
|
149
156
|
preferences.dispatch({ type: SET_PREFERENCES, payload: values });
|
|
150
|
-
|
|
151
|
-
|
|
157
|
+
alert.success('Settings saved successfully');
|
|
158
|
+
onClose?.();
|
|
159
|
+
}, [alert, onClose, preferences]);
|
|
152
160
|
const tabChangeHandler = useCallback((tab) => {
|
|
153
161
|
setActiveTab(tab.tabid);
|
|
154
162
|
}, []);
|
|
155
|
-
return (_jsxs("div", { css: styles, children: [_jsxs("div", { className: "header handle", children: [_jsx("span", { children: "General Settings" }, void 0), _jsx(CloseButton, { onClick: onClose, className: "close-bt" }, void 0)] }, void 0), _jsx("div", { className: "main-content", children: _jsx(FormikForm, { ref: refForm, initialValues: preferences, onSubmit: submitHandler, children: _jsxs(Tabs, { position: PositionsEnum.LEFT, activeTab: activeTab, onClick: tabChangeHandler, children: [_jsx(Tab, { tablabel: "Controllers", tabid: "controllers", children: _jsx("div", { className: "inner-content", children: _jsx(ControllersTabContent, {}, void 0) }, void 0) }, void 0), _jsx(Tab, { tablabel: "Formatting", tabid: "formatting", children: _jsx("div", { className: "inner-content", children: _jsx(FormattingTabContent, {}, void 0) }, void 0) }, void 0), _jsx(Tab, { tablabel: "Display", tabid: "display", children: _jsx("div", { className: "inner-content", children: _jsx(DisplayTabContent, { preferences: preferences }, void 0) }, void 0) }, void 0)] }, void 0) }, void 0) }, void 0),
|
|
163
|
+
return (_jsxs("div", { css: styles, children: [_jsxs("div", { className: "header handle", children: [_jsx("span", { children: "General Settings" }, void 0), _jsx(CloseButton, { onClick: onClose, className: "close-bt" }, void 0)] }, void 0), _jsx("div", { className: "main-content", children: _jsx(FormikForm, { ref: refForm, initialValues: preferences, onSubmit: submitHandler, children: _jsxs(Tabs, { position: PositionsEnum.LEFT, activeTab: activeTab, onClick: tabChangeHandler, children: [_jsx(Tab, { tablabel: "Controllers", tabid: "controllers", children: _jsx("div", { className: "inner-content", children: _jsx(ControllersTabContent, {}, void 0) }, void 0) }, void 0), _jsx(Tab, { tablabel: "Formatting", tabid: "formatting", children: _jsx("div", { className: "inner-content", children: _jsx(FormattingTabContent, {}, void 0) }, void 0) }, void 0), _jsx(Tab, { tablabel: "Display", tabid: "display", children: _jsx("div", { className: "inner-content", children: _jsx(DisplayTabContent, { preferences: preferences }, void 0) }, void 0) }, void 0)] }, void 0) }, void 0) }, void 0), _jsxs("div", { className: "footer-container", children: [_jsx("button", { type: "button", onClick: handleReset, className: "btn", children: "Reset" }, void 0), _jsx("button", { type: "button", onClick: handleSave, className: "btn", children: "Save" }, void 0)] }, void 0)] }, void 0));
|
|
156
164
|
}
|
|
157
165
|
export default GeneralSettings;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
2
|
+
/** @jsxImportSource @emotion/react */
|
|
3
|
+
import { SvgNmrAssignment2 } from 'cheminfo-font';
|
|
4
|
+
import { useCallback } from 'react';
|
|
5
|
+
import Button from '../../elements/ButtonToolTip';
|
|
6
|
+
import { tablePanelStyle } from '../extra/BasicPanelStyle';
|
|
7
|
+
import DefaultPanelHeader from '../header/DefaultPanelHeader';
|
|
8
|
+
function AutomaticAssignment() {
|
|
9
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
10
|
+
const automaticAssignmentHandler = useCallback(() => { }, []);
|
|
11
|
+
return (_jsxs("div", { css: tablePanelStyle, children: [_jsx(DefaultPanelHeader, { showSettingButton: false, canDelete: false, children: _jsx(Button, { popupTitle: "automatic assignment", onClick: automaticAssignmentHandler, children: _jsx(SvgNmrAssignment2, { style: { fontSize: '18px' } }, void 0) }, void 0) }, void 0), _jsx("div", { className: "inner-container" }, void 0)] }, void 0));
|
|
12
|
+
}
|
|
13
|
+
export default AutomaticAssignment;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface AutomaticAssignmentTableProps {
|
|
3
|
+
data: any;
|
|
4
|
+
}
|
|
5
|
+
declare function PeaksTable({ data }: AutomaticAssignmentTableProps): JSX.Element;
|
|
6
|
+
declare const _default: import("react").MemoExoticComponent<typeof PeaksTable>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { SvgNmrAssignment } from 'cheminfo-font';
|
|
3
|
+
import { useCallback, useMemo, memo } from 'react';
|
|
4
|
+
import ReactTable from '../../elements/ReactTable/ReactTable';
|
|
5
|
+
import NoTableData from '../extra/placeholder/NoTableData';
|
|
6
|
+
function PeaksTable({ data }) {
|
|
7
|
+
const assignHandler = useCallback((e, row) => {
|
|
8
|
+
e.preventDefault();
|
|
9
|
+
e.stopPropagation();
|
|
10
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
11
|
+
const params = row.original;
|
|
12
|
+
}, []);
|
|
13
|
+
const COLUMNS = useMemo(() => [
|
|
14
|
+
{
|
|
15
|
+
index: 1,
|
|
16
|
+
Header: '#',
|
|
17
|
+
Cell: ({ row }) => row.index + 1,
|
|
18
|
+
style: { width: '1%', maxWidth: '40px', minWidth: '40px' },
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
index: 2,
|
|
22
|
+
Header: 'Score',
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
index: 3,
|
|
26
|
+
Header: '',
|
|
27
|
+
style: {
|
|
28
|
+
width: '1%',
|
|
29
|
+
maxWidth: '24px',
|
|
30
|
+
minWidth: '24px',
|
|
31
|
+
},
|
|
32
|
+
id: 'assign-button',
|
|
33
|
+
Cell: ({ row }) => (_jsx("button", { type: "button", className: "assign-button", onClick: (e) => assignHandler(e, row), children: _jsx(SvgNmrAssignment, {}, void 0) }, void 0)),
|
|
34
|
+
},
|
|
35
|
+
], [assignHandler]);
|
|
36
|
+
return data && data.length > 0 ? (_jsx(ReactTable, { data: data, columns: COLUMNS }, void 0)) : (_jsx(NoTableData, {}, void 0));
|
|
37
|
+
}
|
|
38
|
+
export default memo(PeaksTable);
|
|
@@ -6,7 +6,7 @@ import { useChartData } from '../context/ChartContext';
|
|
|
6
6
|
import { usePreferences } from '../context/PreferencesContext';
|
|
7
7
|
import useCheckExperimentalFeature from '../hooks/useCheckExperimentalFeature';
|
|
8
8
|
import { DISPLAYER_MODE } from '../reducer/core/Constants';
|
|
9
|
-
import
|
|
9
|
+
import AutomaticAssignment from './AutomaticAssignment/AutomaticAssignment';
|
|
10
10
|
import InformationPanel from './InformationPanel';
|
|
11
11
|
import IntegralPanel from './IntegralsPanel/IntegralPanel';
|
|
12
12
|
import MatrixGenerationPanel from './MatrixGenerationPanel/MatrixGenerationPanel';
|
|
@@ -23,14 +23,12 @@ const accordionItems = [
|
|
|
23
23
|
{
|
|
24
24
|
title: 'Spectra',
|
|
25
25
|
component: _jsx(SpectrumListPanel, {}, void 0),
|
|
26
|
-
openWhen: null,
|
|
27
26
|
hidePreferenceKey: 'hideSpectraPanel',
|
|
28
27
|
mode: null,
|
|
29
28
|
},
|
|
30
29
|
{
|
|
31
30
|
title: 'Information',
|
|
32
31
|
component: _jsx(InformationPanel, {}, void 0),
|
|
33
|
-
openWhen: null,
|
|
34
32
|
style: { overflow: 'hidden' },
|
|
35
33
|
hidePreferenceKey: 'hideInformationPanel',
|
|
36
34
|
mode: null,
|
|
@@ -38,42 +36,36 @@ const accordionItems = [
|
|
|
38
36
|
{
|
|
39
37
|
title: 'Peaks',
|
|
40
38
|
component: _jsx(PeaksPanel, {}, void 0),
|
|
41
|
-
openWhen: [options.peakPicking.id],
|
|
42
39
|
hidePreferenceKey: 'hidePeaksPanel',
|
|
43
40
|
mode: null,
|
|
44
41
|
},
|
|
45
42
|
{
|
|
46
43
|
title: 'Filters',
|
|
47
44
|
component: _jsx(FilterPanel, {}, void 0),
|
|
48
|
-
openWhen: null,
|
|
49
45
|
hidePreferenceKey: 'hideFiltersPanel',
|
|
50
46
|
mode: null,
|
|
51
47
|
},
|
|
52
48
|
{
|
|
53
49
|
title: 'Integrals',
|
|
54
50
|
component: _jsx(IntegralPanel, {}, void 0),
|
|
55
|
-
openWhen: [options.integral.id],
|
|
56
51
|
hidePreferenceKey: 'hideIntegralsPanel',
|
|
57
52
|
mode: null,
|
|
58
53
|
},
|
|
59
54
|
{
|
|
60
55
|
title: 'Ranges',
|
|
61
56
|
component: _jsx(RangesPanel, {}, void 0),
|
|
62
|
-
openWhen: [options.rangesPicking.id],
|
|
63
57
|
hidePreferenceKey: 'hideRangesPanel',
|
|
64
58
|
mode: DISPLAYER_MODE.DM_1D,
|
|
65
59
|
},
|
|
66
60
|
{
|
|
67
61
|
title: 'Multiple Spectra Analysis',
|
|
68
62
|
component: _jsx(MultipleSpectraAnalysisPanel, {}, void 0),
|
|
69
|
-
openWhen: [options.multipleSpectraAnalysis.id],
|
|
70
63
|
hidePreferenceKey: 'hideMultipleSpectraAnalysisPanel',
|
|
71
64
|
mode: null,
|
|
72
65
|
},
|
|
73
66
|
{
|
|
74
67
|
title: 'Matrix Generation',
|
|
75
68
|
component: _jsx(MatrixGenerationPanel, {}, void 0),
|
|
76
|
-
openWhen: [],
|
|
77
69
|
hidePreferenceKey: '',
|
|
78
70
|
mode: null,
|
|
79
71
|
isExperimental: true,
|
|
@@ -81,38 +73,42 @@ const accordionItems = [
|
|
|
81
73
|
{
|
|
82
74
|
title: 'Zones',
|
|
83
75
|
component: _jsx(ZonesPanel, {}, void 0),
|
|
84
|
-
openWhen: [options.zone2D.id],
|
|
85
76
|
hidePreferenceKey: 'hideZonesPanel',
|
|
86
77
|
mode: DISPLAYER_MODE.DM_2D,
|
|
87
78
|
},
|
|
88
79
|
{
|
|
89
80
|
title: 'Summary',
|
|
90
81
|
component: _jsx(SummaryPanel, {}, void 0),
|
|
91
|
-
openWhen: [],
|
|
92
82
|
hidePreferenceKey: 'hideSummaryPanel',
|
|
93
83
|
mode: null,
|
|
94
84
|
},
|
|
95
85
|
{
|
|
96
86
|
title: 'Structures',
|
|
97
87
|
component: _jsx(MoleculePanel, {}, void 0),
|
|
98
|
-
openWhen: [options.rangesPicking.id],
|
|
99
88
|
hidePreferenceKey: 'hideStructuresPanel',
|
|
100
89
|
mode: null,
|
|
101
90
|
},
|
|
102
91
|
{
|
|
103
92
|
title: 'Database',
|
|
104
93
|
component: _jsx(DatabasePanel, {}, void 0),
|
|
105
|
-
openWhen: [],
|
|
106
94
|
hidePreferenceKey: 'hideDatabasePanel',
|
|
107
95
|
mode: null,
|
|
108
96
|
},
|
|
97
|
+
{
|
|
98
|
+
title: 'Automatic Assignment',
|
|
99
|
+
component: _jsx(AutomaticAssignment, {}, void 0),
|
|
100
|
+
hidePreferenceKey: '',
|
|
101
|
+
mode: null,
|
|
102
|
+
isExperimental: true,
|
|
103
|
+
},
|
|
109
104
|
];
|
|
110
|
-
export const
|
|
105
|
+
export const TOOLS_PANELS_ACCORDION = {
|
|
111
106
|
null: 'Spectra',
|
|
112
107
|
peakPicking: 'Peaks',
|
|
113
108
|
integral: 'Integrals',
|
|
114
109
|
rangesPicking: 'Ranges',
|
|
115
110
|
zone2D: 'Zones',
|
|
111
|
+
multipleSpectraAnalysis: 'Multiple Spectra Analysis',
|
|
116
112
|
};
|
|
117
113
|
function PanelsInner({ displayerMode }) {
|
|
118
114
|
const preferences = usePreferences();
|
|
@@ -71,8 +71,8 @@ function RangesTablePanelInner({ ranges, data, info, xDomain, preferences, activ
|
|
|
71
71
|
to,
|
|
72
72
|
});
|
|
73
73
|
const dataToClipboard = {
|
|
74
|
-
x: x.slice(fromIndex, toIndex),
|
|
75
|
-
y: re.slice(fromIndex, toIndex),
|
|
74
|
+
x: Array.from(x.slice(fromIndex, toIndex)),
|
|
75
|
+
y: Array.from(re.slice(fromIndex, toIndex)),
|
|
76
76
|
...value,
|
|
77
77
|
};
|
|
78
78
|
const success = await copyTextToClipboard(JSON.stringify(dataToClipboard, undefined, 2));
|
|
@@ -7,7 +7,8 @@ import generateID from '../../../../data/utilities/generateID';
|
|
|
7
7
|
import ContextMenu from '../../../elements/ContextMenu';
|
|
8
8
|
import { positions, useModal } from '../../../elements/popup/Modal';
|
|
9
9
|
import { useHighlight } from '../../../highlight';
|
|
10
|
-
import
|
|
10
|
+
import IsInView from '../utilities/IsInView';
|
|
11
|
+
import { cloneCorrelationAndEditLink, getAbbreviation, } from '../utilities/Utilities';
|
|
11
12
|
import EditLinkModal from './editLink/EditLinkModal';
|
|
12
13
|
function AdditionalColumnField({ rowCorrelation, columnCorrelation, commonLinks, correlations, spectraData, onEdit, }) {
|
|
13
14
|
const contextRef = useRef();
|
|
@@ -135,6 +136,8 @@ function AdditionalColumnField({ rowCorrelation, columnCorrelation, commonLinks,
|
|
|
135
136
|
return arr;
|
|
136
137
|
}, [])
|
|
137
138
|
.join('/'), [commonLinks]);
|
|
139
|
+
const isInViewRow = IsInView({ correlation: rowCorrelation });
|
|
140
|
+
const isInViewColumn = IsInView({ correlation: columnCorrelation });
|
|
138
141
|
return (_jsxs("td", { onContextMenu: (e) => {
|
|
139
142
|
if (contextMenu.length > 0) {
|
|
140
143
|
contextMenuHandler(e);
|
|
@@ -142,7 +145,9 @@ function AdditionalColumnField({ rowCorrelation, columnCorrelation, commonLinks,
|
|
|
142
145
|
}, style: {
|
|
143
146
|
backgroundColor: highlightCommonLinks.isActive
|
|
144
147
|
? '#ff6f0057'
|
|
145
|
-
:
|
|
148
|
+
: isInViewColumn || isInViewRow
|
|
149
|
+
? '#f5f5dc'
|
|
150
|
+
: 'inherit',
|
|
146
151
|
}, title: title, onMouseEnter: mouseEnterHandler, onMouseLeave: mouseLeaveHandler, children: [contentLabel, _jsx(ContextMenu, { ref: contextRef, context: contextMenu }, void 0)] }, void 0));
|
|
147
152
|
}
|
|
148
153
|
export default AdditionalColumnField;
|
|
@@ -7,7 +7,8 @@ import { findRangeOrZoneID } from '../../../../data/utilities/FindUtilities';
|
|
|
7
7
|
import ContextMenu from '../../../elements/ContextMenu';
|
|
8
8
|
import { positions, useModal } from '../../../elements/popup/Modal';
|
|
9
9
|
import { useHighlight } from '../../../highlight';
|
|
10
|
-
import
|
|
10
|
+
import IsInView from '../utilities/IsInView';
|
|
11
|
+
import { getLabelColor } from '../utilities/Utilities';
|
|
11
12
|
import EditLinkModal from './editLink/EditLinkModal';
|
|
12
13
|
function AdditionalColumnHeader({ spectraData, correlationsData, correlation, onEdit, }) {
|
|
13
14
|
const contextRef = useRef();
|
|
@@ -38,13 +39,16 @@ function AdditionalColumnHeader({ spectraData, correlationsData, correlation, on
|
|
|
38
39
|
event.currentTarget.blur();
|
|
39
40
|
highlightAdditionalColumn.hide();
|
|
40
41
|
}, [highlightAdditionalColumn]);
|
|
42
|
+
const isInView = IsInView({ correlation });
|
|
41
43
|
const tableHeaderProps = useMemo(() => {
|
|
42
44
|
return {
|
|
43
45
|
style: {
|
|
44
46
|
...{ color: getLabelColor(correlationsData, correlation) || undefined },
|
|
45
47
|
backgroundColor: highlightAdditionalColumn.isActive
|
|
46
48
|
? '#ff6f0057'
|
|
47
|
-
:
|
|
49
|
+
: isInView
|
|
50
|
+
? '#f5f5dc'
|
|
51
|
+
: 'inherit',
|
|
48
52
|
},
|
|
49
53
|
title: correlation.pseudo === false &&
|
|
50
54
|
correlation.link
|
|
@@ -64,6 +68,7 @@ function AdditionalColumnHeader({ spectraData, correlationsData, correlation, on
|
|
|
64
68
|
correlation,
|
|
65
69
|
correlationsData,
|
|
66
70
|
highlightAdditionalColumn.isActive,
|
|
71
|
+
isInView,
|
|
67
72
|
mouseEnterHandler,
|
|
68
73
|
mouseLeaveHandler,
|
|
69
74
|
]);
|
|
@@ -16,9 +16,4 @@ declare const DefaultTolerance: {
|
|
|
16
16
|
Si: number;
|
|
17
17
|
P: number;
|
|
18
18
|
};
|
|
19
|
-
|
|
20
|
-
key: string;
|
|
21
|
-
value: string;
|
|
22
|
-
label: string;
|
|
23
|
-
}[];
|
|
24
|
-
export { DefaultTolerance, EditLinkActions, Errors, ErrorColors, Hybridizations, };
|
|
19
|
+
export { DefaultTolerance, Errors, ErrorColors, Hybridizations };
|
|
@@ -36,10 +36,4 @@ const DefaultTolerance = {
|
|
|
36
36
|
Si: 0.25,
|
|
37
37
|
P: 0.25,
|
|
38
38
|
};
|
|
39
|
-
|
|
40
|
-
{ key: '-', value: '-', label: 'Select Action' },
|
|
41
|
-
{ key: 'delete', value: 'delete', label: 'Delete' },
|
|
42
|
-
{ key: 'move', value: 'move', label: 'Move' },
|
|
43
|
-
{ key: 'unmove', value: 'unmove', label: 'Unmove' },
|
|
44
|
-
];
|
|
45
|
-
export { DefaultTolerance, EditLinkActions, Errors, ErrorColors, Hybridizations, };
|
|
39
|
+
export { DefaultTolerance, Errors, ErrorColors, Hybridizations };
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
declare function CorrelationTable({ correlationsData, filteredCorrelationsData, additionalColumnData, editEquivalencesSaveHandler,
|
|
1
|
+
declare function CorrelationTable({ correlationsData, filteredCorrelationsData, additionalColumnData, editEquivalencesSaveHandler, onSaveEditNumericValues, onEditCorrelationTableCellHandler, showProtonsAsRows, spectraData, }: {
|
|
2
2
|
correlationsData: any;
|
|
3
3
|
filteredCorrelationsData: any;
|
|
4
4
|
additionalColumnData: any;
|
|
5
5
|
editEquivalencesSaveHandler: any;
|
|
6
|
-
|
|
7
|
-
editProtonsCountSaveHandler: any;
|
|
6
|
+
onSaveEditNumericValues: any;
|
|
8
7
|
onEditCorrelationTableCellHandler: any;
|
|
9
8
|
showProtonsAsRows: any;
|
|
10
9
|
spectraData: any;
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
|
2
2
|
/** @jsxImportSource @emotion/react */
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
4
|
import { useMemo } from 'react';
|
|
5
|
-
import { getLabelColor } from '../Utilities';
|
|
5
|
+
import { getLabelColor } from '../utilities/Utilities';
|
|
6
6
|
import AdditionalColumnHeader from './AdditionalColumnHeader';
|
|
7
7
|
import CorrelationTableRow from './CorrelationTableRow';
|
|
8
8
|
const tableStyle = css `
|
|
@@ -50,7 +50,7 @@ const tableStyle = css `
|
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
`;
|
|
53
|
-
function CorrelationTable({ correlationsData, filteredCorrelationsData, additionalColumnData, editEquivalencesSaveHandler,
|
|
53
|
+
function CorrelationTable({ correlationsData, filteredCorrelationsData, additionalColumnData, editEquivalencesSaveHandler, onSaveEditNumericValues, onEditCorrelationTableCellHandler, showProtonsAsRows, spectraData, }) {
|
|
54
54
|
const rows = useMemo(() => {
|
|
55
55
|
if (!filteredCorrelationsData) {
|
|
56
56
|
return [];
|
|
@@ -63,15 +63,14 @@ function CorrelationTable({ correlationsData, filteredCorrelationsData, addition
|
|
|
63
63
|
? {
|
|
64
64
|
color: getLabelColor(correlationsData, correlation),
|
|
65
65
|
}
|
|
66
|
-
: {}, onSaveEditEquivalences: editEquivalencesSaveHandler,
|
|
66
|
+
: {}, onSaveEditEquivalences: editEquivalencesSaveHandler, onSaveEditNumericValues: onSaveEditNumericValues, onEditCorrelationTableCellHandler: onEditCorrelationTableCellHandler, spectraData: spectraData }, `correlation${correlation.atomType}${correlation.id}`)));
|
|
67
67
|
}, [
|
|
68
68
|
filteredCorrelationsData,
|
|
69
69
|
showProtonsAsRows,
|
|
70
70
|
additionalColumnData,
|
|
71
71
|
correlationsData,
|
|
72
72
|
editEquivalencesSaveHandler,
|
|
73
|
-
|
|
74
|
-
editProtonsCountSaveHandler,
|
|
73
|
+
onSaveEditNumericValues,
|
|
75
74
|
onEditCorrelationTableCellHandler,
|
|
76
75
|
spectraData,
|
|
77
76
|
]);
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
declare function CorrelationTableRow({ additionalColumnData, correlations, correlation, styleRow, styleLabel, onSaveEditEquivalences,
|
|
2
|
+
declare function CorrelationTableRow({ additionalColumnData, correlations, correlation, styleRow, styleLabel, onSaveEditEquivalences, onSaveEditNumericValues, onEditCorrelationTableCellHandler, spectraData, }: {
|
|
3
3
|
additionalColumnData: any;
|
|
4
4
|
correlations: any;
|
|
5
5
|
correlation: any;
|
|
6
6
|
styleRow: any;
|
|
7
7
|
styleLabel: any;
|
|
8
8
|
onSaveEditEquivalences: any;
|
|
9
|
-
|
|
10
|
-
onSaveEditProtonsCount: any;
|
|
9
|
+
onSaveEditNumericValues: any;
|
|
11
10
|
onEditCorrelationTableCellHandler: any;
|
|
12
11
|
spectraData: any;
|
|
13
12
|
}): JSX.Element;
|
|
@@ -5,19 +5,13 @@ import { buildID } from '../../../../data/utilities/Concatenation';
|
|
|
5
5
|
import { findRangeOrZoneID } from '../../../../data/utilities/FindUtilities';
|
|
6
6
|
import ContextMenu from '../../../elements/ContextMenu';
|
|
7
7
|
import EditableColumn from '../../../elements/EditableColumn';
|
|
8
|
-
import Select from '../../../elements/Select';
|
|
9
8
|
import { positions, useModal } from '../../../elements/popup/Modal';
|
|
10
9
|
import { useHighlight } from '../../../highlight';
|
|
10
|
+
import IsInView from '../utilities/IsInView';
|
|
11
|
+
import { convertValuesString } from '../utilities/Utilities';
|
|
11
12
|
import AdditionalColumnField from './AdditionalColumnField';
|
|
12
|
-
import { Hybridizations } from './Constants';
|
|
13
13
|
import EditLinkModal from './editLink/EditLinkModal';
|
|
14
|
-
|
|
15
|
-
marginLeft: 2,
|
|
16
|
-
marginRight: 2,
|
|
17
|
-
border: 'none',
|
|
18
|
-
height: '20px',
|
|
19
|
-
};
|
|
20
|
-
function CorrelationTableRow({ additionalColumnData, correlations, correlation, styleRow, styleLabel, onSaveEditEquivalences, onChangeHybridization, onSaveEditProtonsCount, onEditCorrelationTableCellHandler, spectraData, }) {
|
|
14
|
+
function CorrelationTableRow({ additionalColumnData, correlations, correlation, styleRow, styleLabel, onSaveEditEquivalences, onSaveEditNumericValues, onEditCorrelationTableCellHandler, spectraData, }) {
|
|
21
15
|
const contextRef = useRef();
|
|
22
16
|
const modal = useModal();
|
|
23
17
|
const highlightIDsRow = useMemo(() => {
|
|
@@ -41,9 +35,13 @@ function CorrelationTableRow({ additionalColumnData, correlations, correlation,
|
|
|
41
35
|
const onSaveEquivalencesHandler = useCallback((e) => {
|
|
42
36
|
onSaveEditEquivalences(correlation, e.target.value);
|
|
43
37
|
}, [correlation, onSaveEditEquivalences]);
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
|
|
38
|
+
const onSaveEditNumericValuesHandler = useCallback((e, key) => {
|
|
39
|
+
onSaveEditNumericValues({
|
|
40
|
+
correlation,
|
|
41
|
+
values: convertValuesString(e.target.value, key),
|
|
42
|
+
key,
|
|
43
|
+
});
|
|
44
|
+
}, [correlation, onSaveEditNumericValues]);
|
|
47
45
|
const additionalColumnFields = useMemo(() => {
|
|
48
46
|
return additionalColumnData.map((_correlation) => {
|
|
49
47
|
const commonLinks = [];
|
|
@@ -75,9 +73,6 @@ function CorrelationTableRow({ additionalColumnData, correlations, correlation,
|
|
|
75
73
|
onEditCorrelationTableCellHandler,
|
|
76
74
|
spectraData,
|
|
77
75
|
]);
|
|
78
|
-
const onChangeHybridizationHandler = useCallback((value) => {
|
|
79
|
-
onChangeHybridization(correlation, value);
|
|
80
|
-
}, [correlation, onChangeHybridization]);
|
|
81
76
|
const equivalenceCellStyle = useMemo(() => {
|
|
82
77
|
return correlation.edited.equivalence
|
|
83
78
|
? { color: 'blue' }
|
|
@@ -93,11 +88,16 @@ function CorrelationTableRow({ additionalColumnData, correlations, correlation,
|
|
|
93
88
|
event.currentTarget.blur();
|
|
94
89
|
highlightRow.hide();
|
|
95
90
|
}, [highlightRow]);
|
|
91
|
+
const isInView = IsInView({ correlation });
|
|
96
92
|
const tableDataProps = useMemo(() => {
|
|
97
93
|
return {
|
|
98
94
|
style: {
|
|
99
95
|
...styleRow,
|
|
100
|
-
backgroundColor: highlightRow.isActive
|
|
96
|
+
backgroundColor: highlightRow.isActive
|
|
97
|
+
? '#ff6f0057'
|
|
98
|
+
: isInView
|
|
99
|
+
? '#f5f5dc'
|
|
100
|
+
: 'inherit',
|
|
101
101
|
},
|
|
102
102
|
title: correlation.pseudo === false &&
|
|
103
103
|
correlation.link
|
|
@@ -117,6 +117,7 @@ function CorrelationTableRow({ additionalColumnData, correlations, correlation,
|
|
|
117
117
|
correlation.link,
|
|
118
118
|
correlation.pseudo,
|
|
119
119
|
highlightRow.isActive,
|
|
120
|
+
isInView,
|
|
120
121
|
mouseEnterHandler,
|
|
121
122
|
mouseLeaveHandler,
|
|
122
123
|
styleRow,
|
|
@@ -180,16 +181,11 @@ function CorrelationTableRow({ additionalColumnData, correlations, correlation,
|
|
|
180
181
|
}
|
|
181
182
|
}, children: [getLabel(correlations, correlation), _jsx(ContextMenu, { ref: contextRef, context: contextMenu }, void 0)] }, void 0), _jsx("td", { title: t, ...otherTableDataProps, children: getCorrelationDelta(correlation)
|
|
182
183
|
? getCorrelationDelta(correlation)?.toFixed(2)
|
|
183
|
-
: '' }, void 0), _jsx("td", { title: t, ...otherTableDataProps, children: correlation.pseudo === false ? (correlation.atomType !== 'H' ? (_jsx(EditableColumn, { type: "number", value: correlation.equivalence, style: equivalenceCellStyle, onSave: onSaveEquivalencesHandler }, void 0)) : (_jsx("text", { style: equivalenceCellStyle, children: correlation.equivalence }, void 0))) : ('') }, void 0), _jsx("td", { title: t, ...otherTableDataProps, children: correlation.atomType !== 'H' ? (_jsx(EditableColumn, { type: "text", value: correlation.protonsCount.join(','), style: correlation.edited.protonsCount ? { color: 'blue' } : {}, onSave:
|
|
184
|
+
: '' }, void 0), _jsx("td", { title: t, ...otherTableDataProps, children: correlation.pseudo === false ? (correlation.atomType !== 'H' ? (_jsx(EditableColumn, { type: "number", value: correlation.equivalence, style: equivalenceCellStyle, onSave: onSaveEquivalencesHandler }, void 0)) : (_jsx("text", { style: equivalenceCellStyle, children: correlation.equivalence }, void 0))) : ('') }, void 0), _jsx("td", { title: t, ...otherTableDataProps, children: correlation.atomType !== 'H' ? (_jsx(EditableColumn, { type: "text", value: correlation.protonsCount.join(','), style: correlation.edited.protonsCount ? { color: 'blue' } : {}, onSave: (e) => onSaveEditNumericValuesHandler(e, 'protonsCount') }, void 0)) : ('') }, void 0), _jsx("td", { title: t, ...{
|
|
184
185
|
...otherTableDataProps,
|
|
185
186
|
style: { ...tableDataProps.style, borderRight: '1px solid' },
|
|
186
|
-
}, children: correlation.atomType !== 'H' ? (_jsx(
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
backgroundColor: correlation.edited.hybridization
|
|
190
|
-
? 'inherit'
|
|
191
|
-
: styleRow.backgroundColor,
|
|
192
|
-
width: '50px',
|
|
193
|
-
} }, void 0)) : ('') }, void 0), additionalColumnFields] }, void 0));
|
|
187
|
+
}, children: correlation.atomType !== 'H' ? (_jsx(EditableColumn, { type: "text", value: correlation.hybridization
|
|
188
|
+
.map((hybrid) => `sp${hybrid}`)
|
|
189
|
+
.join(','), style: correlation.edited.hybridization ? { color: 'blue' } : {}, onSave: (e) => onSaveEditNumericValuesHandler(e, 'hybridization') }, void 0)) : ('') }, void 0), additionalColumnFields] }, void 0));
|
|
194
190
|
}
|
|
195
191
|
export default CorrelationTableRow;
|