ketcher-react 2.23.0-rc.2 → 2.23.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.
@@ -489,7 +489,7 @@ function _copy(_x3) {
489
489
  }
490
490
  function _copy2() {
491
491
  _copy2 = _asyncToGenerator( _regeneratorRuntime.mark(function _callee3(data) {
492
- var clipboardItemData;
492
+ var clipboardItemData, clipboardItem, textData;
493
493
  return _regeneratorRuntime.wrap(function _callee3$(_context3) {
494
494
  while (1) switch (_context3.prev = _context3.next) {
495
495
  case 0:
@@ -501,20 +501,36 @@ function _copy2() {
501
501
  type: mimeTypeToSet
502
502
  }));
503
503
  });
504
- _context3.next = 5;
505
- return navigator.clipboard.write([new ClipboardItem(clipboardItemData)]);
506
- case 5:
507
- _context3.next = 11;
504
+ clipboardItem = new ClipboardItem(clipboardItemData);
505
+ if (!(clipboardItem.presentationStyle && clipboardItem.presentationStyle === 'unspecified')) {
506
+ _context3.next = 11;
507
+ break;
508
+ }
509
+ if (!navigator.clipboard.writeText) {
510
+ _context3.next = 9;
511
+ break;
512
+ }
513
+ textData = data['text/plain'] || JSON.stringify(data);
514
+ _context3.next = 9;
515
+ return navigator.clipboard.writeText(textData);
516
+ case 9:
517
+ _context3.next = 13;
508
518
  break;
509
- case 7:
510
- _context3.prev = 7;
519
+ case 11:
520
+ _context3.next = 13;
521
+ return navigator.clipboard.write([clipboardItem]);
522
+ case 13:
523
+ _context3.next = 19;
524
+ break;
525
+ case 15:
526
+ _context3.prev = 15;
511
527
  _context3.t0 = _context3["catch"](0);
512
528
  KetcherLogger.error('cliparea.jsx::copy', _context3.t0);
513
- case 11:
529
+ case 19:
514
530
  case "end":
515
531
  return _context3.stop();
516
532
  }
517
- }, _callee3, null, [[0, 7]]);
533
+ }, _callee3, null, [[0, 15]]);
518
534
  }));
519
535
  return _copy2.apply(this, arguments);
520
536
  }
@@ -3595,7 +3611,7 @@ var zoom = {
3595
3611
 
3596
3612
  var openHelpLink = function openHelpLink() {
3597
3613
  var _window$open;
3598
- return (_window$open = window.open("https://github.com/epam/ketcher/blob/".concat("v2.23.0-rc.2\n", "/documentation/help.md#ketcher-overview"))) === null || _window$open === void 0 ? void 0 : _window$open.focus();
3614
+ return (_window$open = window.open("https://github.com/epam/ketcher/blob/".concat("v2.23.0-rc.4\n", "/documentation/help.md#ketcher-overview"))) === null || _window$open === void 0 ? void 0 : _window$open.focus();
3599
3615
  };
3600
3616
  var help = {
3601
3617
  help: {
@@ -33094,8 +33110,8 @@ var KetcherBuilder = function () {
33094
33110
  initApp(element, appRoot, staticResourcesUrl, {
33095
33111
  buttons: buttons || {},
33096
33112
  errorHandler: errorHandler || null,
33097
- version: "2.23.0-rc.2" ,
33098
- buildDate: "2024-07-10T19:46:12" ,
33113
+ version: "2.23.0-rc.4" ,
33114
+ buildDate: "2024-08-14T15:07:42" ,
33099
33115
  buildNumber: ''
33100
33116
  }, structService, resolve, togglerComponent);
33101
33117
  });