@tesouro/embedded-components-react 0.5.252 → 0.5.254

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 (67) hide show
  1. package/dist/index.d.ts +95 -79
  2. package/dist/lib/ReceivablesWidget.d.ts +25 -9
  3. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index24.js +4 -1
  4. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index27.js +214 -209
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index35.js +162 -145
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index14.js +2 -2
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index15.js +2 -2
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index31.js +1 -1
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index33.js +2 -2
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index34.js +3 -3
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index37.js +2 -2
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index48.js +1 -1
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index49.js +1 -1
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index5.js +2 -2
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index17.js +32 -23
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index18.js +2 -2
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index2.js +1 -1
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index20.js +5 -5
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index3.js +1 -1
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidgetNative/BillPayWidgetNative.js +48 -48
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidgetNative/BillsTab.js +32 -24
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidgetNative/labels.js +2 -2
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index5.js +1 -1
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index6.js +1 -1
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +19 -21
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index10.js +38 -51
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index12.js +12 -2
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index13.js +11 -39
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index14.js +18 -2
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index15.js +2 -14
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index16.js +9 -16
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index17.js +78 -2
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index19.js +2 -78
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index20.js +29 -0
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index21.js +4 -2
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index22.js +26 -25
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index23.js +2 -4
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index24.js +5 -28
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +34 -2
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +2 -7
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index6.js +16 -11
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index7.js +54 -2
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index8.js +1 -0
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index9.js +2 -16
  45. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index.js +2 -2
  46. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index10.js +16 -17
  47. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +15 -11
  48. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/details.js +89 -88
  49. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/helpers.js +55 -74
  50. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/labels.js +8 -1
  51. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/paymentRecord.js +71 -0
  52. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableActions.js +123 -164
  53. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableDetails.js +40 -37
  54. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablePaymentRecord.js +91 -0
  55. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesTable.js +83 -78
  56. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesWidget.js +7 -3
  57. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/mocks/receivables.js +2 -1
  58. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index13.js +15 -8
  59. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index39.js +206 -89
  60. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +2 -2
  61. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +38 -38
  62. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  63. package/dist/packages/shared-ui-shadcn/dist/index.js +8 -7
  64. package/package.json +1 -1
  65. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index18.js +0 -11
  66. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index27.js +0 -34
  67. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js +0 -2
@@ -1,54 +1,41 @@
1
- import { Button as e, DropdownMenu as t, DropdownMenuContent as n, DropdownMenuGroup as r, DropdownMenuItem as i, DropdownMenuLabel as a, DropdownMenuSeparator as o, DropdownMenuTrigger as s } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { groupBySectionHeading as c } from "./index9.js";
3
- import { Fragment as l, useId as u } from "react";
4
- import { jsx as d, jsxs as f } from "react/jsx-runtime";
5
- import { MoreHorizontalIcon as p, MoreVerticalIcon as m } from "lucide-react";
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 "./index9.js";
7
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
6
8
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index10.js
7
- function h({ actions: h, triggerLabel: g, placement: _ = "row", testId: v }) {
8
- let y = u();
9
- if (!h.length) return null;
10
- let b = _ === "header", x = _ === "header" || _ === "table", S = b ? p : m, C = c(h);
11
- return /* @__PURE__ */ f(t, { children: [/* @__PURE__ */ d(s, {
12
- asChild: !0,
13
- children: /* @__PURE__ */ d(e, {
14
- type: "button",
15
- variant: x ? "ghost" : "outline",
16
- size: "icon",
17
- "aria-label": g,
18
- "data-testid": v,
19
- onPointerDown: (e) => e.stopPropagation(),
20
- onClick: (e) => e.stopPropagation(),
21
- children: /* @__PURE__ */ d(S, { className: "ttw:size-4" })
22
- })
23
- }), /* @__PURE__ */ d(n, {
24
- align: "end",
25
- onPointerDown: (e) => e.stopPropagation(),
26
- onClick: (e) => e.stopPropagation(),
27
- children: C.map((e, t) => {
28
- let n = e.items.map((e) => {
29
- let t = e.icon;
30
- return /* @__PURE__ */ f(i, {
31
- disabled: e.disabled,
32
- onClick: e.onSelect,
33
- children: [t ? /* @__PURE__ */ d(t, { className: "ttw:size-4" }) : null, e.label]
34
- }, e.id);
35
- });
36
- if (!e.heading) return /* @__PURE__ */ d(l, { children: n }, e.items[0]?.id);
37
- let s = `${y}-${t}`;
38
- return /* @__PURE__ */ f(l, { children: [
39
- t > 0 ? /* @__PURE__ */ d(o, {}) : null,
40
- /* @__PURE__ */ d(a, {
41
- id: s,
42
- className: "ttw:py-1 ttw:text-xs ttw:font-medium ttw:text-muted-foreground",
43
- children: e.heading
44
- }),
45
- /* @__PURE__ */ d(r, {
46
- "aria-labelledby": s,
47
- children: n
48
- })
49
- ] }, e.items[0]?.id);
50
- })
51
- })] });
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
+ });
52
39
  }
53
40
  //#endregion
54
- export { h as BillOverflowMenu, h as default };
41
+ export { s as BillPayWidgetUi };
@@ -1,4 +1,14 @@
1
1
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index12.js
2
- var e = {};
2
+ var e = {
3
+ draft: "Draft",
4
+ ready_to_submit: "Ready to submit",
5
+ pending_approval: "Pending review",
6
+ ready_to_pay: "Ready to pay",
7
+ scheduled: "Scheduled",
8
+ paid: "Paid",
9
+ canceled: "Cancelled",
10
+ rejected: "Rejected",
11
+ unknown: "Unknown"
12
+ };
3
13
  //#endregion
4
- export { e as DEFAULT_LABELS };
14
+ export { e as BILL_STATUS_BADGE_LABELS_EN };
@@ -1,41 +1,13 @@
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 "./index12.js";
7
- import { jsx as a, jsxs as o } from "react/jsx-runtime";
8
1
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index13.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
- }
2
+ var e = {
3
+ accent: "ttw:border-violet-100 ttw:bg-violet-100 ttw:text-violet-700 ttw:hover:bg-violet-100",
4
+ committed: "ttw:border-cyan-200 ttw:bg-cyan-50 ttw:text-cyan-700 ttw:hover:bg-cyan-50",
5
+ danger: "ttw:border-destructive/20 ttw:bg-destructive/20 ttw:text-destructive ttw:hover:bg-destructive/20",
6
+ info: "ttw:border-blue-100 ttw:bg-blue-100 ttw:text-blue-700 ttw:hover:bg-blue-100",
7
+ neutral: "ttw:border-border ttw:bg-muted ttw:text-foreground ttw:hover:bg-muted",
8
+ settled: "ttw:border-border ttw:bg-background ttw:text-green-900 ttw:hover:bg-background",
9
+ success: "ttw:border-green-100 ttw:bg-green-100 ttw:text-green-700 ttw:hover:bg-green-100",
10
+ warning: "ttw:border-amber-100 ttw:bg-amber-100 ttw:text-amber-700 ttw:hover:bg-amber-100"
11
+ };
40
12
  //#endregion
41
- export { s as BillPayWidgetUi };
13
+ export { e as BADGE_TONE_CLASS_NAME };
@@ -1,2 +1,18 @@
1
- import "./index12.js";
2
- import "./index13.js";
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 "./index12.js";
3
+ import { BADGE_TONE_CLASS_NAME as r } from "./index13.js";
4
+ import { jsxs as i } from "react/jsx-runtime";
5
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index14.js
6
+ function a({ status: a, tone: o, labels: s, icon: c }) {
7
+ let l = {
8
+ ...n,
9
+ ...s
10
+ }, u = l[a] ?? l.unknown;
11
+ return /* @__PURE__ */ i(e, {
12
+ variant: "outline",
13
+ className: t(c && "ttw:gap-1", r[o]),
14
+ children: [c, u]
15
+ });
16
+ }
17
+ //#endregion
18
+ export { a as BillStatusBadge, a as default };
@@ -1,14 +1,2 @@
1
- //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index15.js
2
- var e = {
3
- draft: "Draft",
4
- ready_to_submit: "Ready to submit",
5
- pending_approval: "Pending review",
6
- ready_to_pay: "Ready to pay",
7
- scheduled: "Scheduled",
8
- paid: "Paid",
9
- canceled: "Cancelled",
10
- rejected: "Rejected",
11
- unknown: "Unknown"
12
- };
13
- //#endregion
14
- export { e as BILL_STATUS_BADGE_LABELS_EN };
1
+ import "./index12.js";
2
+ import "./index14.js";
@@ -1,18 +1,11 @@
1
- import { Badge as e, cn as t } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { BADGE_TONE_CLASS_NAME as n } from "./index6.js";
3
- import { BILL_STATUS_BADGE_LABELS_EN as r } from "./index15.js";
4
- import { jsxs as i } from "react/jsx-runtime";
5
1
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index16.js
6
- function a({ status: a, tone: o, labels: s, icon: c }) {
7
- let l = {
8
- ...r,
9
- ...s
10
- }, u = l[a] ?? l.unknown;
11
- return /* @__PURE__ */ i(e, {
12
- variant: "outline",
13
- className: t(c && "ttw:gap-1", n[o]),
14
- children: [c, u]
15
- });
16
- }
2
+ var e = {
3
+ dropPrefix: "Drop your files here, or",
4
+ browseAction: "browse to upload",
5
+ fileTypesHint: "PDF, JPG, or PNG (max. 3MB)",
6
+ fileCountHint: (e) => `up to ${e} files at a time`,
7
+ uploadingText: "Uploading…",
8
+ fileInput: "Choose a file to upload"
9
+ };
17
10
  //#endregion
18
- export { a as BillStatusBadge, a as default };
11
+ export { e as BILL_UPLOAD_DROPZONE_LABELS_EN };
@@ -1,2 +1,78 @@
1
- import "./index15.js";
2
- import "./index16.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";
3
+ import "../../../shared/ui/dist/index.js";
4
+ import { BILL_UPLOAD_DROPZONE_LABELS_EN as n } from "./index16.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/index17.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(e, t, n = !0) {
14
+ let r = e.filter((e) => u(e, t));
15
+ return n ? r : r.slice(0, 1);
16
+ }
17
+ function f({ status: u = "idle", errorMessage: f, accept: p = ".pdf,.png,.jpg,.jpeg", multiple: m = !0, maxFiles: h, onFilesSelected: g, testId: _, labels: v }) {
18
+ let y = {
19
+ ...n,
20
+ ...v
21
+ }, b = r(null), [x, S] = i(!1), C = u === "uploading";
22
+ return /* @__PURE__ */ s("div", {
23
+ className: "ttw:flex ttw:flex-col ttw:gap-2",
24
+ "data-testid": _,
25
+ children: [
26
+ /* @__PURE__ */ s("button", {
27
+ type: "button",
28
+ disabled: C,
29
+ 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", x ? "ttw:border-primary ttw:bg-primary/5" : "ttw:border-border ttw:bg-muted/40"),
30
+ onClick: () => b.current?.click(),
31
+ onDragOver: (e) => {
32
+ e.preventDefault(), S(!0);
33
+ },
34
+ onDragLeave: (e) => {
35
+ e.preventDefault(), S(!1);
36
+ },
37
+ onDrop: (e) => {
38
+ if (e.preventDefault(), S(!1), C) return;
39
+ let t = d(e.dataTransfer.files ? Array.from(e.dataTransfer.files) : [], p, m);
40
+ t.length > 0 && g(t);
41
+ },
42
+ children: [C ? /* @__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", {
43
+ className: "ttw:flex ttw:flex-col ttw:items-start",
44
+ children: [/* @__PURE__ */ o("span", {
45
+ className: "ttw:text-sm ttw:text-primary",
46
+ children: C ? y.uploadingText : /* @__PURE__ */ s(a, { children: [
47
+ y.dropPrefix,
48
+ " ",
49
+ /* @__PURE__ */ o("span", {
50
+ className: "ttw:underline",
51
+ children: y.browseAction
52
+ })
53
+ ] })
54
+ }), /* @__PURE__ */ o("span", {
55
+ className: "ttw:text-xs ttw:text-muted-foreground",
56
+ children: h === void 0 ? y.fileTypesHint : `${y.fileTypesHint} · ${y.fileCountHint(h)}`
57
+ })]
58
+ })]
59
+ }),
60
+ /* @__PURE__ */ o("input", {
61
+ ref: b,
62
+ type: "file",
63
+ accept: p,
64
+ multiple: m,
65
+ disabled: C,
66
+ "aria-label": y.fileInput,
67
+ className: "ttw:hidden",
68
+ onChange: (e) => {
69
+ let t = d(e.target.files ? Array.from(e.target.files) : [], p, m);
70
+ t.length > 0 && g(t), e.target.value = "";
71
+ }
72
+ }),
73
+ u === "error" && f ? /* @__PURE__ */ o(t, { children: f }) : null
74
+ ]
75
+ });
76
+ }
77
+ //#endregion
78
+ export { f as BillUploadDropzone, f as default, d as getAcceptedBillUploadFiles };
@@ -1,78 +1,2 @@
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";
3
- import "../../../shared/ui/dist/index.js";
4
- import { BILL_UPLOAD_DROPZONE_LABELS_EN as n } from "./index18.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/index19.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(e, t, n = !0) {
14
- let r = e.filter((e) => u(e, t));
15
- return n ? r : r.slice(0, 1);
16
- }
17
- function f({ status: u = "idle", errorMessage: f, accept: p = ".pdf,.png,.jpg,.jpeg", multiple: m = !0, maxFiles: h, onFilesSelected: g, testId: _, labels: v }) {
18
- let y = {
19
- ...n,
20
- ...v
21
- }, b = r(null), [x, S] = i(!1), C = u === "uploading";
22
- return /* @__PURE__ */ s("div", {
23
- className: "ttw:flex ttw:flex-col ttw:gap-2",
24
- "data-testid": _,
25
- children: [
26
- /* @__PURE__ */ s("button", {
27
- type: "button",
28
- disabled: C,
29
- 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", x ? "ttw:border-primary ttw:bg-primary/5" : "ttw:border-border ttw:bg-muted/40"),
30
- onClick: () => b.current?.click(),
31
- onDragOver: (e) => {
32
- e.preventDefault(), S(!0);
33
- },
34
- onDragLeave: (e) => {
35
- e.preventDefault(), S(!1);
36
- },
37
- onDrop: (e) => {
38
- if (e.preventDefault(), S(!1), C) return;
39
- let t = d(e.dataTransfer.files ? Array.from(e.dataTransfer.files) : [], p, m);
40
- t.length > 0 && g(t);
41
- },
42
- children: [C ? /* @__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", {
43
- className: "ttw:flex ttw:flex-col ttw:items-start",
44
- children: [/* @__PURE__ */ o("span", {
45
- className: "ttw:text-sm ttw:text-primary",
46
- children: C ? y.uploadingText : /* @__PURE__ */ s(a, { children: [
47
- y.dropPrefix,
48
- " ",
49
- /* @__PURE__ */ o("span", {
50
- className: "ttw:underline",
51
- children: y.browseAction
52
- })
53
- ] })
54
- }), /* @__PURE__ */ o("span", {
55
- className: "ttw:text-xs ttw:text-muted-foreground",
56
- children: h === void 0 ? y.fileTypesHint : `${y.fileTypesHint} · ${y.fileCountHint(h)}`
57
- })]
58
- })]
59
- }),
60
- /* @__PURE__ */ o("input", {
61
- ref: b,
62
- type: "file",
63
- accept: p,
64
- multiple: m,
65
- disabled: C,
66
- "aria-label": y.fileInput,
67
- className: "ttw:hidden",
68
- onChange: (e) => {
69
- let t = d(e.target.files ? Array.from(e.target.files) : [], p, m);
70
- t.length > 0 && g(t), e.target.value = "";
71
- }
72
- }),
73
- u === "error" && f ? /* @__PURE__ */ o(t, { children: f }) : null
74
- ]
75
- });
76
- }
77
- //#endregion
78
- export { f as BillUploadDropzone, f as default, d as getAcceptedBillUploadFiles };
1
+ import "./index16.js";
2
+ import "./index17.js";
@@ -0,0 +1,29 @@
1
+ import { Popover as e, PopoverContent as t, PopoverTrigger as n } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { useState as r } from "react";
3
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
4
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index20.js
5
+ function o({ children: o, date: s }) {
6
+ let [c, l] = r(!1);
7
+ return /* @__PURE__ */ a(e, {
8
+ open: c,
9
+ onOpenChange: l,
10
+ children: [/* @__PURE__ */ i(n, {
11
+ type: "button",
12
+ className: "ttw:cursor-default",
13
+ onPointerEnter: (e) => {
14
+ e.pointerType === "mouse" && l(!0);
15
+ },
16
+ onPointerLeave: (e) => {
17
+ e.pointerType === "mouse" && l(!1);
18
+ },
19
+ onClick: (e) => e.stopPropagation(),
20
+ children: o
21
+ }), /* @__PURE__ */ i(t, {
22
+ onOpenAutoFocus: (e) => e.preventDefault(),
23
+ className: "ttw:w-auto ttw:px-3 ttw:py-1.5 ttw:text-xs",
24
+ children: s
25
+ })]
26
+ });
27
+ }
28
+ //#endregion
29
+ export { o as DateDisclosure };
@@ -1,2 +1,4 @@
1
- import "./index18.js";
2
- import "./index19.js";
1
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index21.js
2
+ var e = { overdue: "Overdue" };
3
+ //#endregion
4
+ export { e as DUE_DATE_VALUE_LABELS_EN };
@@ -1,29 +1,30 @@
1
- import { Popover as e, PopoverContent as t, PopoverTrigger as n } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { useState as r } from "react";
3
- import { jsx as i, jsxs as a } from "react/jsx-runtime";
1
+ import { cn as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { DUE_DATE_VALUE_LABELS_EN as t } from "./index21.js";
3
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
+ import { AlertTriangleIcon as i } from "lucide-react";
4
5
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index22.js
5
- function o({ children: o, date: s }) {
6
- let [c, l] = r(!1);
7
- return /* @__PURE__ */ a(e, {
8
- open: c,
9
- onOpenChange: l,
10
- children: [/* @__PURE__ */ i(n, {
11
- type: "button",
12
- className: "ttw:cursor-default",
13
- onPointerEnter: (e) => {
14
- e.pointerType === "mouse" && l(!0);
15
- },
16
- onPointerLeave: (e) => {
17
- e.pointerType === "mouse" && l(!1);
18
- },
19
- onClick: (e) => e.stopPropagation(),
20
- children: o
21
- }), /* @__PURE__ */ i(t, {
22
- onOpenAutoFocus: (e) => e.preventDefault(),
23
- className: "ttw:w-auto ttw:px-3 ttw:py-1.5 ttw:text-xs",
24
- children: s
25
- })]
6
+ function a({ value: a, tone: o = "default", labels: s, className: c }) {
7
+ let l = {
8
+ ...t,
9
+ ...s
10
+ };
11
+ return o === "danger" ? /* @__PURE__ */ r("span", {
12
+ className: e("ttw:inline-flex ttw:items-center ttw:gap-1 ttw:whitespace-nowrap ttw:font-medium ttw:text-destructive", c),
13
+ children: [
14
+ /* @__PURE__ */ n(i, {
15
+ "aria-hidden": !0,
16
+ className: "ttw:size-3.5 ttw:shrink-0"
17
+ }),
18
+ a,
19
+ /* @__PURE__ */ n("span", {
20
+ className: "ttw:sr-only",
21
+ children: l.overdue
22
+ })
23
+ ]
24
+ }) : /* @__PURE__ */ n("span", {
25
+ className: c,
26
+ children: a
26
27
  });
27
28
  }
28
29
  //#endregion
29
- export { o as DateDisclosure };
30
+ export { a as DueDateValue, a as default };
@@ -1,4 +1,2 @@
1
- //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index23.js
2
- var e = { overdue: "Overdue" };
3
- //#endregion
4
- export { e as DUE_DATE_VALUE_LABELS_EN };
1
+ import "./index21.js";
2
+ import "./index22.js";
@@ -1,30 +1,7 @@
1
- import { cn as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { DUE_DATE_VALUE_LABELS_EN as t } from "./index23.js";
3
- import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
- import { AlertTriangleIcon as i } from "lucide-react";
5
1
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index24.js
6
- function a({ value: a, tone: o = "default", labels: s, className: c }) {
7
- let l = {
8
- ...t,
9
- ...s
10
- };
11
- return o === "danger" ? /* @__PURE__ */ r("span", {
12
- className: e("ttw:inline-flex ttw:items-center ttw:gap-1 ttw:whitespace-nowrap ttw:font-medium ttw:text-destructive", c),
13
- children: [
14
- /* @__PURE__ */ n(i, {
15
- "aria-hidden": !0,
16
- className: "ttw:size-3.5 ttw:shrink-0"
17
- }),
18
- a,
19
- /* @__PURE__ */ n("span", {
20
- className: "ttw:sr-only",
21
- children: l.overdue
22
- })
23
- ]
24
- }) : /* @__PURE__ */ n("span", {
25
- className: c,
26
- children: a
27
- });
28
- }
2
+ var e = {
3
+ revealValue: "Show value",
4
+ hideValue: "Hide value"
5
+ };
29
6
  //#endregion
30
- export { a as DueDateValue, a as default };
7
+ export { e as REVEALABLE_FIELD_LABELS_EN };
@@ -1,2 +1,34 @@
1
- import "./index23.js";
2
- import "./index24.js";
1
+ import { Button as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { REVEALABLE_FIELD_LABELS_EN as t } from "./index24.js";
3
+ import { useState as n } from "react";
4
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
+ import { Eye as a, EyeOff as o } from "lucide-react";
6
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js
7
+ function s({ field: s, labels: c }) {
8
+ let l = {
9
+ ...t,
10
+ ...c
11
+ }, [u, d] = n(!1), f = s.maskedValue && !u ? s.maskedValue : s.value;
12
+ return /* @__PURE__ */ i("div", {
13
+ className: "ttw:flex ttw:items-start ttw:justify-between ttw:gap-3",
14
+ children: [/* @__PURE__ */ i("div", {
15
+ className: "ttw:min-w-0",
16
+ children: [/* @__PURE__ */ r("dt", {
17
+ className: "ttw:text-xs ttw:text-muted-foreground",
18
+ children: s.label
19
+ }), /* @__PURE__ */ r("dd", {
20
+ className: "ttw:break-words ttw:text-sm ttw:font-medium",
21
+ children: f
22
+ })]
23
+ }), s.maskedValue ? /* @__PURE__ */ r(e, {
24
+ type: "button",
25
+ variant: "ghost",
26
+ size: "icon",
27
+ "aria-label": u ? l.hideValue : l.revealValue,
28
+ onClick: () => d((e) => !e),
29
+ children: r(u ? o : a, { className: "ttw:size-4" })
30
+ }) : null]
31
+ });
32
+ }
33
+ //#endregion
34
+ export { s as RevealableField, s as default };
@@ -1,7 +1,2 @@
1
- //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js
2
- var e = {
3
- revealValue: "Show value",
4
- hideValue: "Hide value"
5
- };
6
- //#endregion
7
- export { e as REVEALABLE_FIELD_LABELS_EN };
1
+ import "./index24.js";
2
+ import "./index25.js";
@@ -1,13 +1,18 @@
1
1
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index6.js
2
- var e = {
3
- accent: "ttw:border-violet-100 ttw:bg-violet-100 ttw:text-violet-700 ttw:hover:bg-violet-100",
4
- committed: "ttw:border-cyan-200 ttw:bg-cyan-50 ttw:text-cyan-700 ttw:hover:bg-cyan-50",
5
- danger: "ttw:border-destructive/20 ttw:bg-destructive/20 ttw:text-destructive ttw:hover:bg-destructive/20",
6
- info: "ttw:border-blue-100 ttw:bg-blue-100 ttw:text-blue-700 ttw:hover:bg-blue-100",
7
- neutral: "ttw:border-border ttw:bg-muted ttw:text-foreground ttw:hover:bg-muted",
8
- settled: "ttw:border-border ttw:bg-background ttw:text-green-900 ttw:hover:bg-background",
9
- success: "ttw:border-green-100 ttw:bg-green-100 ttw:text-green-700 ttw:hover:bg-green-100",
10
- warning: "ttw:border-amber-100 ttw:bg-amber-100 ttw:text-amber-700 ttw:hover:bg-amber-100"
11
- };
2
+ function e(e) {
3
+ let t = [];
4
+ for (let n of e) {
5
+ let e = t.at(-1);
6
+ if (e && e.heading === n.sectionHeading) {
7
+ e.items = [...e.items, n];
8
+ continue;
9
+ }
10
+ t.push({
11
+ heading: n.sectionHeading,
12
+ items: [n]
13
+ });
14
+ }
15
+ return t;
16
+ }
12
17
  //#endregion
13
- export { e as BADGE_TONE_CLASS_NAME };
18
+ export { e as groupBySectionHeading };