@tesouro/embedded-components-react 0.7.45 → 0.7.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +29 -39
- package/dist/lib/CounterpartsWidget.d.ts +29 -22
- package/dist/lib/CounterpartsWidgetPublic.d.ts +29 -22
- package/dist/lib/CustomersWidget.d.ts +29 -22
- package/dist/lib/ReceivablesWidget.d.ts +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index24.js +12 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index25.js +15 -15
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index42.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index5.js +30 -30
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index14.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index15.js +7 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index33.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index34.js +9 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index37.js +5 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index48.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index49.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index5.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index16.js +40 -40
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index18.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index2.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index20.js +8 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index3.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index5.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index6.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +9 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index12.js +7 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index13.js +76 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index15.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index16.js +27 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index17.js +2 -76
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index18.js +30 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index19.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index20.js +5 -27
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index21.js +32 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index22.js +2 -30
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/viewModels.js +73 -77
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index2.js +8 -25
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index7.js +197 -208
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/auditHistory/labels.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableDetails.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesWidget.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +22 -23
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js +10 -24
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index25.js +53 -37
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index26.js +21 -53
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index27.js +8 -21
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index28.js +77 -8
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index29.js +31 -69
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index30.js +17 -38
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index31.js +40 -17
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index32.js +26 -38
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index33.js +18 -27
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index34.js +8 -18
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index35.js +35 -9
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index36.js +14 -36
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index37.js +26 -14
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index38.js +84 -23
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index39.js +487 -80
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index40.js +2 -494
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index41.js +48 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index42.js +62 -38
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index43.js +438 -61
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index44.js +207 -431
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index45.js +20 -222
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index46.js +6 -21
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index48.js +265 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index49.js +2 -265
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index50.js +131 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index51.js +22 -125
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index52.js +235 -23
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index53.js +3 -240
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index54.js +249 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index55.js +54 -242
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index56.js +221 -51
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index57.js +38 -222
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index.js +8 -0
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index2.js +14 -0
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index3.js +13 -0
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index4.js +18 -0
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index5.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index6.js +20 -0
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index7.js +32 -0
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index8.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/{bill-pay-widget → shared/document-status}/util/dist/lib/derivePayableStatus.js +23 -10
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/util/dist/lib/receivableFilledTone.js +22 -0
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index14.js +0 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index23.js +0 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index24.js +0 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +0 -34
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +0 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index47.js +0 -8
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index58.js +0 -45
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index15.js
CHANGED
|
@@ -9,9 +9,10 @@ import { PaymentHistoryList as u } from "./index8.js";
|
|
|
9
9
|
import "./index9.js";
|
|
10
10
|
import { VendorSummaryCard as d } from "./index12.js";
|
|
11
11
|
import "./index13.js";
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
12
|
+
import { BillStatusBadge as f } from "../../../../shared/document-status/ui/dist/index4.js";
|
|
13
|
+
import "../../../../shared/document-status/ui/dist/index.js";
|
|
14
|
+
import { BillActionButtons as p, NO_BILL_ACTIONS as m } from "../../../ui/dist/index2.js";
|
|
15
|
+
import { DueDateValue as h } from "../../../ui/dist/index18.js";
|
|
15
16
|
import "../../../ui/dist/index.js";
|
|
16
17
|
import { mergeBillDetailBodyLabels as g } from "./index14.js";
|
|
17
18
|
import { ScheduledSummaryBadge as _ } from "./index5.js";
|
|
@@ -20,7 +21,7 @@ import { jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
|
20
21
|
import { AlertTriangle as x } from "lucide-react";
|
|
21
22
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index15.js
|
|
22
23
|
var S = "ttw:text-base ttw:font-semibold", C = "ttw:px-3 ttw:py-2", w = "ttw:py-2 ttw:pr-3", T = "ttw:flex ttw:items-start ttw:gap-4 ttw:py-2.5", E = "ttw:w-[140px] ttw:shrink-0 ttw:text-sm ttw:font-medium ttw:text-muted-foreground";
|
|
23
|
-
function D({ view: D, actions: O =
|
|
24
|
+
function D({ view: D, actions: O = m, scheduledSummary: k, scheduledSummaryDate: A, scheduledStatusLabel: j, showApprovalOverrideNotice: M, awaitingApprovalNotice: N, payTo: P, paymentHistoryError: F, paymentHistoryLoading: I, historyError: L, historyLoading: R, historyNamesError: z, isLoading: B, isError: V, labels: H }) {
|
|
24
25
|
let U = v(() => g(H), [H]), W = v(() => ({
|
|
25
26
|
...U.payToCard,
|
|
26
27
|
payToHeading: D?.paidOnLabel ? U.payToHeadingPaid : U.payToHeading,
|
|
@@ -105,7 +106,7 @@ function D({ view: D, actions: O = p, scheduledSummary: k, scheduledSummaryDate:
|
|
|
105
106
|
}) : k ? /* @__PURE__ */ y(_, {
|
|
106
107
|
summary: k,
|
|
107
108
|
date: A
|
|
108
|
-
}) : /* @__PURE__ */ y(
|
|
109
|
+
}) : /* @__PURE__ */ y(f, {
|
|
109
110
|
status: D.status,
|
|
110
111
|
tone: D.statusTone,
|
|
111
112
|
labels: G
|
|
@@ -146,7 +147,7 @@ function D({ view: D, actions: O = p, scheduledSummary: k, scheduledSummaryDate:
|
|
|
146
147
|
}) : null,
|
|
147
148
|
!k && O.row.length ? /* @__PURE__ */ y("div", {
|
|
148
149
|
className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:gap-2",
|
|
149
|
-
children: /* @__PURE__ */ y(
|
|
150
|
+
children: /* @__PURE__ */ y(p, { actions: O.row })
|
|
150
151
|
}) : null
|
|
151
152
|
]
|
|
152
153
|
}),
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index33.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { APPROVAL_POLICY_CARD_LABELS_EN as e } from "./index2.js";
|
|
2
2
|
import "./index4.js";
|
|
3
|
-
import { BILL_STATUS_BADGE_LABELS_EN as t } from "
|
|
4
|
-
import
|
|
3
|
+
import { BILL_STATUS_BADGE_LABELS_EN as t } from "../../../../shared/document-status/ui/dist/index2.js";
|
|
4
|
+
import "../../../../shared/document-status/ui/dist/index.js";
|
|
5
|
+
import { DUE_DATE_VALUE_LABELS_EN as n } from "../../../ui/dist/index17.js";
|
|
5
6
|
import "../../../ui/dist/index.js";
|
|
6
7
|
import { BILL_AUDIT_HISTORY_SECTION_LABELS_EN as r } from "./index14.js";
|
|
7
8
|
import "./index16.js";
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index34.js
CHANGED
|
@@ -5,10 +5,11 @@ import { BillRejectionNotice as f } from "./index6.js";
|
|
|
5
5
|
import "./index7.js";
|
|
6
6
|
import { PaymentHistoryList as p } from "./index8.js";
|
|
7
7
|
import "./index9.js";
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
8
|
+
import { BillStatusBadge as m } from "../../../../shared/document-status/ui/dist/index4.js";
|
|
9
|
+
import "../../../../shared/document-status/ui/dist/index.js";
|
|
10
|
+
import { BillActionButtons as h, NO_BILL_ACTIONS as g } from "../../../ui/dist/index2.js";
|
|
11
|
+
import { BillOverflowMenu as _ } from "../../../ui/dist/index7.js";
|
|
12
|
+
import { DueDateValue as v } from "../../../ui/dist/index18.js";
|
|
12
13
|
import "../../../ui/dist/index.js";
|
|
13
14
|
import { ScheduledSummaryBadge as y } from "./index5.js";
|
|
14
15
|
import { BILL_DETAILS_SHEET_LABELS_EN as b } from "./index33.js";
|
|
@@ -36,7 +37,7 @@ function E({ items: e }) {
|
|
|
36
37
|
}, e.label))
|
|
37
38
|
});
|
|
38
39
|
}
|
|
39
|
-
function D({ open: D, onOpenChange: O, details: k, actions: A =
|
|
40
|
+
function D({ open: D, onOpenChange: O, details: k, actions: A = g, approvalPolicy: j, showApprovalOverrideNotice: M, awaitingApprovalNotice: N, scheduledSummary: P, scheduledSummaryDate: F, paymentHistory: I, paymentHistoryError: L, paymentHistoryLoading: R, auditHistory: z, auditHistoryError: B, auditHistoryLoading: V, auditHistoryNamesError: H, isLoading: U, isError: W, notice: G, onClose: K, onExpand: q, testId: J, labels: Y }) {
|
|
40
41
|
let X = {
|
|
41
42
|
...b,
|
|
42
43
|
...Y,
|
|
@@ -98,7 +99,7 @@ function D({ open: D, onOpenChange: O, details: k, actions: A = h, approvalPolic
|
|
|
98
99
|
onClick: q,
|
|
99
100
|
children: /* @__PURE__ */ S(w, { className: "ttw:size-4" })
|
|
100
101
|
}) : null,
|
|
101
|
-
k && !U && !W ? /* @__PURE__ */ S(
|
|
102
|
+
k && !U && !W ? /* @__PURE__ */ S(_, {
|
|
102
103
|
actions: A.menu,
|
|
103
104
|
triggerLabel: X.overflowMenuTrigger,
|
|
104
105
|
placement: "header"
|
|
@@ -169,7 +170,7 @@ function D({ open: D, onOpenChange: O, details: k, actions: A = h, approvalPolic
|
|
|
169
170
|
}) : P ? /* @__PURE__ */ S(y, {
|
|
170
171
|
summary: P,
|
|
171
172
|
date: F
|
|
172
|
-
}) : /* @__PURE__ */ S(
|
|
173
|
+
}) : /* @__PURE__ */ S(m, {
|
|
173
174
|
status: k.status,
|
|
174
175
|
tone: k.statusTone,
|
|
175
176
|
labels: X.statusBadge
|
|
@@ -211,7 +212,7 @@ function D({ open: D, onOpenChange: O, details: k, actions: A = h, approvalPolic
|
|
|
211
212
|
}) : null,
|
|
212
213
|
A.row.length ? /* @__PURE__ */ S("div", {
|
|
213
214
|
className: "ttw:flex ttw:items-center ttw:gap-2",
|
|
214
|
-
children: /* @__PURE__ */ S(
|
|
215
|
+
children: /* @__PURE__ */ S(h, { actions: A.row })
|
|
215
216
|
}) : null
|
|
216
217
|
]
|
|
217
218
|
}),
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index37.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Alert as e, AlertTitle as t, Badge as n, Button as r, cn as i } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
2
|
+
import { BillStatusBadge as a } from "../../../../shared/document-status/ui/dist/index4.js";
|
|
3
|
+
import "../../../../shared/document-status/ui/dist/index.js";
|
|
4
|
+
import { BillOverflowMenu as o } from "../../../ui/dist/index7.js";
|
|
4
5
|
import "../../../ui/dist/index.js";
|
|
5
6
|
import { BILL_DUPLICATE_NOTICE_LABELS_EN as s } from "./index36.js";
|
|
6
7
|
import { useState as c } from "react";
|
|
@@ -101,7 +102,7 @@ function g({ onNotADuplicate: g, onRemoveBill: _, onOpenFullScreen: v, isActionD
|
|
|
101
102
|
}),
|
|
102
103
|
/* @__PURE__ */ l("span", {
|
|
103
104
|
className: "ttw:px-3 ttw:py-2",
|
|
104
|
-
children: e.status ? /* @__PURE__ */ l(
|
|
105
|
+
children: e.status ? /* @__PURE__ */ l(a, {
|
|
105
106
|
status: e.status,
|
|
106
107
|
tone: e.statusTone ?? "neutral"
|
|
107
108
|
}) : null
|
|
@@ -109,7 +110,7 @@ function g({ onNotADuplicate: g, onRemoveBill: _, onOpenFullScreen: v, isActionD
|
|
|
109
110
|
]
|
|
110
111
|
}), /* @__PURE__ */ l("div", {
|
|
111
112
|
className: "ttw:flex ttw:justify-end ttw:px-1 ttw:py-2",
|
|
112
|
-
children: e.menu ? /* @__PURE__ */ l(
|
|
113
|
+
children: e.menu ? /* @__PURE__ */ l(o, {
|
|
113
114
|
actions: e.menu.items.map((e) => ({
|
|
114
115
|
...e,
|
|
115
116
|
variant: "ghost"
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index48.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BILL_UPLOAD_DROPZONE_LABELS_EN as e } from "../../../ui/dist/
|
|
1
|
+
import { BILL_UPLOAD_DROPZONE_LABELS_EN as e } from "../../../ui/dist/index12.js";
|
|
2
2
|
import "../../../ui/dist/index.js";
|
|
3
3
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index48.js
|
|
4
4
|
var t = {
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index49.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Button as e, Skeleton as t } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
-
import { BillUploadDropzone as n } from "../../../ui/dist/
|
|
2
|
+
import { BillUploadDropzone as n } from "../../../ui/dist/index13.js";
|
|
3
3
|
import "../../../ui/dist/index.js";
|
|
4
4
|
import { SOURCE_DOCUMENT_PANEL_LABELS_EN as r } from "./index48.js";
|
|
5
5
|
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index5.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Badge as e } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
2
|
+
import { BILL_STATUS_TONE_CLASS_NAME as t } from "../../../../shared/document-status/ui/dist/index3.js";
|
|
3
|
+
import "../../../../shared/document-status/ui/dist/index.js";
|
|
4
|
+
import { DateDisclosure as n } from "../../../ui/dist/index16.js";
|
|
4
5
|
import "../../../ui/dist/index.js";
|
|
5
6
|
import { jsx as r } from "react/jsx-runtime";
|
|
6
7
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index5.js
|
|
@@ -9,14 +9,14 @@ import { useEmbedApi as r } from "../../../../shared/data-access/dist/lib/EmbedA
|
|
|
9
9
|
import "../../../../shared/ui/dist/index.js";
|
|
10
10
|
import { useLocalCalendarDay as i } from "../../../../shared/feature/dist/lib/calendar/useLocalCalendarDay.js";
|
|
11
11
|
import "../../../../shared/feature/dist/index.js";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { compareByArrival as u, duplicateVerdictMatches as d, resolveDuplicateOriginalId as f } from "../../../util/dist/lib/groupDuplicates.js";
|
|
12
|
+
import { DuplicateVerdict as a } from "../../../util/dist/lib/duplicateVerdict.js";
|
|
13
|
+
import { formatScheduledDateLabel as o } from "../../../util/dist/lib/formatScheduledDateLabel.js";
|
|
14
|
+
import { hasSuspectedPayableDuplicate as s, suspectedPayableDuplicates as c } from "../../../util/dist/lib/payableDuplicates.js";
|
|
15
|
+
import { compareByArrival as l, duplicateVerdictMatches as u, resolveDuplicateOriginalId as d } from "../../../util/dist/lib/groupDuplicates.js";
|
|
17
16
|
import { isEditablePayableStatus as ee } from "../../../util/dist/lib/isEditablePayableStatus.js";
|
|
18
|
-
import { payableRemoval as
|
|
19
|
-
import { resolveVendorName as
|
|
17
|
+
import { payableRemoval as f } from "../../../util/dist/lib/payableRemoval.js";
|
|
18
|
+
import { resolveVendorName as te } from "../../../util/dist/lib/resolveVendor.js";
|
|
19
|
+
import { derivePayableStatus as ne } from "../../../../shared/document-status/util/dist/lib/derivePayableStatus.js";
|
|
20
20
|
import { useApplyDuplicateVerdictsMutation as p } from "../../../data-access/dist/lib/useApplyDuplicateVerdictsMutation.js";
|
|
21
21
|
import "../../../data-access/dist/index.js";
|
|
22
22
|
import { BillColumn as m } from "../../ui/dist/index19.js";
|
|
@@ -46,7 +46,7 @@ function xe(e, t) {
|
|
|
46
46
|
i(e), i(t), r.get(e)?.add(t), r.get(t)?.add(e);
|
|
47
47
|
};
|
|
48
48
|
for (let t of e) {
|
|
49
|
-
let e =
|
|
49
|
+
let e = c(t);
|
|
50
50
|
if (e.length !== 0) {
|
|
51
51
|
i(t.id);
|
|
52
52
|
for (let n of e) a(t.id, n.matched_payable_id);
|
|
@@ -62,20 +62,20 @@ function xe(e, t) {
|
|
|
62
62
|
for (let t of r.get(e) ?? []) s.has(t) || (s.add(t), a.push(t));
|
|
63
63
|
}
|
|
64
64
|
if (i.length === 0) continue;
|
|
65
|
-
let c = i.map((e) => n.get(e)).filter((e) => !!e).sort(
|
|
65
|
+
let c = i.map((e) => n.get(e)).filter((e) => !!e).sort(l), u = d(c), [ee] = c, f = {
|
|
66
66
|
key: `duplicate-group:${[...i].sort().join(":")}`,
|
|
67
67
|
headerLabel: t.groupHeader({
|
|
68
|
-
vendorLabel:
|
|
69
|
-
invoiceNumberLabel:
|
|
68
|
+
vendorLabel: te(ee),
|
|
69
|
+
invoiceNumberLabel: ee?.document_id ?? ""
|
|
70
70
|
}),
|
|
71
71
|
memberCount: i.length,
|
|
72
|
-
originalPayableId:
|
|
72
|
+
originalPayableId: u
|
|
73
73
|
};
|
|
74
|
-
for (let e of i) o.set(e,
|
|
74
|
+
for (let e of i) o.set(e, f);
|
|
75
75
|
}
|
|
76
76
|
return o;
|
|
77
77
|
}
|
|
78
|
-
function w({ enabled:
|
|
78
|
+
function w({ enabled: c = !0, canReadVendors: l = !0, isVendorFilterPaused: d = !1, filterLabels: ue, onOpenBill: w, duplicateRowNote: we, attachmentLabel: Te, duplicateGroupLabels: T, canManageDuplicates: Ee = !1, duplicateView: E = C.AllBills, scheduledRelativeDayLabels: De }) {
|
|
79
79
|
let Oe = i(), [D, ke] = x(g), [Ae, je] = x(be), [O, Me] = x(ve), [Ne, k] = x(), [Pe, A] = x(0), [j, M] = x(""), [N, Fe] = x(""), [P, F] = x(), [I, L] = x(), R = v(() => {
|
|
80
80
|
k(void 0), A(0);
|
|
81
81
|
}, []);
|
|
@@ -94,8 +94,8 @@ function w({ enabled: l = !0, canReadVendors: u = !0, isVendorFilterPaused: f =
|
|
|
94
94
|
}, [E, R]);
|
|
95
95
|
let z = le({
|
|
96
96
|
offersStatusFilter: D === h.All,
|
|
97
|
-
offersVendorFilter:
|
|
98
|
-
isVendorFilterPaused:
|
|
97
|
+
offersVendorFilter: l,
|
|
98
|
+
isVendorFilterPaused: d,
|
|
99
99
|
labels: ue,
|
|
100
100
|
onFiltersChange: R
|
|
101
101
|
}), { clearAll: Ie, filterByVendor: Le } = z, Re = Ae[0], B = se(Re?.id), ze = B ? Re?.desc ? "desc" : "asc" : void 0, V = E === C.PossibleDuplicates, H = V ? h.All : D, U = b(() => ({
|
|
@@ -119,11 +119,11 @@ function w({ enabled: l = !0, canReadVendors: u = !0, isVendorFilterPaused: f =
|
|
|
119
119
|
ze
|
|
120
120
|
]), { organizationId: Be } = r(), W = JSON.stringify([Be, U]), G = pe({
|
|
121
121
|
...U,
|
|
122
|
-
enabled:
|
|
122
|
+
enabled: c && !V,
|
|
123
123
|
pollWhileOcrProcessing: !0
|
|
124
124
|
}), K = fe({
|
|
125
125
|
...U,
|
|
126
|
-
enabled:
|
|
126
|
+
enabled: c && V,
|
|
127
127
|
maxPages: ye
|
|
128
128
|
}), q = V ? {
|
|
129
129
|
...K,
|
|
@@ -131,7 +131,7 @@ function w({ enabled: l = !0, canReadVendors: u = !0, isVendorFilterPaused: f =
|
|
|
131
131
|
isLoading: K.isResolving,
|
|
132
132
|
isFetching: K.isFetching || K.isResolving
|
|
133
133
|
} : G, J = (q.data?.data ?? []).filter((e) => e.ocr_status !== "processing"), Y = p(), X = v(async (t, n, r, i) => {
|
|
134
|
-
let a =
|
|
134
|
+
let a = u(t, n, i);
|
|
135
135
|
if (a.length) try {
|
|
136
136
|
await Y.mutateAsync({
|
|
137
137
|
verdict: n,
|
|
@@ -139,7 +139,7 @@ function w({ enabled: l = !0, canReadVendors: u = !0, isVendorFilterPaused: f =
|
|
|
139
139
|
payableId: t.id,
|
|
140
140
|
duplicateId: e.id,
|
|
141
141
|
matchedPayableId: e.matched_payable_id,
|
|
142
|
-
removeBy:
|
|
142
|
+
removeBy: f(t.status)
|
|
143
143
|
}))
|
|
144
144
|
}), e.success(r);
|
|
145
145
|
} catch {
|
|
@@ -171,13 +171,13 @@ function w({ enabled: l = !0, canReadVendors: u = !0, isVendorFilterPaused: f =
|
|
|
171
171
|
toast: T.confirmedToast
|
|
172
172
|
}
|
|
173
173
|
}), [T]), Ve = P?.removeBy ?? "cancel", He = v(async () => {
|
|
174
|
-
P && (await X(P.payable,
|
|
174
|
+
P && (await X(P.payable, a.Remove, Z[P.removeBy].toast), F(void 0));
|
|
175
175
|
}, [
|
|
176
176
|
X,
|
|
177
177
|
P,
|
|
178
178
|
Z
|
|
179
179
|
]), Ue = v(async () => {
|
|
180
|
-
I && (await X(I.payable,
|
|
180
|
+
I && (await X(I.payable, a.Keep, T.dismissedToast, I.originalPayableId), L(void 0));
|
|
181
181
|
}, [
|
|
182
182
|
X,
|
|
183
183
|
T.dismissedToast,
|
|
@@ -186,7 +186,7 @@ function w({ enabled: l = !0, canReadVendors: u = !0, isVendorFilterPaused: f =
|
|
|
186
186
|
y(() => {
|
|
187
187
|
q.isFetching || Ge(W);
|
|
188
188
|
}, [q.isFetching, W]);
|
|
189
|
-
let Ke = q.data?.data.length, qe = Ke === 0, Je = me({ enabled:
|
|
189
|
+
let Ke = q.data?.data.length, qe = Ke === 0, Je = me({ enabled: c && qe }), Ye = !qe || (Je.data?.count ?? 1) > 0, Q = b(() => E === C.PossibleDuplicates ? xe(J, T) : /* @__PURE__ */ new Map(), [
|
|
190
190
|
E,
|
|
191
191
|
J,
|
|
192
192
|
T
|
|
@@ -202,15 +202,15 @@ function w({ enabled: l = !0, canReadVendors: u = !0, isVendorFilterPaused: f =
|
|
|
202
202
|
})).sort((e, t) => e.order - t.order).map(({ payable: e }) => e);
|
|
203
203
|
}, [J, Q]), { vendorNames: Ze, lookup: Qe } = de({
|
|
204
204
|
payables: q.data?.data,
|
|
205
|
-
enabled:
|
|
206
|
-
canReadVendors:
|
|
207
|
-
isPaused:
|
|
205
|
+
enabled: c,
|
|
206
|
+
canReadVendors: l,
|
|
207
|
+
isPaused: d
|
|
208
208
|
}), $e = b(() => Xe.map((e) => {
|
|
209
|
-
let r =
|
|
209
|
+
let r = ne({
|
|
210
210
|
apiStatus: e.status,
|
|
211
211
|
dueDate: e.due_date,
|
|
212
212
|
scheduledPaymentDate: e.scheduled_payment_date
|
|
213
|
-
}), i = e.amount_due ?? e.total_amount,
|
|
213
|
+
}), i = e.amount_due ?? e.total_amount, a = e.status === "partially_paid" || e.status === "paid", c = (t) => t == null ? "" : n(t / 100, { currencyCode: e.currency ?? "USD" }), l = o(e.scheduled_payment_date, De, Oe), u = Q.get(e.id), d = s(e), p = te(e) || (e.counterpart_id ? Ze.get(e.counterpart_id) ?? "" : ""), m = e.document_id ?? "", g = f(e.status), _ = u?.originalPayableId !== void 0 && u.originalPayableId === e.id, re = V && d && Ee && u ? {
|
|
214
214
|
triggerLabel: T.menuTrigger({
|
|
215
215
|
vendorLabel: p,
|
|
216
216
|
invoiceNumberLabel: m
|
|
@@ -222,7 +222,7 @@ function w({ enabled: l = !0, canReadVendors: u = !0, isVendorFilterPaused: f =
|
|
|
222
222
|
disabled: Y.isPending,
|
|
223
223
|
onSelect: () => L({
|
|
224
224
|
payable: e,
|
|
225
|
-
originalPayableId: _ ? void 0 :
|
|
225
|
+
originalPayableId: _ ? void 0 : u.originalPayableId
|
|
226
226
|
})
|
|
227
227
|
}, ...g ? [{
|
|
228
228
|
id: "cancel-duplicate",
|
|
@@ -243,31 +243,31 @@ function w({ enabled: l = !0, canReadVendors: u = !0, isVendorFilterPaused: f =
|
|
|
243
243
|
issueDateLabel: t(e.issued_at),
|
|
244
244
|
dueDateLabel: t(e.due_date),
|
|
245
245
|
dueDateTone: r.isOverdue ? "danger" : "default",
|
|
246
|
-
scheduledDateLabel:
|
|
247
|
-
scheduledDateExact:
|
|
246
|
+
scheduledDateLabel: l.label,
|
|
247
|
+
scheduledDateExact: l.absoluteLabel,
|
|
248
248
|
scheduledDateIsGap: H === h.Scheduled,
|
|
249
249
|
paidDateLabel: t(e.paid_at?.slice(0, 10)),
|
|
250
|
-
amountDueLabel:
|
|
251
|
-
amountPaidLabel:
|
|
250
|
+
amountDueLabel: c(i),
|
|
251
|
+
amountPaidLabel: a ? c(e.amount_paid) : "",
|
|
252
252
|
amountPaidIsGap: H === h.Paid,
|
|
253
|
-
amountScheduledLabel:
|
|
254
|
-
totalAmountLabel:
|
|
253
|
+
amountScheduledLabel: c(e.amount_to_pay ?? i),
|
|
254
|
+
totalAmountLabel: c(e.total_amount),
|
|
255
255
|
attachment: e.file_id ? { label: Te } : void 0,
|
|
256
256
|
status: r.status,
|
|
257
257
|
statusTone: r.tone,
|
|
258
258
|
addedOnLabel: t(e.created_at?.slice(0, 10)),
|
|
259
|
-
...
|
|
259
|
+
...u ? {
|
|
260
260
|
group: {
|
|
261
|
-
key:
|
|
262
|
-
headerLabel:
|
|
263
|
-
memberCount:
|
|
261
|
+
key: u.key,
|
|
262
|
+
headerLabel: u.headerLabel,
|
|
263
|
+
memberCount: u.memberCount
|
|
264
264
|
},
|
|
265
265
|
groupedRowLabel: p,
|
|
266
266
|
groupedRowLabelTone: void 0,
|
|
267
267
|
groupedRowBadge: _ ? T.originalBill : void 0
|
|
268
268
|
} : {},
|
|
269
269
|
...re ? { menu: re } : {},
|
|
270
|
-
...!V && !
|
|
270
|
+
...!V && !u && d ? {
|
|
271
271
|
rowTone: "warning",
|
|
272
272
|
rowNote: we
|
|
273
273
|
} : {},
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index18.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { DATA_TABLE_LABELS_EN as e } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
-
import { BILL_STATUS_BADGE_LABELS_EN as t } from "
|
|
3
|
-
import
|
|
2
|
+
import { BILL_STATUS_BADGE_LABELS_EN as t } from "../../../../shared/document-status/ui/dist/index2.js";
|
|
3
|
+
import "../../../../shared/document-status/ui/dist/index.js";
|
|
4
|
+
import { DUE_DATE_VALUE_LABELS_EN as n } from "../../../ui/dist/index17.js";
|
|
4
5
|
import "../../../ui/dist/index.js";
|
|
5
6
|
import { ADD_BILL_PANEL_LABELS_EN as r } from "./index2.js";
|
|
6
7
|
import "./index4.js";
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index2.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BILL_UPLOAD_DROPZONE_LABELS_EN as e } from "../../../ui/dist/
|
|
1
|
+
import { BILL_UPLOAD_DROPZONE_LABELS_EN as e } from "../../../ui/dist/index12.js";
|
|
2
2
|
import "../../../ui/dist/index.js";
|
|
3
3
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index2.js
|
|
4
4
|
var t = {
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index20.js
CHANGED
|
@@ -2,11 +2,12 @@ import { Alert as e, AlertTitle as t, Badge as n, Button as r, ContextMenuItem a
|
|
|
2
2
|
import { EmptyState as u } from "../../../../shared/ui/dist/lib/EmptyState/EmptyState.js";
|
|
3
3
|
import { ErrorState as ce } from "../../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
|
|
4
4
|
import "../../../../shared/ui/dist/index.js";
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
5
|
+
import { BillStatusBadge as le } from "../../../../shared/document-status/ui/dist/index4.js";
|
|
6
|
+
import "../../../../shared/document-status/ui/dist/index.js";
|
|
7
|
+
import { BillOverflowMenu as ue } from "../../../ui/dist/index7.js";
|
|
8
|
+
import { getAcceptedBillUploadFiles as de } from "../../../ui/dist/index13.js";
|
|
9
|
+
import { DateDisclosure as fe } from "../../../ui/dist/index16.js";
|
|
10
|
+
import { DueDateValue as pe } from "../../../ui/dist/index18.js";
|
|
10
11
|
import "../../../ui/dist/index.js";
|
|
11
12
|
import { AddBillPanel as d } from "./index3.js";
|
|
12
13
|
import "./index4.js";
|
|
@@ -246,7 +247,7 @@ function C({ rows: C, isLoading: w, isError: T, sorting: Ae, onSortingChange: je
|
|
|
246
247
|
cell: ({ row: e }) => /* @__PURE__ */ y("div", {
|
|
247
248
|
className: "ttw:flex ttw:items-center ttw:gap-1",
|
|
248
249
|
"data-testid": N?.[g.Status],
|
|
249
|
-
children: /* @__PURE__ */ y(
|
|
250
|
+
children: /* @__PURE__ */ y(le, {
|
|
250
251
|
status: e.original.status,
|
|
251
252
|
tone: e.original.statusTone,
|
|
252
253
|
labels: Y.statusBadge
|
|
@@ -293,7 +294,7 @@ function C({ rows: C, isLoading: w, isError: T, sorting: Ae, onSortingChange: je
|
|
|
293
294
|
}),
|
|
294
295
|
cell: ({ row: e }) => e.original.menu?.items.length ? /* @__PURE__ */ y("div", {
|
|
295
296
|
className: "ttw:flex ttw:justify-end",
|
|
296
|
-
children: /* @__PURE__ */ y(
|
|
297
|
+
children: /* @__PURE__ */ y(ue, {
|
|
297
298
|
actions: e.original.menu.items.map((e) => ({
|
|
298
299
|
...e,
|
|
299
300
|
variant: "ghost"
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index3.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Button as e, Typography as t } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
-
import { BillUploadDropzone as n } from "../../../ui/dist/
|
|
2
|
+
import { BillUploadDropzone as n } from "../../../ui/dist/index13.js";
|
|
3
3
|
import "../../../ui/dist/index.js";
|
|
4
4
|
import { ADD_BILL_PANEL_LABELS_EN as r } from "./index2.js";
|
|
5
5
|
import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index5.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { REVEALABLE_FIELD_LABELS_EN as e } from "../../../ui/dist/
|
|
1
|
+
import { REVEALABLE_FIELD_LABELS_EN as e } from "../../../ui/dist/index20.js";
|
|
2
2
|
import "../../../ui/dist/index.js";
|
|
3
3
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index5.js
|
|
4
4
|
var t = {
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index6.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Button as e, Dialog as t, DialogContent as n, DialogDescription as r, DialogFooter as i, DialogHeader as a, DialogTitle as o, cn as s } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
-
import { RevealableField as c } from "../../../ui/dist/
|
|
2
|
+
import { RevealableField as c } from "../../../ui/dist/index21.js";
|
|
3
3
|
import "../../../ui/dist/index.js";
|
|
4
4
|
import { REVIEW_TRANSACTION_DIALOG_LABELS_EN as l } from "./index5.js";
|
|
5
5
|
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
@@ -8,18 +8,14 @@ import "./index8.js";
|
|
|
8
8
|
import "./index9.js";
|
|
9
9
|
import { BillPayWidgetUi as a } from "./index10.js";
|
|
10
10
|
import "./index11.js";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { BillStatusBadge as c } from "./index14.js";
|
|
11
|
+
import { BILL_UPLOAD_DROPZONE_LABELS_EN as o } from "./index12.js";
|
|
12
|
+
import { BillUploadDropzone as s, getAcceptedBillUploadFiles as c } from "./index13.js";
|
|
14
13
|
import "./index15.js";
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
14
|
+
import { DateDisclosure as l } from "./index16.js";
|
|
15
|
+
import { DUE_DATE_VALUE_LABELS_EN as u } from "./index17.js";
|
|
16
|
+
import { DueDateValue as d } from "./index18.js";
|
|
17
17
|
import "./index19.js";
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import
|
|
21
|
-
|
|
22
|
-
import { REVEALABLE_FIELD_LABELS_EN as h } from "./index24.js";
|
|
23
|
-
import { RevealableField as g } from "./index25.js";
|
|
24
|
-
import "./index26.js";
|
|
25
|
-
export { s as BADGE_TONE_CLASS_NAME, o as BILL_STATUS_BADGE_LABELS_EN, l as BILL_UPLOAD_DROPZONE_LABELS_EN, e as BillActionButtons, n as BillDecisionDialog, i as BillOverflowMenu, a as BillPayWidgetUi, c as BillStatusBadge, u as BillUploadDropzone, p as DUE_DATE_VALUE_LABELS_EN, f as DateDisclosure, m as DueDateValue, t as NO_BILL_ACTIONS, h as REVEALABLE_FIELD_LABELS_EN, g as RevealableField, d as getAcceptedBillUploadFiles, r as groupBySectionHeading };
|
|
18
|
+
import { REVEALABLE_FIELD_LABELS_EN as f } from "./index20.js";
|
|
19
|
+
import { RevealableField as p } from "./index21.js";
|
|
20
|
+
import "./index22.js";
|
|
21
|
+
export { o as BILL_UPLOAD_DROPZONE_LABELS_EN, e as BillActionButtons, n as BillDecisionDialog, i as BillOverflowMenu, a as BillPayWidgetUi, s as BillUploadDropzone, u as DUE_DATE_VALUE_LABELS_EN, l as DateDisclosure, d as DueDateValue, t as NO_BILL_ACTIONS, f as REVEALABLE_FIELD_LABELS_EN, p as RevealableField, c as getAcceptedBillUploadFiles, r as groupBySectionHeading };
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index12.js
|
|
2
2
|
var e = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
canceled: "Cancelled",
|
|
10
|
-
rejected: "Rejected",
|
|
11
|
-
unknown: "Unknown"
|
|
3
|
+
dropPrefix: "Drop your files here, or",
|
|
4
|
+
browseAction: "browse to upload",
|
|
5
|
+
fileTypesHint: "PDF, JPG, or PNG (max. 3MB)",
|
|
6
|
+
fileCountHint: (e) => `up to ${e} files at a time`,
|
|
7
|
+
uploadingText: "Uploading…",
|
|
8
|
+
fileInput: "Choose a file to upload"
|
|
12
9
|
};
|
|
13
10
|
//#endregion
|
|
14
|
-
export { e as
|
|
11
|
+
export { e as BILL_UPLOAD_DROPZONE_LABELS_EN };
|
|
@@ -1,13 +1,78 @@
|
|
|
1
|
+
import { cn as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { InlineErrorAlert as t } from "../../../shared/ui/dist/lib/InlineErrorAlert/InlineErrorAlert.js";
|
|
3
|
+
import "../../../shared/ui/dist/index.js";
|
|
4
|
+
import { BILL_UPLOAD_DROPZONE_LABELS_EN as n } from "./index12.js";
|
|
5
|
+
import { useRef as r, useState as i } from "react";
|
|
6
|
+
import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
7
|
+
import { Loader2 as c, Upload as l } from "lucide-react";
|
|
1
8
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index13.js
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
function u(e, t) {
|
|
10
|
+
let n = t.split(",").map((e) => e.trim()).filter(Boolean);
|
|
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
|
+
}
|
|
13
|
+
function d(e, t, n = !0) {
|
|
14
|
+
let r = e.filter((e) => u(e, t));
|
|
15
|
+
return n ? r : r.slice(0, 1);
|
|
16
|
+
}
|
|
17
|
+
function f({ status: u = "idle", errorMessage: f, accept: p = ".pdf,.png,.jpg,.jpeg", multiple: m = !0, maxFiles: h, onFilesSelected: g, testId: _, labels: v }) {
|
|
18
|
+
let y = {
|
|
19
|
+
...n,
|
|
20
|
+
...v
|
|
21
|
+
}, b = r(null), [x, S] = i(!1), C = u === "uploading";
|
|
22
|
+
return /* @__PURE__ */ s("div", {
|
|
23
|
+
className: "ttw:flex ttw:flex-col ttw:gap-2",
|
|
24
|
+
"data-testid": _,
|
|
25
|
+
children: [
|
|
26
|
+
/* @__PURE__ */ s("button", {
|
|
27
|
+
type: "button",
|
|
28
|
+
disabled: C,
|
|
29
|
+
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"),
|
|
30
|
+
onClick: () => b.current?.click(),
|
|
31
|
+
onDragOver: (e) => {
|
|
32
|
+
e.preventDefault(), S(!0);
|
|
33
|
+
},
|
|
34
|
+
onDragLeave: (e) => {
|
|
35
|
+
e.preventDefault(), S(!1);
|
|
36
|
+
},
|
|
37
|
+
onDrop: (e) => {
|
|
38
|
+
if (e.preventDefault(), S(!1), C) return;
|
|
39
|
+
let t = d(e.dataTransfer.files ? Array.from(e.dataTransfer.files) : [], p, m);
|
|
40
|
+
t.length > 0 && g(t);
|
|
41
|
+
},
|
|
42
|
+
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", {
|
|
43
|
+
className: "ttw:flex ttw:flex-col ttw:items-start",
|
|
44
|
+
children: [/* @__PURE__ */ o("span", {
|
|
45
|
+
className: "ttw:text-sm ttw:text-primary",
|
|
46
|
+
children: C ? y.uploadingText : /* @__PURE__ */ s(a, { children: [
|
|
47
|
+
y.dropPrefix,
|
|
48
|
+
" ",
|
|
49
|
+
/* @__PURE__ */ o("span", {
|
|
50
|
+
className: "ttw:underline",
|
|
51
|
+
children: y.browseAction
|
|
52
|
+
})
|
|
53
|
+
] })
|
|
54
|
+
}), /* @__PURE__ */ o("span", {
|
|
55
|
+
className: "ttw:text-xs ttw:text-muted-foreground",
|
|
56
|
+
children: h === void 0 ? y.fileTypesHint : `${y.fileTypesHint} · ${y.fileCountHint(h)}`
|
|
57
|
+
})]
|
|
58
|
+
})]
|
|
59
|
+
}),
|
|
60
|
+
/* @__PURE__ */ o("input", {
|
|
61
|
+
ref: b,
|
|
62
|
+
type: "file",
|
|
63
|
+
accept: p,
|
|
64
|
+
multiple: m,
|
|
65
|
+
disabled: C,
|
|
66
|
+
"aria-label": y.fileInput,
|
|
67
|
+
className: "ttw:hidden",
|
|
68
|
+
onChange: (e) => {
|
|
69
|
+
let t = d(e.target.files ? Array.from(e.target.files) : [], p, m);
|
|
70
|
+
t.length > 0 && g(t), e.target.value = "";
|
|
71
|
+
}
|
|
72
|
+
}),
|
|
73
|
+
u === "error" && f ? /* @__PURE__ */ o(t, { children: f }) : null
|
|
74
|
+
]
|
|
75
|
+
});
|
|
76
|
+
}
|
|
12
77
|
//#endregion
|
|
13
|
-
export {
|
|
78
|
+
export { f as BillUploadDropzone, f as default, d as getAcceptedBillUploadFiles };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import "./index12.js";
|
|
2
|
-
import "./
|
|
2
|
+
import "./index13.js";
|