@tesouro/embedded-components-react 0.5.235 → 0.5.236
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 +3 -0
- package/dist/index.d.ts +110 -1
- package/dist/index.js +1 -1
- package/dist/lib/ReceivablesWidget.d.ts +110 -1
- package/dist/lib/ReceivablesWidget.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 +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index15.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index16.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index19.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index21.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index23.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index31.js +210 -208
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index32.js +98 -40
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index33.js +159 -39
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index34.js +53 -77
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index35.js +99 -132
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index36.js +40 -341
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index37.js +43 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index38.js +92 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index39.js +146 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index40.js +354 -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/index9.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +28 -24
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index10.js +2 -37
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index11.js +9 -214
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index12.js +27 -159
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index13.js +233 -14
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js +34 -22
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index15.js +214 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index16.js +153 -87
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index17.js +16 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index18.js +22 -21
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index19.js +2 -51
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index2.js +30 -15
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index20.js +90 -14
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index21.js +3 -10
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index22.js +20 -69
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index23.js +51 -33
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index24.js +16 -17
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index25.js +8 -14
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index26.js +70 -30
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index27.js +33 -14
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index28.js +17 -25
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index29.js +12 -83
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index3.js +9 -121
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index30.js +28 -401
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index31.js +16 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index32.js +22 -42
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index33.js +80 -65
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index34.js +383 -473
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index35.js +2 -106
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index36.js +48 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index37.js +72 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index38.js +498 -4
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index39.js +106 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index4.js +141 -93
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index41.js +2 -28
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index42.js +4 -236
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index43.js +0 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index44.js +90 -239
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index45.js +24 -89
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index46.js +231 -54
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index47.js +3 -353
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index48.js +249 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index49.js +93 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index5.js +3 -40
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index50.js +59 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index51.js +353 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index6.js +18 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index7.js +121 -9
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index8.js +100 -27
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index9.js +38 -233
- 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/index40.js +0 -100
|
@@ -1,106 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
4
|
-
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index35.js
|
|
5
|
-
function h({ message: e }) {
|
|
6
|
-
return e ? /* @__PURE__ */ p("p", {
|
|
7
|
-
className: "ttw:text-sm ttw:text-destructive",
|
|
8
|
-
children: e
|
|
9
|
-
}) : null;
|
|
10
|
-
}
|
|
11
|
-
function g({ open: g, onOpenChange: _, values: v, errors: y, inProgress: b, onChange: x, onSubmit: S, onCancel: C, labels: w }) {
|
|
12
|
-
let T = {
|
|
13
|
-
...f,
|
|
14
|
-
...w
|
|
15
|
-
};
|
|
16
|
-
return /* @__PURE__ */ p(t, {
|
|
17
|
-
open: g,
|
|
18
|
-
onOpenChange: _,
|
|
19
|
-
children: /* @__PURE__ */ m(n, { children: [
|
|
20
|
-
/* @__PURE__ */ m(a, { children: [/* @__PURE__ */ p(o, { children: T.title }), /* @__PURE__ */ p(r, { children: T.description })] }),
|
|
21
|
-
/* @__PURE__ */ m("div", {
|
|
22
|
-
className: "ttw:flex ttw:flex-col ttw:gap-4",
|
|
23
|
-
children: [
|
|
24
|
-
y?.form && /* @__PURE__ */ p("p", {
|
|
25
|
-
className: "ttw:rounded-md ttw:bg-destructive/10 ttw:px-3 ttw:py-2 ttw:text-sm ttw:text-destructive",
|
|
26
|
-
children: y.form
|
|
27
|
-
}),
|
|
28
|
-
/* @__PURE__ */ m("div", {
|
|
29
|
-
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
30
|
-
children: [/* @__PURE__ */ p(c, { children: T.modeLabel }), /* @__PURE__ */ m(l, {
|
|
31
|
-
className: "ttw:flex ttw:flex-row ttw:gap-6",
|
|
32
|
-
value: v.mode,
|
|
33
|
-
onValueChange: (e) => x({ mode: e }),
|
|
34
|
-
children: [/* @__PURE__ */ m("div", {
|
|
35
|
-
className: "ttw:flex ttw:items-center ttw:gap-2",
|
|
36
|
-
children: [/* @__PURE__ */ p(u, {
|
|
37
|
-
value: "full",
|
|
38
|
-
id: "receivable-payment-full"
|
|
39
|
-
}), /* @__PURE__ */ p(c, {
|
|
40
|
-
htmlFor: "receivable-payment-full",
|
|
41
|
-
children: T.fullPayment
|
|
42
|
-
})]
|
|
43
|
-
}), /* @__PURE__ */ m("div", {
|
|
44
|
-
className: "ttw:flex ttw:items-center ttw:gap-2",
|
|
45
|
-
children: [/* @__PURE__ */ p(u, {
|
|
46
|
-
value: "partial",
|
|
47
|
-
id: "receivable-payment-partial"
|
|
48
|
-
}), /* @__PURE__ */ p(c, {
|
|
49
|
-
htmlFor: "receivable-payment-partial",
|
|
50
|
-
children: T.partialPayment
|
|
51
|
-
})]
|
|
52
|
-
})]
|
|
53
|
-
})]
|
|
54
|
-
}),
|
|
55
|
-
v.mode === "partial" && /* @__PURE__ */ m("div", {
|
|
56
|
-
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
57
|
-
children: [
|
|
58
|
-
/* @__PURE__ */ p(c, { children: T.amountPaidLabel }),
|
|
59
|
-
/* @__PURE__ */ p(s, {
|
|
60
|
-
inputMode: "decimal",
|
|
61
|
-
value: v.amountPaid,
|
|
62
|
-
onChange: (e) => x({ amountPaid: e.target.value })
|
|
63
|
-
}),
|
|
64
|
-
/* @__PURE__ */ p(h, { message: y?.amountPaid })
|
|
65
|
-
]
|
|
66
|
-
}),
|
|
67
|
-
v.mode === "full" && /* @__PURE__ */ m("div", {
|
|
68
|
-
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
69
|
-
children: [
|
|
70
|
-
/* @__PURE__ */ p(c, { children: T.paidAtLabel }),
|
|
71
|
-
/* @__PURE__ */ p(s, {
|
|
72
|
-
type: "date",
|
|
73
|
-
value: v.paidAt,
|
|
74
|
-
onChange: (e) => x({ paidAt: e.target.value })
|
|
75
|
-
}),
|
|
76
|
-
/* @__PURE__ */ p(h, { message: y?.paidAt })
|
|
77
|
-
]
|
|
78
|
-
}),
|
|
79
|
-
/* @__PURE__ */ m("div", {
|
|
80
|
-
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
81
|
-
children: [
|
|
82
|
-
/* @__PURE__ */ p(c, { children: T.commentLabel }),
|
|
83
|
-
/* @__PURE__ */ p(d, {
|
|
84
|
-
rows: 3,
|
|
85
|
-
value: v.comment,
|
|
86
|
-
onChange: (e) => x({ comment: e.target.value })
|
|
87
|
-
}),
|
|
88
|
-
/* @__PURE__ */ p(h, { message: y?.comment })
|
|
89
|
-
]
|
|
90
|
-
})
|
|
91
|
-
]
|
|
92
|
-
}),
|
|
93
|
-
/* @__PURE__ */ m(i, { children: [/* @__PURE__ */ p(e, {
|
|
94
|
-
variant: "ghost",
|
|
95
|
-
onClick: C,
|
|
96
|
-
children: T.cancelButton
|
|
97
|
-
}), /* @__PURE__ */ p(e, {
|
|
98
|
-
loading: b,
|
|
99
|
-
onClick: S,
|
|
100
|
-
children: T.submitButton
|
|
101
|
-
})] })
|
|
102
|
-
] })
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
//#endregion
|
|
106
|
-
export { g as ReceivablePaymentDialog, g as default };
|
|
1
|
+
import "./index25.js";
|
|
2
|
+
import "./index34.js";
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { cn as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
+
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index36.js
|
|
4
|
+
function r({ label: r, value: i, className: a }) {
|
|
5
|
+
return /* @__PURE__ */ n("li", {
|
|
6
|
+
className: e("ttw:flex ttw:items-center ttw:justify-between", a),
|
|
7
|
+
children: [/* @__PURE__ */ t("span", { children: r }), /* @__PURE__ */ t("span", { children: i })]
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
function i({ totals: e, labels: i }) {
|
|
11
|
+
return /* @__PURE__ */ n("ul", {
|
|
12
|
+
className: "ttw:flex ttw:w-full ttw:list-none ttw:flex-col ttw:gap-1.5",
|
|
13
|
+
children: [
|
|
14
|
+
/* @__PURE__ */ t(r, {
|
|
15
|
+
label: i.subtotalLabel,
|
|
16
|
+
value: e.subtotal,
|
|
17
|
+
className: "ttw:text-sm ttw:font-normal"
|
|
18
|
+
}),
|
|
19
|
+
/* @__PURE__ */ t(r, {
|
|
20
|
+
label: i.discountTotalLabel,
|
|
21
|
+
value: e.discount,
|
|
22
|
+
className: "ttw:text-sm ttw:font-normal"
|
|
23
|
+
}),
|
|
24
|
+
/* @__PURE__ */ t(r, {
|
|
25
|
+
label: i.nonTaxableSubtotalLabel,
|
|
26
|
+
value: e.nonTaxableSubtotal,
|
|
27
|
+
className: "ttw:text-sm ttw:font-normal ttw:text-muted-foreground"
|
|
28
|
+
}),
|
|
29
|
+
/* @__PURE__ */ t(r, {
|
|
30
|
+
label: i.taxableSubtotalLabel,
|
|
31
|
+
value: e.taxableSubtotal,
|
|
32
|
+
className: "ttw:text-sm ttw:font-normal ttw:text-muted-foreground"
|
|
33
|
+
}),
|
|
34
|
+
/* @__PURE__ */ t(r, {
|
|
35
|
+
label: i.taxTotalLabel,
|
|
36
|
+
value: e.tax,
|
|
37
|
+
className: "ttw:text-sm ttw:font-normal"
|
|
38
|
+
}),
|
|
39
|
+
/* @__PURE__ */ t(r, {
|
|
40
|
+
label: i.totalLabel,
|
|
41
|
+
value: e.total,
|
|
42
|
+
className: "ttw:text-lg ttw:font-medium"
|
|
43
|
+
})
|
|
44
|
+
]
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
//#endregion
|
|
48
|
+
export { i as ReceivableFormTotals };
|
|
@@ -1,2 +1,72 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import "react/jsx-runtime";
|
|
1
|
+
import { Field as e, FieldContent as t, FieldDescription as n, FieldError as r, FieldLabel as i, Textarea as a, Typography as o } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
3
|
+
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index37.js
|
|
4
|
+
function l({ id: l, value: u, error: d, disabled: f, label: p, optionalSuffix: m, placeholder: h, description: g, onChange: _ }) {
|
|
5
|
+
return /* @__PURE__ */ s(e, { children: /* @__PURE__ */ c(t, { children: [
|
|
6
|
+
/* @__PURE__ */ c(i, {
|
|
7
|
+
htmlFor: l,
|
|
8
|
+
className: "ttw:text-nowrap",
|
|
9
|
+
children: [p, /* @__PURE__ */ s(o, {
|
|
10
|
+
variant: "body2",
|
|
11
|
+
component: "span",
|
|
12
|
+
color: "muted",
|
|
13
|
+
className: "ttw:leading-snug",
|
|
14
|
+
children: m
|
|
15
|
+
})]
|
|
16
|
+
}),
|
|
17
|
+
/* @__PURE__ */ s(a, {
|
|
18
|
+
id: l,
|
|
19
|
+
value: u,
|
|
20
|
+
disabled: f,
|
|
21
|
+
placeholder: h,
|
|
22
|
+
className: "ttw:h-26 ttw:resize-none",
|
|
23
|
+
"aria-invalid": !!d,
|
|
24
|
+
onChange: (e) => _(e.target.value)
|
|
25
|
+
}),
|
|
26
|
+
/* @__PURE__ */ s(n, { children: g }),
|
|
27
|
+
/* @__PURE__ */ s(r, { errors: d ? [{ message: d }] : [] })
|
|
28
|
+
] }) });
|
|
29
|
+
}
|
|
30
|
+
function u({ idPrefix: e, openingNote: t, closingNote: n, openingNoteError: r, closingNoteError: i, disabled: a, onOpeningNoteChange: u, onClosingNoteChange: d, labels: f }) {
|
|
31
|
+
return /* @__PURE__ */ c("div", {
|
|
32
|
+
className: "ttw:flex ttw:flex-col ttw:gap-2.5 ttw:rounded-xl ttw:border ttw:border-border ttw:p-6",
|
|
33
|
+
children: [
|
|
34
|
+
/* @__PURE__ */ c("div", {
|
|
35
|
+
className: "ttw:flex ttw:flex-col ttw:gap-2.5 ttw:pb-4",
|
|
36
|
+
children: [/* @__PURE__ */ s(o, {
|
|
37
|
+
variant: "h4",
|
|
38
|
+
children: f.notesHeading
|
|
39
|
+
}), /* @__PURE__ */ s(o, {
|
|
40
|
+
variant: "body2",
|
|
41
|
+
color: "muted",
|
|
42
|
+
className: "ttw:font-medium",
|
|
43
|
+
children: f.notesDescription
|
|
44
|
+
})]
|
|
45
|
+
}),
|
|
46
|
+
/* @__PURE__ */ s(l, {
|
|
47
|
+
id: `${e}-opening-note`,
|
|
48
|
+
value: t,
|
|
49
|
+
error: r,
|
|
50
|
+
disabled: a,
|
|
51
|
+
label: f.openingNoteLabel,
|
|
52
|
+
optionalSuffix: f.optionalSuffix,
|
|
53
|
+
placeholder: f.openingNotePlaceholder,
|
|
54
|
+
description: f.openingNoteDescription,
|
|
55
|
+
onChange: u
|
|
56
|
+
}),
|
|
57
|
+
/* @__PURE__ */ s(l, {
|
|
58
|
+
id: `${e}-closing-note`,
|
|
59
|
+
value: n,
|
|
60
|
+
error: i,
|
|
61
|
+
disabled: a,
|
|
62
|
+
label: f.closingNoteLabel,
|
|
63
|
+
optionalSuffix: f.optionalSuffix,
|
|
64
|
+
placeholder: f.closingNotePlaceholder,
|
|
65
|
+
description: f.closingNoteDescription,
|
|
66
|
+
onChange: d
|
|
67
|
+
})
|
|
68
|
+
]
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
//#endregion
|
|
72
|
+
export { u as ReceivableNotesSection };
|