@tesouro/embedded-components-react 0.5.227 → 0.5.230
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 +22 -21
- package/dist/index.d.ts +87 -34
- package/dist/index.js +1 -1
- package/dist/lib/ReceivablesWidget.d.ts +87 -34
- package/dist/lib/ReceivablesWidget.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index10.js +29 -59
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index11.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index5.js +32 -33
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index6.js +34 -32
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index7.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index10.js +120 -52
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index11.js +44 -100
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index12.js +93 -442
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index13.js +356 -201
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index14.js +225 -157
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index15.js +152 -21
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index16.js +18 -221
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index17.js +220 -31
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index18.js +125 -124
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index19.js +58 -150
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index20.js +232 -46
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index21.js +303 -122
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index22.js +43 -58
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index23.js +125 -98
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index24.js +140 -106
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index25.js +46 -232
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index26.js +119 -29
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index27.js +81 -613
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index28.js +116 -39
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index29.js +27 -33
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index30.js +634 -72
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index31.js +39 -119
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index32.js +36 -317
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index33.js +82 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index34.js +139 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index35.js +340 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index5.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index7.js +15 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index8.js +55 -468
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index9.js +443 -97
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +24 -22
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index10.js +32 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index11.js +205 -84
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index12.js +161 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index13.js +12 -20
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js +25 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index15.js +4 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index16.js +95 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index17.js +3 -18
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index18.js +24 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index19.js +42 -4
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index2.js +14 -7
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index20.js +19 -12
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index21.js +73 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index22.js +17 -261
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index23.js +12 -44
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index24.js +28 -68
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index25.js +288 -479
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index26.js +1 -106
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index27.js +48 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index28.js +72 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index29.js +496 -4
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index3.js +121 -27
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index30.js +106 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index32.js +2 -28
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index33.js +4 -236
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index34.js +0 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index35.js +90 -239
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index36.js +24 -89
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index37.js +231 -54
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index38.js +3 -353
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index39.js +249 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index4.js +100 -207
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index40.js +93 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index41.js +59 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index42.js +353 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index5.js +35 -29
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index6.js +2 -216
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index7.js +9 -159
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index8.js +27 -14
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index9.js +216 -23
- 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 +189 -211
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +43 -59
- 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/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index31.js +0 -100
package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index14.js
CHANGED
|
@@ -1,159 +1,227 @@
|
|
|
1
|
-
import { hasAnyScope as e } from "../../../shared/data-access/dist/lib/hasAnyScope.js";
|
|
2
|
-
import { Scope as t } from "../../../shared/data-access/dist/lib/scopes.js";
|
|
3
|
-
import "../../../shared/data-access/dist/index.js";
|
|
4
|
-
import { getCounterpartEmail as n } from "../../../shared/counterpart-management/feature/dist/lib/helpers.js";
|
|
5
|
-
import "../../../shared/counterpart-management/feature/dist/index.js";
|
|
6
|
-
import { RECEIVABLE_PAYMENT_TERMS_RECEIPT_DUE as r } from "../../ui/dist/index10.js";
|
|
7
|
-
import "../../ui/dist/index.js";
|
|
8
1
|
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index14.js
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
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
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
}
|
|
2
|
+
var e = {
|
|
3
|
+
customerRequired: "Customer is required",
|
|
4
|
+
customerAddressRequired: "The selected customer needs a billing address before a receivable can be created.",
|
|
5
|
+
currencyRequired: "Currency is required",
|
|
6
|
+
lineItemNameTooLong: "Product name must be 100 characters or less",
|
|
7
|
+
lineItemPriceTooHigh: "Price must be {maxAmount} or less",
|
|
8
|
+
discountPercentageTooHigh: "Discount % cannot exceed 100%",
|
|
9
|
+
discountExceedsSubtotal: "Discount amount cannot exceed subtotal",
|
|
10
|
+
invoiceSubtotalTooHigh: "Invoice subtotal must be {maxAmount} or less",
|
|
11
|
+
invoiceTotalTooHigh: "Invoice total must be {maxAmount} or less",
|
|
12
|
+
sendToRequired: "Enter at least one recipient",
|
|
13
|
+
sendSubjectRequired: "Subject is required",
|
|
14
|
+
sendBodyRequired: "Message is required",
|
|
15
|
+
paymentAmountInvalid: "Amount paid must be greater than 0",
|
|
16
|
+
genericError: "Something went wrong. Please try again.",
|
|
17
|
+
lineItemsLoading: "Please wait for invoice details to finish loading.",
|
|
18
|
+
paymentTermsCustomDatePlaceholder: "Mon DD, YYYY",
|
|
19
|
+
bankAccountFallbackName: "Bank Account",
|
|
20
|
+
bankAccountPoweredBy: "Powered by {embeddedBankName}",
|
|
21
|
+
bankAccountLinked: "Linked account",
|
|
22
|
+
bankAccountHolderNameRequired: "Account holder name is required",
|
|
23
|
+
bankAccountHolderNameTooLong: "Account holder name must be 255 characters or less",
|
|
24
|
+
bankAccountNumberRequired: "Account number is required",
|
|
25
|
+
bankAccountNumberDigitsOnly: "Account number must contain only digits",
|
|
26
|
+
bankAccountNumberTooShort: "Account number must be at least 4 digits",
|
|
27
|
+
bankAccountNumberTooLong: "Account number must be at most 17 digits",
|
|
28
|
+
bankAccountRoutingNumberRequired: "Routing number is required",
|
|
29
|
+
bankAccountRoutingNumberInvalid: "Routing number must be 9 digits",
|
|
30
|
+
bankAccountNicknameTooLong: "Display name must be 200 characters or less",
|
|
31
|
+
bankAccountCreated: "Bank Account \"{name}\" has been created.",
|
|
32
|
+
bankAccountCreateFailed: "Failed to create Bank Account.",
|
|
33
|
+
untitledDocument: "Untitled document",
|
|
34
|
+
unknownCustomer: "Unknown customer",
|
|
35
|
+
notAvailable: "Not available",
|
|
36
|
+
invoiceType: "Invoice",
|
|
37
|
+
quoteType: "Quote",
|
|
38
|
+
creditNoteType: "Credit note",
|
|
39
|
+
detailsUnsupportedTitle: "Receivable type not supported",
|
|
40
|
+
detailsUnsupportedDescription: "Receivable type {type} is not supported. Only invoice is supported.",
|
|
41
|
+
detailsInvoiceSubtitle: "Invoice: {number}",
|
|
42
|
+
detailsDaysOverdue: "{days} days overdue",
|
|
43
|
+
detailsInvoiceAmount: "Invoice amount",
|
|
44
|
+
detailsBalanceDue: "Balance due",
|
|
45
|
+
detailsAmountReceived: "Amount received",
|
|
46
|
+
detailsCancelledAmount: "Cancelled amount",
|
|
47
|
+
detailsAmountWrittenOff: "Amount written off",
|
|
48
|
+
detailsCancelledOnCaption: "Cancelled on",
|
|
49
|
+
detailsPending: "Pending",
|
|
50
|
+
detailsNotProvided: "Not provided",
|
|
51
|
+
detailsCustomerName: "Name",
|
|
52
|
+
detailsCustomerEmail: "Email",
|
|
53
|
+
detailsCustomerPhone: "Phone",
|
|
54
|
+
detailsCustomerAddress: "Address",
|
|
55
|
+
detailsInvoiceNumber: "Invoice number",
|
|
56
|
+
detailsInvoiceDate: "Invoice date",
|
|
57
|
+
detailsDueDate: "Due date",
|
|
58
|
+
detailsPaymentTerms: "Payment terms",
|
|
59
|
+
detailsPaymentReminders: "Payment reminders",
|
|
60
|
+
detailsPoNumber: "PO number",
|
|
61
|
+
detailsDepositAccount: "Deposit account",
|
|
62
|
+
detailsRemindersBefore: "before",
|
|
63
|
+
detailsRemindersAfter: "after",
|
|
64
|
+
detailsRemindersNone: "None",
|
|
65
|
+
sendSubjectDefault: "Your receivable document",
|
|
66
|
+
sendBodyDefault: "Please find the receivable document attached.",
|
|
67
|
+
issueTitle: "Issue receivable?",
|
|
68
|
+
issueDescription: "Issuing locks the document and makes it ready to send to the customer.",
|
|
69
|
+
issueConfirm: "Issue",
|
|
70
|
+
acceptTitle: "Accept quote?",
|
|
71
|
+
acceptDescription: "This marks the quote as accepted.",
|
|
72
|
+
acceptConfirm: "Accept",
|
|
73
|
+
declineTitle: "Decline quote?",
|
|
74
|
+
declineDescription: "This marks the quote as declined.",
|
|
75
|
+
declineConfirm: "Decline",
|
|
76
|
+
cancelTitle: "Cancel receivable?",
|
|
77
|
+
cancelDescription: "This cancels the document. You cannot undo this action.",
|
|
78
|
+
cancelConfirm: "Cancel document",
|
|
79
|
+
cloneTitle: "Clone receivable?",
|
|
80
|
+
cloneDescription: "This creates a new draft based on the selected document.",
|
|
81
|
+
cloneConfirm: "Clone",
|
|
82
|
+
deleteTitle: "Delete draft?",
|
|
83
|
+
deleteDescription: "This permanently deletes the draft document. You cannot undo this action.",
|
|
84
|
+
deleteConfirm: "Delete",
|
|
85
|
+
markPaidTitle: "Mark invoice as paid?",
|
|
86
|
+
markPaidDescription: "This records the invoice as fully paid.",
|
|
87
|
+
markPaidConfirm: "Mark paid",
|
|
88
|
+
markUncollectibleTitle: "Mark invoice uncollectible?",
|
|
89
|
+
markUncollectibleDescription: "This records the invoice as uncollectible. You cannot undo this action.",
|
|
90
|
+
markUncollectibleConfirm: "Mark uncollectible",
|
|
91
|
+
attachmentsEmailCaption: "Selected files will be attached to the invoice email sent to the customer.",
|
|
92
|
+
attachmentsRecurringEmailCaption: "Selected files will be attached to every invoice email in the recurring series.",
|
|
93
|
+
attachmentIncludeInEmail: "Include in email:",
|
|
94
|
+
attachmentRemove: "Remove",
|
|
95
|
+
attachmentUploading: "Uploading…",
|
|
96
|
+
attachmentUploadFailed: "Upload failed. Please try again.",
|
|
97
|
+
attachmentTooLarge: "File too large (max 3 MB)",
|
|
98
|
+
attachmentUnsupportedType: "File type not supported. Use PDF, DOC, JPG or PNG",
|
|
99
|
+
attachmentsCountLimit: "You can attach up to 10 files.",
|
|
100
|
+
attachmentIncludedInEmail: "Included in email",
|
|
101
|
+
attachmentNotIncludedInEmail: "Not included in email",
|
|
102
|
+
recurrenceSeriesPaymentTerms: "Each invoice in the series will have the same payment term.",
|
|
103
|
+
recurrenceFrequencyOnce: "Once",
|
|
104
|
+
recurrenceFrequencyDaily: "Daily",
|
|
105
|
+
recurrenceFrequencyWeekly: "Weekly",
|
|
106
|
+
recurrenceFrequencyMonthly: "Monthly",
|
|
107
|
+
recurrenceFrequencyQuarterly: "Quarterly",
|
|
108
|
+
recurrenceFrequencyAnnually: "Annually",
|
|
109
|
+
recurrenceFirstDay: "First day",
|
|
110
|
+
recurrenceLastDay: "Last day",
|
|
111
|
+
recurrenceWeekdayMo: "Mo",
|
|
112
|
+
recurrenceWeekdayTu: "Tu",
|
|
113
|
+
recurrenceWeekdayWe: "We",
|
|
114
|
+
recurrenceWeekdayTh: "Th",
|
|
115
|
+
recurrenceWeekdayFr: "Fr",
|
|
116
|
+
recurrenceWeekdaySa: "Sa",
|
|
117
|
+
recurrenceWeekdaySu: "Su",
|
|
118
|
+
recurrenceEndAfter: "After",
|
|
119
|
+
recurrenceEndOn: "On",
|
|
120
|
+
recurrenceUnitDay: "day",
|
|
121
|
+
recurrenceUnitDays: "days",
|
|
122
|
+
recurrenceUnitWeek: "week",
|
|
123
|
+
recurrenceUnitWeeks: "weeks",
|
|
124
|
+
recurrenceUnitMonth: "month",
|
|
125
|
+
recurrenceUnitMonths: "months",
|
|
126
|
+
recurrenceUnitQuarter: "quarter",
|
|
127
|
+
recurrenceUnitQuarters: "quarters",
|
|
128
|
+
recurrenceUnitYear: "year",
|
|
129
|
+
recurrenceUnitYears: "years",
|
|
130
|
+
recurrenceLastDayCaption: "If the issue day doesn't exist in a given month, e.g., the 31st, then the invoice will be sent on the last day of that month.",
|
|
131
|
+
recurrenceModeIssueAndSendTitle: "Finalize and send",
|
|
132
|
+
recurrenceModeIssueAndSendDescription: "Automatically finalized and emailed.",
|
|
133
|
+
recurrenceModeIssueTitle: "Finalize, don't send",
|
|
134
|
+
recurrenceModeIssueDescription: "Finalized but held for manual send.",
|
|
135
|
+
recurrenceModeDraftTitle: "Save as draft",
|
|
136
|
+
recurrenceModeDraftDescription: "Created but not finalized. Edit and send when ready.",
|
|
137
|
+
recurrenceNoRecipients: "No recipients yet",
|
|
138
|
+
recurrenceRemoveRecipient: "Remove {recipient}",
|
|
139
|
+
recurrenceActivateButton: "Activate recurring billing schedule",
|
|
140
|
+
recurrenceUpdateButton: "Update recurring billing schedule",
|
|
141
|
+
saveDraftButton: "Save as draft",
|
|
142
|
+
updateDraftButton: "Update draft",
|
|
143
|
+
issueButton: "Issue invoice",
|
|
144
|
+
recurrenceStartDateRequired: "Start date is required",
|
|
145
|
+
recurrenceDayOfMonthRequired: "Day of month is required",
|
|
146
|
+
recurrenceDayOfWeekRequired: "Day of week is required",
|
|
147
|
+
recurrenceEndConditionRequired: "End condition is required",
|
|
148
|
+
recurrenceEndDateRequired: "End date is required",
|
|
149
|
+
recurrenceOccurrencesRequired: "Number of {units} is required",
|
|
150
|
+
recurrenceOccurrencesTooFew: "Enter at least 1 {unit}",
|
|
151
|
+
recurrenceOccurrencesTooMany: "Enter no more than 1000 {units}",
|
|
152
|
+
recurrenceOccurrencesWhole: "Enter a whole number",
|
|
153
|
+
recurrenceOccurrencesBelowIssued: "Must be more than the {count} invoices already issued",
|
|
154
|
+
recurrenceSubjectRequired: "Subject is required",
|
|
155
|
+
recurrenceMessageRequired: "Message is required",
|
|
156
|
+
recurrenceRecipientRequired: "At least one recipient is required",
|
|
157
|
+
recurrenceInvalidEmail: "{address} is not a valid email address",
|
|
158
|
+
reminderUnitDay: "day",
|
|
159
|
+
reminderUnitDays: "days",
|
|
160
|
+
reminderNameDay: "{days} day",
|
|
161
|
+
reminderNameDays: "{days} days",
|
|
162
|
+
reminderNameAnd: "and",
|
|
163
|
+
reminderBeforeDueCaption: "Add schedule",
|
|
164
|
+
reminderOverdueCaption: "Add schedule (Specify up to 3 terms)",
|
|
165
|
+
reminderOverdueEmptyCaption: "Send up to three reminders",
|
|
166
|
+
reminderOverdueTermLabel: "Reminder {index}, days after due date",
|
|
167
|
+
reminderDaysRange: "Enter a number of days between {min} and {max}.",
|
|
168
|
+
reminderPastDueWarning: "This reminder would be sent after the due date has already passed.",
|
|
169
|
+
reminderAdded: "Reminder has been added",
|
|
170
|
+
reminderBeforeDueSubject: "Payment is due soon",
|
|
171
|
+
reminderBeforeDueBody: "Payment is due on {dueDate}.",
|
|
172
|
+
reminderBeforeDueBodyNoDate: "Payment is due soon.",
|
|
173
|
+
reminderOverdueSubject: "Payment is overdue",
|
|
174
|
+
reminderOverdueBody: "Payment was due on {dueDate}.",
|
|
175
|
+
reminderOverdueBodyNoDate: "Payment is overdue.",
|
|
176
|
+
issueRemindersDisabled: "Payment reminders are disabled for this customer. Please enable them in the customer details or turn them off.",
|
|
177
|
+
issueRemindersNoEmail: "No email address is added for the selected customer. Please add it to the customer details or turn off the reminders.",
|
|
178
|
+
issueRemindersDisabledNoEmail: "Reminders are disabled for this customer, and no email address has been added for it. Please update the details or turn off reminders.",
|
|
179
|
+
lineItemNameRequired: "Name is a required field",
|
|
180
|
+
lineItemQuantityRequired: "Quantity is a required field",
|
|
181
|
+
lineItemsRequired: "Please, add at least 1 item to proceed with this invoice",
|
|
182
|
+
paymentTermsRequired: "Payment terms is a required field",
|
|
183
|
+
bankAccountRequired: "Choose how to get paid.",
|
|
184
|
+
issueTaxIdRequired: "Set your organization's Tax ID to issue invoice",
|
|
185
|
+
issueBankAccountUnavailable: "Contact your company admin to set up a bank account before creating an invoice.",
|
|
186
|
+
issueChecksLoading: "Please wait for invoice checks to finish.",
|
|
187
|
+
attachmentsUploading: "Please wait for attachments to finish uploading.",
|
|
188
|
+
issueFailedAfterSave: "The invoice was saved but could not be issued.",
|
|
189
|
+
createFailed: "Failed to create invoice: {errorMessage}",
|
|
190
|
+
updateFailed: "Failed to update receivable: {errorMessage}",
|
|
191
|
+
unknownError: "Unknown",
|
|
192
|
+
apiErrorsSummary: "{message} (+{count} more)",
|
|
193
|
+
actionsIssueTitle: "Invoice issued. Send a copy to {name}?",
|
|
194
|
+
actionsSubjectWithNumber: "Invoice #{documentId} for {name}",
|
|
195
|
+
actionsSubject: "Invoice for {name}",
|
|
196
|
+
actionsSendSucceeded: "Invoice sent successfully",
|
|
197
|
+
actionsSendFailed: "Failed to send invoice.",
|
|
198
|
+
actionsTitleSent: "Invoice sent",
|
|
199
|
+
actionsTitleIssued: "Invoice issued",
|
|
200
|
+
actionsTitleRecurrence: "Recurring billing activated",
|
|
201
|
+
actionsTitleDraft: "Draft saved",
|
|
202
|
+
actionsSelectAll: "Select all",
|
|
203
|
+
actionsDeselectAll: "Deselect all",
|
|
204
|
+
actionsProductsSaved: "Products and services saved.",
|
|
205
|
+
actionsProductsSaveFailed: "Failed to save products and services.",
|
|
206
|
+
previewTaxId: "Tax: {taxId}",
|
|
207
|
+
previewTaxableYes: "Yes",
|
|
208
|
+
previewTaxableNo: "No",
|
|
209
|
+
previewSubtotal: "Subtotal",
|
|
210
|
+
previewDiscount: "Discount",
|
|
211
|
+
previewNonTaxableSubtotal: "Non-taxable subtotal",
|
|
212
|
+
previewTaxableSubtotal: "Taxable subtotal",
|
|
213
|
+
previewTax: "Tax",
|
|
214
|
+
previewTaxWithRate: "Tax ({rate}%)",
|
|
215
|
+
previewTotal: "Total",
|
|
216
|
+
previewDueOnReceipt: "Due on receipt",
|
|
217
|
+
previewNetDays: "Net {days}",
|
|
218
|
+
previewEarlyPaymentDays: "Pay in the first {days} days",
|
|
219
|
+
previewEarlyPaymentDiscount: "{rate}% discount",
|
|
220
|
+
previewAccountHolderName: "Account holder name: {value}",
|
|
221
|
+
previewRoutingNumber: "Routing number: {value}",
|
|
222
|
+
previewAccountNumber: "Account number: {value}",
|
|
223
|
+
previewLogoAlt: "{name} logo",
|
|
224
|
+
previewLogoAltNoName: "Logo"
|
|
225
|
+
};
|
|
158
226
|
//#endregion
|
|
159
|
-
export {
|
|
227
|
+
export { e as RECEIVABLE_MESSAGE_LABELS_EN };
|
package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index15.js
CHANGED
|
@@ -1,28 +1,159 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
"use client";
|
|
4
|
-
"use client";
|
|
5
|
-
import { useMyEntityQuery as e } from "../../../shared/data-access/dist/lib/useMyEntityQuery.js";
|
|
1
|
+
import { hasAnyScope as e } from "../../../shared/data-access/dist/lib/hasAnyScope.js";
|
|
2
|
+
import { Scope as t } from "../../../shared/data-access/dist/lib/scopes.js";
|
|
6
3
|
import "../../../shared/data-access/dist/index.js";
|
|
7
|
-
import {
|
|
4
|
+
import { getCounterpartEmail as n } from "../../../shared/counterpart-management/feature/dist/lib/helpers.js";
|
|
8
5
|
import "../../../shared/counterpart-management/feature/dist/index.js";
|
|
9
|
-
import {
|
|
10
|
-
import "../../
|
|
6
|
+
import { RECEIVABLE_PAYMENT_TERMS_RECEIPT_DUE as r } from "../../ui/dist/index15.js";
|
|
7
|
+
import "../../ui/dist/index.js";
|
|
11
8
|
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index15.js
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
9
|
+
var i = 1e4, a = 864e5;
|
|
10
|
+
function o(n) {
|
|
11
|
+
return e(new Set(n ?? []), [t.InvoiceWriteOrg]);
|
|
12
|
+
}
|
|
13
|
+
function s(e) {
|
|
14
|
+
return e.replace(/\D/g, "");
|
|
15
|
+
}
|
|
16
|
+
var c = (e) => e.length > 0 ? Math.min(...e) : Infinity;
|
|
17
|
+
function l(e) {
|
|
18
|
+
return c([
|
|
19
|
+
e.term_1_reminder,
|
|
20
|
+
e.term_2_reminder,
|
|
21
|
+
e.term_final_reminder
|
|
22
|
+
].flatMap((e) => e ? [e.days_before] : []));
|
|
23
|
+
}
|
|
24
|
+
function u(e) {
|
|
25
|
+
return c((e.terms ?? []).map((e) => e.days_after));
|
|
26
|
+
}
|
|
27
|
+
function d(e) {
|
|
28
|
+
return [...e ?? []].sort((e, t) => l(e) - l(t)).map(({ id: e, name: t }) => ({
|
|
29
|
+
value: e,
|
|
30
|
+
label: t
|
|
31
|
+
}));
|
|
32
|
+
}
|
|
33
|
+
function f(e) {
|
|
34
|
+
return [...e ?? []].sort((e, t) => u(e) - u(t)).map(({ id: e, name: t }) => ({
|
|
35
|
+
value: e,
|
|
36
|
+
label: t
|
|
37
|
+
}));
|
|
38
|
+
}
|
|
39
|
+
function p(e) {
|
|
40
|
+
let [t, n, r] = e.split("-").map(Number);
|
|
41
|
+
if (t && n && r) return new Date(t, n - 1, r);
|
|
42
|
+
}
|
|
43
|
+
function m(e, t) {
|
|
44
|
+
return Math.round((Date.UTC(t.getFullYear(), t.getMonth(), t.getDate()) - Date.UTC(e.getFullYear(), e.getMonth(), e.getDate())) / a);
|
|
45
|
+
}
|
|
46
|
+
function h({ paymentTermsId: e, paymentTermsCustomDate: t }) {
|
|
47
|
+
return e === "custom" ? p(t) : void 0;
|
|
48
|
+
}
|
|
49
|
+
function g({ paymentTermsId: e, paymentTermsCustomDate: t, paymentTerms: n, today: r }) {
|
|
50
|
+
if (e === "custom") return p(t);
|
|
51
|
+
let i = e === "receipt_due" ? 0 : n?.find((t) => t.id === e)?.term_final.number_of_days;
|
|
52
|
+
if (i !== void 0) return new Date(r.getFullYear(), r.getMonth(), r.getDate() + i);
|
|
53
|
+
}
|
|
54
|
+
function _(e) {
|
|
55
|
+
return new Intl.DateTimeFormat("en-US", {
|
|
56
|
+
month: "short",
|
|
57
|
+
day: "numeric",
|
|
58
|
+
year: "numeric"
|
|
59
|
+
}).format(e);
|
|
60
|
+
}
|
|
61
|
+
function v(e, t) {
|
|
62
|
+
return (e === 1 ? t.reminderNameDay : t.reminderNameDays).replace("{days}", String(e));
|
|
63
|
+
}
|
|
64
|
+
function y(e, t) {
|
|
65
|
+
return Number(e) === 1 ? t.reminderUnitDay : t.reminderUnitDays;
|
|
66
|
+
}
|
|
67
|
+
function b(e) {
|
|
68
|
+
let t = Number(e);
|
|
69
|
+
return e !== "" && t >= 1 && t <= 1e4;
|
|
70
|
+
}
|
|
71
|
+
function x(e) {
|
|
72
|
+
return e.every((e) => Number(e) >= 1);
|
|
73
|
+
}
|
|
74
|
+
function S({ daysBefore: e, dueDate: t, messages: n }) {
|
|
75
|
+
return {
|
|
76
|
+
name: v(e, n),
|
|
77
|
+
term_final_reminder: {
|
|
78
|
+
days_before: e,
|
|
79
|
+
subject: n.reminderBeforeDueSubject,
|
|
80
|
+
body: t ? n.reminderBeforeDueBody.replace("{dueDate}", _(t)) : n.reminderBeforeDueBodyNoDate
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
function C({ terms: e, dueDate: t, messages: n }) {
|
|
85
|
+
let r = e.map(Number).sort((e, t) => e - t), i = r.map((e) => v(e, n)), a = i.length === 1 ? i[0] : `${i.slice(0, -1).join(", ")} ${n.reminderNameAnd} ${i[i.length - 1]}`, o = t ? n.reminderOverdueBody.replace("{dueDate}", _(t)) : n.reminderOverdueBodyNoDate;
|
|
86
|
+
return {
|
|
87
|
+
name: a,
|
|
88
|
+
terms: r.map((e) => ({
|
|
89
|
+
days_after: e,
|
|
90
|
+
subject: n.reminderOverdueSubject,
|
|
91
|
+
body: o
|
|
92
|
+
}))
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
function w(e) {
|
|
96
|
+
return !!(e.paymentTermsId || e.paymentReminderId || e.overdueReminderId);
|
|
97
|
+
}
|
|
98
|
+
function T({ showReminders: e, paymentTermsId: t, paymentTermsCustomDate: n, paymentReminderId: a, overdueReminderId: o, paymentReminders: s, overdueReminders: c, canCreate: l, disabled: u, beforeDueInput: p, overdueTerms: g, isCreatingPaymentReminder: _, isCreatingOverdueReminder: v, today: S, messages: C }) {
|
|
99
|
+
let w = {
|
|
100
|
+
checked: e,
|
|
101
|
+
toggleDisabled: !t
|
|
102
|
+
};
|
|
103
|
+
if (!e) return w;
|
|
104
|
+
let T = p !== "", E = b(p), D = h({
|
|
105
|
+
paymentTermsId: t,
|
|
106
|
+
paymentTermsCustomDate: n
|
|
107
|
+
}), O = D ? m(S, D) : void 0, k = s?.find((e) => e.id === a), A = k ? [
|
|
108
|
+
k.term_1_reminder,
|
|
109
|
+
k.term_2_reminder,
|
|
110
|
+
k.term_final_reminder
|
|
111
|
+
].flatMap((e) => e ? [e.days_before] : []) : [], j = O !== void 0 && (T && Number(p) > O || A.some((e) => e > O)), M = t === r, N = d(s), P = f(c);
|
|
20
112
|
return {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
113
|
+
...w,
|
|
114
|
+
cards: {
|
|
115
|
+
beforeDue: M ? void 0 : {
|
|
116
|
+
options: N,
|
|
117
|
+
selectedId: a,
|
|
118
|
+
create: l ? {
|
|
119
|
+
value: p,
|
|
120
|
+
unitLabel: y(p, C),
|
|
121
|
+
caption: N.length > 0 ? C.reminderBeforeDueCaption : void 0,
|
|
122
|
+
error: T && !E ? C.reminderDaysRange.replace("{min}", "1").replace("{max}", String(i)) : void 0,
|
|
123
|
+
inputDisabled: u || _,
|
|
124
|
+
saveDisabled: !E || _,
|
|
125
|
+
isSaving: _
|
|
126
|
+
} : void 0,
|
|
127
|
+
warning: j ? C.reminderPastDueWarning : void 0
|
|
128
|
+
},
|
|
129
|
+
overdue: {
|
|
130
|
+
options: P,
|
|
131
|
+
selectedId: o,
|
|
132
|
+
create: l ? {
|
|
133
|
+
caption: P.length > 0 ? C.reminderOverdueCaption : C.reminderOverdueEmptyCaption,
|
|
134
|
+
terms: g.map((e, t) => ({
|
|
135
|
+
value: e,
|
|
136
|
+
unitLabel: y(e, C),
|
|
137
|
+
ariaLabel: C.reminderOverdueTermLabel.replace("{index}", String(t + 1)),
|
|
138
|
+
showPlaceholder: g.length === 1
|
|
139
|
+
})),
|
|
140
|
+
showAddTerm: g.length < 3,
|
|
141
|
+
addTermDisabled: u || v || !g[g.length - 1],
|
|
142
|
+
inputsDisabled: u || v,
|
|
143
|
+
clearDisabled: u || v,
|
|
144
|
+
saveDisabled: u || v || !x(g),
|
|
145
|
+
isSaving: v
|
|
146
|
+
} : void 0
|
|
147
|
+
}
|
|
148
|
+
}
|
|
25
149
|
};
|
|
26
150
|
}
|
|
151
|
+
function E(e) {
|
|
152
|
+
return e.type === "invoice" && !!(e.payment_reminder_id || e.overdue_reminder_id);
|
|
153
|
+
}
|
|
154
|
+
function D(e, t) {
|
|
155
|
+
let r = !!(e && n(e)), i = !!e?.reminders_enabled;
|
|
156
|
+
if (!(i && r)) return r ? t.issueRemindersDisabled : i ? t.issueRemindersNoEmail : t.issueRemindersDisabledNoEmail;
|
|
157
|
+
}
|
|
27
158
|
//#endregion
|
|
28
|
-
export {
|
|
159
|
+
export { i as MAX_REMINDER_DAYS, x as areOverdueTermsValid, f as buildOverdueReminderOptions, C as buildOverdueReminderPayload, d as buildPaymentReminderOptions, S as buildPaymentReminderPayload, T as buildRemindersView, o as canCreateReminders, h as getCustomDueDate, g as getImpliedDueDate, D as getIssueReminderBlocker, E as hasSelectedReminder, b as isBeforeDueDaysValid, s as sanitizeReminderDays, w as shouldShowRemindersInitially };
|