@complat/react-spectra-editor 1.0.0-rc2 → 1.0.0-rc20.patch-1
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/README.md +16 -0
- package/dist/__tests__/fixtures/aif_jcamp_1.js +136 -0
- package/dist/__tests__/fixtures/aif_jcamp_2.js +122 -0
- package/dist/__tests__/fixtures/backup/nmr1h_a.js +3518 -0
- package/dist/__tests__/fixtures/backup/xrd_jcamp_1.js +10705 -0
- package/dist/__tests__/fixtures/cds_jcamp.js +861 -0
- package/dist/__tests__/fixtures/compare_ir_1_jcamp.js +585 -0
- package/dist/__tests__/fixtures/compare_ir_2_jcamp.js +515 -0
- package/dist/__tests__/fixtures/compare_uv_vis_jcamp.js +640 -0
- package/dist/__tests__/fixtures/cyclic_voltammetry_1.js +778 -0
- package/dist/__tests__/fixtures/cyclic_voltammetry_2.js +758 -0
- package/dist/__tests__/fixtures/cyclic_voltammetry_3.js +759 -0
- package/dist/__tests__/fixtures/dls_acf_jcamp.js +148 -0
- package/dist/__tests__/fixtures/dls_intensity_jcamp.js +151 -0
- package/dist/__tests__/fixtures/emissions_jcamp.js +883 -0
- package/dist/__tests__/fixtures/hplc_uvvis_jcamp.js +638 -0
- package/dist/__tests__/fixtures/hplc_uvvis_jcamp_2.js +221 -0
- package/dist/__tests__/fixtures/ir_jcamp.js +148 -0
- package/dist/__tests__/fixtures/ir_result.js +46 -0
- package/dist/__tests__/fixtures/ir_svg.js +8 -0
- package/dist/__tests__/fixtures/ms_jcamp.js +64 -0
- package/dist/__tests__/fixtures/nmr13c_dept_jcamp.js +3543 -0
- package/dist/__tests__/fixtures/nmr13c_jcamp.js +1229 -0
- package/dist/__tests__/fixtures/nmr15n_jcamp.js +7177 -0
- package/dist/__tests__/fixtures/nmr19f_jcamp.js +6560 -0
- package/dist/__tests__/fixtures/nmr1h_2_jcamp.js +2005 -0
- package/dist/__tests__/fixtures/nmr1h_jcamp.js +4516 -0
- package/dist/__tests__/fixtures/nmr29si_jcamp.js +3029 -0
- package/dist/__tests__/fixtures/nmr31p_jcamp.js +3418 -0
- package/dist/__tests__/fixtures/nmr_result.js +68 -0
- package/dist/__tests__/fixtures/nmr_svg.js +8 -0
- package/dist/__tests__/fixtures/phenylalanin.js +142 -0
- package/dist/__tests__/fixtures/qDescValue.js +65 -0
- package/dist/__tests__/fixtures/raman_jcamp.js +410 -0
- package/dist/__tests__/fixtures/sec_1_jcamp.js +425 -0
- package/dist/__tests__/fixtures/sec_2_jcamp.js +407 -0
- package/dist/__tests__/fixtures/sec_3_jcamp.js +408 -0
- package/dist/__tests__/fixtures/sec_4_jcamp.js +407 -0
- package/dist/__tests__/fixtures/tga_jcamp.js +4157 -0
- package/dist/__tests__/fixtures/uv_vis_jcamp.js +249 -0
- package/dist/__tests__/fixtures/xrd_jcamp_1.js +436 -0
- package/dist/__tests__/fixtures/xrd_jcamp_2.js +955 -0
- package/dist/__tests__/fixtures/xrd_jcamp_3.js +1871 -0
- package/dist/__tests__/units/components/panel/graph_selection.test.js +72 -0
- package/dist/__tests__/units/components/panel/peaks.test.js +87 -0
- package/dist/actions/curve.js +15 -14
- package/dist/actions/cyclic_voltammetry.js +40 -60
- package/dist/actions/edit_peak.js +8 -12
- package/dist/actions/forecast.js +16 -24
- package/dist/actions/integration.js +12 -18
- package/dist/actions/jcamp.js +16 -24
- package/dist/actions/layout.js +4 -6
- package/dist/actions/manager.js +20 -30
- package/dist/actions/meta.js +4 -6
- package/dist/actions/multiplicity.js +24 -36
- package/dist/actions/scan.js +12 -18
- package/dist/actions/shift.js +8 -12
- package/dist/actions/status.js +12 -18
- package/dist/actions/submit.js +16 -24
- package/dist/actions/threshold.js +20 -30
- package/dist/actions/ui.js +25 -31
- package/dist/actions/wavelength.js +4 -6
- package/dist/app.js +25 -23
- package/dist/components/cmd_bar/01_viewer.js +24 -34
- package/dist/components/cmd_bar/02_zoom.js +18 -28
- package/dist/components/cmd_bar/03_peak.js +50 -66
- package/dist/components/cmd_bar/04_integration.js +70 -84
- package/dist/components/cmd_bar/05_multiplicity.js +42 -56
- package/dist/components/cmd_bar/06_undo_redo.js +22 -36
- package/dist/components/cmd_bar/07_pecker.js +24 -34
- package/dist/components/cmd_bar/common.js +11 -7
- package/dist/components/cmd_bar/index.js +17 -23
- package/dist/components/cmd_bar/r01_layout.js +79 -56
- package/dist/components/cmd_bar/r02_scan.js +70 -87
- package/dist/components/cmd_bar/r03_threshold.js +54 -68
- package/dist/components/cmd_bar/r04_submit.js +71 -83
- package/dist/components/cmd_bar/r05_submit_btn.js +64 -72
- package/dist/components/cmd_bar/r06_predict_btn.js +142 -152
- package/dist/components/cmd_bar/r07_wavelength_btn.js +28 -36
- package/dist/components/cmd_bar/tri_btn.js +91 -113
- package/dist/components/common/chem.js +2 -3
- package/dist/components/common/comps.js +2 -2
- package/dist/components/common/draw.js +30 -11
- package/dist/components/d3_line/index.js +154 -176
- package/dist/components/d3_line/line_focus.js +595 -739
- package/dist/components/d3_multi/index.js +153 -174
- package/dist/components/d3_multi/multi_focus.js +725 -850
- package/dist/components/d3_rect/index.js +112 -134
- package/dist/components/d3_rect/rect_focus.js +163 -208
- package/dist/components/forecast/comps.js +60 -68
- package/dist/components/forecast/ir_comps.js +49 -56
- package/dist/components/forecast/ir_viewer.js +61 -68
- package/dist/components/forecast/nmr_comps.js +62 -72
- package/dist/components/forecast/nmr_viewer.js +59 -68
- package/dist/components/forecast/section_loading.js +39 -63
- package/dist/components/forecast_viewer.js +109 -119
- package/dist/components/multi_jcamps_viewer.js +97 -113
- package/dist/components/panel/compare.js +183 -192
- package/dist/components/panel/cyclic_voltamery_data.js +149 -165
- package/dist/components/panel/graph_selection.js +143 -132
- package/dist/components/panel/index.js +112 -144
- package/dist/components/panel/info.js +125 -132
- package/dist/components/panel/multiplicity.js +215 -223
- package/dist/components/panel/multiplicity_coupling.js +108 -136
- package/dist/components/panel/multiplicity_select.js +43 -51
- package/dist/components/panel/peaks.js +130 -132
- package/dist/constants/action_type.js +23 -39
- package/dist/constants/list_layout.js +7 -4
- package/dist/constants/list_shift.js +117 -103
- package/dist/constants/list_ui.js +3 -6
- package/dist/constants/list_wavelength.js +7 -8
- package/dist/fn.js +2 -3
- package/dist/helpers/brush.js +49 -65
- package/dist/helpers/calc.js +2 -4
- package/dist/helpers/carbonFeatures.js +22 -20
- package/dist/helpers/cfg.js +49 -67
- package/dist/helpers/chem.js +450 -393
- package/dist/helpers/compass.js +92 -83
- package/dist/helpers/converter.js +52 -65
- package/dist/helpers/extractParams.js +60 -52
- package/dist/helpers/extractPeaksEdit.js +29 -25
- package/dist/helpers/focus.js +2 -6
- package/dist/helpers/format.js +416 -361
- package/dist/helpers/init.js +41 -37
- package/dist/helpers/integration.js +18 -21
- package/dist/helpers/mount.js +57 -61
- package/dist/helpers/multiplicity.js +19 -24
- package/dist/helpers/multiplicity_calc.js +39 -50
- package/dist/helpers/multiplicity_complat.js +21 -47
- package/dist/helpers/multiplicity_manual.js +49 -55
- package/dist/helpers/multiplicity_verify_basic.js +108 -111
- package/dist/helpers/shift.js +15 -23
- package/dist/helpers/zoom.js +7 -11
- package/dist/index.js +680 -630
- package/dist/layer_content.js +40 -43
- package/dist/layer_init.js +162 -184
- package/dist/layer_prism.js +38 -41
- package/dist/reducers/index.js +2 -3
- package/dist/reducers/reducer_curve.js +35 -26
- package/dist/reducers/reducer_edit_peak.js +122 -98
- package/dist/reducers/reducer_forecast.js +57 -44
- package/dist/reducers/reducer_integration.js +135 -103
- package/dist/reducers/reducer_jcamp.js +49 -44
- package/dist/reducers/reducer_layout.js +5 -6
- package/dist/reducers/reducer_manager.js +5 -6
- package/dist/reducers/reducer_meta.js +5 -6
- package/dist/reducers/reducer_multiplicity.js +100 -77
- package/dist/reducers/reducer_scan.js +17 -20
- package/dist/reducers/reducer_shift.js +115 -70
- package/dist/reducers/reducer_simulation.js +7 -8
- package/dist/reducers/reducer_status.js +5 -6
- package/dist/reducers/reducer_submit.js +12 -15
- package/dist/reducers/reducer_threshold.js +5 -6
- package/dist/reducers/reducer_ui.js +5 -6
- package/dist/reducers/reducer_voltammetry.js +156 -96
- package/dist/reducers/reducer_wavelength.js +5 -6
- package/dist/reducers/undo_redo_config.js +3 -5
- package/dist/sagas/index.js +2 -15
- package/dist/sagas/saga_edit_peak.js +54 -68
- package/dist/sagas/saga_manager.js +86 -130
- package/dist/sagas/saga_meta.js +25 -31
- package/dist/sagas/saga_multi_entities.js +40 -103
- package/dist/sagas/saga_multiplicity.js +336 -406
- package/dist/sagas/saga_ui.js +296 -475
- package/dist/setupTests.js +8 -0
- package/dist/third_party/jAnalyzer.js +66 -67
- package/dist/third_party/peakInterval.js +34 -34
- package/package.json +14 -14
- package/dist/components/cmd_bar/03_peak_bk.js +0 -139
- package/dist/components/cmd_bar/04_integration_bk.js +0 -180
- package/dist/components/cmd_bar/05_multiplicity_bk.js +0 -131
- package/dist/components/cmd_bar/r01_layout_bk.js +0 -186
- package/dist/components/cmd_bar/r06_predict_btn_bk.js +0 -220
- package/dist/components/d3_line/line_focus_bk.js +0 -825
- package/dist/components/d3_multi/index_bk.js +0 -210
- package/dist/components/d3_multi/multi_focus_bk.js +0 -533
- package/dist/components/panel/compare_bk.js +0 -256
- package/dist/components/panel/cyclic_voltamery_data_bk.js +0 -292
- package/dist/components/panel/index_bk.js +0 -178
- package/dist/components/panel/info_bk.js +0 -235
- package/dist/components/panel/multiplicity_bk.js +0 -280
- package/dist/helpers/carbonFeatures_bk.js +0 -45
- package/dist/helpers/cfg_bk.js +0 -80
- package/dist/helpers/chem_bk.js +0 -787
- package/dist/helpers/compass_bk.js +0 -149
- package/dist/helpers/converter_bk.js +0 -96
- package/dist/helpers/extractPeaksEdit_bk.js +0 -53
- package/dist/helpers/format_bk.js +0 -497
- package/dist/index_bk.js +0 -640
- package/dist/layer_content_bk.js +0 -105
- package/dist/layer_init_bk.js +0 -235
- package/dist/layer_prism_bk.js +0 -133
- package/dist/reducers/reducer_edit_peak_bk.js +0 -108
- package/dist/reducers/reducer_integration_bk.js +0 -134
- package/dist/reducers/reducer_jcamp_bk.js +0 -71
- package/dist/reducers/reducer_multiplicity_bk.js +0 -126
- package/dist/reducers/reducer_shift_bk.js +0 -88
- package/dist/reducers/reducer_voltammetry_bk.js +0 -287
- package/dist/sagas/saga_edit_peak_bk.js +0 -73
- package/dist/sagas/saga_multi_entities_bk.js +0 -106
- package/dist/sagas/saga_multiplicity_bk.js +0 -351
- package/dist/sagas/saga_ui_bk.js +0 -453
|
@@ -24,23 +24,21 @@ var _format = _interopRequireDefault(require("../../helpers/format"));
|
|
|
24
24
|
/* eslint-disable prefer-object-spread, function-paren-newline,
|
|
25
25
|
react/function-component-definition */
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
};
|
|
43
|
-
var ascendSelect = function ascendSelect(classes, hideSwitch, isAscendSt, toggleIsAscendAct) {
|
|
27
|
+
const styles = () => Object.assign({
|
|
28
|
+
fieldOrder: {
|
|
29
|
+
width: 90
|
|
30
|
+
},
|
|
31
|
+
fieldIntensity: {
|
|
32
|
+
width: 90
|
|
33
|
+
},
|
|
34
|
+
fieldDecimal: {
|
|
35
|
+
width: 80
|
|
36
|
+
},
|
|
37
|
+
fieldOpertaion: {
|
|
38
|
+
width: 120
|
|
39
|
+
}
|
|
40
|
+
}, _common.commonStyle);
|
|
41
|
+
const ascendSelect = (classes, hideSwitch, isAscendSt, toggleIsAscendAct) => {
|
|
44
42
|
if (hideSwitch) return null;
|
|
45
43
|
return /*#__PURE__*/_react.default.createElement(_FormControl.default, {
|
|
46
44
|
className: (0, _classnames.default)(classes.fieldOrder),
|
|
@@ -66,7 +64,7 @@ var ascendSelect = function ascendSelect(classes, hideSwitch, isAscendSt, toggle
|
|
|
66
64
|
className: (0, _classnames.default)(classes.txtOpt, 'option-sv-bar-descend')
|
|
67
65
|
}, "Descend"))));
|
|
68
66
|
};
|
|
69
|
-
|
|
67
|
+
const intensitySelect = (classes, hideSwitch, isIntensitySt, toggleIsIntensityAct) => {
|
|
70
68
|
if (hideSwitch) return null;
|
|
71
69
|
return /*#__PURE__*/_react.default.createElement(_FormControl.default, {
|
|
72
70
|
className: (0, _classnames.default)(classes.fieldIntensity),
|
|
@@ -92,17 +90,15 @@ var intensitySelect = function intensitySelect(classes, hideSwitch, isIntensityS
|
|
|
92
90
|
className: (0, _classnames.default)(classes.txtOpt, 'option-sv-bar-hide')
|
|
93
91
|
}, "Hide"))));
|
|
94
92
|
};
|
|
95
|
-
|
|
93
|
+
const decimalSelect = (classes, hideSwitch, decimalSt, updateDecimalAct) => {
|
|
96
94
|
if (hideSwitch) return null;
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}, d));
|
|
105
|
-
});
|
|
95
|
+
const decimals = [0, 1, 2, 3, 4];
|
|
96
|
+
const options = decimals.map(d => /*#__PURE__*/_react.default.createElement(_MenuItem.default, {
|
|
97
|
+
value: d,
|
|
98
|
+
key: d
|
|
99
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
100
|
+
className: (0, _classnames.default)(classes.txtOpt, 'option-sv-bar-decimal')
|
|
101
|
+
}, d)));
|
|
106
102
|
return /*#__PURE__*/_react.default.createElement(_FormControl.default, {
|
|
107
103
|
className: (0, _classnames.default)(classes.fieldDecimal),
|
|
108
104
|
variant: "outlined"
|
|
@@ -117,16 +113,14 @@ var decimalSelect = function decimalSelect(classes, hideSwitch, decimalSt, updat
|
|
|
117
113
|
})
|
|
118
114
|
}, options));
|
|
119
115
|
};
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
});
|
|
129
|
-
var selectedValue = operation.name || operations[0].name;
|
|
116
|
+
const operationSelect = (classes, operations, operation, onChangeSelect) => {
|
|
117
|
+
const options = operations.map(o => /*#__PURE__*/_react.default.createElement(_MenuItem.default, {
|
|
118
|
+
value: o.name,
|
|
119
|
+
key: o.name
|
|
120
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
121
|
+
className: (0, _classnames.default)(classes.txtOpt, 'option-sv-bar-operation')
|
|
122
|
+
}, o.name)));
|
|
123
|
+
const selectedValue = operation.name || operations[0].name;
|
|
130
124
|
return /*#__PURE__*/_react.default.createElement(_FormControl.default, {
|
|
131
125
|
className: (0, _classnames.default)(classes.fieldOpertaion),
|
|
132
126
|
variant: "outlined"
|
|
@@ -141,35 +135,35 @@ var operationSelect = function operationSelect(classes, operations, operation, o
|
|
|
141
135
|
})
|
|
142
136
|
}, options));
|
|
143
137
|
};
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
operations.forEach(
|
|
138
|
+
const selectOperation = (name, operations, updateOperationAct) => {
|
|
139
|
+
let operation = false;
|
|
140
|
+
operations.forEach(o => {
|
|
147
141
|
if (o.name === name) {
|
|
148
142
|
operation = o;
|
|
149
143
|
}
|
|
150
144
|
});
|
|
151
145
|
updateOperationAct(operation);
|
|
152
146
|
};
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
147
|
+
const Submit = _ref => {
|
|
148
|
+
let {
|
|
149
|
+
operations,
|
|
150
|
+
classes,
|
|
151
|
+
feature,
|
|
152
|
+
forecast,
|
|
153
|
+
editorOnly,
|
|
154
|
+
hideSwitch,
|
|
155
|
+
disabled,
|
|
156
|
+
isAscendSt,
|
|
157
|
+
isIntensitySt,
|
|
158
|
+
operationSt,
|
|
159
|
+
decimalSt,
|
|
160
|
+
isEmWaveSt,
|
|
161
|
+
toggleIsAscendAct,
|
|
162
|
+
toggleIsIntensityAct,
|
|
163
|
+
updateOperationAct,
|
|
164
|
+
updateDecimalAct
|
|
165
|
+
} = _ref;
|
|
166
|
+
const onChangeSelect = e => selectOperation(e.target.value, operations, updateOperationAct);
|
|
173
167
|
if (!operations || operations.length === 0) return null;
|
|
174
168
|
return /*#__PURE__*/_react.default.createElement("span", {
|
|
175
169
|
className: classes.groupRightMost
|
|
@@ -184,26 +178,21 @@ var Submit = function Submit(_ref) {
|
|
|
184
178
|
disabled: disabled
|
|
185
179
|
}));
|
|
186
180
|
};
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
toggleIsIntensityAct: _submit.toggleIsIntensity,
|
|
203
|
-
updateOperationAct: _submit.updateOperation,
|
|
204
|
-
updateDecimalAct: _submit.updateDecimal
|
|
205
|
-
}, dispatch);
|
|
206
|
-
};
|
|
181
|
+
const mapStateToProps = (state, props) => (
|
|
182
|
+
// eslint-disable-line
|
|
183
|
+
{
|
|
184
|
+
isEmWaveSt: _format.default.isEmWaveLayout(state.layout),
|
|
185
|
+
isAscendSt: state.submit.isAscend,
|
|
186
|
+
isIntensitySt: state.submit.isIntensity,
|
|
187
|
+
decimalSt: state.submit.decimal,
|
|
188
|
+
operationSt: state.submit.operation
|
|
189
|
+
});
|
|
190
|
+
const mapDispatchToProps = dispatch => (0, _redux.bindActionCreators)({
|
|
191
|
+
toggleIsAscendAct: _submit.toggleIsAscend,
|
|
192
|
+
toggleIsIntensityAct: _submit.toggleIsIntensity,
|
|
193
|
+
updateOperationAct: _submit.updateOperation,
|
|
194
|
+
updateDecimalAct: _submit.updateDecimal
|
|
195
|
+
}, dispatch);
|
|
207
196
|
Submit.propTypes = {
|
|
208
197
|
classes: _propTypes.default.object.isRequired,
|
|
209
198
|
feature: _propTypes.default.object.isRequired,
|
|
@@ -222,5 +211,4 @@ Submit.propTypes = {
|
|
|
222
211
|
updateOperationAct: _propTypes.default.func.isRequired,
|
|
223
212
|
updateDecimalAct: _propTypes.default.func.isRequired
|
|
224
213
|
};
|
|
225
|
-
var _default = (0, _redux.compose)((0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps), (0, _styles.withStyles)(styles))(Submit);
|
|
226
|
-
exports.default = _default;
|
|
214
|
+
var _default = exports.default = (0, _redux.compose)((0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps), (0, _styles.withStyles)(styles))(Submit);
|
|
@@ -20,55 +20,53 @@ var _extractPeaksEdit = require("../../helpers/extractPeaksEdit");
|
|
|
20
20
|
react/function-component-definition, function-call-argument-newline,
|
|
21
21
|
react/require-default-props */
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
const styles = () => Object.assign({}, _common.commonStyle);
|
|
24
|
+
const onClickCb = (operation, peaksEdit, isAscend, isIntensity, scan, thres, layoutSt, shiftSt, analysis, decimalSt, integrationSt, multiplicitySt, allIntegrationSt, aucValues, waveLengthSt, cyclicvoltaSt, curveSt) => () => {
|
|
25
|
+
operation({
|
|
26
|
+
peaks: peaksEdit,
|
|
27
|
+
layout: layoutSt,
|
|
28
|
+
shift: shiftSt,
|
|
29
|
+
scan,
|
|
30
|
+
thres,
|
|
31
|
+
isAscend,
|
|
32
|
+
isIntensity,
|
|
33
|
+
analysis,
|
|
34
|
+
decimal: decimalSt,
|
|
35
|
+
integration: integrationSt,
|
|
36
|
+
multiplicity: multiplicitySt,
|
|
37
|
+
allIntegration: allIntegrationSt,
|
|
38
|
+
aucValues,
|
|
39
|
+
waveLength: waveLengthSt,
|
|
40
|
+
cyclicvoltaSt,
|
|
41
|
+
curveSt
|
|
42
|
+
});
|
|
25
43
|
};
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
var BtnSubmit = function BtnSubmit(_ref) {
|
|
49
|
-
var classes = _ref.classes,
|
|
50
|
-
operation = _ref.operation,
|
|
51
|
-
feature = _ref.feature,
|
|
52
|
-
isAscend = _ref.isAscend,
|
|
53
|
-
isIntensity = _ref.isIntensity,
|
|
54
|
-
editPeakSt = _ref.editPeakSt,
|
|
55
|
-
thresSt = _ref.thresSt,
|
|
56
|
-
layoutSt = _ref.layoutSt,
|
|
57
|
-
shiftSt = _ref.shiftSt,
|
|
58
|
-
scanSt = _ref.scanSt,
|
|
59
|
-
forecastSt = _ref.forecastSt,
|
|
60
|
-
decimalSt = _ref.decimalSt,
|
|
61
|
-
integrationSt = _ref.integrationSt,
|
|
62
|
-
multiplicitySt = _ref.multiplicitySt,
|
|
63
|
-
allIntegrationSt = _ref.allIntegrationSt,
|
|
64
|
-
waveLengthSt = _ref.waveLengthSt,
|
|
65
|
-
cyclicvoltaSt = _ref.cyclicvoltaSt,
|
|
66
|
-
curveSt = _ref.curveSt;
|
|
67
|
-
var peaksEdit = (0, _extractPeaksEdit.extractPeaksEdit)(feature, editPeakSt, thresSt, shiftSt, layoutSt);
|
|
44
|
+
const BtnSubmit = _ref => {
|
|
45
|
+
let {
|
|
46
|
+
classes,
|
|
47
|
+
operation,
|
|
48
|
+
feature,
|
|
49
|
+
isAscend,
|
|
50
|
+
isIntensity,
|
|
51
|
+
editPeakSt,
|
|
52
|
+
thresSt,
|
|
53
|
+
layoutSt,
|
|
54
|
+
shiftSt,
|
|
55
|
+
scanSt,
|
|
56
|
+
forecastSt,
|
|
57
|
+
decimalSt,
|
|
58
|
+
integrationSt,
|
|
59
|
+
multiplicitySt,
|
|
60
|
+
allIntegrationSt,
|
|
61
|
+
waveLengthSt,
|
|
62
|
+
cyclicvoltaSt,
|
|
63
|
+
curveSt
|
|
64
|
+
} = _ref;
|
|
65
|
+
const peaksEdit = (0, _extractPeaksEdit.extractPeaksEdit)(feature, editPeakSt, thresSt, shiftSt, layoutSt);
|
|
68
66
|
// const disBtn = peaksEdit.length === 0 || statusSt.btnSubmit || disabled;
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
67
|
+
const scan = (0, _chem.Convert2Scan)(feature, scanSt);
|
|
68
|
+
const thres = (0, _chem.Convert2Thres)(feature, thresSt);
|
|
69
|
+
const aucValues = (0, _extractPeaksEdit.extractAreaUnderCurve)(allIntegrationSt, integrationSt, layoutSt);
|
|
72
70
|
if (!operation) return null;
|
|
73
71
|
return /*#__PURE__*/_react.default.createElement(_Tooltip.default, {
|
|
74
72
|
title: /*#__PURE__*/_react.default.createElement("span", {
|
|
@@ -82,29 +80,24 @@ var BtnSubmit = function BtnSubmit(_ref) {
|
|
|
82
80
|
className: classes.icon
|
|
83
81
|
})));
|
|
84
82
|
};
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
);
|
|
104
|
-
};
|
|
105
|
-
var mapDispatchToProps = function mapDispatchToProps(dispatch) {
|
|
106
|
-
return (0, _redux.bindActionCreators)({}, dispatch);
|
|
107
|
-
};
|
|
83
|
+
const mapStateToProps = (state, props) => (
|
|
84
|
+
// eslint-disable-line
|
|
85
|
+
{
|
|
86
|
+
editPeakSt: state.editPeak.present,
|
|
87
|
+
thresSt: state.threshold,
|
|
88
|
+
layoutSt: state.layout,
|
|
89
|
+
shiftSt: state.shift,
|
|
90
|
+
scanSt: state.scan,
|
|
91
|
+
forecastSt: state.forecast,
|
|
92
|
+
decimalSt: state.submit.decimal,
|
|
93
|
+
integrationSt: state.integration.present,
|
|
94
|
+
multiplicitySt: state.multiplicity.present,
|
|
95
|
+
allIntegrationSt: state.integration.past.concat(state.integration.present),
|
|
96
|
+
waveLengthSt: state.wavelength,
|
|
97
|
+
cyclicvoltaSt: state.cyclicvolta,
|
|
98
|
+
curveSt: state.curve
|
|
99
|
+
});
|
|
100
|
+
const mapDispatchToProps = dispatch => (0, _redux.bindActionCreators)({}, dispatch);
|
|
108
101
|
BtnSubmit.propTypes = {
|
|
109
102
|
classes: _propTypes.default.object.isRequired,
|
|
110
103
|
feature: _propTypes.default.object.isRequired,
|
|
@@ -125,5 +118,4 @@ BtnSubmit.propTypes = {
|
|
|
125
118
|
cyclicvoltaSt: _propTypes.default.object.isRequired,
|
|
126
119
|
curveSt: _propTypes.default.object
|
|
127
120
|
};
|
|
128
|
-
var _default = (0, _redux.compose)((0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps), (0, _styles.withStyles)(styles))(BtnSubmit);
|
|
129
|
-
exports.default = _default;
|
|
121
|
+
var _default = exports.default = (0, _redux.compose)((0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps), (0, _styles.withStyles)(styles))(BtnSubmit);
|