@tesouro/embedded-components-react 0.5.148 → 0.5.149
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/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index11.js +11 -8
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index2.js +5 -2
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index3.js +5 -2
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index4.js +5 -2
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/data-access/dist/index5.js +21 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index10.js +14 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index11.js +17 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index15.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index17.js +43 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index18.js +9 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index8.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index9.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +52 -49
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index6.js +7 -4
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index7.js +10 -7
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index8.js +7 -4
- package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/data-access/dist/index7.js +5 -2
- package/dist/libs/tesouro-embedded-components-react/cards-widget/data-access/dist/index2.js +5 -2
- package/dist/libs/tesouro-embedded-components-react/cards-widget/data-access/dist/index3.js +5 -2
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/data-access/dist/index2.js +12 -6
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/data-access/dist/index3.js +12 -6
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index2.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index3.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index6.js +30 -15
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/data-access/dist/index4.js +5 -2
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/data-access/dist/index2.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/data-access/dist/index3.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/data-access/dist/index4.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/settings-widget/profile/data-access/dist/index2.js +7 -4
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index10.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index2.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index7.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index8.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index12.js +7 -4
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index13.js +5 -2
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/data-access/dist/lib/approvalPoliciesApi.js +16 -13
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index3.js +12 -6
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index5.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index7.js +12 -6
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/EmbedApiContext.js +9 -6
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/applicationStatusQueryOptions.js +4 -1
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/bank-account/useAllBankAccountsQuery.js +14 -14
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/disclosures/useDisclosuresQuery.js +15 -12
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/merchant-category-group/useAllMerchantCategoryGroupsQuery.js +17 -14
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/reference-data/useLedgerAccountsQuery.js +23 -17
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/reference-data/usePaymentTermsQuery.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/role/useAllOrganizationRolesQuery.js +17 -14
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/role/useRolePermissionsQueries.js +19 -16
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useCurrentUserQuery.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useGetUserDataQuery.js +12 -9
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/user/useAllOrganizationUsersQuery.js +19 -16
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/withAuthEpoch.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/shared/expense-requirements/data-access/dist/index3.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/RootWidgetProvider.js +99 -98
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetProvider.js +139 -138
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/useWidgetFetch.js +11 -10
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index2.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index3.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index8.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index9.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/data-access/dist/index6.js +16 -13
- package/package.json +7 -1
|
@@ -22,107 +22,110 @@ function g({ onOpenBill: g, labels: _ } = {}) {
|
|
|
22
22
|
let v = {
|
|
23
23
|
...l,
|
|
24
24
|
..._
|
|
25
|
-
}, y = _?.tooManyFilesError ?? l.tooManyFilesError, b = _?.remainingCapacityError ?? l.remainingCapacityError, { client: x, organizationId: S, authEpoch: C } = r(),
|
|
26
|
-
queryKey:
|
|
27
|
-
queryFn: () =>
|
|
25
|
+
}, y = _?.tooManyFilesError ?? l.tooManyFilesError, b = _?.remainingCapacityError ?? l.remainingCapacityError, { client: x, organizationId: S, authEpoch: C, organizationPending: w } = r(), T = h(), E = f(() => c(S), [S]), D = o(), [O, k] = p(!1), { data: A = [] } = m({
|
|
26
|
+
queryKey: E,
|
|
27
|
+
queryFn: () => T.getQueryData(E) ?? [],
|
|
28
28
|
staleTime: Infinity,
|
|
29
29
|
gcTime: Infinity,
|
|
30
30
|
initialData: []
|
|
31
|
-
}),
|
|
32
|
-
|
|
31
|
+
}), j = u((e, t) => {
|
|
32
|
+
T.setQueryData(E, (n) => (n ?? []).map((n) => n.localId === e ? {
|
|
33
33
|
...n,
|
|
34
34
|
...t
|
|
35
35
|
} : n));
|
|
36
|
-
}, [
|
|
37
|
-
|
|
38
|
-
}, [
|
|
39
|
-
let n = (
|
|
36
|
+
}, [T, E]), M = u((e) => {
|
|
37
|
+
T.setQueryData(E, (t) => (t ?? []).filter((t) => t.localId !== e));
|
|
38
|
+
}, [T, E]), N = u((t) => {
|
|
39
|
+
let n = (T.getQueryData(E) ?? []).filter((e) => e.status === "uploading").length;
|
|
40
40
|
if (t.length + n > 10) {
|
|
41
41
|
e.error(n > 0 ? b(10 - n) : y(10));
|
|
42
42
|
return;
|
|
43
43
|
}
|
|
44
|
-
|
|
44
|
+
k(!1);
|
|
45
45
|
for (let e of t) {
|
|
46
46
|
let t = crypto.randomUUID();
|
|
47
|
-
|
|
47
|
+
T.setQueryData(E, (n) => [...n ?? [], {
|
|
48
48
|
localId: t,
|
|
49
49
|
fileName: e.name,
|
|
50
50
|
status: "uploading"
|
|
51
|
-
}]),
|
|
51
|
+
}]), D.mutateAsync({ file: e }).then((e) => j(t, { payableId: e?.id })).catch(() => j(t, { status: "failed" }));
|
|
52
52
|
}
|
|
53
53
|
}, [
|
|
54
|
-
|
|
55
|
-
w,
|
|
54
|
+
j,
|
|
56
55
|
T,
|
|
56
|
+
E,
|
|
57
57
|
b,
|
|
58
58
|
y,
|
|
59
|
-
|
|
60
|
-
]),
|
|
59
|
+
D
|
|
60
|
+
]), P = s({ payableIds: A.filter((e) => e.status === "uploading" && e.payableId).map((e) => e.payableId) });
|
|
61
61
|
d(() => {
|
|
62
62
|
let e = /* @__PURE__ */ new Set();
|
|
63
|
-
for (let t of
|
|
63
|
+
for (let t of P) if (t.suspectedDuplicateOf.length !== 0) {
|
|
64
64
|
e.add(t.payableId);
|
|
65
65
|
for (let n of t.suspectedDuplicateOf) e.add(n);
|
|
66
66
|
}
|
|
67
|
-
for (let { payableId: t, ocrStatus: n, isError: r } of
|
|
68
|
-
let i =
|
|
69
|
-
i && (n === "success" ?
|
|
67
|
+
for (let { payableId: t, ocrStatus: n, isError: r } of P) {
|
|
68
|
+
let i = A.find((e) => e.payableId === t && e.status === "uploading");
|
|
69
|
+
i && (n === "success" ? j(i.localId, { status: e.has(t) ? "duplicate" : "ready" }) : (r || n === "error" || n === "canceled") && j(i.localId, { status: "failed" }));
|
|
70
70
|
}
|
|
71
|
-
for (let t of
|
|
71
|
+
for (let t of A) t.status === "ready" && t.payableId && e.has(t.payableId) && j(t.localId, { status: "duplicate" });
|
|
72
72
|
}, [
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
73
|
+
A,
|
|
74
|
+
P,
|
|
75
|
+
j
|
|
76
76
|
]);
|
|
77
|
-
let
|
|
77
|
+
let F = A.filter((e) => e.status === "uploading"), I = A.filter((e) => e.status === "ready"), L = A.filter((e) => e.status === "duplicate"), R = A.filter((e) => e.status === "failed"), z = (r) => ({
|
|
78
78
|
id: r.localId,
|
|
79
79
|
fileName: r.fileName,
|
|
80
80
|
status: r.status,
|
|
81
81
|
onOpen: (r.status === "ready" || r.status === "duplicate") && r.payableId && g ? () => {
|
|
82
82
|
let o = r.payableId;
|
|
83
|
-
|
|
83
|
+
T.fetchQuery({
|
|
84
84
|
...n(t({
|
|
85
85
|
client: x,
|
|
86
86
|
headers: i(S),
|
|
87
87
|
path: { payable_id: o }
|
|
88
|
-
}),
|
|
88
|
+
}), {
|
|
89
|
+
authEpoch: C,
|
|
90
|
+
organizationPending: w
|
|
91
|
+
}),
|
|
89
92
|
retry: !1
|
|
90
93
|
}).catch((e) => {
|
|
91
94
|
if (a(e)) return "deleted";
|
|
92
95
|
}).then((t) => {
|
|
93
|
-
t === "deleted" ? e.error(v.billDeletedError) : g(o),
|
|
96
|
+
t === "deleted" ? e.error(v.billDeletedError) : g(o), M(r.localId);
|
|
94
97
|
});
|
|
95
98
|
} : void 0
|
|
96
|
-
}),
|
|
99
|
+
}), B = F.length ? [{
|
|
97
100
|
id: "in-progress",
|
|
98
|
-
items:
|
|
101
|
+
items: A.map(z)
|
|
99
102
|
}] : [
|
|
100
|
-
...
|
|
103
|
+
...I.length ? [{
|
|
101
104
|
id: "ready",
|
|
102
|
-
caption: v.readyCaption(
|
|
103
|
-
items:
|
|
105
|
+
caption: v.readyCaption(I.length),
|
|
106
|
+
items: I.map(z)
|
|
104
107
|
}] : [],
|
|
105
|
-
...
|
|
108
|
+
...L.length ? [{
|
|
106
109
|
id: "duplicate",
|
|
107
|
-
caption: v.duplicateCaption(
|
|
108
|
-
items:
|
|
110
|
+
caption: v.duplicateCaption(L.length),
|
|
111
|
+
items: L.map(z)
|
|
109
112
|
}] : [],
|
|
110
|
-
...
|
|
113
|
+
...R.length ? [{
|
|
111
114
|
id: "failed",
|
|
112
|
-
caption: v.failedCaption(
|
|
113
|
-
items:
|
|
115
|
+
caption: v.failedCaption(R.length),
|
|
116
|
+
items: R.map(z)
|
|
114
117
|
}] : []
|
|
115
|
-
],
|
|
116
|
-
|
|
117
|
-
}, [
|
|
118
|
+
], V = I.length + L.length, H = F.length ? v.uploadingSummary(A.length) : V ? v.completeSummary(V) : v.failedCaption(R.length), U = u(() => {
|
|
119
|
+
T.setQueryData(E, []);
|
|
120
|
+
}, [T, E]);
|
|
118
121
|
return {
|
|
119
|
-
enqueue:
|
|
120
|
-
sections:
|
|
121
|
-
summaryLabel:
|
|
122
|
-
collapsed:
|
|
123
|
-
onToggleCollapsed: u(() =>
|
|
124
|
-
onClose:
|
|
125
|
-
isVisible:
|
|
122
|
+
enqueue: N,
|
|
123
|
+
sections: B,
|
|
124
|
+
summaryLabel: H,
|
|
125
|
+
collapsed: O,
|
|
126
|
+
onToggleCollapsed: u(() => k((e) => !e), []),
|
|
127
|
+
onClose: U,
|
|
128
|
+
isVisible: A.length > 0
|
|
126
129
|
};
|
|
127
130
|
}
|
|
128
131
|
//#endregion
|
package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index6.js
CHANGED
|
@@ -11,15 +11,18 @@ import { withNotFoundOutcome as i } from "./index5.js";
|
|
|
11
11
|
import { useQuery as a } from "@tanstack/react-query";
|
|
12
12
|
//#region ../../libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index6.js
|
|
13
13
|
function o({ cardId: o, enabled: s }) {
|
|
14
|
-
let { client: c, organizationId: l, widgetToken: u, authEpoch: d } = n(),
|
|
14
|
+
let { client: c, organizationId: l, widgetToken: u, authEpoch: d, organizationPending: f } = n(), p = e({
|
|
15
15
|
client: c,
|
|
16
16
|
headers: r(l),
|
|
17
17
|
path: { cardId: o ?? "" }
|
|
18
|
-
}),
|
|
19
|
-
...t(
|
|
18
|
+
}), m = a({
|
|
19
|
+
...t(p, {
|
|
20
|
+
authEpoch: d,
|
|
21
|
+
organizationPending: f
|
|
22
|
+
}),
|
|
20
23
|
enabled: !!(o && l && u) && s !== !1
|
|
21
24
|
});
|
|
22
|
-
return i(
|
|
25
|
+
return i(m);
|
|
23
26
|
}
|
|
24
27
|
//#endregion
|
|
25
28
|
export { o as useCreditCardDetailsQuery };
|
package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index7.js
CHANGED
|
@@ -11,21 +11,24 @@ import "../../../shared/data-access/dist/index.js";
|
|
|
11
11
|
import { useQuery as a } from "@tanstack/react-query";
|
|
12
12
|
//#region ../../libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index7.js
|
|
13
13
|
function o({ cardId: o, enabled: s }) {
|
|
14
|
-
let { client: c, organizationId: l, widgetToken: u, authEpoch: d } = n(),
|
|
14
|
+
let { client: c, organizationId: l, widgetToken: u, authEpoch: d, organizationPending: f } = n(), p = !!(o && l && u) && s, m = p ? o ?? "" : "", h = e({
|
|
15
15
|
client: c,
|
|
16
16
|
headers: r(l),
|
|
17
|
-
path: { id:
|
|
18
|
-
}),
|
|
19
|
-
...t(
|
|
20
|
-
|
|
17
|
+
path: { id: m }
|
|
18
|
+
}), g = a({
|
|
19
|
+
...t(h, {
|
|
20
|
+
authEpoch: d,
|
|
21
|
+
organizationPending: f
|
|
22
|
+
}),
|
|
23
|
+
enabled: p,
|
|
21
24
|
staleTime: 0,
|
|
22
25
|
gcTime: 0,
|
|
23
26
|
retry: !1,
|
|
24
27
|
placeholderData: void 0
|
|
25
28
|
});
|
|
26
29
|
return {
|
|
27
|
-
...
|
|
28
|
-
isForbidden:
|
|
30
|
+
...g,
|
|
31
|
+
isForbidden: g.isError && i(g.error)
|
|
29
32
|
};
|
|
30
33
|
}
|
|
31
34
|
//#endregion
|
package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index8.js
CHANGED
|
@@ -11,15 +11,18 @@ import { withNotFoundOutcome as i } from "./index5.js";
|
|
|
11
11
|
import { useQuery as a } from "@tanstack/react-query";
|
|
12
12
|
//#region ../../libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index8.js
|
|
13
13
|
function o({ cardId: o, enabled: s }) {
|
|
14
|
-
let { client: c, organizationId: l, widgetToken: u, authEpoch: d } = n(),
|
|
14
|
+
let { client: c, organizationId: l, widgetToken: u, authEpoch: d, organizationPending: f } = n(), p = e({
|
|
15
15
|
client: c,
|
|
16
16
|
headers: r(l),
|
|
17
17
|
path: { id: o ?? "" }
|
|
18
|
-
}),
|
|
19
|
-
...t(
|
|
18
|
+
}), m = a({
|
|
19
|
+
...t(p, {
|
|
20
|
+
authEpoch: d,
|
|
21
|
+
organizationPending: f
|
|
22
|
+
}),
|
|
20
23
|
enabled: !!(o && l && u) && s !== !1
|
|
21
24
|
});
|
|
22
|
-
return i(
|
|
25
|
+
return i(m);
|
|
23
26
|
}
|
|
24
27
|
//#endregion
|
|
25
28
|
export { o as useDebitCardDetailsQuery };
|
|
@@ -9,12 +9,15 @@ import "../../../../shared/data-access/dist/index.js";
|
|
|
9
9
|
import { useQuery as r } from "@tanstack/react-query";
|
|
10
10
|
//#region ../../libs/tesouro-embedded-components-react/cards-widget/create-card/data-access/dist/index7.js
|
|
11
11
|
function i({ enabled: i } = {}) {
|
|
12
|
-
let { client: a, organizationId: o, widgetToken: s, authEpoch: c } = n(),
|
|
12
|
+
let { client: a, organizationId: o, widgetToken: s, authEpoch: c, organizationPending: l } = n(), u = e({
|
|
13
13
|
client: a,
|
|
14
14
|
path: { organizationId: o ?? "" }
|
|
15
15
|
});
|
|
16
16
|
return r({
|
|
17
|
-
...t(
|
|
17
|
+
...t(u, {
|
|
18
|
+
authEpoch: c,
|
|
19
|
+
organizationPending: l
|
|
20
|
+
}),
|
|
18
21
|
enabled: !!(o && s) && (i === !0 || i === void 0)
|
|
19
22
|
});
|
|
20
23
|
}
|
|
@@ -10,13 +10,16 @@ import "../../../shared/data-access/dist/index.js";
|
|
|
10
10
|
import { useQuery as i } from "@tanstack/react-query";
|
|
11
11
|
//#region ../../libs/tesouro-embedded-components-react/cards-widget/data-access/dist/index2.js
|
|
12
12
|
function a({ enabled: a, ...o } = {}) {
|
|
13
|
-
let { client: s, organizationId: c, widgetToken: l, authEpoch: u } = n(),
|
|
13
|
+
let { client: s, organizationId: c, widgetToken: l, authEpoch: u, organizationPending: d } = n(), f = e({
|
|
14
14
|
query: o,
|
|
15
15
|
client: s,
|
|
16
16
|
headers: r(c)
|
|
17
17
|
});
|
|
18
18
|
return i({
|
|
19
|
-
...t(
|
|
19
|
+
...t(f, {
|
|
20
|
+
authEpoch: u,
|
|
21
|
+
organizationPending: d
|
|
22
|
+
}, { carryWithinOrg: !0 }),
|
|
20
23
|
enabled: !!(c && l) && (a === !0 || a === void 0)
|
|
21
24
|
});
|
|
22
25
|
}
|
|
@@ -10,13 +10,16 @@ import "../../../shared/data-access/dist/index.js";
|
|
|
10
10
|
import { useQuery as i } from "@tanstack/react-query";
|
|
11
11
|
//#region ../../libs/tesouro-embedded-components-react/cards-widget/data-access/dist/index3.js
|
|
12
12
|
function a({ enabled: a, ...o } = {}) {
|
|
13
|
-
let { client: s, organizationId: c, widgetToken: l, authEpoch: u } = n(),
|
|
13
|
+
let { client: s, organizationId: c, widgetToken: l, authEpoch: u, organizationPending: d } = n(), f = e({
|
|
14
14
|
query: o,
|
|
15
15
|
client: s,
|
|
16
16
|
headers: r(c)
|
|
17
17
|
});
|
|
18
18
|
return i({
|
|
19
|
-
...t(
|
|
19
|
+
...t(f, {
|
|
20
|
+
authEpoch: u,
|
|
21
|
+
organizationPending: d
|
|
22
|
+
}, { carryWithinOrg: !0 }),
|
|
20
23
|
enabled: !!(c && l) && (a === !0 || a === void 0)
|
|
21
24
|
});
|
|
22
25
|
}
|
package/dist/libs/tesouro-embedded-components-react/counterparts-widget/data-access/dist/index2.js
CHANGED
|
@@ -10,7 +10,7 @@ import "../../../shared/data-access/dist/index.js";
|
|
|
10
10
|
import { useQuery as a } from "@tanstack/react-query";
|
|
11
11
|
//#region ../../libs/tesouro-embedded-components-react/counterparts-widget/data-access/dist/index2.js
|
|
12
12
|
function o({ metric: e = "total_amount", type: o, statusIn: s, counterpartIdIn: c, enabled: l } = {}) {
|
|
13
|
-
let { client: u, organizationId: d, widgetToken: f, authEpoch: p } = r(),
|
|
13
|
+
let { client: u, organizationId: d, widgetToken: f, authEpoch: p, organizationPending: m } = r(), h = c == null || c.length > 0, g = !!(d && f) && h && (l === !0 || l === void 0), _ = t({
|
|
14
14
|
client: u,
|
|
15
15
|
headers: i(d),
|
|
16
16
|
query: {
|
|
@@ -23,12 +23,15 @@ function o({ metric: e = "total_amount", type: o, statusIn: s, counterpartIdIn:
|
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
25
|
return a({
|
|
26
|
-
...n(
|
|
27
|
-
|
|
26
|
+
...n(_, {
|
|
27
|
+
authEpoch: p,
|
|
28
|
+
organizationPending: m
|
|
29
|
+
}),
|
|
30
|
+
enabled: g
|
|
28
31
|
});
|
|
29
32
|
}
|
|
30
33
|
function s({ metric: t = "total_amount", statusIn: o, counterpartIdIn: s, enabled: c } = {}) {
|
|
31
|
-
let { client: l, organizationId: u, widgetToken: d, authEpoch: f } = r(),
|
|
34
|
+
let { client: l, organizationId: u, widgetToken: d, authEpoch: f, organizationPending: p } = r(), m = s == null || s.length > 0, h = !!(u && d) && m && (c === !0 || c === void 0), g = e({
|
|
32
35
|
client: l,
|
|
33
36
|
headers: i(u),
|
|
34
37
|
query: {
|
|
@@ -40,8 +43,11 @@ function s({ metric: t = "total_amount", statusIn: o, counterpartIdIn: s, enable
|
|
|
40
43
|
}
|
|
41
44
|
});
|
|
42
45
|
return a({
|
|
43
|
-
...n(
|
|
44
|
-
|
|
46
|
+
...n(g, {
|
|
47
|
+
authEpoch: f,
|
|
48
|
+
organizationPending: p
|
|
49
|
+
}),
|
|
50
|
+
enabled: h
|
|
45
51
|
});
|
|
46
52
|
}
|
|
47
53
|
//#endregion
|
package/dist/libs/tesouro-embedded-components-react/counterparts-widget/data-access/dist/index3.js
CHANGED
|
@@ -24,7 +24,7 @@ var o = [
|
|
|
24
24
|
"paid"
|
|
25
25
|
];
|
|
26
26
|
function c({ counterpartId: t, enabled: s }) {
|
|
27
|
-
let { client: c, organizationId: l, widgetToken: u, authEpoch: d } = r(),
|
|
27
|
+
let { client: c, organizationId: l, widgetToken: u, authEpoch: d, organizationPending: f } = r(), p = !!(l && u && t) && (s === !0 || s === void 0), m = e({
|
|
28
28
|
client: c,
|
|
29
29
|
headers: i(l),
|
|
30
30
|
query: {
|
|
@@ -36,12 +36,15 @@ function c({ counterpartId: t, enabled: s }) {
|
|
|
36
36
|
}
|
|
37
37
|
});
|
|
38
38
|
return a({
|
|
39
|
-
...n(
|
|
40
|
-
|
|
39
|
+
...n(m, {
|
|
40
|
+
authEpoch: d,
|
|
41
|
+
organizationPending: f
|
|
42
|
+
}),
|
|
43
|
+
enabled: p
|
|
41
44
|
});
|
|
42
45
|
}
|
|
43
46
|
function l({ counterpartId: e, enabled: o }) {
|
|
44
|
-
let { client: c, organizationId: l, widgetToken: u, authEpoch: d } = r(),
|
|
47
|
+
let { client: c, organizationId: l, widgetToken: u, authEpoch: d, organizationPending: f } = r(), p = !!(l && u && e) && (o === !0 || o === void 0), m = t({
|
|
45
48
|
client: c,
|
|
46
49
|
headers: i(l),
|
|
47
50
|
query: {
|
|
@@ -54,8 +57,11 @@ function l({ counterpartId: e, enabled: o }) {
|
|
|
54
57
|
}
|
|
55
58
|
});
|
|
56
59
|
return a({
|
|
57
|
-
...n(
|
|
58
|
-
|
|
60
|
+
...n(m, {
|
|
61
|
+
authEpoch: d,
|
|
62
|
+
organizationPending: f
|
|
63
|
+
}),
|
|
64
|
+
enabled: p
|
|
59
65
|
});
|
|
60
66
|
}
|
|
61
67
|
//#endregion
|
|
@@ -9,14 +9,17 @@ import "../../../shared/data-access/dist/index.js";
|
|
|
9
9
|
import { useQuery as r } from "@tanstack/react-query";
|
|
10
10
|
//#region ../../libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index2.js
|
|
11
11
|
function i({ enabled: i, ...a } = {}) {
|
|
12
|
-
let { client: o, organizationId: s, widgetToken: c, authEpoch: l } = n(),
|
|
12
|
+
let { client: o, organizationId: s, widgetToken: c, authEpoch: l, organizationPending: u } = n(), d = !!(s && c) && (i === !0 || i === void 0), f = e({
|
|
13
13
|
query: a,
|
|
14
14
|
client: o,
|
|
15
15
|
headers: { "x-organization-id": s ?? "" }
|
|
16
16
|
});
|
|
17
17
|
return r({
|
|
18
|
-
...t(
|
|
19
|
-
|
|
18
|
+
...t(f, {
|
|
19
|
+
authEpoch: l,
|
|
20
|
+
organizationPending: u
|
|
21
|
+
}),
|
|
22
|
+
enabled: d
|
|
20
23
|
});
|
|
21
24
|
}
|
|
22
25
|
//#endregion
|
|
@@ -9,14 +9,17 @@ import "../../../shared/data-access/dist/index.js";
|
|
|
9
9
|
import { useQuery as r } from "@tanstack/react-query";
|
|
10
10
|
//#region ../../libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index3.js
|
|
11
11
|
function i({ enabled: i, ...a } = {}) {
|
|
12
|
-
let { client: o, organizationId: s, widgetToken: c, authEpoch: l } = n(),
|
|
12
|
+
let { client: o, organizationId: s, widgetToken: c, authEpoch: l, organizationPending: u } = n(), d = !!(s && c) && (i === !0 || i === void 0), f = e({
|
|
13
13
|
query: a,
|
|
14
14
|
client: o,
|
|
15
15
|
headers: { "x-organization-id": s ?? "" }
|
|
16
16
|
});
|
|
17
17
|
return r({
|
|
18
|
-
...t(
|
|
19
|
-
|
|
18
|
+
...t(f, {
|
|
19
|
+
authEpoch: l,
|
|
20
|
+
organizationPending: u
|
|
21
|
+
}, { carryWithinOrg: !0 }),
|
|
22
|
+
enabled: d
|
|
20
23
|
});
|
|
21
24
|
}
|
|
22
25
|
//#endregion
|
package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index6.js
CHANGED
|
@@ -10,60 +10,75 @@ import "../../../shared/data-access/dist/index.js";
|
|
|
10
10
|
import { useQuery as c } from "@tanstack/react-query";
|
|
11
11
|
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index6.js
|
|
12
12
|
function l({ enabled: e, ...t } = {}) {
|
|
13
|
-
let { client: n, organizationId: r, widgetToken: l, authEpoch: u } = o(),
|
|
13
|
+
let { client: n, organizationId: r, widgetToken: l, authEpoch: u, organizationPending: d } = o(), f = !!(r && l) && (e === !0 || e === void 0), p = i({
|
|
14
14
|
client: n,
|
|
15
15
|
headers: s(r),
|
|
16
16
|
query: t
|
|
17
17
|
});
|
|
18
18
|
return c({
|
|
19
|
-
...a(
|
|
20
|
-
|
|
19
|
+
...a(p, {
|
|
20
|
+
authEpoch: u,
|
|
21
|
+
organizationPending: d
|
|
22
|
+
}, { carryWithinOrg: !0 }),
|
|
23
|
+
enabled: f
|
|
21
24
|
});
|
|
22
25
|
}
|
|
23
26
|
function u(e, { enabled: t = !0 } = {}) {
|
|
24
|
-
let { client: r, organizationId: i, widgetToken: l, authEpoch: u } = o(),
|
|
27
|
+
let { client: r, organizationId: i, widgetToken: l, authEpoch: u, organizationPending: d } = o(), f = !!(i && l && e) && t, p = n({
|
|
25
28
|
client: r,
|
|
26
29
|
headers: s(i),
|
|
27
30
|
path: { receivable_id: e ?? "" }
|
|
28
31
|
});
|
|
29
32
|
return c({
|
|
30
|
-
...a(
|
|
31
|
-
|
|
33
|
+
...a(p, {
|
|
34
|
+
authEpoch: u,
|
|
35
|
+
organizationPending: d
|
|
36
|
+
}),
|
|
37
|
+
enabled: f
|
|
32
38
|
});
|
|
33
39
|
}
|
|
34
40
|
function d(t, { enabled: n, ...r } = {}) {
|
|
35
|
-
let { client: i, organizationId: l, widgetToken: u, authEpoch: d } = o(),
|
|
41
|
+
let { client: i, organizationId: l, widgetToken: u, authEpoch: d, organizationPending: f } = o(), p = !!(l && u && t) && (n === !0 || n === void 0), m = e({
|
|
36
42
|
client: i,
|
|
37
43
|
headers: s(l),
|
|
38
44
|
path: { receivable_id: t ?? "" },
|
|
39
45
|
query: r
|
|
40
46
|
});
|
|
41
47
|
return c({
|
|
42
|
-
...a(
|
|
43
|
-
|
|
48
|
+
...a(m, {
|
|
49
|
+
authEpoch: d,
|
|
50
|
+
organizationPending: f
|
|
51
|
+
}),
|
|
52
|
+
enabled: p
|
|
44
53
|
});
|
|
45
54
|
}
|
|
46
55
|
function f(e, { enabled: n, ...r } = {}) {
|
|
47
|
-
let { client: i, organizationId: l, widgetToken: u, authEpoch: d } = o(),
|
|
56
|
+
let { client: i, organizationId: l, widgetToken: u, authEpoch: d, organizationPending: f } = o(), p = !!(l && u && e) && (n === !0 || n === void 0), m = t({
|
|
48
57
|
client: i,
|
|
49
58
|
headers: s(l),
|
|
50
59
|
path: { receivable_id: e ?? "" },
|
|
51
60
|
query: r
|
|
52
61
|
});
|
|
53
62
|
return c({
|
|
54
|
-
...a(
|
|
55
|
-
|
|
63
|
+
...a(m, {
|
|
64
|
+
authEpoch: d,
|
|
65
|
+
organizationPending: f
|
|
66
|
+
}),
|
|
67
|
+
enabled: p
|
|
56
68
|
});
|
|
57
69
|
}
|
|
58
70
|
function p(e, { enabled: t = !0 } = {}) {
|
|
59
|
-
let { client: n, organizationId: i, widgetToken: l, authEpoch: u } = o(),
|
|
71
|
+
let { client: n, organizationId: i, widgetToken: l, authEpoch: u, organizationPending: d } = o(), f = !!(i && l && e) && t, p = r({
|
|
60
72
|
client: n,
|
|
61
73
|
headers: s(i),
|
|
62
74
|
path: { receivable_id: e ?? "" }
|
|
63
75
|
});
|
|
64
76
|
return c({
|
|
65
|
-
...a(
|
|
66
|
-
|
|
77
|
+
...a(p, {
|
|
78
|
+
authEpoch: u,
|
|
79
|
+
organizationPending: d
|
|
80
|
+
}),
|
|
81
|
+
enabled: f
|
|
67
82
|
});
|
|
68
83
|
}
|
|
69
84
|
//#endregion
|
|
@@ -10,13 +10,16 @@ import "../../../shared/data-access/dist/index.js";
|
|
|
10
10
|
import { useQuery as i } from "@tanstack/react-query";
|
|
11
11
|
//#region ../../libs/tesouro-embedded-components-react/linked-accounts-widget/data-access/dist/index4.js
|
|
12
12
|
function a({ enabled: a, ...o } = {}) {
|
|
13
|
-
let { client: s, organizationId: c, widgetToken: l, authEpoch: u } = n(),
|
|
13
|
+
let { client: s, organizationId: c, widgetToken: l, authEpoch: u, organizationPending: d } = n(), f = e({
|
|
14
14
|
query: o,
|
|
15
15
|
client: s,
|
|
16
16
|
headers: r(c)
|
|
17
17
|
});
|
|
18
18
|
return i({
|
|
19
|
-
...t(
|
|
19
|
+
...t(f, {
|
|
20
|
+
authEpoch: u,
|
|
21
|
+
organizationPending: d
|
|
22
|
+
}),
|
|
20
23
|
enabled: !!(c && l) && (a === !0 || a === void 0)
|
|
21
24
|
});
|
|
22
25
|
}
|
|
@@ -10,13 +10,16 @@ import "../../../../shared/data-access/dist/index.js";
|
|
|
10
10
|
import { useQuery as i } from "@tanstack/react-query";
|
|
11
11
|
//#region ../../libs/tesouro-embedded-components-react/settings-widget/invoice-settings/data-access/dist/index2.js
|
|
12
12
|
function a() {
|
|
13
|
-
let { client: a, organizationId: o, widgetToken: s, authEpoch: c } = n(),
|
|
13
|
+
let { client: a, organizationId: o, widgetToken: s, authEpoch: c, organizationPending: l } = n(), u = !!(o && s), d = e({
|
|
14
14
|
client: a,
|
|
15
15
|
headers: r(o)
|
|
16
16
|
});
|
|
17
17
|
return i({
|
|
18
|
-
...t(
|
|
19
|
-
|
|
18
|
+
...t(d, {
|
|
19
|
+
authEpoch: c,
|
|
20
|
+
organizationPending: l
|
|
21
|
+
}),
|
|
22
|
+
enabled: u
|
|
20
23
|
});
|
|
21
24
|
}
|
|
22
25
|
//#endregion
|
|
@@ -10,14 +10,17 @@ import "../../../../shared/data-access/dist/index.js";
|
|
|
10
10
|
import { useQuery as i } from "@tanstack/react-query";
|
|
11
11
|
//#region ../../libs/tesouro-embedded-components-react/settings-widget/invoice-settings/data-access/dist/index3.js
|
|
12
12
|
function a(a) {
|
|
13
|
-
let { client: o, organizationId: s, widgetToken: c, authEpoch: l } = n(),
|
|
13
|
+
let { client: o, organizationId: s, widgetToken: c, authEpoch: l, organizationPending: u } = n(), d = !!(s && c && a), f = e({
|
|
14
14
|
client: o,
|
|
15
15
|
headers: r(s),
|
|
16
16
|
path: { entity_id: a ?? "" }
|
|
17
17
|
});
|
|
18
18
|
return i({
|
|
19
|
-
...t(
|
|
20
|
-
|
|
19
|
+
...t(f, {
|
|
20
|
+
authEpoch: l,
|
|
21
|
+
organizationPending: u
|
|
22
|
+
}),
|
|
23
|
+
enabled: d
|
|
21
24
|
});
|
|
22
25
|
}
|
|
23
26
|
//#endregion
|
|
@@ -10,14 +10,17 @@ import "../../../../shared/data-access/dist/index.js";
|
|
|
10
10
|
import { useQuery as i } from "@tanstack/react-query";
|
|
11
11
|
//#region ../../libs/tesouro-embedded-components-react/settings-widget/invoice-settings/data-access/dist/index4.js
|
|
12
12
|
function a(a) {
|
|
13
|
-
let { client: o, organizationId: s, widgetToken: c, authEpoch: l } = n(),
|
|
13
|
+
let { client: o, organizationId: s, widgetToken: c, authEpoch: l, organizationPending: u } = n(), d = !!(s && c && a), f = e({
|
|
14
14
|
client: o,
|
|
15
15
|
headers: r(s),
|
|
16
16
|
path: { entity_id: a ?? "" }
|
|
17
17
|
});
|
|
18
18
|
return i({
|
|
19
|
-
...t(
|
|
20
|
-
|
|
19
|
+
...t(f, {
|
|
20
|
+
authEpoch: l,
|
|
21
|
+
organizationPending: u
|
|
22
|
+
}),
|
|
23
|
+
enabled: d
|
|
21
24
|
});
|
|
22
25
|
}
|
|
23
26
|
//#endregion
|
|
@@ -11,15 +11,18 @@ import "../../../../shared/data-access/dist/index.js";
|
|
|
11
11
|
import { useQuery as a } from "@tanstack/react-query";
|
|
12
12
|
//#region ../../libs/tesouro-embedded-components-react/settings-widget/profile/data-access/dist/index2.js
|
|
13
13
|
function o({ enabled: o } = {}) {
|
|
14
|
-
let { client: s, organizationId: c, widgetToken: l, authEpoch: u } = n(),
|
|
14
|
+
let { client: s, organizationId: c, widgetToken: l, authEpoch: u, organizationPending: d } = n(), f = !!(c && l) && (o === !0 || o === void 0);
|
|
15
15
|
return {
|
|
16
|
-
userQuery: i({ enabled:
|
|
16
|
+
userQuery: i({ enabled: f }),
|
|
17
17
|
entityQuery: a({
|
|
18
18
|
...t(e({
|
|
19
19
|
client: s,
|
|
20
20
|
headers: r(c)
|
|
21
|
-
}),
|
|
22
|
-
|
|
21
|
+
}), {
|
|
22
|
+
authEpoch: u,
|
|
23
|
+
organizationPending: d
|
|
24
|
+
}),
|
|
25
|
+
enabled: f
|
|
23
26
|
})
|
|
24
27
|
};
|
|
25
28
|
}
|
package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index10.js
CHANGED
|
@@ -11,14 +11,17 @@ import { useQuery as i } from "@tanstack/react-query";
|
|
|
11
11
|
//#region ../../libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index10.js
|
|
12
12
|
var a = 100;
|
|
13
13
|
function o(o = a) {
|
|
14
|
-
let { client: s, organizationId: c, widgetToken: l, authEpoch: u } = n(),
|
|
14
|
+
let { client: s, organizationId: c, widgetToken: l, authEpoch: u, organizationPending: d } = n(), f = !!(c && l), p = e({
|
|
15
15
|
query: { limit: o },
|
|
16
16
|
client: s,
|
|
17
17
|
headers: r(c)
|
|
18
18
|
});
|
|
19
19
|
return i({
|
|
20
|
-
...t(
|
|
21
|
-
|
|
20
|
+
...t(p, {
|
|
21
|
+
authEpoch: u,
|
|
22
|
+
organizationPending: d
|
|
23
|
+
}),
|
|
24
|
+
enabled: f
|
|
22
25
|
});
|
|
23
26
|
}
|
|
24
27
|
//#endregion
|