@tesouro/embedded-components-react 0.5.146 → 0.5.147
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 +22 -1
- package/dist/index.d.ts +72 -22
- package/dist/index.js +38 -36
- package/dist/lib/CounterpartsWidget.d.ts +21 -18
- package/dist/lib/CounterpartsWidget.js +1 -2
- package/dist/lib/CounterpartsWidgetPublic.d.ts +976 -0
- package/dist/lib/CounterpartsWidgetPublic.js +10 -0
- package/dist/lib/CustomersWidget.d.ts +955 -0
- package/dist/lib/CustomersWidget.js +3 -0
- package/dist/lib/ReceivablesWidget.d.ts +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index90.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index4.js +98 -89
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index7.js +114 -108
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index8.js +40 -42
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index2.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index3.js +90 -76
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index4.js +300 -226
- package/dist/libs/tesouro-embedded-components-react/customers-widget/feature/dist/index.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/customers-widget/feature/dist/index2.js +4 -0
- package/dist/libs/tesouro-embedded-components-react/customers-widget/feature/dist/index3.js +45 -0
- package/dist/libs/tesouro-embedded-components-react/customers-widget/feature/dist/index4.js +42 -0
- package/dist/libs/tesouro-embedded-components-react/customers-widget/feature/dist/index5.js +27 -0
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/index.js +11 -12
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js +103 -100
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/labels.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index13.js +4 -74
- 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/feature/dist/index8.js
CHANGED
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
5
|
+
import { EmbeddedToaster as e } from "../../../shared/ui/dist/lib/EmbeddedToaster.js";
|
|
6
|
+
import "../../../shared/ui/dist/index.js";
|
|
7
|
+
import { useAnalyticsTrack as t } from "../../../shared/feature/dist/lib/analytics/hooks.js";
|
|
8
|
+
import { WidgetProvider as n } from "../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
|
|
7
9
|
import "../../../shared/feature/dist/index.js";
|
|
8
|
-
import { CounterpartFormSheet as
|
|
9
|
-
import { BankAccountFormSheet as
|
|
10
|
-
import { AddressFormSheet as i } from "../../../shared/counterpart-management/ui/dist/index13.js";
|
|
10
|
+
import { CounterpartFormSheet as r } from "../../../shared/counterpart-management/ui/dist/index9.js";
|
|
11
|
+
import { BankAccountFormSheet as i } from "../../../shared/counterpart-management/ui/dist/index11.js";
|
|
11
12
|
import { ConfirmDeleteDialog as a } from "../../../shared/counterpart-management/ui/dist/index14.js";
|
|
12
13
|
import "../../../shared/counterpart-management/feature/dist/index.js";
|
|
13
14
|
import { CounterpartsWidgetAnalyticsEvent as o, WIDGET_NAME as s } from "./index2.js";
|
|
@@ -19,22 +20,23 @@ import { useCounterpartsWidget as d } from "./index7.js";
|
|
|
19
20
|
import { useEffect as f, useMemo as p } from "react";
|
|
20
21
|
import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
21
22
|
//#region ../../libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index8.js
|
|
22
|
-
function _({ counterpartType:
|
|
23
|
-
let E =
|
|
23
|
+
function _({ counterpartType: n, pageSizeOptions: s = c, onViewAllDocuments: _, onCreateDocument: v, screenLabels: y, formLabels: b, detailsLabels: x, bankAccountLabels: S, addressLabels: C, deleteLabels: w, messageLabels: T }) {
|
|
24
|
+
let E = t();
|
|
24
25
|
f(() => {
|
|
25
26
|
E(o.Mounted);
|
|
26
27
|
}, [E]);
|
|
27
|
-
let { stateOptions: D, selectedId: O, view: k, table: A, details: j, detailsSheetView: M, permissions: N, isPermissionLoading: P, form: F, bank: I, address: L, del: R, handleRowClick: z, closeDetails: B } = d({
|
|
28
|
-
counterpartType:
|
|
28
|
+
let { stateOptions: D, selectedId: O, view: k, table: A, details: j, detailsSheetView: M, permissions: N, isPermissionLoading: P, form: F, bank: I, address: L, del: R, handleRowClick: z, closeDetails: B, handleEditProfile: V } = d({
|
|
29
|
+
counterpartType: n,
|
|
29
30
|
detailsLabels: x,
|
|
30
31
|
messageLabels: T
|
|
31
|
-
}),
|
|
32
|
+
}), H = p(() => O && M ? {
|
|
32
33
|
id: O,
|
|
33
34
|
name: M.name
|
|
34
35
|
} : void 0, [M, O]);
|
|
35
36
|
return /* @__PURE__ */ g(m, { children: [
|
|
37
|
+
/* @__PURE__ */ h(e, {}),
|
|
36
38
|
/* @__PURE__ */ h(l, {
|
|
37
|
-
mode:
|
|
39
|
+
mode: n,
|
|
38
40
|
counterparts: A.rows,
|
|
39
41
|
isLoading: P || A.isLoading,
|
|
40
42
|
isError: A.isError,
|
|
@@ -61,13 +63,13 @@ function _({ counterpartType: t, pageSizeOptions: s = c, onViewAllDocuments: _,
|
|
|
61
63
|
emptyStateTestId: "counterparts-widget-empty-state",
|
|
62
64
|
accessRestrictedTestId: "counterparts-widget-access-restricted"
|
|
63
65
|
}),
|
|
64
|
-
/* @__PURE__ */ h(
|
|
66
|
+
/* @__PURE__ */ h(r, {
|
|
65
67
|
open: k === "create",
|
|
66
68
|
onOpenChange: (e) => {
|
|
67
69
|
e || F.close();
|
|
68
70
|
},
|
|
69
71
|
mode: "create",
|
|
70
|
-
counterpartMode:
|
|
72
|
+
counterpartMode: n,
|
|
71
73
|
values: F.values,
|
|
72
74
|
errors: F.errors,
|
|
73
75
|
stateOptions: D,
|
|
@@ -104,21 +106,21 @@ function _({ counterpartType: t, pageSizeOptions: s = c, onViewAllDocuments: _,
|
|
|
104
106
|
e || B();
|
|
105
107
|
},
|
|
106
108
|
privacyResetKey: O,
|
|
107
|
-
mode:
|
|
109
|
+
mode: n,
|
|
108
110
|
counterpart: M,
|
|
109
111
|
isLoading: j.isLoading,
|
|
110
112
|
isError: j.isError,
|
|
111
|
-
canEdit: N.canUpdate && (
|
|
113
|
+
canEdit: N.canUpdate && (n !== "vendor" || !j.isBankAccountsLoading && !j.isBankAccountsError),
|
|
112
114
|
canDelete: N.canDelete,
|
|
113
|
-
onEdit:
|
|
115
|
+
onEdit: V,
|
|
114
116
|
onDelete: R.requestDeleteCounterpart,
|
|
115
117
|
onClose: B,
|
|
116
118
|
onAddAddress: L.openCreate,
|
|
117
119
|
onEditAddress: L.openEdit,
|
|
118
120
|
onAddBankAccount: I.form.openCreate,
|
|
119
121
|
onEditBankAccount: I.form.openEdit,
|
|
120
|
-
onViewAllDocuments: _ &&
|
|
121
|
-
onCreateDocument: v &&
|
|
122
|
+
onViewAllDocuments: _ && H ? () => _(H) : void 0,
|
|
123
|
+
onCreateDocument: v && H ? () => v(H) : void 0,
|
|
122
124
|
onDeleteBankAccount: (e) => R.requestDelete({
|
|
123
125
|
kind: "bankAccount",
|
|
124
126
|
id: e,
|
|
@@ -154,9 +156,23 @@ function _({ counterpartType: t, pageSizeOptions: s = c, onViewAllDocuments: _,
|
|
|
154
156
|
sectionsToExpand: F.sectionsToExpand,
|
|
155
157
|
labels: b
|
|
156
158
|
} : void 0,
|
|
159
|
+
addressForm: L.open ? {
|
|
160
|
+
values: L.values,
|
|
161
|
+
errors: L.errors,
|
|
162
|
+
stateOptions: D,
|
|
163
|
+
inProgress: L.isPending,
|
|
164
|
+
formError: L.formError,
|
|
165
|
+
onChange: (e) => L.setValues((t) => ({
|
|
166
|
+
...t,
|
|
167
|
+
...e
|
|
168
|
+
})),
|
|
169
|
+
onSubmit: L.submit,
|
|
170
|
+
onCancel: L.close,
|
|
171
|
+
labels: C
|
|
172
|
+
} : void 0,
|
|
157
173
|
labels: x
|
|
158
174
|
}),
|
|
159
|
-
/* @__PURE__ */ h(
|
|
175
|
+
/* @__PURE__ */ h(i, {
|
|
160
176
|
open: I.form.sheet.open,
|
|
161
177
|
onOpenChange: (e) => {
|
|
162
178
|
e || I.form.close();
|
|
@@ -174,24 +190,6 @@ function _({ counterpartType: t, pageSizeOptions: s = c, onViewAllDocuments: _,
|
|
|
174
190
|
onCancel: I.form.close,
|
|
175
191
|
labels: S
|
|
176
192
|
}),
|
|
177
|
-
/* @__PURE__ */ h(i, {
|
|
178
|
-
open: L.open,
|
|
179
|
-
onOpenChange: (e) => {
|
|
180
|
-
e || L.close();
|
|
181
|
-
},
|
|
182
|
-
values: L.values,
|
|
183
|
-
errors: L.errors,
|
|
184
|
-
stateOptions: D,
|
|
185
|
-
inProgress: L.isPending,
|
|
186
|
-
formError: L.formError,
|
|
187
|
-
onChange: (e) => L.setValues((t) => ({
|
|
188
|
-
...t,
|
|
189
|
-
...e
|
|
190
|
-
})),
|
|
191
|
-
onSubmit: L.submit,
|
|
192
|
-
onCancel: L.close,
|
|
193
|
-
labels: C
|
|
194
|
-
}),
|
|
195
193
|
/* @__PURE__ */ h(a, {
|
|
196
194
|
open: R.target !== null,
|
|
197
195
|
onOpenChange: (e) => {
|
|
@@ -206,11 +204,11 @@ function _({ counterpartType: t, pageSizeOptions: s = c, onViewAllDocuments: _,
|
|
|
206
204
|
})
|
|
207
205
|
] });
|
|
208
206
|
}
|
|
209
|
-
function v({ baseUrl: e, widgetToken:
|
|
210
|
-
return /* @__PURE__ */ h(
|
|
211
|
-
widgetName: s,
|
|
207
|
+
function v({ baseUrl: e, widgetToken: t, organizationId: r, configClient: i, gatewayRouting: a, linkComponent: o, implementation: c, uiFramework: l, errorFallback: u, onError: d, analytics: f, disclosuresAcceptance: p, providerLabels: m, passThrough: g, ...v }) {
|
|
208
|
+
return /* @__PURE__ */ h(n, {
|
|
209
|
+
widgetName: g === !0 && e === void 0 && t === void 0 ? void 0 : s,
|
|
212
210
|
baseUrl: e,
|
|
213
|
-
widgetToken:
|
|
211
|
+
widgetToken: t,
|
|
214
212
|
organizationId: r,
|
|
215
213
|
configClient: i,
|
|
216
214
|
gatewayRouting: a,
|
|
@@ -222,7 +220,7 @@ function v({ baseUrl: e, widgetToken: n, organizationId: r, configClient: i, gat
|
|
|
222
220
|
analytics: f,
|
|
223
221
|
disclosuresAcceptance: p,
|
|
224
222
|
providerLabels: m,
|
|
225
|
-
children: /* @__PURE__ */ h(_, { ...
|
|
223
|
+
children: /* @__PURE__ */ h(_, { ...v }, v.counterpartType)
|
|
226
224
|
});
|
|
227
225
|
}
|
|
228
226
|
//#endregion
|
|
@@ -79,6 +79,7 @@ var e = {
|
|
|
79
79
|
customerTaxIdHelp: "Required only if you'll issue a 1099 IRS form at year-end.",
|
|
80
80
|
vendorTaxIdHelp: "Required only if you'll file a 1099 IRS form for this vendor at year-end.",
|
|
81
81
|
addressHeading: "Address",
|
|
82
|
+
customerAddressHeading: "Address (optional)",
|
|
82
83
|
customerAddressDescription: "Where invoices are sent.",
|
|
83
84
|
addAddressAction: "Add address",
|
|
84
85
|
editAddressAction: "Edit address",
|
|
@@ -4,29 +4,39 @@ import { ErrorState as u } from "../../../shared/ui/dist/lib/ErrorState/ErrorSta
|
|
|
4
4
|
import "../../../shared/ui/dist/index.js";
|
|
5
5
|
import { COUNTERPARTS_SCREEN_LABELS_EN as d } from "./index2.js";
|
|
6
6
|
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
7
|
-
import { ArrowDownIcon as m, ArrowUpDownIcon as h, ArrowUpIcon as g
|
|
7
|
+
import { ArrowDownIcon as m, ArrowUpDownIcon as h, ArrowUpIcon as g } from "lucide-react";
|
|
8
8
|
//#region ../../libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index3.js
|
|
9
|
-
var
|
|
9
|
+
var _ = "all", v = [
|
|
10
10
|
10,
|
|
11
11
|
25,
|
|
12
12
|
50,
|
|
13
13
|
100
|
|
14
|
+
], y = [
|
|
15
|
+
"rgba(0,0,255,0.05)",
|
|
16
|
+
"rgba(255,0,32,0.05)",
|
|
17
|
+
"rgba(0,255,220,0.05)",
|
|
18
|
+
"rgba(225,1,251,0.05)",
|
|
19
|
+
"rgba(255,123,0,0.05)"
|
|
14
20
|
];
|
|
15
|
-
function b(
|
|
21
|
+
function b(e) {
|
|
22
|
+
let t = 0;
|
|
23
|
+
for (let n = e.length - 1; n >= 0; --n) t += e.charCodeAt(n);
|
|
24
|
+
return y[t % y.length];
|
|
25
|
+
}
|
|
26
|
+
function x({ labels: e, searchValue: t, onSearchChange: c, entityFilter: l, onEntityFilterChange: u, disabled: d, createAction: m }) {
|
|
16
27
|
return /* @__PURE__ */ p("div", {
|
|
17
28
|
className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:gap-2 ttw:px-4",
|
|
18
|
-
children: [
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
/* @__PURE__ */ p(r, {
|
|
29
|
+
children: [/* @__PURE__ */ f("div", {
|
|
30
|
+
className: "ttw:w-80",
|
|
31
|
+
children: /* @__PURE__ */ f(n, {
|
|
32
|
+
placeholder: e.searchPlaceholder,
|
|
33
|
+
value: t,
|
|
34
|
+
disabled: d,
|
|
35
|
+
onChange: (e) => c(e.target.value)
|
|
36
|
+
})
|
|
37
|
+
}), /* @__PURE__ */ p("div", {
|
|
38
|
+
className: "ttw:ml-auto ttw:flex ttw:items-center ttw:gap-2",
|
|
39
|
+
children: [/* @__PURE__ */ p(r, {
|
|
30
40
|
value: l,
|
|
31
41
|
onValueChange: u,
|
|
32
42
|
disabled: d,
|
|
@@ -35,7 +45,7 @@ function b({ labels: e, searchValue: t, onSearchChange: c, entityFilter: l, onEn
|
|
|
35
45
|
children: /* @__PURE__ */ f(s, {})
|
|
36
46
|
}), /* @__PURE__ */ p(i, { children: [
|
|
37
47
|
/* @__PURE__ */ f(a, {
|
|
38
|
-
value:
|
|
48
|
+
value: _,
|
|
39
49
|
children: e.entityFilterAll
|
|
40
50
|
}),
|
|
41
51
|
/* @__PURE__ */ f(a, {
|
|
@@ -47,15 +57,11 @@ function b({ labels: e, searchValue: t, onSearchChange: c, entityFilter: l, onEn
|
|
|
47
57
|
children: e.entityFilterOrganization
|
|
48
58
|
})
|
|
49
59
|
] })]
|
|
50
|
-
}),
|
|
51
|
-
|
|
52
|
-
className: "ttw:ml-auto",
|
|
53
|
-
children: m
|
|
54
|
-
})
|
|
55
|
-
]
|
|
60
|
+
}), m]
|
|
61
|
+
})]
|
|
56
62
|
});
|
|
57
63
|
}
|
|
58
|
-
function
|
|
64
|
+
function S({ value: e, isLoading: t, colorClass: n }) {
|
|
59
65
|
return /* @__PURE__ */ f("div", {
|
|
60
66
|
className: "ttw:flex ttw:justify-end",
|
|
61
67
|
children: t ? /* @__PURE__ */ f(c, { className: "ttw:h-4 ttw:w-20" }) : /* @__PURE__ */ f("span", {
|
|
@@ -64,11 +70,11 @@ function x({ value: e, isLoading: t, colorClass: n }) {
|
|
|
64
70
|
})
|
|
65
71
|
});
|
|
66
72
|
}
|
|
67
|
-
function
|
|
68
|
-
let
|
|
73
|
+
function C({ mode: n, counterparts: r, isLoading: i, isError: a, sorting: o, onSortingChange: s, pageSize: c, onPageSizeChange: _, pageSizeOptions: y = v, hasNextPage: C, hasPrevPage: w, onNextPage: T, onPrevPage: E, searchValue: D, onSearchChange: O, entityFilter: k, onEntityFilterChange: A, isFiltering: j, canCreate: M = !0, isAccessRestricted: N, onCreateClick: P, onRowClick: F, onRetry: I, labels: L, emptyStateTestId: R, accessRestrictedTestId: z }) {
|
|
74
|
+
let B = {
|
|
69
75
|
...d,
|
|
70
|
-
...
|
|
71
|
-
},
|
|
76
|
+
...L
|
|
77
|
+
}, V = n === "customer", H = V ? B.columnReceivedAmount : B.columnTotalPaidToDate, U = V ? B.columnAmountDue : B.columnBalanceDue, W = [
|
|
72
78
|
{
|
|
73
79
|
accessorKey: "name",
|
|
74
80
|
enableSorting: !0,
|
|
@@ -76,33 +82,41 @@ function S({ mode: n, counterparts: r, isLoading: i, isError: a, sorting: o, onS
|
|
|
76
82
|
let n = t.getIsSorted();
|
|
77
83
|
return /* @__PURE__ */ p("div", {
|
|
78
84
|
className: "ttw:flex ttw:items-center ttw:gap-2 ttw:text-inherit",
|
|
79
|
-
children: [
|
|
85
|
+
children: [B.columnName, /* @__PURE__ */ f(e, {
|
|
80
86
|
variant: "ghost",
|
|
81
87
|
size: "icon-sm",
|
|
82
|
-
"aria-label":
|
|
88
|
+
"aria-label": B.sortByName,
|
|
83
89
|
onClick: () => t.toggleSorting(n === "asc"),
|
|
84
90
|
children: f(n === "asc" ? g : n === "desc" ? m : h, { className: "ttw:size-4" })
|
|
85
91
|
})]
|
|
86
92
|
});
|
|
87
93
|
},
|
|
88
94
|
cell: ({ row: e }) => /* @__PURE__ */ p("div", {
|
|
89
|
-
className: "ttw:flex ttw:
|
|
90
|
-
children: [/* @__PURE__ */ f("span", {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
95
|
+
className: "ttw:flex ttw:items-center ttw:gap-3",
|
|
96
|
+
children: [V && /* @__PURE__ */ f("span", {
|
|
97
|
+
"aria-hidden": !0,
|
|
98
|
+
style: { backgroundColor: b(e.original.initials) },
|
|
99
|
+
className: "ttw:flex ttw:size-10 ttw:shrink-0 ttw:items-center ttw:justify-center ttw:rounded-full ttw:text-base ttw:font-semibold ttw:text-foreground",
|
|
100
|
+
children: e.original.initials
|
|
101
|
+
}), /* @__PURE__ */ p("div", {
|
|
102
|
+
className: "ttw:flex ttw:flex-col ttw:gap-1",
|
|
103
|
+
children: [/* @__PURE__ */ f("span", {
|
|
104
|
+
className: "ttw:font-semibold",
|
|
105
|
+
children: e.original.name
|
|
106
|
+
}), e.original.locationLabel && /* @__PURE__ */ f("span", {
|
|
107
|
+
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
108
|
+
children: e.original.locationLabel
|
|
109
|
+
})]
|
|
96
110
|
})]
|
|
97
111
|
})
|
|
98
112
|
},
|
|
99
|
-
...
|
|
113
|
+
...V ? [{
|
|
100
114
|
accessorKey: "billedAmountLabel",
|
|
101
115
|
header: () => /* @__PURE__ */ f("div", {
|
|
102
116
|
className: "ttw:text-right",
|
|
103
|
-
children:
|
|
117
|
+
children: B.columnBilledAmount
|
|
104
118
|
}),
|
|
105
|
-
cell: ({ row: e }) => /* @__PURE__ */ f(
|
|
119
|
+
cell: ({ row: e }) => /* @__PURE__ */ f(S, {
|
|
106
120
|
value: e.original.billedAmountLabel,
|
|
107
121
|
isLoading: e.original.isBilledAmountLoading
|
|
108
122
|
})
|
|
@@ -111,9 +125,9 @@ function S({ mode: n, counterparts: r, isLoading: i, isError: a, sorting: o, onS
|
|
|
111
125
|
accessorKey: "receivedOrPaidAmountLabel",
|
|
112
126
|
header: () => /* @__PURE__ */ f("div", {
|
|
113
127
|
className: "ttw:text-right",
|
|
114
|
-
children:
|
|
128
|
+
children: H
|
|
115
129
|
}),
|
|
116
|
-
cell: ({ row: e }) => /* @__PURE__ */ f(
|
|
130
|
+
cell: ({ row: e }) => /* @__PURE__ */ f(S, {
|
|
117
131
|
value: e.original.receivedOrPaidAmountLabel,
|
|
118
132
|
isLoading: e.original.isReceivedOrPaidAmountLoading,
|
|
119
133
|
colorClass: e.original.isReceivedOrPaidPositive ? "ttw:text-green-700" : void 0
|
|
@@ -123,61 +137,61 @@ function S({ mode: n, counterparts: r, isLoading: i, isError: a, sorting: o, onS
|
|
|
123
137
|
accessorKey: "dueOrOwedAmountLabel",
|
|
124
138
|
header: () => /* @__PURE__ */ f("div", {
|
|
125
139
|
className: "ttw:text-right",
|
|
126
|
-
children:
|
|
140
|
+
children: U
|
|
127
141
|
}),
|
|
128
|
-
cell: ({ row: e }) => /* @__PURE__ */ f(
|
|
142
|
+
cell: ({ row: e }) => /* @__PURE__ */ f(S, {
|
|
129
143
|
value: e.original.dueOrOwedAmountLabel,
|
|
130
144
|
isLoading: e.original.isDueOrOwedAmountLoading
|
|
131
145
|
})
|
|
132
146
|
}
|
|
133
|
-
],
|
|
147
|
+
], G = V ? B.customersEmptyTitle : B.vendorsEmptyTitle, K = V ? B.customersEmptyDescription : B.vendorsEmptyDescription, q = V ? B.customersEmptyAction : B.vendorsEmptyAction, J = V ? B.customersFilterEmptyTitle : B.vendorsFilterEmptyTitle, Y = !j && !D && !r.length && !i, X = !(!M || N), Z = !(j || !X), Q = V ? B.createButton : B.vendorsCreateButton;
|
|
134
148
|
return /* @__PURE__ */ f("div", {
|
|
135
149
|
className: "ttw:flex ttw:flex-col ttw:gap-4",
|
|
136
|
-
children:
|
|
137
|
-
testId:
|
|
138
|
-
title:
|
|
139
|
-
description:
|
|
150
|
+
children: N ? /* @__PURE__ */ f(u, {
|
|
151
|
+
testId: z,
|
|
152
|
+
title: B.accessRestrictedTitle,
|
|
153
|
+
description: B.accessRestrictedDescription
|
|
140
154
|
}) : a ? /* @__PURE__ */ f(u, {
|
|
141
|
-
title:
|
|
142
|
-
description:
|
|
143
|
-
retryLabel:
|
|
144
|
-
onRetry:
|
|
155
|
+
title: B.errorTitle,
|
|
156
|
+
description: B.errorDescription,
|
|
157
|
+
retryLabel: I ? B.errorRetry : void 0,
|
|
158
|
+
onRetry: I
|
|
145
159
|
}) : /* @__PURE__ */ f(t, {
|
|
146
|
-
columns:
|
|
160
|
+
columns: W,
|
|
147
161
|
data: r,
|
|
148
162
|
isLoading: i,
|
|
149
163
|
sorting: o,
|
|
150
164
|
onSortingChange: s,
|
|
151
165
|
pageSize: c,
|
|
152
166
|
onPageSizeChange: _,
|
|
153
|
-
pageSizeOptions:
|
|
154
|
-
hasNextPage:
|
|
155
|
-
hasPrevPage:
|
|
156
|
-
onNextPage:
|
|
157
|
-
onPrevPage:
|
|
158
|
-
onRowClick:
|
|
159
|
-
rowAriaLabel: (e) =>
|
|
160
|
-
filterComponent: /* @__PURE__ */ f(
|
|
161
|
-
labels:
|
|
162
|
-
searchValue:
|
|
163
|
-
onSearchChange:
|
|
164
|
-
entityFilter:
|
|
165
|
-
onEntityFilterChange:
|
|
166
|
-
disabled:
|
|
167
|
-
createAction:
|
|
168
|
-
onClick:
|
|
169
|
-
children:
|
|
167
|
+
pageSizeOptions: y,
|
|
168
|
+
hasNextPage: C,
|
|
169
|
+
hasPrevPage: w,
|
|
170
|
+
onNextPage: T,
|
|
171
|
+
onPrevPage: E,
|
|
172
|
+
onRowClick: F,
|
|
173
|
+
rowAriaLabel: (e) => B.openRow(e.name),
|
|
174
|
+
filterComponent: /* @__PURE__ */ f(x, {
|
|
175
|
+
labels: B,
|
|
176
|
+
searchValue: D,
|
|
177
|
+
onSearchChange: O,
|
|
178
|
+
entityFilter: k,
|
|
179
|
+
onEntityFilterChange: A,
|
|
180
|
+
disabled: Y,
|
|
181
|
+
createAction: X ? /* @__PURE__ */ f(e, {
|
|
182
|
+
onClick: P,
|
|
183
|
+
children: Q
|
|
170
184
|
}) : void 0
|
|
171
185
|
}),
|
|
172
186
|
children: /* @__PURE__ */ f(l, {
|
|
173
|
-
testId:
|
|
174
|
-
title:
|
|
175
|
-
description:
|
|
176
|
-
actionLabel:
|
|
177
|
-
onAction:
|
|
187
|
+
testId: R,
|
|
188
|
+
title: j ? J : G,
|
|
189
|
+
description: j ? B.filterEmptyDescription : K,
|
|
190
|
+
actionLabel: Z ? q : void 0,
|
|
191
|
+
onAction: Z ? P : void 0
|
|
178
192
|
})
|
|
179
193
|
})
|
|
180
194
|
});
|
|
181
195
|
}
|
|
182
196
|
//#endregion
|
|
183
|
-
export {
|
|
197
|
+
export { C as CounterpartsScreen, C as default };
|