@tesouro/embedded-components-react 0.11.226 → 0.11.228

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 (56) 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/bill-detail/ui/dist/index31.js +1 -1
  4. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index34.js +1 -1
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index48.js +1 -1
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index49.js +1 -1
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/data-access/dist/index.js +3 -1
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/data-access/dist/index8.js +55 -0
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/data-access/dist/index9.js +36 -0
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index.js +5 -5
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index10.js +19 -185
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index11.js +10 -30
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index12.js +186 -12
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index13.js +35 -83
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index14.js +15 -51
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index15.js +76 -294
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index16.js +51 -34
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index17.js +277 -456
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index18.js +29 -326
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index19.js +524 -5
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index20.js +359 -4
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index21.js +4 -37
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index22.js +5 -1
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index23.js +38 -0
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index24.js +1 -0
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index7.js +8 -0
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index8.js +3 -1
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index15.js +2 -0
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index16.js +3 -1
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index17.js +221 -200
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index2.js +1 -1
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index3.js +1 -1
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +1 -1
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidget/BillPayWidget.js +2 -2
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidget/BillsTab.js +1 -1
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidget/index.js +1 -1
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index5.js +1 -1
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index6.js +1 -1
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +14 -12
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index10.js +10 -11
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index11.js +1 -53
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index12.js +13 -2
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index13.js +52 -2
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index14.js +2 -74
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index15.js +3 -2
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index16.js +73 -9
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index17.js +2 -77
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index18.js +10 -0
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index19.js +77 -2
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index21.js +2 -31
  51. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index22.js +6 -2
  52. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index23.js +31 -0
  53. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index24.js +2 -0
  54. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  55. package/package.json +1 -1
  56. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index20.js +0 -6
@@ -2,331 +2,34 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { toast as e } from "../../../../../../node_modules/sonner/dist/index.js";
6
- import { hasAnyScope as t } from "../../../../shared/data-access/dist/lib/hasAnyScope.js";
7
- import { useMailboxAddress as n } from "../../../../shared/data-access/dist/lib/useMailboxAddress.js";
8
- import { Scope as r } from "../../../../shared/data-access/dist/lib/scopes.js";
9
- import "../../../../shared/data-access/dist/index.js";
10
- import "../../../../shared/ui/dist/index.js";
11
- import { useWidgetConfig as i, useWidgetInitStaleForToken as a } from "../../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
12
- import "../../../../shared/feature/dist/index.js";
13
- import { BILL_QUEUE_ORDER as o, BillQueue as s } from "./index5.js";
14
- import { BILLS_TAB_LABELS_EN as c } from "./index7.js";
15
- import { BillDecisionDialog as l } from "../../../ui/dist/index4.js";
16
- import { BillDuplicateIcon as ee } from "../../../ui/dist/index6.js";
17
- import "../../../ui/dist/index.js";
18
- import { AddBillDialog as u } from "../../ui/dist/index6.js";
19
- import { BillsScreen as d } from "../../ui/dist/index17.js";
20
- import "../../ui/dist/index.js";
21
- import { BillDuplicateView as f, useBillsTable as p } from "./index17.js";
22
- import { useDuplicateBillsCount as m } from "./index2.js";
23
- import { formatBillQueueBadge as te } from "./index3.js";
24
- import { copyTextToClipboard as ne } from "./index6.js";
25
- import { billsTableCellTestIds as re } from "./index8.js";
26
- import { useAssignedToMeCount as ie } from "./index9.js";
27
- import { useBillSummaryCards as ae } from "./index11.js";
28
- import { useCallback as h, useImperativeHandle as oe, useMemo as g, useState as _ } from "react";
29
- import { Fragment as se, jsx as v, jsxs as y } from "react/jsx-runtime";
5
+ import { resolveVendorName as e } from "../../../util/dist/lib/resolveVendor.js";
6
+ import "../../../util/dist/index.js";
7
+ import { getCounterpartName as t } from "../../../../shared/counterpart-management/feature/dist/lib/helpers.js";
8
+ import { useCounterpartsByIdsQuery as n } from "../../../../shared/counterpart-management/data-access/dist/index3.js";
9
+ import "../../../../shared/counterpart-management/feature/dist/index.js";
10
+ import { useMemo as r } from "react";
30
11
  // ../../libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index18.js
31
- var b = () => void 0;
32
- function x({ labels: x, onOpenBill: ce, onEnterManually: le, onFilesSelected: ue, maxFiles: S, headerActionContainer: de, selectedSummaryCard: fe, onSummaryCardChange: pe, selectedQueue: me, onQueueChange: he, ref: ge }) {
33
- let C = g(() => ({
34
- ...c,
35
- ...x,
36
- queues: {
37
- ...c.queues,
38
- ...x?.queues
39
- },
40
- summaryCards: {
41
- ...c.summaryCards,
42
- ...x?.summaryCards,
43
- statusCount: {
44
- ...c.summaryCards.statusCount,
45
- ...x?.summaryCards?.statusCount
46
- },
47
- stageCount: {
48
- ...c.summaryCards.stageCount,
49
- ...x?.summaryCards?.stageCount
50
- }
51
- },
52
- scheduledStatus: {
53
- ...c.scheduledStatus,
54
- ...x?.scheduledStatus
55
- },
56
- dueDate: {
57
- ...c.dueDate,
58
- ...x?.dueDate
59
- },
60
- filters: {
61
- ...c.filters,
62
- ...x?.filters,
63
- presets: {
64
- ...c.filters.presets,
65
- ...x?.filters?.presets
66
- },
67
- statuses: {
68
- ...c.filters.statuses,
69
- ...x?.filters?.statuses
70
- },
71
- dateFieldNames: {
72
- ...c.filters.dateFieldNames,
73
- ...x?.filters?.dateFieldNames
74
- }
75
- },
76
- filterBar: {
77
- ...c.filterBar,
78
- ...x?.filterBar
79
- },
80
- duplicatesEmptyState: {
81
- ...c.duplicatesEmptyState,
82
- ...x?.duplicatesEmptyState
83
- },
84
- duplicateStatusCount: {
85
- ...c.duplicateStatusCount,
86
- ...x?.duplicateStatusCount
87
- },
88
- queueEmptyStates: o.reduce((e, t) => ({
89
- ...e,
90
- [t]: {
91
- ...c.queueEmptyStates[t],
92
- ...x?.queueEmptyStates?.[t]
93
- }
94
- }), {})
95
- }), [x]), [_e, w] = _(!1), [T, E] = _(f.AllBills), { initResponse: D } = i(), O = a(), k = t(D?.scopes, [r.PayableReadOrg]), A = t(D?.scopes, [r.PayableWriteOrg]), j = !D || k, M = !D || A, N = D && !O ? t(D.scopes, [r.PayablePayOrg]) : void 0, P = t(D?.scopes, [r.CounterpartReadOrg]), F = g(() => ({
96
- menuTrigger: C.duplicateMenuTrigger,
97
- notDuplicateAction: C.duplicateNotDuplicateAction,
98
- notDuplicateConfirmTitle: C.duplicateNotDuplicateConfirmTitle,
99
- notDuplicateConfirmDescription: C.duplicateNotDuplicateConfirmDescription,
100
- notDuplicateConfirmButton: C.duplicateNotDuplicateConfirmButton,
101
- notDuplicateConfirmBackButton: C.duplicateNotDuplicateConfirmBackButton,
102
- deleteAction: C.duplicateDeleteAction,
103
- deleteConfirmTitle: C.duplicateDeleteConfirmTitle,
104
- deleteConfirmDescription: C.duplicateDeleteConfirmDescription,
105
- deleteConfirmButton: C.duplicateDeleteConfirmButton,
106
- deletedToast: C.duplicateDeletedToast,
107
- confirmAction: C.duplicateConfirmAction,
108
- confirmDuplicateTitle: C.duplicateConfirmDuplicateTitle,
109
- confirmDuplicateDescription: C.duplicateConfirmDuplicateDescription,
110
- confirmDuplicateButton: C.duplicateConfirmDuplicateButton,
111
- confirmedToast: C.duplicateConfirmedToast,
112
- cancelAction: C.duplicateCancelAction,
113
- cancelConfirmTitle: C.duplicateCancelConfirmTitle,
114
- cancelConfirmDescription: C.duplicateCancelConfirmDescription,
115
- cancelConfirmButton: C.duplicateCancelConfirmButton,
116
- cancelConfirmBackButton: C.duplicateCancelConfirmBackButton,
117
- dismissedToast: C.duplicateDismissedToast,
118
- cancelledToast: C.duplicateCancelledToast,
119
- actionFailedToast: C.duplicateActionFailedToast,
120
- groupHeader: C.duplicateGroupHeader,
121
- groupInvoice: C.duplicateGroupInvoice,
122
- showMore: C.duplicateShowMore,
123
- showLess: C.duplicateShowLess,
124
- statusSummary: C.duplicateStatusSummary,
125
- statusCount: C.duplicateStatusCount,
126
- pageInfo: C.duplicatePageInfo
127
- }), [
128
- C.duplicateMenuTrigger,
129
- C.duplicateNotDuplicateAction,
130
- C.duplicateNotDuplicateConfirmTitle,
131
- C.duplicateNotDuplicateConfirmDescription,
132
- C.duplicateNotDuplicateConfirmButton,
133
- C.duplicateNotDuplicateConfirmBackButton,
134
- C.duplicateDeleteAction,
135
- C.duplicateDeleteConfirmTitle,
136
- C.duplicateDeleteConfirmDescription,
137
- C.duplicateDeleteConfirmButton,
138
- C.duplicateDeletedToast,
139
- C.duplicateConfirmAction,
140
- C.duplicateConfirmDuplicateTitle,
141
- C.duplicateConfirmDuplicateDescription,
142
- C.duplicateConfirmDuplicateButton,
143
- C.duplicateConfirmedToast,
144
- C.duplicateCancelAction,
145
- C.duplicateCancelConfirmTitle,
146
- C.duplicateCancelConfirmDescription,
147
- C.duplicateCancelConfirmButton,
148
- C.duplicateCancelConfirmBackButton,
149
- C.duplicateDismissedToast,
150
- C.duplicateCancelledToast,
151
- C.duplicateActionFailedToast,
152
- C.duplicateGroupHeader,
153
- C.duplicateGroupInvoice,
154
- C.duplicateShowMore,
155
- C.duplicateShowLess,
156
- C.duplicateStatusSummary,
157
- C.duplicateStatusCount,
158
- C.duplicatePageInfo
159
- ]), I = t(D?.scopes, [r.MailboxReadOrg]), { mailboxAddress: ve } = n({
160
- relatedObjectType: "payable",
161
- enabled: I && !O
162
- }), L = I ? ve : void 0, R = p({
163
- enabled: j,
164
- canPay: N,
165
- canReadVendors: P,
166
- isVendorFilterPaused: O,
167
- filterLabels: C.filters,
168
- onOpenBill: ce ?? b,
169
- duplicateFlagLabel: C.duplicateFlag,
170
- duplicateGroupLabels: F,
171
- canManageDuplicates: M,
172
- duplicateView: T,
173
- scheduledStatusLabels: C.scheduledStatus,
174
- dueDateLabels: C.dueDate,
175
- selectedSummaryCard: fe,
176
- onSummaryCardChange: pe,
177
- selectedQueue: me,
178
- onQueueChange: he
179
- }), z = m({ enabled: j }), B = T === f.PossibleDuplicates, V = ie({
180
- enabled: j,
181
- canPay: N
182
- }), H = ae({
183
- enabled: j,
184
- labels: C.summaryCards,
185
- selectedCard: R.summaryCard
186
- }), ye = g(() => o.map((e) => ({
187
- id: e,
188
- label: C.queues[e],
189
- badge: e === s.AssignedToMe ? te(V) : void 0
190
- })), [C.queues, V]), { clearQueryConstraints: U, onFilterTabChange: W } = R, be = h(() => {
191
- U(), E(f.PossibleDuplicates);
192
- }, [U]), G = h(() => {
193
- E(f.AllBills), W(s.All);
194
- }, [W]), xe = h((e) => {
195
- E(f.AllBills), W(e);
196
- }, [W]), Se = !z.isError && z.groupCount > 0, Ce = M && Se, K = !z.isLoading && !z.isError && z.count === 0;
197
- B && (K || R.summaryCard) && G();
198
- let we = Ce ? [{
199
- id: "duplicates",
200
- label: C.attentionDuplicates(z.groupCount, z.isCapped),
201
- tone: "warning",
202
- icon: /* @__PURE__ */ v(ee, {}),
203
- pressed: B,
204
- onToggle: B ? G : be
205
- }] : [], q = x?.screen, Te = g(() => ({
206
- ...q,
207
- createButton: C.createButton,
208
- addBill: {
209
- ...q?.addBill,
210
- heading: C.nonEmptyHeading
211
- },
212
- ...B ? {
213
- columnAddedOn: C.duplicateColumnCreated,
214
- columnAmountDue: C.duplicateColumnAmount
215
- } : {}
216
- }), [
217
- B,
218
- C.duplicateColumnCreated,
219
- C.duplicateColumnAmount,
220
- q,
221
- C.createButton,
222
- C.nonEmptyHeading
223
- ]), Ee = g(() => ({
224
- ...R.filterBarProps,
225
- labels: C.filterBar
226
- }), [R.filterBarProps, C.filterBar]), J = () => {
227
- w(!1), le?.();
228
- }, Y = (e) => {
229
- w(!1), ue?.(e);
230
- }, X = L ? {
231
- emailAddress: L,
232
- onCopyEmail: async () => {
233
- L && (await ne(L) ? e.success(C.emailCopiedToast) : e.error(C.emailCopyFailedToast));
234
- }
235
- } : {
236
- emailAddress: void 0,
237
- onCopyEmail: void 0
238
- }, { showVendorBills: Z } = R, Q = h((e) => {
239
- E(f.AllBills), Z(e);
240
- }, [Z]), $ = h(() => w(!0), []);
241
- return oe(ge, () => ({
242
- showVendorBills: Q,
243
- openAddBill: $
244
- }), [Q, $]), /* @__PURE__ */ y(se, { children: [
245
- /* @__PURE__ */ v(d, {
246
- rows: R.rows,
247
- isLoading: R.isLoading || !D,
248
- isError: R.isError,
249
- onRetry: R.onRetry,
250
- sorting: R.sorting,
251
- onSortingChange: R.onSortingChange,
252
- pageSize: R.pageSize,
253
- onPageSizeChange: R.onPageSizeChange,
254
- pageSizeOptions: R.pageSizeOptions,
255
- hasNextPage: R.hasNextPage,
256
- hasPrevPage: R.hasPrevPage,
257
- onNextPage: R.onNextPage,
258
- onPrevPage: R.onPrevPage,
259
- filterTabs: ye,
260
- selectedFilterTabId: R.selectedFilterTabId,
261
- onFilterTabChange: xe,
262
- searchValue: R.searchValue,
263
- onSearchChange: R.onSearchChange,
264
- filters: Ee,
265
- visibleColumns: R.visibleColumns,
266
- keepsColumnOrder: R.keepsColumnOrder,
267
- isSortable: R.isSortable,
268
- pageInfo: R.pageInfo,
269
- cellTestIds: re,
270
- isSearchActive: R.isSearchActive,
271
- showAddPanelWhenEmpty: R.showAddPanelWhenEmpty,
272
- emptyState: B ? C.duplicatesEmptyState : C.queueEmptyStates[R.selectedFilterTabId],
273
- onCreateClick: M ? () => w(!0) : void 0,
274
- headerActionContainer: de,
275
- onEnterManually: M ? J : void 0,
276
- onFilesSelected: M ? Y : void 0,
277
- maxFiles: S,
278
- ...X,
279
- summaryCards: H ? {
280
- view: H,
281
- labels: {
282
- group: C.summaryCards.group,
283
- loading: C.summaryCards.loading,
284
- info: C.summaryCards.info
285
- },
286
- onSelect: R.onSummaryCardSelect
287
- } : void 0,
288
- attentionStrip: {
289
- label: C.attentionStripLabel,
290
- items: we
291
- },
292
- attentionView: B ? {
293
- backLabel: C.queues[s.All],
294
- backAccessibleLabel: C.attentionBackAccessible,
295
- title: C.duplicatesViewTitle,
296
- tone: "warning",
297
- onBack: G
298
- } : void 0,
299
- labels: Te
300
- }),
301
- /* @__PURE__ */ v(l, {
302
- open: R.cancelConfirmation.open,
303
- copy: R.cancelConfirmation.copy,
304
- onConfirm: R.cancelConfirmation.onConfirm,
305
- onCancel: R.cancelConfirmation.onCancel,
306
- isPending: R.cancelConfirmation.isPending,
307
- labels: { cancelButton: R.cancelConfirmation.cancelButtonLabel }
308
- }),
309
- /* @__PURE__ */ v(l, {
310
- open: R.keepConfirmation.open,
311
- copy: R.keepConfirmation.copy,
312
- onConfirm: R.keepConfirmation.onConfirm,
313
- onCancel: R.keepConfirmation.onCancel,
314
- isPending: R.keepConfirmation.isPending,
315
- labels: { cancelButton: R.keepConfirmation.cancelButtonLabel }
316
- }),
317
- M ? /* @__PURE__ */ v(u, {
318
- open: _e,
319
- onOpenChange: w,
320
- onFilesSelected: Y,
321
- maxFiles: S,
322
- onEnterManually: J,
323
- ...X,
324
- dialogLabels: x?.addBillDialog?.dialog,
325
- labels: {
326
- ...x?.addBillDialog?.panel,
327
- heading: R.hasAnyBills ? C.nonEmptyHeading : C.emptyHeading
328
- }
329
- }) : null
330
- ] });
12
+ var i = {
13
+ Resolving: "resolving",
14
+ Unavailable: "unavailable",
15
+ Settled: "settled"
16
+ }, a = /* @__PURE__ */ new Map();
17
+ function o({ payables: i, enabled: o, canReadVendors: c = !0, isPaused: l = !1 } = {}) {
18
+ let u = r(() => (i ?? []).filter((t) => !e(t)).map((e) => e.counterpart_id).filter((e) => !!e), [i]), d = n({
19
+ counterpartIds: u,
20
+ enabled: o !== !1 && c && !l
21
+ }), f = !c && !l;
22
+ return {
23
+ vendorNames: r(() => f ? a : new Map((d.data?.data ?? []).map((e) => [e.id, t(e)]).filter((e) => !!e[1])), [d.data?.data, f]),
24
+ lookup: s({
25
+ hasUnresolvedIds: u.length > 0,
26
+ isScopeWithdrawn: f,
27
+ isFetching: d.isFetching,
28
+ isError: d.isError
29
+ })
30
+ };
331
31
  }
332
- export { x as BillsList, x as default };
32
+ function s({ hasUnresolvedIds: e, isScopeWithdrawn: t, isFetching: n, isError: r }) {
33
+ return e ? t ? i.Unavailable : n ? i.Resolving : r ? i.Unavailable : i.Settled : i.Settled;
34
+ }
35
+ export { i as BillVendorLookup, o as useBillVendorNames };