@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
|
@@ -10,6 +10,7 @@ require("@testing-library/jest-dom");
|
|
|
10
10
|
var _list_layout = require("../../../../constants/list_layout");
|
|
11
11
|
var _material = require("@mui/material");
|
|
12
12
|
var _styles = require("@mui/styles");
|
|
13
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
14
|
const mockStore = (0, _reduxMockStore.default)([]);
|
|
14
15
|
const store = mockStore({
|
|
15
16
|
curve: {
|
|
@@ -46,40 +47,44 @@ const feature = {};
|
|
|
46
47
|
describe("<InfoPanel />", () => {
|
|
47
48
|
let AppWrapper;
|
|
48
49
|
beforeEach(() => {
|
|
49
|
-
AppWrapper =
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
50
|
+
AppWrapper = ({
|
|
51
|
+
store,
|
|
52
|
+
children
|
|
53
|
+
}) => {
|
|
54
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactRedux.Provider, {
|
|
55
|
+
store: store,
|
|
56
|
+
children: [" ", children, " "]
|
|
57
|
+
});
|
|
57
58
|
};
|
|
58
59
|
});
|
|
59
60
|
test('Cannot render info panel', () => {
|
|
60
|
-
const renderer = /*#__PURE__*/
|
|
61
|
-
store: store
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
61
|
+
const renderer = /*#__PURE__*/(0, _jsxRuntime.jsx)(AppWrapper, {
|
|
62
|
+
store: store,
|
|
63
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.ThemeProvider, {
|
|
64
|
+
theme: theme,
|
|
65
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_info.default, {
|
|
66
|
+
expand: false,
|
|
67
|
+
onExapnd: () => {}
|
|
68
|
+
})
|
|
69
|
+
})
|
|
70
|
+
});
|
|
68
71
|
const {
|
|
69
72
|
queryByTestId
|
|
70
73
|
} = (0, _react2.render)(renderer);
|
|
71
74
|
expect(queryByTestId('PanelInfo')).not.toBeInTheDocument();
|
|
72
75
|
});
|
|
73
76
|
test('Render info panel', () => {
|
|
74
|
-
const renderer = /*#__PURE__*/
|
|
75
|
-
store: store
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
77
|
+
const renderer = /*#__PURE__*/(0, _jsxRuntime.jsx)(AppWrapper, {
|
|
78
|
+
store: store,
|
|
79
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.ThemeProvider, {
|
|
80
|
+
theme: theme,
|
|
81
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_info.default, {
|
|
82
|
+
expand: false,
|
|
83
|
+
onExapnd: () => {},
|
|
84
|
+
feature: feature
|
|
85
|
+
})
|
|
86
|
+
})
|
|
87
|
+
});
|
|
83
88
|
const {
|
|
84
89
|
queryByTestId
|
|
85
90
|
} = (0, _react2.render)(renderer);
|
|
@@ -10,6 +10,7 @@ require("@testing-library/jest-dom");
|
|
|
10
10
|
var _list_layout = require("../../../../constants/list_layout");
|
|
11
11
|
var _material = require("@mui/material");
|
|
12
12
|
var _styles = require("@mui/styles");
|
|
13
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
14
|
const mockStore = (0, _reduxMockStore.default)([]);
|
|
14
15
|
const store = mockStore({
|
|
15
16
|
editPeak: {
|
|
@@ -57,39 +58,43 @@ const theme = (0, _material.createTheme)({
|
|
|
57
58
|
describe("<Peaks />", () => {
|
|
58
59
|
let AppWrapper;
|
|
59
60
|
beforeEach(() => {
|
|
60
|
-
AppWrapper =
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}
|
|
61
|
+
AppWrapper = ({
|
|
62
|
+
store,
|
|
63
|
+
children
|
|
64
|
+
}) => {
|
|
65
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactRedux.Provider, {
|
|
66
|
+
store: store,
|
|
67
|
+
children: [" ", children, " "]
|
|
68
|
+
});
|
|
68
69
|
};
|
|
69
70
|
});
|
|
70
71
|
test('Render peaks panel info', () => {
|
|
71
|
-
const renderer = /*#__PURE__*/
|
|
72
|
-
store: store
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
72
|
+
const renderer = /*#__PURE__*/(0, _jsxRuntime.jsx)(AppWrapper, {
|
|
73
|
+
store: store,
|
|
74
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.ThemeProvider, {
|
|
75
|
+
theme: theme,
|
|
76
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_peaks.default, {
|
|
77
|
+
expand: false,
|
|
78
|
+
onExapnd: () => {}
|
|
79
|
+
})
|
|
80
|
+
})
|
|
81
|
+
});
|
|
79
82
|
const {
|
|
80
83
|
queryByTestId
|
|
81
84
|
} = (0, _react2.render)(renderer);
|
|
82
85
|
expect(queryByTestId('PeaksPanelInfo')).toBeInTheDocument();
|
|
83
86
|
});
|
|
84
87
|
test('Render peaks panel with invalid store list', () => {
|
|
85
|
-
const renderer = /*#__PURE__*/
|
|
86
|
-
store: failedStore
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
88
|
+
const renderer = /*#__PURE__*/(0, _jsxRuntime.jsx)(AppWrapper, {
|
|
89
|
+
store: failedStore,
|
|
90
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.ThemeProvider, {
|
|
91
|
+
theme: theme,
|
|
92
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_peaks.default, {
|
|
93
|
+
expand: false,
|
|
94
|
+
onExapnd: () => {}
|
|
95
|
+
})
|
|
96
|
+
})
|
|
97
|
+
});
|
|
93
98
|
const {
|
|
94
99
|
queryByTestId
|
|
95
100
|
} = (0, _react2.render)(renderer);
|
package/dist/actions/manager.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.resetInitNmr = exports.resetInitMs = exports.resetInitCommonWithIntergation = exports.resetInitCommon = exports.resetDetector = exports.resetAll = void 0;
|
|
6
|
+
exports.resetMultiplicity = exports.resetInitNmr = exports.resetInitMs = exports.resetInitCommonWithIntergation = exports.resetInitCommon = exports.resetDetector = exports.resetAll = void 0;
|
|
7
7
|
var _action_type = require("../constants/action_type");
|
|
8
8
|
const resetAll = payload => ({
|
|
9
9
|
type: _action_type.MANAGER.RESETALL,
|
|
@@ -33,6 +33,10 @@ exports.resetInitCommonWithIntergation = resetInitCommonWithIntergation;
|
|
|
33
33
|
const resetDetector = () => ({
|
|
34
34
|
type: _action_type.MANAGER.RESET_DETECTOR
|
|
35
35
|
});
|
|
36
|
+
exports.resetDetector = resetDetector;
|
|
37
|
+
const resetMultiplicity = () => ({
|
|
38
|
+
type: _action_type.MANAGER.RESET_MULTIPLICITY
|
|
39
|
+
});
|
|
36
40
|
|
|
37
41
|
// eslint-disable-line
|
|
38
|
-
exports.
|
|
42
|
+
exports.resetMultiplicity = resetMultiplicity;
|
package/dist/actions/ui.js
CHANGED
|
@@ -10,14 +10,11 @@ const setUiViewerType = payload => ({
|
|
|
10
10
|
payload
|
|
11
11
|
});
|
|
12
12
|
exports.setUiViewerType = setUiViewerType;
|
|
13
|
-
const setUiSweepType =
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
jcampIdx
|
|
19
|
-
};
|
|
20
|
-
};
|
|
13
|
+
const setUiSweepType = (payload, jcampIdx = 0) => ({
|
|
14
|
+
type: _action_type.UI.SWEEP.SET_TYPE,
|
|
15
|
+
payload,
|
|
16
|
+
jcampIdx
|
|
17
|
+
});
|
|
21
18
|
exports.setUiSweepType = setUiSweepType;
|
|
22
19
|
const selectUiSweep = payload => ({
|
|
23
20
|
type: _action_type.UI.SWEEP.SELECT,
|
|
@@ -29,17 +26,12 @@ const scrollUiWheel = payload => ({
|
|
|
29
26
|
payload
|
|
30
27
|
});
|
|
31
28
|
exports.scrollUiWheel = scrollUiWheel;
|
|
32
|
-
const clickUiTarget =
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
voltammetryPeakIdx,
|
|
41
|
-
jcampIdx,
|
|
42
|
-
onPecker
|
|
43
|
-
};
|
|
44
|
-
};
|
|
29
|
+
const clickUiTarget = (payload, onPeak, voltammetryPeakIdx = 0, jcampIdx = 0, onPecker = false) => ({
|
|
30
|
+
type: _action_type.UI.CLICK_TARGET,
|
|
31
|
+
payload,
|
|
32
|
+
onPeak,
|
|
33
|
+
voltammetryPeakIdx,
|
|
34
|
+
jcampIdx,
|
|
35
|
+
onPecker
|
|
36
|
+
});
|
|
45
37
|
exports.clickUiTarget = clickUiTarget;
|
package/dist/app.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
Object.defineProperty(exports, "FN", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () {
|
|
9
|
+
get: function get() {
|
|
10
10
|
return _fn.default;
|
|
11
11
|
}
|
|
12
12
|
});
|
|
@@ -22,6 +22,7 @@ var _index = _interopRequireDefault(require("./reducers/index"));
|
|
|
22
22
|
var _index2 = _interopRequireDefault(require("./sagas/index"));
|
|
23
23
|
var _layer_init = _interopRequireDefault(require("./layer_init"));
|
|
24
24
|
var _fn = _interopRequireDefault(require("./fn"));
|
|
25
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
25
26
|
/* eslint-disable react/function-component-definition, react/require-default-props */
|
|
26
27
|
|
|
27
28
|
// eslint-disable-line
|
|
@@ -44,50 +45,49 @@ const ensureQuillDelta = descs => {
|
|
|
44
45
|
};
|
|
45
46
|
|
|
46
47
|
// - - - React - - -
|
|
47
|
-
const SpectraEditor =
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
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
|
-
};
|
|
48
|
+
const SpectraEditor = ({
|
|
49
|
+
entity,
|
|
50
|
+
others,
|
|
51
|
+
cLabel,
|
|
52
|
+
xLabel,
|
|
53
|
+
yLabel,
|
|
54
|
+
operations,
|
|
55
|
+
forecast,
|
|
56
|
+
molSvg,
|
|
57
|
+
editorOnly,
|
|
58
|
+
descriptions,
|
|
59
|
+
exactMass,
|
|
60
|
+
canChangeDescription,
|
|
61
|
+
onDescriptionChanged,
|
|
62
|
+
multiEntities,
|
|
63
|
+
multiMolSvgs,
|
|
64
|
+
entityFileNames,
|
|
65
|
+
userManualLink
|
|
66
|
+
}) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRedux.Provider, {
|
|
67
|
+
store: store,
|
|
68
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.StyledEngineProvider, {
|
|
69
|
+
injectFirst: true,
|
|
70
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_layer_init.default, {
|
|
71
|
+
entity: entity,
|
|
72
|
+
multiEntities: multiEntities,
|
|
73
|
+
entityFileNames: entityFileNames,
|
|
74
|
+
userManualLink: userManualLink,
|
|
75
|
+
others: others,
|
|
76
|
+
cLabel: cLabel,
|
|
77
|
+
xLabel: xLabel,
|
|
78
|
+
yLabel: yLabel,
|
|
79
|
+
forecast: forecast,
|
|
80
|
+
operations: operations,
|
|
81
|
+
descriptions: ensureQuillDelta(descriptions),
|
|
82
|
+
molSvg: molSvg,
|
|
83
|
+
multiMolSvgs: multiMolSvgs,
|
|
84
|
+
editorOnly: editorOnly,
|
|
85
|
+
exactMass: exactMass,
|
|
86
|
+
canChangeDescription: canChangeDescription,
|
|
87
|
+
onDescriptionChanged: onDescriptionChanged
|
|
88
|
+
})
|
|
89
|
+
})
|
|
90
|
+
});
|
|
91
91
|
exports.SpectraEditor = SpectraEditor;
|
|
92
92
|
SpectraEditor.propTypes = {
|
|
93
93
|
entity: _propTypes.default.object.isRequired,
|
|
@@ -106,7 +106,7 @@ SpectraEditor.propTypes = {
|
|
|
106
106
|
canChangeDescription: _propTypes.default.bool,
|
|
107
107
|
onDescriptionChanged: _propTypes.default.func,
|
|
108
108
|
userManualLink: _propTypes.default.object,
|
|
109
|
-
|
|
109
|
+
exactMass: _propTypes.default.string
|
|
110
110
|
};
|
|
111
111
|
SpectraEditor.defaultProps = {
|
|
112
112
|
others: {
|
|
@@ -122,7 +122,7 @@ SpectraEditor.defaultProps = {
|
|
|
122
122
|
operations: [],
|
|
123
123
|
descriptions: [],
|
|
124
124
|
molSvg: '',
|
|
125
|
-
|
|
125
|
+
exactMass: '',
|
|
126
126
|
multiMolSvgs: [],
|
|
127
127
|
editorOnly: false,
|
|
128
128
|
canChangeDescription: false,
|
|
@@ -18,43 +18,50 @@ var _ui = require("../../actions/ui");
|
|
|
18
18
|
var _cfg = _interopRequireDefault(require("../../helpers/cfg"));
|
|
19
19
|
var _common = require("./common");
|
|
20
20
|
var _list_ui = require("../../constants/list_ui");
|
|
21
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
22
|
/* eslint-disable prefer-object-spread, react/function-component-definition */
|
|
22
23
|
|
|
23
24
|
const styles = () => Object.assign({}, _common.commonStyle);
|
|
24
|
-
const Viewer =
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
} = _ref;
|
|
25
|
+
const Viewer = ({
|
|
26
|
+
classes,
|
|
27
|
+
isfocusSpectrumSt,
|
|
28
|
+
isfocusAnalysisSt,
|
|
29
|
+
hideCmdAnaViewerSt,
|
|
30
|
+
disableCmdAnaViewerSt,
|
|
31
|
+
setUiViewerTypeAct
|
|
32
|
+
}) => {
|
|
33
33
|
const onViewSpectrum = () => setUiViewerTypeAct(_list_ui.LIST_UI_VIEWER_TYPE.SPECTRUM);
|
|
34
34
|
const onViewAnalysis = () => setUiViewerTypeAct(_list_ui.LIST_UI_VIEWER_TYPE.ANALYSIS);
|
|
35
|
-
return /*#__PURE__*/
|
|
35
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
36
36
|
className: classes.group,
|
|
37
|
-
"data-testid": "Viewer"
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
},
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
37
|
+
"data-testid": "Viewer",
|
|
38
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, {
|
|
39
|
+
title: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
40
|
+
className: "txt-sv-tp",
|
|
41
|
+
children: "Spectrum Viewer"
|
|
42
|
+
}),
|
|
43
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_common.MuButton, {
|
|
44
|
+
className: (0, _classnames.default)((0, _common.focusStyle)(isfocusSpectrumSt, classes), 'btn-sv-bar-spctrum'),
|
|
45
|
+
onClick: onViewSpectrum,
|
|
46
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_TimelineOutlined.default, {
|
|
47
|
+
className: classes.icon
|
|
48
|
+
})
|
|
49
|
+
})
|
|
50
|
+
}), hideCmdAnaViewerSt ? null : /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, {
|
|
51
|
+
title: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
52
|
+
className: "txt-sv-tp",
|
|
53
|
+
children: "Analysis Viewer"
|
|
54
|
+
}),
|
|
55
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_common.MuButton, {
|
|
56
|
+
className: (0, _classnames.default)((0, _common.focusStyle)(isfocusAnalysisSt, classes), 'btn-sv-bar-analysis'),
|
|
57
|
+
disabled: disableCmdAnaViewerSt,
|
|
58
|
+
onClick: onViewAnalysis,
|
|
59
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SpellcheckOutlined.default, {
|
|
60
|
+
className: classes.icon
|
|
61
|
+
})
|
|
62
|
+
})
|
|
63
|
+
})]
|
|
64
|
+
});
|
|
58
65
|
};
|
|
59
66
|
const mapStateToProps = (state, props) => (
|
|
60
67
|
// eslint-disable-line
|
|
@@ -17,39 +17,46 @@ var _Tooltip = _interopRequireDefault(require("@mui/material/Tooltip"));
|
|
|
17
17
|
var _ui = require("../../actions/ui");
|
|
18
18
|
var _common = require("./common");
|
|
19
19
|
var _list_ui = require("../../constants/list_ui");
|
|
20
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
21
|
/* eslint-disable prefer-object-spread, react/function-component-definition */
|
|
21
22
|
|
|
22
23
|
const styles = () => Object.assign({}, _common.commonStyle);
|
|
23
|
-
const Zoom =
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
} = _ref;
|
|
24
|
+
const Zoom = ({
|
|
25
|
+
classes,
|
|
26
|
+
isfocusZoomSt,
|
|
27
|
+
setUiSweepTypeAct
|
|
28
|
+
}) => {
|
|
29
29
|
const onSweepZoomIn = () => setUiSweepTypeAct(_list_ui.LIST_UI_SWEEP_TYPE.ZOOMIN);
|
|
30
30
|
const onSweepZoomReset = () => setUiSweepTypeAct(_list_ui.LIST_UI_SWEEP_TYPE.ZOOMRESET);
|
|
31
|
-
return /*#__PURE__*/
|
|
31
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
32
32
|
className: classes.group,
|
|
33
|
-
"data-testid": "Zoom"
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
},
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
33
|
+
"data-testid": "Zoom",
|
|
34
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, {
|
|
35
|
+
title: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
36
|
+
className: "txt-sv-tp",
|
|
37
|
+
children: "Zoom In"
|
|
38
|
+
}),
|
|
39
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_common.MuButton, {
|
|
40
|
+
className: (0, _classnames.default)((0, _common.focusStyle)(isfocusZoomSt, classes), 'btn-sv-bar-zoomin'),
|
|
41
|
+
onClick: onSweepZoomIn,
|
|
42
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ZoomInOutlined.default, {
|
|
43
|
+
className: (0, _classnames.default)(classes.icon, classes.iconWp)
|
|
44
|
+
})
|
|
45
|
+
})
|
|
46
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, {
|
|
47
|
+
title: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
48
|
+
className: "txt-sv-tp",
|
|
49
|
+
children: "Reset Zoom"
|
|
50
|
+
}),
|
|
51
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_common.MuButton, {
|
|
52
|
+
className: (0, _classnames.default)('btn-sv-bar-zoomreset'),
|
|
53
|
+
onClick: onSweepZoomReset,
|
|
54
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_FindReplaceOutlined.default, {
|
|
55
|
+
className: classes.icon
|
|
56
|
+
})
|
|
57
|
+
})
|
|
58
|
+
})]
|
|
59
|
+
});
|
|
53
60
|
};
|
|
54
61
|
const mapStateToProps = (state, _) => (
|
|
55
62
|
// eslint-disable-line
|