@tesouro/embedded-components-react 0.5.274 → 0.5.275
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/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +18 -17
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesTable.js +50 -50
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesWidget.js +120 -119
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -513,7 +513,7 @@ Lists, creates, edits and acts on an organization's invoices, including sending
|
|
|
513
513
|
| -------------------------- | ---------------------------------------------------- | ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
514
514
|
| `initialView` | `'create'` | `undefined` | Opens the create-invoice form once on mount, when the user can create invoices. Closing it does not reopen it. |
|
|
515
515
|
| `initialCounterpartId` | `string` | `undefined` | With `initialView: 'create'`, preselects this customer in that first create form only. Otherwise, opens the invoice list filtered to this customer, with a chip naming them. Clear all removes it. |
|
|
516
|
-
| `pageSizeOptions` | `number[]` | `[10, 25, 50, 100]` | Rows-per-page choices. The first page loads
|
|
516
|
+
| `pageSizeOptions` | `number[]` | `[10, 25, 50, 100]` | Rows-per-page choices. The first page loads at the first choice, or `10` when the list is empty. |
|
|
517
517
|
| `onReceivableCreated` | `(id: string, type: ReceivableDocumentType) => void` | `undefined` | Called after a create or clone succeeds. |
|
|
518
518
|
| `onReceivableOpened` | `(id: string, type: ReceivableDocumentType) => void` | `undefined` | Called when the user opens a row's details panel. |
|
|
519
519
|
| `onTemplateSettingsClick` | `() => void` | `undefined` | Shows the invoice settings button in the header, for users holding `organization_settings:write:org`, and calls this when it is clicked. |
|
|
@@ -25,13 +25,13 @@ import { ReceivableFormDialog as _ } from "../../../../ui/dist/index41.js";
|
|
|
25
25
|
import { ReceivablePaymentDialog as v } from "../../../../ui/dist/index42.js";
|
|
26
26
|
import { ReceivablePreview as y } from "../../../../ui/dist/index46.js";
|
|
27
27
|
import { ReceivableRecurrenceEmailDialog as b } from "../../../../ui/dist/index48.js";
|
|
28
|
-
import { ReceivableRecurrenceSection as
|
|
29
|
-
import { ReceivableRemindersSection as
|
|
30
|
-
import { ReceivableSendDialog as
|
|
31
|
-
import { ReceivablesScreen as
|
|
32
|
-
import { UnsavedInvoiceDialog as
|
|
28
|
+
import { ReceivableRecurrenceSection as x } from "../../../../ui/dist/index50.js";
|
|
29
|
+
import { ReceivableRemindersSection as ee } from "../../../../ui/dist/index52.js";
|
|
30
|
+
import { ReceivableSendDialog as te } from "../../../../ui/dist/index53.js";
|
|
31
|
+
import { ReceivablesScreen as ne } from "../../../../ui/dist/index55.js";
|
|
32
|
+
import { UnsavedInvoiceDialog as re } from "../../../../ui/dist/index56.js";
|
|
33
33
|
import "../../../../ui/dist/index.js";
|
|
34
|
-
import { ReceivableAttachmentsSection as
|
|
34
|
+
import { ReceivableAttachmentsSection as ie } from "./ReceivableAttachmentsSection.js";
|
|
35
35
|
import { MeasureUnitsManagerContainer as S } from "../../../../../shared/product-catalog/feature/dist/lib/MeasureUnitsManagerContainer.js";
|
|
36
36
|
import { ProductSelector as C } from "../../../../../shared/product-catalog/feature/dist/lib/ProductSelector.js";
|
|
37
37
|
import "../../../../../shared/product-catalog/feature/dist/index.js";
|
|
@@ -39,7 +39,7 @@ import { useReceivablesWidget as w } from "./useReceivablesWidget.js";
|
|
|
39
39
|
import { useEffect as T, useId as E } from "react";
|
|
40
40
|
import { Fragment as D, jsx as O, jsxs as k } from "react/jsx-runtime";
|
|
41
41
|
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js
|
|
42
|
-
function A({ auditHistoryLabels: i, bankAttribution: l, counterpartFormLabels: A, counterpartMessageLabels: j, detailsLabels: M, embeddedBankName: N, filterBarLabels: P, filterLabels: F, formLabels: I, headerStart: L, initialCounterpartId:
|
|
42
|
+
function A({ auditHistoryLabels: i, bankAttribution: l, counterpartFormLabels: A, counterpartMessageLabels: j, detailsLabels: M, embeddedBankName: N, filterBarLabels: P, filterLabels: F, formLabels: I, headerStart: L, initialCounterpartId: ae, initialView: R, measureUnitDeleteLabels: z, measureUnitsLabels: B, messageLabels: V, onReceivableCreated: H, onReceivableOpened: U, onTemplateSettingsClick: W, pageSizeOptions: G = u, paymentLabels: K, previewLabels: q, productMessageLabels: J, screenLabels: Y, sendLabels: oe, actionLabels: se, actionsModalLabels: ce }) {
|
|
43
43
|
let X = r();
|
|
44
44
|
T(() => {
|
|
45
45
|
X(c.Mounted);
|
|
@@ -49,16 +49,17 @@ function A({ auditHistoryLabels: i, bankAttribution: l, counterpartFormLabels: A
|
|
|
49
49
|
counterpartMessageLabels: j,
|
|
50
50
|
embeddedBankName: N,
|
|
51
51
|
filterLabels: F,
|
|
52
|
-
initialCounterpartId:
|
|
53
|
-
initialView:
|
|
52
|
+
initialCounterpartId: ae,
|
|
53
|
+
initialView: R,
|
|
54
54
|
messageLabels: V,
|
|
55
55
|
onReceivableCreated: H,
|
|
56
56
|
onReceivableOpened: U,
|
|
57
|
+
pageSizeOptions: G,
|
|
57
58
|
screenLabels: Y
|
|
58
59
|
}), le = E(), Q = E(), $ = E(), ue = E(), de = E();
|
|
59
60
|
return /* @__PURE__ */ k(D, { children: [
|
|
60
61
|
/* @__PURE__ */ O(n, { position: "bottom-left" }),
|
|
61
|
-
/* @__PURE__ */ O(
|
|
62
|
+
/* @__PURE__ */ O(ne, {
|
|
62
63
|
rows: Z.table.rows,
|
|
63
64
|
isLoading: Z.isTableLoading,
|
|
64
65
|
isError: Z.isError,
|
|
@@ -142,7 +143,7 @@ function A({ auditHistoryLabels: i, bankAttribution: l, counterpartFormLabels: A
|
|
|
142
143
|
...Z.form.paymentTerms.calendar,
|
|
143
144
|
onSelect: Z.form.paymentTerms.selectCustomDate
|
|
144
145
|
}),
|
|
145
|
-
recurrenceSection: Z.form.showRecurrenceSection && (Z.form.recurrenceLoading ? /* @__PURE__ */ O(t, { className: "ttw:h-9 ttw:w-full" }) : /* @__PURE__ */ O(
|
|
146
|
+
recurrenceSection: Z.form.showRecurrenceSection && (Z.form.recurrenceLoading ? /* @__PURE__ */ O(t, { className: "ttw:h-9 ttw:w-full" }) : /* @__PURE__ */ O(x, {
|
|
146
147
|
idPrefix: Q,
|
|
147
148
|
view: Z.form.recurrence.view,
|
|
148
149
|
disabled: Z.form.isSubmitting,
|
|
@@ -165,7 +166,7 @@ function A({ auditHistoryLabels: i, bankAttribution: l, counterpartFormLabels: A
|
|
|
165
166
|
}),
|
|
166
167
|
labels: I
|
|
167
168
|
})),
|
|
168
|
-
remindersSection: Z.form.reminders.view && /* @__PURE__ */ O(
|
|
169
|
+
remindersSection: Z.form.reminders.view && /* @__PURE__ */ O(ee, {
|
|
169
170
|
idPrefix: ue,
|
|
170
171
|
view: Z.form.reminders.view,
|
|
171
172
|
onToggle: Z.form.reminders.toggle,
|
|
@@ -193,7 +194,7 @@ function A({ auditHistoryLabels: i, bankAttribution: l, counterpartFormLabels: A
|
|
|
193
194
|
onFormCancel: Z.form.bankAccount.cancelAddAccount,
|
|
194
195
|
labels: I
|
|
195
196
|
}),
|
|
196
|
-
attachmentsSection: Z.form.attachmentsView && /* @__PURE__ */ O(
|
|
197
|
+
attachmentsSection: Z.form.attachmentsView && /* @__PURE__ */ O(ie, {
|
|
197
198
|
view: Z.form.attachmentsView,
|
|
198
199
|
disabled: Z.form.isSubmitting,
|
|
199
200
|
onFilesSelect: Z.form.selectAttachmentFiles,
|
|
@@ -219,7 +220,7 @@ function A({ auditHistoryLabels: i, bankAttribution: l, counterpartFormLabels: A
|
|
|
219
220
|
onPrimaryClick: Z.form.selectPrimaryMode,
|
|
220
221
|
labels: I
|
|
221
222
|
}),
|
|
222
|
-
/* @__PURE__ */ O(
|
|
223
|
+
/* @__PURE__ */ O(re, {
|
|
223
224
|
...Z.form.unsavedPrompt,
|
|
224
225
|
labels: I
|
|
225
226
|
}),
|
|
@@ -243,7 +244,7 @@ function A({ auditHistoryLabels: i, bankAttribution: l, counterpartFormLabels: A
|
|
|
243
244
|
counterpartType: "customer",
|
|
244
245
|
onClose: Z.closeCustomerDetails
|
|
245
246
|
}),
|
|
246
|
-
/* @__PURE__ */ O(
|
|
247
|
+
/* @__PURE__ */ O(te, {
|
|
247
248
|
open: Z.actions.sendOpen,
|
|
248
249
|
onOpenChange: (e) => {
|
|
249
250
|
e || Z.actions.closeSend();
|
|
@@ -341,8 +342,8 @@ function A({ auditHistoryLabels: i, bankAttribution: l, counterpartFormLabels: A
|
|
|
341
342
|
open: Z.measureUnitsOpen,
|
|
342
343
|
onClose: Z.closeMeasureUnits,
|
|
343
344
|
suspended: Z.actionsSuspended,
|
|
344
|
-
managerLabels:
|
|
345
|
-
deleteLabels:
|
|
345
|
+
managerLabels: B,
|
|
346
|
+
deleteLabels: z,
|
|
346
347
|
messageLabels: J
|
|
347
348
|
})
|
|
348
349
|
] });
|
|
@@ -14,72 +14,72 @@ var l = [], u = [{
|
|
|
14
14
|
id: "dueDateLabel",
|
|
15
15
|
desc: !0
|
|
16
16
|
}];
|
|
17
|
-
function d({ initialCounterpartId: d, messages: p, statusLabels: m, filterLabels: h,
|
|
18
|
-
let [
|
|
17
|
+
function d({ initialCounterpartId: d, messages: p, statusLabels: m, filterLabels: h, pageSizeOptions: g, enabled: _ = !0, visible: v = _ }) {
|
|
18
|
+
let [y, b] = c(u), [x, S] = c(g?.[0] ?? 10), [C, w] = c(), [T, E] = c(""), [D, O] = c(""), k = a(() => w(void 0), []), A = n({
|
|
19
19
|
initialCounterpartId: d,
|
|
20
|
-
search:
|
|
21
|
-
onSearchChange:
|
|
22
|
-
onFiltersChange:
|
|
20
|
+
search: T,
|
|
21
|
+
onSearchChange: E,
|
|
22
|
+
onFiltersChange: k,
|
|
23
23
|
statusLabels: m,
|
|
24
24
|
labels: h
|
|
25
25
|
});
|
|
26
26
|
o(() => {
|
|
27
27
|
let e = setTimeout(() => {
|
|
28
|
-
|
|
28
|
+
O(T), w(void 0);
|
|
29
29
|
}, 300);
|
|
30
30
|
return () => clearTimeout(e);
|
|
31
|
-
}, [
|
|
32
|
-
let
|
|
33
|
-
enabled:
|
|
31
|
+
}, [T]);
|
|
32
|
+
let j = y[0]?.id, M = j ? f[j] : void 0, N = y[0] ? y[0].desc ? "desc" : "asc" : void 0, P = t({
|
|
33
|
+
enabled: _,
|
|
34
34
|
type: "invoice",
|
|
35
|
-
limit:
|
|
36
|
-
pagination_token:
|
|
37
|
-
search_text:
|
|
38
|
-
...
|
|
39
|
-
...
|
|
40
|
-
sort:
|
|
41
|
-
order:
|
|
35
|
+
limit: x,
|
|
36
|
+
pagination_token: C,
|
|
37
|
+
search_text: D || void 0,
|
|
38
|
+
...A.query,
|
|
39
|
+
...M ? {
|
|
40
|
+
sort: M,
|
|
41
|
+
order: N
|
|
42
42
|
} : {}
|
|
43
|
-
}),
|
|
44
|
-
enabled:
|
|
45
|
-
visible:
|
|
46
|
-
statusFilter:
|
|
43
|
+
}), F = i({
|
|
44
|
+
enabled: _,
|
|
45
|
+
visible: v,
|
|
46
|
+
statusFilter: A.cardStatus,
|
|
47
47
|
messages: p,
|
|
48
48
|
statusLabels: m
|
|
49
|
-
}),
|
|
50
|
-
receivables:
|
|
49
|
+
}), I = P.data?.data ?? l, L = s(() => new Map(I.map((e) => [e.id, e])), [I]), R = a((e) => L.get(e), [L]), z = r(I), B = s(() => e({
|
|
50
|
+
receivables: I,
|
|
51
51
|
messages: p,
|
|
52
|
-
customerNames:
|
|
52
|
+
customerNames: z
|
|
53
53
|
}), [
|
|
54
|
-
|
|
54
|
+
z,
|
|
55
55
|
p,
|
|
56
|
-
|
|
57
|
-
]),
|
|
58
|
-
let t = typeof e == "function" ? e(
|
|
59
|
-
|
|
60
|
-
}, [
|
|
61
|
-
|
|
62
|
-
}, []),
|
|
63
|
-
|
|
64
|
-
}, [
|
|
56
|
+
I
|
|
57
|
+
]), V = a((e) => {
|
|
58
|
+
let t = typeof e == "function" ? e(y) : e;
|
|
59
|
+
b(t[0] && Object.hasOwn(f, t[0].id) ? t : u), w(void 0);
|
|
60
|
+
}, [y]), H = a((e) => {
|
|
61
|
+
S(e), w(void 0);
|
|
62
|
+
}, []), U = a(() => w(P.data?.next_pagination_token ?? void 0), [P.data?.next_pagination_token]), W = a(() => w(P.data?.prev_pagination_token ?? void 0), [P.data?.prev_pagination_token]), G = a(() => {
|
|
63
|
+
P.refetch();
|
|
64
|
+
}, [P]);
|
|
65
65
|
return {
|
|
66
|
-
rows:
|
|
67
|
-
isLoading:
|
|
68
|
-
isError:
|
|
69
|
-
sorting:
|
|
70
|
-
onSortingChange:
|
|
71
|
-
pageSize:
|
|
72
|
-
onPageSizeChange:
|
|
73
|
-
hasNextPage: !!
|
|
74
|
-
hasPrevPage: !!
|
|
75
|
-
onNextPage:
|
|
76
|
-
onPrevPage:
|
|
77
|
-
statusCards:
|
|
78
|
-
onStatusCardSelect:
|
|
79
|
-
filterBar:
|
|
80
|
-
isFiltering:
|
|
81
|
-
onRetry:
|
|
82
|
-
getReceivableById:
|
|
66
|
+
rows: B,
|
|
67
|
+
isLoading: P.isLoading,
|
|
68
|
+
isError: P.isError,
|
|
69
|
+
sorting: y,
|
|
70
|
+
onSortingChange: V,
|
|
71
|
+
pageSize: x,
|
|
72
|
+
onPageSizeChange: H,
|
|
73
|
+
hasNextPage: !!P.data?.next_pagination_token,
|
|
74
|
+
hasPrevPage: !!P.data?.prev_pagination_token,
|
|
75
|
+
onNextPage: U,
|
|
76
|
+
onPrevPage: W,
|
|
77
|
+
statusCards: F,
|
|
78
|
+
onStatusCardSelect: A.selectStatusCard,
|
|
79
|
+
filterBar: A.filterBar,
|
|
80
|
+
isFiltering: A.isFiltering,
|
|
81
|
+
onRetry: G,
|
|
82
|
+
getReceivableById: R
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
85
|
var f = {
|
|
@@ -24,24 +24,24 @@ import { useReceivableForm as pe } from "./useReceivableForm.js";
|
|
|
24
24
|
import { useReceivablesTable as me } from "./useReceivablesTable.js";
|
|
25
25
|
import { useCallback as a, useEffect as o, useMemo as s, useRef as c, useState as l } from "react";
|
|
26
26
|
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesWidget.js
|
|
27
|
-
function u({ auditHistoryLabels: u, counterpartMessageLabels: he, embeddedBankName: ge, filterLabels: _e, initialCounterpartId: f, initialView: p, messageLabels: m, onReceivableCreated: h, onReceivableOpened: g,
|
|
28
|
-
let
|
|
27
|
+
function u({ auditHistoryLabels: u, counterpartMessageLabels: he, embeddedBankName: ge, filterLabels: _e, initialCounterpartId: f, initialView: p, messageLabels: m, onReceivableCreated: h, onReceivableOpened: g, pageSizeOptions: ve, screenLabels: ye }) {
|
|
28
|
+
let be = n();
|
|
29
29
|
o(() => {
|
|
30
|
-
|
|
31
|
-
}, [
|
|
32
|
-
let { initResponse:
|
|
30
|
+
be(re.Mounted);
|
|
31
|
+
}, [be]);
|
|
32
|
+
let { initResponse: _, widgetToken: xe } = i(), v = ne(), Se = ee(), Ce = r(), y = te(), b = !!_ && !y, x = s(() => le(_?.scopes), [_?.scopes]), we = !!_ && y, S = !!_ && x.canRead, C = !!_ && x.canWrite, w = b && x.canRead, T = b && x.canWrite, E = !!Se && !b && !v, D = !b && !E && !!(xe || v), O = s(() => ({
|
|
33
33
|
...ce,
|
|
34
34
|
...m
|
|
35
|
-
}), [m]),
|
|
35
|
+
}), [m]), k = ye?.statusBadge, A = s(() => ({
|
|
36
36
|
...ie,
|
|
37
|
-
...
|
|
38
|
-
}), [
|
|
39
|
-
|
|
40
|
-
let [
|
|
41
|
-
|
|
42
|
-
}, [h]),
|
|
37
|
+
...k
|
|
38
|
+
}), [k]), [j, M] = l(), [N, P] = l(!1), [F, Te] = l(j);
|
|
39
|
+
j && j !== F && Te(j);
|
|
40
|
+
let [I, L] = l(!1), [Ee, R] = l(), De = e(_?.scopes, [t.CounterpartReadOrg]), Oe = a(() => R(void 0), []), [z, B] = l(!1), ke = a(() => B(!0), []), V = a(() => B(!1), []), Ae = a((e, t) => {
|
|
41
|
+
M(e), P(!0), h?.(e, t);
|
|
42
|
+
}, [h]), H = de({ messages: O }), U = H.open, je = a((e, t, n) => {
|
|
43
43
|
let r = oe(n);
|
|
44
|
-
r.openDetails && (
|
|
44
|
+
r.openDetails && (M(e), P(!0)), r.actionsModal && U({
|
|
45
45
|
action: n.mode,
|
|
46
46
|
receivableId: e,
|
|
47
47
|
documentType: t,
|
|
@@ -49,27 +49,28 @@ function u({ auditHistoryLabels: u, counterpartMessageLabels: he, embeddedBankNa
|
|
|
49
49
|
inlineItems: n.inlineItems,
|
|
50
50
|
showEmailStep: r.actionsModal.showEmailStep
|
|
51
51
|
}), h?.(e, t);
|
|
52
|
-
}, [h,
|
|
52
|
+
}, [h, U]), W = me({
|
|
53
53
|
initialCounterpartId: p === "create" ? void 0 : f,
|
|
54
|
-
messages:
|
|
55
|
-
statusLabels:
|
|
54
|
+
messages: O,
|
|
55
|
+
statusLabels: A,
|
|
56
56
|
filterLabels: _e,
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
57
|
+
pageSizeOptions: ve,
|
|
58
|
+
enabled: w,
|
|
59
|
+
visible: S
|
|
60
|
+
}), Me = a((e) => {
|
|
61
|
+
M(e), P(!0), g?.(e, "invoice");
|
|
62
|
+
}, [g]), G = fe({
|
|
63
|
+
selectedReceivableId: j,
|
|
64
|
+
enabled: N && w,
|
|
65
|
+
canWrite: C,
|
|
66
|
+
messages: O,
|
|
67
|
+
statusLabels: A,
|
|
67
68
|
auditHistoryLabels: u,
|
|
68
|
-
onOpenReceivable:
|
|
69
|
-
onOpenCustomer:
|
|
70
|
-
}),
|
|
71
|
-
let r = n.mode === "issue", i = r &&
|
|
72
|
-
(i || n.inlineItems.length !== 0) &&
|
|
69
|
+
onOpenReceivable: Me,
|
|
70
|
+
onOpenCustomer: De ? R : void 0
|
|
71
|
+
}), K = c("edit"), Ne = a((e, t, n) => {
|
|
72
|
+
let r = n.mode === "issue", i = r && K.current !== "issue" && n.hasCustomerEmail;
|
|
73
|
+
(i || n.inlineItems.length !== 0) && U({
|
|
73
74
|
action: r || n.mode === "recurrence" ? n.mode : "update",
|
|
74
75
|
receivableId: e,
|
|
75
76
|
documentType: t,
|
|
@@ -77,35 +78,35 @@ function u({ auditHistoryLabels: u, counterpartMessageLabels: he, embeddedBankNa
|
|
|
77
78
|
inlineItems: n.inlineItems,
|
|
78
79
|
showEmailStep: i
|
|
79
80
|
});
|
|
80
|
-
}, [
|
|
81
|
-
messages:
|
|
81
|
+
}, [U]), q = pe({
|
|
82
|
+
messages: O,
|
|
82
83
|
counterpartMessageLabels: he,
|
|
83
84
|
embeddedBankName: ge,
|
|
84
|
-
onCreated:
|
|
85
|
-
onUpdated:
|
|
86
|
-
}),
|
|
87
|
-
|
|
88
|
-
}, [
|
|
85
|
+
onCreated: je,
|
|
86
|
+
onUpdated: Ne
|
|
87
|
+
}), Pe = a(() => {
|
|
88
|
+
T && q.openCreate("invoice");
|
|
89
|
+
}, [T, q.openCreate]), J = c(!1);
|
|
89
90
|
o(() => {
|
|
90
|
-
|
|
91
|
+
J.current || p === "create" && T && (J.current = !0, q.openCreate("invoice", { customerId: f }));
|
|
91
92
|
}, [
|
|
92
|
-
|
|
93
|
-
|
|
93
|
+
T,
|
|
94
|
+
q.openCreate,
|
|
94
95
|
f,
|
|
95
96
|
p
|
|
96
97
|
]);
|
|
97
|
-
let
|
|
98
|
-
selectedReceivable:
|
|
99
|
-
selectedRecurrence:
|
|
100
|
-
messages:
|
|
101
|
-
onCreated:
|
|
98
|
+
let Y = ue({
|
|
99
|
+
selectedReceivable: G.receivable,
|
|
100
|
+
selectedRecurrence: G.recurrence,
|
|
101
|
+
messages: O,
|
|
102
|
+
onCreated: Ae,
|
|
102
103
|
onDeleted: (e) => {
|
|
103
|
-
e ===
|
|
104
|
+
e === j && (M(void 0), P(!1));
|
|
104
105
|
},
|
|
105
106
|
onCompleteBeforeIssue: (e, t) => {
|
|
106
|
-
|
|
107
|
+
K.current = t, q.openEdit(e, { highlightForIssue: !0 }), N && L(!0), P(!1);
|
|
107
108
|
},
|
|
108
|
-
onIssuedForSend: (e, t) =>
|
|
109
|
+
onIssuedForSend: (e, t) => U({
|
|
109
110
|
action: "issue",
|
|
110
111
|
receivableId: e,
|
|
111
112
|
documentType: "invoice",
|
|
@@ -115,105 +116,105 @@ function u({ auditHistoryLabels: u, counterpartMessageLabels: he, embeddedBankNa
|
|
|
115
116
|
})
|
|
116
117
|
});
|
|
117
118
|
o(() => {
|
|
118
|
-
|
|
119
|
-
}, [
|
|
120
|
-
!
|
|
121
|
-
}, [
|
|
122
|
-
let
|
|
119
|
+
q.open || (K.current = "edit");
|
|
120
|
+
}, [q.open]), o(() => {
|
|
121
|
+
!q.open && I && (L(!1), P(!0));
|
|
122
|
+
}, [q.open, I]);
|
|
123
|
+
let X = b && !x.canWrite, Z = q.open || q.counterpartView !== "none" || !!Y.actionTarget || Y.sendOpen || Y.payment.isOpen || H.isOpen || z, Fe = q.close, Ie = q.counterpartForm.close, { closeAction: Le, closeSend: Re } = Y, Q = Y.payment.close, $ = H.close;
|
|
123
124
|
o(() => {
|
|
124
|
-
|
|
125
|
+
X && Z && (Fe(), Ie(), Le(), Re(), Q(), $(), V());
|
|
125
126
|
}, [
|
|
126
|
-
Fe,
|
|
127
|
-
$,
|
|
128
|
-
Pe,
|
|
129
|
-
Ne,
|
|
130
|
-
H,
|
|
131
127
|
Le,
|
|
128
|
+
$,
|
|
132
129
|
Ie,
|
|
130
|
+
Fe,
|
|
131
|
+
V,
|
|
133
132
|
Q,
|
|
134
|
-
|
|
133
|
+
Re,
|
|
134
|
+
Z,
|
|
135
|
+
X
|
|
135
136
|
]);
|
|
136
|
-
let
|
|
137
|
-
ae() || (
|
|
138
|
-
}, [g]),
|
|
139
|
-
|
|
140
|
-
}, []),
|
|
141
|
-
if (
|
|
137
|
+
let ze = a((e) => {
|
|
138
|
+
ae() || (M(e.id), P(!0), g?.(e.id, e.type));
|
|
139
|
+
}, [g]), Be = a(() => {
|
|
140
|
+
P(!1), M(void 0), R(void 0);
|
|
141
|
+
}, []), Ve = a((e, t) => {
|
|
142
|
+
if (T) {
|
|
142
143
|
if (e === "edit") {
|
|
143
|
-
|
|
144
|
+
G.receivable && (K.current = "edit", q.openEdit(G.receivable), L(!0), P(!1));
|
|
144
145
|
return;
|
|
145
146
|
}
|
|
146
|
-
|
|
147
|
+
Y.openAction(e, {
|
|
147
148
|
id: t.id,
|
|
148
|
-
title:
|
|
149
|
+
title: G.receivable ? se(G.receivable, O) : t.title,
|
|
149
150
|
type: t.type
|
|
150
|
-
},
|
|
151
|
+
}, G.receivable ?? null);
|
|
151
152
|
}
|
|
152
153
|
}, [
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
154
|
+
Y,
|
|
155
|
+
T,
|
|
156
|
+
G.receivable,
|
|
157
|
+
q.openEdit,
|
|
158
|
+
O
|
|
158
159
|
]);
|
|
159
160
|
return {
|
|
160
|
-
canWrite:
|
|
161
|
-
canEditSettings:
|
|
162
|
-
actionsSuspended:
|
|
163
|
-
isAccessRestricted:
|
|
164
|
-
table:
|
|
165
|
-
...
|
|
161
|
+
canWrite: C,
|
|
162
|
+
canEditSettings: S && x.canEditSettings,
|
|
163
|
+
actionsSuspended: we,
|
|
164
|
+
isAccessRestricted: b && !x.canRead,
|
|
165
|
+
table: S ? W : {
|
|
166
|
+
...W,
|
|
166
167
|
rows: [],
|
|
167
168
|
statusCards: void 0,
|
|
168
169
|
isError: !1
|
|
169
170
|
},
|
|
170
|
-
isTableLoading:
|
|
171
|
-
isError:
|
|
172
|
-
onRetry:
|
|
173
|
-
details:
|
|
174
|
-
detailsOpen:
|
|
175
|
-
closeDetails:
|
|
176
|
-
detailsPanelKey:
|
|
177
|
-
customerDetailsId:
|
|
178
|
-
closeCustomerDetails:
|
|
171
|
+
isTableLoading: S ? W.isLoading || D && W.rows.length === 0 : D,
|
|
172
|
+
isError: E || S && W.isError,
|
|
173
|
+
onRetry: E ? Ce : W.onRetry,
|
|
174
|
+
details: G,
|
|
175
|
+
detailsOpen: N && S,
|
|
176
|
+
closeDetails: Be,
|
|
177
|
+
detailsPanelKey: F,
|
|
178
|
+
customerDetailsId: Ee,
|
|
179
|
+
closeCustomerDetails: Oe,
|
|
179
180
|
form: {
|
|
180
|
-
...
|
|
181
|
-
open:
|
|
182
|
-
counterpartView:
|
|
181
|
+
...q,
|
|
182
|
+
open: C && q.open,
|
|
183
|
+
counterpartView: C ? q.counterpartView : "none",
|
|
183
184
|
counterpartForm: {
|
|
184
|
-
...
|
|
185
|
-
submit: d(
|
|
185
|
+
...q.counterpartForm,
|
|
186
|
+
submit: d(T, q.counterpartForm.submit)
|
|
186
187
|
},
|
|
187
|
-
submit: d(
|
|
188
|
-
submitDraft: d(
|
|
189
|
-
submitPrimary: d(
|
|
188
|
+
submit: d(T, q.submit),
|
|
189
|
+
submitDraft: d(T, q.submitDraft),
|
|
190
|
+
submitPrimary: d(T, q.submitPrimary)
|
|
190
191
|
},
|
|
191
|
-
openCreate:
|
|
192
|
-
measureUnitsOpen:
|
|
193
|
-
openMeasureUnits:
|
|
194
|
-
closeMeasureUnits:
|
|
192
|
+
openCreate: Pe,
|
|
193
|
+
measureUnitsOpen: C && z,
|
|
194
|
+
openMeasureUnits: ke,
|
|
195
|
+
closeMeasureUnits: V,
|
|
195
196
|
actions: {
|
|
196
|
-
...
|
|
197
|
-
actionDialog:
|
|
198
|
-
sendOpen:
|
|
199
|
-
openAction: d(
|
|
200
|
-
confirmAction: d(
|
|
201
|
-
submitSend: d(
|
|
197
|
+
...Y,
|
|
198
|
+
actionDialog: C ? Y.actionDialog : void 0,
|
|
199
|
+
sendOpen: C && Y.sendOpen,
|
|
200
|
+
openAction: d(T, Y.openAction),
|
|
201
|
+
confirmAction: d(T, Y.confirmAction),
|
|
202
|
+
submitSend: d(T, Y.submitSend),
|
|
202
203
|
payment: {
|
|
203
|
-
...
|
|
204
|
-
isOpen:
|
|
205
|
-
save: d(
|
|
206
|
-
confirm: d(
|
|
204
|
+
...Y.payment,
|
|
205
|
+
isOpen: C && Y.payment.isOpen,
|
|
206
|
+
save: d(T, Y.payment.save),
|
|
207
|
+
confirm: d(T, Y.payment.confirm)
|
|
207
208
|
}
|
|
208
209
|
},
|
|
209
210
|
actionsModal: {
|
|
210
|
-
...
|
|
211
|
-
isOpen:
|
|
212
|
-
send: d(
|
|
213
|
-
saveItems: d(
|
|
211
|
+
...H,
|
|
212
|
+
isOpen: C && H.isOpen,
|
|
213
|
+
send: d(T, H.send),
|
|
214
|
+
saveItems: d(T, H.saveItems)
|
|
214
215
|
},
|
|
215
|
-
handleRowClick:
|
|
216
|
-
handleDetailsActionClick:
|
|
216
|
+
handleRowClick: ze,
|
|
217
|
+
handleDetailsActionClick: Ve
|
|
217
218
|
};
|
|
218
219
|
}
|
|
219
220
|
function d(e, t) {
|
package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
|
|
2
|
-
var e = "@tesouro/embedded-components-react", t = "0.5.
|
|
2
|
+
var e = "@tesouro/embedded-components-react", t = "0.5.275", n = "2217cd3c5d18126e2fa27a854a1770b84bdbb2f2", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|