@tesouro/embedded-components-react 0.5.279 → 0.5.280
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 +21 -6
- package/dist/lib/ReceivablesWidget.d.ts +21 -6
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index.js +14 -13
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index10.js +24 -168
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index11.js +173 -44
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index12.js +42 -94
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index13.js +91 -76
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index14.js +67 -173
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index15.js +186 -17
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index16.js +27 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index3.js +11 -13
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index4.js +42 -27
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index5.js +28 -132
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index6.js +137 -16
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index7.js +16 -62
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index8.js +66 -28
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index9.js +28 -34
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivableAttachmentsSection.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivableCustomerSection.js +38 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +304 -287
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/auditHistory/labels.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/customer.js +58 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/helpers.js +15 -15
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/labels.js +14 -6
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/paymentTerms.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/permissions.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/preview.js +62 -62
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/recurrence.js +41 -35
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/reminders.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/totals.js +21 -13
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableActions.js +124 -124
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableActionsModal.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableAttachmentUploads.js +13 -13
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableBankAccount.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableCustomerPicker.js +109 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableDetails.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableForm.js +520 -476
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableIssuePreflight.js +10 -10
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablePaymentRecord.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablePaymentTerms.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablePreview.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableRecurrence.js +92 -77
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableReminders.js +11 -11
- 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 +4 -4
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesWidget.js +79 -75
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useSendReceivableWithPaymentLink.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +26 -23
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index12.js +9 -25
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index13.js +26 -228
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js +227 -52
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index15.js +50 -212
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index16.js +193 -138
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index17.js +157 -12
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index18.js +10 -19
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index19.js +23 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index20.js +2 -116
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index21.js +118 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index22.js +3 -39
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index23.js +209 -53
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index24.js +2 -23
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index25.js +36 -7
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index26.js +53 -77
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index27.js +17 -35
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index28.js +8 -18
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index29.js +73 -37
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index30.js +36 -26
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index31.js +17 -19
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index32.js +39 -8
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index33.js +26 -33
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index34.js +20 -14
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index35.js +8 -24
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index36.js +34 -84
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index37.js +14 -492
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index38.js +28 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index39.js +79 -39
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index40.js +490 -68
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index41.js +2 -487
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index42.js +41 -217
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index43.js +70 -21
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index44.js +440 -5
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index45.js +224 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index46.js +21 -263
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index47.js +8 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index49.js +261 -24
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index50.js +2 -237
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index51.js +100 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index52.js +21 -242
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index53.js +226 -82
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index54.js +3 -60
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index55.js +233 -178
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index56.js +85 -37
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index57.js +60 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index58.js +194 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index59.js +45 -0
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/index.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/CounterpartSelector.js +2 -23
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartSelector.js +2 -51
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index15.js +4 -80
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index2.js +10 -22
- 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/invoicing-widget/ui/dist/index48.js +0 -100
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isEmail as e } from "../../../../../../shared/util-validation/dist/index5.js";
|
|
2
|
-
import { RECEIVABLE_PAYMENT_TERMS_RECEIPT_DUE as t } from "../../../../ui/dist/
|
|
2
|
+
import { RECEIVABLE_PAYMENT_TERMS_RECEIPT_DUE as t } from "../../../../ui/dist/index20.js";
|
|
3
3
|
import "../../../../ui/dist/index.js";
|
|
4
4
|
import { addDays as n, format as r, parseISO as i, startOfDay as a } from "date-fns";
|
|
5
5
|
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/recurrence.js
|
|
@@ -139,7 +139,13 @@ function O(e) {
|
|
|
139
139
|
recurrenceRecipientsBcc: []
|
|
140
140
|
};
|
|
141
141
|
}
|
|
142
|
-
function k(e
|
|
142
|
+
function k(e) {
|
|
143
|
+
return {
|
|
144
|
+
...e,
|
|
145
|
+
recurrenceRecipientsTo: void 0
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
function A(e, t) {
|
|
143
149
|
return {
|
|
144
150
|
to: e.recurrenceRecipientsTo ?? (t ? [t] : []),
|
|
145
151
|
toInput: "",
|
|
@@ -151,30 +157,30 @@ function k(e, t) {
|
|
|
151
157
|
message: e.recurrenceBody
|
|
152
158
|
};
|
|
153
159
|
}
|
|
154
|
-
function
|
|
160
|
+
function j(e) {
|
|
155
161
|
let t = e.toInput.trim();
|
|
156
162
|
return t ? [...e.to, t] : e.to;
|
|
157
163
|
}
|
|
158
|
-
function
|
|
164
|
+
function M(e) {
|
|
159
165
|
return _({
|
|
160
|
-
to:
|
|
166
|
+
to: j(e),
|
|
161
167
|
cc: e.cc,
|
|
162
168
|
bcc: e.bcc,
|
|
163
169
|
subject: e.subject,
|
|
164
170
|
body: e.message
|
|
165
171
|
});
|
|
166
172
|
}
|
|
167
|
-
function
|
|
173
|
+
function N(e, t) {
|
|
168
174
|
return {
|
|
169
175
|
...e,
|
|
170
|
-
recurrenceRecipientsTo:
|
|
176
|
+
recurrenceRecipientsTo: j(t),
|
|
171
177
|
recurrenceRecipientsCc: t.cc,
|
|
172
178
|
recurrenceRecipientsBcc: t.bcc,
|
|
173
179
|
recurrenceSubject: t.subject,
|
|
174
180
|
recurrenceBody: t.message
|
|
175
181
|
};
|
|
176
182
|
}
|
|
177
|
-
function
|
|
183
|
+
function P(e, t) {
|
|
178
184
|
return t === "issue_and_send" && !_({
|
|
179
185
|
to: e.recurrenceRecipientsTo,
|
|
180
186
|
cc: e.recurrenceRecipientsCc,
|
|
@@ -183,7 +189,7 @@ function N(e, t) {
|
|
|
183
189
|
body: e.recurrenceBody
|
|
184
190
|
});
|
|
185
191
|
}
|
|
186
|
-
function
|
|
192
|
+
function F({ open: e, ready: t, draft: n, messages: r }) {
|
|
187
193
|
return {
|
|
188
194
|
open: e,
|
|
189
195
|
ready: t,
|
|
@@ -196,21 +202,21 @@ function P({ open: e, ready: t, draft: n, messages: r }) {
|
|
|
196
202
|
subject: n.subject,
|
|
197
203
|
message: n.message,
|
|
198
204
|
showToPlaceholder: n.to.length === 0,
|
|
199
|
-
saveDisabled: !
|
|
205
|
+
saveDisabled: !M(n),
|
|
200
206
|
removeRecipientLabel: (e) => r.recurrenceRemoveRecipient.replace("{recipient}", e)
|
|
201
207
|
};
|
|
202
208
|
}
|
|
203
|
-
var
|
|
209
|
+
var I = [
|
|
204
210
|
"th",
|
|
205
211
|
"st",
|
|
206
212
|
"nd",
|
|
207
213
|
"rd"
|
|
208
214
|
];
|
|
209
|
-
function
|
|
215
|
+
function L(e) {
|
|
210
216
|
let t = e % 100;
|
|
211
|
-
return `${e}${
|
|
217
|
+
return `${e}${I[(t - 20) % 10] ?? I[t] ?? I[0]}`;
|
|
212
218
|
}
|
|
213
|
-
function
|
|
219
|
+
function R(e, t) {
|
|
214
220
|
let [n, r] = {
|
|
215
221
|
day: [t.recurrenceUnitDay, t.recurrenceUnitDays],
|
|
216
222
|
week: [t.recurrenceUnitWeek, t.recurrenceUnitWeeks],
|
|
@@ -223,7 +229,7 @@ function L(e, t) {
|
|
|
223
229
|
plural: r
|
|
224
230
|
};
|
|
225
231
|
}
|
|
226
|
-
function
|
|
232
|
+
function z(e, t, n = /* @__PURE__ */ new Date()) {
|
|
227
233
|
if (t < b(n)) return !0;
|
|
228
234
|
if (e.frequency === "week") return e.recurrenceDayOfWeek ? t.getDay() !== f[e.recurrenceDayOfWeek] : !1;
|
|
229
235
|
if (e.frequency !== "month" || !e.recurrenceIssueMode) return !1;
|
|
@@ -233,8 +239,8 @@ function R(e, t, n = /* @__PURE__ */ new Date()) {
|
|
|
233
239
|
let a = Number(e.recurrenceIssueMode);
|
|
234
240
|
return !Number.isNaN(a) && r !== Math.min(a, i);
|
|
235
241
|
}
|
|
236
|
-
function
|
|
237
|
-
let { frequency: a } = e, o = v(e.recurrenceStartDate), s = v(e.recurrenceEndDate), c = b(i), u = (t) =>
|
|
242
|
+
function B({ fields: e, errors: t, lockSchedule: n, messages: r, today: i = /* @__PURE__ */ new Date() }) {
|
|
243
|
+
let { frequency: a } = e, o = v(e.recurrenceStartDate), s = v(e.recurrenceEndDate), c = b(i), u = (t) => z(e, t, i), f = { frequency: {
|
|
238
244
|
value: a,
|
|
239
245
|
disabled: n,
|
|
240
246
|
options: [
|
|
@@ -277,7 +283,7 @@ function z({ fields: e, errors: t, lockSchedule: n, messages: r, today: i = /* @
|
|
|
277
283
|
}],
|
|
278
284
|
dayOptions: Array.from({ length: 31 }, (e, t) => ({
|
|
279
285
|
value: String(t + 1),
|
|
280
|
-
label:
|
|
286
|
+
label: L(t + 1)
|
|
281
287
|
}))
|
|
282
288
|
}), a === "week") {
|
|
283
289
|
let i = {
|
|
@@ -307,7 +313,7 @@ function z({ fields: e, errors: t, lockSchedule: n, messages: r, today: i = /* @
|
|
|
307
313
|
minDate: c,
|
|
308
314
|
maxDate: s ?? l,
|
|
309
315
|
isDateDisabled: u
|
|
310
|
-
}, m =
|
|
316
|
+
}, m = R(a, r), h = {
|
|
311
317
|
value: e.recurrenceMaxOccurrences,
|
|
312
318
|
unitLabel: Number(e.recurrenceMaxOccurrences) === 1 ? m.singular : m.plural,
|
|
313
319
|
invalid: !!t?.recurrenceMaxOccurrences
|
|
@@ -365,22 +371,22 @@ function z({ fields: e, errors: t, lockSchedule: n, messages: r, today: i = /* @
|
|
|
365
371
|
emailError: g
|
|
366
372
|
}, f;
|
|
367
373
|
}
|
|
368
|
-
function
|
|
369
|
-
let { singular: r, plural: i } =
|
|
374
|
+
function V(e, t, n) {
|
|
375
|
+
let { singular: r, plural: i } = R(t, n), a = (e) => e.replace("{unit}", r).replace("{units}", i);
|
|
370
376
|
if (!e) return a(n.recurrenceOccurrencesRequired);
|
|
371
377
|
let o = Number(e);
|
|
372
378
|
if (o < 1) return a(n.recurrenceOccurrencesTooFew);
|
|
373
379
|
if (o > c) return a(n.recurrenceOccurrencesTooMany);
|
|
374
380
|
if (!Number.isInteger(o)) return n.recurrenceOccurrencesWhole;
|
|
375
381
|
}
|
|
376
|
-
function
|
|
382
|
+
function H({ fields: t, issuedCount: n = 0, messages: r }) {
|
|
377
383
|
let { frequency: i } = t;
|
|
378
384
|
if (i === "once") return {};
|
|
379
385
|
let a = {};
|
|
380
386
|
t.recurrenceStartDate || (a.recurrenceStartDate = r.recurrenceStartDateRequired);
|
|
381
387
|
let o = i !== "day" || t.recurrenceEndMode === "after";
|
|
382
388
|
if (i === "month" && !t.recurrenceIssueMode && (a.recurrenceIssueMode = r.recurrenceDayOfMonthRequired), i === "week" && !t.recurrenceDayOfWeek && (a.recurrenceDayOfWeek = r.recurrenceDayOfWeekRequired), i === "day" && !t.recurrenceEndMode && (a.recurrenceEndMode = r.recurrenceEndConditionRequired), i === "day" && t.recurrenceEndMode === "on" && !t.recurrenceEndDate && (a.recurrenceEndDate = r.recurrenceEndDateRequired), o) {
|
|
383
|
-
let e =
|
|
389
|
+
let e = V(t.recurrenceMaxOccurrences, i, r);
|
|
384
390
|
e && (a.recurrenceMaxOccurrences = e);
|
|
385
391
|
}
|
|
386
392
|
let s = i === "day" && t.recurrenceEndMode === "on";
|
|
@@ -398,7 +404,7 @@ function V({ fields: t, issuedCount: n = 0, messages: r }) {
|
|
|
398
404
|
}
|
|
399
405
|
return a;
|
|
400
406
|
}
|
|
401
|
-
function
|
|
407
|
+
function U(e) {
|
|
402
408
|
let t = e.recurrenceAutomationLevel;
|
|
403
409
|
if (t !== "issue_and_send") return {
|
|
404
410
|
automation_level: t,
|
|
@@ -418,7 +424,7 @@ function H(e) {
|
|
|
418
424
|
recipients: Object.values(n).some(Boolean) ? n : void 0
|
|
419
425
|
};
|
|
420
426
|
}
|
|
421
|
-
function
|
|
427
|
+
function W(e, { hasExistingRecurrence: t }) {
|
|
422
428
|
let n = e.frequency === "day" && e.recurrenceEndMode === "on" && !!e.recurrenceEndDate, r = t ? null : void 0;
|
|
423
429
|
return {
|
|
424
430
|
frequency: e.frequency,
|
|
@@ -427,29 +433,29 @@ function U(e, { hasExistingRecurrence: t }) {
|
|
|
427
433
|
end_date: n ? e.recurrenceEndDate : r
|
|
428
434
|
};
|
|
429
435
|
}
|
|
430
|
-
function
|
|
436
|
+
function G(e, t) {
|
|
431
437
|
return {
|
|
432
|
-
...
|
|
433
|
-
...
|
|
438
|
+
...W(e, { hasExistingRecurrence: !1 }),
|
|
439
|
+
...U(e),
|
|
434
440
|
invoice_id: t,
|
|
435
441
|
interval: 1
|
|
436
442
|
};
|
|
437
443
|
}
|
|
438
|
-
function
|
|
439
|
-
let n =
|
|
444
|
+
function K(e, { lockSchedule: t }) {
|
|
445
|
+
let n = W(e, { hasExistingRecurrence: !0 });
|
|
440
446
|
return t ? {
|
|
441
447
|
max_occurrences: n.max_occurrences,
|
|
442
448
|
end_date: n.end_date,
|
|
443
|
-
...
|
|
449
|
+
...U(e)
|
|
444
450
|
} : {
|
|
445
451
|
...n,
|
|
446
|
-
...
|
|
452
|
+
...U(e)
|
|
447
453
|
};
|
|
448
454
|
}
|
|
449
|
-
function
|
|
455
|
+
function q(e) {
|
|
450
456
|
return e?.iterations.filter((e) => e.issued_invoice_id).length ?? 0;
|
|
451
457
|
}
|
|
452
|
-
function
|
|
458
|
+
function J(e) {
|
|
453
459
|
let t = m();
|
|
454
460
|
if (!e) return t;
|
|
455
461
|
let n = v(e.start_date);
|
|
@@ -470,4 +476,4 @@ function q(e) {
|
|
|
470
476
|
};
|
|
471
477
|
}
|
|
472
478
|
//#endregion
|
|
473
|
-
export { o as DEFAULT_RECURRENCE_AUTOMATION_LEVEL,
|
|
479
|
+
export { o as DEFAULT_RECURRENCE_AUTOMATION_LEVEL, N as applyRecurrenceEmailDraft, G as buildCreateRecurrencePayload, U as buildRecurrenceDeliveryPayload, F as buildRecurrenceEmailView, B as buildRecurrenceView, K as buildUpdateRecurrencePayload, O as clearRecurrenceRecipients, q as countIssuedIterations, m as createEmptyRecurrenceFields, A as createRecurrenceEmailDraft, z as isRecurrenceDateDisabled, _ as isRecurrenceEmailComplete, M as isRecurrenceEmailDraftComplete, h as isRecurring, J as recurrenceToFormFields, k as resetRecurrenceRecipientsTo, D as selectRecurrenceDate, T as selectRecurrenceDayOfWeek, E as selectRecurrenceEndMode, C as selectRecurrenceFrequency, w as selectRecurrenceIssueMode, P as shouldOpenRecurrenceEmail, H as validateRecurrence, g as willRecurrenceIssue };
|
|
@@ -3,7 +3,7 @@ import { Scope as t } from "../../../../../shared/data-access/dist/lib/scopes.js
|
|
|
3
3
|
import "../../../../../shared/data-access/dist/index.js";
|
|
4
4
|
import { getCounterpartEmail as n } from "../../../../../shared/counterpart-management/feature/dist/lib/helpers.js";
|
|
5
5
|
import "../../../../../shared/counterpart-management/feature/dist/index.js";
|
|
6
|
-
import { RECEIVABLE_PAYMENT_TERMS_RECEIPT_DUE as r } from "../../../../ui/dist/
|
|
6
|
+
import { RECEIVABLE_PAYMENT_TERMS_RECEIPT_DUE as r } from "../../../../ui/dist/index20.js";
|
|
7
7
|
import "../../../../ui/dist/index.js";
|
|
8
8
|
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/reminders.js
|
|
9
9
|
var i = 1e4, a = 864e5;
|
|
@@ -93,23 +93,31 @@ function _(e, n) {
|
|
|
93
93
|
if (r > 9e15) return n.invoiceSubtotalTooHigh.replace("{maxAmount}", s);
|
|
94
94
|
if (a > 9e15) return n.invoiceTotalTooHigh.replace("{maxAmount}", s);
|
|
95
95
|
}
|
|
96
|
-
function v(
|
|
97
|
-
|
|
96
|
+
function v(e, t) {
|
|
97
|
+
let n = e.formatToParts(t), r = (e) => e.type !== "currency" && e.type !== "literal", i = n.findIndex(r);
|
|
98
|
+
if (i === -1) return e.format(t);
|
|
99
|
+
let a = n.length - 1;
|
|
100
|
+
for (; a > i && !r(n[a]);) a--;
|
|
101
|
+
let o = (e) => e.map((e) => e.value).join("");
|
|
102
|
+
return `${o(n.slice(0, i))}(${o(n.slice(i, a + 1))})${o(n.slice(a + 1))}`;
|
|
103
|
+
}
|
|
104
|
+
function y(t, n, r = !1) {
|
|
105
|
+
let i = new Intl.NumberFormat(void 0, {
|
|
98
106
|
style: "currency",
|
|
99
107
|
currency: n,
|
|
100
|
-
currencyDisplay: "narrowSymbol"
|
|
101
|
-
|
|
102
|
-
|
|
108
|
+
currencyDisplay: "narrowSymbol"
|
|
109
|
+
}), a = t / 10 ** e(n);
|
|
110
|
+
return r ? v(i, a) : i.format(a);
|
|
103
111
|
}
|
|
104
|
-
function
|
|
112
|
+
function b(e, t) {
|
|
105
113
|
return {
|
|
106
|
-
subtotal:
|
|
107
|
-
discount: e.discountAmount > 0 ?
|
|
108
|
-
nonTaxableSubtotal:
|
|
109
|
-
taxableSubtotal:
|
|
110
|
-
tax:
|
|
111
|
-
total:
|
|
114
|
+
subtotal: y(e.subtotal, t),
|
|
115
|
+
discount: e.discountAmount > 0 ? y(e.discountAmount, t, !0) : y(0, t),
|
|
116
|
+
nonTaxableSubtotal: y(e.nonTaxableSubtotal, t),
|
|
117
|
+
taxableSubtotal: y(e.taxableSubtotal, t),
|
|
118
|
+
tax: y(e.totalTaxes, t),
|
|
119
|
+
total: y(e.total, t)
|
|
112
120
|
};
|
|
113
121
|
}
|
|
114
122
|
//#endregion
|
|
115
|
-
export { c as FULL_PERCENT_MINOR_UNITS, f as allocateDiscount,
|
|
123
|
+
export { c as FULL_PERCENT_MINOR_UNITS, f as allocateDiscount, v as bracketAmount, b as buildFormTotalsView, h as calculateFormTotals, m as calculateInvoiceTotals, u as calculateItemsSubtotals, d as resolveDiscountAmount, g as validateDiscount, _ as validateInvoiceTotals };
|