@tesouro/embedded-components-react 0.7.6 → 0.7.12
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 +6 -8
- package/dist/index.css +0 -76
- package/dist/index.d.ts +15 -193
- package/dist/index.js +1 -1
- package/dist/lib/BillPayWidget.d.ts +10 -188
- package/dist/lib/BillPayWidget.js +1 -1
- package/dist/lib/CounterpartsWidget.d.ts +1 -1
- package/dist/lib/CounterpartsWidgetPublic.d.ts +1 -1
- package/dist/lib/CustomersWidget.d.ts +1 -2
- package/dist/lib/WidgetSuite.d.ts +4 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/{BillPayWidgetNative/BillPayWidgetNative.js → BillPayWidget/BillPayWidget.js} +4 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/{BillPayWidgetNative → BillPayWidget}/BillsTab.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidget/index.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/{BillPayWidgetNative → BillPayWidget}/labels.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/{BillPayWidgetNative → BillPayWidget}/testIds.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/customers-widget/feature/dist/lib/CustomersWidgetMonite/CustomersWidgetMonite.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index105.js +53 -53
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index107.js +23 -23
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index108.js +74 -74
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index157.js +30 -30
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index160.js +28 -28
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index21.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index243.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index321.js +0 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index332.js +13 -13
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index340.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index360.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index372.js +57 -57
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index374.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index412.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index49.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index51.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index65.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index91.js +29 -29
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index97.js +24 -24
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/sections/BillPaySection.js +7 -11
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidget.js +0 -27
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidgetMonite/BillPayWidgetMonite.js +0 -46
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidgetMonite/index.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidgetNative/index.js +0 -1
|
@@ -4,93 +4,93 @@ import { CounterpartAddressFormContent as n } from "./index105.js";
|
|
|
4
4
|
import { CounterpartAddressForm as r } from "./index106.js";
|
|
5
5
|
import { useState as i } from "react";
|
|
6
6
|
import { Plus as a } from "lucide-react";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
7
|
+
import { twMerge as o } from "tailwind-merge";
|
|
8
|
+
import { Fragment as s, jsx as c, jsxs as l } from "@emotion/react/jsx-runtime";
|
|
9
|
+
import { useLingui as u } from "@lingui/react";
|
|
10
10
|
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index107.js
|
|
11
11
|
var d = ({ isStandalone: d, counterpartId: f, counterpartAddress: p, isUpdateAllowed: m, isLoading: h, customerType: g }) => {
|
|
12
|
-
let { i18n: _ } =
|
|
12
|
+
let { i18n: _ } = u(), [v, y] = i(!d), b = !!p, x = p?.city || "", S = p?.state || "", C = p?.postal_code || "", w = () => {
|
|
13
13
|
y(!1);
|
|
14
14
|
};
|
|
15
|
-
return v ? /* @__PURE__ */ s
|
|
15
|
+
return v ? /* @__PURE__ */ c(s, { children: d && f ? /* @__PURE__ */ c(s, { children: p ? /* @__PURE__ */ c(r, {
|
|
16
16
|
address: p,
|
|
17
17
|
handleClose: w,
|
|
18
18
|
counterpartId: f,
|
|
19
19
|
onUpdate: w,
|
|
20
20
|
isStandalone: !0,
|
|
21
21
|
customerType: g
|
|
22
|
-
}) : /* @__PURE__ */
|
|
22
|
+
}) : /* @__PURE__ */ c(r, {
|
|
23
23
|
handleClose: w,
|
|
24
24
|
counterpartId: f,
|
|
25
25
|
onCreate: w,
|
|
26
26
|
isStandalone: !0,
|
|
27
27
|
customerType: g
|
|
28
|
-
}) }) : /* @__PURE__ */
|
|
28
|
+
}) }) : /* @__PURE__ */ c(n, {
|
|
29
29
|
hasExistingAddress: !1,
|
|
30
30
|
isLoading: h,
|
|
31
31
|
isStandalone: !1,
|
|
32
32
|
customerType: g
|
|
33
|
-
}) }) : /* @__PURE__ */
|
|
33
|
+
}) }) : /* @__PURE__ */ l("div", {
|
|
34
34
|
className: "ttw:flex ttw:flex-col",
|
|
35
|
-
children: [/* @__PURE__ */
|
|
35
|
+
children: [/* @__PURE__ */ l("div", {
|
|
36
36
|
className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-3 ttw:pt-6 ttw:pb-7",
|
|
37
|
-
children: [/* @__PURE__ */
|
|
37
|
+
children: [/* @__PURE__ */ l(t, {
|
|
38
38
|
variant: "body1",
|
|
39
39
|
className: "ttw:font-medium",
|
|
40
40
|
children: [
|
|
41
41
|
_._("Address"),
|
|
42
42
|
" ",
|
|
43
|
-
/* @__PURE__ */
|
|
43
|
+
/* @__PURE__ */ c("span", {
|
|
44
44
|
className: "ttw:text-muted-foreground",
|
|
45
45
|
children: _._("(optional)")
|
|
46
46
|
})
|
|
47
47
|
]
|
|
48
|
-
}), b && m && /* @__PURE__ */
|
|
48
|
+
}), b && m && /* @__PURE__ */ c(e, {
|
|
49
49
|
type: "button",
|
|
50
50
|
variant: "ghost",
|
|
51
51
|
className: "ttw:text-primary ttw:p-0 ttw:hover:text-primary ttw:hover:underline ttw:w-fit ttw:hover:bg-transparent",
|
|
52
52
|
onClick: () => y(!0),
|
|
53
53
|
children: _._("Edit")
|
|
54
54
|
})]
|
|
55
|
-
}), /* @__PURE__ */
|
|
56
|
-
className:
|
|
57
|
-
children: b ? /* @__PURE__ */
|
|
55
|
+
}), /* @__PURE__ */ c("div", {
|
|
56
|
+
className: o("ttw:flex ttw:items-start ttw:rounded-lg", b ? "ttw:border-none" : "ttw:border ttw:border-border ttw:p-3"),
|
|
57
|
+
children: b ? /* @__PURE__ */ l("div", {
|
|
58
58
|
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
59
59
|
children: [
|
|
60
|
-
/* @__PURE__ */
|
|
60
|
+
/* @__PURE__ */ c(t, {
|
|
61
61
|
variant: "body2",
|
|
62
62
|
className: "ttw:font-medium",
|
|
63
63
|
children: p?.line1
|
|
64
64
|
}),
|
|
65
|
-
p?.line2 && /* @__PURE__ */
|
|
65
|
+
p?.line2 && /* @__PURE__ */ c(t, {
|
|
66
66
|
variant: "body2",
|
|
67
67
|
className: "ttw:font-medium",
|
|
68
68
|
children: p.line2
|
|
69
69
|
}),
|
|
70
|
-
/* @__PURE__ */
|
|
70
|
+
/* @__PURE__ */ c(t, {
|
|
71
71
|
variant: "body2",
|
|
72
72
|
className: "ttw:font-medium",
|
|
73
73
|
children: `${x && x}${x && (S || C) && ","} ${S && S} ${C && C}`
|
|
74
74
|
}),
|
|
75
|
-
/* @__PURE__ */
|
|
75
|
+
/* @__PURE__ */ c(t, {
|
|
76
76
|
variant: "body2",
|
|
77
77
|
className: "ttw:font-medium",
|
|
78
78
|
children: p?.country
|
|
79
79
|
})
|
|
80
80
|
]
|
|
81
|
-
}) : /* @__PURE__ */
|
|
81
|
+
}) : /* @__PURE__ */ l("div", {
|
|
82
82
|
className: "ttw:flex ttw:flex-col ttw:gap-0.5",
|
|
83
|
-
children: [/* @__PURE__ */
|
|
83
|
+
children: [/* @__PURE__ */ c(t, {
|
|
84
84
|
variant: "body2",
|
|
85
85
|
className: "ttw:leading-5",
|
|
86
86
|
children: _._("No address on file")
|
|
87
|
-
}), /* @__PURE__ */
|
|
87
|
+
}), /* @__PURE__ */ l(e, {
|
|
88
88
|
type: "button",
|
|
89
89
|
variant: "ghost",
|
|
90
90
|
className: "ttw:text-primary ttw:hover:text-primary/70 ttw:w-fit ttw:px-0 ttw:has-[>svg]:px-0 ttw:py-2 ttw:hover:bg-transparent",
|
|
91
91
|
onClick: () => y(!0),
|
|
92
92
|
disabled: h,
|
|
93
|
-
children: [/* @__PURE__ */
|
|
93
|
+
children: [/* @__PURE__ */ c(a, {}), _._("Add address")]
|
|
94
94
|
})]
|
|
95
95
|
})
|
|
96
96
|
})]
|
|
@@ -7,73 +7,73 @@ import { CounterpartAddressSection as l } from "./index107.js";
|
|
|
7
7
|
import { RadioGroup as u, RadioGroupItem as d } from "./index90.js";
|
|
8
8
|
import { Checkbox as f } from "./index98.js";
|
|
9
9
|
import { useRef as p } from "react";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
10
|
+
import { twMerge as m } from "tailwind-merge";
|
|
11
|
+
import { jsx as h, jsxs as g } from "@emotion/react/jsx-runtime";
|
|
12
|
+
import { useLingui as _ } from "@lingui/react";
|
|
13
13
|
import { Controller as v, useFormContext as y } from "react-hook-form";
|
|
14
14
|
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index108.js
|
|
15
15
|
var b = ({ handleChangeCounterpartType: b, counterpartType: x, isLoading: S, customerType: C, isEditMode: w }) => {
|
|
16
|
-
let { i18n: T } =
|
|
17
|
-
return /* @__PURE__ */
|
|
16
|
+
let { i18n: T } = _(), { control: E } = y(), D = p(null), O = C === "vendor";
|
|
17
|
+
return /* @__PURE__ */ g("div", {
|
|
18
18
|
className: "ttw:flex ttw:flex-col ttw:gap-4",
|
|
19
19
|
ref: D,
|
|
20
20
|
children: [
|
|
21
|
-
/* @__PURE__ */
|
|
22
|
-
className:
|
|
23
|
-
children: [/* @__PURE__ */
|
|
21
|
+
/* @__PURE__ */ g("div", {
|
|
22
|
+
className: m("ttw:flex ttw:flex-col ttw:gap-1.5", w && "ttw:pt-6 ttw:pb-7 ttw:border-b ttw:border-border"),
|
|
23
|
+
children: [/* @__PURE__ */ h(t, {
|
|
24
24
|
variant: "body1",
|
|
25
25
|
className: "ttw:font-medium",
|
|
26
26
|
children: w ? T._("Editing {customerType} details", { customerType: C }) : T._("{customerType} details", { customerType: O ? "Vendor" : "Customer" })
|
|
27
|
-
}), !w && /* @__PURE__ */
|
|
27
|
+
}), !w && /* @__PURE__ */ h(t, {
|
|
28
28
|
variant: "body2",
|
|
29
29
|
color: "muted",
|
|
30
30
|
children: O ? T._("Who are you paying?") : T._("Who are you billing?")
|
|
31
31
|
})]
|
|
32
32
|
}),
|
|
33
|
-
!w && /* @__PURE__ */
|
|
33
|
+
!w && /* @__PURE__ */ g("div", {
|
|
34
34
|
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
35
|
-
children: [/* @__PURE__ */
|
|
35
|
+
children: [/* @__PURE__ */ h(s, { children: T._("{customerType} type", { customerType: O ? "Vendor" : "Customer" }) }), /* @__PURE__ */ g(u, {
|
|
36
36
|
className: "ttw:flex",
|
|
37
37
|
value: x,
|
|
38
38
|
disabled: S,
|
|
39
39
|
onValueChange: (e) => b?.(e),
|
|
40
|
-
children: [/* @__PURE__ */
|
|
41
|
-
className:
|
|
42
|
-
children: [/* @__PURE__ */
|
|
40
|
+
children: [/* @__PURE__ */ g("div", {
|
|
41
|
+
className: m("ttw:flex ttw:p-4 ttw:flex-1 ttw:gap-2 ttw:border ttw:rounded-xl ttw:border-border ttw:hover:bg-primary/10 ttw:hover:border-primary/30", x === "organization" && "ttw:bg-primary/10 ttw:border-primary/30"),
|
|
42
|
+
children: [/* @__PURE__ */ h(d, {
|
|
43
43
|
value: "organization",
|
|
44
44
|
id: "organization",
|
|
45
|
-
className:
|
|
46
|
-
dotClassName:
|
|
45
|
+
className: m(x === "organization" ? "ttw:bg-primary" : "ttw:bg-white"),
|
|
46
|
+
dotClassName: m(x === "organization" && "ttw:fill-white"),
|
|
47
47
|
disabled: S
|
|
48
|
-
}), /* @__PURE__ */
|
|
48
|
+
}), /* @__PURE__ */ g(n, {
|
|
49
49
|
htmlFor: "organization",
|
|
50
50
|
className: "ttw:flex ttw:flex-col ttw:items-start ttw:gap-1.5",
|
|
51
|
-
children: [/* @__PURE__ */
|
|
51
|
+
children: [/* @__PURE__ */ h(t, {
|
|
52
52
|
variant: "body2",
|
|
53
53
|
className: "ttw:leading-3.5",
|
|
54
54
|
children: T._("Business")
|
|
55
|
-
}), /* @__PURE__ */
|
|
55
|
+
}), /* @__PURE__ */ h(t, {
|
|
56
56
|
variant: "caption",
|
|
57
57
|
color: "muted",
|
|
58
58
|
children: T._("A company or organization")
|
|
59
59
|
})]
|
|
60
60
|
})]
|
|
61
|
-
}), /* @__PURE__ */
|
|
62
|
-
className:
|
|
63
|
-
children: [/* @__PURE__ */
|
|
61
|
+
}), /* @__PURE__ */ g("div", {
|
|
62
|
+
className: m("ttw:flex ttw:p-4 ttw:flex-1 ttw:gap-2 ttw:border ttw:rounded-xl ttw:border-border ttw:hover:bg-primary/10 ttw:hover:border-primary/30", x === "individual" && "ttw:bg-primary/10 ttw:border-primary/30"),
|
|
63
|
+
children: [/* @__PURE__ */ h(d, {
|
|
64
64
|
value: "individual",
|
|
65
65
|
id: "individual",
|
|
66
|
-
className:
|
|
67
|
-
dotClassName:
|
|
66
|
+
className: m(x === "individual" ? "ttw:bg-primary" : "ttw:bg-white"),
|
|
67
|
+
dotClassName: m(x === "individual" && "ttw:fill-white"),
|
|
68
68
|
disabled: S
|
|
69
|
-
}), /* @__PURE__ */
|
|
69
|
+
}), /* @__PURE__ */ g(n, {
|
|
70
70
|
htmlFor: "individual",
|
|
71
71
|
className: "ttw:flex ttw:flex-col ttw:items-start ttw:gap-1.5",
|
|
72
|
-
children: [/* @__PURE__ */
|
|
72
|
+
children: [/* @__PURE__ */ h(t, {
|
|
73
73
|
variant: "body2",
|
|
74
74
|
className: "ttw:leading-3.5",
|
|
75
75
|
children: T._("Person")
|
|
76
|
-
}), /* @__PURE__ */
|
|
76
|
+
}), /* @__PURE__ */ h(t, {
|
|
77
77
|
variant: "caption",
|
|
78
78
|
color: "muted",
|
|
79
79
|
children: T._("An individual or contractor")
|
|
@@ -82,97 +82,97 @@ var b = ({ handleChangeCounterpartType: b, counterpartType: x, isLoading: S, cus
|
|
|
82
82
|
})]
|
|
83
83
|
})]
|
|
84
84
|
}),
|
|
85
|
-
x === "individual" ? /* @__PURE__ */
|
|
85
|
+
x === "individual" ? /* @__PURE__ */ g("div", {
|
|
86
86
|
className: "ttw:flex ttw:gap-4",
|
|
87
|
-
children: [/* @__PURE__ */
|
|
87
|
+
children: [/* @__PURE__ */ h(v, {
|
|
88
88
|
name: "firstName",
|
|
89
89
|
control: E,
|
|
90
|
-
render: ({ field: t, fieldState: { error: n } }) => /* @__PURE__ */
|
|
91
|
-
/* @__PURE__ */
|
|
90
|
+
render: ({ field: t, fieldState: { error: n } }) => /* @__PURE__ */ h(r, { children: /* @__PURE__ */ g(i, { children: [
|
|
91
|
+
/* @__PURE__ */ h(s, {
|
|
92
92
|
htmlFor: t.name,
|
|
93
93
|
children: T._("First name")
|
|
94
94
|
}),
|
|
95
|
-
/* @__PURE__ */
|
|
95
|
+
/* @__PURE__ */ h(e, {
|
|
96
96
|
className: w ? "ttw:bg-white" : "",
|
|
97
97
|
id: t.name,
|
|
98
98
|
...t,
|
|
99
99
|
disabled: S,
|
|
100
100
|
"aria-invalid": !!n || void 0
|
|
101
101
|
}),
|
|
102
|
-
/* @__PURE__ */
|
|
102
|
+
/* @__PURE__ */ h(o, { errors: [n] })
|
|
103
103
|
] }) })
|
|
104
|
-
}), /* @__PURE__ */
|
|
104
|
+
}), /* @__PURE__ */ h(v, {
|
|
105
105
|
name: "lastName",
|
|
106
106
|
control: E,
|
|
107
|
-
render: ({ field: t, fieldState: { error: n } }) => /* @__PURE__ */
|
|
108
|
-
/* @__PURE__ */
|
|
107
|
+
render: ({ field: t, fieldState: { error: n } }) => /* @__PURE__ */ h(r, { children: /* @__PURE__ */ g(i, { children: [
|
|
108
|
+
/* @__PURE__ */ h(s, {
|
|
109
109
|
htmlFor: t.name,
|
|
110
110
|
children: T._("Last name")
|
|
111
111
|
}),
|
|
112
|
-
/* @__PURE__ */
|
|
112
|
+
/* @__PURE__ */ h(e, {
|
|
113
113
|
id: t.name,
|
|
114
114
|
...t,
|
|
115
115
|
className: w ? "ttw:bg-white" : "",
|
|
116
116
|
disabled: S,
|
|
117
117
|
"aria-invalid": !!n || void 0
|
|
118
118
|
}),
|
|
119
|
-
/* @__PURE__ */
|
|
119
|
+
/* @__PURE__ */ h(o, { errors: [n] })
|
|
120
120
|
] }) })
|
|
121
121
|
})]
|
|
122
|
-
}) : /* @__PURE__ */
|
|
122
|
+
}) : /* @__PURE__ */ h(v, {
|
|
123
123
|
name: "companyName",
|
|
124
124
|
control: E,
|
|
125
|
-
render: ({ field: t, fieldState: { error: n } }) => /* @__PURE__ */
|
|
126
|
-
/* @__PURE__ */
|
|
125
|
+
render: ({ field: t, fieldState: { error: n } }) => /* @__PURE__ */ h(r, { children: /* @__PURE__ */ g(i, { children: [
|
|
126
|
+
/* @__PURE__ */ h(s, {
|
|
127
127
|
htmlFor: t.name,
|
|
128
128
|
children: T._("Business name")
|
|
129
129
|
}),
|
|
130
|
-
/* @__PURE__ */
|
|
130
|
+
/* @__PURE__ */ h(e, {
|
|
131
131
|
id: t.name,
|
|
132
132
|
...t,
|
|
133
133
|
className: w ? "ttw:bg-white" : "",
|
|
134
134
|
disabled: S,
|
|
135
135
|
"aria-invalid": !!n || void 0
|
|
136
136
|
}),
|
|
137
|
-
/* @__PURE__ */
|
|
137
|
+
/* @__PURE__ */ h(o, { errors: [n] })
|
|
138
138
|
] }) })
|
|
139
139
|
}),
|
|
140
|
-
/* @__PURE__ */
|
|
141
|
-
className:
|
|
140
|
+
/* @__PURE__ */ g("div", {
|
|
141
|
+
className: m("ttw:flex ttw:gap-4", O ? "ttw:flex-row" : "ttw:flex-col"),
|
|
142
142
|
children: [
|
|
143
|
-
/* @__PURE__ */
|
|
143
|
+
/* @__PURE__ */ h(v, {
|
|
144
144
|
name: "email",
|
|
145
145
|
control: E,
|
|
146
|
-
render: ({ field: t, fieldState: { error: n } }) => /* @__PURE__ */
|
|
147
|
-
/* @__PURE__ */
|
|
146
|
+
render: ({ field: t, fieldState: { error: n } }) => /* @__PURE__ */ h(r, { children: /* @__PURE__ */ g(i, { children: [
|
|
147
|
+
/* @__PURE__ */ h(s, {
|
|
148
148
|
htmlFor: t.name,
|
|
149
149
|
children: T._("Email")
|
|
150
150
|
}),
|
|
151
|
-
/* @__PURE__ */
|
|
151
|
+
/* @__PURE__ */ h(e, {
|
|
152
152
|
id: t.name,
|
|
153
153
|
...t,
|
|
154
154
|
className: w ? "ttw:bg-white" : "",
|
|
155
155
|
disabled: S,
|
|
156
156
|
"aria-invalid": !!n || void 0
|
|
157
157
|
}),
|
|
158
|
-
/* @__PURE__ */
|
|
158
|
+
/* @__PURE__ */ h(o, { errors: [n] })
|
|
159
159
|
] }) })
|
|
160
160
|
}),
|
|
161
|
-
!O && /* @__PURE__ */
|
|
161
|
+
!O && /* @__PURE__ */ h(v, {
|
|
162
162
|
name: "remindersEnabled",
|
|
163
163
|
control: E,
|
|
164
|
-
render: ({ field: e }) => /* @__PURE__ */
|
|
164
|
+
render: ({ field: e }) => /* @__PURE__ */ h(r, {
|
|
165
165
|
orientation: "horizontal",
|
|
166
|
-
children: /* @__PURE__ */
|
|
166
|
+
children: /* @__PURE__ */ g(i, {
|
|
167
167
|
className: "ttw:flex-row",
|
|
168
|
-
children: [/* @__PURE__ */
|
|
168
|
+
children: [/* @__PURE__ */ h(f, {
|
|
169
169
|
id: e.name,
|
|
170
170
|
ref: e.ref,
|
|
171
171
|
checked: e.value,
|
|
172
172
|
onCheckedChange: e.onChange,
|
|
173
173
|
onBlur: e.onBlur,
|
|
174
174
|
disabled: S
|
|
175
|
-
}), /* @__PURE__ */
|
|
175
|
+
}), /* @__PURE__ */ h(s, {
|
|
176
176
|
htmlFor: e.name,
|
|
177
177
|
className: "ttw:font-normal ttw:leading-4",
|
|
178
178
|
children: T._("Send reminders to this email when an invoice is approaching its due date")
|
|
@@ -180,47 +180,47 @@ var b = ({ handleChangeCounterpartType: b, counterpartType: x, isLoading: S, cus
|
|
|
180
180
|
})
|
|
181
181
|
})
|
|
182
182
|
}),
|
|
183
|
-
/* @__PURE__ */
|
|
183
|
+
/* @__PURE__ */ h(v, {
|
|
184
184
|
name: "phone",
|
|
185
185
|
control: E,
|
|
186
|
-
render: ({ field: n, fieldState: { error: a } }) => /* @__PURE__ */
|
|
187
|
-
/* @__PURE__ */
|
|
186
|
+
render: ({ field: n, fieldState: { error: a } }) => /* @__PURE__ */ h(r, { children: /* @__PURE__ */ g(i, { children: [
|
|
187
|
+
/* @__PURE__ */ g(s, {
|
|
188
188
|
htmlFor: n.name,
|
|
189
189
|
className: "ttw:gap-1",
|
|
190
|
-
children: [T._("Phone"), /* @__PURE__ */
|
|
190
|
+
children: [T._("Phone"), /* @__PURE__ */ h(t, {
|
|
191
191
|
variant: "body2",
|
|
192
192
|
color: "muted",
|
|
193
193
|
className: "ttw:leading-snug",
|
|
194
194
|
children: T._("(optional)")
|
|
195
195
|
})]
|
|
196
196
|
}),
|
|
197
|
-
/* @__PURE__ */
|
|
197
|
+
/* @__PURE__ */ h(e, {
|
|
198
198
|
id: n.name,
|
|
199
199
|
...n,
|
|
200
200
|
className: w ? "ttw:bg-white" : "",
|
|
201
201
|
disabled: S,
|
|
202
202
|
"aria-invalid": !!a || void 0
|
|
203
203
|
}),
|
|
204
|
-
/* @__PURE__ */
|
|
204
|
+
/* @__PURE__ */ h(o, { errors: [a] })
|
|
205
205
|
] }) })
|
|
206
206
|
})
|
|
207
207
|
]
|
|
208
208
|
}),
|
|
209
|
-
/* @__PURE__ */
|
|
209
|
+
/* @__PURE__ */ h(v, {
|
|
210
210
|
name: "tax_id",
|
|
211
211
|
control: E,
|
|
212
|
-
render: ({ field: n, fieldState: { error: c } }) => /* @__PURE__ */
|
|
213
|
-
/* @__PURE__ */
|
|
212
|
+
render: ({ field: n, fieldState: { error: c } }) => /* @__PURE__ */ h(r, { children: /* @__PURE__ */ g(i, { children: [
|
|
213
|
+
/* @__PURE__ */ g(s, {
|
|
214
214
|
htmlFor: n.name,
|
|
215
215
|
className: "ttw:gap-1",
|
|
216
|
-
children: [T._("Tax ID / {documentType}", { documentType: x === "individual" ? "SSN" : "EIN" }), /* @__PURE__ */
|
|
216
|
+
children: [T._("Tax ID / {documentType}", { documentType: x === "individual" ? "SSN" : "EIN" }), /* @__PURE__ */ h(t, {
|
|
217
217
|
variant: "body2",
|
|
218
218
|
color: "muted",
|
|
219
219
|
className: "ttw:leading-snug",
|
|
220
220
|
children: T._("(optional)")
|
|
221
221
|
})]
|
|
222
222
|
}),
|
|
223
|
-
/* @__PURE__ */
|
|
223
|
+
/* @__PURE__ */ h(e, {
|
|
224
224
|
id: n.name,
|
|
225
225
|
...n,
|
|
226
226
|
className: w ? "ttw:bg-white" : "",
|
|
@@ -228,29 +228,29 @@ var b = ({ handleChangeCounterpartType: b, counterpartType: x, isLoading: S, cus
|
|
|
228
228
|
disabled: S,
|
|
229
229
|
"aria-invalid": !!c || void 0
|
|
230
230
|
}),
|
|
231
|
-
/* @__PURE__ */
|
|
232
|
-
/* @__PURE__ */
|
|
231
|
+
/* @__PURE__ */ h(a, { children: O ? T._("Required only if you'll file a 1099 IRS form for this vendor at year-end.") : T._("Required only if you'll issue a 1099 IRS form at year-end.") }),
|
|
232
|
+
/* @__PURE__ */ h(o, { errors: [c] })
|
|
233
233
|
] }) })
|
|
234
234
|
}),
|
|
235
|
-
(O || !w) && /* @__PURE__ */
|
|
235
|
+
(O || !w) && /* @__PURE__ */ h(l, {
|
|
236
236
|
isLoading: S,
|
|
237
237
|
customerType: C,
|
|
238
238
|
isStandalone: !1
|
|
239
239
|
}),
|
|
240
|
-
O && !w && /* @__PURE__ */
|
|
240
|
+
O && !w && /* @__PURE__ */ g("div", {
|
|
241
241
|
className: "ttw:flex ttw:flex-col ttw:gap-4",
|
|
242
|
-
children: [/* @__PURE__ */
|
|
242
|
+
children: [/* @__PURE__ */ g("div", {
|
|
243
243
|
className: "ttw:flex ttw:flex-col ttw:gap-1.5 ttw:pt-6 ttw:pb-7",
|
|
244
|
-
children: [/* @__PURE__ */
|
|
244
|
+
children: [/* @__PURE__ */ h(t, {
|
|
245
245
|
variant: "body1",
|
|
246
246
|
className: "ttw:font-medium",
|
|
247
247
|
children: T._("Accepted payment methods")
|
|
248
|
-
}), /* @__PURE__ */
|
|
248
|
+
}), /* @__PURE__ */ h(t, {
|
|
249
249
|
variant: "body2",
|
|
250
250
|
color: "muted",
|
|
251
251
|
children: T._("How and where will the money be sent. Don't have these yet? No problem. You can save this vendor and add their payment details later - you just won't be able to send payments until you do.")
|
|
252
252
|
})]
|
|
253
|
-
}), /* @__PURE__ */
|
|
253
|
+
}), /* @__PURE__ */ h(c, {
|
|
254
254
|
isLoading: S,
|
|
255
255
|
isStandalone: !1
|
|
256
256
|
})]
|
|
@@ -4,12 +4,12 @@ import { Table as o, TableBody as s, TableCell as c, TableHead as l, TableHeader
|
|
|
4
4
|
import { useEffect as f, useState as p } from "react";
|
|
5
5
|
import { flexRender as m, getCoreRowModel as h, useReactTable as g } from "@tanstack/react-table";
|
|
6
6
|
import { ArrowDown as _, ArrowUp as v, ArrowUpDown as y, ChevronLeft as b, ChevronRight as x } from "lucide-react";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
7
|
+
import { twMerge as S } from "tailwind-merge";
|
|
8
|
+
import { Fragment as C, jsx as w, jsxs as T } from "@emotion/react/jsx-runtime";
|
|
9
|
+
import { useLingui as E } from "@lingui/react";
|
|
10
10
|
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index157.js
|
|
11
11
|
function D({ columns: _, data: v, sorting: y, onSortingChange: D, pageSize: O, onPageSizeChange: k, nextPaginationToken: A, prevPaginationToken: j, onPaginationTokenChange: M, onRowClick: N, filterComponent: P, children: F, rowLabel: I }) {
|
|
12
|
-
let { i18n: L } =
|
|
12
|
+
let { i18n: L } = E(), [R, z] = p(0);
|
|
13
13
|
f(() => {
|
|
14
14
|
!j && R !== 0 && z(0);
|
|
15
15
|
}, [j, R]);
|
|
@@ -29,81 +29,81 @@ function D({ columns: _, data: v, sorting: y, onSortingChange: D, pageSize: O, o
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
});
|
|
32
|
-
return /* @__PURE__ */
|
|
33
|
-
className:
|
|
34
|
-
children: [P, /* @__PURE__ */
|
|
32
|
+
return /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ T("div", {
|
|
33
|
+
className: S("ttw:flex ttw:flex-col ttw:overflow-hidden ttw:min-h-125 ttw:gap-4 ttw:border ttw:border-zinc-100 ttw:rounded-xl ttw:bg-white", P && "ttw:pt-4"),
|
|
34
|
+
children: [P, /* @__PURE__ */ T(o, {
|
|
35
35
|
className: "ttw:border-none",
|
|
36
|
-
children: [/* @__PURE__ */
|
|
36
|
+
children: [/* @__PURE__ */ w(u, { children: U.getHeaderGroups().map((e) => /* @__PURE__ */ w(d, { children: e.headers.map((e) => /* @__PURE__ */ w(l, {
|
|
37
37
|
className: "ttw:p-3 ttw:text-xs ttw:text-zinc-950 ttw:border-b ttw:border-zinc-100 ttw:w-44.5",
|
|
38
38
|
children: e.isPlaceholder ? null : m(e.column.columnDef.header, e.getContext())
|
|
39
|
-
}, e.id)) }, e.id)) }), /* @__PURE__ */
|
|
39
|
+
}, e.id)) }, e.id)) }), /* @__PURE__ */ w(s, { children: U.getRowModel().rows?.length ? U.getRowModel().rows.map((e) => /* @__PURE__ */ w(d, {
|
|
40
40
|
onClick: () => N(e.original),
|
|
41
41
|
"data-state": e.getIsSelected() && "selected",
|
|
42
|
-
children: e.getVisibleCells().map((e) => /* @__PURE__ */
|
|
42
|
+
children: e.getVisibleCells().map((e) => /* @__PURE__ */ w(c, {
|
|
43
43
|
className: "ttw:px-3 ttw:h-13 ttw:font-medium ttw:border-zinc-100 ttw:border-b",
|
|
44
44
|
children: m(e.column.columnDef.cell, e.getContext())
|
|
45
45
|
}, e.id))
|
|
46
|
-
}, e.id)) : /* @__PURE__ */
|
|
46
|
+
}, e.id)) : /* @__PURE__ */ w(d, { children: /* @__PURE__ */ w(c, {
|
|
47
47
|
colSpan: _.length,
|
|
48
48
|
className: "ttw:min-h-24 ttw:text-center",
|
|
49
49
|
children: F || L._("No results.")
|
|
50
50
|
}) }) })]
|
|
51
51
|
})]
|
|
52
|
-
}), /* @__PURE__ */
|
|
52
|
+
}), /* @__PURE__ */ T("div", {
|
|
53
53
|
className: "ttw:flex ttw:items-center ttw:justify-end ttw:space-x-6.5 ttw:py-3 ttw:bg-transparent",
|
|
54
54
|
children: [
|
|
55
|
-
/* @__PURE__ */
|
|
55
|
+
/* @__PURE__ */ T("span", {
|
|
56
56
|
className: "ttw:flex ttw:items-center ttw:gap-2 ttw:text-sm ttw:leading-5 ttw:font-medium ttw:text-zinc-950",
|
|
57
|
-
children: [L._("Rows per page:"), /* @__PURE__ */
|
|
57
|
+
children: [L._("Rows per page:"), /* @__PURE__ */ T(t, {
|
|
58
58
|
value: String(O),
|
|
59
59
|
onValueChange: (e) => {
|
|
60
60
|
k(Number(e)), M(void 0), z(0);
|
|
61
61
|
},
|
|
62
|
-
children: [/* @__PURE__ */
|
|
62
|
+
children: [/* @__PURE__ */ w(i, {
|
|
63
63
|
size: "sm",
|
|
64
|
-
children: /* @__PURE__ */
|
|
65
|
-
}), /* @__PURE__ */
|
|
66
|
-
/* @__PURE__ */
|
|
64
|
+
children: /* @__PURE__ */ w(a, {})
|
|
65
|
+
}), /* @__PURE__ */ T(n, { children: [
|
|
66
|
+
/* @__PURE__ */ w(r, {
|
|
67
67
|
value: "10",
|
|
68
68
|
children: "10"
|
|
69
69
|
}),
|
|
70
|
-
/* @__PURE__ */
|
|
70
|
+
/* @__PURE__ */ w(r, {
|
|
71
71
|
value: "25",
|
|
72
72
|
children: "25"
|
|
73
73
|
}),
|
|
74
|
-
/* @__PURE__ */
|
|
74
|
+
/* @__PURE__ */ w(r, {
|
|
75
75
|
value: "50",
|
|
76
76
|
children: "50"
|
|
77
77
|
}),
|
|
78
|
-
/* @__PURE__ */
|
|
78
|
+
/* @__PURE__ */ w(r, {
|
|
79
79
|
value: "100",
|
|
80
80
|
children: "100"
|
|
81
81
|
})
|
|
82
82
|
] })]
|
|
83
83
|
})]
|
|
84
84
|
}),
|
|
85
|
-
/* @__PURE__ */
|
|
85
|
+
/* @__PURE__ */ w("span", {
|
|
86
86
|
className: "ttw:text-sm ttw:leading-5 ttw:font-medium ttw:text-zinc-950",
|
|
87
87
|
children: H
|
|
88
88
|
}),
|
|
89
|
-
/* @__PURE__ */
|
|
89
|
+
/* @__PURE__ */ T("div", {
|
|
90
90
|
className: "ttw:flex ttw:items-center ttw:space-x-3",
|
|
91
|
-
children: [/* @__PURE__ */
|
|
91
|
+
children: [/* @__PURE__ */ w(e, {
|
|
92
92
|
variant: "ghost",
|
|
93
93
|
className: "ttw:px-2 ttw:py-2 ttw:border ttw:border-zinc-200 ttw:rounded-lg",
|
|
94
94
|
onClick: () => {
|
|
95
95
|
M(j), z((e) => e - O);
|
|
96
96
|
},
|
|
97
97
|
disabled: !j,
|
|
98
|
-
children: /* @__PURE__ */
|
|
99
|
-
}), /* @__PURE__ */
|
|
98
|
+
children: /* @__PURE__ */ w(b, {})
|
|
99
|
+
}), /* @__PURE__ */ w(e, {
|
|
100
100
|
variant: "ghost",
|
|
101
101
|
className: "ttw:px-2 ttw:py-2 ttw:border ttw:border-zinc-200 ttw:rounded-lg",
|
|
102
102
|
onClick: () => {
|
|
103
103
|
M(A), z((e) => e + O);
|
|
104
104
|
},
|
|
105
105
|
disabled: !A,
|
|
106
|
-
children: /* @__PURE__ */
|
|
106
|
+
children: /* @__PURE__ */ w(x, {})
|
|
107
107
|
})]
|
|
108
108
|
})
|
|
109
109
|
]
|
|
@@ -111,13 +111,13 @@ function D({ columns: _, data: v, sorting: y, onSortingChange: D, pageSize: O, o
|
|
|
111
111
|
}
|
|
112
112
|
function O({ column: t, title: n, ariaLabel: r }) {
|
|
113
113
|
let i = t.getIsSorted();
|
|
114
|
-
return /* @__PURE__ */
|
|
114
|
+
return /* @__PURE__ */ T("div", {
|
|
115
115
|
className: "ttw:flex ttw:items-center ttw:gap-2 ttw:text-inherit",
|
|
116
|
-
children: [n, /* @__PURE__ */
|
|
116
|
+
children: [n, /* @__PURE__ */ w(e, {
|
|
117
117
|
variant: "ghost",
|
|
118
118
|
"aria-label": r,
|
|
119
119
|
onClick: () => t.toggleSorting(i === "asc"),
|
|
120
|
-
children:
|
|
120
|
+
children: w(i === "asc" ? v : i === "desc" ? _ : y, { className: "ttw:size-4" })
|
|
121
121
|
})]
|
|
122
122
|
});
|
|
123
123
|
}
|