@complat/react-spectra-editor 1.0.0-rc7.alpha.1 → 1.0.0-rc8

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.
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.toggleShowAllCurves = exports.setAllCurves = exports.selectCurve = void 0;
6
+ exports.setAllCurves = exports.selectCurve = void 0;
7
7
  var _action_type = require("../constants/action_type");
8
8
  const selectCurve = payload => ({
9
9
  type: _action_type.CURVE.SELECT_WORKING_CURVE,
@@ -14,9 +14,4 @@ const setAllCurves = payload => ({
14
14
  type: _action_type.CURVE.SET_ALL_CURVES,
15
15
  payload
16
16
  });
17
- exports.setAllCurves = setAllCurves;
18
- const toggleShowAllCurves = payload => ({
19
- type: _action_type.CURVE.SET_SHOULD_SHOW_ALL_CURVES,
20
- payload
21
- });
22
- exports.toggleShowAllCurves = toggleShowAllCurves;
17
+ exports.setAllCurves = setAllCurves;
@@ -155,11 +155,7 @@ const layoutSelect = (classes, layoutSt, updateLayoutAct) => {
155
155
  value: _list_layout.LIST_LAYOUT.SEC
156
156
  }, /*#__PURE__*/_react.default.createElement("span", {
157
157
  className: (0, _classnames.default)(classes.txtOpt, 'option-sv-bar-layout')
158
- }, "SEC")), /*#__PURE__*/_react.default.createElement(_MenuItem.default, {
159
- value: _list_layout.LIST_LAYOUT.AIF
160
- }, /*#__PURE__*/_react.default.createElement("span", {
161
- className: (0, _classnames.default)(classes.txtOpt, 'option-sv-bar-layout')
162
- }, "AIF"))));
158
+ }, "SEC"))));
163
159
  };
164
160
  const Layout = _ref => {
165
161
  let {
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.drawMain = exports.drawLabel = exports.drawDisplay = exports.drawDestroy = exports.drawArrowOnCurve = void 0;
6
+ exports.drawMain = exports.drawLabel = exports.drawDisplay = exports.drawDestroy = void 0;
7
7
  var d3 = _interopRequireWildcard(require("d3"));
8
8
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
9
9
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -28,26 +28,4 @@ const drawDisplay = (klass, isHidden) => {
28
28
  };
29
29
  exports.drawDisplay = drawDisplay;
30
30
  const drawDestroy = klass => d3.select(`${klass} > *`).remove();
31
- exports.drawDestroy = drawDestroy;
32
- const drawArrowOnCurve = (klass, isHidden) => {
33
- if (isHidden) {
34
- d3.select(klass).selectAll('marker').remove();
35
- } else {
36
- d3.select(klass).selectAll('marker').remove();
37
- const arrowLeft = d3.select(klass).selectAll('defs').append('marker').attr('id', 'arrow-left').attr('viewBox', '0 0 10 10').attr('refX', 5).attr('refY', 5).attr('markerWidth', 6).attr('markerHeight', 6).attr('orient', 'auto').attr('fill', '#00AA0099');
38
- arrowLeft.append('path').attr('d', 'M 0 0 L 10 5 L 0 10 z');
39
-
40
- // const arrowRight = d3.select(klass).selectAll('defs')
41
- // .append('marker')
42
- // .attr('id', 'arrow-right')
43
- // .attr('viewBox', '0 0 10 10')
44
- // .attr('refX', 5)
45
- // .attr('refY', 5)
46
- // .attr('markerWidth', 6)
47
- // .attr('markerHeight', 6)
48
- // .attr('orient', 'auto-start-reverse');
49
- // arrowRight.append('path')
50
- // .attr('d', 'M 0 0 L 10 5 L 0 10 z');
51
- }
52
- };
53
- exports.drawArrowOnCurve = drawArrowOnCurve;
31
+ exports.drawDestroy = drawDestroy;
@@ -84,7 +84,6 @@ class ViewerMulti extends _react.default.Component {
84
84
  });
85
85
  (0, _draw.drawLabel)(this.rootKlass, cLabel, xLabel, yLabel);
86
86
  (0, _draw.drawDisplay)(this.rootKlass, isHidden);
87
- (0, _draw.drawArrowOnCurve)(this.rootKlass, isHidden);
88
87
  }
89
88
  componentDidUpdate(prevProps) {
90
89
  const {
@@ -126,7 +125,6 @@ class ViewerMulti extends _react.default.Component {
126
125
  });
127
126
  (0, _draw.drawLabel)(this.rootKlass, cLabel, xLabel, yLabel);
128
127
  (0, _draw.drawDisplay)(this.rootKlass, isHidden);
129
- (0, _draw.drawArrowOnCurve)(this.rootKlass, isHidden);
130
128
  }
131
129
  componentWillUnmount() {
132
130
  (0, _draw.drawDestroy)(this.rootKlass);
@@ -36,7 +36,6 @@ class MultiFocus {
36
36
  } = props;
37
37
  this.entities = entities;
38
38
  this.jcampIdx = 0;
39
- this.isShowAllCurves = false;
40
39
  this.rootKlass = '.d3Line';
41
40
  this.margin = {
42
41
  t: 5,
@@ -252,9 +251,6 @@ class MultiFocus {
252
251
  this.updatePathCall(xt, yt);
253
252
  this.path.attr('d', this.pathCall(this.data));
254
253
  this.path.style('stroke', this.pathColor);
255
- if (this.layout === _list_layout.LIST_LAYOUT.AIF) {
256
- this.path.attr('marker-mid', 'url(#arrow-left)');
257
- }
258
254
  }
259
255
  drawOtherLines(layout) {
260
256
  d3.selectAll('.line-clip-compare').remove();
@@ -267,9 +263,6 @@ class MultiFocus {
267
263
  const pathColor = color ? color : _format.default.mutiEntitiesColors(idx);
268
264
  const path = (0, _mount.MountComparePath)(this, pathColor, idx, 0.4);
269
265
  path.attr('d', this.pathCall(data));
270
- if (this.layout === _list_layout.LIST_LAYOUT.AIF && this.isShowAllCurves === true) {
271
- path.attr('marker-mid', 'url(#arrow-left)');
272
- }
273
266
  });
274
267
  return null;
275
268
  }
@@ -737,7 +730,7 @@ class MultiFocus {
737
730
  ccp.enter().append('path').attr('d', lineSymbol).attr('class', 'enter-ref').attr('fill', 'green').attr('fill-opacity', 0.8).merge(ccp).attr('transform', d => `translate(${xt(d.x)}, ${yt(d.y)})`);
738
731
  }
739
732
  reverseXAxis(layoutSt) {
740
- return [_list_layout.LIST_LAYOUT.UVVIS, _list_layout.LIST_LAYOUT.HPLC_UVVIS, _list_layout.LIST_LAYOUT.TGA, _list_layout.LIST_LAYOUT.XRD, _list_layout.LIST_LAYOUT.CYCLIC_VOLTAMMETRY, _list_layout.LIST_LAYOUT.CDS, _list_layout.LIST_LAYOUT.SEC, _list_layout.LIST_LAYOUT.AIF].indexOf(layoutSt) < 0;
733
+ return [_list_layout.LIST_LAYOUT.UVVIS, _list_layout.LIST_LAYOUT.HPLC_UVVIS, _list_layout.LIST_LAYOUT.TGA, _list_layout.LIST_LAYOUT.XRD, _list_layout.LIST_LAYOUT.CYCLIC_VOLTAMMETRY, _list_layout.LIST_LAYOUT.CDS, _list_layout.LIST_LAYOUT.SEC].indexOf(layoutSt) < 0;
741
734
  }
742
735
  create(_ref) {
743
736
  let {
@@ -758,11 +751,9 @@ class MultiFocus {
758
751
  (0, _mount.MountMainFrame)(this, 'focus');
759
752
  (0, _mount.MountClip)(this);
760
753
  const {
761
- curveIdx,
762
- isShowAllCurve
754
+ curveIdx
763
755
  } = curveSt;
764
756
  const jcampIdx = curveIdx;
765
- this.isShowAllCurves = isShowAllCurve;
766
757
  this.root = d3.select(this.rootKlass).selectAll('.focus-main');
767
758
  this.scales = (0, _init.InitScale)(this, this.reverseXAxis(layoutSt));
768
759
  this.setTip();
@@ -808,11 +799,9 @@ class MultiFocus {
808
799
  this.root = d3.select(this.rootKlass).selectAll('.focus-main');
809
800
  this.scales = (0, _init.InitScale)(this, this.reverseXAxis(layoutSt));
810
801
  const {
811
- curveIdx,
812
- isShowAllCurve
802
+ curveIdx
813
803
  } = curveSt;
814
804
  const jcampIdx = curveIdx;
815
- this.isShowAllCurves = isShowAllCurve;
816
805
  this.entities = entities;
817
806
  this.setDataParams(filterPeak, tTrEndPts, tSfPeaks, layoutSt, cyclicvoltaSt, jcampIdx);
818
807
  if (this.data && this.data.length > 0) {
@@ -52,7 +52,7 @@ class MultiJcampsViewer extends _react.default.Component {
52
52
  render() {
53
53
  const {
54
54
  classes,
55
- curveSt,
55
+ curvSt,
56
56
  operations,
57
57
  entityFileNames,
58
58
  entities,
@@ -60,10 +60,7 @@ class MultiJcampsViewer extends _react.default.Component {
60
60
  } = this.props;
61
61
  if (!entities || entities.length === 0) return /*#__PURE__*/_react.default.createElement("div", null);
62
62
  const seperatedSubLayouts = seperatingSubLayout(entities, 'xUnit');
63
- const {
64
- curveIdx
65
- } = curveSt;
66
- const entity = entities[curveIdx];
63
+ const entity = entities[curvSt.curveIdx];
67
64
  const {
68
65
  feature,
69
66
  topic,
@@ -94,7 +91,7 @@ class MultiJcampsViewer extends _react.default.Component {
94
91
  xs: 3,
95
92
  align: "center"
96
93
  }, /*#__PURE__*/_react.default.createElement(_index.default, {
97
- jcampIdx: curveIdx,
94
+ jcampIdx: curvSt.curveIdx,
98
95
  entityFileNames: entityFileNames,
99
96
  userManualLink: userManualLink,
100
97
  feature: feature,
@@ -109,7 +106,7 @@ class MultiJcampsViewer extends _react.default.Component {
109
106
  const mapStateToProps = (state, _) => (
110
107
  // eslint-disable-line
111
108
  {
112
- curveSt: state.curve,
109
+ curvSt: state.curve,
113
110
  cyclicVoltaSt: state.cyclicvolta,
114
111
  entities: state.curve.listCurves
115
112
  });
@@ -126,7 +123,7 @@ MultiJcampsViewer.propTypes = {
126
123
  entityFileNames: _propTypes.default.array.isRequired,
127
124
  molSvg: _propTypes.default.string.isRequired,
128
125
  setAllCurvesAct: _propTypes.default.func.isRequired,
129
- curveSt: _propTypes.default.object.isRequired,
126
+ curvSt: _propTypes.default.object.isRequired,
130
127
  cyclicVoltaSt: _propTypes.default.object.isRequired,
131
128
  addNewCylicVoltaPairPeakAct: _propTypes.default.func.isRequired,
132
129
  addCylicVoltaMaxPeakAct: _propTypes.default.func.isRequired,
@@ -16,7 +16,6 @@ var _Typography = _interopRequireDefault(require("@material-ui/core/Typography")
16
16
  var _styles = require("@material-ui/core/styles");
17
17
  var _core = require("@material-ui/core");
18
18
  var _curve = require("../../actions/curve");
19
- var _list_layout = require("../../constants/list_layout");
20
19
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
21
20
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
22
21
  /* eslint-disable react/function-component-definition, function-paren-newline,
@@ -52,11 +51,9 @@ const GraphSelectionPanel = _ref => {
52
51
  let {
53
52
  classes,
54
53
  curveSt,
55
- entityFileNames,
56
- subLayoutsInfo,
57
- layoutSt,
58
54
  selectCurveAct,
59
- toggleShowAllCurveAct
55
+ entityFileNames,
56
+ subLayoutsInfo
60
57
  } = _ref;
61
58
  let subLayoutValues = [];
62
59
  if (subLayoutsInfo !== undefined && subLayoutsInfo !== null) {
@@ -68,8 +65,7 @@ const GraphSelectionPanel = _ref => {
68
65
  }
69
66
  const {
70
67
  curveIdx,
71
- listCurves,
72
- isShowAllCurve
68
+ listCurves
73
69
  } = curveSt;
74
70
  if (!listCurves) {
75
71
  return /*#__PURE__*/_react.default.createElement("span", null);
@@ -80,9 +76,6 @@ const GraphSelectionPanel = _ref => {
80
76
  const onChangeTabSubLayout = (event, newValue) => {
81
77
  setSelectedSublayout(newValue);
82
78
  };
83
- const onChangeSwitch = event => {
84
- toggleShowAllCurveAct(event.target.checked);
85
- };
86
79
  let itemsSubLayout = [];
87
80
  if (selectedSubLayout && subLayoutValues.length > 1) {
88
81
  const subLayout = subLayoutsInfo[selectedSubLayout];
@@ -127,13 +120,7 @@ const GraphSelectionPanel = _ref => {
127
120
  className: "txt-panel-header"
128
121
  }, /*#__PURE__*/_react.default.createElement("span", {
129
122
  className: (0, _classnames.default)(classes.txtBadge, 'txt-sv-panel-title')
130
- }, "Graph selection"))), /*#__PURE__*/_react.default.createElement(_Divider.default, null), layoutSt === _list_layout.LIST_LAYOUT.AIF ? /*#__PURE__*/_react.default.createElement(_core.FormControlLabel, {
131
- control: /*#__PURE__*/_react.default.createElement(_core.Switch, {
132
- checked: isShowAllCurve,
133
- onChange: onChangeSwitch
134
- }),
135
- label: "Show all curves"
136
- }) : null, subLayoutValues && subLayoutValues.length > 1 ? /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_core.Tabs, {
123
+ }, "Graph selection"))), /*#__PURE__*/_react.default.createElement(_Divider.default, null), subLayoutValues && subLayoutValues.length > 1 ? /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_core.Tabs, {
137
124
  value: selectedSubLayout,
138
125
  onChange: onChangeTabSubLayout
139
126
  }, subLayoutValues.map((subLayout, i) => {
@@ -197,8 +184,7 @@ const mapStateToProps = (state, props) => (
197
184
  curveSt: state.curve
198
185
  });
199
186
  const mapDispatchToProps = dispatch => (0, _redux.bindActionCreators)({
200
- selectCurveAct: _curve.selectCurve,
201
- toggleShowAllCurveAct: _curve.toggleShowAllCurves
187
+ selectCurveAct: _curve.selectCurve
202
188
  }, dispatch);
203
189
  GraphSelectionPanel.propTypes = {
204
190
  classes: _propTypes.default.object.isRequired,
@@ -208,8 +194,7 @@ GraphSelectionPanel.propTypes = {
208
194
  curveSt: _propTypes.default.object.isRequired,
209
195
  selectCurveAct: _propTypes.default.func.isRequired,
210
196
  entityFileNames: _propTypes.default.array.isRequired,
211
- subLayoutsInfo: _propTypes.default.array,
212
- toggleShowAllCurveAct: _propTypes.default.func.isRequired
197
+ subLayoutsInfo: _propTypes.default.array
213
198
  };
214
199
  var _default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)((0, _styles.withStyles)(styles)(GraphSelectionPanel));
215
200
  exports.default = _default;
@@ -148,7 +148,6 @@ const CYCLIC_VOLTA_METRY = {
148
148
  exports.CYCLIC_VOLTA_METRY = CYCLIC_VOLTA_METRY;
149
149
  const CURVE = {
150
150
  SELECT_WORKING_CURVE: 'SELECT_WORKING_CURVE',
151
- SET_ALL_CURVES: 'SET_ALL_CURVES',
152
- SET_SHOULD_SHOW_ALL_CURVES: 'SET_SHOULD_SHOW_ALL_CURVES'
151
+ SET_ALL_CURVES: 'SET_ALL_CURVES'
153
152
  };
154
153
  exports.CURVE = CURVE;
@@ -21,7 +21,6 @@ const LIST_LAYOUT = {
21
21
  HPLC_UVVIS: 'HPLC UV/VIS',
22
22
  CYCLIC_VOLTAMMETRY: 'CYCLIC VOLTAMMETRY',
23
23
  CDS: 'CIRCULAR DICHROISM SPECTROSCOPY',
24
- SEC: 'SIZE EXCLUSION CHROMATOGRAPHY',
25
- AIF: 'AIF'
24
+ SEC: 'SIZE EXCLUSION CHROMATOGRAPHY'
26
25
  };
27
26
  exports.LIST_LAYOUT = LIST_LAYOUT;
@@ -368,9 +368,6 @@ const readLayout = jcamp => {
368
368
  if (dataType.includes('SIZE EXCLUSION CHROMATOGRAPHY')) {
369
369
  return _list_layout.LIST_LAYOUT.SEC;
370
370
  }
371
- if (dataType.includes('SORPTION-DESORPTION MEASUREMENT')) {
372
- return _list_layout.LIST_LAYOUT.AIF;
373
- }
374
371
  }
375
372
  return false;
376
373
  };
@@ -762,7 +759,7 @@ const ExtractJcamp = source => {
762
759
  features = extrFeaturesMs(jcamp, layout, peakUp);
763
760
  } else if (_format.default.isXRDLayout(layout) || _format.default.isCDSLayout(layout)) {
764
761
  features = extrFeaturesXrd(jcamp, layout, peakUp);
765
- } else if (_format.default.isCyclicVoltaLayout(layout) || _format.default.isSECLayout(layout) || _format.default.isAIFLayout(layout)) {
762
+ } else if (_format.default.isCyclicVoltaLayout(layout) || _format.default.isSECLayout(layout)) {
766
763
  features = extrFeaturesCylicVolta(jcamp, layout, peakUp);
767
764
  } else {
768
765
  features = extrFeaturesNi(jcamp, layout, peakUp, spectra);
@@ -362,8 +362,6 @@ const isCyclicVoltaLayout = layoutSt => _list_layout.LIST_LAYOUT.CYCLIC_VOLTAMME
362
362
  const isCDSLayout = layoutSt => _list_layout.LIST_LAYOUT.CDS === layoutSt;
363
363
  const isSECLayout = layoutSt => _list_layout.LIST_LAYOUT.SEC === layoutSt;
364
364
  const isEmWaveLayout = layoutSt => [_list_layout.LIST_LAYOUT.IR, _list_layout.LIST_LAYOUT.RAMAN, _list_layout.LIST_LAYOUT.UVVIS, _list_layout.LIST_LAYOUT.HPLC_UVVIS].indexOf(layoutSt) >= 0;
365
- const hasMultiCurves = layoutSt => [_list_layout.LIST_LAYOUT.CYCLIC_VOLTAMMETRY, _list_layout.LIST_LAYOUT.SEC, _list_layout.LIST_LAYOUT.AIF].indexOf(layoutSt) >= 0;
366
- const isAIFLayout = layoutSt => _list_layout.LIST_LAYOUT.AIF === layoutSt;
367
365
  const getNmrTyp = layout => {
368
366
  switch (layout) {
369
367
  case _list_layout.LIST_LAYOUT.H1:
@@ -446,9 +444,7 @@ const Format = {
446
444
  formatedEm,
447
445
  calcMpyCenter: _multiplicity_calc.calcMpyCenter,
448
446
  compareColors,
449
- mutiEntitiesColors,
450
- hasMultiCurves,
451
- isAIFLayout
447
+ mutiEntitiesColors
452
448
  };
453
449
  var _default = Format;
454
450
  exports.default = _default;
package/dist/index.js CHANGED
@@ -39,8 +39,6 @@ var _sec_1_jcamp = _interopRequireDefault(require("./__tests__/fixtures/sec_1_jc
39
39
  var _sec_2_jcamp = _interopRequireDefault(require("./__tests__/fixtures/sec_2_jcamp"));
40
40
  var _sec_3_jcamp = _interopRequireDefault(require("./__tests__/fixtures/sec_3_jcamp"));
41
41
  var _sec_4_jcamp = _interopRequireDefault(require("./__tests__/fixtures/sec_4_jcamp"));
42
- var _aif_jcamp_ = _interopRequireDefault(require("./__tests__/fixtures/aif_jcamp_1"));
43
- var _aif_jcamp_2 = _interopRequireDefault(require("./__tests__/fixtures/aif_jcamp_2"));
44
42
  var _qDescValue = require("./__tests__/fixtures/qDescValue");
45
43
  require("./__tests__/style/svg.css");
46
44
  /* eslint-disable prefer-object-spread, default-param-last, no-nested-ternary */
@@ -73,8 +71,6 @@ const secEntity1 = _app.FN.ExtractJcamp(_sec_1_jcamp.default);
73
71
  const secEntity2 = _app.FN.ExtractJcamp(_sec_2_jcamp.default);
74
72
  const secEntity3 = _app.FN.ExtractJcamp(_sec_3_jcamp.default);
75
73
  const secEntity4 = _app.FN.ExtractJcamp(_sec_4_jcamp.default);
76
- const aifEntity1 = _app.FN.ExtractJcamp(_aif_jcamp_.default);
77
- const aifEntity2 = _app.FN.ExtractJcamp(_aif_jcamp_2.default);
78
74
  class DemoWriteIr extends _react.default.Component {
79
75
  constructor(props) {
80
76
  super(props);
@@ -160,8 +156,6 @@ class DemoWriteIr extends _react.default.Component {
160
156
  return cdsEntity;
161
157
  case 'sec':
162
158
  return secEntity1;
163
- case 'aif':
164
- return aifEntity1;
165
159
  case 'ms':
166
160
  default:
167
161
  return msEntity;
@@ -184,8 +178,6 @@ class DemoWriteIr extends _react.default.Component {
184
178
  return [xrdEntity1, xrdEntity2];
185
179
  case 'sec':
186
180
  return [secEntity1, secEntity2, secEntity3, secEntity4];
187
- case 'aif':
188
- return [aifEntity1, aifEntity2];
189
181
  default:
190
182
  return false;
191
183
  }
@@ -216,7 +208,6 @@ class DemoWriteIr extends _react.default.Component {
216
208
  case 'cyclic volta':
217
209
  case 'cds':
218
210
  case 'sec':
219
- case 'aif':
220
211
  default:
221
212
  return false;
222
213
  }
@@ -352,7 +343,7 @@ class DemoWriteIr extends _react.default.Component {
352
343
  multiplicity,
353
344
  integration
354
345
  } = _ref3;
355
- if (!_app.FN.isNmrLayout(layout)) return;
346
+ if (['1H', '13C', '19F'].indexOf(layout) < 0) return;
356
347
  const desc = this.formatMpy({
357
348
  multiplicity,
358
349
  integration,
@@ -499,7 +490,7 @@ class DemoWriteIr extends _react.default.Component {
499
490
  name: 'save',
500
491
  value: this.savePeaks
501
492
  }].filter(r => r.value);
502
- if (_app.FN.isNmrLayout(entity.layout)) {
493
+ if (['1H', '13C', '19F', '31P', '15N', '29Si'].indexOf(entity.layout) >= 0) {
503
494
  operations = [{
504
495
  name: 'write multiplicity',
505
496
  value: this.writeMpy
@@ -620,12 +611,6 @@ class DemoWriteIr extends _react.default.Component {
620
611
  },
621
612
  onClick: this.onClick('sec')
622
613
  }, "SEC"), /*#__PURE__*/_react.default.createElement(_Button.default, {
623
- variant: "contained",
624
- style: {
625
- margin: '0 10px 0 10px'
626
- },
627
- onClick: this.onClick('aif')
628
- }, "AIF"), /*#__PURE__*/_react.default.createElement(_Button.default, {
629
614
  variant: "contained",
630
615
  style: {
631
616
  margin: '0 10px 0 10px'
@@ -13,8 +13,7 @@ var _format = _interopRequireDefault(require("../helpers/format"));
13
13
 
14
14
  const initialState = {
15
15
  listCurves: [],
16
- curveIdx: 0,
17
- isShowAllCurve: false
16
+ curveIdx: 0
18
17
  };
19
18
  const setAllCurves = (state, action) => {
20
19
  const {
@@ -65,10 +64,6 @@ const curveReducer = function () {
65
64
  });
66
65
  case _action_type.CURVE.SET_ALL_CURVES:
67
66
  return setAllCurves(state, action);
68
- case _action_type.CURVE.SET_SHOULD_SHOW_ALL_CURVES:
69
- return Object.assign({}, state, {
70
- isShowAllCurve: action.payload
71
- });
72
67
  default:
73
68
  return state;
74
69
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@complat/react-spectra-editor",
3
- "version": "1.0.0-rc7.alpha.1",
3
+ "version": "1.0.0-rc8",
4
4
  "description": "An editor to View and Edit Chemical Spectra data (NMR, IR and MS, CV, UIVIS, XRD).",
5
5
  "repository": {
6
6
  "type": "git",
@@ -10,7 +10,7 @@
10
10
  "dependencies": {
11
11
  "@babel/preset-env": "^7.21.5",
12
12
  "@babel/preset-react": "^7.18.6",
13
- "@complat/react-svg-file-zoom-pan": "1.1.0",
13
+ "@complat/react-svg-file-zoom-pan": "1.1.1",
14
14
  "@material-ui/core": "^4.10.0",
15
15
  "@material-ui/icons": "^4.10.0",
16
16
  "@mdi/js": "^4.7.95",
@@ -63,11 +63,7 @@
63
63
  "@babel/preset-env": "^7.21.5",
64
64
  "@babel/preset-react": "^7.18.6",
65
65
  "@storybook/react": "7.0.7",
66
- "@types/enzyme": "^3.10.13",
67
66
  "babel-loader": "8.2.5",
68
- "enzyme": "^3.11.0",
69
- "enzyme-adapter-react-16": "^1.15.7",
70
- "enzyme-to-json": "^3.6.2",
71
67
  "eslint-config-airbnb": "^19.0.4",
72
68
  "eslint-plugin-import": "^2.25.0",
73
69
  "eslint-plugin-jsx-a11y": "^6.5.1",
@@ -1,137 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- const aifJcamp1 = `
8
- ##TITLE=Spectrum
9
- ##JCAMP-DX=5.00 $$ chemotion-converter-app (0.1.0)
10
- ##DATA TYPE=SORPTION-DESORPTION MEASUREMENT
11
- ##DATA CLASS=XYDATA
12
- ##ORIGIN=
13
- ##OWNER=
14
- ##XUNITS=p/p0
15
- ##YUNITS=ml/g
16
- ##OPERATOR=Volodymyr
17
- ##DATE=2020-04-30T00:00:00
18
- ##SERIAL=BEL 00218
19
- ##ADSORPTIVE=CH4
20
- ##TEMPERATURE=384.15
21
- ##AMOUNT=0.00980
22
- ##SAMPLE_CID=aus der BOX
23
- ##SAMPLE_MAT_ID=DUT-140(Cu)
24
- ##SOFTWARE=raw2aif
25
- ##SOFTWARE_VERSION=v004
26
- ##FIRSTX=0.000213204381723083
27
- ##LASTX=0.9634757722293498
28
- ##MINX=0.000213204381723083
29
- ##MAXX=0.9634757722293498
30
- ##MINY=10.631
31
- ##MAXY=1481.2
32
- ##NPOINTS=96
33
- ##FIRSTY=10.631
34
- ##XUNITS=p/p0
35
- ##YUNITS=ml/g
36
- ##XYDATA=(XY..XY)
37
- 0.000213204381723083, 10.631
38
- 0.0008993091878022303, 66.609
39
- 0.0016908121977696636, 120.28
40
- 0.002905260041448732, 170.14
41
- 0.004614526793644528, 214.69
42
- 0.008697226882463239, 282.5
43
- 0.012181979670383893, 322.52
44
- 0.016622915227474586, 360.27
45
- 0.022689233198460477, 401.55
46
- 0.024416263692884636, 412.09
47
- 0.030442119806572587, 445.23
48
- 0.03634757722293497, 475.88
49
- 0.037632487910786536, 482.6
50
- 0.04695253133326754, 528.34
51
- 0.049001282936938714, 538.13
52
- 0.05896378170334551, 588.18
53
- 0.06089213460969111, 598.56
54
- 0.06715878811803021, 632.29
55
- 0.0724217901904668, 664.8
56
- 0.0735468271982631, 673.66
57
- 0.12681338201914535, 551.43
58
- 0.13605052797789402, 552.89
59
- 0.14818908516727525, 554.89
60
- 0.16031777361097405, 557.43
61
- 0.17252541202013225, 559.16
62
- 0.1847034441922432, 560.83
63
- 0.19691108260140136, 562.66
64
- 0.20912858975624196, 563.62
65
- 0.22129675318267047, 565.09
66
- 0.2334353103720517, 566.49
67
- 0.24568242376393962, 568.2
68
- 0.2578111122076384, 569.8
69
- 0.26974242573768875, 571.86
70
- 0.2820388828579888, 573.23
71
- 0.29420704628441724, 574.73
72
- 0.3063456034737985, 576.8
73
- 0.3184742919174973, 577.93
74
- 0.33048455541300703, 580.66
75
- 0.34253429389124646, 583.42
76
- 0.3546728510806277, 586.22
77
- 0.3664363959340768, 590.5
78
- 0.37840718444685684, 595.32
79
- 0.3900621730977993, 602.39
80
- 0.4011052995164315, 612.81
81
- 0.4143294187308793, 644.21
82
- 0.425175170235863, 680.11
83
- 0.43460969110826014, 719.33
84
- 0.43827099575643935, 737.27
85
- 0.4470245731767492, 774.86
86
- 0.45003454060988846, 794.41
87
- 0.4586795618276917, 834.82
88
- 0.46289351623408664, 862.67
89
- 0.4716865686371262, 897.89
90
- 0.4746669298332182, 916.08
91
- 0.4841804006710747, 949.07
92
- 0.48683509325964675, 967.72
93
- 0.4977992697128195, 1006.3
94
- 0.5086055462350735, 1041.7
95
- 0.5107766702852068, 1051.9
96
- 0.5232310273364256, 1084.8
97
- 0.5350833909010165, 1108.9
98
- 0.5475377479522353, 1130.8
99
- 0.5602289548998323, 1151.2
100
- 0.5729596368301589, 1170.2
101
- 0.5835685384387644, 1182.7
102
- 0.5969900325668608, 1201.7
103
- 0.6076778841409257, 1215.4
104
- 0.6213362281654002, 1234.2
105
- 0.6324583045494918, 1246.5
106
- 0.6460376986085068, 1265.7
107
- 0.6567650251653014, 1277.2
108
- 0.6686568637126221, 1290.4
109
- 0.6803414586006118, 1305.8
110
- 0.6943649462153361, 1327.4
111
- 0.7055363663278398, 1338.5
112
- 0.7174676798578901, 1353.9
113
- 0.7297937432152374, 1364.5
114
- 0.7422875752491858, 1376.9
115
- 0.7547814072831344, 1386.7
116
- 0.767117339386164, 1395.1
117
- 0.7788019342741538, 1404.7
118
- 0.7906542978387447, 1415.0
119
- 0.8027040363169841, 1425.7
120
- 0.8154445869929933, 1433.9
121
- 0.827898944044212, 1442.2
122
- 0.8404322510608901, 1449.0
123
- 0.8528471331293792, 1454.4
124
- 0.8653409651633278, 1458.8
125
- 0.8776275535379454, 1462.7
126
- 0.8899240106582453, 1466.3
127
- 0.9024178426921937, 1469.2
128
- 0.9143886312049738, 1473.3
129
- 0.9270403631698411, 1473.8
130
- 0.9390506266653508, 1476.2
131
- 0.9511003651435903, 1479.6
132
- 0.9634757722293498, 1481.2
133
- ##END=$$ End of the data block
134
-
135
- `;
136
- var _default = aifJcamp1;
137
- exports.default = _default;
@@ -1,123 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- const aifJcamp2 = `
8
- ##TITLE=Spectrum
9
- ##JCAMP-DX=5.00 $$ chemotion-converter-app (0.1.0)
10
- ##DATA TYPE=SORPTION-DESORPTION MEASUREMENT
11
- ##DATA CLASS=XYDATA
12
- ##ORIGIN=
13
- ##OWNER=
14
- ##XUNITS=p/p0
15
- ##YUNITS=ml/g
16
- ##OPERATOR=Volodymyr
17
- ##DATE=2020-04-30T00:00:00
18
- ##SERIAL=BEL 00218
19
- ##ADSORPTIVE=CH4
20
- ##AMOUNT=0.00980
21
- ##SAMPLE_CID=aus der BOX
22
- ##SAMPLE_MAT_ID=DUT-140(Cu)
23
- ##SOFTWARE=raw2aif
24
- ##SOFTWARE_VERSION=v004
25
- ##FIRSTX=0.9562025066614033
26
- ##LASTX=0.0013190565479127604
27
- ##MINX=0.0013190565479127604
28
- ##MAXX=0.9562025066614033
29
- ##MINY=383.81
30
- ##MAXY=1479.7
31
- ##NPOINTS=82
32
- ##FIRSTY=1479.7
33
- ##XUNITS=p/p0
34
- ##YUNITS=ml/g
35
- ##XYDATA=(XY..XY)
36
- 0.9562025066614033, 1479.7
37
- 0.9443106681140827, 1477.3
38
- 0.9321819796703839, 1475.6
39
- 0.9204480410539821, 1472.5
40
- 0.9083588275930129, 1469.0
41
- 0.8962696141320439, 1465.6
42
- 0.8837757820980954, 1462.7
43
- 0.8719234185335044, 1459.8
44
- 0.8599131550379947, 1456.7
45
- 0.8474193230040462, 1454.9
46
- 0.8352906345603474, 1452.7
47
- 0.8232310273364256, 1449.4
48
- 0.8112602388236455, 1446.8
49
- 0.7988947004835686, 1444.5
50
- 0.7868350932596467, 1441.8
51
- 0.7746274548504885, 1439.6
52
- 0.7625382413895194, 1438.1
53
- 0.7503996842001381, 1435.6
54
- 0.7383894207046284, 1432.6
55
- 0.7260633573472812, 1430.5
56
- 0.7139248001578999, 1428.5
57
- 0.7020329616105793, 1427.2
58
- 0.6899042731668805, 1426.8
59
- 0.6789006217309781, 1424.4
60
- 0.664995559064443, 1422.2
61
- 0.6509819401954011, 1420.1
62
- 0.6373630711536564, 1417.9
63
- 0.623379058521662, 1415.6
64
- 0.6097996644626468, 1413.5
65
- 0.5956577518997336, 1411.1
66
- 0.5819599328925293, 1408.7
67
- 0.5679857890062173, 1406.1
68
- 0.5540807263396823, 1403.4
69
- 0.5401460574360999, 1400.6
70
- 0.5263199447350242, 1397.8
71
- 0.5124247508141715, 1394.8
72
- 0.49864798184150794, 1392.3
73
- 0.48498963781703347, 1388.9
74
- 0.4709661502023093, 1386.0
75
- 0.45703148129872695, 1382.9
76
- 0.44316589361492154, 1379.9
77
- 0.42934964965952827, 1376.6
78
- 0.4154939307214053, 1372.9
79
- 0.4016283430376, 1369.5
80
- 0.38781209908220665, 1365.7
81
- 0.3739563801440837, 1361.6
82
- 0.3600118424948189, 1357.8
83
- 0.34627454850488504, 1353.7
84
- 0.33229053587289054, 1349.8
85
- 0.3185927168656864, 1345.5
86
- 0.3047369979275634, 1340.4
87
- 0.28991414191256293, 1335.0
88
- 0.27569327938419025, 1329.6
89
- 0.26235073522155333, 1324.0
90
- 0.24861344123161946, 1317.6
91
- 0.23503404717260434, 1310.7
92
- 0.22129675318267047, 1302.6
93
- 0.20763840915819598, 1293.8
94
- 0.19478930227968025, 1284.5
95
- 0.1684298825619264, 1242.6
96
- 0.1667818020329616, 1235.8
97
- 0.15903483667225896, 1176.6
98
- 0.1511990526004145, 1093.3
99
- 0.14665942958649955, 1030.0
100
- 0.14400473699792757, 986.68
101
- 0.14155728806868648, 942.29
102
- 0.1387841705319254, 870.19
103
- 0.13701766505477153, 816.27
104
- 0.13480706602190862, 742.71
105
- 0.13319846047567355, 683.09
106
- 0.1316391986578506, 633.49
107
- 0.1289845060692786, 581.11
108
- 0.1115859074311655, 544.44
109
- 0.09708773314911674, 537.71
110
- 0.08266554820882266, 533.49
111
- 0.0688868054870226, 529.35
112
- 0.05518799960525017, 524.71
113
- 0.04177045297542682, 518.59
114
- 0.00863692884634363, 482.67
115
- 0.003195993289252936, 448.59
116
- 0.0018709168064738972, 415.76
117
- 0.0013190565479127604, 383.81
118
- ##END=$$ End of the data block
119
-
120
-
121
- `;
122
- var _default = aifJcamp2;
123
- exports.default = _default;
@@ -1,8 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- var _enzyme = _interopRequireDefault(require("enzyme"));
5
- var _enzymeAdapterReact = _interopRequireDefault(require("enzyme-adapter-react-16"));
6
- _enzyme.default.configure({
7
- adapter: new _enzymeAdapterReact.default()
8
- });