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