@tesouro/embedded-components-react 0.5.214 → 0.5.215
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 +88 -1
- package/dist/index.js +1 -1
- package/dist/lib/ReceivablesWidget.d.ts +88 -1
- package/dist/lib/ReceivablesWidget.js +1 -1
- package/dist/libs/shared/util-validation/dist/index5.js +7 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index10.js +63 -67
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index11.js +160 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index12.js +6 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index2.js +32 -25
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index6.js +25 -200
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index7.js +175 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index8.js +1 -101
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index9.js +92 -71
- 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 +44 -100
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index11.js +93 -421
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index12.js +442 -112
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index13.js +166 -157
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index14.js +150 -204
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index15.js +202 -31
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index16.js +32 -145
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index17.js +145 -37
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index18.js +44 -58
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index19.js +113 -87
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index20.js +58 -116
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index21.js +83 -357
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index22.js +111 -65
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index23.js +449 -99
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index24.js +68 -281
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index25.js +115 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index26.js +314 -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/index6.js +34 -23
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index8.js +444 -92
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index9.js +113 -52
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +18 -14
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index10.js +2 -92
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index11.js +95 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index12.js +3 -24
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index13.js +24 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js +1 -3
- 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 +3 -18
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index17.js +18 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index18.js +0 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index19.js +0 -8
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index20.js +11 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index21.js +1 -264
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index22.js +258 -42
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index23.js +38 -62
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index24.js +61 -463
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index25.js +457 -89
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index26.js +91 -234
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index27.js +89 -82
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index28.js +22 -338
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index29.js +236 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index3.js +26 -204
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index30.js +3 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index31.js +249 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index32.js +93 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index33.js +344 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index4.js +208 -32
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index5.js +29 -202
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index6.js +183 -137
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index7.js +157 -12
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index8.js +10 -19
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index9.js +23 -2
- 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 +167 -156
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +66 -34
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/packages/shared-ui-shadcn/dist/index.js +13 -13
- package/package.json +1 -1
|
@@ -1,59 +1,120 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { RECEIVABLE_PAYMENT_TERMS_CUSTOM_DATE as e, RECEIVABLE_PAYMENT_TERMS_RECEIPT_DUE as t } from "../../ui/dist/index10.js";
|
|
2
|
+
import "../../ui/dist/index.js";
|
|
3
|
+
import { addDays as n, addYears as r, format as i, max as a, min as o, parseISO as s, subYears as c } from "date-fns";
|
|
3
4
|
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index9.js
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
style: "currency",
|
|
32
|
-
currency: n,
|
|
33
|
-
currencyDisplay: "narrowSymbol"
|
|
34
|
-
}).format(e / 10 ** r);
|
|
35
|
-
}
|
|
36
|
-
function l({ value: e, type: t, currency: n }) {
|
|
37
|
-
return s(o(e, t, n), t, n);
|
|
38
|
-
}
|
|
39
|
-
function u(e) {
|
|
5
|
+
var l = "MMM d, yyyy", u = "yyyy-MM-dd", d = 10, f = 5;
|
|
6
|
+
function p(e) {
|
|
7
|
+
let t = (e) => e ? {
|
|
8
|
+
number_of_days: e.number_of_days ?? null,
|
|
9
|
+
discount: e.discount ?? null
|
|
10
|
+
} : null;
|
|
11
|
+
return JSON.stringify({
|
|
12
|
+
name: e.name,
|
|
13
|
+
description: e.description ?? null,
|
|
14
|
+
term_final: { number_of_days: e.term_final?.number_of_days ?? null },
|
|
15
|
+
term_1: t(e.term_1),
|
|
16
|
+
term_2: t(e.term_2)
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
function m(e) {
|
|
20
|
+
let t = /* @__PURE__ */ new Set();
|
|
21
|
+
return e.filter((e) => {
|
|
22
|
+
let n = p(e);
|
|
23
|
+
return !t.has(n) && (t.add(n), !0);
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
function h(e, t) {
|
|
27
|
+
let r = e.term_final?.number_of_days;
|
|
28
|
+
return r ? n(t, r) : void 0;
|
|
29
|
+
}
|
|
30
|
+
function g(e, t) {
|
|
31
|
+
let n = h(e, t);
|
|
40
32
|
return {
|
|
41
|
-
|
|
42
|
-
|
|
33
|
+
value: e.id,
|
|
34
|
+
label: e.name,
|
|
35
|
+
...n ? { dueDateLabel: i(n, l) } : {}
|
|
43
36
|
};
|
|
44
37
|
}
|
|
45
|
-
function
|
|
46
|
-
|
|
47
|
-
return t > 0 ? {
|
|
48
|
-
type: e.discountType,
|
|
49
|
-
amount: t
|
|
50
|
-
} : null;
|
|
38
|
+
function _(e) {
|
|
39
|
+
return e ? s(e) : void 0;
|
|
51
40
|
}
|
|
52
|
-
function
|
|
53
|
-
return
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
41
|
+
function v({ terms: e, isLoading: t, fields: n, customDatePickerOpen: r, isRecurring: a = !1, messages: o, today: s = /* @__PURE__ */ new Date() }) {
|
|
42
|
+
if (t) return { kind: "loading" };
|
|
43
|
+
let c = m(e ?? []).map((e) => g(e, s)), u = _(n.paymentTermsCustomDate), d;
|
|
44
|
+
if (n.paymentTermsId === "receipt_due") d = { kind: "receiptDue" };
|
|
45
|
+
else if (n.paymentTermsId === "custom") d = {
|
|
46
|
+
kind: "customDate",
|
|
47
|
+
hasDate: !!u,
|
|
48
|
+
dateLabel: u ? i(u, l) : o.paymentTermsCustomDatePlaceholder
|
|
49
|
+
};
|
|
50
|
+
else {
|
|
51
|
+
let e = c.find((e) => e.value === n.paymentTermsId);
|
|
52
|
+
e && (d = {
|
|
53
|
+
kind: "term",
|
|
54
|
+
option: e
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
kind: "ready",
|
|
59
|
+
value: n.paymentTermsId,
|
|
60
|
+
options: c,
|
|
61
|
+
selection: d,
|
|
62
|
+
customDatePicker: { open: r },
|
|
63
|
+
showCustomDate: !a,
|
|
64
|
+
...a ? { description: o.recurrenceSeriesPaymentTerms } : {}
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
function y(e, t = /* @__PURE__ */ new Date()) {
|
|
68
|
+
let n = _(e), i = c(t, d), s = r(t, f);
|
|
69
|
+
return {
|
|
70
|
+
selected: n,
|
|
71
|
+
startMonth: n ? o([i, n]) : i,
|
|
72
|
+
endMonth: n ? a([s, n]) : s
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
function b(e, t) {
|
|
76
|
+
return t === "custom" ? {
|
|
77
|
+
paymentTermsId: t,
|
|
78
|
+
paymentTermsCustomDate: e.paymentTermsId === "custom" ? e.paymentTermsCustomDate : ""
|
|
79
|
+
} : {
|
|
80
|
+
paymentTermsId: t,
|
|
81
|
+
paymentTermsCustomDate: ""
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
function x(e) {
|
|
85
|
+
return e.paymentTermsId === "custom" && !e.paymentTermsCustomDate ? {
|
|
86
|
+
paymentTermsId: "",
|
|
87
|
+
paymentTermsCustomDate: ""
|
|
88
|
+
} : e;
|
|
89
|
+
}
|
|
90
|
+
function S(e) {
|
|
91
|
+
return e ? i(e, u) : "";
|
|
92
|
+
}
|
|
93
|
+
function C(e) {
|
|
94
|
+
return e.paymentTermsId === "custom" ? e.paymentTermsCustomDate ? { payment_terms: { term_final: { end_date: e.paymentTermsCustomDate } } } : { payment_terms: { term_final: { number_of_days: 0 } } } : e.paymentTermsId === "receipt_due" ? { payment_terms: { term_final: { number_of_days: 0 } } } : e.paymentTermsId ? { payment_terms_id: e.paymentTermsId } : {};
|
|
95
|
+
}
|
|
96
|
+
function w(e) {
|
|
97
|
+
return e.paymentTermsId ? C(e) : {
|
|
98
|
+
payment_terms_id: null,
|
|
99
|
+
payment_terms: null
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
function T(n) {
|
|
103
|
+
if (n?.id) return {
|
|
104
|
+
paymentTermsId: n.id,
|
|
105
|
+
paymentTermsCustomDate: ""
|
|
106
|
+
};
|
|
107
|
+
let r = n?.term_final?.end_date;
|
|
108
|
+
return r ? {
|
|
109
|
+
paymentTermsId: e,
|
|
110
|
+
paymentTermsCustomDate: r.slice(0, 10)
|
|
111
|
+
} : n?.term_final?.number_of_days === 0 ? {
|
|
112
|
+
paymentTermsId: t,
|
|
113
|
+
paymentTermsCustomDate: ""
|
|
114
|
+
} : {
|
|
115
|
+
paymentTermsId: "",
|
|
116
|
+
paymentTermsCustomDate: ""
|
|
117
|
+
};
|
|
57
118
|
}
|
|
58
119
|
//#endregion
|
|
59
|
-
export {
|
|
120
|
+
export { y as buildCustomDateCalendar, C as buildPaymentTermsPayload, w as buildPaymentTermsUpdatePayload, v as buildPaymentTermsView, x as closeCustomDatePickerFields, m as dedupePaymentTerms, T as paymentTermsToFormFields, b as selectPaymentTermsFields, S as toCustomDateValue };
|
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
import "./index2.js";
|
|
2
2
|
import "./index3.js";
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import "./index11.js";
|
|
3
|
+
import "./index4.js";
|
|
4
|
+
import { ReceivableActionDialog as e } from "./index5.js";
|
|
5
|
+
import { ReceivableBankAccountSection as t } from "./index6.js";
|
|
6
|
+
import { ReceivableAttachmentsSection as n } from "./index7.js";
|
|
7
|
+
import { RECEIVABLE_PAYMENT_TERMS_CUSTOM_DATE as r, RECEIVABLE_PAYMENT_TERMS_RECEIPT_DUE as i } from "./index10.js";
|
|
8
|
+
import { ReceivableBillingSection as a } from "./index11.js";
|
|
9
9
|
import "./index12.js";
|
|
10
|
-
import "./
|
|
10
|
+
import "./index13.js";
|
|
11
11
|
import "./index20.js";
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
|
|
12
|
+
import "./index21.js";
|
|
13
|
+
import { ReceivableDetailsSheet as o } from "./index22.js";
|
|
14
|
+
import { ReceivableFormSheet as s } from "./index25.js";
|
|
15
|
+
import { ReceivablePaymentDialog as c } from "./index26.js";
|
|
16
|
+
import { ReceivableRecurrenceEmailDialog as l } from "./index27.js";
|
|
17
|
+
import { ReceivableRecurrenceSection as u } from "./index29.js";
|
|
18
|
+
import "./index30.js";
|
|
19
|
+
import { ReceivableRemindersSection as d } from "./index31.js";
|
|
20
|
+
import { ReceivableSendDialog as f } from "./index32.js";
|
|
21
|
+
import { ReceivablesScreen as p } from "./index33.js";
|
|
22
|
+
export { r as RECEIVABLE_PAYMENT_TERMS_CUSTOM_DATE, i as RECEIVABLE_PAYMENT_TERMS_RECEIPT_DUE, e as ReceivableActionDialog, n as ReceivableAttachmentsSection, t as ReceivableBankAccountSection, a as ReceivableBillingSection, o as ReceivableDetailsSheet, s as ReceivableFormSheet, c as ReceivablePaymentDialog, l as ReceivableRecurrenceEmailDialog, u as ReceivableRecurrenceSection, d as ReceivableRemindersSection, f as ReceivableSendDialog, p as ReceivablesScreen };
|
|
@@ -1,94 +1,4 @@
|
|
|
1
|
-
import { Field as e, FieldContent as t, FieldError as n, FieldLabel as r, Popover as i, PopoverAnchor as a, PopoverContent as o, Select as s, SelectContent as c, SelectItem as l, SelectSeparator as u, SelectTrigger as d, SelectValue as f, Skeleton as p, Typography as m } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
-
import { RECEIVABLE_BILLING_SECTION_LABELS_EN as h } from "./index2.js";
|
|
3
|
-
import { RECEIVABLE_PAYMENT_TERMS_CUSTOM_DATE as g, RECEIVABLE_PAYMENT_TERMS_RECEIPT_DUE as _ } from "./index9.js";
|
|
4
|
-
import { OptionRow as v } from "./index7.js";
|
|
5
|
-
import { SelectionValue as y } from "./index8.js";
|
|
6
|
-
import { jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
7
1
|
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index10.js
|
|
8
|
-
|
|
9
|
-
let A = {
|
|
10
|
-
...h,
|
|
11
|
-
...k
|
|
12
|
-
}, j = `${S}-payment-terms`, M = () => {
|
|
13
|
-
window.setTimeout(() => D(!0), 0);
|
|
14
|
-
};
|
|
15
|
-
return /* @__PURE__ */ x("div", {
|
|
16
|
-
className: "ttw:flex ttw:flex-col ttw:gap-2.5 ttw:rounded-xl ttw:border ttw:border-border ttw:p-6",
|
|
17
|
-
children: [/* @__PURE__ */ x("div", {
|
|
18
|
-
className: "ttw:flex ttw:flex-col ttw:gap-2.5 ttw:pb-4",
|
|
19
|
-
children: [/* @__PURE__ */ b(m, {
|
|
20
|
-
variant: "h4",
|
|
21
|
-
children: A.billingHeading
|
|
22
|
-
}), /* @__PURE__ */ b(m, {
|
|
23
|
-
variant: "body2",
|
|
24
|
-
color: "muted",
|
|
25
|
-
className: "ttw:font-medium",
|
|
26
|
-
children: A.billingDescription
|
|
27
|
-
})]
|
|
28
|
-
}), /* @__PURE__ */ b("div", {
|
|
29
|
-
className: "ttw:flex ttw:flex-col ttw:gap-6",
|
|
30
|
-
children: /* @__PURE__ */ b("div", {
|
|
31
|
-
className: "ttw:flex ttw:w-full ttw:items-start ttw:gap-2.5",
|
|
32
|
-
children: C.kind === "loading" ? /* @__PURE__ */ b(p, { className: "ttw:h-9 ttw:w-full" }) : /* @__PURE__ */ b(e, { children: /* @__PURE__ */ x(t, { children: [
|
|
33
|
-
/* @__PURE__ */ b(r, {
|
|
34
|
-
htmlFor: j,
|
|
35
|
-
children: A.paymentTermsLabel
|
|
36
|
-
}),
|
|
37
|
-
/* @__PURE__ */ x(i, {
|
|
38
|
-
open: C.customDatePicker.open,
|
|
39
|
-
onOpenChange: D,
|
|
40
|
-
children: [/* @__PURE__ */ x(s, {
|
|
41
|
-
disabled: T,
|
|
42
|
-
value: C.value,
|
|
43
|
-
onValueChange: (e) => {
|
|
44
|
-
E(e), e === "custom" && M();
|
|
45
|
-
},
|
|
46
|
-
children: [/* @__PURE__ */ b(a, {
|
|
47
|
-
className: "ttw:w-full",
|
|
48
|
-
children: /* @__PURE__ */ b(d, {
|
|
49
|
-
id: j,
|
|
50
|
-
className: "ttw:w-full",
|
|
51
|
-
"aria-invalid": !!w,
|
|
52
|
-
children: /* @__PURE__ */ b(f, {
|
|
53
|
-
placeholder: A.paymentTermsPlaceholder,
|
|
54
|
-
children: /* @__PURE__ */ b(y, {
|
|
55
|
-
selection: C.selection,
|
|
56
|
-
labels: A
|
|
57
|
-
})
|
|
58
|
-
})
|
|
59
|
-
})
|
|
60
|
-
}), /* @__PURE__ */ x(c, { children: [
|
|
61
|
-
/* @__PURE__ */ b(l, {
|
|
62
|
-
value: _,
|
|
63
|
-
children: A.paymentTermsReceiptDue
|
|
64
|
-
}),
|
|
65
|
-
/* @__PURE__ */ b(l, {
|
|
66
|
-
value: g,
|
|
67
|
-
onPointerUp: M,
|
|
68
|
-
onClick: M,
|
|
69
|
-
onKeyDown: (e) => {
|
|
70
|
-
(e.key === "Enter" || e.key === " ") && M();
|
|
71
|
-
},
|
|
72
|
-
children: A.paymentTermsCustomDate
|
|
73
|
-
}),
|
|
74
|
-
/* @__PURE__ */ b(u, {}),
|
|
75
|
-
C.options.map((e) => /* @__PURE__ */ b(l, {
|
|
76
|
-
value: e.value,
|
|
77
|
-
children: /* @__PURE__ */ b(v, { option: e })
|
|
78
|
-
}, e.value))
|
|
79
|
-
] })]
|
|
80
|
-
}), /* @__PURE__ */ b(o, {
|
|
81
|
-
className: "ttw:w-auto ttw:overflow-hidden ttw:p-0",
|
|
82
|
-
align: "start",
|
|
83
|
-
onFocusOutside: (e) => e.preventDefault(),
|
|
84
|
-
children: O
|
|
85
|
-
})]
|
|
86
|
-
}),
|
|
87
|
-
/* @__PURE__ */ b(n, { errors: w ? [{ message: w }] : [] })
|
|
88
|
-
] }) })
|
|
89
|
-
})
|
|
90
|
-
})]
|
|
91
|
-
});
|
|
92
|
-
}
|
|
2
|
+
var e = "receipt_due", t = "custom";
|
|
93
3
|
//#endregion
|
|
94
|
-
export {
|
|
4
|
+
export { t as RECEIVABLE_PAYMENT_TERMS_CUSTOM_DATE, e as RECEIVABLE_PAYMENT_TERMS_RECEIPT_DUE };
|
|
@@ -1,3 +1,95 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import "./
|
|
3
|
-
import "./index10.js";
|
|
1
|
+
import { Field as e, FieldContent as t, FieldDescription as n, FieldError as r, FieldLabel as i, Popover as a, PopoverAnchor as o, PopoverContent as s, Select as c, SelectContent as l, SelectItem as u, SelectSeparator as d, SelectTrigger as f, SelectValue as p, Skeleton as m, Typography as h } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { RECEIVABLE_BILLING_SECTION_LABELS_EN as g } from "./index2.js";
|
|
3
|
+
import { RECEIVABLE_PAYMENT_TERMS_RECEIPT_DUE as _ } from "./index10.js";
|
|
4
|
+
import { OptionRow as v } from "./index8.js";
|
|
5
|
+
import { SelectionValue as y } from "./index9.js";
|
|
6
|
+
import { jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
7
|
+
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index11.js
|
|
8
|
+
function S({ idPrefix: S, paymentTerms: C, paymentTermsError: w, disabled: T, onPaymentTermsChange: E, onCustomDatePickerOpenChange: D, customDateCalendar: O, recurrenceSection: k, labels: A }) {
|
|
9
|
+
let j = {
|
|
10
|
+
...g,
|
|
11
|
+
...A
|
|
12
|
+
}, M = `${S}-payment-terms`, N = () => {
|
|
13
|
+
window.setTimeout(() => D(!0), 0);
|
|
14
|
+
};
|
|
15
|
+
return /* @__PURE__ */ x("div", {
|
|
16
|
+
className: "ttw:flex ttw:flex-col ttw:gap-2.5 ttw:rounded-xl ttw:border ttw:border-border ttw:p-6",
|
|
17
|
+
children: [/* @__PURE__ */ x("div", {
|
|
18
|
+
className: "ttw:flex ttw:flex-col ttw:gap-2.5 ttw:pb-4",
|
|
19
|
+
children: [/* @__PURE__ */ b(h, {
|
|
20
|
+
variant: "h4",
|
|
21
|
+
children: j.billingHeading
|
|
22
|
+
}), /* @__PURE__ */ b(h, {
|
|
23
|
+
variant: "body2",
|
|
24
|
+
color: "muted",
|
|
25
|
+
className: "ttw:font-medium",
|
|
26
|
+
children: j.billingDescription
|
|
27
|
+
})]
|
|
28
|
+
}), /* @__PURE__ */ x("div", {
|
|
29
|
+
className: "ttw:flex ttw:flex-col ttw:gap-6",
|
|
30
|
+
children: [k, /* @__PURE__ */ b("div", {
|
|
31
|
+
className: "ttw:flex ttw:w-full ttw:items-start ttw:gap-2.5",
|
|
32
|
+
children: C.kind === "loading" ? /* @__PURE__ */ b(m, { className: "ttw:h-9 ttw:w-full" }) : /* @__PURE__ */ b(e, { children: /* @__PURE__ */ x(t, { children: [
|
|
33
|
+
/* @__PURE__ */ b(i, {
|
|
34
|
+
htmlFor: M,
|
|
35
|
+
children: j.paymentTermsLabel
|
|
36
|
+
}),
|
|
37
|
+
/* @__PURE__ */ x(a, {
|
|
38
|
+
open: C.customDatePicker.open,
|
|
39
|
+
onOpenChange: D,
|
|
40
|
+
children: [/* @__PURE__ */ x(c, {
|
|
41
|
+
disabled: T,
|
|
42
|
+
value: C.value,
|
|
43
|
+
onValueChange: (e) => {
|
|
44
|
+
E(e), e === "custom" && N();
|
|
45
|
+
},
|
|
46
|
+
children: [/* @__PURE__ */ b(o, {
|
|
47
|
+
className: "ttw:w-full",
|
|
48
|
+
children: /* @__PURE__ */ b(f, {
|
|
49
|
+
id: M,
|
|
50
|
+
className: "ttw:w-full",
|
|
51
|
+
"aria-invalid": !!w,
|
|
52
|
+
children: /* @__PURE__ */ b(p, {
|
|
53
|
+
placeholder: j.paymentTermsPlaceholder,
|
|
54
|
+
children: /* @__PURE__ */ b(y, {
|
|
55
|
+
selection: C.selection,
|
|
56
|
+
labels: j
|
|
57
|
+
})
|
|
58
|
+
})
|
|
59
|
+
})
|
|
60
|
+
}), /* @__PURE__ */ x(l, { children: [
|
|
61
|
+
/* @__PURE__ */ b(u, {
|
|
62
|
+
value: _,
|
|
63
|
+
children: j.paymentTermsReceiptDue
|
|
64
|
+
}),
|
|
65
|
+
C.showCustomDate && /* @__PURE__ */ b(u, {
|
|
66
|
+
value: "custom",
|
|
67
|
+
onPointerUp: N,
|
|
68
|
+
onClick: N,
|
|
69
|
+
onKeyDown: (e) => {
|
|
70
|
+
(e.key === "Enter" || e.key === " ") && N();
|
|
71
|
+
},
|
|
72
|
+
children: j.paymentTermsCustomDate
|
|
73
|
+
}),
|
|
74
|
+
/* @__PURE__ */ b(d, {}),
|
|
75
|
+
C.options.map((e) => /* @__PURE__ */ b(u, {
|
|
76
|
+
value: e.value,
|
|
77
|
+
children: /* @__PURE__ */ b(v, { option: e })
|
|
78
|
+
}, e.value))
|
|
79
|
+
] })]
|
|
80
|
+
}), /* @__PURE__ */ b(s, {
|
|
81
|
+
className: "ttw:w-auto ttw:overflow-hidden ttw:p-0",
|
|
82
|
+
align: "start",
|
|
83
|
+
onFocusOutside: (e) => e.preventDefault(),
|
|
84
|
+
children: O
|
|
85
|
+
})]
|
|
86
|
+
}),
|
|
87
|
+
C.description && /* @__PURE__ */ b(n, { children: C.description }),
|
|
88
|
+
/* @__PURE__ */ b(r, { errors: w ? [{ message: w }] : [] })
|
|
89
|
+
] }) })
|
|
90
|
+
})]
|
|
91
|
+
})]
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
//#endregion
|
|
95
|
+
export { S as ReceivableBillingSection, S as default };
|
|
@@ -1,24 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index12.js
|
|
5
|
-
var i = {
|
|
6
|
-
danger: "ttw:border-red-200 ttw:bg-red-50 ttw:text-red-700 ttw:hover:bg-red-50",
|
|
7
|
-
info: "ttw:border-blue-200 ttw:bg-blue-50 ttw:text-blue-700 ttw:hover:bg-blue-50",
|
|
8
|
-
neutral: "ttw:border-border ttw:bg-muted ttw:text-foreground ttw:hover:bg-muted",
|
|
9
|
-
success: "ttw:border-emerald-200 ttw:bg-emerald-50 ttw:text-emerald-700 ttw:hover:bg-emerald-50",
|
|
10
|
-
warning: "ttw:border-amber-200 ttw:bg-amber-50 ttw:text-amber-800 ttw:hover:bg-amber-50"
|
|
11
|
-
};
|
|
12
|
-
function a({ status: a, tone: o, labels: s, icon: c }) {
|
|
13
|
-
let l = {
|
|
14
|
-
...n,
|
|
15
|
-
...s
|
|
16
|
-
}, u = l[a] ?? l.unknown;
|
|
17
|
-
return /* @__PURE__ */ r(e, {
|
|
18
|
-
variant: "outline",
|
|
19
|
-
className: t(c && "ttw:gap-1", i[o]),
|
|
20
|
-
children: [c, u]
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
//#endregion
|
|
24
|
-
export { a as ReceivableStatusBadge, a as default };
|
|
1
|
+
import "./index2.js";
|
|
2
|
+
import "./index10.js";
|
|
3
|
+
import "./index11.js";
|
|
@@ -1 +1,24 @@
|
|
|
1
|
-
import "
|
|
1
|
+
import { Badge as e, cn as t } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { RECEIVABLE_STATUS_BADGE_LABELS_EN as n } from "./index4.js";
|
|
3
|
+
import { jsxs as r } from "react/jsx-runtime";
|
|
4
|
+
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index13.js
|
|
5
|
+
var i = {
|
|
6
|
+
danger: "ttw:border-red-200 ttw:bg-red-50 ttw:text-red-700 ttw:hover:bg-red-50",
|
|
7
|
+
info: "ttw:border-blue-200 ttw:bg-blue-50 ttw:text-blue-700 ttw:hover:bg-blue-50",
|
|
8
|
+
neutral: "ttw:border-border ttw:bg-muted ttw:text-foreground ttw:hover:bg-muted",
|
|
9
|
+
success: "ttw:border-emerald-200 ttw:bg-emerald-50 ttw:text-emerald-700 ttw:hover:bg-emerald-50",
|
|
10
|
+
warning: "ttw:border-amber-200 ttw:bg-amber-50 ttw:text-amber-800 ttw:hover:bg-amber-50"
|
|
11
|
+
};
|
|
12
|
+
function a({ status: a, tone: o, labels: s, icon: c }) {
|
|
13
|
+
let l = {
|
|
14
|
+
...n,
|
|
15
|
+
...s
|
|
16
|
+
}, u = l[a] ?? l.unknown;
|
|
17
|
+
return /* @__PURE__ */ r(e, {
|
|
18
|
+
variant: "outline",
|
|
19
|
+
className: t(c && "ttw:gap-1", i[o]),
|
|
20
|
+
children: [c, u]
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
//#endregion
|
|
24
|
+
export { a as ReceivableStatusBadge, a as default };
|
|
@@ -1,18 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { XIcon as r } from "lucide-react";
|
|
5
|
-
t(function({ label: t, onClose: i, variant: a = "ghost", size: o = "icon", onClick: s, ...c }, l) {
|
|
6
|
-
return /* @__PURE__ */ n(e, {
|
|
7
|
-
ref: l,
|
|
8
|
-
variant: a,
|
|
9
|
-
size: o,
|
|
10
|
-
...c,
|
|
11
|
-
"aria-label": t,
|
|
12
|
-
onClick: (e) => {
|
|
13
|
-
s?.(e), i();
|
|
14
|
-
},
|
|
15
|
-
children: /* @__PURE__ */ n(r, { className: "ttw:size-4" })
|
|
16
|
-
});
|
|
17
|
-
});
|
|
18
|
-
//#endregion
|
|
1
|
+
import "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import "react/jsx-runtime";
|
|
3
|
+
import "lucide-react";
|
|
@@ -1 +1,18 @@
|
|
|
1
|
-
import "
|
|
1
|
+
import { Button as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { forwardRef as t } from "react";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
import { XIcon as r } from "lucide-react";
|
|
5
|
+
t(function({ label: t, onClose: i, variant: a = "ghost", size: o = "icon", onClick: s, ...c }, l) {
|
|
6
|
+
return /* @__PURE__ */ n(e, {
|
|
7
|
+
ref: l,
|
|
8
|
+
variant: a,
|
|
9
|
+
size: o,
|
|
10
|
+
...c,
|
|
11
|
+
"aria-label": t,
|
|
12
|
+
onClick: (e) => {
|
|
13
|
+
s?.(e), i();
|
|
14
|
+
},
|
|
15
|
+
children: /* @__PURE__ */ n(r, { className: "ttw:size-4" })
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
//#endregion
|
|
@@ -1,12 +1,4 @@
|
|
|
1
1
|
import "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
-
import "../../../shared/ui/dist/index.js";
|
|
3
|
-
import "./index3.js";
|
|
4
|
-
import "./index12.js";
|
|
5
|
-
import "./index13.js";
|
|
6
2
|
import "./index14.js";
|
|
7
|
-
import "./index15.js";
|
|
8
|
-
import "./index16.js";
|
|
9
|
-
import "./index17.js";
|
|
10
|
-
import "./index18.js";
|
|
11
3
|
import "react/jsx-runtime";
|
|
12
4
|
import "lucide-react";
|
|
@@ -1 +1,12 @@
|
|
|
1
|
+
import "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import "../../../shared/ui/dist/index.js";
|
|
3
|
+
import "./index4.js";
|
|
4
|
+
import "./index13.js";
|
|
5
|
+
import "./index14.js";
|
|
6
|
+
import "./index15.js";
|
|
7
|
+
import "./index16.js";
|
|
8
|
+
import "./index17.js";
|
|
9
|
+
import "./index18.js";
|
|
1
10
|
import "./index19.js";
|
|
11
|
+
import "react/jsx-runtime";
|
|
12
|
+
import "lucide-react";
|