@jetbrains/ring-ui-built 6.0.18 → 6.0.19

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.
@@ -41,8 +41,36 @@ import 'core-js/modules/es.array.sort.js';
41
41
 
42
42
  var modules_2f69e2e2 = {"light":"light_rui_2ac4","popup":"popup_rui_871b font_rui_f295","hidden":"hidden_rui_871b","showing":"showing_rui_871b","attached":"attached_rui_871b"};
43
43
 
44
- var stop = function stop(e) {
45
- return e.stopPropagation();
44
+ var isPossibleClientSideNavigation = function isPossibleClientSideNavigation(event) {
45
+ var target = event.target;
46
+ var link = target.closest('a');
47
+ // Taken from https://github.com/nanostores/router/blob/80a333db4cf0789fda21a02715ebabca15192642/index.js#L58-L69
48
+ return link && event.button === 0 &&
49
+ // Left mouse button
50
+ link.target !== '_blank' &&
51
+ // Not for new tab
52
+ link.origin === location.origin &&
53
+ // Not external link
54
+ link.rel !== 'external' &&
55
+ // Not external link
56
+ link.target !== '_self' &&
57
+ // Now manually disabled
58
+ !link.download &&
59
+ // Not download link
60
+ !event.altKey &&
61
+ // Not download link by user
62
+ !event.metaKey &&
63
+ // Not open in new tab by user
64
+ !event.ctrlKey &&
65
+ // Not open in new tab by user
66
+ !event.shiftKey &&
67
+ // Not open in new window by user
68
+ event.defaultPrevented;
69
+ };
70
+ var stop = function stop(event) {
71
+ if (!isPossibleClientSideNavigation(event)) {
72
+ event.stopPropagation();
73
+ }
46
74
  };
47
75
  var getPopupContainer = function getPopupContainer(target) {
48
76
  return typeof target === 'string' ? document.querySelector("[data-portaltarget=".concat(target, "]")) : target;
@@ -405,7 +405,7 @@ var UserAgreementService = /*#__PURE__*/_createClass(function UserAgreementServi
405
405
  });
406
406
  _defineProperty(this, "hideDialog", function (withoutNotifications) {
407
407
  var onDialogHide = _this.config.onDialogHide;
408
- _this.reactRoot.unmount();
408
+ _this.reactRoot.render(null);
409
409
  if (onDialogHide) {
410
410
  onDialogHide();
411
411
  _this._dialogPromise = null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetbrains/ring-ui-built",
3
- "version": "6.0.18",
3
+ "version": "6.0.19",
4
4
  "description": "JetBrains UI library",
5
5
  "author": "JetBrains",
6
6
  "license": "Apache-2.0",