@tesouro/embedded-components-react 0.3.1 → 0.3.2
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 +7 -10
- package/dist/experimental/WidgetSuite.d.ts +2 -2
- package/dist/experimental/index.d.ts +2 -2
- package/dist/index.d.ts +1 -23
- package/dist/lib/BankAccountsWidget.d.ts +0 -1
- package/dist/lib/ChartOfAccountsWidget.d.ts +1 -5
- package/dist/lib/CounterpartsWidget.d.ts +0 -9
- package/dist/lib/ExpenseManagementWidget.d.ts +0 -1
- package/dist/lib/ProductsWidget.d.ts +0 -1
- package/dist/lib/ReceivablesWidget.d.ts +0 -1
- package/dist/lib/SettingsWidget.d.ts +0 -1
- package/dist/lib/TagsWidget.d.ts +0 -1
- package/dist/lib/TeamWidget.d.ts +0 -3
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index8.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index7.js +64 -65
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/BankAccountsWidgetUi.js +35 -36
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/BankingHeader.js +35 -42
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/labels.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index43.js +1 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index44.js +4 -7
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsList.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index8.js +106 -107
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index2.js +0 -2
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index3.js +85 -93
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseManagementWidgetUi/ExpenseManagementWidgetUi.js +4 -7
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseManagementWidgetUi/labels.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/gl-code-table-widget/ui/dist/index2.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/gl-code-table-widget/ui/dist/index3.js +113 -115
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index16.js +150 -155
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index2.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/products-widget/ui/dist/index2.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/products-widget/ui/dist/index4.js +86 -91
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index5.js +20 -22
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index6.js +2 -6
- package/dist/libs/tesouro-embedded-components-react/settings-widget/ui/dist/lib/SettingsWidgetUi/SettingsWidgetUi.js +25 -26
- package/dist/libs/tesouro-embedded-components-react/settings-widget/ui/dist/lib/SettingsWidgetUi/labels.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index11.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/tags-widget/ui/dist/index2.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/tags-widget/ui/dist/index3.js +67 -68
- package/dist/libs/tesouro-embedded-components-react/team-widget/feature/dist/index17.js +239 -241
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index7.js +1 -6
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +53 -53
- package/package.json +1 -1
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { Button as e, DataTable as t, Input as n, Select as r, SelectContent as i, SelectItem as a, SelectTrigger as o, SelectValue as s, Skeleton as c
|
|
2
|
-
import { EmptyState as
|
|
3
|
-
import { ErrorState as
|
|
1
|
+
import { Button as e, DataTable as t, Input as n, Select as r, SelectContent as i, SelectItem as a, SelectTrigger as o, SelectValue as s, Skeleton as c } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { EmptyState as l } from "../../../shared/ui/dist/lib/EmptyState/EmptyState.js";
|
|
3
|
+
import { ErrorState as u } from "../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
|
|
4
4
|
import "../../../shared/ui/dist/index.js";
|
|
5
|
-
import { COUNTERPARTS_SCREEN_LABELS_EN as
|
|
6
|
-
import { jsx as
|
|
7
|
-
import { ArrowDownIcon as
|
|
5
|
+
import { COUNTERPARTS_SCREEN_LABELS_EN as d } from "./index2.js";
|
|
6
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
7
|
+
import { ArrowDownIcon as m, ArrowUpDownIcon as h, ArrowUpIcon as g, SearchIcon as _ } from "lucide-react";
|
|
8
8
|
//#region ../../libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index3.js
|
|
9
|
-
var
|
|
9
|
+
var v = "all", y = [
|
|
10
10
|
10,
|
|
11
11
|
25,
|
|
12
12
|
50,
|
|
13
13
|
100
|
|
14
14
|
];
|
|
15
|
-
function
|
|
16
|
-
return /* @__PURE__ */
|
|
15
|
+
function b({ labels: e, searchValue: t, onSearchChange: c, entityFilter: l, onEntityFilterChange: u, disabled: d, createAction: m }) {
|
|
16
|
+
return /* @__PURE__ */ p("div", {
|
|
17
17
|
className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:gap-2 ttw:px-4",
|
|
18
18
|
children: [
|
|
19
|
-
/* @__PURE__ */
|
|
19
|
+
/* @__PURE__ */ p("div", {
|
|
20
20
|
className: "ttw:relative ttw:w-80",
|
|
21
|
-
children: [/* @__PURE__ */
|
|
21
|
+
children: [/* @__PURE__ */ f(_, { className: "ttw:pointer-events-none ttw:absolute ttw:left-3 ttw:top-1/2 ttw:size-4 ttw:-translate-y-1/2 ttw:text-muted-foreground" }), /* @__PURE__ */ f(n, {
|
|
22
22
|
className: "ttw:pl-9",
|
|
23
23
|
placeholder: e.searchPlaceholder,
|
|
24
24
|
value: t,
|
|
@@ -26,94 +26,94 @@ function x({ labels: e, searchValue: t, onSearchChange: c, entityFilter: l, onEn
|
|
|
26
26
|
onChange: (e) => c(e.target.value)
|
|
27
27
|
})]
|
|
28
28
|
}),
|
|
29
|
-
/* @__PURE__ */
|
|
29
|
+
/* @__PURE__ */ p(r, {
|
|
30
30
|
value: l,
|
|
31
31
|
onValueChange: u,
|
|
32
32
|
disabled: d,
|
|
33
|
-
children: [/* @__PURE__ */
|
|
33
|
+
children: [/* @__PURE__ */ f(o, {
|
|
34
34
|
className: "ttw:w-44",
|
|
35
|
-
children: /* @__PURE__ */
|
|
36
|
-
}), /* @__PURE__ */
|
|
37
|
-
/* @__PURE__ */
|
|
38
|
-
value:
|
|
35
|
+
children: /* @__PURE__ */ f(s, {})
|
|
36
|
+
}), /* @__PURE__ */ p(i, { children: [
|
|
37
|
+
/* @__PURE__ */ f(a, {
|
|
38
|
+
value: v,
|
|
39
39
|
children: e.entityFilterAll
|
|
40
40
|
}),
|
|
41
|
-
/* @__PURE__ */
|
|
41
|
+
/* @__PURE__ */ f(a, {
|
|
42
42
|
value: "individual",
|
|
43
43
|
children: e.entityFilterIndividual
|
|
44
44
|
}),
|
|
45
|
-
/* @__PURE__ */
|
|
45
|
+
/* @__PURE__ */ f(a, {
|
|
46
46
|
value: "organization",
|
|
47
47
|
children: e.entityFilterOrganization
|
|
48
48
|
})
|
|
49
49
|
] })]
|
|
50
50
|
}),
|
|
51
|
-
|
|
51
|
+
m && /* @__PURE__ */ f("div", {
|
|
52
52
|
className: "ttw:ml-auto",
|
|
53
|
-
children:
|
|
53
|
+
children: m
|
|
54
54
|
})
|
|
55
55
|
]
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
|
-
function
|
|
59
|
-
return /* @__PURE__ */
|
|
58
|
+
function x({ value: e, isLoading: t, colorClass: n }) {
|
|
59
|
+
return /* @__PURE__ */ f("div", {
|
|
60
60
|
className: "ttw:flex ttw:justify-end",
|
|
61
|
-
children: t ? /* @__PURE__ */
|
|
61
|
+
children: t ? /* @__PURE__ */ f(c, { className: "ttw:h-4 ttw:w-20" }) : /* @__PURE__ */ f("span", {
|
|
62
62
|
className: n,
|
|
63
63
|
children: e
|
|
64
64
|
})
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
|
-
function
|
|
68
|
-
let
|
|
69
|
-
...
|
|
70
|
-
...
|
|
71
|
-
},
|
|
67
|
+
function S({ mode: n, counterparts: r, isLoading: i, isError: a, sorting: o, onSortingChange: s, pageSize: c, onPageSizeChange: _, pageSizeOptions: v = y, hasNextPage: S, hasPrevPage: C, onNextPage: w, onPrevPage: T, searchValue: E, onSearchChange: D, entityFilter: O, onEntityFilterChange: k, isFiltering: A, canCreate: j = !0, isAccessRestricted: M, onCreateClick: N, onRowClick: P, onRetry: F, labels: I, emptyStateTestId: L, accessRestrictedTestId: R }) {
|
|
68
|
+
let z = {
|
|
69
|
+
...d,
|
|
70
|
+
...I
|
|
71
|
+
}, B = n === "customer", V = B ? z.columnReceivedAmount : z.columnTotalPaidToDate, H = B ? z.columnAmountDue : z.columnBalanceDue, U = [
|
|
72
72
|
{
|
|
73
73
|
accessorKey: "name",
|
|
74
74
|
enableSorting: !0,
|
|
75
75
|
header: ({ column: t }) => {
|
|
76
76
|
let n = t.getIsSorted();
|
|
77
|
-
return /* @__PURE__ */
|
|
77
|
+
return /* @__PURE__ */ p("div", {
|
|
78
78
|
className: "ttw:flex ttw:items-center ttw:gap-2 ttw:text-inherit",
|
|
79
|
-
children: [
|
|
79
|
+
children: [z.columnName, /* @__PURE__ */ f(e, {
|
|
80
80
|
variant: "ghost",
|
|
81
81
|
size: "icon-sm",
|
|
82
|
-
"aria-label":
|
|
82
|
+
"aria-label": z.sortByName,
|
|
83
83
|
onClick: () => t.toggleSorting(n === "asc"),
|
|
84
|
-
children:
|
|
84
|
+
children: f(n === "asc" ? g : n === "desc" ? m : h, { className: "ttw:size-4" })
|
|
85
85
|
})]
|
|
86
86
|
});
|
|
87
87
|
},
|
|
88
|
-
cell: ({ row: e }) => /* @__PURE__ */
|
|
88
|
+
cell: ({ row: e }) => /* @__PURE__ */ p("div", {
|
|
89
89
|
className: "ttw:flex ttw:flex-col ttw:gap-1",
|
|
90
|
-
children: [/* @__PURE__ */
|
|
90
|
+
children: [/* @__PURE__ */ f("span", {
|
|
91
91
|
className: "ttw:font-medium",
|
|
92
92
|
children: e.original.name
|
|
93
|
-
}), e.original.locationLabel && /* @__PURE__ */
|
|
93
|
+
}), e.original.locationLabel && /* @__PURE__ */ f("span", {
|
|
94
94
|
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
95
95
|
children: e.original.locationLabel
|
|
96
96
|
})]
|
|
97
97
|
})
|
|
98
98
|
},
|
|
99
|
-
...
|
|
99
|
+
...B ? [{
|
|
100
100
|
accessorKey: "billedAmountLabel",
|
|
101
|
-
header: () => /* @__PURE__ */
|
|
101
|
+
header: () => /* @__PURE__ */ f("div", {
|
|
102
102
|
className: "ttw:text-right",
|
|
103
|
-
children:
|
|
103
|
+
children: z.columnBilledAmount
|
|
104
104
|
}),
|
|
105
|
-
cell: ({ row: e }) => /* @__PURE__ */
|
|
105
|
+
cell: ({ row: e }) => /* @__PURE__ */ f(x, {
|
|
106
106
|
value: e.original.billedAmountLabel,
|
|
107
107
|
isLoading: e.original.isBilledAmountLoading
|
|
108
108
|
})
|
|
109
109
|
}] : [],
|
|
110
110
|
{
|
|
111
111
|
accessorKey: "receivedOrPaidAmountLabel",
|
|
112
|
-
header: () => /* @__PURE__ */
|
|
112
|
+
header: () => /* @__PURE__ */ f("div", {
|
|
113
113
|
className: "ttw:text-right",
|
|
114
|
-
children:
|
|
114
|
+
children: V
|
|
115
115
|
}),
|
|
116
|
-
cell: ({ row: e }) => /* @__PURE__ */
|
|
116
|
+
cell: ({ row: e }) => /* @__PURE__ */ f(x, {
|
|
117
117
|
value: e.original.receivedOrPaidAmountLabel,
|
|
118
118
|
isLoading: e.original.isReceivedOrPaidAmountLoading,
|
|
119
119
|
colorClass: e.original.isReceivedOrPaidPositive ? "ttw:text-green-700" : void 0
|
|
@@ -121,70 +121,62 @@ function C({ mode: n, counterparts: r, isLoading: i, isError: a, sorting: o, onS
|
|
|
121
121
|
},
|
|
122
122
|
{
|
|
123
123
|
accessorKey: "dueOrOwedAmountLabel",
|
|
124
|
-
header: () => /* @__PURE__ */
|
|
124
|
+
header: () => /* @__PURE__ */ f("div", {
|
|
125
125
|
className: "ttw:text-right",
|
|
126
|
-
children:
|
|
126
|
+
children: H
|
|
127
127
|
}),
|
|
128
|
-
cell: ({ row: e }) => /* @__PURE__ */
|
|
128
|
+
cell: ({ row: e }) => /* @__PURE__ */ f(x, {
|
|
129
129
|
value: e.original.dueOrOwedAmountLabel,
|
|
130
130
|
isLoading: e.original.isDueOrOwedAmountLoading
|
|
131
131
|
})
|
|
132
132
|
}
|
|
133
|
-
],
|
|
134
|
-
|
|
135
|
-
children: te
|
|
136
|
-
}) : void 0;
|
|
137
|
-
return /* @__PURE__ */ m("div", {
|
|
133
|
+
], W = B ? z.customersEmptyTitle : z.vendorsEmptyTitle, G = B ? z.customersEmptyDescription : z.vendorsEmptyDescription, K = B ? z.customersEmptyAction : z.vendorsEmptyAction, q = B ? z.customersFilterEmptyTitle : z.vendorsFilterEmptyTitle, J = !A && !E && !r.length && !i, Y = !!(j && !M), X = !!(!A && Y), Z = B ? z.createButton : z.vendorsCreateButton;
|
|
134
|
+
return /* @__PURE__ */ f("div", {
|
|
138
135
|
className: "ttw:flex ttw:flex-col ttw:gap-4",
|
|
139
|
-
children:
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
description: B.accessRestrictedDescription
|
|
151
|
-
}) : a ? /* @__PURE__ */ p(d, {
|
|
152
|
-
title: B.errorTitle,
|
|
153
|
-
description: B.errorDescription,
|
|
154
|
-
retryLabel: I ? B.errorRetry : void 0,
|
|
155
|
-
onRetry: I
|
|
156
|
-
}) : /* @__PURE__ */ p(t, {
|
|
157
|
-
columns: G,
|
|
136
|
+
children: M ? /* @__PURE__ */ f(u, {
|
|
137
|
+
testId: R,
|
|
138
|
+
title: z.accessRestrictedTitle,
|
|
139
|
+
description: z.accessRestrictedDescription
|
|
140
|
+
}) : a ? /* @__PURE__ */ f(u, {
|
|
141
|
+
title: z.errorTitle,
|
|
142
|
+
description: z.errorDescription,
|
|
143
|
+
retryLabel: F ? z.errorRetry : void 0,
|
|
144
|
+
onRetry: F
|
|
145
|
+
}) : /* @__PURE__ */ f(t, {
|
|
146
|
+
columns: U,
|
|
158
147
|
data: r,
|
|
159
148
|
isLoading: i,
|
|
160
149
|
sorting: o,
|
|
161
150
|
onSortingChange: s,
|
|
162
151
|
pageSize: c,
|
|
163
|
-
onPageSizeChange:
|
|
164
|
-
pageSizeOptions:
|
|
165
|
-
hasNextPage:
|
|
166
|
-
hasPrevPage:
|
|
167
|
-
onNextPage:
|
|
168
|
-
onPrevPage:
|
|
169
|
-
onRowClick:
|
|
170
|
-
filterComponent: /* @__PURE__ */
|
|
171
|
-
labels:
|
|
172
|
-
searchValue:
|
|
173
|
-
onSearchChange:
|
|
174
|
-
entityFilter:
|
|
175
|
-
onEntityFilterChange:
|
|
176
|
-
disabled:
|
|
177
|
-
createAction:
|
|
152
|
+
onPageSizeChange: _,
|
|
153
|
+
pageSizeOptions: v,
|
|
154
|
+
hasNextPage: S,
|
|
155
|
+
hasPrevPage: C,
|
|
156
|
+
onNextPage: w,
|
|
157
|
+
onPrevPage: T,
|
|
158
|
+
onRowClick: P,
|
|
159
|
+
filterComponent: /* @__PURE__ */ f(b, {
|
|
160
|
+
labels: z,
|
|
161
|
+
searchValue: E,
|
|
162
|
+
onSearchChange: D,
|
|
163
|
+
entityFilter: O,
|
|
164
|
+
onEntityFilterChange: k,
|
|
165
|
+
disabled: J,
|
|
166
|
+
createAction: Y ? /* @__PURE__ */ f(e, {
|
|
167
|
+
onClick: N,
|
|
168
|
+
children: Z
|
|
169
|
+
}) : void 0
|
|
178
170
|
}),
|
|
179
|
-
children: /* @__PURE__ */
|
|
180
|
-
testId:
|
|
181
|
-
title: A ?
|
|
182
|
-
description: A ?
|
|
183
|
-
actionLabel:
|
|
184
|
-
onAction:
|
|
171
|
+
children: /* @__PURE__ */ f(l, {
|
|
172
|
+
testId: L,
|
|
173
|
+
title: A ? q : W,
|
|
174
|
+
description: A ? z.filterEmptyDescription : G,
|
|
175
|
+
actionLabel: X ? K : void 0,
|
|
176
|
+
onAction: X ? N : void 0
|
|
185
177
|
})
|
|
186
|
-
})
|
|
178
|
+
})
|
|
187
179
|
});
|
|
188
180
|
}
|
|
189
181
|
//#endregion
|
|
190
|
-
export {
|
|
182
|
+
export { S as CounterpartsScreen, S as default };
|
|
@@ -13,15 +13,12 @@ function s({ labels: s, receiptsContent: c, matchingContent: l, policiesContent:
|
|
|
13
13
|
};
|
|
14
14
|
return /* @__PURE__ */ o("section", {
|
|
15
15
|
className: "ttw:w-full ttw:space-y-5",
|
|
16
|
-
children: [/* @__PURE__ */
|
|
16
|
+
children: [/* @__PURE__ */ a("div", {
|
|
17
17
|
className: "ttw:min-w-0",
|
|
18
|
-
children:
|
|
19
|
-
className: "ttw:text-
|
|
20
|
-
children: f.title
|
|
21
|
-
}), /* @__PURE__ */ a("p", {
|
|
22
|
-
className: "ttw:mt-1 ttw:text-sm ttw:text-muted-foreground",
|
|
18
|
+
children: /* @__PURE__ */ a("p", {
|
|
19
|
+
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
23
20
|
children: f.description
|
|
24
|
-
})
|
|
21
|
+
})
|
|
25
22
|
}), /* @__PURE__ */ o(e, {
|
|
26
23
|
defaultValue: "receipts",
|
|
27
24
|
children: [
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
//#region ../../libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseManagementWidgetUi/labels.js
|
|
2
2
|
var e = {
|
|
3
|
-
title: "Expense management",
|
|
4
3
|
description: "Manage receipts, matching, policies, and requirements.",
|
|
5
4
|
receiptsTab: "Receipts",
|
|
6
5
|
matchingTab: "Matching",
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
//#region ../../libs/tesouro-embedded-components-react/gl-code-table-widget/ui/dist/index2.js
|
|
2
2
|
var e = {
|
|
3
|
-
title: "Chart of accounts",
|
|
4
3
|
subtitle: "An organized list of every account your business uses to record its financial transactions in its general ledger.",
|
|
5
4
|
columnGlCode: "GL code",
|
|
6
5
|
columnName: "Account name",
|