@tesouro/embedded-components-react 0.5.227 → 0.5.228

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 (59) hide show
  1. package/README.md +21 -21
  2. package/dist/index.d.ts +54 -34
  3. package/dist/index.js +1 -1
  4. package/dist/lib/ReceivablesWidget.d.ts +54 -34
  5. package/dist/lib/ReceivablesWidget.js +1 -1
  6. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index.js +4 -4
  7. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index10.js +29 -59
  8. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index.js +1 -1
  9. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index12.js +36 -141
  10. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index13.js +26 -16
  11. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index17.js +58 -37
  12. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index18.js +228 -122
  13. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index19.js +300 -147
  14. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index20.js +34 -37
  15. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index21.js +126 -122
  16. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index22.js +150 -58
  17. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index23.js +38 -91
  18. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index24.js +113 -107
  19. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index25.js +98 -231
  20. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index26.js +111 -27
  21. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index27.js +25 -624
  22. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index28.js +631 -39
  23. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index29.js +41 -40
  24. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index30.js +35 -74
  25. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index31.js +73 -115
  26. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index32.js +115 -313
  27. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index33.js +325 -0
  28. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index7.js +15 -2
  29. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +11 -12
  30. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js +42 -1
  31. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index15.js +19 -3
  32. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index16.js +73 -3
  33. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index17.js +3 -1
  34. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index18.js +16 -1
  35. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index19.js +32 -4
  36. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index20.js +304 -11
  37. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index22.js +42 -258
  38. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index23.js +62 -38
  39. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index24.js +485 -61
  40. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index25.js +90 -480
  41. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index27.js +2 -0
  42. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index28.js +3 -1
  43. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index29.js +0 -3
  44. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index30.js +100 -1
  45. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index31.js +23 -95
  46. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index32.js +231 -23
  47. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index33.js +3 -236
  48. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index34.js +249 -3
  49. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index35.js +78 -234
  50. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index36.js +53 -87
  51. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index37.js +343 -49
  52. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index4.js +29 -20
  53. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +40 -40
  54. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js +189 -211
  55. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +43 -59
  56. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  57. package/package.json +1 -1
  58. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index26.js +0 -106
  59. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index38.js +0 -353
@@ -0,0 +1,325 @@
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
5
+ import { Calendar as e, Skeleton as t } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
6
+ import { EmbeddedToaster as n } from "../../../shared/ui/dist/lib/EmbeddedToaster.js";
7
+ import "../../../shared/ui/dist/index.js";
8
+ import { useAnalyticsTrack as r } from "../../../shared/feature/dist/lib/analytics/hooks.js";
9
+ import { WidgetProvider as i } from "../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
10
+ import "../../../shared/feature/dist/index.js";
11
+ import { CounterpartFormSheet as a } from "../../../shared/counterpart-management/ui/dist/index9.js";
12
+ import { CounterpartSelector as o } from "../../../shared/counterpart-management/feature/dist/lib/CounterpartSelector.js";
13
+ import "../../../shared/counterpart-management/feature/dist/index.js";
14
+ import { ReceivablesWidgetAnalyticsEvent as s, WIDGET_NAME as c } from "./index2.js";
15
+ import { PAGE_SIZE_OPTIONS as l } from "./index4.js";
16
+ import { ReceivableActionDialog as u } from "../../ui/dist/index5.js";
17
+ import { ReceivableBankAccountSection as d } from "../../ui/dist/index6.js";
18
+ import { ReceivableBillingSection as f } from "../../ui/dist/index11.js";
19
+ import { ReceivableDetailsPanel as p } from "../../ui/dist/index20.js";
20
+ import { ReceivableFormSheet as m } from "../../ui/dist/index24.js";
21
+ import { ReceivablePaymentDialog as h } from "../../ui/dist/index25.js";
22
+ import { ReceivableRecurrenceEmailDialog as g } from "../../ui/dist/index30.js";
23
+ import { ReceivableRecurrenceSection as _ } from "../../ui/dist/index32.js";
24
+ import { ReceivableRemindersSection as v } from "../../ui/dist/index34.js";
25
+ import { ReceivableSendDialog as y } from "../../ui/dist/index35.js";
26
+ import { ReceivablesScreen as b } from "../../ui/dist/index37.js";
27
+ import "../../ui/dist/index.js";
28
+ import { ReceivableAttachmentsSection as x } from "./index5.js";
29
+ import { MeasureUnitsManagerContainer as S } from "../../../shared/product-catalog/feature/dist/lib/MeasureUnitsManagerContainer.js";
30
+ import { ProductSelector as C } from "../../../shared/product-catalog/feature/dist/lib/ProductSelector.js";
31
+ import "../../../shared/product-catalog/feature/dist/index.js";
32
+ import { useReceivablesWidget as w } from "./index32.js";
33
+ import { useEffect as T, useId as E, useState as D } from "react";
34
+ import { Fragment as O, jsx as k, jsxs as A } from "react/jsx-runtime";
35
+ //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index33.js
36
+ function j({ counterpartFormLabels: i, counterpartMessageLabels: c, defaultTab: j, detailsLabels: M, embeddedBankName: N, enabledTabs: P, formLabels: F, measureUnitDeleteLabels: I, measureUnitsLabels: L, messageLabels: R, onReceivableCreated: z, onReceivableOpened: B, onTemplateSettingsClick: V, pageSizeOptions: H = l, paymentLabels: U, productMessageLabels: W, screenLabels: G, sendLabels: K, actionLabels: q }) {
37
+ let J = r();
38
+ T(() => {
39
+ J(s.Mounted);
40
+ }, [J]);
41
+ let Y = w({
42
+ counterpartMessageLabels: c,
43
+ defaultTab: j,
44
+ embeddedBankName: N,
45
+ enabledTabs: P,
46
+ messageLabels: R,
47
+ onReceivableCreated: z,
48
+ onReceivableOpened: B,
49
+ screenLabels: G
50
+ }), [X, Z] = D(!1), Q = E(), $ = E(), ee = E(), te = E();
51
+ return /* @__PURE__ */ A(O, { children: [
52
+ /* @__PURE__ */ k(n, {}),
53
+ /* @__PURE__ */ k(b, {
54
+ rows: Y.table.rows,
55
+ activeTab: Y.activeTab,
56
+ enabledTabs: Y.enabledTabs,
57
+ onTabChange: Y.setActiveTab,
58
+ isLoading: Y.table.isLoading,
59
+ isError: Y.table.isError,
60
+ sorting: Y.table.sorting,
61
+ onSortingChange: Y.table.onSortingChange,
62
+ pageSize: Y.table.pageSize,
63
+ onPageSizeChange: Y.table.onPageSizeChange,
64
+ pageSizeOptions: H,
65
+ hasNextPage: Y.table.hasNextPage,
66
+ hasPrevPage: Y.table.hasPrevPage,
67
+ onNextPage: Y.table.onNextPage,
68
+ onPrevPage: Y.table.onPrevPage,
69
+ searchValue: Y.table.searchValue,
70
+ onSearchChange: Y.table.onSearchChange,
71
+ statusFilter: Y.table.statusFilter,
72
+ statusOptions: Y.table.statusOptions,
73
+ onStatusFilterChange: Y.table.onStatusFilterChange,
74
+ statusCards: Y.table.statusCards,
75
+ onStatusCardSelect: Y.table.onStatusFilterChange,
76
+ isFiltering: Y.table.isFiltering,
77
+ onCreateClick: Y.openCreate,
78
+ onTemplateSettingsClick: V,
79
+ onRowClick: Y.handleRowClick,
80
+ onActionClick: Y.handleActionClick,
81
+ onRetry: Y.table.onRetry,
82
+ labels: G
83
+ }),
84
+ /* @__PURE__ */ k(m, {
85
+ open: Y.form.open,
86
+ onOpenChange: (e) => {
87
+ e || Y.form.close();
88
+ },
89
+ mode: Y.form.mode,
90
+ values: Y.form.sheetValues,
91
+ errors: Y.form.errors,
92
+ currencyOptions: Y.form.currencyOptions,
93
+ unitOptions: Y.form.lineItemUnitOptions,
94
+ currencySymbol: Y.form.currencySymbol,
95
+ lineItemControls: Y.form.lineItemControls,
96
+ autoFocusLineItemId: Y.form.autoFocusLineItemId,
97
+ lineItemsLoading: Y.form.lineItemsLoading,
98
+ inProgress: Y.form.isSubmitting,
99
+ customerSelector: /* @__PURE__ */ k(o, {
100
+ mode: "customer",
101
+ value: Y.form.values.customerId || void 0,
102
+ invalid: !!Y.form.errors.customerId,
103
+ onValueChange: (e) => Y.form.updateValues({ customerId: e }),
104
+ onCreateClick: Y.form.openCounterpartCreate
105
+ }),
106
+ renderProductSelector: (e, t) => /* @__PURE__ */ k(C, {
107
+ ...t,
108
+ inputValue: e.name,
109
+ selectedProductId: Y.form.values.lineItems.find((t) => t.id === e.id)?.productId || void 0,
110
+ currency: Y.form.values.currency,
111
+ maxLength: 100,
112
+ onInputValueChange: (t) => Y.form.updateLineItem(e.id, { name: t }),
113
+ onProductSelect: (t) => Y.form.selectProduct(e.id, t)
114
+ }),
115
+ onChange: Y.form.updateValues,
116
+ onLineItemChange: Y.form.updateLineItem,
117
+ onLineItemCommit: Y.form.commitLineItem,
118
+ onLineItemQuantityStep: Y.form.stepLineItem,
119
+ onTaxRateCommit: Y.form.commitTaxRate,
120
+ onDiscountFocus: Y.form.focusDiscount,
121
+ onDiscountCommit: Y.form.commitDiscount,
122
+ totals: Y.form.totalsView,
123
+ onManageUnits: () => Z(!0),
124
+ onAddLineItem: Y.form.addLineItem,
125
+ onRemoveLineItem: Y.form.removeLineItem,
126
+ showDueDateField: Y.form.showDueDateField,
127
+ billingSection: Y.form.showBillingSection && /* @__PURE__ */ k(f, {
128
+ idPrefix: Q,
129
+ paymentTerms: Y.form.paymentTerms.view,
130
+ paymentTermsError: Y.form.errors.paymentTermsId,
131
+ disabled: Y.form.isSubmitting,
132
+ onPaymentTermsChange: Y.form.paymentTerms.select,
133
+ onCustomDatePickerOpenChange: Y.form.paymentTerms.changeCustomDatePickerOpen,
134
+ customDateCalendar: /* @__PURE__ */ k(e, {
135
+ mode: "single",
136
+ captionLayout: "dropdown",
137
+ ...Y.form.paymentTerms.calendar,
138
+ onSelect: Y.form.paymentTerms.selectCustomDate
139
+ }),
140
+ recurrenceSection: Y.form.showRecurrenceSection && (Y.form.recurrenceLoading ? /* @__PURE__ */ k(t, { className: "ttw:h-9 ttw:w-full" }) : /* @__PURE__ */ k(_, {
141
+ idPrefix: $,
142
+ view: Y.form.recurrence.view,
143
+ disabled: Y.form.isSubmitting,
144
+ onFrequencyChange: Y.form.recurrence.changeFrequency,
145
+ onMonthDayChange: Y.form.recurrence.changeMonthDay,
146
+ onWeekdayChange: Y.form.recurrence.changeWeekday,
147
+ onStartDateChange: Y.form.recurrence.changeStartDate,
148
+ onEndModeChange: Y.form.recurrence.changeEndMode,
149
+ onEndDateChange: Y.form.recurrence.changeEndDate,
150
+ onMaxOccurrencesChange: Y.form.recurrence.changeMaxOccurrences,
151
+ onCreationModeChange: Y.form.recurrence.changeCreationMode,
152
+ onSetUpEmailClick: Y.form.recurrence.setUpEmail,
153
+ emailDialog: /* @__PURE__ */ k(g, {
154
+ idPrefix: $,
155
+ view: Y.form.recurrence.emailView,
156
+ onOpenChange: Y.form.recurrence.changeEmailOpen,
157
+ onChange: Y.form.recurrence.changeEmail,
158
+ onSave: Y.form.recurrence.saveEmail,
159
+ labels: F
160
+ }),
161
+ labels: F
162
+ })),
163
+ labels: F
164
+ }),
165
+ remindersSection: Y.form.reminders.view && /* @__PURE__ */ k(v, {
166
+ idPrefix: te,
167
+ view: Y.form.reminders.view,
168
+ onToggle: Y.form.reminders.toggle,
169
+ onPaymentReminderSelect: Y.form.reminders.selectPaymentReminder,
170
+ onOverdueReminderSelect: Y.form.reminders.selectOverdueReminder,
171
+ onBeforeDueInputChange: Y.form.reminders.changeBeforeDueInput,
172
+ onBeforeDueSave: Y.form.reminders.saveBeforeDue,
173
+ onOverdueTermChange: Y.form.reminders.changeOverdueTerm,
174
+ onOverdueAddTerm: Y.form.reminders.addOverdueTerm,
175
+ onOverdueClear: Y.form.reminders.clearOverdueTerms,
176
+ onOverdueSave: Y.form.reminders.saveOverdue,
177
+ labels: F
178
+ }),
179
+ bankAccountSection: /* @__PURE__ */ k(d, {
180
+ idPrefix: ee,
181
+ view: Y.form.bankAccount.view,
182
+ error: Y.form.errors.bankAccountId,
183
+ disabled: Y.form.isSubmitting,
184
+ onAccountSelect: Y.form.bankAccount.selectAccount,
185
+ onAddAccountClick: Y.form.bankAccount.openAddAccount,
186
+ onFormChange: Y.form.bankAccount.updateAccountForm,
187
+ onFormSave: Y.form.bankAccount.saveAccount,
188
+ onFormCancel: Y.form.bankAccount.cancelAddAccount,
189
+ labels: F
190
+ }),
191
+ attachmentsSection: Y.form.attachmentsView && /* @__PURE__ */ k(x, {
192
+ view: Y.form.attachmentsView,
193
+ disabled: Y.form.isSubmitting,
194
+ onFilesSelect: Y.form.selectAttachmentFiles,
195
+ onIncludeInEmailChange: Y.form.setAttachmentIncludeInEmail,
196
+ onRemove: Y.form.removeAttachment,
197
+ labels: F
198
+ }),
199
+ cancelDisabled: Y.form.isSubmitting || Y.form.attachmentsUploading,
200
+ draftButtonLabel: Y.form.draftButtonLabel,
201
+ draftDisabled: Y.form.draftDisabled,
202
+ primaryButtonLabel: Y.form.primaryButtonLabel,
203
+ primaryDisabled: Y.form.primaryDisabled,
204
+ scrollContainerRef: Y.form.scrollContainerRef,
205
+ onSubmit: Y.form.submit,
206
+ onDraftClick: Y.form.selectDraftMode,
207
+ onPrimaryClick: Y.form.selectPrimaryMode,
208
+ onCancel: Y.form.close,
209
+ labels: F
210
+ }),
211
+ /* @__PURE__ */ k(p, {
212
+ open: Y.detailsOpen,
213
+ onOpenChange: (e) => {
214
+ e || Y.closeDetails();
215
+ },
216
+ details: Y.details.detailsView,
217
+ unsupported: Y.details.unsupportedView,
218
+ isLoading: Y.details.isLoading,
219
+ isError: Y.details.isError,
220
+ onActionClick: Y.handleDetailsActionClick,
221
+ onClose: Y.closeDetails,
222
+ labels: M
223
+ }),
224
+ /* @__PURE__ */ k(y, {
225
+ open: Y.actions.sendOpen,
226
+ onOpenChange: (e) => {
227
+ e || Y.actions.closeSend();
228
+ },
229
+ values: Y.actions.sendValues,
230
+ errors: Y.actions.sendErrors,
231
+ inProgress: Y.actions.sendInProgress,
232
+ onChange: (e) => Y.actions.setSendValues((t) => ({
233
+ ...t,
234
+ ...e
235
+ })),
236
+ onSubmit: Y.actions.submitSend,
237
+ onCancel: Y.actions.closeSend,
238
+ labels: K
239
+ }),
240
+ /* @__PURE__ */ k(h, {
241
+ open: Y.actions.paymentOpen,
242
+ onOpenChange: (e) => {
243
+ e || Y.actions.closePayment();
244
+ },
245
+ values: Y.actions.paymentValues,
246
+ errors: Y.actions.paymentErrors,
247
+ inProgress: Y.actions.paymentInProgress,
248
+ onChange: (e) => Y.actions.setPaymentValues((t) => ({
249
+ ...t,
250
+ ...e
251
+ })),
252
+ onSubmit: Y.actions.submitPayment,
253
+ onCancel: Y.actions.closePayment,
254
+ labels: U
255
+ }),
256
+ Y.actions.actionDialog && /* @__PURE__ */ k(u, {
257
+ open: !!Y.actions.actionTarget,
258
+ onOpenChange: (e) => {
259
+ e || Y.actions.closeAction();
260
+ },
261
+ title: Y.actions.actionDialog.title,
262
+ description: Y.actions.actionDialog.description,
263
+ confirmLabel: Y.actions.actionDialog.confirmLabel,
264
+ destructive: Y.actions.actionDialog.destructive,
265
+ error: Y.actions.actionError,
266
+ inProgress: Y.actions.actionInProgress,
267
+ onConfirm: Y.actions.confirmAction,
268
+ onCancel: Y.actions.closeAction,
269
+ labels: q
270
+ }),
271
+ /* @__PURE__ */ k(a, {
272
+ open: Y.form.counterpartView === "create",
273
+ onOpenChange: (e) => {
274
+ e || Y.form.counterpartForm.close();
275
+ },
276
+ mode: "create",
277
+ values: Y.form.counterpartForm.values,
278
+ errors: Y.form.counterpartForm.errors,
279
+ stateOptions: Y.form.stateOptions,
280
+ inProgress: Y.form.counterpartForm.isSubmitting,
281
+ onChange: (e) => Y.form.counterpartForm.setValues((t) => ({
282
+ ...t,
283
+ ...e
284
+ })),
285
+ onAddressChange: (e) => Y.form.counterpartForm.setValues((t) => ({
286
+ ...t,
287
+ address: {
288
+ ...t.address,
289
+ ...e
290
+ }
291
+ })),
292
+ onSubmit: Y.form.counterpartForm.submit,
293
+ onCancel: Y.form.counterpartForm.close,
294
+ labels: i
295
+ }),
296
+ /* @__PURE__ */ k(S, {
297
+ open: X,
298
+ onClose: () => Z(!1),
299
+ managerLabels: L,
300
+ deleteLabels: I,
301
+ messageLabels: W
302
+ })
303
+ ] });
304
+ }
305
+ function M({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gatewayRouting: a, linkComponent: o, implementation: s, uiFramework: l, errorFallback: u, onError: d, analytics: f, disclosuresAcceptance: p, providerLabels: m, ...h }) {
306
+ return /* @__PURE__ */ k(i, {
307
+ widgetName: c,
308
+ baseUrl: e,
309
+ widgetToken: t,
310
+ organizationId: n,
311
+ configClient: r,
312
+ gatewayRouting: a,
313
+ linkComponent: o,
314
+ implementation: s,
315
+ uiFramework: l,
316
+ errorFallback: u,
317
+ onError: d,
318
+ analytics: f,
319
+ disclosuresAcceptance: p,
320
+ providerLabels: m,
321
+ children: /* @__PURE__ */ k(j, { ...h })
322
+ });
323
+ }
324
+ //#endregion
325
+ export { M as ReceivablesWidget, M as default };
@@ -56,11 +56,24 @@ function l(e) {
56
56
  size: e.size
57
57
  }));
58
58
  }
59
- function u(e) {
59
+ function u(e, t) {
60
+ let n = c(e);
61
+ return {
62
+ countLabel: String(n.length),
63
+ rows: n.map((e) => ({
64
+ id: e.id,
65
+ name: e.name,
66
+ url: e.url,
67
+ includeInEmail: e.include_in_email ?? !1,
68
+ emailedLabel: e.include_in_email ? t.attachmentIncludedInEmail : t.attachmentNotIncludedInEmail
69
+ }))
70
+ };
71
+ }
72
+ function d(e) {
60
73
  if (e.length !== 0) return e.map(({ id: e, includeInEmail: t }) => ({
61
74
  id: e,
62
75
  include_in_email: t
63
76
  }));
64
77
  }
65
78
  //#endregion
66
- export { u as attachmentFormValuesToPayload, s as buildReceivableAttachmentsView, a as formatFileSize, l as receivableToAttachmentFormValues, r as toFileArray, i as validateAttachmentFile };
79
+ export { d as attachmentFormValuesToPayload, u as buildReceivableAttachmentDetailsView, s as buildReceivableAttachmentsView, a as formatFileSize, l as receivableToAttachmentFormValues, r as toFileArray, i as validateAttachmentFile };
@@ -8,17 +8,16 @@ import { RECEIVABLE_PAYMENT_TERMS_CUSTOM_DATE as i, RECEIVABLE_PAYMENT_TERMS_REC
8
8
  import { ReceivableBillingSection as o } from "./index11.js";
9
9
  import "./index12.js";
10
10
  import "./index13.js";
11
- import "./index20.js";
11
+ import { ReceivableDetailsPanel as s } from "./index20.js";
12
12
  import "./index21.js";
13
- import { ReceivableDetailsSheet as s } from "./index22.js";
14
- import { ReceivableFormSheet as c } from "./index25.js";
15
- import { ReceivablePaymentDialog as l } from "./index26.js";
13
+ import { ReceivableFormSheet as c } from "./index24.js";
14
+ import { ReceivablePaymentDialog as l } from "./index25.js";
15
+ import "./index28.js";
16
16
  import "./index29.js";
17
- import "./index30.js";
18
- import { ReceivableRecurrenceEmailDialog as u } from "./index31.js";
19
- import { ReceivableRecurrenceSection as d } from "./index33.js";
20
- import "./index34.js";
21
- import { ReceivableRemindersSection as f } from "./index35.js";
22
- import { ReceivableSendDialog as p } from "./index36.js";
23
- import { ReceivablesScreen as m } from "./index38.js";
24
- export { i as RECEIVABLE_PAYMENT_TERMS_CUSTOM_DATE, a as RECEIVABLE_PAYMENT_TERMS_RECEIPT_DUE, e as RECEIVABLE_STATUS_BADGE_LABELS_EN, t as ReceivableActionDialog, r as ReceivableAttachmentsSection, n as ReceivableBankAccountSection, o as ReceivableBillingSection, s as ReceivableDetailsSheet, c as ReceivableFormSheet, l as ReceivablePaymentDialog, u as ReceivableRecurrenceEmailDialog, d as ReceivableRecurrenceSection, f as ReceivableRemindersSection, p as ReceivableSendDialog, m as ReceivablesScreen };
17
+ import { ReceivableRecurrenceEmailDialog as u } from "./index30.js";
18
+ import { ReceivableRecurrenceSection as d } from "./index32.js";
19
+ import "./index33.js";
20
+ import { ReceivableRemindersSection as f } from "./index34.js";
21
+ import { ReceivableSendDialog as p } from "./index35.js";
22
+ import { ReceivablesScreen as m } from "./index37.js";
23
+ export { i as RECEIVABLE_PAYMENT_TERMS_CUSTOM_DATE, a as RECEIVABLE_PAYMENT_TERMS_RECEIPT_DUE, e as RECEIVABLE_STATUS_BADGE_LABELS_EN, t as ReceivableActionDialog, r as ReceivableAttachmentsSection, n as ReceivableBankAccountSection, o as ReceivableBillingSection, s as ReceivableDetailsPanel, c as ReceivableFormSheet, l as ReceivablePaymentDialog, u as ReceivableRecurrenceEmailDialog, d as ReceivableRecurrenceSection, f as ReceivableRemindersSection, p as ReceivableSendDialog, m as ReceivablesScreen };
@@ -1 +1,42 @@
1
- import "lucide-react";
1
+ import { Ban as e, Check as t, CircleCheck as n, CircleSlash as r, CircleX as i, ClipboardCheck as a, Clock as o, CopyPlus as s, Mail as c, PenTool as l, Pencil as u, Trash2 as d } from "lucide-react";
2
+ //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js
3
+ var f = {
4
+ edit: "editButton",
5
+ issue: "issueButton",
6
+ recordPayment: "recordPaymentButton",
7
+ send: "sendButton",
8
+ accept: "acceptButton",
9
+ decline: "declineButton",
10
+ markPaid: "markPaidButton",
11
+ markUncollectible: "markUncollectibleButton",
12
+ cancel: "cancelButton",
13
+ clone: "cloneButton",
14
+ delete: "deleteButton"
15
+ }, p = {
16
+ edit: u,
17
+ issue: c,
18
+ recordPayment: a,
19
+ send: c,
20
+ accept: n,
21
+ decline: i,
22
+ markPaid: n,
23
+ markUncollectible: r,
24
+ cancel: e,
25
+ clone: s,
26
+ delete: d
27
+ }, m = {
28
+ draft: l,
29
+ issuing: o,
30
+ issued: o,
31
+ partially_paid: o,
32
+ paid: t,
33
+ overdue: o,
34
+ canceled: e
35
+ }, h = {
36
+ default: "ttw:text-foreground",
37
+ danger: "ttw:text-red-600",
38
+ success: "ttw:text-emerald-600",
39
+ muted: "ttw:text-muted-foreground"
40
+ }, g = "ttw:bg-muted ttw:text-muted-foreground ttw:hover:bg-accent";
41
+ //#endregion
42
+ export { p as ACTION_ICON, f as ACTION_LABEL_KEY, m as STATUS_ICON, h as amountValueToneClass, g as headerIconButtonClass };
@@ -1,3 +1,19 @@
1
- import "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import "./index14.js";
3
- import "react/jsx-runtime";
1
+ import { cn as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { amountValueToneClass as t } from "./index14.js";
3
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
+ //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index15.js
5
+ function i({ row: i, defaultTone: a }) {
6
+ let o = i.tone ?? (i.emphasis ? a : "default");
7
+ return /* @__PURE__ */ r("div", {
8
+ className: "ttw:flex ttw:flex-col ttw:gap-0.5",
9
+ children: [/* @__PURE__ */ n("span", {
10
+ className: "ttw:text-xs ttw:font-medium ttw:text-muted-foreground",
11
+ children: i.label
12
+ }), /* @__PURE__ */ n("span", {
13
+ className: e(i.emphasis ? "ttw:text-2xl ttw:font-semibold" : "ttw:text-base ttw:font-medium", t[o]),
14
+ children: i.value
15
+ })]
16
+ });
17
+ }
18
+ //#endregion
19
+ export { i as AmountCell };
@@ -1,3 +1,73 @@
1
- import "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import "react/jsx-runtime";
3
- import "lucide-react";
1
+ import { AccordionContent as e, AccordionItem as t, AccordionTrigger as n, Badge as r, Typography as i } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
3
+ import { Check as s } from "lucide-react";
4
+ //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index16.js
5
+ var c = "attachments";
6
+ function l({ attachments: l, labels: u }) {
7
+ return /* @__PURE__ */ o(t, {
8
+ value: c,
9
+ children: [/* @__PURE__ */ a(n, { children: /* @__PURE__ */ o("span", {
10
+ className: "ttw:flex ttw:items-center ttw:gap-2",
11
+ children: [/* @__PURE__ */ a("span", {
12
+ className: "ttw:group-hover:underline",
13
+ children: u.attachmentsHeading
14
+ }), /* @__PURE__ */ a(r, {
15
+ variant: "secondary",
16
+ className: "ttw:rounded-full",
17
+ children: l.countLabel
18
+ })]
19
+ }) }), /* @__PURE__ */ a(e, { children: l.rows.length === 0 ? /* @__PURE__ */ a(i, {
20
+ variant: "body2",
21
+ color: "muted",
22
+ children: u.attachmentsEmpty
23
+ }) : /* @__PURE__ */ o("table", {
24
+ className: "ttw:w-full ttw:border-collapse",
25
+ children: [/* @__PURE__ */ a("thead", { children: /* @__PURE__ */ o("tr", {
26
+ className: "ttw:border-b ttw:border-border",
27
+ children: [/* @__PURE__ */ a("th", {
28
+ scope: "col",
29
+ className: "ttw:py-2 ttw:text-left",
30
+ children: /* @__PURE__ */ a(i, {
31
+ component: "span",
32
+ variant: "caption",
33
+ color: "muted",
34
+ children: u.attachmentsFileColumn
35
+ })
36
+ }), /* @__PURE__ */ a("th", {
37
+ scope: "col",
38
+ className: "ttw:py-2 ttw:text-right",
39
+ children: /* @__PURE__ */ a(i, {
40
+ component: "span",
41
+ variant: "caption",
42
+ color: "muted",
43
+ children: u.attachmentsEmailedColumn
44
+ })
45
+ })]
46
+ }) }), /* @__PURE__ */ a("tbody", { children: l.rows.map((e) => /* @__PURE__ */ o("tr", {
47
+ className: "ttw:border-b ttw:border-border ttw:last:border-b-0",
48
+ children: [/* @__PURE__ */ a("td", {
49
+ className: "ttw:py-3",
50
+ children: /* @__PURE__ */ a("a", {
51
+ href: e.url,
52
+ target: "_blank",
53
+ rel: "noreferrer",
54
+ className: "ttw:text-primary ttw:hover:underline",
55
+ children: e.name
56
+ })
57
+ }), /* @__PURE__ */ a("td", {
58
+ className: "ttw:py-3 ttw:text-right ttw:align-middle",
59
+ children: e.includeInEmail ? /* @__PURE__ */ a(s, {
60
+ role: "img",
61
+ "aria-label": e.emailedLabel,
62
+ className: "ttw:inline-block ttw:size-4 ttw:text-emerald-600"
63
+ }) : /* @__PURE__ */ a("span", {
64
+ className: "ttw:sr-only",
65
+ children: e.emailedLabel
66
+ })
67
+ })]
68
+ }, e.id)) })]
69
+ }) })]
70
+ });
71
+ }
72
+ //#endregion
73
+ export { c as ATTACHMENTS_ITEM_VALUE, l as AttachmentsItem };
@@ -2,7 +2,8 @@ import { Button as e } from "../../../../../packages/shared-ui-shadcn/dist/index
2
2
  import { forwardRef as t } from "react";
3
3
  import { jsx as n } from "react/jsx-runtime";
4
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) {
5
+ //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index17.js
6
+ var i = t(function({ label: t, onClose: i, variant: a = "ghost", size: o = "icon", onClick: s, ...c }, l) {
6
7
  return /* @__PURE__ */ n(e, {
7
8
  ref: l,
8
9
  variant: a,
@@ -16,3 +17,4 @@ t(function({ label: t, onClose: i, variant: a = "ghost", size: o = "icon", onCli
16
17
  });
17
18
  });
18
19
  //#endregion
20
+ export { i as CloseButton };
@@ -1 +1,16 @@
1
- import "react/jsx-runtime";
1
+ import { jsx as e, jsxs as t } from "react/jsx-runtime";
2
+ //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index18.js
3
+ function n({ label: n, value: r }) {
4
+ return /* @__PURE__ */ t("div", {
5
+ className: "ttw:flex ttw:gap-4 ttw:border-b ttw:border-border ttw:py-3 ttw:text-sm ttw:last:border-b-0",
6
+ children: [/* @__PURE__ */ e("span", {
7
+ className: "ttw:w-40 ttw:shrink-0 ttw:text-muted-foreground",
8
+ children: n
9
+ }), /* @__PURE__ */ e("span", {
10
+ className: "ttw:whitespace-pre-line ttw:text-foreground",
11
+ children: r
12
+ })]
13
+ });
14
+ }
15
+ //#endregion
16
+ export { n as InfoRow };
@@ -1,4 +1,32 @@
1
- import "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import "./index14.js";
3
- import "react/jsx-runtime";
4
- import "lucide-react";
1
+ import { Button as e, DropdownMenu as t, DropdownMenuContent as n, DropdownMenuItem as r, DropdownMenuTrigger as i, Tooltip as a, TooltipContent as o, TooltipTrigger as s } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { ACTION_ICON as c } from "./index14.js";
3
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
4
+ import { MoreVerticalIcon as d } from "lucide-react";
5
+ //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index19.js
6
+ function f({ actions: f, triggerLabel: p, getActionLabel: m, onSelect: h, className: g }) {
7
+ return /* @__PURE__ */ u(t, { children: [/* @__PURE__ */ u(a, { children: [/* @__PURE__ */ l(s, {
8
+ asChild: !0,
9
+ children: /* @__PURE__ */ l(i, {
10
+ asChild: !0,
11
+ children: /* @__PURE__ */ l(e, {
12
+ variant: "ghost",
13
+ size: "icon",
14
+ className: g,
15
+ "aria-label": p,
16
+ children: /* @__PURE__ */ l(d, { className: "ttw:size-4" })
17
+ })
18
+ })
19
+ }), /* @__PURE__ */ l(o, { children: p })] }), /* @__PURE__ */ l(n, {
20
+ align: "end",
21
+ children: f.map((e) => {
22
+ let t = c[e];
23
+ return /* @__PURE__ */ u(r, {
24
+ variant: e === "delete" ? "destructive" : "default",
25
+ onClick: () => h(e),
26
+ children: [/* @__PURE__ */ l(t, { className: "ttw:size-4" }), m(e)]
27
+ }, e);
28
+ })
29
+ })] });
30
+ }
31
+ //#endregion
32
+ export { f as OverflowMenu };