@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
package/dist/layer_content.js
CHANGED
|
@@ -15,39 +15,42 @@ var _forecast_viewer = _interopRequireDefault(require("./components/forecast_vie
|
|
|
15
15
|
var _format = _interopRequireDefault(require("./helpers/format"));
|
|
16
16
|
/* eslint-disable prefer-object-spread, default-param-last, react/function-component-definition */
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
const extractLayout = (forecast, layoutSt) => {
|
|
19
|
+
const isEmpty = Object.keys(forecast).length === 0 && forecast.constructor === Object;
|
|
20
|
+
const isNmr = _format.default.isNmrLayout(layoutSt);
|
|
21
|
+
const isMs = _format.default.isMsLayout(layoutSt);
|
|
22
|
+
const isIr = _format.default.isIrLayout(layoutSt);
|
|
23
|
+
const isUvvis = _format.default.isUvVisLayout(layoutSt) || _format.default.isHplcUvVisLayout(layoutSt);
|
|
24
|
+
const isXRD = _format.default.isXRDLayout(layoutSt);
|
|
25
|
+
const showForecast = !isEmpty && (isNmr || isIr || isUvvis || isXRD);
|
|
26
26
|
return {
|
|
27
|
-
showForecast
|
|
28
|
-
isNmr
|
|
29
|
-
isIr
|
|
30
|
-
isMs
|
|
31
|
-
isUvvis
|
|
32
|
-
isXRD
|
|
27
|
+
showForecast,
|
|
28
|
+
isNmr,
|
|
29
|
+
isIr,
|
|
30
|
+
isMs,
|
|
31
|
+
isUvvis,
|
|
32
|
+
isXRD
|
|
33
33
|
};
|
|
34
34
|
};
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
35
|
+
const Content = _ref => {
|
|
36
|
+
let {
|
|
37
|
+
topic,
|
|
38
|
+
feature,
|
|
39
|
+
cLabel,
|
|
40
|
+
xLabel,
|
|
41
|
+
yLabel,
|
|
42
|
+
forecast,
|
|
43
|
+
operations,
|
|
44
|
+
layoutSt
|
|
45
|
+
} = _ref;
|
|
46
|
+
const {
|
|
47
|
+
showForecast,
|
|
48
|
+
isNmr,
|
|
49
|
+
isIr,
|
|
50
|
+
isMs,
|
|
51
|
+
isUvvis,
|
|
52
|
+
isXRD
|
|
53
|
+
} = extractLayout(forecast, layoutSt);
|
|
51
54
|
if (showForecast) {
|
|
52
55
|
return /*#__PURE__*/_react.default.createElement(_forecast_viewer.default, {
|
|
53
56
|
topic: topic,
|
|
@@ -82,17 +85,12 @@ var Content = function Content(_ref) {
|
|
|
82
85
|
isHidden: false
|
|
83
86
|
});
|
|
84
87
|
};
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
);
|
|
92
|
-
};
|
|
93
|
-
var mapDispatchToProps = function mapDispatchToProps(dispatch) {
|
|
94
|
-
return (0, _redux.bindActionCreators)({}, dispatch);
|
|
95
|
-
};
|
|
88
|
+
const mapStateToProps = (state, _) => (
|
|
89
|
+
// eslint-disable-line
|
|
90
|
+
{
|
|
91
|
+
layoutSt: state.layout
|
|
92
|
+
});
|
|
93
|
+
const mapDispatchToProps = dispatch => (0, _redux.bindActionCreators)({}, dispatch);
|
|
96
94
|
Content.propTypes = {
|
|
97
95
|
topic: _propTypes.default.object.isRequired,
|
|
98
96
|
feature: _propTypes.default.object.isRequired,
|
|
@@ -103,5 +101,4 @@ Content.propTypes = {
|
|
|
103
101
|
operations: _propTypes.default.array.isRequired,
|
|
104
102
|
layoutSt: _propTypes.default.string.isRequired
|
|
105
103
|
};
|
|
106
|
-
var _default = (0, _redux.compose)((0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps))(Content);
|
|
107
|
-
exports.default = _default;
|
|
104
|
+
var _default = exports.default = (0, _redux.compose)((0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps))(Content);
|
package/dist/layer_init.js
CHANGED
|
@@ -5,12 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
11
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
12
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
13
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
14
8
|
var _react = _interopRequireDefault(require("react"));
|
|
15
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
16
10
|
var _reactRedux = require("react-redux");
|
|
@@ -24,189 +18,174 @@ var _layer_prism = _interopRequireDefault(require("./layer_prism"));
|
|
|
24
18
|
var _format = _interopRequireDefault(require("./helpers/format"));
|
|
25
19
|
var _multi_jcamps_viewer = _interopRequireDefault(require("./components/multi_jcamps_viewer"));
|
|
26
20
|
var _curve = require("./actions/curve");
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
return _this;
|
|
21
|
+
/* eslint-disable prefer-object-spread, default-param-last */
|
|
22
|
+
|
|
23
|
+
const styles = () => ({});
|
|
24
|
+
class LayerInit extends _react.default.Component {
|
|
25
|
+
constructor(props) {
|
|
26
|
+
super(props);
|
|
27
|
+
this.normChange = this.normChange.bind(this);
|
|
28
|
+
this.execReset = this.execReset.bind(this);
|
|
29
|
+
this.initReducer = this.initReducer.bind(this);
|
|
30
|
+
this.updateOthers = this.updateOthers.bind(this);
|
|
31
|
+
this.updateMultiEntities = this.updateMultiEntities.bind(this);
|
|
32
|
+
}
|
|
33
|
+
componentDidMount() {
|
|
34
|
+
this.execReset();
|
|
35
|
+
this.initReducer();
|
|
36
|
+
this.updateOthers();
|
|
37
|
+
this.updateMultiEntities();
|
|
45
38
|
}
|
|
46
|
-
(
|
|
47
|
-
|
|
48
|
-
|
|
39
|
+
componentDidUpdate(prevProps) {
|
|
40
|
+
this.normChange(prevProps);
|
|
41
|
+
this.updateOthers();
|
|
42
|
+
this.updateMultiEntities();
|
|
43
|
+
}
|
|
44
|
+
normChange(prevProps) {
|
|
45
|
+
const prevFeatures = prevProps.entity.features;
|
|
46
|
+
const prevPeak = prevFeatures.editPeak || prevFeatures.autoPeak;
|
|
47
|
+
const {
|
|
48
|
+
entity
|
|
49
|
+
} = this.props;
|
|
50
|
+
const nextFeatures = entity.features;
|
|
51
|
+
const nextPeak = nextFeatures.editPeak || nextFeatures.autoPeak;
|
|
52
|
+
if (prevPeak !== nextPeak) {
|
|
49
53
|
this.execReset();
|
|
50
|
-
this.initReducer();
|
|
51
|
-
this.updateOthers();
|
|
52
|
-
this.updateMultiEntities();
|
|
53
|
-
}
|
|
54
|
-
}, {
|
|
55
|
-
key: "componentDidUpdate",
|
|
56
|
-
value: function componentDidUpdate(prevProps) {
|
|
57
|
-
this.normChange(prevProps);
|
|
58
|
-
this.updateOthers();
|
|
59
|
-
this.updateMultiEntities();
|
|
60
|
-
}
|
|
61
|
-
}, {
|
|
62
|
-
key: "normChange",
|
|
63
|
-
value: function normChange(prevProps) {
|
|
64
|
-
var prevFeatures = prevProps.entity.features;
|
|
65
|
-
var prevPeak = prevFeatures.editPeak || prevFeatures.autoPeak;
|
|
66
|
-
var entity = this.props.entity;
|
|
67
|
-
var nextFeatures = entity.features;
|
|
68
|
-
var nextPeak = nextFeatures.editPeak || nextFeatures.autoPeak;
|
|
69
|
-
if (prevPeak !== nextPeak) {
|
|
70
|
-
this.execReset();
|
|
71
|
-
}
|
|
72
54
|
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
var integration = features.integration,
|
|
95
|
-
multiplicity = features.multiplicity,
|
|
96
|
-
simulation = features.simulation;
|
|
97
|
-
updateMetaPeaksAct(entity);
|
|
98
|
-
resetInitNmrAct({
|
|
99
|
-
integration: integration,
|
|
100
|
-
multiplicity: multiplicity,
|
|
101
|
-
simulation: simulation
|
|
102
|
-
});
|
|
103
|
-
} else if (_format.default.isHplcUvVisLayout(layout)) {
|
|
104
|
-
var _integration = features.integration;
|
|
105
|
-
updateMetaPeaksAct(entity);
|
|
106
|
-
resetInitCommonWithIntergationAct({
|
|
107
|
-
integration: _integration
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}, {
|
|
112
|
-
key: "initReducer",
|
|
113
|
-
value: function initReducer() {
|
|
114
|
-
var _this$props2 = this.props,
|
|
115
|
-
operations = _this$props2.operations,
|
|
116
|
-
updateOperationAct = _this$props2.updateOperationAct;
|
|
117
|
-
updateOperationAct(operations[0]);
|
|
118
|
-
}
|
|
119
|
-
}, {
|
|
120
|
-
key: "updateOthers",
|
|
121
|
-
value: function updateOthers() {
|
|
122
|
-
var _this$props3 = this.props,
|
|
123
|
-
others = _this$props3.others,
|
|
124
|
-
addOthersAct = _this$props3.addOthersAct;
|
|
125
|
-
addOthersAct(others);
|
|
55
|
+
}
|
|
56
|
+
execReset() {
|
|
57
|
+
const {
|
|
58
|
+
entity,
|
|
59
|
+
updateMetaPeaksAct,
|
|
60
|
+
resetInitCommonAct,
|
|
61
|
+
resetInitMsAct,
|
|
62
|
+
resetInitNmrAct,
|
|
63
|
+
resetInitCommonWithIntergationAct
|
|
64
|
+
} = this.props;
|
|
65
|
+
resetInitCommonAct();
|
|
66
|
+
const {
|
|
67
|
+
layout,
|
|
68
|
+
features
|
|
69
|
+
} = entity;
|
|
70
|
+
if (_format.default.isMsLayout(layout)) {
|
|
71
|
+
// const { autoPeak, editPeak } = features; // TBD
|
|
72
|
+
const autoPeak = features.autoPeak || features[0];
|
|
73
|
+
const editPeak = features.editPeak || features[0];
|
|
74
|
+
const baseFeat = editPeak || autoPeak;
|
|
75
|
+
resetInitMsAct(baseFeat);
|
|
126
76
|
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
77
|
+
if (_format.default.isNmrLayout(layout)) {
|
|
78
|
+
const {
|
|
79
|
+
integration,
|
|
80
|
+
multiplicity,
|
|
81
|
+
simulation
|
|
82
|
+
} = features;
|
|
83
|
+
updateMetaPeaksAct(entity);
|
|
84
|
+
resetInitNmrAct({
|
|
85
|
+
integration,
|
|
86
|
+
multiplicity,
|
|
87
|
+
simulation
|
|
88
|
+
});
|
|
89
|
+
} else if (_format.default.isHplcUvVisLayout(layout)) {
|
|
90
|
+
const {
|
|
91
|
+
integration
|
|
92
|
+
} = features;
|
|
93
|
+
updateMetaPeaksAct(entity);
|
|
94
|
+
resetInitCommonWithIntergationAct({
|
|
95
|
+
integration
|
|
96
|
+
});
|
|
134
97
|
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
98
|
+
}
|
|
99
|
+
initReducer() {
|
|
100
|
+
const {
|
|
101
|
+
operations,
|
|
102
|
+
updateOperationAct
|
|
103
|
+
} = this.props;
|
|
104
|
+
updateOperationAct(operations[0]);
|
|
105
|
+
}
|
|
106
|
+
updateOthers() {
|
|
107
|
+
const {
|
|
108
|
+
others,
|
|
109
|
+
addOthersAct
|
|
110
|
+
} = this.props;
|
|
111
|
+
addOthersAct(others);
|
|
112
|
+
}
|
|
113
|
+
updateMultiEntities() {
|
|
114
|
+
const {
|
|
115
|
+
multiEntities,
|
|
116
|
+
setAllCurvesAct
|
|
117
|
+
} = this.props;
|
|
118
|
+
setAllCurvesAct(multiEntities);
|
|
119
|
+
}
|
|
120
|
+
render() {
|
|
121
|
+
const {
|
|
122
|
+
entity,
|
|
123
|
+
cLabel,
|
|
124
|
+
xLabel,
|
|
125
|
+
yLabel,
|
|
126
|
+
forecast,
|
|
127
|
+
operations,
|
|
128
|
+
descriptions,
|
|
129
|
+
molSvg,
|
|
130
|
+
editorOnly,
|
|
131
|
+
canChangeDescription,
|
|
132
|
+
onDescriptionChanged,
|
|
133
|
+
multiEntities,
|
|
134
|
+
entityFileNames,
|
|
135
|
+
userManualLink
|
|
136
|
+
} = this.props;
|
|
137
|
+
const target = entity.spectra[0];
|
|
138
|
+
const {
|
|
139
|
+
layout
|
|
140
|
+
} = entity;
|
|
141
|
+
const xxLabel = !xLabel && xLabel === '' ? `X (${target.xUnit})` : xLabel;
|
|
142
|
+
const yyLabel = !yLabel && yLabel === '' ? `Y (${target.yUnit})` : yLabel;
|
|
143
|
+
if (multiEntities) {
|
|
144
|
+
return /*#__PURE__*/_react.default.createElement(_multi_jcamps_viewer.default, {
|
|
145
|
+
multiEntities: multiEntities,
|
|
146
|
+
entityFileNames: entityFileNames,
|
|
147
|
+
userManualLink: userManualLink,
|
|
148
|
+
molSvg: molSvg,
|
|
149
|
+
operations: operations
|
|
150
|
+
});
|
|
151
|
+
} else if (_format.default.isCyclicVoltaLayout(layout)) {
|
|
152
|
+
// eslint-disable-line
|
|
153
|
+
return /*#__PURE__*/_react.default.createElement(_multi_jcamps_viewer.default, {
|
|
154
|
+
multiEntities: [entity],
|
|
155
|
+
entityFileNames: entityFileNames,
|
|
156
|
+
userManualLink: userManualLink,
|
|
183
157
|
molSvg: molSvg,
|
|
184
|
-
|
|
185
|
-
canChangeDescription: canChangeDescription,
|
|
186
|
-
onDescriptionChanged: onDescriptionChanged
|
|
158
|
+
operations: operations
|
|
187
159
|
});
|
|
188
160
|
}
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
161
|
+
return /*#__PURE__*/_react.default.createElement(_layer_prism.default, {
|
|
162
|
+
entity: entity,
|
|
163
|
+
cLabel: cLabel,
|
|
164
|
+
xLabel: xxLabel,
|
|
165
|
+
yLabel: yyLabel,
|
|
166
|
+
forecast: forecast,
|
|
167
|
+
operations: operations,
|
|
168
|
+
descriptions: descriptions,
|
|
169
|
+
molSvg: molSvg,
|
|
170
|
+
editorOnly: editorOnly,
|
|
171
|
+
canChangeDescription: canChangeDescription,
|
|
172
|
+
onDescriptionChanged: onDescriptionChanged
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
const mapStateToProps = (state, props) => (
|
|
177
|
+
// eslint-disable-line
|
|
178
|
+
{});
|
|
179
|
+
const mapDispatchToProps = dispatch => (0, _redux.bindActionCreators)({
|
|
180
|
+
resetInitCommonAct: _manager.resetInitCommon,
|
|
181
|
+
resetInitNmrAct: _manager.resetInitNmr,
|
|
182
|
+
resetInitMsAct: _manager.resetInitMs,
|
|
183
|
+
resetInitCommonWithIntergationAct: _manager.resetInitCommonWithIntergation,
|
|
184
|
+
updateOperationAct: _submit.updateOperation,
|
|
185
|
+
updateMetaPeaksAct: _meta.updateMetaPeaks,
|
|
186
|
+
addOthersAct: _jcamp.addOthers,
|
|
187
|
+
setAllCurvesAct: _curve.setAllCurves
|
|
188
|
+
}, dispatch);
|
|
210
189
|
LayerInit.propTypes = {
|
|
211
190
|
entity: _propTypes.default.object.isRequired,
|
|
212
191
|
multiEntities: _propTypes.default.array,
|
|
@@ -235,7 +214,6 @@ LayerInit.propTypes = {
|
|
|
235
214
|
setAllCurvesAct: _propTypes.default.func.isRequired,
|
|
236
215
|
userManualLink: _propTypes.default.object // eslint-disable-line
|
|
237
216
|
};
|
|
238
|
-
var _default = (0, _reactRedux.connect)(
|
|
217
|
+
var _default = exports.default = (0, _reactRedux.connect)(
|
|
239
218
|
// eslint-disable-line
|
|
240
|
-
mapStateToProps, mapDispatchToProps)((0, _styles.withStyles)(styles)(LayerInit)); // eslint-disable-line
|
|
241
|
-
exports.default = _default;
|
|
219
|
+
mapStateToProps, mapDispatchToProps)((0, _styles.withStyles)(styles)(LayerInit)); // eslint-disable-line
|
package/dist/layer_prism.js
CHANGED
|
@@ -15,36 +15,39 @@ var _index = _interopRequireDefault(require("./components/panel/index"));
|
|
|
15
15
|
var _index2 = _interopRequireDefault(require("./components/cmd_bar/index"));
|
|
16
16
|
var _layer_content = _interopRequireDefault(require("./layer_content"));
|
|
17
17
|
var _list_ui = require("./constants/list_ui");
|
|
18
|
-
var
|
|
18
|
+
var _extractParams = require("./helpers/extractParams");
|
|
19
19
|
/* eslint-disable prefer-object-spread, default-param-last,
|
|
20
20
|
react/function-component-definition, react/require-default-props
|
|
21
21
|
*/
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
topic
|
|
43
|
-
feature
|
|
44
|
-
hasEdit
|
|
45
|
-
integration
|
|
23
|
+
const styles = () => ({});
|
|
24
|
+
const LayerPrism = _ref => {
|
|
25
|
+
let {
|
|
26
|
+
entity,
|
|
27
|
+
cLabel,
|
|
28
|
+
xLabel,
|
|
29
|
+
yLabel,
|
|
30
|
+
forecast,
|
|
31
|
+
operations,
|
|
32
|
+
descriptions,
|
|
33
|
+
molSvg,
|
|
34
|
+
editorOnly,
|
|
35
|
+
thresSt,
|
|
36
|
+
scanSt,
|
|
37
|
+
uiSt,
|
|
38
|
+
canChangeDescription,
|
|
39
|
+
onDescriptionChanged
|
|
40
|
+
} = _ref;
|
|
41
|
+
const {
|
|
42
|
+
topic,
|
|
43
|
+
feature,
|
|
44
|
+
hasEdit,
|
|
45
|
+
integration
|
|
46
|
+
} = (0, _extractParams.extractParams)(entity, thresSt, scanSt);
|
|
46
47
|
if (!topic) return null;
|
|
47
|
-
|
|
48
|
+
const {
|
|
49
|
+
viewer
|
|
50
|
+
} = uiSt;
|
|
48
51
|
if (viewer === _list_ui.LIST_UI_VIEWER_TYPE.ANALYSIS) {
|
|
49
52
|
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_index2.default, {
|
|
50
53
|
feature: feature,
|
|
@@ -104,19 +107,14 @@ var LayerPrism = function LayerPrism(_ref) {
|
|
|
104
107
|
onDescriptionChanged: onDescriptionChanged
|
|
105
108
|
})))));
|
|
106
109
|
};
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
);
|
|
116
|
-
};
|
|
117
|
-
var mapDispatchToProps = function mapDispatchToProps(dispatch) {
|
|
118
|
-
return (0, _redux.bindActionCreators)({}, dispatch);
|
|
119
|
-
};
|
|
110
|
+
const mapStateToProps = (state, props) => (
|
|
111
|
+
// eslint-disable-line
|
|
112
|
+
{
|
|
113
|
+
scanSt: state.scan,
|
|
114
|
+
thresSt: state.threshold,
|
|
115
|
+
uiSt: state.ui
|
|
116
|
+
});
|
|
117
|
+
const mapDispatchToProps = dispatch => (0, _redux.bindActionCreators)({}, dispatch);
|
|
120
118
|
LayerPrism.propTypes = {
|
|
121
119
|
entity: _propTypes.default.object.isRequired,
|
|
122
120
|
cLabel: _propTypes.default.string.isRequired,
|
|
@@ -133,7 +131,6 @@ LayerPrism.propTypes = {
|
|
|
133
131
|
canChangeDescription: _propTypes.default.bool.isRequired,
|
|
134
132
|
onDescriptionChanged: _propTypes.default.func
|
|
135
133
|
};
|
|
136
|
-
var _default = (0, _reactRedux.connect)(
|
|
134
|
+
var _default = exports.default = (0, _reactRedux.connect)(
|
|
137
135
|
// eslint-disable-line
|
|
138
|
-
mapStateToProps, mapDispatchToProps)((0, _styles.withStyles)(styles)(LayerPrism)); // eslint-disable-line
|
|
139
|
-
exports.default = _default;
|
|
136
|
+
mapStateToProps, mapDispatchToProps)((0, _styles.withStyles)(styles)(LayerPrism)); // eslint-disable-line
|
package/dist/reducers/index.js
CHANGED
|
@@ -24,7 +24,7 @@ var _reducer_jcamp = _interopRequireDefault(require("./reducer_jcamp"));
|
|
|
24
24
|
var _reducer_wavelength = _interopRequireDefault(require("./reducer_wavelength"));
|
|
25
25
|
var _reducer_voltammetry = _interopRequireDefault(require("./reducer_voltammetry"));
|
|
26
26
|
var _reducer_curve = _interopRequireDefault(require("./reducer_curve"));
|
|
27
|
-
|
|
27
|
+
const rootReducer = (0, _redux.combineReducers)({
|
|
28
28
|
threshold: _reducer_threshold.default,
|
|
29
29
|
editPeak: _reducer_edit_peak.default,
|
|
30
30
|
status: _reducer_status.default,
|
|
@@ -44,5 +44,4 @@ var rootReducer = (0, _redux.combineReducers)({
|
|
|
44
44
|
cyclicvolta: _reducer_voltammetry.default,
|
|
45
45
|
curve: _reducer_curve.default
|
|
46
46
|
});
|
|
47
|
-
var _default = rootReducer;
|
|
48
|
-
exports.default = _default;
|
|
47
|
+
var _default = exports.default = rootReducer;
|