ketcher-react 2.25.0-rc.1 → 2.25.0-rc.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.
@@ -3701,7 +3701,7 @@ var zoom = {
3701
3701
 
3702
3702
  var openHelpLink = function openHelpLink() {
3703
3703
  var _window$open;
3704
- return (_window$open = window.open("https://github.com/epam/ketcher/blob/".concat("v2.25.0-rc.1\n", "/documentation/help.md#ketcher-overview"))) === null || _window$open === void 0 ? void 0 : _window$open.focus();
3704
+ return (_window$open = window.open("https://github.com/epam/ketcher/blob/".concat("v2.25.0-rc.2\n", "/documentation/help.md#ketcher-overview"))) === null || _window$open === void 0 ? void 0 : _window$open.focus();
3705
3705
  };
3706
3706
  var help = {
3707
3707
  help: {
@@ -8031,7 +8031,13 @@ var Button = function Button(_ref) {
8031
8031
  };
8032
8032
 
8033
8033
  var _templateObject$b;
8034
- var Container$2 = styled.div(_templateObject$b || (_templateObject$b = _taggedTemplateLiteral(["\n > svg {\n height: 100%;\n width: 100%;\n }\n"])));
8034
+ var Container$2 = styled.div(_templateObject$b || (_templateObject$b = _taggedTemplateLiteral(["\n ", "\n"])), function (props) {
8035
+ if (props.fullsize) {
8036
+ return "\n > svg {\n height: 100%;\n width: 100%;\n }\n ";
8037
+ } else {
8038
+ return "\n display: flex;\n justify-content: center;\n align-items: center;\n ";
8039
+ }
8040
+ });
8035
8041
 
8036
8042
  var normalizeStruct = function normalizeStruct(molV2000StringOrStruct) {
8037
8043
  if (molV2000StringOrStruct instanceof Struct) {
@@ -8048,6 +8054,7 @@ var StructRender = function StructRender(_ref) {
8048
8054
  var struct = _ref.struct,
8049
8055
  options = _ref.options,
8050
8056
  className = _ref.className,
8057
+ fullsize = _ref.fullsize,
8051
8058
  update = _ref.update;
8052
8059
  var renderRef = useRef(null);
8053
8060
  useEffect(function () {
@@ -8060,7 +8067,8 @@ var StructRender = function StructRender(_ref) {
8060
8067
  }, [struct, options, update]);
8061
8068
  return jsx(Container$2, {
8062
8069
  ref: renderRef,
8063
- className: className
8070
+ className: className,
8071
+ fullsize: fullsize
8064
8072
  });
8065
8073
  };
8066
8074
 
@@ -8348,6 +8356,14 @@ var UnstyledAmbiguousMonomerPreview = function UnstyledAmbiguousMonomerPreview(_
8348
8356
  return b.ratio - a.ratio;
8349
8357
  }
8350
8358
  });
8359
+ if (!isAlternatives) {
8360
+ var overallRatio = sortedData.reduce(function (acc, item) {
8361
+ return acc + (item.ratio || 1);
8362
+ }, 0);
8363
+ sortedData.forEach(function (entry) {
8364
+ entry.ratio = Math.round((entry.ratio || 1) / overallRatio * 100);
8365
+ });
8366
+ }
8351
8367
  return sortedData.slice(0, 5);
8352
8368
  }, [previewData, isAlternatives]);
8353
8369
  return jsxs(ContainerDynamic, {
@@ -32467,6 +32483,7 @@ var TemplateTable = function TemplateTable(props) {
32467
32483
  children: [jsx(StructRender, {
32468
32484
  struct: tmpl.struct,
32469
32485
  className: classes$8.struct,
32486
+ fullsize: true,
32470
32487
  options: _objectSpread$7(_objectSpread$7({}, renderOptions), {}, {
32471
32488
  autoScaleMargin: 10,
32472
32489
  cachePrefix: 'templates',
@@ -34121,8 +34138,8 @@ var KetcherBuilder = function () {
34121
34138
  cleanup = initApp(element, appRoot, staticResourcesUrl, {
34122
34139
  buttons: buttons || {},
34123
34140
  errorHandler: errorHandler || null,
34124
- version: "2.25.0-rc.1" ,
34125
- buildDate: "2024-09-03T15:37:44" ,
34141
+ version: "2.25.0-rc.2" ,
34142
+ buildDate: "2024-09-14T10:49:21" ,
34126
34143
  buildNumber: ''
34127
34144
  }, structService, resolve, togglerComponent);
34128
34145
  });