@complat/react-spectra-editor 0.10.13-alpha.5
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/LICENSE +662 -0
- package/README.md +37 -0
- package/dist/actions/edit_peak.js +25 -0
- package/dist/actions/forecast.js +41 -0
- package/dist/actions/integration.js +33 -0
- package/dist/actions/jcamp.js +41 -0
- package/dist/actions/layout.js +17 -0
- package/dist/actions/manager.js +49 -0
- package/dist/actions/meta.js +17 -0
- package/dist/actions/multiplicity.js +57 -0
- package/dist/actions/scan.js +33 -0
- package/dist/actions/shift.js +25 -0
- package/dist/actions/status.js +33 -0
- package/dist/actions/submit.js +41 -0
- package/dist/actions/threshold.js +33 -0
- package/dist/actions/ui.js +50 -0
- package/dist/app.js +125 -0
- package/dist/components/cmd_bar/01_viewer.js +133 -0
- package/dist/components/cmd_bar/02_zoom.js +119 -0
- package/dist/components/cmd_bar/03_peak.js +176 -0
- package/dist/components/cmd_bar/04_integration.js +273 -0
- package/dist/components/cmd_bar/05_multiplicity.js +228 -0
- package/dist/components/cmd_bar/06_undo_redo.js +137 -0
- package/dist/components/cmd_bar/common.js +104 -0
- package/dist/components/cmd_bar/index.js +113 -0
- package/dist/components/cmd_bar/r01_layout.js +351 -0
- package/dist/components/cmd_bar/r02_scan.js +226 -0
- package/dist/components/cmd_bar/r03_threshold.js +209 -0
- package/dist/components/cmd_bar/r04_submit.js +349 -0
- package/dist/components/cmd_bar/r05_submit_btn.js +147 -0
- package/dist/components/cmd_bar/r06_predict_btn.js +307 -0
- package/dist/components/cmd_bar/tri_btn.js +202 -0
- package/dist/components/common/chem.js +115 -0
- package/dist/components/common/comps.js +29 -0
- package/dist/components/common/draw.js +41 -0
- package/dist/components/d3_line/index.js +236 -0
- package/dist/components/d3_line/line_focus.js +765 -0
- package/dist/components/d3_rect/index.js +200 -0
- package/dist/components/d3_rect/rect_focus.js +301 -0
- package/dist/components/forecast/comps.js +337 -0
- package/dist/components/forecast/ir_comps.js +224 -0
- package/dist/components/forecast/ir_viewer.js +172 -0
- package/dist/components/forecast/nmr_comps.js +253 -0
- package/dist/components/forecast/nmr_viewer.js +170 -0
- package/dist/components/forecast/section_loading.js +95 -0
- package/dist/components/forecast_viewer.js +190 -0
- package/dist/components/panel/compare.js +370 -0
- package/dist/components/panel/index.js +191 -0
- package/dist/components/panel/info.js +335 -0
- package/dist/components/panel/multiplicity.js +405 -0
- package/dist/components/panel/multiplicity_coupling.js +195 -0
- package/dist/components/panel/multiplicity_select.js +114 -0
- package/dist/components/panel/peaks.js +296 -0
- package/dist/constants/action_type.js +140 -0
- package/dist/constants/list_layout.js +23 -0
- package/dist/constants/list_shift.js +480 -0
- package/dist/constants/list_ui.js +33 -0
- package/dist/fn.js +31 -0
- package/dist/helpers/brush.js +109 -0
- package/dist/helpers/calc.js +10 -0
- package/dist/helpers/carbonFeatures.js +47 -0
- package/dist/helpers/cfg.js +89 -0
- package/dist/helpers/chem.js +594 -0
- package/dist/helpers/compass.js +91 -0
- package/dist/helpers/converter.js +74 -0
- package/dist/helpers/extractParams.js +77 -0
- package/dist/helpers/extractPeaksEdit.js +69 -0
- package/dist/helpers/focus.js +15 -0
- package/dist/helpers/format.js +403 -0
- package/dist/helpers/init.js +80 -0
- package/dist/helpers/integration.js +30 -0
- package/dist/helpers/mount.js +112 -0
- package/dist/helpers/multiplicity.js +44 -0
- package/dist/helpers/multiplicity_calc.js +117 -0
- package/dist/helpers/multiplicity_complat.js +126 -0
- package/dist/helpers/multiplicity_manual.js +94 -0
- package/dist/helpers/multiplicity_verify_basic.js +196 -0
- package/dist/helpers/shift.js +48 -0
- package/dist/helpers/zoom.js +32 -0
- package/dist/index.js +705 -0
- package/dist/layer_content.js +125 -0
- package/dist/layer_init.js +231 -0
- package/dist/layer_prism.js +186 -0
- package/dist/reducers/index.js +89 -0
- package/dist/reducers/reducer_edit_peak.js +111 -0
- package/dist/reducers/reducer_forecast.js +113 -0
- package/dist/reducers/reducer_integration.js +136 -0
- package/dist/reducers/reducer_jcamp.js +74 -0
- package/dist/reducers/reducer_layout.js +27 -0
- package/dist/reducers/reducer_manager.js +20 -0
- package/dist/reducers/reducer_meta.js +30 -0
- package/dist/reducers/reducer_multiplicity.js +131 -0
- package/dist/reducers/reducer_scan.js +55 -0
- package/dist/reducers/reducer_shift.js +99 -0
- package/dist/reducers/reducer_simulation.js +30 -0
- package/dist/reducers/reducer_status.js +41 -0
- package/dist/reducers/reducer_submit.js +54 -0
- package/dist/reducers/reducer_threshold.js +34 -0
- package/dist/reducers/reducer_ui.js +46 -0
- package/dist/reducers/undo_redo_config.js +24 -0
- package/dist/sagas/index.js +50 -0
- package/dist/sagas/saga_edit_peak.js +84 -0
- package/dist/sagas/saga_manager.js +116 -0
- package/dist/sagas/saga_meta.js +46 -0
- package/dist/sagas/saga_multiplicity.js +387 -0
- package/dist/sagas/saga_ui.js +392 -0
- package/dist/third_party/jAnalyzer.js +596 -0
- package/dist/third_party/peakInterval.js +107 -0
- package/package.json +77 -0
package/README.md
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# react-spectra-editor
|
|
2
|
+
|
|
3
|
+
An editor to View and Edit Chemical Spectra data (NMR, IR and MS).
|
|
4
|
+
|
|
5
|
+
### Usage
|
|
6
|
+
|
|
7
|
+
#### Installing from npm
|
|
8
|
+
With yarn
|
|
9
|
+
```
|
|
10
|
+
$ yarn add @complat/react-spectra-editor
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Or with npm
|
|
14
|
+
```
|
|
15
|
+
$ npm i @complat/react-spectra-editor
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
#### Installing from github source
|
|
19
|
+
```
|
|
20
|
+
$ yarn add https://github.com/ComPlat/react-spectra-editor
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
#### Allows users manual edit spectra's description
|
|
24
|
+
1. Set *canChangeDescription* to be ***true***
|
|
25
|
+
2. Handle changed value on function *onDescriptionChanged*. The content is formatted with [Delta Object](https://quilljs.com/docs/delta/)
|
|
26
|
+
|
|
27
|
+
#### Running Demo
|
|
28
|
+
```
|
|
29
|
+
$ yarn install
|
|
30
|
+
|
|
31
|
+
$ yarn start
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Demo & Manual
|
|
35
|
+
|
|
36
|
+
[demo & step-by-step manual](https://github.com/ComPlat/react-spectra-editor/blob/master/DEMO_MANUAL.md)
|
|
37
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.rmFromNegList = exports.rmFromPosList = undefined;
|
|
7
|
+
|
|
8
|
+
var _action_type = require('../constants/action_type');
|
|
9
|
+
|
|
10
|
+
var rmFromPosList = function rmFromPosList(payload) {
|
|
11
|
+
return {
|
|
12
|
+
type: _action_type.EDITPEAK.RM_POSITIVE,
|
|
13
|
+
payload: payload
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
var rmFromNegList = function rmFromNegList(payload) {
|
|
18
|
+
return {
|
|
19
|
+
type: _action_type.EDITPEAK.RM_NEGATIVE,
|
|
20
|
+
payload: payload
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
exports.rmFromPosList = rmFromPosList;
|
|
25
|
+
exports.rmFromNegList = rmFromNegList;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.clearForecastStatus = exports.setNmrStatus = exports.setIrStatus = exports.initForecastStatus = undefined;
|
|
7
|
+
|
|
8
|
+
var _action_type = require('../constants/action_type');
|
|
9
|
+
|
|
10
|
+
var initForecastStatus = function initForecastStatus(payload) {
|
|
11
|
+
return {
|
|
12
|
+
type: _action_type.FORECAST.INIT_STATUS,
|
|
13
|
+
payload: payload
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
var setIrStatus = function setIrStatus(payload) {
|
|
18
|
+
return {
|
|
19
|
+
type: _action_type.FORECAST.SET_IR_STATUS,
|
|
20
|
+
payload: payload
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
var setNmrStatus = function setNmrStatus(payload) {
|
|
25
|
+
return {
|
|
26
|
+
type: _action_type.FORECAST.SET_NMR_STATUS,
|
|
27
|
+
payload: payload
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
var clearForecastStatus = function clearForecastStatus(payload) {
|
|
32
|
+
return {
|
|
33
|
+
type: _action_type.FORECAST.CLEAR_STATUS,
|
|
34
|
+
payload: payload
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
exports.initForecastStatus = initForecastStatus;
|
|
39
|
+
exports.setIrStatus = setIrStatus;
|
|
40
|
+
exports.setNmrStatus = setNmrStatus;
|
|
41
|
+
exports.clearForecastStatus = clearForecastStatus;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.clearIntegrationAll = exports.setIntegrationFkr = exports.sweepIntegration = undefined;
|
|
7
|
+
|
|
8
|
+
var _action_type = require('../constants/action_type');
|
|
9
|
+
|
|
10
|
+
var sweepIntegration = function sweepIntegration(payload) {
|
|
11
|
+
return {
|
|
12
|
+
type: _action_type.INTEGRATION.SWEEP,
|
|
13
|
+
payload: payload
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
var setIntegrationFkr = function setIntegrationFkr(payload) {
|
|
18
|
+
return {
|
|
19
|
+
type: _action_type.INTEGRATION.SET_FKR,
|
|
20
|
+
payload: payload
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
var clearIntegrationAll = function clearIntegrationAll(payload) {
|
|
25
|
+
return {
|
|
26
|
+
type: _action_type.INTEGRATION.CLEAR_ALL,
|
|
27
|
+
payload: payload
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
exports.sweepIntegration = sweepIntegration;
|
|
32
|
+
exports.setIntegrationFkr = setIntegrationFkr;
|
|
33
|
+
exports.clearIntegrationAll = clearIntegrationAll; // eslint-disable-line
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.clearAll = exports.toggleShow = exports.rmOthersOne = exports.addOthers = undefined;
|
|
7
|
+
|
|
8
|
+
var _action_type = require('../constants/action_type');
|
|
9
|
+
|
|
10
|
+
var addOthers = function addOthers(payload) {
|
|
11
|
+
return {
|
|
12
|
+
type: _action_type.JCAMP.ADD_OTHERS,
|
|
13
|
+
payload: payload
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
var rmOthersOne = function rmOthersOne(payload) {
|
|
18
|
+
return {
|
|
19
|
+
type: _action_type.JCAMP.RM_OTHERS_ONE,
|
|
20
|
+
payload: payload
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
var toggleShow = function toggleShow(payload) {
|
|
25
|
+
return {
|
|
26
|
+
type: _action_type.JCAMP.TOGGLE_SHOW,
|
|
27
|
+
payload: payload
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
var clearAll = function clearAll(payload) {
|
|
32
|
+
return {
|
|
33
|
+
type: _action_type.JCAMP.CLEAR_ALL,
|
|
34
|
+
payload: payload
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
exports.addOthers = addOthers;
|
|
39
|
+
exports.rmOthersOne = rmOthersOne;
|
|
40
|
+
exports.toggleShow = toggleShow;
|
|
41
|
+
exports.clearAll = clearAll;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.updateLayout = undefined;
|
|
7
|
+
|
|
8
|
+
var _action_type = require('../constants/action_type');
|
|
9
|
+
|
|
10
|
+
var updateLayout = function updateLayout(payload) {
|
|
11
|
+
return {
|
|
12
|
+
type: _action_type.LAYOUT.UPDATE,
|
|
13
|
+
payload: payload
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
exports.updateLayout = updateLayout; // eslint-disable-line
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.resetInitCommonWithIntergation = exports.resetInitMs = exports.resetInitNmr = exports.resetInitCommon = exports.resetAll = undefined;
|
|
7
|
+
|
|
8
|
+
var _action_type = require('../constants/action_type');
|
|
9
|
+
|
|
10
|
+
var resetAll = function resetAll(payload) {
|
|
11
|
+
return {
|
|
12
|
+
type: _action_type.MANAGER.RESETALL,
|
|
13
|
+
payload: payload
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
var resetInitCommon = function resetInitCommon(payload) {
|
|
18
|
+
return {
|
|
19
|
+
type: _action_type.MANAGER.RESET_INIT_COMMON,
|
|
20
|
+
payload: payload
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
var resetInitNmr = function resetInitNmr(payload) {
|
|
25
|
+
return {
|
|
26
|
+
type: _action_type.MANAGER.RESET_INIT_NMR,
|
|
27
|
+
payload: payload
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
var resetInitMs = function resetInitMs(payload) {
|
|
32
|
+
return {
|
|
33
|
+
type: _action_type.MANAGER.RESET_INIT_MS,
|
|
34
|
+
payload: payload
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
var resetInitCommonWithIntergation = function resetInitCommonWithIntergation(payload) {
|
|
39
|
+
return {
|
|
40
|
+
type: _action_type.MANAGER.RESET_INIT_COMMON_WITH_INTERGATION,
|
|
41
|
+
payload: payload
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
exports.resetAll = resetAll;
|
|
46
|
+
exports.resetInitCommon = resetInitCommon;
|
|
47
|
+
exports.resetInitNmr = resetInitNmr;
|
|
48
|
+
exports.resetInitMs = resetInitMs;
|
|
49
|
+
exports.resetInitCommonWithIntergation = resetInitCommonWithIntergation; // eslint-disable-line
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.updateMetaPeaks = undefined;
|
|
7
|
+
|
|
8
|
+
var _action_type = require('../constants/action_type');
|
|
9
|
+
|
|
10
|
+
var updateMetaPeaks = function updateMetaPeaks(payload) {
|
|
11
|
+
return {
|
|
12
|
+
type: _action_type.META.UPDATE_PEAKS,
|
|
13
|
+
payload: payload
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
exports.updateMetaPeaks = updateMetaPeaks;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.updateMpyJ = exports.resetMpyOne = exports.clearMpyAll = exports.selectMpyType = exports.rmMpyPeakByPanel = exports.clickMpyOne = undefined;
|
|
7
|
+
|
|
8
|
+
var _action_type = require('../constants/action_type');
|
|
9
|
+
|
|
10
|
+
var clickMpyOne = function clickMpyOne(payload) {
|
|
11
|
+
return {
|
|
12
|
+
type: _action_type.MULTIPLICITY.ONE_CLICK,
|
|
13
|
+
payload: payload
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
var rmMpyPeakByPanel = function rmMpyPeakByPanel(payload) {
|
|
18
|
+
return {
|
|
19
|
+
type: _action_type.MULTIPLICITY.PEAK_RM_BY_PANEL,
|
|
20
|
+
payload: payload
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
var selectMpyType = function selectMpyType(payload) {
|
|
25
|
+
return {
|
|
26
|
+
type: _action_type.MULTIPLICITY.TYPE_SELECT,
|
|
27
|
+
payload: payload
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
var clearMpyAll = function clearMpyAll(payload) {
|
|
32
|
+
return {
|
|
33
|
+
type: _action_type.MULTIPLICITY.CLEAR_ALL,
|
|
34
|
+
payload: payload
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
var resetMpyOne = function resetMpyOne(payload) {
|
|
39
|
+
return {
|
|
40
|
+
type: _action_type.MULTIPLICITY.RESET_ONE,
|
|
41
|
+
payload: payload
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
var updateMpyJ = function updateMpyJ(payload) {
|
|
46
|
+
return {
|
|
47
|
+
type: _action_type.MULTIPLICITY.UPDATE_J,
|
|
48
|
+
payload: payload
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
exports.clickMpyOne = clickMpyOne;
|
|
53
|
+
exports.rmMpyPeakByPanel = rmMpyPeakByPanel;
|
|
54
|
+
exports.selectMpyType = selectMpyType;
|
|
55
|
+
exports.clearMpyAll = clearMpyAll;
|
|
56
|
+
exports.resetMpyOne = resetMpyOne;
|
|
57
|
+
exports.updateMpyJ = updateMpyJ; // eslint-disable-line
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.toggleScanIsAuto = exports.resetScanTarget = exports.setScanTarget = undefined;
|
|
7
|
+
|
|
8
|
+
var _action_type = require('../constants/action_type');
|
|
9
|
+
|
|
10
|
+
var setScanTarget = function setScanTarget(payload) {
|
|
11
|
+
return {
|
|
12
|
+
type: _action_type.SCAN.SET_TARGET,
|
|
13
|
+
payload: payload
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
var resetScanTarget = function resetScanTarget() {
|
|
18
|
+
return {
|
|
19
|
+
type: _action_type.SCAN.SET_TARGET,
|
|
20
|
+
payload: false
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
var toggleScanIsAuto = function toggleScanIsAuto(payload) {
|
|
25
|
+
return {
|
|
26
|
+
type: _action_type.SCAN.TOGGLE_ISAUTO,
|
|
27
|
+
payload: payload
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
exports.setScanTarget = setScanTarget;
|
|
32
|
+
exports.resetScanTarget = resetScanTarget;
|
|
33
|
+
exports.toggleScanIsAuto = toggleScanIsAuto;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.rmShiftPeak = exports.setShiftRef = undefined;
|
|
7
|
+
|
|
8
|
+
var _action_type = require('../constants/action_type');
|
|
9
|
+
|
|
10
|
+
var setShiftRef = function setShiftRef(payload) {
|
|
11
|
+
return {
|
|
12
|
+
type: _action_type.SHIFT.SET_REF,
|
|
13
|
+
payload: payload
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
var rmShiftPeak = function rmShiftPeak() {
|
|
18
|
+
return {
|
|
19
|
+
type: _action_type.SHIFT.RM_PEAK,
|
|
20
|
+
payload: null
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
exports.setShiftRef = setShiftRef;
|
|
25
|
+
exports.rmShiftPeak = rmShiftPeak; // eslint-disable-line
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.enableAllBtn = exports.toggleAllBtn = exports.toggleSubmitBtn = undefined;
|
|
7
|
+
|
|
8
|
+
var _action_type = require('../constants/action_type');
|
|
9
|
+
|
|
10
|
+
var toggleSubmitBtn = function toggleSubmitBtn() {
|
|
11
|
+
return {
|
|
12
|
+
type: _action_type.STATUS.TOGGLEBTNSUBMIT,
|
|
13
|
+
payload: []
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
var toggleAllBtn = function toggleAllBtn() {
|
|
18
|
+
return {
|
|
19
|
+
type: _action_type.STATUS.TOGGLEBTNALL,
|
|
20
|
+
payload: []
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
var enableAllBtn = function enableAllBtn() {
|
|
25
|
+
return {
|
|
26
|
+
type: _action_type.STATUS.ENABLEBTNALL,
|
|
27
|
+
payload: []
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
exports.toggleSubmitBtn = toggleSubmitBtn;
|
|
32
|
+
exports.toggleAllBtn = toggleAllBtn;
|
|
33
|
+
exports.enableAllBtn = enableAllBtn;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.updateDecimal = exports.updateOperation = exports.toggleIsIntensity = exports.toggleIsAscend = undefined;
|
|
7
|
+
|
|
8
|
+
var _action_type = require('../constants/action_type');
|
|
9
|
+
|
|
10
|
+
var toggleIsAscend = function toggleIsAscend() {
|
|
11
|
+
return {
|
|
12
|
+
type: _action_type.SUBMIT.TOGGLE_IS_ASCEND,
|
|
13
|
+
payload: false
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
var toggleIsIntensity = function toggleIsIntensity() {
|
|
18
|
+
return {
|
|
19
|
+
type: _action_type.SUBMIT.TOGGLE_IS_INTENSITY,
|
|
20
|
+
payload: false
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
var updateOperation = function updateOperation(payload) {
|
|
25
|
+
return {
|
|
26
|
+
type: _action_type.SUBMIT.UPDATE_OPERATION,
|
|
27
|
+
payload: payload
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
var updateDecimal = function updateDecimal(payload) {
|
|
32
|
+
return {
|
|
33
|
+
type: _action_type.SUBMIT.UPDATE_DECIMAL,
|
|
34
|
+
payload: payload
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
exports.toggleIsAscend = toggleIsAscend;
|
|
39
|
+
exports.toggleIsIntensity = toggleIsIntensity;
|
|
40
|
+
exports.updateOperation = updateOperation;
|
|
41
|
+
exports.updateDecimal = updateDecimal;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.toggleThresholdIsEdit = exports.resetThresholdValue = exports.updateThresholdValue = undefined;
|
|
7
|
+
|
|
8
|
+
var _action_type = require('../constants/action_type');
|
|
9
|
+
|
|
10
|
+
var updateThresholdValue = function updateThresholdValue(payload) {
|
|
11
|
+
return {
|
|
12
|
+
type: _action_type.THRESHOLD.UPDATE_VALUE,
|
|
13
|
+
payload: payload
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
var resetThresholdValue = function resetThresholdValue() {
|
|
18
|
+
return {
|
|
19
|
+
type: _action_type.THRESHOLD.RESET_VALUE,
|
|
20
|
+
payload: false
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
var toggleThresholdIsEdit = function toggleThresholdIsEdit(payload) {
|
|
25
|
+
return {
|
|
26
|
+
type: _action_type.THRESHOLD.TOGGLE_ISEDIT,
|
|
27
|
+
payload: payload
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
exports.updateThresholdValue = updateThresholdValue;
|
|
32
|
+
exports.resetThresholdValue = resetThresholdValue;
|
|
33
|
+
exports.toggleThresholdIsEdit = toggleThresholdIsEdit;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.clickUiTarget = exports.scrollUiWheel = exports.selectUiSweep = exports.setUiSweepType = exports.setUiViewerType = undefined;
|
|
7
|
+
|
|
8
|
+
var _action_type = require('../constants/action_type');
|
|
9
|
+
|
|
10
|
+
var setUiViewerType = function setUiViewerType(payload) {
|
|
11
|
+
return {
|
|
12
|
+
type: _action_type.UI.VIEWER.SET_TYPE,
|
|
13
|
+
payload: payload
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
var setUiSweepType = function setUiSweepType(payload) {
|
|
18
|
+
return {
|
|
19
|
+
type: _action_type.UI.SWEEP.SET_TYPE,
|
|
20
|
+
payload: payload
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
var selectUiSweep = function selectUiSweep(payload) {
|
|
25
|
+
return {
|
|
26
|
+
type: _action_type.UI.SWEEP.SELECT,
|
|
27
|
+
payload: payload
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
var scrollUiWheel = function scrollUiWheel(payload) {
|
|
32
|
+
return {
|
|
33
|
+
type: _action_type.UI.WHEEL.SCROLL,
|
|
34
|
+
payload: payload
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
var clickUiTarget = function clickUiTarget(payload, onPeak) {
|
|
39
|
+
return {
|
|
40
|
+
type: _action_type.UI.CLICK_TARGET,
|
|
41
|
+
payload: payload,
|
|
42
|
+
onPeak: onPeak
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
exports.setUiViewerType = setUiViewerType;
|
|
47
|
+
exports.setUiSweepType = setUiSweepType;
|
|
48
|
+
exports.selectUiSweep = selectUiSweep;
|
|
49
|
+
exports.scrollUiWheel = scrollUiWheel;
|
|
50
|
+
exports.clickUiTarget = clickUiTarget;
|
package/dist/app.js
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.FN = exports.SpectraEditor = undefined;
|
|
7
|
+
|
|
8
|
+
var _react = require('react');
|
|
9
|
+
|
|
10
|
+
var _react2 = _interopRequireDefault(_react);
|
|
11
|
+
|
|
12
|
+
var _reactRedux = require('react-redux');
|
|
13
|
+
|
|
14
|
+
var _redux = require('redux');
|
|
15
|
+
|
|
16
|
+
var _propTypes = require('prop-types');
|
|
17
|
+
|
|
18
|
+
var _propTypes2 = _interopRequireDefault(_propTypes);
|
|
19
|
+
|
|
20
|
+
require('regenerator-runtime/runtime');
|
|
21
|
+
|
|
22
|
+
var _reduxSaga = require('redux-saga');
|
|
23
|
+
|
|
24
|
+
var _reduxSaga2 = _interopRequireDefault(_reduxSaga);
|
|
25
|
+
|
|
26
|
+
var _index = require('./reducers/index');
|
|
27
|
+
|
|
28
|
+
var _index2 = _interopRequireDefault(_index);
|
|
29
|
+
|
|
30
|
+
var _index3 = require('./sagas/index');
|
|
31
|
+
|
|
32
|
+
var _index4 = _interopRequireDefault(_index3);
|
|
33
|
+
|
|
34
|
+
var _layer_init = require('./layer_init');
|
|
35
|
+
|
|
36
|
+
var _layer_init2 = _interopRequireDefault(_layer_init);
|
|
37
|
+
|
|
38
|
+
var _fn = require('./fn');
|
|
39
|
+
|
|
40
|
+
var _fn2 = _interopRequireDefault(_fn);
|
|
41
|
+
|
|
42
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
43
|
+
|
|
44
|
+
// - - - store & middleware - - -
|
|
45
|
+
|
|
46
|
+
// import { logger } from 'redux-logger';
|
|
47
|
+
|
|
48
|
+
var sagaMiddleware = (0, _reduxSaga2.default)(); // eslint-disable-line
|
|
49
|
+
|
|
50
|
+
var middlewares = [sagaMiddleware]; // logger
|
|
51
|
+
|
|
52
|
+
var store = (0, _redux.compose)(_redux.applyMiddleware.apply(undefined, middlewares))(_redux.createStore)(_index2.default);
|
|
53
|
+
|
|
54
|
+
sagaMiddleware.run(_index4.default);
|
|
55
|
+
|
|
56
|
+
// - - - helper - - -
|
|
57
|
+
var ensureQuillDelta = function ensureQuillDelta(descs) {
|
|
58
|
+
var isArr = Array.isArray(descs);
|
|
59
|
+
return isArr ? descs : [{ insert: descs }];
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
// - - - React - - -
|
|
63
|
+
var SpectraEditor = function SpectraEditor(_ref) {
|
|
64
|
+
var entity = _ref.entity,
|
|
65
|
+
others = _ref.others,
|
|
66
|
+
cLabel = _ref.cLabel,
|
|
67
|
+
xLabel = _ref.xLabel,
|
|
68
|
+
yLabel = _ref.yLabel,
|
|
69
|
+
operations = _ref.operations,
|
|
70
|
+
forecast = _ref.forecast,
|
|
71
|
+
molSvg = _ref.molSvg,
|
|
72
|
+
editorOnly = _ref.editorOnly,
|
|
73
|
+
descriptions = _ref.descriptions,
|
|
74
|
+
canChangeDescription = _ref.canChangeDescription,
|
|
75
|
+
onDescriptionChanged = _ref.onDescriptionChanged;
|
|
76
|
+
return _react2.default.createElement(
|
|
77
|
+
_reactRedux.Provider,
|
|
78
|
+
{ store: store },
|
|
79
|
+
_react2.default.createElement(_layer_init2.default, {
|
|
80
|
+
entity: entity,
|
|
81
|
+
others: others,
|
|
82
|
+
cLabel: cLabel,
|
|
83
|
+
xLabel: xLabel,
|
|
84
|
+
yLabel: yLabel,
|
|
85
|
+
forecast: forecast,
|
|
86
|
+
operations: operations,
|
|
87
|
+
descriptions: ensureQuillDelta(descriptions),
|
|
88
|
+
molSvg: molSvg,
|
|
89
|
+
editorOnly: editorOnly,
|
|
90
|
+
canChangeDescription: canChangeDescription,
|
|
91
|
+
onDescriptionChanged: onDescriptionChanged
|
|
92
|
+
})
|
|
93
|
+
);
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
SpectraEditor.propTypes = {
|
|
97
|
+
entity: _propTypes2.default.object.isRequired,
|
|
98
|
+
others: _propTypes2.default.object,
|
|
99
|
+
cLabel: _propTypes2.default.string,
|
|
100
|
+
xLabel: _propTypes2.default.string,
|
|
101
|
+
yLabel: _propTypes2.default.string,
|
|
102
|
+
forecast: _propTypes2.default.object,
|
|
103
|
+
operations: _propTypes2.default.array,
|
|
104
|
+
descriptions: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.array]),
|
|
105
|
+
molSvg: _propTypes2.default.string,
|
|
106
|
+
editorOnly: _propTypes2.default.bool,
|
|
107
|
+
canChangeDescription: _propTypes2.default.bool,
|
|
108
|
+
onDescriptionChanged: _propTypes2.default.func
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
SpectraEditor.defaultProps = {
|
|
112
|
+
others: { others: [], addOthersCb: false },
|
|
113
|
+
cLabel: '',
|
|
114
|
+
xLabel: '',
|
|
115
|
+
yLabel: '',
|
|
116
|
+
forecast: {},
|
|
117
|
+
operations: [],
|
|
118
|
+
descriptions: [],
|
|
119
|
+
molSvg: '',
|
|
120
|
+
editorOnly: false,
|
|
121
|
+
canChangeDescription: false
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
exports.SpectraEditor = SpectraEditor;
|
|
125
|
+
exports.FN = _fn2.default;
|