@tesouro/embedded-components-react 0.5.187 → 0.5.189
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 +19 -9
- package/dist/index.css +110 -0
- package/dist/index.d.ts +233 -60
- package/dist/index.js +6 -6
- package/dist/lib/ExpenseManagementWidget.d.ts +189 -11
- package/dist/lib/ExpenseManagementWidget.js +1 -1
- package/dist/lib/UploadReceiptWidget.js +1 -1
- package/dist/lib/WidgetSuite.d.ts +213 -16
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index.js +17 -3
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index10.js +36 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index11.js +71 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index12.js +39 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index13.js +32 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index14.js +110 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index15.js +33 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index16.js +19 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index17.js +33 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index18.js +28 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index19.js +35 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index20.js +28 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index21.js +164 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index4.js +25 -18
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index5.js +20 -34
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index6.js +16 -20
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index7.js +16 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index8.js +32 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index9.js +26 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index.js +10 -7
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index10.js +162 -59
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index11.js +64 -16
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index12.js +73 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index13.js +348 -42
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index14.js +42 -1
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index15.js +143 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index16.js +229 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index17.js +196 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index18.js +13 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index19.js +91 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index2.js +89 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index20.js +39 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index21.js +297 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index22.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index23.js +4 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index24.js +256 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index25.js +22 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index26.js +10 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index27.js +223 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index3.js +2 -254
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index4.js +4 -20
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index5.js +262 -8
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index6.js +2 -221
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index7.js +54 -80
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index8.js +24 -254
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index9.js +18 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/index.js +34 -13
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/AccordionItemCard/AccordionItemCard.js +549 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/AccordionItemCard/labels.js +38 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ActionItemsList/ActionItemsList.js +64 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ActionItemsList/labels.js +7 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseStatusBadge/ExpenseStatusBadge.js +18 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseStatusBadge/badgeTones.js +16 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseStatusBadge/labels.js +13 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpensesHeader/ExpensesHeader.js +37 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpensesHeader/labels.js +7 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpensesScreen/ExpensesScreen.js +112 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpensesScreen/labels.js +11 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpensesTransactionsFilterBar/ExpensesTransactionsFilterBar.js +158 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpensesTransactionsFilterBar/labels.js +18 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpensesTransactionsTable/ExpensesTransactionsTable.js +148 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpensesTransactionsTable/labels.js +18 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/FileViewer/FileViewer.js +107 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/FileViewer/PdfFileViewer.js +37 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/FileViewer/labels.js +11 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ReceiptMatchWidget/lib/ReceiptMatchLauncher.js +2 -24
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ReceiptMatchWidget/lib/ReceiptMatchSidebar.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ReceiptMatchWidget/lib/TransactionsMatchStep.js +62 -65
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ReceiptMatchWidget/lib/labels.js +1 -4
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/TransactionDetails/DeleteReceiptDialog/DeleteReceiptDialog.js +31 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/TransactionDetails/DeleteReceiptDialog/labels.js +9 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/TransactionDetails/TransactionDetails.js +268 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/TransactionDetails/labels.js +21 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/TransactionDetailsActions/BulkProgress.js +26 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/TransactionDetailsActions/TransactionDetailsActions.js +142 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/TransactionDetailsActions/labels.js +20 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/isPdf.js +7 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index109.js +55 -49
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index56.js +24 -18
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index5.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +36 -36
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js +268 -206
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +218 -113
- 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/util/dist/lib/formatCalendarDate.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index11.js +16 -14
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index4.js +1 -2
- package/package.json +3 -3
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseManagementWidgetUi/ExpenseManagementWidgetUi.js +0 -71
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseManagementWidgetUi/index.js +0 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseManagementWidgetUi/labels.js +0 -10
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { getAnalyticsReceiptsOptions as e } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
6
|
+
import { withAuthEpoch as t } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
7
|
+
import { useEmbedApi as n } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
8
|
+
import "../../../shared/data-access/dist/index.js";
|
|
9
|
+
import { useQuery as r } from "@tanstack/react-query";
|
|
10
|
+
//#region ../../libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index17.js
|
|
11
|
+
function i({ enabled: i, ...a } = {}) {
|
|
12
|
+
let { client: o, organizationId: s, widgetToken: c, authEpoch: l, organizationPending: u } = n(), d = !!(s && c) && (i === !0 || i === void 0), f = e({
|
|
13
|
+
query: {
|
|
14
|
+
...a,
|
|
15
|
+
metric: "id",
|
|
16
|
+
aggregation_function: "count"
|
|
17
|
+
},
|
|
18
|
+
client: o,
|
|
19
|
+
headers: { "x-organization-id": s ?? "" }
|
|
20
|
+
}), p = r({
|
|
21
|
+
...t(f, {
|
|
22
|
+
authEpoch: l,
|
|
23
|
+
organizationPending: u
|
|
24
|
+
}),
|
|
25
|
+
enabled: d
|
|
26
|
+
}), m = p.data?.data?.[0]?.metric_value;
|
|
27
|
+
return {
|
|
28
|
+
...p,
|
|
29
|
+
count: m
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
//#endregion
|
|
33
|
+
export { i as useExpenseReceiptsCountQuery };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { getTransactionsValidationsOptions as e } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
6
|
+
import { withAuthEpoch as t } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
7
|
+
import { useEmbedApi as n } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
8
|
+
import "../../../shared/data-access/dist/index.js";
|
|
9
|
+
import { useQuery as r } from "@tanstack/react-query";
|
|
10
|
+
//#region ../../libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index18.js
|
|
11
|
+
function i({ enabled: i } = {}) {
|
|
12
|
+
let { client: a, organizationId: o, widgetToken: s, authEpoch: c, organizationPending: l } = n(), u = !!(o && s) && (i === !0 || i === void 0), d = e({
|
|
13
|
+
client: a,
|
|
14
|
+
headers: { "x-organization-id": o ?? "" }
|
|
15
|
+
}), f = r({
|
|
16
|
+
...t(d, {
|
|
17
|
+
authEpoch: c,
|
|
18
|
+
organizationPending: l
|
|
19
|
+
}, { carryWithinOrg: !0 }),
|
|
20
|
+
enabled: u
|
|
21
|
+
});
|
|
22
|
+
return {
|
|
23
|
+
...f,
|
|
24
|
+
requiredFields: f.data?.required_fields ?? []
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
//#endregion
|
|
28
|
+
export { i as useTransactionValidationsQuery };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { getApprovalRequestsOptions as e } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
6
|
+
import { withAuthEpoch as t } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
7
|
+
import { useEmbedApi as n } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
8
|
+
import "../../../shared/data-access/dist/index.js";
|
|
9
|
+
import { useQuery as r } from "@tanstack/react-query";
|
|
10
|
+
//#region ../../libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index19.js
|
|
11
|
+
function i({ transactionId: i, enabled: a } = {}) {
|
|
12
|
+
let { client: o, organizationId: s, widgetToken: c, authEpoch: l, organizationPending: u } = n(), d = !!(s && c && i) && (a === !0 || a === void 0), f = e({
|
|
13
|
+
client: o,
|
|
14
|
+
headers: { "x-organization-id": s ?? "" },
|
|
15
|
+
query: {
|
|
16
|
+
object_id: i,
|
|
17
|
+
object_type: "transaction",
|
|
18
|
+
sort: "created_at",
|
|
19
|
+
order: "desc",
|
|
20
|
+
limit: 1
|
|
21
|
+
}
|
|
22
|
+
}), p = r({
|
|
23
|
+
...t(f, {
|
|
24
|
+
authEpoch: l,
|
|
25
|
+
organizationPending: u
|
|
26
|
+
}),
|
|
27
|
+
enabled: d
|
|
28
|
+
});
|
|
29
|
+
return {
|
|
30
|
+
...p,
|
|
31
|
+
latestRequest: p.data?.data?.[0]
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
//#endregion
|
|
35
|
+
export { i as useGetApprovalRequestsQuery };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { invalidateAllClients as e } from "../../../shared/data-access/dist/lib/clientRegistry.js";
|
|
2
|
+
import "../../../shared/data-access/dist/index.js";
|
|
3
|
+
import { analyticsTransactionsInvalidationKey as t, transactionsIdExpenseHistoryInvalidationKey as n, transactionsIdInvalidationKey as r, transactionsInvalidationKey as i } from "./index10.js";
|
|
4
|
+
//#region ../../libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index20.js
|
|
5
|
+
async function a({ client: a, organizationId: o, transactionId: s }) {
|
|
6
|
+
await Promise.all([
|
|
7
|
+
e(i({
|
|
8
|
+
client: a,
|
|
9
|
+
organizationId: o
|
|
10
|
+
})),
|
|
11
|
+
e(r({
|
|
12
|
+
client: a,
|
|
13
|
+
organizationId: o,
|
|
14
|
+
transactionId: s
|
|
15
|
+
})),
|
|
16
|
+
e(t({
|
|
17
|
+
client: a,
|
|
18
|
+
organizationId: o
|
|
19
|
+
})),
|
|
20
|
+
e(n({
|
|
21
|
+
client: a,
|
|
22
|
+
organizationId: o,
|
|
23
|
+
transactionId: s
|
|
24
|
+
}))
|
|
25
|
+
]);
|
|
26
|
+
}
|
|
27
|
+
//#endregion
|
|
28
|
+
export { a as invalidateTransactionViews };
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { patchTransactionsId as e, postApprovalRequestsIdApprove as t, postApprovalRequestsIdReject as n, postTransactionsIdApprove as r, postTransactionsIdReject as i, postTransactionsIdReopen as a, postTransactionsIdSubmit as o } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
|
|
6
|
+
import { useEmbedApi as s } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
7
|
+
import { organizationHeaders as c } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
8
|
+
import "../../../shared/data-access/dist/index.js";
|
|
9
|
+
import { invalidateTransactionViews as l } from "./index20.js";
|
|
10
|
+
import { useMutation as u } from "@tanstack/react-query";
|
|
11
|
+
//#region ../../libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index21.js
|
|
12
|
+
function d() {
|
|
13
|
+
let { client: e, organizationId: t } = s();
|
|
14
|
+
return u({
|
|
15
|
+
mutationFn: async ({ transactionId: n }) => {
|
|
16
|
+
let { data: i } = await r({
|
|
17
|
+
client: e,
|
|
18
|
+
headers: c(t),
|
|
19
|
+
path: { transaction_id: n },
|
|
20
|
+
throwOnError: !0
|
|
21
|
+
});
|
|
22
|
+
return i;
|
|
23
|
+
},
|
|
24
|
+
onSuccess: async (n, r) => {
|
|
25
|
+
await l({
|
|
26
|
+
client: e,
|
|
27
|
+
organizationId: t,
|
|
28
|
+
transactionId: r.transactionId
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
function f() {
|
|
34
|
+
let { client: e, organizationId: t } = s();
|
|
35
|
+
return u({
|
|
36
|
+
mutationFn: async ({ transactionId: n, rejectReason: r }) => {
|
|
37
|
+
let { data: a } = await i({
|
|
38
|
+
client: e,
|
|
39
|
+
headers: c(t),
|
|
40
|
+
path: { transaction_id: n },
|
|
41
|
+
body: { reject_reason: r },
|
|
42
|
+
throwOnError: !0
|
|
43
|
+
});
|
|
44
|
+
return a;
|
|
45
|
+
},
|
|
46
|
+
onSuccess: async (n, r) => {
|
|
47
|
+
await l({
|
|
48
|
+
client: e,
|
|
49
|
+
organizationId: t,
|
|
50
|
+
transactionId: r.transactionId
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
function p() {
|
|
56
|
+
let { client: e, organizationId: t } = s();
|
|
57
|
+
return u({
|
|
58
|
+
mutationFn: async ({ transactionId: n, body: r }) => {
|
|
59
|
+
let { data: i } = await o({
|
|
60
|
+
client: e,
|
|
61
|
+
headers: c(t),
|
|
62
|
+
path: { transaction_id: n },
|
|
63
|
+
body: r ?? {},
|
|
64
|
+
throwOnError: !0
|
|
65
|
+
});
|
|
66
|
+
return i;
|
|
67
|
+
},
|
|
68
|
+
onSuccess: async (n, r) => {
|
|
69
|
+
await l({
|
|
70
|
+
client: e,
|
|
71
|
+
organizationId: t,
|
|
72
|
+
transactionId: r.transactionId
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
function m() {
|
|
78
|
+
let { client: e, organizationId: t } = s();
|
|
79
|
+
return u({
|
|
80
|
+
mutationFn: async ({ transactionId: n }) => {
|
|
81
|
+
let { data: r } = await a({
|
|
82
|
+
client: e,
|
|
83
|
+
headers: c(t),
|
|
84
|
+
path: { transaction_id: n },
|
|
85
|
+
throwOnError: !0
|
|
86
|
+
});
|
|
87
|
+
return r;
|
|
88
|
+
},
|
|
89
|
+
onSuccess: async (n, r) => {
|
|
90
|
+
await l({
|
|
91
|
+
client: e,
|
|
92
|
+
organizationId: t,
|
|
93
|
+
transactionId: r.transactionId
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
function h() {
|
|
99
|
+
let { client: t, organizationId: n } = s();
|
|
100
|
+
return u({
|
|
101
|
+
mutationFn: async ({ transactionId: r, body: i }) => {
|
|
102
|
+
let { data: a } = await e({
|
|
103
|
+
client: t,
|
|
104
|
+
headers: c(n),
|
|
105
|
+
path: { transaction_id: r },
|
|
106
|
+
body: i,
|
|
107
|
+
throwOnError: !0
|
|
108
|
+
});
|
|
109
|
+
return a;
|
|
110
|
+
},
|
|
111
|
+
onSuccess: async (e, r) => {
|
|
112
|
+
await l({
|
|
113
|
+
client: t,
|
|
114
|
+
organizationId: n,
|
|
115
|
+
transactionId: r.transactionId
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
function g() {
|
|
121
|
+
let { client: e, organizationId: n } = s();
|
|
122
|
+
return u({
|
|
123
|
+
mutationFn: async ({ approvalRequestId: r }) => {
|
|
124
|
+
let { data: i } = await t({
|
|
125
|
+
client: e,
|
|
126
|
+
headers: c(n),
|
|
127
|
+
path: { approval_request_id: r },
|
|
128
|
+
throwOnError: !0
|
|
129
|
+
});
|
|
130
|
+
return i;
|
|
131
|
+
},
|
|
132
|
+
onSuccess: async (t, r) => {
|
|
133
|
+
await l({
|
|
134
|
+
client: e,
|
|
135
|
+
organizationId: n,
|
|
136
|
+
transactionId: r.transactionId
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
function _() {
|
|
142
|
+
let { client: e, organizationId: t } = s();
|
|
143
|
+
return u({
|
|
144
|
+
mutationFn: async ({ approvalRequestId: r, rejectReason: i }) => {
|
|
145
|
+
let { data: a } = await n({
|
|
146
|
+
client: e,
|
|
147
|
+
headers: c(t),
|
|
148
|
+
path: { approval_request_id: r },
|
|
149
|
+
body: { reject_reason: i },
|
|
150
|
+
throwOnError: !0
|
|
151
|
+
});
|
|
152
|
+
return a;
|
|
153
|
+
},
|
|
154
|
+
onSuccess: async (n, r) => {
|
|
155
|
+
await l({
|
|
156
|
+
client: e,
|
|
157
|
+
organizationId: t,
|
|
158
|
+
transactionId: r.transactionId
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
//#endregion
|
|
164
|
+
export { g as useApproveApprovalRequestMutation, d as useApproveTransactionMutation, _ as useRejectApprovalRequestMutation, f as useRejectTransactionMutation, m as useReopenTransactionMutation, p as useSubmitTransactionMutation, h as useUpdateTransactionMutation };
|
|
@@ -1,21 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { listDepartmentsOptions as e } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
6
|
+
import { withAuthEpoch as t } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
7
|
+
import { useEmbedApi as n } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
8
|
+
import { organizationHeaders as r } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
3
9
|
import "../../../shared/data-access/dist/index.js";
|
|
10
|
+
import { useQuery as i } from "@tanstack/react-query";
|
|
4
11
|
//#region ../../libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index4.js
|
|
5
|
-
var a =
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
})
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
12
|
+
var a = 100;
|
|
13
|
+
function o({ enabled: o = !0 } = {}) {
|
|
14
|
+
let { client: s, organizationId: c, widgetToken: l, authEpoch: u, organizationPending: d } = n(), f = e({
|
|
15
|
+
client: s,
|
|
16
|
+
headers: r(c),
|
|
17
|
+
query: { limit: a }
|
|
18
|
+
});
|
|
19
|
+
return i({
|
|
20
|
+
...t(f, {
|
|
21
|
+
authEpoch: u,
|
|
22
|
+
organizationPending: d
|
|
23
|
+
}),
|
|
24
|
+
enabled: !!(c && l) && o
|
|
25
|
+
});
|
|
26
|
+
}
|
|
20
27
|
//#endregion
|
|
21
|
-
export {
|
|
28
|
+
export { o as useOrganizationDepartmentsQuery };
|
|
@@ -2,45 +2,31 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { getEntityUsersOptions as e } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
6
|
+
import { withAuthEpoch as t } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
7
7
|
import { useEmbedApi as n } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
8
8
|
import { organizationHeaders as r } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
9
9
|
import "../../../shared/data-access/dist/index.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
10
|
+
import { useMemo as i } from "react";
|
|
11
|
+
import { useQuery as a } from "@tanstack/react-query";
|
|
12
12
|
//#region ../../libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index5.js
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
let r = n.path.receipt_id, c = n.body?.transaction_id;
|
|
22
|
-
await Promise.all([
|
|
23
|
-
t(a({
|
|
24
|
-
client: l,
|
|
25
|
-
organizationId: u
|
|
26
|
-
})),
|
|
27
|
-
t(s({
|
|
28
|
-
client: l,
|
|
29
|
-
organizationId: u
|
|
30
|
-
})),
|
|
31
|
-
t(i({
|
|
32
|
-
client: l,
|
|
33
|
-
organizationId: u,
|
|
34
|
-
receiptId: r
|
|
35
|
-
})),
|
|
36
|
-
...c ? [t(o({
|
|
37
|
-
client: l,
|
|
38
|
-
organizationId: u,
|
|
39
|
-
transactionId: c
|
|
40
|
-
}))] : []
|
|
41
|
-
]);
|
|
13
|
+
var o = 100;
|
|
14
|
+
function s({ ids: s, enabled: c = !0 }) {
|
|
15
|
+
let { client: l, organizationId: u, widgetToken: d, authEpoch: f, organizationPending: p } = n(), m = i(() => [...new Set(s.filter(Boolean))].sort().slice(0, o), [s]), h = e({
|
|
16
|
+
client: l,
|
|
17
|
+
headers: r(u),
|
|
18
|
+
query: {
|
|
19
|
+
id__in: m,
|
|
20
|
+
limit: o
|
|
42
21
|
}
|
|
43
22
|
});
|
|
23
|
+
return a({
|
|
24
|
+
...t(h, {
|
|
25
|
+
authEpoch: f,
|
|
26
|
+
organizationPending: p
|
|
27
|
+
}),
|
|
28
|
+
enabled: !!(u && d) && c && m.length > 0
|
|
29
|
+
});
|
|
44
30
|
}
|
|
45
31
|
//#endregion
|
|
46
|
-
export {
|
|
32
|
+
export { s as useEntityUsersByIdsQuery };
|
|
@@ -2,31 +2,27 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { listLocationsOptions as e } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
6
|
+
import { withAuthEpoch as t } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
7
7
|
import { useEmbedApi as n } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
8
8
|
import { organizationHeaders as r } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
9
9
|
import "../../../shared/data-access/dist/index.js";
|
|
10
|
-
import {
|
|
11
|
-
import { useMutation as o } from "@tanstack/react-query";
|
|
10
|
+
import { useQuery as i } from "@tanstack/react-query";
|
|
12
11
|
//#region ../../libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index6.js
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
var a = 100;
|
|
13
|
+
function o({ enabled: o = !0 } = {}) {
|
|
14
|
+
let { client: s, organizationId: c, widgetToken: l, authEpoch: u, organizationPending: d } = n(), f = e({
|
|
15
|
+
client: s,
|
|
16
|
+
headers: r(c),
|
|
17
|
+
query: { limit: a }
|
|
18
|
+
});
|
|
19
|
+
return i({
|
|
20
|
+
...t(f, {
|
|
21
|
+
authEpoch: u,
|
|
22
|
+
organizationPending: d
|
|
19
23
|
}),
|
|
20
|
-
|
|
21
|
-
await Promise.all([t(i({
|
|
22
|
-
client: s,
|
|
23
|
-
organizationId: c
|
|
24
|
-
})), t(a({
|
|
25
|
-
client: s,
|
|
26
|
-
organizationId: c
|
|
27
|
-
}))]);
|
|
28
|
-
}
|
|
24
|
+
enabled: !!(c && l) && o
|
|
29
25
|
});
|
|
30
26
|
}
|
|
31
27
|
//#endregion
|
|
32
|
-
export {
|
|
28
|
+
export { o as useOrganizationLocationsQuery };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { useLedgerAccountsQuery as e } from "../../../shared/data-access/dist/lib/reference-data/useLedgerAccountsQuery.js";
|
|
6
|
+
import "../../../shared/data-access/dist/index.js";
|
|
7
|
+
//#region ../../libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index7.js
|
|
8
|
+
var t = 100;
|
|
9
|
+
function n({ enabled: n = !0 } = {}) {
|
|
10
|
+
return e({
|
|
11
|
+
enabled: n,
|
|
12
|
+
limit: t
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { n as useExpenseLedgerAccountsQuery };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { getTransactionsIdExpenseHistoryOptions as e } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
6
|
+
import { withAuthEpoch as t } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
7
|
+
import { useEmbedApi as n } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
8
|
+
import { organizationHeaders as r } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
9
|
+
import "../../../shared/data-access/dist/index.js";
|
|
10
|
+
import { useQuery as i } from "@tanstack/react-query";
|
|
11
|
+
//#region ../../libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index8.js
|
|
12
|
+
var a = 500;
|
|
13
|
+
function o({ transactionId: o, enabled: s = !0 } = {}) {
|
|
14
|
+
let { client: c, organizationId: l, widgetToken: u, authEpoch: d, organizationPending: f } = n(), p = e({
|
|
15
|
+
client: c,
|
|
16
|
+
headers: r(l),
|
|
17
|
+
path: { transaction_id: o ?? "" },
|
|
18
|
+
query: {
|
|
19
|
+
order: "desc",
|
|
20
|
+
limit: a
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
return i({
|
|
24
|
+
...t(p, {
|
|
25
|
+
authEpoch: d,
|
|
26
|
+
organizationPending: f
|
|
27
|
+
}),
|
|
28
|
+
enabled: !!(l && u && o) && s
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
32
|
+
export { o as useExpenseHistoryQuery };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { getTransactionsIdOptions as e } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
6
|
+
import { withAuthEpoch as t } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
7
|
+
import { useEmbedApi as n } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
8
|
+
import "../../../shared/data-access/dist/index.js";
|
|
9
|
+
import { useQuery as r } from "@tanstack/react-query";
|
|
10
|
+
//#region ../../libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index9.js
|
|
11
|
+
function i({ transactionId: i, enabled: a } = {}) {
|
|
12
|
+
let { client: o, organizationId: s, widgetToken: c, authEpoch: l, organizationPending: u } = n(), d = !!(s && c && i) && (a === !0 || a === void 0), f = e({
|
|
13
|
+
client: o,
|
|
14
|
+
headers: { "x-organization-id": s ?? "" },
|
|
15
|
+
path: { transaction_id: i ?? "" }
|
|
16
|
+
});
|
|
17
|
+
return r({
|
|
18
|
+
...t(f, {
|
|
19
|
+
authEpoch: l,
|
|
20
|
+
organizationPending: u
|
|
21
|
+
}),
|
|
22
|
+
enabled: d
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
export { i as useGetTransactionQuery };
|
package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import "./
|
|
5
|
-
import
|
|
6
|
-
import "./
|
|
7
|
-
|
|
1
|
+
import { UploadReceiptWidget as e } from "./index2.js";
|
|
2
|
+
import "./index7.js";
|
|
3
|
+
import "./index9.js";
|
|
4
|
+
import "./index12.js";
|
|
5
|
+
import "./index13.js";
|
|
6
|
+
import { ExpenseManagementWidget as t } from "./index21.js";
|
|
7
|
+
import "./index22.js";
|
|
8
|
+
import "./index25.js";
|
|
9
|
+
import { ExpenseApprovalPoliciesWidget as n } from "./index27.js";
|
|
10
|
+
export { n as ExpenseApprovalPoliciesWidget, t as ExpenseManagementWidget, e as UploadReceiptWidget };
|