@tesouro/embedded-components-react 0.5.257 → 0.5.259
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/README.md +2 -1
- package/dist/fixtures/index.d.ts +1 -1
- package/dist/index.css +109 -9
- package/dist/index.d.ts +41 -10
- package/dist/lib/ReceivablesWidget.d.ts +41 -10
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index.js +11 -10
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index10.js +42 -94
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index11.js +91 -76
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index12.js +67 -173
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index13.js +186 -17
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index14.js +27 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index4.js +28 -72
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index5.js +128 -53
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index6.js +66 -28
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index7.js +28 -34
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index8.js +24 -168
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index9.js +173 -44
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +274 -267
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/helpers.js +99 -95
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/labels.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/paymentTerms.js +28 -25
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/preview.js +49 -43
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/unsavedChanges.js +13 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableActions.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableActionsModal.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableAttachmentUploads.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableBankAccount.js +77 -72
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableDetails.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableForm.js +363 -295
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableIssuePreflight.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablePaymentRecord.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablePreview.js +36 -21
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableReminders.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableStatusCards.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesTable.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +12 -10
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index13.js +21 -14
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index15.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index16.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index20.js +68 -64
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index38.js +383 -379
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index40.js +22 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index41.js +8 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index43.js +258 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index44.js +2 -100
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index45.js +95 -23
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index46.js +23 -231
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index47.js +237 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index48.js +3 -249
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index49.js +234 -78
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index50.js +87 -53
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index51.js +49 -349
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index52.js +359 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index53.js +45 -0
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +40 -40
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js +247 -214
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +175 -147
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/zod.gen.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/feature/dist/index.js +12 -12
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/ui/dist/index2.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/ui/dist/index6.js +109 -89
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index42.js +0 -4
|
@@ -6,7 +6,7 @@ import { useMyEntityQuery as e } from "../../../../../shared/data-access/dist/li
|
|
|
6
6
|
import "../../../../../shared/data-access/dist/index.js";
|
|
7
7
|
import { useCounterpartQuery as t } from "../../../../../shared/counterpart-management/data-access/dist/index3.js";
|
|
8
8
|
import "../../../../../shared/counterpart-management/feature/dist/index.js";
|
|
9
|
-
import { useReceivableRequiredFieldsQuery as n } from "../../../../data-access/dist/
|
|
9
|
+
import { useReceivableRequiredFieldsQuery as n } from "../../../../data-access/dist/index12.js";
|
|
10
10
|
import "../../../../data-access/dist/index.js";
|
|
11
11
|
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableIssuePreflight.js
|
|
12
12
|
function r({ counterpartId: r, billingAddressId: i, billingCountry: a }) {
|
|
@@ -11,7 +11,7 @@ import { useWidgetConfig as r } from "../../../../../shared/feature/dist/lib/Wid
|
|
|
11
11
|
import "../../../../../shared/feature/dist/index.js";
|
|
12
12
|
import { getCurrencySymbol as i } from "./lineItems.js";
|
|
13
13
|
import { formatMoney as a } from "./helpers.js";
|
|
14
|
-
import { useCreateReceivablePaymentRecordMutation as o } from "../../../../data-access/dist/
|
|
14
|
+
import { useCreateReceivablePaymentRecordMutation as o } from "../../../../data-access/dist/index11.js";
|
|
15
15
|
import "../../../../data-access/dist/index.js";
|
|
16
16
|
import { amountDueInputValue as s, buildPaymentRecordPayload as c, buildPaymentReviewView as l, defaultPaymentRecordValues as u, hasPaymentRecordErrors as d, validatePaymentRecordValues as f } from "./paymentRecord.js";
|
|
17
17
|
import { useCallback as p, useState as m } from "react";
|
|
@@ -7,31 +7,46 @@ import { usePaymentTermsQuery as t } from "../../../../../shared/data-access/dis
|
|
|
7
7
|
import "../../../../../shared/data-access/dist/index.js";
|
|
8
8
|
import { useCounterpartQuery as n } from "../../../../../shared/counterpart-management/data-access/dist/index3.js";
|
|
9
9
|
import "../../../../../shared/counterpart-management/feature/dist/index.js";
|
|
10
|
+
import { useEntityPaymentMethodsQuery as r, useEntitySettingsQuery as i } from "../../../../data-access/dist/index4.js";
|
|
10
11
|
import "../../../../data-access/dist/index.js";
|
|
11
|
-
import { buildReceivablePreviewView as
|
|
12
|
-
import { useMemo as
|
|
12
|
+
import { buildReceivablePreviewView as a, displaysBankAccount as o, hasReceivePaymentMethod as s } from "./preview.js";
|
|
13
|
+
import { useMemo as c } from "react";
|
|
13
14
|
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablePreview.js
|
|
14
|
-
function
|
|
15
|
-
let
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
15
|
+
function l({ values: l, totals: u, billingAddress: d, bankAccount: f, unitNamesById: p, messages: m, enabled: h = !0 }) {
|
|
16
|
+
let g = e({ enabled: h }), _ = n(h && l.customerId || void 0), v = t({ enabled: h }), y = g.data?.id, b = r({
|
|
17
|
+
entityId: y,
|
|
18
|
+
enabled: h
|
|
19
|
+
}), x = i({
|
|
20
|
+
entityId: y,
|
|
21
|
+
enabled: h
|
|
22
|
+
}), S = g.data, C = s(b.data?.data), w = o(x.data?.document_rendering), T = c(() => f && w ? {
|
|
23
|
+
accountHolderName: f.accountHolderName,
|
|
24
|
+
routingNumber: f.routingNumber,
|
|
25
|
+
accountNumber: f.accountNumber
|
|
26
|
+
} : void 0, [f, w]), E = _.data, D = v.data?.data;
|
|
27
|
+
return c(() => a({
|
|
28
|
+
values: l,
|
|
29
|
+
totals: u,
|
|
30
|
+
entity: S,
|
|
31
|
+
counterpart: E,
|
|
32
|
+
billingAddress: d,
|
|
33
|
+
paymentTerms: D,
|
|
34
|
+
unitNamesById: p,
|
|
35
|
+
bankDetails: T,
|
|
36
|
+
canReceivePayments: C,
|
|
37
|
+
messages: m
|
|
25
38
|
}), [
|
|
26
|
-
|
|
27
|
-
|
|
39
|
+
T,
|
|
40
|
+
d,
|
|
41
|
+
C,
|
|
42
|
+
E,
|
|
43
|
+
S,
|
|
28
44
|
m,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
a
|
|
45
|
+
D,
|
|
46
|
+
u,
|
|
47
|
+
p,
|
|
48
|
+
l
|
|
34
49
|
]);
|
|
35
50
|
}
|
|
36
51
|
//#endregion
|
|
37
|
-
export {
|
|
52
|
+
export { l as useReceivablePreview };
|
|
@@ -9,7 +9,7 @@ import "../../../../../shared/ui/dist/index.js";
|
|
|
9
9
|
import { useWidgetConfig as r } from "../../../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
10
10
|
import "../../../../../shared/feature/dist/index.js";
|
|
11
11
|
import { areOverdueTermsValid as i, buildOverdueReminderPayload as a, buildPaymentReminderPayload as o, buildRemindersView as s, canCreateReminders as c, getImpliedDueDate as l, isBeforeDueDaysValid as u, sanitizeReminderDays as d } from "./reminders.js";
|
|
12
|
-
import { useCreateOverdueReminderMutation as f, useCreatePaymentReminderMutation as p, useOverdueRemindersQuery as m, usePaymentRemindersQuery as h } from "../../../../data-access/dist/
|
|
12
|
+
import { useCreateOverdueReminderMutation as f, useCreatePaymentReminderMutation as p, useOverdueRemindersQuery as m, usePaymentRemindersQuery as h } from "../../../../data-access/dist/index13.js";
|
|
13
13
|
import "../../../../data-access/dist/index.js";
|
|
14
14
|
import { useCallback as g, useMemo as _, useState as v } from "react";
|
|
15
15
|
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableReminders.js
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import { useReceivablesAnalyticsQuery as e } from "../../../../data-access/dist/
|
|
5
|
+
import { useReceivablesAnalyticsQuery as e } from "../../../../data-access/dist/index14.js";
|
|
6
6
|
import "../../../../data-access/dist/index.js";
|
|
7
7
|
import { buildReceivableStatusCardsView as t } from "./statusCards.js";
|
|
8
8
|
import { useMemo as n } from "react";
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { useWidgetConfig as e } from "../../../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
6
6
|
import "../../../../../shared/feature/dist/index.js";
|
|
7
7
|
import { buildReceivableRows as t, statusFilterOptions as n, typeForTab as r } from "./helpers.js";
|
|
8
|
-
import { useReceivablesQuery as i } from "../../../../data-access/dist/
|
|
8
|
+
import { useReceivablesQuery as i } from "../../../../data-access/dist/index12.js";
|
|
9
9
|
import "../../../../data-access/dist/index.js";
|
|
10
10
|
import { canRecordPayments as a } from "./paymentRecord.js";
|
|
11
11
|
import { useInvoicesFilter as o } from "./useInvoicesFilter.js";
|
|
@@ -18,14 +18,16 @@ import "./index22.js";
|
|
|
18
18
|
import { RECEIVABLE_DETAILS_SECTION as u } from "./index25.js";
|
|
19
19
|
import { ReceivableDetailsPanel as d } from "./index34.js";
|
|
20
20
|
import "./index35.js";
|
|
21
|
-
import {
|
|
21
|
+
import { ReceivableFormDialog as f } from "./index38.js";
|
|
22
22
|
import { ReceivablePaymentDialog as p } from "./index39.js";
|
|
23
|
-
import "./
|
|
24
|
-
import "./index43.js";
|
|
25
|
-
import
|
|
26
|
-
import {
|
|
27
|
-
import "./index47.js";
|
|
28
|
-
import
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
|
|
23
|
+
import "./index40.js";
|
|
24
|
+
import { ReceivablePreview as m } from "./index43.js";
|
|
25
|
+
import "./index44.js";
|
|
26
|
+
import { ReceivableRecurrenceEmailDialog as h } from "./index45.js";
|
|
27
|
+
import { ReceivableRecurrenceSection as g } from "./index47.js";
|
|
28
|
+
import "./index48.js";
|
|
29
|
+
import { ReceivableRemindersSection as _ } from "./index49.js";
|
|
30
|
+
import { ReceivableSendDialog as v } from "./index50.js";
|
|
31
|
+
import { ReceivablesScreen as y } from "./index52.js";
|
|
32
|
+
import { UnsavedInvoiceDialog as b } from "./index53.js";
|
|
33
|
+
export { t as InvoicesFilterBar, e as InvoicesFilterField, u as RECEIVABLE_DETAILS_SECTION, s as RECEIVABLE_PAYMENT_TERMS_CUSTOM_DATE, c as RECEIVABLE_PAYMENT_TERMS_RECEIPT_DUE, r as RECEIVABLE_STATUS_BADGE_LABELS_EN, i as ReceivableActionDialog, n as ReceivableActionsModal, o as ReceivableAttachmentsSection, a as ReceivableBankAccountSection, l as ReceivableBillingSection, d as ReceivableDetailsPanel, f as ReceivableFormDialog, p as ReceivablePaymentDialog, m as ReceivablePreview, h as ReceivableRecurrenceEmailDialog, g as ReceivableRecurrenceSection, _ as ReceivableRemindersSection, v as ReceivableSendDialog, y as ReceivablesScreen, b as UnsavedInvoiceDialog };
|
|
@@ -63,18 +63,25 @@ var r = {
|
|
|
63
63
|
accessRestrictedDescription: "You don’t have permissions to view this page. Contact your system administrator for details.",
|
|
64
64
|
statusBadge: r
|
|
65
65
|
}, o = {
|
|
66
|
+
unsavedTitle: "Save this invoice as a draft?",
|
|
67
|
+
unsavedDescription: "This invoice has changes that have not been saved. Save it as a draft to finish later, or discard the changes.",
|
|
68
|
+
unsavedDiscardButton: "Discard changes",
|
|
69
|
+
unsavedSaveDraftButton: "Save as draft",
|
|
70
|
+
unsavedCloseButton: "Close"
|
|
71
|
+
}, s = {
|
|
66
72
|
...e,
|
|
67
73
|
...n,
|
|
68
74
|
...t,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
75
|
+
...o,
|
|
76
|
+
createTitle: "Create invoice",
|
|
77
|
+
createDescription: "Create and issue an invoice to your customers",
|
|
78
|
+
editTitle: "Edit invoice",
|
|
79
|
+
editDescription: "Invoice details",
|
|
80
|
+
closeButton: "Close",
|
|
81
|
+
customerHeading: "Customer details",
|
|
82
|
+
customerDescription: "Who are you billing?",
|
|
83
|
+
customerEmailLabel: "Email",
|
|
84
|
+
addCustomerDetailsButton: "Add more details including address, phone, etc.",
|
|
78
85
|
issueDateLabel: "Issue date",
|
|
79
86
|
dueDateLabel: "Due date",
|
|
80
87
|
lineItemsHeading: "Products and services",
|
|
@@ -152,7 +159,7 @@ var r = {
|
|
|
152
159
|
reminderAddTermButton: "Add",
|
|
153
160
|
reminderClearButton: "Clear",
|
|
154
161
|
reminderSaveButton: "Save"
|
|
155
|
-
},
|
|
162
|
+
}, c = {
|
|
156
163
|
hiddenDescription: "Invoice details",
|
|
157
164
|
loadingTitle: "Loading...",
|
|
158
165
|
errorTitle: "Invoice not found",
|
|
@@ -207,7 +214,7 @@ var r = {
|
|
|
207
214
|
resumeRecurrenceButton: "Resume series",
|
|
208
215
|
cancelRecurrenceButton: "Cancel series",
|
|
209
216
|
recurringBadge: "Recurring"
|
|
210
|
-
},
|
|
217
|
+
}, l = {
|
|
211
218
|
title: "Send receivable",
|
|
212
219
|
description: "Send this document to the customer by email.",
|
|
213
220
|
toLabel: "To",
|
|
@@ -217,7 +224,7 @@ var r = {
|
|
|
217
224
|
bodyLabel: "Message",
|
|
218
225
|
cancelButton: "Cancel",
|
|
219
226
|
sendButton: "Send"
|
|
220
|
-
},
|
|
227
|
+
}, u = {
|
|
221
228
|
title: "Record payment",
|
|
222
229
|
amountLabel: "Amount",
|
|
223
230
|
amountPlaceholder: "0",
|
|
@@ -235,11 +242,11 @@ var r = {
|
|
|
235
242
|
reviewWarning: "Please, check the details of your payment record. You won't be able to change or delete it after.",
|
|
236
243
|
editRecordButton: "Edit record",
|
|
237
244
|
confirmButton: "Confirm"
|
|
238
|
-
},
|
|
245
|
+
}, d = {
|
|
239
246
|
cancelButton: "Cancel",
|
|
240
247
|
confirmButton: "Confirm",
|
|
241
248
|
commentLabel: "Comment (optional)",
|
|
242
249
|
commentPlaceholder: "Add a comment"
|
|
243
250
|
};
|
|
244
251
|
//#endregion
|
|
245
|
-
export { a as RECEIVABLES_SCREEN_LABELS_EN,
|
|
252
|
+
export { a as RECEIVABLES_SCREEN_LABELS_EN, d as RECEIVABLE_ACTION_DIALOG_LABELS_EN, c as RECEIVABLE_DETAILS_PANEL_LABELS_EN, s as RECEIVABLE_FORM_DIALOG_LABELS_EN, u as RECEIVABLE_PAYMENT_DIALOG_LABELS_EN, l as RECEIVABLE_SEND_DIALOG_LABELS_EN, r as RECEIVABLE_STATUS_BADGE_LABELS_EN, i as RECEIVABLE_STATUS_CARDS_LABELS_EN, o as UNSAVED_INVOICE_DIALOG_LABELS_EN };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Alert as e, AlertDescription as t, AlertTitle as n, Badge as r, Button as i, Field as a, FieldContent as o, FieldError as s, FieldLabel as c, Input as l, Select as u, SelectContent as d, SelectItem as f, SelectSeparator as p, SelectTrigger as m, SelectValue as h, Skeleton as g, Typography as _ } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
-
import {
|
|
2
|
+
import { RECEIVABLE_FORM_DIALOG_LABELS_EN as v } from "./index13.js";
|
|
3
3
|
import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
4
4
|
import { PlusIcon as S, TriangleAlertIcon as C } from "lucide-react";
|
|
5
5
|
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index15.js
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Button as e, Checkbox as t, Separator as n, Typography as r, cn as i } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
-
import {
|
|
2
|
+
import { RECEIVABLE_FORM_DIALOG_LABELS_EN as a } from "./index13.js";
|
|
3
3
|
import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
4
4
|
import { FileText as l, ImageIcon as u, Loader2 as d, Trash2 as f, X as p } from "lucide-react";
|
|
5
5
|
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index16.js
|
|
@@ -5,11 +5,11 @@ import { OptionRow as v } from "./index17.js";
|
|
|
5
5
|
import { SelectionValue as y } from "./index18.js";
|
|
6
6
|
import { jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
7
7
|
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index20.js
|
|
8
|
-
function S({ idPrefix: S, paymentTerms: C, paymentTermsError: w, disabled: T, onPaymentTermsChange: E, onCustomDatePickerOpenChange: D, customDateCalendar: O, recurrenceSection: k,
|
|
9
|
-
let
|
|
8
|
+
function S({ idPrefix: S, paymentTerms: C, paymentTermsError: w, disabled: T, onPaymentTermsChange: E, onCustomDatePickerOpenChange: D, customDateCalendar: O, recurrenceSection: k, remindersSection: A, labels: j }) {
|
|
9
|
+
let M = {
|
|
10
10
|
...g,
|
|
11
|
-
...
|
|
12
|
-
},
|
|
11
|
+
...j
|
|
12
|
+
}, N = `${S}-payment-terms`, P = () => {
|
|
13
13
|
window.setTimeout(() => D(!0), 0);
|
|
14
14
|
};
|
|
15
15
|
return /* @__PURE__ */ x("div", {
|
|
@@ -18,76 +18,80 @@ function S({ idPrefix: S, paymentTerms: C, paymentTermsError: w, disabled: T, on
|
|
|
18
18
|
className: "ttw:flex ttw:flex-col ttw:gap-2.5 ttw:pb-4",
|
|
19
19
|
children: [/* @__PURE__ */ b(h, {
|
|
20
20
|
variant: "h4",
|
|
21
|
-
children:
|
|
21
|
+
children: M.billingHeading
|
|
22
22
|
}), /* @__PURE__ */ b(h, {
|
|
23
23
|
variant: "body2",
|
|
24
24
|
color: "muted",
|
|
25
25
|
className: "ttw:font-medium",
|
|
26
|
-
children:
|
|
26
|
+
children: M.billingDescription
|
|
27
27
|
})]
|
|
28
28
|
}), /* @__PURE__ */ x("div", {
|
|
29
29
|
className: "ttw:flex ttw:flex-col ttw:gap-6",
|
|
30
|
-
children: [
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
children: /* @__PURE__ */ b(
|
|
49
|
-
id: M,
|
|
30
|
+
children: [
|
|
31
|
+
k,
|
|
32
|
+
/* @__PURE__ */ b("div", {
|
|
33
|
+
className: "ttw:flex ttw:w-full ttw:items-start ttw:gap-2.5",
|
|
34
|
+
children: C.kind === "loading" ? /* @__PURE__ */ b(m, { className: "ttw:h-9 ttw:w-full" }) : /* @__PURE__ */ b(e, { children: /* @__PURE__ */ x(t, { children: [
|
|
35
|
+
/* @__PURE__ */ b(i, {
|
|
36
|
+
htmlFor: N,
|
|
37
|
+
children: M.paymentTermsLabel
|
|
38
|
+
}),
|
|
39
|
+
/* @__PURE__ */ x(a, {
|
|
40
|
+
open: C.customDatePicker.open,
|
|
41
|
+
onOpenChange: D,
|
|
42
|
+
children: [/* @__PURE__ */ x(c, {
|
|
43
|
+
disabled: T,
|
|
44
|
+
value: C.value,
|
|
45
|
+
onValueChange: (e) => {
|
|
46
|
+
E(e), e === "custom" && P();
|
|
47
|
+
},
|
|
48
|
+
children: [/* @__PURE__ */ b(o, {
|
|
50
49
|
className: "ttw:w-full",
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
50
|
+
children: /* @__PURE__ */ b(f, {
|
|
51
|
+
id: N,
|
|
52
|
+
className: "ttw:w-full",
|
|
53
|
+
"aria-invalid": !!w,
|
|
54
|
+
children: /* @__PURE__ */ b(p, {
|
|
55
|
+
placeholder: M.paymentTermsPlaceholder,
|
|
56
|
+
children: /* @__PURE__ */ b(y, {
|
|
57
|
+
selection: C.selection,
|
|
58
|
+
labels: M
|
|
59
|
+
})
|
|
57
60
|
})
|
|
58
61
|
})
|
|
59
|
-
})
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
})
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
62
|
+
}), /* @__PURE__ */ x(l, { children: [
|
|
63
|
+
/* @__PURE__ */ b(u, {
|
|
64
|
+
value: _,
|
|
65
|
+
children: M.paymentTermsReceiptDue
|
|
66
|
+
}),
|
|
67
|
+
C.showCustomDate && /* @__PURE__ */ b(u, {
|
|
68
|
+
value: "custom",
|
|
69
|
+
onPointerUp: P,
|
|
70
|
+
onClick: P,
|
|
71
|
+
onKeyDown: (e) => {
|
|
72
|
+
(e.key === "Enter" || e.key === " ") && P();
|
|
73
|
+
},
|
|
74
|
+
children: M.paymentTermsCustomDate
|
|
75
|
+
}),
|
|
76
|
+
/* @__PURE__ */ b(d, {}),
|
|
77
|
+
C.options.map((e) => /* @__PURE__ */ b(u, {
|
|
78
|
+
value: e.value,
|
|
79
|
+
children: /* @__PURE__ */ b(v, { option: e })
|
|
80
|
+
}, e.value))
|
|
81
|
+
] })]
|
|
82
|
+
}), /* @__PURE__ */ b(s, {
|
|
83
|
+
className: "ttw:w-auto ttw:overflow-hidden ttw:p-0",
|
|
84
|
+
align: "start",
|
|
85
|
+
onFocusOutside: (e) => e.preventDefault(),
|
|
86
|
+
children: O
|
|
87
|
+
})]
|
|
88
|
+
}),
|
|
89
|
+
C.description && /* @__PURE__ */ b(n, { children: C.description }),
|
|
90
|
+
/* @__PURE__ */ b(r, { errors: w ? [{ message: w }] : [] })
|
|
91
|
+
] }) })
|
|
92
|
+
}),
|
|
93
|
+
A
|
|
94
|
+
]
|
|
91
95
|
})]
|
|
92
96
|
});
|
|
93
97
|
}
|