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.js
CHANGED
|
@@ -694,8 +694,8 @@ function exec(action) {
|
|
|
694
694
|
return enabled;
|
|
695
695
|
}
|
|
696
696
|
|
|
697
|
-
function ownKeys$
|
|
698
|
-
function _objectSpread$
|
|
697
|
+
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; }
|
|
698
|
+
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__default["default"](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; }
|
|
699
699
|
var editor = {
|
|
700
700
|
resetToSelect: {
|
|
701
701
|
title: 'Reset to Select Tool',
|
|
@@ -950,7 +950,7 @@ var optionsSchema = {
|
|
|
950
950
|
title: 'Settings',
|
|
951
951
|
type: 'object',
|
|
952
952
|
required: [],
|
|
953
|
-
properties: _objectSpread$
|
|
953
|
+
properties: _objectSpread$1o(_objectSpread$1o(_objectSpread$1o(_objectSpread$1o(_objectSpread$1o({}, editor), render), server), debug), miew)
|
|
954
954
|
};
|
|
955
955
|
function getDefaultOptions() {
|
|
956
956
|
if (!optionsSchema.properties) return {};
|
|
@@ -1133,8 +1133,8 @@ function prefetchRender(tmpls, baseUrl, cacheEl) {
|
|
|
1133
1133
|
});
|
|
1134
1134
|
}
|
|
1135
1135
|
|
|
1136
|
-
function ownKeys$
|
|
1137
|
-
function _objectSpread$
|
|
1136
|
+
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; }
|
|
1137
|
+
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__default["default"](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; }
|
|
1138
1138
|
var initOptionsState = {
|
|
1139
1139
|
app: {
|
|
1140
1140
|
server: false,
|
|
@@ -1232,29 +1232,29 @@ function optionsReducer() {
|
|
|
1232
1232
|
var action = arguments.length > 1 ? arguments[1] : undefined;
|
|
1233
1233
|
var type = action.type,
|
|
1234
1234
|
data = action.data;
|
|
1235
|
-
if (type === 'APP_OPTIONS') return _objectSpread$
|
|
1236
|
-
app: _objectSpread$
|
|
1235
|
+
if (type === 'APP_OPTIONS') return _objectSpread$1n(_objectSpread$1n({}, state), {}, {
|
|
1236
|
+
app: _objectSpread$1n(_objectSpread$1n({}, state.app), data)
|
|
1237
1237
|
});
|
|
1238
1238
|
if (type === 'SAVE_SETTINGS') {
|
|
1239
|
-
return _objectSpread$
|
|
1240
|
-
settings: _objectSpread$
|
|
1239
|
+
return _objectSpread$1n(_objectSpread$1n({}, state), {}, {
|
|
1240
|
+
settings: _objectSpread$1n(_objectSpread$1n({}, state.settings), data)
|
|
1241
1241
|
});
|
|
1242
1242
|
}
|
|
1243
|
-
if (type === 'SAVE_CHECK_OPTS') return _objectSpread$
|
|
1243
|
+
if (type === 'SAVE_CHECK_OPTS') return _objectSpread$1n(_objectSpread$1n({}, state), {}, {
|
|
1244
1244
|
check: data
|
|
1245
1245
|
});
|
|
1246
|
-
if (type === 'CHANGE_ANALYSE') return _objectSpread$
|
|
1247
|
-
analyse: _objectSpread$
|
|
1246
|
+
if (type === 'CHANGE_ANALYSE') return _objectSpread$1n(_objectSpread$1n({}, state), {}, {
|
|
1247
|
+
analyse: _objectSpread$1n(_objectSpread$1n(_objectSpread$1n({}, state.analyse), data), {}, {
|
|
1248
1248
|
loading: false
|
|
1249
1249
|
})
|
|
1250
1250
|
});
|
|
1251
|
-
if (type === 'ANALYSE_LOADING') return _objectSpread$
|
|
1252
|
-
analyse: _objectSpread$
|
|
1251
|
+
if (type === 'ANALYSE_LOADING') return _objectSpread$1n(_objectSpread$1n({}, state), {}, {
|
|
1252
|
+
analyse: _objectSpread$1n(_objectSpread$1n({}, state.analyse), {}, {
|
|
1253
1253
|
loading: true
|
|
1254
1254
|
})
|
|
1255
1255
|
});
|
|
1256
|
-
if (recognizeActions.includes(type)) return _objectSpread$
|
|
1257
|
-
recognize: _objectSpread$
|
|
1256
|
+
if (recognizeActions.includes(type)) return _objectSpread$1n(_objectSpread$1n({}, state), {}, {
|
|
1257
|
+
recognize: _objectSpread$1n(_objectSpread$1n({}, state.recognize), data)
|
|
1258
1258
|
});
|
|
1259
1259
|
return state;
|
|
1260
1260
|
}
|
|
@@ -1558,8 +1558,8 @@ function getSdataDefault() {
|
|
|
1558
1558
|
return schema[context][fieldName] ? schema[context][fieldName].properties.fieldValue["default"] : '';
|
|
1559
1559
|
}
|
|
1560
1560
|
|
|
1561
|
-
function ownKeys$
|
|
1562
|
-
function _objectSpread$
|
|
1561
|
+
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; }
|
|
1562
|
+
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__default["default"](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; }
|
|
1563
1563
|
var initSdata = function initSdata(schema) {
|
|
1564
1564
|
var isCustomShema = schema.key === 'Custom';
|
|
1565
1565
|
var context = isCustomShema ? getSdataDefault(sdataCustomSchema, 'context') : getSdataDefault(sdataSchema);
|
|
@@ -1597,7 +1597,7 @@ var onContextChange = function onContextChange(state, payload) {
|
|
|
1597
1597
|
var fValue = fieldValue;
|
|
1598
1598
|
if (fValue === state.result.fieldValue) fValue = getSdataDefault(sdataCustomSchema, 'fieldValue');
|
|
1599
1599
|
return {
|
|
1600
|
-
result: _objectSpread$
|
|
1600
|
+
result: _objectSpread$1m(_objectSpread$1m({}, payload), {}, {
|
|
1601
1601
|
context: context,
|
|
1602
1602
|
fieldName: fieldName,
|
|
1603
1603
|
fieldValue: fValue
|
|
@@ -1611,7 +1611,7 @@ var onFieldNameChange = function onFieldNameChange(state, payload) {
|
|
|
1611
1611
|
if (sdataSchema[context][fieldName]) fieldValue = getSdataDefault(sdataSchema, context, fieldName);
|
|
1612
1612
|
if (fieldValue === state.result.fieldValue && sdataSchema[context][state.result.fieldName]) fieldValue = '';
|
|
1613
1613
|
return {
|
|
1614
|
-
result: _objectSpread$
|
|
1614
|
+
result: _objectSpread$1m(_objectSpread$1m({}, payload), {}, {
|
|
1615
1615
|
fieldName: fieldName,
|
|
1616
1616
|
fieldValue: fieldValue
|
|
1617
1617
|
})
|
|
@@ -1619,7 +1619,7 @@ var onFieldNameChange = function onFieldNameChange(state, payload) {
|
|
|
1619
1619
|
};
|
|
1620
1620
|
function sdataReducer(state, action) {
|
|
1621
1621
|
if (action.data.result.init) {
|
|
1622
|
-
return correctErrors(_objectSpread$
|
|
1622
|
+
return correctErrors(_objectSpread$1m(_objectSpread$1m({}, state), {}, {
|
|
1623
1623
|
result: Object.assign({}, state.result, action.data.result)
|
|
1624
1624
|
}), action.data);
|
|
1625
1625
|
}
|
|
@@ -1627,7 +1627,7 @@ function sdataReducer(state, action) {
|
|
|
1627
1627
|
var actionFieldName = action.data.result.fieldName;
|
|
1628
1628
|
var newstate = null;
|
|
1629
1629
|
if (actionContext !== state.result.context) newstate = onContextChange(state, action.data.result);else if (actionFieldName !== state.result.fieldName) newstate = onFieldNameChange(state, action.data.result);
|
|
1630
|
-
newstate = newstate || _objectSpread$
|
|
1630
|
+
newstate = newstate || _objectSpread$1m(_objectSpread$1m({}, state), {}, {
|
|
1631
1631
|
result: Object.assign({}, state.result, action.data.result)
|
|
1632
1632
|
});
|
|
1633
1633
|
return correctErrors(newstate, action.data);
|
|
@@ -1767,8 +1767,8 @@ function formReducer(state, action) {
|
|
|
1767
1767
|
var INDIGO_VERIFICATION = 'INDIGO_VERIFICATION';
|
|
1768
1768
|
var ANALYZING_FILE = 'ANALYZING_FILE';
|
|
1769
1769
|
|
|
1770
|
-
function ownKeys$
|
|
1771
|
-
function _objectSpread$
|
|
1770
|
+
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; }
|
|
1771
|
+
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__default["default"](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; }
|
|
1772
1772
|
function indigoVerification(data) {
|
|
1773
1773
|
return {
|
|
1774
1774
|
type: INDIGO_VERIFICATION,
|
|
@@ -1793,13 +1793,13 @@ function requestReducer () {
|
|
|
1793
1793
|
switch (type) {
|
|
1794
1794
|
case INDIGO_VERIFICATION:
|
|
1795
1795
|
{
|
|
1796
|
-
return _objectSpread$
|
|
1796
|
+
return _objectSpread$1l(_objectSpread$1l({}, state), {}, {
|
|
1797
1797
|
indigoVerification: data
|
|
1798
1798
|
});
|
|
1799
1799
|
}
|
|
1800
1800
|
case ANALYZING_FILE:
|
|
1801
1801
|
{
|
|
1802
|
-
return _objectSpread$
|
|
1802
|
+
return _objectSpread$1l(_objectSpread$1l({}, state), {}, {
|
|
1803
1803
|
isAnalyzingFile: data
|
|
1804
1804
|
});
|
|
1805
1805
|
}
|
|
@@ -1817,8 +1817,8 @@ var supportedSGroupTypes = {
|
|
|
1817
1817
|
queryComponent: 'queryComponent'
|
|
1818
1818
|
};
|
|
1819
1819
|
|
|
1820
|
-
function ownKeys$
|
|
1821
|
-
function _objectSpread$
|
|
1820
|
+
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; }
|
|
1821
|
+
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__default["default"](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; }
|
|
1822
1822
|
var atom = {
|
|
1823
1823
|
title: 'Atom',
|
|
1824
1824
|
type: 'object',
|
|
@@ -2050,7 +2050,7 @@ var sgroup = {
|
|
|
2050
2050
|
title: 'SGroup',
|
|
2051
2051
|
type: 'object',
|
|
2052
2052
|
required: ['type'],
|
|
2053
|
-
oneOf: [_objectSpread$
|
|
2053
|
+
oneOf: [_objectSpread$1k({}, sdataCustomSchema), {
|
|
2054
2054
|
key: 'MUL',
|
|
2055
2055
|
title: 'Multiple group',
|
|
2056
2056
|
type: 'object',
|
|
@@ -2157,12 +2157,12 @@ var attachSchema = {
|
|
|
2157
2157
|
|
|
2158
2158
|
var _excluded$z = ["aromaticity", "ringMembership", "ringSize", "connectivity", "chirality", "customQuery"],
|
|
2159
2159
|
_excluded2$7 = ["type", "radiobuttons"];
|
|
2160
|
-
function ownKeys$
|
|
2161
|
-
function _objectSpread$
|
|
2160
|
+
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; }
|
|
2161
|
+
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__default["default"](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; }
|
|
2162
2162
|
var DefaultStereoGroupNumber = 1;
|
|
2163
2163
|
function fromElement(selem) {
|
|
2164
2164
|
if (selem.label === 'R#') {
|
|
2165
|
-
return _objectSpread$
|
|
2165
|
+
return _objectSpread$1j({
|
|
2166
2166
|
type: 'rlabel',
|
|
2167
2167
|
values: fromRlabel(selem.rglabel)
|
|
2168
2168
|
}, selem);
|
|
@@ -2419,7 +2419,7 @@ function fromBond(sbond) {
|
|
|
2419
2419
|
}
|
|
2420
2420
|
function toBond(bond) {
|
|
2421
2421
|
var isCustomQuery = bond.customQuery !== '';
|
|
2422
|
-
return _objectSpread$
|
|
2422
|
+
return _objectSpread$1j({
|
|
2423
2423
|
topology: bond.topology,
|
|
2424
2424
|
reactingCenterStatus: bond.center,
|
|
2425
2425
|
customQuery: !isCustomQuery ? null : bond.customQuery
|
|
@@ -2515,7 +2515,7 @@ function toSgroup(sgroup) {
|
|
|
2515
2515
|
var type = sgroup.type,
|
|
2516
2516
|
radiobuttons = sgroup.radiobuttons,
|
|
2517
2517
|
props = _objectWithoutProperties__default["default"](sgroup, _excluded2$7);
|
|
2518
|
-
var attrs = _objectSpread$
|
|
2518
|
+
var attrs = _objectSpread$1j({}, props);
|
|
2519
2519
|
var absolute = 'absolute';
|
|
2520
2520
|
var attached = 'attached';
|
|
2521
2521
|
switch (radiobuttons) {
|
|
@@ -3070,8 +3070,8 @@ var tools = typeSchema$1["enum"].reduce(function (res, type, i) {
|
|
|
3070
3070
|
|
|
3071
3071
|
var _excluded$y = ["rescale", "fragment"],
|
|
3072
3072
|
_excluded2$6 = ["isPaste", "method"];
|
|
3073
|
-
function ownKeys$
|
|
3074
|
-
function _objectSpread$
|
|
3073
|
+
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; }
|
|
3074
|
+
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__default["default"](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; }
|
|
3075
3075
|
function onAction(action) {
|
|
3076
3076
|
if (action && action.dialog) {
|
|
3077
3077
|
return {
|
|
@@ -3113,6 +3113,21 @@ function removeStructAction() {
|
|
|
3113
3113
|
var savedSelectedTool = ketcherCore.SettingsManager.selectionTool;
|
|
3114
3114
|
return onAction(savedSelectedTool || tools['select-rectangle'].action);
|
|
3115
3115
|
}
|
|
3116
|
+
var getSelectionFromStruct = function getSelectionFromStruct(struct) {
|
|
3117
|
+
var selection = {};
|
|
3118
|
+
['atoms', 'bonds', 'enhancedFlags', 'rxnPluses', 'rxnArrows', 'texts', 'rgroupAttachmentPoints'].forEach(function (selectionEntity) {
|
|
3119
|
+
if (struct && struct[selectionEntity]) {
|
|
3120
|
+
var selected = [];
|
|
3121
|
+
struct[selectionEntity].forEach(function (value, key) {
|
|
3122
|
+
if (typeof value.getInitiallySelected === 'function' && value.getInitiallySelected()) {
|
|
3123
|
+
selected.push(key);
|
|
3124
|
+
}
|
|
3125
|
+
});
|
|
3126
|
+
selection[selectionEntity] = selected;
|
|
3127
|
+
}
|
|
3128
|
+
});
|
|
3129
|
+
return selection;
|
|
3130
|
+
};
|
|
3116
3131
|
function load(struct, options) {
|
|
3117
3132
|
return function () {
|
|
3118
3133
|
var _ref = _asyncToGenerator__default["default"]( _regeneratorRuntime__default["default"].mark(function _callee(dispatch, getState) {
|
|
@@ -3126,7 +3141,7 @@ function load(struct, options) {
|
|
|
3126
3141
|
errorHandler = editor.errorHandler;
|
|
3127
3142
|
options = options || {};
|
|
3128
3143
|
_options2 = options, isPaste = _options2.isPaste, method = _options2.method, otherOptions = _objectWithoutProperties__default["default"](_options2, _excluded2$6);
|
|
3129
|
-
otherOptions = _objectSpread$
|
|
3144
|
+
otherOptions = _objectSpread$1i(_objectSpread$1i({}, otherOptions), {}, {
|
|
3130
3145
|
'dearomatize-on-load': editor.options()['dearomatize-on-load'],
|
|
3131
3146
|
ignoreChiralFlag: editor.options().ignoreChiralFlag
|
|
3132
3147
|
});
|
|
@@ -3197,27 +3212,31 @@ function load(struct, options) {
|
|
|
3197
3212
|
if (!isPaste && !isIndigoFunctionCalled) {
|
|
3198
3213
|
editor.centerStruct();
|
|
3199
3214
|
}
|
|
3215
|
+
if (!fragment) {
|
|
3216
|
+
editor.selection(getSelectionFromStruct(editor.struct()));
|
|
3217
|
+
}
|
|
3218
|
+
editor.struct().disableInitiallySelected();
|
|
3200
3219
|
dispatch(setAnalyzingFile(false));
|
|
3201
3220
|
dispatch({
|
|
3202
3221
|
type: 'MODAL_CLOSE'
|
|
3203
3222
|
});
|
|
3204
|
-
_context.next =
|
|
3223
|
+
_context.next = 40;
|
|
3205
3224
|
break;
|
|
3206
|
-
case
|
|
3207
|
-
_context.prev =
|
|
3225
|
+
case 35:
|
|
3226
|
+
_context.prev = 35;
|
|
3208
3227
|
_context.t0 = _context["catch"](8);
|
|
3209
3228
|
ketcherCore.KetcherLogger.error('shared.ts::load', _context.t0);
|
|
3210
3229
|
dispatch(setAnalyzingFile(false));
|
|
3211
3230
|
_context.t0 && errorHandler && errorHandler(_context.t0.message);
|
|
3212
|
-
case
|
|
3213
|
-
_context.prev =
|
|
3231
|
+
case 40:
|
|
3232
|
+
_context.prev = 40;
|
|
3214
3233
|
ketcherCore.notifyRequestCompleted();
|
|
3215
|
-
return _context.finish(
|
|
3216
|
-
case
|
|
3234
|
+
return _context.finish(40);
|
|
3235
|
+
case 43:
|
|
3217
3236
|
case "end":
|
|
3218
3237
|
return _context.stop();
|
|
3219
3238
|
}
|
|
3220
|
-
}, _callee, null, [[8,
|
|
3239
|
+
}, _callee, null, [[8, 35, 40, 43]]);
|
|
3221
3240
|
}));
|
|
3222
3241
|
return function (_x, _x2) {
|
|
3223
3242
|
return _ref.apply(this, arguments);
|
|
@@ -3247,6 +3266,8 @@ function openInfoModalWithCustomMessage(message) {
|
|
|
3247
3266
|
};
|
|
3248
3267
|
}
|
|
3249
3268
|
|
|
3269
|
+
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; }
|
|
3270
|
+
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__default["default"](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; }
|
|
3250
3271
|
function checkServer() {
|
|
3251
3272
|
return function (dispatch, getState) {
|
|
3252
3273
|
var _getState = getState(),
|
|
@@ -3370,20 +3391,30 @@ function resetStereoFlagsPosition(struct) {
|
|
|
3370
3391
|
function serverCall(editor, server, method, options, struct) {
|
|
3371
3392
|
var selection = editor.selection();
|
|
3372
3393
|
var selectedAtoms = [];
|
|
3394
|
+
var selectedBonds = [];
|
|
3373
3395
|
var aidMap = new Map();
|
|
3374
|
-
var
|
|
3396
|
+
var bidMap = new Map();
|
|
3397
|
+
var currentStruct = (struct || editor.struct()).clone(null, null, false, aidMap, null, null, null, bidMap);
|
|
3398
|
+
var expSel = editor.explicitSelected();
|
|
3375
3399
|
if (selection) {
|
|
3376
|
-
selectedAtoms = (selection.atoms ? selection.atoms :
|
|
3400
|
+
selectedAtoms = (selection.atoms ? selection.atoms : expSel.atoms).map(function (aid) {
|
|
3377
3401
|
return aidMap.get(aid);
|
|
3378
3402
|
});
|
|
3403
|
+
selectedBonds = (selection.bonds ? selection.bonds : expSel.bonds).map(function (bid) {
|
|
3404
|
+
return bidMap.get(bid);
|
|
3405
|
+
});
|
|
3379
3406
|
}
|
|
3380
3407
|
if (method === 'layout') {
|
|
3381
3408
|
resetStereoFlagsPosition(currentStruct);
|
|
3382
3409
|
}
|
|
3383
3410
|
var ketSerializer = new ketcherCore.KetSerializer();
|
|
3411
|
+
var serializedStruct = ketSerializer.serialize(currentStruct, undefined, _objectSpread$1h(_objectSpread$1h({}, selection), {}, {
|
|
3412
|
+
atoms: selectedAtoms,
|
|
3413
|
+
bonds: selectedBonds
|
|
3414
|
+
}));
|
|
3384
3415
|
return server.then(function () {
|
|
3385
3416
|
return server[method](Object.assign({
|
|
3386
|
-
struct:
|
|
3417
|
+
struct: serializedStruct
|
|
3387
3418
|
}, method !== 'calculate' && method !== 'check' ? {
|
|
3388
3419
|
output_format: ketcherCore.ChemicalMimeType.KET
|
|
3389
3420
|
} : null, selectedAtoms && selectedAtoms.length > 0 ? {
|
|
@@ -3629,7 +3660,7 @@ var zoom = {
|
|
|
3629
3660
|
|
|
3630
3661
|
var openHelpLink = function openHelpLink() {
|
|
3631
3662
|
var _window$open;
|
|
3632
|
-
return (_window$open = window.open("https://github.com/epam/ketcher/blob/".concat("v2.18.0-rc.
|
|
3663
|
+
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();
|
|
3633
3664
|
};
|
|
3634
3665
|
var help = {
|
|
3635
3666
|
help: {
|
|
@@ -9219,10 +9250,20 @@ var shams$1 = function hasSymbols() {
|
|
|
9219
9250
|
return true;
|
|
9220
9251
|
};
|
|
9221
9252
|
|
|
9253
|
+
/** @type {import('.')} */
|
|
9222
9254
|
var shams = function hasToStringTagShams() {
|
|
9223
9255
|
return shams$1() && !!Symbol.toStringTag;
|
|
9224
9256
|
};
|
|
9225
9257
|
|
|
9258
|
+
/** @type {import('./range')} */
|
|
9259
|
+
var range = RangeError;
|
|
9260
|
+
|
|
9261
|
+
/** @type {import('./syntax')} */
|
|
9262
|
+
var syntax = SyntaxError;
|
|
9263
|
+
|
|
9264
|
+
/** @type {import('./type')} */
|
|
9265
|
+
var type = TypeError;
|
|
9266
|
+
|
|
9226
9267
|
var origSymbol = typeof Symbol !== 'undefined' && Symbol;
|
|
9227
9268
|
|
|
9228
9269
|
|
|
@@ -9337,11 +9378,19 @@ var $hasOwn = Object.prototype.hasOwnProperty;
|
|
|
9337
9378
|
/** @type {(o: {}, p: PropertyKey) => p is keyof o} */
|
|
9338
9379
|
var hasown = functionBind.call(call, $hasOwn);
|
|
9339
9380
|
|
|
9381
|
+
var $RangeError = range;
|
|
9382
|
+
|
|
9383
|
+
var $SyntaxError$1 = syntax;
|
|
9384
|
+
|
|
9385
|
+
var $TypeError$2 = type;
|
|
9386
|
+
|
|
9340
9387
|
var undefined$1;
|
|
9341
9388
|
|
|
9342
|
-
|
|
9389
|
+
|
|
9390
|
+
|
|
9391
|
+
|
|
9392
|
+
|
|
9343
9393
|
var $Function = Function;
|
|
9344
|
-
var $TypeError$2 = TypeError;
|
|
9345
9394
|
|
|
9346
9395
|
// eslint-disable-next-line consistent-return
|
|
9347
9396
|
var getEvalledConstructor = function (expressionSyntax) {
|
|
@@ -9393,6 +9442,7 @@ var needsEval = {};
|
|
|
9393
9442
|
var TypedArray = typeof Uint8Array === 'undefined' || !getProto$1 ? undefined$1 : getProto$1(Uint8Array);
|
|
9394
9443
|
|
|
9395
9444
|
var INTRINSICS = {
|
|
9445
|
+
__proto__: null,
|
|
9396
9446
|
'%AggregateError%': typeof AggregateError === 'undefined' ? undefined$1 : AggregateError,
|
|
9397
9447
|
'%Array%': Array,
|
|
9398
9448
|
'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer,
|
|
@@ -9437,7 +9487,7 @@ var INTRINSICS = {
|
|
|
9437
9487
|
'%parseInt%': parseInt,
|
|
9438
9488
|
'%Promise%': typeof Promise === 'undefined' ? undefined$1 : Promise,
|
|
9439
9489
|
'%Proxy%': typeof Proxy === 'undefined' ? undefined$1 : Proxy,
|
|
9440
|
-
'%RangeError%': RangeError,
|
|
9490
|
+
'%RangeError%': $RangeError,
|
|
9441
9491
|
'%ReferenceError%': ReferenceError,
|
|
9442
9492
|
'%Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
|
|
9443
9493
|
'%RegExp%': RegExp,
|
|
@@ -9497,6 +9547,7 @@ var doEval = function doEval(name) {
|
|
|
9497
9547
|
};
|
|
9498
9548
|
|
|
9499
9549
|
var LEGACY_ALIASES = {
|
|
9550
|
+
__proto__: null,
|
|
9500
9551
|
'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
|
|
9501
9552
|
'%ArrayPrototype%': ['Array', 'prototype'],
|
|
9502
9553
|
'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
|
|
@@ -9687,7 +9738,9 @@ var getIntrinsic = function GetIntrinsic(name, allowMissing) {
|
|
|
9687
9738
|
return value;
|
|
9688
9739
|
};
|
|
9689
9740
|
|
|
9690
|
-
var
|
|
9741
|
+
var GetIntrinsic = getIntrinsic;
|
|
9742
|
+
|
|
9743
|
+
var $defineProperty$1 = GetIntrinsic('%Object.defineProperty%', true);
|
|
9691
9744
|
|
|
9692
9745
|
var hasPropertyDescriptors$1 = function hasPropertyDescriptors() {
|
|
9693
9746
|
if ($defineProperty$1) {
|
|
@@ -9717,7 +9770,7 @@ hasPropertyDescriptors$1.hasArrayLengthDefineBug = function hasArrayLengthDefine
|
|
|
9717
9770
|
|
|
9718
9771
|
var hasPropertyDescriptors_1 = hasPropertyDescriptors$1;
|
|
9719
9772
|
|
|
9720
|
-
var $gOPD =
|
|
9773
|
+
var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);
|
|
9721
9774
|
|
|
9722
9775
|
if ($gOPD) {
|
|
9723
9776
|
try {
|
|
@@ -9738,7 +9791,7 @@ var hasPropertyDescriptors = require$$0$1();
|
|
|
9738
9791
|
|
|
9739
9792
|
|
|
9740
9793
|
|
|
9741
|
-
var $defineProperty = hasPropertyDescriptors &&
|
|
9794
|
+
var $defineProperty = hasPropertyDescriptors && GetIntrinsic('%Object.defineProperty%', true);
|
|
9742
9795
|
if ($defineProperty) {
|
|
9743
9796
|
try {
|
|
9744
9797
|
$defineProperty({}, 'a', { value: 1 });
|
|
@@ -9748,8 +9801,8 @@ if ($defineProperty) {
|
|
|
9748
9801
|
}
|
|
9749
9802
|
}
|
|
9750
9803
|
|
|
9751
|
-
var $SyntaxError =
|
|
9752
|
-
var $TypeError$1 =
|
|
9804
|
+
var $SyntaxError = GetIntrinsic('%SyntaxError%');
|
|
9805
|
+
var $TypeError$1 = GetIntrinsic('%TypeError%');
|
|
9753
9806
|
|
|
9754
9807
|
|
|
9755
9808
|
|
|
@@ -9806,8 +9859,8 @@ var defineDataProperty = defineDataProperty$1;
|
|
|
9806
9859
|
var hasDescriptors = require$$0$1();
|
|
9807
9860
|
|
|
9808
9861
|
|
|
9809
|
-
var $TypeError =
|
|
9810
|
-
var $floor =
|
|
9862
|
+
var $TypeError = GetIntrinsic('%TypeError%');
|
|
9863
|
+
var $floor = GetIntrinsic('%Math.floor%');
|
|
9811
9864
|
|
|
9812
9865
|
/** @typedef {(...args: unknown[]) => unknown} Func */
|
|
9813
9866
|
|
|
@@ -9852,13 +9905,13 @@ var callBind = createCommonjsModule(function (module) {
|
|
|
9852
9905
|
|
|
9853
9906
|
|
|
9854
9907
|
|
|
9855
|
-
var $TypeError =
|
|
9856
|
-
var $apply =
|
|
9857
|
-
var $call =
|
|
9858
|
-
var $reflectApply =
|
|
9908
|
+
var $TypeError = GetIntrinsic('%TypeError%');
|
|
9909
|
+
var $apply = GetIntrinsic('%Function.prototype.apply%');
|
|
9910
|
+
var $call = GetIntrinsic('%Function.prototype.call%');
|
|
9911
|
+
var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || functionBind.call($call, $apply);
|
|
9859
9912
|
|
|
9860
|
-
var $defineProperty =
|
|
9861
|
-
var $max =
|
|
9913
|
+
var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
|
|
9914
|
+
var $max = GetIntrinsic('%Math.max%');
|
|
9862
9915
|
|
|
9863
9916
|
if ($defineProperty) {
|
|
9864
9917
|
try {
|
|
@@ -9892,10 +9945,10 @@ if ($defineProperty) {
|
|
|
9892
9945
|
}
|
|
9893
9946
|
});
|
|
9894
9947
|
|
|
9895
|
-
var $indexOf$1 = callBind(
|
|
9948
|
+
var $indexOf$1 = callBind(GetIntrinsic('String.prototype.indexOf'));
|
|
9896
9949
|
|
|
9897
9950
|
var callBound = function callBoundIntrinsic(name, allowMissing) {
|
|
9898
|
-
var intrinsic =
|
|
9951
|
+
var intrinsic = GetIntrinsic(name, !!allowMissing);
|
|
9899
9952
|
if (typeof intrinsic === 'function' && $indexOf$1(name, '.prototype.') > -1) {
|
|
9900
9953
|
return callBind(intrinsic);
|
|
9901
9954
|
}
|
|
@@ -10130,7 +10183,7 @@ var forEach = function forEach(list, iterator, thisArg) {
|
|
|
10130
10183
|
|
|
10131
10184
|
var forEach_1 = forEach;
|
|
10132
10185
|
|
|
10133
|
-
var possibleNames = [
|
|
10186
|
+
var /** @type {ReturnType<import('.')>} */ possibleNames = [
|
|
10134
10187
|
'BigInt64Array',
|
|
10135
10188
|
'BigUint64Array',
|
|
10136
10189
|
'Float32Array',
|
|
@@ -10146,10 +10199,12 @@ var possibleNames = [
|
|
|
10146
10199
|
|
|
10147
10200
|
var g$1 = typeof globalThis === 'undefined' ? commonjsGlobal : globalThis;
|
|
10148
10201
|
|
|
10202
|
+
/** @type {import('.')} */
|
|
10149
10203
|
var availableTypedArrays$1 = function availableTypedArrays() {
|
|
10150
|
-
var out = [];
|
|
10204
|
+
var /** @type {ReturnType<typeof availableTypedArrays>} */ out = [];
|
|
10151
10205
|
for (var i = 0; i < possibleNames.length; i++) {
|
|
10152
10206
|
if (typeof g$1[possibleNames[i]] === 'function') {
|
|
10207
|
+
// @ts-expect-error
|
|
10153
10208
|
out[out.length] = possibleNames[i];
|
|
10154
10209
|
}
|
|
10155
10210
|
}
|
|
@@ -10167,7 +10222,7 @@ var typedArrays = availableTypedArrays();
|
|
|
10167
10222
|
var $slice = callBound('String.prototype.slice');
|
|
10168
10223
|
var getPrototypeOf = Object.getPrototypeOf; // require('getprototypeof');
|
|
10169
10224
|
|
|
10170
|
-
var $indexOf = callBound('Array.prototype.indexOf', true) || function indexOf(array, value) {
|
|
10225
|
+
var $indexOf = callBound('Array.prototype.indexOf', true) || /** @type {(array: readonly unknown[], value: unknown) => keyof array} */ function indexOf(array, value) {
|
|
10171
10226
|
for (var i = 0; i < array.length; i += 1) {
|
|
10172
10227
|
if (array[i] === value) {
|
|
10173
10228
|
return i;
|
|
@@ -10175,17 +10230,24 @@ var $indexOf = callBound('Array.prototype.indexOf', true) || function indexOf(ar
|
|
|
10175
10230
|
}
|
|
10176
10231
|
return -1;
|
|
10177
10232
|
};
|
|
10233
|
+
|
|
10234
|
+
/** @typedef {Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array | BigInt64Array | BigUint64Array} TypedArray */
|
|
10235
|
+
/** @typedef {'Int8Array' | 'Uint8Array' | 'Uint8ClampedArray' | 'Int16Array' | 'Uint16Array' | 'Int32Array' | 'Uint32Array' | 'Float32Array' | 'Float64Array' | 'BigInt64Array' | 'BigUint64Array'} TypedArrayName */
|
|
10236
|
+
/** @type {{ [k in `\$${TypedArrayName}`]?: (receiver: TypedArray) => string | typeof Uint8Array.prototype.slice.call | typeof Uint8Array.prototype.set.call } & { __proto__: null }} */
|
|
10178
10237
|
var cache = { __proto__: null };
|
|
10179
10238
|
if (hasToStringTag && gOPD && getPrototypeOf) {
|
|
10180
10239
|
forEach_1(typedArrays, function (typedArray) {
|
|
10181
10240
|
var arr = new g[typedArray]();
|
|
10182
10241
|
if (Symbol.toStringTag in arr) {
|
|
10183
10242
|
var proto = getPrototypeOf(arr);
|
|
10243
|
+
// @ts-expect-error TS won't narrow inside a closure
|
|
10184
10244
|
var descriptor = gOPD(proto, Symbol.toStringTag);
|
|
10185
10245
|
if (!descriptor) {
|
|
10186
10246
|
var superProto = getPrototypeOf(proto);
|
|
10247
|
+
// @ts-expect-error TS won't narrow inside a closure
|
|
10187
10248
|
descriptor = gOPD(superProto, Symbol.toStringTag);
|
|
10188
10249
|
}
|
|
10250
|
+
// @ts-expect-error TODO: fix
|
|
10189
10251
|
cache['$' + typedArray] = callBind(descriptor.get);
|
|
10190
10252
|
}
|
|
10191
10253
|
});
|
|
@@ -10194,38 +10256,52 @@ if (hasToStringTag && gOPD && getPrototypeOf) {
|
|
|
10194
10256
|
var arr = new g[typedArray]();
|
|
10195
10257
|
var fn = arr.slice || arr.set;
|
|
10196
10258
|
if (fn) {
|
|
10259
|
+
// @ts-expect-error TODO: fix
|
|
10197
10260
|
cache['$' + typedArray] = callBind(fn);
|
|
10198
10261
|
}
|
|
10199
10262
|
});
|
|
10200
10263
|
}
|
|
10201
10264
|
|
|
10265
|
+
/** @type {import('.')} */
|
|
10202
10266
|
var tryTypedArrays = function tryAllTypedArrays(value) {
|
|
10203
|
-
var found = false;
|
|
10204
|
-
forEach_1(
|
|
10205
|
-
|
|
10206
|
-
|
|
10207
|
-
|
|
10208
|
-
|
|
10209
|
-
|
|
10210
|
-
|
|
10267
|
+
/** @type {ReturnType<tryAllTypedArrays>} */ var found = false;
|
|
10268
|
+
forEach_1(
|
|
10269
|
+
// eslint-disable-next-line no-extra-parens
|
|
10270
|
+
/** @type {Record<`\$${TypedArrayName}`, typeof cache>} */ /** @type {any} */ (cache),
|
|
10271
|
+
/** @type {(getter: typeof cache, name: `\$${TypedArrayName}`) => void} */ function (getter, typedArray) {
|
|
10272
|
+
if (!found) {
|
|
10273
|
+
try {
|
|
10274
|
+
// @ts-expect-error TODO: fix
|
|
10275
|
+
if ('$' + getter(value) === typedArray) {
|
|
10276
|
+
found = $slice(typedArray, 1);
|
|
10277
|
+
}
|
|
10278
|
+
} catch (e) { /**/ }
|
|
10279
|
+
}
|
|
10211
10280
|
}
|
|
10212
|
-
|
|
10281
|
+
);
|
|
10213
10282
|
return found;
|
|
10214
10283
|
};
|
|
10215
10284
|
|
|
10285
|
+
/** @type {import('.')} */
|
|
10216
10286
|
var trySlices = function tryAllSlices(value) {
|
|
10217
|
-
var found = false;
|
|
10218
|
-
forEach_1(
|
|
10219
|
-
|
|
10220
|
-
|
|
10221
|
-
|
|
10222
|
-
|
|
10223
|
-
|
|
10287
|
+
/** @type {ReturnType<tryAllSlices>} */ var found = false;
|
|
10288
|
+
forEach_1(
|
|
10289
|
+
// eslint-disable-next-line no-extra-parens
|
|
10290
|
+
/** @type {any} */ (cache),
|
|
10291
|
+
/** @type {(getter: typeof cache, name: `\$${TypedArrayName}`) => void} */ function (getter, name) {
|
|
10292
|
+
if (!found) {
|
|
10293
|
+
try {
|
|
10294
|
+
// @ts-expect-error TODO: fix
|
|
10295
|
+
getter(value);
|
|
10296
|
+
found = $slice(name, 1);
|
|
10297
|
+
} catch (e) { /**/ }
|
|
10298
|
+
}
|
|
10224
10299
|
}
|
|
10225
|
-
|
|
10300
|
+
);
|
|
10226
10301
|
return found;
|
|
10227
10302
|
};
|
|
10228
10303
|
|
|
10304
|
+
/** @type {import('.')} */
|
|
10229
10305
|
var whichTypedArray$1 = function whichTypedArray(value) {
|
|
10230
10306
|
if (!value || typeof value !== 'object') { return false; }
|
|
10231
10307
|
if (!hasToStringTag) {
|
|
@@ -10245,10 +10321,13 @@ var whichTypedArray$1 = function whichTypedArray(value) {
|
|
|
10245
10321
|
|
|
10246
10322
|
var whichTypedArray = whichTypedArray$1;
|
|
10247
10323
|
|
|
10248
|
-
|
|
10324
|
+
/** @type {import('.')} */
|
|
10325
|
+
var isTypedArray$1 = function isTypedArray(value) {
|
|
10249
10326
|
return !!whichTypedArray(value);
|
|
10250
10327
|
};
|
|
10251
10328
|
|
|
10329
|
+
var isTypedArray = isTypedArray$1;
|
|
10330
|
+
|
|
10252
10331
|
var types = createCommonjsModule(function (module, exports) {
|
|
10253
10332
|
|
|
10254
10333
|
|
|
@@ -18197,42 +18276,48 @@ function _getStructStringFromClipboardData() {
|
|
|
18197
18276
|
while (1) switch (_context8.prev = _context8.next) {
|
|
18198
18277
|
case 0:
|
|
18199
18278
|
clipboardItem = data[0];
|
|
18200
|
-
|
|
18279
|
+
if (!(clipboardItem instanceof ClipboardItem)) {
|
|
18280
|
+
_context8.next = 23;
|
|
18281
|
+
break;
|
|
18282
|
+
}
|
|
18283
|
+
_context8.next = 4;
|
|
18201
18284
|
return safelyGetMimeType(clipboardItem, "web ".concat(ketcherCore.ChemicalMimeType.KET));
|
|
18202
|
-
case
|
|
18285
|
+
case 4:
|
|
18203
18286
|
_context8.t2 = _context8.sent;
|
|
18204
18287
|
if (_context8.t2) {
|
|
18205
|
-
_context8.next =
|
|
18288
|
+
_context8.next = 9;
|
|
18206
18289
|
break;
|
|
18207
18290
|
}
|
|
18208
|
-
_context8.next =
|
|
18291
|
+
_context8.next = 8;
|
|
18209
18292
|
return safelyGetMimeType(clipboardItem, "web ".concat(ketcherCore.ChemicalMimeType.Mol));
|
|
18210
|
-
case 7:
|
|
18211
|
-
_context8.t2 = _context8.sent;
|
|
18212
18293
|
case 8:
|
|
18294
|
+
_context8.t2 = _context8.sent;
|
|
18295
|
+
case 9:
|
|
18213
18296
|
_context8.t1 = _context8.t2;
|
|
18214
18297
|
if (_context8.t1) {
|
|
18215
|
-
_context8.next =
|
|
18298
|
+
_context8.next = 14;
|
|
18216
18299
|
break;
|
|
18217
18300
|
}
|
|
18218
|
-
_context8.next =
|
|
18301
|
+
_context8.next = 13;
|
|
18219
18302
|
return safelyGetMimeType(clipboardItem, "web ".concat(ketcherCore.ChemicalMimeType.Rxn));
|
|
18220
|
-
case 12:
|
|
18221
|
-
_context8.t1 = _context8.sent;
|
|
18222
18303
|
case 13:
|
|
18304
|
+
_context8.t1 = _context8.sent;
|
|
18305
|
+
case 14:
|
|
18223
18306
|
_context8.t0 = _context8.t1;
|
|
18224
18307
|
if (_context8.t0) {
|
|
18225
|
-
_context8.next =
|
|
18308
|
+
_context8.next = 19;
|
|
18226
18309
|
break;
|
|
18227
18310
|
}
|
|
18228
|
-
_context8.next =
|
|
18311
|
+
_context8.next = 18;
|
|
18229
18312
|
return safelyGetMimeType(clipboardItem, 'text/plain');
|
|
18230
|
-
case 17:
|
|
18231
|
-
_context8.t0 = _context8.sent;
|
|
18232
18313
|
case 18:
|
|
18314
|
+
_context8.t0 = _context8.sent;
|
|
18315
|
+
case 19:
|
|
18233
18316
|
structStr = _context8.t0;
|
|
18234
18317
|
return _context8.abrupt("return", structStr === '' ? '' : structStr.text());
|
|
18235
|
-
case
|
|
18318
|
+
case 23:
|
|
18319
|
+
return _context8.abrupt("return", data[ketcherCore.ChemicalMimeType.KET] || data[ketcherCore.ChemicalMimeType.Mol] || data[ketcherCore.ChemicalMimeType.Rxn] || data['text/plain']);
|
|
18320
|
+
case 24:
|
|
18236
18321
|
case "end":
|
|
18237
18322
|
return _context8.stop();
|
|
18238
18323
|
}
|
|
@@ -29297,7 +29382,14 @@ var SaveDialog = function (_Component) {
|
|
|
29297
29382
|
var service = factory.create(type, _objectSpread$l(_objectSpread$l({}, options), {}, {
|
|
29298
29383
|
ignoreChiralFlag: ignoreChiralFlag
|
|
29299
29384
|
}), queryPropertiesAreUsed);
|
|
29300
|
-
|
|
29385
|
+
var getStructFromStringByType = function getStructFromStringByType() {
|
|
29386
|
+
if (type === 'ket') {
|
|
29387
|
+
var selection = _this.props.editor.selection();
|
|
29388
|
+
return service.getStructureFromStructAsync(struct, undefined, selection);
|
|
29389
|
+
}
|
|
29390
|
+
return service.getStructureFromStructAsync(struct);
|
|
29391
|
+
};
|
|
29392
|
+
return getStructFromStringByType().then(function (structStr) {
|
|
29301
29393
|
_this.setState({
|
|
29302
29394
|
tabIndex: 0,
|
|
29303
29395
|
structStr: structStr
|
|
@@ -29599,7 +29691,8 @@ var mapStateToProps$4 = function mapStateToProps(state) {
|
|
|
29599
29691
|
moleculeErrors: state.modal.form.moleculeErrors,
|
|
29600
29692
|
checkState: state.options.check,
|
|
29601
29693
|
bondThickness: state.options.settings.bondThickness,
|
|
29602
|
-
ignoreChiralFlag: state.editor.render.options.ignoreChiralFlag
|
|
29694
|
+
ignoreChiralFlag: state.editor.render.options.ignoreChiralFlag,
|
|
29695
|
+
editor: state.editor
|
|
29603
29696
|
};
|
|
29604
29697
|
};
|
|
29605
29698
|
var mapDispatchToProps$6 = function mapDispatchToProps(dispatch) {
|
|
@@ -32720,8 +32813,8 @@ var KetcherBuilder = function () {
|
|
|
32720
32813
|
initApp(element, appRoot, staticResourcesUrl, {
|
|
32721
32814
|
buttons: buttons || {},
|
|
32722
32815
|
errorHandler: errorHandler || null,
|
|
32723
|
-
version: "2.18.0-rc.
|
|
32724
|
-
buildDate: "2024-
|
|
32816
|
+
version: "2.18.0-rc.4" ,
|
|
32817
|
+
buildDate: "2024-02-06T12:50:19" ,
|
|
32725
32818
|
buildNumber: ''
|
|
32726
32819
|
}, structService, resolve, togglerComponent);
|
|
32727
32820
|
});
|