@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.
@@ -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 te, useWidgetInitStaleForToken as ne } from "../../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
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 r } from "../../../ui/dist/index4.js";
14
- import { BillDuplicateIcon as re } from "../../../ui/dist/index6.js";
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 i } from "../../ui/dist/index6.js";
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 ie } from "./index17.js";
24
- import { useDuplicateBillsCount as ae } from "./index2.js";
25
- import { formatBillQueueBadge as oe } from "./index3.js";
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 { useBillQueueCounts as p } from "./index9.js";
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 se, jsx as y, jsxs as ce } from "react/jsx-runtime";
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 le = () => void 0;
34
- function b({ labels: b, onOpenBill: ue, onEnterManually: de, onFilesSelected: fe, maxFiles: x, headerActionContainer: pe, selectedSummaryCard: me, onSummaryCardChange: he, ref: ge }) {
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]), [_e, C] = v(!1), [w, T] = v(u.AllBills), { initResponse: E } = te(), D = ne(), 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 = b?.screen?.statusBadge, F = _(() => ({
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
- statusLabels: F,
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
- F,
157
+ S.duplicateStatusCount,
159
158
  S.duplicatePageInfo
160
- ]), L = t(E?.scopes, [n.MailboxReadOrg]), { mailboxAddress: ve } = ee({
159
+ ]), F = t(E?.scopes, [n.MailboxReadOrg]), { mailboxAddress: I } = ee({
161
160
  relatedObjectType: "payable",
162
- enabled: L && !D
163
- }), R = L ? ve : void 0, z = ie({
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: ue ?? le,
168
+ onOpenBill: le ?? ce,
170
169
  duplicateRowNote: S.duplicateRowNote,
171
170
  attachmentLabel: S.attachmentIndicator,
172
- duplicateGroupLabels: I,
171
+ duplicateGroupLabels: P,
173
172
  canManageDuplicates: j,
174
173
  duplicateView: w,
175
174
  scheduledRelativeDayLabels: S.scheduledRelativeDay,
176
175
  dueDateLabels: S.dueDate,
177
- selectedSummaryCard: me,
178
- onSummaryCardChange: he
179
- }), B = ae({ enabled: A }), V = w === u.PossibleDuplicates, H = p({
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
- }), U = m({
181
+ }), H = m({
183
182
  enabled: A,
184
183
  labels: S.summaryCards,
185
- selectedCard: z.summaryCard
186
- }), ye = _(() => s.map((e) => ({
184
+ selectedCard: R.summaryCard
185
+ }), _e = _(() => s.map((e) => ({
187
186
  id: e,
188
187
  label: S.queues[e],
189
- badge: oe(H[e])
190
- })), [S.queues, H]), { clearQueryConstraints: W, onFilterTabChange: G } = z, be = h(() => {
191
- W(), T(u.PossibleDuplicates);
192
- }, [W]), K = h(() => {
193
- T(u.AllBills), G(c.All);
194
- }, [G]), xe = h((e) => {
195
- T(u.AllBills), G(e);
196
- }, [G]), Se = !B.isError && B.groupCount > 0, Ce = j && Se, we = !B.isLoading && !B.isError && B.count === 0;
197
- V && (we || z.summaryCard) && K();
198
- let Te = Ce ? [{
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(B.groupCount, B.isCapped),
199
+ label: S.attentionDuplicates(z.groupCount, z.isCapped),
201
200
  tone: "warning",
202
- icon: /* @__PURE__ */ y(re, {}),
203
- pressed: V,
204
- onToggle: V ? K : be
205
- }] : [], q = b?.screen, Ee = _(() => ({
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
- ...V ? {
211
+ ...B ? {
213
212
  columnAddedOn: S.duplicateColumnCreated,
214
213
  columnAmountDue: S.duplicateColumnAmount
215
214
  } : {}
216
215
  }), [
217
- V,
216
+ B,
218
217
  S.duplicateColumnCreated,
219
218
  S.duplicateColumnAmount,
220
219
  q,
221
220
  S.createButton,
222
221
  S.nonEmptyHeading
223
- ]), De = _(() => ({
224
- ...z.filterBarProps,
222
+ ]), we = _(() => ({
223
+ ...R.filterBarProps,
225
224
  labels: S.filterBar
226
- }), [z.filterBarProps, S.filterBar]), J = () => {
227
- C(!1), de?.();
225
+ }), [R.filterBarProps, S.filterBar]), J = () => {
226
+ C(!1), ue?.();
228
227
  }, Y = (e) => {
229
- C(!1), fe?.(e);
230
- }, X = R ? {
231
- emailAddress: R,
228
+ C(!1), de?.(e);
229
+ }, X = L ? {
230
+ emailAddress: L,
232
231
  onCopyEmail: async () => {
233
- R && (await d(R) ? e.success(S.emailCopiedToast) : e.error(S.emailCopyFailedToast));
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 } = z, Q = h((e) => {
237
+ }, { showVendorBills: Z } = R, Q = h((e) => {
239
238
  T(u.AllBills), Z(e);
240
239
  }, [Z]), $ = h(() => C(!0), []);
241
- return g(ge, () => ({
240
+ return g(he, () => ({
242
241
  showVendorBills: Q,
243
242
  openAddBill: $
244
- }), [Q, $]), /* @__PURE__ */ ce(se, { children: [
243
+ }), [Q, $]), /* @__PURE__ */ se(oe, { children: [
245
244
  /* @__PURE__ */ y(o, {
246
- rows: z.rows,
247
- isLoading: z.isLoading || !E,
248
- isError: z.isError,
249
- onRetry: z.onRetry,
250
- sorting: z.sorting,
251
- onSortingChange: z.onSortingChange,
252
- pageSize: z.pageSize,
253
- onPageSizeChange: z.onPageSizeChange,
254
- pageSizeOptions: z.pageSizeOptions,
255
- hasNextPage: z.hasNextPage,
256
- hasPrevPage: z.hasPrevPage,
257
- onNextPage: z.onNextPage,
258
- onPrevPage: z.onPrevPage,
259
- filterTabs: ye,
260
- selectedFilterTabId: z.selectedFilterTabId,
261
- onFilterTabChange: xe,
262
- searchValue: z.searchValue,
263
- onSearchChange: z.onSearchChange,
264
- filters: De,
265
- visibleColumns: z.visibleColumns,
266
- keepsColumnOrder: z.keepsColumnOrder,
267
- isSortable: z.isSortable,
268
- pageInfo: z.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: z.isSearchActive,
271
- showAddPanelWhenEmpty: z.showAddPanelWhenEmpty,
272
- emptyState: V ? S.duplicatesEmptyState : S.queueEmptyStates[z.selectedFilterTabId],
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: pe,
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: U ? {
280
- view: U,
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: z.onSummaryCardSelect
285
+ onSelect: R.onSummaryCardSelect
287
286
  } : void 0,
288
287
  attentionStrip: {
289
288
  label: S.attentionStripLabel,
290
- items: Te
289
+ items: Se
291
290
  },
292
- attentionView: V ? {
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: K
296
+ onBack: G
298
297
  } : void 0,
299
- labels: Ee
298
+ labels: Ce
300
299
  }),
301
- /* @__PURE__ */ y(r, {
302
- open: z.cancelConfirmation.open,
303
- copy: z.cancelConfirmation.copy,
304
- onConfirm: z.cancelConfirmation.onConfirm,
305
- onCancel: z.cancelConfirmation.onCancel,
306
- isPending: z.cancelConfirmation.isPending,
307
- labels: { cancelButton: z.cancelConfirmation.cancelButtonLabel }
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(r, {
310
- open: z.keepConfirmation.open,
311
- copy: z.keepConfirmation.copy,
312
- onConfirm: z.keepConfirmation.onConfirm,
313
- onCancel: z.keepConfirmation.onCancel,
314
- isPending: z.keepConfirmation.isPending,
315
- labels: { cancelButton: z.keepConfirmation.cancelButtonLabel }
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(i, {
318
- open: _e,
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: z.hasAnyBills ? S.nonEmptyHeading : S.emptyHeading
326
+ heading: R.hasAnyBills ? S.nonEmptyHeading : S.emptyHeading
328
327
  }
329
328
  }) : null
330
329
  ] });
@@ -1,133 +1,75 @@
1
- import { BillStatusFilter as e, billStatusFilterApiValues as t } from "./index4.js";
2
- import { BillColumn as n } from "../../ui/dist/index22.js";
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 r = {
6
- AssignedToMe: "assigned_to_me",
7
- Pending: "pending",
8
- Scheduled: "scheduled",
9
- Paid: "paid",
10
- All: "all"
11
- }, i = t([e.ReadyToPay]);
12
- function a(e, t) {
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 r.AssignedToMe: return {
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 r.Pending: return {
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
- function o(e) {
42
- return e === r.Pending || e === r.AssignedToMe;
43
- }
44
- var s = r.AssignedToMe, c = [
45
- r.AssignedToMe,
46
- r.Pending,
47
- r.Scheduled,
48
- r.Paid,
49
- r.All
50
- ], l = {
51
- [r.AssignedToMe]: [
52
- n.Vendor,
53
- n.InvoiceNumber,
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
- [r.Pending]: [
63
- n.Vendor,
64
- n.InvoiceNumber,
65
- n.Attachment,
66
- n.IssueDate,
67
- n.DueDate,
68
- n.Status,
69
- n.AmountDue,
70
- n.TotalAmount,
71
- n.AddedOn
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 u(e) {
112
- return l[e];
53
+ function d(e) {
54
+ return u[e];
113
55
  }
114
- var d = {
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
- }, f = {
121
- [n.Vendor]: "vendorLabel",
122
- [n.IssueDate]: "issueDateLabel",
123
- [n.DueDate]: "dueDateLabel",
124
- [n.ScheduledDate]: "scheduledDateLabel",
125
- [n.AddedOn]: "addedOnLabel"
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
- if (e) return d[e];
70
+ return p[e];
71
+ }
72
+ function h(e) {
73
+ if (e) return f[e];
132
74
  }
133
- export { l as BILL_QUEUE_COLUMNS, c as BILL_QUEUE_ORDER, d as BILL_SORT_FIELDS, r as BillQueue, s as DEFAULT_BILL_QUEUE, u as billQueueColumns, a as billQueueFilters, o as billQueueOffersAddPanel, p as billSortColumnId, m as billSortField };
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.AssignedToMe]: "Assigned to me",
7
- [t.Pending]: "Pending",
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, invoiceCount: t }) => `${e} ${e === 1 ? "bill" : "bills"} across ${t} ${t === 1 ? "invoice" : "invoices"}`,
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 { BILL_QUEUE_ORDER as e, billQueueFilters as t } from "./index5.js";
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(() => e.map((e) => t(e, l ?? !1)), [l]), d = n({
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 useBillQueueCounts };
19
+ export { a as useAssignedToMeCount };