@tesouro/embedded-components-react 0.11.65 → 0.11.66
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 +14 -14
- package/dist/index.css +6 -24
- package/dist/index.d.ts +27 -39
- package/dist/lib/CounterpartsWidget.d.ts +26 -39
- package/dist/lib/CounterpartsWidgetPublic.d.ts +26 -39
- package/dist/lib/CustomersWidget.d.ts +26 -39
- package/dist/lib/ReceivablesWidget.d.ts +14 -4
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/CounterpartDetailsContainer.js +8 -12
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/CounterpartDetailsPanel.js +93 -110
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/CounterpartsWidget.js +52 -52
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/useCounterpartDetailsActions.js +72 -107
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/useCounterpartDetailsSheetView.js +27 -27
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/useCounterpartsTable.js +112 -145
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/useCounterpartsWidget.js +13 -16
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/viewModels.js +3 -122
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/mocks/labels.js +5 -5
- 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 +44 -65
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index3.js +157 -134
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index4.js +18 -14
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index5.js +362 -55
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/index.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/labels.js +16 -9
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useAddressForm.js +2 -66
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useDeleteController.js +48 -46
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index10.js +138 -149
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index11.js +19 -20
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index12.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index13.js +21 -27
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index2.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index3.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index8.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index9.js +30 -63
- 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/index6.js +0 -211
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index7.js +0 -509
package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index11.js
CHANGED
|
@@ -5,44 +5,43 @@ import { FormSheet as r } from "./index9.js";
|
|
|
5
5
|
import { useId as i } from "react";
|
|
6
6
|
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
7
7
|
// ../../libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index11.js
|
|
8
|
-
function s({ open: s, onOpenChange: c, mode: l, values: u, errors: d, highlightedFields: f, inProgress: p,
|
|
9
|
-
let
|
|
8
|
+
function s({ open: s, onOpenChange: c, mode: l, values: u, errors: d, highlightedFields: f, inProgress: p, onChange: m, onSubmit: h, onCancel: g, labels: _ }) {
|
|
9
|
+
let v = {
|
|
10
10
|
...t,
|
|
11
|
-
...
|
|
11
|
+
..._,
|
|
12
12
|
fieldMarkers: {
|
|
13
13
|
...t.fieldMarkers,
|
|
14
|
-
...
|
|
14
|
+
..._?.fieldMarkers
|
|
15
15
|
}
|
|
16
|
-
},
|
|
16
|
+
}, y = i();
|
|
17
17
|
return /* @__PURE__ */ o(r, {
|
|
18
18
|
open: s,
|
|
19
19
|
onOpenChange: c,
|
|
20
|
-
title: l === "edit" ?
|
|
20
|
+
title: l === "edit" ? v.editTitle : v.createTitle,
|
|
21
21
|
formError: d?.form,
|
|
22
22
|
inProgress: p,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
onCancel: _,
|
|
23
|
+
submitLabel: v.saveButton,
|
|
24
|
+
cancelLabel: v.cancelButton,
|
|
25
|
+
onSubmit: h,
|
|
26
|
+
onCancel: g,
|
|
28
27
|
children: [/* @__PURE__ */ a(n, {
|
|
29
|
-
idPrefix:
|
|
28
|
+
idPrefix: y,
|
|
30
29
|
values: u,
|
|
31
30
|
errors: d,
|
|
32
31
|
highlighted: f,
|
|
33
|
-
onChange:
|
|
32
|
+
onChange: m,
|
|
34
33
|
labels: {
|
|
35
|
-
accountHolderName:
|
|
36
|
-
routingNumber:
|
|
37
|
-
accountNumber:
|
|
38
|
-
routingNumberPlaceholder:
|
|
39
|
-
accountNumberPlaceholder:
|
|
40
|
-
fieldMarkers:
|
|
34
|
+
accountHolderName: v.accountHolderNameLabel,
|
|
35
|
+
routingNumber: v.routingNumberLabel,
|
|
36
|
+
accountNumber: v.accountNumberLabel,
|
|
37
|
+
routingNumberPlaceholder: v.routingNumberPlaceholder,
|
|
38
|
+
accountNumberPlaceholder: v.accountNumberPlaceholder,
|
|
39
|
+
fieldMarkers: v.fieldMarkers
|
|
41
40
|
}
|
|
42
41
|
}), /* @__PURE__ */ a(e, {
|
|
43
42
|
variant: "body2",
|
|
44
43
|
color: "muted",
|
|
45
|
-
children:
|
|
44
|
+
children: v.helperText
|
|
46
45
|
})]
|
|
47
46
|
});
|
|
48
47
|
}
|
package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index13.js
CHANGED
|
@@ -1,31 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { CONFIRM_DELETE_DIALOG_LABELS_EN as
|
|
3
|
-
import { jsx as
|
|
1
|
+
import { ConfirmDialog as e } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { CONFIRM_DELETE_DIALOG_LABELS_EN as t } from "./index2.js";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
4
|
// ../../libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index13.js
|
|
5
|
-
function
|
|
6
|
-
let
|
|
7
|
-
...
|
|
8
|
-
...
|
|
5
|
+
function r({ open: r, onOpenChange: i, title: a, message: o, confirmLabel: s, isDeleting: c, onConfirm: l, onCancel: u, labels: d }) {
|
|
6
|
+
let f = {
|
|
7
|
+
...t,
|
|
8
|
+
...d
|
|
9
9
|
};
|
|
10
|
-
return /* @__PURE__ */
|
|
11
|
-
open:
|
|
12
|
-
onOpenChange:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
onClick: h,
|
|
24
|
-
disabled: m,
|
|
25
|
-
loading: m,
|
|
26
|
-
children: v.confirmButton
|
|
27
|
-
})] })]
|
|
28
|
-
})
|
|
10
|
+
return /* @__PURE__ */ n(e, {
|
|
11
|
+
open: r,
|
|
12
|
+
onOpenChange: (e) => e ? i(!0) : u(),
|
|
13
|
+
title: a,
|
|
14
|
+
description: o,
|
|
15
|
+
destructive: !0,
|
|
16
|
+
loading: c,
|
|
17
|
+
onConfirm: l,
|
|
18
|
+
labels: {
|
|
19
|
+
confirm: s ?? f.confirmButton,
|
|
20
|
+
cancel: f.cancelButton,
|
|
21
|
+
close: f.close
|
|
22
|
+
}
|
|
29
23
|
});
|
|
30
24
|
}
|
|
31
|
-
export {
|
|
25
|
+
export { r as ConfirmDeleteDialog, r as default };
|
package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index2.js
CHANGED
|
@@ -82,7 +82,7 @@ var n = {
|
|
|
82
82
|
routingNumberLabel: "Routing number",
|
|
83
83
|
accountNumberPlaceholder: i.accountNumberPlaceholder,
|
|
84
84
|
routingNumberPlaceholder: i.routingNumberPlaceholder,
|
|
85
|
-
helperText: "Ask your vendor for this
|
|
85
|
+
helperText: "Ask your vendor for this. It's usually on their invoice or in a payment instructions email.",
|
|
86
86
|
cancelButton: "Cancel",
|
|
87
87
|
saveButton: "Save",
|
|
88
88
|
fieldMarkers: e
|
package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index8.js
CHANGED
|
@@ -20,7 +20,7 @@ function s({ value: s, onChange: c, disabled: l, variant: u = "cards", labels: d
|
|
|
20
20
|
onValueChange: (e) => c(e),
|
|
21
21
|
children: [/* @__PURE__ */ o(e, {
|
|
22
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",
|
|
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:border-border ttw:p-3 ttw:has-[:checked]:border-primary",
|
|
24
24
|
children: [/* @__PURE__ */ a(n, {
|
|
25
25
|
value: "organization",
|
|
26
26
|
id: `${p}-organization`
|
|
@@ -36,7 +36,7 @@ function s({ value: s, onChange: c, disabled: l, variant: u = "cards", labels: d
|
|
|
36
36
|
})]
|
|
37
37
|
}), /* @__PURE__ */ o(e, {
|
|
38
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",
|
|
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:border-border ttw:p-3 ttw:has-[:checked]:border-primary",
|
|
40
40
|
children: [/* @__PURE__ */ a(n, {
|
|
41
41
|
value: "individual",
|
|
42
42
|
id: `${p}-individual`
|
package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index9.js
CHANGED
|
@@ -1,67 +1,34 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { FORM_SHEET_LABELS_EN as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { Alert as e, AlertDescription as t, FormSheet as n } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { FORM_SHEET_LABELS_EN as r } from "./index2.js";
|
|
3
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
4
|
+
import { CircleAlertIcon as o } from "lucide-react";
|
|
5
5
|
// ../../libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index9.js
|
|
6
|
-
function
|
|
7
|
-
let
|
|
8
|
-
...
|
|
9
|
-
...
|
|
10
|
-
}
|
|
11
|
-
return /* @__PURE__ */
|
|
12
|
-
open:
|
|
13
|
-
onOpenChange:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}),
|
|
32
|
-
/* @__PURE__ */ l("form", {
|
|
33
|
-
id: E,
|
|
34
|
-
noValidate: !0,
|
|
35
|
-
onSubmit: (e) => {
|
|
36
|
-
e.preventDefault(), e.stopPropagation(), x();
|
|
37
|
-
},
|
|
38
|
-
children: /* @__PURE__ */ u("div", {
|
|
39
|
-
className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:px-6 ttw:pt-8 ttw:pb-6",
|
|
40
|
-
children: [h && /* @__PURE__ */ l("p", {
|
|
41
|
-
role: "alert",
|
|
42
|
-
className: "ttw:rounded-md ttw:bg-destructive/10 ttw:px-3 ttw:py-2 ttw:text-sm ttw:text-destructive",
|
|
43
|
-
children: h
|
|
44
|
-
}), C]
|
|
45
|
-
})
|
|
46
|
-
}),
|
|
47
|
-
/* @__PURE__ */ u(i, {
|
|
48
|
-
className: "ttw:flex ttw:flex-row ttw:justify-end ttw:gap-2",
|
|
49
|
-
children: [/* @__PURE__ */ l(e, {
|
|
50
|
-
type: "button",
|
|
51
|
-
variant: "ghost",
|
|
52
|
-
size: "lg",
|
|
53
|
-
onClick: S,
|
|
54
|
-
children: b
|
|
55
|
-
}), /* @__PURE__ */ l(e, {
|
|
56
|
-
type: "submit",
|
|
57
|
-
form: E,
|
|
58
|
-
size: "lg",
|
|
59
|
-
disabled: g || _,
|
|
60
|
-
children: y
|
|
61
|
-
})]
|
|
62
|
-
})
|
|
63
|
-
]
|
|
6
|
+
function s({ open: s, onOpenChange: c, title: l, description: u, formError: d, inProgress: f, submitLabel: p, cancelLabel: m, onSubmit: h, onCancel: g, children: _, labels: v }) {
|
|
7
|
+
let y = {
|
|
8
|
+
...r,
|
|
9
|
+
...v
|
|
10
|
+
};
|
|
11
|
+
return /* @__PURE__ */ i(n, {
|
|
12
|
+
open: s,
|
|
13
|
+
onOpenChange: (e) => e ? c(!0) : g(),
|
|
14
|
+
title: l,
|
|
15
|
+
description: u,
|
|
16
|
+
onSubmit: (e) => {
|
|
17
|
+
e.stopPropagation(), h();
|
|
18
|
+
},
|
|
19
|
+
submitting: f,
|
|
20
|
+
labels: {
|
|
21
|
+
submit: p,
|
|
22
|
+
cancel: m,
|
|
23
|
+
close: y.close
|
|
24
|
+
},
|
|
25
|
+
children: /* @__PURE__ */ a("div", {
|
|
26
|
+
className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:py-4",
|
|
27
|
+
children: [d && /* @__PURE__ */ a(e, {
|
|
28
|
+
variant: "destructive",
|
|
29
|
+
children: [/* @__PURE__ */ i(o, {}), /* @__PURE__ */ i(t, { children: d })]
|
|
30
|
+
}), _]
|
|
64
31
|
})
|
|
65
32
|
});
|
|
66
33
|
}
|
|
67
|
-
export {
|
|
34
|
+
export { s as FormSheet, s as default };
|
package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
|
|
2
|
-
var e = "@tesouro/embedded-components-react", t = "0.11.
|
|
2
|
+
var e = "@tesouro/embedded-components-react", t = "0.11.66", n = "b829d4ea8d64cc62ff415f41fe095a106ccea514", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|
package/package.json
CHANGED
|
@@ -1,211 +0,0 @@
|
|
|
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";
|
|
6
|
-
// ../../libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index6.js
|
|
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
|
|
17
|
-
};
|
|
18
|
-
return /* @__PURE__ */ v("form", {
|
|
19
|
-
className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:rounded-[10px] ttw:border ttw:border-border ttw:bg-muted ttw:p-4",
|
|
20
|
-
noValidate: !0,
|
|
21
|
-
onSubmit: (e) => {
|
|
22
|
-
e.preventDefault(), b.onSubmit();
|
|
23
|
-
},
|
|
24
|
-
children: [/* @__PURE__ */ v("div", {
|
|
25
|
-
className: "ttw:flex ttw:flex-col ttw:gap-4",
|
|
26
|
-
children: [
|
|
27
|
-
/* @__PURE__ */ _("div", {
|
|
28
|
-
className: "ttw:flex ttw:flex-col ttw:gap-1.5 ttw:border-b ttw:border-border ttw:pt-6 ttw:pb-7",
|
|
29
|
-
children: /* @__PURE__ */ _(f, {
|
|
30
|
-
variant: "body1",
|
|
31
|
-
className: "ttw:font-medium",
|
|
32
|
-
children: b.heading
|
|
33
|
-
})
|
|
34
|
-
}),
|
|
35
|
-
/* @__PURE__ */ _(u, { labels: m(A, b.requiredFieldsLegend) }),
|
|
36
|
-
b.formError && /* @__PURE__ */ _(f, {
|
|
37
|
-
variant: "body2",
|
|
38
|
-
color: "destructive",
|
|
39
|
-
role: "alert",
|
|
40
|
-
children: b.formError
|
|
41
|
-
}),
|
|
42
|
-
S.kind === "person" ? /* @__PURE__ */ v("div", {
|
|
43
|
-
className: "ttw:flex ttw:gap-4",
|
|
44
|
-
children: [/* @__PURE__ */ _(n, { children: /* @__PURE__ */ v(r, { children: [
|
|
45
|
-
/* @__PURE__ */ _(o, {
|
|
46
|
-
htmlFor: "counterpart-edit-first-name",
|
|
47
|
-
requirement: "required",
|
|
48
|
-
labels: A,
|
|
49
|
-
children: k.firstNameLabel
|
|
50
|
-
}),
|
|
51
|
-
/* @__PURE__ */ _(s, {
|
|
52
|
-
id: "counterpart-edit-first-name",
|
|
53
|
-
"aria-required": !0,
|
|
54
|
-
className: "ttw:bg-background",
|
|
55
|
-
value: S.firstName.value,
|
|
56
|
-
disabled: O,
|
|
57
|
-
"aria-invalid": !!S.firstName.error || void 0,
|
|
58
|
-
onChange: (e) => b.onFieldChange("firstName", e.target.value)
|
|
59
|
-
}),
|
|
60
|
-
/* @__PURE__ */ _(a, { errors: y(S.firstName.error) })
|
|
61
|
-
] }) }), /* @__PURE__ */ _(n, { children: /* @__PURE__ */ v(r, { children: [
|
|
62
|
-
/* @__PURE__ */ _(o, {
|
|
63
|
-
htmlFor: "counterpart-edit-last-name",
|
|
64
|
-
requirement: "required",
|
|
65
|
-
labels: A,
|
|
66
|
-
children: k.lastNameLabel
|
|
67
|
-
}),
|
|
68
|
-
/* @__PURE__ */ _(s, {
|
|
69
|
-
id: "counterpart-edit-last-name",
|
|
70
|
-
"aria-required": !0,
|
|
71
|
-
className: "ttw:bg-background",
|
|
72
|
-
value: S.lastName.value,
|
|
73
|
-
disabled: O,
|
|
74
|
-
"aria-invalid": !!S.lastName.error || void 0,
|
|
75
|
-
onChange: (e) => b.onFieldChange("lastName", e.target.value)
|
|
76
|
-
}),
|
|
77
|
-
/* @__PURE__ */ _(a, { errors: y(S.lastName.error) })
|
|
78
|
-
] }) })]
|
|
79
|
-
}) : /* @__PURE__ */ _(n, { children: /* @__PURE__ */ v(r, { children: [
|
|
80
|
-
/* @__PURE__ */ _(o, {
|
|
81
|
-
htmlFor: "counterpart-edit-business-name",
|
|
82
|
-
requirement: "required",
|
|
83
|
-
labels: A,
|
|
84
|
-
children: k.businessNameLabel
|
|
85
|
-
}),
|
|
86
|
-
/* @__PURE__ */ _(s, {
|
|
87
|
-
id: "counterpart-edit-business-name",
|
|
88
|
-
"aria-required": !0,
|
|
89
|
-
className: "ttw:bg-background",
|
|
90
|
-
value: S.businessName.value,
|
|
91
|
-
disabled: O,
|
|
92
|
-
"aria-invalid": !!S.businessName.error || void 0,
|
|
93
|
-
onChange: (e) => b.onFieldChange("businessName", e.target.value)
|
|
94
|
-
}),
|
|
95
|
-
/* @__PURE__ */ _(a, { errors: y(S.businessName.error) })
|
|
96
|
-
] }) }),
|
|
97
|
-
/* @__PURE__ */ v("div", {
|
|
98
|
-
className: p("ttw:flex ttw:gap-4", b.contactLayout === "inline" ? "ttw:flex-row" : "ttw:flex-col"),
|
|
99
|
-
children: [
|
|
100
|
-
/* @__PURE__ */ _(n, { children: /* @__PURE__ */ v(r, { children: [
|
|
101
|
-
/* @__PURE__ */ _(o, {
|
|
102
|
-
htmlFor: "counterpart-edit-email",
|
|
103
|
-
requirement: "required",
|
|
104
|
-
labels: A,
|
|
105
|
-
children: k.rowEmail
|
|
106
|
-
}),
|
|
107
|
-
/* @__PURE__ */ _(s, {
|
|
108
|
-
id: "counterpart-edit-email",
|
|
109
|
-
"aria-required": !0,
|
|
110
|
-
type: "email",
|
|
111
|
-
className: "ttw:bg-background",
|
|
112
|
-
value: C.value,
|
|
113
|
-
disabled: O,
|
|
114
|
-
"aria-invalid": !!C.error || void 0,
|
|
115
|
-
onChange: (e) => b.onFieldChange("email", e.target.value)
|
|
116
|
-
}),
|
|
117
|
-
/* @__PURE__ */ _(a, { errors: y(C.error) })
|
|
118
|
-
] }) }),
|
|
119
|
-
E && /* @__PURE__ */ v(l, {
|
|
120
|
-
htmlFor: "counterpart-edit-reminders",
|
|
121
|
-
className: "ttw:flex ttw:items-start ttw:gap-3 ttw:rounded-md ttw:border ttw:border-border ttw:bg-background ttw:p-3",
|
|
122
|
-
children: [/* @__PURE__ */ _(t, {
|
|
123
|
-
id: "counterpart-edit-reminders",
|
|
124
|
-
checked: E.checked,
|
|
125
|
-
disabled: O,
|
|
126
|
-
onCheckedChange: (e) => b.onRemindersChange(e === !0)
|
|
127
|
-
}), /* @__PURE__ */ v("span", {
|
|
128
|
-
className: "ttw:flex ttw:flex-col ttw:gap-0.5",
|
|
129
|
-
children: [/* @__PURE__ */ _("span", {
|
|
130
|
-
className: "ttw:text-sm ttw:font-medium",
|
|
131
|
-
children: k.remindersCheckboxLabel
|
|
132
|
-
}), /* @__PURE__ */ _("span", {
|
|
133
|
-
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
134
|
-
children: k.remindersCheckboxDescription
|
|
135
|
-
})]
|
|
136
|
-
})]
|
|
137
|
-
}),
|
|
138
|
-
/* @__PURE__ */ _(n, { children: /* @__PURE__ */ v(r, { children: [
|
|
139
|
-
/* @__PURE__ */ _(o, {
|
|
140
|
-
htmlFor: "counterpart-edit-phone",
|
|
141
|
-
requirement: "optional",
|
|
142
|
-
labels: A,
|
|
143
|
-
children: k.rowPhone
|
|
144
|
-
}),
|
|
145
|
-
/* @__PURE__ */ _(s, {
|
|
146
|
-
id: "counterpart-edit-phone",
|
|
147
|
-
type: "tel",
|
|
148
|
-
className: "ttw:bg-background",
|
|
149
|
-
value: w.value,
|
|
150
|
-
disabled: O,
|
|
151
|
-
"aria-invalid": !!w.error || void 0,
|
|
152
|
-
onChange: (e) => b.onFieldChange("phone", e.target.value)
|
|
153
|
-
}),
|
|
154
|
-
/* @__PURE__ */ _(a, { errors: y(w.error) })
|
|
155
|
-
] }) })
|
|
156
|
-
]
|
|
157
|
-
}),
|
|
158
|
-
/* @__PURE__ */ _(n, { children: /* @__PURE__ */ v(r, { children: [
|
|
159
|
-
/* @__PURE__ */ _(o, {
|
|
160
|
-
htmlFor: "counterpart-edit-tax-id",
|
|
161
|
-
requirement: "optional",
|
|
162
|
-
labels: A,
|
|
163
|
-
children: T.label
|
|
164
|
-
}),
|
|
165
|
-
/* @__PURE__ */ _(s, {
|
|
166
|
-
id: "counterpart-edit-tax-id",
|
|
167
|
-
className: "ttw:bg-background",
|
|
168
|
-
placeholder: T.placeholder,
|
|
169
|
-
value: T.value,
|
|
170
|
-
disabled: O,
|
|
171
|
-
"aria-invalid": !!T.error || void 0,
|
|
172
|
-
onChange: (e) => b.onFieldChange("taxId", e.target.value)
|
|
173
|
-
}),
|
|
174
|
-
/* @__PURE__ */ _(i, { children: T.description }),
|
|
175
|
-
/* @__PURE__ */ _(a, { errors: y(T.error) })
|
|
176
|
-
] }) }),
|
|
177
|
-
D && /* @__PURE__ */ _("div", {
|
|
178
|
-
className: "ttw:flex ttw:flex-col ttw:gap-4",
|
|
179
|
-
children: /* @__PURE__ */ _(h, {
|
|
180
|
-
idPrefix: "counterpart-edit-address",
|
|
181
|
-
values: D.values,
|
|
182
|
-
errors: D.errors,
|
|
183
|
-
stateOptions: b.stateOptions,
|
|
184
|
-
disabled: O,
|
|
185
|
-
onChange: b.onAddressChange,
|
|
186
|
-
labels: g(k, {
|
|
187
|
-
...A,
|
|
188
|
-
...b.addressFieldMarkers
|
|
189
|
-
})
|
|
190
|
-
})
|
|
191
|
-
})
|
|
192
|
-
]
|
|
193
|
-
}), /* @__PURE__ */ v("div", {
|
|
194
|
-
className: "ttw:flex ttw:justify-end ttw:gap-4 ttw:pt-6",
|
|
195
|
-
children: [/* @__PURE__ */ _(e, {
|
|
196
|
-
type: "button",
|
|
197
|
-
variant: "outline",
|
|
198
|
-
className: "ttw:w-fit ttw:border-border",
|
|
199
|
-
disabled: O,
|
|
200
|
-
onClick: b.onCancel,
|
|
201
|
-
children: k.cancelButton
|
|
202
|
-
}), /* @__PURE__ */ v(e, {
|
|
203
|
-
type: "submit",
|
|
204
|
-
className: "ttw:w-fit",
|
|
205
|
-
disabled: O || b.submitDisabled,
|
|
206
|
-
children: [O && /* @__PURE__ */ _(d, {}), k.saveButton]
|
|
207
|
-
})]
|
|
208
|
-
})]
|
|
209
|
-
});
|
|
210
|
-
}
|
|
211
|
-
export { b as CounterpartEditForm };
|