@vrplatform/email 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +3 -0
- package/build/main/components/ActionEmailTemplate.d.ts +15 -0
- package/build/main/components/ActionEmailTemplate.js +39 -0
- package/build/main/components/ActionEmailTemplate.js.map +1 -0
- package/build/main/components/Button.d.ts +11 -0
- package/build/main/components/Button.js +15 -0
- package/build/main/components/Button.js.map +1 -0
- package/build/main/components/EmailContainer.d.ts +10 -0
- package/build/main/components/EmailContainer.js +52 -0
- package/build/main/components/EmailContainer.js.map +1 -0
- package/build/main/components/index.d.ts +2 -0
- package/build/main/components/index.js +3 -0
- package/build/main/components/index.js.map +1 -0
- package/build/main/components/utils/index.d.ts +1 -0
- package/build/main/components/utils/index.js +2 -0
- package/build/main/components/utils/index.js.map +1 -0
- package/build/main/components/utils/parse-email-html.d.ts +6 -0
- package/build/main/components/utils/parse-email-html.js +11 -0
- package/build/main/components/utils/parse-email-html.js.map +1 -0
- package/build/main/components/utils/parse-email-html.test.d.ts +1 -0
- package/build/main/components/utils/parse-email-html.test.js +59 -0
- package/build/main/components/utils/parse-email-html.test.js.map +1 -0
- package/build/main/const.d.ts +6 -0
- package/build/main/const.js +7 -0
- package/build/main/const.js.map +1 -0
- package/build/main/extensions.d.ts +4 -0
- package/build/main/extensions.js +5 -0
- package/build/main/extensions.js.map +1 -0
- package/build/main/index.d.ts +7 -0
- package/build/main/index.js +7 -0
- package/build/main/index.js.map +1 -0
- package/build/main/templates/InviteOwnerEmailTemplate.d.ts +8 -0
- package/build/main/templates/InviteOwnerEmailTemplate.js +41 -0
- package/build/main/templates/InviteOwnerEmailTemplate.js.map +1 -0
- package/build/main/templates/InvitePmEmailTemplate.d.ts +8 -0
- package/build/main/templates/InvitePmEmailTemplate.js +51 -0
- package/build/main/templates/InvitePmEmailTemplate.js.map +1 -0
- package/build/main/templates/OwnerStatementEmailTemplate.d.ts +11 -0
- package/build/main/templates/OwnerStatementEmailTemplate.js +55 -0
- package/build/main/templates/OwnerStatementEmailTemplate.js.map +1 -0
- package/build/main/templates/OwnerStatementSummaryEmailTemplate.d.ts +9 -0
- package/build/main/templates/OwnerStatementSummaryEmailTemplate.js +46 -0
- package/build/main/templates/OwnerStatementSummaryEmailTemplate.js.map +1 -0
- package/build/main/templates/OwnerTaxStatementEmailTemplate.d.ts +10 -0
- package/build/main/templates/OwnerTaxStatementEmailTemplate.js +47 -0
- package/build/main/templates/OwnerTaxStatementEmailTemplate.js.map +1 -0
- package/build/main/templates/TenantDeletionEmailTemplate.d.ts +10 -0
- package/build/main/templates/TenantDeletionEmailTemplate.js +26 -0
- package/build/main/templates/TenantDeletionEmailTemplate.js.map +1 -0
- package/build/main/templates/TenantSuspensionEmailTemplate.d.ts +9 -0
- package/build/main/templates/TenantSuspensionEmailTemplate.js +24 -0
- package/build/main/templates/TenantSuspensionEmailTemplate.js.map +1 -0
- package/build/main/templates/index.d.ts +7 -0
- package/build/main/templates/index.js +12 -0
- package/build/main/templates/index.js.map +1 -0
- package/build/main/theme.d.ts +29 -0
- package/build/main/theme.js +283 -0
- package/build/main/theme.js.map +1 -0
- package/build/main/tsconfig.main.tsbuildinfo +1 -0
- package/build/main/types.d.ts +25 -0
- package/build/main/types.js +2 -0
- package/build/main/types.js.map +1 -0
- package/build/main/utils/index.d.ts +1 -0
- package/build/main/utils/index.js +2 -0
- package/build/main/utils/index.js.map +1 -0
- package/build/main/utils/send-email.d.ts +10 -0
- package/build/main/utils/send-email.js +24 -0
- package/build/main/utils/send-email.js.map +1 -0
- package/build/module/components/ActionEmailTemplate.d.ts +15 -0
- package/build/module/components/ActionEmailTemplate.js +39 -0
- package/build/module/components/ActionEmailTemplate.js.map +1 -0
- package/build/module/components/Button.d.ts +11 -0
- package/build/module/components/Button.js +15 -0
- package/build/module/components/Button.js.map +1 -0
- package/build/module/components/EmailContainer.d.ts +10 -0
- package/build/module/components/EmailContainer.js +52 -0
- package/build/module/components/EmailContainer.js.map +1 -0
- package/build/module/components/index.d.ts +2 -0
- package/build/module/components/index.js +3 -0
- package/build/module/components/index.js.map +1 -0
- package/build/module/components/utils/index.d.ts +1 -0
- package/build/module/components/utils/index.js +2 -0
- package/build/module/components/utils/index.js.map +1 -0
- package/build/module/components/utils/parse-email-html.d.ts +6 -0
- package/build/module/components/utils/parse-email-html.js +11 -0
- package/build/module/components/utils/parse-email-html.js.map +1 -0
- package/build/module/components/utils/parse-email-html.test.d.ts +1 -0
- package/build/module/components/utils/parse-email-html.test.js +59 -0
- package/build/module/components/utils/parse-email-html.test.js.map +1 -0
- package/build/module/const.d.ts +6 -0
- package/build/module/const.js +7 -0
- package/build/module/const.js.map +1 -0
- package/build/module/extensions.d.ts +4 -0
- package/build/module/extensions.js +5 -0
- package/build/module/extensions.js.map +1 -0
- package/build/module/index.d.ts +7 -0
- package/build/module/index.js +7 -0
- package/build/module/index.js.map +1 -0
- package/build/module/templates/InviteOwnerEmailTemplate.d.ts +8 -0
- package/build/module/templates/InviteOwnerEmailTemplate.js +41 -0
- package/build/module/templates/InviteOwnerEmailTemplate.js.map +1 -0
- package/build/module/templates/InvitePmEmailTemplate.d.ts +8 -0
- package/build/module/templates/InvitePmEmailTemplate.js +51 -0
- package/build/module/templates/InvitePmEmailTemplate.js.map +1 -0
- package/build/module/templates/OwnerStatementEmailTemplate.d.ts +11 -0
- package/build/module/templates/OwnerStatementEmailTemplate.js +55 -0
- package/build/module/templates/OwnerStatementEmailTemplate.js.map +1 -0
- package/build/module/templates/OwnerStatementSummaryEmailTemplate.d.ts +9 -0
- package/build/module/templates/OwnerStatementSummaryEmailTemplate.js +46 -0
- package/build/module/templates/OwnerStatementSummaryEmailTemplate.js.map +1 -0
- package/build/module/templates/OwnerTaxStatementEmailTemplate.d.ts +10 -0
- package/build/module/templates/OwnerTaxStatementEmailTemplate.js +47 -0
- package/build/module/templates/OwnerTaxStatementEmailTemplate.js.map +1 -0
- package/build/module/templates/TenantDeletionEmailTemplate.d.ts +10 -0
- package/build/module/templates/TenantDeletionEmailTemplate.js +26 -0
- package/build/module/templates/TenantDeletionEmailTemplate.js.map +1 -0
- package/build/module/templates/TenantSuspensionEmailTemplate.d.ts +9 -0
- package/build/module/templates/TenantSuspensionEmailTemplate.js +24 -0
- package/build/module/templates/TenantSuspensionEmailTemplate.js.map +1 -0
- package/build/module/templates/index.d.ts +7 -0
- package/build/module/templates/index.js +12 -0
- package/build/module/templates/index.js.map +1 -0
- package/build/module/theme.d.ts +29 -0
- package/build/module/theme.js +283 -0
- package/build/module/theme.js.map +1 -0
- package/build/module/tsconfig.esm.tsbuildinfo +1 -0
- package/build/module/types.d.ts +25 -0
- package/build/module/types.js +2 -0
- package/build/module/types.js.map +1 -0
- package/build/module/utils/index.d.ts +1 -0
- package/build/module/utils/index.js +2 -0
- package/build/module/utils/index.js.map +1 -0
- package/build/module/utils/send-email.d.ts +10 -0
- package/build/module/utils/send-email.js +24 -0
- package/build/module/utils/send-email.js.map +1 -0
- package/package.json +53 -0
- package/src/components/ActionEmailTemplate.tsx +97 -0
- package/src/components/Button.tsx +40 -0
- package/src/components/EmailContainer.tsx +161 -0
- package/src/components/index.ts +2 -0
- package/src/components/utils/index.ts +1 -0
- package/src/components/utils/parse-email-html.test.ts +65 -0
- package/src/components/utils/parse-email-html.ts +28 -0
- package/src/const.ts +6 -0
- package/src/extensions.ts +7 -0
- package/src/index.ts +8 -0
- package/src/templates/InviteOwnerEmailTemplate.tsx +66 -0
- package/src/templates/InvitePmEmailTemplate.tsx +83 -0
- package/src/templates/OwnerStatementEmailTemplate.tsx +93 -0
- package/src/templates/OwnerStatementSummaryEmailTemplate.tsx +78 -0
- package/src/templates/OwnerTaxStatementEmailTemplate.tsx +80 -0
- package/src/templates/TenantDeletionEmailTemplate.tsx +119 -0
- package/src/templates/TenantSuspensionEmailTemplate.tsx +102 -0
- package/src/templates/index.ts +14 -0
- package/src/theme.ts +307 -0
- package/src/types.ts +25 -0
- package/src/utils/index.ts +1 -0
- package/src/utils/send-email.ts +37 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionEmailTemplate.js","sourceRoot":"src/","sources":["components/ActionEmailTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAiBlC,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,EAClC,IAAI,EACJ,MAAM,EACN,WAAW,EACX,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,KAAK,GACoB,EAAE,EAAE;IAC7B,OAAO,CACL,MAAC,cAAc,IACb,KAAK,EAAE,IAAI,CAAC,OAAO,EACnB,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,EACvC,MAAM,EAAE;YACN,IAAI,EAAE,MAAM,CAAC,IAAI;SAClB,EACD,IAAI,EAAE,IAAI,aAEV,KAAC,OAAO,IACN,KAAK,EAAE;oBACL,QAAQ,EAAE,EAAE;oBACZ,UAAU,EAAE,GAAG;oBACf,YAAY,EAAE,MAAM;iBACrB,YAEA,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,cAAc,MAAM,CAAC,IAAI,GAAG,GAC5C,EAET,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CACtB,KAAC,IAAI,IACH,KAAK,EAAE;oBACL,OAAO,EAAE,MAAM;oBACf,eAAe,EAAE,SAAS;oBAC1B,YAAY,EAAE,KAAK;oBACnB,YAAY,EAAE,MAAM;iBACrB,YAEA,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,GACd,CACR,EAED;gBACE,sEAAsE;gBACtE,uBAAuB,EAAE;oBACvB,MAAM,EAAE,cAAc,CAAC,IAAI,CAAC,OAAO,EAAE;wBACnC,IAAI,EAAE,IAAI,CAAC,IAAI;wBACf,QAAQ,EAAE,IAAI,CAAC,SAAS,IAAI,EAAE;wBAC9B,IAAI,EAAE,KAAK,IAAI,EAAE;wBACjB,WAAW,EAAE,OAAO,IAAI,EAAE;qBAC3B,CAAC;iBACH,GACD,EAEF,KAAC,MAAM,IACL,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,IAAI,EAAE,IAAI,iBACE,sBAAsB,EAClC,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,EAAE,IAAI,mBAAmB,EACrD,WAAW,EAAE,WAAW,GACxB,EAEF;gBACE,sEAAsE;gBACtE,uBAAuB,EAAE;oBACvB,MAAM,EAAE,cAAc,CAAC,IAAI,CAAC,OAAO,EAAE;wBACnC,IAAI,EAAE,IAAI,CAAC,IAAI;wBACf,QAAQ,EAAE,IAAI,CAAC,SAAS,IAAI,EAAE;wBAC9B,IAAI,EAAE,KAAK,IAAI,EAAE;wBACjB,WAAW,EAAE,OAAO,IAAI,EAAE;qBAC3B,CAAC;iBACH,GACD,IACa,CAClB,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Button as ReactEmailButton } from '@react-email/button';
|
|
2
|
+
import type { ComponentProps } from 'react';
|
|
3
|
+
import type { EmailBaseProps } from '../types';
|
|
4
|
+
type Props = {
|
|
5
|
+
mode: EmailBaseProps['mode'];
|
|
6
|
+
href: string;
|
|
7
|
+
themeColors: EmailBaseProps['themeColors'];
|
|
8
|
+
label: string;
|
|
9
|
+
} & ComponentProps<typeof ReactEmailButton>;
|
|
10
|
+
export declare const Button: ({ href, mode, label, themeColors, style, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Button as ReactEmailButton } from '@react-email/button';
|
|
3
|
+
export const Button = ({ href, mode, label, themeColors, style, ...props }) => (_jsx(ReactEmailButton, { href: mode === 'send' ? href : undefined, style: {
|
|
4
|
+
width: '100%',
|
|
5
|
+
textAlign: 'center',
|
|
6
|
+
display: 'block',
|
|
7
|
+
padding: '13px 0',
|
|
8
|
+
background: `linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.00) 100%), ${themeColors[8]}`,
|
|
9
|
+
color: '#fff',
|
|
10
|
+
borderRadius: '8px',
|
|
11
|
+
marginTop: '30px',
|
|
12
|
+
marginBottom: '60px',
|
|
13
|
+
...style,
|
|
14
|
+
}, ...props, children: label.trim() }));
|
|
15
|
+
//# sourceMappingURL=Button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.js","sourceRoot":"src/","sources":["components/Button.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,IAAI,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAWjE,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,EACrB,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,WAAW,EACX,KAAK,EACL,GAAG,KAAK,EACF,EAAE,EAAE,CAAC,CACX,KAAC,gBAAgB,IACf,IAAI,EAAE,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,EACxC,KAAK,EAAE;QACL,KAAK,EAAE,MAAM;QACb,SAAS,EAAE,QAAQ;QACnB,OAAO,EAAE,OAAO;QAChB,OAAO,EAAE,QAAQ;QACjB,UAAU,EAAE,0FACV,WAAW,CAAC,CAAC,CACf,EAAE;QACF,KAAK,EAAE,MAAM;QACb,YAAY,EAAE,KAAK;QACnB,SAAS,EAAE,MAAM;QACjB,YAAY,EAAE,MAAM;QACpB,GAAG,KAAK;KACT,KACG,KAAK,YAER,KAAK,CAAC,IAAI,EAAE,GACI,CACpB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { EmailBaseProps } from '../types';
|
|
2
|
+
type Props = {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
title: string;
|
|
5
|
+
tenant: Omit<EmailBaseProps['tenant'], 'name'>;
|
|
6
|
+
mode: EmailBaseProps['mode'];
|
|
7
|
+
shortDescription?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const EmailContainer: (props: Props) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { Body } from '@react-email/body';
|
|
3
|
+
import { Font } from '@react-email/font';
|
|
4
|
+
import { Head } from '@react-email/head';
|
|
5
|
+
import { Hr } from '@react-email/hr';
|
|
6
|
+
import { Html } from '@react-email/html';
|
|
7
|
+
import { Img } from '@react-email/img';
|
|
8
|
+
import { Preview } from '@react-email/preview';
|
|
9
|
+
import { Text } from '@react-email/text';
|
|
10
|
+
export const EmailContainer = (props) => {
|
|
11
|
+
const { children, shortDescription, title } = props;
|
|
12
|
+
const contentWrapperStyle = {
|
|
13
|
+
paddingInline: '20px',
|
|
14
|
+
paddingBlock: '10px',
|
|
15
|
+
maxWidth: '500px',
|
|
16
|
+
margin: '0 auto',
|
|
17
|
+
};
|
|
18
|
+
if (props.mode !== 'send') {
|
|
19
|
+
return (_jsx("div", { style: contentWrapperStyle, children: _jsx(Content, { ...props, children: children }) }));
|
|
20
|
+
}
|
|
21
|
+
return (_jsxs(Html, { lang: "en", children: [_jsxs(Head, { children: [_jsx("title", { children: title }), _jsx(Font, { fontFamily: "Inter", fallbackFontFamily: "Verdana", webFont: {
|
|
22
|
+
url: 'https://fonts.gstatic.com/s/inter/v13/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa1ZL7W0Q5nw.woff2',
|
|
23
|
+
format: 'woff2',
|
|
24
|
+
}, fontWeight: 400, fontStyle: "normal" }), _jsx(Font, { fontFamily: "Inter", fallbackFontFamily: "Verdana", webFont: {
|
|
25
|
+
url: 'https://fonts.gstatic.com/s/inter/v13/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa1ZL7W0Q5nw.woff2',
|
|
26
|
+
format: 'woff2',
|
|
27
|
+
}, fontWeight: 600, fontStyle: "normal" })] }), shortDescription && _jsx(Preview, { children: shortDescription }), _jsx(Body, { style: contentWrapperStyle, children: _jsx(Content, { ...props, children: children }) })] }));
|
|
28
|
+
};
|
|
29
|
+
const Content = ({ children, tenant: { logo: tenantLogo }, mode }) => {
|
|
30
|
+
return (_jsxs(_Fragment, { children: [tenantLogo ? (_jsx("div", { style: {
|
|
31
|
+
marginBottom: '60px',
|
|
32
|
+
padding: '5px',
|
|
33
|
+
// border: '1px solid rgb(233,236,239)',
|
|
34
|
+
borderRadius: '5px',
|
|
35
|
+
width: '80px',
|
|
36
|
+
display: 'flex',
|
|
37
|
+
justifyContent: 'center',
|
|
38
|
+
alignItems: 'center',
|
|
39
|
+
}, children: _jsx(Img, { src: tenantLogo, alt: 'Logo', width: 70 }) })) : mode === 'send' ? (_jsx(Img, { src: 'https://staging.portal.vrplatform.app/logo.png', alt: 'Logo', width: 70, style: { marginBottom: '60px' } })) : (_jsx("div", { style: {
|
|
40
|
+
width: '60px',
|
|
41
|
+
}, children: _jsx(VrpLogo, {}) })), children, _jsx(Footer, {})] }));
|
|
42
|
+
};
|
|
43
|
+
const Footer = () => (_jsxs(_Fragment, { children: [_jsx(Hr, { style: {
|
|
44
|
+
marginTop: '30px',
|
|
45
|
+
marginBottom: '50px',
|
|
46
|
+
} }), _jsxs(Text, { style: {
|
|
47
|
+
color: '#737373',
|
|
48
|
+
}, children: ["\u00A9 ", new Date().getFullYear(), " VRPlatform Ventures Ltd. All rights reserved."] }), _jsx(Text, { style: {
|
|
49
|
+
color: '#737373',
|
|
50
|
+
}, children: "VR Technologies, LLC, a company incorporated and registered in the United States of America with company number 20201965158" })] }));
|
|
51
|
+
const VrpLogo = () => (_jsxs("svg", { width: "100%", height: "100%", viewBox: "0 0 28 29", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("path", { d: "M18.2549 8.25161C18.2549 5.89704 20.1636 3.98828 22.5182 3.98828C24.8728 3.98828 26.7815 5.89704 26.7815 8.25161C26.7815 10.6062 24.8728 12.5149 22.5182 12.5149C20.1636 12.5149 18.2549 10.6062 18.2549 8.25161Z", fill: "#172554" }), _jsx("path", { d: "M7.02441 8.46593C7.02441 6.01867 9.20858 3.99805 11.6558 3.99805C14.1031 3.99805 15.0558 5.59785 16.5612 7.52728C17.1957 8.34054 20.7921 13.3413 20.7921 13.3413C20.7921 13.3413 21.566 14.6863 21.566 15.7894C21.566 18.5287 17.1993 22.8381 17.1993 22.8381L7.66841 10.6799C7.66841 10.6799 7.02441 10.0502 7.02441 8.46593Z", fill: "#172554", fillOpacity: "0.8" }), _jsx("path", { d: "M1.24707 8.42687C1.24707 5.97961 3.43123 3.95898 5.8785 3.95898C8.32576 3.95898 9.27845 5.55879 10.7839 7.48824C11.4184 8.30147 14.6041 12.4888 16.8247 15.5727C18.3585 17.703 18.474 17.705 18.474 20.3439C18.474 22.9827 15.1592 24.1379 14.1483 24.1914C12.0203 24.304 10.5418 22.4681 10.5418 22.4681L1.89106 10.6408C1.89106 10.6408 1.24707 10.0111 1.24707 8.42687Z", fill: "#172554" })] }));
|
|
52
|
+
//# sourceMappingURL=EmailContainer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmailContainer.js","sourceRoot":"src/","sources":["components/EmailContainer.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB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E;gBACL,KAAK,EAAE,SAAS;aACjB,4IAII,IACN,CACJ,CAAC;AAEF,MAAM,OAAO,GAAG,GAAG,EAAE,CAAC,CACpB,eACE,KAAK,EAAC,MAAM,EACZ,MAAM,EAAC,MAAM,EACb,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,4BAA4B,aAElC,eACE,CAAC,EAAC,mNAAmN,EACrN,IAAI,EAAC,SAAS,GACd,EACF,eACE,CAAC,EAAC,gUAAgU,EAClU,IAAI,EAAC,SAAS,EACd,WAAW,EAAC,KAAK,GACjB,EACF,eACE,CAAC,EAAC,4WAA4W,EAC9W,IAAI,EAAC,SAAS,GACd,IACE,CACP,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["components/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './parse-email-html';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["components/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export const parseEmailHtml = (html, args) => {
|
|
2
|
+
// parse out any html scripts of type : <team-name-component></team-name-component> or <user-name-component></user-name-component>
|
|
3
|
+
// and replace them with the appropriate component
|
|
4
|
+
// return the parsed html
|
|
5
|
+
return html
|
|
6
|
+
.replaceAll(/<action\-link\-component><\/action\-link\-component>/g, `<a href="${args.href}" target="_blank">${args.href}</a>`)
|
|
7
|
+
.replaceAll(/<user\-name\-component><\/user\-name\-component>/g, args.userName)
|
|
8
|
+
.replaceAll(/<listing\-name\-component><\/listing\-name\-component>/g, args.listingName)
|
|
9
|
+
.replaceAll(/<date\-component><\/date\-component>/g, args.date);
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=parse-email-html.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse-email-html.js","sourceRoot":"src/","sources":["components/utils/parse-email-html.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG,CAC5B,IAAY,EACZ,IAKC,EACD,EAAE;IACF,kIAAkI;IAClI,kDAAkD;IAClD,yBAAyB;IAEzB,OAAO,IAAI;SACR,UAAU,CACT,uDAAuD,EACvD,YAAY,IAAI,CAAC,IAAI,qBAAqB,IAAI,CAAC,IAAI,MAAM,CAC1D;SACA,UAAU,CACT,mDAAmD,EACnD,IAAI,CAAC,QAAQ,CACd;SACA,UAAU,CACT,yDAAyD,EACzD,IAAI,CAAC,WAAW,CACjB;SACA,UAAU,CAAC,uCAAuC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;AACpE,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { describe, expect, it } from 'bun:test';
|
|
2
|
+
import { parseEmailHtml } from './parse-email-html';
|
|
3
|
+
describe('parseEmailHtml', () => {
|
|
4
|
+
it('should replace <action-link-component></action-link-component> with the sign-in link anchor tag', () => {
|
|
5
|
+
const html = '<div><action-link-component></action-link-component></div>';
|
|
6
|
+
const args = {
|
|
7
|
+
href: 'https://example.com/signin',
|
|
8
|
+
userName: 'John Doe',
|
|
9
|
+
date: '2023-01-01',
|
|
10
|
+
listingName: '123 Main St',
|
|
11
|
+
};
|
|
12
|
+
const result = parseEmailHtml(html, args);
|
|
13
|
+
expect(result).toBe('<div><a href="https://example.com/signin" target="_blank">https://example.com/signin</a></div>');
|
|
14
|
+
});
|
|
15
|
+
it('should replace <user-name-component></user-name-component> with the user name', () => {
|
|
16
|
+
const html = '<div>Hello <user-name-component></user-name-component>!</div>';
|
|
17
|
+
const args = {
|
|
18
|
+
href: 'https://example.com/signin',
|
|
19
|
+
userName: 'John Doe',
|
|
20
|
+
date: '2023-01-01',
|
|
21
|
+
listingName: '123 Main St',
|
|
22
|
+
};
|
|
23
|
+
const result = parseEmailHtml(html, args);
|
|
24
|
+
expect(result).toBe('<div>Hello John Doe!</div>');
|
|
25
|
+
});
|
|
26
|
+
it('should replace both <action-link-component> and <user-name-component> appropriately', () => {
|
|
27
|
+
const html = `
|
|
28
|
+
<div>
|
|
29
|
+
<action-link-component></action-link-component>
|
|
30
|
+
<user-name-component></user-name-component>
|
|
31
|
+
</div>
|
|
32
|
+
`;
|
|
33
|
+
const args = {
|
|
34
|
+
href: 'https://example.com/signin',
|
|
35
|
+
userName: 'Jane Doe',
|
|
36
|
+
date: '2023-01-01',
|
|
37
|
+
listingName: '123 Main St',
|
|
38
|
+
};
|
|
39
|
+
const result = parseEmailHtml(html, args);
|
|
40
|
+
expect(result).toBe(`
|
|
41
|
+
<div>
|
|
42
|
+
<a href="https://example.com/signin" target="_blank">https://example.com/signin</a>
|
|
43
|
+
Jane Doe
|
|
44
|
+
</div>
|
|
45
|
+
`);
|
|
46
|
+
});
|
|
47
|
+
it('should return the input HTML unchanged if there are no components to replace', () => {
|
|
48
|
+
const html = '<div>No components to replace here</div>';
|
|
49
|
+
const args = {
|
|
50
|
+
href: 'https://example.com/signin',
|
|
51
|
+
userName: 'John Doe',
|
|
52
|
+
date: '2023-01-01',
|
|
53
|
+
listingName: '123 Main St',
|
|
54
|
+
};
|
|
55
|
+
const result = parseEmailHtml(html, args);
|
|
56
|
+
expect(result).toBe('<div>No components to replace here</div>');
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
//# sourceMappingURL=parse-email-html.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse-email-html.test.js","sourceRoot":"src/","sources":["components/utils/parse-email-html.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,M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8EAA8E,EAAE,GAAG,EAAE;QACtF,MAAM,IAAI,GAAG,0CAA0C,CAAC;QACxD,MAAM,IAAI,GAAyC;YACjD,IAAI,EAAE,4BAA4B;YAClC,QAAQ,EAAE,UAAU;YACpB,IAAI,EAAE,YAAY;YAClB,WAAW,EAAE,aAAa;SAC3B,CAAC;QACF,MAAM,MAAM,GAAG,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAC1C,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,0CAA0C,CAAC,CAAC;IAClE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"const.js","sourceRoot":"src/","sources":["const.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,IAAI,EAAE,YAAY;IAClB,IAAI,EAAE,8BAA8B;IACpC,MAAM,EAAE,+BAA+B;IACvC,IAAI,EAAE,uEAAuE;CACrE,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const EMAIL_USER_NAME_COMPONENT = "<user-name-component></user-name-component>";
|
|
2
|
+
export declare const EMAIL_ACTION_LINK_COMPONENT = "<action-link-component></action-link-component>";
|
|
3
|
+
export declare const EMAIL_LISTING_COMPONENT = "<listing-name-component></listing-name-component>";
|
|
4
|
+
export declare const EMAIL_DATE_COMPONENT = "<date-component></date-component>";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export const EMAIL_USER_NAME_COMPONENT = '<user-name-component></user-name-component>';
|
|
2
|
+
export const EMAIL_ACTION_LINK_COMPONENT = '<action-link-component></action-link-component>';
|
|
3
|
+
export const EMAIL_LISTING_COMPONENT = '<listing-name-component></listing-name-component>';
|
|
4
|
+
export const EMAIL_DATE_COMPONENT = '<date-component></date-component>';
|
|
5
|
+
//# sourceMappingURL=extensions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extensions.js","sourceRoot":"src/","sources":["extensions.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,yBAAyB,GACpC,6CAA6C,CAAC;AAChD,MAAM,CAAC,MAAM,2BAA2B,GACtC,iDAAiD,CAAC;AACpD,MAAM,CAAC,MAAM,uBAAuB,GAClC,mDAAmD,CAAC;AACtD,MAAM,CAAC,MAAM,oBAAoB,GAAG,mCAAmC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC,CAAC,mBAAmB;AAC5C,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAGvC,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ActionEmailData, type ActionEmailTemplateProps } from '../components';
|
|
2
|
+
export declare const getDefaultInviteOwnerEmailData: (mode: "tag" | "text", args: {
|
|
3
|
+
appName: string;
|
|
4
|
+
signInLink: string;
|
|
5
|
+
}) => ActionEmailData;
|
|
6
|
+
export declare const InviteOwnerEmailTemplate: (props: ActionEmailTemplateProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare const Preview: () => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default Preview;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { EMAIL_ACTION_LINK_COMPONENT } from '../extensions';
|
|
3
|
+
import { ActionEmailTemplate, } from '../components';
|
|
4
|
+
export const getDefaultInviteOwnerEmailData = (mode, args) => {
|
|
5
|
+
const signInLink = mode === 'tag' ? EMAIL_ACTION_LINK_COMPONENT : args.signInLink;
|
|
6
|
+
return {
|
|
7
|
+
bodyOne: `<p>You are invited to join us on ${args.appName}.</p><p>To start using ${args.appName}, accept the invitation and verify your email address.</p>`,
|
|
8
|
+
bodyTwo: `<p>If you have any trouble with the button, you can copy and paste the link below into your browser: ${signInLink}</p>`,
|
|
9
|
+
buttonText: 'Accept Invitation',
|
|
10
|
+
header: 'Welcome to the team!',
|
|
11
|
+
shortDescription: 'You have been invited to join the team. To start using VRPlatform, verify your email address at link below.',
|
|
12
|
+
href: args.signInLink,
|
|
13
|
+
subject: `You are invited to join your team on ${args.appName}`,
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export const InviteOwnerEmailTemplate = (props) => {
|
|
17
|
+
return _jsx(ActionEmailTemplate, { ...props });
|
|
18
|
+
};
|
|
19
|
+
const Preview = () => (_jsx(ActionEmailTemplate, { mode: "send", tenant: {
|
|
20
|
+
name: 'Pineapple Mountain',
|
|
21
|
+
logo: 'https://imagedelivery.net/Ftdv9WftbW1DctaiLSVfFA/fbd8c31f-478f-4eb0-74ac-c8eeb47b5000/256x256',
|
|
22
|
+
}, data: getDefaultInviteOwnerEmailData('text', {
|
|
23
|
+
appName: 'VRPlatform',
|
|
24
|
+
signInLink: 'https://example.com',
|
|
25
|
+
}), user: {
|
|
26
|
+
firstName: 'John',
|
|
27
|
+
}, listing: undefined, month: undefined, themeColors: [
|
|
28
|
+
// portal.brown
|
|
29
|
+
'#9E9390',
|
|
30
|
+
'#8D7C78',
|
|
31
|
+
'#7C6964',
|
|
32
|
+
'#6E5954',
|
|
33
|
+
'#614B46',
|
|
34
|
+
'#573F39',
|
|
35
|
+
'#4E342E',
|
|
36
|
+
'#3F2D29',
|
|
37
|
+
'#332725',
|
|
38
|
+
'#2A2220',
|
|
39
|
+
] }));
|
|
40
|
+
export default Preview;
|
|
41
|
+
//# sourceMappingURL=InviteOwnerEmailTemplate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InviteOwnerEmailTemplate.js","sourceRoot":"src/","sources":["templates/InviteOwnerEmailTemplate.tsx"],"names":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AS;QACT,SAAS;QACT,SAAS;QACT,SAAS;KACV,GACD,CACH,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ActionEmailData, type ActionEmailTemplateProps } from '../components';
|
|
2
|
+
export declare const getDefaultInvitePropertyManagerEmailData: (mode: "tag" | "text", args: {
|
|
3
|
+
appName: string;
|
|
4
|
+
signInLink: string;
|
|
5
|
+
}) => ActionEmailData;
|
|
6
|
+
export declare const InvitePmEmailTemplate: (props: ActionEmailTemplateProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare const Preview: () => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default Preview;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { EMAIL_ACTION_LINK_COMPONENT } from '../extensions';
|
|
3
|
+
import { ActionEmailTemplate, } from '../components';
|
|
4
|
+
export const getDefaultInvitePropertyManagerEmailData = (mode, args) => {
|
|
5
|
+
const signInLink = mode === 'tag'
|
|
6
|
+
? EMAIL_ACTION_LINK_COMPONENT
|
|
7
|
+
: `<a href='${args.signInLink}' target='_blank'>${args.signInLink}</a>`;
|
|
8
|
+
return {
|
|
9
|
+
bodyOne: `<p>You are invited to join us on ${args.appName}.</p><p>To start using ${args.appName}, accept the invitation and verify your email address.</p>`,
|
|
10
|
+
bodyTwo: `<p>If you have any trouble with the button, you can use the following link below: ${signInLink}</p>`,
|
|
11
|
+
buttonText: 'Accept Invitation',
|
|
12
|
+
header: 'Welcome to the team!',
|
|
13
|
+
shortDescription: 'You have been invited to join the team. To start using VRPlatform, verify your email address at link below.',
|
|
14
|
+
href: args.signInLink,
|
|
15
|
+
subject: `You are invited to join your team on ${args.appName}`,
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export const InvitePmEmailTemplate = (props) => {
|
|
19
|
+
return (_jsx(ActionEmailTemplate, { ...props, tenant: {
|
|
20
|
+
logo: undefined,
|
|
21
|
+
name: props.tenant.name,
|
|
22
|
+
} }));
|
|
23
|
+
};
|
|
24
|
+
const Preview = () => (_jsx(ActionEmailTemplate, { mode: "send", tenant: {
|
|
25
|
+
name: 'Pineapple Mountain',
|
|
26
|
+
logo: 'https://imagedelivery.net/Ftdv9WftbW1DctaiLSVfFA/fbd8c31f-478f-4eb0-74ac-c8eeb47b5000/256x256',
|
|
27
|
+
}, data: {
|
|
28
|
+
bodyOne: 'Hello, <br /> <br /> You have been invited to join Pineapple Mountain. <br /> <br />',
|
|
29
|
+
bodyTwo: 'Please click the button below to accept the invitation. <br /> <br />',
|
|
30
|
+
buttonText: 'Accept Invitation',
|
|
31
|
+
header: 'Welcome to Pineapple Mountain!',
|
|
32
|
+
shortDescription: 'You have been invited to join Pineapple Mountain.',
|
|
33
|
+
href: 'https://example.com',
|
|
34
|
+
subject: 'You are invited to join Pineapple Mountain',
|
|
35
|
+
}, user: {
|
|
36
|
+
firstName: 'John',
|
|
37
|
+
}, listing: undefined, month: undefined, themeColors: [
|
|
38
|
+
// baseColor: vrp primary palette
|
|
39
|
+
'#E6F1FF',
|
|
40
|
+
'#B8D9FE',
|
|
41
|
+
'#8BC0FE',
|
|
42
|
+
'#5DA8FD',
|
|
43
|
+
'#308FFD',
|
|
44
|
+
'#0377FC',
|
|
45
|
+
'#025FCA',
|
|
46
|
+
'#024797',
|
|
47
|
+
'#012F65',
|
|
48
|
+
'#011832',
|
|
49
|
+
] }));
|
|
50
|
+
export default Preview;
|
|
51
|
+
//# sourceMappingURL=InvitePmEmailTemplate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InvitePmEmailTemplate.js","sourceRoot":"src/","sources":["templates/InvitePmEmailTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAEL,mBAAmB,GAEpB,MAAM,eAAe,CAAC;AAEvB,MAAM,CAAC,MAAM,w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EAChB,WAAW,EAAE;QACX,iCAAiC;QACjC,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;KACV,GACD,CACH,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type ActionEmailData, type ActionEmailTemplateProps } from '../components/ActionEmailTemplate';
|
|
2
|
+
export declare const getDefaultOwnerStatementEmailData: (mode: "tag" | "text", args: {
|
|
3
|
+
appName: string;
|
|
4
|
+
ownerStatementHref: string;
|
|
5
|
+
listingName: string;
|
|
6
|
+
userName: string;
|
|
7
|
+
month: string;
|
|
8
|
+
}) => ActionEmailData;
|
|
9
|
+
export declare const OwnerStatementEmailTemplate: (props: ActionEmailTemplateProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare const Preview: () => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default Preview;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { EMAIL_ACTION_LINK_COMPONENT, EMAIL_DATE_COMPONENT, EMAIL_LISTING_COMPONENT, EMAIL_USER_NAME_COMPONENT, } from '../extensions';
|
|
3
|
+
import { ActionEmailTemplate, } from '../components/ActionEmailTemplate';
|
|
4
|
+
export const getDefaultOwnerStatementEmailData = (mode, args) => {
|
|
5
|
+
const ownerStatementHref = mode === 'tag' ? EMAIL_ACTION_LINK_COMPONENT : args.ownerStatementHref;
|
|
6
|
+
const listingName = mode === 'tag' ? EMAIL_LISTING_COMPONENT : args.listingName;
|
|
7
|
+
const month = mode === 'tag' ? EMAIL_DATE_COMPONENT : args.month;
|
|
8
|
+
const userName = mode === 'tag' ? EMAIL_USER_NAME_COMPONENT : args.userName;
|
|
9
|
+
return {
|
|
10
|
+
subject: 'Owner statement was published',
|
|
11
|
+
shortDescription: `An owner statement is ready for you. Log in to ${args.appName} now to view it.`,
|
|
12
|
+
header: 'Owner statement was published',
|
|
13
|
+
bodyOne: `<p>Hi ${userName},<p>Your ${month} owner statement for property ${listingName} is ready for your review on ${args.appName}.</p><p>To access your statement, please click the button below:</p>`,
|
|
14
|
+
buttonText: 'View Owner statement',
|
|
15
|
+
bodyTwo: `<p>If you have any trouble with the button, you can copy and paste the link below into your browser: ${ownerStatementHref}</p>`,
|
|
16
|
+
href: args.ownerStatementHref,
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export const OwnerStatementEmailTemplate = (props) => {
|
|
20
|
+
return _jsx(ActionEmailTemplate, { ...props });
|
|
21
|
+
};
|
|
22
|
+
const Preview = () => {
|
|
23
|
+
const defaultListing = '1502 Amelia Way';
|
|
24
|
+
const defaultMonth = `May ${new Date().getFullYear()}`;
|
|
25
|
+
const defaultName = 'John';
|
|
26
|
+
return (_jsx(ActionEmailTemplate, { mode: "send", tenant: {
|
|
27
|
+
name: 'Pineapple Mountain',
|
|
28
|
+
logo: 'https://imagedelivery.net/Ftdv9WftbW1DctaiLSVfFA/fbd8c31f-478f-4eb0-74ac-c8eeb47b5000/256x256',
|
|
29
|
+
}, data: {
|
|
30
|
+
banner: 'This month there was a $1000 charge for the property. That charge was split between the two owners.',
|
|
31
|
+
...getDefaultOwnerStatementEmailData('text', {
|
|
32
|
+
appName: 'VRPlatform',
|
|
33
|
+
ownerStatementHref: 'https://example.com',
|
|
34
|
+
listingName: defaultListing,
|
|
35
|
+
month: defaultMonth,
|
|
36
|
+
userName: defaultName,
|
|
37
|
+
}),
|
|
38
|
+
}, user: {
|
|
39
|
+
firstName: 'John',
|
|
40
|
+
}, listing: defaultListing, month: defaultMonth, themeColors: [
|
|
41
|
+
// portal.brown
|
|
42
|
+
'#9E9390',
|
|
43
|
+
'#8D7C78',
|
|
44
|
+
'#7C6964',
|
|
45
|
+
'#6E5954',
|
|
46
|
+
'#614B46',
|
|
47
|
+
'#573F39',
|
|
48
|
+
'#4E342E',
|
|
49
|
+
'#3F2D29',
|
|
50
|
+
'#332725',
|
|
51
|
+
'#2A2220',
|
|
52
|
+
] }));
|
|
53
|
+
};
|
|
54
|
+
export default Preview;
|
|
55
|
+
//# sourceMappingURL=OwnerStatementEmailTemplate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OwnerStatementEmailTemplate.js","sourceRoot":"src/","sources":["templates/OwnerStatementEmailTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,2BAA2B,EAC3B,oBAAoB,EACpB,uBAAuB,EACvB,yBAAyB,GAC1B,MAAM,eAAe,CAAC;AACvB,OAAO,EAEL,mBAAmB,GAEpB,MAAM,mCAAmC,CAAC;AAE3C,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAC/C,IAAoB,EACpB,IAMC,EACgB,EAAE;IACnB,MAAM,kBAAkB,GACtB,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,2BAA2B,CAAC,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC;IAEzE,MAAM,WAAW,GACf,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC;IAC9D,MAAM,KAAK,GAAG,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC;IACjE,MAAM,QAAQ,GAAG,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC;IAE5E,OAAO;QACL,OAAO,EAAE,+BAA+B;QACxC,gBAAgB,EAAE,kDAAkD,IAAI,CAAC,OAAO,kBAAkB;QAClG,MAAM,EAAE,+BAA+B;QACvC,OAAO,EAAE,SAAS,QAAQ,YAAY,KAAK,iCAAiC,WAAW,gCAAgC,IAAI,CAAC,OAAO,sEAAsE;QACzM,UAAU,EAAE,sBAAsB;QAClC,OAAO,EAAE,wGAAwG,kBAAkB,MAAM;QACzI,IAAI,EAAE,IAAI,CAAC,kBAAkB;KAC9B,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAG,CACzC,KAA+B,EAC/B,EAAE;IACF,OAAO,KAAC,mBAAmB,OAAK,KAAK,GAAI,CAAC;AAC5C,CAAC,CAAC;AAEF,MAAM,OAAO,GAAG,GAAG,EAAE;IACnB,MAAM,cAAc,GAAG,iBAAiB,CAAC;IACzC,MAAM,YAAY,GAAG,OAAO,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,EAAE,CAAC;IACvD,MAAM,WAAW,GAAG,MAAM,CAAC;IAE3B,OAAO,CACL,KAAC,mBAAmB,IAClB,IAAI,EAAC,MAAM,EACX,MAAM,EAAE;YACN,IAAI,EAAE,oBAAoB;YAC1B,IAAI,EAAE,+FAA+F;SACtG,EACD,IAAI,EAAE;YACJ,MAAM,EACJ,qGAAqG;YACvG,GAAG,iCAAiC,CAAC,MAAM,EAAE;gBAC3C,OAAO,EAAE,YAAY;gBACrB,kBAAkB,EAAE,qBAAqB;gBACzC,WAAW,EAAE,cAAc;gBAC3B,KAAK,EAAE,YAAY;gBACnB,QAAQ,EAAE,WAAW;aACtB,CAAC;SACH,EACD,IAAI,EAAE;YACJ,SAAS,EAAE,MAAM;SAClB,EACD,OAAO,EAAE,cAAc,EACvB,KAAK,EAAE,YAAY,EACnB,WAAW,EAAE;YACX,eAAe;YACf,SAAS;YACT,SAAS;YACT,SAAS;YACT,SAAS;YACT,SAAS;YACT,SAAS;YACT,SAAS;YACT,SAAS;YACT,SAAS;YACT,SAAS;SACV,GACD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ActionEmailData, type ActionEmailTemplateProps } from '../components';
|
|
2
|
+
export declare const getDefaultOwnerStatementSummaryEmailData: (mode: "tag" | "text", args: {
|
|
3
|
+
appName: string;
|
|
4
|
+
ownerStatementHref: string;
|
|
5
|
+
userName: string;
|
|
6
|
+
}) => ActionEmailData;
|
|
7
|
+
export declare const OwnerStatementSummaryEmailTemplate: (props: ActionEmailTemplateProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare const Preview: () => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default Preview;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { ActionEmailTemplate, } from '../components';
|
|
3
|
+
import { EMAIL_ACTION_LINK_COMPONENT, EMAIL_USER_NAME_COMPONENT, } from '../extensions';
|
|
4
|
+
export const getDefaultOwnerStatementSummaryEmailData = (mode, args) => {
|
|
5
|
+
const ownerStatementHref = mode === 'tag' ? EMAIL_ACTION_LINK_COMPONENT : args.ownerStatementHref;
|
|
6
|
+
const userName = mode === 'tag' ? EMAIL_USER_NAME_COMPONENT : args.userName;
|
|
7
|
+
return {
|
|
8
|
+
subject: 'Summary statement is ready',
|
|
9
|
+
shortDescription: `An summary statement is ready for you. Log in to ${args.appName} to view it.`,
|
|
10
|
+
header: 'Summary is ready to view',
|
|
11
|
+
bodyOne: `<p>Hi ${userName},<p>A summary statement is ready for your review on ${args.appName}.</p><p>To access your statement, please click the button below:</p>`,
|
|
12
|
+
buttonText: 'View statement',
|
|
13
|
+
bodyTwo: `<p>If you have any trouble with the button, you can copy and paste the link below into your browser: ${ownerStatementHref}</p>`,
|
|
14
|
+
href: args.ownerStatementHref,
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export const OwnerStatementSummaryEmailTemplate = (props) => {
|
|
18
|
+
return _jsx(ActionEmailTemplate, { ...props });
|
|
19
|
+
};
|
|
20
|
+
const Preview = () => {
|
|
21
|
+
const defaultName = 'John';
|
|
22
|
+
return (_jsx(ActionEmailTemplate, { mode: "send", tenant: {
|
|
23
|
+
name: 'Pineapple Mountain',
|
|
24
|
+
logo: 'https://imagedelivery.net/Ftdv9WftbW1DctaiLSVfFA/fbd8c31f-478f-4eb0-74ac-c8eeb47b5000/256x256',
|
|
25
|
+
}, data: getDefaultOwnerStatementSummaryEmailData('text', {
|
|
26
|
+
appName: 'VRPlatform',
|
|
27
|
+
ownerStatementHref: 'https://example.com',
|
|
28
|
+
userName: defaultName,
|
|
29
|
+
}), user: {
|
|
30
|
+
firstName: 'John',
|
|
31
|
+
}, listing: undefined, month: undefined, themeColors: [
|
|
32
|
+
// portal.brown
|
|
33
|
+
'#9E9390',
|
|
34
|
+
'#8D7C78',
|
|
35
|
+
'#7C6964',
|
|
36
|
+
'#6E5954',
|
|
37
|
+
'#614B46',
|
|
38
|
+
'#573F39',
|
|
39
|
+
'#4E342E',
|
|
40
|
+
'#3F2D29',
|
|
41
|
+
'#332725',
|
|
42
|
+
'#2A2220',
|
|
43
|
+
] }));
|
|
44
|
+
};
|
|
45
|
+
export default Preview;
|
|
46
|
+
//# sourceMappingURL=OwnerStatementSummaryEmailTemplate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OwnerStatementSummaryEmailTemplate.js","sourceRoot":"src/","sources":["templates/OwnerStatementSummaryEmailTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAEL,mBAAmB,GAEpB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,2BAA2B,EAC3B,yBAAyB,GAC1B,MAAM,eAAe,CAAC;AAEvB,MAAM,CAAC,MAAM,wCAAwC,GAAG,CACtD,IAAoB,EACpB,IAIC,EACgB,EAAE;IACnB,MAAM,kBAAkB,GACtB,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,2BAA2B,CAAC,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC;IAEzE,MAAM,QAAQ,GAAG,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC;IAE5E,OAAO;QACL,OAAO,EAAE,4BAA4B;QACrC,gBAAgB,EAAE,oDAAoD,IAAI,CAAC,OAAO,cAAc;QAChG,MAAM,EAAE,0BAA0B;QAClC,OAAO,EAAE,SAAS,QAAQ,uDAAuD,IAAI,CAAC,OAAO,sEAAsE;QACnK,UAAU,EAAE,gBAAgB;QAC5B,OAAO,EAAE,wGAAwG,kBAAkB,MAAM;QACzI,IAAI,EAAE,IAAI,CAAC,kBAAkB;KAC9B,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAChD,KAA+B,EAC/B,EAAE;IACF,OAAO,KAAC,mBAAmB,OAAK,KAAK,GAAI,CAAC;AAC5C,CAAC,CAAC;AAEF,MAAM,OAAO,GAAG,GAAG,EAAE;IACnB,MAAM,WAAW,GAAG,MAAM,CAAC;IAE3B,OAAO,CACL,KAAC,mBAAmB,IAClB,IAAI,EAAC,MAAM,EACX,MAAM,EAAE;YACN,IAAI,EAAE,oBAAoB;YAC1B,IAAI,EAAE,+FAA+F;SACtG,EACD,IAAI,EAAE,wCAAwC,CAAC,MAAM,EAAE;YACrD,OAAO,EAAE,YAAY;YACrB,kBAAkB,EAAE,qBAAqB;YACzC,QAAQ,EAAE,WAAW;SACtB,CAAC,EACF,IAAI,EAAE;YACJ,SAAS,EAAE,MAAM;SAClB,EACD,OAAO,EAAE,SAAS,EAClB,KAAK,EAAE,SAAS,EAChB,WAAW,EAAE;YACX,eAAe;YACf,SAAS;YACT,SAAS;YACT,SAAS;YACT,SAAS;YACT,SAAS;YACT,SAAS;YACT,SAAS;YACT,SAAS;YACT,SAAS;YACT,SAAS;SACV,GACD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ActionEmailData, type ActionEmailTemplateProps } from '../components';
|
|
2
|
+
export declare const getDefaultOwnerTaxStatementEmailData: (mode: "tag" | "text", args: {
|
|
3
|
+
appName: string;
|
|
4
|
+
href: string;
|
|
5
|
+
firstName: string | undefined | null;
|
|
6
|
+
year: number;
|
|
7
|
+
}) => ActionEmailData;
|
|
8
|
+
export declare const OwnerTaxStatementEmailTemplate: (props: ActionEmailTemplateProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare const Preview: () => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default Preview;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { EMAIL_ACTION_LINK_COMPONENT, EMAIL_USER_NAME_COMPONENT, } from '../extensions';
|
|
3
|
+
import { ActionEmailTemplate, } from '../components';
|
|
4
|
+
export const getDefaultOwnerTaxStatementEmailData = (mode, args) => {
|
|
5
|
+
const href = mode === 'tag' ? EMAIL_ACTION_LINK_COMPONENT : args.href;
|
|
6
|
+
const firstName = mode === 'tag' ? EMAIL_USER_NAME_COMPONENT : args.firstName || 'there';
|
|
7
|
+
return {
|
|
8
|
+
subject: 'Your 1099 Tax Statement is ready',
|
|
9
|
+
shortDescription: `Your 1099 Tax Statement is ready for you. Log in to ${args.appName} to view it.`,
|
|
10
|
+
header: '1099 Tax Statement is ready',
|
|
11
|
+
bodyOne: `<p>Hi ${firstName},<p>Your 1099 tax statement for ${args.year} is now available for you to review on ${args.appName}.</p><p>Click below to see your tax statement before we send it to the IRS.</p><p>To update your tax statement details, log into your ${args.appName} account and navigate to Settings>Statement Details.</p><p>To view your annual summary statement, navigate to the Summary page from within your ${args.appName} account.</p><p>Simply reply to this email if you have any questions.</p>`,
|
|
12
|
+
buttonText: 'View tax statement',
|
|
13
|
+
bodyTwo: `<p>If you have any trouble with the button, you can copy and paste the link below into your browser: ${href}</p>`,
|
|
14
|
+
href: args.href,
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export const OwnerTaxStatementEmailTemplate = (props) => {
|
|
18
|
+
return _jsx(ActionEmailTemplate, { ...props });
|
|
19
|
+
};
|
|
20
|
+
const Preview = () => {
|
|
21
|
+
const defaultName = 'John';
|
|
22
|
+
return (_jsx(ActionEmailTemplate, { mode: "send", tenant: {
|
|
23
|
+
name: 'Pineapple Mountain',
|
|
24
|
+
logo: 'https://imagedelivery.net/Ftdv9WftbW1DctaiLSVfFA/fbd8c31f-478f-4eb0-74ac-c8eeb47b5000/256x256',
|
|
25
|
+
}, data: getDefaultOwnerTaxStatementEmailData('text', {
|
|
26
|
+
appName: 'VRPlatform',
|
|
27
|
+
href: 'https://example.com',
|
|
28
|
+
firstName: defaultName,
|
|
29
|
+
year: new Date().getFullYear(),
|
|
30
|
+
}), user: {
|
|
31
|
+
firstName: 'John',
|
|
32
|
+
}, listing: undefined, month: undefined, themeColors: [
|
|
33
|
+
// portal.brown
|
|
34
|
+
'#9E9390',
|
|
35
|
+
'#8D7C78',
|
|
36
|
+
'#7C6964',
|
|
37
|
+
'#6E5954',
|
|
38
|
+
'#614B46',
|
|
39
|
+
'#573F39',
|
|
40
|
+
'#4E342E',
|
|
41
|
+
'#3F2D29',
|
|
42
|
+
'#332725',
|
|
43
|
+
'#2A2220',
|
|
44
|
+
] }));
|
|
45
|
+
};
|
|
46
|
+
export default Preview;
|
|
47
|
+
//# sourceMappingURL=OwnerTaxStatementEmailTemplate.js.map
|