placementt-core 1.400.1159 → 1.400.1160
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/lib/letters.d.ts +1 -0
- package/lib/letters.js +6 -5
- package/lib/letters.js.map +1 -1
- package/package.json +1 -1
- package/src/letters.ts +5 -5
package/lib/letters.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export type WexLetterConfig = {
|
|
|
14
14
|
body: Descendant[];
|
|
15
15
|
};
|
|
16
16
|
export declare const wexLetterParams: string[];
|
|
17
|
+
export declare function linesToSlate(lines: string[]): Descendant[];
|
|
17
18
|
export declare const wexLetters: {
|
|
18
19
|
[key in WexLetterKey]: WexLetterConfig;
|
|
19
20
|
};
|
package/lib/letters.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CAREERTHREAD_LETTER_FOOTER = exports.CAREERTHREAD_LETTER_CONTACT = exports.CAREERTHREAD_LETTER_ADDRESS = exports.wexLetters = exports.wexLetterParams = void 0;
|
|
4
|
+
exports.linesToSlate = linesToSlate;
|
|
4
5
|
exports.fillLetterParams = fillLetterParams;
|
|
5
6
|
exports.wexLetterValues = wexLetterValues;
|
|
6
7
|
exports.wexLetterBlocks = wexLetterBlocks;
|
|
7
8
|
const benchmarkEvidenceRules_1 = require("./benchmarkEvidenceRules");
|
|
8
9
|
// Params available in every letter. Filled in when the letter is previewed or downloaded.
|
|
9
10
|
exports.wexLetterParams = ["instituteName", "academicYear", "cohortName", "placementStart", "placementEnd", "staffName", "staffEmail"];
|
|
10
|
-
// Builds Slate content from lines. "# " and "## " start headings, **text** is bold, {{param}} becomes a param node.
|
|
11
|
-
function
|
|
11
|
+
// Builds Slate content from lines, used for letters and email template imports. "# " and "## " start headings, **text** is bold, {{param}} becomes a param node.
|
|
12
|
+
function linesToSlate(lines) {
|
|
12
13
|
return lines.map((line) => {
|
|
13
14
|
const type = line.startsWith("# ") ? "heading-one" : line.startsWith("## ") ? "heading-two" : "paragraph";
|
|
14
15
|
const text = type === "heading-one" ? line.slice(2) : type === "heading-two" ? line.slice(3) : line;
|
|
@@ -29,7 +30,7 @@ exports.wexLetters = {
|
|
|
29
30
|
audience: "employers",
|
|
30
31
|
description: "Introduces CareerThread to businesses hosting a student, and what we will ask them for.",
|
|
31
32
|
productTag: "wex",
|
|
32
|
-
body:
|
|
33
|
+
body: linesToSlate([
|
|
33
34
|
"# Employer Guidance",
|
|
34
35
|
"{{instituteName}} are using CareerThread through the academic year {{academicYear}} to support their students in managing work experience.",
|
|
35
36
|
"CareerThread helps students find placements, manages administrative sign-off and provides tools for schools to build lasting connections to businesses. As you are hosting a work experience student, we will contact you over the next few months to request additional information. This is to ensure students have all the information they need to prepare effectively for their placement.",
|
|
@@ -44,7 +45,7 @@ exports.wexLetters = {
|
|
|
44
45
|
audience: "parents",
|
|
45
46
|
description: "Explains to parents how work experience is managed and what we will email them about.",
|
|
46
47
|
productTag: "wex",
|
|
47
|
-
body:
|
|
48
|
+
body: linesToSlate([
|
|
48
49
|
"# Parent Guidance",
|
|
49
50
|
"{{instituteName}} is using CareerThread to manage your child's work experience. CareerThread helps secondary schools to coordinate work experience placements while supporting students with daily reflections and post-placement feedback, ensuring a meaningful and structured experience.",
|
|
50
51
|
"While CareerThread supports secondary schools in managing work experience, we do not currently find placements for your child. The students remain responsible for organising placements directly with an employer.",
|
|
@@ -60,7 +61,7 @@ exports.wexLetters = {
|
|
|
60
61
|
audience: "students",
|
|
61
62
|
description: "Helps students prepare for their placement once it has been confirmed.",
|
|
62
63
|
productTag: "wex",
|
|
63
|
-
body:
|
|
64
|
+
body: linesToSlate([
|
|
64
65
|
"# Preparing for Your Work Experience Placement",
|
|
65
66
|
"Congratulations on finding a placement! Now it's time to make the most of the opportunity. Good preparation can make all the difference, and this guide will walk you through some key steps to help you feel confident and ready to thrive.",
|
|
66
67
|
"**Confirm Details:** Once your placement has been verified on our portal, you'll see key information like your responsibilities, dress code, working hours, and any required preparation on your placement page. Review these carefully, and don't hesitate to contact the business if anything is unclear.",
|
package/lib/letters.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"letters.js","sourceRoot":"","sources":["../src/letters.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"letters.js","sourceRoot":"","sources":["../src/letters.ts"],"names":[],"mappings":";;;AAwBA,oCAWC;AAsDD,4CAEC;AASD,0CAWC;AAMD,0CAUC;AA7HD,qEAA6D;AAkB7D,0FAA0F;AAC7E,QAAA,eAAe,GAAG,CAAC,eAAe,EAAE,cAAc,EAAE,YAAY,EAAE,gBAAgB,EAAE,cAAc,EAAE,WAAW,EAAE,YAAY,CAAC,CAAC;AAE5I,iKAAiK;AACjK,SAAgB,YAAY,CAAC,KAAe;IACxC,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QACtB,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,WAAW,CAAC;QAC1G,MAAM,IAAI,GAAG,IAAI,KAAK,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QACpG,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;YACpF,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;gBAAE,OAAO,EAAC,IAAI,EAAE,IAAI,CAAC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C,CAAC,CAAC,CAAC;AACR,CAAC"}
|
package/package.json
CHANGED
package/src/letters.ts
CHANGED
|
@@ -21,8 +21,8 @@ export type WexLetterConfig = {
|
|
|
21
21
|
// Params available in every letter. Filled in when the letter is previewed or downloaded.
|
|
22
22
|
export const wexLetterParams = ["instituteName", "academicYear", "cohortName", "placementStart", "placementEnd", "staffName", "staffEmail"];
|
|
23
23
|
|
|
24
|
-
// Builds Slate content from lines. "# " and "## " start headings, **text** is bold, {{param}} becomes a param node.
|
|
25
|
-
function
|
|
24
|
+
// Builds Slate content from lines, used for letters and email template imports. "# " and "## " start headings, **text** is bold, {{param}} becomes a param node.
|
|
25
|
+
export function linesToSlate(lines: string[]): Descendant[] {
|
|
26
26
|
return lines.map((line) => {
|
|
27
27
|
const type = line.startsWith("# ") ? "heading-one" : line.startsWith("## ") ? "heading-two" : "paragraph";
|
|
28
28
|
const text = type === "heading-one" ? line.slice(2) : type === "heading-two" ? line.slice(3) : line;
|
|
@@ -43,7 +43,7 @@ export const wexLetters: {[key in WexLetterKey]: WexLetterConfig} = {
|
|
|
43
43
|
audience: "employers",
|
|
44
44
|
description: "Introduces CareerThread to businesses hosting a student, and what we will ask them for.",
|
|
45
45
|
productTag: "wex",
|
|
46
|
-
body:
|
|
46
|
+
body: linesToSlate([
|
|
47
47
|
"# Employer Guidance",
|
|
48
48
|
"{{instituteName}} are using CareerThread through the academic year {{academicYear}} to support their students in managing work experience.",
|
|
49
49
|
"CareerThread helps students find placements, manages administrative sign-off and provides tools for schools to build lasting connections to businesses. As you are hosting a work experience student, we will contact you over the next few months to request additional information. This is to ensure students have all the information they need to prepare effectively for their placement.",
|
|
@@ -58,7 +58,7 @@ export const wexLetters: {[key in WexLetterKey]: WexLetterConfig} = {
|
|
|
58
58
|
audience: "parents",
|
|
59
59
|
description: "Explains to parents how work experience is managed and what we will email them about.",
|
|
60
60
|
productTag: "wex",
|
|
61
|
-
body:
|
|
61
|
+
body: linesToSlate([
|
|
62
62
|
"# Parent Guidance",
|
|
63
63
|
"{{instituteName}} is using CareerThread to manage your child's work experience. CareerThread helps secondary schools to coordinate work experience placements while supporting students with daily reflections and post-placement feedback, ensuring a meaningful and structured experience.",
|
|
64
64
|
"While CareerThread supports secondary schools in managing work experience, we do not currently find placements for your child. The students remain responsible for organising placements directly with an employer.",
|
|
@@ -74,7 +74,7 @@ export const wexLetters: {[key in WexLetterKey]: WexLetterConfig} = {
|
|
|
74
74
|
audience: "students",
|
|
75
75
|
description: "Helps students prepare for their placement once it has been confirmed.",
|
|
76
76
|
productTag: "wex",
|
|
77
|
-
body:
|
|
77
|
+
body: linesToSlate([
|
|
78
78
|
"# Preparing for Your Work Experience Placement",
|
|
79
79
|
"Congratulations on finding a placement! Now it's time to make the most of the opportunity. Good preparation can make all the difference, and this guide will walk you through some key steps to help you feel confident and ready to thrive.",
|
|
80
80
|
"**Confirm Details:** Once your placement has been verified on our portal, you'll see key information like your responsibilities, dress code, working hours, and any required preparation on your placement page. Review these carefully, and don't hesitate to contact the business if anything is unclear.",
|