@tesouro/embedded-components-react 0.7.22 → 0.7.25

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.
Files changed (41) hide show
  1. package/dist/index.css +0 -3
  2. package/dist/index.d.ts +20 -20
  3. package/dist/lib/CounterpartsWidget.d.ts +10 -2
  4. package/dist/lib/CounterpartsWidgetPublic.d.ts +10 -2
  5. package/dist/lib/CustomersWidget.d.ts +19 -19
  6. package/dist/lib/ExpenseManagementWidget.d.ts +1 -1
  7. package/dist/lib/ReceivablesWidget.d.ts +9 -1
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index32.js +1 -1
  9. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/CounterpartDetailsContainer.js +1 -1
  10. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/CounterpartsWidget.js +50 -51
  11. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/viewModels.js +4 -2
  12. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index.js +1 -1
  13. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index2.js +1 -1
  14. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index4.js +72 -128
  15. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index5.js +183 -38
  16. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index6.js +503 -193
  17. package/dist/libs/tesouro-embedded-components-react/customers-widget/feature/dist/lib/CustomersWidget/CustomersWidget.js +33 -18
  18. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +57 -55
  19. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/index.js +14 -14
  20. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js +114 -102
  21. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index.js +12 -11
  22. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index10.js +534 -7
  23. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index11.js +7 -179
  24. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index12.js +179 -6
  25. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index13.js +3 -1
  26. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index14.js +4 -28
  27. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index15.js +28 -4
  28. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index16.js +4 -0
  29. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index2.js +10 -2
  30. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index7.js +140 -55
  31. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index8.js +53 -47
  32. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index9.js +51 -539
  33. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  34. package/package.json +1 -1
  35. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index7.js +0 -520
  36. package/dist/libs/tesouro-embedded-components-react/customers-widget/feature/dist/lib/CustomersWidgetMonite/CustomersWidgetMonite.js +0 -45
  37. package/dist/libs/tesouro-embedded-components-react/customers-widget/feature/dist/lib/CustomersWidgetNative/CustomersWidgetNative.js +0 -42
  38. package/dist/libs/tesouro-embedded-components-react/shared/monite-wrapper/feature/dist/index.js +0 -4
  39. package/dist/libs/tesouro-embedded-components-react/shared/monite-wrapper/feature/dist/lib/MoniteRegionProvider.js +0 -21
  40. package/dist/libs/tesouro-embedded-components-react/shared/monite-wrapper/feature/dist/lib/MoniteWrapper.js +0 -134
  41. package/dist/libs/tesouro-embedded-components-react/shared/monite-wrapper/feature/dist/lib/RefreshingMoniteWidgetProvider.js +0 -7
@@ -1,135 +1,79 @@
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 { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
1
+ import { Button as e, LABEL_LABELS_EN as t, RequiredFieldsLegend as n, Spinner as r, Typography as i, mergeRequiredFieldsLegendLabels as a } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { CounterpartAddressFields as o } from "../../../shared/counterpart-management/ui/dist/index7.js";
3
+ import "../../../shared/counterpart-management/ui/dist/index.js";
4
+ import { jsx as s, jsxs as c } from "react/jsx-runtime";
3
5
  //#region ../../libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index4.js
4
- var p = "US";
5
- function m(e) {
6
- return e ? [{ message: e }] : void 0;
6
+ function l(e, t) {
7
+ return {
8
+ line1: e.streetAddressLabel,
9
+ line2: e.addressLine2Label,
10
+ city: e.cityLabel,
11
+ state: e.stateLabel,
12
+ statePlaceholder: e.statePlaceholder,
13
+ postalCode: e.postalCodeLabel,
14
+ country: e.countryLabel,
15
+ countryValue: e.countryUnitedStates,
16
+ fieldMarkers: t
17
+ };
7
18
  }
8
- function h({ idPrefix: h, values: g, errors: _, stateOptions: v, disabled: y, onChange: b, labels: x, fieldMarkers: S }) {
9
- let C = {
10
- line1: `${h}-line1`,
11
- line2: `${h}-line2`,
12
- city: `${h}-city`,
13
- state: `${h}-state`,
14
- postalCode: `${h}-postal-code`,
15
- country: `${h}-country`
19
+ function u({ form: u, labels: d }) {
20
+ let f = {
21
+ ...t,
22
+ ...u.fieldMarkers
16
23
  };
17
- return /* @__PURE__ */ f(u, { children: [
18
- /* @__PURE__ */ f("div", {
19
- className: "ttw:flex ttw:gap-4",
20
- children: [/* @__PURE__ */ d(e, { children: /* @__PURE__ */ f(t, { children: [
21
- /* @__PURE__ */ d(r, {
22
- htmlFor: C.line1,
23
- requirement: "required",
24
- labels: S,
25
- children: x.streetAddressLabel
26
- }),
27
- /* @__PURE__ */ d(i, {
28
- id: C.line1,
29
- "aria-required": !0,
30
- className: "ttw:bg-background",
31
- value: g.line1,
32
- disabled: y,
33
- "aria-invalid": !!_?.line1 || void 0,
34
- onChange: (e) => b({ line1: e.target.value })
35
- }),
36
- /* @__PURE__ */ d(n, { errors: m(_?.line1) })
37
- ] }) }), /* @__PURE__ */ d(e, { children: /* @__PURE__ */ f(t, { children: [/* @__PURE__ */ d(r, {
38
- htmlFor: C.line2,
39
- requirement: "optional",
40
- labels: S,
41
- children: x.addressLine2Label
42
- }), /* @__PURE__ */ d(i, {
43
- id: C.line2,
44
- className: "ttw:bg-background",
45
- value: g.line2,
46
- disabled: y,
47
- onChange: (e) => b({ line2: e.target.value })
48
- })] }) })]
49
- }),
50
- /* @__PURE__ */ f("div", {
51
- className: "ttw:flex ttw:gap-4",
52
- children: [/* @__PURE__ */ d(e, { children: /* @__PURE__ */ f(t, { children: [
53
- /* @__PURE__ */ d(r, {
54
- htmlFor: C.city,
55
- requirement: "required",
56
- labels: S,
57
- children: x.cityLabel
58
- }),
59
- /* @__PURE__ */ d(i, {
60
- id: C.city,
61
- "aria-required": !0,
62
- className: "ttw:bg-background",
63
- value: g.city,
64
- disabled: y,
65
- "aria-invalid": !!_?.city || void 0,
66
- onChange: (e) => b({ city: e.target.value })
67
- }),
68
- /* @__PURE__ */ d(n, { errors: m(_?.city) })
69
- ] }) }), /* @__PURE__ */ d(e, { children: /* @__PURE__ */ f(t, { children: [
70
- /* @__PURE__ */ d(r, {
71
- htmlFor: C.state,
72
- requirement: "required",
73
- labels: S,
74
- children: x.stateLabel
75
- }),
76
- /* @__PURE__ */ f(a, {
77
- value: g.state || void 0,
78
- disabled: y,
79
- onValueChange: (e) => b({ state: e }),
80
- children: [/* @__PURE__ */ d(c, {
81
- id: C.state,
82
- "aria-required": !0,
83
- className: "ttw:w-full ttw:bg-background",
84
- "aria-invalid": !!_?.state || void 0,
85
- children: /* @__PURE__ */ d(l, { placeholder: x.statePlaceholder })
86
- }), /* @__PURE__ */ d(o, { children: v.map((e) => /* @__PURE__ */ d(s, {
87
- value: e.value,
88
- children: e.label
89
- }, e.value)) })]
90
- }),
91
- /* @__PURE__ */ d(n, { errors: m(_?.state) })
92
- ] }) })]
93
- }),
94
- /* @__PURE__ */ f("div", {
95
- className: "ttw:flex ttw:gap-4",
96
- children: [/* @__PURE__ */ d(e, { children: /* @__PURE__ */ f(t, { children: [
97
- /* @__PURE__ */ d(r, {
98
- htmlFor: C.postalCode,
99
- requirement: "required",
100
- labels: S,
101
- children: x.postalCodeLabel
24
+ return /* @__PURE__ */ c("form", {
25
+ className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:rounded-[10px] ttw:border ttw:border-border ttw:bg-muted ttw:p-4",
26
+ onSubmit: (e) => {
27
+ e.preventDefault(), u.onSubmit();
28
+ },
29
+ children: [/* @__PURE__ */ c("div", {
30
+ className: "ttw:flex ttw:flex-col ttw:gap-4",
31
+ children: [
32
+ /* @__PURE__ */ s("div", {
33
+ className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-3 ttw:border-b ttw:border-border ttw:pt-6 ttw:pb-7",
34
+ children: /* @__PURE__ */ s(i, {
35
+ variant: "body1",
36
+ className: "ttw:font-medium",
37
+ children: u.hasExistingAddress ? d.editingAddressHeading : d.addingAddressHeading
38
+ })
102
39
  }),
103
- /* @__PURE__ */ d(i, {
104
- id: C.postalCode,
105
- "aria-required": !0,
106
- className: "ttw:bg-background",
107
- value: g.postalCode,
108
- disabled: y,
109
- "aria-invalid": !!_?.postalCode || void 0,
110
- onChange: (e) => b({ postalCode: e.target.value })
40
+ /* @__PURE__ */ s(n, { labels: a(f, u.requiredFieldsLegend) }),
41
+ u.formError && /* @__PURE__ */ s(i, {
42
+ variant: "body2",
43
+ color: "destructive",
44
+ role: "alert",
45
+ children: u.formError
111
46
  }),
112
- /* @__PURE__ */ d(n, { errors: m(_?.postalCode) })
113
- ] }) }), /* @__PURE__ */ d(e, { children: /* @__PURE__ */ f(t, { children: [/* @__PURE__ */ d(r, {
114
- htmlFor: C.country,
115
- requirement: "required",
116
- labels: S,
117
- children: x.countryLabel
118
- }), /* @__PURE__ */ f(a, {
119
- value: p,
120
- disabled: !0,
121
- children: [/* @__PURE__ */ d(c, {
122
- id: C.country,
123
- "aria-required": !0,
124
- className: "ttw:w-full ttw:bg-background",
125
- children: /* @__PURE__ */ d(l, {})
126
- }), /* @__PURE__ */ d(o, { children: /* @__PURE__ */ d(s, {
127
- value: p,
128
- children: x.countryUnitedStates
129
- }) })]
130
- })] }) })]
131
- })
132
- ] });
47
+ /* @__PURE__ */ s(o, {
48
+ idPrefix: "counterpart-address-form",
49
+ values: u.values,
50
+ errors: u.errors,
51
+ stateOptions: u.stateOptions,
52
+ disabled: u.inProgress,
53
+ onChange: u.onChange,
54
+ labels: l(d, {
55
+ ...f,
56
+ ...u.addressFieldMarkers
57
+ })
58
+ })
59
+ ]
60
+ }), /* @__PURE__ */ c("div", {
61
+ className: "ttw:flex ttw:justify-end ttw:gap-4 ttw:pt-6",
62
+ children: [/* @__PURE__ */ s(e, {
63
+ type: "button",
64
+ variant: "outline",
65
+ className: "ttw:w-fit ttw:border-border",
66
+ disabled: u.inProgress,
67
+ onClick: u.onCancel,
68
+ children: d.cancelButton
69
+ }), /* @__PURE__ */ c(e, {
70
+ type: "submit",
71
+ className: "ttw:w-fit",
72
+ disabled: u.inProgress || u.submitDisabled,
73
+ children: [u.inProgress && /* @__PURE__ */ s(r, {}), d.saveButton]
74
+ })]
75
+ })]
76
+ });
133
77
  }
134
78
  //#endregion
135
- export { h as CounterpartAddressFields };
79
+ export { u as CounterpartAddressForm, l as addressFieldLabels };
@@ -1,66 +1,211 @@
1
- import { Button as e, LABEL_LABELS_EN as t, RequiredFieldsLegend as n, Spinner as r, Typography as i, mergeRequiredFieldsLegendLabels as a } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { CounterpartAddressFields as o } from "./index4.js";
3
- import { jsx as s, jsxs as c } from "react/jsx-runtime";
1
+ import { Button as e, Checkbox as t, Field as n, FieldContent as r, FieldDescription as i, FieldError as a, FieldLabel as o, Input as s, LABEL_LABELS_EN as c, Label as l, RequiredFieldsLegend as u, Spinner as d, Typography as f, cn as p, mergeRequiredFieldsLegendLabels as m } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { CounterpartAddressFields as h } from "../../../shared/counterpart-management/ui/dist/index7.js";
3
+ import "../../../shared/counterpart-management/ui/dist/index.js";
4
+ import { addressFieldLabels as g } from "./index4.js";
5
+ import { jsx as _, jsxs as v } from "react/jsx-runtime";
4
6
  //#region ../../libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index5.js
5
- function l({ form: l, labels: u }) {
6
- let d = {
7
- ...t,
8
- ...l.fieldMarkers
7
+ function y(e) {
8
+ return e ? [{ message: e }] : void 0;
9
+ }
10
+ function b({ form: b, labels: x }) {
11
+ let { name: S, email: C, phone: w, taxId: T, reminders: E, address: D, inProgress: O } = b, k = {
12
+ ...x,
13
+ ...b.labels
14
+ }, A = {
15
+ ...c,
16
+ ...b.fieldMarkers
9
17
  };
10
- return /* @__PURE__ */ c("form", {
18
+ return /* @__PURE__ */ v("form", {
11
19
  className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:rounded-[10px] ttw:border ttw:border-border ttw:bg-muted ttw:p-4",
12
20
  onSubmit: (e) => {
13
- e.preventDefault(), l.onSubmit();
21
+ e.preventDefault(), b.onSubmit();
14
22
  },
15
- children: [/* @__PURE__ */ c("div", {
23
+ children: [/* @__PURE__ */ v("div", {
16
24
  className: "ttw:flex ttw:flex-col ttw:gap-4",
17
25
  children: [
18
- /* @__PURE__ */ s("div", {
19
- className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-3 ttw:border-b ttw:border-border ttw:pt-6 ttw:pb-7",
20
- children: /* @__PURE__ */ s(i, {
26
+ /* @__PURE__ */ _("div", {
27
+ className: "ttw:flex ttw:flex-col ttw:gap-1.5 ttw:border-b ttw:border-border ttw:pt-6 ttw:pb-7",
28
+ children: /* @__PURE__ */ _(f, {
21
29
  variant: "body1",
22
30
  className: "ttw:font-medium",
23
- children: l.hasExistingAddress ? u.editingAddressHeading : u.addingAddressHeading
31
+ children: b.heading
24
32
  })
25
33
  }),
26
- /* @__PURE__ */ s(n, { labels: a(d, l.requiredFieldsLegend) }),
27
- l.formError && /* @__PURE__ */ s(i, {
34
+ /* @__PURE__ */ _(u, { labels: m(A, b.requiredFieldsLegend) }),
35
+ b.formError && /* @__PURE__ */ _(f, {
28
36
  variant: "body2",
29
37
  color: "destructive",
30
38
  role: "alert",
31
- children: l.formError
39
+ children: b.formError
40
+ }),
41
+ S.kind === "person" ? /* @__PURE__ */ v("div", {
42
+ className: "ttw:flex ttw:gap-4",
43
+ children: [/* @__PURE__ */ _(n, { children: /* @__PURE__ */ v(r, { children: [
44
+ /* @__PURE__ */ _(o, {
45
+ htmlFor: "counterpart-edit-first-name",
46
+ requirement: "required",
47
+ labels: A,
48
+ children: k.firstNameLabel
49
+ }),
50
+ /* @__PURE__ */ _(s, {
51
+ id: "counterpart-edit-first-name",
52
+ "aria-required": !0,
53
+ className: "ttw:bg-background",
54
+ value: S.firstName.value,
55
+ disabled: O,
56
+ "aria-invalid": !!S.firstName.error || void 0,
57
+ onChange: (e) => b.onFieldChange("firstName", e.target.value)
58
+ }),
59
+ /* @__PURE__ */ _(a, { errors: y(S.firstName.error) })
60
+ ] }) }), /* @__PURE__ */ _(n, { children: /* @__PURE__ */ v(r, { children: [
61
+ /* @__PURE__ */ _(o, {
62
+ htmlFor: "counterpart-edit-last-name",
63
+ requirement: "required",
64
+ labels: A,
65
+ children: k.lastNameLabel
66
+ }),
67
+ /* @__PURE__ */ _(s, {
68
+ id: "counterpart-edit-last-name",
69
+ "aria-required": !0,
70
+ className: "ttw:bg-background",
71
+ value: S.lastName.value,
72
+ disabled: O,
73
+ "aria-invalid": !!S.lastName.error || void 0,
74
+ onChange: (e) => b.onFieldChange("lastName", e.target.value)
75
+ }),
76
+ /* @__PURE__ */ _(a, { errors: y(S.lastName.error) })
77
+ ] }) })]
78
+ }) : /* @__PURE__ */ _(n, { children: /* @__PURE__ */ v(r, { children: [
79
+ /* @__PURE__ */ _(o, {
80
+ htmlFor: "counterpart-edit-business-name",
81
+ requirement: "required",
82
+ labels: A,
83
+ children: k.businessNameLabel
84
+ }),
85
+ /* @__PURE__ */ _(s, {
86
+ id: "counterpart-edit-business-name",
87
+ "aria-required": !0,
88
+ className: "ttw:bg-background",
89
+ value: S.businessName.value,
90
+ disabled: O,
91
+ "aria-invalid": !!S.businessName.error || void 0,
92
+ onChange: (e) => b.onFieldChange("businessName", e.target.value)
93
+ }),
94
+ /* @__PURE__ */ _(a, { errors: y(S.businessName.error) })
95
+ ] }) }),
96
+ /* @__PURE__ */ v("div", {
97
+ className: p("ttw:flex ttw:gap-4", b.contactLayout === "inline" ? "ttw:flex-row" : "ttw:flex-col"),
98
+ children: [
99
+ /* @__PURE__ */ _(n, { children: /* @__PURE__ */ v(r, { children: [
100
+ /* @__PURE__ */ _(o, {
101
+ htmlFor: "counterpart-edit-email",
102
+ requirement: "required",
103
+ labels: A,
104
+ children: k.rowEmail
105
+ }),
106
+ /* @__PURE__ */ _(s, {
107
+ id: "counterpart-edit-email",
108
+ "aria-required": !0,
109
+ type: "email",
110
+ className: "ttw:bg-background",
111
+ value: C.value,
112
+ disabled: O,
113
+ "aria-invalid": !!C.error || void 0,
114
+ onChange: (e) => b.onFieldChange("email", e.target.value)
115
+ }),
116
+ /* @__PURE__ */ _(a, { errors: y(C.error) })
117
+ ] }) }),
118
+ E && /* @__PURE__ */ v(l, {
119
+ htmlFor: "counterpart-edit-reminders",
120
+ className: "ttw:flex ttw:items-start ttw:gap-3 ttw:rounded-md ttw:border ttw:border-border ttw:bg-background ttw:p-3",
121
+ children: [/* @__PURE__ */ _(t, {
122
+ id: "counterpart-edit-reminders",
123
+ checked: E.checked,
124
+ disabled: O,
125
+ onCheckedChange: (e) => b.onRemindersChange(e === !0)
126
+ }), /* @__PURE__ */ v("span", {
127
+ className: "ttw:flex ttw:flex-col ttw:gap-0.5",
128
+ children: [/* @__PURE__ */ _("span", {
129
+ className: "ttw:text-sm ttw:font-medium",
130
+ children: k.remindersCheckboxLabel
131
+ }), /* @__PURE__ */ _("span", {
132
+ className: "ttw:text-sm ttw:text-muted-foreground",
133
+ children: k.remindersCheckboxDescription
134
+ })]
135
+ })]
136
+ }),
137
+ /* @__PURE__ */ _(n, { children: /* @__PURE__ */ v(r, { children: [
138
+ /* @__PURE__ */ _(o, {
139
+ htmlFor: "counterpart-edit-phone",
140
+ requirement: "optional",
141
+ labels: A,
142
+ children: k.rowPhone
143
+ }),
144
+ /* @__PURE__ */ _(s, {
145
+ id: "counterpart-edit-phone",
146
+ type: "tel",
147
+ className: "ttw:bg-background",
148
+ value: w.value,
149
+ disabled: O,
150
+ "aria-invalid": !!w.error || void 0,
151
+ onChange: (e) => b.onFieldChange("phone", e.target.value)
152
+ }),
153
+ /* @__PURE__ */ _(a, { errors: y(w.error) })
154
+ ] }) })
155
+ ]
32
156
  }),
33
- /* @__PURE__ */ s(o, {
34
- idPrefix: "counterpart-address-form",
35
- values: l.values,
36
- errors: l.errors,
37
- stateOptions: l.stateOptions,
38
- disabled: l.inProgress,
39
- onChange: l.onChange,
40
- fieldMarkers: {
41
- ...d,
42
- ...l.addressFieldMarkers
43
- },
44
- labels: u
157
+ /* @__PURE__ */ _(n, { children: /* @__PURE__ */ v(r, { children: [
158
+ /* @__PURE__ */ _(o, {
159
+ htmlFor: "counterpart-edit-tax-id",
160
+ requirement: "optional",
161
+ labels: A,
162
+ children: T.label
163
+ }),
164
+ /* @__PURE__ */ _(s, {
165
+ id: "counterpart-edit-tax-id",
166
+ className: "ttw:bg-background",
167
+ placeholder: T.placeholder,
168
+ value: T.value,
169
+ disabled: O,
170
+ "aria-invalid": !!T.error || void 0,
171
+ onChange: (e) => b.onFieldChange("taxId", e.target.value)
172
+ }),
173
+ /* @__PURE__ */ _(i, { children: T.description }),
174
+ /* @__PURE__ */ _(a, { errors: y(T.error) })
175
+ ] }) }),
176
+ D && /* @__PURE__ */ _("div", {
177
+ className: "ttw:flex ttw:flex-col ttw:gap-4",
178
+ children: /* @__PURE__ */ _(h, {
179
+ idPrefix: "counterpart-edit-address",
180
+ values: D.values,
181
+ errors: D.errors,
182
+ stateOptions: b.stateOptions,
183
+ disabled: O,
184
+ onChange: b.onAddressChange,
185
+ labels: g(k, {
186
+ ...A,
187
+ ...b.addressFieldMarkers
188
+ })
189
+ })
45
190
  })
46
191
  ]
47
- }), /* @__PURE__ */ c("div", {
192
+ }), /* @__PURE__ */ v("div", {
48
193
  className: "ttw:flex ttw:justify-end ttw:gap-4 ttw:pt-6",
49
- children: [/* @__PURE__ */ s(e, {
194
+ children: [/* @__PURE__ */ _(e, {
50
195
  type: "button",
51
196
  variant: "outline",
52
197
  className: "ttw:w-fit ttw:border-border",
53
- disabled: l.inProgress,
54
- onClick: l.onCancel,
55
- children: u.cancelButton
56
- }), /* @__PURE__ */ c(e, {
198
+ disabled: O,
199
+ onClick: b.onCancel,
200
+ children: k.cancelButton
201
+ }), /* @__PURE__ */ v(e, {
57
202
  type: "submit",
58
203
  className: "ttw:w-fit",
59
- disabled: l.inProgress || l.submitDisabled,
60
- children: [l.inProgress && /* @__PURE__ */ s(r, {}), u.saveButton]
204
+ disabled: O || b.submitDisabled,
205
+ children: [O && /* @__PURE__ */ _(d, {}), k.saveButton]
61
206
  })]
62
207
  })]
63
208
  });
64
209
  }
65
210
  //#endregion
66
- export { l as CounterpartAddressForm };
211
+ export { b as CounterpartEditForm };