@tesouro/embedded-components-react 0.7.46 → 0.7.47
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/index.d.ts +4 -0
- package/dist/lib/CounterpartsWidget.d.ts +4 -0
- package/dist/lib/CounterpartsWidgetPublic.d.ts +4 -0
- package/dist/lib/CustomersWidget.d.ts +2 -0
- package/dist/lib/ReceivablesWidget.d.ts +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index31.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index32.js +40 -42
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index33.js +1 -3
- 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/index3.js +44 -44
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js +13 -13
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/labels.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartForm.js +85 -84
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index10.js +238 -241
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index11.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index2.js +6 -5
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index5.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -4340,6 +4340,8 @@ interface AchFieldGroupLabels {
|
|
|
4340
4340
|
accountHolderName: string;
|
|
4341
4341
|
routingNumber: string;
|
|
4342
4342
|
accountNumber: string;
|
|
4343
|
+
routingNumberPlaceholder: string;
|
|
4344
|
+
accountNumberPlaceholder: string;
|
|
4343
4345
|
/** The asterisk copy this group's labels carry. */
|
|
4344
4346
|
fieldMarkers: LabelLabels;
|
|
4345
4347
|
}
|
|
@@ -4414,6 +4416,8 @@ interface BankAccountFormSheetLabels {
|
|
|
4414
4416
|
accountHolderNameLabel: string;
|
|
4415
4417
|
accountNumberLabel: string;
|
|
4416
4418
|
routingNumberLabel: string;
|
|
4419
|
+
accountNumberPlaceholder: string;
|
|
4420
|
+
routingNumberPlaceholder: string;
|
|
4417
4421
|
helperText: string;
|
|
4418
4422
|
cancelButton: string;
|
|
4419
4423
|
saveButton: string;
|
|
@@ -674,6 +674,8 @@ interface AchFieldGroupLabels {
|
|
|
674
674
|
accountHolderName: string;
|
|
675
675
|
routingNumber: string;
|
|
676
676
|
accountNumber: string;
|
|
677
|
+
routingNumberPlaceholder: string;
|
|
678
|
+
accountNumberPlaceholder: string;
|
|
677
679
|
/** The asterisk copy this group's labels carry. */
|
|
678
680
|
fieldMarkers: LabelLabels;
|
|
679
681
|
}
|
|
@@ -748,6 +750,8 @@ interface BankAccountFormSheetLabels {
|
|
|
748
750
|
accountHolderNameLabel: string;
|
|
749
751
|
accountNumberLabel: string;
|
|
750
752
|
routingNumberLabel: string;
|
|
753
|
+
accountNumberPlaceholder: string;
|
|
754
|
+
routingNumberPlaceholder: string;
|
|
751
755
|
helperText: string;
|
|
752
756
|
cancelButton: string;
|
|
753
757
|
saveButton: string;
|
|
@@ -674,6 +674,8 @@ interface AchFieldGroupLabels {
|
|
|
674
674
|
accountHolderName: string;
|
|
675
675
|
routingNumber: string;
|
|
676
676
|
accountNumber: string;
|
|
677
|
+
routingNumberPlaceholder: string;
|
|
678
|
+
accountNumberPlaceholder: string;
|
|
677
679
|
/** The asterisk copy this group's labels carry. */
|
|
678
680
|
fieldMarkers: LabelLabels;
|
|
679
681
|
}
|
|
@@ -748,6 +750,8 @@ interface BankAccountFormSheetLabels {
|
|
|
748
750
|
accountHolderNameLabel: string;
|
|
749
751
|
accountNumberLabel: string;
|
|
750
752
|
routingNumberLabel: string;
|
|
753
|
+
accountNumberPlaceholder: string;
|
|
754
|
+
routingNumberPlaceholder: string;
|
|
751
755
|
helperText: string;
|
|
752
756
|
cancelButton: string;
|
|
753
757
|
saveButton: string;
|
|
@@ -675,6 +675,8 @@ interface AchFieldGroupLabels {
|
|
|
675
675
|
accountHolderName: string;
|
|
676
676
|
routingNumber: string;
|
|
677
677
|
accountNumber: string;
|
|
678
|
+
routingNumberPlaceholder: string;
|
|
679
|
+
accountNumberPlaceholder: string;
|
|
678
680
|
/** The asterisk copy this group's labels carry. */
|
|
679
681
|
fieldMarkers: LabelLabels;
|
|
680
682
|
}
|
|
@@ -763,6 +763,8 @@ interface AchFieldGroupLabels {
|
|
|
763
763
|
accountHolderName: string;
|
|
764
764
|
routingNumber: string;
|
|
765
765
|
accountNumber: string;
|
|
766
|
+
routingNumberPlaceholder: string;
|
|
767
|
+
accountNumberPlaceholder: string;
|
|
766
768
|
/** The asterisk copy this group's labels carry. */
|
|
767
769
|
fieldMarkers: LabelLabels;
|
|
768
770
|
}
|
|
@@ -46,7 +46,7 @@ function c(e) {
|
|
|
46
46
|
routingNumber: i(e?.bank_account?.routing_number),
|
|
47
47
|
accountNumber: i(e?.bank_account?.account_number)
|
|
48
48
|
}
|
|
49
|
-
},
|
|
49
|
+
}, void 0, "vendor"));
|
|
50
50
|
}
|
|
51
51
|
function l(e, t, n) {
|
|
52
52
|
let r = (e) => i(e) || void 0, { address: a } = e;
|
|
@@ -14,50 +14,50 @@ import "../../../../shared/counterpart-management/feature/dist/index.js";
|
|
|
14
14
|
import { useMemo as c } from "react";
|
|
15
15
|
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
16
16
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index32.js
|
|
17
|
-
function d({ mode: d, values: f, errors: p, onChange: m, onAddressChange: h,
|
|
18
|
-
let
|
|
17
|
+
function d({ mode: d, values: f, errors: p, onChange: m, onAddressChange: h, onCancel: g, onSave: _, isSaving: v = !1, search: y, paymentInstructions: b, labels: x }) {
|
|
18
|
+
let S = c(() => s(x), [x]), C = c(() => t(), []), w = a(p ?? {}), T = i({
|
|
19
19
|
...p,
|
|
20
20
|
form: void 0,
|
|
21
21
|
bankAccount: void 0
|
|
22
|
-
}) + i(
|
|
23
|
-
...
|
|
24
|
-
onAddVendor:
|
|
25
|
-
selectedLabel:
|
|
26
|
-
badge:
|
|
27
|
-
helperText:
|
|
28
|
-
resultsHeading:
|
|
29
|
-
addVendorDescription:
|
|
22
|
+
}) + i(b?.errors), E = y?.query.trim() ?? "", D = f.entityType === "individual" ? `${f.firstName} ${f.lastName}`.trim() : f.legalName, O = y && d === "create" ? /* @__PURE__ */ l(o, {
|
|
23
|
+
...y,
|
|
24
|
+
onAddVendor: E && E !== D.trim() ? y.onAddVendor : void 0,
|
|
25
|
+
selectedLabel: D,
|
|
26
|
+
badge: S.newVendorBadge,
|
|
27
|
+
helperText: S.unmatchedVendorHelper,
|
|
28
|
+
resultsHeading: S.resultsHeading,
|
|
29
|
+
addVendorDescription: S.addAsNewVendorDescription,
|
|
30
30
|
labels: {
|
|
31
|
-
fieldLabel:
|
|
32
|
-
addVendorAction:
|
|
31
|
+
fieldLabel: S.vendorFieldLabel,
|
|
32
|
+
addVendorAction: S.addAsNewVendor(E)
|
|
33
33
|
}
|
|
34
34
|
}) : null;
|
|
35
35
|
return /* @__PURE__ */ u("div", {
|
|
36
|
-
ref:
|
|
36
|
+
ref: w,
|
|
37
37
|
className: "ttw:flex ttw:flex-col ttw:gap-4",
|
|
38
|
-
children: [
|
|
38
|
+
children: [O, /* @__PURE__ */ u("div", {
|
|
39
39
|
className: "ttw:flex ttw:flex-col ttw:gap-6 ttw:rounded-lg ttw:border ttw:border-primary ttw:bg-surface-subtle ttw:p-6 ttw:[&_[data-slot=input]]:bg-background ttw:[&_[data-slot=select-trigger]]:bg-background",
|
|
40
40
|
children: [
|
|
41
41
|
/* @__PURE__ */ u("div", {
|
|
42
42
|
className: "ttw:flex ttw:items-baseline ttw:justify-between ttw:gap-2",
|
|
43
43
|
children: [/* @__PURE__ */ l("p", {
|
|
44
44
|
className: "ttw:text-base ttw:font-semibold ttw:text-foreground",
|
|
45
|
-
children: d === "edit" ?
|
|
46
|
-
}),
|
|
45
|
+
children: d === "edit" ? S.editTitle : S.createTitle
|
|
46
|
+
}), T > 0 ? /* @__PURE__ */ l("p", {
|
|
47
47
|
className: "ttw:text-sm ttw:text-destructive",
|
|
48
|
-
children:
|
|
48
|
+
children: S.fieldsNeedAttention(T)
|
|
49
49
|
}) : null]
|
|
50
50
|
}),
|
|
51
|
-
|
|
52
|
-
...
|
|
53
|
-
labels: { fieldLabel:
|
|
51
|
+
y && d === "edit" ? /* @__PURE__ */ l(o, {
|
|
52
|
+
...y,
|
|
53
|
+
labels: { fieldLabel: S.switchVendorFieldLabel }
|
|
54
54
|
}) : null,
|
|
55
55
|
/* @__PURE__ */ l(r, {
|
|
56
56
|
mode: d,
|
|
57
57
|
counterpartMode: "vendor",
|
|
58
58
|
values: f,
|
|
59
59
|
errors: p,
|
|
60
|
-
stateOptions:
|
|
60
|
+
stateOptions: C,
|
|
61
61
|
onChange: m,
|
|
62
62
|
onAddressChange: h,
|
|
63
63
|
sections: {
|
|
@@ -66,30 +66,28 @@ function d({ mode: d, values: f, errors: p, onChange: m, onAddressChange: h, sec
|
|
|
66
66
|
addressHeading: !1,
|
|
67
67
|
title: !1,
|
|
68
68
|
taxId: !1,
|
|
69
|
-
address:
|
|
69
|
+
address: !0,
|
|
70
70
|
bankAccount: !1
|
|
71
71
|
},
|
|
72
|
-
|
|
73
|
-
onAddressExpand: _,
|
|
74
|
-
labels: { businessNameLabel: w.nameLabel }
|
|
72
|
+
labels: { businessNameLabel: S.nameLabel }
|
|
75
73
|
}),
|
|
76
|
-
|
|
74
|
+
b ? /* @__PURE__ */ u("div", {
|
|
77
75
|
className: "ttw:flex ttw:flex-col ttw:gap-3",
|
|
78
76
|
children: [/* @__PURE__ */ u("div", {
|
|
79
77
|
className: "ttw:flex ttw:flex-col ttw:gap-1",
|
|
80
78
|
children: [/* @__PURE__ */ l("p", {
|
|
81
79
|
className: "ttw:text-sm ttw:font-semibold ttw:text-foreground",
|
|
82
|
-
children:
|
|
80
|
+
children: S.paymentInstructionsHeading
|
|
83
81
|
}), /* @__PURE__ */ l("p", {
|
|
84
82
|
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
85
|
-
children:
|
|
83
|
+
children: b.isExtracted ? S.paymentInstructionsExtracted : S.paymentInstructionsDescription
|
|
86
84
|
})]
|
|
87
85
|
}), /* @__PURE__ */ l(n, {
|
|
88
86
|
idPrefix: "vendor-inline-ach",
|
|
89
|
-
values:
|
|
90
|
-
errors:
|
|
91
|
-
onChange:
|
|
92
|
-
labels:
|
|
87
|
+
values: b.values,
|
|
88
|
+
errors: b.errors,
|
|
89
|
+
onChange: b.onChange,
|
|
90
|
+
labels: S.ach
|
|
93
91
|
})]
|
|
94
92
|
}) : null,
|
|
95
93
|
/* @__PURE__ */ u("div", {
|
|
@@ -97,17 +95,17 @@ function d({ mode: d, values: f, errors: p, onChange: m, onAddressChange: h, sec
|
|
|
97
95
|
children: [/* @__PURE__ */ l(e, {
|
|
98
96
|
type: "button",
|
|
99
97
|
variant: "outline",
|
|
100
|
-
onClick:
|
|
101
|
-
"aria-label":
|
|
102
|
-
disabled:
|
|
103
|
-
children:
|
|
104
|
-
}),
|
|
98
|
+
onClick: g,
|
|
99
|
+
"aria-label": S.cancelAriaLabel,
|
|
100
|
+
disabled: v,
|
|
101
|
+
children: S.cancel
|
|
102
|
+
}), _ ? /* @__PURE__ */ l(e, {
|
|
105
103
|
type: "button",
|
|
106
|
-
onClick:
|
|
107
|
-
"aria-label":
|
|
108
|
-
loading:
|
|
109
|
-
disabled:
|
|
110
|
-
children:
|
|
104
|
+
onClick: _,
|
|
105
|
+
"aria-label": S.saveAriaLabel,
|
|
106
|
+
loading: v,
|
|
107
|
+
disabled: v,
|
|
108
|
+
children: S.save
|
|
111
109
|
}) : null]
|
|
112
110
|
})
|
|
113
111
|
]
|
|
@@ -227,7 +227,7 @@ function g({ payableId: s, counterpartId: c, payableCounterpartId: g, payableCou
|
|
|
227
227
|
let e = j.current, t = le({
|
|
228
228
|
...dt,
|
|
229
229
|
bankAccount: e
|
|
230
|
-
},
|
|
230
|
+
}, C, "vendor");
|
|
231
231
|
if (oe(t)) return He || !h(e, B ?? m) ? {
|
|
232
232
|
ok: !0,
|
|
233
233
|
counterpartRawData: _e(dt, e, _)
|
|
@@ -421,8 +421,6 @@ function g({ payableId: s, counterpartId: c, payableCounterpartId: g, payableCou
|
|
|
421
421
|
errors: U.errors,
|
|
422
422
|
onChange: At,
|
|
423
423
|
onAddressChange: jt,
|
|
424
|
-
sectionsToExpand: U.sectionsToExpand,
|
|
425
|
-
onAddressExpand: U.expandAddress,
|
|
426
424
|
onCancel: Tt,
|
|
427
425
|
onSave: Dt,
|
|
428
426
|
isSaving: Ft,
|
|
@@ -67,7 +67,7 @@ var i = {
|
|
|
67
67
|
recentCustomerDocumentsDescription: "Latest activity",
|
|
68
68
|
recentVendorDocumentsDescription: "Sorted by issue date",
|
|
69
69
|
viewAllDocumentsAction: "View all",
|
|
70
|
-
subtitleTemplate: "{type}
|
|
70
|
+
subtitleTemplate: "{type} · Added {date}",
|
|
71
71
|
customerSubtitleLabel: "Customer",
|
|
72
72
|
vendorSubtitleLabel: "Vendor",
|
|
73
73
|
entityTypePersonLabel: "Person",
|
|
@@ -4,15 +4,15 @@ import { ErrorState as f } from "../../../shared/ui/dist/lib/ErrorState/ErrorSta
|
|
|
4
4
|
import "../../../shared/ui/dist/index.js";
|
|
5
5
|
import { COUNTERPARTS_SCREEN_LABELS_EN as p } from "./index2.js";
|
|
6
6
|
import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
7
|
-
import { ArrowDownIcon as _, ArrowUpDownIcon as v, ArrowUpIcon as y, ListFilter as b
|
|
7
|
+
import { ArrowDownIcon as _, ArrowUpDownIcon as v, ArrowUpIcon as y, ListFilter as b } from "lucide-react";
|
|
8
8
|
//#region ../../libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index3.js
|
|
9
|
-
var
|
|
9
|
+
var x = [
|
|
10
10
|
10,
|
|
11
11
|
25,
|
|
12
12
|
50,
|
|
13
13
|
100
|
|
14
14
|
];
|
|
15
|
-
function
|
|
15
|
+
function S({ labels: e, filters: t, disabled: u }) {
|
|
16
16
|
return /* @__PURE__ */ h(n, {
|
|
17
17
|
className: "ttw:flex-wrap ttw:px-4",
|
|
18
18
|
searchSlot: /* @__PURE__ */ h(l, {
|
|
@@ -72,7 +72,7 @@ function C({ labels: e, filters: t, disabled: u }) {
|
|
|
72
72
|
})] })
|
|
73
73
|
});
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function C({ value: e, isLoading: t, colorClass: n }) {
|
|
76
76
|
return /* @__PURE__ */ h("div", {
|
|
77
77
|
className: "ttw:flex ttw:justify-end",
|
|
78
78
|
children: t ? /* @__PURE__ */ h(u, { className: "ttw:h-4 ttw:w-20" }) : /* @__PURE__ */ h("span", {
|
|
@@ -81,11 +81,11 @@ function w({ value: e, isLoading: t, colorClass: n }) {
|
|
|
81
81
|
})
|
|
82
82
|
});
|
|
83
83
|
}
|
|
84
|
-
function
|
|
85
|
-
let
|
|
84
|
+
function w({ mode: n, counterparts: r, isLoading: i, isError: a, errorTitle: o, errorDescription: s, sorting: c, onSortingChange: l, pageSize: u, onPageSizeChange: m, pageSizeOptions: b = x, hasNextPage: w, hasPrevPage: T, onNextPage: E, onPrevPage: D, filters: O, isFiltering: k, canCreate: A = !0, isAccessRestricted: j, onCreateClick: M, onRowClick: N, onRetry: P, labels: F, emptyStateTestId: I, accessRestrictedTestId: L }) {
|
|
85
|
+
let R = {
|
|
86
86
|
...p,
|
|
87
|
-
...
|
|
88
|
-
},
|
|
87
|
+
...F
|
|
88
|
+
}, z = n === "customer", B = z ? R.columnReceivedAmount : R.columnTotalPaidToDate, V = z ? R.columnAmountDue : R.columnBalanceDue, H = [
|
|
89
89
|
{
|
|
90
90
|
accessorKey: "name",
|
|
91
91
|
enableSorting: !0,
|
|
@@ -93,10 +93,10 @@ function T({ mode: n, counterparts: r, isLoading: i, isError: a, errorTitle: o,
|
|
|
93
93
|
let n = t.getIsSorted();
|
|
94
94
|
return /* @__PURE__ */ g("div", {
|
|
95
95
|
className: "ttw:flex ttw:items-center ttw:gap-2 ttw:text-inherit",
|
|
96
|
-
children: [
|
|
96
|
+
children: [R.columnName, /* @__PURE__ */ h(e, {
|
|
97
97
|
variant: "ghost",
|
|
98
98
|
size: "icon-sm",
|
|
99
|
-
"aria-label":
|
|
99
|
+
"aria-label": R.sortByName,
|
|
100
100
|
onClick: () => t.toggleSorting(n === "asc"),
|
|
101
101
|
children: h(n === "asc" ? y : n === "desc" ? _ : v, { className: "ttw:size-4" })
|
|
102
102
|
})]
|
|
@@ -117,9 +117,9 @@ function T({ mode: n, counterparts: r, isLoading: i, isError: a, errorTitle: o,
|
|
|
117
117
|
accessorKey: "billedAmountLabel",
|
|
118
118
|
header: () => /* @__PURE__ */ h("div", {
|
|
119
119
|
className: "ttw:text-right",
|
|
120
|
-
children:
|
|
120
|
+
children: R.columnBilledAmount
|
|
121
121
|
}),
|
|
122
|
-
cell: ({ row: e }) => /* @__PURE__ */ h(
|
|
122
|
+
cell: ({ row: e }) => /* @__PURE__ */ h(C, {
|
|
123
123
|
value: e.original.billedAmountLabel,
|
|
124
124
|
isLoading: e.original.isBilledAmountLoading
|
|
125
125
|
})
|
|
@@ -128,9 +128,9 @@ function T({ mode: n, counterparts: r, isLoading: i, isError: a, errorTitle: o,
|
|
|
128
128
|
accessorKey: "receivedOrPaidAmountLabel",
|
|
129
129
|
header: () => /* @__PURE__ */ h("div", {
|
|
130
130
|
className: "ttw:text-right",
|
|
131
|
-
children:
|
|
131
|
+
children: B
|
|
132
132
|
}),
|
|
133
|
-
cell: ({ row: e }) => /* @__PURE__ */ h(
|
|
133
|
+
cell: ({ row: e }) => /* @__PURE__ */ h(C, {
|
|
134
134
|
value: e.original.receivedOrPaidAmountLabel,
|
|
135
135
|
isLoading: e.original.isReceivedOrPaidAmountLoading,
|
|
136
136
|
colorClass: e.original.isReceivedOrPaidPositive ? "ttw:text-green-700" : void 0
|
|
@@ -140,33 +140,33 @@ function T({ mode: n, counterparts: r, isLoading: i, isError: a, errorTitle: o,
|
|
|
140
140
|
accessorKey: "dueOrOwedAmountLabel",
|
|
141
141
|
header: () => /* @__PURE__ */ h("div", {
|
|
142
142
|
className: "ttw:text-right",
|
|
143
|
-
children:
|
|
143
|
+
children: V
|
|
144
144
|
}),
|
|
145
|
-
cell: ({ row: e }) => /* @__PURE__ */ h(
|
|
145
|
+
cell: ({ row: e }) => /* @__PURE__ */ h(C, {
|
|
146
146
|
value: e.original.dueOrOwedAmountLabel,
|
|
147
147
|
isLoading: e.original.isDueOrOwedAmountLoading
|
|
148
148
|
})
|
|
149
149
|
}
|
|
150
|
-
],
|
|
150
|
+
], U = z ? R.customersEmptyTitle : R.vendorsEmptyTitle, W = z ? R.customersEmptyDescription : R.vendorsEmptyDescription, G = z ? R.customersEmptyAction : R.vendorsEmptyAction, K = z ? R.customersFilterEmptyTitle : R.vendorsFilterEmptyTitle, q = !k && !O.searchValue && !r.length && !i, J = !(!A || j), Y = !(k || !J), X = !k && !i && !a && !r.length, Z = J && !X, Q = z ? R.createButton : R.vendorsCreateButton;
|
|
151
151
|
return /* @__PURE__ */ g("div", {
|
|
152
152
|
className: "ttw:flex ttw:flex-col ttw:gap-4",
|
|
153
|
-
children: [
|
|
153
|
+
children: [Z && /* @__PURE__ */ h("div", {
|
|
154
154
|
className: "ttw:flex ttw:items-center ttw:justify-end ttw:gap-2",
|
|
155
|
-
children: /* @__PURE__ */
|
|
156
|
-
onClick:
|
|
157
|
-
children:
|
|
155
|
+
children: /* @__PURE__ */ h(e, {
|
|
156
|
+
onClick: M,
|
|
157
|
+
children: Q
|
|
158
158
|
})
|
|
159
|
-
}),
|
|
160
|
-
testId:
|
|
161
|
-
title:
|
|
162
|
-
description:
|
|
159
|
+
}), j ? /* @__PURE__ */ h(f, {
|
|
160
|
+
testId: L,
|
|
161
|
+
title: R.accessRestrictedTitle,
|
|
162
|
+
description: R.accessRestrictedDescription
|
|
163
163
|
}) : a ? /* @__PURE__ */ h(f, {
|
|
164
164
|
title: o,
|
|
165
165
|
description: s,
|
|
166
|
-
retryLabel:
|
|
167
|
-
onRetry:
|
|
166
|
+
retryLabel: P ? R.errorRetry : void 0,
|
|
167
|
+
onRetry: P
|
|
168
168
|
}) : /* @__PURE__ */ h(t, {
|
|
169
|
-
columns:
|
|
169
|
+
columns: H,
|
|
170
170
|
data: r,
|
|
171
171
|
isLoading: i,
|
|
172
172
|
sorting: c,
|
|
@@ -174,26 +174,26 @@ function T({ mode: n, counterparts: r, isLoading: i, isError: a, errorTitle: o,
|
|
|
174
174
|
pageSize: u,
|
|
175
175
|
onPageSizeChange: m,
|
|
176
176
|
pageSizeOptions: b,
|
|
177
|
-
hasNextPage:
|
|
178
|
-
hasPrevPage:
|
|
179
|
-
onNextPage:
|
|
180
|
-
onPrevPage:
|
|
181
|
-
onRowClick:
|
|
182
|
-
rowAriaLabel: (e) =>
|
|
183
|
-
filterComponent: /* @__PURE__ */ h(
|
|
184
|
-
labels:
|
|
185
|
-
filters:
|
|
186
|
-
disabled:
|
|
177
|
+
hasNextPage: w,
|
|
178
|
+
hasPrevPage: T,
|
|
179
|
+
onNextPage: E,
|
|
180
|
+
onPrevPage: D,
|
|
181
|
+
onRowClick: N,
|
|
182
|
+
rowAriaLabel: (e) => R.openRow(e.name),
|
|
183
|
+
filterComponent: /* @__PURE__ */ h(S, {
|
|
184
|
+
labels: R,
|
|
185
|
+
filters: O,
|
|
186
|
+
disabled: q
|
|
187
187
|
}),
|
|
188
188
|
children: /* @__PURE__ */ h(d, {
|
|
189
|
-
testId:
|
|
190
|
-
title:
|
|
191
|
-
description:
|
|
192
|
-
actionLabel:
|
|
193
|
-
onAction:
|
|
189
|
+
testId: I,
|
|
190
|
+
title: k ? K : U,
|
|
191
|
+
description: k ? R.filterEmptyDescription : W,
|
|
192
|
+
actionLabel: k ? R.filterEmptyAction : Y ? G : void 0,
|
|
193
|
+
onAction: k ? O.onClearAll : Y ? M : void 0
|
|
194
194
|
})
|
|
195
195
|
})]
|
|
196
196
|
});
|
|
197
197
|
}
|
|
198
198
|
//#endregion
|
|
199
|
-
export {
|
|
199
|
+
export { w as CounterpartsScreen, w as default };
|
|
@@ -353,21 +353,21 @@ function Y(e) {
|
|
|
353
353
|
function X(e) {
|
|
354
354
|
return /^[\d\s-]+$/.test(e) && e.replace(/\D/g, "").length === 9;
|
|
355
355
|
}
|
|
356
|
-
function Z(e, t
|
|
357
|
-
let
|
|
358
|
-
e.entityType === "organization" ? e.legalName.trim().length === 0 && (
|
|
359
|
-
let
|
|
360
|
-
|
|
361
|
-
let
|
|
362
|
-
if (
|
|
363
|
-
let
|
|
364
|
-
K(
|
|
356
|
+
function Z(e, t = i, n = "customer", r = !1) {
|
|
357
|
+
let a = {};
|
|
358
|
+
e.entityType === "organization" ? e.legalName.trim().length === 0 && (a.legalName = t.legalNameRequired) : (e.firstName.trim().length === 0 && (a.firstName = t.firstNameRequired), e.lastName.trim().length === 0 && (a.lastName = t.lastNameRequired)), e.email.trim().length === 0 ? a.email = t.emailRequired : W(e.email.trim()) || (a.email = t.emailInvalid);
|
|
359
|
+
let o = e.phone.trim();
|
|
360
|
+
o && !Y(o) && (a.phone = t.phoneInvalid);
|
|
361
|
+
let s = e.taxId.trim();
|
|
362
|
+
if (s && !X(s) && (a.taxId = t.taxIdInvalid), n === "vendor" || k(e.address)) {
|
|
363
|
+
let n = G(e.address, t);
|
|
364
|
+
K(n) && (a.address = n);
|
|
365
365
|
}
|
|
366
|
-
if (
|
|
367
|
-
let
|
|
368
|
-
K(
|
|
366
|
+
if (n === "vendor" && (r || I(e))) {
|
|
367
|
+
let n = J(e.bankAccount, t);
|
|
368
|
+
K(n) && (a.bankAccount = n);
|
|
369
369
|
}
|
|
370
|
-
return
|
|
370
|
+
return a;
|
|
371
371
|
}
|
|
372
372
|
function Q(e, t, n) {
|
|
373
373
|
if (!n) return e;
|
|
@@ -10,7 +10,7 @@ var e = {
|
|
|
10
10
|
addressLine1Required: "Address line 1 is required",
|
|
11
11
|
cityRequired: "City is required",
|
|
12
12
|
stateRequired: "State is required",
|
|
13
|
-
postalCodeRequired: "
|
|
13
|
+
postalCodeRequired: "Postal code is required",
|
|
14
14
|
accountHolderNameRequired: "Account holder name is required",
|
|
15
15
|
routingNumberInvalid: "Enter a valid 9-digit ABA routing number",
|
|
16
16
|
accountNumberInvalid: "Enter a valid account number",
|