ketcher-react 2.6.1 → 2.6.2

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.
@@ -40,7 +40,7 @@ import ReactDOM from 'react-dom';
40
40
  import { connect, useDispatch, useSelector, Provider } from 'react-redux';
41
41
  import { combineReducers, createStore as createStore$1, applyMiddleware } from 'redux';
42
42
  import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
43
- import { logger } from 'redux-logger';
43
+ import 'redux-logger';
44
44
  import thunk from 'redux-thunk';
45
45
  import { throttle as throttle$1, inRange, isEqual as isEqual$1, range as range$1 } from 'lodash';
46
46
  import useResizeObserver from 'use-resize-observer/polyfilled';
@@ -356,7 +356,6 @@ function _copy(cb, data) {
356
356
  cb.setData(fmt, data[fmt]);
357
357
  });
358
358
  } catch (ex) {
359
- console.info("Could not write exact type ".concat(curFmt));
360
359
  }
361
360
  }
362
361
  }
@@ -682,7 +681,6 @@ var storage = {
682
681
  try {
683
682
  item = JSON.parse(localStorage.getItem(key));
684
683
  } catch (ex) {
685
- console.info('LocalStorage:', ex.name);
686
684
  }
687
685
  return item;
688
686
  },
@@ -692,7 +690,6 @@ var storage = {
692
690
  localStorage.setItem(key, JSON.stringify(data));
693
691
  isSet = true;
694
692
  } catch (ex) {
695
- console.info('LocalStorage:', ex.name);
696
693
  isSet = false;
697
694
  }
698
695
  return isSet;
@@ -826,7 +823,6 @@ function constant(schema, prop) {
826
823
  return desc.constant || desc["enum"][0];
827
824
  }
828
825
  function mapOf(schema, prop) {
829
- console.assert(schema.oneOf);
830
826
  return schema.oneOf.reduce(function (res, desc) {
831
827
  res[constant(desc, prop)] = desc;
832
828
  return res;
@@ -2854,7 +2850,7 @@ var zoom = {
2854
2850
 
2855
2851
  var openHelpLink = function openHelpLink() {
2856
2852
  var _window$open;
2857
- return (_window$open = window.open("https://github.com/epam/ketcher/blob/".concat("v2.6.0\n", "/documentation/help.md#ketcher-overview"))) === null || _window$open === void 0 ? void 0 : _window$open.focus();
2853
+ return (_window$open = window.open("https://github.com/epam/ketcher/blob/".concat("v2.6.2\n", "/documentation/help.md#ketcher-overview"))) === null || _window$open === void 0 ? void 0 : _window$open.focus();
2858
2854
  };
2859
2855
  var help = {
2860
2856
  help: {
@@ -7624,9 +7620,7 @@ function execute(activeTool, _ref) {
7624
7620
  }
7625
7621
  } else if (typeof action === 'function') {
7626
7622
  action(editor, server, options);
7627
- } else {
7628
- console.info('no action');
7629
- }
7623
+ } else ;
7630
7624
  return activeTool;
7631
7625
  }
7632
7626
  function selected(actObj, activeTool, _ref2) {
@@ -7924,7 +7918,6 @@ function createStore (options, server, setEditor) {
7924
7918
  templates: initTmplsState
7925
7919
  };
7926
7920
  var middleware = [thunk];
7927
- middleware.push(logger);
7928
7921
  var rootReducer = getRootReducer(setEditor);
7929
7922
  return createStore$1(rootReducer, initState, applyMiddleware.apply(void 0, middleware));
7930
7923
  }
@@ -9511,7 +9504,6 @@ var TopToolbar = function TopToolbar(_ref) {
9511
9504
  isCollapsed: width < collapseLimit
9512
9505
  }), jsx(SystemControls, {
9513
9506
  onHistoryClick: function onHistoryClick() {
9514
- console.log('History button clicked');
9515
9507
  },
9516
9508
  onSettingsOpen: onSettingsOpen,
9517
9509
  onFullscreen: onFullscreen,
@@ -12232,7 +12224,6 @@ function sgroupDialog(editor, id, defaultType) {
12232
12224
  var type = sg ? sg.type : defaultType;
12233
12225
  var eventName = type === 'DAT' ? 'sdataEdit' : 'sgroupEdit';
12234
12226
  if (!selection.atoms && !selection.bonds && !sg) {
12235
- console.info('There is no selection or sgroup');
12236
12227
  return;
12237
12228
  }
12238
12229
  var attrs;
@@ -13063,7 +13054,6 @@ var EraserTool = function () {
13063
13054
  } else if (ci.map === 'texts') {
13064
13055
  this.editor.update(fromTextDeletion(restruct, ci.id));
13065
13056
  } else {
13066
- console.error('EraserTool: unable to delete the object ' + ci.map + '[' + ci.id + ']');
13067
13057
  return;
13068
13058
  }
13069
13059
  this.editor.selection(null);
@@ -14802,8 +14792,8 @@ var Editor$3 = function () {
14802
14792
  value: function renderAndRecoordinateStruct(struct) {
14803
14793
  var action = fromNewCanvas(this.render.ctab, struct);
14804
14794
  this.update(action);
14805
- var structCenter = getStructCenter(this.render.ctab);
14806
- recoordinate(this, structCenter);
14795
+ getStructCenter(this.render.ctab);
14796
+ recoordinate(this);
14807
14797
  return this.render.ctab.molecule;
14808
14798
  }
14809
14799
  }, {
@@ -14852,8 +14842,8 @@ var Editor$3 = function () {
14852
14842
  }
14853
14843
  this.render.setZoom(value);
14854
14844
  var selection = this.selection();
14855
- var structCenter = getStructCenter(this.render.ctab, selection);
14856
- recoordinate(this, structCenter);
14845
+ getStructCenter(this.render.ctab, selection);
14846
+ recoordinate(this);
14857
14847
  this.render.update();
14858
14848
  return this.render.options.zoom;
14859
14849
  }
@@ -15091,7 +15081,6 @@ function domEventSetup(editor, clientArea) {
15091
15081
  }
15092
15082
  function recoordinate(editor, rp
15093
15083
  ) {
15094
- console.assert(rp, 'Reference point not specified');
15095
15084
  editor.render.setScrollOffset(0, 0);
15096
15085
  }
15097
15086
  function getStructCenter(ReStruct, selection) {
@@ -16109,7 +16098,6 @@ function greekify(str) {
16109
16098
  });
16110
16099
  }
16111
16100
  function filterLib(lib, filter$1) {
16112
- console.warn('Filter', filter$1);
16113
16101
  var re = new RegExp(escapeRegExp(greekify(filter$1)), 'i');
16114
16102
  return flow(filter(function (item) {
16115
16103
  return !filter$1 || re.test(greekify(item.struct.name)) || re.test(greekify(item.props.group));
@@ -16119,7 +16107,6 @@ function filterLib(lib, filter$1) {
16119
16107
  }, {}))(lib);
16120
16108
  }
16121
16109
  function filterFGLib(lib, filter$1) {
16122
- console.warn('Filter', filter$1);
16123
16110
  var re = new RegExp(escapeRegExp(greekify(filter$1)), 'i');
16124
16111
  return flow(filter(function (item) {
16125
16112
  return !filter$1 || re.test(greekify(item.struct.name));
@@ -17168,7 +17155,6 @@ var mapDispatchToProps$b = function mapDispatchToProps(dispatch, ownProps) {
17168
17155
  result: JSON.parse(newOpts)
17169
17156
  }));
17170
17157
  } catch (ex) {
17171
- console.info('Bad file');
17172
17158
  }
17173
17159
  },
17174
17160
  onReset: function onReset() {
@@ -17583,7 +17569,6 @@ function renderStruct(el, struct) {
17583
17569
  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
17584
17570
  if (el) {
17585
17571
  if (struct) {
17586
- console.info('render!', el.clientWidth, el.clientWidth);
17587
17572
  struct.initHalfBonds();
17588
17573
  struct.initNeighbors();
17589
17574
  struct.setImplicitHydrogen();
@@ -17947,7 +17932,7 @@ var MiewDialog = function MiewDialog(_ref) {
17947
17932
  }).then(function () {
17948
17933
  return miew.setOptions(miewOpts);
17949
17934
  })["catch"](function (ex) {
17950
- return console.error(ex.message);
17935
+ return (void 0);
17951
17936
  });
17952
17937
  }, [miewOpts, server, struct]);
17953
17938
  var exportCML = useCallback(function () {
@@ -21767,8 +21752,8 @@ var KetcherBuilder = function () {
21767
21752
  initApp(element, staticResourcesUrl, {
21768
21753
  buttons: buttons || {},
21769
21754
  errorHandler: errorHandler || null,
21770
- version: "2.6.1" ,
21771
- buildDate: "2022-11-12T14:27:59" ,
21755
+ version: "2.6.2" ,
21756
+ buildDate: "2022-11-18T12:28:46" ,
21772
21757
  buildNumber: ''
21773
21758
  }, structService, resolve);
21774
21759
  });