@4site/engrid-scripts 0.21.10 → 0.21.11
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/swap-amounts.js +10 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
package/dist/swap-amounts.js
CHANGED
|
@@ -57,6 +57,7 @@ export class SwapAmounts {
|
|
|
57
57
|
const urlParams = new URLSearchParams(window.location.search);
|
|
58
58
|
const amounts = urlParams.get("engrid-amounts");
|
|
59
59
|
if (amounts) {
|
|
60
|
+
this.defaultChange = true;
|
|
60
61
|
const amountArray = amounts.split(",").map((amt) => amt.trim());
|
|
61
62
|
const defaultAmount = parseFloat(ENGrid.getUrlParameter("transaction.donationAmt")) || parseFloat(amountArray[0]);
|
|
62
63
|
const amountsObj = {};
|
|
@@ -78,7 +79,9 @@ export class SwapAmounts {
|
|
|
78
79
|
ignoreCurrentValue: this.ignoreCurrentValue(),
|
|
79
80
|
});
|
|
80
81
|
this._amount.load();
|
|
81
|
-
this.logger.log("Amounts Swapped To", window.EngridAmounts[this._frequency.frequency]
|
|
82
|
+
this.logger.log("Amounts Swapped To", window.EngridAmounts[this._frequency.frequency], {
|
|
83
|
+
ignoreCurrentValue: this.ignoreCurrentValue(),
|
|
84
|
+
});
|
|
82
85
|
this.swapped = true;
|
|
83
86
|
}
|
|
84
87
|
}
|
|
@@ -97,8 +100,13 @@ export class SwapAmounts {
|
|
|
97
100
|
return "EngridAmounts" in window;
|
|
98
101
|
}
|
|
99
102
|
ignoreCurrentValue() {
|
|
103
|
+
if (ENGrid.getUrlParameter("transaction.donationAmt") !== null) {
|
|
104
|
+
return this._amount.amount ===
|
|
105
|
+
parseFloat(ENGrid.getUrlParameter("transaction.donationAmt"))
|
|
106
|
+
? false
|
|
107
|
+
: true;
|
|
108
|
+
}
|
|
100
109
|
return !(window.EngagingNetworks.require._defined.enjs.checkSubmissionFailed() ||
|
|
101
|
-
ENGrid.getUrlParameter("transaction.donationAmt") !== null ||
|
|
102
110
|
this.defaultChange);
|
|
103
111
|
}
|
|
104
112
|
}
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const AppVersion = "0.21.
|
|
1
|
+
export declare const AppVersion = "0.21.11";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const AppVersion = "0.21.
|
|
1
|
+
export const AppVersion = "0.21.11";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@4site/engrid-scripts",
|
|
3
|
-
"version": "0.21.
|
|
3
|
+
"version": "0.21.11",
|
|
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": "b9f5faf46fdb52b11fb139ebd6f0139d18fbfd97",
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"nodemon": "^2.0.20"
|
|
31
31
|
}
|