@tesouro/embedded-components-react 0.5.231 → 0.5.233
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 -0
- package/dist/index.css +4 -0
- package/dist/index.d.ts +105 -2
- package/dist/index.js +1 -1
- package/dist/lib/ReceivablesWidget.d.ts +105 -2
- package/dist/lib/ReceivablesWidget.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index.js +11 -10
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index10.js +92 -55
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index11.js +67 -142
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index12.js +186 -17
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index13.js +27 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index3.js +45 -74
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index4.js +68 -53
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index5.js +66 -32
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index6.js +28 -34
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index7.js +24 -166
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index8.js +177 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index9.js +42 -95
- 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/index13.js +36 -33
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index14.js +38 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index16.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index17.js +206 -147
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index18.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index19.js +39 -58
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index20.js +53 -227
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index21.js +216 -287
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index22.js +453 -43
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index23.js +103 -126
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index24.js +122 -146
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index25.js +145 -41
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index26.js +39 -115
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index27.js +113 -90
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index28.js +81 -98
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index29.js +111 -27
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index30.js +26 -633
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index31.js +639 -39
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index32.js +41 -40
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index33.js +35 -74
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index34.js +73 -130
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index35.js +133 -329
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index36.js +345 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +13 -12
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index10.js +15 -12
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index19.js +35 -24
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index21.js +8 -71
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index22.js +70 -17
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index23.js +31 -12
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index24.js +18 -30
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index25.js +12 -301
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index26.js +33 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index27.js +14 -46
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index28.js +23 -67
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index29.js +76 -485
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index30.js +395 -95
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index31.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index32.js +48 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index33.js +72 -4
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index34.js +496 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index35.js +97 -91
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index37.js +2 -236
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index38.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index39.js +1 -249
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index40.js +89 -82
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index41.js +23 -54
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index42.js +223 -340
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index43.js +3 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index44.js +249 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index45.js +93 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index46.js +59 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index47.js +353 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index9.js +18 -1
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +41 -41
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/clientRegistry.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +75 -43
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index36.js +0 -28
package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index35.js
CHANGED
|
@@ -2,339 +2,143 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
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";
|
|
5
|
+
import { useAnalyticsTrack as e } from "../../../shared/feature/dist/lib/analytics/hooks.js";
|
|
10
6
|
import "../../../shared/feature/dist/index.js";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
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 { ReceivableActionsModal as u } from "../../ui/dist/index5.js";
|
|
17
|
-
import { ReceivableActionDialog as d } from "../../ui/dist/index10.js";
|
|
18
|
-
import { ReceivableBankAccountSection as f } from "../../ui/dist/index11.js";
|
|
19
|
-
import { ReceivableBillingSection as p } from "../../ui/dist/index16.js";
|
|
20
|
-
import { ReceivableDetailsPanel as m } from "../../ui/dist/index25.js";
|
|
21
|
-
import { ReceivableFormSheet as h } from "../../ui/dist/index29.js";
|
|
22
|
-
import { ReceivablePaymentDialog as g } from "../../ui/dist/index30.js";
|
|
23
|
-
import { ReceivableRecurrenceEmailDialog as _ } from "../../ui/dist/index35.js";
|
|
24
|
-
import { ReceivableRecurrenceSection as v } from "../../ui/dist/index37.js";
|
|
25
|
-
import { ReceivableRemindersSection as y } from "../../ui/dist/index39.js";
|
|
26
|
-
import { ReceivableSendDialog as b } from "../../ui/dist/index40.js";
|
|
27
|
-
import { ReceivablesScreen as x } from "../../ui/dist/index42.js";
|
|
7
|
+
import { ReceivablesWidgetAnalyticsEvent as t } from "./index2.js";
|
|
8
|
+
import { RECEIVABLE_STATUS_BADGE_LABELS_EN as n } from "../../ui/dist/index9.js";
|
|
28
9
|
import "../../ui/dist/index.js";
|
|
29
|
-
import {
|
|
30
|
-
import { MeasureUnitsManagerContainer as C } from "../../../shared/product-catalog/feature/dist/lib/MeasureUnitsManagerContainer.js";
|
|
31
|
-
import { ProductSelector as w } from "../../../shared/product-catalog/feature/dist/lib/ProductSelector.js";
|
|
10
|
+
import { hasSelectedText as r } from "../../../shared/product-catalog/feature/dist/lib/helpers.js";
|
|
32
11
|
import "../../../shared/product-catalog/feature/dist/index.js";
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
12
|
+
import { getCreateFollowUp as i } from "./index8.js";
|
|
13
|
+
import { coerceEnabledTabs as a, getDocumentTitle as o, resolveInitialTab as s, tabForType as c, typeForTab as l } from "./index13.js";
|
|
14
|
+
import { RECEIVABLE_MESSAGE_LABELS_EN as u } from "./index14.js";
|
|
15
|
+
import { useReceivableActions as d } from "./index17.js";
|
|
16
|
+
import { useReceivableActionsModal as f } from "./index18.js";
|
|
17
|
+
import { useReceivableDetails as p } from "./index23.js";
|
|
18
|
+
import { useReceivableForm as m } from "./index31.js";
|
|
19
|
+
import { useReceivablesTable as h } from "./index34.js";
|
|
20
|
+
import { useCallback as g, useEffect as _, useMemo as v, useState as y } from "react";
|
|
36
21
|
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index35.js
|
|
37
|
-
function
|
|
38
|
-
let
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}, [
|
|
42
|
-
let
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}), [
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
paymentTerms: X.form.paymentTerms.view,
|
|
131
|
-
paymentTermsError: X.form.errors.paymentTermsId,
|
|
132
|
-
disabled: X.form.isSubmitting,
|
|
133
|
-
onPaymentTermsChange: X.form.paymentTerms.select,
|
|
134
|
-
onCustomDatePickerOpenChange: X.form.paymentTerms.changeCustomDatePickerOpen,
|
|
135
|
-
customDateCalendar: /* @__PURE__ */ k(e, {
|
|
136
|
-
mode: "single",
|
|
137
|
-
captionLayout: "dropdown",
|
|
138
|
-
...X.form.paymentTerms.calendar,
|
|
139
|
-
onSelect: X.form.paymentTerms.selectCustomDate
|
|
140
|
-
}),
|
|
141
|
-
recurrenceSection: X.form.showRecurrenceSection && (X.form.recurrenceLoading ? /* @__PURE__ */ k(t, { className: "ttw:h-9 ttw:w-full" }) : /* @__PURE__ */ k(v, {
|
|
142
|
-
idPrefix: $,
|
|
143
|
-
view: X.form.recurrence.view,
|
|
144
|
-
disabled: X.form.isSubmitting,
|
|
145
|
-
onFrequencyChange: X.form.recurrence.changeFrequency,
|
|
146
|
-
onMonthDayChange: X.form.recurrence.changeMonthDay,
|
|
147
|
-
onWeekdayChange: X.form.recurrence.changeWeekday,
|
|
148
|
-
onStartDateChange: X.form.recurrence.changeStartDate,
|
|
149
|
-
onEndModeChange: X.form.recurrence.changeEndMode,
|
|
150
|
-
onEndDateChange: X.form.recurrence.changeEndDate,
|
|
151
|
-
onMaxOccurrencesChange: X.form.recurrence.changeMaxOccurrences,
|
|
152
|
-
onCreationModeChange: X.form.recurrence.changeCreationMode,
|
|
153
|
-
onSetUpEmailClick: X.form.recurrence.setUpEmail,
|
|
154
|
-
emailDialog: /* @__PURE__ */ k(_, {
|
|
155
|
-
idPrefix: $,
|
|
156
|
-
view: X.form.recurrence.emailView,
|
|
157
|
-
onOpenChange: X.form.recurrence.changeEmailOpen,
|
|
158
|
-
onChange: X.form.recurrence.changeEmail,
|
|
159
|
-
onSave: X.form.recurrence.saveEmail,
|
|
160
|
-
labels: F
|
|
161
|
-
}),
|
|
162
|
-
labels: F
|
|
163
|
-
})),
|
|
164
|
-
labels: F
|
|
165
|
-
}),
|
|
166
|
-
remindersSection: X.form.reminders.view && /* @__PURE__ */ k(y, {
|
|
167
|
-
idPrefix: re,
|
|
168
|
-
view: X.form.reminders.view,
|
|
169
|
-
onToggle: X.form.reminders.toggle,
|
|
170
|
-
onPaymentReminderSelect: X.form.reminders.selectPaymentReminder,
|
|
171
|
-
onOverdueReminderSelect: X.form.reminders.selectOverdueReminder,
|
|
172
|
-
onBeforeDueInputChange: X.form.reminders.changeBeforeDueInput,
|
|
173
|
-
onBeforeDueSave: X.form.reminders.saveBeforeDue,
|
|
174
|
-
onOverdueTermChange: X.form.reminders.changeOverdueTerm,
|
|
175
|
-
onOverdueAddTerm: X.form.reminders.addOverdueTerm,
|
|
176
|
-
onOverdueClear: X.form.reminders.clearOverdueTerms,
|
|
177
|
-
onOverdueSave: X.form.reminders.saveOverdue,
|
|
178
|
-
labels: F
|
|
179
|
-
}),
|
|
180
|
-
bankAccountSection: /* @__PURE__ */ k(f, {
|
|
181
|
-
idPrefix: ne,
|
|
182
|
-
view: X.form.bankAccount.view,
|
|
183
|
-
error: X.form.errors.bankAccountId,
|
|
184
|
-
disabled: X.form.isSubmitting,
|
|
185
|
-
onAccountSelect: X.form.bankAccount.selectAccount,
|
|
186
|
-
onAddAccountClick: X.form.bankAccount.openAddAccount,
|
|
187
|
-
onFormChange: X.form.bankAccount.updateAccountForm,
|
|
188
|
-
onFormSave: X.form.bankAccount.saveAccount,
|
|
189
|
-
onFormCancel: X.form.bankAccount.cancelAddAccount,
|
|
190
|
-
labels: F
|
|
191
|
-
}),
|
|
192
|
-
attachmentsSection: X.form.attachmentsView && /* @__PURE__ */ k(S, {
|
|
193
|
-
view: X.form.attachmentsView,
|
|
194
|
-
disabled: X.form.isSubmitting,
|
|
195
|
-
onFilesSelect: X.form.selectAttachmentFiles,
|
|
196
|
-
onIncludeInEmailChange: X.form.setAttachmentIncludeInEmail,
|
|
197
|
-
onRemove: X.form.removeAttachment,
|
|
198
|
-
labels: F
|
|
199
|
-
}),
|
|
200
|
-
cancelDisabled: X.form.isSubmitting || X.form.attachmentsUploading,
|
|
201
|
-
draftButtonLabel: X.form.draftButtonLabel,
|
|
202
|
-
draftDisabled: X.form.draftDisabled,
|
|
203
|
-
primaryButtonLabel: X.form.primaryButtonLabel,
|
|
204
|
-
primaryDisabled: X.form.primaryDisabled,
|
|
205
|
-
scrollContainerRef: X.form.scrollContainerRef,
|
|
206
|
-
onSubmit: X.form.submit,
|
|
207
|
-
onDraftClick: X.form.selectDraftMode,
|
|
208
|
-
onPrimaryClick: X.form.selectPrimaryMode,
|
|
209
|
-
onCancel: X.form.close,
|
|
210
|
-
labels: F
|
|
211
|
-
}),
|
|
212
|
-
/* @__PURE__ */ k(m, {
|
|
213
|
-
open: X.detailsOpen,
|
|
214
|
-
onOpenChange: (e) => {
|
|
215
|
-
e || X.closeDetails();
|
|
216
|
-
},
|
|
217
|
-
details: X.details.detailsView,
|
|
218
|
-
unsupported: X.details.unsupportedView,
|
|
219
|
-
isLoading: X.details.isLoading,
|
|
220
|
-
isError: X.details.isError,
|
|
221
|
-
onActionClick: X.handleDetailsActionClick,
|
|
222
|
-
onClose: X.closeDetails,
|
|
223
|
-
labels: M
|
|
224
|
-
}),
|
|
225
|
-
/* @__PURE__ */ k(b, {
|
|
226
|
-
open: X.actions.sendOpen,
|
|
227
|
-
onOpenChange: (e) => {
|
|
228
|
-
e || X.actions.closeSend();
|
|
229
|
-
},
|
|
230
|
-
values: X.actions.sendValues,
|
|
231
|
-
errors: X.actions.sendErrors,
|
|
232
|
-
inProgress: X.actions.sendInProgress,
|
|
233
|
-
onChange: (e) => X.actions.setSendValues((t) => ({
|
|
234
|
-
...t,
|
|
235
|
-
...e
|
|
236
|
-
})),
|
|
237
|
-
onSubmit: X.actions.submitSend,
|
|
238
|
-
onCancel: X.actions.closeSend,
|
|
239
|
-
labels: K
|
|
240
|
-
}),
|
|
241
|
-
/* @__PURE__ */ k(g, {
|
|
242
|
-
open: X.actions.paymentOpen,
|
|
243
|
-
onOpenChange: (e) => {
|
|
244
|
-
e || X.actions.closePayment();
|
|
245
|
-
},
|
|
246
|
-
values: X.actions.paymentValues,
|
|
247
|
-
errors: X.actions.paymentErrors,
|
|
248
|
-
inProgress: X.actions.paymentInProgress,
|
|
249
|
-
onChange: (e) => X.actions.setPaymentValues((t) => ({
|
|
250
|
-
...t,
|
|
251
|
-
...e
|
|
252
|
-
})),
|
|
253
|
-
onSubmit: X.actions.submitPayment,
|
|
254
|
-
onCancel: X.actions.closePayment,
|
|
255
|
-
labels: U
|
|
256
|
-
}),
|
|
257
|
-
X.actions.actionDialog && /* @__PURE__ */ k(d, {
|
|
258
|
-
open: !!X.actions.actionTarget,
|
|
259
|
-
onOpenChange: (e) => {
|
|
260
|
-
e || X.actions.closeAction();
|
|
261
|
-
},
|
|
262
|
-
title: X.actions.actionDialog.title,
|
|
263
|
-
description: X.actions.actionDialog.description,
|
|
264
|
-
confirmLabel: X.actions.actionDialog.confirmLabel,
|
|
265
|
-
destructive: X.actions.actionDialog.destructive,
|
|
266
|
-
error: X.actions.actionError,
|
|
267
|
-
inProgress: X.actions.actionInProgress,
|
|
268
|
-
onConfirm: X.actions.confirmAction,
|
|
269
|
-
onCancel: X.actions.closeAction,
|
|
270
|
-
labels: q
|
|
271
|
-
}),
|
|
272
|
-
/* @__PURE__ */ k(u, {
|
|
273
|
-
idPrefix: ie,
|
|
274
|
-
open: X.actionsModal.isOpen,
|
|
275
|
-
view: X.actionsModal.view,
|
|
276
|
-
onSkip: X.actionsModal.skip,
|
|
277
|
-
onSubjectChange: X.actionsModal.changeSubject,
|
|
278
|
-
onMessageChange: X.actionsModal.changeMessage,
|
|
279
|
-
onSend: X.actionsModal.send,
|
|
280
|
-
onToggleItem: X.actionsModal.toggleItem,
|
|
281
|
-
onToggleAll: X.actionsModal.toggleAll,
|
|
282
|
-
onAllSelectedChange: X.actionsModal.setAllSelected,
|
|
283
|
-
onSaveItems: X.actionsModal.saveItems,
|
|
284
|
-
labels: J
|
|
285
|
-
}),
|
|
286
|
-
/* @__PURE__ */ k(a, {
|
|
287
|
-
open: X.form.counterpartView === "create",
|
|
288
|
-
onOpenChange: (e) => {
|
|
289
|
-
e || X.form.counterpartForm.close();
|
|
290
|
-
},
|
|
291
|
-
mode: "create",
|
|
292
|
-
values: X.form.counterpartForm.values,
|
|
293
|
-
errors: X.form.counterpartForm.errors,
|
|
294
|
-
stateOptions: X.form.stateOptions,
|
|
295
|
-
inProgress: X.form.counterpartForm.isSubmitting,
|
|
296
|
-
onChange: (e) => X.form.counterpartForm.setValues((t) => ({
|
|
297
|
-
...t,
|
|
298
|
-
...e
|
|
299
|
-
})),
|
|
300
|
-
onAddressChange: (e) => X.form.counterpartForm.setValues((t) => ({
|
|
301
|
-
...t,
|
|
302
|
-
address: {
|
|
303
|
-
...t.address,
|
|
304
|
-
...e
|
|
22
|
+
function b({ auditHistoryLabels: b, counterpartMessageLabels: x, defaultTab: S, embeddedBankName: C, enabledTabs: w, messageLabels: T, onReceivableCreated: E, onReceivableOpened: D, screenLabels: O }) {
|
|
23
|
+
let k = e();
|
|
24
|
+
_(() => {
|
|
25
|
+
k(t.Mounted);
|
|
26
|
+
}, [k]);
|
|
27
|
+
let A = v(() => ({
|
|
28
|
+
...u,
|
|
29
|
+
...T
|
|
30
|
+
}), [T]), j = O?.statusBadge, M = v(() => ({
|
|
31
|
+
...n,
|
|
32
|
+
...j
|
|
33
|
+
}), [j]), N = v(() => a(w), [w]), [P, F] = y(() => s({
|
|
34
|
+
defaultTab: S,
|
|
35
|
+
enabledTabs: N
|
|
36
|
+
})), [I, L] = y(), [R, z] = y(!1);
|
|
37
|
+
_(() => {
|
|
38
|
+
N.includes(P) || F(s({
|
|
39
|
+
defaultTab: S,
|
|
40
|
+
enabledTabs: N
|
|
41
|
+
}));
|
|
42
|
+
}, [
|
|
43
|
+
P,
|
|
44
|
+
S,
|
|
45
|
+
N
|
|
46
|
+
]);
|
|
47
|
+
let B = g((e, t) => {
|
|
48
|
+
F(c(t)), L(e), z(!0), E?.(e, t);
|
|
49
|
+
}, [E]), V = f({ messages: A }), H = V.open, U = g((e, t, n) => {
|
|
50
|
+
F(c(t));
|
|
51
|
+
let r = i(n);
|
|
52
|
+
r.openDetails && (L(e), z(!0)), r.actionsModal && H({
|
|
53
|
+
action: n.mode,
|
|
54
|
+
receivableId: e,
|
|
55
|
+
counterpartId: n.counterpartId,
|
|
56
|
+
inlineItems: n.inlineItems,
|
|
57
|
+
showEmailStep: r.actionsModal.showEmailStep
|
|
58
|
+
}), E?.(e, t);
|
|
59
|
+
}, [E, H]), W = h({
|
|
60
|
+
activeTab: P,
|
|
61
|
+
messages: A,
|
|
62
|
+
statusLabels: M
|
|
63
|
+
}), G = g((e) => {
|
|
64
|
+
L(e), z(!0), D?.(e, "invoice");
|
|
65
|
+
}, [D]), K = p({
|
|
66
|
+
selectedReceivableId: I,
|
|
67
|
+
enabled: R,
|
|
68
|
+
messages: A,
|
|
69
|
+
statusLabels: M,
|
|
70
|
+
auditHistoryLabels: b,
|
|
71
|
+
onOpenReceivable: G
|
|
72
|
+
}), q = m({
|
|
73
|
+
messages: A,
|
|
74
|
+
counterpartMessageLabels: x,
|
|
75
|
+
embeddedBankName: C,
|
|
76
|
+
onCreated: U
|
|
77
|
+
}), J = g(() => {
|
|
78
|
+
let e = l(P);
|
|
79
|
+
q.openCreate(e === "quote" ? "quote" : "invoice");
|
|
80
|
+
}, [P, q.openCreate]), Y = d({
|
|
81
|
+
selectedReceivable: K.receivable,
|
|
82
|
+
selectedRecurrence: K.recurrence,
|
|
83
|
+
messages: A,
|
|
84
|
+
onCreated: B,
|
|
85
|
+
onDeleted: (e) => {
|
|
86
|
+
e === I && (L(void 0), z(!1));
|
|
87
|
+
},
|
|
88
|
+
onCompleteBeforeIssue: (e) => {
|
|
89
|
+
q.openEdit(e, { highlightForIssue: !0 }), z(!1);
|
|
90
|
+
}
|
|
91
|
+
}), X = g((e) => {
|
|
92
|
+
r() || (L(e.id), z(!0), D?.(e.id, e.type));
|
|
93
|
+
}, [D]);
|
|
94
|
+
return {
|
|
95
|
+
activeTab: P,
|
|
96
|
+
enabledTabs: N,
|
|
97
|
+
setActiveTab: F,
|
|
98
|
+
table: W,
|
|
99
|
+
details: K,
|
|
100
|
+
detailsOpen: R,
|
|
101
|
+
closeDetails: g(() => {
|
|
102
|
+
z(!1), L(void 0);
|
|
103
|
+
}, []),
|
|
104
|
+
form: q,
|
|
105
|
+
openCreate: J,
|
|
106
|
+
actions: Y,
|
|
107
|
+
actionsModal: V,
|
|
108
|
+
handleRowClick: X,
|
|
109
|
+
handleActionClick: g((e, t) => {
|
|
110
|
+
let n = W.getReceivableById(t.id);
|
|
111
|
+
if (e === "edit") {
|
|
112
|
+
if (n) {
|
|
113
|
+
q.openEdit(n);
|
|
114
|
+
return;
|
|
305
115
|
}
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
onError: d,
|
|
333
|
-
analytics: f,
|
|
334
|
-
disclosuresAcceptance: p,
|
|
335
|
-
providerLabels: m,
|
|
336
|
-
children: /* @__PURE__ */ k(j, { ...h })
|
|
337
|
-
});
|
|
116
|
+
L(t.id), z(!0);
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
L(t.id), Y.openAction(e, t, n ?? null);
|
|
120
|
+
}, [
|
|
121
|
+
Y,
|
|
122
|
+
q.openEdit,
|
|
123
|
+
W.getReceivableById
|
|
124
|
+
]),
|
|
125
|
+
handleDetailsActionClick: g((e, t) => {
|
|
126
|
+
if (e === "edit") {
|
|
127
|
+
K.receivable && (q.openEdit(K.receivable), z(!1));
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
Y.openAction(e, {
|
|
131
|
+
id: t.id,
|
|
132
|
+
title: K.receivable ? o(K.receivable, A) : t.title,
|
|
133
|
+
type: t.type
|
|
134
|
+
}, K.receivable ?? null);
|
|
135
|
+
}, [
|
|
136
|
+
Y,
|
|
137
|
+
K.receivable,
|
|
138
|
+
q.openEdit,
|
|
139
|
+
A
|
|
140
|
+
])
|
|
141
|
+
};
|
|
338
142
|
}
|
|
339
143
|
//#endregion
|
|
340
|
-
export {
|
|
144
|
+
export { b as useReceivablesWidget };
|