@complat/react-spectra-editor 1.5.3 → 1.5.4
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/panel/info.js +5 -4
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -117,8 +117,9 @@ const normalizeQuillValue = val => {
|
|
|
117
117
|
if (val === '<p><br></p>' || val === '<p></p>') return '';
|
|
118
118
|
return val;
|
|
119
119
|
};
|
|
120
|
-
const handleDescriptionChanged = (
|
|
121
|
-
onDescriptionChanged
|
|
120
|
+
const handleDescriptionChanged = (content, delta, source, editor, onDescriptionChanged) => {
|
|
121
|
+
if (!onDescriptionChanged) return;
|
|
122
|
+
onDescriptionChanged(normalizeQuillValue(content), delta, source, editor);
|
|
122
123
|
};
|
|
123
124
|
const aucValue = integration => {
|
|
124
125
|
if (!integration) {
|
|
@@ -442,11 +443,11 @@ const InfoPanel = ({
|
|
|
442
443
|
className: (0, _classnames.default)(classes.quill, 'card-sv-quill'),
|
|
443
444
|
value: normalizeQuillValue(descriptions),
|
|
444
445
|
placeholder: canChangeDescription ? 'Peaks will be written here...' : undefined,
|
|
445
|
-
readOnly:
|
|
446
|
+
readOnly: !canChangeDescription,
|
|
446
447
|
modules: {
|
|
447
448
|
toolbar: false
|
|
448
449
|
},
|
|
449
|
-
onChange:
|
|
450
|
+
onChange: (content, delta, source, editor) => handleDescriptionChanged(content, delta, source, editor, onDescriptionChanged)
|
|
450
451
|
})
|
|
451
452
|
})]
|
|
452
453
|
}) : null]
|
package/dist/index.js
CHANGED
|
@@ -500,7 +500,7 @@ class DemoWriteIr extends _react.default.Component {
|
|
|
500
500
|
console.log(analysis);
|
|
501
501
|
console.log(integration);
|
|
502
502
|
console.log(multiplicity);
|
|
503
|
-
if (shift
|
|
503
|
+
if (shift?.ref?.label) {
|
|
504
504
|
const label = this.rmDollarSign(shift.ref.label);
|
|
505
505
|
alert(`Peaks: ${body}` + '\n' + '- - - - - - - - - - -' + '\n' + `Shift solvent = ${label}, ${shift.ref.value}ppm` + '\n');
|
|
506
506
|
} else {
|