@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
|
@@ -26,42 +26,40 @@ var _format = _interopRequireDefault(require("../../helpers/format"));
|
|
|
26
26
|
react/function-component-definition, react/require-default-props, max-len,
|
|
27
27
|
react/no-unused-prop-types */
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
curveIdx: curveIdx
|
|
43
|
-
});
|
|
44
|
-
};
|
|
45
|
-
var onChange = function onChange(e) {
|
|
46
|
-
return setIntegrationFkrAct({
|
|
47
|
-
factor: e.target.value,
|
|
48
|
-
curveIdx: curveIdx
|
|
49
|
-
});
|
|
50
|
-
};
|
|
51
|
-
var onEnterPress = function onEnterPress(e) {
|
|
29
|
+
const styles = () => Object.assign({
|
|
30
|
+
field: {
|
|
31
|
+
width: 80
|
|
32
|
+
},
|
|
33
|
+
txtIcon: {}
|
|
34
|
+
}, _common.commonStyle);
|
|
35
|
+
const iconSize = '16px';
|
|
36
|
+
const setFactor = (classes, isDisable, integrationSt, setIntegrationFkrAct, curveIdx) => {
|
|
37
|
+
const onFactorChanged = e => setIntegrationFkrAct({
|
|
38
|
+
factor: e.target.value,
|
|
39
|
+
curveIdx
|
|
40
|
+
});
|
|
41
|
+
const onEnterPress = e => {
|
|
52
42
|
if (e.key === 'Enter') {
|
|
53
43
|
setIntegrationFkrAct({
|
|
54
44
|
factor: e.target.value,
|
|
55
|
-
curveIdx
|
|
45
|
+
curveIdx
|
|
56
46
|
});
|
|
57
47
|
}
|
|
58
48
|
};
|
|
49
|
+
let refFactor = 1.00;
|
|
50
|
+
const {
|
|
51
|
+
integrations
|
|
52
|
+
} = integrationSt;
|
|
53
|
+
if (integrations && curveIdx < integrations.length) {
|
|
54
|
+
const selectedIntegration = integrations[curveIdx];
|
|
55
|
+
refFactor = selectedIntegration.refFactor || 1.00;
|
|
56
|
+
}
|
|
59
57
|
return /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
|
60
58
|
className: classes.field,
|
|
61
59
|
disabled: isDisable,
|
|
62
60
|
id: "intg-factor-name",
|
|
63
61
|
type: "number",
|
|
64
|
-
value: refFactor
|
|
62
|
+
value: refFactor,
|
|
65
63
|
margin: "none",
|
|
66
64
|
InputProps: {
|
|
67
65
|
className: (0, _classnames.default)(classes.txtInput, 'txtfield-sv-bar-input')
|
|
@@ -69,42 +67,36 @@ var setFactor = function setFactor(classes, isDisable, refFactor, setIntegration
|
|
|
69
67
|
label: /*#__PURE__*/_react.default.createElement("span", {
|
|
70
68
|
className: (0, _classnames.default)(classes.txtLabel, 'txtfield-sv-bar-label')
|
|
71
69
|
}, "Ref Area"),
|
|
72
|
-
onChange:
|
|
73
|
-
onBlur:
|
|
74
|
-
|
|
70
|
+
onChange: onFactorChanged,
|
|
71
|
+
onBlur: onFactorChanged,
|
|
72
|
+
onKeyUp: onEnterPress,
|
|
75
73
|
variant: "outlined"
|
|
76
74
|
});
|
|
77
75
|
};
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
};
|
|
102
|
-
var curveIdx = curveSt.curveIdx;
|
|
103
|
-
var onClearAll = function onClearAll() {
|
|
104
|
-
return clearIntegrationAllAct({
|
|
105
|
-
curveIdx: curveIdx
|
|
106
|
-
});
|
|
107
|
-
};
|
|
76
|
+
const iconColor = criteria => criteria ? '#fff' : '#000';
|
|
77
|
+
const Integration = _ref => {
|
|
78
|
+
let {
|
|
79
|
+
classes,
|
|
80
|
+
ignoreRef,
|
|
81
|
+
isDisableSt,
|
|
82
|
+
isFocusAddIntgSt,
|
|
83
|
+
isFocusRmIntgSt,
|
|
84
|
+
isFocusSetRefSt,
|
|
85
|
+
setUiSweepTypeAct,
|
|
86
|
+
setIntegrationFkrAct,
|
|
87
|
+
clearIntegrationAllAct,
|
|
88
|
+
curveSt,
|
|
89
|
+
integrationSt
|
|
90
|
+
} = _ref;
|
|
91
|
+
const onSweepIntegtAdd = () => setUiSweepTypeAct(_list_ui.LIST_UI_SWEEP_TYPE.INTEGRATION_ADD);
|
|
92
|
+
const onSweepIntegtRm = () => setUiSweepTypeAct(_list_ui.LIST_UI_SWEEP_TYPE.INTEGRATION_RM);
|
|
93
|
+
const onSweepIntegtSR = () => setUiSweepTypeAct(_list_ui.LIST_UI_SWEEP_TYPE.INTEGRATION_SET_REF);
|
|
94
|
+
const {
|
|
95
|
+
curveIdx
|
|
96
|
+
} = curveSt;
|
|
97
|
+
const onClearAll = () => clearIntegrationAllAct({
|
|
98
|
+
curveIdx
|
|
99
|
+
});
|
|
108
100
|
return /*#__PURE__*/_react.default.createElement("span", {
|
|
109
101
|
className: classes.group
|
|
110
102
|
}, /*#__PURE__*/_react.default.createElement(_Tooltip.default, {
|
|
@@ -150,7 +142,7 @@ var Integration = function Integration(_ref) {
|
|
|
150
142
|
size: iconSize,
|
|
151
143
|
color: iconColor(isFocusSetRefSt || isDisableSt),
|
|
152
144
|
className: (0, _classnames.default)(classes.iconMdi, 'icon-sv-bar-refint')
|
|
153
|
-
})))), !ignoreRef ? setFactor(classes, isDisableSt,
|
|
145
|
+
})))), !ignoreRef ? setFactor(classes, isDisableSt, integrationSt, setIntegrationFkrAct, curveIdx) : null, /*#__PURE__*/_react.default.createElement(_tri_btn.default, {
|
|
154
146
|
content: {
|
|
155
147
|
tp: 'Clear All Integration'
|
|
156
148
|
},
|
|
@@ -164,39 +156,33 @@ var Integration = function Integration(_ref) {
|
|
|
164
156
|
className: (0, _classnames.default)(classes.txt, classes.txtIcon, 'txt-sv-bar-rmallint')
|
|
165
157
|
}, "x")));
|
|
166
158
|
};
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
setUiSweepTypeAct: _ui.setUiSweepType,
|
|
184
|
-
setIntegrationFkrAct: _integration.setIntegrationFkr,
|
|
185
|
-
clearIntegrationAllAct: _integration.clearIntegrationAll
|
|
186
|
-
}, dispatch);
|
|
187
|
-
};
|
|
159
|
+
const mapStateToProps = (state, props) => (
|
|
160
|
+
// eslint-disable-line
|
|
161
|
+
{
|
|
162
|
+
isDisableSt: _cfg.default.btnCmdIntg(state.layout),
|
|
163
|
+
isFocusAddIntgSt: state.ui.sweepType === _list_ui.LIST_UI_SWEEP_TYPE.INTEGRATION_ADD,
|
|
164
|
+
isFocusRmIntgSt: state.ui.sweepType === _list_ui.LIST_UI_SWEEP_TYPE.INTEGRATION_RM,
|
|
165
|
+
isFocusSetRefSt: state.ui.sweepType === _list_ui.LIST_UI_SWEEP_TYPE.INTEGRATION_SET_REF,
|
|
166
|
+
ignoreRef: _format.default.isHplcUvVisLayout(state.layout),
|
|
167
|
+
curveSt: state.curve,
|
|
168
|
+
integrationSt: state.integration.present
|
|
169
|
+
});
|
|
170
|
+
const mapDispatchToProps = dispatch => (0, _redux.bindActionCreators)({
|
|
171
|
+
setUiSweepTypeAct: _ui.setUiSweepType,
|
|
172
|
+
setIntegrationFkrAct: _integration.setIntegrationFkr,
|
|
173
|
+
clearIntegrationAllAct: _integration.clearIntegrationAll
|
|
174
|
+
}, dispatch);
|
|
188
175
|
Integration.propTypes = {
|
|
189
176
|
classes: _propTypes.default.object.isRequired,
|
|
190
177
|
isDisableSt: _propTypes.default.bool.isRequired,
|
|
191
178
|
isFocusAddIntgSt: _propTypes.default.bool.isRequired,
|
|
192
179
|
isFocusRmIntgSt: _propTypes.default.bool.isRequired,
|
|
193
180
|
isFocusSetRefSt: _propTypes.default.bool.isRequired,
|
|
194
|
-
refFactorSt: _propTypes.default.number.isRequired,
|
|
195
181
|
ignoreRef: _propTypes.default.bool.isRequired,
|
|
196
182
|
setUiSweepTypeAct: _propTypes.default.func.isRequired,
|
|
197
183
|
setIntegrationFkrAct: _propTypes.default.func.isRequired,
|
|
198
184
|
clearIntegrationAllAct: _propTypes.default.func.isRequired,
|
|
199
|
-
curveSt: _propTypes.default.object.isRequired
|
|
185
|
+
curveSt: _propTypes.default.object.isRequired,
|
|
186
|
+
integrationSt: _propTypes.default.object.isRequired
|
|
200
187
|
};
|
|
201
|
-
var _default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)((0, _styles.withStyles)(styles)(Integration));
|
|
202
|
-
exports.default = _default;
|
|
188
|
+
var _default = exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)((0, _styles.withStyles)(styles)(Integration));
|
|
@@ -22,39 +22,31 @@ var _common = require("./common");
|
|
|
22
22
|
react/function-component-definition, react/require-default-props, max-len,
|
|
23
23
|
react/no-unused-prop-types */
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
return setUiSweepTypeAct(_list_ui.LIST_UI_SWEEP_TYPE.MULTIPLICITY_PEAK_RM);
|
|
51
|
-
};
|
|
52
|
-
var curveIdx = curveSt.curveIdx;
|
|
53
|
-
var onClearAll = function onClearAll() {
|
|
54
|
-
return clearMpyAllAct({
|
|
55
|
-
curveIdx: curveIdx
|
|
56
|
-
});
|
|
57
|
-
};
|
|
25
|
+
const styles = () => Object.assign({}, _common.commonStyle);
|
|
26
|
+
const Multiplicity = _ref => {
|
|
27
|
+
let {
|
|
28
|
+
classes,
|
|
29
|
+
isFocusAddMpySt,
|
|
30
|
+
disableAddMpySt,
|
|
31
|
+
isFocusRmMpySt,
|
|
32
|
+
disableRmMpySt,
|
|
33
|
+
isFocusAddPeakSt,
|
|
34
|
+
isFocusRmPeakSt,
|
|
35
|
+
disableMpyPeakSt,
|
|
36
|
+
setUiSweepTypeAct,
|
|
37
|
+
clearMpyAllAct,
|
|
38
|
+
curveSt
|
|
39
|
+
} = _ref;
|
|
40
|
+
const onSweepMutAdd = () => setUiSweepTypeAct(_list_ui.LIST_UI_SWEEP_TYPE.MULTIPLICITY_SWEEP_ADD);
|
|
41
|
+
const onOneMutAdd = () => setUiSweepTypeAct(_list_ui.LIST_UI_SWEEP_TYPE.MULTIPLICITY_ONE_RM);
|
|
42
|
+
const onPeakMutAdd = () => setUiSweepTypeAct(_list_ui.LIST_UI_SWEEP_TYPE.MULTIPLICITY_PEAK_ADD);
|
|
43
|
+
const onPeakMutRm = () => setUiSweepTypeAct(_list_ui.LIST_UI_SWEEP_TYPE.MULTIPLICITY_PEAK_RM);
|
|
44
|
+
const {
|
|
45
|
+
curveIdx
|
|
46
|
+
} = curveSt;
|
|
47
|
+
const onClearAll = () => clearMpyAllAct({
|
|
48
|
+
curveIdx
|
|
49
|
+
});
|
|
58
50
|
return /*#__PURE__*/_react.default.createElement("span", {
|
|
59
51
|
className: classes.group
|
|
60
52
|
}, /*#__PURE__*/_react.default.createElement(_Tooltip.default, {
|
|
@@ -109,27 +101,22 @@ var Multiplicity = function Multiplicity(_ref) {
|
|
|
109
101
|
className: (0, _classnames.default)(classes.txt, 'txt-sv-bar-rmallmpy')
|
|
110
102
|
}, "Jx")));
|
|
111
103
|
};
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
return (0, _redux.bindActionCreators)({
|
|
129
|
-
setUiSweepTypeAct: _ui.setUiSweepType,
|
|
130
|
-
clearMpyAllAct: _multiplicity.clearMpyAll
|
|
131
|
-
}, dispatch);
|
|
132
|
-
};
|
|
104
|
+
const mapStateToProps = (state, props) => (
|
|
105
|
+
// eslint-disable-line
|
|
106
|
+
{
|
|
107
|
+
isFocusAddMpySt: state.ui.sweepType === _list_ui.LIST_UI_SWEEP_TYPE.MULTIPLICITY_SWEEP_ADD,
|
|
108
|
+
disableAddMpySt: _cfg.default.btnCmdMpy(state.layout),
|
|
109
|
+
isFocusRmMpySt: state.ui.sweepType === _list_ui.LIST_UI_SWEEP_TYPE.MULTIPLICITY_ONE_RM,
|
|
110
|
+
disableRmMpySt: _cfg.default.btnCmdMpy(state.layout),
|
|
111
|
+
isFocusAddPeakSt: state.ui.sweepType === _list_ui.LIST_UI_SWEEP_TYPE.MULTIPLICITY_PEAK_ADD,
|
|
112
|
+
isFocusRmPeakSt: state.ui.sweepType === _list_ui.LIST_UI_SWEEP_TYPE.MULTIPLICITY_PEAK_RM,
|
|
113
|
+
disableMpyPeakSt: _cfg.default.btnCmdMpyPeak(state.layout, state.multiplicity.present, state.curve.curveIdx),
|
|
114
|
+
curveSt: state.curve
|
|
115
|
+
});
|
|
116
|
+
const mapDispatchToProps = dispatch => (0, _redux.bindActionCreators)({
|
|
117
|
+
setUiSweepTypeAct: _ui.setUiSweepType,
|
|
118
|
+
clearMpyAllAct: _multiplicity.clearMpyAll
|
|
119
|
+
}, dispatch);
|
|
133
120
|
Multiplicity.propTypes = {
|
|
134
121
|
classes: _propTypes.default.object.isRequired,
|
|
135
122
|
isFocusAddMpySt: _propTypes.default.bool.isRequired,
|
|
@@ -143,5 +130,4 @@ Multiplicity.propTypes = {
|
|
|
143
130
|
clearMpyAllAct: _propTypes.default.func.isRequired,
|
|
144
131
|
curveSt: _propTypes.default.object.isRequired
|
|
145
132
|
};
|
|
146
|
-
var _default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)((0, _styles.withStyles)(styles)(Multiplicity));
|
|
147
|
-
exports.default = _default;
|
|
133
|
+
var _default = exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)((0, _styles.withStyles)(styles)(Multiplicity));
|
|
@@ -20,15 +20,15 @@ var _common = require("./common");
|
|
|
20
20
|
react/function-component-definition, react/require-default-props, max-len,
|
|
21
21
|
react/no-unused-prop-types */
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
23
|
+
const styles = () => Object.assign({}, _common.commonStyle);
|
|
24
|
+
const UndoRedo = _ref => {
|
|
25
|
+
let {
|
|
26
|
+
classes,
|
|
27
|
+
canUndo,
|
|
28
|
+
canRedo,
|
|
29
|
+
onUndoAct,
|
|
30
|
+
onRedoAct
|
|
31
|
+
} = _ref;
|
|
32
32
|
return /*#__PURE__*/_react.default.createElement("span", {
|
|
33
33
|
className: classes.group
|
|
34
34
|
}, /*#__PURE__*/_react.default.createElement(_Tooltip.default, {
|
|
@@ -53,31 +53,18 @@ var UndoRedo = function UndoRedo(_ref) {
|
|
|
53
53
|
className: classes.icon
|
|
54
54
|
})))));
|
|
55
55
|
};
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
);
|
|
70
|
-
};
|
|
71
|
-
var mapDispatchToProps = function mapDispatchToProps(dispatch) {
|
|
72
|
-
return {
|
|
73
|
-
onUndoAct: function onUndoAct() {
|
|
74
|
-
return dispatch(_reduxUndo.ActionCreators.undo());
|
|
75
|
-
},
|
|
76
|
-
onRedoAct: function onRedoAct() {
|
|
77
|
-
return dispatch(_reduxUndo.ActionCreators.redo());
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
};
|
|
56
|
+
const canUndoFunc = state => state.editPeak.past.length > 0 || state.integration.past.length > 0 || state.multiplicity.past.length > 0;
|
|
57
|
+
const canRedoFunc = state => state.editPeak.future.length > 0 || state.integration.future.length > 0 || state.multiplicity.future.length > 0;
|
|
58
|
+
const mapStateToProps = (state, _) => (
|
|
59
|
+
// eslint-disable-line
|
|
60
|
+
{
|
|
61
|
+
canUndo: canUndoFunc(state),
|
|
62
|
+
canRedo: canRedoFunc(state)
|
|
63
|
+
});
|
|
64
|
+
const mapDispatchToProps = dispatch => ({
|
|
65
|
+
onUndoAct: () => dispatch(_reduxUndo.ActionCreators.undo()),
|
|
66
|
+
onRedoAct: () => dispatch(_reduxUndo.ActionCreators.redo())
|
|
67
|
+
});
|
|
81
68
|
UndoRedo.propTypes = {
|
|
82
69
|
classes: _propTypes.default.object.isRequired,
|
|
83
70
|
canUndo: _propTypes.default.bool.isRequired,
|
|
@@ -85,5 +72,4 @@ UndoRedo.propTypes = {
|
|
|
85
72
|
onUndoAct: _propTypes.default.func.isRequired,
|
|
86
73
|
onRedoAct: _propTypes.default.func.isRequired
|
|
87
74
|
};
|
|
88
|
-
var _default = (0, _redux.compose)((0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps), (0, _styles.withStyles)(styles))(UndoRedo);
|
|
89
|
-
exports.default = _default;
|
|
75
|
+
var _default = exports.default = (0, _redux.compose)((0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps), (0, _styles.withStyles)(styles))(UndoRedo);
|
|
@@ -20,22 +20,18 @@ var _cfg = _interopRequireDefault(require("../../helpers/cfg"));
|
|
|
20
20
|
react/function-component-definition, react/require-default-props, max-len,
|
|
21
21
|
react/no-unused-prop-types */
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
};
|
|
36
|
-
var onSweepPeckerDELETE = function onSweepPeckerDELETE() {
|
|
37
|
-
return setUiSweepTypeAct(_list_ui.LIST_UI_SWEEP_TYPE.CYCLIC_VOLTA_RM_PECKER, jcampIdx);
|
|
38
|
-
};
|
|
23
|
+
const styles = () => Object.assign({}, _common.commonStyle);
|
|
24
|
+
const Pecker = _ref => {
|
|
25
|
+
let {
|
|
26
|
+
classes,
|
|
27
|
+
layoutSt,
|
|
28
|
+
isFocusAddPeckerSt,
|
|
29
|
+
isFocusRmPeckerSt,
|
|
30
|
+
setUiSweepTypeAct,
|
|
31
|
+
jcampIdx
|
|
32
|
+
} = _ref;
|
|
33
|
+
const onSweepPeckerAdd = () => setUiSweepTypeAct(_list_ui.LIST_UI_SWEEP_TYPE.CYCLIC_VOLTA_ADD_PECKER, jcampIdx);
|
|
34
|
+
const onSweepPeckerDELETE = () => setUiSweepTypeAct(_list_ui.LIST_UI_SWEEP_TYPE.CYCLIC_VOLTA_RM_PECKER, jcampIdx);
|
|
39
35
|
return !_cfg.default.hidePanelCyclicVolta(layoutSt) ? /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement(_Tooltip.default, {
|
|
40
36
|
title: /*#__PURE__*/_react.default.createElement("span", {
|
|
41
37
|
className: "txt-sv-tp"
|
|
@@ -56,22 +52,17 @@ var Pecker = function Pecker(_ref) {
|
|
|
56
52
|
className: (0, _classnames.default)(classes.txt, 'txt-sv-bar-rmpeak')
|
|
57
53
|
}, "Pe-"))))) : /*#__PURE__*/_react.default.createElement("span", null);
|
|
58
54
|
};
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
};
|
|
70
|
-
var mapDispatchToProps = function mapDispatchToProps(dispatch) {
|
|
71
|
-
return (0, _redux.bindActionCreators)({
|
|
72
|
-
setUiSweepTypeAct: _ui.setUiSweepType
|
|
73
|
-
}, dispatch);
|
|
74
|
-
};
|
|
55
|
+
const mapStateToProps = (state, _) => (
|
|
56
|
+
// eslint-disable-line
|
|
57
|
+
{
|
|
58
|
+
layoutSt: state.layout,
|
|
59
|
+
isFocusAddPeckerSt: state.ui.sweepType === _list_ui.LIST_UI_SWEEP_TYPE.CYCLIC_VOLTA_ADD_PECKER,
|
|
60
|
+
isFocusRmPeckerSt: state.ui.sweepType === _list_ui.LIST_UI_SWEEP_TYPE.CYCLIC_VOLTA_RM_PECKER,
|
|
61
|
+
cyclicVotaSt: state.cyclicvolta
|
|
62
|
+
});
|
|
63
|
+
const mapDispatchToProps = dispatch => (0, _redux.bindActionCreators)({
|
|
64
|
+
setUiSweepTypeAct: _ui.setUiSweepType
|
|
65
|
+
}, dispatch);
|
|
75
66
|
Pecker.propTypes = {
|
|
76
67
|
classes: _propTypes.default.object.isRequired,
|
|
77
68
|
layoutSt: _propTypes.default.string.isRequired,
|
|
@@ -81,5 +72,4 @@ Pecker.propTypes = {
|
|
|
81
72
|
cyclicVotaSt: _propTypes.default.object.isRequired,
|
|
82
73
|
jcampIdx: _propTypes.default.any
|
|
83
74
|
};
|
|
84
|
-
var _default = (0, _redux.compose)((0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps), (0, _styles.withStyles)(styles))(Pecker);
|
|
85
|
-
exports.default = _default;
|
|
75
|
+
var _default = exports.default = (0, _redux.compose)((0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps), (0, _styles.withStyles)(styles))(Pecker);
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.focusStyle = exports.commonStyle = exports.MuButton = void 0;
|
|
8
8
|
var _styles = require("@material-ui/core/styles");
|
|
9
9
|
var _Button = _interopRequireDefault(require("@material-ui/core/Button"));
|
|
10
|
-
|
|
10
|
+
const MuButton = exports.MuButton = (0, _styles.withStyles)({
|
|
11
11
|
root: {
|
|
12
12
|
border: '1px solid #ccc',
|
|
13
13
|
borderRadius: 4,
|
|
@@ -20,8 +20,7 @@ var MuButton = (0, _styles.withStyles)({
|
|
|
20
20
|
width: 30
|
|
21
21
|
}
|
|
22
22
|
})(_Button.default);
|
|
23
|
-
exports.
|
|
24
|
-
var commonStyle = {
|
|
23
|
+
const commonStyle = exports.commonStyle = {
|
|
25
24
|
card: {
|
|
26
25
|
margin: '0 0 5px 52px',
|
|
27
26
|
border: '1px solid white',
|
|
@@ -86,12 +85,17 @@ var commonStyle = {
|
|
|
86
85
|
},
|
|
87
86
|
selectInput: {
|
|
88
87
|
height: 30
|
|
88
|
+
},
|
|
89
|
+
txtLabelBottomInput: {
|
|
90
|
+
fontFamily: 'Helvetica',
|
|
91
|
+
backgroundColor: 'white',
|
|
92
|
+
fontSize: 12,
|
|
93
|
+
margin: '22% 0 0 7px',
|
|
94
|
+
padding: '0 10px 0 10px',
|
|
95
|
+
transform: 'scale(0.75)'
|
|
89
96
|
}
|
|
90
97
|
};
|
|
91
|
-
|
|
92
|
-
var focusStyle = function focusStyle(criteria, cls) {
|
|
93
|
-
return criteria ? [cls.btnHt] : [];
|
|
94
|
-
};
|
|
98
|
+
const focusStyle = (criteria, cls) => criteria ? [cls.btnHt] : [];
|
|
95
99
|
|
|
96
100
|
// eslint-disable-line
|
|
97
101
|
exports.focusStyle = focusStyle;
|
|
@@ -25,18 +25,18 @@ var _pecker = _interopRequireDefault(require("./07_pecker"));
|
|
|
25
25
|
/* eslint-disable prefer-object-spread, function-paren-newline,
|
|
26
26
|
react/function-component-definition, react/require-default-props */
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
28
|
+
const styles = () => Object.assign({}, {}, _common.commonStyle);
|
|
29
|
+
const CmdBar = _ref => {
|
|
30
|
+
let {
|
|
31
|
+
classes,
|
|
32
|
+
feature,
|
|
33
|
+
hasEdit,
|
|
34
|
+
forecast,
|
|
35
|
+
operations,
|
|
36
|
+
editorOnly,
|
|
37
|
+
jcampIdx,
|
|
38
|
+
hideThreshold
|
|
39
|
+
} = _ref;
|
|
40
40
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
41
41
|
className: classes.card
|
|
42
42
|
}, /*#__PURE__*/_react.default.createElement(_viewer.default, {
|
|
@@ -60,15 +60,10 @@ var CmdBar = function CmdBar(_ref) {
|
|
|
60
60
|
hasEdit: hasEdit
|
|
61
61
|
}), /*#__PURE__*/_react.default.createElement(_r07_wavelength_btn.default, null));
|
|
62
62
|
};
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
);
|
|
68
|
-
};
|
|
69
|
-
var mapDispatchToProps = function mapDispatchToProps(dispatch) {
|
|
70
|
-
return (0, _redux.bindActionCreators)({}, dispatch);
|
|
71
|
-
};
|
|
63
|
+
const mapStateToProps = (state, _) => (
|
|
64
|
+
// eslint-disable-line
|
|
65
|
+
{});
|
|
66
|
+
const mapDispatchToProps = dispatch => (0, _redux.bindActionCreators)({}, dispatch);
|
|
72
67
|
CmdBar.propTypes = {
|
|
73
68
|
classes: _propTypes.default.object.isRequired,
|
|
74
69
|
feature: _propTypes.default.object.isRequired,
|
|
@@ -79,5 +74,4 @@ CmdBar.propTypes = {
|
|
|
79
74
|
jcampIdx: _propTypes.default.any,
|
|
80
75
|
hideThreshold: _propTypes.default.bool
|
|
81
76
|
};
|
|
82
|
-
var _default = (0, _redux.compose)((0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps), (0, _styles.withStyles)(styles))(CmdBar);
|
|
83
|
-
exports.default = _default;
|
|
77
|
+
var _default = exports.default = (0, _redux.compose)((0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps), (0, _styles.withStyles)(styles))(CmdBar);
|