@tesouro/embedded-components-react 0.5.169 → 0.5.170

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 (129) hide show
  1. package/dist/index.css +39 -17
  2. package/dist/index.js +1 -1
  3. package/dist/lib/BillPayWidget.js +1 -1
  4. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index.js +11 -11
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index17.js +95 -80
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index7.js +37 -11
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +13 -15
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +56 -67
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index11.js +4 -43
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index12.js +6 -115
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index13.js +202 -63
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +2 -4
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +1 -1
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +84 -4
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index20.js +3 -84
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +5 -4
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +4 -5
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +32 -3
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index24.js +36 -30
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +167 -35
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index26.js +40 -164
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +1 -49
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js +50 -1
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +11 -45
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js +8 -13
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js +14 -8
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +59 -7
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index33.js +8 -64
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index34.js +24 -8
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +150 -18
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index36.js +9 -152
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js +25 -9
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js +19 -21
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +32 -14
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +14 -39
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +8 -16
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +4 -8
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +98 -4
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +68 -83
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +3 -83
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +143 -3
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +44 -143
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +114 -45
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +189 -111
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index5.js +13 -0
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +72 -186
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +31 -76
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +89 -32
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +406 -83
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +12 -411
  51. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +84 -12
  52. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +67 -72
  53. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +222 -73
  54. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +37 -223
  55. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +245 -37
  56. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js +5 -23
  57. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +23 -252
  58. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +626 -21
  59. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +4 -586
  60. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +45 -4
  61. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +256 -41
  62. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +3 -263
  63. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +4 -3
  64. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +44 -2
  65. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +1 -46
  66. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +8 -1
  67. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +22 -57
  68. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +11 -6
  69. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +130 -11
  70. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +3 -132
  71. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +6 -3
  72. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +129 -3
  73. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +8 -124
  74. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +7 -8
  75. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +82 -8
  76. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +19 -48
  77. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index79.js +20 -21
  78. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index8.js +14 -6
  79. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index80.js +28 -19
  80. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +82 -27
  81. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js +47 -83
  82. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index83.js +260 -47
  83. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index84.js +24 -251
  84. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index85.js +382 -25
  85. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index86.js +294 -144
  86. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index87.js +4 -223
  87. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index88.js +7 -4
  88. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index89.js +112 -5
  89. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +37 -5
  90. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index90.js +1 -114
  91. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index91.js +26 -0
  92. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +18 -21
  93. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index100.js +126 -10
  94. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index101.js +1 -105
  95. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index102.js +33 -2
  96. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index103.js +7 -28
  97. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index104.js +126 -73
  98. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index105.js +1 -1
  99. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index106.js +11 -30
  100. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index107.js +106 -8
  101. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index108.js +2 -181
  102. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index109.js +10 -2
  103. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index110.js +50 -12
  104. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index111.js +2 -108
  105. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index38.js +6 -0
  106. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +8 -4
  107. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index73.js +8 -1
  108. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +154 -23
  109. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index83.js +1 -0
  110. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index84.js +343 -250
  111. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index90.js +5 -123
  112. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index91.js +28 -26
  113. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index92.js +2 -94
  114. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index93.js +7 -2
  115. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index94.js +32 -5
  116. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index95.js +2 -30
  117. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index96.js +12 -2
  118. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index97.js +104 -5
  119. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index98.js +2 -34
  120. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index99.js +31 -2
  121. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  122. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +1 -1
  123. package/dist/packages/shared-ui-shadcn/dist/index.js +2458 -2284
  124. package/package.json +2 -1
  125. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index92.js +0 -27
  126. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index112.js +0 -2
  127. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index113.js +0 -10
  128. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index114.js +0 -52
  129. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index115.js +0 -2
@@ -2,159 +2,309 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { useEmbedApi as e } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
6
- import { formatCalendarDate as t } from "../../../shared/util/dist/lib/formatCalendarDate.js";
7
- import { formatMoneyExact as n } from "../../../shared/util/dist/lib/formatMoneyExact.js";
8
- import { hasSuspectedPayableDuplicate as ee } from "../../data-access/dist/index7.js";
9
- import { usePayablesQuery as r, usePayablesTotalCountQuery as i } from "../../data-access/dist/index17.js";
10
- import "../../data-access/dist/index.js";
11
- import { derivePayableStatus as te } from "./index7.js";
12
- import { resolveVendorName as ne } from "./index8.js";
13
- import { isEditablePayableStatus as re } from "./index19.js";
14
- import { formatScheduledDateLabel as a } from "./index37.js";
15
- import { useLocalCalendarDay as o } from "./index38.js";
16
- import { BillQueue as s, DEFAULT_BILL_QUEUE as c, billQueueColumns as l, billQueueHasScheduledPayment as u, billQueueOffersAddPanel as ie, billQueueStatuses as ae, billSortColumnId as oe, billSortField as d } from "./index75.js";
17
- import { useBillsFilters as f } from "./index84.js";
18
- import { BillVendorLookup as p, useBillVendorNames as se } from "./index85.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 { 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 ee, useWidgetInitStaleForToken as te } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
12
+ import "../../../shared/feature/dist/index.js";
13
+ import { useDuplicateBillsCount as ne } from "./index7.js";
14
+ import "./index14.js";
15
+ import { AddBillDialog as re } from "../../ui/dist/index10.js";
16
+ import { BillDecisionDialog as i } from "../../ui/dist/index65.js";
17
+ import { BillsScreen as ie } from "../../ui/dist/index84.js";
18
+ import "../../ui/dist/index.js";
19
+ import { BillCreateDialog as a } from "./index61.js";
20
+ import "./index62.js";
21
+ import { BillDetailsContainer as ae } from "./index64.js";
22
+ import "./index65.js";
23
+ import "./index71.js";
24
+ import "./index72.js";
25
+ import { BILL_QUEUE_ORDER as o } from "./index74.js";
26
+ import { BILLS_TAB_LABELS_EN as s } from "./index77.js";
27
+ import { BillDuplicateView as c, useBillsTable as l } from "./index85.js";
28
+ import { formatBillQueueBadge as u } from "./index73.js";
29
+ import { copyTextToClipboard as d } from "./index75.js";
30
+ import { resolveDuplicateWarning as f } from "./index76.js";
31
+ import { billsTabTestIds as p, billsTableCellTestIds as oe } from "./index78.js";
32
+ import { useBillQueueCounts as se } from "./index79.js";
19
33
  import { useCallback as m, useEffect as h, useMemo as g, useState as _ } from "react";
34
+ import { jsx as v, jsxs as ce } from "react/jsx-runtime";
20
35
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index86.js
21
- var v = 10, y = [{
22
- id: "addedOnLabel",
23
- desc: !0
24
- }];
25
- function b({ enabled: p = !0, canReadVendors: b = !0, isVendorFilterPaused: x = !1, filterLabels: S, onOpenBill: C, duplicateRowNote: w, attachmentLabel: T, scheduledRelativeDayLabels: E }) {
26
- let D = o(), [O, k] = _(c), [A, j] = _(y), [M, le] = _(v), [N, P] = _(), [F, I] = _(""), [L, ue] = _(""), R = m(() => P(void 0), []);
36
+ function y({ labels: y, onEnqueueFiles: le, openPayableId: b, onOpenPayableHandled: x, vendorIntent: S, onVendorIntentHandled: C, poweredByBankName: w, onSettingsClick: ue }) {
37
+ let T = g(() => ({
38
+ ...s,
39
+ ...y,
40
+ queues: {
41
+ ...s.queues,
42
+ ...y?.queues
43
+ },
44
+ scheduledRelativeDay: {
45
+ ...s.scheduledRelativeDay,
46
+ ...y?.scheduledRelativeDay
47
+ },
48
+ filters: {
49
+ ...s.filters,
50
+ ...y?.filters,
51
+ presets: {
52
+ ...s.filters.presets,
53
+ ...y?.filters?.presets
54
+ },
55
+ statuses: {
56
+ ...s.filters.statuses,
57
+ ...y?.filters?.statuses
58
+ },
59
+ dateFieldNames: {
60
+ ...s.filters.dateFieldNames,
61
+ ...y?.filters?.dateFieldNames
62
+ }
63
+ },
64
+ filterBar: {
65
+ ...s.filterBar,
66
+ ...y?.filterBar
67
+ },
68
+ queueEmptyStates: o.reduce((e, t) => ({
69
+ ...e,
70
+ [t]: {
71
+ ...s.queueEmptyStates[t],
72
+ ...y?.queueEmptyStates?.[t]
73
+ }
74
+ }), {})
75
+ }), [y]), [de, E] = _(!1), [D, O] = _(), [fe, k] = _(), [A, j] = _(!1), [M, pe] = _(), [N, P] = _(!1), [F, I] = _(!1), [L, R] = _(c.AllBills), { initResponse: z } = ee(), me = te(), he = t(z?.scopes, [r.PayableReadOrg]), ge = t(z?.scopes, [r.PayableWriteOrg]), B = !z || he, V = !z || ge, H = m((e, t) => {
76
+ if (t && V) {
77
+ O(e), k(void 0), j(!0);
78
+ return;
79
+ }
80
+ pe(e), I(!0);
81
+ }, [V]), _e = t(z?.scopes, [r.CounterpartReadOrg]), ve = g(() => ({
82
+ originalBill: T.duplicateOriginalBillLabel,
83
+ menuTrigger: T.duplicateMenuTrigger,
84
+ notDuplicateAction: T.duplicateNotDuplicateAction,
85
+ notDuplicateConfirmTitle: T.duplicateNotDuplicateConfirmTitle,
86
+ notDuplicateConfirmDescription: T.duplicateNotDuplicateConfirmDescription,
87
+ notDuplicateConfirmButton: T.duplicateNotDuplicateConfirmButton,
88
+ notDuplicateConfirmBackButton: T.duplicateNotDuplicateConfirmBackButton,
89
+ deleteAction: T.duplicateDeleteAction,
90
+ deleteConfirmTitle: T.duplicateDeleteConfirmTitle,
91
+ deleteConfirmDescription: T.duplicateDeleteConfirmDescription,
92
+ deleteConfirmButton: T.duplicateDeleteConfirmButton,
93
+ deletedToast: T.duplicateDeletedToast,
94
+ confirmAction: T.duplicateConfirmAction,
95
+ confirmDuplicateTitle: T.duplicateConfirmDuplicateTitle,
96
+ confirmDuplicateDescription: T.duplicateConfirmDuplicateDescription,
97
+ confirmDuplicateButton: T.duplicateConfirmDuplicateButton,
98
+ confirmedToast: T.duplicateConfirmedToast,
99
+ cancelAction: T.duplicateCancelAction,
100
+ cancelConfirmTitle: T.duplicateCancelConfirmTitle,
101
+ cancelConfirmDescription: T.duplicateCancelConfirmDescription,
102
+ cancelConfirmButton: T.duplicateCancelConfirmButton,
103
+ cancelConfirmBackButton: T.duplicateCancelConfirmBackButton,
104
+ dismissedToast: T.duplicateDismissedToast,
105
+ cancelledToast: T.duplicateCancelledToast,
106
+ actionFailedToast: T.duplicateActionFailedToast,
107
+ groupHeader: T.duplicateGroupHeader
108
+ }), [
109
+ T.duplicateOriginalBillLabel,
110
+ T.duplicateMenuTrigger,
111
+ T.duplicateNotDuplicateAction,
112
+ T.duplicateNotDuplicateConfirmTitle,
113
+ T.duplicateNotDuplicateConfirmDescription,
114
+ T.duplicateNotDuplicateConfirmButton,
115
+ T.duplicateNotDuplicateConfirmBackButton,
116
+ T.duplicateDeleteAction,
117
+ T.duplicateDeleteConfirmTitle,
118
+ T.duplicateDeleteConfirmDescription,
119
+ T.duplicateDeleteConfirmButton,
120
+ T.duplicateDeletedToast,
121
+ T.duplicateConfirmAction,
122
+ T.duplicateConfirmDuplicateTitle,
123
+ T.duplicateConfirmDuplicateDescription,
124
+ T.duplicateConfirmDuplicateButton,
125
+ T.duplicateConfirmedToast,
126
+ T.duplicateCancelAction,
127
+ T.duplicateCancelConfirmTitle,
128
+ T.duplicateCancelConfirmDescription,
129
+ T.duplicateCancelConfirmButton,
130
+ T.duplicateCancelConfirmBackButton,
131
+ T.duplicateDismissedToast,
132
+ T.duplicateCancelledToast,
133
+ T.duplicateActionFailedToast,
134
+ T.duplicateGroupHeader
135
+ ]), { mailboxAddress: U } = n({ relatedObjectType: "payable" }), W = l({
136
+ enabled: B,
137
+ canReadVendors: _e,
138
+ isVendorFilterPaused: me,
139
+ filterLabels: T.filters,
140
+ onOpenBill: H,
141
+ duplicateRowNote: T.duplicateRowNote,
142
+ attachmentLabel: T.attachmentIndicator,
143
+ duplicateGroupLabels: ve,
144
+ canManageDuplicates: V,
145
+ duplicateView: L,
146
+ scheduledRelativeDayLabels: T.scheduledRelativeDay
147
+ }), G = ne({ enabled: B }), ye = f(G, T, L === c.PossibleDuplicates);
27
148
  h(() => {
28
- if (F === L) return;
29
- let e = setTimeout(() => {
30
- ue(F), R();
31
- }, 300);
32
- return () => clearTimeout(e);
149
+ L === c.PossibleDuplicates && !G.isLoading && (G.isError || G.count === 0) && R(c.AllBills);
33
150
  }, [
34
- F,
35
151
  L,
36
- R
152
+ G.count,
153
+ G.isError,
154
+ G.isLoading
37
155
  ]);
38
- let z = f({
39
- offersStatusFilter: O === s.All,
40
- offersVendorFilter: b,
41
- isVendorFilterPaused: x,
42
- labels: S,
43
- onFiltersChange: R
44
- }), { filterByVendor: B } = z, V = A[0], H = d(V?.id), U = H ? V?.desc ? "desc" : "asc" : void 0, W = g(() => ({
45
- ...z.query,
46
- limit: M,
47
- pagination_token: N,
48
- status__in: ae(O) ?? z.query.status__in,
49
- has_scheduled_payment: u(O),
50
- counterpart_name__icontains: L || void 0,
51
- sort: H,
52
- order: U
156
+ let K = se({ enabled: B }), be = g(() => o.map((e) => ({
157
+ id: e,
158
+ label: T.queues[e],
159
+ badge: u(K[e])
160
+ })), [T.queues, K]), q = (e, t) => {
161
+ j(!1), I(!1), H(e, t);
162
+ }, xe = () => {
163
+ P(!1), I(!0);
164
+ }, J = () => {
165
+ I(!1), P(!0);
166
+ }, Y = () => {
167
+ P(!1), I(!1), O(M), k(void 0), j(!0);
168
+ }, Se = g(() => ({
169
+ createButton: T.createButton,
170
+ settingsButton: T.settingsButton,
171
+ addBill: { heading: T.nonEmptyHeading }
53
172
  }), [
54
- z.query,
55
- M,
56
- N,
57
- O,
58
- L,
59
- H,
60
- U
61
- ]), { organizationId: de } = e(), G = JSON.stringify([de, W]), K = r({
62
- ...W,
63
- enabled: p,
64
- pollWhileOcrProcessing: !0
65
- }), [fe, pe] = _(G);
173
+ T.createButton,
174
+ T.settingsButton,
175
+ T.nonEmptyHeading
176
+ ]), Ce = g(() => ({
177
+ ...W.filterBarProps,
178
+ labels: T.filterBar
179
+ }), [W.filterBarProps, T.filterBar]), X = m((e) => {
180
+ E(!1), O(void 0), k(e), j(!0);
181
+ }, []), Z = (e) => {
182
+ E(!1), le?.(e);
183
+ }, Q = U ? {
184
+ emailAddress: U,
185
+ onCopyEmail: async () => {
186
+ U && (await d(U) ? e.success(T.emailCopiedToast) : e.error(T.emailCopyFailedToast));
187
+ }
188
+ } : {
189
+ emailAddress: void 0,
190
+ onCopyEmail: void 0
191
+ };
66
192
  h(() => {
67
- K.isFetching || pe(G);
68
- }, [K.isFetching, G]);
69
- let q = K.data?.data.length, J = q === 0, Y = i({ enabled: p && J }), me = !J || (Y.data?.count ?? 1) > 0, { vendorNames: X, lookup: Z } = se({
70
- payables: K.data?.data,
71
- enabled: p,
72
- canReadVendors: b,
73
- isPaused: x
74
- }), Q = g(() => (K.data?.data ?? []).filter((e) => e.ocr_status !== "processing").map((e) => {
75
- let r = te({
76
- apiStatus: e.status,
77
- dueDate: e.due_date,
78
- scheduledPaymentDate: e.scheduled_payment_date
79
- }), i = e.amount_due ?? e.total_amount, o = e.status === "partially_paid" || e.status === "paid", c = (t) => t == null ? "" : n(t / 100, { currencyCode: e.currency ?? "USD" }), l = a(e.scheduled_payment_date, E, D), u = ne(e) || (e.counterpart_id ? X.get(e.counterpart_id) ?? "" : "");
80
- return {
81
- rowKey: e.id,
82
- vendorLabel: u,
83
- vendorLookup: u || !e.counterpart_id ? void 0 : ce(Z),
84
- issueDateLabel: t(e.issued_at),
85
- dueDateLabel: t(e.due_date),
86
- dueDateTone: r.isOverdue ? "danger" : "default",
87
- scheduledDateLabel: l.label,
88
- scheduledDateExact: l.absoluteLabel,
89
- scheduledDateIsGap: O === s.Scheduled,
90
- paidDateLabel: t(e.paid_at?.slice(0, 10)),
91
- amountDueLabel: c(i),
92
- amountPaidLabel: o ? c(e.amount_paid) : "",
93
- amountPaidIsGap: O === s.Paid,
94
- amountScheduledLabel: c(e.amount_to_pay ?? i),
95
- totalAmountLabel: c(e.total_amount),
96
- attachment: e.file_id ? { label: T } : void 0,
97
- status: r.status,
98
- statusTone: r.tone,
99
- addedOnLabel: t(e.created_at?.slice(0, 10)),
100
- ...ee(e) ? {
101
- rowTone: "warning",
102
- rowNote: w
103
- } : {},
104
- onOpen: () => C(e.id, re(e.status))
105
- };
106
- }), [
107
- K.data?.data,
108
- w,
109
- T,
110
- E,
111
- D,
193
+ b && (O(b), k(void 0), j(!0), x?.());
194
+ }, [x, b]);
195
+ let { showVendorBills: $ } = W;
196
+ return h(() => {
197
+ S && (S.action === "createBill" ? V && X(S.vendorId) : $({
198
+ id: S.vendorId,
199
+ name: S.vendorName
200
+ }), C?.());
201
+ }, [
202
+ V,
112
203
  C,
113
- O,
114
204
  X,
115
- Z
116
- ]), $ = m((e) => {
117
- let t = e;
118
- k(t), j((e) => {
119
- let n = e[0]?.id;
120
- return n ? l(t).some((e) => oe(e) === n) ? e : y : e;
121
- }), R();
122
- }, [R]), he = m((e) => {
123
- $(s.All), I(""), B(e);
124
- }, [B, $]), ge = m((e) => {
125
- j((t) => typeof e == "function" ? e(t) : e), R();
126
- }, [R]), _e = m((e) => {
127
- le(e), R();
128
- }, [R]), ve = m(() => P(K.data?.next_pagination_token ?? void 0), [K.data?.next_pagination_token]), ye = m(() => P(K.data?.prev_pagination_token ?? void 0), [K.data?.prev_pagination_token]), be = m(() => {
129
- K.refetch();
130
- }, [K.refetch]);
131
- return {
132
- rows: Q,
133
- isLoading: K.isLoading || G !== fe || J && Y.isLoading || (q ?? 0) > 0 && Q.length === 0,
134
- isError: K.isError,
135
- onRetry: be,
136
- selectedFilterTabId: O,
137
- onFilterTabChange: $,
138
- showVendorBills: he,
139
- searchValue: F,
140
- onSearchChange: I,
141
- hasAnyBills: me,
142
- isSearchActive: L.length > 0 || z.isFilterActive,
143
- filterBarProps: z.filterBarProps,
144
- visibleColumns: l(O),
145
- showAddPanelWhenEmpty: ie(O),
146
- sorting: A,
147
- onSortingChange: ge,
148
- pageSize: M,
149
- onPageSizeChange: _e,
150
- hasNextPage: !!K.data?.next_pagination_token,
151
- hasPrevPage: !!K.data?.prev_pagination_token,
152
- onNextPage: ve,
153
- onPrevPage: ye
154
- };
155
- }
156
- function ce(e) {
157
- return e === p.Settled ? void 0 : e;
205
+ $,
206
+ S
207
+ ]), /* @__PURE__ */ ce("div", {
208
+ "data-testid": p.root,
209
+ children: [
210
+ /* @__PURE__ */ v(ie, {
211
+ rows: W.rows,
212
+ isLoading: W.isLoading || !z,
213
+ isError: W.isError,
214
+ onRetry: W.onRetry,
215
+ sorting: W.sorting,
216
+ onSortingChange: W.onSortingChange,
217
+ pageSize: W.pageSize,
218
+ onPageSizeChange: W.onPageSizeChange,
219
+ pageSizeOptions: W.pageSizeOptions,
220
+ hasNextPage: W.hasNextPage,
221
+ hasPrevPage: W.hasPrevPage,
222
+ onNextPage: W.onNextPage,
223
+ onPrevPage: W.onPrevPage,
224
+ filterTabs: be,
225
+ selectedFilterTabId: W.selectedFilterTabId,
226
+ onFilterTabChange: W.onFilterTabChange,
227
+ searchValue: W.searchValue,
228
+ onSearchChange: W.onSearchChange,
229
+ filters: Ce,
230
+ visibleColumns: W.visibleColumns,
231
+ cellTestIds: oe,
232
+ isSearchActive: W.isSearchActive,
233
+ showAddPanelWhenEmpty: W.showAddPanelWhenEmpty,
234
+ emptyState: T.queueEmptyStates[W.selectedFilterTabId],
235
+ onCreateClick: V ? () => E(!0) : void 0,
236
+ onSettingsClick: ue,
237
+ onEnterManually: V ? () => X() : void 0,
238
+ onFilesSelected: V ? Z : void 0,
239
+ maxFiles: 10,
240
+ ...Q,
241
+ duplicateWarning: ye,
242
+ duplicateReviewControl: G.isError ? void 0 : {
243
+ isActive: L === c.PossibleDuplicates,
244
+ reviewLabel: T.duplicateReviewButton,
245
+ clearLabel: T.duplicateReviewClearButton,
246
+ activeFilterLabel: T.duplicateFilterChip,
247
+ onReview: () => {
248
+ W.clearQueryConstraints(), R(c.PossibleDuplicates);
249
+ },
250
+ onClear: () => R(c.AllBills)
251
+ },
252
+ labels: Se
253
+ }),
254
+ /* @__PURE__ */ v(i, {
255
+ open: W.cancelConfirmation.open,
256
+ copy: W.cancelConfirmation.copy,
257
+ onConfirm: W.cancelConfirmation.onConfirm,
258
+ onCancel: W.cancelConfirmation.onCancel,
259
+ isPending: W.cancelConfirmation.isPending,
260
+ labels: { cancelButton: W.cancelConfirmation.cancelButtonLabel }
261
+ }),
262
+ /* @__PURE__ */ v(i, {
263
+ open: W.keepConfirmation.open,
264
+ copy: W.keepConfirmation.copy,
265
+ onConfirm: W.keepConfirmation.onConfirm,
266
+ onCancel: W.keepConfirmation.onCancel,
267
+ isPending: W.keepConfirmation.isPending,
268
+ labels: { cancelButton: W.keepConfirmation.cancelButtonLabel }
269
+ }),
270
+ V ? /* @__PURE__ */ v(re, {
271
+ open: de,
272
+ onOpenChange: E,
273
+ onFilesSelected: Z,
274
+ maxFiles: 10,
275
+ onEnterManually: () => X(),
276
+ ...Q,
277
+ labels: { heading: W.hasAnyBills ? T.nonEmptyHeading : T.emptyHeading }
278
+ }) : null,
279
+ A ? /* @__PURE__ */ v(a, {
280
+ open: A,
281
+ onOpenChange: j,
282
+ payableId: D,
283
+ initialCounterpartId: fe,
284
+ onOpenBill: q
285
+ }, D) : null,
286
+ N ? /* @__PURE__ */ v(ae, {
287
+ open: N,
288
+ onOpenChange: P,
289
+ payableId: M,
290
+ onClose: () => P(!1),
291
+ onExpand: xe,
292
+ onEdit: Y,
293
+ testId: p.detailsSheet,
294
+ poweredByBankName: w
295
+ }) : null,
296
+ F ? /* @__PURE__ */ v(a, {
297
+ open: F,
298
+ onOpenChange: I,
299
+ payableId: M,
300
+ readOnly: !0,
301
+ onCollapse: J,
302
+ onEdit: Y,
303
+ onOpenBill: q,
304
+ poweredByBankName: w
305
+ }, M) : null
306
+ ]
307
+ });
158
308
  }
159
309
  //#endregion
160
- export { b as useBillsTable };
310
+ export { y as BillsTab, y as default };
@@ -1,223 +1,4 @@
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 { useMailboxAddress as ee } from "../../../shared/data-access/dist/lib/useMailboxAddress.js";
8
- import { Scope as n } 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 r, useWidgetInitStaleForToken as i } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
12
- import "../../../shared/feature/dist/index.js";
13
- import { useDuplicateBillsCount as te } from "./index10.js";
14
- import { AddBillDialog as ne } from "../../ui/dist/index10.js";
15
- import { BillsScreen as re } from "../../ui/dist/index84.js";
16
- import "../../ui/dist/index.js";
17
- import { DuplicateBillsContainer as ie } from "./index12.js";
18
- import "./index14.js";
19
- import { BillCreateDialog as a } from "./index62.js";
20
- import "./index63.js";
21
- import { BillDetailsContainer as ae } from "./index65.js";
22
- import "./index66.js";
23
- import "./index72.js";
24
- import "./index73.js";
25
- import { BILL_QUEUE_ORDER as o } from "./index75.js";
26
- import { BILLS_TAB_LABELS_EN as s } from "./index78.js";
27
- import { useBillsTable as c } from "./index86.js";
28
- import { formatBillQueueBadge as l } from "./index74.js";
29
- import { copyTextToClipboard as u } from "./index76.js";
30
- import { resolveDuplicateWarning as d } from "./index77.js";
31
- import { billsTabTestIds as f, billsTableCellTestIds as oe } from "./index79.js";
32
- import { useBillQueueCounts as se } from "./index80.js";
33
- import { useCallback as p, useEffect as m, useMemo as h, useState as g } from "react";
34
- import { jsx as _, jsxs as v } from "react/jsx-runtime";
35
- //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index87.js
36
- function y({ labels: y, onEnqueueFiles: b, openPayableId: x, onOpenPayableHandled: S, vendorIntent: C, onVendorIntentHandled: w, poweredByBankName: T, onSettingsClick: ce }) {
37
- let E = h(() => ({
38
- ...s,
39
- ...y,
40
- queues: {
41
- ...s.queues,
42
- ...y?.queues
43
- },
44
- scheduledRelativeDay: {
45
- ...s.scheduledRelativeDay,
46
- ...y?.scheduledRelativeDay
47
- },
48
- filters: {
49
- ...s.filters,
50
- ...y?.filters,
51
- presets: {
52
- ...s.filters.presets,
53
- ...y?.filters?.presets
54
- },
55
- statuses: {
56
- ...s.filters.statuses,
57
- ...y?.filters?.statuses
58
- },
59
- dateFieldNames: {
60
- ...s.filters.dateFieldNames,
61
- ...y?.filters?.dateFieldNames
62
- }
63
- },
64
- filterBar: {
65
- ...s.filterBar,
66
- ...y?.filterBar
67
- },
68
- queueEmptyStates: o.reduce((e, t) => ({
69
- ...e,
70
- [t]: {
71
- ...s.queueEmptyStates[t],
72
- ...y?.queueEmptyStates?.[t]
73
- }
74
- }), {})
75
- }), [y]), [le, D] = g(!1), [ue, O] = g(), [k, A] = g(), [j, M] = g(!1), [N, P] = g(), [F, I] = g(!1), [L, R] = g(!1), [z, B] = g(!1), { initResponse: V } = r(), H = i(), de = t(V?.scopes, [n.PayableReadOrg]), fe = t(V?.scopes, [n.PayableWriteOrg]), U = !V || de, W = !V || fe, pe = p((e, t) => {
76
- if (t && W) {
77
- O(e), A(void 0), M(!0);
78
- return;
79
- }
80
- P(e), R(!0);
81
- }, [W]), me = t(V?.scopes, [n.CounterpartReadOrg]), { mailboxAddress: G } = ee({ relatedObjectType: "payable" }), K = c({
82
- enabled: U,
83
- canReadVendors: me,
84
- isVendorFilterPaused: H,
85
- filterLabels: E.filters,
86
- onOpenBill: pe,
87
- duplicateRowNote: E.duplicateRowNote,
88
- attachmentLabel: E.attachmentIndicator,
89
- scheduledRelativeDayLabels: E.scheduledRelativeDay
90
- }), q = te({ enabled: U }), he = d(q, E), J = se({ enabled: U }), ge = h(() => o.map((e) => ({
91
- id: e,
92
- label: E.queues[e],
93
- badge: l(J[e])
94
- })), [E.queues, J]), _e = (e) => {
95
- B(!1), P(e), R(!0);
96
- }, ve = () => {
97
- I(!1), R(!0);
98
- }, ye = () => {
99
- R(!1), I(!0);
100
- }, Y = () => {
101
- I(!1), R(!1), O(N), A(void 0), M(!0);
102
- }, be = h(() => ({
103
- createButton: E.createButton,
104
- settingsButton: E.settingsButton,
105
- addBill: { heading: E.nonEmptyHeading }
106
- }), [
107
- E.createButton,
108
- E.settingsButton,
109
- E.nonEmptyHeading
110
- ]), xe = h(() => ({
111
- ...K.filterBarProps,
112
- labels: E.filterBar
113
- }), [K.filterBarProps, E.filterBar]), X = p((e) => {
114
- D(!1), O(void 0), A(e), M(!0);
115
- }, []), Z = (e) => {
116
- D(!1), b?.(e);
117
- }, Q = G ? {
118
- emailAddress: G,
119
- onCopyEmail: async () => {
120
- G && (await u(G) ? e.success(E.emailCopiedToast) : e.error(E.emailCopyFailedToast));
121
- }
122
- } : {
123
- emailAddress: void 0,
124
- onCopyEmail: void 0
125
- };
126
- m(() => {
127
- x && (O(x), A(void 0), M(!0), S?.());
128
- }, [S, x]);
129
- let { showVendorBills: $ } = K;
130
- return m(() => {
131
- C && (C.action === "createBill" ? W && X(C.vendorId) : $({
132
- id: C.vendorId,
133
- name: C.vendorName
134
- }), w?.());
135
- }, [
136
- W,
137
- w,
138
- X,
139
- $,
140
- C
141
- ]), /* @__PURE__ */ v("div", {
142
- "data-testid": f.root,
143
- children: [
144
- /* @__PURE__ */ _(re, {
145
- rows: K.rows,
146
- isLoading: K.isLoading || !V,
147
- isError: K.isError,
148
- onRetry: K.onRetry,
149
- sorting: K.sorting,
150
- onSortingChange: K.onSortingChange,
151
- pageSize: K.pageSize,
152
- onPageSizeChange: K.onPageSizeChange,
153
- hasNextPage: K.hasNextPage,
154
- hasPrevPage: K.hasPrevPage,
155
- onNextPage: K.onNextPage,
156
- onPrevPage: K.onPrevPage,
157
- filterTabs: ge,
158
- selectedFilterTabId: K.selectedFilterTabId,
159
- onFilterTabChange: K.onFilterTabChange,
160
- searchValue: K.searchValue,
161
- onSearchChange: K.onSearchChange,
162
- filters: xe,
163
- visibleColumns: K.visibleColumns,
164
- cellTestIds: oe,
165
- isSearchActive: K.isSearchActive,
166
- showAddPanelWhenEmpty: K.showAddPanelWhenEmpty,
167
- emptyState: E.queueEmptyStates[K.selectedFilterTabId],
168
- onCreateClick: W ? () => D(!0) : void 0,
169
- onSettingsClick: ce,
170
- onEnterManually: W ? () => X() : void 0,
171
- onFilesSelected: W ? Z : void 0,
172
- maxFiles: 10,
173
- ...Q,
174
- duplicateWarning: he,
175
- onReviewDuplicates: q.isError ? void 0 : () => B(!0),
176
- labels: be
177
- }),
178
- z ? /* @__PURE__ */ _(ie, {
179
- open: z,
180
- onOpenChange: B,
181
- enabled: U,
182
- canManageDuplicates: W,
183
- onOpenBill: _e
184
- }) : null,
185
- W ? /* @__PURE__ */ _(ne, {
186
- open: le,
187
- onOpenChange: D,
188
- onFilesSelected: Z,
189
- maxFiles: 10,
190
- onEnterManually: () => X(),
191
- ...Q,
192
- labels: { heading: K.hasAnyBills ? E.nonEmptyHeading : E.emptyHeading }
193
- }) : null,
194
- j ? /* @__PURE__ */ _(a, {
195
- open: j,
196
- onOpenChange: M,
197
- payableId: ue,
198
- initialCounterpartId: k
199
- }) : null,
200
- F ? /* @__PURE__ */ _(ae, {
201
- open: F,
202
- onOpenChange: I,
203
- payableId: N,
204
- onClose: () => I(!1),
205
- onExpand: ve,
206
- onEdit: Y,
207
- testId: f.detailsSheet,
208
- poweredByBankName: T
209
- }) : null,
210
- L ? /* @__PURE__ */ _(a, {
211
- open: L,
212
- onOpenChange: R,
213
- payableId: N,
214
- readOnly: !0,
215
- onCollapse: ye,
216
- onEdit: Y,
217
- poweredByBankName: T
218
- }) : null
219
- ]
220
- });
221
- }
222
- //#endregion
223
- export { y as BillsTab, y as default };
1
+ import "./index74.js";
2
+ import "./index77.js";
3
+ import "./index85.js";
4
+ import "./index86.js";