@tesouro/embedded-components-react 0.5.205 → 0.5.206
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/dist/index.d.ts +11 -4
- package/dist/index.js +1 -1
- package/dist/lib/ReceivablesWidget.d.ts +11 -4
- package/dist/lib/ReceivablesWidget.js +1 -1
- 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 +88 -193
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index11.js +184 -31
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index12.js +32 -145
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index13.js +150 -58
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index14.js +35 -89
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index15.js +53 -42
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index16.js +82 -299
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index17.js +47 -70
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index18.js +321 -100
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index19.js +68 -246
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index20.js +115 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index21.js +270 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index5.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index8.js +93 -407
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index9.js +422 -86
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +16 -12
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index10.js +92 -16
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index11.js +3 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index12.js +24 -4
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index13.js +0 -10
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index15.js +3 -264
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index16.js +16 -70
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index17.js +1 -424
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index18.js +4 -106
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index19.js +12 -93
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index2.js +5 -179
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index20.js +1 -344
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index21.js +264 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index22.js +72 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index23.js +401 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index24.js +106 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index25.js +93 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index26.js +344 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index3.js +182 -32
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index4.js +29 -202
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index5.js +183 -137
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index6.js +157 -20
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index7.js +16 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index8.js +25 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index9.js +4 -3
- 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,270 @@
|
|
|
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 { ReceivableSendDialog as h } from "../../ui/dist/index25.js";
|
|
23
|
+
import { ReceivablesScreen as g } from "../../ui/dist/index26.js";
|
|
24
|
+
import "../../ui/dist/index.js";
|
|
25
|
+
import { ReceivableAttachmentsSection as _ } from "./index5.js";
|
|
26
|
+
import { MeasureUnitsManagerContainer as v } from "../../../shared/product-catalog/feature/dist/lib/MeasureUnitsManagerContainer.js";
|
|
27
|
+
import { ProductSelector as y } from "../../../shared/product-catalog/feature/dist/lib/ProductSelector.js";
|
|
28
|
+
import "../../../shared/product-catalog/feature/dist/index.js";
|
|
29
|
+
import { useReceivablesWidget as b } from "./index20.js";
|
|
30
|
+
import { useEffect as x, useId as S, useState as C } from "react";
|
|
31
|
+
import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
32
|
+
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index21.js
|
|
33
|
+
function D({ counterpartFormLabels: r, counterpartMessageLabels: s, defaultTab: D, detailsLabels: O, embeddedBankName: k, enabledTabs: A, formLabels: j, measureUnitDeleteLabels: M, measureUnitsLabels: N, messageLabels: P, onReceivableCreated: F, onReceivableOpened: I, onTemplateSettingsClick: L, pageSizeOptions: R = c, paymentLabels: z, productMessageLabels: B, screenLabels: V, sendLabels: H, actionLabels: U }) {
|
|
34
|
+
let W = n();
|
|
35
|
+
x(() => {
|
|
36
|
+
W(o.Mounted);
|
|
37
|
+
}, [W]);
|
|
38
|
+
let G = b({
|
|
39
|
+
counterpartMessageLabels: s,
|
|
40
|
+
defaultTab: D,
|
|
41
|
+
embeddedBankName: k,
|
|
42
|
+
enabledTabs: A,
|
|
43
|
+
messageLabels: P,
|
|
44
|
+
onReceivableCreated: F,
|
|
45
|
+
onReceivableOpened: I
|
|
46
|
+
}), [K, q] = C(!1), J = S(), Y = S();
|
|
47
|
+
return /* @__PURE__ */ E(w, { children: [
|
|
48
|
+
/* @__PURE__ */ T(t, {}),
|
|
49
|
+
/* @__PURE__ */ T(g, {
|
|
50
|
+
rows: G.table.rows,
|
|
51
|
+
activeTab: G.activeTab,
|
|
52
|
+
enabledTabs: G.enabledTabs,
|
|
53
|
+
onTabChange: G.setActiveTab,
|
|
54
|
+
isLoading: G.table.isLoading,
|
|
55
|
+
isError: G.table.isError,
|
|
56
|
+
sorting: G.table.sorting,
|
|
57
|
+
onSortingChange: G.table.onSortingChange,
|
|
58
|
+
pageSize: G.table.pageSize,
|
|
59
|
+
onPageSizeChange: G.table.onPageSizeChange,
|
|
60
|
+
pageSizeOptions: R,
|
|
61
|
+
hasNextPage: G.table.hasNextPage,
|
|
62
|
+
hasPrevPage: G.table.hasPrevPage,
|
|
63
|
+
onNextPage: G.table.onNextPage,
|
|
64
|
+
onPrevPage: G.table.onPrevPage,
|
|
65
|
+
searchValue: G.table.searchValue,
|
|
66
|
+
onSearchChange: G.table.onSearchChange,
|
|
67
|
+
statusFilter: G.table.statusFilter,
|
|
68
|
+
statusOptions: G.table.statusOptions,
|
|
69
|
+
onStatusFilterChange: G.table.onStatusFilterChange,
|
|
70
|
+
isFiltering: G.table.isFiltering,
|
|
71
|
+
onCreateClick: G.openCreate,
|
|
72
|
+
onTemplateSettingsClick: L,
|
|
73
|
+
onRowClick: G.handleRowClick,
|
|
74
|
+
onActionClick: G.handleActionClick,
|
|
75
|
+
onRetry: G.table.onRetry,
|
|
76
|
+
labels: V
|
|
77
|
+
}),
|
|
78
|
+
/* @__PURE__ */ T(p, {
|
|
79
|
+
open: G.form.open,
|
|
80
|
+
onOpenChange: (e) => {
|
|
81
|
+
e || G.form.close();
|
|
82
|
+
},
|
|
83
|
+
mode: G.form.mode,
|
|
84
|
+
values: G.form.sheetValues,
|
|
85
|
+
errors: G.form.errors,
|
|
86
|
+
currencyOptions: G.form.currencyOptions,
|
|
87
|
+
unitOptions: G.form.lineItemUnitOptions,
|
|
88
|
+
currencySymbol: G.form.currencySymbol,
|
|
89
|
+
lineItemControls: G.form.lineItemControls,
|
|
90
|
+
autoFocusLineItemId: G.form.autoFocusLineItemId,
|
|
91
|
+
lineItemsLoading: G.form.lineItemsLoading,
|
|
92
|
+
inProgress: G.form.isSubmitting,
|
|
93
|
+
customerSelector: /* @__PURE__ */ T(a, {
|
|
94
|
+
mode: "customer",
|
|
95
|
+
value: G.form.values.customerId || void 0,
|
|
96
|
+
onValueChange: (e) => G.form.updateValues({ customerId: e }),
|
|
97
|
+
onCreateClick: G.form.openCounterpartCreate
|
|
98
|
+
}),
|
|
99
|
+
renderProductSelector: (e, t) => /* @__PURE__ */ T(y, {
|
|
100
|
+
...t,
|
|
101
|
+
inputValue: e.name,
|
|
102
|
+
selectedProductId: G.form.values.lineItems.find((t) => t.id === e.id)?.productId || void 0,
|
|
103
|
+
currency: G.form.values.currency,
|
|
104
|
+
maxLength: 100,
|
|
105
|
+
onInputValueChange: (t) => G.form.updateLineItem(e.id, { name: t }),
|
|
106
|
+
onProductSelect: (t) => G.form.selectProduct(e.id, t)
|
|
107
|
+
}),
|
|
108
|
+
onChange: G.form.updateValues,
|
|
109
|
+
onLineItemChange: G.form.updateLineItem,
|
|
110
|
+
onLineItemCommit: G.form.commitLineItem,
|
|
111
|
+
onLineItemQuantityStep: G.form.stepLineItem,
|
|
112
|
+
onTaxRateCommit: G.form.commitTaxRate,
|
|
113
|
+
onManageUnits: () => q(!0),
|
|
114
|
+
onAddLineItem: G.form.addLineItem,
|
|
115
|
+
onRemoveLineItem: G.form.removeLineItem,
|
|
116
|
+
showDueDateField: G.form.showDueDateField,
|
|
117
|
+
billingSection: G.form.showBillingSection && /* @__PURE__ */ T(d, {
|
|
118
|
+
idPrefix: J,
|
|
119
|
+
paymentTerms: G.form.paymentTerms.view,
|
|
120
|
+
paymentTermsError: G.form.errors.paymentTermsId,
|
|
121
|
+
disabled: G.form.isSubmitting,
|
|
122
|
+
onPaymentTermsChange: G.form.paymentTerms.select,
|
|
123
|
+
onCustomDatePickerOpenChange: G.form.paymentTerms.changeCustomDatePickerOpen,
|
|
124
|
+
customDateCalendar: /* @__PURE__ */ T(e, {
|
|
125
|
+
mode: "single",
|
|
126
|
+
captionLayout: "dropdown",
|
|
127
|
+
...G.form.paymentTerms.calendar,
|
|
128
|
+
onSelect: G.form.paymentTerms.selectCustomDate
|
|
129
|
+
}),
|
|
130
|
+
labels: j
|
|
131
|
+
}),
|
|
132
|
+
bankAccountSection: /* @__PURE__ */ T(u, {
|
|
133
|
+
idPrefix: Y,
|
|
134
|
+
view: G.form.bankAccount.view,
|
|
135
|
+
disabled: G.form.isSubmitting,
|
|
136
|
+
onAccountSelect: G.form.bankAccount.selectAccount,
|
|
137
|
+
onAddAccountClick: G.form.bankAccount.openAddAccount,
|
|
138
|
+
onFormChange: G.form.bankAccount.updateAccountForm,
|
|
139
|
+
onFormSave: G.form.bankAccount.saveAccount,
|
|
140
|
+
onFormCancel: G.form.bankAccount.cancelAddAccount,
|
|
141
|
+
labels: j
|
|
142
|
+
}),
|
|
143
|
+
attachmentsSection: G.form.attachmentsView && /* @__PURE__ */ T(_, {
|
|
144
|
+
view: G.form.attachmentsView,
|
|
145
|
+
disabled: G.form.isSubmitting,
|
|
146
|
+
onFilesSelect: G.form.selectAttachmentFiles,
|
|
147
|
+
onIncludeInEmailChange: G.form.setAttachmentIncludeInEmail,
|
|
148
|
+
onRemove: G.form.removeAttachment,
|
|
149
|
+
labels: j
|
|
150
|
+
}),
|
|
151
|
+
cancelDisabled: G.form.attachmentsUploading,
|
|
152
|
+
saveDisabled: G.form.saveDisabled,
|
|
153
|
+
onSubmit: G.form.submit,
|
|
154
|
+
onCancel: G.form.close,
|
|
155
|
+
labels: j
|
|
156
|
+
}),
|
|
157
|
+
/* @__PURE__ */ T(f, {
|
|
158
|
+
open: G.detailsOpen,
|
|
159
|
+
onOpenChange: (e) => {
|
|
160
|
+
e || G.closeDetails();
|
|
161
|
+
},
|
|
162
|
+
details: G.details.detailsView,
|
|
163
|
+
isLoading: G.details.isLoading,
|
|
164
|
+
isError: G.details.isError,
|
|
165
|
+
onActionClick: G.handleDetailsActionClick,
|
|
166
|
+
onClose: G.closeDetails,
|
|
167
|
+
labels: O
|
|
168
|
+
}),
|
|
169
|
+
/* @__PURE__ */ T(h, {
|
|
170
|
+
open: G.actions.sendOpen,
|
|
171
|
+
onOpenChange: (e) => {
|
|
172
|
+
e || G.actions.closeSend();
|
|
173
|
+
},
|
|
174
|
+
values: G.actions.sendValues,
|
|
175
|
+
errors: G.actions.sendErrors,
|
|
176
|
+
inProgress: G.actions.sendInProgress,
|
|
177
|
+
onChange: (e) => G.actions.setSendValues((t) => ({
|
|
178
|
+
...t,
|
|
179
|
+
...e
|
|
180
|
+
})),
|
|
181
|
+
onSubmit: G.actions.submitSend,
|
|
182
|
+
onCancel: G.actions.closeSend,
|
|
183
|
+
labels: H
|
|
184
|
+
}),
|
|
185
|
+
/* @__PURE__ */ T(m, {
|
|
186
|
+
open: G.actions.paymentOpen,
|
|
187
|
+
onOpenChange: (e) => {
|
|
188
|
+
e || G.actions.closePayment();
|
|
189
|
+
},
|
|
190
|
+
values: G.actions.paymentValues,
|
|
191
|
+
errors: G.actions.paymentErrors,
|
|
192
|
+
inProgress: G.actions.paymentInProgress,
|
|
193
|
+
onChange: (e) => G.actions.setPaymentValues((t) => ({
|
|
194
|
+
...t,
|
|
195
|
+
...e
|
|
196
|
+
})),
|
|
197
|
+
onSubmit: G.actions.submitPayment,
|
|
198
|
+
onCancel: G.actions.closePayment,
|
|
199
|
+
labels: z
|
|
200
|
+
}),
|
|
201
|
+
G.actions.actionDialog && /* @__PURE__ */ T(l, {
|
|
202
|
+
open: !!G.actions.actionTarget,
|
|
203
|
+
onOpenChange: (e) => {
|
|
204
|
+
e || G.actions.closeAction();
|
|
205
|
+
},
|
|
206
|
+
title: G.actions.actionDialog.title,
|
|
207
|
+
description: G.actions.actionDialog.description,
|
|
208
|
+
confirmLabel: G.actions.actionDialog.confirmLabel,
|
|
209
|
+
destructive: G.actions.actionDialog.destructive,
|
|
210
|
+
error: G.actions.actionError,
|
|
211
|
+
inProgress: G.actions.actionInProgress,
|
|
212
|
+
onConfirm: G.actions.confirmAction,
|
|
213
|
+
onCancel: G.actions.closeAction,
|
|
214
|
+
labels: U
|
|
215
|
+
}),
|
|
216
|
+
/* @__PURE__ */ T(i, {
|
|
217
|
+
open: G.form.counterpartView === "create",
|
|
218
|
+
onOpenChange: (e) => {
|
|
219
|
+
e || G.form.counterpartForm.close();
|
|
220
|
+
},
|
|
221
|
+
mode: "create",
|
|
222
|
+
values: G.form.counterpartForm.values,
|
|
223
|
+
errors: G.form.counterpartForm.errors,
|
|
224
|
+
stateOptions: G.form.stateOptions,
|
|
225
|
+
inProgress: G.form.counterpartForm.isSubmitting,
|
|
226
|
+
onChange: (e) => G.form.counterpartForm.setValues((t) => ({
|
|
227
|
+
...t,
|
|
228
|
+
...e
|
|
229
|
+
})),
|
|
230
|
+
onAddressChange: (e) => G.form.counterpartForm.setValues((t) => ({
|
|
231
|
+
...t,
|
|
232
|
+
address: {
|
|
233
|
+
...t.address,
|
|
234
|
+
...e
|
|
235
|
+
}
|
|
236
|
+
})),
|
|
237
|
+
onSubmit: G.form.counterpartForm.submit,
|
|
238
|
+
onCancel: G.form.counterpartForm.close,
|
|
239
|
+
labels: r
|
|
240
|
+
}),
|
|
241
|
+
/* @__PURE__ */ T(v, {
|
|
242
|
+
open: K,
|
|
243
|
+
onClose: () => q(!1),
|
|
244
|
+
managerLabels: N,
|
|
245
|
+
deleteLabels: M,
|
|
246
|
+
messageLabels: B
|
|
247
|
+
})
|
|
248
|
+
] });
|
|
249
|
+
}
|
|
250
|
+
function O({ 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 }) {
|
|
251
|
+
return /* @__PURE__ */ T(r, {
|
|
252
|
+
widgetName: s,
|
|
253
|
+
baseUrl: e,
|
|
254
|
+
widgetToken: t,
|
|
255
|
+
organizationId: n,
|
|
256
|
+
configClient: i,
|
|
257
|
+
gatewayRouting: a,
|
|
258
|
+
linkComponent: o,
|
|
259
|
+
implementation: c,
|
|
260
|
+
uiFramework: l,
|
|
261
|
+
errorFallback: u,
|
|
262
|
+
onError: d,
|
|
263
|
+
analytics: f,
|
|
264
|
+
disclosuresAcceptance: p,
|
|
265
|
+
providerLabels: m,
|
|
266
|
+
children: /* @__PURE__ */ T(D, { ...h })
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
//#endregion
|
|
270
|
+
export { O as ReceivablesWidget, O as default };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import { ReceivableAttachmentsSection as e } from "../../ui/dist/
|
|
5
|
+
import { ReceivableAttachmentsSection as e } from "../../ui/dist/index6.js";
|
|
6
6
|
import "../../ui/dist/index.js";
|
|
7
7
|
import { useRef as t, useState as n } from "react";
|
|
8
8
|
import { jsx as r } from "react/jsx-runtime";
|