ketcher-react 2.23.0-rc.3 → 2.23.0-rc.5
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, 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, 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, fromSimpleObjectResizing, fromArrowResizing, getItemsToFuse, getHoverToFuse, fromTextDeletion, fromTextUpdating, CoordinateTransformation, 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, notifyItemsToMergeInitializationComplete, fromPaste, RGroup as RGroup$2, fromRGroupFragment, fromUpdateIfThen, fromRGroupAttrs, fromArrowAddition, fromPlusAddition, fromRotate, fromFlip, fromSimpleObjectAddition, fromTextCreation, 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';
|
|
@@ -489,7 +489,7 @@ function _copy(_x3) {
|
|
|
489
489
|
}
|
|
490
490
|
function _copy2() {
|
|
491
491
|
_copy2 = _asyncToGenerator( _regeneratorRuntime.mark(function _callee3(data) {
|
|
492
|
-
var clipboardItemData;
|
|
492
|
+
var clipboardItemData, clipboardItem, textData;
|
|
493
493
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
494
494
|
while (1) switch (_context3.prev = _context3.next) {
|
|
495
495
|
case 0:
|
|
@@ -501,20 +501,36 @@ function _copy2() {
|
|
|
501
501
|
type: mimeTypeToSet
|
|
502
502
|
}));
|
|
503
503
|
});
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
504
|
+
clipboardItem = new ClipboardItem(clipboardItemData);
|
|
505
|
+
if (!(clipboardItem.presentationStyle && clipboardItem.presentationStyle === 'unspecified')) {
|
|
506
|
+
_context3.next = 11;
|
|
507
|
+
break;
|
|
508
|
+
}
|
|
509
|
+
if (!navigator.clipboard.writeText) {
|
|
510
|
+
_context3.next = 9;
|
|
511
|
+
break;
|
|
512
|
+
}
|
|
513
|
+
textData = data['text/plain'] || JSON.stringify(data);
|
|
514
|
+
_context3.next = 9;
|
|
515
|
+
return navigator.clipboard.writeText(textData);
|
|
516
|
+
case 9:
|
|
517
|
+
_context3.next = 13;
|
|
508
518
|
break;
|
|
509
|
-
case
|
|
510
|
-
_context3.
|
|
519
|
+
case 11:
|
|
520
|
+
_context3.next = 13;
|
|
521
|
+
return navigator.clipboard.write([clipboardItem]);
|
|
522
|
+
case 13:
|
|
523
|
+
_context3.next = 19;
|
|
524
|
+
break;
|
|
525
|
+
case 15:
|
|
526
|
+
_context3.prev = 15;
|
|
511
527
|
_context3.t0 = _context3["catch"](0);
|
|
512
528
|
KetcherLogger.error('cliparea.jsx::copy', _context3.t0);
|
|
513
|
-
case
|
|
529
|
+
case 19:
|
|
514
530
|
case "end":
|
|
515
531
|
return _context3.stop();
|
|
516
532
|
}
|
|
517
|
-
}, _callee3, null, [[0,
|
|
533
|
+
}, _callee3, null, [[0, 15]]);
|
|
518
534
|
}));
|
|
519
535
|
return _copy2.apply(this, arguments);
|
|
520
536
|
}
|
|
@@ -3061,7 +3077,7 @@ var getSelectionFromStruct = function getSelectionFromStruct(struct) {
|
|
|
3061
3077
|
function load(struct, options) {
|
|
3062
3078
|
return function () {
|
|
3063
3079
|
var _ref = _asyncToGenerator( _regeneratorRuntime.mark(function _callee(dispatch, getState) {
|
|
3064
|
-
var state, editor, server, errorHandler, _options2, isPaste, method, otherOptions, parsedStruct, _otherOptions, fragment, hasUnsupportedGroups, hasMoleculeToMonomerConnections, oldStruct,
|
|
3080
|
+
var state, editor, server, errorHandler, _options2, isPaste, method, otherOptions, parsedStruct, _otherOptions, fragment, hasUnsupportedGroups, hasMoleculeToMonomerConnections, oldStruct, isIndigoFunctionCalled;
|
|
3065
3081
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
3066
3082
|
while (1) switch (_context.prev = _context.next) {
|
|
3067
3083
|
case 0:
|
|
@@ -3115,20 +3131,7 @@ function load(struct, options) {
|
|
|
3115
3131
|
}
|
|
3116
3132
|
parsedStruct.findConnectedComponents();
|
|
3117
3133
|
parsedStruct.setImplicitHydrogen();
|
|
3118
|
-
|
|
3119
|
-
parsedStruct.atoms.forEach(function (atom, id) {
|
|
3120
|
-
var _parsedStruct$atomGet;
|
|
3121
|
-
if ((parsedStruct === null || parsedStruct === void 0 || (_parsedStruct$atomGet = parsedStruct.atomGetNeighbors(id)) === null || _parsedStruct$atomGet === void 0 ? void 0 : _parsedStruct$atomGet.length) === 0) {
|
|
3122
|
-
atom.stereoLabel = null;
|
|
3123
|
-
atom.stereoParity = 0;
|
|
3124
|
-
} else {
|
|
3125
|
-
var stereoProp = stereAtomsMap.get(id);
|
|
3126
|
-
if (stereoProp) {
|
|
3127
|
-
atom.stereoLabel = stereoProp.stereoLabel;
|
|
3128
|
-
atom.stereoParity = stereoProp.stereoParity;
|
|
3129
|
-
}
|
|
3130
|
-
}
|
|
3131
|
-
});
|
|
3134
|
+
parsedStruct.setStereoLabelsToAtoms();
|
|
3132
3135
|
parsedStruct.markFragments();
|
|
3133
3136
|
if (fragment) {
|
|
3134
3137
|
if (parsedStruct.isBlank()) {
|
|
@@ -3155,23 +3158,23 @@ function load(struct, options) {
|
|
|
3155
3158
|
dispatch({
|
|
3156
3159
|
type: 'MODAL_CLOSE'
|
|
3157
3160
|
});
|
|
3158
|
-
_context.next =
|
|
3161
|
+
_context.next = 40;
|
|
3159
3162
|
break;
|
|
3160
|
-
case
|
|
3161
|
-
_context.prev =
|
|
3163
|
+
case 35:
|
|
3164
|
+
_context.prev = 35;
|
|
3162
3165
|
_context.t0 = _context["catch"](8);
|
|
3163
3166
|
KetcherLogger.error('shared.ts::load', _context.t0);
|
|
3164
3167
|
dispatch(setAnalyzingFile(false));
|
|
3165
3168
|
_context.t0 && errorHandler && errorHandler(_context.t0.message);
|
|
3166
|
-
case
|
|
3167
|
-
_context.prev =
|
|
3169
|
+
case 40:
|
|
3170
|
+
_context.prev = 40;
|
|
3168
3171
|
notifyRequestCompleted();
|
|
3169
|
-
return _context.finish(
|
|
3170
|
-
case
|
|
3172
|
+
return _context.finish(40);
|
|
3173
|
+
case 43:
|
|
3171
3174
|
case "end":
|
|
3172
3175
|
return _context.stop();
|
|
3173
3176
|
}
|
|
3174
|
-
}, _callee, null, [[8,
|
|
3177
|
+
}, _callee, null, [[8, 35, 40, 43]]);
|
|
3175
3178
|
}));
|
|
3176
3179
|
return function (_x, _x2) {
|
|
3177
3180
|
return _ref.apply(this, arguments);
|
|
@@ -3595,7 +3598,7 @@ var zoom = {
|
|
|
3595
3598
|
|
|
3596
3599
|
var openHelpLink = function openHelpLink() {
|
|
3597
3600
|
var _window$open;
|
|
3598
|
-
return (_window$open = window.open("https://github.com/epam/ketcher/blob/".concat("v2.23.0-rc.
|
|
3601
|
+
return (_window$open = window.open("https://github.com/epam/ketcher/blob/".concat("v2.23.0-rc.5\n", "/documentation/help.md#ketcher-overview"))) === null || _window$open === void 0 ? void 0 : _window$open.focus();
|
|
3599
3602
|
};
|
|
3600
3603
|
var help = {
|
|
3601
3604
|
help: {
|
|
@@ -33094,8 +33097,8 @@ var KetcherBuilder = function () {
|
|
|
33094
33097
|
initApp(element, appRoot, staticResourcesUrl, {
|
|
33095
33098
|
buttons: buttons || {},
|
|
33096
33099
|
errorHandler: errorHandler || null,
|
|
33097
|
-
version: "2.23.0-rc.
|
|
33098
|
-
buildDate: "2024-
|
|
33100
|
+
version: "2.23.0-rc.5" ,
|
|
33101
|
+
buildDate: "2024-08-22T16:03:01" ,
|
|
33099
33102
|
buildNumber: ''
|
|
33100
33103
|
}, structService, resolve, togglerComponent);
|
|
33101
33104
|
});
|