@tesouro/embedded-components-react 0.11.129 → 0.11.132
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/fixtures/index.d.ts +4 -4
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index21.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index25.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index29.js +64 -69
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index4.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index.js +5 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index21.js +20 -17
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index22.js +14 -37
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index23.js +31 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index24.js +26 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index25.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index10.js +35 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index11.js +57 -65
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index12.js +6 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index13.js +20 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index14.js +97 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index15.js +10 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index16.js +10 -29
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index17.js +7 -27
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index18.js +8 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index19.js +24 -139
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index20.js +24 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index21.js +14 -17
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index22.js +130 -27
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index23.js +17 -100
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index24.js +21 -82
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index25.js +41 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index26.js +98 -53
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index27.js +82 -113
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index28.js +3 -193
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index29.js +57 -81
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index30.js +110 -66
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index31.js +190 -111
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index32.js +71 -456
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index33.js +69 -114
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index34.js +113 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index35.js +458 -79
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index36.js +116 -79
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index37.js +10 -256
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index38.js +78 -36
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index39.js +73 -236
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index4.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index40.js +256 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index41.js +43 -516
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index42.js +245 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index43.js +20 -40
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index44.js +497 -211
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index45.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index46.js +40 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index47.js +235 -57
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index48.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index49.js +5 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index50.js +64 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index51.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index6.js +4 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index7.js +13 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index8.js +8 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index9.js +18 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index3.js +44 -34
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidget/BillsTab.js +1 -1
- 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/ui/dist/index.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/ConsentBlock/ConsentBlock.js +21 -12
- package/package.json +1 -1
package/dist/fixtures/index.d.ts
CHANGED
|
@@ -1802,7 +1802,7 @@ type FileResponse = {
|
|
|
1802
1802
|
url: string;
|
|
1803
1803
|
};
|
|
1804
1804
|
/**
|
|
1805
|
-
* Represents a file (such as a PDF invoice) that was uploaded
|
|
1805
|
+
* Represents a file (such as a PDF invoice) that was uploaded.
|
|
1806
1806
|
*/
|
|
1807
1807
|
type FileSchema = {
|
|
1808
1808
|
/**
|
|
@@ -1810,7 +1810,7 @@ type FileSchema = {
|
|
|
1810
1810
|
*/
|
|
1811
1811
|
id: string;
|
|
1812
1812
|
/**
|
|
1813
|
-
* UTC date and time when this file was uploaded
|
|
1813
|
+
* UTC date and time when this file was uploaded. Timestamps follow the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
1814
1814
|
*/
|
|
1815
1815
|
created_at: string;
|
|
1816
1816
|
/**
|
|
@@ -2875,8 +2875,8 @@ type OwnerBusinessDetailsOutput = {
|
|
|
2875
2875
|
};
|
|
2876
2876
|
type OwnerType = 'INDIVIDUAL' | 'BUSINESS';
|
|
2877
2877
|
/**
|
|
2878
|
-
* When a PDF document is uploaded
|
|
2879
|
-
* and
|
|
2878
|
+
* When a PDF document is uploaded, individual pages are extracted from the document
|
|
2879
|
+
* and saved as PNG images. This object contains the image and metadata of a single page.
|
|
2880
2880
|
*/
|
|
2881
2881
|
type PageSchema = {
|
|
2882
2882
|
/**
|
|
@@ -13,7 +13,7 @@ var h = "ttw:w-full";
|
|
|
13
13
|
function g({ fields: n, testIds: g, labels: _, isDisabled: v, taxIdRequired: y, taxIdPlaceholder: b, taxIdHelpText: x }) {
|
|
14
14
|
let S = d(n.state.onBlur), C = d(n.companyStructure.onBlur);
|
|
15
15
|
return /* @__PURE__ */ p("section", {
|
|
16
|
-
className: "ttw:@container/form ttw:flex ttw:
|
|
16
|
+
className: "ttw:@container/form ttw:flex ttw:w-[720px] ttw:max-w-full ttw:flex-col ttw:gap-3",
|
|
17
17
|
"data-testid": g?.root,
|
|
18
18
|
children: [/* @__PURE__ */ f("p", {
|
|
19
19
|
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
@@ -15,7 +15,7 @@ var C = "ttw:w-full";
|
|
|
15
15
|
function w({ fields: r, testIds: w, labels: T, isDisabled: E, ssnRevealed: D, ssnToggleAriaLabel: O, onToggleSsnVisibility: k, ssnMaskedDisplay: A, ssnFormattedDisplay: j, ssnRequired: M, ssnPlaceholder: N, ssnHelpText: P }) {
|
|
16
16
|
let [F, I] = _(!1), L = !D && !F, R = g(r.state.onBlur);
|
|
17
17
|
return /* @__PURE__ */ y("section", {
|
|
18
|
-
className: "ttw:@container/form ttw:
|
|
18
|
+
className: "ttw:@container/form ttw:flex ttw:w-[720px] ttw:max-w-full ttw:flex-col ttw:gap-3",
|
|
19
19
|
"data-testid": w?.root,
|
|
20
20
|
children: [
|
|
21
21
|
/* @__PURE__ */ v("p", {
|
|
@@ -1,105 +1,100 @@
|
|
|
1
1
|
import { Checkbox as e, Heading as t, Separator as n, Typography as r } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
-
import { ConsentBlock as i } from "../../../shared/ui/dist/lib/ConsentBlock/ConsentBlock.js";
|
|
2
|
+
import { ConsentBlock as i, ConsentLink as a } from "../../../shared/ui/dist/lib/ConsentBlock/ConsentBlock.js";
|
|
3
3
|
import "../../../shared/ui/dist/index.js";
|
|
4
|
-
import { BUSINESS_DETAILS_LABELS_EN as
|
|
5
|
-
import { Fragment as
|
|
4
|
+
import { BUSINESS_DETAILS_LABELS_EN as o, interpolateBankName as s } from "./index12.js";
|
|
5
|
+
import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
6
6
|
// ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index29.js
|
|
7
|
-
function
|
|
8
|
-
let
|
|
9
|
-
...
|
|
10
|
-
...
|
|
7
|
+
function d({ value: d, onChange: f, isSubmitting: p, showErrors: m = !1, labels: h, bankName: g, termsHref: _, privacyHref: v, electronicCommunicationHref: y, patriotActHref: b, testIds: x }) {
|
|
8
|
+
let S = {
|
|
9
|
+
...o,
|
|
10
|
+
...h,
|
|
11
11
|
companyStructureOptions: {
|
|
12
|
-
...
|
|
13
|
-
...
|
|
12
|
+
...o.companyStructureOptions,
|
|
13
|
+
...h?.companyStructureOptions ?? {}
|
|
14
14
|
}
|
|
15
|
-
},
|
|
16
|
-
...
|
|
15
|
+
}, C = (e, t) => f({
|
|
16
|
+
...d,
|
|
17
17
|
[e]: t
|
|
18
|
-
}),
|
|
19
|
-
return /* @__PURE__ */
|
|
18
|
+
}), w = m && d.isAuthorized !== !0, T = m && !d.isCheckboxChecked;
|
|
19
|
+
return /* @__PURE__ */ u("div", {
|
|
20
20
|
className: "ttw:flex ttw:flex-col ttw:gap-6",
|
|
21
21
|
children: [
|
|
22
|
-
/* @__PURE__ */
|
|
22
|
+
/* @__PURE__ */ u("div", {
|
|
23
23
|
className: "ttw:flex ttw:flex-col ttw:gap-1",
|
|
24
|
-
children: [/* @__PURE__ */
|
|
24
|
+
children: [/* @__PURE__ */ l(t, {
|
|
25
25
|
variant: "section",
|
|
26
26
|
level: 3,
|
|
27
|
-
children:
|
|
28
|
-
}), /* @__PURE__ */
|
|
27
|
+
children: S.disclosuresHeading
|
|
28
|
+
}), /* @__PURE__ */ l(r, {
|
|
29
29
|
variant: "body2",
|
|
30
30
|
className: "ttw:text-muted-foreground",
|
|
31
|
-
children:
|
|
31
|
+
children: S.disclosuresSubheading
|
|
32
32
|
})]
|
|
33
33
|
}),
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
-
/* @__PURE__ */
|
|
34
|
+
/* @__PURE__ */ l(n, {}),
|
|
35
|
+
/* @__PURE__ */ u("div", {
|
|
36
36
|
className: "ttw:flex ttw:flex-col ttw:gap-4",
|
|
37
|
-
children: [/* @__PURE__ */
|
|
37
|
+
children: [/* @__PURE__ */ u("div", {
|
|
38
38
|
className: "ttw:flex ttw:items-start ttw:gap-2",
|
|
39
|
-
children: [/* @__PURE__ */
|
|
39
|
+
children: [/* @__PURE__ */ l(e, {
|
|
40
40
|
id: "isAuthorized",
|
|
41
|
-
"data-testid":
|
|
42
|
-
checked:
|
|
43
|
-
onCheckedChange: (e) =>
|
|
44
|
-
disabled:
|
|
41
|
+
"data-testid": x?.authorizationCheckbox,
|
|
42
|
+
checked: d.isAuthorized === !0,
|
|
43
|
+
onCheckedChange: (e) => C("isAuthorized", e === !0 || null),
|
|
44
|
+
disabled: p,
|
|
45
45
|
className: "ttw:mt-0.5",
|
|
46
46
|
"aria-labelledby": "bank-account-onboarding-authorization-text",
|
|
47
|
-
"aria-invalid":
|
|
48
|
-
"aria-describedby":
|
|
49
|
-
}), /* @__PURE__ */
|
|
47
|
+
"aria-invalid": w || void 0,
|
|
48
|
+
"aria-describedby": w ? "bank-account-onboarding-authorization-error" : void 0
|
|
49
|
+
}), /* @__PURE__ */ u("div", {
|
|
50
50
|
className: "ttw:flex ttw:flex-col ttw:gap-1",
|
|
51
|
-
children: [/* @__PURE__ */
|
|
51
|
+
children: [/* @__PURE__ */ l("p", {
|
|
52
52
|
id: "bank-account-onboarding-authorization-text",
|
|
53
53
|
className: "ttw:text-sm ttw:font-normal ttw:leading-relaxed ttw:text-foreground",
|
|
54
|
-
children:
|
|
55
|
-
}),
|
|
54
|
+
children: S.isAuthorizedQuestion
|
|
55
|
+
}), w ? /* @__PURE__ */ l("p", {
|
|
56
56
|
id: "bank-account-onboarding-authorization-error",
|
|
57
57
|
className: "ttw:text-sm ttw:text-destructive",
|
|
58
|
-
children:
|
|
58
|
+
children: S.consentRequiredError
|
|
59
59
|
}) : null]
|
|
60
60
|
})]
|
|
61
|
-
}), /* @__PURE__ */
|
|
62
|
-
links: [
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
href: g
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
label: x.privacyPolicy,
|
|
69
|
-
href: _
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
label: x.electronicCommunication,
|
|
73
|
-
href: v
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
label: x.patriotAct.replace(/\.\s*$/, ""),
|
|
77
|
-
href: y
|
|
78
|
-
}
|
|
79
|
-
],
|
|
80
|
-
agreement: /* @__PURE__ */ l(s, { children: [
|
|
81
|
-
/* @__PURE__ */ c("span", {
|
|
61
|
+
}), /* @__PURE__ */ l(i, {
|
|
62
|
+
links: [],
|
|
63
|
+
agreement: /* @__PURE__ */ u(c, { children: [
|
|
64
|
+
/* @__PURE__ */ l("span", {
|
|
82
65
|
className: "ttw:font-semibold",
|
|
83
|
-
children:
|
|
66
|
+
children: S.disclosureAgreementLead
|
|
84
67
|
}),
|
|
85
68
|
" ",
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
69
|
+
s(S.acceptDisclosuresPrefix, g),
|
|
70
|
+
/* @__PURE__ */ l(a, {
|
|
71
|
+
href: _,
|
|
72
|
+
children: S.termsOfUse
|
|
73
|
+
}),
|
|
74
|
+
S.acceptDisclosuresTermsPrivacyJoin,
|
|
75
|
+
/* @__PURE__ */ l(a, {
|
|
76
|
+
href: v,
|
|
77
|
+
children: S.privacyPolicy
|
|
78
|
+
}),
|
|
79
|
+
s(S.acceptDisclosuresAfterPrivacy, g),
|
|
80
|
+
/* @__PURE__ */ l(a, {
|
|
81
|
+
href: y,
|
|
82
|
+
children: S.electronicCommunication
|
|
83
|
+
}),
|
|
84
|
+
s(S.acceptDisclosuresAfterElectronic, g),
|
|
85
|
+
/* @__PURE__ */ l(a, {
|
|
86
|
+
href: b,
|
|
87
|
+
children: S.patriotAct
|
|
88
|
+
})
|
|
94
89
|
] }),
|
|
95
|
-
checked:
|
|
96
|
-
onCheckedChange: (e) =>
|
|
97
|
-
disabled:
|
|
98
|
-
error:
|
|
99
|
-
testIds: { checkbox:
|
|
90
|
+
checked: d.isCheckboxChecked,
|
|
91
|
+
onCheckedChange: (e) => C("isCheckboxChecked", e),
|
|
92
|
+
disabled: p,
|
|
93
|
+
error: T ? S.consentRequiredError : void 0,
|
|
94
|
+
testIds: { checkbox: x?.disclosureCheckbox }
|
|
100
95
|
})]
|
|
101
96
|
})
|
|
102
97
|
]
|
|
103
98
|
});
|
|
104
99
|
}
|
|
105
|
-
export {
|
|
100
|
+
export { d as BusinessDisclosuresSection };
|
package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index4.js
CHANGED
|
@@ -15,7 +15,7 @@ var E = "ttw:w-full";
|
|
|
15
15
|
function D({ fields: o, display: D, isDisabled: O, labels: k, ssnRevealed: A, ssnToggleAriaLabel: j, onToggleSsnVisibility: M }) {
|
|
16
16
|
let [N, P] = b.useState(!1), F = !A && !N, I = y(o.state.onBlur);
|
|
17
17
|
return /* @__PURE__ */ S("div", {
|
|
18
|
-
className: "ttw:@container/form ttw:flex ttw:
|
|
18
|
+
className: "ttw:@container/form ttw:flex ttw:w-[720px] ttw:max-w-full ttw:flex-col ttw:gap-3",
|
|
19
19
|
children: [
|
|
20
20
|
/* @__PURE__ */ S("div", {
|
|
21
21
|
className: "ttw:grid ttw:grid-cols-1 ttw:gap-3 ttw:@md/form:grid-cols-2",
|
|
@@ -16,7 +16,8 @@ import { useValidatePayableMutation as _ } from "./index17.js";
|
|
|
16
16
|
import "./index18.js";
|
|
17
17
|
import { usePayablePaymentRecordsQuery as v } from "./index19.js";
|
|
18
18
|
import { usePayableSuggestionsQuery as y } from "./index20.js";
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import "./index24.js";
|
|
22
|
-
|
|
19
|
+
import { policyAssignmentDeadline as b, policyAssignmentFirstSeenAt as x } from "./index21.js";
|
|
20
|
+
import { usePayableQuery as S } from "./index23.js";
|
|
21
|
+
import { usePayablesByIdsQueries as C } from "./index24.js";
|
|
22
|
+
import "./index25.js";
|
|
23
|
+
export { b as policyAssignmentDeadline, x as policyAssignmentFirstSeenAt, i as useAllPayableLineItemsQuery, e as useApprovePayableApprovalRequestMutation, o as useAttachPayableFileMutation, s as useCancelPayableMutation, c as useCancelScheduledPaymentMutation, l as useCreatePayableMutation, u as useDeletePayableFileMutation, d as useDeletePayableMutation, f as useForceApprovePayableMutation, p as useForceRejectPayableMutation, t as usePayableApprovalRequestsQuery, r as usePayableHistoryQuery, v as usePayablePaymentRecordsQuery, S as usePayableQuery, y as usePayableSuggestionsQuery, C as usePayablesByIdsQueries, n as useRejectPayableApprovalRequestMutation, m as useReopenPayableMutation, a as useReplacePayableLineItemsMutation, h as useSubmitPayableForApprovalMutation, g as useUpdatePayableMutation, _ as useValidatePayableMutation };
|
|
@@ -1,19 +1,22 @@
|
|
|
1
|
-
import { getPayablesIdOptions as e } from "../../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
2
|
-
import { organizationHeaders as t } from "../../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
3
|
-
import "../../../../shared/data-access/dist/index.js";
|
|
4
1
|
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index21.js
|
|
5
|
-
var
|
|
6
|
-
function
|
|
7
|
-
return {
|
|
8
|
-
...e({
|
|
9
|
-
client: r,
|
|
10
|
-
headers: t(i),
|
|
11
|
-
path: { payable_id: a }
|
|
12
|
-
}),
|
|
13
|
-
refetchInterval: (e) => {
|
|
14
|
-
let t = e.state.data;
|
|
15
|
-
return !t || t.approval_policy_id || t.status !== "approve_in_progress" || !t.updated_at ? !1 : Date.now() - new Date(t.updated_at).getTime() < 1e4 && n;
|
|
16
|
-
}
|
|
17
|
-
};
|
|
2
|
+
var e = 1e4;
|
|
3
|
+
function t(e) {
|
|
4
|
+
if (e && !e.approval_policy_id && e.status === "approve_in_progress" && e.updated_at) return `${e.id ?? ""}|${e.updated_at}`;
|
|
18
5
|
}
|
|
19
|
-
|
|
6
|
+
function n(n, r) {
|
|
7
|
+
if (!t(n) || !n?.updated_at) return;
|
|
8
|
+
let i = new Date(n.updated_at).getTime() + e;
|
|
9
|
+
return r === void 0 ? i : Math.min(i, r + e);
|
|
10
|
+
}
|
|
11
|
+
var r = /* @__PURE__ */ new Map();
|
|
12
|
+
function i(e, n) {
|
|
13
|
+
let i = t(e);
|
|
14
|
+
if (!i) return;
|
|
15
|
+
let a = r.get(i);
|
|
16
|
+
return a !== void 0 || !n ? a : (r.set(i, n), n);
|
|
17
|
+
}
|
|
18
|
+
function a(e) {
|
|
19
|
+
let n = t(e);
|
|
20
|
+
return n ? r.get(n) : void 0;
|
|
21
|
+
}
|
|
22
|
+
export { e as POLICY_ASSIGNMENT_POLL_WINDOW_MS, n as policyAssignmentDeadline, a as policyAssignmentFirstSeenAt, t as policyAssignmentKey, i as recordPolicyAssignmentFirstSeen };
|
|
@@ -1,43 +1,20 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use client";
|
|
3
|
-
"use client";
|
|
4
|
-
"use client";
|
|
5
1
|
import { getPayablesIdOptions as e } from "../../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
6
|
-
import {
|
|
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";
|
|
2
|
+
import { organizationHeaders as t } from "../../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
9
3
|
import "../../../../shared/data-access/dist/index.js";
|
|
10
|
-
import {
|
|
11
|
-
import "../../../data-access/dist/invalidation.js";
|
|
12
|
-
import { payablePolicyAssignmentQueryOptions as a } from "./index21.js";
|
|
13
|
-
import { useQuery as o } from "@tanstack/react-query";
|
|
4
|
+
import { policyAssignmentDeadline as n, recordPolicyAssignmentFirstSeen as r } from "./index21.js";
|
|
14
5
|
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index22.js
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
payableId: s ?? ""
|
|
24
|
-
}) : void 0, y = _ ?? v ?? e({
|
|
25
|
-
client: d,
|
|
26
|
-
headers: r(f),
|
|
27
|
-
path: { payable_id: s ?? "" }
|
|
28
|
-
}), b = _ && v ? {
|
|
29
|
-
...y,
|
|
6
|
+
var i = 1e3;
|
|
7
|
+
function a({ client: a, organizationId: o, payableId: s }) {
|
|
8
|
+
return {
|
|
9
|
+
...e({
|
|
10
|
+
client: a,
|
|
11
|
+
headers: t(o),
|
|
12
|
+
path: { payable_id: s }
|
|
13
|
+
}),
|
|
30
14
|
refetchInterval: (e) => {
|
|
31
|
-
let t =
|
|
32
|
-
return
|
|
15
|
+
let t = n(e.state.data, r(e.state.data, e.state.dataUpdatedAt)), a = t === void 0 ? 0 : t - Date.now();
|
|
16
|
+
return a > 0 && Math.min(i, a);
|
|
33
17
|
}
|
|
34
|
-
}
|
|
35
|
-
return o({
|
|
36
|
-
...t(b, {
|
|
37
|
-
authEpoch: m,
|
|
38
|
-
organizationStatus: h
|
|
39
|
-
}),
|
|
40
|
-
enabled: g
|
|
41
|
-
});
|
|
18
|
+
};
|
|
42
19
|
}
|
|
43
|
-
export {
|
|
20
|
+
export { a as payablePolicyAssignmentQueryOptions };
|
|
@@ -7,20 +7,37 @@ import { withAuthEpoch as t } from "../../../../shared/data-access/dist/lib/with
|
|
|
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 {
|
|
10
|
+
import { payableOcrQueryOptions as i } from "../../../data-access/dist/lib/payableOcrQueryOptions.js";
|
|
11
|
+
import "../../../data-access/dist/invalidation.js";
|
|
12
|
+
import { payablePolicyAssignmentQueryOptions as a } from "./index22.js";
|
|
13
|
+
import { useQuery as o } from "@tanstack/react-query";
|
|
11
14
|
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index23.js
|
|
12
|
-
function
|
|
13
|
-
let { client:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
function s(s, { enabled: c = !0, pollWhileOcrProcessing: l = !1, pollWhilePolicyAssignmentUnsettled: u = !1 } = {}) {
|
|
16
|
+
let { client: d, organizationId: f, widgetToken: p, authEpoch: m, organizationStatus: h } = n(), g = !!(f && p && s) && c, _ = l ? i({
|
|
17
|
+
client: d,
|
|
18
|
+
organizationId: f,
|
|
19
|
+
payableId: s ?? ""
|
|
20
|
+
}) : void 0, v = u ? a({
|
|
21
|
+
client: d,
|
|
22
|
+
organizationId: f,
|
|
23
|
+
payableId: s ?? ""
|
|
24
|
+
}) : void 0, y = _ ?? v ?? e({
|
|
25
|
+
client: d,
|
|
26
|
+
headers: r(f),
|
|
27
|
+
path: { payable_id: s ?? "" }
|
|
28
|
+
}), b = _ && v ? {
|
|
29
|
+
...y,
|
|
30
|
+
refetchInterval: (e) => {
|
|
31
|
+
let t = [_.refetchInterval(e), v.refetchInterval(e)].filter((e) => e !== !1);
|
|
32
|
+
return t.length ? Math.min(...t) : !1;
|
|
33
|
+
}
|
|
34
|
+
} : y;
|
|
35
|
+
return o({
|
|
36
|
+
...t(b, {
|
|
37
|
+
authEpoch: m,
|
|
38
|
+
organizationStatus: h
|
|
22
39
|
}),
|
|
23
|
-
enabled:
|
|
24
|
-
})
|
|
40
|
+
enabled: g
|
|
41
|
+
});
|
|
25
42
|
}
|
|
26
|
-
export {
|
|
43
|
+
export { s as usePayableQuery };
|
|
@@ -1,2 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { getPayablesIdOptions 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 { useQueries as i } from "@tanstack/react-query";
|
|
11
|
+
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index24.js
|
|
12
|
+
function a(a, { enabled: o = !0 } = {}) {
|
|
13
|
+
let { client: s, organizationId: c, widgetToken: l, authEpoch: u, organizationStatus: d } = n(), f = !!(c && l) && o, p = r(c);
|
|
14
|
+
return i({ queries: a.map((n) => ({
|
|
15
|
+
...t(e({
|
|
16
|
+
client: s,
|
|
17
|
+
headers: p,
|
|
18
|
+
path: { payable_id: n }
|
|
19
|
+
}), {
|
|
20
|
+
authEpoch: u,
|
|
21
|
+
organizationStatus: d
|
|
22
|
+
}),
|
|
23
|
+
enabled: f
|
|
24
|
+
})) });
|
|
25
|
+
}
|
|
26
|
+
export { a as usePayablesByIdsQueries };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import "./
|
|
3
|
-
import "./
|
|
4
|
-
import "./index39.js";
|
|
5
|
-
import "./index41.js";
|
|
1
|
+
import "./index26.js";
|
|
2
|
+
import "./index31.js";
|
|
3
|
+
import "./index40.js";
|
|
6
4
|
import "./index42.js";
|
|
7
|
-
import "./index43.js";
|
|
8
5
|
import "./index44.js";
|
|
9
6
|
import "./index45.js";
|
|
10
|
-
|
|
7
|
+
import "./index46.js";
|
|
8
|
+
import "./index47.js";
|
|
11
9
|
import "./index48.js";
|
|
10
|
+
export { BillDetailsWidget, BillDialogWidget } from "./index50.js";
|
|
11
|
+
import "./index51.js";
|
|
@@ -1,16 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import
|
|
6
|
-
import "../../data-access/dist/index.js";
|
|
1
|
+
import { ApprovalPoliciesSettingsDefaultLabels as e } from "../../../../shared/approval-policy/feature/dist/lib/labels.js";
|
|
2
|
+
import { parseApprovalPolicyScript as t } from "../../../../shared/approval-policy/util/dist/lib/policyScript.js";
|
|
3
|
+
import { parseApprovalPolicyTrigger as n } from "../../../../shared/approval-policy/util/dist/lib/policyTrigger.js";
|
|
4
|
+
import { buildPolicySentence as r, buildPolicyTitle as i } from "../../../../shared/approval-policy/feature/dist/lib/policyViewModel.js";
|
|
5
|
+
import "../../../../shared/approval-policy/feature/dist/index.js";
|
|
7
6
|
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index10.js
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
function a({ policy: a, lookup: o, approvedUserIds: s, approvedRoleIds: c, copy: l }) {
|
|
8
|
+
let u = t(a.script);
|
|
9
|
+
if (!u.groups.length || !u.isSupported) return;
|
|
10
|
+
let d = [];
|
|
11
|
+
for (let [e, t] of u.groups.entries()) {
|
|
12
|
+
let n = [];
|
|
13
|
+
for (let e of [...t.roleIds, ...t.userIds]) {
|
|
14
|
+
let t = o.get(e);
|
|
15
|
+
t && n.push({
|
|
16
|
+
id: e,
|
|
17
|
+
label: t.label,
|
|
18
|
+
approved: t.kind === "user" ? s.has(e) : !!c?.has(e)
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
n.length && d.push({
|
|
22
|
+
id: `group-${e + 1}`,
|
|
23
|
+
chips: n
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
if (!d.length) return;
|
|
27
|
+
let { condition: f, hasKnownAmountBounds: p } = n(a.trigger);
|
|
28
|
+
if (!p) return;
|
|
29
|
+
let m = {
|
|
30
|
+
...e,
|
|
31
|
+
...l
|
|
32
|
+
};
|
|
11
33
|
return {
|
|
12
|
-
|
|
13
|
-
|
|
34
|
+
title: i(f, m),
|
|
35
|
+
sentence: r(f, m),
|
|
36
|
+
steps: d
|
|
14
37
|
};
|
|
15
38
|
}
|
|
16
|
-
export {
|
|
39
|
+
export { a as buildApprovalPolicyCardView };
|
|
@@ -1,68 +1,60 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
"use client";
|
|
4
|
-
"use client";
|
|
5
|
-
import { hasAnyScope as e } from "../../../../shared/data-access/dist/lib/hasAnyScope.js";
|
|
6
|
-
import { Scope as t } from "../../../../shared/data-access/dist/lib/scopes.js";
|
|
7
|
-
import { useAllOrganizationRolesQuery as n } from "../../../../shared/data-access/dist/lib/role/useAllOrganizationRolesQuery.js";
|
|
8
|
-
import { useAllOrganizationUsersQuery as r } from "../../../../shared/data-access/dist/lib/user/useAllOrganizationUsersQuery.js";
|
|
9
|
-
import "../../../../shared/data-access/dist/index.js";
|
|
10
|
-
import { useWidgetConfig as i } from "../../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
11
|
-
import "../../../../shared/feature/dist/index.js";
|
|
12
|
-
import { useGetApprovalPoliciesQuery as a } from "../../../../shared/approval-policy/data-access/dist/lib/approvalPoliciesApi.js";
|
|
13
|
-
import "../../../../shared/approval-policy/data-access/dist/index.js";
|
|
14
|
-
import { buildApprovalPolicyCardView as o } from "./index6.js";
|
|
15
|
-
import { usePayableApprovalRequestsQuery as s } from "../../data-access/dist/index2.js";
|
|
16
|
-
import "../../data-access/dist/index.js";
|
|
17
|
-
import { currentApprovalRound as c } from "./index7.js";
|
|
18
|
-
import { buildPendingApproverGroups as l } from "./index8.js";
|
|
19
|
-
import { buildPendingApproverGroupsFromCardView as u } from "./index9.js";
|
|
20
|
-
import { usePayableApprovalRoundStart as d } from "./index10.js";
|
|
21
|
-
import { useMemo as f } from "react";
|
|
1
|
+
import { APPROVAL_POLICY_RULE_COPY_EN as e } from "./index9.js";
|
|
2
|
+
import { buildApprovalPolicyCardView as t } from "./index10.js";
|
|
22
3
|
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index11.js
|
|
23
|
-
function
|
|
24
|
-
let
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
M,
|
|
47
|
-
O,
|
|
48
|
-
A,
|
|
49
|
-
j,
|
|
50
|
-
g
|
|
51
|
-
]);
|
|
52
|
-
return {
|
|
53
|
-
view: N,
|
|
54
|
-
pendingApprovers: f(() => _ ? N ? u(N) : l({
|
|
55
|
-
requestsNewestFirst: E.data?.data,
|
|
56
|
-
roundStartedAt: D,
|
|
57
|
-
lookup: O
|
|
58
|
-
}) : [], [
|
|
59
|
-
_,
|
|
60
|
-
N,
|
|
61
|
-
E.data,
|
|
62
|
-
D,
|
|
63
|
-
O
|
|
64
|
-
]),
|
|
65
|
-
isLoading: !!m && (!h || C.isResolving || w.isResolving || T.isResolving || E.isLoading || E.isError || !b)
|
|
4
|
+
function n({ approvalPolicyId: n, livePolicies: i, snapshotPolicyName: a, currentRound: o, lookup: s, approvedUserIds: c, approvedRoleIds: l, copy: u }) {
|
|
5
|
+
let d = {
|
|
6
|
+
...e,
|
|
7
|
+
...u
|
|
8
|
+
};
|
|
9
|
+
if (!n) return {
|
|
10
|
+
source: "none",
|
|
11
|
+
view: {
|
|
12
|
+
title: d.noRuleTitle,
|
|
13
|
+
sentence: d.noRuleSentence,
|
|
14
|
+
steps: []
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
let f = i?.find((e) => e.id === n), p = f ? t({
|
|
18
|
+
policy: f,
|
|
19
|
+
lookup: s,
|
|
20
|
+
approvedUserIds: c,
|
|
21
|
+
approvedRoleIds: l,
|
|
22
|
+
copy: u
|
|
23
|
+
}) : void 0;
|
|
24
|
+
if (p) return {
|
|
25
|
+
source: "live",
|
|
26
|
+
view: p
|
|
66
27
|
};
|
|
28
|
+
let m = !!i && !f, h = r(o, s), g = h.length ? `${d.deletedNote} ${d.deletedApprovalsNote}` : d.deletedNote;
|
|
29
|
+
if (a || m || h.length) return {
|
|
30
|
+
source: "snapshot",
|
|
31
|
+
view: {
|
|
32
|
+
title: a,
|
|
33
|
+
...m ? {
|
|
34
|
+
badge: d.deletedBadge,
|
|
35
|
+
note: g
|
|
36
|
+
} : {},
|
|
37
|
+
steps: h
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function r(e, t) {
|
|
42
|
+
let n = [];
|
|
43
|
+
for (let [r, i] of [...e].reverse().entries()) {
|
|
44
|
+
let e = i.approved_by ?? [], a = i.user_ids ?? [], o = e.filter((e) => !a.includes(e)), s = [];
|
|
45
|
+
for (let n of [...i.role_ids ?? [], ...a]) {
|
|
46
|
+
let r = t.get(n);
|
|
47
|
+
r && s.push({
|
|
48
|
+
id: n,
|
|
49
|
+
label: r.label,
|
|
50
|
+
approved: r.kind === "user" ? e.includes(n) : o.length >= (i.required_approval_count ?? 1)
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
s.length && n.push({
|
|
54
|
+
id: `request-${r + 1}`,
|
|
55
|
+
chips: s
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
return n;
|
|
67
59
|
}
|
|
68
|
-
export {
|
|
60
|
+
export { n as resolveApprovalPolicySection };
|