@vrplatform/email 1.0.2-stage.435 → 1.0.2-stage.43647680287
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/build/main/components/ActionEmailTemplate.d.ts +3 -1
- package/build/main/components/ActionEmailTemplate.js +9 -13
- package/build/main/components/ActionEmailTemplate.js.map +1 -1
- package/build/main/components/Button.js.map +1 -1
- package/build/main/components/EmailContainer.d.ts +4 -1
- package/build/main/components/EmailContainer.js +4 -3
- package/build/main/components/EmailContainer.js.map +1 -1
- package/build/main/components/EmailHeading.d.ts +8 -0
- package/build/main/components/EmailHeading.js +21 -0
- package/build/main/components/EmailHeading.js.map +1 -0
- package/build/main/components/index.d.ts +1 -0
- package/build/main/components/index.js +1 -0
- package/build/main/components/index.js.map +1 -1
- package/build/main/components/utils/parse-email-html.js +13 -4
- package/build/main/components/utils/parse-email-html.js.map +1 -1
- package/build/main/const.d.ts +4 -4
- package/build/main/index.d.ts +1 -1
- package/build/main/index.js +2 -3
- package/build/main/index.js.map +1 -1
- package/build/main/render.d.ts +2 -0
- package/build/main/render.js +24 -0
- package/build/main/render.js.map +1 -0
- package/build/main/templates/BankAccountChangedEmailTemplate.d.ts +12 -0
- package/build/main/templates/BankAccountChangedEmailTemplate.js +12 -0
- package/build/main/templates/BankAccountChangedEmailTemplate.js.map +1 -0
- package/build/main/templates/BankAccountChangedTeamAdminEmailTemplate.d.ts +17 -0
- package/build/main/templates/BankAccountChangedTeamAdminEmailTemplate.js +12 -0
- package/build/main/templates/BankAccountChangedTeamAdminEmailTemplate.js.map +1 -0
- package/build/main/templates/BankDetailsRequestEmailTemplate.d.ts +17 -0
- package/build/main/templates/BankDetailsRequestEmailTemplate.js +15 -0
- package/build/main/templates/BankDetailsRequestEmailTemplate.js.map +1 -0
- package/build/main/templates/InviteOwnerEmailTemplate.d.ts +2 -2
- package/build/main/templates/InviteOwnerEmailTemplate.js +1 -1
- package/build/main/templates/InviteOwnerEmailTemplate.js.map +1 -1
- package/build/main/templates/InvitePmEmailTemplate.d.ts +2 -1
- package/build/main/templates/InvitePmEmailTemplate.js +4 -7
- package/build/main/templates/InvitePmEmailTemplate.js.map +1 -1
- package/build/main/templates/OwnerStatementEmailTemplate.d.ts +6 -3
- package/build/main/templates/OwnerStatementEmailTemplate.js +70 -9
- package/build/main/templates/OwnerStatementEmailTemplate.js.map +1 -1
- package/build/main/templates/SecondFactorResetEmailTemplate.d.ts +11 -0
- package/build/main/templates/SecondFactorResetEmailTemplate.js +19 -0
- package/build/main/templates/SecondFactorResetEmailTemplate.js.map +1 -0
- package/build/main/templates/Tax1099EmailTemplate.d.ts +13 -0
- package/build/main/templates/Tax1099EmailTemplate.js +61 -0
- package/build/main/templates/Tax1099EmailTemplate.js.map +1 -0
- package/build/main/templates/TeamApiTokenCreatedEmailTemplate.d.ts +10 -0
- package/build/main/templates/TeamApiTokenCreatedEmailTemplate.js +12 -0
- package/build/main/templates/TeamApiTokenCreatedEmailTemplate.js.map +1 -0
- package/build/main/templates/TeamInviteOutsideDomainEmailTemplate.d.ts +11 -0
- package/build/main/templates/TeamInviteOutsideDomainEmailTemplate.js +12 -0
- package/build/main/templates/TeamInviteOutsideDomainEmailTemplate.js.map +1 -0
- package/build/main/templates/TeamRoleGrantedEmailTemplate.d.ts +12 -0
- package/build/main/templates/TeamRoleGrantedEmailTemplate.js +12 -0
- package/build/main/templates/TeamRoleGrantedEmailTemplate.js.map +1 -0
- package/build/main/templates/TenantDeletionEmailTemplate.js +2 -6
- package/build/main/templates/TenantDeletionEmailTemplate.js.map +1 -1
- package/build/main/templates/TenantSuspensionEmailTemplate.js +2 -6
- package/build/main/templates/TenantSuspensionEmailTemplate.js.map +1 -1
- package/build/main/templates/index.d.ts +8 -0
- package/build/main/templates/index.js +10 -0
- package/build/main/templates/index.js.map +1 -1
- package/build/main/theme.js.map +1 -1
- package/build/main/types.d.ts +3 -0
- package/build/main/types.js.map +1 -1
- package/build/main/utils/find-postmark-email.d.ts +8 -0
- package/build/main/utils/find-postmark-email.js +88 -0
- package/build/main/utils/find-postmark-email.js.map +1 -0
- package/build/main/utils/index.d.ts +1 -0
- package/build/main/utils/index.js +1 -0
- package/build/main/utils/index.js.map +1 -1
- package/build/main/utils/send-email.d.ts +28 -3
- package/build/main/utils/send-email.js +142 -22
- package/build/main/utils/send-email.js.map +1 -1
- package/build/module/components/ActionEmailTemplate.d.ts +3 -1
- package/build/module/components/ActionEmailTemplate.js +9 -13
- package/build/module/components/ActionEmailTemplate.js.map +1 -1
- package/build/module/components/EmailContainer.d.ts +4 -1
- package/build/module/components/EmailContainer.js +5 -4
- package/build/module/components/EmailContainer.js.map +1 -1
- package/build/module/components/EmailHeading.d.ts +8 -0
- package/build/module/components/EmailHeading.js +17 -0
- package/build/module/components/EmailHeading.js.map +1 -0
- package/build/module/components/index.d.ts +1 -0
- package/build/module/components/index.js +1 -0
- package/build/module/components/index.js.map +1 -1
- package/build/module/components/utils/parse-email-html.js +13 -4
- package/build/module/components/utils/parse-email-html.js.map +1 -1
- package/build/module/const.d.ts +4 -4
- package/build/module/index.d.ts +1 -1
- package/build/module/index.js +1 -1
- package/build/module/index.js.map +1 -1
- package/build/module/render.d.ts +2 -0
- package/build/module/render.js +20 -0
- package/build/module/render.js.map +1 -0
- package/build/module/templates/BankAccountChangedEmailTemplate.d.ts +12 -0
- package/build/module/templates/BankAccountChangedEmailTemplate.js +8 -0
- package/build/module/templates/BankAccountChangedEmailTemplate.js.map +1 -0
- package/build/module/templates/BankAccountChangedTeamAdminEmailTemplate.d.ts +17 -0
- package/build/module/templates/BankAccountChangedTeamAdminEmailTemplate.js +8 -0
- package/build/module/templates/BankAccountChangedTeamAdminEmailTemplate.js.map +1 -0
- package/build/module/templates/BankDetailsRequestEmailTemplate.d.ts +17 -0
- package/build/module/templates/BankDetailsRequestEmailTemplate.js +11 -0
- package/build/module/templates/BankDetailsRequestEmailTemplate.js.map +1 -0
- package/build/module/templates/InviteOwnerEmailTemplate.d.ts +2 -2
- package/build/module/templates/InviteOwnerEmailTemplate.js +1 -1
- package/build/module/templates/InviteOwnerEmailTemplate.js.map +1 -1
- package/build/module/templates/InvitePmEmailTemplate.d.ts +2 -1
- package/build/module/templates/InvitePmEmailTemplate.js +4 -7
- package/build/module/templates/InvitePmEmailTemplate.js.map +1 -1
- package/build/module/templates/OwnerStatementEmailTemplate.d.ts +6 -3
- package/build/module/templates/OwnerStatementEmailTemplate.js +71 -10
- package/build/module/templates/OwnerStatementEmailTemplate.js.map +1 -1
- package/build/module/templates/SecondFactorResetEmailTemplate.d.ts +11 -0
- package/build/module/templates/SecondFactorResetEmailTemplate.js +15 -0
- package/build/module/templates/SecondFactorResetEmailTemplate.js.map +1 -0
- package/build/module/templates/Tax1099EmailTemplate.d.ts +13 -0
- package/build/module/templates/Tax1099EmailTemplate.js +56 -0
- package/build/module/templates/Tax1099EmailTemplate.js.map +1 -0
- package/build/module/templates/TeamApiTokenCreatedEmailTemplate.d.ts +10 -0
- package/build/module/templates/TeamApiTokenCreatedEmailTemplate.js +8 -0
- package/build/module/templates/TeamApiTokenCreatedEmailTemplate.js.map +1 -0
- package/build/module/templates/TeamInviteOutsideDomainEmailTemplate.d.ts +11 -0
- package/build/module/templates/TeamInviteOutsideDomainEmailTemplate.js +8 -0
- package/build/module/templates/TeamInviteOutsideDomainEmailTemplate.js.map +1 -0
- package/build/module/templates/TeamRoleGrantedEmailTemplate.d.ts +12 -0
- package/build/module/templates/TeamRoleGrantedEmailTemplate.js +8 -0
- package/build/module/templates/TeamRoleGrantedEmailTemplate.js.map +1 -0
- package/build/module/templates/TenantDeletionEmailTemplate.js +3 -7
- package/build/module/templates/TenantDeletionEmailTemplate.js.map +1 -1
- package/build/module/templates/TenantSuspensionEmailTemplate.js +3 -7
- package/build/module/templates/TenantSuspensionEmailTemplate.js.map +1 -1
- package/build/module/templates/index.d.ts +8 -0
- package/build/module/templates/index.js +10 -0
- package/build/module/templates/index.js.map +1 -1
- package/build/module/types.d.ts +3 -0
- package/build/module/types.js.map +1 -1
- package/build/module/utils/find-postmark-email.d.ts +8 -0
- package/build/module/utils/find-postmark-email.js +52 -0
- package/build/module/utils/find-postmark-email.js.map +1 -0
- package/build/module/utils/index.d.ts +1 -0
- package/build/module/utils/index.js +1 -0
- package/build/module/utils/index.js.map +1 -1
- package/build/module/utils/send-email.d.ts +28 -3
- package/build/module/utils/send-email.js +108 -22
- package/build/module/utils/send-email.js.map +1 -1
- package/package.json +8 -7
- package/src/components/ActionEmailTemplate.tsx +14 -16
- package/src/components/EmailContainer.tsx +20 -4
- package/src/components/EmailHeading.tsx +36 -0
- package/src/components/index.ts +1 -0
- package/src/components/utils/parse-email-html.ts +20 -6
- package/src/index.ts +1 -1
- package/src/render.ts +24 -0
- package/src/templates/BankAccountChangedEmailTemplate.tsx +53 -0
- package/src/templates/BankAccountChangedTeamAdminEmailTemplate.tsx +55 -0
- package/src/templates/BankDetailsRequestEmailTemplate.tsx +63 -0
- package/src/templates/InviteOwnerEmailTemplate.tsx +1 -0
- package/src/templates/InvitePmEmailTemplate.tsx +5 -7
- package/src/templates/OwnerStatementEmailTemplate.tsx +178 -14
- package/src/templates/SecondFactorResetEmailTemplate.tsx +71 -0
- package/src/templates/Tax1099EmailTemplate.tsx +100 -0
- package/src/templates/TeamApiTokenCreatedEmailTemplate.tsx +50 -0
- package/src/templates/TeamInviteOutsideDomainEmailTemplate.tsx +52 -0
- package/src/templates/TeamRoleGrantedEmailTemplate.tsx +54 -0
- package/src/templates/TenantDeletionEmailTemplate.tsx +9 -10
- package/src/templates/TenantSuspensionEmailTemplate.tsx +9 -10
- package/src/templates/index.ts +12 -0
- package/src/types.ts +3 -0
- package/src/utils/find-postmark-email.ts +80 -0
- package/src/utils/index.ts +1 -0
- package/src/utils/send-email.ts +184 -28
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmailContainer.js","sourceRoot":"src/","sources":["components/EmailContainer.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EA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,8CACV,EACP,KAAC,IAAI,IACH,KAAK,EAAE;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","sourcesContent":["import { Body } from '@react-email/body';\nimport { Font } from '@react-email/font';\nimport { Head } from '@react-email/head';\nimport { Hr } from '@react-email/hr';\nimport { Html } from '@react-email/html';\nimport { Img } from '@react-email/img';\nimport { Preview } from '@react-email/preview';\nimport { Text } from '@react-email/text';\nimport { day } from '@vrplatform/utils';\nimport { VRP_PLATFORM } from '../const';\nimport type { EmailBaseProps } from '../types';\n\ntype Props = {\n children: React.ReactNode;\n title: string;\n tenant: Omit<EmailBaseProps['tenant'], 'name'> & { name?: string };\n mode: EmailBaseProps['mode'];\n shortDescription?: string;\n unsubscribeHref?: string;\n};\n\nexport const EmailContainer = (props: Props) => {\n const { children, shortDescription, title } = props;\n\n const contentWrapperStyle = {\n paddingInline: '20px',\n paddingBlock: '10px',\n maxWidth: '500px',\n margin: '0 auto',\n };\n\n if (props.mode !== 'send') {\n return (\n <div style={contentWrapperStyle}>\n <Content {...props}>{children}</Content>\n </div>\n );\n }\n\n return (\n <Html lang=\"en\">\n <Head>\n <title>{title}</title>\n <Font\n fontFamily=\"Inter\"\n fallbackFontFamily=\"Verdana\"\n webFont={{\n url: 'https://fonts.gstatic.com/s/inter/v13/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa1ZL7W0Q5nw.woff2',\n format: 'woff2',\n }}\n fontWeight={400}\n fontStyle=\"normal\"\n />\n <Font\n fontFamily=\"Inter\"\n fallbackFontFamily=\"Verdana\"\n webFont={{\n url: 'https://fonts.gstatic.com/s/inter/v13/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa1ZL7W0Q5nw.woff2',\n format: 'woff2',\n }}\n fontWeight={600}\n fontStyle=\"normal\"\n />\n </Head>\n {shortDescription && <Preview>{shortDescription}</Preview>}\n <Body style={contentWrapperStyle}>\n <Content {...props}>{children}</Content>\n </Body>\n </Html>\n );\n};\n\nconst Content = ({\n children,\n tenant: { logo: tenantLogo, name, showPlatformBranding = true },\n mode,\n unsubscribeHref,\n}: Props) => {\n return (\n <>\n {tenantLogo ? (\n <div\n style={{\n marginBottom: '60px',\n padding: '5px',\n // border: '1px solid rgb(233,236,239)',\n borderRadius: '5px',\n width: '80px',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n }}\n >\n <Img src={tenantLogo} alt={'Logo'} width={70} />\n </div>\n ) : !showPlatformBranding ? (\n <Text>{name}</Text>\n ) : mode === 'send' ? (\n <Img\n src={`${VRP_PLATFORM.portal}/logo.png`}\n alt={'Logo'}\n width={70}\n style={{ marginBottom: '60px' }}\n />\n ) : (\n <div\n style={{\n width: '60px',\n }}\n >\n <VrpLogo />\n </div>\n )}\n\n {children}\n\n {showPlatformBranding ? <Footer /> : <Text>{name}</Text>}\n {unsubscribeHref && (\n <Text style={{ color: '#737373' }}>\n <a href={unsubscribeHref} style={{ color: '#737373' }}>\n Unsubscribe from owner statement emails\n </a>\n </Text>\n )}\n </>\n );\n};\n\nconst Footer = () => (\n <>\n <Hr\n style={{\n marginTop: '30px',\n marginBottom: '50px',\n }}\n />\n\n <Text\n style={{\n color: '#737373',\n }}\n >\n © {day().year()} VR Technologies. All rights reserved.\n </Text>\n <Text\n style={{\n color: '#737373',\n }}\n >\n VR Technologies, LLC, a company incorporated and registered in the United\n States of America with company number 20201965158\n </Text>\n </>\n);\n\nconst VrpLogo = () => (\n <svg\n width=\"100%\"\n height=\"100%\"\n viewBox=\"0 0 28 29\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n 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\"\n fill=\"#172554\"\n />\n <path\n 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\"\n fill=\"#172554\"\n fillOpacity=\"0.8\"\n />\n <path\n 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\"\n fill=\"#172554\"\n />\n </svg>\n);\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { EmailBaseProps } from '../types';
|
|
2
|
+
type Props = {
|
|
3
|
+
eyebrow: string;
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
themeColors: EmailBaseProps['themeColors'];
|
|
6
|
+
};
|
|
7
|
+
export declare const EmailHeading: ({ eyebrow, children, themeColors }: Props) => import("react").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Heading } from '@react-email/heading';
|
|
3
|
+
import { Text } from '@react-email/text';
|
|
4
|
+
export const EmailHeading = ({ eyebrow, children, themeColors }) => (_jsxs(_Fragment, { children: [_jsx(Text, { style: {
|
|
5
|
+
color: themeColors[8],
|
|
6
|
+
fontSize: 12,
|
|
7
|
+
fontWeight: 600,
|
|
8
|
+
letterSpacing: '0.08em',
|
|
9
|
+
textTransform: 'uppercase',
|
|
10
|
+
margin: '0 0 8px',
|
|
11
|
+
}, children: eyebrow }), _jsx(Heading, { style: {
|
|
12
|
+
fontSize: 26,
|
|
13
|
+
fontWeight: 600,
|
|
14
|
+
lineHeight: '34px',
|
|
15
|
+
margin: '0 0 32px',
|
|
16
|
+
}, children: children })] }));
|
|
17
|
+
//# sourceMappingURL=EmailHeading.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmailHeading.js","sourceRoot":"src/","sources":["components/EmailHeading.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AASzC,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAS,EAAE,EAAE,CAAC,CACzE,8BACE,KAAC,IAAI,IACH,KAAK,EAAE;gBACL,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC;gBACrB,QAAQ,EAAE,EAAE;gBACZ,UAAU,EAAE,GAAG;gBACf,aAAa,EAAE,QAAQ;gBACvB,aAAa,EAAE,WAAW;gBAC1B,MAAM,EAAE,SAAS;aAClB,YAEA,OAAO,GACH,EACP,KAAC,OAAO,IACN,KAAK,EAAE;gBACL,QAAQ,EAAE,EAAE;gBACZ,UAAU,EAAE,GAAG;gBACf,UAAU,EAAE,MAAM;gBAClB,MAAM,EAAE,UAAU;aACnB,YAEA,QAAQ,GACD,IACT,CACJ,CAAC","sourcesContent":["import { Heading } from '@react-email/heading';\nimport { Text } from '@react-email/text';\nimport type { EmailBaseProps } from '../types';\n\ntype Props = {\n eyebrow: string;\n children: React.ReactNode;\n themeColors: EmailBaseProps['themeColors'];\n};\n\nexport const EmailHeading = ({ eyebrow, children, themeColors }: Props) => (\n <>\n <Text\n style={{\n color: themeColors[8],\n fontSize: 12,\n fontWeight: 600,\n letterSpacing: '0.08em',\n textTransform: 'uppercase',\n margin: '0 0 8px',\n }}\n >\n {eyebrow}\n </Text>\n <Heading\n style={{\n fontSize: 26,\n fontWeight: 600,\n lineHeight: '34px',\n margin: '0 0 32px',\n }}\n >\n {children}\n </Heading>\n </>\n);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["components/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC","sourcesContent":["export * from './EmailContainer';\nexport * from './ActionEmailTemplate';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["components/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC","sourcesContent":["export * from './EmailContainer';\nexport * from './ActionEmailTemplate';\nexport * from './EmailHeading';\n"]}
|
|
@@ -1,11 +1,20 @@
|
|
|
1
|
+
const escapeHtml = (value) => value
|
|
2
|
+
.replaceAll('&', '&')
|
|
3
|
+
.replaceAll('<', '<')
|
|
4
|
+
.replaceAll('>', '>')
|
|
5
|
+
.replaceAll('"', '"')
|
|
6
|
+
.replaceAll("'", ''');
|
|
1
7
|
export const parseEmailHtml = (html, args) => {
|
|
2
8
|
// parse out any html scripts of type : <team-name-component></team-name-component> or <user-name-component></user-name-component>
|
|
3
9
|
// and replace them with the appropriate component
|
|
4
10
|
// return the parsed html
|
|
11
|
+
// Values are escaped because names come from users and integrations. Function
|
|
12
|
+
// replacers keep `$` sequences in a value from being read as patterns.
|
|
13
|
+
const href = escapeHtml(args.href);
|
|
5
14
|
return html
|
|
6
|
-
.replaceAll(/<action-link-component><\/action-link-component>/g, `<a href="${
|
|
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);
|
|
15
|
+
.replaceAll(/<action-link-component><\/action-link-component>/g, () => `<a href="${href}" target="_blank">${href}</a>`)
|
|
16
|
+
.replaceAll(/<user-name-component><\/user-name-component>/g, () => escapeHtml(args.userName))
|
|
17
|
+
.replaceAll(/<listing-name-component><\/listing-name-component>/g, () => escapeHtml(args.listingName))
|
|
18
|
+
.replaceAll(/<date-component><\/date-component>/g, () => escapeHtml(args.date));
|
|
10
19
|
};
|
|
11
20
|
//# sourceMappingURL=parse-email-html.js.map
|
|
@@ -1 +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;
|
|
1
|
+
{"version":3,"file":"parse-email-html.js","sourceRoot":"src/","sources":["components/utils/parse-email-html.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,GAAG,CAAC,KAAa,EAAE,EAAE,CACnC,KAAK;KACF,UAAU,CAAC,GAAG,EAAE,OAAO,CAAC;KACxB,UAAU,CAAC,GAAG,EAAE,MAAM,CAAC;KACvB,UAAU,CAAC,GAAG,EAAE,MAAM,CAAC;KACvB,UAAU,CAAC,GAAG,EAAE,QAAQ,CAAC;KACzB,UAAU,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;AAE9B,MAAM,CAAC,MAAM,cAAc,GAAG,CAC5B,IAAY,EACZ,IAKC,EACD,EAAE;IACF,kIAAkI;IAClI,kDAAkD;IAClD,yBAAyB;IACzB,8EAA8E;IAC9E,uEAAuE;IACvE,MAAM,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAEnC,OAAO,IAAI;SACR,UAAU,CACT,mDAAmD,EACnD,GAAG,EAAE,CAAC,YAAY,IAAI,qBAAqB,IAAI,MAAM,CACtD;SACA,UAAU,CAAC,+CAA+C,EAAE,GAAG,EAAE,CAChE,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAC1B;SACA,UAAU,CAAC,qDAAqD,EAAE,GAAG,EAAE,CACtE,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,CAC7B;SACA,UAAU,CAAC,qCAAqC,EAAE,GAAG,EAAE,CACtD,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CACtB,CAAC;AACN,CAAC,CAAC","sourcesContent":["const escapeHtml = (value: string) =>\n value\n .replaceAll('&', '&')\n .replaceAll('<', '<')\n .replaceAll('>', '>')\n .replaceAll('\"', '"')\n .replaceAll(\"'\", ''');\n\nexport const parseEmailHtml = (\n html: string,\n args: {\n href: string;\n userName: string;\n listingName: string;\n date: string;\n }\n) => {\n // parse out any html scripts of type : <team-name-component></team-name-component> or <user-name-component></user-name-component>\n // and replace them with the appropriate component\n // return the parsed html\n // Values are escaped because names come from users and integrations. Function\n // replacers keep `$` sequences in a value from being read as patterns.\n const href = escapeHtml(args.href);\n\n return html\n .replaceAll(\n /<action-link-component><\\/action-link-component>/g,\n () => `<a href=\"${href}\" target=\"_blank\">${href}</a>`\n )\n .replaceAll(/<user-name-component><\\/user-name-component>/g, () =>\n escapeHtml(args.userName)\n )\n .replaceAll(/<listing-name-component><\\/listing-name-component>/g, () =>\n escapeHtml(args.listingName)\n )\n .replaceAll(/<date-component><\\/date-component>/g, () =>\n escapeHtml(args.date)\n );\n};\n"]}
|
package/build/module/const.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const VRP_PLATFORM: {
|
|
2
|
-
readonly name:
|
|
3
|
-
readonly from:
|
|
4
|
-
readonly portal:
|
|
5
|
-
readonly logo:
|
|
2
|
+
readonly name: 'VRPlatform';
|
|
3
|
+
readonly from: 'notifications@vrplatform.app';
|
|
4
|
+
readonly portal: 'https://portal.vrplatform.app';
|
|
5
|
+
readonly logo: 'https://images.clerk.dev/uploaded/img_2HU8qby65rUiwkf3k2bC0XnUxVz.png';
|
|
6
6
|
};
|
package/build/module/index.d.ts
CHANGED
package/build/module/index.js
CHANGED
|
@@ -1 +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,
|
|
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,cAAc,UAAU,CAAC","sourcesContent":["export * from './templates';\nexport * from './utils'; // send email utils\nexport * from './theme';\nexport * from './extensions';\nexport { VRP_PLATFORM } from './const';\nexport type { ActionEmailData } from './components';\n\nexport * from './render';\n"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { plainTextSelectors, render as renderEmail } from '@react-email/render';
|
|
2
|
+
// html-to-text uppercases headings by default, so the plain-text part of an
|
|
3
|
+
// email opened "HI THERE," (PRO-19711). Headings keep their case.
|
|
4
|
+
export const render = (component, options) => renderEmail(component, options?.plainText
|
|
5
|
+
? {
|
|
6
|
+
...options,
|
|
7
|
+
htmlToTextOptions: {
|
|
8
|
+
...options.htmlToTextOptions,
|
|
9
|
+
selectors: [
|
|
10
|
+
...plainTextSelectors,
|
|
11
|
+
...['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].map((selector) => ({
|
|
12
|
+
selector,
|
|
13
|
+
options: { uppercase: false },
|
|
14
|
+
})),
|
|
15
|
+
...(options.htmlToTextOptions?.selectors ?? []),
|
|
16
|
+
],
|
|
17
|
+
},
|
|
18
|
+
}
|
|
19
|
+
: options);
|
|
20
|
+
//# sourceMappingURL=render.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render.js","sourceRoot":"src/","sources":["render.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,IAAI,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEhF,4EAA4E;AAC5E,kEAAkE;AAClE,MAAM,CAAC,MAAM,MAAM,GAAuB,CAAC,SAAS,EAAE,OAAO,EAAE,EAAE,CAC/D,WAAW,CACT,SAAS,EACT,OAAO,EAAE,SAAS;IAChB,CAAC,CAAC;QACE,GAAG,OAAO;QACV,iBAAiB,EAAE;YACjB,GAAG,OAAO,CAAC,iBAAiB;YAC5B,SAAS,EAAE;gBACT,GAAG,kBAAkB;gBACrB,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;oBACzD,QAAQ;oBACR,OAAO,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE;iBAC9B,CAAC,CAAC;gBACH,GAAG,CAAC,OAAO,CAAC,iBAAiB,EAAE,SAAS,IAAI,EAAE,CAAC;aAChD;SACF;KACF;IACH,CAAC,CAAC,OAAO,CACZ,CAAC","sourcesContent":["import { plainTextSelectors, render as renderEmail } from '@react-email/render';\n\n// html-to-text uppercases headings by default, so the plain-text part of an\n// email opened \"HI THERE,\" (PRO-19711). Headings keep their case.\nexport const render: typeof renderEmail = (component, options) =>\n renderEmail(\n component,\n options?.plainText\n ? {\n ...options,\n htmlToTextOptions: {\n ...options.htmlToTextOptions,\n selectors: [\n ...plainTextSelectors,\n ...['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].map((selector) => ({\n selector,\n options: { uppercase: false },\n })),\n ...(options.htmlToTextOptions?.selectors ?? []),\n ],\n },\n }\n : options\n );\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { EmailBaseProps } from '../types';
|
|
2
|
+
export type BankAccountChangedEmailTemplateProps = {
|
|
3
|
+
mode: EmailBaseProps['mode'];
|
|
4
|
+
user: EmailBaseProps['user'];
|
|
5
|
+
tenant: EmailBaseProps['tenant'];
|
|
6
|
+
bankAccount: {
|
|
7
|
+
last4: string;
|
|
8
|
+
changedOn: string;
|
|
9
|
+
added: boolean;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export declare const BankAccountChangedEmailTemplate: ({ mode, user, tenant, bankAccount, }: BankAccountChangedEmailTemplateProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Heading } from '@react-email/heading';
|
|
3
|
+
import { Text } from '@react-email/text';
|
|
4
|
+
import { EmailContainer } from '../components';
|
|
5
|
+
export const BankAccountChangedEmailTemplate = ({ mode, user, tenant, bankAccount, }) => (_jsxs(EmailContainer, { title: bankAccount.added
|
|
6
|
+
? 'Your bank account was added'
|
|
7
|
+
: 'Your bank account was changed', shortDescription: `${tenant.name} now pays you to the account ending in ${bankAccount.last4}.`, tenant: tenant, mode: mode, children: [_jsx(Heading, { style: { fontSize: 28, fontWeight: 600, marginBottom: '50px' }, children: user.firstName ? `Hi ${user.firstName},` : 'Hi there,' }), bankAccount.added ? (_jsxs(Text, { children: ["A bank account for payments from ", _jsx("b", { children: tenant.name }), " was added on", ' ', bankAccount.changedOn, ". Future payments go to the account ending in", ' ', _jsx("b", { children: bankAccount.last4 }), "."] })) : (_jsxs(Text, { children: ["The bank account ", _jsx("b", { children: tenant.name }), " pays you to was changed on", ' ', bankAccount.changedOn, ". Future payments go to the account ending in", ' ', _jsx("b", { children: bankAccount.last4 }), ". A payment already on its way still goes to the previous account."] })), _jsxs(Text, { children: ["If you did not make or request this", ' ', bankAccount.added ? 'addition' : 'change', ", contact ", tenant.name, " right away."] })] }));
|
|
8
|
+
//# sourceMappingURL=BankAccountChangedEmailTemplate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BankAccountChangedEmailTemplate.js","sourceRoot":"src/","sources":["templates/BankAccountChangedEmailTemplate.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,eAAe,CAAC;AAW/C,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,EAC9C,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,WAAW,GAC0B,EAAE,EAAE,CAAC,CAC1C,MAAC,cAAc,IACb,KAAK,EACH,WAAW,CAAC,KAAK;QACf,CAAC,CAAC,6BAA6B;QAC/B,CAAC,CAAC,+BAA+B,EAErC,gBAAgB,EAAE,GAAG,MAAM,CAAC,IAAI,0CAA0C,WAAW,CAAC,KAAK,GAAG,EAC9F,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,aAEV,KAAC,OAAO,IAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,EAAE,YACpE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,WAAW,GAC/C,EACT,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CACnB,MAAC,IAAI,oDAC8B,sBAAI,MAAM,CAAC,IAAI,GAAK,mBAAc,GAAG,EACrE,WAAW,CAAC,SAAS,mDAA+C,GAAG,EACxE,sBAAI,WAAW,CAAC,KAAK,GAAK,SACrB,CACR,CAAC,CAAC,CAAC,CACF,MAAC,IAAI,oCACc,sBAAI,MAAM,CAAC,IAAI,GAAK,iCAA4B,GAAG,EACnE,WAAW,CAAC,SAAS,mDAA+C,GAAG,EACxE,sBAAI,WAAW,CAAC,KAAK,GAAK,0EAErB,CACR,EACD,MAAC,IAAI,sDACiC,GAAG,EACtC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,gBAAY,MAAM,CAAC,IAAI,oBAE5D,IACQ,CAClB,CAAC","sourcesContent":["import { Heading } from '@react-email/heading';\nimport { Text } from '@react-email/text';\nimport { EmailContainer } from '../components';\nimport type { EmailBaseProps } from '../types';\n\nexport type BankAccountChangedEmailTemplateProps = {\n mode: EmailBaseProps['mode'];\n user: EmailBaseProps['user'];\n tenant: EmailBaseProps['tenant'];\n // Added: the payee had no bank account before.\n bankAccount: { last4: string; changedOn: string; added: boolean };\n};\n\nexport const BankAccountChangedEmailTemplate = ({\n mode,\n user,\n tenant,\n bankAccount,\n}: BankAccountChangedEmailTemplateProps) => (\n <EmailContainer\n title={\n bankAccount.added\n ? 'Your bank account was added'\n : 'Your bank account was changed'\n }\n shortDescription={`${tenant.name} now pays you to the account ending in ${bankAccount.last4}.`}\n tenant={tenant}\n mode={mode}\n >\n <Heading style={{ fontSize: 28, fontWeight: 600, marginBottom: '50px' }}>\n {user.firstName ? `Hi ${user.firstName},` : 'Hi there,'}\n </Heading>\n {bankAccount.added ? (\n <Text>\n A bank account for payments from <b>{tenant.name}</b> was added on{' '}\n {bankAccount.changedOn}. Future payments go to the account ending in{' '}\n <b>{bankAccount.last4}</b>.\n </Text>\n ) : (\n <Text>\n The bank account <b>{tenant.name}</b> pays you to was changed on{' '}\n {bankAccount.changedOn}. Future payments go to the account ending in{' '}\n <b>{bankAccount.last4}</b>. A payment already on its way still goes to\n the previous account.\n </Text>\n )}\n <Text>\n If you did not make or request this{' '}\n {bankAccount.added ? 'addition' : 'change'}, contact {tenant.name} right\n away.\n </Text>\n </EmailContainer>\n);\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { EmailBaseProps } from '../types';
|
|
2
|
+
export type BankAccountChangedTeamAdminEmailTemplateProps = {
|
|
3
|
+
mode: EmailBaseProps['mode'];
|
|
4
|
+
tenant: EmailBaseProps['tenant'];
|
|
5
|
+
contact: {
|
|
6
|
+
name: string;
|
|
7
|
+
type: 'owner' | 'vendor';
|
|
8
|
+
};
|
|
9
|
+
bankAccount: {
|
|
10
|
+
last4: string;
|
|
11
|
+
changedOn: string;
|
|
12
|
+
changedBy: string | null;
|
|
13
|
+
added: boolean;
|
|
14
|
+
};
|
|
15
|
+
href: string;
|
|
16
|
+
};
|
|
17
|
+
export declare const BankAccountChangedTeamAdminEmailTemplate: ({ mode, tenant, contact, bankAccount, href, }: BankAccountChangedTeamAdminEmailTemplateProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Heading } from '@react-email/heading';
|
|
3
|
+
import { Text } from '@react-email/text';
|
|
4
|
+
import { Button } from '../components/Button';
|
|
5
|
+
import { EmailContainer } from '../components/EmailContainer';
|
|
6
|
+
import { THEME_COLORS } from '../theme';
|
|
7
|
+
export const BankAccountChangedTeamAdminEmailTemplate = ({ mode, tenant, contact, bankAccount, href, }) => (_jsxs(EmailContainer, { title: `Bank details ${bankAccount.added ? 'added' : 'changed'} for ${contact.name}`, shortDescription: `Future payments to ${contact.name} go to the account ending in ${bankAccount.last4}.`, tenant: tenant, mode: mode, children: [_jsxs(Heading, { style: { fontSize: 28, fontWeight: 600, marginBottom: '50px' }, children: ["Bank details ", bankAccount.added ? 'added' : 'changed'] }), _jsxs(Text, { children: ["The bank account of ", contact.type, " ", _jsx("b", { children: contact.name }), " was", ' ', bankAccount.added ? 'added' : 'changed', " on ", bankAccount.changedOn, bankAccount.changedBy ? ` by ${bankAccount.changedBy}` : '', ". Future payments go to the account ending in ", _jsx("b", { children: bankAccount.last4 }), "."] }), _jsxs(Text, { children: ["If you did not expect this change, confirm it with ", contact.name, " by phone before the next payment."] }), _jsx(Button, { href: href, mode: mode, label: "Review payment setup", themeColors: THEME_COLORS.vrplatform })] }));
|
|
8
|
+
//# sourceMappingURL=BankAccountChangedTeamAdminEmailTemplate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BankAccountChangedTeamAdminEmailTemplate.js","sourceRoot":"src/","sources":["templates/BankAccountChangedTeamAdminEmailTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAiBxC,MAAM,CAAC,MAAM,wCAAwC,GAAG,CAAC,EACvD,IAAI,EACJ,MAAM,EACN,OAAO,EACP,WAAW,EACX,IAAI,GAC0C,EAAE,EAAE,CAAC,CACnD,MAAC,cAAc,IACb,KAAK,EAAE,gBAAgB,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,QAAQ,OAAO,CAAC,IAAI,EAAE,EACpF,gBAAgB,EAAE,sBAAsB,OAAO,CAAC,IAAI,gCAAgC,WAAW,CAAC,KAAK,GAAG,EACxG,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,aAEV,MAAC,OAAO,IAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,EAAE,8BACvD,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,IAC7C,EACV,MAAC,IAAI,uCACkB,OAAO,CAAC,IAAI,OAAE,sBAAI,OAAO,CAAC,IAAI,GAAK,UAAK,GAAG,EAC/D,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,UAAM,WAAW,CAAC,SAAS,EAClE,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,WAAW,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,oDACvB,sBAAI,WAAW,CAAC,KAAK,GAAK,SAC1D,EACP,MAAC,IAAI,sEACiD,OAAO,CAAC,IAAI,0CAE3D,EACP,KAAC,MAAM,IACL,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,IAAI,EACV,KAAK,EAAC,sBAAsB,EAC5B,WAAW,EAAE,YAAY,CAAC,UAAW,GACrC,IACa,CAClB,CAAC","sourcesContent":["import { Heading } from '@react-email/heading';\nimport { Text } from '@react-email/text';\nimport { Button } from '../components/Button';\nimport { EmailContainer } from '../components/EmailContainer';\nimport { THEME_COLORS } from '../theme';\nimport type { EmailBaseProps } from '../types';\n\nexport type BankAccountChangedTeamAdminEmailTemplateProps = {\n mode: EmailBaseProps['mode'];\n tenant: EmailBaseProps['tenant'];\n contact: { name: string; type: 'owner' | 'vendor' };\n // Added: the contact had no bank account before.\n bankAccount: {\n last4: string;\n changedOn: string;\n changedBy: string | null;\n added: boolean;\n };\n href: string;\n};\n\nexport const BankAccountChangedTeamAdminEmailTemplate = ({\n mode,\n tenant,\n contact,\n bankAccount,\n href,\n}: BankAccountChangedTeamAdminEmailTemplateProps) => (\n <EmailContainer\n title={`Bank details ${bankAccount.added ? 'added' : 'changed'} for ${contact.name}`}\n shortDescription={`Future payments to ${contact.name} go to the account ending in ${bankAccount.last4}.`}\n tenant={tenant}\n mode={mode}\n >\n <Heading style={{ fontSize: 28, fontWeight: 600, marginBottom: '50px' }}>\n Bank details {bankAccount.added ? 'added' : 'changed'}\n </Heading>\n <Text>\n The bank account of {contact.type} <b>{contact.name}</b> was{' '}\n {bankAccount.added ? 'added' : 'changed'} on {bankAccount.changedOn}\n {bankAccount.changedBy ? ` by ${bankAccount.changedBy}` : ''}. Future\n payments go to the account ending in <b>{bankAccount.last4}</b>.\n </Text>\n <Text>\n If you did not expect this change, confirm it with {contact.name} by phone\n before the next payment.\n </Text>\n <Button\n href={href}\n mode={mode}\n label=\"Review payment setup\"\n themeColors={THEME_COLORS.vrplatform!}\n />\n </EmailContainer>\n);\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { EmailBaseProps } from '../types';
|
|
2
|
+
export type BankDetailsRequestEmailTemplateProps = {
|
|
3
|
+
mode: EmailBaseProps['mode'];
|
|
4
|
+
user: EmailBaseProps['user'];
|
|
5
|
+
tenant: EmailBaseProps['tenant'];
|
|
6
|
+
payeeName: string;
|
|
7
|
+
themeColors: EmailBaseProps['themeColors'];
|
|
8
|
+
href: string;
|
|
9
|
+
form: {
|
|
10
|
+
type: 'ownerPortal';
|
|
11
|
+
setsUpLogin: boolean;
|
|
12
|
+
} | {
|
|
13
|
+
type: 'oneTime';
|
|
14
|
+
expiresOn: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export declare const BankDetailsRequestEmailTemplate: ({ mode, user, tenant, payeeName, themeColors, href, form, }: BankDetailsRequestEmailTemplateProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Heading } from '@react-email/heading';
|
|
3
|
+
import { Text } from '@react-email/text';
|
|
4
|
+
import { Button } from '../components/Button';
|
|
5
|
+
import { EmailContainer } from '../components/EmailContainer';
|
|
6
|
+
export const BankDetailsRequestEmailTemplate = ({ mode, user, tenant, payeeName, themeColors, href, form, }) => (_jsxs(EmailContainer, { title: `${tenant.name} needs payout details for ${payeeName}`, shortDescription: `Add the bank account ${tenant.name} pays you to.`, tenant: tenant, mode: mode, children: [_jsx(Heading, { style: { fontSize: 28, fontWeight: 600, marginBottom: '50px' }, children: user.firstName ? `Hi ${user.firstName},` : 'Hi there,' }), _jsxs(Text, { children: [_jsx("b", { children: tenant.name }), " needs the bank account to send your payments to. Use the button below to add it. Never send bank details by email."] }), _jsx(Text, { children: form.type === 'oneTime'
|
|
7
|
+
? `The link works once and expires on ${form.expiresOn}.`
|
|
8
|
+
: form.setsUpLogin
|
|
9
|
+
? 'You will set up your owner portal login first, then add your bank details.'
|
|
10
|
+
: 'Sign in to your owner portal to add your bank details.' }), _jsx(Button, { href: href, mode: mode, label: "Add bank details", themeColors: themeColors }), _jsxs(Text, { children: ["If you did not expect this request, contact ", tenant.name, " before you enter any details."] })] }));
|
|
11
|
+
//# sourceMappingURL=BankDetailsRequestEmailTemplate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BankDetailsRequestEmailTemplate.js","sourceRoot":"src/","sources":["templates/BankDetailsRequestEmailTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAmB9D,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,EAC9C,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,SAAS,EACT,WAAW,EACX,IAAI,EACJ,IAAI,GACiC,EAAE,EAAE,CAAC,CAC1C,MAAC,cAAc,IACb,KAAK,EAAE,GAAG,MAAM,CAAC,IAAI,6BAA6B,SAAS,EAAE,EAC7D,gBAAgB,EAAE,wBAAwB,MAAM,CAAC,IAAI,eAAe,EACpE,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,aAEV,KAAC,OAAO,IAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,EAAE,YACpE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,WAAW,GAC/C,EACV,MAAC,IAAI,eACH,sBAAI,MAAM,CAAC,IAAI,GAAK,2HAEf,EACP,KAAC,IAAI,cACF,IAAI,CAAC,IAAI,KAAK,SAAS;gBACtB,CAAC,CAAC,sCAAsC,IAAI,CAAC,SAAS,GAAG;gBACzD,CAAC,CAAC,IAAI,CAAC,WAAW;oBAChB,CAAC,CAAC,4EAA4E;oBAC9E,CAAC,CAAC,wDAAwD,GACzD,EACP,KAAC,MAAM,IACL,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,IAAI,EACV,KAAK,EAAC,kBAAkB,EACxB,WAAW,EAAE,WAAW,GACxB,EACF,MAAC,IAAI,+DAC0C,MAAM,CAAC,IAAI,sCAEnD,IACQ,CAClB,CAAC","sourcesContent":["import { Heading } from '@react-email/heading';\nimport { Text } from '@react-email/text';\nimport { Button } from '../components/Button';\nimport { EmailContainer } from '../components/EmailContainer';\nimport type { EmailBaseProps } from '../types';\n\nexport type BankDetailsRequestEmailTemplateProps = {\n mode: EmailBaseProps['mode'];\n user: EmailBaseProps['user'];\n tenant: EmailBaseProps['tenant'];\n // The owner or vendor asked, so requests to different payees do not thread\n // together.\n payeeName: string;\n themeColors: EmailBaseProps['themeColors'];\n href: string;\n // Owners enter their details in the owner portal; vendors in a one-time\n // form that expires.\n form:\n | { type: 'ownerPortal'; setsUpLogin: boolean }\n | { type: 'oneTime'; expiresOn: string };\n};\n\nexport const BankDetailsRequestEmailTemplate = ({\n mode,\n user,\n tenant,\n payeeName,\n themeColors,\n href,\n form,\n}: BankDetailsRequestEmailTemplateProps) => (\n <EmailContainer\n title={`${tenant.name} needs payout details for ${payeeName}`}\n shortDescription={`Add the bank account ${tenant.name} pays you to.`}\n tenant={tenant}\n mode={mode}\n >\n <Heading style={{ fontSize: 28, fontWeight: 600, marginBottom: '50px' }}>\n {user.firstName ? `Hi ${user.firstName},` : 'Hi there,'}\n </Heading>\n <Text>\n <b>{tenant.name}</b> needs the bank account to send your payments to. Use\n the button below to add it. Never send bank details by email.\n </Text>\n <Text>\n {form.type === 'oneTime'\n ? `The link works once and expires on ${form.expiresOn}.`\n : form.setsUpLogin\n ? 'You will set up your owner portal login first, then add your bank details.'\n : 'Sign in to your owner portal to add your bank details.'}\n </Text>\n <Button\n href={href}\n mode={mode}\n label=\"Add bank details\"\n themeColors={themeColors}\n />\n <Text>\n If you did not expect this request, contact {tenant.name} before you enter\n any details.\n </Text>\n </EmailContainer>\n);\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type ActionEmailData, type ActionEmailTemplateProps } from '../components';
|
|
2
|
-
export declare const getDefaultInviteOwnerEmailData: (mode:
|
|
2
|
+
export declare const getDefaultInviteOwnerEmailData: (mode: 'tag' | 'text', args: {
|
|
3
3
|
appName: string;
|
|
4
4
|
signInLink: string;
|
|
5
5
|
}) => ActionEmailData;
|
|
6
6
|
export declare const InviteOwnerEmailTemplate: ({ ownerAccessRole, ...props }: ActionEmailTemplateProps & {
|
|
7
|
-
ownerAccessRole?:
|
|
7
|
+
ownerAccessRole?: 'admin' | 'viewer';
|
|
8
8
|
}) => import("react").JSX.Element;
|
|
@@ -14,7 +14,7 @@ export const getDefaultInviteOwnerEmailData = (mode, args) => {
|
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
16
|
export const InviteOwnerEmailTemplate = ({ ownerAccessRole = 'admin', ...props }) => {
|
|
17
|
-
return (_jsx(ActionEmailTemplate, { ...props, data: {
|
|
17
|
+
return (_jsx(ActionEmailTemplate, { ...props, eyebrow: "Owner Portal invitation", data: {
|
|
18
18
|
...props.data,
|
|
19
19
|
// Add guidance at render time so saved custom templates receive it too.
|
|
20
20
|
bodyTwo: `${props.data.bodyTwo}<hr style="width:100%;border:none;border-top:1px solid #eaeaea;margin:24px 0" /><p>This invitation link is for one-time setup of your Owner Portal access and expires after 7 days. Sign up using the exact email address this invitation was sent to.</p><p>If your invitation expires before setup is complete, contact your property manager for a new invitation.</p><p>For questions about ${ownerAccessRole === 'viewer' ? 'portal access' : 'your statements or portal access'}, contact your property manager.</p>`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InviteOwnerEmailTemplate.js","sourceRoot":"src/","sources":["templates/InviteOwnerEmailTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAEL,mBAAmB,GAEpB,MAAM,eAAe,CAAC;AAEvB,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAC5C,IAAoB,EACpB,IAGC,EACgB,EAAE;IACnB,MAAM,UAAU,GACd,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,2BAA2B,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC;IAEjE,OAAO;QACL,OAAO,EAAE,qDAAqD,IAAI,CAAC,OAAO,gEAAgE;QAC1I,OAAO,EAAE,wGAAwG,UAAU,MAAM;QACjI,UAAU,EAAE,mBAAmB;QAC/B,MAAM,EAAE,+BAA+B;QACvC,gBAAgB,EAAE,wDAAwD;QAC1E,IAAI,EAAE,IAAI,CAAC,UAAU;QACrB,OAAO,EAAE,0BAA0B,IAAI,CAAC,OAAO,eAAe;KAC/D,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,EACvC,eAAe,GAAG,OAAO,EACzB,GAAG,KAAK,EAGT,EAAE,EAAE;IACH,OAAO,CACL,KAAC,mBAAmB,OACd,KAAK,EACT,IAAI,EAAE;YACJ,GAAG,KAAK,CAAC,IAAI;YACb,wEAAwE;YACxE,OAAO,EAAE,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,mYAAmY,eAAe,KAAK,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,kCAAkC,sCAAsC;SAC3hB,GACD,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { EMAIL_ACTION_LINK_COMPONENT } from '../extensions';\nimport {\n type ActionEmailData,\n ActionEmailTemplate,\n type ActionEmailTemplateProps,\n} from '../components';\n\nexport const getDefaultInviteOwnerEmailData = (\n mode: 'tag' | 'text',\n args: {\n appName: string;\n signInLink: string;\n }\n): ActionEmailData => {\n const signInLink =\n mode === 'tag' ? EMAIL_ACTION_LINK_COMPONENT : args.signInLink;\n\n return {\n bodyOne: `<p>You are invited to access your Owner Portal on ${args.appName}.</p><p>Accept the invitation below to set up your access.</p>`,\n bodyTwo: `<p>If you have any trouble with the button, you can copy and paste the link below into your browser: ${signInLink}</p>`,\n buttonText: 'Accept Invitation',\n header: 'Welcome to your Owner Portal!',\n shortDescription: 'Set up your Owner Portal access using your invitation.',\n href: args.signInLink,\n subject: `Your invitation to the ${args.appName} Owner Portal`,\n };\n};\n\nexport const InviteOwnerEmailTemplate = ({\n ownerAccessRole = 'admin',\n ...props\n}: ActionEmailTemplateProps & {\n ownerAccessRole?: 'admin' | 'viewer';\n}) => {\n return (\n <ActionEmailTemplate\n {...props}\n data={{\n ...props.data,\n // Add guidance at render time so saved custom templates receive it too.\n bodyTwo: `${props.data.bodyTwo}<hr style=\"width:100%;border:none;border-top:1px solid #eaeaea;margin:24px 0\" /><p>This invitation link is for one-time setup of your Owner Portal access and expires after 7 days. Sign up using the exact email address this invitation was sent to.</p><p>If your invitation expires before setup is complete, contact your property manager for a new invitation.</p><p>For questions about ${ownerAccessRole === 'viewer' ? 'portal access' : 'your statements or portal access'}, contact your property manager.</p>`,\n }}\n />\n );\n};\n"]}
|
|
1
|
+
{"version":3,"file":"InviteOwnerEmailTemplate.js","sourceRoot":"src/","sources":["templates/InviteOwnerEmailTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAEL,mBAAmB,GAEpB,MAAM,eAAe,CAAC;AAEvB,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAC5C,IAAoB,EACpB,IAGC,EACgB,EAAE;IACnB,MAAM,UAAU,GACd,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,2BAA2B,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC;IAEjE,OAAO;QACL,OAAO,EAAE,qDAAqD,IAAI,CAAC,OAAO,gEAAgE;QAC1I,OAAO,EAAE,wGAAwG,UAAU,MAAM;QACjI,UAAU,EAAE,mBAAmB;QAC/B,MAAM,EAAE,+BAA+B;QACvC,gBAAgB,EAAE,wDAAwD;QAC1E,IAAI,EAAE,IAAI,CAAC,UAAU;QACrB,OAAO,EAAE,0BAA0B,IAAI,CAAC,OAAO,eAAe;KAC/D,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,EACvC,eAAe,GAAG,OAAO,EACzB,GAAG,KAAK,EAGT,EAAE,EAAE;IACH,OAAO,CACL,KAAC,mBAAmB,OACd,KAAK,EACT,OAAO,EAAC,yBAAyB,EACjC,IAAI,EAAE;YACJ,GAAG,KAAK,CAAC,IAAI;YACb,wEAAwE;YACxE,OAAO,EAAE,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,mYAAmY,eAAe,KAAK,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,kCAAkC,sCAAsC;SAC3hB,GACD,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { EMAIL_ACTION_LINK_COMPONENT } from '../extensions';\nimport {\n type ActionEmailData,\n ActionEmailTemplate,\n type ActionEmailTemplateProps,\n} from '../components';\n\nexport const getDefaultInviteOwnerEmailData = (\n mode: 'tag' | 'text',\n args: {\n appName: string;\n signInLink: string;\n }\n): ActionEmailData => {\n const signInLink =\n mode === 'tag' ? EMAIL_ACTION_LINK_COMPONENT : args.signInLink;\n\n return {\n bodyOne: `<p>You are invited to access your Owner Portal on ${args.appName}.</p><p>Accept the invitation below to set up your access.</p>`,\n bodyTwo: `<p>If you have any trouble with the button, you can copy and paste the link below into your browser: ${signInLink}</p>`,\n buttonText: 'Accept Invitation',\n header: 'Welcome to your Owner Portal!',\n shortDescription: 'Set up your Owner Portal access using your invitation.',\n href: args.signInLink,\n subject: `Your invitation to the ${args.appName} Owner Portal`,\n };\n};\n\nexport const InviteOwnerEmailTemplate = ({\n ownerAccessRole = 'admin',\n ...props\n}: ActionEmailTemplateProps & {\n ownerAccessRole?: 'admin' | 'viewer';\n}) => {\n return (\n <ActionEmailTemplate\n {...props}\n eyebrow=\"Owner Portal invitation\"\n data={{\n ...props.data,\n // Add guidance at render time so saved custom templates receive it too.\n bodyTwo: `${props.data.bodyTwo}<hr style=\"width:100%;border:none;border-top:1px solid #eaeaea;margin:24px 0\" /><p>This invitation link is for one-time setup of your Owner Portal access and expires after 7 days. Sign up using the exact email address this invitation was sent to.</p><p>If your invitation expires before setup is complete, contact your property manager for a new invitation.</p><p>For questions about ${ownerAccessRole === 'viewer' ? 'portal access' : 'your statements or portal access'}, contact your property manager.</p>`,\n }}\n />\n );\n};\n"]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type ActionEmailData, type ActionEmailTemplateProps } from '../components';
|
|
2
|
-
export declare const getDefaultInvitePropertyManagerEmailData: (mode:
|
|
2
|
+
export declare const getDefaultInvitePropertyManagerEmailData: (mode: 'tag' | 'text', args: {
|
|
3
3
|
appName: string;
|
|
4
4
|
signInLink: string;
|
|
5
|
+
teamName: string;
|
|
5
6
|
}) => ActionEmailData;
|
|
6
7
|
export declare const InvitePmEmailTemplate: (props: ActionEmailTemplateProps) => import("react").JSX.Element;
|
|
@@ -6,23 +6,20 @@ export const getDefaultInvitePropertyManagerEmailData = (mode, args) => {
|
|
|
6
6
|
? EMAIL_ACTION_LINK_COMPONENT
|
|
7
7
|
: `<a href='${args.signInLink}' target='_blank'>${args.signInLink}</a>`;
|
|
8
8
|
return {
|
|
9
|
-
bodyOne: `<p>You are invited to join
|
|
9
|
+
bodyOne: `<p>You are invited to join ${args.teamName} on ${args.appName}.</p><p>Accept the invitation below to set up your team access.</p>`,
|
|
10
10
|
bodyTwo: `<p>If you have any trouble with the button, you can use the following link below: ${signInLink}</p>`,
|
|
11
11
|
buttonText: 'Accept Invitation',
|
|
12
12
|
header: 'Welcome to the team!',
|
|
13
|
-
shortDescription: `Accept your invitation to join
|
|
13
|
+
shortDescription: `Accept your invitation to join ${args.teamName} on ${args.appName}.`,
|
|
14
14
|
href: args.signInLink,
|
|
15
|
-
subject: `You are invited to join
|
|
15
|
+
subject: `You are invited to join ${args.teamName} on ${args.appName}`,
|
|
16
16
|
};
|
|
17
17
|
};
|
|
18
18
|
export const InvitePmEmailTemplate = (props) => {
|
|
19
|
-
return (_jsx(ActionEmailTemplate, { ...props, data: {
|
|
19
|
+
return (_jsx(ActionEmailTemplate, { ...props, eyebrow: "Team invitation", data: {
|
|
20
20
|
...props.data,
|
|
21
21
|
// Add guidance at render time so saved custom templates receive it too.
|
|
22
22
|
bodyTwo: `${props.data.bodyTwo}<hr style="width:100%;border:none;border-top:1px solid #eaeaea;margin:24px 0" /><p>This invitation link is for one-time setup of your team access and expires after 7 days. Sign up using the exact email address this invitation was sent to.</p><p>If your invitation expires before setup is complete, contact your team administrator for a new invitation.</p><p>For questions about team access, contact your team administrator.</p>`,
|
|
23
|
-
}, tenant: {
|
|
24
|
-
logo: undefined,
|
|
25
|
-
name: props.tenant.name,
|
|
26
23
|
} }));
|
|
27
24
|
};
|
|
28
25
|
//# sourceMappingURL=InvitePmEmailTemplate.js.map
|
|
@@ -1 +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,wCAAwC,GAAG,CACtD,IAAoB,EACpB,
|
|
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,wCAAwC,GAAG,CACtD,IAAoB,EACpB,IAIC,EACgB,EAAE;IACnB,MAAM,UAAU,GACd,IAAI,KAAK,KAAK;QACZ,CAAC,CAAC,2BAA2B;QAC7B,CAAC,CAAC,YAAY,IAAI,CAAC,UAAU,qBAAqB,IAAI,CAAC,UAAU,MAAM,CAAC;IAE5E,OAAO;QACL,OAAO,EAAE,8BAA8B,IAAI,CAAC,QAAQ,OAAO,IAAI,CAAC,OAAO,qEAAqE;QAC5I,OAAO,EAAE,qFAAqF,UAAU,MAAM;QAC9G,UAAU,EAAE,mBAAmB;QAC/B,MAAM,EAAE,sBAAsB;QAC9B,gBAAgB,EAAE,kCAAkC,IAAI,CAAC,QAAQ,OAAO,IAAI,CAAC,OAAO,GAAG;QACvF,IAAI,EAAE,IAAI,CAAC,UAAU;QACrB,OAAO,EAAE,2BAA2B,IAAI,CAAC,QAAQ,OAAO,IAAI,CAAC,OAAO,EAAE;KACvE,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,KAA+B,EAAE,EAAE;IACvE,OAAO,CACL,KAAC,mBAAmB,OACd,KAAK,EACT,OAAO,EAAC,iBAAiB,EACzB,IAAI,EAAE;YACJ,GAAG,KAAK,CAAC,IAAI;YACb,wEAAwE;YACxE,OAAO,EAAE,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,6aAA6a;SAC5c,GACD,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { EMAIL_ACTION_LINK_COMPONENT } from '../extensions';\nimport {\n type ActionEmailData,\n ActionEmailTemplate,\n type ActionEmailTemplateProps,\n} from '../components';\n\nexport const getDefaultInvitePropertyManagerEmailData = (\n mode: 'tag' | 'text',\n args: {\n appName: string;\n signInLink: string;\n teamName: string;\n }\n): ActionEmailData => {\n const signInLink =\n mode === 'tag'\n ? EMAIL_ACTION_LINK_COMPONENT\n : `<a href='${args.signInLink}' target='_blank'>${args.signInLink}</a>`;\n\n return {\n bodyOne: `<p>You are invited to join ${args.teamName} on ${args.appName}.</p><p>Accept the invitation below to set up your team access.</p>`,\n bodyTwo: `<p>If you have any trouble with the button, you can use the following link below: ${signInLink}</p>`,\n buttonText: 'Accept Invitation',\n header: 'Welcome to the team!',\n shortDescription: `Accept your invitation to join ${args.teamName} on ${args.appName}.`,\n href: args.signInLink,\n subject: `You are invited to join ${args.teamName} on ${args.appName}`,\n };\n};\n\nexport const InvitePmEmailTemplate = (props: ActionEmailTemplateProps) => {\n return (\n <ActionEmailTemplate\n {...props}\n eyebrow=\"Team invitation\"\n data={{\n ...props.data,\n // Add guidance at render time so saved custom templates receive it too.\n bodyTwo: `${props.data.bodyTwo}<hr style=\"width:100%;border:none;border-top:1px solid #eaeaea;margin:24px 0\" /><p>This invitation link is for one-time setup of your team access and expires after 7 days. Sign up using the exact email address this invitation was sent to.</p><p>If your invitation expires before setup is complete, contact your team administrator for a new invitation.</p><p>For questions about team access, contact your team administrator.</p>`,\n }}\n />\n );\n};\n"]}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const getDefaultOwnerStatementEmailData: (mode:
|
|
1
|
+
import type { ActionEmailData, ActionEmailTemplateProps } from '../components/ActionEmailTemplate';
|
|
2
|
+
export declare const getDefaultOwnerStatementEmailData: (mode: 'tag' | 'text', args: {
|
|
3
3
|
appName: string;
|
|
4
4
|
ownerStatementHref: string;
|
|
5
5
|
listingName: string;
|
|
6
6
|
userName: string;
|
|
7
7
|
month: string;
|
|
8
8
|
}) => ActionEmailData;
|
|
9
|
-
export declare const OwnerStatementEmailTemplate: (
|
|
9
|
+
export declare const OwnerStatementEmailTemplate: ({ data, tenant, themeColors, mode, user, listing, month, unsubscribeHref, renewHref, }: ActionEmailTemplateProps & {
|
|
10
|
+
/** Requests a new no-login link once the emailed one has expired. */
|
|
11
|
+
renewHref?: string;
|
|
12
|
+
}) => import("react").JSX.Element;
|
|
@@ -1,22 +1,83 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Text } from '@react-email/text';
|
|
2
3
|
import { EMAIL_ACTION_LINK_COMPONENT, EMAIL_DATE_COMPONENT, EMAIL_LISTING_COMPONENT, EMAIL_USER_NAME_COMPONENT, } from '../extensions';
|
|
3
|
-
import {
|
|
4
|
+
import { Button } from '../components/Button';
|
|
5
|
+
import { EmailContainer } from '../components/EmailContainer';
|
|
6
|
+
import { EmailHeading } from '../components/EmailHeading';
|
|
7
|
+
import { parseEmailHtml } from '../components/utils';
|
|
4
8
|
export const getDefaultOwnerStatementEmailData = (mode, args) => {
|
|
5
9
|
const ownerStatementHref = mode === 'tag' ? EMAIL_ACTION_LINK_COMPONENT : args.ownerStatementHref;
|
|
6
10
|
const listingName = mode === 'tag' ? EMAIL_LISTING_COMPONENT : args.listingName;
|
|
7
11
|
const month = mode === 'tag' ? EMAIL_DATE_COMPONENT : args.month;
|
|
8
12
|
const userName = mode === 'tag' ? EMAIL_USER_NAME_COMPONENT : args.userName;
|
|
13
|
+
// Owners open the statement by link without a login and viewers log in to
|
|
14
|
+
// the owner portal, so the text names neither. Subject and preview text are
|
|
15
|
+
// plain text without tokens, so a saved template must not keep the editor's
|
|
16
|
+
// sample month and listing.
|
|
9
17
|
return {
|
|
10
|
-
subject:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
18
|
+
subject: mode === 'tag'
|
|
19
|
+
? 'Your owner statement is ready'
|
|
20
|
+
: `Your ${args.month} owner statement for ${args.listingName}`,
|
|
21
|
+
shortDescription: mode === 'tag'
|
|
22
|
+
? 'Your owner statement is ready to view.'
|
|
23
|
+
: `Your ${args.month} statement for ${args.listingName} is ready to view.`,
|
|
24
|
+
header: 'Your owner statement is ready',
|
|
25
|
+
bodyOne: `<p>Hi ${userName},</p><p>${args.appName} published your ${month} owner statement for ${listingName}. Open it with the button below.</p>`,
|
|
26
|
+
buttonText: 'View statement',
|
|
27
|
+
bodyTwo: `<p style="color:#737373;font-size:13px">If the button doesn't work, copy this link into your browser: ${ownerStatementHref}</p>`,
|
|
16
28
|
href: args.ownerStatementHref,
|
|
17
29
|
};
|
|
18
30
|
};
|
|
19
|
-
|
|
20
|
-
|
|
31
|
+
const mutedColor = '#737373';
|
|
32
|
+
const borderColor = '#e5e7eb';
|
|
33
|
+
export const OwnerStatementEmailTemplate = ({ data, tenant, themeColors, mode, user, listing, month, unsubscribeHref, renewHref, }) => {
|
|
34
|
+
const parse = (html) => parseEmailHtml(html, {
|
|
35
|
+
href: data.href,
|
|
36
|
+
userName: user.firstName || '',
|
|
37
|
+
date: month || '',
|
|
38
|
+
listingName: listing || '',
|
|
39
|
+
});
|
|
40
|
+
return (_jsxs(EmailContainer, { title: data.subject, shortDescription: data.shortDescription, tenant: tenant, mode: mode, unsubscribeHref: unsubscribeHref, children: [_jsx(EmailHeading, { eyebrow: "Owner statement", themeColors: themeColors, children: data.header?.trim() || 'Your owner statement is ready' }), data.banner?.trim() && (_jsx(Text, { style: {
|
|
41
|
+
padding: '16px 20px',
|
|
42
|
+
backgroundColor: '#f8f9fa',
|
|
43
|
+
borderLeft: `3px solid ${themeColors[8]}`,
|
|
44
|
+
borderRadius: '4px',
|
|
45
|
+
margin: '0 0 32px',
|
|
46
|
+
whiteSpace: 'pre-line',
|
|
47
|
+
}, children: data.banner.trim() })), _jsx("div", {
|
|
48
|
+
// biome-ignore lint/security/noDangerouslySetInnerHtml: values are escaped by parseEmailHtml
|
|
49
|
+
dangerouslySetInnerHTML: { __html: parse(data.bodyOne) } }), (listing || month) && (_jsx("table", { role: "presentation", cellPadding: 0, cellSpacing: 0, width: "100%", style: {
|
|
50
|
+
border: `1px solid ${borderColor}`,
|
|
51
|
+
borderRadius: '8px',
|
|
52
|
+
borderCollapse: 'separate',
|
|
53
|
+
margin: '24px 0 0',
|
|
54
|
+
}, children: _jsx("tbody", { children: [
|
|
55
|
+
['Property', listing],
|
|
56
|
+
['Statement', month],
|
|
57
|
+
].map(([label, value], index) => value ? (_jsxs("tr", { children: [_jsx("td", { style: {
|
|
58
|
+
padding: '14px 20px',
|
|
59
|
+
color: mutedColor,
|
|
60
|
+
fontSize: 14,
|
|
61
|
+
borderTop: index ? `1px solid ${borderColor}` : 'none',
|
|
62
|
+
}, children: label }), _jsx("td", { style: {
|
|
63
|
+
padding: '14px 20px',
|
|
64
|
+
fontSize: 14,
|
|
65
|
+
fontWeight: 600,
|
|
66
|
+
textAlign: 'right',
|
|
67
|
+
borderTop: index ? `1px solid ${borderColor}` : 'none',
|
|
68
|
+
}, children: value })] }, label)) : null) }) })), _jsx(Button, { href: data.href, mode: mode, "data-testid": "view-owner-statement-button", label: data.buttonText?.trim() || 'View statement', themeColors: themeColors, style: { marginTop: '24px', marginBottom: '32px' } }), renewHref && (_jsxs("div", { style: {
|
|
69
|
+
padding: '20px',
|
|
70
|
+
backgroundColor: '#f8f9fa',
|
|
71
|
+
borderRadius: '8px',
|
|
72
|
+
marginBottom: '32px',
|
|
73
|
+
}, children: [_jsx(Text, { style: { fontWeight: 600, margin: '0 0 4px' }, children: "Link expired?" }), _jsx(Text, { style: { color: mutedColor, fontSize: 14, margin: 0 }, children: "For your security, this link opens only this statement and works for 7 days. After that, request a new one and we'll email it to this address." }), _jsx(Button, { href: renewHref, mode: mode, "data-testid": "renew-owner-statement-link-button", label: "Send me a new link", themeColors: themeColors, style: {
|
|
74
|
+
background: '#ffffff',
|
|
75
|
+
border: `1px solid ${themeColors[8]}`,
|
|
76
|
+
color: themeColors[8],
|
|
77
|
+
marginTop: '16px',
|
|
78
|
+
marginBottom: 0,
|
|
79
|
+
} })] })), _jsx("div", {
|
|
80
|
+
// biome-ignore lint/security/noDangerouslySetInnerHtml: values are escaped by parseEmailHtml
|
|
81
|
+
dangerouslySetInnerHTML: { __html: parse(data.bodyTwo) } })] }));
|
|
21
82
|
};
|
|
22
83
|
//# sourceMappingURL=OwnerStatementEmailTemplate.js.map
|
|
@@ -1 +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","sourcesContent":["import {\n EMAIL_ACTION_LINK_COMPONENT,\n EMAIL_DATE_COMPONENT,\n EMAIL_LISTING_COMPONENT,\n EMAIL_USER_NAME_COMPONENT,\n} from '../extensions';\nimport {\n type ActionEmailData,\n ActionEmailTemplate,\n type ActionEmailTemplateProps,\n} from '../components/ActionEmailTemplate';\n\nexport const getDefaultOwnerStatementEmailData = (\n mode: 'tag' | 'text',\n args: {\n appName: string;\n ownerStatementHref: string;\n listingName: string;\n userName: string;\n month: string;\n }\n): ActionEmailData => {\n const ownerStatementHref =\n mode === 'tag' ? EMAIL_ACTION_LINK_COMPONENT : args.ownerStatementHref;\n\n const listingName =\n mode === 'tag' ? EMAIL_LISTING_COMPONENT : args.listingName;\n const month = mode === 'tag' ? EMAIL_DATE_COMPONENT : args.month;\n const userName = mode === 'tag' ? EMAIL_USER_NAME_COMPONENT : args.userName;\n\n return {\n subject: 'Owner statement was published',\n shortDescription: `An owner statement is ready for you. Log in to ${args.appName} now to view it.`,\n header: 'Owner statement was published',\n 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>`,\n buttonText: 'View Owner statement',\n bodyTwo: `<p>If you have any trouble with the button, you can copy and paste the link below into your browser: ${ownerStatementHref}</p>`,\n href: args.ownerStatementHref,\n };\n};\n\nexport const OwnerStatementEmailTemplate = (\n props: ActionEmailTemplateProps\n) => {\n return <ActionEmailTemplate {...props} />;\n};\n"]}
|
|
1
|
+
{"version":3,"file":"OwnerStatementEmailTemplate.js","sourceRoot":"src/","sources":["templates/OwnerStatementEmailTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EACL,2BAA2B,EAC3B,oBAAoB,EACpB,uBAAuB,EACvB,yBAAyB,GAC1B,MAAM,eAAe,CAAC;AAKvB,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,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,0EAA0E;IAC1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,WAAW,CAAC,CAAC,CAAC;4BACrB,SAAS,EAAE,MAAM;4BACjB,YAAY,EAAE,CAAC;yBAChB,GACD,IACE,CACP,EAED;gBACE,6FAA6F;gBAC7F,uBAAuB,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,GACxD,IACa,CAClB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Text } from '@react-email/text';\nimport {\n EMAIL_ACTION_LINK_COMPONENT,\n EMAIL_DATE_COMPONENT,\n EMAIL_LISTING_COMPONENT,\n EMAIL_USER_NAME_COMPONENT,\n} from '../extensions';\nimport type {\n ActionEmailData,\n ActionEmailTemplateProps,\n} from '../components/ActionEmailTemplate';\nimport { Button } from '../components/Button';\nimport { EmailContainer } from '../components/EmailContainer';\nimport { EmailHeading } from '../components/EmailHeading';\nimport { parseEmailHtml } from '../components/utils';\n\nexport const getDefaultOwnerStatementEmailData = (\n mode: 'tag' | 'text',\n args: {\n appName: string;\n ownerStatementHref: string;\n listingName: string;\n userName: string;\n month: string;\n }\n): ActionEmailData => {\n const ownerStatementHref =\n mode === 'tag' ? EMAIL_ACTION_LINK_COMPONENT : args.ownerStatementHref;\n\n const listingName =\n mode === 'tag' ? EMAIL_LISTING_COMPONENT : args.listingName;\n const month = mode === 'tag' ? EMAIL_DATE_COMPONENT : args.month;\n const userName = mode === 'tag' ? EMAIL_USER_NAME_COMPONENT : args.userName;\n\n // Owners open the statement by link without a login and viewers log in to\n // the owner portal, so the text names neither. Subject and preview text are\n // plain text without tokens, so a saved template must not keep the editor's\n // sample month and listing.\n return {\n subject:\n mode === 'tag'\n ? 'Your owner statement is ready'\n : `Your ${args.month} owner statement for ${args.listingName}`,\n shortDescription:\n mode === 'tag'\n ? 'Your owner statement is ready to view.'\n : `Your ${args.month} statement for ${args.listingName} is ready to view.`,\n header: 'Your owner statement is ready',\n bodyOne: `<p>Hi ${userName},</p><p>${args.appName} published your ${month} owner statement for ${listingName}. Open it with the button below.</p>`,\n buttonText: 'View statement',\n bodyTwo: `<p style=\"color:#737373;font-size:13px\">If the button doesn't work, copy this link into your browser: ${ownerStatementHref}</p>`,\n href: args.ownerStatementHref,\n };\n};\n\nconst mutedColor = '#737373';\nconst borderColor = '#e5e7eb';\n\nexport const OwnerStatementEmailTemplate = ({\n data,\n tenant,\n themeColors,\n mode,\n user,\n listing,\n month,\n unsubscribeHref,\n renewHref,\n}: ActionEmailTemplateProps & {\n /** Requests a new no-login link once the emailed one has expired. */\n renewHref?: string;\n}) => {\n const parse = (html: string) =>\n parseEmailHtml(html, {\n href: data.href,\n userName: user.firstName || '',\n date: month || '',\n listingName: listing || '',\n });\n\n return (\n <EmailContainer\n title={data.subject}\n shortDescription={data.shortDescription}\n tenant={tenant}\n mode={mode}\n unsubscribeHref={unsubscribeHref}\n >\n <EmailHeading eyebrow=\"Owner statement\" themeColors={themeColors}>\n {data.header?.trim() || 'Your owner statement is ready'}\n </EmailHeading>\n\n {data.banner?.trim() && (\n <Text\n style={{\n padding: '16px 20px',\n backgroundColor: '#f8f9fa',\n borderLeft: `3px solid ${themeColors[8]}`,\n borderRadius: '4px',\n margin: '0 0 32px',\n whiteSpace: 'pre-line',\n }}\n >\n {data.banner.trim()}\n </Text>\n )}\n\n <div\n // biome-ignore lint/security/noDangerouslySetInnerHtml: values are escaped by parseEmailHtml\n dangerouslySetInnerHTML={{ __html: parse(data.bodyOne) }}\n />\n\n {(listing || month) && (\n <table\n role=\"presentation\"\n cellPadding={0}\n cellSpacing={0}\n width=\"100%\"\n style={{\n border: `1px solid ${borderColor}`,\n borderRadius: '8px',\n borderCollapse: 'separate',\n margin: '24px 0 0',\n }}\n >\n <tbody>\n {[\n ['Property', listing],\n ['Statement', month],\n ].map(([label, value], index) =>\n value ? (\n <tr key={label}>\n <td\n style={{\n padding: '14px 20px',\n color: mutedColor,\n fontSize: 14,\n borderTop: index ? `1px solid ${borderColor}` : 'none',\n }}\n >\n {label}\n </td>\n <td\n style={{\n padding: '14px 20px',\n fontSize: 14,\n fontWeight: 600,\n textAlign: 'right',\n borderTop: index ? `1px solid ${borderColor}` : 'none',\n }}\n >\n {value}\n </td>\n </tr>\n ) : null\n )}\n </tbody>\n </table>\n )}\n\n <Button\n href={data.href}\n mode={mode}\n data-testid=\"view-owner-statement-button\"\n label={data.buttonText?.trim() || 'View statement'}\n themeColors={themeColors}\n style={{ marginTop: '24px', marginBottom: '32px' }}\n />\n\n {renewHref && (\n <div\n style={{\n padding: '20px',\n backgroundColor: '#f8f9fa',\n borderRadius: '8px',\n marginBottom: '32px',\n }}\n >\n <Text style={{ fontWeight: 600, margin: '0 0 4px' }}>\n Link expired?\n </Text>\n <Text style={{ color: mutedColor, fontSize: 14, margin: 0 }}>\n For your security, this link opens only this statement and works for\n 7 days. After that, request a new one and we'll email it to this\n address.\n </Text>\n <Button\n href={renewHref}\n mode={mode}\n data-testid=\"renew-owner-statement-link-button\"\n label=\"Send me a new link\"\n themeColors={themeColors}\n style={{\n background: '#ffffff',\n border: `1px solid ${themeColors[8]}`,\n color: themeColors[8],\n marginTop: '16px',\n marginBottom: 0,\n }}\n />\n </div>\n )}\n\n <div\n // biome-ignore lint/security/noDangerouslySetInnerHtml: values are escaped by parseEmailHtml\n dangerouslySetInnerHTML={{ __html: parse(data.bodyTwo) }}\n />\n </EmailContainer>\n );\n};\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { EmailBaseProps } from '../types';
|
|
2
|
+
export type SecondFactorResetEmailTemplateProps = {
|
|
3
|
+
mode: EmailBaseProps['mode'];
|
|
4
|
+
tenant: EmailBaseProps['tenant'];
|
|
5
|
+
audience: 'admin' | 'user';
|
|
6
|
+
user: string;
|
|
7
|
+
initiator: 'support' | 'teamAdmin';
|
|
8
|
+
approvedBy: string | null;
|
|
9
|
+
resetAt: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const SecondFactorResetEmailTemplate: ({ mode, tenant, audience, user, initiator, approvedBy, resetAt, }: SecondFactorResetEmailTemplateProps) => import("react").JSX.Element;
|