@complat/react-spectra-editor 1.7.0 → 1.7.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.
|
@@ -74,11 +74,16 @@ const styles = () => ({
|
|
|
74
74
|
},
|
|
75
75
|
rowOddSim: {
|
|
76
76
|
backgroundColor: '#fff',
|
|
77
|
-
height:
|
|
77
|
+
height: 'auto',
|
|
78
|
+
minHeight: 36,
|
|
78
79
|
lineHeight: '24px',
|
|
79
|
-
|
|
80
|
+
overflow: 'visible',
|
|
80
81
|
overflowWrap: 'word-break'
|
|
81
82
|
},
|
|
83
|
+
simPlaceholder: {
|
|
84
|
+
color: 'rgba(0, 0, 0, 0.54)',
|
|
85
|
+
fontStyle: 'italic'
|
|
86
|
+
},
|
|
82
87
|
tHead: {
|
|
83
88
|
fontWeight: 'bold',
|
|
84
89
|
float: 'left',
|
|
@@ -111,7 +116,11 @@ const styles = () => ({
|
|
|
111
116
|
}
|
|
112
117
|
});
|
|
113
118
|
const simTitle = () => 'Simulated signals from NMRshiftDB';
|
|
114
|
-
const simContent = nmrSimPeaks =>
|
|
119
|
+
const simContent = nmrSimPeaks => {
|
|
120
|
+
if (!Array.isArray(nmrSimPeaks) || nmrSimPeaks.length === 0) return '';
|
|
121
|
+
return [...nmrSimPeaks].sort((a, b) => a - b).join(', ');
|
|
122
|
+
};
|
|
123
|
+
const simPlaceholder = () => 'No simulated signals available.';
|
|
115
124
|
const normalizeQuillValue = val => {
|
|
116
125
|
if (!val) return '';
|
|
117
126
|
if (val === '<p><br></p>' || val === '<p></p>') return '';
|
|
@@ -363,6 +372,7 @@ const InfoPanel = ({
|
|
|
363
372
|
if (integration) {
|
|
364
373
|
originStack = integration.originStack; // eslint-disable-line
|
|
365
374
|
}
|
|
375
|
+
const simulatedSignals = simContent(simulationSt.nmrSimPeaks);
|
|
366
376
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Accordion, {
|
|
367
377
|
"data-testid": "PanelInfo",
|
|
368
378
|
expanded: expand,
|
|
@@ -475,8 +485,8 @@ const InfoPanel = ({
|
|
|
475
485
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
476
486
|
className: (0, _classnames.default)(classes.rowRoot, classes.rowOddSim),
|
|
477
487
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
478
|
-
className: (0, _classnames.default)(classes.tTxt, classes.tTxtSim, 'txt-sv-panel-txt'),
|
|
479
|
-
children:
|
|
488
|
+
className: (0, _classnames.default)(classes.tTxt, classes.tTxtSim, !simulatedSignals && classes.simPlaceholder, 'txt-sv-panel-txt'),
|
|
489
|
+
children: simulatedSignals || simPlaceholder()
|
|
480
490
|
})
|
|
481
491
|
})]
|
|
482
492
|
}) : null]
|