@tesouro/embedded-components-react 0.11.71 → 0.11.72
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 +1 -0
- package/dist/index.css +35 -192
- package/dist/index.d.ts +75 -71
- package/dist/lib/SettingsWidget.d.ts +5 -1
- package/dist/lib/WidgetSuite.d.ts +4 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/feature/dist/index3.js +8 -7
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/feature/dist/index4.js +4 -1
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/feature/dist/index6.js +196 -131
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index3.js +11 -1
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index4.js +5 -3
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index5.js +38 -32
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index6.js +103 -75
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index7.js +140 -168
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index8.js +97 -87
- package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/feature/dist/index7.js +11 -7
- package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/feature/dist/index8.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/ui/dist/index2.js +3 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/ui/dist/index3.js +134 -177
- package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/ui/dist/index4.js +110 -176
- package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/ui/dist/index5.js +28 -38
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/lib/ExpenseSettingsTabs/ExpenseSettingsTabs.js +13 -10
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/lib/SettingsWidget/SettingsWidget.js +28 -24
- package/dist/libs/tesouro-embedded-components-react/settings-widget/help/ui/shadcn/dist/index3.js +35 -31
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/feature/dist/index10.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/feature/dist/index7.js +1 -5
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/feature/dist/index8.js +3 -0
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index11.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index12.js +22 -36
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index16.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index17.js +54 -60
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index20.js +75 -60
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index3.js +42 -27
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index6.js +89 -82
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index9.js +39 -38
- package/dist/libs/tesouro-embedded-components-react/settings-widget/profile/feature/dist/index4.js +32 -32
- package/dist/libs/tesouro-embedded-components-react/settings-widget/profile/ui/dist/index2.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/profile/ui/dist/index3.js +56 -71
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index10.js +3 -0
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index12.js +86 -66
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index13.js +51 -51
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index15.js +146 -132
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index17.js +95 -99
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index3.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index4.js +8 -27
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index5.js +69 -72
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index6.js +51 -51
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index.js +9 -11
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index10.js +83 -298
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index11.js +13 -13
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index12.js +122 -75
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index13.js +41 -15
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index14.js +7 -131
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index15.js +147 -48
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index16.js +240 -11
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index17.js +15 -173
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index2.js +38 -10
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index3.js +5 -46
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index4.js +52 -45
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index5.js +101 -25
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index6.js +40 -98
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index7.js +415 -40
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index8.js +261 -332
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index9.js +15 -8
- package/dist/libs/tesouro-embedded-components-react/settings-widget/ui/dist/lib/SettingsWidgetUi/SettingsWidgetUi.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/ApprovalPoliciesSettings.js +9 -8
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/useApprovalPolicyRules.js +136 -122
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index.js +9 -8
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index11.js +16 -17
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index12.js +99 -100
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index16.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index17.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index18.js +10 -55
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index19.js +34 -8
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index20.js +8 -84
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index21.js +86 -0
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index3.js +13 -13
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index5.js +17 -18
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index7.js +33 -42
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/index.js +24 -24
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/FileDropZone/FileDropZone.js +62 -0
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/LoadingRegion/LoadingRegion.js +1 -0
- package/dist/packages/shared-ui-shadcn/dist/index.js +2301 -2283
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index18.js +0 -291
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index19.js +0 -22
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/avatarSwatch.js +0 -26
|
@@ -2,83 +2,130 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import { Button as e,
|
|
6
|
-
import {
|
|
5
|
+
import { Button as e, ContextMenuItem as t, ContextMenuSeparator as n, DataTable as r, DropdownMenu as i, DropdownMenuContent as a, DropdownMenuItem as o, DropdownMenuSeparator as s, DropdownMenuTrigger as c, Heading as l, Tooltip as u, TooltipContent as d, TooltipProvider as f, TooltipTrigger as p } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
+
import { EmptyState as m } from "../../../../shared/ui/dist/lib/EmptyState/EmptyState.js";
|
|
7
|
+
import { ErrorState as h } from "../../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
|
|
7
8
|
import "../../../../shared/ui/dist/index.js";
|
|
8
|
-
import {
|
|
9
|
-
import { jsx as
|
|
9
|
+
import { DEFAULT_GROUP_ADMIN_PANEL_LABELS as g } from "./index11.js";
|
|
10
|
+
import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
11
|
+
import { MoreVertical as b, Pencil as x, Trash2 as S } from "lucide-react";
|
|
10
12
|
// ../../libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index12.js
|
|
11
|
-
function
|
|
12
|
-
let
|
|
13
|
-
...
|
|
14
|
-
...
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
onSubmit: (e) => {
|
|
26
|
-
e.preventDefault(), w();
|
|
27
|
-
},
|
|
28
|
-
children: [/* @__PURE__ */ p("div", {
|
|
29
|
-
className: "ttw:flex-1 ttw:space-y-5 ttw:px-4 ttw:py-2",
|
|
30
|
-
children: [
|
|
31
|
-
/* @__PURE__ */ p("div", {
|
|
32
|
-
className: "ttw:space-y-2",
|
|
33
|
-
children: [/* @__PURE__ */ f(r, {
|
|
34
|
-
htmlFor: "group-admin-name",
|
|
35
|
-
children: D.nameLabel
|
|
36
|
-
}), /* @__PURE__ */ f(n, {
|
|
37
|
-
id: "group-admin-name",
|
|
38
|
-
value: g,
|
|
39
|
-
placeholder: D.namePlaceholder,
|
|
40
|
-
onChange: (e) => _(e.target.value)
|
|
41
|
-
})]
|
|
42
|
-
}),
|
|
43
|
-
/* @__PURE__ */ p("div", {
|
|
44
|
-
className: "ttw:space-y-2",
|
|
45
|
-
children: [/* @__PURE__ */ f(r, { children: D.membersLabel }), /* @__PURE__ */ f(t, {
|
|
46
|
-
multiple: !0,
|
|
47
|
-
items: v,
|
|
48
|
-
value: y,
|
|
49
|
-
labels: {
|
|
50
|
-
placeholder: D.membersSearchPlaceholder,
|
|
51
|
-
emptyMessage: D.membersEmptyMessage
|
|
52
|
-
},
|
|
53
|
-
onValueChange: b
|
|
54
|
-
})]
|
|
55
|
-
}),
|
|
56
|
-
S ? /* @__PURE__ */ f(u, { children: S }) : null
|
|
57
|
-
]
|
|
58
|
-
}), /* @__PURE__ */ p(s, {
|
|
59
|
-
className: "ttw:flex-row ttw:items-center ttw:justify-between",
|
|
60
|
-
children: [h && T ? /* @__PURE__ */ f(e, {
|
|
61
|
-
type: "button",
|
|
62
|
-
variant: "ghost",
|
|
63
|
-
className: "ttw:px-0 ttw:text-destructive ttw:hover:bg-transparent ttw:hover:text-destructive",
|
|
64
|
-
onClick: T,
|
|
65
|
-
children: D.deleteButton
|
|
66
|
-
}) : /* @__PURE__ */ f("span", {}), /* @__PURE__ */ p("div", {
|
|
67
|
-
className: "ttw:flex ttw:items-center ttw:gap-2",
|
|
68
|
-
children: [/* @__PURE__ */ f(e, {
|
|
69
|
-
type: "button",
|
|
70
|
-
variant: "ghost",
|
|
71
|
-
onClick: () => C(!1),
|
|
72
|
-
children: D.cancelButton
|
|
73
|
-
}), /* @__PURE__ */ f(e, {
|
|
74
|
-
type: "submit",
|
|
75
|
-
disabled: x,
|
|
76
|
-
children: D.saveButton
|
|
77
|
-
})]
|
|
78
|
-
})]
|
|
79
|
-
})]
|
|
80
|
-
})]
|
|
13
|
+
function C({ rows: C, isLoading: w = !1, isError: T = !1, onAddClick: E, labels: D }) {
|
|
14
|
+
let O = {
|
|
15
|
+
...g,
|
|
16
|
+
...D
|
|
17
|
+
}, k = (t) => t.onEdit || t.onDelete ? /* @__PURE__ */ y(i, { children: [/* @__PURE__ */ v(f, { children: /* @__PURE__ */ y(u, { children: [/* @__PURE__ */ v(p, {
|
|
18
|
+
asChild: !0,
|
|
19
|
+
children: /* @__PURE__ */ v(c, {
|
|
20
|
+
asChild: !0,
|
|
21
|
+
children: /* @__PURE__ */ v(e, {
|
|
22
|
+
variant: "ghost",
|
|
23
|
+
size: "icon-sm",
|
|
24
|
+
"aria-label": `${O.rowActionsAriaLabel} ${t.name}`,
|
|
25
|
+
children: /* @__PURE__ */ v(b, { className: "ttw:size-4" })
|
|
26
|
+
})
|
|
81
27
|
})
|
|
28
|
+
}), /* @__PURE__ */ v(d, { children: `${O.rowActionsAriaLabel} ${t.name}` })] }) }), /* @__PURE__ */ y(a, {
|
|
29
|
+
align: "end",
|
|
30
|
+
children: [
|
|
31
|
+
t.onEdit && /* @__PURE__ */ y(o, {
|
|
32
|
+
onClick: t.onEdit,
|
|
33
|
+
children: [/* @__PURE__ */ v(x, { className: "ttw:size-4" }), O.editAction]
|
|
34
|
+
}),
|
|
35
|
+
t.onEdit && t.onDelete && /* @__PURE__ */ v(s, {}),
|
|
36
|
+
t.onDelete && /* @__PURE__ */ y(o, {
|
|
37
|
+
variant: "destructive",
|
|
38
|
+
onClick: t.onDelete,
|
|
39
|
+
children: [/* @__PURE__ */ v(S, { className: "ttw:size-4" }), O.deleteAction]
|
|
40
|
+
})
|
|
41
|
+
]
|
|
42
|
+
})] }) : null, A = [
|
|
43
|
+
{
|
|
44
|
+
id: "name",
|
|
45
|
+
header: O.nameColumn,
|
|
46
|
+
cell: ({ row: e }) => /* @__PURE__ */ v("span", {
|
|
47
|
+
className: "ttw:block ttw:max-w-50 ttw:truncate",
|
|
48
|
+
title: e.original.name,
|
|
49
|
+
children: e.original.name
|
|
50
|
+
})
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
id: "members",
|
|
54
|
+
header: O.assignedColumn,
|
|
55
|
+
cell: ({ row: e }) => e.original.membersLabel
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
id: "actions",
|
|
59
|
+
header: O.actionsColumn,
|
|
60
|
+
cell: ({ row: e }) => k(e.original),
|
|
61
|
+
meta: { fitContent: !0 }
|
|
62
|
+
}
|
|
63
|
+
];
|
|
64
|
+
return /* @__PURE__ */ y("section", {
|
|
65
|
+
"aria-label": O.title,
|
|
66
|
+
"aria-busy": w || void 0,
|
|
67
|
+
className: "ttw:overflow-hidden ttw:rounded-md",
|
|
68
|
+
children: [/* @__PURE__ */ y("div", {
|
|
69
|
+
className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-4 ttw:border-b ttw:border-border ttw:p-3",
|
|
70
|
+
children: [/* @__PURE__ */ v(l, {
|
|
71
|
+
variant: "section",
|
|
72
|
+
children: O.title
|
|
73
|
+
}), E && (C.length > 0 || w || T) && /* @__PURE__ */ v(e, {
|
|
74
|
+
size: "sm",
|
|
75
|
+
disabled: w,
|
|
76
|
+
onClick: E,
|
|
77
|
+
children: O.addButton
|
|
78
|
+
})]
|
|
79
|
+
}), /* @__PURE__ */ v(r, {
|
|
80
|
+
columns: A,
|
|
81
|
+
data: T ? [] : C,
|
|
82
|
+
sorting: [],
|
|
83
|
+
onSortingChange: () => void 0,
|
|
84
|
+
pageSize: Math.max(C.length, 4),
|
|
85
|
+
pageSizeOptions: [4],
|
|
86
|
+
onPageSizeChange: () => void 0,
|
|
87
|
+
onNextPage: () => void 0,
|
|
88
|
+
onPrevPage: () => void 0,
|
|
89
|
+
showPagination: !1,
|
|
90
|
+
isLoading: w && !T,
|
|
91
|
+
labels: { loading: O.loadingLabel },
|
|
92
|
+
framed: !1,
|
|
93
|
+
getRowId: (e) => e.key,
|
|
94
|
+
rowContextMenu: (e) => e.onEdit || e.onDelete ? /* @__PURE__ */ y(_, { children: [
|
|
95
|
+
e.onEdit && /* @__PURE__ */ v(t, {
|
|
96
|
+
onClick: e.onEdit,
|
|
97
|
+
children: O.editAction
|
|
98
|
+
}),
|
|
99
|
+
e.onEdit && e.onDelete && /* @__PURE__ */ v(n, {}),
|
|
100
|
+
e.onDelete && /* @__PURE__ */ v(t, {
|
|
101
|
+
variant: "destructive",
|
|
102
|
+
onClick: e.onDelete,
|
|
103
|
+
children: O.deleteAction
|
|
104
|
+
})
|
|
105
|
+
] }) : void 0,
|
|
106
|
+
renderCard: !T && C.length > 0 ? (e) => /* @__PURE__ */ y("div", {
|
|
107
|
+
className: "ttw:flex ttw:items-start ttw:justify-between ttw:gap-4",
|
|
108
|
+
children: [/* @__PURE__ */ y("div", {
|
|
109
|
+
className: "ttw:flex ttw:min-w-0 ttw:flex-col ttw:gap-1",
|
|
110
|
+
children: [/* @__PURE__ */ v("span", {
|
|
111
|
+
className: "ttw:truncate",
|
|
112
|
+
title: e.name,
|
|
113
|
+
children: e.name
|
|
114
|
+
}), /* @__PURE__ */ v("span", {
|
|
115
|
+
className: "ttw:text-muted-foreground",
|
|
116
|
+
children: e.membersLabel
|
|
117
|
+
})]
|
|
118
|
+
}), k(e)]
|
|
119
|
+
}) : void 0,
|
|
120
|
+
children: T ? /* @__PURE__ */ v(h, {
|
|
121
|
+
title: O.errorTitle,
|
|
122
|
+
description: O.errorDescription
|
|
123
|
+
}) : /* @__PURE__ */ v(m, {
|
|
124
|
+
title: O.emptyMessage,
|
|
125
|
+
actionLabel: O.addButton,
|
|
126
|
+
onAction: E
|
|
127
|
+
})
|
|
128
|
+
})]
|
|
82
129
|
});
|
|
83
130
|
}
|
|
84
|
-
export {
|
|
131
|
+
export { C as GroupAdminPanel, C as default };
|
|
@@ -1,16 +1,42 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { ConfirmDialog as e } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
+
import { InlineErrorAlert as t } from "../../../../shared/ui/dist/lib/InlineErrorAlert/InlineErrorAlert.js";
|
|
7
|
+
import "../../../../shared/ui/dist/index.js";
|
|
8
|
+
import { DEFAULT_LABELS as n } from "./index5.js";
|
|
9
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
1
10
|
// ../../libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index13.js
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
function i({ open: i, icon: a, title: o, description: s, subjectName: c, subjectDetail: l, confirmButtonLabel: u, confirmVariant: d = "destructive", errorMessage: f, isConfirming: p = !1, onOpenChange: m, onConfirm: h, labels: g }) {
|
|
12
|
+
let _ = {
|
|
13
|
+
...n,
|
|
14
|
+
...g
|
|
15
|
+
};
|
|
16
|
+
return /* @__PURE__ */ r(e, {
|
|
17
|
+
open: i,
|
|
18
|
+
onOpenChange: (e) => {
|
|
19
|
+
p || m(e);
|
|
20
|
+
},
|
|
21
|
+
title: o,
|
|
22
|
+
description: s,
|
|
23
|
+
icon: d === "destructive" ? a : void 0,
|
|
24
|
+
details: [...c ? [{
|
|
25
|
+
label: _.detailsNameLabel,
|
|
26
|
+
value: c
|
|
27
|
+
}] : [], ...l ? [{
|
|
28
|
+
label: _.detailsEmailLabel,
|
|
29
|
+
value: l
|
|
30
|
+
}] : []],
|
|
31
|
+
destructive: d === "destructive",
|
|
32
|
+
loading: p,
|
|
33
|
+
onConfirm: h,
|
|
34
|
+
labels: {
|
|
35
|
+
confirm: u,
|
|
36
|
+
cancel: _.actionDialogCancelButton,
|
|
37
|
+
close: _.actionDialogCloseButton
|
|
38
|
+
},
|
|
39
|
+
children: f && /* @__PURE__ */ r(t, { children: f })
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
export { i as TeamActionDialog, i as default };
|
|
@@ -1,134 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
"use client";
|
|
4
|
-
"use client";
|
|
5
|
-
import { Button as e, DropdownMenu as t, DropdownMenuContent as n, DropdownMenuItem as r, DropdownMenuTrigger as i, Skeleton as a } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
-
import { AvatarStack as o } from "./index5.js";
|
|
7
|
-
import { DEFAULT_GROUP_ADMIN_PANEL_LABELS as s } from "./index13.js";
|
|
8
|
-
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
9
|
-
import { MoreVertical as u, Pencil as d, Plus as f, Trash2 as p } from "lucide-react";
|
|
1
|
+
import { Badge as e } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
10
3
|
// ../../libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index14.js
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
...b
|
|
16
|
-
};
|
|
17
|
-
return /* @__PURE__ */ l("section", {
|
|
18
|
-
"aria-label": x.title,
|
|
19
|
-
"aria-busy": _ || void 0,
|
|
20
|
-
className: "ttw:overflow-hidden ttw:rounded-md",
|
|
21
|
-
children: [
|
|
22
|
-
/* @__PURE__ */ l("div", {
|
|
23
|
-
className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-4 ttw:border-b ttw:border-border ttw:p-3",
|
|
24
|
-
children: [/* @__PURE__ */ c("h2", {
|
|
25
|
-
className: "ttw:text-lg ttw:font-semibold ttw:text-foreground",
|
|
26
|
-
children: x.title
|
|
27
|
-
}), y && /* @__PURE__ */ l(e, {
|
|
28
|
-
size: "sm",
|
|
29
|
-
disabled: _,
|
|
30
|
-
onClick: y,
|
|
31
|
-
children: [/* @__PURE__ */ c(f, {
|
|
32
|
-
"aria-hidden": !0,
|
|
33
|
-
className: "ttw:size-4"
|
|
34
|
-
}), x.addButton]
|
|
35
|
-
})]
|
|
36
|
-
}),
|
|
37
|
-
/* @__PURE__ */ l("div", {
|
|
38
|
-
className: "ttw:grid ttw:grid-cols-[2fr_2fr_80px] ttw:items-center ttw:gap-4 ttw:border-b ttw:border-border ttw:px-4 ttw:py-2.5",
|
|
39
|
-
role: "row",
|
|
40
|
-
children: [
|
|
41
|
-
/* @__PURE__ */ c("span", {
|
|
42
|
-
className: "ttw:text-sm ttw:font-medium ttw:text-foreground",
|
|
43
|
-
children: x.nameColumn
|
|
44
|
-
}),
|
|
45
|
-
/* @__PURE__ */ c("span", {
|
|
46
|
-
className: "ttw:text-sm ttw:font-medium ttw:text-foreground",
|
|
47
|
-
children: x.assignedColumn
|
|
48
|
-
}),
|
|
49
|
-
/* @__PURE__ */ c("span", {
|
|
50
|
-
className: "ttw:text-right ttw:text-sm ttw:font-medium ttw:text-foreground",
|
|
51
|
-
children: x.actionsColumn
|
|
52
|
-
})
|
|
53
|
-
]
|
|
54
|
-
}),
|
|
55
|
-
v ? /* @__PURE__ */ l("div", {
|
|
56
|
-
className: "ttw:flex ttw:flex-col ttw:items-center ttw:justify-center ttw:px-4 ttw:py-14 ttw:text-center",
|
|
57
|
-
children: [/* @__PURE__ */ c("h3", {
|
|
58
|
-
className: "ttw:mb-2 ttw:text-lg ttw:font-bold ttw:tracking-tight ttw:text-foreground",
|
|
59
|
-
children: x.errorTitle
|
|
60
|
-
}), /* @__PURE__ */ c("p", {
|
|
61
|
-
className: "ttw:max-w-sm ttw:text-sm ttw:text-muted-foreground",
|
|
62
|
-
children: x.errorDescription
|
|
63
|
-
})]
|
|
64
|
-
}) : _ ? /* @__PURE__ */ c("div", {
|
|
65
|
-
"aria-label": x.loadingLabel,
|
|
66
|
-
role: "status",
|
|
67
|
-
children: Array.from({ length: m }).map((e, t) => /* @__PURE__ */ l("div", {
|
|
68
|
-
className: "ttw:grid ttw:grid-cols-[2fr_2fr_80px] ttw:items-center ttw:gap-4 ttw:px-4 ttw:py-3",
|
|
69
|
-
children: [
|
|
70
|
-
/* @__PURE__ */ c(a, { className: "ttw:h-4 ttw:w-40" }),
|
|
71
|
-
/* @__PURE__ */ c(a, { className: "ttw:h-4 ttw:w-24" }),
|
|
72
|
-
/* @__PURE__ */ c("div", {
|
|
73
|
-
className: "ttw:flex ttw:justify-end",
|
|
74
|
-
children: /* @__PURE__ */ c(a, { className: "ttw:size-8 ttw:rounded-full" })
|
|
75
|
-
})
|
|
76
|
-
]
|
|
77
|
-
}, t))
|
|
78
|
-
}) : h.length === 0 ? /* @__PURE__ */ c("div", {
|
|
79
|
-
className: "ttw:px-4 ttw:py-12 ttw:text-center ttw:text-sm ttw:text-muted-foreground",
|
|
80
|
-
children: x.emptyMessage
|
|
81
|
-
}) : /* @__PURE__ */ c("div", {
|
|
82
|
-
className: "ttw:divide-y ttw:divide-border",
|
|
83
|
-
children: h.map((a) => /* @__PURE__ */ l("div", {
|
|
84
|
-
className: "ttw:grid ttw:grid-cols-[2fr_2fr_80px] ttw:items-center ttw:gap-4 ttw:px-4 ttw:py-3",
|
|
85
|
-
children: [
|
|
86
|
-
/* @__PURE__ */ l("div", {
|
|
87
|
-
className: "ttw:flex ttw:items-center ttw:gap-2",
|
|
88
|
-
children: [/* @__PURE__ */ c("span", {
|
|
89
|
-
"aria-hidden": !0,
|
|
90
|
-
className: "ttw:text-muted-foreground",
|
|
91
|
-
children: g
|
|
92
|
-
}), /* @__PURE__ */ c("span", {
|
|
93
|
-
className: "ttw:text-sm ttw:font-medium ttw:text-foreground ttw:first-letter:uppercase",
|
|
94
|
-
children: a.name
|
|
95
|
-
})]
|
|
96
|
-
}),
|
|
97
|
-
a.assignedAvatars && a.assignedAvatars.length > 0 ? /* @__PURE__ */ c(o, {
|
|
98
|
-
items: a.assignedAvatars,
|
|
99
|
-
overflowLabel: a.assignedOverflowLabel,
|
|
100
|
-
label: a.membersLabel
|
|
101
|
-
}) : /* @__PURE__ */ c("span", {
|
|
102
|
-
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
103
|
-
children: a.membersLabel
|
|
104
|
-
}),
|
|
105
|
-
/* @__PURE__ */ c("div", {
|
|
106
|
-
className: "ttw:flex ttw:justify-end",
|
|
107
|
-
children: a.onEdit || a.onDelete ? /* @__PURE__ */ l(t, { children: [/* @__PURE__ */ c(i, {
|
|
108
|
-
asChild: !0,
|
|
109
|
-
children: /* @__PURE__ */ c(e, {
|
|
110
|
-
variant: "ghost",
|
|
111
|
-
size: "icon-sm",
|
|
112
|
-
className: "ttw:text-muted-foreground",
|
|
113
|
-
"aria-label": `${x.rowActionsAriaLabel} ${a.name}`,
|
|
114
|
-
children: /* @__PURE__ */ c(u, { className: "ttw:size-4" })
|
|
115
|
-
})
|
|
116
|
-
}), /* @__PURE__ */ l(n, {
|
|
117
|
-
align: "end",
|
|
118
|
-
className: "ttw:min-w-44",
|
|
119
|
-
children: [a.onEdit ? /* @__PURE__ */ l(r, {
|
|
120
|
-
onClick: a.onEdit,
|
|
121
|
-
children: [/* @__PURE__ */ c(d, { className: "ttw:size-4" }), x.editAction]
|
|
122
|
-
}) : null, a.onDelete ? /* @__PURE__ */ l(r, {
|
|
123
|
-
onClick: a.onDelete,
|
|
124
|
-
children: [/* @__PURE__ */ c(p, { className: "ttw:size-4 ttw:text-destructive" }), x.deleteAction]
|
|
125
|
-
}) : null]
|
|
126
|
-
})] }) : null
|
|
127
|
-
})
|
|
128
|
-
]
|
|
129
|
-
}, a.key))
|
|
130
|
-
})
|
|
131
|
-
]
|
|
4
|
+
function n({ label: n }) {
|
|
5
|
+
return /* @__PURE__ */ t(e, {
|
|
6
|
+
variant: "secondary",
|
|
7
|
+
children: n
|
|
132
8
|
});
|
|
133
9
|
}
|
|
134
|
-
export {
|
|
10
|
+
export { n as AuthorizedSignerBadge };
|
|
@@ -2,57 +2,156 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { Badge as e, Button as t, DataTable as n, cn as r } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
+
import { EmptyState as i } from "../../../../shared/ui/dist/lib/EmptyState/EmptyState.js";
|
|
7
|
+
import { ErrorState as a } from "../../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
|
|
7
8
|
import "../../../../shared/ui/dist/index.js";
|
|
8
|
-
import { DEFAULT_LABELS as
|
|
9
|
+
import { DEFAULT_LABELS as o } from "./index5.js";
|
|
10
|
+
import { AuthorizedSignerBadge as s } from "./index14.js";
|
|
11
|
+
import { useEffect as c, useRef as l } from "react";
|
|
9
12
|
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
10
13
|
// ../../libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index15.js
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
14
|
+
var f = [
|
|
15
|
+
5,
|
|
16
|
+
10,
|
|
17
|
+
25
|
|
18
|
+
];
|
|
19
|
+
function p({ rows: p, isLoading: m = !1, isError: h = !1, showPagination: g = !1, isPreviousPageDisabled: _ = !1, isNextPageDisabled: v = !1, pageSize: y = 10, pageSizeOptions: b = f, rangeLabel: x = "", onPageSizeChange: S, autoFocusRowKey: C, onPreviousPageClick: w, onNextPageClick: T, onInviteClick: E, labels: D }) {
|
|
20
|
+
let O = {
|
|
21
|
+
...o,
|
|
22
|
+
...D
|
|
23
|
+
}, k = l(null), A = (e) => `${O.viewMember}: ${e.name}, ${e.email}`, j = l(void 0);
|
|
24
|
+
c(() => {
|
|
25
|
+
if (!C || !k.current || j.current === C || m) return;
|
|
26
|
+
j.current = C;
|
|
27
|
+
let e = p.find((e) => e.key === C && !e.isInactive), t = e ? Array.from(k.current.querySelectorAll("[tabindex=\"0\"]")).filter((t) => t.getAttribute("aria-label") === `${O.viewMember}: ${e.name}, ${e.email}`) : [];
|
|
28
|
+
(t.find((e) => e.getClientRects().length > 0) ?? t[0] ?? k.current).focus();
|
|
29
|
+
}, [
|
|
30
|
+
C,
|
|
31
|
+
m,
|
|
32
|
+
p,
|
|
33
|
+
O.viewMember
|
|
34
|
+
]);
|
|
35
|
+
let M = (e) => /* @__PURE__ */ d("div", {
|
|
36
|
+
className: "ttw:min-w-0 ttw:max-w-96",
|
|
37
|
+
children: [/* @__PURE__ */ d("div", {
|
|
38
|
+
className: "ttw:flex ttw:items-center ttw:gap-2",
|
|
39
|
+
children: [/* @__PURE__ */ u("span", {
|
|
40
|
+
className: "ttw:truncate ttw:font-medium",
|
|
41
|
+
title: e.name,
|
|
42
|
+
children: e.name
|
|
43
|
+
}), e.showAuthorizedSignerBadge && /* @__PURE__ */ u(s, { label: O.authorizedSignerBadge })]
|
|
44
|
+
}), /* @__PURE__ */ u("div", {
|
|
45
|
+
className: "ttw:truncate ttw:text-sm ttw:text-muted-foreground",
|
|
46
|
+
title: e.email,
|
|
47
|
+
children: e.email
|
|
48
|
+
})]
|
|
49
|
+
}), N = (t) => t.isInactive ? /* @__PURE__ */ u("span", {
|
|
50
|
+
className: "ttw:text-muted-foreground",
|
|
51
|
+
children: O.inactiveRolePlaceholder
|
|
52
|
+
}) : /* @__PURE__ */ u(e, {
|
|
53
|
+
variant: "secondary",
|
|
54
|
+
children: t.roleLabel
|
|
55
|
+
}), P = [
|
|
56
|
+
{
|
|
57
|
+
id: "name",
|
|
58
|
+
header: O.nameColumn,
|
|
59
|
+
cell: ({ row: e }) => M(e.original)
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
id: "role",
|
|
63
|
+
header: O.roleColumn,
|
|
64
|
+
cell: ({ row: e }) => N(e.original),
|
|
65
|
+
meta: { fitContent: !0 }
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
id: "department",
|
|
69
|
+
header: O.departmentColumn,
|
|
70
|
+
cell: ({ row: e }) => /* @__PURE__ */ u("span", {
|
|
71
|
+
className: "ttw:block ttw:max-w-50 ttw:truncate",
|
|
72
|
+
title: e.original.departmentLabel,
|
|
73
|
+
children: e.original.departmentLabel
|
|
74
|
+
})
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
id: "status",
|
|
78
|
+
header: O.statusColumn,
|
|
79
|
+
cell: ({ row: t }) => /* @__PURE__ */ u(e, {
|
|
80
|
+
tone: t.original.statusTone,
|
|
81
|
+
children: t.original.statusLabel
|
|
82
|
+
}),
|
|
83
|
+
meta: { fitContent: !0 }
|
|
84
|
+
}
|
|
85
|
+
];
|
|
86
|
+
return /* @__PURE__ */ d("section", {
|
|
87
|
+
ref: k,
|
|
88
|
+
tabIndex: -1,
|
|
89
|
+
"aria-label": O.title,
|
|
90
|
+
"aria-busy": m || void 0,
|
|
91
|
+
className: "ttw:overflow-hidden ttw:rounded-md",
|
|
92
|
+
children: [E && (p.length > 0 || m || h) && /* @__PURE__ */ u("div", {
|
|
93
|
+
className: "ttw:flex ttw:justify-end ttw:pb-4",
|
|
94
|
+
children: /* @__PURE__ */ u(t, {
|
|
95
|
+
size: "sm",
|
|
96
|
+
disabled: m,
|
|
97
|
+
onClick: E,
|
|
98
|
+
children: O.inviteButton
|
|
99
|
+
})
|
|
100
|
+
}), /* @__PURE__ */ u(n, {
|
|
101
|
+
columns: P,
|
|
102
|
+
data: h ? [] : p,
|
|
103
|
+
sorting: [],
|
|
104
|
+
onSortingChange: () => void 0,
|
|
105
|
+
pageSize: y,
|
|
106
|
+
pageSizeOptions: b,
|
|
107
|
+
onPageSizeChange: S ?? (() => void 0),
|
|
108
|
+
showPagination: g,
|
|
109
|
+
pageInfo: x,
|
|
110
|
+
hasPrevPage: !_,
|
|
111
|
+
hasNextPage: !v,
|
|
112
|
+
onPrevPage: w,
|
|
113
|
+
onNextPage: T,
|
|
114
|
+
labels: {
|
|
115
|
+
loading: O.loadingLabel,
|
|
116
|
+
rowsPerPage: O.rowsPerPageLabel,
|
|
117
|
+
previousPage: O.previousPageButton,
|
|
118
|
+
nextPage: O.nextPageButton
|
|
119
|
+
},
|
|
120
|
+
isLoading: m && !h,
|
|
121
|
+
framed: !1,
|
|
122
|
+
getRowId: (e) => e.key,
|
|
123
|
+
onRowClick: (e) => e.onSelect(),
|
|
124
|
+
rowAriaLabel: A,
|
|
125
|
+
isRowActionable: (e) => !e.isInactive,
|
|
126
|
+
rowClassName: (e) => e.isInactive ? "ttw:cursor-default ttw:opacity-50 ttw:hover:bg-transparent" : void 0,
|
|
127
|
+
renderCard: !h && p.length > 0 ? (t) => /* @__PURE__ */ d("div", {
|
|
128
|
+
className: r("ttw:flex ttw:flex-col ttw:gap-2", t.isInactive && "ttw:opacity-50"),
|
|
129
|
+
children: [
|
|
130
|
+
M(t),
|
|
131
|
+
/* @__PURE__ */ d("div", {
|
|
132
|
+
className: "ttw:flex ttw:flex-wrap ttw:gap-2",
|
|
133
|
+
children: [N(t), /* @__PURE__ */ u(e, {
|
|
134
|
+
tone: t.statusTone,
|
|
135
|
+
children: t.statusLabel
|
|
136
|
+
})]
|
|
137
|
+
}),
|
|
138
|
+
/* @__PURE__ */ u("span", {
|
|
139
|
+
className: "ttw:truncate",
|
|
140
|
+
title: t.departmentLabel,
|
|
141
|
+
children: t.departmentLabel
|
|
28
142
|
})
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
children: _
|
|
42
|
-
})]
|
|
43
|
-
}),
|
|
44
|
-
b && /* @__PURE__ */ u(c, { children: b }),
|
|
45
|
-
/* @__PURE__ */ d(i, { children: [/* @__PURE__ */ u(t, {
|
|
46
|
-
disabled: x,
|
|
47
|
-
children: T.actionDialogCancelButton
|
|
48
|
-
}), /* @__PURE__ */ u(s, {
|
|
49
|
-
variant: y,
|
|
50
|
-
loading: x,
|
|
51
|
-
onClick: C,
|
|
52
|
-
children: v
|
|
53
|
-
})] })
|
|
54
|
-
]
|
|
55
|
-
})
|
|
143
|
+
]
|
|
144
|
+
}) : void 0,
|
|
145
|
+
children: h ? /* @__PURE__ */ u(a, {
|
|
146
|
+
title: O.errorTitle,
|
|
147
|
+
description: O.errorDescription
|
|
148
|
+
}) : /* @__PURE__ */ u(i, {
|
|
149
|
+
title: O.emptyTitle,
|
|
150
|
+
description: O.emptyDescription,
|
|
151
|
+
actionLabel: O.inviteButton,
|
|
152
|
+
onAction: E
|
|
153
|
+
})
|
|
154
|
+
})]
|
|
56
155
|
});
|
|
57
156
|
}
|
|
58
|
-
export {
|
|
157
|
+
export { p as TeamMembersTable, p as default };
|