@tesouro/embedded-components-react 0.5.278 → 0.5.280

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/dist/index.d.ts +21 -6
  2. package/dist/lib/ReceivablesWidget.d.ts +21 -6
  3. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index.js +14 -13
  4. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index10.js +24 -168
  5. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index11.js +173 -44
  6. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index12.js +42 -94
  7. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index13.js +91 -76
  8. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index14.js +67 -173
  9. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index15.js +186 -17
  10. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index16.js +27 -0
  11. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index3.js +11 -13
  12. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index4.js +42 -27
  13. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index5.js +28 -132
  14. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index6.js +137 -16
  15. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index7.js +16 -62
  16. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index8.js +66 -28
  17. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index9.js +28 -34
  18. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivableAttachmentsSection.js +1 -1
  19. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivableCustomerSection.js +38 -0
  20. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +304 -287
  21. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/auditHistory/labels.js +1 -1
  22. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/customer.js +58 -0
  23. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/helpers.js +15 -15
  24. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/labels.js +14 -6
  25. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/paymentTerms.js +1 -1
  26. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/permissions.js +2 -1
  27. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/preview.js +62 -62
  28. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/recurrence.js +41 -35
  29. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/reminders.js +1 -1
  30. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/totals.js +21 -13
  31. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableActions.js +124 -124
  32. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableActionsModal.js +11 -11
  33. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableAttachmentUploads.js +13 -13
  34. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableBankAccount.js +1 -1
  35. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableCustomerPicker.js +109 -0
  36. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableDetails.js +6 -6
  37. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableForm.js +520 -476
  38. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableIssuePreflight.js +10 -10
  39. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablePaymentRecord.js +6 -6
  40. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablePaymentTerms.js +1 -1
  41. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablePreview.js +1 -1
  42. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableRecurrence.js +92 -77
  43. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableReminders.js +11 -11
  44. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableStatusCards.js +1 -1
  45. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesTable.js +4 -4
  46. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesWidget.js +79 -75
  47. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useSendReceivableWithPaymentLink.js +3 -3
  48. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +26 -23
  49. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index12.js +9 -25
  50. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index13.js +26 -228
  51. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js +227 -52
  52. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index15.js +50 -212
  53. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index16.js +193 -138
  54. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index17.js +157 -12
  55. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index18.js +10 -19
  56. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index19.js +23 -2
  57. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index20.js +2 -116
  58. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index21.js +118 -3
  59. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index22.js +3 -39
  60. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index23.js +209 -53
  61. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index24.js +2 -23
  62. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index25.js +36 -7
  63. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index26.js +53 -77
  64. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index27.js +17 -35
  65. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index28.js +8 -18
  66. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index29.js +73 -37
  67. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index30.js +36 -26
  68. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index31.js +17 -19
  69. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index32.js +39 -8
  70. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index33.js +26 -33
  71. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index34.js +20 -14
  72. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index35.js +8 -24
  73. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index36.js +34 -84
  74. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index37.js +14 -492
  75. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index38.js +28 -2
  76. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index39.js +79 -39
  77. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index40.js +490 -68
  78. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index41.js +2 -487
  79. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index42.js +41 -217
  80. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index43.js +70 -21
  81. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index44.js +440 -5
  82. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index45.js +224 -0
  83. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index46.js +21 -263
  84. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index47.js +8 -2
  85. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index49.js +261 -24
  86. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index50.js +2 -237
  87. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index51.js +100 -3
  88. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index52.js +21 -242
  89. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index53.js +226 -82
  90. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index54.js +3 -60
  91. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index55.js +233 -178
  92. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index56.js +85 -37
  93. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index57.js +60 -0
  94. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index58.js +194 -0
  95. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index59.js +45 -0
  96. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/lib/useLinkedAccountsWidget.js +1 -1
  97. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index503.js +1 -1
  98. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/index.js +9 -9
  99. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/CounterpartSelector.js +2 -23
  100. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartSelector.js +2 -51
  101. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index.js +8 -8
  102. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index15.js +4 -80
  103. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index2.js +10 -22
  104. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  105. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/widgetDomEvents.js +1 -1
  106. package/package.json +1 -1
  107. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index48.js +0 -100
@@ -1,224 +1,48 @@
1
- import { Alert as e, AlertDescription as t, Button as n, DatePicker as r, Dialog as i, DialogContent as a, DialogFooter as o, DialogHeader as s, DialogTitle as c, FieldRequirement as l, InputGroup as u, InputGroupAddon as d, InputGroupInput as f, Label as p, Skeleton as m } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { RECEIVABLE_PAYMENT_DIALOG_LABELS_EN as h } from "./index13.js";
3
- import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
4
- import { NotebookPen as y } from "lucide-react";
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";
5
3
  //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index42.js
6
- var b = {
7
- amount: "receivable-payment-amount",
8
- date: "receivable-payment-date",
9
- time: "receivable-payment-time"
10
- };
11
- function x({ id: e, message: t }) {
12
- return t ? /* @__PURE__ */ _("p", {
13
- id: e,
14
- className: "ttw:text-sm ttw:text-destructive",
15
- children: t
16
- }) : null;
17
- }
18
- function S({ label: e, children: t }) {
19
- return /* @__PURE__ */ v("div", {
20
- className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-4 ttw:px-4 ttw:py-3",
21
- children: [/* @__PURE__ */ _("dt", {
22
- className: "ttw:text-sm ttw:text-muted-foreground",
23
- children: e
24
- }), /* @__PURE__ */ _("dd", {
25
- className: "ttw:text-sm ttw:font-medium ttw:text-right ttw:break-all",
26
- children: t
27
- })]
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 })]
28
8
  });
29
9
  }
30
- function C({ open: C, onOpenChange: w, step: T, values: E, errors: D, currencySymbol: O, amountDueLabel: k, review: A, inProgress: j, onChange: M, onFillAmountDue: N, onSave: P, onEdit: F, onConfirm: I, onCancel: L, labels: R }) {
31
- let z = {
32
- ...h,
33
- ...R
34
- };
35
- return /* @__PURE__ */ _(i, {
36
- open: C,
37
- onOpenChange: w,
38
- children: /* @__PURE__ */ _(a, {
39
- "aria-describedby": void 0,
40
- className: "ttw:flex ttw:flex-col ttw:gap-6",
41
- children: T === "review" && A ? /* @__PURE__ */ v(g, { children: [
42
- /* @__PURE__ */ v(s, {
43
- className: "ttw:items-center ttw:text-center",
44
- children: [
45
- /* @__PURE__ */ _("div", {
46
- className: "ttw:flex ttw:size-11 ttw:items-center ttw:justify-center ttw:rounded-full ttw:bg-muted",
47
- children: /* @__PURE__ */ _(y, { className: "ttw:size-5 ttw:text-muted-foreground" })
48
- }),
49
- /* @__PURE__ */ _(c, {
50
- className: "ttw:text-base ttw:font-normal",
51
- children: z.reviewTitle
52
- }),
53
- /* @__PURE__ */ _("p", {
54
- className: "ttw:text-2xl ttw:font-semibold",
55
- children: A.amountLabel
56
- }),
57
- /* @__PURE__ */ _("p", {
58
- className: "ttw:text-sm",
59
- children: A.fromLabel
60
- })
61
- ]
62
- }),
63
- /* @__PURE__ */ v("dl", {
64
- className: "ttw:divide-y ttw:divide-border ttw:rounded-lg ttw:border ttw:border-border",
65
- children: [
66
- /* @__PURE__ */ _(S, {
67
- label: z.receivedLabel,
68
- children: A.receivedLabel
69
- }),
70
- /* @__PURE__ */ _(S, {
71
- label: z.referenceLabel,
72
- children: A.referenceLabel
73
- }),
74
- /* @__PURE__ */ _(S, {
75
- label: z.createdByLabel,
76
- children: A.isCreatedByLoading ? /* @__PURE__ */ _(m, { className: "ttw:h-4 ttw:w-24" }) : A.createdByLabel
77
- })
78
- ]
79
- }),
80
- /* @__PURE__ */ _(e, {
81
- className: "ttw:border-amber-200 ttw:bg-amber-50 ttw:text-amber-800",
82
- children: /* @__PURE__ */ _(t, {
83
- className: "ttw:text-amber-800",
84
- children: z.reviewWarning
85
- })
86
- }),
87
- /* @__PURE__ */ v(o, {
88
- className: "ttw:sm:justify-between",
89
- children: [/* @__PURE__ */ _(n, {
90
- variant: "ghost",
91
- onClick: L,
92
- children: z.cancelButton
93
- }), /* @__PURE__ */ v("div", {
94
- className: "ttw:flex ttw:gap-2",
95
- children: [/* @__PURE__ */ _(n, {
96
- variant: "outline",
97
- disabled: j,
98
- onClick: F,
99
- children: z.editRecordButton
100
- }), /* @__PURE__ */ _(n, {
101
- disabled: j,
102
- onClick: I,
103
- children: z.confirmButton
104
- })]
105
- })]
106
- })
107
- ] }) : /* @__PURE__ */ v("form", {
108
- className: "ttw:flex ttw:flex-col ttw:gap-6",
109
- noValidate: !0,
110
- onSubmit: (e) => {
111
- e.preventDefault(), P();
112
- },
113
- children: [
114
- /* @__PURE__ */ _(s, { children: /* @__PURE__ */ _(c, { children: z.title }) }),
115
- /* @__PURE__ */ v("div", {
116
- className: "ttw:flex ttw:flex-col ttw:gap-1.5",
117
- children: [
118
- /* @__PURE__ */ _(p, {
119
- htmlFor: b.amount,
120
- requirement: l.Required,
121
- children: z.amountLabel
122
- }),
123
- /* @__PURE__ */ v(u, { children: [/* @__PURE__ */ _(f, {
124
- id: b.amount,
125
- type: "number",
126
- required: !0,
127
- placeholder: z.amountPlaceholder,
128
- "data-has-end-addon": !0,
129
- "aria-invalid": !!D?.amount || void 0,
130
- "aria-describedby": D?.amount ? `${b.amount}-error` : void 0,
131
- value: E.amount,
132
- onChange: (e) => M({ amount: e.target.value })
133
- }), /* @__PURE__ */ _(d, {
134
- align: "inline-end",
135
- children: O
136
- })] }),
137
- /* @__PURE__ */ _(x, {
138
- id: `${b.amount}-error`,
139
- message: D?.amount
140
- }),
141
- /* @__PURE__ */ v("p", {
142
- className: "ttw:text-sm ttw:text-muted-foreground",
143
- children: [
144
- z.fullAmountDuePrefix,
145
- " ",
146
- /* @__PURE__ */ _(n, {
147
- type: "button",
148
- variant: "link",
149
- className: "ttw:h-auto ttw:p-0 ttw:underline",
150
- onClick: N,
151
- children: k
152
- })
153
- ]
154
- })
155
- ]
156
- }),
157
- /* @__PURE__ */ v("div", {
158
- className: "ttw:grid ttw:grid-cols-2 ttw:gap-4",
159
- children: [/* @__PURE__ */ v("div", {
160
- className: "ttw:flex ttw:flex-col ttw:gap-1.5",
161
- children: [
162
- /* @__PURE__ */ _(p, {
163
- htmlFor: b.date,
164
- requirement: l.Required,
165
- children: z.dateLabel
166
- }),
167
- /* @__PURE__ */ _(r, {
168
- id: b.date,
169
- value: E.paymentDate,
170
- onChange: (e) => M({ paymentDate: e }),
171
- placeholder: z.datePlaceholder,
172
- "aria-invalid": !!D?.paymentDate || void 0,
173
- "aria-describedby": D?.paymentDate ? `${b.date}-error` : void 0
174
- }),
175
- /* @__PURE__ */ _(x, {
176
- id: `${b.date}-error`,
177
- message: D?.paymentDate
178
- })
179
- ]
180
- }), /* @__PURE__ */ v("div", {
181
- className: "ttw:flex ttw:flex-col ttw:gap-1.5",
182
- children: [
183
- /* @__PURE__ */ _(p, {
184
- htmlFor: b.time,
185
- requirement: l.Required,
186
- children: z.timeLabel
187
- }),
188
- /* @__PURE__ */ v(u, { children: [/* @__PURE__ */ _(f, {
189
- id: b.time,
190
- type: "time",
191
- required: !0,
192
- "data-has-end-addon": !0,
193
- "aria-invalid": !!D?.paymentTime || void 0,
194
- "aria-describedby": D?.paymentTime ? `${b.time}-error` : void 0,
195
- value: E.paymentTime,
196
- onChange: (e) => M({ paymentTime: e.target.value })
197
- }), /* @__PURE__ */ _(d, {
198
- align: "inline-end",
199
- children: z.timeZoneSuffix
200
- })] }),
201
- /* @__PURE__ */ _(x, {
202
- id: `${b.time}-error`,
203
- message: D?.paymentTime
204
- })
205
- ]
206
- })]
207
- }),
208
- /* @__PURE__ */ v(o, { children: [/* @__PURE__ */ _(n, {
209
- type: "button",
210
- variant: "ghost",
211
- onClick: L,
212
- children: z.cancelButton
213
- }), /* @__PURE__ */ _(n, {
214
- type: "submit",
215
- loading: j,
216
- children: z.saveButton
217
- })] })
218
- ]
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"
219
43
  })
220
- })
44
+ ]
221
45
  });
222
46
  }
223
47
  //#endregion
224
- export { C as ReceivablePaymentDialog, C as default };
48
+ export { i as ReceivableFormTotals };
@@ -1,23 +1,72 @@
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";
1
3
  //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index43.js
2
- var e = {
3
- title: "Invoice",
4
- noLogo: "No logo",
5
- billToHeading: "Bill to",
6
- detailsHeading: "Details",
7
- invoiceNumberLabel: "Invoice number",
8
- invoiceDateLabel: "Invoice date",
9
- dueDateLabel: "Due date",
10
- paymentTermsLabel: "Payment terms",
11
- purchaseOrderLabel: "PO number",
12
- pending: "Pending",
13
- descriptionColumn: "Description",
14
- quantityColumn: "Qty",
15
- priceColumn: "Price",
16
- taxableColumn: "Taxable",
17
- amountColumn: "Amount",
18
- noItems: "No items",
19
- payOnline: "Pay online",
20
- paymentQrCodeLabel: "Sample payment QR code"
21
- };
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
+ }
22
71
  //#endregion
23
- export { e as RECEIVABLE_PREVIEW_LABELS_EN };
72
+ export { u as ReceivableNotesSection };