@tesouro/embedded-components-react 0.3.1 → 0.3.5
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/index10.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +1 -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/feature/dist/index10.js +1 -1
- 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/data-access/dist/lib/rest/zod.gen.js +2781 -2775
- 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/feature/dist/index9.js +2 -2
- 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,65 +1,65 @@
|
|
|
1
|
-
import { Button as e, DataTable as t, InputGroup as n, InputGroupAddon as r, InputGroupInput as i, Select as a, SelectContent as o, SelectItem as s, SelectTrigger as c, SelectValue as l
|
|
2
|
-
import { EmptyState as
|
|
3
|
-
import { ErrorState as
|
|
1
|
+
import { Button as e, DataTable as t, InputGroup as n, InputGroupAddon as r, InputGroupInput 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 { EmptyState as u } from "../../../shared/ui/dist/lib/EmptyState/EmptyState.js";
|
|
3
|
+
import { ErrorState as d } from "../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
|
|
4
4
|
import "../../../shared/ui/dist/index.js";
|
|
5
|
-
import { PRODUCTS_SCREEN_LABELS_EN as
|
|
6
|
-
import { ProductTypeBadge as
|
|
7
|
-
import { jsx as
|
|
8
|
-
import { ArrowDownIcon as
|
|
5
|
+
import { PRODUCTS_SCREEN_LABELS_EN as f } from "./index2.js";
|
|
6
|
+
import { ProductTypeBadge as p } from "./index3.js";
|
|
7
|
+
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
8
|
+
import { ArrowDownIcon as g, ArrowUpDownIcon as _, ArrowUpIcon as v, Plus as y, Search as b } from "lucide-react";
|
|
9
9
|
//#region ../../libs/tesouro-embedded-components-react/products-widget/ui/dist/index4.js
|
|
10
|
-
var
|
|
10
|
+
var x = [
|
|
11
11
|
10,
|
|
12
12
|
25,
|
|
13
13
|
50,
|
|
14
14
|
100
|
|
15
|
-
],
|
|
16
|
-
function
|
|
17
|
-
return /* @__PURE__ */
|
|
15
|
+
], S = "all";
|
|
16
|
+
function C({ labels: e, searchValue: t, onSearchChange: u, typeFilter: d, onTypeFilterChange: f, unitFilter: p, onUnitFilterChange: g, unitOptions: _ }) {
|
|
17
|
+
return /* @__PURE__ */ h("div", {
|
|
18
18
|
className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:gap-2 ttw:px-4",
|
|
19
19
|
children: [
|
|
20
|
-
/* @__PURE__ */
|
|
20
|
+
/* @__PURE__ */ h(n, {
|
|
21
21
|
className: "ttw:w-80",
|
|
22
|
-
children: [/* @__PURE__ */
|
|
22
|
+
children: [/* @__PURE__ */ m(r, {
|
|
23
23
|
align: "inline-start",
|
|
24
|
-
children: /* @__PURE__ */
|
|
25
|
-
}), /* @__PURE__ */
|
|
24
|
+
children: /* @__PURE__ */ m(b, { className: "ttw:size-4" })
|
|
25
|
+
}), /* @__PURE__ */ m(i, {
|
|
26
26
|
"data-has-start-addon": !0,
|
|
27
27
|
placeholder: e.searchPlaceholder,
|
|
28
28
|
value: t,
|
|
29
29
|
onChange: (e) => u(e.target.value)
|
|
30
30
|
})]
|
|
31
31
|
}),
|
|
32
|
-
/* @__PURE__ */
|
|
32
|
+
/* @__PURE__ */ h(a, {
|
|
33
33
|
value: d,
|
|
34
34
|
onValueChange: f,
|
|
35
|
-
children: [/* @__PURE__ */
|
|
35
|
+
children: [/* @__PURE__ */ m(c, {
|
|
36
36
|
className: "ttw:w-44",
|
|
37
|
-
children: /* @__PURE__ */
|
|
38
|
-
}), /* @__PURE__ */
|
|
39
|
-
/* @__PURE__ */
|
|
40
|
-
value:
|
|
37
|
+
children: /* @__PURE__ */ m(l, {})
|
|
38
|
+
}), /* @__PURE__ */ h(o, { children: [
|
|
39
|
+
/* @__PURE__ */ m(s, {
|
|
40
|
+
value: S,
|
|
41
41
|
children: e.typeFilterAll
|
|
42
42
|
}),
|
|
43
|
-
/* @__PURE__ */
|
|
43
|
+
/* @__PURE__ */ m(s, {
|
|
44
44
|
value: "product",
|
|
45
45
|
children: e.typeFilterProduct
|
|
46
46
|
}),
|
|
47
|
-
/* @__PURE__ */
|
|
47
|
+
/* @__PURE__ */ m(s, {
|
|
48
48
|
value: "service",
|
|
49
49
|
children: e.typeFilterService
|
|
50
50
|
})
|
|
51
51
|
] })]
|
|
52
52
|
}),
|
|
53
|
-
/* @__PURE__ */
|
|
53
|
+
/* @__PURE__ */ h(a, {
|
|
54
54
|
value: p,
|
|
55
|
-
onValueChange:
|
|
56
|
-
children: [/* @__PURE__ */
|
|
55
|
+
onValueChange: g,
|
|
56
|
+
children: [/* @__PURE__ */ m(c, {
|
|
57
57
|
className: "ttw:w-44",
|
|
58
|
-
children: /* @__PURE__ */
|
|
59
|
-
}), /* @__PURE__ */
|
|
60
|
-
value:
|
|
58
|
+
children: /* @__PURE__ */ m(l, {})
|
|
59
|
+
}), /* @__PURE__ */ h(o, { children: [/* @__PURE__ */ m(s, {
|
|
60
|
+
value: S,
|
|
61
61
|
children: e.unitFilterAll
|
|
62
|
-
}), _.map((e) => /* @__PURE__ */
|
|
62
|
+
}), _.map((e) => /* @__PURE__ */ m(s, {
|
|
63
63
|
value: e.value,
|
|
64
64
|
children: e.label
|
|
65
65
|
}, e.value))] })]
|
|
@@ -67,41 +67,41 @@ function w({ labels: e, searchValue: t, onSearchChange: u, typeFilter: d, onType
|
|
|
67
67
|
]
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
|
-
function
|
|
71
|
-
let
|
|
72
|
-
...
|
|
73
|
-
...
|
|
74
|
-
},
|
|
70
|
+
function w({ products: n, isLoading: r, isError: i, sorting: a, onSortingChange: o, pageSize: s, onPageSizeChange: c, pageSizeOptions: l = x, hasNextPage: b, hasPrevPage: S, onNextPage: w, onPrevPage: T, searchValue: E, onSearchChange: D, typeFilter: O, onTypeFilterChange: k, unitFilter: A, onUnitFilterChange: j, unitOptions: M, isFiltering: N, onCreateClick: P, onManageUnitsClick: F, onRowClick: I, onRetry: L, labels: R, emptyStateTestId: z }) {
|
|
71
|
+
let B = {
|
|
72
|
+
...f,
|
|
73
|
+
...R
|
|
74
|
+
}, V = [
|
|
75
75
|
{
|
|
76
76
|
accessorKey: "name",
|
|
77
77
|
enableSorting: !0,
|
|
78
78
|
header: ({ column: t }) => {
|
|
79
79
|
let n = t.getIsSorted();
|
|
80
|
-
return /* @__PURE__ */
|
|
80
|
+
return /* @__PURE__ */ h("div", {
|
|
81
81
|
className: "ttw:flex ttw:items-center ttw:gap-2 ttw:text-inherit",
|
|
82
|
-
children: [
|
|
82
|
+
children: [B.columnName, /* @__PURE__ */ m(e, {
|
|
83
83
|
variant: "ghost",
|
|
84
84
|
size: "icon-sm",
|
|
85
85
|
onClick: () => t.toggleSorting(n === "asc"),
|
|
86
|
-
children:
|
|
86
|
+
children: m(n === "asc" ? v : n === "desc" ? g : _, { className: "ttw:size-4" })
|
|
87
87
|
})]
|
|
88
88
|
});
|
|
89
89
|
}
|
|
90
90
|
},
|
|
91
91
|
{
|
|
92
92
|
accessorKey: "type",
|
|
93
|
-
header:
|
|
94
|
-
cell: ({ row: e }) => e.original.type ? /* @__PURE__ */
|
|
93
|
+
header: B.columnType,
|
|
94
|
+
cell: ({ row: e }) => e.original.type ? /* @__PURE__ */ m(p, {
|
|
95
95
|
type: e.original.type,
|
|
96
|
-
labels:
|
|
96
|
+
labels: B.typeBadge
|
|
97
97
|
}) : null
|
|
98
98
|
},
|
|
99
99
|
{
|
|
100
100
|
accessorKey: "description",
|
|
101
|
-
header:
|
|
102
|
-
cell: ({ row: e }) => /* @__PURE__ */
|
|
101
|
+
header: B.columnDescription,
|
|
102
|
+
cell: ({ row: e }) => /* @__PURE__ */ m("div", {
|
|
103
103
|
className: "ttw:w-120",
|
|
104
|
-
children: /* @__PURE__ */
|
|
104
|
+
children: /* @__PURE__ */ m("span", {
|
|
105
105
|
className: "ttw:w-full ttw:inline-block ttw:truncate",
|
|
106
106
|
children: e.original.description
|
|
107
107
|
})
|
|
@@ -109,47 +109,42 @@ function T({ products: n, isLoading: r, isError: i, sorting: a, onSortingChange:
|
|
|
109
109
|
},
|
|
110
110
|
{
|
|
111
111
|
accessorKey: "priceLabel",
|
|
112
|
-
header: () => /* @__PURE__ */
|
|
112
|
+
header: () => /* @__PURE__ */ m("div", {
|
|
113
113
|
className: "ttw:text-right",
|
|
114
|
-
children:
|
|
114
|
+
children: B.columnPrice
|
|
115
115
|
}),
|
|
116
|
-
cell: ({ row: e }) => /* @__PURE__ */
|
|
116
|
+
cell: ({ row: e }) => /* @__PURE__ */ h("div", {
|
|
117
117
|
className: "ttw:flex ttw:justify-end ttw:items-center ttw:gap-1",
|
|
118
|
-
children: [/* @__PURE__ */
|
|
118
|
+
children: [/* @__PURE__ */ m("span", { children: e.original.priceLabel }), e.original.unitLabel && /* @__PURE__ */ m("span", {
|
|
119
119
|
className: "ttw:text-muted-foreground ttw:text-xs",
|
|
120
120
|
children: e.original.unitLabel
|
|
121
121
|
})]
|
|
122
122
|
})
|
|
123
123
|
}
|
|
124
124
|
];
|
|
125
|
-
return /* @__PURE__ */
|
|
125
|
+
return /* @__PURE__ */ h("div", {
|
|
126
126
|
className: "ttw:flex ttw:flex-col ttw:gap-4",
|
|
127
|
-
children: [/* @__PURE__ */
|
|
128
|
-
className: "ttw:flex ttw:items-center ttw:justify-
|
|
129
|
-
children:
|
|
130
|
-
component: "h2",
|
|
131
|
-
variant: "h6",
|
|
132
|
-
className: "ttw:font-semibold",
|
|
133
|
-
children: V.title
|
|
134
|
-
}), /* @__PURE__ */ g("div", {
|
|
127
|
+
children: [/* @__PURE__ */ m("div", {
|
|
128
|
+
className: "ttw:flex ttw:items-center ttw:justify-end",
|
|
129
|
+
children: /* @__PURE__ */ h("div", {
|
|
135
130
|
className: "ttw:flex ttw:gap-2",
|
|
136
|
-
children: [/* @__PURE__ */
|
|
131
|
+
children: [/* @__PURE__ */ m(e, {
|
|
137
132
|
variant: "ghost",
|
|
138
133
|
className: "ttw:text-primary ttw:hover:text-primary",
|
|
139
|
-
onClick: I,
|
|
140
|
-
children: V.manageUnitsButton
|
|
141
|
-
}), /* @__PURE__ */ g(e, {
|
|
142
134
|
onClick: F,
|
|
143
|
-
children:
|
|
135
|
+
children: B.manageUnitsButton
|
|
136
|
+
}), /* @__PURE__ */ h(e, {
|
|
137
|
+
onClick: P,
|
|
138
|
+
children: [/* @__PURE__ */ m(y, { className: "ttw:size-4" }), B.createButton]
|
|
144
139
|
})]
|
|
145
|
-
})
|
|
146
|
-
}), i ? /* @__PURE__ */
|
|
147
|
-
title:
|
|
148
|
-
description:
|
|
149
|
-
retryLabel:
|
|
150
|
-
onRetry:
|
|
151
|
-
}) : /* @__PURE__ */
|
|
152
|
-
columns:
|
|
140
|
+
})
|
|
141
|
+
}), i ? /* @__PURE__ */ m(d, {
|
|
142
|
+
title: B.errorTitle,
|
|
143
|
+
description: B.errorDescription,
|
|
144
|
+
retryLabel: L ? B.errorRetry : void 0,
|
|
145
|
+
onRetry: L
|
|
146
|
+
}) : /* @__PURE__ */ m(t, {
|
|
147
|
+
columns: V,
|
|
153
148
|
data: n,
|
|
154
149
|
isLoading: r,
|
|
155
150
|
sorting: a,
|
|
@@ -157,30 +152,30 @@ function T({ products: n, isLoading: r, isError: i, sorting: a, onSortingChange:
|
|
|
157
152
|
pageSize: s,
|
|
158
153
|
onPageSizeChange: c,
|
|
159
154
|
pageSizeOptions: l,
|
|
160
|
-
hasNextPage:
|
|
161
|
-
hasPrevPage:
|
|
162
|
-
onNextPage:
|
|
163
|
-
onPrevPage:
|
|
164
|
-
onRowClick:
|
|
165
|
-
filterComponent: /* @__PURE__ */
|
|
166
|
-
labels:
|
|
167
|
-
searchValue:
|
|
168
|
-
onSearchChange:
|
|
169
|
-
typeFilter:
|
|
170
|
-
onTypeFilterChange:
|
|
171
|
-
unitFilter:
|
|
172
|
-
onUnitFilterChange:
|
|
173
|
-
unitOptions:
|
|
155
|
+
hasNextPage: b,
|
|
156
|
+
hasPrevPage: S,
|
|
157
|
+
onNextPage: w,
|
|
158
|
+
onPrevPage: T,
|
|
159
|
+
onRowClick: I,
|
|
160
|
+
filterComponent: /* @__PURE__ */ m(C, {
|
|
161
|
+
labels: B,
|
|
162
|
+
searchValue: E,
|
|
163
|
+
onSearchChange: D,
|
|
164
|
+
typeFilter: O,
|
|
165
|
+
onTypeFilterChange: k,
|
|
166
|
+
unitFilter: A,
|
|
167
|
+
onUnitFilterChange: j,
|
|
168
|
+
unitOptions: M
|
|
174
169
|
}),
|
|
175
|
-
children: /* @__PURE__ */
|
|
176
|
-
testId:
|
|
177
|
-
title:
|
|
178
|
-
description:
|
|
179
|
-
actionLabel:
|
|
180
|
-
onAction:
|
|
170
|
+
children: /* @__PURE__ */ m(u, {
|
|
171
|
+
testId: z,
|
|
172
|
+
title: N ? B.filterEmptyTitle : B.emptyTitle,
|
|
173
|
+
description: N ? B.filterEmptyDescription : B.emptyDescription,
|
|
174
|
+
actionLabel: N ? void 0 : B.emptyAction,
|
|
175
|
+
onAction: N ? void 0 : P
|
|
181
176
|
})
|
|
182
177
|
})]
|
|
183
178
|
});
|
|
184
179
|
}
|
|
185
180
|
//#endregion
|
|
186
|
-
export {
|
|
181
|
+
export { w as ProductsScreen, w as default };
|
|
@@ -3,42 +3,40 @@
|
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
5
|
import { Tabs as e, TabsContent as t, TabsList as n, TabsTrigger as r } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
-
import {
|
|
7
|
-
import "../../../
|
|
8
|
-
import { ExpenseApprovalPoliciesWidget as a } from "../../../expense-management-widget/feature/dist/index5.js";
|
|
9
|
-
import { ExpenseRequirementsWidget as o } from "../../../expense-requirements-widget/feature/dist/lib/ExpenseRequirementsWidget.js";
|
|
6
|
+
import { ExpenseApprovalPoliciesWidget as i } from "../../../expense-management-widget/feature/dist/index5.js";
|
|
7
|
+
import { ExpenseRequirementsWidget as a } from "../../../expense-requirements-widget/feature/dist/lib/ExpenseRequirementsWidget.js";
|
|
10
8
|
import "../../../expense-requirements-widget/feature/dist/index.js";
|
|
11
9
|
import "../../../expense-management-widget/feature/dist/index.js";
|
|
12
|
-
import { useState as
|
|
13
|
-
import {
|
|
10
|
+
import { useState as o } from "react";
|
|
11
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
14
12
|
//#region ../../libs/tesouro-embedded-components-react/settings-widget/feature/dist/index5.js
|
|
15
|
-
function
|
|
16
|
-
let [
|
|
17
|
-
return /* @__PURE__ */
|
|
13
|
+
function l({ approvalsLabel: l, requirementsLabel: u }) {
|
|
14
|
+
let [d, f] = o("approvals");
|
|
15
|
+
return /* @__PURE__ */ s("div", {
|
|
18
16
|
className: "ttw:rounded-xl ttw:border ttw:border-border ttw:bg-card ttw:p-6",
|
|
19
|
-
children: /* @__PURE__ */
|
|
20
|
-
value:
|
|
21
|
-
onValueChange:
|
|
17
|
+
children: /* @__PURE__ */ c(e, {
|
|
18
|
+
value: d,
|
|
19
|
+
onValueChange: f,
|
|
22
20
|
className: "ttw:w-full ttw:space-y-5",
|
|
23
21
|
children: [
|
|
24
|
-
/* @__PURE__ */
|
|
22
|
+
/* @__PURE__ */ c(n, { children: [/* @__PURE__ */ s(r, {
|
|
25
23
|
value: "approvals",
|
|
26
|
-
children:
|
|
27
|
-
}), /* @__PURE__ */
|
|
24
|
+
children: l
|
|
25
|
+
}), /* @__PURE__ */ s(r, {
|
|
28
26
|
value: "requirements",
|
|
29
|
-
children:
|
|
27
|
+
children: u
|
|
30
28
|
})] }),
|
|
31
|
-
/* @__PURE__ */
|
|
29
|
+
/* @__PURE__ */ s(t, {
|
|
32
30
|
value: "approvals",
|
|
33
|
-
children: /* @__PURE__ */
|
|
31
|
+
children: /* @__PURE__ */ s(i, {})
|
|
34
32
|
}),
|
|
35
|
-
/* @__PURE__ */
|
|
33
|
+
/* @__PURE__ */ s(t, {
|
|
36
34
|
value: "requirements",
|
|
37
|
-
children: /* @__PURE__ */
|
|
35
|
+
children: /* @__PURE__ */ s(a, {})
|
|
38
36
|
})
|
|
39
37
|
]
|
|
40
38
|
})
|
|
41
|
-
})
|
|
39
|
+
});
|
|
42
40
|
}
|
|
43
41
|
//#endregion
|
|
44
|
-
export {
|
|
42
|
+
export { l as ExpenseSettingsTabs, l as default };
|
|
@@ -60,10 +60,7 @@ function C({ labels: t, featureLabels: o, acceptInviteRedirectUri: m, helpContac
|
|
|
60
60
|
{
|
|
61
61
|
id: d.Team,
|
|
62
62
|
label: L.teamSection,
|
|
63
|
-
content: A ?? /* @__PURE__ */ b(_, {
|
|
64
|
-
title: L.teamSection,
|
|
65
|
-
acceptInviteRedirectUri: m
|
|
66
|
-
})
|
|
63
|
+
content: A ?? /* @__PURE__ */ b(_, { acceptInviteRedirectUri: m })
|
|
67
64
|
},
|
|
68
65
|
{
|
|
69
66
|
id: d.Invoice,
|
|
@@ -74,7 +71,6 @@ function C({ labels: t, featureLabels: o, acceptInviteRedirectUri: m, helpContac
|
|
|
74
71
|
id: d.Expense,
|
|
75
72
|
label: L.expenseSection,
|
|
76
73
|
content: N ?? /* @__PURE__ */ b(h, {
|
|
77
|
-
sectionTitle: L.expenseSection,
|
|
78
74
|
approvalsLabel: L.expenseApprovalsTab,
|
|
79
75
|
requirementsLabel: L.expenseRequirementsTab
|
|
80
76
|
})
|
|
@@ -87,7 +83,7 @@ function C({ labels: t, featureLabels: o, acceptInviteRedirectUri: m, helpContac
|
|
|
87
83
|
{
|
|
88
84
|
id: d.Accounting,
|
|
89
85
|
label: L.accountingSection,
|
|
90
|
-
content: P ?? /* @__PURE__ */ b(s, {
|
|
86
|
+
content: P ?? /* @__PURE__ */ b(s, {})
|
|
91
87
|
},
|
|
92
88
|
{
|
|
93
89
|
id: d.Tags,
|
|
@@ -3,49 +3,48 @@
|
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
5
|
import { Tabs as e, TabsContent as t, TabsList as n, TabsTrigger as r } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
6
|
+
import { SectionHeading as i } from "../../../../../shared/ui/dist/lib/SectionHeading/SectionHeading.js";
|
|
7
|
+
import "../../../../../shared/ui/dist/index.js";
|
|
8
|
+
import { DEFAULT_LABELS as a } from "./labels.js";
|
|
9
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
8
10
|
//#region ../../libs/tesouro-embedded-components-react/settings-widget/ui/dist/lib/SettingsWidgetUi/SettingsWidgetUi.js
|
|
9
|
-
function
|
|
10
|
-
let
|
|
11
|
-
...
|
|
12
|
-
...
|
|
11
|
+
function c({ labels: c, sections: l, selectedSectionId: u, onSectionChange: d }) {
|
|
12
|
+
let f = {
|
|
13
|
+
...a,
|
|
14
|
+
...c
|
|
13
15
|
};
|
|
14
|
-
return /* @__PURE__ */
|
|
16
|
+
return /* @__PURE__ */ s("section", {
|
|
15
17
|
className: "ttw:w-full ttw:space-y-5",
|
|
16
|
-
children: [/* @__PURE__ */ o("div", {
|
|
18
|
+
children: [f.description ? /* @__PURE__ */ o("div", {
|
|
17
19
|
className: "ttw:min-w-0",
|
|
18
|
-
children:
|
|
19
|
-
className: "ttw:text-
|
|
20
|
-
children:
|
|
21
|
-
})
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}), /* @__PURE__ */ a(e, {
|
|
26
|
-
value: l,
|
|
27
|
-
onValueChange: u,
|
|
20
|
+
children: /* @__PURE__ */ o("p", {
|
|
21
|
+
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
22
|
+
children: f.description
|
|
23
|
+
})
|
|
24
|
+
}) : null, /* @__PURE__ */ o(e, {
|
|
25
|
+
value: u,
|
|
26
|
+
onValueChange: d,
|
|
28
27
|
className: "ttw:w-full",
|
|
29
|
-
children: /* @__PURE__ */
|
|
28
|
+
children: /* @__PURE__ */ s("div", {
|
|
30
29
|
"data-slot": "settings-widget-layout",
|
|
31
30
|
className: "ttw:flex ttw:w-full ttw:flex-wrap ttw:gap-5",
|
|
32
|
-
children: [/* @__PURE__ */
|
|
31
|
+
children: [/* @__PURE__ */ o("div", {
|
|
33
32
|
"data-slot": "settings-widget-nav",
|
|
34
33
|
className: "ttw:flex ttw:basis-56 ttw:grow-0 ttw:shrink-0 ttw:flex-col ttw:gap-4",
|
|
35
|
-
children: /* @__PURE__ */
|
|
34
|
+
children: /* @__PURE__ */ o(n, {
|
|
36
35
|
className: "ttw:h-auto ttw:w-full ttw:max-w-full ttw:flex-col ttw:items-stretch ttw:justify-start ttw:gap-1 ttw:overflow-x-visible ttw:bg-transparent ttw:p-0",
|
|
37
|
-
children:
|
|
36
|
+
children: l.map((e) => /* @__PURE__ */ o(r, {
|
|
38
37
|
value: e.id,
|
|
39
38
|
className: "ttw:w-full ttw:shrink-0 ttw:justify-start ttw:rounded-md ttw:px-3 ttw:py-2 ttw:hover:bg-muted/60 ttw:data-[state=active]:bg-primary/10 ttw:data-[state=active]:font-medium ttw:data-[state=active]:text-primary ttw:group-data-[variant=default]/tabs-list:data-[state=active]:bg-primary/10 ttw:group-data-[variant=default]/tabs-list:data-[state=active]:shadow-none",
|
|
40
39
|
children: e.label
|
|
41
40
|
}, e.id))
|
|
42
41
|
})
|
|
43
|
-
}), /* @__PURE__ */
|
|
42
|
+
}), /* @__PURE__ */ o("div", {
|
|
44
43
|
"data-slot": "settings-widget-content",
|
|
45
44
|
className: "ttw:min-w-80 ttw:flex-1",
|
|
46
|
-
children:
|
|
45
|
+
children: l.map((e) => /* @__PURE__ */ s(t, {
|
|
47
46
|
value: e.id,
|
|
48
|
-
children: e.content
|
|
47
|
+
children: [/* @__PURE__ */ o(i, { children: e.label }), e.content]
|
|
49
48
|
}, e.id))
|
|
50
49
|
})]
|
|
51
50
|
})
|
|
@@ -53,4 +52,4 @@ function s({ labels: s, sections: c, selectedSectionId: l, onSectionChange: u })
|
|
|
53
52
|
});
|
|
54
53
|
}
|
|
55
54
|
//#endregion
|
|
56
|
-
export {
|
|
55
|
+
export { c as SettingsWidgetUi };
|
package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index11.js
CHANGED
|
@@ -4,7 +4,7 @@ import { useMemo as s } from "react";
|
|
|
4
4
|
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
5
5
|
import { Plus as u } from "lucide-react";
|
|
6
6
|
//#region ../../libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index11.js
|
|
7
|
-
var d = ({ onAddRule: d, addRuleDisabled: f, addRuleDisabledReason: p, labels: m, headingComponent: h = "
|
|
7
|
+
var d = ({ onAddRule: d, addRuleDisabled: f, addRuleDisabledReason: p, labels: m, headingComponent: h = "h2" }) => {
|
|
8
8
|
let g = s(() => ({
|
|
9
9
|
...o,
|
|
10
10
|
...m
|