ketcher-react 2.28.0-rc.3 → 2.28.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/index.js
CHANGED
|
@@ -963,6 +963,12 @@ var server = {
|
|
|
963
963
|
description: 'slider',
|
|
964
964
|
"default": true
|
|
965
965
|
},
|
|
966
|
+
ignoreChiralFlag: {
|
|
967
|
+
title: 'Ignore the chiral flag',
|
|
968
|
+
type: 'boolean',
|
|
969
|
+
description: 'slider',
|
|
970
|
+
"default": false
|
|
971
|
+
},
|
|
966
972
|
'ignore-stereochemistry-errors': {
|
|
967
973
|
title: 'Ignore stereochemistry errors',
|
|
968
974
|
type: 'boolean',
|
|
@@ -3802,7 +3808,7 @@ var zoom = {
|
|
|
3802
3808
|
|
|
3803
3809
|
var openHelpLink = function openHelpLink() {
|
|
3804
3810
|
var _window$open;
|
|
3805
|
-
return (_window$open = window.open("https://github.com/epam/ketcher/blob/".concat("v2.28.0
|
|
3811
|
+
return (_window$open = window.open("https://github.com/epam/ketcher/blob/".concat("v2.28.0\n", "/documentation/help.md#ketcher-overview"))) === null || _window$open === void 0 ? void 0 : _window$open.focus();
|
|
3806
3812
|
};
|
|
3807
3813
|
var help = {
|
|
3808
3814
|
help: {
|
|
@@ -18972,7 +18978,7 @@ var TemplateTool = function () {
|
|
|
18972
18978
|
value: function () {
|
|
18973
18979
|
var _mousedown = _asyncToGenerator__default["default"]( _regeneratorRuntime__default["default"].mark(function _callee(event) {
|
|
18974
18980
|
var _this$templatePreview;
|
|
18975
|
-
var target, struct, _this$closestItem2, _this$closestItem3, _this$closestItem4, dragCtx, ci, bond;
|
|
18981
|
+
var target, struct, _this$closestItem2, _this$closestItem3, _this$closestItem4, _this$closestItem5, dragCtx, ci, bond;
|
|
18976
18982
|
return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
|
|
18977
18983
|
while (1) switch (_context.prev = _context.next) {
|
|
18978
18984
|
case 0:
|
|
@@ -18987,7 +18993,7 @@ var TemplateTool = function () {
|
|
|
18987
18993
|
bonds: [this.closestItem.id]
|
|
18988
18994
|
}));
|
|
18989
18995
|
if (
|
|
18990
|
-
((_this$closestItem4 = this.closestItem) === null || _this$closestItem4 === void 0 ? void 0 : _this$closestItem4.map) === 'functionalGroups' && ketcherCore.FunctionalGroup.isContractedFunctionalGroup(this.closestItem.id, this.functionalGroups)) {
|
|
18996
|
+
(((_this$closestItem4 = this.closestItem) === null || _this$closestItem4 === void 0 ? void 0 : _this$closestItem4.map) === 'functionalGroups' || ((_this$closestItem5 = this.closestItem) === null || _this$closestItem5 === void 0 ? void 0 : _this$closestItem5.map) === 'sgroups') && ketcherCore.FunctionalGroup.isContractedFunctionalGroup(this.closestItem.id, this.functionalGroups)) {
|
|
18991
18997
|
this.targetGroupsIds.push(this.closestItem.id);
|
|
18992
18998
|
}
|
|
18993
18999
|
}
|
|
@@ -20464,7 +20470,20 @@ function findClosestSGroup(restruct, pos) {
|
|
|
20464
20470
|
var ret = null;
|
|
20465
20471
|
var minDist = SELECTION_DISTANCE_COEFFICIENT;
|
|
20466
20472
|
restruct.molecule.sgroups.forEach(function (sg, sgid) {
|
|
20467
|
-
if (sg.
|
|
20473
|
+
if (sg.isSuperatomWithoutLabel) {
|
|
20474
|
+
return;
|
|
20475
|
+
}
|
|
20476
|
+
if (sg.isContracted()) {
|
|
20477
|
+
var sGroupPosition = sg.pp;
|
|
20478
|
+
if (sGroupPosition) {
|
|
20479
|
+
var dist = ketcherCore.Vec2.dist(pos, sGroupPosition);
|
|
20480
|
+
if (dist < minDist) {
|
|
20481
|
+
ret = sgid;
|
|
20482
|
+
minDist = dist;
|
|
20483
|
+
}
|
|
20484
|
+
}
|
|
20485
|
+
return;
|
|
20486
|
+
}
|
|
20468
20487
|
var d = sg.bracketDirection;
|
|
20469
20488
|
var n = d.rotateSC(1, 0);
|
|
20470
20489
|
var pg = new ketcherCore.Vec2(ketcherCore.Vec2.dot(pos, d), ketcherCore.Vec2.dot(pos, n));
|
|
@@ -21845,7 +21864,7 @@ var EraserTool = function () {
|
|
|
21845
21864
|
this.editor.update(ketcherCore.fromOneAtomDeletion(restruct, ci.id));
|
|
21846
21865
|
} else if (ci.map === 'bonds') {
|
|
21847
21866
|
this.editor.update(ketcherCore.fromOneBondDeletion(restruct, ci.id));
|
|
21848
|
-
} else if (ci.map === 'functionalGroups' && ketcherCore.FunctionalGroup.isContractedFunctionalGroup(ci.id, functionalGroups)) {
|
|
21867
|
+
} else if ((ci.map === 'sgroups' || ci.map === 'functionalGroups') && ketcherCore.FunctionalGroup.isContractedFunctionalGroup(ci.id, functionalGroups)) {
|
|
21849
21868
|
var _sGroup = sgroups.get(ci.id);
|
|
21850
21869
|
this.editor.update(ketcherCore.fromFragmentDeletion(rnd.ctab, {
|
|
21851
21870
|
atoms: _toConsumableArray__default["default"](ketcherCore.SGroup.getAtoms(molecule, _sGroup === null || _sGroup === void 0 ? void 0 : _sGroup.item)),
|
|
@@ -26014,7 +26033,7 @@ var useFunctionalGroupEoc = function useFunctionalGroupEoc() {
|
|
|
26014
26033
|
var selectedFunctionalGroups = props === null || props === void 0 ? void 0 : props.functionalGroups;
|
|
26015
26034
|
var action = new ketcherCore.Action();
|
|
26016
26035
|
selectedFunctionalGroups === null || selectedFunctionalGroups === void 0 || selectedFunctionalGroups.forEach(function (functionalGroup) {
|
|
26017
|
-
action.mergeWith(ketcherCore.
|
|
26036
|
+
action.mergeWith(ketcherCore.setExpandMonomerSGroup(molecule, functionalGroup.relatedSGroupId, {
|
|
26018
26037
|
expanded: toExpand
|
|
26019
26038
|
}));
|
|
26020
26039
|
});
|
|
@@ -26032,16 +26051,7 @@ var useFunctionalGroupEoc = function useFunctionalGroupEoc() {
|
|
|
26032
26051
|
return toExpand ? functionalGroup.isExpanded : !functionalGroup.isExpanded;
|
|
26033
26052
|
}));
|
|
26034
26053
|
}, []);
|
|
26035
|
-
|
|
26036
|
-
var _props$functionalGrou2;
|
|
26037
|
-
var props = _ref3.props;
|
|
26038
|
-
var editor = getKetcherInstance().editor;
|
|
26039
|
-
var molecule = editor.render.ctab.molecule;
|
|
26040
|
-
return Boolean(props === null || props === void 0 || (_props$functionalGrou2 = props.functionalGroups) === null || _props$functionalGrou2 === void 0 ? void 0 : _props$functionalGrou2.every(function (functionalGroup) {
|
|
26041
|
-
return functionalGroup === null || functionalGroup === void 0 ? void 0 : functionalGroup.relatedSGroup.isNotContractible(molecule);
|
|
26042
|
-
}));
|
|
26043
|
-
}, []);
|
|
26044
|
-
return [handler, hidden, disabled];
|
|
26054
|
+
return [handler, hidden];
|
|
26045
26055
|
};
|
|
26046
26056
|
|
|
26047
26057
|
var useFunctionalGroupRemove = function useFunctionalGroupRemove() {
|
|
@@ -26069,16 +26079,12 @@ function ownKeys$M(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymb
|
|
|
26069
26079
|
function _objectSpread$M(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$M(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$M(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
26070
26080
|
var FunctionalGroupMenuItems = function FunctionalGroupMenuItems(props) {
|
|
26071
26081
|
var _useFunctionalGroupEo = useFunctionalGroupEoc(),
|
|
26072
|
-
_useFunctionalGroupEo2 = _slicedToArray__default["default"](_useFunctionalGroupEo,
|
|
26082
|
+
_useFunctionalGroupEo2 = _slicedToArray__default["default"](_useFunctionalGroupEo, 2),
|
|
26073
26083
|
handleExpandOrContract = _useFunctionalGroupEo2[0],
|
|
26074
|
-
ExpandOrContractHidden = _useFunctionalGroupEo2[1]
|
|
26075
|
-
ExpandOrContractDisabled = _useFunctionalGroupEo2[2];
|
|
26084
|
+
ExpandOrContractHidden = _useFunctionalGroupEo2[1];
|
|
26076
26085
|
var handleRemove = useFunctionalGroupRemove();
|
|
26077
26086
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
26078
26087
|
children: [jsxRuntime.jsx(reactContexify.Item, _objectSpread$M(_objectSpread$M({}, props), {}, {
|
|
26079
|
-
disabled: function disabled(params) {
|
|
26080
|
-
return ExpandOrContractDisabled(params);
|
|
26081
|
-
},
|
|
26082
26088
|
hidden: function hidden(params) {
|
|
26083
26089
|
return ExpandOrContractHidden(params, true);
|
|
26084
26090
|
},
|
|
@@ -26087,9 +26093,6 @@ var FunctionalGroupMenuItems = function FunctionalGroupMenuItems(props) {
|
|
|
26087
26093
|
},
|
|
26088
26094
|
children: "Expand Abbreviation"
|
|
26089
26095
|
})), jsxRuntime.jsx(reactContexify.Item, _objectSpread$M(_objectSpread$M({}, props), {}, {
|
|
26090
|
-
disabled: function disabled(params) {
|
|
26091
|
-
return ExpandOrContractDisabled(params);
|
|
26092
|
-
},
|
|
26093
26096
|
hidden: function hidden(params) {
|
|
26094
26097
|
return ExpandOrContractHidden(params, false);
|
|
26095
26098
|
},
|
|
@@ -35029,8 +35032,8 @@ var KetcherBuilder = function () {
|
|
|
35029
35032
|
cleanup = initApp(element, appRoot, staticResourcesUrl, {
|
|
35030
35033
|
buttons: buttons || {},
|
|
35031
35034
|
errorHandler: errorHandler || null,
|
|
35032
|
-
version: "2.28.0
|
|
35033
|
-
buildDate: "
|
|
35035
|
+
version: "2.28.0" ,
|
|
35036
|
+
buildDate: "2025-02-17T19:11:53" ,
|
|
35034
35037
|
buildNumber: '',
|
|
35035
35038
|
customButtons: customButtons || []
|
|
35036
35039
|
}, structService, resolve, togglerComponent);
|