@vrplatform/email 1.0.2-stage.44381428783 → 1.0.2-stage.44480161788
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/templates/YearEndStatementEmailTemplate.d.ts +21 -0
- package/build/main/templates/YearEndStatementEmailTemplate.js +32 -0
- package/build/main/templates/YearEndStatementEmailTemplate.js.map +1 -0
- package/build/main/templates/index.d.ts +1 -0
- package/build/main/templates/index.js +1 -0
- package/build/main/templates/index.js.map +1 -1
- package/build/module/templates/YearEndStatementEmailTemplate.d.ts +21 -0
- package/build/module/templates/YearEndStatementEmailTemplate.js +27 -0
- package/build/module/templates/YearEndStatementEmailTemplate.js.map +1 -0
- package/build/module/templates/index.d.ts +1 -0
- package/build/module/templates/index.js +1 -0
- package/build/module/templates/index.js.map +1 -1
- package/package.json +1 -1
- package/src/templates/YearEndStatementEmailTemplate.tsx +58 -0
- package/src/templates/index.ts +1 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ActionEmailData, ActionEmailTemplateProps } from '../components/ActionEmailTemplate';
|
|
2
|
+
/**
|
|
3
|
+
* Default text of the `yearEndStatement` email: an owner's year-end statement
|
|
4
|
+
* of a fiscal year is published. Owners open it by a no-login link, viewers
|
|
5
|
+
* in the owner portal. Settings > Emails edits it with PRO-20846.
|
|
6
|
+
*/
|
|
7
|
+
export declare const getDefaultYearEndStatementEmailData: (mode: 'tag' | 'text', args: {
|
|
8
|
+
appName: string;
|
|
9
|
+
href: string;
|
|
10
|
+
userName: string;
|
|
11
|
+
/** The fiscal year, such as `2025`. */
|
|
12
|
+
year: string;
|
|
13
|
+
/** The months it covers, such as `Jan 2025 - Dec 2025`. */
|
|
14
|
+
period: string;
|
|
15
|
+
}) => ActionEmailData;
|
|
16
|
+
export declare const YearEndStatementEmailTemplate: ({ period, ...props }: Omit<ActionEmailTemplateProps, 'listing' | 'month'> & {
|
|
17
|
+
/** The months the statement covers, such as `Jan 2025 - Dec 2025`. */
|
|
18
|
+
period: string;
|
|
19
|
+
/** Requests a new no-login link once the emailed one has expired. */
|
|
20
|
+
renewHref?: string;
|
|
21
|
+
}) => import("react").JSX.Element;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.YearEndStatementEmailTemplate = exports.getDefaultYearEndStatementEmailData = void 0;
|
|
4
|
+
const extensions_1 = require("../extensions");
|
|
5
|
+
const OwnerStatementEmailTemplate_1 = require("./OwnerStatementEmailTemplate");
|
|
6
|
+
/**
|
|
7
|
+
* Default text of the `yearEndStatement` email: an owner's year-end statement
|
|
8
|
+
* of a fiscal year is published. Owners open it by a no-login link, viewers
|
|
9
|
+
* in the owner portal. Settings > Emails edits it with PRO-20846.
|
|
10
|
+
*/
|
|
11
|
+
const getDefaultYearEndStatementEmailData = (mode, args) => {
|
|
12
|
+
const href = mode === 'tag' ? extensions_1.EMAIL_ACTION_LINK_COMPONENT : args.href;
|
|
13
|
+
const period = mode === 'tag' ? extensions_1.EMAIL_DATE_COMPONENT : args.period;
|
|
14
|
+
const userName = mode === 'tag' ? extensions_1.EMAIL_USER_NAME_COMPONENT : args.userName;
|
|
15
|
+
return {
|
|
16
|
+
subject: mode === 'tag'
|
|
17
|
+
? 'Your year-end statement is ready'
|
|
18
|
+
: `Your ${args.year} year-end statement`,
|
|
19
|
+
shortDescription: mode === 'tag'
|
|
20
|
+
? 'Your year-end statement is ready to view.'
|
|
21
|
+
: `Your ${args.year} year-end statement is ready to view.`,
|
|
22
|
+
header: 'Your year-end statement is ready',
|
|
23
|
+
bodyOne: `<p>Hi ${userName},</p><p>${args.appName} published your year-end statement for ${period}. It sums up your owner statements of the year. Open it with the button below.</p>`,
|
|
24
|
+
buttonText: 'View year-end statement',
|
|
25
|
+
bodyTwo: `<p style="color:#737373;font-size:13px">If the button doesn't work, copy this link into your browser: ${href}</p>`,
|
|
26
|
+
href: args.href,
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
exports.getDefaultYearEndStatementEmailData = getDefaultYearEndStatementEmailData;
|
|
30
|
+
const YearEndStatementEmailTemplate = ({ period, ...props }) => (0, OwnerStatementEmailTemplate_1.OwnerStatementEmailTemplate)({ ...props, listing: undefined, month: period });
|
|
31
|
+
exports.YearEndStatementEmailTemplate = YearEndStatementEmailTemplate;
|
|
32
|
+
//# sourceMappingURL=YearEndStatementEmailTemplate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"YearEndStatementEmailTemplate.js","sourceRoot":"src/","sources":["templates/YearEndStatementEmailTemplate.tsx"],"names":[],"mappings":";;;AAAA,8CAIuB;AAKvB,+EAA4E;AAE5E;;;;GAIG;AACI,MAAM,mCAAmC,GAAG,CACjD,IAAoB,EACpB,IAQC,EACgB,EAAE;IACnB,MAAM,IAAI,GAAG,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,wCAA2B,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;IACtE,MAAM,MAAM,GAAG,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,iCAAoB,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC;IACnE,MAAM,QAAQ,GAAG,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,sCAAyB,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC;IAC5E,OAAO;QACL,OAAO,EACL,IAAI,KAAK,KAAK;YACZ,CAAC,CAAC,kCAAkC;YACpC,CAAC,CAAC,QAAQ,IAAI,CAAC,IAAI,qBAAqB;QAC5C,gBAAgB,EACd,IAAI,KAAK,KAAK;YACZ,CAAC,CAAC,2CAA2C;YAC7C,CAAC,CAAC,QAAQ,IAAI,CAAC,IAAI,uCAAuC;QAC9D,MAAM,EAAE,kCAAkC;QAC1C,OAAO,EAAE,SAAS,QAAQ,WAAW,IAAI,CAAC,OAAO,0CAA0C,MAAM,oFAAoF;QACrL,UAAU,EAAE,yBAAyB;QACrC,OAAO,EAAE,yGAAyG,IAAI,MAAM;QAC5H,IAAI,EAAE,IAAI,CAAC,IAAI;KAChB,CAAC;AACJ,CAAC,CAAC;AA9BW,QAAA,mCAAmC,GAAnC,mCAAmC,CA8B9C;AAEK,MAAM,6BAA6B,GAAG,CAAC,EAC5C,MAAM,EACN,GAAG,KAAK,EAMT,EAAE,EAAE,CACH,IAAA,yDAA2B,EAAC,EAAE,GAAG,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;AATlE,QAAA,6BAA6B,GAA7B,6BAA6B,CASqC","sourcesContent":["import {\n EMAIL_ACTION_LINK_COMPONENT,\n EMAIL_DATE_COMPONENT,\n EMAIL_USER_NAME_COMPONENT,\n} from '../extensions';\nimport type {\n ActionEmailData,\n ActionEmailTemplateProps,\n} from '../components/ActionEmailTemplate';\nimport { OwnerStatementEmailTemplate } from './OwnerStatementEmailTemplate';\n\n/**\n * Default text of the `yearEndStatement` email: an owner's year-end statement\n * of a fiscal year is published. Owners open it by a no-login link, viewers\n * in the owner portal. Settings > Emails edits it with PRO-20846.\n */\nexport const getDefaultYearEndStatementEmailData = (\n mode: 'tag' | 'text',\n args: {\n appName: string;\n href: string;\n userName: string;\n /** The fiscal year, such as `2025`. */\n year: string;\n /** The months it covers, such as `Jan 2025 - Dec 2025`. */\n period: string;\n }\n): ActionEmailData => {\n const href = mode === 'tag' ? EMAIL_ACTION_LINK_COMPONENT : args.href;\n const period = mode === 'tag' ? EMAIL_DATE_COMPONENT : args.period;\n const userName = mode === 'tag' ? EMAIL_USER_NAME_COMPONENT : args.userName;\n return {\n subject:\n mode === 'tag'\n ? 'Your year-end statement is ready'\n : `Your ${args.year} year-end statement`,\n shortDescription:\n mode === 'tag'\n ? 'Your year-end statement is ready to view.'\n : `Your ${args.year} year-end statement is ready to view.`,\n header: 'Your year-end statement is ready',\n bodyOne: `<p>Hi ${userName},</p><p>${args.appName} published your year-end statement for ${period}. It sums up your owner statements of the year. Open it with the button below.</p>`,\n buttonText: 'View year-end statement',\n bodyTwo: `<p style=\"color:#737373;font-size:13px\">If the button doesn't work, copy this link into your browser: ${href}</p>`,\n href: args.href,\n };\n};\n\nexport const YearEndStatementEmailTemplate = ({\n period,\n ...props\n}: Omit<ActionEmailTemplateProps, 'listing' | 'month'> & {\n /** The months the statement covers, such as `Jan 2025 - Dec 2025`. */\n period: string;\n /** Requests a new no-login link once the emailed one has expired. */\n renewHref?: string;\n}) =>\n OwnerStatementEmailTemplate({ ...props, listing: undefined, month: period });\n"]}
|
|
@@ -5,6 +5,7 @@ export * from './TeamRoleGrantedEmailTemplate';
|
|
|
5
5
|
export * from './TenantSuspensionEmailTemplate';
|
|
6
6
|
export * from './TenantDeletionEmailTemplate';
|
|
7
7
|
export * from './OwnerStatementEmailTemplate';
|
|
8
|
+
export * from './YearEndStatementEmailTemplate';
|
|
8
9
|
export * from './BankAccountChangedEmailTemplate';
|
|
9
10
|
export * from './BankAccountChangedTeamAdminEmailTemplate';
|
|
10
11
|
export * from './BankDetailsRequestEmailTemplate';
|
|
@@ -23,6 +23,7 @@ __exportStar(require("./TenantSuspensionEmailTemplate"), exports);
|
|
|
23
23
|
__exportStar(require("./TenantDeletionEmailTemplate"), exports);
|
|
24
24
|
// Owner Statements
|
|
25
25
|
__exportStar(require("./OwnerStatementEmailTemplate"), exports);
|
|
26
|
+
__exportStar(require("./YearEndStatementEmailTemplate"), exports);
|
|
26
27
|
// Payment setup
|
|
27
28
|
__exportStar(require("./BankAccountChangedEmailTemplate"), exports);
|
|
28
29
|
__exportStar(require("./BankAccountChangedTeamAdminEmailTemplate"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["templates/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,QAAQ;AACR,mEAAiD;AACjD,qEAAmD;AACnD,yEAAuD;AACvD,iEAA+C;AAC/C,kEAAgD;AAChD,gEAA8C;AAE9C,mBAAmB;AACnB,gEAA8C;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["templates/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,QAAQ;AACR,mEAAiD;AACjD,qEAAmD;AACnD,yEAAuD;AACvD,iEAA+C;AAC/C,kEAAgD;AAChD,gEAA8C;AAE9C,mBAAmB;AACnB,gEAA8C;AAC9C,kEAAgD;AAEhD,gBAAgB;AAChB,oEAAkD;AAClD,6EAA2D;AAC3D,oEAAkD;AAElD,QAAQ;AACR,yEAAuD;AACvD,yDAAuC;AAEvC,cAAc;AACd,6DAA2C;AAC3C,0DAAwC","sourcesContent":["// Teams\nexport * from './SecondFactorResetEmailTemplate';\nexport * from './TeamApiTokenCreatedEmailTemplate';\nexport * from './TeamInviteOutsideDomainEmailTemplate';\nexport * from './TeamRoleGrantedEmailTemplate';\nexport * from './TenantSuspensionEmailTemplate';\nexport * from './TenantDeletionEmailTemplate';\n\n// Owner Statements\nexport * from './OwnerStatementEmailTemplate';\nexport * from './YearEndStatementEmailTemplate';\n\n// Payment setup\nexport * from './BankAccountChangedEmailTemplate';\nexport * from './BankAccountChangedTeamAdminEmailTemplate';\nexport * from './BankDetailsRequestEmailTemplate';\n\n// 1099s\nexport * from './Tax1099ConsentWithdrawnEmailTemplate';\nexport * from './Tax1099EmailTemplate';\n\n// Invitations\nexport * from './InviteOwnerEmailTemplate';\nexport * from './InvitePmEmailTemplate';\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ActionEmailData, ActionEmailTemplateProps } from '../components/ActionEmailTemplate';
|
|
2
|
+
/**
|
|
3
|
+
* Default text of the `yearEndStatement` email: an owner's year-end statement
|
|
4
|
+
* of a fiscal year is published. Owners open it by a no-login link, viewers
|
|
5
|
+
* in the owner portal. Settings > Emails edits it with PRO-20846.
|
|
6
|
+
*/
|
|
7
|
+
export declare const getDefaultYearEndStatementEmailData: (mode: 'tag' | 'text', args: {
|
|
8
|
+
appName: string;
|
|
9
|
+
href: string;
|
|
10
|
+
userName: string;
|
|
11
|
+
/** The fiscal year, such as `2025`. */
|
|
12
|
+
year: string;
|
|
13
|
+
/** The months it covers, such as `Jan 2025 - Dec 2025`. */
|
|
14
|
+
period: string;
|
|
15
|
+
}) => ActionEmailData;
|
|
16
|
+
export declare const YearEndStatementEmailTemplate: ({ period, ...props }: Omit<ActionEmailTemplateProps, 'listing' | 'month'> & {
|
|
17
|
+
/** The months the statement covers, such as `Jan 2025 - Dec 2025`. */
|
|
18
|
+
period: string;
|
|
19
|
+
/** Requests a new no-login link once the emailed one has expired. */
|
|
20
|
+
renewHref?: string;
|
|
21
|
+
}) => import("react").JSX.Element;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { EMAIL_ACTION_LINK_COMPONENT, EMAIL_DATE_COMPONENT, EMAIL_USER_NAME_COMPONENT, } from '../extensions';
|
|
2
|
+
import { OwnerStatementEmailTemplate } from './OwnerStatementEmailTemplate';
|
|
3
|
+
/**
|
|
4
|
+
* Default text of the `yearEndStatement` email: an owner's year-end statement
|
|
5
|
+
* of a fiscal year is published. Owners open it by a no-login link, viewers
|
|
6
|
+
* in the owner portal. Settings > Emails edits it with PRO-20846.
|
|
7
|
+
*/
|
|
8
|
+
export const getDefaultYearEndStatementEmailData = (mode, args) => {
|
|
9
|
+
const href = mode === 'tag' ? EMAIL_ACTION_LINK_COMPONENT : args.href;
|
|
10
|
+
const period = mode === 'tag' ? EMAIL_DATE_COMPONENT : args.period;
|
|
11
|
+
const userName = mode === 'tag' ? EMAIL_USER_NAME_COMPONENT : args.userName;
|
|
12
|
+
return {
|
|
13
|
+
subject: mode === 'tag'
|
|
14
|
+
? 'Your year-end statement is ready'
|
|
15
|
+
: `Your ${args.year} year-end statement`,
|
|
16
|
+
shortDescription: mode === 'tag'
|
|
17
|
+
? 'Your year-end statement is ready to view.'
|
|
18
|
+
: `Your ${args.year} year-end statement is ready to view.`,
|
|
19
|
+
header: 'Your year-end statement is ready',
|
|
20
|
+
bodyOne: `<p>Hi ${userName},</p><p>${args.appName} published your year-end statement for ${period}. It sums up your owner statements of the year. Open it with the button below.</p>`,
|
|
21
|
+
buttonText: 'View year-end statement',
|
|
22
|
+
bodyTwo: `<p style="color:#737373;font-size:13px">If the button doesn't work, copy this link into your browser: ${href}</p>`,
|
|
23
|
+
href: args.href,
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export const YearEndStatementEmailTemplate = ({ period, ...props }) => OwnerStatementEmailTemplate({ ...props, listing: undefined, month: period });
|
|
27
|
+
//# sourceMappingURL=YearEndStatementEmailTemplate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"YearEndStatementEmailTemplate.js","sourceRoot":"src/","sources":["templates/YearEndStatementEmailTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,2BAA2B,EAC3B,oBAAoB,EACpB,yBAAyB,GAC1B,MAAM,eAAe,CAAC;AAKvB,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAE5E;;;;GAIG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAAG,CACjD,IAAoB,EACpB,IAQC,EACgB,EAAE;IACnB,MAAM,IAAI,GAAG,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,2BAA2B,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;IACtE,MAAM,MAAM,GAAG,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC;IACnE,MAAM,QAAQ,GAAG,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC;IAC5E,OAAO;QACL,OAAO,EACL,IAAI,KAAK,KAAK;YACZ,CAAC,CAAC,kCAAkC;YACpC,CAAC,CAAC,QAAQ,IAAI,CAAC,IAAI,qBAAqB;QAC5C,gBAAgB,EACd,IAAI,KAAK,KAAK;YACZ,CAAC,CAAC,2CAA2C;YAC7C,CAAC,CAAC,QAAQ,IAAI,CAAC,IAAI,uCAAuC;QAC9D,MAAM,EAAE,kCAAkC;QAC1C,OAAO,EAAE,SAAS,QAAQ,WAAW,IAAI,CAAC,OAAO,0CAA0C,MAAM,oFAAoF;QACrL,UAAU,EAAE,yBAAyB;QACrC,OAAO,EAAE,yGAAyG,IAAI,MAAM;QAC5H,IAAI,EAAE,IAAI,CAAC,IAAI;KAChB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,EAC5C,MAAM,EACN,GAAG,KAAK,EAMT,EAAE,EAAE,CACH,2BAA2B,CAAC,EAAE,GAAG,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC","sourcesContent":["import {\n EMAIL_ACTION_LINK_COMPONENT,\n EMAIL_DATE_COMPONENT,\n EMAIL_USER_NAME_COMPONENT,\n} from '../extensions';\nimport type {\n ActionEmailData,\n ActionEmailTemplateProps,\n} from '../components/ActionEmailTemplate';\nimport { OwnerStatementEmailTemplate } from './OwnerStatementEmailTemplate';\n\n/**\n * Default text of the `yearEndStatement` email: an owner's year-end statement\n * of a fiscal year is published. Owners open it by a no-login link, viewers\n * in the owner portal. Settings > Emails edits it with PRO-20846.\n */\nexport const getDefaultYearEndStatementEmailData = (\n mode: 'tag' | 'text',\n args: {\n appName: string;\n href: string;\n userName: string;\n /** The fiscal year, such as `2025`. */\n year: string;\n /** The months it covers, such as `Jan 2025 - Dec 2025`. */\n period: string;\n }\n): ActionEmailData => {\n const href = mode === 'tag' ? EMAIL_ACTION_LINK_COMPONENT : args.href;\n const period = mode === 'tag' ? EMAIL_DATE_COMPONENT : args.period;\n const userName = mode === 'tag' ? EMAIL_USER_NAME_COMPONENT : args.userName;\n return {\n subject:\n mode === 'tag'\n ? 'Your year-end statement is ready'\n : `Your ${args.year} year-end statement`,\n shortDescription:\n mode === 'tag'\n ? 'Your year-end statement is ready to view.'\n : `Your ${args.year} year-end statement is ready to view.`,\n header: 'Your year-end statement is ready',\n bodyOne: `<p>Hi ${userName},</p><p>${args.appName} published your year-end statement for ${period}. It sums up your owner statements of the year. Open it with the button below.</p>`,\n buttonText: 'View year-end statement',\n bodyTwo: `<p style=\"color:#737373;font-size:13px\">If the button doesn't work, copy this link into your browser: ${href}</p>`,\n href: args.href,\n };\n};\n\nexport const YearEndStatementEmailTemplate = ({\n period,\n ...props\n}: Omit<ActionEmailTemplateProps, 'listing' | 'month'> & {\n /** The months the statement covers, such as `Jan 2025 - Dec 2025`. */\n period: string;\n /** Requests a new no-login link once the emailed one has expired. */\n renewHref?: string;\n}) =>\n OwnerStatementEmailTemplate({ ...props, listing: undefined, month: period });\n"]}
|
|
@@ -5,6 +5,7 @@ export * from './TeamRoleGrantedEmailTemplate';
|
|
|
5
5
|
export * from './TenantSuspensionEmailTemplate';
|
|
6
6
|
export * from './TenantDeletionEmailTemplate';
|
|
7
7
|
export * from './OwnerStatementEmailTemplate';
|
|
8
|
+
export * from './YearEndStatementEmailTemplate';
|
|
8
9
|
export * from './BankAccountChangedEmailTemplate';
|
|
9
10
|
export * from './BankAccountChangedTeamAdminEmailTemplate';
|
|
10
11
|
export * from './BankDetailsRequestEmailTemplate';
|
|
@@ -7,6 +7,7 @@ export * from './TenantSuspensionEmailTemplate';
|
|
|
7
7
|
export * from './TenantDeletionEmailTemplate';
|
|
8
8
|
// Owner Statements
|
|
9
9
|
export * from './OwnerStatementEmailTemplate';
|
|
10
|
+
export * from './YearEndStatementEmailTemplate';
|
|
10
11
|
// Payment setup
|
|
11
12
|
export * from './BankAccountChangedEmailTemplate';
|
|
12
13
|
export * from './BankAccountChangedTeamAdminEmailTemplate';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["templates/index.ts"],"names":[],"mappings":"AAAA,QAAQ;AACR,cAAc,kCAAkC,CAAC;AACjD,cAAc,oCAAoC,CAAC;AACnD,cAAc,wCAAwC,CAAC;AACvD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAE9C,mBAAmB;AACnB,cAAc,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["templates/index.ts"],"names":[],"mappings":"AAAA,QAAQ;AACR,cAAc,kCAAkC,CAAC;AACjD,cAAc,oCAAoC,CAAC;AACnD,cAAc,wCAAwC,CAAC;AACvD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAE9C,mBAAmB;AACnB,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC;AAEhD,gBAAgB;AAChB,cAAc,mCAAmC,CAAC;AAClD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,mCAAmC,CAAC;AAElD,QAAQ;AACR,cAAc,wCAAwC,CAAC;AACvD,cAAc,wBAAwB,CAAC;AAEvC,cAAc;AACd,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC","sourcesContent":["// Teams\nexport * from './SecondFactorResetEmailTemplate';\nexport * from './TeamApiTokenCreatedEmailTemplate';\nexport * from './TeamInviteOutsideDomainEmailTemplate';\nexport * from './TeamRoleGrantedEmailTemplate';\nexport * from './TenantSuspensionEmailTemplate';\nexport * from './TenantDeletionEmailTemplate';\n\n// Owner Statements\nexport * from './OwnerStatementEmailTemplate';\nexport * from './YearEndStatementEmailTemplate';\n\n// Payment setup\nexport * from './BankAccountChangedEmailTemplate';\nexport * from './BankAccountChangedTeamAdminEmailTemplate';\nexport * from './BankDetailsRequestEmailTemplate';\n\n// 1099s\nexport * from './Tax1099ConsentWithdrawnEmailTemplate';\nexport * from './Tax1099EmailTemplate';\n\n// Invitations\nexport * from './InviteOwnerEmailTemplate';\nexport * from './InvitePmEmailTemplate';\n"]}
|
package/package.json
CHANGED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import {
|
|
2
|
+
EMAIL_ACTION_LINK_COMPONENT,
|
|
3
|
+
EMAIL_DATE_COMPONENT,
|
|
4
|
+
EMAIL_USER_NAME_COMPONENT,
|
|
5
|
+
} from '../extensions';
|
|
6
|
+
import type {
|
|
7
|
+
ActionEmailData,
|
|
8
|
+
ActionEmailTemplateProps,
|
|
9
|
+
} from '../components/ActionEmailTemplate';
|
|
10
|
+
import { OwnerStatementEmailTemplate } from './OwnerStatementEmailTemplate';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Default text of the `yearEndStatement` email: an owner's year-end statement
|
|
14
|
+
* of a fiscal year is published. Owners open it by a no-login link, viewers
|
|
15
|
+
* in the owner portal. Settings > Emails edits it with PRO-20846.
|
|
16
|
+
*/
|
|
17
|
+
export const getDefaultYearEndStatementEmailData = (
|
|
18
|
+
mode: 'tag' | 'text',
|
|
19
|
+
args: {
|
|
20
|
+
appName: string;
|
|
21
|
+
href: string;
|
|
22
|
+
userName: string;
|
|
23
|
+
/** The fiscal year, such as `2025`. */
|
|
24
|
+
year: string;
|
|
25
|
+
/** The months it covers, such as `Jan 2025 - Dec 2025`. */
|
|
26
|
+
period: string;
|
|
27
|
+
}
|
|
28
|
+
): ActionEmailData => {
|
|
29
|
+
const href = mode === 'tag' ? EMAIL_ACTION_LINK_COMPONENT : args.href;
|
|
30
|
+
const period = mode === 'tag' ? EMAIL_DATE_COMPONENT : args.period;
|
|
31
|
+
const userName = mode === 'tag' ? EMAIL_USER_NAME_COMPONENT : args.userName;
|
|
32
|
+
return {
|
|
33
|
+
subject:
|
|
34
|
+
mode === 'tag'
|
|
35
|
+
? 'Your year-end statement is ready'
|
|
36
|
+
: `Your ${args.year} year-end statement`,
|
|
37
|
+
shortDescription:
|
|
38
|
+
mode === 'tag'
|
|
39
|
+
? 'Your year-end statement is ready to view.'
|
|
40
|
+
: `Your ${args.year} year-end statement is ready to view.`,
|
|
41
|
+
header: 'Your year-end statement is ready',
|
|
42
|
+
bodyOne: `<p>Hi ${userName},</p><p>${args.appName} published your year-end statement for ${period}. It sums up your owner statements of the year. Open it with the button below.</p>`,
|
|
43
|
+
buttonText: 'View year-end statement',
|
|
44
|
+
bodyTwo: `<p style="color:#737373;font-size:13px">If the button doesn't work, copy this link into your browser: ${href}</p>`,
|
|
45
|
+
href: args.href,
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export const YearEndStatementEmailTemplate = ({
|
|
50
|
+
period,
|
|
51
|
+
...props
|
|
52
|
+
}: Omit<ActionEmailTemplateProps, 'listing' | 'month'> & {
|
|
53
|
+
/** The months the statement covers, such as `Jan 2025 - Dec 2025`. */
|
|
54
|
+
period: string;
|
|
55
|
+
/** Requests a new no-login link once the emailed one has expired. */
|
|
56
|
+
renewHref?: string;
|
|
57
|
+
}) =>
|
|
58
|
+
OwnerStatementEmailTemplate({ ...props, listing: undefined, month: period });
|
package/src/templates/index.ts
CHANGED