@tesouro/embedded-components-react 0.11.192 → 0.11.195
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/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index4.js +1 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index15.js +179 -171
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index17.js +128 -128
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index18.js +108 -109
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index5.js +55 -113
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index7.js +18 -22
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index9.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index13.js +94 -94
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index21.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index23.js +172 -167
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/mocks/labels.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/util/dist/lib/groupCollapse.js +17 -8
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
|
@@ -8,30 +8,28 @@ import { useMailboxAddress as ee } from "../../../../shared/data-access/dist/lib
|
|
|
8
8
|
import { Scope as n } from "../../../../shared/data-access/dist/lib/scopes.js";
|
|
9
9
|
import "../../../../shared/data-access/dist/index.js";
|
|
10
10
|
import "../../../../shared/ui/dist/index.js";
|
|
11
|
-
import { useWidgetConfig as
|
|
11
|
+
import { useWidgetConfig as r, useWidgetInitStaleForToken as te } from "../../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
12
12
|
import "../../../../shared/feature/dist/index.js";
|
|
13
|
-
import { BillDecisionDialog as
|
|
14
|
-
import { BillDuplicateIcon as
|
|
13
|
+
import { BillDecisionDialog as i } from "../../../ui/dist/index4.js";
|
|
14
|
+
import { BillDuplicateIcon as ne } from "../../../ui/dist/index6.js";
|
|
15
15
|
import "../../../ui/dist/index.js";
|
|
16
|
-
import { AddBillDialog as
|
|
17
|
-
import { BILL_STATUS_BADGE_LABELS_EN as a } from "../../../../shared/document-status/ui/dist/index2.js";
|
|
18
|
-
import "../../../../shared/document-status/ui/dist/index.js";
|
|
16
|
+
import { AddBillDialog as a } from "../../ui/dist/index6.js";
|
|
19
17
|
import { BillsScreen as o } from "../../ui/dist/index23.js";
|
|
20
18
|
import "../../ui/dist/index.js";
|
|
21
19
|
import { BILL_QUEUE_ORDER as s, BillQueue as c } from "./index5.js";
|
|
22
20
|
import { BILLS_TAB_LABELS_EN as l } from "./index7.js";
|
|
23
|
-
import { BillDuplicateView as u, useBillsTable as
|
|
24
|
-
import { useDuplicateBillsCount as
|
|
25
|
-
import { formatBillQueueBadge as
|
|
21
|
+
import { BillDuplicateView as u, useBillsTable as re } from "./index17.js";
|
|
22
|
+
import { useDuplicateBillsCount as ie } from "./index2.js";
|
|
23
|
+
import { formatBillQueueBadge as ae } from "./index3.js";
|
|
26
24
|
import { copyTextToClipboard as d } from "./index6.js";
|
|
27
25
|
import { billsTableCellTestIds as f } from "./index8.js";
|
|
28
|
-
import {
|
|
26
|
+
import { useAssignedToMeCount as p } from "./index9.js";
|
|
29
27
|
import { useBillSummaryCards as m } from "./index11.js";
|
|
30
28
|
import { useCallback as h, useImperativeHandle as g, useMemo as _, useState as v } from "react";
|
|
31
|
-
import { Fragment as
|
|
29
|
+
import { Fragment as oe, jsx as y, jsxs as se } from "react/jsx-runtime";
|
|
32
30
|
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index18.js
|
|
33
|
-
var
|
|
34
|
-
function b({ labels: b, onOpenBill:
|
|
31
|
+
var ce = () => void 0;
|
|
32
|
+
function b({ labels: b, onOpenBill: le, onEnterManually: ue, onFilesSelected: de, maxFiles: x, headerActionContainer: fe, selectedSummaryCard: pe, onSummaryCardChange: me, ref: he }) {
|
|
35
33
|
let S = _(() => ({
|
|
36
34
|
...l,
|
|
37
35
|
...b,
|
|
@@ -83,6 +81,10 @@ function b({ labels: b, onOpenBill: ue, onEnterManually: de, onFilesSelected: fe
|
|
|
83
81
|
...l.duplicatesEmptyState,
|
|
84
82
|
...b?.duplicatesEmptyState
|
|
85
83
|
},
|
|
84
|
+
duplicateStatusCount: {
|
|
85
|
+
...l.duplicateStatusCount,
|
|
86
|
+
...b?.duplicateStatusCount
|
|
87
|
+
},
|
|
86
88
|
queueEmptyStates: s.reduce((e, t) => ({
|
|
87
89
|
...e,
|
|
88
90
|
[t]: {
|
|
@@ -90,10 +92,7 @@ function b({ labels: b, onOpenBill: ue, onEnterManually: de, onFilesSelected: fe
|
|
|
90
92
|
...b?.queueEmptyStates?.[t]
|
|
91
93
|
}
|
|
92
94
|
}), {})
|
|
93
|
-
}), [b]), [
|
|
94
|
-
...a,
|
|
95
|
-
...P
|
|
96
|
-
}), [P]), I = _(() => ({
|
|
95
|
+
}), [b]), [ge, C] = v(!1), [w, T] = v(u.AllBills), { initResponse: E } = r(), D = te(), O = t(E?.scopes, [n.PayableReadOrg]), k = t(E?.scopes, [n.PayableWriteOrg]), A = !E || O, j = !E || k, M = E && !D ? t(E.scopes, [n.PayablePayOrg]) : void 0, N = t(E?.scopes, [n.CounterpartReadOrg]), P = _(() => ({
|
|
97
96
|
menuTrigger: S.duplicateMenuTrigger,
|
|
98
97
|
notDuplicateAction: S.duplicateNotDuplicateAction,
|
|
99
98
|
notDuplicateConfirmTitle: S.duplicateNotDuplicateConfirmTitle,
|
|
@@ -123,7 +122,7 @@ function b({ labels: b, onOpenBill: ue, onEnterManually: de, onFilesSelected: fe
|
|
|
123
122
|
showMore: S.duplicateShowMore,
|
|
124
123
|
showLess: S.duplicateShowLess,
|
|
125
124
|
statusSummary: S.duplicateStatusSummary,
|
|
126
|
-
|
|
125
|
+
statusCount: S.duplicateStatusCount,
|
|
127
126
|
pageInfo: S.duplicatePageInfo
|
|
128
127
|
}), [
|
|
129
128
|
S.duplicateMenuTrigger,
|
|
@@ -155,167 +154,167 @@ function b({ labels: b, onOpenBill: ue, onEnterManually: de, onFilesSelected: fe
|
|
|
155
154
|
S.duplicateShowMore,
|
|
156
155
|
S.duplicateShowLess,
|
|
157
156
|
S.duplicateStatusSummary,
|
|
158
|
-
|
|
157
|
+
S.duplicateStatusCount,
|
|
159
158
|
S.duplicatePageInfo
|
|
160
|
-
]),
|
|
159
|
+
]), F = t(E?.scopes, [n.MailboxReadOrg]), { mailboxAddress: I } = ee({
|
|
161
160
|
relatedObjectType: "payable",
|
|
162
|
-
enabled:
|
|
163
|
-
}),
|
|
161
|
+
enabled: F && !D
|
|
162
|
+
}), L = F ? I : void 0, R = re({
|
|
164
163
|
enabled: A,
|
|
165
164
|
canPay: M,
|
|
166
165
|
canReadVendors: N,
|
|
167
166
|
isVendorFilterPaused: D,
|
|
168
167
|
filterLabels: S.filters,
|
|
169
|
-
onOpenBill:
|
|
168
|
+
onOpenBill: le ?? ce,
|
|
170
169
|
duplicateRowNote: S.duplicateRowNote,
|
|
171
170
|
attachmentLabel: S.attachmentIndicator,
|
|
172
|
-
duplicateGroupLabels:
|
|
171
|
+
duplicateGroupLabels: P,
|
|
173
172
|
canManageDuplicates: j,
|
|
174
173
|
duplicateView: w,
|
|
175
174
|
scheduledRelativeDayLabels: S.scheduledRelativeDay,
|
|
176
175
|
dueDateLabels: S.dueDate,
|
|
177
|
-
selectedSummaryCard:
|
|
178
|
-
onSummaryCardChange:
|
|
179
|
-
}),
|
|
176
|
+
selectedSummaryCard: pe,
|
|
177
|
+
onSummaryCardChange: me
|
|
178
|
+
}), z = ie({ enabled: A }), B = w === u.PossibleDuplicates, V = p({
|
|
180
179
|
enabled: A,
|
|
181
180
|
canPay: M
|
|
182
|
-
}),
|
|
181
|
+
}), H = m({
|
|
183
182
|
enabled: A,
|
|
184
183
|
labels: S.summaryCards,
|
|
185
|
-
selectedCard:
|
|
186
|
-
}),
|
|
184
|
+
selectedCard: R.summaryCard
|
|
185
|
+
}), _e = _(() => s.map((e) => ({
|
|
187
186
|
id: e,
|
|
188
187
|
label: S.queues[e],
|
|
189
|
-
badge:
|
|
190
|
-
})), [S.queues,
|
|
191
|
-
|
|
192
|
-
}, [
|
|
193
|
-
T(u.AllBills),
|
|
194
|
-
}, [
|
|
195
|
-
T(u.AllBills),
|
|
196
|
-
}, [
|
|
197
|
-
|
|
198
|
-
let
|
|
188
|
+
badge: e === c.AssignedToMe ? ae(V) : void 0
|
|
189
|
+
})), [S.queues, V]), { clearQueryConstraints: U, onFilterTabChange: W } = R, ve = h(() => {
|
|
190
|
+
U(), T(u.PossibleDuplicates);
|
|
191
|
+
}, [U]), G = h(() => {
|
|
192
|
+
T(u.AllBills), W(c.All);
|
|
193
|
+
}, [W]), ye = h((e) => {
|
|
194
|
+
T(u.AllBills), W(e);
|
|
195
|
+
}, [W]), be = !z.isError && z.groupCount > 0, K = j && be, xe = !z.isLoading && !z.isError && z.count === 0;
|
|
196
|
+
B && (xe || R.summaryCard) && G();
|
|
197
|
+
let Se = K ? [{
|
|
199
198
|
id: "duplicates",
|
|
200
|
-
label: S.attentionDuplicates(
|
|
199
|
+
label: S.attentionDuplicates(z.groupCount, z.isCapped),
|
|
201
200
|
tone: "warning",
|
|
202
|
-
icon: /* @__PURE__ */ y(
|
|
203
|
-
pressed:
|
|
204
|
-
onToggle:
|
|
205
|
-
}] : [], q = b?.screen,
|
|
201
|
+
icon: /* @__PURE__ */ y(ne, {}),
|
|
202
|
+
pressed: B,
|
|
203
|
+
onToggle: B ? G : ve
|
|
204
|
+
}] : [], q = b?.screen, Ce = _(() => ({
|
|
206
205
|
...q,
|
|
207
206
|
createButton: S.createButton,
|
|
208
207
|
addBill: {
|
|
209
208
|
...q?.addBill,
|
|
210
209
|
heading: S.nonEmptyHeading
|
|
211
210
|
},
|
|
212
|
-
...
|
|
211
|
+
...B ? {
|
|
213
212
|
columnAddedOn: S.duplicateColumnCreated,
|
|
214
213
|
columnAmountDue: S.duplicateColumnAmount
|
|
215
214
|
} : {}
|
|
216
215
|
}), [
|
|
217
|
-
|
|
216
|
+
B,
|
|
218
217
|
S.duplicateColumnCreated,
|
|
219
218
|
S.duplicateColumnAmount,
|
|
220
219
|
q,
|
|
221
220
|
S.createButton,
|
|
222
221
|
S.nonEmptyHeading
|
|
223
|
-
]),
|
|
224
|
-
...
|
|
222
|
+
]), we = _(() => ({
|
|
223
|
+
...R.filterBarProps,
|
|
225
224
|
labels: S.filterBar
|
|
226
|
-
}), [
|
|
227
|
-
C(!1),
|
|
225
|
+
}), [R.filterBarProps, S.filterBar]), J = () => {
|
|
226
|
+
C(!1), ue?.();
|
|
228
227
|
}, Y = (e) => {
|
|
229
|
-
C(!1),
|
|
230
|
-
}, X =
|
|
231
|
-
emailAddress:
|
|
228
|
+
C(!1), de?.(e);
|
|
229
|
+
}, X = L ? {
|
|
230
|
+
emailAddress: L,
|
|
232
231
|
onCopyEmail: async () => {
|
|
233
|
-
|
|
232
|
+
L && (await d(L) ? e.success(S.emailCopiedToast) : e.error(S.emailCopyFailedToast));
|
|
234
233
|
}
|
|
235
234
|
} : {
|
|
236
235
|
emailAddress: void 0,
|
|
237
236
|
onCopyEmail: void 0
|
|
238
|
-
}, { showVendorBills: Z } =
|
|
237
|
+
}, { showVendorBills: Z } = R, Q = h((e) => {
|
|
239
238
|
T(u.AllBills), Z(e);
|
|
240
239
|
}, [Z]), $ = h(() => C(!0), []);
|
|
241
|
-
return g(
|
|
240
|
+
return g(he, () => ({
|
|
242
241
|
showVendorBills: Q,
|
|
243
242
|
openAddBill: $
|
|
244
|
-
}), [Q, $]), /* @__PURE__ */
|
|
243
|
+
}), [Q, $]), /* @__PURE__ */ se(oe, { children: [
|
|
245
244
|
/* @__PURE__ */ y(o, {
|
|
246
|
-
rows:
|
|
247
|
-
isLoading:
|
|
248
|
-
isError:
|
|
249
|
-
onRetry:
|
|
250
|
-
sorting:
|
|
251
|
-
onSortingChange:
|
|
252
|
-
pageSize:
|
|
253
|
-
onPageSizeChange:
|
|
254
|
-
pageSizeOptions:
|
|
255
|
-
hasNextPage:
|
|
256
|
-
hasPrevPage:
|
|
257
|
-
onNextPage:
|
|
258
|
-
onPrevPage:
|
|
259
|
-
filterTabs:
|
|
260
|
-
selectedFilterTabId:
|
|
261
|
-
onFilterTabChange:
|
|
262
|
-
searchValue:
|
|
263
|
-
onSearchChange:
|
|
264
|
-
filters:
|
|
265
|
-
visibleColumns:
|
|
266
|
-
keepsColumnOrder:
|
|
267
|
-
isSortable:
|
|
268
|
-
pageInfo:
|
|
245
|
+
rows: R.rows,
|
|
246
|
+
isLoading: R.isLoading || !E,
|
|
247
|
+
isError: R.isError,
|
|
248
|
+
onRetry: R.onRetry,
|
|
249
|
+
sorting: R.sorting,
|
|
250
|
+
onSortingChange: R.onSortingChange,
|
|
251
|
+
pageSize: R.pageSize,
|
|
252
|
+
onPageSizeChange: R.onPageSizeChange,
|
|
253
|
+
pageSizeOptions: R.pageSizeOptions,
|
|
254
|
+
hasNextPage: R.hasNextPage,
|
|
255
|
+
hasPrevPage: R.hasPrevPage,
|
|
256
|
+
onNextPage: R.onNextPage,
|
|
257
|
+
onPrevPage: R.onPrevPage,
|
|
258
|
+
filterTabs: _e,
|
|
259
|
+
selectedFilterTabId: R.selectedFilterTabId,
|
|
260
|
+
onFilterTabChange: ye,
|
|
261
|
+
searchValue: R.searchValue,
|
|
262
|
+
onSearchChange: R.onSearchChange,
|
|
263
|
+
filters: we,
|
|
264
|
+
visibleColumns: R.visibleColumns,
|
|
265
|
+
keepsColumnOrder: R.keepsColumnOrder,
|
|
266
|
+
isSortable: R.isSortable,
|
|
267
|
+
pageInfo: R.pageInfo,
|
|
269
268
|
cellTestIds: f,
|
|
270
|
-
isSearchActive:
|
|
271
|
-
showAddPanelWhenEmpty:
|
|
272
|
-
emptyState:
|
|
269
|
+
isSearchActive: R.isSearchActive,
|
|
270
|
+
showAddPanelWhenEmpty: R.showAddPanelWhenEmpty,
|
|
271
|
+
emptyState: B ? S.duplicatesEmptyState : S.queueEmptyStates[R.selectedFilterTabId],
|
|
273
272
|
onCreateClick: j ? () => C(!0) : void 0,
|
|
274
|
-
headerActionContainer:
|
|
273
|
+
headerActionContainer: fe,
|
|
275
274
|
onEnterManually: j ? J : void 0,
|
|
276
275
|
onFilesSelected: j ? Y : void 0,
|
|
277
276
|
maxFiles: x,
|
|
278
277
|
...X,
|
|
279
|
-
summaryCards:
|
|
280
|
-
view:
|
|
278
|
+
summaryCards: H ? {
|
|
279
|
+
view: H,
|
|
281
280
|
labels: {
|
|
282
281
|
group: S.summaryCards.group,
|
|
283
282
|
loading: S.summaryCards.loading,
|
|
284
283
|
info: S.summaryCards.info
|
|
285
284
|
},
|
|
286
|
-
onSelect:
|
|
285
|
+
onSelect: R.onSummaryCardSelect
|
|
287
286
|
} : void 0,
|
|
288
287
|
attentionStrip: {
|
|
289
288
|
label: S.attentionStripLabel,
|
|
290
|
-
items:
|
|
289
|
+
items: Se
|
|
291
290
|
},
|
|
292
|
-
attentionView:
|
|
291
|
+
attentionView: B ? {
|
|
293
292
|
backLabel: S.queues[c.All],
|
|
294
293
|
backAccessibleLabel: S.attentionBackAccessible,
|
|
295
294
|
title: S.duplicatesViewTitle,
|
|
296
295
|
tone: "warning",
|
|
297
|
-
onBack:
|
|
296
|
+
onBack: G
|
|
298
297
|
} : void 0,
|
|
299
|
-
labels:
|
|
298
|
+
labels: Ce
|
|
300
299
|
}),
|
|
301
|
-
/* @__PURE__ */ y(
|
|
302
|
-
open:
|
|
303
|
-
copy:
|
|
304
|
-
onConfirm:
|
|
305
|
-
onCancel:
|
|
306
|
-
isPending:
|
|
307
|
-
labels: { cancelButton:
|
|
300
|
+
/* @__PURE__ */ y(i, {
|
|
301
|
+
open: R.cancelConfirmation.open,
|
|
302
|
+
copy: R.cancelConfirmation.copy,
|
|
303
|
+
onConfirm: R.cancelConfirmation.onConfirm,
|
|
304
|
+
onCancel: R.cancelConfirmation.onCancel,
|
|
305
|
+
isPending: R.cancelConfirmation.isPending,
|
|
306
|
+
labels: { cancelButton: R.cancelConfirmation.cancelButtonLabel }
|
|
308
307
|
}),
|
|
309
|
-
/* @__PURE__ */ y(
|
|
310
|
-
open:
|
|
311
|
-
copy:
|
|
312
|
-
onConfirm:
|
|
313
|
-
onCancel:
|
|
314
|
-
isPending:
|
|
315
|
-
labels: { cancelButton:
|
|
308
|
+
/* @__PURE__ */ y(i, {
|
|
309
|
+
open: R.keepConfirmation.open,
|
|
310
|
+
copy: R.keepConfirmation.copy,
|
|
311
|
+
onConfirm: R.keepConfirmation.onConfirm,
|
|
312
|
+
onCancel: R.keepConfirmation.onCancel,
|
|
313
|
+
isPending: R.keepConfirmation.isPending,
|
|
314
|
+
labels: { cancelButton: R.keepConfirmation.cancelButtonLabel }
|
|
316
315
|
}),
|
|
317
|
-
j ? /* @__PURE__ */ y(
|
|
318
|
-
open:
|
|
316
|
+
j ? /* @__PURE__ */ y(a, {
|
|
317
|
+
open: ge,
|
|
319
318
|
onOpenChange: C,
|
|
320
319
|
onFilesSelected: Y,
|
|
321
320
|
maxFiles: x,
|
|
@@ -324,7 +323,7 @@ function b({ labels: b, onOpenBill: ue, onEnterManually: de, onFilesSelected: fe
|
|
|
324
323
|
dialogLabels: b?.addBillDialog?.dialog,
|
|
325
324
|
labels: {
|
|
326
325
|
...b?.addBillDialog?.panel,
|
|
327
|
-
heading:
|
|
326
|
+
heading: R.hasAnyBills ? S.nonEmptyHeading : S.emptyHeading
|
|
328
327
|
}
|
|
329
328
|
}) : null
|
|
330
329
|
] });
|
|
@@ -1,133 +1,75 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { BillColumn as
|
|
1
|
+
import { BILL_STATUS_FILTER_ORDER as e, BillStatusFilter as t, billStatusFilterApiValues as n } from "./index4.js";
|
|
2
|
+
import { BillColumn as r } from "../../ui/dist/index22.js";
|
|
3
3
|
import "../../ui/dist/index.js";
|
|
4
4
|
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index5.js
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
5
|
+
var i = {
|
|
6
|
+
All: "all",
|
|
7
|
+
AssignedToMe: "assigned_to_me"
|
|
8
|
+
}, a = /* @__PURE__ */ new Set([
|
|
9
|
+
t.Draft,
|
|
10
|
+
t.ReadyToSubmit,
|
|
11
|
+
t.PendingApproval,
|
|
12
|
+
t.Rejected
|
|
13
|
+
]);
|
|
14
|
+
function o(n, r) {
|
|
15
|
+
return n === i.All ? e : e.filter((e) => a.has(e) || r && e === t.ReadyToPay);
|
|
16
|
+
}
|
|
17
|
+
function s(e, t) {
|
|
13
18
|
switch (e) {
|
|
14
|
-
case
|
|
15
|
-
status__in:
|
|
16
|
-
"draft",
|
|
17
|
-
"new",
|
|
18
|
-
"approve_in_progress",
|
|
19
|
-
...t ? i : []
|
|
20
|
-
],
|
|
19
|
+
case i.AssignedToMe: return {
|
|
20
|
+
status__in: n(o(e, t)),
|
|
21
21
|
has_scheduled_payment: !1,
|
|
22
22
|
approval_queue: "mine"
|
|
23
23
|
};
|
|
24
|
-
case
|
|
25
|
-
status__in: ["approve_in_progress", ...t ? [] : i],
|
|
26
|
-
has_scheduled_payment: !1,
|
|
27
|
-
approval_queue: "others"
|
|
28
|
-
};
|
|
29
|
-
case r.Scheduled: return {
|
|
30
|
-
status__in: [
|
|
31
|
-
"new",
|
|
32
|
-
"approve_in_progress",
|
|
33
|
-
...i
|
|
34
|
-
],
|
|
35
|
-
has_scheduled_payment: !0
|
|
36
|
-
};
|
|
37
|
-
case r.Paid: return { status__in: ["paid"] };
|
|
38
|
-
case r.All: return {};
|
|
24
|
+
case i.All: return {};
|
|
39
25
|
}
|
|
40
26
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
n.Attachment,
|
|
55
|
-
n.IssueDate,
|
|
56
|
-
n.DueDate,
|
|
57
|
-
n.Status,
|
|
58
|
-
n.AmountDue,
|
|
59
|
-
n.TotalAmount,
|
|
60
|
-
n.AddedOn
|
|
27
|
+
var c = i.All, l = [i.All, i.AssignedToMe], u = {
|
|
28
|
+
[i.All]: [
|
|
29
|
+
r.Vendor,
|
|
30
|
+
r.InvoiceNumber,
|
|
31
|
+
r.Attachment,
|
|
32
|
+
r.IssueDate,
|
|
33
|
+
r.DueDate,
|
|
34
|
+
r.ScheduledDate,
|
|
35
|
+
r.Status,
|
|
36
|
+
r.AmountDue,
|
|
37
|
+
r.AmountPaid,
|
|
38
|
+
r.TotalAmount,
|
|
39
|
+
r.AddedOn
|
|
61
40
|
],
|
|
62
|
-
[
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
],
|
|
73
|
-
[r.Scheduled]: [
|
|
74
|
-
n.Vendor,
|
|
75
|
-
n.InvoiceNumber,
|
|
76
|
-
n.Attachment,
|
|
77
|
-
n.IssueDate,
|
|
78
|
-
n.DueDate,
|
|
79
|
-
n.ScheduledDate,
|
|
80
|
-
n.Status,
|
|
81
|
-
n.AmountScheduled,
|
|
82
|
-
n.TotalAmount,
|
|
83
|
-
n.AddedOn
|
|
84
|
-
],
|
|
85
|
-
[r.Paid]: [
|
|
86
|
-
n.Vendor,
|
|
87
|
-
n.InvoiceNumber,
|
|
88
|
-
n.Attachment,
|
|
89
|
-
n.IssueDate,
|
|
90
|
-
n.DueDate,
|
|
91
|
-
n.PaidDate,
|
|
92
|
-
n.Status,
|
|
93
|
-
n.AmountPaid,
|
|
94
|
-
n.TotalAmount,
|
|
95
|
-
n.AddedOn
|
|
96
|
-
],
|
|
97
|
-
[r.All]: [
|
|
98
|
-
n.Vendor,
|
|
99
|
-
n.InvoiceNumber,
|
|
100
|
-
n.Attachment,
|
|
101
|
-
n.IssueDate,
|
|
102
|
-
n.DueDate,
|
|
103
|
-
n.ScheduledDate,
|
|
104
|
-
n.Status,
|
|
105
|
-
n.AmountDue,
|
|
106
|
-
n.AmountPaid,
|
|
107
|
-
n.TotalAmount,
|
|
108
|
-
n.AddedOn
|
|
41
|
+
[i.AssignedToMe]: [
|
|
42
|
+
r.Vendor,
|
|
43
|
+
r.InvoiceNumber,
|
|
44
|
+
r.Attachment,
|
|
45
|
+
r.IssueDate,
|
|
46
|
+
r.DueDate,
|
|
47
|
+
r.Status,
|
|
48
|
+
r.AmountDue,
|
|
49
|
+
r.TotalAmount,
|
|
50
|
+
r.AddedOn
|
|
109
51
|
]
|
|
110
52
|
};
|
|
111
|
-
function
|
|
112
|
-
return
|
|
53
|
+
function d(e) {
|
|
54
|
+
return u[e];
|
|
113
55
|
}
|
|
114
|
-
var
|
|
56
|
+
var f = {
|
|
115
57
|
vendorLabel: "counterpart_name",
|
|
116
58
|
issueDateLabel: "issued_at",
|
|
117
59
|
dueDateLabel: "due_date",
|
|
118
60
|
scheduledDateLabel: "scheduled_payment_date",
|
|
119
61
|
addedOnLabel: "created_at"
|
|
120
|
-
},
|
|
121
|
-
[
|
|
122
|
-
[
|
|
123
|
-
[
|
|
124
|
-
[
|
|
125
|
-
[
|
|
62
|
+
}, p = {
|
|
63
|
+
[r.Vendor]: "vendorLabel",
|
|
64
|
+
[r.IssueDate]: "issueDateLabel",
|
|
65
|
+
[r.DueDate]: "dueDateLabel",
|
|
66
|
+
[r.ScheduledDate]: "scheduledDateLabel",
|
|
67
|
+
[r.AddedOn]: "addedOnLabel"
|
|
126
68
|
};
|
|
127
|
-
function p(e) {
|
|
128
|
-
return f[e];
|
|
129
|
-
}
|
|
130
69
|
function m(e) {
|
|
131
|
-
|
|
70
|
+
return p[e];
|
|
71
|
+
}
|
|
72
|
+
function h(e) {
|
|
73
|
+
if (e) return f[e];
|
|
132
74
|
}
|
|
133
|
-
export {
|
|
75
|
+
export { u as BILL_QUEUE_COLUMNS, l as BILL_QUEUE_ORDER, f as BILL_SORT_FIELDS, i as BillQueue, c as DEFAULT_BILL_QUEUE, d as billQueueColumns, s as billQueueFilters, o as billQueueStatusFilters, m as billSortColumnId, h as billSortField };
|
|
@@ -3,31 +3,16 @@ import "../../../util/dist/index.js";
|
|
|
3
3
|
import { BillQueue as t } from "./index5.js";
|
|
4
4
|
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index7.js
|
|
5
5
|
var n = {
|
|
6
|
-
[t.
|
|
7
|
-
[t.
|
|
8
|
-
[t.Scheduled]: "Scheduled",
|
|
9
|
-
[t.Paid]: "Paid",
|
|
10
|
-
[t.All]: "All bills"
|
|
6
|
+
[t.All]: "All bills",
|
|
7
|
+
[t.AssignedToMe]: "Assigned to me"
|
|
11
8
|
}, r = {
|
|
12
|
-
[t.AssignedToMe]: {
|
|
13
|
-
title: "Nothing needs you",
|
|
14
|
-
description: "Bills you need to submit, approve, or pay appear here."
|
|
15
|
-
},
|
|
16
|
-
[t.Pending]: {
|
|
17
|
-
title: "Nothing waiting on others",
|
|
18
|
-
description: "Bills appear here while they wait on someone else to approve or pay them."
|
|
19
|
-
},
|
|
20
|
-
[t.Scheduled]: {
|
|
21
|
-
title: "No scheduled bills",
|
|
22
|
-
description: "Bills appear here once a payment date is set for them."
|
|
23
|
-
},
|
|
24
|
-
[t.Paid]: {
|
|
25
|
-
title: "No paid bills",
|
|
26
|
-
description: "Bills appear here once their payment has gone out."
|
|
27
|
-
},
|
|
28
9
|
[t.All]: {
|
|
29
10
|
title: "No bills",
|
|
30
11
|
description: "Bills appear here as soon as they are added."
|
|
12
|
+
},
|
|
13
|
+
[t.AssignedToMe]: {
|
|
14
|
+
title: "Nothing needs you",
|
|
15
|
+
description: "Bills you need to submit, approve, or pay appear here."
|
|
31
16
|
}
|
|
32
17
|
}, i = (e, t, n) => `${e} ${e === 1 ? t : n}`, a = (e) => e.length > 2 ? `${e.slice(0, -1).join(", ")}, and ${e[e.length - 1]}` : e.join(" and "), o = {
|
|
33
18
|
group: "Bill totals",
|
|
@@ -96,9 +81,20 @@ var n = {
|
|
|
96
81
|
duplicateColumnCreated: "Created",
|
|
97
82
|
duplicateShowMore: (e) => `Show ${e} more`,
|
|
98
83
|
duplicateShowLess: "Show less",
|
|
84
|
+
duplicateStatusCount: {
|
|
85
|
+
draft: (e) => i(e, "Draft", "Drafts"),
|
|
86
|
+
ready_to_submit: (e) => `${e} Ready to submit`,
|
|
87
|
+
pending_approval: (e) => `${e} Pending review`,
|
|
88
|
+
ready_to_pay: (e) => `${e} Ready to pay`,
|
|
89
|
+
scheduled: (e) => `${e} Scheduled`,
|
|
90
|
+
paid: (e) => `${e} Paid`,
|
|
91
|
+
canceled: (e) => `${e} Cancelled`,
|
|
92
|
+
rejected: (e) => `${e} Rejected`,
|
|
93
|
+
unknown: (e) => `${e} Unknown`
|
|
94
|
+
},
|
|
99
95
|
duplicateStatusSummary: (e) => e.join(", "),
|
|
100
96
|
duplicateColumnAmount: "Amount",
|
|
101
|
-
duplicatePageInfo: ({ billCount: e,
|
|
97
|
+
duplicatePageInfo: ({ billCount: e, groupCount: t }) => `${i(e, "bill", "bills")} across ${i(t, "duplicate group", "duplicate groups")}`,
|
|
102
98
|
attachmentIndicator: "Has an attachment",
|
|
103
99
|
scheduledRelativeDay: {
|
|
104
100
|
today: "Today",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
5
|
+
import { BillQueue as e, billQueueFilters as t } from "./index5.js";
|
|
6
6
|
import { usePayablesCountQueries as n } from "../../data-access/dist/index3.js";
|
|
7
7
|
import "../../data-access/dist/index.js";
|
|
8
8
|
import { useMemo as r, useState as i } from "react";
|
|
@@ -10,10 +10,10 @@ import { useMemo as r, useState as i } from "react";
|
|
|
10
10
|
function a({ enabled: a = !0, canPay: o } = {}) {
|
|
11
11
|
let [s, c] = i(o);
|
|
12
12
|
o !== void 0 && s !== o && c(o);
|
|
13
|
-
let l = o ?? s, u = r(() =>
|
|
13
|
+
let l = o ?? s, u = r(() => [t(e.AssignedToMe, l ?? !1)], [l]);
|
|
14
|
+
return n({
|
|
14
15
|
filters: u,
|
|
15
16
|
enabled: a && o !== void 0
|
|
16
|
-
});
|
|
17
|
-
return r(() => Object.fromEntries(e.map((e, t) => [e, d[t]?.count])), [d]);
|
|
17
|
+
})[0]?.count;
|
|
18
18
|
}
|
|
19
|
-
export { a as
|
|
19
|
+
export { a as useAssignedToMeCount };
|