@tesouro/embedded-components-react 0.4.15 → 0.4.17

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 (125) hide show
  1. package/dist/index.css +39 -2
  2. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index.js +5 -4
  3. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index14.js +47 -21
  4. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index15.js +22 -77
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index16.js +75 -24
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index17.js +36 -0
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index11.js +63 -43
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +1 -1
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +2 -2
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +2 -2
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +64 -48
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index4.js +2 -1
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +10 -2
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +1 -1
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +141 -118
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +93 -93
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +83 -67
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +235 -218
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +1 -1
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +5 -5
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js +19 -12
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +1 -0
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +42 -24
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +1 -1
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +1 -1
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +17 -17
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +1 -1
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +1 -1
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +2 -2
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +2 -2
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +39 -39
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index100.js +2 -10
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index101.js +8 -50
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index102.js +52 -2
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index103.js +2 -0
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index16.js +1 -0
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index17.js +7 -7
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +26 -49
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +19 -306
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index27.js +154 -2
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js +2 -9
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index29.js +60 -45
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index30.js +251 -1
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index31.js +2 -18
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index32.js +7 -48
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index33.js +49 -2
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index34.js +2 -23
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index35.js +15 -337
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index36.js +50 -2
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index37.js +2 -16
  51. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index38.js +21 -118
  52. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index39.js +340 -2
  53. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index40.js +2 -12
  54. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index41.js +10 -97
  55. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index42.js +99 -2
  56. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index43.js +1 -12
  57. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index44.js +11 -57
  58. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index45.js +58 -1
  59. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +1 -54
  60. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index47.js +52 -10
  61. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index48.js +10 -179
  62. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index49.js +181 -1
  63. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index50.js +2 -4
  64. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index51.js +2 -39
  65. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index52.js +41 -2
  66. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index53.js +2 -7
  67. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index54.js +5 -90
  68. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index55.js +92 -2
  69. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index56.js +2 -4
  70. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index57.js +2 -14
  71. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index58.js +16 -2
  72. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index59.js +1 -87
  73. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js +83 -291
  74. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index61.js +292 -9
  75. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index62.js +13 -1
  76. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index63.js +1 -8
  77. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index64.js +6 -37
  78. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index65.js +39 -2
  79. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index66.js +2 -39
  80. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index67.js +36 -9
  81. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index68.js +10 -199
  82. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index69.js +201 -3
  83. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index70.js +3 -17
  84. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index71.js +15 -345
  85. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index72.js +345 -8
  86. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index73.js +6 -4
  87. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +7 -91
  88. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index75.js +93 -0
  89. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index77.js +2 -127
  90. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index78.js +122 -25
  91. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index79.js +26 -87
  92. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index80.js +94 -2
  93. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index81.js +2 -7
  94. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +5 -28
  95. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index83.js +30 -2
  96. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index84.js +2 -7
  97. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index85.js +5 -32
  98. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index86.js +34 -2
  99. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index87.js +2 -12
  100. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index88.js +10 -104
  101. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index89.js +105 -1
  102. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index90.js +2 -17
  103. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index91.js +15 -123
  104. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index92.js +125 -2
  105. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index93.js +2 -18
  106. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index94.js +14 -6
  107. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index95.js +7 -167
  108. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index96.js +170 -2
  109. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index97.js +2 -14
  110. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index98.js +11 -105
  111. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index99.js +108 -2
  112. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index4.js +8 -8
  113. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index9.js +4 -4
  114. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index.js +5 -5
  115. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/index.js +19 -19
  116. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js +39 -33
  117. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/subEntityForms.js +15 -15
  118. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useAddressForm.js +9 -9
  119. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartDetails.js +7 -7
  120. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartForm.js +37 -37
  121. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartSelector.js +15 -15
  122. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/usePayableAchInstructions.js +7 -7
  123. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  124. package/package.json +1 -1
  125. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index76.js +0 -2
@@ -5,32 +5,39 @@ var e = /* @__PURE__ */ new Set([
5
5
  "waiting_to_be_paid",
6
6
  "partially_paid"
7
7
  ]);
8
- function t(e, t) {
8
+ function t(t) {
9
+ return !!(t && e.has(t));
10
+ }
11
+ function n(e, t) {
9
12
  let n = /* @__PURE__ */ new Date(`${e.slice(0, 10)}T00:00:00Z`), r = Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate());
10
13
  return n.getTime() < r;
11
14
  }
12
- function n({ apiStatus: n, dueDate: r, scheduledPaymentDate: i, hasScheduledPayment: a = !!i, now: o = /* @__PURE__ */ new Date() }) {
13
- if (e.has(n) && a) return {
15
+ function r({ apiStatus: t, dueDate: r, scheduledPaymentDate: i, hasScheduledPayment: a = !!i, now: o = /* @__PURE__ */ new Date() }) {
16
+ if (e.has(t) && a) return {
14
17
  status: "scheduled",
15
18
  tone: "accent",
16
19
  isOverdue: !1
17
20
  };
18
- let s = !!(e.has(n) && r && t(r, o));
19
- switch (n) {
20
- case "draft":
21
- case "new": return {
21
+ let s = !!(e.has(t) && r && n(r, o));
22
+ switch (t) {
23
+ case "draft": return {
22
24
  status: "draft",
23
25
  tone: "neutral",
24
26
  isOverdue: s
25
27
  };
28
+ case "new": return {
29
+ status: "new",
30
+ tone: "accent",
31
+ isOverdue: s
32
+ };
26
33
  case "approve_in_progress": return {
27
34
  status: "pending_approval",
28
- tone: "warning",
35
+ tone: "info",
29
36
  isOverdue: s
30
37
  };
31
38
  case "waiting_to_be_paid": return {
32
39
  status: "ready_to_pay",
33
- tone: "info",
40
+ tone: "success",
34
41
  isOverdue: s
35
42
  };
36
43
  case "partially_paid": return {
@@ -40,12 +47,12 @@ function n({ apiStatus: n, dueDate: r, scheduledPaymentDate: i, hasScheduledPaym
40
47
  };
41
48
  case "paid": return {
42
49
  status: "paid",
43
- tone: "success",
50
+ tone: "complete",
44
51
  isOverdue: s
45
52
  };
46
53
  case "canceled": return {
47
54
  status: "canceled",
48
- tone: "muted",
55
+ tone: "neutral",
49
56
  isOverdue: s
50
57
  };
51
58
  case "rejected": return {
@@ -56,4 +63,4 @@ function n({ apiStatus: n, dueDate: r, scheduledPaymentDate: i, hasScheduledPaym
56
63
  }
57
64
  }
58
65
  //#endregion
59
- export { n as derivePayableStatus };
66
+ export { r as derivePayableStatus, t as hasUnpaidBalance };
@@ -3,6 +3,7 @@ var e = {
3
3
  uploadingSummary: (e) => `Uploading and scanning ${e} ${e === 1 ? "file" : "files"}`,
4
4
  completeSummary: (e) => `${e} ${e === 1 ? "upload" : "uploads"} complete`,
5
5
  readyCaption: (e) => `${e} new ${e === 1 ? "bill" : "bills"} ready`,
6
+ duplicateCaption: (e) => `${e} possible ${e === 1 ? "duplicate" : "duplicates"}`,
6
7
  failedCaption: (e) => `${e} failed to upload`,
7
8
  tooManyFilesError: (e) => `You can only upload up to ${e} files at a time`,
8
9
  remainingCapacityError: (e) => e === 0 ? "Wait for the current uploads to finish before adding more files" : `You can upload ${e} more ${e === 1 ? "file" : "files"} right now`
@@ -6,7 +6,7 @@ import { toast as e } from "../../../../../packages/shared-ui-shadcn/dist/index.
6
6
  import { useEmbedApi as t } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
7
7
  import "../../../shared/ui/dist/index.js";
8
8
  import { useUploadPayableFromFileMutation as n } from "../../data-access/dist/index13.js";
9
- import { usePayableOcrQueries as r } from "../../data-access/dist/index14.js";
9
+ import { usePayableOcrQueries as r } from "../../data-access/dist/index15.js";
10
10
  import "../../data-access/dist/index.js";
11
11
  import { billPayUploadQueueKey as i } from "./index64.js";
12
12
  import { BILL_UPLOAD_QUEUE_LABELS_EN as a } from "./index65.js";
@@ -28,7 +28,9 @@ function f({ onOpenBill: f, labels: p } = {}) {
28
28
  ...n,
29
29
  ...t
30
30
  } : n));
31
- }, [v, y]), T = o((t) => {
31
+ }, [v, y]), T = o((e) => {
32
+ v.setQueryData(y, (t) => (t ?? []).filter((t) => t.localId !== e));
33
+ }, [v, y]), E = o((t) => {
32
34
  let n = (v.getQueryData(y) ?? []).filter((e) => e.status === "uploading").length;
33
35
  if (t.length + n > 10) {
34
36
  e.error(n > 0 ? g(10 - n) : h(10));
@@ -50,43 +52,59 @@ function f({ onOpenBill: f, labels: p } = {}) {
50
52
  g,
51
53
  h,
52
54
  b
53
- ]), E = r({ payableIds: C.filter((e) => e.status === "uploading" && e.payableId).map((e) => e.payableId) });
55
+ ]), D = r({ payableIds: C.filter((e) => e.status === "uploading" && e.payableId).map((e) => e.payableId) });
54
56
  s(() => {
55
- for (let { payableId: e, ocrStatus: t, isError: n } of E) {
56
- let r = C.find((t) => t.payableId === e && t.status === "uploading");
57
- r && (t === "success" ? w(r.localId, { status: "ready" }) : (n || t === "error" || t === "canceled") && w(r.localId, { status: "failed" }));
57
+ let e = /* @__PURE__ */ new Set();
58
+ for (let t of D) if (t.suspectedDuplicateOf.length !== 0) {
59
+ e.add(t.payableId);
60
+ for (let n of t.suspectedDuplicateOf) e.add(n);
58
61
  }
62
+ for (let { payableId: t, ocrStatus: n, isError: r } of D) {
63
+ let i = C.find((e) => e.payableId === t && e.status === "uploading");
64
+ i && (n === "success" ? w(i.localId, { status: e.has(t) ? "duplicate" : "ready" }) : (r || n === "error" || n === "canceled") && w(i.localId, { status: "failed" }));
65
+ }
66
+ for (let t of C) t.status === "ready" && t.payableId && e.has(t.payableId) && w(t.localId, { status: "duplicate" });
59
67
  }, [
60
68
  C,
61
- E,
69
+ D,
62
70
  w
63
71
  ]);
64
- let D = C.filter((e) => e.status === "uploading"), O = C.filter((e) => e.status === "ready"), k = C.filter((e) => e.status === "failed"), A = (e) => ({
72
+ let O = C.filter((e) => e.status === "uploading"), k = C.filter((e) => e.status === "ready"), A = C.filter((e) => e.status === "duplicate"), j = C.filter((e) => e.status === "failed"), M = (e) => ({
65
73
  id: e.localId,
66
74
  fileName: e.fileName,
67
75
  status: e.status,
68
- onOpen: e.status === "ready" && e.payableId && f ? () => f(e.payableId) : void 0
69
- }), j = D.length ? [{
76
+ onOpen: (e.status === "ready" || e.status === "duplicate") && e.payableId && f ? () => {
77
+ f(e.payableId), T(e.localId);
78
+ } : void 0
79
+ }), N = O.length ? [{
70
80
  id: "in-progress",
71
- items: C.map(A)
72
- }] : [...O.length ? [{
73
- id: "ready",
74
- caption: m.readyCaption(O.length),
75
- items: O.map(A)
76
- }] : [], ...k.length ? [{
77
- id: "failed",
78
- caption: m.failedCaption(k.length),
79
- items: k.map(A)
80
- }] : []], M = D.length ? m.uploadingSummary(C.length) : O.length ? m.completeSummary(O.length) : m.failedCaption(k.length), N = o(() => {
81
+ items: C.map(M)
82
+ }] : [
83
+ ...k.length ? [{
84
+ id: "ready",
85
+ caption: m.readyCaption(k.length),
86
+ items: k.map(M)
87
+ }] : [],
88
+ ...A.length ? [{
89
+ id: "duplicate",
90
+ caption: m.duplicateCaption(A.length),
91
+ items: A.map(M)
92
+ }] : [],
93
+ ...j.length ? [{
94
+ id: "failed",
95
+ caption: m.failedCaption(j.length),
96
+ items: j.map(M)
97
+ }] : []
98
+ ], P = k.length + A.length, F = O.length ? m.uploadingSummary(C.length) : P ? m.completeSummary(P) : m.failedCaption(j.length), I = o(() => {
81
99
  v.setQueryData(y, []);
82
100
  }, [v, y]);
83
101
  return {
84
- enqueue: T,
85
- sections: j,
86
- summaryLabel: M,
102
+ enqueue: E,
103
+ sections: N,
104
+ summaryLabel: F,
87
105
  collapsed: x,
88
106
  onToggleCollapsed: o(() => S((e) => !e), []),
89
- onClose: N,
107
+ onClose: I,
90
108
  isVisible: C.length > 0
91
109
  };
92
110
  }
@@ -1,4 +1,4 @@
1
- import { BillColumn as e } from "../../ui/dist/index70.js";
1
+ import { BillColumn as e } from "../../ui/dist/index71.js";
2
2
  import "../../ui/dist/index.js";
3
3
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js
4
4
  var t = {
@@ -1,4 +1,4 @@
1
- import { BillColumn as e } from "../../ui/dist/index70.js";
1
+ import { BillColumn as e } from "../../ui/dist/index71.js";
2
2
  import "../../ui/dist/index.js";
3
3
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js
4
4
  var t = {
@@ -3,11 +3,11 @@
3
3
  "use client";
4
4
  "use client";
5
5
  import { formatMoneyExact as e } from "../../../shared/util/dist/lib/formatMoneyExact.js";
6
+ import { useCounterpartsQuery as t } from "../../../shared/counterpart-management/data-access/dist/index3.js";
6
7
  import "../../data-access/dist/index.js";
7
- import { BillsFilterField as t } from "../../ui/dist/index67.js";
8
+ import { BillsFilterField as n } from "../../ui/dist/index68.js";
8
9
  import "../../ui/dist/index.js";
9
- import { getCounterpartName as n } from "../../../shared/counterpart-management/feature/dist/lib/helpers.js";
10
- import { useCounterpartsQuery as r } from "../../../shared/counterpart-management/data-access/dist/index3.js";
10
+ import { getCounterpartName as r } from "../../../shared/counterpart-management/feature/dist/lib/helpers.js";
11
11
  import "../../../shared/counterpart-management/feature/dist/index.js";
12
12
  import { BILL_STATUS_FILTER_ORDER as i, billStatusFilterApiValues as a } from "./index73.js";
13
13
  import { BillsDatePreset as o, resolveDatePreset as s } from "./index74.js";
@@ -22,9 +22,9 @@ var h = {
22
22
  Vendor: "vendor",
23
23
  Attachment: "attachment"
24
24
  }, g = 50, _ = 300, v = "MMM d, yyyy", y = 864e5, b = {
25
- [t.IssueDate]: "issued_at",
26
- [t.DueDate]: "due_date",
27
- [t.AddedOn]: "created_at"
25
+ [n.IssueDate]: "issued_at",
26
+ [n.DueDate]: "due_date",
27
+ [n.AddedOn]: "created_at"
28
28
  }, x = {
29
29
  [o.Today]: "current",
30
30
  [o.ThisWeek]: "current",
@@ -41,7 +41,7 @@ var h = {
41
41
  };
42
42
  function S() {
43
43
  return {
44
- dateField: t.DueDate,
44
+ dateField: n.DueDate,
45
45
  statuses: [],
46
46
  amountMode: "any",
47
47
  amountMin: "",
@@ -89,7 +89,7 @@ function w({ offersStatusFilter: o = !1, offersVendorFilter: w = !0, isVendorFil
89
89
  let e = setTimeout(() => I(N.trim()), _);
90
90
  return () => clearTimeout(e);
91
91
  }, [N]);
92
- let R = r({
92
+ let R = t({
93
93
  enabled: w && !T,
94
94
  is_vendor: !0,
95
95
  sort: "counterpart_name",
@@ -98,7 +98,7 @@ function w({ offersStatusFilter: o = !1, offersVendorFilter: w = !0, isVendorFil
98
98
  counterpart_name__icontains: F || void 0
99
99
  }), z = d(() => (R.data?.data ?? []).map((e) => ({
100
100
  value: e.id,
101
- label: n(e)
101
+ label: r(e)
102
102
  })), [R.data?.data]), B = d(() => i.map((e) => ({
103
103
  value: e,
104
104
  label: O.statuses[e]
@@ -189,13 +189,13 @@ function w({ offersStatusFilter: o = !1, offersVendorFilter: w = !0, isVendorFil
189
189
  return {
190
190
  filterBarProps: {
191
191
  fields: [...d(() => [
192
- ...w ? [t.Vendor] : [],
193
- t.IssueDate,
194
- t.DueDate,
195
- ...o ? [t.Status] : [],
196
- t.TotalAmount,
197
- t.AddedOn,
198
- t.Attachment
192
+ ...w ? [n.Vendor] : [],
193
+ n.IssueDate,
194
+ n.DueDate,
195
+ ...o ? [n.Status] : [],
196
+ n.TotalAmount,
197
+ n.AddedOn,
198
+ n.Attachment
199
199
  ], [o, w])],
200
200
  activeFilterCount: U.length,
201
201
  chips: U,
@@ -219,7 +219,7 @@ function w({ offersStatusFilter: o = !1, offersVendorFilter: w = !0, isVendorFil
219
219
  dateTo: t
220
220
  }),
221
221
  onDatePresetChange: (e) => {
222
- let n = /* @__PURE__ */ new Date(), r = k.dateField === t.AddedOn ? new Date(n.getUTCFullYear(), n.getUTCMonth(), n.getUTCDate()) : n, { from: i, to: a } = s(e, r);
222
+ let t = /* @__PURE__ */ new Date(), r = k.dateField === n.AddedOn ? new Date(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate()) : t, { from: i, to: a } = s(e, r);
223
223
  L({
224
224
  datePreset: e,
225
225
  dateFrom: i,
@@ -5,7 +5,7 @@
5
5
  import { formatCalendarDate as e } from "../../../shared/util/dist/lib/formatCalendarDate.js";
6
6
  import { formatMoneyExact as t } from "../../../shared/util/dist/lib/formatMoneyExact.js";
7
7
  import { hasSuspectedPayableDuplicate as n } from "../../data-access/dist/index7.js";
8
- import { usePayablesQuery as r, usePayablesTotalCountQuery as i } from "../../data-access/dist/index15.js";
8
+ import { usePayablesQuery as r, usePayablesTotalCountQuery as i } from "../../data-access/dist/index16.js";
9
9
  import "../../data-access/dist/index.js";
10
10
  import { derivePayableStatus as a } from "./index6.js";
11
11
  import { resolveVendorName as o } from "./index7.js";
@@ -11,7 +11,7 @@ import { useWidgetConfig as ee, useWidgetInitStaleForToken as r } from "../../..
11
11
  import "../../../shared/feature/dist/index.js";
12
12
  import { useDuplicateBillsCount as i } from "./index9.js";
13
13
  import { AddBillDialog as a } from "../../ui/dist/index10.js";
14
- import { BillsScreen as o } from "../../ui/dist/index71.js";
14
+ import { BillsScreen as o } from "../../ui/dist/index72.js";
15
15
  import "../../ui/dist/index.js";
16
16
  import { DuplicateBillsContainer as te } from "./index11.js";
17
17
  import "./index13.js";
@@ -11,8 +11,8 @@ import { useAnalyticsTrack as r } from "../../../shared/feature/dist/lib/analyti
11
11
  import { WidgetProvider as i } from "../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
12
12
  import { useWidgetConfig as a } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
13
13
  import "../../../shared/feature/dist/index.js";
14
- import { BillPayWidgetUi as o } from "../../ui/dist/index51.js";
15
- import { BillUploadStatusTray as s } from "../../ui/dist/index74.js";
14
+ import { BillPayWidgetUi as o } from "../../ui/dist/index52.js";
15
+ import { BillUploadStatusTray as s } from "../../ui/dist/index75.js";
16
16
  import "../../ui/dist/index.js";
17
17
  import { ApprovalPoliciesSettings as c } from "../../../shared/approval-policy/feature/dist/lib/ApprovalPoliciesSettings.js";
18
18
  import "../../../shared/approval-policy/feature/dist/index.js";
@@ -5,7 +5,7 @@
5
5
  import { formatCalendarDate as e } from "../../../shared/util/dist/lib/formatCalendarDate.js";
6
6
  import { formatMoneyExact as t } from "../../../shared/util/dist/lib/formatMoneyExact.js";
7
7
  import { suspectedPayableDuplicates as n } from "../../data-access/dist/index7.js";
8
- import { useAllSuspectedDuplicatePayablesQuery as r, usePayablesQuery as i } from "../../data-access/dist/index15.js";
8
+ import { useAllSuspectedDuplicatePayablesQuery as r, usePayablesQuery as i } from "../../data-access/dist/index16.js";
9
9
  import "../../data-access/dist/index.js";
10
10
  import { groupSuspectedDuplicates as a } from "./index5.js";
11
11
  import { derivePayableStatus as o } from "./index6.js";
@@ -37,7 +37,7 @@ function f(t) {
37
37
  vendorLabel: c(t),
38
38
  invoiceNumberLabel: t.document_id ?? "",
39
39
  amountLabel: d(t.total_amount ?? t.amount_due, t.currency),
40
- invoiceDateLabel: e(t.issued_at),
40
+ dueDateLabel: e(t.due_date),
41
41
  addedOnLabel: e(t.created_at?.slice(0, 10))
42
42
  };
43
43
  }
@@ -18,7 +18,6 @@ import "./index21.js";
18
18
  import "./index22.js";
19
19
  import "./index23.js";
20
20
  import "./index24.js";
21
- import "./index25.js";
22
21
  import "./index26.js";
23
22
  import "./index27.js";
24
23
  import "./index28.js";
@@ -33,59 +32,60 @@ import "./index36.js";
33
32
  import "./index37.js";
34
33
  import "./index38.js";
35
34
  import "./index39.js";
36
- import "./index43.js";
35
+ import "./index40.js";
37
36
  import "./index44.js";
38
37
  import "./index45.js";
39
38
  import "./index46.js";
40
- import { BillCreateScreen as n } from "./index48.js";
41
- import "./index49.js";
39
+ import "./index47.js";
40
+ import { BillCreateScreen as n } from "./index49.js";
42
41
  import "./index50.js";
43
- import { BillPayWidgetUi as r } from "./index51.js";
44
- import "./index52.js";
42
+ import "./index51.js";
43
+ import { BillPayWidgetUi as r } from "./index52.js";
45
44
  import "./index53.js";
46
- import { BillDecisionDialog as i } from "./index54.js";
47
- import "./index55.js";
45
+ import "./index54.js";
46
+ import { BillDecisionDialog as i } from "./index55.js";
48
47
  import "./index56.js";
49
48
  import "./index57.js";
50
49
  import "./index58.js";
51
- import { BILL_DETAILS_SHEET_LABELS_EN as a } from "./index59.js";
52
- import { BillDetailsSheet as o } from "./index60.js";
53
- import "./index61.js";
50
+ import "./index59.js";
51
+ import { BILL_DETAILS_SHEET_LABELS_EN as a } from "./index60.js";
52
+ import { BillDetailsSheet as o } from "./index61.js";
54
53
  import "./index62.js";
55
54
  import "./index63.js";
56
- import { BillDuplicateNotice as s } from "./index64.js";
57
- import "./index65.js";
55
+ import "./index64.js";
56
+ import { BillDuplicateNotice as s } from "./index65.js";
58
57
  import "./index66.js";
59
- import { BillsFilterField as c } from "./index67.js";
60
- import "./index68.js";
58
+ import "./index67.js";
59
+ import { BillsFilterField as c } from "./index68.js";
61
60
  import "./index69.js";
62
- import { BillColumn as l } from "./index70.js";
63
- import { BillsScreen as u } from "./index71.js";
64
- import "./index72.js";
65
- import { BillUploadStatusTray as d } from "./index74.js";
66
- import "./index76.js";
67
- import "./index78.js";
68
- import { DuplicateBillsDialog as f } from "./index79.js";
69
- import "./index80.js";
61
+ import "./index70.js";
62
+ import { BillColumn as l } from "./index71.js";
63
+ import { BillsScreen as u } from "./index72.js";
64
+ import "./index73.js";
65
+ import { BillUploadStatusTray as d } from "./index75.js";
66
+ import "./index77.js";
67
+ import "./index79.js";
68
+ import { DuplicateBillsDialog as f } from "./index80.js";
70
69
  import "./index81.js";
71
- import { ExtractionNotice as p } from "./index82.js";
72
- import "./index83.js";
70
+ import "./index82.js";
71
+ import { ExtractionNotice as p } from "./index83.js";
73
72
  import "./index84.js";
74
73
  import "./index85.js";
75
74
  import "./index86.js";
76
- import { REVIEW_TRANSACTION_DIALOG_LABELS_EN as m } from "./index87.js";
77
- import { ReviewTransactionDialog as h } from "./index88.js";
78
- import "./index89.js";
79
- import { MARK_AS_PAID_DIALOG_LABELS_EN as g } from "./index90.js";
80
- import { MarkAsPaidDialog as _ } from "./index91.js";
81
- import "./index92.js";
82
- import { SCHEDULE_PAYMENT_DIALOG_LABELS_EN as v } from "./index93.js";
83
- import { SchedulePaymentDialog as y } from "./index95.js";
84
- import "./index96.js";
75
+ import "./index87.js";
76
+ import { REVIEW_TRANSACTION_DIALOG_LABELS_EN as m } from "./index88.js";
77
+ import { ReviewTransactionDialog as h } from "./index89.js";
78
+ import "./index90.js";
79
+ import { MARK_AS_PAID_DIALOG_LABELS_EN as g } from "./index91.js";
80
+ import { MarkAsPaidDialog as _ } from "./index92.js";
81
+ import "./index93.js";
82
+ import { SCHEDULE_PAYMENT_DIALOG_LABELS_EN as v } from "./index94.js";
83
+ import { SchedulePaymentDialog as y } from "./index96.js";
85
84
  import "./index97.js";
86
- import { SourceDocumentPanel as b } from "./index98.js";
87
- import "./index99.js";
88
- import { UNSAVED_BILL_DIALOG_LABELS_EN as x } from "./index100.js";
89
- import { UnsavedBillDialog as S } from "./index101.js";
90
- import "./index102.js";
85
+ import "./index98.js";
86
+ import { SourceDocumentPanel as b } from "./index99.js";
87
+ import "./index100.js";
88
+ import { UNSAVED_BILL_DIALOG_LABELS_EN as x } from "./index101.js";
89
+ import { UnsavedBillDialog as S } from "./index102.js";
90
+ import "./index103.js";
91
91
  export { e as AddBillDialog, a as BILL_DETAILS_SHEET_LABELS_EN, t as BILL_STATUS_BADGE_LABELS_EN, l as BillColumn, n as BillCreateScreen, i as BillDecisionDialog, o as BillDetailsSheet, s as BillDuplicateNotice, r as BillPayWidgetUi, d as BillUploadStatusTray, c as BillsFilterField, u as BillsScreen, f as DuplicateBillsDialog, p as ExtractionNotice, g as MARK_AS_PAID_DIALOG_LABELS_EN, _ as MarkAsPaidDialog, m as REVIEW_TRANSACTION_DIALOG_LABELS_EN, h as ReviewTransactionDialog, v as SCHEDULE_PAYMENT_DIALOG_LABELS_EN, y as SchedulePaymentDialog, b as SourceDocumentPanel, x as UNSAVED_BILL_DIALOG_LABELS_EN, S as UnsavedBillDialog };
@@ -1,10 +1,2 @@
1
- //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index100.js
2
- var e = {
3
- title: "Save this bill as a draft?",
4
- description: "This bill has changes that have not been saved. Save it as a draft to finish later, or discard the changes.",
5
- saveDraftButton: "Save as draft",
6
- discardButton: "Discard changes",
7
- closeButton: "Close"
8
- };
9
- //#endregion
10
- export { e as UNSAVED_BILL_DIALOG_LABELS_EN };
1
+ import "./index98.js";
2
+ import "./index99.js";
@@ -1,52 +1,10 @@
1
- import { AlertDialog as e, AlertDialogContent as t, AlertDialogDescription as n, AlertDialogFooter as r, AlertDialogHeader as i, AlertDialogTitle as a, Button as o } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { UNSAVED_BILL_DIALOG_LABELS_EN as s } from "./index100.js";
3
- import { jsx as c, jsxs as l } from "react/jsx-runtime";
4
- import { XIcon as u } from "lucide-react";
5
1
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index101.js
6
- function d({ open: d, onSaveDraft: f, onDiscard: p, onCancel: m, isSaving: h, isSaveDraftDisabled: g, labels: _, testId: v, saveDraftTestId: y, discardTestId: b, closeTestId: x }) {
7
- let S = {
8
- ...s,
9
- ..._
10
- };
11
- return /* @__PURE__ */ c(e, {
12
- open: d,
13
- onOpenChange: (e) => {
14
- !e && !h && m();
15
- },
16
- children: /* @__PURE__ */ l(t, {
17
- "data-testid": v,
18
- children: [
19
- /* @__PURE__ */ l("button", {
20
- type: "button",
21
- onClick: m,
22
- disabled: h,
23
- "data-testid": x,
24
- className: "ttw:absolute ttw:right-4 ttw:top-4 ttw:cursor-pointer ttw:rounded-sm ttw:opacity-70 ttw:ring-offset-background ttw:transition-opacity ttw:hover:opacity-100 ttw:focus:outline-hidden ttw:focus:ring-2 ttw:focus:ring-ring ttw:focus:ring-offset-2 ttw:disabled:pointer-events-none",
25
- children: [/* @__PURE__ */ c(u, { className: "ttw:size-4" }), /* @__PURE__ */ c("span", {
26
- className: "ttw:sr-only",
27
- children: S.closeButton
28
- })]
29
- }),
30
- /* @__PURE__ */ l(i, { children: [/* @__PURE__ */ c(a, { children: S.title }), /* @__PURE__ */ c(n, { children: S.description })] }),
31
- /* @__PURE__ */ l(r, { children: [/* @__PURE__ */ c(o, {
32
- type: "button",
33
- variant: "outline",
34
- onClick: p,
35
- disabled: h,
36
- "data-testid": b,
37
- children: S.discardButton
38
- }), /* @__PURE__ */ c(o, {
39
- type: "button",
40
- variant: "default",
41
- loading: h,
42
- disabled: h || g,
43
- onClick: f,
44
- "data-testid": y,
45
- children: S.saveDraftButton
46
- })] })
47
- ]
48
- })
49
- });
50
- }
2
+ var e = {
3
+ title: "Save this bill as a draft?",
4
+ description: "This bill has changes that have not been saved. Save it as a draft to finish later, or discard the changes.",
5
+ saveDraftButton: "Save as draft",
6
+ discardButton: "Discard changes",
7
+ closeButton: "Close"
8
+ };
51
9
  //#endregion
52
- export { d as UnsavedBillDialog, d as default };
10
+ export { e as UNSAVED_BILL_DIALOG_LABELS_EN };
@@ -1,2 +1,52 @@
1
- import "./index100.js";
2
- import "./index101.js";
1
+ import { AlertDialog as e, AlertDialogContent as t, AlertDialogDescription as n, AlertDialogFooter as r, AlertDialogHeader as i, AlertDialogTitle as a, Button as o } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { UNSAVED_BILL_DIALOG_LABELS_EN as s } from "./index101.js";
3
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
4
+ import { XIcon as u } from "lucide-react";
5
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index102.js
6
+ function d({ open: d, onSaveDraft: f, onDiscard: p, onCancel: m, isSaving: h, isSaveDraftDisabled: g, labels: _, testId: v, saveDraftTestId: y, discardTestId: b, closeTestId: x }) {
7
+ let S = {
8
+ ...s,
9
+ ..._
10
+ };
11
+ return /* @__PURE__ */ c(e, {
12
+ open: d,
13
+ onOpenChange: (e) => {
14
+ !e && !h && m();
15
+ },
16
+ children: /* @__PURE__ */ l(t, {
17
+ "data-testid": v,
18
+ children: [
19
+ /* @__PURE__ */ l("button", {
20
+ type: "button",
21
+ onClick: m,
22
+ disabled: h,
23
+ "data-testid": x,
24
+ className: "ttw:absolute ttw:right-4 ttw:top-4 ttw:cursor-pointer ttw:rounded-sm ttw:opacity-70 ttw:ring-offset-background ttw:transition-opacity ttw:hover:opacity-100 ttw:focus:outline-hidden ttw:focus:ring-2 ttw:focus:ring-ring ttw:focus:ring-offset-2 ttw:disabled:pointer-events-none",
25
+ children: [/* @__PURE__ */ c(u, { className: "ttw:size-4" }), /* @__PURE__ */ c("span", {
26
+ className: "ttw:sr-only",
27
+ children: S.closeButton
28
+ })]
29
+ }),
30
+ /* @__PURE__ */ l(i, { children: [/* @__PURE__ */ c(a, { children: S.title }), /* @__PURE__ */ c(n, { children: S.description })] }),
31
+ /* @__PURE__ */ l(r, { children: [/* @__PURE__ */ c(o, {
32
+ type: "button",
33
+ variant: "outline",
34
+ onClick: p,
35
+ disabled: h,
36
+ "data-testid": b,
37
+ children: S.discardButton
38
+ }), /* @__PURE__ */ c(o, {
39
+ type: "button",
40
+ variant: "default",
41
+ loading: h,
42
+ disabled: h || g,
43
+ onClick: f,
44
+ "data-testid": y,
45
+ children: S.saveDraftButton
46
+ })] })
47
+ ]
48
+ })
49
+ });
50
+ }
51
+ //#endregion
52
+ export { d as UnsavedBillDialog, d as default };
@@ -0,0 +1,2 @@
1
+ import "./index101.js";
2
+ import "./index102.js";
@@ -1,6 +1,7 @@
1
1
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index16.js
2
2
  var e = {
3
3
  draft: "Draft",
4
+ new: "Draft",
4
5
  pending_approval: "Pending approval",
5
6
  ready_to_pay: "Ready to pay",
6
7
  scheduled: "Scheduled",
@@ -1,12 +1,12 @@
1
1
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index17.js
2
2
  var e = {
3
- accent: "ttw:border-violet-200 ttw:bg-violet-50 ttw:text-violet-700 ttw:hover:bg-violet-50",
4
- danger: "ttw:border-destructive/20 ttw:bg-destructive/10 ttw:text-destructive ttw:hover:bg-destructive/10",
5
- info: "ttw:border-blue-200 ttw:bg-blue-50 ttw:text-blue-700 ttw:hover:bg-blue-50",
6
- muted: "ttw:border-border ttw:bg-transparent ttw:text-muted-foreground ttw:hover:bg-transparent",
7
- neutral: "ttw:border-border ttw:bg-muted ttw:text-foreground ttw:hover:bg-muted",
8
- success: "ttw:border-emerald-200 ttw:bg-emerald-50 ttw:text-emerald-700 ttw:hover:bg-emerald-50",
9
- warning: "ttw:border-amber-200 ttw:bg-amber-50 ttw:text-amber-800 ttw:hover:bg-amber-50"
3
+ accent: "ttw:border-violet-100 ttw:bg-violet-100 ttw:text-violet-700 ttw:hover:bg-violet-100",
4
+ complete: "ttw:border-background ttw:bg-background ttw:text-green-900 ttw:hover:bg-background",
5
+ danger: "ttw:border-destructive/20 ttw:bg-destructive/20 ttw:text-destructive ttw:hover:bg-destructive/20",
6
+ info: "ttw:border-blue-100 ttw:bg-blue-100 ttw:text-blue-700 ttw:hover:bg-blue-100",
7
+ neutral: "ttw:border-muted ttw:bg-muted ttw:text-foreground ttw:hover:bg-muted",
8
+ success: "ttw:border-green-100 ttw:bg-green-100 ttw:text-green-700 ttw:hover:bg-green-100",
9
+ warning: "ttw:border-amber-100 ttw:bg-amber-100 ttw:text-amber-700 ttw:hover:bg-amber-100"
10
10
  };
11
11
  //#endregion
12
12
  export { e as BADGE_TONE_CLASS_NAME };