@jetbrains/ring-ui 5.0.101 → 5.0.103
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/analytics/analytics.d.ts +6 -6
- package/components/analytics/analytics__custom-plugin.d.ts +4 -4
- package/components/analytics/analytics__ga-plugin.d.ts +2 -2
- package/components/analytics/analytics__ga-plugin.js +3 -3
- package/components/user-card/card.d.ts +4 -4
- package/components/user-card/card.js +4 -3
- package/dist/_helpers/card.js +9 -6
- package/dist/analytics/analytics.d.ts +6 -6
- package/dist/analytics/analytics__custom-plugin.d.ts +4 -4
- package/dist/analytics/analytics__ga-plugin.d.ts +2 -2
- package/dist/analytics/analytics__ga-plugin.js +3 -3
- package/dist/old-browsers-message/white-list.js +2 -2
- package/dist/style.css +1 -1
- package/dist/user-card/card.d.ts +4 -4
- package/package.json +5 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
type Serializable = string | number | boolean | null | undefined | {
|
|
1
|
+
export type Serializable = string | number | boolean | null | undefined | {
|
|
2
2
|
[K in string | number]?: Serializable;
|
|
3
3
|
};
|
|
4
4
|
export interface AnalyticsPlugin {
|
|
@@ -6,7 +6,7 @@ export interface AnalyticsPlugin {
|
|
|
6
6
|
* @deprecated
|
|
7
7
|
*/
|
|
8
8
|
serializeAdditionalInfo: boolean;
|
|
9
|
-
trackEvent(category: string, action: string, additionalData?: Record<string,
|
|
9
|
+
trackEvent(category: string, action: string, additionalData?: Record<string, Serializable>): void;
|
|
10
10
|
trackPageView(path: string): void;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
@@ -19,20 +19,20 @@ export declare class Analytics {
|
|
|
19
19
|
/**
|
|
20
20
|
* @deprecated
|
|
21
21
|
*/
|
|
22
|
-
track(rawTrackingData: string, additionalData: Record<string,
|
|
22
|
+
track(rawTrackingData: string, additionalData: Record<string, Serializable>): void;
|
|
23
23
|
/**
|
|
24
24
|
* @deprecated
|
|
25
25
|
*/
|
|
26
26
|
trackPageView(path: string): void;
|
|
27
|
-
trackEvent(category: string, action: string, additionalData?: Record<string,
|
|
27
|
+
trackEvent(category: string, action: string, additionalData?: Record<string, Serializable>): void;
|
|
28
28
|
/**
|
|
29
29
|
* @deprecated
|
|
30
30
|
*/
|
|
31
|
-
trackShortcutEvent(category: string, action: string, additionalData: Record<string,
|
|
31
|
+
trackShortcutEvent(category: string, action: string, additionalData: Record<string, Serializable>): void;
|
|
32
32
|
/**
|
|
33
33
|
* @deprecated
|
|
34
34
|
*/
|
|
35
|
-
trackEntityProperties(entityName: string, entity: Serializable, propertiesNames: readonly string[], additionalData?: Record<string,
|
|
35
|
+
trackEntityProperties(entityName: string, entity: Serializable, propertiesNames: readonly string[], additionalData?: Record<string, Serializable>): void;
|
|
36
36
|
}
|
|
37
37
|
declare const _default: Analytics;
|
|
38
38
|
export default _default;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { AnalyticsPlugin } from './analytics';
|
|
1
|
+
import { AnalyticsPlugin, Serializable } from './analytics';
|
|
2
2
|
export interface AnalyticsCustomPluginData {
|
|
3
3
|
category: string;
|
|
4
4
|
action: string;
|
|
5
|
-
data?: Record<string,
|
|
5
|
+
data?: Record<string, Serializable>;
|
|
6
6
|
}
|
|
7
7
|
export interface AnalyticsCustomPluginConfig {
|
|
8
8
|
send: (data: AnalyticsCustomPluginData[]) => void;
|
|
@@ -19,8 +19,8 @@ export default class AnalyticsCustomPlugin implements AnalyticsPlugin {
|
|
|
19
19
|
private _hasSendSchedule?;
|
|
20
20
|
constructor(send: AnalyticsCustomPluginConfig['send'], isDevelopment?: AnalyticsCustomPluginConfig['isDevelopment'], flushInterval?: AnalyticsCustomPluginConfig['flushInterval']);
|
|
21
21
|
config(config: AnalyticsCustomPluginConfig): void;
|
|
22
|
-
trackEvent(category: string, action: string, additionalData?: Record<string,
|
|
23
|
-
trackPageView(path: string, data?: Record<string,
|
|
22
|
+
trackEvent(category: string, action: string, additionalData?: Record<string, Serializable>): void;
|
|
23
|
+
trackPageView(path: string, data?: Record<string, Serializable>): void;
|
|
24
24
|
private _initSendSchedule;
|
|
25
25
|
private _processEvent;
|
|
26
26
|
private _addDataToFlushingPack;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnalyticsPlugin } from './analytics';
|
|
1
|
+
import { AnalyticsPlugin, Serializable } from './analytics';
|
|
2
2
|
declare global {
|
|
3
3
|
interface Window {
|
|
4
4
|
'GoogleAnalyticsObject': string;
|
|
@@ -14,7 +14,7 @@ export default class AnalyticsGAPlugin implements AnalyticsPlugin {
|
|
|
14
14
|
/**
|
|
15
15
|
* @deprecated
|
|
16
16
|
*/
|
|
17
|
-
trackEvent(rawCategory: string, rawAction: string,
|
|
17
|
+
trackEvent(rawCategory: string, rawAction: string, data?: Record<string, Serializable>): void;
|
|
18
18
|
/**
|
|
19
19
|
* @deprecated
|
|
20
20
|
*/
|
|
@@ -43,7 +43,7 @@ export default class AnalyticsGAPlugin {
|
|
|
43
43
|
/**
|
|
44
44
|
* @deprecated
|
|
45
45
|
*/
|
|
46
|
-
trackEvent(rawCategory, rawAction,
|
|
46
|
+
trackEvent(rawCategory, rawAction, data) {
|
|
47
47
|
if (window.ga != null) {
|
|
48
48
|
const category = AnalyticsPluginUtils.reformatString(rawCategory, true);
|
|
49
49
|
const action = AnalyticsPluginUtils.reformatString(rawAction);
|
|
@@ -51,10 +51,10 @@ export default class AnalyticsGAPlugin {
|
|
|
51
51
|
eventCategory: category,
|
|
52
52
|
eventAction: action
|
|
53
53
|
});
|
|
54
|
-
if (
|
|
54
|
+
if (data) {
|
|
55
55
|
ga('send', 'event', {
|
|
56
56
|
eventCategory: category,
|
|
57
|
-
eventAction: action + this._buildSuffix(
|
|
57
|
+
eventAction: action + this._buildSuffix(data)
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
60
|
}
|
|
@@ -15,10 +15,10 @@ export interface UserCardWording {
|
|
|
15
15
|
banned: string;
|
|
16
16
|
online: string;
|
|
17
17
|
offline: string;
|
|
18
|
-
copyToClipboard
|
|
19
|
-
copiedToClipboard
|
|
20
|
-
copingToClipboardError
|
|
21
|
-
unverified
|
|
18
|
+
copyToClipboard?: string;
|
|
19
|
+
copiedToClipboard?: string;
|
|
20
|
+
copingToClipboardError?: string;
|
|
21
|
+
unverified?: string;
|
|
22
22
|
}
|
|
23
23
|
export interface UserCardProps extends HTMLAttributes<HTMLDivElement> {
|
|
24
24
|
user: UserCardUser;
|
|
@@ -46,11 +46,12 @@ export default class UserCard extends PureComponent {
|
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
48
|
copyEmail = () => {
|
|
49
|
-
const {
|
|
50
|
-
clipboard.copyText(user.email || '', wording.copiedToClipboard, wording.copingToClipboardError);
|
|
49
|
+
const wording = { ...UserCard.defaultProps.wording, ...this.props.wording };
|
|
50
|
+
clipboard.copyText(this.props.user.email || '', wording.copiedToClipboard, wording.copingToClipboardError);
|
|
51
51
|
};
|
|
52
52
|
render() {
|
|
53
|
-
const { children, info, className, user,
|
|
53
|
+
const { children, info, className, user, avatarInfo, ...restProps } = this.props;
|
|
54
|
+
const wording = { ...UserCard.defaultProps.wording, ...this.props.wording };
|
|
54
55
|
const classes = classNames(className, {});
|
|
55
56
|
const userActiveStatusClasses = classNames(styles.userActiveStatus, user.online ? styles.online : '');
|
|
56
57
|
return (<div className={classes} {...restProps}>
|
package/dist/_helpers/card.js
CHANGED
|
@@ -16,11 +16,11 @@ class UserCard extends PureComponent {
|
|
|
16
16
|
constructor() {
|
|
17
17
|
super(...arguments);
|
|
18
18
|
_defineProperty(this, "copyEmail", () => {
|
|
19
|
-
const {
|
|
20
|
-
|
|
21
|
-
wording
|
|
22
|
-
}
|
|
23
|
-
clipboard.copyText(user.email || '', wording.copiedToClipboard, wording.copingToClipboardError);
|
|
19
|
+
const wording = {
|
|
20
|
+
...UserCard.defaultProps.wording,
|
|
21
|
+
...this.props.wording
|
|
22
|
+
};
|
|
23
|
+
clipboard.copyText(this.props.user.email || '', wording.copiedToClipboard, wording.copingToClipboardError);
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
26
|
render() {
|
|
@@ -29,10 +29,13 @@ class UserCard extends PureComponent {
|
|
|
29
29
|
info,
|
|
30
30
|
className,
|
|
31
31
|
user,
|
|
32
|
-
wording,
|
|
33
32
|
avatarInfo,
|
|
34
33
|
...restProps
|
|
35
34
|
} = this.props;
|
|
35
|
+
const wording = {
|
|
36
|
+
...UserCard.defaultProps.wording,
|
|
37
|
+
...this.props.wording
|
|
38
|
+
};
|
|
36
39
|
const classes = classNames(className, {});
|
|
37
40
|
const userActiveStatusClasses = classNames(modules_a4196c17.userActiveStatus, user.online ? modules_a4196c17.online : '');
|
|
38
41
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
type Serializable = string | number | boolean | null | undefined | {
|
|
1
|
+
export type Serializable = string | number | boolean | null | undefined | {
|
|
2
2
|
[K in string | number]?: Serializable;
|
|
3
3
|
};
|
|
4
4
|
export interface AnalyticsPlugin {
|
|
@@ -6,7 +6,7 @@ export interface AnalyticsPlugin {
|
|
|
6
6
|
* @deprecated
|
|
7
7
|
*/
|
|
8
8
|
serializeAdditionalInfo: boolean;
|
|
9
|
-
trackEvent(category: string, action: string, additionalData?: Record<string,
|
|
9
|
+
trackEvent(category: string, action: string, additionalData?: Record<string, Serializable>): void;
|
|
10
10
|
trackPageView(path: string): void;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
@@ -19,20 +19,20 @@ export declare class Analytics {
|
|
|
19
19
|
/**
|
|
20
20
|
* @deprecated
|
|
21
21
|
*/
|
|
22
|
-
track(rawTrackingData: string, additionalData: Record<string,
|
|
22
|
+
track(rawTrackingData: string, additionalData: Record<string, Serializable>): void;
|
|
23
23
|
/**
|
|
24
24
|
* @deprecated
|
|
25
25
|
*/
|
|
26
26
|
trackPageView(path: string): void;
|
|
27
|
-
trackEvent(category: string, action: string, additionalData?: Record<string,
|
|
27
|
+
trackEvent(category: string, action: string, additionalData?: Record<string, Serializable>): void;
|
|
28
28
|
/**
|
|
29
29
|
* @deprecated
|
|
30
30
|
*/
|
|
31
|
-
trackShortcutEvent(category: string, action: string, additionalData: Record<string,
|
|
31
|
+
trackShortcutEvent(category: string, action: string, additionalData: Record<string, Serializable>): void;
|
|
32
32
|
/**
|
|
33
33
|
* @deprecated
|
|
34
34
|
*/
|
|
35
|
-
trackEntityProperties(entityName: string, entity: Serializable, propertiesNames: readonly string[], additionalData?: Record<string,
|
|
35
|
+
trackEntityProperties(entityName: string, entity: Serializable, propertiesNames: readonly string[], additionalData?: Record<string, Serializable>): void;
|
|
36
36
|
}
|
|
37
37
|
declare const _default: Analytics;
|
|
38
38
|
export default _default;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { AnalyticsPlugin } from './analytics';
|
|
1
|
+
import { AnalyticsPlugin, Serializable } from './analytics';
|
|
2
2
|
export interface AnalyticsCustomPluginData {
|
|
3
3
|
category: string;
|
|
4
4
|
action: string;
|
|
5
|
-
data?: Record<string,
|
|
5
|
+
data?: Record<string, Serializable>;
|
|
6
6
|
}
|
|
7
7
|
export interface AnalyticsCustomPluginConfig {
|
|
8
8
|
send: (data: AnalyticsCustomPluginData[]) => void;
|
|
@@ -19,8 +19,8 @@ export default class AnalyticsCustomPlugin implements AnalyticsPlugin {
|
|
|
19
19
|
private _hasSendSchedule?;
|
|
20
20
|
constructor(send: AnalyticsCustomPluginConfig['send'], isDevelopment?: AnalyticsCustomPluginConfig['isDevelopment'], flushInterval?: AnalyticsCustomPluginConfig['flushInterval']);
|
|
21
21
|
config(config: AnalyticsCustomPluginConfig): void;
|
|
22
|
-
trackEvent(category: string, action: string, additionalData?: Record<string,
|
|
23
|
-
trackPageView(path: string, data?: Record<string,
|
|
22
|
+
trackEvent(category: string, action: string, additionalData?: Record<string, Serializable>): void;
|
|
23
|
+
trackPageView(path: string, data?: Record<string, Serializable>): void;
|
|
24
24
|
private _initSendSchedule;
|
|
25
25
|
private _processEvent;
|
|
26
26
|
private _addDataToFlushingPack;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnalyticsPlugin } from './analytics';
|
|
1
|
+
import { AnalyticsPlugin, Serializable } from './analytics';
|
|
2
2
|
declare global {
|
|
3
3
|
interface Window {
|
|
4
4
|
'GoogleAnalyticsObject': string;
|
|
@@ -14,7 +14,7 @@ export default class AnalyticsGAPlugin implements AnalyticsPlugin {
|
|
|
14
14
|
/**
|
|
15
15
|
* @deprecated
|
|
16
16
|
*/
|
|
17
|
-
trackEvent(rawCategory: string, rawAction: string,
|
|
17
|
+
trackEvent(rawCategory: string, rawAction: string, data?: Record<string, Serializable>): void;
|
|
18
18
|
/**
|
|
19
19
|
* @deprecated
|
|
20
20
|
*/
|
|
@@ -53,7 +53,7 @@ class AnalyticsGAPlugin {
|
|
|
53
53
|
/**
|
|
54
54
|
* @deprecated
|
|
55
55
|
*/
|
|
56
|
-
trackEvent(rawCategory, rawAction,
|
|
56
|
+
trackEvent(rawCategory, rawAction, data) {
|
|
57
57
|
if (window.ga != null) {
|
|
58
58
|
const category = AnalyticsPluginUtils.reformatString(rawCategory, true);
|
|
59
59
|
const action = AnalyticsPluginUtils.reformatString(rawAction);
|
|
@@ -61,10 +61,10 @@ class AnalyticsGAPlugin {
|
|
|
61
61
|
eventCategory: category,
|
|
62
62
|
eventAction: action
|
|
63
63
|
});
|
|
64
|
-
if (
|
|
64
|
+
if (data) {
|
|
65
65
|
ga('send', 'event', {
|
|
66
66
|
eventCategory: category,
|
|
67
|
-
eventAction: action + this._buildSuffix(
|
|
67
|
+
eventAction: action + this._buildSuffix(data)
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
70
|
}
|
|
@@ -5,11 +5,11 @@ const MAJOR_VERSION_INDEX = 0;
|
|
|
5
5
|
/**
|
|
6
6
|
* SUPPORTED_BROWSERS are defined by Babel plugin, see babel config
|
|
7
7
|
*/
|
|
8
|
-
if (!["and_chr
|
|
8
|
+
if (!["and_chr 109", "and_uc 13.4", "chrome 108", "chrome 107", "edge 108", "edge 107", "firefox 107", "ios_saf 16.1", "ios_saf 16.0", "ios_saf 15.6", "safari 15.6", "samsung 19.0"]) {
|
|
9
9
|
// eslint-disable-next-line no-console
|
|
10
10
|
console.warn('Ring UI: no SUPPORTED_BROWSERS passed. Please check babel config.');
|
|
11
11
|
}
|
|
12
|
-
const SUPPORTED = ["and_chr
|
|
12
|
+
const SUPPORTED = ["and_chr 109", "and_uc 13.4", "chrome 108", "chrome 107", "edge 108", "edge 107", "firefox 107", "ios_saf 16.1", "ios_saf 16.0", "ios_saf 15.6", "safari 15.6", "samsung 19.0"] || [];
|
|
13
13
|
const WHITE_LISTED_BROWSERS = ['chrome', 'firefox', 'safari', 'edge'];
|
|
14
14
|
const WHITE_LIST = SUPPORTED.reduce((acc, item) => {
|
|
15
15
|
var _item$match;
|