@tesouro/embedded-components-react 0.3.22 → 0.3.24

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 (94) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/lib/BillPayWidget.js +1 -1
  3. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index10.js +10 -10
  4. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +15 -15
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +31 -32
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index11.js +42 -1
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index12.js +158 -43
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index13.js +33 -4
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +1 -16
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +45 -12
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index16.js +4 -64
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index17.js +13 -26
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index18.js +14 -62
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +56 -123
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index2.js +18 -3
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index20.js +15 -10
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +61 -40
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +130 -50
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +20 -4
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index24.js +38 -69
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +48 -46
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index26.js +5 -93
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +71 -34
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js +48 -139
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +91 -66
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index3.js +22 -5
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js +34 -22
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js +146 -210
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +72 -209
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index33.js +21 -103
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index34.js +209 -12
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +211 -44
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index36.js +104 -30
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js +12 -165
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js +47 -35
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +29 -99
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index4.js +64 -5
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +181 -12
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +34 -243
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +104 -4
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +12 -27
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +267 -81
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +4 -145
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +33 -3
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +82 -2
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +155 -37
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +2 -0
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index5.js +2 -6
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +2 -6
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +43 -9
  51. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +1 -94
  52. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +8 -3
  53. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +7 -5
  54. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +85 -13
  55. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +3 -59
  56. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +9 -3
  57. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +19 -120
  58. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +56 -8
  59. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js +3 -32
  60. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +3 -46
  61. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +116 -15
  62. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +8 -28
  63. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +43 -83
  64. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +19 -47
  65. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +27 -249
  66. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +82 -109
  67. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +47 -206
  68. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +253 -4
  69. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +111 -6
  70. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +6 -39
  71. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +197 -102
  72. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +3 -0
  73. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +6 -23
  74. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +114 -0
  75. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +1 -0
  76. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +25 -0
  77. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index8.js +5 -24
  78. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +3 -162
  79. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +9 -6
  80. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +10 -11
  81. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index83.js +123 -8
  82. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index84.js +2 -170
  83. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index85.js +18 -2
  84. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index86.js +7 -11
  85. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index87.js +163 -82
  86. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index88.js +1 -1
  87. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index89.js +14 -0
  88. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index90.js +108 -0
  89. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index91.js +2 -0
  90. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +2 -2
  91. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +27 -27
  92. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  93. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index7.js +1 -1
  94. package/package.json +1 -1
@@ -1,123 +1,22 @@
1
- import { BillColumn as e } from "../../ui/dist/index63.js";
2
- import "../../ui/dist/index.js";
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
5
+ import { useCallback as e, useMemo as t, useState as n } from "react";
3
6
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js
4
- var t = {
5
- Drafts: "drafts",
6
- Pending: "pending",
7
- Scheduled: "scheduled",
8
- Paid: "paid",
9
- All: "all"
10
- }, n = {
11
- [t.Drafts]: ["draft"],
12
- [t.Pending]: [
13
- "new",
14
- "approve_in_progress",
15
- "waiting_to_be_paid",
16
- "partially_paid"
17
- ],
18
- [t.Scheduled]: [
19
- "new",
20
- "approve_in_progress",
21
- "waiting_to_be_paid",
22
- "partially_paid"
23
- ],
24
- [t.Paid]: ["paid"],
25
- [t.All]: void 0
26
- }, r = {
27
- [t.Drafts]: void 0,
28
- [t.Pending]: !1,
29
- [t.Scheduled]: !0,
30
- [t.Paid]: void 0,
31
- [t.All]: void 0
32
- };
33
- function i(e) {
34
- return e === t.Pending || e === t.Drafts;
35
- }
36
- var a = t.Pending, o = [
37
- t.Pending,
38
- t.Drafts,
39
- t.Scheduled,
40
- t.Paid,
41
- t.All
42
- ], s = {
43
- [t.Drafts]: [
44
- e.Vendor,
45
- e.IssueDate,
46
- e.DueDate,
47
- e.Status,
48
- e.AmountDue,
49
- e.TotalAmount,
50
- e.AddedOn
51
- ],
52
- [t.Pending]: [
53
- e.Vendor,
54
- e.IssueDate,
55
- e.DueDate,
56
- e.Status,
57
- e.AmountDue,
58
- e.TotalAmount,
59
- e.AddedOn
60
- ],
61
- [t.Scheduled]: [
62
- e.Vendor,
63
- e.IssueDate,
64
- e.DueDate,
65
- e.ScheduledDate,
66
- e.Status,
67
- e.AmountScheduled,
68
- e.TotalAmount,
69
- e.AddedOn
70
- ],
71
- [t.Paid]: [
72
- e.Vendor,
73
- e.IssueDate,
74
- e.DueDate,
75
- e.PaidDate,
76
- e.Status,
77
- e.AmountPaid,
78
- e.TotalAmount,
79
- e.AddedOn
80
- ],
81
- [t.All]: [
82
- e.Vendor,
83
- e.IssueDate,
84
- e.DueDate,
85
- e.ScheduledDate,
86
- e.Status,
87
- e.AmountDue,
88
- e.AmountPaid,
89
- e.TotalAmount,
90
- e.AddedOn
91
- ]
92
- };
93
- function c(e) {
94
- return s[e];
95
- }
96
- function l(e) {
97
- let t = n[e];
98
- return t ? [...t] : void 0;
99
- }
100
- function u(e) {
101
- return r[e];
102
- }
103
- var d = {
104
- vendorLabel: "counterpart_name",
105
- issueDateLabel: "issued_at",
106
- dueDateLabel: "due_date",
107
- scheduledDateLabel: "scheduled_payment_date",
108
- addedOnLabel: "created_at"
109
- }, f = {
110
- [e.Vendor]: "vendorLabel",
111
- [e.IssueDate]: "issueDateLabel",
112
- [e.DueDate]: "dueDateLabel",
113
- [e.ScheduledDate]: "scheduledDateLabel",
114
- [e.AddedOn]: "addedOnLabel"
115
- };
116
- function p(e) {
117
- return f[e];
118
- }
119
- function m(e) {
120
- if (e) return d[e];
7
+ function r({ rowIds: r }) {
8
+ let [i, a] = n([]), o = e((e) => {
9
+ a((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
10
+ }, []), s = t(() => r.filter((e) => i.includes(e)), [r, i]), c = r.length > 0 && s.length === r.length, l = e(() => {
11
+ a(c ? [] : [...r]);
12
+ }, [c, r]);
13
+ return {
14
+ selectedIds: s,
15
+ isSelected: e((e) => i.includes(e), [i]),
16
+ toggleRow: o,
17
+ toggleAllRows: l,
18
+ selectAllChecked: c ? !0 : s.length > 0 && "indeterminate"
19
+ };
121
20
  }
122
21
  //#endregion
123
- export { s as BILL_QUEUE_COLUMNS, r as BILL_QUEUE_HAS_SCHEDULED_PAYMENT, o as BILL_QUEUE_ORDER, n as BILL_QUEUE_STATUSES, d as BILL_SORT_FIELDS, t as BillQueue, a as DEFAULT_BILL_QUEUE, c as billQueueColumns, u as billQueueHasScheduledPayment, i as billQueueOffersAddPanel, l as billQueueStatuses, p as billSortColumnId, m as billSortField };
22
+ export { r as useDuplicateBillsSelection };
@@ -1,11 +1,59 @@
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
5
+ import { DuplicateBillsDialog as e } from "../../ui/dist/index71.js";
6
+ import "../../ui/dist/index.js";
7
+ import { DUPLICATE_BILLS_LABELS_EN as t } from "./index57.js";
8
+ import { useDuplicateBillsSelection as n } from "./index58.js";
9
+ import { useMemo as r } from "react";
10
+ import { jsx as i } from "react/jsx-runtime";
1
11
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js
2
- async function e(e) {
3
- if (!e.trim()) return !1;
4
- try {
5
- return await navigator.clipboard.writeText(e), !0;
6
- } catch {
7
- return !1;
8
- }
12
+ var a = [];
13
+ function o({ open: o, onOpenChange: s, bills: c = a, canManageDuplicates: l = !0, onOpenBill: u, labels: d, dialogLabels: f }) {
14
+ let p = r(() => ({
15
+ ...t,
16
+ ...d
17
+ }), [d]), m = r(() => c.map((e) => e.id), [c]), { selectedIds: h, isSelected: g, toggleRow: _, toggleAllRows: v, selectAllChecked: y } = n({ rowIds: m }), b = r(() => c.map((e) => {
18
+ let t = e.isPossibleDuplicate ? p.duplicateBadge : p.existingBadge, n = {
19
+ vendorLabel: e.vendorLabel,
20
+ designation: t,
21
+ invoiceNumberLabel: e.invoiceNumberLabel,
22
+ addedOnLabel: e.addedOnLabel
23
+ };
24
+ return {
25
+ ...e,
26
+ duplicateBadge: {
27
+ label: t,
28
+ tone: e.isPossibleDuplicate ? "warning" : "success"
29
+ },
30
+ selectLabel: p.selectRow(n),
31
+ openLabel: p.openRow(n),
32
+ isSelected: g(e.id),
33
+ onToggleSelected: () => _(e.id),
34
+ onOpen: () => u?.(e.id)
35
+ };
36
+ }), [
37
+ c,
38
+ g,
39
+ p,
40
+ _,
41
+ u
42
+ ]), x = () => {
43
+ if (h.length === 0) throw Error("Duplicate review action taken with no bills selected — keep and cancel both need a subject.");
44
+ s(!1);
45
+ };
46
+ return /* @__PURE__ */ i(e, {
47
+ open: o,
48
+ onOpenChange: s,
49
+ rows: b,
50
+ selectAllChecked: y,
51
+ onToggleAllRows: v,
52
+ onKeepSelected: l ? x : void 0,
53
+ onCancelDuplicates: l ? x : void 0,
54
+ isActionDisabled: h.length === 0,
55
+ labels: f
56
+ });
9
57
  }
10
58
  //#endregion
11
- export { e as copyTextToClipboard };
59
+ export { o as DuplicateBillsContainer, o as default };
@@ -1,35 +1,6 @@
1
- import { coerceAmountValueToMinorUnits as e } from "../../../shared/util/dist/lib/coerceAmountValueToMinorUnits.js";
2
- import { formatMoneyExact as t } from "../../../shared/util/dist/lib/formatMoneyExact.js";
3
1
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js
4
- var n = {
5
- unnamedSourceAccount: "Bank account",
6
- availableBalancePrefix: (e) => `Available balance: ${e}`,
7
- futureInsufficientFunds: "Not enough funds right now. Add funds before the payment date.",
8
- todayInsufficientFunds: "Not enough funds to pay today. Choose a different account or a later date."
9
- };
10
- function r(e) {
11
- return e.slice(-4);
12
- }
13
- function i(i, a = n) {
14
- return i.filter((e) => e.status === "ACTIVE").map((n) => {
15
- let i = e(n.balance.value), o = n.balance.currencyCode;
16
- return {
17
- id: n.id,
18
- primaryLabel: `${n.nickname || a.unnamedSourceAccount} - ${r(n.accountNumber)}`,
19
- secondaryLabel: a.availableBalancePrefix(t(i / 100, { currencyCode: o })),
20
- balanceMinorUnits: i
21
- };
22
- });
23
- }
24
- function a({ selectedAccount: e, amountDueMinorUnits: t, isToday: r, labels: i = n }) {
25
- let a = e?.balanceMinorUnits;
26
- return a === void 0 ? { state: "warning" } : a >= t ? { state: "sufficient" } : r ? {
27
- state: "error",
28
- message: i.todayInsufficientFunds
29
- } : {
30
- state: "warning",
31
- message: i.futureInsufficientFunds
32
- };
2
+ function e(e) {
3
+ return e?.amount_due ?? e?.total_amount ?? void 0;
33
4
  }
34
5
  //#endregion
35
- export { n as SOURCE_ACCOUNT_LABELS_EN, a as deriveSourceAccountFunds, i as mapSourceAccountOptions };
6
+ export { e as resolveAmountDueMinorUnits };
@@ -1,46 +1,3 @@
1
- import { BillQueue as e } from "./index58.js";
2
- //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js
3
- var t = {
4
- [e.Drafts]: "Drafts",
5
- [e.Pending]: "Pending",
6
- [e.Scheduled]: "Scheduled",
7
- [e.Paid]: "Paid",
8
- [e.All]: "All bills"
9
- }, n = {
10
- [e.Drafts]: {
11
- title: "No drafts",
12
- description: "Bills wait here until someone submits them for approval."
13
- },
14
- [e.Pending]: {
15
- title: "Nothing to act on",
16
- description: "Every bill has been paid, scheduled, or is still a draft."
17
- },
18
- [e.Scheduled]: {
19
- title: "No scheduled bills",
20
- description: "Bills appear here once a payment date is set for them."
21
- },
22
- [e.Paid]: {
23
- title: "No paid bills",
24
- description: "Bills appear here once their payment has gone out."
25
- },
26
- [e.All]: {
27
- title: "No bills",
28
- description: "Bills appear here as soon as they are added."
29
- }
30
- }, r = {
31
- duplicateWarningOne: "1 possible duplicate bill found",
32
- duplicateWarningMany: (e) => `${e} possible duplicate bills found`,
33
- duplicateBadge: "Duplicate?",
34
- attachmentIndicator: "Has an attachment",
35
- emptyHeading: "Add your first bill",
36
- nonEmptyHeading: "Add a bill",
37
- createButton: "Add bill",
38
- emailCopiedToast: "Email address copied to clipboard",
39
- emailCopyFailedToast: "Could not copy the email address",
40
- queues: t,
41
- queueEmptyStates: n,
42
- filters: {},
43
- filterBar: {}
44
- };
45
- //#endregion
46
- export { r as BILLS_TAB_LABELS_EN, n as BILL_QUEUE_EMPTY_STATES_EN, t as BILL_QUEUE_LABELS_EN };
1
+ import "./index57.js";
2
+ import "./index58.js";
3
+ import "./index59.js";
@@ -2,21 +2,122 @@ import { BillColumn as e } from "../../ui/dist/index63.js";
2
2
  import "../../ui/dist/index.js";
3
3
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js
4
4
  var t = {
5
- root: "bill-pay-bills-tab",
6
- uploadTray: "bill-pay-upload-tray",
7
- detailsSheet: "bill-pay-details-sheet"
5
+ Drafts: "drafts",
6
+ Pending: "pending",
7
+ Scheduled: "scheduled",
8
+ Paid: "paid",
9
+ All: "all"
8
10
  }, n = {
9
- [e.Vendor]: "bill-pay-bills-cell-vendor",
10
- [e.IssueDate]: "bill-pay-bills-cell-issue-date",
11
- [e.DueDate]: "bill-pay-bills-cell-due-date",
12
- [e.ScheduledDate]: "bill-pay-bills-cell-scheduled-date",
13
- [e.PaidDate]: "bill-pay-bills-cell-paid-date",
14
- [e.Status]: "bill-pay-bills-cell-status",
15
- [e.AmountDue]: "bill-pay-bills-cell-amount-due",
16
- [e.AmountScheduled]: "bill-pay-bills-cell-amount-scheduled",
17
- [e.AmountPaid]: "bill-pay-bills-cell-amount-paid",
18
- [e.TotalAmount]: "bill-pay-bills-cell-total-amount",
19
- [e.AddedOn]: "bill-pay-bills-cell-added-on"
11
+ [t.Drafts]: ["draft"],
12
+ [t.Pending]: [
13
+ "new",
14
+ "approve_in_progress",
15
+ "waiting_to_be_paid",
16
+ "partially_paid"
17
+ ],
18
+ [t.Scheduled]: [
19
+ "new",
20
+ "approve_in_progress",
21
+ "waiting_to_be_paid",
22
+ "partially_paid"
23
+ ],
24
+ [t.Paid]: ["paid"],
25
+ [t.All]: void 0
26
+ }, r = {
27
+ [t.Drafts]: void 0,
28
+ [t.Pending]: !1,
29
+ [t.Scheduled]: !0,
30
+ [t.Paid]: void 0,
31
+ [t.All]: void 0
20
32
  };
33
+ function i(e) {
34
+ return e === t.Pending || e === t.Drafts;
35
+ }
36
+ var a = t.Pending, o = [
37
+ t.Pending,
38
+ t.Drafts,
39
+ t.Scheduled,
40
+ t.Paid,
41
+ t.All
42
+ ], s = {
43
+ [t.Drafts]: [
44
+ e.Vendor,
45
+ e.IssueDate,
46
+ e.DueDate,
47
+ e.Status,
48
+ e.AmountDue,
49
+ e.TotalAmount,
50
+ e.AddedOn
51
+ ],
52
+ [t.Pending]: [
53
+ e.Vendor,
54
+ e.IssueDate,
55
+ e.DueDate,
56
+ e.Status,
57
+ e.AmountDue,
58
+ e.TotalAmount,
59
+ e.AddedOn
60
+ ],
61
+ [t.Scheduled]: [
62
+ e.Vendor,
63
+ e.IssueDate,
64
+ e.DueDate,
65
+ e.ScheduledDate,
66
+ e.Status,
67
+ e.AmountScheduled,
68
+ e.TotalAmount,
69
+ e.AddedOn
70
+ ],
71
+ [t.Paid]: [
72
+ e.Vendor,
73
+ e.IssueDate,
74
+ e.DueDate,
75
+ e.PaidDate,
76
+ e.Status,
77
+ e.AmountPaid,
78
+ e.TotalAmount,
79
+ e.AddedOn
80
+ ],
81
+ [t.All]: [
82
+ e.Vendor,
83
+ e.IssueDate,
84
+ e.DueDate,
85
+ e.ScheduledDate,
86
+ e.Status,
87
+ e.AmountDue,
88
+ e.AmountPaid,
89
+ e.TotalAmount,
90
+ e.AddedOn
91
+ ]
92
+ };
93
+ function c(e) {
94
+ return s[e];
95
+ }
96
+ function l(e) {
97
+ let t = n[e];
98
+ return t ? [...t] : void 0;
99
+ }
100
+ function u(e) {
101
+ return r[e];
102
+ }
103
+ var d = {
104
+ vendorLabel: "counterpart_name",
105
+ issueDateLabel: "issued_at",
106
+ dueDateLabel: "due_date",
107
+ scheduledDateLabel: "scheduled_payment_date",
108
+ addedOnLabel: "created_at"
109
+ }, f = {
110
+ [e.Vendor]: "vendorLabel",
111
+ [e.IssueDate]: "issueDateLabel",
112
+ [e.DueDate]: "dueDateLabel",
113
+ [e.ScheduledDate]: "scheduledDateLabel",
114
+ [e.AddedOn]: "addedOnLabel"
115
+ };
116
+ function p(e) {
117
+ return f[e];
118
+ }
119
+ function m(e) {
120
+ if (e) return d[e];
121
+ }
21
122
  //#endregion
22
- export { t as billsTabTestIds, n as billsTableCellTestIds };
123
+ export { s as BILL_QUEUE_COLUMNS, r as BILL_QUEUE_HAS_SCHEDULED_PAYMENT, o as BILL_QUEUE_ORDER, n as BILL_QUEUE_STATUSES, d as BILL_SORT_FIELDS, t as BillQueue, a as DEFAULT_BILL_QUEUE, c as billQueueColumns, u as billQueueHasScheduledPayment, i as billQueueOffersAddPanel, l as billQueueStatuses, p as billSortColumnId, m as billSortField };
@@ -1,31 +1,11 @@
1
1
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js
2
- var e = {
3
- Draft: "draft",
4
- PendingApproval: "pending_approval",
5
- ReadyToPay: "ready_to_pay",
6
- PartiallyPaid: "partially_paid",
7
- Paid: "paid",
8
- Rejected: "rejected",
9
- Canceled: "canceled"
10
- }, t = [
11
- e.Draft,
12
- e.PendingApproval,
13
- e.ReadyToPay,
14
- e.PartiallyPaid,
15
- e.Paid,
16
- e.Rejected,
17
- e.Canceled
18
- ], n = {
19
- [e.Draft]: ["draft"],
20
- [e.PendingApproval]: ["new", "approve_in_progress"],
21
- [e.ReadyToPay]: ["waiting_to_be_paid"],
22
- [e.PartiallyPaid]: ["partially_paid"],
23
- [e.Paid]: ["paid"],
24
- [e.Rejected]: ["rejected"],
25
- [e.Canceled]: ["canceled"]
26
- };
27
- function r(e) {
28
- return e.flatMap((e) => n[e] ?? [e]);
2
+ async function e(e) {
3
+ if (!e.trim()) return !1;
4
+ try {
5
+ return await navigator.clipboard.writeText(e), !0;
6
+ } catch {
7
+ return !1;
8
+ }
29
9
  }
30
10
  //#endregion
31
- export { t as BILL_STATUS_FILTER_ORDER, e as BillStatusFilter, r as billStatusFilterApiValues };
11
+ export { e as copyTextToClipboard };
@@ -1,86 +1,46 @@
1
- import { endOfDay as e, endOfMonth as t, endOfQuarter as n, endOfWeek as r, endOfYear as i, startOfDay as a, startOfMonth as o, startOfQuarter as s, startOfWeek as c, startOfYear as l, subDays as u, subMonths as d, subQuarters as f, subWeeks as p, subYears as m } from "date-fns";
1
+ import { BillQueue as e } from "./index61.js";
2
2
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js
3
- var h = {
4
- Today: "today",
5
- ThisWeek: "this_week",
6
- ThisMonth: "this_month",
7
- ThisQuarter: "this_quarter",
8
- ThisYear: "this_year",
9
- Yesterday: "yesterday",
10
- LastWeek: "last_week",
11
- LastMonth: "last_month",
12
- Last30Days: "last_30_days",
13
- Last90Days: "last_90_days",
14
- LastQuarter: "last_quarter",
15
- LastYear: "last_year"
16
- };
17
- function g(g, _ = /* @__PURE__ */ new Date()) {
18
- let v = a(_);
19
- switch (g) {
20
- case h.Today: return {
21
- from: v,
22
- to: e(v)
23
- };
24
- case h.ThisWeek: return {
25
- from: c(v),
26
- to: r(v)
27
- };
28
- case h.ThisMonth: return {
29
- from: o(v),
30
- to: t(v)
31
- };
32
- case h.ThisQuarter: return {
33
- from: s(v),
34
- to: n(v)
35
- };
36
- case h.ThisYear: return {
37
- from: l(v),
38
- to: i(v)
39
- };
40
- case h.Yesterday: {
41
- let t = u(v, 1);
42
- return {
43
- from: t,
44
- to: e(t)
45
- };
46
- }
47
- case h.LastWeek: {
48
- let e = c(p(v, 1));
49
- return {
50
- from: e,
51
- to: r(e)
52
- };
53
- }
54
- case h.LastMonth: {
55
- let e = o(d(v, 1));
56
- return {
57
- from: e,
58
- to: t(e)
59
- };
60
- }
61
- case h.Last30Days: return {
62
- from: u(v, 29),
63
- to: e(v)
64
- };
65
- case h.Last90Days: return {
66
- from: u(v, 89),
67
- to: e(v)
68
- };
69
- case h.LastQuarter: {
70
- let e = s(f(v, 1));
71
- return {
72
- from: e,
73
- to: n(e)
74
- };
75
- }
76
- case h.LastYear: {
77
- let e = l(m(v, 1));
78
- return {
79
- from: e,
80
- to: i(e)
81
- };
82
- }
3
+ var t = {
4
+ [e.Drafts]: "Drafts",
5
+ [e.Pending]: "Pending",
6
+ [e.Scheduled]: "Scheduled",
7
+ [e.Paid]: "Paid",
8
+ [e.All]: "All bills"
9
+ }, n = {
10
+ [e.Drafts]: {
11
+ title: "No drafts",
12
+ description: "Bills wait here until someone submits them for approval."
13
+ },
14
+ [e.Pending]: {
15
+ title: "Nothing to act on",
16
+ description: "Every bill has been paid, scheduled, or is still a draft."
17
+ },
18
+ [e.Scheduled]: {
19
+ title: "No scheduled bills",
20
+ description: "Bills appear here once a payment date is set for them."
21
+ },
22
+ [e.Paid]: {
23
+ title: "No paid bills",
24
+ description: "Bills appear here once their payment has gone out."
25
+ },
26
+ [e.All]: {
27
+ title: "No bills",
28
+ description: "Bills appear here as soon as they are added."
83
29
  }
84
- }
30
+ }, r = {
31
+ duplicateWarningOne: "1 possible duplicate bill found",
32
+ duplicateWarningMany: (e) => `${e} possible duplicate bills found`,
33
+ duplicateBadge: "Duplicate?",
34
+ attachmentIndicator: "Has an attachment",
35
+ emptyHeading: "Add your first bill",
36
+ nonEmptyHeading: "Add a bill",
37
+ createButton: "Add bill",
38
+ emailCopiedToast: "Email address copied to clipboard",
39
+ emailCopyFailedToast: "Could not copy the email address",
40
+ queues: t,
41
+ queueEmptyStates: n,
42
+ filters: {},
43
+ filterBar: {}
44
+ };
85
45
  //#endregion
86
- export { h as BillsDatePreset, g as resolveDatePreset };
46
+ export { r as BILLS_TAB_LABELS_EN, n as BILL_QUEUE_EMPTY_STATES_EN, t as BILL_QUEUE_LABELS_EN };
@@ -1,50 +1,22 @@
1
- import { BillStatusFilter as e } from "./index62.js";
2
- import { BillsDatePreset as t } from "./index63.js";
1
+ import { BillColumn as e } from "../../ui/dist/index63.js";
2
+ import "../../ui/dist/index.js";
3
3
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js
4
- var n = {
5
- presets: {
6
- [t.Today]: "Today",
7
- [t.ThisWeek]: "This week",
8
- [t.ThisMonth]: "This month",
9
- [t.ThisQuarter]: "This quarter",
10
- [t.ThisYear]: "This year",
11
- [t.Yesterday]: "Yesterday",
12
- [t.LastWeek]: "Last week",
13
- [t.LastMonth]: "Last month",
14
- [t.Last30Days]: "Last 30 days",
15
- [t.Last90Days]: "Last 90 days",
16
- [t.LastQuarter]: "Last quarter",
17
- [t.LastYear]: "Last year"
18
- },
19
- presetGroupCurrent: "Current",
20
- presetGroupPast: "Past",
21
- statuses: {
22
- [e.Draft]: "Draft",
23
- [e.PendingApproval]: "Pending approval",
24
- [e.ReadyToPay]: "Ready to pay",
25
- [e.PartiallyPaid]: "Partially paid",
26
- [e.Paid]: "Paid",
27
- [e.Rejected]: "Rejected",
28
- [e.Canceled]: "Canceled"
29
- },
30
- dateFieldNames: {
31
- issueDate: "Issue date",
32
- dueDate: "Due date",
33
- addedOn: "Added on"
34
- },
35
- dateChip: (e, t) => `${e}: ${t}`,
36
- statusChip: (e) => `Status: ${e}`,
37
- vendorChip: (e) => `Vendor: ${e}`,
38
- amountChip: (e) => `Total amount: ${e}`,
39
- attachmentChipHas: "Has attachment",
40
- attachmentChipNone: "No attachment",
41
- moreSelected: (e, t) => `${e} + ${t} more`,
42
- amountAtLeast: (e) => `${e} or more`,
43
- amountAtMost: (e) => `${e} or less`,
44
- amountBetween: (e, t) => `${e} - ${t}`,
45
- dateRange: (e, t) => `${e} - ${t}`,
46
- dateFrom: (e) => `From ${e}`,
47
- dateTo: (e) => `Until ${e}`
4
+ var t = {
5
+ root: "bill-pay-bills-tab",
6
+ uploadTray: "bill-pay-upload-tray",
7
+ detailsSheet: "bill-pay-details-sheet"
8
+ }, n = {
9
+ [e.Vendor]: "bill-pay-bills-cell-vendor",
10
+ [e.IssueDate]: "bill-pay-bills-cell-issue-date",
11
+ [e.DueDate]: "bill-pay-bills-cell-due-date",
12
+ [e.ScheduledDate]: "bill-pay-bills-cell-scheduled-date",
13
+ [e.PaidDate]: "bill-pay-bills-cell-paid-date",
14
+ [e.Status]: "bill-pay-bills-cell-status",
15
+ [e.AmountDue]: "bill-pay-bills-cell-amount-due",
16
+ [e.AmountScheduled]: "bill-pay-bills-cell-amount-scheduled",
17
+ [e.AmountPaid]: "bill-pay-bills-cell-amount-paid",
18
+ [e.TotalAmount]: "bill-pay-bills-cell-total-amount",
19
+ [e.AddedOn]: "bill-pay-bills-cell-added-on"
48
20
  };
49
21
  //#endregion
50
- export { n as BILLS_FILTER_LABELS_EN };
22
+ export { t as billsTabTestIds, n as billsTableCellTestIds };