organify-ui 0.3.7 → 0.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-F7LW2OMM.js → chunk-HFX2XZKZ.js} +4 -14
- package/dist/chunk-HFX2XZKZ.js.map +1 -0
- package/dist/components/chat/index.js +1 -1
- package/dist/index.d.ts +94 -2
- package/dist/index.js +523 -46
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-F7LW2OMM.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Popover, PopoverTrigger, PopoverContent } from './chunk-SAYB3NN2.js';
|
|
2
2
|
export { NotificationBell, NotificationItem, NotificationList, OrganifyNotifications, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PresenceAvatarStack, PresenceIndicator, useNotifications, usePresence } from './chunk-SAYB3NN2.js';
|
|
3
3
|
export { createAiClient, useAiChat, useAiCommand, useAiSuggest, useAiUsage } from './chunk-NV4RWAQ2.js';
|
|
4
|
-
export { I18nProvider, createTranslator, useI18n } from './chunk-FQA33MF4.js';
|
|
5
4
|
export { ThemeProvider, useTheme } from './chunk-RFOKENE3.js';
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
export { I18nProvider, createTranslator, useI18n } from './chunk-FQA33MF4.js';
|
|
6
|
+
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, Drawer, DrawerContent, DrawerHeader, DrawerTitle, DrawerDescription, Separator, ResponsiveDialog, Label, Input, Textarea, Button, Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from './chunk-HFX2XZKZ.js';
|
|
7
|
+
export { AiChatSidebar, Alert, Button, ChatMessages, ChatSidebar, CommandBar, CreateRoomDialog, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, InlineAiButton, Input, Label, MOCK_PROJECTS, MOCK_USERS, OrgLoader, OrgLoaderInline, OrganifyChat, ResponsiveDialog, RoomManagementPanel, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, TypingIndicatorMock, alertVariants, buttonVariants, generateAutoReplies, getMockMentionOptions, getRoomPermissions, inputVariants, orgLoaderVariants, typingIndicator, useAiInline, useChat } from './chunk-HFX2XZKZ.js';
|
|
8
8
|
import { cn, Avatar, AvatarImage, AvatarFallback, TooltipProvider, Tooltip, TooltipTrigger, TooltipContent, Skeleton, useOrganify, useOrganifyGql, ScrollArea, useOrganifyUser, useOrganifyApi, Badge, useOrganifyWorkspace, useOrganifyNavigation, useOrganifyProject } from './chunk-VHQZS77G.js';
|
|
9
9
|
export { Avatar, AvatarFallback, AvatarImage, Badge, OrganifyContext, OrganifyProvider, ScrollArea, ScrollBar, Skeleton, SkeletonCard, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, avatarVariants, badgeVariants, cn, useOrganify, useOrganifyApi, useOrganifyGql, useOrganifyNavigation, useOrganifyProject, useOrganifyRest, useOrganifyUser, useOrganifyWorkspace } from './chunk-VHQZS77G.js';
|
|
10
10
|
import { OrgDiamond, OrgPlus, OrgComment, OrgEdit, OrgTrash, OrgCheckCircle, OrgAttachment, OrgCalendar, OrgMail, OrgBoard, OrgSprint, OrgRocket, OrgWarning, OrgFlag, OrgShield, OrgZap, OrgStar } from './chunk-MZKEDV5W.js';
|
|
@@ -4159,17 +4159,12 @@ function SheetContent({
|
|
|
4159
4159
|
SheetPrimitive.Content,
|
|
4160
4160
|
{
|
|
4161
4161
|
"data-slot": "sheet-content",
|
|
4162
|
-
style: {
|
|
4163
|
-
background: "var(--org-bg-elevated, #110E22)",
|
|
4164
|
-
color: "var(--org-text, #F0ECF9)",
|
|
4165
|
-
borderColor: "var(--org-glass-border, rgba(167,139,250,0.15))"
|
|
4166
|
-
},
|
|
4167
4162
|
className: cn(
|
|
4168
|
-
"data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-
|
|
4169
|
-
side === "right" && "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l
|
|
4170
|
-
side === "left" && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r
|
|
4171
|
-
side === "top" && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b
|
|
4172
|
-
side === "bottom" && "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t
|
|
4163
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-2xl dark:shadow-[0_0_40px_rgba(124,58,237,0.15)] transition ease-[cubic-bezier(0.25,1,0.5,1)] data-[state=closed]:duration-300 data-[state=open]:duration-500 !bg-white dark:!bg-[#0D0A1A] !text-gray-900 dark:!text-gray-100 border-gray-200 dark:!border-gray-800",
|
|
4164
|
+
side === "right" && "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",
|
|
4165
|
+
side === "left" && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
|
|
4166
|
+
side === "top" && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",
|
|
4167
|
+
side === "bottom" && "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",
|
|
4173
4168
|
className
|
|
4174
4169
|
),
|
|
4175
4170
|
...props,
|
|
@@ -5154,6 +5149,7 @@ function getInitials4(name) {
|
|
|
5154
5149
|
function AssigneePicker({
|
|
5155
5150
|
selectedAssignees,
|
|
5156
5151
|
availableUsers,
|
|
5152
|
+
availableGroups = [],
|
|
5157
5153
|
onToggle,
|
|
5158
5154
|
trigger,
|
|
5159
5155
|
disabled = false,
|
|
@@ -5166,12 +5162,51 @@ function AssigneePicker({
|
|
|
5166
5162
|
const filteredUsers = availableUsers.filter(
|
|
5167
5163
|
(user) => user.name.toLowerCase().includes(search.toLowerCase()) || user.email?.toLowerCase().includes(search.toLowerCase())
|
|
5168
5164
|
);
|
|
5165
|
+
const filteredGroups = availableGroups.filter(
|
|
5166
|
+
(group) => group.name.toLowerCase().includes(search.toLowerCase())
|
|
5167
|
+
);
|
|
5168
|
+
const renderItem = (item) => {
|
|
5169
|
+
const isSelected = selectedIds.has(item.id);
|
|
5170
|
+
const isDisabled = !isSelected && !canAddMore;
|
|
5171
|
+
const isGroup = item.type === "GROUP";
|
|
5172
|
+
return /* @__PURE__ */ jsxs(
|
|
5173
|
+
"button",
|
|
5174
|
+
{
|
|
5175
|
+
onClick: () => !isDisabled && onToggle(item),
|
|
5176
|
+
disabled: isDisabled,
|
|
5177
|
+
className: cn(
|
|
5178
|
+
"w-full flex items-center gap-3 px-2 py-2 rounded text-left",
|
|
5179
|
+
"hover:bg-theme-subtle transition-colors",
|
|
5180
|
+
isSelected && "bg-primary/10",
|
|
5181
|
+
isDisabled && "opacity-50 cursor-not-allowed"
|
|
5182
|
+
),
|
|
5183
|
+
children: [
|
|
5184
|
+
/* @__PURE__ */ jsxs(Avatar, { shape: isGroup ? "square" : "circle", size: "sm", className: "w-7 h-7 shrink-0", children: [
|
|
5185
|
+
item.avatarUrl && /* @__PURE__ */ jsx(AvatarImage, { src: item.avatarUrl, alt: item.name }),
|
|
5186
|
+
/* @__PURE__ */ jsx(AvatarFallback, { className: cn(
|
|
5187
|
+
"text-[10px]",
|
|
5188
|
+
isGroup ? "bg-amber-500/20 text-amber-400" : "bg-primary/20 text-primary-light"
|
|
5189
|
+
), children: getInitials4(item.name) })
|
|
5190
|
+
] }),
|
|
5191
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
5192
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
5193
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm text-theme font-medium truncate", children: item.name }),
|
|
5194
|
+
isGroup && /* @__PURE__ */ jsx("span", { className: "text-[10px] px-1.5 py-0.5 rounded bg-amber-500/10 text-amber-400 border border-amber-500/20 uppercase font-bold", children: "Group" })
|
|
5195
|
+
] }),
|
|
5196
|
+
item.email && /* @__PURE__ */ jsx("p", { className: "text-xs text-theme-muted truncate", children: item.email })
|
|
5197
|
+
] }),
|
|
5198
|
+
isSelected && /* @__PURE__ */ jsx(Check, { className: "w-4 h-4 text-primary-light shrink-0" })
|
|
5199
|
+
]
|
|
5200
|
+
},
|
|
5201
|
+
item.id
|
|
5202
|
+
);
|
|
5203
|
+
};
|
|
5169
5204
|
return /* @__PURE__ */ jsxs(Popover, { open, onOpenChange: setOpen, children: [
|
|
5170
5205
|
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, disabled, children: trigger ?? /* @__PURE__ */ jsxs(Button, { variant: "secondary", size: "sm", className: "h-7 px-2 text-xs", children: [
|
|
5171
5206
|
/* @__PURE__ */ jsx(Plus, { className: "w-3 h-3 mr-1" }),
|
|
5172
5207
|
"Adicionar"
|
|
5173
5208
|
] }) }),
|
|
5174
|
-
/* @__PURE__ */ jsxs(PopoverContent, { className: "w-64 p-0", align: "start", children: [
|
|
5209
|
+
/* @__PURE__ */ jsxs(PopoverContent, { className: "w-64 p-0 shadow-glass-xl border-theme-subtle bg-theme-surface/90 backdrop-blur-md", align: "start", children: [
|
|
5175
5210
|
/* @__PURE__ */ jsx("div", { className: "p-2 border-b border-theme-subtle", children: /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
5176
5211
|
/* @__PURE__ */ jsx(Search, { className: "absolute left-2.5 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-theme-muted" }),
|
|
5177
5212
|
/* @__PURE__ */ jsx(
|
|
@@ -5179,41 +5214,23 @@ function AssigneePicker({
|
|
|
5179
5214
|
{
|
|
5180
5215
|
value: search,
|
|
5181
5216
|
onChange: (e) => setSearch(e.target.value),
|
|
5182
|
-
placeholder: "Buscar
|
|
5183
|
-
className: "h-8 pl-8 text-sm",
|
|
5217
|
+
placeholder: "Buscar...",
|
|
5218
|
+
className: "h-8 pl-8 text-sm bg-theme-void/50",
|
|
5184
5219
|
autoFocus: true
|
|
5185
5220
|
}
|
|
5186
5221
|
)
|
|
5187
5222
|
] }) }),
|
|
5188
|
-
/* @__PURE__ */
|
|
5189
|
-
|
|
5190
|
-
|
|
5191
|
-
|
|
5192
|
-
|
|
5193
|
-
|
|
5194
|
-
|
|
5195
|
-
|
|
5196
|
-
|
|
5197
|
-
|
|
5198
|
-
|
|
5199
|
-
isSelected && "bg-primary/10",
|
|
5200
|
-
isDisabled && "opacity-50 cursor-not-allowed"
|
|
5201
|
-
),
|
|
5202
|
-
children: [
|
|
5203
|
-
/* @__PURE__ */ jsxs(Avatar, { shape: "circle", size: "sm", className: "w-7 h-7 shrink-0", children: [
|
|
5204
|
-
user.avatarUrl && /* @__PURE__ */ jsx(AvatarImage, { src: user.avatarUrl, alt: user.name }),
|
|
5205
|
-
/* @__PURE__ */ jsx(AvatarFallback, { className: "bg-primary/20 text-primary-light text-[10px]", children: getInitials4(user.name) })
|
|
5206
|
-
] }),
|
|
5207
|
-
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
5208
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm text-theme font-medium truncate", children: user.name }),
|
|
5209
|
-
user.email && /* @__PURE__ */ jsx("p", { className: "text-xs text-theme-muted truncate", children: user.email })
|
|
5210
|
-
] }),
|
|
5211
|
-
isSelected && /* @__PURE__ */ jsx(Check, { className: "w-4 h-4 text-primary-light shrink-0" })
|
|
5212
|
-
]
|
|
5213
|
-
},
|
|
5214
|
-
user.id
|
|
5215
|
-
);
|
|
5216
|
-
}) : /* @__PURE__ */ jsx("p", { className: "px-2 py-6 text-sm text-theme-muted text-center", children: "Nenhum usu\xE1rio encontrado" }) }),
|
|
5223
|
+
/* @__PURE__ */ jsxs("div", { className: "max-h-64 overflow-y-auto p-1 py-2 custom-scrollbar", children: [
|
|
5224
|
+
filteredGroups.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mb-2", children: [
|
|
5225
|
+
/* @__PURE__ */ jsx("p", { className: "px-2 pb-1 text-[10px] font-bold text-theme-muted uppercase tracking-wider", children: "Grupos" }),
|
|
5226
|
+
filteredGroups.map(renderItem)
|
|
5227
|
+
] }),
|
|
5228
|
+
filteredUsers.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
5229
|
+
filteredGroups.length > 0 && /* @__PURE__ */ jsx("p", { className: "px-2 pt-2 pb-1 text-[10px] font-bold text-theme-muted uppercase tracking-wider border-t border-theme-subtle/50 mt-2", children: "Usu\xE1rios" }),
|
|
5230
|
+
filteredUsers.map(renderItem)
|
|
5231
|
+
] }),
|
|
5232
|
+
filteredUsers.length === 0 && filteredGroups.length === 0 && /* @__PURE__ */ jsx("p", { className: "px-2 py-6 text-sm text-theme-muted text-center", children: "Nenhum resultado encontrado" })
|
|
5233
|
+
] }),
|
|
5217
5234
|
maxAssignees && /* @__PURE__ */ jsx("div", { className: "p-2 border-t border-theme-subtle", children: /* @__PURE__ */ jsxs("p", { className: "text-xs text-theme-muted text-center", children: [
|
|
5218
5235
|
selectedAssignees.length,
|
|
5219
5236
|
"/",
|
|
@@ -6805,8 +6822,13 @@ function KanbanBoard({
|
|
|
6805
6822
|
className,
|
|
6806
6823
|
externalDnD = false,
|
|
6807
6824
|
onTaskUpdate,
|
|
6825
|
+
onToggleLabel,
|
|
6826
|
+
onCreateLabel,
|
|
6827
|
+
availableLabels,
|
|
6808
6828
|
onAddLabel,
|
|
6809
6829
|
onRemoveLabel,
|
|
6830
|
+
onToggleAssignee,
|
|
6831
|
+
availableUsers,
|
|
6810
6832
|
onAddAssignee,
|
|
6811
6833
|
onRemoveAssignee,
|
|
6812
6834
|
onAddSubtask,
|
|
@@ -7028,8 +7050,13 @@ function KanbanBoard({
|
|
|
7028
7050
|
open: sheetOpen,
|
|
7029
7051
|
onOpenChange: setSheetOpen,
|
|
7030
7052
|
onUpdate: onTaskUpdate,
|
|
7053
|
+
onToggleLabel,
|
|
7054
|
+
onCreateLabel,
|
|
7055
|
+
availableLabels,
|
|
7031
7056
|
onAddLabel,
|
|
7032
7057
|
onRemoveLabel,
|
|
7058
|
+
onToggleAssignee,
|
|
7059
|
+
availableUsers,
|
|
7033
7060
|
onAddAssignee,
|
|
7034
7061
|
onRemoveAssignee,
|
|
7035
7062
|
onAddSubtask,
|
|
@@ -7277,6 +7304,456 @@ function PlanBadge({ variant = "badge", ...props }) {
|
|
|
7277
7304
|
return /* @__PURE__ */ jsx(PlanBadgeMini, { ...props });
|
|
7278
7305
|
}
|
|
7279
7306
|
}
|
|
7307
|
+
function BoardsSwitcher({
|
|
7308
|
+
boards,
|
|
7309
|
+
activeBoardId,
|
|
7310
|
+
onBoardChange,
|
|
7311
|
+
onCreateBoard,
|
|
7312
|
+
compact = false,
|
|
7313
|
+
className
|
|
7314
|
+
}) {
|
|
7315
|
+
const [isOpen, setIsOpen] = React5.useState(false);
|
|
7316
|
+
const [isCreating, setIsCreating] = React5.useState(false);
|
|
7317
|
+
const [newBoardName, setNewBoardName] = React5.useState("");
|
|
7318
|
+
const dropdownRef = React5.useRef(null);
|
|
7319
|
+
const createInputRef = React5.useRef(null);
|
|
7320
|
+
React5.useEffect(() => {
|
|
7321
|
+
function handleClickOutside(event) {
|
|
7322
|
+
if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
|
|
7323
|
+
setIsOpen(false);
|
|
7324
|
+
setIsCreating(false);
|
|
7325
|
+
setNewBoardName("");
|
|
7326
|
+
}
|
|
7327
|
+
}
|
|
7328
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
7329
|
+
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
7330
|
+
}, []);
|
|
7331
|
+
React5.useEffect(() => {
|
|
7332
|
+
if (isCreating) createInputRef.current?.focus();
|
|
7333
|
+
}, [isCreating]);
|
|
7334
|
+
const activeBoard = boards.find((b) => b.id === activeBoardId);
|
|
7335
|
+
const handleCreate = () => {
|
|
7336
|
+
const trimmed = newBoardName.trim();
|
|
7337
|
+
if (trimmed) {
|
|
7338
|
+
onCreateBoard?.(trimmed);
|
|
7339
|
+
setNewBoardName("");
|
|
7340
|
+
setIsCreating(false);
|
|
7341
|
+
}
|
|
7342
|
+
};
|
|
7343
|
+
return /* @__PURE__ */ jsxs("div", { ref: dropdownRef, className: cn("relative", className), children: [
|
|
7344
|
+
/* @__PURE__ */ jsxs(
|
|
7345
|
+
"button",
|
|
7346
|
+
{
|
|
7347
|
+
onClick: () => setIsOpen(!isOpen),
|
|
7348
|
+
className: cn(
|
|
7349
|
+
"flex items-center gap-2 rounded-xl px-3 py-2",
|
|
7350
|
+
"bg-theme-glass backdrop-blur-md border border-theme-subtle",
|
|
7351
|
+
"text-theme hover:bg-theme-highlight",
|
|
7352
|
+
"transition-all duration-[400ms]",
|
|
7353
|
+
compact && "px-2"
|
|
7354
|
+
),
|
|
7355
|
+
children: [
|
|
7356
|
+
/* @__PURE__ */ jsx(
|
|
7357
|
+
"div",
|
|
7358
|
+
{
|
|
7359
|
+
className: "w-3 h-3 rounded shrink-0",
|
|
7360
|
+
style: { backgroundColor: activeBoard?.color || "#7C3AED" }
|
|
7361
|
+
}
|
|
7362
|
+
),
|
|
7363
|
+
!compact && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
7364
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm font-medium truncate max-w-[140px] sm:max-w-[200px]", children: activeBoard?.name || "Selecionar board" }),
|
|
7365
|
+
/* @__PURE__ */ jsx("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", className: cn("transition-transform shrink-0", isOpen && "rotate-180"), children: /* @__PURE__ */ jsx("path", { d: "M2.5 3.75L5 6.25L7.5 3.75", stroke: "currentColor", strokeWidth: "1.2", strokeLinecap: "round" }) })
|
|
7366
|
+
] })
|
|
7367
|
+
]
|
|
7368
|
+
}
|
|
7369
|
+
),
|
|
7370
|
+
isOpen && /* @__PURE__ */ jsx("div", { className: cn(
|
|
7371
|
+
"absolute top-full left-0 mt-1 z-50 min-w-[240px]",
|
|
7372
|
+
"bg-elevated/95 backdrop-blur-xl border border-theme-subtle rounded-xl shadow-2xl",
|
|
7373
|
+
"animate-in fade-in slide-in-from-top-2 duration-200"
|
|
7374
|
+
), children: /* @__PURE__ */ jsxs("div", { className: "p-1.5", children: [
|
|
7375
|
+
/* @__PURE__ */ jsx("div", { className: "max-h-[240px] overflow-y-auto scrollbar-none space-y-0.5", children: boards.map((board) => {
|
|
7376
|
+
const isActive = board.id === activeBoardId;
|
|
7377
|
+
return /* @__PURE__ */ jsxs(
|
|
7378
|
+
"button",
|
|
7379
|
+
{
|
|
7380
|
+
onClick: () => {
|
|
7381
|
+
onBoardChange(board.id);
|
|
7382
|
+
setIsOpen(false);
|
|
7383
|
+
},
|
|
7384
|
+
className: cn(
|
|
7385
|
+
"w-full flex items-center gap-2 px-3 py-2 rounded-lg text-xs",
|
|
7386
|
+
"transition-colors",
|
|
7387
|
+
isActive ? "bg-primary/10 text-primary-light" : "text-theme hover:bg-theme-highlight"
|
|
7388
|
+
),
|
|
7389
|
+
children: [
|
|
7390
|
+
/* @__PURE__ */ jsx(
|
|
7391
|
+
"div",
|
|
7392
|
+
{
|
|
7393
|
+
className: "w-2.5 h-2.5 rounded shrink-0",
|
|
7394
|
+
style: { backgroundColor: board.color || "#7C3AED" }
|
|
7395
|
+
}
|
|
7396
|
+
),
|
|
7397
|
+
/* @__PURE__ */ jsx("span", { className: "flex-1 text-left truncate", children: board.name }),
|
|
7398
|
+
board.visibility === "private" && /* @__PURE__ */ jsxs("svg", { width: "12", height: "12", viewBox: "0 0 16 16", fill: "none", className: "text-theme-muted shrink-0", children: [
|
|
7399
|
+
/* @__PURE__ */ jsx("rect", { x: "3", y: "7", width: "10", height: "7", rx: "1.5", stroke: "currentColor", strokeWidth: "1.2" }),
|
|
7400
|
+
/* @__PURE__ */ jsx("path", { d: "M5 7V5a3 3 0 016 0v2", stroke: "currentColor", strokeWidth: "1.2", strokeLinecap: "round" })
|
|
7401
|
+
] }),
|
|
7402
|
+
board.isDefault && /* @__PURE__ */ jsx(Badge, { className: "text-[9px] px-1.5 py-0 h-4 bg-primary/10 text-primary-light border-primary/20", children: "Padr\xE3o" }),
|
|
7403
|
+
board.taskCount != null && /* @__PURE__ */ jsx("span", { className: "text-[10px] text-theme-muted", children: board.taskCount })
|
|
7404
|
+
]
|
|
7405
|
+
},
|
|
7406
|
+
board.id
|
|
7407
|
+
);
|
|
7408
|
+
}) }),
|
|
7409
|
+
onCreateBoard && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
7410
|
+
/* @__PURE__ */ jsx("div", { className: "h-px bg-theme-subtle my-1" }),
|
|
7411
|
+
isCreating ? /* @__PURE__ */ jsx("div", { className: "px-2 py-1.5", children: /* @__PURE__ */ jsx(
|
|
7412
|
+
"input",
|
|
7413
|
+
{
|
|
7414
|
+
ref: createInputRef,
|
|
7415
|
+
value: newBoardName,
|
|
7416
|
+
onChange: (e) => setNewBoardName(e.target.value),
|
|
7417
|
+
onKeyDown: (e) => {
|
|
7418
|
+
if (e.key === "Enter") handleCreate();
|
|
7419
|
+
if (e.key === "Escape") {
|
|
7420
|
+
setIsCreating(false);
|
|
7421
|
+
setNewBoardName("");
|
|
7422
|
+
}
|
|
7423
|
+
},
|
|
7424
|
+
placeholder: "Nome do board...",
|
|
7425
|
+
className: "w-full text-xs text-theme bg-transparent outline-none placeholder:text-theme-muted"
|
|
7426
|
+
}
|
|
7427
|
+
) }) : /* @__PURE__ */ jsxs(
|
|
7428
|
+
"button",
|
|
7429
|
+
{
|
|
7430
|
+
onClick: () => setIsCreating(true),
|
|
7431
|
+
className: "w-full flex items-center gap-2 px-3 py-2 rounded-lg text-xs text-theme-muted hover:text-theme hover:bg-theme-highlight transition-colors",
|
|
7432
|
+
children: [
|
|
7433
|
+
/* @__PURE__ */ jsx(OrgPlus, { className: "w-3 h-3" }),
|
|
7434
|
+
"Criar board"
|
|
7435
|
+
]
|
|
7436
|
+
}
|
|
7437
|
+
)
|
|
7438
|
+
] })
|
|
7439
|
+
] }) })
|
|
7440
|
+
] });
|
|
7441
|
+
}
|
|
7442
|
+
BoardsSwitcher.displayName = "BoardsSwitcher";
|
|
7443
|
+
var statusConfig2 = {
|
|
7444
|
+
ACTIVE: { label: "Ativa", className: "bg-emerald-500/15 text-emerald-400 border-emerald-500/30" },
|
|
7445
|
+
PLANNED: { label: "Planeada", className: "bg-blue-500/15 text-blue-400 border-blue-500/30" },
|
|
7446
|
+
COMPLETED: { label: "Conclu\xEDda", className: "bg-theme-highlight text-theme-muted border-theme-subtle" }
|
|
7447
|
+
};
|
|
7448
|
+
function SprintFilter({
|
|
7449
|
+
sprints,
|
|
7450
|
+
activeSprint,
|
|
7451
|
+
selectedSprintId,
|
|
7452
|
+
onSprintChange,
|
|
7453
|
+
className
|
|
7454
|
+
}) {
|
|
7455
|
+
const [isOpen, setIsOpen] = React5.useState(false);
|
|
7456
|
+
const dropdownRef = React5.useRef(null);
|
|
7457
|
+
React5.useEffect(() => {
|
|
7458
|
+
function handleClickOutside(event) {
|
|
7459
|
+
if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
|
|
7460
|
+
setIsOpen(false);
|
|
7461
|
+
}
|
|
7462
|
+
}
|
|
7463
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
7464
|
+
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
7465
|
+
}, []);
|
|
7466
|
+
const selectedSprint = selectedSprintId ? sprints.find((s) => s.id === selectedSprintId) : null;
|
|
7467
|
+
const displayLabel = selectedSprint ? selectedSprint.name : selectedSprintId === null ? "Todas as tarefas" : activeSprint?.name ?? "Todas as tarefas";
|
|
7468
|
+
const sortedSprints = React5.useMemo(() => {
|
|
7469
|
+
const order = { ACTIVE: 0, PLANNED: 1, COMPLETED: 2 };
|
|
7470
|
+
return [...sprints].sort((a, b) => (order[a.status] ?? 9) - (order[b.status] ?? 9));
|
|
7471
|
+
}, [sprints]);
|
|
7472
|
+
return /* @__PURE__ */ jsxs("div", { ref: dropdownRef, className: cn("relative", className), children: [
|
|
7473
|
+
/* @__PURE__ */ jsxs(
|
|
7474
|
+
Button,
|
|
7475
|
+
{
|
|
7476
|
+
variant: "ghost",
|
|
7477
|
+
size: "sm",
|
|
7478
|
+
onClick: () => setIsOpen(!isOpen),
|
|
7479
|
+
className: cn(
|
|
7480
|
+
"h-8 gap-2 text-xs font-medium px-3",
|
|
7481
|
+
"bg-theme-glass border border-theme-subtle",
|
|
7482
|
+
"text-theme hover:bg-theme-highlight"
|
|
7483
|
+
),
|
|
7484
|
+
children: [
|
|
7485
|
+
/* @__PURE__ */ jsx("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", className: "shrink-0", children: /* @__PURE__ */ jsx("path", { d: "M3 8h10M5 4h6M7 12h2", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) }),
|
|
7486
|
+
/* @__PURE__ */ jsx("span", { className: "truncate max-w-[120px] sm:max-w-[200px]", children: displayLabel }),
|
|
7487
|
+
/* @__PURE__ */ jsx("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", className: cn("transition-transform", isOpen && "rotate-180"), children: /* @__PURE__ */ jsx("path", { d: "M2.5 3.75L5 6.25L7.5 3.75", stroke: "currentColor", strokeWidth: "1.2", strokeLinecap: "round" }) })
|
|
7488
|
+
]
|
|
7489
|
+
}
|
|
7490
|
+
),
|
|
7491
|
+
isOpen && /* @__PURE__ */ jsx("div", { className: cn(
|
|
7492
|
+
"absolute top-full left-0 mt-1 z-50 min-w-[220px]",
|
|
7493
|
+
"bg-elevated/95 backdrop-blur-xl border border-theme-subtle rounded-xl shadow-2xl",
|
|
7494
|
+
"animate-in fade-in slide-in-from-top-2 duration-200"
|
|
7495
|
+
), children: /* @__PURE__ */ jsxs("div", { className: "p-1.5 max-h-[280px] overflow-y-auto scrollbar-none", children: [
|
|
7496
|
+
/* @__PURE__ */ jsxs(
|
|
7497
|
+
"button",
|
|
7498
|
+
{
|
|
7499
|
+
onClick: () => {
|
|
7500
|
+
onSprintChange(null);
|
|
7501
|
+
setIsOpen(false);
|
|
7502
|
+
},
|
|
7503
|
+
className: cn(
|
|
7504
|
+
"w-full flex items-center gap-2 px-3 py-2 rounded-lg text-xs",
|
|
7505
|
+
"transition-colors",
|
|
7506
|
+
selectedSprintId === null ? "bg-primary/10 text-primary-light" : "text-theme-muted hover:bg-theme-highlight hover:text-theme"
|
|
7507
|
+
),
|
|
7508
|
+
children: [
|
|
7509
|
+
/* @__PURE__ */ jsx("span", { className: "w-2 h-2 rounded-full bg-theme-muted shrink-0" }),
|
|
7510
|
+
/* @__PURE__ */ jsx("span", { className: "flex-1 text-left", children: "Todas as tarefas" })
|
|
7511
|
+
]
|
|
7512
|
+
}
|
|
7513
|
+
),
|
|
7514
|
+
sortedSprints.length > 0 && /* @__PURE__ */ jsx("div", { className: "h-px bg-theme-subtle my-1" }),
|
|
7515
|
+
sortedSprints.map((sprint) => {
|
|
7516
|
+
const config = statusConfig2[sprint.status];
|
|
7517
|
+
const isSelected = selectedSprintId === sprint.id;
|
|
7518
|
+
return /* @__PURE__ */ jsxs(
|
|
7519
|
+
"button",
|
|
7520
|
+
{
|
|
7521
|
+
onClick: () => {
|
|
7522
|
+
onSprintChange(sprint.id);
|
|
7523
|
+
setIsOpen(false);
|
|
7524
|
+
},
|
|
7525
|
+
className: cn(
|
|
7526
|
+
"w-full flex items-center gap-2 px-3 py-2 rounded-lg text-xs",
|
|
7527
|
+
"transition-colors",
|
|
7528
|
+
isSelected ? "bg-primary/10 text-primary-light" : "text-theme hover:bg-theme-highlight"
|
|
7529
|
+
),
|
|
7530
|
+
children: [
|
|
7531
|
+
/* @__PURE__ */ jsx(
|
|
7532
|
+
"span",
|
|
7533
|
+
{
|
|
7534
|
+
className: cn("w-2 h-2 rounded-full shrink-0", {
|
|
7535
|
+
"bg-emerald-400": sprint.status === "ACTIVE",
|
|
7536
|
+
"bg-blue-400": sprint.status === "PLANNED",
|
|
7537
|
+
"bg-theme-muted": sprint.status === "COMPLETED"
|
|
7538
|
+
})
|
|
7539
|
+
}
|
|
7540
|
+
),
|
|
7541
|
+
/* @__PURE__ */ jsx("span", { className: "flex-1 text-left truncate", children: sprint.name }),
|
|
7542
|
+
/* @__PURE__ */ jsx(Badge, { className: cn("text-[9px] px-1.5 py-0 h-4 border", config.className), children: config.label }),
|
|
7543
|
+
sprint.taskCount != null && /* @__PURE__ */ jsx("span", { className: "text-[10px] text-theme-muted", children: sprint.taskCount })
|
|
7544
|
+
]
|
|
7545
|
+
},
|
|
7546
|
+
sprint.id
|
|
7547
|
+
);
|
|
7548
|
+
}),
|
|
7549
|
+
sortedSprints.length === 0 && /* @__PURE__ */ jsx("div", { className: "px-3 py-4 text-center text-xs text-theme-muted", children: "Nenhuma sprint criada" })
|
|
7550
|
+
] }) })
|
|
7551
|
+
] });
|
|
7552
|
+
}
|
|
7553
|
+
SprintFilter.displayName = "SprintFilter";
|
|
7554
|
+
var actionConfig = {
|
|
7555
|
+
TASK_CREATED: { icon: "\uFF0B", color: "text-emerald-400", label: "criou tarefa" },
|
|
7556
|
+
TASK_MOVED: { icon: "\u2192", color: "text-blue-400", label: "moveu tarefa" },
|
|
7557
|
+
TASK_UPDATED: { icon: "\u270E", color: "text-amber-400", label: "atualizou tarefa" },
|
|
7558
|
+
TASK_DELETED: { icon: "\u2715", color: "text-rose-400", label: "eliminou tarefa" },
|
|
7559
|
+
TASK_COMPLETED: { icon: "\u2713", color: "text-emerald-400", label: "concluiu tarefa" },
|
|
7560
|
+
TASK_ASSIGNED: { icon: "\u{1F464}", color: "text-blue-400", label: "atribuiu tarefa" },
|
|
7561
|
+
COMMENT_ADDED: { icon: "\u{1F4AC}", color: "text-primary-light", label: "comentou" },
|
|
7562
|
+
SPRINT_STARTED: { icon: "\u{1F3C3}", color: "text-emerald-400", label: "iniciou sprint" },
|
|
7563
|
+
SPRINT_COMPLETED: { icon: "\u{1F3C1}", color: "text-theme-muted", label: "concluiu sprint" },
|
|
7564
|
+
BOARD_CREATED: { icon: "\u{1F4CB}", color: "text-primary-light", label: "criou board" },
|
|
7565
|
+
COLUMN_CREATED: { icon: "\u2590", color: "text-blue-400", label: "criou coluna" },
|
|
7566
|
+
MEMBER_ADDED: { icon: "\u2795", color: "text-emerald-400", label: "adicionou membro" },
|
|
7567
|
+
MEMBER_REMOVED: { icon: "\u2796", color: "text-rose-400", label: "removeu membro" },
|
|
7568
|
+
LABEL_ADDED: { icon: "\u{1F3F7}", color: "text-amber-400", label: "etiquetou" },
|
|
7569
|
+
ATTACHMENT_ADDED: { icon: "\u{1F4CE}", color: "text-blue-400", label: "anexou ficheiro" },
|
|
7570
|
+
PRIORITY_CHANGED: { icon: "\u26A1", color: "text-amber-400", label: "alterou prioridade" },
|
|
7571
|
+
DUE_DATE_SET: { icon: "\u{1F4C5}", color: "text-blue-400", label: "definiu prazo" },
|
|
7572
|
+
REPORT_GENERATED: { icon: "\u{1F4CA}", color: "text-primary-light", label: "gerou relat\xF3rio" }
|
|
7573
|
+
};
|
|
7574
|
+
var FILTER_GROUPS = [
|
|
7575
|
+
{ label: "Tarefas", actions: ["TASK_CREATED", "TASK_MOVED", "TASK_UPDATED", "TASK_DELETED", "TASK_COMPLETED", "TASK_ASSIGNED"] },
|
|
7576
|
+
{ label: "Sprints", actions: ["SPRINT_STARTED", "SPRINT_COMPLETED"] },
|
|
7577
|
+
{ label: "Board", actions: ["BOARD_CREATED", "COLUMN_CREATED"] },
|
|
7578
|
+
{ label: "Equipa", actions: ["MEMBER_ADDED", "MEMBER_REMOVED", "COMMENT_ADDED"] },
|
|
7579
|
+
{ label: "Outros", actions: ["LABEL_ADDED", "ATTACHMENT_ADDED", "PRIORITY_CHANGED", "DUE_DATE_SET", "REPORT_GENERATED"] }
|
|
7580
|
+
];
|
|
7581
|
+
function timeAgo(timestamp) {
|
|
7582
|
+
const now = Date.now();
|
|
7583
|
+
const then = new Date(timestamp).getTime();
|
|
7584
|
+
const diff = now - then;
|
|
7585
|
+
const minutes = Math.floor(diff / 6e4);
|
|
7586
|
+
if (minutes < 1) return "agora";
|
|
7587
|
+
if (minutes < 60) return `${minutes}m`;
|
|
7588
|
+
const hours = Math.floor(minutes / 60);
|
|
7589
|
+
if (hours < 24) return `${hours}h`;
|
|
7590
|
+
const days = Math.floor(hours / 24);
|
|
7591
|
+
if (days < 7) return `${days}d`;
|
|
7592
|
+
return new Date(timestamp).toLocaleDateString("pt-BR", { day: "2-digit", month: "short" });
|
|
7593
|
+
}
|
|
7594
|
+
function groupByDate(activities) {
|
|
7595
|
+
const groups = /* @__PURE__ */ new Map();
|
|
7596
|
+
const today = (/* @__PURE__ */ new Date()).toDateString();
|
|
7597
|
+
const yesterday = new Date(Date.now() - 864e5).toDateString();
|
|
7598
|
+
for (const activity of activities) {
|
|
7599
|
+
const date = new Date(activity.timestamp).toDateString();
|
|
7600
|
+
let label;
|
|
7601
|
+
if (date === today) label = "Hoje";
|
|
7602
|
+
else if (date === yesterday) label = "Ontem";
|
|
7603
|
+
else label = new Date(activity.timestamp).toLocaleDateString("pt-BR", { weekday: "long", day: "numeric", month: "long" });
|
|
7604
|
+
if (!groups.has(label)) groups.set(label, []);
|
|
7605
|
+
groups.get(label).push(activity);
|
|
7606
|
+
}
|
|
7607
|
+
return groups;
|
|
7608
|
+
}
|
|
7609
|
+
function ActivityTrail({
|
|
7610
|
+
activities,
|
|
7611
|
+
loading,
|
|
7612
|
+
hasMore,
|
|
7613
|
+
onLoadMore,
|
|
7614
|
+
filterActions,
|
|
7615
|
+
onFilterChange,
|
|
7616
|
+
maxHeight = "600px",
|
|
7617
|
+
className,
|
|
7618
|
+
compact = false
|
|
7619
|
+
}) {
|
|
7620
|
+
const [showFilters, setShowFilters] = React5.useState(false);
|
|
7621
|
+
const filteredActivities = filterActions && filterActions.length > 0 ? activities.filter((a) => filterActions.includes(a.action)) : activities;
|
|
7622
|
+
const grouped = groupByDate(filteredActivities);
|
|
7623
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col", className), children: [
|
|
7624
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-4 py-3 border-b border-theme-subtle", children: [
|
|
7625
|
+
/* @__PURE__ */ jsxs("h3", { className: "text-sm font-semibold text-theme flex items-center gap-2", children: [
|
|
7626
|
+
/* @__PURE__ */ jsxs("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: [
|
|
7627
|
+
/* @__PURE__ */ jsx("circle", { cx: "8", cy: "8", r: "6", stroke: "currentColor", strokeWidth: "1.2" }),
|
|
7628
|
+
/* @__PURE__ */ jsx("path", { d: "M8 4.5V8L10.5 10", stroke: "currentColor", strokeWidth: "1.2", strokeLinecap: "round" })
|
|
7629
|
+
] }),
|
|
7630
|
+
"Registo de atividades",
|
|
7631
|
+
filteredActivities.length > 0 && /* @__PURE__ */ jsx(Badge, { className: "text-[10px] bg-theme-highlight text-theme-muted border-theme-subtle", children: filteredActivities.length })
|
|
7632
|
+
] }),
|
|
7633
|
+
onFilterChange && /* @__PURE__ */ jsx(
|
|
7634
|
+
"button",
|
|
7635
|
+
{
|
|
7636
|
+
onClick: () => setShowFilters(!showFilters),
|
|
7637
|
+
className: cn(
|
|
7638
|
+
"p-1.5 rounded-lg transition-colors text-theme-muted hover:text-theme hover:bg-theme-highlight",
|
|
7639
|
+
showFilters && "bg-primary/10 text-primary-light"
|
|
7640
|
+
),
|
|
7641
|
+
children: /* @__PURE__ */ jsx("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ jsx("path", { d: "M2 4h12M4 8h8M6 12h4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) })
|
|
7642
|
+
}
|
|
7643
|
+
)
|
|
7644
|
+
] }),
|
|
7645
|
+
showFilters && onFilterChange && /* @__PURE__ */ jsx("div", { className: "px-4 py-2 border-b border-theme-subtle flex flex-wrap gap-1.5 animate-in slide-in-from-top-2 duration-200", children: FILTER_GROUPS.map((group) => {
|
|
7646
|
+
const isActive = filterActions && group.actions.some((a) => filterActions.includes(a));
|
|
7647
|
+
return /* @__PURE__ */ jsx(
|
|
7648
|
+
"button",
|
|
7649
|
+
{
|
|
7650
|
+
onClick: () => {
|
|
7651
|
+
if (isActive) {
|
|
7652
|
+
onFilterChange((filterActions || []).filter((a) => !group.actions.includes(a)));
|
|
7653
|
+
} else {
|
|
7654
|
+
onFilterChange([...filterActions || [], ...group.actions]);
|
|
7655
|
+
}
|
|
7656
|
+
},
|
|
7657
|
+
className: cn(
|
|
7658
|
+
"px-2 py-1 rounded-lg text-[10px] font-medium border transition-colors",
|
|
7659
|
+
isActive ? "bg-primary/10 text-primary-light border-primary/20" : "bg-theme-subtle text-theme-muted border-theme-subtle hover:text-theme"
|
|
7660
|
+
),
|
|
7661
|
+
children: group.label
|
|
7662
|
+
},
|
|
7663
|
+
group.label
|
|
7664
|
+
);
|
|
7665
|
+
}) }),
|
|
7666
|
+
/* @__PURE__ */ jsx(ScrollArea, { style: { maxHeight }, className: "[&_[data-radix-scroll-area-viewport]]:scrollbar-none", children: /* @__PURE__ */ jsxs("div", { className: "px-4 py-2", children: [
|
|
7667
|
+
Array.from(grouped.entries()).map(([dateLabel, entries]) => /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
|
|
7668
|
+
/* @__PURE__ */ jsx("div", { className: "sticky top-0 z-10 py-1.5 bg-void/80 backdrop-blur-sm", children: /* @__PURE__ */ jsx("span", { className: "text-[10px] font-semibold uppercase tracking-wider text-theme-muted", children: dateLabel }) }),
|
|
7669
|
+
/* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
7670
|
+
/* @__PURE__ */ jsx("div", { className: "absolute left-3 top-0 bottom-0 w-px bg-theme-subtle" }),
|
|
7671
|
+
entries.map((activity, i) => {
|
|
7672
|
+
const config = actionConfig[activity.action] || actionConfig.TASK_UPDATED;
|
|
7673
|
+
return /* @__PURE__ */ jsxs("div", { className: "relative flex gap-3 py-2 group", children: [
|
|
7674
|
+
/* @__PURE__ */ jsx("div", { className: cn(
|
|
7675
|
+
"relative z-10 w-6 h-6 rounded-full flex items-center justify-center shrink-0",
|
|
7676
|
+
"bg-void border border-theme-subtle text-[10px]",
|
|
7677
|
+
"group-hover:border-primary-light/30 transition-colors"
|
|
7678
|
+
), children: /* @__PURE__ */ jsx("span", { className: config.color, children: config.icon }) }),
|
|
7679
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
7680
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2", children: [
|
|
7681
|
+
!compact && /* @__PURE__ */ jsx(
|
|
7682
|
+
UserAvatar,
|
|
7683
|
+
{
|
|
7684
|
+
name: activity.actor.name,
|
|
7685
|
+
src: activity.actor.avatarUrl,
|
|
7686
|
+
size: "sm",
|
|
7687
|
+
className: "h-5 w-5 shrink-0 mt-0.5"
|
|
7688
|
+
}
|
|
7689
|
+
),
|
|
7690
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
7691
|
+
/* @__PURE__ */ jsxs("p", { className: "text-xs text-theme", children: [
|
|
7692
|
+
/* @__PURE__ */ jsx("span", { className: "font-medium", children: activity.actor.name }),
|
|
7693
|
+
" ",
|
|
7694
|
+
/* @__PURE__ */ jsx("span", { className: "text-theme-muted", children: config.label }),
|
|
7695
|
+
activity.target && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
7696
|
+
" ",
|
|
7697
|
+
/* @__PURE__ */ jsx("span", { className: "font-medium text-primary-light truncate", children: activity.target.name })
|
|
7698
|
+
] })
|
|
7699
|
+
] }),
|
|
7700
|
+
!compact && activity.description && activity.description !== config.label && /* @__PURE__ */ jsx("p", { className: "text-[11px] text-theme-muted mt-0.5 line-clamp-2", children: activity.description })
|
|
7701
|
+
] }),
|
|
7702
|
+
/* @__PURE__ */ jsx("span", { className: "text-[10px] text-theme-muted whitespace-nowrap shrink-0", children: timeAgo(activity.timestamp) })
|
|
7703
|
+
] }),
|
|
7704
|
+
activity.hash && !compact && /* @__PURE__ */ jsxs("div", { className: "mt-1 flex items-center gap-1", children: [
|
|
7705
|
+
/* @__PURE__ */ jsxs("svg", { width: "10", height: "10", viewBox: "0 0 16 16", fill: "none", className: "text-theme-muted", children: [
|
|
7706
|
+
/* @__PURE__ */ jsx("path", { d: "M4 8h8M8 4v8", stroke: "currentColor", strokeWidth: "1", strokeLinecap: "round" }),
|
|
7707
|
+
/* @__PURE__ */ jsx("circle", { cx: "8", cy: "8", r: "6", stroke: "currentColor", strokeWidth: "1" })
|
|
7708
|
+
] }),
|
|
7709
|
+
/* @__PURE__ */ jsxs("span", { className: "text-[9px] font-mono text-theme-muted opacity-50 truncate max-w-[120px]", children: [
|
|
7710
|
+
activity.hash.slice(0, 16),
|
|
7711
|
+
"\u2026"
|
|
7712
|
+
] })
|
|
7713
|
+
] })
|
|
7714
|
+
] })
|
|
7715
|
+
] }, activity.id);
|
|
7716
|
+
})
|
|
7717
|
+
] })
|
|
7718
|
+
] }, dateLabel)),
|
|
7719
|
+
filteredActivities.length === 0 && !loading && /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center justify-center py-12 text-center", children: [
|
|
7720
|
+
/* @__PURE__ */ jsxs("svg", { width: "40", height: "40", viewBox: "0 0 48 48", fill: "none", className: "text-theme-muted mb-3 opacity-40", children: [
|
|
7721
|
+
/* @__PURE__ */ jsx("circle", { cx: "24", cy: "24", r: "18", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
7722
|
+
/* @__PURE__ */ jsx("path", { d: "M24 14v10l7 4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
|
|
7723
|
+
] }),
|
|
7724
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm text-theme-muted", children: "Sem atividades registadas" }),
|
|
7725
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs text-theme-muted mt-1", children: "As atividades aparecer\xE3o aqui" })
|
|
7726
|
+
] }),
|
|
7727
|
+
loading && /* @__PURE__ */ jsx("div", { className: "space-y-3", children: [1, 2, 3].map((i) => /* @__PURE__ */ jsxs("div", { className: "flex gap-3", children: [
|
|
7728
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "w-6 h-6 rounded-full" }),
|
|
7729
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1 space-y-1.5", children: [
|
|
7730
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-3/4" }),
|
|
7731
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-2 w-1/2" })
|
|
7732
|
+
] })
|
|
7733
|
+
] }, i)) }),
|
|
7734
|
+
hasMore && !loading && /* @__PURE__ */ jsx("div", { className: "flex justify-center py-3", children: /* @__PURE__ */ jsx(
|
|
7735
|
+
"button",
|
|
7736
|
+
{
|
|
7737
|
+
onClick: onLoadMore,
|
|
7738
|
+
className: "text-xs text-primary-light hover:text-primary transition-colors",
|
|
7739
|
+
children: "Carregar mais atividades"
|
|
7740
|
+
}
|
|
7741
|
+
) })
|
|
7742
|
+
] }) })
|
|
7743
|
+
] });
|
|
7744
|
+
}
|
|
7745
|
+
ActivityTrail.displayName = "ActivityTrail";
|
|
7746
|
+
function ActivityTrailSkeleton({ className }) {
|
|
7747
|
+
return /* @__PURE__ */ jsx("div", { className: cn("space-y-4 p-4", className), children: [1, 2, 3, 4, 5].map((i) => /* @__PURE__ */ jsxs("div", { className: "flex gap-3 animate-pulse", children: [
|
|
7748
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "w-6 h-6 rounded-full shrink-0" }),
|
|
7749
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1 space-y-1.5", children: [
|
|
7750
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-4/5" }),
|
|
7751
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-2 w-2/3" })
|
|
7752
|
+
] }),
|
|
7753
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-8 shrink-0" })
|
|
7754
|
+
] }, i)) });
|
|
7755
|
+
}
|
|
7756
|
+
ActivityTrailSkeleton.displayName = "ActivityTrailSkeleton";
|
|
7280
7757
|
function Card({ className, ...props }) {
|
|
7281
7758
|
return /* @__PURE__ */ jsx(
|
|
7282
7759
|
"div",
|
|
@@ -8661,6 +9138,6 @@ function InviteMemberDialog({
|
|
|
8661
9138
|
);
|
|
8662
9139
|
}
|
|
8663
9140
|
|
|
8664
|
-
export { BoardSkeleton, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, CURRENT_USER_KEY, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChatSkeleton, Checkbox, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, CommentItem, CommentThread, CreateEpicDialog, CreateProjectDialog, CreateSprintDialog, CreateTaskDialog, CreateWorkspaceDialog, DashboardSkeleton, Dock, DockButton, DockSidebar, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, DueDateBadge, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyState, EmptyTitle, GeometricIcon, GlassPanel, InviteMemberDialog, KanbanBoard, Column as KanbanColumn, TaskCard2 as KanbanTaskCard, Logo, MemberListSkeleton, MetricCard, MetricCardSkeleton, PlanBadge, Progress, ProjectListSkeleton, SettingsSkeleton, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, SidebarButton, SidebarEntry, SprintSkeleton, StatusPill, StepCircle, StepConnector, Stepper, Switch, TaskCard, TaskCardSkeleton, TaskDetailDialog, TaskDetailPanel, TaskDetailSheet, TaskListSkeleton, Toast, ToastProgress, Toaster, Toggle, UserAvatar, WorkspaceSwitcher, emptyMediaVariants, geometricIconVariants, glassPanelVariants, metricCardVariants, priorityConfig, statusPillVariants, useCurrentUser, useMediaQuery };
|
|
9141
|
+
export { ActivityTrail, ActivityTrailSkeleton, BoardSkeleton, BoardsSwitcher, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, CURRENT_USER_KEY, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChatSkeleton, Checkbox, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, CommentItem, CommentThread, CreateEpicDialog, CreateProjectDialog, CreateSprintDialog, CreateTaskDialog, CreateWorkspaceDialog, DashboardSkeleton, Dock, DockButton, DockSidebar, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, DueDateBadge, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyState, EmptyTitle, GeometricIcon, GlassPanel, InviteMemberDialog, KanbanBoard, Column as KanbanColumn, TaskCard2 as KanbanTaskCard, Logo, MemberListSkeleton, MetricCard, MetricCardSkeleton, PlanBadge, Progress, ProjectListSkeleton, SettingsSkeleton, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, SidebarButton, SidebarEntry, SprintFilter, SprintSkeleton, StatusPill, StepCircle, StepConnector, Stepper, Switch, TaskCard, TaskCardSkeleton, TaskDetailDialog, TaskDetailPanel, TaskDetailSheet, TaskListSkeleton, Toast, ToastProgress, Toaster, Toggle, UserAvatar, WorkspaceSwitcher, emptyMediaVariants, geometricIconVariants, glassPanelVariants, metricCardVariants, priorityConfig, statusPillVariants, useCurrentUser, useMediaQuery };
|
|
8665
9142
|
//# sourceMappingURL=index.js.map
|
|
8666
9143
|
//# sourceMappingURL=index.js.map
|