@4site/engrid-scripts 0.23.1 → 0.23.2

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.
@@ -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);
@@ -1,5 +1,4 @@
1
1
  export declare class DigitalWallets {
2
- private static isApplePayAvailable;
3
2
  constructor();
4
3
  private addStripeDigitalWallets;
5
4
  private addPaypalTouchDigitalWallets;
@@ -87,8 +87,17 @@ export class DigitalWallets {
87
87
  }
88
88
  addStripeDigitalWallets() {
89
89
  this.addOptionToPaymentTypeField("stripedigitalwallet", "GooglePay / ApplePay");
90
- ENGrid.setBodyData("payment-type-option-apple-pay", DigitalWallets.isApplePayAvailable.toString());
91
- ENGrid.setBodyData("payment-type-option-google-pay", !DigitalWallets.isApplePayAvailable.toString());
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/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const AppVersion = "0.23.1";
1
+ export declare const AppVersion = "0.23.2";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const AppVersion = "0.23.1";
1
+ export const AppVersion = "0.23.2";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@4site/engrid-scripts",
3
- "version": "0.23.1",
3
+ "version": "0.23.2",
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": "b72340117e2f15c4d6392467a568f034770d06a0",
28
+ "gitHead": "7f5ab2b32142ec7a5885fea3354370a4bad06cce",
29
29
  "devDependencies": {
30
30
  "nodemon": "^2.0.20"
31
31
  }