@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/actions/scan.js
CHANGED
|
@@ -5,24 +5,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.toggleScanIsAuto = exports.setScanTarget = exports.resetScanTarget = void 0;
|
|
7
7
|
var _action_type = require("../constants/action_type");
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
};
|
|
13
|
-
};
|
|
8
|
+
const setScanTarget = payload => ({
|
|
9
|
+
type: _action_type.SCAN.SET_TARGET,
|
|
10
|
+
payload
|
|
11
|
+
});
|
|
14
12
|
exports.setScanTarget = setScanTarget;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
};
|
|
20
|
-
};
|
|
13
|
+
const resetScanTarget = () => ({
|
|
14
|
+
type: _action_type.SCAN.SET_TARGET,
|
|
15
|
+
payload: false
|
|
16
|
+
});
|
|
21
17
|
exports.resetScanTarget = resetScanTarget;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
};
|
|
27
|
-
};
|
|
18
|
+
const toggleScanIsAuto = payload => ({
|
|
19
|
+
type: _action_type.SCAN.TOGGLE_ISAUTO,
|
|
20
|
+
payload
|
|
21
|
+
});
|
|
28
22
|
exports.toggleScanIsAuto = toggleScanIsAuto;
|
package/dist/actions/shift.js
CHANGED
|
@@ -5,19 +5,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.setShiftRef = exports.rmShiftPeak = void 0;
|
|
7
7
|
var _action_type = require("../constants/action_type");
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
};
|
|
13
|
-
};
|
|
8
|
+
const setShiftRef = payload => ({
|
|
9
|
+
type: _action_type.SHIFT.SET_REF,
|
|
10
|
+
payload
|
|
11
|
+
});
|
|
14
12
|
exports.setShiftRef = setShiftRef;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
};
|
|
20
|
-
};
|
|
13
|
+
const rmShiftPeak = () => ({
|
|
14
|
+
type: _action_type.SHIFT.RM_PEAK,
|
|
15
|
+
payload: null
|
|
16
|
+
});
|
|
21
17
|
|
|
22
18
|
// eslint-disable-line
|
|
23
19
|
exports.rmShiftPeak = rmShiftPeak;
|
package/dist/actions/status.js
CHANGED
|
@@ -5,24 +5,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.toggleSubmitBtn = exports.toggleAllBtn = exports.enableAllBtn = void 0;
|
|
7
7
|
var _action_type = require("../constants/action_type");
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
};
|
|
13
|
-
};
|
|
8
|
+
const toggleSubmitBtn = () => ({
|
|
9
|
+
type: _action_type.STATUS.TOGGLEBTNSUBMIT,
|
|
10
|
+
payload: []
|
|
11
|
+
});
|
|
14
12
|
exports.toggleSubmitBtn = toggleSubmitBtn;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
};
|
|
20
|
-
};
|
|
13
|
+
const toggleAllBtn = () => ({
|
|
14
|
+
type: _action_type.STATUS.TOGGLEBTNALL,
|
|
15
|
+
payload: []
|
|
16
|
+
});
|
|
21
17
|
exports.toggleAllBtn = toggleAllBtn;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
};
|
|
27
|
-
};
|
|
18
|
+
const enableAllBtn = () => ({
|
|
19
|
+
type: _action_type.STATUS.ENABLEBTNALL,
|
|
20
|
+
payload: []
|
|
21
|
+
});
|
|
28
22
|
exports.enableAllBtn = enableAllBtn;
|
package/dist/actions/submit.js
CHANGED
|
@@ -5,31 +5,23 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.updateOperation = exports.updateDecimal = exports.toggleIsIntensity = exports.toggleIsAscend = void 0;
|
|
7
7
|
var _action_type = require("../constants/action_type");
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
};
|
|
13
|
-
};
|
|
8
|
+
const toggleIsAscend = () => ({
|
|
9
|
+
type: _action_type.SUBMIT.TOGGLE_IS_ASCEND,
|
|
10
|
+
payload: false
|
|
11
|
+
});
|
|
14
12
|
exports.toggleIsAscend = toggleIsAscend;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
};
|
|
20
|
-
};
|
|
13
|
+
const toggleIsIntensity = () => ({
|
|
14
|
+
type: _action_type.SUBMIT.TOGGLE_IS_INTENSITY,
|
|
15
|
+
payload: false
|
|
16
|
+
});
|
|
21
17
|
exports.toggleIsIntensity = toggleIsIntensity;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
};
|
|
27
|
-
};
|
|
18
|
+
const updateOperation = payload => ({
|
|
19
|
+
type: _action_type.SUBMIT.UPDATE_OPERATION,
|
|
20
|
+
payload
|
|
21
|
+
});
|
|
28
22
|
exports.updateOperation = updateOperation;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
};
|
|
34
|
-
};
|
|
23
|
+
const updateDecimal = payload => ({
|
|
24
|
+
type: _action_type.SUBMIT.UPDATE_DECIMAL,
|
|
25
|
+
payload
|
|
26
|
+
});
|
|
35
27
|
exports.updateDecimal = updateDecimal;
|
|
@@ -5,38 +5,28 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.updateUpperThresholdValue = exports.updateThresholdValue = exports.updateLowerThresholdValue = exports.toggleThresholdIsEdit = exports.resetThresholdValue = void 0;
|
|
7
7
|
var _action_type = require("../constants/action_type");
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
};
|
|
13
|
-
};
|
|
8
|
+
const updateThresholdValue = payload => ({
|
|
9
|
+
type: _action_type.THRESHOLD.UPDATE_VALUE,
|
|
10
|
+
payload
|
|
11
|
+
});
|
|
14
12
|
exports.updateThresholdValue = updateThresholdValue;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
};
|
|
20
|
-
};
|
|
13
|
+
const resetThresholdValue = () => ({
|
|
14
|
+
type: _action_type.THRESHOLD.RESET_VALUE,
|
|
15
|
+
payload: false
|
|
16
|
+
});
|
|
21
17
|
exports.resetThresholdValue = resetThresholdValue;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
};
|
|
27
|
-
};
|
|
18
|
+
const toggleThresholdIsEdit = payload => ({
|
|
19
|
+
type: _action_type.THRESHOLD.TOGGLE_ISEDIT,
|
|
20
|
+
payload
|
|
21
|
+
});
|
|
28
22
|
exports.toggleThresholdIsEdit = toggleThresholdIsEdit;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
};
|
|
34
|
-
};
|
|
23
|
+
const updateUpperThresholdValue = payload => ({
|
|
24
|
+
type: _action_type.THRESHOLD.UPDATE_UPPER_VALUE,
|
|
25
|
+
payload
|
|
26
|
+
});
|
|
35
27
|
exports.updateUpperThresholdValue = updateUpperThresholdValue;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
};
|
|
41
|
-
};
|
|
28
|
+
const updateLowerThresholdValue = payload => ({
|
|
29
|
+
type: _action_type.THRESHOLD.UPDATE_LOWER_VALUE,
|
|
30
|
+
payload
|
|
31
|
+
});
|
|
42
32
|
exports.updateLowerThresholdValue = updateLowerThresholdValue;
|
package/dist/actions/ui.js
CHANGED
|
@@ -5,47 +5,41 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.setUiViewerType = exports.setUiSweepType = exports.selectUiSweep = exports.scrollUiWheel = exports.clickUiTarget = void 0;
|
|
7
7
|
var _action_type = require("../constants/action_type");
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
};
|
|
13
|
-
};
|
|
8
|
+
const setUiViewerType = payload => ({
|
|
9
|
+
type: _action_type.UI.VIEWER.SET_TYPE,
|
|
10
|
+
payload
|
|
11
|
+
});
|
|
14
12
|
exports.setUiViewerType = setUiViewerType;
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
const setUiSweepType = function (payload) {
|
|
14
|
+
let jcampIdx = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
17
15
|
return {
|
|
18
16
|
type: _action_type.UI.SWEEP.SET_TYPE,
|
|
19
|
-
payload
|
|
20
|
-
jcampIdx
|
|
17
|
+
payload,
|
|
18
|
+
jcampIdx
|
|
21
19
|
};
|
|
22
20
|
};
|
|
23
21
|
exports.setUiSweepType = setUiSweepType;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
};
|
|
29
|
-
};
|
|
22
|
+
const selectUiSweep = payload => ({
|
|
23
|
+
type: _action_type.UI.SWEEP.SELECT,
|
|
24
|
+
payload
|
|
25
|
+
});
|
|
30
26
|
exports.selectUiSweep = selectUiSweep;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
};
|
|
36
|
-
};
|
|
27
|
+
const scrollUiWheel = payload => ({
|
|
28
|
+
type: _action_type.UI.WHEEL.SCROLL,
|
|
29
|
+
payload
|
|
30
|
+
});
|
|
37
31
|
exports.scrollUiWheel = scrollUiWheel;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
32
|
+
const clickUiTarget = function (payload, onPeak) {
|
|
33
|
+
let voltammetryPeakIdx = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
34
|
+
let jcampIdx = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
|
35
|
+
let onPecker = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
|
42
36
|
return {
|
|
43
37
|
type: _action_type.UI.CLICK_TARGET,
|
|
44
|
-
payload
|
|
45
|
-
onPeak
|
|
46
|
-
voltammetryPeakIdx
|
|
47
|
-
jcampIdx
|
|
48
|
-
onPecker
|
|
38
|
+
payload,
|
|
39
|
+
onPeak,
|
|
40
|
+
voltammetryPeakIdx,
|
|
41
|
+
jcampIdx,
|
|
42
|
+
onPecker
|
|
49
43
|
};
|
|
50
44
|
};
|
|
51
45
|
exports.clickUiTarget = clickUiTarget;
|
|
@@ -5,12 +5,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.updateWaveLength = void 0;
|
|
7
7
|
var _action_type = require("../constants/action_type");
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
};
|
|
13
|
-
};
|
|
8
|
+
const updateWaveLength = payload => ({
|
|
9
|
+
type: _action_type.XRD.UPDATE_WAVE_LENGTH,
|
|
10
|
+
payload
|
|
11
|
+
});
|
|
14
12
|
|
|
15
13
|
// eslint-disable-line
|
|
16
14
|
exports.updateWaveLength = updateWaveLength;
|
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 () {
|
|
10
10
|
return _fn.default;
|
|
11
11
|
}
|
|
12
12
|
});
|
|
@@ -28,38 +28,40 @@ var _fn = _interopRequireDefault(require("./fn"));
|
|
|
28
28
|
// import { logger } from 'redux-logger';
|
|
29
29
|
|
|
30
30
|
// - - - store & middleware - - -
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
const sagaMiddleware = (0, _reduxSaga.default)();
|
|
32
|
+
const middlewares = [sagaMiddleware]; // logger
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
const store = (0, _redux.compose)((0, _redux.applyMiddleware)(...middlewares))(_redux.createStore)(_index.default);
|
|
35
35
|
sagaMiddleware.run(_index2.default);
|
|
36
36
|
|
|
37
37
|
// - - - helper - - -
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
const ensureQuillDelta = descs => {
|
|
39
|
+
const isArr = Array.isArray(descs);
|
|
40
40
|
return isArr ? descs : [{
|
|
41
41
|
insert: descs
|
|
42
42
|
}];
|
|
43
43
|
};
|
|
44
44
|
|
|
45
45
|
// - - - React - - -
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
46
|
+
const SpectraEditor = _ref => {
|
|
47
|
+
let {
|
|
48
|
+
entity,
|
|
49
|
+
others,
|
|
50
|
+
cLabel,
|
|
51
|
+
xLabel,
|
|
52
|
+
yLabel,
|
|
53
|
+
operations,
|
|
54
|
+
forecast,
|
|
55
|
+
molSvg,
|
|
56
|
+
editorOnly,
|
|
57
|
+
descriptions,
|
|
58
|
+
canChangeDescription,
|
|
59
|
+
onDescriptionChanged,
|
|
60
|
+
multiEntities,
|
|
61
|
+
multiMolSvgs,
|
|
62
|
+
entityFileNames,
|
|
63
|
+
userManualLink
|
|
64
|
+
} = _ref;
|
|
63
65
|
return /*#__PURE__*/_react.default.createElement(_reactRedux.Provider, {
|
|
64
66
|
store: store
|
|
65
67
|
}, /*#__PURE__*/_react.default.createElement(_layer_init.default, {
|
|
@@ -20,22 +20,18 @@ var _common = require("./common");
|
|
|
20
20
|
var _list_ui = require("../../constants/list_ui");
|
|
21
21
|
/* eslint-disable prefer-object-spread, react/function-component-definition */
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
};
|
|
36
|
-
var onViewAnalysis = function onViewAnalysis() {
|
|
37
|
-
return setUiViewerTypeAct(_list_ui.LIST_UI_VIEWER_TYPE.ANALYSIS);
|
|
38
|
-
};
|
|
23
|
+
const styles = () => Object.assign({}, _common.commonStyle);
|
|
24
|
+
const Viewer = _ref => {
|
|
25
|
+
let {
|
|
26
|
+
classes,
|
|
27
|
+
isfocusSpectrumSt,
|
|
28
|
+
isfocusAnalysisSt,
|
|
29
|
+
hideCmdAnaViewerSt,
|
|
30
|
+
disableCmdAnaViewerSt,
|
|
31
|
+
setUiViewerTypeAct
|
|
32
|
+
} = _ref;
|
|
33
|
+
const onViewSpectrum = () => setUiViewerTypeAct(_list_ui.LIST_UI_VIEWER_TYPE.SPECTRUM);
|
|
34
|
+
const onViewAnalysis = () => setUiViewerTypeAct(_list_ui.LIST_UI_VIEWER_TYPE.ANALYSIS);
|
|
39
35
|
return /*#__PURE__*/_react.default.createElement("span", {
|
|
40
36
|
className: classes.group
|
|
41
37
|
}, /*#__PURE__*/_react.default.createElement(_Tooltip.default, {
|
|
@@ -59,22 +55,17 @@ var Viewer = function Viewer(_ref) {
|
|
|
59
55
|
className: classes.icon
|
|
60
56
|
}))));
|
|
61
57
|
};
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
};
|
|
73
|
-
var mapDispatchToProps = function mapDispatchToProps(dispatch) {
|
|
74
|
-
return (0, _redux.bindActionCreators)({
|
|
75
|
-
setUiViewerTypeAct: _ui.setUiViewerType
|
|
76
|
-
}, dispatch);
|
|
77
|
-
};
|
|
58
|
+
const mapStateToProps = (state, props) => (
|
|
59
|
+
// eslint-disable-line
|
|
60
|
+
{
|
|
61
|
+
isfocusSpectrumSt: state.ui.viewer === _list_ui.LIST_UI_VIEWER_TYPE.SPECTRUM,
|
|
62
|
+
isfocusAnalysisSt: state.ui.viewer === _list_ui.LIST_UI_VIEWER_TYPE.ANALYSIS,
|
|
63
|
+
hideCmdAnaViewerSt: _cfg.default.hideCmdAnaViewer(state.layout) || props.editorOnly,
|
|
64
|
+
disableCmdAnaViewerSt: _cfg.default.btnCmdAnaViewer(state.layout)
|
|
65
|
+
});
|
|
66
|
+
const mapDispatchToProps = dispatch => (0, _redux.bindActionCreators)({
|
|
67
|
+
setUiViewerTypeAct: _ui.setUiViewerType
|
|
68
|
+
}, dispatch);
|
|
78
69
|
Viewer.propTypes = {
|
|
79
70
|
classes: _propTypes.default.object.isRequired,
|
|
80
71
|
isfocusSpectrumSt: _propTypes.default.bool.isRequired,
|
|
@@ -83,5 +74,4 @@ Viewer.propTypes = {
|
|
|
83
74
|
disableCmdAnaViewerSt: _propTypes.default.bool.isRequired,
|
|
84
75
|
setUiViewerTypeAct: _propTypes.default.func.isRequired
|
|
85
76
|
};
|
|
86
|
-
var _default = (0, _redux.compose)((0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps), (0, _styles.withStyles)(styles))(Viewer);
|
|
87
|
-
exports.default = _default;
|
|
77
|
+
var _default = exports.default = (0, _redux.compose)((0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps), (0, _styles.withStyles)(styles))(Viewer);
|
|
@@ -19,19 +19,15 @@ var _common = require("./common");
|
|
|
19
19
|
var _list_ui = require("../../constants/list_ui");
|
|
20
20
|
/* eslint-disable prefer-object-spread, react/function-component-definition */
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
};
|
|
32
|
-
var onSweepZoomReset = function onSweepZoomReset() {
|
|
33
|
-
return setUiSweepTypeAct(_list_ui.LIST_UI_SWEEP_TYPE.ZOOMRESET);
|
|
34
|
-
};
|
|
22
|
+
const styles = () => Object.assign({}, _common.commonStyle);
|
|
23
|
+
const Zoom = _ref => {
|
|
24
|
+
let {
|
|
25
|
+
classes,
|
|
26
|
+
isfocusZoomSt,
|
|
27
|
+
setUiSweepTypeAct
|
|
28
|
+
} = _ref;
|
|
29
|
+
const onSweepZoomIn = () => setUiSweepTypeAct(_list_ui.LIST_UI_SWEEP_TYPE.ZOOMIN);
|
|
30
|
+
const onSweepZoomReset = () => setUiSweepTypeAct(_list_ui.LIST_UI_SWEEP_TYPE.ZOOMRESET);
|
|
35
31
|
return /*#__PURE__*/_react.default.createElement("span", {
|
|
36
32
|
className: classes.group
|
|
37
33
|
}, /*#__PURE__*/_react.default.createElement(_Tooltip.default, {
|
|
@@ -54,23 +50,17 @@ var Zoom = function Zoom(_ref) {
|
|
|
54
50
|
className: classes.icon
|
|
55
51
|
}))));
|
|
56
52
|
};
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
};
|
|
65
|
-
var mapDispatchToProps = function mapDispatchToProps(dispatch) {
|
|
66
|
-
return (0, _redux.bindActionCreators)({
|
|
67
|
-
setUiSweepTypeAct: _ui.setUiSweepType
|
|
68
|
-
}, dispatch);
|
|
69
|
-
};
|
|
53
|
+
const mapStateToProps = (state, _) => (
|
|
54
|
+
// eslint-disable-line
|
|
55
|
+
{
|
|
56
|
+
isfocusZoomSt: state.ui.sweepType === _list_ui.LIST_UI_SWEEP_TYPE.ZOOMIN
|
|
57
|
+
});
|
|
58
|
+
const mapDispatchToProps = dispatch => (0, _redux.bindActionCreators)({
|
|
59
|
+
setUiSweepTypeAct: _ui.setUiSweepType
|
|
60
|
+
}, dispatch);
|
|
70
61
|
Zoom.propTypes = {
|
|
71
62
|
classes: _propTypes.default.object.isRequired,
|
|
72
63
|
isfocusZoomSt: _propTypes.default.bool.isRequired,
|
|
73
64
|
setUiSweepTypeAct: _propTypes.default.func.isRequired
|
|
74
65
|
};
|
|
75
|
-
var _default = (0, _redux.compose)((0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps), (0, _styles.withStyles)(styles))(Zoom);
|
|
76
|
-
exports.default = _default;
|
|
66
|
+
var _default = exports.default = (0, _redux.compose)((0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps), (0, _styles.withStyles)(styles))(Zoom);
|
|
@@ -21,54 +21,44 @@ var _list_ui = require("../../constants/list_ui");
|
|
|
21
21
|
react/function-component-definition, react/require-default-props, max-len,
|
|
22
22
|
react/no-unused-prop-types */
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
var onSweepPeakDELETE = function onSweepPeakDELETE() {
|
|
43
|
-
return setUiSweepTypeAct(_list_ui.LIST_UI_SWEEP_TYPE.PEAK_DELETE);
|
|
44
|
-
};
|
|
45
|
-
var onSweepAnchorShift = function onSweepAnchorShift() {
|
|
46
|
-
return setUiSweepTypeAct(_list_ui.LIST_UI_SWEEP_TYPE.ANCHOR_SHIFT);
|
|
47
|
-
};
|
|
24
|
+
const styles = () => Object.assign({}, _common.commonStyle);
|
|
25
|
+
const Peak = _ref => {
|
|
26
|
+
let {
|
|
27
|
+
classes,
|
|
28
|
+
setUiSweepTypeAct,
|
|
29
|
+
isFocusAddPeakSt,
|
|
30
|
+
disableAddPeakSt,
|
|
31
|
+
isFocusRmPeakSt,
|
|
32
|
+
disableRmPeakSt,
|
|
33
|
+
isFocusSetRefSt,
|
|
34
|
+
disableSetRefSt,
|
|
35
|
+
isHandleMaxAndMinPeaksSt,
|
|
36
|
+
cyclicVotaSt,
|
|
37
|
+
curveSt
|
|
38
|
+
} = _ref;
|
|
39
|
+
let onSweepPeakAdd = () => setUiSweepTypeAct(_list_ui.LIST_UI_SWEEP_TYPE.PEAK_ADD);
|
|
40
|
+
let onSweepPeakDELETE = () => setUiSweepTypeAct(_list_ui.LIST_UI_SWEEP_TYPE.PEAK_DELETE);
|
|
41
|
+
let onSweepAnchorShift = () => setUiSweepTypeAct(_list_ui.LIST_UI_SWEEP_TYPE.ANCHOR_SHIFT);
|
|
48
42
|
if (isHandleMaxAndMinPeaksSt) {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
43
|
+
const {
|
|
44
|
+
curveIdx
|
|
45
|
+
} = curveSt;
|
|
46
|
+
const {
|
|
47
|
+
spectraList
|
|
48
|
+
} = cyclicVotaSt;
|
|
49
|
+
const spectra = spectraList[curveIdx];
|
|
52
50
|
if (spectra) {
|
|
53
|
-
|
|
51
|
+
const {
|
|
52
|
+
isWorkMaxPeak
|
|
53
|
+
} = spectra;
|
|
54
54
|
if (isWorkMaxPeak) {
|
|
55
|
-
onSweepPeakAdd =
|
|
56
|
-
|
|
57
|
-
};
|
|
58
|
-
onSweepPeakDELETE = function onSweepPeakDELETE() {
|
|
59
|
-
return setUiSweepTypeAct(_list_ui.LIST_UI_SWEEP_TYPE.CYCLIC_VOLTA_RM_MAX_PEAK, curveIdx);
|
|
60
|
-
};
|
|
55
|
+
onSweepPeakAdd = () => setUiSweepTypeAct(_list_ui.LIST_UI_SWEEP_TYPE.CYCLIC_VOLTA_ADD_MAX_PEAK, curveIdx);
|
|
56
|
+
onSweepPeakDELETE = () => setUiSweepTypeAct(_list_ui.LIST_UI_SWEEP_TYPE.CYCLIC_VOLTA_RM_MAX_PEAK, curveIdx);
|
|
61
57
|
} else {
|
|
62
|
-
onSweepPeakAdd =
|
|
63
|
-
|
|
64
|
-
};
|
|
65
|
-
onSweepPeakDELETE = function onSweepPeakDELETE() {
|
|
66
|
-
return setUiSweepTypeAct(_list_ui.LIST_UI_SWEEP_TYPE.CYCLIC_VOLTA_RM_MIN_PEAK, curveIdx);
|
|
67
|
-
};
|
|
58
|
+
onSweepPeakAdd = () => setUiSweepTypeAct(_list_ui.LIST_UI_SWEEP_TYPE.CYCLIC_VOLTA_ADD_MIN_PEAK, curveIdx);
|
|
59
|
+
onSweepPeakDELETE = () => setUiSweepTypeAct(_list_ui.LIST_UI_SWEEP_TYPE.CYCLIC_VOLTA_RM_MIN_PEAK, curveIdx);
|
|
68
60
|
}
|
|
69
|
-
onSweepAnchorShift =
|
|
70
|
-
return setUiSweepTypeAct(_list_ui.LIST_UI_SWEEP_TYPE.CYCLIC_VOLTA_SET_REF, curveIdx);
|
|
71
|
-
};
|
|
61
|
+
onSweepAnchorShift = () => setUiSweepTypeAct(_list_ui.LIST_UI_SWEEP_TYPE.CYCLIC_VOLTA_SET_REF, curveIdx);
|
|
72
62
|
}
|
|
73
63
|
}
|
|
74
64
|
return /*#__PURE__*/_react.default.createElement("span", {
|
|
@@ -105,27 +95,22 @@ var Peak = function Peak(_ref) {
|
|
|
105
95
|
className: classes.icon
|
|
106
96
|
})))));
|
|
107
97
|
};
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
};
|
|
124
|
-
var mapDispatchToProps = function mapDispatchToProps(dispatch) {
|
|
125
|
-
return (0, _redux.bindActionCreators)({
|
|
126
|
-
setUiSweepTypeAct: _ui.setUiSweepType
|
|
127
|
-
}, dispatch);
|
|
128
|
-
};
|
|
98
|
+
const mapStateToProps = (state, _) => (
|
|
99
|
+
// eslint-disable-line
|
|
100
|
+
{
|
|
101
|
+
isFocusAddPeakSt: state.ui.sweepType === _list_ui.LIST_UI_SWEEP_TYPE.PEAK_ADD || state.ui.sweepType === _list_ui.LIST_UI_SWEEP_TYPE.CYCLIC_VOLTA_ADD_MAX_PEAK || state.ui.sweepType === _list_ui.LIST_UI_SWEEP_TYPE.CYCLIC_VOLTA_ADD_MIN_PEAK,
|
|
102
|
+
disableAddPeakSt: _cfg.default.btnCmdAddPeak(state.layout),
|
|
103
|
+
isFocusRmPeakSt: state.ui.sweepType === _list_ui.LIST_UI_SWEEP_TYPE.PEAK_DELETE || state.ui.sweepType === _list_ui.LIST_UI_SWEEP_TYPE.CYCLIC_VOLTA_RM_MAX_PEAK || state.ui.sweepType === _list_ui.LIST_UI_SWEEP_TYPE.CYCLIC_VOLTA_RM_MIN_PEAK,
|
|
104
|
+
disableRmPeakSt: _cfg.default.btnCmdRmPeak(state.layout),
|
|
105
|
+
isFocusSetRefSt: state.ui.sweepType === _list_ui.LIST_UI_SWEEP_TYPE.ANCHOR_SHIFT,
|
|
106
|
+
disableSetRefSt: _cfg.default.btnCmdSetRef(state.layout),
|
|
107
|
+
isHandleMaxAndMinPeaksSt: !_cfg.default.hidePanelCyclicVolta(state.layout),
|
|
108
|
+
cyclicVotaSt: state.cyclicvolta,
|
|
109
|
+
curveSt: state.curve
|
|
110
|
+
});
|
|
111
|
+
const mapDispatchToProps = dispatch => (0, _redux.bindActionCreators)({
|
|
112
|
+
setUiSweepTypeAct: _ui.setUiSweepType
|
|
113
|
+
}, dispatch);
|
|
129
114
|
Peak.propTypes = {
|
|
130
115
|
classes: _propTypes.default.object.isRequired,
|
|
131
116
|
isFocusAddPeakSt: _propTypes.default.bool.isRequired,
|
|
@@ -139,5 +124,4 @@ Peak.propTypes = {
|
|
|
139
124
|
cyclicVotaSt: _propTypes.default.object.isRequired,
|
|
140
125
|
curveSt: _propTypes.default.object.isRequired
|
|
141
126
|
};
|
|
142
|
-
var _default = (0, _redux.compose)((0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps), (0, _styles.withStyles)(styles))(Peak);
|
|
143
|
-
exports.default = _default;
|
|
127
|
+
var _default = exports.default = (0, _redux.compose)((0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps), (0, _styles.withStyles)(styles))(Peak);
|