@tesouro/embedded-components-react 0.2.326 → 0.2.328

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 (134) hide show
  1. package/dist/index.css +3 -0
  2. package/dist/index.d.ts +59 -59
  3. package/dist/index.js +1 -1
  4. package/dist/lib/BillPayWidget.js +1 -1
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index.js +10 -10
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index10.js +119 -33
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index4.js +50 -21
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index5.js +39 -17
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index8.js +1 -1
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index9.js +17 -12
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +10 -10
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +2 -2
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index12.js +45 -17
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index13.js +4 -21
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +9 -24
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +42 -9
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index16.js +25 -50
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index17.js +49 -5
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index18.js +91 -63
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +20 -49
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index20.js +52 -7
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +5 -35
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +67 -113
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +46 -53
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index24.js +80 -205
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +32 -192
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index26.js +117 -62
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +54 -45
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js +205 -31
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +184 -143
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js +63 -33
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js +46 -100
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +32 -7
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index33.js +146 -182
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index34.js +38 -4
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +102 -24
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index36.js +10 -80
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js +200 -78
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js +2 -1
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +27 -2
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +78 -41
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +132 -1
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +3 -53
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +2 -9
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +43 -16
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +1 -8
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +50 -77
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +8 -145
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +18 -5
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +6 -6
  51. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +78 -7
  52. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +138 -75
  53. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +2 -0
  54. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +6 -6
  55. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +7 -113
  56. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +85 -1
  57. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +2 -24
  58. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +8 -0
  59. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +115 -0
  60. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +1 -0
  61. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +25 -0
  62. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +2 -2
  63. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +33 -25
  64. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index12.js +13 -12
  65. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index13.js +58 -13
  66. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index14.js +2 -24
  67. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index15.js +22 -2
  68. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index16.js +23 -31
  69. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index17.js +1 -262
  70. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index18.js +15 -2
  71. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index19.js +23 -6
  72. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index20.js +2 -49
  73. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index21.js +41 -1
  74. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index22.js +271 -20
  75. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index23.js +2 -286
  76. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index24.js +9 -2
  77. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +47 -14
  78. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +2 -120
  79. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index27.js +22 -2
  80. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js +284 -8
  81. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index29.js +2 -96
  82. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index30.js +16 -2
  83. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index31.js +118 -11
  84. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index32.js +1 -57
  85. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index33.js +10 -2
  86. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index34.js +93 -51
  87. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index35.js +1 -138
  88. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index36.js +12 -1
  89. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index37.js +56 -5
  90. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index38.js +2 -44
  91. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index39.js +53 -1
  92. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index40.js +137 -2
  93. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index41.js +2 -16
  94. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index42.js +7 -2
  95. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index43.js +42 -59
  96. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index44.js +2 -238
  97. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index45.js +2 -202
  98. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +61 -8
  99. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index47.js +2 -8
  100. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index48.js +2 -91
  101. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index49.js +16 -0
  102. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index50.js +1 -1
  103. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index51.js +67 -4
  104. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index52.js +248 -25
  105. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index53.js +204 -2
  106. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index54.js +6 -3
  107. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index55.js +6 -32
  108. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index56.js +93 -2
  109. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index58.js +1 -105
  110. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index59.js +7 -2
  111. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js +28 -16
  112. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index61.js +2 -10
  113. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index62.js +4 -167
  114. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index63.js +34 -2
  115. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index64.js +2 -14
  116. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index65.js +10 -87
  117. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index66.js +105 -1
  118. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index67.js +2 -0
  119. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index68.js +18 -0
  120. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index69.js +10 -0
  121. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index70.js +170 -0
  122. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index71.js +2 -0
  123. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index72.js +14 -0
  124. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index73.js +89 -0
  125. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +2 -0
  126. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/data-access/dist/lib/approvalPoliciesApi.js +20 -20
  127. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/index.js +4 -4
  128. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +21 -21
  129. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +142 -102
  130. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/zod.gen.js +8 -3
  131. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  132. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index7.js +1 -1
  133. package/package.json +1 -1
  134. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index57.js +0 -12
@@ -1,4 +1,139 @@
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";
3
+ import "../../../shared/ui/dist/index.js";
4
+ import { BillDetailBody as d } from "./index22.js";
5
+ import "./index23.js";
6
+ import { BillFormFields as f } from "./index25.js";
7
+ import "./index26.js";
8
+ import { LineItemsSection as p } from "./index28.js";
9
+ import "./index29.js";
10
+ import { VendorSection as m } from "./index37.js";
11
+ import "./index38.js";
12
+ import { mergeBillCreateScreenLabels as h } from "./index39.js";
13
+ import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
14
+ import { MoreVertical as y, X as b } from "lucide-react";
1
15
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index40.js
2
- var e = { missing: "Missing" };
16
+ function x({ open: x, onOpenChange: S, title: C, subtitle: w, notice: T, vendor: E, values: D, errors: O, onChange: k, lineItems: A, documentPanel: j, menuItems: M, readOnly: N, detail: P, isLineItemsLoading: F, isSaving: I, isSavingDraft: L, isFinalizing: R, onCancel: z, onSaveDraft: B, onFinalize: V, testId: H, labels: U }) {
17
+ let W = h(U), G = !!(N && P);
18
+ return /* @__PURE__ */ _(t, {
19
+ open: x,
20
+ onOpenChange: S,
21
+ children: /* @__PURE__ */ v(n, {
22
+ showCloseButton: !1,
23
+ 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",
24
+ "data-testid": H,
25
+ children: [
26
+ /* @__PURE__ */ v(i, {
27
+ className: "ttw:flex ttw:flex-row ttw:items-start ttw:justify-between ttw:border-b ttw:border-border ttw:px-6 ttw:py-4",
28
+ children: [/* @__PURE__ */ v("div", {
29
+ className: "ttw:flex ttw:flex-col ttw:gap-0.5",
30
+ children: [
31
+ /* @__PURE__ */ _(a, {
32
+ className: "ttw:text-xl ttw:font-semibold",
33
+ children: C
34
+ }),
35
+ w ? /* @__PURE__ */ _("p", {
36
+ className: "ttw:text-sm ttw:text-muted-foreground",
37
+ children: w
38
+ }) : null,
39
+ /* @__PURE__ */ _(r, {
40
+ className: "ttw:sr-only",
41
+ children: W.hiddenDescription
42
+ })
43
+ ]
44
+ }), /* @__PURE__ */ v("div", {
45
+ className: "ttw:flex ttw:items-center ttw:gap-1",
46
+ children: [M && M.length > 0 ? /* @__PURE__ */ v(o, { children: [/* @__PURE__ */ _(l, {
47
+ asChild: !0,
48
+ children: /* @__PURE__ */ _(e, {
49
+ type: "button",
50
+ variant: "ghost",
51
+ size: "icon",
52
+ "aria-label": W.menuTrigger,
53
+ disabled: I,
54
+ children: /* @__PURE__ */ _(y, { className: "ttw:size-4" })
55
+ })
56
+ }), /* @__PURE__ */ _(s, {
57
+ align: "end",
58
+ children: M.map((e) => /* @__PURE__ */ _(c, {
59
+ variant: e.destructive ? "destructive" : void 0,
60
+ onSelect: e.onSelect,
61
+ children: e.label
62
+ }, e.id))
63
+ })] }) : null, /* @__PURE__ */ _(e, {
64
+ type: "button",
65
+ variant: "ghost",
66
+ size: "icon",
67
+ "aria-label": W.closeButton,
68
+ disabled: I,
69
+ onClick: z,
70
+ children: /* @__PURE__ */ _(b, { className: "ttw:size-4" })
71
+ })]
72
+ })]
73
+ }),
74
+ /* @__PURE__ */ v("div", {
75
+ className: "ttw:grid ttw:flex-1 ttw:grid-cols-2 ttw:overflow-hidden",
76
+ children: [/* @__PURE__ */ v("div", {
77
+ className: "ttw:flex ttw:flex-col ttw:gap-6 ttw:overflow-y-auto ttw:px-6 ttw:py-6",
78
+ children: [
79
+ O?.form ? /* @__PURE__ */ _(u, { children: O.form }) : null,
80
+ T,
81
+ G ? /* @__PURE__ */ _(d, {
82
+ ...P,
83
+ labels: W.detailBody
84
+ }) : /* @__PURE__ */ v(g, { children: [
85
+ /* @__PURE__ */ _(m, {
86
+ ...E,
87
+ onEdit: N ? void 0 : E.onEdit,
88
+ onClear: N ? void 0 : E.onClear,
89
+ disabled: N,
90
+ labels: W.vendorSection
91
+ }),
92
+ /* @__PURE__ */ _(f, {
93
+ values: D,
94
+ errors: O,
95
+ onChange: k,
96
+ disabled: N,
97
+ labels: W.detailsFields
98
+ }),
99
+ /* @__PURE__ */ _(p, {
100
+ ...A,
101
+ disabled: A.disabled || F || N,
102
+ labels: W.lineItems
103
+ })
104
+ ] })
105
+ ]
106
+ }), /* @__PURE__ */ _("div", {
107
+ className: "ttw:overflow-y-auto ttw:bg-muted/30 ttw:px-6 ttw:py-6",
108
+ children: j
109
+ })]
110
+ }),
111
+ G ? null : /* @__PURE__ */ v("div", {
112
+ className: "ttw:flex ttw:justify-end ttw:gap-2 ttw:border-t ttw:border-border ttw:px-6 ttw:py-4",
113
+ children: [/* @__PURE__ */ _(e, {
114
+ type: "button",
115
+ variant: "ghost",
116
+ disabled: I,
117
+ onClick: z,
118
+ children: N ? W.closeButton : W.cancelButton
119
+ }), N ? null : /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(e, {
120
+ type: "button",
121
+ variant: "secondary",
122
+ onClick: B,
123
+ loading: L,
124
+ disabled: R || F || E.mode === "creating",
125
+ children: W.saveDraftButton
126
+ }), /* @__PURE__ */ _(e, {
127
+ type: "button",
128
+ onClick: V,
129
+ loading: R,
130
+ disabled: L || F || E.mode === "creating",
131
+ children: W.finalizeButton
132
+ })] })]
133
+ })
134
+ ]
135
+ })
136
+ });
137
+ }
3
138
  //#endregion
4
- export { e as MISSING_VALUE_LABELS_EN };
139
+ export { x as BillCreateScreen, x as default };
@@ -1,16 +1,2 @@
1
- import { cn as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { MISSING_VALUE_LABELS_EN as t } from "./index40.js";
3
- import { jsx as n } from "react/jsx-runtime";
4
- //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index41.js
5
- function r({ labels: r, className: i }) {
6
- let a = {
7
- ...t,
8
- ...r
9
- };
10
- return /* @__PURE__ */ n("span", {
11
- className: e("ttw:text-amber-700", i),
12
- children: a.missing
13
- });
14
- }
15
- //#endregion
16
- export { r as MissingValue, r as default };
1
+ import "./index39.js";
2
+ import "./index40.js";
@@ -1,2 +1,7 @@
1
- import "./index40.js";
2
- import "./index41.js";
1
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index42.js
2
+ var e = {
3
+ title: "Bill pay",
4
+ description: "Review, approve, and pay your bills."
5
+ };
6
+ //#endregion
7
+ export { e as DEFAULT_LABELS };
@@ -1,61 +1,44 @@
1
- import { DATA_TABLE_LABELS_EN as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { ADD_BILL_PANEL_LABELS_EN as t } from "./index6.js";
3
- import "./index8.js";
4
- import { BILL_STATUS_BADGE_LABELS_EN as n } from "./index13.js";
5
- import "./index15.js";
6
- import { MISSING_VALUE_LABELS_EN as r } from "./index40.js";
7
- import "./index42.js";
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
5
+ import { Tabs as e, TabsContent as t, TabsList as n, TabsTrigger as r } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
6
+ import { DEFAULT_LABELS as i } from "./index42.js";
7
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
8
8
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index43.js
9
- var i = {
10
- loadingTitle: "Loading bill…",
11
- hiddenDescription: "Bill details",
12
- errorTitle: "Couldn't load this bill",
13
- errorDescription: "Something went wrong. Try again.",
14
- amountDueHeading: "Amount due",
15
- invoiceDateLabel: "Invoice date",
16
- dueDateLabel: "Due date",
17
- payToHeading: "Pay to",
18
- invoiceDetailsHeading: "Invoice details",
19
- lineItemsHeading: "Line items",
20
- lineItemsQuantityHeading: "Qty/Price",
21
- lineItemsAmountHeading: "Amount",
22
- payButton: "Pay",
23
- markAsPaidButton: "Mark as paid",
24
- rejectButton: "Reject",
25
- expandButton: "Open full screen",
26
- closeButton: "Close",
27
- statusBadge: n
28
- }, a = ".pdf,.png,.jpg,.jpeg,.doc,.docx", o = {
29
- ...t,
30
- dropzone: {
31
- ...t.dropzone,
32
- fileTypesHint: "PDF, DOC, JPG, or PNG (max. 3MB)"
33
- }
34
- }, s = {
35
- createButton: "Add bill",
36
- columnVendor: "Vendor",
37
- columnDueDate: "Due date",
38
- columnAmountDue: "Amount due",
39
- columnStatus: "Status",
40
- columnAddedOn: "Added on",
41
- columnActions: "Actions",
42
- openRow: (e) => `View bill — ${e}`,
43
- searchPlaceholder: "Search by vendor name",
44
- searchLabel: "Search bills by vendor name",
45
- filterTabsLabel: "Filter bills by status",
46
- filteredEmptyTitle: "No bills match",
47
- filteredEmptyDescription: "Try a different search or status filter.",
48
- errorTitle: "Couldn't load bills",
49
- errorDescription: "Something went wrong. Try again.",
50
- errorRetry: "Retry",
51
- statusBadge: n,
52
- addBill: o,
53
- sortableHeader: {
54
- sortedAscending: e.sortedAscending,
55
- sortedDescending: e.sortedDescending,
56
- notSorted: e.notSorted
57
- },
58
- missingValue: r
59
- };
9
+ function s({ labels: s, tabs: c, selectedTabId: l, onTabChange: u }) {
10
+ let d = {
11
+ ...i,
12
+ ...s
13
+ };
14
+ return /* @__PURE__ */ o("section", {
15
+ className: "ttw:w-full ttw:space-y-5",
16
+ children: [/* @__PURE__ */ o("div", {
17
+ className: "ttw:min-w-0",
18
+ children: [/* @__PURE__ */ a("h2", {
19
+ className: "ttw:text-xl ttw:font-semibold ttw:text-foreground",
20
+ children: d.title
21
+ }), /* @__PURE__ */ a("p", {
22
+ className: "ttw:mt-1 ttw:text-sm ttw:text-muted-foreground",
23
+ children: d.description
24
+ })]
25
+ }), /* @__PURE__ */ o(e, {
26
+ value: l,
27
+ onValueChange: u,
28
+ className: "ttw:w-full",
29
+ children: [/* @__PURE__ */ a(n, {
30
+ variant: "line",
31
+ children: c.map((e) => /* @__PURE__ */ a(r, {
32
+ value: e.id,
33
+ children: e.label
34
+ }, e.id))
35
+ }), c.map((e) => /* @__PURE__ */ a(t, {
36
+ value: e.id,
37
+ className: "ttw:mt-6",
38
+ children: e.content
39
+ }, e.id))]
40
+ })]
41
+ });
42
+ }
60
43
  //#endregion
61
- export { s as BILLS_SCREEN_LABELS_EN, a as BILLS_SCREEN_UPLOAD_ACCEPT, i as BILL_DETAILS_SHEET_LABELS_EN };
44
+ export { s as BillPayWidgetUi };
@@ -1,238 +1,2 @@
1
- import { Button as e, Collapsible as t, CollapsibleContent as n, CollapsibleTrigger as r, Sheet as i, SheetContent as a, SheetDescription as o, SheetHeader as s, SheetTitle as c, Skeleton as l, Typography as u } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { BillStatusBadge as d } from "./index14.js";
3
- import "./index15.js";
4
- import { BillActionButtons as f } from "./index12.js";
5
- import { BILL_DETAILS_SHEET_LABELS_EN as p } from "./index43.js";
6
- import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
7
- import { ChevronDownIcon as _, MoveDiagonal2Icon as v, XIcon as y } from "lucide-react";
8
- //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index44.js
9
- function b({ items: e }) {
10
- return /* @__PURE__ */ h("dl", {
11
- className: "ttw:flex ttw:flex-col",
12
- children: e.map((e) => /* @__PURE__ */ g("div", {
13
- className: "ttw:flex ttw:items-start ttw:justify-between ttw:gap-6 ttw:border-b ttw:border-border ttw:py-3 ttw:last:border-b-0",
14
- children: [/* @__PURE__ */ h("dt", {
15
- className: "ttw:text-sm ttw:text-muted-foreground",
16
- children: e.label
17
- }), /* @__PURE__ */ g("dd", {
18
- className: "ttw:flex ttw:flex-col ttw:items-end ttw:text-right",
19
- children: [/* @__PURE__ */ h("span", {
20
- className: "ttw:text-sm ttw:font-medium",
21
- children: e.value
22
- }), e.secondaryValue ? /* @__PURE__ */ h("span", {
23
- className: "ttw:text-sm ttw:text-muted-foreground",
24
- children: e.secondaryValue
25
- }) : null]
26
- })]
27
- }, e.label))
28
- });
29
- }
30
- function x({ heading: e, children: i }) {
31
- return /* @__PURE__ */ g(t, {
32
- defaultOpen: !0,
33
- className: "ttw:flex ttw:flex-col ttw:gap-3",
34
- children: [/* @__PURE__ */ g(r, {
35
- className: "ttw:group ttw:flex ttw:w-full ttw:items-center ttw:justify-between ttw:rounded-xs ttw:focus-visible:ring-2 ttw:focus-visible:ring-ring ttw:focus-visible:outline-hidden",
36
- children: [/* @__PURE__ */ h(u, {
37
- variant: "body1",
38
- className: "ttw:font-semibold",
39
- children: e
40
- }), /* @__PURE__ */ h(_, { className: "ttw:size-4 ttw:text-muted-foreground ttw:transition-transform ttw:group-data-[state=closed]:-rotate-90" })]
41
- }), /* @__PURE__ */ h(n, { children: i })]
42
- });
43
- }
44
- function S({ open: t, onOpenChange: n, details: r, actions: u = [], isLoading: _, isError: S, notice: C, onClose: w, onExpand: T, testId: E, labels: D }) {
45
- let O = {
46
- ...p,
47
- ...D,
48
- statusBadge: {
49
- ...p.statusBadge,
50
- ...D?.statusBadge
51
- }
52
- };
53
- return /* @__PURE__ */ h(i, {
54
- open: t,
55
- onOpenChange: (e) => e ? n(e) : w(),
56
- children: /* @__PURE__ */ g(a, {
57
- showCloseButton: !1,
58
- className: "ttw:w-150 ttw:gap-0 ttw:overflow-y-auto ttw:sm:max-w-150",
59
- "data-testid": E,
60
- children: [/* @__PURE__ */ g(s, {
61
- className: "ttw:flex ttw:flex-row ttw:items-start ttw:justify-between ttw:gap-3",
62
- children: [/* @__PURE__ */ g("div", {
63
- className: "ttw:flex ttw:flex-col ttw:gap-0.5",
64
- children: [
65
- /* @__PURE__ */ h(c, {
66
- className: _ ? "ttw:sr-only" : "ttw:text-xl ttw:font-semibold",
67
- children: S ? O.errorTitle : _ ? O.loadingTitle : r?.title
68
- }),
69
- _ ? /* @__PURE__ */ g("div", {
70
- "aria-hidden": !0,
71
- className: "ttw:flex ttw:flex-col ttw:gap-2 ttw:py-1",
72
- children: [/* @__PURE__ */ h(l, { className: "ttw:h-6 ttw:w-48" }), /* @__PURE__ */ h(l, { className: "ttw:h-4 ttw:w-28" })]
73
- }) : null,
74
- r && !_ && !S ? /* @__PURE__ */ h("p", {
75
- className: "ttw:text-sm ttw:text-muted-foreground",
76
- children: r.subtitle
77
- }) : null,
78
- /* @__PURE__ */ h(o, {
79
- className: "ttw:sr-only",
80
- children: O.hiddenDescription
81
- })
82
- ]
83
- }), /* @__PURE__ */ g("div", {
84
- className: "ttw:flex ttw:items-center ttw:gap-1",
85
- children: [T ? /* @__PURE__ */ h(e, {
86
- type: "button",
87
- variant: "ghost",
88
- size: "icon",
89
- "aria-label": O.expandButton,
90
- onClick: T,
91
- children: /* @__PURE__ */ h(v, { className: "ttw:size-4" })
92
- }) : null, /* @__PURE__ */ h(e, {
93
- type: "button",
94
- variant: "ghost",
95
- size: "icon",
96
- "aria-label": O.closeButton,
97
- onClick: w,
98
- children: /* @__PURE__ */ h(y, { className: "ttw:size-4" })
99
- })]
100
- })]
101
- }), /* @__PURE__ */ h("div", {
102
- className: "ttw:flex ttw:flex-col ttw:gap-6 ttw:px-6 ttw:pb-6",
103
- children: S ? /* @__PURE__ */ h("p", {
104
- className: "ttw:text-sm ttw:text-muted-foreground",
105
- children: O.errorDescription
106
- }) : _ ? /* @__PURE__ */ g("div", {
107
- className: "ttw:flex ttw:flex-col ttw:gap-6",
108
- children: [/* @__PURE__ */ h(l, { className: "ttw:h-32 ttw:w-full" }), /* @__PURE__ */ g("div", {
109
- className: "ttw:flex ttw:flex-col ttw:gap-2",
110
- children: [
111
- /* @__PURE__ */ h(l, { className: "ttw:h-4 ttw:w-40" }),
112
- /* @__PURE__ */ h(l, { className: "ttw:h-9 ttw:w-full" }),
113
- /* @__PURE__ */ h(l, { className: "ttw:h-9 ttw:w-full" })
114
- ]
115
- })]
116
- }) : r ? /* @__PURE__ */ g(m, { children: [
117
- C,
118
- /* @__PURE__ */ g("section", {
119
- className: "ttw:flex ttw:flex-col ttw:gap-3 ttw:rounded-lg ttw:bg-muted/50 ttw:p-4",
120
- children: [
121
- /* @__PURE__ */ g("div", {
122
- className: "ttw:flex ttw:flex-col ttw:gap-2",
123
- children: [
124
- /* @__PURE__ */ h("span", {
125
- className: "ttw:text-sm ttw:text-muted-foreground",
126
- children: O.amountDueHeading
127
- }),
128
- /* @__PURE__ */ h("span", {
129
- className: "ttw:text-3xl ttw:font-semibold",
130
- children: r.amountDueLabel
131
- }),
132
- /* @__PURE__ */ h("div", { children: /* @__PURE__ */ h(d, {
133
- status: r.status,
134
- tone: r.statusTone,
135
- labels: O.statusBadge
136
- }) })
137
- ]
138
- }),
139
- /* @__PURE__ */ g("div", {
140
- className: "ttw:grid ttw:grid-cols-2 ttw:gap-x-6 ttw:gap-y-1",
141
- children: [/* @__PURE__ */ g("div", {
142
- className: "ttw:flex ttw:flex-col",
143
- children: [/* @__PURE__ */ h("span", {
144
- className: "ttw:text-xs ttw:text-muted-foreground",
145
- children: O.invoiceDateLabel
146
- }), /* @__PURE__ */ h("span", {
147
- className: "ttw:text-sm ttw:font-medium",
148
- children: r.invoiceDateLabel
149
- })]
150
- }), /* @__PURE__ */ g("div", {
151
- className: "ttw:flex ttw:flex-col",
152
- children: [/* @__PURE__ */ h("span", {
153
- className: "ttw:text-xs ttw:text-muted-foreground",
154
- children: O.dueDateLabel
155
- }), /* @__PURE__ */ h("span", {
156
- className: "ttw:text-sm ttw:font-medium",
157
- children: r.dueDateLabel
158
- })]
159
- })]
160
- }),
161
- u.length ? /* @__PURE__ */ h("div", {
162
- className: "ttw:flex ttw:gap-2",
163
- children: /* @__PURE__ */ h(f, { actions: u })
164
- }) : null
165
- ]
166
- }),
167
- /* @__PURE__ */ h(x, {
168
- heading: O.payToHeading,
169
- children: /* @__PURE__ */ h(b, { items: r.payToItems })
170
- }),
171
- /* @__PURE__ */ h(x, {
172
- heading: O.invoiceDetailsHeading,
173
- children: /* @__PURE__ */ g("div", {
174
- className: "ttw:flex ttw:flex-col ttw:gap-4",
175
- children: [
176
- /* @__PURE__ */ h(b, { items: r.invoiceItems }),
177
- r.lineItems.length ? /* @__PURE__ */ g("table", {
178
- className: "ttw:w-full ttw:text-sm",
179
- children: [/* @__PURE__ */ h("thead", { children: /* @__PURE__ */ g("tr", {
180
- className: "ttw:bg-muted/50 ttw:text-xs ttw:text-muted-foreground",
181
- children: [
182
- /* @__PURE__ */ h("th", {
183
- className: "ttw:px-3 ttw:py-2 ttw:text-left ttw:font-normal",
184
- children: O.lineItemsHeading
185
- }),
186
- /* @__PURE__ */ h("th", {
187
- className: "ttw:px-3 ttw:py-2 ttw:text-right ttw:font-normal",
188
- children: O.lineItemsQuantityHeading
189
- }),
190
- /* @__PURE__ */ h("th", {
191
- className: "ttw:px-3 ttw:py-2 ttw:text-right ttw:font-normal",
192
- children: O.lineItemsAmountHeading
193
- })
194
- ]
195
- }) }), /* @__PURE__ */ h("tbody", { children: r.lineItems.map((e) => /* @__PURE__ */ g("tr", {
196
- className: "ttw:border-b ttw:border-border",
197
- children: [
198
- /* @__PURE__ */ g("td", {
199
- className: "ttw:px-3 ttw:py-2",
200
- children: [/* @__PURE__ */ h("span", {
201
- className: "ttw:block",
202
- children: e.description
203
- }), /* @__PURE__ */ h("span", {
204
- className: "ttw:block ttw:text-xs ttw:text-muted-foreground",
205
- children: e.glCodeLabel
206
- })]
207
- }),
208
- /* @__PURE__ */ h("td", {
209
- className: "ttw:px-3 ttw:py-2 ttw:text-right ttw:whitespace-nowrap ttw:text-muted-foreground",
210
- children: e.quantityLabel
211
- }),
212
- /* @__PURE__ */ h("td", {
213
- className: "ttw:px-3 ttw:py-2 ttw:text-right ttw:whitespace-nowrap",
214
- children: e.amountLabel
215
- })
216
- ]
217
- }, e.id)) })]
218
- }) : null,
219
- /* @__PURE__ */ h("dl", {
220
- className: "ttw:flex ttw:flex-col ttw:gap-1",
221
- children: r.totals.map((e) => /* @__PURE__ */ g("div", {
222
- className: e.emphasis ? "ttw:flex ttw:justify-between ttw:gap-6 ttw:border-t ttw:border-border ttw:pt-2 ttw:text-base ttw:font-semibold" : "ttw:flex ttw:justify-between ttw:gap-6 ttw:text-sm",
223
- children: [/* @__PURE__ */ h("dt", {
224
- className: e.emphasis ? "" : "ttw:text-muted-foreground",
225
- children: e.label
226
- }), /* @__PURE__ */ h("dd", { children: e.value })]
227
- }, e.label))
228
- })
229
- ]
230
- })
231
- })
232
- ] }) : null
233
- })]
234
- })
235
- });
236
- }
237
- //#endregion
238
- export { S as BillDetailsSheet, S as default };
1
+ import "./index42.js";
2
+ import "./index43.js";