@churchapps/apphelper 0.4.50 → 0.5.0

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.
Files changed (102) hide show
  1. package/dist/components/FormCardPayment.d.ts +1 -1
  2. package/dist/components/FormCardPayment.d.ts.map +1 -1
  3. package/dist/components/FormCardPayment.js +27 -10
  4. package/dist/components/FormCardPayment.js.map +1 -1
  5. package/dist/components/Loading.js +36 -36
  6. package/dist/components/notes/Notes.js +27 -27
  7. package/dist/helpers/index.d.ts +1 -1
  8. package/dist/helpers/index.d.ts.map +1 -1
  9. package/dist/helpers/index.js +1 -1
  10. package/dist/helpers/index.js.map +1 -1
  11. package/dist/public/css/cropper.css +309 -309
  12. package/dist/public/css/styles.css +111 -111
  13. package/package.json +72 -73
  14. package/public/css/cropper.css +309 -309
  15. package/public/css/styles.css +111 -111
  16. package/public/locales/de.json +269 -269
  17. package/public/locales/en.json +276 -276
  18. package/public/locales/es.json +272 -272
  19. package/public/locales/fr.json +269 -269
  20. package/public/locales/hi.json +269 -269
  21. package/public/locales/it.json +269 -269
  22. package/public/locales/ko.json +269 -269
  23. package/public/locales/no.json +269 -269
  24. package/public/locales/pt.json +269 -269
  25. package/public/locales/ru.json +269 -269
  26. package/public/locales/tl.json +269 -269
  27. package/public/locales/zh.json +269 -269
  28. package/src/components/DisplayBox.tsx +83 -83
  29. package/src/components/ErrorMessages.tsx +28 -28
  30. package/src/components/ExportLink.tsx +81 -81
  31. package/src/components/FloatingSupport.tsx +18 -18
  32. package/src/components/FormCardPayment.tsx +184 -169
  33. package/src/components/FormSubmissionEdit.tsx +168 -168
  34. package/src/components/HelpIcon.tsx +12 -12
  35. package/src/components/ImageEditor.tsx +161 -161
  36. package/src/components/InputBox.tsx +96 -96
  37. package/src/components/Loading.tsx +77 -77
  38. package/src/components/PageHeader.tsx +110 -110
  39. package/src/components/PersonAvatar.tsx +77 -77
  40. package/src/components/QuestionEdit.tsx +99 -99
  41. package/src/components/SmallButton.tsx +42 -42
  42. package/src/components/SupportModal.tsx +32 -32
  43. package/src/components/TabPanel.tsx +28 -28
  44. package/src/components/gallery/GalleryModal.tsx +173 -173
  45. package/src/components/gallery/StockPhotos.tsx +95 -95
  46. package/src/components/gallery/index.ts +1 -1
  47. package/src/components/header/Banner.tsx +11 -11
  48. package/src/components/header/PrimaryMenu.tsx +100 -100
  49. package/src/components/header/SecondaryMenu.tsx +23 -23
  50. package/src/components/header/SecondaryMenuAlt.tsx +40 -40
  51. package/src/components/header/SiteHeader.tsx +207 -207
  52. package/src/components/header/SupportDrawer.tsx +111 -111
  53. package/src/components/header/index.tsx +2 -2
  54. package/src/components/index.tsx +20 -20
  55. package/src/components/notes/AddNote.tsx +180 -180
  56. package/src/components/notes/Note.tsx +68 -68
  57. package/src/components/notes/Notes.tsx +208 -208
  58. package/src/components/notes/index.ts +3 -3
  59. package/src/components/wrapper/AppList.tsx +19 -19
  60. package/src/components/wrapper/ChurchList.tsx +154 -154
  61. package/src/components/wrapper/NavItem.tsx +47 -47
  62. package/src/components/wrapper/NewPrivateMessage.tsx +253 -253
  63. package/src/components/wrapper/Notifications.tsx +223 -223
  64. package/src/components/wrapper/PrivateMessageDetails.tsx +112 -112
  65. package/src/components/wrapper/PrivateMessages.tsx +576 -576
  66. package/src/components/wrapper/UserMenu.tsx +383 -383
  67. package/src/components/wrapper/index.tsx +8 -8
  68. package/src/helpers/AnalyticsHelper.ts +32 -32
  69. package/src/helpers/AppearanceHelper.ts +73 -73
  70. package/src/helpers/ArrayHelper.ts +87 -87
  71. package/src/helpers/CurrencyHelper.ts +10 -10
  72. package/src/helpers/DateHelper.ts +104 -104
  73. package/src/helpers/ErrorHelper.ts +43 -43
  74. package/src/helpers/EventHelper.ts +49 -49
  75. package/src/helpers/FileHelper.ts +31 -31
  76. package/src/helpers/Locale.ts +457 -457
  77. package/src/helpers/NotificationService.ts +296 -296
  78. package/src/helpers/PersonHelper.ts +62 -62
  79. package/src/helpers/SlugHelper.ts +37 -37
  80. package/src/helpers/SocketHelper.ts +296 -296
  81. package/src/helpers/UniqueIdHelper.ts +36 -36
  82. package/src/helpers/UserHelper.ts +104 -104
  83. package/src/helpers/createEmotionCache.ts +17 -17
  84. package/src/helpers/index.ts +58 -50
  85. package/src/hooks/index.ts +3 -3
  86. package/src/hooks/useMountedState.ts +16 -16
  87. package/src/hooks/useNotifications.ts +93 -93
  88. package/src/index.ts +2 -2
  89. package/src/types/interface-extensions.d.ts +12 -0
  90. package/tsconfig.json +31 -31
  91. package/dist/public/locales/de.json +0 -270
  92. package/dist/public/locales/en.json +0 -277
  93. package/dist/public/locales/es.json +0 -272
  94. package/dist/public/locales/fr.json +0 -270
  95. package/dist/public/locales/hi.json +0 -270
  96. package/dist/public/locales/it.json +0 -270
  97. package/dist/public/locales/ko.json +0 -270
  98. package/dist/public/locales/no.json +0 -270
  99. package/dist/public/locales/pt.json +0 -270
  100. package/dist/public/locales/ru.json +0 -270
  101. package/dist/public/locales/tl.json +0 -270
  102. package/dist/public/locales/zh.json +0 -270
@@ -1,99 +1,99 @@
1
- "use client";
2
-
3
- import React from "react";
4
- import { Elements } from "@stripe/react-stripe-js";
5
- import { Stripe } from "@stripe/stripe-js";
6
- import { MuiTelInput } from "mui-tel-input";
7
- import { AnswerInterface, QuestionInterface } from "@churchapps/helpers";
8
- import { Checkbox, Select, MenuItem, SelectChangeEvent, FormControl, InputLabel, TextField, FormLabel, FormGroup, FormControlLabel, Box } from "@mui/material";
9
- import { FormCardPayment } from "./FormCardPayment";
10
-
11
- interface Props {
12
- answer: AnswerInterface
13
- question: QuestionInterface,
14
- noBackground?: boolean,
15
- changeFunction: (questionId: string, value: string) => void,
16
- churchId?: string,
17
- ref?: React.ForwardedRef<any>,
18
- stripePromise?: Promise<Stripe>
19
- }
20
-
21
- export const QuestionEdit = React.forwardRef<any, Props>(({noBackground = false, ...props}, ref) => {
22
- const handleChange = (e: React.ChangeEvent<HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement> | SelectChangeEvent<string>) => {
23
- props.changeFunction(props.question.id, e.target.value);
24
- }
25
-
26
- const handleCheck = (e: React.ChangeEvent<HTMLInputElement>) => {
27
- const selectedOptions = props.answer.value ? props.answer.value.split(",") : [];
28
- if (e.target.checked) {
29
- selectedOptions.push(e.target.name);
30
- } else {
31
- const idx = selectedOptions.indexOf(e.target.name);
32
- selectedOptions.splice(idx, 1);
33
- }
34
- props.changeFunction(props.question.id, selectedOptions.join());
35
- }
36
-
37
- let q = props.question;
38
-
39
- if (q.fieldType === "Heading") return <h5>{q.title}</h5>;
40
- else {
41
- let input = null;
42
- let choiceOptions = [];
43
- if (q.choices !== undefined && q.choices !== null) {
44
- if (q.fieldType === "Multiple Choice") {
45
- for (let i = 0; i < q.choices.length; i++) choiceOptions.push(<MenuItem key={i} value={q.choices[i].value}>{q.choices[i].text}</MenuItem>);
46
- } else if (q.fieldType === "Checkbox") {
47
- for (let i = 0; i < q.choices.length; i++) choiceOptions.push(<FormControlLabel key={i} label={q.choices[i].text} control={<Checkbox onChange={handleCheck} name={q.choices[i].value} />} />);
48
- }
49
- }
50
-
51
- let answerValue = (props.answer === null) ? "" : props.answer.value
52
- switch (q.fieldType) {
53
- case "Textbox": input = <TextField fullWidth style={noBackground ? {backgroundColor: "white", borderRadius: "4px"} : {}} InputLabelProps={{ sx: { fontWeight: "bold" } }} label={q.title} placeholder={q.placeholder} value={answerValue} onChange={handleChange} />; break;
54
- case "Multiple Choice": {
55
- input = (
56
- <FormControl fullWidth style={noBackground ? {backgroundColor: "white", borderRadius: "4px"} : {}}>
57
- <InputLabel sx={{ fontWeight: "bold" }}>{q.title}</InputLabel>
58
- <Select fullWidth label={q.title} value={answerValue} onChange={handleChange}>{choiceOptions}</Select>
59
- </FormControl>);
60
- break;
61
- }
62
- case "Yes/No": {
63
- input = (
64
- <FormControl fullWidth style={noBackground ? {backgroundColor: "white", borderRadius: "4px"} : {}}>
65
- <InputLabel sx={{ fontWeight: "bold" }}>{q.title}</InputLabel>
66
- <Select fullWidth label={q.title} value={answerValue} onChange={handleChange}>
67
- <MenuItem value="False">No</MenuItem>
68
- <MenuItem value="True">Yes</MenuItem>
69
- </Select>
70
- </FormControl>);
71
- break;
72
- }
73
- case "Checkbox": {
74
- input = (
75
- <FormControl fullWidth sx={{ marginLeft: 1 }}>
76
- <FormLabel sx={{ fontWeight: "bold" }}>{q.title}</FormLabel>
77
- <FormGroup>
78
- {choiceOptions}
79
- </FormGroup>
80
- </FormControl>
81
- );
82
- break;
83
- }
84
- case "Whole Number":
85
- case "Decimal":
86
- input = <TextField fullWidth style={noBackground ? {backgroundColor: "white", borderRadius: "4px"} : {}} type="number" InputLabelProps={{ shrink: true, sx: { fontWeight: "bold" } }} label={q.title} placeholder={q.placeholder} value={answerValue} onChange={handleChange} />;
87
- break;
88
- case "Date": input = <TextField fullWidth style={noBackground ? {backgroundColor: "white", borderRadius: "4px"} : {}} type="date" InputLabelProps={{ shrink: true, sx: { fontWeight: "bold" } }} label={q.title} placeholder={q.placeholder} value={answerValue} onChange={handleChange} />; break;
89
- case "Phone Number": input = <MuiTelInput fullWidth style={noBackground ? {backgroundColor: "white", borderRadius: "4px"} : {}} InputLabelProps={{ sx: { fontWeight: "bold" } }} label={q.title} placeholder="" value={answerValue} onChange={(value) => { props.changeFunction(props.question.id, value); }} defaultCountry="US" focusOnSelectCountry excludedCountries={["TA", "AC"]} />; break;
90
- case "Email": input = <TextField fullWidth style={noBackground ? {backgroundColor: "white", borderRadius: "4px"} : {}} type="email" InputLabelProps={{ sx: { fontWeight: "bold" } }} label={q.title} placeholder="john@doe.com" value={answerValue} onChange={handleChange} />; break;
91
- case "Text Area": input = <TextField fullWidth style={noBackground ? {backgroundColor: "white", borderRadius: "4px"} : {}} multiline rows={4} InputLabelProps={{ sx: { fontWeight: "bold" } }} label={q.title} placeholder={q.placeholder} value={answerValue} onChange={handleChange} />; break;
92
- case "Payment": input = <Elements stripe={props.stripePromise}><FormCardPayment churchId={props.churchId} question={q} ref={ref} /></Elements>; break;
93
- default: return null;
94
- }
95
- return input;
96
- }
97
-
98
- });
99
-
1
+ "use client";
2
+
3
+ import React from "react";
4
+ import { Elements } from "@stripe/react-stripe-js";
5
+ import { Stripe } from "@stripe/stripe-js";
6
+ import { MuiTelInput } from "mui-tel-input";
7
+ import { AnswerInterface, QuestionInterface } from "@churchapps/helpers";
8
+ import { Checkbox, Select, MenuItem, SelectChangeEvent, FormControl, InputLabel, TextField, FormLabel, FormGroup, FormControlLabel, Box } from "@mui/material";
9
+ import { FormCardPayment } from "./FormCardPayment";
10
+
11
+ interface Props {
12
+ answer: AnswerInterface
13
+ question: QuestionInterface,
14
+ noBackground?: boolean,
15
+ changeFunction: (questionId: string, value: string) => void,
16
+ churchId?: string,
17
+ ref?: React.ForwardedRef<any>,
18
+ stripePromise?: Promise<Stripe>
19
+ }
20
+
21
+ export const QuestionEdit = React.forwardRef<any, Props>(({noBackground = false, ...props}, ref) => {
22
+ const handleChange = (e: React.ChangeEvent<HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement> | SelectChangeEvent<string>) => {
23
+ props.changeFunction(props.question.id, e.target.value);
24
+ }
25
+
26
+ const handleCheck = (e: React.ChangeEvent<HTMLInputElement>) => {
27
+ const selectedOptions = props.answer.value ? props.answer.value.split(",") : [];
28
+ if (e.target.checked) {
29
+ selectedOptions.push(e.target.name);
30
+ } else {
31
+ const idx = selectedOptions.indexOf(e.target.name);
32
+ selectedOptions.splice(idx, 1);
33
+ }
34
+ props.changeFunction(props.question.id, selectedOptions.join());
35
+ }
36
+
37
+ let q = props.question;
38
+
39
+ if (q.fieldType === "Heading") return <h5>{q.title}</h5>;
40
+ else {
41
+ let input = null;
42
+ let choiceOptions = [];
43
+ if (q.choices !== undefined && q.choices !== null) {
44
+ if (q.fieldType === "Multiple Choice") {
45
+ for (let i = 0; i < q.choices.length; i++) choiceOptions.push(<MenuItem key={i} value={q.choices[i].value}>{q.choices[i].text}</MenuItem>);
46
+ } else if (q.fieldType === "Checkbox") {
47
+ for (let i = 0; i < q.choices.length; i++) choiceOptions.push(<FormControlLabel key={i} label={q.choices[i].text} control={<Checkbox onChange={handleCheck} name={q.choices[i].value} />} />);
48
+ }
49
+ }
50
+
51
+ let answerValue = (props.answer === null) ? "" : props.answer.value
52
+ switch (q.fieldType) {
53
+ case "Textbox": input = <TextField fullWidth style={noBackground ? {backgroundColor: "white", borderRadius: "4px"} : {}} InputLabelProps={{ sx: { fontWeight: "bold" } }} label={q.title} placeholder={q.placeholder} value={answerValue} onChange={handleChange} />; break;
54
+ case "Multiple Choice": {
55
+ input = (
56
+ <FormControl fullWidth style={noBackground ? {backgroundColor: "white", borderRadius: "4px"} : {}}>
57
+ <InputLabel sx={{ fontWeight: "bold" }}>{q.title}</InputLabel>
58
+ <Select fullWidth label={q.title} value={answerValue} onChange={handleChange}>{choiceOptions}</Select>
59
+ </FormControl>);
60
+ break;
61
+ }
62
+ case "Yes/No": {
63
+ input = (
64
+ <FormControl fullWidth style={noBackground ? {backgroundColor: "white", borderRadius: "4px"} : {}}>
65
+ <InputLabel sx={{ fontWeight: "bold" }}>{q.title}</InputLabel>
66
+ <Select fullWidth label={q.title} value={answerValue} onChange={handleChange}>
67
+ <MenuItem value="False">No</MenuItem>
68
+ <MenuItem value="True">Yes</MenuItem>
69
+ </Select>
70
+ </FormControl>);
71
+ break;
72
+ }
73
+ case "Checkbox": {
74
+ input = (
75
+ <FormControl fullWidth sx={{ marginLeft: 1 }}>
76
+ <FormLabel sx={{ fontWeight: "bold" }}>{q.title}</FormLabel>
77
+ <FormGroup>
78
+ {choiceOptions}
79
+ </FormGroup>
80
+ </FormControl>
81
+ );
82
+ break;
83
+ }
84
+ case "Whole Number":
85
+ case "Decimal":
86
+ input = <TextField fullWidth style={noBackground ? {backgroundColor: "white", borderRadius: "4px"} : {}} type="number" InputLabelProps={{ shrink: true, sx: { fontWeight: "bold" } }} label={q.title} placeholder={q.placeholder} value={answerValue} onChange={handleChange} />;
87
+ break;
88
+ case "Date": input = <TextField fullWidth style={noBackground ? {backgroundColor: "white", borderRadius: "4px"} : {}} type="date" InputLabelProps={{ shrink: true, sx: { fontWeight: "bold" } }} label={q.title} placeholder={q.placeholder} value={answerValue} onChange={handleChange} />; break;
89
+ case "Phone Number": input = <MuiTelInput fullWidth style={noBackground ? {backgroundColor: "white", borderRadius: "4px"} : {}} InputLabelProps={{ sx: { fontWeight: "bold" } }} label={q.title} placeholder="" value={answerValue} onChange={(value) => { props.changeFunction(props.question.id, value); }} defaultCountry="US" focusOnSelectCountry excludedCountries={["TA", "AC"]} />; break;
90
+ case "Email": input = <TextField fullWidth style={noBackground ? {backgroundColor: "white", borderRadius: "4px"} : {}} type="email" InputLabelProps={{ sx: { fontWeight: "bold" } }} label={q.title} placeholder="john@doe.com" value={answerValue} onChange={handleChange} />; break;
91
+ case "Text Area": input = <TextField fullWidth style={noBackground ? {backgroundColor: "white", borderRadius: "4px"} : {}} multiline rows={4} InputLabelProps={{ sx: { fontWeight: "bold" } }} label={q.title} placeholder={q.placeholder} value={answerValue} onChange={handleChange} />; break;
92
+ case "Payment": input = <Elements stripe={props.stripePromise}><FormCardPayment churchId={props.churchId} question={q} ref={ref} /></Elements>; break;
93
+ default: return null;
94
+ }
95
+ return input;
96
+ }
97
+
98
+ });
99
+
@@ -1,42 +1,42 @@
1
- "use client";
2
-
3
- import React from "react";
4
- import { Button, Icon, Tooltip } from "@mui/material";
5
- import { Navigate } from "react-router-dom";
6
-
7
- interface Props {
8
- ariaLabel?: string;
9
- text?: string;
10
- icon: string;
11
- color?: "inherit" | "primary" | "secondary" | "success" | "error" | "info" | "warning";
12
- toolTip?: string;
13
- onClick?: (e: React.MouseEvent) => void;
14
- href?: string;
15
- disabled?: boolean;
16
- "data-testid"?: string;
17
- }
18
-
19
- export const SmallButton = React.forwardRef<HTMLDivElement, Props>((props, ref) => {
20
- const [redirectUrl, setRedirectUrl] = React.useState("");
21
-
22
- const handleClick = (e: React.MouseEvent) => {
23
- e.preventDefault();
24
- if (props.href) setRedirectUrl(props.href);
25
- else props.onClick(e);
26
- }
27
-
28
- const style = (props.text)
29
- ? { backgroundColor: props.color, "& span": { marginRight: 1 } }
30
- : { minWidth: "auto", padding: "4px 4px" }
31
-
32
- if (redirectUrl) return <Navigate to={redirectUrl} />
33
- else return (
34
- <Tooltip title={props.toolTip || ""} arrow placement="top">
35
- <Button sx={style} disabled={props.disabled} variant={props.text ? "outlined" : "text"} color={props.color} aria-label={props.ariaLabel || "editButton"} onClick={handleClick} size="small" data-testid={props["data-testid"] || `small-button-${props.icon}`}>
36
- <Icon>{props.icon}</Icon>{(props.text) ? props.text : ""}
37
- </Button>
38
- </Tooltip>
39
- );
40
- });
41
-
42
- SmallButton.displayName = "SmallButton";
1
+ "use client";
2
+
3
+ import React from "react";
4
+ import { Button, Icon, Tooltip } from "@mui/material";
5
+ import { Navigate } from "react-router-dom";
6
+
7
+ interface Props {
8
+ ariaLabel?: string;
9
+ text?: string;
10
+ icon: string;
11
+ color?: "inherit" | "primary" | "secondary" | "success" | "error" | "info" | "warning";
12
+ toolTip?: string;
13
+ onClick?: (e: React.MouseEvent) => void;
14
+ href?: string;
15
+ disabled?: boolean;
16
+ "data-testid"?: string;
17
+ }
18
+
19
+ export const SmallButton = React.forwardRef<HTMLDivElement, Props>((props, ref) => {
20
+ const [redirectUrl, setRedirectUrl] = React.useState("");
21
+
22
+ const handleClick = (e: React.MouseEvent) => {
23
+ e.preventDefault();
24
+ if (props.href) setRedirectUrl(props.href);
25
+ else props.onClick(e);
26
+ }
27
+
28
+ const style = (props.text)
29
+ ? { backgroundColor: props.color, "& span": { marginRight: 1 } }
30
+ : { minWidth: "auto", padding: "4px 4px" }
31
+
32
+ if (redirectUrl) return <Navigate to={redirectUrl} />
33
+ else return (
34
+ <Tooltip title={props.toolTip || ""} arrow placement="top">
35
+ <Button sx={style} disabled={props.disabled} variant={props.text ? "outlined" : "text"} color={props.color} aria-label={props.ariaLabel || "editButton"} onClick={handleClick} size="small" data-testid={props["data-testid"] || `small-button-${props.icon}`}>
36
+ <Icon>{props.icon}</Icon>{(props.text) ? props.text : ""}
37
+ </Button>
38
+ </Tooltip>
39
+ );
40
+ });
41
+
42
+ SmallButton.displayName = "SmallButton";
@@ -1,32 +1,32 @@
1
- "use client";
2
-
3
- import { Button, Dialog, DialogActions, DialogContent, DialogTitle, Icon, Stack } from "@mui/material";
4
- import React from "react";
5
- import { Locale } from "../helpers";
6
-
7
- interface Props {
8
- appName?: string
9
- onClose: () => void
10
- }
11
-
12
- export const SupportModal: React.FC<Props> = ({ appName = "", onClose }) => {
13
- const subject = appName ? `?subject=${appName} Support` : ""
14
-
15
- return (<>
16
- <Dialog
17
- open={true}
18
- onClose={onClose}
19
- aria-labelledby="support-modal-title"
20
- aria-describedby="support-modal-content"
21
- >
22
- <DialogTitle id="support-modal-title">Get Support</DialogTitle>
23
- <DialogContent id="support-modal-content">
24
- <Stack direction="row" alignItems="center" sx={{flexWrap: "wrap"}}><b><Stack direction="row" alignItems="center" mr="5px"><Icon sx={{marginRight: "5px"}}>info</Icon> {Locale.label("support.documentation")}:</Stack></b> <a href="https://support.churchapps.org" target="_new">https://support.churchapps.org</a></Stack>
25
- <Stack direction="row" alignItems="center" sx={{flexWrap: "wrap"}} mb={2}><b><Stack direction="row" alignItems="center" mr="5px"><Icon sx={{marginRight: "5px"}}>forum</Icon> {Locale.label("support.discussions")}:</Stack></b> <a href="https://github.com/orgs/ChurchApps/discussions" target="_new">https://github.com/orgs/ChurchApps/discussions</a></Stack>
26
- </DialogContent>
27
- <DialogActions sx={{ paddingX: "16px", paddingBottom: "12px" }}>
28
- <Button variant="outlined" onClick={onClose}>Close</Button>
29
- </DialogActions>
30
- </Dialog>
31
- </>);
32
- };
1
+ "use client";
2
+
3
+ import { Button, Dialog, DialogActions, DialogContent, DialogTitle, Icon, Stack } from "@mui/material";
4
+ import React from "react";
5
+ import { Locale } from "../helpers";
6
+
7
+ interface Props {
8
+ appName?: string
9
+ onClose: () => void
10
+ }
11
+
12
+ export const SupportModal: React.FC<Props> = ({ appName = "", onClose }) => {
13
+ const subject = appName ? `?subject=${appName} Support` : ""
14
+
15
+ return (<>
16
+ <Dialog
17
+ open={true}
18
+ onClose={onClose}
19
+ aria-labelledby="support-modal-title"
20
+ aria-describedby="support-modal-content"
21
+ >
22
+ <DialogTitle id="support-modal-title">Get Support</DialogTitle>
23
+ <DialogContent id="support-modal-content">
24
+ <Stack direction="row" alignItems="center" sx={{flexWrap: "wrap"}}><b><Stack direction="row" alignItems="center" mr="5px"><Icon sx={{marginRight: "5px"}}>info</Icon> {Locale.label("support.documentation")}:</Stack></b> <a href="https://support.churchapps.org" target="_new">https://support.churchapps.org</a></Stack>
25
+ <Stack direction="row" alignItems="center" sx={{flexWrap: "wrap"}} mb={2}><b><Stack direction="row" alignItems="center" mr="5px"><Icon sx={{marginRight: "5px"}}>forum</Icon> {Locale.label("support.discussions")}:</Stack></b> <a href="https://github.com/orgs/ChurchApps/discussions" target="_new">https://github.com/orgs/ChurchApps/discussions</a></Stack>
26
+ </DialogContent>
27
+ <DialogActions sx={{ paddingX: "16px", paddingBottom: "12px" }}>
28
+ <Button variant="outlined" onClick={onClose}>Close</Button>
29
+ </DialogActions>
30
+ </Dialog>
31
+ </>);
32
+ };
@@ -1,28 +1,28 @@
1
- import React from "react";
2
- import { Box } from "@mui/material";
3
-
4
- interface TabPanelProps {
5
- children?: React.ReactNode;
6
- index: number;
7
- value: number;
8
- }
9
-
10
- export function TabPanel(props: TabPanelProps) {
11
- const { children, value, index, ...other } = props;
12
-
13
- return (
14
- <div
15
- role="tabpanel"
16
- hidden={value !== index}
17
- id={`simple-tabpanel-${index}`}
18
- aria-labelledby={`simple-tab-${index}`}
19
- {...other}
20
- >
21
- {value === index && (
22
- <Box sx={{ p: 3 }}>
23
- {children}
24
- </Box>
25
- )}
26
- </div>
27
- );
28
- }
1
+ import React from "react";
2
+ import { Box } from "@mui/material";
3
+
4
+ interface TabPanelProps {
5
+ children?: React.ReactNode;
6
+ index: number;
7
+ value: number;
8
+ }
9
+
10
+ export function TabPanel(props: TabPanelProps) {
11
+ const { children, value, index, ...other } = props;
12
+
13
+ return (
14
+ <div
15
+ role="tabpanel"
16
+ hidden={value !== index}
17
+ id={`simple-tabpanel-${index}`}
18
+ aria-labelledby={`simple-tab-${index}`}
19
+ {...other}
20
+ >
21
+ {value === index && (
22
+ <Box sx={{ p: 3 }}>
23
+ {children}
24
+ </Box>
25
+ )}
26
+ </div>
27
+ );
28
+ }