ketcher-react 3.8.0-rc.3 → 3.8.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/cjs/index.js +38 -25
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/{index.modern-38b83c77.js → index.modern-8e10d5ac.js} +3 -3
- package/dist/cjs/index.modern-8e10d5ac.js.map +1 -0
- 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-c0bcdf82.js} +3 -3
- package/dist/index.modern-c0bcdf82.js.map +1 -0
- package/dist/script/editor/Editor.d.ts +1 -0
- package/package.json +1 -1
- package/dist/cjs/index.modern-38b83c77.js.map +0 -1
- package/dist/index.modern-ea9bb715.js.map +0 -1
|
@@ -107,6 +107,7 @@ declare class Editor implements KetcherEditor {
|
|
|
107
107
|
openMonomerCreationWizard(): void;
|
|
108
108
|
assignLeavingGroupAtom(atomId: number): void;
|
|
109
109
|
closeMonomerCreationWizard(): void;
|
|
110
|
+
private cleanupAttachmentPoint;
|
|
110
111
|
saveNewMonomer(data: any): void;
|
|
111
112
|
reassignAttachmentPointAtom(atomId: number, atomLabel: string): void;
|
|
112
113
|
reassignAttachmentPoint(currentName: AttachmentPointName, newName: AttachmentPointName): void;
|
package/dist/index.js
CHANGED
|
@@ -3787,7 +3787,7 @@ var zoom = {
|
|
|
3787
3787
|
|
|
3788
3788
|
var openHelpLink = function openHelpLink() {
|
|
3789
3789
|
var _window$open;
|
|
3790
|
-
return (_window$open = window.open("https://github.com/epam/ketcher/blob/".concat("v3.8.0
|
|
3790
|
+
return (_window$open = window.open("https://github.com/epam/ketcher/blob/".concat("v3.8.0\n", "/documentation/help.md#ketcher-overview"))) === null || _window$open === void 0 ? void 0 : _window$open.focus();
|
|
3791
3791
|
};
|
|
3792
3792
|
var help = {
|
|
3793
3793
|
help: {
|
|
@@ -25343,7 +25343,9 @@ var Editor$3 = function () {
|
|
|
25343
25343
|
var currentStruct = this.render.ctab.molecule;
|
|
25344
25344
|
var selectionInvalid = selection.atoms.some(function (atomId) {
|
|
25345
25345
|
var atom = _this.render.ctab.molecule.atoms.get(atomId);
|
|
25346
|
-
|
|
25346
|
+
if (!atom) {
|
|
25347
|
+
return true;
|
|
25348
|
+
}
|
|
25347
25349
|
var sgs = atom.sgs,
|
|
25348
25350
|
attachmentPoints = atom.attachmentPoints,
|
|
25349
25351
|
rglabel = atom.rglabel,
|
|
@@ -25368,7 +25370,9 @@ var Editor$3 = function () {
|
|
|
25368
25370
|
}
|
|
25369
25371
|
var terminalRGroupAtoms = selection.atoms.filter(function (atomId) {
|
|
25370
25372
|
var atom = currentStruct.atoms.get(atomId);
|
|
25371
|
-
|
|
25373
|
+
if (!atom) {
|
|
25374
|
+
return false;
|
|
25375
|
+
}
|
|
25372
25376
|
return atom.rglabel !== null && atom.neighbors.length === 1;
|
|
25373
25377
|
});
|
|
25374
25378
|
var selectionAtoms = new Set(selection.atoms);
|
|
@@ -25523,7 +25527,8 @@ var Editor$3 = function () {
|
|
|
25523
25527
|
});
|
|
25524
25528
|
this.monomerCreationState = {
|
|
25525
25529
|
assignedAttachmentPoints: assignedAttachmentPoints,
|
|
25526
|
-
potentialAttachmentPoints: selectedPotentialLeavingAtoms
|
|
25530
|
+
potentialAttachmentPoints: selectedPotentialLeavingAtoms,
|
|
25531
|
+
problematicAttachmentPoints: new Set()
|
|
25527
25532
|
};
|
|
25528
25533
|
this.originalStruct = currentStruct;
|
|
25529
25534
|
this.struct(selectedStruct);
|
|
@@ -25576,6 +25581,19 @@ var Editor$3 = function () {
|
|
|
25576
25581
|
this.struct(this.originalStruct, false);
|
|
25577
25582
|
this.tool('select');
|
|
25578
25583
|
}
|
|
25584
|
+
}, {
|
|
25585
|
+
key: "cleanupAttachmentPoint",
|
|
25586
|
+
value: function cleanupAttachmentPoint(leavingAtomId) {
|
|
25587
|
+
var leavingAtom = this.struct().atoms.get(leavingAtomId);
|
|
25588
|
+
assert_1(leavingAtom);
|
|
25589
|
+
var originalLeavingAtomId = this.selectedToOriginalAtomsIdMap.get(leavingAtomId);
|
|
25590
|
+
assert_1(isNumber(originalLeavingAtomId));
|
|
25591
|
+
var originalLeavingAtom = this.originalStruct.atoms.get(originalLeavingAtomId);
|
|
25592
|
+
assert_1(originalLeavingAtom);
|
|
25593
|
+
originalLeavingAtom.rglabel = null;
|
|
25594
|
+
originalLeavingAtom.label = leavingAtom.label;
|
|
25595
|
+
this.originalStruct.calcImplicitHydrogen(originalLeavingAtomId);
|
|
25596
|
+
}
|
|
25579
25597
|
}, {
|
|
25580
25598
|
key: "saveNewMonomer",
|
|
25581
25599
|
value: function saveNewMonomer(data) {
|
|
@@ -25633,19 +25651,13 @@ var Editor$3 = function () {
|
|
|
25633
25651
|
Monomer = _monomerFactory2[0];
|
|
25634
25652
|
var monomerPosition = new Vec2((this.selectionBBox.min.x + this.selectionBBox.max.x) / 2, (this.selectionBBox.min.y + this.selectionBBox.max.y) / 2);
|
|
25635
25653
|
var monomer = new Monomer(monomerItem, monomerPosition);
|
|
25636
|
-
|
|
25637
|
-
|
|
25638
|
-
|
|
25639
|
-
|
|
25640
|
-
|
|
25641
|
-
|
|
25642
|
-
|
|
25643
|
-
assert_1(isNumber(originalLeavingAtomId));
|
|
25644
|
-
var originalLeavingAtom = _this3.originalStruct.atoms.get(originalLeavingAtomId);
|
|
25645
|
-
assert_1(originalLeavingAtom);
|
|
25646
|
-
originalLeavingAtom.rglabel = null;
|
|
25647
|
-
originalLeavingAtom.label = leavingAtom.label;
|
|
25648
|
-
_this3.originalStruct.calcImplicitHydrogen(originalLeavingAtomId);
|
|
25654
|
+
this.monomerCreationState.assignedAttachmentPoints.forEach(function (_ref11) {
|
|
25655
|
+
var _ref12 = _slicedToArray$1(_ref11, 2),
|
|
25656
|
+
leavingAtomId = _ref12[1];
|
|
25657
|
+
return _this3.cleanupAttachmentPoint(leavingAtomId);
|
|
25658
|
+
});
|
|
25659
|
+
this.monomerCreationState.potentialAttachmentPoints.forEach(function (leavingAtomId) {
|
|
25660
|
+
return _this3.cleanupAttachmentPoint(leavingAtomId);
|
|
25649
25661
|
});
|
|
25650
25662
|
this.closeMonomerCreationWizard();
|
|
25651
25663
|
(_this$originalSelecti = this.originalSelection.atoms) === null || _this$originalSelecti === void 0 || _this$originalSelecti.forEach(function (atomId) {
|
|
@@ -25692,6 +25704,7 @@ var Editor$3 = function () {
|
|
|
25692
25704
|
key: "reassignAttachmentPoint",
|
|
25693
25705
|
value: function reassignAttachmentPoint(currentName, newName) {
|
|
25694
25706
|
assert_1(this.monomerCreationState);
|
|
25707
|
+
this.monomerCreationState.problematicAttachmentPoints["delete"](currentName);
|
|
25695
25708
|
var atomPair = this.monomerCreationState.assignedAttachmentPoints.get(currentName);
|
|
25696
25709
|
assert_1(atomPair);
|
|
25697
25710
|
if (this.monomerCreationState.assignedAttachmentPoints.has(newName)) {
|
|
@@ -26150,10 +26163,10 @@ function domEventSetup(editor, clientArea) {
|
|
|
26150
26163
|
eventName: 'mouseover',
|
|
26151
26164
|
toolEventHandler: 'mouseover'
|
|
26152
26165
|
}];
|
|
26153
|
-
trackedDomEvents.forEach(function (
|
|
26154
|
-
var target =
|
|
26155
|
-
eventName =
|
|
26156
|
-
toolEventHandler =
|
|
26166
|
+
trackedDomEvents.forEach(function (_ref13) {
|
|
26167
|
+
var target = _ref13.target,
|
|
26168
|
+
eventName = _ref13.eventName,
|
|
26169
|
+
toolEventHandler = _ref13.toolEventHandler;
|
|
26157
26170
|
editor.event[eventName] = new DOMSubscription();
|
|
26158
26171
|
var subs = editor.event[eventName];
|
|
26159
26172
|
target.addEventListener(eventName, function () {
|
|
@@ -29074,6 +29087,7 @@ var MonomerCreationWizard = function MonomerCreationWizard() {
|
|
|
29074
29087
|
wizardStateDispatch({
|
|
29075
29088
|
type: 'ResetErrors'
|
|
29076
29089
|
});
|
|
29090
|
+
editor.setProblematicAttachmentPoints(new Set());
|
|
29077
29091
|
var _validateInputs = validateInputs(values),
|
|
29078
29092
|
inputsErrors = _validateInputs.errors,
|
|
29079
29093
|
inputsNotifications = _validateInputs.notifications;
|
|
@@ -29107,7 +29121,6 @@ var MonomerCreationWizard = function MonomerCreationWizard() {
|
|
|
29107
29121
|
naturalAnalogue: naturalAnalogue
|
|
29108
29122
|
});
|
|
29109
29123
|
resetWizard();
|
|
29110
|
-
editor.setProblematicAttachmentPoints(new Set());
|
|
29111
29124
|
};
|
|
29112
29125
|
var monomerCreationState = useSelector(editorMonomerCreationStateSelector);
|
|
29113
29126
|
if (!monomerCreationState) {
|
|
@@ -37246,8 +37259,8 @@ var KetcherBuilder = function () {
|
|
|
37246
37259
|
cleanup = initApp(prevKetcherId, ketcherId, element, appRoot, staticResourcesUrl, {
|
|
37247
37260
|
buttons: buttons || {},
|
|
37248
37261
|
errorHandler: errorHandler || null,
|
|
37249
|
-
version: "3.8.0
|
|
37250
|
-
buildDate: "2025-
|
|
37262
|
+
version: "3.8.0" ,
|
|
37263
|
+
buildDate: "2025-10-17T11:21:57" ,
|
|
37251
37264
|
buildNumber: '',
|
|
37252
37265
|
customButtons: customButtons || []
|
|
37253
37266
|
}, structService, resolve, togglerComponent);
|
|
@@ -37542,7 +37555,7 @@ var ModeControl = function ModeControl(_ref3) {
|
|
|
37542
37555
|
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; }
|
|
37543
37556
|
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$1(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; }
|
|
37544
37557
|
var MacromoleculesEditorComponent = lazy(function () {
|
|
37545
|
-
return import('./index.modern-
|
|
37558
|
+
return import('./index.modern-c0bcdf82.js');
|
|
37546
37559
|
});
|
|
37547
37560
|
var Editor = function Editor(props) {
|
|
37548
37561
|
var _useState = useState(false),
|