@tesouro/embedded-components-react 0.2.329 → 0.2.331

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (20) hide show
  1. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +1 -1
  2. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +5 -50
  3. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +9 -9
  4. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +92 -16
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +3 -8
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +50 -77
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +8 -145
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +18 -5
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +6 -6
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +78 -7
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +142 -75
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +2 -0
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +7 -7
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js +1 -5
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index2.js +1 -0
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index3.js +21 -21
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index53.js +51 -49
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index7.js +16 -15
  19. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  20. package/package.json +1 -1
@@ -2,84 +2,151 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { useEmbedApi as e } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
6
- import { useUploadPayableFromFileMutation as t } from "../../data-access/dist/index10.js";
7
- import { usePayableOcrQueries as n } from "../../data-access/dist/index12.js";
8
- import "../../data-access/dist/index.js";
9
- import { billPayUploadQueueKey as r } from "./index53.js";
10
- import { BILL_UPLOAD_QUEUE_LABELS_EN as i } from "./index54.js";
11
- import { useCallback as a, useEffect as o, useMemo as s, useState as c } from "react";
12
- import { useQuery as l, useQueryClient as u } from "@tanstack/react-query";
5
+ import { toast as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
6
+ import { hasAnyScope as t } from "../../../shared/data-access/dist/lib/hasAnyScope.js";
7
+ import { Scope as n } from "../../../shared/data-access/dist/lib/scopes.js";
8
+ import "../../../shared/data-access/dist/index.js";
9
+ import "../../../shared/ui/dist/index.js";
10
+ import { useWidgetConfig as r } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
11
+ import "../../../shared/feature/dist/index.js";
12
+ import { AddBillDialog as i } from "../../ui/dist/index10.js";
13
+ import { BillsScreen as a } from "../../ui/dist/index53.js";
14
+ import "../../ui/dist/index.js";
15
+ import { BillCreateDialog as o } from "./index37.js";
16
+ import "./index38.js";
17
+ import { BillDetailsContainer as s } from "./index41.js";
18
+ import "./index42.js";
19
+ import "./index48.js";
20
+ import "./index49.js";
21
+ import { BILL_QUEUE_ORDER as c, BillQueue as l } from "./index50.js";
22
+ import { BILLS_TAB_LABELS_EN as u } from "./index52.js";
23
+ import { billsTabTestIds as d } from "./index53.js";
24
+ import { useBillsTable as f } from "./index54.js";
25
+ import { copyTextToClipboard as p } from "./index51.js";
26
+ import { useCallback as m, useEffect as h, useMemo as g, useState as _ } from "react";
27
+ import { jsx as v, jsxs as y } from "react/jsx-runtime";
28
+ import { CalendarClockIcon as b, CheckIcon as x, FilePenIcon as S, ListIcon as C, LoaderCircleIcon as w } from "lucide-react";
13
29
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js
14
- function d({ onOpenBill: d, labels: f } = {}) {
15
- let p = {
16
- ...i,
17
- ...f
18
- }, { organizationId: m } = e(), h = u(), g = s(() => r(m), [m]), _ = t(), [v, y] = c(!1), { data: b = [] } = l({
19
- queryKey: g,
20
- queryFn: () => h.getQueryData(g) ?? [],
21
- staleTime: Infinity,
22
- gcTime: Infinity,
23
- initialData: []
24
- }), x = a((e, t) => {
25
- h.setQueryData(g, (n) => (n ?? []).map((n) => n.localId === e ? {
26
- ...n,
27
- ...t
28
- } : n));
29
- }, [h, g]), S = a((e) => {
30
- y(!1);
31
- for (let t of e) {
32
- let e = crypto.randomUUID();
33
- h.setQueryData(g, (n) => [...n ?? [], {
34
- localId: e,
35
- fileName: t.name,
36
- status: "uploading"
37
- }]), _.mutateAsync({ file: t }).then((t) => x(e, { payableId: t?.id })).catch(() => x(e, { status: "failed" }));
30
+ var T = "bills@business-banking.app", E = {
31
+ [l.Drafts]: /* @__PURE__ */ v(S, {
32
+ className: "ttw:size-4",
33
+ "aria-hidden": !0
34
+ }),
35
+ [l.Pending]: /* @__PURE__ */ v(w, {
36
+ className: "ttw:size-4",
37
+ "aria-hidden": !0
38
+ }),
39
+ [l.Scheduled]: /* @__PURE__ */ v(b, {
40
+ className: "ttw:size-4",
41
+ "aria-hidden": !0
42
+ }),
43
+ [l.Paid]: /* @__PURE__ */ v(x, {
44
+ className: "ttw:size-4",
45
+ "aria-hidden": !0
46
+ }),
47
+ [l.All]: /* @__PURE__ */ v(C, {
48
+ className: "ttw:size-4",
49
+ "aria-hidden": !0
50
+ })
51
+ };
52
+ function D({ labels: l, onEnqueueFiles: b, openPayableId: x, onOpenPayableHandled: S, poweredByBankName: C }) {
53
+ let w = g(() => ({
54
+ ...u,
55
+ ...l,
56
+ queues: {
57
+ ...u.queues,
58
+ ...l?.queues
38
59
  }
39
- }, [
40
- x,
41
- h,
42
- g,
43
- _
44
- ]), C = n({ payableIds: b.filter((e) => e.status === "uploading" && e.payableId).map((e) => e.payableId) });
45
- o(() => {
46
- for (let { payableId: e, ocrStatus: t, isError: n } of C) {
47
- let r = b.find((t) => t.payableId === e && t.status === "uploading");
48
- r && (t === "success" ? x(r.localId, { status: "ready" }) : (n || t === "error" || t === "canceled") && x(r.localId, { status: "failed" }));
60
+ }), [l]), [D, O] = _(!1), [k, A] = _(), [j, M] = _(!1), [N, P] = _(), [F, I] = _(!1), [L, R] = _(!1), { initResponse: z } = r(), B = t(z?.scopes, [n.PayableReadOrg]), V = t(z?.scopes, [n.PayableWriteOrg]), H = !z || B, U = !z || V, W = m((e, t) => {
61
+ if (t && U) {
62
+ A(e), M(!0);
63
+ return;
49
64
  }
50
- }, [
51
- b,
52
- C,
53
- x
54
- ]);
55
- let w = b.filter((e) => e.status === "uploading"), T = b.filter((e) => e.status === "ready"), E = b.filter((e) => e.status === "failed"), D = (e) => ({
56
- id: e.localId,
57
- fileName: e.fileName,
58
- status: e.status,
59
- onOpen: e.status === "ready" && e.payableId && d ? () => d(e.payableId) : void 0
60
- }), O = w.length ? [{
61
- id: "in-progress",
62
- items: b.map(D)
63
- }] : [...T.length ? [{
64
- id: "ready",
65
- caption: p.readyCaption(T.length),
66
- items: T.map(D)
67
- }] : [], ...E.length ? [{
68
- id: "failed",
69
- caption: p.failedCaption(E.length),
70
- items: E.map(D)
71
- }] : []], k = w.length ? p.uploadingSummary(b.length) : T.length ? p.completeSummary(T.length) : p.failedCaption(E.length), A = a(() => {
72
- h.setQueryData(g, []);
73
- }, [h, g]);
74
- return {
75
- enqueue: S,
76
- sections: O,
77
- summaryLabel: k,
78
- collapsed: v,
79
- onToggleCollapsed: a(() => y((e) => !e), []),
80
- onClose: A,
81
- isVisible: b.length > 0
65
+ P(e), I(!0);
66
+ }, [U]), G = f({
67
+ enabled: H,
68
+ onOpenBill: W
69
+ }), K = g(() => c.map((e) => ({
70
+ id: e,
71
+ label: w.queues[e],
72
+ icon: E[e]
73
+ })), [w.queues]), q = () => {
74
+ I(!1), R(!0);
75
+ }, J = g(() => ({
76
+ createButton: w.createButton,
77
+ addBill: { heading: w.emptyHeading }
78
+ }), [w.createButton, w.emptyHeading]), Y = () => {
79
+ O(!1), A(void 0), M(!0);
80
+ }, X = (e) => {
81
+ O(!1), b?.(e);
82
+ }, Z = async () => {
83
+ await p(T) ? e.success(w.emailCopiedToast) : e.error(w.emailCopyFailedToast);
82
84
  };
85
+ return h(() => {
86
+ x && (A(x), M(!0), S?.());
87
+ }, [S, x]), /* @__PURE__ */ y("div", {
88
+ "data-testid": d.root,
89
+ children: [
90
+ /* @__PURE__ */ v(a, {
91
+ rows: G.rows,
92
+ isLoading: G.isLoading || !z,
93
+ isError: G.isError,
94
+ onRetry: G.onRetry,
95
+ sorting: G.sorting,
96
+ onSortingChange: G.onSortingChange,
97
+ pageSize: G.pageSize,
98
+ onPageSizeChange: G.onPageSizeChange,
99
+ hasNextPage: G.hasNextPage,
100
+ hasPrevPage: G.hasPrevPage,
101
+ onNextPage: G.onNextPage,
102
+ onPrevPage: G.onPrevPage,
103
+ filterTabs: K,
104
+ selectedFilterTabId: G.selectedFilterTabId,
105
+ onFilterTabChange: G.onFilterTabChange,
106
+ searchValue: G.searchValue,
107
+ onSearchChange: G.onSearchChange,
108
+ isFiltering: G.hasAnyBills,
109
+ onCreateClick: U ? () => O(!0) : void 0,
110
+ onEnterManually: U ? Y : void 0,
111
+ onFilesSelected: U ? X : void 0,
112
+ maxFiles: 10,
113
+ emailAddress: T,
114
+ onCopyEmail: Z,
115
+ labels: J
116
+ }),
117
+ U ? /* @__PURE__ */ v(i, {
118
+ open: D,
119
+ onOpenChange: O,
120
+ onFilesSelected: X,
121
+ maxFiles: 10,
122
+ onEnterManually: Y,
123
+ emailAddress: T,
124
+ onCopyEmail: Z,
125
+ labels: { heading: G.hasAnyBills ? w.nonEmptyHeading : w.emptyHeading }
126
+ }) : null,
127
+ j ? /* @__PURE__ */ v(o, {
128
+ open: j,
129
+ onOpenChange: M,
130
+ payableId: k
131
+ }) : null,
132
+ F ? /* @__PURE__ */ v(s, {
133
+ open: F,
134
+ onOpenChange: I,
135
+ payableId: N,
136
+ onClose: () => I(!1),
137
+ onExpand: q,
138
+ testId: d.detailsSheet,
139
+ poweredByBankName: C
140
+ }) : null,
141
+ L ? /* @__PURE__ */ v(o, {
142
+ open: L,
143
+ onOpenChange: R,
144
+ payableId: N,
145
+ readOnly: !0,
146
+ poweredByBankName: C
147
+ }) : null
148
+ ]
149
+ });
83
150
  }
84
151
  //#endregion
85
- export { d as useBillUploadQueue };
152
+ export { D as BillsTab, D as default };
@@ -1,3 +1,5 @@
1
+ import "./index50.js";
2
+ import "./index52.js";
1
3
  import "./index53.js";
2
4
  import "./index54.js";
3
5
  import "./index55.js";
@@ -16,10 +16,10 @@ import { BillUploadStatusTray as s } from "../../ui/dist/index56.js";
16
16
  import "../../ui/dist/index.js";
17
17
  import { ApprovalPoliciesSettings as c } from "../../../shared/approval-policy/feature/dist/lib/ApprovalPoliciesSettings.js";
18
18
  import "../../../shared/approval-policy/feature/dist/index.js";
19
- import { billsTabTestIds as l } from "./index49.js";
20
- import { BillsTab as u } from "./index51.js";
21
- import "./index52.js";
22
- import { useBillUploadQueue as d } from "./index55.js";
19
+ import { useBillUploadQueue as l } from "./index48.js";
20
+ import "./index49.js";
21
+ import { billsTabTestIds as u } from "./index53.js";
22
+ import { BillsTab as d } from "./index55.js";
23
23
  import "./index56.js";
24
24
  import { BillPayWidgetAnalyticsEvent as f, WIDGET_NAME as p } from "./index43.js";
25
25
  import { DEFAULT_TABS_LABELS as m } from "./index57.js";
@@ -47,10 +47,10 @@ function w({ labels: i, tabsLabels: p, approvalPolicyLabels: w, approvalPolicyCo
47
47
  ...p
48
48
  }, { initResponse: A } = a(), j = e(A?.scopes, [t.ApprovalPolicyWriteOrg]), M = !A || j, [N, P] = v(S.Bills), [F, I] = v(), L = g((e) => {
49
49
  P(S.Bills), I(e);
50
- }, []), R = d({ onOpenBill: L }), z = [{
50
+ }, []), R = l({ onOpenBill: L }), z = [{
51
51
  id: S.Bills,
52
52
  label: k.bills,
53
- content: /* @__PURE__ */ b(u, {
53
+ content: /* @__PURE__ */ b(d, {
54
54
  onEnqueueFiles: R.enqueue,
55
55
  openPayableId: F,
56
56
  onOpenPayableHandled: () => I(void 0),
@@ -89,7 +89,7 @@ function w({ labels: i, tabsLabels: p, approvalPolicyLabels: w, approvalPolicyCo
89
89
  collapsed: R.collapsed,
90
90
  onToggleCollapsed: R.onToggleCollapsed,
91
91
  onClose: R.onClose,
92
- testId: l.uploadTray
92
+ testId: u.uploadTray
93
93
  }) : null
94
94
  ] });
95
95
  }
@@ -4,7 +4,6 @@ import { formatMoneyExact as t } from "../../../shared/util/dist/lib/formatMoney
4
4
  var n = {
5
5
  unnamedSourceAccount: "Bank account",
6
6
  availableBalancePrefix: (e) => `Available balance: ${e}`,
7
- sufficientFunds: "Funds available",
8
7
  futureInsufficientFunds: "Not enough funds right now. Add funds before the payment date.",
9
8
  todayInsufficientFunds: "Not enough funds to pay today. Choose a different account or a later date."
10
9
  };
@@ -24,10 +23,7 @@ function i(i, a = n) {
24
23
  }
25
24
  function a({ selectedAccount: e, amountDueMinorUnits: t, isToday: r, labels: i = n }) {
26
25
  let a = e?.balanceMinorUnits;
27
- return a === void 0 ? { state: "warning" } : a >= t ? {
28
- state: "sufficient",
29
- message: i.sufficientFunds
30
- } : r ? {
26
+ return a === void 0 ? { state: "warning" } : a >= t ? { state: "sufficient" } : r ? {
31
27
  state: "error",
32
28
  message: i.todayInsufficientFunds
33
29
  } : {
@@ -3,6 +3,7 @@ var e = {
3
3
  dropPrefix: "Drop your files here, or",
4
4
  browseAction: "browse to upload",
5
5
  fileTypesHint: "PDF, JPG, or PNG (max. 3MB)",
6
+ fileCountHint: (e) => `up to ${e} files at a time`,
6
7
  uploadingText: "Uploading…",
7
8
  fileInput: "Choose a file to upload"
8
9
  };
@@ -10,60 +10,60 @@ function u(e, t) {
10
10
  let n = t.split(",").map((e) => e.trim()).filter(Boolean);
11
11
  return n.length === 0 || n.some((t) => t.startsWith(".") ? e.name.toLowerCase().endsWith(t.toLowerCase()) : t.endsWith("/*") ? e.type.startsWith(t.slice(0, -1)) : e.type === t);
12
12
  }
13
- function d({ status: d = "idle", errorMessage: f, accept: p = ".pdf,.png,.jpg,.jpeg", multiple: m = !0, onFilesSelected: h, testId: g, labels: _ }) {
14
- let v = {
13
+ function d({ status: d = "idle", errorMessage: f, accept: p = ".pdf,.png,.jpg,.jpeg", multiple: m = !0, maxFiles: h, onFilesSelected: g, testId: _, labels: v }) {
14
+ let y = {
15
15
  ...n,
16
- ..._
17
- }, y = r(null), [b, x] = i(!1), S = d === "uploading";
16
+ ...v
17
+ }, b = r(null), [x, S] = i(!1), C = d === "uploading";
18
18
  return /* @__PURE__ */ s("div", {
19
19
  className: "ttw:flex ttw:flex-col ttw:gap-2",
20
- "data-testid": g,
20
+ "data-testid": _,
21
21
  children: [
22
22
  /* @__PURE__ */ s("button", {
23
23
  type: "button",
24
- disabled: S,
25
- className: e("ttw:flex ttw:w-full ttw:items-center ttw:justify-center ttw:gap-3 ttw:rounded-lg ttw:border ttw:border-dashed ttw:px-6 ttw:py-8", b ? "ttw:border-primary ttw:bg-primary/5" : "ttw:border-border ttw:bg-muted/40"),
26
- onClick: () => y.current?.click(),
24
+ disabled: C,
25
+ className: e("ttw:flex ttw:w-full ttw:items-center ttw:justify-center ttw:gap-3 ttw:rounded-lg ttw:border ttw:border-dashed ttw:px-6 ttw:py-8", x ? "ttw:border-primary ttw:bg-primary/5" : "ttw:border-border ttw:bg-muted/40"),
26
+ onClick: () => b.current?.click(),
27
27
  onDragOver: (e) => {
28
- e.preventDefault(), x(!0);
28
+ e.preventDefault(), S(!0);
29
29
  },
30
30
  onDragLeave: (e) => {
31
- e.preventDefault(), x(!1);
31
+ e.preventDefault(), S(!1);
32
32
  },
33
33
  onDrop: (e) => {
34
- if (e.preventDefault(), x(!1), S) return;
34
+ if (e.preventDefault(), S(!1), C) return;
35
35
  let t = (e.dataTransfer.files ? Array.from(e.dataTransfer.files) : []).filter((e) => u(e, p)), n = m ? t : t.slice(0, 1);
36
- n.length > 0 && h(n);
36
+ n.length > 0 && g(n);
37
37
  },
38
- children: [S ? /* @__PURE__ */ o(c, { className: "ttw:size-5 ttw:animate-spin ttw:text-primary" }) : /* @__PURE__ */ o(l, { className: "ttw:size-5 ttw:text-muted-foreground" }), /* @__PURE__ */ s("span", {
38
+ children: [C ? /* @__PURE__ */ o(c, { className: "ttw:size-5 ttw:animate-spin ttw:text-primary" }) : /* @__PURE__ */ o(l, { className: "ttw:size-5 ttw:text-muted-foreground" }), /* @__PURE__ */ s("span", {
39
39
  className: "ttw:flex ttw:flex-col ttw:items-start",
40
40
  children: [/* @__PURE__ */ o("span", {
41
41
  className: "ttw:text-sm ttw:text-primary",
42
- children: S ? v.uploadingText : /* @__PURE__ */ s(a, { children: [
43
- v.dropPrefix,
42
+ children: C ? y.uploadingText : /* @__PURE__ */ s(a, { children: [
43
+ y.dropPrefix,
44
44
  " ",
45
45
  /* @__PURE__ */ o("span", {
46
46
  className: "ttw:underline",
47
- children: v.browseAction
47
+ children: y.browseAction
48
48
  })
49
49
  ] })
50
50
  }), /* @__PURE__ */ o("span", {
51
51
  className: "ttw:text-xs ttw:text-muted-foreground",
52
- children: v.fileTypesHint
52
+ children: h === void 0 ? y.fileTypesHint : `${y.fileTypesHint} · ${y.fileCountHint(h)}`
53
53
  })]
54
54
  })]
55
55
  }),
56
56
  /* @__PURE__ */ o("input", {
57
- ref: y,
57
+ ref: b,
58
58
  type: "file",
59
59
  accept: p,
60
60
  multiple: m,
61
- disabled: S,
62
- "aria-label": v.fileInput,
61
+ disabled: C,
62
+ "aria-label": y.fileInput,
63
63
  className: "ttw:hidden",
64
64
  onChange: (e) => {
65
65
  let t = (e.target.files ? Array.from(e.target.files) : []).filter((e) => u(e, p)), n = m ? t : t.slice(0, 1);
66
- n.length > 0 && h(n), e.target.value = "";
66
+ n.length > 0 && g(n), e.target.value = "";
67
67
  }
68
68
  }),
69
69
  d === "error" && f ? /* @__PURE__ */ o(t, { children: f }) : null
@@ -19,59 +19,59 @@ var x = [
19
19
  50,
20
20
  100
21
21
  ];
22
- function S({ rows: S, isLoading: C, isError: w, sorting: T, onSortingChange: E, pageSize: D, onPageSizeChange: O, pageSizeOptions: k = x, pageInfo: A, hasNextPage: j, hasPrevPage: M, onNextPage: N, onPrevPage: P, filterTabs: F, selectedFilterTabId: I, onFilterTabChange: L, searchValue: R, onSearchChange: z, isFiltering: B, onCreateClick: V, onRetry: H, onFilesSelected: U, onEnterManually: W, uploadStatus: G, uploadErrorMessage: K, emailAddress: q, onCopyEmail: J, labels: Y }) {
23
- let X = h(() => ({
22
+ function S({ rows: S, isLoading: C, isError: w, sorting: T, onSortingChange: E, pageSize: D, onPageSizeChange: O, pageSizeOptions: k = x, pageInfo: A, hasNextPage: j, hasPrevPage: M, onNextPage: N, onPrevPage: P, filterTabs: F, selectedFilterTabId: I, onFilterTabChange: L, searchValue: R, onSearchChange: z, isFiltering: B, onCreateClick: V, onRetry: H, onFilesSelected: U, maxFiles: W, onEnterManually: G, uploadStatus: K, uploadErrorMessage: q, emailAddress: J, onCopyEmail: Y, labels: X }) {
23
+ let Z = h(() => ({
24
24
  ...p,
25
- ...Y,
25
+ ...X,
26
26
  statusBadge: {
27
27
  ...p.statusBadge,
28
- ...Y?.statusBadge
28
+ ...X?.statusBadge
29
29
  },
30
30
  addBill: {
31
31
  ...p.addBill,
32
- ...Y?.addBill,
32
+ ...X?.addBill,
33
33
  dropzone: {
34
34
  ...p.addBill.dropzone,
35
- ...Y?.addBill?.dropzone
35
+ ...X?.addBill?.dropzone
36
36
  }
37
37
  },
38
38
  sortableHeader: {
39
39
  ...p.sortableHeader,
40
- ...Y?.sortableHeader
40
+ ...X?.sortableHeader
41
41
  },
42
42
  missingValue: {
43
43
  ...p.missingValue,
44
- ...Y?.missingValue
44
+ ...X?.missingValue
45
45
  }
46
- }), [Y]), Z = h(() => [
46
+ }), [X]), Q = h(() => [
47
47
  {
48
48
  accessorKey: "vendorLabel",
49
49
  enableSorting: !0,
50
50
  header: ({ column: e }) => /* @__PURE__ */ g(n, {
51
51
  column: e,
52
- title: X.columnVendor,
53
- labels: X.sortableHeader
52
+ title: Z.columnVendor,
53
+ labels: Z.sortableHeader
54
54
  }),
55
- cell: ({ row: e }) => e.original.vendorLabel || /* @__PURE__ */ g(f, { labels: X.missingValue })
55
+ cell: ({ row: e }) => e.original.vendorLabel || /* @__PURE__ */ g(f, { labels: Z.missingValue })
56
56
  },
57
57
  {
58
58
  accessorKey: "dueDateLabel",
59
59
  enableSorting: !0,
60
60
  header: ({ column: e }) => /* @__PURE__ */ g(n, {
61
61
  column: e,
62
- title: X.columnDueDate,
63
- labels: X.sortableHeader
62
+ title: Z.columnDueDate,
63
+ labels: Z.sortableHeader
64
64
  }),
65
- cell: ({ row: e }) => e.original.dueDateLabel || /* @__PURE__ */ g(f, { labels: X.missingValue })
65
+ cell: ({ row: e }) => e.original.dueDateLabel || /* @__PURE__ */ g(f, { labels: Z.missingValue })
66
66
  },
67
67
  {
68
68
  accessorKey: "status",
69
69
  enableSorting: !1,
70
- header: X.columnStatus,
70
+ header: Z.columnStatus,
71
71
  cell: ({ row: e }) => /* @__PURE__ */ g(d, {
72
72
  status: e.original.status,
73
73
  tone: e.original.statusTone,
74
- labels: X.statusBadge
74
+ labels: Z.statusBadge
75
75
  })
76
76
  },
77
77
  {
@@ -79,11 +79,11 @@ function S({ rows: S, isLoading: C, isError: w, sorting: T, onSortingChange: E,
79
79
  enableSorting: !1,
80
80
  header: () => /* @__PURE__ */ g("div", {
81
81
  className: "ttw:text-right",
82
- children: X.columnAmountDue
82
+ children: Z.columnAmountDue
83
83
  }),
84
84
  cell: ({ row: e }) => /* @__PURE__ */ g("div", {
85
85
  className: "ttw:text-right",
86
- children: e.original.amountDueLabel || /* @__PURE__ */ g(f, { labels: X.missingValue })
86
+ children: e.original.amountDueLabel || /* @__PURE__ */ g(f, { labels: Z.missingValue })
87
87
  })
88
88
  },
89
89
  {
@@ -91,24 +91,24 @@ function S({ rows: S, isLoading: C, isError: w, sorting: T, onSortingChange: E,
91
91
  enableSorting: !0,
92
92
  header: ({ column: e }) => /* @__PURE__ */ g(n, {
93
93
  column: e,
94
- title: X.columnAddedOn,
95
- labels: X.sortableHeader
94
+ title: Z.columnAddedOn,
95
+ labels: Z.sortableHeader
96
96
  }),
97
- cell: ({ row: e }) => e.original.addedOnLabel || /* @__PURE__ */ g(f, { labels: X.missingValue })
97
+ cell: ({ row: e }) => e.original.addedOnLabel || /* @__PURE__ */ g(f, { labels: Z.missingValue })
98
98
  },
99
99
  {
100
100
  id: "actions",
101
101
  enableSorting: !1,
102
102
  header: () => /* @__PURE__ */ g("span", {
103
103
  className: "ttw:sr-only",
104
- children: X.columnActions
104
+ children: Z.columnActions
105
105
  }),
106
106
  cell: ({ row: t }) => /* @__PURE__ */ g("div", {
107
107
  className: "ttw:flex ttw:justify-end",
108
108
  children: /* @__PURE__ */ g(e, {
109
109
  variant: "ghost",
110
110
  size: "icon",
111
- "aria-label": X.openRow(t.original.vendorLabel || X.missingValue.missing),
111
+ "aria-label": Z.openRow(t.original.vendorLabel || Z.missingValue.missing),
112
112
  onClick: (e) => {
113
113
  e.stopPropagation(), t.original.onOpen();
114
114
  },
@@ -116,15 +116,15 @@ function S({ rows: S, isLoading: C, isError: w, sorting: T, onSortingChange: E,
116
116
  })
117
117
  })
118
118
  }
119
- ], [X]), Q = !!(V && U) && !C && !w && !B && S.length === 0, $ = /* @__PURE__ */ g("div", {
119
+ ], [Z]), $ = !!(V && U) && !C && !w && !B && S.length === 0, ee = /* @__PURE__ */ g("div", {
120
120
  className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:gap-2 ttw:px-4",
121
121
  children: /* @__PURE__ */ _("div", {
122
122
  className: "ttw:relative ttw:w-80",
123
123
  children: [/* @__PURE__ */ g(b, { 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(r, {
124
124
  className: "ttw:pl-9",
125
125
  type: "search",
126
- "aria-label": X.searchLabel,
127
- placeholder: X.searchPlaceholder,
126
+ "aria-label": Z.searchLabel,
127
+ placeholder: Z.searchPlaceholder,
128
128
  value: R,
129
129
  onChange: (e) => z(e.target.value)
130
130
  })]
@@ -137,43 +137,45 @@ function S({ rows: S, isLoading: C, isError: w, sorting: T, onSortingChange: E,
137
137
  children: [/* @__PURE__ */ _("div", {
138
138
  className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:justify-between ttw:gap-3",
139
139
  children: [/* @__PURE__ */ g(o, {
140
- "aria-label": X.filterTabsLabel,
140
+ "aria-label": Z.filterTabsLabel,
141
141
  children: F.map((e) => /* @__PURE__ */ _(s, {
142
142
  value: e.id,
143
143
  className: "ttw:min-w-28",
144
144
  children: [e.icon, e.label]
145
145
  }, e.id))
146
- }), V && !Q ? /* @__PURE__ */ _(e, {
146
+ }), V && !$ ? /* @__PURE__ */ _(e, {
147
147
  onClick: V,
148
- children: [/* @__PURE__ */ g(y, { className: "ttw:size-4" }), X.createButton]
148
+ children: [/* @__PURE__ */ g(y, { className: "ttw:size-4" }), Z.createButton]
149
149
  }) : null]
150
150
  }), (() => {
151
151
  let e = w ? /* @__PURE__ */ g(l, {
152
- title: X.errorTitle,
153
- description: X.errorDescription,
154
- retryLabel: H ? X.errorRetry : void 0,
152
+ title: Z.errorTitle,
153
+ description: Z.errorDescription,
154
+ retryLabel: H ? Z.errorRetry : void 0,
155
155
  onRetry: H
156
- }) : Q && V && U ? /* @__PURE__ */ g("div", {
156
+ }) : $ && V && U ? /* @__PURE__ */ g("div", {
157
157
  className: "ttw:rounded-lg ttw:border ttw:border-border ttw:bg-card",
158
- children: q && J ? /* @__PURE__ */ g(u, {
159
- emailAddress: q,
160
- onCopyEmail: J,
158
+ children: J && Y ? /* @__PURE__ */ g(u, {
159
+ emailAddress: J,
160
+ onCopyEmail: Y,
161
161
  onFilesSelected: U,
162
162
  accept: m,
163
- uploadStatus: G,
164
- uploadErrorMessage: K,
165
- onEnterManually: W ?? V,
166
- labels: X.addBill
163
+ maxFiles: W,
164
+ uploadStatus: K,
165
+ uploadErrorMessage: q,
166
+ onEnterManually: G ?? V,
167
+ labels: Z.addBill
167
168
  }) : /* @__PURE__ */ g(u, {
168
169
  onFilesSelected: U,
169
170
  accept: m,
170
- uploadStatus: G,
171
- uploadErrorMessage: K,
172
- onEnterManually: W ?? V,
173
- labels: X.addBill
171
+ maxFiles: W,
172
+ uploadStatus: K,
173
+ uploadErrorMessage: q,
174
+ onEnterManually: G ?? V,
175
+ labels: Z.addBill
174
176
  })
175
177
  }) : /* @__PURE__ */ g(t, {
176
- columns: Z,
178
+ columns: Q,
177
179
  data: S,
178
180
  isLoading: C,
179
181
  sorting: T,
@@ -187,10 +189,10 @@ function S({ rows: S, isLoading: C, isError: w, sorting: T, onSortingChange: E,
187
189
  onNextPage: N,
188
190
  onPrevPage: P,
189
191
  onRowClick: (e) => e.onOpen(),
190
- filterComponent: $,
192
+ filterComponent: ee,
191
193
  children: B ? /* @__PURE__ */ g(c, {
192
- title: X.filteredEmptyTitle,
193
- description: X.filteredEmptyDescription
194
+ title: Z.filteredEmptyTitle,
195
+ description: Z.filteredEmptyDescription
194
196
  }) : void 0
195
197
  });
196
198
  return F.map((t) => /* @__PURE__ */ g(a, {