@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.
|
@@ -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
|
-
|
|
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);
|