@tesouro/embedded-components-react 0.5.75 → 0.5.76

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 (88) hide show
  1. package/dist/index.css +0 -8
  2. package/dist/index.js +1 -1
  3. package/dist/lib/BillPayWidget.js +1 -1
  4. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +8 -8
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +140 -7
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +46 -140
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +114 -47
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +163 -112
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +75 -164
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +21 -75
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +71 -23
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +376 -65
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +12 -381
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +84 -12
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +54 -79
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +223 -54
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +37 -223
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +245 -37
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +21 -252
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +571 -21
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +4 -572
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +44 -4
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +247 -38
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +3 -234
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +4 -3
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +44 -2
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +1 -46
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +8 -1
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +11 -6
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +127 -11
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +3 -129
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +127 -3
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +8 -124
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +7 -8
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +47 -8
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +18 -44
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +28 -20
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +82 -27
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index79.js +47 -83
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index80.js +250 -47
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +123 -241
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js +211 -126
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index83.js +3 -219
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index84.js +7 -4
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index85.js +98 -5
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index86.js +1 -100
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index87.js +26 -0
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +10 -10
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index30.js +2 -72
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index31.js +12 -269
  51. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index33.js +2 -19
  52. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index34.js +16 -50
  53. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index36.js +97 -15
  54. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index37.js +76 -47
  55. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index38.js +277 -2
  56. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index39.js +2 -35
  57. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index40.js +16 -369
  58. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index41.js +56 -2
  59. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index42.js +2 -23
  60. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index43.js +15 -93
  61. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index44.js +50 -2
  62. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index45.js +1 -31
  63. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +32 -49
  64. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index47.js +374 -2
  65. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index48.js +1 -55
  66. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index49.js +20 -10
  67. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index50.js +87 -188
  68. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index51.js +1 -1
  69. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index52.js +30 -2
  70. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index53.js +48 -37
  71. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index55.js +47 -10
  72. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index56.js +10 -85
  73. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index57.js +197 -2
  74. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index58.js +2 -4
  75. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index59.js +2 -14
  76. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js +41 -2
  77. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index61.js +2 -4
  78. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index62.js +14 -17
  79. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index63.js +88 -2
  80. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index64.js +1 -94
  81. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index65.js +167 -161
  82. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +5 -5
  83. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  84. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/auditHistory/buildPayableAuditHistory.js +5 -1
  85. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +1 -1
  86. package/dist/packages/shared-ui-shadcn/dist/index.js +1391 -1369
  87. package/package.json +1 -1
  88. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index88.js +0 -27
@@ -1,2 +1,197 @@
1
- import "./index55.js";
2
- import "./index56.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, DropdownMenuGroup as c, DropdownMenuItem as l, DropdownMenuLabel as ee, DropdownMenuSeparator as u, DropdownMenuTrigger as d, RequiredFieldsLegend as f } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { InlineErrorAlert as te } from "../../../shared/ui/dist/lib/InlineErrorAlert/InlineErrorAlert.js";
3
+ import "../../../shared/ui/dist/index.js";
4
+ import { BillDetailBody as p } from "./index38.js";
5
+ import "./index39.js";
6
+ import { BillFormFields as m } from "./index41.js";
7
+ import "./index42.js";
8
+ import { groupBySectionHeading as h } from "./index43.js";
9
+ import "./index45.js";
10
+ import { LineItemsSection as g } from "./index47.js";
11
+ import "./index48.js";
12
+ import { VendorSection as _ } from "./index53.js";
13
+ import "./index54.js";
14
+ import { mergeBillCreateScreenLabels as v } from "./index55.js";
15
+ import { useFocusFirstInvalidField as y } from "./index56.js";
16
+ import { Fragment as b, useId as x } from "react";
17
+ import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
18
+ import { Minimize2 as ne, MoreVertical as T, X as E } from "lucide-react";
19
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index57.js
20
+ function D({ open: D, onOpenChange: O, title: k, subtitle: A, notice: j, vendor: M, values: N, errors: P, onChange: F, lineItems: I, documentPanel: L, menuItems: R, readOnly: z, detail: B, detailEdit: V, isLineItemsLoading: H, isSaving: U, isSavingDraft: W, isSubmitting: G, showSubmit: K = !0, onCancel: q, onCollapse: J, onSaveDraft: Y, onFinalize: X, scrollToErrorToken: Z, testId: re, labels: ie }) {
21
+ let ae = x(), Q = v(ie), $ = !!(z && B), oe = R ? h(R) : [], se = y(Z);
22
+ return /* @__PURE__ */ C(t, {
23
+ open: D,
24
+ onOpenChange: O,
25
+ children: /* @__PURE__ */ w(n, {
26
+ showCloseButton: !1,
27
+ 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",
28
+ "data-testid": re,
29
+ children: [
30
+ /* @__PURE__ */ w(i, {
31
+ className: "ttw:flex ttw:flex-row ttw:items-start ttw:justify-between ttw:border-b ttw:border-border ttw:px-6 ttw:py-4",
32
+ children: [/* @__PURE__ */ w("div", {
33
+ className: "ttw:flex ttw:flex-col ttw:gap-0.5",
34
+ children: [
35
+ /* @__PURE__ */ C(a, {
36
+ className: "ttw:text-xl ttw:font-semibold",
37
+ children: k
38
+ }),
39
+ A ? /* @__PURE__ */ C("p", {
40
+ className: "ttw:text-sm ttw:text-muted-foreground",
41
+ children: A
42
+ }) : null,
43
+ /* @__PURE__ */ C(r, {
44
+ className: "ttw:sr-only",
45
+ children: Q.hiddenDescription
46
+ })
47
+ ]
48
+ }), /* @__PURE__ */ w("div", {
49
+ className: "ttw:flex ttw:items-center ttw:gap-1",
50
+ children: [
51
+ J ? /* @__PURE__ */ C(e, {
52
+ type: "button",
53
+ variant: "ghost",
54
+ size: "icon",
55
+ "aria-label": Q.collapseButton,
56
+ disabled: U,
57
+ onClick: J,
58
+ children: /* @__PURE__ */ C(ne, { className: "ttw:size-4 ttw:rotate-90" })
59
+ }) : null,
60
+ R && R.length > 0 ? /* @__PURE__ */ w(o, { children: [/* @__PURE__ */ C(d, {
61
+ asChild: !0,
62
+ children: /* @__PURE__ */ C(e, {
63
+ type: "button",
64
+ variant: "ghost",
65
+ size: "icon",
66
+ "aria-label": Q.menuTrigger,
67
+ disabled: U,
68
+ children: /* @__PURE__ */ C(T, { className: "ttw:size-4" })
69
+ })
70
+ }), /* @__PURE__ */ C(s, {
71
+ align: "end",
72
+ children: oe.map((e, t) => {
73
+ let n = e.items.map((e) => {
74
+ let t = e.icon;
75
+ return /* @__PURE__ */ w(l, {
76
+ variant: e.destructive ? "destructive" : void 0,
77
+ disabled: e.disabled,
78
+ onSelect: e.onSelect,
79
+ children: [t ? /* @__PURE__ */ C(t, { className: "ttw:size-4" }) : null, e.label]
80
+ }, e.id);
81
+ });
82
+ if (!e.heading) return /* @__PURE__ */ C(b, { children: n }, e.items[0]?.id);
83
+ let r = `${ae}-${t}`;
84
+ return /* @__PURE__ */ w(b, { children: [
85
+ t > 0 ? /* @__PURE__ */ C(u, {}) : null,
86
+ /* @__PURE__ */ C(ee, {
87
+ id: r,
88
+ className: "ttw:py-1 ttw:text-xs ttw:font-medium ttw:text-muted-foreground",
89
+ children: e.heading
90
+ }),
91
+ /* @__PURE__ */ C(c, {
92
+ "aria-labelledby": r,
93
+ children: n
94
+ })
95
+ ] }, e.items[0]?.id);
96
+ })
97
+ })] }) : null,
98
+ /* @__PURE__ */ C(e, {
99
+ type: "button",
100
+ variant: "ghost",
101
+ size: "icon",
102
+ "aria-label": Q.closeButton,
103
+ disabled: U,
104
+ onClick: q,
105
+ children: /* @__PURE__ */ C(E, { className: "ttw:size-4" })
106
+ })
107
+ ]
108
+ })]
109
+ }),
110
+ /* @__PURE__ */ w("div", {
111
+ className: "ttw:grid ttw:flex-1 ttw:grid-cols-2 ttw:overflow-hidden",
112
+ children: [/* @__PURE__ */ w("div", {
113
+ ref: se,
114
+ className: "ttw:flex ttw:flex-col ttw:gap-6 ttw:overflow-y-auto ttw:px-6 ttw:py-6",
115
+ children: [
116
+ P?.form ? /* @__PURE__ */ C("div", {
117
+ "data-invalid": "true",
118
+ children: /* @__PURE__ */ C(te, { children: P.form })
119
+ }) : null,
120
+ j ? /* @__PURE__ */ C("div", {
121
+ className: "ttw:flex ttw:flex-col ttw:gap-3",
122
+ children: j
123
+ }) : null,
124
+ $ ? /* @__PURE__ */ C(p, {
125
+ ...B,
126
+ labels: Q.detailBody
127
+ }) : /* @__PURE__ */ w(S, { children: [
128
+ /* @__PURE__ */ C(f, { labels: Q.requiredFieldsLegend }),
129
+ /* @__PURE__ */ C(_, {
130
+ ...M,
131
+ onEdit: z ? void 0 : M.onEdit,
132
+ disabled: z,
133
+ labels: Q.vendorSection
134
+ }),
135
+ /* @__PURE__ */ C(m, {
136
+ values: N,
137
+ errors: P,
138
+ onChange: F,
139
+ disabled: z,
140
+ labels: Q.detailsFields
141
+ }),
142
+ /* @__PURE__ */ C(g, {
143
+ ...I,
144
+ disabled: I.disabled || H || z,
145
+ labels: Q.lineItems
146
+ })
147
+ ] })
148
+ ]
149
+ }), /* @__PURE__ */ C("div", {
150
+ className: "ttw:overflow-y-auto ttw:bg-muted/30 ttw:px-6 ttw:py-6",
151
+ children: L
152
+ })]
153
+ }),
154
+ $ ? V ? /* @__PURE__ */ w("div", {
155
+ className: "ttw:flex ttw:justify-end ttw:gap-2 ttw:border-t ttw:border-border ttw:px-6 ttw:py-4",
156
+ children: [/* @__PURE__ */ C(e, {
157
+ type: "button",
158
+ variant: "ghost",
159
+ disabled: V.isSaving,
160
+ onClick: V.onCancel,
161
+ children: Q.cancelButton
162
+ }), /* @__PURE__ */ C(e, {
163
+ type: "button",
164
+ onClick: V.onSave,
165
+ loading: V.isSaving,
166
+ disabled: V.isSaving,
167
+ children: Q.saveButton
168
+ })]
169
+ }) : null : /* @__PURE__ */ w("div", {
170
+ className: "ttw:flex ttw:justify-end ttw:gap-2 ttw:border-t ttw:border-border ttw:px-6 ttw:py-4",
171
+ children: [/* @__PURE__ */ C(e, {
172
+ type: "button",
173
+ variant: "ghost",
174
+ disabled: U,
175
+ onClick: q,
176
+ children: z ? Q.closeButton : Q.cancelButton
177
+ }), z ? null : /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C(e, {
178
+ type: "button",
179
+ variant: K ? "secondary" : "default",
180
+ onClick: Y,
181
+ loading: W,
182
+ disabled: U || G || H,
183
+ children: Q.saveDraftButton
184
+ }), K ? /* @__PURE__ */ C(e, {
185
+ type: "button",
186
+ onClick: X,
187
+ loading: G,
188
+ disabled: U || W || H,
189
+ children: Q.submitButton
190
+ }) : null] })]
191
+ })
192
+ ]
193
+ })
194
+ });
195
+ }
196
+ //#endregion
197
+ export { D as BillCreateScreen, D as default };
@@ -1,4 +1,2 @@
1
- //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index58.js
2
- var e = { missing: "Missing" };
3
- //#endregion
4
- export { e as MISSING_VALUE_LABELS_EN };
1
+ import "./index55.js";
2
+ import "./index57.js";
@@ -1,16 +1,4 @@
1
- import { cn as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { MISSING_VALUE_LABELS_EN as t } from "./index58.js";
3
- import { jsx as n } from "react/jsx-runtime";
4
1
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index59.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
- }
2
+ var e = {};
15
3
  //#endregion
16
- export { r as MissingValue, r as default };
4
+ export { e as DEFAULT_LABELS };
@@ -1,2 +1,41 @@
1
- import "./index58.js";
2
- import "./index59.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 "./index59.js";
7
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
8
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js
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: [d.description ? /* @__PURE__ */ a("div", {
17
+ className: "ttw:min-w-0",
18
+ children: /* @__PURE__ */ a("p", {
19
+ className: "ttw:text-sm ttw:text-muted-foreground",
20
+ children: d.description
21
+ })
22
+ }) : null, /* @__PURE__ */ o(e, {
23
+ value: l,
24
+ onValueChange: u,
25
+ className: "ttw:w-full",
26
+ children: [/* @__PURE__ */ a(n, {
27
+ variant: "line",
28
+ children: c.map((e) => /* @__PURE__ */ a(r, {
29
+ value: e.id,
30
+ children: e.label
31
+ }, e.id))
32
+ }), c.map((e) => /* @__PURE__ */ a(t, {
33
+ value: e.id,
34
+ className: "ttw:mt-6",
35
+ children: e.content
36
+ }, e.id))]
37
+ })]
38
+ });
39
+ }
40
+ //#endregion
41
+ export { s as BillPayWidgetUi };
@@ -1,4 +1,2 @@
1
- //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index61.js
2
- var e = { none: "None" };
3
- //#endregion
4
- export { e as NO_VALUE_LABELS_EN };
1
+ import "./index59.js";
2
+ import "./index60.js";
@@ -1,22 +1,19 @@
1
- import { cn as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { NO_VALUE_LABELS_EN as t } from "./index61.js";
3
- import { jsx as n, jsxs as r } from "react/jsx-runtime";
1
+ import { LABEL_LABELS_EN as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
4
2
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index62.js
5
- function i({ labels: i, className: a }) {
6
- let o = {
3
+ var t = {
4
+ cancelButton: "Cancel",
5
+ orConnector: "or",
6
+ fieldMarkers: e
7
+ };
8
+ function n(e) {
9
+ return {
7
10
  ...t,
8
- ...i
11
+ ...e,
12
+ fieldMarkers: {
13
+ ...t.fieldMarkers,
14
+ ...e?.fieldMarkers
15
+ }
9
16
  };
10
- return /* @__PURE__ */ r("span", {
11
- className: e("ttw:text-muted-foreground", a),
12
- children: [/* @__PURE__ */ n("span", {
13
- "aria-hidden": !0,
14
- children: "—"
15
- }), /* @__PURE__ */ n("span", {
16
- className: "ttw:sr-only",
17
- children: o.none
18
- })]
19
- });
20
17
  }
21
18
  //#endregion
22
- export { i as NoValue, i as default };
19
+ export { t as BILL_DECISION_DIALOG_LABELS_EN, n as mergeBillDecisionDialogLabels };
@@ -1,2 +1,88 @@
1
- import "./index61.js";
2
- import "./index62.js";
1
+ import { AlertDialog as e, AlertDialogContent as t, AlertDialogDescription as n, AlertDialogFooter as r, AlertDialogHeader as i, AlertDialogTitle as a, Button as o, FieldRequirement as s, Label as c, Textarea as l } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { mergeBillDecisionDialogLabels as u } from "./index62.js";
3
+ import { Fragment as d, useEffect as f, useState as p } from "react";
4
+ import { jsx as m, jsxs as h } from "react/jsx-runtime";
5
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index63.js
6
+ function g({ open: g, copy: _, onConfirm: v, onCancel: y, isPending: b, confirmIcon: x, labels: S, testId: C, confirmTestId: w, reasonTestId: T, reasonFieldId: E = "bill-decision-reason" }) {
7
+ let D = u(S), [O, k] = p("");
8
+ if (f(() => {
9
+ g || k("");
10
+ }, [g]), !_) return null;
11
+ let { alignment: A = "start", icon: j, tone: M = "default", actionWidth: N = "auto" } = _.presentation ?? {}, P = A === "center", F = N === "equal", I = _.pendingApprovers ?? [];
12
+ return /* @__PURE__ */ m(e, {
13
+ open: g,
14
+ onOpenChange: (e) => {
15
+ e || y();
16
+ },
17
+ children: /* @__PURE__ */ h(t, {
18
+ "data-testid": C,
19
+ children: [
20
+ /* @__PURE__ */ h(i, {
21
+ className: P ? "ttw:items-center ttw:sm:text-center" : void 0,
22
+ children: [
23
+ j ? /* @__PURE__ */ m("span", {
24
+ className: M === "destructive" ? "ttw:flex ttw:size-11 ttw:items-center ttw:justify-center ttw:rounded-full ttw:bg-destructive" : "ttw:flex ttw:size-11 ttw:items-center ttw:justify-center ttw:rounded-full ttw:bg-muted",
25
+ children: /* @__PURE__ */ m(j, { className: M === "destructive" ? "ttw:size-4 ttw:text-white" : "ttw:size-4 ttw:text-foreground" })
26
+ }) : null,
27
+ /* @__PURE__ */ m(a, { children: _.title }),
28
+ /* @__PURE__ */ m(n, { children: _.description })
29
+ ]
30
+ }),
31
+ I.length > 0 ? /* @__PURE__ */ m("div", {
32
+ className: "ttw:flex ttw:flex-col ttw:items-center ttw:gap-1 ttw:rounded-md ttw:bg-muted ttw:px-3 ttw:py-3",
33
+ children: /* @__PURE__ */ m("ul", {
34
+ className: "ttw:flex ttw:flex-col ttw:items-center ttw:gap-1",
35
+ children: I.map((e) => /* @__PURE__ */ m("li", {
36
+ className: "ttw:list-disc ttw:text-sm ttw:text-foreground",
37
+ children: e.names.map((e, t) => /* @__PURE__ */ h(d, { children: [t > 0 ? /* @__PURE__ */ m("span", {
38
+ className: "ttw:text-muted-foreground",
39
+ children: ` ${D.orConnector} `
40
+ }) : null, /* @__PURE__ */ m("span", {
41
+ className: "ttw:font-medium",
42
+ children: e
43
+ })] }, e))
44
+ }, e.id))
45
+ })
46
+ }) : null,
47
+ _.reason ? /* @__PURE__ */ h("div", {
48
+ className: "ttw:flex ttw:flex-col ttw:gap-2",
49
+ children: [/* @__PURE__ */ m(c, {
50
+ htmlFor: E,
51
+ requirement: s.Optional,
52
+ labels: D.fieldMarkers,
53
+ children: _.reason.label
54
+ }), /* @__PURE__ */ m(l, {
55
+ id: E,
56
+ value: O,
57
+ placeholder: _.reason.placeholder,
58
+ onChange: (e) => k(e.target.value),
59
+ disabled: b,
60
+ "data-testid": T
61
+ })]
62
+ }) : null,
63
+ /* @__PURE__ */ h(r, {
64
+ className: P ? "ttw:sm:justify-center" : void 0,
65
+ children: [/* @__PURE__ */ m(o, {
66
+ type: "button",
67
+ variant: "outline",
68
+ onClick: y,
69
+ disabled: b,
70
+ className: F ? "ttw:flex-1" : void 0,
71
+ children: D.cancelButton
72
+ }), /* @__PURE__ */ h(o, {
73
+ type: "button",
74
+ variant: M === "destructive" ? "destructive" : "default",
75
+ loading: b,
76
+ disabled: b,
77
+ onClick: () => v(_.reason ? O.trim() : void 0),
78
+ className: F ? "ttw:flex-1" : void 0,
79
+ "data-testid": w,
80
+ children: [b ? null : x, _.confirmButton]
81
+ })]
82
+ })
83
+ ]
84
+ })
85
+ });
86
+ }
87
+ //#endregion
88
+ export { g as BillDecisionDialog, g as default };
@@ -1,95 +1,2 @@
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 { APPROVAL_POLICY_CARD_LABELS_EN as n } from "./index12.js";
5
- import "./index14.js";
6
- import { BILL_STATUS_BADGE_LABELS_EN as r } from "./index18.js";
7
- import "./index20.js";
8
- import { DUE_DATE_VALUE_LABELS_EN as i } from "./index21.js";
9
- import "./index23.js";
10
- import { MISSING_VALUE_LABELS_EN as a } from "./index58.js";
11
- import "./index60.js";
12
- import { NO_VALUE_LABELS_EN as o } from "./index61.js";
1
+ import "./index62.js";
13
2
  import "./index63.js";
14
- //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index64.js
15
- var s = {
16
- loadingTitle: "Loading bill…",
17
- hiddenDescription: "Bill details",
18
- errorTitle: "Couldn't load this bill",
19
- errorDescription: "Something went wrong. Try again.",
20
- amountDueHeading: "Amount due",
21
- amountPaidHeading: "Amount paid",
22
- invoiceDateLabel: "Invoice date",
23
- dueDateLabel: "Due date",
24
- approvalOverrideNotice: "You can approve or reject this bill from the menu in the top right, bypassing any remaining approvers.",
25
- payToHeading: "Pay to",
26
- payToHeadingPaid: "Paid to",
27
- paymentHistoryHeading: "Payment history",
28
- paymentHistoryErrorDescription: "Couldn't load payment history.",
29
- invoiceDetailsHeading: "Invoice details",
30
- lineItemsHeading: "Line items",
31
- lineItemsQuantityHeading: "Qty/Price",
32
- lineItemsAmountHeading: "Amount",
33
- editButton: "Edit bill",
34
- payButton: "Pay",
35
- markAsPaidButton: "Mark as paid",
36
- rejectButton: "Reject",
37
- approveButton: "Approve",
38
- cancelButton: "Cancel bill",
39
- cancelScheduledPaymentButton: "Cancel scheduled payment",
40
- reopenButton: "Reopen bill",
41
- forceApproveButton: "Approve",
42
- forceRejectButton: "Reject",
43
- policyOverridesGroup: "Policy overrides",
44
- overflowMenuTrigger: "Bill actions",
45
- expandButton: "Open full screen",
46
- closeButton: "Close",
47
- statusBadge: r,
48
- approvalPolicy: n,
49
- dueDate: i
50
- }, c = ".pdf,.png,.jpg,.jpeg,.doc,.docx", l = {
51
- ...t,
52
- dropzone: {
53
- ...t.dropzone,
54
- fileTypesHint: "PDF, DOC, JPG, or PNG (max. 3MB)"
55
- }
56
- }, u = {
57
- createButton: "Add bill",
58
- settingsButton: "Bill pay settings",
59
- columnVendor: "Vendor",
60
- columnAttachment: "Attachment",
61
- columnIssueDate: "Issue date",
62
- columnDueDate: "Due date",
63
- columnScheduledDate: "Scheduled date",
64
- columnPaidDate: "Paid date",
65
- columnAmountDue: "Amount due",
66
- columnAmountScheduled: "Amount scheduled",
67
- columnAmountPaid: "Amount paid",
68
- columnTotalAmount: "Total amount",
69
- columnStatus: "Status",
70
- columnAddedOn: "Added on",
71
- columnActions: "Actions",
72
- openRow: (e) => `View bill — ${e}`,
73
- duplicateBillsReviewButton: "Review duplicates",
74
- searchPlaceholder: "Search by vendor name",
75
- searchLabel: "Search bills by vendor name",
76
- filterTabsLabel: "Filter bills by status",
77
- filteredEmptyTitle: "No bills match",
78
- filteredEmptyDescription: "Try a different search or status filter.",
79
- errorTitle: "Couldn't load bills",
80
- errorDescription: "Something went wrong. Try again.",
81
- errorRetry: "Retry",
82
- tableDropzoneTitle: "Drop your files here",
83
- statusBadge: r,
84
- addBill: l,
85
- sortableHeader: {
86
- sortedAscending: e.sortedAscending,
87
- sortedDescending: e.sortedDescending,
88
- notSorted: e.notSorted
89
- },
90
- missingValue: a,
91
- noValue: o,
92
- dueDate: i
93
- };
94
- //#endregion
95
- export { u as BILLS_SCREEN_LABELS_EN, c as BILLS_SCREEN_UPLOAD_ACCEPT, s as BILL_DETAILS_SHEET_LABELS_EN };