ketcher-react 2.18.0-rc.3 → 2.18.0-rc.4
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/components/Accordion/styles.d.ts +3 -3
- package/dist/components/Buttons/Button/styles.d.ts +1 -1
- package/dist/components/Buttons/IconButton/styles.d.ts +1 -1
- package/dist/components/Input/styles.d.ts +1 -1
- package/dist/components/StructRender/styles.d.ts +1 -1
- package/dist/index.js +200 -107
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +210 -117
- package/dist/index.modern.js.map +1 -1
- package/dist/script/ui/state/shared.d.ts +1 -0
- package/dist/script/ui/views/modal/components/document/Save/Save.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -34,7 +34,7 @@ import _inherits$2 from '@babel/runtime/helpers/inherits';
|
|
|
34
34
|
import clsx from 'clsx';
|
|
35
35
|
import _typeof$3 from '@babel/runtime/helpers/typeof';
|
|
36
36
|
import Ajv from 'ajv';
|
|
37
|
-
import { pick, range, capitalize, without, omit, findLastIndex, findIndex, isEmpty, pickBy, isEqual, escapeRegExp, flow, filter, reduce, throttle, xor, debounce, upperFirst } from 'lodash/fp';
|
|
37
|
+
import { pick, range as range$1, capitalize, without, omit, findLastIndex, findIndex, isEmpty, pickBy, isEqual, escapeRegExp, flow, filter, reduce, throttle, xor, debounce, upperFirst } from 'lodash/fp';
|
|
38
38
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
39
39
|
import styled from '@emotion/styled';
|
|
40
40
|
import _taggedTemplateLiteral from '@babel/runtime/helpers/taggedTemplateLiteral';
|
|
@@ -43,7 +43,7 @@ import _slicedToArray$1 from '@babel/runtime/helpers/slicedToArray';
|
|
|
43
43
|
import ReactDOM from 'react-dom';
|
|
44
44
|
import { connect, useDispatch, useSelector, Provider } from 'react-redux';
|
|
45
45
|
import { combineReducers, createStore as createStore$1, applyMiddleware } from 'redux';
|
|
46
|
-
import _, { throttle as throttle$1, intersection, difference, debounce as debounce$1, cloneDeep, isEqual as isEqual$1, capitalize as capitalize$1, range as range$
|
|
46
|
+
import _, { throttle as throttle$1, intersection, difference, debounce as debounce$1, cloneDeep, isEqual as isEqual$1, capitalize as capitalize$1, range as range$2, isEmpty as isEmpty$1, uniqBy } from 'lodash';
|
|
47
47
|
import * as CFB from 'cfb';
|
|
48
48
|
import require$$0$2 from 'util';
|
|
49
49
|
import 'redux-logger';
|
|
@@ -629,8 +629,8 @@ function exec(action) {
|
|
|
629
629
|
return enabled;
|
|
630
630
|
}
|
|
631
631
|
|
|
632
|
-
function ownKeys$
|
|
633
|
-
function _objectSpread$
|
|
632
|
+
function ownKeys$1o(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; }
|
|
633
|
+
function _objectSpread$1o(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1o(Object(t), !0).forEach(function (r) { _defineProperty$1(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1o(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
634
634
|
var editor = {
|
|
635
635
|
resetToSelect: {
|
|
636
636
|
title: 'Reset to Select Tool',
|
|
@@ -885,7 +885,7 @@ var optionsSchema = {
|
|
|
885
885
|
title: 'Settings',
|
|
886
886
|
type: 'object',
|
|
887
887
|
required: [],
|
|
888
|
-
properties: _objectSpread$
|
|
888
|
+
properties: _objectSpread$1o(_objectSpread$1o(_objectSpread$1o(_objectSpread$1o(_objectSpread$1o({}, editor), render), server), debug), miew)
|
|
889
889
|
};
|
|
890
890
|
function getDefaultOptions() {
|
|
891
891
|
if (!optionsSchema.properties) return {};
|
|
@@ -1068,8 +1068,8 @@ function prefetchRender(tmpls, baseUrl, cacheEl) {
|
|
|
1068
1068
|
});
|
|
1069
1069
|
}
|
|
1070
1070
|
|
|
1071
|
-
function ownKeys$
|
|
1072
|
-
function _objectSpread$
|
|
1071
|
+
function ownKeys$1n(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; }
|
|
1072
|
+
function _objectSpread$1n(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1n(Object(t), !0).forEach(function (r) { _defineProperty$1(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1n(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1073
1073
|
var initOptionsState = {
|
|
1074
1074
|
app: {
|
|
1075
1075
|
server: false,
|
|
@@ -1167,29 +1167,29 @@ function optionsReducer() {
|
|
|
1167
1167
|
var action = arguments.length > 1 ? arguments[1] : undefined;
|
|
1168
1168
|
var type = action.type,
|
|
1169
1169
|
data = action.data;
|
|
1170
|
-
if (type === 'APP_OPTIONS') return _objectSpread$
|
|
1171
|
-
app: _objectSpread$
|
|
1170
|
+
if (type === 'APP_OPTIONS') return _objectSpread$1n(_objectSpread$1n({}, state), {}, {
|
|
1171
|
+
app: _objectSpread$1n(_objectSpread$1n({}, state.app), data)
|
|
1172
1172
|
});
|
|
1173
1173
|
if (type === 'SAVE_SETTINGS') {
|
|
1174
|
-
return _objectSpread$
|
|
1175
|
-
settings: _objectSpread$
|
|
1174
|
+
return _objectSpread$1n(_objectSpread$1n({}, state), {}, {
|
|
1175
|
+
settings: _objectSpread$1n(_objectSpread$1n({}, state.settings), data)
|
|
1176
1176
|
});
|
|
1177
1177
|
}
|
|
1178
|
-
if (type === 'SAVE_CHECK_OPTS') return _objectSpread$
|
|
1178
|
+
if (type === 'SAVE_CHECK_OPTS') return _objectSpread$1n(_objectSpread$1n({}, state), {}, {
|
|
1179
1179
|
check: data
|
|
1180
1180
|
});
|
|
1181
|
-
if (type === 'CHANGE_ANALYSE') return _objectSpread$
|
|
1182
|
-
analyse: _objectSpread$
|
|
1181
|
+
if (type === 'CHANGE_ANALYSE') return _objectSpread$1n(_objectSpread$1n({}, state), {}, {
|
|
1182
|
+
analyse: _objectSpread$1n(_objectSpread$1n(_objectSpread$1n({}, state.analyse), data), {}, {
|
|
1183
1183
|
loading: false
|
|
1184
1184
|
})
|
|
1185
1185
|
});
|
|
1186
|
-
if (type === 'ANALYSE_LOADING') return _objectSpread$
|
|
1187
|
-
analyse: _objectSpread$
|
|
1186
|
+
if (type === 'ANALYSE_LOADING') return _objectSpread$1n(_objectSpread$1n({}, state), {}, {
|
|
1187
|
+
analyse: _objectSpread$1n(_objectSpread$1n({}, state.analyse), {}, {
|
|
1188
1188
|
loading: true
|
|
1189
1189
|
})
|
|
1190
1190
|
});
|
|
1191
|
-
if (recognizeActions.includes(type)) return _objectSpread$
|
|
1192
|
-
recognize: _objectSpread$
|
|
1191
|
+
if (recognizeActions.includes(type)) return _objectSpread$1n(_objectSpread$1n({}, state), {}, {
|
|
1192
|
+
recognize: _objectSpread$1n(_objectSpread$1n({}, state.recognize), data)
|
|
1193
1193
|
});
|
|
1194
1194
|
return state;
|
|
1195
1195
|
}
|
|
@@ -1493,8 +1493,8 @@ function getSdataDefault() {
|
|
|
1493
1493
|
return schema[context][fieldName] ? schema[context][fieldName].properties.fieldValue["default"] : '';
|
|
1494
1494
|
}
|
|
1495
1495
|
|
|
1496
|
-
function ownKeys$
|
|
1497
|
-
function _objectSpread$
|
|
1496
|
+
function ownKeys$1m(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; }
|
|
1497
|
+
function _objectSpread$1m(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1m(Object(t), !0).forEach(function (r) { _defineProperty$1(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1m(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1498
1498
|
var initSdata = function initSdata(schema) {
|
|
1499
1499
|
var isCustomShema = schema.key === 'Custom';
|
|
1500
1500
|
var context = isCustomShema ? getSdataDefault(sdataCustomSchema, 'context') : getSdataDefault(sdataSchema);
|
|
@@ -1532,7 +1532,7 @@ var onContextChange = function onContextChange(state, payload) {
|
|
|
1532
1532
|
var fValue = fieldValue;
|
|
1533
1533
|
if (fValue === state.result.fieldValue) fValue = getSdataDefault(sdataCustomSchema, 'fieldValue');
|
|
1534
1534
|
return {
|
|
1535
|
-
result: _objectSpread$
|
|
1535
|
+
result: _objectSpread$1m(_objectSpread$1m({}, payload), {}, {
|
|
1536
1536
|
context: context,
|
|
1537
1537
|
fieldName: fieldName,
|
|
1538
1538
|
fieldValue: fValue
|
|
@@ -1546,7 +1546,7 @@ var onFieldNameChange = function onFieldNameChange(state, payload) {
|
|
|
1546
1546
|
if (sdataSchema[context][fieldName]) fieldValue = getSdataDefault(sdataSchema, context, fieldName);
|
|
1547
1547
|
if (fieldValue === state.result.fieldValue && sdataSchema[context][state.result.fieldName]) fieldValue = '';
|
|
1548
1548
|
return {
|
|
1549
|
-
result: _objectSpread$
|
|
1549
|
+
result: _objectSpread$1m(_objectSpread$1m({}, payload), {}, {
|
|
1550
1550
|
fieldName: fieldName,
|
|
1551
1551
|
fieldValue: fieldValue
|
|
1552
1552
|
})
|
|
@@ -1554,7 +1554,7 @@ var onFieldNameChange = function onFieldNameChange(state, payload) {
|
|
|
1554
1554
|
};
|
|
1555
1555
|
function sdataReducer(state, action) {
|
|
1556
1556
|
if (action.data.result.init) {
|
|
1557
|
-
return correctErrors(_objectSpread$
|
|
1557
|
+
return correctErrors(_objectSpread$1m(_objectSpread$1m({}, state), {}, {
|
|
1558
1558
|
result: Object.assign({}, state.result, action.data.result)
|
|
1559
1559
|
}), action.data);
|
|
1560
1560
|
}
|
|
@@ -1562,7 +1562,7 @@ function sdataReducer(state, action) {
|
|
|
1562
1562
|
var actionFieldName = action.data.result.fieldName;
|
|
1563
1563
|
var newstate = null;
|
|
1564
1564
|
if (actionContext !== state.result.context) newstate = onContextChange(state, action.data.result);else if (actionFieldName !== state.result.fieldName) newstate = onFieldNameChange(state, action.data.result);
|
|
1565
|
-
newstate = newstate || _objectSpread$
|
|
1565
|
+
newstate = newstate || _objectSpread$1m(_objectSpread$1m({}, state), {}, {
|
|
1566
1566
|
result: Object.assign({}, state.result, action.data.result)
|
|
1567
1567
|
});
|
|
1568
1568
|
return correctErrors(newstate, action.data);
|
|
@@ -1702,8 +1702,8 @@ function formReducer(state, action) {
|
|
|
1702
1702
|
var INDIGO_VERIFICATION = 'INDIGO_VERIFICATION';
|
|
1703
1703
|
var ANALYZING_FILE = 'ANALYZING_FILE';
|
|
1704
1704
|
|
|
1705
|
-
function ownKeys$
|
|
1706
|
-
function _objectSpread$
|
|
1705
|
+
function ownKeys$1l(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; }
|
|
1706
|
+
function _objectSpread$1l(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1l(Object(t), !0).forEach(function (r) { _defineProperty$1(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1l(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1707
1707
|
function indigoVerification(data) {
|
|
1708
1708
|
return {
|
|
1709
1709
|
type: INDIGO_VERIFICATION,
|
|
@@ -1728,13 +1728,13 @@ function requestReducer () {
|
|
|
1728
1728
|
switch (type) {
|
|
1729
1729
|
case INDIGO_VERIFICATION:
|
|
1730
1730
|
{
|
|
1731
|
-
return _objectSpread$
|
|
1731
|
+
return _objectSpread$1l(_objectSpread$1l({}, state), {}, {
|
|
1732
1732
|
indigoVerification: data
|
|
1733
1733
|
});
|
|
1734
1734
|
}
|
|
1735
1735
|
case ANALYZING_FILE:
|
|
1736
1736
|
{
|
|
1737
|
-
return _objectSpread$
|
|
1737
|
+
return _objectSpread$1l(_objectSpread$1l({}, state), {}, {
|
|
1738
1738
|
isAnalyzingFile: data
|
|
1739
1739
|
});
|
|
1740
1740
|
}
|
|
@@ -1752,8 +1752,8 @@ var supportedSGroupTypes = {
|
|
|
1752
1752
|
queryComponent: 'queryComponent'
|
|
1753
1753
|
};
|
|
1754
1754
|
|
|
1755
|
-
function ownKeys$
|
|
1756
|
-
function _objectSpread$
|
|
1755
|
+
function ownKeys$1k(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; }
|
|
1756
|
+
function _objectSpread$1k(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1k(Object(t), !0).forEach(function (r) { _defineProperty$1(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1k(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1757
1757
|
var atom = {
|
|
1758
1758
|
title: 'Atom',
|
|
1759
1759
|
type: 'object',
|
|
@@ -1910,8 +1910,8 @@ var rgroupSchema = {
|
|
|
1910
1910
|
type: 'array',
|
|
1911
1911
|
items: {
|
|
1912
1912
|
type: 'string',
|
|
1913
|
-
"enum": range(1, 33),
|
|
1914
|
-
enumNames: range(1, 33).map(function (item) {
|
|
1913
|
+
"enum": range$1(1, 33),
|
|
1914
|
+
enumNames: range$1(1, 33).map(function (item) {
|
|
1915
1915
|
return 'R' + item;
|
|
1916
1916
|
})
|
|
1917
1917
|
}
|
|
@@ -1985,7 +1985,7 @@ var sgroup = {
|
|
|
1985
1985
|
title: 'SGroup',
|
|
1986
1986
|
type: 'object',
|
|
1987
1987
|
required: ['type'],
|
|
1988
|
-
oneOf: [_objectSpread$
|
|
1988
|
+
oneOf: [_objectSpread$1k({}, sdataCustomSchema), {
|
|
1989
1989
|
key: 'MUL',
|
|
1990
1990
|
title: 'Multiple group',
|
|
1991
1991
|
type: 'object',
|
|
@@ -2092,12 +2092,12 @@ var attachSchema = {
|
|
|
2092
2092
|
|
|
2093
2093
|
var _excluded$z = ["aromaticity", "ringMembership", "ringSize", "connectivity", "chirality", "customQuery"],
|
|
2094
2094
|
_excluded2$7 = ["type", "radiobuttons"];
|
|
2095
|
-
function ownKeys$
|
|
2096
|
-
function _objectSpread$
|
|
2095
|
+
function ownKeys$1j(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; }
|
|
2096
|
+
function _objectSpread$1j(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1j(Object(t), !0).forEach(function (r) { _defineProperty$1(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1j(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
2097
2097
|
var DefaultStereoGroupNumber = 1;
|
|
2098
2098
|
function fromElement(selem) {
|
|
2099
2099
|
if (selem.label === 'R#') {
|
|
2100
|
-
return _objectSpread$
|
|
2100
|
+
return _objectSpread$1j({
|
|
2101
2101
|
type: 'rlabel',
|
|
2102
2102
|
values: fromRlabel(selem.rglabel)
|
|
2103
2103
|
}, selem);
|
|
@@ -2354,7 +2354,7 @@ function fromBond(sbond) {
|
|
|
2354
2354
|
}
|
|
2355
2355
|
function toBond(bond) {
|
|
2356
2356
|
var isCustomQuery = bond.customQuery !== '';
|
|
2357
|
-
return _objectSpread$
|
|
2357
|
+
return _objectSpread$1j({
|
|
2358
2358
|
topology: bond.topology,
|
|
2359
2359
|
reactingCenterStatus: bond.center,
|
|
2360
2360
|
customQuery: !isCustomQuery ? null : bond.customQuery
|
|
@@ -2450,7 +2450,7 @@ function toSgroup(sgroup) {
|
|
|
2450
2450
|
var type = sgroup.type,
|
|
2451
2451
|
radiobuttons = sgroup.radiobuttons,
|
|
2452
2452
|
props = _objectWithoutProperties(sgroup, _excluded2$7);
|
|
2453
|
-
var attrs = _objectSpread$
|
|
2453
|
+
var attrs = _objectSpread$1j({}, props);
|
|
2454
2454
|
var absolute = 'absolute';
|
|
2455
2455
|
var attached = 'attached';
|
|
2456
2456
|
switch (radiobuttons) {
|
|
@@ -3005,8 +3005,8 @@ var tools = typeSchema$1["enum"].reduce(function (res, type, i) {
|
|
|
3005
3005
|
|
|
3006
3006
|
var _excluded$y = ["rescale", "fragment"],
|
|
3007
3007
|
_excluded2$6 = ["isPaste", "method"];
|
|
3008
|
-
function ownKeys$
|
|
3009
|
-
function _objectSpread$
|
|
3008
|
+
function ownKeys$1i(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; }
|
|
3009
|
+
function _objectSpread$1i(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1i(Object(t), !0).forEach(function (r) { _defineProperty$1(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1i(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
3010
3010
|
function onAction(action) {
|
|
3011
3011
|
if (action && action.dialog) {
|
|
3012
3012
|
return {
|
|
@@ -3048,6 +3048,21 @@ function removeStructAction() {
|
|
|
3048
3048
|
var savedSelectedTool = SettingsManager.selectionTool;
|
|
3049
3049
|
return onAction(savedSelectedTool || tools['select-rectangle'].action);
|
|
3050
3050
|
}
|
|
3051
|
+
var getSelectionFromStruct = function getSelectionFromStruct(struct) {
|
|
3052
|
+
var selection = {};
|
|
3053
|
+
['atoms', 'bonds', 'enhancedFlags', 'rxnPluses', 'rxnArrows', 'texts', 'rgroupAttachmentPoints'].forEach(function (selectionEntity) {
|
|
3054
|
+
if (struct && struct[selectionEntity]) {
|
|
3055
|
+
var selected = [];
|
|
3056
|
+
struct[selectionEntity].forEach(function (value, key) {
|
|
3057
|
+
if (typeof value.getInitiallySelected === 'function' && value.getInitiallySelected()) {
|
|
3058
|
+
selected.push(key);
|
|
3059
|
+
}
|
|
3060
|
+
});
|
|
3061
|
+
selection[selectionEntity] = selected;
|
|
3062
|
+
}
|
|
3063
|
+
});
|
|
3064
|
+
return selection;
|
|
3065
|
+
};
|
|
3051
3066
|
function load(struct, options) {
|
|
3052
3067
|
return function () {
|
|
3053
3068
|
var _ref = _asyncToGenerator( _regeneratorRuntime.mark(function _callee(dispatch, getState) {
|
|
@@ -3061,7 +3076,7 @@ function load(struct, options) {
|
|
|
3061
3076
|
errorHandler = editor.errorHandler;
|
|
3062
3077
|
options = options || {};
|
|
3063
3078
|
_options2 = options, isPaste = _options2.isPaste, method = _options2.method, otherOptions = _objectWithoutProperties(_options2, _excluded2$6);
|
|
3064
|
-
otherOptions = _objectSpread$
|
|
3079
|
+
otherOptions = _objectSpread$1i(_objectSpread$1i({}, otherOptions), {}, {
|
|
3065
3080
|
'dearomatize-on-load': editor.options()['dearomatize-on-load'],
|
|
3066
3081
|
ignoreChiralFlag: editor.options().ignoreChiralFlag
|
|
3067
3082
|
});
|
|
@@ -3132,27 +3147,31 @@ function load(struct, options) {
|
|
|
3132
3147
|
if (!isPaste && !isIndigoFunctionCalled) {
|
|
3133
3148
|
editor.centerStruct();
|
|
3134
3149
|
}
|
|
3150
|
+
if (!fragment) {
|
|
3151
|
+
editor.selection(getSelectionFromStruct(editor.struct()));
|
|
3152
|
+
}
|
|
3153
|
+
editor.struct().disableInitiallySelected();
|
|
3135
3154
|
dispatch(setAnalyzingFile(false));
|
|
3136
3155
|
dispatch({
|
|
3137
3156
|
type: 'MODAL_CLOSE'
|
|
3138
3157
|
});
|
|
3139
|
-
_context.next =
|
|
3158
|
+
_context.next = 40;
|
|
3140
3159
|
break;
|
|
3141
|
-
case
|
|
3142
|
-
_context.prev =
|
|
3160
|
+
case 35:
|
|
3161
|
+
_context.prev = 35;
|
|
3143
3162
|
_context.t0 = _context["catch"](8);
|
|
3144
3163
|
KetcherLogger.error('shared.ts::load', _context.t0);
|
|
3145
3164
|
dispatch(setAnalyzingFile(false));
|
|
3146
3165
|
_context.t0 && errorHandler && errorHandler(_context.t0.message);
|
|
3147
|
-
case
|
|
3148
|
-
_context.prev =
|
|
3166
|
+
case 40:
|
|
3167
|
+
_context.prev = 40;
|
|
3149
3168
|
notifyRequestCompleted();
|
|
3150
|
-
return _context.finish(
|
|
3151
|
-
case
|
|
3169
|
+
return _context.finish(40);
|
|
3170
|
+
case 43:
|
|
3152
3171
|
case "end":
|
|
3153
3172
|
return _context.stop();
|
|
3154
3173
|
}
|
|
3155
|
-
}, _callee, null, [[8,
|
|
3174
|
+
}, _callee, null, [[8, 35, 40, 43]]);
|
|
3156
3175
|
}));
|
|
3157
3176
|
return function (_x, _x2) {
|
|
3158
3177
|
return _ref.apply(this, arguments);
|
|
@@ -3182,6 +3201,8 @@ function openInfoModalWithCustomMessage(message) {
|
|
|
3182
3201
|
};
|
|
3183
3202
|
}
|
|
3184
3203
|
|
|
3204
|
+
function ownKeys$1h(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; }
|
|
3205
|
+
function _objectSpread$1h(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1h(Object(t), !0).forEach(function (r) { _defineProperty$1(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1h(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
3185
3206
|
function checkServer() {
|
|
3186
3207
|
return function (dispatch, getState) {
|
|
3187
3208
|
var _getState = getState(),
|
|
@@ -3305,20 +3326,30 @@ function resetStereoFlagsPosition(struct) {
|
|
|
3305
3326
|
function serverCall(editor, server, method, options, struct) {
|
|
3306
3327
|
var selection = editor.selection();
|
|
3307
3328
|
var selectedAtoms = [];
|
|
3329
|
+
var selectedBonds = [];
|
|
3308
3330
|
var aidMap = new Map();
|
|
3309
|
-
var
|
|
3331
|
+
var bidMap = new Map();
|
|
3332
|
+
var currentStruct = (struct || editor.struct()).clone(null, null, false, aidMap, null, null, null, bidMap);
|
|
3333
|
+
var expSel = editor.explicitSelected();
|
|
3310
3334
|
if (selection) {
|
|
3311
|
-
selectedAtoms = (selection.atoms ? selection.atoms :
|
|
3335
|
+
selectedAtoms = (selection.atoms ? selection.atoms : expSel.atoms).map(function (aid) {
|
|
3312
3336
|
return aidMap.get(aid);
|
|
3313
3337
|
});
|
|
3338
|
+
selectedBonds = (selection.bonds ? selection.bonds : expSel.bonds).map(function (bid) {
|
|
3339
|
+
return bidMap.get(bid);
|
|
3340
|
+
});
|
|
3314
3341
|
}
|
|
3315
3342
|
if (method === 'layout') {
|
|
3316
3343
|
resetStereoFlagsPosition(currentStruct);
|
|
3317
3344
|
}
|
|
3318
3345
|
var ketSerializer = new KetSerializer();
|
|
3346
|
+
var serializedStruct = ketSerializer.serialize(currentStruct, undefined, _objectSpread$1h(_objectSpread$1h({}, selection), {}, {
|
|
3347
|
+
atoms: selectedAtoms,
|
|
3348
|
+
bonds: selectedBonds
|
|
3349
|
+
}));
|
|
3319
3350
|
return server.then(function () {
|
|
3320
3351
|
return server[method](Object.assign({
|
|
3321
|
-
struct:
|
|
3352
|
+
struct: serializedStruct
|
|
3322
3353
|
}, method !== 'calculate' && method !== 'check' ? {
|
|
3323
3354
|
output_format: ChemicalMimeType.KET
|
|
3324
3355
|
} : null, selectedAtoms && selectedAtoms.length > 0 ? {
|
|
@@ -3564,7 +3595,7 @@ var zoom = {
|
|
|
3564
3595
|
|
|
3565
3596
|
var openHelpLink = function openHelpLink() {
|
|
3566
3597
|
var _window$open;
|
|
3567
|
-
return (_window$open = window.open("https://github.com/epam/ketcher/blob/".concat("v2.18.0-rc.
|
|
3598
|
+
return (_window$open = window.open("https://github.com/epam/ketcher/blob/".concat("v2.18.0-rc.4\n", "/documentation/help.md#ketcher-overview"))) === null || _window$open === void 0 ? void 0 : _window$open.focus();
|
|
3568
3599
|
};
|
|
3569
3600
|
var help = {
|
|
3570
3601
|
help: {
|
|
@@ -9154,10 +9185,20 @@ var shams$1 = function hasSymbols() {
|
|
|
9154
9185
|
return true;
|
|
9155
9186
|
};
|
|
9156
9187
|
|
|
9188
|
+
/** @type {import('.')} */
|
|
9157
9189
|
var shams = function hasToStringTagShams() {
|
|
9158
9190
|
return shams$1() && !!Symbol.toStringTag;
|
|
9159
9191
|
};
|
|
9160
9192
|
|
|
9193
|
+
/** @type {import('./range')} */
|
|
9194
|
+
var range = RangeError;
|
|
9195
|
+
|
|
9196
|
+
/** @type {import('./syntax')} */
|
|
9197
|
+
var syntax = SyntaxError;
|
|
9198
|
+
|
|
9199
|
+
/** @type {import('./type')} */
|
|
9200
|
+
var type = TypeError;
|
|
9201
|
+
|
|
9161
9202
|
var origSymbol = typeof Symbol !== 'undefined' && Symbol;
|
|
9162
9203
|
|
|
9163
9204
|
|
|
@@ -9272,11 +9313,19 @@ var $hasOwn = Object.prototype.hasOwnProperty;
|
|
|
9272
9313
|
/** @type {(o: {}, p: PropertyKey) => p is keyof o} */
|
|
9273
9314
|
var hasown = functionBind.call(call, $hasOwn);
|
|
9274
9315
|
|
|
9316
|
+
var $RangeError = range;
|
|
9317
|
+
|
|
9318
|
+
var $SyntaxError$1 = syntax;
|
|
9319
|
+
|
|
9320
|
+
var $TypeError$2 = type;
|
|
9321
|
+
|
|
9275
9322
|
var undefined$1;
|
|
9276
9323
|
|
|
9277
|
-
|
|
9324
|
+
|
|
9325
|
+
|
|
9326
|
+
|
|
9327
|
+
|
|
9278
9328
|
var $Function = Function;
|
|
9279
|
-
var $TypeError$2 = TypeError;
|
|
9280
9329
|
|
|
9281
9330
|
// eslint-disable-next-line consistent-return
|
|
9282
9331
|
var getEvalledConstructor = function (expressionSyntax) {
|
|
@@ -9328,6 +9377,7 @@ var needsEval = {};
|
|
|
9328
9377
|
var TypedArray = typeof Uint8Array === 'undefined' || !getProto$1 ? undefined$1 : getProto$1(Uint8Array);
|
|
9329
9378
|
|
|
9330
9379
|
var INTRINSICS = {
|
|
9380
|
+
__proto__: null,
|
|
9331
9381
|
'%AggregateError%': typeof AggregateError === 'undefined' ? undefined$1 : AggregateError,
|
|
9332
9382
|
'%Array%': Array,
|
|
9333
9383
|
'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer,
|
|
@@ -9372,7 +9422,7 @@ var INTRINSICS = {
|
|
|
9372
9422
|
'%parseInt%': parseInt,
|
|
9373
9423
|
'%Promise%': typeof Promise === 'undefined' ? undefined$1 : Promise,
|
|
9374
9424
|
'%Proxy%': typeof Proxy === 'undefined' ? undefined$1 : Proxy,
|
|
9375
|
-
'%RangeError%': RangeError,
|
|
9425
|
+
'%RangeError%': $RangeError,
|
|
9376
9426
|
'%ReferenceError%': ReferenceError,
|
|
9377
9427
|
'%Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
|
|
9378
9428
|
'%RegExp%': RegExp,
|
|
@@ -9432,6 +9482,7 @@ var doEval = function doEval(name) {
|
|
|
9432
9482
|
};
|
|
9433
9483
|
|
|
9434
9484
|
var LEGACY_ALIASES = {
|
|
9485
|
+
__proto__: null,
|
|
9435
9486
|
'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
|
|
9436
9487
|
'%ArrayPrototype%': ['Array', 'prototype'],
|
|
9437
9488
|
'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
|
|
@@ -9622,7 +9673,9 @@ var getIntrinsic = function GetIntrinsic(name, allowMissing) {
|
|
|
9622
9673
|
return value;
|
|
9623
9674
|
};
|
|
9624
9675
|
|
|
9625
|
-
var
|
|
9676
|
+
var GetIntrinsic = getIntrinsic;
|
|
9677
|
+
|
|
9678
|
+
var $defineProperty$1 = GetIntrinsic('%Object.defineProperty%', true);
|
|
9626
9679
|
|
|
9627
9680
|
var hasPropertyDescriptors$1 = function hasPropertyDescriptors() {
|
|
9628
9681
|
if ($defineProperty$1) {
|
|
@@ -9652,7 +9705,7 @@ hasPropertyDescriptors$1.hasArrayLengthDefineBug = function hasArrayLengthDefine
|
|
|
9652
9705
|
|
|
9653
9706
|
var hasPropertyDescriptors_1 = hasPropertyDescriptors$1;
|
|
9654
9707
|
|
|
9655
|
-
var $gOPD =
|
|
9708
|
+
var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);
|
|
9656
9709
|
|
|
9657
9710
|
if ($gOPD) {
|
|
9658
9711
|
try {
|
|
@@ -9673,7 +9726,7 @@ var hasPropertyDescriptors = require$$0$1();
|
|
|
9673
9726
|
|
|
9674
9727
|
|
|
9675
9728
|
|
|
9676
|
-
var $defineProperty = hasPropertyDescriptors &&
|
|
9729
|
+
var $defineProperty = hasPropertyDescriptors && GetIntrinsic('%Object.defineProperty%', true);
|
|
9677
9730
|
if ($defineProperty) {
|
|
9678
9731
|
try {
|
|
9679
9732
|
$defineProperty({}, 'a', { value: 1 });
|
|
@@ -9683,8 +9736,8 @@ if ($defineProperty) {
|
|
|
9683
9736
|
}
|
|
9684
9737
|
}
|
|
9685
9738
|
|
|
9686
|
-
var $SyntaxError =
|
|
9687
|
-
var $TypeError$1 =
|
|
9739
|
+
var $SyntaxError = GetIntrinsic('%SyntaxError%');
|
|
9740
|
+
var $TypeError$1 = GetIntrinsic('%TypeError%');
|
|
9688
9741
|
|
|
9689
9742
|
|
|
9690
9743
|
|
|
@@ -9741,8 +9794,8 @@ var defineDataProperty = defineDataProperty$1;
|
|
|
9741
9794
|
var hasDescriptors = require$$0$1();
|
|
9742
9795
|
|
|
9743
9796
|
|
|
9744
|
-
var $TypeError =
|
|
9745
|
-
var $floor =
|
|
9797
|
+
var $TypeError = GetIntrinsic('%TypeError%');
|
|
9798
|
+
var $floor = GetIntrinsic('%Math.floor%');
|
|
9746
9799
|
|
|
9747
9800
|
/** @typedef {(...args: unknown[]) => unknown} Func */
|
|
9748
9801
|
|
|
@@ -9787,13 +9840,13 @@ var callBind = createCommonjsModule(function (module) {
|
|
|
9787
9840
|
|
|
9788
9841
|
|
|
9789
9842
|
|
|
9790
|
-
var $TypeError =
|
|
9791
|
-
var $apply =
|
|
9792
|
-
var $call =
|
|
9793
|
-
var $reflectApply =
|
|
9843
|
+
var $TypeError = GetIntrinsic('%TypeError%');
|
|
9844
|
+
var $apply = GetIntrinsic('%Function.prototype.apply%');
|
|
9845
|
+
var $call = GetIntrinsic('%Function.prototype.call%');
|
|
9846
|
+
var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || functionBind.call($call, $apply);
|
|
9794
9847
|
|
|
9795
|
-
var $defineProperty =
|
|
9796
|
-
var $max =
|
|
9848
|
+
var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
|
|
9849
|
+
var $max = GetIntrinsic('%Math.max%');
|
|
9797
9850
|
|
|
9798
9851
|
if ($defineProperty) {
|
|
9799
9852
|
try {
|
|
@@ -9827,10 +9880,10 @@ if ($defineProperty) {
|
|
|
9827
9880
|
}
|
|
9828
9881
|
});
|
|
9829
9882
|
|
|
9830
|
-
var $indexOf$1 = callBind(
|
|
9883
|
+
var $indexOf$1 = callBind(GetIntrinsic('String.prototype.indexOf'));
|
|
9831
9884
|
|
|
9832
9885
|
var callBound = function callBoundIntrinsic(name, allowMissing) {
|
|
9833
|
-
var intrinsic =
|
|
9886
|
+
var intrinsic = GetIntrinsic(name, !!allowMissing);
|
|
9834
9887
|
if (typeof intrinsic === 'function' && $indexOf$1(name, '.prototype.') > -1) {
|
|
9835
9888
|
return callBind(intrinsic);
|
|
9836
9889
|
}
|
|
@@ -10065,7 +10118,7 @@ var forEach = function forEach(list, iterator, thisArg) {
|
|
|
10065
10118
|
|
|
10066
10119
|
var forEach_1 = forEach;
|
|
10067
10120
|
|
|
10068
|
-
var possibleNames = [
|
|
10121
|
+
var /** @type {ReturnType<import('.')>} */ possibleNames = [
|
|
10069
10122
|
'BigInt64Array',
|
|
10070
10123
|
'BigUint64Array',
|
|
10071
10124
|
'Float32Array',
|
|
@@ -10081,10 +10134,12 @@ var possibleNames = [
|
|
|
10081
10134
|
|
|
10082
10135
|
var g$1 = typeof globalThis === 'undefined' ? commonjsGlobal : globalThis;
|
|
10083
10136
|
|
|
10137
|
+
/** @type {import('.')} */
|
|
10084
10138
|
var availableTypedArrays$1 = function availableTypedArrays() {
|
|
10085
|
-
var out = [];
|
|
10139
|
+
var /** @type {ReturnType<typeof availableTypedArrays>} */ out = [];
|
|
10086
10140
|
for (var i = 0; i < possibleNames.length; i++) {
|
|
10087
10141
|
if (typeof g$1[possibleNames[i]] === 'function') {
|
|
10142
|
+
// @ts-expect-error
|
|
10088
10143
|
out[out.length] = possibleNames[i];
|
|
10089
10144
|
}
|
|
10090
10145
|
}
|
|
@@ -10102,7 +10157,7 @@ var typedArrays = availableTypedArrays();
|
|
|
10102
10157
|
var $slice = callBound('String.prototype.slice');
|
|
10103
10158
|
var getPrototypeOf = Object.getPrototypeOf; // require('getprototypeof');
|
|
10104
10159
|
|
|
10105
|
-
var $indexOf = callBound('Array.prototype.indexOf', true) || function indexOf(array, value) {
|
|
10160
|
+
var $indexOf = callBound('Array.prototype.indexOf', true) || /** @type {(array: readonly unknown[], value: unknown) => keyof array} */ function indexOf(array, value) {
|
|
10106
10161
|
for (var i = 0; i < array.length; i += 1) {
|
|
10107
10162
|
if (array[i] === value) {
|
|
10108
10163
|
return i;
|
|
@@ -10110,17 +10165,24 @@ var $indexOf = callBound('Array.prototype.indexOf', true) || function indexOf(ar
|
|
|
10110
10165
|
}
|
|
10111
10166
|
return -1;
|
|
10112
10167
|
};
|
|
10168
|
+
|
|
10169
|
+
/** @typedef {Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array | BigInt64Array | BigUint64Array} TypedArray */
|
|
10170
|
+
/** @typedef {'Int8Array' | 'Uint8Array' | 'Uint8ClampedArray' | 'Int16Array' | 'Uint16Array' | 'Int32Array' | 'Uint32Array' | 'Float32Array' | 'Float64Array' | 'BigInt64Array' | 'BigUint64Array'} TypedArrayName */
|
|
10171
|
+
/** @type {{ [k in `\$${TypedArrayName}`]?: (receiver: TypedArray) => string | typeof Uint8Array.prototype.slice.call | typeof Uint8Array.prototype.set.call } & { __proto__: null }} */
|
|
10113
10172
|
var cache = { __proto__: null };
|
|
10114
10173
|
if (hasToStringTag && gOPD && getPrototypeOf) {
|
|
10115
10174
|
forEach_1(typedArrays, function (typedArray) {
|
|
10116
10175
|
var arr = new g[typedArray]();
|
|
10117
10176
|
if (Symbol.toStringTag in arr) {
|
|
10118
10177
|
var proto = getPrototypeOf(arr);
|
|
10178
|
+
// @ts-expect-error TS won't narrow inside a closure
|
|
10119
10179
|
var descriptor = gOPD(proto, Symbol.toStringTag);
|
|
10120
10180
|
if (!descriptor) {
|
|
10121
10181
|
var superProto = getPrototypeOf(proto);
|
|
10182
|
+
// @ts-expect-error TS won't narrow inside a closure
|
|
10122
10183
|
descriptor = gOPD(superProto, Symbol.toStringTag);
|
|
10123
10184
|
}
|
|
10185
|
+
// @ts-expect-error TODO: fix
|
|
10124
10186
|
cache['$' + typedArray] = callBind(descriptor.get);
|
|
10125
10187
|
}
|
|
10126
10188
|
});
|
|
@@ -10129,38 +10191,52 @@ if (hasToStringTag && gOPD && getPrototypeOf) {
|
|
|
10129
10191
|
var arr = new g[typedArray]();
|
|
10130
10192
|
var fn = arr.slice || arr.set;
|
|
10131
10193
|
if (fn) {
|
|
10194
|
+
// @ts-expect-error TODO: fix
|
|
10132
10195
|
cache['$' + typedArray] = callBind(fn);
|
|
10133
10196
|
}
|
|
10134
10197
|
});
|
|
10135
10198
|
}
|
|
10136
10199
|
|
|
10200
|
+
/** @type {import('.')} */
|
|
10137
10201
|
var tryTypedArrays = function tryAllTypedArrays(value) {
|
|
10138
|
-
var found = false;
|
|
10139
|
-
forEach_1(
|
|
10140
|
-
|
|
10141
|
-
|
|
10142
|
-
|
|
10143
|
-
|
|
10144
|
-
|
|
10145
|
-
|
|
10202
|
+
/** @type {ReturnType<tryAllTypedArrays>} */ var found = false;
|
|
10203
|
+
forEach_1(
|
|
10204
|
+
// eslint-disable-next-line no-extra-parens
|
|
10205
|
+
/** @type {Record<`\$${TypedArrayName}`, typeof cache>} */ /** @type {any} */ (cache),
|
|
10206
|
+
/** @type {(getter: typeof cache, name: `\$${TypedArrayName}`) => void} */ function (getter, typedArray) {
|
|
10207
|
+
if (!found) {
|
|
10208
|
+
try {
|
|
10209
|
+
// @ts-expect-error TODO: fix
|
|
10210
|
+
if ('$' + getter(value) === typedArray) {
|
|
10211
|
+
found = $slice(typedArray, 1);
|
|
10212
|
+
}
|
|
10213
|
+
} catch (e) { /**/ }
|
|
10214
|
+
}
|
|
10146
10215
|
}
|
|
10147
|
-
|
|
10216
|
+
);
|
|
10148
10217
|
return found;
|
|
10149
10218
|
};
|
|
10150
10219
|
|
|
10220
|
+
/** @type {import('.')} */
|
|
10151
10221
|
var trySlices = function tryAllSlices(value) {
|
|
10152
|
-
var found = false;
|
|
10153
|
-
forEach_1(
|
|
10154
|
-
|
|
10155
|
-
|
|
10156
|
-
|
|
10157
|
-
|
|
10158
|
-
|
|
10222
|
+
/** @type {ReturnType<tryAllSlices>} */ var found = false;
|
|
10223
|
+
forEach_1(
|
|
10224
|
+
// eslint-disable-next-line no-extra-parens
|
|
10225
|
+
/** @type {any} */ (cache),
|
|
10226
|
+
/** @type {(getter: typeof cache, name: `\$${TypedArrayName}`) => void} */ function (getter, name) {
|
|
10227
|
+
if (!found) {
|
|
10228
|
+
try {
|
|
10229
|
+
// @ts-expect-error TODO: fix
|
|
10230
|
+
getter(value);
|
|
10231
|
+
found = $slice(name, 1);
|
|
10232
|
+
} catch (e) { /**/ }
|
|
10233
|
+
}
|
|
10159
10234
|
}
|
|
10160
|
-
|
|
10235
|
+
);
|
|
10161
10236
|
return found;
|
|
10162
10237
|
};
|
|
10163
10238
|
|
|
10239
|
+
/** @type {import('.')} */
|
|
10164
10240
|
var whichTypedArray$1 = function whichTypedArray(value) {
|
|
10165
10241
|
if (!value || typeof value !== 'object') { return false; }
|
|
10166
10242
|
if (!hasToStringTag) {
|
|
@@ -10180,10 +10256,13 @@ var whichTypedArray$1 = function whichTypedArray(value) {
|
|
|
10180
10256
|
|
|
10181
10257
|
var whichTypedArray = whichTypedArray$1;
|
|
10182
10258
|
|
|
10183
|
-
|
|
10259
|
+
/** @type {import('.')} */
|
|
10260
|
+
var isTypedArray$1 = function isTypedArray(value) {
|
|
10184
10261
|
return !!whichTypedArray(value);
|
|
10185
10262
|
};
|
|
10186
10263
|
|
|
10264
|
+
var isTypedArray = isTypedArray$1;
|
|
10265
|
+
|
|
10187
10266
|
var types = createCommonjsModule(function (module, exports) {
|
|
10188
10267
|
|
|
10189
10268
|
|
|
@@ -18132,42 +18211,48 @@ function _getStructStringFromClipboardData() {
|
|
|
18132
18211
|
while (1) switch (_context8.prev = _context8.next) {
|
|
18133
18212
|
case 0:
|
|
18134
18213
|
clipboardItem = data[0];
|
|
18135
|
-
|
|
18214
|
+
if (!(clipboardItem instanceof ClipboardItem)) {
|
|
18215
|
+
_context8.next = 23;
|
|
18216
|
+
break;
|
|
18217
|
+
}
|
|
18218
|
+
_context8.next = 4;
|
|
18136
18219
|
return safelyGetMimeType(clipboardItem, "web ".concat(ChemicalMimeType.KET));
|
|
18137
|
-
case
|
|
18220
|
+
case 4:
|
|
18138
18221
|
_context8.t2 = _context8.sent;
|
|
18139
18222
|
if (_context8.t2) {
|
|
18140
|
-
_context8.next =
|
|
18223
|
+
_context8.next = 9;
|
|
18141
18224
|
break;
|
|
18142
18225
|
}
|
|
18143
|
-
_context8.next =
|
|
18226
|
+
_context8.next = 8;
|
|
18144
18227
|
return safelyGetMimeType(clipboardItem, "web ".concat(ChemicalMimeType.Mol));
|
|
18145
|
-
case 7:
|
|
18146
|
-
_context8.t2 = _context8.sent;
|
|
18147
18228
|
case 8:
|
|
18229
|
+
_context8.t2 = _context8.sent;
|
|
18230
|
+
case 9:
|
|
18148
18231
|
_context8.t1 = _context8.t2;
|
|
18149
18232
|
if (_context8.t1) {
|
|
18150
|
-
_context8.next =
|
|
18233
|
+
_context8.next = 14;
|
|
18151
18234
|
break;
|
|
18152
18235
|
}
|
|
18153
|
-
_context8.next =
|
|
18236
|
+
_context8.next = 13;
|
|
18154
18237
|
return safelyGetMimeType(clipboardItem, "web ".concat(ChemicalMimeType.Rxn));
|
|
18155
|
-
case 12:
|
|
18156
|
-
_context8.t1 = _context8.sent;
|
|
18157
18238
|
case 13:
|
|
18239
|
+
_context8.t1 = _context8.sent;
|
|
18240
|
+
case 14:
|
|
18158
18241
|
_context8.t0 = _context8.t1;
|
|
18159
18242
|
if (_context8.t0) {
|
|
18160
|
-
_context8.next =
|
|
18243
|
+
_context8.next = 19;
|
|
18161
18244
|
break;
|
|
18162
18245
|
}
|
|
18163
|
-
_context8.next =
|
|
18246
|
+
_context8.next = 18;
|
|
18164
18247
|
return safelyGetMimeType(clipboardItem, 'text/plain');
|
|
18165
|
-
case 17:
|
|
18166
|
-
_context8.t0 = _context8.sent;
|
|
18167
18248
|
case 18:
|
|
18249
|
+
_context8.t0 = _context8.sent;
|
|
18250
|
+
case 19:
|
|
18168
18251
|
structStr = _context8.t0;
|
|
18169
18252
|
return _context8.abrupt("return", structStr === '' ? '' : structStr.text());
|
|
18170
|
-
case
|
|
18253
|
+
case 23:
|
|
18254
|
+
return _context8.abrupt("return", data[ChemicalMimeType.KET] || data[ChemicalMimeType.Mol] || data[ChemicalMimeType.Rxn] || data['text/plain']);
|
|
18255
|
+
case 24:
|
|
18171
18256
|
case "end":
|
|
18172
18257
|
return _context8.stop();
|
|
18173
18258
|
}
|
|
@@ -27317,7 +27402,7 @@ function roundOff(value, round) {
|
|
|
27317
27402
|
});
|
|
27318
27403
|
}
|
|
27319
27404
|
var selectOptions = getSelectOptionsFromSchema({
|
|
27320
|
-
"enum": range(0, 8)
|
|
27405
|
+
"enum": range$1(0, 8)
|
|
27321
27406
|
});
|
|
27322
27407
|
var AnalyseDialog = function (_Component) {
|
|
27323
27408
|
_inherits$2(AnalyseDialog, _Component);
|
|
@@ -27561,7 +27646,7 @@ function RecognizeDialog(prop) {
|
|
|
27561
27646
|
children: ["Imago version", jsx(Input$1, {
|
|
27562
27647
|
schema: {
|
|
27563
27648
|
"enum": imagoVersions,
|
|
27564
|
-
enumNames: range(1, imagoVersions.length + 1).map(function (i) {
|
|
27649
|
+
enumNames: range$1(1, imagoVersions.length + 1).map(function (i) {
|
|
27565
27650
|
return "Version ".concat(i);
|
|
27566
27651
|
})
|
|
27567
27652
|
},
|
|
@@ -29232,7 +29317,14 @@ var SaveDialog = function (_Component) {
|
|
|
29232
29317
|
var service = factory.create(type, _objectSpread$l(_objectSpread$l({}, options), {}, {
|
|
29233
29318
|
ignoreChiralFlag: ignoreChiralFlag
|
|
29234
29319
|
}), queryPropertiesAreUsed);
|
|
29235
|
-
|
|
29320
|
+
var getStructFromStringByType = function getStructFromStringByType() {
|
|
29321
|
+
if (type === 'ket') {
|
|
29322
|
+
var selection = _this.props.editor.selection();
|
|
29323
|
+
return service.getStructureFromStructAsync(struct, undefined, selection);
|
|
29324
|
+
}
|
|
29325
|
+
return service.getStructureFromStructAsync(struct);
|
|
29326
|
+
};
|
|
29327
|
+
return getStructFromStringByType().then(function (structStr) {
|
|
29236
29328
|
_this.setState({
|
|
29237
29329
|
tabIndex: 0,
|
|
29238
29330
|
structStr: structStr
|
|
@@ -29534,7 +29626,8 @@ var mapStateToProps$4 = function mapStateToProps(state) {
|
|
|
29534
29626
|
moleculeErrors: state.modal.form.moleculeErrors,
|
|
29535
29627
|
checkState: state.options.check,
|
|
29536
29628
|
bondThickness: state.options.settings.bondThickness,
|
|
29537
|
-
ignoreChiralFlag: state.editor.render.options.ignoreChiralFlag
|
|
29629
|
+
ignoreChiralFlag: state.editor.render.options.ignoreChiralFlag,
|
|
29630
|
+
editor: state.editor
|
|
29538
29631
|
};
|
|
29539
29632
|
};
|
|
29540
29633
|
var mapDispatchToProps$6 = function mapDispatchToProps(dispatch) {
|
|
@@ -29619,7 +29712,7 @@ var EnhancedStereo = function EnhancedStereo(props) {
|
|
|
29619
29712
|
checked: _result.type === StereoLabel.And
|
|
29620
29713
|
}), "Add to AND", jsx(Field, {
|
|
29621
29714
|
name: "andNumber",
|
|
29622
|
-
schema: range$
|
|
29715
|
+
schema: range$2(1, maxAnd + 1),
|
|
29623
29716
|
type: "text",
|
|
29624
29717
|
className: classes$k.labelGroupSelect
|
|
29625
29718
|
}), "Group"]
|
|
@@ -29632,7 +29725,7 @@ var EnhancedStereo = function EnhancedStereo(props) {
|
|
|
29632
29725
|
checked: _result.type === StereoLabel.Or
|
|
29633
29726
|
}), "Add to OR", jsx(Field, {
|
|
29634
29727
|
name: "orNumber",
|
|
29635
|
-
schema: range$
|
|
29728
|
+
schema: range$2(1, maxOr + 1),
|
|
29636
29729
|
type: "text",
|
|
29637
29730
|
className: classes$k.labelGroupSelect
|
|
29638
29731
|
}), "Group"]
|
|
@@ -29809,7 +29902,7 @@ var PERIODIC_TABLE_COLUMNS = 19;
|
|
|
29809
29902
|
function Header() {
|
|
29810
29903
|
return jsx("tbody", {
|
|
29811
29904
|
children: jsx("tr", {
|
|
29812
|
-
children: range(0, PERIODIC_TABLE_COLUMNS).map(function (index) {
|
|
29905
|
+
children: range$1(0, PERIODIC_TABLE_COLUMNS).map(function (index) {
|
|
29813
29906
|
return jsx("th", {
|
|
29814
29907
|
children: index || ''
|
|
29815
29908
|
}, index);
|
|
@@ -31500,7 +31593,7 @@ var FontControl = function FontControl(_ref) {
|
|
|
31500
31593
|
}, [currentStyle]);
|
|
31501
31594
|
var MIN_FONT_SIZE = 4;
|
|
31502
31595
|
var MAX_FONT_SIZE = 144;
|
|
31503
|
-
var fontSizes = range(MIN_FONT_SIZE, MAX_FONT_SIZE + 1);
|
|
31596
|
+
var fontSizes = range$1(MIN_FONT_SIZE, MAX_FONT_SIZE + 1);
|
|
31504
31597
|
var fontSizeOptions = useMemo(function () {
|
|
31505
31598
|
return fontSizes.map(function (fontSize) {
|
|
31506
31599
|
return jsx("div", {
|
|
@@ -32655,8 +32748,8 @@ var KetcherBuilder = function () {
|
|
|
32655
32748
|
initApp(element, appRoot, staticResourcesUrl, {
|
|
32656
32749
|
buttons: buttons || {},
|
|
32657
32750
|
errorHandler: errorHandler || null,
|
|
32658
|
-
version: "2.18.0-rc.
|
|
32659
|
-
buildDate: "2024-
|
|
32751
|
+
version: "2.18.0-rc.4" ,
|
|
32752
|
+
buildDate: "2024-02-06T12:50:19" ,
|
|
32660
32753
|
buildNumber: ''
|
|
32661
32754
|
}, structService, resolve, togglerComponent);
|
|
32662
32755
|
});
|