@tesouro/embedded-components-react 0.2.333 → 0.2.337

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 (113) hide show
  1. package/dist/index.css +22 -0
  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 +10 -6
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +2 -2
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index26.js +0 -1
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +43 -31
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js +12 -46
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +46 -30
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index33.js +26 -149
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index34.js +159 -31
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +32 -98
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index36.js +102 -10
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js +11 -212
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js +226 -4
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +4 -29
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +27 -80
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +75 -125
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +133 -3
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +3 -4
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +2 -43
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +45 -1
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +1 -8
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +6 -9
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +9 -92
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +94 -3
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +3 -110
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +7 -9
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +20 -38
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +57 -6
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +3 -91
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +105 -157
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +11 -5
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +40 -5
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +6 -113
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +100 -1
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +171 -16
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +5 -0
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +8 -0
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +115 -0
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +1 -0
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +25 -0
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +2 -2
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +34 -26
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index19.js +2 -16
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index20.js +18 -2
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index21.js +1 -41
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index22.js +38 -269
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index23.js +272 -1
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index24.js +2 -9
  51. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +7 -47
  52. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +49 -2
  53. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index27.js +2 -22
  54. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js +20 -284
  55. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index29.js +286 -2
  56. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index30.js +2 -16
  57. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index31.js +13 -117
  58. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index32.js +120 -2
  59. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index33.js +2 -10
  60. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index34.js +8 -94
  61. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index35.js +96 -2
  62. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index36.js +1 -12
  63. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index37.js +11 -56
  64. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index38.js +57 -1
  65. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index39.js +1 -53
  66. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index40.js +51 -136
  67. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index41.js +141 -1
  68. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index42.js +2 -7
  69. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index43.js +5 -42
  70. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index44.js +44 -2
  71. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index45.js +2 -4
  72. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +2 -61
  73. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index47.js +63 -2
  74. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index48.js +2 -4
  75. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index49.js +2 -14
  76. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index50.js +16 -2
  77. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index51.js +1 -73
  78. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index52.js +72 -250
  79. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index53.js +251 -12
  80. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index54.js +9 -252
  81. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index55.js +1 -10
  82. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index56.js +6 -4
  83. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index57.js +43 -87
  84. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index58.js +2 -0
  85. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index59.js +14 -2
  86. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js +278 -5
  87. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index61.js +8 -28
  88. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index62.js +8 -2
  89. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index63.js +91 -5
  90. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index65.js +1 -1
  91. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index66.js +15 -9
  92. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index67.js +101 -94
  93. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index69.js +3 -14
  94. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index70.js +28 -8
  95. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index71.js +2 -170
  96. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index72.js +7 -2
  97. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index73.js +32 -12
  98. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +2 -89
  99. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index75.js +12 -2
  100. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index76.js +106 -0
  101. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index77.js +2 -0
  102. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index78.js +18 -0
  103. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index79.js +10 -0
  104. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index80.js +170 -0
  105. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index81.js +2 -0
  106. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +14 -0
  107. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index83.js +89 -0
  108. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index84.js +2 -0
  109. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  110. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index7.js +1 -1
  111. package/dist/packages/shared-ui-shadcn/dist/index.js +1378 -1371
  112. package/package.json +1 -1
  113. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index64.js +0 -34
@@ -1 +1,100 @@
1
- import "./index58.js";
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
5
+ import { formatCalendarDate as e } from "../../../shared/util/dist/lib/formatCalendarDate.js";
6
+ import { formatMoneyExact as t } from "../../../shared/util/dist/lib/formatMoneyExact.js";
7
+ import { resolveVendorName as n } from "./index3.js";
8
+ import { usePayablesQuery as r, usePayablesTotalCountQuery as i } from "../../data-access/dist/index13.js";
9
+ import "../../data-access/dist/index.js";
10
+ import { derivePayableStatus as a } from "./index20.js";
11
+ import { DEFAULT_BILL_QUEUE as o, billQueueColumns as s, billQueueHasScheduledPayment as c, billQueueOffersAddPanel as l, billQueueStatuses as u, billSortColumnId as d, billSortField as f } from "./index55.js";
12
+ import { useCallback as p, useEffect as m, useMemo as h, useState as g } from "react";
13
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js
14
+ var _ = 10, v = [{
15
+ id: "addedOnLabel",
16
+ desc: !0
17
+ }];
18
+ function y({ enabled: y = !0, onOpenBill: b, duplicateBillIds: x, duplicateBadgeLabel: S }) {
19
+ let [C, w] = g(o), [T, E] = g(v), [D, O] = g(_), [k, A] = g(), [j, M] = g(""), [N, P] = g(""), F = p(() => A(void 0), []);
20
+ m(() => {
21
+ let e = setTimeout(() => {
22
+ P(j), F();
23
+ }, 300);
24
+ return () => clearTimeout(e);
25
+ }, [j, F]);
26
+ let I = T[0], L = f(I?.id), R = r({
27
+ limit: D,
28
+ pagination_token: k,
29
+ status__in: u(C),
30
+ has_scheduled_payment: c(C),
31
+ counterpart_name__icontains: N || void 0,
32
+ sort: L,
33
+ order: L ? I?.desc ? "desc" : "asc" : void 0,
34
+ enabled: y
35
+ }), z = R.data?.data.length === 0, B = i({ enabled: y && z }), V = !z || (B.data?.count ?? 1) > 0, H = h(() => new Set(x), [x]), U = h(() => (R.data?.data ?? []).map((r) => {
36
+ let i = a({
37
+ apiStatus: r.status,
38
+ dueDate: r.due_date,
39
+ scheduledPaymentDate: r.scheduled_payment_date
40
+ }), o = r.amount_due ?? r.total_amount, s = (e) => e == null ? "" : t(e / 100, { currencyCode: r.currency ?? "USD" });
41
+ return {
42
+ vendorLabel: n(r),
43
+ dueDateLabel: e(r.due_date),
44
+ scheduledDateLabel: e(r.scheduled_payment_date),
45
+ paidDateLabel: e(r.paid_at?.slice(0, 10)),
46
+ amountDueLabel: s(o),
47
+ amountPaidLabel: s(r.amount_paid),
48
+ amountScheduledLabel: s(r.amount_to_pay ?? o),
49
+ status: i.status,
50
+ statusTone: i.tone,
51
+ addedOnLabel: e(r.created_at?.slice(0, 10)),
52
+ duplicateBadge: H.has(r.id) ? {
53
+ label: S,
54
+ tone: "warning"
55
+ } : void 0,
56
+ onOpen: () => b(r.id, i.status === "draft")
57
+ };
58
+ }), [
59
+ R.data?.data,
60
+ H,
61
+ S,
62
+ b
63
+ ]), W = p((e) => {
64
+ let t = e;
65
+ w(t), E((e) => {
66
+ let n = e[0]?.id;
67
+ return n ? s(t).some((e) => d(e) === n) ? e : v : e;
68
+ }), F();
69
+ }, [F]), G = p((e) => {
70
+ E((t) => typeof e == "function" ? e(t) : e), F();
71
+ }, [F]), K = p((e) => {
72
+ O(e), F();
73
+ }, [F]), q = p(() => A(R.data?.next_pagination_token), [R.data?.next_pagination_token]), J = p(() => A(R.data?.prev_pagination_token), [R.data?.prev_pagination_token]), Y = p(() => {
74
+ R.refetch();
75
+ }, [R.refetch]);
76
+ return {
77
+ rows: U,
78
+ isLoading: R.isFetching || z && B.isLoading,
79
+ isError: R.isError,
80
+ onRetry: Y,
81
+ selectedFilterTabId: C,
82
+ onFilterTabChange: W,
83
+ searchValue: j,
84
+ onSearchChange: M,
85
+ hasAnyBills: V,
86
+ isSearchActive: N.length > 0,
87
+ visibleColumns: s(C),
88
+ showAddPanelWhenEmpty: l(C),
89
+ sorting: T,
90
+ onSortingChange: G,
91
+ pageSize: D,
92
+ onPageSizeChange: K,
93
+ hasNextPage: !!R.data?.next_pagination_token,
94
+ hasPrevPage: !!R.data?.prev_pagination_token,
95
+ onNextPage: q,
96
+ onPrevPage: J
97
+ };
98
+ }
99
+ //#endregion
100
+ export { y as useBillsTable };
@@ -2,24 +2,179 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { Implementation as e } from "../../../shared/feature/dist/lib/WidgetProvider/types.js";
6
- import { useWidgetConfig as t } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
5
+ import { toast as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
6
+ import { hasAnyScope as t } from "../../../shared/data-access/dist/lib/hasAnyScope.js";
7
+ import { Scope as n } from "../../../shared/data-access/dist/lib/scopes.js";
8
+ import "../../../shared/data-access/dist/index.js";
9
+ import "../../../shared/ui/dist/index.js";
10
+ import { useWidgetConfig as r } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
7
11
  import "../../../shared/feature/dist/index.js";
8
- import { BillPayWidgetMonite as n } from "./index44.js";
9
- import "./index45.js";
10
- import { BillPayWidgetNative as r } from "./index58.js";
11
- import "./index59.js";
12
- import { jsx as i } from "react/jsx-runtime";
12
+ import { AddBillDialog as i } from "../../ui/dist/index10.js";
13
+ import { BillsScreen as a } from "../../ui/dist/index60.js";
14
+ import "../../ui/dist/index.js";
15
+ import { BillCreateDialog as o } from "./index38.js";
16
+ import "./index39.js";
17
+ import { BillDetailsContainer as s } from "./index42.js";
18
+ import "./index43.js";
19
+ import "./index49.js";
20
+ import "./index50.js";
21
+ import { DuplicateBillsContainer as ee } from "./index53.js";
22
+ import "./index54.js";
23
+ import { BILL_QUEUE_ORDER as c, BillQueue as l } from "./index55.js";
24
+ import { BILLS_TAB_LABELS_EN as u } from "./index57.js";
25
+ import { billsTabTestIds as d } from "./index58.js";
26
+ import { useBillsTable as te } from "./index59.js";
27
+ import { copyTextToClipboard as f } from "./index56.js";
28
+ import { useCallback as p, useEffect as m, useMemo as h, useState as g } from "react";
29
+ import { jsx as _, jsxs as v } from "react/jsx-runtime";
30
+ import { CalendarClockIcon as y, CheckIcon as b, FilePenIcon as x, ListIcon as S, LoaderCircleIcon as C } from "lucide-react";
13
31
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js
14
- function a({ implementation: a, ...o }) {
15
- let s = t().implementation, c = a ?? s ?? e.Monite;
16
- return c === e.Native ? /* @__PURE__ */ i(r, {
17
- implementation: c,
18
- ...o
19
- }) : /* @__PURE__ */ i(n, {
20
- implementation: c,
21
- ...o
32
+ var w = "bills@business-banking.app", T = {
33
+ [l.Drafts]: /* @__PURE__ */ _(x, {
34
+ className: "ttw:size-4",
35
+ "aria-hidden": !0
36
+ }),
37
+ [l.Pending]: /* @__PURE__ */ _(C, {
38
+ className: "ttw:size-4",
39
+ "aria-hidden": !0
40
+ }),
41
+ [l.Scheduled]: /* @__PURE__ */ _(y, {
42
+ className: "ttw:size-4",
43
+ "aria-hidden": !0
44
+ }),
45
+ [l.Paid]: /* @__PURE__ */ _(b, {
46
+ className: "ttw:size-4",
47
+ "aria-hidden": !0
48
+ }),
49
+ [l.All]: /* @__PURE__ */ _(S, {
50
+ className: "ttw:size-4",
51
+ "aria-hidden": !0
52
+ })
53
+ };
54
+ function E({ labels: l, onEnqueueFiles: y, openPayableId: b, onOpenPayableHandled: x, poweredByBankName: S, duplicateBills: C }) {
55
+ let E = h(() => ({
56
+ ...u,
57
+ ...l,
58
+ queues: {
59
+ ...u.queues,
60
+ ...l?.queues
61
+ },
62
+ queueEmptyStates: c.reduce((e, t) => ({
63
+ ...e,
64
+ [t]: {
65
+ ...u.queueEmptyStates[t],
66
+ ...l?.queueEmptyStates?.[t]
67
+ }
68
+ }), {})
69
+ }), [l]), [ne, D] = g(!1), [O, k] = g(), [A, j] = g(!1), [M, N] = g(), [P, F] = g(!1), [I, L] = g(!1), [R, z] = g(!1), { initResponse: B } = r(), V = t(B?.scopes, [n.PayableReadOrg]), H = t(B?.scopes, [n.PayableWriteOrg]), U = !B || V, W = !B || H, G = p((e, t) => {
70
+ if (t && W) {
71
+ k(e), j(!0);
72
+ return;
73
+ }
74
+ N(e), F(!0);
75
+ }, [W]), K = h(() => (C ?? []).filter((e) => e.isPossibleDuplicate).map((e) => e.id), [C]), q = te({
76
+ enabled: U,
77
+ onOpenBill: G,
78
+ duplicateBillIds: K,
79
+ duplicateBadgeLabel: E.duplicateBadge
80
+ }), J = (e) => !!(e && K.includes(e)), Y = K.length, X = Y === 0 ? void 0 : Y === 1 ? E.duplicateWarningOne : E.duplicateWarningMany(Y), re = h(() => c.map((e) => ({
81
+ id: e,
82
+ label: E.queues[e],
83
+ icon: T[e]
84
+ })), [E.queues]), ie = (e) => {
85
+ z(!1), N(e), F(!0);
86
+ }, ae = () => {
87
+ F(!1), L(!0);
88
+ }, oe = h(() => ({
89
+ createButton: E.createButton,
90
+ addBill: { heading: E.nonEmptyHeading }
91
+ }), [E.createButton, E.nonEmptyHeading]), Z = () => {
92
+ D(!1), k(void 0), j(!0);
93
+ }, Q = (e) => {
94
+ D(!1), y?.(e);
95
+ }, $ = async () => {
96
+ await f(w) ? e.success(E.emailCopiedToast) : e.error(E.emailCopyFailedToast);
97
+ };
98
+ return m(() => {
99
+ b && (k(b), j(!0), x?.());
100
+ }, [x, b]), /* @__PURE__ */ v("div", {
101
+ "data-testid": d.root,
102
+ children: [
103
+ /* @__PURE__ */ _(a, {
104
+ rows: q.rows,
105
+ isLoading: q.isLoading || !B,
106
+ isError: q.isError,
107
+ onRetry: q.onRetry,
108
+ sorting: q.sorting,
109
+ onSortingChange: q.onSortingChange,
110
+ pageSize: q.pageSize,
111
+ onPageSizeChange: q.onPageSizeChange,
112
+ hasNextPage: q.hasNextPage,
113
+ hasPrevPage: q.hasPrevPage,
114
+ onNextPage: q.onNextPage,
115
+ onPrevPage: q.onPrevPage,
116
+ filterTabs: re,
117
+ selectedFilterTabId: q.selectedFilterTabId,
118
+ onFilterTabChange: q.onFilterTabChange,
119
+ searchValue: q.searchValue,
120
+ onSearchChange: q.onSearchChange,
121
+ visibleColumns: q.visibleColumns,
122
+ isSearchActive: q.isSearchActive,
123
+ showAddPanelWhenEmpty: q.showAddPanelWhenEmpty,
124
+ emptyState: E.queueEmptyStates[q.selectedFilterTabId],
125
+ onCreateClick: W ? () => D(!0) : void 0,
126
+ onEnterManually: W ? Z : void 0,
127
+ onFilesSelected: W ? Q : void 0,
128
+ maxFiles: 10,
129
+ emailAddress: w,
130
+ onCopyEmail: $,
131
+ duplicateWarning: X,
132
+ onReviewDuplicates: () => z(!0),
133
+ labels: oe
134
+ }),
135
+ R ? /* @__PURE__ */ _(ee, {
136
+ open: R,
137
+ onOpenChange: z,
138
+ bills: C,
139
+ canManageDuplicates: W,
140
+ onOpenBill: ie
141
+ }) : null,
142
+ W ? /* @__PURE__ */ _(i, {
143
+ open: ne,
144
+ onOpenChange: D,
145
+ onFilesSelected: Q,
146
+ maxFiles: 10,
147
+ onEnterManually: Z,
148
+ emailAddress: w,
149
+ onCopyEmail: $,
150
+ labels: { heading: q.hasAnyBills ? E.nonEmptyHeading : E.emptyHeading }
151
+ }) : null,
152
+ A ? /* @__PURE__ */ _(o, {
153
+ open: A,
154
+ onOpenChange: j,
155
+ payableId: O,
156
+ isPossibleDuplicate: J(O)
157
+ }) : null,
158
+ P ? /* @__PURE__ */ _(s, {
159
+ open: P,
160
+ onOpenChange: F,
161
+ payableId: M,
162
+ onClose: () => F(!1),
163
+ onExpand: ae,
164
+ isPossibleDuplicate: J(M),
165
+ testId: d.detailsSheet,
166
+ poweredByBankName: S
167
+ }) : null,
168
+ I ? /* @__PURE__ */ _(o, {
169
+ open: I,
170
+ onOpenChange: L,
171
+ payableId: M,
172
+ readOnly: !0,
173
+ poweredByBankName: S,
174
+ isPossibleDuplicate: J(M)
175
+ }) : null
176
+ ]
22
177
  });
23
178
  }
24
179
  //#endregion
25
- export { a as BillPayWidget, a as default };
180
+ export { E as BillsTab, E as default };
@@ -0,0 +1,5 @@
1
+ import "./index55.js";
2
+ import "./index57.js";
3
+ import "./index58.js";
4
+ import "./index59.js";
5
+ import "./index60.js";
@@ -0,0 +1,8 @@
1
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js
2
+ var e = {
3
+ bills: "Bills",
4
+ vendors: "Vendors",
5
+ settings: "Settings"
6
+ };
7
+ //#endregion
8
+ export { e as DEFAULT_TABS_LABELS };
@@ -0,0 +1,115 @@
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
5
+ import { hasAnyScope as e } from "../../../shared/data-access/dist/lib/hasAnyScope.js";
6
+ import { Scope as t } from "../../../shared/data-access/dist/lib/scopes.js";
7
+ import "../../../shared/data-access/dist/index.js";
8
+ import { EmbeddedToaster as n } from "../../../shared/ui/dist/lib/EmbeddedToaster.js";
9
+ import "../../../shared/ui/dist/index.js";
10
+ import { useAnalyticsTrack as r } from "../../../shared/feature/dist/lib/analytics/hooks.js";
11
+ import { WidgetProvider as i } from "../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
12
+ import { useWidgetConfig as a } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
13
+ import "../../../shared/feature/dist/index.js";
14
+ import { BillPayWidgetUi as o } from "../../ui/dist/index44.js";
15
+ import { BillUploadStatusTray as s } from "../../ui/dist/index63.js";
16
+ import "../../ui/dist/index.js";
17
+ import { ApprovalPoliciesSettings as c } from "../../../shared/approval-policy/feature/dist/lib/ApprovalPoliciesSettings.js";
18
+ import "../../../shared/approval-policy/feature/dist/index.js";
19
+ import { useBillUploadQueue as l } from "./index49.js";
20
+ import "./index50.js";
21
+ import { billsTabTestIds as u } from "./index58.js";
22
+ import { BillsTab as d } from "./index60.js";
23
+ import "./index61.js";
24
+ import { BillPayWidgetAnalyticsEvent as f, WIDGET_NAME as p } from "./index44.js";
25
+ import { DEFAULT_TABS_LABELS as m } from "./index62.js";
26
+ import { CounterpartsWidget as h } from "../../../counterparts-widget/feature/dist/index8.js";
27
+ import "../../../counterparts-widget/feature/dist/index.js";
28
+ import { useCallback as g, useEffect as _, useState as v } from "react";
29
+ import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
30
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js
31
+ var S = {
32
+ Bills: "bills",
33
+ Vendors: "vendors",
34
+ Settings: "settings"
35
+ }, C = [
36
+ S.Bills,
37
+ S.Vendors,
38
+ S.Settings
39
+ ];
40
+ function w({ labels: i, tabsLabels: p, approvalPolicyLabels: w, approvalPolicyComponentLabels: T, vendorLabels: E, poweredByBankName: D }) {
41
+ let O = r();
42
+ _(() => {
43
+ O(f.Mounted);
44
+ }, [O]);
45
+ let k = {
46
+ ...m,
47
+ ...p
48
+ }, { initResponse: A } = a(), j = e(A?.scopes, [t.ApprovalPolicyWriteOrg]), M = !A || j, [N, P] = v(S.Bills), [F, I] = v(), L = g((e) => {
49
+ P(S.Bills), I(e);
50
+ }, []), R = l({ onOpenBill: L }), z = [{
51
+ id: S.Bills,
52
+ label: k.bills,
53
+ content: /* @__PURE__ */ b(d, {
54
+ onEnqueueFiles: R.enqueue,
55
+ openPayableId: F,
56
+ onOpenPayableHandled: () => I(void 0),
57
+ poweredByBankName: D
58
+ })
59
+ }, {
60
+ id: S.Vendors,
61
+ label: k.vendors,
62
+ content: /* @__PURE__ */ b(h, {
63
+ ...E,
64
+ counterpartType: "vendor",
65
+ showTitle: !1,
66
+ onViewAllDocuments: () => P(S.Bills)
67
+ })
68
+ }];
69
+ M && z.push({
70
+ id: S.Settings,
71
+ label: k.settings,
72
+ content: /* @__PURE__ */ b(c, {
73
+ labels: w,
74
+ componentLabels: T
75
+ })
76
+ });
77
+ let B = z.some((e) => e.id === N) ? N : C.find((e) => z.some((t) => t.id === e)) ?? z[0]?.id ?? "";
78
+ return /* @__PURE__ */ x(y, { children: [
79
+ /* @__PURE__ */ b(n, {}),
80
+ /* @__PURE__ */ b(o, {
81
+ labels: i,
82
+ tabs: z,
83
+ selectedTabId: B,
84
+ onTabChange: P
85
+ }),
86
+ R.isVisible ? /* @__PURE__ */ b(s, {
87
+ sections: R.sections,
88
+ summaryLabel: R.summaryLabel,
89
+ collapsed: R.collapsed,
90
+ onToggleCollapsed: R.onToggleCollapsed,
91
+ onClose: R.onClose,
92
+ testId: u.uploadTray
93
+ }) : null
94
+ ] });
95
+ }
96
+ function T({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gatewayRouting: a, linkComponent: o, implementation: s, uiFramework: c, errorFallback: l, onError: u, analytics: d, disclosuresAcceptance: f, ...m }) {
97
+ return /* @__PURE__ */ b(i, {
98
+ widgetName: p,
99
+ baseUrl: e,
100
+ widgetToken: t,
101
+ organizationId: n,
102
+ configClient: r,
103
+ gatewayRouting: a,
104
+ linkComponent: o,
105
+ implementation: s,
106
+ uiFramework: c,
107
+ errorFallback: l,
108
+ onError: u,
109
+ analytics: d,
110
+ disclosuresAcceptance: f,
111
+ children: /* @__PURE__ */ b(w, { ...m })
112
+ });
113
+ }
114
+ //#endregion
115
+ export { T as BillPayWidgetNative, T as default };
@@ -0,0 +1,25 @@
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
5
+ import { Implementation as e } from "../../../shared/feature/dist/lib/WidgetProvider/types.js";
6
+ import { useWidgetConfig as t } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
7
+ import "../../../shared/feature/dist/index.js";
8
+ import { BillPayWidgetMonite as n } from "./index45.js";
9
+ import "./index46.js";
10
+ import { BillPayWidgetNative as r } from "./index63.js";
11
+ import "./index64.js";
12
+ import { jsx as i } from "react/jsx-runtime";
13
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js
14
+ function a({ implementation: a, ...o }) {
15
+ let s = t().implementation, c = a ?? s ?? e.Monite;
16
+ return c === e.Native ? /* @__PURE__ */ i(r, {
17
+ implementation: c,
18
+ ...o
19
+ }) : /* @__PURE__ */ i(n, {
20
+ implementation: c,
21
+ ...o
22
+ });
23
+ }
24
+ //#endregion
25
+ export { a as BillPayWidget, a as default };
@@ -1,6 +1,6 @@
1
1
  import { SOURCE_ACCOUNT_LABELS_EN as e } from "./index6.js";
2
- import { REVIEW_TRANSACTION_DIALOG_LABELS_EN as t } from "../../ui/dist/index66.js";
3
- import { SCHEDULE_PAYMENT_DIALOG_LABELS_EN as n } from "../../ui/dist/index69.js";
2
+ import { REVIEW_TRANSACTION_DIALOG_LABELS_EN as t } from "../../ui/dist/index75.js";
3
+ import { SCHEDULE_PAYMENT_DIALOG_LABELS_EN as n } from "../../ui/dist/index78.js";
4
4
  import "../../ui/dist/index.js";
5
5
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js
6
6
  var r = {
@@ -13,7 +13,6 @@ import "./index14.js";
13
13
  import "./index16.js";
14
14
  import "./index17.js";
15
15
  import { BILL_STATUS_BADGE_LABELS_EN as t } from "./index18.js";
16
- import "./index19.js";
17
16
  import "./index20.js";
18
17
  import "./index21.js";
19
18
  import "./index22.js";
@@ -27,41 +26,50 @@ import "./index29.js";
27
26
  import "./index30.js";
28
27
  import "./index31.js";
29
28
  import "./index32.js";
30
- import "./index36.js";
29
+ import "./index33.js";
31
30
  import "./index37.js";
32
31
  import "./index38.js";
33
32
  import "./index39.js";
34
- import { BillCreateScreen as n } from "./index40.js";
35
- import "./index41.js";
33
+ import "./index40.js";
34
+ import { BillCreateScreen as n } from "./index41.js";
36
35
  import "./index42.js";
37
- import { BillPayWidgetUi as r } from "./index43.js";
38
- import "./index44.js";
36
+ import "./index43.js";
37
+ import { BillPayWidgetUi as r } from "./index44.js";
39
38
  import "./index45.js";
40
- import { BillDecisionDialog as i } from "./index46.js";
41
- import "./index47.js";
39
+ import "./index46.js";
40
+ import { BillDecisionDialog as i } from "./index47.js";
42
41
  import "./index48.js";
43
42
  import "./index49.js";
44
43
  import "./index50.js";
45
- import { BILL_DETAILS_SHEET_LABELS_EN as a } from "./index51.js";
46
- import { BillDetailsSheet as o } from "./index52.js";
47
- import { BillColumn as s } from "./index53.js";
48
- import { BillsScreen as c } from "./index54.js";
44
+ import "./index51.js";
45
+ import { BILL_DETAILS_SHEET_LABELS_EN as a } from "./index52.js";
46
+ import { BillDetailsSheet as o } from "./index53.js";
47
+ import "./index54.js";
49
48
  import "./index55.js";
50
- import { BillUploadStatusTray as l } from "./index57.js";
51
- import "./index59.js";
52
- import "./index60.js";
53
- import { ExtractionNotice as u } from "./index61.js";
54
- import "./index62.js";
55
- import "./index63.js";
56
- import "./index64.js";
49
+ import "./index56.js";
50
+ import { BillDuplicateNotice as s } from "./index57.js";
51
+ import "./index58.js";
52
+ import { BillColumn as c } from "./index59.js";
53
+ import { BillsScreen as l } from "./index60.js";
54
+ import "./index61.js";
55
+ import { BillUploadStatusTray as u } from "./index63.js";
57
56
  import "./index65.js";
58
- import { REVIEW_TRANSACTION_DIALOG_LABELS_EN as d } from "./index66.js";
59
- import { ReviewTransactionDialog as f } from "./index67.js";
57
+ import "./index66.js";
58
+ import { DuplicateBillsDialog as d } from "./index67.js";
60
59
  import "./index68.js";
61
- import { SCHEDULE_PAYMENT_DIALOG_LABELS_EN as p } from "./index69.js";
62
- import { SchedulePaymentDialog as m } from "./index71.js";
60
+ import "./index69.js";
61
+ import { ExtractionNotice as f } from "./index70.js";
62
+ import "./index71.js";
63
63
  import "./index72.js";
64
64
  import "./index73.js";
65
- import { SourceDocumentPanel as h } from "./index74.js";
66
- import "./index75.js";
67
- export { e as AddBillDialog, a as BILL_DETAILS_SHEET_LABELS_EN, t as BILL_STATUS_BADGE_LABELS_EN, s as BillColumn, n as BillCreateScreen, i as BillDecisionDialog, o as BillDetailsSheet, r as BillPayWidgetUi, l as BillUploadStatusTray, c as BillsScreen, u as ExtractionNotice, d as REVIEW_TRANSACTION_DIALOG_LABELS_EN, f as ReviewTransactionDialog, p as SCHEDULE_PAYMENT_DIALOG_LABELS_EN, m as SchedulePaymentDialog, h as SourceDocumentPanel };
65
+ import "./index74.js";
66
+ import { REVIEW_TRANSACTION_DIALOG_LABELS_EN as p } from "./index75.js";
67
+ import { ReviewTransactionDialog as m } from "./index76.js";
68
+ import "./index77.js";
69
+ import { SCHEDULE_PAYMENT_DIALOG_LABELS_EN as h } from "./index78.js";
70
+ import { SchedulePaymentDialog as g } from "./index80.js";
71
+ import "./index81.js";
72
+ import "./index82.js";
73
+ import { SourceDocumentPanel as _ } from "./index83.js";
74
+ import "./index84.js";
75
+ export { e as AddBillDialog, a as BILL_DETAILS_SHEET_LABELS_EN, t as BILL_STATUS_BADGE_LABELS_EN, c as BillColumn, n as BillCreateScreen, i as BillDecisionDialog, o as BillDetailsSheet, s as BillDuplicateNotice, r as BillPayWidgetUi, u as BillUploadStatusTray, l as BillsScreen, d as DuplicateBillsDialog, f as ExtractionNotice, p as REVIEW_TRANSACTION_DIALOG_LABELS_EN, m as ReviewTransactionDialog, h as SCHEDULE_PAYMENT_DIALOG_LABELS_EN, g as SchedulePaymentDialog, _ as SourceDocumentPanel };
@@ -1,8 +1,5 @@
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 "./index18.js";
3
- import { jsxs as r } from "react/jsx-runtime";
4
1
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index19.js
5
- var i = {
2
+ var e = {
6
3
  accent: "ttw:border-violet-200 ttw:bg-violet-50 ttw:text-violet-700 ttw:hover:bg-violet-50",
7
4
  danger: "ttw:border-destructive/20 ttw:bg-destructive/10 ttw:text-destructive ttw:hover:bg-destructive/10",
8
5
  info: "ttw:border-blue-200 ttw:bg-blue-50 ttw:text-blue-700 ttw:hover:bg-blue-50",
@@ -11,16 +8,5 @@ var i = {
11
8
  success: "ttw:border-emerald-200 ttw:bg-emerald-50 ttw:text-emerald-700 ttw:hover:bg-emerald-50",
12
9
  warning: "ttw:border-amber-200 ttw:bg-amber-50 ttw:text-amber-800 ttw:hover:bg-amber-50"
13
10
  };
14
- function a({ status: a, tone: o, labels: s, icon: c }) {
15
- let l = {
16
- ...n,
17
- ...s
18
- }, u = l[a] ?? l.unknown;
19
- return /* @__PURE__ */ r(e, {
20
- variant: "outline",
21
- className: t(c && "ttw:gap-1", i[o]),
22
- children: [c, u]
23
- });
24
- }
25
11
  //#endregion
26
- export { a as BillStatusBadge, a as default };
12
+ export { e as BADGE_TONE_CLASS_NAME };
@@ -1,2 +1,18 @@
1
- import "./index18.js";
2
- import "./index19.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 "./index18.js";
3
+ import { BADGE_TONE_CLASS_NAME as r } from "./index19.js";
4
+ import { jsxs as i } from "react/jsx-runtime";
5
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index20.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,42 +1,2 @@
1
- import { APPROVAL_POLICY_CARD_LABELS_EN as e } from "./index12.js";
2
- import "./index14.js";
3
- import { BILL_STATUS_BADGE_LABELS_EN as t } from "./index18.js";
1
+ import "./index18.js";
4
2
  import "./index20.js";
5
- //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index21.js
6
- var n = {
7
- errorTitle: "Couldn't load this bill",
8
- errorDescription: "Something went wrong. Try again.",
9
- amountDueHeading: "Amount due",
10
- invoiceDateLabel: "Invoice date",
11
- dueDateLabel: "Due date",
12
- payToHeading: "Pay to",
13
- vendorRow: "Vendor",
14
- paymentInstructionsRow: "Payment instructions",
15
- addPaymentInstructions: "Add payment instructions",
16
- missingPaymentInstructionsBanner: "Missing payment instructions, which are required to send a payment",
17
- paymentInstructionsCancel: "Cancel",
18
- paymentInstructionsSave: "Save",
19
- descriptionAndGlCodeColumn: "Description and GL code",
20
- qtyPriceColumn: "Qty/Price",
21
- amountColumn: "Amount",
22
- historyHeading: "Audit history",
23
- overflowMenuTriggerLabel: "Bill actions",
24
- statusBadge: t,
25
- approvalPolicy: e
26
- };
27
- function r(e) {
28
- return {
29
- ...n,
30
- ...e,
31
- statusBadge: {
32
- ...n.statusBadge,
33
- ...e?.statusBadge
34
- },
35
- approvalPolicy: {
36
- ...n.approvalPolicy,
37
- ...e?.approvalPolicy
38
- }
39
- };
40
- }
41
- //#endregion
42
- export { n as BILL_DETAIL_BODY_LABELS_EN, r as mergeBillDetailBodyLabels };