@tesouro/embedded-components-react 0.10.6 → 0.10.10

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 (56) hide show
  1. package/dist/index.css +9 -0
  2. package/dist/index.d.ts +46 -7
  3. package/dist/index.js +4 -4
  4. package/dist/lib/BankAccountOnboardingWidget.d.ts +46 -7
  5. package/dist/lib/BankAccountOnboardingWidget.js +4 -4
  6. package/dist/lib/WidgetSuite.d.ts +46 -7
  7. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/AdditionalOwnersStep.js +175 -98
  8. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/BankAccountOnboardingWidget.js +365 -343
  9. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/BusinessDetailsStep.js +1 -1
  10. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/PersonalDetailsStep.js +3 -9
  11. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/ReviewStep.js +24 -23
  12. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/TermsStep.js +1 -1
  13. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/additionalOwnerDraft.js +1 -1
  14. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/apiMapping.js +15 -10
  15. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/applicantOwnerSummary.js +11 -0
  16. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/applicationStatusView.js +2 -2
  17. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/businessDetailsPanelMapping.js +2 -2
  18. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/draftApplicationMapping.js +3 -3
  19. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/labels.js +1 -1
  20. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/personalDetailsPanelMapping.js +3 -26
  21. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/stepSchemas.js +2 -6
  22. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/testIds.js +3 -1
  23. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index.js +20 -20
  24. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index10.js +5 -340
  25. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index11.js +422 -58
  26. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index12.js +50 -30
  27. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index13.js +39 -6
  28. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index14.js +6 -58
  29. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index15.js +62 -31
  30. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index16.js +31 -38
  31. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index17.js +27 -26
  32. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index18.js +34 -91
  33. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index19.js +96 -12
  34. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index20.js +12 -276
  35. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index21.js +294 -25
  36. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index22.js +28 -23
  37. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index23.js +23 -53
  38. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index24.js +46 -343
  39. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index25.js +268 -26
  40. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index26.js +29 -29
  41. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index27.js +29 -59
  42. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index28.js +53 -118
  43. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index29.js +123 -5
  44. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index30.js +5 -80
  45. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index31.js +80 -10
  46. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index32.js +10 -64
  47. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index33.js +64 -6
  48. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index34.js +6 -44
  49. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index35.js +45 -0
  50. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index7.js +110 -2
  51. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index8.js +2 -77
  52. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index9.js +89 -5
  53. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  54. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShell.js +67 -61
  55. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShellStepper.js +16 -19
  56. package/package.json +1 -1
@@ -1,61 +1,425 @@
1
- import { IDENTIFIER_ON_FILE_TEMPLATE_EN as e } from "./index7.js";
1
+ import { Button as e, Label as t, RadioGroup as n, RadioGroupItem as r, Table as i, TableBody as a, TableCell as o, TableHead as s, TableHeader as ee, TableRow as c, Tooltip as l, TooltipContent as te, TooltipProvider as ne, TooltipTrigger as u, Typography as d } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { ADDITIONAL_OWNERS_LABELS_EN as re } from "./index9.js";
3
+ import { AdditionalOwnerRowStatus as f } from "./index10.js";
4
+ import { AdditionalOwnerDeleteConfirmation as ie } from "./index2.js";
5
+ import { FieldError as ae, fieldErrorAria as oe } from "./index3.js";
6
+ import { AdditionalOwnerInlineEditor as p } from "./index5.js";
7
+ import { AdditionalOwnerReviewPanel as se } from "./index6.js";
8
+ import { ApplicantOwnerInlineEditor as ce } from "./index7.js";
9
+ import { useEffect as le, useId as ue, useRef as m } from "react";
10
+ import { Fragment as de, jsx as h, jsxs as g } from "react/jsx-runtime";
11
+ import { CircleAlertIcon as _, CircleCheckIcon as v, PencilIcon as y, PlusIcon as b, Trash2Icon as x, UserIcon as S, UsersIcon as C } from "lucide-react";
2
12
  // ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index11.js
3
- function t(e, t) {
4
- return e.replaceAll("{bankName}", t);
13
+ function w({ ownerRows: _, primaryOwnerName: v, primaryOwnerShareDisplay: S, businessName: C, applicantOwnsAnswer: w, onApplicantOwnsAnswerChange: E, applicantQuestionError: O, applicantEditor: k, onEditApplicant: A, onEditPersonalDetails: me, totalOwnershipError: j, reviewError: M = null, addOwnerDisabled: N, onAddOwner: P, onEditOwner: F, onStartReview: he, onDeleteOwnerRequest: I, deletingOwnerIndex: L, onDeleteOwnerConfirm: ge, onDeleteOwnerCancel: _e, editingOverlay: R, reviewingOwner: z = null, isSubmitting: B, labels: ve, testIds: V }) {
14
+ let H = {
15
+ ...re,
16
+ ...ve
17
+ }, U = k !== null || R !== null || L !== null || z !== null, W = B || U, G = R !== null && R.rowIndex !== null ? R : null, K = R !== null && R.rowIndex === null ? R : null, q = w === "yes", ye = w !== "" || _.length > 0, be = !q && _.length === 0, J = ue(), Y = m(null), X = m(null), xe = () => {
18
+ X.current = L, _e();
19
+ }, Z = k === null ? G?.rowIndex ?? z?.rowIndex : "applicant", Q = L === null ? k === null ? K === null ? G === null ? z === null ? null : `review:${z.rowIndex}` : `edit:${G.rowIndex}` : "add" : "applicant" : null, $ = m({
20
+ key: Q,
21
+ index: Z
22
+ });
23
+ le(() => {
24
+ let e = $.current;
25
+ $.current = {
26
+ key: Q,
27
+ index: Z
28
+ };
29
+ let t = (e, t) => Y.current?.querySelector(`[data-owner-row="${e}"] ${t}`)?.focus(), n = X.current;
30
+ if (n !== null && L === null) X.current = null, t(n, "[data-owner-delete-trigger]");
31
+ else if (L === null && e.key !== Q) {
32
+ if (Q === "add") Y.current?.querySelector("[data-owner-add-editor] [data-owner-panel-heading]")?.focus();
33
+ else if (Q !== null && Z != null) t(Z, "[data-owner-panel-heading]");
34
+ else if (e.key === "add") Y.current?.querySelector("[data-owner-add-trigger]")?.focus();
35
+ else if (e.index != null) {
36
+ let t = Y.current?.querySelector(`[data-owner-row="${e.index}"] [data-owner-row-action]`);
37
+ if (t) t.focus();
38
+ else if (e.index === "applicant" && !Y.current?.matches(":focus-within")) {
39
+ let e = Y.current?.querySelector("[data-applicant-question]");
40
+ (e?.querySelector("[role=\"radio\"][aria-checked=\"true\"]") ?? e?.querySelector("[role=\"radio\"]"))?.focus();
41
+ }
42
+ }
43
+ }
44
+ }, [
45
+ Q,
46
+ Z,
47
+ L
48
+ ]);
49
+ let Se = K ? /* @__PURE__ */ h("div", {
50
+ "data-owner-add-editor": "",
51
+ children: /* @__PURE__ */ h(p, {
52
+ heading: H.formHeadingAdd,
53
+ submitLabel: H.addOwnerSubmit,
54
+ editor: K,
55
+ isDisabled: B,
56
+ labels: H,
57
+ testIds: V?.addOwnerEditor
58
+ })
59
+ }) : null;
60
+ return /* @__PURE__ */ g("div", {
61
+ ref: Y,
62
+ className: "ttw:relative ttw:flex ttw:flex-col ttw:gap-6",
63
+ children: [
64
+ /* @__PURE__ */ g("div", {
65
+ className: "ttw:flex ttw:flex-col ttw:gap-1",
66
+ children: [/* @__PURE__ */ h(d, {
67
+ component: "h3",
68
+ variant: "h6",
69
+ className: "ttw:font-semibold ttw:text-foreground",
70
+ children: H.heading
71
+ }), /* @__PURE__ */ h(d, {
72
+ variant: "body2",
73
+ className: "ttw:text-muted-foreground",
74
+ children: H.subheading
75
+ })]
76
+ }),
77
+ /* @__PURE__ */ g("fieldset", {
78
+ "data-testid": V?.applicantQuestion,
79
+ "data-applicant-question": "",
80
+ children: [
81
+ /* @__PURE__ */ g("legend", {
82
+ id: J,
83
+ className: "ttw:mb-2 ttw:text-sm ttw:font-medium",
84
+ children: [H.applicantOwnsQuestionTemplate(C), H.requiredFieldMarker]
85
+ }),
86
+ /* @__PURE__ */ g(n, {
87
+ value: w,
88
+ onValueChange: (e) => E(e === "yes" ? "yes" : "no"),
89
+ className: "ttw:flex ttw:gap-4",
90
+ disabled: B || R !== null || z !== null || L !== null,
91
+ "aria-labelledby": J,
92
+ "aria-describedby": oe(J, O)["aria-describedby"],
93
+ children: [/* @__PURE__ */ g("div", {
94
+ className: "ttw:flex ttw:cursor-pointer ttw:items-center ttw:gap-2",
95
+ children: [/* @__PURE__ */ h(r, {
96
+ value: "yes",
97
+ id: `${J}-yes`,
98
+ "aria-invalid": O ? !0 : void 0,
99
+ "data-needs-attention": O ? "" : void 0,
100
+ className: "ttw:cursor-pointer"
101
+ }), /* @__PURE__ */ h(t, {
102
+ htmlFor: `${J}-yes`,
103
+ className: "ttw:cursor-pointer",
104
+ children: H.applicantOwnsYes
105
+ })]
106
+ }), /* @__PURE__ */ g("div", {
107
+ className: "ttw:flex ttw:cursor-pointer ttw:items-center ttw:gap-2",
108
+ children: [/* @__PURE__ */ h(r, {
109
+ value: "no",
110
+ id: `${J}-no`,
111
+ "aria-invalid": O ? !0 : void 0,
112
+ className: "ttw:cursor-pointer"
113
+ }), /* @__PURE__ */ h(t, {
114
+ htmlFor: `${J}-no`,
115
+ className: "ttw:cursor-pointer",
116
+ children: H.applicantOwnsNo
117
+ })]
118
+ })]
119
+ }),
120
+ /* @__PURE__ */ h(ae, {
121
+ fieldId: J,
122
+ error: O
123
+ })
124
+ ]
125
+ }),
126
+ M ? /* @__PURE__ */ h(T, { message: M }) : null,
127
+ ye ? K ? Se : be ? /* @__PURE__ */ h(fe, {
128
+ labels: H,
129
+ businessName: C,
130
+ onAddOwner: P,
131
+ disabled: N || B || U,
132
+ addOwnerButtonTestId: V?.addOwnerButton
133
+ }) : /* @__PURE__ */ g("div", {
134
+ className: "ttw:flex ttw:flex-col ttw:gap-2",
135
+ children: [/* @__PURE__ */ h("div", {
136
+ className: "ttw:border-b ttw:border-border",
137
+ children: /* @__PURE__ */ g(i, { children: [/* @__PURE__ */ h(ee, { children: /* @__PURE__ */ g(c, {
138
+ className: "ttw:hover:bg-transparent",
139
+ children: [
140
+ /* @__PURE__ */ h(s, {
141
+ className: "ttw:px-4 ttw:py-3",
142
+ children: H.ownerNameColumn
143
+ }),
144
+ /* @__PURE__ */ h(s, {
145
+ className: "ttw:px-4 ttw:py-3",
146
+ children: H.ownerShareColumn
147
+ }),
148
+ /* @__PURE__ */ h(s, {
149
+ className: "ttw:px-4 ttw:py-3",
150
+ children: /* @__PURE__ */ h("span", {
151
+ className: "ttw:sr-only",
152
+ children: H.ownerActionsColumn
153
+ })
154
+ })
155
+ ]
156
+ }) }), /* @__PURE__ */ g(a, { children: [q && k !== null ? /* @__PURE__ */ h(c, {
157
+ "data-owner-row": "applicant",
158
+ className: "ttw:hover:bg-transparent",
159
+ children: /* @__PURE__ */ h(o, {
160
+ colSpan: 3,
161
+ className: "ttw:p-2 ttw:whitespace-normal",
162
+ children: /* @__PURE__ */ h(ce, {
163
+ applicantName: v,
164
+ editor: k,
165
+ onEditPersonalDetails: me,
166
+ isDisabled: B,
167
+ labels: H,
168
+ testIds: V?.applicantEditor
169
+ })
170
+ })
171
+ }) : q ? /* @__PURE__ */ g(c, {
172
+ "data-owner-row": "applicant",
173
+ className: "ttw:hover:bg-transparent",
174
+ children: [
175
+ /* @__PURE__ */ h(o, {
176
+ className: "ttw:px-4 ttw:whitespace-normal",
177
+ children: /* @__PURE__ */ h(D, {
178
+ status: f.Complete,
179
+ statusText: H.statusComplete,
180
+ children: v
181
+ })
182
+ }),
183
+ /* @__PURE__ */ h(o, {
184
+ className: "ttw:px-4",
185
+ children: S
186
+ }),
187
+ /* @__PURE__ */ h(o, {
188
+ className: "ttw:px-4 ttw:text-right",
189
+ children: /* @__PURE__ */ g("div", {
190
+ className: "ttw:flex ttw:justify-end ttw:gap-2",
191
+ children: [/* @__PURE__ */ h(e, {
192
+ type: "button",
193
+ variant: "ghost",
194
+ size: "icon-sm",
195
+ "aria-label": H.editApplicantOwnership,
196
+ onClick: A,
197
+ disabled: W,
198
+ "data-owner-row-action": "",
199
+ children: /* @__PURE__ */ h(y, { className: "ttw:size-4" })
200
+ }), /* @__PURE__ */ h(ne, { children: /* @__PURE__ */ g(l, { children: [/* @__PURE__ */ h(u, {
201
+ asChild: !0,
202
+ children: /* @__PURE__ */ h(e, {
203
+ type: "button",
204
+ variant: "ghost",
205
+ size: "icon-sm",
206
+ "aria-label": H.removePrimaryOwnerDisabled,
207
+ "aria-disabled": "true",
208
+ className: "ttw:cursor-not-allowed ttw:opacity-50",
209
+ children: /* @__PURE__ */ h(x, { className: "ttw:size-4" })
210
+ })
211
+ }), /* @__PURE__ */ h(te, {
212
+ className: "ttw:max-w-60",
213
+ children: H.removePrimaryOwnerTooltip
214
+ })] }) })]
215
+ })
216
+ })
217
+ ]
218
+ }) : null, _.map((t, n) => {
219
+ if (L === n) return /* @__PURE__ */ h(c, {
220
+ "data-owner-row": n,
221
+ className: "ttw:hover:bg-transparent",
222
+ children: /* @__PURE__ */ h(o, {
223
+ colSpan: 3,
224
+ className: "ttw:p-2 ttw:whitespace-normal",
225
+ children: /* @__PURE__ */ h(ie, {
226
+ ownerName: t.name,
227
+ labels: H,
228
+ isDisabled: B,
229
+ onCancel: xe,
230
+ onConfirm: ge,
231
+ testIds: V?.deleteConfirmation
232
+ })
233
+ })
234
+ }, n);
235
+ if (G?.rowIndex === n) return /* @__PURE__ */ h(c, {
236
+ "data-owner-row": n,
237
+ className: "ttw:hover:bg-transparent",
238
+ children: /* @__PURE__ */ h(o, {
239
+ colSpan: 3,
240
+ className: "ttw:p-2 ttw:whitespace-normal",
241
+ children: /* @__PURE__ */ h(p, {
242
+ heading: H.inlineEditHeadingTemplate(t.name),
243
+ submitLabel: H.saveOwnerSubmit,
244
+ editor: G,
245
+ isDisabled: B,
246
+ labels: H,
247
+ onDelete: () => I(n),
248
+ testIds: V?.inlineEditor
249
+ })
250
+ })
251
+ }, n);
252
+ if (z?.rowIndex === n) return /* @__PURE__ */ h(c, {
253
+ "data-owner-row": n,
254
+ className: "ttw:hover:bg-transparent",
255
+ children: /* @__PURE__ */ h(o, {
256
+ colSpan: 3,
257
+ className: "ttw:p-2 ttw:whitespace-normal",
258
+ children: /* @__PURE__ */ h(se, {
259
+ ownerName: t.name,
260
+ shareDisplay: t.shareDisplay,
261
+ review: z,
262
+ isDisabled: B,
263
+ labels: H,
264
+ onDelete: () => I(n),
265
+ testIds: V?.reviewCard
266
+ })
267
+ })
268
+ }, n);
269
+ let r = `additional-owner-${n}-status`;
270
+ return /* @__PURE__ */ g(c, {
271
+ "data-owner-row": n,
272
+ className: "ttw:hover:bg-transparent",
273
+ children: [
274
+ /* @__PURE__ */ h(o, {
275
+ className: "ttw:px-4 ttw:whitespace-normal",
276
+ children: /* @__PURE__ */ h(D, {
277
+ status: t.status,
278
+ statusId: r,
279
+ statusText: pe(t, H),
280
+ children: t.name
281
+ })
282
+ }),
283
+ /* @__PURE__ */ h(o, {
284
+ className: "ttw:px-4",
285
+ children: t.shareDisplay
286
+ }),
287
+ /* @__PURE__ */ h(o, {
288
+ className: "ttw:px-4 ttw:text-right",
289
+ children: /* @__PURE__ */ h("div", {
290
+ className: "ttw:flex ttw:justify-end ttw:gap-2",
291
+ children: t.status === f.Missing ? /* @__PURE__ */ h(e, {
292
+ type: "button",
293
+ size: "sm",
294
+ "aria-describedby": r,
295
+ onClick: () => F(n),
296
+ disabled: W,
297
+ "data-testid": V?.completeDetailsButton,
298
+ "data-owner-row-action": "",
299
+ "data-needs-attention": "",
300
+ children: H.completeDetails
301
+ }) : t.status === f.Unreviewed ? /* @__PURE__ */ h(e, {
302
+ type: "button",
303
+ variant: "secondary",
304
+ size: "sm",
305
+ "aria-describedby": r,
306
+ onClick: () => he(n),
307
+ disabled: W,
308
+ "data-testid": V?.startReviewButton,
309
+ "data-owner-row-action": "",
310
+ "data-needs-attention": "",
311
+ children: H.startReview
312
+ }) : /* @__PURE__ */ g(de, { children: [/* @__PURE__ */ h(e, {
313
+ type: "button",
314
+ variant: "ghost",
315
+ size: "icon-sm",
316
+ "aria-label": H.edit,
317
+ onClick: () => F(n),
318
+ disabled: W,
319
+ "data-owner-row-action": "",
320
+ children: /* @__PURE__ */ h(y, { className: "ttw:size-4" })
321
+ }), /* @__PURE__ */ h(e, {
322
+ type: "button",
323
+ variant: "ghost",
324
+ size: "icon-sm",
325
+ "aria-label": H.remove,
326
+ onClick: () => I(n),
327
+ disabled: W,
328
+ "data-owner-delete-trigger": "",
329
+ children: /* @__PURE__ */ h(x, { className: "ttw:size-4" })
330
+ })] })
331
+ })
332
+ })
333
+ ]
334
+ }, n);
335
+ })] })] })
336
+ }), U ? null : /* @__PURE__ */ g(e, {
337
+ type: "button",
338
+ variant: "ghost",
339
+ onClick: P,
340
+ disabled: N || B,
341
+ "data-testid": V?.addOwnerButton,
342
+ "data-owner-add-trigger": "",
343
+ className: "ttw:h-auto ttw:w-fit ttw:justify-start ttw:gap-1.5 ttw:px-0 ttw:has-[>svg]:px-0 ttw:pl-4 ttw:font-normal ttw:text-primary ttw:hover:bg-transparent ttw:hover:text-primary/90",
344
+ children: [/* @__PURE__ */ h(b, { className: "ttw:size-4" }), H.addOwner]
345
+ })]
346
+ }) : null,
347
+ j ? /* @__PURE__ */ h(T, { message: j }) : null
348
+ ]
349
+ });
5
350
  }
6
- var n = {
7
- heading: "Tell us about your business",
8
- subheading: "Provide your business details to get started.",
9
- requiredFieldsNote: "Required fields are marked with an asterisk *",
10
- requiredFieldMarker: " *",
11
- companyLegalName: "Legal company name",
12
- companyDbaName: "Doing business as (optional)",
13
- businessAddress: "Business address",
14
- city: "City",
15
- state: "State",
16
- statePlaceholder: "Select state",
17
- zipCode: "Postal code",
18
- zipCodeInvalid: "Postal code must be 5 digits",
19
- companyPhoneNumber: "Company phone number",
20
- companyPhoneNumberInvalid: "Phone must be 10 digits",
21
- requiredFieldError: "This field is required",
22
- invalidFieldError: "Enter a valid value",
23
- companyStructure: "Company structure",
24
- companyStructurePlaceholder: "Select structure",
25
- website: "Website (optional)",
26
- websiteInvalid: "Enter a valid website URL (no spaces).",
27
- taxId: "Tax ID (EIN)",
28
- taxIdInvalid: "Tax ID must be 9 digits",
29
- taxIdOnFileTemplate: e,
30
- naicsCode: "Industry (NAICS code)",
31
- naicsCodePlaceholder: "Search by code or industry",
32
- isAuthorizedQuestion: "I am legally authorized to view and manage financial accounts for my company.",
33
- isAuthorizedYes: "Yes",
34
- isAuthorizedNo: "No",
35
- disclosuresHeading: "Accept terms and conditions",
36
- disclosuresSubheading: "Read and accept the terms below to submit your application.",
37
- disclosureAgreementLead: "Disclosure agreement.",
38
- acceptDisclosuresPrefix: "I agree to {bankName}'s ",
39
- termsOfUse: "Terms of Use",
40
- privacyPolicy: "Privacy Policy",
41
- acceptDisclosuresTermsPrivacyJoin: " and ",
42
- acceptDisclosuresAfterPrivacy: ", and to receive electronic communication about my accounts and services per {bankName}'s ",
43
- electronicCommunication: "Electronic Communications Agreement",
44
- acceptDisclosuresAfterElectronic: ", and acknowledge receipt of {bankName}'s ",
45
- patriotAct: "USA PATRIOT Act disclosure.",
46
- consentRequiredError: "Tick this box to continue.",
47
- companyStructureOptions: {
48
- CORPORATION_PUBLIC: "Public corporation",
49
- CORPORATION_PRIVATE: "Private corporation",
50
- CORPORATION_NOT_FOR_PROFIT: "Not-for-profit corporation",
51
- LLC: "Limited liability company (LLC)",
52
- LLP: "Limited liability partnership (LLP)",
53
- PARTNERSHIP: "Partnership",
54
- SOLE_PROPRIETORSHIP: "Sole proprietorship",
55
- GOVERNMENT: "Government",
56
- COOPERATIVE: "Cooperative",
57
- ASSOCIATION: "Association",
58
- OTHER: "Other"
59
- }
351
+ function T({ message: e }) {
352
+ return /* @__PURE__ */ g("div", {
353
+ role: "alert",
354
+ className: "ttw:flex ttw:items-center ttw:gap-3 ttw:rounded-xl ttw:border ttw:border-destructive/30 ttw:bg-destructive/15 ttw:px-6 ttw:py-4 ttw:text-sm ttw:text-destructive",
355
+ children: [/* @__PURE__ */ h(_, {
356
+ "aria-hidden": !0,
357
+ className: "ttw:size-5 ttw:shrink-0"
358
+ }), /* @__PURE__ */ h("span", { children: e })]
359
+ });
360
+ }
361
+ function fe({ labels: t, businessName: n, onAddOwner: r, disabled: i, addOwnerButtonTestId: a }) {
362
+ return /* @__PURE__ */ g("div", {
363
+ className: "ttw:flex ttw:flex-col ttw:items-center ttw:gap-4 ttw:rounded-xl ttw:border ttw:border-dashed ttw:border-border ttw:px-6 ttw:py-12 ttw:text-center",
364
+ children: [
365
+ /* @__PURE__ */ h("div", {
366
+ "aria-hidden": !0,
367
+ className: "ttw:flex ttw:size-16 ttw:items-center ttw:justify-center ttw:rounded-full ttw:bg-muted",
368
+ children: /* @__PURE__ */ h(C, { className: "ttw:size-6 ttw:text-foreground" })
369
+ }),
370
+ /* @__PURE__ */ g("div", {
371
+ className: "ttw:flex ttw:max-w-md ttw:flex-col ttw:gap-1",
372
+ children: [/* @__PURE__ */ h(d, {
373
+ component: "h4",
374
+ variant: "h6",
375
+ className: "ttw:font-medium ttw:text-foreground",
376
+ children: t.emptyOwnersText
377
+ }), /* @__PURE__ */ h(d, {
378
+ variant: "body2",
379
+ className: "ttw:text-muted-foreground",
380
+ children: t.emptyOwnersBodyTemplate(n)
381
+ })]
382
+ }),
383
+ /* @__PURE__ */ g(e, {
384
+ type: "button",
385
+ variant: "link",
386
+ onClick: r,
387
+ disabled: i,
388
+ "data-testid": a,
389
+ "data-owner-add-trigger": "",
390
+ children: [/* @__PURE__ */ h(b, { className: "ttw:size-4" }), t.emptyOwnersAddOwner]
391
+ })
392
+ ]
393
+ });
394
+ }
395
+ var E = {
396
+ [f.Complete]: /* @__PURE__ */ h(v, { className: "ttw:size-4 ttw:shrink-0 ttw:text-emerald-600" }),
397
+ [f.Missing]: /* @__PURE__ */ h(_, { className: "ttw:size-4 ttw:shrink-0 ttw:text-destructive" }),
398
+ [f.Unreviewed]: /* @__PURE__ */ h(S, { className: "ttw:size-4 ttw:shrink-0 ttw:text-muted-foreground" })
60
399
  };
61
- export { n as BUSINESS_DETAILS_LABELS_EN, t as interpolateBankName };
400
+ function pe(e, t) {
401
+ switch (e.status) {
402
+ case f.Missing: return e.error ?? t.statusMissing;
403
+ case f.Unreviewed: return t.statusUnreviewed;
404
+ default: return t.statusComplete;
405
+ }
406
+ }
407
+ function D({ status: e, statusId: t, statusText: n, children: r }) {
408
+ return /* @__PURE__ */ g("span", {
409
+ className: "ttw:flex ttw:items-center ttw:gap-2",
410
+ children: [
411
+ /* @__PURE__ */ h("span", {
412
+ "aria-hidden": !0,
413
+ className: "ttw:flex",
414
+ children: E[e]
415
+ }),
416
+ /* @__PURE__ */ h("span", { children: r }),
417
+ /* @__PURE__ */ h("span", {
418
+ id: t,
419
+ className: "ttw:sr-only",
420
+ children: n
421
+ })
422
+ ]
423
+ });
424
+ }
425
+ export { f as AdditionalOwnerRowStatus, w as AdditionalOwnersForm };
@@ -1,41 +1,61 @@
1
- import { IDENTIFIER_ON_FILE_TEMPLATE_EN as e } from "./index7.js";
1
+ import { IDENTIFIER_ON_FILE_TEMPLATE_EN as e } from "./index8.js";
2
2
  // ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index12.js
3
- var t = {
4
- heading: "Tell us about yourself",
5
- subheading: "We need this information to verify your identity.",
3
+ function t(e, t) {
4
+ return e.replaceAll("{bankName}", t);
5
+ }
6
+ var n = {
7
+ heading: "Tell us about your business",
8
+ subheading: "Provide your business details to get started.",
6
9
  requiredFieldsNote: "Required fields are marked with an asterisk *",
7
10
  requiredFieldMarker: " *",
8
- firstName: "First name",
9
- lastName: "Last name",
10
- dateOfBirth: "Date of birth",
11
- dateOfBirthPlaceholder: "MM/DD/YYYY",
12
- dateOfBirthHint: "For example, 04/23/1985",
13
- dateOfBirthInvalidError: "Enter a valid date of birth",
14
- dateOfBirthMinAgeError: "Must be at least 18 years old",
15
- ssn: "SSN",
16
- ssnOnFileTemplate: e,
17
- ssnInvalid: "SSN must be 9 digits",
18
- ssnShow: "Show",
19
- ssnHide: "Hide",
20
- homeAddress: "Home address",
11
+ companyLegalName: "Legal company name",
12
+ companyDbaName: "Doing business as (optional)",
13
+ businessAddress: "Business address",
21
14
  city: "City",
22
15
  state: "State",
23
16
  statePlaceholder: "Select state",
24
17
  zipCode: "Postal code",
25
18
  zipCodeInvalid: "Postal code must be 5 digits",
26
- mobilePhoneNumber: "Phone",
27
- mobilePhoneNumberInvalid: "Phone must be 10 digits",
28
- workEmail: "Work email",
29
- workEmailInvalid: "Enter a valid email address",
19
+ companyPhoneNumber: "Company phone number",
20
+ companyPhoneNumberInvalid: "Phone must be 10 digits",
30
21
  requiredFieldError: "This field is required",
31
22
  invalidFieldError: "Enter a valid value",
32
- ownsOver25Question: "Do you own 25% or more of the business?",
33
- ownsOver25SummaryLabel: "Owns 25% or more of the business",
34
- ownsOver25Yes: "Yes",
35
- ownsOver25No: "No",
36
- ownershipPercentage: "Ownership share (minimum 25%)",
37
- ownershipPercentagePlaceholder: "e.g., 25",
38
- ownershipPercentageRangeError: "Enter 25 to 100, or select No above if you own less than 25%.",
39
- percentSuffix: "%"
23
+ companyStructure: "Company structure",
24
+ companyStructurePlaceholder: "Select structure",
25
+ website: "Website (optional)",
26
+ websiteInvalid: "Enter a valid website URL (no spaces).",
27
+ taxId: "Tax ID (EIN)",
28
+ taxIdInvalid: "Tax ID must be 9 digits",
29
+ taxIdOnFileTemplate: e,
30
+ naicsCode: "Industry (NAICS code)",
31
+ naicsCodePlaceholder: "Search by code or industry",
32
+ isAuthorizedQuestion: "I am legally authorized to view and manage financial accounts for my company.",
33
+ isAuthorizedYes: "Yes",
34
+ isAuthorizedNo: "No",
35
+ disclosuresHeading: "Accept terms and conditions",
36
+ disclosuresSubheading: "Read and accept the terms below to submit your application.",
37
+ disclosureAgreementLead: "Disclosure agreement.",
38
+ acceptDisclosuresPrefix: "I agree to {bankName}'s ",
39
+ termsOfUse: "Terms of Use",
40
+ privacyPolicy: "Privacy Policy",
41
+ acceptDisclosuresTermsPrivacyJoin: " and ",
42
+ acceptDisclosuresAfterPrivacy: ", and to receive electronic communication about my accounts and services per {bankName}'s ",
43
+ electronicCommunication: "Electronic Communications Agreement",
44
+ acceptDisclosuresAfterElectronic: ", and acknowledge receipt of {bankName}'s ",
45
+ patriotAct: "USA PATRIOT Act disclosure.",
46
+ consentRequiredError: "Tick this box to continue.",
47
+ companyStructureOptions: {
48
+ CORPORATION_PUBLIC: "Public corporation",
49
+ CORPORATION_PRIVATE: "Private corporation",
50
+ CORPORATION_NOT_FOR_PROFIT: "Not-for-profit corporation",
51
+ LLC: "Limited liability company (LLC)",
52
+ LLP: "Limited liability partnership (LLP)",
53
+ PARTNERSHIP: "Partnership",
54
+ SOLE_PROPRIETORSHIP: "Sole proprietorship",
55
+ GOVERNMENT: "Government",
56
+ COOPERATIVE: "Cooperative",
57
+ ASSOCIATION: "Association",
58
+ OTHER: "Other"
59
+ }
40
60
  };
41
- export { t as PERSONAL_DETAILS_LABELS_EN };
61
+ export { n as BUSINESS_DETAILS_LABELS_EN, t as interpolateBankName };
@@ -1,8 +1,41 @@
1
+ import { IDENTIFIER_ON_FILE_TEMPLATE_EN as e } from "./index8.js";
1
2
  // ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index13.js
2
- var e = {
3
- title: "Business bank account application",
4
- bankDisclosure: "",
5
- chipLabel: "Application status",
6
- body: []
3
+ var t = {
4
+ heading: "Tell us about yourself",
5
+ subheading: "We need this information to verify your identity.",
6
+ requiredFieldsNote: "Required fields are marked with an asterisk *",
7
+ requiredFieldMarker: " *",
8
+ firstName: "First name",
9
+ lastName: "Last name",
10
+ dateOfBirth: "Date of birth",
11
+ dateOfBirthPlaceholder: "MM/DD/YYYY",
12
+ dateOfBirthHint: "For example, 04/23/1985",
13
+ dateOfBirthInvalidError: "Enter a valid date of birth",
14
+ dateOfBirthMinAgeError: "Must be at least 18 years old",
15
+ ssn: "SSN",
16
+ ssnOnFileTemplate: e,
17
+ ssnInvalid: "SSN must be 9 digits",
18
+ ssnShow: "Show",
19
+ ssnHide: "Hide",
20
+ homeAddress: "Home address",
21
+ city: "City",
22
+ state: "State",
23
+ statePlaceholder: "Select state",
24
+ zipCode: "Postal code",
25
+ zipCodeInvalid: "Postal code must be 5 digits",
26
+ mobilePhoneNumber: "Phone",
27
+ mobilePhoneNumberInvalid: "Phone must be 10 digits",
28
+ workEmail: "Work email",
29
+ workEmailInvalid: "Enter a valid email address",
30
+ requiredFieldError: "This field is required",
31
+ invalidFieldError: "Enter a valid value",
32
+ ownsOver25Question: "Do you own 25% or more of the business?",
33
+ ownsOver25SummaryLabel: "Owns 25% or more of the business",
34
+ ownsOver25Yes: "Yes",
35
+ ownsOver25No: "No",
36
+ ownershipPercentage: "Ownership share (minimum 25%)",
37
+ ownershipPercentagePlaceholder: "e.g., 25",
38
+ ownershipPercentageRangeError: "Enter 25 to 100, or select No above if you own less than 25%.",
39
+ percentSuffix: "%"
7
40
  };
8
- export { e as APPLICATION_STATUS_CARD_LABELS_EN };
41
+ export { t as PERSONAL_DETAILS_LABELS_EN };