@tesouro/embedded-components-react 0.11.125 → 0.11.129

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.
@@ -33,374 +33,378 @@ import { UnsavedInvoiceDialog as ie } from "../../../../ui/dist/index61.js";
33
33
  import "../../../../ui/dist/index.js";
34
34
  import { INVOICING_TAB_LABELS_EN as ae, InvoicingTab as b, isInvoicingTabId as oe } from "./tabs.js";
35
35
  import { ReceivablesWidgetAnalyticsEvent as se, WIDGET_NAME as x } from "./analytics/events.js";
36
- import { PAGE_SIZE_OPTIONS as S } from "./constants.js";
37
- import { ReceivableAttachmentsSection as C } from "./ReceivableAttachmentsSection.js";
38
- import { ReceivableCustomerSection as w } from "./ReceivableCustomerSection.js";
36
+ import { PAGE_SIZE_OPTIONS as ce } from "./constants.js";
37
+ import { ReceivableAttachmentsSection as le } from "./ReceivableAttachmentsSection.js";
38
+ import { ReceivableCustomerSection as ue } from "./ReceivableCustomerSection.js";
39
39
  import "./lineItems.js";
40
- import { MeasureUnitsManagerContainer as T } from "../../../../../shared/product-catalog/feature/dist/lib/MeasureUnitsManagerContainer.js";
41
- import { ProductSelector as E } from "../../../../../shared/product-catalog/feature/dist/lib/ProductSelector.js";
40
+ import { MeasureUnitsManagerContainer as S } from "../../../../../shared/product-catalog/feature/dist/lib/MeasureUnitsManagerContainer.js";
41
+ import { ProductSelector as C } from "../../../../../shared/product-catalog/feature/dist/lib/ProductSelector.js";
42
42
  import "../../../../../shared/product-catalog/feature/dist/index.js";
43
- import { useReceivablesWidget as D } from "./useReceivablesWidget.js";
44
- import { ProductsWidget as O } from "../../../../../products-widget/feature/dist/lib/ProductsWidget/ProductsWidget.js";
43
+ import { useReceivablesWidget as w } from "./useReceivablesWidget.js";
44
+ import { ProductsWidget as T } from "../../../../../products-widget/feature/dist/lib/ProductsWidget/ProductsWidget.js";
45
45
  import "../../../../../products-widget/feature/dist/index.js";
46
- import { useEffect as k, useId as A, useState as j } from "react";
47
- import { Fragment as M, jsx as N, jsxs as P } from "react/jsx-runtime";
46
+ import { useEffect as E, useId as D, useState as O } from "react";
47
+ import { Fragment as k, jsx as A, jsxs as j } from "react/jsx-runtime";
48
48
  // ../../libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js
49
- function F({ auditHistoryLabels: i, counterpartFormLabels: x, counterpartMessageLabels: F, detailsLabels: I, embeddedBankName: L, filterBarLabels: R, filterLabels: z, formLabels: B, headerStart: V, initialCounterpartId: H, initialView: U, measureUnitDeleteLabels: W, measureUnitsLabels: G, messageLabels: ce, onReceivableCreated: le, onReceivableOpened: ue, onTabChange: de, onTemplateSettingsClick: fe, pageSizeOptions: K = S, paymentLabels: pe, previewLabels: me, productMessageLabels: he, screenLabels: q, selectedTab: ge, tabLabels: _e, actionLabels: ve, actionsModalLabels: ye }) {
50
- let J = r();
51
- k(() => {
52
- J(se.Mounted);
53
- }, [J]);
54
- let Y = D({
49
+ function M({ auditHistoryLabels: i, counterpartFormLabels: x, counterpartMessageLabels: M, detailsLabels: N, embeddedBankName: P, filterBarLabels: F, filterLabels: I, formLabels: L, headerStart: R, initialCounterpartId: z, initialView: B, measureUnitDeleteLabels: V, measureUnitsLabels: H, messageLabels: U, onReceivableCreated: de, onReceivableOpened: fe, onTabChange: pe, onTemplateSettingsClick: me, pageSizeOptions: W = ce, paymentLabels: he, previewLabels: ge, productMessageLabels: _e, screenLabels: G, selectedTab: ve, tabLabels: ye, actionLabels: be, actionsModalLabels: xe }) {
50
+ let K = r();
51
+ E(() => {
52
+ K(se.Mounted);
53
+ }, [K]);
54
+ let q = w({
55
55
  auditHistoryLabels: i,
56
- counterpartMessageLabels: F,
57
- embeddedBankName: L,
58
- filterLabels: z,
59
- initialCounterpartId: H,
60
- initialView: U,
61
- messageLabels: ce,
62
- onReceivableCreated: le,
63
- onReceivableOpened: ue,
64
- pageSizeOptions: K,
65
- screenLabels: q
66
- }), be = A(), xe = A(), X = A(), Se = A(), Z = A(), Ce = A(), [we, Te] = j(b.Invoices), Ee = ge ?? we, De = (e) => {
67
- oe(e) && (Te(e), de?.(e));
68
- }, [Q, Oe] = j(null), $ = {
56
+ counterpartMessageLabels: M,
57
+ embeddedBankName: P,
58
+ filterLabels: I,
59
+ initialCounterpartId: z,
60
+ initialView: B,
61
+ messageLabels: U,
62
+ onReceivableCreated: de,
63
+ onReceivableOpened: fe,
64
+ pageSizeOptions: W,
65
+ screenLabels: G
66
+ }), Se = D(), Ce = D(), J = D(), we = D(), Y = D(), Te = D(), [Ee, De] = O(b.Invoices), Oe = ve ?? Ee, X = (e) => {
67
+ oe(e) && (De(e), pe?.(e));
68
+ }, [Z, ke] = O(null), Q = (e, t = !1) => e && ((n) => {
69
+ t || (X(b.Invoices), e(n));
70
+ }), $ = {
69
71
  ...ae,
70
- ..._e
72
+ ...ye
71
73
  };
72
- return /* @__PURE__ */ P(M, { children: [
73
- /* @__PURE__ */ N(n, { position: "bottom-left" }),
74
- /* @__PURE__ */ N(u, {
75
- headerStart: V,
76
- selectedTabId: Ee,
77
- onTabChange: De,
78
- onSettingsClick: Y.canEditSettings ? fe : void 0,
79
- actionContainerRef: Oe,
74
+ return /* @__PURE__ */ j(k, { children: [
75
+ /* @__PURE__ */ A(n, { position: "bottom-left" }),
76
+ /* @__PURE__ */ A(u, {
77
+ headerStart: R,
78
+ selectedTabId: Oe,
79
+ onTabChange: X,
80
+ onSettingsClick: q.canEditSettings ? me : void 0,
81
+ actionContainerRef: ke,
80
82
  labels: { settingsButton: $.settingsButton },
81
83
  tabs: [
82
84
  {
83
85
  id: b.Invoices,
84
86
  label: $.invoicesTab,
85
- content: /* @__PURE__ */ N(re, {
86
- rows: Y.table.rows,
87
- isLoading: Y.isTableLoading,
88
- isError: Y.isError,
89
- isAccessRestricted: Y.isAccessRestricted,
90
- sorting: Y.table.sorting,
91
- onSortingChange: Y.table.onSortingChange,
92
- pageSize: Y.table.pageSize,
93
- onPageSizeChange: Y.table.onPageSizeChange,
94
- pageSizeOptions: K,
95
- hasNextPage: Y.table.hasNextPage,
96
- hasPrevPage: Y.table.hasPrevPage,
97
- onNextPage: Y.table.onNextPage,
98
- onPrevPage: Y.table.onPrevPage,
99
- statusCards: Y.table.statusCards,
100
- onStatusCardSelect: Y.table.onStatusCardSelect,
101
- filterBar: /* @__PURE__ */ N(l, {
102
- ...Y.table.filterBar,
103
- labels: R
87
+ content: /* @__PURE__ */ A(re, {
88
+ rows: q.table.rows,
89
+ isLoading: q.isTableLoading,
90
+ isError: q.isError,
91
+ isAccessRestricted: q.isAccessRestricted,
92
+ sorting: q.table.sorting,
93
+ onSortingChange: q.table.onSortingChange,
94
+ pageSize: q.table.pageSize,
95
+ onPageSizeChange: q.table.onPageSizeChange,
96
+ pageSizeOptions: W,
97
+ hasNextPage: q.table.hasNextPage,
98
+ hasPrevPage: q.table.hasPrevPage,
99
+ onNextPage: q.table.onNextPage,
100
+ onPrevPage: q.table.onPrevPage,
101
+ statusCards: q.table.statusCards,
102
+ onStatusCardSelect: q.table.onStatusCardSelect,
103
+ filterBar: /* @__PURE__ */ A(l, {
104
+ ...q.table.filterBar,
105
+ labels: F
104
106
  }),
105
- isFiltering: Y.table.isFiltering,
106
- onCreateClick: Y.canWrite ? Y.openCreate : void 0,
107
- headerActionContainer: Q,
108
- onRowClick: Y.handleRowClick,
109
- onRetry: Y.onRetry,
110
- labels: q
107
+ isFiltering: q.table.isFiltering,
108
+ onCreateClick: q.canWrite ? q.openCreate : void 0,
109
+ headerActionContainer: Z,
110
+ onRowClick: q.handleRowClick,
111
+ onRetry: q.onRetry,
112
+ labels: G
111
113
  })
112
114
  },
113
115
  {
114
116
  id: b.Recurring,
115
117
  label: $.recurringTab,
116
- content: Y.canWrite && /* @__PURE__ */ N(d, {
117
- container: Q,
118
+ content: q.canWrite && /* @__PURE__ */ A(d, {
119
+ container: Z,
118
120
  label: $.createRecurringInvoiceButton,
119
- onClick: Y.openCreate
121
+ onClick: q.openCreate
120
122
  })
121
123
  },
122
124
  {
123
125
  id: b.Customers,
124
126
  label: $.customersTab,
125
- content: /* @__PURE__ */ N(s, {
127
+ content: /* @__PURE__ */ A(s, {
126
128
  counterpartType: "customer",
127
129
  passThrough: !0,
128
- headerActionContainer: Q
130
+ headerActionContainer: Z,
131
+ onViewAllDocuments: Q(q.customersTabActions.onViewAllDocuments),
132
+ onCreateDocument: Q(q.customersTabActions.onCreateDocument, q.actionsSuspended)
129
133
  })
130
134
  },
131
135
  {
132
136
  id: b.Products,
133
137
  label: $.productsTab,
134
- content: /* @__PURE__ */ N(O, { headerActionContainer: Q })
138
+ content: /* @__PURE__ */ A(T, { headerActionContainer: Z })
135
139
  }
136
140
  ]
137
141
  }),
138
- /* @__PURE__ */ N(h, {
139
- open: Y.form.open,
140
- onRequestClose: Y.form.requestClose,
141
- mode: Y.form.mode,
142
- values: Y.form.sheetValues,
143
- errors: Y.form.errors,
144
- unitOptions: Y.form.lineItemUnitOptions,
145
- currencySymbol: Y.form.currencySymbol,
146
- lineItemControls: Y.form.lineItemControls,
147
- autoFocusLineItemId: Y.form.autoFocusLineItemId,
148
- lineItemsLoading: Y.form.lineItemsLoading,
149
- inProgress: Y.form.fieldsDisabled || Y.actionsSuspended,
150
- customerSection: /* @__PURE__ */ N(w, {
151
- idPrefix: xe,
152
- customerId: Y.form.values.customerId,
153
- customer: Y.form.customer,
154
- customerName: Y.form.values.customerName,
155
- customerEmail: Y.form.values.customerEmail,
156
- customerError: Y.form.errors.customerId,
157
- customerEmailError: Y.form.errors.customerEmail,
158
- canCreate: Y.canCreateCustomer,
159
- messages: Y.messages,
160
- disabled: Y.form.fieldsDisabled,
161
- onCustomerSelect: (e) => Y.form.updateValues({ customerId: e }),
162
- onCustomerNameChange: (e) => Y.form.updateValues({ customerName: e }),
163
- onCustomerEmailChange: (e) => Y.form.updateValues({ customerEmail: e }),
164
- onCustomerEmailBlur: Y.form.commitCustomerEmail,
165
- onAddDetailsClick: Y.form.openCounterpartCreate,
166
- onViewDetailsClick: Y.openCustomerDetails ? () => Y.openCustomerDetails?.(Y.form.values.customerId) : void 0,
167
- onClearClick: () => Y.form.updateValues({
142
+ /* @__PURE__ */ A(h, {
143
+ open: q.form.open,
144
+ onRequestClose: q.form.requestClose,
145
+ mode: q.form.mode,
146
+ values: q.form.sheetValues,
147
+ errors: q.form.errors,
148
+ unitOptions: q.form.lineItemUnitOptions,
149
+ currencySymbol: q.form.currencySymbol,
150
+ lineItemControls: q.form.lineItemControls,
151
+ autoFocusLineItemId: q.form.autoFocusLineItemId,
152
+ lineItemsLoading: q.form.lineItemsLoading,
153
+ inProgress: q.form.fieldsDisabled || q.actionsSuspended,
154
+ customerSection: /* @__PURE__ */ A(ue, {
155
+ idPrefix: Ce,
156
+ customerId: q.form.values.customerId,
157
+ customer: q.form.customer,
158
+ customerName: q.form.values.customerName,
159
+ customerEmail: q.form.values.customerEmail,
160
+ customerError: q.form.errors.customerId,
161
+ customerEmailError: q.form.errors.customerEmail,
162
+ canCreate: q.canCreateCustomer,
163
+ messages: q.messages,
164
+ disabled: q.form.fieldsDisabled,
165
+ onCustomerSelect: (e) => q.form.updateValues({ customerId: e }),
166
+ onCustomerNameChange: (e) => q.form.updateValues({ customerName: e }),
167
+ onCustomerEmailChange: (e) => q.form.updateValues({ customerEmail: e }),
168
+ onCustomerEmailBlur: q.form.commitCustomerEmail,
169
+ onAddDetailsClick: q.form.openCounterpartCreate,
170
+ onViewDetailsClick: q.openCustomerDetails ? () => q.openCustomerDetails?.(q.form.values.customerId) : void 0,
171
+ onClearClick: () => q.form.updateValues({
168
172
  customerId: "",
169
173
  customerName: "",
170
174
  customerEmail: ""
171
175
  }),
172
- labels: B
176
+ labels: L
173
177
  }),
174
- renderProductSelector: (e, t) => /* @__PURE__ */ N(E, {
178
+ renderProductSelector: (e, t) => /* @__PURE__ */ A(C, {
175
179
  ...t,
176
180
  inputValue: e.name,
177
- selectedProductId: Y.form.values.lineItems.find((t) => t.id === e.id)?.productId || void 0,
178
- currency: Y.form.values.currency,
181
+ selectedProductId: q.form.values.lineItems.find((t) => t.id === e.id)?.productId || void 0,
182
+ currency: q.form.values.currency,
179
183
  maxLength: 100,
180
- onInputValueChange: (t) => Y.form.updateLineItem(e.id, { name: t }),
181
- onProductSelect: (t) => Y.form.selectProduct(e.id, t)
184
+ onInputValueChange: (t) => q.form.updateLineItem(e.id, { name: t }),
185
+ onProductSelect: (t) => q.form.selectProduct(e.id, t)
182
186
  }),
183
- onChange: Y.form.updateValues,
184
- onLineItemChange: Y.form.updateLineItem,
185
- onLineItemCommit: Y.form.commitLineItem,
186
- onLineItemQuantityStep: Y.form.stepLineItem,
187
- onTaxRateCommit: Y.form.commitTaxRate,
188
- onDiscountFocus: Y.form.focusDiscount,
189
- onDiscountCommit: Y.form.commitDiscount,
190
- totals: Y.form.totalsView,
191
- onManageUnits: Y.openMeasureUnits,
192
- onAddLineItem: Y.form.addLineItem,
193
- onRemoveLineItem: Y.form.removeLineItem,
194
- showDueDateField: Y.form.showDueDateField,
195
- billingSection: Y.form.showBillingSection && /* @__PURE__ */ N(te, {
196
- idPrefix: be,
197
- paymentTerms: Y.form.paymentTerms.view,
198
- paymentTermsError: Y.form.errors.paymentTermsId,
199
- disabled: Y.form.fieldsDisabled,
200
- onPaymentTermsChange: Y.form.paymentTerms.select,
201
- onCustomDatePickerOpenChange: Y.form.paymentTerms.changeCustomDatePickerOpen,
202
- purchaseOrder: Y.form.purchaseOrder,
203
- onPurchaseOrderChange: (e) => Y.form.updateValues({ purchaseOrder: e }),
204
- customDateCalendar: /* @__PURE__ */ N(e, {
187
+ onChange: q.form.updateValues,
188
+ onLineItemChange: q.form.updateLineItem,
189
+ onLineItemCommit: q.form.commitLineItem,
190
+ onLineItemQuantityStep: q.form.stepLineItem,
191
+ onTaxRateCommit: q.form.commitTaxRate,
192
+ onDiscountFocus: q.form.focusDiscount,
193
+ onDiscountCommit: q.form.commitDiscount,
194
+ totals: q.form.totalsView,
195
+ onManageUnits: q.openMeasureUnits,
196
+ onAddLineItem: q.form.addLineItem,
197
+ onRemoveLineItem: q.form.removeLineItem,
198
+ showDueDateField: q.form.showDueDateField,
199
+ billingSection: q.form.showBillingSection && /* @__PURE__ */ A(te, {
200
+ idPrefix: Se,
201
+ paymentTerms: q.form.paymentTerms.view,
202
+ paymentTermsError: q.form.errors.paymentTermsId,
203
+ disabled: q.form.fieldsDisabled,
204
+ onPaymentTermsChange: q.form.paymentTerms.select,
205
+ onCustomDatePickerOpenChange: q.form.paymentTerms.changeCustomDatePickerOpen,
206
+ purchaseOrder: q.form.purchaseOrder,
207
+ onPurchaseOrderChange: (e) => q.form.updateValues({ purchaseOrder: e }),
208
+ customDateCalendar: /* @__PURE__ */ A(e, {
205
209
  mode: "single",
206
210
  captionLayout: "dropdown",
207
- ...Y.form.paymentTerms.calendar,
208
- onSelect: Y.form.paymentTerms.selectCustomDate
211
+ ...q.form.paymentTerms.calendar,
212
+ onSelect: q.form.paymentTerms.selectCustomDate
209
213
  }),
210
- recurrenceSection: Y.form.showRecurrenceSection && (Y.form.recurrenceLoading ? /* @__PURE__ */ N(t, { className: "ttw:h-9 ttw:w-full" }) : /* @__PURE__ */ N(y, {
211
- idPrefix: X,
212
- view: Y.form.recurrence.view,
213
- disabled: Y.form.fieldsDisabled,
214
- onFrequencyChange: Y.form.recurrence.changeFrequency,
215
- onMonthDayChange: Y.form.recurrence.changeMonthDay,
216
- onWeekdayChange: Y.form.recurrence.changeWeekday,
217
- onStartDateChange: Y.form.recurrence.changeStartDate,
218
- onEndModeChange: Y.form.recurrence.changeEndMode,
219
- onEndDateChange: Y.form.recurrence.changeEndDate,
220
- onMaxOccurrencesChange: Y.form.recurrence.changeMaxOccurrences,
221
- onCreationModeChange: Y.form.recurrence.changeCreationMode,
222
- onSetUpEmailClick: Y.form.recurrence.setUpEmail,
223
- emailDialog: /* @__PURE__ */ N(v, {
224
- idPrefix: X,
225
- view: Y.form.recurrence.emailView,
226
- onOpenChange: Y.form.recurrence.changeEmailOpen,
227
- onChange: Y.form.recurrence.changeEmail,
228
- onSave: Y.form.recurrence.saveEmail,
229
- labels: B
214
+ recurrenceSection: q.form.showRecurrenceSection && (q.form.recurrenceLoading ? /* @__PURE__ */ A(t, { className: "ttw:h-9 ttw:w-full" }) : /* @__PURE__ */ A(y, {
215
+ idPrefix: J,
216
+ view: q.form.recurrence.view,
217
+ disabled: q.form.fieldsDisabled,
218
+ onFrequencyChange: q.form.recurrence.changeFrequency,
219
+ onMonthDayChange: q.form.recurrence.changeMonthDay,
220
+ onWeekdayChange: q.form.recurrence.changeWeekday,
221
+ onStartDateChange: q.form.recurrence.changeStartDate,
222
+ onEndModeChange: q.form.recurrence.changeEndMode,
223
+ onEndDateChange: q.form.recurrence.changeEndDate,
224
+ onMaxOccurrencesChange: q.form.recurrence.changeMaxOccurrences,
225
+ onCreationModeChange: q.form.recurrence.changeCreationMode,
226
+ onSetUpEmailClick: q.form.recurrence.setUpEmail,
227
+ emailDialog: /* @__PURE__ */ A(v, {
228
+ idPrefix: J,
229
+ view: q.form.recurrence.emailView,
230
+ onOpenChange: q.form.recurrence.changeEmailOpen,
231
+ onChange: q.form.recurrence.changeEmail,
232
+ onSave: q.form.recurrence.saveEmail,
233
+ labels: L
230
234
  }),
231
- labels: B
235
+ labels: L
232
236
  })),
233
- remindersSection: Y.form.reminders.view && /* @__PURE__ */ N(ne, {
234
- idPrefix: Z,
235
- view: Y.form.reminders.view,
236
- onToggle: Y.form.reminders.toggle,
237
- onPaymentReminderSelect: Y.form.reminders.selectPaymentReminder,
238
- onOverdueReminderSelect: Y.form.reminders.selectOverdueReminder,
239
- onBeforeDueInputChange: Y.form.reminders.changeBeforeDueInput,
240
- onBeforeDueSave: Y.form.reminders.saveBeforeDue,
241
- onOverdueTermChange: Y.form.reminders.changeOverdueTerm,
242
- onOverdueAddTerm: Y.form.reminders.addOverdueTerm,
243
- onOverdueClear: Y.form.reminders.clearOverdueTerms,
244
- onOverdueSave: Y.form.reminders.saveOverdue,
245
- labels: B
237
+ remindersSection: q.form.reminders.view && /* @__PURE__ */ A(ne, {
238
+ idPrefix: Y,
239
+ view: q.form.reminders.view,
240
+ onToggle: q.form.reminders.toggle,
241
+ onPaymentReminderSelect: q.form.reminders.selectPaymentReminder,
242
+ onOverdueReminderSelect: q.form.reminders.selectOverdueReminder,
243
+ onBeforeDueInputChange: q.form.reminders.changeBeforeDueInput,
244
+ onBeforeDueSave: q.form.reminders.saveBeforeDue,
245
+ onOverdueTermChange: q.form.reminders.changeOverdueTerm,
246
+ onOverdueAddTerm: q.form.reminders.addOverdueTerm,
247
+ onOverdueClear: q.form.reminders.clearOverdueTerms,
248
+ onOverdueSave: q.form.reminders.saveOverdue,
249
+ labels: L
246
250
  }),
247
- labels: B
251
+ labels: L
248
252
  }),
249
- bankAccountSection: /* @__PURE__ */ N(ee, {
250
- idPrefix: Se,
251
- view: Y.form.bankAccount.view,
252
- error: Y.form.errors.bankAccountId,
253
- disabled: Y.form.fieldsDisabled,
254
- onAccountSelect: Y.form.bankAccount.selectAccount,
255
- onAddAccountClick: Y.form.bankAccount.openAddAccount,
256
- onFormChange: Y.form.bankAccount.updateAccountForm,
257
- onFormSave: Y.form.bankAccount.saveAccount,
258
- onFormCancel: Y.form.bankAccount.cancelAddAccount,
259
- labels: B
253
+ bankAccountSection: /* @__PURE__ */ A(ee, {
254
+ idPrefix: we,
255
+ view: q.form.bankAccount.view,
256
+ error: q.form.errors.bankAccountId,
257
+ disabled: q.form.fieldsDisabled,
258
+ onAccountSelect: q.form.bankAccount.selectAccount,
259
+ onAddAccountClick: q.form.bankAccount.openAddAccount,
260
+ onFormChange: q.form.bankAccount.updateAccountForm,
261
+ onFormSave: q.form.bankAccount.saveAccount,
262
+ onFormCancel: q.form.bankAccount.cancelAddAccount,
263
+ labels: L
260
264
  }),
261
- attachmentsSection: Y.form.attachmentsView && /* @__PURE__ */ N(C, {
262
- view: Y.form.attachmentsView,
263
- disabled: Y.form.fieldsDisabled,
264
- onFilesSelect: Y.form.selectAttachmentFiles,
265
- onIncludeInEmailChange: Y.form.setAttachmentIncludeInEmail,
266
- onRemove: Y.form.removeAttachment,
267
- labels: B
265
+ attachmentsSection: q.form.attachmentsView && /* @__PURE__ */ A(le, {
266
+ view: q.form.attachmentsView,
267
+ disabled: q.form.fieldsDisabled,
268
+ onFilesSelect: q.form.selectAttachmentFiles,
269
+ onIncludeInEmailChange: q.form.setAttachmentIncludeInEmail,
270
+ onRemove: q.form.removeAttachment,
271
+ labels: L
268
272
  }),
269
- preview: /* @__PURE__ */ N(_, {
270
- view: Y.form.preview,
271
- labels: me
273
+ preview: /* @__PURE__ */ A(_, {
274
+ view: q.form.preview,
275
+ labels: ge
272
276
  }),
273
- closeDisabled: Y.form.isSubmitting,
274
- cancelDisabled: Y.form.isSubmitting || Y.form.attachmentsUploading,
275
- draftButtonLabel: Y.form.draftButtonLabel,
276
- draftDisabled: Y.form.draftDisabled,
277
- draftLoading: Y.form.draftLoading,
278
- primaryButtonLabel: Y.form.primaryButtonLabel,
279
- primaryDisabled: Y.form.primaryDisabled,
280
- primaryLoading: Y.form.primaryLoading,
281
- scrollContainerRef: Y.form.scrollContainerRef,
282
- onSubmit: Y.form.submit,
283
- onDraftClick: Y.form.selectDraftMode,
284
- onPrimaryClick: Y.form.selectPrimaryMode,
285
- labels: B
277
+ closeDisabled: q.form.isSubmitting,
278
+ cancelDisabled: q.form.isSubmitting || q.form.attachmentsUploading,
279
+ draftButtonLabel: q.form.draftButtonLabel,
280
+ draftDisabled: q.form.draftDisabled,
281
+ draftLoading: q.form.draftLoading,
282
+ primaryButtonLabel: q.form.primaryButtonLabel,
283
+ primaryDisabled: q.form.primaryDisabled,
284
+ primaryLoading: q.form.primaryLoading,
285
+ scrollContainerRef: q.form.scrollContainerRef,
286
+ onSubmit: q.form.submit,
287
+ onDraftClick: q.form.selectDraftMode,
288
+ onPrimaryClick: q.form.selectPrimaryMode,
289
+ labels: L
286
290
  }),
287
- /* @__PURE__ */ N(ie, {
288
- ...Y.form.unsavedPrompt,
289
- labels: B
291
+ /* @__PURE__ */ A(ie, {
292
+ ...q.form.unsavedPrompt,
293
+ labels: L
290
294
  }),
291
- /* @__PURE__ */ N(m, {
292
- open: Y.detailsOpen,
295
+ /* @__PURE__ */ A(m, {
296
+ open: q.detailsOpen,
293
297
  onOpenChange: (e) => {
294
- e || Y.closeDetails();
298
+ e || q.closeDetails();
295
299
  },
296
- details: Y.details.detailsView,
297
- message: Y.details.messageView,
298
- isLoading: Y.details.isLoading,
299
- onActionClick: Y.handleDetailsActionClick,
300
- onClose: Y.closeDetails,
301
- openSections: Y.details.openSections,
302
- onOpenSectionsChange: Y.details.setOpenSections,
303
- disabledActions: Y.actions.pendingActions,
304
- labels: I
305
- }, Y.detailsPanelKey),
306
- /* @__PURE__ */ N(c, {
307
- counterpartId: Y.customerDetailsId,
300
+ details: q.details.detailsView,
301
+ message: q.details.messageView,
302
+ isLoading: q.details.isLoading,
303
+ onActionClick: q.handleDetailsActionClick,
304
+ onClose: q.closeDetails,
305
+ openSections: q.details.openSections,
306
+ onOpenSectionsChange: q.details.setOpenSections,
307
+ disabledActions: q.actions.pendingActions,
308
+ labels: N
309
+ }, q.detailsPanelKey),
310
+ /* @__PURE__ */ A(c, {
311
+ counterpartId: q.customerDetailsId,
308
312
  counterpartType: "customer",
309
- onClose: Y.closeCustomerDetails,
313
+ onClose: q.closeCustomerDetails,
310
314
  formLabels: x,
311
- messageLabels: F,
312
- ...Y.customerDetailsActions
315
+ messageLabels: M,
316
+ ...q.customerDetailsActions
313
317
  }),
314
- /* @__PURE__ */ N(g, {
315
- open: Y.actions.payment.isOpen,
318
+ /* @__PURE__ */ A(g, {
319
+ open: q.actions.payment.isOpen,
316
320
  onOpenChange: (e) => {
317
- e || Y.actions.payment.close();
321
+ e || q.actions.payment.close();
318
322
  },
319
- step: Y.actions.payment.step,
320
- values: Y.actions.payment.values,
321
- errors: Y.actions.payment.errors,
322
- currencySymbol: Y.actions.payment.currencySymbol,
323
- amountDueLabel: Y.actions.payment.amountDueLabel,
324
- review: Y.actions.payment.review,
325
- inProgress: Y.actions.payment.inProgress || Y.actionsSuspended,
326
- onChange: Y.actions.payment.change,
327
- onFillAmountDue: Y.actions.payment.fillAmountDue,
328
- onSave: Y.actions.payment.save,
329
- onEdit: Y.actions.payment.edit,
330
- onConfirm: Y.actions.payment.confirm,
331
- onCancel: Y.actions.payment.close,
332
- labels: pe
323
+ step: q.actions.payment.step,
324
+ values: q.actions.payment.values,
325
+ errors: q.actions.payment.errors,
326
+ currencySymbol: q.actions.payment.currencySymbol,
327
+ amountDueLabel: q.actions.payment.amountDueLabel,
328
+ review: q.actions.payment.review,
329
+ inProgress: q.actions.payment.inProgress || q.actionsSuspended,
330
+ onChange: q.actions.payment.change,
331
+ onFillAmountDue: q.actions.payment.fillAmountDue,
332
+ onSave: q.actions.payment.save,
333
+ onEdit: q.actions.payment.edit,
334
+ onConfirm: q.actions.payment.confirm,
335
+ onCancel: q.actions.payment.close,
336
+ labels: he
333
337
  }),
334
- Y.actions.actionDialog && /* @__PURE__ */ N(p, {
335
- open: !!Y.actions.actionTarget,
338
+ q.actions.actionDialog && /* @__PURE__ */ A(p, {
339
+ open: !!q.actions.actionTarget,
336
340
  onOpenChange: (e) => {
337
- e || Y.actions.closeAction();
341
+ e || q.actions.closeAction();
338
342
  },
339
- title: Y.actions.actionDialog.title,
340
- description: Y.actions.actionDialog.description,
341
- confirmLabel: Y.actions.actionDialog.confirmLabel,
342
- cancelLabel: Y.actions.actionDialog.cancelLabel,
343
- cancelVariant: Y.actions.actionDialog.cancelVariant,
344
- destructive: Y.actions.actionDialog.destructive,
345
- inProgress: Y.actions.actionInProgress || Y.actionsSuspended,
346
- comment: Y.actions.actionComment,
347
- onCommentChange: Y.actions.setActionComment,
348
- onConfirm: Y.actions.confirmAction,
349
- onCancel: Y.actions.closeAction,
350
- labels: ve
343
+ title: q.actions.actionDialog.title,
344
+ description: q.actions.actionDialog.description,
345
+ confirmLabel: q.actions.actionDialog.confirmLabel,
346
+ cancelLabel: q.actions.actionDialog.cancelLabel,
347
+ cancelVariant: q.actions.actionDialog.cancelVariant,
348
+ destructive: q.actions.actionDialog.destructive,
349
+ inProgress: q.actions.actionInProgress || q.actionsSuspended,
350
+ comment: q.actions.actionComment,
351
+ onCommentChange: q.actions.setActionComment,
352
+ onConfirm: q.actions.confirmAction,
353
+ onCancel: q.actions.closeAction,
354
+ labels: be
351
355
  }),
352
- /* @__PURE__ */ N(f, {
353
- idPrefix: Ce,
354
- open: Y.actionsModal.isOpen,
355
- view: Y.actionsModal.view,
356
- onSkip: Y.actionsModal.skip,
357
- onSubjectChange: Y.actionsModal.changeSubject,
358
- onMessageChange: Y.actionsModal.changeMessage,
359
- onSend: Y.actionsModal.send,
360
- onToggleItem: Y.actionsModal.toggleItem,
361
- onToggleAll: Y.actionsModal.toggleAll,
362
- onAllSelectedChange: Y.actionsModal.setAllSelected,
363
- onSaveItems: Y.actionsModal.saveItems,
364
- labels: ye
356
+ /* @__PURE__ */ A(f, {
357
+ idPrefix: Te,
358
+ open: q.actionsModal.isOpen,
359
+ view: q.actionsModal.view,
360
+ onSkip: q.actionsModal.skip,
361
+ onSubjectChange: q.actionsModal.changeSubject,
362
+ onMessageChange: q.actionsModal.changeMessage,
363
+ onSend: q.actionsModal.send,
364
+ onToggleItem: q.actionsModal.toggleItem,
365
+ onToggleAll: q.actionsModal.toggleAll,
366
+ onAllSelectedChange: q.actionsModal.setAllSelected,
367
+ onSaveItems: q.actionsModal.saveItems,
368
+ labels: xe
365
369
  }),
366
- /* @__PURE__ */ N(a, {
367
- open: Y.form.counterpartView === "create",
370
+ /* @__PURE__ */ A(a, {
371
+ open: q.form.counterpartView === "create",
368
372
  onOpenChange: (e) => {
369
- e || Y.form.counterpartForm.close();
373
+ e || q.form.counterpartForm.close();
370
374
  },
371
375
  mode: "create",
372
- values: Y.form.counterpartForm.values,
373
- errors: Y.form.counterpartForm.errors,
374
- stateOptions: Y.form.stateOptions,
375
- taxIdField: o(Y.form.counterpartForm.values.entityType, "customer", x),
376
- inProgress: Y.form.counterpartForm.isSubmitting || Y.actionsSuspended,
377
- onChange: (e) => Y.form.counterpartForm.setValues((t) => ({
376
+ values: q.form.counterpartForm.values,
377
+ errors: q.form.counterpartForm.errors,
378
+ stateOptions: q.form.stateOptions,
379
+ taxIdField: o(q.form.counterpartForm.values.entityType, "customer", x),
380
+ inProgress: q.form.counterpartForm.isSubmitting || q.actionsSuspended,
381
+ onChange: (e) => q.form.counterpartForm.setValues((t) => ({
378
382
  ...t,
379
383
  ...e
380
384
  })),
381
- onAddressChange: (e) => Y.form.counterpartForm.setValues((t) => ({
385
+ onAddressChange: (e) => q.form.counterpartForm.setValues((t) => ({
382
386
  ...t,
383
387
  address: {
384
388
  ...t.address,
385
389
  ...e
386
390
  }
387
391
  })),
388
- onSubmit: Y.form.counterpartForm.submit,
389
- onCancel: Y.form.counterpartForm.close,
392
+ onSubmit: q.form.counterpartForm.submit,
393
+ onCancel: q.form.counterpartForm.close,
390
394
  labels: x
391
395
  }),
392
- /* @__PURE__ */ N(T, {
393
- open: Y.measureUnitsOpen,
394
- onClose: Y.closeMeasureUnits,
395
- suspended: Y.actionsSuspended,
396
- managerLabels: G,
397
- deleteLabels: W,
398
- messageLabels: he
396
+ /* @__PURE__ */ A(S, {
397
+ open: q.measureUnitsOpen,
398
+ onClose: q.closeMeasureUnits,
399
+ suspended: q.actionsSuspended,
400
+ managerLabels: H,
401
+ deleteLabels: V,
402
+ messageLabels: _e
399
403
  })
400
404
  ] });
401
405
  }
402
- function I({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gatewayRouting: a, linkComponent: o, uiFramework: s, errorFallback: c, onError: l, analytics: u, disclosuresAcceptance: d, providerLabels: f, ...p }) {
403
- return /* @__PURE__ */ N(i, {
406
+ function N({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gatewayRouting: a, linkComponent: o, uiFramework: s, errorFallback: c, onError: l, analytics: u, disclosuresAcceptance: d, providerLabels: f, ...p }) {
407
+ return /* @__PURE__ */ A(i, {
404
408
  widgetName: x,
405
409
  baseUrl: e,
406
410
  widgetToken: t,
@@ -414,7 +418,7 @@ function I({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gat
414
418
  analytics: u,
415
419
  disclosuresAcceptance: d,
416
420
  providerLabels: f,
417
- children: /* @__PURE__ */ N(F, { ...p })
421
+ children: /* @__PURE__ */ A(M, { ...p })
418
422
  });
419
423
  }
420
- export { b as InvoicingTab, I as ReceivablesWidget, I as default };
424
+ export { b as InvoicingTab, N as ReceivablesWidget, N as default };