@complat/react-spectra-editor 1.3.4 → 1.4.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/dist/__tests__/fixtures/nmr1h_2_jcamp.js +3199 -1944
- package/dist/__tests__/units/components/cmd_bar/01_viewer.test.js +21 -18
- package/dist/__tests__/units/components/cmd_bar/02_zoom.test.js +15 -13
- package/dist/__tests__/units/components/cmd_bar/03_peak.test.js +35 -26
- package/dist/__tests__/units/components/cmd_bar/07_pecker.test.js +17 -14
- package/dist/__tests__/units/components/cmd_bar/r08_change_axes.test.js +15 -13
- package/dist/__tests__/units/components/common/comps.test.js +9 -8
- package/dist/__tests__/units/components/common/draw.test.js +26 -34
- package/dist/__tests__/units/components/panel/graph_selection.test.js +25 -22
- package/dist/__tests__/units/components/panel/info.test.js +30 -25
- package/dist/__tests__/units/components/panel/peaks.test.js +29 -24
- package/dist/actions/manager.js +6 -2
- package/dist/actions/ui.js +13 -21
- package/dist/app.js +47 -47
- package/dist/components/cmd_bar/01_viewer.js +38 -31
- package/dist/components/cmd_bar/02_zoom.js +34 -27
- package/dist/components/cmd_bar/03_peak.js +85 -64
- package/dist/components/cmd_bar/04_integration.js +97 -76
- package/dist/components/cmd_bar/05_multiplicity.js +94 -67
- package/dist/components/cmd_bar/06_undo_redo.js +41 -32
- package/dist/components/cmd_bar/07_pecker.js +70 -47
- package/dist/components/cmd_bar/common.js +8 -8
- package/dist/components/cmd_bar/index.js +20 -21
- package/dist/components/cmd_bar/r01_layout.js +201 -137
- package/dist/components/cmd_bar/r02_scan.js +63 -51
- package/dist/components/cmd_bar/r03_threshold.js +95 -69
- package/dist/components/cmd_bar/r04_submit.js +155 -133
- package/dist/components/cmd_bar/r05_submit_btn.js +39 -36
- package/dist/components/cmd_bar/r06_predict_btn.js +66 -52
- package/dist/components/cmd_bar/r07_wavelength_btn.js +35 -31
- package/dist/components/cmd_bar/r08_change_axes.js +65 -56
- package/dist/components/cmd_bar/r09_detector.js +38 -33
- package/dist/components/cmd_bar/tri_btn.js +37 -25
- package/dist/components/common/comps.js +5 -6
- package/dist/components/d3_line/index.js +2 -1
- package/dist/components/d3_line/line_focus.js +32 -34
- package/dist/components/d3_multi/index.js +2 -1
- package/dist/components/d3_multi/multi_focus.js +60 -37
- package/dist/components/d3_rect/index.js +2 -1
- package/dist/components/d3_rect/rect_focus.js +18 -20
- package/dist/components/forecast/comps.js +169 -132
- package/dist/components/forecast/ir_comps.js +88 -69
- package/dist/components/forecast/ir_viewer.js +35 -28
- package/dist/components/forecast/nmr_comps.js +105 -76
- package/dist/components/forecast/nmr_viewer.js +36 -29
- package/dist/components/forecast/section_loading.js +22 -17
- package/dist/components/forecast_viewer.js +19 -17
- package/dist/components/multi_jcamps_viewer.js +46 -40
- package/dist/components/panel/compare.js +92 -76
- package/dist/components/panel/cyclic_voltamery_data.js +171 -122
- package/dist/components/panel/graph_selection.js +113 -90
- package/dist/components/panel/index.js +45 -41
- package/dist/components/panel/info.js +204 -157
- package/dist/components/panel/multiplicity.js +85 -63
- package/dist/components/panel/multiplicity_coupling.js +36 -29
- package/dist/components/panel/multiplicity_select.js +20 -19
- package/dist/components/panel/peaks.js +78 -56
- package/dist/constants/action_type.js +2 -1
- package/dist/helpers/cfg.js +1 -2
- package/dist/helpers/chem.js +5 -13
- package/dist/helpers/converter.js +1 -2
- package/dist/helpers/extractParams.js +1 -2
- package/dist/helpers/extractPeaksEdit.js +3 -6
- package/dist/helpers/format.js +27 -62
- package/dist/helpers/init.js +5 -9
- package/dist/helpers/integration.js +1 -2
- package/dist/helpers/mount.js +1 -2
- package/dist/index.js +306 -276
- package/dist/layer_content.js +14 -14
- package/dist/layer_init.js +17 -16
- package/dist/layer_prism.js +84 -73
- package/dist/reducers/reducer_axes.js +2 -5
- package/dist/reducers/reducer_curve.js +8 -6
- package/dist/reducers/reducer_detector.js +1 -3
- package/dist/reducers/reducer_edit_peak.js +1 -3
- package/dist/reducers/reducer_forecast.js +1 -3
- package/dist/reducers/reducer_integration.js +1 -3
- package/dist/reducers/reducer_jcamp.js +5 -8
- package/dist/reducers/reducer_layout.js +1 -3
- package/dist/reducers/reducer_manager.js +1 -3
- package/dist/reducers/reducer_meta.js +1 -3
- package/dist/reducers/reducer_multiplicity.js +3 -3
- package/dist/reducers/reducer_scan.js +1 -3
- package/dist/reducers/reducer_shift.js +1 -3
- package/dist/reducers/reducer_simulation.js +1 -3
- package/dist/reducers/reducer_status.js +1 -3
- package/dist/reducers/reducer_submit.js +1 -3
- package/dist/reducers/reducer_threshold.js +199 -29
- package/dist/reducers/reducer_ui.js +1 -3
- package/dist/reducers/reducer_voltammetry.js +3 -7
- package/dist/reducers/reducer_wavelength.js +1 -3
- package/dist/sagas/saga_multi_entities.js +35 -14
- package/dist/sagas/saga_multiplicity.js +1 -2
- package/dist/third_party/jAnalyzer.js +1 -1
- package/package.json +18 -1
package/dist/layer_content.js
CHANGED
|
@@ -13,6 +13,7 @@ var _index = _interopRequireDefault(require("./components/d3_line/index"));
|
|
|
13
13
|
var _index2 = _interopRequireDefault(require("./components/d3_rect/index"));
|
|
14
14
|
var _forecast_viewer = _interopRequireDefault(require("./components/forecast_viewer"));
|
|
15
15
|
var _format = _interopRequireDefault(require("./helpers/format"));
|
|
16
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
17
|
/* eslint-disable prefer-object-spread, default-param-last, react/function-component-definition */
|
|
17
18
|
|
|
18
19
|
const extractLayout = (forecast, layoutSt) => {
|
|
@@ -32,17 +33,16 @@ const extractLayout = (forecast, layoutSt) => {
|
|
|
32
33
|
isXRD
|
|
33
34
|
};
|
|
34
35
|
};
|
|
35
|
-
const Content =
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
} = _ref;
|
|
36
|
+
const Content = ({
|
|
37
|
+
topic,
|
|
38
|
+
feature,
|
|
39
|
+
cLabel,
|
|
40
|
+
xLabel,
|
|
41
|
+
yLabel,
|
|
42
|
+
forecast,
|
|
43
|
+
operations,
|
|
44
|
+
layoutSt
|
|
45
|
+
}) => {
|
|
46
46
|
const {
|
|
47
47
|
showForecast,
|
|
48
48
|
isNmr,
|
|
@@ -52,7 +52,7 @@ const Content = _ref => {
|
|
|
52
52
|
isXRD
|
|
53
53
|
} = extractLayout(forecast, layoutSt);
|
|
54
54
|
if (showForecast) {
|
|
55
|
-
return /*#__PURE__*/
|
|
55
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_forecast_viewer.default, {
|
|
56
56
|
topic: topic,
|
|
57
57
|
cLabel: cLabel,
|
|
58
58
|
xLabel: xLabel,
|
|
@@ -67,7 +67,7 @@ const Content = _ref => {
|
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
69
|
if (isMs) {
|
|
70
|
-
return /*#__PURE__*/
|
|
70
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.default, {
|
|
71
71
|
topic: topic,
|
|
72
72
|
cLabel: cLabel,
|
|
73
73
|
xLabel: xLabel,
|
|
@@ -76,7 +76,7 @@ const Content = _ref => {
|
|
|
76
76
|
isHidden: false
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
|
-
return /*#__PURE__*/
|
|
79
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.default, {
|
|
80
80
|
topic: topic,
|
|
81
81
|
cLabel: cLabel,
|
|
82
82
|
xLabel: xLabel,
|
package/dist/layer_init.js
CHANGED
|
@@ -18,6 +18,7 @@ var _layer_prism = _interopRequireDefault(require("./layer_prism"));
|
|
|
18
18
|
var _format = _interopRequireDefault(require("./helpers/format"));
|
|
19
19
|
var _multi_jcamps_viewer = _interopRequireDefault(require("./components/multi_jcamps_viewer"));
|
|
20
20
|
var _curve = require("./actions/curve");
|
|
21
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
22
|
/* eslint-disable prefer-object-spread, default-param-last */
|
|
22
23
|
|
|
23
24
|
const styles = () => ({});
|
|
@@ -42,14 +43,10 @@ class LayerInit extends _react.default.Component {
|
|
|
42
43
|
this.updateMultiEntities();
|
|
43
44
|
}
|
|
44
45
|
normChange(prevProps) {
|
|
45
|
-
const prevFeatures = prevProps.entity.features;
|
|
46
|
-
const prevPeak = prevFeatures.editPeak || prevFeatures.autoPeak;
|
|
47
46
|
const {
|
|
48
47
|
entity
|
|
49
48
|
} = this.props;
|
|
50
|
-
|
|
51
|
-
const nextPeak = nextFeatures.editPeak || nextFeatures.autoPeak;
|
|
52
|
-
if (prevPeak !== nextPeak) {
|
|
49
|
+
if (prevProps.entity !== entity) {
|
|
53
50
|
this.execReset();
|
|
54
51
|
}
|
|
55
52
|
}
|
|
@@ -62,7 +59,8 @@ class LayerInit extends _react.default.Component {
|
|
|
62
59
|
resetInitNmrAct,
|
|
63
60
|
resetInitCommonWithIntergationAct,
|
|
64
61
|
resetDetectorAct,
|
|
65
|
-
updateDSCMetaDataAct
|
|
62
|
+
updateDSCMetaDataAct,
|
|
63
|
+
resetMultiplicityAct
|
|
66
64
|
} = this.props;
|
|
67
65
|
resetInitCommonAct();
|
|
68
66
|
resetDetectorAct();
|
|
@@ -76,8 +74,7 @@ class LayerInit extends _react.default.Component {
|
|
|
76
74
|
const editPeak = features.editPeak || features[0];
|
|
77
75
|
const baseFeat = editPeak || autoPeak;
|
|
78
76
|
resetInitMsAct(baseFeat);
|
|
79
|
-
}
|
|
80
|
-
if (_format.default.isNmrLayout(layout)) {
|
|
77
|
+
} else if (_format.default.isNmrLayout(layout)) {
|
|
81
78
|
const {
|
|
82
79
|
integration,
|
|
83
80
|
multiplicity,
|
|
@@ -102,6 +99,8 @@ class LayerInit extends _react.default.Component {
|
|
|
102
99
|
dscMetaData
|
|
103
100
|
} = features;
|
|
104
101
|
updateDSCMetaDataAct(dscMetaData);
|
|
102
|
+
} else {
|
|
103
|
+
resetMultiplicityAct();
|
|
105
104
|
}
|
|
106
105
|
}
|
|
107
106
|
initReducer() {
|
|
@@ -136,7 +135,7 @@ class LayerInit extends _react.default.Component {
|
|
|
136
135
|
descriptions,
|
|
137
136
|
molSvg,
|
|
138
137
|
editorOnly,
|
|
139
|
-
|
|
138
|
+
exactMass,
|
|
140
139
|
canChangeDescription,
|
|
141
140
|
onDescriptionChanged,
|
|
142
141
|
multiEntities,
|
|
@@ -150,26 +149,26 @@ class LayerInit extends _react.default.Component {
|
|
|
150
149
|
const xxLabel = !xLabel && xLabel === '' ? `X (${target.xUnit})` : xLabel;
|
|
151
150
|
const yyLabel = !yLabel && yLabel === '' ? `Y (${target.yUnit})` : yLabel;
|
|
152
151
|
if (multiEntities) {
|
|
153
|
-
return /*#__PURE__*/
|
|
152
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_multi_jcamps_viewer.default, {
|
|
154
153
|
multiEntities: multiEntities,
|
|
155
154
|
entityFileNames: entityFileNames,
|
|
156
155
|
userManualLink: userManualLink,
|
|
157
156
|
molSvg: molSvg,
|
|
158
|
-
|
|
157
|
+
exactMass: exactMass,
|
|
159
158
|
operations: operations
|
|
160
159
|
});
|
|
161
160
|
} else if (_format.default.isCyclicVoltaLayout(layout)) {
|
|
162
161
|
// eslint-disable-line
|
|
163
|
-
return /*#__PURE__*/
|
|
162
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_multi_jcamps_viewer.default, {
|
|
164
163
|
multiEntities: [entity],
|
|
165
164
|
entityFileNames: entityFileNames,
|
|
166
165
|
userManualLink: userManualLink,
|
|
167
166
|
molSvg: molSvg,
|
|
168
|
-
|
|
167
|
+
exactMass: exactMass,
|
|
169
168
|
operations: operations
|
|
170
169
|
});
|
|
171
170
|
}
|
|
172
|
-
return /*#__PURE__*/
|
|
171
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_layer_prism.default, {
|
|
173
172
|
entity: entity,
|
|
174
173
|
cLabel: cLabel,
|
|
175
174
|
xLabel: xxLabel,
|
|
@@ -179,7 +178,7 @@ class LayerInit extends _react.default.Component {
|
|
|
179
178
|
descriptions: descriptions,
|
|
180
179
|
molSvg: molSvg,
|
|
181
180
|
editorOnly: editorOnly,
|
|
182
|
-
|
|
181
|
+
exactMass: exactMass,
|
|
183
182
|
canChangeDescription: canChangeDescription,
|
|
184
183
|
onDescriptionChanged: onDescriptionChanged
|
|
185
184
|
});
|
|
@@ -194,6 +193,7 @@ const mapDispatchToProps = dispatch => (0, _redux.bindActionCreators)({
|
|
|
194
193
|
resetInitMsAct: _manager.resetInitMs,
|
|
195
194
|
resetInitCommonWithIntergationAct: _manager.resetInitCommonWithIntergation,
|
|
196
195
|
resetDetectorAct: _manager.resetDetector,
|
|
196
|
+
resetMultiplicityAct: _manager.resetMultiplicity,
|
|
197
197
|
updateOperationAct: _submit.updateOperation,
|
|
198
198
|
updateMetaPeaksAct: _meta.updateMetaPeaks,
|
|
199
199
|
addOthersAct: _jcamp.addOthers,
|
|
@@ -212,7 +212,7 @@ LayerInit.propTypes = {
|
|
|
212
212
|
yLabel: _propTypes.default.string.isRequired,
|
|
213
213
|
molSvg: _propTypes.default.string.isRequired,
|
|
214
214
|
editorOnly: _propTypes.default.bool.isRequired,
|
|
215
|
-
|
|
215
|
+
exactMass: _propTypes.default.string.isRequired,
|
|
216
216
|
forecast: _propTypes.default.object.isRequired,
|
|
217
217
|
operations: _propTypes.default.array.isRequired,
|
|
218
218
|
descriptions: _propTypes.default.array.isRequired,
|
|
@@ -230,6 +230,7 @@ LayerInit.propTypes = {
|
|
|
230
230
|
userManualLink: _propTypes.default.object,
|
|
231
231
|
// eslint-disable-line
|
|
232
232
|
resetDetectorAct: _propTypes.default.func.isRequired,
|
|
233
|
+
resetMultiplicityAct: _propTypes.default.func.isRequired,
|
|
233
234
|
updateDSCMetaDataAct: _propTypes.default.func.isRequired
|
|
234
235
|
};
|
|
235
236
|
var _default = exports.default = (0, _reactRedux.connect)(
|
package/dist/layer_prism.js
CHANGED
|
@@ -16,29 +16,29 @@ var _index2 = _interopRequireDefault(require("./components/cmd_bar/index"));
|
|
|
16
16
|
var _layer_content = _interopRequireDefault(require("./layer_content"));
|
|
17
17
|
var _list_ui = require("./constants/list_ui");
|
|
18
18
|
var _extractParams = require("./helpers/extractParams");
|
|
19
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
20
|
/* eslint-disable prefer-object-spread, default-param-last,
|
|
20
21
|
react/function-component-definition, react/require-default-props
|
|
21
22
|
*/
|
|
22
23
|
|
|
23
24
|
const styles = () => ({});
|
|
24
|
-
const LayerPrism =
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
} = _ref;
|
|
25
|
+
const LayerPrism = ({
|
|
26
|
+
entity,
|
|
27
|
+
cLabel,
|
|
28
|
+
xLabel,
|
|
29
|
+
yLabel,
|
|
30
|
+
forecast,
|
|
31
|
+
operations,
|
|
32
|
+
descriptions,
|
|
33
|
+
molSvg,
|
|
34
|
+
editorOnly,
|
|
35
|
+
exactMass,
|
|
36
|
+
thresSt,
|
|
37
|
+
scanSt,
|
|
38
|
+
uiSt,
|
|
39
|
+
canChangeDescription,
|
|
40
|
+
onDescriptionChanged
|
|
41
|
+
}) => {
|
|
42
42
|
const {
|
|
43
43
|
topic,
|
|
44
44
|
feature,
|
|
@@ -50,70 +50,81 @@ const LayerPrism = _ref => {
|
|
|
50
50
|
viewer
|
|
51
51
|
} = uiSt;
|
|
52
52
|
if (viewer === _list_ui.LIST_UI_VIEWER_TYPE.ANALYSIS) {
|
|
53
|
-
return /*#__PURE__*/
|
|
53
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
54
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.default, {
|
|
55
|
+
feature: feature,
|
|
56
|
+
hasEdit: hasEdit,
|
|
57
|
+
forecast: forecast,
|
|
58
|
+
operations: operations,
|
|
59
|
+
editorOnly: editorOnly
|
|
60
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
61
|
+
className: "react-spectrum-editor",
|
|
62
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Grid.default, {
|
|
63
|
+
container: true,
|
|
64
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Grid.default, {
|
|
65
|
+
item: true,
|
|
66
|
+
xs: 12,
|
|
67
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_layer_content.default, {
|
|
68
|
+
topic: topic,
|
|
69
|
+
feature: feature,
|
|
70
|
+
cLabel: cLabel,
|
|
71
|
+
xLabel: xLabel,
|
|
72
|
+
yLabel: yLabel,
|
|
73
|
+
forecast: forecast,
|
|
74
|
+
operations: operations
|
|
75
|
+
})
|
|
76
|
+
})
|
|
77
|
+
})
|
|
78
|
+
})]
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
82
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.default, {
|
|
54
83
|
feature: feature,
|
|
55
84
|
hasEdit: hasEdit,
|
|
56
85
|
forecast: forecast,
|
|
57
86
|
operations: operations,
|
|
58
87
|
editorOnly: editorOnly
|
|
59
|
-
}), /*#__PURE__*/
|
|
60
|
-
className: "react-spectrum-editor"
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
xLabel: xLabel,
|
|
94
|
-
yLabel: yLabel,
|
|
95
|
-
forecast: forecast,
|
|
96
|
-
operations: operations
|
|
97
|
-
})), /*#__PURE__*/_react.default.createElement(_Grid.default, {
|
|
98
|
-
item: true,
|
|
99
|
-
xs: 3,
|
|
100
|
-
align: "center"
|
|
101
|
-
}, /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
102
|
-
feature: feature,
|
|
103
|
-
integration: integration,
|
|
104
|
-
editorOnly: editorOnly,
|
|
105
|
-
molSvg: molSvg,
|
|
106
|
-
theoryMass: theoryMass,
|
|
107
|
-
descriptions: descriptions,
|
|
108
|
-
canChangeDescription: canChangeDescription,
|
|
109
|
-
onDescriptionChanged: onDescriptionChanged
|
|
110
|
-
})))));
|
|
88
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
89
|
+
className: "react-spectrum-editor",
|
|
90
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Grid.default, {
|
|
91
|
+
container: true,
|
|
92
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Grid.default, {
|
|
93
|
+
item: true,
|
|
94
|
+
xs: 9,
|
|
95
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_layer_content.default, {
|
|
96
|
+
topic: topic,
|
|
97
|
+
feature: feature,
|
|
98
|
+
cLabel: cLabel,
|
|
99
|
+
xLabel: xLabel,
|
|
100
|
+
yLabel: yLabel,
|
|
101
|
+
forecast: forecast,
|
|
102
|
+
operations: operations
|
|
103
|
+
})
|
|
104
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Grid.default, {
|
|
105
|
+
item: true,
|
|
106
|
+
xs: 3,
|
|
107
|
+
align: "center",
|
|
108
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.default, {
|
|
109
|
+
feature: feature,
|
|
110
|
+
integration: integration,
|
|
111
|
+
editorOnly: editorOnly,
|
|
112
|
+
molSvg: molSvg,
|
|
113
|
+
exactMass: exactMass,
|
|
114
|
+
descriptions: descriptions,
|
|
115
|
+
canChangeDescription: canChangeDescription,
|
|
116
|
+
onDescriptionChanged: onDescriptionChanged
|
|
117
|
+
})
|
|
118
|
+
})]
|
|
119
|
+
})
|
|
120
|
+
})]
|
|
121
|
+
});
|
|
111
122
|
};
|
|
112
123
|
const mapStateToProps = (state, props) => (
|
|
113
124
|
// eslint-disable-line
|
|
114
125
|
{
|
|
115
126
|
scanSt: state.scan,
|
|
116
|
-
thresSt: state.threshold,
|
|
127
|
+
thresSt: state.threshold.list[state.curve.curveIdx],
|
|
117
128
|
uiSt: state.ui
|
|
118
129
|
});
|
|
119
130
|
const mapDispatchToProps = dispatch => (0, _redux.bindActionCreators)({}, dispatch);
|
|
@@ -124,7 +135,7 @@ LayerPrism.propTypes = {
|
|
|
124
135
|
yLabel: _propTypes.default.string.isRequired,
|
|
125
136
|
molSvg: _propTypes.default.string.isRequired,
|
|
126
137
|
editorOnly: _propTypes.default.bool.isRequired,
|
|
127
|
-
|
|
138
|
+
exactMass: _propTypes.default.string,
|
|
128
139
|
forecast: _propTypes.default.object.isRequired,
|
|
129
140
|
operations: _propTypes.default.array.isRequired,
|
|
130
141
|
descriptions: _propTypes.default.array.isRequired,
|
|
@@ -13,8 +13,7 @@ const initialState = {
|
|
|
13
13
|
yUnit: ''
|
|
14
14
|
}]
|
|
15
15
|
};
|
|
16
|
-
const updateAxis =
|
|
17
|
-
let isYAxis = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
16
|
+
const updateAxis = (state, payload, isYAxis = false) => {
|
|
18
17
|
const {
|
|
19
18
|
value,
|
|
20
19
|
curveIndex
|
|
@@ -44,9 +43,7 @@ const updateAxis = function (state, payload) {
|
|
|
44
43
|
axes
|
|
45
44
|
});
|
|
46
45
|
};
|
|
47
|
-
const axesReducer =
|
|
48
|
-
let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;
|
|
49
|
-
let action = arguments.length > 1 ? arguments[1] : undefined;
|
|
46
|
+
const axesReducer = (state = initialState, action) => {
|
|
50
47
|
switch (action.type) {
|
|
51
48
|
case _action_type.AXES.UPDATE_X_AXIS:
|
|
52
49
|
return updateAxis(state, action.payload);
|
|
@@ -9,7 +9,7 @@ var _action_type = require("../constants/action_type");
|
|
|
9
9
|
var _extractParams = require("../helpers/extractParams");
|
|
10
10
|
var _chem = require("../helpers/chem");
|
|
11
11
|
var _format = _interopRequireDefault(require("../helpers/format"));
|
|
12
|
-
/* eslint-disable prefer-object-spread, default-param-last */
|
|
12
|
+
/* eslint-disable prefer-object-spread, default-param-last, max-len */
|
|
13
13
|
|
|
14
14
|
const initialState = {
|
|
15
15
|
listCurves: [],
|
|
@@ -26,8 +26,11 @@ const setAllCurves = (state, action) => {
|
|
|
26
26
|
topic,
|
|
27
27
|
feature,
|
|
28
28
|
hasEdit,
|
|
29
|
-
integration
|
|
30
|
-
|
|
29
|
+
integration,
|
|
30
|
+
multiplicity
|
|
31
|
+
} = (0, _extractParams.extractParams)(entity, {
|
|
32
|
+
isEdit: true
|
|
33
|
+
});
|
|
31
34
|
// const layout = entity.layout;
|
|
32
35
|
const {
|
|
33
36
|
layout
|
|
@@ -40,6 +43,7 @@ const setAllCurves = (state, action) => {
|
|
|
40
43
|
feature,
|
|
41
44
|
hasEdit,
|
|
42
45
|
integration,
|
|
46
|
+
multiplicity,
|
|
43
47
|
maxminPeak,
|
|
44
48
|
color,
|
|
45
49
|
curveIdx: idx
|
|
@@ -55,9 +59,7 @@ const setAllCurves = (state, action) => {
|
|
|
55
59
|
listCurves: payload
|
|
56
60
|
});
|
|
57
61
|
};
|
|
58
|
-
const curveReducer =
|
|
59
|
-
let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;
|
|
60
|
-
let action = arguments.length > 1 ? arguments[1] : undefined;
|
|
62
|
+
const curveReducer = (state = initialState, action) => {
|
|
61
63
|
switch (action.type) {
|
|
62
64
|
case _action_type.CURVE.SELECT_WORKING_CURVE:
|
|
63
65
|
return Object.assign({}, state, {
|
|
@@ -25,9 +25,7 @@ const updateOrAppendCurve = (curves, targetCurveIdx, newCurve) => {
|
|
|
25
25
|
}
|
|
26
26
|
return [...curves, newCurve];
|
|
27
27
|
};
|
|
28
|
-
const detectorReducer =
|
|
29
|
-
let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;
|
|
30
|
-
let action = arguments.length > 1 ? arguments[1] : undefined;
|
|
28
|
+
const detectorReducer = (state = initialState, action) => {
|
|
31
29
|
switch (action.type) {
|
|
32
30
|
case _action_type.SEC.UPDATE_DETECTOR:
|
|
33
31
|
const {
|
|
@@ -202,9 +202,7 @@ const clearAllPeaks = (state, action) => {
|
|
|
202
202
|
peaks: newPeaks
|
|
203
203
|
});
|
|
204
204
|
};
|
|
205
|
-
const editPeakReducer =
|
|
206
|
-
let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;
|
|
207
|
-
let action = arguments.length > 1 ? arguments[1] : undefined;
|
|
205
|
+
const editPeakReducer = (state = initialState, action) => {
|
|
208
206
|
switch (action.type) {
|
|
209
207
|
case _action_type.EDITPEAK.ADD_POSITIVE:
|
|
210
208
|
return addToPos(state, action);
|
|
@@ -101,9 +101,7 @@ const updateNmrStatus = (state, action) => {
|
|
|
101
101
|
});
|
|
102
102
|
return newSt;
|
|
103
103
|
};
|
|
104
|
-
const forecastReducer =
|
|
105
|
-
let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;
|
|
106
|
-
let action = arguments.length > 1 ? arguments[1] : undefined;
|
|
104
|
+
const forecastReducer = (state = initialState, action) => {
|
|
107
105
|
switch (action.type) {
|
|
108
106
|
case _action_type.FORECAST.INIT_STATUS:
|
|
109
107
|
if (!action.payload) return state;
|
|
@@ -208,9 +208,7 @@ const clearAll = (state, action) => {
|
|
|
208
208
|
selectedIdx: curveIdx
|
|
209
209
|
});
|
|
210
210
|
};
|
|
211
|
-
const integrationReducer =
|
|
212
|
-
let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;
|
|
213
|
-
let action = arguments.length > 1 ? arguments[1] : undefined;
|
|
211
|
+
const integrationReducer = (state = initialState, action) => {
|
|
214
212
|
switch (action.type) {
|
|
215
213
|
case _action_type.UI.SWEEP.SELECT_INTEGRATION:
|
|
216
214
|
return addToStack(state, action);
|
|
@@ -14,11 +14,10 @@ const initialState = {
|
|
|
14
14
|
addOthersCb: false
|
|
15
15
|
}]
|
|
16
16
|
};
|
|
17
|
-
const addOthers = (state,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
} = _ref;
|
|
17
|
+
const addOthers = (state, {
|
|
18
|
+
others,
|
|
19
|
+
addOthersCb
|
|
20
|
+
}) => {
|
|
22
21
|
const {
|
|
23
22
|
selectedIdx,
|
|
24
23
|
jcamps
|
|
@@ -81,9 +80,7 @@ const toggleShow = (state, payload) => {
|
|
|
81
80
|
jcamps
|
|
82
81
|
});
|
|
83
82
|
};
|
|
84
|
-
const layoutReducer =
|
|
85
|
-
let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;
|
|
86
|
-
let action = arguments.length > 1 ? arguments[1] : undefined;
|
|
83
|
+
const layoutReducer = (state = initialState, action) => {
|
|
87
84
|
switch (action.type) {
|
|
88
85
|
case _action_type.JCAMP.ADD_OTHERS:
|
|
89
86
|
return addOthers(state, action.payload);
|
|
@@ -9,9 +9,7 @@ var _list_layout = require("../constants/list_layout");
|
|
|
9
9
|
/* eslint-disable prefer-object-spread, default-param-last */
|
|
10
10
|
|
|
11
11
|
const initialState = _list_layout.LIST_LAYOUT.C13;
|
|
12
|
-
const layoutReducer =
|
|
13
|
-
let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;
|
|
14
|
-
let action = arguments.length > 1 ? arguments[1] : undefined;
|
|
12
|
+
const layoutReducer = (state = initialState, action) => {
|
|
15
13
|
switch (action.type) {
|
|
16
14
|
case _action_type.LAYOUT.UPDATE:
|
|
17
15
|
return action.payload;
|
|
@@ -8,9 +8,7 @@ exports.default = void 0;
|
|
|
8
8
|
// import { MANAGER } from '../constants/action_type';
|
|
9
9
|
|
|
10
10
|
const initialState = {};
|
|
11
|
-
const managerReducer =
|
|
12
|
-
let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;
|
|
13
|
-
let action = arguments.length > 1 ? arguments[1] : undefined;
|
|
11
|
+
const managerReducer = (state = initialState, action) => {
|
|
14
12
|
switch (action.type) {
|
|
15
13
|
default:
|
|
16
14
|
return state;
|
|
@@ -27,9 +27,7 @@ const updateMetaData = (state, action) => {
|
|
|
27
27
|
dscMetaData
|
|
28
28
|
});
|
|
29
29
|
};
|
|
30
|
-
const metaReducer =
|
|
31
|
-
let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;
|
|
32
|
-
let action = arguments.length > 1 ? arguments[1] : undefined;
|
|
30
|
+
const metaReducer = (state = initialState, action) => {
|
|
33
31
|
switch (action.type) {
|
|
34
32
|
case _action_type.META.UPDATE_PEAKS_RDC:
|
|
35
33
|
return Object.assign({}, state, action.payload);
|
|
@@ -164,9 +164,7 @@ const clearAll = (state, action) => {
|
|
|
164
164
|
multiplicities: newMultiplicities
|
|
165
165
|
});
|
|
166
166
|
};
|
|
167
|
-
const multiplicityReducer =
|
|
168
|
-
let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;
|
|
169
|
-
let action = arguments.length > 1 ? arguments[1] : undefined;
|
|
167
|
+
const multiplicityReducer = (state = initialState, action) => {
|
|
170
168
|
switch (action.type) {
|
|
171
169
|
case _action_type.EDITPEAK.SHIFT:
|
|
172
170
|
return setShift(state, action);
|
|
@@ -191,6 +189,8 @@ const multiplicityReducer = function () {
|
|
|
191
189
|
return clearAll(state, action);
|
|
192
190
|
case _action_type.MANAGER.RESETALL:
|
|
193
191
|
return state;
|
|
192
|
+
case _action_type.MANAGER.RESET_MULTIPLICITY:
|
|
193
|
+
return initialState;
|
|
194
194
|
default:
|
|
195
195
|
return _undo_redo_config.undoRedoActions.indexOf(action.type) >= 0 ? Object.assign({}, state) : state;
|
|
196
196
|
}
|
|
@@ -30,9 +30,7 @@ const toggleIsAuto = state => Object.assign({}, state, {
|
|
|
30
30
|
isAuto: !state.isAuto,
|
|
31
31
|
target: false
|
|
32
32
|
});
|
|
33
|
-
const scanReducer =
|
|
34
|
-
let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;
|
|
35
|
-
let action = arguments.length > 1 ? arguments[1] : undefined;
|
|
33
|
+
const scanReducer = (state = initialState, action) => {
|
|
36
34
|
switch (action.type) {
|
|
37
35
|
case _action_type.SCAN.SET_TARGET:
|
|
38
36
|
case _action_type.SCAN.RESET_TARGET:
|
|
@@ -217,9 +217,7 @@ const addNegative = (state, action) => {
|
|
|
217
217
|
selectedIdx: curveIdx
|
|
218
218
|
});
|
|
219
219
|
};
|
|
220
|
-
const shiftReducer =
|
|
221
|
-
let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;
|
|
222
|
-
let action = arguments.length > 1 ? arguments[1] : undefined;
|
|
220
|
+
const shiftReducer = (state = initialState, action) => {
|
|
223
221
|
switch (action.type) {
|
|
224
222
|
case _action_type.SHIFT.SET_REF:
|
|
225
223
|
return setRef(state, action);
|
|
@@ -14,9 +14,7 @@ const resetAll = (state, action) => {
|
|
|
14
14
|
const newState = action.payload;
|
|
15
15
|
return Object.assign({}, state, newState);
|
|
16
16
|
};
|
|
17
|
-
const simulatioinReducer =
|
|
18
|
-
let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;
|
|
19
|
-
let action = arguments.length > 1 ? arguments[1] : undefined;
|
|
17
|
+
const simulatioinReducer = (state = initialState, action) => {
|
|
20
18
|
switch (action.type) {
|
|
21
19
|
case _action_type.SIMULATION.RESET_ALL_RDC:
|
|
22
20
|
return resetAll(state, action);
|
|
@@ -10,9 +10,7 @@ var _action_type = require("../constants/action_type");
|
|
|
10
10
|
const initialState = {
|
|
11
11
|
btnSubmit: false
|
|
12
12
|
};
|
|
13
|
-
const statusReducer =
|
|
14
|
-
let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;
|
|
15
|
-
let action = arguments.length > 1 ? arguments[1] : undefined;
|
|
13
|
+
const statusReducer = (state = initialState, action) => {
|
|
16
14
|
switch (action.type) {
|
|
17
15
|
case _action_type.STATUS.TOGGLEBTNSUBMIT:
|
|
18
16
|
return Object.assign({}, state, {
|
|
@@ -20,9 +20,7 @@ const initialState = {
|
|
|
20
20
|
const updateOperation = action => ({
|
|
21
21
|
operation: action.payload || initialState.operation
|
|
22
22
|
});
|
|
23
|
-
const submitReducer =
|
|
24
|
-
let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;
|
|
25
|
-
let action = arguments.length > 1 ? arguments[1] : undefined;
|
|
23
|
+
const submitReducer = (state = initialState, action) => {
|
|
26
24
|
switch (action.type) {
|
|
27
25
|
case _action_type.SUBMIT.TOGGLE_IS_ASCEND:
|
|
28
26
|
return Object.assign({}, state, {
|