@4site/engrid-scripts 0.23.1 → 0.23.3
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-attributes.js +7 -0
- package/dist/digital-wallets.d.ts +0 -1
- package/dist/digital-wallets.js +11 -3
- package/dist/embedded-ecard.js +13 -1
- package/dist/interfaces/embedded-ecard-options.d.ts +1 -0
- package/dist/interfaces/embedded-ecard-options.js +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
package/dist/data-attributes.js
CHANGED
|
@@ -8,6 +8,13 @@ export class DataAttributes {
|
|
|
8
8
|
this.setDataAttributes();
|
|
9
9
|
}
|
|
10
10
|
setDataAttributes() {
|
|
11
|
+
// Apple Pay Availability
|
|
12
|
+
if (window.hasOwnProperty("ApplePaySession")) {
|
|
13
|
+
ENGrid.setBodyData("apple-pay-available", "true");
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
ENGrid.setBodyData("apple-pay-available", "false");
|
|
17
|
+
}
|
|
11
18
|
// Add the Page Type as a Data Attribute on the Body Tag
|
|
12
19
|
if (ENGrid.checkNested(window, "pageJson", "pageType")) {
|
|
13
20
|
ENGrid.setBodyData("page-type", window.pageJson.pageType);
|
package/dist/digital-wallets.js
CHANGED
|
@@ -87,8 +87,17 @@ export class DigitalWallets {
|
|
|
87
87
|
}
|
|
88
88
|
addStripeDigitalWallets() {
|
|
89
89
|
this.addOptionToPaymentTypeField("stripedigitalwallet", "GooglePay / ApplePay");
|
|
90
|
-
ENGrid.setBodyData(
|
|
91
|
-
|
|
90
|
+
// ENGrid.setBodyData(
|
|
91
|
+
// "payment-type-option-apple-pay",
|
|
92
|
+
// DigitalWallets.isApplePayAvailable.toString()
|
|
93
|
+
// );
|
|
94
|
+
// ENGrid.setBodyData(
|
|
95
|
+
// "payment-type-option-google-pay",
|
|
96
|
+
// !DigitalWallets.isApplePayAvailable.toString()
|
|
97
|
+
// );
|
|
98
|
+
// TODO: Change to trustworthy detection of Google Pay & Apple Pay availability
|
|
99
|
+
ENGrid.setBodyData("payment-type-option-apple-pay", "true");
|
|
100
|
+
ENGrid.setBodyData("payment-type-option-google-pay", "true");
|
|
92
101
|
ENGrid.setBodyData("payment-type-option-stripedigitalwallet", "true");
|
|
93
102
|
}
|
|
94
103
|
addPaypalTouchDigitalWallets() {
|
|
@@ -144,4 +153,3 @@ export class DigitalWallets {
|
|
|
144
153
|
observer.observe(node, { childList: true, subtree: true });
|
|
145
154
|
}
|
|
146
155
|
}
|
|
147
|
-
DigitalWallets.isApplePayAvailable = !!window.hasOwnProperty("ApplePaySession");
|
package/dist/embedded-ecard.js
CHANGED
|
@@ -94,8 +94,20 @@ export class EmbeddedEcard {
|
|
|
94
94
|
return iframe;
|
|
95
95
|
}
|
|
96
96
|
addEventListeners() {
|
|
97
|
+
var _a;
|
|
97
98
|
const sendEcardCheckbox = document.getElementById("en__field_embedded-ecard");
|
|
98
|
-
this.
|
|
99
|
+
if (this.options.requireInMemCheckbox) {
|
|
100
|
+
const inMemoriamCheckbox = document.getElementById("en__field_transaction_inmem");
|
|
101
|
+
inMemoriamCheckbox === null || inMemoriamCheckbox === void 0 ? void 0 : inMemoriamCheckbox.addEventListener("change", (e) => {
|
|
102
|
+
const checkbox = e.target;
|
|
103
|
+
const _sendEcardCheckbox = document.getElementById("en__field_embedded-ecard");
|
|
104
|
+
this.toggleEcardForm(checkbox.checked && _sendEcardCheckbox.checked);
|
|
105
|
+
});
|
|
106
|
+
this.toggleEcardForm(((_a = inMemoriamCheckbox === null || inMemoriamCheckbox === void 0 ? void 0 : inMemoriamCheckbox.checked) !== null && _a !== void 0 ? _a : true) && sendEcardCheckbox.checked);
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
this.toggleEcardForm(sendEcardCheckbox.checked);
|
|
110
|
+
}
|
|
99
111
|
sendEcardCheckbox === null || sendEcardCheckbox === void 0 ? void 0 : sendEcardCheckbox.addEventListener("change", (e) => {
|
|
100
112
|
const checkbox = e.target;
|
|
101
113
|
this.toggleEcardForm(checkbox.checked);
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const AppVersion = "0.23.
|
|
1
|
+
export declare const AppVersion = "0.23.3";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const AppVersion = "0.23.
|
|
1
|
+
export const AppVersion = "0.23.3";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@4site/engrid-scripts",
|
|
3
|
-
"version": "0.23.
|
|
3
|
+
"version": "0.23.3",
|
|
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": "22de6d3bbd7da161d1a2b388fc2f824316cd7362",
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"nodemon": "^2.0.20"
|
|
31
31
|
}
|