@tesouro/embedded-components-react 0.7.45 → 0.7.47
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 +33 -39
- package/dist/lib/CounterpartsWidget.d.ts +33 -22
- package/dist/lib/CounterpartsWidgetPublic.d.ts +33 -22
- package/dist/lib/CustomersWidget.d.ts +31 -22
- package/dist/lib/ReceivablesWidget.d.ts +3 -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/index31.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index32.js +40 -42
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index33.js +1 -3
- 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 +9 -26
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index3.js +44 -44
- 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/counterpart-management/feature/dist/lib/helpers.js +13 -13
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/labels.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartForm.js +85 -84
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index10.js +238 -241
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index11.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index2.js +6 -5
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index5.js +2 -0
- 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/shared/counterpart-management/ui/dist/index11.js
CHANGED
|
@@ -35,6 +35,8 @@ function s({ open: s, onOpenChange: c, mode: l, values: u, errors: d, highlighte
|
|
|
35
35
|
accountHolderName: y.accountHolderNameLabel,
|
|
36
36
|
routingNumber: y.routingNumberLabel,
|
|
37
37
|
accountNumber: y.accountNumberLabel,
|
|
38
|
+
routingNumberPlaceholder: y.routingNumberPlaceholder,
|
|
39
|
+
accountNumberPlaceholder: y.accountNumberPlaceholder,
|
|
38
40
|
fieldMarkers: y.fieldMarkers
|
|
39
41
|
}
|
|
40
42
|
}), /* @__PURE__ */ a(e, {
|
package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index2.js
CHANGED
|
@@ -12,7 +12,7 @@ var n = {
|
|
|
12
12
|
city: "City",
|
|
13
13
|
state: "State",
|
|
14
14
|
statePlaceholder: "Select a state",
|
|
15
|
-
postalCode: "
|
|
15
|
+
postalCode: "Postal code",
|
|
16
16
|
country: "Country",
|
|
17
17
|
countryValue: "United States",
|
|
18
18
|
fieldMarkers: e
|
|
@@ -20,6 +20,8 @@ var n = {
|
|
|
20
20
|
accountHolderName: "Account holder name",
|
|
21
21
|
routingNumber: "Routing number",
|
|
22
22
|
accountNumber: "Account number",
|
|
23
|
+
routingNumberPlaceholder: "e.g., 123456789",
|
|
24
|
+
accountNumberPlaceholder: "e.g., 12345678",
|
|
23
25
|
fieldMarkers: e
|
|
24
26
|
}, a = {
|
|
25
27
|
createTitleOrganization: "Create organization",
|
|
@@ -67,10 +69,7 @@ var n = {
|
|
|
67
69
|
createButtonCustomer: "Save customer",
|
|
68
70
|
createButtonVendor: "Save vendor",
|
|
69
71
|
saveButton: "Save",
|
|
70
|
-
address:
|
|
71
|
-
...r,
|
|
72
|
-
postalCode: "Postal code"
|
|
73
|
-
},
|
|
72
|
+
address: r,
|
|
74
73
|
ach: i,
|
|
75
74
|
fieldMarkers: e,
|
|
76
75
|
requiredFieldsLegend: t
|
|
@@ -80,6 +79,8 @@ var n = {
|
|
|
80
79
|
accountHolderNameLabel: "Account holder name",
|
|
81
80
|
accountNumberLabel: "Account number",
|
|
82
81
|
routingNumberLabel: "Routing number",
|
|
82
|
+
accountNumberPlaceholder: i.accountNumberPlaceholder,
|
|
83
|
+
routingNumberPlaceholder: i.routingNumberPlaceholder,
|
|
83
84
|
helperText: "Ask your vendor for this — it's usually on their invoice, W-9, or a payment instructions email they send you.",
|
|
84
85
|
cancelButton: "Cancel",
|
|
85
86
|
saveButton: "Save",
|
package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index5.js
CHANGED
|
@@ -46,6 +46,7 @@ function s({ idPrefix: s, values: c, errors: l, highlighted: u, onChange: d, lab
|
|
|
46
46
|
/* @__PURE__ */ a(t, {
|
|
47
47
|
id: `${s}-routing-number`,
|
|
48
48
|
value: c.routingNumber,
|
|
49
|
+
placeholder: p.routingNumberPlaceholder,
|
|
49
50
|
"aria-required": !0,
|
|
50
51
|
"aria-invalid": !!(l?.routingNumber || u?.routingNumber),
|
|
51
52
|
onChange: (e) => d({ routingNumber: e.target.value })
|
|
@@ -64,6 +65,7 @@ function s({ idPrefix: s, values: c, errors: l, highlighted: u, onChange: d, lab
|
|
|
64
65
|
/* @__PURE__ */ a(t, {
|
|
65
66
|
id: `${s}-account-number`,
|
|
66
67
|
value: c.accountNumber,
|
|
68
|
+
placeholder: p.accountNumberPlaceholder,
|
|
67
69
|
"aria-required": !0,
|
|
68
70
|
"aria-invalid": !!(l?.accountNumber || u?.accountNumber),
|
|
69
71
|
onChange: (e) => d({ accountNumber: e.target.value })
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BILL_STATUS_BADGE_LABELS_EN as e } from "./index2.js";
|
|
2
|
+
import { BILL_STATUS_TONE_CLASS_NAME as t } from "./index3.js";
|
|
3
|
+
import { BillStatusBadge as n } from "./index4.js";
|
|
4
|
+
import "./index5.js";
|
|
5
|
+
import { RECEIVABLE_STATUS_BADGE_LABELS_EN as r } from "./index6.js";
|
|
6
|
+
import { ReceivableStatusBadge as i } from "./index7.js";
|
|
7
|
+
import "./index8.js";
|
|
8
|
+
export { e as BILL_STATUS_BADGE_LABELS_EN, t as BILL_STATUS_TONE_CLASS_NAME, n as BillStatusBadge, r as RECEIVABLE_STATUS_BADGE_LABELS_EN, i as ReceivableStatusBadge };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//#region ../../libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index2.js
|
|
2
|
+
var e = {
|
|
3
|
+
draft: "Draft",
|
|
4
|
+
ready_to_submit: "Ready to submit",
|
|
5
|
+
pending_approval: "Pending review",
|
|
6
|
+
ready_to_pay: "Ready to pay",
|
|
7
|
+
scheduled: "Scheduled",
|
|
8
|
+
paid: "Paid",
|
|
9
|
+
canceled: "Cancelled",
|
|
10
|
+
rejected: "Rejected",
|
|
11
|
+
unknown: "Unknown"
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
|
14
|
+
export { e as BILL_STATUS_BADGE_LABELS_EN };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region ../../libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index3.js
|
|
2
|
+
var e = {
|
|
3
|
+
accent: "ttw:border-violet-100 ttw:bg-violet-100 ttw:text-violet-700 ttw:hover:bg-violet-100",
|
|
4
|
+
committed: "ttw:border-cyan-200 ttw:bg-cyan-50 ttw:text-cyan-700 ttw:hover:bg-cyan-50",
|
|
5
|
+
danger: "ttw:border-destructive/20 ttw:bg-destructive/20 ttw:text-destructive ttw:hover:bg-destructive/20",
|
|
6
|
+
info: "ttw:border-blue-100 ttw:bg-blue-100 ttw:text-blue-700 ttw:hover:bg-blue-100",
|
|
7
|
+
neutral: "ttw:border-border ttw:bg-muted ttw:text-foreground ttw:hover:bg-muted",
|
|
8
|
+
settled: "ttw:border-border ttw:bg-background ttw:text-green-900 ttw:hover:bg-background",
|
|
9
|
+
success: "ttw:border-green-100 ttw:bg-green-100 ttw:text-green-700 ttw:hover:bg-green-100",
|
|
10
|
+
warning: "ttw:border-amber-100 ttw:bg-amber-100 ttw:text-amber-700 ttw:hover:bg-amber-100"
|
|
11
|
+
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { e as BILL_STATUS_TONE_CLASS_NAME };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Badge as e, cn as t } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { BILL_STATUS_BADGE_LABELS_EN as n } from "./index2.js";
|
|
3
|
+
import { BILL_STATUS_TONE_CLASS_NAME as r } from "./index3.js";
|
|
4
|
+
import { jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
//#region ../../libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index4.js
|
|
6
|
+
function a({ status: a, label: o, tone: s, labels: c, icon: l }) {
|
|
7
|
+
let u = {
|
|
8
|
+
...n,
|
|
9
|
+
...c
|
|
10
|
+
}, d = o ?? (a ? u[a] : u.unknown);
|
|
11
|
+
return /* @__PURE__ */ i(e, {
|
|
12
|
+
variant: "outline",
|
|
13
|
+
className: t(l && "ttw:gap-1", r[s]),
|
|
14
|
+
children: [l, d]
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
export { a as BillStatusBadge, a as default };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
//#region ../../libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index6.js
|
|
2
|
+
var e = {
|
|
3
|
+
draft: "Draft",
|
|
4
|
+
issuing: "Issuing",
|
|
5
|
+
issued: "Issued",
|
|
6
|
+
failed: "Failed",
|
|
7
|
+
accepted: "Accepted",
|
|
8
|
+
expired: "Expired",
|
|
9
|
+
declined: "Declined",
|
|
10
|
+
recurring: "Recurring",
|
|
11
|
+
partially_paid: "Partially paid",
|
|
12
|
+
paid: "Paid",
|
|
13
|
+
overdue: "Overdue",
|
|
14
|
+
uncollectible: "Uncollectible",
|
|
15
|
+
canceled: "Canceled",
|
|
16
|
+
deleted: "Deleted",
|
|
17
|
+
unknown: "Unknown"
|
|
18
|
+
};
|
|
19
|
+
//#endregion
|
|
20
|
+
export { e as RECEIVABLE_STATUS_BADGE_LABELS_EN };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Badge as e, cn as t } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { receivableFilledTone as n } from "../../util/dist/lib/receivableFilledTone.js";
|
|
3
|
+
import { RECEIVABLE_STATUS_BADGE_LABELS_EN as r } from "./index6.js";
|
|
4
|
+
import { jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
//#region ../../libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index7.js
|
|
6
|
+
var a = {
|
|
7
|
+
danger: "ttw:border-red-200 ttw:bg-red-50 ttw:text-red-700 ttw:hover:bg-red-50",
|
|
8
|
+
info: "ttw:border-blue-200 ttw:bg-blue-50 ttw:text-blue-700 ttw:hover:bg-blue-50",
|
|
9
|
+
neutral: "ttw:border-border ttw:bg-muted ttw:text-foreground ttw:hover:bg-muted",
|
|
10
|
+
success: "ttw:border-emerald-200 ttw:bg-emerald-50 ttw:text-emerald-700 ttw:hover:bg-emerald-50",
|
|
11
|
+
warning: "ttw:border-amber-200 ttw:bg-amber-50 ttw:text-amber-800 ttw:hover:bg-amber-50"
|
|
12
|
+
}, o = {
|
|
13
|
+
neutral: "ttw:bg-muted ttw:text-muted-foreground",
|
|
14
|
+
cyan: "ttw:bg-cyan-100 ttw:text-cyan-700",
|
|
15
|
+
success: "ttw:bg-green-100 ttw:text-green-700",
|
|
16
|
+
purple: "ttw:bg-purple-100 ttw:text-purple-700",
|
|
17
|
+
orange: "ttw:bg-orange-100 ttw:text-orange-700",
|
|
18
|
+
danger: "ttw:bg-destructive/10 ttw:text-destructive"
|
|
19
|
+
};
|
|
20
|
+
function s({ status: s, label: c, tone: l = "neutral", variant: u = "outline", filledTone: d, labels: f, icon: p }) {
|
|
21
|
+
let m = {
|
|
22
|
+
...r,
|
|
23
|
+
...f
|
|
24
|
+
}, h = c ?? (s && Object.hasOwn(m, s) ? m[s] : void 0) ?? m.unknown;
|
|
25
|
+
return /* @__PURE__ */ i(e, {
|
|
26
|
+
variant: "outline",
|
|
27
|
+
className: t(p && "ttw:gap-1", u === "filled" ? ["ttw:border-transparent", o[d ?? n(s)]] : a[l]),
|
|
28
|
+
children: [p, h]
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
32
|
+
export { s as ReceivableStatusBadge, s as default };
|
|
@@ -1,25 +1,38 @@
|
|
|
1
|
-
//#region ../../libs/tesouro-embedded-components-react/
|
|
2
|
-
var e =
|
|
1
|
+
//#region ../../libs/tesouro-embedded-components-react/shared/document-status/util/dist/lib/derivePayableStatus.js
|
|
2
|
+
var e = [
|
|
3
|
+
"draft",
|
|
4
|
+
"new",
|
|
5
|
+
"approve_in_progress",
|
|
6
|
+
"waiting_to_be_paid",
|
|
7
|
+
"partially_paid",
|
|
8
|
+
"paid",
|
|
9
|
+
"canceled",
|
|
10
|
+
"rejected"
|
|
11
|
+
];
|
|
12
|
+
function t(t) {
|
|
13
|
+
return e.includes(t);
|
|
14
|
+
}
|
|
15
|
+
var n = /* @__PURE__ */ new Set([
|
|
3
16
|
"new",
|
|
4
17
|
"approve_in_progress",
|
|
5
18
|
"waiting_to_be_paid",
|
|
6
19
|
"partially_paid"
|
|
7
20
|
]);
|
|
8
|
-
function
|
|
9
|
-
return !!(
|
|
21
|
+
function r(e) {
|
|
22
|
+
return !!(e && n.has(e));
|
|
10
23
|
}
|
|
11
|
-
function
|
|
24
|
+
function i(e, t) {
|
|
12
25
|
let n = /* @__PURE__ */ new Date(`${e.slice(0, 10)}T00:00:00Z`), r = Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate());
|
|
13
26
|
return n.getTime() < r;
|
|
14
27
|
}
|
|
15
|
-
function
|
|
16
|
-
if (
|
|
28
|
+
function a({ apiStatus: e, dueDate: t, scheduledPaymentDate: r, hasScheduledPayment: a = !!r, now: o = /* @__PURE__ */ new Date() }) {
|
|
29
|
+
if (n.has(e) && a) return {
|
|
17
30
|
status: "scheduled",
|
|
18
31
|
tone: "committed",
|
|
19
32
|
isOverdue: !1
|
|
20
33
|
};
|
|
21
|
-
let s = !!(
|
|
22
|
-
switch (
|
|
34
|
+
let s = !!(n.has(e) && t && i(t, o));
|
|
35
|
+
switch (e) {
|
|
23
36
|
case "draft": return {
|
|
24
37
|
status: "draft",
|
|
25
38
|
tone: "neutral",
|
|
@@ -59,4 +72,4 @@ function r({ apiStatus: t, dueDate: r, scheduledPaymentDate: i, hasScheduledPaym
|
|
|
59
72
|
}
|
|
60
73
|
}
|
|
61
74
|
//#endregion
|
|
62
|
-
export {
|
|
75
|
+
export { a as derivePayableStatus, r as hasUnpaidBalance, t as isPayableApiStatus };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
//#region ../../libs/tesouro-embedded-components-react/shared/document-status/util/dist/lib/receivableFilledTone.js
|
|
2
|
+
var e = {
|
|
3
|
+
draft: "neutral",
|
|
4
|
+
recurring: "neutral",
|
|
5
|
+
issuing: "cyan",
|
|
6
|
+
issued: "cyan",
|
|
7
|
+
accepted: "success",
|
|
8
|
+
paid: "success",
|
|
9
|
+
partially_paid: "purple",
|
|
10
|
+
overdue: "orange",
|
|
11
|
+
failed: "danger",
|
|
12
|
+
expired: "danger",
|
|
13
|
+
uncollectible: "danger",
|
|
14
|
+
canceled: "danger",
|
|
15
|
+
declined: "danger",
|
|
16
|
+
deleted: "danger"
|
|
17
|
+
};
|
|
18
|
+
function t(t) {
|
|
19
|
+
return t && Object.hasOwn(e, t) ? e[t] : "neutral";
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
export { t as receivableFilledTone };
|
package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
|
|
2
|
-
var e = "@tesouro/embedded-components-react", t = "0.7.
|
|
2
|
+
var e = "@tesouro/embedded-components-react", t = "0.7.47", n = "ad21e86180dac92a4ba68599ca9bb85fa35b75bb", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|
package/package.json
CHANGED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Badge as e, cn as t } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
-
import { BILL_STATUS_BADGE_LABELS_EN as n } from "./index12.js";
|
|
3
|
-
import { BADGE_TONE_CLASS_NAME as r } from "./index13.js";
|
|
4
|
-
import { jsxs as i } from "react/jsx-runtime";
|
|
5
|
-
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index14.js
|
|
6
|
-
function a({ status: a, tone: o, labels: s, icon: c }) {
|
|
7
|
-
let l = {
|
|
8
|
-
...n,
|
|
9
|
-
...s
|
|
10
|
-
}, u = l[a] ?? l.unknown;
|
|
11
|
-
return /* @__PURE__ */ i(e, {
|
|
12
|
-
variant: "outline",
|
|
13
|
-
className: t(c && "ttw:gap-1", r[o]),
|
|
14
|
-
children: [c, u]
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
//#endregion
|
|
18
|
-
export { a as BillStatusBadge, a as default };
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { Button as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
-
import { REVEALABLE_FIELD_LABELS_EN as t } from "./index24.js";
|
|
3
|
-
import { useState as n } from "react";
|
|
4
|
-
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
-
import { Eye as a, EyeOff as o } from "lucide-react";
|
|
6
|
-
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js
|
|
7
|
-
function s({ field: s, labels: c }) {
|
|
8
|
-
let l = {
|
|
9
|
-
...t,
|
|
10
|
-
...c
|
|
11
|
-
}, [u, d] = n(!1), f = s.maskedValue && !u ? s.maskedValue : s.value;
|
|
12
|
-
return /* @__PURE__ */ i("div", {
|
|
13
|
-
className: "ttw:flex ttw:items-start ttw:justify-between ttw:gap-3",
|
|
14
|
-
children: [/* @__PURE__ */ i("div", {
|
|
15
|
-
className: "ttw:min-w-0",
|
|
16
|
-
children: [/* @__PURE__ */ r("dt", {
|
|
17
|
-
className: "ttw:text-xs ttw:text-muted-foreground",
|
|
18
|
-
children: s.label
|
|
19
|
-
}), /* @__PURE__ */ r("dd", {
|
|
20
|
-
className: "ttw:break-words ttw:text-sm ttw:font-medium",
|
|
21
|
-
children: f
|
|
22
|
-
})]
|
|
23
|
-
}), s.maskedValue ? /* @__PURE__ */ r(e, {
|
|
24
|
-
type: "button",
|
|
25
|
-
variant: "ghost",
|
|
26
|
-
size: "icon",
|
|
27
|
-
"aria-label": u ? l.hideValue : l.revealValue,
|
|
28
|
-
onClick: () => d((e) => !e),
|
|
29
|
-
children: r(u ? o : a, { className: "ttw:size-4" })
|
|
30
|
-
}) : null]
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
//#endregion
|
|
34
|
-
export { s as RevealableField, s as default };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Fragment as e } from "react";
|
|
2
|
-
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
-
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index47.js
|
|
4
|
-
function r({ lines: r }) {
|
|
5
|
-
return r.map((r, i) => /* @__PURE__ */ n(e, { children: [i > 0 && /* @__PURE__ */ t("br", {}), r] }, `${i}-${r}`));
|
|
6
|
-
}
|
|
7
|
-
//#endregion
|
|
8
|
-
export { r as PreviewLines };
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { AlertDialog as e, AlertDialogContent as t, AlertDialogDescription as n, AlertDialogFooter as r, AlertDialogHeader as i, AlertDialogTitle as a, Button as o } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
-
import { UNSAVED_INVOICE_DIALOG_LABELS_EN as s } from "./index14.js";
|
|
3
|
-
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
4
|
-
import { XIcon as u } from "lucide-react";
|
|
5
|
-
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index58.js
|
|
6
|
-
function d({ open: d, onSaveDraft: f, onDiscard: p, onCancel: m, isSaving: h, isSaveDraftDisabled: g, labels: _ }) {
|
|
7
|
-
let v = {
|
|
8
|
-
...s,
|
|
9
|
-
..._
|
|
10
|
-
};
|
|
11
|
-
return /* @__PURE__ */ c(e, {
|
|
12
|
-
open: d,
|
|
13
|
-
onOpenChange: (e) => {
|
|
14
|
-
!e && !h && m();
|
|
15
|
-
},
|
|
16
|
-
children: /* @__PURE__ */ l(t, { children: [
|
|
17
|
-
/* @__PURE__ */ l("button", {
|
|
18
|
-
type: "button",
|
|
19
|
-
onClick: m,
|
|
20
|
-
disabled: h,
|
|
21
|
-
className: "ttw:absolute ttw:right-4 ttw:top-4 ttw:cursor-pointer ttw:rounded-sm ttw:opacity-70 ttw:ring-offset-background ttw:transition-opacity ttw:hover:opacity-100 ttw:focus:outline-hidden ttw:focus:ring-2 ttw:focus:ring-ring ttw:focus:ring-offset-2 ttw:disabled:pointer-events-none",
|
|
22
|
-
children: [/* @__PURE__ */ c(u, { className: "ttw:size-4" }), /* @__PURE__ */ c("span", {
|
|
23
|
-
className: "ttw:sr-only",
|
|
24
|
-
children: v.unsavedCloseButton
|
|
25
|
-
})]
|
|
26
|
-
}),
|
|
27
|
-
/* @__PURE__ */ l(i, { children: [/* @__PURE__ */ c(a, { children: v.unsavedTitle }), /* @__PURE__ */ c(n, { children: v.unsavedDescription })] }),
|
|
28
|
-
/* @__PURE__ */ l(r, { children: [/* @__PURE__ */ c(o, {
|
|
29
|
-
type: "button",
|
|
30
|
-
variant: "outline",
|
|
31
|
-
onClick: p,
|
|
32
|
-
disabled: h,
|
|
33
|
-
children: v.unsavedDiscardButton
|
|
34
|
-
}), /* @__PURE__ */ c(o, {
|
|
35
|
-
type: "button",
|
|
36
|
-
loading: h,
|
|
37
|
-
disabled: h || g,
|
|
38
|
-
onClick: f,
|
|
39
|
-
children: v.unsavedSaveDraftButton
|
|
40
|
-
})] })
|
|
41
|
-
] })
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
//#endregion
|
|
45
|
-
export { d as UnsavedInvoiceDialog, d as default };
|