@complat/react-spectra-editor 1.0.0 → 1.0.1-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/__tests__/units/components/panel/info.test.js +78 -0
- package/dist/app.js +5 -1
- package/dist/components/cmd_bar/r06_predict_btn.js +0 -3
- package/dist/components/d3_line/line_focus.js +0 -2
- package/dist/components/d3_multi/multi_focus.js +0 -2
- package/dist/components/multi_jcamps_viewer.js +4 -1
- package/dist/components/panel/compare.js +1 -1
- package/dist/components/panel/graph_selection.js +0 -2
- package/dist/components/panel/index.js +12 -5
- package/dist/components/panel/info.js +21 -11
- package/dist/components/panel/multiplicity.js +1 -1
- package/dist/components/panel/peaks.js +1 -1
- package/dist/helpers/chem.js +0 -1
- package/dist/index.js +1 -1
- package/dist/layer_init.js +5 -0
- package/dist/layer_prism.js +3 -0
- package/dist/reducers/reducer_status.js +0 -2
- package/dist/sagas/saga_multiplicity.js +0 -3
- package/dist/third_party/jAnalyzer.js +0 -1
- package/package.json +1 -1
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _react = _interopRequireDefault(require("react"));
|
|
5
|
+
var _react2 = require("@testing-library/react");
|
|
6
|
+
var _info = _interopRequireDefault(require("../../../../components/panel/info"));
|
|
7
|
+
var _reduxMockStore = _interopRequireDefault(require("redux-mock-store"));
|
|
8
|
+
var _reactRedux = require("react-redux");
|
|
9
|
+
require("@testing-library/jest-dom");
|
|
10
|
+
var _list_layout = require("../../../../constants/list_layout");
|
|
11
|
+
var _material = require("@mui/material");
|
|
12
|
+
var _styles = require("@mui/styles");
|
|
13
|
+
const mockStore = (0, _reduxMockStore.default)([]);
|
|
14
|
+
const store = mockStore({
|
|
15
|
+
curve: {
|
|
16
|
+
listCurves: [{
|
|
17
|
+
feature: {}
|
|
18
|
+
}],
|
|
19
|
+
curveIdx: 0
|
|
20
|
+
},
|
|
21
|
+
layout: _list_layout.LIST_LAYOUT.H1,
|
|
22
|
+
shift: {
|
|
23
|
+
shifts: []
|
|
24
|
+
},
|
|
25
|
+
simulation: {}
|
|
26
|
+
});
|
|
27
|
+
const failedStore = mockStore({});
|
|
28
|
+
const dispatchMock = () => Promise.resolve({});
|
|
29
|
+
store.dispatch = jest.fn(dispatchMock);
|
|
30
|
+
const theme = (0, _material.createTheme)({
|
|
31
|
+
typography: {
|
|
32
|
+
useNextVariants: true
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
const feature = {};
|
|
36
|
+
describe("<InfoPanel />", () => {
|
|
37
|
+
let AppWrapper;
|
|
38
|
+
beforeEach(() => {
|
|
39
|
+
AppWrapper = _ref => {
|
|
40
|
+
let {
|
|
41
|
+
store,
|
|
42
|
+
children
|
|
43
|
+
} = _ref;
|
|
44
|
+
return /*#__PURE__*/_react.default.createElement(_reactRedux.Provider, {
|
|
45
|
+
store: store
|
|
46
|
+
}, " ", children, " ");
|
|
47
|
+
};
|
|
48
|
+
});
|
|
49
|
+
test('Cannot render info panel', () => {
|
|
50
|
+
const renderer = /*#__PURE__*/_react.default.createElement(AppWrapper, {
|
|
51
|
+
store: store
|
|
52
|
+
}, /*#__PURE__*/_react.default.createElement(_styles.ThemeProvider, {
|
|
53
|
+
theme: theme
|
|
54
|
+
}, /*#__PURE__*/_react.default.createElement(_info.default, {
|
|
55
|
+
expand: false,
|
|
56
|
+
onExapnd: () => {}
|
|
57
|
+
})));
|
|
58
|
+
const {
|
|
59
|
+
queryByTestId
|
|
60
|
+
} = (0, _react2.render)(renderer);
|
|
61
|
+
expect(queryByTestId('PanelInfo')).not.toBeInTheDocument();
|
|
62
|
+
});
|
|
63
|
+
test('Render info panel', () => {
|
|
64
|
+
const renderer = /*#__PURE__*/_react.default.createElement(AppWrapper, {
|
|
65
|
+
store: store
|
|
66
|
+
}, /*#__PURE__*/_react.default.createElement(_styles.ThemeProvider, {
|
|
67
|
+
theme: theme
|
|
68
|
+
}, /*#__PURE__*/_react.default.createElement(_info.default, {
|
|
69
|
+
expand: false,
|
|
70
|
+
onExapnd: () => {},
|
|
71
|
+
feature: feature
|
|
72
|
+
})));
|
|
73
|
+
const {
|
|
74
|
+
queryByTestId
|
|
75
|
+
} = (0, _react2.render)(renderer);
|
|
76
|
+
expect(queryByTestId('PanelInfo')).toBeInTheDocument();
|
|
77
|
+
});
|
|
78
|
+
});
|
package/dist/app.js
CHANGED
|
@@ -56,6 +56,7 @@ const SpectraEditor = _ref => {
|
|
|
56
56
|
molSvg,
|
|
57
57
|
editorOnly,
|
|
58
58
|
descriptions,
|
|
59
|
+
theoryMass,
|
|
59
60
|
canChangeDescription,
|
|
60
61
|
onDescriptionChanged,
|
|
61
62
|
multiEntities,
|
|
@@ -82,6 +83,7 @@ const SpectraEditor = _ref => {
|
|
|
82
83
|
molSvg: molSvg,
|
|
83
84
|
multiMolSvgs: multiMolSvgs,
|
|
84
85
|
editorOnly: editorOnly,
|
|
86
|
+
theoryMass: theoryMass,
|
|
85
87
|
canChangeDescription: canChangeDescription,
|
|
86
88
|
onDescriptionChanged: onDescriptionChanged
|
|
87
89
|
})));
|
|
@@ -103,7 +105,8 @@ SpectraEditor.propTypes = {
|
|
|
103
105
|
editorOnly: _propTypes.default.bool,
|
|
104
106
|
canChangeDescription: _propTypes.default.bool,
|
|
105
107
|
onDescriptionChanged: _propTypes.default.func,
|
|
106
|
-
userManualLink: _propTypes.default.object
|
|
108
|
+
userManualLink: _propTypes.default.object,
|
|
109
|
+
theoryMass: _propTypes.default.string
|
|
107
110
|
};
|
|
108
111
|
SpectraEditor.defaultProps = {
|
|
109
112
|
others: {
|
|
@@ -119,6 +122,7 @@ SpectraEditor.defaultProps = {
|
|
|
119
122
|
operations: [],
|
|
120
123
|
descriptions: [],
|
|
121
124
|
molSvg: '',
|
|
125
|
+
theoryMass: '',
|
|
122
126
|
multiMolSvgs: [],
|
|
123
127
|
editorOnly: false,
|
|
124
128
|
canChangeDescription: false,
|
|
@@ -59,7 +59,6 @@ const onClickFail = (layoutSt, simuCount, realCount) => {
|
|
|
59
59
|
const feature = _format.default.is13CLayout(layoutSt) ? 'peak' : 'multiplet';
|
|
60
60
|
return () => alert(`Selected ${feature} count (${realCount}) must be larger than 0, and must be eqal or less than simulated count (${simuCount}).`); // eslint-disable-line
|
|
61
61
|
};
|
|
62
|
-
|
|
63
62
|
const onClickReady = (forecast, peaksEdit, layoutSt, scan, shiftSt, thres, analysis, integrationSt, multiplicitySt, setUiViewerTypeAct, curveSt) => {
|
|
64
63
|
const {
|
|
65
64
|
btnCb
|
|
@@ -67,7 +66,6 @@ const onClickReady = (forecast, peaksEdit, layoutSt, scan, shiftSt, thres, analy
|
|
|
67
66
|
if (!btnCb) {
|
|
68
67
|
return () => alert('[Developer Warning] You need to implement btnCb in forecast!'); // eslint-disable-line
|
|
69
68
|
}
|
|
70
|
-
|
|
71
69
|
return () => {
|
|
72
70
|
setUiViewerTypeAct(_list_ui.LIST_UI_VIEWER_TYPE.ANALYSIS);
|
|
73
71
|
return btnCb({
|
|
@@ -90,7 +88,6 @@ const onClicUnknown = (feature, forecast, peaksEdit, layoutSt, scan, shiftSt, th
|
|
|
90
88
|
if (!refreshCb) {
|
|
91
89
|
return () => alert('[Developer Warning] You need to implement refreshCb in forecast!'); // eslint-disable-line
|
|
92
90
|
}
|
|
93
|
-
|
|
94
91
|
return () => refreshCb({
|
|
95
92
|
peaks: peaksEdit,
|
|
96
93
|
layout: layoutSt,
|
|
@@ -130,7 +130,6 @@ class LineFocus {
|
|
|
130
130
|
sameRef // eslint-disable-line
|
|
131
131
|
});
|
|
132
132
|
}
|
|
133
|
-
|
|
134
133
|
resetShouldUpdate(prevEpSt, prevItSt, prevMySt) {
|
|
135
134
|
const {
|
|
136
135
|
xt,
|
|
@@ -157,7 +156,6 @@ class LineFocus {
|
|
|
157
156
|
prevData // eslint-disable-line
|
|
158
157
|
});
|
|
159
158
|
}
|
|
160
|
-
|
|
161
159
|
setTip() {
|
|
162
160
|
this.tip = (0, _init.InitTip)();
|
|
163
161
|
this.root.call(this.tip);
|
|
@@ -129,7 +129,6 @@ class MultiFocus {
|
|
|
129
129
|
sameData // eslint-disable-line
|
|
130
130
|
});
|
|
131
131
|
}
|
|
132
|
-
|
|
133
132
|
resetShouldUpdate(prevEpSt) {
|
|
134
133
|
const {
|
|
135
134
|
xt,
|
|
@@ -154,7 +153,6 @@ class MultiFocus {
|
|
|
154
153
|
prevData // eslint-disable-line
|
|
155
154
|
});
|
|
156
155
|
}
|
|
157
|
-
|
|
158
156
|
setTip() {
|
|
159
157
|
this.tip = (0, _init.InitTip)();
|
|
160
158
|
this.root.call(this.tip);
|
|
@@ -62,6 +62,7 @@ class MultiJcampsViewer extends _react.default.Component {
|
|
|
62
62
|
entities,
|
|
63
63
|
userManualLink,
|
|
64
64
|
molSvg,
|
|
65
|
+
theoryMass,
|
|
65
66
|
layoutSt
|
|
66
67
|
} = this.props;
|
|
67
68
|
if (!entities || entities.length === 0) return /*#__PURE__*/_react.default.createElement("div", null);
|
|
@@ -104,6 +105,7 @@ class MultiJcampsViewer extends _react.default.Component {
|
|
|
104
105
|
userManualLink: userManualLink,
|
|
105
106
|
feature: feature,
|
|
106
107
|
molSvg: molSvg,
|
|
108
|
+
theoryMass: theoryMass,
|
|
107
109
|
subLayoutsInfo: seperatedSubLayouts,
|
|
108
110
|
descriptions: "",
|
|
109
111
|
canChangeDescription: () => {},
|
|
@@ -140,7 +142,8 @@ MultiJcampsViewer.propTypes = {
|
|
|
140
142
|
operations: _propTypes.default.func.isRequired,
|
|
141
143
|
userManualLink: _propTypes.default.object,
|
|
142
144
|
entities: _propTypes.default.array,
|
|
143
|
-
layoutSt: _propTypes.default.string.isRequired
|
|
145
|
+
layoutSt: _propTypes.default.string.isRequired,
|
|
146
|
+
theoryMass: _propTypes.default.string
|
|
144
147
|
};
|
|
145
148
|
MultiJcampsViewer.defaultProps = {
|
|
146
149
|
multiEntities: [],
|
|
@@ -109,7 +109,6 @@ const GraphSelectionPanel = _ref => {
|
|
|
109
109
|
console.log(e); //eslint-disable-line
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
|
-
|
|
113
112
|
const items = listCurves.map((spectra, idx) => {
|
|
114
113
|
const {
|
|
115
114
|
color
|
|
@@ -196,7 +195,6 @@ const GraphSelectionPanel = _ref => {
|
|
|
196
195
|
}), item.filename !== '' ? /*#__PURE__*/_react.default.createElement("span", null, "File: ", item.filename) : null // eslint-disable-line
|
|
197
196
|
))))));
|
|
198
197
|
};
|
|
199
|
-
|
|
200
198
|
const mapStateToProps = (state, props) => (
|
|
201
199
|
// eslint-disable-line
|
|
202
200
|
{
|
|
@@ -21,11 +21,16 @@ var _graph_selection = _interopRequireDefault(require("./graph_selection"));
|
|
|
21
21
|
var _cfg = _interopRequireDefault(require("../../helpers/cfg"));
|
|
22
22
|
/* eslint-disable react/prop-types, react/require-default-props */
|
|
23
23
|
|
|
24
|
-
const theme = (0, _styles.createTheme)(
|
|
24
|
+
const theme = (0, _styles.createTheme)({
|
|
25
25
|
typography: {
|
|
26
26
|
useNextVariants: true
|
|
27
|
+
},
|
|
28
|
+
palette: {
|
|
29
|
+
background: {
|
|
30
|
+
default: '#D3D3D3'
|
|
31
|
+
}
|
|
27
32
|
}
|
|
28
|
-
})
|
|
33
|
+
});
|
|
29
34
|
const styles = () => ({
|
|
30
35
|
panels: {
|
|
31
36
|
maxHeight: 'calc(90vh - 220px)',
|
|
@@ -53,7 +58,6 @@ class PanelViewer extends _react.default.Component {
|
|
|
53
58
|
this.props.onDescriptionChanged(contentChanged); // eslint-disable-line
|
|
54
59
|
}
|
|
55
60
|
}
|
|
56
|
-
|
|
57
61
|
onExapnd(input) {
|
|
58
62
|
const {
|
|
59
63
|
expand
|
|
@@ -80,7 +84,8 @@ class PanelViewer extends _react.default.Component {
|
|
|
80
84
|
entityFileNames,
|
|
81
85
|
curveSt,
|
|
82
86
|
userManualLink,
|
|
83
|
-
subLayoutsInfo
|
|
87
|
+
subLayoutsInfo,
|
|
88
|
+
theoryMass
|
|
84
89
|
} = this.props;
|
|
85
90
|
const onExapndInfo = () => this.onExapnd('info');
|
|
86
91
|
const onExapndPeak = () => this.onExapnd('peak');
|
|
@@ -110,6 +115,7 @@ class PanelViewer extends _react.default.Component {
|
|
|
110
115
|
editorOnly: editorOnly,
|
|
111
116
|
expand: expand === 'info',
|
|
112
117
|
molSvg: molSvg,
|
|
118
|
+
theoryMass: theoryMass,
|
|
113
119
|
onExapnd: onExapndInfo,
|
|
114
120
|
descriptions: descriptions,
|
|
115
121
|
canChangeDescription: canChangeDescription,
|
|
@@ -152,7 +158,8 @@ PanelViewer.propTypes = {
|
|
|
152
158
|
entityFileNames: _propTypes.default.array,
|
|
153
159
|
userManualLink: _propTypes.default.object,
|
|
154
160
|
curveSt: _propTypes.default.object.isRequired,
|
|
155
|
-
subLayoutsInfo: _propTypes.default.object
|
|
161
|
+
subLayoutsInfo: _propTypes.default.object,
|
|
162
|
+
theoryMass: _propTypes.default.string
|
|
156
163
|
};
|
|
157
164
|
var _default = exports.default = (0, _reactRedux.connect)(
|
|
158
165
|
// eslint-disable-line
|
|
@@ -62,7 +62,7 @@ const styles = () => ({
|
|
|
62
62
|
backgroundColor: '#fff',
|
|
63
63
|
height: 108,
|
|
64
64
|
lineHeight: '24px',
|
|
65
|
-
overflowY: '
|
|
65
|
+
overflowY: 'hidden',
|
|
66
66
|
overflowWrap: 'word-break'
|
|
67
67
|
},
|
|
68
68
|
tHead: {
|
|
@@ -77,15 +77,13 @@ const styles = () => ({
|
|
|
77
77
|
marginRight: 3
|
|
78
78
|
},
|
|
79
79
|
quill: {
|
|
80
|
-
backgroundColor: '#fafafa',
|
|
81
|
-
border: '1px solid #eee',
|
|
82
80
|
fontSize: '0.8rem',
|
|
83
81
|
fontFamily: 'Helvetica',
|
|
84
|
-
padding: '0 10px 0 10px',
|
|
85
82
|
textAlign: 'left'
|
|
86
83
|
}
|
|
87
84
|
});
|
|
88
85
|
const simTitle = () => 'Simulated signals from NMRshiftDB';
|
|
86
|
+
const valueFromAnalysisTitle = () => 'Values obtained from the analysis';
|
|
89
87
|
const simContent = nmrSimPeaks => nmrSimPeaks && nmrSimPeaks.sort((a, b) => a - b).join(', ');
|
|
90
88
|
const aucValue = integration => {
|
|
91
89
|
if (!integration) {
|
|
@@ -125,6 +123,7 @@ const InfoPanel = _ref => {
|
|
|
125
123
|
simulationSt,
|
|
126
124
|
shiftSt,
|
|
127
125
|
curveSt,
|
|
126
|
+
theoryMass,
|
|
128
127
|
onExapnd,
|
|
129
128
|
canChangeDescription,
|
|
130
129
|
onDescriptionChanged
|
|
@@ -151,8 +150,8 @@ const InfoPanel = _ref => {
|
|
|
151
150
|
if (integration) {
|
|
152
151
|
originStack = integration.originStack; // eslint-disable-line
|
|
153
152
|
}
|
|
154
|
-
|
|
155
153
|
return /*#__PURE__*/_react.default.createElement(_material.Accordion, {
|
|
154
|
+
"data-testid": "PanelInfo",
|
|
156
155
|
expanded: expand,
|
|
157
156
|
onChange: onExapnd,
|
|
158
157
|
className: (0, _classnames.default)(classes.panel),
|
|
@@ -180,13 +179,19 @@ const InfoPanel = _ref => {
|
|
|
180
179
|
className: (0, _classnames.default)(classes.tTxt, classes.tHead, 'txt-sv-panel-txt')
|
|
181
180
|
}, "Freq : "), /*#__PURE__*/_react.default.createElement("span", {
|
|
182
181
|
className: (0, _classnames.default)(classes.tTxt, 'txt-sv-panel-txt')
|
|
183
|
-
}, parseInt(observeFrequency, 10) || ' - ')) : null, _format.default.isNmrLayout(layoutSt) ? /*#__PURE__*/_react.default.createElement("div", {
|
|
182
|
+
}, `${parseInt(observeFrequency, 10)} Hz` || ' - ')) : null, _format.default.isNmrLayout(layoutSt) ? /*#__PURE__*/_react.default.createElement("div", {
|
|
184
183
|
className: (0, _classnames.default)(classes.rowRoot, classes.rowOdd)
|
|
185
184
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
186
185
|
className: (0, _classnames.default)(classes.tTxt, classes.tHead, 'txt-sv-panel-txt')
|
|
187
186
|
}, "Solv : "), /*#__PURE__*/_react.default.createElement("span", {
|
|
188
187
|
className: (0, _classnames.default)(classes.tTxt, 'txt-sv-panel-txt')
|
|
189
|
-
}, showSolvName)) : null,
|
|
188
|
+
}, showSolvName)) : null, _format.default.isMsLayout(layoutSt) && theoryMass ? /*#__PURE__*/_react.default.createElement("div", {
|
|
189
|
+
className: (0, _classnames.default)(classes.rowRoot, classes.rowOdd)
|
|
190
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
191
|
+
className: (0, _classnames.default)(classes.tTxt, classes.tHead, 'txt-sv-panel-txt')
|
|
192
|
+
}, "Theoretical mass: "), /*#__PURE__*/_react.default.createElement("span", {
|
|
193
|
+
className: (0, _classnames.default)(classes.tTxt, 'txt-sv-panel-txt')
|
|
194
|
+
}, `${parseFloat(theoryMass).toFixed(6)} g/mol`)) : null, !molSvg ? null : /*#__PURE__*/_react.default.createElement(_reactSvgFileZoomPan.default, {
|
|
190
195
|
svg: molSvg,
|
|
191
196
|
duration: 300,
|
|
192
197
|
resize: true
|
|
@@ -196,15 +201,19 @@ const InfoPanel = _ref => {
|
|
|
196
201
|
className: (0, _classnames.default)(classes.tTxt, classes.tHead, 'txt-sv-panel-txt')
|
|
197
202
|
}, "Area under curve (AUC):"), /*#__PURE__*/_react.default.createElement("br", null), /*#__PURE__*/_react.default.createElement("span", {
|
|
198
203
|
className: (0, _classnames.default)(classes.tTxt, classes.tTxtSim, 'txt-sv-panel-txt')
|
|
199
|
-
}, aucValue(integration))) : null), !_format.default.isCyclicVoltaLayout(layoutSt) ? /*#__PURE__*/_react.default.createElement(
|
|
200
|
-
className: (0, _classnames.default)(classes.
|
|
204
|
+
}, aucValue(integration))) : null), !_format.default.isCyclicVoltaLayout(layoutSt) ? /*#__PURE__*/_react.default.createElement("div", {
|
|
205
|
+
className: (0, _classnames.default)(classes.rowRoot, classes.rowOdd)
|
|
206
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
207
|
+
className: (0, _classnames.default)(classes.tTxt, classes.tHead, 'txt-sv-panel-txt')
|
|
208
|
+
}, valueFromAnalysisTitle(), ":"), /*#__PURE__*/_react.default.createElement("br", null), /*#__PURE__*/_react.default.createElement(_reactQuill.default, {
|
|
209
|
+
className: (0, _classnames.default)(classes.quill, 'txt-sv-panel-txt'),
|
|
201
210
|
value: descriptions,
|
|
202
211
|
modules: {
|
|
203
212
|
toolbar: false
|
|
204
213
|
},
|
|
205
214
|
onChange: onDescriptionChanged,
|
|
206
215
|
readOnly: canChangeDescription !== undefined ? !canChangeDescription : true
|
|
207
|
-
}) : null, /*#__PURE__*/_react.default.createElement("div", null, !editorOnly && _format.default.isNmrLayout(layoutSt) ? /*#__PURE__*/_react.default.createElement("div", {
|
|
216
|
+
})) : null, /*#__PURE__*/_react.default.createElement("div", null, !editorOnly && _format.default.isNmrLayout(layoutSt) ? /*#__PURE__*/_react.default.createElement("div", {
|
|
208
217
|
className: (0, _classnames.default)(classes.rowRoot, classes.rowOddSim)
|
|
209
218
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
210
219
|
className: (0, _classnames.default)(classes.tTxt, classes.tHead, 'txt-sv-panel-txt')
|
|
@@ -235,7 +244,8 @@ InfoPanel.propTypes = {
|
|
|
235
244
|
curveSt: _propTypes.default.object.isRequired,
|
|
236
245
|
onExapnd: _propTypes.default.func.isRequired,
|
|
237
246
|
canChangeDescription: _propTypes.default.bool.isRequired,
|
|
238
|
-
onDescriptionChanged: _propTypes.default.func
|
|
247
|
+
onDescriptionChanged: _propTypes.default.func,
|
|
248
|
+
theoryMass: _propTypes.default.string
|
|
239
249
|
};
|
|
240
250
|
var _default = exports.default = (0, _reactRedux.connect)(
|
|
241
251
|
// eslint-disable-line
|
package/dist/helpers/chem.js
CHANGED
|
@@ -821,7 +821,6 @@ const ExtractJcamp = source => {
|
|
|
821
821
|
xy: true,
|
|
822
822
|
keepRecordsRegExp: /(\$CSTHRESHOLD|\$CSSCANAUTOTARGET|\$CSSCANEDITTARGET|\$CSSCANCOUNT|\$CSSOLVENTNAME|\$CSSOLVENTVALUE|\$CSSOLVENTX|\$CSCATEGORY|\$CSITAREA|\$CSITFACTOR|\$OBSERVEDINTEGRALS|\$OBSERVEDMULTIPLETS|\$OBSERVEDMULTIPLETSPEAKS|\.SOLVENTNAME|\.OBSERVEFREQUENCY|\$CSSIMULATIONPEAKS|\$CSUPPERTHRESHOLD|\$CSLOWERTHRESHOLD|\$CSCYCLICVOLTAMMETRYDATA|UNITS|SYMBOL|CSAUTOMETADATA)/ // eslint-disable-line
|
|
823
823
|
});
|
|
824
|
-
|
|
825
824
|
const layout = readLayout(jcamp);
|
|
826
825
|
const peakUp = !_format.default.isIrLayout(layout);
|
|
827
826
|
const spectra = _format.default.isMsLayout(layout) ? extrSpectraMs(jcamp, layout) : extrSpectraNi(jcamp, layout);
|
package/dist/index.js
CHANGED
|
@@ -460,7 +460,6 @@ class DemoWriteIr extends _react.default.Component {
|
|
|
460
460
|
}
|
|
461
461
|
/*eslint-disable */
|
|
462
462
|
}
|
|
463
|
-
|
|
464
463
|
predictOp(_ref6) {
|
|
465
464
|
let {
|
|
466
465
|
multiplicity,
|
|
@@ -708,6 +707,7 @@ class DemoWriteIr extends _react.default.Component {
|
|
|
708
707
|
canChangeDescription: true,
|
|
709
708
|
onDescriptionChanged: this.onDescriptionChanged,
|
|
710
709
|
molSvg: molSvg,
|
|
710
|
+
theoryMass: '123.0',
|
|
711
711
|
userManualLink: {
|
|
712
712
|
cv: "https://www.chemotion.net/chemotionsaurus/docs/eln/chemspectra/cvanalysis"
|
|
713
713
|
},
|
package/dist/layer_init.js
CHANGED
|
@@ -128,6 +128,7 @@ class LayerInit extends _react.default.Component {
|
|
|
128
128
|
descriptions,
|
|
129
129
|
molSvg,
|
|
130
130
|
editorOnly,
|
|
131
|
+
theoryMass,
|
|
131
132
|
canChangeDescription,
|
|
132
133
|
onDescriptionChanged,
|
|
133
134
|
multiEntities,
|
|
@@ -146,6 +147,7 @@ class LayerInit extends _react.default.Component {
|
|
|
146
147
|
entityFileNames: entityFileNames,
|
|
147
148
|
userManualLink: userManualLink,
|
|
148
149
|
molSvg: molSvg,
|
|
150
|
+
theoryMass: theoryMass,
|
|
149
151
|
operations: operations
|
|
150
152
|
});
|
|
151
153
|
} else if (_format.default.isCyclicVoltaLayout(layout)) {
|
|
@@ -155,6 +157,7 @@ class LayerInit extends _react.default.Component {
|
|
|
155
157
|
entityFileNames: entityFileNames,
|
|
156
158
|
userManualLink: userManualLink,
|
|
157
159
|
molSvg: molSvg,
|
|
160
|
+
theoryMass: theoryMass,
|
|
158
161
|
operations: operations
|
|
159
162
|
});
|
|
160
163
|
}
|
|
@@ -168,6 +171,7 @@ class LayerInit extends _react.default.Component {
|
|
|
168
171
|
descriptions: descriptions,
|
|
169
172
|
molSvg: molSvg,
|
|
170
173
|
editorOnly: editorOnly,
|
|
174
|
+
theoryMass: theoryMass,
|
|
171
175
|
canChangeDescription: canChangeDescription,
|
|
172
176
|
onDescriptionChanged: onDescriptionChanged
|
|
173
177
|
});
|
|
@@ -198,6 +202,7 @@ LayerInit.propTypes = {
|
|
|
198
202
|
yLabel: _propTypes.default.string.isRequired,
|
|
199
203
|
molSvg: _propTypes.default.string.isRequired,
|
|
200
204
|
editorOnly: _propTypes.default.bool.isRequired,
|
|
205
|
+
theoryMass: _propTypes.default.string.isRequired,
|
|
201
206
|
forecast: _propTypes.default.object.isRequired,
|
|
202
207
|
operations: _propTypes.default.array.isRequired,
|
|
203
208
|
descriptions: _propTypes.default.array.isRequired,
|
package/dist/layer_prism.js
CHANGED
|
@@ -32,6 +32,7 @@ const LayerPrism = _ref => {
|
|
|
32
32
|
descriptions,
|
|
33
33
|
molSvg,
|
|
34
34
|
editorOnly,
|
|
35
|
+
theoryMass,
|
|
35
36
|
thresSt,
|
|
36
37
|
scanSt,
|
|
37
38
|
uiSt,
|
|
@@ -102,6 +103,7 @@ const LayerPrism = _ref => {
|
|
|
102
103
|
integration: integration,
|
|
103
104
|
editorOnly: editorOnly,
|
|
104
105
|
molSvg: molSvg,
|
|
106
|
+
theoryMass: theoryMass,
|
|
105
107
|
descriptions: descriptions,
|
|
106
108
|
canChangeDescription: canChangeDescription,
|
|
107
109
|
onDescriptionChanged: onDescriptionChanged
|
|
@@ -122,6 +124,7 @@ LayerPrism.propTypes = {
|
|
|
122
124
|
yLabel: _propTypes.default.string.isRequired,
|
|
123
125
|
molSvg: _propTypes.default.string.isRequired,
|
|
124
126
|
editorOnly: _propTypes.default.bool.isRequired,
|
|
127
|
+
theoryMass: _propTypes.default.string,
|
|
125
128
|
forecast: _propTypes.default.object.isRequired,
|
|
126
129
|
operations: _propTypes.default.array.isRequired,
|
|
127
130
|
descriptions: _propTypes.default.array.isRequired,
|
|
@@ -19,13 +19,11 @@ const statusReducer = function () {
|
|
|
19
19
|
btnSubmit: false
|
|
20
20
|
} // !state.btnSubmit
|
|
21
21
|
);
|
|
22
|
-
|
|
23
22
|
case _action_type.STATUS.TOGGLEBTNALL:
|
|
24
23
|
return Object.assign({}, state, {
|
|
25
24
|
btnSubmit: false
|
|
26
25
|
} // !state.btnSubmit
|
|
27
26
|
);
|
|
28
|
-
|
|
29
27
|
case _action_type.STATUS.ENABLEBTNALL:
|
|
30
28
|
case _action_type.EDITPEAK.ADDPOSITIVE:
|
|
31
29
|
case _action_type.EDITPEAK.RMPOSITIVE:
|
|
@@ -188,7 +188,6 @@ const rmPeakFromStack = function (action, metaSt, mpySt) {
|
|
|
188
188
|
multiplicities
|
|
189
189
|
}); // eslint-disable-line
|
|
190
190
|
}
|
|
191
|
-
|
|
192
191
|
const noSmExtext = newStack.map(k => k.xExtent.xL === xExtent.xL && k.xExtent.xU === xExtent.xU ? 1 : 0).reduce((a, s) => a + s) === 0;
|
|
193
192
|
const newSmExtext = noSmExtext ? newStack[0].xExtent : xExtent;
|
|
194
193
|
const newSelectedMulti = Object.assign({}, selectedMulti, {
|
|
@@ -201,7 +200,6 @@ const rmPeakFromStack = function (action, metaSt, mpySt) {
|
|
|
201
200
|
multiplicities: newMultiplicities
|
|
202
201
|
}); // eslint-disable-line
|
|
203
202
|
};
|
|
204
|
-
|
|
205
203
|
function* rmPanelPeakFromStack(action) {
|
|
206
204
|
const metaSt = yield (0, _effects.select)(getMetaSt);
|
|
207
205
|
const mpySt = yield (0, _effects.select)(getMultiplicitySt);
|
|
@@ -296,7 +294,6 @@ function* resetInitNmr(action) {
|
|
|
296
294
|
// payload,
|
|
297
295
|
// });
|
|
298
296
|
}
|
|
299
|
-
|
|
300
297
|
function* resetOne(action) {
|
|
301
298
|
const xExtent = action.payload;
|
|
302
299
|
const metaSt = yield (0, _effects.select)(getMetaSt);
|