@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.
Files changed (202) hide show
  1. package/README.md +16 -0
  2. package/dist/__tests__/fixtures/aif_jcamp_1.js +136 -0
  3. package/dist/__tests__/fixtures/aif_jcamp_2.js +122 -0
  4. package/dist/__tests__/fixtures/backup/nmr1h_a.js +3518 -0
  5. package/dist/__tests__/fixtures/backup/xrd_jcamp_1.js +10705 -0
  6. package/dist/__tests__/fixtures/cds_jcamp.js +861 -0
  7. package/dist/__tests__/fixtures/compare_ir_1_jcamp.js +585 -0
  8. package/dist/__tests__/fixtures/compare_ir_2_jcamp.js +515 -0
  9. package/dist/__tests__/fixtures/compare_uv_vis_jcamp.js +640 -0
  10. package/dist/__tests__/fixtures/cyclic_voltammetry_1.js +778 -0
  11. package/dist/__tests__/fixtures/cyclic_voltammetry_2.js +758 -0
  12. package/dist/__tests__/fixtures/cyclic_voltammetry_3.js +759 -0
  13. package/dist/__tests__/fixtures/dls_acf_jcamp.js +148 -0
  14. package/dist/__tests__/fixtures/dls_intensity_jcamp.js +151 -0
  15. package/dist/__tests__/fixtures/emissions_jcamp.js +883 -0
  16. package/dist/__tests__/fixtures/hplc_uvvis_jcamp.js +638 -0
  17. package/dist/__tests__/fixtures/hplc_uvvis_jcamp_2.js +221 -0
  18. package/dist/__tests__/fixtures/ir_jcamp.js +148 -0
  19. package/dist/__tests__/fixtures/ir_result.js +46 -0
  20. package/dist/__tests__/fixtures/ir_svg.js +8 -0
  21. package/dist/__tests__/fixtures/ms_jcamp.js +64 -0
  22. package/dist/__tests__/fixtures/nmr13c_dept_jcamp.js +3543 -0
  23. package/dist/__tests__/fixtures/nmr13c_jcamp.js +1229 -0
  24. package/dist/__tests__/fixtures/nmr15n_jcamp.js +7177 -0
  25. package/dist/__tests__/fixtures/nmr19f_jcamp.js +6560 -0
  26. package/dist/__tests__/fixtures/nmr1h_2_jcamp.js +2005 -0
  27. package/dist/__tests__/fixtures/nmr1h_jcamp.js +4516 -0
  28. package/dist/__tests__/fixtures/nmr29si_jcamp.js +3029 -0
  29. package/dist/__tests__/fixtures/nmr31p_jcamp.js +3418 -0
  30. package/dist/__tests__/fixtures/nmr_result.js +68 -0
  31. package/dist/__tests__/fixtures/nmr_svg.js +8 -0
  32. package/dist/__tests__/fixtures/phenylalanin.js +142 -0
  33. package/dist/__tests__/fixtures/qDescValue.js +65 -0
  34. package/dist/__tests__/fixtures/raman_jcamp.js +410 -0
  35. package/dist/__tests__/fixtures/sec_1_jcamp.js +425 -0
  36. package/dist/__tests__/fixtures/sec_2_jcamp.js +407 -0
  37. package/dist/__tests__/fixtures/sec_3_jcamp.js +408 -0
  38. package/dist/__tests__/fixtures/sec_4_jcamp.js +407 -0
  39. package/dist/__tests__/fixtures/tga_jcamp.js +4157 -0
  40. package/dist/__tests__/fixtures/uv_vis_jcamp.js +249 -0
  41. package/dist/__tests__/fixtures/xrd_jcamp_1.js +436 -0
  42. package/dist/__tests__/fixtures/xrd_jcamp_2.js +955 -0
  43. package/dist/__tests__/fixtures/xrd_jcamp_3.js +1871 -0
  44. package/dist/__tests__/units/components/panel/graph_selection.test.js +72 -0
  45. package/dist/__tests__/units/components/panel/peaks.test.js +87 -0
  46. package/dist/actions/curve.js +15 -14
  47. package/dist/actions/cyclic_voltammetry.js +40 -60
  48. package/dist/actions/edit_peak.js +8 -12
  49. package/dist/actions/forecast.js +16 -24
  50. package/dist/actions/integration.js +12 -18
  51. package/dist/actions/jcamp.js +16 -24
  52. package/dist/actions/layout.js +4 -6
  53. package/dist/actions/manager.js +20 -30
  54. package/dist/actions/meta.js +4 -6
  55. package/dist/actions/multiplicity.js +24 -36
  56. package/dist/actions/scan.js +12 -18
  57. package/dist/actions/shift.js +8 -12
  58. package/dist/actions/status.js +12 -18
  59. package/dist/actions/submit.js +16 -24
  60. package/dist/actions/threshold.js +20 -30
  61. package/dist/actions/ui.js +25 -31
  62. package/dist/actions/wavelength.js +4 -6
  63. package/dist/app.js +25 -23
  64. package/dist/components/cmd_bar/01_viewer.js +24 -34
  65. package/dist/components/cmd_bar/02_zoom.js +18 -28
  66. package/dist/components/cmd_bar/03_peak.js +50 -66
  67. package/dist/components/cmd_bar/04_integration.js +70 -84
  68. package/dist/components/cmd_bar/05_multiplicity.js +42 -56
  69. package/dist/components/cmd_bar/06_undo_redo.js +22 -36
  70. package/dist/components/cmd_bar/07_pecker.js +24 -34
  71. package/dist/components/cmd_bar/common.js +11 -7
  72. package/dist/components/cmd_bar/index.js +17 -23
  73. package/dist/components/cmd_bar/r01_layout.js +79 -56
  74. package/dist/components/cmd_bar/r02_scan.js +70 -87
  75. package/dist/components/cmd_bar/r03_threshold.js +54 -68
  76. package/dist/components/cmd_bar/r04_submit.js +71 -83
  77. package/dist/components/cmd_bar/r05_submit_btn.js +64 -72
  78. package/dist/components/cmd_bar/r06_predict_btn.js +142 -152
  79. package/dist/components/cmd_bar/r07_wavelength_btn.js +28 -36
  80. package/dist/components/cmd_bar/tri_btn.js +91 -113
  81. package/dist/components/common/chem.js +2 -3
  82. package/dist/components/common/comps.js +2 -2
  83. package/dist/components/common/draw.js +30 -11
  84. package/dist/components/d3_line/index.js +154 -176
  85. package/dist/components/d3_line/line_focus.js +595 -739
  86. package/dist/components/d3_multi/index.js +153 -174
  87. package/dist/components/d3_multi/multi_focus.js +725 -850
  88. package/dist/components/d3_rect/index.js +112 -134
  89. package/dist/components/d3_rect/rect_focus.js +163 -208
  90. package/dist/components/forecast/comps.js +60 -68
  91. package/dist/components/forecast/ir_comps.js +49 -56
  92. package/dist/components/forecast/ir_viewer.js +61 -68
  93. package/dist/components/forecast/nmr_comps.js +62 -72
  94. package/dist/components/forecast/nmr_viewer.js +59 -68
  95. package/dist/components/forecast/section_loading.js +39 -63
  96. package/dist/components/forecast_viewer.js +109 -119
  97. package/dist/components/multi_jcamps_viewer.js +97 -113
  98. package/dist/components/panel/compare.js +183 -192
  99. package/dist/components/panel/cyclic_voltamery_data.js +149 -165
  100. package/dist/components/panel/graph_selection.js +143 -132
  101. package/dist/components/panel/index.js +112 -144
  102. package/dist/components/panel/info.js +125 -132
  103. package/dist/components/panel/multiplicity.js +215 -223
  104. package/dist/components/panel/multiplicity_coupling.js +108 -136
  105. package/dist/components/panel/multiplicity_select.js +43 -51
  106. package/dist/components/panel/peaks.js +130 -132
  107. package/dist/constants/action_type.js +23 -39
  108. package/dist/constants/list_layout.js +7 -4
  109. package/dist/constants/list_shift.js +117 -103
  110. package/dist/constants/list_ui.js +3 -6
  111. package/dist/constants/list_wavelength.js +7 -8
  112. package/dist/fn.js +2 -3
  113. package/dist/helpers/brush.js +49 -65
  114. package/dist/helpers/calc.js +2 -4
  115. package/dist/helpers/carbonFeatures.js +22 -20
  116. package/dist/helpers/cfg.js +49 -67
  117. package/dist/helpers/chem.js +450 -393
  118. package/dist/helpers/compass.js +92 -83
  119. package/dist/helpers/converter.js +52 -65
  120. package/dist/helpers/extractParams.js +60 -52
  121. package/dist/helpers/extractPeaksEdit.js +29 -25
  122. package/dist/helpers/focus.js +2 -6
  123. package/dist/helpers/format.js +416 -361
  124. package/dist/helpers/init.js +41 -37
  125. package/dist/helpers/integration.js +18 -21
  126. package/dist/helpers/mount.js +57 -61
  127. package/dist/helpers/multiplicity.js +19 -24
  128. package/dist/helpers/multiplicity_calc.js +39 -50
  129. package/dist/helpers/multiplicity_complat.js +21 -47
  130. package/dist/helpers/multiplicity_manual.js +49 -55
  131. package/dist/helpers/multiplicity_verify_basic.js +108 -111
  132. package/dist/helpers/shift.js +15 -23
  133. package/dist/helpers/zoom.js +7 -11
  134. package/dist/index.js +680 -630
  135. package/dist/layer_content.js +40 -43
  136. package/dist/layer_init.js +162 -184
  137. package/dist/layer_prism.js +38 -41
  138. package/dist/reducers/index.js +2 -3
  139. package/dist/reducers/reducer_curve.js +35 -26
  140. package/dist/reducers/reducer_edit_peak.js +122 -98
  141. package/dist/reducers/reducer_forecast.js +57 -44
  142. package/dist/reducers/reducer_integration.js +135 -103
  143. package/dist/reducers/reducer_jcamp.js +49 -44
  144. package/dist/reducers/reducer_layout.js +5 -6
  145. package/dist/reducers/reducer_manager.js +5 -6
  146. package/dist/reducers/reducer_meta.js +5 -6
  147. package/dist/reducers/reducer_multiplicity.js +100 -77
  148. package/dist/reducers/reducer_scan.js +17 -20
  149. package/dist/reducers/reducer_shift.js +115 -70
  150. package/dist/reducers/reducer_simulation.js +7 -8
  151. package/dist/reducers/reducer_status.js +5 -6
  152. package/dist/reducers/reducer_submit.js +12 -15
  153. package/dist/reducers/reducer_threshold.js +5 -6
  154. package/dist/reducers/reducer_ui.js +5 -6
  155. package/dist/reducers/reducer_voltammetry.js +156 -96
  156. package/dist/reducers/reducer_wavelength.js +5 -6
  157. package/dist/reducers/undo_redo_config.js +3 -5
  158. package/dist/sagas/index.js +2 -15
  159. package/dist/sagas/saga_edit_peak.js +54 -68
  160. package/dist/sagas/saga_manager.js +86 -130
  161. package/dist/sagas/saga_meta.js +25 -31
  162. package/dist/sagas/saga_multi_entities.js +40 -103
  163. package/dist/sagas/saga_multiplicity.js +336 -406
  164. package/dist/sagas/saga_ui.js +296 -475
  165. package/dist/setupTests.js +8 -0
  166. package/dist/third_party/jAnalyzer.js +66 -67
  167. package/dist/third_party/peakInterval.js +34 -34
  168. package/package.json +14 -14
  169. package/dist/components/cmd_bar/03_peak_bk.js +0 -139
  170. package/dist/components/cmd_bar/04_integration_bk.js +0 -180
  171. package/dist/components/cmd_bar/05_multiplicity_bk.js +0 -131
  172. package/dist/components/cmd_bar/r01_layout_bk.js +0 -186
  173. package/dist/components/cmd_bar/r06_predict_btn_bk.js +0 -220
  174. package/dist/components/d3_line/line_focus_bk.js +0 -825
  175. package/dist/components/d3_multi/index_bk.js +0 -210
  176. package/dist/components/d3_multi/multi_focus_bk.js +0 -533
  177. package/dist/components/panel/compare_bk.js +0 -256
  178. package/dist/components/panel/cyclic_voltamery_data_bk.js +0 -292
  179. package/dist/components/panel/index_bk.js +0 -178
  180. package/dist/components/panel/info_bk.js +0 -235
  181. package/dist/components/panel/multiplicity_bk.js +0 -280
  182. package/dist/helpers/carbonFeatures_bk.js +0 -45
  183. package/dist/helpers/cfg_bk.js +0 -80
  184. package/dist/helpers/chem_bk.js +0 -787
  185. package/dist/helpers/compass_bk.js +0 -149
  186. package/dist/helpers/converter_bk.js +0 -96
  187. package/dist/helpers/extractPeaksEdit_bk.js +0 -53
  188. package/dist/helpers/format_bk.js +0 -497
  189. package/dist/index_bk.js +0 -640
  190. package/dist/layer_content_bk.js +0 -105
  191. package/dist/layer_init_bk.js +0 -235
  192. package/dist/layer_prism_bk.js +0 -133
  193. package/dist/reducers/reducer_edit_peak_bk.js +0 -108
  194. package/dist/reducers/reducer_integration_bk.js +0 -134
  195. package/dist/reducers/reducer_jcamp_bk.js +0 -71
  196. package/dist/reducers/reducer_multiplicity_bk.js +0 -126
  197. package/dist/reducers/reducer_shift_bk.js +0 -88
  198. package/dist/reducers/reducer_voltammetry_bk.js +0 -287
  199. package/dist/sagas/saga_edit_peak_bk.js +0 -73
  200. package/dist/sagas/saga_multi_entities_bk.js +0 -106
  201. package/dist/sagas/saga_multiplicity_bk.js +0 -351
  202. package/dist/sagas/saga_ui_bk.js +0 -453
@@ -1,453 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = void 0;
8
- var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
9
- var _effects = require("redux-saga/effects");
10
- var _action_type = require("../constants/action_type");
11
- var _list_ui = require("../constants/list_ui");
12
- var _list_layout = require("../constants/list_layout");
13
- var _marked = /*#__PURE__*/_regenerator.default.mark(selectUiSweep),
14
- _marked2 = /*#__PURE__*/_regenerator.default.mark(scrollUiWheel),
15
- _marked3 = /*#__PURE__*/_regenerator.default.mark(clickUiTarget);
16
- var getUiSt = function getUiSt(state) {
17
- return state.ui;
18
- };
19
- var calcPeaks = function calcPeaks(payload) {
20
- var xExtent = payload.xExtent,
21
- yExtent = payload.yExtent,
22
- dataPks = payload.dataPks;
23
- if (!dataPks) return [];
24
- var xL = xExtent.xL,
25
- xU = xExtent.xU;
26
- var yL = yExtent.yL,
27
- yU = yExtent.yU;
28
- var peaks = dataPks.filter(function (p) {
29
- return xL <= p.x && p.x <= xU && yL <= p.y && p.y <= yU;
30
- });
31
- return peaks;
32
- };
33
- function selectUiSweep(action) {
34
- var uiSt, payload, peaks, newPayload;
35
- return _regenerator.default.wrap(function selectUiSweep$(_context) {
36
- while (1) switch (_context.prev = _context.next) {
37
- case 0:
38
- _context.next = 2;
39
- return (0, _effects.select)(getUiSt);
40
- case 2:
41
- uiSt = _context.sent;
42
- payload = action.payload;
43
- _context.t0 = uiSt.sweepType;
44
- _context.next = _context.t0 === _list_ui.LIST_UI_SWEEP_TYPE.ZOOMIN ? 7 : _context.t0 === _list_ui.LIST_UI_SWEEP_TYPE.ZOOMRESET ? 10 : _context.t0 === _list_ui.LIST_UI_SWEEP_TYPE.INTEGRATION_ADD ? 13 : _context.t0 === _list_ui.LIST_UI_SWEEP_TYPE.MULTIPLICITY_SWEEP_ADD ? 16 : 25;
45
- break;
46
- case 7:
47
- _context.next = 9;
48
- return (0, _effects.put)({
49
- type: _action_type.UI.SWEEP.SELECT_ZOOMIN,
50
- payload: payload
51
- });
52
- case 9:
53
- return _context.abrupt("break", 26);
54
- case 10:
55
- _context.next = 12;
56
- return (0, _effects.put)({
57
- type: _action_type.UI.SWEEP.SELECT_ZOOMRESET,
58
- payload: payload
59
- });
60
- case 12:
61
- return _context.abrupt("break", 26);
62
- case 13:
63
- _context.next = 15;
64
- return (0, _effects.put)({
65
- type: _action_type.UI.SWEEP.SELECT_INTEGRATION,
66
- payload: payload
67
- });
68
- case 15:
69
- return _context.abrupt("break", 26);
70
- case 16:
71
- peaks = calcPeaks(payload); // eslint-disable-line
72
- if (!(peaks.length === 0)) {
73
- _context.next = 19;
74
- break;
75
- }
76
- return _context.abrupt("break", 26);
77
- case 19:
78
- newPayload = Object.assign({}, payload, {
79
- peaks: peaks
80
- }); // eslint-disable-line
81
- _context.next = 22;
82
- return (0, _effects.put)({
83
- type: _action_type.UI.SWEEP.SELECT_INTEGRATION,
84
- payload: newPayload
85
- });
86
- case 22:
87
- _context.next = 24;
88
- return (0, _effects.put)({
89
- type: _action_type.UI.SWEEP.SELECT_MULTIPLICITY,
90
- payload: newPayload
91
- });
92
- case 24:
93
- return _context.abrupt("break", 26);
94
- case 25:
95
- return _context.abrupt("break", 26);
96
- case 26:
97
- return _context.abrupt("return", null);
98
- case 27:
99
- case "end":
100
- return _context.stop();
101
- }
102
- }, _marked);
103
- }
104
- var getLayoutSt = function getLayoutSt(state) {
105
- return state.layout;
106
- };
107
- function scrollUiWheel(action) {
108
- var layoutSt, payload, xExtent, yExtent, direction, yL, yU, yeL, yeU, scale, nextExtent, nyeL, nyeU, h, nytL, nytU;
109
- return _regenerator.default.wrap(function scrollUiWheel$(_context2) {
110
- while (1) switch (_context2.prev = _context2.next) {
111
- case 0:
112
- _context2.next = 2;
113
- return (0, _effects.select)(getLayoutSt);
114
- case 2:
115
- layoutSt = _context2.sent;
116
- payload = action.payload;
117
- xExtent = payload.xExtent, yExtent = payload.yExtent, direction = payload.direction;
118
- yL = yExtent.yL, yU = yExtent.yU;
119
- yeL = yL + (yU - yL) * 0.1, yeU = yU - (yU - yL) * 0.1;
120
- scale = direction ? 0.8 : 1.25;
121
- nextExtent = {
122
- xExtent: false,
123
- yExtent: false
124
- };
125
- nyeL = 0, nyeU = 1, h = 1, nytL = 0, nytU = 1;
126
- _context2.t0 = layoutSt;
127
- _context2.next = _context2.t0 === _list_layout.LIST_LAYOUT.IR ? 13 : _context2.t0 === _list_layout.LIST_LAYOUT.RAMAN ? 13 : _context2.t0 === _list_layout.LIST_LAYOUT.MS ? 20 : _context2.t0 === _list_layout.LIST_LAYOUT.UVVIS ? 27 : _context2.t0 === _list_layout.LIST_LAYOUT.HPLC_UVVIS ? 27 : _context2.t0 === _list_layout.LIST_LAYOUT.TGA ? 27 : _context2.t0 === _list_layout.LIST_LAYOUT.XRD ? 27 : 27;
128
- break;
129
- case 13:
130
- nyeL = yeL + (yeU - yeL) * (1 - scale);
131
- nyeU = yeU;
132
- h = nyeU - nyeL;
133
- nytL = nyeL - 0.125 * h;
134
- nytU = nyeU + 0.125 * h;
135
- nextExtent = {
136
- xExtent: xExtent,
137
- yExtent: {
138
- yL: nytL,
139
- yU: nytU
140
- }
141
- };
142
- return _context2.abrupt("break", 34);
143
- case 20:
144
- nyeL = 0;
145
- nyeU = yeL + (yeU - yeL) * scale;
146
- h = nyeU - nyeL;
147
- nytL = nyeL - 0.125 * h;
148
- nytU = nyeU + 0.125 * h;
149
- nextExtent = {
150
- xExtent: xExtent,
151
- yExtent: {
152
- yL: nytL,
153
- yU: nytU
154
- }
155
- };
156
- return _context2.abrupt("break", 34);
157
- case 27:
158
- nyeL = yeL;
159
- nyeU = yeL + (yeU - yeL) * scale;
160
- h = nyeU - nyeL;
161
- nytL = nyeL - 0.125 * h;
162
- nytU = nyeU + 0.125 * h;
163
- nextExtent = {
164
- xExtent: xExtent,
165
- yExtent: {
166
- yL: nytL,
167
- yU: nytU
168
- }
169
- };
170
- return _context2.abrupt("break", 34);
171
- case 34:
172
- _context2.next = 36;
173
- return (0, _effects.put)({
174
- type: _action_type.UI.SWEEP.SELECT_ZOOMIN,
175
- payload: nextExtent
176
- });
177
- case 36:
178
- case "end":
179
- return _context2.stop();
180
- }
181
- }, _marked2);
182
- }
183
- var getUiSweepType = function getUiSweepType(state) {
184
- return state.ui.sweepType;
185
- };
186
- function clickUiTarget(action) {
187
- var payload, onPeak, voltammetryPeakIdx, onPecker, jcampIdx, uiSweepType, xExtent, xL, xU;
188
- return _regenerator.default.wrap(function clickUiTarget$(_context3) {
189
- while (1) switch (_context3.prev = _context3.next) {
190
- case 0:
191
- payload = action.payload, onPeak = action.onPeak, voltammetryPeakIdx = action.voltammetryPeakIdx, onPecker = action.onPecker, jcampIdx = action.jcampIdx;
192
- _context3.next = 3;
193
- return (0, _effects.select)(getUiSweepType);
194
- case 3:
195
- uiSweepType = _context3.sent;
196
- if (!(uiSweepType === _list_ui.LIST_UI_SWEEP_TYPE.PEAK_ADD && !onPeak)) {
197
- _context3.next = 9;
198
- break;
199
- }
200
- _context3.next = 7;
201
- return (0, _effects.put)({
202
- type: _action_type.EDITPEAK.ADD_POSITIVE,
203
- payload: payload
204
- });
205
- case 7:
206
- _context3.next = 89;
207
- break;
208
- case 9:
209
- if (!(uiSweepType === _list_ui.LIST_UI_SWEEP_TYPE.PEAK_DELETE && onPeak)) {
210
- _context3.next = 14;
211
- break;
212
- }
213
- _context3.next = 12;
214
- return (0, _effects.put)({
215
- type: _action_type.EDITPEAK.ADD_NEGATIVE,
216
- payload: payload
217
- });
218
- case 12:
219
- _context3.next = 89;
220
- break;
221
- case 14:
222
- if (!(uiSweepType === _list_ui.LIST_UI_SWEEP_TYPE.ANCHOR_SHIFT && onPeak)) {
223
- _context3.next = 19;
224
- break;
225
- }
226
- _context3.next = 17;
227
- return (0, _effects.put)({
228
- type: _action_type.SHIFT.SET_PEAK,
229
- payload: payload
230
- });
231
- case 17:
232
- _context3.next = 89;
233
- break;
234
- case 19:
235
- if (!(uiSweepType === _list_ui.LIST_UI_SWEEP_TYPE.INTEGRATION_RM && onPeak)) {
236
- _context3.next = 24;
237
- break;
238
- }
239
- _context3.next = 22;
240
- return (0, _effects.put)({
241
- type: _action_type.INTEGRATION.RM_ONE,
242
- payload: payload
243
- });
244
- case 22:
245
- _context3.next = 89;
246
- break;
247
- case 24:
248
- if (!(uiSweepType === _list_ui.LIST_UI_SWEEP_TYPE.MULTIPLICITY_ONE_RM && onPeak)) {
249
- _context3.next = 29;
250
- break;
251
- }
252
- _context3.next = 27;
253
- return (0, _effects.put)({
254
- type: _action_type.INTEGRATION.RM_ONE,
255
- payload: payload
256
- });
257
- case 27:
258
- _context3.next = 89;
259
- break;
260
- case 29:
261
- if (!(uiSweepType === _list_ui.LIST_UI_SWEEP_TYPE.INTEGRATION_SET_REF && onPeak)) {
262
- _context3.next = 34;
263
- break;
264
- }
265
- _context3.next = 32;
266
- return (0, _effects.put)({
267
- type: _action_type.INTEGRATION.SET_REF,
268
- payload: payload
269
- });
270
- case 32:
271
- _context3.next = 89;
272
- break;
273
- case 34:
274
- if (!(uiSweepType === _list_ui.LIST_UI_SWEEP_TYPE.MULTIPLICITY_ONE_CLICK && onPeak)) {
275
- _context3.next = 46;
276
- break;
277
- }
278
- xExtent = payload.xExtent, xL = payload.xL, xU = payload.xU;
279
- if (!xExtent) {
280
- _context3.next = 41;
281
- break;
282
- }
283
- _context3.next = 39;
284
- return (0, _effects.put)({
285
- type: _action_type.MULTIPLICITY.ONE_CLICK_BY_UI,
286
- payload: xExtent
287
- });
288
- case 39:
289
- _context3.next = 44;
290
- break;
291
- case 41:
292
- if (!(xL && xU)) {
293
- _context3.next = 44;
294
- break;
295
- }
296
- _context3.next = 44;
297
- return (0, _effects.put)({
298
- type: _action_type.MULTIPLICITY.ONE_CLICK_BY_UI,
299
- payload: {
300
- xL: xL,
301
- xU: xU
302
- }
303
- });
304
- case 44:
305
- _context3.next = 89;
306
- break;
307
- case 46:
308
- if (!(uiSweepType === _list_ui.LIST_UI_SWEEP_TYPE.MULTIPLICITY_PEAK_ADD)) {
309
- _context3.next = 51;
310
- break;
311
- }
312
- _context3.next = 49;
313
- return (0, _effects.put)({
314
- type: _action_type.MULTIPLICITY.PEAK_ADD_BY_UI_SAG,
315
- payload: payload
316
- });
317
- case 49:
318
- _context3.next = 89;
319
- break;
320
- case 51:
321
- if (!(uiSweepType === _list_ui.LIST_UI_SWEEP_TYPE.MULTIPLICITY_PEAK_RM && onPeak)) {
322
- _context3.next = 56;
323
- break;
324
- }
325
- _context3.next = 54;
326
- return (0, _effects.put)({
327
- type: _action_type.MULTIPLICITY.PEAK_RM_BY_UI,
328
- payload: payload
329
- });
330
- case 54:
331
- _context3.next = 89;
332
- break;
333
- case 56:
334
- if (!(uiSweepType === _list_ui.LIST_UI_SWEEP_TYPE.CYCLIC_VOLTA_ADD_MAX_PEAK && !onPeak)) {
335
- _context3.next = 61;
336
- break;
337
- }
338
- _context3.next = 59;
339
- return (0, _effects.put)({
340
- type: _action_type.CYCLIC_VOLTA_METRY.ADD_MAX_PEAK,
341
- payload: {
342
- peak: payload,
343
- index: voltammetryPeakIdx,
344
- jcampIdx: jcampIdx
345
- }
346
- });
347
- case 59:
348
- _context3.next = 89;
349
- break;
350
- case 61:
351
- if (!(uiSweepType === _list_ui.LIST_UI_SWEEP_TYPE.CYCLIC_VOLTA_RM_MAX_PEAK && onPeak)) {
352
- _context3.next = 66;
353
- break;
354
- }
355
- _context3.next = 64;
356
- return (0, _effects.put)({
357
- type: _action_type.CYCLIC_VOLTA_METRY.REMOVE_MAX_PEAK,
358
- payload: {
359
- index: voltammetryPeakIdx,
360
- jcampIdx: jcampIdx
361
- }
362
- });
363
- case 64:
364
- _context3.next = 89;
365
- break;
366
- case 66:
367
- if (!(uiSweepType === _list_ui.LIST_UI_SWEEP_TYPE.CYCLIC_VOLTA_ADD_MIN_PEAK && !onPeak)) {
368
- _context3.next = 71;
369
- break;
370
- }
371
- _context3.next = 69;
372
- return (0, _effects.put)({
373
- type: _action_type.CYCLIC_VOLTA_METRY.ADD_MIN_PEAK,
374
- payload: {
375
- peak: payload,
376
- index: voltammetryPeakIdx,
377
- jcampIdx: jcampIdx
378
- }
379
- });
380
- case 69:
381
- _context3.next = 89;
382
- break;
383
- case 71:
384
- if (!(uiSweepType === _list_ui.LIST_UI_SWEEP_TYPE.CYCLIC_VOLTA_RM_MIN_PEAK && onPeak)) {
385
- _context3.next = 76;
386
- break;
387
- }
388
- _context3.next = 74;
389
- return (0, _effects.put)({
390
- type: _action_type.CYCLIC_VOLTA_METRY.REMOVE_MIN_PEAK,
391
- payload: {
392
- index: voltammetryPeakIdx,
393
- jcampIdx: jcampIdx
394
- }
395
- });
396
- case 74:
397
- _context3.next = 89;
398
- break;
399
- case 76:
400
- if (!(uiSweepType === _list_ui.LIST_UI_SWEEP_TYPE.CYCLIC_VOLTA_ADD_PECKER && !onPecker)) {
401
- _context3.next = 81;
402
- break;
403
- }
404
- _context3.next = 79;
405
- return (0, _effects.put)({
406
- type: _action_type.CYCLIC_VOLTA_METRY.ADD_PECKER,
407
- payload: {
408
- peak: payload,
409
- index: voltammetryPeakIdx,
410
- jcampIdx: jcampIdx
411
- }
412
- });
413
- case 79:
414
- _context3.next = 89;
415
- break;
416
- case 81:
417
- if (!(uiSweepType === _list_ui.LIST_UI_SWEEP_TYPE.CYCLIC_VOLTA_RM_PECKER && onPecker)) {
418
- _context3.next = 86;
419
- break;
420
- }
421
- _context3.next = 84;
422
- return (0, _effects.put)({
423
- type: _action_type.CYCLIC_VOLTA_METRY.REMOVE_PECKER,
424
- payload: {
425
- index: voltammetryPeakIdx,
426
- jcampIdx: jcampIdx
427
- }
428
- });
429
- case 84:
430
- _context3.next = 89;
431
- break;
432
- case 86:
433
- if (!(uiSweepType === _list_ui.LIST_UI_SWEEP_TYPE.CYCLIC_VOLTA_SET_REF && onPeak)) {
434
- _context3.next = 89;
435
- break;
436
- }
437
- _context3.next = 89;
438
- return (0, _effects.put)({
439
- type: _action_type.CYCLIC_VOLTA_METRY.SET_REF,
440
- payload: {
441
- index: voltammetryPeakIdx,
442
- jcampIdx: jcampIdx
443
- }
444
- });
445
- case 89:
446
- case "end":
447
- return _context3.stop();
448
- }
449
- }, _marked3);
450
- }
451
- var managerSagas = [(0, _effects.takeEvery)(_action_type.UI.CLICK_TARGET, clickUiTarget), (0, _effects.takeEvery)(_action_type.UI.SWEEP.SELECT, selectUiSweep), (0, _effects.takeEvery)(_action_type.UI.WHEEL.SCROLL, scrollUiWheel)];
452
- var _default = managerSagas;
453
- exports.default = _default;