@churchapps/helpers 1.0.39 → 1.0.41
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/ApiHelper.d.ts +25 -17
- package/dist/ApiHelper.d.ts.map +1 -1
- package/dist/ApiHelper.js +37 -21
- package/dist/ApiHelper.js.map +1 -1
- package/dist/AppearanceHelper.js +1 -5
- package/dist/AppearanceHelper.js.map +1 -1
- package/dist/ArrayHelper.js +3 -7
- package/dist/ArrayHelper.js.map +1 -1
- package/dist/CommonEnvironmentHelper.js +74 -80
- package/dist/CommonEnvironmentHelper.js.map +1 -1
- package/dist/CurrencyHelper.js +1 -5
- package/dist/CurrencyHelper.js.map +1 -1
- package/dist/DateHelper.js +8 -15
- package/dist/DateHelper.js.map +1 -1
- package/dist/DonationHelper.js +1 -5
- package/dist/DonationHelper.js.map +1 -1
- package/dist/ErrorHelper.js +28 -32
- package/dist/ErrorHelper.js.map +1 -1
- package/dist/EventHelper.js +37 -41
- package/dist/EventHelper.js.map +1 -1
- package/dist/FileHelper.js +37 -41
- package/dist/FileHelper.js.map +1 -1
- package/dist/PersonHelper.js +3 -7
- package/dist/PersonHelper.js.map +1 -1
- package/dist/UniqueIdHelper.js +8 -12
- package/dist/UniqueIdHelper.js.map +1 -1
- package/dist/UserHelper.js +38 -40
- package/dist/UserHelper.js.map +1 -1
- package/dist/index.js +14 -44
- package/dist/index.js.map +1 -1
- package/dist/interfaces/Access.js +1 -2
- package/dist/interfaces/Attendance.js +1 -2
- package/dist/interfaces/Content.js +1 -2
- package/dist/interfaces/Doing.js +1 -2
- package/dist/interfaces/Donation.js +10 -5
- package/dist/interfaces/Donation.js.map +1 -1
- package/dist/interfaces/Error.js +1 -2
- package/dist/interfaces/Membership.js +1 -2
- package/dist/interfaces/Messaging.js +1 -2
- package/dist/interfaces/Permissions.js +83 -87
- package/dist/interfaces/Permissions.js.map +1 -1
- package/dist/interfaces/Reporting.js +1 -2
- package/dist/interfaces/UserContextInterface.js +1 -2
- package/dist/interfaces/index.js +11 -27
- package/dist/interfaces/index.js.map +1 -1
- package/package.json +10 -7
- package/src/ApiHelper.ts +51 -17
- package/tsconfig.json +3 -3
package/dist/ErrorHelper.js
CHANGED
|
@@ -1,34 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { ApiHelper } from "./ApiHelper";
|
|
2
|
+
export class ErrorHelper {
|
|
3
|
+
static getAppData;
|
|
4
|
+
static customErrorHandler;
|
|
5
|
+
static init = (getAppData, customErrorHandler) => {
|
|
6
|
+
ErrorHelper.getAppData = getAppData;
|
|
7
|
+
ErrorHelper.customErrorHandler = customErrorHandler;
|
|
8
|
+
};
|
|
9
|
+
static logError = (errorType, message, details) => {
|
|
10
|
+
if (this.getAppData) {
|
|
11
|
+
const data = this.getAppData();
|
|
12
|
+
const log = {
|
|
13
|
+
application: data.application,
|
|
14
|
+
errorTime: new Date(),
|
|
15
|
+
userId: data.userId,
|
|
16
|
+
churchId: data.churchId,
|
|
17
|
+
originUrl: data.originUrl,
|
|
18
|
+
errorType: errorType,
|
|
19
|
+
message: message,
|
|
20
|
+
details: details
|
|
21
|
+
};
|
|
22
|
+
if (log.errorType === "401" && log.message.indexOf("/users/login") > -1)
|
|
23
|
+
return;
|
|
24
|
+
ApiHelper.postAnonymous("/errors", [log], "MembershipApi");
|
|
25
|
+
if (ErrorHelper.customErrorHandler)
|
|
26
|
+
ErrorHelper.customErrorHandler(log);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
7
29
|
}
|
|
8
|
-
exports.ErrorHelper = ErrorHelper;
|
|
9
|
-
_a = ErrorHelper;
|
|
10
|
-
ErrorHelper.init = (getAppData, customErrorHandler) => {
|
|
11
|
-
_a.getAppData = getAppData;
|
|
12
|
-
_a.customErrorHandler = customErrorHandler;
|
|
13
|
-
};
|
|
14
|
-
ErrorHelper.logError = (errorType, message, details) => {
|
|
15
|
-
if (_a.getAppData) {
|
|
16
|
-
const data = _a.getAppData();
|
|
17
|
-
const log = {
|
|
18
|
-
application: data.application,
|
|
19
|
-
errorTime: new Date(),
|
|
20
|
-
userId: data.userId,
|
|
21
|
-
churchId: data.churchId,
|
|
22
|
-
originUrl: data.originUrl,
|
|
23
|
-
errorType: errorType,
|
|
24
|
-
message: message,
|
|
25
|
-
details: details
|
|
26
|
-
};
|
|
27
|
-
if (log.errorType === "401" && log.message.indexOf("/users/login") > -1)
|
|
28
|
-
return;
|
|
29
|
-
ApiHelper_1.ApiHelper.postAnonymous("/errors", [log], "MembershipApi");
|
|
30
|
-
if (_a.customErrorHandler)
|
|
31
|
-
_a.customErrorHandler(log);
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
30
|
//# sourceMappingURL=ErrorHelper.js.map
|
package/dist/ErrorHelper.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorHelper.js","sourceRoot":"","sources":["../src/ErrorHelper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ErrorHelper.js","sourceRoot":"","sources":["../src/ErrorHelper.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,MAAM,OAAO,WAAW;IAEtB,MAAM,CAAC,UAAU,CAAmF;IACpG,MAAM,CAAC,kBAAkB,CAAsC;IAE/D,MAAM,CAAC,IAAI,GAAG,CAAC,UAAsC,EAAE,kBAAuD,EAAE,EAAE;QAChH,WAAW,CAAC,UAAU,GAAG,UAAU,CAAC;QACpC,WAAW,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;IACtD,CAAC,CAAA;IAED,MAAM,CAAC,QAAQ,GAAG,CAAC,SAAgB,EAAE,OAAc,EAAE,OAAc,EAAE,EAAE;QACrE,IAAI,IAAI,CAAC,UAAU,EACnB,CAAC;YACC,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;YAC/B,MAAM,GAAG,GAAqB;gBAC5B,WAAW,EAAE,IAAI,CAAC,WAAW;gBAC7B,SAAS,EAAE,IAAI,IAAI,EAAE;gBACrB,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBACvB,SAAS,EAAE,IAAI,CAAC,SAAS;gBACzB,SAAS,EAAE,SAAS;gBACpB,OAAO,EAAE,OAAO;gBAChB,OAAO,EAAE,OAAO;aACjB,CAAA;YAED,IAAI,GAAG,CAAC,SAAS,KAAG,KAAK,IAAI,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,cAAc,CAAC,GAAC,CAAC,CAAC;gBAAE,OAAO;YAC5E,SAAS,CAAC,aAAa,CAAC,SAAS,EAAE,CAAC,GAAG,CAAC,EAAE,eAAe,CAAC,CAAC;YAC3D,IAAI,WAAW,CAAC,kBAAkB;gBAAE,WAAW,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC;QAC1E,CAAC;IACH,CAAC,CAAA"}
|
package/dist/EventHelper.js
CHANGED
|
@@ -1,43 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
if (events[i].exceptionDates?.length > 0) {
|
|
27
|
-
const parsedDates = events[i].exceptionDates.map(d => new Date(d).toISOString());
|
|
28
|
-
if (parsedDates.indexOf(events[i].start.toISOString()) > -1)
|
|
29
|
-
events.splice(i, 1);
|
|
1
|
+
import { RRule } from "rrule";
|
|
2
|
+
export class EventHelper {
|
|
3
|
+
static getRange = (event, startDate, endDate) => {
|
|
4
|
+
const start = new Date(event.start);
|
|
5
|
+
const rrule = EventHelper.getFullRRule(event);
|
|
6
|
+
const dates = rrule.between(startDate, endDate);
|
|
7
|
+
dates.forEach(d => {
|
|
8
|
+
d.setHours(start.getHours());
|
|
9
|
+
d.setMinutes(start.getMinutes());
|
|
10
|
+
d.setSeconds(start.getSeconds());
|
|
11
|
+
});
|
|
12
|
+
return dates;
|
|
13
|
+
};
|
|
14
|
+
static getFullRRule = (event) => {
|
|
15
|
+
let rrule = RRule.fromString(event.recurrenceRule);
|
|
16
|
+
rrule.options.dtstart = new Date(event.start);
|
|
17
|
+
return rrule;
|
|
18
|
+
};
|
|
19
|
+
static removeExcludeDates = (events) => {
|
|
20
|
+
for (let i = events.length - 1; i >= 0; i--) {
|
|
21
|
+
if (events[i].exceptionDates?.length > 0) {
|
|
22
|
+
const parsedDates = events[i].exceptionDates.map(d => new Date(d).toISOString());
|
|
23
|
+
if (parsedDates.indexOf(events[i].start.toISOString()) > -1)
|
|
24
|
+
events.splice(i, 1);
|
|
25
|
+
}
|
|
30
26
|
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
27
|
+
};
|
|
28
|
+
static getPartialRRuleString = (options) => {
|
|
29
|
+
const parts = new RRule(options).toString().split("RRULE:");
|
|
30
|
+
const result = parts.length === 2 ? parts[1] : "";
|
|
31
|
+
return result;
|
|
32
|
+
};
|
|
33
|
+
static cleanRule = (options) => {
|
|
34
|
+
options.byhour = undefined;
|
|
35
|
+
options.byminute = undefined;
|
|
36
|
+
options.bysecond = undefined;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
43
39
|
//# sourceMappingURL=EventHelper.js.map
|
package/dist/EventHelper.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventHelper.js","sourceRoot":"","sources":["../src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tC,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,cAAc,EAAE,MAAM,GAAC,CAAC,EACtC,CAAC;gBACC,MAAM,WAAW,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAA,EAAE,CAAA,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;gBAC/E,IAAI,WAAW,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,GAAC,CAAC,CAAC;oBAAE,MAAM,CAAC,MAAM,CAAC,CAAC,EAAC,CAAC,CAAC,CAAC;YAChF,CAAC;QACH,CAAC;IACH,CAAC,CAAA;IAED,MAAM,CAAC,qBAAqB,GAAG,CAAC,OAAqB,EAAE,EAAE;QACvD,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAC5D,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,KAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAChD,OAAO,MAAM,CAAC;IAChB,CAAC,CAAA;IAED,MAAM,CAAC,SAAS,GAAG,CAAC,OAAqB,EAAE,EAAE;QAC3C,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;QAC3B,OAAO,CAAC,QAAQ,GAAG,SAAS,CAAC;QAC7B,OAAO,CAAC,QAAQ,GAAG,SAAS,CAAC;IAC/B,CAAC,CAAA"}
|
package/dist/FileHelper.js
CHANGED
|
@@ -1,7 +1,40 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
export class FileHelper {
|
|
2
|
+
static postPresignedFile = (presigned, uploadedFile, progressCallback) => {
|
|
3
|
+
const formData = new FormData();
|
|
4
|
+
formData.append("key", presigned.key);
|
|
5
|
+
formData.append("acl", "public-read");
|
|
6
|
+
formData.append("Content-Type", uploadedFile.type);
|
|
7
|
+
for (const property in presigned.fields)
|
|
8
|
+
formData.append(property, presigned.fields[property]);
|
|
9
|
+
formData.append("file", uploadedFile);
|
|
10
|
+
// Use XMLHttpRequest for upload progress tracking since fetch doesn't support it natively
|
|
11
|
+
return new Promise((resolve, reject) => {
|
|
12
|
+
const xhr = new XMLHttpRequest();
|
|
13
|
+
xhr.upload.addEventListener('progress', (event) => {
|
|
14
|
+
if (event.lengthComputable) {
|
|
15
|
+
const percent = Math.round((event.loaded / event.total) * 100);
|
|
16
|
+
progressCallback(percent);
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
xhr.addEventListener('load', () => {
|
|
20
|
+
if (xhr.status >= 200 && xhr.status < 300) {
|
|
21
|
+
resolve({
|
|
22
|
+
status: xhr.status,
|
|
23
|
+
statusText: xhr.statusText,
|
|
24
|
+
data: xhr.responseText
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
reject(new Error(`HTTP Error: ${xhr.status} ${xhr.statusText}`));
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
xhr.addEventListener('error', () => {
|
|
32
|
+
reject(new Error('Network error occurred'));
|
|
33
|
+
});
|
|
34
|
+
xhr.open('POST', presigned.url);
|
|
35
|
+
xhr.send(formData);
|
|
36
|
+
});
|
|
37
|
+
};
|
|
5
38
|
static dataURLtoBlob(dataurl) {
|
|
6
39
|
let arr = dataurl.split(",");
|
|
7
40
|
if (arr.length < 2)
|
|
@@ -17,41 +50,4 @@ class FileHelper {
|
|
|
17
50
|
return new Blob([u8arr], { type: mime });
|
|
18
51
|
}
|
|
19
52
|
}
|
|
20
|
-
exports.FileHelper = FileHelper;
|
|
21
|
-
FileHelper.postPresignedFile = (presigned, uploadedFile, progressCallback) => {
|
|
22
|
-
const formData = new FormData();
|
|
23
|
-
formData.append("key", presigned.key);
|
|
24
|
-
formData.append("acl", "public-read");
|
|
25
|
-
formData.append("Content-Type", uploadedFile.type);
|
|
26
|
-
for (const property in presigned.fields)
|
|
27
|
-
formData.append(property, presigned.fields[property]);
|
|
28
|
-
formData.append("file", uploadedFile);
|
|
29
|
-
// Use XMLHttpRequest for upload progress tracking since fetch doesn't support it natively
|
|
30
|
-
return new Promise((resolve, reject) => {
|
|
31
|
-
const xhr = new XMLHttpRequest();
|
|
32
|
-
xhr.upload.addEventListener('progress', (event) => {
|
|
33
|
-
if (event.lengthComputable) {
|
|
34
|
-
const percent = Math.round((event.loaded / event.total) * 100);
|
|
35
|
-
progressCallback(percent);
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
xhr.addEventListener('load', () => {
|
|
39
|
-
if (xhr.status >= 200 && xhr.status < 300) {
|
|
40
|
-
resolve({
|
|
41
|
-
status: xhr.status,
|
|
42
|
-
statusText: xhr.statusText,
|
|
43
|
-
data: xhr.responseText
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
else {
|
|
47
|
-
reject(new Error(`HTTP Error: ${xhr.status} ${xhr.statusText}`));
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
xhr.addEventListener('error', () => {
|
|
51
|
-
reject(new Error('Network error occurred'));
|
|
52
|
-
});
|
|
53
|
-
xhr.open('POST', presigned.url);
|
|
54
|
-
xhr.send(formData);
|
|
55
|
-
});
|
|
56
|
-
};
|
|
57
53
|
//# sourceMappingURL=FileHelper.js.map
|
package/dist/FileHelper.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileHelper.js","sourceRoot":"","sources":["../src/FileHelper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FileHelper.js","sourceRoot":"","sources":["../src/FileHelper.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,UAAU;IAErB,MAAM,CAAC,iBAAiB,GAAG,CAAC,SAAc,EAAE,YAAkB,EAAE,gBAA2C,EAAE,EAAE;QAC7G,MAAM,QAA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E,CAAC,CAAC;IAC3C,CAAC"}
|
package/dist/PersonHelper.js
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.PersonHelper = void 0;
|
|
4
|
-
const CommonEnvironmentHelper_1 = require("./CommonEnvironmentHelper");
|
|
5
|
-
class PersonHelper {
|
|
1
|
+
import { CommonEnvironmentHelper } from "./CommonEnvironmentHelper";
|
|
2
|
+
export class PersonHelper {
|
|
6
3
|
static getPhotoPath(churchId, person) {
|
|
7
4
|
if (!person.photoUpdated) {
|
|
8
5
|
if (person.id?.startsWith("PER0000"))
|
|
@@ -19,7 +16,7 @@ class PersonHelper {
|
|
|
19
16
|
else {
|
|
20
17
|
return (person?.photo?.startsWith("data:image/png;base64,") || person.photo?.indexOf("://") > -1)
|
|
21
18
|
? person.photo
|
|
22
|
-
:
|
|
19
|
+
: CommonEnvironmentHelper.ContentRoot + person.photo;
|
|
23
20
|
}
|
|
24
21
|
}
|
|
25
22
|
static getAge(birthdate) {
|
|
@@ -80,5 +77,4 @@ class PersonHelper {
|
|
|
80
77
|
return false;
|
|
81
78
|
}
|
|
82
79
|
}
|
|
83
|
-
exports.PersonHelper = PersonHelper;
|
|
84
80
|
//# sourceMappingURL=PersonHelper.js.map
|
package/dist/PersonHelper.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PersonHelper.js","sourceRoot":"","sources":["../src/PersonHelper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PersonHelper.js","sourceRoot":"","sources":["../src/PersonHelper.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,MAAM,OAAO,YAAY;IAEhB,MAAM,CAAC,YAAY,CAAC,QAAgB,EAAE,MAAW;QACtD,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC;YACzB,IAAI,MAAM,CAAC,EAAE,EAAE,UAAU,CAAC,SAAS,CAAC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AQ,IAAI,EAAE,IAAI,OAAO,CAAC,IAAI,IAAI,EAAE,GAAG,CAAC,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,IAAI,OAAO,CAAC,KAAK,IAAI,EAAE,IAAI,OAAO,CAAC,GAAG,IAAI,EAAE,EAAE,CAAA;IAC7K,CAAC;IAEM,MAAM,CAAC,iBAAiB,CAAC,YAAkC,EAAE,YAAkC;QACpG,MAAM,cAAc,GAAyB;YAC3C,GAAG,YAAY;YACf,QAAQ,EAAE,YAAY,CAAC,QAAQ;YAC/B,QAAQ,EAAE,YAAY,CAAC,QAAQ;YAC/B,IAAI,EAAE,YAAY,CAAC,IAAI;YACvB,KAAK,EAAE,YAAY,CAAC,KAAK;YACzB,GAAG,EAAE,YAAY,CAAC,GAAG;SACtB,CAAA;QAED,OAAO,cAAc,CAAA;IACvB,CAAC;IAEM,MAAM,CAAC,uBAAuB,CAAC,MAAuB;QAC3D,MAAM,aAAa,GAAW,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,IAAI,EAAE,CAAC;QAC9E,IAAI,aAAa,KAAK,EAAE,EAAE,CAAC;YACzB,OAAO,IAAI,CAAC;QACd,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;CACF"}
|
package/dist/UniqueIdHelper.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
export class UniqueIdHelper {
|
|
2
|
+
static chars = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z",
|
|
3
|
+
"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z",
|
|
4
|
+
"0", "1", "2", "3", "4", "5", "6", "7", "8", "9",
|
|
5
|
+
"-", "_"];
|
|
6
|
+
static alphanumericChars = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z",
|
|
7
|
+
"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z",
|
|
8
|
+
"0", "1", "2", "3", "4", "5", "6", "7", "8", "9"];
|
|
5
9
|
static isMissing(obj) {
|
|
6
10
|
if (obj === undefined || obj === null)
|
|
7
11
|
return true;
|
|
@@ -26,12 +30,4 @@ class UniqueIdHelper {
|
|
|
26
30
|
return result;
|
|
27
31
|
}
|
|
28
32
|
}
|
|
29
|
-
exports.UniqueIdHelper = UniqueIdHelper;
|
|
30
|
-
UniqueIdHelper.chars = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z",
|
|
31
|
-
"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z",
|
|
32
|
-
"0", "1", "2", "3", "4", "5", "6", "7", "8", "9",
|
|
33
|
-
"-", "_"];
|
|
34
|
-
UniqueIdHelper.alphanumericChars = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z",
|
|
35
|
-
"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z",
|
|
36
|
-
"0", "1", "2", "3", "4", "5", "6", "7", "8", "9"];
|
|
37
33
|
//# sourceMappingURL=UniqueIdHelper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UniqueIdHelper.js","sourceRoot":"","sources":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,EAAE,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC;YACxD,MAAM,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;YACxB,MAAM,IAAI,CAAC,CAAC;QACd,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC"}
|
package/dist/UserHelper.js
CHANGED
|
@@ -1,18 +1,45 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { ApiHelper } from "./ApiHelper";
|
|
2
|
+
export class UserHelper {
|
|
3
|
+
static currentUserChurch;
|
|
4
|
+
static userChurches;
|
|
5
|
+
static user;
|
|
6
|
+
static churchChanged = false;
|
|
7
|
+
static person;
|
|
8
|
+
static selectChurch = async (context, churchId, keyName) => {
|
|
9
|
+
let userChurch = null;
|
|
10
|
+
if (churchId) {
|
|
11
|
+
UserHelper.userChurches.forEach(uc => {
|
|
12
|
+
if (uc.church.id === churchId)
|
|
13
|
+
userChurch = uc;
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
else if (keyName)
|
|
17
|
+
UserHelper.userChurches.forEach(uc => { if (uc.church.subDomain === keyName)
|
|
18
|
+
userChurch = uc; });
|
|
19
|
+
else
|
|
20
|
+
userChurch = UserHelper.userChurches[0];
|
|
21
|
+
if (!userChurch)
|
|
22
|
+
return;
|
|
23
|
+
else {
|
|
24
|
+
UserHelper.currentUserChurch = userChurch;
|
|
25
|
+
UserHelper.setupApiHelper(UserHelper.currentUserChurch);
|
|
26
|
+
// TODO - remove context code from here and perform the logic in the component itself.
|
|
27
|
+
if (context) {
|
|
28
|
+
if (context.userChurch !== null)
|
|
29
|
+
UserHelper.churchChanged = true;
|
|
30
|
+
context.setUserChurch(UserHelper.currentUserChurch);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
};
|
|
7
34
|
static setupApiHelper(userChurch) {
|
|
8
|
-
|
|
9
|
-
userChurch.apis.forEach(api => {
|
|
35
|
+
ApiHelper.setDefaultPermissions(userChurch.jwt);
|
|
36
|
+
userChurch.apis.forEach(api => { ApiHelper.setPermissions(api.keyName, api.jwt, api.permissions); });
|
|
10
37
|
}
|
|
11
38
|
static setupApiHelperNoChurch(user) {
|
|
12
|
-
|
|
39
|
+
ApiHelper.setDefaultPermissions(user.jwt);
|
|
13
40
|
}
|
|
14
41
|
static checkAccess({ api, contentType, action }) {
|
|
15
|
-
const permissions =
|
|
42
|
+
const permissions = ApiHelper.getConfig(api).permissions;
|
|
16
43
|
let result = false;
|
|
17
44
|
if (permissions !== undefined) {
|
|
18
45
|
permissions.forEach(element => {
|
|
@@ -23,37 +50,8 @@ class UserHelper {
|
|
|
23
50
|
return result;
|
|
24
51
|
}
|
|
25
52
|
static createAppUrl(appUrl, returnUrl) {
|
|
26
|
-
const jwt =
|
|
53
|
+
const jwt = ApiHelper.getConfig("MembershipApi").jwt;
|
|
27
54
|
return `${appUrl}/login/?jwt=${jwt}&returnUrl=${returnUrl}`;
|
|
28
55
|
}
|
|
29
56
|
}
|
|
30
|
-
exports.UserHelper = UserHelper;
|
|
31
|
-
_a = UserHelper;
|
|
32
|
-
UserHelper.churchChanged = false;
|
|
33
|
-
UserHelper.selectChurch = async (context, churchId, keyName) => {
|
|
34
|
-
let userChurch = null;
|
|
35
|
-
if (churchId) {
|
|
36
|
-
_a.userChurches.forEach(uc => {
|
|
37
|
-
if (uc.church.id === churchId)
|
|
38
|
-
userChurch = uc;
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
else if (keyName)
|
|
42
|
-
_a.userChurches.forEach(uc => { if (uc.church.subDomain === keyName)
|
|
43
|
-
userChurch = uc; });
|
|
44
|
-
else
|
|
45
|
-
userChurch = _a.userChurches[0];
|
|
46
|
-
if (!userChurch)
|
|
47
|
-
return;
|
|
48
|
-
else {
|
|
49
|
-
_a.currentUserChurch = userChurch;
|
|
50
|
-
_a.setupApiHelper(_a.currentUserChurch);
|
|
51
|
-
// TODO - remove context code from here and perform the logic in the component itself.
|
|
52
|
-
if (context) {
|
|
53
|
-
if (context.userChurch !== null)
|
|
54
|
-
_a.churchChanged = true;
|
|
55
|
-
context.setUserChurch(_a.currentUserChurch);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
57
|
//# sourceMappingURL=UserHelper.js.map
|
package/dist/UserHelper.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserHelper.js","sourceRoot":"","sources":["../src/UserHelper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"UserHelper.js","sourceRoot":"","sources":["../src/UserHelper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAGvC,MAAM,OAAO,UAAU;IACrB,MAAM,CAAC,iBAAiB,CAA2B;IACnD,MAAM,CAAC,YAAY,CAA6B;IAChD,MAAM,CAAC,IAAI,CAAgB;IAC3B,MAAM,CAAC,aAAa,GAAY,KAAK,CAAC;IACtC,MAAM,CAAC,MAAM,CAAkB;IAE/B,MAAM,CAAC,YAAY,GAAG,KAAK,EAAE,OAA8B,EAAE,QAAiB,EAAE,OAAgB,EAAE,EAAE;QAClG,IAAI,UAAU,GAAG,IAAI,CAAC;QAEtB,IAAI,QAAQ,EAAE,CAAC;YACb,UAAU,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE;gBACnC,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE,KAAK,QAAQ;oBAAE,UAAU,GAAG,EAAE,CAAC;YACjD,CAAC,CAAC,CAAC;QACL,CAAC;aACI,IAAI,OAAO;YAAE,UAAU,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,GAAG,IAAI,EAAE,CAAC,MAAM,CAAC,SAAS,KAAK,OAAO;gBAAE,UAAU,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;;YAC9G,UAAU,GAAG,UAAU,CAAC,YAAY,CAAC,CAAC,C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CAAC;QACL,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,MAAM,CAAC,YAAY,CAAC,MAAc,EAAE,SAAiB;QACnD,MAAM,GAAG,GAAG,SAAS,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC,GAAG,CAAC;QAErD,OAAO,GAAG,MAAM,eAAe,GAAG,cAAc,SAAS,EAAE,CAAC;IAC9D,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,45 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.UniqueIdHelper = exports.UserHelper = exports.PersonHelper = exports.FileHelper = exports.EventHelper = exports.ErrorHelper = exports.DonationHelper = exports.DateHelper = exports.CurrencyHelper = exports.CommonEnvironmentHelper = exports.ArrayHelper = exports.AppearanceHelper = exports.ApiHelper = void 0;
|
|
18
|
-
__exportStar(require("./interfaces"), exports);
|
|
19
|
-
var ApiHelper_1 = require("./ApiHelper");
|
|
20
|
-
Object.defineProperty(exports, "ApiHelper", { enumerable: true, get: function () { return ApiHelper_1.ApiHelper; } });
|
|
21
|
-
var AppearanceHelper_1 = require("./AppearanceHelper");
|
|
22
|
-
Object.defineProperty(exports, "AppearanceHelper", { enumerable: true, get: function () { return AppearanceHelper_1.AppearanceHelper; } });
|
|
23
|
-
var ArrayHelper_1 = require("./ArrayHelper");
|
|
24
|
-
Object.defineProperty(exports, "ArrayHelper", { enumerable: true, get: function () { return ArrayHelper_1.ArrayHelper; } });
|
|
25
|
-
var CommonEnvironmentHelper_1 = require("./CommonEnvironmentHelper");
|
|
26
|
-
Object.defineProperty(exports, "CommonEnvironmentHelper", { enumerable: true, get: function () { return CommonEnvironmentHelper_1.CommonEnvironmentHelper; } });
|
|
27
|
-
var CurrencyHelper_1 = require("./CurrencyHelper");
|
|
28
|
-
Object.defineProperty(exports, "CurrencyHelper", { enumerable: true, get: function () { return CurrencyHelper_1.CurrencyHelper; } });
|
|
29
|
-
var DateHelper_1 = require("./DateHelper");
|
|
30
|
-
Object.defineProperty(exports, "DateHelper", { enumerable: true, get: function () { return DateHelper_1.DateHelper; } });
|
|
31
|
-
var DonationHelper_1 = require("./DonationHelper");
|
|
32
|
-
Object.defineProperty(exports, "DonationHelper", { enumerable: true, get: function () { return DonationHelper_1.DonationHelper; } });
|
|
33
|
-
var ErrorHelper_1 = require("./ErrorHelper");
|
|
34
|
-
Object.defineProperty(exports, "ErrorHelper", { enumerable: true, get: function () { return ErrorHelper_1.ErrorHelper; } });
|
|
35
|
-
var EventHelper_1 = require("./EventHelper");
|
|
36
|
-
Object.defineProperty(exports, "EventHelper", { enumerable: true, get: function () { return EventHelper_1.EventHelper; } });
|
|
37
|
-
var FileHelper_1 = require("./FileHelper");
|
|
38
|
-
Object.defineProperty(exports, "FileHelper", { enumerable: true, get: function () { return FileHelper_1.FileHelper; } });
|
|
39
|
-
var PersonHelper_1 = require("./PersonHelper");
|
|
40
|
-
Object.defineProperty(exports, "PersonHelper", { enumerable: true, get: function () { return PersonHelper_1.PersonHelper; } });
|
|
41
|
-
var UserHelper_1 = require("./UserHelper");
|
|
42
|
-
Object.defineProperty(exports, "UserHelper", { enumerable: true, get: function () { return UserHelper_1.UserHelper; } });
|
|
43
|
-
var UniqueIdHelper_1 = require("./UniqueIdHelper");
|
|
44
|
-
Object.defineProperty(exports, "UniqueIdHelper", { enumerable: true, get: function () { return UniqueIdHelper_1.UniqueIdHelper; } });
|
|
1
|
+
export * from "./interfaces";
|
|
2
|
+
export { ApiHelper } from "./ApiHelper";
|
|
3
|
+
export { AppearanceHelper } from "./AppearanceHelper";
|
|
4
|
+
export { ArrayHelper } from "./ArrayHelper";
|
|
5
|
+
export { CommonEnvironmentHelper } from "./CommonEnvironmentHelper";
|
|
6
|
+
export { CurrencyHelper } from "./CurrencyHelper";
|
|
7
|
+
export { DateHelper } from "./DateHelper";
|
|
8
|
+
export { DonationHelper } from "./DonationHelper";
|
|
9
|
+
export { ErrorHelper } from "./ErrorHelper";
|
|
10
|
+
export { EventHelper } from "./EventHelper";
|
|
11
|
+
export { FileHelper } from "./FileHelper";
|
|
12
|
+
export { PersonHelper } from "./PersonHelper";
|
|
13
|
+
export { UserHelper } from "./UserHelper";
|
|
14
|
+
export { UniqueIdHelper } from "./UniqueIdHelper";
|
|
45
15
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
|
package/dist/interfaces/Doing.js
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
export class StripePaymentMethod {
|
|
2
|
+
id;
|
|
3
|
+
type;
|
|
4
|
+
name;
|
|
5
|
+
last4;
|
|
6
|
+
exp_month;
|
|
7
|
+
exp_year;
|
|
8
|
+
status;
|
|
9
|
+
account_holder_name;
|
|
10
|
+
account_holder_type;
|
|
5
11
|
constructor(obj) {
|
|
6
12
|
this.id = obj?.id || null;
|
|
7
13
|
this.type = obj?.type || (obj?.object && obj.object === "bank_account" ? "bank" : null);
|
|
@@ -14,5 +20,4 @@ class StripePaymentMethod {
|
|
|
14
20
|
this.account_holder_type = obj?.account_holder_type || "individual";
|
|
15
21
|
}
|
|
16
22
|
}
|
|
17
|
-
exports.StripePaymentMethod = StripePaymentMethod;
|
|
18
23
|
//# sourceMappingURL=Donation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Donation.js","sourceRoot":"","sources":["../../src/interfaces/Donation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Donation.js","sourceRoot":"","sources":["../../src/interfaces/Donation.ts"],"names":[],"mappings":"AA0HA,MAAM,OAAO,mBAAmB;IAC9B,EAAE,CAAS;IACX,IAAI,CAAS;IACb,IAAI,CAAS;IACb,KAAK,CAAS;IACd,SAAS,CAAU;IACnB,QAAQ,CAAU;IAClB,MAAM,CAAU;IAChB,mBAAmB,CAAU;IAC7B,mBAAmB,CAAU;IAE7B,YAAY,GAAS;QACnB,IAAI,CAAC,EAAE,GAAG,GAAG,EAAE,EAAE,IAAI,IAAI,CAAC;QAC1B,IAAI,CAAC,IAAI,GAAG,GAAG,EAAE,IAAI,IAAI,CAAC,GAAG,EAAE,MAAM,IAAI,GAAG,CAAC,MAAM,KAAK,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;QACxF,IAAI,CAAC,IAAI,GAAG,GAAG,EAAE,IAAI,EAAE,KAAK,IAAI,GAAG,EAAE,SAAS,IAAI,IAAI,CAAC;QACvD,IAAI,CAAC,KAAK,GAAG,GAAG,EAAE,KAAK,IAAI,GAAG,EAAE,IAAI,EAAE,KAAK,IAAI,IAAI,CAAC;QACpD,IAAI,CAAC,SAAS,GAAG,GAAG,EAAE,SAAS,IAAI,GAAG,EAAE,IAAI,EAAE,SAAS,IAAI,IAAI,CAAC;QAChE,IAAI,CAAC,QAAQ,GAAG,GAAG,EAAE,QAAQ,IAAI,GAAG,EAAE,IAAI,EAAE,QAAQ,IAAI,IAAI,CAAC;QAC7D,IAAI,CAAC,MAAM,GAAG,GAAG,EAAE,MAAM,IAAI,IAAI,CAAC;QAClC,IAAI,CAAC,mBAAmB,GAAG,GAAG,EAAE,mBAAmB,IAAI,EAAE,CAAC;QAC1D,IAAI,CAAC,mBAAmB,GAAG,GAAG,EAAE,mBAAmB,IAAI,YAAY,CAAC;IACtE,CAAC;CACF"}
|
package/dist/interfaces/Error.js
CHANGED