@jetbrains/ring-ui 5.0.97 → 5.0.99
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.
- package/components/clipboard/clipboard-fallback.d.ts +2 -0
- package/components/clipboard/clipboard-fallback.js +44 -0
- package/components/clipboard/clipboard.d.ts +5 -0
- package/components/clipboard/clipboard.js +41 -0
- package/components/user-card/card.d.ts +16 -0
- package/components/user-card/card.js +37 -14
- package/components/user-card/tooltip.d.ts +2 -2
- package/components/user-card/tooltip.js +10 -4
- package/components/user-card/user-card.css +61 -5
- package/dist/_helpers/card.js +56 -11
- package/dist/clipboard/clipboard-fallback.d.ts +2 -0
- package/dist/clipboard/clipboard-fallback.js +42 -0
- package/dist/clipboard/clipboard.d.ts +5 -0
- package/dist/clipboard/clipboard.js +91 -0
- package/dist/style.css +1 -1
- package/dist/user-card/card.d.ts +16 -0
- package/dist/user-card/card.js +35 -0
- package/dist/user-card/smart-user-card-tooltip.js +12 -0
- package/dist/user-card/tooltip.d.ts +2 -2
- package/dist/user-card/tooltip.js +24 -12
- package/dist/user-card/user-card.js +21 -9
- package/dist/user-card-ng/user-card-ng.js +17 -6
- package/package.json +6 -6
package/dist/user-card/card.d.ts
CHANGED
|
@@ -9,16 +9,22 @@ export interface UserCardUser {
|
|
|
9
9
|
online?: boolean | null | undefined;
|
|
10
10
|
banned?: boolean | null | undefined;
|
|
11
11
|
banReason?: string | undefined;
|
|
12
|
+
unverifiedEmail?: boolean | null | undefined;
|
|
12
13
|
}
|
|
13
14
|
export interface UserCardWording {
|
|
14
15
|
banned: string;
|
|
15
16
|
online: string;
|
|
16
17
|
offline: string;
|
|
18
|
+
copyToClipboard: string;
|
|
19
|
+
copiedToClipboard: string;
|
|
20
|
+
copingToClipboardError: string;
|
|
21
|
+
unverified: string;
|
|
17
22
|
}
|
|
18
23
|
export interface UserCardProps extends HTMLAttributes<HTMLDivElement> {
|
|
19
24
|
user: UserCardUser;
|
|
20
25
|
wording: UserCardWording;
|
|
21
26
|
info?: ReactElement | readonly ReactElement[] | string;
|
|
27
|
+
avatarInfo?: ReactElement | readonly ReactElement[] | string;
|
|
22
28
|
'data-test'?: string | null | undefined;
|
|
23
29
|
}
|
|
24
30
|
export default class UserCard extends PureComponent<UserCardProps> {
|
|
@@ -35,11 +41,16 @@ export default class UserCard extends PureComponent<UserCardProps> {
|
|
|
35
41
|
online: PropTypes.Requireable<boolean>;
|
|
36
42
|
banned: PropTypes.Requireable<boolean>;
|
|
37
43
|
banReason: PropTypes.Requireable<string>;
|
|
44
|
+
unverifiedEmail: PropTypes.Requireable<boolean>;
|
|
38
45
|
}>>>;
|
|
39
46
|
wording: PropTypes.Requireable<PropTypes.InferProps<{
|
|
40
47
|
banned: PropTypes.Validator<string>;
|
|
41
48
|
online: PropTypes.Validator<string>;
|
|
42
49
|
offline: PropTypes.Validator<string>;
|
|
50
|
+
copyToClipboard: PropTypes.Validator<string>;
|
|
51
|
+
copiedToClipboard: PropTypes.Validator<string>;
|
|
52
|
+
copingToClipboardError: PropTypes.Validator<string>;
|
|
53
|
+
unverified: PropTypes.Requireable<string>;
|
|
43
54
|
}>>;
|
|
44
55
|
};
|
|
45
56
|
static defaultProps: {
|
|
@@ -47,8 +58,13 @@ export default class UserCard extends PureComponent<UserCardProps> {
|
|
|
47
58
|
banned: string;
|
|
48
59
|
online: string;
|
|
49
60
|
offline: string;
|
|
61
|
+
copyToClipboard: string;
|
|
62
|
+
copiedToClipboard: string;
|
|
63
|
+
copingToClipboardError: string;
|
|
64
|
+
unverified: string;
|
|
50
65
|
};
|
|
51
66
|
};
|
|
67
|
+
copyEmail: () => void;
|
|
52
68
|
render(): JSX.Element;
|
|
53
69
|
}
|
|
54
70
|
export type UserCardAttrs = JSX.LibraryManagedAttributes<typeof UserCard, UserCardProps>;
|
package/dist/user-card/card.js
CHANGED
|
@@ -2,10 +2,14 @@ import '../_helpers/_rollupPluginBabelHelpers.js';
|
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'prop-types';
|
|
4
4
|
import 'classnames';
|
|
5
|
+
import '@jetbrains/icons/copy';
|
|
5
6
|
import '../avatar/avatar.js';
|
|
6
7
|
import '../link/link.js';
|
|
8
|
+
import '../clipboard/clipboard.js';
|
|
7
9
|
import '../_helpers/badge.js';
|
|
10
|
+
import '../icon/icon.js';
|
|
8
11
|
export { U as default } from '../_helpers/card.js';
|
|
12
|
+
import '../icon/icon__constants.js';
|
|
9
13
|
import '../global/url.js';
|
|
10
14
|
import '../global/dom.js';
|
|
11
15
|
import '../avatar/fallback-avatar.js';
|
|
@@ -15,3 +19,34 @@ import '../global/memoize.js';
|
|
|
15
19
|
import '../global/data-tests.js';
|
|
16
20
|
import '../link/clickableLink.js';
|
|
17
21
|
import '../_helpers/link.js';
|
|
22
|
+
import '../alert-service/alert-service.js';
|
|
23
|
+
import '../global/react-render-adapter.js';
|
|
24
|
+
import 'react-dom';
|
|
25
|
+
import '../alert/alert.js';
|
|
26
|
+
import '@jetbrains/icons/exception';
|
|
27
|
+
import '@jetbrains/icons/checkmark';
|
|
28
|
+
import '@jetbrains/icons/warning';
|
|
29
|
+
import '@jetbrains/icons/close';
|
|
30
|
+
import '../loader-inline/loader-inline.js';
|
|
31
|
+
import '../_helpers/loader-inline.js';
|
|
32
|
+
import '../button/button.js';
|
|
33
|
+
import '@jetbrains/icons/chevron-10px';
|
|
34
|
+
import '../global/controls-height.js';
|
|
35
|
+
import '../_helpers/button__classes.js';
|
|
36
|
+
import 'util-deprecate';
|
|
37
|
+
import '../_helpers/icon.js';
|
|
38
|
+
import '../icon/icon__svg.js';
|
|
39
|
+
import '../_helpers/theme.js';
|
|
40
|
+
import '../popup/popup.target.js';
|
|
41
|
+
import '../popup/popup.js';
|
|
42
|
+
import '../global/schedule-raf.js';
|
|
43
|
+
import '../shortcuts/shortcuts.js';
|
|
44
|
+
import '../shortcuts/core.js';
|
|
45
|
+
import 'combokeys';
|
|
46
|
+
import '../global/sniffer.js';
|
|
47
|
+
import 'sniffr';
|
|
48
|
+
import '../tab-trap/tab-trap.js';
|
|
49
|
+
import '../popup/position.js';
|
|
50
|
+
import '../popup/popup.consts.js';
|
|
51
|
+
import '../alert/container.js';
|
|
52
|
+
import '../clipboard/clipboard-fallback.js';
|
|
@@ -36,11 +36,23 @@ import '../tab-trap/tab-trap.js';
|
|
|
36
36
|
import '../popup/position.js';
|
|
37
37
|
import '../popup/popup.consts.js';
|
|
38
38
|
import '../popup/popup.target.js';
|
|
39
|
+
import '@jetbrains/icons/copy';
|
|
39
40
|
import '../avatar/avatar.js';
|
|
40
41
|
import '../global/url.js';
|
|
41
42
|
import '../avatar/fallback-avatar.js';
|
|
42
43
|
import '../link/link.js';
|
|
43
44
|
import '../_helpers/link.js';
|
|
45
|
+
import '../clipboard/clipboard.js';
|
|
46
|
+
import '../alert-service/alert-service.js';
|
|
47
|
+
import '../global/react-render-adapter.js';
|
|
48
|
+
import '../alert/alert.js';
|
|
49
|
+
import '@jetbrains/icons/exception';
|
|
50
|
+
import '@jetbrains/icons/checkmark';
|
|
51
|
+
import '@jetbrains/icons/warning';
|
|
52
|
+
import '@jetbrains/icons/close';
|
|
53
|
+
import '../_helpers/theme.js';
|
|
54
|
+
import '../alert/container.js';
|
|
55
|
+
import '../clipboard/clipboard-fallback.js';
|
|
44
56
|
import '../_helpers/badge.js';
|
|
45
57
|
|
|
46
58
|
class SmartUserCardTooltip extends Component {
|
|
@@ -6,7 +6,7 @@ export interface UserCardTooltipProps extends Omit<UserCardAttrs, 'user'> {
|
|
|
6
6
|
user?: UserCardUser | null | undefined;
|
|
7
7
|
children: ReactElement | readonly ReactElement[] | string;
|
|
8
8
|
dropdownProps: Partial<DropdownAttrs>;
|
|
9
|
-
renderUserCard: (props:
|
|
9
|
+
renderUserCard: (props: UserCardAttrs) => ReactNode;
|
|
10
10
|
renderNoUser: () => ReactNode;
|
|
11
11
|
}
|
|
12
12
|
export default class UserCardTooltip extends Component<UserCardTooltipProps> {
|
|
@@ -19,7 +19,7 @@ export default class UserCardTooltip extends Component<UserCardTooltipProps> {
|
|
|
19
19
|
renderNoUser: PropTypes.Requireable<(...args: any[]) => any>;
|
|
20
20
|
};
|
|
21
21
|
static defaultProps: {
|
|
22
|
-
renderUserCard: (props:
|
|
22
|
+
renderUserCard: (props: UserCardAttrs) => JSX.Element;
|
|
23
23
|
renderNoUser: () => string;
|
|
24
24
|
dropdownProps: {
|
|
25
25
|
hoverShowTimeOut: number;
|
|
@@ -4,7 +4,7 @@ import classNames from 'classnames';
|
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import Dropdown from '../dropdown/dropdown.js';
|
|
6
6
|
import Popup from '../popup/popup.js';
|
|
7
|
-
import {
|
|
7
|
+
import { m as modules_a4196c17, U as UserCard } from '../_helpers/card.js';
|
|
8
8
|
import '../global/data-tests.js';
|
|
9
9
|
import '../global/typescript-utils.js';
|
|
10
10
|
import '../_helpers/anchor.js';
|
|
@@ -33,11 +33,25 @@ import '../tab-trap/tab-trap.js';
|
|
|
33
33
|
import '../popup/position.js';
|
|
34
34
|
import '../popup/popup.consts.js';
|
|
35
35
|
import '../popup/popup.target.js';
|
|
36
|
+
import '@jetbrains/icons/copy';
|
|
36
37
|
import '../avatar/avatar.js';
|
|
37
38
|
import '../global/url.js';
|
|
38
39
|
import '../avatar/fallback-avatar.js';
|
|
39
40
|
import '../link/link.js';
|
|
40
41
|
import '../_helpers/link.js';
|
|
42
|
+
import '../clipboard/clipboard.js';
|
|
43
|
+
import '../alert-service/alert-service.js';
|
|
44
|
+
import '../global/react-render-adapter.js';
|
|
45
|
+
import '../alert/alert.js';
|
|
46
|
+
import '@jetbrains/icons/exception';
|
|
47
|
+
import '@jetbrains/icons/checkmark';
|
|
48
|
+
import '@jetbrains/icons/warning';
|
|
49
|
+
import '@jetbrains/icons/close';
|
|
50
|
+
import '../loader-inline/loader-inline.js';
|
|
51
|
+
import '../_helpers/loader-inline.js';
|
|
52
|
+
import '../_helpers/theme.js';
|
|
53
|
+
import '../alert/container.js';
|
|
54
|
+
import '../clipboard/clipboard-fallback.js';
|
|
41
55
|
import '../_helpers/badge.js';
|
|
42
56
|
|
|
43
57
|
const DEFAULT_TIMEOUT = 300;
|
|
@@ -45,10 +59,11 @@ class UserCardTooltip extends Component {
|
|
|
45
59
|
render() {
|
|
46
60
|
const {
|
|
47
61
|
children,
|
|
48
|
-
user,
|
|
49
62
|
renderUserCard,
|
|
50
63
|
renderNoUser,
|
|
51
|
-
dropdownProps
|
|
64
|
+
dropdownProps,
|
|
65
|
+
user,
|
|
66
|
+
...restProps
|
|
52
67
|
} = this.props;
|
|
53
68
|
return /*#__PURE__*/React.createElement(Dropdown, _extends({
|
|
54
69
|
anchor: children,
|
|
@@ -56,7 +71,11 @@ class UserCardTooltip extends Component {
|
|
|
56
71
|
clickMode: false
|
|
57
72
|
}, dropdownProps), /*#__PURE__*/React.createElement(Popup, {
|
|
58
73
|
attached: false
|
|
59
|
-
}, user ? renderUserCard(
|
|
74
|
+
}, user ? renderUserCard({
|
|
75
|
+
...restProps,
|
|
76
|
+
user,
|
|
77
|
+
className: classNames(modules_a4196c17.userCardSpaced, this.props.className)
|
|
78
|
+
}) : renderNoUser()));
|
|
60
79
|
}
|
|
61
80
|
}
|
|
62
81
|
_defineProperty(UserCardTooltip, "propTypes", {
|
|
@@ -70,19 +89,12 @@ _defineProperty(UserCardTooltip, "propTypes", {
|
|
|
70
89
|
_defineProperty(UserCardTooltip, "defaultProps", {
|
|
71
90
|
renderUserCard: props => {
|
|
72
91
|
const {
|
|
73
|
-
className,
|
|
74
|
-
children,
|
|
75
|
-
renderUserCard,
|
|
76
|
-
renderNoUser,
|
|
77
|
-
dropdownProps,
|
|
78
92
|
user,
|
|
79
93
|
...restProps
|
|
80
94
|
} = props;
|
|
81
95
|
return user && /*#__PURE__*/React.createElement(UserCard, _extends({
|
|
82
96
|
user: user
|
|
83
|
-
}, restProps
|
|
84
|
-
className: classNames(modules_a4196c17.userCardSpaced, className)
|
|
85
|
-
}));
|
|
97
|
+
}, restProps));
|
|
86
98
|
},
|
|
87
99
|
renderNoUser: () => '',
|
|
88
100
|
dropdownProps: {
|
|
@@ -5,6 +5,7 @@ import '../_helpers/_rollupPluginBabelHelpers.js';
|
|
|
5
5
|
import 'react';
|
|
6
6
|
import 'prop-types';
|
|
7
7
|
import 'classnames';
|
|
8
|
+
import '@jetbrains/icons/copy';
|
|
8
9
|
import '../avatar/avatar.js';
|
|
9
10
|
import '../global/url.js';
|
|
10
11
|
import '../global/dom.js';
|
|
@@ -16,21 +17,29 @@ import '../global/memoize.js';
|
|
|
16
17
|
import '../global/data-tests.js';
|
|
17
18
|
import '../link/clickableLink.js';
|
|
18
19
|
import '../_helpers/link.js';
|
|
19
|
-
import '../
|
|
20
|
-
import '../
|
|
21
|
-
import '../global/
|
|
22
|
-
import '
|
|
23
|
-
import '
|
|
20
|
+
import '../clipboard/clipboard.js';
|
|
21
|
+
import '../alert-service/alert-service.js';
|
|
22
|
+
import '../global/react-render-adapter.js';
|
|
23
|
+
import 'react-dom';
|
|
24
|
+
import '../alert/alert.js';
|
|
25
|
+
import '@jetbrains/icons/exception';
|
|
26
|
+
import '@jetbrains/icons/checkmark';
|
|
27
|
+
import '@jetbrains/icons/warning';
|
|
28
|
+
import '@jetbrains/icons/close';
|
|
24
29
|
import '../icon/icon.js';
|
|
25
30
|
import 'util-deprecate';
|
|
26
31
|
import '../icon/icon__constants.js';
|
|
27
32
|
import '../_helpers/icon.js';
|
|
28
33
|
import '../icon/icon__svg.js';
|
|
34
|
+
import '../loader-inline/loader-inline.js';
|
|
35
|
+
import '../_helpers/loader-inline.js';
|
|
29
36
|
import '../button/button.js';
|
|
37
|
+
import '@jetbrains/icons/chevron-10px';
|
|
30
38
|
import '../global/controls-height.js';
|
|
31
39
|
import '../_helpers/button__classes.js';
|
|
40
|
+
import '../_helpers/theme.js';
|
|
41
|
+
import '../popup/popup.target.js';
|
|
32
42
|
import '../popup/popup.js';
|
|
33
|
-
import 'react-dom';
|
|
34
43
|
import '../global/schedule-raf.js';
|
|
35
44
|
import '../shortcuts/shortcuts.js';
|
|
36
45
|
import '../shortcuts/core.js';
|
|
@@ -40,6 +49,9 @@ import 'sniffr';
|
|
|
40
49
|
import '../tab-trap/tab-trap.js';
|
|
41
50
|
import '../popup/position.js';
|
|
42
51
|
import '../popup/popup.consts.js';
|
|
43
|
-
import '../
|
|
44
|
-
import '../
|
|
45
|
-
import '../_helpers/
|
|
52
|
+
import '../alert/container.js';
|
|
53
|
+
import '../clipboard/clipboard-fallback.js';
|
|
54
|
+
import '../_helpers/badge.js';
|
|
55
|
+
import '../dropdown/dropdown.js';
|
|
56
|
+
import '../global/typescript-utils.js';
|
|
57
|
+
import '../_helpers/anchor.js';
|
|
@@ -14,6 +14,7 @@ import 'classnames';
|
|
|
14
14
|
import '../global/data-tests.js';
|
|
15
15
|
import '../_helpers/loader-inline.js';
|
|
16
16
|
import '../_helpers/card.js';
|
|
17
|
+
import '@jetbrains/icons/copy';
|
|
17
18
|
import '../avatar/avatar.js';
|
|
18
19
|
import '../global/url.js';
|
|
19
20
|
import '../global/dom.js';
|
|
@@ -24,19 +25,24 @@ import 'focus-visible';
|
|
|
24
25
|
import '../global/memoize.js';
|
|
25
26
|
import '../link/clickableLink.js';
|
|
26
27
|
import '../_helpers/link.js';
|
|
27
|
-
import '../
|
|
28
|
-
import '../
|
|
29
|
-
import '../
|
|
30
|
-
import '
|
|
31
|
-
import '@jetbrains/icons/
|
|
28
|
+
import '../clipboard/clipboard.js';
|
|
29
|
+
import '../alert-service/alert-service.js';
|
|
30
|
+
import '../alert/alert.js';
|
|
31
|
+
import '@jetbrains/icons/exception';
|
|
32
|
+
import '@jetbrains/icons/checkmark';
|
|
33
|
+
import '@jetbrains/icons/warning';
|
|
34
|
+
import '@jetbrains/icons/close';
|
|
32
35
|
import '../icon/icon.js';
|
|
33
36
|
import 'util-deprecate';
|
|
34
37
|
import '../icon/icon__constants.js';
|
|
35
38
|
import '../_helpers/icon.js';
|
|
36
39
|
import '../icon/icon__svg.js';
|
|
37
40
|
import '../button/button.js';
|
|
41
|
+
import '@jetbrains/icons/chevron-10px';
|
|
38
42
|
import '../global/controls-height.js';
|
|
39
43
|
import '../_helpers/button__classes.js';
|
|
44
|
+
import '../_helpers/theme.js';
|
|
45
|
+
import '../popup/popup.target.js';
|
|
40
46
|
import '../popup/popup.js';
|
|
41
47
|
import '../global/schedule-raf.js';
|
|
42
48
|
import '../shortcuts/shortcuts.js';
|
|
@@ -47,7 +53,12 @@ import 'sniffr';
|
|
|
47
53
|
import '../tab-trap/tab-trap.js';
|
|
48
54
|
import '../popup/position.js';
|
|
49
55
|
import '../popup/popup.consts.js';
|
|
50
|
-
import '../
|
|
56
|
+
import '../alert/container.js';
|
|
57
|
+
import '../clipboard/clipboard-fallback.js';
|
|
58
|
+
import '../_helpers/badge.js';
|
|
59
|
+
import '../dropdown/dropdown.js';
|
|
60
|
+
import '../global/typescript-utils.js';
|
|
61
|
+
import '../_helpers/anchor.js';
|
|
51
62
|
|
|
52
63
|
const angularModule = angular.module('Ring.user-card', []);
|
|
53
64
|
angularModule.component('rgUserCardTooltip', createAngularComponent(UserCardTooltip)).component('rgSmartUserCardTooltip', createAngularComponent(SmartUserCardTooltip));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jetbrains/ring-ui",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.99",
|
|
4
4
|
"description": "JetBrains UI library",
|
|
5
5
|
"author": "JetBrains",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -108,8 +108,8 @@
|
|
|
108
108
|
"@types/react-dom": "^18.0.10",
|
|
109
109
|
"@types/sinon": "^10.0.13",
|
|
110
110
|
"@types/sinon-chai": "^3.2.9",
|
|
111
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
112
|
-
"@typescript-eslint/parser": "^5.
|
|
111
|
+
"@typescript-eslint/eslint-plugin": "^5.49.0",
|
|
112
|
+
"@typescript-eslint/parser": "^5.49.0",
|
|
113
113
|
"@wojtekmaj/enzyme-adapter-react-17": "^0.8.0",
|
|
114
114
|
"angular": "^1.8.3",
|
|
115
115
|
"angular-mocks": "^1.8.3",
|
|
@@ -150,13 +150,13 @@
|
|
|
150
150
|
"merge-options": "^3.0.4",
|
|
151
151
|
"mocha": "^10.2.0",
|
|
152
152
|
"pinst": "^3.0.0",
|
|
153
|
-
"puppeteer": "^19.
|
|
153
|
+
"puppeteer": "^19.6.0",
|
|
154
154
|
"raw-loader": "^4.0.2",
|
|
155
155
|
"react": "^18.2.0",
|
|
156
156
|
"react-dom": "^18.2.0",
|
|
157
157
|
"react-test-renderer": "^18.2.0",
|
|
158
158
|
"regenerator-runtime": "^0.13.11",
|
|
159
|
-
"rimraf": "^4.1.
|
|
159
|
+
"rimraf": "^4.1.2",
|
|
160
160
|
"rollup": "^3.10.1",
|
|
161
161
|
"rollup-plugin-clear": "^2.0.7",
|
|
162
162
|
"rollup-plugin-styles": "^4.0.0",
|
|
@@ -198,7 +198,7 @@
|
|
|
198
198
|
"@babel/core": "^7.20.12",
|
|
199
199
|
"@babel/preset-typescript": "^7.18.6",
|
|
200
200
|
"@jetbrains/babel-preset-jetbrains": "^2.3.2",
|
|
201
|
-
"@jetbrains/icons": "^3.20.
|
|
201
|
+
"@jetbrains/icons": "^3.20.3",
|
|
202
202
|
"@jetbrains/logos": "^2.2.10",
|
|
203
203
|
"@jetbrains/postcss-require-hover": "^0.1.2",
|
|
204
204
|
"@types/combokeys": "^2.4.6",
|