@tesouro/embedded-components-react 0.11.234 → 0.11.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 +53 -2
  2. package/dist/index.css +30 -0
  3. package/dist/index.d.ts +24 -0
  4. package/dist/lib/ReceivablesWidget.d.ts +24 -0
  5. package/dist/lib/WidgetSuite.d.ts +24 -0
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index.js +6 -6
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index31.js +198 -118
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index32.js +76 -194
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index33.js +67 -75
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index34.js +111 -69
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index35.js +459 -108
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index36.js +101 -449
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index37.js +9 -117
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index38.js +85 -8
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index39.js +67 -73
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index40.js +246 -71
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index41.js +40 -251
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index42.js +237 -38
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index43.js +21 -244
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index44.js +529 -21
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index45.js +4 -530
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index46.js +44 -4
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index47.js +242 -41
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index48.js +3 -245
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index49.js +5 -3
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index50.js +63 -4
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index51.js +1 -64
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidget/BillsTab.js +1 -1
  29. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +386 -354
  30. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/labels.js +1 -0
  31. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableActions.js +1 -1
  32. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableDetails.js +1 -1
  33. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableForm.js +260 -258
  34. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesWidget.js +219 -179
  35. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +26 -25
  36. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index19.js +15 -0
  37. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index32.js +31 -40
  38. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index33.js +18 -17
  39. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index34.js +40 -8
  40. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index35.js +30 -63
  41. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index36.js +463 -27
  42. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index37.js +15 -29
  43. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index38.js +8 -18
  44. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index39.js +18 -18
  45. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index40.js +19 -30
  46. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index41.js +15 -66
  47. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index42.js +66 -391
  48. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index43.js +148 -2
  49. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index44.js +173 -43
  50. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index45.js +3 -71
  51. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index46.js +37 -432
  52. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index47.js +66 -188
  53. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index48.js +455 -22
  54. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index49.js +191 -5
  55. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index50.js +23 -0
  56. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index51.js +5 -265
  57. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index53.js +261 -125
  58. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index54.js +2 -27
  59. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index55.js +122 -230
  60. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index56.js +27 -3
  61. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index57.js +216 -224
  62. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index58.js +3 -30
  63. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index59.js +228 -168
  64. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index60.js +29 -21
  65. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index61.js +152 -109
  66. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index62.js +22 -2
  67. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index63.js +140 -43
  68. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index64.js +2 -0
  69. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index65.js +47 -0
  70. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/document-preview.js +1 -0
  71. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  72. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/document/documentPreview.js +122 -0
  73. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/WidgetFrame/WidgetFrame.js +1 -1
  74. package/dist/packages/shared-ui-shadcn/dist/index.js +4584 -4551
  75. package/package.json +1 -1
  76. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index52.js +0 -1
  77. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index52.js +0 -2
@@ -1,193 +1,71 @@
1
- import { Alert as e, AlertDescription as t, Button as n, DatePicker as r, DescriptionList as i, Dialog as a, DialogContent as o, DialogFooter as s, DialogHeader as c, DialogTitle as l, FieldRequirement as u, InputGroup as d, InputGroupAddon as f, InputGroupInput as p, Label as m, Skeleton as h } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { RECEIVABLE_PAYMENT_DIALOG_LABELS_EN as g } from "./index19.js";
3
- import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
4
- import { TriangleAlert as b } from "lucide-react";
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";
5
3
  // ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index47.js
6
- var x = {
7
- amount: "receivable-payment-amount",
8
- date: "receivable-payment-date",
9
- time: "receivable-payment-time"
10
- };
11
- function S({ id: e, message: t }) {
12
- return t ? /* @__PURE__ */ v("p", {
13
- id: e,
14
- className: "ttw:text-sm ttw:text-destructive",
15
- children: t
16
- }) : null;
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
+ ] }) });
17
29
  }
18
- 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 }) {
19
- let z = {
20
- ...g,
21
- ...R
22
- };
23
- return /* @__PURE__ */ v(a, {
24
- open: C,
25
- onOpenChange: w,
26
- children: /* @__PURE__ */ v(o, {
27
- size: T === "review" && A ? "confirm" : "form",
28
- closeDisabled: j,
29
- labels: { close: z.close },
30
- "aria-describedby": void 0,
31
- className: "ttw:flex ttw:flex-col ttw:gap-6",
32
- children: T === "review" && A ? /* @__PURE__ */ y(_, { children: [
33
- /* @__PURE__ */ v(c, { children: /* @__PURE__ */ v(l, { children: z.reviewTitle }) }),
34
- /* @__PURE__ */ v(i, {
35
- variant: "form-review",
36
- items: [
37
- {
38
- label: z.amountLabel,
39
- value: A.amountLabel
40
- },
41
- {
42
- label: z.fromLabel,
43
- value: A.fromLabel
44
- },
45
- {
46
- label: z.receivedLabel,
47
- value: A.receivedLabel
48
- },
49
- {
50
- label: z.referenceLabel,
51
- value: A.referenceLabel
52
- },
53
- {
54
- label: z.createdByLabel,
55
- value: A.isCreatedByLoading ? /* @__PURE__ */ v(h, { className: "ttw:h-4 ttw:w-24" }) : A.createdByLabel
56
- }
57
- ]
58
- }),
59
- /* @__PURE__ */ y(e, {
60
- variant: "warning",
61
- children: [/* @__PURE__ */ v(b, { "aria-hidden": "true" }), /* @__PURE__ */ v(t, { children: z.reviewWarning })]
62
- }),
63
- /* @__PURE__ */ v(s, {
64
- start: /* @__PURE__ */ v(n, {
65
- variant: "ghost",
66
- disabled: j,
67
- onClick: F,
68
- children: z.editRecordButton
69
- }),
70
- children: /* @__PURE__ */ v(n, {
71
- loading: j,
72
- onClick: I,
73
- children: z.confirmButton
74
- })
75
- })
76
- ] }) : /* @__PURE__ */ y("form", {
77
- className: "ttw:flex ttw:flex-col ttw:gap-6",
78
- noValidate: !0,
79
- onSubmit: (e) => {
80
- e.preventDefault(), P();
81
- },
82
- children: [
83
- /* @__PURE__ */ v(c, { children: /* @__PURE__ */ v(l, { children: z.title }) }),
84
- /* @__PURE__ */ y("div", {
85
- className: "ttw:flex ttw:flex-col ttw:gap-1.5",
86
- children: [
87
- /* @__PURE__ */ v(m, {
88
- htmlFor: x.amount,
89
- requirement: u.Required,
90
- children: z.amountLabel
91
- }),
92
- /* @__PURE__ */ y(d, { children: [/* @__PURE__ */ v(p, {
93
- id: x.amount,
94
- type: "number",
95
- required: !0,
96
- placeholder: z.amountPlaceholder,
97
- "data-has-end-addon": !0,
98
- "aria-invalid": !!D?.amount || void 0,
99
- "aria-describedby": D?.amount ? `${x.amount}-error` : void 0,
100
- value: E.amount,
101
- onChange: (e) => M({ amount: e.target.value })
102
- }), /* @__PURE__ */ v(f, {
103
- align: "inline-end",
104
- children: O
105
- })] }),
106
- /* @__PURE__ */ v(S, {
107
- id: `${x.amount}-error`,
108
- message: D?.amount
109
- }),
110
- /* @__PURE__ */ y("p", {
111
- className: "ttw:text-sm ttw:text-muted-foreground",
112
- children: [
113
- z.fullAmountDuePrefix,
114
- " ",
115
- /* @__PURE__ */ v(n, {
116
- type: "button",
117
- variant: "link",
118
- className: "ttw:h-auto ttw:p-0 ttw:underline",
119
- onClick: N,
120
- children: k
121
- })
122
- ]
123
- })
124
- ]
125
- }),
126
- /* @__PURE__ */ y("div", {
127
- className: "ttw:grid ttw:grid-cols-2 ttw:gap-4",
128
- children: [/* @__PURE__ */ y("div", {
129
- className: "ttw:flex ttw:flex-col ttw:gap-1.5",
130
- children: [
131
- /* @__PURE__ */ v(m, {
132
- htmlFor: x.date,
133
- requirement: u.Required,
134
- children: z.dateLabel
135
- }),
136
- /* @__PURE__ */ v(r, {
137
- id: x.date,
138
- value: E.paymentDate,
139
- onChange: (e) => M({ paymentDate: e }),
140
- placeholder: z.datePlaceholder,
141
- iconPosition: "end",
142
- "aria-invalid": !!D?.paymentDate || void 0,
143
- "aria-describedby": D?.paymentDate ? `${x.date}-error` : void 0
144
- }),
145
- /* @__PURE__ */ v(S, {
146
- id: `${x.date}-error`,
147
- message: D?.paymentDate
148
- })
149
- ]
150
- }), /* @__PURE__ */ y("div", {
151
- className: "ttw:flex ttw:flex-col ttw:gap-1.5",
152
- children: [
153
- /* @__PURE__ */ v(m, {
154
- htmlFor: x.time,
155
- requirement: u.Required,
156
- children: z.timeLabel
157
- }),
158
- /* @__PURE__ */ y(d, { children: [/* @__PURE__ */ v(p, {
159
- id: x.time,
160
- type: "time",
161
- required: !0,
162
- "data-has-end-addon": !0,
163
- "aria-invalid": !!D?.paymentTime || void 0,
164
- "aria-describedby": D?.paymentTime ? `${x.time}-error` : void 0,
165
- value: E.paymentTime,
166
- onChange: (e) => M({ paymentTime: e.target.value })
167
- }), /* @__PURE__ */ v(f, {
168
- align: "inline-end",
169
- children: z.timeZoneSuffix
170
- })] }),
171
- /* @__PURE__ */ v(S, {
172
- id: `${x.time}-error`,
173
- message: D?.paymentTime
174
- })
175
- ]
176
- })]
177
- }),
178
- /* @__PURE__ */ y(s, { children: [/* @__PURE__ */ v(n, {
179
- type: "button",
180
- variant: "ghost",
181
- onClick: L,
182
- children: z.cancelButton
183
- }), /* @__PURE__ */ v(n, {
184
- type: "submit",
185
- loading: j,
186
- children: z.saveButton
187
- })] })
188
- ]
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
189
67
  })
190
- })
68
+ ]
191
69
  });
192
70
  }
193
- export { C as ReceivablePaymentDialog, C as default };
71
+ export { u as ReceivableNotesSection };