@vrplatform/email 1.0.2-40176543866 → 1.0.2-40299030944
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 -11
- package/build/main/components/ActionEmailTemplate.js.map +1 -1
- package/build/main/components/EmailContainer.js +2 -1
- 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/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 +1 -0
- package/build/main/templates/BankAccountChangedEmailTemplate.js +3 -1
- package/build/main/templates/BankAccountChangedEmailTemplate.js.map +1 -1
- package/build/main/templates/BankAccountChangedTeamAdminEmailTemplate.d.ts +1 -0
- package/build/main/templates/BankAccountChangedTeamAdminEmailTemplate.js +1 -1
- package/build/main/templates/BankAccountChangedTeamAdminEmailTemplate.js.map +1 -1
- package/build/main/templates/BankDetailsRequestEmailTemplate.d.ts +2 -1
- package/build/main/templates/BankDetailsRequestEmailTemplate.js +1 -1
- package/build/main/templates/BankDetailsRequestEmailTemplate.js.map +1 -1
- package/build/main/templates/InviteOwnerEmailTemplate.js +1 -1
- package/build/main/templates/InviteOwnerEmailTemplate.js.map +1 -1
- package/build/main/templates/InvitePmEmailTemplate.js +1 -1
- package/build/main/templates/InvitePmEmailTemplate.js.map +1 -1
- package/build/main/templates/OwnerStatementEmailTemplate.d.ts +0 -2
- package/build/main/templates/OwnerStatementEmailTemplate.js +16 -37
- package/build/main/templates/OwnerStatementEmailTemplate.js.map +1 -1
- 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/module/components/ActionEmailTemplate.d.ts +3 -1
- package/build/module/components/ActionEmailTemplate.js +9 -11
- package/build/module/components/ActionEmailTemplate.js.map +1 -1
- package/build/module/components/EmailContainer.js +2 -1
- 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/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 +1 -0
- package/build/module/templates/BankAccountChangedEmailTemplate.js +3 -1
- package/build/module/templates/BankAccountChangedEmailTemplate.js.map +1 -1
- package/build/module/templates/BankAccountChangedTeamAdminEmailTemplate.d.ts +1 -0
- package/build/module/templates/BankAccountChangedTeamAdminEmailTemplate.js +2 -2
- package/build/module/templates/BankAccountChangedTeamAdminEmailTemplate.js.map +1 -1
- package/build/module/templates/BankDetailsRequestEmailTemplate.d.ts +2 -1
- package/build/module/templates/BankDetailsRequestEmailTemplate.js +1 -1
- package/build/module/templates/BankDetailsRequestEmailTemplate.js.map +1 -1
- package/build/module/templates/InviteOwnerEmailTemplate.js +1 -1
- package/build/module/templates/InviteOwnerEmailTemplate.js.map +1 -1
- package/build/module/templates/InvitePmEmailTemplate.js +1 -1
- package/build/module/templates/InvitePmEmailTemplate.js.map +1 -1
- package/build/module/templates/OwnerStatementEmailTemplate.d.ts +0 -2
- package/build/module/templates/OwnerStatementEmailTemplate.js +16 -37
- package/build/module/templates/OwnerStatementEmailTemplate.js.map +1 -1
- 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/package.json +1 -1
- package/src/components/ActionEmailTemplate.tsx +11 -13
- package/src/components/EmailContainer.tsx +2 -1
- package/src/components/EmailHeading.tsx +36 -0
- package/src/components/index.ts +1 -0
- package/src/index.ts +1 -1
- package/src/render.ts +24 -0
- package/src/templates/BankAccountChangedEmailTemplate.tsx +23 -9
- package/src/templates/BankAccountChangedTeamAdminEmailTemplate.tsx +11 -5
- package/src/templates/BankDetailsRequestEmailTemplate.tsx +5 -1
- package/src/templates/InviteOwnerEmailTemplate.tsx +1 -0
- package/src/templates/InvitePmEmailTemplate.tsx +1 -0
- package/src/templates/OwnerStatementEmailTemplate.tsx +19 -50
- package/src/templates/TenantDeletionEmailTemplate.tsx +9 -10
- package/src/templates/TenantSuspensionEmailTemplate.tsx +9 -10
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Heading } from '@react-email/heading';
|
|
2
1
|
import { Text } from '@react-email/text';
|
|
3
2
|
import {
|
|
4
3
|
EMAIL_ACTION_LINK_COMPONENT,
|
|
@@ -12,6 +11,7 @@ import type {
|
|
|
12
11
|
} from '../components/ActionEmailTemplate';
|
|
13
12
|
import { Button } from '../components/Button';
|
|
14
13
|
import { EmailContainer } from '../components/EmailContainer';
|
|
14
|
+
import { EmailHeading } from '../components/EmailHeading';
|
|
15
15
|
import { parseEmailHtml } from '../components/utils';
|
|
16
16
|
|
|
17
17
|
export const getDefaultOwnerStatementEmailData = (
|
|
@@ -22,8 +22,6 @@ export const getDefaultOwnerStatementEmailData = (
|
|
|
22
22
|
listingName: string;
|
|
23
23
|
userName: string;
|
|
24
24
|
month: string;
|
|
25
|
-
/** The owner opens the statement through an emailed link, without a login. */
|
|
26
|
-
noLogin?: boolean;
|
|
27
25
|
}
|
|
28
26
|
): ActionEmailData => {
|
|
29
27
|
const ownerStatementHref =
|
|
@@ -34,33 +32,23 @@ export const getDefaultOwnerStatementEmailData = (
|
|
|
34
32
|
const month = mode === 'tag' ? EMAIL_DATE_COMPONENT : args.month;
|
|
35
33
|
const userName = mode === 'tag' ? EMAIL_USER_NAME_COMPONENT : args.userName;
|
|
36
34
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
subject:
|
|
42
|
-
mode === 'tag'
|
|
43
|
-
? 'Your owner statement is ready'
|
|
44
|
-
: `Your ${args.month} owner statement for ${args.listingName}`,
|
|
45
|
-
shortDescription:
|
|
46
|
-
mode === 'tag'
|
|
47
|
-
? 'Your owner statement is ready. Open it with one click, no login needed.'
|
|
48
|
-
: `Your ${args.month} statement for ${args.listingName} is ready. Open it with one click, no login needed.`,
|
|
49
|
-
header: 'Your owner statement is ready',
|
|
50
|
-
bodyOne: `<p>Hi ${userName},</p><p>${args.appName} published your ${month} owner statement for ${listingName}. Open it with the button below. You don't need a login.</p>`,
|
|
51
|
-
buttonText: 'View statement',
|
|
52
|
-
bodyTwo: `<p style="color:#737373;font-size:13px">If the button doesn't work, copy this link into your browser: ${ownerStatementHref}</p>`,
|
|
53
|
-
href: args.ownerStatementHref,
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
|
|
35
|
+
// Owners open the statement by link without a login and viewers log in to
|
|
36
|
+
// the owner portal, so the text names neither. Subject and preview text are
|
|
37
|
+
// plain text without tokens, so a saved template must not keep the editor's
|
|
38
|
+
// sample month and listing.
|
|
57
39
|
return {
|
|
58
|
-
subject:
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
40
|
+
subject:
|
|
41
|
+
mode === 'tag'
|
|
42
|
+
? 'Your owner statement is ready'
|
|
43
|
+
: `Your ${args.month} owner statement for ${args.listingName}`,
|
|
44
|
+
shortDescription:
|
|
45
|
+
mode === 'tag'
|
|
46
|
+
? 'Your owner statement is ready to view.'
|
|
47
|
+
: `Your ${args.month} statement for ${args.listingName} is ready to view.`,
|
|
48
|
+
header: 'Your owner statement is ready',
|
|
49
|
+
bodyOne: `<p>Hi ${userName},</p><p>${args.appName} published your ${month} owner statement for ${listingName}. Open it with the button below.</p>`,
|
|
50
|
+
buttonText: 'View statement',
|
|
51
|
+
bodyTwo: `<p style="color:#737373;font-size:13px">If the button doesn't work, copy this link into your browser: ${ownerStatementHref}</p>`,
|
|
64
52
|
href: args.ownerStatementHref,
|
|
65
53
|
};
|
|
66
54
|
};
|
|
@@ -98,28 +86,9 @@ export const OwnerStatementEmailTemplate = ({
|
|
|
98
86
|
mode={mode}
|
|
99
87
|
unsubscribeHref={unsubscribeHref}
|
|
100
88
|
>
|
|
101
|
-
<
|
|
102
|
-
style={{
|
|
103
|
-
color: themeColors[8],
|
|
104
|
-
fontSize: 12,
|
|
105
|
-
fontWeight: 600,
|
|
106
|
-
letterSpacing: '0.08em',
|
|
107
|
-
textTransform: 'uppercase',
|
|
108
|
-
margin: '0 0 8px',
|
|
109
|
-
}}
|
|
110
|
-
>
|
|
111
|
-
Owner statement
|
|
112
|
-
</Text>
|
|
113
|
-
<Heading
|
|
114
|
-
style={{
|
|
115
|
-
fontSize: 26,
|
|
116
|
-
fontWeight: 600,
|
|
117
|
-
lineHeight: '34px',
|
|
118
|
-
margin: '0 0 32px',
|
|
119
|
-
}}
|
|
120
|
-
>
|
|
89
|
+
<EmailHeading eyebrow="Owner statement" themeColors={themeColors}>
|
|
121
90
|
{data.header?.trim() || 'Your owner statement is ready'}
|
|
122
|
-
</
|
|
91
|
+
</EmailHeading>
|
|
123
92
|
|
|
124
93
|
{data.banner?.trim() && (
|
|
125
94
|
<Text
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Heading } from '@react-email/heading';
|
|
2
1
|
import { Text } from '@react-email/text';
|
|
3
|
-
import { EmailContainer } from '../components';
|
|
2
|
+
import { EmailContainer, EmailHeading } from '../components';
|
|
3
|
+
import { THEME_COLORS } from '../theme';
|
|
4
4
|
import type { EmailBaseProps } from '../types';
|
|
5
5
|
|
|
6
6
|
export type TenantDeletionEmailTemplateProps = {
|
|
@@ -25,15 +25,14 @@ export const TenantDeletionEmailTemplate = ({
|
|
|
25
25
|
}}
|
|
26
26
|
mode={mode}
|
|
27
27
|
>
|
|
28
|
-
<
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
fontWeight: 600,
|
|
32
|
-
marginBottom: '50px',
|
|
33
|
-
}}
|
|
28
|
+
<EmailHeading
|
|
29
|
+
eyebrow="Team deleted"
|
|
30
|
+
themeColors={THEME_COLORS.vrplatform}
|
|
34
31
|
>
|
|
35
|
-
|
|
36
|
-
</
|
|
32
|
+
Your team was deleted
|
|
33
|
+
</EmailHeading>
|
|
34
|
+
|
|
35
|
+
<Text>{user.firstName ? `Dear ${user.firstName},` : 'Hi there,'}</Text>
|
|
37
36
|
|
|
38
37
|
<Text>
|
|
39
38
|
We wanted to inform you that the team account "{tenant.name}" has been
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Heading } from '@react-email/heading';
|
|
2
1
|
import { Text } from '@react-email/text';
|
|
3
|
-
import { EmailContainer } from '../components';
|
|
2
|
+
import { EmailContainer, EmailHeading } from '../components';
|
|
3
|
+
import { THEME_COLORS } from '../theme';
|
|
4
4
|
import type { EmailBaseProps } from '../types';
|
|
5
5
|
|
|
6
6
|
export type TenantSuspensionEmailTemplateProps = {
|
|
@@ -25,15 +25,14 @@ export const TenantSuspensionEmailTemplate = ({
|
|
|
25
25
|
}}
|
|
26
26
|
mode={mode}
|
|
27
27
|
>
|
|
28
|
-
<
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
fontWeight: 600,
|
|
32
|
-
marginBottom: '50px',
|
|
33
|
-
}}
|
|
28
|
+
<EmailHeading
|
|
29
|
+
eyebrow="Team suspended"
|
|
30
|
+
themeColors={THEME_COLORS.vrplatform}
|
|
34
31
|
>
|
|
35
|
-
|
|
36
|
-
</
|
|
32
|
+
Your team access is suspended
|
|
33
|
+
</EmailHeading>
|
|
34
|
+
|
|
35
|
+
<Text>{user.firstName ? `Dear ${user.firstName},` : 'Hi there,'}</Text>
|
|
37
36
|
|
|
38
37
|
<Text>
|
|
39
38
|
We're reaching out to inform you that as of today, access to your team{' '}
|