ketcher-react 3.8.0-rc.3 → 3.8.0-rc.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/cjs/index.js +38 -25
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/{index.modern-38b83c77.js → index.modern-7604afae.js} +3 -3
- package/dist/cjs/{index.modern-38b83c77.js.map → index.modern-7604afae.js.map} +1 -1
- package/dist/cjs/script/editor/Editor.d.ts +1 -0
- package/dist/index.js +38 -25
- package/dist/index.js.map +1 -1
- package/dist/{index.modern-ea9bb715.js → index.modern-eb9aa0eb.js} +3 -3
- package/dist/{index.modern-ea9bb715.js.map → index.modern-eb9aa0eb.js.map} +1 -1
- package/dist/script/editor/Editor.d.ts +1 -0
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -3850,7 +3850,7 @@ var zoom = {
|
|
|
3850
3850
|
|
|
3851
3851
|
var openHelpLink = function openHelpLink() {
|
|
3852
3852
|
var _window$open;
|
|
3853
|
-
return (_window$open = window.open("https://github.com/epam/ketcher/blob/".concat("v3.8.0-rc.
|
|
3853
|
+
return (_window$open = window.open("https://github.com/epam/ketcher/blob/".concat("v3.8.0-rc.4\n", "/documentation/help.md#ketcher-overview"))) === null || _window$open === void 0 ? void 0 : _window$open.focus();
|
|
3854
3854
|
};
|
|
3855
3855
|
var help = {
|
|
3856
3856
|
help: {
|
|
@@ -25406,7 +25406,9 @@ var Editor$3 = function () {
|
|
|
25406
25406
|
var currentStruct = this.render.ctab.molecule;
|
|
25407
25407
|
var selectionInvalid = selection.atoms.some(function (atomId) {
|
|
25408
25408
|
var atom = _this.render.ctab.molecule.atoms.get(atomId);
|
|
25409
|
-
|
|
25409
|
+
if (!atom) {
|
|
25410
|
+
return true;
|
|
25411
|
+
}
|
|
25410
25412
|
var sgs = atom.sgs,
|
|
25411
25413
|
attachmentPoints = atom.attachmentPoints,
|
|
25412
25414
|
rglabel = atom.rglabel,
|
|
@@ -25431,7 +25433,9 @@ var Editor$3 = function () {
|
|
|
25431
25433
|
}
|
|
25432
25434
|
var terminalRGroupAtoms = selection.atoms.filter(function (atomId) {
|
|
25433
25435
|
var atom = currentStruct.atoms.get(atomId);
|
|
25434
|
-
|
|
25436
|
+
if (!atom) {
|
|
25437
|
+
return false;
|
|
25438
|
+
}
|
|
25435
25439
|
return atom.rglabel !== null && atom.neighbors.length === 1;
|
|
25436
25440
|
});
|
|
25437
25441
|
var selectionAtoms = new Set(selection.atoms);
|
|
@@ -25586,7 +25590,8 @@ var Editor$3 = function () {
|
|
|
25586
25590
|
});
|
|
25587
25591
|
this.monomerCreationState = {
|
|
25588
25592
|
assignedAttachmentPoints: assignedAttachmentPoints,
|
|
25589
|
-
potentialAttachmentPoints: selectedPotentialLeavingAtoms
|
|
25593
|
+
potentialAttachmentPoints: selectedPotentialLeavingAtoms,
|
|
25594
|
+
problematicAttachmentPoints: new Set()
|
|
25590
25595
|
};
|
|
25591
25596
|
this.originalStruct = currentStruct;
|
|
25592
25597
|
this.struct(selectedStruct);
|
|
@@ -25639,6 +25644,19 @@ var Editor$3 = function () {
|
|
|
25639
25644
|
this.struct(this.originalStruct, false);
|
|
25640
25645
|
this.tool('select');
|
|
25641
25646
|
}
|
|
25647
|
+
}, {
|
|
25648
|
+
key: "cleanupAttachmentPoint",
|
|
25649
|
+
value: function cleanupAttachmentPoint(leavingAtomId) {
|
|
25650
|
+
var leavingAtom = this.struct().atoms.get(leavingAtomId);
|
|
25651
|
+
assert_1(leavingAtom);
|
|
25652
|
+
var originalLeavingAtomId = this.selectedToOriginalAtomsIdMap.get(leavingAtomId);
|
|
25653
|
+
assert_1(_.isNumber(originalLeavingAtomId));
|
|
25654
|
+
var originalLeavingAtom = this.originalStruct.atoms.get(originalLeavingAtomId);
|
|
25655
|
+
assert_1(originalLeavingAtom);
|
|
25656
|
+
originalLeavingAtom.rglabel = null;
|
|
25657
|
+
originalLeavingAtom.label = leavingAtom.label;
|
|
25658
|
+
this.originalStruct.calcImplicitHydrogen(originalLeavingAtomId);
|
|
25659
|
+
}
|
|
25642
25660
|
}, {
|
|
25643
25661
|
key: "saveNewMonomer",
|
|
25644
25662
|
value: function saveNewMonomer(data) {
|
|
@@ -25696,19 +25714,13 @@ var Editor$3 = function () {
|
|
|
25696
25714
|
Monomer = _monomerFactory2[0];
|
|
25697
25715
|
var monomerPosition = new ketcherCore.Vec2((this.selectionBBox.min.x + this.selectionBBox.max.x) / 2, (this.selectionBBox.min.y + this.selectionBBox.max.y) / 2);
|
|
25698
25716
|
var monomer = new Monomer(monomerItem, monomerPosition);
|
|
25699
|
-
|
|
25700
|
-
|
|
25701
|
-
|
|
25702
|
-
|
|
25703
|
-
|
|
25704
|
-
|
|
25705
|
-
|
|
25706
|
-
assert_1(_.isNumber(originalLeavingAtomId));
|
|
25707
|
-
var originalLeavingAtom = _this3.originalStruct.atoms.get(originalLeavingAtomId);
|
|
25708
|
-
assert_1(originalLeavingAtom);
|
|
25709
|
-
originalLeavingAtom.rglabel = null;
|
|
25710
|
-
originalLeavingAtom.label = leavingAtom.label;
|
|
25711
|
-
_this3.originalStruct.calcImplicitHydrogen(originalLeavingAtomId);
|
|
25717
|
+
this.monomerCreationState.assignedAttachmentPoints.forEach(function (_ref11) {
|
|
25718
|
+
var _ref12 = _slicedToArray__default["default"](_ref11, 2),
|
|
25719
|
+
leavingAtomId = _ref12[1];
|
|
25720
|
+
return _this3.cleanupAttachmentPoint(leavingAtomId);
|
|
25721
|
+
});
|
|
25722
|
+
this.monomerCreationState.potentialAttachmentPoints.forEach(function (leavingAtomId) {
|
|
25723
|
+
return _this3.cleanupAttachmentPoint(leavingAtomId);
|
|
25712
25724
|
});
|
|
25713
25725
|
this.closeMonomerCreationWizard();
|
|
25714
25726
|
(_this$originalSelecti = this.originalSelection.atoms) === null || _this$originalSelecti === void 0 || _this$originalSelecti.forEach(function (atomId) {
|
|
@@ -25755,6 +25767,7 @@ var Editor$3 = function () {
|
|
|
25755
25767
|
key: "reassignAttachmentPoint",
|
|
25756
25768
|
value: function reassignAttachmentPoint(currentName, newName) {
|
|
25757
25769
|
assert_1(this.monomerCreationState);
|
|
25770
|
+
this.monomerCreationState.problematicAttachmentPoints["delete"](currentName);
|
|
25758
25771
|
var atomPair = this.monomerCreationState.assignedAttachmentPoints.get(currentName);
|
|
25759
25772
|
assert_1(atomPair);
|
|
25760
25773
|
if (this.monomerCreationState.assignedAttachmentPoints.has(newName)) {
|
|
@@ -26213,10 +26226,10 @@ function domEventSetup(editor, clientArea) {
|
|
|
26213
26226
|
eventName: 'mouseover',
|
|
26214
26227
|
toolEventHandler: 'mouseover'
|
|
26215
26228
|
}];
|
|
26216
|
-
trackedDomEvents.forEach(function (
|
|
26217
|
-
var target =
|
|
26218
|
-
eventName =
|
|
26219
|
-
toolEventHandler =
|
|
26229
|
+
trackedDomEvents.forEach(function (_ref13) {
|
|
26230
|
+
var target = _ref13.target,
|
|
26231
|
+
eventName = _ref13.eventName,
|
|
26232
|
+
toolEventHandler = _ref13.toolEventHandler;
|
|
26220
26233
|
editor.event[eventName] = new subscription.DOMSubscription();
|
|
26221
26234
|
var subs = editor.event[eventName];
|
|
26222
26235
|
target.addEventListener(eventName, function () {
|
|
@@ -29137,6 +29150,7 @@ var MonomerCreationWizard = function MonomerCreationWizard() {
|
|
|
29137
29150
|
wizardStateDispatch({
|
|
29138
29151
|
type: 'ResetErrors'
|
|
29139
29152
|
});
|
|
29153
|
+
editor.setProblematicAttachmentPoints(new Set());
|
|
29140
29154
|
var _validateInputs = validateInputs(values),
|
|
29141
29155
|
inputsErrors = _validateInputs.errors,
|
|
29142
29156
|
inputsNotifications = _validateInputs.notifications;
|
|
@@ -29170,7 +29184,6 @@ var MonomerCreationWizard = function MonomerCreationWizard() {
|
|
|
29170
29184
|
naturalAnalogue: naturalAnalogue
|
|
29171
29185
|
});
|
|
29172
29186
|
resetWizard();
|
|
29173
|
-
editor.setProblematicAttachmentPoints(new Set());
|
|
29174
29187
|
};
|
|
29175
29188
|
var monomerCreationState = reactRedux.useSelector(editorMonomerCreationStateSelector);
|
|
29176
29189
|
if (!monomerCreationState) {
|
|
@@ -37309,8 +37322,8 @@ var KetcherBuilder = function () {
|
|
|
37309
37322
|
cleanup = initApp(prevKetcherId, ketcherId, element, appRoot, staticResourcesUrl, {
|
|
37310
37323
|
buttons: buttons || {},
|
|
37311
37324
|
errorHandler: errorHandler || null,
|
|
37312
|
-
version: "3.8.0-rc.
|
|
37313
|
-
buildDate: "2025-09-
|
|
37325
|
+
version: "3.8.0-rc.4" ,
|
|
37326
|
+
buildDate: "2025-09-17T17:13:08" ,
|
|
37314
37327
|
buildNumber: '',
|
|
37315
37328
|
customButtons: customButtons || []
|
|
37316
37329
|
}, structService, resolve, togglerComponent);
|
|
@@ -37605,7 +37618,7 @@ var ModeControl = function ModeControl(_ref3) {
|
|
|
37605
37618
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
37606
37619
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
37607
37620
|
var MacromoleculesEditorComponent = React.lazy(function () {
|
|
37608
|
-
return Promise.resolve().then(function () { return require('./index.modern-
|
|
37621
|
+
return Promise.resolve().then(function () { return require('./index.modern-7604afae.js'); });
|
|
37609
37622
|
});
|
|
37610
37623
|
var Editor = function Editor(props) {
|
|
37611
37624
|
var _useState = React.useState(false),
|