ketcher-react 2.7.0 → 2.7.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.
package/dist/index.js CHANGED
@@ -2934,7 +2934,7 @@ var zoom = {
2934
2934
 
2935
2935
  var openHelpLink = function openHelpLink() {
2936
2936
  var _window$open;
2937
- return (_window$open = window.open("https://github.com/epam/ketcher/blob/".concat("v2.7.0\n", "/documentation/help.md#ketcher-overview"))) === null || _window$open === void 0 ? void 0 : _window$open.focus();
2937
+ return (_window$open = window.open("https://github.com/epam/ketcher/blob/".concat("v2.7.2\n", "/documentation/help.md#ketcher-overview"))) === null || _window$open === void 0 ? void 0 : _window$open.focus();
2938
2938
  };
2939
2939
  var help = {
2940
2940
  help: {
@@ -13702,7 +13702,7 @@ var TemplateTool = function () {
13702
13702
  function TemplateTool(editor, tmpl) {
13703
13703
  _classCallCheck__default["default"](this, TemplateTool);
13704
13704
  this.editor = editor;
13705
- this.mode = tmpl.mode;
13705
+ this.mode = getTemplateMode(tmpl);
13706
13706
  this.editor.selection(null);
13707
13707
  this.template = {
13708
13708
  aid: parseInt(tmpl.aid) || 0,
@@ -14068,6 +14068,12 @@ function addSaltsAndSolventsOnCanvasWithoutMerge(restruct, template, dragCtx, ed
14068
14068
  info: false
14069
14069
  });
14070
14070
  }
14071
+ function getTemplateMode(tmpl) {
14072
+ var _tmpl$props;
14073
+ if (tmpl.mode) return tmpl.mode;
14074
+ if (['Functional Groups', 'Salts and Solvents'].includes((_tmpl$props = tmpl.props) === null || _tmpl$props === void 0 ? void 0 : _tmpl$props.group)) return 'fg';
14075
+ return null;
14076
+ }
14071
14077
  function getSign(molecule, bond, v) {
14072
14078
  var begin = molecule.atoms.get(bond.begin).pp;
14073
14079
  var end = molecule.atoms.get(bond.end).pp;
@@ -22662,8 +22668,8 @@ var KetcherBuilder = function () {
22662
22668
  initApp(element, staticResourcesUrl, {
22663
22669
  buttons: buttons || {},
22664
22670
  errorHandler: errorHandler || null,
22665
- version: "2.7.0" ,
22666
- buildDate: "2023-01-31T13:14:51" ,
22671
+ version: "2.7.2" ,
22672
+ buildDate: "2023-02-08T19:57:37" ,
22667
22673
  buildNumber: ''
22668
22674
  }, structService, resolve);
22669
22675
  });