@mccaskie-labs/workbench-agreements 0.3.1 → 0.3.2

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/dist/index.d.ts CHANGED
@@ -2,7 +2,9 @@ export { createAgreements, type Agreement, type AgreementEvent, type Agreements,
2
2
  export { AGREEMENT_LANGUAGES, agreementsProblems, checkAgreementsConfig, IDENTITY_CHECKS, MAX_REMINDERS, MAX_SIGNERS, SIGNING_METHODS, STARTER_AGREEMENTS, type AgreementLanguage, type AgreementsConfig, type IdentityCheck, type SigningMethod, } from "./config.ts";
3
3
  export { bothTimes, buildSignedCopy, pdfPages, type CertificateEvent, type CertificateInput, type CertificateSigner } from "./certificate.ts";
4
4
  export { agreementsMigration } from "./migration.ts";
5
- export { renderCodePage, renderDonePage, renderEndedPage, renderSigningPage, type EndedReason, type SigningFormState, type SigningView } from "./page.ts";
5
+ export { documentsMigration } from "./documents-migration.ts";
6
+ export { addMonths, RESERVED_FIELDS, type DocumentForm, type Documents, type DocumentSignature, type ForChild, type OpenDocument, type RequestSignaturesRequest, type SaveDocumentRequest, type SignatureFile, type Validity, } from "./documents.ts";
7
+ export { renderCodePage, renderDonePage, renderEndedPage, renderOpenSigningPage, renderOpenStartPage, renderSigningPage, type EndedReason, type OpenFormState, type OpenView, type SigningFormState, type SigningView } from "./page.ts";
6
8
  export { ownerAgreementAction, renderVoidConfirm, type OwnerAgreementResult, type OwnerOptions, type VoidConfirmOptions } from "./owner.ts";
7
9
  export { confirmed, renderConfirm, type ConfirmOptions } from "./confirm.ts";
8
10
  export { AGREEMENT_STYLES } from "./styles.ts";
package/dist/index.js CHANGED
@@ -7,7 +7,9 @@ export { createAgreements, } from "./agreements.js";
7
7
  export { AGREEMENT_LANGUAGES, agreementsProblems, checkAgreementsConfig, IDENTITY_CHECKS, MAX_REMINDERS, MAX_SIGNERS, SIGNING_METHODS, STARTER_AGREEMENTS, } from "./config.js";
8
8
  export { bothTimes, buildSignedCopy, pdfPages } from "./certificate.js";
9
9
  export { agreementsMigration } from "./migration.js";
10
- export { renderCodePage, renderDonePage, renderEndedPage, renderSigningPage } from "./page.js";
10
+ export { documentsMigration } from "./documents-migration.js";
11
+ export { addMonths, RESERVED_FIELDS, } from "./documents.js";
12
+ export { renderCodePage, renderDonePage, renderEndedPage, renderOpenSigningPage, renderOpenStartPage, renderSigningPage } from "./page.js";
11
13
  export { ownerAgreementAction, renderVoidConfirm } from "./owner.js";
12
14
  export { confirmed, renderConfirm } from "./confirm.js";
13
15
  export { AGREEMENT_STYLES } from "./styles.js";
package/dist/page.d.ts CHANGED
@@ -43,11 +43,48 @@ export declare function renderDonePage(v: Pick<SigningView, "title">, o: PageCom
43
43
  signedAt: string;
44
44
  completed: boolean;
45
45
  downloadHref?: string;
46
+ open?: boolean;
46
47
  }): string;
47
- export type EndedReason = "declined_by_you" | "voided" | "expired" | "declined";
48
+ export type EndedReason = "declined_by_you" | "voided" | "expired" | "declined" | "used" | "retired" | "stale";
48
49
  /** A closed agreement, or a link that leads nowhere. */
49
50
  export declare function renderEndedPage(reason: EndedReason | "not_found", o: PageCommon & {
50
51
  title?: string;
51
52
  business?: string;
52
53
  businessTold?: boolean;
53
54
  }): string;
55
+ /** What the open document's pages show. */
56
+ export interface OpenView {
57
+ title: string;
58
+ business: string;
59
+ /** "Your signature covers this booking." or "… lasts 12 months.", already worded. */
60
+ lasts: string;
61
+ pages: number;
62
+ documentHref: string;
63
+ }
64
+ /** The first page of an open document: who is signing (name and email). */
65
+ export declare function renderOpenStartPage(v: OpenView, o: PageCommon & {
66
+ name?: string;
67
+ email?: string;
68
+ problems?: readonly AgreementWordKey[];
69
+ business?: string;
70
+ }): string;
71
+ /** What the signer has filled in so far on an open document. */
72
+ export interface OpenFormState extends SigningFormState {
73
+ /** Ticked "I'm signing for a child" (always true when the document is for children only). */
74
+ child?: boolean;
75
+ childName?: string;
76
+ relationship?: "parent" | "guardian";
77
+ childDeclared?: boolean;
78
+ }
79
+ /**
80
+ * An open document's signing page: read, the child's details when allowed,
81
+ * the form's questions (renderForm's fieldsOnly markup), the consent boxes,
82
+ * the name, and the signature. Posts multipart when the questions take a file.
83
+ */
84
+ export declare function renderOpenSigningPage(v: OpenView & {
85
+ signerName: string;
86
+ }, methods: readonly SigningMethod[], o: PageCommon & OpenFormState & {
87
+ forChild: "never" | "allowed" | "always";
88
+ questions?: string;
89
+ multipart?: boolean;
90
+ }): string;
package/dist/page.js CHANGED
@@ -122,7 +122,7 @@ export function renderDonePage(v, o) {
122
122
  const body = [
123
123
  `<h1 class="wb-agreement-title">${w(o, "done.title")}</h1>`,
124
124
  `<p class="wb-agreement-meta">${esc(v.title)}</p>`,
125
- `<p class="wb-agreement-text">${w(o, o.completed ? "done.text" : "done.waiting", { date: o.signedAt })}</p>`,
125
+ `<p class="wb-agreement-text">${w(o, o.open ? "done.open" : o.completed ? "done.text" : "done.waiting", { date: o.signedAt, title: v.title })}</p>`,
126
126
  ...(o.completed && o.downloadHref ? [`<a class="wb-agreement-download" href="${esc(o.downloadHref)}">${w(o, "done.download")}</a>`] : []),
127
127
  ];
128
128
  return shell(o, agreementWord(o.t, o.language, "done.title"), body.join("\n"));
@@ -142,3 +142,75 @@ export function renderEndedPage(reason, o) {
142
142
  ];
143
143
  return shell(o, agreementWord(o.t, o.language, title), body.join("\n"));
144
144
  }
145
+ /** The first page of an open document: who is signing (name and email). */
146
+ export function renderOpenStartPage(v, o) {
147
+ const pages = v.pages === 1 ? agreementWord(o.t, o.language, "page.pages_one") : agreementWord(o.t, o.language, "page.pages_many", { count: v.pages });
148
+ const body = [
149
+ `<h1 class="wb-agreement-title">${w(o, "open.title", { title: v.title })}</h1>`,
150
+ `<p class="wb-agreement-meta">${w(o, "page.from", { business: v.business })}</p>`,
151
+ `<p class="wb-agreement-meta">${esc(v.lasts)}</p>`,
152
+ `<a class="wb-agreement-read" href="${esc(v.documentHref)}" target="_blank" rel="noopener">${w(o, "page.read")}</a>`,
153
+ `<p class="wb-agreement-hint">${w(o, "page.read_hint", { pages })}</p>`,
154
+ problemsHtml(o, o.problems),
155
+ `<p class="wb-agreement-text">${w(o, "open.intro")}</p>`,
156
+ `<form class="wb-agreement-form" method="post">`,
157
+ hidden("action", "start"),
158
+ `<div class="wb-agreement-field"><label class="wb-agreement-label" for="wb-agreement-name">${w(o, "name.label")}</label><input class="wb-agreement-input" id="wb-agreement-name" type="text" name="name" autocomplete="name" required minlength="2" maxlength="120" value="${esc(o.name ?? "")}"><p class="wb-agreement-hint">${w(o, "name.hint")}</p></div>`,
159
+ `<div class="wb-agreement-field"><label class="wb-agreement-label" for="wb-agreement-email">${w(o, "open.email_label")}</label><input class="wb-agreement-input" id="wb-agreement-email" type="email" name="email" autocomplete="email" inputmode="email" required maxlength="254" value="${esc(o.email ?? "")}"><p class="wb-agreement-hint">${w(o, "open.email_hint")}</p></div>`,
160
+ `<button class="wb-agreement-sign" type="submit">${w(o, "open.start")}</button>`,
161
+ "</form>",
162
+ ];
163
+ return shell(o, agreementWord(o.t, o.language, "open.title", { title: v.title }), body.filter(Boolean).join("\n"));
164
+ }
165
+ /**
166
+ * An open document's signing page: read, the child's details when allowed,
167
+ * the form's questions (renderForm's fieldsOnly markup), the consent boxes,
168
+ * the name, and the signature. Posts multipart when the questions take a file.
169
+ */
170
+ export function renderOpenSigningPage(v, methods, o) {
171
+ const method = o.method && methods.includes(o.method) ? o.method : methods[0];
172
+ const pages = v.pages === 1 ? agreementWord(o.t, o.language, "page.pages_one") : agreementWord(o.t, o.language, "page.pages_many", { count: v.pages });
173
+ const check = (name, key, on, required = true) => `<label class="wb-agreement-check"><input class="wb-agreement-check-input" type="checkbox" name="${name}" value="yes"${required ? " required" : ""}${on ? " checked" : ""}><span>${w(o, key)}</span></label>`;
174
+ const radio = (m) => `<label class="wb-agreement-method"><input class="wb-agreement-method-input" type="radio" name="method" value="${m}"${m === method ? " checked" : ""}><span>${w(o, m === "typed" ? "method.typed" : "method.drawn")}</span></label>`;
175
+ const rel = (r) => `<label class="wb-agreement-method"><input class="wb-agreement-method-input" type="radio" name="relationship" value="${r}"${o.relationship === r ? " checked" : ""}><span>${w(o, r === "parent" ? "child.parent" : "child.guardian")}</span></label>`;
176
+ const child = o.forChild === "never"
177
+ ? []
178
+ : [
179
+ `<fieldset class="wb-agreement-child">`,
180
+ o.forChild === "always" ? `<p class="wb-agreement-text">${w(o, "child.always")}</p>${hidden("child", "yes")}` : check("child", "child.ask", o.child, false),
181
+ `<div class="wb-agreement-field"><label class="wb-agreement-label" for="wb-agreement-child-name">${w(o, "child.name_label")}</label><input class="wb-agreement-input" id="wb-agreement-child-name" type="text" name="child_name" autocomplete="off" maxlength="120" value="${esc(o.childName ?? "")}"></div>`,
182
+ `<fieldset class="wb-agreement-methods"><legend class="wb-agreement-methods-legend">${w(o, "child.relationship")}</legend>${rel("parent")}${rel("guardian")}</fieldset>`,
183
+ check("child_declare", "child.declare", o.childDeclared, false),
184
+ `</fieldset>`,
185
+ ];
186
+ const parts = [
187
+ `<h1 class="wb-agreement-title">${esc(v.title)}</h1>`,
188
+ `<p class="wb-agreement-meta">${w(o, "page.from", { business: v.business })}</p>`,
189
+ `<p class="wb-agreement-meta">${esc(v.lasts)}</p>`,
190
+ `<a class="wb-agreement-read" href="${esc(v.documentHref)}" target="_blank" rel="noopener">${w(o, "page.read")}</a>`,
191
+ `<p class="wb-agreement-hint">${w(o, "page.read_hint", { pages })}</p>`,
192
+ problemsHtml(o, o.problems),
193
+ `<form class="wb-agreement-form" method="post" data-sign${o.multipart ? ' enctype="multipart/form-data"' : ""}>`,
194
+ hidden("action", "sign"),
195
+ ...child,
196
+ ...(o.questions ? [`<section class="wb-agreement-questions"><h2 class="wb-agreement-questions-title">${w(o, "open.questions")}</h2>${o.questions}</section>`] : []),
197
+ check("consent_read", "consent.read", o.consentRead),
198
+ check("consent_esign", "open.consent_esign", o.consentEsign),
199
+ `<div class="wb-agreement-field"><label class="wb-agreement-label" for="wb-agreement-name">${w(o, "name.label")}</label><input class="wb-agreement-input" id="wb-agreement-name" type="text" name="name" autocomplete="name" required minlength="2" maxlength="120" value="${esc(o.name ?? v.signerName)}"><p class="wb-agreement-hint">${w(o, "name.hint")}</p></div>`,
200
+ methods.length > 1
201
+ ? `<fieldset class="wb-agreement-methods"><legend class="wb-agreement-methods-legend">${w(o, "method.label")}</legend>${methods.map(radio).join("")}</fieldset>`
202
+ : hidden("method", method),
203
+ ...(methods.includes("typed")
204
+ ? [`<div class="wb-agreement-typed"${method === "typed" ? "" : " hidden"}><p class="wb-agreement-hint">${w(o, "typed.preview")}</p><p class="wb-agreement-typed-name" aria-hidden="true">${esc(o.name ?? v.signerName)}</p></div>`]
205
+ : []),
206
+ ...(methods.includes("drawn")
207
+ ? [
208
+ `<div class="wb-agreement-pad"${method === "drawn" ? "" : " hidden"}><p class="wb-agreement-hint">${w(o, "drawn.hint")}</p><canvas class="wb-agreement-canvas" width="600" height="240" aria-label="${w(o, "method.drawn")}"></canvas><button class="wb-agreement-clear" type="button">${w(o, "drawn.clear")}</button>${hidden("signature", "")}</div>`,
209
+ ]
210
+ : []),
211
+ `<button class="wb-agreement-sign" type="submit">${w(o, "open.sign")}</button>`,
212
+ `<p class="wb-agreement-hint">${w(o, "open.sign_hint", { name: o.name ?? v.signerName })}</p>`,
213
+ "</form>",
214
+ ];
215
+ return shell(o, v.title, parts.filter(Boolean).join("\n"), true);
216
+ }
package/dist/styles.js CHANGED
@@ -52,6 +52,9 @@ export const AGREEMENT_STYLES = {
52
52
  { name: "wb-agreement-input", element: "input", about: "A text field: the full name, the code", css: field, states: [focus] },
53
53
  { name: "wb-agreement-methods", element: "fieldset", about: "The choice of typed or drawn", css: "display:flex;flex-direction:column;gap:.5rem;margin:0;padding:0;border:0" },
54
54
  { name: "wb-agreement-methods-legend", element: "legend", about: "The choice's question", css: "margin:0 0 .25rem;padding:0;font-weight:600" },
55
+ { name: "wb-agreement-child", element: "fieldset", about: "Open documents: signing for a child (the child's name, the relationship and the declaration)", css: "display:flex;flex-direction:column;gap:.75rem;margin:0;padding:.75rem;border:1px solid var(--wb-agreement-line);border-radius:.5rem" },
56
+ { name: "wb-agreement-questions", element: "section", about: "Open documents: the form's questions (drawn with workbench-forms' wb-form-* classes)", css: "display:flex;flex-direction:column;gap:.75rem;margin:0" },
57
+ { name: "wb-agreement-questions-title", element: "h2", about: "The questions' heading", css: "margin:.5rem 0 0;font-size:1.125rem" },
55
58
  { name: "wb-agreement-method", element: "label", about: "One way to sign", css: "display:flex;gap:.6rem;align-items:center;cursor:pointer" },
56
59
  { name: "wb-agreement-method-input", element: "input", about: "The radio button for one way to sign", css: "flex:none;width:1.25rem;height:1.25rem;margin:0", states: [focus] },
57
60
  { name: "wb-agreement-typed", element: "div", about: "The typed signature's preview", css: `display:flex;flex-direction:column;gap:.25rem`, states: [{ selector: "[hidden]", about: "When drawing is chosen", css: "display:none" }] },
package/dist/words.d.ts CHANGED
@@ -95,6 +95,43 @@ declare const EN: {
95
95
  readonly "error.closed": "This agreement is already closed, so there is nothing to withdraw.";
96
96
  readonly "error.failed": "Something went wrong on our side. Please try again.";
97
97
  readonly "share.text": "Hi {name}, please read and sign {title} here: {url}";
98
+ readonly "open.title": "Sign {title}";
99
+ readonly "open.intro": "Tell us who is signing. We'll then show you the document and the questions.";
100
+ readonly "open.lasts_event": "Your signature covers this booking.";
101
+ readonly "open.lasts_months": "Your signature lasts {months} months.";
102
+ readonly "open.email_label": "Your email";
103
+ readonly "open.email_hint": "We'll email you the signed copy.";
104
+ readonly "open.start": "Continue";
105
+ readonly "open.questions": "A few questions";
106
+ readonly "child.ask": "I'm signing for a child";
107
+ readonly "child.always": "You are signing for a child in your care.";
108
+ readonly "child.name_label": "The child's full name";
109
+ readonly "child.relationship": "You are the child's";
110
+ readonly "child.parent": "Parent";
111
+ readonly "child.guardian": "Legal guardian";
112
+ readonly "child.declare": "I am this child's parent or legal guardian, and I may sign this for them.";
113
+ readonly "child.on_behalf": "Signing for {child} as their {relationship}";
114
+ readonly "open.sign": "Sign";
115
+ readonly "open.sign_hint": "By tapping Sign you sign it as {name}.";
116
+ readonly "open.consent_esign": "I agree to sign electronically and to receive the signed copy by email, and that my electronic signature is as binding as signing by hand.";
117
+ readonly "problem.email": "Type your email address, like name@example.com.";
118
+ readonly "problem.child_name": "Type the child's full name (2 to 120 characters).";
119
+ readonly "problem.relationship": "Say whether you are the child's parent or legal guardian.";
120
+ readonly "problem.child_declare": "Tick the box to say you may sign for the child.";
121
+ readonly "problem.questions": "Some answers need fixing: see the questions below.";
122
+ readonly "problem.busy": "Too many tries from this email. Please wait an hour, or ask {business} for help.";
123
+ readonly "ended.used": "This link has already been used to sign. If you're another person in the booking, ask {business} for your own link.";
124
+ readonly "ended.retired": "{business} no longer uses this document. Ask them for the current one.";
125
+ readonly "ended.stale": "This signing page has timed out. Open the link again to start over.";
126
+ readonly "done.open": "You signed {title} on {date}. We've emailed you the signed copy.";
127
+ readonly "email.open_code.subject": "Your code to sign {title}";
128
+ readonly "email.open_signed.subject": "Signed: {title}";
129
+ readonly "email.open_signed.text": "Hi {name},\n\nThank you for signing {title} for {business}. The signed copy is attached, with a signing certificate on its last pages.\n\nSignature {id}\nSigned copy SHA-256: {sha256}\n\nKeep this email for your records.";
130
+ readonly "email.request.subject": "Please sign before your booking: {title}";
131
+ readonly "email.request.text": "Hi {name},\n\n{business} needs {title} signed for each person in your booking before you arrive. Each link below is for one person (a parent or guardian signs for a child). Send the others on to the people they're for.\n\n{links}\n\nThe links work until {date}.";
132
+ readonly "email.renew.subject": "Time to sign again: {title}";
133
+ readonly "email.renew.text": "Hi {name},\n\nYour signed {title} for {business}{child} runs out on {date}. Please sign it again here so it's ready for next time:\n{url}";
134
+ readonly "share.open": "Please read and sign {title} for {business} here: {url}";
98
135
  };
99
136
  export type AgreementWordKey = keyof typeof EN;
100
137
  export declare const AGREEMENT_WORD_KEYS: AgreementWordKey[];
package/dist/words.js CHANGED
@@ -99,6 +99,43 @@ const EN = {
99
99
  "error.closed": "This agreement is already closed, so there is nothing to withdraw.",
100
100
  "error.failed": "Something went wrong on our side. Please try again.",
101
101
  "share.text": "Hi {name}, please read and sign {title} here: {url}",
102
+ "open.title": "Sign {title}",
103
+ "open.intro": "Tell us who is signing. We'll then show you the document and the questions.",
104
+ "open.lasts_event": "Your signature covers this booking.",
105
+ "open.lasts_months": "Your signature lasts {months} months.",
106
+ "open.email_label": "Your email",
107
+ "open.email_hint": "We'll email you the signed copy.",
108
+ "open.start": "Continue",
109
+ "open.questions": "A few questions",
110
+ "child.ask": "I'm signing for a child",
111
+ "child.always": "You are signing for a child in your care.",
112
+ "child.name_label": "The child's full name",
113
+ "child.relationship": "You are the child's",
114
+ "child.parent": "Parent",
115
+ "child.guardian": "Legal guardian",
116
+ "child.declare": "I am this child's parent or legal guardian, and I may sign this for them.",
117
+ "child.on_behalf": "Signing for {child} as their {relationship}",
118
+ "open.sign": "Sign",
119
+ "open.sign_hint": "By tapping Sign you sign it as {name}.",
120
+ "open.consent_esign": "I agree to sign electronically and to receive the signed copy by email, and that my electronic signature is as binding as signing by hand.",
121
+ "problem.email": "Type your email address, like name@example.com.",
122
+ "problem.child_name": "Type the child's full name (2 to 120 characters).",
123
+ "problem.relationship": "Say whether you are the child's parent or legal guardian.",
124
+ "problem.child_declare": "Tick the box to say you may sign for the child.",
125
+ "problem.questions": "Some answers need fixing: see the questions below.",
126
+ "problem.busy": "Too many tries from this email. Please wait an hour, or ask {business} for help.",
127
+ "ended.used": "This link has already been used to sign. If you're another person in the booking, ask {business} for your own link.",
128
+ "ended.retired": "{business} no longer uses this document. Ask them for the current one.",
129
+ "ended.stale": "This signing page has timed out. Open the link again to start over.",
130
+ "done.open": "You signed {title} on {date}. We've emailed you the signed copy.",
131
+ "email.open_code.subject": "Your code to sign {title}",
132
+ "email.open_signed.subject": "Signed: {title}",
133
+ "email.open_signed.text": "Hi {name},\n\nThank you for signing {title} for {business}. The signed copy is attached, with a signing certificate on its last pages.\n\nSignature {id}\nSigned copy SHA-256: {sha256}\n\nKeep this email for your records.",
134
+ "email.request.subject": "Please sign before your booking: {title}",
135
+ "email.request.text": "Hi {name},\n\n{business} needs {title} signed for each person in your booking before you arrive. Each link below is for one person (a parent or guardian signs for a child). Send the others on to the people they're for.\n\n{links}\n\nThe links work until {date}.",
136
+ "email.renew.subject": "Time to sign again: {title}",
137
+ "email.renew.text": "Hi {name},\n\nYour signed {title} for {business}{child} runs out on {date}. Please sign it again here so it's ready for next time:\n{url}",
138
+ "share.open": "Please read and sign {title} for {business} here: {url}",
102
139
  };
103
140
  export const AGREEMENT_WORD_KEYS = Object.keys(EN);
104
141
  const prefix = (o) => Object.fromEntries(Object.entries(o).map(([k, v]) => [`ui.wbagreement.${k}`, v]));
@@ -161,6 +198,36 @@ const TL = {
161
198
  "not_found.title": "Hindi namin makita ang kasunduang ito",
162
199
  "not_found.text": "Pakitingnan ang link na pinadala sa inyo, o humingi ng bago sa nagpadala.",
163
200
  "share.text": "Hi {name}, pakibasa at pakipirmahan ang {title} dito: {url}",
201
+ "open.title": "Pirmahan ang {title}",
202
+ "open.intro": "Sabihin sa amin kung sino ang pipirma. Saka namin ipapakita ang dokumento at ang mga tanong.",
203
+ "open.lasts_event": "Sakop ng pirma mo ang booking na ito.",
204
+ "open.lasts_months": "Tatagal nang {months} buwan ang pirma mo.",
205
+ "open.email_label": "Email mo",
206
+ "open.email_hint": "Ie-email namin sa iyo ang pirmadong kopya.",
207
+ "open.start": "Magpatuloy",
208
+ "open.questions": "Ilang tanong",
209
+ "child.ask": "Pumipirma ako para sa isang bata",
210
+ "child.always": "Pumipirma ka para sa batang nasa pangangalaga mo.",
211
+ "child.name_label": "Buong pangalan ng bata",
212
+ "child.relationship": "Ikaw ang",
213
+ "child.parent": "Magulang",
214
+ "child.guardian": "Legal na tagapag-alaga",
215
+ "child.declare": "Ako ang magulang o legal na tagapag-alaga ng batang ito, at may karapatan akong pumirma para sa kanya.",
216
+ "child.on_behalf": "Pumipirma para kay {child} bilang {relationship}",
217
+ "open.sign": "Pirmahan",
218
+ "open.sign_hint": "Sa pag-tap ng Pirmahan, pumipirma ka bilang {name}.",
219
+ "open.consent_esign": "Pumapayag akong pumirma nang electronic at tumanggap ng pirmadong kopya sa email, at na kasing-bisa ng pirma sa papel ang aking electronic na pirma.",
220
+ "problem.email": "I-type ang email mo, gaya ng name@example.com.",
221
+ "problem.child_name": "I-type ang buong pangalan ng bata (2 hanggang 120 titik).",
222
+ "problem.relationship": "Sabihin kung ikaw ang magulang o legal na tagapag-alaga ng bata.",
223
+ "problem.child_declare": "Lagyan ng tsek para sabihing may karapatan kang pumirma para sa bata.",
224
+ "problem.questions": "May mga sagot na kailangang ayusin: tingnan ang mga tanong sa ibaba.",
225
+ "problem.busy": "Sobra na ang subok mula sa email na ito. Maghintay nang isang oras, o humingi ng tulong kay {business}.",
226
+ "ended.used": "Nagamit na ang link na ito sa pagpirma. Kung iba kang tao sa booking, humingi kay {business} ng sarili mong link.",
227
+ "ended.retired": "Hindi na ginagamit ni {business} ang dokumentong ito. Humingi sa kanila ng bago.",
228
+ "ended.stale": "Nag-time out na ang pahinang ito. Buksan ulit ang link para magsimula.",
229
+ "done.open": "Pinirmahan mo ang {title} noong {date}. Na-email na namin sa iyo ang pirmadong kopya.",
230
+ "share.open": "Pakibasa at pakipirmahan ang {title} para kay {business} dito: {url}",
164
231
  "void.ask": "Bawiin",
165
232
  "void.question": "Bawiin ang {title}, na para sa {names}?",
166
233
  "void.consequence": "Hindi na gagana ang mga signing link nila at wala nang makakapirma. Ie-email namin ang lahat ng nasa kasunduan, kasama ang mga nakapirma na, kasama ang dahilan mo. Hindi na ito maibabalik: kung itutuloy mo, magpadala ng bagong kasunduan.",
@@ -197,6 +264,12 @@ const TAGLISH = {
197
264
  "done.waiting": "Na-sign mo po ito noong {date}. Pag naka-sign na lahat, i-email namin sa inyo ang signed copy.",
198
265
  "done.download": "I-download ang signed copy",
199
266
  "share.text": "Hi {name}, pa-read and pa-sign po ng {title} dito: {url}",
267
+ "open.title": "I-sign ang {title}",
268
+ "child.ask": "Nagsa-sign po ako para sa isang bata",
269
+ "open.sign": "I-sign",
270
+ "open.sign_hint": "Pag-tap mo po ng I-sign, nagsa-sign ka bilang {name}.",
271
+ "done.open": "Na-sign mo po ang {title} noong {date}. Na-email na namin sa inyo ang signed copy.",
272
+ "share.open": "Pa-read and pa-sign po ng {title} para sa {business} dito: {url}",
200
273
  };
201
274
  export const AGREEMENT_WORDS = Object.freeze({
202
275
  en: prefix(EN),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mccaskie-labs/workbench-agreements",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "Agreements and e-signing for Workbench apps: send a branded PDF agreement, let each person sign it online with a typed or drawn signature, keep a timestamped audit trail, and email the signed copy, with a signing certificate, to everyone. Runs in the app's own Worker, database and R2 bucket.",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -43,6 +43,7 @@
43
43
  "prepack": "node scripts/build.mjs"
44
44
  },
45
45
  "dependencies": {
46
+ "@mccaskie-labs/workbench-forms": "^0.11.1",
46
47
  "pdf-lib": "1.17.1"
47
48
  },
48
49
  "devDependencies": {