@tesouro/embedded-components-react 0.5.206 → 0.5.207
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.
- package/README.md +1 -1
- package/dist/index.d.ts +40 -0
- package/dist/index.js +1 -1
- package/dist/lib/ReceivablesWidget.d.ts +40 -0
- package/dist/lib/ReceivablesWidget.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index10.js +84 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index2.js +31 -25
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index10.js +22 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index11.js +151 -187
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index12.js +202 -31
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index13.js +32 -145
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index14.js +145 -37
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index15.js +42 -58
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index16.js +58 -96
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index17.js +96 -47
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index18.js +103 -318
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index19.js +47 -70
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index20.js +350 -100
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index21.js +68 -263
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index22.js +115 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index23.js +285 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index9.js +10 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +4 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index23.js +11 -10
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index25.js +234 -78
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index26.js +80 -331
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index27.js +344 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index3.js +14 -1
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/index.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +38 -38
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js +220 -198
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +124 -84
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { Calendar as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
+
import { EmbeddedToaster as t } from "../../../shared/ui/dist/lib/EmbeddedToaster.js";
|
|
7
|
+
import "../../../shared/ui/dist/index.js";
|
|
8
|
+
import { useAnalyticsTrack as n } from "../../../shared/feature/dist/lib/analytics/hooks.js";
|
|
9
|
+
import { WidgetProvider as r } from "../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
|
|
10
|
+
import "../../../shared/feature/dist/index.js";
|
|
11
|
+
import { CounterpartFormSheet as i } from "../../../shared/counterpart-management/ui/dist/index9.js";
|
|
12
|
+
import { CounterpartSelector as a } from "../../../shared/counterpart-management/feature/dist/lib/CounterpartSelector.js";
|
|
13
|
+
import "../../../shared/counterpart-management/feature/dist/index.js";
|
|
14
|
+
import { ReceivablesWidgetAnalyticsEvent as o, WIDGET_NAME as s } from "./index2.js";
|
|
15
|
+
import { PAGE_SIZE_OPTIONS as c } from "./index4.js";
|
|
16
|
+
import { ReceivableActionDialog as l } from "../../ui/dist/index4.js";
|
|
17
|
+
import { ReceivableBankAccountSection as u } from "../../ui/dist/index5.js";
|
|
18
|
+
import { ReceivableBillingSection as d } from "../../ui/dist/index10.js";
|
|
19
|
+
import { ReceivableDetailsSheet as f } from "../../ui/dist/index21.js";
|
|
20
|
+
import { ReceivableFormSheet as p } from "../../ui/dist/index23.js";
|
|
21
|
+
import { ReceivablePaymentDialog as m } from "../../ui/dist/index24.js";
|
|
22
|
+
import { ReceivableRemindersSection as h } from "../../ui/dist/index25.js";
|
|
23
|
+
import { ReceivableSendDialog as g } from "../../ui/dist/index26.js";
|
|
24
|
+
import { ReceivablesScreen as _ } from "../../ui/dist/index27.js";
|
|
25
|
+
import "../../ui/dist/index.js";
|
|
26
|
+
import { ReceivableAttachmentsSection as v } from "./index5.js";
|
|
27
|
+
import { MeasureUnitsManagerContainer as y } from "../../../shared/product-catalog/feature/dist/lib/MeasureUnitsManagerContainer.js";
|
|
28
|
+
import { ProductSelector as b } from "../../../shared/product-catalog/feature/dist/lib/ProductSelector.js";
|
|
29
|
+
import "../../../shared/product-catalog/feature/dist/index.js";
|
|
30
|
+
import { useReceivablesWidget as x } from "./index22.js";
|
|
31
|
+
import { useEffect as S, useId as C, useState as w } from "react";
|
|
32
|
+
import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
|
|
33
|
+
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index23.js
|
|
34
|
+
function O({ counterpartFormLabels: r, counterpartMessageLabels: s, defaultTab: O, detailsLabels: k, embeddedBankName: A, enabledTabs: j, formLabels: M, measureUnitDeleteLabels: N, measureUnitsLabels: P, messageLabels: F, onReceivableCreated: I, onReceivableOpened: L, onTemplateSettingsClick: R, pageSizeOptions: z = c, paymentLabels: B, productMessageLabels: V, screenLabels: H, sendLabels: U, actionLabels: W }) {
|
|
35
|
+
let G = n();
|
|
36
|
+
S(() => {
|
|
37
|
+
G(o.Mounted);
|
|
38
|
+
}, [G]);
|
|
39
|
+
let K = x({
|
|
40
|
+
counterpartMessageLabels: s,
|
|
41
|
+
defaultTab: O,
|
|
42
|
+
embeddedBankName: A,
|
|
43
|
+
enabledTabs: j,
|
|
44
|
+
messageLabels: F,
|
|
45
|
+
onReceivableCreated: I,
|
|
46
|
+
onReceivableOpened: L
|
|
47
|
+
}), [q, J] = w(!1), Y = C(), X = C(), Z = C();
|
|
48
|
+
return /* @__PURE__ */ D(T, { children: [
|
|
49
|
+
/* @__PURE__ */ E(t, {}),
|
|
50
|
+
/* @__PURE__ */ E(_, {
|
|
51
|
+
rows: K.table.rows,
|
|
52
|
+
activeTab: K.activeTab,
|
|
53
|
+
enabledTabs: K.enabledTabs,
|
|
54
|
+
onTabChange: K.setActiveTab,
|
|
55
|
+
isLoading: K.table.isLoading,
|
|
56
|
+
isError: K.table.isError,
|
|
57
|
+
sorting: K.table.sorting,
|
|
58
|
+
onSortingChange: K.table.onSortingChange,
|
|
59
|
+
pageSize: K.table.pageSize,
|
|
60
|
+
onPageSizeChange: K.table.onPageSizeChange,
|
|
61
|
+
pageSizeOptions: z,
|
|
62
|
+
hasNextPage: K.table.hasNextPage,
|
|
63
|
+
hasPrevPage: K.table.hasPrevPage,
|
|
64
|
+
onNextPage: K.table.onNextPage,
|
|
65
|
+
onPrevPage: K.table.onPrevPage,
|
|
66
|
+
searchValue: K.table.searchValue,
|
|
67
|
+
onSearchChange: K.table.onSearchChange,
|
|
68
|
+
statusFilter: K.table.statusFilter,
|
|
69
|
+
statusOptions: K.table.statusOptions,
|
|
70
|
+
onStatusFilterChange: K.table.onStatusFilterChange,
|
|
71
|
+
isFiltering: K.table.isFiltering,
|
|
72
|
+
onCreateClick: K.openCreate,
|
|
73
|
+
onTemplateSettingsClick: R,
|
|
74
|
+
onRowClick: K.handleRowClick,
|
|
75
|
+
onActionClick: K.handleActionClick,
|
|
76
|
+
onRetry: K.table.onRetry,
|
|
77
|
+
labels: H
|
|
78
|
+
}),
|
|
79
|
+
/* @__PURE__ */ E(p, {
|
|
80
|
+
open: K.form.open,
|
|
81
|
+
onOpenChange: (e) => {
|
|
82
|
+
e || K.form.close();
|
|
83
|
+
},
|
|
84
|
+
mode: K.form.mode,
|
|
85
|
+
values: K.form.sheetValues,
|
|
86
|
+
errors: K.form.errors,
|
|
87
|
+
currencyOptions: K.form.currencyOptions,
|
|
88
|
+
unitOptions: K.form.lineItemUnitOptions,
|
|
89
|
+
currencySymbol: K.form.currencySymbol,
|
|
90
|
+
lineItemControls: K.form.lineItemControls,
|
|
91
|
+
autoFocusLineItemId: K.form.autoFocusLineItemId,
|
|
92
|
+
lineItemsLoading: K.form.lineItemsLoading,
|
|
93
|
+
inProgress: K.form.isSubmitting,
|
|
94
|
+
customerSelector: /* @__PURE__ */ E(a, {
|
|
95
|
+
mode: "customer",
|
|
96
|
+
value: K.form.values.customerId || void 0,
|
|
97
|
+
onValueChange: (e) => K.form.updateValues({ customerId: e }),
|
|
98
|
+
onCreateClick: K.form.openCounterpartCreate
|
|
99
|
+
}),
|
|
100
|
+
renderProductSelector: (e, t) => /* @__PURE__ */ E(b, {
|
|
101
|
+
...t,
|
|
102
|
+
inputValue: e.name,
|
|
103
|
+
selectedProductId: K.form.values.lineItems.find((t) => t.id === e.id)?.productId || void 0,
|
|
104
|
+
currency: K.form.values.currency,
|
|
105
|
+
maxLength: 100,
|
|
106
|
+
onInputValueChange: (t) => K.form.updateLineItem(e.id, { name: t }),
|
|
107
|
+
onProductSelect: (t) => K.form.selectProduct(e.id, t)
|
|
108
|
+
}),
|
|
109
|
+
onChange: K.form.updateValues,
|
|
110
|
+
onLineItemChange: K.form.updateLineItem,
|
|
111
|
+
onLineItemCommit: K.form.commitLineItem,
|
|
112
|
+
onLineItemQuantityStep: K.form.stepLineItem,
|
|
113
|
+
onTaxRateCommit: K.form.commitTaxRate,
|
|
114
|
+
onManageUnits: () => J(!0),
|
|
115
|
+
onAddLineItem: K.form.addLineItem,
|
|
116
|
+
onRemoveLineItem: K.form.removeLineItem,
|
|
117
|
+
showDueDateField: K.form.showDueDateField,
|
|
118
|
+
billingSection: K.form.showBillingSection && /* @__PURE__ */ E(d, {
|
|
119
|
+
idPrefix: Y,
|
|
120
|
+
paymentTerms: K.form.paymentTerms.view,
|
|
121
|
+
paymentTermsError: K.form.errors.paymentTermsId,
|
|
122
|
+
disabled: K.form.isSubmitting,
|
|
123
|
+
onPaymentTermsChange: K.form.paymentTerms.select,
|
|
124
|
+
onCustomDatePickerOpenChange: K.form.paymentTerms.changeCustomDatePickerOpen,
|
|
125
|
+
customDateCalendar: /* @__PURE__ */ E(e, {
|
|
126
|
+
mode: "single",
|
|
127
|
+
captionLayout: "dropdown",
|
|
128
|
+
...K.form.paymentTerms.calendar,
|
|
129
|
+
onSelect: K.form.paymentTerms.selectCustomDate
|
|
130
|
+
}),
|
|
131
|
+
labels: M
|
|
132
|
+
}),
|
|
133
|
+
remindersSection: K.form.reminders.view && /* @__PURE__ */ E(h, {
|
|
134
|
+
idPrefix: Z,
|
|
135
|
+
view: K.form.reminders.view,
|
|
136
|
+
onToggle: K.form.reminders.toggle,
|
|
137
|
+
onPaymentReminderSelect: K.form.reminders.selectPaymentReminder,
|
|
138
|
+
onOverdueReminderSelect: K.form.reminders.selectOverdueReminder,
|
|
139
|
+
onBeforeDueInputChange: K.form.reminders.changeBeforeDueInput,
|
|
140
|
+
onBeforeDueSave: K.form.reminders.saveBeforeDue,
|
|
141
|
+
onOverdueTermChange: K.form.reminders.changeOverdueTerm,
|
|
142
|
+
onOverdueAddTerm: K.form.reminders.addOverdueTerm,
|
|
143
|
+
onOverdueClear: K.form.reminders.clearOverdueTerms,
|
|
144
|
+
onOverdueSave: K.form.reminders.saveOverdue,
|
|
145
|
+
labels: M
|
|
146
|
+
}),
|
|
147
|
+
bankAccountSection: /* @__PURE__ */ E(u, {
|
|
148
|
+
idPrefix: X,
|
|
149
|
+
view: K.form.bankAccount.view,
|
|
150
|
+
disabled: K.form.isSubmitting,
|
|
151
|
+
onAccountSelect: K.form.bankAccount.selectAccount,
|
|
152
|
+
onAddAccountClick: K.form.bankAccount.openAddAccount,
|
|
153
|
+
onFormChange: K.form.bankAccount.updateAccountForm,
|
|
154
|
+
onFormSave: K.form.bankAccount.saveAccount,
|
|
155
|
+
onFormCancel: K.form.bankAccount.cancelAddAccount,
|
|
156
|
+
labels: M
|
|
157
|
+
}),
|
|
158
|
+
attachmentsSection: K.form.attachmentsView && /* @__PURE__ */ E(v, {
|
|
159
|
+
view: K.form.attachmentsView,
|
|
160
|
+
disabled: K.form.isSubmitting,
|
|
161
|
+
onFilesSelect: K.form.selectAttachmentFiles,
|
|
162
|
+
onIncludeInEmailChange: K.form.setAttachmentIncludeInEmail,
|
|
163
|
+
onRemove: K.form.removeAttachment,
|
|
164
|
+
labels: M
|
|
165
|
+
}),
|
|
166
|
+
cancelDisabled: K.form.attachmentsUploading,
|
|
167
|
+
saveDisabled: K.form.saveDisabled,
|
|
168
|
+
onSubmit: K.form.submit,
|
|
169
|
+
onCancel: K.form.close,
|
|
170
|
+
labels: M
|
|
171
|
+
}),
|
|
172
|
+
/* @__PURE__ */ E(f, {
|
|
173
|
+
open: K.detailsOpen,
|
|
174
|
+
onOpenChange: (e) => {
|
|
175
|
+
e || K.closeDetails();
|
|
176
|
+
},
|
|
177
|
+
details: K.details.detailsView,
|
|
178
|
+
isLoading: K.details.isLoading,
|
|
179
|
+
isError: K.details.isError,
|
|
180
|
+
onActionClick: K.handleDetailsActionClick,
|
|
181
|
+
onClose: K.closeDetails,
|
|
182
|
+
labels: k
|
|
183
|
+
}),
|
|
184
|
+
/* @__PURE__ */ E(g, {
|
|
185
|
+
open: K.actions.sendOpen,
|
|
186
|
+
onOpenChange: (e) => {
|
|
187
|
+
e || K.actions.closeSend();
|
|
188
|
+
},
|
|
189
|
+
values: K.actions.sendValues,
|
|
190
|
+
errors: K.actions.sendErrors,
|
|
191
|
+
inProgress: K.actions.sendInProgress,
|
|
192
|
+
onChange: (e) => K.actions.setSendValues((t) => ({
|
|
193
|
+
...t,
|
|
194
|
+
...e
|
|
195
|
+
})),
|
|
196
|
+
onSubmit: K.actions.submitSend,
|
|
197
|
+
onCancel: K.actions.closeSend,
|
|
198
|
+
labels: U
|
|
199
|
+
}),
|
|
200
|
+
/* @__PURE__ */ E(m, {
|
|
201
|
+
open: K.actions.paymentOpen,
|
|
202
|
+
onOpenChange: (e) => {
|
|
203
|
+
e || K.actions.closePayment();
|
|
204
|
+
},
|
|
205
|
+
values: K.actions.paymentValues,
|
|
206
|
+
errors: K.actions.paymentErrors,
|
|
207
|
+
inProgress: K.actions.paymentInProgress,
|
|
208
|
+
onChange: (e) => K.actions.setPaymentValues((t) => ({
|
|
209
|
+
...t,
|
|
210
|
+
...e
|
|
211
|
+
})),
|
|
212
|
+
onSubmit: K.actions.submitPayment,
|
|
213
|
+
onCancel: K.actions.closePayment,
|
|
214
|
+
labels: B
|
|
215
|
+
}),
|
|
216
|
+
K.actions.actionDialog && /* @__PURE__ */ E(l, {
|
|
217
|
+
open: !!K.actions.actionTarget,
|
|
218
|
+
onOpenChange: (e) => {
|
|
219
|
+
e || K.actions.closeAction();
|
|
220
|
+
},
|
|
221
|
+
title: K.actions.actionDialog.title,
|
|
222
|
+
description: K.actions.actionDialog.description,
|
|
223
|
+
confirmLabel: K.actions.actionDialog.confirmLabel,
|
|
224
|
+
destructive: K.actions.actionDialog.destructive,
|
|
225
|
+
error: K.actions.actionError,
|
|
226
|
+
inProgress: K.actions.actionInProgress,
|
|
227
|
+
onConfirm: K.actions.confirmAction,
|
|
228
|
+
onCancel: K.actions.closeAction,
|
|
229
|
+
labels: W
|
|
230
|
+
}),
|
|
231
|
+
/* @__PURE__ */ E(i, {
|
|
232
|
+
open: K.form.counterpartView === "create",
|
|
233
|
+
onOpenChange: (e) => {
|
|
234
|
+
e || K.form.counterpartForm.close();
|
|
235
|
+
},
|
|
236
|
+
mode: "create",
|
|
237
|
+
values: K.form.counterpartForm.values,
|
|
238
|
+
errors: K.form.counterpartForm.errors,
|
|
239
|
+
stateOptions: K.form.stateOptions,
|
|
240
|
+
inProgress: K.form.counterpartForm.isSubmitting,
|
|
241
|
+
onChange: (e) => K.form.counterpartForm.setValues((t) => ({
|
|
242
|
+
...t,
|
|
243
|
+
...e
|
|
244
|
+
})),
|
|
245
|
+
onAddressChange: (e) => K.form.counterpartForm.setValues((t) => ({
|
|
246
|
+
...t,
|
|
247
|
+
address: {
|
|
248
|
+
...t.address,
|
|
249
|
+
...e
|
|
250
|
+
}
|
|
251
|
+
})),
|
|
252
|
+
onSubmit: K.form.counterpartForm.submit,
|
|
253
|
+
onCancel: K.form.counterpartForm.close,
|
|
254
|
+
labels: r
|
|
255
|
+
}),
|
|
256
|
+
/* @__PURE__ */ E(y, {
|
|
257
|
+
open: q,
|
|
258
|
+
onClose: () => J(!1),
|
|
259
|
+
managerLabels: P,
|
|
260
|
+
deleteLabels: N,
|
|
261
|
+
messageLabels: V
|
|
262
|
+
})
|
|
263
|
+
] });
|
|
264
|
+
}
|
|
265
|
+
function k({ baseUrl: e, widgetToken: t, organizationId: n, configClient: i, gatewayRouting: a, linkComponent: o, implementation: c, uiFramework: l, errorFallback: u, onError: d, analytics: f, disclosuresAcceptance: p, providerLabels: m, ...h }) {
|
|
266
|
+
return /* @__PURE__ */ E(r, {
|
|
267
|
+
widgetName: s,
|
|
268
|
+
baseUrl: e,
|
|
269
|
+
widgetToken: t,
|
|
270
|
+
organizationId: n,
|
|
271
|
+
configClient: i,
|
|
272
|
+
gatewayRouting: a,
|
|
273
|
+
linkComponent: o,
|
|
274
|
+
implementation: c,
|
|
275
|
+
uiFramework: l,
|
|
276
|
+
errorFallback: u,
|
|
277
|
+
onError: d,
|
|
278
|
+
analytics: f,
|
|
279
|
+
disclosuresAcceptance: p,
|
|
280
|
+
providerLabels: m,
|
|
281
|
+
children: /* @__PURE__ */ E(O, { ...h })
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
//#endregion
|
|
285
|
+
export { k as ReceivablesWidget, k as default };
|
|
@@ -31,6 +31,8 @@ function _() {
|
|
|
31
31
|
lineItems: [n()],
|
|
32
32
|
bankAccountId: "",
|
|
33
33
|
bankAccountType: "",
|
|
34
|
+
paymentReminderId: "",
|
|
35
|
+
overdueReminderId: "",
|
|
34
36
|
attachments: []
|
|
35
37
|
};
|
|
36
38
|
}
|
|
@@ -287,12 +289,14 @@ function I({ values: e, billingAddressId: t, unitNamesById: n }) {
|
|
|
287
289
|
} : {
|
|
288
290
|
...o,
|
|
289
291
|
...f(e),
|
|
292
|
+
payment_reminder_id: e.paymentReminderId || void 0,
|
|
293
|
+
overdue_reminder_id: e.overdueReminderId || void 0,
|
|
290
294
|
attachments: u(e.attachments),
|
|
291
295
|
type: "invoice"
|
|
292
296
|
};
|
|
293
297
|
}
|
|
294
298
|
function L(e, t) {
|
|
295
|
-
let r = e.type === "quote" ? "quote" : "invoice", i = e.line_items.map((n) => o({
|
|
299
|
+
let r = e.type === "quote" ? "quote" : "invoice", i = e.type === "invoice" ? e : void 0, a = e.line_items.map((n) => o({
|
|
296
300
|
lineItem: n,
|
|
297
301
|
currency: e.currency,
|
|
298
302
|
units: t
|
|
@@ -308,9 +312,11 @@ function L(e, t) {
|
|
|
308
312
|
closingNote: e.footer ?? "",
|
|
309
313
|
...e.type === "invoice" ? m(e.payment_terms) : {},
|
|
310
314
|
taxRate: c(e.line_items),
|
|
311
|
-
lineItems:
|
|
315
|
+
lineItems: a.length > 0 ? a : [n(e.currency)],
|
|
312
316
|
bankAccountId: e.bank_account_id ?? "",
|
|
313
317
|
bankAccountType: R(e.bank_account_type),
|
|
318
|
+
paymentReminderId: i?.payment_reminder_id ?? "",
|
|
319
|
+
overdueReminderId: i?.overdue_reminder_id ?? "",
|
|
314
320
|
attachments: d(e)
|
|
315
321
|
};
|
|
316
322
|
}
|
|
@@ -336,6 +342,8 @@ function z({ values: e, billingAddressId: t, lineItemChanges: n }) {
|
|
|
336
342
|
...r,
|
|
337
343
|
...n ? { line_items: n } : {},
|
|
338
344
|
...p(e),
|
|
345
|
+
payment_reminder_id: e.paymentReminderId || null,
|
|
346
|
+
overdue_reminder_id: e.overdueReminderId || null,
|
|
339
347
|
attachments: u(e.attachments) ?? null
|
|
340
348
|
} };
|
|
341
349
|
}
|
|
@@ -12,6 +12,7 @@ import "./index20.js";
|
|
|
12
12
|
import { ReceivableDetailsSheet as o } from "./index21.js";
|
|
13
13
|
import { ReceivableFormSheet as s } from "./index23.js";
|
|
14
14
|
import { ReceivablePaymentDialog as c } from "./index24.js";
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
|
|
15
|
+
import { ReceivableRemindersSection as l } from "./index25.js";
|
|
16
|
+
import { ReceivableSendDialog as u } from "./index26.js";
|
|
17
|
+
import { ReceivablesScreen as d } from "./index27.js";
|
|
18
|
+
export { r as RECEIVABLE_PAYMENT_TERMS_CUSTOM_DATE, i as RECEIVABLE_PAYMENT_TERMS_RECEIPT_DUE, e as ReceivableActionDialog, n as ReceivableAttachmentsSection, t as ReceivableBankAccountSection, a as ReceivableBillingSection, o as ReceivableDetailsSheet, s as ReceivableFormSheet, c as ReceivablePaymentDialog, l as ReceivableRemindersSection, u as ReceivableSendDialog, d as ReceivablesScreen };
|
|
@@ -130,11 +130,11 @@ function te({ formId: e, lineItem: t, errors: i, controls: a, focusOnMount: o, c
|
|
|
130
130
|
]
|
|
131
131
|
});
|
|
132
132
|
}
|
|
133
|
-
function R({ open: r, onOpenChange: M, mode: P = "create", values: F, errors: I, currencyOptions: R, unitOptions: ne, currencySymbol: re, lineItemControls: z, autoFocusLineItemId: B, lineItemsLoading: V, inProgress: H, customerSelector: U, renderProductSelector: W, onChange: G, onLineItemChange: K, onLineItemCommit: q, onLineItemQuantityStep: J, onTaxRateCommit: Y, onManageUnits: ie, onAddLineItem: ae, onRemoveLineItem: oe, showDueDateField: X, billingSection: se,
|
|
133
|
+
function R({ open: r, onOpenChange: M, mode: P = "create", values: F, errors: I, currencyOptions: R, unitOptions: ne, currencySymbol: re, lineItemControls: z, autoFocusLineItemId: B, lineItemsLoading: V, inProgress: H, customerSelector: U, renderProductSelector: W, onChange: G, onLineItemChange: K, onLineItemCommit: q, onLineItemQuantityStep: J, onTaxRateCommit: Y, onManageUnits: ie, onAddLineItem: ae, onRemoveLineItem: oe, showDueDateField: X, billingSection: se, remindersSection: ce, bankAccountSection: le, attachmentsSection: ue, cancelDisabled: de, saveDisabled: fe, onSubmit: pe, onCancel: me, labels: he }) {
|
|
134
134
|
let Z = {
|
|
135
135
|
...O,
|
|
136
|
-
...
|
|
137
|
-
}, Q = ee(), $ = P === "edit",
|
|
136
|
+
...he
|
|
137
|
+
}, Q = ee(), $ = P === "edit", ge = D("ttw:grid ttw:gap-4", $ && X ? "ttw:grid-cols-3" : "ttw:grid-cols-2");
|
|
138
138
|
return /* @__PURE__ */ A(y, {
|
|
139
139
|
open: r,
|
|
140
140
|
onOpenChange: M,
|
|
@@ -148,7 +148,7 @@ function R({ open: r, onOpenChange: M, mode: P = "create", values: F, errors: I,
|
|
|
148
148
|
/* @__PURE__ */ A("form", {
|
|
149
149
|
id: Q,
|
|
150
150
|
onSubmit: (e) => {
|
|
151
|
-
e.preventDefault(), e.stopPropagation(),
|
|
151
|
+
e.preventDefault(), e.stopPropagation(), pe();
|
|
152
152
|
},
|
|
153
153
|
children: /* @__PURE__ */ j("div", {
|
|
154
154
|
className: "ttw:flex ttw:flex-col ttw:gap-5 ttw:px-6 ttw:pb-6",
|
|
@@ -203,7 +203,7 @@ function R({ open: r, onOpenChange: M, mode: P = "create", values: F, errors: I,
|
|
|
203
203
|
]
|
|
204
204
|
}),
|
|
205
205
|
/* @__PURE__ */ j("div", {
|
|
206
|
-
className:
|
|
206
|
+
className: ge,
|
|
207
207
|
children: [
|
|
208
208
|
/* @__PURE__ */ j("div", {
|
|
209
209
|
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
@@ -261,6 +261,7 @@ function R({ open: r, onOpenChange: M, mode: P = "create", values: F, errors: I,
|
|
|
261
261
|
]
|
|
262
262
|
}),
|
|
263
263
|
se,
|
|
264
|
+
ce,
|
|
264
265
|
/* @__PURE__ */ j("div", {
|
|
265
266
|
className: "ttw:flex ttw:flex-col ttw:gap-2.5 ttw:rounded-xl ttw:border ttw:border-border ttw:p-6",
|
|
266
267
|
children: [
|
|
@@ -361,7 +362,7 @@ function R({ open: r, onOpenChange: M, mode: P = "create", values: F, errors: I,
|
|
|
361
362
|
}) })
|
|
362
363
|
]
|
|
363
364
|
}),
|
|
364
|
-
|
|
365
|
+
le,
|
|
365
366
|
/* @__PURE__ */ A(k, {
|
|
366
367
|
idPrefix: Q,
|
|
367
368
|
openingNote: F.openingNote,
|
|
@@ -373,7 +374,7 @@ function R({ open: r, onOpenChange: M, mode: P = "create", values: F, errors: I,
|
|
|
373
374
|
onClosingNoteChange: (e) => G({ closingNote: e }),
|
|
374
375
|
labels: Z
|
|
375
376
|
}),
|
|
376
|
-
|
|
377
|
+
ue
|
|
377
378
|
]
|
|
378
379
|
})
|
|
379
380
|
}),
|
|
@@ -382,14 +383,14 @@ function R({ open: r, onOpenChange: M, mode: P = "create", values: F, errors: I,
|
|
|
382
383
|
children: [/* @__PURE__ */ A(n, {
|
|
383
384
|
type: "button",
|
|
384
385
|
variant: "ghost",
|
|
385
|
-
disabled:
|
|
386
|
-
onClick:
|
|
386
|
+
disabled: de,
|
|
387
|
+
onClick: me,
|
|
387
388
|
children: Z.cancelButton
|
|
388
389
|
}), /* @__PURE__ */ A(n, {
|
|
389
390
|
type: "submit",
|
|
390
391
|
form: Q,
|
|
391
392
|
loading: H,
|
|
392
|
-
disabled:
|
|
393
|
+
disabled: fe,
|
|
393
394
|
children: P === "edit" ? Z.updateButton : Z.createButton
|
|
394
395
|
})]
|
|
395
396
|
}) })
|