@tesouro/embedded-components-react 0.7.22 → 0.7.25

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 (41) hide show
  1. package/dist/index.css +0 -3
  2. package/dist/index.d.ts +20 -20
  3. package/dist/lib/CounterpartsWidget.d.ts +10 -2
  4. package/dist/lib/CounterpartsWidgetPublic.d.ts +10 -2
  5. package/dist/lib/CustomersWidget.d.ts +19 -19
  6. package/dist/lib/ExpenseManagementWidget.d.ts +1 -1
  7. package/dist/lib/ReceivablesWidget.d.ts +9 -1
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index32.js +1 -1
  9. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/CounterpartDetailsContainer.js +1 -1
  10. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/CounterpartsWidget.js +50 -51
  11. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/viewModels.js +4 -2
  12. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index.js +1 -1
  13. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index2.js +1 -1
  14. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index4.js +72 -128
  15. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index5.js +183 -38
  16. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index6.js +503 -193
  17. package/dist/libs/tesouro-embedded-components-react/customers-widget/feature/dist/lib/CustomersWidget/CustomersWidget.js +33 -18
  18. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +57 -55
  19. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/index.js +14 -14
  20. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js +114 -102
  21. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index.js +12 -11
  22. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index10.js +534 -7
  23. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index11.js +7 -179
  24. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index12.js +179 -6
  25. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index13.js +3 -1
  26. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index14.js +4 -28
  27. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index15.js +28 -4
  28. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index16.js +4 -0
  29. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index2.js +10 -2
  30. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index7.js +140 -55
  31. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index8.js +53 -47
  32. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index9.js +51 -539
  33. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  34. package/package.json +1 -1
  35. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index7.js +0 -520
  36. package/dist/libs/tesouro-embedded-components-react/customers-widget/feature/dist/lib/CustomersWidgetMonite/CustomersWidgetMonite.js +0 -45
  37. package/dist/libs/tesouro-embedded-components-react/customers-widget/feature/dist/lib/CustomersWidgetNative/CustomersWidgetNative.js +0 -42
  38. package/dist/libs/tesouro-embedded-components-react/shared/monite-wrapper/feature/dist/index.js +0 -4
  39. package/dist/libs/tesouro-embedded-components-react/shared/monite-wrapper/feature/dist/lib/MoniteRegionProvider.js +0 -21
  40. package/dist/libs/tesouro-embedded-components-react/shared/monite-wrapper/feature/dist/lib/MoniteWrapper.js +0 -134
  41. package/dist/libs/tesouro-embedded-components-react/shared/monite-wrapper/feature/dist/lib/RefreshingMoniteWidgetProvider.js +0 -7
@@ -1,520 +0,0 @@
1
- import { Badge as e, Button as t, DropdownMenu as n, DropdownMenuContent as r, DropdownMenuItem as i, DropdownMenuTrigger as a, Separator as o, Sheet as s, SheetContent as c, SheetDescription as l, SheetHeader as u, SheetTitle as d, Skeleton as f, Spinner as ee, Typography as p, cn as te } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { COUNTERPART_DETAILS_SHEET_LABELS_EN as ne } from "./index2.js";
3
- import { CounterpartAddressForm as m } from "./index5.js";
4
- import { CounterpartEditForm as h } from "./index6.js";
5
- import { useEffect as re, useState as ie } from "react";
6
- import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
7
- import { EyeIcon as y, EyeOffIcon as b, MoreVerticalIcon as x, PencilIcon as S, PlusIcon as C, SearchXIcon as ae, Trash2Icon as w, XIcon as T } from "lucide-react";
8
- //#region ../../libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index7.js
9
- var E = "-", D = {
10
- billNeutral: "ttw:border-border ttw:bg-muted ttw:text-foreground ttw:hover:bg-muted",
11
- billAccent: "ttw:border-violet-100 ttw:bg-violet-100 ttw:text-violet-700 ttw:hover:bg-violet-100",
12
- billInfo: "ttw:border-blue-100 ttw:bg-blue-100 ttw:text-blue-700 ttw:hover:bg-blue-100",
13
- billSuccess: "ttw:border-green-100 ttw:bg-green-100 ttw:text-green-700 ttw:hover:bg-green-100",
14
- billSettled: "ttw:border-border ttw:bg-background ttw:text-green-900 ttw:hover:bg-background",
15
- billDanger: "ttw:border-destructive/20 ttw:bg-destructive/20 ttw:text-destructive ttw:hover:bg-destructive/20",
16
- invoiceNeutral: "ttw:border-transparent ttw:bg-muted ttw:text-muted-foreground",
17
- invoiceCyan: "ttw:border-transparent ttw:bg-cyan-100 ttw:text-cyan-700",
18
- invoiceSuccess: "ttw:border-transparent ttw:bg-green-100 ttw:text-green-700",
19
- invoicePurple: "ttw:border-transparent ttw:bg-purple-100 ttw:text-purple-700",
20
- invoiceOrange: "ttw:border-transparent ttw:bg-orange-100 ttw:text-orange-700",
21
- invoiceDanger: "ttw:border-transparent ttw:bg-destructive/10 ttw:text-destructive"
22
- };
23
- function O({ label: t, tone: n }) {
24
- return /* @__PURE__ */ _(e, {
25
- variant: "outline",
26
- className: D[n],
27
- children: t
28
- });
29
- }
30
- function k({ className: e }) {
31
- return /* @__PURE__ */ _(f, { className: e ?? "ttw:h-5 ttw:w-24" });
32
- }
33
- function A({ label: e, children: t, isLast: n }) {
34
- return /* @__PURE__ */ v("div", {
35
- className: ["ttw:grid ttw:grid-cols-[180px_1fr] ttw:gap-4 ttw:py-3", n ? "" : "ttw:border-b ttw:border-border"].join(" "),
36
- children: [/* @__PURE__ */ _(p, {
37
- variant: "body2",
38
- className: "ttw:text-muted-foreground",
39
- children: e
40
- }), /* @__PURE__ */ _("div", {
41
- className: "ttw:min-w-0 ttw:text-sm",
42
- children: t
43
- })]
44
- });
45
- }
46
- function j({ mode: e, summary: t, labels: n }) {
47
- let r = e === "customer" ? n.summaryReceived : n.summaryPaid;
48
- return /* @__PURE__ */ v("div", {
49
- className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:rounded-md ttw:bg-muted ttw:p-5",
50
- children: [
51
- /* @__PURE__ */ _(p, {
52
- variant: "body2",
53
- className: "ttw:text-muted-foreground",
54
- children: e === "customer" ? n.summaryAmountDue : n.summaryBalanceDue
55
- }),
56
- t?.isPrimaryAmountLoading ? /* @__PURE__ */ _(k, { className: "ttw:h-9 ttw:w-36" }) : /* @__PURE__ */ _("p", {
57
- className: "ttw:text-[2rem] ttw:leading-tight ttw:font-semibold ttw:tracking-tight",
58
- children: t?.primaryAmountLabel ?? E
59
- }),
60
- /* @__PURE__ */ v("div", {
61
- className: "ttw:flex ttw:gap-8",
62
- children: [
63
- /* @__PURE__ */ v("div", {
64
- className: "ttw:flex ttw:flex-col ttw:gap-1",
65
- children: [/* @__PURE__ */ _(p, {
66
- variant: "caption",
67
- className: "ttw:text-muted-foreground",
68
- children: n.summaryBilled
69
- }), t?.isBilledAmountLoading ? /* @__PURE__ */ _(k, {}) : /* @__PURE__ */ _(p, {
70
- variant: "body1",
71
- className: "ttw:font-semibold",
72
- children: t?.billedAmountLabel ?? E
73
- })]
74
- }),
75
- /* @__PURE__ */ v("div", {
76
- className: "ttw:flex ttw:flex-col ttw:gap-1",
77
- children: [/* @__PURE__ */ _(p, {
78
- variant: "caption",
79
- className: "ttw:text-muted-foreground",
80
- children: r
81
- }), t?.isReceivedOrPaidAmountLoading ? /* @__PURE__ */ _(k, {}) : /* @__PURE__ */ _(p, {
82
- variant: "body1",
83
- className: "ttw:font-semibold ttw:text-green-600",
84
- children: t?.receivedOrPaidAmountLabel ?? E
85
- })]
86
- }),
87
- e === "vendor" && /* @__PURE__ */ v("div", {
88
- className: "ttw:flex ttw:flex-col ttw:gap-1",
89
- children: [/* @__PURE__ */ _(p, {
90
- variant: "caption",
91
- className: "ttw:text-muted-foreground",
92
- children: n.summaryRejected
93
- }), t?.isRejectedAmountLoading ? /* @__PURE__ */ _(k, {}) : /* @__PURE__ */ _(p, {
94
- variant: "body1",
95
- className: "ttw:font-semibold",
96
- children: t?.rejectedAmountLabel ?? E
97
- })]
98
- })
99
- ]
100
- })
101
- ]
102
- });
103
- }
104
- function oe({ mode: e, documents: n, labels: r, onViewAll: i }) {
105
- if (!n || n.length === 0) return null;
106
- let a = e === "vendor";
107
- return /* @__PURE__ */ v("section", {
108
- className: "ttw:flex ttw:flex-col ttw:border-t ttw:border-border ttw:pt-6",
109
- children: [/* @__PURE__ */ v("div", {
110
- className: "ttw:flex ttw:items-start ttw:justify-between ttw:gap-4 ttw:pb-5",
111
- children: [/* @__PURE__ */ v("div", {
112
- className: "ttw:flex ttw:flex-col ttw:gap-1.5",
113
- children: [/* @__PURE__ */ _(p, {
114
- variant: "body1",
115
- className: "ttw:font-medium",
116
- children: e === "customer" ? r.recentCustomerDocumentsHeading : r.recentVendorDocumentsHeading
117
- }), /* @__PURE__ */ _(p, {
118
- variant: "body2",
119
- className: "ttw:text-muted-foreground",
120
- children: e === "customer" ? r.recentCustomerDocumentsDescription : r.recentVendorDocumentsDescription
121
- })]
122
- }), i && /* @__PURE__ */ _(t, {
123
- variant: "link",
124
- className: "ttw:h-auto ttw:p-0",
125
- onClick: i,
126
- children: r.viewAllDocumentsAction
127
- })]
128
- }), /* @__PURE__ */ _("div", {
129
- className: "ttw:flex ttw:flex-col ttw:gap-3 ttw:rounded-md ttw:border ttw:border-border ttw:p-4",
130
- children: n.map((e, t) => {
131
- let i = a && e.isOverdue;
132
- return /* @__PURE__ */ v("div", {
133
- className: "ttw:flex ttw:flex-col ttw:gap-3",
134
- children: [/* @__PURE__ */ v("div", {
135
- className: "ttw:flex ttw:items-start ttw:justify-between ttw:gap-4",
136
- children: [/* @__PURE__ */ v("div", {
137
- className: "ttw:flex ttw:flex-col ttw:gap-1",
138
- children: [/* @__PURE__ */ _(p, {
139
- variant: "h6",
140
- className: "ttw:font-medium",
141
- children: e.amountLabel
142
- }), /* @__PURE__ */ _(p, {
143
- variant: "body2",
144
- className: i ? "ttw:text-destructive" : "ttw:text-muted-foreground",
145
- children: e.dateLabel
146
- })]
147
- }), /* @__PURE__ */ v("div", {
148
- className: "ttw:flex ttw:items-center ttw:gap-2",
149
- children: [i && /* @__PURE__ */ _(O, {
150
- label: r.overdueTag,
151
- tone: "billDanger"
152
- }), /* @__PURE__ */ _(O, {
153
- label: e.statusLabel,
154
- tone: e.statusTone
155
- })]
156
- })]
157
- }), t < n.length - 1 && /* @__PURE__ */ _(o, {})]
158
- }, e.id);
159
- })
160
- })]
161
- });
162
- }
163
- function M({ mode: e, addressLines: n, canEdit: r, onEditAddress: i, onAddAddress: a, labels: o, addressForm: s }) {
164
- let c = n.length > 0;
165
- return /* @__PURE__ */ v("section", {
166
- className: e === "customer" ? "ttw:flex ttw:flex-col ttw:gap-3" : "ttw:flex ttw:flex-col",
167
- children: [e === "customer" && !s && /* @__PURE__ */ v("div", {
168
- className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-3",
169
- children: [
170
- /* @__PURE__ */ v(p, {
171
- variant: "body1",
172
- className: "ttw:font-medium",
173
- children: [
174
- o.customerAddressHeading,
175
- " ",
176
- /* @__PURE__ */ _("span", {
177
- className: "ttw:text-muted-foreground",
178
- children: o.optionalSuffix
179
- })
180
- ]
181
- }),
182
- r && c && /* @__PURE__ */ _(t, {
183
- type: "button",
184
- variant: "link",
185
- className: "ttw:h-auto ttw:p-0",
186
- "aria-label": o.editAddressAction,
187
- onClick: i,
188
- children: o.editButton
189
- }),
190
- r && !c && /* @__PURE__ */ v(t, {
191
- type: "button",
192
- variant: "link",
193
- className: "ttw:h-auto ttw:p-0",
194
- onClick: a,
195
- children: [/* @__PURE__ */ _(C, { className: "ttw:size-4" }), o.addAddressAction]
196
- })
197
- ]
198
- }), s ? /* @__PURE__ */ _(m, {
199
- form: s,
200
- labels: o
201
- }) : c ? /* @__PURE__ */ _("address", {
202
- className: "ttw:flex ttw:flex-col ttw:gap-1 ttw:not-italic ttw:text-sm",
203
- children: n.map((e) => /* @__PURE__ */ _("span", { children: e }, e))
204
- }) : /* @__PURE__ */ _(p, {
205
- variant: "body2",
206
- className: "ttw:text-muted-foreground",
207
- children: o.noAddress
208
- })]
209
- });
210
- }
211
- function se({ paymentMethod: n, canEdit: r, onAddBankAccount: i, onEditBankAccount: a, onDeleteBankAccount: o, labels: s }) {
212
- return /* @__PURE__ */ v("section", {
213
- className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:border-t ttw:border-border ttw:pt-6",
214
- children: [/* @__PURE__ */ v("div", {
215
- className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-3",
216
- children: [/* @__PURE__ */ v("div", {
217
- className: "ttw:flex ttw:flex-col ttw:gap-1",
218
- children: [/* @__PURE__ */ _(p, {
219
- variant: "body1",
220
- className: "ttw:font-medium",
221
- children: s.paymentMethodsHeading
222
- }), /* @__PURE__ */ _(p, {
223
- variant: "body2",
224
- className: "ttw:text-muted-foreground",
225
- children: s.paymentMethodsDescription
226
- })]
227
- }), r && !n && /* @__PURE__ */ v(t, {
228
- type: "button",
229
- variant: "ghost",
230
- size: "sm",
231
- onClick: i,
232
- children: [/* @__PURE__ */ _(C, { className: "ttw:size-4" }), s.addPaymentMethodAction]
233
- })]
234
- }), n ? /* @__PURE__ */ v("div", {
235
- className: "ttw:flex ttw:flex-col ttw:gap-3 ttw:rounded-md ttw:border ttw:border-border ttw:p-4",
236
- children: [/* @__PURE__ */ v("div", {
237
- className: "ttw:flex ttw:items-start ttw:justify-between ttw:gap-3",
238
- children: [/* @__PURE__ */ v("div", {
239
- className: "ttw:flex ttw:flex-col ttw:gap-1",
240
- children: [/* @__PURE__ */ _(p, {
241
- variant: "body2",
242
- className: "ttw:font-medium",
243
- children: n.title
244
- }), n.isIncomplete && /* @__PURE__ */ _(e, {
245
- variant: "outline",
246
- children: s.incompletePaymentMethod
247
- })]
248
- }), r && /* @__PURE__ */ v("div", {
249
- className: "ttw:flex ttw:gap-1",
250
- children: [/* @__PURE__ */ _(t, {
251
- type: "button",
252
- variant: "ghost",
253
- size: "icon-sm",
254
- "aria-label": s.editPaymentMethodAction,
255
- onClick: () => a?.(n.id),
256
- children: /* @__PURE__ */ _(S, { className: "ttw:size-4" })
257
- }), /* @__PURE__ */ _(t, {
258
- type: "button",
259
- variant: "ghost",
260
- size: "icon-sm",
261
- "aria-label": s.deletePaymentMethodAction,
262
- onClick: () => o?.(n.id),
263
- children: /* @__PURE__ */ _(w, { className: "ttw:size-4" })
264
- })]
265
- })]
266
- }), /* @__PURE__ */ v("div", {
267
- className: "ttw:grid ttw:grid-cols-3 ttw:gap-3 ttw:text-sm",
268
- children: [
269
- /* @__PURE__ */ v("div", {
270
- className: "ttw:flex ttw:flex-col ttw:gap-1",
271
- children: [/* @__PURE__ */ _("span", {
272
- className: "ttw:text-muted-foreground",
273
- children: s.accountHolderLabel
274
- }), /* @__PURE__ */ _("span", { children: n.accountHolderLabel || E })]
275
- }),
276
- /* @__PURE__ */ v("div", {
277
- className: "ttw:flex ttw:flex-col ttw:gap-1",
278
- children: [/* @__PURE__ */ _("span", {
279
- className: "ttw:text-muted-foreground",
280
- children: s.accountNumberLabel
281
- }), /* @__PURE__ */ _("span", { children: n.accountNumberLabel || E })]
282
- }),
283
- /* @__PURE__ */ v("div", {
284
- className: "ttw:flex ttw:flex-col ttw:gap-1",
285
- children: [/* @__PURE__ */ _("span", {
286
- className: "ttw:text-muted-foreground",
287
- children: s.routingNumberLabel
288
- }), /* @__PURE__ */ _("span", { children: n.routingNumberLabel || E })]
289
- })
290
- ]
291
- })]
292
- }) : /* @__PURE__ */ _(p, {
293
- variant: "body2",
294
- className: "ttw:text-muted-foreground",
295
- children: s.noPaymentMethods
296
- })]
297
- });
298
- }
299
- function N({ open: e, onOpenChange: o, privacyResetKey: m, mode: S = "customer", counterpart: C, isLoading: D, isError: O, canEdit: k = !0, canDelete: N = !0, onEdit: P, onDelete: F, onClose: I, onEditAddress: L, onAddAddress: R, onAddBankAccount: z, onEditBankAccount: B, onDeleteBankAccount: V, onViewAllDocuments: H, onCreateDocument: U, editForm: W, addressForm: G, labels: ce }) {
300
- let K = {
301
- ...ne,
302
- ...ce
303
- }, [le, q] = ie(null), J = [
304
- m ?? C?.name ?? "",
305
- C?.taxId ?? "",
306
- C?.taxIdMasked ?? ""
307
- ].join(":"), Y = e && !!C?.taxId && le === J;
308
- re(() => {
309
- e || q(null);
310
- }, [e]);
311
- let X = S === "vendor", ue = Y ? C?.taxId ?? E : C?.taxIdMasked || C?.taxId || E, Z = C?.taxIdHelpText ?? (X ? K.vendorTaxIdHelp : K.customerTaxIdHelp), Q = (e) => {
312
- e || q(null), o(e);
313
- };
314
- if (O) return /* @__PURE__ */ _(s, {
315
- open: e,
316
- onOpenChange: Q,
317
- children: /* @__PURE__ */ _(c, {
318
- className: "ttw:w-160 ttw:sm:max-w-160 ttw:gap-0",
319
- children: /* @__PURE__ */ v("div", {
320
- className: "ttw:m-auto ttw:flex ttw:w-3/4 ttw:flex-col ttw:items-center ttw:gap-4 ttw:p-4",
321
- children: [/* @__PURE__ */ _(ae, { className: "ttw:size-8 ttw:text-destructive" }), /* @__PURE__ */ v("div", {
322
- className: "ttw:flex ttw:flex-col ttw:items-center ttw:gap-2",
323
- children: [/* @__PURE__ */ _(d, {
324
- className: "ttw:text-xl ttw:font-semibold ttw:tracking-tight",
325
- children: X ? K.notFoundVendorTitle : K.notFoundCustomerTitle
326
- }), /* @__PURE__ */ _(l, {
327
- className: "ttw:text-center ttw:text-base ttw:text-foreground",
328
- children: X ? K.notFoundVendorDescription : K.notFoundCustomerDescription
329
- })]
330
- })]
331
- })
332
- })
333
- });
334
- let $ = D || !C;
335
- return /* @__PURE__ */ _(s, {
336
- open: e,
337
- onOpenChange: Q,
338
- children: /* @__PURE__ */ v(c, {
339
- showCloseButton: !1,
340
- className: "ttw:w-160 ttw:sm:max-w-160 ttw:gap-0 ttw:overflow-y-auto",
341
- children: [/* @__PURE__ */ v(u, {
342
- className: "ttw:flex-row ttw:items-start ttw:justify-between ttw:gap-4 ttw:border-b ttw:border-border ttw:px-6 ttw:py-6",
343
- children: [/* @__PURE__ */ _("div", {
344
- className: "ttw:flex ttw:min-w-0 ttw:flex-col ttw:gap-1",
345
- children: $ ? /* @__PURE__ */ v(g, { children: [
346
- /* @__PURE__ */ _(d, {
347
- className: "ttw:sr-only",
348
- children: K.loadingTitle
349
- }),
350
- /* @__PURE__ */ _(f, { className: "ttw:h-8 ttw:w-40" }),
351
- /* @__PURE__ */ _(l, {
352
- className: "ttw:sr-only",
353
- children: K.hiddenDescription
354
- }),
355
- /* @__PURE__ */ _(f, { className: "ttw:h-5 ttw:w-60" })
356
- ] }) : /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(d, {
357
- className: "ttw:truncate ttw:text-2xl",
358
- children: C.name
359
- }), /* @__PURE__ */ _(l, { children: C.subtitle ?? K.hiddenDescription })] })
360
- }), /* @__PURE__ */ v("div", {
361
- className: "ttw:flex ttw:gap-2",
362
- children: [N && C && /* @__PURE__ */ v(n, { children: [/* @__PURE__ */ _(a, {
363
- asChild: !0,
364
- children: /* @__PURE__ */ _(t, {
365
- type: "button",
366
- variant: "outline",
367
- size: "icon",
368
- "aria-label": K.openActionsMenu,
369
- children: /* @__PURE__ */ _(x, { className: "ttw:size-4" })
370
- })
371
- }), /* @__PURE__ */ _(r, {
372
- align: "end",
373
- children: /* @__PURE__ */ v(i, {
374
- variant: "destructive",
375
- onClick: F,
376
- children: [/* @__PURE__ */ _(w, { className: "ttw:size-4" }), X ? K.deleteVendorAction : K.deleteCustomerAction]
377
- })
378
- })] }), /* @__PURE__ */ _(t, {
379
- type: "button",
380
- variant: "outline",
381
- size: "icon",
382
- "aria-label": K.closeAction,
383
- onClick: () => {
384
- q(null), I();
385
- },
386
- children: /* @__PURE__ */ _(T, { className: "ttw:size-4" })
387
- })]
388
- })]
389
- }), $ ? /* @__PURE__ */ _("div", {
390
- className: "ttw:flex ttw:flex-1 ttw:items-center ttw:justify-center ttw:p-6",
391
- children: /* @__PURE__ */ _(ee, {})
392
- }) : /* @__PURE__ */ v("main", {
393
- className: "ttw:flex ttw:flex-col ttw:gap-6 ttw:p-6",
394
- children: [
395
- /* @__PURE__ */ v("div", {
396
- className: "ttw:flex ttw:flex-col ttw:gap-4",
397
- children: [/* @__PURE__ */ _(j, {
398
- mode: S,
399
- summary: C.summary,
400
- labels: K
401
- }), U && /* @__PURE__ */ _(t, {
402
- type: "button",
403
- className: "ttw:w-fit",
404
- onClick: U,
405
- children: X ? K.sendPaymentAction : K.issueInvoiceAction
406
- })]
407
- }),
408
- /* @__PURE__ */ _(oe, {
409
- mode: S,
410
- documents: C.recentDocuments,
411
- labels: K,
412
- onViewAll: H
413
- }),
414
- /* @__PURE__ */ v("section", {
415
- className: "ttw:flex ttw:flex-col",
416
- children: [/* @__PURE__ */ v("div", {
417
- className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-3 ttw:pb-5",
418
- children: [/* @__PURE__ */ _(p, {
419
- variant: "body1",
420
- className: "ttw:font-medium",
421
- children: X ? K.vendorDetailsHeading : K.customerDetailsHeading
422
- }), k && !W && /* @__PURE__ */ _(t, {
423
- type: "button",
424
- variant: "link",
425
- className: "ttw:h-auto ttw:p-0",
426
- onClick: P,
427
- children: K.editButton
428
- })]
429
- }), W ? /* @__PURE__ */ _(h, {
430
- form: W,
431
- labels: K
432
- }) : /* @__PURE__ */ v("div", {
433
- className: te("ttw:border-t ttw:border-border", !X && "ttw:border-b"),
434
- children: [
435
- /* @__PURE__ */ _(A, {
436
- label: K.rowType,
437
- children: C.entityTypeLabel ?? E
438
- }),
439
- /* @__PURE__ */ _(A, {
440
- label: K.rowName,
441
- children: C.name
442
- }),
443
- /* @__PURE__ */ _(A, {
444
- label: K.rowEmail,
445
- children: C.email || E
446
- }),
447
- !X && /* @__PURE__ */ _(A, {
448
- label: K.rowPaymentReminders,
449
- children: C.remindersLabel ?? E
450
- }),
451
- /* @__PURE__ */ _(A, {
452
- label: K.rowPhone,
453
- children: C.phone || E
454
- }),
455
- /* @__PURE__ */ _(A, {
456
- label: C.entityType === "individual" ? K.rowTaxIdSsn : K.rowTaxIdEin,
457
- isLast: !X,
458
- children: /* @__PURE__ */ v("div", {
459
- className: "ttw:flex ttw:flex-col ttw:gap-2",
460
- children: [/* @__PURE__ */ v("div", {
461
- className: "ttw:flex ttw:items-center ttw:gap-2",
462
- children: [/* @__PURE__ */ _("span", {
463
- className: "ttw:font-medium",
464
- children: ue
465
- }), C.taxId && /* @__PURE__ */ v(t, {
466
- type: "button",
467
- variant: "outline",
468
- size: "sm",
469
- onClick: () => {
470
- q((e) => e === J ? null : J);
471
- },
472
- children: [_(Y ? b : y, { className: "ttw:size-4" }), Y ? K.hideTaxId : K.showTaxId]
473
- })]
474
- }), Z && /* @__PURE__ */ _(p, {
475
- variant: "body2",
476
- className: "ttw:text-muted-foreground",
477
- children: Z
478
- })]
479
- })
480
- }),
481
- X && /* @__PURE__ */ _(A, {
482
- label: K.addressHeading,
483
- isLast: !0,
484
- children: /* @__PURE__ */ _(M, {
485
- mode: S,
486
- addressLines: C.addressLines,
487
- canEdit: k,
488
- onEditAddress: L,
489
- onAddAddress: R,
490
- labels: K,
491
- addressForm: G
492
- })
493
- })
494
- ]
495
- })]
496
- }),
497
- !X && /* @__PURE__ */ _(M, {
498
- mode: S,
499
- addressLines: C.addressLines,
500
- canEdit: k,
501
- onEditAddress: L,
502
- onAddAddress: R,
503
- labels: K,
504
- addressForm: G
505
- }),
506
- X && /* @__PURE__ */ _(se, {
507
- paymentMethod: C.paymentMethod,
508
- canEdit: k,
509
- onAddBankAccount: z,
510
- onEditBankAccount: B,
511
- onDeleteBankAccount: V,
512
- labels: K
513
- })
514
- ]
515
- })]
516
- })
517
- });
518
- }
519
- //#endregion
520
- export { N as CounterpartDetailsSheet, N as default };
@@ -1,45 +0,0 @@
1
- "use client";
2
- "use client";
3
- "use client";
4
- "use client";
5
- import { useAnalyticsTrack as e } from "../../../../../shared/feature/dist/lib/analytics/hooks.js";
6
- import "../../../../../shared/feature/dist/index.js";
7
- import { CustomersWidgetAnalyticsEvent as t, WIDGET_NAME as n } from "../analytics/events.js";
8
- import { Counterparts as r } from "../../../../../monite-sdk/dist/index162.js";
9
- import "../../../../../monite-sdk/dist/index.js";
10
- import { MoniteRegionProvider as i } from "../../../../../shared/monite-wrapper/feature/dist/lib/MoniteRegionProvider.js";
11
- import "../../../../../shared/monite-wrapper/feature/dist/index.js";
12
- import { useEffect as a } from "react";
13
- import { jsx as o } from "react/jsx-runtime";
14
- //#region ../../libs/tesouro-embedded-components-react/customers-widget/feature/dist/lib/CustomersWidgetMonite/CustomersWidgetMonite.js
15
- var s = (e) => e;
16
- function c({ onViewAllDocuments: n, onCreateDocument: i, pageTitleComponent: c = s }) {
17
- let l = e();
18
- return a(() => {
19
- l(t.Mounted);
20
- }, [l]), /* @__PURE__ */ o(r, {
21
- type: "customer",
22
- pageTitleComponent: c,
23
- onCreateInvoiceForCustomer: i && ((e) => i({
24
- id: e,
25
- name: ""
26
- })),
27
- onViewCustomerInvoices: n && ((e) => n({
28
- id: e,
29
- name: ""
30
- }))
31
- });
32
- }
33
- function l({ onViewAllDocuments: e, onCreateDocument: t, pageTitleComponent: r, ...a }) {
34
- return /* @__PURE__ */ o(i, {
35
- ...a,
36
- widgetName: n,
37
- children: /* @__PURE__ */ o(c, {
38
- onViewAllDocuments: e,
39
- onCreateDocument: t,
40
- pageTitleComponent: r
41
- })
42
- });
43
- }
44
- //#endregion
45
- export { l as CustomersWidgetMonite, l as default };
@@ -1,42 +0,0 @@
1
- "use client";
2
- "use client";
3
- "use client";
4
- "use client";
5
- import { useAnalyticsTrack as e } from "../../../../../shared/feature/dist/lib/analytics/hooks.js";
6
- import { WidgetProvider as t } from "../../../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
7
- import "../../../../../shared/feature/dist/index.js";
8
- import { CounterpartsWidget as n } from "../../../../../counterparts-widget/feature/dist/lib/CounterpartsWidget/CounterpartsWidget.js";
9
- import "../../../../../counterparts-widget/feature/dist/index.js";
10
- import { CustomersWidgetAnalyticsEvent as r, WIDGET_NAME as i } from "../analytics/events.js";
11
- import { useEffect as a } from "react";
12
- import { Fragment as o, jsx as s } from "react/jsx-runtime";
13
- //#region ../../libs/tesouro-embedded-components-react/customers-widget/feature/dist/lib/CustomersWidgetNative/CustomersWidgetNative.js
14
- function c(t) {
15
- let i = e();
16
- return a(() => {
17
- i(r.Mounted);
18
- }, [i]), /* @__PURE__ */ s(o, { children: /* @__PURE__ */ s(n, {
19
- counterpartType: "customer",
20
- passThrough: !0,
21
- ...t
22
- }) });
23
- }
24
- function l({ pageSizeOptions: e, onViewAllDocuments: n, onCreateDocument: r, screenLabels: a, formLabels: o, detailsLabels: l, addressLabels: u, deleteLabels: d, messageLabels: f, ...p }) {
25
- return /* @__PURE__ */ s(t, {
26
- ...p,
27
- widgetName: i,
28
- children: /* @__PURE__ */ s(c, {
29
- pageSizeOptions: e,
30
- onViewAllDocuments: n,
31
- onCreateDocument: r,
32
- screenLabels: a,
33
- formLabels: o,
34
- detailsLabels: l,
35
- addressLabels: u,
36
- deleteLabels: d,
37
- messageLabels: f
38
- })
39
- });
40
- }
41
- //#endregion
42
- export { l as CustomersWidgetNative, l as default };
@@ -1,4 +0,0 @@
1
- import "./lib/MoniteWrapper.js";
2
- import { MoniteRegionProvider as e } from "./lib/MoniteRegionProvider.js";
3
- import "./lib/RefreshingMoniteWidgetProvider.js";
4
- export { e as MoniteRegionProvider };
@@ -1,21 +0,0 @@
1
- "use client";
2
- "use client";
3
- "use client";
4
- "use client";
5
- import { WidgetProvider as e } from "../../../../feature/dist/lib/WidgetProvider/WidgetProvider.js";
6
- import "../../../../feature/dist/index.js";
7
- import { MoniteWrapper as t } from "./MoniteWrapper.js";
8
- import { jsx as n } from "react/jsx-runtime";
9
- //#region ../../libs/tesouro-embedded-components-react/shared/monite-wrapper/feature/dist/lib/MoniteRegionProvider.js
10
- function r({ finopsThemeColors: r, children: i, widgetName: a, ...o }) {
11
- return /* @__PURE__ */ n(e, {
12
- ...o,
13
- widgetName: a,
14
- children: /* @__PURE__ */ n(t, {
15
- finopsThemeColors: r,
16
- children: i
17
- })
18
- });
19
- }
20
- //#endregion
21
- export { r as MoniteRegionProvider };