@4site/engrid-scripts 0.23.9 → 0.23.10
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/dist/data-layer.d.ts +0 -1
- package/dist/data-layer.js +4 -8
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
package/dist/data-layer.d.ts
CHANGED
|
@@ -20,7 +20,6 @@ export declare class DataLayer {
|
|
|
20
20
|
private handleFieldValueChange;
|
|
21
21
|
private geRetainedFieldsValue;
|
|
22
22
|
private hash;
|
|
23
|
-
private shaHash;
|
|
24
23
|
private getFieldLabel;
|
|
25
24
|
addEndOfGiftProcessEvent(eventName: string, eventProperties?: object): void;
|
|
26
25
|
addEndOfGiftProcessVariable(variableName: string, variableValue?: any): void;
|
package/dist/data-layer.js
CHANGED
|
@@ -188,7 +188,7 @@ export class DataLayer {
|
|
|
188
188
|
if (el.value === "" || this.excludedFields.includes(el.name))
|
|
189
189
|
return;
|
|
190
190
|
const value = this.hashedFields.includes(el.name)
|
|
191
|
-
? this.hash(el.value)
|
|
191
|
+
? yield this.hash(el.value)
|
|
192
192
|
: el.value;
|
|
193
193
|
if (["checkbox", "radio"].includes(el.type)) {
|
|
194
194
|
if (el.checked) {
|
|
@@ -216,7 +216,7 @@ export class DataLayer {
|
|
|
216
216
|
}
|
|
217
217
|
if (el.name === this.retainedEmailField) {
|
|
218
218
|
const retainedEmailValue = this.geRetainedFieldsValue("email");
|
|
219
|
-
const sha256value = yield this.
|
|
219
|
+
const sha256value = yield this.hash(retainedEmailValue);
|
|
220
220
|
localStorage.setItem(`EN_HASH_EMAIL`, sha256value);
|
|
221
221
|
this.dataLayer.push({
|
|
222
222
|
event: "EN_HASH_VALUE_UPDATED",
|
|
@@ -228,7 +228,7 @@ export class DataLayer {
|
|
|
228
228
|
}
|
|
229
229
|
else if (this.retainedAddressFields.includes(el.name)) {
|
|
230
230
|
const retainedAddressValue = this.geRetainedFieldsValue("address");
|
|
231
|
-
const sha256value = yield this.
|
|
231
|
+
const sha256value = yield this.hash(retainedAddressValue);
|
|
232
232
|
localStorage.setItem(`EN_HASH_ADDRESS`, sha256value);
|
|
233
233
|
this.dataLayer.push({
|
|
234
234
|
event: "EN_HASH_VALUE_UPDATED",
|
|
@@ -239,7 +239,7 @@ export class DataLayer {
|
|
|
239
239
|
}
|
|
240
240
|
else if (this.retainedPhoneFields.includes(el.name)) {
|
|
241
241
|
const retainedPhoneValue = this.geRetainedFieldsValue("phone");
|
|
242
|
-
const sha256value = yield this.
|
|
242
|
+
const sha256value = yield this.hash(retainedPhoneValue);
|
|
243
243
|
localStorage.setItem(`EN_HASH_PHONE`, sha256value);
|
|
244
244
|
this.dataLayer.push({
|
|
245
245
|
event: "EN_HASH_VALUE_UPDATED",
|
|
@@ -281,10 +281,6 @@ export class DataLayer {
|
|
|
281
281
|
}
|
|
282
282
|
}
|
|
283
283
|
hash(value) {
|
|
284
|
-
return btoa(value);
|
|
285
|
-
}
|
|
286
|
-
// TODO: Replace the hash function with this secure SHA-256 implementation later
|
|
287
|
-
shaHash(value) {
|
|
288
284
|
return __awaiter(this, void 0, void 0, function* () {
|
|
289
285
|
const data = this.encoder.encode(value);
|
|
290
286
|
const hashBuffer = yield crypto.subtle.digest("SHA-256", data);
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const AppVersion = "0.23.
|
|
1
|
+
export declare const AppVersion = "0.23.10";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const AppVersion = "0.23.
|
|
1
|
+
export const AppVersion = "0.23.10";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@4site/engrid-scripts",
|
|
3
|
-
"version": "0.23.
|
|
3
|
+
"version": "0.23.10",
|
|
4
4
|
"description": "Scripts for the ENGRID Project",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"strongly-typed-events": "^2.0.9"
|
|
26
26
|
},
|
|
27
27
|
"homepage": "https://github.com/4site-interactive-studios/engrid#readme",
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "2d90ef4a31d54d5e0ebbd5d59d542e8795b752d2",
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"nodemon": "^2.0.20"
|
|
31
31
|
}
|