@fat-zebra/sdk 2.0.6 → 2.0.7

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.
@@ -22,5 +22,6 @@ export default class DeviceDataCollection {
22
22
  static getIframe(): HTMLIFrameElement | null;
23
23
  static getInput(): HTMLInputElement | null;
24
24
  static submit(): void;
25
+ private static reportDeviceData;
25
26
  private static ensureCreated;
26
27
  }
@@ -72,7 +72,7 @@ class DeviceDataCollection {
72
72
  const screen = window.screen;
73
73
  const nav = navigator;
74
74
  const language = (_b = (_a = nav.language) !== null && _a !== void 0 ? _a : nav.userLanguage) !== null && _b !== void 0 ? _b : "";
75
- return {
75
+ const deviceData = {
76
76
  browser_accept_content: (_d = (_c = nav.languages) === null || _c === void 0 ? void 0 : _c.join(",")) !== null && _d !== void 0 ? _d : "",
77
77
  browser_language: language,
78
78
  browser_java_enabled: nav.javaEnabled(),
@@ -82,6 +82,8 @@ class DeviceDataCollection {
82
82
  browser_time_difference: new Date().getTimezoneOffset(),
83
83
  browser_user_agent: nav.userAgent,
84
84
  };
85
+ this.reportDeviceData(deviceData);
86
+ return deviceData;
85
87
  }
86
88
  static setIframeUrl(url, jwt) {
87
89
  // Ensure elements exist, then set values
@@ -110,6 +112,9 @@ class DeviceDataCollection {
110
112
  DeviceDataCollection.ensureCreated();
111
113
  DeviceDataCollection.getForm().submit();
112
114
  }
115
+ static reportDeviceData(deviceData) {
116
+ console.log('device data', deviceData);
117
+ }
113
118
  // ---- helpers (no instance state) ----
114
119
  static ensureCreated() {
115
120
  if (!this.getIframe() || !this.getForm() || !this.getInput()) {
@@ -138,3 +143,6 @@ __decorate([
138
143
  },
139
144
  })
140
145
  ], DeviceDataCollection, "handleCollectionResponse", null);
146
+ __decorate([
147
+ logMethod()
148
+ ], DeviceDataCollection, "reportDeviceData", null);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fat-zebra/sdk",
3
- "version": "2.0.6",
3
+ "version": "2.0.7",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {