@tesouro/embedded-components-react 0.5.268 → 0.5.271

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 (60) hide show
  1. package/dist/index.css +4 -10
  2. package/dist/index.d.ts +13 -9
  3. package/dist/lib/ReceivablesWidget.d.ts +13 -9
  4. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index2.js +22 -18
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index14.js +8 -4
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/invalidation.js +3 -3
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/lib/invalidatePayableQueries/reconcileSubmittedForApprovalQueries.js +1 -1
  8. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index.js +3 -1
  9. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/CounterpartDetailsContainer.js +44 -0
  10. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/useCounterpartDetailsSheetView.js +97 -0
  11. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/useCounterpartsWidget.js +76 -150
  12. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +63 -57
  13. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/actionsModal.js +1 -1
  14. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/auditHistory/labels.js +1 -1
  15. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/details.js +161 -152
  16. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/helpers.js +30 -34
  17. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/labels.js +12 -8
  18. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/statusCards.js +18 -19
  19. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableActions.js +208 -158
  20. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableDetails.js +91 -85
  21. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableForm.js +197 -196
  22. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesWidget.js +147 -115
  23. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +14 -14
  24. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index13.js +3 -5
  25. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js +37 -34
  26. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index22.js +22 -7
  27. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index23.js +17 -15
  28. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index24.js +17 -13
  29. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index26.js +37 -31
  30. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index27.js +29 -23
  31. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index29.js +38 -11
  32. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index30.js +26 -28
  33. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index31.js +20 -14
  34. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index32.js +8 -24
  35. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index33.js +34 -83
  36. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index34.js +14 -404
  37. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index35.js +28 -2
  38. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index36.js +79 -39
  39. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index37.js +490 -68
  40. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index38.js +2 -502
  41. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index39.js +41 -216
  42. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index40.js +70 -21
  43. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index41.js +484 -5
  44. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index42.js +224 -0
  45. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index43.js +21 -263
  46. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index44.js +8 -2
  47. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index46.js +261 -24
  48. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index47.js +2 -237
  49. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index48.js +100 -3
  50. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index49.js +21 -242
  51. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index50.js +226 -82
  52. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index51.js +3 -59
  53. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index52.js +233 -178
  54. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index53.js +85 -37
  55. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index54.js +60 -0
  56. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index55.js +194 -0
  57. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index56.js +45 -0
  58. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  59. package/package.json +1 -1
  60. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index45.js +0 -100
@@ -1,223 +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/index39.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
- children: T === "review" && A ? /* @__PURE__ */ v(g, { children: [
41
- /* @__PURE__ */ v(s, {
42
- className: "ttw:items-center ttw:text-center",
43
- children: [
44
- /* @__PURE__ */ _("div", {
45
- className: "ttw:flex ttw:size-11 ttw:items-center ttw:justify-center ttw:rounded-full ttw:bg-muted",
46
- children: /* @__PURE__ */ _(y, { className: "ttw:size-5 ttw:text-muted-foreground" })
47
- }),
48
- /* @__PURE__ */ _(c, {
49
- className: "ttw:text-base ttw:font-normal",
50
- children: z.reviewTitle
51
- }),
52
- /* @__PURE__ */ _("p", {
53
- className: "ttw:text-2xl ttw:font-semibold",
54
- children: A.amountLabel
55
- }),
56
- /* @__PURE__ */ _("p", {
57
- className: "ttw:text-sm",
58
- children: A.fromLabel
59
- })
60
- ]
61
- }),
62
- /* @__PURE__ */ v("dl", {
63
- className: "ttw:divide-y ttw:divide-border ttw:rounded-lg ttw:border ttw:border-border",
64
- children: [
65
- /* @__PURE__ */ _(S, {
66
- label: z.receivedLabel,
67
- children: A.receivedLabel
68
- }),
69
- /* @__PURE__ */ _(S, {
70
- label: z.referenceLabel,
71
- children: A.referenceLabel
72
- }),
73
- /* @__PURE__ */ _(S, {
74
- label: z.createdByLabel,
75
- children: A.isCreatedByLoading ? /* @__PURE__ */ _(m, { className: "ttw:h-4 ttw:w-24" }) : A.createdByLabel
76
- })
77
- ]
78
- }),
79
- /* @__PURE__ */ _(e, {
80
- className: "ttw:border-amber-200 ttw:bg-amber-50 ttw:text-amber-800",
81
- children: /* @__PURE__ */ _(t, {
82
- className: "ttw:text-amber-800",
83
- children: z.reviewWarning
84
- })
85
- }),
86
- /* @__PURE__ */ v(o, {
87
- className: "ttw:sm:justify-between",
88
- children: [/* @__PURE__ */ _(n, {
89
- variant: "ghost",
90
- onClick: L,
91
- children: z.cancelButton
92
- }), /* @__PURE__ */ v("div", {
93
- className: "ttw:flex ttw:gap-2",
94
- children: [/* @__PURE__ */ _(n, {
95
- variant: "outline",
96
- disabled: j,
97
- onClick: F,
98
- children: z.editRecordButton
99
- }), /* @__PURE__ */ _(n, {
100
- disabled: j,
101
- onClick: I,
102
- children: z.confirmButton
103
- })]
104
- })]
105
- })
106
- ] }) : /* @__PURE__ */ v("form", {
107
- className: "ttw:flex ttw:flex-col ttw:gap-4",
108
- noValidate: !0,
109
- onSubmit: (e) => {
110
- e.preventDefault(), P();
111
- },
112
- children: [
113
- /* @__PURE__ */ _(s, { children: /* @__PURE__ */ _(c, { children: z.title }) }),
114
- /* @__PURE__ */ v("div", {
115
- className: "ttw:flex ttw:flex-col ttw:gap-1.5",
116
- children: [
117
- /* @__PURE__ */ _(p, {
118
- htmlFor: b.amount,
119
- requirement: l.Required,
120
- children: z.amountLabel
121
- }),
122
- /* @__PURE__ */ v(u, { children: [/* @__PURE__ */ _(f, {
123
- id: b.amount,
124
- type: "number",
125
- required: !0,
126
- placeholder: z.amountPlaceholder,
127
- "data-has-end-addon": !0,
128
- "aria-invalid": !!D?.amount || void 0,
129
- "aria-describedby": D?.amount ? `${b.amount}-error` : void 0,
130
- value: E.amount,
131
- onChange: (e) => M({ amount: e.target.value })
132
- }), /* @__PURE__ */ _(d, {
133
- align: "inline-end",
134
- children: O
135
- })] }),
136
- /* @__PURE__ */ _(x, {
137
- id: `${b.amount}-error`,
138
- message: D?.amount
139
- }),
140
- /* @__PURE__ */ v("p", {
141
- className: "ttw:text-sm ttw:text-muted-foreground",
142
- children: [
143
- z.fullAmountDuePrefix,
144
- " ",
145
- /* @__PURE__ */ _(n, {
146
- type: "button",
147
- variant: "link",
148
- className: "ttw:h-auto ttw:p-0 ttw:underline",
149
- onClick: N,
150
- children: k
151
- })
152
- ]
153
- })
154
- ]
155
- }),
156
- /* @__PURE__ */ v("div", {
157
- className: "ttw:grid ttw:grid-cols-2 ttw:gap-4",
158
- children: [/* @__PURE__ */ v("div", {
159
- className: "ttw:flex ttw:flex-col ttw:gap-1.5",
160
- children: [
161
- /* @__PURE__ */ _(p, {
162
- htmlFor: b.date,
163
- requirement: l.Required,
164
- children: z.dateLabel
165
- }),
166
- /* @__PURE__ */ _(r, {
167
- id: b.date,
168
- value: E.paymentDate,
169
- onChange: (e) => M({ paymentDate: e }),
170
- placeholder: z.datePlaceholder,
171
- "aria-invalid": !!D?.paymentDate || void 0,
172
- "aria-describedby": D?.paymentDate ? `${b.date}-error` : void 0
173
- }),
174
- /* @__PURE__ */ _(x, {
175
- id: `${b.date}-error`,
176
- message: D?.paymentDate
177
- })
178
- ]
179
- }), /* @__PURE__ */ v("div", {
180
- className: "ttw:flex ttw:flex-col ttw:gap-1.5",
181
- children: [
182
- /* @__PURE__ */ _(p, {
183
- htmlFor: b.time,
184
- requirement: l.Required,
185
- children: z.timeLabel
186
- }),
187
- /* @__PURE__ */ v(u, { children: [/* @__PURE__ */ _(f, {
188
- id: b.time,
189
- type: "time",
190
- required: !0,
191
- "data-has-end-addon": !0,
192
- "aria-invalid": !!D?.paymentTime || void 0,
193
- "aria-describedby": D?.paymentTime ? `${b.time}-error` : void 0,
194
- value: E.paymentTime,
195
- onChange: (e) => M({ paymentTime: e.target.value })
196
- }), /* @__PURE__ */ _(d, {
197
- align: "inline-end",
198
- children: z.timeZoneSuffix
199
- })] }),
200
- /* @__PURE__ */ _(x, {
201
- id: `${b.time}-error`,
202
- message: D?.paymentTime
203
- })
204
- ]
205
- })]
206
- }),
207
- /* @__PURE__ */ v(o, { children: [/* @__PURE__ */ _(n, {
208
- type: "button",
209
- variant: "ghost",
210
- onClick: L,
211
- children: z.cancelButton
212
- }), /* @__PURE__ */ _(n, {
213
- type: "submit",
214
- loading: j,
215
- children: z.saveButton
216
- })] })
217
- ]
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"
218
43
  })
219
- })
44
+ ]
220
45
  });
221
46
  }
222
47
  //#endregion
223
- 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/index40.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 };