@jetbrains/ring-ui 5.0.101 → 5.0.102

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.
@@ -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, string>): void;
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, string>): void;
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, string>): void;
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, string>): void;
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, string>): void;
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, 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, string>): void;
23
- trackPageView(path: string, data?: Record<string, string>): void;
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, additionalData?: Record<string, string>): void;
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, additionalData) {
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 (additionalData) {
54
+ if (data) {
55
55
  ga('send', 'event', {
56
56
  eventCategory: category,
57
- eventAction: action + this._buildSuffix(additionalData)
57
+ eventAction: action + this._buildSuffix(data)
58
58
  });
59
59
  }
60
60
  }
@@ -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, string>): void;
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, string>): void;
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, string>): void;
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, string>): void;
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, string>): void;
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, 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, string>): void;
23
- trackPageView(path: string, data?: Record<string, string>): void;
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, additionalData?: Record<string, string>): void;
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, additionalData) {
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 (additionalData) {
64
+ if (data) {
65
65
  ga('send', 'event', {
66
66
  eventCategory: category,
67
- eventAction: action + this._buildSuffix(additionalData)
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 105", "chrome 104", "chrome 103", "edge 104", "edge 103", "firefox 103", "ios_saf 15.6", "ios_saf 15.5", "ios_saf 14.5-14.8", "op_mini all", "safari 15.6", "samsung 18.0", "samsung 17.0"]) {
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 105", "chrome 104", "chrome 103", "edge 104", "edge 103", "firefox 103", "ios_saf 15.6", "ios_saf 15.5", "ios_saf 14.5-14.8", "op_mini all", "safari 15.6", "samsung 18.0", "samsung 17.0"] || [];
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;