@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.
@@ -26,19 +26,19 @@ import { BILLS_SCREEN_LABELS_EN as f, BILLS_SCREEN_UPLOAD_ACCEPT as p } from "./
26
26
  import { BillColumn as m } from "./index22.js";
27
27
  import { Fragment as ve, useMemo as h, useState as ye } from "react";
28
28
  import { createPortal as be } from "react-dom";
29
- import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
30
- import { PaperclipIcon as xe, SearchIcon as Se, UploadIcon as Ce } from "lucide-react";
29
+ import { Fragment as xe, jsx as g, jsxs as _ } from "react/jsx-runtime";
30
+ import { PaperclipIcon as Se, SearchIcon as Ce, UploadIcon as we } from "lucide-react";
31
31
  // ../../libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index23.js
32
- var we = [
32
+ var Te = [
33
33
  10,
34
34
  25,
35
35
  50,
36
36
  100
37
- ], Te = 240;
38
- function Ee(e, t) {
37
+ ], Ee = 240;
38
+ function De(e, t) {
39
39
  return e === "resolving" ? t.vendorResolving : e === "unavailable" ? t.vendorUnavailable : t.missingValue.missing;
40
40
  }
41
- var y = 40, De = 56, Oe = [
41
+ var v = 40, Oe = 56, ke = [
42
42
  m.Vendor,
43
43
  m.InvoiceNumber,
44
44
  m.Attachment,
@@ -52,7 +52,7 @@ var y = 40, De = 56, Oe = [
52
52
  m.AmountPaid,
53
53
  m.TotalAmount,
54
54
  m.AddedOn
55
- ], b = [
55
+ ], y = [
56
56
  m.Vendor,
57
57
  m.Attachment,
58
58
  m.DueDate,
@@ -60,35 +60,35 @@ var y = 40, De = 56, Oe = [
60
60
  m.AmountDue,
61
61
  m.AddedOn
62
62
  ];
63
- function x({ rows: x, isLoading: S, isError: C, sorting: ke, onSortingChange: Ae, pageSize: je, onPageSizeChange: Me, pageSizeOptions: w = we, pageInfo: Ne, hasNextPage: T, hasPrevPage: E, onNextPage: Pe, onPrevPage: Fe, filterTabs: D, selectedFilterTabId: O, onFilterTabChange: Ie, searchValue: Le, onSearchChange: Re, filters: k, visibleColumns: A = b, keepsColumnOrder: j = !1, isSortable: M = !0, cellTestIds: N, isSearchActive: P, showAddPanelWhenEmpty: ze, emptyState: F, onCreateClick: I, headerActionContainer: L, onRetry: R, onFilesSelected: z, maxFiles: B, onEnterManually: V, uploadStatus: H, uploadErrorMessage: U, emailAddress: W, onCopyEmail: G, labels: K, summaryCards: Be, attentionStrip: Ve, attentionView: q }) {
63
+ function b({ rows: b, isLoading: x, isError: S, sorting: Ae, onSortingChange: je, pageSize: Me, onPageSizeChange: Ne, pageSizeOptions: C = Te, pageInfo: Pe, hasNextPage: w, hasPrevPage: T, onNextPage: Fe, onPrevPage: Ie, filterTabs: E, selectedFilterTabId: D, onFilterTabChange: Le, searchValue: Re, onSearchChange: ze, filters: O, visibleColumns: k = y, keepsColumnOrder: A = !1, isSortable: j = !0, cellTestIds: M, isSearchActive: N, showAddPanelWhenEmpty: Be, emptyState: P, onCreateClick: F, headerActionContainer: I, onRetry: L, onFilesSelected: R, maxFiles: z, onEnterManually: B, uploadStatus: V, uploadErrorMessage: H, emailAddress: U, onCopyEmail: W, labels: G, summaryCards: K, attentionStrip: Ve, attentionView: q }) {
64
64
  let J = h(() => ({
65
65
  ...f,
66
- ...K,
66
+ ...G,
67
67
  statusBadge: {
68
68
  ...f.statusBadge,
69
- ...K?.statusBadge
69
+ ...G?.statusBadge
70
70
  },
71
71
  addBill: {
72
72
  ...f.addBill,
73
- ...K?.addBill,
73
+ ...G?.addBill,
74
74
  dropzone: {
75
75
  ...f.addBill.dropzone,
76
- ...K?.addBill?.dropzone
76
+ ...G?.addBill?.dropzone
77
77
  }
78
78
  },
79
79
  sortableHeader: {
80
80
  ...f.sortableHeader,
81
- ...K?.sortableHeader
81
+ ...G?.sortableHeader
82
82
  },
83
83
  missingValue: {
84
84
  ...f.missingValue,
85
- ...K?.missingValue
85
+ ...G?.missingValue
86
86
  },
87
87
  noValue: {
88
88
  ...f.noValue,
89
- ...K?.noValue
89
+ ...G?.noValue
90
90
  }
91
- }), [K]), Y = x.some((e) => e.menu?.items.length), [He, X] = ye(!1), Z = !!z, Ue = (e) => Array.from(e.dataTransfer.types).includes("Files"), We = (e) => {
91
+ }), [G]), Y = b.some((e) => e.menu?.items.length), [He, X] = ye(!1), Z = !!R, Ue = (e) => Array.from(e.dataTransfer.types).includes("Files"), We = (e) => {
92
92
  Z && Ue(e) && (e.preventDefault(), X(!0));
93
93
  }, Ge = (e) => {
94
94
  Z && Ue(e) && (e.preventDefault(), e.dataTransfer.dropEffect = "copy", X(!0));
@@ -97,53 +97,53 @@ function x({ rows: x, isLoading: S, isError: C, sorting: ke, onSortingChange: Ae
97
97
  }, qe = (e) => {
98
98
  if (!Z) return;
99
99
  e.preventDefault(), X(!1);
100
- let t = e.dataTransfer.files ? Array.from(e.dataTransfer.files) : [], n = pe(t, p, B !== 1);
101
- n.length && z?.(n);
100
+ let t = e.dataTransfer.files ? Array.from(e.dataTransfer.files) : [], n = pe(t, p, z !== 1);
101
+ n.length && R?.(n);
102
102
  }, Je = h(() => {
103
- let e = (e) => M ? function({ column: t }) {
104
- return /* @__PURE__ */ _(r, {
103
+ let e = (e) => j ? function({ column: t }) {
104
+ return /* @__PURE__ */ g(r, {
105
105
  column: t,
106
106
  title: e,
107
107
  labels: J.sortableHeader
108
108
  });
109
- } : e, t = (e, t, n = /* @__PURE__ */ _(d, { labels: J.missingValue }), r) => function({ row: i }) {
110
- let a = r && i.original[r] ? /* @__PURE__ */ _(d, { labels: J.missingValue }) : n;
111
- return /* @__PURE__ */ _("span", {
109
+ } : e, t = (e, t, n = /* @__PURE__ */ g(d, { labels: J.missingValue }), r) => function({ row: i }) {
110
+ let a = r && i.original[r] ? /* @__PURE__ */ g(d, { labels: J.missingValue }) : n;
111
+ return /* @__PURE__ */ g("span", {
112
112
  className: "ttw:whitespace-nowrap",
113
- "data-testid": N?.[t],
113
+ "data-testid": M?.[t],
114
114
  children: i.original[e] || a
115
115
  });
116
116
  }, n = t("invoiceNumberLabel", m.InvoiceNumber), i = function({ row: e }) {
117
- return /* @__PURE__ */ _("span", {
117
+ return /* @__PURE__ */ g("span", {
118
118
  className: "ttw:whitespace-nowrap",
119
- "data-testid": N?.[m.DueDate],
120
- children: /* @__PURE__ */ _(le, {
121
- label: e.original.dueDateLabel || /* @__PURE__ */ _(d, { labels: J.missingValue }),
119
+ "data-testid": M?.[m.DueDate],
120
+ children: /* @__PURE__ */ g(le, {
121
+ label: e.original.dueDateLabel || /* @__PURE__ */ g(d, { labels: J.missingValue }),
122
122
  overdueLabel: e.original.dueDateOverdueLabel,
123
123
  accessibleLabel: e.original.dueDateAccessibleLabel
124
124
  })
125
125
  });
126
- }, a = (e, t, n = /* @__PURE__ */ _(d, { labels: J.missingValue }), r) => function({ row: i }) {
127
- let a = r && i.original[r] ? /* @__PURE__ */ _(d, { labels: J.missingValue }) : n;
128
- return /* @__PURE__ */ _("div", {
126
+ }, a = (e, t, n = /* @__PURE__ */ g(d, { labels: J.missingValue }), r) => function({ row: i }) {
127
+ let a = r && i.original[r] ? /* @__PURE__ */ g(d, { labels: J.missingValue }) : n;
128
+ return /* @__PURE__ */ g("div", {
129
129
  className: "ttw:text-right ttw:whitespace-nowrap",
130
- "data-testid": N?.[t],
130
+ "data-testid": M?.[t],
131
131
  children: i.original[e] || a
132
132
  });
133
- }, o = /* @__PURE__ */ _(ge, { labels: J.noValue });
133
+ }, o = /* @__PURE__ */ g(ge, { labels: J.noValue });
134
134
  function te({ row: e }) {
135
- let t = e.original.scheduledDateIsGap ? /* @__PURE__ */ _(d, { labels: J.missingValue }) : o, n = e.original.scheduledDateLabel, r = e.original.scheduledDateExact;
136
- return /* @__PURE__ */ _("span", {
135
+ let t = e.original.scheduledDateIsGap ? /* @__PURE__ */ g(d, { labels: J.missingValue }) : o, n = e.original.scheduledDateLabel, r = e.original.scheduledDateExact;
136
+ return /* @__PURE__ */ g("span", {
137
137
  className: "ttw:whitespace-nowrap",
138
- "data-testid": N?.[m.ScheduledDate],
139
- children: n && r ? /* @__PURE__ */ _(ce, {
138
+ "data-testid": M?.[m.ScheduledDate],
139
+ children: n && r ? /* @__PURE__ */ g(ce, {
140
140
  date: r,
141
141
  children: n
142
142
  }) : n || t
143
143
  });
144
144
  }
145
145
  let s = (e) => function() {
146
- return /* @__PURE__ */ _("div", {
146
+ return /* @__PURE__ */ g("div", {
147
147
  className: "ttw:text-right",
148
148
  children: e
149
149
  });
@@ -151,24 +151,24 @@ function x({ rows: x, isLoading: S, isError: C, sorting: ke, onSortingChange: Ae
151
151
  return {
152
152
  [m.Vendor]: {
153
153
  accessorKey: "vendorLabel",
154
- enableSorting: M,
155
- minSize: Te,
154
+ enableSorting: j,
155
+ minSize: Ee,
156
156
  header: e(J.columnVendor),
157
157
  cell: ({ row: e }) => {
158
- let t = e.original.rowNote ? /* @__PURE__ */ _("span", {
158
+ let t = e.original.rowNote ? /* @__PURE__ */ g("span", {
159
159
  className: "ttw:sr-only",
160
160
  children: ` ${e.original.rowNote}`
161
161
  }) : null;
162
- return !e.original.vendorLabel && e.original.vendorLookup === "resolving" ? /* @__PURE__ */ v("div", {
163
- "data-testid": N?.[m.Vendor],
164
- children: [/* @__PURE__ */ _(ee, {
162
+ return !e.original.vendorLabel && e.original.vendorLookup === "resolving" ? /* @__PURE__ */ _("div", {
163
+ "data-testid": M?.[m.Vendor],
164
+ children: [/* @__PURE__ */ g(ee, {
165
165
  className: "ttw:h-4 ttw:w-32",
166
166
  "aria-hidden": !0
167
167
  }), t]
168
- }) : /* @__PURE__ */ v("span", {
168
+ }) : /* @__PURE__ */ _("span", {
169
169
  className: "ttw:inline-flex ttw:items-center ttw:gap-2",
170
- "data-testid": N?.[m.Vendor],
171
- children: [e.original.vendorLabel || (e.original.vendorLookup === "unavailable" ? /* @__PURE__ */ _(ge, { labels: { none: J.vendorUnavailable } }) : /* @__PURE__ */ _(d, { labels: J.missingValue })), t]
170
+ "data-testid": M?.[m.Vendor],
171
+ children: [e.original.vendorLabel || (e.original.vendorLookup === "unavailable" ? /* @__PURE__ */ g(ge, { labels: { none: J.vendorUnavailable } }) : /* @__PURE__ */ g(d, { labels: J.missingValue })), t]
172
172
  });
173
173
  }
174
174
  },
@@ -176,47 +176,47 @@ function x({ rows: x, isLoading: S, isError: C, sorting: ke, onSortingChange: Ae
176
176
  accessorKey: "invoiceNumberLabel",
177
177
  enableSorting: !1,
178
178
  header: () => J.columnInvoiceNumber,
179
- cell: (e) => e.row.original.marker === "duplicate" ? /* @__PURE__ */ v("span", {
179
+ cell: (e) => e.row.original.marker === "duplicate" ? /* @__PURE__ */ _("span", {
180
180
  className: "ttw:relative",
181
- children: [/* @__PURE__ */ _(l, { className: "ttw:absolute ttw:top-1/2 ttw:right-full ttw:mr-1 ttw:-translate-y-1/2 ttw:text-warning" }), n(e)]
181
+ children: [/* @__PURE__ */ g(l, { className: "ttw:absolute ttw:top-1/2 ttw:right-full ttw:mr-1 ttw:-translate-y-1/2 ttw:text-warning" }), n(e)]
182
182
  }) : n(e)
183
183
  },
184
184
  [m.Attachment]: {
185
185
  accessorKey: "attachment",
186
186
  enableSorting: !1,
187
- size: y,
188
- minSize: y,
189
- header: () => /* @__PURE__ */ _("span", {
187
+ size: v,
188
+ minSize: v,
189
+ header: () => /* @__PURE__ */ g("span", {
190
190
  className: "ttw:sr-only",
191
191
  children: J.columnAttachment
192
192
  }),
193
- cell: ({ row: e }) => e.original.attachment ? /* @__PURE__ */ _("div", {
193
+ cell: ({ row: e }) => e.original.attachment ? /* @__PURE__ */ g("div", {
194
194
  className: "ttw:flex ttw:justify-center",
195
- "data-testid": N?.[m.Attachment],
196
- children: /* @__PURE__ */ _(ae, { children: /* @__PURE__ */ v(re, { children: [/* @__PURE__ */ _(oe, {
195
+ "data-testid": M?.[m.Attachment],
196
+ children: /* @__PURE__ */ g(ae, { children: /* @__PURE__ */ _(re, { children: [/* @__PURE__ */ g(oe, {
197
197
  type: "button",
198
198
  className: "ttw:inline-flex ttw:cursor-default",
199
199
  "aria-label": e.original.attachment.label,
200
200
  onClick: (e) => e.stopPropagation(),
201
- children: /* @__PURE__ */ _(xe, { className: "ttw:size-3.5 ttw:shrink-0 ttw:text-muted-foreground" })
202
- }), /* @__PURE__ */ _(ie, { children: e.original.attachment.label })] }) })
201
+ children: /* @__PURE__ */ g(Se, { className: "ttw:size-3.5 ttw:shrink-0 ttw:text-muted-foreground" })
202
+ }), /* @__PURE__ */ g(ie, { children: e.original.attachment.label })] }) })
203
203
  }) : null
204
204
  },
205
205
  [m.IssueDate]: {
206
206
  accessorKey: "issueDateLabel",
207
- enableSorting: M,
207
+ enableSorting: j,
208
208
  header: e(J.columnIssueDate),
209
209
  cell: t("issueDateLabel", m.IssueDate)
210
210
  },
211
211
  [m.DueDate]: {
212
212
  accessorKey: "dueDateLabel",
213
- enableSorting: M,
213
+ enableSorting: j,
214
214
  header: e(J.columnDueDate),
215
215
  cell: i
216
216
  },
217
217
  [m.ScheduledDate]: {
218
218
  accessorKey: "scheduledDateLabel",
219
- enableSorting: M,
219
+ enableSorting: j,
220
220
  header: e(J.columnScheduledDate),
221
221
  cell: te
222
222
  },
@@ -230,10 +230,10 @@ function x({ rows: x, isLoading: S, isError: C, sorting: ke, onSortingChange: Ae
230
230
  accessorKey: "status",
231
231
  enableSorting: !1,
232
232
  header: J.columnStatus,
233
- cell: ({ row: e }) => /* @__PURE__ */ _("div", {
233
+ cell: ({ row: e }) => /* @__PURE__ */ g("div", {
234
234
  className: "ttw:flex ttw:items-center ttw:gap-1",
235
- "data-testid": N?.[m.Status],
236
- children: /* @__PURE__ */ _(_e, {
235
+ "data-testid": M?.[m.Status],
236
+ children: /* @__PURE__ */ g(_e, {
237
237
  status: e.original.status,
238
238
  tone: e.original.statusTone,
239
239
  labels: J.statusBadge
@@ -266,26 +266,26 @@ function x({ rows: x, isLoading: S, isError: C, sorting: ke, onSortingChange: Ae
266
266
  },
267
267
  [m.AddedOn]: {
268
268
  accessorKey: "addedOnLabel",
269
- enableSorting: M,
269
+ enableSorting: j,
270
270
  header: e(J.columnAddedOn),
271
271
  cell: t("addedOnLabel", m.AddedOn)
272
272
  }
273
273
  };
274
274
  }, [
275
275
  J,
276
- N,
277
- M
278
- ]), Ye = h(() => [...(j ? A : Oe.filter((e) => A.includes(e))).map((e) => Je[e]), ...Y ? [{
276
+ M,
277
+ j
278
+ ]), Ye = h(() => [...(A ? k : ke.filter((e) => k.includes(e))).map((e) => Je[e]), ...Y ? [{
279
279
  id: "actions",
280
280
  enableSorting: !1,
281
- size: De,
282
- header: () => /* @__PURE__ */ _("span", {
281
+ size: Oe,
282
+ header: () => /* @__PURE__ */ g("span", {
283
283
  className: "ttw:sr-only",
284
284
  children: J.columnActions
285
285
  }),
286
- cell: ({ row: e }) => e.original.menu?.items.length ? /* @__PURE__ */ _("div", {
286
+ cell: ({ row: e }) => e.original.menu?.items.length ? /* @__PURE__ */ g("div", {
287
287
  className: "ttw:flex ttw:justify-end",
288
- children: /* @__PURE__ */ _(fe, {
288
+ children: /* @__PURE__ */ g(fe, {
289
289
  actions: e.original.menu.items.map((e) => ({
290
290
  ...e,
291
291
  variant: "ghost"
@@ -297,167 +297,172 @@ function x({ rows: x, isLoading: S, isError: C, sorting: ke, onSortingChange: Ae
297
297
  }] : []], [
298
298
  Je,
299
299
  Y,
300
- j,
300
+ A,
301
301
  J,
302
- A
303
- ]), Xe = !!(I && z) && !S && !C && !P && x.length === 0 && ze === !0, Q = I ? /* @__PURE__ */ _(e, {
304
- onClick: I,
302
+ k
303
+ ]), Xe = !!(F && R) && !x && !S && !N && b.length === 0 && Be === !0, Q = F ? /* @__PURE__ */ g(e, {
304
+ onClick: F,
305
305
  children: J.createButton
306
- }) : null, Ze = /* @__PURE__ */ v("div", {
306
+ }) : null, Ze = /* @__PURE__ */ _("div", {
307
307
  className: "ttw:relative ttw:w-80",
308
- children: [/* @__PURE__ */ _(Se, { className: "ttw:pointer-events-none ttw:absolute ttw:left-3 ttw:top-1/2 ttw:size-4 ttw:-translate-y-1/2 ttw:text-muted-foreground" }), /* @__PURE__ */ _(i, {
308
+ children: [/* @__PURE__ */ g(Ce, { className: "ttw:pointer-events-none ttw:absolute ttw:left-3 ttw:top-1/2 ttw:size-4 ttw:-translate-y-1/2 ttw:text-muted-foreground" }), /* @__PURE__ */ g(i, {
309
309
  className: "ttw:pl-9",
310
310
  type: "search",
311
311
  "aria-label": J.searchLabel,
312
312
  placeholder: J.searchPlaceholder,
313
- value: Le,
314
- onChange: (e) => Re(e.target.value)
313
+ value: Re,
314
+ onChange: (e) => ze(e.target.value)
315
315
  })]
316
- }), Qe = q ? /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(de, { ...q }), /* @__PURE__ */ _("div", {
317
- className: "ttw:ml-auto",
318
- children: Ze
319
- })] }) : Ze, $e = k ? /* @__PURE__ */ _(he, {
320
- ...k,
316
+ }), Qe = /* @__PURE__ */ g(s, {
317
+ variant: "pills",
318
+ "aria-label": J.filterTabsLabel,
319
+ children: E.map((e) => /* @__PURE__ */ _(ve, { children: [e.startsGroup ? /* @__PURE__ */ g(a, {
320
+ orientation: "vertical",
321
+ className: "ttw:mx-1 ttw:data-[orientation=vertical]:h-4"
322
+ }) : null, /* @__PURE__ */ g(ne, {
323
+ value: e.id,
324
+ count: e.badge,
325
+ countTone: e.tone,
326
+ className: "ttw:min-w-28",
327
+ children: /* @__PURE__ */ g("span", {
328
+ className: e.tone === "warning" ? "ttw:text-warning-foreground" : void 0,
329
+ children: e.label
330
+ })
331
+ })] }, e.id))
332
+ }), $e = q ? /* @__PURE__ */ g(de, { ...q }) : Qe, et = O ? /* @__PURE__ */ g(he, {
333
+ ...O,
321
334
  className: "ttw:px-4",
322
- searchSlot: Qe
335
+ leadingSlot: $e,
336
+ searchSlot: Ze
323
337
  }) : /* @__PURE__ */ _("div", {
324
338
  className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:gap-2 ttw:px-4",
325
- children: Qe
326
- }), $ = C ? /* @__PURE__ */ _(se, {
339
+ children: [$e, /* @__PURE__ */ g("div", {
340
+ className: "ttw:ml-auto",
341
+ children: Ze
342
+ })]
343
+ }), tt = !S && !Xe, $ = S ? /* @__PURE__ */ g(se, {
327
344
  title: J.errorTitle,
328
345
  description: J.errorDescription,
329
- retryLabel: R ? J.errorRetry : void 0,
330
- onRetry: R
331
- }) : Xe && I && z ? /* @__PURE__ */ _("div", {
346
+ retryLabel: L ? J.errorRetry : void 0,
347
+ onRetry: L
348
+ }) : Xe && F && R ? /* @__PURE__ */ g("div", {
332
349
  className: "ttw:rounded-lg ttw:border ttw:border-border ttw:bg-card",
333
- children: W && G ? /* @__PURE__ */ _(u, {
334
- emailAddress: W,
335
- onCopyEmail: G,
336
- onFilesSelected: z,
350
+ children: U && W ? /* @__PURE__ */ g(u, {
351
+ emailAddress: U,
352
+ onCopyEmail: W,
353
+ onFilesSelected: R,
337
354
  accept: p,
338
- maxFiles: B,
339
- uploadStatus: H,
340
- uploadErrorMessage: U,
341
- onEnterManually: V ?? I,
355
+ maxFiles: z,
356
+ uploadStatus: V,
357
+ uploadErrorMessage: H,
358
+ onEnterManually: B ?? F,
342
359
  labels: J.addBill
343
- }) : /* @__PURE__ */ _(u, {
344
- onFilesSelected: z,
360
+ }) : /* @__PURE__ */ g(u, {
361
+ onFilesSelected: R,
345
362
  accept: p,
346
- maxFiles: B,
347
- uploadStatus: H,
348
- uploadErrorMessage: U,
349
- onEnterManually: V ?? I,
363
+ maxFiles: z,
364
+ uploadStatus: V,
365
+ uploadErrorMessage: H,
366
+ onEnterManually: B ?? F,
350
367
  labels: J.addBill
351
368
  })
352
- }) : /* @__PURE__ */ v("div", {
369
+ }) : /* @__PURE__ */ _("div", {
353
370
  className: "ttw:relative",
354
371
  onDragEnter: We,
355
372
  onDragOver: Ge,
356
373
  onDragLeave: Ke,
357
374
  onDrop: qe,
358
- children: [/* @__PURE__ */ _(n, {
375
+ children: [/* @__PURE__ */ g(n, {
359
376
  columns: Ye,
360
- data: x,
377
+ data: b,
361
378
  getRowId: (e) => e.rowKey,
362
379
  animatesNewRows: !0,
363
- isLoading: S,
364
- sorting: ke,
365
- onSortingChange: Ae,
366
- pageSize: je,
367
- onPageSizeChange: Me,
368
- pageSizeOptions: w,
369
- showPagination: w.length > 1 || T || E,
370
- pageInfo: Ne,
371
- hasNextPage: T,
372
- hasPrevPage: E,
373
- onNextPage: Pe,
374
- onPrevPage: Fe,
380
+ isLoading: x,
381
+ sorting: Ae,
382
+ onSortingChange: je,
383
+ pageSize: Me,
384
+ onPageSizeChange: Ne,
385
+ pageSizeOptions: C,
386
+ showPagination: C.length > 1 || w || T,
387
+ pageInfo: Pe,
388
+ hasNextPage: w,
389
+ hasPrevPage: T,
390
+ onNextPage: Fe,
391
+ onPrevPage: Ie,
375
392
  onRowClick: (e) => e.onOpen(),
376
- rowAriaLabel: (e) => J.openRow(e.vendorLabel || Ee(e.vendorLookup, J)),
393
+ rowAriaLabel: (e) => J.openRow(e.vendorLabel || De(e.vendorLookup, J)),
377
394
  rowGroup: (e) => e.group ? {
378
395
  key: e.group.key,
379
396
  label: e.group.label,
380
397
  tone: "warning",
381
- icon: /* @__PURE__ */ _(l, {}),
398
+ icon: /* @__PURE__ */ g(l, {}),
382
399
  title: e.group.title,
383
400
  meta: e.group.meta,
384
401
  collapse: e.group.collapse
385
402
  } : void 0,
386
- rowContextMenu: (e) => e.menu?.items.length ? /* @__PURE__ */ _(g, { children: e.menu.items.map((e) => {
403
+ rowContextMenu: (e) => e.menu?.items.length ? /* @__PURE__ */ g(xe, { children: e.menu.items.map((e) => {
387
404
  let n = e.icon;
388
- return /* @__PURE__ */ v(t, {
405
+ return /* @__PURE__ */ _(t, {
389
406
  disabled: e.disabled,
390
407
  onClick: e.onSelect,
391
- children: [n ? /* @__PURE__ */ _(n, { className: "ttw:size-4" }) : null, e.label]
408
+ children: [n ? /* @__PURE__ */ g(n, { className: "ttw:size-4" }) : null, e.label]
392
409
  }, e.id);
393
410
  }) }) : void 0,
394
- filterComponent: $e,
395
- children: P ? /* @__PURE__ */ _(c, {
411
+ filterComponent: et,
412
+ children: N ? /* @__PURE__ */ g(c, {
396
413
  title: J.filteredEmptyTitle,
397
414
  description: J.filteredEmptyDescription
398
- }) : F ? /* @__PURE__ */ _(c, {
399
- title: F.title,
400
- description: F.description
415
+ }) : P ? /* @__PURE__ */ g(c, {
416
+ title: P.title,
417
+ description: P.description
401
418
  }) : void 0
402
- }), He ? /* @__PURE__ */ _("div", {
419
+ }), He ? /* @__PURE__ */ g("div", {
403
420
  className: "ttw:pointer-events-none ttw:absolute ttw:inset-0 ttw:z-20 ttw:flex ttw:items-center ttw:justify-center ttw:rounded-xl ttw:border-2 ttw:border-dashed ttw:border-primary ttw:bg-background/85 ttw:backdrop-blur-[1px]",
404
- children: /* @__PURE__ */ v("div", {
421
+ children: /* @__PURE__ */ _("div", {
405
422
  className: "ttw:flex ttw:items-center ttw:gap-3 ttw:rounded-lg ttw:border ttw:bg-card ttw:px-4 ttw:py-3 ttw:shadow-sm",
406
- children: [/* @__PURE__ */ _(Ce, { className: "ttw:size-5 ttw:text-muted-foreground" }), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
423
+ children: [/* @__PURE__ */ g(we, { className: "ttw:size-5 ttw:text-muted-foreground" }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
407
424
  className: "ttw:text-sm ttw:font-medium",
408
425
  children: J.tableDropzoneTitle
409
- }), /* @__PURE__ */ _("p", {
426
+ }), /* @__PURE__ */ g("p", {
410
427
  className: "ttw:text-xs ttw:text-muted-foreground",
411
- children: B === void 0 ? J.addBill.dropzone.fileTypesHint : `${J.addBill.dropzone.fileTypesHint} · ${J.addBill.dropzone.fileCountHint(B)}`
428
+ children: z === void 0 ? J.addBill.dropzone.fileTypesHint : `${J.addBill.dropzone.fileTypesHint} · ${J.addBill.dropzone.fileCountHint(z)}`
412
429
  })] })]
413
430
  })
414
431
  }) : null]
415
432
  });
416
- return /* @__PURE__ */ v("div", {
433
+ return /* @__PURE__ */ _("div", {
417
434
  role: "presentation",
418
435
  className: "ttw:flex ttw:flex-col ttw:gap-3",
419
436
  onKeyDown: (e) => {
420
437
  q && e.key === "Escape" && !e.defaultPrevented && (e.target.closest("[role=\"menu\"], [role=\"dialog\"], [role=\"alertdialog\"], [role=\"listbox\"], input, textarea, select") || q.onBack());
421
438
  },
422
439
  children: [
423
- Be ? /* @__PURE__ */ _(me, { ...Be }) : null,
424
- Ve ? /* @__PURE__ */ _(ue, { ...Ve }) : null,
425
- q ? /* @__PURE__ */ v("div", {
440
+ K ? /* @__PURE__ */ g(me, { ...K }) : null,
441
+ Ve ? /* @__PURE__ */ g(ue, { ...Ve }) : null,
442
+ q ? /* @__PURE__ */ _("div", {
426
443
  className: "ttw:flex ttw:flex-col ttw:gap-4",
427
- children: [L === void 0 && Q ? /* @__PURE__ */ _("div", {
444
+ children: [I === void 0 && Q ? /* @__PURE__ */ g("div", {
428
445
  className: "ttw:flex ttw:justify-end",
429
446
  children: Q
430
447
  }) : null, $]
431
- }) : /* @__PURE__ */ v(o, {
432
- value: O,
433
- onValueChange: Ie,
448
+ }) : /* @__PURE__ */ _(o, {
449
+ value: D,
450
+ onValueChange: Le,
434
451
  className: "ttw:flex ttw:flex-col ttw:gap-4",
435
- children: [/* @__PURE__ */ v("div", {
436
- className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:justify-between ttw:gap-3",
437
- children: [/* @__PURE__ */ _(s, {
438
- variant: "pills",
439
- "aria-label": J.filterTabsLabel,
440
- children: D.map((e) => /* @__PURE__ */ v(ve, { children: [e.startsGroup ? /* @__PURE__ */ _(a, {
441
- orientation: "vertical",
442
- className: "ttw:mx-1 ttw:data-[orientation=vertical]:h-4"
443
- }) : null, /* @__PURE__ */ _(ne, {
444
- value: e.id,
445
- count: e.badge,
446
- countTone: e.tone,
447
- className: "ttw:min-w-28",
448
- children: /* @__PURE__ */ _("span", {
449
- className: e.tone === "warning" ? "ttw:text-warning-foreground" : void 0,
450
- children: e.label
451
- })
452
- })] }, e.id))
453
- }), L === void 0 ? Q : null]
454
- }), D.map((e) => /* @__PURE__ */ _(te, {
455
- value: e.id,
456
- children: e.id === O ? $ : null
457
- }, e.id))]
452
+ children: [
453
+ I === void 0 && Q ? /* @__PURE__ */ g("div", {
454
+ className: "ttw:flex ttw:justify-end",
455
+ children: Q
456
+ }) : null,
457
+ tt ? null : Qe,
458
+ E.map((e) => /* @__PURE__ */ g(te, {
459
+ value: e.id,
460
+ children: e.id === D ? $ : null
461
+ }, e.id))
462
+ ]
458
463
  }),
459
- L && Q ? be(Q, L) : null
464
+ I && Q ? be(Q, I) : null
460
465
  ]
461
466
  });
462
467
  }
463
- export { x as BillsScreen, x as default, b as DEFAULT_BILL_COLUMNS };
468
+ export { b as BillsScreen, b as default, y as DEFAULT_BILL_COLUMNS };
@@ -2,11 +2,11 @@
2
2
  var e = { scenarios: {
3
3
  populated: {
4
4
  label: "Populated",
5
- blurb: "Nine bills across the queues, with a count on each queue tab. Switch between Assigned to me, Pending, Scheduled, Paid and All bills, or open any row: a draft opens in the bill editor, a submitted bill opens read-only. On the Vendors tab, open a vendor for its balance and recent bills, and View all to jump back to just that vendor’s bills."
5
+ blurb: "Nine bills, opening on All bills. Switch to Assigned to me for the bills waiting on you, with its count on the pill, or open any row: a draft opens in the bill editor, a submitted bill opens read-only. On the Vendors tab, open a vendor for its balance and recent bills, and View all to jump back to just that vendor’s bills."
6
6
  },
7
7
  "mark-as-paid": {
8
8
  label: "Mark as paid",
9
- blurb: "The same bills, with payable:pay:org. Open Metro Utilities on the Assigned to me tab, press Mark as paid and confirm: the bill moves to Paid and the tab counts follow."
9
+ blurb: "The same bills, with payable:pay:org. Open Metro Utilities on the Assigned to me tab, press Mark as paid and confirm: the bill leaves Assigned to me and its count follows."
10
10
  },
11
11
  duplicates: {
12
12
  label: "Possible duplicates",
@@ -14,7 +14,7 @@ var e = { scenarios: {
14
14
  },
15
15
  empty: {
16
16
  label: "No bills yet",
17
- blurb: "The organization has no bills, so Assigned to me shows the add-a-bill panel with the address bills can be emailed to, and every tab count reads 0."
17
+ blurb: "The organization has no bills, so All bills shows the add-a-bill panel with the address bills can be emailed to, and the Assigned to me count reads 0."
18
18
  },
19
19
  "read-only": {
20
20
  label: "Read only",
@@ -26,7 +26,7 @@ var e = { scenarios: {
26
26
  },
27
27
  loading: {
28
28
  label: "Loading",
29
- blurb: "The bill list is held open, so the table skeleton stays on screen under the queue tabs."
29
+ blurb: "The bill list is held open, so the table skeleton stays on screen."
30
30
  },
31
31
  error: {
32
32
  label: "Error",
@@ -4,19 +4,28 @@ var e = [
4
4
  "scheduled",
5
5
  "ready_to_pay",
6
6
  "pending_approval",
7
+ "ready_to_submit",
7
8
  "draft"
8
9
  ];
9
- function t({ statuses: t, statusLabels: n, labels: r }) {
10
- if (t.length <= 5) return;
11
- let i = t.slice(4), a = [...new Set(i.map((e) => e ?? "unknown"))], o = (t) => {
10
+ function t({ statuses: t, labels: n }) {
11
+ if (t.length <= 4) return;
12
+ let r = t.slice(3), i = /* @__PURE__ */ new Map();
13
+ for (let e of r) {
14
+ let t = e ?? "unknown";
15
+ i.set(t, (i.get(t) ?? 0) + 1);
16
+ }
17
+ let a = (t) => {
12
18
  let n = e.indexOf(t);
13
19
  return n === -1 ? e.length : n;
14
- }, s = [...a].sort((e, t) => o(e) - o(t));
20
+ }, o = [...i.keys()].sort((e, t) => a(e) - a(t));
15
21
  return {
16
- visibleCount: 4,
17
- showMoreLabel: r.showMore(i.length),
18
- summary: r.statusSummary(s.map((e) => n[e] ?? n.unknown ?? e)),
19
- showLessLabel: r.showLess
22
+ visibleCount: 3,
23
+ showMoreLabel: n.showMore(r.length),
24
+ summary: n.statusSummary(o.map((e) => ({
25
+ status: e,
26
+ count: i.get(e) ?? 0
27
+ }))),
28
+ showLessLabel: n.showLess
20
29
  };
21
30
  }
22
31
  export { e as GROUP_SUMMARY_STATUS_ORDER, t as buildGroupCollapse };
@@ -1,5 +1,5 @@
1
1
  // ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
2
- var e = "@tesouro/embedded-components-react", t = "0.11.192", n = "54a6f78f3ffe5dc9fd7aebf6f2a1abcf03272f0b", r = Object.freeze({
2
+ var e = "@tesouro/embedded-components-react", t = "0.11.195", n = "bf2faa9ef9e1d6cdb9e506cc43a214410cfe4147", r = Object.freeze({
3
3
  library_name: e,
4
4
  library_version: t,
5
5
  library_sha: n