@tesouro/embedded-components-react 0.11.206 → 0.11.211
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.css +13 -126
- package/dist/index.d.ts +6 -5
- package/dist/lib/ReceivablesWidget.d.ts +6 -5
- package/dist/lib/WidgetSuite.d.ts +6 -5
- 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 +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +16 -18
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/details.js +186 -239
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/helpers.js +59 -52
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/labels.js +5 -4
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/paymentRecord.js +5 -5
- 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/preview.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/recurrence.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/recurringSeries.js +19 -23
- 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/statusColors.js +34 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableActions.js +2 -6
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableActionsModal.js +5 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableDetails.js +16 -16
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableForm.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablePaymentRecord.js +1 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesTable.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +28 -27
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index11.js +18 -120
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index12.js +89 -84
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index13.js +91 -36
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js +41 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index15.js +2 -12
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index16.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index17.js +9 -25
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index18.js +26 -208
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index19.js +209 -52
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index20.js +50 -208
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index21.js +186 -138
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index22.js +157 -12
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index23.js +10 -19
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index24.js +23 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index25.js +2 -116
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index26.js +117 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index27.js +3 -198
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index28.js +198 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index29.js +2 -54
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index30.js +14 -19
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index31.js +22 -8
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index32.js +40 -77
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index33.js +17 -37
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index34.js +8 -18
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index35.js +61 -38
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index36.js +27 -27
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index37.js +26 -15
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index38.js +14 -6
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index39.js +19 -35
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index40.js +31 -14
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index41.js +67 -24
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index42.js +391 -84
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index43.js +2 -494
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index44.js +47 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index45.js +62 -38
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index46.js +433 -61
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index47.js +176 -428
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index48.js +20 -224
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index49.js +6 -21
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index51.js +264 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index52.js +2 -264
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index53.js +131 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index54.js +22 -126
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index55.js +235 -23
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index56.js +3 -239
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index57.js +247 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index58.js +26 -244
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index59.js +183 -26
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index60.js +21 -194
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index61.js +143 -21
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index62.js +2 -143
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index63.js +47 -2
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index16.js +47 -48
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index17.js +127 -144
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index3.js +0 -3
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index16.js +107 -111
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index5.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index7.js +2 -31
- 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/lib/helpers.js +1 -1
- package/dist/packages/shared-ui-shadcn/dist/index.js +1554 -1544
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index50.js +0 -7
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index64.js +0 -47
|
@@ -1,15 +1,160 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Button as e, Checkbox as t, Separator as n, Typography as r, cn as i } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { RECEIVABLE_FORM_DIALOG_LABELS_EN as a } from "./index19.js";
|
|
3
|
+
import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
4
|
+
import { FileText as l, ImageIcon as u, Loader2 as d, Trash2 as f, X as p } from "lucide-react";
|
|
2
5
|
// ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index22.js
|
|
3
|
-
function
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
function m({ view: m, isDragging: h, disabled: g, inputRef: _, onBrowseClick: v, onDragOver: y, onDragLeave: b, onDrop: x, onFilesSelect: S, onIncludeInEmailChange: C, onRemove: w, labels: T }) {
|
|
7
|
+
let E = {
|
|
8
|
+
...a,
|
|
9
|
+
...T
|
|
10
|
+
};
|
|
11
|
+
return /* @__PURE__ */ c("div", {
|
|
12
|
+
className: "ttw:flex ttw:flex-col ttw:gap-2.5 ttw:rounded-xl ttw:border ttw:border-border ttw:p-6",
|
|
13
|
+
children: [
|
|
14
|
+
/* @__PURE__ */ c("div", {
|
|
15
|
+
className: "ttw:flex ttw:flex-col ttw:gap-2.5 ttw:pb-4",
|
|
16
|
+
children: [/* @__PURE__ */ s(r, {
|
|
17
|
+
variant: "h4",
|
|
18
|
+
children: E.attachmentsHeading
|
|
19
|
+
}), /* @__PURE__ */ s(r, {
|
|
20
|
+
variant: "body2",
|
|
21
|
+
color: "muted",
|
|
22
|
+
className: "ttw:font-medium",
|
|
23
|
+
children: E.attachmentsDescription
|
|
24
|
+
})]
|
|
25
|
+
}),
|
|
26
|
+
m.showRows && /* @__PURE__ */ c("div", {
|
|
27
|
+
className: "ttw:flex ttw:flex-col ttw:gap-2",
|
|
28
|
+
children: [m.emailCaption && /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s(r, {
|
|
29
|
+
variant: "caption",
|
|
30
|
+
color: "muted",
|
|
31
|
+
children: m.emailCaption
|
|
32
|
+
}), /* @__PURE__ */ s(n, {})] }), /* @__PURE__ */ c("ul", {
|
|
33
|
+
className: "ttw:flex ttw:flex-col ttw:gap-2",
|
|
34
|
+
children: [m.attachedRows.map((n) => /* @__PURE__ */ c("li", {
|
|
35
|
+
className: "ttw:flex ttw:items-center ttw:gap-2",
|
|
36
|
+
children: [/* @__PURE__ */ s(t, {
|
|
37
|
+
checked: n.includeInEmail,
|
|
38
|
+
disabled: g,
|
|
39
|
+
"aria-label": n.includeInEmailLabel,
|
|
40
|
+
onCheckedChange: (e) => C(n.id, e === !0)
|
|
41
|
+
}), /* @__PURE__ */ c("div", {
|
|
42
|
+
className: "ttw:flex ttw:w-full ttw:items-center ttw:gap-3 ttw:rounded-lg ttw:bg-muted ttw:px-2 ttw:py-1",
|
|
43
|
+
children: [/* @__PURE__ */ c("div", {
|
|
44
|
+
className: "ttw:flex ttw:min-w-0 ttw:flex-1 ttw:items-center ttw:gap-1",
|
|
45
|
+
children: [/* @__PURE__ */ s(r, {
|
|
46
|
+
variant: "body2",
|
|
47
|
+
className: "ttw:truncate",
|
|
48
|
+
children: n.name
|
|
49
|
+
}), /* @__PURE__ */ c(r, {
|
|
50
|
+
variant: "body2",
|
|
51
|
+
color: "muted",
|
|
52
|
+
className: "ttw:shrink-0",
|
|
53
|
+
children: [
|
|
54
|
+
"(",
|
|
55
|
+
n.sizeLabel,
|
|
56
|
+
")"
|
|
57
|
+
]
|
|
58
|
+
})]
|
|
59
|
+
}), /* @__PURE__ */ s(e, {
|
|
60
|
+
type: "button",
|
|
61
|
+
variant: "ghost",
|
|
62
|
+
size: "icon",
|
|
63
|
+
className: "ttw:size-4",
|
|
64
|
+
disabled: g,
|
|
65
|
+
"aria-label": n.removeLabel,
|
|
66
|
+
onClick: () => w(n.id),
|
|
67
|
+
children: /* @__PURE__ */ s(f, { className: "ttw:size-4" })
|
|
68
|
+
})]
|
|
69
|
+
})]
|
|
70
|
+
}, n.id)), m.pendingRows.map((t) => /* @__PURE__ */ c("li", {
|
|
71
|
+
className: "ttw:flex ttw:w-full ttw:items-center ttw:gap-3 ttw:rounded-lg ttw:bg-muted ttw:px-2 ttw:py-1",
|
|
72
|
+
children: [
|
|
73
|
+
t.state === "uploading" ? /* @__PURE__ */ s(d, { className: "ttw:size-5 ttw:shrink-0 ttw:animate-spin ttw:text-muted-foreground" }) : /* @__PURE__ */ s(l, { className: "ttw:size-5 ttw:shrink-0 ttw:text-destructive" }),
|
|
74
|
+
/* @__PURE__ */ c("div", {
|
|
75
|
+
className: "ttw:flex ttw:min-w-0 ttw:flex-1 ttw:flex-col",
|
|
76
|
+
children: [/* @__PURE__ */ s(r, {
|
|
77
|
+
variant: "body2",
|
|
78
|
+
className: "ttw:truncate",
|
|
79
|
+
children: t.name
|
|
80
|
+
}), t.state === "uploading" ? /* @__PURE__ */ s(r, {
|
|
81
|
+
variant: "caption",
|
|
82
|
+
color: "muted",
|
|
83
|
+
children: t.message
|
|
84
|
+
}) : /* @__PURE__ */ s(r, {
|
|
85
|
+
variant: "caption",
|
|
86
|
+
role: "alert",
|
|
87
|
+
className: "ttw:text-destructive",
|
|
88
|
+
children: t.message
|
|
89
|
+
})]
|
|
90
|
+
}),
|
|
91
|
+
/* @__PURE__ */ s(e, {
|
|
92
|
+
type: "button",
|
|
93
|
+
variant: "ghost",
|
|
94
|
+
size: "icon",
|
|
95
|
+
disabled: g,
|
|
96
|
+
"aria-label": t.removeLabel,
|
|
97
|
+
onClick: () => w(t.id),
|
|
98
|
+
children: /* @__PURE__ */ s(p, { className: "ttw:size-4" })
|
|
99
|
+
})
|
|
100
|
+
]
|
|
101
|
+
}, t.id))]
|
|
102
|
+
})]
|
|
103
|
+
}),
|
|
104
|
+
/* @__PURE__ */ c("button", {
|
|
105
|
+
type: "button",
|
|
106
|
+
disabled: g,
|
|
107
|
+
onClick: v,
|
|
108
|
+
onDragOver: (e) => {
|
|
109
|
+
e.preventDefault(), y();
|
|
110
|
+
},
|
|
111
|
+
onDragLeave: (e) => {
|
|
112
|
+
e.preventDefault(), b();
|
|
113
|
+
},
|
|
114
|
+
onDrop: (e) => {
|
|
115
|
+
e.preventDefault(), x(e.dataTransfer.files);
|
|
116
|
+
},
|
|
117
|
+
className: i("ttw:flex ttw:w-full ttw:flex-col ttw:items-center ttw:gap-2 ttw:rounded-xl ttw:border ttw:border-dashed ttw:p-6 ttw:text-center ttw:disabled:cursor-not-allowed ttw:disabled:opacity-50", h ? "ttw:border-primary ttw:bg-primary/5" : "ttw:border-border ttw:bg-muted"),
|
|
118
|
+
children: [
|
|
119
|
+
/* @__PURE__ */ s("span", {
|
|
120
|
+
className: "ttw:flex ttw:size-10 ttw:items-center ttw:justify-center ttw:rounded-full ttw:border ttw:border-border",
|
|
121
|
+
children: /* @__PURE__ */ s(u, { className: "ttw:size-5 ttw:text-muted-foreground" })
|
|
122
|
+
}),
|
|
123
|
+
/* @__PURE__ */ c(r, {
|
|
124
|
+
variant: "body2",
|
|
125
|
+
children: [
|
|
126
|
+
E.attachmentsDropPrompt,
|
|
127
|
+
" ",
|
|
128
|
+
/* @__PURE__ */ s("span", {
|
|
129
|
+
className: "ttw:text-primary ttw:underline",
|
|
130
|
+
children: E.attachmentsBrowseLink
|
|
131
|
+
})
|
|
132
|
+
]
|
|
133
|
+
}),
|
|
134
|
+
/* @__PURE__ */ s(r, {
|
|
135
|
+
variant: "caption",
|
|
136
|
+
color: "muted",
|
|
137
|
+
children: E.attachmentsFormatsHint
|
|
138
|
+
})
|
|
139
|
+
]
|
|
140
|
+
}),
|
|
141
|
+
m.countLimitMessage && /* @__PURE__ */ s(r, {
|
|
142
|
+
variant: "body2",
|
|
143
|
+
role: "alert",
|
|
144
|
+
className: "ttw:text-destructive",
|
|
145
|
+
children: m.countLimitMessage
|
|
146
|
+
}),
|
|
147
|
+
/* @__PURE__ */ s("input", {
|
|
148
|
+
ref: _,
|
|
149
|
+
type: "file",
|
|
150
|
+
multiple: !0,
|
|
151
|
+
tabIndex: -1,
|
|
152
|
+
"aria-hidden": !0,
|
|
153
|
+
className: "ttw:sr-only",
|
|
154
|
+
accept: m.accept,
|
|
155
|
+
onChange: (e) => S(e.target.files)
|
|
156
|
+
})
|
|
157
|
+
]
|
|
13
158
|
});
|
|
14
159
|
}
|
|
15
|
-
export {
|
|
160
|
+
export { m as ReceivableAttachmentsSection };
|
|
@@ -1,24 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { OptionRow as t } from "./index22.js";
|
|
3
|
-
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
-
import { CalendarIcon as i } from "lucide-react";
|
|
1
|
+
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
5
2
|
// ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index23.js
|
|
6
|
-
function
|
|
7
|
-
return
|
|
8
|
-
className: "ttw:truncate",
|
|
9
|
-
children: o.paymentTermsReceiptDue
|
|
10
|
-
}) : a?.kind === "customDate" ? /* @__PURE__ */ r("span", {
|
|
3
|
+
function n({ option: n }) {
|
|
4
|
+
return /* @__PURE__ */ t("span", {
|
|
11
5
|
className: "ttw:flex ttw:w-full ttw:min-w-0 ttw:items-center ttw:justify-between ttw:gap-2",
|
|
12
|
-
children: [/* @__PURE__ */
|
|
13
|
-
className: "ttw:
|
|
14
|
-
children:
|
|
15
|
-
|
|
16
|
-
children: a.dateLabel
|
|
17
|
-
})]
|
|
18
|
-
}), /* @__PURE__ */ n("span", {
|
|
6
|
+
children: [/* @__PURE__ */ e("span", {
|
|
7
|
+
className: "ttw:truncate",
|
|
8
|
+
children: n.label
|
|
9
|
+
}), n.dueDateLabel && /* @__PURE__ */ e("span", {
|
|
19
10
|
className: "ttw:shrink-0 ttw:text-xs ttw:text-muted-foreground",
|
|
20
|
-
children:
|
|
11
|
+
children: n.dueDateLabel
|
|
21
12
|
})]
|
|
22
|
-
})
|
|
13
|
+
});
|
|
23
14
|
}
|
|
24
|
-
export {
|
|
15
|
+
export { n as OptionRow };
|
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
import { cn as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { OptionRow as t } from "./index23.js";
|
|
3
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
+
import { CalendarIcon as i } from "lucide-react";
|
|
1
5
|
// ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index24.js
|
|
2
|
-
|
|
3
|
-
|
|
6
|
+
function a({ selection: a, labels: o }) {
|
|
7
|
+
return a?.kind === "receiptDue" ? /* @__PURE__ */ n("span", {
|
|
8
|
+
className: "ttw:truncate",
|
|
9
|
+
children: o.paymentTermsReceiptDue
|
|
10
|
+
}) : a?.kind === "customDate" ? /* @__PURE__ */ r("span", {
|
|
11
|
+
className: "ttw:flex ttw:w-full ttw:min-w-0 ttw:items-center ttw:justify-between ttw:gap-2",
|
|
12
|
+
children: [/* @__PURE__ */ r("span", {
|
|
13
|
+
className: "ttw:flex ttw:min-w-0 ttw:items-center ttw:gap-1.5",
|
|
14
|
+
children: [/* @__PURE__ */ n(i, { className: e("ttw:size-4 ttw:shrink-0", !a.hasDate && "ttw:text-muted-foreground") }), /* @__PURE__ */ n("span", {
|
|
15
|
+
className: e("ttw:truncate", !a.hasDate && "ttw:text-muted-foreground"),
|
|
16
|
+
children: a.dateLabel
|
|
17
|
+
})]
|
|
18
|
+
}), /* @__PURE__ */ n("span", {
|
|
19
|
+
className: "ttw:shrink-0 ttw:text-xs ttw:text-muted-foreground",
|
|
20
|
+
children: o.paymentTermsCustomDate
|
|
21
|
+
})]
|
|
22
|
+
}) : a?.kind === "term" ? /* @__PURE__ */ n(t, { option: a.option }) : null;
|
|
23
|
+
}
|
|
24
|
+
export { a as SelectionValue };
|
|
@@ -1,117 +1,3 @@
|
|
|
1
|
-
import { Field as e, FieldContent as t, FieldDescription as n, FieldError as r, FieldLabel as i, Input as a, Popover as o, PopoverAnchor as s, PopoverContent as c, Select as l, SelectContent as u, SelectItem as d, SelectSeparator as f, SelectTrigger as p, SelectValue as m, Skeleton as h, Typography as g } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
-
import { RECEIVABLE_BILLING_SECTION_LABELS_EN as _ } from "./index15.js";
|
|
3
|
-
import { RECEIVABLE_PAYMENT_TERMS_RECEIPT_DUE as v } from "./index24.js";
|
|
4
|
-
import { OptionRow as y } from "./index22.js";
|
|
5
|
-
import { SelectionValue as b } from "./index23.js";
|
|
6
|
-
import { jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
7
1
|
// ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index25.js
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
..._,
|
|
11
|
-
...P
|
|
12
|
-
}, I = `${C}-payment-terms`, L = `${C}-purchase-order`, R = () => {
|
|
13
|
-
window.setTimeout(() => O(!0), 0);
|
|
14
|
-
};
|
|
15
|
-
return /* @__PURE__ */ S("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__ */ S("div", {
|
|
18
|
-
className: "ttw:flex ttw:flex-col ttw:gap-2.5 ttw:pb-4",
|
|
19
|
-
children: [/* @__PURE__ */ x(g, {
|
|
20
|
-
variant: "h4",
|
|
21
|
-
children: F.billingHeading
|
|
22
|
-
}), /* @__PURE__ */ x(g, {
|
|
23
|
-
variant: "body2",
|
|
24
|
-
color: "muted",
|
|
25
|
-
className: "ttw:font-medium",
|
|
26
|
-
children: F.billingDescription
|
|
27
|
-
})]
|
|
28
|
-
}), /* @__PURE__ */ S("div", {
|
|
29
|
-
className: "ttw:flex ttw:flex-col ttw:gap-6",
|
|
30
|
-
children: [
|
|
31
|
-
M,
|
|
32
|
-
/* @__PURE__ */ S("div", {
|
|
33
|
-
className: "ttw:flex ttw:w-full ttw:items-start ttw:gap-2.5",
|
|
34
|
-
children: [w.kind === "loading" ? /* @__PURE__ */ x(h, { className: "ttw:h-9 ttw:w-full" }) : /* @__PURE__ */ x(e, { children: /* @__PURE__ */ S(t, { children: [
|
|
35
|
-
/* @__PURE__ */ x(i, {
|
|
36
|
-
htmlFor: I,
|
|
37
|
-
children: F.paymentTermsLabel
|
|
38
|
-
}),
|
|
39
|
-
/* @__PURE__ */ S(o, {
|
|
40
|
-
open: w.customDatePicker.open,
|
|
41
|
-
onOpenChange: O,
|
|
42
|
-
children: [/* @__PURE__ */ S(l, {
|
|
43
|
-
disabled: E,
|
|
44
|
-
value: w.value,
|
|
45
|
-
onValueChange: (e) => {
|
|
46
|
-
D(e), e === "custom" && R();
|
|
47
|
-
},
|
|
48
|
-
children: [/* @__PURE__ */ x(s, {
|
|
49
|
-
className: "ttw:w-full",
|
|
50
|
-
children: /* @__PURE__ */ x(p, {
|
|
51
|
-
id: I,
|
|
52
|
-
className: "ttw:w-full",
|
|
53
|
-
"aria-invalid": !!T,
|
|
54
|
-
children: /* @__PURE__ */ x(m, {
|
|
55
|
-
placeholder: F.paymentTermsPlaceholder,
|
|
56
|
-
children: /* @__PURE__ */ x(b, {
|
|
57
|
-
selection: w.selection,
|
|
58
|
-
labels: F
|
|
59
|
-
})
|
|
60
|
-
})
|
|
61
|
-
})
|
|
62
|
-
}), /* @__PURE__ */ S(u, { children: [
|
|
63
|
-
/* @__PURE__ */ x(d, {
|
|
64
|
-
value: v,
|
|
65
|
-
children: F.paymentTermsReceiptDue
|
|
66
|
-
}),
|
|
67
|
-
w.showCustomDate && /* @__PURE__ */ x(d, {
|
|
68
|
-
value: "custom",
|
|
69
|
-
onPointerUp: R,
|
|
70
|
-
onClick: R,
|
|
71
|
-
onKeyDown: (e) => {
|
|
72
|
-
(e.key === "Enter" || e.key === " ") && R();
|
|
73
|
-
},
|
|
74
|
-
children: F.paymentTermsCustomDate
|
|
75
|
-
}),
|
|
76
|
-
/* @__PURE__ */ x(f, {}),
|
|
77
|
-
w.options.map((e) => /* @__PURE__ */ x(d, {
|
|
78
|
-
value: e.value,
|
|
79
|
-
children: /* @__PURE__ */ x(y, { option: e })
|
|
80
|
-
}, e.value))
|
|
81
|
-
] })]
|
|
82
|
-
}), /* @__PURE__ */ x(c, {
|
|
83
|
-
className: "ttw:w-auto ttw:overflow-hidden ttw:p-0",
|
|
84
|
-
align: "start",
|
|
85
|
-
onFocusOutside: (e) => e.preventDefault(),
|
|
86
|
-
children: k
|
|
87
|
-
})]
|
|
88
|
-
}),
|
|
89
|
-
w.description && /* @__PURE__ */ x(n, { children: w.description }),
|
|
90
|
-
/* @__PURE__ */ x(r, { errors: T ? [{ message: T }] : [] })
|
|
91
|
-
] }) }), A && /* @__PURE__ */ x(e, { children: /* @__PURE__ */ S(t, { children: [
|
|
92
|
-
/* @__PURE__ */ S(i, {
|
|
93
|
-
htmlFor: L,
|
|
94
|
-
className: "ttw:text-nowrap",
|
|
95
|
-
children: [F.purchaseOrderLabel, /* @__PURE__ */ x(g, {
|
|
96
|
-
variant: "body2",
|
|
97
|
-
color: "muted",
|
|
98
|
-
className: "ttw:leading-snug",
|
|
99
|
-
children: F.purchaseOrderOptional
|
|
100
|
-
})]
|
|
101
|
-
}),
|
|
102
|
-
/* @__PURE__ */ x(a, {
|
|
103
|
-
id: L,
|
|
104
|
-
value: A.value,
|
|
105
|
-
disabled: E,
|
|
106
|
-
"aria-invalid": !!A.error,
|
|
107
|
-
onChange: (e) => j?.(e.target.value)
|
|
108
|
-
}),
|
|
109
|
-
/* @__PURE__ */ x(r, { errors: A.error ? [{ message: A.error }] : [] })
|
|
110
|
-
] }) })]
|
|
111
|
-
}),
|
|
112
|
-
N
|
|
113
|
-
]
|
|
114
|
-
})]
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
export { C as ReceivableBillingSection, C as default };
|
|
2
|
+
var e = "receipt_due", t = "custom";
|
|
3
|
+
export { t as RECEIVABLE_PAYMENT_TERMS_CUSTOM_DATE, e as RECEIVABLE_PAYMENT_TERMS_RECEIPT_DUE };
|
|
@@ -1,3 +1,117 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import "./
|
|
3
|
-
import "./index25.js";
|
|
1
|
+
import { Field as e, FieldContent as t, FieldDescription as n, FieldError as r, FieldLabel as i, Input as a, Popover as o, PopoverAnchor as s, PopoverContent as c, Select as l, SelectContent as u, SelectItem as d, SelectSeparator as f, SelectTrigger as p, SelectValue as m, Skeleton as h, Typography as g } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { RECEIVABLE_BILLING_SECTION_LABELS_EN as _ } from "./index16.js";
|
|
3
|
+
import { RECEIVABLE_PAYMENT_TERMS_RECEIPT_DUE as v } from "./index25.js";
|
|
4
|
+
import { OptionRow as y } from "./index23.js";
|
|
5
|
+
import { SelectionValue as b } from "./index24.js";
|
|
6
|
+
import { jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
7
|
+
// ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index26.js
|
|
8
|
+
function C({ idPrefix: C, paymentTerms: w, paymentTermsError: T, disabled: E, onPaymentTermsChange: D, onCustomDatePickerOpenChange: O, customDateCalendar: k, purchaseOrder: A, onPurchaseOrderChange: j, recurrenceSection: M, remindersSection: N, labels: P }) {
|
|
9
|
+
let F = {
|
|
10
|
+
..._,
|
|
11
|
+
...P
|
|
12
|
+
}, I = `${C}-payment-terms`, L = `${C}-purchase-order`, R = () => {
|
|
13
|
+
window.setTimeout(() => O(!0), 0);
|
|
14
|
+
};
|
|
15
|
+
return /* @__PURE__ */ S("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__ */ S("div", {
|
|
18
|
+
className: "ttw:flex ttw:flex-col ttw:gap-2.5 ttw:pb-4",
|
|
19
|
+
children: [/* @__PURE__ */ x(g, {
|
|
20
|
+
variant: "h4",
|
|
21
|
+
children: F.billingHeading
|
|
22
|
+
}), /* @__PURE__ */ x(g, {
|
|
23
|
+
variant: "body2",
|
|
24
|
+
color: "muted",
|
|
25
|
+
className: "ttw:font-medium",
|
|
26
|
+
children: F.billingDescription
|
|
27
|
+
})]
|
|
28
|
+
}), /* @__PURE__ */ S("div", {
|
|
29
|
+
className: "ttw:flex ttw:flex-col ttw:gap-6",
|
|
30
|
+
children: [
|
|
31
|
+
M,
|
|
32
|
+
/* @__PURE__ */ S("div", {
|
|
33
|
+
className: "ttw:flex ttw:w-full ttw:items-start ttw:gap-2.5",
|
|
34
|
+
children: [w.kind === "loading" ? /* @__PURE__ */ x(h, { className: "ttw:h-9 ttw:w-full" }) : /* @__PURE__ */ x(e, { children: /* @__PURE__ */ S(t, { children: [
|
|
35
|
+
/* @__PURE__ */ x(i, {
|
|
36
|
+
htmlFor: I,
|
|
37
|
+
children: F.paymentTermsLabel
|
|
38
|
+
}),
|
|
39
|
+
/* @__PURE__ */ S(o, {
|
|
40
|
+
open: w.customDatePicker.open,
|
|
41
|
+
onOpenChange: O,
|
|
42
|
+
children: [/* @__PURE__ */ S(l, {
|
|
43
|
+
disabled: E,
|
|
44
|
+
value: w.value,
|
|
45
|
+
onValueChange: (e) => {
|
|
46
|
+
D(e), e === "custom" && R();
|
|
47
|
+
},
|
|
48
|
+
children: [/* @__PURE__ */ x(s, {
|
|
49
|
+
className: "ttw:w-full",
|
|
50
|
+
children: /* @__PURE__ */ x(p, {
|
|
51
|
+
id: I,
|
|
52
|
+
className: "ttw:w-full",
|
|
53
|
+
"aria-invalid": !!T,
|
|
54
|
+
children: /* @__PURE__ */ x(m, {
|
|
55
|
+
placeholder: F.paymentTermsPlaceholder,
|
|
56
|
+
children: /* @__PURE__ */ x(b, {
|
|
57
|
+
selection: w.selection,
|
|
58
|
+
labels: F
|
|
59
|
+
})
|
|
60
|
+
})
|
|
61
|
+
})
|
|
62
|
+
}), /* @__PURE__ */ S(u, { children: [
|
|
63
|
+
/* @__PURE__ */ x(d, {
|
|
64
|
+
value: v,
|
|
65
|
+
children: F.paymentTermsReceiptDue
|
|
66
|
+
}),
|
|
67
|
+
w.showCustomDate && /* @__PURE__ */ x(d, {
|
|
68
|
+
value: "custom",
|
|
69
|
+
onPointerUp: R,
|
|
70
|
+
onClick: R,
|
|
71
|
+
onKeyDown: (e) => {
|
|
72
|
+
(e.key === "Enter" || e.key === " ") && R();
|
|
73
|
+
},
|
|
74
|
+
children: F.paymentTermsCustomDate
|
|
75
|
+
}),
|
|
76
|
+
/* @__PURE__ */ x(f, {}),
|
|
77
|
+
w.options.map((e) => /* @__PURE__ */ x(d, {
|
|
78
|
+
value: e.value,
|
|
79
|
+
children: /* @__PURE__ */ x(y, { option: e })
|
|
80
|
+
}, e.value))
|
|
81
|
+
] })]
|
|
82
|
+
}), /* @__PURE__ */ x(c, {
|
|
83
|
+
className: "ttw:w-auto ttw:overflow-hidden ttw:p-0",
|
|
84
|
+
align: "start",
|
|
85
|
+
onFocusOutside: (e) => e.preventDefault(),
|
|
86
|
+
children: k
|
|
87
|
+
})]
|
|
88
|
+
}),
|
|
89
|
+
w.description && /* @__PURE__ */ x(n, { children: w.description }),
|
|
90
|
+
/* @__PURE__ */ x(r, { errors: T ? [{ message: T }] : [] })
|
|
91
|
+
] }) }), A && /* @__PURE__ */ x(e, { children: /* @__PURE__ */ S(t, { children: [
|
|
92
|
+
/* @__PURE__ */ S(i, {
|
|
93
|
+
htmlFor: L,
|
|
94
|
+
className: "ttw:text-nowrap",
|
|
95
|
+
children: [F.purchaseOrderLabel, /* @__PURE__ */ x(g, {
|
|
96
|
+
variant: "body2",
|
|
97
|
+
color: "muted",
|
|
98
|
+
className: "ttw:leading-snug",
|
|
99
|
+
children: F.purchaseOrderOptional
|
|
100
|
+
})]
|
|
101
|
+
}),
|
|
102
|
+
/* @__PURE__ */ x(a, {
|
|
103
|
+
id: L,
|
|
104
|
+
value: A.value,
|
|
105
|
+
disabled: E,
|
|
106
|
+
"aria-invalid": !!A.error,
|
|
107
|
+
onChange: (e) => j?.(e.target.value)
|
|
108
|
+
}),
|
|
109
|
+
/* @__PURE__ */ x(r, { errors: A.error ? [{ message: A.error }] : [] })
|
|
110
|
+
] }) })]
|
|
111
|
+
}),
|
|
112
|
+
N
|
|
113
|
+
]
|
|
114
|
+
})]
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
export { C as ReceivableBillingSection, C as default };
|