@jetbrains/ring-ui 5.0.106 → 5.0.107

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.
@@ -3,6 +3,7 @@ export interface AnalyticsCustomPluginData {
3
3
  category: string;
4
4
  action: string;
5
5
  data?: Record<string, Serializable>;
6
+ timestamp: number;
6
7
  }
7
8
  export interface AnalyticsCustomPluginConfig {
8
9
  send: (data: AnalyticsCustomPluginData[]) => void;
@@ -46,7 +46,8 @@ export default class AnalyticsCustomPlugin {
46
46
  if (this._isDevelopment) {
47
47
  console.log('TRACKING DATA = ', category, action, data); // eslint-disable-line no-console
48
48
  }
49
- this._addDataToFlushingPack(data ? { category, action, data } : { category, action });
49
+ const baseSendingData = { category, action, timestamp: Date.now() };
50
+ this._addDataToFlushingPack(data ? { ...baseSendingData, data } : baseSendingData);
50
51
  }
51
52
  _addDataToFlushingPack(sendingData) {
52
53
  this._data.push(sendingData);
@@ -3,6 +3,7 @@ export interface AnalyticsCustomPluginData {
3
3
  category: string;
4
4
  action: string;
5
5
  data?: Record<string, Serializable>;
6
+ timestamp: number;
6
7
  }
7
8
  export interface AnalyticsCustomPluginConfig {
8
9
  send: (data: AnalyticsCustomPluginData[]) => void;
@@ -49,14 +49,15 @@ class AnalyticsCustomPlugin {
49
49
  console.log('TRACKING DATA = ', category, action, data); // eslint-disable-line no-console
50
50
  }
51
51
 
52
- this._addDataToFlushingPack(data ? {
52
+ const baseSendingData = {
53
53
  category,
54
54
  action,
55
+ timestamp: Date.now()
56
+ };
57
+ this._addDataToFlushingPack(data ? {
58
+ ...baseSendingData,
55
59
  data
56
- } : {
57
- category,
58
- action
59
- });
60
+ } : baseSendingData);
60
61
  }
61
62
  _addDataToFlushingPack(sendingData) {
62
63
  this._data.push(sendingData);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetbrains/ring-ui",
3
- "version": "5.0.106",
3
+ "version": "5.0.107",
4
4
  "description": "JetBrains UI library",
5
5
  "author": "JetBrains",
6
6
  "license": "Apache-2.0",