@tesouro/embedded-components-react 0.7.41 → 0.7.42

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 (33) hide show
  1. package/dist/index.css +11 -0
  2. package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/mocks/acceptDisclosures.js +33 -28
  3. package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/mocks/labels.js +6 -2
  4. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/BankAccountOnboardingWidget.js +2 -2
  5. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/BusinessDetailsStep.js +2 -2
  6. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/PersonalDetailsStep.js +1 -1
  7. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/businessDetailsPanelMapping.js +1 -1
  8. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/personalDetailsPanelMapping.js +1 -1
  9. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/mocks/bankAccountOnboarding.js +40 -22
  10. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/mocks/labels.js +14 -2
  11. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index.js +8 -10
  12. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index17.js +274 -2
  13. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index18.js +30 -4
  14. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index19.js +21 -272
  15. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index20.js +65 -26
  16. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index21.js +341 -21
  17. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index22.js +27 -65
  18. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index23.js +26 -341
  19. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index24.js +72 -27
  20. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index25.js +85 -26
  21. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index26.js +8 -74
  22. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index27.js +55 -83
  23. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index28.js +7 -6
  24. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index29.js +42 -37
  25. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/mocks/expenseManagement.js +163 -140
  26. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/mocks/labels.js +22 -16
  27. package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/mocks/labels.js +12 -0
  28. package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/mocks/settings.js +255 -88
  29. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  30. package/dist/scenarios/index.d.ts +1 -1
  31. package/package.json +1 -1
  32. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index30.js +0 -11
  33. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index31.js +0 -64
package/dist/index.css CHANGED
@@ -1674,11 +1674,22 @@
1674
1674
  .ttw\:border-collapse {
1675
1675
  border-collapse: collapse;
1676
1676
  }
1677
+ .ttw\:border-separate {
1678
+ border-collapse: separate;
1679
+ }
1677
1680
  .ttw\:border-spacing-0 {
1678
1681
  --tw-border-spacing-x: 0px;
1679
1682
  --tw-border-spacing-y: 0px;
1680
1683
  border-spacing: var(--tw-border-spacing-x) var(--tw-border-spacing-y);
1681
1684
  }
1685
+ .ttw\:border-spacing-x-6 {
1686
+ --tw-border-spacing-x: calc(var(--ttw-spacing) * 6);
1687
+ border-spacing: var(--tw-border-spacing-x) var(--tw-border-spacing-y);
1688
+ }
1689
+ .ttw\:border-spacing-y-2 {
1690
+ --tw-border-spacing-y: calc(var(--ttw-spacing) * 2);
1691
+ border-spacing: var(--tw-border-spacing-x) var(--tw-border-spacing-y);
1692
+ }
1682
1693
  .ttw\:origin-\(--radix-dropdown-menu-content-transform-origin\) {
1683
1694
  transform-origin: var(--radix-dropdown-menu-content-transform-origin);
1684
1695
  }
@@ -1,62 +1,67 @@
1
1
  import { A_DISCLOSURES_SET as e, A_DISCLOSURE_ACCEPTANCE as t, NO_DISCLOSURES_OWED as n } from "../../../../shared/data-access-mocks/dist/lib/fixtures.js";
2
- import { IDENTITY as r, endpoint as i, initRoute as a, json as o, problem as s } from "../../../../shared/data-access-mocks/dist/mocks/scenarios/scenario.js";
3
- import { ACCEPT_DISCLOSURES_LABELS as c } from "./labels.js";
2
+ import { IDENTITY as r, LOADING_DELAY_MS as i, endpoint as a, initRoute as o, json as s, problem as c, wait as l } from "../../../../shared/data-access-mocks/dist/mocks/scenarios/scenario.js";
3
+ import { ACCEPT_DISCLOSURES_LABELS as u } from "./labels.js";
4
4
  //#region ../../libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/mocks/acceptDisclosures.js
5
- var l = "/api/widget-gateway/disclosure-acceptance", u = `${r}/disclosures`, d = {
5
+ var d = "/api/widget-gateway/disclosure-acceptance", f = `${r}/disclosures`, p = {
6
6
  status: "INVITED",
7
7
  disclosuresRequired: "REQUIRED",
8
8
  disclosuresAccepted: !1,
9
9
  vspName: "Example Payments",
10
10
  bankName: "Example Bank"
11
- }, f = {
11
+ }, m = {
12
12
  status: "ACTIVE",
13
13
  disclosuresAccepted: !0
14
14
  };
15
15
  if (!e.disclosures?.[0]) throw Error("A_DISCLOSURES_SET has no PERSON disclosure");
16
- var p = (e) => ({
16
+ var h = (e) => ({
17
17
  ...e,
18
18
  disclosures: e.disclosures?.map((e) => ({
19
19
  ...e,
20
20
  accepted: !0
21
21
  }))
22
- }), m = n, h = ({ init: e, read: n, accept: r }) => () => {
23
- let s = !1, c = 0;
22
+ }), g = n, _ = ({ init: e, read: n, accept: r, acceptDelayMs: i }) => () => {
23
+ let c = !1, u = 0;
24
24
  return [
25
- (t) => a([], {
25
+ (t) => o([], {
26
26
  ...e,
27
- ...s ? f : {}
27
+ ...c ? m : {}
28
28
  })(t),
29
- i("GET", u, () => {
29
+ a("GET", f, () => {
30
30
  let e = n();
31
- return e instanceof Response ? e : o(s ? p(e) : e);
31
+ return e instanceof Response ? e : s(c ? h(e) : e);
32
32
  }),
33
- i("POST", l, () => (c += 1, r?.(c) || (s = !0, o(t))))
33
+ a("POST", d, async () => (i && await l(i), u += 1, r?.(u) || (c = !0, s(t))))
34
34
  ];
35
- }, g = (e, t) => ({
35
+ }, v = (e, t) => ({
36
36
  key: e,
37
- ...c.scenarios[e],
38
- routes: h(t)
39
- }), _ = [
40
- g("default", {
41
- init: d,
37
+ ...u.scenarios[e],
38
+ routes: _(t)
39
+ }), y = [
40
+ v("default", {
41
+ init: p,
42
42
  read: () => e
43
43
  }),
44
- g("nothing-owed", {
44
+ v("nothing-owed", {
45
45
  init: {
46
- ...d,
46
+ ...p,
47
47
  disclosuresRequired: "NOT_REQUIRED"
48
48
  },
49
- read: () => m
49
+ read: () => g
50
50
  }),
51
- g("read-failed", {
52
- init: d,
53
- read: () => s(503, "Service Unavailable", "The disclosures service is unavailable.")
51
+ v("read-failed", {
52
+ init: p,
53
+ read: () => c(503, "Service Unavailable", "The disclosures service is unavailable.")
54
54
  }),
55
- g("accept-failed", {
56
- init: d,
55
+ v("accept-failed", {
56
+ init: p,
57
57
  read: () => e,
58
- accept: (e) => e === 1 ? s(503, "Service Unavailable", "Your acceptance could not be recorded right now. Try again in a moment.") : void 0
58
+ accept: (e) => e === 1 ? c(503, "Service Unavailable", "Your acceptance could not be recorded right now. Try again in a moment.") : void 0
59
+ }),
60
+ v("accepting", {
61
+ init: p,
62
+ read: () => e,
63
+ acceptDelayMs: i
59
64
  })
60
65
  ];
61
66
  //#endregion
62
- export { l as DISCLOSURE_ACCEPTANCE, _ as acceptDisclosuresScenarios };
67
+ export { d as DISCLOSURE_ACCEPTANCE, y as acceptDisclosuresScenarios };
@@ -10,11 +10,15 @@ var e = { scenarios: {
10
10
  },
11
11
  "read-failed": {
12
12
  label: "Documents fail to load",
13
- blurb: "The documents read fails with a 503, so the widget shows its own error with the API’s detail. Try again re-issues the read, which fails again."
13
+ blurb: "The documents read fails with a 503, so the widget shows its own load error in place of the agreement. Try again re-issues the read, which fails again."
14
14
  },
15
15
  "accept-failed": {
16
16
  label: "Accept fails",
17
- blurb: "The acceptance write fails with a 503 on the first press. The error appears under Accept with the API’s detail and the form stays usable; press Accept again and it goes through."
17
+ blurb: "The acceptance write fails with a 503 on the first press. The widget’s own error appears under Accept and the form stays usable; press Accept again and it goes through."
18
+ },
19
+ accepting: {
20
+ label: "Accept in progress",
21
+ blurb: "The acceptance write is held. Tick the agreement and press Accept: the checkbox and Accept lock and Accept shows its busy state for as long as the write is outstanding."
18
22
  }
19
23
  } };
20
24
  //#endregion
@@ -25,8 +25,8 @@ import { ADDITIONAL_OWNERS_LABELS_EN as fe } from "../../../../ui/dist/index6.js
25
25
  import { interpolateBankName as pe } from "../../../../ui/dist/index8.js";
26
26
  import { ApplicationStatusCard as me } from "../../../../ui/dist/index11.js";
27
27
  import { ResultStep as he } from "../../../../ui/dist/index15.js";
28
- import { UnsavedApplicationDialog as ge } from "../../../../ui/dist/index29.js";
29
- import { DeleteApplicationDialog as _e } from "../../../../ui/dist/index31.js";
28
+ import { UnsavedApplicationDialog as ge } from "../../../../ui/dist/index27.js";
29
+ import { DeleteApplicationDialog as _e } from "../../../../ui/dist/index29.js";
30
30
  import "../../../../ui/dist/index.js";
31
31
  import { DEFAULT_LABELS as p } from "./labels.js";
32
32
  import { OnboardingApplicationView as ve, applicationStatusNoticeFor as ye, hiddenViewReason as be, isNoticeView as xe, mergeApplicationStatusLabels as Se, onboardingApplicationViewFor as Ce } from "./applicationStatusView.js";
@@ -2,8 +2,8 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { BusinessDetailsPanel as e } from "../../../../ui/dist/index22.js";
6
- import { BusinessDisclosuresSection as t } from "../../../../ui/dist/index27.js";
5
+ import { BusinessDetailsPanel as e } from "../../../../ui/dist/index20.js";
6
+ import { BusinessDisclosuresSection as t } from "../../../../ui/dist/index25.js";
7
7
  import "../../../../ui/dist/index.js";
8
8
  import { bankAccountOnboardingTestIds as n } from "./testIds.js";
9
9
  import { ALWAYS_CHECK as r, buildBusinessDetailsPanelFieldsSchema as i, buildBusinessDetailsSchema as a, isTaxIdSatisfied as o } from "./stepSchemas.js";
@@ -2,7 +2,7 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { AboutYouPanel as e } from "../../../../ui/dist/index26.js";
5
+ import { AboutYouPanel as e } from "../../../../ui/dist/index24.js";
6
6
  import "../../../../ui/dist/index.js";
7
7
  import { bankAccountOnboardingTestIds as t } from "./testIds.js";
8
8
  import { getMaxBirthDate as n } from "./fieldInput/maxBirthDate.js";
@@ -1,5 +1,5 @@
1
1
  import { BUSINESS_DETAILS_LABELS_EN as e } from "../../../../ui/dist/index8.js";
2
- import { BUSINESS_DETAILS_PANEL_LABELS_EN as t } from "../../../../ui/dist/index21.js";
2
+ import { BUSINESS_DETAILS_PANEL_LABELS_EN as t } from "../../../../ui/dist/index19.js";
3
3
  import "../../../../ui/dist/index.js";
4
4
  import { maskIdentifierLast4 as n } from "./fieldInput/maskIdentifierLast4.js";
5
5
  import { storedIdentifierFieldDisplay as r, usableStoredTaxIdLast4 as i } from "./fieldInput/storedIdentifier.js";
@@ -1,5 +1,5 @@
1
1
  import { PERSONAL_DETAILS_LABELS_EN as e } from "../../../../ui/dist/index9.js";
2
- import { ABOUT_YOU_PANEL_LABELS_EN as t } from "../../../../ui/dist/index25.js";
2
+ import { ABOUT_YOU_PANEL_LABELS_EN as t } from "../../../../ui/dist/index23.js";
3
3
  import "../../../../ui/dist/index.js";
4
4
  import { maskIdentifierLast4 as n } from "./fieldInput/maskIdentifierLast4.js";
5
5
  import { storedIdentifierFieldDisplay as r } from "./fieldInput/storedIdentifier.js";
@@ -28,44 +28,62 @@ var m = `${a}/bank-account-applications`, h = `${m}/:id`, g = `${a}/application-
28
28
  submittedAt: null,
29
29
  applicantFirstName: "Jordan",
30
30
  applicantLastName: "Lee"
31
- }, w = ({ draft: a, approves: u, others: d = [] }) => () => {
32
- let f = a ?? null, p = "DRAFT", b = 0, x = "cs_demo_application_secret", C = () => f ? (p === "SUBMITTED" && u && (b += 1, b > 2 && (p = "COMPLETE")), [S(f, p, p === "DRAFT" ? x : null), ...d]) : d;
31
+ }, w = 864e5, T = (e) => (/* @__PURE__ */ new Date(Date.now() - e * w)).toISOString(), E = (e, t = {}) => ({
32
+ ...S(x, e, null),
33
+ submittedAt: T(5),
34
+ updatedAt: T(e === "DENIED" ? 2 : 5),
35
+ ...t
36
+ }), D = ({ draft: a, approves: d, others: f = [], settled: p, failsFirstSubmit: b = !1 }) => () => {
37
+ let x = a ?? null, C = p?.(), w = 0, T = "DRAFT", E = 0, D = "cs_demo_application_secret", k = () => C ? [C, ...f] : x ? (T === "SUBMITTED" && d && (E += 1, E > 2 && (T = "COMPLETE")), [S(x, T, T === "DRAFT" ? D : null), ...f]) : f;
33
38
  return [
34
- (e) => s([], p === "COMPLETE" ? y : v)(e),
35
- o("GET", g, () => c({ applications: C() })),
39
+ (e) => s([], T === "COMPLETE" ? y : v)(e),
40
+ o("GET", g, () => c({ applications: k() })),
36
41
  o("GET", `${i}/disclosures`, () => c(n)),
37
42
  o("POST", _, () => c(r)),
38
- o("POST", m, () => (f = e, p = "DRAFT", c({
39
- ...f,
40
- clientSecret: x
43
+ o("POST", m, () => (x = e, T = "DRAFT", c({
44
+ ...x,
45
+ clientSecret: D
41
46
  }, 201))),
42
- o("GET", h, () => f ? c(f) : T()),
43
- o("PATCH", h, () => f ? c(f) : T()),
44
- o("POST", `${h}/submission`, () => f ? (p = "SUBMITTED", b = 0, c({
45
- ...f,
46
- status: p,
47
+ o("GET", h, () => x ? c(x) : O()),
48
+ o("PATCH", h, () => x ? c(x) : O()),
49
+ o("POST", `${h}/submission`, () => x ? (w += 1, b && w === 1 ? u(503, "Service Unavailable", "The application could not be submitted right now.") : (T = "SUBMITTED", E = 0, c({
50
+ ...x,
51
+ status: T,
47
52
  submittedAt: t.submittedAt
48
- })) : T()),
49
- o("DELETE", h, () => (p = "DELETED", l()))
53
+ }))) : O()),
54
+ o("DELETE", h, () => (T = "DELETED", l()))
50
55
  ];
51
- }, T = () => u(404, "Not Found", "No such bank account application."), E = (e, t) => ({
56
+ }, O = () => u(404, "Not Found", "No such bank account application."), k = (e, t) => ({
52
57
  key: e,
53
58
  ...p.scenarios[e],
54
- routes: w(t)
55
- }), D = [
56
- E("default", { approves: !0 }),
57
- E("resume-draft", {
59
+ routes: D(t)
60
+ }), A = [
61
+ k("default", { approves: !0 }),
62
+ k("resume-draft", {
58
63
  draft: x,
59
64
  approves: !0
60
65
  }),
61
- E("under-review", {
66
+ k("under-review", {
62
67
  draft: x,
63
68
  approves: !1
64
69
  }),
65
- E("colleague-applied", {
70
+ k("colleague-applied", {
66
71
  approves: !0,
67
72
  others: [C]
73
+ }),
74
+ k("submit-failed", {
75
+ draft: x,
76
+ approves: !0,
77
+ failsFirstSubmit: !0
78
+ }),
79
+ k("awaiting-review", {
80
+ approves: !1,
81
+ settled: () => E("SUBMITTED")
82
+ }),
83
+ k("denied", {
84
+ approves: !1,
85
+ settled: () => E("DENIED", { deniedAt: T(2) })
68
86
  })
69
87
  ];
70
88
  //#endregion
71
- export { D as bankAccountOnboardingScenarios };
89
+ export { A as bankAccountOnboardingScenarios };
@@ -13,8 +13,20 @@ var e = { scenarios: {
13
13
  blurb: "The same prefilled draft, but the bank does not decide while the widget waits. Tick the disclosures, press Next twice and Submit: the widget polls every two seconds for about 30 seconds and then says the applicant is getting close and will be emailed."
14
14
  },
15
15
  "colleague-applied": {
16
- label: "Hidden after a colleague applied",
17
- blurb: "Another member of the organization already has an application in progress. The organization can hold only one, so the widget renders nothing at all."
16
+ label: "A colleague’s application in progress",
17
+ blurb: "Another member of the organization already has an application in progress. The organization can hold only one, so instead of the form the widget shows an “Application in progress” card explaining that only the person who started it can finish it."
18
+ },
19
+ "submit-failed": {
20
+ label: "Submission fails",
21
+ blurb: "The same prefilled draft, but the first submission fails with a 503. Tick the disclosures, press Next twice and Submit: the error appears above the footer buttons and everything entered stays in place. Press Submit again and it goes through."
22
+ },
23
+ "awaiting-review": {
24
+ label: "Returning while under review",
25
+ blurb: "The applicant submitted their application a few days ago and the bank has not decided yet. Instead of the form the widget shows an “Under review” card with the submission date and what happens next."
26
+ },
27
+ denied: {
28
+ label: "Application not approved",
29
+ blurb: "The bank denied the applicant’s application two days ago. Instead of the form the widget shows a “Not approved” card with the denial date; the card stops showing 30 days after the denial."
18
30
  }
19
31
  } };
20
32
  //#endregion
@@ -6,15 +6,13 @@ import "./index10.js";
6
6
  import { ApplicationStatusCard as a, ApplicationStatusTone as o } from "./index11.js";
7
7
  import { ResultStep as s } from "./index15.js";
8
8
  import { RESULT_LABELS_EN as c } from "./index16.js";
9
- import "./index17.js";
10
- import "./index18.js";
11
- import { BUSINESS_DETAILS_PANEL_LABELS_EN as l } from "./index21.js";
12
- import { BusinessDetailsPanel as u } from "./index22.js";
13
- import { ABOUT_YOU_PANEL_LABELS_EN as d } from "./index25.js";
14
- import { AboutYouPanel as f } from "./index26.js";
15
- import { BusinessDisclosuresSection as p } from "./index27.js";
9
+ import { BUSINESS_DETAILS_PANEL_LABELS_EN as l } from "./index19.js";
10
+ import { BusinessDetailsPanel as u } from "./index20.js";
11
+ import { ABOUT_YOU_PANEL_LABELS_EN as d } from "./index23.js";
12
+ import { AboutYouPanel as f } from "./index24.js";
13
+ import { BusinessDisclosuresSection as p } from "./index25.js";
14
+ import "./index26.js";
15
+ import { UnsavedApplicationDialog as m } from "./index27.js";
16
16
  import "./index28.js";
17
- import { UnsavedApplicationDialog as m } from "./index29.js";
18
- import "./index30.js";
19
- import { DeleteApplicationDialog as h } from "./index31.js";
17
+ import { DeleteApplicationDialog as h } from "./index29.js";
20
18
  export { d as ABOUT_YOU_PANEL_LABELS_EN, e as ADDITIONAL_OWNERS_LABELS_EN, f as AboutYouPanel, t as AdditionalOwnersForm, a as ApplicationStatusCard, o as ApplicationStatusTone, n as BUSINESS_DETAILS_LABELS_EN, l as BUSINESS_DETAILS_PANEL_LABELS_EN, u as BusinessDetailsPanel, p as BusinessDisclosuresSection, h as DeleteApplicationDialog, i as PERSONAL_DETAILS_LABELS_EN, c as RESULT_LABELS_EN, s as ResultStep, m as UnsavedApplicationDialog, r as interpolateBankName };
@@ -1,2 +1,274 @@
1
- import "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import "react/jsx-runtime";
1
+ import { Combobox as e, Input as t, Label as n, Select as r, SelectContent as i, SelectItem as a, SelectTrigger as o, SelectValue as s } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { FieldError as c, fieldErrorAria as l, onCompositeBlur as u, selectBlurHandlers as d } from "./index3.js";
3
+ import { jsx as f, jsxs as p } from "react/jsx-runtime";
4
+ //#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index17.js
5
+ function m({ htmlFor: e, children: t }) {
6
+ return /* @__PURE__ */ f(n, {
7
+ htmlFor: e,
8
+ className: "ttw:mb-1 ttw:block ttw:text-sm ttw:font-medium",
9
+ children: t
10
+ });
11
+ }
12
+ var h = "ttw:w-full";
13
+ function g({ fields: n, testIds: g, labels: _, isDisabled: v, taxIdRequired: y, taxIdPlaceholder: b, taxIdHelpText: x }) {
14
+ let S = d(n.state.onBlur), C = d(n.companyStructure.onBlur);
15
+ return /* @__PURE__ */ p("section", {
16
+ className: "ttw:flex ttw:flex-col ttw:gap-3",
17
+ "data-testid": g?.root,
18
+ children: [
19
+ /* @__PURE__ */ p("div", { children: [
20
+ /* @__PURE__ */ f(m, {
21
+ htmlFor: "companyLegalName",
22
+ children: _.companyLegalName
23
+ }),
24
+ /* @__PURE__ */ f(t, {
25
+ id: "companyLegalName",
26
+ value: n.companyLegalName.value,
27
+ onChange: (e) => n.companyLegalName.onValueChange(e.target.value),
28
+ onBlur: n.companyLegalName.onBlur,
29
+ ...l("companyLegalName", n.companyLegalName.error),
30
+ disabled: v,
31
+ required: !0
32
+ }),
33
+ /* @__PURE__ */ f(c, {
34
+ fieldId: "companyLegalName",
35
+ error: n.companyLegalName.error
36
+ })
37
+ ] }),
38
+ /* @__PURE__ */ p("div", { children: [
39
+ /* @__PURE__ */ f(m, {
40
+ htmlFor: "companyDbaName",
41
+ children: _.companyDbaName
42
+ }),
43
+ /* @__PURE__ */ f(t, {
44
+ id: "companyDbaName",
45
+ value: n.companyDbaName.value,
46
+ onChange: (e) => n.companyDbaName.onValueChange(e.target.value),
47
+ onBlur: n.companyDbaName.onBlur,
48
+ ...l("companyDbaName", n.companyDbaName.error),
49
+ disabled: v
50
+ }),
51
+ /* @__PURE__ */ f(c, {
52
+ fieldId: "companyDbaName",
53
+ error: n.companyDbaName.error
54
+ })
55
+ ] }),
56
+ /* @__PURE__ */ p("div", { children: [
57
+ /* @__PURE__ */ f(m, {
58
+ htmlFor: "businessAddress",
59
+ children: _.businessAddress
60
+ }),
61
+ /* @__PURE__ */ f(t, {
62
+ id: "businessAddress",
63
+ value: n.businessAddress.value,
64
+ onChange: (e) => n.businessAddress.onValueChange(e.target.value),
65
+ onBlur: n.businessAddress.onBlur,
66
+ ...l("businessAddress", n.businessAddress.error),
67
+ disabled: v,
68
+ required: !0
69
+ }),
70
+ /* @__PURE__ */ f(c, {
71
+ fieldId: "businessAddress",
72
+ error: n.businessAddress.error
73
+ })
74
+ ] }),
75
+ /* @__PURE__ */ p("div", {
76
+ className: "ttw:grid ttw:grid-cols-3 ttw:gap-4",
77
+ children: [
78
+ /* @__PURE__ */ p("div", {
79
+ className: "ttw:min-w-0",
80
+ children: [
81
+ /* @__PURE__ */ f(m, {
82
+ htmlFor: "city",
83
+ children: _.city
84
+ }),
85
+ /* @__PURE__ */ f(t, {
86
+ id: "city",
87
+ value: n.city.value,
88
+ onChange: (e) => n.city.onValueChange(e.target.value),
89
+ onBlur: n.city.onBlur,
90
+ ...l("city", n.city.error),
91
+ disabled: v,
92
+ required: !0
93
+ }),
94
+ /* @__PURE__ */ f(c, {
95
+ fieldId: "city",
96
+ error: n.city.error
97
+ })
98
+ ]
99
+ }),
100
+ /* @__PURE__ */ p("div", {
101
+ className: "ttw:min-w-0",
102
+ children: [
103
+ /* @__PURE__ */ f(m, {
104
+ htmlFor: "state",
105
+ children: _.state
106
+ }),
107
+ /* @__PURE__ */ p(r, {
108
+ value: n.state.value,
109
+ onValueChange: n.state.onValueChange,
110
+ onOpenChange: S.onOpenChange,
111
+ disabled: v,
112
+ children: [/* @__PURE__ */ f(o, {
113
+ id: "state",
114
+ className: h,
115
+ onBlur: S.onTriggerBlur,
116
+ ...l("state", n.state.error),
117
+ children: /* @__PURE__ */ f(s, { placeholder: _.statePlaceholder })
118
+ }), /* @__PURE__ */ f(i, { children: n.state.options.map((e) => /* @__PURE__ */ f(a, {
119
+ value: e.value,
120
+ children: e.label
121
+ }, e.value)) })]
122
+ }),
123
+ /* @__PURE__ */ f(c, {
124
+ fieldId: "state",
125
+ error: n.state.error
126
+ })
127
+ ]
128
+ }),
129
+ /* @__PURE__ */ p("div", {
130
+ className: "ttw:min-w-0",
131
+ children: [
132
+ /* @__PURE__ */ f(m, {
133
+ htmlFor: "zipCode",
134
+ children: _.zipCode
135
+ }),
136
+ /* @__PURE__ */ f(t, {
137
+ id: "zipCode",
138
+ value: n.zipCode.value,
139
+ onChange: (e) => n.zipCode.onValueChange(e.target.value),
140
+ onBlur: n.zipCode.onBlur,
141
+ ...l("zipCode", n.zipCode.error),
142
+ disabled: v,
143
+ required: !0,
144
+ inputMode: "numeric"
145
+ }),
146
+ /* @__PURE__ */ f(c, {
147
+ fieldId: "zipCode",
148
+ error: n.zipCode.error
149
+ })
150
+ ]
151
+ })
152
+ ]
153
+ }),
154
+ /* @__PURE__ */ p("div", { children: [
155
+ /* @__PURE__ */ f(m, {
156
+ htmlFor: "companyPhoneNumber",
157
+ children: _.companyPhoneNumber
158
+ }),
159
+ /* @__PURE__ */ f(t, {
160
+ id: "companyPhoneNumber",
161
+ type: "tel",
162
+ value: n.companyPhoneNumber.value,
163
+ onChange: (e) => n.companyPhoneNumber.onValueChange(e.target.value),
164
+ onBlur: n.companyPhoneNumber.onBlur,
165
+ ...l("companyPhoneNumber", n.companyPhoneNumber.error),
166
+ disabled: v,
167
+ required: !0
168
+ }),
169
+ /* @__PURE__ */ f(c, {
170
+ fieldId: "companyPhoneNumber",
171
+ error: n.companyPhoneNumber.error
172
+ })
173
+ ] }),
174
+ /* @__PURE__ */ p("div", { children: [
175
+ /* @__PURE__ */ f(m, {
176
+ htmlFor: "companyStructure",
177
+ children: _.companyStructure
178
+ }),
179
+ /* @__PURE__ */ p(r, {
180
+ value: n.companyStructure.value,
181
+ onValueChange: n.companyStructure.onValueChange,
182
+ onOpenChange: C.onOpenChange,
183
+ disabled: v,
184
+ children: [/* @__PURE__ */ f(o, {
185
+ id: "companyStructure",
186
+ className: h,
187
+ onBlur: C.onTriggerBlur,
188
+ ...l("companyStructure", n.companyStructure.error),
189
+ children: /* @__PURE__ */ f(s, { placeholder: _.companyStructurePlaceholder })
190
+ }), /* @__PURE__ */ f(i, { children: n.companyStructure.options.map((e) => /* @__PURE__ */ f(a, {
191
+ value: e.value,
192
+ children: e.label
193
+ }, e.value)) })]
194
+ }),
195
+ /* @__PURE__ */ f(c, {
196
+ fieldId: "companyStructure",
197
+ error: n.companyStructure.error
198
+ })
199
+ ] }),
200
+ /* @__PURE__ */ p("div", { children: [
201
+ /* @__PURE__ */ f(m, {
202
+ htmlFor: "website",
203
+ children: _.website
204
+ }),
205
+ /* @__PURE__ */ f(t, {
206
+ id: "website",
207
+ type: "url",
208
+ value: n.website.value,
209
+ onChange: (e) => n.website.onValueChange(e.target.value),
210
+ onBlur: n.website.onBlur,
211
+ ...l("website", n.website.error),
212
+ disabled: v
213
+ }),
214
+ /* @__PURE__ */ f(c, {
215
+ fieldId: "website",
216
+ error: n.website.error
217
+ })
218
+ ] }),
219
+ /* @__PURE__ */ p("div", { children: [
220
+ /* @__PURE__ */ f(m, {
221
+ htmlFor: "taxId",
222
+ children: _.taxId
223
+ }),
224
+ /* @__PURE__ */ f(t, {
225
+ id: "taxId",
226
+ value: n.taxId.value,
227
+ onChange: (e) => n.taxId.onValueChange(e.target.value),
228
+ onBlur: n.taxId.onBlur,
229
+ disabled: v,
230
+ required: y,
231
+ inputMode: "numeric",
232
+ maxLength: 9,
233
+ placeholder: b,
234
+ ...l("taxId", n.taxId.error, x ? "taxId-on-file" : void 0)
235
+ }),
236
+ /* @__PURE__ */ f(c, {
237
+ fieldId: "taxId",
238
+ error: n.taxId.error
239
+ }),
240
+ x ? /* @__PURE__ */ f("p", {
241
+ id: "taxId-on-file",
242
+ className: "ttw:mt-1 ttw:text-xs ttw:text-muted-foreground",
243
+ children: x
244
+ }) : null
245
+ ] }),
246
+ /* @__PURE__ */ p("div", { children: [
247
+ /* @__PURE__ */ f(m, {
248
+ htmlFor: "naicsCode",
249
+ children: _.naicsCode
250
+ }),
251
+ /* @__PURE__ */ f(e, {
252
+ inputId: "naicsCode",
253
+ "data-testid": g?.naicsCombobox,
254
+ invalid: !!n.naicsCode.error,
255
+ describedBy: l("naicsCode", n.naicsCode.error)["aria-describedby"],
256
+ onBlur: u(n.naicsCode.onBlur),
257
+ items: n.naicsCode.options,
258
+ value: n.naicsCode.value,
259
+ onValueChange: (e) => {
260
+ n.naicsCode.onValueChange(Array.isArray(e) ? e[0] ?? "" : e);
261
+ },
262
+ labels: { placeholder: _.naicsCodePlaceholder },
263
+ disabled: v
264
+ }),
265
+ /* @__PURE__ */ f(c, {
266
+ fieldId: "naicsCode",
267
+ error: n.naicsCode.error
268
+ })
269
+ ] })
270
+ ]
271
+ });
272
+ }
273
+ //#endregion
274
+ export { g as BusinessDetailsEditForm };
@@ -1,4 +1,30 @@
1
- import "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import "react";
3
- import "react/jsx-runtime";
4
- import "@radix-ui/react-use-controllable-state";
1
+ import { Typography as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { Fragment as t, jsx as n, jsxs as r } from "react/jsx-runtime";
3
+ //#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index18.js
4
+ function i({ label: i, value: a, testId: o }) {
5
+ return a ? /* @__PURE__ */ r(t, { children: [/* @__PURE__ */ n(e, {
6
+ component: "span",
7
+ variant: "body2",
8
+ className: "ttw:text-muted-foreground",
9
+ children: i
10
+ }), /* @__PURE__ */ n(e, {
11
+ component: "span",
12
+ variant: "body2",
13
+ "data-testid": o,
14
+ className: "ttw:min-w-0 ttw:wrap-break-word ttw:whitespace-pre-line ttw:text-left ttw:font-medium ttw:text-foreground",
15
+ children: a
16
+ })] }) : null;
17
+ }
18
+ function a({ rows: e, testIds: t }) {
19
+ return /* @__PURE__ */ n("div", {
20
+ className: "ttw:grid ttw:grid-cols-[max-content_1fr] ttw:gap-x-4 ttw:gap-y-2",
21
+ "data-testid": t?.root,
22
+ children: e.map((e) => /* @__PURE__ */ n(i, {
23
+ label: e.label,
24
+ value: e.value,
25
+ testId: e.testId
26
+ }, e.testId ?? e.label))
27
+ });
28
+ }
29
+ //#endregion
30
+ export { a as BusinessDetailsSummary };