@4site/engrid-scripts 0.28.4 → 0.28.5
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/events/donation-amount.js +6 -4
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
|
@@ -31,12 +31,14 @@ export class DonationAmount {
|
|
|
31
31
|
// Load the current amount
|
|
32
32
|
this.load();
|
|
33
33
|
}
|
|
34
|
-
//
|
|
35
|
-
// (EN renders it as value="other"), so it cleans to 0
|
|
34
|
+
// EN may render the "other" radio with a non-numeric or non-positive value
|
|
36
35
|
isOtherAmountSelected() {
|
|
37
36
|
const selectedAmount = document.querySelector(`input[name="${this._radios}"]:checked`);
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
if (!selectedAmount) {
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
const amount = Number(selectedAmount.value);
|
|
41
|
+
return !Number.isFinite(amount) || amount <= 0;
|
|
40
42
|
}
|
|
41
43
|
syncOtherAmount(field, formatValue = false) {
|
|
42
44
|
const otherIsSelected = this.isOtherAmountSelected();
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const AppVersion = "0.28.
|
|
1
|
+
export declare const AppVersion = "0.28.5";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const AppVersion = "0.28.
|
|
1
|
+
export const AppVersion = "0.28.5";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@4site/engrid-scripts",
|
|
3
|
-
"version": "0.28.
|
|
3
|
+
"version": "0.28.5",
|
|
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": "8151380d0dd8e669c29762358586e0d276988ced",
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"nodemon": "^2.0.20",
|
|
31
31
|
"typescript": "^4.9.5"
|