@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.
Files changed (77) hide show
  1. package/README.md +3 -0
  2. package/dist/index.d.ts +110 -1
  3. package/dist/index.js +1 -1
  4. package/dist/lib/ReceivablesWidget.d.ts +110 -1
  5. package/dist/lib/ReceivablesWidget.js +1 -1
  6. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index.js +1 -1
  7. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index10.js +1 -1
  8. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index15.js +1 -1
  9. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index16.js +3 -3
  10. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index19.js +1 -1
  11. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index21.js +1 -1
  12. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index23.js +1 -1
  13. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index31.js +210 -208
  14. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index32.js +98 -40
  15. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index33.js +159 -39
  16. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index34.js +53 -77
  17. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index35.js +99 -132
  18. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index36.js +40 -341
  19. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index37.js +43 -0
  20. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index38.js +92 -0
  21. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index39.js +146 -0
  22. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index40.js +354 -0
  23. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index5.js +1 -1
  24. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index9.js +1 -1
  25. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +28 -24
  26. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index10.js +2 -37
  27. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index11.js +9 -214
  28. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index12.js +27 -159
  29. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index13.js +233 -14
  30. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js +34 -22
  31. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index15.js +214 -2
  32. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index16.js +153 -87
  33. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index17.js +16 -3
  34. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index18.js +22 -21
  35. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index19.js +2 -51
  36. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index2.js +30 -15
  37. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index20.js +90 -14
  38. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index21.js +3 -10
  39. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index22.js +20 -69
  40. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index23.js +51 -33
  41. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index24.js +16 -17
  42. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index25.js +8 -14
  43. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index26.js +70 -30
  44. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index27.js +33 -14
  45. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index28.js +17 -25
  46. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index29.js +12 -83
  47. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index3.js +9 -121
  48. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index30.js +28 -401
  49. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index31.js +16 -2
  50. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index32.js +22 -42
  51. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index33.js +80 -65
  52. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index34.js +383 -473
  53. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index35.js +2 -106
  54. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index36.js +48 -0
  55. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index37.js +72 -2
  56. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index38.js +498 -4
  57. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index39.js +106 -1
  58. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index4.js +141 -93
  59. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index41.js +2 -28
  60. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index42.js +4 -236
  61. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index43.js +0 -2
  62. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index44.js +90 -239
  63. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index45.js +24 -89
  64. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index46.js +231 -54
  65. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index47.js +3 -353
  66. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index48.js +249 -0
  67. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index49.js +93 -0
  68. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index5.js +3 -40
  69. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index50.js +59 -0
  70. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index51.js +353 -0
  71. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index6.js +18 -2
  72. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index7.js +121 -9
  73. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index8.js +100 -27
  74. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index9.js +38 -233
  75. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  76. package/package.json +1 -1
  77. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index40.js +0 -100
@@ -1,95 +1,161 @@
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 "./index7.js";
3
- import { RECEIVABLE_PAYMENT_TERMS_RECEIPT_DUE as _ } from "./index15.js";
4
- import { OptionRow as v } from "./index13.js";
5
- import { SelectionValue as y } from "./index14.js";
6
- import { jsx as b, jsxs as x } from "react/jsx-runtime";
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_SHEET_LABELS_EN as a } from "./index13.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";
7
5
  //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index16.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);
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
14
10
  };
15
- return /* @__PURE__ */ x("div", {
11
+ return /* @__PURE__ */ c("div", {
16
12
  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
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
+ })]
85
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" })
86
122
  }),
87
- C.description && /* @__PURE__ */ b(n, { children: C.description }),
88
- /* @__PURE__ */ b(r, { errors: w ? [{ message: w }] : [] })
89
- ] }) })
90
- })]
91
- })]
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
+ ]
92
158
  });
93
159
  }
94
160
  //#endregion
95
- export { S as ReceivableBillingSection, S as default };
161
+ export { m as ReceivableAttachmentsSection };
@@ -1,3 +1,16 @@
1
- import "./index7.js";
2
- import "./index15.js";
3
- import "./index16.js";
1
+ import { jsx as e, jsxs as t } from "react/jsx-runtime";
2
+ //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index17.js
3
+ function n({ option: n }) {
4
+ return /* @__PURE__ */ t("span", {
5
+ className: "ttw:flex ttw:w-full ttw:min-w-0 ttw:items-center ttw:justify-between ttw:gap-2",
6
+ children: [/* @__PURE__ */ e("span", {
7
+ className: "ttw:truncate",
8
+ children: n.label
9
+ }), n.dueDateLabel && /* @__PURE__ */ e("span", {
10
+ className: "ttw:shrink-0 ttw:text-xs ttw:text-muted-foreground",
11
+ children: n.dueDateLabel
12
+ })]
13
+ });
14
+ }
15
+ //#endregion
16
+ export { n as OptionRow };
@@ -1,24 +1,25 @@
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 "./index9.js";
3
- import { jsxs as r } from "react/jsx-runtime";
1
+ import { cn as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { OptionRow as t } from "./index17.js";
3
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
+ import { CalendarIcon as i } from "lucide-react";
4
5
  //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index18.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, label: o, tone: s, labels: c, icon: l }) {
13
- let u = {
14
- ...n,
15
- ...c
16
- }, d = o ?? u[a] ?? u.unknown;
17
- return /* @__PURE__ */ r(e, {
18
- variant: "outline",
19
- className: t(l && "ttw:gap-1", i[s]),
20
- children: [l, d]
21
- });
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;
22
23
  }
23
24
  //#endregion
24
- export { a as ReceivableStatusBadge, a as default };
25
+ export { a as SelectionValue };
@@ -1,53 +1,4 @@
1
- import { Ban as e, CalendarX2 as t, Check as n, ChevronsRight as r, CircleCheck as i, CircleSlash as a, CircleX as o, ClipboardCheck as s, Clock as c, CopyPlus as l, Mail as u, Pause as d, PenTool as f, Pencil as p, Play as m, Trash2 as h } from "lucide-react";
2
1
  //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index19.js
3
- var g = {
4
- edit: "editButton",
5
- issue: "issueButton",
6
- recordPayment: "recordPaymentButton",
7
- send: "sendButton",
8
- accept: "acceptButton",
9
- decline: "declineButton",
10
- markPaid: "markPaidButton",
11
- markUncollectible: "markUncollectibleButton",
12
- cancel: "cancelButton",
13
- clone: "cloneButton",
14
- delete: "deleteButton",
15
- pauseRecurrence: "pauseRecurrenceButton",
16
- resumeRecurrence: "resumeRecurrenceButton",
17
- cancelRecurrence: "cancelRecurrenceButton"
18
- }, _ = {
19
- edit: p,
20
- issue: u,
21
- recordPayment: s,
22
- send: u,
23
- accept: i,
24
- decline: o,
25
- markPaid: i,
26
- markUncollectible: a,
27
- cancel: e,
28
- clone: l,
29
- delete: h,
30
- pauseRecurrence: d,
31
- resumeRecurrence: m,
32
- cancelRecurrence: t
33
- }, v = {
34
- draft: f,
35
- issuing: c,
36
- issued: c,
37
- partially_paid: c,
38
- paid: n,
39
- overdue: c,
40
- canceled: e
41
- }, y = {
42
- forward: r,
43
- pause: d,
44
- ban: e,
45
- check: n
46
- }, b = {
47
- default: "ttw:text-foreground",
48
- danger: "ttw:text-red-600",
49
- success: "ttw:text-emerald-600",
50
- muted: "ttw:text-muted-foreground"
51
- }, x = "ttw:bg-muted ttw:text-muted-foreground ttw:hover:bg-accent";
2
+ var e = "receipt_due", t = "custom";
52
3
  //#endregion
53
- export { _ as ACTION_ICON, g as ACTION_LABEL_KEY, y as SERIES_STATUS_ICON, v as STATUS_ICON, b as amountValueToneClass, x as headerIconButtonClass };
4
+ export { t as RECEIVABLE_PAYMENT_TERMS_CUSTOM_DATE, e as RECEIVABLE_PAYMENT_TERMS_RECEIPT_DUE };
@@ -1,18 +1,33 @@
1
+ import { AMOUNT_FILTER_LABELS_EN as e, DATE_RANGE_PICKER_LABELS_EN as t, FILTER_MENU_BUTTON_LABELS_EN as n, FILTER_TAG_LABELS_EN as r } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
1
2
  //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index2.js
2
- var e = {
3
- issueDescription: "The customer will be emailed a copy of the invoice with payment instructions.",
4
- toLabel: "To",
5
- subjectLabel: "Subject",
6
- messageLabel: "Message",
7
- messagePlaceholder: "e.g., Thank you for your business",
8
- attachmentsLabel: "Attachments",
9
- attachmentsCaption: "To change what files are attached to the email, you will need to update the invoice.",
10
- skipButton: "Skip",
11
- sendButton: "Send invoice",
12
- productsQuestion: "Do you want to also save these items?",
13
- productsCaption: "Saved items can be quickly added to future invoices.",
14
- productsAllLabel: "Products and services",
15
- saveItemsButton: "Save selected items"
3
+ var i = {
4
+ fields: {
5
+ dueDate: "Due date",
6
+ createdAt: "Created on",
7
+ issueDate: "Issue date",
8
+ status: "Status",
9
+ amount: "Amount",
10
+ customer: "Customer"
11
+ },
12
+ searchPlaceholder: "Search by number or customer...",
13
+ searchLabel: "Search invoices",
14
+ amountMin: "No less than",
15
+ amountMax: "No more than",
16
+ customerNameHeading: "Customer name",
17
+ customerSearchPlaceholder: "Search customers...",
18
+ customerSearchHint: "Matches names containing your search",
19
+ clearAll: "Clear all",
20
+ filterMenuButton: n,
21
+ filterTag: r,
22
+ amountFilter: {
23
+ modeAny: e.modeAny,
24
+ modeExact: e.modeExact,
25
+ modeRange: e.modeRange,
26
+ flowAny: e.flowAny,
27
+ flowIn: e.flowIn,
28
+ flowOut: e.flowOut
29
+ },
30
+ dateRangePicker: { presetPlaceholder: t.presetPlaceholder }
16
31
  };
17
32
  //#endregion
18
- export { e as RECEIVABLE_ACTIONS_MODAL_LABELS_EN };
33
+ export { i as INVOICES_FILTER_BAR_LABELS_EN };
@@ -1,19 +1,95 @@
1
- import { cn as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { amountValueToneClass as t } from "./index19.js";
3
- import { jsx as n, jsxs as r } from "react/jsx-runtime";
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 "./index11.js";
3
+ import { RECEIVABLE_PAYMENT_TERMS_RECEIPT_DUE as _ } from "./index19.js";
4
+ import { OptionRow as v } from "./index17.js";
5
+ import { SelectionValue as y } from "./index18.js";
6
+ import { jsx as b, jsxs as x } from "react/jsx-runtime";
4
7
  //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index20.js
5
- function i({ row: i, defaultTone: a }) {
6
- let o = i.tone ?? (i.emphasis ? a : "default");
7
- return /* @__PURE__ */ r("div", {
8
- className: "ttw:flex ttw:flex-col ttw:gap-0.5",
9
- children: [/* @__PURE__ */ n("span", {
10
- className: "ttw:text-xs ttw:font-medium ttw:text-muted-foreground",
11
- children: i.label
12
- }), /* @__PURE__ */ n("span", {
13
- className: e(i.emphasis ? "ttw:text-2xl ttw:font-semibold" : "ttw:text-base ttw:font-medium", t[o]),
14
- children: i.value
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
+ })]
15
91
  })]
16
92
  });
17
93
  }
18
94
  //#endregion
19
- export { i as AmountCell };
95
+ export { S as ReceivableBillingSection, S as default };
@@ -1,10 +1,3 @@
1
- //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index21.js
2
- var e = {
3
- billing: "billing",
4
- lineItems: "line-items",
5
- notes: "notes",
6
- attachments: "attachments",
7
- auditHistory: "audit-history"
8
- };
9
- //#endregion
10
- export { e as RECEIVABLE_DETAILS_SECTION };
1
+ import "./index11.js";
2
+ import "./index19.js";
3
+ import "./index20.js";
@@ -1,73 +1,24 @@
1
- import { AccordionContent as e, AccordionItem as t, AccordionTrigger as n, Badge as r, Typography as i } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { RECEIVABLE_DETAILS_SECTION as a } from "./index21.js";
3
- import { jsx as o, jsxs as s } from "react/jsx-runtime";
4
- import { Check as c } from "lucide-react";
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 "./index13.js";
3
+ import { jsxs as r } from "react/jsx-runtime";
5
4
  //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index22.js
6
- function l({ attachments: l, labels: u }) {
7
- return /* @__PURE__ */ s(t, {
8
- value: a.attachments,
9
- children: [/* @__PURE__ */ o(n, { children: /* @__PURE__ */ s("span", {
10
- className: "ttw:flex ttw:items-center ttw:gap-2",
11
- children: [/* @__PURE__ */ o("span", {
12
- className: "ttw:group-hover:underline",
13
- children: u.attachmentsHeading
14
- }), /* @__PURE__ */ o(r, {
15
- variant: "secondary",
16
- className: "ttw:rounded-full",
17
- children: l.countLabel
18
- })]
19
- }) }), /* @__PURE__ */ o(e, { children: l.rows.length === 0 ? /* @__PURE__ */ o(i, {
20
- variant: "body2",
21
- color: "muted",
22
- children: u.attachmentsEmpty
23
- }) : /* @__PURE__ */ s("table", {
24
- className: "ttw:w-full ttw:border-collapse",
25
- children: [/* @__PURE__ */ o("thead", { children: /* @__PURE__ */ s("tr", {
26
- className: "ttw:border-b ttw:border-border",
27
- children: [/* @__PURE__ */ o("th", {
28
- scope: "col",
29
- className: "ttw:py-2 ttw:text-left",
30
- children: /* @__PURE__ */ o(i, {
31
- component: "span",
32
- variant: "caption",
33
- color: "muted",
34
- children: u.attachmentsFileColumn
35
- })
36
- }), /* @__PURE__ */ o("th", {
37
- scope: "col",
38
- className: "ttw:py-2 ttw:text-right",
39
- children: /* @__PURE__ */ o(i, {
40
- component: "span",
41
- variant: "caption",
42
- color: "muted",
43
- children: u.attachmentsEmailedColumn
44
- })
45
- })]
46
- }) }), /* @__PURE__ */ o("tbody", { children: l.rows.map((e) => /* @__PURE__ */ s("tr", {
47
- className: "ttw:border-b ttw:border-border ttw:last:border-b-0",
48
- children: [/* @__PURE__ */ o("td", {
49
- className: "ttw:py-3",
50
- children: /* @__PURE__ */ o("a", {
51
- href: e.url,
52
- target: "_blank",
53
- rel: "noreferrer",
54
- className: "ttw:text-primary ttw:hover:underline",
55
- children: e.name
56
- })
57
- }), /* @__PURE__ */ o("td", {
58
- className: "ttw:py-3 ttw:text-right ttw:align-middle",
59
- children: e.includeInEmail ? /* @__PURE__ */ o(c, {
60
- role: "img",
61
- "aria-label": e.emailedLabel,
62
- className: "ttw:inline-block ttw:size-4 ttw:text-emerald-600"
63
- }) : /* @__PURE__ */ o("span", {
64
- className: "ttw:sr-only",
65
- children: e.emailedLabel
66
- })
67
- })]
68
- }, e.id)) })]
69
- }) })]
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, label: o, tone: s, labels: c, icon: l }) {
13
+ let u = {
14
+ ...n,
15
+ ...c
16
+ }, d = o ?? u[a] ?? u.unknown;
17
+ return /* @__PURE__ */ r(e, {
18
+ variant: "outline",
19
+ className: t(l && "ttw:gap-1", i[s]),
20
+ children: [l, d]
70
21
  });
71
22
  }
72
23
  //#endregion
73
- export { l as AttachmentsItem };
24
+ export { a as ReceivableStatusBadge, a as default };