@vrplatform/email 1.0.2-stage.38580868341 → 1.0.2-stage.38771334373

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.
@@ -0,0 +1,16 @@
1
+ import type { EmailBaseProps } from '../types';
2
+ export type BankDetailsRequestEmailTemplateProps = {
3
+ mode: EmailBaseProps['mode'];
4
+ user: EmailBaseProps['user'];
5
+ tenant: EmailBaseProps['tenant'];
6
+ themeColors: EmailBaseProps['themeColors'];
7
+ href: string;
8
+ form: {
9
+ type: 'ownerPortal';
10
+ setsUpLogin: boolean;
11
+ } | {
12
+ type: 'oneTime';
13
+ expiresOn: string;
14
+ };
15
+ };
16
+ export declare const BankDetailsRequestEmailTemplate: ({ mode, user, tenant, themeColors, href, form, }: BankDetailsRequestEmailTemplateProps) => import("react").JSX.Element;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BankDetailsRequestEmailTemplate = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const heading_1 = require("@react-email/heading");
6
+ const text_1 = require("@react-email/text");
7
+ const Button_1 = require("../components/Button");
8
+ const EmailContainer_1 = require("../components/EmailContainer");
9
+ const BankDetailsRequestEmailTemplate = ({ mode, user, tenant, themeColors, href, form, }) => ((0, jsx_runtime_1.jsxs)(EmailContainer_1.EmailContainer, { title: `${tenant.name} needs your payout details`, shortDescription: `Add the bank account ${tenant.name} pays you to.`, tenant: tenant, mode: mode, children: [(0, jsx_runtime_1.jsx)(heading_1.Heading, { style: { fontSize: 28, fontWeight: 600, marginBottom: '50px' }, children: user.firstName ? `Hi ${user.firstName},` : 'Hi there,' }), (0, jsx_runtime_1.jsxs)(text_1.Text, { children: [(0, jsx_runtime_1.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."] }), (0, jsx_runtime_1.jsx)(text_1.Text, { children: form.type === 'oneTime'
10
+ ? `The link works once and expires on ${form.expiresOn}.`
11
+ : form.setsUpLogin
12
+ ? 'You will set up your owner portal login first, then add your bank details.'
13
+ : 'Sign in to your owner portal to add your bank details.' }), (0, jsx_runtime_1.jsx)(Button_1.Button, { href: href, mode: mode, label: "Add bank details", themeColors: themeColors }), (0, jsx_runtime_1.jsxs)(text_1.Text, { children: ["If you did not expect this request, contact ", tenant.name, " before you enter any details."] })] }));
14
+ exports.BankDetailsRequestEmailTemplate = BankDetailsRequestEmailTemplate;
15
+ //# sourceMappingURL=BankDetailsRequestEmailTemplate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BankDetailsRequestEmailTemplate.js","sourceRoot":"src/","sources":["templates/BankDetailsRequestEmailTemplate.tsx"],"names":[],"mappings":";;;;AAAA,kDAA+C;AAC/C,4CAAyC;AACzC,iDAA8C;AAC9C,iEAA8D;AAgBvD,MAAM,+BAA+B,GAAG,CAAC,EAC9C,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,WAAW,EACX,IAAI,EACJ,IAAI,GACiC,EAAE,EAAE,CAAC,CAC1C,wBAAC,+BAAc,IACb,KAAK,EAAE,GAAG,MAAM,CAAC,IAAI,4BAA4B,EACjD,gBAAgB,EAAE,wBAAwB,MAAM,CAAC,IAAI,eAAe,EACpE,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,aAEV,uBAAC,iBAAO,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,wBAAC,WAAI,eACH,wCAAI,MAAM,CAAC,IAAI,GAAK,2HAEf,EACP,uBAAC,WAAI,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,uBAAC,eAAM,IACL,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,IAAI,EACV,KAAK,EAAC,kBAAkB,EACxB,WAAW,EAAE,WAAW,GACxB,EACF,wBAAC,WAAI,+DAC0C,MAAM,CAAC,IAAI,sCAEnD,IACQ,CAClB,CAAC;AAvCW,QAAA,+BAA+B,mCAuC1C","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 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 themeColors,\n href,\n form,\n}: BankDetailsRequestEmailTemplateProps) => (\n <EmailContainer\n title={`${tenant.name} needs your payout details`}\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"]}
@@ -2,5 +2,6 @@ import { type ActionEmailData, type ActionEmailTemplateProps } from '../componen
2
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;
@@ -9,13 +9,13 @@ const getDefaultInvitePropertyManagerEmailData = (mode, args) => {
9
9
  ? extensions_1.EMAIL_ACTION_LINK_COMPONENT
10
10
  : `<a href='${args.signInLink}' target='_blank'>${args.signInLink}</a>`;
11
11
  return {
12
- bodyOne: `<p>You are invited to join us on ${args.appName}.</p><p>Accept the invitation below to set up your team access.</p>`,
12
+ 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>`,
13
13
  bodyTwo: `<p>If you have any trouble with the button, you can use the following link below: ${signInLink}</p>`,
14
14
  buttonText: 'Accept Invitation',
15
15
  header: 'Welcome to the team!',
16
- shortDescription: `Accept your invitation to join your team on ${args.appName}.`,
16
+ shortDescription: `Accept your invitation to join ${args.teamName} on ${args.appName}.`,
17
17
  href: args.signInLink,
18
- subject: `You are invited to join your team on ${args.appName}`,
18
+ subject: `You are invited to join ${args.teamName} on ${args.appName}`,
19
19
  };
20
20
  };
21
21
  exports.getDefaultInvitePropertyManagerEmailData = getDefaultInvitePropertyManagerEmailData;
@@ -24,9 +24,6 @@ const InvitePmEmailTemplate = (props) => {
24
24
  ...props.data,
25
25
  // Add guidance at render time so saved custom templates receive it too.
26
26
  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>`,
27
- }, tenant: {
28
- logo: undefined,
29
- name: props.tenant.name,
30
27
  } }));
31
28
  };
32
29
  exports.InvitePmEmailTemplate = InvitePmEmailTemplate;
@@ -1 +1 @@
1
- {"version":3,"file":"InvitePmEmailTemplate.js","sourceRoot":"src/","sources":["templates/InvitePmEmailTemplate.tsx"],"names":[],"mappings":";;;;AAAA,8CAA4D;AAC5D,8CAIuB;AAEhB,MAAM,wCAAwC,GAAG,CACtD,IAAoB,EACpB,IAGC,EACgB,EAAE;IACnB,MAAM,UAAU,GACd,IAAI,KAAK,KAAK;QACZ,CAAC,CAAC,wCAA2B;QAC7B,CAAC,CAAC,YAAY,IAAI,CAAC,UAAU,qBAAqB,IAAI,CAAC,UAAU,MAAM,CAAC;IAE5E,OAAO;QACL,OAAO,EAAE,oCAAoC,IAAI,CAAC,OAAO,qEAAqE;QAC9H,OAAO,EAAE,qFAAqF,UAAU,MAAM;QAC9G,UAAU,EAAE,mBAAmB;QAC/B,MAAM,EAAE,sBAAsB;QAC9B,gBAAgB,EAAE,+CAA+C,IAAI,CAAC,OAAO,GAAG;QAChF,IAAI,EAAE,IAAI,CAAC,UAAU;QACrB,OAAO,EAAE,wCAAwC,IAAI,CAAC,OAAO,EAAE;KAChE,CAAC;AACJ,CAAC,CAAC;AArBW,QAAA,wCAAwC,4CAqBnD;AAEK,MAAM,qBAAqB,GAAG,CAAC,KAA+B,EAAE,EAAE;IACvE,OAAO,CACL,uBAAC,gCAAmB,OACd,KAAK,EACT,IAAI,EAAE;YACJ,GAAG,KAAK,CAAC,IAAI;YACb,wEAAwE;YACxE,OAAO,EAAE,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,6aAA6a;SAC5c,EACD,MAAM,EAAE;YACN,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI;SACxB,GACD,CACH,CAAC;AACJ,CAAC,CAAC;AAfW,QAAA,qBAAqB,yBAehC","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 }\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 us 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 your team on ${args.appName}.`,\n href: args.signInLink,\n subject: `You are invited to join your team on ${args.appName}`,\n };\n};\n\nexport const InvitePmEmailTemplate = (props: ActionEmailTemplateProps) => {\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 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 tenant={{\n logo: undefined,\n name: props.tenant.name,\n }}\n />\n );\n};\n"]}
1
+ {"version":3,"file":"InvitePmEmailTemplate.js","sourceRoot":"src/","sources":["templates/InvitePmEmailTemplate.tsx"],"names":[],"mappings":";;;;AAAA,8CAA4D;AAC5D,8CAIuB;AAEhB,MAAM,wCAAwC,GAAG,CACtD,IAAoB,EACpB,IAIC,EACgB,EAAE;IACnB,MAAM,UAAU,GACd,IAAI,KAAK,KAAK;QACZ,CAAC,CAAC,wCAA2B;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;AAtBW,QAAA,wCAAwC,4CAsBnD;AAEK,MAAM,qBAAqB,GAAG,CAAC,KAA+B,EAAE,EAAE;IACvE,OAAO,CACL,uBAAC,gCAAmB,OACd,KAAK,EACT,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;AAXW,QAAA,qBAAqB,yBAWhC","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 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"]}
@@ -3,5 +3,6 @@ export * from './TenantDeletionEmailTemplate';
3
3
  export * from './OwnerStatementEmailTemplate';
4
4
  export * from './BankAccountChangedEmailTemplate';
5
5
  export * from './BankAccountChangedTeamAdminEmailTemplate';
6
+ export * from './BankDetailsRequestEmailTemplate';
6
7
  export * from './InviteOwnerEmailTemplate';
7
8
  export * from './InvitePmEmailTemplate';
@@ -22,6 +22,7 @@ __exportStar(require("./OwnerStatementEmailTemplate"), exports);
22
22
  // Payment setup
23
23
  __exportStar(require("./BankAccountChangedEmailTemplate"), exports);
24
24
  __exportStar(require("./BankAccountChangedTeamAdminEmailTemplate"), exports);
25
+ __exportStar(require("./BankDetailsRequestEmailTemplate"), exports);
25
26
  // Invitations
26
27
  __exportStar(require("./InviteOwnerEmailTemplate"), exports);
27
28
  __exportStar(require("./InvitePmEmailTemplate"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"src/","sources":["templates/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,QAAQ;AACR,kEAAgD;AAChD,gEAA8C;AAE9C,mBAAmB;AACnB,gEAA8C;AAE9C,gBAAgB;AAChB,oEAAkD;AAClD,6EAA2D;AAE3D,cAAc;AACd,6DAA2C;AAC3C,0DAAwC","sourcesContent":["// Teams\nexport * from './TenantSuspensionEmailTemplate';\nexport * from './TenantDeletionEmailTemplate';\n\n// Owner Statements\nexport * from './OwnerStatementEmailTemplate';\n\n// Payment setup\nexport * from './BankAccountChangedEmailTemplate';\nexport * from './BankAccountChangedTeamAdminEmailTemplate';\n\n// Invitations\nexport * from './InviteOwnerEmailTemplate';\nexport * from './InvitePmEmailTemplate';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"src/","sources":["templates/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,QAAQ;AACR,kEAAgD;AAChD,gEAA8C;AAE9C,mBAAmB;AACnB,gEAA8C;AAE9C,gBAAgB;AAChB,oEAAkD;AAClD,6EAA2D;AAC3D,oEAAkD;AAElD,cAAc;AACd,6DAA2C;AAC3C,0DAAwC","sourcesContent":["// Teams\nexport * from './TenantSuspensionEmailTemplate';\nexport * from './TenantDeletionEmailTemplate';\n\n// Owner Statements\nexport * from './OwnerStatementEmailTemplate';\n\n// Payment setup\nexport * from './BankAccountChangedEmailTemplate';\nexport * from './BankAccountChangedTeamAdminEmailTemplate';\nexport * from './BankDetailsRequestEmailTemplate';\n\n// Invitations\nexport * from './InviteOwnerEmailTemplate';\nexport * from './InvitePmEmailTemplate';\n"]}
@@ -0,0 +1,16 @@
1
+ import type { EmailBaseProps } from '../types';
2
+ export type BankDetailsRequestEmailTemplateProps = {
3
+ mode: EmailBaseProps['mode'];
4
+ user: EmailBaseProps['user'];
5
+ tenant: EmailBaseProps['tenant'];
6
+ themeColors: EmailBaseProps['themeColors'];
7
+ href: string;
8
+ form: {
9
+ type: 'ownerPortal';
10
+ setsUpLogin: boolean;
11
+ } | {
12
+ type: 'oneTime';
13
+ expiresOn: string;
14
+ };
15
+ };
16
+ export declare const BankDetailsRequestEmailTemplate: ({ mode, user, tenant, 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, themeColors, href, form, }) => (_jsxs(EmailContainer, { title: `${tenant.name} needs your payout details`, 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;AAgB9D,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,EAC9C,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,WAAW,EACX,IAAI,EACJ,IAAI,GACiC,EAAE,EAAE,CAAC,CAC1C,MAAC,cAAc,IACb,KAAK,EAAE,GAAG,MAAM,CAAC,IAAI,4BAA4B,EACjD,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 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 themeColors,\n href,\n form,\n}: BankDetailsRequestEmailTemplateProps) => (\n <EmailContainer\n title={`${tenant.name} needs your payout details`}\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"]}
@@ -2,5 +2,6 @@ import { type ActionEmailData, type ActionEmailTemplateProps } from '../componen
2
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,13 +6,13 @@ 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 us on ${args.appName}.</p><p>Accept the invitation below to set up your team access.</p>`,
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 your team on ${args.appName}.`,
13
+ shortDescription: `Accept your invitation to join ${args.teamName} on ${args.appName}.`,
14
14
  href: args.signInLink,
15
- subject: `You are invited to join your team on ${args.appName}`,
15
+ subject: `You are invited to join ${args.teamName} on ${args.appName}`,
16
16
  };
17
17
  };
18
18
  export const InvitePmEmailTemplate = (props) => {
@@ -20,9 +20,6 @@ export const InvitePmEmailTemplate = (props) => {
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,IAGC,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,oCAAoC,IAAI,CAAC,OAAO,qEAAqE;QAC9H,OAAO,EAAE,qFAAqF,UAAU,MAAM;QAC9G,UAAU,EAAE,mBAAmB;QAC/B,MAAM,EAAE,sBAAsB;QAC9B,gBAAgB,EAAE,+CAA+C,IAAI,CAAC,OAAO,GAAG;QAChF,IAAI,EAAE,IAAI,CAAC,UAAU;QACrB,OAAO,EAAE,wCAAwC,IAAI,CAAC,OAAO,EAAE;KAChE,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,KAA+B,EAAE,EAAE;IACvE,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,6aAA6a;SAC5c,EACD,MAAM,EAAE;YACN,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI;SACxB,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 }\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 us 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 your team on ${args.appName}.`,\n href: args.signInLink,\n subject: `You are invited to join your team on ${args.appName}`,\n };\n};\n\nexport const InvitePmEmailTemplate = (props: ActionEmailTemplateProps) => {\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 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 tenant={{\n logo: undefined,\n name: props.tenant.name,\n }}\n />\n );\n};\n"]}
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,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 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"]}
@@ -3,5 +3,6 @@ export * from './TenantDeletionEmailTemplate';
3
3
  export * from './OwnerStatementEmailTemplate';
4
4
  export * from './BankAccountChangedEmailTemplate';
5
5
  export * from './BankAccountChangedTeamAdminEmailTemplate';
6
+ export * from './BankDetailsRequestEmailTemplate';
6
7
  export * from './InviteOwnerEmailTemplate';
7
8
  export * from './InvitePmEmailTemplate';
@@ -6,6 +6,7 @@ export * from './OwnerStatementEmailTemplate';
6
6
  // Payment setup
7
7
  export * from './BankAccountChangedEmailTemplate';
8
8
  export * from './BankAccountChangedTeamAdminEmailTemplate';
9
+ export * from './BankDetailsRequestEmailTemplate';
9
10
  // Invitations
10
11
  export * from './InviteOwnerEmailTemplate';
11
12
  export * from './InvitePmEmailTemplate';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"src/","sources":["templates/index.ts"],"names":[],"mappings":"AAAA,QAAQ;AACR,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAE9C,mBAAmB;AACnB,cAAc,+BAA+B,CAAC;AAE9C,gBAAgB;AAChB,cAAc,mCAAmC,CAAC;AAClD,cAAc,4CAA4C,CAAC;AAE3D,cAAc;AACd,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC","sourcesContent":["// Teams\nexport * from './TenantSuspensionEmailTemplate';\nexport * from './TenantDeletionEmailTemplate';\n\n// Owner Statements\nexport * from './OwnerStatementEmailTemplate';\n\n// Payment setup\nexport * from './BankAccountChangedEmailTemplate';\nexport * from './BankAccountChangedTeamAdminEmailTemplate';\n\n// Invitations\nexport * from './InviteOwnerEmailTemplate';\nexport * from './InvitePmEmailTemplate';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"src/","sources":["templates/index.ts"],"names":[],"mappings":"AAAA,QAAQ;AACR,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAE9C,mBAAmB;AACnB,cAAc,+BAA+B,CAAC;AAE9C,gBAAgB;AAChB,cAAc,mCAAmC,CAAC;AAClD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,mCAAmC,CAAC;AAElD,cAAc;AACd,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC","sourcesContent":["// Teams\nexport * from './TenantSuspensionEmailTemplate';\nexport * from './TenantDeletionEmailTemplate';\n\n// Owner Statements\nexport * from './OwnerStatementEmailTemplate';\n\n// Payment setup\nexport * from './BankAccountChangedEmailTemplate';\nexport * from './BankAccountChangedTeamAdminEmailTemplate';\nexport * from './BankDetailsRequestEmailTemplate';\n\n// Invitations\nexport * from './InviteOwnerEmailTemplate';\nexport * from './InvitePmEmailTemplate';\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vrplatform/email",
3
- "version": "1.0.2-stage.38580868341",
3
+ "version": "1.0.2-stage.38771334373",
4
4
  "description": "VRTrust transactional email templates and Postmark transport",
5
5
  "license": "ISC",
6
6
  "main": "build/main/index.js",
@@ -0,0 +1,59 @@
1
+ import { Heading } from '@react-email/heading';
2
+ import { Text } from '@react-email/text';
3
+ import { Button } from '../components/Button';
4
+ import { EmailContainer } from '../components/EmailContainer';
5
+ import type { EmailBaseProps } from '../types';
6
+
7
+ export type BankDetailsRequestEmailTemplateProps = {
8
+ mode: EmailBaseProps['mode'];
9
+ user: EmailBaseProps['user'];
10
+ tenant: EmailBaseProps['tenant'];
11
+ themeColors: EmailBaseProps['themeColors'];
12
+ href: string;
13
+ // Owners enter their details in the owner portal; vendors in a one-time
14
+ // form that expires.
15
+ form:
16
+ | { type: 'ownerPortal'; setsUpLogin: boolean }
17
+ | { type: 'oneTime'; expiresOn: string };
18
+ };
19
+
20
+ export const BankDetailsRequestEmailTemplate = ({
21
+ mode,
22
+ user,
23
+ tenant,
24
+ themeColors,
25
+ href,
26
+ form,
27
+ }: BankDetailsRequestEmailTemplateProps) => (
28
+ <EmailContainer
29
+ title={`${tenant.name} needs your payout details`}
30
+ shortDescription={`Add the bank account ${tenant.name} pays you to.`}
31
+ tenant={tenant}
32
+ mode={mode}
33
+ >
34
+ <Heading style={{ fontSize: 28, fontWeight: 600, marginBottom: '50px' }}>
35
+ {user.firstName ? `Hi ${user.firstName},` : 'Hi there,'}
36
+ </Heading>
37
+ <Text>
38
+ <b>{tenant.name}</b> needs the bank account to send your payments to. Use
39
+ the button below to add it. Never send bank details by email.
40
+ </Text>
41
+ <Text>
42
+ {form.type === 'oneTime'
43
+ ? `The link works once and expires on ${form.expiresOn}.`
44
+ : form.setsUpLogin
45
+ ? 'You will set up your owner portal login first, then add your bank details.'
46
+ : 'Sign in to your owner portal to add your bank details.'}
47
+ </Text>
48
+ <Button
49
+ href={href}
50
+ mode={mode}
51
+ label="Add bank details"
52
+ themeColors={themeColors}
53
+ />
54
+ <Text>
55
+ If you did not expect this request, contact {tenant.name} before you enter
56
+ any details.
57
+ </Text>
58
+ </EmailContainer>
59
+ );
@@ -10,6 +10,7 @@ export const getDefaultInvitePropertyManagerEmailData = (
10
10
  args: {
11
11
  appName: string;
12
12
  signInLink: string;
13
+ teamName: string;
13
14
  }
14
15
  ): ActionEmailData => {
15
16
  const signInLink =
@@ -18,13 +19,13 @@ export const getDefaultInvitePropertyManagerEmailData = (
18
19
  : `<a href='${args.signInLink}' target='_blank'>${args.signInLink}</a>`;
19
20
 
20
21
  return {
21
- bodyOne: `<p>You are invited to join us on ${args.appName}.</p><p>Accept the invitation below to set up your team access.</p>`,
22
+ 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>`,
22
23
  bodyTwo: `<p>If you have any trouble with the button, you can use the following link below: ${signInLink}</p>`,
23
24
  buttonText: 'Accept Invitation',
24
25
  header: 'Welcome to the team!',
25
- shortDescription: `Accept your invitation to join your team on ${args.appName}.`,
26
+ shortDescription: `Accept your invitation to join ${args.teamName} on ${args.appName}.`,
26
27
  href: args.signInLink,
27
- subject: `You are invited to join your team on ${args.appName}`,
28
+ subject: `You are invited to join ${args.teamName} on ${args.appName}`,
28
29
  };
29
30
  };
30
31
 
@@ -37,10 +38,6 @@ export const InvitePmEmailTemplate = (props: ActionEmailTemplateProps) => {
37
38
  // Add guidance at render time so saved custom templates receive it too.
38
39
  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>`,
39
40
  }}
40
- tenant={{
41
- logo: undefined,
42
- name: props.tenant.name,
43
- }}
44
41
  />
45
42
  );
46
43
  };
@@ -8,6 +8,7 @@ export * from './OwnerStatementEmailTemplate';
8
8
  // Payment setup
9
9
  export * from './BankAccountChangedEmailTemplate';
10
10
  export * from './BankAccountChangedTeamAdminEmailTemplate';
11
+ export * from './BankDetailsRequestEmailTemplate';
11
12
 
12
13
  // Invitations
13
14
  export * from './InviteOwnerEmailTemplate';