@4site/engrid-scripts 0.19.14 → 0.19.18
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.d.ts +1 -0
- package/dist/data-attributes.js +14 -0
- package/dist/input-placeholders.js +2 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/welcome-back.js +1 -0
- package/package.json +2 -2
package/dist/data-attributes.js
CHANGED
|
@@ -133,5 +133,19 @@ export class DataAttributes {
|
|
|
133
133
|
if (!CSS.supports("selector(:has(*))")) {
|
|
134
134
|
ENGrid.setBodyData("css-has-selector", "false");
|
|
135
135
|
}
|
|
136
|
+
if (ENGrid.getPageType() === "DONATION") {
|
|
137
|
+
this.addFrequencyDataAttribute();
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
// Add a data attribute to the body tag with how many visible frequency options there are
|
|
141
|
+
addFrequencyDataAttribute() {
|
|
142
|
+
const frequencyOptions = document.querySelectorAll(".en__field--recurrfreq .en__field__item label.en__field__label");
|
|
143
|
+
let visibleFrequencyOptions = 0;
|
|
144
|
+
frequencyOptions.forEach((option) => {
|
|
145
|
+
if (ENGrid.isVisible(option)) {
|
|
146
|
+
visibleFrequencyOptions++;
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
ENGrid.setBodyData("visible-frequency", visibleFrequencyOptions.toString());
|
|
136
150
|
}
|
|
137
151
|
}
|
|
@@ -18,8 +18,10 @@ export class InputPlaceholders {
|
|
|
18
18
|
"input#en__field_supporter_emailAddress": "Email Address",
|
|
19
19
|
"input#en__field_supporter_phoneNumber": "Phone Number (Optional)",
|
|
20
20
|
".en__mandatory input#en__field_supporter_phoneNumber": "Phone Number",
|
|
21
|
+
".required-if-visible input#en__field_supporter_phoneNumber": "Phone Number",
|
|
21
22
|
"input#en__field_supporter_phoneNumber2": "000-000-0000 (Optional)",
|
|
22
23
|
".en__mandatory input#en__field_supporter_phoneNumber2": "000-000-0000",
|
|
24
|
+
".required-if-visible input#en__field_supporter_phoneNumber2": "000-000-0000",
|
|
23
25
|
"input#en__field_supporter_country": "Country",
|
|
24
26
|
"input#en__field_supporter_address1": "Street Address",
|
|
25
27
|
"input#en__field_supporter_address2": "Apt., Ste., Bldg.",
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const AppVersion = "0.19.
|
|
1
|
+
export declare const AppVersion = "0.19.18";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const AppVersion = "0.19.
|
|
1
|
+
export const AppVersion = "0.19.18";
|
package/dist/welcome-back.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@4site/engrid-scripts",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.18",
|
|
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": "a1413fbe71a88aa0959bb8f07266c8998dcb0c1a",
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"nodemon": "^2.0.20"
|
|
31
31
|
}
|