@tesouro/embedded-components-react 0.5.28 → 0.5.31

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 (118) hide show
  1. package/README.md +14 -13
  2. package/dist/index.css +15 -0
  3. package/dist/index.d.ts +9 -0
  4. package/dist/index.js +1 -1
  5. package/dist/lib/BankAccountOnboardingWidget.d.ts +9 -0
  6. package/dist/lib/BillPayWidget.js +1 -1
  7. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index18.js +155 -151
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index.js +5 -5
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index14.js +2 -44
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +7 -7
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index12.js +1 -1
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +1 -1
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +2 -2
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +2 -2
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +52 -67
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +15 -12
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +57 -62
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +1 -1
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +68 -207
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +278 -175
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +13 -126
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +47 -12
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +53 -47
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +204 -49
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +32 -202
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +234 -32
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +21 -240
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +532 -19
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +4 -436
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +42 -4
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +230 -35
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +3 -233
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +4 -3
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +44 -2
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +1 -46
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +8 -1
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +11 -6
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +127 -11
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +3 -129
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +127 -3
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +8 -124
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +7 -8
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +46 -8
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +18 -43
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +28 -20
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +82 -27
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index79.js +47 -83
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index80.js +250 -47
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +122 -241
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js +206 -126
  51. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index83.js +3 -213
  52. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index84.js +8 -4
  53. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index85.js +113 -6
  54. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index86.js +1 -115
  55. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index87.js +24 -0
  56. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +39 -33
  57. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index101.js +10 -11
  58. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index102.js +123 -8
  59. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index103.js +2 -170
  60. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index104.js +18 -2
  61. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index105.js +7 -11
  62. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index106.js +158 -96
  63. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index107.js +1 -1
  64. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index108.js +11 -7
  65. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index109.js +100 -44
  66. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index111.js +10 -0
  67. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index112.js +52 -0
  68. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index113.js +2 -0
  69. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index13.js +1 -1
  70. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +20 -22
  71. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index27.js +4 -9
  72. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js +103 -146
  73. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index30.js +3 -2
  74. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index31.js +93 -88
  75. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +15 -16
  76. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index48.js +1 -0
  77. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index50.js +43 -29
  78. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index65.js +55 -51
  79. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index66.js +9 -2
  80. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index67.js +33 -1
  81. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index68.js +2 -8
  82. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index69.js +2 -39
  83. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index70.js +0 -1
  84. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index71.js +6 -2
  85. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index72.js +34 -31
  86. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +2 -37
  87. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index75.js +34 -10
  88. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index76.js +2 -201
  89. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index77.js +39 -3
  90. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index78.js +3 -8
  91. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index79.js +187 -350
  92. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index80.js +3 -10
  93. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index81.js +13 -5
  94. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +356 -85
  95. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index83.js +10 -0
  96. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index84.js +9 -2
  97. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index85.js +87 -119
  98. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index87.js +2 -94
  99. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index88.js +125 -2
  100. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index89.js +25 -4
  101. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index90.js +90 -26
  102. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index92.js +3 -3
  103. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index93.js +26 -30
  104. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index95.js +4 -9
  105. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index96.js +30 -102
  106. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index98.js +9 -14
  107. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index99.js +85 -104
  108. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index.js +5 -5
  109. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/index.js +17 -17
  110. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartDetails.js +4 -0
  111. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartForm.js +92 -87
  112. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  113. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShell.js +126 -105
  114. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShellOverlayPortal.js +13 -6
  115. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +1 -1
  116. package/package.json +1 -1
  117. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index88.js +0 -25
  118. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index86.js +0 -28
@@ -1,52 +1,108 @@
1
- import { AlertDialog as e, AlertDialogContent as t, AlertDialogDescription as n, AlertDialogFooter as r, AlertDialogHeader as i, AlertDialogTitle as a, Button as o } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { UNSAVED_BILL_DIALOG_LABELS_EN as s } from "./index108.js";
3
- import { jsx as c, jsxs as l } from "react/jsx-runtime";
4
- import { XIcon as u } from "lucide-react";
1
+ import { Button as e, Skeleton as t } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { BillUploadDropzone as n } from "./index3.js";
3
+ import "./index5.js";
4
+ import { SOURCE_DOCUMENT_PANEL_LABELS_EN as r } from "./index108.js";
5
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
6
+ import { Download as o, Trash2 as s } from "lucide-react";
5
7
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index109.js
6
- function d({ open: d, onSaveDraft: f, onDiscard: p, onCancel: m, isSaving: h, isSaveDraftDisabled: g, labels: _, testId: v, saveDraftTestId: y, discardTestId: b, closeTestId: x }) {
7
- let S = {
8
- ...s,
9
- ..._
8
+ function c(c) {
9
+ let { mode: l, testId: u, labels: d } = c, f = {
10
+ ...r,
11
+ ...d,
12
+ dropzone: {
13
+ ...r.dropzone,
14
+ ...d?.dropzone
15
+ }
10
16
  };
11
- return /* @__PURE__ */ c(e, {
12
- open: d,
13
- onOpenChange: (e) => {
14
- !e && !h && m();
15
- },
16
- children: /* @__PURE__ */ l(t, {
17
- "data-testid": v,
17
+ if (l === "loading") return /* @__PURE__ */ a("div", {
18
+ className: "ttw:flex ttw:flex-col ttw:gap-3",
19
+ "data-testid": u,
20
+ children: [/* @__PURE__ */ i("div", {
21
+ className: "ttw:flex ttw:items-center ttw:justify-end ttw:gap-1",
22
+ children: /* @__PURE__ */ i("span", {
23
+ "aria-live": "polite",
24
+ className: "ttw:text-sm ttw:text-muted-foreground",
25
+ children: c.fileName ? f.scanningAttachment(c.fileName) : f.scanning
26
+ })
27
+ }), /* @__PURE__ */ a("div", {
28
+ className: "ttw:flex ttw:h-[min(70vh,44rem)] ttw:flex-col ttw:gap-3 ttw:rounded-lg ttw:border ttw:border-border ttw:bg-card ttw:p-4",
18
29
  children: [
19
- /* @__PURE__ */ l("button", {
20
- type: "button",
21
- onClick: m,
22
- disabled: h,
23
- "data-testid": x,
24
- className: "ttw:absolute ttw:right-4 ttw:top-4 ttw:cursor-pointer ttw:rounded-sm ttw:opacity-70 ttw:ring-offset-background ttw:transition-opacity ttw:hover:opacity-100 ttw:focus:outline-hidden ttw:focus:ring-2 ttw:focus:ring-ring ttw:focus:ring-offset-2 ttw:disabled:pointer-events-none",
25
- children: [/* @__PURE__ */ c(u, { className: "ttw:size-4" }), /* @__PURE__ */ c("span", {
26
- className: "ttw:sr-only",
27
- children: S.closeButton
28
- })]
30
+ /* @__PURE__ */ i(t, { className: "ttw:h-6 ttw:w-2/5" }),
31
+ /* @__PURE__ */ i(t, { className: "ttw:h-4 ttw:w-3/5" }),
32
+ /* @__PURE__ */ i(t, { className: "ttw:mt-4 ttw:h-4 ttw:w-full" }),
33
+ /* @__PURE__ */ i(t, { className: "ttw:h-4 ttw:w-full" }),
34
+ /* @__PURE__ */ i(t, { className: "ttw:h-4 ttw:w-4/5" }),
35
+ /* @__PURE__ */ i(t, { className: "ttw:mt-auto ttw:h-24 ttw:w-full" })
36
+ ]
37
+ })]
38
+ });
39
+ if (l === "document") {
40
+ let { fileName: t, preview: n, onDownload: r, onDelete: l, isDeleting: d, deleteErrorMessage: p } = c;
41
+ return /* @__PURE__ */ a("div", {
42
+ className: "ttw:flex ttw:flex-col ttw:gap-3",
43
+ "data-testid": u,
44
+ children: [
45
+ /* @__PURE__ */ a("div", {
46
+ className: "ttw:flex ttw:items-center ttw:justify-end ttw:gap-1",
47
+ children: [
48
+ /* @__PURE__ */ i("span", {
49
+ className: "ttw:text-sm ttw:text-muted-foreground",
50
+ children: f.scannedAttachment(t ?? "")
51
+ }),
52
+ r ? /* @__PURE__ */ i(e, {
53
+ type: "button",
54
+ variant: "ghost",
55
+ size: "icon",
56
+ "aria-label": f.download,
57
+ onClick: r,
58
+ children: /* @__PURE__ */ i(o, { className: "ttw:size-4" })
59
+ }) : null,
60
+ l ? /* @__PURE__ */ i(e, {
61
+ type: "button",
62
+ variant: "ghost",
63
+ size: "icon",
64
+ "aria-label": f.delete,
65
+ disabled: d,
66
+ onClick: l,
67
+ children: /* @__PURE__ */ i(s, { className: "ttw:size-4" })
68
+ }) : null
69
+ ]
29
70
  }),
30
- /* @__PURE__ */ l(i, { children: [/* @__PURE__ */ c(a, { children: S.title }), /* @__PURE__ */ c(n, { children: S.description })] }),
31
- /* @__PURE__ */ l(r, { children: [/* @__PURE__ */ c(o, {
32
- type: "button",
33
- variant: "outline",
34
- onClick: p,
35
- disabled: h,
36
- "data-testid": b,
37
- children: S.discardButton
38
- }), /* @__PURE__ */ c(o, {
39
- type: "button",
40
- variant: "default",
41
- loading: h,
42
- disabled: h || g,
43
- onClick: f,
44
- "data-testid": y,
45
- children: S.saveDraftButton
46
- })] })
71
+ p ? /* @__PURE__ */ i("p", {
72
+ role: "alert",
73
+ className: "ttw:text-sm ttw:text-destructive",
74
+ "data-testid": u ? `${u}-delete-error` : void 0,
75
+ children: p
76
+ }) : null,
77
+ /* @__PURE__ */ i("div", {
78
+ className: "ttw:flex ttw:h-[min(70vh,44rem)] ttw:items-start ttw:justify-center ttw:overflow-auto ttw:rounded-lg ttw:border ttw:border-border ttw:bg-card ttw:p-4",
79
+ children: n
80
+ })
47
81
  ]
48
- })
82
+ });
83
+ }
84
+ return /* @__PURE__ */ a("div", {
85
+ className: "ttw:rounded-lg ttw:border ttw:border-border ttw:bg-card ttw:p-4",
86
+ "data-testid": u,
87
+ children: [
88
+ /* @__PURE__ */ i("p", {
89
+ className: "ttw:mb-3 ttw:text-sm ttw:font-medium ttw:text-foreground",
90
+ children: f.uploadHeading
91
+ }),
92
+ c.noticeMessage ? /* @__PURE__ */ i("p", {
93
+ "aria-live": "polite",
94
+ className: "ttw:mb-3 ttw:text-sm ttw:text-muted-foreground",
95
+ "data-testid": u ? `${u}-notice` : void 0,
96
+ children: c.noticeMessage
97
+ }) : null,
98
+ /* @__PURE__ */ i(n, {
99
+ status: c.uploadStatus,
100
+ errorMessage: c.uploadErrorMessage,
101
+ onFilesSelected: c.onFilesSelected,
102
+ labels: f.dropzone
103
+ })
104
+ ]
49
105
  });
50
106
  }
51
107
  //#endregion
52
- export { d as UnsavedBillDialog, d as default };
108
+ export { c as SourceDocumentPanel, c as default };
@@ -0,0 +1,10 @@
1
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index111.js
2
+ var e = {
3
+ title: "Save this bill as a draft?",
4
+ description: "This bill has changes that have not been saved. Save it as a draft to finish later, or discard the changes.",
5
+ saveDraftButton: "Save as draft",
6
+ discardButton: "Discard changes",
7
+ closeButton: "Close"
8
+ };
9
+ //#endregion
10
+ export { e as UNSAVED_BILL_DIALOG_LABELS_EN };
@@ -0,0 +1,52 @@
1
+ import { AlertDialog as e, AlertDialogContent as t, AlertDialogDescription as n, AlertDialogFooter as r, AlertDialogHeader as i, AlertDialogTitle as a, Button as o } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { UNSAVED_BILL_DIALOG_LABELS_EN as s } from "./index111.js";
3
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
4
+ import { XIcon as u } from "lucide-react";
5
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index112.js
6
+ function d({ open: d, onSaveDraft: f, onDiscard: p, onCancel: m, isSaving: h, isSaveDraftDisabled: g, labels: _, testId: v, saveDraftTestId: y, discardTestId: b, closeTestId: x }) {
7
+ let S = {
8
+ ...s,
9
+ ..._
10
+ };
11
+ return /* @__PURE__ */ c(e, {
12
+ open: d,
13
+ onOpenChange: (e) => {
14
+ !e && !h && m();
15
+ },
16
+ children: /* @__PURE__ */ l(t, {
17
+ "data-testid": v,
18
+ children: [
19
+ /* @__PURE__ */ l("button", {
20
+ type: "button",
21
+ onClick: m,
22
+ disabled: h,
23
+ "data-testid": x,
24
+ className: "ttw:absolute ttw:right-4 ttw:top-4 ttw:cursor-pointer ttw:rounded-sm ttw:opacity-70 ttw:ring-offset-background ttw:transition-opacity ttw:hover:opacity-100 ttw:focus:outline-hidden ttw:focus:ring-2 ttw:focus:ring-ring ttw:focus:ring-offset-2 ttw:disabled:pointer-events-none",
25
+ children: [/* @__PURE__ */ c(u, { className: "ttw:size-4" }), /* @__PURE__ */ c("span", {
26
+ className: "ttw:sr-only",
27
+ children: S.closeButton
28
+ })]
29
+ }),
30
+ /* @__PURE__ */ l(i, { children: [/* @__PURE__ */ c(a, { children: S.title }), /* @__PURE__ */ c(n, { children: S.description })] }),
31
+ /* @__PURE__ */ l(r, { children: [/* @__PURE__ */ c(o, {
32
+ type: "button",
33
+ variant: "outline",
34
+ onClick: p,
35
+ disabled: h,
36
+ "data-testid": b,
37
+ children: S.discardButton
38
+ }), /* @__PURE__ */ c(o, {
39
+ type: "button",
40
+ variant: "default",
41
+ loading: h,
42
+ disabled: h || g,
43
+ onClick: f,
44
+ "data-testid": y,
45
+ children: S.saveDraftButton
46
+ })] })
47
+ ]
48
+ })
49
+ });
50
+ }
51
+ //#endregion
52
+ export { d as UnsavedBillDialog, d as default };
@@ -0,0 +1,2 @@
1
+ import "./index111.js";
2
+ import "./index112.js";
@@ -13,7 +13,7 @@ function c({ view: c, labels: l }) {
13
13
  className: s,
14
14
  children: u.heading
15
15
  }), /* @__PURE__ */ a("div", {
16
- className: "ttw:flex ttw:flex-col ttw:gap-2.5 ttw:rounded-lg ttw:border ttw:border-border ttw:p-4",
16
+ className: "ttw:flex ttw:flex-col ttw:gap-2.5 ttw:rounded-lg ttw:bg-muted ttw:p-4",
17
17
  children: [
18
18
  /* @__PURE__ */ i(t, {
19
19
  variant: "body1",
@@ -1,29 +1,27 @@
1
1
  import { Button as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
2
  import { AchFieldGroup as t } from "../../../shared/counterpart-management/ui/dist/index5.js";
3
3
  import "../../../shared/counterpart-management/ui/dist/index.js";
4
- import { Fragment as n, jsx as r, jsxs as i } from "react/jsx-runtime";
4
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
5
5
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js
6
- function a({ paymentInstructions: a, labels: o, onCancel: s }) {
7
- return /* @__PURE__ */ i(n, { children: [/* @__PURE__ */ r(t, {
8
- idPrefix: "vendor-summary-ach",
9
- values: a.values,
10
- errors: a.errors,
11
- onChange: a.onChange,
12
- labels: o.ach
13
- }), a.onSave ? /* @__PURE__ */ i("div", {
14
- className: "ttw:flex ttw:justify-end ttw:gap-2",
15
- children: [/* @__PURE__ */ r(e, {
16
- type: "button",
17
- variant: "ghost",
18
- onClick: s,
19
- children: o.cancelAction
20
- }), /* @__PURE__ */ r(e, {
21
- type: "button",
22
- loading: a.isSaving,
23
- onClick: a.onSave,
24
- children: o.saveAction
6
+ function i({ paymentInstructions: i, labels: a }) {
7
+ return /* @__PURE__ */ r("div", {
8
+ className: "ttw:flex ttw:flex-col ttw:gap-3",
9
+ children: [/* @__PURE__ */ n(t, {
10
+ idPrefix: "vendor-summary-ach",
11
+ values: i.values,
12
+ errors: i.errors,
13
+ onChange: i.onChange,
14
+ labels: a.ach
15
+ }), /* @__PURE__ */ n("div", {
16
+ className: "ttw:flex ttw:justify-end",
17
+ children: /* @__PURE__ */ n(e, {
18
+ type: "button",
19
+ variant: "outline",
20
+ onClick: i.onCancel,
21
+ children: a.cancelAction
22
+ })
25
23
  })]
26
- }) : null] });
24
+ });
27
25
  }
28
26
  //#endregion
29
- export { a as AchEditGroup };
27
+ export { i as AchEditGroup };
@@ -3,20 +3,15 @@ import "../../../shared/counterpart-management/ui/dist/index.js";
3
3
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index27.js
4
4
  var t = {
5
5
  payToHeading: "Pay to",
6
+ vendorLabel: "Vendor",
7
+ achBankAccountLabel: "ACH bank account",
6
8
  editAction: "Edit",
7
- clearAction: "Clear",
9
+ editPaymentInstructionsAction: "Edit payment instructions",
8
10
  paymentInstructionsHeading: "Payment instructions",
9
11
  paymentInstructionsDescription: "How and where will the money be sent. This information is required to send a payment.",
10
12
  addPaymentInstructions: "Add payment instructions",
11
- saveAction: "Save",
12
13
  cancelAction: "Cancel",
13
- discardConfirmTitle: "Discard payment instructions?",
14
- discardConfirmDescription: "Your changes will be lost if you stop editing now.",
15
- keepEditingAction: "Keep editing",
16
- discardChangesAction: "Discard changes",
17
- ach: e,
18
- revealField: (e) => `Show ${e.toLowerCase()}`,
19
- hideField: (e) => `Hide ${e.toLowerCase()}`
14
+ ach: e
20
15
  };
21
16
  //#endregion
22
17
  export { t as VENDOR_SUMMARY_CARD_LABELS_EN };
@@ -1,154 +1,111 @@
1
- import { AlertDialog as e, AlertDialogContent as t, AlertDialogDescription as n, AlertDialogFooter as r, AlertDialogHeader as i, AlertDialogTitle as a, Button as o } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { VENDOR_SUMMARY_CARD_LABELS_EN as s } from "./index27.js";
3
- import { AchEditGroup as c } from "./index26.js";
4
- import { useMemo as l, useState as u } from "react";
5
- import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
6
- import { Eye as m, EyeOff as h, Pencil as g, Plus as _, X as v } from "lucide-react";
1
+ import { Button as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { VENDOR_SUMMARY_CARD_LABELS_EN as t } from "./index27.js";
3
+ import { AchEditGroup as n } from "./index26.js";
4
+ import { useMemo as r } from "react";
5
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
6
+ import { ChevronRightIcon as o, Plus as s } from "lucide-react";
7
7
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js
8
- function y({ field: e, labels: t }) {
9
- let [n, r] = u(!1), i = !!e.maskedValue, a = i && !n ? e.maskedValue : e.value;
10
- return /* @__PURE__ */ p("div", {
11
- className: "ttw:flex ttw:items-center ttw:gap-2 ttw:text-sm",
12
- children: [
13
- /* @__PURE__ */ f("span", {
14
- className: "ttw:w-44 ttw:shrink-0 ttw:text-muted-foreground",
15
- children: e.label
16
- }),
17
- /* @__PURE__ */ f("span", {
18
- className: "ttw:text-foreground",
19
- children: a
20
- }),
21
- i ? /* @__PURE__ */ f("button", {
22
- type: "button",
23
- onClick: () => r((e) => !e),
24
- "aria-label": n ? t.hideField(e.label) : t.revealField(e.label),
25
- className: "ttw:text-muted-foreground ttw:hover:text-foreground",
26
- children: f(n ? h : m, { className: "ttw:size-4" })
27
- }) : null
28
- ]
29
- });
30
- }
31
- function b({ summary: m, onEdit: h, onClear: b, paymentInstructions: x, instructionsCollapsed: S, testId: C, labels: w }) {
32
- let [T, E] = u(!1), D = l(() => ({
33
- ...s,
34
- ...w,
8
+ var c = "ttw:flex ttw:items-start ttw:gap-4 ttw:py-2.5", l = "ttw:text-sm ttw:font-medium ttw:text-muted-foreground", u = `ttw:w-[140px] ttw:shrink-0 ${l}`, d = "ttw:-mx-2 ttw:-my-1 ttw:flex ttw:flex-1 ttw:items-center ttw:justify-between ttw:gap-3 ttw:rounded-md ttw:px-2 ttw:py-1 ttw:text-left ttw:hover:bg-muted";
9
+ function f({ summary: f, onEdit: p, paymentInstructions: m, testId: h, labels: g }) {
10
+ let _ = r(() => ({
11
+ ...t,
12
+ ...g,
35
13
  ach: {
36
- ...s.ach,
37
- ...w?.ach
14
+ ...t.ach,
15
+ ...g?.ach
38
16
  }
39
- }), [w]);
40
- return /* @__PURE__ */ p("div", {
41
- className: "ttw:rounded-lg ttw:border ttw:border-border ttw:bg-muted/30 ttw:p-4",
42
- "data-testid": C,
43
- children: [
44
- /* @__PURE__ */ p("div", {
45
- className: "ttw:flex ttw:items-start ttw:justify-between",
46
- children: [/* @__PURE__ */ p("div", {
47
- className: "ttw:flex ttw:flex-col ttw:gap-0.5",
48
- children: [
49
- /* @__PURE__ */ f("span", {
50
- className: "ttw:text-xs ttw:text-muted-foreground",
51
- children: D.payToHeading
52
- }),
53
- /* @__PURE__ */ f("span", {
54
- className: "ttw:text-base ttw:font-semibold ttw:text-foreground",
55
- children: m.name
56
- }),
57
- /* @__PURE__ */ f("span", {
58
- className: "ttw:text-sm ttw:text-muted-foreground",
59
- children: m.email
60
- })
61
- ]
62
- }), /* @__PURE__ */ p("div", {
63
- className: "ttw:flex ttw:items-center ttw:gap-2",
64
- children: [
65
- h && !x?.isOpen ? /* @__PURE__ */ f(o, {
66
- type: "button",
67
- variant: "ghost",
68
- size: "icon",
69
- "aria-label": D.editAction,
70
- onClick: h,
71
- children: /* @__PURE__ */ f(g, { className: "ttw:size-4" })
72
- }) : null,
73
- h && !x?.isOpen && b ? /* @__PURE__ */ f("div", {
74
- "aria-hidden": !0,
75
- className: "ttw:h-5 ttw:w-px ttw:bg-border"
76
- }) : null,
77
- b ? /* @__PURE__ */ f(o, {
78
- type: "button",
79
- variant: "ghost",
80
- size: "icon",
81
- "aria-label": D.clearAction,
82
- onClick: b,
83
- children: /* @__PURE__ */ f(v, { className: "ttw:size-4" })
84
- }) : null
85
- ]
86
- })]
87
- }),
88
- m.fields.length ? x?.isOpen ? /* @__PURE__ */ f("div", {
89
- className: "ttw:mt-3 ttw:flex ttw:flex-col ttw:gap-3",
90
- children: /* @__PURE__ */ f(c, {
91
- paymentInstructions: x,
92
- labels: D,
93
- onCancel: () => E(!0)
94
- })
95
- }) : S ? /* @__PURE__ */ f("p", {
96
- className: "ttw:mt-3 ttw:text-sm ttw:text-muted-foreground",
97
- children: m.methodLabel
98
- }) : /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("p", {
99
- className: "ttw:mt-3 ttw:text-xs ttw:text-muted-foreground",
100
- children: m.methodLabel
101
- }), /* @__PURE__ */ f("div", {
102
- className: "ttw:mt-2 ttw:flex ttw:flex-col ttw:gap-1",
103
- children: m.fields.map((e) => /* @__PURE__ */ f(y, {
104
- field: e,
105
- labels: D
106
- }, `${e.label}:${e.value}:${e.maskedValue ?? ""}`))
107
- })] }) : /* @__PURE__ */ p("div", {
108
- className: "ttw:mt-4 ttw:flex ttw:flex-col ttw:gap-3",
109
- children: [/* @__PURE__ */ p("div", {
110
- className: "ttw:flex ttw:flex-col ttw:gap-1",
111
- children: [/* @__PURE__ */ f("p", {
112
- className: "ttw:text-sm ttw:font-semibold ttw:text-foreground",
113
- children: D.paymentInstructionsHeading
114
- }), /* @__PURE__ */ f("p", {
115
- className: "ttw:text-sm ttw:text-muted-foreground",
116
- children: D.paymentInstructionsDescription
117
- })]
118
- }), x?.isOpen ? /* @__PURE__ */ f(c, {
119
- paymentInstructions: x,
120
- labels: D,
121
- onCancel: () => E(!0)
122
- }) : x ? /* @__PURE__ */ p(o, {
17
+ }), [g]), v = !!m?.isOpen, y = !!m?.canEditExisting && f.hasPaymentInstructions, b = /* @__PURE__ */ a("div", {
18
+ className: "ttw:flex ttw:flex-col ttw:gap-0.5",
19
+ children: [/* @__PURE__ */ i("span", {
20
+ className: "ttw:text-sm ttw:font-medium ttw:text-foreground",
21
+ children: f.name
22
+ }), /* @__PURE__ */ i("span", {
23
+ className: "ttw:text-sm ttw:text-muted-foreground",
24
+ children: f.email
25
+ })]
26
+ }), x;
27
+ return x = m && v ? /* @__PURE__ */ i(n, {
28
+ paymentInstructions: m,
29
+ labels: _
30
+ }) : f.hasPaymentInstructions ? y ? /* @__PURE__ */ a("button", {
31
+ type: "button",
32
+ "aria-label": _.editPaymentInstructionsAction,
33
+ onClick: m?.onOpen,
34
+ className: d,
35
+ children: [/* @__PURE__ */ i("span", {
36
+ className: "ttw:text-sm ttw:font-medium ttw:text-foreground",
37
+ children: f.methodLabel
38
+ }), /* @__PURE__ */ i(o, {
39
+ "aria-hidden": "true",
40
+ className: "ttw:size-4 ttw:shrink-0 ttw:text-muted-foreground"
41
+ })]
42
+ }) : /* @__PURE__ */ i("p", {
43
+ className: "ttw:text-sm ttw:font-medium ttw:text-foreground",
44
+ children: f.methodLabel
45
+ }) : /* @__PURE__ */ a("div", {
46
+ className: "ttw:flex ttw:flex-col ttw:gap-3",
47
+ children: [/* @__PURE__ */ a("div", {
48
+ className: "ttw:flex ttw:flex-col ttw:gap-1",
49
+ children: [/* @__PURE__ */ i("p", {
50
+ className: "ttw:text-sm ttw:font-semibold ttw:text-foreground",
51
+ children: _.paymentInstructionsHeading
52
+ }), /* @__PURE__ */ i("p", {
53
+ className: "ttw:text-sm ttw:text-muted-foreground",
54
+ children: _.paymentInstructionsDescription
55
+ })]
56
+ }), m ? /* @__PURE__ */ a(e, {
57
+ type: "button",
58
+ variant: "link",
59
+ className: "ttw:w-fit ttw:px-0",
60
+ onClick: m.onOpen,
61
+ children: [/* @__PURE__ */ i(s, { className: "ttw:size-4" }), _.addPaymentInstructions]
62
+ }) : /* @__PURE__ */ i("p", {
63
+ className: "ttw:text-sm ttw:text-muted-foreground",
64
+ children: f.methodLabel
65
+ })]
66
+ }), /* @__PURE__ */ a("div", {
67
+ "data-testid": h,
68
+ children: [/* @__PURE__ */ i("h3", {
69
+ className: "ttw:text-base ttw:font-semibold ttw:text-foreground",
70
+ children: _.payToHeading
71
+ }), /* @__PURE__ */ a("div", {
72
+ className: "ttw:mt-3 ttw:flex ttw:flex-col ttw:divide-y ttw:divide-border",
73
+ children: [/* @__PURE__ */ a("div", {
74
+ className: c,
75
+ children: [/* @__PURE__ */ i("span", {
76
+ className: u,
77
+ children: _.vendorLabel
78
+ }), p && !v ? /* @__PURE__ */ a("button", {
123
79
  type: "button",
124
- variant: "link",
125
- className: "ttw:w-fit ttw:px-0",
126
- onClick: x.onOpen,
127
- children: [/* @__PURE__ */ f(_, { className: "ttw:size-4" }), D.addPaymentInstructions]
128
- }) : /* @__PURE__ */ f("p", {
129
- className: "ttw:text-sm ttw:text-muted-foreground",
130
- children: m.methodLabel
80
+ "aria-label": _.editAction,
81
+ onClick: p,
82
+ className: d,
83
+ children: [b, /* @__PURE__ */ i(o, {
84
+ "aria-hidden": "true",
85
+ className: "ttw:size-4 ttw:shrink-0 ttw:text-muted-foreground"
86
+ })]
87
+ }) : /* @__PURE__ */ i("div", {
88
+ className: "ttw:flex ttw:flex-1",
89
+ children: b
131
90
  })]
132
- }),
133
- /* @__PURE__ */ f(e, {
134
- open: T,
135
- onOpenChange: E,
136
- children: /* @__PURE__ */ p(t, { children: [/* @__PURE__ */ p(i, { children: [/* @__PURE__ */ f(a, { children: D.discardConfirmTitle }), /* @__PURE__ */ f(n, { children: D.discardConfirmDescription })] }), /* @__PURE__ */ p(r, { children: [/* @__PURE__ */ f(o, {
137
- type: "button",
138
- variant: "outline",
139
- onClick: () => E(!1),
140
- children: D.keepEditingAction
141
- }), /* @__PURE__ */ f(o, {
142
- type: "button",
143
- variant: "destructive",
144
- onClick: () => {
145
- E(!1), x?.onCancel?.();
146
- },
147
- children: D.discardChangesAction
148
- })] })] })
149
- })
150
- ]
91
+ }), v ? /* @__PURE__ */ a("div", {
92
+ className: "ttw:flex ttw:flex-col ttw:gap-3 ttw:py-2.5",
93
+ children: [/* @__PURE__ */ i("span", {
94
+ className: l,
95
+ children: _.achBankAccountLabel
96
+ }), x]
97
+ }) : /* @__PURE__ */ a("div", {
98
+ className: c,
99
+ children: [/* @__PURE__ */ i("span", {
100
+ className: u,
101
+ children: _.achBankAccountLabel
102
+ }), /* @__PURE__ */ i("div", {
103
+ className: "ttw:flex ttw:flex-1",
104
+ children: x
105
+ })]
106
+ })]
107
+ })]
151
108
  });
152
109
  }
153
110
  //#endregion
154
- export { b as VendorSummaryCard, b as default };
111
+ export { f as VendorSummaryCard, f as default };
@@ -18,7 +18,8 @@ var i = {
18
18
  payToHeading: "Pay to",
19
19
  payToHeadingPaid: "Paid to",
20
20
  vendorRow: "Vendor",
21
- paymentInstructionsRow: "Payment instructions",
21
+ paymentInstructionsRow: "ACH bank account",
22
+ invoiceDetailsHeading: "Invoice details",
22
23
  addPaymentInstructions: "Add payment instructions",
23
24
  missingPaymentInstructionsBanner: "Missing payment instructions, which are required to send a payment",
24
25
  descriptionAndGlCodeColumn: "Description and GL code",
@@ -32,7 +33,7 @@ var i = {
32
33
  dueDate: n,
33
34
  payToCard: {
34
35
  ...r,
35
- editAction: "Edit payment instructions"
36
+ editAction: "Edit vendor"
36
37
  }
37
38
  };
38
39
  function a(e) {