@complat/react-spectra-editor 1.4.0 → 1.5.0
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/dist/components/cmd_bar/02_zoom.js +14 -10
- package/dist/components/cmd_bar/r01_layout.js +96 -27
- package/dist/components/cmd_bar/r03_threshold.js +15 -11
- package/dist/components/d3_multi/multi_focus.js +22 -1
- package/dist/components/panel/info.js +68 -22
- package/dist/constants/list_shift.js +4 -4
- package/dist/helpers/format.js +1 -1
- package/package.json +1 -1
|
@@ -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)(
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
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)(
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
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 =
|
|
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))
|
|
37
|
-
|
|
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
|
|
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
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
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:
|
|
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:
|
|
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
|
-
}) =>
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
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)(
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
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)(
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
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
|
});
|
|
@@ -97,6 +97,19 @@ class MultiFocus {
|
|
|
97
97
|
this.isFirefox = typeof InstallTrigger !== 'undefined';
|
|
98
98
|
this.cyclicvoltaSt = null;
|
|
99
99
|
}
|
|
100
|
+
getGlobalXExtent() {
|
|
101
|
+
let allData = [...this.data];
|
|
102
|
+
if (this.otherLineData) {
|
|
103
|
+
this.otherLineData.forEach(lineData => {
|
|
104
|
+
allData = [...allData, ...lineData.data];
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
const xes = d3.extent(allData, d => d.x).sort((a, b) => a - b);
|
|
108
|
+
return {
|
|
109
|
+
xL: xes[0],
|
|
110
|
+
xU: xes[1]
|
|
111
|
+
};
|
|
112
|
+
}
|
|
100
113
|
getShouldUpdate(nextEpSt) {
|
|
101
114
|
const {
|
|
102
115
|
prevXt,
|
|
@@ -283,6 +296,14 @@ class MultiFocus {
|
|
|
283
296
|
drawOtherLines(layout) {
|
|
284
297
|
d3.selectAll('.line-clip-compare').remove();
|
|
285
298
|
if (!this.otherLineData) return null;
|
|
299
|
+
const {
|
|
300
|
+
yt
|
|
301
|
+
} = (0, _compass.TfRescale)(this);
|
|
302
|
+
const globalXExtent = this.getGlobalXExtent();
|
|
303
|
+
const reverse = this.reverseXAxis(this.layout);
|
|
304
|
+
const xRange = reverse ? [this.w, 0] : [0, this.w];
|
|
305
|
+
const xtGlobal = d3.scaleLinear().domain([globalXExtent.xL, globalXExtent.xU]).range(xRange);
|
|
306
|
+
const globalPathCall = d3.line().x(d => xtGlobal(d.x)).y(d => yt(d.y));
|
|
286
307
|
this.otherLineData.forEach((entry, idx) => {
|
|
287
308
|
const {
|
|
288
309
|
data,
|
|
@@ -290,7 +311,7 @@ class MultiFocus {
|
|
|
290
311
|
} = entry;
|
|
291
312
|
const pathColor = color ? color : _format.default.mutiEntitiesColors(idx);
|
|
292
313
|
const path = (0, _mount.MountComparePath)(this, pathColor, idx, 0.4);
|
|
293
|
-
path.attr('d',
|
|
314
|
+
path.attr('d', globalPathCall(data));
|
|
294
315
|
if (this.layout === _list_layout.LIST_LAYOUT.AIF && this.isShowAllCurves === true) {
|
|
295
316
|
path.attr('marker-mid', 'url(#arrow-left)');
|
|
296
317
|
}
|
|
@@ -31,7 +31,23 @@ const styles = () => ({
|
|
|
31
31
|
},
|
|
32
32
|
panelSummary: {
|
|
33
33
|
backgroundColor: '#eee',
|
|
34
|
-
height: 32
|
|
34
|
+
height: 32,
|
|
35
|
+
minHeight: 32,
|
|
36
|
+
'& .MuiAccordionSummary-content': {
|
|
37
|
+
margin: 0
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
subSectionHeader: {
|
|
41
|
+
backgroundColor: '#eee',
|
|
42
|
+
height: 32,
|
|
43
|
+
lineHeight: '32px',
|
|
44
|
+
paddingLeft: 10,
|
|
45
|
+
textAlign: 'left',
|
|
46
|
+
fontWeight: 'bold',
|
|
47
|
+
fontSize: '0.8rem',
|
|
48
|
+
fontFamily: 'Helvetica',
|
|
49
|
+
borderTop: '1px solid #dcdcdc',
|
|
50
|
+
color: 'rgba(0, 0, 0, 0.87)'
|
|
35
51
|
},
|
|
36
52
|
panelDetail: {
|
|
37
53
|
backgroundColor: '#fff',
|
|
@@ -82,10 +98,32 @@ const styles = () => ({
|
|
|
82
98
|
fontSize: '0.8rem',
|
|
83
99
|
fontFamily: 'Helvetica',
|
|
84
100
|
textAlign: 'left'
|
|
101
|
+
},
|
|
102
|
+
quillContainer: {
|
|
103
|
+
margin: '10px 10px',
|
|
104
|
+
backgroundColor: '#fff',
|
|
105
|
+
'& .ql-container': {
|
|
106
|
+
border: 'none'
|
|
107
|
+
},
|
|
108
|
+
'& .ql-editor': {
|
|
109
|
+
minHeight: '60px'
|
|
110
|
+
},
|
|
111
|
+
'& .ql-editor.ql-blank::before': {
|
|
112
|
+
fontStyle: 'normal',
|
|
113
|
+
color: 'rgba(0, 0, 0, 0.54)'
|
|
114
|
+
}
|
|
85
115
|
}
|
|
86
116
|
});
|
|
87
117
|
const simTitle = () => 'Simulated signals from NMRshiftDB';
|
|
88
118
|
const simContent = nmrSimPeaks => nmrSimPeaks && nmrSimPeaks.sort((a, b) => a - b).join(', ');
|
|
119
|
+
const normalizeQuillValue = val => {
|
|
120
|
+
if (!val) return '';
|
|
121
|
+
if (val === '<p><br></p>' || val === '<p></p>') return '';
|
|
122
|
+
return val;
|
|
123
|
+
};
|
|
124
|
+
const handleDescriptionChanged = (value, onDescriptionChanged) => {
|
|
125
|
+
onDescriptionChanged(normalizeQuillValue(value));
|
|
126
|
+
};
|
|
89
127
|
const aucValue = integration => {
|
|
90
128
|
if (!integration) {
|
|
91
129
|
return '';
|
|
@@ -336,7 +374,7 @@ const InfoPanel = ({
|
|
|
336
374
|
children: "Freq : "
|
|
337
375
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
338
376
|
className: (0, _classnames.default)(classes.tTxt, 'txt-sv-panel-txt'),
|
|
339
|
-
children: `${parseInt(observeFrequency, 10)}
|
|
377
|
+
children: `${parseInt(observeFrequency, 10)} MHz` || ' - '
|
|
340
378
|
})]
|
|
341
379
|
}) : null, _format.default.isNmrLayout(layoutSt) ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
342
380
|
className: (0, _classnames.default)(classes.rowRoot, classes.rowOdd),
|
|
@@ -379,26 +417,34 @@ const InfoPanel = ({
|
|
|
379
417
|
layout: layoutSt,
|
|
380
418
|
dscMetaData: dscMetaData,
|
|
381
419
|
updateAction: updateDSCMetaDataAct
|
|
382
|
-
})
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.
|
|
395
|
-
className:
|
|
396
|
-
children:
|
|
397
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("
|
|
398
|
-
className:
|
|
399
|
-
children:
|
|
420
|
+
}), !editorOnly && _format.default.isNmrLayout(layoutSt) ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
421
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
422
|
+
className: classes.subSectionHeader,
|
|
423
|
+
children: simTitle()
|
|
424
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
425
|
+
className: (0, _classnames.default)(classes.rowRoot, classes.rowOddSim),
|
|
426
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
427
|
+
className: (0, _classnames.default)(classes.tTxt, classes.tTxtSim, 'txt-sv-panel-txt'),
|
|
428
|
+
children: simContent(simulationSt.nmrSimPeaks)
|
|
429
|
+
})
|
|
430
|
+
})]
|
|
431
|
+
}) : null, !_format.default.isCyclicVoltaLayout(layoutSt) ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
432
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
433
|
+
className: classes.subSectionHeader,
|
|
434
|
+
children: "Content"
|
|
435
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
436
|
+
className: classes.quillContainer,
|
|
437
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactQuill.default, {
|
|
438
|
+
value: normalizeQuillValue(descriptions),
|
|
439
|
+
placeholder: canChangeDescription ? 'Add text here...' : undefined,
|
|
440
|
+
readOnly: !canChangeDescription,
|
|
441
|
+
modules: {
|
|
442
|
+
toolbar: false
|
|
443
|
+
},
|
|
444
|
+
onChange: value => handleDescriptionChanged(value, onDescriptionChanged)
|
|
445
|
+
})
|
|
400
446
|
})]
|
|
401
|
-
}) : null
|
|
447
|
+
}) : null]
|
|
402
448
|
})]
|
|
403
449
|
});
|
|
404
450
|
};
|
|
@@ -422,7 +468,7 @@ InfoPanel.propTypes = {
|
|
|
422
468
|
integration: _propTypes.default.object.isRequired,
|
|
423
469
|
editorOnly: _propTypes.default.bool.isRequired,
|
|
424
470
|
molSvg: _propTypes.default.string.isRequired,
|
|
425
|
-
descriptions: _propTypes.default.array.isRequired,
|
|
471
|
+
descriptions: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.array]).isRequired,
|
|
426
472
|
layoutSt: _propTypes.default.string.isRequired,
|
|
427
473
|
simulationSt: _propTypes.default.array.isRequired,
|
|
428
474
|
shiftSt: _propTypes.default.object.isRequired,
|
|
@@ -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/dist/helpers/format.js
CHANGED
|
@@ -492,7 +492,7 @@ const formatPeaksByPrediction = (peaks, layout, isAscend, decimal, predictions =
|
|
|
492
492
|
return body;
|
|
493
493
|
};
|
|
494
494
|
const compareColors = idx => ['#ABB2B9', '#EDBB99', '#ABEBC6', '#D2B4DE', '#F9E79F'][idx % 5];
|
|
495
|
-
const mutiEntitiesColors = idx => ['#
|
|
495
|
+
const mutiEntitiesColors = idx => ['#2980b9', '#e4b423', '#8e44ad', '#2c3e50', '#6D214F', '#182C61', '#BDC581'][idx % 7];
|
|
496
496
|
const strNumberFixedDecimal = (number, decimal = -1) => {
|
|
497
497
|
if (decimal <= 0) {
|
|
498
498
|
return `${number}`;
|