@churchapps/apphelper 0.4.7 → 0.4.8

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/CHUMS_COMPONENT_EXTRACTION_CANDIDATES.md +210 -0
  2. package/COMPONENT_USAGE_REPORT.md +322 -0
  3. package/dist/components/header/SecondaryMenu.js +3 -3
  4. package/dist/components/header/SecondaryMenu.js.map +1 -1
  5. package/dist/components/index.d.ts +0 -2
  6. package/dist/components/index.d.ts.map +1 -1
  7. package/dist/components/index.js +1 -5
  8. package/dist/components/index.js.map +1 -1
  9. package/dist/helpers/FileHelper.d.ts +1 -1
  10. package/dist/helpers/FileHelper.d.ts.map +1 -1
  11. package/dist/helpers/FileHelper.js +2 -6
  12. package/dist/helpers/FileHelper.js.map +1 -1
  13. package/dist/index.d.ts +0 -1
  14. package/dist/index.d.ts.map +1 -1
  15. package/dist/index.js +0 -1
  16. package/dist/index.js.map +1 -1
  17. package/package.json +1 -1
  18. package/src/components/header/SecondaryMenu.tsx +3 -3
  19. package/src/components/index.tsx +0 -2
  20. package/src/helpers/FileHelper.ts +3 -6
  21. package/src/index.ts +0 -1
  22. package/dist/components/CreatePerson.d.ts +0 -15
  23. package/dist/components/CreatePerson.d.ts.map +0 -1
  24. package/dist/components/CreatePerson.js +0 -100
  25. package/dist/components/CreatePerson.js.map +0 -1
  26. package/dist/components/PersonAdd.d.ts +0 -16
  27. package/dist/components/PersonAdd.d.ts.map +0 -1
  28. package/dist/components/PersonAdd.js +0 -52
  29. package/dist/components/PersonAdd.js.map +0 -1
  30. package/dist/donationComponents/DonationPage.d.ts +0 -11
  31. package/dist/donationComponents/DonationPage.d.ts.map +0 -1
  32. package/dist/donationComponents/DonationPage.js +0 -150
  33. package/dist/donationComponents/DonationPage.js.map +0 -1
  34. package/dist/donationComponents/components/BankForm.d.ts +0 -14
  35. package/dist/donationComponents/components/BankForm.d.ts.map +0 -1
  36. package/dist/donationComponents/components/BankForm.js +0 -125
  37. package/dist/donationComponents/components/BankForm.js.map +0 -1
  38. package/dist/donationComponents/components/CardForm.d.ts +0 -13
  39. package/dist/donationComponents/components/CardForm.d.ts.map +0 -1
  40. package/dist/donationComponents/components/CardForm.js +0 -122
  41. package/dist/donationComponents/components/CardForm.js.map +0 -1
  42. package/dist/donationComponents/components/DonationForm.d.ts +0 -15
  43. package/dist/donationComponents/components/DonationForm.d.ts.map +0 -1
  44. package/dist/donationComponents/components/DonationForm.js +0 -200
  45. package/dist/donationComponents/components/DonationForm.js.map +0 -1
  46. package/dist/donationComponents/components/FundDonation.d.ts +0 -12
  47. package/dist/donationComponents/components/FundDonation.d.ts.map +0 -1
  48. package/dist/donationComponents/components/FundDonation.js +0 -32
  49. package/dist/donationComponents/components/FundDonation.js.map +0 -1
  50. package/dist/donationComponents/components/FundDonations.d.ts +0 -11
  51. package/dist/donationComponents/components/FundDonations.d.ts.map +0 -1
  52. package/dist/donationComponents/components/FundDonations.js +0 -33
  53. package/dist/donationComponents/components/FundDonations.js.map +0 -1
  54. package/dist/donationComponents/components/NonAuthDonation.d.ts +0 -12
  55. package/dist/donationComponents/components/NonAuthDonation.d.ts.map +0 -1
  56. package/dist/donationComponents/components/NonAuthDonation.js +0 -27
  57. package/dist/donationComponents/components/NonAuthDonation.js.map +0 -1
  58. package/dist/donationComponents/components/NonAuthDonationInner.d.ts +0 -12
  59. package/dist/donationComponents/components/NonAuthDonationInner.d.ts.map +0 -1
  60. package/dist/donationComponents/components/NonAuthDonationInner.js +0 -276
  61. package/dist/donationComponents/components/NonAuthDonationInner.js.map +0 -1
  62. package/dist/donationComponents/components/PaymentMethods.d.ts +0 -14
  63. package/dist/donationComponents/components/PaymentMethods.d.ts.map +0 -1
  64. package/dist/donationComponents/components/PaymentMethods.js +0 -86
  65. package/dist/donationComponents/components/PaymentMethods.js.map +0 -1
  66. package/dist/donationComponents/components/RecurringDonations.d.ts +0 -10
  67. package/dist/donationComponents/components/RecurringDonations.d.ts.map +0 -1
  68. package/dist/donationComponents/components/RecurringDonations.js +0 -93
  69. package/dist/donationComponents/components/RecurringDonations.js.map +0 -1
  70. package/dist/donationComponents/components/RecurringDonationsEdit.d.ts +0 -11
  71. package/dist/donationComponents/components/RecurringDonationsEdit.d.ts.map +0 -1
  72. package/dist/donationComponents/components/RecurringDonationsEdit.js +0 -66
  73. package/dist/donationComponents/components/RecurringDonationsEdit.js.map +0 -1
  74. package/dist/donationComponents/components/index.d.ts +0 -10
  75. package/dist/donationComponents/components/index.d.ts.map +0 -1
  76. package/dist/donationComponents/components/index.js +0 -22
  77. package/dist/donationComponents/components/index.js.map +0 -1
  78. package/dist/donationComponents/index.d.ts +0 -4
  79. package/dist/donationComponents/index.d.ts.map +0 -1
  80. package/dist/donationComponents/index.js +0 -10
  81. package/dist/donationComponents/index.js.map +0 -1
  82. package/dist/donationComponents/modals/DonationPreviewModal.d.ts +0 -15
  83. package/dist/donationComponents/modals/DonationPreviewModal.d.ts.map +0 -1
  84. package/dist/donationComponents/modals/DonationPreviewModal.js +0 -33
  85. package/dist/donationComponents/modals/DonationPreviewModal.js.map +0 -1
  86. package/src/components/CreatePerson.tsx +0 -135
  87. package/src/components/PersonAdd.tsx +0 -81
  88. package/src/donationComponents/DonationPage.tsx +0 -215
  89. package/src/donationComponents/components/BankForm.tsx +0 -161
  90. package/src/donationComponents/components/CardForm.tsx +0 -106
  91. package/src/donationComponents/components/DonationForm.tsx +0 -255
  92. package/src/donationComponents/components/FundDonation.tsx +0 -58
  93. package/src/donationComponents/components/FundDonations.tsx +0 -44
  94. package/src/donationComponents/components/NonAuthDonation.tsx +0 -33
  95. package/src/donationComponents/components/NonAuthDonationInner.tsx +0 -295
  96. package/src/donationComponents/components/PaymentMethods.tsx +0 -137
  97. package/src/donationComponents/components/RecurringDonations.tsx +0 -123
  98. package/src/donationComponents/components/RecurringDonationsEdit.tsx +0 -95
  99. package/src/donationComponents/components/index.tsx +0 -9
  100. package/src/donationComponents/index.ts +0 -3
  101. package/src/donationComponents/modals/DonationPreviewModal.tsx +0 -68
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,SAAS,CAAC"}
package/dist/index.js CHANGED
@@ -16,7 +16,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./helpers"), exports);
18
18
  __exportStar(require("./components"), exports);
19
- __exportStar(require("./donationComponents"), exports);
20
19
  __exportStar(require("@churchapps/helpers"), exports);
21
20
  __exportStar(require("./pageComponents"), exports);
22
21
  __exportStar(require("./hooks"), exports);
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,+CAA6B;AAC7B,uDAAqC;AACrC,sDAAoC;AACpC,mDAAiC;AACjC,0CAAwB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,+CAA6B;AAC7B,sDAAoC;AACpC,mDAAiC;AACjC,0CAAwB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@churchapps/apphelper",
3
- "version": "0.4.7",
3
+ "version": "0.4.8",
4
4
  "description": "Library of helper functions for React and NextJS ChurchApps",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -10,9 +10,9 @@ export const SecondaryMenu= (props:Props) => {
10
10
 
11
11
  const getItems = () => {
12
12
  const result:any[] = [];
13
- props.menuItems.forEach(item => {
14
- if (item.label === props.label) result.push(<Chip onClick={() => props.onNavigate(item.url)} label={item.label} component="a" variant="filled" clickable style={{backgroundColor:"var(--c1d2)", color:"#FFF", fontSize:16}} />);
15
- else result.push(<a href="about:blank" onClick={(e) => { e.preventDefault(); props.onNavigate(item.url) }} style={{ color:"#FFF", textDecoration: "none", marginLeft:10, marginRight:10}}>{item.label}</a>);
13
+ props.menuItems.forEach((item, index) => {
14
+ if (item.label === props.label) result.push(<Chip key={index} onClick={() => props.onNavigate(item.url)} label={item.label} component="a" variant="filled" clickable style={{backgroundColor:"var(--c1d2)", color:"#FFF", fontSize:16}} />);
15
+ else result.push(<a key={index} href="about:blank" onClick={(e) => { e.preventDefault(); props.onNavigate(item.url) }} style={{ color:"#FFF", textDecoration: "none", marginLeft:10, marginRight:10}}>{item.label}</a>);
16
16
  });
17
17
  return result;
18
18
  }
@@ -1,4 +1,3 @@
1
- export { CreatePerson } from "./CreatePerson";
2
1
  export { ErrorMessages } from "./ErrorMessages";
3
2
  export { ExportLink } from "./ExportLink";
4
3
  export { DisplayBox } from "./DisplayBox";
@@ -10,7 +9,6 @@ export { IconPicker } from "./iconPicker/IconPicker";
10
9
  export { InputBox } from "./InputBox";
11
10
  export { Loading } from "./Loading";
12
11
  export { Notes } from "./notes/Notes";
13
- export { PersonAdd } from "./PersonAdd";
14
12
  export { QuestionEdit } from "./QuestionEdit";
15
13
  export { SmallButton } from "./SmallButton";
16
14
  export { SupportModal } from "./SupportModal";
@@ -1,8 +1,8 @@
1
1
  import axios from "axios";
2
2
 
3
3
  export class FileHelper {
4
- static postPresignedFile = (presigned: any, uploadedFile: File, progressCallback: (percent: number) => void, axiosInstance?: any) => {
5
- const axiosToUse = axiosInstance || axios;
4
+
5
+ static postPresignedFile = (presigned: any, uploadedFile: File, progressCallback: (percent: number) => void) => {
6
6
  const formData = new FormData();
7
7
  //formData.append("key", presigned.key); //no longer needed with new aws sdk
8
8
  formData.append("acl", "public-read");
@@ -17,10 +17,7 @@ export class FileHelper {
17
17
  }
18
18
  };
19
19
 
20
- console.log("#10");
21
- console.log("axios: ", axiosToUse);
22
- console.log("axios tyeof: ", typeof axiosToUse.post);
23
- return axiosToUse.post(presigned.url, formData, axiosConfig);
20
+ return axios.post(presigned.url, formData, axiosConfig);
24
21
  };
25
22
 
26
23
  static dataURLtoBlob(dataurl: string) {
package/src/index.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  export * from "./helpers";
2
2
  export * from "./components";
3
- export * from "./donationComponents";
4
3
  export * from "@churchapps/helpers";
5
4
  export * from "./pageComponents";
6
5
  export * from "./hooks";
@@ -1,15 +0,0 @@
1
- import { PersonInterface } from "@churchapps/helpers";
2
- interface CommonProps {
3
- onCreate?: (person: PersonInterface) => void;
4
- }
5
- type ConditionalProps = {
6
- showInModal: true;
7
- onClose: () => void;
8
- } | {
9
- showInModal?: false;
10
- onClose?: never;
11
- };
12
- type Props = CommonProps & ConditionalProps;
13
- export declare function CreatePerson({ onCreate, showInModal, ...props }: Props): import("react/jsx-runtime").JSX.Element;
14
- export {};
15
- //# sourceMappingURL=CreatePerson.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CreatePerson.d.ts","sourceRoot":"","sources":["../../src/components/CreatePerson.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAe,eAAe,EAAsB,MAAM,qBAAqB,CAAC;AAKvF,UAAU,WAAW;IACpB,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;CAC7C;AAED,KAAK,gBAAgB,GAClB;IAAE,WAAW,EAAE,IAAI,CAAC;IAAC,OAAO,EAAE,MAAM,IAAI,CAAC;CAAE,GAC3C;IAAE,WAAW,CAAC,EAAE,KAAK,CAAC;IAAC,OAAO,CAAC,EAAE,KAAK,CAAC;CAAE,CAAA;AAE5C,KAAK,KAAK,GAAG,WAAW,GAAG,gBAAgB,CAAA;AAE3C,wBAAgB,YAAY,CAAC,EAAE,QAAoB,EAAE,WAAmB,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,2CAmH1F"}
@@ -1,100 +0,0 @@
1
- "use client";
2
- "use strict";
3
- var __importDefault = (this && this.__importDefault) || function (mod) {
4
- return (mod && mod.__esModule) ? mod : { "default": mod };
5
- };
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.CreatePerson = CreatePerson;
8
- const jsx_runtime_1 = require("react/jsx-runtime");
9
- const react_1 = __importDefault(require("react"));
10
- const helpers_1 = require("../helpers");
11
- const helpers_2 = require("@churchapps/helpers");
12
- const material_1 = require("@mui/material");
13
- const ErrorMessages_1 = require("./ErrorMessages");
14
- const useMountedState_1 = require("../hooks/useMountedState");
15
- function CreatePerson({ onCreate = () => { }, showInModal = false, ...props }) {
16
- const [person, setPerson] = react_1.default.useState({ name: { first: "", last: "" }, contactInfo: {} });
17
- const [errors, setErrors] = react_1.default.useState([]);
18
- const [isSubmitting, setIsSubmitting] = react_1.default.useState(false);
19
- const isMounted = (0, useMountedState_1.useMountedState)();
20
- const validate = () => {
21
- const result = [];
22
- if (!person.name?.first)
23
- result.push("Please enter a first name.");
24
- if (!person.name?.last)
25
- result.push("Please enter a last name.");
26
- setErrors(result);
27
- return result.length === 0;
28
- };
29
- const handleChange = (e) => {
30
- setErrors([]);
31
- const p = { ...person };
32
- let value = e.target.value;
33
- switch (e.target.name) {
34
- case "first":
35
- p.name.first = value;
36
- break;
37
- case "last":
38
- p.name.last = value;
39
- break;
40
- case "email":
41
- p.contactInfo.email = value;
42
- break;
43
- }
44
- setPerson(p);
45
- };
46
- const validateEmail = (email) => (/^\w+([.-]?\w+)*@\w+([.-]?\w+)*(.\w{2,3})+$/.test(email));
47
- const checkExistingEmail = async () => {
48
- const result = await helpers_1.ApiHelper.get("/people/search?email=" + person.contactInfo.email, "MembershipApi");
49
- return result[0];
50
- };
51
- const handleSave = () => {
52
- let household = { name: person.name.last };
53
- setIsSubmitting(true);
54
- helpers_1.ApiHelper.post("/households", [household], "MembershipApi").then(data => {
55
- household.id = data[0].id;
56
- person.householdId = household.id;
57
- person.name.display = [person.name.first, person.name.last].join(" ");
58
- helpers_1.ApiHelper.post("/people", [person], "MembershipApi").then(data => {
59
- person.id = data[0].id;
60
- onCreate(person);
61
- setPerson({ ...person, name: { first: "", last: "" }, contactInfo: { email: "" } });
62
- }).finally(() => {
63
- if (isMounted()) {
64
- setIsSubmitting(false);
65
- showInModal && props.onClose();
66
- }
67
- });
68
- });
69
- };
70
- async function handleSubmit() {
71
- if (validate()) {
72
- if (person.contactInfo.email && (person.contactInfo.email?.trim() !== undefined || person.contactInfo.email?.trim() !== "")) {
73
- if (!validateEmail(person.contactInfo.email)) {
74
- setErrors(["Please enter a valid email address."]);
75
- }
76
- else {
77
- const existingPerson = await checkExistingEmail();
78
- if (existingPerson) {
79
- if (window.confirm(`${existingPerson.name.display} already exists with an email of ${existingPerson.contactInfo.email}. Are you sure you wish to add ${person.name.first} ${person.name.last}?`)) {
80
- handleSave();
81
- }
82
- }
83
- else {
84
- handleSave();
85
- }
86
- }
87
- }
88
- else {
89
- handleSave();
90
- }
91
- }
92
- }
93
- if (!helpers_1.UserHelper.checkAccess(helpers_2.Permissions.membershipApi.people.edit))
94
- return null;
95
- if (showInModal) {
96
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ErrorMessages_1.ErrorMessages, { errors: errors }), (0, jsx_runtime_1.jsxs)(material_1.Dialog, { open: true, onClose: props.onClose, fullWidth: true, children: [(0, jsx_runtime_1.jsx)(material_1.DialogTitle, { children: helpers_1.Locale.label("createPerson.addNewPerson") }), (0, jsx_runtime_1.jsxs)(material_1.DialogContent, { children: [(0, jsx_runtime_1.jsx)(material_1.TextField, { margin: "dense", required: true, fullWidth: true, type: "text", "aria-label": "firstName", label: helpers_1.Locale.label("createPerson.firstName"), name: "first", value: person.name.first || "", onChange: handleChange, onKeyDown: (e) => e.key === "Enter" && handleSubmit }), (0, jsx_runtime_1.jsx)(material_1.TextField, { margin: "dense", required: true, fullWidth: true, type: "text", "aria-label": "lastName", label: helpers_1.Locale.label("createPerson.lastName"), name: "last", value: person.name.last || "", onChange: handleChange, onKeyDown: (e) => e.key === "Enter" && handleSubmit }), (0, jsx_runtime_1.jsx)(material_1.TextField, { margin: "dense", fullWidth: true, type: "text", "aria-label": "email", label: helpers_1.Locale.label("createPerson.email"), name: "email", value: person.contactInfo.email || "", onChange: handleChange, onKeyDown: (e) => e.key === "Enter" && handleSubmit })] }), (0, jsx_runtime_1.jsxs)(material_1.DialogActions, { children: [(0, jsx_runtime_1.jsx)(material_1.Button, { onClick: () => { props.onClose(); }, children: helpers_1.Locale.label("common.cancel") }), (0, jsx_runtime_1.jsx)(material_1.Button, { type: "submit", variant: "contained", disabled: isSubmitting, onClick: handleSubmit, children: helpers_1.Locale.label("common.add") })] })] })] }));
97
- }
98
- return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("p", { className: "pl-1 mb-3 text-dark", children: (0, jsx_runtime_1.jsx)("b", { children: helpers_1.Locale.label("createPerson.addNewPerson") }) }), (0, jsx_runtime_1.jsx)(ErrorMessages_1.ErrorMessages, { errors: errors }), (0, jsx_runtime_1.jsxs)(material_1.Grid, { container: true, spacing: 3, alignItems: "center", children: [(0, jsx_runtime_1.jsx)(material_1.Grid, { size: { xs: 12, md: 6 }, children: (0, jsx_runtime_1.jsx)(material_1.TextField, { size: "small", margin: "none", required: true, fullWidth: true, type: "text", "aria-label": "firstName", label: helpers_1.Locale.label("createPerson.firstName"), name: "first", value: person.name.first || "", onChange: handleChange, onKeyDown: (e) => e.key === "Enter" && handleSubmit }) }), (0, jsx_runtime_1.jsx)(material_1.Grid, { size: { xs: 12, md: 6 }, children: (0, jsx_runtime_1.jsx)(material_1.TextField, { size: "small", margin: "none", required: true, fullWidth: true, type: "text", "aria-label": "lastName", label: helpers_1.Locale.label("createPerson.lastName"), name: "last", value: person.name.last || "", onChange: handleChange, onKeyDown: (e) => e.key === "Enter" && handleSubmit }) }), (0, jsx_runtime_1.jsx)(material_1.Grid, { size: 12, children: (0, jsx_runtime_1.jsx)(material_1.TextField, { size: "small", margin: "none", fullWidth: true, type: "text", "aria-label": "email", label: helpers_1.Locale.label("createPerson.email"), name: "email", value: person.contactInfo.email || "", onChange: handleChange, onKeyDown: (e) => e.key === "Enter" && handleSubmit }) }), (0, jsx_runtime_1.jsx)(material_1.Grid, { size: 12, children: (0, jsx_runtime_1.jsx)(material_1.Button, { type: "submit", fullWidth: true, variant: "contained", disabled: isSubmitting, onClick: handleSubmit, children: helpers_1.Locale.label("common.add") }) })] })] }));
99
- }
100
- //# sourceMappingURL=CreatePerson.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CreatePerson.js","sourceRoot":"","sources":["../../src/components/CreatePerson.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;AAmBb,oCAmHC;;AApID,kDAAyB;AACzB,wCAA2D;AAC3D,iDAAuF;AACvF,4CAA0G;AAC1G,mDAA+C;AAC/C,8DAA0D;AAY1D,SAAgB,YAAY,CAAC,EAAE,QAAQ,GAAG,GAAG,EAAE,GAAG,CAAC,EAAE,WAAW,GAAG,KAAK,EAAE,GAAG,KAAK,EAAS;IAC1F,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,eAAK,CAAC,QAAQ,CAAkB,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,CAAC;IAChH,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,eAAK,CAAC,QAAQ,CAAW,EAAE,CAAC,CAAC;IACzD,MAAM,CAAC,YAAY,EAAE,eAAe,CAA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person: PersonInterface) => void;
5
- person?: PersonInterface;
6
- getPhotoUrl: (person: PersonInterface) => string;
7
- searchClicked?: () => void;
8
- filterList?: string[];
9
- includeEmail?: boolean;
10
- actionLabel?: string;
11
- showCreatePersonOnNotFound?: boolean;
12
- onCreate?: (person: PersonInterface) => void;
13
- }
14
- export declare const PersonAdd: React.FC<Props>;
15
- export {};
16
- //# sourceMappingURL=PersonAdd.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PersonAdd.d.ts","sourceRoot":"","sources":["../../src/components/PersonAdd.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAKrD,UAAU,KAAK;IACd,WAAW,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;IAC/C,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,WAAW,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,MAAM,CAAC;IACjD,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;CAE7C;AAED,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CA0DrC,CAAA"}
@@ -1,52 +0,0 @@
1
- "use client";
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.PersonAdd = void 0;
5
- const jsx_runtime_1 = require("react/jsx-runtime");
6
- const react_1 = require("react");
7
- const helpers_1 = require("../helpers");
8
- const material_1 = require("@mui/material");
9
- const SmallButton_1 = require("./SmallButton");
10
- const CreatePerson_1 = require("./CreatePerson");
11
- const PersonAdd = ({ addFunction, getPhotoUrl, searchClicked, filterList = [], includeEmail = false, actionLabel, showCreatePersonOnNotFound = false, onCreate }) => {
12
- const [searchResults, setSearchResults] = (0, react_1.useState)([]);
13
- const [searchText, setSearchText] = (0, react_1.useState)("");
14
- const [hasSearched, setHasSearched] = (0, react_1.useState)(false);
15
- const [open, setOpen] = (0, react_1.useState)(false);
16
- const handleChange = (e) => { e.preventDefault(); setHasSearched(false); setSearchText(e.currentTarget.value); };
17
- const handleKeyDown = (e) => { if (e.key === "Enter") {
18
- e.preventDefault();
19
- handleSearch(null);
20
- } };
21
- const handleSearch = (e) => {
22
- if (e !== null)
23
- e.preventDefault();
24
- let term = searchText.trim();
25
- helpers_1.ApiHelper.post("/people/search", { term: term }, "MembershipApi")
26
- .then((data) => {
27
- setHasSearched(true);
28
- const filteredResult = data.filter(s => !filterList.includes(s.id));
29
- setSearchResults(filteredResult);
30
- if (searchClicked) {
31
- searchClicked();
32
- }
33
- });
34
- };
35
- const handleAdd = (person) => {
36
- let sr = [...searchResults];
37
- const idx = sr.indexOf(person);
38
- sr.splice(idx, 1);
39
- setSearchResults(sr);
40
- addFunction(person);
41
- };
42
- //<button className="text-success no-default-style" aria-label="addPerson" data-index={i} onClick={handleAdd}><Icon>person</Icon> Add</button>
43
- let rows = [];
44
- for (let i = 0; i < searchResults.length; i++) {
45
- const sr = searchResults[i];
46
- rows.push((0, jsx_runtime_1.jsxs)(material_1.TableRow, { children: [(0, jsx_runtime_1.jsx)(material_1.TableCell, { children: (0, jsx_runtime_1.jsx)("img", { src: getPhotoUrl(sr), alt: "avatar" }) }), (0, jsx_runtime_1.jsxs)(material_1.TableCell, { children: [sr.name.display, includeEmail && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("i", { style: { color: "#999" }, children: sr.contactInfo.email })] }))] }), (0, jsx_runtime_1.jsx)(material_1.TableCell, { children: (0, jsx_runtime_1.jsx)(SmallButton_1.SmallButton, { color: "success", icon: "person", text: actionLabel || "Add", ariaLabel: "addPerson", onClick: () => handleAdd(sr), "data-testid": `add-person-${sr.id}` }) })] }, sr.id));
47
- }
48
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.TextField, { fullWidth: true, name: "personAddText", label: helpers_1.Locale.label("person.person"), value: searchText, onChange: handleChange, onKeyDown: handleKeyDown, "data-testid": "person-search-input", InputProps: { endAdornment: (0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", id: "searchButton", "data-testid": "search-button", onClick: handleSearch, children: helpers_1.Locale.label("common.search") }) } }), showCreatePersonOnNotFound && hasSearched && searchText && searchResults.length === 0 && ((0, jsx_runtime_1.jsxs)(material_1.Typography, { sx: { marginTop: "7px" }, children: [helpers_1.Locale.label("person.noRec"), " ", (0, jsx_runtime_1.jsx)("a", { href: "about:blank", onClick: (e) => { e.preventDefault(); setOpen(true); }, children: helpers_1.Locale.label("createPerson.addNewPerson") })] })), (0, jsx_runtime_1.jsx)(material_1.Table, { size: "small", id: "householdMemberAddTable", children: (0, jsx_runtime_1.jsx)(material_1.TableBody, { children: rows }) }), open && (0, jsx_runtime_1.jsx)(CreatePerson_1.CreatePerson, { showInModal: true, onClose: () => { setOpen(false); }, onCreate: person => { setSearchText(""); setSearchResults([person]); if (onCreate)
49
- onCreate(person); } })] }));
50
- };
51
- exports.PersonAdd = PersonAdd;
52
- //# sourceMappingURL=PersonAdd.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PersonAdd.js","sourceRoot":"","sources":["../../src/components/PersonAdd.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;AAEb,iCAAwC;AACxC,wCAA+C;AAE/C,4CAAoH;AACpH,+CAA4C;AAC5C,iDAA8C;AAevC,MAAM,SAAS,GAAoB,CAAC,EAAE,WAAW,EAAE,WAAW,EAAE,aAAa,EAAE,UAAU,GAAG,EAAE,EAAE,YAAY,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AAE,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,EAAE,GAAG,aAAa,CAAC,EAAE,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,QAAQ;oBAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAI,IAC/K,CACH,CAAC;AACH,CAAC,CAAA;AA1DY,QAAA,SAAS,aA0DrB"}
@@ -1,11 +0,0 @@
1
- import React from "react";
2
- import { ChurchInterface } from "@churchapps/helpers";
3
- interface Props {
4
- personId: string;
5
- appName?: string;
6
- church?: ChurchInterface;
7
- churchLogo?: string;
8
- }
9
- export declare const DonationPage: React.FC<Props>;
10
- export {};
11
- //# sourceMappingURL=DonationPage.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DonationPage.d.ts","sourceRoot":"","sources":["../../src/donationComponents/DonationPage.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAA2D,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAK/G,UAAU,KAAK;IAAG,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,eAAe,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE;AAErG,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAwMxC,CAAA"}
@@ -1,150 +0,0 @@
1
- "use client";
2
- "use strict";
3
- var __importDefault = (this && this.__importDefault) || function (mod) {
4
- return (mod && mod.__esModule) ? mod : { "default": mod };
5
- };
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.DonationPage = void 0;
8
- const jsx_runtime_1 = require("react/jsx-runtime");
9
- const react_1 = __importDefault(require("react"));
10
- const stripe_js_1 = require("@stripe/stripe-js");
11
- const components_1 = require("./components");
12
- const components_2 = require("../components");
13
- const helpers_1 = require("../helpers");
14
- const helpers_2 = require("@churchapps/helpers");
15
- // import { Link } from "react-router-dom"
16
- const material_1 = require("@mui/material");
17
- const useMountedState_1 = require("../hooks/useMountedState");
18
- const DonationPage = (props) => {
19
- const [donations, setDonations] = react_1.default.useState(null);
20
- const [stripePromise, setStripe] = react_1.default.useState(null);
21
- const [paymentMethods, setPaymentMethods] = react_1.default.useState(null);
22
- const [customerId, setCustomerId] = react_1.default.useState(null);
23
- const [person, setPerson] = react_1.default.useState(null);
24
- const [message, setMessage] = react_1.default.useState(null);
25
- const [appName, setAppName] = react_1.default.useState("");
26
- const [anchorEl, setAnchorEl] = react_1.default.useState(null);
27
- const open = Boolean(anchorEl);
28
- const isMounted = (0, useMountedState_1.useMountedState)();
29
- const handleClose = () => {
30
- setAnchorEl(null);
31
- };
32
- const loadPaymentMethods = async () => {
33
- try {
34
- const data = await helpers_1.ApiHelper.get("/paymentmethods/personid/" + props.personId, "GivingApi");
35
- if (!data.length) {
36
- setPaymentMethods([]);
37
- return;
38
- }
39
- const cards = data[0].cards.data.map((card) => new helpers_2.StripePaymentMethod(card));
40
- const banks = data[0].banks.data.map((bank) => new helpers_2.StripePaymentMethod(bank));
41
- setCustomerId(data[0].customer.id);
42
- setPaymentMethods(cards.concat(banks));
43
- }
44
- catch (error) {
45
- console.error("Error loading payment methods:", error);
46
- setPaymentMethods([]);
47
- }
48
- };
49
- const loadPersonData = async () => {
50
- try {
51
- const data = await helpers_1.ApiHelper.get("/people/" + props.personId, "MembershipApi");
52
- setPerson(data);
53
- }
54
- catch (error) {
55
- console.error("Error loading person data:", error);
56
- }
57
- };
58
- const loadStripeData = async (gatewayData) => {
59
- if (!gatewayData.length || !gatewayData[0]?.publicKey) {
60
- setPaymentMethods([]);
61
- return;
62
- }
63
- setStripe((0, stripe_js_1.loadStripe)(gatewayData[0].publicKey));
64
- await Promise.all([
65
- // loadPersonData(),
66
- loadPaymentMethods()
67
- ]);
68
- };
69
- const loadData = async () => {
70
- if (props?.appName)
71
- setAppName(props.appName);
72
- if (helpers_1.UniqueIdHelper.isMissing(props.personId))
73
- return;
74
- try {
75
- const [donationsData, gatewaysData] = await Promise.all([
76
- helpers_1.ApiHelper.get("/donations?personId=" + props.personId, "GivingApi"),
77
- helpers_1.ApiHelper.get("/gateways", "GivingApi")
78
- ]);
79
- setDonations(donationsData);
80
- await loadPersonData(); //moved this outside of loadStripeData to fix issue with person data not loading when there's no gateway data
81
- await loadStripeData(gatewaysData);
82
- }
83
- catch (error) {
84
- console.error("Error loading donation data:", error);
85
- setDonations([]);
86
- setPaymentMethods([]);
87
- }
88
- };
89
- const handleDataUpdate = (message) => {
90
- setMessage(message);
91
- setPaymentMethods(null);
92
- loadData();
93
- };
94
- const getEditContent = () => {
95
- const result = [];
96
- const date = new Date();
97
- const currentY = date.getFullYear();
98
- const lastY = date.getFullYear() - 1;
99
- const current_year = (donations.length > 0) ? donations.filter(d => new Date(d.donationDate || "2000-01-01").getFullYear() === currentY) : [];
100
- const last_year = (donations.length > 0) ? donations.filter(d => new Date(d.donationDate || "2000-01-01").getFullYear() === lastY) : [];
101
- const customHeaders = [
102
- { label: "amount", key: "amount" },
103
- { label: "donationDate", key: "donationDate" },
104
- { label: "fundName", key: "fund.name" },
105
- { label: "method", key: "method" },
106
- { label: "methodDetails", key: "methodDetails" },
107
- ];
108
- result.push((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Button, { id: "download-button", "aria-controls": open ? "download-menu" : undefined, "aria-haspopup": "true", "aria-expanded": open ? "true" : undefined, onClick: (e) => {
109
- setAnchorEl(e.currentTarget);
110
- }, children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "download" }) }), (0, jsx_runtime_1.jsxs)(material_1.Menu, { id: "download-menu", anchorEl: anchorEl, open: open, onClose: handleClose, MenuListProps: { 'aria-labelledby': "download-button" }, children: [(0, jsx_runtime_1.jsx)(material_1.MenuItem, { onClick: handleClose, dense: true, children: (0, jsx_runtime_1.jsx)(components_2.ExportLink, { data: current_year, filename: "current_year_donations", customHeaders: customHeaders, text: "Current Year (CSV)", icon: "table_chart" }) }), (0, jsx_runtime_1.jsx)(material_1.MenuItem, { onClick: handleClose, dense: true, children: (0, jsx_runtime_1.jsx)(material_1.Link, { href: "/donations/print/" + person?.id, children: (0, jsx_runtime_1.jsxs)(material_1.Button, { children: [(0, jsx_runtime_1.jsx)(material_1.Icon, { children: "print" }), " \u00A0 Current Year (PRINT)"] }) }) }), (0, jsx_runtime_1.jsx)(material_1.MenuItem, { onClick: handleClose, dense: true, children: (0, jsx_runtime_1.jsx)(components_2.ExportLink, { data: last_year, filename: "last_year_donations", customHeaders: customHeaders, text: "Last Year (CSV)", icon: "table_chart" }) }), (0, jsx_runtime_1.jsx)(material_1.MenuItem, { onClick: handleClose, dense: true, children: (0, jsx_runtime_1.jsx)(material_1.Link, { href: "/donations/print/" + person?.id + "?prev=1", children: (0, jsx_runtime_1.jsxs)(material_1.Button, { children: [(0, jsx_runtime_1.jsx)(material_1.Icon, { children: "print" }), " \u00A0 Last Year (PRINT)"] }) }) })] })] }));
111
- return result;
112
- };
113
- const getRows = () => {
114
- let rows = [];
115
- if (donations.length === 0) {
116
- rows.push((0, jsx_runtime_1.jsx)(material_1.TableRow, { children: (0, jsx_runtime_1.jsx)(material_1.TableCell, { children: helpers_1.Locale.label("donation.page.willAppear") }) }, "0"));
117
- return rows;
118
- }
119
- for (let i = 0; i < donations.length; i++) {
120
- let d = donations[i];
121
- rows.push((0, jsx_runtime_1.jsxs)(material_1.TableRow, { children: [appName !== "B1App" && (0, jsx_runtime_1.jsx)(material_1.TableCell, { children: (0, jsx_runtime_1.jsx)(material_1.Link, { href: "/donations/" + d.batchId, children: d.batchId }) }), (0, jsx_runtime_1.jsx)(material_1.TableCell, { children: helpers_1.DateHelper.prettyDate(new Date(d.donationDate)) }), (0, jsx_runtime_1.jsxs)(material_1.TableCell, { children: [d.method, " - ", d.methodDetails] }), (0, jsx_runtime_1.jsx)(material_1.TableCell, { children: d.fund.name }), (0, jsx_runtime_1.jsx)(material_1.TableCell, { children: helpers_1.CurrencyHelper.formatCurrency(d.fund.amount) })] }, i));
122
- }
123
- return rows;
124
- };
125
- const getTableHeader = () => {
126
- const rows = [];
127
- if (donations.length > 0) {
128
- rows.push((0, jsx_runtime_1.jsxs)(material_1.TableRow, { sx: { textAlign: "left" }, children: [appName !== "B1App" && (0, jsx_runtime_1.jsx)("th", { children: helpers_1.Locale.label("donation.page.batch") }), (0, jsx_runtime_1.jsx)("th", { children: helpers_1.Locale.label("donation.page.date") }), (0, jsx_runtime_1.jsx)("th", { children: helpers_1.Locale.label("donation.page.method") }), (0, jsx_runtime_1.jsx)("th", { children: helpers_1.Locale.label("donation.page.fund") }), (0, jsx_runtime_1.jsx)("th", { children: helpers_1.Locale.label("donation.page.amount") })] }, "header"));
129
- }
130
- return rows;
131
- };
132
- react_1.default.useEffect(() => {
133
- loadData();
134
- }, [props.personId]); //eslint-disable-line
135
- const getTable = () => {
136
- if (!donations)
137
- return (0, jsx_runtime_1.jsx)(components_2.Loading, {});
138
- else
139
- return ((0, jsx_runtime_1.jsxs)(material_1.Table, { children: [(0, jsx_runtime_1.jsx)(material_1.TableHead, { children: getTableHeader() }), (0, jsx_runtime_1.jsx)(material_1.TableBody, { children: getRows() })] }));
140
- };
141
- const getPaymentMethodComponents = () => {
142
- if (!paymentMethods || !donations)
143
- return (0, jsx_runtime_1.jsx)(components_2.Loading, {});
144
- else
145
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.DonationForm, { person: person, customerId: customerId, paymentMethods: paymentMethods, stripePromise: stripePromise, donationSuccess: handleDataUpdate, church: props?.church, churchLogo: props?.churchLogo }), (0, jsx_runtime_1.jsx)(components_2.DisplayBox, { headerIcon: "payments", headerText: "Donations", editContent: getEditContent(), children: getTable() }), (0, jsx_runtime_1.jsx)(components_1.RecurringDonations, { customerId: customerId, paymentMethods: paymentMethods, appName: appName, dataUpdate: handleDataUpdate }), (0, jsx_runtime_1.jsx)(components_1.PaymentMethods, { person: person, customerId: customerId, paymentMethods: paymentMethods, appName: appName, stripePromise: stripePromise, dataUpdate: handleDataUpdate })] }));
146
- };
147
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [paymentMethods && message && (0, jsx_runtime_1.jsx)(material_1.Alert, { severity: "success", children: message }), getPaymentMethodComponents()] }));
148
- };
149
- exports.DonationPage = DonationPage;
150
- //# sourceMappingURL=DonationPage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DonationPage.js","sourceRoot":"","sources":["../../src/donationComponents/DonationPage.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;AAEb,kDAA0B;AAC1B,iDAAuD;AACvD,6CAAgF;AAChF,8CAAgE;AAChE,wCAA2F;AAC3F,iDAA+G;AAC/G,0CAA0C;AAC1C,4CAA2H;AAC3H,8DAA2D;AAIpD,MAAM,YAAY,GAAoB,CAAC,KAAK,EAAE,EAAE;IACrD,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,eAAK,CAAC,QAAQ,CAAsB,IAAI,CAAC,CAAC;IAC5E,MAAM,CAAC,aAAa,EAAE,SAAS,CAAC,GAAG,eAAK,CAAC,QAAQ,CAAkB,IAAI,CAAC,CAAC;IACzE,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,eAAK,CAAC,QAAQ,CAAwB,IAAI,CAAC,CAAC;IACxF,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,eAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IACzD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,eAAK,CAAC,QAAQ,CAAkB,IAAI,CAAC,CAAC;IAClE,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,eAAK,CAAC,QAAQ,CAAS,IAAI,CA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;AAxMY,QAAA,YAAY,gBAwMxB"}
@@ -1,14 +0,0 @@
1
- import React from "react";
2
- import { PersonInterface, StripePaymentMethod } from "@churchapps/helpers";
3
- interface Props {
4
- bank: StripePaymentMethod;
5
- showVerifyForm: boolean;
6
- customerId: string;
7
- person: PersonInterface;
8
- setMode: any;
9
- deletePayment: any;
10
- updateList: (message?: string) => void;
11
- }
12
- export declare const BankForm: React.FC<Props>;
13
- export {};
14
- //# sourceMappingURL=BankForm.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BankForm.d.ts","sourceRoot":"","sources":["../../../src/donationComponents/components/BankForm.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAA0H,MAAM,qBAAqB,CAAC;AAEnM,UAAU,KAAK;IAAG,IAAI,EAAE,mBAAmB,CAAC;IAAC,cAAc,EAAE,OAAO,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,eAAe,CAAC;IAAC,OAAO,EAAE,GAAG,CAAC;IAAC,aAAa,EAAE,GAAG,CAAC;IAAC,UAAU,EAAE,CAAC,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;CAAE;AAE7L,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAqJpC,CAAA"}