@tesouro/embedded-components-react 0.5.204 → 0.5.205

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 (44) hide show
  1. package/README.md +15 -14
  2. package/dist/index.d.ts +38 -0
  3. package/dist/index.js +1 -1
  4. package/dist/lib/ReceivablesWidget.d.ts +38 -0
  5. package/dist/lib/ReceivablesWidget.js +1 -1
  6. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index.js +7 -7
  7. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index2.js +26 -23
  8. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index3.js +79 -2
  9. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index.js +1 -1
  10. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index13.js +53 -42
  11. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index14.js +81 -283
  12. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index15.js +47 -70
  13. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index16.js +303 -99
  14. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index17.js +68 -230
  15. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index18.js +115 -0
  16. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index19.js +253 -0
  17. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index5.js +1 -1
  18. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index8.js +34 -19
  19. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index9.js +14 -0
  20. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +10 -9
  21. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index10.js +18 -1
  22. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index11.js +0 -3
  23. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index12.js +0 -7
  24. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index13.js +10 -0
  25. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js +1 -264
  26. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index15.js +259 -67
  27. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index16.js +61 -412
  28. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index17.js +407 -89
  29. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index18.js +73 -60
  30. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index19.js +80 -331
  31. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index2.js +20 -0
  32. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index20.js +344 -0
  33. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index4.js +183 -137
  34. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index5.js +157 -20
  35. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index6.js +24 -1
  36. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index7.js +1 -3
  37. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index8.js +1 -1
  38. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index9.js +3 -18
  39. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +38 -38
  40. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js +213 -202
  41. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +136 -116
  42. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  43. package/dist/packages/shared-ui-shadcn/dist/index.js +1763 -1749
  44. package/package.json +1 -1
@@ -27,6 +27,8 @@ function m() {
27
27
  paymentTermsId: "",
28
28
  taxRate: "",
29
29
  lineItems: [n()],
30
+ bankAccountId: "",
31
+ bankAccountType: "",
30
32
  attachments: []
31
33
  };
32
34
  }
@@ -255,7 +257,13 @@ function A({ values: e, billingAddressId: t, messages: n }) {
255
257
  function j(e) {
256
258
  return Object.keys(e).length > 0;
257
259
  }
258
- function M({ values: e, billingAddressId: t, unitNamesById: n }) {
260
+ function M({ bankAccountId: e, bankAccountType: t }) {
261
+ return {
262
+ bank_account_id: e || void 0,
263
+ bank_account_type: e && t || void 0
264
+ };
265
+ }
266
+ function N({ values: e, billingAddressId: t, unitNamesById: n }) {
259
267
  let a = e.lineItems.filter((e) => !r(e)).map((t) => i({
260
268
  lineItem: t,
261
269
  currency: e.currency,
@@ -267,7 +275,8 @@ function M({ values: e, billingAddressId: t, unitNamesById: n }) {
267
275
  currency: e.currency,
268
276
  line_items: a,
269
277
  memo: e.openingNote,
270
- footer: e.closingNote
278
+ footer: e.closingNote,
279
+ ...M(e)
271
280
  };
272
281
  return e.type === "quote" ? {
273
282
  ...o,
@@ -281,7 +290,7 @@ function M({ values: e, billingAddressId: t, unitNamesById: n }) {
281
290
  type: "invoice"
282
291
  };
283
292
  }
284
- function N(e, t) {
293
+ function P(e, t) {
285
294
  let r = e.type === "quote" ? "quote" : "invoice", i = e.type === "invoice" ? e.payment_terms?.id ?? "" : "", a = e.line_items.map((n) => o({
286
295
  lineItem: n,
287
296
  currency: e.currency,
@@ -292,24 +301,30 @@ function N(e, t) {
292
301
  type: r,
293
302
  customerId: e.counterpart_id,
294
303
  currency: e.currency,
295
- issueDate: I(e.issue_date),
296
- dueDate: I(e.type === "quote" ? e.expiry_date : e.due_date),
304
+ issueDate: R(e.issue_date),
305
+ dueDate: R(e.type === "quote" ? e.expiry_date : e.due_date),
297
306
  openingNote: e.memo ?? "",
298
307
  closingNote: e.footer ?? "",
299
308
  paymentTermsId: i,
300
309
  taxRate: c(e.line_items),
301
310
  lineItems: a.length > 0 ? a : [n(e.currency)],
311
+ bankAccountId: e.bank_account_id ?? "",
312
+ bankAccountType: F(e.bank_account_type),
302
313
  attachments: d(e)
303
314
  };
304
315
  }
305
- function P({ values: e, billingAddressId: t, lineItemChanges: n }) {
316
+ function F(e) {
317
+ return e === "BANK_DETAILS" || e === "INTERNAL" || e === "EXTERNAL" ? e : "";
318
+ }
319
+ function I({ values: e, billingAddressId: t, lineItemChanges: n }) {
306
320
  let r = {
307
321
  counterpart_billing_address_id: t,
308
322
  counterpart_id: e.customerId,
309
323
  currency: e.currency,
310
324
  issue_date: e.issueDate || void 0,
311
325
  memo: e.openingNote,
312
- footer: e.closingNote
326
+ footer: e.closingNote,
327
+ ...M(e)
313
328
  };
314
329
  return e.type === "quote" ? { quote: {
315
330
  ...r,
@@ -325,7 +340,7 @@ function P({ values: e, billingAddressId: t, lineItemChanges: n }) {
325
340
  attachments: u(e.attachments) ?? null
326
341
  } };
327
342
  }
328
- function F({ values: e, originalLineItems: t, originalCurrency: n, unitNamesById: i, units: s }) {
343
+ function L({ values: e, originalLineItems: t, originalCurrency: n, unitNamesById: i, units: s }) {
329
344
  let l = (e, t, n) => a({
330
345
  lineItem: e,
331
346
  currency: t,
@@ -350,26 +365,26 @@ function F({ values: e, originalLineItems: t, originalCurrency: n, unitNamesById
350
365
  ...g.length ? { remove: g } : {}
351
366
  };
352
367
  }
353
- function I(e) {
368
+ function R(e) {
354
369
  return e?.slice(0, 10) ?? "";
355
370
  }
356
- function L(e) {
371
+ function z(e) {
357
372
  return (e ?? []).map((e) => ({
358
373
  value: e.id,
359
374
  label: e.name
360
375
  }));
361
376
  }
362
- function R(e, t) {
377
+ function B(e, t) {
363
378
  let n = {};
364
379
  return e.to.trim() || (n.to = t.sendToRequired), e.subject.trim() || (n.subject = t.sendSubjectRequired), e.body.trim() || (n.body = t.sendBodyRequired), n;
365
380
  }
366
- function z(e) {
381
+ function V(e) {
367
382
  return Object.keys(e).length > 0;
368
383
  }
369
- function B(e) {
384
+ function H(e) {
370
385
  return e.split(",").map((e) => e.trim()).filter(Boolean);
371
386
  }
372
- function V(e, t, n) {
387
+ function U(e, t, n) {
373
388
  let r = {};
374
389
  if (e.mode === "partial") {
375
390
  let i = x(e.amountPaid, n);
@@ -377,10 +392,10 @@ function V(e, t, n) {
377
392
  }
378
393
  return r;
379
394
  }
380
- function H(e) {
395
+ function W(e) {
381
396
  return Object.keys(e).length > 0;
382
397
  }
383
- function U(e, t) {
398
+ function G(e, t) {
384
399
  return {
385
400
  ...f,
386
401
  to: e?.counterpart_contact?.email ?? "",
@@ -388,13 +403,13 @@ function U(e, t) {
388
403
  body: t.sendBodyDefault
389
404
  };
390
405
  }
391
- function W() {
406
+ function K() {
392
407
  return {
393
408
  ...p,
394
409
  paidAt: (/* @__PURE__ */ new Date()).toISOString().slice(0, 10)
395
410
  };
396
411
  }
397
- function G() {
412
+ function q() {
398
413
  return [
399
414
  "draft",
400
415
  "issued",
@@ -414,4 +429,4 @@ function G() {
414
429
  }));
415
430
  }
416
431
  //#endregion
417
- export { p as EMPTY_RECEIVABLE_PAYMENT_VALUES, f as EMPTY_RECEIVABLE_SEND_VALUES, T as buildReceivableActions, D as buildReceivableDetailsView, E as buildReceivableRows, _ as coerceEnabledTabs, m as createEmptyReceivableFormValues, n as createLineItem, W as defaultPaymentValues, U as defaultSendValues, y as formatDate, b as formatMoney, x as fromMajorUnits, S as getDocumentTitle, C as getDocumentTypeLabel, L as getPaymentTermOptions, w as getStatusTone, H as hasPaymentErrors, j as hasReceivableFormErrors, z as hasSendErrors, M as receivableFormValuesToCreatePayload, F as receivableFormValuesToLineItemChanges, P as receivableFormValuesToUpdatePayload, N as receivableToFormValues, v as resolveInitialTab, B as splitEmailList, G as statusFilterOptions, g as tabForType, h as typeForTab, V as validatePaymentValues, A as validateReceivableForm, R as validateSendValues };
432
+ export { p as EMPTY_RECEIVABLE_PAYMENT_VALUES, f as EMPTY_RECEIVABLE_SEND_VALUES, T as buildReceivableActions, D as buildReceivableDetailsView, E as buildReceivableRows, _ as coerceEnabledTabs, m as createEmptyReceivableFormValues, n as createLineItem, K as defaultPaymentValues, G as defaultSendValues, y as formatDate, b as formatMoney, x as fromMajorUnits, S as getDocumentTitle, C as getDocumentTypeLabel, z as getPaymentTermOptions, w as getStatusTone, W as hasPaymentErrors, j as hasReceivableFormErrors, V as hasSendErrors, N as receivableFormValuesToCreatePayload, L as receivableFormValuesToLineItemChanges, I as receivableFormValuesToUpdatePayload, P as receivableToFormValues, v as resolveInitialTab, H as splitEmailList, q as statusFilterOptions, g as tabForType, h as typeForTab, U as validatePaymentValues, A as validateReceivableForm, B as validateSendValues };
@@ -11,6 +11,20 @@ var e = {
11
11
  paymentAmountInvalid: "Amount paid must be greater than 0",
12
12
  genericError: "Something went wrong. Please try again.",
13
13
  lineItemsLoading: "Please wait for invoice details to finish loading.",
14
+ bankAccountFallbackName: "Bank Account",
15
+ bankAccountPoweredBy: "Powered by {embeddedBankName}",
16
+ bankAccountLinked: "Linked account",
17
+ bankAccountHolderNameRequired: "Account holder name is required",
18
+ bankAccountHolderNameTooLong: "Account holder name must be 255 characters or less",
19
+ bankAccountNumberRequired: "Account number is required",
20
+ bankAccountNumberDigitsOnly: "Account number must contain only digits",
21
+ bankAccountNumberTooShort: "Account number must be at least 4 digits",
22
+ bankAccountNumberTooLong: "Account number must be at most 17 digits",
23
+ bankAccountRoutingNumberRequired: "Routing number is required",
24
+ bankAccountRoutingNumberInvalid: "Routing number must be 9 digits",
25
+ bankAccountNicknameTooLong: "Display name must be 200 characters or less",
26
+ bankAccountCreated: "Bank Account \"{name}\" has been created.",
27
+ bankAccountCreateFailed: "Failed to create Bank Account.",
14
28
  untitledDocument: "Untitled document",
15
29
  unknownCustomer: "Unknown customer",
16
30
  notAvailable: "Not available",
@@ -1,12 +1,13 @@
1
1
  import "./index2.js";
2
2
  import { ReceivableActionDialog as e } from "./index3.js";
3
- import { ReceivableAttachmentsSection as t } from "./index4.js";
4
- import "./index5.js";
5
- import "./index12.js";
3
+ import { ReceivableBankAccountSection as t } from "./index4.js";
4
+ import { ReceivableAttachmentsSection as n } from "./index5.js";
5
+ import "./index6.js";
6
6
  import "./index13.js";
7
- import { ReceivableDetailsSheet as n } from "./index14.js";
8
- import { ReceivableFormSheet as r } from "./index16.js";
9
- import { ReceivablePaymentDialog as i } from "./index17.js";
10
- import { ReceivableSendDialog as a } from "./index18.js";
11
- import { ReceivablesScreen as o } from "./index19.js";
12
- export { e as ReceivableActionDialog, t as ReceivableAttachmentsSection, n as ReceivableDetailsSheet, r as ReceivableFormSheet, i as ReceivablePaymentDialog, a as ReceivableSendDialog, o as ReceivablesScreen };
7
+ import "./index14.js";
8
+ import { ReceivableDetailsSheet as r } from "./index15.js";
9
+ import { ReceivableFormSheet as i } from "./index17.js";
10
+ import { ReceivablePaymentDialog as a } from "./index18.js";
11
+ import { ReceivableSendDialog as o } from "./index19.js";
12
+ import { ReceivablesScreen as s } from "./index20.js";
13
+ export { e as ReceivableActionDialog, n as ReceivableAttachmentsSection, t as ReceivableBankAccountSection, r as ReceivableDetailsSheet, i as ReceivableFormSheet, a as ReceivablePaymentDialog, o as ReceivableSendDialog, s as ReceivablesScreen };
@@ -1 +1,18 @@
1
- import "react/jsx-runtime";
1
+ import { Button as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { forwardRef as t } from "react";
3
+ import { jsx as n } from "react/jsx-runtime";
4
+ import { XIcon as r } from "lucide-react";
5
+ t(function({ label: t, onClose: i, variant: a = "ghost", size: o = "icon", onClick: s, ...c }, l) {
6
+ return /* @__PURE__ */ n(e, {
7
+ ref: l,
8
+ variant: a,
9
+ size: o,
10
+ ...c,
11
+ "aria-label": t,
12
+ onClick: (e) => {
13
+ s?.(e), i();
14
+ },
15
+ children: /* @__PURE__ */ n(r, { className: "ttw:size-4" })
16
+ });
17
+ });
18
+ //#endregion
@@ -1,4 +1 @@
1
- import "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import "./index6.js";
3
1
  import "react/jsx-runtime";
4
- import "lucide-react";
@@ -1,11 +1,4 @@
1
1
  import "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import "../../../shared/ui/dist/index.js";
3
- import "./index5.js";
4
- import "./index6.js";
5
2
  import "./index7.js";
6
- import "./index8.js";
7
- import "./index9.js";
8
- import "./index10.js";
9
- import "./index11.js";
10
3
  import "react/jsx-runtime";
11
4
  import "lucide-react";
@@ -1 +1,11 @@
1
+ import "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import "../../../shared/ui/dist/index.js";
3
+ import "./index6.js";
4
+ import "./index7.js";
5
+ import "./index8.js";
6
+ import "./index9.js";
7
+ import "./index10.js";
8
+ import "./index11.js";
1
9
  import "./index12.js";
10
+ import "react/jsx-runtime";
11
+ import "lucide-react";
@@ -1,264 +1 @@
1
- import { Button as e, Sheet as t, SheetContent as n, SheetDescription as r, SheetFooter as i, SheetHeader as a, SheetTitle as o, Typography as s } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { ErrorState as c } from "../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
3
- import "../../../shared/ui/dist/index.js";
4
- import { RECEIVABLE_DETAILS_SHEET_LABELS_EN as l } from "./index2.js";
5
- import { ReceivableStatusBadge as u } from "./index5.js";
6
- import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
7
- import { DownloadIcon as m } from "lucide-react";
8
- //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js
9
- function h({ title: e, children: t }) {
10
- return /* @__PURE__ */ p("section", {
11
- className: "ttw:flex ttw:flex-col ttw:gap-3",
12
- children: [/* @__PURE__ */ f(s, {
13
- variant: "body2",
14
- className: "ttw:font-semibold",
15
- children: e
16
- }), t]
17
- });
18
- }
19
- function g({ open: s, onOpenChange: g, details: _, isLoading: v, isError: y, onActionClick: b, onClose: x, labels: S }) {
20
- let C = {
21
- ...l,
22
- ...S,
23
- statusBadge: {
24
- ...l.statusBadge,
25
- ...S?.statusBadge
26
- }
27
- };
28
- return /* @__PURE__ */ f(t, {
29
- open: s,
30
- onOpenChange: g,
31
- children: /* @__PURE__ */ p(n, {
32
- className: "ttw:w-180 ttw:overflow-y-auto ttw:sm:max-w-180",
33
- children: [
34
- /* @__PURE__ */ p(a, { children: [/* @__PURE__ */ f(o, { children: v ? C.loadingTitle : _?.title }), /* @__PURE__ */ f(r, {
35
- className: "ttw:sr-only",
36
- children: C.hiddenDescription
37
- })] }),
38
- /* @__PURE__ */ f("div", {
39
- className: "ttw:flex ttw:flex-col ttw:gap-6 ttw:px-6 ttw:pb-6",
40
- children: y ? /* @__PURE__ */ f(c, {
41
- title: C.errorTitle,
42
- description: C.errorDescription
43
- }) : _ ? /* @__PURE__ */ p(d, { children: [
44
- /* @__PURE__ */ p("div", {
45
- className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:justify-between ttw:gap-3",
46
- children: [/* @__PURE__ */ p("div", {
47
- className: "ttw:flex ttw:flex-col ttw:gap-1",
48
- children: [/* @__PURE__ */ f("span", {
49
- className: "ttw:text-sm ttw:text-muted-foreground",
50
- children: _.customerLabel
51
- }), /* @__PURE__ */ p("div", {
52
- className: "ttw:flex ttw:items-center ttw:gap-2",
53
- children: [/* @__PURE__ */ f(u, {
54
- status: _.status,
55
- tone: _.statusTone,
56
- labels: C.statusBadge
57
- }), /* @__PURE__ */ f("span", {
58
- className: "ttw:text-sm ttw:font-medium",
59
- children: _.totalLabel
60
- })]
61
- })]
62
- }), _.pdfUrl && /* @__PURE__ */ f(e, {
63
- asChild: !0,
64
- variant: "outline",
65
- children: /* @__PURE__ */ p("a", {
66
- href: _.pdfUrl,
67
- target: "_blank",
68
- rel: "noreferrer",
69
- children: [/* @__PURE__ */ f(m, { className: "ttw:size-4" }), C.downloadPdfButton]
70
- })
71
- })]
72
- }),
73
- /* @__PURE__ */ f(h, {
74
- title: C.summaryHeading,
75
- children: /* @__PURE__ */ f("dl", {
76
- className: "ttw:grid ttw:grid-cols-2 ttw:gap-x-6 ttw:gap-y-3",
77
- children: _.summaryItems.map((e) => /* @__PURE__ */ p("div", {
78
- className: "ttw:flex ttw:flex-col",
79
- children: [/* @__PURE__ */ f("dt", {
80
- className: "ttw:text-xs ttw:text-muted-foreground",
81
- children: e.label
82
- }), /* @__PURE__ */ f("dd", {
83
- className: "ttw:text-sm ttw:font-medium",
84
- children: e.value
85
- })]
86
- }, e.label))
87
- })
88
- }),
89
- /* @__PURE__ */ f(h, {
90
- title: C.lineItemsHeading,
91
- children: _.lineItems.length === 0 ? /* @__PURE__ */ f("p", {
92
- className: "ttw:text-sm ttw:text-muted-foreground",
93
- children: C.noLineItems
94
- }) : /* @__PURE__ */ f("div", {
95
- className: "ttw:overflow-hidden ttw:rounded-md ttw:border",
96
- children: /* @__PURE__ */ p("table", {
97
- className: "ttw:w-full ttw:text-sm",
98
- children: [/* @__PURE__ */ f("thead", {
99
- className: "ttw:bg-muted/50",
100
- children: /* @__PURE__ */ p("tr", { children: [
101
- /* @__PURE__ */ f("th", {
102
- className: "ttw:p-2 ttw:text-left",
103
- children: C.lineItemsHeading
104
- }),
105
- /* @__PURE__ */ f("th", {
106
- className: "ttw:p-2 ttw:text-right",
107
- children: C.quantityColumn
108
- }),
109
- /* @__PURE__ */ f("th", {
110
- className: "ttw:p-2 ttw:text-right",
111
- children: C.unitPriceColumn
112
- }),
113
- /* @__PURE__ */ f("th", {
114
- className: "ttw:p-2 ttw:text-right",
115
- children: C.totalColumn
116
- })
117
- ] })
118
- }), /* @__PURE__ */ f("tbody", { children: _.lineItems.map((e) => /* @__PURE__ */ p("tr", {
119
- className: "ttw:border-t",
120
- children: [
121
- /* @__PURE__ */ f("td", {
122
- className: "ttw:p-2",
123
- children: e.name
124
- }),
125
- /* @__PURE__ */ f("td", {
126
- className: "ttw:p-2 ttw:text-right",
127
- children: e.quantityLabel
128
- }),
129
- /* @__PURE__ */ f("td", {
130
- className: "ttw:p-2 ttw:text-right",
131
- children: e.unitPriceLabel
132
- }),
133
- /* @__PURE__ */ f("td", {
134
- className: "ttw:p-2 ttw:text-right",
135
- children: e.totalLabel
136
- })
137
- ]
138
- }, e.id)) })]
139
- })
140
- })
141
- }),
142
- /* @__PURE__ */ f(h, {
143
- title: C.activityHeading,
144
- children: _.activityItems.length === 0 ? /* @__PURE__ */ f("p", {
145
- className: "ttw:text-sm ttw:text-muted-foreground",
146
- children: C.noActivity
147
- }) : /* @__PURE__ */ f("div", {
148
- className: "ttw:flex ttw:flex-col ttw:gap-3",
149
- children: _.activityItems.map((e) => /* @__PURE__ */ p("div", {
150
- className: "ttw:flex ttw:flex-col",
151
- children: [
152
- /* @__PURE__ */ f("span", {
153
- className: "ttw:text-sm ttw:font-medium",
154
- children: e.title
155
- }),
156
- /* @__PURE__ */ f("span", {
157
- className: "ttw:text-sm ttw:text-muted-foreground",
158
- children: e.description
159
- }),
160
- /* @__PURE__ */ f("span", {
161
- className: "ttw:text-xs ttw:text-muted-foreground",
162
- children: e.timestampLabel
163
- })
164
- ]
165
- }, e.id))
166
- })
167
- }),
168
- /* @__PURE__ */ f(h, {
169
- title: C.mailsHeading,
170
- children: _.mailItems.length === 0 ? /* @__PURE__ */ f("p", {
171
- className: "ttw:text-sm ttw:text-muted-foreground",
172
- children: C.noMails
173
- }) : /* @__PURE__ */ f("div", {
174
- className: "ttw:flex ttw:flex-col ttw:gap-3",
175
- children: _.mailItems.map((e) => /* @__PURE__ */ p("div", {
176
- className: "ttw:flex ttw:flex-col",
177
- children: [
178
- /* @__PURE__ */ f("span", {
179
- className: "ttw:text-sm ttw:font-medium",
180
- children: e.statusLabel
181
- }),
182
- /* @__PURE__ */ f("span", {
183
- className: "ttw:text-sm ttw:text-muted-foreground",
184
- children: e.recipientsLabel
185
- }),
186
- /* @__PURE__ */ f("span", {
187
- className: "ttw:text-xs ttw:text-muted-foreground",
188
- children: e.sentAtLabel
189
- })
190
- ]
191
- }, e.id))
192
- })
193
- })
194
- ] }) : null
195
- }),
196
- /* @__PURE__ */ f(i, { children: _ && /* @__PURE__ */ p("div", {
197
- className: "ttw:flex ttw:flex-wrap ttw:justify-end ttw:gap-2",
198
- children: [
199
- _.actions.edit && /* @__PURE__ */ f(e, {
200
- variant: "outline",
201
- onClick: () => b("edit", _),
202
- children: C.editButton
203
- }),
204
- _.actions.issue && /* @__PURE__ */ f(e, {
205
- onClick: () => b("issue", _),
206
- children: C.issueButton
207
- }),
208
- _.actions.send && /* @__PURE__ */ f(e, {
209
- variant: "outline",
210
- onClick: () => b("send", _),
211
- children: C.sendButton
212
- }),
213
- _.actions.accept && /* @__PURE__ */ f(e, {
214
- onClick: () => b("accept", _),
215
- children: C.acceptButton
216
- }),
217
- _.actions.decline && /* @__PURE__ */ f(e, {
218
- variant: "outline",
219
- onClick: () => b("decline", _),
220
- children: C.declineButton
221
- }),
222
- _.actions.recordPayment && /* @__PURE__ */ f(e, {
223
- variant: "outline",
224
- onClick: () => b("recordPayment", _),
225
- children: C.recordPaymentButton
226
- }),
227
- _.actions.markPaid && /* @__PURE__ */ f(e, {
228
- variant: "outline",
229
- onClick: () => b("markPaid", _),
230
- children: C.markPaidButton
231
- }),
232
- _.actions.markUncollectible && /* @__PURE__ */ f(e, {
233
- variant: "outline",
234
- onClick: () => b("markUncollectible", _),
235
- children: C.markUncollectibleButton
236
- }),
237
- _.actions.cancel && /* @__PURE__ */ f(e, {
238
- variant: "outline",
239
- onClick: () => b("cancel", _),
240
- children: C.cancelButton
241
- }),
242
- _.actions.clone && /* @__PURE__ */ f(e, {
243
- variant: "outline",
244
- onClick: () => b("clone", _),
245
- children: C.cloneButton
246
- }),
247
- _.actions.delete && /* @__PURE__ */ f(e, {
248
- variant: "destructive",
249
- onClick: () => b("delete", _),
250
- children: C.deleteButton
251
- }),
252
- /* @__PURE__ */ f(e, {
253
- variant: "ghost",
254
- onClick: x,
255
- children: C.closeButton
256
- })
257
- ]
258
- }) })
259
- ]
260
- })
261
- });
262
- }
263
- //#endregion
264
- export { g as ReceivableDetailsSheet, g as default };
1
+ import "./index13.js";