@vrplatform/email 1.0.1 → 1.0.2-5

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.
Files changed (130) hide show
  1. package/build/main/components/ActionEmailTemplate.d.ts +1 -1
  2. package/build/main/components/ActionEmailTemplate.js +18 -14
  3. package/build/main/components/ActionEmailTemplate.js.map +1 -1
  4. package/build/main/components/Button.d.ts +1 -1
  5. package/build/main/components/Button.js +7 -3
  6. package/build/main/components/Button.js.map +1 -1
  7. package/build/main/components/EmailContainer.d.ts +1 -1
  8. package/build/main/components/EmailContainer.js +26 -21
  9. package/build/main/components/EmailContainer.js.map +1 -1
  10. package/build/main/components/index.js +18 -2
  11. package/build/main/components/index.js.map +1 -1
  12. package/build/main/components/utils/index.js +17 -1
  13. package/build/main/components/utils/index.js.map +1 -1
  14. package/build/main/components/utils/parse-email-html.js +9 -5
  15. package/build/main/components/utils/parse-email-html.js.map +1 -1
  16. package/build/main/const.js +4 -1
  17. package/build/main/const.js.map +1 -1
  18. package/build/main/extensions.js +7 -4
  19. package/build/main/extensions.js.map +1 -1
  20. package/build/main/index.js +25 -6
  21. package/build/main/index.js.map +1 -1
  22. package/build/main/templates/InviteOwnerEmailTemplate.d.ts +1 -3
  23. package/build/main/templates/InviteOwnerEmailTemplate.js +12 -29
  24. package/build/main/templates/InviteOwnerEmailTemplate.js.map +1 -1
  25. package/build/main/templates/InvitePmEmailTemplate.d.ts +1 -3
  26. package/build/main/templates/InvitePmEmailTemplate.js +12 -34
  27. package/build/main/templates/InvitePmEmailTemplate.js.map +1 -1
  28. package/build/main/templates/OwnerStatementEmailTemplate.d.ts +1 -3
  29. package/build/main/templates/OwnerStatementEmailTemplate.js +15 -43
  30. package/build/main/templates/OwnerStatementEmailTemplate.js.map +1 -1
  31. package/build/main/templates/TenantDeletionEmailTemplate.d.ts +2 -4
  32. package/build/main/templates/TenantDeletionEmailTemplate.js +15 -19
  33. package/build/main/templates/TenantDeletionEmailTemplate.js.map +1 -1
  34. package/build/main/templates/TenantSuspensionEmailTemplate.d.ts +1 -3
  35. package/build/main/templates/TenantSuspensionEmailTemplate.js +13 -17
  36. package/build/main/templates/TenantSuspensionEmailTemplate.js.map +1 -1
  37. package/build/main/templates/index.d.ts +0 -3
  38. package/build/main/templates/index.js +21 -10
  39. package/build/main/templates/index.js.map +1 -1
  40. package/build/main/theme.d.ts +1 -1
  41. package/build/main/theme.js +7 -3
  42. package/build/main/theme.js.map +1 -1
  43. package/build/main/types.js +2 -1
  44. package/build/main/types.js.map +1 -1
  45. package/build/main/utils/index.js +17 -1
  46. package/build/main/utils/index.js.map +1 -1
  47. package/build/main/utils/send-email.d.ts +17 -10
  48. package/build/main/utils/send-email.js +41 -6
  49. package/build/main/utils/send-email.js.map +1 -1
  50. package/build/module/components/ActionEmailTemplate.d.ts +1 -1
  51. package/build/module/components/ActionEmailTemplate.js.map +1 -1
  52. package/build/module/components/Button.d.ts +1 -1
  53. package/build/module/components/Button.js.map +1 -1
  54. package/build/module/components/EmailContainer.d.ts +1 -1
  55. package/build/module/components/EmailContainer.js +2 -1
  56. package/build/module/components/EmailContainer.js.map +1 -1
  57. package/build/module/components/index.js.map +1 -1
  58. package/build/module/components/utils/index.js.map +1 -1
  59. package/build/module/components/utils/parse-email-html.js +4 -4
  60. package/build/module/components/utils/parse-email-html.js.map +1 -1
  61. package/build/module/const.js.map +1 -1
  62. package/build/module/extensions.js.map +1 -1
  63. package/build/module/index.js.map +1 -1
  64. package/build/module/templates/InviteOwnerEmailTemplate.d.ts +1 -3
  65. package/build/module/templates/InviteOwnerEmailTemplate.js +0 -22
  66. package/build/module/templates/InviteOwnerEmailTemplate.js.map +1 -1
  67. package/build/module/templates/InvitePmEmailTemplate.d.ts +1 -3
  68. package/build/module/templates/InvitePmEmailTemplate.js +0 -27
  69. package/build/module/templates/InvitePmEmailTemplate.js.map +1 -1
  70. package/build/module/templates/OwnerStatementEmailTemplate.d.ts +1 -3
  71. package/build/module/templates/OwnerStatementEmailTemplate.js +0 -33
  72. package/build/module/templates/OwnerStatementEmailTemplate.js.map +1 -1
  73. package/build/module/templates/TenantDeletionEmailTemplate.d.ts +2 -4
  74. package/build/module/templates/TenantDeletionEmailTemplate.js +0 -9
  75. package/build/module/templates/TenantDeletionEmailTemplate.js.map +1 -1
  76. package/build/module/templates/TenantSuspensionEmailTemplate.d.ts +1 -3
  77. package/build/module/templates/TenantSuspensionEmailTemplate.js +0 -8
  78. package/build/module/templates/TenantSuspensionEmailTemplate.js.map +1 -1
  79. package/build/module/templates/index.d.ts +0 -3
  80. package/build/module/templates/index.js +0 -5
  81. package/build/module/templates/index.js.map +1 -1
  82. package/build/module/theme.d.ts +1 -1
  83. package/build/module/theme.js.map +1 -1
  84. package/build/module/types.js.map +1 -1
  85. package/build/module/utils/index.js.map +1 -1
  86. package/build/module/utils/send-email.d.ts +17 -10
  87. package/build/module/utils/send-email.js +38 -6
  88. package/build/module/utils/send-email.js.map +1 -1
  89. package/package.json +31 -31
  90. package/src/components/EmailContainer.tsx +2 -1
  91. package/src/components/utils/parse-email-html.ts +4 -7
  92. package/src/templates/InviteOwnerEmailTemplate.tsx +0 -34
  93. package/src/templates/InvitePmEmailTemplate.tsx +0 -41
  94. package/src/templates/OwnerStatementEmailTemplate.tsx +0 -47
  95. package/src/templates/TenantDeletionEmailTemplate.tsx +0 -17
  96. package/src/templates/TenantSuspensionEmailTemplate.tsx +0 -16
  97. package/src/templates/index.ts +0 -7
  98. package/src/theme.ts +1 -1
  99. package/src/utils/send-email.ts +76 -27
  100. package/build/main/components/utils/parse-email-html.test.d.ts +0 -1
  101. package/build/main/components/utils/parse-email-html.test.js +0 -59
  102. package/build/main/components/utils/parse-email-html.test.js.map +0 -1
  103. package/build/main/templates/DailyDigestEmailTemplate.d.ts +0 -11
  104. package/build/main/templates/DailyDigestEmailTemplate.js +0 -97
  105. package/build/main/templates/DailyDigestEmailTemplate.js.map +0 -1
  106. package/build/main/templates/OwnerStatementSummaryEmailTemplate.d.ts +0 -9
  107. package/build/main/templates/OwnerStatementSummaryEmailTemplate.js +0 -46
  108. package/build/main/templates/OwnerStatementSummaryEmailTemplate.js.map +0 -1
  109. package/build/main/templates/OwnerTaxStatementEmailTemplate.d.ts +0 -10
  110. package/build/main/templates/OwnerTaxStatementEmailTemplate.js +0 -47
  111. package/build/main/templates/OwnerTaxStatementEmailTemplate.js.map +0 -1
  112. package/build/main/tsconfig.main.tsbuildinfo +0 -1
  113. package/build/module/components/utils/parse-email-html.test.d.ts +0 -1
  114. package/build/module/components/utils/parse-email-html.test.js +0 -59
  115. package/build/module/components/utils/parse-email-html.test.js.map +0 -1
  116. package/build/module/templates/DailyDigestEmailTemplate.d.ts +0 -11
  117. package/build/module/templates/DailyDigestEmailTemplate.js +0 -97
  118. package/build/module/templates/DailyDigestEmailTemplate.js.map +0 -1
  119. package/build/module/templates/OwnerStatementSummaryEmailTemplate.d.ts +0 -9
  120. package/build/module/templates/OwnerStatementSummaryEmailTemplate.js +0 -46
  121. package/build/module/templates/OwnerStatementSummaryEmailTemplate.js.map +0 -1
  122. package/build/module/templates/OwnerTaxStatementEmailTemplate.d.ts +0 -10
  123. package/build/module/templates/OwnerTaxStatementEmailTemplate.js +0 -47
  124. package/build/module/templates/OwnerTaxStatementEmailTemplate.js.map +0 -1
  125. package/build/module/tsconfig.esm.tsbuildinfo +0 -1
  126. package/src/components/utils/parse-email-html.test.ts +0 -65
  127. package/src/liveblocks.d.ts +0 -88
  128. package/src/templates/DailyDigestEmailTemplate.tsx +0 -186
  129. package/src/templates/OwnerStatementSummaryEmailTemplate.tsx +0 -78
  130. package/src/templates/OwnerTaxStatementEmailTemplate.tsx +0 -80
@@ -1,46 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { ActionEmailTemplate, } from '../components';
3
- import { EMAIL_ACTION_LINK_COMPONENT, EMAIL_USER_NAME_COMPONENT, } from '../extensions';
4
- export const getDefaultOwnerStatementSummaryEmailData = (mode, args) => {
5
- const ownerStatementHref = mode === 'tag' ? EMAIL_ACTION_LINK_COMPONENT : args.ownerStatementHref;
6
- const userName = mode === 'tag' ? EMAIL_USER_NAME_COMPONENT : args.userName;
7
- return {
8
- subject: 'Summary statement is ready',
9
- shortDescription: `An summary statement is ready for you. Log in to ${args.appName} to view it.`,
10
- header: 'Summary is ready to view',
11
- bodyOne: `<p>Hi ${userName},<p>A summary statement is ready for your review on ${args.appName}.</p><p>To access your statement, please click the button below:</p>`,
12
- buttonText: 'View statement',
13
- bodyTwo: `<p>If you have any trouble with the button, you can copy and paste the link below into your browser: ${ownerStatementHref}</p>`,
14
- href: args.ownerStatementHref,
15
- };
16
- };
17
- export const OwnerStatementSummaryEmailTemplate = (props) => {
18
- return _jsx(ActionEmailTemplate, { ...props });
19
- };
20
- const Preview = () => {
21
- const defaultName = 'John';
22
- return (_jsx(ActionEmailTemplate, { mode: "send", tenant: {
23
- name: 'Pineapple Mountain',
24
- logo: 'https://imagedelivery.net/Ftdv9WftbW1DctaiLSVfFA/fbd8c31f-478f-4eb0-74ac-c8eeb47b5000/256x256',
25
- }, data: getDefaultOwnerStatementSummaryEmailData('text', {
26
- appName: 'VRPlatform',
27
- ownerStatementHref: 'https://example.com',
28
- userName: defaultName,
29
- }), user: {
30
- firstName: 'John',
31
- }, listing: undefined, month: undefined, themeColors: [
32
- // portal.brown
33
- '#9E9390',
34
- '#8D7C78',
35
- '#7C6964',
36
- '#6E5954',
37
- '#614B46',
38
- '#573F39',
39
- '#4E342E',
40
- '#3F2D29',
41
- '#332725',
42
- '#2A2220',
43
- ] }));
44
- };
45
- export default Preview;
46
- //# sourceMappingURL=OwnerStatementSummaryEmailTemplate.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OwnerStatementSummaryEmailTemplate.js","sourceRoot":"src/","sources":["templates/OwnerStatementSummaryEmailTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAEL,mBAAmB,GAEpB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,2BAA2B,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AS,EAChB,WAAW,EAAE;YACX,eAAe;YACf,SAAS;YACT,SAAS;YACT,SAAS;YACT,SAAS;YACT,SAAS;YACT,SAAS;YACT,SAAS;YACT,SAAS;YACT,SAAS;YACT,SAAS;SACV,GACD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -1,10 +0,0 @@
1
- import { type ActionEmailData, type ActionEmailTemplateProps } from '../components';
2
- export declare const getDefaultOwnerTaxStatementEmailData: (mode: "tag" | "text", args: {
3
- appName: string;
4
- href: string;
5
- firstName: string | undefined | null;
6
- year: number;
7
- }) => ActionEmailData;
8
- export declare const OwnerTaxStatementEmailTemplate: (props: ActionEmailTemplateProps) => import("react/jsx-runtime").JSX.Element;
9
- declare const Preview: () => import("react/jsx-runtime").JSX.Element;
10
- export default Preview;
@@ -1,47 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { EMAIL_ACTION_LINK_COMPONENT, EMAIL_USER_NAME_COMPONENT, } from '../extensions';
3
- import { ActionEmailTemplate, } from '../components';
4
- export const getDefaultOwnerTaxStatementEmailData = (mode, args) => {
5
- const href = mode === 'tag' ? EMAIL_ACTION_LINK_COMPONENT : args.href;
6
- const firstName = mode === 'tag' ? EMAIL_USER_NAME_COMPONENT : args.firstName || 'there';
7
- return {
8
- subject: 'Your 1099 Tax Statement is ready',
9
- shortDescription: `Your 1099 Tax Statement is ready for you. Log in to ${args.appName} to view it.`,
10
- header: '1099 Tax Statement is ready',
11
- bodyOne: `<p>Hi ${firstName},<p>Your 1099 tax statement for ${args.year} is now available for you to review on ${args.appName}.</p><p>Click below to see your tax statement before we send it to the IRS.</p><p>To update your tax statement details, log into your ${args.appName} account and navigate to Settings>Statement Details.</p><p>To view your annual summary statement, navigate to the Summary page from within your ${args.appName} account.</p><p>Simply reply to this email if you have any questions.</p>`,
12
- buttonText: 'View tax statement',
13
- bodyTwo: `<p>If you have any trouble with the button, you can copy and paste the link below into your browser: ${href}</p>`,
14
- href: args.href,
15
- };
16
- };
17
- export const OwnerTaxStatementEmailTemplate = (props) => {
18
- return _jsx(ActionEmailTemplate, { ...props });
19
- };
20
- const Preview = () => {
21
- const defaultName = 'John';
22
- return (_jsx(ActionEmailTemplate, { mode: "send", tenant: {
23
- name: 'Pineapple Mountain',
24
- logo: 'https://imagedelivery.net/Ftdv9WftbW1DctaiLSVfFA/fbd8c31f-478f-4eb0-74ac-c8eeb47b5000/256x256',
25
- }, data: getDefaultOwnerTaxStatementEmailData('text', {
26
- appName: 'VRPlatform',
27
- href: 'https://example.com',
28
- firstName: defaultName,
29
- year: new Date().getFullYear(),
30
- }), user: {
31
- firstName: 'John',
32
- }, listing: undefined, month: undefined, themeColors: [
33
- // portal.brown
34
- '#9E9390',
35
- '#8D7C78',
36
- '#7C6964',
37
- '#6E5954',
38
- '#614B46',
39
- '#573F39',
40
- '#4E342E',
41
- '#3F2D29',
42
- '#332725',
43
- '#2A2220',
44
- ] }));
45
- };
46
- export default Preview;
47
- //# sourceMappingURL=OwnerTaxStatementEmailTemplate.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OwnerTaxStatementEmailTemplate.js","sourceRoot":"src/","sources":["templates/OwnerTaxStatementEmailTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,2BAA2B,EAC3B,yBAAyB,GAC1B,MAAM,eAAe,CAAC;AACvB,OAAO,EAEL,mBAAmB,GAEpB,MAAM,eAAe,CAAC;AAEvB,MAAM,CAAC,MAAM,oCAAoC,GAAG,CAClD,IAAoB,EACpB,IAKC,EACgB,EAAE;IACnB,MAAM,IAAI,GAAG,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,2BAA2B,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;IAEtE,MAAM,SAAS,GACb,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,IAAI,OAAO,CAAC;IAEzE,OAAO;QACL,OAAO,EAAE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/extensions.ts","../../src/index.ts","../../src/liveblocks.d.ts","../../src/theme.ts","../../src/types.ts","../../src/components/actionemailtemplate.tsx","../../src/components/button.tsx","../../src/components/emailcontainer.tsx","../../src/components/index.ts","../../src/components/utils/index.ts","../../src/components/utils/parse-email-html.test.ts","../../src/components/utils/parse-email-html.ts","../../src/templates/dailydigestemailtemplate.tsx","../../src/templates/inviteowneremailtemplate.tsx","../../src/templates/invitepmemailtemplate.tsx","../../src/templates/ownerstatementemailtemplate.tsx","../../src/templates/ownerstatementsummaryemailtemplate.tsx","../../src/templates/ownertaxstatementemailtemplate.tsx","../../src/templates/tenantdeletionemailtemplate.tsx","../../src/templates/tenantsuspensionemailtemplate.tsx","../../src/templates/index.ts","../../src/utils/index.ts","../../src/utils/send-email.ts"],"version":"5.8.3"}
@@ -1,59 +0,0 @@
1
- import { describe, expect, it } from 'bun:test';
2
- import { parseEmailHtml } from './parse-email-html';
3
- describe('parseEmailHtml', () => {
4
- it('should replace <action-link-component></action-link-component> with the sign-in link anchor tag', () => {
5
- const html = '<div><action-link-component></action-link-component></div>';
6
- const args = {
7
- href: 'https://example.com/signin',
8
- userName: 'John Doe',
9
- date: '2023-01-01',
10
- listingName: '123 Main St',
11
- };
12
- const result = parseEmailHtml(html, args);
13
- expect(result).toBe('<div><a href="https://example.com/signin" target="_blank">https://example.com/signin</a></div>');
14
- });
15
- it('should replace <user-name-component></user-name-component> with the user name', () => {
16
- const html = '<div>Hello <user-name-component></user-name-component>!</div>';
17
- const args = {
18
- href: 'https://example.com/signin',
19
- userName: 'John Doe',
20
- date: '2023-01-01',
21
- listingName: '123 Main St',
22
- };
23
- const result = parseEmailHtml(html, args);
24
- expect(result).toBe('<div>Hello John Doe!</div>');
25
- });
26
- it('should replace both <action-link-component> and <user-name-component> appropriately', () => {
27
- const html = `
28
- <div>
29
- <action-link-component></action-link-component>
30
- <user-name-component></user-name-component>
31
- </div>
32
- `;
33
- const args = {
34
- href: 'https://example.com/signin',
35
- userName: 'Jane Doe',
36
- date: '2023-01-01',
37
- listingName: '123 Main St',
38
- };
39
- const result = parseEmailHtml(html, args);
40
- expect(result).toBe(`
41
- <div>
42
- <a href="https://example.com/signin" target="_blank">https://example.com/signin</a>
43
- Jane Doe
44
- </div>
45
- `);
46
- });
47
- it('should return the input HTML unchanged if there are no components to replace', () => {
48
- const html = '<div>No components to replace here</div>';
49
- const args = {
50
- href: 'https://example.com/signin',
51
- userName: 'John Doe',
52
- date: '2023-01-01',
53
- listingName: '123 Main St',
54
- };
55
- const result = parseEmailHtml(html, args);
56
- expect(result).toBe('<div>No components to replace here</div>');
57
- });
58
- });
59
- //# sourceMappingURL=parse-email-html.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"parse-email-html.test.js","sourceRoot":"src/","sources":["components/utils/parse-email-html.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,QAAQ,CAAC,gBAAgB,EAAE,GAAG,EAAE;IAC9B,EAAE,CAAC,iGAAiG,EAAE,GAAG,EAAE;QACzG,MAAM,IAAI,GAAG,4DAA4D,CAAC;QAC1E,MAAM,IAAI,GAAyC;YACjD,IAAI,EAAE,4BAA4B;YAClC,QAAQ,EAAE,UAAU;YACpB,IAAI,EAAE,YAAY;YAClB,WAAW,EAAE,aAAa;SAC3B,CAAC;QACF,MAAM,MAAM,GAAG,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAC1C,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CACjB,gGAAgG,CACjG,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,+EAA+E,EAAE,GAAG,EAAE;QACvF,MAAM,IAAI,GACR,+DAA+D,CAAC;QAClE,MAAM,IAAI,GAAyC;YACjD,IAAI,EAAE,4BAA4B;YAClC,QAAQ,EAAE,UAAU;YACpB,IAAI,EAAE,YAAY;YAClB,WAAW,EAAE,aAAa;SAC3B,CAAC;QACF,MAAM,MAAM,GAAG,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAC1C,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,4BAA4B,CAAC,CAAC;IACpD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,qFAAqF,EAAE,GAAG,EAAE;QAC7F,MAAM,IAAI,GAAG;;;;;KAKZ,CAAC;QACF,MAAM,IAAI,GAAyC;YACjD,IAAI,EAAE,4BAA4B;YAClC,QAAQ,EAAE,UAAU;YACpB,IAAI,EAAE,YAAY;YAClB,WAAW,EAAE,aAAa;SAC3B,CAAC;QACF,MAAM,MAAM,GAAG,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAC1C,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC;;;;;KAKnB,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,8EAA8E,EAAE,GAAG,EAAE;QACtF,MAAM,IAAI,GAAG,0CAA0C,CAAC;QACxD,MAAM,IAAI,GAAyC;YACjD,IAAI,EAAE,4BAA4B;YAClC,QAAQ,EAAE,UAAU;YACpB,IAAI,EAAE,YAAY;YAClB,WAAW,EAAE,aAAa;SAC3B,CAAC;QACF,MAAM,MAAM,GAAG,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAC1C,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,0CAA0C,CAAC,CAAC;IAClE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,11 +0,0 @@
1
- import type { EmailBaseProps } from '../types';
2
- type NotificationKey = keyof Liveblocks['ActivitiesData'];
3
- export type DailyDigestEmailTemplateProps = {
4
- mode: EmailBaseProps['mode'];
5
- unreadNotifications: Record<NotificationKey, {
6
- id: string;
7
- name: string;
8
- }[]>;
9
- };
10
- export declare const DailyDigestEmailTemplate: ({ mode, unreadNotifications, }: DailyDigestEmailTemplateProps) => import("react/jsx-runtime").JSX.Element;
11
- export {};
@@ -1,97 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Heading } from '@react-email/heading';
3
- import { Link } from '@react-email/link';
4
- import { Text } from '@react-email/text';
5
- import { EmailContainer } from '../components';
6
- import { Button } from '../components/Button';
7
- const THEME_VRP = [
8
- // baseColor: #012F64
9
- '#E6F1FF',
10
- '#B8D9FE',
11
- '#8BC0FE',
12
- '#5DA8FD',
13
- '#308FFD',
14
- '#0377FC',
15
- '#025FCA',
16
- '#024797',
17
- '#012F65',
18
- '#011832',
19
- ];
20
- const THEME_NEUTRAL = [
21
- '#fafafa',
22
- '#f5f5f5',
23
- '#e5e5e5',
24
- '#d4d4d4',
25
- '#a3a3a3',
26
- '#737373',
27
- '#525252',
28
- '#404040',
29
- '#262626',
30
- '#171717',
31
- // "#0a0a0a"
32
- ];
33
- const NOTIFICATION_ORDER = {
34
- $inviteOwnerAccepted: {
35
- title: 'Owners invitations',
36
- text: 'accepted invite',
37
- order: 1,
38
- },
39
- $inviteTeamMemberAccepted: {
40
- title: 'Team member invitations',
41
- text: 'accepted invite',
42
- order: 2,
43
- },
44
- $ownerStatementInReview: {
45
- title: 'Owner statements ready for review',
46
- text: 'is ready for review',
47
- order: 3,
48
- },
49
- $ownerStatementPublished: {
50
- title: 'Owner statements were published',
51
- text: 'was published to owner portal',
52
- order: 4,
53
- },
54
- $1099StatementPublished: {
55
- title: '1099 tax statements were published',
56
- text: 'was finalized and published',
57
- order: 5,
58
- },
59
- };
60
- export const DailyDigestEmailTemplate = ({ mode, unreadNotifications, }) => {
61
- const total = Object.values(unreadNotifications).reduce((acc, curr) => acc + curr.length, 0);
62
- const emailTitle = `You have ${total} unread notification${total > 1 ? 's' : ''}`;
63
- const link = 'https://portal.vrplatform.app/dashboard/inbox';
64
- return (_jsxs(EmailContainer, { title: emailTitle, shortDescription: "Login to VRPlatform now to check your team's activity!", tenant: {
65
- logo: undefined,
66
- }, mode: mode, children: [_jsx(Heading, { style: {
67
- fontSize: 26,
68
- fontWeight: 600,
69
- marginBottom: '50px',
70
- }, children: emailTitle }), Object.entries(unreadNotifications)
71
- .sort(([aKey], [bKey]) => {
72
- const a = NOTIFICATION_ORDER[aKey]?.order ?? 0;
73
- const b = NOTIFICATION_ORDER[bKey]?.order ?? 0;
74
- return a - b;
75
- })
76
- .map(([key, notifications]) => {
77
- const data = NOTIFICATION_ORDER[key];
78
- if (notifications.length === 0 || !data)
79
- return null;
80
- return (_jsxs("div", { style: {
81
- marginBottom: '42px',
82
- }, children: [_jsx(Text, { style: {
83
- color: THEME_NEUTRAL[5],
84
- }, children: data.title }), notifications.map((not) => (_jsxs(Text, { style: { color: THEME_NEUTRAL[5] }, children: [_jsx("span", { style: {
85
- fontWeight: 800,
86
- color: '#000',
87
- }, children: not.name }), ' ', data.text] }, not.id)))] }, key));
88
- }), _jsx(Button, { href: link, mode: mode, "data-testid": "accept-invite-button", label: 'Go to VRPlatform', themeColors: THEME_VRP, style: {
89
- marginTop: '50px',
90
- marginBottom: '50px',
91
- } }), _jsx(Text, { children: "Best, VRPlatform" }), _jsxs(Text, { children: ["If you have any trouble with the button, you can copy and paste the link below into your browser:", ' ', _jsx(Link, { href: link, style: {
92
- display: 'inline',
93
- wordBreak: 'break-all',
94
- color: THEME_VRP[7],
95
- }, children: link })] })] }));
96
- };
97
- //# sourceMappingURL=DailyDigestEmailTemplate.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DailyDigestEmailTemplate.js","sourceRoot":"src/","sources":["templates/DailyDigestEmailTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe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,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,EAAE,aACnD,eACE,KAAK,EAAE;wCACL,UAAU,EAAE,GAAG;wCACf,KAAK,EAAE,MAAM;qCACd,YAEA,GAAG,CAAC,IAAI,GACJ,EAAC,GAAG,EACV,IAAI,CAAC,IAAI,KATD,GAAG,CAAC,EAAE,CAUV,CACR,CAAC,KAxBG,GAAG,CAyBJ,CACP,CAAC;YACJ,CAAC,CAAC,EAEJ,KAAC,MAAM,IACL,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,IAAI,iBACE,sBAAsB,EAClC,KAAK,EAAE,kBAAkB,EACzB,WAAW,EAAE,SAAS,EACtB,KAAK,EAAE;oBACL,SAAS,EAAE,MAAM;oBACjB,YAAY,EAAE,MAAM;iBACrB,GACD,EAEF,KAAC,IAAI,mCAAwB,EAE7B,MAAC,IAAI,oHAEsB,GAAG,EAC5B,KAAC,IAAI,IACH,IAAI,EAAE,IAAI,EACV,KAAK,EAAE;4BACL,OAAO,EAAE,QAAQ;4BACjB,SAAS,EAAE,WAAW;4BACtB,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC;yBACpB,YAEA,IAAI,GACA,IACF,IACQ,CAClB,CAAC;AACJ,CAAC,CAAC"}
@@ -1,9 +0,0 @@
1
- import { type ActionEmailData, type ActionEmailTemplateProps } from '../components';
2
- export declare const getDefaultOwnerStatementSummaryEmailData: (mode: "tag" | "text", args: {
3
- appName: string;
4
- ownerStatementHref: string;
5
- userName: string;
6
- }) => ActionEmailData;
7
- export declare const OwnerStatementSummaryEmailTemplate: (props: ActionEmailTemplateProps) => import("react/jsx-runtime").JSX.Element;
8
- declare const Preview: () => import("react/jsx-runtime").JSX.Element;
9
- export default Preview;
@@ -1,46 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { ActionEmailTemplate, } from '../components';
3
- import { EMAIL_ACTION_LINK_COMPONENT, EMAIL_USER_NAME_COMPONENT, } from '../extensions';
4
- export const getDefaultOwnerStatementSummaryEmailData = (mode, args) => {
5
- const ownerStatementHref = mode === 'tag' ? EMAIL_ACTION_LINK_COMPONENT : args.ownerStatementHref;
6
- const userName = mode === 'tag' ? EMAIL_USER_NAME_COMPONENT : args.userName;
7
- return {
8
- subject: 'Summary statement is ready',
9
- shortDescription: `An summary statement is ready for you. Log in to ${args.appName} to view it.`,
10
- header: 'Summary is ready to view',
11
- bodyOne: `<p>Hi ${userName},<p>A summary statement is ready for your review on ${args.appName}.</p><p>To access your statement, please click the button below:</p>`,
12
- buttonText: 'View statement',
13
- bodyTwo: `<p>If you have any trouble with the button, you can copy and paste the link below into your browser: ${ownerStatementHref}</p>`,
14
- href: args.ownerStatementHref,
15
- };
16
- };
17
- export const OwnerStatementSummaryEmailTemplate = (props) => {
18
- return _jsx(ActionEmailTemplate, { ...props });
19
- };
20
- const Preview = () => {
21
- const defaultName = 'John';
22
- return (_jsx(ActionEmailTemplate, { mode: "send", tenant: {
23
- name: 'Pineapple Mountain',
24
- logo: 'https://imagedelivery.net/Ftdv9WftbW1DctaiLSVfFA/fbd8c31f-478f-4eb0-74ac-c8eeb47b5000/256x256',
25
- }, data: getDefaultOwnerStatementSummaryEmailData('text', {
26
- appName: 'VRPlatform',
27
- ownerStatementHref: 'https://example.com',
28
- userName: defaultName,
29
- }), user: {
30
- firstName: 'John',
31
- }, listing: undefined, month: undefined, themeColors: [
32
- // portal.brown
33
- '#9E9390',
34
- '#8D7C78',
35
- '#7C6964',
36
- '#6E5954',
37
- '#614B46',
38
- '#573F39',
39
- '#4E342E',
40
- '#3F2D29',
41
- '#332725',
42
- '#2A2220',
43
- ] }));
44
- };
45
- export default Preview;
46
- //# sourceMappingURL=OwnerStatementSummaryEmailTemplate.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OwnerStatementSummaryEmailTemplate.js","sourceRoot":"src/","sources":["templates/OwnerStatementSummaryEmailTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAEL,mBAAmB,GAEpB,MAAM,eAA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,EAAE,SAAS,EAClB,KAAK,EAAE,SAAS,EAChB,WAAW,EAAE;YACX,eAAe;YACf,SAAS;YACT,SAAS;YACT,SAAS;YACT,SAAS;YACT,SAAS;YACT,SAAS;YACT,SAAS;YACT,SAAS;YACT,SAAS;YACT,SAAS;SACV,GACD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -1,10 +0,0 @@
1
- import { type ActionEmailData, type ActionEmailTemplateProps } from '../components';
2
- export declare const getDefaultOwnerTaxStatementEmailData: (mode: "tag" | "text", args: {
3
- appName: string;
4
- href: string;
5
- firstName: string | undefined | null;
6
- year: number;
7
- }) => ActionEmailData;
8
- export declare const OwnerTaxStatementEmailTemplate: (props: ActionEmailTemplateProps) => import("react/jsx-runtime").JSX.Element;
9
- declare const Preview: () => import("react/jsx-runtime").JSX.Element;
10
- export default Preview;
@@ -1,47 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { EMAIL_ACTION_LINK_COMPONENT, EMAIL_USER_NAME_COMPONENT, } from '../extensions';
3
- import { ActionEmailTemplate, } from '../components';
4
- export const getDefaultOwnerTaxStatementEmailData = (mode, args) => {
5
- const href = mode === 'tag' ? EMAIL_ACTION_LINK_COMPONENT : args.href;
6
- const firstName = mode === 'tag' ? EMAIL_USER_NAME_COMPONENT : args.firstName || 'there';
7
- return {
8
- subject: 'Your 1099 Tax Statement is ready',
9
- shortDescription: `Your 1099 Tax Statement is ready for you. Log in to ${args.appName} to view it.`,
10
- header: '1099 Tax Statement is ready',
11
- bodyOne: `<p>Hi ${firstName},<p>Your 1099 tax statement for ${args.year} is now available for you to review on ${args.appName}.</p><p>Click below to see your tax statement before we send it to the IRS.</p><p>To update your tax statement details, log into your ${args.appName} account and navigate to Settings>Statement Details.</p><p>To view your annual summary statement, navigate to the Summary page from within your ${args.appName} account.</p><p>Simply reply to this email if you have any questions.</p>`,
12
- buttonText: 'View tax statement',
13
- bodyTwo: `<p>If you have any trouble with the button, you can copy and paste the link below into your browser: ${href}</p>`,
14
- href: args.href,
15
- };
16
- };
17
- export const OwnerTaxStatementEmailTemplate = (props) => {
18
- return _jsx(ActionEmailTemplate, { ...props });
19
- };
20
- const Preview = () => {
21
- const defaultName = 'John';
22
- return (_jsx(ActionEmailTemplate, { mode: "send", tenant: {
23
- name: 'Pineapple Mountain',
24
- logo: 'https://imagedelivery.net/Ftdv9WftbW1DctaiLSVfFA/fbd8c31f-478f-4eb0-74ac-c8eeb47b5000/256x256',
25
- }, data: getDefaultOwnerTaxStatementEmailData('text', {
26
- appName: 'VRPlatform',
27
- href: 'https://example.com',
28
- firstName: defaultName,
29
- year: new Date().getFullYear(),
30
- }), user: {
31
- firstName: 'John',
32
- }, listing: undefined, month: undefined, themeColors: [
33
- // portal.brown
34
- '#9E9390',
35
- '#8D7C78',
36
- '#7C6964',
37
- '#6E5954',
38
- '#614B46',
39
- '#573F39',
40
- '#4E342E',
41
- '#3F2D29',
42
- '#332725',
43
- '#2A2220',
44
- ] }));
45
- };
46
- export default Preview;
47
- //# sourceMappingURL=OwnerTaxStatementEmailTemplate.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OwnerTaxStatementEmailTemplate.js","sourceRoot":"src/","sources":["templates/OwnerTaxStatementEmailTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,2BAA2B,EAC3B,yBAAyB,GAC1B,MAAM,eAAe,CAAC;AACvB,OAAO,EAEL,mBAAmB,GAEpB,MAAM,eAAe,CAAC;AAEvB,MAAM,CAAC,MAAM,oCAAoC,GAAG,CAClD,IAAoB,EACpB,IAKC,EACgB,EAAE;IACnB,MAAM,IAAI,GAAG,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,2BAA2B,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;IAEtE,MAAM,SAAS,GACb,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,IAAI,OAAO,C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+0,0 @@
1
- {"root":["../../src/const.ts","../../src/extensions.ts","../../src/index.ts","../../src/liveblocks.d.ts","../../src/theme.ts","../../src/types.ts","../../src/components/actionemailtemplate.tsx","../../src/components/button.tsx","../../src/components/emailcontainer.tsx","../../src/components/index.ts","../../src/components/utils/index.ts","../../src/components/utils/parse-email-html.test.ts","../../src/components/utils/parse-email-html.ts","../../src/templates/dailydigestemailtemplate.tsx","../../src/templates/inviteowneremailtemplate.tsx","../../src/templates/invitepmemailtemplate.tsx","../../src/templates/ownerstatementemailtemplate.tsx","../../src/templates/ownerstatementsummaryemailtemplate.tsx","../../src/templates/ownertaxstatementemailtemplate.tsx","../../src/templates/tenantdeletionemailtemplate.tsx","../../src/templates/tenantsuspensionemailtemplate.tsx","../../src/templates/index.ts","../../src/utils/index.ts","../../src/utils/send-email.ts"],"version":"5.8.3"}
@@ -1,65 +0,0 @@
1
- import { describe, expect, it } from 'bun:test';
2
- import { parseEmailHtml } from './parse-email-html';
3
-
4
- describe('parseEmailHtml', () => {
5
- it('should replace <action-link-component></action-link-component> with the sign-in link anchor tag', () => {
6
- const html = '<div><action-link-component></action-link-component></div>';
7
- const args: Parameters<typeof parseEmailHtml>[1] = {
8
- href: 'https://example.com/signin',
9
- userName: 'John Doe',
10
- date: '2023-01-01',
11
- listingName: '123 Main St',
12
- };
13
- const result = parseEmailHtml(html, args);
14
- expect(result).toBe(
15
- '<div><a href="https://example.com/signin" target="_blank">https://example.com/signin</a></div>'
16
- );
17
- });
18
-
19
- it('should replace <user-name-component></user-name-component> with the user name', () => {
20
- const html =
21
- '<div>Hello <user-name-component></user-name-component>!</div>';
22
- const args: Parameters<typeof parseEmailHtml>[1] = {
23
- href: 'https://example.com/signin',
24
- userName: 'John Doe',
25
- date: '2023-01-01',
26
- listingName: '123 Main St',
27
- };
28
- const result = parseEmailHtml(html, args);
29
- expect(result).toBe('<div>Hello John Doe!</div>');
30
- });
31
-
32
- it('should replace both <action-link-component> and <user-name-component> appropriately', () => {
33
- const html = `
34
- <div>
35
- <action-link-component></action-link-component>
36
- <user-name-component></user-name-component>
37
- </div>
38
- `;
39
- const args: Parameters<typeof parseEmailHtml>[1] = {
40
- href: 'https://example.com/signin',
41
- userName: 'Jane Doe',
42
- date: '2023-01-01',
43
- listingName: '123 Main St',
44
- };
45
- const result = parseEmailHtml(html, args);
46
- expect(result).toBe(`
47
- <div>
48
- <a href="https://example.com/signin" target="_blank">https://example.com/signin</a>
49
- Jane Doe
50
- </div>
51
- `);
52
- });
53
-
54
- it('should return the input HTML unchanged if there are no components to replace', () => {
55
- const html = '<div>No components to replace here</div>';
56
- const args: Parameters<typeof parseEmailHtml>[1] = {
57
- href: 'https://example.com/signin',
58
- userName: 'John Doe',
59
- date: '2023-01-01',
60
- listingName: '123 Main St',
61
- };
62
- const result = parseEmailHtml(html, args);
63
- expect(result).toBe('<div>No components to replace here</div>');
64
- });
65
- });
@@ -1,88 +0,0 @@
1
- // Define Liveblocks types for your application
2
- // https://liveblocks.io/docs/api-reference/liveblocks-react#Typing-your-data
3
- declare global {
4
- interface Liveblocks {
5
- ActivitiesData: {
6
- $ownerStatementInReview: {
7
- ownerStatementId: string;
8
- listingId: string;
9
- startAt: string;
10
- tenantId: string;
11
- triggeredByUserId: string;
12
- };
13
- $ownerStatementPublished: {
14
- ownerStatementId: string;
15
- tenantId: string;
16
- listingId: string;
17
- startAt: string;
18
- status: 'posted' | 'published';
19
- triggeredByUserId?: string;
20
- };
21
- $inviteOwnerAccepted: {
22
- userId: string;
23
- tenantId: string;
24
- };
25
- $inviteTeamMemberAccepted: {
26
- userId: string;
27
- tenantId: string;
28
- };
29
- $1099StatementPublished: {
30
- taxStatementId: string;
31
- tenantId: string;
32
- year: number;
33
- status: 'ready' | 'submitted';
34
- triggeredByUserId?: string;
35
- };
36
- };
37
-
38
- // Each user's Presence, for useMyPresence, useOthers, etc.
39
- // biome-ignore lint/complexity/noBannedTypes: <explanation>
40
- Presence: {
41
- // Example, real-time cursor coordinates
42
- // cursor: { x: number; y: number };
43
- };
44
-
45
- // The Storage tree for the room, for useMutation, useStorage, etc.
46
- // biome-ignore lint/complexity/noBannedTypes: <explanation>
47
- Storage: {
48
- // Example, a conflict-free list
49
- // animals: LiveList<string>;
50
- };
51
-
52
- // Custom user info set when authenticating with a secret key
53
- UserMeta: {
54
- id: string;
55
- // biome-ignore lint/complexity/noBannedTypes: <explanation>
56
- info: {
57
- // Example properties, for useSelf, useUser, useOthers, etc.
58
- // name: string;
59
- // avatar: string;
60
- };
61
- };
62
-
63
- // Custom events, for useBroadcastEvent, useEventListener
64
- // biome-ignore lint/complexity/noBannedTypes: <explanation>
65
- RoomEvent: {};
66
- // Example has two events, using a union
67
- // | { type: "PLAY" }
68
- // | { type: "REACTION"; emoji: "🔥" };
69
-
70
- // Custom metadata set on threads, for useThreads, useCreateThread, etc.
71
- // biome-ignore lint/complexity/noBannedTypes: <explanation>
72
- ThreadMetadata: {
73
- // Example, attaching coordinates to a thread
74
- // x: number;
75
- // y: number;
76
- };
77
-
78
- // Custom room info set with resolveRoomsInfo, for useRoomInfo
79
- // biome-ignore lint/complexity/noBannedTypes: <explanation>
80
- RoomInfo: {
81
- // Example, rooms with a title and url
82
- // title: string;
83
- // url: string;
84
- };
85
- }
86
- }
87
-
88
- export type {};