@jetbrains/ring-ui 6.0.17 → 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.
|
@@ -16,7 +16,28 @@ import styles from './popup.css';
|
|
|
16
16
|
import { DEFAULT_DIRECTIONS, Dimension, Directions, Display, MaxHeight, MinWidth } from './popup.consts';
|
|
17
17
|
import { PopupTargetContext, PopupTarget } from './popup.target';
|
|
18
18
|
export { PopupTargetContext, PopupTarget };
|
|
19
|
-
const
|
|
19
|
+
const isPossibleClientSideNavigation = (event) => {
|
|
20
|
+
const target = event.target;
|
|
21
|
+
const link = target.closest('a');
|
|
22
|
+
// Taken from https://github.com/nanostores/router/blob/80a333db4cf0789fda21a02715ebabca15192642/index.js#L58-L69
|
|
23
|
+
return link &&
|
|
24
|
+
event.button === 0 && // Left mouse button
|
|
25
|
+
link.target !== '_blank' && // Not for new tab
|
|
26
|
+
link.origin === location.origin && // Not external link
|
|
27
|
+
link.rel !== 'external' && // Not external link
|
|
28
|
+
link.target !== '_self' && // Now manually disabled
|
|
29
|
+
!link.download && // Not download link
|
|
30
|
+
!event.altKey && // Not download link by user
|
|
31
|
+
!event.metaKey && // Not open in new tab by user
|
|
32
|
+
!event.ctrlKey && // Not open in new tab by user
|
|
33
|
+
!event.shiftKey && // Not open in new window by user
|
|
34
|
+
event.defaultPrevented;
|
|
35
|
+
};
|
|
36
|
+
const stop = (event) => {
|
|
37
|
+
if (!isPossibleClientSideNavigation(event)) {
|
|
38
|
+
event.stopPropagation();
|
|
39
|
+
}
|
|
40
|
+
};
|
|
20
41
|
export const getPopupContainer = (target) => (typeof target === 'string' ? document.querySelector(`[data-portaltarget=${target}]`) : target);
|
|
21
42
|
/**
|
|
22
43
|
* @constructor
|
|
@@ -198,7 +198,7 @@ export default class UserAgreementService {
|
|
|
198
198
|
};
|
|
199
199
|
hideDialog = (withoutNotifications) => {
|
|
200
200
|
const { onDialogHide } = this.config;
|
|
201
|
-
this.reactRoot.
|
|
201
|
+
this.reactRoot.render(null);
|
|
202
202
|
if (onDialogHide) {
|
|
203
203
|
onDialogHide();
|
|
204
204
|
this._dialogPromise = null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jetbrains/ring-ui",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.19",
|
|
4
4
|
"description": "JetBrains UI library",
|
|
5
5
|
"author": "JetBrains",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -80,50 +80,50 @@
|
|
|
80
80
|
"@babel/eslint-parser": "^7.24.1",
|
|
81
81
|
"@csstools/css-parser-algorithms": "^2.6.1",
|
|
82
82
|
"@csstools/stylelint-no-at-nest-rule": "^2.0.0",
|
|
83
|
-
"@jetbrains/eslint-config": "^5.4.
|
|
83
|
+
"@jetbrains/eslint-config": "^5.4.2",
|
|
84
84
|
"@jetbrains/stylelint-config": "^4.0.2",
|
|
85
85
|
"@primer/octicons": "^19.9.0",
|
|
86
86
|
"@rollup/plugin-babel": "^6.0.4",
|
|
87
87
|
"@rollup/plugin-json": "^6.1.0",
|
|
88
88
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
89
89
|
"@rollup/plugin-replace": "^5.0.5",
|
|
90
|
-
"@storybook/addon-a11y": "8.0.
|
|
91
|
-
"@storybook/addon-docs": "8.0.
|
|
90
|
+
"@storybook/addon-a11y": "8.0.8",
|
|
91
|
+
"@storybook/addon-docs": "8.0.8",
|
|
92
92
|
"@storybook/addon-essentials": "7.6.17",
|
|
93
93
|
"@storybook/addon-storyshots": "7.6.17",
|
|
94
94
|
"@storybook/addon-storyshots-puppeteer": "7.6.17",
|
|
95
|
-
"@storybook/addon-storysource": "8.0.
|
|
95
|
+
"@storybook/addon-storysource": "8.0.8",
|
|
96
96
|
"@storybook/addons": "7.6.17",
|
|
97
|
-
"@storybook/components": "8.0.
|
|
97
|
+
"@storybook/components": "8.0.8",
|
|
98
98
|
"@storybook/preview-api": "7.6.17",
|
|
99
99
|
"@storybook/react": "7.6.17",
|
|
100
100
|
"@storybook/react-webpack5": "7.6.17",
|
|
101
|
-
"@storybook/source-loader": "8.0.
|
|
102
|
-
"@storybook/theming": "8.0.
|
|
103
|
-
"@testing-library/react": "^15.0.
|
|
101
|
+
"@storybook/source-loader": "8.0.8",
|
|
102
|
+
"@storybook/theming": "8.0.8",
|
|
103
|
+
"@testing-library/react": "^15.0.2",
|
|
104
104
|
"@testing-library/user-event": "^14.5.2",
|
|
105
105
|
"@types/chai": "^4.3.14",
|
|
106
106
|
"@types/chai-as-promised": "^7.1.8",
|
|
107
107
|
"@types/chai-dom": "0.0.10",
|
|
108
108
|
"@types/chai-enzyme": "^0.6.13",
|
|
109
109
|
"@types/enzyme": "^3.10.18",
|
|
110
|
-
"@types/markdown-it": "^14.0.
|
|
111
|
-
"@types/react": "^18.2.
|
|
112
|
-
"@types/react-dom": "^18.2.
|
|
110
|
+
"@types/markdown-it": "^14.0.1",
|
|
111
|
+
"@types/react": "^18.2.79",
|
|
112
|
+
"@types/react-dom": "^18.2.25",
|
|
113
113
|
"@types/sinon": "^17.0.3",
|
|
114
114
|
"@types/sinon-chai": "^3.2.12",
|
|
115
|
-
"@typescript-eslint/eslint-plugin": "^7.
|
|
116
|
-
"@typescript-eslint/parser": "^7.
|
|
115
|
+
"@typescript-eslint/eslint-plugin": "^7.7.0",
|
|
116
|
+
"@typescript-eslint/parser": "^7.7.0",
|
|
117
117
|
"@wojtekmaj/enzyme-adapter-react-17": "^0.8.0",
|
|
118
118
|
"acorn": "^8.11.3",
|
|
119
119
|
"babel-plugin-require-context-hook": "^1.0.0",
|
|
120
|
-
"caniuse-lite": "^1.0.
|
|
120
|
+
"caniuse-lite": "^1.0.30001611",
|
|
121
121
|
"chai": "^5.1.0",
|
|
122
122
|
"chai-as-promised": "^7.1.1",
|
|
123
123
|
"chai-dom": "^1.10.0",
|
|
124
124
|
"chai-enzyme": "1.0.0-beta.1",
|
|
125
125
|
"cheerio": "^1.0.0-rc.12",
|
|
126
|
-
"core-js": "^3.
|
|
126
|
+
"core-js": "^3.37.0",
|
|
127
127
|
"cpy-cli": "^3.1.1",
|
|
128
128
|
"enzyme": "^3.11.0",
|
|
129
129
|
"eslint": "^8.57.0",
|
|
@@ -154,20 +154,20 @@
|
|
|
154
154
|
"mocha": "^10.4.0",
|
|
155
155
|
"pinst": "^3.0.0",
|
|
156
156
|
"prettier": "^3.2.5",
|
|
157
|
-
"puppeteer": "^22.6.
|
|
157
|
+
"puppeteer": "^22.6.5",
|
|
158
158
|
"raw-loader": "^4.0.2",
|
|
159
159
|
"react": "^18.2.0",
|
|
160
160
|
"react-dom": "^18.2.0",
|
|
161
161
|
"react-test-renderer": "^18.2.0",
|
|
162
162
|
"regenerator-runtime": "^0.14.1",
|
|
163
163
|
"rimraf": "^5.0.5",
|
|
164
|
-
"rollup": "^4.14.
|
|
164
|
+
"rollup": "^4.14.3",
|
|
165
165
|
"rollup-plugin-clear": "^2.0.7",
|
|
166
166
|
"rollup-plugin-styles": "^4.0.0",
|
|
167
167
|
"sinon": "^17.0.1",
|
|
168
168
|
"sinon-chai": "^3.7.0",
|
|
169
169
|
"storage-mock": "^2.1.0",
|
|
170
|
-
"storybook": "8.0.
|
|
170
|
+
"storybook": "8.0.8",
|
|
171
171
|
"storybook-addon-themes": "^6.1.0",
|
|
172
172
|
"stylelint": "^16.3.1",
|
|
173
173
|
"svg-inline-loader": "^0.8.2",
|
|
@@ -237,7 +237,7 @@
|
|
|
237
237
|
"postcss-font-family-system-ui": "^5.0.0",
|
|
238
238
|
"postcss-loader": "^8.1.1",
|
|
239
239
|
"postcss-modules-values-replace": "^4.2.0",
|
|
240
|
-
"postcss-preset-env": "^9.5.
|
|
240
|
+
"postcss-preset-env": "^9.5.5",
|
|
241
241
|
"prop-types": "^15.8.1",
|
|
242
242
|
"react-movable": "^3.2.0",
|
|
243
243
|
"react-virtualized": "^9.22.5",
|