@complat/react-spectra-editor 1.4.1 → 1.5.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.
@@ -36,11 +36,13 @@ const Zoom = ({
36
36
  className: "txt-sv-tp",
37
37
  children: "Zoom In"
38
38
  }),
39
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_common.MuButton, {
40
- className: (0, _classnames.default)((0, _common.focusStyle)(isfocusZoomSt, classes), 'btn-sv-bar-zoomin'),
41
- onClick: onSweepZoomIn,
42
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ZoomInOutlined.default, {
43
- className: (0, _classnames.default)(classes.icon, classes.iconWp)
39
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
40
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_common.MuButton, {
41
+ className: (0, _classnames.default)((0, _common.focusStyle)(isfocusZoomSt, classes), 'btn-sv-bar-zoomin'),
42
+ onClick: onSweepZoomIn,
43
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ZoomInOutlined.default, {
44
+ className: (0, _classnames.default)(classes.icon, classes.iconWp)
45
+ })
44
46
  })
45
47
  })
46
48
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, {
@@ -48,11 +50,13 @@ const Zoom = ({
48
50
  className: "txt-sv-tp",
49
51
  children: "Reset Zoom"
50
52
  }),
51
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_common.MuButton, {
52
- className: (0, _classnames.default)('btn-sv-bar-zoomreset'),
53
- onClick: onSweepZoomReset,
54
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_FindReplaceOutlined.default, {
55
- className: classes.icon
53
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
54
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_common.MuButton, {
55
+ className: (0, _classnames.default)('btn-sv-bar-zoomreset'),
56
+ onClick: onSweepZoomReset,
57
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_FindReplaceOutlined.default, {
58
+ className: classes.icon
59
+ })
56
60
  })
57
61
  })
58
62
  })]
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = void 0;
8
- var _react = _interopRequireDefault(require("react"));
8
+ var _react = _interopRequireWildcard(require("react"));
9
9
  var _propTypes = _interopRequireDefault(require("prop-types"));
10
10
  var _classnames = _interopRequireDefault(require("classnames"));
11
11
  var _reactRedux = require("react-redux");
@@ -21,6 +21,7 @@ var _cfg = _interopRequireDefault(require("../../helpers/cfg"));
21
21
  var _common = require("./common");
22
22
  var _format = _interopRequireDefault(require("../../helpers/format"));
23
23
  var _jsxRuntime = require("react/jsx-runtime");
24
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
24
25
  /* eslint-disable prefer-object-spread, function-paren-newline,
25
26
  react/function-component-definition */
26
27
 
@@ -33,31 +34,30 @@ const styles = () => Object.assign({
33
34
  }
34
35
  }, _common.commonStyle);
35
36
  const shiftSelect = (classes, layoutSt, setShiftRefAct, shiftSt, curveSt) => {
36
- if (_cfg.default.hideSolvent(layoutSt)) return null;
37
- // const onChange = (e) => setShiftRefAct(e.target.value);
37
+ if (_cfg.default.hideSolvent(layoutSt)) {
38
+ return null;
39
+ }
38
40
  const {
39
41
  curveIdx
40
42
  } = curveSt;
41
43
  const {
42
44
  shifts
43
45
  } = shiftSt;
44
- const selectedShift = shifts[curveIdx];
45
- const shiftRef = selectedShift.ref;
46
+ const selectedShift = shifts[curveIdx] || {};
47
+ const listShift = (0, _list_shift.getListShift)(layoutSt) || [];
48
+ const shiftRefName = selectedShift?.ref?.name || '';
49
+ const isInList = listShift.some(r => r.name === shiftRefName);
50
+ const selectValue = isInList ? shiftRefName : '';
46
51
  const onChange = e => {
47
- const payload = {
48
- dataToSet: e.target.value,
49
- curveIdx
50
- };
51
- setShiftRefAct(payload);
52
+ const name = e.target.value;
53
+ const refObj = listShift.find(r => r.name === name);
54
+ if (refObj) {
55
+ setShiftRefAct({
56
+ dataToSet: refObj,
57
+ curveIdx
58
+ });
59
+ }
52
60
  };
53
- const listShift = (0, _list_shift.getListShift)(layoutSt);
54
- const content = listShift.map(ref => /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.MenuItem, {
55
- value: ref,
56
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
57
- className: (0, _classnames.default)(classes.txtOpt, 'option-sv-bar-shift'),
58
- children: `${ref.name}: ${_format.default.strNumberFixedDecimal(ref.value, 2)} ppm`
59
- })
60
- }, ref.name));
61
61
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.FormControl, {
62
62
  className: (0, _classnames.default)(classes.fieldShift),
63
63
  variant: "outlined",
@@ -66,12 +66,18 @@ const shiftSelect = (classes, layoutSt, setShiftRefAct, shiftSt, curveSt) => {
66
66
  className: (0, _classnames.default)(classes.selectLabel, 'select-sv-bar-label'),
67
67
  children: "Reference"
68
68
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Select, {
69
- value: shiftRef,
69
+ value: selectValue,
70
70
  labelId: "select-solvent-label",
71
71
  label: "Solvent",
72
72
  onChange: onChange,
73
73
  className: (0, _classnames.default)(classes.selectInput, 'input-sv-bar-shift'),
74
- children: content
74
+ children: listShift.map(ref => /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.MenuItem, {
75
+ value: ref.name,
76
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
77
+ className: (0, _classnames.default)(classes.txtOpt, 'option-sv-bar-shift'),
78
+ children: `${ref.name}: ${_format.default.strNumberFixedDecimal(ref.value, 2)} ppm`
79
+ })
80
+ }, ref.name))
75
81
  })]
76
82
  });
77
83
  };
@@ -243,6 +249,54 @@ const layoutSelect = (classes, layoutSt, updateLayoutAct) => {
243
249
  })]
244
250
  });
245
251
  };
252
+ const PLACEHOLDER = '- - -';
253
+ const norm = s => (s || '').toString().toLowerCase().normalize('NFKD').replace(/[^a-z0-9]+/g, '');
254
+ function solventKeyOf(feature) {
255
+ const r = feature?.metadata?.solventName ?? feature?.metadata?.solvent ?? feature?.meta?.solventName ?? feature?.meta?.solvent ?? feature?.solventName ?? feature?.solvent ?? null;
256
+ const a = feature?.metadata?.solvent_label ?? feature?.metadata?.solventLabel ?? null;
257
+ const raw = r && r !== PLACEHOLDER ? r : null;
258
+ const alt = a && a !== PLACEHOLDER ? a : null;
259
+ return norm(raw || alt || '');
260
+ }
261
+ function pickBestRef(list, key) {
262
+ if (!key || !list?.length) return null;
263
+ const scored = [];
264
+ list.forEach(r => {
265
+ const nLabel = norm(r.label);
266
+ const nName = norm(r.name);
267
+ const nNsdb = norm(r.nsdb);
268
+ let s = 0;
269
+ if (nLabel && nLabel === key) s += 3;
270
+ if (nNsdb && nNsdb.includes(key)) s += 2;
271
+ if (nName && nName.includes(key)) s += 1;
272
+ if (s > 0) scored.push({
273
+ r,
274
+ s
275
+ });
276
+ });
277
+ if (!scored.length) return null;
278
+ let max = 0;
279
+ scored.forEach(x => {
280
+ if (x.s > max) max = x.s;
281
+ });
282
+ let cand = scored.filter(x => x.s === max).map(x => x.r);
283
+ if (cand.length > 1) {
284
+ const vals = cand.map(c => typeof c.value === 'number' ? c.value : null).filter(v => v != null).sort((a, b) => a - b);
285
+ if (vals.length) {
286
+ const m = vals[Math.floor(vals.length / 2)];
287
+ cand = cand.slice().sort((a, b) => Math.abs((a.value ?? m) - m) - Math.abs((b.value ?? m) - m));
288
+ }
289
+ if (cand.length > 1) {
290
+ cand.sort((a, b) => (a.name?.length || 0) - (b.name?.length || 0));
291
+ }
292
+ }
293
+ return cand[0] || null;
294
+ }
295
+ function isRefUnset(shiftSt, curveIdx, list) {
296
+ const name = shiftSt?.shifts?.[curveIdx]?.ref?.name || '';
297
+ if (!name || name === PLACEHOLDER) return true;
298
+ return !(list || []).some(r => r.name === name);
299
+ }
246
300
  const Layout = ({
247
301
  classes,
248
302
  feature,
@@ -252,13 +306,28 @@ const Layout = ({
252
306
  updateLayoutAct,
253
307
  curveSt,
254
308
  shiftSt
255
- }) => /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
256
- className: classes.groupRight,
257
- children: [layoutSelect(classes, layoutSt, updateLayoutAct), shiftSelect(classes, layoutSt, setShiftRefAct, shiftSt, curveSt), /*#__PURE__*/(0, _jsxRuntime.jsx)(_r02_scan.default, {
258
- feature: feature,
259
- hasEdit: hasEdit
260
- })]
261
- });
309
+ }) => {
310
+ const {
311
+ curveIdx
312
+ } = curveSt;
313
+ const list = (0, _list_shift.getListShift)(layoutSt) || [];
314
+ const unset = isRefUnset(shiftSt, curveIdx, list);
315
+ const key = solventKeyOf(feature);
316
+ const best = pickBestRef(list, key);
317
+ (0, _react.useEffect)(() => {
318
+ if (unset && best) setShiftRefAct({
319
+ dataToSet: best,
320
+ curveIdx
321
+ });
322
+ }, [unset, best, curveIdx, setShiftRefAct]);
323
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
324
+ className: classes.groupRight,
325
+ children: [layoutSelect(classes, layoutSt, updateLayoutAct), shiftSelect(classes, layoutSt, setShiftRefAct, shiftSt, curveSt), /*#__PURE__*/(0, _jsxRuntime.jsx)(_r02_scan.default, {
326
+ feature: feature,
327
+ hasEdit: hasEdit
328
+ })]
329
+ });
330
+ };
262
331
  const mapStateToProps = (state, props) => (
263
332
  // eslint-disable-line
264
333
  {
@@ -107,12 +107,14 @@ const Threshold = ({
107
107
  className: "txt-sv-tp",
108
108
  children: "Restore Threshold"
109
109
  }),
110
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_common.MuButton, {
111
- className: (0, _classnames.default)('btn-sv-bar-thresref'),
112
- disabled: _cfg.default.btnCmdThres(thresVal),
113
- onClick: resetThresholdValueAct,
114
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_RefreshOutlined.default, {
115
- className: classes.icon
110
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
111
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_common.MuButton, {
112
+ className: (0, _classnames.default)('btn-sv-bar-thresref'),
113
+ disabled: _cfg.default.btnCmdThres(thresVal),
114
+ onClick: resetThresholdValueAct,
115
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_RefreshOutlined.default, {
116
+ className: classes.icon
117
+ })
116
118
  })
117
119
  })
118
120
  }), hideThresSt ? null : /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Tooltip, {
@@ -120,11 +122,13 @@ const Threshold = ({
120
122
  className: "txt-sv-tp",
121
123
  children: restoreTp(hasEdit, isEditSt)
122
124
  }),
123
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_common.MuButton, {
124
- className: (0, _classnames.default)('btn-sv-bar-thresrst'),
125
- disabled: _cfg.default.btnCmdThres(thresVal),
126
- onClick: toggleThresholdIsEditAct,
127
- children: restoreIcon(classes, hasEdit, isEditSt)
125
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
126
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_common.MuButton, {
127
+ className: (0, _classnames.default)('btn-sv-bar-thresrst'),
128
+ disabled: _cfg.default.btnCmdThres(thresVal),
129
+ onClick: toggleThresholdIsEditAct,
130
+ children: restoreIcon(classes, hasEdit, isEditSt)
131
+ })
128
132
  })
129
133
  })]
130
134
  });
@@ -224,7 +224,15 @@ const ComparePanel = ({
224
224
  }) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Accordion, {
225
225
  expanded: expand,
226
226
  onChange: onExapnd,
227
- className: (0, _classnames.default)(classes.panel),
227
+ disableGutters: true,
228
+ sx: {
229
+ '&.MuiAccordion-root.Mui-expanded': {
230
+ margin: 0
231
+ },
232
+ '&:before': {
233
+ display: 'none'
234
+ }
235
+ },
228
236
  TransitionProps: {
229
237
  unmountOnExit: true
230
238
  } // increase Accordion performance
@@ -173,6 +173,15 @@ const CyclicVoltammetryPanel = ({
173
173
  }));
174
174
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Accordion, {
175
175
  "data-testid": "PanelVoltammetry",
176
+ disableGutters: true,
177
+ sx: {
178
+ '&.MuiAccordion-root.Mui-expanded': {
179
+ margin: 0
180
+ },
181
+ '&:before': {
182
+ display: 'none'
183
+ }
184
+ },
176
185
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.AccordionSummary, {
177
186
  expandIcon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ExpandMore.default, {}),
178
187
  className: (0, _classnames.default)(classes.panelSummary),
@@ -128,6 +128,15 @@ const GraphSelectionPanel = ({
128
128
  });
129
129
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Accordion, {
130
130
  "data-testid": "GraphSelectionPanel",
131
+ disableGutters: true,
132
+ sx: {
133
+ '&.MuiAccordion-root.Mui-expanded': {
134
+ margin: 0
135
+ },
136
+ '&:before': {
137
+ display: 'none'
138
+ }
139
+ },
131
140
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.AccordionSummary, {
132
141
  expandIcon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ExpandMore.default, {}),
133
142
  className: (0, _classnames.default)(classes.panelSummary),
@@ -33,6 +33,18 @@ const styles = () => ({
33
33
  backgroundColor: '#eee',
34
34
  height: 32
35
35
  },
36
+ subSectionHeader: {
37
+ backgroundColor: '#eee',
38
+ height: 32,
39
+ lineHeight: '32px',
40
+ paddingLeft: 10,
41
+ textAlign: 'left',
42
+ fontWeight: 'bold',
43
+ fontSize: '0.8rem',
44
+ fontFamily: 'Helvetica',
45
+ borderTop: '1px solid #dcdcdc',
46
+ color: 'rgba(0, 0, 0, 0.87)'
47
+ },
36
48
  panelDetail: {
37
49
  backgroundColor: '#fff',
38
50
  maxHeight: 'calc(90vh - 220px)',
@@ -82,10 +94,32 @@ const styles = () => ({
82
94
  fontSize: '0.8rem',
83
95
  fontFamily: 'Helvetica',
84
96
  textAlign: 'left'
97
+ },
98
+ quillContainer: {
99
+ margin: '10px 10px',
100
+ backgroundColor: '#fff',
101
+ '& .ql-container': {
102
+ border: 'none'
103
+ },
104
+ '& .ql-editor': {
105
+ minHeight: '60px'
106
+ },
107
+ '& .ql-editor.ql-blank::before': {
108
+ fontStyle: 'normal',
109
+ color: 'rgba(0, 0, 0, 0.54)'
110
+ }
85
111
  }
86
112
  });
87
113
  const simTitle = () => 'Simulated signals from NMRshiftDB';
88
114
  const simContent = nmrSimPeaks => nmrSimPeaks && nmrSimPeaks.sort((a, b) => a - b).join(', ');
115
+ const normalizeQuillValue = val => {
116
+ if (!val) return '';
117
+ if (val === '<p><br></p>' || val === '<p></p>') return '';
118
+ return val;
119
+ };
120
+ const handleDescriptionChanged = (value, onDescriptionChanged) => {
121
+ onDescriptionChanged(normalizeQuillValue(value));
122
+ };
89
123
  const aucValue = integration => {
90
124
  if (!integration) {
91
125
  return '';
@@ -303,7 +337,15 @@ const InfoPanel = ({
303
337
  "data-testid": "PanelInfo",
304
338
  expanded: expand,
305
339
  onChange: onExapnd,
306
- className: (0, _classnames.default)(classes.panel),
340
+ disableGutters: true,
341
+ sx: {
342
+ '&.MuiAccordion-root.Mui-expanded': {
343
+ margin: 0
344
+ },
345
+ '&:before': {
346
+ display: 'none'
347
+ }
348
+ },
307
349
  TransitionProps: {
308
350
  unmountOnExit: true
309
351
  } // increase Accordion performance
@@ -336,7 +378,7 @@ const InfoPanel = ({
336
378
  children: "Freq : "
337
379
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
338
380
  className: (0, _classnames.default)(classes.tTxt, 'txt-sv-panel-txt'),
339
- children: `${parseInt(observeFrequency, 10)} Hz` || ' - '
381
+ children: `${parseInt(observeFrequency, 10)} MHz` || ' - '
340
382
  })]
341
383
  }) : null, _format.default.isNmrLayout(layoutSt) ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
342
384
  className: (0, _classnames.default)(classes.rowRoot, classes.rowOdd),
@@ -379,26 +421,35 @@ const InfoPanel = ({
379
421
  layout: layoutSt,
380
422
  dscMetaData: dscMetaData,
381
423
  updateAction: updateDSCMetaDataAct
382
- })]
383
- }), !_format.default.isCyclicVoltaLayout(layoutSt) ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactQuill.default, {
384
- className: (0, _classnames.default)(classes.quill, 'card-sv-quill'),
385
- value: descriptions,
386
- modules: {
387
- toolbar: false
388
- },
389
- onChange: onDescriptionChanged,
390
- readOnly: canChangeDescription !== undefined ? !canChangeDescription : true
391
- }) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
392
- children: !editorOnly && _format.default.isNmrLayout(layoutSt) ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
393
- className: (0, _classnames.default)(classes.rowRoot, classes.rowOddSim),
394
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
395
- className: (0, _classnames.default)(classes.tTxt, classes.tHead, 'txt-sv-panel-txt'),
396
- children: [simTitle(), ":"]
397
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("br", {}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
398
- className: (0, _classnames.default)(classes.tTxt, classes.tTxtSim, 'txt-sv-panel-txt'),
399
- children: simContent(simulationSt.nmrSimPeaks)
424
+ }), !editorOnly && _format.default.isNmrLayout(layoutSt) ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
425
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
426
+ className: classes.subSectionHeader,
427
+ children: simTitle()
428
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
429
+ className: (0, _classnames.default)(classes.rowRoot, classes.rowOddSim),
430
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
431
+ className: (0, _classnames.default)(classes.tTxt, classes.tTxtSim, 'txt-sv-panel-txt'),
432
+ children: simContent(simulationSt.nmrSimPeaks)
433
+ })
434
+ })]
435
+ }) : null, !_format.default.isCyclicVoltaLayout(layoutSt) ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
436
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
437
+ className: classes.subSectionHeader,
438
+ children: "Content"
439
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
440
+ className: classes.quillContainer,
441
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactQuill.default, {
442
+ className: (0, _classnames.default)(classes.quill, 'card-sv-quill'),
443
+ value: normalizeQuillValue(descriptions),
444
+ placeholder: canChangeDescription ? 'Peaks will be written here...' : undefined,
445
+ readOnly: !canChangeDescription,
446
+ modules: {
447
+ toolbar: false
448
+ },
449
+ onChange: value => handleDescriptionChanged(value, onDescriptionChanged)
450
+ })
400
451
  })]
401
- }) : null
452
+ }) : null]
402
453
  })]
403
454
  });
404
455
  };
@@ -422,7 +473,7 @@ InfoPanel.propTypes = {
422
473
  integration: _propTypes.default.object.isRequired,
423
474
  editorOnly: _propTypes.default.bool.isRequired,
424
475
  molSvg: _propTypes.default.string.isRequired,
425
- descriptions: _propTypes.default.array.isRequired,
476
+ descriptions: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.array]).isRequired,
426
477
  layoutSt: _propTypes.default.string.isRequired,
427
478
  simulationSt: _propTypes.default.array.isRequired,
428
479
  shiftSt: _propTypes.default.object.isRequired,
@@ -257,7 +257,15 @@ const MultiplicityPanel = ({
257
257
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Accordion, {
258
258
  expanded: expand,
259
259
  onChange: onExapnd,
260
- className: (0, _classnames.default)(classes.panel),
260
+ disableGutters: true,
261
+ sx: {
262
+ '&.MuiAccordion-root.Mui-expanded': {
263
+ margin: 0
264
+ },
265
+ '&:before': {
266
+ display: 'none'
267
+ }
268
+ },
261
269
  TransitionProps: {
262
270
  unmountOnExit: true
263
271
  } // increase Accordion performance
@@ -185,7 +185,15 @@ const PeakPanel = ({
185
185
  "data-testid": "PeaksPanelInfo",
186
186
  expanded: expand,
187
187
  onChange: onExapnd,
188
- className: (0, _classnames.default)(classes.panel),
188
+ disableGutters: true,
189
+ sx: {
190
+ '&.MuiAccordion-root.Mui-expanded': {
191
+ margin: 0
192
+ },
193
+ '&:before': {
194
+ display: 'none'
195
+ }
196
+ },
189
197
  TransitionProps: {
190
198
  unmountOnExit: true
191
199
  } // increase Accordion performance
@@ -396,10 +396,10 @@ const hTrifluoroethanolD32 = {
396
396
  label: 'Trifluoroethanol-d3'
397
397
  };
398
398
  const LIST_SHIFT_1H = exports.LIST_SHIFT_1H = [noReference, hActicAcidD4Quin, hActicAcidD4S, hAcetoneD6Quin, hAcetonitrileD3Qquin, hBenzeneS, hChloroformDS, hCyclohexaneD12S, hDeuteriumOxideS, hDichloroethaneD4S, hDichloromethaneD2T, hDMFD7Quin1, hDMFD7Quin2, hDMFD7Broad3, hDioxaneD8Broad, hDMSOD6Quin, hEthanolD6Broad1, hEthanolD6S2, hEthanolD6S3, hMethanolD4Quin, hMethanolD4S, hNitromethaneD3S, hPyridineD5Broad1, hPyridineD5Broad2, hPyridineD5Broad3, hTHFD8S1, hTHFD8S2, hTMSS, hTolueneD8Quin, hTolueneD8Boad2, hTolueneD8S3, hTolueneD8Broad4, hTFADS, hTrifluoroethanolD31, hTrifluoroethanolD32];
399
- const LIST_SHIFT_19F = exports.LIST_SHIFT_19F = [];
400
- const LIST_SHIFT_31P = exports.LIST_SHIFT_31P = [];
401
- const LIST_SHIFT_15N = exports.LIST_SHIFT_15N = [];
402
- const LIST_SHIFT_29Si = exports.LIST_SHIFT_29Si = [];
399
+ const LIST_SHIFT_19F = exports.LIST_SHIFT_19F = [noReference, hActicAcidD4Quin, hActicAcidD4S, hAcetoneD6Quin, hAcetonitrileD3Qquin, hBenzeneS, hChloroformDS, hCyclohexaneD12S, hDeuteriumOxideS, hDichloroethaneD4S, hDichloromethaneD2T, hDMFD7Quin1, hDMFD7Quin2, hDMFD7Broad3, hDioxaneD8Broad, hDMSOD6Quin, hEthanolD6Broad1, hEthanolD6S2, hEthanolD6S3, hMethanolD4Quin, hMethanolD4S, hNitromethaneD3S, hPyridineD5Broad1, hPyridineD5Broad2, hPyridineD5Broad3, hTHFD8S1, hTHFD8S2, hTMSS, hTolueneD8Quin, hTolueneD8Boad2, hTolueneD8S3, hTolueneD8Broad4, hTFADS, hTrifluoroethanolD31, hTrifluoroethanolD32];
400
+ const LIST_SHIFT_31P = exports.LIST_SHIFT_31P = [noReference, hActicAcidD4Quin, hActicAcidD4S, hAcetoneD6Quin, hAcetonitrileD3Qquin, hBenzeneS, hChloroformDS, hCyclohexaneD12S, hDeuteriumOxideS, hDichloroethaneD4S, hDichloromethaneD2T, hDMFD7Quin1, hDMFD7Quin2, hDMFD7Broad3, hDioxaneD8Broad, hDMSOD6Quin, hEthanolD6Broad1, hEthanolD6S2, hEthanolD6S3, hMethanolD4Quin, hMethanolD4S, hNitromethaneD3S, hPyridineD5Broad1, hPyridineD5Broad2, hPyridineD5Broad3, hTHFD8S1, hTHFD8S2, hTMSS, hTolueneD8Quin, hTolueneD8Boad2, hTolueneD8S3, hTolueneD8Broad4, hTFADS, hTrifluoroethanolD31, hTrifluoroethanolD32];
401
+ const LIST_SHIFT_15N = exports.LIST_SHIFT_15N = [noReference, hActicAcidD4Quin, hActicAcidD4S, hAcetoneD6Quin, hAcetonitrileD3Qquin, hBenzeneS, hChloroformDS, hCyclohexaneD12S, hDeuteriumOxideS, hDichloroethaneD4S, hDichloromethaneD2T, hDMFD7Quin1, hDMFD7Quin2, hDMFD7Broad3, hDioxaneD8Broad, hDMSOD6Quin, hEthanolD6Broad1, hEthanolD6S2, hEthanolD6S3, hMethanolD4Quin, hMethanolD4S, hNitromethaneD3S, hPyridineD5Broad1, hPyridineD5Broad2, hPyridineD5Broad3, hTHFD8S1, hTHFD8S2, hTMSS, hTolueneD8Quin, hTolueneD8Boad2, hTolueneD8S3, hTolueneD8Broad4, hTFADS, hTrifluoroethanolD31, hTrifluoroethanolD32];
402
+ const LIST_SHIFT_29Si = exports.LIST_SHIFT_29Si = [noReference, hActicAcidD4Quin, hActicAcidD4S, hAcetoneD6Quin, hAcetonitrileD3Qquin, hBenzeneS, hChloroformDS, hCyclohexaneD12S, hDeuteriumOxideS, hDichloroethaneD4S, hDichloromethaneD2T, hDMFD7Quin1, hDMFD7Quin2, hDMFD7Broad3, hDioxaneD8Broad, hDMSOD6Quin, hEthanolD6Broad1, hEthanolD6S2, hEthanolD6S3, hMethanolD4Quin, hMethanolD4S, hNitromethaneD3S, hPyridineD5Broad1, hPyridineD5Broad2, hPyridineD5Broad3, hTHFD8S1, hTHFD8S2, hTMSS, hTolueneD8Quin, hTolueneD8Boad2, hTolueneD8S3, hTolueneD8Broad4, hTFADS, hTrifluoroethanolD31, hTrifluoroethanolD32];
403
403
  const getListShift = layoutSt => {
404
404
  switch (layoutSt) {
405
405
  case _list_layout.LIST_LAYOUT.H1:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@complat/react-spectra-editor",
3
- "version": "1.4.1",
3
+ "version": "1.5.1",
4
4
  "description": "An editor to View and Edit Chemical Spectra data (NMR, IR, MS, CV, UIVIS, XRD, GC, and DSC).",
5
5
  "repository": {
6
6
  "type": "git",