@tesouro/embedded-components-react 0.9.18 → 0.9.21
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/bill-pay-widget/bill-detail/feature/dist/index18.js +19 -20
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableIssuePreflight.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
|
@@ -3,31 +3,30 @@
|
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
5
|
import { hasAnyScope as e } from "../../../../shared/data-access/dist/lib/hasAnyScope.js";
|
|
6
|
-
import {
|
|
7
|
-
import { Scope as n } from "../../../../shared/data-access/dist/lib/scopes.js";
|
|
6
|
+
import { Scope as t } from "../../../../shared/data-access/dist/lib/scopes.js";
|
|
8
7
|
import "../../../../shared/data-access/dist/index.js";
|
|
9
|
-
import { useWidgetConfig as
|
|
8
|
+
import { useWidgetConfig as n } from "../../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
10
9
|
import "../../../../shared/feature/dist/index.js";
|
|
11
|
-
import { usePayableApprovalRequestsQuery as
|
|
10
|
+
import { usePayableApprovalRequestsQuery as r } from "../../data-access/dist/index2.js";
|
|
12
11
|
import "../../data-access/dist/index.js";
|
|
13
|
-
import { currentApprovalRound as
|
|
14
|
-
import { usePayableApprovalRoundStart as
|
|
12
|
+
import { currentApprovalRound as i } from "./index8.js";
|
|
13
|
+
import { usePayableApprovalRoundStart as a } from "./index11.js";
|
|
15
14
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index18.js
|
|
16
|
-
function
|
|
17
|
-
let { initResponse:
|
|
18
|
-
payableId:
|
|
19
|
-
enabled:
|
|
20
|
-
}),
|
|
21
|
-
enabled:
|
|
22
|
-
hasAwaitedRequest:
|
|
23
|
-
currentRoundStartedAt:
|
|
24
|
-
}),
|
|
15
|
+
function o({ payableId: o, status: s }) {
|
|
16
|
+
let { initResponse: c } = n(), l = e(c?.scopes, [t.ApprovalRequestReadOrg]), u = s === "approve_in_progress" && l, { roundStartedAt: d } = a({
|
|
17
|
+
payableId: o,
|
|
18
|
+
enabled: u
|
|
19
|
+
}), f = c?.userId ?? void 0, p = (e) => e.caller_is_policy_approver ?? !!(f && e.user_ids.includes(f)), m = r(o, {
|
|
20
|
+
enabled: u,
|
|
21
|
+
hasAwaitedRequest: u ? (e) => i(e, d).some(p) : void 0,
|
|
22
|
+
currentRoundStartedAt: d
|
|
23
|
+
}), h = u ? i(m.data?.data, d) : [], g = h.some(p), _ = h.filter((e) => e.status === "waiting");
|
|
25
24
|
return {
|
|
26
|
-
id:
|
|
27
|
-
isPolicyApprover:
|
|
28
|
-
hasWaitingRequest:
|
|
29
|
-
isLoading:
|
|
25
|
+
id: _.filter(p).find((e) => !(f && (e.approved_by ?? []).includes(f)))?.id,
|
|
26
|
+
isPolicyApprover: g,
|
|
27
|
+
hasWaitingRequest: _.length > 0,
|
|
28
|
+
isLoading: m.isLoading
|
|
30
29
|
};
|
|
31
30
|
}
|
|
32
31
|
//#endregion
|
|
33
|
-
export {
|
|
32
|
+
export { o as useCurrentApprovalRequestId };
|
|
@@ -15,7 +15,7 @@ function r({ counterpartId: r, billingAddressId: i, billingCountry: a, inlineCus
|
|
|
15
15
|
counterpart_billing_address_id: i || void 0,
|
|
16
16
|
counterpart_country: a,
|
|
17
17
|
counterpart_type: d?.type ?? o,
|
|
18
|
-
enabled: s && !!(d || o) && !(d && c) && !!(
|
|
18
|
+
enabled: s && !!(d || o) && !(d && c) && !!(i || a)
|
|
19
19
|
}), p = !!f.data?.entity?.tax_id?.required, m = !!r && !d && (u.isLoading || u.isFetching);
|
|
20
20
|
return {
|
|
21
21
|
counterpart: d,
|
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.9.
|
|
2
|
+
var e = "@tesouro/embedded-components-react", t = "0.9.21", n = "d0d0d781706d4852340ed5b5cbb73fbb65e2ef93", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|