Skip to content

Commit e6207db

Browse files
committed
ENgrid Update
1 parent a5bd9e4 commit e6207db

5 files changed

Lines changed: 39 additions & 26 deletions

File tree

dist/engrid.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
*
2020
* ENGRID PAGE TEMPLATE ASSETS
2121
*
22-
* Date: Tuesday, November 4, 2025 @ 17:29:41 ET
22+
* Date: Thursday, November 6, 2025 @ 10:44:05 ET
2323
* By: fernando
2424
* ENGrid styles: v0.23.0
25-
* ENGrid scripts: v0.23.0
25+
* ENGrid scripts: v0.23.2
2626
*
2727
* Created by 4Site Studios
2828
* Come work with us or join our team, we would love to hear from you

dist/engrid.js

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
*
1818
* ENGRID PAGE TEMPLATE ASSETS
1919
*
20-
* Date: Tuesday, November 4, 2025 @ 17:29:41 ET
20+
* Date: Thursday, November 6, 2025 @ 10:44:05 ET
2121
* By: fernando
2222
* ENGrid styles: v0.23.0
23-
* ENGrid scripts: v0.23.0
23+
* ENGrid scripts: v0.23.2
2424
*
2525
* Created by 4Site Studios
2626
* Come work with us or join our team, we would love to hear from you
@@ -13478,6 +13478,13 @@ class DataAttributes {
1347813478
this.setDataAttributes();
1347913479
}
1348013480
setDataAttributes() {
13481+
// Apple Pay Availability
13482+
if (window.hasOwnProperty("ApplePaySession")) {
13483+
engrid_ENGrid.setBodyData("apple-pay-available", "true");
13484+
}
13485+
else {
13486+
engrid_ENGrid.setBodyData("apple-pay-available", "false");
13487+
}
1348113488
// Add the Page Type as a Data Attribute on the Body Tag
1348213489
if (engrid_ENGrid.checkNested(window, "pageJson", "pageType")) {
1348313490
engrid_ENGrid.setBodyData("page-type", window.pageJson.pageType);
@@ -20985,8 +20992,17 @@ class DigitalWallets {
2098520992
}
2098620993
addStripeDigitalWallets() {
2098720994
this.addOptionToPaymentTypeField("stripedigitalwallet", "GooglePay / ApplePay");
20988-
engrid_ENGrid.setBodyData("payment-type-option-apple-pay", DigitalWallets.isApplePayAvailable.toString());
20989-
engrid_ENGrid.setBodyData("payment-type-option-google-pay", !DigitalWallets.isApplePayAvailable.toString());
20995+
// ENGrid.setBodyData(
20996+
// "payment-type-option-apple-pay",
20997+
// DigitalWallets.isApplePayAvailable.toString()
20998+
// );
20999+
// ENGrid.setBodyData(
21000+
// "payment-type-option-google-pay",
21001+
// !DigitalWallets.isApplePayAvailable.toString()
21002+
// );
21003+
// TODO: Change to trustworthy detection of Google Pay & Apple Pay availability
21004+
engrid_ENGrid.setBodyData("payment-type-option-apple-pay", "true");
21005+
engrid_ENGrid.setBodyData("payment-type-option-google-pay", "true");
2099021006
engrid_ENGrid.setBodyData("payment-type-option-stripedigitalwallet", "true");
2099121007
}
2099221008
addPaypalTouchDigitalWallets() {
@@ -21042,7 +21058,6 @@ class DigitalWallets {
2104221058
observer.observe(node, { childList: true, subtree: true });
2104321059
}
2104421060
}
21045-
DigitalWallets.isApplePayAvailable = !!window.hasOwnProperty("ApplePaySession");
2104621061

2104721062
;// CONCATENATED MODULE: ./node_modules/@4site/engrid-scripts/dist/mobile-cta.js
2104821063
// This component adds a floating CTA button to the page, which can be used to scroll to the top of the form
@@ -23880,19 +23895,23 @@ class PreferredPaymentMethod {
2388023895
this.logger.log("Not a donation page. Skipping preferred payment selection.");
2388123896
return false;
2388223897
}
23898+
// If there's a "payment" URL parameter, we can proceed
23899+
if (engrid_ENGrid.getUrlParameter("payment")) {
23900+
return true;
23901+
}
2388323902
if (!this.getGiveBySelectInputs().length) {
2388423903
this.logger.log("No give-by-select inputs found. Skipping.");
2388523904
return false;
2388623905
}
23887-
const config = engrid_ENGrid.getOption("PreferredPaymentMethod");
23906+
const config = engrid_ENGrid.getOption("PreferredPaymentMethod") || false;
2388823907
if (config === false) {
2388923908
this.logger.log("PreferredPaymentMethod option disabled.");
2389023909
return false;
2389123910
}
2389223911
return true;
2389323912
}
2389423913
resolveConfig() {
23895-
const option = engrid_ENGrid.getOption("PreferredPaymentMethod");
23914+
const option = engrid_ENGrid.getOption("PreferredPaymentMethod") || false;
2389623915
if (option && typeof option === "object") {
2389723916
const preferredPaymentMethodField = option.preferredPaymentMethodField || "";
2389823917
const defaultPaymentMethod = Array.isArray(option.defaultPaymentMethod)
@@ -24066,14 +24085,8 @@ class PreferredPaymentMethod {
2406624085
this.logger.log(`Payment method "${method}" is not available to select.`);
2406724086
return;
2406824087
}
24069-
const label = this.findLabelForInput(input);
24070-
if (label) {
24071-
label.click();
24072-
}
24073-
else {
24074-
input.checked = true;
24075-
input.dispatchEvent(new Event("change", { bubbles: true, cancelable: true }));
24076-
}
24088+
input.checked = true;
24089+
input.dispatchEvent(new Event("change", { bubbles: true, cancelable: true }));
2407724090
engrid_ENGrid.setPaymentType(method);
2407824091
this.syncPreferredField(input.value);
2407924092
this.selectionFinalized = true;
@@ -24142,7 +24155,7 @@ class PreferredPaymentMethod {
2414224155
}
2414324156

2414424157
;// CONCATENATED MODULE: ./node_modules/@4site/engrid-scripts/dist/version.js
24145-
const AppVersion = "0.23.0";
24158+
const AppVersion = "0.23.2";
2414624159

2414724160
;// CONCATENATED MODULE: ./node_modules/@4site/engrid-scripts/dist/index.js
2414824161
// Runs first so it can change the DOM markup before any markup dependent code fires

dist/engrid.min.css

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/engrid.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)