ketcher-react 2.27.0-rc.2 → 2.28.0-dev.1

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.
@@ -51,7 +51,7 @@ import 'redux-logger';
51
51
  import thunk from 'redux-thunk';
52
52
  import useResizeObserver from 'use-resize-observer/polyfilled';
53
53
  import { useInView } from 'react-intersection-observer';
54
- import { IconButton as IconButton$1, Collapse, ClickAwayListener, Button as Button$1, Popover, ToggleButtonGroup, ToggleButton, MenuList, createTheme, ThemeProvider } from '@mui/material';
54
+ import { IconButton as IconButton$1, Collapse, ClickAwayListener, Button as Button$1, Popover, ToggleButtonGroup, ToggleButton, Tooltip, MenuList, createTheme, ThemeProvider } from '@mui/material';
55
55
  import { createSelector } from 'reselect';
56
56
  import { isIE } from 'react-device-detect';
57
57
  import _classPrivateFieldGet from '@babel/runtime/helpers/classPrivateFieldGet';
@@ -3733,7 +3733,7 @@ var zoom = {
3733
3733
 
3734
3734
  var openHelpLink = function openHelpLink() {
3735
3735
  var _window$open;
3736
- return (_window$open = window.open("https://github.com/epam/ketcher/blob/".concat("v2.27.0-rc.2\n", "/documentation/help.md#ketcher-overview"))) === null || _window$open === void 0 ? void 0 : _window$open.focus();
3736
+ return (_window$open = window.open("https://github.com/epam/ketcher/blob/".concat("v2.28.0-dev.1\n", "/documentation/help.md#ketcher-overview"))) === null || _window$open === void 0 ? void 0 : _window$open.focus();
3737
3737
  };
3738
3738
  var help = {
3739
3739
  help: {
@@ -27896,7 +27896,7 @@ var Select = function Select(_ref2) {
27896
27896
  });
27897
27897
  };
27898
27898
 
27899
- var classes$B = {"button-common-styles":"form-module_button-common-styles__BvKSn","scrollbar":"form-module_scrollbar__MgLtc","inputWithExtraLabel":"form-module_inputWithExtraLabel__Y--OH","extraLabel":"form-module_extraLabel__2IE13","dataError":"form-module_dataError__IXK1h","inputWrapper":"form-module_inputWrapper__sIDHH","inputWithEditButtonWrapper":"form-module_inputWithEditButtonWrapper__hM70e","editButton":"form-module_editButton__zLQI5"};
27899
+ var classes$B = {"button-common-styles":"form-module_button-common-styles__BvKSn","scrollbar":"form-module_scrollbar__MgLtc","inputWithExtraLabel":"form-module_inputWithExtraLabel__Y--OH","extraLabel":"form-module_extraLabel__2IE13","dataError":"form-module_dataError__IXK1h","inputWrapper":"form-module_inputWrapper__sIDHH","inputWithEditButtonWrapper":"form-module_inputWithEditButtonWrapper__hM70e","editButton":"form-module_editButton__zLQI5","divWithTooltipAndAboutIcon":"form-module_divWithTooltipAndAboutIcon__rnNIB"};
27900
27900
 
27901
27901
  var _excluded$m = ["schema", "result"],
27902
27902
  _excluded2$3 = ["labelPos", "title", "children"],
@@ -28023,11 +28023,33 @@ function Label(_ref) {
28023
28023
  props = _objectWithoutProperties(_ref, _excluded2$3);
28024
28024
  var tooltip = props.tooltip ? props.tooltip : null;
28025
28025
  return jsxs("label", _objectSpread$D(_objectSpread$D({}, props), {}, {
28026
- children: [title && labelPos !== 'after' ? jsx("span", {
28027
- title: tooltip,
28026
+ children: [title && labelPos !== 'after' ? tooltip ? jsxs("div", {
28027
+ className: clsx(_defineProperty$1({}, classes$B.divWithTooltipAndAboutIcon, true)),
28028
+ children: [jsx("span", {
28029
+ children: title
28030
+ }), jsx(Tooltip, {
28031
+ title: tooltip,
28032
+ children: jsx("div", {
28033
+ children: jsx(Icon, {
28034
+ name: "about"
28035
+ })
28036
+ })
28037
+ })]
28038
+ }) : jsx("span", {
28028
28039
  children: title
28029
- }) : '', children, title && labelPos === 'after' ? jsx("span", {
28030
- title: tooltip,
28040
+ }) : '', children, title && labelPos === 'after' ? tooltip ? jsxs("div", {
28041
+ className: clsx(_defineProperty$1({}, classes$B.divWithTooltipAndAboutIcon, true)),
28042
+ children: [jsx(Tooltip, {
28043
+ title: tooltip,
28044
+ children: jsx("div", {
28045
+ children: jsx(Icon, {
28046
+ name: "about"
28047
+ })
28048
+ })
28049
+ }), jsx("span", {
28050
+ children: title
28051
+ })]
28052
+ }) : jsx("span", {
28031
28053
  children: title
28032
28054
  }) : '']
28033
28055
  }));
@@ -29107,7 +29129,7 @@ var SettingsDialog = function SettingsDialog(props) {
29107
29129
  return jsx(Dialog, {
29108
29130
  className: classes$x.settings,
29109
29131
  result: function result() {
29110
- return formState.result;
29132
+ return [formState.result, initState];
29111
29133
  },
29112
29134
  valid: function valid() {
29113
29135
  return formState.valid;
@@ -29161,8 +29183,20 @@ var mapDispatchToProps$d = function mapDispatchToProps(dispatch, ownProps) {
29161
29183
  return dispatch(setDefaultSettings());
29162
29184
  },
29163
29185
  onOk: function onOk(res) {
29164
- dispatch(saveSettings(res));
29165
- ownProps.onOk(res);
29186
+ var _res = _slicedToArray$1(res, 2),
29187
+ result = _res[0],
29188
+ initState = _res[1];
29189
+ dispatch(saveSettings(result));
29190
+ ownProps.onOk(result);
29191
+ var showNotification = initState.reactionComponentMarginSize !== result.reactionComponentMarginSize;
29192
+ showNotification && dispatch(onAction({
29193
+ dialog: 'info-modal',
29194
+ prop: {
29195
+ title: '',
29196
+ customText: 'To fully apply these changes, you need to apply the layout.',
29197
+ button: 'OK'
29198
+ }
29199
+ }));
29166
29200
  },
29167
29201
  onACSStyle: function onACSStyle(result) {
29168
29202
  dispatch(updateFormState({
@@ -31170,7 +31204,7 @@ function couldBeSaved(struct, format) {
31170
31204
  if (hasRxnArrow) {
31171
31205
  var arrayOfArrows = Array.from(struct.rxnArrows.values());
31172
31206
  var rxnArrowMode = arrayOfArrows[0].mode;
31173
- if (rxnArrowMode !== RxnArrowMode.OpenAngle) {
31207
+ if (![RxnArrowMode.OpenAngle, RxnArrowMode.Retrosynthetic].includes(rxnArrowMode)) {
31174
31208
  warnings.push("The ".concat(formatName, " format does not support drawn elements: the reaction ").concat(rxnArrowMode, " arrow will be replaced with the reaction arrow"));
31175
31209
  }
31176
31210
  }
@@ -33985,12 +34019,12 @@ var PasteErrorModalBody = function PasteErrorModalBody() {
33985
34019
  var styles = {"infoModal":"InfoModal-module_infoModal__0Vza1","ok":"InfoModal-module_ok__BZ1ar"};
33986
34020
 
33987
34021
  function ErrorInfoModal(props) {
33988
- var _config$paste$title;
34022
+ var _config$paste$title, _props$title;
33989
34023
  var paste = (_config$paste$title = configWithNonViewOnlyActionsDisabled.paste.title) !== null && _config$paste$title !== void 0 ? _config$paste$title : 'Paste';
33990
34024
  var isPasteError = props.message === paste;
33991
34025
  var defaultCutCopyMessage = "This action is unavailable via menu. Instead, use shortcut to ".concat(props.message, ".");
33992
34026
  var headerContent = jsx("div", {
33993
- children: error.message
34027
+ children: (_props$title = props.title) !== null && _props$title !== void 0 ? _props$title : error.message
33994
34028
  });
33995
34029
  return jsx(Dialog, {
33996
34030
  className: styles.infoModal,
@@ -33998,7 +34032,7 @@ function ErrorInfoModal(props) {
33998
34032
  buttons: [jsx("button", {
33999
34033
  onClick: props.onOk,
34000
34034
  className: styles.ok,
34001
- children: "Close"
34035
+ children: props.button || 'Close'
34002
34036
  }, "ok")],
34003
34037
  headerContent: headerContent,
34004
34038
  children: jsx("div", {
@@ -34884,8 +34918,8 @@ var KetcherBuilder = function () {
34884
34918
  cleanup = initApp(element, appRoot, staticResourcesUrl, {
34885
34919
  buttons: buttons || {},
34886
34920
  errorHandler: errorHandler || null,
34887
- version: "2.27.0-rc.2" ,
34888
- buildDate: "2024-11-12T19:33:40" ,
34921
+ version: "2.28.0-dev.1" ,
34922
+ buildDate: "2024-11-12T19:05:09" ,
34889
34923
  buildNumber: '',
34890
34924
  customButtons: customButtons || []
34891
34925
  }, structService, resolve, togglerComponent);