@churchapps/apphelper 0.4.50 → 0.5.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.
- package/dist/components/FormCardPayment.d.ts +1 -1
- package/dist/components/FormCardPayment.d.ts.map +1 -1
- package/dist/components/FormCardPayment.js +27 -10
- package/dist/components/FormCardPayment.js.map +1 -1
- package/dist/components/Loading.js +36 -36
- package/dist/components/notes/Notes.js +27 -27
- package/dist/helpers/UserHelper.d.ts.map +1 -1
- package/dist/helpers/UserHelper.js +4 -1
- package/dist/helpers/UserHelper.js.map +1 -1
- package/dist/helpers/index.d.ts +1 -1
- package/dist/helpers/index.d.ts.map +1 -1
- package/dist/helpers/index.js +1 -1
- package/dist/helpers/index.js.map +1 -1
- package/dist/public/css/cropper.css +309 -309
- package/dist/public/css/styles.css +111 -111
- package/package.json +72 -73
- package/public/css/cropper.css +309 -309
- package/public/css/styles.css +111 -111
- package/public/locales/de.json +269 -269
- package/public/locales/en.json +276 -276
- package/public/locales/es.json +272 -272
- package/public/locales/fr.json +269 -269
- package/public/locales/hi.json +269 -269
- package/public/locales/it.json +269 -269
- package/public/locales/ko.json +269 -269
- package/public/locales/no.json +269 -269
- package/public/locales/pt.json +269 -269
- package/public/locales/ru.json +269 -269
- package/public/locales/tl.json +269 -269
- package/public/locales/zh.json +269 -269
- package/src/components/DisplayBox.tsx +83 -83
- package/src/components/ErrorMessages.tsx +28 -28
- package/src/components/ExportLink.tsx +81 -81
- package/src/components/FloatingSupport.tsx +18 -18
- package/src/components/FormCardPayment.tsx +184 -169
- package/src/components/FormSubmissionEdit.tsx +168 -168
- package/src/components/HelpIcon.tsx +12 -12
- package/src/components/ImageEditor.tsx +161 -161
- package/src/components/InputBox.tsx +96 -96
- package/src/components/Loading.tsx +77 -77
- package/src/components/PageHeader.tsx +110 -110
- package/src/components/PersonAvatar.tsx +77 -77
- package/src/components/QuestionEdit.tsx +99 -99
- package/src/components/SmallButton.tsx +42 -42
- package/src/components/SupportModal.tsx +32 -32
- package/src/components/TabPanel.tsx +28 -28
- package/src/components/gallery/GalleryModal.tsx +173 -173
- package/src/components/gallery/StockPhotos.tsx +95 -95
- package/src/components/gallery/index.ts +1 -1
- package/src/components/header/Banner.tsx +11 -11
- package/src/components/header/PrimaryMenu.tsx +100 -100
- package/src/components/header/SecondaryMenu.tsx +23 -23
- package/src/components/header/SecondaryMenuAlt.tsx +40 -40
- package/src/components/header/SiteHeader.tsx +207 -207
- package/src/components/header/SupportDrawer.tsx +111 -111
- package/src/components/header/index.tsx +2 -2
- package/src/components/index.tsx +20 -20
- package/src/components/notes/AddNote.tsx +180 -180
- package/src/components/notes/Note.tsx +68 -68
- package/src/components/notes/Notes.tsx +208 -208
- package/src/components/notes/index.ts +3 -3
- package/src/components/wrapper/AppList.tsx +19 -19
- package/src/components/wrapper/ChurchList.tsx +154 -154
- package/src/components/wrapper/NavItem.tsx +47 -47
- package/src/components/wrapper/NewPrivateMessage.tsx +253 -253
- package/src/components/wrapper/Notifications.tsx +223 -223
- package/src/components/wrapper/PrivateMessageDetails.tsx +112 -112
- package/src/components/wrapper/PrivateMessages.tsx +576 -576
- package/src/components/wrapper/UserMenu.tsx +383 -383
- package/src/components/wrapper/index.tsx +8 -8
- package/src/helpers/AnalyticsHelper.ts +32 -32
- package/src/helpers/AppearanceHelper.ts +73 -73
- package/src/helpers/ArrayHelper.ts +87 -87
- package/src/helpers/CurrencyHelper.ts +10 -10
- package/src/helpers/DateHelper.ts +104 -104
- package/src/helpers/ErrorHelper.ts +43 -43
- package/src/helpers/EventHelper.ts +49 -49
- package/src/helpers/FileHelper.ts +31 -31
- package/src/helpers/Locale.ts +457 -457
- package/src/helpers/NotificationService.ts +296 -296
- package/src/helpers/PersonHelper.ts +62 -62
- package/src/helpers/SlugHelper.ts +37 -37
- package/src/helpers/SocketHelper.ts +296 -296
- package/src/helpers/UniqueIdHelper.ts +36 -36
- package/src/helpers/UserHelper.ts +107 -104
- package/src/helpers/createEmotionCache.ts +17 -17
- package/src/helpers/index.ts +58 -50
- package/src/hooks/index.ts +3 -3
- package/src/hooks/useMountedState.ts +16 -16
- package/src/hooks/useNotifications.ts +93 -93
- package/src/index.ts +2 -2
- package/src/types/interface-extensions.d.ts +12 -0
- package/tsconfig.json +31 -31
- package/dist/public/locales/de.json +0 -270
- package/dist/public/locales/en.json +0 -277
- package/dist/public/locales/es.json +0 -272
- package/dist/public/locales/fr.json +0 -270
- package/dist/public/locales/hi.json +0 -270
- package/dist/public/locales/it.json +0 -270
- package/dist/public/locales/ko.json +0 -270
- package/dist/public/locales/no.json +0 -270
- package/dist/public/locales/pt.json +0 -270
- package/dist/public/locales/ru.json +0 -270
- package/dist/public/locales/tl.json +0 -270
- package/dist/public/locales/zh.json +0 -270
|
@@ -1,100 +1,100 @@
|
|
|
1
|
-
import React, { useState, useRef } from "react";
|
|
2
|
-
import { Box, Button, Icon, Paper, Popper, Grow, ClickAwayListener } from "@mui/material";
|
|
3
|
-
import { NavItem } from "../wrapper/NavItem";
|
|
4
|
-
|
|
5
|
-
interface Props {
|
|
6
|
-
label: string;
|
|
7
|
-
menuItems: { url: string; icon: string; label: string }[];
|
|
8
|
-
onNavigate: (url: string) => void;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export const PrimaryMenu = (props: Props) => {
|
|
12
|
-
const [open, setOpen] = useState(false);
|
|
13
|
-
const anchorRef = useRef<HTMLButtonElement>(null);
|
|
14
|
-
|
|
15
|
-
const handleToggle = () => {
|
|
16
|
-
setOpen((prevOpen) => !prevOpen);
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
const handleClose = (event: Event | React.SyntheticEvent) => {
|
|
20
|
-
if (
|
|
21
|
-
anchorRef.current &&
|
|
22
|
-
anchorRef.current.contains(event.target as HTMLElement)
|
|
23
|
-
) {
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
setOpen(false);
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
const handleItemClick = (url: string) => {
|
|
30
|
-
setOpen(false);
|
|
31
|
-
props.onNavigate(url);
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
const getNavItems = () => {
|
|
35
|
-
let result: React.ReactElement[] = [];
|
|
36
|
-
props.menuItems.forEach((item) => {
|
|
37
|
-
result.push(
|
|
38
|
-
<NavItem
|
|
39
|
-
url={item.url}
|
|
40
|
-
label={item.label.toUpperCase()}
|
|
41
|
-
icon={item.icon}
|
|
42
|
-
key={item.url}
|
|
43
|
-
onNavigate={handleItemClick}
|
|
44
|
-
/>
|
|
45
|
-
);
|
|
46
|
-
});
|
|
47
|
-
return result;
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
return (
|
|
51
|
-
<>
|
|
52
|
-
<Button
|
|
53
|
-
ref={anchorRef}
|
|
54
|
-
onClick={handleToggle}
|
|
55
|
-
color="inherit"
|
|
56
|
-
endIcon={<Icon>expand_more</Icon>}
|
|
57
|
-
id="primaryNavButton"
|
|
58
|
-
>
|
|
59
|
-
<img src="/images/logo-icon.png" alt="Primary Menu" />
|
|
60
|
-
<h2>{props.label}</h2>
|
|
61
|
-
</Button>
|
|
62
|
-
|
|
63
|
-
<Popper
|
|
64
|
-
open={open}
|
|
65
|
-
anchorEl={anchorRef.current}
|
|
66
|
-
role={undefined}
|
|
67
|
-
placement="bottom-end"
|
|
68
|
-
transition
|
|
69
|
-
disablePortal={true}
|
|
70
|
-
style={{ zIndex: 1300, color: "#FFF" }}
|
|
71
|
-
>
|
|
72
|
-
{({ TransitionProps }) => (
|
|
73
|
-
<Grow {...TransitionProps}>
|
|
74
|
-
<Paper
|
|
75
|
-
elevation={3}
|
|
76
|
-
sx={{
|
|
77
|
-
backgroundColor: "var(--c1)",
|
|
78
|
-
color: "#FFF",
|
|
79
|
-
minWidth: 300,
|
|
80
|
-
paddingY: "10px",
|
|
81
|
-
filter: "drop-shadow(0px 2px 8px rgba(0,0,0,0.32))",
|
|
82
|
-
}}
|
|
83
|
-
>
|
|
84
|
-
<ClickAwayListener onClickAway={handleClose}>
|
|
85
|
-
<Box
|
|
86
|
-
sx={{
|
|
87
|
-
"& a": { color: "#FFF", textDecoration: "none" },
|
|
88
|
-
"& a:hover": { color: "#DDD" },
|
|
89
|
-
}}
|
|
90
|
-
>
|
|
91
|
-
{getNavItems()}
|
|
92
|
-
</Box>
|
|
93
|
-
</ClickAwayListener>
|
|
94
|
-
</Paper>
|
|
95
|
-
</Grow>
|
|
96
|
-
)}
|
|
97
|
-
</Popper>
|
|
98
|
-
</>
|
|
99
|
-
);
|
|
100
|
-
};
|
|
1
|
+
import React, { useState, useRef } from "react";
|
|
2
|
+
import { Box, Button, Icon, Paper, Popper, Grow, ClickAwayListener } from "@mui/material";
|
|
3
|
+
import { NavItem } from "../wrapper/NavItem";
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
label: string;
|
|
7
|
+
menuItems: { url: string; icon: string; label: string }[];
|
|
8
|
+
onNavigate: (url: string) => void;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const PrimaryMenu = (props: Props) => {
|
|
12
|
+
const [open, setOpen] = useState(false);
|
|
13
|
+
const anchorRef = useRef<HTMLButtonElement>(null);
|
|
14
|
+
|
|
15
|
+
const handleToggle = () => {
|
|
16
|
+
setOpen((prevOpen) => !prevOpen);
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const handleClose = (event: Event | React.SyntheticEvent) => {
|
|
20
|
+
if (
|
|
21
|
+
anchorRef.current &&
|
|
22
|
+
anchorRef.current.contains(event.target as HTMLElement)
|
|
23
|
+
) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
setOpen(false);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const handleItemClick = (url: string) => {
|
|
30
|
+
setOpen(false);
|
|
31
|
+
props.onNavigate(url);
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
const getNavItems = () => {
|
|
35
|
+
let result: React.ReactElement[] = [];
|
|
36
|
+
props.menuItems.forEach((item) => {
|
|
37
|
+
result.push(
|
|
38
|
+
<NavItem
|
|
39
|
+
url={item.url}
|
|
40
|
+
label={item.label.toUpperCase()}
|
|
41
|
+
icon={item.icon}
|
|
42
|
+
key={item.url}
|
|
43
|
+
onNavigate={handleItemClick}
|
|
44
|
+
/>
|
|
45
|
+
);
|
|
46
|
+
});
|
|
47
|
+
return result;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
return (
|
|
51
|
+
<>
|
|
52
|
+
<Button
|
|
53
|
+
ref={anchorRef}
|
|
54
|
+
onClick={handleToggle}
|
|
55
|
+
color="inherit"
|
|
56
|
+
endIcon={<Icon>expand_more</Icon>}
|
|
57
|
+
id="primaryNavButton"
|
|
58
|
+
>
|
|
59
|
+
<img src="/images/logo-icon.png" alt="Primary Menu" />
|
|
60
|
+
<h2>{props.label}</h2>
|
|
61
|
+
</Button>
|
|
62
|
+
|
|
63
|
+
<Popper
|
|
64
|
+
open={open}
|
|
65
|
+
anchorEl={anchorRef.current}
|
|
66
|
+
role={undefined}
|
|
67
|
+
placement="bottom-end"
|
|
68
|
+
transition
|
|
69
|
+
disablePortal={true}
|
|
70
|
+
style={{ zIndex: 1300, color: "#FFF" }}
|
|
71
|
+
>
|
|
72
|
+
{({ TransitionProps }) => (
|
|
73
|
+
<Grow {...TransitionProps}>
|
|
74
|
+
<Paper
|
|
75
|
+
elevation={3}
|
|
76
|
+
sx={{
|
|
77
|
+
backgroundColor: "var(--c1)",
|
|
78
|
+
color: "#FFF",
|
|
79
|
+
minWidth: 300,
|
|
80
|
+
paddingY: "10px",
|
|
81
|
+
filter: "drop-shadow(0px 2px 8px rgba(0,0,0,0.32))",
|
|
82
|
+
}}
|
|
83
|
+
>
|
|
84
|
+
<ClickAwayListener onClickAway={handleClose}>
|
|
85
|
+
<Box
|
|
86
|
+
sx={{
|
|
87
|
+
"& a": { color: "#FFF", textDecoration: "none" },
|
|
88
|
+
"& a:hover": { color: "#DDD" },
|
|
89
|
+
}}
|
|
90
|
+
>
|
|
91
|
+
{getNavItems()}
|
|
92
|
+
</Box>
|
|
93
|
+
</ClickAwayListener>
|
|
94
|
+
</Paper>
|
|
95
|
+
</Grow>
|
|
96
|
+
)}
|
|
97
|
+
</Popper>
|
|
98
|
+
</>
|
|
99
|
+
);
|
|
100
|
+
};
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { Chip } from "@mui/material";
|
|
2
|
-
|
|
3
|
-
interface Props {
|
|
4
|
-
label: string,
|
|
5
|
-
menuItems: { url: string, label: string }[]
|
|
6
|
-
onNavigate: (url: string) => void;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export const SecondaryMenu= (props:Props) => {
|
|
10
|
-
|
|
11
|
-
const getItems = () => {
|
|
12
|
-
const result:any[] = [];
|
|
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
|
-
});
|
|
17
|
-
return result;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
return (<div id="secondaryMenu">
|
|
21
|
-
{getItems()}
|
|
22
|
-
</div>)
|
|
23
|
-
}
|
|
1
|
+
import { Chip } from "@mui/material";
|
|
2
|
+
|
|
3
|
+
interface Props {
|
|
4
|
+
label: string,
|
|
5
|
+
menuItems: { url: string, label: string }[]
|
|
6
|
+
onNavigate: (url: string) => void;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const SecondaryMenu= (props:Props) => {
|
|
10
|
+
|
|
11
|
+
const getItems = () => {
|
|
12
|
+
const result:any[] = [];
|
|
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
|
+
});
|
|
17
|
+
return result;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
return (<div id="secondaryMenu">
|
|
21
|
+
{getItems()}
|
|
22
|
+
</div>)
|
|
23
|
+
}
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Box, Button, Icon, Menu } from "@mui/material";
|
|
3
|
-
import { NavItem } from "../wrapper/NavItem";
|
|
4
|
-
|
|
5
|
-
interface Props {
|
|
6
|
-
label: string,
|
|
7
|
-
menuItems: { url: string, label: string }[]
|
|
8
|
-
onNavigate: (url: string) => void;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export const SecondaryMenuAlt = (props:Props) => {
|
|
12
|
-
const [anchorEl, setAnchorEl] = React.useState<null | HTMLElement>(null);
|
|
13
|
-
const handleClose = () => { setAnchorEl(null); };
|
|
14
|
-
const open = Boolean(anchorEl);
|
|
15
|
-
|
|
16
|
-
const handleClick = (e: React.MouseEvent<HTMLElement>) => {
|
|
17
|
-
e.preventDefault();
|
|
18
|
-
setAnchorEl(e.currentTarget);
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
const getItems = () => {
|
|
22
|
-
const result:any[] = [];
|
|
23
|
-
props.menuItems.forEach(item => {
|
|
24
|
-
result.push(<NavItem url={item.url} label={item.label} key={item.url} onNavigate={props.onNavigate} icon="people" />);
|
|
25
|
-
});
|
|
26
|
-
return result;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
return (
|
|
30
|
-
<div id="secondaryMenuAlt">
|
|
31
|
-
<Button onClick={handleClick} color="inherit" aria-controls={open ? "account-menu" : undefined} aria-haspopup="true" aria-expanded={open ? "true" : undefined} endIcon={<Icon>expand_more</Icon>} id="secondaryMenuButton">
|
|
32
|
-
<h3 style={{lineHeight:1}}>{props.label}</h3>
|
|
33
|
-
</Button>
|
|
34
|
-
<Menu anchorEl={anchorEl} id="account-menu" open={anchorEl!==null} onClose={handleClose} transformOrigin={{ horizontal: "right", vertical: "top" }} anchorOrigin={{ horizontal: "right", vertical: "bottom" }} sx={{ "& .MuiBox-root": { borderBottom: 0 } }}>
|
|
35
|
-
<Box sx={{ borderBottom: 1, borderColor: "divider" }}>
|
|
36
|
-
{getItems()}
|
|
37
|
-
</Box>
|
|
38
|
-
</Menu>
|
|
39
|
-
</div>)
|
|
40
|
-
}
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Box, Button, Icon, Menu } from "@mui/material";
|
|
3
|
+
import { NavItem } from "../wrapper/NavItem";
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
label: string,
|
|
7
|
+
menuItems: { url: string, label: string }[]
|
|
8
|
+
onNavigate: (url: string) => void;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const SecondaryMenuAlt = (props:Props) => {
|
|
12
|
+
const [anchorEl, setAnchorEl] = React.useState<null | HTMLElement>(null);
|
|
13
|
+
const handleClose = () => { setAnchorEl(null); };
|
|
14
|
+
const open = Boolean(anchorEl);
|
|
15
|
+
|
|
16
|
+
const handleClick = (e: React.MouseEvent<HTMLElement>) => {
|
|
17
|
+
e.preventDefault();
|
|
18
|
+
setAnchorEl(e.currentTarget);
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const getItems = () => {
|
|
22
|
+
const result:any[] = [];
|
|
23
|
+
props.menuItems.forEach(item => {
|
|
24
|
+
result.push(<NavItem url={item.url} label={item.label} key={item.url} onNavigate={props.onNavigate} icon="people" />);
|
|
25
|
+
});
|
|
26
|
+
return result;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
<div id="secondaryMenuAlt">
|
|
31
|
+
<Button onClick={handleClick} color="inherit" aria-controls={open ? "account-menu" : undefined} aria-haspopup="true" aria-expanded={open ? "true" : undefined} endIcon={<Icon>expand_more</Icon>} id="secondaryMenuButton">
|
|
32
|
+
<h3 style={{lineHeight:1}}>{props.label}</h3>
|
|
33
|
+
</Button>
|
|
34
|
+
<Menu anchorEl={anchorEl} id="account-menu" open={anchorEl!==null} onClose={handleClose} transformOrigin={{ horizontal: "right", vertical: "top" }} anchorOrigin={{ horizontal: "right", vertical: "bottom" }} sx={{ "& .MuiBox-root": { borderBottom: 0 } }}>
|
|
35
|
+
<Box sx={{ borderBottom: 1, borderColor: "divider" }}>
|
|
36
|
+
{getItems()}
|
|
37
|
+
</Box>
|
|
38
|
+
</Menu>
|
|
39
|
+
</div>)
|
|
40
|
+
}
|