ketcher-react 2.24.0-rc.2 → 2.24.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 +38 -35
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +39 -36
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -24,7 +24,7 @@ import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
|
|
|
24
24
|
import _regeneratorRuntime from '@babel/runtime/regenerator';
|
|
25
25
|
import _classCallCheck$2 from '@babel/runtime/helpers/classCallCheck';
|
|
26
26
|
import _createClass$2 from '@babel/runtime/helpers/createClass';
|
|
27
|
-
import { KetSerializer, MolSerializer, KetcherLogger, Ketcher, defaultBondThickness, FormatterFactory, isClipboardAPIAvailable, notifyCopyCut, notifyRequestCompleted, isControlKey, StereLabelStyleType, StereoColoringType, ShowHydrogenLabels, ShowHydrogenLabelNames, SettingsManager, SdfSerializer, KETCHER_SAVED_OPTIONS_KEY, Bond as Bond$2, Elements, AtomList, getAtomType, StereoLabel, isAttachmentBond, Atom as Atom$2, findStereoAtoms, RxnArrowMode, SimpleObjectMode, IMAGE_KEY, SGroup as SGroup$1, Pile,
|
|
27
|
+
import { KetSerializer, MolSerializer, KetcherLogger, Ketcher, defaultBondThickness, FormatterFactory, isClipboardAPIAvailable, notifyCopyCut, notifyRequestCompleted, isControlKey, StereLabelStyleType, StereoColoringType, ShowHydrogenLabels, ShowHydrogenLabelNames, SettingsManager, SdfSerializer, KETCHER_SAVED_OPTIONS_KEY, Bond as Bond$2, Elements, AtomList, getAtomType, StereoLabel, isAttachmentBond, Atom as Atom$2, findStereoAtoms, RxnArrowMode, SimpleObjectMode, IMAGE_KEY, SGroup as SGroup$1, Pile, identifyStructFormat, SupportedFormat, ChemicalMimeType, RenderStruct, Struct, shortcutStr, MonomerMicromolecule, UnresolvedMonomer, FunctionalGroupsProvider, SaltsAndSolventsProvider, KetcherAsyncEvents, ElementColor, generateMenuShortcuts, Vec2, Scale, fromMultipleMove, FunctionalGroup, fromSgroupDeletion, fromFragmentDeletion, mergeMapOfItemsToSet, vectorUtils, fromBondAddition, Action, fromAtomAddition, fromAtomsAttrs, checkOverlapping, fromSeveralSgroupAddition, expandSGroupWithMultipleAttachmentPoint, SgContexts, fromSgroupAction, fromItemsFuse, ReBond, setExpandSGroup, fromBondsAttrs, OperationType, ReStruct, CoordinateTransformation, fromImageResize, fromSimpleObjectResizing, fromArrowResizing, getItemsToFuse, getHoverToFuse, imageReferencePositionToCursor, fromTextDeletion, fromTextUpdating, fromTemplateOnCanvas, fromTemplateOnBondAction, fromTemplateOnAtom, BondAttr, AtomAttr, formatProperties, ketcherProvider, runAsyncAction, getStructStringFromClipboardData, getStructure, initHotKeys, keyNorm, Fragment as Fragment$1, fromRGroupAttachmentPointUpdate, fromOneBondDeletion, bondChangingAction, fromChain, fromStereoFlagUpdate, fromOneAtomDeletion, fromArrowDeletion, fromPlusDeletion, fromSimpleObjectDeletion, fromRGroupAttachmentPointDeletion, fromImageDeletion, notifyItemsToMergeInitializationComplete, fromPaste, RGroup as RGroup$2, fromRGroupFragment, fromUpdateIfThen, fromRGroupAttrs, fromArrowAddition, fromPlusAddition, fromRotate, fromFlip, fromSimpleObjectAddition, fromTextCreation, fromImageMove, fromImageCreation, fromHighlightCreate, fromHighlightClear, provideEditorSettings, fromNewCanvas, Render, fromDescriptorsAlign, fromSgroupAttachmentPointAddition, SGroupAttachmentPoint, fromSgroupAddition, atomGetAttr, genericsList, getAtomCustomQuery, getFormatMimeTypeByFileName, getPropertiesByFormat, StereoFlag, getPropertiesByImgFormat, b64toBlob, Generics, TextCommand, DefaultStructServiceOptions } from 'ketcher-core';
|
|
28
28
|
import * as React from 'react';
|
|
29
29
|
import React__default, { createRef, Component, useRef, useEffect, useLayoutEffect, useState, useMemo, createElement, forwardRef, useCallback, Fragment as Fragment$2, PureComponent, lazy, Suspense } from 'react';
|
|
30
30
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
@@ -491,7 +491,7 @@ function _copy(_x3) {
|
|
|
491
491
|
}
|
|
492
492
|
function _copy2() {
|
|
493
493
|
_copy2 = _asyncToGenerator( _regeneratorRuntime.mark(function _callee3(data) {
|
|
494
|
-
var clipboardItemData;
|
|
494
|
+
var clipboardItemData, clipboardItem, textData;
|
|
495
495
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
496
496
|
while (1) switch (_context3.prev = _context3.next) {
|
|
497
497
|
case 0:
|
|
@@ -503,20 +503,36 @@ function _copy2() {
|
|
|
503
503
|
type: mimeTypeToSet
|
|
504
504
|
}));
|
|
505
505
|
});
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
506
|
+
clipboardItem = new ClipboardItem(clipboardItemData);
|
|
507
|
+
if (!(clipboardItem.presentationStyle && clipboardItem.presentationStyle === 'unspecified')) {
|
|
508
|
+
_context3.next = 11;
|
|
509
|
+
break;
|
|
510
|
+
}
|
|
511
|
+
if (!navigator.clipboard.writeText) {
|
|
512
|
+
_context3.next = 9;
|
|
513
|
+
break;
|
|
514
|
+
}
|
|
515
|
+
textData = data['text/plain'] || JSON.stringify(data);
|
|
516
|
+
_context3.next = 9;
|
|
517
|
+
return navigator.clipboard.writeText(textData);
|
|
518
|
+
case 9:
|
|
519
|
+
_context3.next = 13;
|
|
510
520
|
break;
|
|
511
|
-
case
|
|
512
|
-
_context3.
|
|
521
|
+
case 11:
|
|
522
|
+
_context3.next = 13;
|
|
523
|
+
return navigator.clipboard.write([clipboardItem]);
|
|
524
|
+
case 13:
|
|
525
|
+
_context3.next = 19;
|
|
526
|
+
break;
|
|
527
|
+
case 15:
|
|
528
|
+
_context3.prev = 15;
|
|
513
529
|
_context3.t0 = _context3["catch"](0);
|
|
514
530
|
KetcherLogger.error('cliparea.jsx::copy', _context3.t0);
|
|
515
|
-
case
|
|
531
|
+
case 19:
|
|
516
532
|
case "end":
|
|
517
533
|
return _context3.stop();
|
|
518
534
|
}
|
|
519
|
-
}, _callee3, null, [[0,
|
|
535
|
+
}, _callee3, null, [[0, 15]]);
|
|
520
536
|
}));
|
|
521
537
|
return _copy2.apply(this, arguments);
|
|
522
538
|
}
|
|
@@ -3071,7 +3087,7 @@ var getSelectionFromStruct = function getSelectionFromStruct(struct) {
|
|
|
3071
3087
|
function load(struct, options) {
|
|
3072
3088
|
return function () {
|
|
3073
3089
|
var _ref = _asyncToGenerator( _regeneratorRuntime.mark(function _callee(dispatch, getState) {
|
|
3074
|
-
var state, editor, server, errorHandler, _options2, isPaste, method, otherOptions, parsedStruct, _otherOptions, fragment, hasUnsupportedGroups, hasMoleculeToMonomerConnections, oldStruct,
|
|
3090
|
+
var state, editor, server, errorHandler, _options2, isPaste, method, otherOptions, parsedStruct, _otherOptions, fragment, hasUnsupportedGroups, hasMoleculeToMonomerConnections, oldStruct, isIndigoFunctionCalled;
|
|
3075
3091
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
3076
3092
|
while (1) switch (_context.prev = _context.next) {
|
|
3077
3093
|
case 0:
|
|
@@ -3125,20 +3141,7 @@ function load(struct, options) {
|
|
|
3125
3141
|
}
|
|
3126
3142
|
parsedStruct.findConnectedComponents();
|
|
3127
3143
|
parsedStruct.setImplicitHydrogen();
|
|
3128
|
-
|
|
3129
|
-
parsedStruct.atoms.forEach(function (atom, id) {
|
|
3130
|
-
var _parsedStruct$atomGet;
|
|
3131
|
-
if ((parsedStruct === null || parsedStruct === void 0 || (_parsedStruct$atomGet = parsedStruct.atomGetNeighbors(id)) === null || _parsedStruct$atomGet === void 0 ? void 0 : _parsedStruct$atomGet.length) === 0) {
|
|
3132
|
-
atom.stereoLabel = null;
|
|
3133
|
-
atom.stereoParity = 0;
|
|
3134
|
-
} else {
|
|
3135
|
-
var stereoProp = stereAtomsMap.get(id);
|
|
3136
|
-
if (stereoProp) {
|
|
3137
|
-
atom.stereoLabel = stereoProp.stereoLabel;
|
|
3138
|
-
atom.stereoParity = stereoProp.stereoParity;
|
|
3139
|
-
}
|
|
3140
|
-
}
|
|
3141
|
-
});
|
|
3144
|
+
parsedStruct.setStereoLabelsToAtoms();
|
|
3142
3145
|
parsedStruct.markFragments();
|
|
3143
3146
|
if (fragment) {
|
|
3144
3147
|
if (parsedStruct.isBlank()) {
|
|
@@ -3165,23 +3168,23 @@ function load(struct, options) {
|
|
|
3165
3168
|
dispatch({
|
|
3166
3169
|
type: 'MODAL_CLOSE'
|
|
3167
3170
|
});
|
|
3168
|
-
_context.next =
|
|
3171
|
+
_context.next = 40;
|
|
3169
3172
|
break;
|
|
3170
|
-
case
|
|
3171
|
-
_context.prev =
|
|
3173
|
+
case 35:
|
|
3174
|
+
_context.prev = 35;
|
|
3172
3175
|
_context.t0 = _context["catch"](8);
|
|
3173
3176
|
KetcherLogger.error('shared.ts::load', _context.t0);
|
|
3174
3177
|
dispatch(setAnalyzingFile(false));
|
|
3175
3178
|
_context.t0 && errorHandler && errorHandler(_context.t0.message);
|
|
3176
|
-
case
|
|
3177
|
-
_context.prev =
|
|
3179
|
+
case 40:
|
|
3180
|
+
_context.prev = 40;
|
|
3178
3181
|
notifyRequestCompleted();
|
|
3179
|
-
return _context.finish(
|
|
3180
|
-
case
|
|
3182
|
+
return _context.finish(40);
|
|
3183
|
+
case 43:
|
|
3181
3184
|
case "end":
|
|
3182
3185
|
return _context.stop();
|
|
3183
3186
|
}
|
|
3184
|
-
}, _callee, null, [[8,
|
|
3187
|
+
}, _callee, null, [[8, 35, 40, 43]]);
|
|
3185
3188
|
}));
|
|
3186
3189
|
return function (_x, _x2) {
|
|
3187
3190
|
return _ref.apply(this, arguments);
|
|
@@ -3605,7 +3608,7 @@ var zoom = {
|
|
|
3605
3608
|
|
|
3606
3609
|
var openHelpLink = function openHelpLink() {
|
|
3607
3610
|
var _window$open;
|
|
3608
|
-
return (_window$open = window.open("https://github.com/epam/ketcher/blob/".concat("v2.24.0
|
|
3611
|
+
return (_window$open = window.open("https://github.com/epam/ketcher/blob/".concat("v2.24.0\n", "/documentation/help.md#ketcher-overview"))) === null || _window$open === void 0 ? void 0 : _window$open.focus();
|
|
3609
3612
|
};
|
|
3610
3613
|
var help = {
|
|
3611
3614
|
help: {
|
|
@@ -33433,8 +33436,8 @@ var KetcherBuilder = function () {
|
|
|
33433
33436
|
cleanup = initApp(element, appRoot, staticResourcesUrl, {
|
|
33434
33437
|
buttons: buttons || {},
|
|
33435
33438
|
errorHandler: errorHandler || null,
|
|
33436
|
-
version: "2.24.0
|
|
33437
|
-
buildDate: "2024-
|
|
33439
|
+
version: "2.24.0" ,
|
|
33440
|
+
buildDate: "2024-09-10T00:57:17" ,
|
|
33438
33441
|
buildNumber: ''
|
|
33439
33442
|
}, structService, resolve, togglerComponent);
|
|
33440
33443
|
});
|