@churchapps/apphelper 0.3.37 → 0.3.38
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/CLAUDE.md +111 -0
- package/dist/components/B1ShareModal.js +4 -14
- package/dist/components/B1ShareModal.js.map +1 -1
- package/dist/components/CreatePerson.js +26 -52
- package/dist/components/CreatePerson.js.map +1 -1
- package/dist/components/DisplayBox.js +1 -2
- package/dist/components/DisplayBox.js.map +1 -1
- package/dist/components/ErrorMessages.js +19 -9
- package/dist/components/ErrorMessages.js.map +1 -1
- package/dist/components/ExportLink.js +3 -3
- package/dist/components/ExportLink.js.map +1 -1
- package/dist/components/FormCardPayment.js +39 -43
- package/dist/components/FormCardPayment.js.map +1 -1
- package/dist/components/FormSubmissionEdit.js +28 -42
- package/dist/components/FormSubmissionEdit.js.map +1 -1
- package/dist/components/HelpIcon.d.ts.map +1 -1
- package/dist/components/ImageEditor.js +5 -6
- package/dist/components/ImageEditor.js.map +1 -1
- package/dist/components/InputBox.js +4 -18
- package/dist/components/InputBox.js.map +1 -1
- package/dist/components/Loading.js.map +1 -1
- package/dist/components/PersonAdd.js.map +1 -1
- package/dist/components/QuestionEdit.js +1 -13
- package/dist/components/QuestionEdit.js.map +1 -1
- package/dist/components/gallery/GalleryModal.js +21 -20
- package/dist/components/gallery/GalleryModal.js.map +1 -1
- package/dist/components/gallery/StockPhotos.js +17 -7
- package/dist/components/gallery/StockPhotos.js.map +1 -1
- package/dist/components/header/Banner.d.ts.map +1 -1
- package/dist/components/header/PrimaryMenu.d.ts.map +1 -1
- package/dist/components/header/SecondaryMenu.d.ts.map +1 -1
- package/dist/components/header/SecondaryMenuAlt.d.ts.map +1 -1
- package/dist/components/header/SiteHeader.d.ts.map +1 -1
- package/dist/components/header/SiteHeader.js +1 -2
- package/dist/components/header/SiteHeader.js.map +1 -1
- package/dist/components/header/SupportDrawer.d.ts.map +1 -1
- package/dist/components/header/SupportDrawer.js +4 -6
- package/dist/components/header/SupportDrawer.js.map +1 -1
- package/dist/components/iconPicker/IconPicker.js +18 -9
- package/dist/components/iconPicker/IconPicker.js.map +1 -1
- package/dist/components/markdownEditor/Editor.js +1 -13
- package/dist/components/markdownEditor/Editor.js.map +1 -1
- package/dist/components/markdownEditor/MarkdownEditor.js +18 -9
- package/dist/components/markdownEditor/MarkdownEditor.js.map +1 -1
- package/dist/components/markdownEditor/MarkdownPreview.js +19 -22
- package/dist/components/markdownEditor/MarkdownPreview.js.map +1 -1
- package/dist/components/markdownEditor/MarkdownPreviewLight.js +1 -2
- package/dist/components/markdownEditor/MarkdownPreviewLight.js.map +1 -1
- package/dist/components/markdownEditor/plugins/AutoLinkPlugin.js +1 -2
- package/dist/components/markdownEditor/plugins/AutoLinkPlugin.js.map +1 -1
- package/dist/components/markdownEditor/plugins/ControlledEditorPlugin.js +1 -2
- package/dist/components/markdownEditor/plugins/ControlledEditorPlugin.js.map +1 -1
- package/dist/components/markdownEditor/plugins/FloatingTextMenu/FloatingTextFormatToolbarPlugin.d.ts +2 -7
- package/dist/components/markdownEditor/plugins/FloatingTextMenu/FloatingTextFormatToolbarPlugin.d.ts.map +1 -1
- package/dist/components/markdownEditor/plugins/FloatingTextMenu/FloatingTextFormatToolbarPlugin.js +6 -7
- package/dist/components/markdownEditor/plugins/FloatingTextMenu/FloatingTextFormatToolbarPlugin.js.map +1 -1
- package/dist/components/markdownEditor/plugins/FloatingTextMenu/getDOMRangeRect.js +1 -2
- package/dist/components/markdownEditor/plugins/FloatingTextMenu/getDOMRangeRect.js.map +1 -1
- package/dist/components/markdownEditor/plugins/FloatingTextMenu/getSelectNode.js +1 -2
- package/dist/components/markdownEditor/plugins/FloatingTextMenu/getSelectNode.js.map +1 -1
- package/dist/components/markdownEditor/plugins/FloatingTextMenu/setFloatingElemPosition.js +1 -2
- package/dist/components/markdownEditor/plugins/FloatingTextMenu/setFloatingElemPosition.js.map +1 -1
- package/dist/components/markdownEditor/plugins/ListMaxIndentLevelPlugin.js +2 -3
- package/dist/components/markdownEditor/plugins/ListMaxIndentLevelPlugin.js.map +1 -1
- package/dist/components/markdownEditor/plugins/MarkdownTransformers.js.map +1 -1
- package/dist/components/markdownEditor/plugins/ReadOnlyPlugin.js +1 -2
- package/dist/components/markdownEditor/plugins/ReadOnlyPlugin.js.map +1 -1
- package/dist/components/markdownEditor/plugins/ToolbarPlugin.js +2 -3
- package/dist/components/markdownEditor/plugins/ToolbarPlugin.js.map +1 -1
- package/dist/components/markdownEditor/plugins/customLink/CustomLinkNode.d.ts.map +1 -1
- package/dist/components/markdownEditor/plugins/customLink/CustomLinkNode.js +3 -3
- package/dist/components/markdownEditor/plugins/customLink/CustomLinkNode.js.map +1 -1
- package/dist/components/markdownEditor/plugins/customLink/CustomLinkNodePlugin.js +4 -1
- package/dist/components/markdownEditor/plugins/customLink/CustomLinkNodePlugin.js.map +1 -1
- package/dist/components/markdownEditor/plugins/customLink/CustomLinkNodeTransformer.js +6 -2
- package/dist/components/markdownEditor/plugins/customLink/CustomLinkNodeTransformer.js.map +1 -1
- package/dist/components/markdownEditor/plugins/customLink/FloatingLinkEditor.js +4 -5
- package/dist/components/markdownEditor/plugins/customLink/FloatingLinkEditor.js.map +1 -1
- package/dist/components/markdownEditor/plugins/emoji/EmojiNode.js +8 -5
- package/dist/components/markdownEditor/plugins/emoji/EmojiNode.js.map +1 -1
- package/dist/components/markdownEditor/plugins/emoji/EmojiNodeTransform.js.map +1 -1
- package/dist/components/markdownEditor/plugins/emoji/EmojiPickerPlugin.js +18 -8
- package/dist/components/markdownEditor/plugins/emoji/EmojiPickerPlugin.js.map +1 -1
- package/dist/components/markdownEditor/plugins/emoji/EmojisPlugin.d.ts +0 -1
- package/dist/components/markdownEditor/plugins/emoji/EmojisPlugin.d.ts.map +1 -1
- package/dist/components/markdownEditor/plugins/emoji/EmojisPlugin.js +2 -2
- package/dist/components/markdownEditor/plugins/emoji/EmojisPlugin.js.map +1 -1
- package/dist/components/notes/AddNote.js +46 -63
- package/dist/components/notes/AddNote.js.map +1 -1
- package/dist/components/notes/Conversation.js +9 -20
- package/dist/components/notes/Conversation.js.map +1 -1
- package/dist/components/notes/Conversations.js +5 -15
- package/dist/components/notes/Conversations.js.map +1 -1
- package/dist/components/notes/NewConversation.js +22 -47
- package/dist/components/notes/NewConversation.js.map +1 -1
- package/dist/components/notes/Note.js +2 -3
- package/dist/components/notes/Note.js.map +1 -1
- package/dist/components/notes/Notes.js +7 -18
- package/dist/components/notes/Notes.js.map +1 -1
- package/dist/components/reporting/ChartReport.d.ts.map +1 -1
- package/dist/components/reporting/ChartReport.js +1 -2
- package/dist/components/reporting/ChartReport.js.map +1 -1
- package/dist/components/reporting/ReportFilter.d.ts.map +1 -1
- package/dist/components/reporting/ReportFilter.js +1 -1
- package/dist/components/reporting/ReportFilter.js.map +1 -1
- package/dist/components/reporting/ReportFilterField.d.ts.map +1 -1
- package/dist/components/reporting/ReportFilterField.js +6 -17
- package/dist/components/reporting/ReportFilterField.js.map +1 -1
- package/dist/components/reporting/ReportOutput.d.ts.map +1 -1
- package/dist/components/reporting/ReportOutput.js +39 -26
- package/dist/components/reporting/ReportOutput.js.map +1 -1
- package/dist/components/reporting/ReportWithFilter.d.ts.map +1 -1
- package/dist/components/reporting/ReportWithFilter.js.map +1 -1
- package/dist/components/reporting/TableReport.d.ts.map +1 -1
- package/dist/components/reporting/TreeReport.d.ts.map +1 -1
- package/dist/components/reporting/TreeReport.js.map +1 -1
- package/dist/components/wrapper/ChurchList.js +6 -16
- package/dist/components/wrapper/ChurchList.js.map +1 -1
- package/dist/components/wrapper/Drawers.d.ts +4 -17
- package/dist/components/wrapper/Drawers.d.ts.map +1 -1
- package/dist/components/wrapper/NavItem.js +1 -1
- package/dist/components/wrapper/NavItem.js.map +1 -1
- package/dist/components/wrapper/NewPrivateMessage.js +24 -23
- package/dist/components/wrapper/NewPrivateMessage.js.map +1 -1
- package/dist/components/wrapper/Notifications.js +21 -20
- package/dist/components/wrapper/Notifications.js.map +1 -1
- package/dist/components/wrapper/PrivateMessages.js +23 -23
- package/dist/components/wrapper/PrivateMessages.js.map +1 -1
- package/dist/components/wrapper/SiteWrapper.d.ts.map +1 -1
- package/dist/components/wrapper/SiteWrapper.js +4 -18
- package/dist/components/wrapper/SiteWrapper.js.map +1 -1
- package/dist/components/wrapper/TabPanel.js +1 -2
- package/dist/components/wrapper/TabPanel.js.map +1 -1
- package/dist/donationComponents/DonationPage.js +4 -5
- package/dist/donationComponents/DonationPage.js.map +1 -1
- package/dist/donationComponents/components/BankForm.js +13 -27
- package/dist/donationComponents/components/BankForm.js.map +1 -1
- package/dist/donationComponents/components/CardForm.js +29 -31
- package/dist/donationComponents/components/CardForm.js.map +1 -1
- package/dist/donationComponents/components/DonationForm.js +28 -40
- package/dist/donationComponents/components/DonationForm.js.map +1 -1
- package/dist/donationComponents/components/FundDonation.js +3 -5
- package/dist/donationComponents/components/FundDonation.js.map +1 -1
- package/dist/donationComponents/components/FundDonations.js +2 -3
- package/dist/donationComponents/components/FundDonations.js.map +1 -1
- package/dist/donationComponents/components/NonAuthDonation.js +3 -16
- package/dist/donationComponents/components/NonAuthDonation.js.map +1 -1
- package/dist/donationComponents/components/NonAuthDonationInner.js +45 -58
- package/dist/donationComponents/components/NonAuthDonationInner.js.map +1 -1
- package/dist/donationComponents/components/PaymentMethods.js +3 -12
- package/dist/donationComponents/components/PaymentMethods.js.map +1 -1
- package/dist/donationComponents/components/RecurringDonations.js +3 -6
- package/dist/donationComponents/components/RecurringDonations.js.map +1 -1
- package/dist/donationComponents/components/RecurringDonationsEdit.js +2 -2
- package/dist/donationComponents/components/RecurringDonationsEdit.js.map +1 -1
- package/dist/donationComponents/modals/DonationPreviewModal.js +2 -2
- package/dist/donationComponents/modals/DonationPreviewModal.js.map +1 -1
- package/dist/helpers/AnalyticsHelper.d.ts.map +1 -1
- package/dist/helpers/AnalyticsHelper.js +1 -2
- package/dist/helpers/AnalyticsHelper.js.map +1 -1
- package/dist/helpers/ApiHelper.d.ts.map +1 -1
- package/dist/helpers/ApiHelper.js +75 -108
- package/dist/helpers/ApiHelper.js.map +1 -1
- package/dist/helpers/AppearanceHelper.js +4 -4
- package/dist/helpers/AppearanceHelper.js.map +1 -1
- package/dist/helpers/ArrayHelper.js +2 -3
- package/dist/helpers/ArrayHelper.js.map +1 -1
- package/dist/helpers/CommonEnvironmentHelper.d.ts.map +1 -1
- package/dist/helpers/CommonEnvironmentHelper.js.map +1 -1
- package/dist/helpers/DateHelper.d.ts +0 -1
- package/dist/helpers/DateHelper.d.ts.map +1 -1
- package/dist/helpers/DateHelper.js +2 -6
- package/dist/helpers/DateHelper.js.map +1 -1
- package/dist/helpers/DonationHelper.js.map +1 -1
- package/dist/helpers/ErrorHelper.d.ts.map +1 -1
- package/dist/helpers/ErrorHelper.js.map +1 -1
- package/dist/helpers/EventHelper.d.ts.map +1 -1
- package/dist/helpers/EventHelper.js +1 -2
- package/dist/helpers/EventHelper.js.map +1 -1
- package/dist/helpers/FileHelper.d.ts.map +1 -1
- package/dist/helpers/FileHelper.js.map +1 -1
- package/dist/helpers/Locale.d.ts.map +1 -1
- package/dist/helpers/Locale.js +4 -13
- package/dist/helpers/Locale.js.map +1 -1
- package/dist/helpers/PersonHelper.js +10 -4
- package/dist/helpers/PersonHelper.js.map +1 -1
- package/dist/helpers/ReportHelper.d.ts.map +1 -1
- package/dist/helpers/ReportHelper.js +4 -5
- package/dist/helpers/ReportHelper.js.map +1 -1
- package/dist/helpers/SlugHelper.js.map +1 -1
- package/dist/helpers/SocketHelper.d.ts.map +1 -1
- package/dist/helpers/SocketHelper.js +8 -17
- package/dist/helpers/SocketHelper.js.map +1 -1
- package/dist/helpers/UniqueIdHelper.js.map +1 -1
- package/dist/helpers/UserHelper.d.ts.map +1 -1
- package/dist/helpers/UserHelper.js +3 -13
- package/dist/helpers/UserHelper.js.map +1 -1
- package/dist/helpers/createEmotionCache.d.ts +1 -1
- package/dist/helpers/createEmotionCache.js +2 -3
- package/dist/helpers/createEmotionCache.js.map +1 -1
- package/dist/pageComponents/LoginPage.js +88 -106
- package/dist/pageComponents/LoginPage.js.map +1 -1
- package/dist/pageComponents/LogoutPage.js +4 -5
- package/dist/pageComponents/LogoutPage.js.map +1 -1
- package/dist/pageComponents/components/Forgot.js.map +1 -1
- package/dist/pageComponents/components/Login.js +18 -20
- package/dist/pageComponents/components/Login.js.map +1 -1
- package/dist/pageComponents/components/LoginSetPassword.js +20 -19
- package/dist/pageComponents/components/LoginSetPassword.js.map +1 -1
- package/dist/pageComponents/components/Register.js +4 -5
- package/dist/pageComponents/components/Register.js.map +1 -1
- package/dist/pageComponents/components/SelectChurchModal.js +2 -3
- package/dist/pageComponents/components/SelectChurchModal.js.map +1 -1
- package/dist/pageComponents/components/SelectChurchRegister.js +10 -20
- package/dist/pageComponents/components/SelectChurchRegister.js.map +1 -1
- package/dist/pageComponents/components/SelectChurchSearch.js.map +1 -1
- package/dist/pageComponents/components/SelectableChurch.js +1 -1
- package/dist/pageComponents/components/SelectableChurch.js.map +1 -1
- package/package.json +13 -16
- package/src/components/ErrorMessages.tsx +2 -2
- package/src/components/ImageEditor.tsx +1 -1
- package/src/components/wrapper/SiteWrapper.tsx +0 -3
- package/src/helpers/ApiHelper.ts +10 -18
- package/src/helpers/ArrayHelper.ts +1 -1
- package/src/helpers/DateHelper.ts +0 -5
- package/tsconfig.json +4 -14
- package/.eslintrc.json +0 -22
- package/tslint.json +0 -15
package/src/helpers/ApiHelper.ts
CHANGED
|
@@ -38,20 +38,20 @@ export class ApiHelper {
|
|
|
38
38
|
|
|
39
39
|
static async get(path: string, apiName: ApiListType) {
|
|
40
40
|
const config = this.getConfig(apiName);
|
|
41
|
-
const requestOptions = {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
41
|
+
const requestOptions = {
|
|
42
|
+
method: "GET",
|
|
43
|
+
headers: { Authorization: "Bearer " + config.jwt },
|
|
44
|
+
cache: "no-store"
|
|
45
|
+
};
|
|
46
|
+
|
|
47
47
|
return await this.fetchWithErrorHandling(config.url + path, requestOptions);
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
static async getAnonymous(path: string, apiName: ApiListType, tags?:string[]) {
|
|
50
|
+
static async getAnonymous(path: string, apiName: ApiListType, tags?: string[]) {
|
|
51
51
|
const config = this.getConfig(apiName);
|
|
52
|
-
const requestOptions:
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
const requestOptions: RequestInit = { method: "GET" };
|
|
53
|
+
if (tags?.length > 0) (requestOptions as any).next = { tags: tags };
|
|
54
|
+
else requestOptions.cache = "no-store";
|
|
55
55
|
return await this.fetchWithErrorHandling(config.url + path, requestOptions);
|
|
56
56
|
}
|
|
57
57
|
|
|
@@ -85,7 +85,6 @@ export class ApiHelper {
|
|
|
85
85
|
const response = await fetch(config.url + path, requestOptions);
|
|
86
86
|
if (!response.ok) await this.throwApiError(response);
|
|
87
87
|
} catch (e) {
|
|
88
|
-
console.log(e)
|
|
89
88
|
throw (e);
|
|
90
89
|
}
|
|
91
90
|
}
|
|
@@ -97,9 +96,6 @@ export class ApiHelper {
|
|
|
97
96
|
headers: { "Content-Type": "application/json" },
|
|
98
97
|
body: JSON.stringify(data)
|
|
99
98
|
};
|
|
100
|
-
if (!config.url.includes("/login")) {
|
|
101
|
-
console.log(config.url + path, requestOptions);
|
|
102
|
-
}
|
|
103
99
|
return await this.fetchWithErrorHandling(config.url + path, requestOptions);
|
|
104
100
|
}
|
|
105
101
|
|
|
@@ -113,20 +109,16 @@ export class ApiHelper {
|
|
|
113
109
|
}
|
|
114
110
|
}
|
|
115
111
|
} catch (e) {
|
|
116
|
-
console.log("Error loading url: " + url);
|
|
117
|
-
console.log(e)
|
|
118
112
|
throw (e);
|
|
119
113
|
}
|
|
120
114
|
}
|
|
121
115
|
|
|
122
116
|
private static async throwApiError(response: Response) {
|
|
123
|
-
console.log("THROW API ERROR");
|
|
124
117
|
let msg = response.statusText;
|
|
125
118
|
try {
|
|
126
119
|
const json = await response.json();
|
|
127
120
|
msg = json.errors[0];
|
|
128
121
|
} catch { }
|
|
129
|
-
console.log("RESPONSE", response)
|
|
130
122
|
ErrorHelper.logError(response.status.toString(), response.url, msg);
|
|
131
123
|
throw new Error(msg || "Error");
|
|
132
124
|
}
|
|
@@ -11,11 +11,6 @@ export class DateHelper {
|
|
|
11
11
|
return new Date(Date.parse(input.toString()));
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
//obsolete. Do not use
|
|
15
|
-
static convertToDate(input: any) {
|
|
16
|
-
return this.toDateTime(input);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
14
|
static addDays(date: Date, days: number) {
|
|
20
15
|
date.setDate(date.getDate() + days);
|
|
21
16
|
return date;
|
package/tsconfig.json
CHANGED
|
@@ -2,17 +2,11 @@
|
|
|
2
2
|
"compilerOptions": {
|
|
3
3
|
"module": "commonjs",
|
|
4
4
|
"esModuleInterop": true,
|
|
5
|
-
"lib": [
|
|
6
|
-
|
|
7
|
-
"DOM"
|
|
8
|
-
],
|
|
9
|
-
"typeRoots": [
|
|
10
|
-
"./types",
|
|
11
|
-
"node_modules/@types"
|
|
12
|
-
],
|
|
5
|
+
"lib": ["ES2021", "DOM"],
|
|
6
|
+
"typeRoots": ["node_modules/@types"],
|
|
13
7
|
"experimentalDecorators": true,
|
|
14
8
|
"emitDecoratorMetadata": true,
|
|
15
|
-
"target": "
|
|
9
|
+
"target": "ES2020",
|
|
16
10
|
"noImplicitAny": true,
|
|
17
11
|
"moduleResolution": "node",
|
|
18
12
|
"sourceMap": true,
|
|
@@ -26,11 +20,7 @@
|
|
|
26
20
|
"skipLibCheck": true,
|
|
27
21
|
"forceConsistentCasingInFileNames": true,
|
|
28
22
|
"resolveJsonModule": true,
|
|
29
|
-
"
|
|
30
|
-
"*": [
|
|
31
|
-
"node_modules/*"
|
|
32
|
-
]
|
|
33
|
-
}
|
|
23
|
+
"isolatedModules": true
|
|
34
24
|
},
|
|
35
25
|
"include": [
|
|
36
26
|
"src/**/*"
|
package/.eslintrc.json
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "react-app",
|
|
3
|
-
"plugins": [
|
|
4
|
-
"react"
|
|
5
|
-
],
|
|
6
|
-
"rules": {
|
|
7
|
-
"comma-dangle": "off",
|
|
8
|
-
"eol-last": ["warn", "always"],
|
|
9
|
-
"quote-props": ["error", "as-needed"],
|
|
10
|
-
"quotes": "off",
|
|
11
|
-
"no-trailing-spaces": "warn",
|
|
12
|
-
"no-var": "error",
|
|
13
|
-
"operator-linebreak": ["warn", "before"],
|
|
14
|
-
"multiline-ternary": ["warn", "always-multiline"],
|
|
15
|
-
"indent": ["warn", 2, { "SwitchCase": 1 }],
|
|
16
|
-
"arrow-body-style": ["warn", "as-needed"],
|
|
17
|
-
"react/jsx-tag-spacing": ["warn", { "beforeSelfClosing": "always", "beforeClosing": "never" }],
|
|
18
|
-
"no-multiple-empty-lines": "off",
|
|
19
|
-
"jsx-quotes": ["warn", "prefer-double"],
|
|
20
|
-
"@typescript-eslint/no-unused-vars": "off"
|
|
21
|
-
}
|
|
22
|
-
}
|