@tesouro/embedded-components-react 0.5.19 → 0.5.23

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 (134) 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/index6.js +2 -1
  4. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +9 -9
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +4 -91
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +78 -83
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +98 -3
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +3 -49
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +47 -136
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +136 -33
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +33 -187
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +188 -75
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +75 -21
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +22 -232
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +223 -210
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +202 -108
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +126 -13
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +12 -47
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +47 -53
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +49 -202
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +202 -31
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +32 -234
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +240 -19
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +19 -434
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +436 -4
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +4 -38
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +35 -231
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +233 -3
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +3 -4
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +2 -44
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +46 -1
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +1 -8
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +6 -10
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +10 -110
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +112 -3
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +3 -127
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +124 -8
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +8 -7
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +8 -46
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +43 -18
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +20 -28
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +27 -82
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index79.js +83 -47
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index80.js +47 -250
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +239 -104
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js +110 -206
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index83.js +213 -3
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index84.js +4 -8
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index85.js +6 -113
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index86.js +115 -1
  51. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index87.js +0 -24
  52. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index88.js +25 -0
  53. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +2 -2
  54. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index15.js +10 -16
  55. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index16.js +16 -20
  56. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index17.js +21 -12
  57. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index18.js +10 -9
  58. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index19.js +2 -2
  59. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index20.js +1 -1
  60. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index30.js +1 -1
  61. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index31.js +140 -139
  62. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index64.js +1 -1
  63. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index65.js +139 -134
  64. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index86.js +1 -1
  65. package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index6.js +2 -2
  66. package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/data-access/dist/index.js +1 -1
  67. package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/data-access/dist/index10.js +6 -6
  68. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index11.js +3 -0
  69. package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/data-access/dist/index12.js +7 -7
  70. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index13.js +24 -0
  71. package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/data-access/dist/index14.js +7 -7
  72. package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/data-access/dist/index15.js +7 -7
  73. package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/data-access/dist/index16.js +1 -1
  74. package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/data-access/dist/index17.js +7 -7
  75. package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/data-access/dist/index18.js +6 -6
  76. package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/data-access/dist/index19.js +7 -7
  77. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index2.js +10 -0
  78. package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/data-access/dist/index20.js +1 -1
  79. package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/data-access/dist/index21.js +7 -7
  80. package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/data-access/dist/index22.js +6 -6
  81. package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/data-access/dist/index23.js +7 -7
  82. package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/data-access/dist/index3.js +4 -4
  83. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index4.js +29 -0
  84. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index5.js +10 -0
  85. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index6.js +10 -0
  86. package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/data-access/dist/index7.js +7 -7
  87. package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/data-access/dist/index8.js +6 -6
  88. package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/data-access/dist/index9.js +6 -6
  89. package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/feature/dist/index10.js +1 -1
  90. package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/feature/dist/index11.js +4 -4
  91. package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/feature/dist/index12.js +9 -9
  92. package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/feature/dist/index13.js +1 -1
  93. package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/feature/dist/index14.js +6 -6
  94. package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/feature/dist/index15.js +8 -8
  95. package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/feature/dist/index16.js +5 -5
  96. package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/feature/dist/index17.js +11 -11
  97. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index2.js +10 -0
  98. package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/feature/dist/index3.js +1 -1
  99. package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/feature/dist/index4.js +2 -2
  100. package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/feature/dist/index5.js +1 -1
  101. package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/feature/dist/index6.js +1 -1
  102. package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/feature/dist/index7.js +3 -3
  103. package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/feature/dist/index8.js +1 -1
  104. package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/feature/dist/index9.js +1 -1
  105. package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/ui/dist/index10.js +5 -5
  106. package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/ui/dist/index11.js +1 -1
  107. package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/ui/dist/index12.js +4 -4
  108. package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/ui/dist/index13.js +1 -1
  109. package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/ui/dist/index14.js +2 -2
  110. package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/ui/dist/index15.js +4 -4
  111. package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/ui/dist/index16.js +5 -5
  112. package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/ui/dist/index17.js +4 -4
  113. package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/ui/dist/index18.js +2 -2
  114. package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/ui/dist/index2.js +1 -1
  115. package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/ui/dist/index3.js +2 -2
  116. package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/ui/dist/index4.js +2 -2
  117. package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/ui/dist/index5.js +3 -3
  118. package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/ui/dist/index6.js +1 -1
  119. package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/ui/dist/index7.js +2 -2
  120. package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/ui/dist/index8.js +4 -4
  121. package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/ui/dist/index9.js +1 -1
  122. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/zod.gen.js +12 -1
  123. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  124. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +1 -1
  125. package/package.json +1 -1
  126. package/dist/libs/tesouro-embedded-components-react/team-widget/data-access/dist/index11.js +0 -3
  127. package/dist/libs/tesouro-embedded-components-react/team-widget/data-access/dist/index13.js +0 -24
  128. package/dist/libs/tesouro-embedded-components-react/team-widget/data-access/dist/index2.js +0 -10
  129. package/dist/libs/tesouro-embedded-components-react/team-widget/data-access/dist/index4.js +0 -29
  130. package/dist/libs/tesouro-embedded-components-react/team-widget/data-access/dist/index5.js +0 -10
  131. package/dist/libs/tesouro-embedded-components-react/team-widget/data-access/dist/index6.js +0 -10
  132. package/dist/libs/tesouro-embedded-components-react/team-widget/feature/dist/index2.js +0 -9
  133. /package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/feature/dist/index.js +0 -0
  134. /package/dist/libs/tesouro-embedded-components-react/{team-widget → settings-widget/team}/ui/dist/index.js +0 -0
@@ -2,213 +2,117 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { toast as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
6
- import { hasAnyScope as t } from "../../../shared/data-access/dist/lib/hasAnyScope.js";
7
- import { Scope as n } from "../../../shared/data-access/dist/lib/scopes.js";
8
- import "../../../shared/data-access/dist/index.js";
9
- import "../../../shared/ui/dist/index.js";
10
- import { useWidgetConfig as ee, useWidgetInitStaleForToken as r } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
11
- import "../../../shared/feature/dist/index.js";
12
- import { useDuplicateBillsCount as i } from "./index10.js";
13
- import { AddBillDialog as a } from "../../ui/dist/index10.js";
14
- import { BillsScreen as o } from "../../ui/dist/index79.js";
15
- import "../../ui/dist/index.js";
16
- import { DuplicateBillsContainer as te } from "./index12.js";
17
- import "./index14.js";
18
- import { BillCreateDialog as s } from "./index60.js";
19
- import "./index61.js";
20
- import { BillDetailsContainer as ne } from "./index63.js";
21
- import "./index64.js";
22
- import "./index70.js";
23
- import "./index71.js";
24
- import { BILL_QUEUE_ORDER as c, BillQueue as l } from "./index72.js";
25
- import { BILLS_TAB_LABELS_EN as u } from "./index75.js";
26
- import { useBillsTable as d } from "./index81.js";
27
- import { copyTextToClipboard as f } from "./index73.js";
28
- import { resolveDuplicateWarning as p } from "./index74.js";
29
- import { billsTabTestIds as m, billsTableCellTestIds as re } from "./index76.js";
30
- import { useCallback as ie, useEffect as ae, useMemo as h, useState as g } from "react";
31
- import { jsx as _, jsxs as v } from "react/jsx-runtime";
32
- import { CalendarClockIcon as y, CheckIcon as b, FilePenIcon as x, ListIcon as S, LoaderCircleIcon as C } from "lucide-react";
5
+ import { formatCalendarDate as e } from "../../../shared/util/dist/lib/formatCalendarDate.js";
6
+ import { formatMoneyExact as t } from "../../../shared/util/dist/lib/formatMoneyExact.js";
7
+ import { hasSuspectedPayableDuplicate as n } from "../../data-access/dist/index7.js";
8
+ import { usePayablesQuery as r, usePayablesTotalCountQuery as i } from "../../data-access/dist/index17.js";
9
+ import "../../data-access/dist/index.js";
10
+ import { derivePayableStatus as a } from "./index7.js";
11
+ import { resolveVendorName as o } from "./index8.js";
12
+ import { isEditablePayableStatus as s } from "./index19.js";
13
+ import { BillQueue as c, DEFAULT_BILL_QUEUE as l, billQueueColumns as u, billQueueHasScheduledPayment as d, billQueueOffersAddPanel as f, billQueueStatuses as p, billSortColumnId as m, billSortField as h } from "./index73.js";
14
+ import { useBillsFilters as g } from "./index81.js";
15
+ import { useCallback as _, useEffect as v, useMemo as y, useState as b } from "react";
33
16
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js
34
- var w = "bills@business-banking.app", T = {
35
- [l.Drafts]: /* @__PURE__ */ _(x, {
36
- className: "ttw:size-4",
37
- "aria-hidden": !0
38
- }),
39
- [l.Pending]: /* @__PURE__ */ _(C, {
40
- className: "ttw:size-4",
41
- "aria-hidden": !0
42
- }),
43
- [l.Scheduled]: /* @__PURE__ */ _(y, {
44
- className: "ttw:size-4",
45
- "aria-hidden": !0
46
- }),
47
- [l.Paid]: /* @__PURE__ */ _(b, {
48
- className: "ttw:size-4",
49
- "aria-hidden": !0
50
- }),
51
- [l.All]: /* @__PURE__ */ _(S, {
52
- className: "ttw:size-4",
53
- "aria-hidden": !0
54
- })
55
- };
56
- function E({ labels: l, onEnqueueFiles: y, openPayableId: b, onOpenPayableHandled: x, poweredByBankName: S }) {
57
- let C = h(() => ({
58
- ...u,
59
- ...l,
60
- queues: {
61
- ...u.queues,
62
- ...l?.queues
63
- },
64
- filters: {
65
- ...u.filters,
66
- ...l?.filters,
67
- presets: {
68
- ...u.filters.presets,
69
- ...l?.filters?.presets
70
- },
71
- statuses: {
72
- ...u.filters.statuses,
73
- ...l?.filters?.statuses
74
- },
75
- dateFieldNames: {
76
- ...u.filters.dateFieldNames,
77
- ...l?.filters?.dateFieldNames
78
- }
79
- },
80
- filterBar: {
81
- ...u.filterBar,
82
- ...l?.filterBar
83
- },
84
- queueEmptyStates: c.reduce((e, t) => ({
85
- ...e,
86
- [t]: {
87
- ...u.queueEmptyStates[t],
88
- ...l?.queueEmptyStates?.[t]
89
- }
90
- }), {})
91
- }), [l]), [E, D] = g(!1), [oe, O] = g(), [k, A] = g(!1), [j, M] = g(), [N, P] = g(!1), [F, I] = g(!1), [L, R] = g(!1), { initResponse: z } = ee(), B = r(), V = t(z?.scopes, [n.PayableReadOrg]), H = t(z?.scopes, [n.PayableWriteOrg]), U = !z || V, W = !z || H, G = ie((e, t) => {
92
- if (t && W) {
93
- O(e), A(!0);
94
- return;
95
- }
96
- M(e), P(!0);
97
- }, [W]), K = t(z?.scopes, [n.CounterpartReadOrg]), q = d({
98
- enabled: U,
99
- canReadVendors: K,
100
- isVendorFilterPaused: B,
101
- filterLabels: C.filters,
102
- onOpenBill: G,
103
- duplicateRowNote: C.duplicateRowNote,
104
- attachmentLabel: C.attachmentIndicator
105
- }), J = i({ enabled: U }), se = p(J, C), ce = h(() => c.map((e) => ({
106
- id: e,
107
- label: C.queues[e],
108
- icon: T[e]
109
- })), [C.queues]), le = (e) => {
110
- R(!1), M(e), P(!0);
111
- }, ue = () => {
112
- P(!1), I(!0);
113
- }, Y = () => {
114
- I(!1), P(!0);
115
- }, X = () => {
116
- P(!1), I(!1), O(j), A(!0);
117
- }, de = h(() => ({
118
- createButton: C.createButton,
119
- addBill: { heading: C.nonEmptyHeading }
120
- }), [C.createButton, C.nonEmptyHeading]), fe = h(() => ({
121
- ...q.filterBarProps,
122
- labels: C.filterBar
123
- }), [q.filterBarProps, C.filterBar]), Z = () => {
124
- D(!1), O(void 0), A(!0);
125
- }, Q = (e) => {
126
- D(!1), y?.(e);
127
- }, $ = async () => {
128
- await f(w) ? e.success(C.emailCopiedToast) : e.error(C.emailCopyFailedToast);
17
+ var x = 10, S = [{
18
+ id: "addedOnLabel",
19
+ desc: !0
20
+ }];
21
+ function C({ enabled: C = !0, canReadVendors: w = !0, isVendorFilterPaused: T = !1, filterLabels: E, onOpenBill: D, duplicateRowNote: O, attachmentLabel: k }) {
22
+ let [A, j] = b(l), [M, N] = b(S), [P, F] = b(x), [I, L] = b(), [R, z] = b(""), [B, V] = b(""), H = _(() => L(void 0), []);
23
+ v(() => {
24
+ let e = setTimeout(() => {
25
+ V(R), H();
26
+ }, 300);
27
+ return () => clearTimeout(e);
28
+ }, [R, H]);
29
+ let U = g({
30
+ offersStatusFilter: A === c.All,
31
+ offersVendorFilter: w,
32
+ isVendorFilterPaused: T,
33
+ labels: E,
34
+ onFiltersChange: H
35
+ }), W = M[0], G = h(W?.id), K = r({
36
+ ...U.query,
37
+ limit: P,
38
+ pagination_token: I,
39
+ status__in: p(A) ?? U.query.status__in,
40
+ has_scheduled_payment: d(A),
41
+ counterpart_name__icontains: B || void 0,
42
+ sort: G,
43
+ order: G ? W?.desc ? "desc" : "asc" : void 0,
44
+ enabled: C
45
+ }), q = K.data?.data.length === 0, J = i({ enabled: C && q }), Y = !q || (J.data?.count ?? 1) > 0, X = y(() => (K.data?.data ?? []).map((r) => {
46
+ let i = a({
47
+ apiStatus: r.status,
48
+ dueDate: r.due_date,
49
+ scheduledPaymentDate: r.scheduled_payment_date
50
+ }), l = r.amount_due ?? r.total_amount, u = r.status === "partially_paid" || r.status === "paid", d = (e) => e == null ? "" : t(e / 100, { currencyCode: r.currency ?? "USD" });
51
+ return {
52
+ vendorLabel: o(r),
53
+ issueDateLabel: e(r.issued_at),
54
+ dueDateLabel: e(r.due_date),
55
+ dueDateTone: i.isOverdue ? "danger" : "default",
56
+ scheduledDateLabel: e(r.scheduled_payment_date),
57
+ scheduledDateIsGap: A === c.Scheduled,
58
+ paidDateLabel: e(r.paid_at?.slice(0, 10)),
59
+ amountDueLabel: d(l),
60
+ amountPaidLabel: u ? d(r.amount_paid) : "",
61
+ amountPaidIsGap: A === c.Paid,
62
+ amountScheduledLabel: d(r.amount_to_pay ?? l),
63
+ totalAmountLabel: d(r.total_amount),
64
+ attachment: r.file_id ? { label: k } : void 0,
65
+ status: i.status,
66
+ statusTone: i.tone,
67
+ addedOnLabel: e(r.created_at?.slice(0, 10)),
68
+ ...n(r) ? {
69
+ rowTone: "warning",
70
+ rowNote: O
71
+ } : {},
72
+ onOpen: () => D(r.id, s(r.status))
73
+ };
74
+ }), [
75
+ K.data?.data,
76
+ O,
77
+ k,
78
+ D,
79
+ A
80
+ ]), Z = _((e) => {
81
+ let t = e;
82
+ j(t), N((e) => {
83
+ let n = e[0]?.id;
84
+ return n ? u(t).some((e) => m(e) === n) ? e : S : e;
85
+ }), H();
86
+ }, [H]), Q = _((e) => {
87
+ N((t) => typeof e == "function" ? e(t) : e), H();
88
+ }, [H]), $ = _((e) => {
89
+ F(e), H();
90
+ }, [H]), ee = _(() => L(K.data?.next_pagination_token ?? void 0), [K.data?.next_pagination_token]), te = _(() => L(K.data?.prev_pagination_token ?? void 0), [K.data?.prev_pagination_token]), ne = _(() => {
91
+ K.refetch();
92
+ }, [K.refetch]);
93
+ return {
94
+ rows: X,
95
+ isLoading: K.isFetching || q && J.isLoading,
96
+ isError: K.isError,
97
+ onRetry: ne,
98
+ selectedFilterTabId: A,
99
+ onFilterTabChange: Z,
100
+ searchValue: R,
101
+ onSearchChange: z,
102
+ hasAnyBills: Y,
103
+ isSearchActive: B.length > 0 || U.isFilterActive,
104
+ filterBarProps: U.filterBarProps,
105
+ visibleColumns: u(A),
106
+ showAddPanelWhenEmpty: f(A),
107
+ sorting: M,
108
+ onSortingChange: Q,
109
+ pageSize: P,
110
+ onPageSizeChange: $,
111
+ hasNextPage: !!K.data?.next_pagination_token,
112
+ hasPrevPage: !!K.data?.prev_pagination_token,
113
+ onNextPage: ee,
114
+ onPrevPage: te
129
115
  };
130
- return ae(() => {
131
- b && (O(b), A(!0), x?.());
132
- }, [x, b]), /* @__PURE__ */ v("div", {
133
- "data-testid": m.root,
134
- children: [
135
- /* @__PURE__ */ _(o, {
136
- rows: q.rows,
137
- isLoading: q.isLoading || !z,
138
- isError: q.isError,
139
- onRetry: q.onRetry,
140
- sorting: q.sorting,
141
- onSortingChange: q.onSortingChange,
142
- pageSize: q.pageSize,
143
- onPageSizeChange: q.onPageSizeChange,
144
- hasNextPage: q.hasNextPage,
145
- hasPrevPage: q.hasPrevPage,
146
- onNextPage: q.onNextPage,
147
- onPrevPage: q.onPrevPage,
148
- filterTabs: ce,
149
- selectedFilterTabId: q.selectedFilterTabId,
150
- onFilterTabChange: q.onFilterTabChange,
151
- searchValue: q.searchValue,
152
- onSearchChange: q.onSearchChange,
153
- filters: fe,
154
- visibleColumns: q.visibleColumns,
155
- cellTestIds: re,
156
- isSearchActive: q.isSearchActive,
157
- showAddPanelWhenEmpty: q.showAddPanelWhenEmpty,
158
- emptyState: C.queueEmptyStates[q.selectedFilterTabId],
159
- onCreateClick: W ? () => D(!0) : void 0,
160
- onEnterManually: W ? Z : void 0,
161
- onFilesSelected: W ? Q : void 0,
162
- maxFiles: 10,
163
- emailAddress: w,
164
- onCopyEmail: $,
165
- duplicateWarning: se,
166
- onReviewDuplicates: J.isError ? void 0 : () => R(!0),
167
- labels: de
168
- }),
169
- L ? /* @__PURE__ */ _(te, {
170
- open: L,
171
- onOpenChange: R,
172
- enabled: U,
173
- canManageDuplicates: W,
174
- onOpenBill: le
175
- }) : null,
176
- W ? /* @__PURE__ */ _(a, {
177
- open: E,
178
- onOpenChange: D,
179
- onFilesSelected: Q,
180
- maxFiles: 10,
181
- onEnterManually: Z,
182
- emailAddress: w,
183
- onCopyEmail: $,
184
- labels: { heading: q.hasAnyBills ? C.nonEmptyHeading : C.emptyHeading }
185
- }) : null,
186
- k ? /* @__PURE__ */ _(s, {
187
- open: k,
188
- onOpenChange: A,
189
- payableId: oe
190
- }) : null,
191
- N ? /* @__PURE__ */ _(ne, {
192
- open: N,
193
- onOpenChange: P,
194
- payableId: j,
195
- onClose: () => P(!1),
196
- onExpand: ue,
197
- onEdit: X,
198
- testId: m.detailsSheet,
199
- poweredByBankName: S
200
- }) : null,
201
- F ? /* @__PURE__ */ _(s, {
202
- open: F,
203
- onOpenChange: I,
204
- payableId: j,
205
- readOnly: !0,
206
- onCollapse: Y,
207
- onEdit: X,
208
- poweredByBankName: S
209
- }) : null
210
- ]
211
- });
212
116
  }
213
117
  //#endregion
214
- export { E as BillsTab, E as default };
118
+ export { C as useBillsTable };
@@ -1,4 +1,214 @@
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
5
+ import { toast as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
6
+ import { hasAnyScope as t } from "../../../shared/data-access/dist/lib/hasAnyScope.js";
7
+ import { Scope as n } from "../../../shared/data-access/dist/lib/scopes.js";
8
+ import "../../../shared/data-access/dist/index.js";
9
+ import "../../../shared/ui/dist/index.js";
10
+ import { useWidgetConfig as ee, useWidgetInitStaleForToken as r } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
11
+ import "../../../shared/feature/dist/index.js";
12
+ import { useDuplicateBillsCount as i } from "./index10.js";
13
+ import { AddBillDialog as a } from "../../ui/dist/index10.js";
14
+ import { BillsScreen as o } from "../../ui/dist/index79.js";
15
+ import "../../ui/dist/index.js";
16
+ import { DuplicateBillsContainer as te } from "./index12.js";
17
+ import "./index14.js";
18
+ import { BillCreateDialog as s } from "./index61.js";
19
+ import "./index62.js";
20
+ import { BillDetailsContainer as ne } from "./index64.js";
21
+ import "./index65.js";
22
+ import "./index71.js";
1
23
  import "./index72.js";
2
- import "./index75.js";
3
- import "./index81.js";
4
- import "./index82.js";
24
+ import { BILL_QUEUE_ORDER as c, BillQueue as l } from "./index73.js";
25
+ import { BILLS_TAB_LABELS_EN as u } from "./index76.js";
26
+ import { useBillsTable as d } from "./index82.js";
27
+ import { copyTextToClipboard as f } from "./index74.js";
28
+ import { resolveDuplicateWarning as p } from "./index75.js";
29
+ import { billsTabTestIds as m, billsTableCellTestIds as re } from "./index77.js";
30
+ import { useCallback as ie, useEffect as ae, useMemo as h, useState as g } from "react";
31
+ import { jsx as _, jsxs as v } from "react/jsx-runtime";
32
+ import { CalendarClockIcon as y, CheckIcon as b, FilePenIcon as x, ListIcon as S, LoaderCircleIcon as C } from "lucide-react";
33
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index83.js
34
+ var w = "bills@business-banking.app", T = {
35
+ [l.Drafts]: /* @__PURE__ */ _(x, {
36
+ className: "ttw:size-4",
37
+ "aria-hidden": !0
38
+ }),
39
+ [l.Pending]: /* @__PURE__ */ _(C, {
40
+ className: "ttw:size-4",
41
+ "aria-hidden": !0
42
+ }),
43
+ [l.Scheduled]: /* @__PURE__ */ _(y, {
44
+ className: "ttw:size-4",
45
+ "aria-hidden": !0
46
+ }),
47
+ [l.Paid]: /* @__PURE__ */ _(b, {
48
+ className: "ttw:size-4",
49
+ "aria-hidden": !0
50
+ }),
51
+ [l.All]: /* @__PURE__ */ _(S, {
52
+ className: "ttw:size-4",
53
+ "aria-hidden": !0
54
+ })
55
+ };
56
+ function E({ labels: l, onEnqueueFiles: y, openPayableId: b, onOpenPayableHandled: x, poweredByBankName: S }) {
57
+ let C = h(() => ({
58
+ ...u,
59
+ ...l,
60
+ queues: {
61
+ ...u.queues,
62
+ ...l?.queues
63
+ },
64
+ filters: {
65
+ ...u.filters,
66
+ ...l?.filters,
67
+ presets: {
68
+ ...u.filters.presets,
69
+ ...l?.filters?.presets
70
+ },
71
+ statuses: {
72
+ ...u.filters.statuses,
73
+ ...l?.filters?.statuses
74
+ },
75
+ dateFieldNames: {
76
+ ...u.filters.dateFieldNames,
77
+ ...l?.filters?.dateFieldNames
78
+ }
79
+ },
80
+ filterBar: {
81
+ ...u.filterBar,
82
+ ...l?.filterBar
83
+ },
84
+ queueEmptyStates: c.reduce((e, t) => ({
85
+ ...e,
86
+ [t]: {
87
+ ...u.queueEmptyStates[t],
88
+ ...l?.queueEmptyStates?.[t]
89
+ }
90
+ }), {})
91
+ }), [l]), [E, D] = g(!1), [oe, O] = g(), [k, A] = g(!1), [j, M] = g(), [N, P] = g(!1), [F, I] = g(!1), [L, R] = g(!1), { initResponse: z } = ee(), B = r(), V = t(z?.scopes, [n.PayableReadOrg]), H = t(z?.scopes, [n.PayableWriteOrg]), U = !z || V, W = !z || H, G = ie((e, t) => {
92
+ if (t && W) {
93
+ O(e), A(!0);
94
+ return;
95
+ }
96
+ M(e), P(!0);
97
+ }, [W]), K = t(z?.scopes, [n.CounterpartReadOrg]), q = d({
98
+ enabled: U,
99
+ canReadVendors: K,
100
+ isVendorFilterPaused: B,
101
+ filterLabels: C.filters,
102
+ onOpenBill: G,
103
+ duplicateRowNote: C.duplicateRowNote,
104
+ attachmentLabel: C.attachmentIndicator
105
+ }), J = i({ enabled: U }), se = p(J, C), ce = h(() => c.map((e) => ({
106
+ id: e,
107
+ label: C.queues[e],
108
+ icon: T[e]
109
+ })), [C.queues]), le = (e) => {
110
+ R(!1), M(e), P(!0);
111
+ }, ue = () => {
112
+ P(!1), I(!0);
113
+ }, Y = () => {
114
+ I(!1), P(!0);
115
+ }, X = () => {
116
+ P(!1), I(!1), O(j), A(!0);
117
+ }, de = h(() => ({
118
+ createButton: C.createButton,
119
+ addBill: { heading: C.nonEmptyHeading }
120
+ }), [C.createButton, C.nonEmptyHeading]), fe = h(() => ({
121
+ ...q.filterBarProps,
122
+ labels: C.filterBar
123
+ }), [q.filterBarProps, C.filterBar]), Z = () => {
124
+ D(!1), O(void 0), A(!0);
125
+ }, Q = (e) => {
126
+ D(!1), y?.(e);
127
+ }, $ = async () => {
128
+ await f(w) ? e.success(C.emailCopiedToast) : e.error(C.emailCopyFailedToast);
129
+ };
130
+ return ae(() => {
131
+ b && (O(b), A(!0), x?.());
132
+ }, [x, b]), /* @__PURE__ */ v("div", {
133
+ "data-testid": m.root,
134
+ children: [
135
+ /* @__PURE__ */ _(o, {
136
+ rows: q.rows,
137
+ isLoading: q.isLoading || !z,
138
+ isError: q.isError,
139
+ onRetry: q.onRetry,
140
+ sorting: q.sorting,
141
+ onSortingChange: q.onSortingChange,
142
+ pageSize: q.pageSize,
143
+ onPageSizeChange: q.onPageSizeChange,
144
+ hasNextPage: q.hasNextPage,
145
+ hasPrevPage: q.hasPrevPage,
146
+ onNextPage: q.onNextPage,
147
+ onPrevPage: q.onPrevPage,
148
+ filterTabs: ce,
149
+ selectedFilterTabId: q.selectedFilterTabId,
150
+ onFilterTabChange: q.onFilterTabChange,
151
+ searchValue: q.searchValue,
152
+ onSearchChange: q.onSearchChange,
153
+ filters: fe,
154
+ visibleColumns: q.visibleColumns,
155
+ cellTestIds: re,
156
+ isSearchActive: q.isSearchActive,
157
+ showAddPanelWhenEmpty: q.showAddPanelWhenEmpty,
158
+ emptyState: C.queueEmptyStates[q.selectedFilterTabId],
159
+ onCreateClick: W ? () => D(!0) : void 0,
160
+ onEnterManually: W ? Z : void 0,
161
+ onFilesSelected: W ? Q : void 0,
162
+ maxFiles: 10,
163
+ emailAddress: w,
164
+ onCopyEmail: $,
165
+ duplicateWarning: se,
166
+ onReviewDuplicates: J.isError ? void 0 : () => R(!0),
167
+ labels: de
168
+ }),
169
+ L ? /* @__PURE__ */ _(te, {
170
+ open: L,
171
+ onOpenChange: R,
172
+ enabled: U,
173
+ canManageDuplicates: W,
174
+ onOpenBill: le
175
+ }) : null,
176
+ W ? /* @__PURE__ */ _(a, {
177
+ open: E,
178
+ onOpenChange: D,
179
+ onFilesSelected: Q,
180
+ maxFiles: 10,
181
+ onEnterManually: Z,
182
+ emailAddress: w,
183
+ onCopyEmail: $,
184
+ labels: { heading: q.hasAnyBills ? C.nonEmptyHeading : C.emptyHeading }
185
+ }) : null,
186
+ k ? /* @__PURE__ */ _(s, {
187
+ open: k,
188
+ onOpenChange: A,
189
+ payableId: oe
190
+ }) : null,
191
+ N ? /* @__PURE__ */ _(ne, {
192
+ open: N,
193
+ onOpenChange: P,
194
+ payableId: j,
195
+ onClose: () => P(!1),
196
+ onExpand: ue,
197
+ onEdit: X,
198
+ testId: m.detailsSheet,
199
+ poweredByBankName: S
200
+ }) : null,
201
+ F ? /* @__PURE__ */ _(s, {
202
+ open: F,
203
+ onOpenChange: I,
204
+ payableId: j,
205
+ readOnly: !0,
206
+ onCollapse: Y,
207
+ onEdit: X,
208
+ poweredByBankName: S
209
+ }) : null
210
+ ]
211
+ });
212
+ }
213
+ //#endregion
214
+ export { E as BillsTab, E as default };
@@ -1,8 +1,4 @@
1
- //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index84.js
2
- var e = {
3
- bills: "Bills",
4
- vendors: "Vendors",
5
- settings: "Settings"
6
- };
7
- //#endregion
8
- export { e as DEFAULT_TABS_LABELS };
1
+ import "./index73.js";
2
+ import "./index76.js";
3
+ import "./index82.js";
4
+ import "./index83.js";
@@ -1,115 +1,8 @@
1
- "use client";
2
- "use client";
3
- "use client";
4
- "use client";
5
- import { hasAnyScope as e } from "../../../shared/data-access/dist/lib/hasAnyScope.js";
6
- import { Scope as t } from "../../../shared/data-access/dist/lib/scopes.js";
7
- import "../../../shared/data-access/dist/index.js";
8
- import { EmbeddedToaster as n } from "../../../shared/ui/dist/lib/EmbeddedToaster.js";
9
- import "../../../shared/ui/dist/index.js";
10
- import { useAnalyticsTrack as r } from "../../../shared/feature/dist/lib/analytics/hooks.js";
11
- import { WidgetProvider as i } from "../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
12
- import { useWidgetConfig as a } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
13
- import "../../../shared/feature/dist/index.js";
14
- import { BillPayWidgetUi as o } from "../../ui/dist/index53.js";
15
- import { BillUploadStatusTray as s } from "../../ui/dist/index82.js";
16
- import "../../ui/dist/index.js";
17
- import { ApprovalPoliciesSettings as c } from "../../../shared/approval-policy/feature/dist/lib/ApprovalPoliciesSettings.js";
18
- import "../../../shared/approval-policy/feature/dist/index.js";
19
- import { useBillUploadQueue as l } from "./index70.js";
20
- import "./index71.js";
21
- import { billsTabTestIds as u } from "./index76.js";
22
- import { BillsTab as d } from "./index82.js";
23
- import "./index83.js";
24
- import { BillPayWidgetAnalyticsEvent as f, WIDGET_NAME as p } from "./index65.js";
25
- import { DEFAULT_TABS_LABELS as m } from "./index84.js";
26
- import { CounterpartsWidget as h } from "../../../counterparts-widget/feature/dist/index8.js";
27
- import "../../../counterparts-widget/feature/dist/index.js";
28
- import { useCallback as g, useEffect as _, useState as v } from "react";
29
- import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
30
1
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index85.js
31
- var S = {
32
- Bills: "bills",
33
- Vendors: "vendors",
34
- Settings: "settings"
35
- }, C = [
36
- S.Bills,
37
- S.Vendors,
38
- S.Settings
39
- ];
40
- function w({ labels: i, tabsLabels: p, approvalPolicyLabels: w, approvalPolicyComponentLabels: T, vendorLabels: E, poweredByBankName: D }) {
41
- let O = r();
42
- _(() => {
43
- O(f.Mounted);
44
- }, [O]);
45
- let k = {
46
- ...m,
47
- ...p
48
- }, { initResponse: A } = a(), j = e(A?.scopes, [t.ApprovalPolicyWriteOrg]), M = !A || j, [N, P] = v(S.Bills), [F, I] = v(), L = g((e) => {
49
- P(S.Bills), I(e);
50
- }, []), R = l({ onOpenBill: L }), z = [{
51
- id: S.Bills,
52
- label: k.bills,
53
- content: /* @__PURE__ */ b(d, {
54
- onEnqueueFiles: R.enqueue,
55
- openPayableId: F,
56
- onOpenPayableHandled: () => I(void 0),
57
- poweredByBankName: D
58
- })
59
- }, {
60
- id: S.Vendors,
61
- label: k.vendors,
62
- content: /* @__PURE__ */ b(h, {
63
- ...E,
64
- counterpartType: "vendor",
65
- onViewAllDocuments: () => P(S.Bills)
66
- })
67
- }];
68
- M && z.push({
69
- id: S.Settings,
70
- label: k.settings,
71
- content: /* @__PURE__ */ b(c, {
72
- labels: w,
73
- componentLabels: T
74
- })
75
- });
76
- let B = z.some((e) => e.id === N) ? N : C.find((e) => z.some((t) => t.id === e)) ?? z[0]?.id ?? "";
77
- return /* @__PURE__ */ x(y, { children: [
78
- /* @__PURE__ */ b(n, {}),
79
- /* @__PURE__ */ b(o, {
80
- labels: i,
81
- tabs: z,
82
- selectedTabId: B,
83
- onTabChange: P
84
- }),
85
- R.isVisible ? /* @__PURE__ */ b(s, {
86
- sections: R.sections,
87
- summaryLabel: R.summaryLabel,
88
- collapsed: R.collapsed,
89
- onToggleCollapsed: R.onToggleCollapsed,
90
- onClose: R.onClose,
91
- testId: u.uploadTray
92
- }) : null
93
- ] });
94
- }
95
- function T({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gatewayRouting: a, linkComponent: o, implementation: s, uiFramework: c, errorFallback: l, onError: u, analytics: d, disclosuresAcceptance: f, providerLabels: m, ...h }) {
96
- return /* @__PURE__ */ b(i, {
97
- widgetName: p,
98
- baseUrl: e,
99
- widgetToken: t,
100
- organizationId: n,
101
- configClient: r,
102
- gatewayRouting: a,
103
- linkComponent: o,
104
- implementation: s,
105
- uiFramework: c,
106
- errorFallback: l,
107
- onError: u,
108
- analytics: d,
109
- disclosuresAcceptance: f,
110
- providerLabels: m,
111
- children: /* @__PURE__ */ b(w, { ...h })
112
- });
113
- }
2
+ var e = {
3
+ bills: "Bills",
4
+ vendors: "Vendors",
5
+ settings: "Settings"
6
+ };
114
7
  //#endregion
115
- export { T as BillPayWidgetNative, T as default };
8
+ export { e as DEFAULT_TABS_LABELS };