@tesouro/embedded-components-react 0.11.122 → 0.11.124

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 (88) hide show
  1. package/README.md +6 -3
  2. package/dist/index.css +0 -10
  3. package/dist/index.d.ts +33 -6
  4. package/dist/index.js +15 -14
  5. package/dist/lib/ReceivablesWidget.d.ts +29 -6
  6. package/dist/lib/ReceivablesWidget.js +3 -1
  7. package/dist/lib/WidgetSuite.d.ts +31 -4
  8. package/dist/libs/tesouro-embedded-components-react/balance-history-widget/feature/dist/lib/BalanceHistoryWidget/BalanceHistoryWidgetFeature.js +1 -1
  9. package/dist/libs/tesouro-embedded-components-react/balance-history-widget/feature/dist/lib/BalanceHistoryWidget/labels.js +1 -1
  10. package/dist/libs/tesouro-embedded-components-react/balance-history-widget/ui/dist/index.js +2 -2
  11. package/dist/libs/tesouro-embedded-components-react/balance-history-widget/ui/dist/{index4.js → lib/BalanceHistoryCard/BalanceHistoryCard.js} +9 -9
  12. package/dist/libs/tesouro-embedded-components-react/balance-history-widget/ui/dist/{index2.js → lib/BalanceHistoryCard/BalanceHistoryChart.js} +1 -1
  13. package/dist/libs/tesouro-embedded-components-react/balance-history-widget/ui/dist/{index3.js → lib/BalanceHistoryCard/labels.js} +1 -1
  14. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index.js +3 -1
  15. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivableAttachmentsSection.js +1 -1
  16. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivableCustomerSection.js +1 -1
  17. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +342 -295
  18. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/paymentTerms.js +1 -1
  19. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/preview.js +1 -1
  20. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/recurrence.js +1 -1
  21. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/reminders.js +1 -1
  22. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/tabs.js +26 -0
  23. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableDetails.js +1 -1
  24. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableForm.js +1 -1
  25. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/mocks/labels.js +1 -1
  26. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +30 -26
  27. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index10.js +18 -2
  28. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index11.js +121 -11
  29. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index12.js +100 -11
  30. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index13.js +39 -27
  31. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js +2 -205
  32. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index15.js +11 -52
  33. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index16.js +11 -210
  34. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index17.js +27 -159
  35. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index18.js +203 -14
  36. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index19.js +51 -22
  37. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index20.js +210 -2
  38. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index21.js +154 -111
  39. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index22.js +15 -3
  40. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index23.js +21 -195
  41. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index24.js +3 -2
  42. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index25.js +116 -53
  43. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index26.js +3 -22
  44. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index27.js +197 -8
  45. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index28.js +2 -78
  46. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index29.js +53 -39
  47. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index30.js +20 -17
  48. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index31.js +8 -41
  49. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index32.js +73 -25
  50. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index33.js +36 -17
  51. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index34.js +17 -9
  52. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index35.js +39 -34
  53. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index36.js +29 -14
  54. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index37.js +18 -24
  55. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index38.js +8 -85
  56. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index39.js +33 -490
  57. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index40.js +15 -2
  58. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index41.js +22 -42
  59. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index42.js +82 -65
  60. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index43.js +475 -426
  61. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index44.js +2 -226
  62. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index45.js +46 -21
  63. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index46.js +69 -5
  64. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index47.js +445 -0
  65. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index48.js +208 -246
  66. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index49.js +22 -2
  67. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index50.js +5 -129
  68. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index52.js +247 -222
  69. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index53.js +1 -2
  70. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index54.js +125 -242
  71. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index55.js +23 -56
  72. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index56.js +229 -209
  73. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index57.js +3 -47
  74. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index58.js +248 -0
  75. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index59.js +60 -0
  76. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index6.js +2 -17
  77. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index60.js +194 -0
  78. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index61.js +47 -0
  79. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index7.js +53 -117
  80. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index8.js +9 -99
  81. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index9.js +3 -40
  82. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  83. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/WidgetSuiteProvider.js +30 -39
  84. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/sections/AccountsSection.js +2 -5
  85. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/sections/DashboardSection.js +18 -31
  86. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/mocks/widgetSuite.js +31 -34
  87. package/package.json +1 -1
  88. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index51.js +0 -27
@@ -1,160 +1,28 @@
1
- import { Button as e, Checkbox as t, Separator as n, Typography as r, cn as i } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { RECEIVABLE_FORM_DIALOG_LABELS_EN as a } from "./index14.js";
3
- import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
4
- import { FileText as l, ImageIcon as u, Loader2 as d, Trash2 as f, X as p } from "lucide-react";
5
1
  // ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index17.js
6
- function m({ view: m, isDragging: h, disabled: g, inputRef: _, onBrowseClick: v, onDragOver: y, onDragLeave: b, onDrop: x, onFilesSelect: S, onIncludeInEmailChange: C, onRemove: w, labels: T }) {
7
- let E = {
8
- ...a,
9
- ...T
10
- };
11
- return /* @__PURE__ */ c("div", {
12
- className: "ttw:flex ttw:flex-col ttw:gap-2.5 ttw:rounded-xl ttw:border ttw:border-border ttw:p-6",
13
- children: [
14
- /* @__PURE__ */ c("div", {
15
- className: "ttw:flex ttw:flex-col ttw:gap-2.5 ttw:pb-4",
16
- children: [/* @__PURE__ */ s(r, {
17
- variant: "h4",
18
- children: E.attachmentsHeading
19
- }), /* @__PURE__ */ s(r, {
20
- variant: "body2",
21
- color: "muted",
22
- className: "ttw:font-medium",
23
- children: E.attachmentsDescription
24
- })]
25
- }),
26
- m.showRows && /* @__PURE__ */ c("div", {
27
- className: "ttw:flex ttw:flex-col ttw:gap-2",
28
- children: [m.emailCaption && /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s(r, {
29
- variant: "caption",
30
- color: "muted",
31
- children: m.emailCaption
32
- }), /* @__PURE__ */ s(n, {})] }), /* @__PURE__ */ c("ul", {
33
- className: "ttw:flex ttw:flex-col ttw:gap-2",
34
- children: [m.attachedRows.map((n) => /* @__PURE__ */ c("li", {
35
- className: "ttw:flex ttw:items-center ttw:gap-2",
36
- children: [/* @__PURE__ */ s(t, {
37
- checked: n.includeInEmail,
38
- disabled: g,
39
- "aria-label": n.includeInEmailLabel,
40
- onCheckedChange: (e) => C(n.id, e === !0)
41
- }), /* @__PURE__ */ c("div", {
42
- className: "ttw:flex ttw:w-full ttw:items-center ttw:gap-3 ttw:rounded-lg ttw:bg-muted ttw:px-2 ttw:py-1",
43
- children: [/* @__PURE__ */ c("div", {
44
- className: "ttw:flex ttw:min-w-0 ttw:flex-1 ttw:items-center ttw:gap-1",
45
- children: [/* @__PURE__ */ s(r, {
46
- variant: "body2",
47
- className: "ttw:truncate",
48
- children: n.name
49
- }), /* @__PURE__ */ c(r, {
50
- variant: "body2",
51
- color: "muted",
52
- className: "ttw:shrink-0",
53
- children: [
54
- "(",
55
- n.sizeLabel,
56
- ")"
57
- ]
58
- })]
59
- }), /* @__PURE__ */ s(e, {
60
- type: "button",
61
- variant: "ghost",
62
- size: "icon",
63
- className: "ttw:size-4",
64
- disabled: g,
65
- "aria-label": n.removeLabel,
66
- onClick: () => w(n.id),
67
- children: /* @__PURE__ */ s(f, { className: "ttw:size-4" })
68
- })]
69
- })]
70
- }, n.id)), m.pendingRows.map((t) => /* @__PURE__ */ c("li", {
71
- className: "ttw:flex ttw:w-full ttw:items-center ttw:gap-3 ttw:rounded-lg ttw:bg-muted ttw:px-2 ttw:py-1",
72
- children: [
73
- t.state === "uploading" ? /* @__PURE__ */ s(d, { className: "ttw:size-5 ttw:shrink-0 ttw:animate-spin ttw:text-muted-foreground" }) : /* @__PURE__ */ s(l, { className: "ttw:size-5 ttw:shrink-0 ttw:text-destructive" }),
74
- /* @__PURE__ */ c("div", {
75
- className: "ttw:flex ttw:min-w-0 ttw:flex-1 ttw:flex-col",
76
- children: [/* @__PURE__ */ s(r, {
77
- variant: "body2",
78
- className: "ttw:truncate",
79
- children: t.name
80
- }), t.state === "uploading" ? /* @__PURE__ */ s(r, {
81
- variant: "caption",
82
- color: "muted",
83
- children: t.message
84
- }) : /* @__PURE__ */ s(r, {
85
- variant: "caption",
86
- role: "alert",
87
- className: "ttw:text-destructive",
88
- children: t.message
89
- })]
90
- }),
91
- /* @__PURE__ */ s(e, {
92
- type: "button",
93
- variant: "ghost",
94
- size: "icon",
95
- disabled: g,
96
- "aria-label": t.removeLabel,
97
- onClick: () => w(t.id),
98
- children: /* @__PURE__ */ s(p, { className: "ttw:size-4" })
99
- })
100
- ]
101
- }, t.id))]
102
- })]
103
- }),
104
- /* @__PURE__ */ c("button", {
105
- type: "button",
106
- disabled: g,
107
- onClick: v,
108
- onDragOver: (e) => {
109
- e.preventDefault(), y();
110
- },
111
- onDragLeave: (e) => {
112
- e.preventDefault(), b();
113
- },
114
- onDrop: (e) => {
115
- e.preventDefault(), x(e.dataTransfer.files);
116
- },
117
- className: i("ttw:flex ttw:w-full ttw:flex-col ttw:items-center ttw:gap-2 ttw:rounded-xl ttw:border ttw:border-dashed ttw:p-6 ttw:text-center ttw:disabled:cursor-not-allowed ttw:disabled:opacity-50", h ? "ttw:border-primary ttw:bg-primary/5" : "ttw:border-border ttw:bg-muted"),
118
- children: [
119
- /* @__PURE__ */ s("span", {
120
- className: "ttw:flex ttw:size-10 ttw:items-center ttw:justify-center ttw:rounded-full ttw:border ttw:border-border",
121
- children: /* @__PURE__ */ s(u, { className: "ttw:size-5 ttw:text-muted-foreground" })
122
- }),
123
- /* @__PURE__ */ c(r, {
124
- variant: "body2",
125
- children: [
126
- E.attachmentsDropPrompt,
127
- " ",
128
- /* @__PURE__ */ s("span", {
129
- className: "ttw:text-primary ttw:underline",
130
- children: E.attachmentsBrowseLink
131
- })
132
- ]
133
- }),
134
- /* @__PURE__ */ s(r, {
135
- variant: "caption",
136
- color: "muted",
137
- children: E.attachmentsFormatsHint
138
- })
139
- ]
140
- }),
141
- m.countLimitMessage && /* @__PURE__ */ s(r, {
142
- variant: "body2",
143
- role: "alert",
144
- className: "ttw:text-destructive",
145
- children: m.countLimitMessage
146
- }),
147
- /* @__PURE__ */ s("input", {
148
- ref: _,
149
- type: "file",
150
- multiple: !0,
151
- tabIndex: -1,
152
- "aria-hidden": !0,
153
- className: "ttw:sr-only",
154
- accept: m.accept,
155
- onChange: (e) => S(e.target.files)
156
- })
157
- ]
158
- });
159
- }
160
- export { m as ReceivableAttachmentsSection };
2
+ var e = {
3
+ recurrenceRepeatLabel: "Repeat this invoice",
4
+ recurrenceMonthDayLead: "on the",
5
+ recurrenceWeekdayLead: "on",
6
+ recurrenceStartOnLabel: "Start on",
7
+ recurrenceEndChoiceLead: "and end",
8
+ recurrenceEndCountLead: "and end after",
9
+ recurrenceDatePlaceholder: "Mon DD, YYYY",
10
+ recurrenceCreationModeQuestion: "When an invoice in the series is created, what should happen?",
11
+ recurrenceCreationModeHint: "(You can change this at any time)",
12
+ recurrenceSetUpEmail: "Set up the email"
13
+ }, t = {
14
+ recurrenceEmailTitle: "Email sent with each invoice",
15
+ recurrenceEmailDescription: "The same recipients, subject, and message are used for every invoice in the series.",
16
+ recurrenceEmailTo: "To",
17
+ recurrenceEmailCc: "Cc",
18
+ recurrenceEmailBcc: "Bcc",
19
+ recurrenceEmailSubject: "Subject",
20
+ recurrenceEmailMessage: "Message",
21
+ recurrenceEmailRecipientPlaceholder: "name@example.com",
22
+ recurrenceEmailMessagePlaceholder: "e.g., Thank you for your business",
23
+ recurrenceEmailFootnote: "Each invoice is finalized and emailed automatically on its schedule.",
24
+ recurrenceEmailCancel: "Cancel",
25
+ recurrenceEmailSave: "Save",
26
+ recurrenceEmailClose: "Close"
27
+ };
28
+ export { t as RECEIVABLE_RECURRENCE_EMAIL_DIALOG_LABELS_EN, e as RECEIVABLE_RECURRENCE_SECTION_LABELS_EN };
@@ -1,15 +1,204 @@
1
- import { jsx as e, jsxs as t } from "react/jsx-runtime";
1
+ import { RECEIVABLE_STATUS_BADGE_LABELS_EN as e } from "../../../shared/document-status/ui/dist/index6.js";
2
+ import "../../../shared/document-status/ui/dist/index.js";
3
+ import { RECEIVABLE_BILLING_SECTION_LABELS_EN as t } from "./index15.js";
4
+ import { RECEIVABLE_CUSTOMER_SECTION_LABELS_EN as n } from "./index16.js";
5
+ import { RECEIVABLE_RECURRENCE_EMAIL_DIALOG_LABELS_EN as r, RECEIVABLE_RECURRENCE_SECTION_LABELS_EN as i } from "./index17.js";
2
6
  // ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index18.js
3
- function n({ option: n }) {
4
- return /* @__PURE__ */ t("span", {
5
- className: "ttw:flex ttw:w-full ttw:min-w-0 ttw:items-center ttw:justify-between ttw:gap-2",
6
- children: [/* @__PURE__ */ e("span", {
7
- className: "ttw:truncate",
8
- children: n.label
9
- }), n.dueDateLabel && /* @__PURE__ */ e("span", {
10
- className: "ttw:shrink-0 ttw:text-xs ttw:text-muted-foreground",
11
- children: n.dueDateLabel
12
- })]
13
- });
14
- }
15
- export { n as OptionRow };
7
+ var a = { all: "All invoices" }, o = {
8
+ createInvoiceButton: "Create invoice",
9
+ statusCardsAll: a.all,
10
+ columnDueDate: "Due date",
11
+ columnStatus: "Status",
12
+ columnNumber: "Number",
13
+ columnCustomer: "Customer",
14
+ columnIssueDate: "Issue date",
15
+ columnAmount: "Amount",
16
+ openRow: (e) => `View invoice — ${e}`,
17
+ sortByDueDate: "Sort by due date",
18
+ sortByStatus: "Sort by status",
19
+ sortByNumber: "Sort by number",
20
+ sortByIssueDate: "Sort by issue date",
21
+ sortByAmount: "Sort by amount",
22
+ emptyTitle: "No Invoices",
23
+ emptyDescription: "You don’t have any invoices yet.",
24
+ filterEmptyTitle: "No Invoices Found",
25
+ errorTitle: "Failed to load Invoices",
26
+ errorDescription: "There was an error loading invoices.",
27
+ errorRetry: "Reload",
28
+ accessRestrictedTitle: "Access Restricted",
29
+ accessRestrictedDescription: "You don’t have permissions to view this page. Contact your system administrator for details.",
30
+ statusBadge: e
31
+ }, s = {
32
+ unsavedTitle: "Save this invoice as a draft?",
33
+ unsavedDescription: "This invoice has changes that have not been saved. Save it as a draft to finish later, or discard the changes.",
34
+ unsavedDiscardButton: "Discard changes",
35
+ unsavedSaveDraftButton: "Save as draft",
36
+ unsavedCloseButton: "Close"
37
+ }, c = {
38
+ ...t,
39
+ ...n,
40
+ ...i,
41
+ ...r,
42
+ ...s,
43
+ createTitle: "Create invoice",
44
+ createDescription: "Create and issue an invoice to your customers",
45
+ editTitle: "Edit invoice",
46
+ editDescription: "Invoice details",
47
+ closeButton: "Close",
48
+ dueDateLabel: "Due date",
49
+ lineItemsHeading: "Products and services",
50
+ lineItemsDescription: "Add the products and services on this invoice. You'll have the option to save new items to your inventory.",
51
+ productLabel: "Item name",
52
+ quantityLabel: "Quantity",
53
+ unitLabel: "Units",
54
+ unitPlaceholder: "Select",
55
+ unitNone: "None",
56
+ manageUnitsOption: "Manage units of measure",
57
+ priceLabel: "Price",
58
+ taxableLabel: "Taxable",
59
+ taxRateLabel: "Tax rate",
60
+ taxRatePlaceholder: "e.g. 6.25",
61
+ taxRateSuffix: "%",
62
+ discountLabel: "Discount",
63
+ discountPercentageOption: "%",
64
+ discountAmountOptionAriaLabel: "Flat discount",
65
+ discountPercentageOptionAriaLabel: "Percentage discount",
66
+ subtotalLabel: "Subtotal",
67
+ discountTotalLabel: "Discount",
68
+ nonTaxableSubtotalLabel: "Non-taxable subtotal",
69
+ taxableSubtotalLabel: "Taxable subtotal",
70
+ taxTotalLabel: "Tax",
71
+ totalLabel: "Total",
72
+ decreaseQuantityButton: "Decrease quantity",
73
+ increaseQuantityButton: "Increase quantity",
74
+ addLineItemButton: "Add item",
75
+ removeLineItemButton: "Remove line item",
76
+ cancelButton: "Cancel",
77
+ notesHeading: "Notes",
78
+ notesDescription: "Provide additional information for your customer.",
79
+ optionalSuffix: "(optional)",
80
+ openingNoteLabel: "Opening note to the customer",
81
+ openingNotePlaceholder: "e.g., As discussed on our call, please find the attached invoice.",
82
+ openingNoteDescription: "Appears above your line items. Use it to reference a discussion, agreement, or project.",
83
+ closingNoteLabel: "Closing note to the customer",
84
+ closingNotePlaceholder: "e.g., Thank you for your business!",
85
+ closingNoteDescription: "Appears below your line items. Commonly used for thank you messages or payment instructions.",
86
+ bankAccountHeading: "Payment instructions",
87
+ bankAccountDescription: "Tells the customer how they can pay you. We'll include the selected info on the invoice",
88
+ bankAccountLabel: "Bank account",
89
+ bankAccountHint: "Display your bank account number and routing number",
90
+ bankAccountSelectorLabel: "Bank account selector",
91
+ bankAccountPlaceholder: "Select bank account",
92
+ bankAccountAddOption: "Add a new account",
93
+ bankAccountFormHeading: "Add a bank account",
94
+ bankAccountRoutingNumberLabel: "Routing number",
95
+ bankAccountRoutingNumberPlaceholder: "e.g. 123456789",
96
+ bankAccountAccountNumberLabel: "Account number",
97
+ bankAccountAccountNumberPlaceholder: "e.g. 123456789",
98
+ bankAccountHolderNameLabel: "Account holder name",
99
+ bankAccountHolderNamePlaceholder: "e.g. James Smith",
100
+ bankAccountNicknameLabel: "Account nickname",
101
+ bankAccountNicknamePlaceholder: "e.g. Empire Bank Checking",
102
+ bankAccountCancelButton: "Cancel",
103
+ bankAccountSaveButton: "Save account",
104
+ bankAccountRestrictedTitle: "There are no bank accounts on file for this account",
105
+ bankAccountRestrictedDescription: "A bank account is required in order to issue invoices. Contact your company admin to set one up.",
106
+ attachmentsHeading: "Attachments",
107
+ attachmentsDescription: "Associate additional documents with this invoice for your own reference or to share with the customer. e.g. contracts, photos, terms and conditions, etc.",
108
+ attachmentsDropPrompt: "Drop your files here, or",
109
+ attachmentsBrowseLink: "browse to upload",
110
+ attachmentsFormatsHint: "PDF, DOC, JPG, PNG (max. 3MB)",
111
+ remindersToggleLabel: "Payment reminders",
112
+ remindersDescription: "Send reminders when an invoice is approaching its due date or past due.",
113
+ remindersLibraryNote: "New reminders will be saved to your organization's library and can be managed via Invoice settings",
114
+ reminderNumberOfDays: "Number of days",
115
+ reminderBefore: "BEFORE",
116
+ reminderAfter: "AFTER",
117
+ reminderDueDate: "due date",
118
+ reminderNone: "No reminder",
119
+ reminderBeforeDueInputLabel: "Days before due date",
120
+ reminderPlaceholder: "e.g., 3",
121
+ reminderAddTermButton: "Add",
122
+ reminderClearButton: "Clear",
123
+ reminderSaveButton: "Save"
124
+ }, l = {
125
+ hiddenDescription: "Invoice details",
126
+ loadingTitle: "Loading invoice details",
127
+ moreActionsLabel: "More actions",
128
+ viewPdfButton: "View PDF",
129
+ closeButton: "Close",
130
+ invoiceDateCaption: "Invoice date",
131
+ paymentHistoryHeading: "Payment history",
132
+ paymentHistoryEmpty: "You've received no payments yet.",
133
+ paymentHistoryTotalLabel: "Total received",
134
+ paymentHistoryLoading: "Loading payment history",
135
+ customerDetailsHeading: "Customer details",
136
+ recurringAmountCaption: "Recurring amount",
137
+ startsOnCaption: "Starts on",
138
+ endsOnCaption: "Ends on",
139
+ recurringSeriesRowLabel: "Recurring series",
140
+ scheduleIssueDateColumn: "Issue date",
141
+ scheduleAmountColumn: "Amount",
142
+ scheduleStatusColumn: "Status",
143
+ scheduleNumberColumn: "Number",
144
+ scheduleEmpty: "No invoices are scheduled.",
145
+ auditHistoryHeading: "Audit history",
146
+ auditHistoryEmpty: "No history yet.",
147
+ auditHistoryLoading: "Loading history",
148
+ auditHistoryError: "The audit history could not be loaded.",
149
+ auditHistoryNamesError: "Some names could not be loaded.",
150
+ billingHeading: "Billing details",
151
+ lineItemsHeading: "Line items",
152
+ notesHeading: "Notes",
153
+ notesOpeningLabel: "Opening note to customer",
154
+ notesClosingLabel: "Closing note to customer",
155
+ attachmentsHeading: "Attachments",
156
+ attachmentsEmpty: "No attached files",
157
+ attachmentsFileColumn: "File",
158
+ attachmentsEmailedColumn: "Emailed",
159
+ lineItemMultiplier: "x",
160
+ lineItemEaLabel: "ea",
161
+ noLineItems: "No line items.",
162
+ editButton: "Edit",
163
+ issueButton: "Issue",
164
+ issueAndSendButton: "Issue and send",
165
+ recordPaymentButton: "Record payment",
166
+ sendButton: "Resend",
167
+ acceptButton: "Accept",
168
+ declineButton: "Decline",
169
+ markPaidButton: "Mark as paid",
170
+ markUncollectibleButton: "Mark as uncollectible",
171
+ cancelButton: "Cancel invoice",
172
+ cloneButton: "Duplicate",
173
+ deleteButton: "Delete",
174
+ pauseRecurrenceButton: "Pause series",
175
+ resumeRecurrenceButton: "Resume series",
176
+ cancelRecurrenceButton: "Cancel series",
177
+ recurringBadge: "Recurring"
178
+ }, u = {
179
+ title: "Record payment",
180
+ amountLabel: "Amount",
181
+ amountPlaceholder: "0",
182
+ fullAmountDuePrefix: "Enter full amount due of",
183
+ dateLabel: "Date",
184
+ datePlaceholder: "Pick a date",
185
+ timeLabel: "Time",
186
+ timeZoneSuffix: "UTC",
187
+ cancelButton: "Cancel",
188
+ saveButton: "Save",
189
+ reviewTitle: "Manual payment record",
190
+ receivedLabel: "Received",
191
+ referenceLabel: "Reference",
192
+ createdByLabel: "Created by",
193
+ reviewWarning: "Please, check the details of your payment record. You won't be able to change or delete it after.",
194
+ editRecordButton: "Edit record",
195
+ confirmButton: "Confirm",
196
+ close: "Close"
197
+ }, d = {
198
+ cancelButton: "Cancel",
199
+ confirmButton: "Confirm",
200
+ commentLabel: "Comment (optional)",
201
+ commentPlaceholder: "Add a comment",
202
+ close: "Close"
203
+ };
204
+ export { o as RECEIVABLES_SCREEN_LABELS_EN, d as RECEIVABLE_ACTION_DIALOG_LABELS_EN, l as RECEIVABLE_DETAILS_PANEL_LABELS_EN, c as RECEIVABLE_FORM_DIALOG_LABELS_EN, u as RECEIVABLE_PAYMENT_DIALOG_LABELS_EN, a as RECEIVABLE_STATUS_CARDS_LABELS_EN, s as UNSAVED_INVOICE_DIALOG_LABELS_EN };
@@ -1,24 +1,53 @@
1
- import { cn as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { OptionRow as t } from "./index18.js";
3
- import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
- import { CalendarIcon as i } from "lucide-react";
1
+ import { Button as e, Dialog as t, DialogContent as n, DialogDescription as r, DialogFooter as i, DialogHeader as a, DialogTitle as o, Label as s, Textarea as c } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { RECEIVABLE_ACTION_DIALOG_LABELS_EN as l } from "./index18.js";
3
+ import { useId as u } from "react";
4
+ import { jsx as d, jsxs as f } from "react/jsx-runtime";
5
5
  // ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index19.js
6
- function a({ selection: a, labels: o }) {
7
- return a?.kind === "receiptDue" ? /* @__PURE__ */ n("span", {
8
- className: "ttw:truncate",
9
- children: o.paymentTermsReceiptDue
10
- }) : a?.kind === "customDate" ? /* @__PURE__ */ r("span", {
11
- className: "ttw:flex ttw:w-full ttw:min-w-0 ttw:items-center ttw:justify-between ttw:gap-2",
12
- children: [/* @__PURE__ */ r("span", {
13
- className: "ttw:flex ttw:min-w-0 ttw:items-center ttw:gap-1.5",
14
- children: [/* @__PURE__ */ n(i, { className: e("ttw:size-4 ttw:shrink-0", !a.hasDate && "ttw:text-muted-foreground") }), /* @__PURE__ */ n("span", {
15
- className: e("ttw:truncate", !a.hasDate && "ttw:text-muted-foreground"),
16
- children: a.dateLabel
17
- })]
18
- }), /* @__PURE__ */ n("span", {
19
- className: "ttw:shrink-0 ttw:text-xs ttw:text-muted-foreground",
20
- children: o.paymentTermsCustomDate
21
- })]
22
- }) : a?.kind === "term" ? /* @__PURE__ */ n(t, { option: a.option }) : null;
6
+ function p({ open: p, onOpenChange: m, title: h, description: g, confirmLabel: _, cancelLabel: v, cancelVariant: y = "ghost", destructive: b, inProgress: x, comment: S, onCommentChange: C, onConfirm: w, onCancel: T, labels: E }) {
7
+ let D = {
8
+ ...l,
9
+ ...E
10
+ }, O = u();
11
+ return /* @__PURE__ */ d(t, {
12
+ open: p,
13
+ onOpenChange: m,
14
+ children: /* @__PURE__ */ f(n, {
15
+ closeDisabled: x,
16
+ labels: { close: D.close },
17
+ className: "ttw:flex ttw:flex-col ttw:gap-6",
18
+ children: [
19
+ /* @__PURE__ */ f(a, { children: [/* @__PURE__ */ d(o, { children: h }), /* @__PURE__ */ d(r, {
20
+ className: "ttw:whitespace-pre-line",
21
+ children: Array.isArray(g) ? g.map((e) => /* @__PURE__ */ d("span", {
22
+ className: "ttw:block",
23
+ children: e
24
+ }, e)) : g
25
+ })] }),
26
+ S !== void 0 && /* @__PURE__ */ f("div", {
27
+ className: "ttw:flex ttw:flex-col ttw:gap-2",
28
+ children: [/* @__PURE__ */ d(s, {
29
+ htmlFor: O,
30
+ children: D.commentLabel
31
+ }), /* @__PURE__ */ d(c, {
32
+ id: O,
33
+ rows: 3,
34
+ placeholder: D.commentPlaceholder,
35
+ value: S,
36
+ onChange: (e) => C?.(e.target.value)
37
+ })]
38
+ }),
39
+ /* @__PURE__ */ f(i, { children: [/* @__PURE__ */ d(e, {
40
+ variant: y,
41
+ onClick: T,
42
+ children: v ?? D.cancelButton
43
+ }), /* @__PURE__ */ d(e, {
44
+ variant: b ? "destructive" : "default",
45
+ loading: x,
46
+ onClick: w,
47
+ children: _ ?? D.confirmButton
48
+ })] })
49
+ ]
50
+ })
51
+ });
23
52
  }
24
- export { a as SelectionValue };
53
+ export { p as ReceivableActionDialog, p as default };