@tesouro/embedded-components-react 0.3.49 → 0.3.51

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 (144) hide show
  1. package/dist/index.css +8 -2
  2. package/dist/index.js +2 -2
  3. package/dist/lib/BillPayWidget.js +1 -1
  4. package/dist/lib/LinkedAccountsWidget.js +1 -1
  5. package/dist/libs/shared/util-validation/dist/{index22.js → index23.js} +1 -1
  6. package/dist/libs/shared/util-validation/dist/index7.js +6 -0
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index.js +11 -10
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index10.js +39 -30
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index11.js +26 -311
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index12.js +325 -12
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index13.js +13 -26
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index14.js +20 -40
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index15.js +75 -24
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index16.js +36 -0
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index5.js +80 -68
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index6.js +86 -73
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index7.js +77 -14
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index8.js +18 -63
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index9.js +50 -29
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +22 -18
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +82 -30
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index11.js +7 -42
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index12.js +15 -159
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index13.js +23 -33
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +66 -1
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +2 -50
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index16.js +3 -4
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index17.js +5 -14
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index18.js +3 -14
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +31 -63
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index2.js +23 -18
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index20.js +37 -24
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +161 -61
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +29 -130
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +1 -25
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index24.js +47 -4
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +4 -41
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index26.js +12 -55
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +13 -4
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js +63 -72
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +26 -49
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index3.js +23 -23
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js +62 -93
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js +133 -34
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +20 -163
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index33.js +4 -77
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index34.js +39 -21
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +5 -210
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index36.js +70 -211
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js +47 -103
  51. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js +92 -12
  52. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +34 -47
  53. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index4.js +59 -62
  54. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +163 -29
  55. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +67 -181
  56. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +20 -32
  57. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +203 -94
  58. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +214 -15
  59. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +98 -312
  60. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +16 -4
  61. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +49 -31
  62. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +29 -80
  63. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +183 -156
  64. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index5.js +9 -2
  65. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +38 -3
  66. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +102 -2
  67. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +18 -44
  68. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +343 -1
  69. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +4 -8
  70. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +30 -8
  71. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +79 -88
  72. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +179 -3
  73. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +3 -9
  74. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +2 -20
  75. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js +4 -2
  76. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +38 -51
  77. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +0 -2
  78. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +6 -126
  79. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +9 -9
  80. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +92 -44
  81. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +3 -23
  82. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +123 -26
  83. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +7 -82
  84. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +8 -48
  85. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +45 -250
  86. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +69 -5
  87. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +21 -113
  88. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +27 -208
  89. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +86 -4
  90. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +47 -5
  91. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +244 -106
  92. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +115 -1
  93. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +201 -16
  94. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +4 -0
  95. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +8 -0
  96. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index79.js +115 -0
  97. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index8.js +44 -5
  98. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index80.js +1 -0
  99. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +25 -0
  100. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +94 -3
  101. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +19 -19
  102. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index18.js +1 -0
  103. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index50.js +28 -28
  104. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index59.js +1 -3
  105. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js +6 -16
  106. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index73.js +119 -16
  107. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +24 -111
  108. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index75.js +89 -2
  109. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index76.js +2 -7
  110. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index77.js +5 -28
  111. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index78.js +30 -2
  112. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index79.js +2 -7
  113. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index80.js +5 -32
  114. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index81.js +34 -2
  115. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +2 -12
  116. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index83.js +10 -104
  117. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index84.js +105 -1
  118. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index85.js +2 -17
  119. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index86.js +15 -123
  120. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index87.js +125 -2
  121. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index88.js +2 -18
  122. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index89.js +14 -6
  123. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index90.js +7 -167
  124. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index91.js +170 -2
  125. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index92.js +2 -14
  126. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index93.js +11 -105
  127. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index94.js +108 -2
  128. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index95.js +2 -10
  129. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index96.js +8 -45
  130. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index97.js +47 -2
  131. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index98.js +2 -0
  132. package/dist/libs/tesouro-embedded-components-react/create-card-widget/feature/dist/index8.js +95 -94
  133. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/index.js +1 -1
  134. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/index10.js +45 -0
  135. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/index7.js +18 -55
  136. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/index8.js +46 -265
  137. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/index9.js +273 -34
  138. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/useApproverOptions.js +1 -1
  139. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +23 -23
  140. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +87 -71
  141. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  142. package/dist/libs/tesouro-embedded-components-react/team-widget/feature/dist/index11.js +1 -1
  143. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +1 -1
  144. package/package.json +1 -1
@@ -2,24 +2,209 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { Implementation as e } from "../../../shared/feature/dist/lib/WidgetProvider/types.js";
6
- import { useWidgetConfig as t } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
5
+ import { toast as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
6
+ import { hasAnyScope as t } from "../../../shared/data-access/dist/lib/hasAnyScope.js";
7
+ import { Scope as n } from "../../../shared/data-access/dist/lib/scopes.js";
8
+ import "../../../shared/data-access/dist/index.js";
9
+ import "../../../shared/ui/dist/index.js";
10
+ import { useWidgetConfig as ee, useWidgetInitStaleForToken as r } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
7
11
  import "../../../shared/feature/dist/index.js";
8
- import { BillPayWidgetMonite as n } from "./index52.js";
9
- import "./index53.js";
10
- import { BillPayWidgetNative as r } from "./index74.js";
11
- import "./index75.js";
12
- import { jsx as i } from "react/jsx-runtime";
12
+ import { useDuplicateBillsCount as i } from "./index7.js";
13
+ import { AddBillDialog as a } from "../../ui/dist/index10.js";
14
+ import { BillsScreen as o } from "../../ui/dist/index67.js";
15
+ import "../../ui/dist/index.js";
16
+ import { DuplicateBillsContainer as te } from "./index9.js";
17
+ import "./index11.js";
18
+ import { BillCreateDialog as s } from "./index53.js";
19
+ import "./index54.js";
20
+ import { BillDetailsContainer as c } from "./index57.js";
21
+ import "./index58.js";
22
+ import "./index64.js";
23
+ import "./index65.js";
24
+ import { BILL_QUEUE_ORDER as l, BillQueue as u } from "./index66.js";
25
+ import { BILLS_TAB_LABELS_EN as d } from "./index69.js";
26
+ import { useBillsTable as f } from "./index75.js";
27
+ import { copyTextToClipboard as p } from "./index67.js";
28
+ import { resolveDuplicateWarning as m } from "./index68.js";
29
+ import { billsTabTestIds as h, billsTableCellTestIds as ne } from "./index70.js";
30
+ import { useCallback as re, useEffect as ie, useMemo as g, useState as _ } from "react";
31
+ import { jsx as v, jsxs as y } from "react/jsx-runtime";
32
+ import { CalendarClockIcon as b, CheckIcon as x, FilePenIcon as S, ListIcon as C, LoaderCircleIcon as w } from "lucide-react";
13
33
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js
14
- function a({ implementation: a, ...o }) {
15
- let s = t().implementation, c = a ?? s ?? e.Monite;
16
- return c === e.Native ? /* @__PURE__ */ i(r, {
17
- implementation: c,
18
- ...o
19
- }) : /* @__PURE__ */ i(n, {
20
- implementation: c,
21
- ...o
34
+ var T = "bills@business-banking.app", E = {
35
+ [u.Drafts]: /* @__PURE__ */ v(S, {
36
+ className: "ttw:size-4",
37
+ "aria-hidden": !0
38
+ }),
39
+ [u.Pending]: /* @__PURE__ */ v(w, {
40
+ className: "ttw:size-4",
41
+ "aria-hidden": !0
42
+ }),
43
+ [u.Scheduled]: /* @__PURE__ */ v(b, {
44
+ className: "ttw:size-4",
45
+ "aria-hidden": !0
46
+ }),
47
+ [u.Paid]: /* @__PURE__ */ v(x, {
48
+ className: "ttw:size-4",
49
+ "aria-hidden": !0
50
+ }),
51
+ [u.All]: /* @__PURE__ */ v(C, {
52
+ className: "ttw:size-4",
53
+ "aria-hidden": !0
54
+ })
55
+ };
56
+ function D({ labels: u, onEnqueueFiles: b, openPayableId: x, onOpenPayableHandled: S, poweredByBankName: C }) {
57
+ let w = g(() => ({
58
+ ...d,
59
+ ...u,
60
+ queues: {
61
+ ...d.queues,
62
+ ...u?.queues
63
+ },
64
+ filters: {
65
+ ...d.filters,
66
+ ...u?.filters,
67
+ presets: {
68
+ ...d.filters.presets,
69
+ ...u?.filters?.presets
70
+ },
71
+ statuses: {
72
+ ...d.filters.statuses,
73
+ ...u?.filters?.statuses
74
+ },
75
+ dateFieldNames: {
76
+ ...d.filters.dateFieldNames,
77
+ ...u?.filters?.dateFieldNames
78
+ }
79
+ },
80
+ filterBar: {
81
+ ...d.filterBar,
82
+ ...u?.filterBar
83
+ },
84
+ queueEmptyStates: l.reduce((e, t) => ({
85
+ ...e,
86
+ [t]: {
87
+ ...d.queueEmptyStates[t],
88
+ ...u?.queueEmptyStates?.[t]
89
+ }
90
+ }), {})
91
+ }), [u]), [D, O] = _(!1), [ae, k] = _(), [A, j] = _(!1), [M, N] = _(), [P, F] = _(!1), [I, L] = _(!1), [R, z] = _(!1), { initResponse: B } = ee(), V = r(), H = t(B?.scopes, [n.PayableReadOrg]), U = t(B?.scopes, [n.PayableWriteOrg]), W = !B || H, G = !B || U, K = re((e, t) => {
92
+ if (t && G) {
93
+ k(e), j(!0);
94
+ return;
95
+ }
96
+ N(e), F(!0);
97
+ }, [G]), q = t(B?.scopes, [n.CounterpartReadOrg]), J = f({
98
+ enabled: W,
99
+ canReadVendors: q,
100
+ isVendorFilterPaused: V,
101
+ filterLabels: w.filters,
102
+ onOpenBill: K,
103
+ duplicateBadgeLabel: w.duplicateBadge,
104
+ attachmentLabel: w.attachmentIndicator
105
+ }), Y = i({ enabled: W }), oe = m(Y, w), se = g(() => l.map((e) => ({
106
+ id: e,
107
+ label: w.queues[e],
108
+ icon: E[e]
109
+ })), [w.queues]), ce = (e) => {
110
+ z(!1), N(e), F(!0);
111
+ }, le = () => {
112
+ F(!1), L(!0);
113
+ }, X = () => {
114
+ L(!1), F(!0);
115
+ }, ue = g(() => ({
116
+ createButton: w.createButton,
117
+ addBill: { heading: w.nonEmptyHeading }
118
+ }), [w.createButton, w.nonEmptyHeading]), de = g(() => ({
119
+ ...J.filterBarProps,
120
+ labels: w.filterBar
121
+ }), [J.filterBarProps, w.filterBar]), Z = () => {
122
+ O(!1), k(void 0), j(!0);
123
+ }, Q = (e) => {
124
+ O(!1), b?.(e);
125
+ }, $ = async () => {
126
+ await p(T) ? e.success(w.emailCopiedToast) : e.error(w.emailCopyFailedToast);
127
+ };
128
+ return ie(() => {
129
+ x && (k(x), j(!0), S?.());
130
+ }, [S, x]), /* @__PURE__ */ y("div", {
131
+ "data-testid": h.root,
132
+ children: [
133
+ /* @__PURE__ */ v(o, {
134
+ rows: J.rows,
135
+ isLoading: J.isLoading || !B,
136
+ isError: J.isError,
137
+ onRetry: J.onRetry,
138
+ sorting: J.sorting,
139
+ onSortingChange: J.onSortingChange,
140
+ pageSize: J.pageSize,
141
+ onPageSizeChange: J.onPageSizeChange,
142
+ hasNextPage: J.hasNextPage,
143
+ hasPrevPage: J.hasPrevPage,
144
+ onNextPage: J.onNextPage,
145
+ onPrevPage: J.onPrevPage,
146
+ filterTabs: se,
147
+ selectedFilterTabId: J.selectedFilterTabId,
148
+ onFilterTabChange: J.onFilterTabChange,
149
+ searchValue: J.searchValue,
150
+ onSearchChange: J.onSearchChange,
151
+ filters: de,
152
+ visibleColumns: J.visibleColumns,
153
+ cellTestIds: ne,
154
+ isSearchActive: J.isSearchActive,
155
+ showAddPanelWhenEmpty: J.showAddPanelWhenEmpty,
156
+ emptyState: w.queueEmptyStates[J.selectedFilterTabId],
157
+ onCreateClick: G ? () => O(!0) : void 0,
158
+ onEnterManually: G ? Z : void 0,
159
+ onFilesSelected: G ? Q : void 0,
160
+ maxFiles: 10,
161
+ emailAddress: T,
162
+ onCopyEmail: $,
163
+ duplicateWarning: oe,
164
+ onReviewDuplicates: Y.isError ? void 0 : () => z(!0),
165
+ labels: ue
166
+ }),
167
+ R ? /* @__PURE__ */ v(te, {
168
+ open: R,
169
+ onOpenChange: z,
170
+ enabled: W,
171
+ canManageDuplicates: G,
172
+ onOpenBill: ce
173
+ }) : null,
174
+ G ? /* @__PURE__ */ v(a, {
175
+ open: D,
176
+ onOpenChange: O,
177
+ onFilesSelected: Q,
178
+ maxFiles: 10,
179
+ onEnterManually: Z,
180
+ emailAddress: T,
181
+ onCopyEmail: $,
182
+ labels: { heading: J.hasAnyBills ? w.nonEmptyHeading : w.emptyHeading }
183
+ }) : null,
184
+ A ? /* @__PURE__ */ v(s, {
185
+ open: A,
186
+ onOpenChange: j,
187
+ payableId: ae
188
+ }) : null,
189
+ P ? /* @__PURE__ */ v(c, {
190
+ open: P,
191
+ onOpenChange: F,
192
+ payableId: M,
193
+ onClose: () => F(!1),
194
+ onExpand: le,
195
+ testId: h.detailsSheet,
196
+ poweredByBankName: C
197
+ }) : null,
198
+ I ? /* @__PURE__ */ v(s, {
199
+ open: I,
200
+ onOpenChange: L,
201
+ payableId: M,
202
+ readOnly: !0,
203
+ onCollapse: X,
204
+ poweredByBankName: C
205
+ }) : null
206
+ ]
22
207
  });
23
208
  }
24
209
  //#endregion
25
- export { a as BillPayWidget, a as default };
210
+ export { D as BillsTab, D as default };
@@ -0,0 +1,4 @@
1
+ import "./index66.js";
2
+ import "./index69.js";
3
+ import "./index75.js";
4
+ import "./index76.js";
@@ -0,0 +1,8 @@
1
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js
2
+ var e = {
3
+ bills: "Bills",
4
+ vendors: "Vendors",
5
+ settings: "Settings"
6
+ };
7
+ //#endregion
8
+ export { e as DEFAULT_TABS_LABELS };
@@ -0,0 +1,115 @@
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
5
+ import { hasAnyScope as e } from "../../../shared/data-access/dist/lib/hasAnyScope.js";
6
+ import { Scope as t } from "../../../shared/data-access/dist/lib/scopes.js";
7
+ import "../../../shared/data-access/dist/index.js";
8
+ import { EmbeddedToaster as n } from "../../../shared/ui/dist/lib/EmbeddedToaster.js";
9
+ import "../../../shared/ui/dist/index.js";
10
+ import { useAnalyticsTrack as r } from "../../../shared/feature/dist/lib/analytics/hooks.js";
11
+ import { WidgetProvider as i } from "../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
12
+ import { useWidgetConfig as a } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
13
+ import "../../../shared/feature/dist/index.js";
14
+ import { BillPayWidgetUi as o } from "../../ui/dist/index47.js";
15
+ import { BillUploadStatusTray as s } from "../../ui/dist/index70.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 "./index64.js";
20
+ import "./index65.js";
21
+ import { billsTabTestIds as u } from "./index70.js";
22
+ import { BillsTab as d } from "./index76.js";
23
+ import "./index77.js";
24
+ import { BillPayWidgetAnalyticsEvent as f, WIDGET_NAME as p } from "./index59.js";
25
+ import { DEFAULT_TABS_LABELS as m } from "./index78.js";
26
+ import { CounterpartsWidget as h } from "../../../counterparts-widget/feature/dist/index8.js";
27
+ import "../../../counterparts-widget/feature/dist/index.js";
28
+ import { useCallback as g, useEffect as _, useState as v } from "react";
29
+ import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
30
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index79.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
+ }
114
+ //#endregion
115
+ export { T as BillPayWidgetNative, T as default };
@@ -1,7 +1,46 @@
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
5
+ import { useCallback as e, useEffect as t, useState as n } from "react";
1
6
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index8.js
2
- var e = {
3
- scheduleDialog: "pay-bill-schedule-dialog",
4
- reviewDialog: "pay-bill-review-dialog"
5
- };
7
+ function r({ reviewIds: r }) {
8
+ let [i, a] = n(/* @__PURE__ */ new Set());
9
+ t(() => {
10
+ let e = new Set(r);
11
+ a((t) => {
12
+ let n = new Set([...t].filter((t) => e.has(t)));
13
+ return n.size === t.size ? t : n;
14
+ });
15
+ }, [r]);
16
+ let o = e((e) => {
17
+ a((t) => {
18
+ let n = new Set(t);
19
+ return n.delete(e) || n.add(e), n;
20
+ });
21
+ }, []), s = e((e) => {
22
+ a((t) => {
23
+ let n = new Set(t), r = e.every((e) => n.has(e));
24
+ return e.forEach((e) => {
25
+ r ? n.delete(e) : n.add(e);
26
+ }), n;
27
+ });
28
+ }, []), c = e((e) => {
29
+ a((t) => {
30
+ let n = new Set(t);
31
+ return e.forEach((e) => n.delete(e)), n;
32
+ });
33
+ }, []);
34
+ return {
35
+ isSelected: e((e) => i.has(e), [i]),
36
+ toggle: o,
37
+ toggleAll: s,
38
+ checkedState: e((e) => {
39
+ let t = e.filter((e) => i.has(e)).length;
40
+ return t === 0 ? !1 : t === e.length || "indeterminate";
41
+ }, [i]),
42
+ deselect: c
43
+ };
44
+ }
6
45
  //#endregion
7
- export { e as payBillFlowTestIds };
46
+ export { r as useDuplicateBillsSelection };
@@ -0,0 +1,25 @@
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
5
+ import { Implementation as e } from "../../../shared/feature/dist/lib/WidgetProvider/types.js";
6
+ import { useWidgetConfig as t } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
7
+ import "../../../shared/feature/dist/index.js";
8
+ import { BillPayWidgetMonite as n } from "./index60.js";
9
+ import "./index61.js";
10
+ import { BillPayWidgetNative as r } from "./index79.js";
11
+ import "./index80.js";
12
+ import { jsx as i } from "react/jsx-runtime";
13
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js
14
+ function a({ implementation: a, ...o }) {
15
+ let s = t().implementation, c = a ?? s ?? e.Monite;
16
+ return c === e.Native ? /* @__PURE__ */ i(r, {
17
+ implementation: c,
18
+ ...o
19
+ }) : /* @__PURE__ */ i(n, {
20
+ implementation: c,
21
+ ...o
22
+ });
23
+ }
24
+ //#endregion
25
+ export { a as BillPayWidget, a as default };
@@ -1,6 +1,97 @@
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 "../../../shared/ui/dist/index.js";
7
+ import { DUPLICATE_BILLS_LABELS_EN as t } from "./index2.js";
8
+ import { DuplicateVerdict as n, useApplyDuplicateVerdictsMutation as r } from "../../data-access/dist/index6.js";
9
+ import "../../data-access/dist/index.js";
10
+ import { useDuplicateBills as i } from "./index7.js";
11
+ import { useDuplicateBillsSelection as a } from "./index8.js";
12
+ import { DuplicateBillsDialog as o } from "../../ui/dist/index75.js";
13
+ import "../../ui/dist/index.js";
14
+ import { useMemo as s, useState as c } from "react";
15
+ import { jsx as l } from "react/jsx-runtime";
1
16
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js
2
- function e(e) {
3
- return e ? `••••${e.slice(-4)}` : void 0;
17
+ function u({ open: u, onOpenChange: d, enabled: f = !0, canManageDuplicates: p = !0, onOpenBill: m, labels: h, dialogLabels: g }) {
18
+ let _ = s(() => ({
19
+ ...t,
20
+ ...h
21
+ }), [h]), v = i({ enabled: f }), y = s(() => v.groups.flatMap((e) => e.bills.map((e) => e.id)), [v.groups]), b = a({ reviewIds: y }), x = r(), [S, C] = c(), [w, T] = c(), E = s(() => {
22
+ let [e] = v.groups;
23
+ if (e) return w ? v.groups.some((e) => e.id === w.id) ? w.id : (v.groups[w.index] ?? v.groups[v.groups.length - 1]).id : e.id;
24
+ }, [w, v.groups]), D = (e) => e.bills.filter((e) => b.isSelected(e.id)), O = async (t, n, r, i) => {
25
+ let a = D(t);
26
+ if (a.length === 0) throw Error("Duplicate review action taken with no bills selected — keeping and removing both need a subject.");
27
+ let o = a.flatMap((e) => e.matches.map((t) => ({
28
+ payableId: e.id,
29
+ duplicateId: t.matchId,
30
+ matchedPayableId: t.matchedPayableId,
31
+ removeBy: e.removeBy
32
+ })));
33
+ C({
34
+ groupId: t.id,
35
+ action: r
36
+ });
37
+ try {
38
+ await x.mutateAsync({
39
+ verdict: n,
40
+ targets: o
41
+ }), e.success(i), b.deselect(a.map((e) => e.id));
42
+ } catch {
43
+ e.error(_.verdictFailedToast);
44
+ } finally {
45
+ C(void 0);
46
+ }
47
+ }, k = v.groups.map((e) => {
48
+ let t = e.bills.map((e) => e.id), r = D(e), i = {
49
+ vendorLabel: e.vendorLabel,
50
+ count: e.bills.length
51
+ };
52
+ return {
53
+ id: e.id,
54
+ titleLabel: e.vendorLabel,
55
+ countLabel: String(e.bills.length),
56
+ accessibleLabel: _.reviewGroup(i),
57
+ selectAllLabel: _.selectGroup(i),
58
+ selectAllChecked: b.checkedState(t),
59
+ onToggleAllRows: () => b.toggleAll(t),
60
+ rows: e.bills.map((e) => ({
61
+ id: e.id,
62
+ status: e.status,
63
+ statusTone: e.statusTone,
64
+ invoiceNumberLabel: e.invoiceNumberLabel,
65
+ amountLabel: e.amountLabel,
66
+ invoiceDateLabel: e.invoiceDateLabel,
67
+ addedOnLabel: e.addedOnLabel,
68
+ selectLabel: _.selectRow(e),
69
+ openLabel: _.openRow(e),
70
+ isSelected: b.isSelected(e.id),
71
+ onToggleSelected: () => b.toggle(e.id),
72
+ onOpen: () => m?.(e.id)
73
+ })),
74
+ onKeepSelected: p ? () => void O(e, n.Keep, "keep", _.dismissedToast) : void 0,
75
+ onRemoveDuplicates: p ? () => void O(e, n.Remove, "remove", _.removedToast) : void 0,
76
+ isActionDisabled: r.length === 0,
77
+ isRemoveUnavailable: r.some((e) => !e.removeBy),
78
+ pendingAction: S?.groupId === e.id ? S.action : void 0
79
+ };
80
+ });
81
+ return /* @__PURE__ */ l(o, {
82
+ open: u,
83
+ onOpenChange: d,
84
+ groups: k,
85
+ isLoading: v.isLoading,
86
+ isError: v.isError,
87
+ expandedGroupId: E,
88
+ onExpandedGroupChange: (e) => T({
89
+ id: e,
90
+ index: v.groups.findIndex((t) => t.id === e)
91
+ }),
92
+ isBusy: !!S,
93
+ labels: g
94
+ });
4
95
  }
5
96
  //#endregion
6
- export { e as maskAccountNumber };
97
+ export { u as DuplicateBillsContainer, u as default };
@@ -61,28 +61,28 @@ import { BillsScreen as u } from "./index67.js";
61
61
  import "./index68.js";
62
62
  import { BillUploadStatusTray as d } from "./index70.js";
63
63
  import "./index72.js";
64
- import "./index73.js";
65
- import { DuplicateBillsDialog as f } from "./index74.js";
66
- import "./index75.js";
64
+ import "./index74.js";
65
+ import { DuplicateBillsDialog as f } from "./index75.js";
67
66
  import "./index76.js";
68
- import { ExtractionNotice as p } from "./index77.js";
69
- import "./index78.js";
67
+ import "./index77.js";
68
+ import { ExtractionNotice as p } from "./index78.js";
70
69
  import "./index79.js";
71
70
  import "./index80.js";
72
71
  import "./index81.js";
73
- import { REVIEW_TRANSACTION_DIALOG_LABELS_EN as m } from "./index82.js";
74
- import { ReviewTransactionDialog as h } from "./index83.js";
75
- import "./index84.js";
76
- import { MARK_AS_PAID_DIALOG_LABELS_EN as g } from "./index85.js";
77
- import { MarkAsPaidDialog as _ } from "./index86.js";
78
- import "./index87.js";
79
- import { SCHEDULE_PAYMENT_DIALOG_LABELS_EN as v } from "./index88.js";
80
- import { SchedulePaymentDialog as y } from "./index90.js";
81
- import "./index91.js";
72
+ import "./index82.js";
73
+ import { REVIEW_TRANSACTION_DIALOG_LABELS_EN as m } from "./index83.js";
74
+ import { ReviewTransactionDialog as h } from "./index84.js";
75
+ import "./index85.js";
76
+ import { MARK_AS_PAID_DIALOG_LABELS_EN as g } from "./index86.js";
77
+ import { MarkAsPaidDialog as _ } from "./index87.js";
78
+ import "./index88.js";
79
+ import { SCHEDULE_PAYMENT_DIALOG_LABELS_EN as v } from "./index89.js";
80
+ import { SchedulePaymentDialog as y } from "./index91.js";
82
81
  import "./index92.js";
83
- import { SourceDocumentPanel as b } from "./index93.js";
84
- import "./index94.js";
85
- import { UNSAVED_BILL_DIALOG_LABELS_EN as x } from "./index95.js";
86
- import { UnsavedBillDialog as S } from "./index96.js";
87
- import "./index97.js";
82
+ import "./index93.js";
83
+ import { SourceDocumentPanel as b } from "./index94.js";
84
+ import "./index95.js";
85
+ import { UNSAVED_BILL_DIALOG_LABELS_EN as x } from "./index96.js";
86
+ import { UnsavedBillDialog as S } from "./index97.js";
87
+ import "./index98.js";
88
88
  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,6 +1,7 @@
1
1
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index18.js
2
2
  var e = {
3
3
  draft: "Draft",
4
+ finalized: "Finalized",
4
5
  pending_approval: "Pending approval",
5
6
  ready_to_pay: "Ready to pay",
6
7
  scheduled: "Scheduled",