@tesouro/embedded-components-react 0.7.21 → 0.7.24
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 +5 -1
- package/dist/index.d.ts +9 -1
- package/dist/lib/CounterpartsWidget.d.ts +9 -1
- package/dist/lib/CounterpartsWidgetPublic.d.ts +9 -1
- package/dist/lib/CustomersWidget.d.ts +9 -1
- package/dist/lib/ReceivablesWidget.d.ts +9 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index32.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/CounterpartDetailsContainer.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/CounterpartsWidget.js +50 -51
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/viewModels.js +4 -2
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index2.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index4.js +72 -128
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index5.js +183 -38
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index6.js +503 -193
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +57 -55
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/index.js +14 -14
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js +114 -102
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index.js +12 -11
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index10.js +534 -7
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index11.js +7 -179
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index12.js +179 -6
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index13.js +3 -1
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index14.js +4 -28
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index15.js +28 -4
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index16.js +4 -0
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index2.js +10 -2
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index7.js +140 -55
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index8.js +53 -47
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index9.js +51 -539
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/reference-data/useLedgerAccountsQuery.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/zod.gen.js +584 -549
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index7.js +0 -520
package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index7.js
CHANGED
|
@@ -1,58 +1,143 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
1
|
+
import { Field as e, FieldContent as t, FieldError as n, FieldLabel as r, Input as i, Select as a, SelectContent as o, SelectItem as s, SelectTrigger as c, SelectValue as l } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { ADDRESS_FIELD_GROUP_LABELS_EN as u } from "./index2.js";
|
|
3
|
+
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
5
4
|
//#region ../../libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index7.js
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
5
|
+
var m = "US";
|
|
6
|
+
function h(e) {
|
|
7
|
+
return e ? [{ message: e }] : void 0;
|
|
8
|
+
}
|
|
9
|
+
function g({ idPrefix: g, values: _, errors: v, stateOptions: y, disabled: b, onChange: x, labels: S }) {
|
|
10
|
+
let C = {
|
|
11
|
+
...u,
|
|
12
|
+
...S,
|
|
13
|
+
fieldMarkers: {
|
|
14
|
+
...u.fieldMarkers,
|
|
15
|
+
...S?.fieldMarkers
|
|
16
|
+
}
|
|
17
|
+
}, { fieldMarkers: w } = C, T = {
|
|
18
|
+
line1: `${g}-line1`,
|
|
19
|
+
line2: `${g}-line2`,
|
|
20
|
+
city: `${g}-city`,
|
|
21
|
+
state: `${g}-state`,
|
|
22
|
+
postalCode: `${g}-postal-code`,
|
|
23
|
+
country: `${g}-country`
|
|
24
|
+
};
|
|
25
|
+
return /* @__PURE__ */ p(d, { children: [
|
|
26
|
+
/* @__PURE__ */ p("div", {
|
|
27
|
+
className: "ttw:flex ttw:gap-4",
|
|
28
|
+
children: [/* @__PURE__ */ f(e, { children: /* @__PURE__ */ p(t, { children: [
|
|
29
|
+
/* @__PURE__ */ f(r, {
|
|
30
|
+
htmlFor: T.line1,
|
|
31
|
+
requirement: "required",
|
|
32
|
+
labels: w,
|
|
33
|
+
children: C.line1
|
|
34
|
+
}),
|
|
35
|
+
/* @__PURE__ */ f(i, {
|
|
36
|
+
id: T.line1,
|
|
37
|
+
"aria-required": !0,
|
|
38
|
+
className: "ttw:bg-background",
|
|
39
|
+
value: _.line1,
|
|
40
|
+
disabled: b,
|
|
41
|
+
"aria-invalid": !!v?.line1 || void 0,
|
|
42
|
+
onChange: (e) => x({ line1: e.target.value })
|
|
43
|
+
}),
|
|
44
|
+
/* @__PURE__ */ f(n, { errors: h(v?.line1) })
|
|
45
|
+
] }) }), /* @__PURE__ */ f(e, { children: /* @__PURE__ */ p(t, { children: [/* @__PURE__ */ f(r, {
|
|
46
|
+
htmlFor: T.line2,
|
|
47
|
+
requirement: "optional",
|
|
48
|
+
labels: w,
|
|
49
|
+
children: C.line2
|
|
50
|
+
}), /* @__PURE__ */ f(i, {
|
|
51
|
+
id: T.line2,
|
|
52
|
+
className: "ttw:bg-background",
|
|
53
|
+
value: _.line2,
|
|
54
|
+
disabled: b,
|
|
55
|
+
onChange: (e) => x({ line2: e.target.value })
|
|
56
|
+
})] }) })]
|
|
57
|
+
}),
|
|
58
|
+
/* @__PURE__ */ p("div", {
|
|
59
|
+
className: "ttw:flex ttw:gap-4",
|
|
60
|
+
children: [/* @__PURE__ */ f(e, { children: /* @__PURE__ */ p(t, { children: [
|
|
61
|
+
/* @__PURE__ */ f(r, {
|
|
62
|
+
htmlFor: T.city,
|
|
63
|
+
requirement: "required",
|
|
64
|
+
labels: w,
|
|
65
|
+
children: C.city
|
|
66
|
+
}),
|
|
67
|
+
/* @__PURE__ */ f(i, {
|
|
68
|
+
id: T.city,
|
|
69
|
+
"aria-required": !0,
|
|
70
|
+
className: "ttw:bg-background",
|
|
71
|
+
value: _.city,
|
|
72
|
+
disabled: b,
|
|
73
|
+
"aria-invalid": !!v?.city || void 0,
|
|
74
|
+
onChange: (e) => x({ city: e.target.value })
|
|
75
|
+
}),
|
|
76
|
+
/* @__PURE__ */ f(n, { errors: h(v?.city) })
|
|
77
|
+
] }) }), /* @__PURE__ */ f(e, { children: /* @__PURE__ */ p(t, { children: [
|
|
78
|
+
/* @__PURE__ */ f(r, {
|
|
79
|
+
htmlFor: T.state,
|
|
80
|
+
requirement: "required",
|
|
81
|
+
labels: w,
|
|
82
|
+
children: C.state
|
|
83
|
+
}),
|
|
84
|
+
/* @__PURE__ */ p(a, {
|
|
85
|
+
value: _.state || void 0,
|
|
86
|
+
disabled: b,
|
|
87
|
+
onValueChange: (e) => x({ state: e }),
|
|
88
|
+
children: [/* @__PURE__ */ f(c, {
|
|
89
|
+
id: T.state,
|
|
90
|
+
"aria-required": !0,
|
|
91
|
+
className: "ttw:w-full ttw:bg-background",
|
|
92
|
+
"aria-invalid": !!v?.state || void 0,
|
|
93
|
+
children: /* @__PURE__ */ f(l, { placeholder: C.statePlaceholder })
|
|
94
|
+
}), /* @__PURE__ */ f(o, { children: y.map((e) => /* @__PURE__ */ f(s, {
|
|
95
|
+
value: e.value,
|
|
96
|
+
children: e.label
|
|
97
|
+
}, e.value)) })]
|
|
98
|
+
}),
|
|
99
|
+
/* @__PURE__ */ f(n, { errors: h(v?.state) })
|
|
100
|
+
] }) })]
|
|
101
|
+
}),
|
|
102
|
+
/* @__PURE__ */ p("div", {
|
|
103
|
+
className: "ttw:flex ttw:gap-4",
|
|
104
|
+
children: [/* @__PURE__ */ f(e, { children: /* @__PURE__ */ p(t, { children: [
|
|
105
|
+
/* @__PURE__ */ f(r, {
|
|
106
|
+
htmlFor: T.postalCode,
|
|
107
|
+
requirement: "required",
|
|
108
|
+
labels: w,
|
|
109
|
+
children: C.postalCode
|
|
110
|
+
}),
|
|
111
|
+
/* @__PURE__ */ f(i, {
|
|
112
|
+
id: T.postalCode,
|
|
113
|
+
"aria-required": !0,
|
|
114
|
+
className: "ttw:bg-background",
|
|
115
|
+
value: _.postalCode,
|
|
116
|
+
disabled: b,
|
|
117
|
+
"aria-invalid": !!v?.postalCode || void 0,
|
|
118
|
+
onChange: (e) => x({ postalCode: e.target.value })
|
|
119
|
+
}),
|
|
120
|
+
/* @__PURE__ */ f(n, { errors: h(v?.postalCode) })
|
|
121
|
+
] }) }), /* @__PURE__ */ f(e, { children: /* @__PURE__ */ p(t, { children: [/* @__PURE__ */ f(r, {
|
|
122
|
+
htmlFor: T.country,
|
|
123
|
+
requirement: "required",
|
|
124
|
+
labels: w,
|
|
125
|
+
children: C.country
|
|
126
|
+
}), /* @__PURE__ */ p(a, {
|
|
127
|
+
value: m,
|
|
128
|
+
disabled: !0,
|
|
129
|
+
children: [/* @__PURE__ */ f(c, {
|
|
130
|
+
id: T.country,
|
|
131
|
+
"aria-required": !0,
|
|
132
|
+
className: "ttw:w-full ttw:bg-background",
|
|
133
|
+
children: /* @__PURE__ */ f(l, {})
|
|
134
|
+
}), /* @__PURE__ */ f(o, { children: /* @__PURE__ */ f(s, {
|
|
135
|
+
value: m,
|
|
136
|
+
children: C.countryValue
|
|
137
|
+
}) })]
|
|
138
|
+
})] }) })]
|
|
139
|
+
})
|
|
140
|
+
] });
|
|
56
141
|
}
|
|
57
142
|
//#endregion
|
|
58
|
-
export {
|
|
143
|
+
export { g as CounterpartAddressFields };
|
package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index8.js
CHANGED
|
@@ -1,52 +1,58 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { Label as e, RadioGroup as t, RadioGroupItem as n } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { COUNTERPART_TYPE_CHOOSER_LABELS_EN as r } from "./index2.js";
|
|
3
|
+
import { useId as i } from "react";
|
|
4
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
4
5
|
//#region ../../libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index8.js
|
|
5
|
-
function
|
|
6
|
-
let
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
type: "button",
|
|
35
|
-
variant: "ghost",
|
|
36
|
-
size: "lg",
|
|
37
|
-
onClick: b,
|
|
38
|
-
children: v
|
|
39
|
-
}), /* @__PURE__ */ c(e, {
|
|
40
|
-
type: "submit",
|
|
41
|
-
form: S,
|
|
42
|
-
size: "lg",
|
|
43
|
-
disabled: h || g,
|
|
44
|
-
children: _
|
|
6
|
+
function s({ value: s, onChange: c, disabled: l, variant: u = "cards", labels: d }) {
|
|
7
|
+
let f = {
|
|
8
|
+
...r,
|
|
9
|
+
...d
|
|
10
|
+
}, p = i(), m = u === "pills";
|
|
11
|
+
return /* @__PURE__ */ o("fieldset", {
|
|
12
|
+
className: "ttw:flex ttw:flex-col ttw:gap-2",
|
|
13
|
+
disabled: l,
|
|
14
|
+
children: [/* @__PURE__ */ a("legend", {
|
|
15
|
+
className: "ttw:mb-1 ttw:text-sm ttw:font-medium",
|
|
16
|
+
children: f.heading
|
|
17
|
+
}), /* @__PURE__ */ o(t, {
|
|
18
|
+
className: m ? "ttw:flex ttw:flex-wrap ttw:gap-2" : "ttw:grid ttw:grid-cols-2 ttw:gap-3",
|
|
19
|
+
value: s,
|
|
20
|
+
onValueChange: (e) => c(e),
|
|
21
|
+
children: [/* @__PURE__ */ o(e, {
|
|
22
|
+
htmlFor: `${p}-organization`,
|
|
23
|
+
className: m ? "ttw:flex ttw:cursor-pointer ttw:items-center ttw:gap-2 ttw:rounded-full ttw:border ttw:border-border ttw:bg-background ttw:px-3 ttw:py-1.5 ttw:text-sm ttw:has-[:checked]:border-primary ttw:has-[:checked]:bg-primary/10" : "ttw:flex ttw:cursor-pointer ttw:items-start ttw:gap-3 ttw:rounded-md ttw:border ttw:p-3 ttw:has-[:checked]:border-primary",
|
|
24
|
+
children: [/* @__PURE__ */ a(n, {
|
|
25
|
+
value: "organization",
|
|
26
|
+
id: `${p}-organization`
|
|
27
|
+
}), /* @__PURE__ */ o("span", {
|
|
28
|
+
className: "ttw:flex ttw:flex-col ttw:gap-0.5",
|
|
29
|
+
children: [/* @__PURE__ */ a("span", {
|
|
30
|
+
className: "ttw:font-medium",
|
|
31
|
+
children: f.organization
|
|
32
|
+
}), m ? null : /* @__PURE__ */ a("span", {
|
|
33
|
+
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
34
|
+
children: f.organizationHint
|
|
45
35
|
})]
|
|
46
|
-
})
|
|
47
|
-
|
|
48
|
-
|
|
36
|
+
})]
|
|
37
|
+
}), /* @__PURE__ */ o(e, {
|
|
38
|
+
htmlFor: `${p}-individual`,
|
|
39
|
+
className: m ? "ttw:flex ttw:cursor-pointer ttw:items-center ttw:gap-2 ttw:rounded-full ttw:border ttw:border-border ttw:bg-background ttw:px-3 ttw:py-1.5 ttw:text-sm ttw:has-[:checked]:border-primary ttw:has-[:checked]:bg-primary/10" : "ttw:flex ttw:cursor-pointer ttw:items-start ttw:gap-3 ttw:rounded-md ttw:border ttw:p-3 ttw:has-[:checked]:border-primary",
|
|
40
|
+
children: [/* @__PURE__ */ a(n, {
|
|
41
|
+
value: "individual",
|
|
42
|
+
id: `${p}-individual`
|
|
43
|
+
}), /* @__PURE__ */ o("span", {
|
|
44
|
+
className: "ttw:flex ttw:flex-col ttw:gap-0.5",
|
|
45
|
+
children: [/* @__PURE__ */ a("span", {
|
|
46
|
+
className: "ttw:font-medium",
|
|
47
|
+
children: f.individual
|
|
48
|
+
}), m ? null : /* @__PURE__ */ a("span", {
|
|
49
|
+
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
50
|
+
children: f.individualHint
|
|
51
|
+
})]
|
|
52
|
+
})]
|
|
53
|
+
})]
|
|
54
|
+
})]
|
|
49
55
|
});
|
|
50
56
|
}
|
|
51
57
|
//#endregion
|
|
52
|
-
export {
|
|
58
|
+
export { s as CounterpartTypeChooser, s as default };
|