ketcher-react 3.7.0-rc.2 → 3.7.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 +15 -18
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/{index.modern-c52e0e6a.js → index.modern-e5b96654.js} +8 -3
- package/dist/cjs/index.modern-e5b96654.js.map +1 -0
- package/dist/cjs/script/editor/Editor.d.ts +1 -1
- package/dist/cjs/script/editor/tool/create-monomer.d.ts +0 -1
- package/dist/index.js +15 -18
- package/dist/index.js.map +1 -1
- package/dist/{index.modern-43985e95.js → index.modern-9eda1441.js} +8 -3
- package/dist/index.modern-9eda1441.js.map +1 -0
- package/dist/script/editor/Editor.d.ts +1 -1
- package/dist/script/editor/tool/create-monomer.d.ts +0 -1
- package/package.json +1 -1
- package/dist/cjs/index.modern-c52e0e6a.js.map +0 -1
- package/dist/index.modern-43985e95.js.map +0 -1
package/dist/cjs/index.js
CHANGED
|
@@ -3851,7 +3851,7 @@ var zoom = {
|
|
|
3851
3851
|
|
|
3852
3852
|
var openHelpLink = function openHelpLink() {
|
|
3853
3853
|
var _window$open;
|
|
3854
|
-
return (_window$open = window.open("https://github.com/epam/ketcher/blob/".concat("v3.7.0
|
|
3854
|
+
return (_window$open = window.open("https://github.com/epam/ketcher/blob/".concat("v3.7.0\n", "/documentation/help.md#ketcher-overview"))) === null || _window$open === void 0 ? void 0 : _window$open.focus();
|
|
3855
3855
|
};
|
|
3856
3856
|
var help = {
|
|
3857
3857
|
help: {
|
|
@@ -24144,11 +24144,6 @@ var CreateMonomerTool = function () {
|
|
|
24144
24144
|
this.editor.openMonomerCreationWizard();
|
|
24145
24145
|
}
|
|
24146
24146
|
_createClass__default["default"](CreateMonomerTool, [{
|
|
24147
|
-
key: "cancel",
|
|
24148
|
-
value: function cancel() {
|
|
24149
|
-
this.editor.closeMonomerCreationWizard();
|
|
24150
|
-
}
|
|
24151
|
-
}, {
|
|
24152
24147
|
key: "mousemove",
|
|
24153
24148
|
value: function mousemove() {
|
|
24154
24149
|
}
|
|
@@ -24322,8 +24317,9 @@ var HoverIcon = function () {
|
|
|
24322
24317
|
}, {
|
|
24323
24318
|
key: "isOverLoader",
|
|
24324
24319
|
value: function isOverLoader(event) {
|
|
24320
|
+
var _target$classList;
|
|
24325
24321
|
var target = (event === null || event === void 0 ? void 0 : event.relatedTarget) || event.target;
|
|
24326
|
-
return target === null || target === void 0 ? void 0 :
|
|
24322
|
+
return target === null || target === void 0 || (_target$classList = target.classList) === null || _target$classList === void 0 ? void 0 : _target$classList.contains('loading-spinner');
|
|
24327
24323
|
}
|
|
24328
24324
|
}, {
|
|
24329
24325
|
key: "onMouseMove",
|
|
@@ -25387,7 +25383,7 @@ var Editor$3 = function () {
|
|
|
25387
25383
|
if (this._monomerCreationState) {
|
|
25388
25384
|
return true;
|
|
25389
25385
|
}
|
|
25390
|
-
var selection = this.
|
|
25386
|
+
var selection = this.selection();
|
|
25391
25387
|
if (selection && (_selection$atoms = selection.atoms) !== null && _selection$atoms !== void 0 && _selection$atoms.length && (_selection$bonds = selection.bonds) !== null && _selection$bonds !== void 0 && _selection$bonds.length) {
|
|
25392
25388
|
var currentStruct = this.render.ctab.molecule;
|
|
25393
25389
|
var selectionInvalid = selection.atoms.some(function (atomId) {
|
|
@@ -25395,9 +25391,9 @@ var Editor$3 = function () {
|
|
|
25395
25391
|
if (!atom) {
|
|
25396
25392
|
return false;
|
|
25397
25393
|
}
|
|
25398
|
-
return atom.sgs.size > 0 ||
|
|
25394
|
+
return atom.sgs.size > 0 || atom.rglabel !== null || atom.attachmentPoints !== null || _this.render.ctab.molecule.rgroups.some(function (rgroup) {
|
|
25399
25395
|
return rgroup.frags.has(atom.fragment);
|
|
25400
|
-
});
|
|
25396
|
+
}) || ketcherCore.genericsList.includes(atom.label);
|
|
25401
25397
|
});
|
|
25402
25398
|
if (selectionInvalid) {
|
|
25403
25399
|
return false;
|
|
@@ -25411,7 +25407,7 @@ var Editor$3 = function () {
|
|
|
25411
25407
|
return selectionAtoms.has(bond.begin) && !selectionAtoms.has(bond.end) || selectionAtoms.has(bond.end) && !selectionAtoms.has(bond.begin);
|
|
25412
25408
|
});
|
|
25413
25409
|
if (bondsToOutside.some(function (bond) {
|
|
25414
|
-
return bond.type !== ketcherCore.Bond.PATTERN.TYPE.SINGLE;
|
|
25410
|
+
return bond.type !== ketcherCore.Bond.PATTERN.TYPE.SINGLE || bond.stereo !== ketcherCore.Bond.PATTERN.STEREO.NONE;
|
|
25415
25411
|
})) {
|
|
25416
25412
|
return false;
|
|
25417
25413
|
}
|
|
@@ -25426,10 +25422,11 @@ var Editor$3 = function () {
|
|
|
25426
25422
|
var _selection$atoms2,
|
|
25427
25423
|
_this2 = this;
|
|
25428
25424
|
var currentStruct = this.render.ctab.molecule;
|
|
25429
|
-
var selection = this.
|
|
25425
|
+
var selection = this.selection();
|
|
25426
|
+
assert_1(selection);
|
|
25430
25427
|
this.originalSelection = selection;
|
|
25431
25428
|
var selectionAtoms = new Set(selection.atoms);
|
|
25432
|
-
var selectedStruct = this.structSelected();
|
|
25429
|
+
var selectedStruct = this.structSelected(selection);
|
|
25433
25430
|
this.selectionBBox = selectedStruct.getCoordBoundingBoxObj();
|
|
25434
25431
|
var atomIdsMap = new Map();
|
|
25435
25432
|
_toConsumableArray__default["default"]((_selection$atoms2 = selection.atoms) !== null && _selection$atoms2 !== void 0 ? _selection$atoms2 : []).sort(function (a, b) {
|
|
@@ -25814,9 +25811,9 @@ var Editor$3 = function () {
|
|
|
25814
25811
|
}
|
|
25815
25812
|
}, {
|
|
25816
25813
|
key: "structSelected",
|
|
25817
|
-
value: function structSelected() {
|
|
25814
|
+
value: function structSelected(existingSelection) {
|
|
25818
25815
|
var struct = this.render.ctab.molecule;
|
|
25819
|
-
var selection = this.explicitSelected();
|
|
25816
|
+
var selection = existingSelection !== null && existingSelection !== void 0 ? existingSelection : this.explicitSelected();
|
|
25820
25817
|
var dst = struct.clone(new ketcherCore.Pile(selection.atoms), new ketcherCore.Pile(selection.bonds), true, null, new ketcherCore.Pile(selection.simpleObjects), new ketcherCore.Pile(selection.texts), null, new ketcherCore.Pile(selection.images), new ketcherCore.Pile(selection[ketcherCore.MULTITAIL_ARROW_KEY]));
|
|
25821
25818
|
struct.rxnArrows.forEach(function (item, id) {
|
|
25822
25819
|
if (selection.rxnArrows.indexOf(id) !== -1) dst.rxnArrows.add(item.clone());
|
|
@@ -36915,8 +36912,8 @@ var KetcherBuilder = function () {
|
|
|
36915
36912
|
cleanup = initApp(prevKetcherId, ketcherId, element, appRoot, staticResourcesUrl, {
|
|
36916
36913
|
buttons: buttons || {},
|
|
36917
36914
|
errorHandler: errorHandler || null,
|
|
36918
|
-
version: "3.7.0
|
|
36919
|
-
buildDate: "2025-
|
|
36915
|
+
version: "3.7.0" ,
|
|
36916
|
+
buildDate: "2025-09-19T11:29:51" ,
|
|
36920
36917
|
buildNumber: '',
|
|
36921
36918
|
customButtons: customButtons || []
|
|
36922
36919
|
}, structService, resolve, togglerComponent);
|
|
@@ -37211,7 +37208,7 @@ var ModeControl = function ModeControl(_ref3) {
|
|
|
37211
37208
|
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; }
|
|
37212
37209
|
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; }
|
|
37213
37210
|
var MacromoleculesEditorComponent = React.lazy(function () {
|
|
37214
|
-
return Promise.resolve().then(function () { return require('./index.modern-
|
|
37211
|
+
return Promise.resolve().then(function () { return require('./index.modern-e5b96654.js'); });
|
|
37215
37212
|
});
|
|
37216
37213
|
var Editor = function Editor(props) {
|
|
37217
37214
|
var _useState = React.useState(false),
|