@complat/react-spectra-editor 1.3.5 → 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 +45 -45
- 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 +44 -38
- 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 +43 -39
- package/dist/components/panel/info.js +203 -156
- 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 +12 -11
- package/dist/layer_prism.js +83 -72
- 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
|
@@ -18,6 +18,7 @@ var _RefreshOutlined = _interopRequireDefault(require("@mui/icons-material/Refre
|
|
|
18
18
|
var _cfg = _interopRequireDefault(require("../../helpers/cfg"));
|
|
19
19
|
var _threshold = require("../../actions/threshold");
|
|
20
20
|
var _common = require("./common");
|
|
21
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
22
|
/* eslint-disable prefer-object-spread, function-paren-newline,
|
|
22
23
|
react/function-component-definition */
|
|
23
24
|
|
|
@@ -27,90 +28,114 @@ const styles = () => Object.assign({
|
|
|
27
28
|
},
|
|
28
29
|
txtIcon: {}
|
|
29
30
|
}, _common.commonStyle);
|
|
30
|
-
const txtPercent = () => /*#__PURE__*/
|
|
31
|
-
position: "end"
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
31
|
+
const txtPercent = () => /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.InputAdornment, {
|
|
32
|
+
position: "end",
|
|
33
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
34
|
+
className: "txt-percent",
|
|
35
|
+
children: "%"
|
|
36
|
+
})
|
|
37
|
+
});
|
|
38
|
+
const setThreshold = (classes, thresVal, updateThresholdValueAct, curveSt) => {
|
|
39
|
+
const {
|
|
40
|
+
curveIdx
|
|
41
|
+
} = curveSt;
|
|
42
|
+
const onBlur = e => updateThresholdValueAct({
|
|
43
|
+
value: e.target.value,
|
|
44
|
+
curveIdx
|
|
45
|
+
});
|
|
46
|
+
const onChange = e => updateThresholdValueAct({
|
|
47
|
+
value: e.target.value,
|
|
48
|
+
curveIdx
|
|
49
|
+
});
|
|
38
50
|
const onEnterPress = e => {
|
|
39
51
|
if (e.key === 'Enter') {
|
|
40
|
-
updateThresholdValueAct(
|
|
52
|
+
updateThresholdValueAct({
|
|
53
|
+
value: e.target.value,
|
|
54
|
+
curveIdx
|
|
55
|
+
});
|
|
41
56
|
}
|
|
42
57
|
};
|
|
43
|
-
return /*#__PURE__*/
|
|
44
|
-
variant: "outlined"
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
58
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.FormControl, {
|
|
59
|
+
variant: "outlined",
|
|
60
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.TextField, {
|
|
61
|
+
className: classes.field,
|
|
62
|
+
id: "outlined-name",
|
|
63
|
+
placeholder: "N.A.",
|
|
64
|
+
type: "number",
|
|
65
|
+
value: thresVal || 0.01,
|
|
66
|
+
margin: "none",
|
|
67
|
+
InputProps: {
|
|
68
|
+
endAdornment: txtPercent(),
|
|
69
|
+
className: (0, _classnames.default)(classes.txtInput, 'txtfield-sv-bar-input'),
|
|
70
|
+
inputProps: {
|
|
71
|
+
min: 0.01
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
onChange: onChange,
|
|
75
|
+
onBlur: onBlur,
|
|
76
|
+
onKeyPress: onEnterPress,
|
|
77
|
+
variant: "outlined"
|
|
78
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.InputLabel, {
|
|
79
|
+
className: (0, _classnames.default)(classes.txtLabelBottomInput),
|
|
80
|
+
children: "Threshold"
|
|
81
|
+
})]
|
|
82
|
+
});
|
|
66
83
|
};
|
|
67
|
-
const restoreIcon = (classes, hasEdit, isEdit) => hasEdit && isEdit ? /*#__PURE__*/
|
|
84
|
+
const restoreIcon = (classes, hasEdit, isEdit) => hasEdit && isEdit ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_HowToRegOutlined.default, {
|
|
68
85
|
className: classes.icon
|
|
69
|
-
}) : /*#__PURE__*/
|
|
86
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_CloudDoneOutlined.default, {
|
|
70
87
|
className: classes.icon
|
|
71
88
|
});
|
|
72
89
|
const restoreTp = (hasEdit, isEdit) => hasEdit && isEdit ? 'User Defined Threshold' : 'Auto Picked Threshold';
|
|
73
|
-
const Threshold =
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
90
|
+
const Threshold = ({
|
|
91
|
+
classes,
|
|
92
|
+
feature,
|
|
93
|
+
hasEdit,
|
|
94
|
+
hideThresSt,
|
|
95
|
+
thresValSt,
|
|
96
|
+
isEditSt,
|
|
97
|
+
curveSt,
|
|
98
|
+
updateThresholdValueAct,
|
|
99
|
+
resetThresholdValueAct,
|
|
100
|
+
toggleThresholdIsEditAct
|
|
101
|
+
}) => {
|
|
85
102
|
const thresVal = thresValSt || feature.thresRef;
|
|
86
|
-
return /*#__PURE__*/
|
|
87
|
-
className: classes.groupRight
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
},
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
103
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
104
|
+
className: classes.groupRight,
|
|
105
|
+
children: [setThreshold(classes, thresVal, updateThresholdValueAct, curveSt), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Tooltip, {
|
|
106
|
+
title: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
107
|
+
className: "txt-sv-tp",
|
|
108
|
+
children: "Restore Threshold"
|
|
109
|
+
}),
|
|
110
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_common.MuButton, {
|
|
111
|
+
className: (0, _classnames.default)('btn-sv-bar-thresref'),
|
|
112
|
+
disabled: _cfg.default.btnCmdThres(thresVal),
|
|
113
|
+
onClick: resetThresholdValueAct,
|
|
114
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_RefreshOutlined.default, {
|
|
115
|
+
className: classes.icon
|
|
116
|
+
})
|
|
117
|
+
})
|
|
118
|
+
}), hideThresSt ? null : /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Tooltip, {
|
|
119
|
+
title: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
120
|
+
className: "txt-sv-tp",
|
|
121
|
+
children: restoreTp(hasEdit, isEditSt)
|
|
122
|
+
}),
|
|
123
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_common.MuButton, {
|
|
124
|
+
className: (0, _classnames.default)('btn-sv-bar-thresrst'),
|
|
125
|
+
disabled: _cfg.default.btnCmdThres(thresVal),
|
|
126
|
+
onClick: toggleThresholdIsEditAct,
|
|
127
|
+
children: restoreIcon(classes, hasEdit, isEditSt)
|
|
128
|
+
})
|
|
129
|
+
})]
|
|
130
|
+
});
|
|
107
131
|
};
|
|
108
132
|
const mapStateToProps = (state, props) => (
|
|
109
133
|
// eslint-disable-line
|
|
110
134
|
{
|
|
111
135
|
hideThresSt: _cfg.default.hideCmdThres(state.layout),
|
|
112
|
-
isEditSt: state.threshold.isEdit,
|
|
113
|
-
thresValSt: parseFloat(state.threshold.value) || 0
|
|
136
|
+
isEditSt: state.threshold.list[state.curve.curveIdx].isEdit,
|
|
137
|
+
thresValSt: parseFloat(state.threshold.list[state.curve.curveIdx].value) || 0,
|
|
138
|
+
curveSt: state.curve
|
|
114
139
|
});
|
|
115
140
|
const mapDispatchToProps = dispatch => (0, _redux.bindActionCreators)({
|
|
116
141
|
updateThresholdValueAct: _threshold.updateThresholdValue,
|
|
@@ -124,6 +149,7 @@ Threshold.propTypes = {
|
|
|
124
149
|
hideThresSt: _propTypes.default.bool.isRequired,
|
|
125
150
|
isEditSt: _propTypes.default.bool.isRequired,
|
|
126
151
|
thresValSt: _propTypes.default.number.isRequired,
|
|
152
|
+
curveSt: _propTypes.default.object.isRequired,
|
|
127
153
|
updateThresholdValueAct: _propTypes.default.func.isRequired,
|
|
128
154
|
resetThresholdValueAct: _propTypes.default.func.isRequired,
|
|
129
155
|
toggleThresholdIsEditAct: _propTypes.default.func.isRequired
|
|
@@ -17,6 +17,7 @@ var _r05_submit_btn = _interopRequireDefault(require("./r05_submit_btn"));
|
|
|
17
17
|
var _r06_predict_btn = _interopRequireDefault(require("./r06_predict_btn"));
|
|
18
18
|
var _common = require("./common");
|
|
19
19
|
var _format = _interopRequireDefault(require("../../helpers/format"));
|
|
20
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
21
|
/* eslint-disable prefer-object-spread, function-paren-newline,
|
|
21
22
|
react/function-component-definition */
|
|
22
23
|
|
|
@@ -36,124 +37,145 @@ const styles = () => Object.assign({
|
|
|
36
37
|
}, _common.commonStyle);
|
|
37
38
|
const ascendSelect = (classes, hideSwitch, isAscendSt, toggleIsAscendAct) => {
|
|
38
39
|
if (hideSwitch) return null;
|
|
39
|
-
return /*#__PURE__*/
|
|
40
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.FormControl, {
|
|
40
41
|
className: (0, _classnames.default)(classes.fieldOrder),
|
|
41
|
-
variant: "outlined"
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
42
|
+
variant: "outlined",
|
|
43
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.InputLabel, {
|
|
44
|
+
id: "select-sort-peaks-label",
|
|
45
|
+
className: (0, _classnames.default)(classes.selectLabel, 'select-sv-bar-label'),
|
|
46
|
+
children: "Write Peaks"
|
|
47
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Select, {
|
|
48
|
+
labelId: "select-sort-peaks-label",
|
|
49
|
+
label: "Write Peaks",
|
|
50
|
+
value: isAscendSt,
|
|
51
|
+
onChange: toggleIsAscendAct,
|
|
52
|
+
className: (0, _classnames.default)(classes.selectInput, 'input-sv-bar-order'),
|
|
53
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.MenuItem, {
|
|
54
|
+
value: true,
|
|
55
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
56
|
+
className: (0, _classnames.default)(classes.txtOpt, 'option-sv-bar-ascend'),
|
|
57
|
+
children: "Ascend"
|
|
58
|
+
})
|
|
59
|
+
}, "ascend"), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.MenuItem, {
|
|
60
|
+
value: false,
|
|
61
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
62
|
+
className: (0, _classnames.default)(classes.txtOpt, 'option-sv-bar-descend'),
|
|
63
|
+
children: "Descend"
|
|
64
|
+
})
|
|
65
|
+
}, "descend")]
|
|
66
|
+
})]
|
|
67
|
+
});
|
|
62
68
|
};
|
|
63
69
|
const intensitySelect = (classes, hideSwitch, isIntensitySt, toggleIsIntensityAct) => {
|
|
64
70
|
if (hideSwitch) return null;
|
|
65
|
-
return /*#__PURE__*/
|
|
71
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.FormControl, {
|
|
66
72
|
className: (0, _classnames.default)(classes.fieldIntensity),
|
|
67
|
-
variant: "outlined"
|
|
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
|
-
|
|
94
|
-
|
|
95
|
-
|
|
73
|
+
variant: "outlined",
|
|
74
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.InputLabel, {
|
|
75
|
+
id: "select-intensity-label",
|
|
76
|
+
className: (0, _classnames.default)(classes.selectLabel, 'select-sv-bar-label'),
|
|
77
|
+
children: "Write Intensity"
|
|
78
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Select, {
|
|
79
|
+
labelId: "select-intensity-label",
|
|
80
|
+
label: "Write Intensity",
|
|
81
|
+
value: isIntensitySt,
|
|
82
|
+
onChange: toggleIsIntensityAct,
|
|
83
|
+
className: (0, _classnames.default)(classes.selectInput, 'input-sv-bar-intensity')
|
|
84
|
+
// input={
|
|
85
|
+
// (
|
|
86
|
+
// <OutlinedInput
|
|
87
|
+
// className={classNames(classes.selectInput, 'input-sv-bar-intensity')}
|
|
88
|
+
// labelWidth={100}
|
|
89
|
+
// />
|
|
90
|
+
// )
|
|
91
|
+
// }
|
|
92
|
+
,
|
|
93
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.MenuItem, {
|
|
94
|
+
value: true,
|
|
95
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
96
|
+
className: (0, _classnames.default)(classes.txtOpt, 'option-sv-bar-show'),
|
|
97
|
+
children: "Show"
|
|
98
|
+
})
|
|
99
|
+
}, "ascend"), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.MenuItem, {
|
|
100
|
+
value: false,
|
|
101
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
102
|
+
className: (0, _classnames.default)(classes.txtOpt, 'option-sv-bar-hide'),
|
|
103
|
+
children: "Hide"
|
|
104
|
+
})
|
|
105
|
+
}, "descend")]
|
|
106
|
+
})]
|
|
107
|
+
});
|
|
96
108
|
};
|
|
97
109
|
const decimalSelect = (classes, hideSwitch, decimalSt, updateDecimalAct) => {
|
|
98
110
|
if (hideSwitch) return null;
|
|
99
111
|
const decimals = [0, 1, 2, 3, 4];
|
|
100
|
-
const options = decimals.map(d => /*#__PURE__*/
|
|
112
|
+
const options = decimals.map(d => /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.MenuItem, {
|
|
101
113
|
value: d,
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
114
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
115
|
+
className: (0, _classnames.default)(classes.txtOpt, 'option-sv-bar-decimal'),
|
|
116
|
+
children: d
|
|
117
|
+
})
|
|
118
|
+
}, d));
|
|
119
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.FormControl, {
|
|
107
120
|
className: (0, _classnames.default)(classes.fieldDecimal),
|
|
108
|
-
variant: "outlined"
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
121
|
+
variant: "outlined",
|
|
122
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.InputLabel, {
|
|
123
|
+
id: "select-decimal-label",
|
|
124
|
+
className: (0, _classnames.default)(classes.selectLabel, 'select-sv-bar-label'),
|
|
125
|
+
children: "Decimal"
|
|
126
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Select, {
|
|
127
|
+
labelId: "select-decimal-label",
|
|
128
|
+
label: "Decimal",
|
|
129
|
+
value: decimalSt,
|
|
130
|
+
onChange: updateDecimalAct,
|
|
131
|
+
className: (0, _classnames.default)(classes.selectInput, 'input-sv-bar-decimal')
|
|
132
|
+
// input={
|
|
133
|
+
// (
|
|
134
|
+
// <OutlinedInput
|
|
135
|
+
// className={classNames(classes.selectInput, 'input-sv-bar-decimal')}
|
|
136
|
+
// labelWidth={60}
|
|
137
|
+
// />
|
|
138
|
+
// )
|
|
139
|
+
// }
|
|
140
|
+
,
|
|
141
|
+
children: options
|
|
142
|
+
})]
|
|
143
|
+
});
|
|
127
144
|
};
|
|
128
145
|
const operationSelect = (classes, operations, operation, onChangeSelect) => {
|
|
129
|
-
const options = operations.map(o => /*#__PURE__*/
|
|
146
|
+
const options = operations.map(o => /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.MenuItem, {
|
|
130
147
|
value: o.name,
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
148
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
149
|
+
className: (0, _classnames.default)(classes.txtOpt, 'option-sv-bar-operation'),
|
|
150
|
+
children: o.name
|
|
151
|
+
})
|
|
152
|
+
}, o.name));
|
|
135
153
|
const selectedValue = operation.name || operations[0].name;
|
|
136
|
-
return /*#__PURE__*/
|
|
154
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.FormControl, {
|
|
137
155
|
className: (0, _classnames.default)(classes.fieldOpertaion),
|
|
138
|
-
variant: "outlined"
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
156
|
+
variant: "outlined",
|
|
157
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.InputLabel, {
|
|
158
|
+
id: "select-submit-label",
|
|
159
|
+
className: (0, _classnames.default)(classes.selectLabel, 'select-sv-bar-label'),
|
|
160
|
+
children: "Submit"
|
|
161
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Select, {
|
|
162
|
+
labelId: "select-submit-label",
|
|
163
|
+
label: "Submit",
|
|
164
|
+
value: selectedValue,
|
|
165
|
+
onChange: onChangeSelect,
|
|
166
|
+
className: (0, _classnames.default)(classes.selectInput, 'input-sv-bar-operation')
|
|
167
|
+
// input={
|
|
168
|
+
// (
|
|
169
|
+
// <OutlinedInput
|
|
170
|
+
// className={classNames(classes.selectInput, 'input-sv-bar-operation')}
|
|
171
|
+
// labelWidth={50}
|
|
172
|
+
// />
|
|
173
|
+
// )
|
|
174
|
+
// }
|
|
175
|
+
,
|
|
176
|
+
children: options
|
|
177
|
+
})]
|
|
178
|
+
});
|
|
157
179
|
};
|
|
158
180
|
const selectOperation = (name, operations, updateOperationAct) => {
|
|
159
181
|
let operation = false;
|
|
@@ -164,39 +186,39 @@ const selectOperation = (name, operations, updateOperationAct) => {
|
|
|
164
186
|
});
|
|
165
187
|
updateOperationAct(operation);
|
|
166
188
|
};
|
|
167
|
-
const Submit =
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
} = _ref;
|
|
189
|
+
const Submit = ({
|
|
190
|
+
operations,
|
|
191
|
+
classes,
|
|
192
|
+
feature,
|
|
193
|
+
forecast,
|
|
194
|
+
editorOnly,
|
|
195
|
+
hideSwitch,
|
|
196
|
+
disabled,
|
|
197
|
+
isAscendSt,
|
|
198
|
+
isIntensitySt,
|
|
199
|
+
operationSt,
|
|
200
|
+
decimalSt,
|
|
201
|
+
isEmWaveSt,
|
|
202
|
+
toggleIsAscendAct,
|
|
203
|
+
toggleIsIntensityAct,
|
|
204
|
+
updateOperationAct,
|
|
205
|
+
updateDecimalAct
|
|
206
|
+
}) => {
|
|
186
207
|
const onChangeSelect = e => selectOperation(e.target.value, operations, updateOperationAct);
|
|
187
208
|
if (!operations || operations.length === 0) return null;
|
|
188
|
-
return /*#__PURE__*/
|
|
189
|
-
className: classes.groupRightMost
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
209
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
210
|
+
className: classes.groupRightMost,
|
|
211
|
+
children: [ascendSelect(classes, hideSwitch, isAscendSt, toggleIsAscendAct), intensitySelect(classes, hideSwitch || !isEmWaveSt, isIntensitySt, toggleIsIntensityAct), decimalSelect(classes, hideSwitch, decimalSt, updateDecimalAct), editorOnly ? null : /*#__PURE__*/(0, _jsxRuntime.jsx)(_r06_predict_btn.default, {
|
|
212
|
+
feature: feature,
|
|
213
|
+
forecast: forecast
|
|
214
|
+
}), operationSelect(classes, operations, operationSt, onChangeSelect), /*#__PURE__*/(0, _jsxRuntime.jsx)(_r05_submit_btn.default, {
|
|
215
|
+
feature: feature,
|
|
216
|
+
isAscend: isAscendSt,
|
|
217
|
+
isIntensity: isIntensitySt,
|
|
218
|
+
operation: operationSt,
|
|
219
|
+
disabled: disabled
|
|
220
|
+
})]
|
|
221
|
+
});
|
|
200
222
|
};
|
|
201
223
|
const mapStateToProps = (state, props) => (
|
|
202
224
|
// eslint-disable-line
|
|
@@ -16,6 +16,7 @@ var _styles = require("@mui/styles");
|
|
|
16
16
|
var _chem = require("../../helpers/chem");
|
|
17
17
|
var _common = require("./common");
|
|
18
18
|
var _extractPeaksEdit = require("../../helpers/extractPeaksEdit");
|
|
19
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
20
|
/* eslint-disable prefer-object-spread, function-paren-newline,
|
|
20
21
|
react/function-component-definition, function-call-argument-newline,
|
|
21
22
|
react/require-default-props */
|
|
@@ -44,30 +45,29 @@ const onClickCb = (operation, peaksEdit, isAscend, isIntensity, scan, thres, lay
|
|
|
44
45
|
dscMetaData
|
|
45
46
|
});
|
|
46
47
|
};
|
|
47
|
-
const BtnSubmit =
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
} = _ref;
|
|
48
|
+
const BtnSubmit = ({
|
|
49
|
+
classes,
|
|
50
|
+
operation,
|
|
51
|
+
feature,
|
|
52
|
+
isAscend,
|
|
53
|
+
isIntensity,
|
|
54
|
+
editPeakSt,
|
|
55
|
+
thresSt,
|
|
56
|
+
layoutSt,
|
|
57
|
+
shiftSt,
|
|
58
|
+
scanSt,
|
|
59
|
+
forecastSt,
|
|
60
|
+
decimalSt,
|
|
61
|
+
integrationSt,
|
|
62
|
+
multiplicitySt,
|
|
63
|
+
allIntegrationSt,
|
|
64
|
+
waveLengthSt,
|
|
65
|
+
cyclicvoltaSt,
|
|
66
|
+
curveSt,
|
|
67
|
+
axesUnitsSt,
|
|
68
|
+
detectorSt,
|
|
69
|
+
metaSt
|
|
70
|
+
}) => {
|
|
71
71
|
const peaksEdit = (0, _extractPeaksEdit.extractPeaksEdit)(feature, editPeakSt, thresSt, shiftSt, layoutSt);
|
|
72
72
|
// const disBtn = peaksEdit.length === 0 || statusSt.btnSubmit || disabled;
|
|
73
73
|
const scan = (0, _chem.Convert2Scan)(feature, scanSt);
|
|
@@ -77,23 +77,26 @@ const BtnSubmit = _ref => {
|
|
|
77
77
|
dscMetaData
|
|
78
78
|
} = metaSt;
|
|
79
79
|
if (!operation) return null;
|
|
80
|
-
return /*#__PURE__*/
|
|
81
|
-
title: /*#__PURE__*/
|
|
82
|
-
className: "txt-sv-tp"
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
80
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, {
|
|
81
|
+
title: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
82
|
+
className: "txt-sv-tp",
|
|
83
|
+
children: "Submit"
|
|
84
|
+
}),
|
|
85
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_common.MuButton, {
|
|
86
|
+
className: (0, _classnames.default)('btn-sv-bar-submit'),
|
|
87
|
+
color: "primary",
|
|
88
|
+
onClick: onClickCb(operation.value, peaksEdit, isAscend, isIntensity, scan, thres, layoutSt, shiftSt, forecastSt.predictions, decimalSt, integrationSt, multiplicitySt, allIntegrationSt, aucValues, waveLengthSt, cyclicvoltaSt, curveSt, axesUnitsSt, detectorSt, dscMetaData),
|
|
89
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_PlayCircleOutline.default, {
|
|
90
|
+
className: classes.icon
|
|
91
|
+
})
|
|
92
|
+
})
|
|
93
|
+
});
|
|
91
94
|
};
|
|
92
95
|
const mapStateToProps = (state, props) => (
|
|
93
96
|
// eslint-disable-line
|
|
94
97
|
{
|
|
95
98
|
editPeakSt: state.editPeak.present,
|
|
96
|
-
thresSt: state.threshold,
|
|
99
|
+
thresSt: state.threshold.list[state.curve.curveIdx],
|
|
97
100
|
layoutSt: state.layout,
|
|
98
101
|
shiftSt: state.shift,
|
|
99
102
|
scanSt: state.scan,
|