@complat/react-spectra-editor 1.7.0 → 1.8.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/CHANGELOG.md +28 -0
- package/LICENSE +21 -662
- package/README.md +5 -0
- package/dist/__tests__/fixtures/lc_ms_jcamp.js +2329 -0
- package/dist/__tests__/fixtures/lc_ms_jcamp_2.js +2874 -0
- package/dist/__tests__/fixtures/lc_ms_jcamp_mz_chemstation.js +3242 -0
- package/dist/__tests__/fixtures/lc_ms_jcamp_tic_chemstation.js +854 -0
- package/dist/__tests__/fixtures/lc_ms_jcamp_tic_neg.js +1233 -0
- package/dist/__tests__/fixtures/lc_ms_jcamp_tic_pos.js +1233 -0
- package/dist/__tests__/fixtures/lc_ms_jcamp_uvvis.js +48908 -0
- package/dist/__tests__/fixtures/lc_ms_jcamp_uvvis_chemstation.js +15424 -0
- package/dist/__tests__/units/components/cmd_bar/r05_submit_btn.test.js +158 -3
- package/dist/__tests__/units/components/d3_line_rect.test.js +85 -0
- package/dist/__tests__/units/components/d3_multi/multi_focus.test.js +43 -0
- package/dist/__tests__/units/components/hplc_viewer.test.js +123 -0
- package/dist/__tests__/units/components/panel/info.test.js +55 -15
- package/dist/__tests__/units/features/lc-ms/parsing/lcmsCategory.test.js +73 -0
- package/dist/__tests__/units/features/lc-ms/submit/peaks.test.js +310 -0
- package/dist/actions/curve.js +5 -2
- package/dist/actions/hplc_ms.js +66 -0
- package/dist/actions/integration.js +17 -2
- package/dist/actions/ui.js +39 -11
- package/dist/app.js +21 -8
- package/dist/components/cmd_bar/01_viewer.js +15 -11
- package/dist/components/cmd_bar/03_peak.js +25 -16
- package/dist/components/cmd_bar/04_integration.js +116 -17
- package/dist/components/cmd_bar/08_peak_group.js +83 -0
- package/dist/components/cmd_bar/collapsible_toolbar_group.js +101 -0
- package/dist/components/cmd_bar/common.js +4 -3
- package/dist/components/cmd_bar/index.js +76 -18
- package/dist/components/cmd_bar/r01_layout.js +6 -0
- package/dist/components/cmd_bar/r02_scan.js +15 -11
- package/dist/components/cmd_bar/r03_threshold.js +19 -3
- package/dist/components/cmd_bar/r04_submit.js +61 -6
- package/dist/components/cmd_bar/r05_submit_btn.js +60 -13
- package/dist/components/cmd_bar/r06_predict_btn.js +4 -4
- package/dist/components/cmd_bar/r07_wavelength_btn.js +10 -9
- package/dist/components/cmd_bar/r09_detector.js +2 -2
- package/dist/components/cmd_bar/tri_btn.js +4 -1
- package/dist/components/common/draw.js +6 -5
- package/dist/components/d3_line/index.js +70 -15
- package/dist/components/d3_line/line_focus.js +104 -67
- package/dist/components/d3_line_rect/index.js +836 -0
- package/dist/components/d3_line_rect/line_focus.js +526 -0
- package/dist/components/d3_line_rect/multi_focus.js +433 -0
- package/dist/components/d3_line_rect/rect_focus.js +247 -0
- package/dist/components/d3_multi/index.js +154 -163
- package/dist/components/d3_multi/multi_focus.js +117 -68
- package/dist/components/d3_rect/index.js +6 -0
- package/dist/components/d3_rect/rect_focus.js +17 -5
- package/dist/components/hplc_viewer.js +169 -0
- package/dist/components/lc_ms_uv_tools_bar.js +175 -0
- package/dist/components/multi_jcamps_viewer.js +17 -5
- package/dist/components/panel/compare.js +84 -62
- package/dist/components/panel/cyclic_voltamery_data.js +15 -14
- package/dist/components/panel/graph_selection.js +32 -30
- package/dist/components/panel/index.js +28 -22
- package/dist/components/panel/info.js +90 -31
- package/dist/constants/action_type.js +23 -2
- package/dist/constants/list_graph.js +16 -0
- package/dist/constants/list_layout.js +2 -1
- package/dist/constants/list_ui.js +5 -2
- package/dist/features/lc-ms/entities/extractEntityLCMS.js +187 -0
- package/dist/features/lc-ms/parsing/chemstation.js +108 -0
- package/dist/features/lc-ms/parsing/index.js +46 -0
- package/dist/features/lc-ms/parsing/lcmsCategory.js +44 -0
- package/dist/features/lc-ms/parsing/lcmsJcampInfo.js +18 -0
- package/dist/features/lc-ms/parsing/lcmsMsPage.js +241 -0
- package/dist/features/lc-ms/parsing/pageValue.js +27 -0
- package/dist/features/lc-ms/submit/index.js +24 -0
- package/dist/features/lc-ms/submit/peaks.js +66 -0
- package/dist/features/lc-ms/ui/wavelengthSelect.js +54 -0
- package/dist/fn.js +4 -1
- package/dist/helpers/brush.js +74 -19
- package/dist/helpers/calc.js +4 -2
- package/dist/helpers/cfg.js +5 -4
- package/dist/helpers/chem.js +449 -71
- package/dist/helpers/compass.js +181 -17
- package/dist/helpers/extractEntityLCMS.js +24 -0
- package/dist/helpers/extractParams.js +118 -33
- package/dist/helpers/extractPeaksEdit.js +29 -9
- package/dist/helpers/format.js +189 -4
- package/dist/helpers/init.js +25 -5
- package/dist/helpers/integration.js +130 -17
- package/dist/helpers/integration_draft.js +43 -0
- package/dist/helpers/integration_focus.js +155 -0
- package/dist/helpers/integration_jcamp.js +68 -0
- package/dist/helpers/integration_split.js +202 -0
- package/dist/helpers/mount.js +8 -1
- package/dist/helpers/sweep.js +39 -0
- package/dist/index.js +284 -26
- package/dist/layer_content.js +17 -3
- package/dist/layer_init.js +124 -14
- package/dist/layer_prism.js +31 -5
- package/dist/reducers/index.js +3 -1
- package/dist/reducers/reducer_curve.js +54 -36
- package/dist/reducers/reducer_hplc_ms/hydrate.js +289 -0
- package/dist/reducers/reducer_hplc_ms/index.js +122 -0
- package/dist/reducers/reducer_hplc_ms/persistence.js +74 -0
- package/dist/reducers/reducer_hplc_ms/tic.js +70 -0
- package/dist/reducers/reducer_hplc_ms/utils.js +70 -0
- package/dist/reducers/reducer_hplc_ms/uvvis.js +377 -0
- package/dist/reducers/reducer_integration.js +265 -7
- package/dist/reducers/reducer_layout.js +1 -1
- package/dist/reducers/reducer_submit.js +2 -1
- package/dist/reducers/reducer_ui.js +149 -13
- package/dist/reducers/undo_redo_config.js +2 -2
- package/dist/sagas/saga_lcms_ui.js +85 -0
- package/dist/sagas/saga_ui.js +177 -74
- package/dist/setupTests.js +5 -5
- package/package.json +10 -7
|
@@ -20,6 +20,8 @@ var _list_ui = require("../../constants/list_ui");
|
|
|
20
20
|
var _tri_btn = _interopRequireDefault(require("./tri_btn"));
|
|
21
21
|
var _edit_peak = require("../../actions/edit_peak");
|
|
22
22
|
var _extractPeaksEdit = require("../../helpers/extractPeaksEdit");
|
|
23
|
+
var _hplc_ms = require("../../actions/hplc_ms");
|
|
24
|
+
var _list_layout = require("../../constants/list_layout");
|
|
23
25
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
24
26
|
/* eslint-disable prefer-object-spread, function-paren-newline, no-unused-vars,
|
|
25
27
|
react/function-component-definition, react/require-default-props, max-len,
|
|
@@ -36,32 +38,37 @@ const Peak = ({
|
|
|
36
38
|
isFocusSetRefSt,
|
|
37
39
|
disableSetRefSt,
|
|
38
40
|
isHandleMaxAndMinPeaksSt,
|
|
39
|
-
|
|
41
|
+
cyclicVoltaState,
|
|
40
42
|
curveSt,
|
|
41
43
|
clearAllPeaksAct,
|
|
42
44
|
feature,
|
|
43
45
|
editPeakSt,
|
|
44
46
|
thresSt,
|
|
45
47
|
shiftSt,
|
|
46
|
-
layoutSt
|
|
48
|
+
layoutSt,
|
|
49
|
+
clearAllPeaksHplcMsAct
|
|
47
50
|
}) => {
|
|
48
51
|
let onSweepPeakAdd = () => setUiSweepTypeAct(_list_ui.LIST_UI_SWEEP_TYPE.PEAK_ADD);
|
|
49
|
-
let
|
|
52
|
+
let onSweepPeakDelete = () => setUiSweepTypeAct(_list_ui.LIST_UI_SWEEP_TYPE.PEAK_DELETE);
|
|
50
53
|
let onSweepAnchorShift = () => setUiSweepTypeAct(_list_ui.LIST_UI_SWEEP_TYPE.ANCHOR_SHIFT);
|
|
51
54
|
const {
|
|
52
55
|
curveIdx
|
|
53
56
|
} = curveSt;
|
|
54
57
|
const onClearAll = () => {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
dataPeaks
|
|
59
|
-
|
|
58
|
+
if (layoutSt === _list_layout.LIST_LAYOUT.LC_MS) {
|
|
59
|
+
clearAllPeaksHplcMsAct();
|
|
60
|
+
} else {
|
|
61
|
+
const dataPeaks = (0, _extractPeaksEdit.extractAutoPeaks)(feature, thresSt, shiftSt, layoutSt);
|
|
62
|
+
clearAllPeaksAct({
|
|
63
|
+
curveIdx,
|
|
64
|
+
dataPeaks
|
|
65
|
+
});
|
|
66
|
+
}
|
|
60
67
|
};
|
|
61
68
|
if (isHandleMaxAndMinPeaksSt) {
|
|
62
69
|
const {
|
|
63
70
|
spectraList
|
|
64
|
-
} =
|
|
71
|
+
} = cyclicVoltaState;
|
|
65
72
|
const spectra = spectraList[curveIdx];
|
|
66
73
|
if (spectra) {
|
|
67
74
|
const {
|
|
@@ -69,10 +76,10 @@ const Peak = ({
|
|
|
69
76
|
} = spectra;
|
|
70
77
|
if (isWorkMaxPeak) {
|
|
71
78
|
onSweepPeakAdd = () => setUiSweepTypeAct(_list_ui.LIST_UI_SWEEP_TYPE.CYCLIC_VOLTA_ADD_MAX_PEAK, curveIdx);
|
|
72
|
-
|
|
79
|
+
onSweepPeakDelete = () => setUiSweepTypeAct(_list_ui.LIST_UI_SWEEP_TYPE.CYCLIC_VOLTA_RM_MAX_PEAK, curveIdx);
|
|
73
80
|
} else {
|
|
74
81
|
onSweepPeakAdd = () => setUiSweepTypeAct(_list_ui.LIST_UI_SWEEP_TYPE.CYCLIC_VOLTA_ADD_MIN_PEAK, curveIdx);
|
|
75
|
-
|
|
82
|
+
onSweepPeakDelete = () => setUiSweepTypeAct(_list_ui.LIST_UI_SWEEP_TYPE.CYCLIC_VOLTA_RM_MIN_PEAK, curveIdx);
|
|
76
83
|
}
|
|
77
84
|
onSweepAnchorShift = () => setUiSweepTypeAct(_list_ui.LIST_UI_SWEEP_TYPE.CYCLIC_VOLTA_SET_REF, curveIdx);
|
|
78
85
|
}
|
|
@@ -105,7 +112,7 @@ const Peak = ({
|
|
|
105
112
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_common.MuButton, {
|
|
106
113
|
className: (0, _classnames.default)((0, _common.focusStyle)(isFocusRmPeakSt, classes), 'btn-sv-bar-rmpeak'),
|
|
107
114
|
disabled: disableRmPeakSt,
|
|
108
|
-
onClick:
|
|
115
|
+
onClick: onSweepPeakDelete,
|
|
109
116
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
110
117
|
className: (0, _classnames.default)(classes.txt, 'txt-sv-bar-rmpeak'),
|
|
111
118
|
children: "P-"
|
|
@@ -153,7 +160,7 @@ const mapStateToProps = (state, props) => (
|
|
|
153
160
|
isFocusSetRefSt: state.ui.sweepType === _list_ui.LIST_UI_SWEEP_TYPE.ANCHOR_SHIFT || state.ui.sweepType === _list_ui.LIST_UI_SWEEP_TYPE.CYCLIC_VOLTA_SET_REF,
|
|
154
161
|
disableSetRefSt: _cfg.default.btnCmdSetRef(state.layout),
|
|
155
162
|
isHandleMaxAndMinPeaksSt: !_cfg.default.hidePanelCyclicVolta(state.layout),
|
|
156
|
-
|
|
163
|
+
cyclicVoltaState: state.cyclicvolta,
|
|
157
164
|
curveSt: state.curve,
|
|
158
165
|
editPeakSt: state.editPeak.present,
|
|
159
166
|
thresSt: state.threshold.list[state.curve.curveIdx],
|
|
@@ -162,7 +169,8 @@ const mapStateToProps = (state, props) => (
|
|
|
162
169
|
});
|
|
163
170
|
const mapDispatchToProps = dispatch => (0, _redux.bindActionCreators)({
|
|
164
171
|
setUiSweepTypeAct: _ui.setUiSweepType,
|
|
165
|
-
clearAllPeaksAct: _edit_peak.clearAllPeaks
|
|
172
|
+
clearAllPeaksAct: _edit_peak.clearAllPeaks,
|
|
173
|
+
clearAllPeaksHplcMsAct: _hplc_ms.clearAllPeaksHplcMs
|
|
166
174
|
}, dispatch);
|
|
167
175
|
Peak.propTypes = {
|
|
168
176
|
classes: _propTypes.default.object.isRequired,
|
|
@@ -174,13 +182,14 @@ Peak.propTypes = {
|
|
|
174
182
|
disableSetRefSt: _propTypes.default.bool.isRequired,
|
|
175
183
|
setUiSweepTypeAct: _propTypes.default.func.isRequired,
|
|
176
184
|
isHandleMaxAndMinPeaksSt: _propTypes.default.bool.isRequired,
|
|
177
|
-
|
|
185
|
+
cyclicVoltaState: _propTypes.default.object.isRequired,
|
|
178
186
|
curveSt: _propTypes.default.object.isRequired,
|
|
179
187
|
clearAllPeaksAct: _propTypes.default.func.isRequired,
|
|
180
188
|
feature: _propTypes.default.object.isRequired,
|
|
181
189
|
editPeakSt: _propTypes.default.object.isRequired,
|
|
182
190
|
thresSt: _propTypes.default.object.isRequired,
|
|
183
191
|
layoutSt: _propTypes.default.string.isRequired,
|
|
184
|
-
shiftSt: _propTypes.default.object.isRequired
|
|
192
|
+
shiftSt: _propTypes.default.object.isRequired,
|
|
193
|
+
clearAllPeaksHplcMsAct: _propTypes.default.func.isRequired
|
|
185
194
|
};
|
|
186
195
|
var _default = exports.default = (0, _redux.compose)((0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps), (0, _withStyles.default)(styles))(Peak);
|
|
@@ -16,22 +16,34 @@ var _TextField = _interopRequireDefault(require("@mui/material/TextField"));
|
|
|
16
16
|
var _react2 = _interopRequireDefault(require("@mdi/react"));
|
|
17
17
|
var _js = require("@mdi/js");
|
|
18
18
|
var _integration = require("../../actions/integration");
|
|
19
|
+
var _hplc_ms = require("../../actions/hplc_ms");
|
|
19
20
|
var _ui = require("../../actions/ui");
|
|
20
21
|
var _list_ui = require("../../constants/list_ui");
|
|
22
|
+
var _integration_draft = require("../../helpers/integration_draft.js");
|
|
21
23
|
var _cfg = _interopRequireDefault(require("../../helpers/cfg"));
|
|
22
24
|
var _tri_btn = _interopRequireDefault(require("./tri_btn"));
|
|
23
25
|
var _common = require("./common");
|
|
24
26
|
var _format = _interopRequireDefault(require("../../helpers/format"));
|
|
27
|
+
var _list_layout = require("../../constants/list_layout");
|
|
25
28
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
26
29
|
/* eslint-disable prefer-object-spread, function-paren-newline,
|
|
27
30
|
react/function-component-definition, react/require-default-props, max-len,
|
|
28
31
|
react/no-unused-prop-types */
|
|
29
32
|
|
|
33
|
+
// eslint-disable-line import/extensions
|
|
34
|
+
|
|
30
35
|
const styles = () => Object.assign({
|
|
31
36
|
field: {
|
|
32
37
|
width: 80
|
|
33
38
|
},
|
|
34
|
-
txtIcon: {}
|
|
39
|
+
txtIcon: {},
|
|
40
|
+
cancelBtn: {
|
|
41
|
+
borderColor: '#d32f2f',
|
|
42
|
+
color: '#d32f2f',
|
|
43
|
+
'&:hover': {
|
|
44
|
+
backgroundColor: '#ffebee'
|
|
45
|
+
}
|
|
46
|
+
}
|
|
35
47
|
}, _common.commonStyle);
|
|
36
48
|
const iconSize = '16px';
|
|
37
49
|
const setFactor = (classes, isDisable, integrationSt, setIntegrationFkrAct, curveIdx) => {
|
|
@@ -82,25 +94,58 @@ const iconColor = criteria => criteria ? '#fff' : '#000';
|
|
|
82
94
|
const Integration = ({
|
|
83
95
|
classes,
|
|
84
96
|
ignoreRef,
|
|
97
|
+
showIntegSplitToolsSt,
|
|
85
98
|
isDisableSt,
|
|
86
99
|
isFocusAddIntgSt,
|
|
87
100
|
isFocusRmIntgSt,
|
|
88
101
|
isFocusSetRefSt,
|
|
102
|
+
isFocusSplitIntgSt,
|
|
103
|
+
isFocusVisualSplitIntgSt,
|
|
89
104
|
setUiSweepTypeAct,
|
|
90
105
|
setIntegrationFkrAct,
|
|
91
106
|
clearIntegrationAllAct,
|
|
92
107
|
curveSt,
|
|
93
|
-
integrationSt
|
|
108
|
+
integrationSt,
|
|
109
|
+
clearIntegrationAllHplcMsAct,
|
|
110
|
+
layoutSt
|
|
94
111
|
}) => {
|
|
95
|
-
const onSweepIntegtAdd = () => setUiSweepTypeAct(_list_ui.LIST_UI_SWEEP_TYPE.INTEGRATION_ADD);
|
|
96
|
-
const onSweepIntegtRm = () => setUiSweepTypeAct(_list_ui.LIST_UI_SWEEP_TYPE.INTEGRATION_RM);
|
|
97
|
-
const onSweepIntegtSR = () => setUiSweepTypeAct(_list_ui.LIST_UI_SWEEP_TYPE.INTEGRATION_SET_REF);
|
|
98
112
|
const {
|
|
99
113
|
curveIdx
|
|
100
114
|
} = curveSt;
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
-
|
|
115
|
+
const onCancelTool = () => setUiSweepTypeAct(_list_ui.LIST_UI_SWEEP_TYPE.ZOOMIN, curveIdx);
|
|
116
|
+
const onSweepIntegtAdd = () => {
|
|
117
|
+
if (isFocusAddIntgSt) {
|
|
118
|
+
(0, _integration_draft.clearPendingIntegrationDraft)();
|
|
119
|
+
onCancelTool();
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
setUiSweepTypeAct(_list_ui.LIST_UI_SWEEP_TYPE.INTEGRATION_ADD, curveIdx);
|
|
123
|
+
};
|
|
124
|
+
const onSweepIntegtRm = () => setUiSweepTypeAct(_list_ui.LIST_UI_SWEEP_TYPE.INTEGRATION_RM);
|
|
125
|
+
const onSweepIntegtSR = () => setUiSweepTypeAct(_list_ui.LIST_UI_SWEEP_TYPE.INTEGRATION_SET_REF);
|
|
126
|
+
const onClearAll = () => {
|
|
127
|
+
if (layoutSt === _list_layout.LIST_LAYOUT.LC_MS) {
|
|
128
|
+
clearIntegrationAllHplcMsAct();
|
|
129
|
+
} else {
|
|
130
|
+
clearIntegrationAllAct({
|
|
131
|
+
curveIdx
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
const onSweepIntegtSplit = () => {
|
|
136
|
+
if (isFocusSplitIntgSt) {
|
|
137
|
+
onCancelTool();
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
setUiSweepTypeAct(_list_ui.LIST_UI_SWEEP_TYPE.INTEGRATION_SPLIT, curveIdx);
|
|
141
|
+
};
|
|
142
|
+
const onSweepIntegtVisualSplit = () => {
|
|
143
|
+
if (isFocusVisualSplitIntgSt) {
|
|
144
|
+
onCancelTool();
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
setUiSweepTypeAct(_list_ui.LIST_UI_SWEEP_TYPE.INTEGRATION_VISUAL_SPLIT, curveIdx);
|
|
148
|
+
};
|
|
104
149
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
105
150
|
className: classes.group,
|
|
106
151
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, {
|
|
@@ -110,15 +155,15 @@ const Integration = ({
|
|
|
110
155
|
}),
|
|
111
156
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
112
157
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_common.MuButton, {
|
|
113
|
-
className: (0, _classnames.default)((0, _common.focusStyle)(
|
|
158
|
+
className: (0, _classnames.default)(isFocusAddIntgSt ? classes.cancelBtn : (0, _common.focusStyle)(false, classes), 'btn-add-inter'),
|
|
114
159
|
disabled: isDisableSt,
|
|
115
160
|
onClick: onSweepIntegtAdd,
|
|
116
161
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_react2.default, {
|
|
117
|
-
path: _js.mdiMathIntegral,
|
|
162
|
+
path: isFocusAddIntgSt ? _js.mdiClose : _js.mdiMathIntegral,
|
|
118
163
|
size: iconSize,
|
|
119
|
-
color:
|
|
164
|
+
color: isFocusAddIntgSt ? '#d32f2f' : iconColor(isDisableSt),
|
|
120
165
|
className: (0, _classnames.default)(classes.iconMdi, 'icon-sv-bar-addint')
|
|
121
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
166
|
+
}), isFocusAddIntgSt ? null : /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
122
167
|
className: (0, _classnames.default)(classes.txt, classes.txtIcon, 'txt-sv-bar-addint'),
|
|
123
168
|
children: "+"
|
|
124
169
|
})]
|
|
@@ -145,7 +190,7 @@ const Integration = ({
|
|
|
145
190
|
})]
|
|
146
191
|
})
|
|
147
192
|
})
|
|
148
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, {
|
|
193
|
+
}), ignoreRef ? null : /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, {
|
|
149
194
|
title: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
150
195
|
className: "txt-sv-tp",
|
|
151
196
|
children: "Set Integration Reference"
|
|
@@ -163,7 +208,51 @@ const Integration = ({
|
|
|
163
208
|
})
|
|
164
209
|
})
|
|
165
210
|
})
|
|
166
|
-
}),
|
|
211
|
+
}), showIntegSplitToolsSt ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
212
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, {
|
|
213
|
+
title: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
214
|
+
className: "txt-sv-tp",
|
|
215
|
+
children: "Split Integration"
|
|
216
|
+
}),
|
|
217
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
218
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_common.MuButton, {
|
|
219
|
+
className: (0, _classnames.default)(isFocusSplitIntgSt ? classes.cancelBtn : (0, _common.focusStyle)(false, classes), 'btn-split-inter'),
|
|
220
|
+
disabled: isDisableSt,
|
|
221
|
+
onClick: onSweepIntegtSplit,
|
|
222
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_react2.default, {
|
|
223
|
+
path: isFocusSplitIntgSt ? _js.mdiClose : _js.mdiMathIntegral,
|
|
224
|
+
size: iconSize,
|
|
225
|
+
color: isFocusSplitIntgSt ? '#d32f2f' : iconColor(isDisableSt),
|
|
226
|
+
className: (0, _classnames.default)(classes.iconMdi, 'icon-sv-bar-splitint')
|
|
227
|
+
}), isFocusSplitIntgSt ? null : /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
228
|
+
className: (0, _classnames.default)(classes.txt, classes.txtIcon, 'txt-sv-bar-splitint'),
|
|
229
|
+
children: "/"
|
|
230
|
+
})]
|
|
231
|
+
})
|
|
232
|
+
})
|
|
233
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, {
|
|
234
|
+
title: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
235
|
+
className: "txt-sv-tp",
|
|
236
|
+
children: "Visual Split Integration"
|
|
237
|
+
}),
|
|
238
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
239
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_common.MuButton, {
|
|
240
|
+
className: (0, _classnames.default)(isFocusVisualSplitIntgSt ? classes.cancelBtn : (0, _common.focusStyle)(false, classes), 'btn-visual-split-inter'),
|
|
241
|
+
disabled: isDisableSt,
|
|
242
|
+
onClick: onSweepIntegtVisualSplit,
|
|
243
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_react2.default, {
|
|
244
|
+
path: isFocusVisualSplitIntgSt ? _js.mdiClose : _js.mdiMathIntegral,
|
|
245
|
+
size: iconSize,
|
|
246
|
+
color: isFocusVisualSplitIntgSt ? '#d32f2f' : iconColor(isDisableSt),
|
|
247
|
+
className: (0, _classnames.default)(classes.iconMdi, 'icon-sv-bar-visualsplitint')
|
|
248
|
+
}), isFocusVisualSplitIntgSt ? null : /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
249
|
+
className: (0, _classnames.default)(classes.txt, classes.txtIcon, 'txt-sv-bar-visualsplitint'),
|
|
250
|
+
children: "|"
|
|
251
|
+
})]
|
|
252
|
+
})
|
|
253
|
+
})
|
|
254
|
+
})]
|
|
255
|
+
}) : null, !ignoreRef ? setFactor(classes, isDisableSt, integrationSt, setIntegrationFkrAct, curveIdx) : null, /*#__PURE__*/(0, _jsxRuntime.jsxs)(_tri_btn.default, {
|
|
167
256
|
content: {
|
|
168
257
|
tp: 'Clear All Integration'
|
|
169
258
|
},
|
|
@@ -187,14 +276,19 @@ const mapStateToProps = (state, props) => (
|
|
|
187
276
|
isFocusAddIntgSt: state.ui.sweepType === _list_ui.LIST_UI_SWEEP_TYPE.INTEGRATION_ADD,
|
|
188
277
|
isFocusRmIntgSt: state.ui.sweepType === _list_ui.LIST_UI_SWEEP_TYPE.INTEGRATION_RM,
|
|
189
278
|
isFocusSetRefSt: state.ui.sweepType === _list_ui.LIST_UI_SWEEP_TYPE.INTEGRATION_SET_REF,
|
|
279
|
+
isFocusSplitIntgSt: state.ui.sweepType === _list_ui.LIST_UI_SWEEP_TYPE.INTEGRATION_SPLIT,
|
|
280
|
+
isFocusVisualSplitIntgSt: state.ui.sweepType === _list_ui.LIST_UI_SWEEP_TYPE.INTEGRATION_VISUAL_SPLIT,
|
|
190
281
|
ignoreRef: _format.default.isHplcUvVisLayout(state.layout),
|
|
282
|
+
showIntegSplitToolsSt: _cfg.default.showIntegSplitTools(state.layout),
|
|
191
283
|
curveSt: state.curve,
|
|
192
|
-
integrationSt: state.integration.present
|
|
284
|
+
integrationSt: state.integration.present,
|
|
285
|
+
layoutSt: state.layout
|
|
193
286
|
});
|
|
194
287
|
const mapDispatchToProps = dispatch => (0, _redux.bindActionCreators)({
|
|
195
288
|
setUiSweepTypeAct: _ui.setUiSweepType,
|
|
196
289
|
setIntegrationFkrAct: _integration.setIntegrationFkr,
|
|
197
|
-
clearIntegrationAllAct: _integration.clearIntegrationAll
|
|
290
|
+
clearIntegrationAllAct: _integration.clearIntegrationAll,
|
|
291
|
+
clearIntegrationAllHplcMsAct: _hplc_ms.clearIntegrationAllHplcMs
|
|
198
292
|
}, dispatch);
|
|
199
293
|
Integration.propTypes = {
|
|
200
294
|
classes: _propTypes.default.object.isRequired,
|
|
@@ -202,11 +296,16 @@ Integration.propTypes = {
|
|
|
202
296
|
isFocusAddIntgSt: _propTypes.default.bool.isRequired,
|
|
203
297
|
isFocusRmIntgSt: _propTypes.default.bool.isRequired,
|
|
204
298
|
isFocusSetRefSt: _propTypes.default.bool.isRequired,
|
|
299
|
+
isFocusSplitIntgSt: _propTypes.default.bool.isRequired,
|
|
300
|
+
isFocusVisualSplitIntgSt: _propTypes.default.bool.isRequired,
|
|
205
301
|
ignoreRef: _propTypes.default.bool.isRequired,
|
|
302
|
+
showIntegSplitToolsSt: _propTypes.default.bool.isRequired,
|
|
206
303
|
setUiSweepTypeAct: _propTypes.default.func.isRequired,
|
|
207
304
|
setIntegrationFkrAct: _propTypes.default.func.isRequired,
|
|
208
305
|
clearIntegrationAllAct: _propTypes.default.func.isRequired,
|
|
306
|
+
clearIntegrationAllHplcMsAct: _propTypes.default.func.isRequired,
|
|
209
307
|
curveSt: _propTypes.default.object.isRequired,
|
|
210
|
-
integrationSt: _propTypes.default.object.isRequired
|
|
308
|
+
integrationSt: _propTypes.default.object.isRequired,
|
|
309
|
+
layoutSt: _propTypes.default.string.isRequired
|
|
211
310
|
};
|
|
212
311
|
var _default = exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)((0, _withStyles.default)(styles)(Integration));
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _reactRedux = require("react-redux");
|
|
10
|
+
var _redux = require("redux");
|
|
11
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
12
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
+
var _withStyles = _interopRequireDefault(require("@mui/styles/withStyles"));
|
|
14
|
+
var _Tooltip = _interopRequireDefault(require("@mui/material/Tooltip"));
|
|
15
|
+
var _Troubleshoot = _interopRequireDefault(require("@mui/icons-material/Troubleshoot"));
|
|
16
|
+
var _ui = require("../../actions/ui");
|
|
17
|
+
var _common = require("./common");
|
|
18
|
+
var _list_ui = require("../../constants/list_ui");
|
|
19
|
+
var _format = _interopRequireDefault(require("../../helpers/format"));
|
|
20
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
|
+
/* eslint-disable prefer-object-spread, react/function-component-definition */
|
|
22
|
+
|
|
23
|
+
const styles = () => Object.assign({}, _common.commonStyle);
|
|
24
|
+
const PeakGroup = ({
|
|
25
|
+
classes,
|
|
26
|
+
feature,
|
|
27
|
+
isSelectingGroupSt,
|
|
28
|
+
setUiSweepTypeAct,
|
|
29
|
+
graphIndex
|
|
30
|
+
}) => {
|
|
31
|
+
if (!feature || !feature.operation) {
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
const {
|
|
35
|
+
operation
|
|
36
|
+
} = feature;
|
|
37
|
+
const {
|
|
38
|
+
layout
|
|
39
|
+
} = operation || {};
|
|
40
|
+
if (!layout || !_format.default.isLCMsLayout(layout)) {
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
const onSelectPeakGroup = () => {
|
|
44
|
+
const payload = {
|
|
45
|
+
graphIndex,
|
|
46
|
+
sweepType: _list_ui.LIST_UI_SWEEP_TYPE.PEAK_GROUP_SELECT
|
|
47
|
+
};
|
|
48
|
+
setUiSweepTypeAct(payload);
|
|
49
|
+
};
|
|
50
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
51
|
+
className: classes.group,
|
|
52
|
+
"data-testid": "Zoom",
|
|
53
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, {
|
|
54
|
+
title: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
55
|
+
className: "txt-sv-tp",
|
|
56
|
+
children: "Select peak group"
|
|
57
|
+
}),
|
|
58
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_common.MuButton, {
|
|
59
|
+
className: (0, _classnames.default)((0, _common.focusStyle)(isSelectingGroupSt, classes), 'btn-sv-bar-zoomin'),
|
|
60
|
+
onClick: onSelectPeakGroup,
|
|
61
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Troubleshoot.default, {
|
|
62
|
+
className: (0, _classnames.default)(classes.icon, classes.iconWp)
|
|
63
|
+
})
|
|
64
|
+
})
|
|
65
|
+
})
|
|
66
|
+
});
|
|
67
|
+
};
|
|
68
|
+
const mapStateToProps = (state, _) => (
|
|
69
|
+
// eslint-disable-line
|
|
70
|
+
{
|
|
71
|
+
isSelectingGroupSt: state.ui.sweepType === _list_ui.LIST_UI_SWEEP_TYPE.PEAK_GROUP_SELECT
|
|
72
|
+
});
|
|
73
|
+
const mapDispatchToProps = dispatch => (0, _redux.bindActionCreators)({
|
|
74
|
+
setUiSweepTypeAct: _ui.setUiSweepType
|
|
75
|
+
}, dispatch);
|
|
76
|
+
PeakGroup.propTypes = {
|
|
77
|
+
classes: _propTypes.default.object.isRequired,
|
|
78
|
+
feature: _propTypes.default.object.isRequired,
|
|
79
|
+
isSelectingGroupSt: _propTypes.default.bool.isRequired,
|
|
80
|
+
setUiSweepTypeAct: _propTypes.default.func.isRequired,
|
|
81
|
+
graphIndex: _propTypes.default.number.isRequired
|
|
82
|
+
};
|
|
83
|
+
var _default = exports.default = (0, _redux.compose)((0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps), (0, _withStyles.default)(styles))(PeakGroup);
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = exports.COLLAPSE_THRESHOLD = void 0;
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
+
var _ChevronRight = _interopRequireDefault(require("@mui/icons-material/ChevronRight"));
|
|
12
|
+
var _Tooltip = _interopRequireDefault(require("@mui/material/Tooltip"));
|
|
13
|
+
var _styles = require("@mui/styles");
|
|
14
|
+
var _common = require("./common");
|
|
15
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
17
|
+
/* eslint-disable react/function-component-definition, react/require-default-props,
|
|
18
|
+
react/jsx-props-no-spreading */
|
|
19
|
+
|
|
20
|
+
const COLLAPSE_THRESHOLD = exports.COLLAPSE_THRESHOLD = 4;
|
|
21
|
+
const styles = () => ({
|
|
22
|
+
groupItemsShell: {
|
|
23
|
+
display: 'inline-flex',
|
|
24
|
+
overflow: 'hidden',
|
|
25
|
+
transition: 'max-width 260ms ease, opacity 200ms ease'
|
|
26
|
+
},
|
|
27
|
+
groupItemsCollapsed: {
|
|
28
|
+
maxWidth: 0,
|
|
29
|
+
opacity: 0
|
|
30
|
+
},
|
|
31
|
+
groupItemsExpanded: {
|
|
32
|
+
maxWidth: 720,
|
|
33
|
+
opacity: 1
|
|
34
|
+
},
|
|
35
|
+
groupItemsTrack: {
|
|
36
|
+
alignItems: 'flex-end',
|
|
37
|
+
display: 'inline-flex',
|
|
38
|
+
flexWrap: 'nowrap',
|
|
39
|
+
gap: _common.TOOLBAR_GROUP_GAP,
|
|
40
|
+
whiteSpace: 'nowrap'
|
|
41
|
+
},
|
|
42
|
+
groupChevron: {
|
|
43
|
+
fontSize: 20,
|
|
44
|
+
transition: 'transform 220ms ease'
|
|
45
|
+
},
|
|
46
|
+
groupChevronExpanded: {
|
|
47
|
+
transform: 'rotate(90deg)'
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
const countItems = children => _react.default.Children.toArray(children).length;
|
|
51
|
+
const CollapsibleToolbarGroup = ({
|
|
52
|
+
classes,
|
|
53
|
+
className,
|
|
54
|
+
children,
|
|
55
|
+
collapseThreshold,
|
|
56
|
+
...rest
|
|
57
|
+
}) => {
|
|
58
|
+
const itemCount = countItems(children);
|
|
59
|
+
const isCollapsible = itemCount > collapseThreshold;
|
|
60
|
+
const [expanded, setExpanded] = (0, _react.useState)(false);
|
|
61
|
+
if (!isCollapsible) {
|
|
62
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
63
|
+
className: className,
|
|
64
|
+
...rest,
|
|
65
|
+
children: children
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
69
|
+
className: className,
|
|
70
|
+
...rest,
|
|
71
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, {
|
|
72
|
+
title: expanded ? 'Collapse' : 'Expand',
|
|
73
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
74
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_common.MuButton, {
|
|
75
|
+
className: "btn-sv-bar-group-toggle",
|
|
76
|
+
onClick: () => setExpanded(prev => !prev),
|
|
77
|
+
"aria-expanded": expanded,
|
|
78
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChevronRight.default, {
|
|
79
|
+
className: (0, _classnames.default)(classes.groupChevron, expanded && classes.groupChevronExpanded)
|
|
80
|
+
})
|
|
81
|
+
})
|
|
82
|
+
})
|
|
83
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
84
|
+
className: (0, _classnames.default)(classes.groupItemsShell, expanded ? classes.groupItemsExpanded : classes.groupItemsCollapsed),
|
|
85
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
86
|
+
className: classes.groupItemsTrack,
|
|
87
|
+
children: children
|
|
88
|
+
})
|
|
89
|
+
})]
|
|
90
|
+
});
|
|
91
|
+
};
|
|
92
|
+
CollapsibleToolbarGroup.propTypes = {
|
|
93
|
+
classes: _propTypes.default.object.isRequired,
|
|
94
|
+
className: _propTypes.default.string,
|
|
95
|
+
children: _propTypes.default.node,
|
|
96
|
+
collapseThreshold: _propTypes.default.number
|
|
97
|
+
};
|
|
98
|
+
CollapsibleToolbarGroup.defaultProps = {
|
|
99
|
+
collapseThreshold: COLLAPSE_THRESHOLD
|
|
100
|
+
};
|
|
101
|
+
var _default = exports.default = (0, _styles.withStyles)(styles)(CollapsibleToolbarGroup);
|
|
@@ -26,18 +26,19 @@ const useStyles = (0, _styles.makeStyles)(theme => ({
|
|
|
26
26
|
color: 'black'
|
|
27
27
|
}
|
|
28
28
|
}));
|
|
29
|
-
const MuButton = props => {
|
|
29
|
+
const MuButton = exports.MuButton = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
|
30
30
|
const classes = useStyles();
|
|
31
31
|
const {
|
|
32
32
|
className,
|
|
33
33
|
...other
|
|
34
34
|
} = props;
|
|
35
35
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
|
|
36
|
+
ref: ref,
|
|
36
37
|
className: (0, _classnames.default)(classes.muiBtn, className),
|
|
37
38
|
...other
|
|
38
39
|
});
|
|
39
|
-
};
|
|
40
|
-
|
|
40
|
+
});
|
|
41
|
+
MuButton.displayName = 'MuButton';
|
|
41
42
|
const commonStyle = exports.commonStyle = {
|
|
42
43
|
card: {
|
|
43
44
|
margin: '0 0 5px 52px',
|
|
@@ -30,7 +30,39 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
30
30
|
/* eslint-disable prefer-object-spread, function-paren-newline,
|
|
31
31
|
react/function-component-definition, react/require-default-props */
|
|
32
32
|
|
|
33
|
-
const styles = () => Object.assign({}, {
|
|
33
|
+
const styles = () => Object.assign({}, {
|
|
34
|
+
cardFlex: {
|
|
35
|
+
display: 'flex',
|
|
36
|
+
flexWrap: 'wrap',
|
|
37
|
+
alignItems: 'center',
|
|
38
|
+
justifyContent: 'space-between',
|
|
39
|
+
columnGap: 8,
|
|
40
|
+
rowGap: 4
|
|
41
|
+
},
|
|
42
|
+
lcMsToolbarLeft: {
|
|
43
|
+
display: 'flex',
|
|
44
|
+
flexWrap: 'wrap',
|
|
45
|
+
alignItems: 'center',
|
|
46
|
+
columnGap: 4,
|
|
47
|
+
rowGap: 4,
|
|
48
|
+
flex: '1 1 auto',
|
|
49
|
+
minWidth: 0
|
|
50
|
+
},
|
|
51
|
+
lcMsToolbarRight: {
|
|
52
|
+
display: 'flex',
|
|
53
|
+
alignItems: 'center',
|
|
54
|
+
justifyContent: 'flex-end',
|
|
55
|
+
flex: '0 1 auto',
|
|
56
|
+
minWidth: 0
|
|
57
|
+
},
|
|
58
|
+
lcMsToolbarRightCluster: {
|
|
59
|
+
display: 'flex',
|
|
60
|
+
flexWrap: 'wrap',
|
|
61
|
+
alignItems: 'center',
|
|
62
|
+
columnGap: 8,
|
|
63
|
+
rowGap: 4
|
|
64
|
+
}
|
|
65
|
+
}, _common.commonStyle);
|
|
34
66
|
const CmdBar = ({
|
|
35
67
|
classes,
|
|
36
68
|
feature,
|
|
@@ -40,19 +72,16 @@ const CmdBar = ({
|
|
|
40
72
|
editorOnly,
|
|
41
73
|
jcampIdx,
|
|
42
74
|
hideThreshold,
|
|
43
|
-
|
|
75
|
+
hideMainEditTools,
|
|
76
|
+
layoutSt,
|
|
77
|
+
prependLcMsToolbar
|
|
44
78
|
}) => {
|
|
45
79
|
const isCvLayout = _format.default.isCyclicVoltaLayout(layoutSt);
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
51
|
-
jcampIdx: jcampIdx,
|
|
52
|
-
feature: feature
|
|
53
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_pecker.default, {
|
|
54
|
-
jcampIdx: jcampIdx
|
|
55
|
-
}), isCvLayout ? null : /*#__PURE__*/(0, _jsxRuntime.jsx)(_integration.default, {}), isCvLayout ? null : /*#__PURE__*/(0, _jsxRuntime.jsx)(_multiplicity.default, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_undo_redo.default, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_r04_submit.default, {
|
|
80
|
+
const rightCluster = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
81
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_r01_layout.default, {
|
|
82
|
+
feature: feature,
|
|
83
|
+
hasEdit: hasEdit
|
|
84
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_r04_submit.default, {
|
|
56
85
|
operations: operations,
|
|
57
86
|
feature: feature,
|
|
58
87
|
forecast: forecast,
|
|
@@ -62,18 +91,42 @@ const CmdBar = ({
|
|
|
62
91
|
}), hideThreshold ? null : /*#__PURE__*/(0, _jsxRuntime.jsx)(_r03_threshold.default, {
|
|
63
92
|
feature: feature,
|
|
64
93
|
hasEdit: hasEdit
|
|
65
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_r01_layout.default, {
|
|
66
|
-
feature: feature,
|
|
67
|
-
hasEdit: hasEdit
|
|
68
94
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_r07_wavelength_btn.default, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_r10_cv_density.default, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_r08_change_axes.default, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_r09_detector.default, {})]
|
|
69
95
|
});
|
|
96
|
+
if (prependLcMsToolbar) {
|
|
97
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
98
|
+
className: `${classes.card} ${classes.cardFlex}`,
|
|
99
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
100
|
+
className: classes.lcMsToolbarLeft,
|
|
101
|
+
children: prependLcMsToolbar
|
|
102
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
103
|
+
className: classes.lcMsToolbarRight,
|
|
104
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
105
|
+
className: classes.lcMsToolbarRightCluster,
|
|
106
|
+
children: rightCluster
|
|
107
|
+
})
|
|
108
|
+
})]
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
112
|
+
className: classes.card,
|
|
113
|
+
children: [hideMainEditTools ? null : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
114
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_viewer.default, {
|
|
115
|
+
editorOnly: editorOnly
|
|
116
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_zoom.default, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_peak.default, {
|
|
117
|
+
jcampIdx: jcampIdx,
|
|
118
|
+
feature: feature
|
|
119
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_pecker.default, {
|
|
120
|
+
jcampIdx: jcampIdx
|
|
121
|
+
}), isCvLayout ? null : /*#__PURE__*/(0, _jsxRuntime.jsx)(_integration.default, {}), isCvLayout ? null : /*#__PURE__*/(0, _jsxRuntime.jsx)(_multiplicity.default, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_undo_redo.default, {})]
|
|
122
|
+
}), rightCluster]
|
|
123
|
+
});
|
|
70
124
|
};
|
|
71
125
|
const mapStateToProps = (state, _) => (
|
|
72
126
|
// eslint-disable-line
|
|
73
127
|
{
|
|
74
128
|
layoutSt: state.layout
|
|
75
129
|
});
|
|
76
|
-
const mapDispatchToProps = dispatch => (0, _redux.bindActionCreators)({}, dispatch);
|
|
77
130
|
CmdBar.propTypes = {
|
|
78
131
|
classes: _propTypes.default.object.isRequired,
|
|
79
132
|
feature: _propTypes.default.object.isRequired,
|
|
@@ -83,6 +136,11 @@ CmdBar.propTypes = {
|
|
|
83
136
|
editorOnly: _propTypes.default.bool.isRequired,
|
|
84
137
|
layoutSt: _propTypes.default.string.isRequired,
|
|
85
138
|
jcampIdx: _propTypes.default.any,
|
|
86
|
-
hideThreshold: _propTypes.default.bool
|
|
139
|
+
hideThreshold: _propTypes.default.bool,
|
|
140
|
+
hideMainEditTools: _propTypes.default.bool,
|
|
141
|
+
prependLcMsToolbar: _propTypes.default.node
|
|
142
|
+
};
|
|
143
|
+
CmdBar.defaultProps = {
|
|
144
|
+
prependLcMsToolbar: null
|
|
87
145
|
};
|
|
88
|
-
var _default = exports.default = (0, _redux.compose)((0, _reactRedux.connect)(mapStateToProps,
|
|
146
|
+
var _default = exports.default = (0, _redux.compose)((0, _reactRedux.connect)(mapStateToProps, null), (0, _withStyles.default)(styles))(CmdBar);
|