organify-ui 0.3.21 → 0.3.23
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/index.d.ts +23 -10
- package/dist/index.js +111 -17
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -189,6 +189,20 @@ declare function seedUserCache(users: ResolvedUser[]): void;
|
|
|
189
189
|
*/
|
|
190
190
|
declare function useResolvedUser(userId: string | number | undefined | null): ResolvedUser | null | undefined;
|
|
191
191
|
|
|
192
|
+
interface UserDisplayNameProps {
|
|
193
|
+
/** User ID — used for self-fetch when `name` is not provided. */
|
|
194
|
+
userId?: string | number;
|
|
195
|
+
/** Display name override — when present, skips the fetch entirely. */
|
|
196
|
+
name?: string;
|
|
197
|
+
/** Fallback text shown while loading. Defaults to '…' */
|
|
198
|
+
loadingFallback?: string;
|
|
199
|
+
/** Extra CSS classes applied to the wrapping <span>. */
|
|
200
|
+
className?: string;
|
|
201
|
+
/** Inline style overrides. */
|
|
202
|
+
style?: React.CSSProperties;
|
|
203
|
+
}
|
|
204
|
+
declare function UserDisplayName({ userId, name: nameProp, loadingFallback, className, style, }: UserDisplayNameProps): react_jsx_runtime.JSX.Element;
|
|
205
|
+
|
|
192
206
|
/**
|
|
193
207
|
* Tooltip — Organic glass tooltip
|
|
194
208
|
*
|
|
@@ -716,7 +730,8 @@ interface TaskLabel {
|
|
|
716
730
|
}
|
|
717
731
|
interface TaskAssignee {
|
|
718
732
|
id: string;
|
|
719
|
-
|
|
733
|
+
/** Optional — when absent, UserAvatar/UserDisplayName will self-fetch by `id` */
|
|
734
|
+
name?: string;
|
|
720
735
|
avatarUrl?: string;
|
|
721
736
|
}
|
|
722
737
|
interface TaskSubtask {
|
|
@@ -825,13 +840,15 @@ interface TaskCardData {
|
|
|
825
840
|
/** Single assignee (legacy support) */
|
|
826
841
|
assignee?: {
|
|
827
842
|
id?: string;
|
|
828
|
-
|
|
843
|
+
/** Optional — when absent, UserAvatar will self-fetch by `id` */
|
|
844
|
+
name?: string;
|
|
829
845
|
avatarUrl?: string | null;
|
|
830
846
|
} | null;
|
|
831
847
|
/** Multiple assignees - recommended approach */
|
|
832
848
|
assignees?: Array<{
|
|
833
849
|
id: string;
|
|
834
|
-
|
|
850
|
+
/** Optional — when absent, UserAvatar/UserDisplayName will self-fetch by `id` */
|
|
851
|
+
name?: string;
|
|
835
852
|
avatarUrl?: string | null;
|
|
836
853
|
}>;
|
|
837
854
|
/** Assign to a group instead of individuals */
|
|
@@ -898,11 +915,7 @@ interface TaskCardProps$1 extends Omit<React.HTMLAttributes<HTMLDivElement>, 'on
|
|
|
898
915
|
}>;
|
|
899
916
|
onAddAssignee?: (taskId: string) => void;
|
|
900
917
|
onRemoveAssignee?: (taskId: string, assigneeId: string) => void;
|
|
901
|
-
onToggleAssignee?: (taskId: string, assignee:
|
|
902
|
-
id: string;
|
|
903
|
-
name: string;
|
|
904
|
-
avatarUrl?: string;
|
|
905
|
-
}) => void;
|
|
918
|
+
onToggleAssignee?: (taskId: string, assignee: TaskAssignee) => void;
|
|
906
919
|
availableUsers?: Array<{
|
|
907
920
|
id: string;
|
|
908
921
|
name: string;
|
|
@@ -956,7 +969,7 @@ interface KanbanTask {
|
|
|
956
969
|
} | string>;
|
|
957
970
|
assignee?: {
|
|
958
971
|
id?: string;
|
|
959
|
-
name
|
|
972
|
+
name?: string;
|
|
960
973
|
avatarUrl?: string;
|
|
961
974
|
};
|
|
962
975
|
assignees?: Array<{
|
|
@@ -1590,4 +1603,4 @@ interface InviteMemberDialogProps {
|
|
|
1590
1603
|
}
|
|
1591
1604
|
declare function InviteMemberDialog({ open, onOpenChange, workspaceSlug: propWorkspaceSlug, workspaceId: _deprecated, onInvited, }: InviteMemberDialogProps): react_jsx_runtime.JSX.Element;
|
|
1592
1605
|
|
|
1593
|
-
export { type ActivityAction, type ActivityEntry, ActivityTrail, type ActivityTrailProps, ActivityTrailSkeleton, Alert, type AlertProps, Avatar, AvatarFallback, AvatarImage, type AvatarProps, Badge, type BadgeProps, type BoardItem, BoardSkeleton, BoardsSwitcher, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, type ButtonProps, CURRENT_USER_KEY, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChatSkeleton, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, type Comment, type CommentAuthor, CommentItem, type CommentReaction, CommentThread, type CommentThreadProps, CreateEpicDialog, type CreateEpicDialogProps, CreateProjectDialog, type CreateProjectDialogProps, CreateSprintDialog, type CreateSprintDialogProps, CreateTaskDialog, type CreateTaskDialogProps, CreateWorkspaceDialog, type CreateWorkspaceDialogProps, DashboardSkeleton, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Dock, DockButton, type DockEntry, type DockItem, type DockProps, DockSidebar, type DockSidebarProps, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, DueDateBadge, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyState, type EmptyStateProps, EmptyTitle, GeometricIcon, type GeometricIconProps, GlassPanel, type GlassPanelProps, type GqlEndpoint, Input, type InputProps, InviteMemberDialog, type InviteMemberDialogProps, KanbanBoard, type KanbanBoardProps, Column as KanbanColumn, type KanbanColumnData, type KanbanTask, TaskCard as KanbanTaskCard, Label, Logo, type LogoProps, MemberListSkeleton, MetricCard, type MetricCardProps, MetricCardSkeleton, OrgLoader, OrgLoaderInline, type OrgLoaderProps, type OrganifyApiConfig, OrganifyContext, type OrganifyContextValue, type OrganifyProject, OrganifyProvider, type OrganifyProviderProps, type OrganifyUser, type OrganifyWorkspace, PlanBadge, type PlanBadgeProps, type PlanLimit, type PlanTier, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, type ProgressProps, ProjectListSkeleton, type ResolvedUser, ResponsiveDialog, type ResponsiveDialogProps, type RestEndpoint, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, SettingsSkeleton, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, SidebarButton, SidebarEntry, type SidebarNavEntry, type SidebarNavItem, Skeleton, SkeletonCard, type SkeletonProps, type Sprint, SprintFilter, SprintSkeleton, StatusPill, type StatusPillProps, StepCircle, StepConnector, type StepStatus, Stepper, type StepperProps, type StepperStep, Switch, type SwitchProps, Tabs, TabsContent, TabsList, TabsTrigger, type TaskAssignee, TaskCard$1 as TaskCard, type TaskCardData, type TaskCardProps$1 as TaskCardProps, TaskCardSkeleton, type TaskDetailData, TaskDetailDialog, type TaskDetailDialogProps, TaskDetailPanel, type TaskDetailPanelProps, TaskDetailSheet, type TaskDetailSheetProps, type TaskLabel, TaskListSkeleton, type TaskPriority, type TaskStatus, type TaskSubtask, Textarea, Toast, ToastProgress, type ToastProps, Toaster, type ToasterProps, Toggle, type ToggleProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type UseCurrentUserReturn, UserAvatar, type UserAvatarProps, WorkspaceSwitcher, type WorkspaceSwitcherProps, alertVariants, avatarVariants, badgeVariants, buttonVariants, cn, emptyMediaVariants, geometricIconVariants, glassPanelVariants, inputVariants, invalidateUserCache, metricCardVariants, orgLoaderVariants, priorityConfig, resolveUser, seedUserCache, statusPillVariants, useCurrentUser, useMediaQuery, useOrganify, useOrganifyApi, useOrganifyGql, useOrganifyNavigation, useOrganifyProject, useOrganifyRest, useOrganifyUser, useOrganifyWorkspace, useResolvedUser };
|
|
1606
|
+
export { type ActivityAction, type ActivityEntry, ActivityTrail, type ActivityTrailProps, ActivityTrailSkeleton, Alert, type AlertProps, Avatar, AvatarFallback, AvatarImage, type AvatarProps, Badge, type BadgeProps, type BoardItem, BoardSkeleton, BoardsSwitcher, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, type ButtonProps, CURRENT_USER_KEY, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChatSkeleton, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, type Comment, type CommentAuthor, CommentItem, type CommentReaction, CommentThread, type CommentThreadProps, CreateEpicDialog, type CreateEpicDialogProps, CreateProjectDialog, type CreateProjectDialogProps, CreateSprintDialog, type CreateSprintDialogProps, CreateTaskDialog, type CreateTaskDialogProps, CreateWorkspaceDialog, type CreateWorkspaceDialogProps, DashboardSkeleton, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Dock, DockButton, type DockEntry, type DockItem, type DockProps, DockSidebar, type DockSidebarProps, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, DueDateBadge, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyState, type EmptyStateProps, EmptyTitle, GeometricIcon, type GeometricIconProps, GlassPanel, type GlassPanelProps, type GqlEndpoint, Input, type InputProps, InviteMemberDialog, type InviteMemberDialogProps, KanbanBoard, type KanbanBoardProps, Column as KanbanColumn, type KanbanColumnData, type KanbanTask, TaskCard as KanbanTaskCard, Label, Logo, type LogoProps, MemberListSkeleton, MetricCard, type MetricCardProps, MetricCardSkeleton, OrgLoader, OrgLoaderInline, type OrgLoaderProps, type OrganifyApiConfig, OrganifyContext, type OrganifyContextValue, type OrganifyProject, OrganifyProvider, type OrganifyProviderProps, type OrganifyUser, type OrganifyWorkspace, PlanBadge, type PlanBadgeProps, type PlanLimit, type PlanTier, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, type ProgressProps, ProjectListSkeleton, type ResolvedUser, ResponsiveDialog, type ResponsiveDialogProps, type RestEndpoint, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, SettingsSkeleton, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, SidebarButton, SidebarEntry, type SidebarNavEntry, type SidebarNavItem, Skeleton, SkeletonCard, type SkeletonProps, type Sprint, SprintFilter, SprintSkeleton, StatusPill, type StatusPillProps, StepCircle, StepConnector, type StepStatus, Stepper, type StepperProps, type StepperStep, Switch, type SwitchProps, Tabs, TabsContent, TabsList, TabsTrigger, type TaskAssignee, TaskCard$1 as TaskCard, type TaskCardData, type TaskCardProps$1 as TaskCardProps, TaskCardSkeleton, type TaskDetailData, TaskDetailDialog, type TaskDetailDialogProps, TaskDetailPanel, type TaskDetailPanelProps, TaskDetailSheet, type TaskDetailSheetProps, type TaskLabel, TaskListSkeleton, type TaskPriority, type TaskStatus, type TaskSubtask, Textarea, Toast, ToastProgress, type ToastProps, Toaster, type ToasterProps, Toggle, type ToggleProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type UseCurrentUserReturn, UserAvatar, type UserAvatarProps, UserDisplayName, type UserDisplayNameProps, WorkspaceSwitcher, type WorkspaceSwitcherProps, alertVariants, avatarVariants, badgeVariants, buttonVariants, cn, emptyMediaVariants, geometricIconVariants, glassPanelVariants, inputVariants, invalidateUserCache, metricCardVariants, orgLoaderVariants, priorityConfig, resolveUser, seedUserCache, statusPillVariants, useCurrentUser, useMediaQuery, useOrganify, useOrganifyApi, useOrganifyGql, useOrganifyNavigation, useOrganifyProject, useOrganifyRest, useOrganifyUser, useOrganifyWorkspace, useResolvedUser };
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ export { I18nProvider, createTranslator, useI18n } from './chunk-FQA33MF4.js';
|
|
|
5
5
|
export { ThemeProvider, useTheme } from './chunk-RFOKENE3.js';
|
|
6
6
|
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, ResponsiveDialog, Separator, Label, Input, Textarea, Button, Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from './chunk-SNGMKLFD.js';
|
|
7
7
|
export { AiChatSidebar, Alert, Button, ChatMessages, ChatSidebar, CommandBar, CreateRoomDialog, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, 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-SNGMKLFD.js';
|
|
8
|
-
import { cn, useOrganifyApi, Avatar, AvatarImage, AvatarFallback, TooltipProvider, Tooltip, TooltipTrigger, TooltipContent, Drawer, DrawerContent, DrawerHeader, DrawerTitle, DrawerDescription, Skeleton,
|
|
8
|
+
import { cn, useOrganifyApi, useOrganify, Avatar, AvatarImage, AvatarFallback, TooltipProvider, Tooltip, TooltipTrigger, TooltipContent, Drawer, DrawerContent, DrawerHeader, DrawerTitle, DrawerDescription, Skeleton, useOrganifyGql, useOrganifyUser, Badge, ScrollArea, useOrganifyWorkspace, useOrganifyNavigation, useOrganifyProject } from './chunk-276ZWKXB.js';
|
|
9
9
|
export { Avatar, AvatarFallback, AvatarImage, Badge, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, OrganifyContext, OrganifyProvider, ScrollArea, ScrollBar, Skeleton, SkeletonCard, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, avatarVariants, badgeVariants, cn, useOrganify, useOrganifyApi, useOrganifyGql, useOrganifyNavigation, useOrganifyProject, useOrganifyRest, useOrganifyUser, useOrganifyWorkspace } from './chunk-276ZWKXB.js';
|
|
10
10
|
import { OrgDiamond, OrgPlus, OrgComment, OrgEdit, OrgTrash, OrgSprint, OrgCheckCircle, OrgAttachment, OrgCalendar, OrgMail, OrgBoard, OrgRocket, OrgWarning, OrgFlag, OrgShield, OrgZap, OrgStar } from './chunk-MZKEDV5W.js';
|
|
11
11
|
export { OrgAI, OrgActivity, OrgArrowLeft, OrgArrowRight, OrgAttachment, OrgBell, OrgBoard, OrgCalendar, OrgCelebrate, OrgChart, OrgChat, OrgCheck, OrgCheckCircle, OrgChevronDown, OrgChevronLeft, OrgChevronRight, OrgChevronUp, OrgClock, OrgClose, OrgComment, OrgCopy, OrgCreditCard, OrgDeveloper, OrgDiamond, OrgDoor, OrgDownload, OrgEdit, OrgError, OrgExecutive, OrgEye, OrgEyeOff, OrgFile, OrgFilter, OrgFlag, OrgFolder, OrgGauge, OrgGlobe, OrgGrid, OrgHeart, OrgHome, OrgInfo, OrgIntegration, OrgLink, OrgList, OrgLock, OrgLogo, OrgLogout, OrgMail, OrgMention, OrgMenu, OrgMoon, OrgPMO, OrgPause, OrgPlay, OrgPlus, OrgProjectManager, OrgReport, OrgRocket, OrgSearch, OrgSettings, OrgShield, OrgSort, OrgSprint, OrgStakeholder, OrgStar, OrgSun, OrgTag, OrgTarget, OrgTeam, OrgTrash, OrgTutorial, OrgUnlock, OrgUpload, OrgUser, OrgWarning, OrgWave, OrgWordmark, OrgWorkflow, OrgWorkspace, OrgZap } from './chunk-MZKEDV5W.js';
|
|
@@ -134,7 +134,18 @@ function seedUserCache(users) {
|
|
|
134
134
|
}
|
|
135
135
|
function useResolvedUser(userId) {
|
|
136
136
|
const api = useOrganifyApi();
|
|
137
|
+
const { user: currentUser } = useOrganify();
|
|
137
138
|
const key = userId != null ? String(userId) : void 0;
|
|
139
|
+
if (currentUser?.id != null) {
|
|
140
|
+
const ck = String(currentUser.id);
|
|
141
|
+
if (!_cache.has(ck)) {
|
|
142
|
+
_cache.set(ck, {
|
|
143
|
+
id: currentUser.id,
|
|
144
|
+
name: currentUser.name ?? "",
|
|
145
|
+
avatarUrl: currentUser.avatarUrl ?? void 0
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
}
|
|
138
149
|
const [user, setUser] = useState(() => {
|
|
139
150
|
if (!key) return void 0;
|
|
140
151
|
return _cache.has(key) ? _cache.get(key) : void 0;
|
|
@@ -153,6 +164,12 @@ function useResolvedUser(userId) {
|
|
|
153
164
|
cancelled = true;
|
|
154
165
|
};
|
|
155
166
|
}, [key, api.gatewayUrl]);
|
|
167
|
+
useEffect(() => {
|
|
168
|
+
if (!key || !currentUser?.id) return;
|
|
169
|
+
if (String(currentUser.id) === key) {
|
|
170
|
+
setUser(_cache.get(key) ?? null);
|
|
171
|
+
}
|
|
172
|
+
}, [key, currentUser]);
|
|
156
173
|
return user;
|
|
157
174
|
}
|
|
158
175
|
function getInitials(name) {
|
|
@@ -263,6 +280,26 @@ function UserAvatar({
|
|
|
263
280
|
] }) });
|
|
264
281
|
}
|
|
265
282
|
UserAvatar.displayName = "UserAvatar";
|
|
283
|
+
function UserDisplayName({
|
|
284
|
+
userId,
|
|
285
|
+
name: nameProp,
|
|
286
|
+
loadingFallback = "\u2026",
|
|
287
|
+
className,
|
|
288
|
+
style
|
|
289
|
+
}) {
|
|
290
|
+
const resolved = useResolvedUser(!nameProp && userId != null ? userId : null);
|
|
291
|
+
const isLoading = !nameProp && userId != null && resolved === void 0;
|
|
292
|
+
const displayName = nameProp ?? resolved?.name ?? (isLoading ? loadingFallback : "?");
|
|
293
|
+
return /* @__PURE__ */ jsx(
|
|
294
|
+
"span",
|
|
295
|
+
{
|
|
296
|
+
className: cn(isLoading && "animate-pulse opacity-60", className),
|
|
297
|
+
style,
|
|
298
|
+
title: displayName,
|
|
299
|
+
children: displayName
|
|
300
|
+
}
|
|
301
|
+
);
|
|
302
|
+
}
|
|
266
303
|
var Progress = React5.forwardRef(({ className, value, showLabel, label, variant = "default", ...props }, ref) => /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
267
304
|
(label || showLabel) && /* @__PURE__ */ jsxs("div", { className: "flex items-end justify-between", children: [
|
|
268
305
|
label && /* @__PURE__ */ jsx("span", { className: "text-label uppercase tracking-widest text-org-text-muted", children: label }),
|
|
@@ -5631,8 +5668,25 @@ function LabelItem({ label, onRemove, showDelete = true }) {
|
|
|
5631
5668
|
}
|
|
5632
5669
|
function AssigneeItem({ assignee, onRemove, showDelete = true }) {
|
|
5633
5670
|
return /* @__PURE__ */ jsxs("div", { className: "group relative inline-flex items-center gap-2 px-3 py-1.5 bg-theme-subtle border border-theme-subtle rounded-full", children: [
|
|
5634
|
-
/* @__PURE__ */ jsx(
|
|
5635
|
-
|
|
5671
|
+
/* @__PURE__ */ jsx(
|
|
5672
|
+
UserAvatar,
|
|
5673
|
+
{
|
|
5674
|
+
userId: assignee.id,
|
|
5675
|
+
name: assignee.name,
|
|
5676
|
+
src: assignee.avatarUrl,
|
|
5677
|
+
size: "sm",
|
|
5678
|
+
showHoverInfo: false,
|
|
5679
|
+
className: "w-5 h-5"
|
|
5680
|
+
}
|
|
5681
|
+
),
|
|
5682
|
+
/* @__PURE__ */ jsx(
|
|
5683
|
+
UserDisplayName,
|
|
5684
|
+
{
|
|
5685
|
+
userId: assignee.id,
|
|
5686
|
+
name: assignee.name,
|
|
5687
|
+
className: "text-xs font-medium text-theme"
|
|
5688
|
+
}
|
|
5689
|
+
),
|
|
5636
5690
|
showDelete && onRemove && /* @__PURE__ */ jsx(
|
|
5637
5691
|
"button",
|
|
5638
5692
|
{
|
|
@@ -6022,8 +6076,8 @@ function TaskDetailContent({
|
|
|
6022
6076
|
onToggleAssignee && availableUsers ? /* @__PURE__ */ jsx(
|
|
6023
6077
|
AssigneePicker,
|
|
6024
6078
|
{
|
|
6025
|
-
selectedAssignees: task.assignees.map((a) => ({ id: a.id, name: a.name, avatarUrl: a.avatarUrl })),
|
|
6026
|
-
availableUsers: availableUsers.map((a) => ({ id: a.id, name: a.name, avatarUrl: a.avatarUrl })),
|
|
6079
|
+
selectedAssignees: task.assignees.map((a) => ({ id: a.id, name: a.name ?? "", avatarUrl: a.avatarUrl })),
|
|
6080
|
+
availableUsers: availableUsers.map((a) => ({ id: a.id, name: a.name ?? "", avatarUrl: a.avatarUrl })),
|
|
6027
6081
|
onToggle: (assignee) => onToggleAssignee(task.id, { id: assignee.id, name: assignee.name, avatarUrl: assignee.avatarUrl })
|
|
6028
6082
|
}
|
|
6029
6083
|
) : onAddAssignee ? /* @__PURE__ */ jsxs(
|
|
@@ -6055,8 +6109,8 @@ function TaskDetailContent({
|
|
|
6055
6109
|
onToggleAssigneeGroup && /* @__PURE__ */ jsx(
|
|
6056
6110
|
AssigneePicker,
|
|
6057
6111
|
{
|
|
6058
|
-
selectedAssignees: task.assigneeGroup ? [{ id: task.assigneeGroup.id, name: task.assigneeGroup.name, avatarUrl: task.assigneeGroup.avatarUrl }] : [],
|
|
6059
|
-
availableUsers: availableGroups.map((g) => ({ id: g.id, name: g.name, avatarUrl: g.avatarUrl })),
|
|
6112
|
+
selectedAssignees: task.assigneeGroup ? [{ id: task.assigneeGroup.id, name: task.assigneeGroup.name ?? "", avatarUrl: task.assigneeGroup.avatarUrl }] : [],
|
|
6113
|
+
availableUsers: availableGroups.map((g) => ({ id: g.id, name: g.name ?? "", avatarUrl: g.avatarUrl })),
|
|
6060
6114
|
onToggle: (group) => {
|
|
6061
6115
|
const isSame = task.assigneeGroup?.id === group.id;
|
|
6062
6116
|
onToggleAssigneeGroup(task.id, isSame ? null : { id: group.id, name: group.name, avatarUrl: group.avatarUrl });
|
|
@@ -6309,7 +6363,7 @@ function toDetailData(task) {
|
|
|
6309
6363
|
const labels = (task.labels || []).map(
|
|
6310
6364
|
(label, i) => typeof label === "string" ? { id: `label-${i}`, name: label, color: "#6b7280" } : label
|
|
6311
6365
|
);
|
|
6312
|
-
const assignees = task.assignees ? task.assignees.map((a) => ({ id: a.id, name: a.name, avatarUrl: a.avatarUrl || void 0 })) : task.assignee ? [{ id: task.assignee.id || "legacy", name: task.assignee.name, avatarUrl: task.assignee.avatarUrl || void 0 }] : [];
|
|
6366
|
+
const assignees = task.assignees ? task.assignees.map((a) => ({ id: a.id, name: a.name, avatarUrl: a.avatarUrl || void 0 })) : task.assignee ? [{ id: task.assignee.id || "legacy", name: task.assignee.name ?? void 0, avatarUrl: task.assignee.avatarUrl || void 0 }] : [];
|
|
6313
6367
|
return {
|
|
6314
6368
|
id: task.id,
|
|
6315
6369
|
title: task.title,
|
|
@@ -6498,6 +6552,7 @@ function TaskCard({
|
|
|
6498
6552
|
task.assignees.slice(0, 2).map((assignee) => /* @__PURE__ */ jsx(
|
|
6499
6553
|
UserAvatar,
|
|
6500
6554
|
{
|
|
6555
|
+
userId: assignee.id,
|
|
6501
6556
|
name: assignee.name,
|
|
6502
6557
|
src: assignee.avatarUrl,
|
|
6503
6558
|
size: "sm",
|
|
@@ -6510,7 +6565,6 @@ function TaskCard({
|
|
|
6510
6565
|
"div",
|
|
6511
6566
|
{
|
|
6512
6567
|
className: "w-5 h-5 rounded-full bg-primary/10 flex items-center justify-center text-[10px] font-bold text-primary-light border border-primary/20",
|
|
6513
|
-
title: task.assignees.slice(2).map((a) => a.name).join(", "),
|
|
6514
6568
|
children: [
|
|
6515
6569
|
"+",
|
|
6516
6570
|
task.assignees.length - 2
|
|
@@ -6518,10 +6572,33 @@ function TaskCard({
|
|
|
6518
6572
|
}
|
|
6519
6573
|
)
|
|
6520
6574
|
] }),
|
|
6521
|
-
/* @__PURE__ */ jsx(
|
|
6575
|
+
/* @__PURE__ */ jsx(
|
|
6576
|
+
UserDisplayName,
|
|
6577
|
+
{
|
|
6578
|
+
userId: task.assignees[0].id,
|
|
6579
|
+
name: task.assignees[0].name,
|
|
6580
|
+
className: "text-xs text-theme-muted truncate max-w-24"
|
|
6581
|
+
}
|
|
6582
|
+
)
|
|
6522
6583
|
] }) : task.assignee ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 mt-1", children: [
|
|
6523
|
-
/* @__PURE__ */ jsx(
|
|
6524
|
-
|
|
6584
|
+
/* @__PURE__ */ jsx(
|
|
6585
|
+
UserAvatar,
|
|
6586
|
+
{
|
|
6587
|
+
userId: task.assignee.id,
|
|
6588
|
+
name: task.assignee.name,
|
|
6589
|
+
src: task.assignee.avatarUrl,
|
|
6590
|
+
size: "sm",
|
|
6591
|
+
className: "h-5 w-5"
|
|
6592
|
+
}
|
|
6593
|
+
),
|
|
6594
|
+
/* @__PURE__ */ jsx(
|
|
6595
|
+
UserDisplayName,
|
|
6596
|
+
{
|
|
6597
|
+
userId: task.assignee.id,
|
|
6598
|
+
name: task.assignee.name,
|
|
6599
|
+
className: "text-xs text-theme-muted truncate max-w-24"
|
|
6600
|
+
}
|
|
6601
|
+
)
|
|
6525
6602
|
] }) : null,
|
|
6526
6603
|
!compact && task.dueDate && /* @__PURE__ */ jsx("div", { className: "mt-1", children: /* @__PURE__ */ jsx(DueDateBadge, { date: task.dueDate }) }),
|
|
6527
6604
|
/* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute bottom-0 right-0 h-3 w-3 border-b border-r border-primary/20" })
|
|
@@ -6678,8 +6755,25 @@ function TaskDetailDialog({
|
|
|
6678
6755
|
{
|
|
6679
6756
|
className: "flex items-center gap-2 px-3 py-2 bg-muted rounded-full",
|
|
6680
6757
|
children: [
|
|
6681
|
-
/* @__PURE__ */ jsx(
|
|
6682
|
-
|
|
6758
|
+
/* @__PURE__ */ jsx(
|
|
6759
|
+
UserAvatar,
|
|
6760
|
+
{
|
|
6761
|
+
userId: assignee.id,
|
|
6762
|
+
name: assignee.name,
|
|
6763
|
+
src: assignee.avatarUrl,
|
|
6764
|
+
size: "sm",
|
|
6765
|
+
showHoverInfo: false,
|
|
6766
|
+
className: "w-6 h-6"
|
|
6767
|
+
}
|
|
6768
|
+
),
|
|
6769
|
+
/* @__PURE__ */ jsx(
|
|
6770
|
+
UserDisplayName,
|
|
6771
|
+
{
|
|
6772
|
+
userId: assignee.id,
|
|
6773
|
+
name: assignee.name,
|
|
6774
|
+
className: "text-sm font-medium"
|
|
6775
|
+
}
|
|
6776
|
+
)
|
|
6683
6777
|
]
|
|
6684
6778
|
},
|
|
6685
6779
|
assignee.id
|
|
@@ -6898,8 +6992,8 @@ function TaskCard2({
|
|
|
6898
6992
|
] })
|
|
6899
6993
|
] }),
|
|
6900
6994
|
task.assignee && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 mt-1", children: [
|
|
6901
|
-
/* @__PURE__ */ jsx("div", { className: "w-5 h-5 rounded-full bg-primary/20 flex items-center justify-center text-[10px] font-semibold text-primary-light", children: task.assignee.name
|
|
6902
|
-
/* @__PURE__ */ jsx("span", { className: "text-xs text-theme-muted", children: task.assignee.name })
|
|
6995
|
+
/* @__PURE__ */ jsx("div", { className: "w-5 h-5 rounded-full bg-primary/20 flex items-center justify-center text-[10px] font-semibold text-primary-light", children: task.assignee.name?.charAt(0) ?? "?" }),
|
|
6996
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs text-theme-muted", children: task.assignee.name ?? "" })
|
|
6903
6997
|
] }),
|
|
6904
6998
|
/* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute bottom-0 right-0 h-3 w-3 border-b border-r border-primary/20" })
|
|
6905
6999
|
]
|
|
@@ -9536,6 +9630,6 @@ function InviteMemberDialog({
|
|
|
9536
9630
|
);
|
|
9537
9631
|
}
|
|
9538
9632
|
|
|
9539
|
-
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, invalidateUserCache, metricCardVariants, priorityConfig, resolveUser, seedUserCache, statusPillVariants, useCurrentUser, useMediaQuery, useResolvedUser };
|
|
9633
|
+
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, UserDisplayName, WorkspaceSwitcher, emptyMediaVariants, geometricIconVariants, glassPanelVariants, invalidateUserCache, metricCardVariants, priorityConfig, resolveUser, seedUserCache, statusPillVariants, useCurrentUser, useMediaQuery, useResolvedUser };
|
|
9540
9634
|
//# sourceMappingURL=index.js.map
|
|
9541
9635
|
//# sourceMappingURL=index.js.map
|