@churchapps/apphelper 0.3.49 → 0.4.1

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 (101) hide show
  1. package/dist/components/CreatePerson.js +1 -1
  2. package/dist/components/CreatePerson.js.map +1 -1
  3. package/dist/components/FormCardPayment.js +1 -1
  4. package/dist/components/FormCardPayment.js.map +1 -1
  5. package/dist/components/gallery/GalleryModal.js +1 -1
  6. package/dist/components/gallery/GalleryModal.js.map +1 -1
  7. package/dist/components/gallery/StockPhotos.js +2 -2
  8. package/dist/components/gallery/StockPhotos.js.map +1 -1
  9. package/dist/components/header/PrimaryMenu.js.map +1 -1
  10. package/dist/components/iconPicker/IconPicker.js +1 -1
  11. package/dist/components/iconPicker/IconPicker.js.map +1 -1
  12. package/dist/components/markdownEditor/Editor.js +2 -2
  13. package/dist/components/markdownEditor/Editor.js.map +1 -1
  14. package/dist/components/markdownEditor/MarkdownModal.js +2 -2
  15. package/dist/components/markdownEditor/MarkdownModal.js.map +1 -1
  16. package/dist/components/markdownEditor/plugins/FloatingTextMenu/FloatingTextFormatToolbarPlugin.d.ts +1 -3
  17. package/dist/components/markdownEditor/plugins/FloatingTextMenu/FloatingTextFormatToolbarPlugin.d.ts.map +1 -1
  18. package/dist/components/markdownEditor/plugins/customLink/CustomLinkNode.d.ts +1 -1
  19. package/dist/components/markdownEditor/plugins/customLink/FloatingLinkEditor.js.map +1 -1
  20. package/dist/components/markdownEditor/plugins/emoji/EmojiNode.js.map +1 -1
  21. package/dist/components/markdownEditor/plugins/emoji/EmojisPlugin.d.ts +1 -1
  22. package/dist/components/markdownEditor/plugins/emoji/EmojisPlugin.d.ts.map +1 -1
  23. package/dist/components/reporting/ReportFilter.js.map +1 -1
  24. package/dist/components/reporting/ReportOutput.js +1 -1
  25. package/dist/components/reporting/ReportOutput.js.map +1 -1
  26. package/dist/components/reporting/ReportWithFilter.js +1 -1
  27. package/dist/components/reporting/ReportWithFilter.js.map +1 -1
  28. package/dist/components/reporting/TableReport.js.map +1 -1
  29. package/dist/components/reporting/TreeReport.js.map +1 -1
  30. package/dist/components/wrapper/ChurchList.js.map +1 -1
  31. package/dist/components/wrapper/Drawers.d.ts +2 -6
  32. package/dist/components/wrapper/Drawers.d.ts.map +1 -1
  33. package/dist/components/wrapper/Notifications.js.map +1 -1
  34. package/dist/components/wrapper/PrivateMessages.js.map +1 -1
  35. package/dist/components/wrapper/SiteWrapper.d.ts +1 -1
  36. package/dist/components/wrapper/SiteWrapper.d.ts.map +1 -1
  37. package/dist/components/wrapper/UserMenu.d.ts.map +1 -1
  38. package/dist/components/wrapper/UserMenu.js +4 -1
  39. package/dist/components/wrapper/UserMenu.js.map +1 -1
  40. package/dist/donationComponents/DonationPage.js.map +1 -1
  41. package/dist/donationComponents/components/BankForm.js +3 -3
  42. package/dist/donationComponents/components/BankForm.js.map +1 -1
  43. package/dist/donationComponents/components/CardForm.js +1 -1
  44. package/dist/donationComponents/components/CardForm.js.map +1 -1
  45. package/dist/donationComponents/components/DonationForm.js +3 -3
  46. package/dist/donationComponents/components/DonationForm.js.map +1 -1
  47. package/dist/donationComponents/components/FundDonation.js +1 -1
  48. package/dist/donationComponents/components/FundDonation.js.map +1 -1
  49. package/dist/donationComponents/components/NonAuthDonationInner.js +2 -2
  50. package/dist/donationComponents/components/NonAuthDonationInner.js.map +1 -1
  51. package/dist/donationComponents/components/PaymentMethods.js.map +1 -1
  52. package/dist/donationComponents/components/RecurringDonations.js.map +1 -1
  53. package/dist/donationComponents/components/RecurringDonationsEdit.js +1 -1
  54. package/dist/donationComponents/components/RecurringDonationsEdit.js.map +1 -1
  55. package/dist/pageComponents/LoginPage.d.ts.map +1 -1
  56. package/dist/pageComponents/LoginPage.js +10 -3
  57. package/dist/pageComponents/LoginPage.js.map +1 -1
  58. package/dist/pageComponents/LogoutPage.d.ts.map +1 -1
  59. package/dist/pageComponents/LogoutPage.js +5 -1
  60. package/dist/pageComponents/LogoutPage.js.map +1 -1
  61. package/dist/pageComponents/components/SelectChurchRegister.js +1 -1
  62. package/dist/pageComponents/components/SelectChurchRegister.js.map +1 -1
  63. package/dist/pageComponents/components/SelectChurchSearch.js.map +1 -1
  64. package/dist/pageComponents/components/SelectableChurch.js +1 -1
  65. package/dist/pageComponents/components/SelectableChurch.js.map +1 -1
  66. package/package.json +36 -36
  67. package/src/components/CreatePerson.tsx +4 -4
  68. package/src/components/FormCardPayment.tsx +5 -5
  69. package/src/components/gallery/GalleryModal.tsx +2 -2
  70. package/src/components/gallery/StockPhotos.tsx +4 -4
  71. package/src/components/header/PrimaryMenu.tsx +1 -1
  72. package/src/components/iconPicker/IconPicker.tsx +1 -1
  73. package/src/components/markdownEditor/Editor.tsx +1 -1
  74. package/src/components/markdownEditor/MarkdownModal.tsx +2 -2
  75. package/src/components/markdownEditor/plugins/customLink/FloatingLinkEditor.tsx +1 -1
  76. package/src/components/markdownEditor/plugins/emoji/EmojiNode.tsx +1 -1
  77. package/src/components/markdownEditor/plugins/emoji/EmojisPlugin.tsx +1 -1
  78. package/src/components/reporting/ReportFilter.tsx +1 -1
  79. package/src/components/reporting/ReportOutput.tsx +3 -3
  80. package/src/components/reporting/ReportWithFilter.tsx +2 -2
  81. package/src/components/reporting/TableReport.tsx +3 -3
  82. package/src/components/reporting/TreeReport.tsx +6 -6
  83. package/src/components/wrapper/ChurchList.tsx +1 -1
  84. package/src/components/wrapper/Notifications.tsx +1 -1
  85. package/src/components/wrapper/PrivateMessages.tsx +1 -1
  86. package/src/components/wrapper/SiteWrapper.tsx +1 -1
  87. package/src/components/wrapper/UserMenu.tsx +11 -3
  88. package/src/donationComponents/DonationPage.tsx +3 -3
  89. package/src/donationComponents/components/BankForm.tsx +6 -6
  90. package/src/donationComponents/components/CardForm.tsx +2 -2
  91. package/src/donationComponents/components/DonationForm.tsx +5 -5
  92. package/src/donationComponents/components/FundDonation.tsx +2 -2
  93. package/src/donationComponents/components/NonAuthDonationInner.tsx +8 -8
  94. package/src/donationComponents/components/PaymentMethods.tsx +1 -1
  95. package/src/donationComponents/components/RecurringDonations.tsx +3 -3
  96. package/src/donationComponents/components/RecurringDonationsEdit.tsx +2 -2
  97. package/src/pageComponents/LoginPage.tsx +17 -4
  98. package/src/pageComponents/LogoutPage.tsx +10 -2
  99. package/src/pageComponents/components/SelectChurchRegister.tsx +4 -4
  100. package/src/pageComponents/components/SelectChurchSearch.tsx +1 -1
  101. package/src/pageComponents/components/SelectableChurch.tsx +2 -2
@@ -25,7 +25,7 @@ export const ReportOutput = (props: Props) => {
25
25
  const isMounted = useMountedState();
26
26
 
27
27
  const handlePrint = useReactToPrint({
28
- content: () => contentRef.current
28
+ contentRef
29
29
  })
30
30
 
31
31
  const populatePeople = async (data: any[]) => {
@@ -127,7 +127,7 @@ export const ReportOutput = (props: Props) => {
127
127
  React.useEffect(runReport, [props.report, isMounted]);
128
128
 
129
129
  const getEditContent = () => {
130
- const result: JSX.Element[] = [];
130
+ const result: React.ReactElement[] = [];
131
131
 
132
132
  if (reportResult) {
133
133
  result.push(<button type="button" className="no-default-style" key={result.length - 2} onClick={handlePrint} title="print"><Icon>print</Icon></button>);
@@ -139,7 +139,7 @@ export const ReportOutput = (props: Props) => {
139
139
  }
140
140
 
141
141
  const getOutputs = () => {
142
- const result: JSX.Element[] = [];
142
+ const result: React.ReactElement[] = [];
143
143
  reportResult.outputs.forEach(o => {
144
144
  if (o.outputType === "table") result.push(<TableReport key={o.outputType} reportResult={reportResult} output={o} />)
145
145
  if (o.outputType === "tree") result.push(<TreeReport key={o.outputType} reportResult={reportResult} output={o} />)
@@ -61,10 +61,10 @@ export const ReportWithFilter = (props: Props) => {
61
61
  if (!checkAccess()) return <></>
62
62
  else {
63
63
  return (<Grid container spacing={3}>
64
- <Grid item md={8} xs={12}>
64
+ <Grid size={{ xs: 12, md: 8 }}>
65
65
  <ReportOutput keyName={props.keyName} report={reportToRun} />
66
66
  </Grid>
67
- <Grid item md={4} xs={12}>
67
+ <Grid size={{ xs: 12, md: 4 }}>
68
68
  <ReportFilter report={report} onChange={handleChange} onRun={handleRun} />
69
69
  </Grid>
70
70
  </Grid>)
@@ -10,7 +10,7 @@ interface Props { reportResult: ReportResultInterface, output: ReportOutputInter
10
10
  export const TableReport = (props: Props) => {
11
11
 
12
12
  const getHeaders = () => {
13
- const result: JSX.Element[] = []
13
+ const result: React.ReactElement[] = []
14
14
  props.output.columns.forEach((c, i) => {
15
15
  result.push(<TableCell key={i} style={{fontWeight:"bold"}}>{c.header}</TableCell>);
16
16
  })
@@ -18,9 +18,9 @@ export const TableReport = (props: Props) => {
18
18
  }
19
19
 
20
20
  const getRows = () => {
21
- const result: JSX.Element[] = []
21
+ const result: React.ReactElement[] = []
22
22
  props.reportResult.table.forEach(d => {
23
- const row: JSX.Element[] = [];
23
+ const row: React.ReactElement[] = [];
24
24
  props.output.columns.forEach(c => {
25
25
  row.push(<TableCell>{ReportHelper.getField(c, d)}</TableCell>);
26
26
  })
@@ -18,7 +18,7 @@ export const TreeReport = (props: Props) => {
18
18
  let totalGroupings = getPreviousGroupingCount(props.output.groupings.length);
19
19
 
20
20
  const getHeaders = () => {
21
- const result: JSX.Element[] = []
21
+ const result: React.ReactElement[] = []
22
22
  const columns = props.output.columns;
23
23
  for (let i = totalGroupings; i < columns.length; i++) {
24
24
  const c = columns[i];
@@ -29,12 +29,12 @@ export const TreeReport = (props: Props) => {
29
29
  }
30
30
 
31
31
  const getRows = () => {
32
- const result: JSX.Element[] = []
32
+ const result: React.ReactElement[] = []
33
33
  const columns = props.output.columns;
34
34
  let previousData = {}
35
35
  props.reportResult.table.forEach(d => {
36
- const row: JSX.Element[] = [];
37
- const groupingRows: JSX.Element[] = getGroupingRows(previousData, d);
36
+ const row: React.ReactElement[] = [];
37
+ const groupingRows: React.ReactElement[] = getGroupingRows(previousData, d);
38
38
  groupingRows.forEach(gr => result.push(gr));
39
39
  for (let i = totalGroupings; i < columns.length; i++) {
40
40
  const c = columns[i];
@@ -48,7 +48,7 @@ export const TreeReport = (props: Props) => {
48
48
  }
49
49
 
50
50
  const getGroupingRows = (previousData: any, data: any) => {
51
- const result: JSX.Element[] = [];
51
+ const result: React.ReactElement[] = [];
52
52
  let firstGroupModified = getFirstGroupModified(previousData, data);
53
53
  for (let i = firstGroupModified; i <= props.output.groupings.length; i++) {
54
54
  result.push(getGroupingRow(data, i))
@@ -59,7 +59,7 @@ export const TreeReport = (props: Props) => {
59
59
  const getGroupingRow = (row: any, groupNumber: number) => {
60
60
  const g = props.output.groupings[groupNumber];
61
61
  const prevCols = getPreviousGroupingCount(groupNumber);
62
- const outputRow: JSX.Element[] = [];
62
+ const outputRow: React.ReactElement[] = [];
63
63
  for (let i = prevCols; i < prevCols + g; i++) {
64
64
  const c = props.output.columns[i];
65
65
  const className = "heading" + (groupNumber + 1);
@@ -24,7 +24,7 @@ export const ChurchList: React.FC<Props> = props => {
24
24
  }
25
25
  }
26
26
 
27
- let result: JSX.Element[] = [];
27
+ let result: React.ReactElement[] = [];
28
28
  userChurches.forEach(uc => {
29
29
  const userChurch = uc;
30
30
  const churchName = uc.church.name;
@@ -53,7 +53,7 @@ export const Notifications: React.FC<Props> = (props) => {
53
53
  }
54
54
 
55
55
  const getMainLinks = () => {
56
- let result: JSX.Element[] = [];
56
+ let result: React.ReactElement[] = [];
57
57
  notifications.forEach(notification => {
58
58
  let datePosted = new Date(notification.timeSent);
59
59
  const displayDuration = DateHelper.getDisplayDuration(datePosted);
@@ -44,7 +44,7 @@ export const PrivateMessages: React.FC<Props> = (props) => {
44
44
  React.useEffect(() => { console.log("RELOADED PMS") }, []);
45
45
 
46
46
  const getMainLinks = () => {
47
- let result: JSX.Element[] = [];
47
+ let result: React.ReactElement[] = [];
48
48
  privateMessages.forEach(pm => {
49
49
 
50
50
  const person = pm.person;
@@ -10,7 +10,7 @@ import { SocketHelper } from "../../helpers/SocketHelper";
10
10
  import { ClosedDrawer, ClosedDrawerAppBar, OpenDrawer, OpenDrawerAppBar } from "./Drawers";
11
11
 
12
12
  interface Props {
13
- navContent: JSX.Element,
13
+ navContent: React.ReactElement,
14
14
  context: UserContextInterface,
15
15
  children: React.ReactNode,
16
16
  appName: string,
@@ -12,7 +12,7 @@ import { TabPanel } from "../TabPanel";
12
12
  import { Locale } from "../../helpers";
13
13
  import { PrivateMessages } from "./PrivateMessages";
14
14
  import { Notifications } from "./Notifications";
15
- import { useCookies } from "react-cookie";
15
+ import { useCookies, CookiesProvider } from "react-cookie";
16
16
 
17
17
 
18
18
  interface Props {
@@ -27,7 +27,7 @@ interface Props {
27
27
  onNavigate: (url: string) => void;
28
28
  }
29
29
 
30
- export const UserMenu: React.FC<Props> = (props) => {
30
+ const UserMenuContent: React.FC<Props> = (props) => {
31
31
  const userName = props.userName;
32
32
  const [anchorEl, setAnchorEl] = React.useState<null | HTMLElement>(null);
33
33
  const [showPM, setShowPM] = React.useState(false);
@@ -55,7 +55,7 @@ export const UserMenu: React.FC<Props> = (props) => {
55
55
  const getMainLinks = () => {
56
56
  const jwt = ApiHelper.getConfig("MembershipApi").jwt;
57
57
  const churchId = UserHelper.currentUserChurch.church.id;
58
- let result: JSX.Element[] = [];
58
+ let result: React.ReactElement[] = [];
59
59
 
60
60
 
61
61
  result.push(<NavItem onClick={() => {setShowPM(true)}} label={Locale.label("wrapper.messages")} icon="mail" key="/messages" onNavigate={props.onNavigate} badgeCount={props.notificationCounts.pmCount} />);
@@ -151,3 +151,11 @@ export const UserMenu: React.FC<Props> = (props) => {
151
151
  </>
152
152
  );
153
153
  };
154
+
155
+ export const UserMenu: React.FC<Props> = (props) => {
156
+ return (
157
+ <CookiesProvider defaultSetOptions={{ path: '/' }}>
158
+ <UserMenuContent {...props} />
159
+ </CookiesProvider>
160
+ );
161
+ };
@@ -94,7 +94,7 @@ export const DonationPage: React.FC<Props> = (props) => {
94
94
  }
95
95
 
96
96
  const getEditContent = () => {
97
- const result: JSX.Element[] = [];
97
+ const result: React.ReactElement[] = [];
98
98
  const date = new Date();
99
99
  const currentY = date.getFullYear();
100
100
  const lastY = date.getFullYear() - 1;
@@ -139,7 +139,7 @@ export const DonationPage: React.FC<Props> = (props) => {
139
139
  }
140
140
 
141
141
  const getRows = () => {
142
- let rows: JSX.Element[] = [];
142
+ let rows: React.ReactElement[] = [];
143
143
 
144
144
  if (donations.length === 0) {
145
145
  rows.push(<TableRow key="0"><TableCell>{Locale.label("donation.page.willAppear")}</TableCell></TableRow>);
@@ -162,7 +162,7 @@ export const DonationPage: React.FC<Props> = (props) => {
162
162
  }
163
163
 
164
164
  const getTableHeader = () => {
165
- const rows: JSX.Element[] = []
165
+ const rows: React.ReactElement[] = []
166
166
 
167
167
  if (donations.length > 0) {
168
168
  rows.push(
@@ -107,10 +107,10 @@ export const BankForm: React.FC<Props> = (props) => {
107
107
  return (<>
108
108
  <p>{Locale.label("donation.bankForm.twoDeposits")}</p>
109
109
  <Grid container columnSpacing={2}>
110
- <Grid item md={6} xs={12}>
110
+ <Grid size={{ xs: 12, md: 6 }}>
111
111
  <TextField fullWidth aria-label="amount1" label={Locale.label("donation.bankForm.firstDeposit")} name="amount1" placeholder="00" inputProps={{ maxLength: 2 }} onChange={handleVerify} onKeyPress={handleKeyPress} />
112
112
  </Grid>
113
- <Grid item md={6} xs={12}>
113
+ <Grid size={{ xs: 12, md: 6 }}>
114
114
  <TextField fullWidth aria-label="amount2" label={Locale.label("donation.bankForm.secondDeposit")} name="amount2" placeholder="00" inputProps={{ maxLength: 2 }} onChange={handleVerify} onKeyPress={handleKeyPress} />
115
115
  </Grid>
116
116
  </Grid>
@@ -120,20 +120,20 @@ export const BankForm: React.FC<Props> = (props) => {
120
120
  let accountDetails = <></>
121
121
  if (!props.bank.id) accountDetails = (
122
122
  <Grid container spacing={3}>
123
- <Grid item md={6} xs={12} style={{ marginBottom: "20px" }}>
123
+ <Grid size={{ xs: 12, md: 6 }} style={{ marginBottom: "20px" }}>
124
124
  <TextField fullWidth label={Locale.label("donation.bankForm.routingNumber")} type="number" name="routing_number" aria-label="routing-number" placeholder="Routing Number" className="form-control" onChange={handleChange} />
125
125
  </Grid>
126
- <Grid item md={6} xs={12} style={{ marginBottom: "20px" }}>
126
+ <Grid size={{ xs: 12, md: 6 }} style={{ marginBottom: "20px" }}>
127
127
  <TextField fullWidth label={Locale.label("donation.bankForm.accountNumber")} type="number" name="account_number" aria-label="account-number" placeholder="Account Number" className="form-control" onChange={handleChange} />
128
128
  </Grid>
129
129
  </Grid>
130
130
  );
131
131
  return (<>
132
132
  <Grid container spacing={3}>
133
- <Grid item md={6} xs={12} style={{ marginBottom: "20px" }}>
133
+ <Grid size={{ xs: 12, md: 6 }} style={{ marginBottom: "20px" }}>
134
134
  <TextField fullWidth label="Account Holder Name" name="account_holder_name" required aria-label="account-holder-name" placeholder="Account Holder Name" value={bankAccount.account_holder_name} className="form-control" onChange={handleChange} />
135
135
  </Grid>
136
- <Grid item md={6} xs={12} style={{ marginBottom: "20px" }}>
136
+ <Grid size={{ xs: 12, md: 6 }} style={{ marginBottom: "20px" }}>
137
137
  <FormControl fullWidth>
138
138
  <InputLabel>{Locale.label("donation.bankForm.name")}</InputLabel>
139
139
  <Select label={Locale.label("donation.bankForm.name")} name="account_holder_type" aria-label="account-holder-type" value={bankAccount.account_holder_type} onChange={handleChange}>
@@ -91,10 +91,10 @@ export const CardForm: React.FC<Props> = (props) => {
91
91
  {!props.card.id
92
92
  ? <CardElement options={formStyling} />
93
93
  : <Grid container spacing={3}>
94
- <Grid item md={6} xs={12}>
94
+ <Grid size={{ xs: 12, md: 6 }}>
95
95
  <TextField fullWidth aria-label="card-exp-month" label={Locale.label("donation.cardForm.expirationMonth")} name="exp_month" value={cardUpdate.cardData.card.exp_month} placeholder="MM" inputProps={{ maxLength: 2 }} onChange={handleChange} onKeyPress={handleKeyPress} />
96
96
  </Grid>
97
- <Grid item md={6} xs={12}>
97
+ <Grid size={{ xs: 12, md: 6 }}>
98
98
  <TextField fullWidth aria-label="card-exp-year" label={Locale.label("donation.cardForm.expirationYear")} name="exp_year" value={cardUpdate.cardData.card.exp_year} placeholder="YY" inputProps={{ maxLength: 2 }} onChange={handleChange} onKeyPress={handleKeyPress} />
99
99
  </Grid>
100
100
  </Grid>
@@ -189,17 +189,17 @@ export const DonationForm: React.FC<Props> = (props) => {
189
189
  <DonationPreviewModal show={showDonationPreviewModal} onHide={() => setShowDonationPreviewModal(false)} handleDonate={makeDonation} donation={donation} donationType={donationType} payFee={payFee} paymentMethodName={paymentMethodName} funds={funds} />
190
190
  <InputBox id="donationBox" aria-label="donation-box" headerIcon="volunteer_activism" headerText={Locale.label("donation.donationForm.donate")} ariaLabelSave="save-button" cancelFunction={donationType ? handleCancel : undefined} saveFunction={donationType ? handleSave : undefined} saveText={Locale.label("donation.donationForm.preview")}>
191
191
  <Grid container spacing={3}>
192
- <Grid item md={6} xs={12}>
192
+ <Grid size={{ xs: 12, md: 6 }}>
193
193
  <Button aria-label="single-donation" size="small" fullWidth style={{ minHeight: "50px" }} variant={donationType === "once" ? "contained" : "outlined"} onClick={() => handleDonationSelect("once")}>{Locale.label("donation.donationForm.make")}</Button>
194
194
  </Grid>
195
- <Grid item md={6} xs={12}>
195
+ <Grid size={{ xs: 12, md: 6 }}>
196
196
  <Button aria-label="recurring-donation" size="small" fullWidth style={{ minHeight: "50px" }} variant={donationType === "recurring" ? "contained" : "outlined"} onClick={() => handleDonationSelect("recurring")}>{Locale.label("donation.donationForm.makeRecurring")}</Button>
197
197
  </Grid>
198
198
  </Grid>
199
199
  {donationType
200
200
  && <div style={{ marginTop: "20px" }}>
201
201
  <Grid container spacing={3}>
202
- <Grid item md={12} xs={12}>
202
+ <Grid size={12}>
203
203
  <FormControl fullWidth>
204
204
  <InputLabel>{Locale.label("donation.donationForm.method")}</InputLabel>
205
205
  <Select label={Locale.label("donation.donationForm.method")} name="method" aria-label="method" value={donation.id} className="capitalize" onChange={handleChange}>
@@ -210,10 +210,10 @@ export const DonationForm: React.FC<Props> = (props) => {
210
210
  </Grid>
211
211
  {donationType === "recurring"
212
212
  && <Grid container spacing={3} style={{marginTop:10}}>
213
- <Grid item md={6} xs={12}>
213
+ <Grid size={{ xs: 12, md: 6 }}>
214
214
  <TextField fullWidth name="date" type="date" aria-label="date" label={Locale.label("donation.donationForm.startDate")} value={DateHelper.formatHtml5Date(new Date(donation.billing_cycle_anchor))} onChange={handleChange} onKeyDown={handleKeyDown} />
215
215
  </Grid>
216
- <Grid item md={6} xs={12}>
216
+ <Grid size={{ xs: 12, md: 6 }}>
217
217
  <FormControl fullWidth>
218
218
  <InputLabel>{Locale.label("donation.donationForm.frequency")}</InputLabel>
219
219
  <Select label={Locale.label("donation.donationForm.frequency")} name="interval" aria-label="interval" value={interval} onChange={handleChange}>
@@ -40,10 +40,10 @@ export const FundDonation: React.FC<Props> = (props) => {
40
40
  return (
41
41
  <>
42
42
  <Grid container spacing={3}>
43
- <Grid item md={6} xs={12}>
43
+ <Grid size={{ xs: 12, md: 6 }}>
44
44
  <TextField fullWidth name="amount" label={Locale.label("donation.fundDonations.amount")} type="number" disabled={props.params?.amount && props.params.amount !== ""} aria-label="amount" lang="en-150" value={props.fundDonation.amount || ""} onChange={handleChange} />
45
45
  </Grid>
46
- <Grid item md={6} xs={12}>
46
+ <Grid size={{ xs: 12, md: 6 }}>
47
47
  <FormControl fullWidth>
48
48
  <InputLabel>{Locale.label("donation.fundDonations.fund")}</InputLabel>
49
49
  <Select fullWidth label={Locale.label("donation.fundDonations.fund")} name="fund" aria-label="fund" value={props.fundDonation.fundId} onChange={handleChange}>
@@ -234,22 +234,22 @@ export const NonAuthDonationInner: React.FC<Props> = ({ mainContainerCssProps, s
234
234
  <InputBox headerIcon={showHeader ? "volunteer_activism" : ""} headerText={showHeader ? "Donate" : ""} saveFunction={handleSave} saveText="Donate" isSubmitting={processing || !captchaResponse || captchaResponse === "robot"} mainContainerCssProps={mainContainerCssProps}>
235
235
  <ErrorMessages errors={errors} />
236
236
  <Grid container spacing={3}>
237
- <Grid item md={6} xs={12}>
237
+ <Grid size={{ xs: 12, md: 6 }}>
238
238
  <Button aria-label="single-donation" size="small" fullWidth style={{ minHeight: "50px" }} variant={donationType === "once" ? "contained" : "outlined"} onClick={() => setDonationType("once")}>{Locale.label("donation.donationForm.make")}</Button>
239
239
  </Grid>
240
- <Grid item md={6} xs={12}>
240
+ <Grid size={{ xs: 12, md: 6 }}>
241
241
  <Button aria-label="recurring-donation" size="small" fullWidth style={{ minHeight: "50px" }} variant={donationType === "recurring" ? "contained" : "outlined"} onClick={() => setDonationType("recurring")}>{Locale.label("donation.donationForm.makeRecurring")}</Button>
242
242
  </Grid>
243
- <Grid item md={6} xs={12}>
243
+ <Grid size={{ xs: 12, md: 6 }}>
244
244
  <TextField fullWidth label={Locale.label("person.firstName")} name="firstName" value={firstName} onChange={handleChange} />
245
245
  </Grid>
246
- <Grid item md={6} xs={12}>
246
+ <Grid size={{ xs: 12, md: 6 }}>
247
247
  <TextField fullWidth label={Locale.label("person.lastName")} name="lastName" value={lastName} onChange={handleChange} />
248
248
  </Grid>
249
- <Grid item md={6} xs={12}>
249
+ <Grid size={{ xs: 12, md: 6 }}>
250
250
  <TextField fullWidth label={Locale.label("person.email")} name="email" value={email} onChange={handleChange} />
251
251
  </Grid>
252
- <Grid item md={6} xs={12}>
252
+ <Grid size={{ xs: 12, md: 6 }}>
253
253
  <ReCAPTCHA sitekey={props.recaptchaSiteKey} ref={captchaRef} onChange={handleCaptchaChange} />
254
254
  </Grid>
255
255
  </Grid>
@@ -258,7 +258,7 @@ export const NonAuthDonationInner: React.FC<Props> = ({ mainContainerCssProps, s
258
258
  </div>
259
259
  {donationType === "recurring"
260
260
  && <Grid container spacing={3} style={{ marginTop: 0 }}>
261
- <Grid item md={6} xs={12}>
261
+ <Grid size={{ xs: 12, md: 6 }}>
262
262
  <FormControl fullWidth>
263
263
  <InputLabel>{Locale.label("donation.donationForm.frequency")}</InputLabel>
264
264
  <Select label="Frequency" name="interval" aria-label="interval" value={interval} onChange={(e) => { setInterval(e.target.value) }}>
@@ -270,7 +270,7 @@ export const NonAuthDonationInner: React.FC<Props> = ({ mainContainerCssProps, s
270
270
  </Select>
271
271
  </FormControl>
272
272
  </Grid>
273
- <Grid item md={6} xs={12}>
273
+ <Grid size={{ xs: 12, md: 6 }}>
274
274
  <TextField fullWidth name="startDate" type="date" aria-label="startDate" label={Locale.label("donation.donationForm.startDate")} value={DateHelper.formatHtml5Date(new Date(startDate))} onChange={handleChange} />
275
275
  </Grid>
276
276
  </Grid>
@@ -87,7 +87,7 @@ export const PaymentMethods: React.FC<Props> = (props) => {
87
87
  const getPMIcon = (type: string) => (type === "card" ? <Icon>credit_card</Icon> : <Icon>account_balance</Icon>)
88
88
 
89
89
  const getPaymentRows = () => {
90
- let rows: JSX.Element[] = [];
90
+ let rows: React.ReactElement[] = [];
91
91
 
92
92
  props.paymentMethods.forEach((method: StripePaymentMethod) => {
93
93
  rows.push(
@@ -53,7 +53,7 @@ export const RecurringDonations: React.FC<Props> = (props) => {
53
53
  }
54
54
 
55
55
  const getFunds = (subscription: SubscriptionInterface) => {
56
- let result: JSX.Element[] = [];
56
+ let result: React.ReactElement[] = [];
57
57
  subscription.funds.forEach((fund: any) => {
58
58
  result.push(
59
59
  <div key={subscription.id + fund.id}>
@@ -76,13 +76,13 @@ export const RecurringDonations: React.FC<Props> = (props) => {
76
76
  }
77
77
 
78
78
  const getTableHeader = () => {
79
- let result: JSX.Element[] = [];
79
+ let result: React.ReactElement[] = [];
80
80
  result.push(<TableRow key="header" sx={{textAlign: "left"}}><TableCell><b>{Locale.label("donation.recurring.startDate")}</b></TableCell><TableCell><b>{Locale.label("donation.recurring.amount")}</b></TableCell><TableCell><b>{Locale.label("donation.recurring.interval")}</b></TableCell><TableCell><b>{Locale.label("donation.recurring.paymentMethod")}</b></TableCell>{props?.paymentMethods?.length > 0 && <TableCell></TableCell>}</TableRow>);
81
81
  return result;
82
82
  }
83
83
 
84
84
  const getTableRows = () => {
85
- let rows: JSX.Element[] = [];
85
+ let rows: React.ReactElement[] = [];
86
86
 
87
87
  subscriptions.forEach((sub: any) => {
88
88
  rows.push(
@@ -56,7 +56,7 @@ export const RecurringDonationsEdit: React.FC<Props> = (props) => {
56
56
  const getFields = () => (
57
57
  <>
58
58
  <Grid container spacing={3}>
59
- <Grid item md={6} xs={12}>
59
+ <Grid size={{ xs: 12, md: 6 }}>
60
60
  <FormControl fullWidth>
61
61
  <InputLabel>{Locale.label("donation.donationForm.method")}</InputLabel>
62
62
  <Select label={Locale.label("donation.donationForm.method")} name="method" aria-label="method" value={editSubscription.default_payment_method || editSubscription.default_source} className="capitalize" onChange={handleChange}>
@@ -64,7 +64,7 @@ export const RecurringDonationsEdit: React.FC<Props> = (props) => {
64
64
  </Select>
65
65
  </FormControl>
66
66
  </Grid>
67
- <Grid item md={6} xs={12}>
67
+ <Grid size={{ xs: 12, md: 6 }}>
68
68
  <FormControl fullWidth>
69
69
  <InputLabel>{Locale.label("donation.donationForm.frequency")}</InputLabel>
70
70
  <Select label={Locale.label("donation.donationForm.frequency")} name="interval" aria-label="interval" value={interval} onChange={handleChange}>
@@ -4,8 +4,8 @@ import * as React from "react";
4
4
  import { ErrorMessages, FloatingSupport, Loading } from "../components";
5
5
  import { LoginResponseInterface, UserContextInterface, ChurchInterface, UserInterface, LoginUserChurchInterface } from "@churchapps/helpers";
6
6
  import { AnalyticsHelper, ApiHelper, ArrayHelper, Locale, UserHelper } from "../helpers";
7
- import { useCookies } from "react-cookie"
8
- import jwt_decode from "jwt-decode"
7
+ import { useCookies, CookiesProvider } from "react-cookie"
8
+ import { jwtDecode } from "jwt-decode"
9
9
  import { Register } from "./components/Register"
10
10
  import { SelectChurchModal } from "./components/SelectChurchModal"
11
11
  import { Forgot } from "./components/Forgot";
@@ -35,7 +35,7 @@ interface Props {
35
35
  handleRedirect?: (url: string) => void; // Function to handle redirects from parent component
36
36
  }
37
37
 
38
- export const LoginPage: React.FC<Props> = ({ showLogo = true, loginContainerCssProps, ...props }) => {
38
+ const LoginPageContent: React.FC<Props> = ({ showLogo = true, loginContainerCssProps, ...props }) => {
39
39
  const [welcomeBackName, setWelcomeBackName] = React.useState("");
40
40
  const [pendingAutoLogin, setPendingAutoLogin] = React.useState(false);
41
41
  const [errors, setErrors] = React.useState([]);
@@ -97,7 +97,7 @@ export const LoginPage: React.FC<Props> = ({ showLogo = true, loginContainerCssP
97
97
  UserHelper.user = resp.user;
98
98
 
99
99
  if (props.jwt) {
100
- const decoded: any = jwt_decode(userJwtBackup)
100
+ const decoded: any = jwtDecode(userJwtBackup)
101
101
  selectedChurchId = decoded.churchId
102
102
  }
103
103
 
@@ -269,3 +269,16 @@ export const LoginPage: React.FC<Props> = ({ showLogo = true, loginContainerCssP
269
269
  );
270
270
 
271
271
  };
272
+
273
+ export const LoginPage: React.FC<Props> = (props) => {
274
+ // Try to detect if CookiesProvider is available
275
+ const CookiesContext = React.createContext(null);
276
+ const context = React.useContext(CookiesContext);
277
+
278
+ // Always wrap with CookiesProvider to ensure context is available
279
+ return (
280
+ <CookiesProvider defaultSetOptions={{ path: '/' }}>
281
+ <LoginPageContent {...props} />
282
+ </CookiesProvider>
283
+ );
284
+ };
@@ -1,12 +1,12 @@
1
1
  "use client";
2
2
 
3
3
  import React from "react";
4
- import { useCookies } from "react-cookie"
4
+ import { useCookies, CookiesProvider } from "react-cookie"
5
5
  import { ApiHelper, UserContextInterface } from "../helpers";
6
6
 
7
7
  interface Props { context?: UserContextInterface, handleRedirect?: (url: string) => void }
8
8
 
9
- export const LogoutPage: React.FC<Props> = (props) => {
9
+ const LogoutPageContent: React.FC<Props> = (props) => {
10
10
  const [, , removeCookie] = useCookies(["jwt", "email", "name", "lastChurchId"]);
11
11
 
12
12
  removeCookie("jwt");
@@ -33,3 +33,11 @@ export const LogoutPage: React.FC<Props> = (props) => {
33
33
  }, 300);
34
34
  return null;
35
35
  }
36
+
37
+ export const LogoutPage: React.FC<Props> = (props) => {
38
+ return (
39
+ <CookiesProvider defaultSetOptions={{ path: '/' }}>
40
+ <LogoutPageContent {...props} />
41
+ </CookiesProvider>
42
+ );
43
+ }
@@ -73,12 +73,12 @@ export const SelectChurchRegister: React.FC<Props> = (props) => {
73
73
 
74
74
  <TextField required fullWidth name="address1" label={Locale.label("selectChurch.address1")} value={church.address1} onChange={handleChange} />
75
75
  <Grid container spacing={3}>
76
- <Grid item xs={6}><TextField fullWidth name="address2" label={Locale.label("selectChurch.address2")} value={church.address2} onChange={handleChange} /></Grid>
77
- <Grid item xs={6}><TextField required fullWidth name="city" label={Locale.label("selectChurch.city")} value={church.city} onChange={handleChange} /></Grid>
76
+ <Grid size={6}><TextField fullWidth name="address2" label={Locale.label("selectChurch.address2")} value={church.address2} onChange={handleChange} /></Grid>
77
+ <Grid size={6}><TextField required fullWidth name="city" label={Locale.label("selectChurch.city")} value={church.city} onChange={handleChange} /></Grid>
78
78
  </Grid>
79
79
  <Grid container spacing={3}>
80
- <Grid item xs={6}><TextField required fullWidth name="state" label={Locale.label("selectChurch.state")} value={church.state} onChange={handleChange} /></Grid>
81
- <Grid item xs={6}><TextField required fullWidth name="zip" label={Locale.label("selectChurch.zip")} value={church.zip} onChange={handleChange} /></Grid>
80
+ <Grid size={6}><TextField required fullWidth name="state" label={Locale.label("selectChurch.state")} value={church.state} onChange={handleChange} /></Grid>
81
+ <Grid size={6}><TextField required fullWidth name="zip" label={Locale.label("selectChurch.zip")} value={church.zip} onChange={handleChange} /></Grid>
82
82
  </Grid>
83
83
  <TextField required fullWidth name="country" label={Locale.label("selectChurch.country")} value={church.country} onChange={handleChange} />
84
84
  </InputBox>
@@ -44,7 +44,7 @@ export const SelectChurchSearch: React.FC<Props> = (props) => {
44
44
  )
45
45
 
46
46
  const getChurches = () => {
47
- const result: JSX.Element[] = [];
47
+ const result: React.ReactElement[] = [];
48
48
  churches.forEach(church => {
49
49
  result.push(<SelectableChurch church={church} selectChurch={props.selectChurch} />);
50
50
  });
@@ -19,12 +19,12 @@ export const SelectableChurch: React.FC<Props> = (props) => {
19
19
  }
20
20
  return (
21
21
  <Grid container spacing={3}>
22
- <Grid item md={6} xs={12}>
22
+ <Grid size={{ xs: 12, md: 6 }}>
23
23
  <a href="about:blank" style={{ fontSize: "1.125rem", display: "block", marginTop: 15, marginBottom: 15 }} onClick={(e) => { e.preventDefault(); props.selectChurch(props.church.id) }}>
24
24
  <img src={logo} alt="church logo" className="w-100 img-fluid" />
25
25
  </a>
26
26
  </Grid>
27
- <Grid item md={6} xs={12}>
27
+ <Grid size={{ xs: 12, md: 6 }}>
28
28
  <div>
29
29
  <a href="about:blank" style={{ fontSize: "1.125rem", display: "block" }} onClick={(e) => { e.preventDefault(); props.selectChurch(props.church.id) }}>{props.church.name}</a>
30
30
  {(props.church.address1) && <div>{props.church.address1}</div>}