@4site/engrid-scripts 0.24.3 → 0.24.4
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/interfaces/options.d.ts +1 -0
- package/dist/tidycontact.d.ts +1 -0
- package/dist/tidycontact.js +12 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
|
@@ -52,6 +52,7 @@ export interface Options {
|
|
|
52
52
|
};
|
|
53
53
|
TidyContact?: false | {
|
|
54
54
|
cid?: string;
|
|
55
|
+
page_types?: ("DONATION" | "ECARD" | "SURVEY" | "EMAILTOTARGET" | "ADVOCACY" | "SUBSCRIBEFORM" | "EVENT" | "SUPPORTERHUB" | "UNSUBSCRIBE" | "TWEETPAGE" | "UNKNOWN")[];
|
|
55
56
|
record_field?: string;
|
|
56
57
|
date_field?: string;
|
|
57
58
|
status_field?: string;
|
package/dist/tidycontact.d.ts
CHANGED
package/dist/tidycontact.js
CHANGED
|
@@ -268,6 +268,10 @@ export class TidyContact {
|
|
|
268
268
|
this.options = ENGrid.getOption("TidyContact");
|
|
269
269
|
if (this.options === false || !((_a = this.options) === null || _a === void 0 ? void 0 : _a.cid))
|
|
270
270
|
return;
|
|
271
|
+
if (!this.shouldRun()) {
|
|
272
|
+
this.logger.log("TidyContact is disabled on this page type");
|
|
273
|
+
return;
|
|
274
|
+
}
|
|
271
275
|
this.loadOptions();
|
|
272
276
|
if (!this.hasAddressFields() && !this.phoneEnabled()) {
|
|
273
277
|
this.logger.log("No address fields found");
|
|
@@ -298,6 +302,14 @@ export class TidyContact {
|
|
|
298
302
|
}
|
|
299
303
|
}
|
|
300
304
|
}
|
|
305
|
+
shouldRun() {
|
|
306
|
+
if (this.options &&
|
|
307
|
+
this.options.page_types &&
|
|
308
|
+
this.options.page_types.length > 0) {
|
|
309
|
+
return this.options.page_types.includes(ENGrid.getPageType());
|
|
310
|
+
}
|
|
311
|
+
return true;
|
|
312
|
+
}
|
|
301
313
|
loadOptions() {
|
|
302
314
|
var _a, _b, _c, _d;
|
|
303
315
|
if (this.options) {
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const AppVersion = "0.24.
|
|
1
|
+
export declare const AppVersion = "0.24.4";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const AppVersion = "0.24.
|
|
1
|
+
export const AppVersion = "0.24.4";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@4site/engrid-scripts",
|
|
3
|
-
"version": "0.24.
|
|
3
|
+
"version": "0.24.4",
|
|
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": "591c9c9c6ae91db22b43352e23f948310a22d120",
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"nodemon": "^2.0.20"
|
|
31
31
|
}
|