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