ketcher-react 3.11.0-rc.1 → 3.11.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 +27 -16
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/{index.modern-ecfd991d.js → index.modern-4da8672d.js} +3 -3
- package/dist/cjs/index.modern-4da8672d.js.map +1 -0
- package/dist/cjs/script/editor/Editor.d.ts +1 -1
- package/dist/cjs/script/ui/views/components/MonomerCreationWizard/MonomerCreationWizard.types.d.ts +2 -0
- package/dist/index.js +27 -16
- package/dist/index.js.map +1 -1
- package/dist/{index.modern-d3fd36b2.js → index.modern-d667fa44.js} +3 -3
- package/dist/index.modern-d667fa44.js.map +1 -0
- package/dist/script/editor/Editor.d.ts +1 -1
- package/dist/script/ui/views/components/MonomerCreationWizard/MonomerCreationWizard.types.d.ts +2 -0
- package/package.json +1 -1
- package/dist/cjs/index.modern-ecfd991d.js.map +0 -1
- package/dist/index.modern-d3fd36b2.js.map +0 -1
|
@@ -116,7 +116,7 @@ declare class Editor implements KetcherEditor {
|
|
|
116
116
|
assignConnectionPointAtom(atomId: number, attachmentPointName?: AttachmentPointName, assignedAttachmentPointsByMonomer?: Map<AttachmentPointName, [
|
|
117
117
|
number,
|
|
118
118
|
number
|
|
119
|
-
]>, monomerStructure?: Selection): void;
|
|
119
|
+
]>, monomerStructure?: Selection, forceAddNewLeavingGroupAtom?: boolean): void;
|
|
120
120
|
closeMonomerCreationWizard(restoreOriginalStruct?: boolean): void;
|
|
121
121
|
saveNewMonomer(data: any): {
|
|
122
122
|
monomer: import("ketcher-core").Chem | import("ketcher-core").Sugar | import("ketcher-core").Peptide | import("ketcher-core").RNABase | import("ketcher-core").Phosphate;
|
package/dist/index.js
CHANGED
|
@@ -8466,7 +8466,7 @@ var zoom = {
|
|
|
8466
8466
|
|
|
8467
8467
|
var openHelpLink = function openHelpLink() {
|
|
8468
8468
|
var _window$open;
|
|
8469
|
-
return (_window$open = window.open("https://github.com/epam/ketcher/blob/".concat("v3.11.0
|
|
8469
|
+
return (_window$open = window.open("https://github.com/epam/ketcher/blob/".concat("v3.11.0\n", "/documentation/help.md#ketcher-overview"))) === null || _window$open === void 0 ? void 0 : _window$open.focus();
|
|
8470
8470
|
};
|
|
8471
8471
|
var help = {
|
|
8472
8472
|
help: {
|
|
@@ -25731,16 +25731,17 @@ var Editor$3 = function () {
|
|
|
25731
25731
|
}, {
|
|
25732
25732
|
key: "isMonomerCreationWizardEnabled",
|
|
25733
25733
|
get: function get() {
|
|
25734
|
+
var _this$selection;
|
|
25734
25735
|
if (this.isMonomerCreationWizardActive) {
|
|
25735
25736
|
return false;
|
|
25736
25737
|
}
|
|
25737
|
-
var selection = this.selection()
|
|
25738
|
-
|
|
25739
|
-
|
|
25740
|
-
}
|
|
25738
|
+
var selection = (_this$selection = this.selection()) !== null && _this$selection !== void 0 ? _this$selection : {
|
|
25739
|
+
atoms: Array.from(this.struct().atoms.keys()),
|
|
25740
|
+
bonds: Array.from(this.struct().bonds.keys())
|
|
25741
|
+
};
|
|
25741
25742
|
var currentStruct = this.struct();
|
|
25742
25743
|
if (!selection.atoms || selection.atoms.length === 0) {
|
|
25743
|
-
return
|
|
25744
|
+
return true;
|
|
25744
25745
|
}
|
|
25745
25746
|
var selectionInvalid = selection.atoms.some(function (atomId) {
|
|
25746
25747
|
var atom = currentStruct.atoms.get(atomId);
|
|
@@ -25825,11 +25826,11 @@ var Editor$3 = function () {
|
|
|
25825
25826
|
}, {
|
|
25826
25827
|
key: "openMonomerCreationWizard",
|
|
25827
25828
|
value: function openMonomerCreationWizard() {
|
|
25828
|
-
var _this$
|
|
25829
|
+
var _this$selection2,
|
|
25829
25830
|
_selection$atoms,
|
|
25830
25831
|
_this = this;
|
|
25831
25832
|
var currentStruct = this.render.ctab.molecule;
|
|
25832
|
-
var selection = (_this$
|
|
25833
|
+
var selection = (_this$selection2 = this.selection()) !== null && _this$selection2 !== void 0 ? _this$selection2 : {
|
|
25833
25834
|
atoms: Array.from(this.struct().atoms.keys()),
|
|
25834
25835
|
bonds: Array.from(this.struct().bonds.keys())
|
|
25835
25836
|
};
|
|
@@ -25989,11 +25990,12 @@ var Editor$3 = function () {
|
|
|
25989
25990
|
key: "assignConnectionPointAtom",
|
|
25990
25991
|
value: function assignConnectionPointAtom(atomId, attachmentPointName, assignedAttachmentPointsByMonomer, monomerStructure) {
|
|
25991
25992
|
var _this2 = this;
|
|
25993
|
+
var forceAddNewLeavingGroupAtom = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
|
25992
25994
|
assert_1(this.monomerCreationState);
|
|
25993
25995
|
var potentialLeavingAtoms = this.monomerCreationState.potentialAttachmentPoints.get(atomId);
|
|
25994
25996
|
var leavingAtomId;
|
|
25995
25997
|
var additionalAction = null;
|
|
25996
|
-
if (potentialLeavingAtoms) {
|
|
25998
|
+
if (!forceAddNewLeavingGroupAtom && potentialLeavingAtoms) {
|
|
25997
25999
|
var _Array$from$sort$redu = Array.from(potentialLeavingAtoms).sort(function (a, b) {
|
|
25998
26000
|
return a - b;
|
|
25999
26001
|
}).reduce(function (acc, currentAtomId) {
|
|
@@ -30852,6 +30854,9 @@ var rnaPresetWizardReducer = function rnaPresetWizardReducer(state, action) {
|
|
|
30852
30854
|
})
|
|
30853
30855
|
});
|
|
30854
30856
|
}
|
|
30857
|
+
if (action.type === 'ResetWizard') {
|
|
30858
|
+
return initialRnaPresetWizardState;
|
|
30859
|
+
}
|
|
30855
30860
|
if (action.type === 'RemoveNotification') {
|
|
30856
30861
|
var presetNotifications = new Map(state.preset.notifications);
|
|
30857
30862
|
var baseNotifications = new Map(state.base.notifications);
|
|
@@ -31160,6 +31165,9 @@ var MonomerCreationWizard = function MonomerCreationWizard() {
|
|
|
31160
31165
|
wizardStateDispatch({
|
|
31161
31166
|
type: 'ResetWizard'
|
|
31162
31167
|
});
|
|
31168
|
+
rnaPresetWizardStateDispatch({
|
|
31169
|
+
type: 'ResetWizard'
|
|
31170
|
+
});
|
|
31163
31171
|
} else {
|
|
31164
31172
|
wizardStateDispatch({
|
|
31165
31173
|
type: 'SetFieldValue',
|
|
@@ -31200,6 +31208,9 @@ var MonomerCreationWizard = function MonomerCreationWizard() {
|
|
|
31200
31208
|
wizardStateDispatch({
|
|
31201
31209
|
type: 'ResetWizard'
|
|
31202
31210
|
});
|
|
31211
|
+
rnaPresetWizardStateDispatch({
|
|
31212
|
+
type: 'ResetWizard'
|
|
31213
|
+
});
|
|
31203
31214
|
setAttachmentPointEditPopupData(null);
|
|
31204
31215
|
};
|
|
31205
31216
|
var selectRectangleAction = tools['select-rectangle'].action;
|
|
@@ -31486,10 +31497,10 @@ var MonomerCreationWizard = function MonomerCreationWizard() {
|
|
|
31486
31497
|
var sugarR2AttachmentPointAtom = sugarStructure !== null && sugarStructure !== void 0 && (_sugarStructure$atoms6 = sugarStructure.atoms) !== null && _sugarStructure$atoms6 !== void 0 && _sugarStructure$atoms6.includes(bondBetweenSugarAndPhosphate.begin) ? bondBetweenSugarAndPhosphate.begin : bondBetweenSugarAndPhosphate.end;
|
|
31487
31498
|
var baseR1AttachmentPointAtom = baseStructure !== null && baseStructure !== void 0 && (_baseStructure$atoms3 = baseStructure.atoms) !== null && _baseStructure$atoms3 !== void 0 && _baseStructure$atoms3.includes(bondBetweenSugarAndBase.begin) ? bondBetweenSugarAndBase.begin : bondBetweenSugarAndBase.end;
|
|
31488
31499
|
var phosphateR1AttachmentPointAtom = phosphateStructure !== null && phosphateStructure !== void 0 && (_phosphateStructure$a3 = phosphateStructure.atoms) !== null && _phosphateStructure$a3 !== void 0 && _phosphateStructure$a3.includes(bondBetweenSugarAndPhosphate.begin) ? bondBetweenSugarAndPhosphate.begin : bondBetweenSugarAndPhosphate.end;
|
|
31489
|
-
editor.assignConnectionPointAtom(baseR1AttachmentPointAtom, AttachmentPointName.R1, assignedAttachmentPointsByMonomer.get(rnaPresetWizardState.base), rnaPresetWizardState.base.structure);
|
|
31490
|
-
editor.assignConnectionPointAtom(sugarR2AttachmentPointAtom, AttachmentPointName.R2, assignedAttachmentPointsByMonomer.get(rnaPresetWizardState.sugar), rnaPresetWizardState.sugar.structure);
|
|
31491
|
-
editor.assignConnectionPointAtom(sugarR3AttachmentPointAtom, AttachmentPointName.R3, assignedAttachmentPointsByMonomer.get(rnaPresetWizardState.sugar), rnaPresetWizardState.sugar.structure);
|
|
31492
|
-
editor.assignConnectionPointAtom(phosphateR1AttachmentPointAtom, AttachmentPointName.R1, assignedAttachmentPointsByMonomer.get(rnaPresetWizardState.phosphate), rnaPresetWizardState.phosphate.structure);
|
|
31500
|
+
editor.assignConnectionPointAtom(baseR1AttachmentPointAtom, AttachmentPointName.R1, assignedAttachmentPointsByMonomer.get(rnaPresetWizardState.base), rnaPresetWizardState.base.structure, true);
|
|
31501
|
+
editor.assignConnectionPointAtom(sugarR2AttachmentPointAtom, AttachmentPointName.R2, assignedAttachmentPointsByMonomer.get(rnaPresetWizardState.sugar), rnaPresetWizardState.sugar.structure, true);
|
|
31502
|
+
editor.assignConnectionPointAtom(sugarR3AttachmentPointAtom, AttachmentPointName.R3, assignedAttachmentPointsByMonomer.get(rnaPresetWizardState.sugar), rnaPresetWizardState.sugar.structure, true);
|
|
31503
|
+
editor.assignConnectionPointAtom(phosphateR1AttachmentPointAtom, AttachmentPointName.R1, assignedAttachmentPointsByMonomer.get(rnaPresetWizardState.phosphate), rnaPresetWizardState.phosphate.structure, true);
|
|
31493
31504
|
}
|
|
31494
31505
|
monomersToSave.forEach(function (monomerToSave) {
|
|
31495
31506
|
var atomIdMap = new Map();
|
|
@@ -39883,8 +39894,8 @@ var KetcherBuilder = function () {
|
|
|
39883
39894
|
cleanup = initApp(prevKetcherId, ketcherId, element, appRoot, staticResourcesUrl, {
|
|
39884
39895
|
buttons: buttons || {},
|
|
39885
39896
|
errorHandler: errorHandler || null,
|
|
39886
|
-
version: "3.11.0
|
|
39887
|
-
buildDate: "
|
|
39897
|
+
version: "3.11.0" ,
|
|
39898
|
+
buildDate: "2026-03-04T10:43:31" ,
|
|
39888
39899
|
buildNumber: '',
|
|
39889
39900
|
customButtons: customButtons || []
|
|
39890
39901
|
}, structService, resolve, togglerComponent);
|
|
@@ -40185,7 +40196,7 @@ var ModeControl = function ModeControl(_ref3) {
|
|
|
40185
40196
|
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; }
|
|
40186
40197
|
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; }
|
|
40187
40198
|
var MacromoleculesEditorComponent = lazy(function () {
|
|
40188
|
-
return import('./index.modern-
|
|
40199
|
+
return import('./index.modern-d667fa44.js');
|
|
40189
40200
|
});
|
|
40190
40201
|
var Editor = function Editor(props) {
|
|
40191
40202
|
var _useState = useState(false),
|