@tesouro/embedded-components-react 0.7.45 → 0.7.47

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 (106) hide show
  1. package/dist/index.d.ts +33 -39
  2. package/dist/lib/CounterpartsWidget.d.ts +33 -22
  3. package/dist/lib/CounterpartsWidgetPublic.d.ts +33 -22
  4. package/dist/lib/CustomersWidget.d.ts +31 -22
  5. package/dist/lib/ReceivablesWidget.d.ts +3 -0
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index24.js +12 -12
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index25.js +15 -15
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index31.js +1 -1
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index32.js +40 -42
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index33.js +1 -3
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index42.js +9 -9
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index5.js +30 -30
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index14.js +3 -2
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index15.js +7 -6
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index33.js +3 -2
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index34.js +9 -8
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index37.js +5 -4
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index48.js +1 -1
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index49.js +1 -1
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index5.js +3 -2
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index16.js +40 -40
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index18.js +3 -2
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index2.js +1 -1
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index20.js +8 -7
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index3.js +1 -1
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index5.js +1 -1
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index6.js +1 -1
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +9 -13
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index12.js +7 -10
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index13.js +76 -11
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index15.js +1 -1
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index16.js +27 -9
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index17.js +2 -76
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index18.js +30 -0
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index19.js +1 -1
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index20.js +5 -27
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index21.js +32 -2
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index22.js +2 -30
  39. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/viewModels.js +73 -77
  40. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index2.js +9 -26
  41. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index3.js +44 -44
  42. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index7.js +197 -208
  43. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +9 -9
  44. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/auditHistory/labels.js +2 -2
  45. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableDetails.js +1 -1
  46. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesWidget.js +2 -2
  47. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +22 -23
  48. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js +10 -24
  49. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index25.js +53 -37
  50. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index26.js +21 -53
  51. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index27.js +8 -21
  52. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index28.js +77 -8
  53. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index29.js +31 -69
  54. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index30.js +17 -38
  55. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index31.js +40 -17
  56. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index32.js +26 -38
  57. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index33.js +18 -27
  58. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index34.js +8 -18
  59. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index35.js +35 -9
  60. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index36.js +14 -36
  61. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index37.js +26 -14
  62. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index38.js +84 -23
  63. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index39.js +487 -80
  64. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index40.js +2 -494
  65. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index41.js +48 -2
  66. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index42.js +62 -38
  67. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index43.js +438 -61
  68. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index44.js +207 -431
  69. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index45.js +20 -222
  70. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index46.js +6 -21
  71. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index48.js +265 -0
  72. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index49.js +2 -265
  73. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index50.js +131 -2
  74. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index51.js +22 -125
  75. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index52.js +235 -23
  76. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index53.js +3 -240
  77. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index54.js +249 -3
  78. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index55.js +54 -242
  79. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index56.js +221 -51
  80. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index57.js +38 -222
  81. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js +13 -13
  82. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/labels.js +1 -1
  83. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartForm.js +85 -84
  84. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index10.js +238 -241
  85. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index11.js +2 -0
  86. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index2.js +6 -5
  87. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index5.js +2 -0
  88. package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index.js +8 -0
  89. package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index2.js +14 -0
  90. package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index3.js +13 -0
  91. package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index4.js +18 -0
  92. package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index5.js +2 -0
  93. package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index6.js +20 -0
  94. package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index7.js +32 -0
  95. package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index8.js +2 -0
  96. package/dist/libs/tesouro-embedded-components-react/{bill-pay-widget → shared/document-status}/util/dist/lib/derivePayableStatus.js +23 -10
  97. package/dist/libs/tesouro-embedded-components-react/shared/document-status/util/dist/lib/receivableFilledTone.js +22 -0
  98. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  99. package/package.json +1 -1
  100. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index14.js +0 -18
  101. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index23.js +0 -2
  102. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index24.js +0 -7
  103. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +0 -34
  104. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +0 -2
  105. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index47.js +0 -8
  106. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index58.js +0 -45
@@ -1,99 +1,95 @@
1
- import { formatMoney as e, isAchCompatibleBankAccount as t } from "../../../../../shared/counterpart-management/feature/dist/lib/helpers.js";
1
+ import { derivePayableStatus as e, isPayableApiStatus as t } from "../../../../../shared/document-status/util/dist/lib/derivePayableStatus.js";
2
+ import { receivableFilledTone as n } from "../../../../../shared/document-status/util/dist/lib/receivableFilledTone.js";
3
+ import { BILL_STATUS_BADGE_LABELS_EN as r } from "../../../../../shared/document-status/ui/dist/index2.js";
4
+ import { RECEIVABLE_STATUS_BADGE_LABELS_EN as i } from "../../../../../shared/document-status/ui/dist/index6.js";
5
+ import "../../../../../shared/document-status/ui/dist/index.js";
6
+ import { formatMoney as a, isAchCompatibleBankAccount as o } from "../../../../../shared/counterpart-management/feature/dist/lib/helpers.js";
2
7
  import "../../../../../shared/counterpart-management/feature/dist/index.js";
3
8
  //#region ../../libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/viewModels.js
4
- function n(e) {
9
+ function s(e) {
5
10
  if (!e) return "";
6
11
  let t = [...e], n = t.flatMap((e, t) => /\d/.test(e) ? [t] : []);
7
12
  if (n.length <= 4) return "••••";
8
13
  let r = /* @__PURE__ */ new Set([...n.slice(0, 2), ...n.slice(-2)]);
9
14
  return t.map((e, t) => /\d/.test(e) && !r.has(t) ? "•" : e).join("");
10
15
  }
11
- var r = /* @__PURE__ */ new Set([
12
- "new",
13
- "approve_in_progress",
14
- "waiting_to_be_paid",
15
- "partially_paid"
16
- ]);
17
- function i(e, t) {
18
- if (!t || !e || !r.has(e)) return !1;
19
- let n = /* @__PURE__ */ new Date();
20
- n.setUTCHours(0, 0, 0, 0);
21
- let i = new Date(t);
22
- return i.setUTCHours(0, 0, 0, 0), i.getTime() < n.getTime();
23
- }
24
- var a = {
25
- draft: ["billStatusDraft", "billNeutral"],
26
- new: ["billStatusReadyToSubmit", "billAccent"],
27
- approve_in_progress: ["billStatusPendingApproval", "billInfo"],
28
- waiting_to_be_paid: ["billStatusReadyToPay", "billSuccess"],
29
- partially_paid: ["billStatusReadyToPay", "billSuccess"],
30
- paid: ["billStatusPaid", "billSettled"],
31
- canceled: ["billStatusCanceled", "billNeutral"],
32
- rejected: ["billStatusRejected", "billDanger"]
33
- }, o = {
34
- draft: ["receivableStatusDraft", "invoiceNeutral"],
35
- recurring: ["receivableStatusRecurring", "invoiceNeutral"],
36
- issuing: ["receivableStatusIssuing", "invoiceCyan"],
37
- issued: ["receivableStatusIssued", "invoiceCyan"],
38
- accepted: ["receivableStatusAccepted", "invoiceSuccess"],
39
- paid: ["receivableStatusPaid", "invoiceSuccess"],
40
- partially_paid: ["receivableStatusPartiallyPaid", "invoicePurple"],
41
- overdue: ["receivableStatusOverdue", "invoiceOrange"],
42
- failed: ["receivableStatusFailed", "invoiceDanger"],
43
- expired: ["receivableStatusExpired", "invoiceDanger"],
44
- uncollectible: ["receivableStatusUncollectible", "invoiceDanger"],
45
- canceled: ["receivableStatusCanceled", "invoiceDanger"],
46
- declined: ["receivableStatusDeclined", "invoiceDanger"],
47
- deleted: ["receivableStatusDeleted", "invoiceDanger"]
48
- };
49
- function s(e, t, n) {
50
- let [r, i] = (t === "bill" ? a : o)[e ?? ""] ?? ["receivableStatusUnknown", t === "bill" ? "billNeutral" : "invoiceNeutral"];
16
+ function c(a, o, s, c) {
17
+ if (a === "invoice") {
18
+ let e = {
19
+ ...i,
20
+ ...c.invoiceStatusBadge
21
+ };
22
+ return {
23
+ status: {
24
+ kind: "invoice",
25
+ label: o && Object.hasOwn(e, o) ? e[o] : e.unknown,
26
+ tone: n(o)
27
+ },
28
+ isOverdue: !1
29
+ };
30
+ }
31
+ let l = {
32
+ ...r,
33
+ ...c.billStatusBadge
34
+ };
35
+ if (!t(o)) return {
36
+ status: {
37
+ kind: "bill",
38
+ label: l.unknown,
39
+ tone: "neutral"
40
+ },
41
+ isOverdue: !1
42
+ };
43
+ let u = e({
44
+ apiStatus: o,
45
+ dueDate: s
46
+ });
51
47
  return {
52
- statusLabel: n[r],
53
- statusTone: i
48
+ status: {
49
+ kind: "bill",
50
+ label: l[u.status],
51
+ tone: u.tone
52
+ },
53
+ isOverdue: u.isOverdue
54
54
  };
55
55
  }
56
- var c = new Intl.DateTimeFormat(void 0, {
56
+ var l = new Intl.DateTimeFormat(void 0, {
57
57
  day: "2-digit",
58
58
  month: "short",
59
59
  year: "numeric"
60
60
  });
61
- function l(e) {
61
+ function u(e) {
62
62
  if (!e) return "";
63
63
  let t = new Date(e);
64
- return Number.isNaN(t.getTime()) ? "" : c.format(t);
64
+ return Number.isNaN(t.getTime()) ? "" : l.format(t);
65
65
  }
66
- function u(t, n, r) {
67
- return (t ?? []).map((t) => {
68
- let a = t.status ?? void 0, o = n === "bill" && i(a, t.due_date), c = s(a, n, r);
69
- return {
70
- id: t.id,
71
- amountLabel: e(t.total_amount ?? 0, t.currency ?? void 0),
72
- dateLabel: l(t.issued_at ?? t.issue_date ?? t.created_at),
73
- ...c,
74
- isOverdue: o
75
- };
76
- });
66
+ function d(e, t, n) {
67
+ return (e ?? []).map((e) => ({
68
+ id: e.id,
69
+ amountLabel: a(e.total_amount ?? 0, e.currency ?? void 0),
70
+ dateLabel: u(e.issued_at ?? e.issue_date ?? e.created_at),
71
+ ...c(t, e.status ?? void 0, e.due_date, n)
72
+ }));
77
73
  }
78
- function d(e) {
74
+ function f(e) {
79
75
  return e ? `•••• ${e.slice(-4)}` : "";
80
76
  }
81
- function f(e, n) {
82
- let r = e?.find(t);
83
- if (r) return {
84
- id: r.id,
85
- title: n,
86
- accountHolderLabel: r.account_holder_name ?? "",
87
- accountNumberLabel: d(r.account_number),
88
- routingNumberLabel: r.routing_number ?? "",
89
- isIncomplete: !(r.account_holder_name && r.account_number && r.routing_number)
77
+ function p(e, t) {
78
+ let n = e?.find(o);
79
+ if (n) return {
80
+ id: n.id,
81
+ title: t,
82
+ accountHolderLabel: n.account_holder_name ?? "",
83
+ accountNumberLabel: f(n.account_number),
84
+ routingNumberLabel: n.routing_number ?? "",
85
+ isIncomplete: !(n.account_holder_name && n.account_number && n.routing_number)
90
86
  };
91
87
  }
92
- function p(e, t) {
88
+ function m(e, t) {
93
89
  if (!t) return e;
94
90
  let n = t.address;
95
91
  return {
96
- ...h({
92
+ ...g({
97
93
  editingAddressHeading: t.title,
98
94
  addingAddressHeading: t.title,
99
95
  cancelButton: t.cancelButton,
@@ -110,21 +106,21 @@ function p(e, t) {
110
106
  ...e
111
107
  };
112
108
  }
113
- function m(e) {
109
+ function h(e) {
114
110
  return e ? {
115
111
  fieldMarkers: e.fieldMarkers,
116
112
  addressFieldMarkers: e.address?.fieldMarkers,
117
113
  requiredFieldsLegend: e.requiredFieldsLegend
118
114
  } : {};
119
115
  }
120
- function h(e) {
116
+ function g(e) {
121
117
  return Object.fromEntries(Object.entries(e).filter(([, e]) => e !== void 0));
122
118
  }
123
- function g(e) {
119
+ function _(e) {
124
120
  if (!e) return {};
125
121
  let t = e.address;
126
122
  return {
127
- labels: h({
123
+ labels: g({
128
124
  editingCustomerDetailsHeading: e.editTitleCustomer,
129
125
  editingVendorDetailsHeading: e.editTitleVendor,
130
126
  firstNameLabel: e.firstNameLabel,
@@ -156,7 +152,7 @@ function g(e) {
156
152
  requiredFieldsLegend: e.requiredFieldsLegend
157
153
  };
158
154
  }
159
- var _ = {
155
+ var v = {
160
156
  firstName: "firstName",
161
157
  lastName: "lastName",
162
158
  businessName: "legalName",
@@ -164,7 +160,7 @@ var _ = {
164
160
  phone: "phone",
165
161
  taxId: "taxId"
166
162
  };
167
- function v(e, t, n, r) {
163
+ function y(e, t, n, r) {
168
164
  let i = e === "vendor", a = t.entityType === "individual";
169
165
  return {
170
166
  heading: i ? r.editingVendorDetailsHeading : r.editingCustomerDetailsHeading,
@@ -210,4 +206,4 @@ function v(e, t, n, r) {
210
206
  };
211
207
  }
212
208
  //#endregion
213
- export { _ as EDIT_FORM_FIELD_KEYS, m as addressFormLabelOverrides, v as buildCounterpartEditFormView, f as buildPaymentMethodView, u as buildRecentDocumentRows, g as editFormLabelOverrides, l as formatDetailsDate, n as maskTaxId, p as withAddressLabelOverrides };
209
+ export { v as EDIT_FORM_FIELD_KEYS, h as addressFormLabelOverrides, y as buildCounterpartEditFormView, p as buildPaymentMethodView, d as buildRecentDocumentRows, _ as editFormLabelOverrides, u as formatDetailsDate, s as maskTaxId, m as withAddressLabelOverrides };
@@ -1,6 +1,9 @@
1
1
  import { FILTER_MENU_BUTTON_LABELS_EN as e, FILTER_TAG_LABELS_EN as t } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { BILL_STATUS_BADGE_LABELS_EN as n } from "../../../shared/document-status/ui/dist/index2.js";
3
+ import { RECEIVABLE_STATUS_BADGE_LABELS_EN as r } from "../../../shared/document-status/ui/dist/index6.js";
4
+ import "../../../shared/document-status/ui/dist/index.js";
2
5
  //#region ../../libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index2.js
3
- var n = {
6
+ var i = {
4
7
  createButton: "Add customer",
5
8
  vendorsCreateButton: "Add vendor",
6
9
  columnName: "Name",
@@ -39,7 +42,7 @@ var n = {
39
42
  errorRetry: "Reload",
40
43
  accessRestrictedTitle: "Access Restricted",
41
44
  accessRestrictedDescription: "You don’t have permissions to view this page. Contact your system administrator for details."
42
- }, r = {
45
+ }, a = {
43
46
  hiddenDescription: "Counterpart details",
44
47
  loadingTitle: "Loading...",
45
48
  notFoundCustomerTitle: "Customer not found",
@@ -64,7 +67,7 @@ var n = {
64
67
  recentCustomerDocumentsDescription: "Latest activity",
65
68
  recentVendorDocumentsDescription: "Sorted by issue date",
66
69
  viewAllDocumentsAction: "View all",
67
- subtitleTemplate: "{type} - Added {date}",
70
+ subtitleTemplate: "{type} · Added {date}",
68
71
  customerSubtitleLabel: "Customer",
69
72
  vendorSubtitleLabel: "Vendor",
70
73
  entityTypePersonLabel: "Person",
@@ -101,28 +104,8 @@ var n = {
101
104
  routingNumberLabel: "Routing number",
102
105
  noPaymentMethods: "No payment methods yet.",
103
106
  editButton: "Edit",
104
- billStatusDraft: "Draft",
105
- billStatusReadyToSubmit: "Ready to submit",
106
- billStatusPendingApproval: "Pending review",
107
- billStatusReadyToPay: "Ready to pay",
108
- billStatusPaid: "Paid",
109
- billStatusCanceled: "Cancelled",
110
- billStatusRejected: "Rejected",
111
- receivableStatusDraft: "Draft",
112
- receivableStatusIssuing: "Issuing",
113
- receivableStatusIssued: "Issued",
114
- receivableStatusFailed: "Failed",
115
- receivableStatusAccepted: "Accepted",
116
- receivableStatusExpired: "Expired",
117
- receivableStatusDeclined: "Declined",
118
- receivableStatusRecurring: "Recurring",
119
- receivableStatusPartiallyPaid: "Partially paid",
120
- receivableStatusPaid: "Paid",
121
- receivableStatusOverdue: "Overdue",
122
- receivableStatusUncollectible: "Uncollectible",
123
- receivableStatusCanceled: "Canceled",
124
- receivableStatusDeleted: "Deleted",
125
- receivableStatusUnknown: "Unknown",
107
+ billStatusBadge: n,
108
+ invoiceStatusBadge: r,
126
109
  optionalSuffix: "(optional)",
127
110
  editingCustomerDetailsHeading: "Editing customer details",
128
111
  editingVendorDetailsHeading: "Editing vendor details",
@@ -147,4 +130,4 @@ var n = {
147
130
  saveButton: "Save"
148
131
  };
149
132
  //#endregion
150
- export { n as COUNTERPARTS_SCREEN_LABELS_EN, r as COUNTERPART_DETAILS_SHEET_LABELS_EN };
133
+ export { i as COUNTERPARTS_SCREEN_LABELS_EN, a as COUNTERPART_DETAILS_SHEET_LABELS_EN };
@@ -4,15 +4,15 @@ import { ErrorState as f } from "../../../shared/ui/dist/lib/ErrorState/ErrorSta
4
4
  import "../../../shared/ui/dist/index.js";
5
5
  import { COUNTERPARTS_SCREEN_LABELS_EN as p } from "./index2.js";
6
6
  import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
7
- import { ArrowDownIcon as _, ArrowUpDownIcon as v, ArrowUpIcon as y, ListFilter as b, PlusIcon as x } from "lucide-react";
7
+ import { ArrowDownIcon as _, ArrowUpDownIcon as v, ArrowUpIcon as y, ListFilter as b } from "lucide-react";
8
8
  //#region ../../libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index3.js
9
- var S = [
9
+ var x = [
10
10
  10,
11
11
  25,
12
12
  50,
13
13
  100
14
14
  ];
15
- function C({ labels: e, filters: t, disabled: u }) {
15
+ function S({ labels: e, filters: t, disabled: u }) {
16
16
  return /* @__PURE__ */ h(n, {
17
17
  className: "ttw:flex-wrap ttw:px-4",
18
18
  searchSlot: /* @__PURE__ */ h(l, {
@@ -72,7 +72,7 @@ function C({ labels: e, filters: t, disabled: u }) {
72
72
  })] })
73
73
  });
74
74
  }
75
- function w({ value: e, isLoading: t, colorClass: n }) {
75
+ function C({ value: e, isLoading: t, colorClass: n }) {
76
76
  return /* @__PURE__ */ h("div", {
77
77
  className: "ttw:flex ttw:justify-end",
78
78
  children: t ? /* @__PURE__ */ h(u, { className: "ttw:h-4 ttw:w-20" }) : /* @__PURE__ */ h("span", {
@@ -81,11 +81,11 @@ function w({ value: e, isLoading: t, colorClass: n }) {
81
81
  })
82
82
  });
83
83
  }
84
- function T({ mode: n, counterparts: r, isLoading: i, isError: a, errorTitle: o, errorDescription: s, sorting: c, onSortingChange: l, pageSize: u, onPageSizeChange: m, pageSizeOptions: b = S, hasNextPage: T, hasPrevPage: E, onNextPage: D, onPrevPage: O, filters: k, isFiltering: A, canCreate: j = !0, isAccessRestricted: M, onCreateClick: N, onRowClick: P, onRetry: F, labels: I, emptyStateTestId: L, accessRestrictedTestId: R }) {
85
- let z = {
84
+ function w({ mode: n, counterparts: r, isLoading: i, isError: a, errorTitle: o, errorDescription: s, sorting: c, onSortingChange: l, pageSize: u, onPageSizeChange: m, pageSizeOptions: b = x, hasNextPage: w, hasPrevPage: T, onNextPage: E, onPrevPage: D, filters: O, isFiltering: k, canCreate: A = !0, isAccessRestricted: j, onCreateClick: M, onRowClick: N, onRetry: P, labels: F, emptyStateTestId: I, accessRestrictedTestId: L }) {
85
+ let R = {
86
86
  ...p,
87
- ...I
88
- }, B = n === "customer", V = B ? z.columnReceivedAmount : z.columnTotalPaidToDate, H = B ? z.columnAmountDue : z.columnBalanceDue, U = [
87
+ ...F
88
+ }, z = n === "customer", B = z ? R.columnReceivedAmount : R.columnTotalPaidToDate, V = z ? R.columnAmountDue : R.columnBalanceDue, H = [
89
89
  {
90
90
  accessorKey: "name",
91
91
  enableSorting: !0,
@@ -93,10 +93,10 @@ function T({ mode: n, counterparts: r, isLoading: i, isError: a, errorTitle: o,
93
93
  let n = t.getIsSorted();
94
94
  return /* @__PURE__ */ g("div", {
95
95
  className: "ttw:flex ttw:items-center ttw:gap-2 ttw:text-inherit",
96
- children: [z.columnName, /* @__PURE__ */ h(e, {
96
+ children: [R.columnName, /* @__PURE__ */ h(e, {
97
97
  variant: "ghost",
98
98
  size: "icon-sm",
99
- "aria-label": z.sortByName,
99
+ "aria-label": R.sortByName,
100
100
  onClick: () => t.toggleSorting(n === "asc"),
101
101
  children: h(n === "asc" ? y : n === "desc" ? _ : v, { className: "ttw:size-4" })
102
102
  })]
@@ -117,9 +117,9 @@ function T({ mode: n, counterparts: r, isLoading: i, isError: a, errorTitle: o,
117
117
  accessorKey: "billedAmountLabel",
118
118
  header: () => /* @__PURE__ */ h("div", {
119
119
  className: "ttw:text-right",
120
- children: z.columnBilledAmount
120
+ children: R.columnBilledAmount
121
121
  }),
122
- cell: ({ row: e }) => /* @__PURE__ */ h(w, {
122
+ cell: ({ row: e }) => /* @__PURE__ */ h(C, {
123
123
  value: e.original.billedAmountLabel,
124
124
  isLoading: e.original.isBilledAmountLoading
125
125
  })
@@ -128,9 +128,9 @@ function T({ mode: n, counterparts: r, isLoading: i, isError: a, errorTitle: o,
128
128
  accessorKey: "receivedOrPaidAmountLabel",
129
129
  header: () => /* @__PURE__ */ h("div", {
130
130
  className: "ttw:text-right",
131
- children: V
131
+ children: B
132
132
  }),
133
- cell: ({ row: e }) => /* @__PURE__ */ h(w, {
133
+ cell: ({ row: e }) => /* @__PURE__ */ h(C, {
134
134
  value: e.original.receivedOrPaidAmountLabel,
135
135
  isLoading: e.original.isReceivedOrPaidAmountLoading,
136
136
  colorClass: e.original.isReceivedOrPaidPositive ? "ttw:text-green-700" : void 0
@@ -140,33 +140,33 @@ function T({ mode: n, counterparts: r, isLoading: i, isError: a, errorTitle: o,
140
140
  accessorKey: "dueOrOwedAmountLabel",
141
141
  header: () => /* @__PURE__ */ h("div", {
142
142
  className: "ttw:text-right",
143
- children: H
143
+ children: V
144
144
  }),
145
- cell: ({ row: e }) => /* @__PURE__ */ h(w, {
145
+ cell: ({ row: e }) => /* @__PURE__ */ h(C, {
146
146
  value: e.original.dueOrOwedAmountLabel,
147
147
  isLoading: e.original.isDueOrOwedAmountLoading
148
148
  })
149
149
  }
150
- ], W = B ? z.customersEmptyTitle : z.vendorsEmptyTitle, G = B ? z.customersEmptyDescription : z.vendorsEmptyDescription, K = B ? z.customersEmptyAction : z.vendorsEmptyAction, q = B ? z.customersFilterEmptyTitle : z.vendorsFilterEmptyTitle, J = !A && !k.searchValue && !r.length && !i, Y = !(!j || M), X = !(A || !Y), Z = !A && !i && !a && !r.length, Q = Y && !Z, $ = B ? z.createButton : z.vendorsCreateButton;
150
+ ], U = z ? R.customersEmptyTitle : R.vendorsEmptyTitle, W = z ? R.customersEmptyDescription : R.vendorsEmptyDescription, G = z ? R.customersEmptyAction : R.vendorsEmptyAction, K = z ? R.customersFilterEmptyTitle : R.vendorsFilterEmptyTitle, q = !k && !O.searchValue && !r.length && !i, J = !(!A || j), Y = !(k || !J), X = !k && !i && !a && !r.length, Z = J && !X, Q = z ? R.createButton : R.vendorsCreateButton;
151
151
  return /* @__PURE__ */ g("div", {
152
152
  className: "ttw:flex ttw:flex-col ttw:gap-4",
153
- children: [Q && /* @__PURE__ */ h("div", {
153
+ children: [Z && /* @__PURE__ */ h("div", {
154
154
  className: "ttw:flex ttw:items-center ttw:justify-end ttw:gap-2",
155
- children: /* @__PURE__ */ g(e, {
156
- onClick: N,
157
- children: [/* @__PURE__ */ h(x, { className: "ttw:size-4" }), $]
155
+ children: /* @__PURE__ */ h(e, {
156
+ onClick: M,
157
+ children: Q
158
158
  })
159
- }), M ? /* @__PURE__ */ h(f, {
160
- testId: R,
161
- title: z.accessRestrictedTitle,
162
- description: z.accessRestrictedDescription
159
+ }), j ? /* @__PURE__ */ h(f, {
160
+ testId: L,
161
+ title: R.accessRestrictedTitle,
162
+ description: R.accessRestrictedDescription
163
163
  }) : a ? /* @__PURE__ */ h(f, {
164
164
  title: o,
165
165
  description: s,
166
- retryLabel: F ? z.errorRetry : void 0,
167
- onRetry: F
166
+ retryLabel: P ? R.errorRetry : void 0,
167
+ onRetry: P
168
168
  }) : /* @__PURE__ */ h(t, {
169
- columns: U,
169
+ columns: H,
170
170
  data: r,
171
171
  isLoading: i,
172
172
  sorting: c,
@@ -174,26 +174,26 @@ function T({ mode: n, counterparts: r, isLoading: i, isError: a, errorTitle: o,
174
174
  pageSize: u,
175
175
  onPageSizeChange: m,
176
176
  pageSizeOptions: b,
177
- hasNextPage: T,
178
- hasPrevPage: E,
179
- onNextPage: D,
180
- onPrevPage: O,
181
- onRowClick: P,
182
- rowAriaLabel: (e) => z.openRow(e.name),
183
- filterComponent: /* @__PURE__ */ h(C, {
184
- labels: z,
185
- filters: k,
186
- disabled: J
177
+ hasNextPage: w,
178
+ hasPrevPage: T,
179
+ onNextPage: E,
180
+ onPrevPage: D,
181
+ onRowClick: N,
182
+ rowAriaLabel: (e) => R.openRow(e.name),
183
+ filterComponent: /* @__PURE__ */ h(S, {
184
+ labels: R,
185
+ filters: O,
186
+ disabled: q
187
187
  }),
188
188
  children: /* @__PURE__ */ h(d, {
189
- testId: L,
190
- title: A ? q : W,
191
- description: A ? z.filterEmptyDescription : G,
192
- actionLabel: A ? z.filterEmptyAction : X ? K : void 0,
193
- onAction: A ? k.onClearAll : X ? N : void 0
189
+ testId: I,
190
+ title: k ? K : U,
191
+ description: k ? R.filterEmptyDescription : W,
192
+ actionLabel: k ? R.filterEmptyAction : Y ? G : void 0,
193
+ onAction: k ? O.onClearAll : Y ? M : void 0
194
194
  })
195
195
  })]
196
196
  });
197
197
  }
198
198
  //#endregion
199
- export { T as CounterpartsScreen, T as default };
199
+ export { w as CounterpartsScreen, w as default };