@churchapps/apphelper 0.1.5 → 0.1.7
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/.eslintignore +3 -3
- package/.eslintrc.json +22 -22
- package/LICENSE +21 -21
- package/README.md +24 -22
- package/dist/components/FormSubmissionEdit.js +1 -1
- package/dist/components/FormSubmissionEdit.js.map +1 -1
- package/dist/components/markdownEditor/editor.css +787 -787
- package/dist/components/markdownEditor/images/icons/arrow-clockwise.svg +3 -3
- package/dist/components/markdownEditor/images/icons/arrow-counterclockwise.svg +3 -3
- package/dist/components/markdownEditor/images/icons/chat-square-quote.svg +3 -3
- package/dist/components/markdownEditor/images/icons/chevron-down.svg +2 -2
- package/dist/components/markdownEditor/images/icons/code.svg +2 -2
- package/dist/components/markdownEditor/images/icons/journal-code.svg +4 -4
- package/dist/components/markdownEditor/images/icons/journal-text.svg +4 -4
- package/dist/components/markdownEditor/images/icons/justify.svg +2 -2
- package/dist/components/markdownEditor/images/icons/link.svg +3 -3
- package/dist/components/markdownEditor/images/icons/list-ol.svg +3 -3
- package/dist/components/markdownEditor/images/icons/list-ul.svg +2 -2
- package/dist/components/markdownEditor/images/icons/pencil-fill.svg +2 -2
- package/dist/components/markdownEditor/images/icons/text-center.svg +2 -2
- package/dist/components/markdownEditor/images/icons/text-left.svg +2 -2
- package/dist/components/markdownEditor/images/icons/text-paragraph.svg +2 -2
- package/dist/components/markdownEditor/images/icons/text-right.svg +2 -2
- package/dist/components/markdownEditor/images/icons/type-bold.svg +2 -2
- package/dist/components/markdownEditor/images/icons/type-h1.svg +2 -2
- package/dist/components/markdownEditor/images/icons/type-h2.svg +2 -2
- package/dist/components/markdownEditor/images/icons/type-h3.svg +2 -2
- package/dist/components/markdownEditor/images/icons/type-h4.svg +12 -12
- package/dist/components/markdownEditor/images/icons/type-italic.svg +2 -2
- package/dist/components/markdownEditor/images/icons/type-strikethrough.svg +2 -2
- package/dist/components/markdownEditor/images/icons/type-underline.svg +2 -2
- package/dist/components/notes/Notes.d.ts +1 -0
- package/dist/components/notes/Notes.d.ts.map +1 -1
- package/dist/components/notes/Notes.js +1 -1
- package/dist/components/notes/Notes.js.map +1 -1
- package/dist/components/wrapper/NotificationMenu.d.ts.map +1 -1
- package/dist/components/wrapper/NotificationMenu.js +28 -11
- package/dist/components/wrapper/NotificationMenu.js.map +1 -1
- package/dist/components/wrapper/Notifications.d.ts +1 -0
- package/dist/components/wrapper/Notifications.d.ts.map +1 -1
- package/dist/components/wrapper/Notifications.js +2 -0
- package/dist/components/wrapper/Notifications.js.map +1 -1
- package/dist/components/wrapper/PrivateMessageDetails.d.ts +1 -0
- package/dist/components/wrapper/PrivateMessageDetails.d.ts.map +1 -1
- package/dist/components/wrapper/PrivateMessageDetails.js +1 -1
- package/dist/components/wrapper/PrivateMessageDetails.js.map +1 -1
- package/dist/components/wrapper/PrivateMessages.d.ts +2 -0
- package/dist/components/wrapper/PrivateMessages.d.ts.map +1 -1
- package/dist/components/wrapper/PrivateMessages.js +6 -3
- 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 +1 -0
- package/dist/components/wrapper/SiteWrapper.js.map +1 -1
- package/dist/helpers/DateHelper.d.ts.map +1 -1
- package/dist/helpers/DateHelper.js +2 -0
- package/dist/helpers/DateHelper.js.map +1 -1
- package/dist/helpers/SocketHelper.d.ts.map +1 -1
- package/dist/helpers/SocketHelper.js +4 -2
- package/dist/helpers/SocketHelper.js.map +1 -1
- package/dist/interfaces/Messaging.d.ts +10 -1
- package/dist/interfaces/Messaging.d.ts.map +1 -1
- package/package.json +86 -85
- package/src/components/CreatePerson.tsx +80 -80
- package/src/components/DisplayBox.tsx +68 -68
- package/src/components/ErrorMessages.tsx +26 -26
- package/src/components/ExportLink.tsx +67 -67
- package/src/components/FloatingSupport.tsx +16 -16
- package/src/components/FormSubmissionEdit.tsx +120 -120
- package/src/components/HelpIcon.tsx +10 -10
- package/src/components/ImageEditor.tsx +126 -126
- package/src/components/InputBox.tsx +73 -73
- package/src/components/Loading.tsx +29 -29
- package/src/components/PersonAdd.tsx +75 -75
- package/src/components/QuestionEdit.tsx +63 -63
- package/src/components/SmallButton.tsx +39 -39
- package/src/components/SupportModal.tsx +26 -26
- package/src/components/TabPanel.tsx +34 -34
- package/src/components/gallery/GalleryModal.tsx +102 -102
- package/src/components/gallery/StockPhotos.tsx +74 -74
- package/src/components/gallery/index.ts +1 -1
- package/src/components/iconPicker/IconNamesList.ts +2240 -2240
- package/src/components/iconPicker/IconPicker.tsx +153 -153
- package/src/components/index.tsx +24 -24
- package/src/components/markdownEditor/Editor.tsx +132 -132
- package/src/components/markdownEditor/MarkdownEditor.tsx +16 -16
- package/src/components/markdownEditor/MarkdownModal.tsx +46 -46
- package/src/components/markdownEditor/MarkdownPreview.tsx +14 -14
- package/src/components/markdownEditor/editor.css +787 -787
- package/src/components/markdownEditor/images/icons/arrow-clockwise.svg +3 -3
- package/src/components/markdownEditor/images/icons/arrow-counterclockwise.svg +3 -3
- package/src/components/markdownEditor/images/icons/chat-square-quote.svg +3 -3
- package/src/components/markdownEditor/images/icons/chevron-down.svg +2 -2
- package/src/components/markdownEditor/images/icons/code.svg +2 -2
- package/src/components/markdownEditor/images/icons/journal-code.svg +4 -4
- package/src/components/markdownEditor/images/icons/journal-text.svg +4 -4
- package/src/components/markdownEditor/images/icons/justify.svg +2 -2
- package/src/components/markdownEditor/images/icons/link.svg +3 -3
- package/src/components/markdownEditor/images/icons/list-ol.svg +3 -3
- package/src/components/markdownEditor/images/icons/list-ul.svg +2 -2
- package/src/components/markdownEditor/images/icons/pencil-fill.svg +2 -2
- package/src/components/markdownEditor/images/icons/text-center.svg +2 -2
- package/src/components/markdownEditor/images/icons/text-left.svg +2 -2
- package/src/components/markdownEditor/images/icons/text-paragraph.svg +2 -2
- package/src/components/markdownEditor/images/icons/text-right.svg +2 -2
- package/src/components/markdownEditor/images/icons/type-bold.svg +2 -2
- package/src/components/markdownEditor/images/icons/type-h1.svg +2 -2
- package/src/components/markdownEditor/images/icons/type-h2.svg +2 -2
- package/src/components/markdownEditor/images/icons/type-h3.svg +2 -2
- package/src/components/markdownEditor/images/icons/type-h4.svg +12 -12
- package/src/components/markdownEditor/images/icons/type-italic.svg +2 -2
- package/src/components/markdownEditor/images/icons/type-strikethrough.svg +2 -2
- package/src/components/markdownEditor/images/icons/type-underline.svg +2 -2
- package/src/components/markdownEditor/index.ts +2 -2
- package/src/components/markdownEditor/plugins/AutoLinkPlugin.tsx +35 -35
- package/src/components/markdownEditor/plugins/ControlledEditorPlugin.tsx +24 -24
- package/src/components/markdownEditor/plugins/ListMaxIndentLevelPlugin.tsx +68 -68
- package/src/components/markdownEditor/plugins/MarkdownTransformers.ts +106 -106
- package/src/components/markdownEditor/plugins/ReadOnlyPlugin.tsx +15 -15
- package/src/components/markdownEditor/plugins/ToolbarPlugin.tsx +401 -401
- package/src/components/markdownEditor/plugins/customLink/CustomLinkNode.tsx +224 -224
- package/src/components/markdownEditor/plugins/customLink/CustomLinkNodePlugin.tsx +32 -32
- package/src/components/markdownEditor/plugins/customLink/CustomLinkNodeTransformer.tsx +102 -102
- package/src/components/markdownEditor/plugins/customLink/FloatingLinkEditor.tsx +243 -243
- package/src/components/markdownEditor/plugins/customLink/FloatingLinkEditor.types.ts +11 -11
- package/src/components/markdownEditor/plugins/emoji/EmojiNode.tsx +95 -95
- package/src/components/markdownEditor/plugins/emoji/EmojiNodeTransform.ts +41 -41
- package/src/components/markdownEditor/plugins/emoji/EmojiPickerPlugin.tsx +152 -152
- package/src/components/markdownEditor/plugins/emoji/EmojisPlugin.tsx +65 -65
- package/src/components/markdownEditor/plugins/index.ts +6 -6
- package/src/components/markdownEditor/theme.ts +65 -65
- package/src/components/notes/AddNote.tsx +90 -90
- package/src/components/notes/Conversation.tsx +82 -82
- package/src/components/notes/Conversations.tsx +58 -58
- package/src/components/notes/NewConversation.tsx +78 -78
- package/src/components/notes/Note.tsx +44 -44
- package/src/components/notes/Notes.tsx +69 -68
- package/src/components/notes/index.ts +5 -5
- package/src/components/reporting/ChartReport.tsx +98 -98
- package/src/components/reporting/ReportFilter.tsx +54 -54
- package/src/components/reporting/ReportFilterField.tsx +160 -160
- package/src/components/reporting/ReportOutput.tsx +79 -79
- package/src/components/reporting/ReportWithFilter.tsx +70 -70
- package/src/components/reporting/TableReport.tsx +57 -57
- package/src/components/reporting/TreeReport.tsx +111 -111
- package/src/components/reporting/index.ts +4 -4
- package/src/components/wrapper/AppList.tsx +20 -20
- package/src/components/wrapper/ChurchList.tsx +22 -22
- package/src/components/wrapper/Drawers.tsx +60 -60
- package/src/components/wrapper/NavItem.tsx +41 -41
- package/src/components/wrapper/NewPrivateMessage.tsx +103 -103
- package/src/components/wrapper/NotificationMenu.tsx +96 -85
- package/src/components/wrapper/Notifications.tsx +53 -50
- package/src/components/wrapper/PrivateMessageDetails.tsx +24 -23
- package/src/components/wrapper/PrivateMessages.tsx +92 -87
- package/src/components/wrapper/SiteWrapper.tsx +97 -96
- package/src/components/wrapper/TabPanel.tsx +30 -30
- package/src/components/wrapper/UserMenu.tsx +106 -106
- package/src/components/wrapper/index.tsx +5 -5
- package/src/donationComponents/DonationPage.tsx +136 -136
- package/src/donationComponents/components/BankForm.tsx +159 -159
- package/src/donationComponents/components/CardForm.tsx +104 -104
- package/src/donationComponents/components/DonationForm.tsx +235 -235
- package/src/donationComponents/components/FundDonation.tsx +49 -49
- package/src/donationComponents/components/FundDonations.tsx +39 -39
- package/src/donationComponents/components/NonAuthDonation.tsx +31 -31
- package/src/donationComponents/components/NonAuthDonationInner.tsx +259 -259
- package/src/donationComponents/components/PaymentMethods.tsx +135 -135
- package/src/donationComponents/components/RecurringDonations.tsx +121 -121
- package/src/donationComponents/components/RecurringDonationsEdit.tsx +93 -93
- package/src/donationComponents/components/index.tsx +9 -9
- package/src/donationComponents/index.ts +3 -3
- package/src/donationComponents/modals/DonationPreviewModal.tsx +66 -66
- package/src/helpers/AnalyticsHelper.ts +33 -33
- package/src/helpers/ApiHelper.ts +125 -125
- package/src/helpers/AppearanceHelper.ts +69 -69
- package/src/helpers/ArrayHelper.ts +81 -81
- package/src/helpers/CommonEnvironmentHelper.ts +80 -80
- package/src/helpers/CurrencyHelper.ts +10 -10
- package/src/helpers/DateHelper.ts +109 -108
- package/src/helpers/DonationHelper.ts +26 -26
- package/src/helpers/ErrorHelper.ts +36 -36
- package/src/helpers/EventHelper.ts +52 -52
- package/src/helpers/FileHelper.ts +31 -31
- package/src/helpers/PersonHelper.ts +60 -60
- package/src/helpers/SocketHelper.ts +78 -76
- package/src/helpers/Themes.ts +14 -14
- package/src/helpers/UniqueIdHelper.ts +36 -36
- package/src/helpers/UserHelper.ts +59 -59
- package/src/helpers/createEmotionCache.ts +17 -17
- package/src/helpers/index.ts +18 -18
- package/src/hooks/index.ts +1 -1
- package/src/hooks/useMountedState.ts +16 -16
- package/src/index.ts +6 -6
- package/src/interfaces/Access.ts +24 -24
- package/src/interfaces/Attendance.ts +8 -8
- package/src/interfaces/Content.ts +10 -10
- package/src/interfaces/Doing.ts +24 -24
- package/src/interfaces/Donation.ts +45 -45
- package/src/interfaces/Error.ts +17 -17
- package/src/interfaces/Membership.ts +51 -51
- package/src/interfaces/Messaging.ts +11 -21
- package/src/interfaces/Permissions.ts +68 -68
- package/src/interfaces/Reporting.ts +7 -7
- package/src/interfaces/UserContextInterface.ts +13 -13
- package/src/interfaces/index.ts +13 -13
- package/src/pageComponents/LoginPage.tsx +244 -244
- package/src/pageComponents/LogoutPage.tsx +28 -28
- package/src/pageComponents/components/Forgot.tsx +79 -79
- package/src/pageComponents/components/Login.tsx +54 -54
- package/src/pageComponents/components/LoginSetPassword.tsx +63 -63
- package/src/pageComponents/components/Register.tsx +107 -107
- package/src/pageComponents/components/SelectChurchModal.tsx +41 -41
- package/src/pageComponents/components/SelectChurchRegister.tsx +88 -88
- package/src/pageComponents/components/SelectChurchSearch.tsx +69 -69
- package/src/pageComponents/components/SelectableChurch.tsx +38 -38
- package/src/pageComponents/index.ts +3 -3
- package/tsconfig.json +34 -34
- package/tslint.json +14 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateHelper.d.ts","sourceRoot":"","sources":["../../src/helpers/DateHelper.ts"],"names":[],"mappings":"AAEA,qBAAa,UAAU;IAGrB,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG;IAIxB,MAAM,CAAC,UAAU,CAAC,KAAK,EAAE,GAAG;IAK5B,MAAM,CAAC,aAAa,CAAC,KAAK,EAAE,GAAG;IAI/B,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM;IAKvC,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE,IAAI;IAK5B,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,IAAI;IAKhC,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE,IAAI;IAK5B,MAAM,CAAC,aAAa;IAMpB,MAAM,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;IAO/C,MAAM,CAAC,eAAe,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM;IAU1C,MAAM,CAAC,eAAe,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM;IAO1C,MAAM,CAAC,mBAAmB,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM;IAO9C,MAAM,CAAC,kBAAkB,CAAC,CAAC,EAAE,IAAI,GAAG,MAAM;
|
|
1
|
+
{"version":3,"file":"DateHelper.d.ts","sourceRoot":"","sources":["../../src/helpers/DateHelper.ts"],"names":[],"mappings":"AAEA,qBAAa,UAAU;IAGrB,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG;IAIxB,MAAM,CAAC,UAAU,CAAC,KAAK,EAAE,GAAG;IAK5B,MAAM,CAAC,aAAa,CAAC,KAAK,EAAE,GAAG;IAI/B,MAAM,CAAC,OAAO,C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,CAAC;CACF;AA1GD,gCA0GC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SocketHelper.d.ts","sourceRoot":"","sources":["../../src/helpers/SocketHelper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiD,4BAA4B,EAAE,sBAAsB,EAAuB,MAAM,eAAe,CAAC;AAKzJ,qBAAa,YAAY;IACvB,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC;IACzB,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,cAAc,EAAE,4BAA4B,EAAE,CAAM;IAC3D,OAAO,CAAC,MAAM,CAAC,gBAAgB,CAAkE;IAEjG,MAAM,CAAC,eAAe,OAAQ;QAAC,QAAQ,EAAC,MAAM,CAAC;QAAC,QAAQ,EAAC,MAAM,CAAA;KAAC,
|
|
1
|
+
{"version":3,"file":"SocketHelper.d.ts","sourceRoot":"","sources":["../../src/helpers/SocketHelper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiD,4BAA4B,EAAE,sBAAsB,EAAuB,MAAM,eAAe,CAAC;AAKzJ,qBAAa,YAAY;IACvB,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC;IACzB,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,cAAc,EAAE,4BAA4B,EAAE,CAAM;IAC3D,OAAO,CAAC,MAAM,CAAC,gBAAgB,CAAkE;IAEjG,MAAM,CAAC,eAAe,OAAQ;QAAC,QAAQ,EAAC,MAAM,CAAC;QAAC,QAAQ,EAAC,MAAM,CAAA;KAAC,UAM/D;IAED,MAAM,CAAC,qBAAqB,aAK3B;IAED,MAAM,CAAC,IAAI,sBA8BV;IAED,MAAM,CAAC,UAAU,WAAY,MAAM,MAAM,MAAM,wBAAwB,GAAG,KAAK,IAAI,UAIlF;IAED,MAAM,CAAC,aAAa,YAAa,sBAAsB,UAWtD;CAEF"}
|
|
@@ -22,12 +22,13 @@ SocketHelper.actionHandlers = [];
|
|
|
22
22
|
SocketHelper.personIdChurchId = { personId: "", churchId: "" };
|
|
23
23
|
SocketHelper.setPersonChurch = (pc) => {
|
|
24
24
|
if ((pc === null || pc === void 0 ? void 0 : pc.personId) && pc.personId && pc.churchId !== _a.personIdChurchId.churchId && pc.personId !== _a.personIdChurchId.personId) {
|
|
25
|
+
//if (pc?.personId && pc.personId!==this.personIdChurchId.personId && this.socketId!==undefined && this.socketId) {
|
|
25
26
|
_a.personIdChurchId = pc;
|
|
26
27
|
_a.createAlertConnection();
|
|
27
28
|
}
|
|
28
29
|
};
|
|
29
30
|
SocketHelper.createAlertConnection = () => {
|
|
30
|
-
if (_a.personIdChurchId.personId) {
|
|
31
|
+
if (_a.personIdChurchId.personId && _a.socketId) {
|
|
31
32
|
const connection = { conversationId: "alerts", churchId: _a.personIdChurchId.churchId, displayName: "Test", socketId: _a.socketId, personId: _a.personIdChurchId.personId };
|
|
32
33
|
ApiHelper_1.ApiHelper.postAnonymous("/connections", [connection], "MessagingApi");
|
|
33
34
|
}
|
|
@@ -57,7 +58,7 @@ SocketHelper.init = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
57
58
|
//Silently reconnect
|
|
58
59
|
if (_a.socket.readyState === _a.socket.CLOSED) {
|
|
59
60
|
_a.init().then(() => {
|
|
60
|
-
|
|
61
|
+
//SocketHelper.createAlertConnection();
|
|
61
62
|
_a.handleMessage({ action: "reconnect", data: null });
|
|
62
63
|
});
|
|
63
64
|
}
|
|
@@ -77,6 +78,7 @@ SocketHelper.handleMessage = (payload) => {
|
|
|
77
78
|
//console.log("MESSAGE", payload)
|
|
78
79
|
if (payload.action === "socketId") {
|
|
79
80
|
_a.socketId = payload.data;
|
|
81
|
+
_a.createAlertConnection();
|
|
80
82
|
}
|
|
81
83
|
else {
|
|
82
84
|
ArrayHelper_1.ArrayHelper.getAll(_a.actionHandlers, "action", payload.action).forEach((handler) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SocketHelper.js","source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
44
44
|
timeSent?: Date;
|
|
45
|
-
|
|
45
|
+
isNew: boolean;
|
|
46
46
|
message?: string;
|
|
47
|
+
deliveryMethod?: string;
|
|
48
|
+
}
|
|
49
|
+
export interface NotificationPreferenceInterface {
|
|
50
|
+
id?: string;
|
|
51
|
+
churchId?: string;
|
|
52
|
+
personId?: string;
|
|
53
|
+
allowPush: boolean;
|
|
54
|
+
emailFrequency: string;
|
|
47
55
|
}
|
|
48
56
|
export interface PrivateMessageInterface {
|
|
49
57
|
id?: string;
|
|
@@ -54,6 +62,7 @@ export interface PrivateMessageInterface {
|
|
|
54
62
|
notifyPersonId?: string;
|
|
55
63
|
conversation?: ConversationInterface;
|
|
56
64
|
person?: PersonInterface;
|
|
65
|
+
deliveryMethod?: string;
|
|
57
66
|
}
|
|
58
67
|
export interface SocketActionHandlerInterface {
|
|
59
68
|
action: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Messaging.d.ts","sourceRoot":"","sources":["../../src/interfaces/Messaging.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,MAAM,WAAW,mBAAmB;IAAG,EAAE,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE;AAC/K,MAAM,WAAW,qBAAqB;
|
|
1
|
+
{"version":3,"file":"Messaging.d.ts","sourceRoot":"","sources":["../../src/interfaces/Messaging.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,MAAM,WAAW,mBAAmB;IAAG,EAAE,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,E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ED
|
@@ -1,85 +1,86 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@churchapps/apphelper",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Library of helper functions for React and NextJS ChurchApps",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"test": "echo \"Error: no test specified\" && exit 1",
|
|
8
|
-
"clean": "rimraf dist",
|
|
9
|
-
"copy-css": "copyfiles -f src/components/markdownEditor/editor.css dist/components/markdownEditor",
|
|
10
|
-
"copy-icons": "copyfiles -f src/components/markdownEditor/images/icons/* dist/components/markdownEditor/images/icons",
|
|
11
|
-
"copy-emojis": "copyfiles -f src/components/markdownEditor/images/emoji/* dist/components/markdownEditor/images/emoji",
|
|
12
|
-
"copy-assets": "npm-run-all copy-css copy-icons copy-emojis",
|
|
13
|
-
"link": "link",
|
|
14
|
-
"tsc": "tsc",
|
|
15
|
-
"build": "npm-run-all clean tsc copy-assets"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"
|
|
31
|
-
|
|
32
|
-
"react
|
|
33
|
-
"react-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"@
|
|
38
|
-
"@emotion/
|
|
39
|
-
"@emotion/
|
|
40
|
-
"@
|
|
41
|
-
"@lexical/
|
|
42
|
-
"@lexical/
|
|
43
|
-
"@lexical/
|
|
44
|
-
"@lexical/
|
|
45
|
-
"@lexical/
|
|
46
|
-
"@lexical/
|
|
47
|
-
"@lexical/
|
|
48
|
-
"@lexical/
|
|
49
|
-
"@
|
|
50
|
-
"@mui/
|
|
51
|
-
"@
|
|
52
|
-
"@stripe/stripe-js": "^2.1.
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"react-
|
|
63
|
-
"react-
|
|
64
|
-
"react-
|
|
65
|
-
"react-
|
|
66
|
-
"react-
|
|
67
|
-
"react-google-
|
|
68
|
-
"react-
|
|
69
|
-
"
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
"@types/
|
|
74
|
-
"@types/react
|
|
75
|
-
"@types/react-
|
|
76
|
-
"@types/react-
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"eslint-
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
|
|
85
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@churchapps/apphelper",
|
|
3
|
+
"version": "0.1.7",
|
|
4
|
+
"description": "Library of helper functions for React and NextJS ChurchApps",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
8
|
+
"clean": "rimraf dist",
|
|
9
|
+
"copy-css": "copyfiles -f src/components/markdownEditor/editor.css dist/components/markdownEditor",
|
|
10
|
+
"copy-icons": "copyfiles -f src/components/markdownEditor/images/icons/* dist/components/markdownEditor/images/icons",
|
|
11
|
+
"copy-emojis": "copyfiles -f src/components/markdownEditor/images/emoji/* dist/components/markdownEditor/images/emoji",
|
|
12
|
+
"copy-assets": "npm-run-all copy-css copy-icons copy-emojis",
|
|
13
|
+
"link": "link",
|
|
14
|
+
"tsc": "tsc",
|
|
15
|
+
"build": "npm-run-all clean tsc copy-assets",
|
|
16
|
+
"updateLink": "npm-run-all clean tsc && npm rm @churchapps/apphelper -g && npm link"
|
|
17
|
+
},
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git+https://github.com/LiveChurchSolutions/AppHelper.git"
|
|
21
|
+
},
|
|
22
|
+
"keywords": [
|
|
23
|
+
"ChurchApps"
|
|
24
|
+
],
|
|
25
|
+
"author": "ChurchApps.org",
|
|
26
|
+
"license": "MIT",
|
|
27
|
+
"bugs": {
|
|
28
|
+
"url": "https://github.com/LiveChurchSolutions/AppHelper/issues"
|
|
29
|
+
},
|
|
30
|
+
"homepage": "https://github.com/LiveChurchSolutions/AppHelper#readme",
|
|
31
|
+
"peerDependencies": {
|
|
32
|
+
"react": "^18.2.0",
|
|
33
|
+
"react-dom": "^18.2.0",
|
|
34
|
+
"react-router-dom": "^6.15.0"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"@churchapps/helpers": "^1.0.6",
|
|
38
|
+
"@emotion/cache": "^11.11.0",
|
|
39
|
+
"@emotion/react": "^11.11.1",
|
|
40
|
+
"@emotion/styled": "^11.11.0",
|
|
41
|
+
"@lexical/code": "^0.12.0",
|
|
42
|
+
"@lexical/link": "^0.12.0",
|
|
43
|
+
"@lexical/list": "^0.12.0",
|
|
44
|
+
"@lexical/markdown": "^0.12.0",
|
|
45
|
+
"@lexical/react": "^0.12.0",
|
|
46
|
+
"@lexical/rich-text": "^0.12.0",
|
|
47
|
+
"@lexical/selection": "^0.12.0",
|
|
48
|
+
"@lexical/table": "^0.12.0",
|
|
49
|
+
"@lexical/utils": "^0.12.0",
|
|
50
|
+
"@mui/lab": "^5.0.0-alpha.142",
|
|
51
|
+
"@mui/material": "^5.14.7",
|
|
52
|
+
"@stripe/react-stripe-js": "^2.1.2",
|
|
53
|
+
"@stripe/stripe-js": "^2.1.1",
|
|
54
|
+
"axios": "^1.5.0",
|
|
55
|
+
"cropperjs": "^1.6.0",
|
|
56
|
+
"date-fns": "^2.30.0",
|
|
57
|
+
"flexsearch": "^0.7.31",
|
|
58
|
+
"jwt-decode": "^3.1.2",
|
|
59
|
+
"lexical": "^0.12.0",
|
|
60
|
+
"material-symbols": "^0.11.0",
|
|
61
|
+
"mui-tel-input": "^4.0.1",
|
|
62
|
+
"react-activity": "^2.1.3",
|
|
63
|
+
"react-cookie": "^6.1.0",
|
|
64
|
+
"react-cropper": "^2.3.3",
|
|
65
|
+
"react-csv": "^2.2.2",
|
|
66
|
+
"react-ga4": "^2.1.0",
|
|
67
|
+
"react-google-charts": "^3.0.15",
|
|
68
|
+
"react-google-recaptcha": "^3.1.0",
|
|
69
|
+
"react-to-print": "^2.14.13",
|
|
70
|
+
"rrule": "^2.7.2"
|
|
71
|
+
},
|
|
72
|
+
"devDependencies": {
|
|
73
|
+
"@types/node": "^20.5.9",
|
|
74
|
+
"@types/react": "^18.2.21",
|
|
75
|
+
"@types/react-csv": "^1.1.3",
|
|
76
|
+
"@types/react-dom": "^18.2.7",
|
|
77
|
+
"@types/react-google-recaptcha": "^2.1.5",
|
|
78
|
+
"copyfiles": "^2.4.1",
|
|
79
|
+
"eslint-config-react-app": "^7.0.1",
|
|
80
|
+
"eslint-plugin-react": "^7.33.2",
|
|
81
|
+
"npm-run-all": "^4.1.5",
|
|
82
|
+
"rimraf": "^5.0.1",
|
|
83
|
+
"tslint": "^6.1.2",
|
|
84
|
+
"typescript": "^5.2.2"
|
|
85
|
+
}
|
|
86
|
+
}
|
|
@@ -1,80 +1,80 @@
|
|
|
1
|
-
import React from "react"
|
|
2
|
-
import { useNavigate } from "react-router-dom"
|
|
3
|
-
import { UserHelper, ApiHelper } from "../helpers";
|
|
4
|
-
import { Permissions, PersonInterface, HouseholdInterface } from "../interfaces";
|
|
5
|
-
import { Button, Grid, TextField } from "@mui/material"
|
|
6
|
-
import { ErrorMessages } from "./ErrorMessages"
|
|
7
|
-
import { useMountedState } from "../hooks/useMountedState"
|
|
8
|
-
|
|
9
|
-
interface Props {
|
|
10
|
-
navigateOnCreate?: boolean;
|
|
11
|
-
onCreate?: (person: PersonInterface) => void;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export function CreatePerson({ navigateOnCreate = true, onCreate = () => {} }: Props) {
|
|
15
|
-
const navigate = useNavigate()
|
|
16
|
-
const [person, setPerson] = React.useState<PersonInterface>({ name: { first: "", last: "" }, contactInfo: {} });
|
|
17
|
-
const [errors, setErrors] = React.useState<string[]>([]);
|
|
18
|
-
const [isSubmitting, setIsSubmitting] = React.useState(false);
|
|
19
|
-
const isMounted = useMountedState()
|
|
20
|
-
|
|
21
|
-
const validate = () => {
|
|
22
|
-
const result = [];
|
|
23
|
-
if (!person.name?.first) result.push("Please enter a first name.");
|
|
24
|
-
if (!person.name?.last) result.push("Please enter a last name.");
|
|
25
|
-
setErrors(result);
|
|
26
|
-
return result.length === 0;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
const handleChange = (e: React.ChangeEvent<HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement>) => {
|
|
30
|
-
setErrors([]);
|
|
31
|
-
const p = { ...person } as PersonInterface;
|
|
32
|
-
let value = e.target.value;
|
|
33
|
-
switch (e.target.name) {
|
|
34
|
-
case "first": p.name.first = value; break;
|
|
35
|
-
case "last": p.name.last = value; break;
|
|
36
|
-
}
|
|
37
|
-
setPerson(p);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
function handleSubmit() {
|
|
41
|
-
let household = { name: person.name.last } as HouseholdInterface;
|
|
42
|
-
if (validate()) {
|
|
43
|
-
setIsSubmitting(true);
|
|
44
|
-
ApiHelper.post("/households", [household], "MembershipApi").then(data => {
|
|
45
|
-
household.id = data[0].id;
|
|
46
|
-
person.householdId = household.id;
|
|
47
|
-
person.name.display = [person.name.first, person.name.last].join(" ");
|
|
48
|
-
ApiHelper.post("/people", [person], "MembershipApi").then(data => {
|
|
49
|
-
person.id = data[0].id
|
|
50
|
-
onCreate(person);
|
|
51
|
-
setPerson({...person, name: { first: "", last: "" }});
|
|
52
|
-
navigateOnCreate && navigate("/people/" + person.id);
|
|
53
|
-
}).finally(() => {
|
|
54
|
-
if (isMounted()) {
|
|
55
|
-
setIsSubmitting(false);
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
if (!UserHelper.checkAccess(Permissions.membershipApi.people.edit)) return null;
|
|
63
|
-
return (
|
|
64
|
-
<div>
|
|
65
|
-
<p className="pl-1 mb-3 text-dark"><b>Add a New Person</b></p>
|
|
66
|
-
<ErrorMessages errors={errors} />
|
|
67
|
-
<Grid container spacing={3} alignItems="center">
|
|
68
|
-
<Grid item md={4} xs={12}>
|
|
69
|
-
<TextField size="small" margin="none" fullWidth type="text" aria-label="firstName" label="First Name" name="first" value={person.name.first || ""} onChange={handleChange} onKeyDown={(e: React.KeyboardEvent<HTMLInputElement>) => e.key === "Enter" && handleSubmit} />
|
|
70
|
-
</Grid>
|
|
71
|
-
<Grid item md={4} xs={12}>
|
|
72
|
-
<TextField size="small" margin="none" fullWidth type="text" aria-label="lastName" label="Last Name" name="last" value={person.name.last || ""} onChange={handleChange} onKeyDown={(e: React.KeyboardEvent<HTMLInputElement>) => e.key === "Enter" && handleSubmit} />
|
|
73
|
-
</Grid>
|
|
74
|
-
<Grid item md={4} xs={12}>
|
|
75
|
-
<Button type="submit" fullWidth variant="contained" disabled={isSubmitting} onClick={handleSubmit}>Add</Button>
|
|
76
|
-
</Grid>
|
|
77
|
-
</Grid>
|
|
78
|
-
</div>
|
|
79
|
-
)
|
|
80
|
-
}
|
|
1
|
+
import React from "react"
|
|
2
|
+
import { useNavigate } from "react-router-dom"
|
|
3
|
+
import { UserHelper, ApiHelper } from "../helpers";
|
|
4
|
+
import { Permissions, PersonInterface, HouseholdInterface } from "../interfaces";
|
|
5
|
+
import { Button, Grid, TextField } from "@mui/material"
|
|
6
|
+
import { ErrorMessages } from "./ErrorMessages"
|
|
7
|
+
import { useMountedState } from "../hooks/useMountedState"
|
|
8
|
+
|
|
9
|
+
interface Props {
|
|
10
|
+
navigateOnCreate?: boolean;
|
|
11
|
+
onCreate?: (person: PersonInterface) => void;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export function CreatePerson({ navigateOnCreate = true, onCreate = () => {} }: Props) {
|
|
15
|
+
const navigate = useNavigate()
|
|
16
|
+
const [person, setPerson] = React.useState<PersonInterface>({ name: { first: "", last: "" }, contactInfo: {} });
|
|
17
|
+
const [errors, setErrors] = React.useState<string[]>([]);
|
|
18
|
+
const [isSubmitting, setIsSubmitting] = React.useState(false);
|
|
19
|
+
const isMounted = useMountedState()
|
|
20
|
+
|
|
21
|
+
const validate = () => {
|
|
22
|
+
const result = [];
|
|
23
|
+
if (!person.name?.first) result.push("Please enter a first name.");
|
|
24
|
+
if (!person.name?.last) result.push("Please enter a last name.");
|
|
25
|
+
setErrors(result);
|
|
26
|
+
return result.length === 0;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const handleChange = (e: React.ChangeEvent<HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement>) => {
|
|
30
|
+
setErrors([]);
|
|
31
|
+
const p = { ...person } as PersonInterface;
|
|
32
|
+
let value = e.target.value;
|
|
33
|
+
switch (e.target.name) {
|
|
34
|
+
case "first": p.name.first = value; break;
|
|
35
|
+
case "last": p.name.last = value; break;
|
|
36
|
+
}
|
|
37
|
+
setPerson(p);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function handleSubmit() {
|
|
41
|
+
let household = { name: person.name.last } as HouseholdInterface;
|
|
42
|
+
if (validate()) {
|
|
43
|
+
setIsSubmitting(true);
|
|
44
|
+
ApiHelper.post("/households", [household], "MembershipApi").then(data => {
|
|
45
|
+
household.id = data[0].id;
|
|
46
|
+
person.householdId = household.id;
|
|
47
|
+
person.name.display = [person.name.first, person.name.last].join(" ");
|
|
48
|
+
ApiHelper.post("/people", [person], "MembershipApi").then(data => {
|
|
49
|
+
person.id = data[0].id
|
|
50
|
+
onCreate(person);
|
|
51
|
+
setPerson({...person, name: { first: "", last: "" }});
|
|
52
|
+
navigateOnCreate && navigate("/people/" + person.id);
|
|
53
|
+
}).finally(() => {
|
|
54
|
+
if (isMounted()) {
|
|
55
|
+
setIsSubmitting(false);
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
if (!UserHelper.checkAccess(Permissions.membershipApi.people.edit)) return null;
|
|
63
|
+
return (
|
|
64
|
+
<div>
|
|
65
|
+
<p className="pl-1 mb-3 text-dark"><b>Add a New Person</b></p>
|
|
66
|
+
<ErrorMessages errors={errors} />
|
|
67
|
+
<Grid container spacing={3} alignItems="center">
|
|
68
|
+
<Grid item md={4} xs={12}>
|
|
69
|
+
<TextField size="small" margin="none" fullWidth type="text" aria-label="firstName" label="First Name" name="first" value={person.name.first || ""} onChange={handleChange} onKeyDown={(e: React.KeyboardEvent<HTMLInputElement>) => e.key === "Enter" && handleSubmit} />
|
|
70
|
+
</Grid>
|
|
71
|
+
<Grid item md={4} xs={12}>
|
|
72
|
+
<TextField size="small" margin="none" fullWidth type="text" aria-label="lastName" label="Last Name" name="last" value={person.name.last || ""} onChange={handleChange} onKeyDown={(e: React.KeyboardEvent<HTMLInputElement>) => e.key === "Enter" && handleSubmit} />
|
|
73
|
+
</Grid>
|
|
74
|
+
<Grid item md={4} xs={12}>
|
|
75
|
+
<Button type="submit" fullWidth variant="contained" disabled={isSubmitting} onClick={handleSubmit}>Add</Button>
|
|
76
|
+
</Grid>
|
|
77
|
+
</Grid>
|
|
78
|
+
</div>
|
|
79
|
+
)
|
|
80
|
+
}
|
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Paper, Box, Typography, styled, Icon } from "@mui/material";
|
|
3
|
-
import { HelpIcon } from "./HelpIcon";
|
|
4
|
-
import { SmallButton } from "./SmallButton";
|
|
5
|
-
|
|
6
|
-
interface Props {
|
|
7
|
-
id?: string,
|
|
8
|
-
children: React.ReactNode,
|
|
9
|
-
headerIcon?: string,
|
|
10
|
-
headerText: string,
|
|
11
|
-
editFunction?: () => void,
|
|
12
|
-
editContent?: React.ReactNode,
|
|
13
|
-
"data-cy"?: string,
|
|
14
|
-
ariaLabel?: string,
|
|
15
|
-
footerContent?: React.ReactNode,
|
|
16
|
-
help?: string
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/* "& p": { color: "#666" }, */
|
|
20
|
-
const CustomContextBox = styled(Box)({
|
|
21
|
-
marginTop: 10,
|
|
22
|
-
overflowX: "hidden",
|
|
23
|
-
"& label": { color: "#999" },
|
|
24
|
-
"& ul": { paddingLeft: 0 },
|
|
25
|
-
"& li": {
|
|
26
|
-
listStyleType: "none",
|
|
27
|
-
marginBottom: 10,
|
|
28
|
-
"& i": { marginRight: 5 }
|
|
29
|
-
},
|
|
30
|
-
"& td": {
|
|
31
|
-
"& i": { marginRight: 5 }
|
|
32
|
-
},
|
|
33
|
-
"& td:first-of-type": { paddingLeft: 0 },
|
|
34
|
-
"& td:last-of-type": { paddingRight: 0 },
|
|
35
|
-
"& th:first-of-type": { paddingLeft: 0 },
|
|
36
|
-
"& th:last-of-type": { paddingRight: 0 }
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
export const DisplayBox = React.forwardRef<HTMLDivElement, Props>((props, ref) => {
|
|
40
|
-
|
|
41
|
-
let editContent: React.ReactNode;
|
|
42
|
-
if (props.editFunction !== undefined) {
|
|
43
|
-
editContent = <SmallButton icon="edit" aria-label={props.ariaLabel || "editButton"} onClick={props.editFunction} />
|
|
44
|
-
}
|
|
45
|
-
else if (props.editContent !== undefined) editContent = props.editContent;
|
|
46
|
-
|
|
47
|
-
return (
|
|
48
|
-
<Paper sx={{ padding: 2, marginBottom: 4 }} id={props.id} data-cy={props["data-cy"] || ""}>
|
|
49
|
-
{props.help && <HelpIcon article={props.help} />}
|
|
50
|
-
<Box sx={{ display: "flex", justifyContent: "space-between", alignItems: "center" }}>
|
|
51
|
-
<Box sx={{ display: "flex", alignItems: "center" }}>
|
|
52
|
-
{props.headerIcon && <Icon sx={{ color: "#1976d2" }}>{props.headerIcon}</Icon>}
|
|
53
|
-
<Typography component="h2" sx={{ display: "inline-block", marginLeft: props.headerIcon ? 1 : 0 }} variant="h6" color="primary">
|
|
54
|
-
{props.headerText}
|
|
55
|
-
</Typography>
|
|
56
|
-
|
|
57
|
-
</Box>
|
|
58
|
-
<Box>
|
|
59
|
-
{editContent}
|
|
60
|
-
</Box>
|
|
61
|
-
</Box>
|
|
62
|
-
<CustomContextBox ref={ref} data-cy="content">{props.children}</CustomContextBox>
|
|
63
|
-
{props.footerContent && (<div style={{ marginLeft: -16, marginRight: -16, marginBottom: -15, marginTop: 15 }}>{props.footerContent}</div>)}
|
|
64
|
-
</Paper>
|
|
65
|
-
);
|
|
66
|
-
})
|
|
67
|
-
|
|
68
|
-
DisplayBox.displayName = "DisplayBox";
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Paper, Box, Typography, styled, Icon } from "@mui/material";
|
|
3
|
+
import { HelpIcon } from "./HelpIcon";
|
|
4
|
+
import { SmallButton } from "./SmallButton";
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
id?: string,
|
|
8
|
+
children: React.ReactNode,
|
|
9
|
+
headerIcon?: string,
|
|
10
|
+
headerText: string,
|
|
11
|
+
editFunction?: () => void,
|
|
12
|
+
editContent?: React.ReactNode,
|
|
13
|
+
"data-cy"?: string,
|
|
14
|
+
ariaLabel?: string,
|
|
15
|
+
footerContent?: React.ReactNode,
|
|
16
|
+
help?: string
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* "& p": { color: "#666" }, */
|
|
20
|
+
const CustomContextBox = styled(Box)({
|
|
21
|
+
marginTop: 10,
|
|
22
|
+
overflowX: "hidden",
|
|
23
|
+
"& label": { color: "#999" },
|
|
24
|
+
"& ul": { paddingLeft: 0 },
|
|
25
|
+
"& li": {
|
|
26
|
+
listStyleType: "none",
|
|
27
|
+
marginBottom: 10,
|
|
28
|
+
"& i": { marginRight: 5 }
|
|
29
|
+
},
|
|
30
|
+
"& td": {
|
|
31
|
+
"& i": { marginRight: 5 }
|
|
32
|
+
},
|
|
33
|
+
"& td:first-of-type": { paddingLeft: 0 },
|
|
34
|
+
"& td:last-of-type": { paddingRight: 0 },
|
|
35
|
+
"& th:first-of-type": { paddingLeft: 0 },
|
|
36
|
+
"& th:last-of-type": { paddingRight: 0 }
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
export const DisplayBox = React.forwardRef<HTMLDivElement, Props>((props, ref) => {
|
|
40
|
+
|
|
41
|
+
let editContent: React.ReactNode;
|
|
42
|
+
if (props.editFunction !== undefined) {
|
|
43
|
+
editContent = <SmallButton icon="edit" aria-label={props.ariaLabel || "editButton"} onClick={props.editFunction} />
|
|
44
|
+
}
|
|
45
|
+
else if (props.editContent !== undefined) editContent = props.editContent;
|
|
46
|
+
|
|
47
|
+
return (
|
|
48
|
+
<Paper sx={{ padding: 2, marginBottom: 4 }} id={props.id} data-cy={props["data-cy"] || ""}>
|
|
49
|
+
{props.help && <HelpIcon article={props.help} />}
|
|
50
|
+
<Box sx={{ display: "flex", justifyContent: "space-between", alignItems: "center" }}>
|
|
51
|
+
<Box sx={{ display: "flex", alignItems: "center" }}>
|
|
52
|
+
{props.headerIcon && <Icon sx={{ color: "#1976d2" }}>{props.headerIcon}</Icon>}
|
|
53
|
+
<Typography component="h2" sx={{ display: "inline-block", marginLeft: props.headerIcon ? 1 : 0 }} variant="h6" color="primary">
|
|
54
|
+
{props.headerText}
|
|
55
|
+
</Typography>
|
|
56
|
+
|
|
57
|
+
</Box>
|
|
58
|
+
<Box>
|
|
59
|
+
{editContent}
|
|
60
|
+
</Box>
|
|
61
|
+
</Box>
|
|
62
|
+
<CustomContextBox ref={ref} data-cy="content">{props.children}</CustomContextBox>
|
|
63
|
+
{props.footerContent && (<div style={{ marginLeft: -16, marginRight: -16, marginBottom: -15, marginTop: 15 }}>{props.footerContent}</div>)}
|
|
64
|
+
</Paper>
|
|
65
|
+
);
|
|
66
|
+
})
|
|
67
|
+
|
|
68
|
+
DisplayBox.displayName = "DisplayBox";
|