@tesouro/embedded-components-react 0.2.254 → 0.2.256

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 (142) hide show
  1. package/dist/core.js +1 -1
  2. package/dist/index.css +15 -0
  3. package/dist/index.js +2 -2
  4. package/dist/lib/BillPayWidget.d.ts +151 -151
  5. package/dist/lib/BillPayWidget.js +1 -1
  6. package/dist/lib/InsightsWidget.js +1 -1
  7. package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index4.js +1 -1
  8. package/dist/libs/tesouro-embedded-components-react/balances-widget/feature/dist/index3.js +4 -4
  9. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index17.js +119 -121
  10. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index7.js +1 -1
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index.js +10 -0
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index10.js +40 -0
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index11.js +36 -0
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index3.js +28 -0
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index4.js +22 -0
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index5.js +7 -0
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index6.js +75 -0
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index7.js +166 -0
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index8.js +17 -0
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index9.js +30 -0
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +15 -1
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +9 -0
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index11.js +99 -0
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index12.js +4 -0
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index13.js +4 -0
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +43 -0
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +1 -0
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index16.js +50 -0
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index17.js +8 -0
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index18.js +7 -0
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +93 -0
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index2.js +42 -2
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index20.js +3 -0
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +8 -0
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +9 -0
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +85 -0
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index24.js +3 -0
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +8 -0
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index26.js +112 -0
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +1 -0
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js +25 -0
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index3.js +51 -35
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index4.js +235 -1
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index5.js +106 -7
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js +35 -88
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +122 -1
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index8.js +36 -22
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +74 -0
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +15 -8
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index10.js +24 -3
  51. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index11.js +1 -0
  52. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index12.js +12 -0
  53. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index13.js +83 -3
  54. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index14.js +1 -0
  55. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index15.js +18 -0
  56. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index16.js +205 -4
  57. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index17.js +1 -0
  58. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index18.js +10 -0
  59. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index19.js +89 -4
  60. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index20.js +1 -0
  61. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index21.js +10 -0
  62. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index22.js +131 -4
  63. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index23.js +1 -0
  64. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index24.js +10 -0
  65. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +45 -5
  66. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index27.js +17 -1
  67. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js +149 -7
  68. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index3.js +73 -4
  69. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index33.js +14 -0
  70. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index34.js +24 -2
  71. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index35.js +1 -0
  72. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index36.js +24 -1
  73. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index38.js +145 -6
  74. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index39.js +10 -0
  75. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index40.js +8 -0
  76. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index41.js +93 -4
  77. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index43.js +1 -0
  78. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index44.js +7 -0
  79. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index45.js +30 -2
  80. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +1 -0
  81. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index47.js +13 -0
  82. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index48.js +88 -5
  83. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index7.js +62 -5
  84. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index9.js +7 -0
  85. package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index4.js +2 -2
  86. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index4.js +13 -13
  87. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index7.js +58 -58
  88. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index8.js +19 -19
  89. package/dist/libs/tesouro-embedded-components-react/gl-code-table-widget/feature/dist/index7.js +1 -1
  90. package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index.js +2 -2
  91. package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index10.js +13 -62
  92. package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index11.js +66 -0
  93. package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index7.js +11 -109
  94. package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index8.js +113 -21
  95. package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index9.js +21 -15
  96. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index7.js +1 -1
  97. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index9.js +2 -2
  98. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/index8.js +3 -3
  99. package/dist/libs/tesouro-embedded-components-react/profile-widget/feature/dist/index4.js +1 -1
  100. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/policyViewModel.js +1 -1
  101. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/index.js +15 -15
  102. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js +9 -9
  103. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useAddressForm.js +1 -1
  104. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartForm.js +32 -29
  105. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useSubEntityForm.js +1 -1
  106. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index.js +7 -7
  107. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index8.js +232 -220
  108. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +19 -19
  109. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js +171 -138
  110. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/client/index.js +1 -0
  111. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/core/bodySerializer.gen.js +9 -2
  112. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +404 -293
  113. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/withAuthEpoch.js +6 -4
  114. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/index.js +5 -5
  115. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetTokenRefreshProvider.js +1 -1
  116. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/hooks.js +6 -3
  117. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  118. package/dist/libs/tesouro-embedded-components-react/shared/monite-wrapper/feature/dist/lib/MoniteWrapper.js +75 -45
  119. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/feature/dist/index.js +1 -1
  120. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/feature/dist/lib/MeasureUnitsManagerContainer.js +1 -1
  121. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/feature/dist/lib/useProductForm.js +1 -1
  122. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/{index3.js → lib/amountOutputToMajorUnits.js} +1 -1
  123. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/{index14.js → lib/apiErrors.js} +1 -1
  124. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/{index2.js → lib/coerceAmountValueToMinorUnits.js} +1 -1
  125. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/formatCalendarDate.js +13 -0
  126. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/{index4.js → lib/formatMoneyExact.js} +1 -1
  127. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/{index5.js → lib/formatPhoneDisplay.js} +1 -1
  128. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/{index6.js → lib/getInitials.js} +1 -1
  129. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/{index7.js → lib/normalizeAmountOutputCurrencyCode.js} +1 -1
  130. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/{index8.js → lib/parseAmountOutputMajorUnits.js} +1 -1
  131. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/{index9.js → lib/parseDecimalAmountToMinorUnits.js} +2 -2
  132. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/{index10.js → lib/sumAmountOutputsMajorUnits.js} +3 -3
  133. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/{index11.js → lib/usStates.js} +1 -1
  134. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/{index13.js → lib/widgetDomEvents.js} +1 -1
  135. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/{index12.js → lib/widgetTokenManager.js} +1 -1
  136. package/dist/libs/tesouro-embedded-components-react/tags-widget/feature/dist/index8.js +1 -1
  137. package/dist/libs/tesouro-embedded-components-react/team-widget/feature/dist/index11.js +1 -1
  138. package/dist/libs/tesouro-embedded-components-react/team-widget/feature/dist/index4.js +1 -1
  139. package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index4.js +4 -4
  140. package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index5.js +1 -1
  141. package/dist/packages/shared-ui-shadcn/dist/index.js +3593 -3582
  142. package/package.json +1 -1
@@ -1,11 +1,153 @@
1
- import "../../../../../packages/shared-ui-shadcn/dist/index.js";
1
+ import { Button as e, Dialog as t, DialogContent as n, DialogDescription as r, DialogHeader as i, DialogTitle as a, DropdownMenu as o, DropdownMenuContent as s, DropdownMenuItem as c, DropdownMenuTrigger as l } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { InlineErrorAlert as u } from "../../../shared/ui/dist/lib/InlineErrorAlert/InlineErrorAlert.js";
2
3
  import "../../../shared/ui/dist/index.js";
3
- import "./index13.js";
4
+ import { BillFormFields as d } from "./index13.js";
4
5
  import "./index14.js";
5
- import "./index16.js";
6
+ import { LineItemsSection as f } from "./index16.js";
6
7
  import "./index17.js";
7
- import "./index25.js";
8
+ import { VendorSection as p } from "./index25.js";
8
9
  import "./index26.js";
9
- import "./index27.js";
10
- import "react/jsx-runtime";
11
- import "lucide-react";
10
+ import { BILL_CREATE_SCREEN_LABELS_EN as m } from "./index27.js";
11
+ import { jsx as h, jsxs as g } from "react/jsx-runtime";
12
+ import { MoreVertical as _, X as v } from "lucide-react";
13
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js
14
+ function y({ open: y, onOpenChange: b, title: x, subtitle: S, notice: C, vendor: w, values: T, errors: E, onChange: D, paymentTermOptions: O, lineItems: k, documentPanel: A, menuItems: j, isLineItemsLoading: M, isSavingDraft: N, isFinalizing: P, onCancel: F, onSaveDraft: I, onFinalize: L, testId: R, labels: z }) {
15
+ let B = {
16
+ ...m,
17
+ ...z,
18
+ vendorSection: {
19
+ ...m.vendorSection,
20
+ ...z?.vendorSection,
21
+ summaryCard: {
22
+ ...m.vendorSection.summaryCard,
23
+ ...z?.vendorSection?.summaryCard
24
+ },
25
+ search: {
26
+ ...m.vendorSection.search,
27
+ ...z?.vendorSection?.search
28
+ }
29
+ },
30
+ detailsFields: {
31
+ ...m.detailsFields,
32
+ ...z?.detailsFields
33
+ },
34
+ lineItems: {
35
+ ...m.lineItems,
36
+ ...z?.lineItems
37
+ }
38
+ };
39
+ return /* @__PURE__ */ h(t, {
40
+ open: y,
41
+ onOpenChange: (e) => e ? b(e) : F(),
42
+ children: /* @__PURE__ */ g(n, {
43
+ showCloseButton: !1,
44
+ className: "ttw:flex ttw:h-[calc(100vh-3rem)] ttw:w-[calc(100vw-3rem)] ttw:max-w-[calc(100vw-3rem)] ttw:flex-col ttw:gap-0 ttw:p-0",
45
+ "data-testid": R,
46
+ children: [
47
+ /* @__PURE__ */ g(i, {
48
+ className: "ttw:flex ttw:flex-row ttw:items-start ttw:justify-between ttw:border-b ttw:border-border ttw:px-6 ttw:py-4",
49
+ children: [/* @__PURE__ */ g("div", {
50
+ className: "ttw:flex ttw:flex-col ttw:gap-0.5",
51
+ children: [
52
+ /* @__PURE__ */ h(a, {
53
+ className: "ttw:text-xl ttw:font-semibold",
54
+ children: x
55
+ }),
56
+ S ? /* @__PURE__ */ h("p", {
57
+ className: "ttw:text-sm ttw:text-muted-foreground",
58
+ children: S
59
+ }) : null,
60
+ /* @__PURE__ */ h(r, {
61
+ className: "ttw:sr-only",
62
+ children: B.hiddenDescription
63
+ })
64
+ ]
65
+ }), /* @__PURE__ */ g("div", {
66
+ className: "ttw:flex ttw:items-center ttw:gap-1",
67
+ children: [j && j.length > 0 ? /* @__PURE__ */ g(o, { children: [/* @__PURE__ */ h(l, {
68
+ asChild: !0,
69
+ children: /* @__PURE__ */ h(e, {
70
+ type: "button",
71
+ variant: "ghost",
72
+ size: "icon",
73
+ "aria-label": B.menuTrigger,
74
+ children: /* @__PURE__ */ h(_, { className: "ttw:size-4" })
75
+ })
76
+ }), /* @__PURE__ */ h(s, {
77
+ align: "end",
78
+ children: j.map((e) => /* @__PURE__ */ h(c, {
79
+ variant: e.destructive ? "destructive" : void 0,
80
+ onSelect: e.onSelect,
81
+ children: e.label
82
+ }, e.id))
83
+ })] }) : null, /* @__PURE__ */ h(e, {
84
+ type: "button",
85
+ variant: "ghost",
86
+ size: "icon",
87
+ "aria-label": B.closeButton,
88
+ onClick: F,
89
+ children: /* @__PURE__ */ h(v, { className: "ttw:size-4" })
90
+ })]
91
+ })]
92
+ }),
93
+ /* @__PURE__ */ g("div", {
94
+ className: "ttw:grid ttw:flex-1 ttw:grid-cols-2 ttw:overflow-hidden",
95
+ children: [/* @__PURE__ */ g("div", {
96
+ className: "ttw:flex ttw:flex-col ttw:gap-6 ttw:overflow-y-auto ttw:px-6 ttw:py-6",
97
+ children: [
98
+ E?.form ? /* @__PURE__ */ h(u, { children: E.form }) : null,
99
+ C,
100
+ /* @__PURE__ */ h(p, {
101
+ ...w,
102
+ labels: B.vendorSection
103
+ }),
104
+ /* @__PURE__ */ h(d, {
105
+ values: T,
106
+ errors: E,
107
+ onChange: D,
108
+ paymentTermOptions: O,
109
+ labels: B.detailsFields
110
+ }),
111
+ /* @__PURE__ */ h(f, {
112
+ ...k,
113
+ disabled: k.disabled || M,
114
+ labels: B.lineItems
115
+ })
116
+ ]
117
+ }), /* @__PURE__ */ h("div", {
118
+ className: "ttw:overflow-y-auto ttw:bg-muted/30 ttw:px-6 ttw:py-6",
119
+ children: A
120
+ })]
121
+ }),
122
+ /* @__PURE__ */ g("div", {
123
+ className: "ttw:flex ttw:justify-end ttw:gap-2 ttw:border-t ttw:border-border ttw:px-6 ttw:py-4",
124
+ children: [
125
+ /* @__PURE__ */ h(e, {
126
+ type: "button",
127
+ variant: "ghost",
128
+ onClick: F,
129
+ children: B.cancelButton
130
+ }),
131
+ /* @__PURE__ */ h(e, {
132
+ type: "button",
133
+ variant: "secondary",
134
+ onClick: I,
135
+ loading: N,
136
+ disabled: P || M,
137
+ children: B.saveDraftButton
138
+ }),
139
+ /* @__PURE__ */ h(e, {
140
+ type: "button",
141
+ onClick: L,
142
+ loading: P,
143
+ disabled: N || M,
144
+ children: B.finalizeButton
145
+ })
146
+ ]
147
+ })
148
+ ]
149
+ })
150
+ });
151
+ }
152
+ //#endregion
153
+ export { y as BillCreateScreen, y as default };
@@ -1,5 +1,74 @@
1
- import "../../../../../packages/shared-ui-shadcn/dist/index.js";
1
+ import { cn as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { InlineErrorAlert as t } from "../../../shared/ui/dist/lib/InlineErrorAlert/InlineErrorAlert.js";
2
3
  import "../../../shared/ui/dist/index.js";
3
- import "react";
4
- import "react/jsx-runtime";
5
- import "lucide-react";
4
+ import { BILL_UPLOAD_DROPZONE_LABELS_EN as n } from "./index2.js";
5
+ import { useRef as r, useState as i } from "react";
6
+ import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
7
+ import { Loader2 as c, Upload as l } from "lucide-react";
8
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index3.js
9
+ function u(e, t) {
10
+ let n = t.split(",").map((e) => e.trim()).filter(Boolean);
11
+ return n.length === 0 || n.some((t) => t.startsWith(".") ? e.name.toLowerCase().endsWith(t.toLowerCase()) : t.endsWith("/*") ? e.type.startsWith(t.slice(0, -1)) : e.type === t);
12
+ }
13
+ function d({ status: d = "idle", errorMessage: f, accept: p = ".pdf,.png,.jpg,.jpeg", multiple: m = !0, onFilesSelected: h, testId: g, labels: _ }) {
14
+ let v = {
15
+ ...n,
16
+ ..._
17
+ }, y = r(null), [b, x] = i(!1), S = d === "uploading";
18
+ return /* @__PURE__ */ s("div", {
19
+ className: "ttw:flex ttw:flex-col ttw:gap-2",
20
+ "data-testid": g,
21
+ children: [
22
+ /* @__PURE__ */ s("button", {
23
+ type: "button",
24
+ disabled: S,
25
+ className: e("ttw:flex ttw:w-full ttw:items-center ttw:justify-center ttw:gap-3 ttw:rounded-lg ttw:border ttw:border-dashed ttw:px-6 ttw:py-8", b ? "ttw:border-primary ttw:bg-primary/5" : "ttw:border-border ttw:bg-muted/40"),
26
+ onClick: () => y.current?.click(),
27
+ onDragOver: (e) => {
28
+ e.preventDefault(), x(!0);
29
+ },
30
+ onDragLeave: (e) => {
31
+ e.preventDefault(), x(!1);
32
+ },
33
+ onDrop: (e) => {
34
+ if (e.preventDefault(), x(!1), S) return;
35
+ let t = (e.dataTransfer.files ? Array.from(e.dataTransfer.files) : []).filter((e) => u(e, p)), n = m ? t : t.slice(0, 1);
36
+ n.length > 0 && h(n);
37
+ },
38
+ children: [S ? /* @__PURE__ */ o(c, { className: "ttw:size-5 ttw:animate-spin ttw:text-primary" }) : /* @__PURE__ */ o(l, { className: "ttw:size-5 ttw:text-muted-foreground" }), /* @__PURE__ */ s("span", {
39
+ className: "ttw:flex ttw:flex-col ttw:items-start",
40
+ children: [/* @__PURE__ */ o("span", {
41
+ className: "ttw:text-sm ttw:text-primary",
42
+ children: S ? v.uploadingText : /* @__PURE__ */ s(a, { children: [
43
+ v.dropPrefix,
44
+ " ",
45
+ /* @__PURE__ */ o("span", {
46
+ className: "ttw:underline",
47
+ children: v.browseAction
48
+ })
49
+ ] })
50
+ }), /* @__PURE__ */ o("span", {
51
+ className: "ttw:text-xs ttw:text-muted-foreground",
52
+ children: v.fileTypesHint
53
+ })]
54
+ })]
55
+ }),
56
+ /* @__PURE__ */ o("input", {
57
+ ref: y,
58
+ type: "file",
59
+ accept: p,
60
+ multiple: m,
61
+ disabled: S,
62
+ "aria-label": v.fileInput,
63
+ className: "ttw:hidden",
64
+ onChange: (e) => {
65
+ let t = (e.target.files ? Array.from(e.target.files) : []).filter((e) => u(e, p)), n = m ? t : t.slice(0, 1);
66
+ n.length > 0 && h(n), e.target.value = "";
67
+ }
68
+ }),
69
+ d === "error" && f ? /* @__PURE__ */ o(t, { children: f }) : null
70
+ ]
71
+ });
72
+ }
73
+ //#endregion
74
+ export { d as BillUploadDropzone, d as default };
@@ -0,0 +1,14 @@
1
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index33.js
2
+ var e = {
3
+ draft: "Draft",
4
+ pending_approval: "Pending approval",
5
+ ready_to_pay: "Ready to pay",
6
+ partially_paid: "Partially paid",
7
+ paid: "Paid",
8
+ overdue: "Overdue",
9
+ canceled: "Canceled",
10
+ rejected: "Rejected",
11
+ unknown: "Unknown"
12
+ };
13
+ //#endregion
14
+ export { e as BILL_STATUS_BADGE_LABELS_EN };
@@ -1,2 +1,24 @@
1
- import "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import "react/jsx-runtime";
1
+ import { Badge as e, cn as t } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { BILL_STATUS_BADGE_LABELS_EN as n } from "./index33.js";
3
+ import { jsxs as r } from "react/jsx-runtime";
4
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index34.js
5
+ var i = {
6
+ danger: "ttw:border-destructive/20 ttw:bg-destructive/10 ttw:text-destructive ttw:hover:bg-destructive/10",
7
+ info: "ttw:border-blue-200 ttw:bg-blue-50 ttw:text-blue-700 ttw:hover:bg-blue-50",
8
+ neutral: "ttw:border-border ttw:bg-muted ttw:text-foreground ttw:hover:bg-muted",
9
+ success: "ttw:border-emerald-200 ttw:bg-emerald-50 ttw:text-emerald-700 ttw:hover:bg-emerald-50",
10
+ warning: "ttw:border-amber-200 ttw:bg-amber-50 ttw:text-amber-800 ttw:hover:bg-amber-50"
11
+ };
12
+ function a({ status: a, tone: o, labels: s, icon: c }) {
13
+ let l = {
14
+ ...n,
15
+ ...s
16
+ }, u = l[a] ?? l.unknown;
17
+ return /* @__PURE__ */ r(e, {
18
+ variant: "outline",
19
+ className: t(c && "ttw:gap-1", i[o]),
20
+ children: [c, u]
21
+ });
22
+ }
23
+ //#endregion
24
+ export { a as BillStatusBadge, a as default };
@@ -1 +1,2 @@
1
+ import "./index33.js";
1
2
  import "./index34.js";
@@ -1,5 +1,28 @@
1
1
  import { ADD_BILL_PANEL_LABELS_EN as e } from "./index6.js";
2
2
  import "./index8.js";
3
+ import { BILL_STATUS_BADGE_LABELS_EN as t } from "./index33.js";
3
4
  import "./index35.js";
4
- ({ ...e }), { ...e.dropzone };
5
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index36.js
6
+ var n = ".pdf,.png,.jpg,.jpeg,.doc,.docx", r = {
7
+ ...e,
8
+ dropzone: {
9
+ ...e.dropzone,
10
+ fileTypesHint: "PDF, DOC, JPG, or PNG (max. 3MB)"
11
+ }
12
+ }, i = {
13
+ title: "Bills",
14
+ createButton: "Add bill",
15
+ columnVendor: "Vendor",
16
+ columnDueDate: "Due date",
17
+ columnAmount: "Amount",
18
+ columnStatus: "Status",
19
+ columnActions: "Actions",
20
+ openRow: (e) => `View bill — ${e}`,
21
+ errorTitle: "Couldn't load bills",
22
+ errorDescription: "Something went wrong. Try again.",
23
+ errorRetry: "Retry",
24
+ statusBadge: t,
25
+ addBill: r
26
+ };
5
27
  //#endregion
28
+ export { i as BILLS_SCREEN_LABELS_EN, n as BILLS_SCREEN_UPLOAD_ACCEPT };
@@ -1,9 +1,148 @@
1
- import "../../../../../packages/shared-ui-shadcn/dist/index.js";
1
+ import { Button as e, DataTable as t, DataTableSortableHeader as n, Typography as r } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { ErrorState as i } from "../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
2
3
  import "../../../shared/ui/dist/index.js";
3
- import "./index7.js";
4
+ import { AddBillPanel as a } from "./index7.js";
4
5
  import "./index8.js";
5
- import "./index34.js";
6
+ import { BillStatusBadge as o } from "./index34.js";
6
7
  import "./index35.js";
7
- import "./index36.js";
8
- import "react/jsx-runtime";
9
- import "lucide-react";
8
+ import { BILLS_SCREEN_LABELS_EN as s, BILLS_SCREEN_UPLOAD_ACCEPT as c } from "./index36.js";
9
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
10
+ import { ChevronRightIcon as d, PlusIcon as f } from "lucide-react";
11
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index38.js
12
+ var p = [
13
+ 10,
14
+ 25,
15
+ 50,
16
+ 100
17
+ ];
18
+ function m({ rows: m, isLoading: h, isError: g, sorting: _, onSortingChange: v, pageSize: y, onPageSizeChange: b, pageSizeOptions: x = p, pageInfo: S, hasNextPage: C, hasPrevPage: w, onNextPage: T, onPrevPage: E, onCreateClick: D, onRetry: O, onFilesSelected: k, onEnterManually: A, uploadStatus: j, uploadErrorMessage: M, emailAddress: N, onCopyEmail: P, labels: F }) {
19
+ let I = {
20
+ ...s,
21
+ ...F,
22
+ statusBadge: {
23
+ ...s.statusBadge,
24
+ ...F?.statusBadge
25
+ },
26
+ addBill: {
27
+ ...s.addBill,
28
+ ...F?.addBill,
29
+ dropzone: {
30
+ ...s.addBill.dropzone,
31
+ ...F?.addBill?.dropzone
32
+ }
33
+ }
34
+ }, L = [
35
+ {
36
+ accessorKey: "vendorLabel",
37
+ header: ({ column: e }) => /* @__PURE__ */ l(n, {
38
+ column: e,
39
+ title: I.columnVendor
40
+ })
41
+ },
42
+ {
43
+ accessorKey: "dueDateLabel",
44
+ header: ({ column: e }) => /* @__PURE__ */ l(n, {
45
+ column: e,
46
+ title: I.columnDueDate
47
+ })
48
+ },
49
+ {
50
+ accessorKey: "amountLabel",
51
+ header: ({ column: e }) => /* @__PURE__ */ l("div", {
52
+ className: "ttw:flex ttw:justify-end",
53
+ children: /* @__PURE__ */ l(n, {
54
+ column: e,
55
+ title: I.columnAmount
56
+ })
57
+ }),
58
+ cell: ({ row: e }) => /* @__PURE__ */ l("div", {
59
+ className: "ttw:text-right",
60
+ children: e.original.amountLabel
61
+ })
62
+ },
63
+ {
64
+ accessorKey: "status",
65
+ header: I.columnStatus,
66
+ cell: ({ row: e }) => /* @__PURE__ */ l(o, {
67
+ status: e.original.status,
68
+ tone: e.original.statusTone,
69
+ labels: I.statusBadge
70
+ })
71
+ },
72
+ {
73
+ id: "actions",
74
+ header: () => /* @__PURE__ */ l("span", {
75
+ className: "ttw:sr-only",
76
+ children: I.columnActions
77
+ }),
78
+ cell: ({ row: t }) => /* @__PURE__ */ l("div", {
79
+ className: "ttw:flex ttw:justify-end",
80
+ children: /* @__PURE__ */ l(e, {
81
+ variant: "ghost",
82
+ size: "icon",
83
+ "aria-label": I.openRow(t.original.vendorLabel),
84
+ onClick: (e) => {
85
+ e.stopPropagation(), t.original.onOpen();
86
+ },
87
+ children: /* @__PURE__ */ l(d, { className: "ttw:size-4" })
88
+ })
89
+ })
90
+ }
91
+ ], R = !!(D && k) && !h && !g && m.length === 0;
92
+ return /* @__PURE__ */ u("div", {
93
+ className: "ttw:flex ttw:flex-col ttw:gap-4",
94
+ children: [/* @__PURE__ */ u("div", {
95
+ className: "ttw:flex ttw:items-center ttw:justify-between",
96
+ children: [/* @__PURE__ */ l(r, {
97
+ component: "h2",
98
+ variant: "h6",
99
+ className: "ttw:font-semibold",
100
+ children: I.title
101
+ }), D && !R ? /* @__PURE__ */ u(e, {
102
+ onClick: D,
103
+ children: [/* @__PURE__ */ l(f, { className: "ttw:size-4" }), I.createButton]
104
+ }) : null]
105
+ }), g ? /* @__PURE__ */ l(i, {
106
+ title: I.errorTitle,
107
+ description: I.errorDescription,
108
+ retryLabel: O ? I.errorRetry : void 0,
109
+ onRetry: O
110
+ }) : R && D && k ? /* @__PURE__ */ l("div", {
111
+ className: "ttw:rounded-lg ttw:border ttw:border-border ttw:bg-card",
112
+ children: N && P ? /* @__PURE__ */ l(a, {
113
+ emailAddress: N,
114
+ onCopyEmail: P,
115
+ onFilesSelected: k,
116
+ accept: c,
117
+ uploadStatus: j,
118
+ uploadErrorMessage: M,
119
+ onEnterManually: A ?? D,
120
+ labels: I.addBill
121
+ }) : /* @__PURE__ */ l(a, {
122
+ onFilesSelected: k,
123
+ accept: c,
124
+ uploadStatus: j,
125
+ uploadErrorMessage: M,
126
+ onEnterManually: A ?? D,
127
+ labels: I.addBill
128
+ })
129
+ }) : /* @__PURE__ */ l(t, {
130
+ columns: L,
131
+ data: m,
132
+ isLoading: h,
133
+ sorting: _,
134
+ onSortingChange: v,
135
+ pageSize: y,
136
+ onPageSizeChange: b,
137
+ pageSizeOptions: x,
138
+ pageInfo: S,
139
+ hasNextPage: C,
140
+ hasPrevPage: w,
141
+ onNextPage: T,
142
+ onPrevPage: E,
143
+ onRowClick: (e) => e.onOpen()
144
+ })]
145
+ });
146
+ }
147
+ //#endregion
148
+ export { m as BillsScreen, m as default };
@@ -0,0 +1,10 @@
1
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index39.js
2
+ var e = {
3
+ collapse: "Collapse upload status",
4
+ expand: "Expand upload status",
5
+ close: "Close upload status",
6
+ statusLabel: (e) => e === "uploading" ? "Uploading" : e === "ready" ? "Ready" : "Failed",
7
+ openItem: (e) => `Open ${e}`
8
+ };
9
+ //#endregion
10
+ export { e as BILL_UPLOAD_STATUS_TRAY_LABELS_EN };
@@ -0,0 +1,8 @@
1
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index40.js
2
+ var e = {
3
+ uploading: "ttw:text-muted-foreground",
4
+ ready: "ttw:text-emerald-600",
5
+ failed: "ttw:text-destructive"
6
+ };
7
+ //#endregion
8
+ export { e as UPLOAD_ITEM_ICON_TONE };
@@ -1,4 +1,93 @@
1
- import "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import "react";
3
- import "react/jsx-runtime";
4
- import "lucide-react";
1
+ import { cn as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { BILL_UPLOAD_STATUS_TRAY_LABELS_EN as t } from "./index39.js";
3
+ import { UPLOAD_ITEM_ICON_TONE as n } from "./index40.js";
4
+ import { useId as r } from "react";
5
+ import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
6
+ import { CheckCircle2 as s, ChevronDown as c, ChevronRight as l, ChevronUp as u, Loader2 as d, X as f, XCircle as p } from "lucide-react";
7
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index41.js
8
+ function m({ status: t }) {
9
+ let r = e("ttw:size-4", n[t]);
10
+ return t === "uploading" ? /* @__PURE__ */ a(d, {
11
+ "aria-hidden": !0,
12
+ className: e(r, "ttw:animate-spin")
13
+ }) : a(t === "ready" ? s : p, {
14
+ "aria-hidden": !0,
15
+ className: r
16
+ });
17
+ }
18
+ function h({ item: t, labels: n }) {
19
+ let s = r(), c = /* @__PURE__ */ o(i, { children: [
20
+ /* @__PURE__ */ a(m, { status: t.status }),
21
+ /* @__PURE__ */ a("span", {
22
+ id: s,
23
+ className: "ttw:sr-only",
24
+ children: n.statusLabel(t.status)
25
+ }),
26
+ /* @__PURE__ */ a("span", {
27
+ className: "ttw:flex-1 ttw:truncate ttw:text-left ttw:text-sm ttw:text-foreground",
28
+ children: t.fileName
29
+ }),
30
+ t.onOpen ? /* @__PURE__ */ a(l, {
31
+ "aria-hidden": !0,
32
+ className: "ttw:size-4"
33
+ }) : null
34
+ ] }), u = "ttw:flex ttw:items-center ttw:gap-3 ttw:px-4 ttw:py-2.5";
35
+ return t.onOpen ? /* @__PURE__ */ a("button", {
36
+ type: "button",
37
+ onClick: t.onOpen,
38
+ "aria-describedby": s,
39
+ "aria-label": n.openItem(t.fileName),
40
+ className: e(u, "ttw:w-full ttw:text-muted-foreground ttw:transition-colors ttw:hover:bg-muted/50 ttw:hover:text-foreground"),
41
+ children: c
42
+ }) : /* @__PURE__ */ a("div", {
43
+ "aria-describedby": s,
44
+ className: u,
45
+ children: c
46
+ });
47
+ }
48
+ function g({ sections: e, summaryLabel: n, collapsed: r, onToggleCollapsed: i, onClose: s, testId: l, labels: d }) {
49
+ let p = {
50
+ ...t,
51
+ ...d
52
+ };
53
+ return /* @__PURE__ */ o("div", {
54
+ className: "ttw:fixed ttw:right-4 ttw:bottom-4 ttw:z-50 ttw:w-96 ttw:max-w-[calc(100vw-2rem)] ttw:overflow-hidden ttw:rounded-lg ttw:border ttw:border-border ttw:bg-card",
55
+ "data-testid": l,
56
+ children: [/* @__PURE__ */ o("div", {
57
+ className: "ttw:flex ttw:items-center ttw:gap-2 ttw:border-b ttw:border-border ttw:bg-muted/40 ttw:px-4 ttw:py-3",
58
+ children: [
59
+ /* @__PURE__ */ a("span", {
60
+ "aria-live": "polite",
61
+ className: "ttw:flex-1 ttw:text-base ttw:font-semibold ttw:text-foreground",
62
+ children: n
63
+ }),
64
+ /* @__PURE__ */ a("button", {
65
+ type: "button",
66
+ onClick: i,
67
+ "aria-label": r ? p.expand : p.collapse,
68
+ "aria-expanded": !r,
69
+ className: "ttw:text-muted-foreground ttw:hover:text-foreground",
70
+ children: a(r ? u : c, { className: "ttw:size-4" })
71
+ }),
72
+ /* @__PURE__ */ a("button", {
73
+ type: "button",
74
+ onClick: s,
75
+ "aria-label": p.close,
76
+ className: "ttw:text-muted-foreground ttw:hover:text-foreground",
77
+ children: /* @__PURE__ */ a(f, { className: "ttw:size-4" })
78
+ })
79
+ ]
80
+ }), r ? null : /* @__PURE__ */ a("div", {
81
+ className: "ttw:max-h-96 ttw:overflow-y-auto",
82
+ children: e.map((e) => /* @__PURE__ */ o("div", { children: [e.caption ? /* @__PURE__ */ a("p", {
83
+ className: "ttw:px-4 ttw:pt-3 ttw:pb-1 ttw:text-xs ttw:text-muted-foreground",
84
+ children: e.caption
85
+ }) : null, e.items.map((e) => /* @__PURE__ */ a(h, {
86
+ item: e,
87
+ labels: p
88
+ }, e.id))] }, e.id))
89
+ })]
90
+ });
91
+ }
92
+ //#endregion
93
+ export { g as BillUploadStatusTray, g as default };
@@ -1 +1,2 @@
1
+ import "./index39.js";
1
2
  import "./index41.js";
@@ -0,0 +1,7 @@
1
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index44.js
2
+ var e = {
3
+ message: "Data extracted automatically — please review all details to make sure they match",
4
+ dismiss: "Dismiss this notice"
5
+ };
6
+ //#endregion
7
+ export { e as EXTRACTION_NOTICE_LABELS_EN };
@@ -1,2 +1,30 @@
1
- import "react/jsx-runtime";
2
- import "lucide-react";
1
+ import { EXTRACTION_NOTICE_LABELS_EN as e } from "./index44.js";
2
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
+ import { Info as r, X as i } from "lucide-react";
4
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index45.js
5
+ function a({ onDismiss: a, testId: o, labels: s }) {
6
+ let c = {
7
+ ...e,
8
+ ...s
9
+ };
10
+ return /* @__PURE__ */ n("div", {
11
+ className: "ttw:flex ttw:items-start ttw:gap-3 ttw:rounded-md ttw:border ttw:border-primary/30 ttw:bg-primary/5 ttw:px-3 ttw:py-2.5",
12
+ "data-testid": o,
13
+ children: [
14
+ /* @__PURE__ */ t(r, { className: "ttw:mt-0.5 ttw:size-4 ttw:shrink-0 ttw:text-primary" }),
15
+ /* @__PURE__ */ t("p", {
16
+ className: "ttw:flex-1 ttw:text-sm ttw:text-foreground",
17
+ children: c.message
18
+ }),
19
+ /* @__PURE__ */ t("button", {
20
+ type: "button",
21
+ onClick: a,
22
+ "aria-label": c.dismiss,
23
+ className: "ttw:shrink-0 ttw:text-muted-foreground ttw:hover:text-foreground",
24
+ children: /* @__PURE__ */ t(i, { className: "ttw:size-4" })
25
+ })
26
+ ]
27
+ });
28
+ }
29
+ //#endregion
30
+ export { a as ExtractionNotice, a as default };
@@ -1 +1,2 @@
1
+ import "./index44.js";
1
2
  import "./index45.js";
@@ -1 +1,14 @@
1
+ import { BILL_UPLOAD_DROPZONE_LABELS_EN as e } from "./index2.js";
1
2
  import "./index5.js";
3
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index47.js
4
+ var t = {
5
+ uploadHeading: "Attach an invoice (optional)",
6
+ scannedAttachment: (e) => `Scanned attachment: ${e}`,
7
+ scanning: "Scanning attachment…",
8
+ scanningAttachment: (e) => `Scanning attachment: ${e}`,
9
+ download: "Download the scanned attachment",
10
+ delete: "Delete the scanned attachment",
11
+ dropzone: e
12
+ };
13
+ //#endregion
14
+ export { t as SOURCE_DOCUMENT_PANEL_LABELS_EN };