Skip to content

Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active

🪟 feat: DataTable update + Various UI enhancements (#9698)

Marco Berettab4b5a2cd6949
diff --git a/api/models/Conversation.js b/api/models/Conversation.js
index 13c329aa4a..6428d3970a 100644
--- a/api/models/Conversation.js
+++ b/api/models/Conversation.js
@@ -28,7 +28,7 @@ const getConvo = async (user, conversationId) => {
return await Conversation.findOne({ user, conversationId }).lean();
} catch (error) {
logger.error('[getConvo] Error getting single conversation', error);
- return { message: 'Error getting single conversation' };
+ throw new Error('Error getting single conversation');
}
};
@@ -151,13 +151,21 @@ module.exports = {
const result = await Conversation.bulkWrite(bulkOps);
return result;
} catch (error) {
- logger.error('[saveBulkConversations] Error saving conversations in bulk', error);
+ logger.error('[bulkSaveConvos] Error saving conversations in bulk', error);
throw new Error('Failed to save conversations in bulk.');
}
},
getConvosByCursor: async (
user,
- { cursor, limit = 25, isArchived = false, tags, search, order = 'desc' } = {},
+ {
+ cursor,
+ limit = 25,
+ isArchived = false,
+ tags,
+ search,
+ sortBy = 'createdAt',
+ sortDirection = 'desc',
+ } = {},
) => {
const filters = [{ user }];
if (isArchived) {
@@ -184,35 +192,77 @@ module.exports = {
filters.push({ conversationId: { $in: matchingIds } });
} catch (error) {
logger.error('[getConvosByCursor] Error during meiliSearch', error);
- return { message: 'Error during meiliSearch' };
+ throw new Error('Error during meiliSearch');
}
}
+ const validSortFields = ['title', 'createdAt', 'updatedAt'];
+ if (!validSortFields.includes(sortBy)) {
+ throw new Error(
+ `Invalid sortBy field: ${sortBy}. Must be one of ${validSortFields.join(', ')}`,
+ );
+ }
+ const finalSortBy = sortBy;
+ const finalSortDirection = sortDirection === 'asc' ? 'asc' : 'desc';
+
+ let cursorFilter = null;
if (cursor) {
- filters.push({ updatedAt: { $lt: new Date(cursor) } });
+ try {
+ const decoded = JSON.parse(Buffer.from(cursor, 'base64').toString());
+ const { primary, secondary } = decoded;
+ const primaryValue = finalSortBy === 'title' ? primary : new Date(primary);
+ const secondaryValue = new Date(secondary);
+ const op = finalSortDirection === 'asc' ? '$gt' : '$lt';
+
+ cursorFilter = {
+ $or: [
+ { [finalSortBy]: { [op]: primaryValue } },
+ {
+ [finalSortBy]: primaryValue,
+ updatedAt: { [op]: secondaryValue },
+ },
+ ],
+ };
+ } catch (err) {
+ logger.warn('[getConvosByCursor] Invalid cursor format, starting from beginning');
+ }
+ if (cursorFilter) {
+ filters.push(cursorFilter);
+ }
}
const query = filters.length === 1 ? filters[0] : { $and: filters };
try {
+ const sortOrder = finalSortDirection === 'asc' ? 1 : -1;
+ const sortObj = { [finalSortBy]: sortOrder };
+
+ if (finalSortBy !== 'updatedAt') {
+ sortObj.updatedAt = sortOrder;
+ }
+
const convos = await Conversation.find(query)
.select(
'conversationId endpoint title createdAt updatedAt user model agent_id assistant_id spec iconURL',
)
- .sort({ updatedAt: order === 'asc' ? 1 : -1 })
+ .sort(sortObj)
.limit(limit + 1)
.lean();
let nextCursor = null;
if (convos.length > limit) {
const lastConvo = convos.pop();
- nextCursor = lastConvo.updatedAt.toISOString();
+ const primaryValue = lastConvo[finalSortBy];
+ const primaryStr = finalSortBy === 'title' ? primaryValue : primaryValue.toISOString();
+ const secondaryStr = lastConvo.updatedAt.toISOString();
+ const composite = { primary: primaryStr, secondary: secondaryStr };
+ nextCursor = Buffer.from(JSON.stringify(composite)).toString('base64');
}
return { conversations: convos, nextCursor };
} catch (error) {
logger.error('[getConvosByCursor] Error getting conversations', error);
- return { message: 'Error getting conversations' };
+ throw new Error('Error getting conversations');
}
},
getConvosQueried: async (user, convoIds, cursor = null, limit = 25) => {
@@ -252,7 +302,7 @@ module.exports = {
return { conversations: limited, nextCursor, convoMap };
} catch (error) {
logger.error('[getConvosQueried] Error getting conversations', error);
- return { message: 'Error fetching conversations' };
+ throw new Error('Error fetching conversations');
}
},
getConvo,
@@ -269,7 +319,7 @@ module.exports = {
}
} catch (error) {
logger.error('[getConvoTitle] Error getting conversation title', error);
- return { message: 'Error getting conversation title' };
+ throw new Error('Error getting conversation title');
}
},
/**
diff --git a/api/server/routes/convos.js b/api/server/routes/convos.js
index 766b2a21b0..ad82ede10a 100644
--- a/api/server/routes/convos.js
+++ b/api/server/routes/convos.js
@@ -31,7 +31,8 @@ router.get('/', async (req, res) => {
const cursor = req.query.cursor;
const isArchived = isEnabled(req.query.isArchived);
const search = req.query.search ? decodeURIComponent(req.query.search) : undefined;
- const order = req.query.order || 'desc';
+ const sortBy = req.query.sortBy || 'createdAt';
+ const sortDirection = req.query.sortDirection || 'desc';
let tags;
if (req.query.tags) {
@@ -45,7 +46,8 @@ router.get('/', async (req, res) => {
isArchived,
tags,
search,
- order,
+ sortBy,
+ sortDirection,
});
res.status(200).json(result);
} catch (error) {
diff --git a/client/src/components/Chat/Input/Artifacts.tsx b/client/src/components/Chat/Input/Artifacts.tsx
index 2840fc2653..6df404f451 100644
--- a/client/src/components/Chat/Input/Artifacts.tsx
+++ b/client/src/components/Chat/Input/Artifacts.tsx
@@ -1,4 +1,4 @@
-import React, { memo, useState, useCallback, useMemo } from 'react';
+import React, { memo, useState, useCallback, useMemo, useEffect } from 'react';
import * as Ariakit from '@ariakit/react';
import { CheckboxButton } from '@librechat/client';
import { ArtifactModes } from 'librechat-data-provider';
@@ -18,6 +18,7 @@ function Artifacts() {
const { toggleState, debouncedChange, isPinned } = artifacts;
const [isPopoverOpen, setIsPopoverOpen] = useState(false);
+ const [isButtonExpanded, setIsButtonExpanded] = useState(false);
const currentState = useMemo<ArtifactsToggleState>(() => {
if (typeof toggleState === 'string' && toggleState) {
@@ -33,11 +34,26 @@ function Artifacts() {
const handleToggle = useCallback(() => {
if (isEnabled) {
debouncedChange({ value: '' });
+ setIsButtonExpanded(false);
} else {
debouncedChange({ value: ArtifactModes.DEFAULT });
}
}, [isEnabled, debouncedChange]);
+ const handleMenuButtonClick = useCallback(
+ (e: React.MouseEvent) => {
+ e.stopPropagation();
+ setIsButtonExpanded(!isButtonExpanded);
+ },
+ [isButtonExpanded],
+ );
+
+ useEffect(() => {
+ if (!isPopoverOpen) {
+ setIsButtonExpanded(false);
+ }
+ }, [isPopoverOpen]);
+
const handleShadcnToggle = useCallback(() => {
if (isShadcnEnabled) {
debouncedChange({ value: ArtifactModes.DEFAULT });
@@ -77,21 +93,24 @@ function Artifacts() {
'border-amber-600/40 bg-amber-500/10 hover:bg-amber-700/10',
'transition-colors',
)}
- onClick={(e) => e.stopPropagation()}
+ onClick={handleMenuButtonClick}
>
- <ChevronDown className="ml-1 h-4 w-4 text-text-secondary md:ml-0" aria-hidden="true" />
+ <ChevronDown
+ className={cn(
+ 'ml-1 h-4 w-4 text-text-secondary transition-transform duration-300 md:ml-0.5',
+ isButtonExpanded && 'rotate-180',
+ )}
+ aria-hidden="true" />
</Ariakit.MenuButton>
<Ariakit.Menu
- gutter={8}
+ gutter={4}
className={cn(
- 'animate-popover z-50 flex max-h-[300px]',
- 'flex-col overflow-auto overscroll-contain rounded-xl',
- 'bg-surface-secondary px-1.5 py-1 text-text-primary shadow-lg',
- 'border border-border-light',
- 'min-w-[250px] outline-none',
+ 'animate-popover-top-left z-50 flex min-w-[250px] flex-col rounded-xl',
+ 'border border-border-light bg-surface-secondary shadow-lg',
)}
- portal
+ portal={true}
+ unmountOnHide={true}
>
<div className="px-2 py-1.5">
<div className="mb-2 text-xs font-medium text-text-secondary">
@@ -106,18 +125,16 @@ function Artifacts() {
event.stopPropagation();
handleShadcnToggle();
}}
- disabled={isCustomEnabled}
className={cn(
- 'mb-1 flex items-center justify-between rounded-lg px-2 py-2',
- 'cursor-pointer outline-none transition-colors',
- 'hover:bg-black/[0.075] dark:hover:bg-white/10',
- 'data-[active-item]:bg-black/[0.075] dark:data-[active-item]:bg-white/10',
- isCustomEnabled && 'cursor-not-allowed opacity-50',
+ 'mb-1 flex items-center justify-between gap-2 rounded-lg px-2 py-2',
+ 'cursor-pointer bg-surface-secondary text-text-primary outline-none transition-colors',
+ 'hover:bg-surface-hover data-[active-item]:bg-surface-hover',
+ isShadcnEnabled && 'bg-surface-active',
)}
>
- <div className="flex items-center gap-2">
+ <span className="text-sm">{localize('com_ui_include_shadcnui' as any)}</span>
+ <div className="ml-auto flex items-center">
<Ariakit.MenuItemCheck checked={isShadcnEnabled} />
- <span className="text-sm">{localize('com_ui_include_shadcnui' as any)}</span>
</div>
</Ariakit.MenuItem>
@@ -130,15 +147,15 @@ function Artifacts() {
handleCustomToggle();
}}
className={cn(
- 'flex items-center justify-between rounded-lg px-2 py-2',
- 'cursor-pointer outline-none transition-colors',
- 'hover:bg-black/[0.075] dark:hover:bg-white/10',
- 'data-[active-item]:bg-black/[0.075] dark:data-[active-item]:bg-white/10',
+ 'mb-1 flex items-center justify-between gap-2 rounded-lg px-2 py-2',
+ 'cursor-pointer bg-surface-secondary text-text-primary outline-none transition-colors',
+ 'hover:bg-surface-hover data-[active-item]:bg-surface-hover',
+ isCustomEnabled && 'bg-surface-active',
)}
>
- <div className="flex items-center gap-2">
+ <span className="text-sm">{localize('com_ui_custom_prompt_mode' as any)}</span>
+ <div className="ml-auto flex items-center">
<Ariakit.MenuItemCheck checked={isCustomEnabled} />
- <span className="text-sm">{localize('com_ui_custom_prompt_mode' as any)}</span>
</div>
</Ariakit.MenuItem>
</div>
diff --git a/client/src/components/Chat/Input/ArtifactsSubMenu.tsx b/client/src/components/Chat/Input/ArtifactsSubMenu.tsx
index 45c98b82e7..9fda9c1ad8 100644
--- a/client/src/components/Chat/Input/ArtifactsSubMenu.tsx
+++ b/client/src/components/Chat/Input/ArtifactsSubMenu.tsx
@@ -90,8 +90,8 @@ const ArtifactsSubMenu = React.forwardRef<HTMLDivElement, ArtifactsSubMenuProps>
portal={true}
unmountOnHide={true}
className={cn(
- 'animate-popover-left z-50 ml-3 flex min-w-[250px] flex-col rounded-xl',
- 'border border-border-light bg-surface-secondary px-1.5 py-1 shadow-lg',
+ 'animate-popover-left z-50 ml-3 mt-6 flex min-w-[250px] flex-col rounded-xl',
+ 'border border-border-light bg-surface-secondary shadow-lg',
)}
>
<div className="px-2 py-1.5">
@@ -107,18 +107,16 @@ const ArtifactsSubMenu = React.forwardRef<HTMLDivElement, ArtifactsSubMenuProps>
event.stopPropagation();
handleShadcnToggle();
}}
- disabled={isCustomEnabled}
className={cn(
- 'mb-1 flex items-center justify-between rounded-lg px-2 py-2',
- 'cursor-pointer text-text-primary outline-none transition-colors',
- 'hover:bg-black/[0.075] dark:hover:bg-white/10',
- 'data-[active-item]:bg-black/[0.075] dark:data-[active-item]:bg-white/10',
- isCustomEnabled && 'cursor-not-allowed opacity-50',
+ 'mb-1 flex items-center justify-between gap-2 rounded-lg px-2 py-2',
+ 'cursor-pointer bg-surface-secondary text-text-primary outline-none transition-colors',
+ 'hover:bg-surface-hover data-[active-item]:bg-surface-hover',
+ isShadcnEnabled && 'bg-surface-active',
)}
>
- <div className="flex items-center gap-2">
+ <span className="text-sm">{localize('com_ui_include_shadcnui' as any)}</span>
+ <div className="ml-auto flex items-center">
<Ariakit.MenuItemCheck checked={isShadcnEnabled} />
- <span className="text-sm">{localize('com_ui_include_shadcnui' as any)}</span>
</div>
</Ariakit.MenuItem>
@@ -131,15 +129,15 @@ const ArtifactsSubMenu = React.forwardRef<HTMLDivElement, ArtifactsSubMenuProps>
handleCustomToggle();
}}
className={cn(
- 'flex items-center justify-between rounded-lg px-2 py-2',
- 'cursor-pointer text-text-primary outline-none transition-colors',
- 'hover:bg-black/[0.075] dark:hover:bg-white/10',
- 'data-[active-item]:bg-black/[0.075] dark:data-[active-item]:bg-white/10',
+ 'mb-1 flex items-center justify-between gap-2 rounded-lg px-2 py-2',
+ 'cursor-pointer bg-surface-secondary text-text-primary outline-none transition-colors',
+ 'hover:bg-surface-hover data-[active-item]:bg-surface-hover',
+ isCustomEnabled && 'bg-surface-active',
)}
>
- <div className="flex items-center gap-2">
+ <span className="text-sm">{localize('com_ui_custom_prompt_mode' as any)}</span>
+ <div className="ml-auto flex items-center">
<Ariakit.MenuItemCheck checked={isCustomEnabled} />
- <span className="text-sm">{localize('com_ui_custom_prompt_mode' as any)}</span>
</div>
</Ariakit.MenuItem>
</div>
diff --git a/client/src/components/Chat/Input/ChatForm.tsx b/client/src/components/Chat/Input/ChatForm.tsx
index edd12bd3ac..8cccf6cf53 100644
--- a/client/src/components/Chat/Input/ChatForm.tsx
+++ b/client/src/components/Chat/Input/ChatForm.tsx
@@ -251,6 +251,7 @@ const ChatForm = memo(({ index = 0 }: { index?: number }) => {
)}
>
<TextareaHeader addedConvo={addedConvo} setAddedConvo={setAddedConvo} />
+ {/* WIP */}
<EditBadges
isEditingChatBadges={isEditingBadges}
handleCancelBadges={handleCancelBadges}
diff --git a/client/src/components/Chat/Input/Files/AttachFileMenu.tsx b/client/src/components/Chat/Input/Files/AttachFileMenu.tsx
index 03b3db4343..f34303047a 100644
--- a/client/src/components/Chat/Input/Files/AttachFileMenu.tsx
+++ b/client/src/components/Chat/Input/Files/AttachFileMenu.tsx
@@ -221,6 +221,7 @@ const AttachFileMenu = ({
aria-label="Attach File Options"
className={cn(
'flex size-9 items-center justify-center rounded-full p-1 transition-colors hover:bg-surface-hover focus:outline-none focus:ring-2 focus:ring-primary focus:ring-opacity-50',
+ isPopoverActive && 'bg-surface-hover',
)}
>
<div className="flex w-full items-center justify-center gap-2">
diff --git a/client/src/components/Chat/Input/Files/Table/Columns.tsx b/client/src/components/Chat/Input/Files/Table/Columns.tsx
index 3cdeaff232..568bd13d66 100644
--- a/client/src/components/Chat/Input/Files/Table/Columns.tsx
+++ b/client/src/components/Chat/Input/Files/Table/Columns.tsx
@@ -1,13 +1,7 @@
/* eslint-disable react-hooks/rules-of-hooks */
-import { ArrowUpDown, Database } from 'lucide-react';
+import { Database } from 'lucide-react';
import { FileSources, FileContext } from 'librechat-data-provider';
-import {
- Button,
- Checkbox,
- OpenAIMinimalIcon,
- AzureMinimalIcon,
- useMediaQuery,
-} from '@librechat/client';
+import { Checkbox, OpenAIMinimalIcon, AzureMinimalIcon, useMediaQuery } from '@librechat/client';
import type { ColumnDef } from '@tanstack/react-table';
import type { TFile } from 'librechat-data-provider';
import ImagePreview from '~/components/Chat/Input/Files/ImagePreview';
@@ -61,16 +55,7 @@ export const columns: ColumnDef<TFile>[] = [
accessorKey: 'filename',
header: ({ column }) => {
const localize = useLocalize();
- return (
- <Button
- variant="ghost"
- className="px-2 py-0 text-xs hover:bg-surface-hover sm:px-2 sm:py-2 sm:text-sm"
- onClick={() => column.toggleSorting(column.getIsSorted() === 'asc')}
- >
- {localize('com_ui_name')}
- <ArrowUpDown className="ml-2 h-3 w-4 sm:h-4 sm:w-4" aria-hidden="true" />
- </Button>
- );
+ return <SortFilterHeader column={column} title={localize('com_ui_name')} aria-hidden="true" />;
},
cell: ({ row }) => {
const file = row.original;
@@ -100,16 +85,7 @@ export const columns: ColumnDef<TFile>[] = [
accessorKey: 'updatedAt',
header: ({ column }) => {
const localize = useLocalize();
- return (
- <Button
- variant="ghost"
- onClick={() => column.toggleSorting(column.getIsSorted() === 'asc')}
- className="px-2 py-0 text-xs hover:bg-surface-hover sm:px-2 sm:py-2 sm:text-sm"
- >
- {localize('com_ui_date')}
- <ArrowUpDown className="ml-2 h-3 w-4 sm:h-4 sm:w-4" aria-hidden="true" />
- </Button>
- );
+ return <SortFilterHeader column={column} title={localize('com_ui_date')} aria-hidden="true" />;
},
cell: ({ row }) => {
const isSmallScreen = useMediaQuery('(max-width: 768px)');
@@ -197,16 +173,7 @@ export const columns: ColumnDef<TFile>[] = [
accessorKey: 'bytes',
header: ({ column }) => {
const localize = useLocalize();
- return (
- <Button
- variant="ghost"
- className="px-2 py-0 text-xs hover:bg-surface-hover sm:px-2 sm:py-2 sm:text-sm"
- onClick={() => column.toggleSorting(column.getIsSorted() === 'asc')}
- >
- {localize('com_ui_size')}
- <ArrowUpDown className="ml-2 h-3 w-4 sm:h-4 sm:w-4" aria-hidden="true" />
- </Button>
- );
+ return <SortFilterHeader column={column} title={localize('com_ui_size')} aria-hidden="true" />;
},
cell: ({ row }) => {
const suffix = ' MB';
diff --git a/client/src/components/Chat/Input/MCPSelect.tsx b/client/src/components/Chat/Input/MCPSelect.tsx
index 12b6bd627e..90e22ce17c 100644
--- a/client/src/components/Chat/Input/MCPSelect.tsx
+++ b/client/src/components/Chat/Input/MCPSelect.tsx
@@ -5,6 +5,7 @@ import MCPServerStatusIcon from '~/components/MCP/MCPServerStatusIcon';
import MCPConfigDialog from '~/components/MCP/MCPConfigDialog';
import { useBadgeRowContext } from '~/Providers';
import { useHasAccess } from '~/hooks';
+import { cn } from '~/utils';
function MCPSelectContent() {
const { conversationId, mcpServerManager } = useBadgeRowContext();
@@ -97,7 +98,10 @@ function MCPSelectContent() {
className="badge-icon min-w-fit"
selectIcon={<MCPIcon className="icon-md text-text-primary" />}
selectItemsClassName="border border-blue-600/50 bg-blue-500/10 hover:bg-blue-700/10"
- selectClassName="group relative inline-flex items-center justify-center md:justify-start gap-1.5 rounded-full border border-border-medium text-sm font-medium transition-all md:w-full size-9 p-2 md:p-3 bg-transparent shadow-sm hover:bg-surface-hover hover:shadow-md active:shadow-inner"
+ selectClassName={cn(
+ 'group relative inline-flex items-center justify-center md:justify-start gap-1.5 rounded-full border border-border-medium text-sm font-medium transition-all',
+ 'md:w-full size-9 p-2 md:p-3 bg-transparent shadow-sm hover:bg-surface-hover hover:shadow-md active:shadow-inner',
+ )}
/>
{configDialogProps && (
<MCPConfigDialog {...configDialogProps} conversationId={conversationId} />
diff --git a/client/src/components/Chat/Input/MCPSubMenu.tsx b/client/src/components/Chat/Input/MCPSubMenu.tsx
index fc4152be5c..38e6167b65 100644
--- a/client/src/components/Chat/Input/MCPSubMenu.tsx
+++ b/client/src/components/Chat/Input/MCPSubMenu.tsx
@@ -108,6 +108,7 @@ const MCPSubMenu = React.forwardRef<HTMLDivElement, MCPSubMenuProps>(
'w-full min-w-0 justify-between text-sm',
isServerInitializing &&
'opacity-50 hover:bg-transparent dark:hover:bg-transparent',
+ isSelected && 'bg-surface-active',
)}
>
<div className="flex flex-grow items-center gap-2">
diff --git a/client/src/components/Chat/Input/ToolsDropdown.tsx b/client/src/components/Chat/Input/ToolsDropdown.tsx
index 1acb381b2d..af464dfe39 100644
--- a/client/src/components/Chat/Input/ToolsDropdown.tsx
+++ b/client/src/components/Chat/Input/ToolsDropdown.tsx
@@ -312,10 +312,11 @@ const ToolsDropdown = ({ disabled }: ToolsDropdownProps) => {
aria-label="Tools Options"
className={cn(
'flex size-9 items-center justify-center rounded-full p-1 transition-colors hover:bg-surface-hover focus:outline-none focus:ring-2 focus:ring-primary focus:ring-opacity-50',
+ isPopoverActive && 'bg-surface-hover',
)}
>
<div className="flex w-full items-center justify-center gap-2">
- <Settings2 className="icon-md" aria-hidden="true" />
+ <Settings2 className="size-5" aria-hidden="true" />
</div>
</Ariakit.MenuButton>
}
diff --git a/client/src/components/Nav/AccountSettings.tsx b/client/src/components/Nav/AccountSettings.tsx
index 3bf37d9c1a..36e1e256fd 100644
--- a/client/src/components/Nav/AccountSettings.tsx
+++ b/client/src/components/Nav/AccountSettings.tsx
@@ -25,7 +25,7 @@ function AccountSettings() {
<Select.Select
aria-label={localize('com_nav_account_settings')}
data-testid="nav-user"
- className="mt-text-sm flex h-auto w-full items-center gap-2 rounded-xl p-2 text-sm transition-all duration-200 ease-in-out hover:bg-surface-hover"
+ className="mt-text-sm flex h-auto w-full items-center gap-2 rounded-xl p-2 text-sm transition-all duration-200 ease-in-out hover:bg-surface-hover aria-[expanded=true]:bg-surface-hover"
>
<div className="-ml-0.9 -mt-0.8 h-8 w-8 flex-shrink-0">
<div className="relative flex">
@@ -40,11 +40,10 @@ function AccountSettings() {
</div>
</Select.Select>
<Select.SelectPopover
- className="popover-ui w-[235px]"
+ className="popover-ui w-[305px] rounded-lg md:w-[235px]"
style={{
transformOrigin: 'bottom',
- marginRight: '0px',
- translate: '0px',
+ translate: '0 -4px',
}}
>
<div className="text-token-text-secondary ml-3 mr-2 py-2 text-sm" role="note">
diff --git a/client/src/components/Nav/Nav.tsx b/client/src/components/Nav/Nav.tsx
index 60486f96c8..16b8329483 100644
--- a/client/src/components/Nav/Nav.tsx
+++ b/client/src/components/Nav/Nav.tsx
@@ -1,6 +1,5 @@
import { useCallback, useEffect, useState, useMemo, memo, lazy, Suspense, useRef } from 'react';
import { useRecoilValue } from 'recoil';
-import { List } from 'react-virtualized';
import { AnimatePresence, motion } from 'framer-motion';
import { Skeleton, useMediaQuery } from '@librechat/client';
import { PermissionTypes, Permissions } from 'librechat-data-provider';
@@ -244,7 +243,7 @@ const Nav = memo(
/>
</div>
</div>
- <Suspense fallback={null}>
+ <Suspense fallback={<Skeleton className="mt-1 h-12 w-full rounded-xl" />}>
<AccountSettings />
</Suspense>
</nav>
diff --git a/client/src/components/Nav/SettingsTabs/Data/ImportConversations.tsx b/client/src/components/Nav/SettingsTabs/Data/ImportConversations.tsx
index 96ddfb88e4..3f0b288c93 100644
--- a/client/src/components/Nav/SettingsTabs/Data/ImportConversations.tsx
+++ b/client/src/components/Nav/SettingsTabs/Data/ImportConversations.tsx
@@ -118,11 +118,16 @@ function ImportConversations() {
aria-labelledby="import-conversation-label"
>
{isUploading ? (
- <Spinner className="mr-1 w-4" />
+ <>
+ <Spinner className="mr-1 w-4" />
+ <span>{localize('com_ui_importing')}</span>
+ </>
) : (
- <Import className="mr-1 flex h-4 w-4 items-center stroke-1" aria-hidden="true" />
+ <>
+ <Import className="mr-1 flex h-4 w-4 items-center stroke-1" aria-hidden="true" />
+ <span>{localize('com_ui_import')}</span>
+ </>
)}
- <span>{localize('com_ui_import')}</span>
</Button>
<input
ref={fileInputRef}
diff --git a/client/src/components/Nav/SettingsTabs/Data/SharedLinks.tsx b/client/src/components/Nav/SettingsTabs/Data/SharedLinks.tsx
index d4020fe715..e8f00bcc77 100644
--- a/client/src/components/Nav/SettingsTabs/Data/SharedLinks.tsx
+++ b/client/src/components/Nav/SettingsTabs/Data/SharedLinks.tsx
@@ -1,17 +1,6 @@
import { useCallback, useState, useMemo, useEffect } from 'react';
-import { Trans } from 'react-i18next';
-import debounce from 'lodash/debounce';
-import { useRecoilValue } from 'recoil';
import { Link } from 'react-router-dom';
-import {
- TrashIcon,
- MessageSquare,
- ArrowUpDown,
- ArrowUp,
- ArrowDown,
- ExternalLink,
-} from 'lucide-react';
-import type { SharedLinkItem, SharedLinksListParams } from 'librechat-data-provider';
+import { TrashIcon, MessageSquare, ExternalLink } from 'lucide-react';
import {
OGDialog,
useToastContext,
@@ -21,89 +10,162 @@ import {
useMediaQuery,
OGDialogHeader,
OGDialogTitle,
+ TooltipAnchor,
DataTable,
Spinner,
Button,
Label,
} from '@librechat/client';
+import type { SharedLinkItem, SharedLinksListParams } from 'librechat-data-provider';
+import type { ColumnDef, SortingState } from '@tanstack/react-table';
import { useDeleteSharedLinkMutation, useSharedLinksQuery } from '~/data-provider';
-import { useLocalize } from '~/hooks';
import { NotificationSeverity } from '~/common';
-import { formatDate } from '~/utils';
-import store from '~/store';
-
-const PAGE_SIZE = 25;
+import { formatDate, cn } from '~/utils';
+import { useLocalize } from '~/hooks';
const DEFAULT_PARAMS: SharedLinksListParams = {
- pageSize: PAGE_SIZE,
+ pageSize: 25,
isPublic: true,
sortBy: 'createdAt',
sortDirection: 'desc',
search: '',
};
+type SortKey = 'createdAt' | 'title';
+const isSortKey = (v: string): v is SortKey => v === 'createdAt' || v === 'title';
+
+const defaultSort: SortingState = [
+ {
+ id: 'createdAt',
+ desc: true,
+ },
+];
+
+type TableColumn<TData, TValue> = ColumnDef<TData, TValue> & {
+ meta?: {
+ className?: string;
+ desktopOnly?: boolean;
+ };
+};
+
export default function SharedLinks() {
const localize = useLocalize();
const { showToast } = useToastContext();
const isSmallScreen = useMediaQuery('(max-width: 768px)');
- const isSearchEnabled = useRecoilValue(store.search);
- const [queryParams, setQueryParams] = useState<SharedLinksListParams>(DEFAULT_PARAMS);
- const [deleteRow, setDeleteRow] = useState<SharedLinkItem | null>(null);
- const [isDeleteOpen, setIsDeleteOpen] = useState(false);
+
const [isOpen, setIsOpen] = useState(false);
+ const [isDeleteOpen, setIsDeleteOpen] = useState(false);
+ const [deleteRow, setDeleteRow] = useState<SharedLinkItem | null>(null);
+
+ const [queryParams, setQueryParams] = useState<SharedLinksListParams>(DEFAULT_PARAMS);
+ const [sorting, setSorting] = useState<SortingState>(defaultSort);
+ const [searchValue, setSearchValue] = useState('');
const { data, fetchNextPage, hasNextPage, isFetchingNextPage, refetch, isLoading } =
useSharedLinksQuery(queryParams, {
enabled: isOpen,
- staleTime: 0,
- cacheTime: 5 * 60 * 1000,
+ keepPreviousData: true,
+ staleTime: 30 * 1000,
refetchOnWindowFocus: false,
refetchOnMount: false,
});
- const handleSort = useCallback((sortField: string, sortOrder: 'asc' | 'desc') => {
- setQueryParams((prev) => ({
- ...prev,
- sortBy: sortField as 'title' | 'createdAt',
- sortDirection: sortOrder,
- }));
- }, []);
+ const [allKnownLinks, setAllKnownLinks] = useState<SharedLinkItem[]>([]);
- const handleFilterChange = useCallback((value: string) => {
- const encodedValue = encodeURIComponent(value.trim());
+ const handleSearchChange = useCallback((value: string) => {
+ setSearchValue(value);
+ setAllKnownLinks([]);
setQueryParams((prev) => ({
...prev,
- search: encodedValue,
+ search: value,
}));
}, []);
- const debouncedFilterChange = useMemo(
- () => debounce(handleFilterChange, 300),
- [handleFilterChange],
+ const handleSortingChange = useCallback(
+ (updater: SortingState | ((old: SortingState) => SortingState)) => {
+ setSorting((prev) => {
+ const next = typeof updater === 'function' ? updater(prev) : updater;
+
+ const coerced = next;
+ const primary = coerced[0];
+
+ if (data?.pages) {
+ const currentFlattened = data.pages.flatMap((page) => page?.links?.filter(Boolean) ?? []);
+ setAllKnownLinks(currentFlattened);
+ }
+
+ setQueryParams((p) => {
+ let sortBy: SortKey;
+ let sortDirection: 'asc' | 'desc';
+
+ if (primary && isSortKey(primary.id)) {
+ sortBy = primary.id;
+ sortDirection = primary.desc ? 'desc' : 'asc';
+ } else {
+ sortBy = 'createdAt';
+ sortDirection = 'desc';
+ }
+
+ const newParams = {
+ ...p,
+ sortBy,
+ sortDirection,
+ };
+
+ return newParams;
+ });
+
+ return coerced;
+ });
+ },
+ [setQueryParams, data?.pages],
);
useEffect(() => {
- return () => {
- debouncedFilterChange.cancel();
- };
- }, [debouncedFilterChange]);
+ if (!data?.pages) return;
- const allLinks = useMemo(() => {
- if (!data?.pages) {
- return [];
- }
+ const newFlattened = data.pages.flatMap((page) => page?.links?.filter(Boolean) ?? []);
+
+ const toAdd = newFlattened.filter(
+ (link: SharedLinkItem) => !allKnownLinks.some((known) => known.shareId === link.shareId),
+ );
- return data.pages.flatMap((page) => page.links.filter(Boolean));
+ if (toAdd.length > 0) {
+ setAllKnownLinks((prev) => [...prev, ...toAdd]);
+ }
}, [data?.pages]);
+ const displayData = useMemo(() => {
+ const primary = sorting[0];
+ if (!primary || allKnownLinks.length === 0) return allKnownLinks;
+
+ return [...allKnownLinks].sort((a: SharedLinkItem, b: SharedLinkItem) => {
+ let compare: number;
+ if (primary.id === 'createdAt') {
+ const aDate = new Date(a.createdAt || 0);
+ const bDate = new Date(b.createdAt || 0);
+ compare = aDate.getTime() - bDate.getTime();
+ } else if (primary.id === 'title') {
+ compare = (a.title || '').localeCompare(b.title || '');
+ } else {
+ return 0;
+ }
+ return primary.desc ? -compare : compare;
+ });
+ }, [allKnownLinks, sorting]);
+
const deleteMutation = useDeleteSharedLinkMutation({
- onSuccess: async () => {
+ onSuccess: (data, variables) => {
+ const { shareId } = variables;
+ setAllKnownLinks((prev) => prev.filter((link) => link.shareId !== shareId));
+ showToast({
+ message: localize('com_ui_shared_link_delete_success'),
+ severity: NotificationSeverity.SUCCESS,
+ });
setIsDeleteOpen(false);
- setDeleteRow(null);
- await refetch();
+ refetch();
},
- onError: (error) => {
- console.error('Delete error:', error);
+ onError: () => {
showToast({
message: localize('com_ui_share_delete_error'),
severity: NotificationSeverity.ERROR,
@@ -111,87 +173,39 @@ export default function SharedLinks() {
},
});
- const handleDelete = useCallback(
- async (selectedRows: SharedLinkItem[]) => {
- const validRows = selectedRows.filter(
- (row) => typeof row.shareId === 'string' && row.shareId.length > 0,
- );
-
- if (validRows.length === 0) {
- showToast({
- message: localize('com_ui_no_valid_items'),
- severity: NotificationSeverity.WARNING,
- });
- return;
- }
-
- try {
- for (const row of validRows) {
- await deleteMutation.mutateAsync({ shareId: row.shareId });
- }
-
- showToast({
- message: localize(
- validRows.length === 1
- ? 'com_ui_shared_link_delete_success'
- : 'com_ui_shared_link_bulk_delete_success',
- ),
- severity: NotificationSeverity.SUCCESS,
- });
- } catch (error) {
- console.error('Failed to delete shared links:', error);
- showToast({
- message: localize('com_ui_bulk_delete_error'),
- severity: NotificationSeverity.ERROR,
- });
- }
- },
- [deleteMutation, showToast, localize],
- );
-
const handleFetchNextPage = useCallback(async () => {
- if (hasNextPage !== true || isFetchingNextPage) {
- return;
- }
+ if (!hasNextPage || isFetchingNextPage) return;
await fetchNextPage();
}, [fetchNextPage, hasNextPage, isFetchingNextPage]);
+ const effectiveIsLoading = isLoading && displayData.length === 0;
+ const effectiveIsFetching = isFetchingNextPage;
+
const confirmDelete = useCallback(() => {
- if (deleteRow) {
- handleDelete([deleteRow]);
+ if (!deleteRow?.shareId) {
+ showToast({
+ message: localize('com_ui_share_delete_error'),
+ severity: NotificationSeverity.WARNING,
+ });
+ return;
}
- setIsDeleteOpen(false);
- }, [deleteRow, handleDelete]);
+ deleteMutation.mutate({ shareId: deleteRow.shareId });
+ }, [deleteMutation, deleteRow, localize, showToast]);
- const columns = useMemo(
+ const columns: TableColumn<Record<string, unknown>, unknown>[] = useMemo(
() => [
{
accessorKey: 'title',
- header: () => {
- const isSorted = queryParams.sortBy === 'title';
- const sortDirection = queryParams.sortDirection;
- return (
- <Button
- variant="ghost"
- className="px-2 py-0 text-xs hover:bg-surface-hover sm:px-2 sm:py-2 sm:text-sm"
- onClick={() =>
- handleSort('title', isSorted && sortDirection === 'asc' ? 'desc' : 'asc')
- }
- aria-label={localize('com_ui_name_sort')}
- >
- {localize('com_ui_name')}
- {isSorted && sortDirection === 'asc' && (
- <ArrowUp className="ml-2 h-3 w-4 sm:h-4 sm:w-4" />
- )}
- {isSorted && sortDirection === 'desc' && (
- <ArrowDown className="ml-2 h-3 w-4 sm:h-4 sm:w-4" />
- )}
- {!isSorted && <ArrowUpDown className="ml-2 h-3 w-4 sm:h-4 sm:w-4" />}
- </Button>
- );
+ accessorFn: (row: Record<string, unknown>): unknown => {
+ const link = row as SharedLinkItem;
+ return link.title;
},
+ header: () => (
+ <span className="text-xs text-text-primary sm:text-sm">{localize('com_ui_name')}</span>
+ ),
cell: ({ row }) => {
- const { title, shareId } = row.original;
+ const link = row.original as SharedLinkItem;
+ const { title, shareId } = link;
return (
<div className="flex items-center gap-2">
<Link
@@ -199,7 +213,7 @@ export default function SharedLinks() {
target="_blank"
rel="noopener noreferrer"
className="group flex items-center gap-1 truncate rounded-sm text-blue-600 underline decoration-1 underline-offset-2 hover:decoration-2 focus:outline-none focus:ring-2 focus:ring-ring"
- title={title}
+ aria-label={localize('com_ui_open_link', { 0: title })}
>
<span className="truncate">{title}</span>
<ExternalLink
@@ -211,141 +225,139 @@ export default function SharedLinks() {
);
},
meta: {
- size: '35%',
- mobileSize: '50%',
+ className: 'min-w-[150px] flex-1',
},
+ enableSorting: true,
},
{
accessorKey: 'createdAt',
- header: () => {
- const isSorted = queryParams.sortBy === 'createdAt';
- const sortDirection = queryParams.sortDirection;
- return (
- <Button
- variant="ghost"
- className="px-2 py-0 text-xs hover:bg-surface-hover sm:px-2 sm:py-2 sm:text-sm"
- onClick={() =>
- handleSort('createdAt', isSorted && sortDirection === 'asc' ? 'desc' : 'asc')
- }
- aria-label={localize('com_ui_creation_date_sort')}
- >
- {localize('com_ui_date')}
- {isSorted && sortDirection === 'asc' && (
- <ArrowUp className="ml-2 h-3 w-4 sm:h-4 sm:w-4" />
- )}
- {isSorted && sortDirection === 'desc' && (
- <ArrowDown className="ml-2 h-3 w-4 sm:h-4 sm:w-4" />
- )}
- {!isSorted && <ArrowUpDown className="ml-2 h-3 w-4 sm:h-4 sm:w-4" />}
- </Button>
- );
+ accessorFn: (row: Record<string, unknown>): unknown => {
+ const link = row as SharedLinkItem;
+ return link.createdAt;
+ },
+ header: () => (
+ <span className="text-xs text-text-primary sm:text-sm">{localize('com_ui_date')}</span>
+ ),
+ cell: ({ row }) => {
+ const link = row.original as SharedLinkItem;
+ return formatDate(link.createdAt?.toString() ?? '', isSmallScreen);
},
- cell: ({ row }) => formatDate(row.original.createdAt?.toString() ?? '', isSmallScreen),
meta: {
- size: '10%',
- mobileSize: '20%',
+ className: 'w-32 sm:w-40',
+ desktopOnly: true,
},
+ enableSorting: true,
},
{
- accessorKey: 'actions',
+ id: 'actions',
+ accessorFn: (row: Record<string, unknown>): unknown => null,
header: () => (
- <Label className="px-2 py-0 text-xs hover:bg-surface-hover sm:px-2 sm:py-2 sm:text-sm">
+ <span className="text-xs text-text-primary sm:text-sm">
{localize('com_assistants_actions')}
- </Label>
+ </span>
),
+ cell: ({ row }) => {
+ const link = row.original as SharedLinkItem;
+ const { title, conversationId } = link;
+
+ return (
+ <div className="flex items-center gap-2">
+ <TooltipAnchor
+ description={localize('com_ui_view_source')}
+ render={
+ <Button
+ variant="ghost"
+ className="h-8 w-8 p-0 hover:bg-surface-hover"
+ onClick={() => {
+ window.open(`/c/${conversationId}`, '_blank');
+ }}
+ aria-label={localize('com_ui_view_source_conversation', { 0: title })}
+ >
+ <MessageSquare className="size-4" />
+ </Button>
+ }
+ />
+ <TooltipAnchor
+ description={localize('com_ui_delete')}
+ render={
+ <Button
+ variant="ghost"
+ className="h-8 w-8 p-0"
+ onClick={() => {
+ setDeleteRow(link);
+ setIsDeleteOpen(true);
+ }}
+ aria-label={localize('com_ui_delete_link_title', { 0: title })}
+ >
+ <TrashIcon className="size-4" />
+ </Button>
+ }
+ />
+ </div>
+ );
+ },
meta: {
- size: '7%',
- mobileSize: '25%',
+ className: 'w-24',
},
- cell: ({ row }) => (
- <div className="flex items-center gap-2">
- <a
- href={`/c/${row.original.conversationId}`}
- target="_blank"
- rel="noopener noreferrer"
- className="flex h-8 w-8 items-center justify-center rounded-md p-0 transition-colors hover:bg-surface-hover focus:outline-none focus:ring-2 focus:ring-ring"
- aria-label={`${localize('com_ui_view_source')} - ${row.original.title || localize('com_ui_untitled')}`}
- >
- <MessageSquare className="size-4" aria-hidden="true" />
- </a>
- <Button
- variant="ghost"
- className="h-8 w-8 p-0 hover:bg-surface-hover"
- onClick={() => {
- setDeleteRow(row.original);
- setIsDeleteOpen(true);
- }}
- aria-label={localize('com_ui_delete_shared_link', {
- title: row.original.title || localize('com_ui_untitled'),
- })}
- aria-haspopup="dialog"
- aria-controls="delete-shared-link-dialog"
- >
- <TrashIcon className="size-4" aria-hidden="true" />
- </Button>
- </div>
- ),
+ enableSorting: false,
},
],
- [isSmallScreen, localize, queryParams, handleSort],
+ [isSmallScreen, localize],
);
return (
<div className="flex items-center justify-between">
<Label id="shared-links-label">{localize('com_nav_shared_links')}</Label>
-
<OGDialog open={isOpen} onOpenChange={setIsOpen}>
- <OGDialogTrigger asChild onClick={() => setIsOpen(true)}>
+ <OGDialogTrigger asChild>
<Button aria-labelledby="shared-links-label" variant="outline">
{localize('com_ui_manage')}
</Button>
</OGDialogTrigger>
-
- <OGDialogContent
- title={localize('com_nav_my_files')}
- className="w-11/12 max-w-5xl bg-background text-text-primary shadow-2xl"
- >
+ <OGDialogContent className={cn('w-11/12 max-w-6xl', isSmallScreen && 'px-1 pb-1')}>
<OGDialogHeader>
<OGDialogTitle>{localize('com_nav_shared_links')}</OGDialogTitle>
</OGDialogHeader>
<DataTable
columns={columns}
- data={allLinks}
- onDelete={handleDelete}
- filterColumn="title"
+ data={displayData}
+ isLoading={effectiveIsLoading}
+ isFetching={effectiveIsFetching}
+ config={{
+ skeleton: { count: 11 },
+ search: {
+ filterColumn: 'title',
+ enableSearch: true,
+ debounce: 300,
+ },
+ selection: {
+ enableRowSelection: false,
+ showCheckboxes: false,
+ },
+ }}
+ filterValue={searchValue}
+ onFilterChange={handleSearchChange}
+ fetchNextPage={handleFetchNextPage}
hasNextPage={hasNextPage}
isFetchingNextPage={isFetchingNextPage}
- fetchNextPage={handleFetchNextPage}
- showCheckboxes={false}
- onFilterChange={debouncedFilterChange}
- filterValue={queryParams.search}
- isLoading={isLoading}
- enableSearch={isSearchEnabled}
+ sorting={sorting}
+ onSortingChange={handleSortingChange}
/>
</OGDialogContent>
</OGDialog>
<OGDialog open={isDeleteOpen} onOpenChange={setIsDeleteOpen}>
<OGDialogTemplate
showCloseButton={false}
- title={localize('com_ui_delete_shared_link_heading')}
- className="max-w-[450px]"
+ title={localize('com_ui_delete_shared_link')}
+ className="w-11/12 max-w-md"
main={
- <>
- <div
- id="delete-shared-link-dialog"
- className="flex w-full flex-col items-center gap-2"
- >
- <div className="grid w-full items-center gap-2">
- <Label htmlFor="dialog-confirm-delete" className="text-left text-sm font-medium">
- <Trans
- i18nKey="com_ui_delete_confirm_strong"
- values={{ title: deleteRow?.title }}
- components={{ strong: <strong /> }}
- />
- </Label>
- </div>
+ <div className="flex w-full flex-col items-center gap-2">
+ <div className="grid w-full items-center gap-2">
+ <Label className="text-left text-sm font-medium">
+ {localize('com_ui_delete_confirm')} <strong>{deleteRow?.title}</strong>
+ </Label>
</div>
- </>
+ </div>
}
selection={{
selectHandler: confirmDelete,
diff --git a/client/src/components/Nav/SettingsTabs/General/ArchivedChats.tsx b/client/src/components/Nav/SettingsTabs/General/ArchivedChats.tsx
index 2e6f6df07d..e49e9d086c 100644
--- a/client/src/components/Nav/SettingsTabs/General/ArchivedChats.tsx
+++ b/client/src/components/Nav/SettingsTabs/General/ArchivedChats.tsx
@@ -1,26 +1,406 @@
-import { useState } from 'react';
-import { OGDialogTemplate, OGDialog, OGDialogTrigger, Button } from '@librechat/client';
-import ArchivedChatsTable from './ArchivedChatsTable';
+import { useState, useCallback, useMemo } from 'react';
+import { QueryKeys } from 'librechat-data-provider';
+import { TrashIcon, ArchiveRestore } from 'lucide-react';
+import { useQueryClient, InfiniteData } from '@tanstack/react-query';
+import {
+ Button,
+ OGDialog,
+ OGDialogTrigger,
+ OGDialogTemplate,
+ OGDialogContent,
+ OGDialogHeader,
+ OGDialogTitle,
+ Label,
+ TooltipAnchor,
+ Spinner,
+ useToastContext,
+ useMediaQuery,
+ DataTable,
+ type TableColumn,
+} from '@librechat/client';
+import type { ConversationListParams, TConversation } from 'librechat-data-provider';
+import type { SortingState } from '@tanstack/react-table';
+import {
+ useArchiveConvoMutation,
+ useConversationsInfiniteQuery,
+ useDeleteConversationMutation,
+} from '~/data-provider';
+import { MinimalIcon } from '~/components/Endpoints';
+import { NotificationSeverity } from '~/common';
+import { formatDate, cn } from '~/utils';
import { useLocalize } from '~/hooks';
-export default function ArchivedChats() {
+const DEFAULT_PARAMS = {
+ isArchived: true,
+ sortBy: 'createdAt',
+ sortDirection: 'desc',
+ search: '',
+} as const satisfies ConversationListParams;
+
+type SortKey = 'createdAt' | 'title';
+const isSortKey = (v: string): v is SortKey => v === 'createdAt' || v === 'title';
+
+const defaultSort: SortingState = [
+ {
+ id: 'createdAt',
+ desc: true,
+ },
+];
+
+/**
+ * Helper: remove a conversation from all infinite queries whose key starts with the provided root
+ */
+function removeConversationFromInfinite(
+ queryClient: ReturnType<typeof useQueryClient>,
+ rootKey: string,
+ conversationId: string,
+) {
+ const queries = queryClient.getQueryCache().findAll([rootKey], { exact: false });
+ for (const query of queries) {
+ queryClient.setQueryData<
+ InfiniteData<{ conversations: TConversation[]; nextCursor?: string | null }>
+ >(query.queryKey, (old) => {
+ if (!old) return old;
+ return {
+ ...old,
+ pages: old.pages.map((page) => ({
+ ...page,
+ conversations: page.conversations.filter((c) => c.conversationId !== conversationId),
+ })),
+ };
+ });
+ }
+}
+
+export default function ArchivedChatsTable() {
const localize = useLocalize();
+ const isSmallScreen = useMediaQuery('(max-width: 768px)');
+ const { showToast } = useToastContext();
+ const queryClient = useQueryClient();
+
const [isOpen, setIsOpen] = useState(false);
+ const [isDeleteOpen, setIsDeleteOpen] = useState(false);
+ const [deleteRow, setDeleteRow] = useState<TConversation | null>(null);
+ const [unarchivingId, setUnarchivingId] = useState<string | null>(null);
+
+ const [queryParams, setQueryParams] = useState<ConversationListParams>(DEFAULT_PARAMS);
+ const [sorting, setSorting] = useState<SortingState>(defaultSort);
+ const [searchValue, setSearchValue] = useState('');
+
+ const { data, fetchNextPage, hasNextPage, isFetchingNextPage, isLoading } =
+ useConversationsInfiniteQuery(queryParams, {
+ enabled: isOpen,
+ keepPreviousData: false,
+ staleTime: 30 * 1000,
+ refetchOnWindowFocus: false,
+ refetchOnMount: false,
+ });
+
+ const handleSearchChange = useCallback((value: string) => {
+ setSearchValue(value);
+ setQueryParams((prev) => ({
+ ...prev,
+ search: value,
+ }));
+ }, []);
+
+ const handleSortingChange = useCallback(
+ (updater: SortingState | ((old: SortingState) => SortingState)) => {
+ setSorting((prev) => {
+ const next = typeof updater === 'function' ? updater(prev) : updater;
+ const primary = next[0];
+ setQueryParams((p) => {
+ let sortBy: SortKey = 'createdAt';
+ let sortDirection: 'asc' | 'desc' = 'desc';
+ if (primary && isSortKey(primary.id)) {
+ sortBy = primary.id;
+ sortDirection = primary.desc ? 'desc' : 'asc';
+ }
+ return {
+ ...p,
+ sortBy,
+ sortDirection,
+ };
+ });
+ return next;
+ });
+ },
+ [],
+ );
+
+ const flattenedConversations = useMemo(
+ () => data?.pages?.flatMap((page) => page?.conversations?.filter(Boolean) ?? []) ?? [],
+ [data?.pages],
+ );
+
+ const unarchiveMutation = useArchiveConvoMutation({
+ onSuccess: (_res, variables) => {
+ const { conversationId } = variables;
+ if (conversationId) {
+ removeConversationFromInfinite(
+ queryClient,
+ QueryKeys.archivedConversations,
+ conversationId,
+ );
+ }
+ queryClient.invalidateQueries([QueryKeys.allConversations]);
+ setUnarchivingId(null);
+ },
+ onError: () => {
+ showToast({
+ message: localize('com_ui_unarchive_error'),
+ severity: NotificationSeverity.ERROR,
+ });
+ setUnarchivingId(null);
+ },
+ });
+
+ const deleteMutation = useDeleteConversationMutation({
+ onSuccess: (_data, variables) => {
+ const { conversationId } = variables;
+ if (conversationId) {
+ removeConversationFromInfinite(
+ queryClient,
+ QueryKeys.archivedConversations,
+ conversationId,
+ );
+ }
+ showToast({
+ message: localize('com_ui_archived_conversation_delete_success'),
+ severity: NotificationSeverity.SUCCESS,
+ });
+ setIsDeleteOpen(false);
+ },
+ onError: () => {
+ showToast({
+ message: localize('com_ui_archive_delete_error'),
+ severity: NotificationSeverity.ERROR,
+ });
+ },
+ });
+
+ const handleFetchNextPage = useCallback(async () => {
+ if (!hasNextPage || isFetchingNextPage) return;
+ await fetchNextPage();
+ }, [fetchNextPage, hasNextPage, isFetchingNextPage]);
+
+ const effectiveIsLoading = isLoading;
+ const effectiveIsFetching = isFetchingNextPage;
+
+ const confirmDelete = useCallback(() => {
+ if (!deleteRow?.conversationId) {
+ showToast({
+ message: localize('com_ui_convo_delete_error'),
+ severity: NotificationSeverity.WARNING,
+ });
+ return;
+ }
+ deleteMutation.mutate({ conversationId: deleteRow.conversationId });
+ }, [deleteMutation, deleteRow, localize, showToast]);
+
+ const handleUnarchive = useCallback(
+ (conversationId: string) => {
+ setUnarchivingId(conversationId);
+ unarchiveMutation.mutate(
+ { conversationId, isArchived: false },
+ { onSettled: () => setUnarchivingId(null) },
+ );
+ },
+ [unarchiveMutation],
+ );
+
+ const columns: TableColumn<Record<string, unknown>, unknown>[] = useMemo(
+ () => [
+ {
+ accessorKey: 'title',
+ accessorFn: (row: Record<string, unknown>): unknown => {
+ const convo = row as TConversation;
+ return convo.title;
+ },
+ header: () => (
+ <span className="text-xs text-text-primary sm:text-sm">
+ {localize('com_nav_archive_name')}
+ </span>
+ ),
+ cell: ({ row }) => {
+ const convo = row.original as TConversation;
+ const { conversationId, title } = convo;
+ return (
+ <div className="flex items-center gap-2">
+ <MinimalIcon
+ endpoint={convo.endpoint}
+ size={28}
+ isCreatedByUser={false}
+ iconClassName="size-4"
+ aria-hidden="true"
+ />
+ <a
+ href={`/c/${conversationId}`}
+ target="_blank"
+ rel="noopener noreferrer"
+ className="flex items-center truncate underline"
+ aria-label={localize('com_ui_open_conversation', { 0: title })}
+ >
+ {title}
+ </a>
+ </div>
+ );
+ },
+ meta: {
+ className: 'min-w-[150px] flex-1',
+ isRowHeader: true,
+ },
+ enableSorting: true,
+ },
+ {
+ accessorKey: 'createdAt',
+ accessorFn: (row: Record<string, unknown>): unknown => {
+ const convo = row as TConversation;
+ return convo.createdAt;
+ },
+ header: () => (
+ <span className="text-xs text-text-primary sm:text-sm">
+ {localize('com_nav_archive_created_at')}
+ </span>
+ ),
+ cell: ({ row }) => {
+ const convo = row.original as TConversation;
+ return formatDate(convo.createdAt?.toString() ?? '', isSmallScreen);
+ },
+ meta: {
+ className: 'w-32 sm:w-40',
+ desktopOnly: true,
+ },
+ enableSorting: true,
+ },
+ {
+ id: 'actions',
+ accessorFn: () => null,
+ header: () => (
+ <span className="text-xs text-text-primary sm:text-sm">
+ {localize('com_assistants_actions')}
+ </span>
+ ),
+ cell: ({ row }) => {
+ const convo = row.original as TConversation;
+ const { title } = convo;
+ const isRowUnarchiving = unarchivingId === convo.conversationId;
+
+ return (
+ <div className="flex items-center gap-1.5 md:gap-2">
+ <TooltipAnchor
+ description={localize('com_ui_unarchive')}
+ render={
+ <Button
+ variant="ghost"
+ className="h-9 w-9 p-0 hover:bg-surface-hover md:h-8 md:w-8"
+ onClick={() => {
+ const conversationId = convo.conversationId;
+ if (!conversationId) return;
+ handleUnarchive(conversationId);
+ }}
+ disabled={isRowUnarchiving}
+ aria-label={localize('com_ui_unarchive_conversation_title', { 0: title })}
+ >
+ {isRowUnarchiving ? <Spinner /> : <ArchiveRestore className="size-4" />}
+ </Button>
+ }
+ />
+ <TooltipAnchor
+ description={localize('com_ui_delete')}
+ render={
+ <Button
+ variant="ghost"
+ className="h-9 w-9 p-0 md:h-8 md:w-8"
+ onClick={() => {
+ setDeleteRow(convo);
+ setIsDeleteOpen(true);
+ }}
+ aria-label={localize('com_ui_delete_conversation_title', { 0: title })}
+ >
+ <TrashIcon className="size-4" />
+ </Button>
+ }
+ />
+ </div>
+ );
+ },
+ meta: {
+ className: 'w-24',
+ },
+ enableSorting: false,
+ },
+ ],
+ [isSmallScreen, localize, handleUnarchive, unarchivingId],
+ );
return (
<div className="flex items-center justify-between">
- <div>{localize('com_nav_archived_chats')}</div>
+ <Label htmlFor="archived-chats-button" className="text-sm font-medium">
+ {localize('com_nav_archived_chats')}
+ </Label>
<OGDialog open={isOpen} onOpenChange={setIsOpen}>
<OGDialogTrigger asChild>
- <Button variant="outline" aria-label="Archived chats">
+ <Button
+ id="archived-chats-button"
+ variant="outline"
+ aria-label={localize('com_ui_manage_archived_chats')}
+ >
{localize('com_ui_manage')}
</Button>
</OGDialogTrigger>
+ <OGDialogContent className={cn('w-11/12 max-w-6xl', isSmallScreen && 'px-1 pb-1')}>
+ <OGDialogHeader>
+ <OGDialogTitle>{localize('com_nav_archived_chats')}</OGDialogTitle>
+ </OGDialogHeader>
+ <DataTable
+ columns={columns}
+ data={flattenedConversations}
+ isLoading={effectiveIsLoading}
+ isFetching={effectiveIsFetching}
+ config={{
+ skeleton: { count: 11 },
+ search: {
+ filterColumn: 'title',
+ enableSearch: true,
+ debounce: 300,
+ },
+ selection: {
+ enableRowSelection: false,
+ showCheckboxes: false,
+ },
+ }}
+ filterValue={searchValue}
+ onFilterChange={handleSearchChange}
+ fetchNextPage={handleFetchNextPage}
+ hasNextPage={hasNextPage}
+ isFetchingNextPage={isFetchingNextPage}
+ sorting={sorting}
+ onSortingChange={handleSortingChange}
+ />
+ </OGDialogContent>
+ </OGDialog>
+ <OGDialog open={isDeleteOpen} onOpenChange={setIsDeleteOpen}>
<OGDialogTemplate
- title={localize('com_nav_archived_chats')}
- className="max-w-[1000px]"
- showCancelButton={false}
- main={<ArchivedChatsTable isOpen={isOpen} onOpenChange={setIsOpen} />}
+ showCloseButton={false}
+ title={localize('com_ui_delete_archived_chats')}
+ className="w-11/12 max-w-md"
+ main={
+ <div className="flex w-full flex-col items-center gap-2">
+ <div className="grid w-full items-center gap-2">
+ <Label className="text-left text-sm font-medium">
+ {localize('com_ui_delete_confirm')} <strong>{deleteRow?.title}</strong>
+ </Label>
+ </div>
+ </div>
+ }
+ selection={{
+ selectHandler: confirmDelete,
+ selectClasses: `bg-red-700 dark:bg-red-600 hover:bg-red-800 dark:hover:bg-red-800 text-white ${
+ deleteMutation.isLoading ? 'cursor-not-allowed opacity-80' : ''
+ }`,
+ selectText: deleteMutation.isLoading ? <Spinner /> : localize('com_ui_delete'),
+ }}
/>
</OGDialog>
</div>
diff --git a/client/src/components/Nav/SettingsTabs/General/ArchivedChatsTable.tsx b/client/src/components/Nav/SettingsTabs/General/ArchivedChatsTable.tsx
deleted file mode 100644
index 2177b7fbff..0000000000
--- a/client/src/components/Nav/SettingsTabs/General/ArchivedChatsTable.tsx
+++ /dev/null
@@ -1,328 +0,0 @@
-import { useState, useCallback, useMemo, useEffect } from 'react';
-import { Trans } from 'react-i18next';
-import debounce from 'lodash/debounce';
-import { useRecoilValue } from 'recoil';
-import { TrashIcon, ArchiveRestore, ArrowUp, ArrowDown, ArrowUpDown } from 'lucide-react';
-import {
- Button,
- Label,
- Spinner,
- OGDialog,
- DataTable,
- TooltipAnchor,
- useMediaQuery,
- OGDialogTitle,
- OGDialogHeader,
- useToastContext,
- OGDialogContent,
-} from '@librechat/client';
-import type { ConversationListParams, TConversation } from 'librechat-data-provider';
-import {
- useConversationsInfiniteQuery,
- useDeleteConversationMutation,
- useArchiveConvoMutation,
-} from '~/data-provider';
-import { MinimalIcon } from '~/components/Endpoints';
-import { NotificationSeverity } from '~/common';
-import { formatDate, logger } from '~/utils';
-import { useLocalize } from '~/hooks';
-import store from '~/store';
-
-const DEFAULT_PARAMS: ConversationListParams = {
- isArchived: true,
- sortBy: 'createdAt',
- sortDirection: 'desc',
- search: '',
-};
-
-export default function ArchivedChatsTable({
- onOpenChange,
-}: {
- onOpenChange: (isOpen: boolean) => void;
-}) {
- const localize = useLocalize();
- const isSmallScreen = useMediaQuery('(max-width: 768px)');
- const { showToast } = useToastContext();
- const searchState = useRecoilValue(store.search);
- const [isDeleteOpen, setIsDeleteOpen] = useState(false);
- const [queryParams, setQueryParams] = useState<ConversationListParams>(DEFAULT_PARAMS);
- const [deleteConversation, setDeleteConversation] = useState<TConversation | null>(null);
-
- const { data, fetchNextPage, hasNextPage, isFetchingNextPage, refetch, isLoading } =
- useConversationsInfiniteQuery(queryParams, {
- staleTime: 0,
- cacheTime: 5 * 60 * 1000,
- refetchOnWindowFocus: false,
- refetchOnMount: false,
- });
-
- const handleSort = useCallback((sortField: string, sortOrder: 'asc' | 'desc') => {
- setQueryParams((prev) => ({
- ...prev,
- sortBy: sortField as 'title' | 'createdAt',
- sortDirection: sortOrder,
- }));
- }, []);
-
- const handleFilterChange = useCallback((value: string) => {
- const encodedValue = encodeURIComponent(value.trim());
- setQueryParams((prev) => ({
- ...prev,
- search: encodedValue,
- }));
- }, []);
-
- const debouncedFilterChange = useMemo(
- () => debounce(handleFilterChange, 300),
- [handleFilterChange],
- );
-
- useEffect(() => {
- return () => {
- debouncedFilterChange.cancel();
- };
- }, [debouncedFilterChange]);
-
- const allConversations = useMemo(() => {
- if (!data?.pages) {
- return [];
- }
- return data.pages.flatMap((page) => page?.conversations?.filter(Boolean) ?? []);
- }, [data?.pages]);
-
- const deleteMutation = useDeleteConversationMutation({
- onSuccess: async () => {
- setIsDeleteOpen(false);
- await refetch();
- showToast({
- message: localize('com_ui_convo_delete_success'),
- severity: NotificationSeverity.SUCCESS,
- showIcon: true,
- });
- },
- onError: (error: unknown) => {
- logger.error('Error deleting archived conversation:', error);
- showToast({
- message: localize('com_ui_archive_delete_error') as string,
- severity: NotificationSeverity.ERROR,
- });
- },
- });
-
- const unarchiveMutation = useArchiveConvoMutation({
- onSuccess: async () => {
- await refetch();
- },
- onError: (error: unknown) => {
- logger.error('Error unarchiving conversation', error);
- showToast({
- message: localize('com_ui_unarchive_error') as string,
- severity: NotificationSeverity.ERROR,
- });
- },
- });
-
- const handleFetchNextPage = useCallback(async () => {
- if (!hasNextPage || isFetchingNextPage) {
- return;
- }
- await fetchNextPage();
- }, [fetchNextPage, hasNextPage, isFetchingNextPage]);
-
- const columns = useMemo(
- () => [
- {
- accessorKey: 'title',
- header: () => {
- const isSorted = queryParams.sortBy === 'title';
- const sortDirection = queryParams.sortDirection;
- return (
- <Button
- variant="ghost"
- className="px-2 py-0 text-xs hover:bg-surface-hover sm:px-2 sm:py-2 sm:text-sm"
- onClick={() =>
- handleSort('title', isSorted && sortDirection === 'asc' ? 'desc' : 'asc')
- }
- >
- {localize('com_nav_archive_name')}
- {isSorted && sortDirection === 'asc' && (
- <ArrowUp className="ml-2 h-3 w-4 sm:h-4 sm:w-4" />
- )}
- {isSorted && sortDirection === 'desc' && (
- <ArrowDown className="ml-2 h-3 w-4 sm:h-4 sm:w-4" />
- )}
- {!isSorted && <ArrowUpDown className="ml-2 h-3 w-4 sm:h-4 sm:w-4" />}
- </Button>
- );
- },
- cell: ({ row }) => {
- const { conversationId, title } = row.original;
- return (
- <button
- type="button"
- className="flex items-center gap-2 truncate rounded-sm"
- onClick={() => window.open(`/c/${conversationId}`, '_blank')}
- >
- <MinimalIcon
- endpoint={row.original.endpoint}
- size={28}
- isCreatedByUser={false}
- iconClassName="size-4"
- />
- <span className="underline">{title}</span>
- </button>
- );
- },
- meta: {
- size: isSmallScreen ? '70%' : '50%',
- mobileSize: '70%',
- },
- },
- {
- accessorKey: 'createdAt',
- header: () => {
- const isSorted = queryParams.sortBy === 'createdAt';
- const sortDirection = queryParams.sortDirection;
- return (
- <Button
- variant="ghost"
- className="px-2 py-0 text-xs hover:bg-surface-hover sm:px-2 sm:py-2 sm:text-sm"
- onClick={() =>
- handleSort('createdAt', isSorted && sortDirection === 'asc' ? 'desc' : 'asc')
- }
- aria-label={localize('com_nav_archive_created_at_sort')}
- >
- {localize('com_nav_archive_created_at')}
- {isSorted && sortDirection === 'asc' && (
- <ArrowUp className="ml-2 h-3 w-4 sm:h-4 sm:w-4" />
- )}
- {isSorted && sortDirection === 'desc' && (
- <ArrowDown className="ml-2 h-3 w-4 sm:h-4 sm:w-4" />
- )}
- {!isSorted && <ArrowUpDown className="ml-2 h-3 w-4 sm:h-4 sm:w-4" />}
- </Button>
- );
- },
- cell: ({ row }) => formatDate(row.original.createdAt?.toString() ?? '', isSmallScreen),
- meta: {
- size: isSmallScreen ? '30%' : '35%',
- mobileSize: '30%',
- },
- },
- {
- accessorKey: 'actions',
- header: () => (
- <Label className="px-2 py-0 text-xs sm:px-2 sm:py-2 sm:text-sm">
- {localize('com_assistants_actions')}
- </Label>
- ),
- cell: ({ row }) => {
- const conversation = row.original;
- return (
- <div className="flex items-center gap-2">
- <TooltipAnchor
- description={localize('com_ui_unarchive')}
- render={
- <Button
- variant="ghost"
- className="h-8 w-8 p-0 hover:bg-surface-hover"
- onClick={() =>
- unarchiveMutation.mutate({
- conversationId: conversation.conversationId,
- isArchived: false,
- })
- }
- title={localize('com_ui_unarchive')}
- aria-label={localize('com_ui_unarchive')}
- disabled={unarchiveMutation.isLoading}
- >
- {unarchiveMutation.isLoading ? (
- <Spinner />
- ) : (
- <ArchiveRestore className="size-4" aria-hidden="true" />
- )}
- </Button>
- }
- />
- <TooltipAnchor
- description={localize('com_ui_delete')}
- render={
- <Button
- variant="ghost"
- className="h-8 w-8 p-0 hover:bg-surface-hover"
- onClick={() => {
- setDeleteConversation(row.original);
- setIsDeleteOpen(true);
- }}
- title={localize('com_ui_delete')}
- aria-label={localize('com_ui_delete')}
- >
- <TrashIcon className="size-4" aria-hidden="true" />
- </Button>
- }
- />
- </div>
- );
- },
- meta: {
- size: '15%',
- mobileSize: '25%',
- },
- },
- ],
- [handleSort, isSmallScreen, localize, queryParams, unarchiveMutation],
- );
-
- return (
- <>
- <DataTable
- columns={columns}
- data={allConversations}
- filterColumn="title"
- onFilterChange={debouncedFilterChange}
- filterValue={queryParams.search}
- fetchNextPage={handleFetchNextPage}
- hasNextPage={hasNextPage}
- isFetchingNextPage={isFetchingNextPage}
- isLoading={isLoading}
- showCheckboxes={false}
- enableSearch={searchState.enabled === true}
- />
-
- <OGDialog open={isDeleteOpen} onOpenChange={onOpenChange}>
- <OGDialogContent
- title={localize('com_ui_delete_confirm', {
- title: deleteConversation?.title ?? localize('com_ui_untitled'),
- })}
- className="w-11/12 max-w-md"
- >
- <OGDialogHeader>
- <OGDialogTitle>
- <Trans
- i18nKey="com_ui_delete_confirm_strong"
- values={{ title: deleteConversation?.title }}
- components={{ strong: <strong /> }}
- />
- </OGDialogTitle>
- </OGDialogHeader>
- <div className="flex justify-end gap-4 pt-4">
- <Button aria-label="cancel" variant="outline" onClick={() => setIsDeleteOpen(false)}>
- {localize('com_ui_cancel')}
- </Button>
- <Button
- variant="destructive"
- onClick={() =>
- deleteMutation.mutate({
- conversationId: deleteConversation?.conversationId ?? '',
- })
- }
- disabled={deleteMutation.isLoading}
- >
- {deleteMutation.isLoading ? <Spinner /> : localize('com_ui_delete')}
- </Button>
- </div>
- </OGDialogContent>
- </OGDialog>
- </>
- );
-}
diff --git a/client/src/components/OAuth/OAuthSuccess.tsx b/client/src/components/OAuth/OAuthSuccess.tsx
index fd8051a6f5..10c9dc071e 100644
--- a/client/src/components/OAuth/OAuthSuccess.tsx
+++ b/client/src/components/OAuth/OAuthSuccess.tsx
@@ -25,7 +25,7 @@ export default function OAuthSuccess() {
return (
<div className="flex min-h-screen items-center justify-center bg-gray-50 p-8">
- <div className="w-full max-w-md rounded-lg bg-white p-8 text-center shadow-lg">
+ <div className="w-full max-w-md rounded-xl bg-white p-8 text-center shadow-lg">
<h1 className="mb-4 text-3xl font-bold text-gray-900">
{localize('com_ui_oauth_success_title') || 'Authentication Successful'}
</h1>
diff --git a/client/src/locales/en/translation.json b/client/src/locales/en/translation.json
index d4e0756608..4021e5437d 100644
--- a/client/src/locales/en/translation.json
+++ b/client/src/locales/en/translation.json
@@ -1,6 +1,6 @@
{
- "chat_direction_left_to_right": "Left to Right",
- "chat_direction_right_to_left": "Right to Left",
+ "chat_direction_left_to_right": "Chat direction set to left to right",
+ "chat_direction_right_to_left": "Chat direction set to right to left",
"com_a11y_ai_composing": "The AI is still composing.",
"com_a11y_end": "The AI has finished their reply.",
"com_a11y_start": "The AI has started their reply.",
@@ -379,12 +379,12 @@
"com_files_filter_by": "Filter files by...",
"com_files_filter_input": "Filter listed files by name...",
"com_files_no_results": "No results.",
- "com_files_number_selected": "{{0}} of {{1}} items(s) selected",
+ "com_files_number_selected": "{{0}} of {{1}} items selected",
"com_files_preparing_download": "Preparing download...",
"com_files_result_found": "{{count}} result found",
"com_files_results_found": "{{count}} results found",
"com_files_sharepoint_picker_title": "Pick Files",
- "com_files_table": "something needs to go here. was empty",
+ "com_files_table": "Files Table",
"com_files_upload_local_machine": "From Local Computer",
"com_files_upload_sharepoint": "From SharePoint",
"com_generated_files": "Generated files:",
@@ -394,9 +394,9 @@
"com_nav_account_settings": "Account Settings",
"com_nav_always_make_prod": "Always make new versions production",
"com_nav_archive_created_at": "Date Archived",
- "com_nav_archive_created_at_sort": "Sort by Date Archived",
"com_nav_archive_name": "Name",
"com_nav_archived_chats": "Archived chats",
+ "com_ui_manage_archived_chats": "Manage archived chats",
"com_nav_at_command": "@-Command",
"com_nav_at_command_description": "Toggle command \"@\" for switching endpoints, models, presets, etc.",
"com_nav_audio_play_error": "Error playing audio: {{0}}",
@@ -767,7 +767,6 @@
"com_ui_bookmarks_update_error": "There was an error updating the bookmark",
"com_ui_bookmarks_update_success": "Bookmark updated successfully",
"com_ui_by_author": "by {{0}}",
- "com_ui_bulk_delete_error": "Failed to delete shared links",
"com_ui_callback_url": "Callback URL",
"com_ui_cancel": "Cancel",
"com_ui_cancelled": "Cancelled",
@@ -830,7 +829,6 @@
"com_ui_create_prompt": "Create Prompt",
"com_ui_create_prompt_page": "New Prompt Configuration Page",
"com_ui_creating_image": "Creating image. May take a moment",
- "com_ui_creation_date_sort": "Sort by Creation Date",
"com_ui_current": "Current",
"com_ui_currently_production": "Currently in production",
"com_ui_custom": "Custom",
@@ -875,6 +873,7 @@
"com_ui_delete_shared_link": "Delete Shared Link - {{title}}",
"com_ui_delete_shared_link_heading": "Delete Shared Link",
"com_ui_delete_prompt_name": "Delete Prompt - {{name}}",
+ "com_ui_delete_archived_chats": "Delete archived chat?",
"com_ui_delete_success": "Successfully deleted",
"com_ui_delete_tool": "Delete Tool",
"com_ui_delete_tool_confirm": "Are you sure you want to delete this tool?",
@@ -1009,6 +1008,7 @@
"com_ui_image_edited": "Image edited",
"com_ui_image_gen": "Image Gen",
"com_ui_import": "Import",
+ "com_ui_importing": "Importing",
"com_ui_import_conversation_error": "There was an error importing your conversations",
"com_ui_import_conversation_file_type_error": "Unsupported import type",
"com_ui_import_conversation_info": "Import conversations from a JSON file",
@@ -1082,7 +1082,6 @@
"com_ui_more_info": "More info",
"com_ui_my_prompts": "My Prompts",
"com_ui_name": "Name",
- "com_ui_name_sort": "Sort by Name",
"com_ui_new": "New",
"com_ui_new_chat": "New chat",
"com_ui_new_conversation_title": "New Conversation Title",
@@ -1098,7 +1097,6 @@
"com_ui_no_read_access": "You don't have permission to view memories",
"com_ui_no_results_found": "No results found",
"com_ui_no_terms_content": "No terms and conditions content to display",
- "com_ui_no_valid_items": "something needs to go here. was empty",
"com_ui_none": "None",
"com_ui_not_used": "Not Used",
"com_ui_nothing_found": "Nothing found",
@@ -1263,9 +1261,12 @@
"com_ui_share_qr_code_description": "QR code for sharing this conversation link",
"com_ui_share_update_message": "Your name, custom instructions, and any messages you add after sharing stay private.",
"com_ui_share_var": "Share {{0}}",
- "com_ui_shared_link_bulk_delete_success": "Successfully deleted shared links",
"com_ui_shared_link_delete_success": "Successfully deleted shared link",
+ "com_ui_archived_conversation_delete_success": "Successfully deleted archived conversation",
"com_ui_shared_link_not_found": "Shared link not found",
+ "com_ui_open_link": "Open Link {{0}}",
+ "com_ui_view_source_conversation": "View Source Conversation {{0}}",
+ "com_ui_delete_link_title": "Delete Shared Link {{0}}",
"com_ui_shared_prompts": "Shared Prompts",
"com_ui_shop": "Shopping",
"com_ui_show_all": "Show All",
@@ -1395,5 +1396,8 @@
"com_ui_zoom_in": "Zoom in",
"com_ui_zoom_level": "Zoom level",
"com_ui_zoom_out": "Zoom out",
+ "com_ui_open_conversation": "Open conversation {{0}}",
+ "com_ui_delete_conversation_title": "Delete conversation {{0}}",
+ "com_ui_unarchive_conversation_title": "Unarchive conversation {{0}}",
"com_user_message": "You"
}
diff --git a/client/src/style.css b/client/src/style.css
index 2a4550f430..a4248ecc72 100644
--- a/client/src/style.css
+++ b/client/src/style.css
@@ -2601,7 +2601,7 @@ html {
flex-direction: column;
overflow: auto;
overscroll-behavior: contain;
- border-radius: 1rem;
+ border-radius: 0.7rem;
border-width: 1px;
border-style: solid;
border-color: var(--border-light);
@@ -2674,6 +2674,7 @@ html {
translate: 0;
}
+.animate-popover-top,
.animate-popover {
transform-origin: top;
opacity: 0;
@@ -2682,12 +2683,13 @@ html {
transform 150ms cubic-bezier(0.4, 0, 0.2, 1);
transform: scale(0.95) translateY(-0.5rem);
}
-
+.animate-popover-top[data-enter],
.animate-popover[data-enter] {
opacity: 1;
transform: scale(1) translateY(0);
}
+/* Left (existing) */
.animate-popover-left {
transform-origin: left;
opacity: 0;
@@ -2696,12 +2698,92 @@ html {
transform 150ms cubic-bezier(0.4, 0, 0.2, 1);
transform: scale(0.95) translateX(-0.5rem);
}
-
.animate-popover-left[data-enter] {
opacity: 1;
transform: scale(1) translateX(0);
}
+/* Right */
+.animate-popover-right {
+ transform-origin: right;
+ opacity: 0;
+ transition:
+ opacity 150ms cubic-bezier(0.4, 0, 0.2, 1),
+ transform 150ms cubic-bezier(0.4, 0, 0.2, 1);
+ transform: scale(0.95) translateX(0.5rem);
+}
+.animate-popover-right[data-enter] {
+ opacity: 1;
+ transform: scale(1) translateX(0);
+}
+
+/* Bottom */
+.animate-popover-bottom {
+ transform-origin: bottom;
+ opacity: 0;
+ transition:
+ opacity 150ms cubic-bezier(0.4, 0, 0.2, 1),
+ transform 150ms cubic-bezier(0.4, 0, 0.2, 1);
+ transform: scale(0.95) translateY(0.5rem);
+}
+.animate-popover-bottom[data-enter] {
+ opacity: 1;
+ transform: scale(1) translateY(0);
+}
+
+/* Corners */
+.animate-popover-top-left {
+ transform-origin: top left;
+ opacity: 0;
+ transition:
+ opacity 150ms cubic-bezier(0.4, 0, 0.2, 1),
+ transform 150ms cubic-bezier(0.4, 0, 0.2, 1);
+ transform: scale(0.95) translate(-0.5rem, -0.5rem);
+}
+.animate-popover-top-left[data-enter] {
+ opacity: 1;
+ transform: scale(1) translate(0, 0);
+}
+
+.animate-popover-top-right {
+ transform-origin: top right;
+ opacity: 0;
+ transition:
+ opacity 150ms cubic-bezier(0.4, 0, 0.2, 1),
+ transform 150ms cubic-bezier(0.4, 0, 0.2, 1);
+ transform: scale(0.95) translate(0.5rem, -0.5rem);
+}
+.animate-popover-top-right[data-enter] {
+ opacity: 1;
+ transform: scale(1) translate(0, 0);
+}
+
+.animate-popover-bottom-left {
+ transform-origin: bottom left;
+ opacity: 0;
+ transition:
+ opacity 150ms cubic-bezier(0.4, 0, 0.2, 1),
+ transform 150ms cubic-bezier(0.4, 0, 0.2, 1);
+ transform: scale(0.95) translate(-0.5rem, 0.5rem);
+}
+.animate-popover-bottom-left[data-enter] {
+ opacity: 1;
+ transform: scale(1) translate(0, 0);
+}
+
+.animate-popover-bottom-right {
+ transform-origin: bottom right;
+ opacity: 0;
+ transition:
+ opacity 150ms cubic-bezier(0.4, 0, 0.2, 1),
+ transform 150ms cubic-bezier(0.4, 0, 0.2, 1);
+ transform: scale(0.95) translate(0.5rem, 0.5rem);
+}
+.animate-popover-bottom-right[data-enter] {
+ opacity: 1;
+ transform: scale(1) translate(0, 0);
+}
+
/** Note: ensure KaTeX can spread across visible space */
.message-content pre:has(> span.katex) {
overflow: visible !important;
diff --git a/package-lock.json b/package-lock.json
index b011cdf9d5..779c5ddcbd 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -3329,6 +3329,142 @@
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
}
},
+ "node_modules/@asamuzakjp/css-color": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/@asamuzakjp/css-color/-/css-color-3.2.0.tgz",
+ "integrity": "sha512-K1A6z8tS3XsmCMM86xoWdn7Fkdn9m6RSVtocUrJYIwZnFVkng/PvkEoWtOWmP+Scc6saYWHWZYbndEEXxl24jw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@csstools/css-calc": "^2.1.3",
+ "@csstools/css-color-parser": "^3.0.9",
+ "@csstools/css-parser-algorithms": "^3.0.4",
+ "@csstools/css-tokenizer": "^3.0.3",
+ "lru-cache": "^10.4.3"
+ }
+ },
+ "node_modules/@asamuzakjp/css-color/node_modules/@csstools/color-helpers": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/@csstools/color-helpers/-/color-helpers-5.1.0.tgz",
+ "integrity": "sha512-S11EXWJyy0Mz5SYvRmY8nJYTFFd1LCNV+7cXyAgQtOOuzb4EsgfqDufL+9esx72/eLhsRdGZwaldu/h+E4t4BA==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/csstools"
+ },
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/csstools"
+ }
+ ],
+ "license": "MIT-0",
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@asamuzakjp/css-color/node_modules/@csstools/css-calc": {
+ "version": "2.1.4",
+ "resolved": "https://registry.npmjs.org/@csstools/css-calc/-/css-calc-2.1.4.tgz",
+ "integrity": "sha512-3N8oaj+0juUw/1H3YwmDDJXCgTB1gKU6Hc/bB502u9zR0q2vd786XJH9QfrKIEgFlZmhZiq6epXl4rHqhzsIgQ==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/csstools"
+ },
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/csstools"
+ }
+ ],
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ },
+ "peerDependencies": {
+ "@csstools/css-parser-algorithms": "^3.0.5",
+ "@csstools/css-tokenizer": "^3.0.4"
+ }
+ },
+ "node_modules/@asamuzakjp/css-color/node_modules/@csstools/css-color-parser": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/@csstools/css-color-parser/-/css-color-parser-3.1.0.tgz",
+ "integrity": "sha512-nbtKwh3a6xNVIp/VRuXV64yTKnb1IjTAEEh3irzS+HkKjAOYLTGNb9pmVNntZ8iVBHcWDA2Dof0QtPgFI1BaTA==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/csstools"
+ },
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/csstools"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "@csstools/color-helpers": "^5.1.0",
+ "@csstools/css-calc": "^2.1.4"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "peerDependencies": {
+ "@csstools/css-parser-algorithms": "^3.0.5",
+ "@csstools/css-tokenizer": "^3.0.4"
+ }
+ },
+ "node_modules/@asamuzakjp/css-color/node_modules/@csstools/css-parser-algorithms": {
+ "version": "3.0.5",
+ "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-3.0.5.tgz",
+ "integrity": "sha512-DaDeUkXZKjdGhgYaHNJTV9pV7Y9B3b644jCLs9Upc3VeNGg6LWARAT6O+Q+/COo+2gg/bM5rhpMAtf70WqfBdQ==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/csstools"
+ },
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/csstools"
+ }
+ ],
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ },
+ "peerDependencies": {
+ "@csstools/css-tokenizer": "^3.0.4"
+ }
+ },
+ "node_modules/@asamuzakjp/css-color/node_modules/@csstools/css-tokenizer": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-3.0.4.tgz",
+ "integrity": "sha512-Vd/9EVDiu6PPJt9yAh6roZP6El1xHrdvIVGjyBsHR0RYwNHgL7FJPyIIW4fANJNG6FtyZfvlRPpFI4ZM/lubvw==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/csstools"
+ },
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/csstools"
+ }
+ ],
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@asamuzakjp/css-color/node_modules/lru-cache": {
+ "version": "10.4.3",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz",
+ "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==",
+ "dev": true,
+ "license": "ISC"
+ },
"node_modules/@aws-crypto/crc32": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/@aws-crypto/crc32/-/crc32-5.2.0.tgz",
@@ -13143,12 +13279,14 @@
}
},
"node_modules/@babel/plugin-transform-destructuring": {
- "version": "7.23.3",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.23.3.tgz",
- "integrity": "sha512-n225npDqjDIr967cMScVKHXJs7rout1q+tt50inyBCPkyZ8KxeI6d+GIbSBTT/w/9WdlWDOej3V9HE5Lgk57gw==",
+ "version": "7.28.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.28.5.tgz",
+ "integrity": "sha512-Kl9Bc6D0zTUcFUvkNuQh4eGXPKKNDOJQXVyyM4ZAQPMveniJdxi8XMJwLo+xSoW3MIq81bD33lcUe9kZpl0MCw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.22.5"
+ "@babel/helper-plugin-utils": "^7.27.1",
+ "@babel/traverse": "^7.28.5"
},
"engines": {
"node": ">=6.9.0"
@@ -13221,6 +13359,23 @@
"@babel/core": "^7.0.0-0"
}
},
+ "node_modules/@babel/plugin-transform-explicit-resource-management": {
+ "version": "7.28.0",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-explicit-resource-management/-/plugin-transform-explicit-resource-management-7.28.0.tgz",
+ "integrity": "sha512-K8nhUcn3f6iB+P3gwCv/no7OdzOZQcKchW6N389V6PD8NUWKZHzndOd9sPDVbMoBsbmjMqlB4L9fm+fEFNVlwQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1",
+ "@babel/plugin-transform-destructuring": "^7.28.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
"node_modules/@babel/plugin-transform-exponentiation-operator": {
"version": "7.23.3",
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.23.3.tgz",
@@ -17238,6 +17393,7 @@
"resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz",
"integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==",
"dev": true,
+ "license": "ISC",
"dependencies": {
"camelcase": "^5.3.1",
"find-up": "^4.1.0",
@@ -17254,6 +17410,7 @@
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
"integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"sprintf-js": "~1.0.2"
}
@@ -17263,6 +17420,7 @@
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
"integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=6"
}
@@ -17272,6 +17430,7 @@
"resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
"integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"locate-path": "^5.0.0",
"path-exists": "^4.0.0"
@@ -17299,6 +17458,7 @@
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
"integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"p-locate": "^4.1.0"
},
@@ -17311,6 +17471,7 @@
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
"integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"p-try": "^2.0.0"
},
@@ -17326,6 +17487,7 @@
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
"integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"p-limit": "^2.2.0"
},
@@ -17338,6 +17500,7 @@
"resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz",
"integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=8"
}
@@ -17376,6 +17539,250 @@
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
}
},
+ "node_modules/@jest/environment-jsdom-abstract": {
+ "version": "30.2.0",
+ "resolved": "https://registry.npmjs.org/@jest/environment-jsdom-abstract/-/environment-jsdom-abstract-30.2.0.tgz",
+ "integrity": "sha512-kazxw2L9IPuZpQ0mEt9lu9Z98SqR74xcagANmMBU16X0lS23yPc0+S6hGLUz8kVRlomZEs/5S/Zlpqwf5yu6OQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jest/environment": "30.2.0",
+ "@jest/fake-timers": "30.2.0",
+ "@jest/types": "30.2.0",
+ "@types/jsdom": "^21.1.7",
+ "@types/node": "*",
+ "jest-mock": "30.2.0",
+ "jest-util": "30.2.0"
+ },
+ "engines": {
+ "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0"
+ },
+ "peerDependencies": {
+ "canvas": "^3.0.0",
+ "jsdom": "*"
+ },
+ "peerDependenciesMeta": {
+ "canvas": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@jest/environment-jsdom-abstract/node_modules/@jest/environment": {
+ "version": "30.2.0",
+ "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-30.2.0.tgz",
+ "integrity": "sha512-/QPTL7OBJQ5ac09UDRa3EQes4gt1FTEG/8jZ/4v5IVzx+Cv7dLxlVIvfvSVRiiX2drWyXeBjkMSR8hvOWSog5g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jest/fake-timers": "30.2.0",
+ "@jest/types": "30.2.0",
+ "@types/node": "*",
+ "jest-mock": "30.2.0"
+ },
+ "engines": {
+ "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0"
+ }
+ },
+ "node_modules/@jest/environment-jsdom-abstract/node_modules/@jest/fake-timers": {
+ "version": "30.2.0",
+ "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-30.2.0.tgz",
+ "integrity": "sha512-HI3tRLjRxAbBy0VO8dqqm7Hb2mIa8d5bg/NJkyQcOk7V118ObQML8RC5luTF/Zsg4474a+gDvhce7eTnP4GhYw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jest/types": "30.2.0",
+ "@sinonjs/fake-timers": "^13.0.0",
+ "@types/node": "*",
+ "jest-message-util": "30.2.0",
+ "jest-mock": "30.2.0",
+ "jest-util": "30.2.0"
+ },
+ "engines": {
+ "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0"
+ }
+ },
+ "node_modules/@jest/environment-jsdom-abstract/node_modules/@jest/schemas": {
+ "version": "30.0.5",
+ "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-30.0.5.tgz",
+ "integrity": "sha512-DmdYgtezMkh3cpU8/1uyXakv3tJRcmcXxBOcO0tbaozPwpmh4YMsnWrQm9ZmZMfa5ocbxzbFk6O4bDPEc/iAnA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@sinclair/typebox": "^0.34.0"
+ },
+ "engines": {
+ "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0"
+ }
+ },
+ "node_modules/@jest/environment-jsdom-abstract/node_modules/@jest/types": {
+ "version": "30.2.0",
+ "resolved": "https://registry.npmjs.org/@jest/types/-/types-30.2.0.tgz",
+ "integrity": "sha512-H9xg1/sfVvyfU7o3zMfBEjQ1gcsdeTMgqHoYdN79tuLqfTtuu7WckRA1R5whDwOzxaZAeMKTYWqP+WCAi0CHsg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jest/pattern": "30.0.1",
+ "@jest/schemas": "30.0.5",
+ "@types/istanbul-lib-coverage": "^2.0.6",
+ "@types/istanbul-reports": "^3.0.4",
+ "@types/node": "*",
+ "@types/yargs": "^17.0.33",
+ "chalk": "^4.1.2"
+ },
+ "engines": {
+ "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0"
+ }
+ },
+ "node_modules/@jest/environment-jsdom-abstract/node_modules/@sinclair/typebox": {
+ "version": "0.34.41",
+ "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.34.41.tgz",
+ "integrity": "sha512-6gS8pZzSXdyRHTIqoqSVknxolr1kzfy4/CeDnrzsVz8TTIWUbOBr6gnzOmTYJ3eXQNh4IYHIGi5aIL7sOZ2G/g==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@jest/environment-jsdom-abstract/node_modules/@sinonjs/fake-timers": {
+ "version": "13.0.5",
+ "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-13.0.5.tgz",
+ "integrity": "sha512-36/hTbH2uaWuGVERyC6da9YwGWnzUZXuPro/F2LfsdOsLnCojz/iSH8MxUt/FD2S5XBSVPhmArFUXcpCQ2Hkiw==",
+ "dev": true,
+ "license": "BSD-3-Clause",
+ "dependencies": {
+ "@sinonjs/commons": "^3.0.1"
+ }
+ },
+ "node_modules/@jest/environment-jsdom-abstract/node_modules/@types/jsdom": {
+ "version": "21.1.7",
+ "resolved": "https://registry.npmjs.org/@types/jsdom/-/jsdom-21.1.7.tgz",
+ "integrity": "sha512-yOriVnggzrnQ3a9OKOCxaVuSug3w3/SbOj5i7VwXWZEyUNl3bLF9V3MfxGbZKuwqJOQyRfqXyROBB1CoZLFWzA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/node": "*",
+ "@types/tough-cookie": "*",
+ "parse5": "^7.0.0"
+ }
+ },
+ "node_modules/@jest/environment-jsdom-abstract/node_modules/ansi-styles": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz",
+ "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "node_modules/@jest/environment-jsdom-abstract/node_modules/ci-info": {
+ "version": "4.3.1",
+ "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.3.1.tgz",
+ "integrity": "sha512-Wdy2Igu8OcBpI2pZePZ5oWjPC38tmDVx5WKUXKwlLYkA0ozo85sLsLvkBbBn/sZaSCMFOGZJ14fvW9t5/d7kdA==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/sibiraj-s"
+ }
+ ],
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/@jest/environment-jsdom-abstract/node_modules/jest-message-util": {
+ "version": "30.2.0",
+ "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-30.2.0.tgz",
+ "integrity": "sha512-y4DKFLZ2y6DxTWD4cDe07RglV88ZiNEdlRfGtqahfbIjfsw1nMCPx49Uev4IA/hWn3sDKyAnSPwoYSsAEdcimw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/code-frame": "^7.27.1",
+ "@jest/types": "30.2.0",
+ "@types/stack-utils": "^2.0.3",
+ "chalk": "^4.1.2",
+ "graceful-fs": "^4.2.11",
+ "micromatch": "^4.0.8",
+ "pretty-format": "30.2.0",
+ "slash": "^3.0.0",
+ "stack-utils": "^2.0.6"
+ },
+ "engines": {
+ "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0"
+ }
+ },
+ "node_modules/@jest/environment-jsdom-abstract/node_modules/jest-mock": {
+ "version": "30.2.0",
+ "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-30.2.0.tgz",
+ "integrity": "sha512-JNNNl2rj4b5ICpmAcq+WbLH83XswjPbjH4T7yvGzfAGCPh1rw+xVNbtk+FnRslvt9lkCcdn9i1oAoKUuFsOxRw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jest/types": "30.2.0",
+ "@types/node": "*",
+ "jest-util": "30.2.0"
+ },
+ "engines": {
+ "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0"
+ }
+ },
+ "node_modules/@jest/environment-jsdom-abstract/node_modules/jest-util": {
+ "version": "30.2.0",
+ "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-30.2.0.tgz",
+ "integrity": "sha512-QKNsM0o3Xe6ISQU869e+DhG+4CK/48aHYdJZGlFQVTjnbvgpcKyxpzk29fGiO7i/J8VENZ+d2iGnSsvmuHywlA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jest/types": "30.2.0",
+ "@types/node": "*",
+ "chalk": "^4.1.2",
+ "ci-info": "^4.2.0",
+ "graceful-fs": "^4.2.11",
+ "picomatch": "^4.0.2"
+ },
+ "engines": {
+ "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0"
+ }
+ },
+ "node_modules/@jest/environment-jsdom-abstract/node_modules/picomatch": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz",
+ "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
+ "node_modules/@jest/environment-jsdom-abstract/node_modules/pretty-format": {
+ "version": "30.2.0",
+ "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.2.0.tgz",
+ "integrity": "sha512-9uBdv/B4EefsuAL+pWqueZyZS2Ba+LxfFeQ9DN14HU4bN8bhaxKdkpjpB6fs9+pSjIBu+FXQHImEg8j/Lw0+vA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jest/schemas": "30.0.5",
+ "ansi-styles": "^5.2.0",
+ "react-is": "^18.3.1"
+ },
+ "engines": {
+ "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0"
+ }
+ },
+ "node_modules/@jest/environment-jsdom-abstract/node_modules/slash": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
+ "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
"node_modules/@jest/expect-utils": {
"version": "29.7.0",
"resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz",
@@ -17506,6 +17913,197 @@
"dev": true,
"license": "MIT"
},
+ "node_modules/@jest/transform": {
+ "version": "30.2.0",
+ "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-30.2.0.tgz",
+ "integrity": "sha512-XsauDV82o5qXbhalKxD7p4TZYYdwcaEXC77PPD2HixEFF+6YGppjrAAQurTl2ECWcEomHBMMNS9AH3kcCFx8jA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/core": "^7.27.4",
+ "@jest/types": "30.2.0",
+ "@jridgewell/trace-mapping": "^0.3.25",
+ "babel-plugin-istanbul": "^7.0.1",
+ "chalk": "^4.1.2",
+ "convert-source-map": "^2.0.0",
+ "fast-json-stable-stringify": "^2.1.0",
+ "graceful-fs": "^4.2.11",
+ "jest-haste-map": "30.2.0",
+ "jest-regex-util": "30.0.1",
+ "jest-util": "30.2.0",
+ "micromatch": "^4.0.8",
+ "pirates": "^4.0.7",
+ "slash": "^3.0.0",
+ "write-file-atomic": "^5.0.1"
+ },
+ "engines": {
+ "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0"
+ }
+ },
+ "node_modules/@jest/transform/node_modules/@jest/schemas": {
+ "version": "30.0.5",
+ "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-30.0.5.tgz",
+ "integrity": "sha512-DmdYgtezMkh3cpU8/1uyXakv3tJRcmcXxBOcO0tbaozPwpmh4YMsnWrQm9ZmZMfa5ocbxzbFk6O4bDPEc/iAnA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@sinclair/typebox": "^0.34.0"
+ },
+ "engines": {
+ "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0"
+ }
+ },
+ "node_modules/@jest/transform/node_modules/@jest/types": {
+ "version": "30.2.0",
+ "resolved": "https://registry.npmjs.org/@jest/types/-/types-30.2.0.tgz",
+ "integrity": "sha512-H9xg1/sfVvyfU7o3zMfBEjQ1gcsdeTMgqHoYdN79tuLqfTtuu7WckRA1R5whDwOzxaZAeMKTYWqP+WCAi0CHsg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jest/pattern": "30.0.1",
+ "@jest/schemas": "30.0.5",
+ "@types/istanbul-lib-coverage": "^2.0.6",
+ "@types/istanbul-reports": "^3.0.4",
+ "@types/node": "*",
+ "@types/yargs": "^17.0.33",
+ "chalk": "^4.1.2"
+ },
+ "engines": {
+ "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0"
+ }
+ },
+ "node_modules/@jest/transform/node_modules/@sinclair/typebox": {
+ "version": "0.34.41",
+ "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.34.41.tgz",
+ "integrity": "sha512-6gS8pZzSXdyRHTIqoqSVknxolr1kzfy4/CeDnrzsVz8TTIWUbOBr6gnzOmTYJ3eXQNh4IYHIGi5aIL7sOZ2G/g==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@jest/transform/node_modules/ci-info": {
+ "version": "4.3.1",
+ "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.3.1.tgz",
+ "integrity": "sha512-Wdy2Igu8OcBpI2pZePZ5oWjPC38tmDVx5WKUXKwlLYkA0ozo85sLsLvkBbBn/sZaSCMFOGZJ14fvW9t5/d7kdA==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/sibiraj-s"
+ }
+ ],
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/@jest/transform/node_modules/jest-haste-map": {
+ "version": "30.2.0",
+ "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-30.2.0.tgz",
+ "integrity": "sha512-sQA/jCb9kNt+neM0anSj6eZhLZUIhQgwDt7cPGjumgLM4rXsfb9kpnlacmvZz3Q5tb80nS+oG/if+NBKrHC+Xw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jest/types": "30.2.0",
+ "@types/node": "*",
+ "anymatch": "^3.1.3",
+ "fb-watchman": "^2.0.2",
+ "graceful-fs": "^4.2.11",
+ "jest-regex-util": "30.0.1",
+ "jest-util": "30.2.0",
+ "jest-worker": "30.2.0",
+ "micromatch": "^4.0.8",
+ "walker": "^1.0.8"
+ },
+ "engines": {
+ "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0"
+ },
+ "optionalDependencies": {
+ "fsevents": "^2.3.3"
+ }
+ },
+ "node_modules/@jest/transform/node_modules/jest-regex-util": {
+ "version": "30.0.1",
+ "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-30.0.1.tgz",
+ "integrity": "sha512-jHEQgBXAgc+Gh4g0p3bCevgRCVRkB4VB70zhoAE48gxeSr1hfUOsM/C2WoJgVL7Eyg//hudYENbm3Ne+/dRVVA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0"
+ }
+ },
+ "node_modules/@jest/transform/node_modules/jest-util": {
+ "version": "30.2.0",
+ "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-30.2.0.tgz",
+ "integrity": "sha512-QKNsM0o3Xe6ISQU869e+DhG+4CK/48aHYdJZGlFQVTjnbvgpcKyxpzk29fGiO7i/J8VENZ+d2iGnSsvmuHywlA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jest/types": "30.2.0",
+ "@types/node": "*",
+ "chalk": "^4.1.2",
+ "ci-info": "^4.2.0",
+ "graceful-fs": "^4.2.11",
+ "picomatch": "^4.0.2"
+ },
+ "engines": {
+ "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0"
+ }
+ },
+ "node_modules/@jest/transform/node_modules/jest-worker": {
+ "version": "30.2.0",
+ "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-30.2.0.tgz",
+ "integrity": "sha512-0Q4Uk8WF7BUwqXHuAjc23vmopWJw5WH7w2tqBoUOZpOjW/ZnR44GXXd1r82RvnmI2GZge3ivrYXk/BE2+VtW2g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/node": "*",
+ "@ungap/structured-clone": "^1.3.0",
+ "jest-util": "30.2.0",
+ "merge-stream": "^2.0.0",
+ "supports-color": "^8.1.1"
+ },
+ "engines": {
+ "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0"
+ }
+ },
+ "node_modules/@jest/transform/node_modules/picomatch": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz",
+ "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
+ "node_modules/@jest/transform/node_modules/slash": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
+ "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/@jest/transform/node_modules/supports-color": {
+ "version": "8.1.1",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz",
+ "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/supports-color?sponsor=1"
+ }
+ },
"node_modules/@jest/types": {
"version": "29.6.3",
"resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz",
@@ -27780,6 +28378,71 @@
"dev": true,
"license": "Apache-2.0"
},
+ "node_modules/babel-jest": {
+ "version": "30.2.0",
+ "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-30.2.0.tgz",
+ "integrity": "sha512-0YiBEOxWqKkSQWL9nNGGEgndoeL0ZpWrbLMNL5u/Kaxrli3Eaxlt3ZtIDktEvXt4L/R9r3ODr2zKwGM/2BjxVw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jest/transform": "30.2.0",
+ "@types/babel__core": "^7.20.5",
+ "babel-plugin-istanbul": "^7.0.1",
+ "babel-preset-jest": "30.2.0",
+ "chalk": "^4.1.2",
+ "graceful-fs": "^4.2.11",
+ "slash": "^3.0.0"
+ },
+ "engines": {
+ "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.11.0 || ^8.0.0-0"
+ }
+ },
+ "node_modules/babel-jest/node_modules/slash": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
+ "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/babel-plugin-istanbul": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-7.0.1.tgz",
+ "integrity": "sha512-D8Z6Qm8jCvVXtIRkBnqNHX0zJ37rQcFJ9u8WOS6tkYOsRdHBzypCstaxWiu5ZIlqQtviRYbgnRLSoCEvjqcqbA==",
+ "dev": true,
+ "license": "BSD-3-Clause",
+ "workspaces": [
+ "test/babel-8"
+ ],
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.0.0",
+ "@istanbuljs/load-nyc-config": "^1.0.0",
+ "@istanbuljs/schema": "^0.1.3",
+ "istanbul-lib-instrument": "^6.0.2",
+ "test-exclude": "^6.0.0"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/babel-plugin-jest-hoist": {
+ "version": "30.2.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-30.2.0.tgz",
+ "integrity": "sha512-ftzhzSGMUnOzcCXd6WHdBGMyuwy15Wnn0iyyWGKgBDLxf9/s5ABuraCSpBX2uG0jUg4rqJnxsLc5+oYBqoxVaA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/babel__core": "^7.20.5"
+ },
+ "engines": {
+ "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0"
+ }
+ },
"node_modules/babel-plugin-polyfill-corejs2": {
"version": "0.4.8",
"resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.8.tgz",
@@ -27885,6 +28548,23 @@
"@babel/core": "^7.0.0 || ^8.0.0-0"
}
},
+ "node_modules/babel-preset-jest": {
+ "version": "30.2.0",
+ "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-30.2.0.tgz",
+ "integrity": "sha512-US4Z3NOieAQumwFnYdUWKvUKh8+YSnS/gB3t6YBiz0bskpu7Pine8pPCheNxlPEW4wnUkma2a94YuW2q3guvCQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "babel-plugin-jest-hoist": "30.2.0",
+ "babel-preset-current-node-syntax": "^1.2.0"
+ },
+ "engines": {
+ "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.11.0 || ^8.0.0-beta.1"
+ }
+ },
"node_modules/backoff": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/backoff/-/backoff-2.5.0.tgz",
@@ -32610,6 +33290,7 @@
"resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz",
"integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=8.0.0"
}
@@ -33515,6 +34196,7 @@
"resolved": "https://registry.npmjs.org/identity-obj-proxy/-/identity-obj-proxy-3.0.0.tgz",
"integrity": "sha512-00n6YnVHKrinT9t0d9+5yZC6UBNJANpYEQvL2LlX6Ab9lnmxzIRcEmTPuyGScvl1+jKuCICX1Z0Ab1pPKKdikA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"harmony-reflect": "^1.4.6"
},
@@ -35099,33 +35781,6 @@
"node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0"
}
},
- "node_modules/jest/node_modules/@jest/transform": {
- "version": "30.2.0",
- "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-30.2.0.tgz",
- "integrity": "sha512-XsauDV82o5qXbhalKxD7p4TZYYdwcaEXC77PPD2HixEFF+6YGppjrAAQurTl2ECWcEomHBMMNS9AH3kcCFx8jA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@babel/core": "^7.27.4",
- "@jest/types": "30.2.0",
- "@jridgewell/trace-mapping": "^0.3.25",
- "babel-plugin-istanbul": "^7.0.1",
- "chalk": "^4.1.2",
- "convert-source-map": "^2.0.0",
- "fast-json-stable-stringify": "^2.1.0",
- "graceful-fs": "^4.2.11",
- "jest-haste-map": "30.2.0",
- "jest-regex-util": "30.0.1",
- "jest-util": "30.2.0",
- "micromatch": "^4.0.8",
- "pirates": "^4.0.7",
- "slash": "^3.0.0",
- "write-file-atomic": "^5.0.1"
- },
- "engines": {
- "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0"
- }
- },
"node_modules/jest/node_modules/@jest/types": {
"version": "30.2.0",
"resolved": "https://registry.npmjs.org/@jest/types/-/types-30.2.0.tgz",
@@ -35188,78 +35843,6 @@
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
}
},
- "node_modules/jest/node_modules/babel-jest": {
- "version": "30.2.0",
- "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-30.2.0.tgz",
- "integrity": "sha512-0YiBEOxWqKkSQWL9nNGGEgndoeL0ZpWrbLMNL5u/Kaxrli3Eaxlt3ZtIDktEvXt4L/R9r3ODr2zKwGM/2BjxVw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@jest/transform": "30.2.0",
- "@types/babel__core": "^7.20.5",
- "babel-plugin-istanbul": "^7.0.1",
- "babel-preset-jest": "30.2.0",
- "chalk": "^4.1.2",
- "graceful-fs": "^4.2.11",
- "slash": "^3.0.0"
- },
- "engines": {
- "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.11.0 || ^8.0.0-0"
- }
- },
- "node_modules/jest/node_modules/babel-plugin-istanbul": {
- "version": "7.0.1",
- "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-7.0.1.tgz",
- "integrity": "sha512-D8Z6Qm8jCvVXtIRkBnqNHX0zJ37rQcFJ9u8WOS6tkYOsRdHBzypCstaxWiu5ZIlqQtviRYbgnRLSoCEvjqcqbA==",
- "dev": true,
- "license": "BSD-3-Clause",
- "workspaces": [
- "test/babel-8"
- ],
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.0.0",
- "@istanbuljs/load-nyc-config": "^1.0.0",
- "@istanbuljs/schema": "^0.1.3",
- "istanbul-lib-instrument": "^6.0.2",
- "test-exclude": "^6.0.0"
- },
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/jest/node_modules/babel-plugin-jest-hoist": {
- "version": "30.2.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-30.2.0.tgz",
- "integrity": "sha512-ftzhzSGMUnOzcCXd6WHdBGMyuwy15Wnn0iyyWGKgBDLxf9/s5ABuraCSpBX2uG0jUg4rqJnxsLc5+oYBqoxVaA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@types/babel__core": "^7.20.5"
- },
- "engines": {
- "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0"
- }
- },
- "node_modules/jest/node_modules/babel-preset-jest": {
- "version": "30.2.0",
- "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-30.2.0.tgz",
- "integrity": "sha512-US4Z3NOieAQumwFnYdUWKvUKh8+YSnS/gB3t6YBiz0bskpu7Pine8pPCheNxlPEW4wnUkma2a94YuW2q3guvCQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "babel-plugin-jest-hoist": "30.2.0",
- "babel-preset-current-node-syntax": "^1.2.0"
- },
- "engines": {
- "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.11.0 || ^8.0.0-beta.1"
- }
- },
"node_modules/jest/node_modules/brace-expansion": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz",
@@ -35914,19 +36497,6 @@
],
"license": "MIT"
},
- "node_modules/jest/node_modules/signal-exit": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz",
- "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==",
- "dev": true,
- "license": "ISC",
- "engines": {
- "node": ">=14"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- }
- },
"node_modules/jest/node_modules/slash": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
@@ -35969,20 +36539,6 @@
"url": "https://opencollective.com/synckit"
}
},
- "node_modules/jest/node_modules/write-file-atomic": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.1.tgz",
- "integrity": "sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "imurmurhash": "^0.1.4",
- "signal-exit": "^4.0.1"
- },
- "engines": {
- "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
- }
- },
"node_modules/jiti": {
"version": "1.21.0",
"resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.0.tgz",
@@ -37231,8 +37787,8 @@
"version": "0.525.0",
"resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.525.0.tgz",
"integrity": "sha512-Tm1txJ2OkymCGkvwoHt33Y2JpN5xucVq1slHcgE6Lk0WjDfjgKWor5CdVER8U6DvcfMwh4M8XxmpTiyzfmfDYQ==",
+ "dev": true,
"license": "ISC",
- "peer": true,
"peerDependencies": {
"react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0"
}
@@ -43912,6 +44468,13 @@
"node": ">= 18"
}
},
+ "node_modules/rrweb-cssom": {
+ "version": "0.8.0",
+ "resolved": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.8.0.tgz",
+ "integrity": "sha512-guoltQEx+9aMf2gDZ0s62EcV8lsXR+0w8915TC3ITdn2YueuNjdAYh/levpU9nFaoChh9RUS5ZdQMrKfVEN9tw==",
+ "dev": true,
+ "license": "MIT"
+ },
"node_modules/run-applescript": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-7.0.0.tgz",
@@ -44498,7 +45061,8 @@
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
"integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==",
- "dev": true
+ "dev": true,
+ "license": "BSD-3-Clause"
},
"node_modules/sse.js": {
"version": "2.5.0",
@@ -45548,6 +46112,7 @@
"resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz",
"integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==",
"dev": true,
+ "license": "ISC",
"dependencies": {
"@istanbuljs/schema": "^0.1.2",
"glob": "^7.1.4",
@@ -45561,7 +46126,9 @@
"version": "7.2.3",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
"integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
+ "deprecated": "Glob versions prior to v9 are no longer supported",
"dev": true,
+ "license": "ISC",
"dependencies": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
@@ -45680,6 +46247,26 @@
"url": "https://github.com/sponsors/jonschlinkert"
}
},
+ "node_modules/tldts": {
+ "version": "6.1.86",
+ "resolved": "https://registry.npmjs.org/tldts/-/tldts-6.1.86.tgz",
+ "integrity": "sha512-WMi/OQ2axVTf/ykqCQgXiIct+mSQDFdH2fkwhPwgEwvJ1kSzZRiinb0zF2Xb8u4+OqPChmyI6MEu4EezNJz+FQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "tldts-core": "^6.1.86"
+ },
+ "bin": {
+ "tldts": "bin/cli.js"
+ }
+ },
+ "node_modules/tldts-core": {
+ "version": "6.1.86",
+ "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-6.1.86.tgz",
+ "integrity": "sha512-Je6p7pkk+KMzMv2XXKmAE3McmolOQFdxkKw0R8EYNr7sELW46JqnNeTX8ybPiQgvg1ymCoF8LXs5fzFaZvJPTA==",
+ "dev": true,
+ "license": "MIT"
+ },
"node_modules/tmpl": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz",
@@ -47830,6 +48417,33 @@
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
},
+ "node_modules/write-file-atomic": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.1.tgz",
+ "integrity": "sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "imurmurhash": "^0.1.4",
+ "signal-exit": "^4.0.1"
+ },
+ "engines": {
+ "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
+ }
+ },
+ "node_modules/write-file-atomic/node_modules/signal-exit": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz",
+ "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==",
+ "dev": true,
+ "license": "ISC",
+ "engines": {
+ "node": ">=14"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
"node_modules/ws": {
"version": "8.18.0",
"resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz",
@@ -48210,19 +48824,32 @@
"name": "@librechat/client",
"version": "0.4.1",
"devDependencies": {
+ "@babel/core": "^7.28.5",
+ "@babel/preset-env": "^7.28.5",
+ "@babel/preset-react": "^7.28.5",
+ "@babel/preset-typescript": "^7.28.5",
"@rollup/plugin-alias": "^5.1.0",
"@rollup/plugin-commonjs": "^29.0.0",
"@rollup/plugin-node-resolve": "^15.0.0",
"@rollup/plugin-replace": "^5.0.5",
"@rollup/plugin-terser": "^0.4.4",
"@tanstack/react-query": "^4.28.0",
+ "@tanstack/react-table": "^8.21.3",
+ "@tanstack/react-virtual": "^3.13.13",
+ "@testing-library/jest-dom": "^6.9.1",
"@testing-library/react": "^14.0.0",
+ "@types/jest": "^29.5.14",
"@types/react": "^18.2.11",
"@types/react-dom": "^18.2.4",
+ "babel-jest": "^30.2.0",
"caniuse-lite": "^1.0.30001741",
"concat-with-sourcemaps": "^1.1.0",
"i18next": "^24.2.3",
+ "identity-obj-proxy": "^3.0.0",
+ "jest": "^30.2.0",
+ "jest-environment-jsdom": "^30.2.0",
"jotai": "^2.12.5",
+ "lucide-react": "^0.525.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-i18next": "^15.4.0",
@@ -48282,171 +48909,2238 @@
"tailwind-merge": "^1.9.1"
}
},
- "packages/client/node_modules/@testing-library/dom": {
- "version": "10.4.0",
- "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-10.4.0.tgz",
- "integrity": "sha512-pemlzrSESWbdAloYml3bAJMEfNh1Z7EduzqPKprCH5S341frlpYnUEW0H72dLxa6IsYr+mPno20GiSm+h9dEdQ==",
+ "packages/client/node_modules/@adobe/css-tools": {
+ "version": "4.4.4",
+ "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.4.4.tgz",
+ "integrity": "sha512-Elp+iwUx5rN5+Y8xLt5/GRoG20WGoDCQ/1Fb+1LiGtvwbDavuSk0jhD/eZdckHAuzcDzccnkv+rEjyWfRx18gg==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "packages/client/node_modules/@babel/helper-annotate-as-pure": {
+ "version": "7.27.3",
+ "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.27.3.tgz",
+ "integrity": "sha512-fXSwMQqitTGeHLBC08Eq5yXz2m37E4pJX1qAU1+2cNedz/ifv/bVXft90VeSav5nFO61EcNgwr0aJxbyPaWBPg==",
"dev": true,
"license": "MIT",
- "peer": true,
"dependencies": {
- "@babel/code-frame": "^7.10.4",
- "@babel/runtime": "^7.12.5",
- "@types/aria-query": "^5.0.1",
- "aria-query": "5.3.0",
- "chalk": "^4.1.0",
- "dom-accessibility-api": "^0.5.9",
- "lz-string": "^1.5.0",
- "pretty-format": "^27.0.2"
+ "@babel/types": "^7.27.3"
},
"engines": {
- "node": ">=18"
+ "node": ">=6.9.0"
}
},
- "packages/client/node_modules/@testing-library/react": {
- "version": "16.3.0",
- "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-16.3.0.tgz",
- "integrity": "sha512-kFSyxiEDwv1WLl2fgsq6pPBbw5aWKrsY2/noi1Id0TK0UParSF62oFQFGHXIyaG4pp2tEub/Zlel+fjjZILDsw==",
+ "packages/client/node_modules/@babel/helper-create-class-features-plugin": {
+ "version": "7.28.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.28.5.tgz",
+ "integrity": "sha512-q3WC4JfdODypvxArsJQROfupPBq9+lMwjKq7C33GhbFYJsufD0yd/ziwD+hJucLeWsnFPWZjsU2DNFqBPE7jwQ==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@babel/runtime": "^7.12.5"
+ "@babel/helper-annotate-as-pure": "^7.27.3",
+ "@babel/helper-member-expression-to-functions": "^7.28.5",
+ "@babel/helper-optimise-call-expression": "^7.27.1",
+ "@babel/helper-replace-supers": "^7.27.1",
+ "@babel/helper-skip-transparent-expression-wrappers": "^7.27.1",
+ "@babel/traverse": "^7.28.5",
+ "semver": "^6.3.1"
},
"engines": {
- "node": ">=18"
+ "node": ">=6.9.0"
},
"peerDependencies": {
- "@testing-library/dom": "^10.0.0",
- "@types/react": "^18.0.0 || ^19.0.0",
- "@types/react-dom": "^18.0.0 || ^19.0.0",
- "react": "^18.0.0 || ^19.0.0",
- "react-dom": "^18.0.0 || ^19.0.0"
+ "@babel/core": "^7.0.0"
+ }
+ },
+ "packages/client/node_modules/@babel/helper-create-regexp-features-plugin": {
+ "version": "7.28.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.28.5.tgz",
+ "integrity": "sha512-N1EhvLtHzOvj7QQOUCCS3NrPJP8c5W6ZXCHDn7Yialuy1iu4r5EmIYkXlKNqT99Ciw+W0mDqWoR6HWMZlFP3hw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-annotate-as-pure": "^7.27.3",
+ "regexpu-core": "^6.3.1",
+ "semver": "^6.3.1"
},
- "peerDependenciesMeta": {
- "@types/react": {
- "optional": true
- },
- "@types/react-dom": {
- "optional": true
- }
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0"
}
},
- "packages/client/node_modules/ansi-styles": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz",
- "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==",
+ "packages/client/node_modules/@babel/helper-define-polyfill-provider": {
+ "version": "0.6.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.5.tgz",
+ "integrity": "sha512-uJnGFcPsWQK8fvjgGP5LZUZZsYGIoPeRjSF5PGwrelYgq7Q15/Ft9NGFp1zglwgIv//W0uG4BevRuSJRyylZPg==",
"dev": true,
"license": "MIT",
- "peer": true,
+ "dependencies": {
+ "@babel/helper-compilation-targets": "^7.27.2",
+ "@babel/helper-plugin-utils": "^7.27.1",
+ "debug": "^4.4.1",
+ "lodash.debounce": "^4.0.8",
+ "resolve": "^1.22.10"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0"
+ }
+ },
+ "packages/client/node_modules/@babel/helper-member-expression-to-functions": {
+ "version": "7.28.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.28.5.tgz",
+ "integrity": "sha512-cwM7SBRZcPCLgl8a7cY0soT1SptSzAlMH39vwiRpOQkJlh53r5hdHwLSCZpQdVLT39sZt+CRpNwYG4Y2v77atg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/traverse": "^7.28.5",
+ "@babel/types": "^7.28.5"
+ },
"engines": {
- "node": ">=10"
+ "node": ">=6.9.0"
+ }
+ },
+ "packages/client/node_modules/@babel/helper-optimise-call-expression": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.27.1.tgz",
+ "integrity": "sha512-URMGH08NzYFhubNSGJrpUEphGKQwMQYBySzat5cAByY1/YgIRkULnIy3tAMeszlL/so2HbeilYloUmSpd7GdVw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/types": "^7.27.1"
},
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ "engines": {
+ "node": ">=6.9.0"
}
},
- "packages/client/node_modules/aria-query": {
- "version": "5.3.0",
- "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz",
- "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==",
+ "packages/client/node_modules/@babel/helper-remap-async-to-generator": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.27.1.tgz",
+ "integrity": "sha512-7fiA521aVw8lSPeI4ZOD3vRFkoqkJcS+z4hFo82bFSH/2tNd6eJ5qCVMS5OzDmZh/kaHQeBaeyxK6wljcPtveA==",
"dev": true,
- "license": "Apache-2.0",
- "peer": true,
+ "license": "MIT",
"dependencies": {
- "dequal": "^2.0.3"
+ "@babel/helper-annotate-as-pure": "^7.27.1",
+ "@babel/helper-wrap-function": "^7.27.1",
+ "@babel/traverse": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0"
}
},
- "packages/client/node_modules/i18next": {
- "version": "24.2.3",
- "resolved": "https://registry.npmjs.org/i18next/-/i18next-24.2.3.tgz",
- "integrity": "sha512-lfbf80OzkocvX7nmZtu7nSTNbrTYR52sLWxPtlXX1zAhVw8WEnFk4puUkCR4B1dNQwbSpEHHHemcZu//7EcB7A==",
+ "packages/client/node_modules/@babel/helper-replace-supers": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.27.1.tgz",
+ "integrity": "sha512-7EHz6qDZc8RYS5ElPoShMheWvEgERonFCs7IAonWLLUTXW59DP14bCZt89/GKyreYn8g3S83m21FelHKbeDCKA==",
"dev": true,
- "funding": [
- {
- "type": "individual",
- "url": "https://locize.com"
- },
- {
- "type": "individual",
- "url": "https://locize.com/i18next.html"
- },
- {
- "type": "individual",
- "url": "https://www.i18next.com/how-to/faq#i18next-is-awesome.-how-can-i-support-the-project"
- }
- ],
"license": "MIT",
"dependencies": {
- "@babel/runtime": "^7.26.10"
+ "@babel/helper-member-expression-to-functions": "^7.27.1",
+ "@babel/helper-optimise-call-expression": "^7.27.1",
+ "@babel/traverse": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
},
"peerDependencies": {
- "typescript": "^5"
+ "@babel/core": "^7.0.0"
+ }
+ },
+ "packages/client/node_modules/@babel/helper-skip-transparent-expression-wrappers": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.27.1.tgz",
+ "integrity": "sha512-Tub4ZKEXqbPjXgWLl2+3JpQAYBJ8+ikpQ2Ocj/q/r0LwE3UhENh7EUabyHjz2kCEsrRY83ew2DQdHluuiDQFzg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/traverse": "^7.27.1",
+ "@babel/types": "^7.27.1"
},
- "peerDependenciesMeta": {
- "typescript": {
- "optional": true
- }
+ "engines": {
+ "node": ">=6.9.0"
}
},
- "packages/client/node_modules/pretty-format": {
- "version": "27.5.1",
- "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz",
- "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==",
+ "packages/client/node_modules/@babel/helper-wrap-function": {
+ "version": "7.28.3",
+ "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.28.3.tgz",
+ "integrity": "sha512-zdf983tNfLZFletc0RRXYrHrucBEg95NIFMkn6K9dbeMYnsgHaSBGcQqdsCSStG2PYwRre0Qc2NNSCXbG+xc6g==",
"dev": true,
"license": "MIT",
- "peer": true,
"dependencies": {
- "ansi-regex": "^5.0.1",
- "ansi-styles": "^5.0.0",
- "react-is": "^17.0.1"
+ "@babel/template": "^7.27.2",
+ "@babel/traverse": "^7.28.3",
+ "@babel/types": "^7.28.2"
},
"engines": {
- "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
+ "node": ">=6.9.0"
}
},
- "packages/client/node_modules/react-hook-form": {
- "version": "7.60.0",
- "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.60.0.tgz",
- "integrity": "sha512-SBrYOvMbDB7cV8ZfNpaiLcgjH/a1c7aK0lK+aNigpf4xWLO8q+o4tcvVurv3c4EOyzn/3dCsYt4GKD42VvJ/+A==",
+ "packages/client/node_modules/@babel/plugin-bugfix-firefox-class-in-computed-class-key": {
+ "version": "7.28.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.28.5.tgz",
+ "integrity": "sha512-87GDMS3tsmMSi/3bWOte1UblL+YUTFMV8SZPZ2eSEL17s74Cw/l63rR6NmGVKMYW2GYi85nE+/d6Hw5N0bEk2Q==",
+ "dev": true,
"license": "MIT",
- "peer": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1",
+ "@babel/traverse": "^7.28.5"
+ },
"engines": {
- "node": ">=18.0.0"
+ "node": ">=6.9.0"
},
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/react-hook-form"
+ "peerDependencies": {
+ "@babel/core": "^7.0.0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-bugfix-safari-class-field-initializer-scope": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-class-field-initializer-scope/-/plugin-bugfix-safari-class-field-initializer-scope-7.27.1.tgz",
+ "integrity": "sha512-qNeq3bCKnGgLkEXUuFry6dPlGfCdQNZbn7yUAPCInwAJHMU7THJfrBSozkcWq5sNM6RcF3S8XyQL2A52KNR9IA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
},
"peerDependencies": {
- "react": "^16.8.0 || ^17 || ^18 || ^19"
+ "@babel/core": "^7.0.0"
}
},
- "packages/client/node_modules/react-is": {
- "version": "17.0.2",
- "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",
- "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==",
+ "packages/client/node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.27.1.tgz",
+ "integrity": "sha512-g4L7OYun04N1WyqMNjldFwlfPCLVkgB54A/YCXICZYBsvJJE3kByKv9c9+R/nAfmIfjl2rKYLNyMHboYbZaWaA==",
"dev": true,
"license": "MIT",
- "peer": true
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0"
+ }
},
- "packages/client/node_modules/rimraf": {
- "version": "6.1.2",
- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-6.1.2.tgz",
- "integrity": "sha512-cFCkPslJv7BAXJsYlK1dZsbP8/ZNLkCAQ0bi1hf5EKX2QHegmDFEFA6QhuYJlk7UDdc+02JjO80YSOrWPpw06g==",
+ "packages/client/node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.27.1.tgz",
+ "integrity": "sha512-oO02gcONcD5O1iTLi/6frMJBIwWEHceWGSGqrpCmEL8nogiS6J9PBlE48CaK20/Jx1LuRml9aDftLgdjXT8+Cw==",
"dev": true,
- "license": "BlueOak-1.0.0",
+ "license": "MIT",
"dependencies": {
- "glob": "^13.0.0",
- "package-json-from-dist": "^1.0.1"
+ "@babel/helper-plugin-utils": "^7.27.1",
+ "@babel/helper-skip-transparent-expression-wrappers": "^7.27.1",
+ "@babel/plugin-transform-optional-chaining": "^7.27.1"
},
- "bin": {
- "rimraf": "dist/esm/bin.mjs"
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.13.0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": {
+ "version": "7.28.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.28.3.tgz",
+ "integrity": "sha512-b6YTX108evsvE4YgWyQ921ZAFFQm3Bn+CA3+ZXlNVnPhx+UfsVURoPjfGAPCjBgrqo30yX/C2nZGX96DxvR9Iw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1",
+ "@babel/traverse": "^7.28.3"
},
"engines": {
- "node": "20 || >=22"
+ "node": ">=6.9.0"
},
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
+ "peerDependencies": {
+ "@babel/core": "^7.0.0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-syntax-import-assertions": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.27.1.tgz",
+ "integrity": "sha512-UT/Jrhw57xg4ILHLFnzFpPDlMbcdEicaAtjPQpbj9wa8T4r5KVWCimHcL/460g8Ht0DMxDyjsLgiWSkVjnwPFg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-transform-arrow-functions": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.27.1.tgz",
+ "integrity": "sha512-8Z4TGic6xW70FKThA5HYEKKyBpOOsucTOD1DjU3fZxDg+K3zBJcXMFnt/4yQiZnf5+MiOMSXQ9PaEK/Ilh1DeA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-transform-async-generator-functions": {
+ "version": "7.28.0",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.28.0.tgz",
+ "integrity": "sha512-BEOdvX4+M765icNPZeidyADIvQ1m1gmunXufXxvRESy/jNNyfovIqUyE7MVgGBjWktCoJlzvFA1To2O4ymIO3Q==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1",
+ "@babel/helper-remap-async-to-generator": "^7.27.1",
+ "@babel/traverse": "^7.28.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-transform-async-to-generator": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.27.1.tgz",
+ "integrity": "sha512-NREkZsZVJS4xmTr8qzE5y8AfIPqsdQfRuUiLRTEzb7Qii8iFWCyDKaUV2c0rCuh4ljDZ98ALHP/PetiBV2nddA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-module-imports": "^7.27.1",
+ "@babel/helper-plugin-utils": "^7.27.1",
+ "@babel/helper-remap-async-to-generator": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-transform-block-scoped-functions": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.27.1.tgz",
+ "integrity": "sha512-cnqkuOtZLapWYZUYM5rVIdv1nXYuFVIltZ6ZJ7nIj585QsjKM5dhL2Fu/lICXZ1OyIAFc7Qy+bvDAtTXqGrlhg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-transform-block-scoping": {
+ "version": "7.28.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.28.5.tgz",
+ "integrity": "sha512-45DmULpySVvmq9Pj3X9B+62Xe+DJGov27QravQJU1LLcapR6/10i+gYVAucGGJpHBp5mYxIMK4nDAT/QDLr47g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-transform-class-properties": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.27.1.tgz",
+ "integrity": "sha512-D0VcalChDMtuRvJIu3U/fwWjf8ZMykz5iZsg77Nuj821vCKI3zCyRLwRdWbsuJ/uRwZhZ002QtCqIkwC/ZkvbA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-create-class-features-plugin": "^7.27.1",
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-transform-class-static-block": {
+ "version": "7.28.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.28.3.tgz",
+ "integrity": "sha512-LtPXlBbRoc4Njl/oh1CeD/3jC+atytbnf/UqLoqTDcEYGUPj022+rvfkbDYieUrSj3CaV4yHDByPE+T2HwfsJg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-create-class-features-plugin": "^7.28.3",
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.12.0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-transform-classes": {
+ "version": "7.28.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.28.4.tgz",
+ "integrity": "sha512-cFOlhIYPBv/iBoc+KS3M6et2XPtbT2HiCRfBXWtfpc9OAyostldxIf9YAYB6ypURBBbx+Qv6nyrLzASfJe+hBA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-annotate-as-pure": "^7.27.3",
+ "@babel/helper-compilation-targets": "^7.27.2",
+ "@babel/helper-globals": "^7.28.0",
+ "@babel/helper-plugin-utils": "^7.27.1",
+ "@babel/helper-replace-supers": "^7.27.1",
+ "@babel/traverse": "^7.28.4"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-transform-computed-properties": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.27.1.tgz",
+ "integrity": "sha512-lj9PGWvMTVksbWiDT2tW68zGS/cyo4AkZ/QTp0sQT0mjPopCmrSkzxeXkznjqBxzDI6TclZhOJbBmbBLjuOZUw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1",
+ "@babel/template": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-transform-dotall-regex": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.27.1.tgz",
+ "integrity": "sha512-gEbkDVGRvjj7+T1ivxrfgygpT7GUd4vmODtYpbs0gZATdkX8/iSnOtZSxiZnsgm1YjTgjI6VKBGSJJevkrclzw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-create-regexp-features-plugin": "^7.27.1",
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-transform-duplicate-keys": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.27.1.tgz",
+ "integrity": "sha512-MTyJk98sHvSs+cvZ4nOauwTTG1JeonDjSGvGGUNHreGQns+Mpt6WX/dVzWBHgg+dYZhkC4X+zTDfkTU+Vy9y7Q==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-transform-duplicate-named-capturing-groups-regex": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-named-capturing-groups-regex/-/plugin-transform-duplicate-named-capturing-groups-regex-7.27.1.tgz",
+ "integrity": "sha512-hkGcueTEzuhB30B3eJCbCYeCaaEQOmQR0AdvzpD4LoN0GXMWzzGSuRrxR2xTnCrvNbVwK9N6/jQ92GSLfiZWoQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-create-regexp-features-plugin": "^7.27.1",
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-transform-dynamic-import": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.27.1.tgz",
+ "integrity": "sha512-MHzkWQcEmjzzVW9j2q8LGjwGWpG2mjwaaB0BNQwst3FIjqsg8Ct/mIZlvSPJvfi9y2AC8mi/ktxbFVL9pZ1I4A==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-transform-exponentiation-operator": {
+ "version": "7.28.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.28.5.tgz",
+ "integrity": "sha512-D4WIMaFtwa2NizOp+dnoFjRez/ClKiC2BqqImwKd1X28nqBtZEyCYJ2ozQrrzlxAFrcrjxo39S6khe9RNDlGzw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-transform-export-namespace-from": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.27.1.tgz",
+ "integrity": "sha512-tQvHWSZ3/jH2xuq/vZDy0jNn+ZdXJeM8gHvX4lnJmsc3+50yPlWdZXIc5ay+umX+2/tJIqHqiEqcJvxlmIvRvQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-transform-for-of": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.27.1.tgz",
+ "integrity": "sha512-BfbWFFEJFQzLCQ5N8VocnCtA8J1CLkNTe2Ms2wocj75dd6VpiqS5Z5quTYcUoo4Yq+DN0rtikODccuv7RU81sw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1",
+ "@babel/helper-skip-transparent-expression-wrappers": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-transform-function-name": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.27.1.tgz",
+ "integrity": "sha512-1bQeydJF9Nr1eBCMMbC+hdwmRlsv5XYOMu03YSWFwNs0HsAmtSxxF1fyuYPqemVldVyFmlCU7w8UE14LupUSZQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-compilation-targets": "^7.27.1",
+ "@babel/helper-plugin-utils": "^7.27.1",
+ "@babel/traverse": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-transform-json-strings": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.27.1.tgz",
+ "integrity": "sha512-6WVLVJiTjqcQauBhn1LkICsR2H+zm62I3h9faTDKt1qP4jn2o72tSvqMwtGFKGTpojce0gJs+76eZ2uCHRZh0Q==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-transform-literals": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.27.1.tgz",
+ "integrity": "sha512-0HCFSepIpLTkLcsi86GG3mTUzxV5jpmbv97hTETW3yzrAij8aqlD36toB1D0daVFJM8NK6GvKO0gslVQmm+zZA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-transform-logical-assignment-operators": {
+ "version": "7.28.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.28.5.tgz",
+ "integrity": "sha512-axUuqnUTBuXyHGcJEVVh9pORaN6wC5bYfE7FGzPiaWa3syib9m7g+/IT/4VgCOe2Upef43PHzeAvcrVek6QuuA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-transform-member-expression-literals": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.27.1.tgz",
+ "integrity": "sha512-hqoBX4dcZ1I33jCSWcXrP+1Ku7kdqXf1oeah7ooKOIiAdKQ+uqftgCFNOSzA5AMS2XIHEYeGFg4cKRCdpxzVOQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-transform-modules-amd": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.27.1.tgz",
+ "integrity": "sha512-iCsytMg/N9/oFq6n+gFTvUYDZQOMK5kEdeYxmxt91fcJGycfxVP9CnrxoliM0oumFERba2i8ZtwRUCMhvP1LnA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-module-transforms": "^7.27.1",
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-transform-modules-commonjs": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.27.1.tgz",
+ "integrity": "sha512-OJguuwlTYlN0gBZFRPqwOGNWssZjfIUdS7HMYtN8c1KmwpwHFBwTeFZrg9XZa+DFTitWOW5iTAG7tyCUPsCCyw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-module-transforms": "^7.27.1",
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-transform-modules-systemjs": {
+ "version": "7.28.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.28.5.tgz",
+ "integrity": "sha512-vn5Jma98LCOeBy/KpeQhXcV2WZgaRUtjwQmjoBuLNlOmkg0fB5pdvYVeWRYI69wWKwK2cD1QbMiUQnoujWvrew==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-module-transforms": "^7.28.3",
+ "@babel/helper-plugin-utils": "^7.27.1",
+ "@babel/helper-validator-identifier": "^7.28.5",
+ "@babel/traverse": "^7.28.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-transform-modules-umd": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.27.1.tgz",
+ "integrity": "sha512-iQBE/xC5BV1OxJbp6WG7jq9IWiD+xxlZhLrdwpPkTX3ydmXdvoCpyfJN7acaIBZaOqTfr76pgzqBJflNbeRK+w==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-module-transforms": "^7.27.1",
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-transform-named-capturing-groups-regex": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.27.1.tgz",
+ "integrity": "sha512-SstR5JYy8ddZvD6MhV0tM/j16Qds4mIpJTOd1Yu9J9pJjH93bxHECF7pgtc28XvkzTD6Pxcm/0Z73Hvk7kb3Ng==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-create-regexp-features-plugin": "^7.27.1",
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-transform-new-target": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.27.1.tgz",
+ "integrity": "sha512-f6PiYeqXQ05lYq3TIfIDu/MtliKUbNwkGApPUvyo6+tc7uaR4cPjPe7DFPr15Uyycg2lZU6btZ575CuQoYh7MQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-transform-nullish-coalescing-operator": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.27.1.tgz",
+ "integrity": "sha512-aGZh6xMo6q9vq1JGcw58lZ1Z0+i0xB2x0XaauNIUXd6O1xXc3RwoWEBlsTQrY4KQ9Jf0s5rgD6SiNkaUdJegTA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-transform-numeric-separator": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.27.1.tgz",
+ "integrity": "sha512-fdPKAcujuvEChxDBJ5c+0BTaS6revLV7CJL08e4m3de8qJfNIuCc2nc7XJYOjBoTMJeqSmwXJ0ypE14RCjLwaw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-transform-object-rest-spread": {
+ "version": "7.28.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.28.4.tgz",
+ "integrity": "sha512-373KA2HQzKhQCYiRVIRr+3MjpCObqzDlyrM6u4I201wL8Mp2wHf7uB8GhDwis03k2ti8Zr65Zyyqs1xOxUF/Ew==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-compilation-targets": "^7.27.2",
+ "@babel/helper-plugin-utils": "^7.27.1",
+ "@babel/plugin-transform-destructuring": "^7.28.0",
+ "@babel/plugin-transform-parameters": "^7.27.7",
+ "@babel/traverse": "^7.28.4"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-transform-object-super": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.27.1.tgz",
+ "integrity": "sha512-SFy8S9plRPbIcxlJ8A6mT/CxFdJx/c04JEctz4jf8YZaVS2px34j7NXRrlGlHkN/M2gnpL37ZpGRGVFLd3l8Ng==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1",
+ "@babel/helper-replace-supers": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-transform-optional-catch-binding": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.27.1.tgz",
+ "integrity": "sha512-txEAEKzYrHEX4xSZN4kJ+OfKXFVSWKB2ZxM9dpcE3wT7smwkNmXo5ORRlVzMVdJbD+Q8ILTgSD7959uj+3Dm3Q==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-transform-optional-chaining": {
+ "version": "7.28.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.28.5.tgz",
+ "integrity": "sha512-N6fut9IZlPnjPwgiQkXNhb+cT8wQKFlJNqcZkWlcTqkcqx6/kU4ynGmLFoa4LViBSirn05YAwk+sQBbPfxtYzQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1",
+ "@babel/helper-skip-transparent-expression-wrappers": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-transform-parameters": {
+ "version": "7.27.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.27.7.tgz",
+ "integrity": "sha512-qBkYTYCb76RRxUM6CcZA5KRu8K4SM8ajzVeUgVdMVO9NN9uI/GaVmBg/WKJJGnNokV9SY8FxNOVWGXzqzUidBg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-transform-private-methods": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.27.1.tgz",
+ "integrity": "sha512-10FVt+X55AjRAYI9BrdISN9/AQWHqldOeZDUoLyif1Kn05a56xVBXb8ZouL8pZ9jem8QpXaOt8TS7RHUIS+GPA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-create-class-features-plugin": "^7.27.1",
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-transform-private-property-in-object": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.27.1.tgz",
+ "integrity": "sha512-5J+IhqTi1XPa0DXF83jYOaARrX+41gOewWbkPyjMNRDqgOCqdffGh8L3f/Ek5utaEBZExjSAzcyjmV9SSAWObQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-annotate-as-pure": "^7.27.1",
+ "@babel/helper-create-class-features-plugin": "^7.27.1",
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-transform-property-literals": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.27.1.tgz",
+ "integrity": "sha512-oThy3BCuCha8kDZ8ZkgOg2exvPYUlprMukKQXI1r1pJ47NCvxfkEy8vK+r/hT9nF0Aa4H1WUPZZjHTFtAhGfmQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-transform-react-display-name": {
+ "version": "7.28.0",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.28.0.tgz",
+ "integrity": "sha512-D6Eujc2zMxKjfa4Zxl4GHMsmhKKZ9VpcqIchJLvwTxad9zWIYulwYItBovpDOoNLISpcZSXoDJ5gaGbQUDqViA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-transform-react-jsx": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.27.1.tgz",
+ "integrity": "sha512-2KH4LWGSrJIkVf5tSiBFYuXDAoWRq2MMwgivCf+93dd0GQi8RXLjKA/0EvRnVV5G0hrHczsquXuD01L8s6dmBw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-annotate-as-pure": "^7.27.1",
+ "@babel/helper-module-imports": "^7.27.1",
+ "@babel/helper-plugin-utils": "^7.27.1",
+ "@babel/plugin-syntax-jsx": "^7.27.1",
+ "@babel/types": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-transform-react-jsx-development": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.27.1.tgz",
+ "integrity": "sha512-ykDdF5yI4f1WrAolLqeF3hmYU12j9ntLQl/AOG1HAS21jxyg1Q0/J/tpREuYLfatGdGmXp/3yS0ZA76kOlVq9Q==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/plugin-transform-react-jsx": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-transform-react-pure-annotations": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.27.1.tgz",
+ "integrity": "sha512-JfuinvDOsD9FVMTHpzA/pBLisxpv1aSf+OIV8lgH3MuWrks19R27e6a6DipIg4aX1Zm9Wpb04p8wljfKrVSnPA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-annotate-as-pure": "^7.27.1",
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-transform-regenerator": {
+ "version": "7.28.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.28.4.tgz",
+ "integrity": "sha512-+ZEdQlBoRg9m2NnzvEeLgtvBMO4tkFBw5SQIUgLICgTrumLoU7lr+Oghi6km2PFj+dbUt2u1oby2w3BDO9YQnA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-transform-regexp-modifiers": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regexp-modifiers/-/plugin-transform-regexp-modifiers-7.27.1.tgz",
+ "integrity": "sha512-TtEciroaiODtXvLZv4rmfMhkCv8jx3wgKpL68PuiPh2M4fvz5jhsA7697N1gMvkvr/JTF13DrFYyEbY9U7cVPA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-create-regexp-features-plugin": "^7.27.1",
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-transform-reserved-words": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.27.1.tgz",
+ "integrity": "sha512-V2ABPHIJX4kC7HegLkYoDpfg9PVmuWy/i6vUM5eGK22bx4YVFD3M5F0QQnWQoDs6AGsUWTVOopBiMFQgHaSkVw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-transform-shorthand-properties": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.27.1.tgz",
+ "integrity": "sha512-N/wH1vcn4oYawbJ13Y/FxcQrWk63jhfNa7jef0ih7PHSIHX2LB7GWE1rkPrOnka9kwMxb6hMl19p7lidA+EHmQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-transform-spread": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.27.1.tgz",
+ "integrity": "sha512-kpb3HUqaILBJcRFVhFUs6Trdd4mkrzcGXss+6/mxUd273PfbWqSDHRzMT2234gIg2QYfAjvXLSquP1xECSg09Q==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1",
+ "@babel/helper-skip-transparent-expression-wrappers": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-transform-sticky-regex": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.27.1.tgz",
+ "integrity": "sha512-lhInBO5bi/Kowe2/aLdBAawijx+q1pQzicSgnkB6dUPc1+RC8QmJHKf2OjvU+NZWitguJHEaEmbV6VWEouT58g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-transform-template-literals": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.27.1.tgz",
+ "integrity": "sha512-fBJKiV7F2DxZUkg5EtHKXQdbsbURW3DZKQUWphDum0uRP6eHGGa/He9mc0mypL680pb+e/lDIthRohlv8NCHkg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-transform-typeof-symbol": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.27.1.tgz",
+ "integrity": "sha512-RiSILC+nRJM7FY5srIyc4/fGIwUhyDuuBSdWn4y6yT6gm652DpCHZjIipgn6B7MQ1ITOUnAKWixEUjQRIBIcLw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-transform-typescript": {
+ "version": "7.28.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.28.5.tgz",
+ "integrity": "sha512-x2Qa+v/CuEoX7Dr31iAfr0IhInrVOWZU/2vJMJ00FOR/2nM0BcBEclpaf9sWCDc+v5e9dMrhSH8/atq/kX7+bA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-annotate-as-pure": "^7.27.3",
+ "@babel/helper-create-class-features-plugin": "^7.28.5",
+ "@babel/helper-plugin-utils": "^7.27.1",
+ "@babel/helper-skip-transparent-expression-wrappers": "^7.27.1",
+ "@babel/plugin-syntax-typescript": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-transform-unicode-escapes": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.27.1.tgz",
+ "integrity": "sha512-Ysg4v6AmF26k9vpfFuTZg8HRfVWzsh1kVfowA23y9j/Gu6dOuahdUVhkLqpObp3JIv27MLSii6noRnuKN8H0Mg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-transform-unicode-property-regex": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.27.1.tgz",
+ "integrity": "sha512-uW20S39PnaTImxp39O5qFlHLS9LJEmANjMG7SxIhap8rCHqu0Ik+tLEPX5DKmHn6CsWQ7j3lix2tFOa5YtL12Q==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-create-regexp-features-plugin": "^7.27.1",
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-transform-unicode-regex": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.27.1.tgz",
+ "integrity": "sha512-xvINq24TRojDuyt6JGtHmkVkrfVV3FPT16uytxImLeBZqW3/H52yN+kM1MGuyPkIQxrzKwPHs5U/MP3qKyzkGw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-create-regexp-features-plugin": "^7.27.1",
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "packages/client/node_modules/@babel/plugin-transform-unicode-sets-regex": {
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.27.1.tgz",
+ "integrity": "sha512-EtkOujbc4cgvb0mlpQefi4NTPBzhSIevblFevACNLUspmrALgmEBdL/XfnyyITfd8fKBZrZys92zOWcik7j9Tw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-create-regexp-features-plugin": "^7.27.1",
+ "@babel/helper-plugin-utils": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0"
+ }
+ },
+ "packages/client/node_modules/@babel/preset-env": {
+ "version": "7.28.5",
+ "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.28.5.tgz",
+ "integrity": "sha512-S36mOoi1Sb6Fz98fBfE+UZSpYw5mJm0NUHtIKrOuNcqeFauy1J6dIvXm2KRVKobOSaGq4t/hBXdN4HGU3wL9Wg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/compat-data": "^7.28.5",
+ "@babel/helper-compilation-targets": "^7.27.2",
+ "@babel/helper-plugin-utils": "^7.27.1",
+ "@babel/helper-validator-option": "^7.27.1",
+ "@babel/plugin-bugfix-firefox-class-in-computed-class-key": "^7.28.5",
+ "@babel/plugin-bugfix-safari-class-field-initializer-scope": "^7.27.1",
+ "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.27.1",
+ "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.27.1",
+ "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.28.3",
+ "@babel/plugin-proposal-private-property-in-object": "7.21.0-placeholder-for-preset-env.2",
+ "@babel/plugin-syntax-import-assertions": "^7.27.1",
+ "@babel/plugin-syntax-import-attributes": "^7.27.1",
+ "@babel/plugin-syntax-unicode-sets-regex": "^7.18.6",
+ "@babel/plugin-transform-arrow-functions": "^7.27.1",
+ "@babel/plugin-transform-async-generator-functions": "^7.28.0",
+ "@babel/plugin-transform-async-to-generator": "^7.27.1",
+ "@babel/plugin-transform-block-scoped-functions": "^7.27.1",
+ "@babel/plugin-transform-block-scoping": "^7.28.5",
+ "@babel/plugin-transform-class-properties": "^7.27.1",
+ "@babel/plugin-transform-class-static-block": "^7.28.3",
+ "@babel/plugin-transform-classes": "^7.28.4",
+ "@babel/plugin-transform-computed-properties": "^7.27.1",
+ "@babel/plugin-transform-destructuring": "^7.28.5",
+ "@babel/plugin-transform-dotall-regex": "^7.27.1",
+ "@babel/plugin-transform-duplicate-keys": "^7.27.1",
+ "@babel/plugin-transform-duplicate-named-capturing-groups-regex": "^7.27.1",
+ "@babel/plugin-transform-dynamic-import": "^7.27.1",
+ "@babel/plugin-transform-explicit-resource-management": "^7.28.0",
+ "@babel/plugin-transform-exponentiation-operator": "^7.28.5",
+ "@babel/plugin-transform-export-namespace-from": "^7.27.1",
+ "@babel/plugin-transform-for-of": "^7.27.1",
+ "@babel/plugin-transform-function-name": "^7.27.1",
+ "@babel/plugin-transform-json-strings": "^7.27.1",
+ "@babel/plugin-transform-literals": "^7.27.1",
+ "@babel/plugin-transform-logical-assignment-operators": "^7.28.5",
+ "@babel/plugin-transform-member-expression-literals": "^7.27.1",
+ "@babel/plugin-transform-modules-amd": "^7.27.1",
+ "@babel/plugin-transform-modules-commonjs": "^7.27.1",
+ "@babel/plugin-transform-modules-systemjs": "^7.28.5",
+ "@babel/plugin-transform-modules-umd": "^7.27.1",
+ "@babel/plugin-transform-named-capturing-groups-regex": "^7.27.1",
+ "@babel/plugin-transform-new-target": "^7.27.1",
+ "@babel/plugin-transform-nullish-coalescing-operator": "^7.27.1",
+ "@babel/plugin-transform-numeric-separator": "^7.27.1",
+ "@babel/plugin-transform-object-rest-spread": "^7.28.4",
+ "@babel/plugin-transform-object-super": "^7.27.1",
+ "@babel/plugin-transform-optional-catch-binding": "^7.27.1",
+ "@babel/plugin-transform-optional-chaining": "^7.28.5",
+ "@babel/plugin-transform-parameters": "^7.27.7",
+ "@babel/plugin-transform-private-methods": "^7.27.1",
+ "@babel/plugin-transform-private-property-in-object": "^7.27.1",
+ "@babel/plugin-transform-property-literals": "^7.27.1",
+ "@babel/plugin-transform-regenerator": "^7.28.4",
+ "@babel/plugin-transform-regexp-modifiers": "^7.27.1",
+ "@babel/plugin-transform-reserved-words": "^7.27.1",
+ "@babel/plugin-transform-shorthand-properties": "^7.27.1",
+ "@babel/plugin-transform-spread": "^7.27.1",
+ "@babel/plugin-transform-sticky-regex": "^7.27.1",
+ "@babel/plugin-transform-template-literals": "^7.27.1",
+ "@babel/plugin-transform-typeof-symbol": "^7.27.1",
+ "@babel/plugin-transform-unicode-escapes": "^7.27.1",
+ "@babel/plugin-transform-unicode-property-regex": "^7.27.1",
+ "@babel/plugin-transform-unicode-regex": "^7.27.1",
+ "@babel/plugin-transform-unicode-sets-regex": "^7.27.1",
+ "@babel/preset-modules": "0.1.6-no-external-plugins",
+ "babel-plugin-polyfill-corejs2": "^0.4.14",
+ "babel-plugin-polyfill-corejs3": "^0.13.0",
+ "babel-plugin-polyfill-regenerator": "^0.6.5",
+ "core-js-compat": "^3.43.0",
+ "semver": "^6.3.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "packages/client/node_modules/@babel/preset-react": {
+ "version": "7.28.5",
+ "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.28.5.tgz",
+ "integrity": "sha512-Z3J8vhRq7CeLjdC58jLv4lnZ5RKFUJWqH5emvxmv9Hv3BD1T9R/Im713R4MTKwvFaV74ejZ3sM01LyEKk4ugNQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1",
+ "@babel/helper-validator-option": "^7.27.1",
+ "@babel/plugin-transform-react-display-name": "^7.28.0",
+ "@babel/plugin-transform-react-jsx": "^7.27.1",
+ "@babel/plugin-transform-react-jsx-development": "^7.27.1",
+ "@babel/plugin-transform-react-pure-annotations": "^7.27.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "packages/client/node_modules/@babel/preset-typescript": {
+ "version": "7.28.5",
+ "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.28.5.tgz",
+ "integrity": "sha512-+bQy5WOI2V6LJZpPVxY+yp66XdZ2yifu0Mc1aP5CQKgjn4QM5IN2i5fAZ4xKop47pr8rpVhiAeu+nDQa12C8+g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.27.1",
+ "@babel/helper-validator-option": "^7.27.1",
+ "@babel/plugin-syntax-jsx": "^7.27.1",
+ "@babel/plugin-transform-modules-commonjs": "^7.27.1",
+ "@babel/plugin-transform-typescript": "^7.28.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "packages/client/node_modules/@jest/environment": {
+ "version": "30.2.0",
+ "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-30.2.0.tgz",
+ "integrity": "sha512-/QPTL7OBJQ5ac09UDRa3EQes4gt1FTEG/8jZ/4v5IVzx+Cv7dLxlVIvfvSVRiiX2drWyXeBjkMSR8hvOWSog5g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jest/fake-timers": "30.2.0",
+ "@jest/types": "30.2.0",
+ "@types/node": "*",
+ "jest-mock": "30.2.0"
+ },
+ "engines": {
+ "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0"
+ }
+ },
+ "packages/client/node_modules/@jest/fake-timers": {
+ "version": "30.2.0",
+ "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-30.2.0.tgz",
+ "integrity": "sha512-HI3tRLjRxAbBy0VO8dqqm7Hb2mIa8d5bg/NJkyQcOk7V118ObQML8RC5luTF/Zsg4474a+gDvhce7eTnP4GhYw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jest/types": "30.2.0",
+ "@sinonjs/fake-timers": "^13.0.0",
+ "@types/node": "*",
+ "jest-message-util": "30.2.0",
+ "jest-mock": "30.2.0",
+ "jest-util": "30.2.0"
+ },
+ "engines": {
+ "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0"
+ }
+ },
+ "packages/client/node_modules/@jest/types": {
+ "version": "30.2.0",
+ "resolved": "https://registry.npmjs.org/@jest/types/-/types-30.2.0.tgz",
+ "integrity": "sha512-H9xg1/sfVvyfU7o3zMfBEjQ1gcsdeTMgqHoYdN79tuLqfTtuu7WckRA1R5whDwOzxaZAeMKTYWqP+WCAi0CHsg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jest/pattern": "30.0.1",
+ "@jest/schemas": "30.0.5",
+ "@types/istanbul-lib-coverage": "^2.0.6",
+ "@types/istanbul-reports": "^3.0.4",
+ "@types/node": "*",
+ "@types/yargs": "^17.0.33",
+ "chalk": "^4.1.2"
+ },
+ "engines": {
+ "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0"
+ }
+ },
+ "packages/client/node_modules/@jest/types/node_modules/@jest/schemas": {
+ "version": "30.0.5",
+ "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-30.0.5.tgz",
+ "integrity": "sha512-DmdYgtezMkh3cpU8/1uyXakv3tJRcmcXxBOcO0tbaozPwpmh4YMsnWrQm9ZmZMfa5ocbxzbFk6O4bDPEc/iAnA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@sinclair/typebox": "^0.34.0"
+ },
+ "engines": {
+ "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0"
+ }
+ },
+ "packages/client/node_modules/@sinclair/typebox": {
+ "version": "0.34.41",
+ "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.34.41.tgz",
+ "integrity": "sha512-6gS8pZzSXdyRHTIqoqSVknxolr1kzfy4/CeDnrzsVz8TTIWUbOBr6gnzOmTYJ3eXQNh4IYHIGi5aIL7sOZ2G/g==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "packages/client/node_modules/@sinonjs/fake-timers": {
+ "version": "13.0.5",
+ "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-13.0.5.tgz",
+ "integrity": "sha512-36/hTbH2uaWuGVERyC6da9YwGWnzUZXuPro/F2LfsdOsLnCojz/iSH8MxUt/FD2S5XBSVPhmArFUXcpCQ2Hkiw==",
+ "dev": true,
+ "license": "BSD-3-Clause",
+ "dependencies": {
+ "@sinonjs/commons": "^3.0.1"
+ }
+ },
+ "packages/client/node_modules/@tanstack/react-table": {
+ "version": "8.21.3",
+ "resolved": "https://registry.npmjs.org/@tanstack/react-table/-/react-table-8.21.3.tgz",
+ "integrity": "sha512-5nNMTSETP4ykGegmVkhjcS8tTLW6Vl4axfEGQN3v0zdHYbK4UfoqfPChclTrJ4EoK9QynqAu9oUf8VEmrpZ5Ww==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@tanstack/table-core": "8.21.3"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/tannerlinsley"
+ },
+ "peerDependencies": {
+ "react": ">=16.8",
+ "react-dom": ">=16.8"
+ }
+ },
+ "packages/client/node_modules/@tanstack/react-virtual": {
+ "version": "3.13.13",
+ "resolved": "https://registry.npmjs.org/@tanstack/react-virtual/-/react-virtual-3.13.13.tgz",
+ "integrity": "sha512-4o6oPMDvQv+9gMi8rE6gWmsOjtUZUYIJHv7EB+GblyYdi8U6OqLl8rhHWIUZSL1dUU2dPwTdTgybCKf9EjIrQg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@tanstack/virtual-core": "3.13.13"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/tannerlinsley"
+ },
+ "peerDependencies": {
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
+ "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
+ }
+ },
+ "packages/client/node_modules/@tanstack/table-core": {
+ "version": "8.21.3",
+ "resolved": "https://registry.npmjs.org/@tanstack/table-core/-/table-core-8.21.3.tgz",
+ "integrity": "sha512-ldZXEhOBb8Is7xLs01fR3YEc3DERiz5silj8tnGkFZytt1abEvl/GhUmCE0PMLaMPTa3Jk4HbKmRlHmu+gCftg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/tannerlinsley"
+ }
+ },
+ "packages/client/node_modules/@tanstack/virtual-core": {
+ "version": "3.13.13",
+ "resolved": "https://registry.npmjs.org/@tanstack/virtual-core/-/virtual-core-3.13.13.tgz",
+ "integrity": "sha512-uQFoSdKKf5S8k51W5t7b2qpfkyIbdHMzAn+AMQvHPxKUPeo1SsGaA4JRISQT87jm28b7z8OEqPcg1IOZagQHcA==",
+ "dev": true,
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/tannerlinsley"
+ }
+ },
+ "packages/client/node_modules/@testing-library/dom": {
+ "version": "10.4.0",
+ "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-10.4.0.tgz",
+ "integrity": "sha512-pemlzrSESWbdAloYml3bAJMEfNh1Z7EduzqPKprCH5S341frlpYnUEW0H72dLxa6IsYr+mPno20GiSm+h9dEdQ==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@babel/code-frame": "^7.10.4",
+ "@babel/runtime": "^7.12.5",
+ "@types/aria-query": "^5.0.1",
+ "aria-query": "5.3.0",
+ "chalk": "^4.1.0",
+ "dom-accessibility-api": "^0.5.9",
+ "lz-string": "^1.5.0",
+ "pretty-format": "^27.0.2"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "packages/client/node_modules/@testing-library/jest-dom": {
+ "version": "6.9.1",
+ "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.9.1.tgz",
+ "integrity": "sha512-zIcONa+hVtVSSep9UT3jZ5rizo2BsxgyDYU7WFD5eICBE7no3881HGeb/QkGfsJs6JTkY1aQhT7rIPC7e+0nnA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@adobe/css-tools": "^4.4.0",
+ "aria-query": "^5.0.0",
+ "css.escape": "^1.5.1",
+ "dom-accessibility-api": "^0.6.3",
+ "picocolors": "^1.1.1",
+ "redent": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=14",
+ "npm": ">=6",
+ "yarn": ">=1"
+ }
+ },
+ "packages/client/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api": {
+ "version": "0.6.3",
+ "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.6.3.tgz",
+ "integrity": "sha512-7ZgogeTnjuHbo+ct10G9Ffp0mif17idi0IyWNVA/wcwcm7NPOD/WEHVP3n7n3MhXqxoIYm8d6MuZohYWIZ4T3w==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "packages/client/node_modules/@testing-library/react": {
+ "version": "16.3.0",
+ "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-16.3.0.tgz",
+ "integrity": "sha512-kFSyxiEDwv1WLl2fgsq6pPBbw5aWKrsY2/noi1Id0TK0UParSF62oFQFGHXIyaG4pp2tEub/Zlel+fjjZILDsw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/runtime": "^7.12.5"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "peerDependencies": {
+ "@testing-library/dom": "^10.0.0",
+ "@types/react": "^18.0.0 || ^19.0.0",
+ "@types/react-dom": "^18.0.0 || ^19.0.0",
+ "react": "^18.0.0 || ^19.0.0",
+ "react-dom": "^18.0.0 || ^19.0.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "packages/client/node_modules/@types/jest": {
+ "version": "29.5.14",
+ "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.14.tgz",
+ "integrity": "sha512-ZN+4sdnLUbo8EVvVc2ao0GFW6oVrQRPn4K2lglySj7APvSrgzxHiNNK99us4WDMi57xxA2yggblIAMNhXOotLQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "expect": "^29.0.0",
+ "pretty-format": "^29.0.0"
+ }
+ },
+ "packages/client/node_modules/@types/jest/node_modules/pretty-format": {
+ "version": "29.7.0",
+ "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz",
+ "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jest/schemas": "^29.6.3",
+ "ansi-styles": "^5.0.0",
+ "react-is": "^18.0.0"
+ },
+ "engines": {
+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+ }
+ },
+ "packages/client/node_modules/@types/jest/node_modules/react-is": {
+ "version": "18.3.1",
+ "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz",
+ "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "packages/client/node_modules/@types/jsdom": {
+ "version": "21.1.7",
+ "resolved": "https://registry.npmjs.org/@types/jsdom/-/jsdom-21.1.7.tgz",
+ "integrity": "sha512-yOriVnggzrnQ3a9OKOCxaVuSug3w3/SbOj5i7VwXWZEyUNl3bLF9V3MfxGbZKuwqJOQyRfqXyROBB1CoZLFWzA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/node": "*",
+ "@types/tough-cookie": "*",
+ "parse5": "^7.0.0"
+ }
+ },
+ "packages/client/node_modules/agent-base": {
+ "version": "7.1.4",
+ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz",
+ "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "packages/client/node_modules/ansi-styles": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz",
+ "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "packages/client/node_modules/aria-query": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz",
+ "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "dequal": "^2.0.3"
+ }
+ },
+ "packages/client/node_modules/babel-plugin-polyfill-corejs2": {
+ "version": "0.4.14",
+ "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.14.tgz",
+ "integrity": "sha512-Co2Y9wX854ts6U8gAAPXfn0GmAyctHuK8n0Yhfjd6t30g7yvKjspvvOo9yG+z52PZRgFErt7Ka2pYnXCjLKEpg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/compat-data": "^7.27.7",
+ "@babel/helper-define-polyfill-provider": "^0.6.5",
+ "semver": "^6.3.1"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0"
+ }
+ },
+ "packages/client/node_modules/babel-plugin-polyfill-corejs3": {
+ "version": "0.13.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.13.0.tgz",
+ "integrity": "sha512-U+GNwMdSFgzVmfhNm8GJUX88AadB3uo9KpJqS3FaqNIPKgySuvMb+bHPsOmmuWyIcuqZj/pzt1RUIUZns4y2+A==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-define-polyfill-provider": "^0.6.5",
+ "core-js-compat": "^3.43.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0"
+ }
+ },
+ "packages/client/node_modules/babel-plugin-polyfill-regenerator": {
+ "version": "0.6.5",
+ "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.6.5.tgz",
+ "integrity": "sha512-ISqQ2frbiNU9vIJkzg7dlPpznPZ4jOiUQ1uSmB0fEHeowtN3COYRsXr/xexn64NpU13P06jc/L5TgiJXOgrbEg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-define-polyfill-provider": "^0.6.5"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0"
+ }
+ },
+ "packages/client/node_modules/ci-info": {
+ "version": "4.3.1",
+ "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.3.1.tgz",
+ "integrity": "sha512-Wdy2Igu8OcBpI2pZePZ5oWjPC38tmDVx5WKUXKwlLYkA0ozo85sLsLvkBbBn/sZaSCMFOGZJ14fvW9t5/d7kdA==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/sibiraj-s"
+ }
+ ],
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "packages/client/node_modules/core-js-compat": {
+ "version": "3.47.0",
+ "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.47.0.tgz",
+ "integrity": "sha512-IGfuznZ/n7Kp9+nypamBhvwdwLsW6KC8IOaURw2doAK5e98AG3acVLdh0woOnEqCfUtS+Vu882JE4k/DAm3ItQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "browserslist": "^4.28.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/core-js"
+ }
+ },
+ "packages/client/node_modules/cssstyle": {
+ "version": "4.6.0",
+ "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-4.6.0.tgz",
+ "integrity": "sha512-2z+rWdzbbSZv6/rhtvzvqeZQHrBaqgogqt85sqFNbabZOuFbCVFb8kPeEtZjiKkbrm395irpNKiYeFeLiQnFPg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@asamuzakjp/css-color": "^3.2.0",
+ "rrweb-cssom": "^0.8.0"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "packages/client/node_modules/data-urls": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-5.0.0.tgz",
+ "integrity": "sha512-ZYP5VBHshaDAiVZxjbRVcFJpc+4xGgT0bK3vzy1HLN8jTO975HEbuYzZJcHoQEY5K1a0z8YayJkyVETa08eNTg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "whatwg-mimetype": "^4.0.0",
+ "whatwg-url": "^14.0.0"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "packages/client/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "packages/client/node_modules/decimal.js": {
+ "version": "10.6.0",
+ "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.6.0.tgz",
+ "integrity": "sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "packages/client/node_modules/html-encoding-sniffer": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-4.0.0.tgz",
+ "integrity": "sha512-Y22oTqIU4uuPgEemfz7NDJz6OeKf12Lsu+QC+s3BVpda64lTiMYCyGwg5ki4vFxkMwQdeZDl2adZoqUgdFuTgQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "whatwg-encoding": "^3.1.1"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "packages/client/node_modules/http-proxy-agent": {
+ "version": "7.0.2",
+ "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz",
+ "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "agent-base": "^7.1.0",
+ "debug": "^4.3.4"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "packages/client/node_modules/https-proxy-agent": {
+ "version": "7.0.6",
+ "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz",
+ "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "agent-base": "^7.1.2",
+ "debug": "4"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "packages/client/node_modules/i18next": {
+ "version": "24.2.3",
+ "resolved": "https://registry.npmjs.org/i18next/-/i18next-24.2.3.tgz",
+ "integrity": "sha512-lfbf80OzkocvX7nmZtu7nSTNbrTYR52sLWxPtlXX1zAhVw8WEnFk4puUkCR4B1dNQwbSpEHHHemcZu//7EcB7A==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "individual",
+ "url": "https://locize.com"
+ },
+ {
+ "type": "individual",
+ "url": "https://locize.com/i18next.html"
+ },
+ {
+ "type": "individual",
+ "url": "https://www.i18next.com/how-to/faq#i18next-is-awesome.-how-can-i-support-the-project"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "@babel/runtime": "^7.26.10"
+ },
+ "peerDependencies": {
+ "typescript": "^5"
+ },
+ "peerDependenciesMeta": {
+ "typescript": {
+ "optional": true
+ }
+ }
+ },
+ "packages/client/node_modules/iconv-lite": {
+ "version": "0.6.3",
+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
+ "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "safer-buffer": ">= 2.1.2 < 3.0.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "packages/client/node_modules/jest-environment-jsdom": {
+ "version": "30.2.0",
+ "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-30.2.0.tgz",
+ "integrity": "sha512-zbBTiqr2Vl78pKp/laGBREYzbZx9ZtqPjOK4++lL4BNDhxRnahg51HtoDrk9/VjIy9IthNEWdKVd7H5bqBhiWQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jest/environment": "30.2.0",
+ "@jest/environment-jsdom-abstract": "30.2.0",
+ "@types/jsdom": "^21.1.7",
+ "@types/node": "*",
+ "jsdom": "^26.1.0"
+ },
+ "engines": {
+ "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0"
+ },
+ "peerDependencies": {
+ "canvas": "^3.0.0"
+ },
+ "peerDependenciesMeta": {
+ "canvas": {
+ "optional": true
+ }
+ }
+ },
+ "packages/client/node_modules/jest-message-util": {
+ "version": "30.2.0",
+ "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-30.2.0.tgz",
+ "integrity": "sha512-y4DKFLZ2y6DxTWD4cDe07RglV88ZiNEdlRfGtqahfbIjfsw1nMCPx49Uev4IA/hWn3sDKyAnSPwoYSsAEdcimw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/code-frame": "^7.27.1",
+ "@jest/types": "30.2.0",
+ "@types/stack-utils": "^2.0.3",
+ "chalk": "^4.1.2",
+ "graceful-fs": "^4.2.11",
+ "micromatch": "^4.0.8",
+ "pretty-format": "30.2.0",
+ "slash": "^3.0.0",
+ "stack-utils": "^2.0.6"
+ },
+ "engines": {
+ "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0"
+ }
+ },
+ "packages/client/node_modules/jest-message-util/node_modules/@jest/schemas": {
+ "version": "30.0.5",
+ "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-30.0.5.tgz",
+ "integrity": "sha512-DmdYgtezMkh3cpU8/1uyXakv3tJRcmcXxBOcO0tbaozPwpmh4YMsnWrQm9ZmZMfa5ocbxzbFk6O4bDPEc/iAnA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@sinclair/typebox": "^0.34.0"
+ },
+ "engines": {
+ "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0"
+ }
+ },
+ "packages/client/node_modules/jest-message-util/node_modules/pretty-format": {
+ "version": "30.2.0",
+ "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.2.0.tgz",
+ "integrity": "sha512-9uBdv/B4EefsuAL+pWqueZyZS2Ba+LxfFeQ9DN14HU4bN8bhaxKdkpjpB6fs9+pSjIBu+FXQHImEg8j/Lw0+vA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jest/schemas": "30.0.5",
+ "ansi-styles": "^5.2.0",
+ "react-is": "^18.3.1"
+ },
+ "engines": {
+ "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0"
+ }
+ },
+ "packages/client/node_modules/jest-message-util/node_modules/react-is": {
+ "version": "18.3.1",
+ "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz",
+ "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "packages/client/node_modules/jest-mock": {
+ "version": "30.2.0",
+ "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-30.2.0.tgz",
+ "integrity": "sha512-JNNNl2rj4b5ICpmAcq+WbLH83XswjPbjH4T7yvGzfAGCPh1rw+xVNbtk+FnRslvt9lkCcdn9i1oAoKUuFsOxRw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jest/types": "30.2.0",
+ "@types/node": "*",
+ "jest-util": "30.2.0"
+ },
+ "engines": {
+ "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0"
+ }
+ },
+ "packages/client/node_modules/jest-util": {
+ "version": "30.2.0",
+ "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-30.2.0.tgz",
+ "integrity": "sha512-QKNsM0o3Xe6ISQU869e+DhG+4CK/48aHYdJZGlFQVTjnbvgpcKyxpzk29fGiO7i/J8VENZ+d2iGnSsvmuHywlA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jest/types": "30.2.0",
+ "@types/node": "*",
+ "chalk": "^4.1.2",
+ "ci-info": "^4.2.0",
+ "graceful-fs": "^4.2.11",
+ "picomatch": "^4.0.2"
+ },
+ "engines": {
+ "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0"
+ }
+ },
+ "packages/client/node_modules/jsdom": {
+ "version": "26.1.0",
+ "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-26.1.0.tgz",
+ "integrity": "sha512-Cvc9WUhxSMEo4McES3P7oK3QaXldCfNWp7pl2NNeiIFlCoLr3kfq9kb1fxftiwk1FLV7CvpvDfonxtzUDeSOPg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "cssstyle": "^4.2.1",
+ "data-urls": "^5.0.0",
+ "decimal.js": "^10.5.0",
+ "html-encoding-sniffer": "^4.0.0",
+ "http-proxy-agent": "^7.0.2",
+ "https-proxy-agent": "^7.0.6",
+ "is-potential-custom-element-name": "^1.0.1",
+ "nwsapi": "^2.2.16",
+ "parse5": "^7.2.1",
+ "rrweb-cssom": "^0.8.0",
+ "saxes": "^6.0.0",
+ "symbol-tree": "^3.2.4",
+ "tough-cookie": "^5.1.1",
+ "w3c-xmlserializer": "^5.0.0",
+ "webidl-conversions": "^7.0.0",
+ "whatwg-encoding": "^3.1.1",
+ "whatwg-mimetype": "^4.0.0",
+ "whatwg-url": "^14.1.1",
+ "ws": "^8.18.0",
+ "xml-name-validator": "^5.0.0"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "peerDependencies": {
+ "canvas": "^3.0.0"
+ },
+ "peerDependenciesMeta": {
+ "canvas": {
+ "optional": true
+ }
+ }
+ },
+ "packages/client/node_modules/nwsapi": {
+ "version": "2.2.23",
+ "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.23.tgz",
+ "integrity": "sha512-7wfH4sLbt4M0gCDzGE6vzQBo0bfTKjU7Sfpqy/7gs1qBfYz2vEJH6vXcBKpO3+6Yu1telwd0t9HpyOoLEQQbIQ==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "packages/client/node_modules/picomatch": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz",
+ "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
+ "packages/client/node_modules/pretty-format": {
+ "version": "27.5.1",
+ "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz",
+ "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "ansi-regex": "^5.0.1",
+ "ansi-styles": "^5.0.0",
+ "react-is": "^17.0.1"
+ },
+ "engines": {
+ "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
+ }
+ },
+ "packages/client/node_modules/react-hook-form": {
+ "version": "7.60.0",
+ "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.60.0.tgz",
+ "integrity": "sha512-SBrYOvMbDB7cV8ZfNpaiLcgjH/a1c7aK0lK+aNigpf4xWLO8q+o4tcvVurv3c4EOyzn/3dCsYt4GKD42VvJ/+A==",
+ "license": "MIT",
+ "peer": true,
+ "engines": {
+ "node": ">=18.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/react-hook-form"
+ },
+ "peerDependencies": {
+ "react": "^16.8.0 || ^17 || ^18 || ^19"
+ }
+ },
+ "packages/client/node_modules/react-is": {
+ "version": "17.0.2",
+ "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",
+ "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true
+ },
+ "packages/client/node_modules/regenerate-unicode-properties": {
+ "version": "10.2.2",
+ "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.2.2.tgz",
+ "integrity": "sha512-m03P+zhBeQd1RGnYxrGyDAPpWX/epKirLrp8e3qevZdVkKtnCrjjWczIbYc8+xd6vcTStVlqfycTx1KR4LOr0g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "regenerate": "^1.4.2"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "packages/client/node_modules/regexpu-core": {
+ "version": "6.4.0",
+ "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-6.4.0.tgz",
+ "integrity": "sha512-0ghuzq67LI9bLXpOX/ISfve/Mq33a4aFRzoQYhnnok1JOFpmE/A2TBGkNVenOGEeSBCjIiWcc6MVOG5HEQv0sA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "regenerate": "^1.4.2",
+ "regenerate-unicode-properties": "^10.2.2",
+ "regjsgen": "^0.8.0",
+ "regjsparser": "^0.13.0",
+ "unicode-match-property-ecmascript": "^2.0.0",
+ "unicode-match-property-value-ecmascript": "^2.2.1"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "packages/client/node_modules/regjsparser": {
+ "version": "0.13.0",
+ "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.13.0.tgz",
+ "integrity": "sha512-NZQZdC5wOE/H3UT28fVGL+ikOZcEzfMGk/c3iN9UGxzWHMa1op7274oyiUVrAG4B2EuFhus8SvkaYnhvW92p9Q==",
+ "dev": true,
+ "license": "BSD-2-Clause",
+ "dependencies": {
+ "jsesc": "~3.1.0"
+ },
+ "bin": {
+ "regjsparser": "bin/parser"
+ }
+ },
+ "packages/client/node_modules/resolve": {
+ "version": "1.22.11",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.11.tgz",
+ "integrity": "sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "is-core-module": "^2.16.1",
+ "path-parse": "^1.0.7",
+ "supports-preserve-symlinks-flag": "^1.0.0"
+ },
+ "bin": {
+ "resolve": "bin/resolve"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "packages/client/node_modules/rimraf": {
+ "version": "6.1.2",
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-6.1.2.tgz",
+ "integrity": "sha512-cFCkPslJv7BAXJsYlK1dZsbP8/ZNLkCAQ0bi1hf5EKX2QHegmDFEFA6QhuYJlk7UDdc+02JjO80YSOrWPpw06g==",
+ "dev": true,
+ "license": "BlueOak-1.0.0",
+ "dependencies": {
+ "glob": "^13.0.0",
+ "package-json-from-dist": "^1.0.1"
+ },
+ "bin": {
+ "rimraf": "dist/esm/bin.mjs"
+ },
+ "engines": {
+ "node": "20 || >=22"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "packages/client/node_modules/semver": {
+ "version": "6.3.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
+ "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
+ "dev": true,
+ "license": "ISC",
+ "bin": {
+ "semver": "bin/semver.js"
+ }
+ },
+ "packages/client/node_modules/slash": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
+ "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "packages/client/node_modules/tough-cookie": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-5.1.2.tgz",
+ "integrity": "sha512-FVDYdxtnj0G6Qm/DhNPSb8Ju59ULcup3tuJxkFb5K8Bv2pUXILbf0xZWU8PX8Ov19OXljbUyveOFwRMwkXzO+A==",
+ "dev": true,
+ "license": "BSD-3-Clause",
+ "dependencies": {
+ "tldts": "^6.1.32"
+ },
+ "engines": {
+ "node": ">=16"
+ }
+ },
+ "packages/client/node_modules/tr46": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/tr46/-/tr46-5.1.1.tgz",
+ "integrity": "sha512-hdF5ZgjTqgAntKkklYw0R03MG2x/bSzTtkxmIRw/sTNV8YXsCJ1tfLAX23lhxhHJlEf3CRCOCGGWw3vI3GaSPw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "punycode": "^2.3.1"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "packages/client/node_modules/unicode-match-property-value-ecmascript": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.2.1.tgz",
+ "integrity": "sha512-JQ84qTuMg4nVkx8ga4A16a1epI9H6uTXAknqxkGF/aFfRLw1xC/Bp24HNLaZhHSkWd3+84t8iXnp1J0kYcZHhg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "packages/client/node_modules/w3c-xmlserializer": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-5.0.0.tgz",
+ "integrity": "sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "xml-name-validator": "^5.0.0"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "packages/client/node_modules/whatwg-encoding": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz",
+ "integrity": "sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "iconv-lite": "0.6.3"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "packages/client/node_modules/whatwg-mimetype": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz",
+ "integrity": "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "packages/client/node_modules/whatwg-url": {
+ "version": "14.2.0",
+ "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-14.2.0.tgz",
+ "integrity": "sha512-De72GdQZzNTUBBChsXueQUnPKDkg/5A5zp7pFDuQAj5UFoENpiACU0wlCvzpAGnTkj++ihpKwKyYewn/XNUbKw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "tr46": "^5.1.0",
+ "webidl-conversions": "^7.0.0"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "packages/client/node_modules/xml-name-validator": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-5.0.0.tgz",
+ "integrity": "sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=18"
}
},
"packages/data-provider": {
diff --git a/packages/client/babel.config.js b/packages/client/babel.config.js
new file mode 100644
index 0000000000..b25024b236
--- /dev/null
+++ b/packages/client/babel.config.js
@@ -0,0 +1,24 @@
+module.exports = {
+ presets: [
+ ['@babel/preset-env', { targets: { node: 'current' } }],
+ ['@babel/preset-react', { runtime: 'automatic' }],
+ '@babel/preset-typescript',
+ ],
+ plugins: [
+ 'babel-plugin-replace-ts-export-assignment',
+ // Transform import.meta.env for Jest (used by Vite-style code)
+ function () {
+ return {
+ visitor: {
+ MetaProperty(path) {
+ if (path.node.meta.name === 'import' && path.node.property.name === 'meta') {
+ path.replaceWithSourceString(`({
+ env: { MODE: 'test', DEV: true, PROD: false }
+ })`);
+ }
+ },
+ },
+ };
+ },
+ ],
+};
diff --git a/packages/client/jest.config.js b/packages/client/jest.config.js
new file mode 100644
index 0000000000..bb8a22dcc9
--- /dev/null
+++ b/packages/client/jest.config.js
@@ -0,0 +1,29 @@
+export default {
+ collectCoverageFrom: ['src/**/*.{js,jsx,ts,tsx}', '!<rootDir>/node_modules/'],
+ coveragePathIgnorePatterns: ['/node_modules/', '/dist/'],
+ coverageReporters: ['text', 'cobertura'],
+ testResultsProcessor: 'jest-junit',
+ moduleNameMapper: {
+ '^@src/(.*)$': '<rootDir>/src/$1',
+ '^~/(.*)$': '<rootDir>/src/$1',
+ '\\.(css|less|scss|sass)$': 'identity-obj-proxy',
+ },
+ // coverageThreshold: {
+ // global: {
+ // statements: 58,
+ // branches: 49,
+ // functions: 50,
+ // lines: 57,
+ // },
+ // },
+ restoreMocks: true,
+ testTimeout: 15000,
+ // React component testing requires jsdom environment
+ testEnvironment: 'jsdom',
+ testEnvironmentOptions: { url: 'http://localhost:3080' },
+ transform: {
+ '^.+\\.(ts|tsx|js|jsx)$': 'babel-jest',
+ },
+ transformIgnorePatterns: ['node_modules/(?!(@tanstack|lucide-react|@dicebear)/)'],
+ setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
+};
diff --git a/packages/client/jest.setup.ts b/packages/client/jest.setup.ts
new file mode 100644
index 0000000000..5bf9e13fd8
--- /dev/null
+++ b/packages/client/jest.setup.ts
@@ -0,0 +1,159 @@
+import '@testing-library/jest-dom';
+
+// Mock import.meta.env for Vite compatibility
+// eslint-disable-next-line @typescript-eslint/no-explicit-any
+(global as any).importMetaEnv = {
+ MODE: 'test',
+ DEV: true,
+ PROD: false,
+};
+
+Object.defineProperty(globalThis, 'import', {
+ value: {
+ meta: {
+ env: {
+ MODE: 'test',
+ DEV: true,
+ PROD: false,
+ },
+ },
+ },
+});
+
+// Mock @dicebear modules (ESM-only modules)
+jest.mock('@dicebear/core', () => ({
+ createAvatar: jest.fn(() => ({
+ toDataUri: jest.fn(() => 'data:image/svg+xml;base64,mock'),
+ })),
+}));
+
+jest.mock('@dicebear/collection', () => ({
+ initials: {},
+}));
+
+// Mock window.matchMedia
+Object.defineProperty(window, 'matchMedia', {
+ writable: true,
+ value: jest.fn().mockImplementation((query: string) => ({
+ matches: false,
+ media: query,
+ onchange: null,
+ addListener: jest.fn(),
+ removeListener: jest.fn(),
+ addEventListener: jest.fn(),
+ removeEventListener: jest.fn(),
+ dispatchEvent: jest.fn(),
+ })),
+});
+
+// Mock ResizeObserver
+class MockResizeObserver {
+ callback: ResizeObserverCallback;
+
+ constructor(callback: ResizeObserverCallback) {
+ this.callback = callback;
+ }
+
+ observe = jest.fn();
+ unobserve = jest.fn();
+ disconnect = jest.fn();
+}
+
+Object.defineProperty(window, 'ResizeObserver', {
+ writable: true,
+ value: MockResizeObserver,
+});
+
+// Mock IntersectionObserver
+class MockIntersectionObserver {
+ callback: IntersectionObserverCallback;
+ options?: IntersectionObserverInit;
+
+ constructor(callback: IntersectionObserverCallback, options?: IntersectionObserverInit) {
+ this.callback = callback;
+ this.options = options;
+ }
+
+ observe = jest.fn();
+ unobserve = jest.fn();
+ disconnect = jest.fn();
+ takeRecords = jest.fn().mockReturnValue([]);
+ root = null;
+ rootMargin = '';
+ thresholds = [0];
+}
+
+Object.defineProperty(window, 'IntersectionObserver', {
+ writable: true,
+ value: MockIntersectionObserver,
+});
+
+// Mock scrollTo
+Object.defineProperty(window, 'scrollTo', {
+ writable: true,
+ value: jest.fn(),
+});
+
+// Mock requestAnimationFrame and cancelAnimationFrame
+let rafId = 0;
+Object.defineProperty(window, 'requestAnimationFrame', {
+ writable: true,
+ value: jest.fn((callback: FrameRequestCallback) => {
+ rafId += 1;
+ setTimeout(() => callback(performance.now()), 0);
+ return rafId;
+ }),
+});
+
+Object.defineProperty(window, 'cancelAnimationFrame', {
+ writable: true,
+ value: jest.fn(),
+});
+
+// Mock react-i18next
+jest.mock('react-i18next', () => ({
+ useTranslation: () => ({
+ t: (key: string, options?: Record<string, unknown>) => {
+ if (options && typeof options === 'object') {
+ let result = key;
+ Object.entries(options).forEach(([k, v]) => {
+ result = result.replace(`{{${k}}}`, String(v));
+ result = result.replace(`{${k}}`, String(v));
+ });
+ return result;
+ }
+ return key;
+ },
+ i18n: {
+ changeLanguage: jest.fn(),
+ language: 'en',
+ },
+ }),
+ Trans: ({ children }: { children: React.ReactNode }) => children,
+ initReactI18next: {
+ type: '3rdParty',
+ init: jest.fn(),
+ },
+}));
+
+// Mock useLocalize hook
+jest.mock('~/hooks', () => ({
+ ...jest.requireActual('~/hooks'),
+ useLocalize: () => (key: string, options?: Record<string, unknown>) => {
+ if (options && typeof options === 'object') {
+ let result = key;
+ Object.entries(options).forEach(([k, v]) => {
+ result = result.replace(`{{${k}}}`, String(v));
+ result = result.replace(`{${k}}`, String(v));
+ });
+ return result;
+ }
+ return key;
+ },
+ useMediaQuery: jest.fn(() => false),
+}));
+
+// Clear mocks before each test
+beforeEach(() => {
+ jest.clearAllMocks();
+});
diff --git a/packages/client/package.json b/packages/client/package.json
index 1029ff70a9..a2c12987a0 100644
--- a/packages/client/package.json
+++ b/packages/client/package.json
@@ -75,19 +75,32 @@
"tailwind-merge": "^1.9.1"
},
"devDependencies": {
+ "@babel/core": "^7.28.5",
+ "@babel/preset-env": "^7.28.5",
+ "@babel/preset-react": "^7.28.5",
+ "@babel/preset-typescript": "^7.28.5",
"@rollup/plugin-alias": "^5.1.0",
"@rollup/plugin-commonjs": "^29.0.0",
"@rollup/plugin-node-resolve": "^15.0.0",
"@rollup/plugin-replace": "^5.0.5",
"@rollup/plugin-terser": "^0.4.4",
"@tanstack/react-query": "^4.28.0",
+ "@tanstack/react-table": "^8.21.3",
+ "@tanstack/react-virtual": "^3.13.13",
+ "@testing-library/jest-dom": "^6.9.1",
"@testing-library/react": "^14.0.0",
+ "@types/jest": "^29.5.14",
"@types/react": "^18.2.11",
"@types/react-dom": "^18.2.4",
+ "babel-jest": "^30.2.0",
"caniuse-lite": "^1.0.30001741",
"concat-with-sourcemaps": "^1.1.0",
"i18next": "^24.2.3",
+ "identity-obj-proxy": "^3.0.0",
+ "jest": "^30.2.0",
+ "jest-environment-jsdom": "^30.2.0",
"jotai": "^2.12.5",
+ "lucide-react": "^0.525.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-i18next": "^15.4.0",
diff --git a/packages/client/rollup.config.js b/packages/client/rollup.config.js
index 1523ca9f77..11ae66567c 100644
--- a/packages/client/rollup.config.js
+++ b/packages/client/rollup.config.js
@@ -26,6 +26,8 @@ const plugins = [
}),
replace({
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'production'),
+ 'process.env.VITE_ENABLE_LOGGER': JSON.stringify(process.env.VITE_ENABLE_LOGGER || 'false'),
+ 'process.env.VITE_LOGGER_FILTER': JSON.stringify(process.env.VITE_LOGGER_FILTER || ''),
preventAssignment: true,
}),
commonjs(),
diff --git a/packages/client/src/components/Checkbox.tsx b/packages/client/src/components/Checkbox.tsx
index 313beb52b8..38d94dd74d 100644
--- a/packages/client/src/components/Checkbox.tsx
+++ b/packages/client/src/components/Checkbox.tsx
@@ -25,7 +25,7 @@ const Checkbox = React.forwardRef<React.ElementRef<typeof CheckboxPrimitive.Root
<CheckboxPrimitive.Root
ref={ref}
className={cn(
- 'peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground',
+ 'peer h-4 w-4 shrink-0 rounded-sm border border-border-xheavy ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground',
className,
)}
{...props}
diff --git a/packages/client/src/components/DataTable/DataTable.hooks.spec.ts b/packages/client/src/components/DataTable/DataTable.hooks.spec.ts
new file mode 100644
index 0000000000..88e5b001f3
--- /dev/null
+++ b/packages/client/src/components/DataTable/DataTable.hooks.spec.ts
@@ -0,0 +1,470 @@
+import { renderHook, act, waitFor } from '@testing-library/react';
+import {
+ useDebounced,
+ useOptimizedRowSelection,
+ useColumnStyles,
+ useKeyboardNavigation,
+} from './DataTable.hooks';
+import type { TableColumn } from './DataTable.types';
+
+describe('DataTable Hooks', () => {
+ describe('useDebounced', () => {
+ beforeEach(() => {
+ jest.useFakeTimers();
+ });
+
+ afterEach(() => {
+ jest.useRealTimers();
+ });
+
+ it('should return the initial value immediately', () => {
+ const { result } = renderHook(() => useDebounced('initial', 300));
+ expect(result.current).toBe('initial');
+ });
+
+ it('should update value after the delay', () => {
+ const { result, rerender } = renderHook(({ value, delay }) => useDebounced(value, delay), {
+ initialProps: { value: 'initial', delay: 300 },
+ });
+
+ expect(result.current).toBe('initial');
+
+ rerender({ value: 'updated', delay: 300 });
+
+ // Value should still be initial before delay
+ expect(result.current).toBe('initial');
+
+ // Advance timer past the delay
+ act(() => {
+ jest.advanceTimersByTime(300);
+ });
+
+ expect(result.current).toBe('updated');
+ });
+
+ it('should reset timer on rapid changes', () => {
+ const { result, rerender } = renderHook(({ value, delay }) => useDebounced(value, delay), {
+ initialProps: { value: 'initial', delay: 300 },
+ });
+
+ rerender({ value: 'change1', delay: 300 });
+ act(() => {
+ jest.advanceTimersByTime(100);
+ });
+
+ rerender({ value: 'change2', delay: 300 });
+ act(() => {
+ jest.advanceTimersByTime(100);
+ });
+
+ rerender({ value: 'change3', delay: 300 });
+ act(() => {
+ jest.advanceTimersByTime(100);
+ });
+
+ // Should still be initial because timer keeps resetting
+ expect(result.current).toBe('initial');
+
+ // Advance past the full delay
+ act(() => {
+ jest.advanceTimersByTime(300);
+ });
+
+ // Should now be the last value
+ expect(result.current).toBe('change3');
+ });
+
+ it('should handle different data types', () => {
+ // Test with number
+ const { result: numberResult } = renderHook(() => useDebounced(42, 100));
+ expect(numberResult.current).toBe(42);
+
+ // Test with object
+ const obj = { foo: 'bar' };
+ const { result: objectResult } = renderHook(() => useDebounced(obj, 100));
+ expect(objectResult.current).toEqual({ foo: 'bar' });
+
+ // Test with array
+ const arr = [1, 2, 3];
+ const { result: arrayResult } = renderHook(() => useDebounced(arr, 100));
+ expect(arrayResult.current).toEqual([1, 2, 3]);
+ });
+
+ it('should handle zero delay', () => {
+ const { result, rerender } = renderHook(({ value, delay }) => useDebounced(value, delay), {
+ initialProps: { value: 'initial', delay: 0 },
+ });
+
+ rerender({ value: 'updated', delay: 0 });
+
+ act(() => {
+ jest.advanceTimersByTime(0);
+ });
+
+ expect(result.current).toBe('updated');
+ });
+ });
+
+ describe('useOptimizedRowSelection', () => {
+ it('should initialize with empty object by default', () => {
+ const { result } = renderHook(() => useOptimizedRowSelection());
+ const [selection] = result.current;
+ expect(selection).toEqual({});
+ });
+
+ it('should initialize with provided selection', () => {
+ const initialSelection = { row1: true, row2: true };
+ const { result } = renderHook(() => useOptimizedRowSelection(initialSelection));
+ const [selection] = result.current;
+ expect(selection).toEqual({ row1: true, row2: true });
+ });
+
+ it('should update selection state', () => {
+ const { result } = renderHook(() => useOptimizedRowSelection());
+
+ act(() => {
+ const [, setSelection] = result.current;
+ setSelection({ row1: true });
+ });
+
+ const [selection] = result.current;
+ expect(selection).toEqual({ row1: true });
+ });
+
+ it('should return tuple with selection and setter', () => {
+ const { result } = renderHook(() => useOptimizedRowSelection());
+ const [selection, setSelection] = result.current;
+
+ expect(typeof selection).toBe('object');
+ expect(typeof setSelection).toBe('function');
+ });
+
+ it('should support functional updates', () => {
+ const { result } = renderHook(() => useOptimizedRowSelection({ existing: true }));
+
+ act(() => {
+ const [, setSelection] = result.current;
+ setSelection((prev) => ({ ...prev, new: true }));
+ });
+
+ const [selection] = result.current;
+ expect(selection).toEqual({ existing: true, new: true });
+ });
+ });
+
+ describe('useColumnStyles', () => {
+ let mockContainerRef: React.RefObject<HTMLDivElement>;
+ let mockContainer: HTMLDivElement;
+
+ beforeEach(() => {
+ mockContainer = document.createElement('div');
+ Object.defineProperty(mockContainer, 'clientWidth', {
+ configurable: true,
+ value: 1000,
+ });
+ mockContainerRef = { current: mockContainer };
+ });
+
+ it('should return empty object when container width is 0', () => {
+ Object.defineProperty(mockContainer, 'clientWidth', { value: 0 });
+
+ const columns: TableColumn<{ name: string }, string>[] = [
+ { accessorKey: 'name', header: 'Name' },
+ ];
+
+ const { result } = renderHook(() => useColumnStyles(columns, false, mockContainerRef));
+
+ expect(result.current).toEqual({});
+ });
+
+ it('should calculate fixed width columns', () => {
+ const columns: TableColumn<{ name: string; status: string }, string>[] = [
+ { accessorKey: 'name', header: 'Name', meta: { size: 200 } },
+ { accessorKey: 'status', header: 'Status', meta: { size: 100 } },
+ ];
+
+ const { result } = renderHook(() => useColumnStyles(columns, false, mockContainerRef));
+
+ expect(result.current.name).toBeDefined();
+ expect(result.current.status).toBeDefined();
+ });
+
+ it('should distribute available width to flexible columns by priority', () => {
+ const columns: TableColumn<{ col1: string; col2: string; col3: string }, string>[] = [
+ { accessorKey: 'col1', header: 'Col 1', meta: { size: 200 } }, // fixed
+ { accessorKey: 'col2', header: 'Col 2', meta: { priority: 2 } }, // flexible, priority 2
+ { accessorKey: 'col3', header: 'Col 3', meta: { priority: 1 } }, // flexible, priority 1
+ ];
+
+ const { result } = renderHook(() => useColumnStyles(columns, false, mockContainerRef));
+
+ // Available width = 1000 - 200 = 800
+ // Total priority = 3
+ // col2 should get 2/3 = ~533px
+ // col3 should get 1/3 = ~266px
+ expect(result.current.col2).toBeDefined();
+ expect(result.current.col3).toBeDefined();
+ });
+
+ it('should handle mobile vs desktop sizes', () => {
+ const columns: TableColumn<{ name: string }, string>[] = [
+ { accessorKey: 'name', header: 'Name', meta: { size: 200, mobileSize: 150 } },
+ ];
+
+ // Desktop
+ const { result: desktopResult } = renderHook(() =>
+ useColumnStyles(columns, false, mockContainerRef),
+ );
+
+ // Mobile
+ const { result: mobileResult } = renderHook(() =>
+ useColumnStyles(columns, true, mockContainerRef),
+ );
+
+ // Mobile should use mobileSize if defined
+ expect(mobileResult.current.name).toBeDefined();
+ expect(desktopResult.current.name).toBeDefined();
+ });
+
+ it('should handle columns with id instead of accessorKey', () => {
+ const columns: TableColumn<Record<string, unknown>, unknown>[] = [
+ { id: 'custom-column', header: 'Custom', meta: { size: 150 } },
+ ];
+
+ const { result } = renderHook(() => useColumnStyles(columns, false, mockContainerRef));
+
+ expect(result.current['custom-column']).toBeDefined();
+ });
+
+ it('should return empty object when container ref is null', () => {
+ const nullRef = { current: null };
+ const columns: TableColumn<{ name: string }, string>[] = [
+ { accessorKey: 'name', header: 'Name' },
+ ];
+
+ const { result } = renderHook(() =>
+ useColumnStyles(columns, false, nullRef as React.RefObject<HTMLDivElement>),
+ );
+
+ expect(result.current).toEqual({});
+ });
+ });
+
+ describe('useKeyboardNavigation', () => {
+ let mockTableRef: React.RefObject<HTMLDivElement>;
+ let mockTable: HTMLDivElement;
+ let mockOnRowSelect: jest.Mock;
+
+ beforeEach(() => {
+ mockTable = document.createElement('div');
+ document.body.appendChild(mockTable);
+ mockTableRef = { current: mockTable };
+ mockOnRowSelect = jest.fn();
+ });
+
+ afterEach(() => {
+ document.body.removeChild(mockTable);
+ });
+
+ const dispatchKeyEvent = (key: string, target?: HTMLElement) => {
+ const event = new KeyboardEvent('keydown', {
+ key,
+ bubbles: true,
+ cancelable: true,
+ });
+ (target || mockTable).dispatchEvent(event);
+ };
+
+ it('should initialize with focused index of -1', () => {
+ const { result } = renderHook(() => useKeyboardNavigation(mockTableRef, 10, mockOnRowSelect));
+
+ expect(result.current.focusedRowIndex).toBe(-1);
+ });
+
+ it('should navigate down with ArrowDown key', async () => {
+ const { result } = renderHook(() => useKeyboardNavigation(mockTableRef, 10, mockOnRowSelect));
+
+ act(() => {
+ result.current.setFocusedRowIndex(0);
+ });
+
+ act(() => {
+ dispatchKeyEvent('ArrowDown');
+ });
+
+ await waitFor(() => {
+ expect(result.current.focusedRowIndex).toBe(1);
+ });
+ });
+
+ it('should navigate up with ArrowUp key', async () => {
+ const { result } = renderHook(() => useKeyboardNavigation(mockTableRef, 10, mockOnRowSelect));
+
+ act(() => {
+ result.current.setFocusedRowIndex(5);
+ });
+
+ act(() => {
+ dispatchKeyEvent('ArrowUp');
+ });
+
+ await waitFor(() => {
+ expect(result.current.focusedRowIndex).toBe(4);
+ });
+ });
+
+ it('should not go below 0 with ArrowUp', async () => {
+ const { result } = renderHook(() => useKeyboardNavigation(mockTableRef, 10, mockOnRowSelect));
+
+ act(() => {
+ result.current.setFocusedRowIndex(0);
+ });
+
+ act(() => {
+ dispatchKeyEvent('ArrowUp');
+ });
+
+ await waitFor(() => {
+ expect(result.current.focusedRowIndex).toBe(0);
+ });
+ });
+
+ it('should not exceed row count with ArrowDown', async () => {
+ const { result } = renderHook(() => useKeyboardNavigation(mockTableRef, 5, mockOnRowSelect));
+
+ act(() => {
+ result.current.setFocusedRowIndex(4);
+ });
+
+ act(() => {
+ dispatchKeyEvent('ArrowDown');
+ });
+
+ await waitFor(() => {
+ expect(result.current.focusedRowIndex).toBe(4);
+ });
+ });
+
+ it('should jump to first row with Home key', async () => {
+ const { result } = renderHook(() => useKeyboardNavigation(mockTableRef, 10, mockOnRowSelect));
+
+ act(() => {
+ result.current.setFocusedRowIndex(5);
+ });
+
+ act(() => {
+ dispatchKeyEvent('Home');
+ });
+
+ await waitFor(() => {
+ expect(result.current.focusedRowIndex).toBe(0);
+ });
+ });
+
+ it('should jump to last row with End key', async () => {
+ const { result } = renderHook(() => useKeyboardNavigation(mockTableRef, 10, mockOnRowSelect));
+
+ act(() => {
+ result.current.setFocusedRowIndex(0);
+ });
+
+ act(() => {
+ dispatchKeyEvent('End');
+ });
+
+ await waitFor(() => {
+ expect(result.current.focusedRowIndex).toBe(9);
+ });
+ });
+
+ it('should trigger onRowSelect with Enter key', async () => {
+ const { result } = renderHook(() => useKeyboardNavigation(mockTableRef, 10, mockOnRowSelect));
+
+ act(() => {
+ result.current.setFocusedRowIndex(3);
+ });
+
+ act(() => {
+ dispatchKeyEvent('Enter');
+ });
+
+ await waitFor(() => {
+ expect(mockOnRowSelect).toHaveBeenCalledWith(3);
+ });
+ });
+
+ it('should trigger onRowSelect with Space key', async () => {
+ const { result } = renderHook(() => useKeyboardNavigation(mockTableRef, 10, mockOnRowSelect));
+
+ act(() => {
+ result.current.setFocusedRowIndex(2);
+ });
+
+ act(() => {
+ dispatchKeyEvent(' ');
+ });
+
+ await waitFor(() => {
+ expect(mockOnRowSelect).toHaveBeenCalledWith(2);
+ });
+ });
+
+ it('should reset focused index with Escape key', async () => {
+ const { result } = renderHook(() => useKeyboardNavigation(mockTableRef, 10, mockOnRowSelect));
+
+ act(() => {
+ result.current.setFocusedRowIndex(5);
+ });
+
+ act(() => {
+ dispatchKeyEvent('Escape');
+ });
+
+ await waitFor(() => {
+ expect(result.current.focusedRowIndex).toBe(-1);
+ });
+ });
+
+ it('should ignore events outside table', () => {
+ const { result } = renderHook(() => useKeyboardNavigation(mockTableRef, 10, mockOnRowSelect));
+
+ const outsideElement = document.createElement('div');
+ document.body.appendChild(outsideElement);
+
+ act(() => {
+ result.current.setFocusedRowIndex(0);
+ });
+
+ const event = new KeyboardEvent('keydown', {
+ key: 'ArrowDown',
+ bubbles: true,
+ });
+ outsideElement.dispatchEvent(event);
+
+ // Should not change because event target is outside table
+ expect(result.current.focusedRowIndex).toBe(0);
+
+ document.body.removeChild(outsideElement);
+ });
+
+ it('should not call onRowSelect if focused index is -1', () => {
+ renderHook(() => useKeyboardNavigation(mockTableRef, 10, mockOnRowSelect));
+
+ act(() => {
+ dispatchKeyEvent('Enter');
+ });
+
+ expect(mockOnRowSelect).not.toHaveBeenCalled();
+ });
+
+ it('should allow manual focus index setting', () => {
+ const { result } = renderHook(() => useKeyboardNavigation(mockTableRef, 10, mockOnRowSelect));
+
+ act(() => {
+ result.current.setFocusedRowIndex(7);
+ });
+
+ expect(result.current.focusedRowIndex).toBe(7);
+ });
+ });
+});
diff --git a/packages/client/src/components/DataTable/DataTable.hooks.ts b/packages/client/src/components/DataTable/DataTable.hooks.ts
new file mode 100644
index 0000000000..d2941fb438
--- /dev/null
+++ b/packages/client/src/components/DataTable/DataTable.hooks.ts
@@ -0,0 +1,135 @@
+import { useState, useEffect, useMemo } from 'react';
+import type { TableColumn } from './DataTable.types';
+
+export function useDebounced<T>(value: T, delay: number) {
+ const [debounced, setDebounced] = useState(value);
+
+ useEffect(() => {
+ const id = setTimeout(() => setDebounced(value), delay);
+ return () => clearTimeout(id);
+ }, [value, delay]);
+
+ return debounced;
+}
+
+export const useOptimizedRowSelection = (initialSelection: Record<string, boolean> = {}) => {
+ const [selection, setSelection] = useState(initialSelection);
+ return [selection, setSelection] as const;
+};
+
+export const useColumnStyles = <TData, TValue>(
+ columns: TableColumn<TData, TValue>[],
+ isSmallScreen: boolean,
+ containerRef: React.RefObject<HTMLDivElement>,
+) => {
+ const [containerWidth, setContainerWidth] = useState(0);
+
+ useEffect(() => {
+ const container = containerRef.current;
+ if (!container) return;
+
+ const updateWidth = () => {
+ setContainerWidth(container.clientWidth);
+ };
+
+ const resizeObserver = new ResizeObserver(updateWidth);
+ resizeObserver.observe(container);
+ updateWidth();
+
+ return () => resizeObserver.disconnect();
+ }, [containerRef]);
+
+ return useMemo(() => {
+ if (containerWidth === 0) {
+ return {};
+ }
+
+ const styles: Record<string, React.CSSProperties> = {};
+ let totalFixedWidth = 0;
+ const flexibleColumns: (TableColumn<TData, TValue> & { priority: number })[] = [];
+
+ columns.forEach((column) => {
+ const key = String(column.id ?? column.accessorKey ?? '');
+ const size = isSmallScreen ? column.meta?.mobileSize : column.meta?.size;
+
+ if (size) {
+ const width = parseInt(String(size), 10);
+ totalFixedWidth += width;
+ styles[key] = {
+ width: size,
+ minWidth: column.meta?.minWidth || size,
+ };
+ } else {
+ flexibleColumns.push({ ...column, priority: column.meta?.priority ?? 1 });
+ }
+ });
+
+ const availableWidth = containerWidth - totalFixedWidth;
+ const totalPriority = flexibleColumns.reduce((sum, col) => sum + col.priority, 0);
+
+ if (availableWidth > 0 && totalPriority > 0) {
+ flexibleColumns.forEach((column) => {
+ const key = String(column.id ?? column.accessorKey ?? '');
+ const proportion = column.priority / totalPriority;
+ const width = Math.max(Math.floor(availableWidth * proportion), 80); // min width of 80px
+ styles[key] = {
+ width: `${width}px`,
+ minWidth: column.meta?.minWidth ?? `${isSmallScreen ? 60 : 80}px`,
+ };
+ });
+ }
+
+ return styles;
+ }, [columns, containerWidth, isSmallScreen]);
+};
+
+export const useDynamicColumnWidths = useColumnStyles;
+
+export const useKeyboardNavigation = (
+ tableRef: React.RefObject<HTMLDivElement>,
+ rowCount: number,
+ onRowSelect?: (index: number) => void,
+) => {
+ const [focusedRowIndex, setFocusedRowIndex] = useState<number>(-1);
+
+ useEffect(() => {
+ const handleKeyDown = (event: KeyboardEvent) => {
+ if (!tableRef.current?.contains(event.target as Node)) return;
+
+ switch (event.key) {
+ case 'ArrowDown':
+ event.preventDefault();
+ setFocusedRowIndex((prev) => Math.min(prev + 1, rowCount - 1));
+ break;
+ case 'ArrowUp':
+ event.preventDefault();
+ setFocusedRowIndex((prev) => Math.max(prev - 1, 0));
+ break;
+ case 'Home':
+ event.preventDefault();
+ setFocusedRowIndex(0);
+ break;
+ case 'End':
+ event.preventDefault();
+ setFocusedRowIndex(rowCount - 1);
+ break;
+ case 'Enter':
+ case ' ':
+ if (focusedRowIndex >= 0 && onRowSelect) {
+ event.preventDefault();
+ onRowSelect(focusedRowIndex);
+ }
+ break;
+ case 'Escape':
+ setFocusedRowIndex(-1);
+ (event.target as HTMLElement).blur();
+ break;
+ }
+ };
+
+ document.addEventListener('keydown', handleKeyDown);
+ return () => document.removeEventListener('keydown', handleKeyDown);
+ }, [tableRef, rowCount, focusedRowIndex, onRowSelect]);
+
+ return { focusedRowIndex, setFocusedRowIndex };
+};
diff --git a/packages/client/src/components/DataTable/DataTable.spec.tsx b/packages/client/src/components/DataTable/DataTable.spec.tsx
new file mode 100644
index 0000000000..f9897acb7e
--- /dev/null
+++ b/packages/client/src/components/DataTable/DataTable.spec.tsx
@@ -0,0 +1,973 @@
+import React from 'react';
+import { render, screen, fireEvent, waitFor } from '@testing-library/react';
+import { Provider as JotaiProvider } from 'jotai';
+import DataTable from './DataTable';
+import type { TableColumn } from './DataTable.types';
+import type { SortingState } from '@tanstack/react-table';
+
+// Mock utilities
+jest.mock('~/utils', () => ({
+ cn: (...classes: (string | undefined | boolean)[]) => classes.filter(Boolean).join(' '),
+ logger: {
+ log: jest.fn(),
+ warn: jest.fn(),
+ error: jest.fn(),
+ },
+}));
+
+// Mock hooks
+jest.mock('~/hooks', () => ({
+ useLocalize: () => (key: string, options?: Record<string, unknown>) => {
+ if (options && typeof options === 'object') {
+ let result = key;
+ Object.entries(options).forEach(([k, v]) => {
+ result = result.replace(`{${k}}`, String(v));
+ });
+ return result;
+ }
+ return key;
+ },
+ useMediaQuery: jest.fn(() => false),
+}));
+
+// Mock svgs
+jest.mock('~/svgs', () => ({
+ Spinner: ({ className }: { className?: string }) => (
+ <div data-testid="spinner" className={className} />
+ ),
+}));
+
+// Mock lucide-react icons
+jest.mock('lucide-react', () => ({
+ ArrowUp: ({ className }: { className?: string }) => (
+ <span data-testid="arrow-up" className={className} />
+ ),
+ ArrowDown: ({ className }: { className?: string }) => (
+ <span data-testid="arrow-down" className={className} />
+ ),
+ ArrowDownUp: ({ className }: { className?: string }) => (
+ <span data-testid="arrow-down-up" className={className} />
+ ),
+}));
+
+// Mock Table components
+jest.mock('../Table', () => ({
+ Table: ({
+ children,
+ className,
+ role,
+ 'aria-label': ariaLabel,
+ 'aria-rowcount': ariaRowCount,
+ }: {
+ children: React.ReactNode;
+ className?: string;
+ role?: string;
+ 'aria-label'?: string;
+ 'aria-rowcount'?: number;
+ unwrapped?: boolean;
+ }) => (
+ <table
+ data-testid="data-table"
+ className={className}
+ role={role}
+ aria-label={ariaLabel}
+ aria-rowcount={ariaRowCount}
+ >
+ {children}
+ </table>
+ ),
+ TableHeader: ({ children, className }: { children: React.ReactNode; className?: string }) => (
+ <thead data-testid="table-header" className={className}>
+ {children}
+ </thead>
+ ),
+ TableBody: ({ children }: { children: React.ReactNode }) => (
+ <tbody data-testid="table-body">{children}</tbody>
+ ),
+ TableHead: ({
+ children,
+ className,
+ onClick,
+ onKeyDown,
+ role,
+ tabIndex,
+ 'aria-label': ariaLabel,
+ 'aria-sort': ariaSort,
+ scope,
+ style,
+ }: {
+ children: React.ReactNode;
+ className?: string;
+ onClick?: () => void;
+ onKeyDown?: (e: React.KeyboardEvent) => void;
+ role?: string;
+ tabIndex?: number;
+ 'aria-label'?: string;
+ 'aria-sort'?: 'ascending' | 'descending' | 'none';
+ scope?: string;
+ style?: React.CSSProperties;
+ }) => (
+ <th
+ data-testid="table-head"
+ className={className}
+ onClick={onClick}
+ onKeyDown={onKeyDown}
+ role={role}
+ tabIndex={tabIndex}
+ aria-label={ariaLabel}
+ aria-sort={ariaSort}
+ scope={scope}
+ style={style}
+ >
+ {children}
+ </th>
+ ),
+ TableRow: ({
+ children,
+ className,
+ 'data-state': dataState,
+ 'data-index': dataIndex,
+ style,
+ 'aria-hidden': ariaHidden,
+ }: {
+ children: React.ReactNode;
+ className?: string;
+ 'data-state'?: string;
+ 'data-index'?: number;
+ style?: React.CSSProperties;
+ 'aria-hidden'?: boolean;
+ }) => (
+ <tr
+ data-testid="table-row"
+ className={className}
+ data-state={dataState}
+ data-index={dataIndex}
+ style={style}
+ aria-hidden={ariaHidden}
+ >
+ {children}
+ </tr>
+ ),
+ TableCell: ({
+ children,
+ className,
+ colSpan,
+ style,
+ id,
+ role,
+ 'aria-live': ariaLive,
+ }: {
+ children?: React.ReactNode;
+ className?: string;
+ colSpan?: number;
+ style?: React.CSSProperties;
+ id?: string;
+ role?: string;
+ 'aria-live'?: 'polite' | 'assertive' | 'off';
+ }) => (
+ <td
+ data-testid="table-cell"
+ className={className}
+ colSpan={colSpan}
+ style={style}
+ id={id}
+ role={role}
+ aria-live={ariaLive}
+ >
+ {children}
+ </td>
+ ),
+ TableRowHeader: ({
+ children,
+ className,
+ style,
+ }: {
+ children?: React.ReactNode;
+ className?: string;
+ style?: React.CSSProperties;
+ }) => (
+ <th data-testid="table-row-header" className={className} style={style} scope="row">
+ {children}
+ </th>
+ ),
+}));
+
+// Mock Label component
+jest.mock('../Label', () => ({
+ Label: ({ children, className }: { children: React.ReactNode; className?: string }) => (
+ <label data-testid="label" className={className}>
+ {children}
+ </label>
+ ),
+}));
+
+// Mock DataTableSearch component
+jest.mock('./DataTableSearch', () => ({
+ DataTableSearch: ({
+ value,
+ onChange,
+ }: {
+ value: string;
+ onChange: (value: string) => void;
+ placeholder?: string;
+ }) => (
+ <input
+ data-testid="search-input"
+ value={value}
+ onChange={(e) => onChange(e.target.value)}
+ placeholder="Search..."
+ />
+ ),
+}));
+
+// Mock Checkbox component
+jest.mock('../Checkbox', () => ({
+ Checkbox: ({
+ checked,
+ onCheckedChange,
+ 'aria-label': ariaLabel,
+ }: {
+ checked: boolean;
+ onCheckedChange: (value: boolean) => void;
+ 'aria-label': string;
+ }) => (
+ <input
+ type="checkbox"
+ data-testid="checkbox"
+ checked={checked}
+ onChange={(e) => onCheckedChange(e.target.checked)}
+ aria-label={ariaLabel}
+ />
+ ),
+}));
+
+// Mock Skeleton component
+jest.mock('../Skeleton', () => ({
+ Skeleton: ({ className }: { className?: string }) => (
+ <div data-testid="skeleton" className={className} />
+ ),
+}));
+
+// Test data types - extends Record<string, unknown> for DataTable compatibility
+interface TestData extends Record<string, unknown> {
+ id: string;
+ name: string;
+ status: string;
+ createdAt: string;
+}
+
+// Helper to create test data
+const createTestData = (count: number): TestData[] =>
+ Array.from({ length: count }, (_, i) => ({
+ id: `row-${i}`,
+ name: `Item ${i}`,
+ status: i % 2 === 0 ? 'active' : 'inactive',
+ createdAt: `2024-01-${String(i + 1).padStart(2, '0')}`,
+ }));
+
+// Helper to create test columns
+const createTestColumns = (): TableColumn<TestData, string>[] => [
+ {
+ accessorKey: 'name',
+ header: 'Name',
+ cell: ({ row }) => row.original.name,
+ meta: { isRowHeader: true },
+ },
+ {
+ accessorKey: 'status',
+ header: 'Status',
+ cell: ({ row }) => row.original.status,
+ },
+ {
+ accessorKey: 'createdAt',
+ header: 'Created At',
+ cell: ({ row }) => row.original.createdAt,
+ meta: { desktopOnly: true },
+ },
+];
+
+// Wrapper component with providers
+const TestWrapper = ({ children }: { children: React.ReactNode }) => (
+ <JotaiProvider>{children}</JotaiProvider>
+);
+
+describe('DataTable', () => {
+ beforeEach(() => {
+ jest.useFakeTimers();
+ });
+
+ afterEach(() => {
+ jest.useRealTimers();
+ jest.clearAllMocks();
+ });
+
+ describe('Rendering', () => {
+ it('should render table with columns and data', () => {
+ const columns = createTestColumns();
+ const data = createTestData(5);
+
+ render(
+ <TestWrapper>
+ <DataTable columns={columns} data={data} />
+ </TestWrapper>,
+ );
+
+ expect(screen.getByTestId('data-table')).toBeInTheDocument();
+ expect(screen.getByTestId('table-header')).toBeInTheDocument();
+ expect(screen.getByTestId('table-body')).toBeInTheDocument();
+ });
+
+ it('should render column headers', () => {
+ const columns = createTestColumns();
+ const data = createTestData(5);
+
+ render(
+ <TestWrapper>
+ <DataTable columns={columns} data={data} />
+ </TestWrapper>,
+ );
+
+ const headers = screen.getAllByTestId('table-head');
+ // Should have select column + 3 data columns = 4
+ expect(headers.length).toBeGreaterThanOrEqual(3);
+ });
+
+ it('should show skeleton rows when isLoading is true', () => {
+ const columns = createTestColumns();
+
+ render(
+ <TestWrapper>
+ <DataTable columns={columns} data={[]} isLoading={true} />
+ </TestWrapper>,
+ );
+
+ const skeletons = screen.getAllByTestId('skeleton');
+ expect(skeletons.length).toBeGreaterThan(0);
+ });
+
+ it('should show "No data" message when empty', () => {
+ const columns = createTestColumns();
+
+ render(
+ <TestWrapper>
+ <DataTable columns={columns} data={[]} isLoading={false} />
+ </TestWrapper>,
+ );
+
+ expect(screen.getByText('com_ui_no_data')).toBeInTheDocument();
+ });
+
+ it('should show "No search results" when filtered to empty', () => {
+ const columns = createTestColumns();
+
+ render(
+ <TestWrapper>
+ <DataTable
+ columns={columns}
+ data={[]}
+ isLoading={false}
+ filterValue="nonexistent"
+ onFilterChange={jest.fn()}
+ />
+ </TestWrapper>,
+ );
+
+ // Trigger the search term state update
+ const searchInput = screen.getByTestId('search-input');
+ fireEvent.change(searchInput, { target: { value: 'nonexistent' } });
+
+ expect(screen.getByText('com_ui_no_search_results')).toBeInTheDocument();
+ });
+
+ it('should apply custom className', () => {
+ const columns = createTestColumns();
+ const data = createTestData(5);
+
+ render(
+ <TestWrapper>
+ <DataTable columns={columns} data={data} className="custom-table-class" />
+ </TestWrapper>,
+ );
+
+ const container = screen.getByRole('region', { name: 'com_ui_data_table' });
+ expect(container.className).toContain('custom-table-class');
+ });
+
+ it('should set aria-rowcount based on data length', () => {
+ const columns = createTestColumns();
+ const data = createTestData(25);
+
+ render(
+ <TestWrapper>
+ <DataTable columns={columns} data={data} />
+ </TestWrapper>,
+ );
+
+ const table = screen.getByTestId('data-table');
+ expect(table).toHaveAttribute('aria-rowcount', '25');
+ });
+ });
+
+ describe('Search', () => {
+ it('should render search input when enableSearch is true', () => {
+ const columns = createTestColumns();
+ const data = createTestData(5);
+
+ render(
+ <TestWrapper>
+ <DataTable
+ columns={columns}
+ data={data}
+ config={{ search: { enableSearch: true } }}
+ onFilterChange={jest.fn()}
+ />
+ </TestWrapper>,
+ );
+
+ expect(screen.getByTestId('search-input')).toBeInTheDocument();
+ });
+
+ it('should not render search input when enableSearch is false', () => {
+ const columns = createTestColumns();
+ const data = createTestData(5);
+
+ render(
+ <TestWrapper>
+ <DataTable columns={columns} data={data} config={{ search: { enableSearch: false } }} />
+ </TestWrapper>,
+ );
+
+ expect(screen.queryByTestId('search-input')).not.toBeInTheDocument();
+ });
+
+ it('should not render search when onFilterChange is not provided', () => {
+ const columns = createTestColumns();
+ const data = createTestData(5);
+
+ render(
+ <TestWrapper>
+ <DataTable columns={columns} data={data} config={{ search: { enableSearch: true } }} />
+ </TestWrapper>,
+ );
+
+ expect(screen.queryByTestId('search-input')).not.toBeInTheDocument();
+ });
+
+ it('should debounce search input', async () => {
+ const mockOnFilterChange = jest.fn();
+ const columns = createTestColumns();
+ const data = createTestData(5);
+
+ render(
+ <TestWrapper>
+ <DataTable
+ columns={columns}
+ data={data}
+ config={{ search: { enableSearch: true, debounce: 300 } }}
+ onFilterChange={mockOnFilterChange}
+ filterValue=""
+ />
+ </TestWrapper>,
+ );
+
+ const searchInput = screen.getByTestId('search-input');
+ fireEvent.change(searchInput, { target: { value: 'test' } });
+
+ // Should not call immediately
+ expect(mockOnFilterChange).not.toHaveBeenCalled();
+
+ // Advance past debounce delay
+ jest.advanceTimersByTime(350);
+
+ await waitFor(() => {
+ expect(mockOnFilterChange).toHaveBeenCalledWith('test');
+ });
+ });
+
+ it('should display filterValue in search input', () => {
+ const columns = createTestColumns();
+ const data = createTestData(5);
+
+ render(
+ <TestWrapper>
+ <DataTable
+ columns={columns}
+ data={data}
+ filterValue="existing search"
+ onFilterChange={jest.fn()}
+ />
+ </TestWrapper>,
+ );
+
+ const searchInput = screen.getByTestId('search-input');
+ expect(searchInput).toHaveValue('existing search');
+ });
+ });
+
+ describe('Sorting', () => {
+ it('should render sort icons in sortable headers', () => {
+ const columns: TableColumn<TestData, string>[] = [
+ {
+ accessorKey: 'name',
+ header: 'Name',
+ enableSorting: true,
+ },
+ ];
+ const data = createTestData(5);
+
+ render(
+ <TestWrapper>
+ <DataTable columns={columns} data={data} />
+ </TestWrapper>,
+ );
+
+ // Should show default sort icon
+ expect(screen.getByTestId('arrow-down-up')).toBeInTheDocument();
+ });
+
+ it('should call onSortingChange when header is clicked', () => {
+ const mockOnSortingChange = jest.fn();
+ const columns: TableColumn<TestData, string>[] = [
+ {
+ accessorKey: 'name',
+ header: 'Name',
+ enableSorting: true,
+ },
+ ];
+ const data = createTestData(5);
+
+ render(
+ <TestWrapper>
+ <DataTable
+ columns={columns}
+ data={data}
+ sorting={[]}
+ onSortingChange={mockOnSortingChange}
+ />
+ </TestWrapper>,
+ );
+
+ const sortableHeader = screen.getAllByTestId('table-head')[1]; // Skip select column
+ fireEvent.click(sortableHeader);
+
+ expect(mockOnSortingChange).toHaveBeenCalled();
+ });
+
+ it('should trigger sort on Enter key', () => {
+ const mockOnSortingChange = jest.fn();
+ const columns: TableColumn<TestData, string>[] = [
+ {
+ accessorKey: 'name',
+ header: 'Name',
+ enableSorting: true,
+ },
+ ];
+ const data = createTestData(5);
+
+ render(
+ <TestWrapper>
+ <DataTable
+ columns={columns}
+ data={data}
+ sorting={[]}
+ onSortingChange={mockOnSortingChange}
+ />
+ </TestWrapper>,
+ );
+
+ const sortableHeader = screen.getAllByTestId('table-head')[1];
+ fireEvent.keyDown(sortableHeader, { key: 'Enter' });
+
+ expect(mockOnSortingChange).toHaveBeenCalled();
+ });
+
+ it('should trigger sort on Space key', () => {
+ const mockOnSortingChange = jest.fn();
+ const columns: TableColumn<TestData, string>[] = [
+ {
+ accessorKey: 'name',
+ header: 'Name',
+ enableSorting: true,
+ },
+ ];
+ const data = createTestData(5);
+
+ render(
+ <TestWrapper>
+ <DataTable
+ columns={columns}
+ data={data}
+ sorting={[]}
+ onSortingChange={mockOnSortingChange}
+ />
+ </TestWrapper>,
+ );
+
+ const sortableHeader = screen.getAllByTestId('table-head')[1];
+ fireEvent.keyDown(sortableHeader, { key: ' ' });
+
+ expect(mockOnSortingChange).toHaveBeenCalled();
+ });
+
+ it('should show ascending icon when sorted ascending', () => {
+ const columns: TableColumn<TestData, string>[] = [
+ {
+ accessorKey: 'name',
+ header: 'Name',
+ enableSorting: true,
+ },
+ ];
+ const data = createTestData(5);
+ const sorting: SortingState = [{ id: 'name', desc: false }];
+
+ render(
+ <TestWrapper>
+ <DataTable columns={columns} data={data} sorting={sorting} onSortingChange={jest.fn()} />
+ </TestWrapper>,
+ );
+
+ expect(screen.getByTestId('arrow-up')).toBeInTheDocument();
+ });
+
+ it('should show descending icon when sorted descending', () => {
+ const columns: TableColumn<TestData, string>[] = [
+ {
+ accessorKey: 'name',
+ header: 'Name',
+ enableSorting: true,
+ },
+ ];
+ const data = createTestData(5);
+ const sorting: SortingState = [{ id: 'name', desc: true }];
+
+ render(
+ <TestWrapper>
+ <DataTable columns={columns} data={data} sorting={sorting} onSortingChange={jest.fn()} />
+ </TestWrapper>,
+ );
+
+ expect(screen.getByTestId('arrow-down')).toBeInTheDocument();
+ });
+
+ it('should use internal sorting state when onSortingChange not provided', () => {
+ const columns: TableColumn<TestData, string>[] = [
+ {
+ accessorKey: 'name',
+ header: 'Name',
+ enableSorting: true,
+ },
+ ];
+ const data = createTestData(5);
+
+ render(
+ <TestWrapper>
+ <DataTable columns={columns} data={data} />
+ </TestWrapper>,
+ );
+
+ const sortableHeader = screen.getAllByTestId('table-head')[1];
+ fireEvent.click(sortableHeader);
+
+ // Should show ascending icon after click
+ expect(screen.getByTestId('arrow-up')).toBeInTheDocument();
+ });
+ });
+
+ describe('Row Selection', () => {
+ it('should show checkboxes when showCheckboxes is true', () => {
+ const columns = createTestColumns();
+ const data = createTestData(5);
+
+ render(
+ <TestWrapper>
+ <DataTable
+ columns={columns}
+ data={data}
+ config={{ selection: { enableRowSelection: true, showCheckboxes: true } }}
+ />
+ </TestWrapper>,
+ );
+
+ const checkboxes = screen.getAllByTestId('checkbox');
+ // Should have header checkbox + one per row
+ expect(checkboxes.length).toBeGreaterThanOrEqual(1);
+ });
+
+ it('should not show checkboxes when showCheckboxes is false', () => {
+ const columns = createTestColumns();
+ const data = createTestData(5);
+
+ render(
+ <TestWrapper>
+ <DataTable
+ columns={columns}
+ data={data}
+ config={{ selection: { enableRowSelection: true, showCheckboxes: false } }}
+ />
+ </TestWrapper>,
+ );
+
+ const checkboxes = screen.queryAllByTestId('checkbox');
+ expect(checkboxes).toHaveLength(0);
+ });
+
+ it('should not show checkboxes when enableRowSelection is false', () => {
+ const columns = createTestColumns();
+ const data = createTestData(5);
+
+ render(
+ <TestWrapper>
+ <DataTable
+ columns={columns}
+ data={data}
+ config={{ selection: { enableRowSelection: false } }}
+ />
+ </TestWrapper>,
+ );
+
+ const checkboxes = screen.queryAllByTestId('checkbox');
+ expect(checkboxes).toHaveLength(0);
+ });
+ });
+
+ describe('Virtualization', () => {
+ it('should activate virtualization when data length >= minRows', () => {
+ const columns = createTestColumns();
+ const data = createTestData(100); // More than default minRows of 50
+
+ render(
+ <TestWrapper>
+ <DataTable columns={columns} data={data} />
+ </TestWrapper>,
+ );
+
+ // Table should still render
+ expect(screen.getByTestId('data-table')).toBeInTheDocument();
+ });
+
+ it('should not use virtualization for small datasets', () => {
+ const columns = createTestColumns();
+ const data = createTestData(10); // Less than minRows
+
+ render(
+ <TestWrapper>
+ <DataTable columns={columns} data={data} />
+ </TestWrapper>,
+ );
+
+ // All rows should be rendered
+ const rows = screen.getAllByTestId('table-row');
+ expect(rows.length).toBeGreaterThanOrEqual(10);
+ });
+
+ it('should respect custom minRows config', () => {
+ const columns = createTestColumns();
+ const data = createTestData(20);
+
+ render(
+ <TestWrapper>
+ <DataTable
+ columns={columns}
+ data={data}
+ config={{ virtualization: { minRows: 10 } }} // Lower threshold
+ />
+ </TestWrapper>,
+ );
+
+ // Virtualization should be active
+ expect(screen.getByTestId('data-table')).toBeInTheDocument();
+ });
+ });
+
+ describe('Infinite Scroll', () => {
+ it('should show loading spinner when isFetchingNextPage is true', () => {
+ const columns = createTestColumns();
+ const data = createTestData(5);
+
+ render(
+ <TestWrapper>
+ <DataTable
+ columns={columns}
+ data={data}
+ isFetchingNextPage={true}
+ hasNextPage={true}
+ fetchNextPage={jest.fn()}
+ />
+ </TestWrapper>,
+ );
+
+ expect(screen.getByTestId('spinner')).toBeInTheDocument();
+ });
+
+ it('should not show loading spinner when not fetching', () => {
+ const columns = createTestColumns();
+ const data = createTestData(5);
+
+ render(
+ <TestWrapper>
+ <DataTable
+ columns={columns}
+ data={data}
+ isFetchingNextPage={false}
+ hasNextPage={true}
+ fetchNextPage={jest.fn()}
+ />
+ </TestWrapper>,
+ );
+
+ expect(screen.queryByTestId('spinner')).not.toBeInTheDocument();
+ });
+ });
+
+ describe('Custom Actions', () => {
+ it('should render customActionsRenderer with selected info', () => {
+ const columns = createTestColumns();
+ const data = createTestData(5);
+ const mockRenderer = jest.fn().mockReturnValue(<div data-testid="custom-actions" />);
+
+ render(
+ <TestWrapper>
+ <DataTable columns={columns} data={data} customActionsRenderer={mockRenderer} />
+ </TestWrapper>,
+ );
+
+ expect(screen.getByTestId('custom-actions')).toBeInTheDocument();
+ expect(mockRenderer).toHaveBeenCalledWith(
+ expect.objectContaining({
+ selectedCount: 0,
+ selectedRows: [],
+ table: expect.any(Object),
+ }),
+ );
+ });
+
+ it('should pass updated selection to customActionsRenderer', () => {
+ const columns = createTestColumns();
+ const data = createTestData(5);
+ const mockRenderer = jest.fn().mockReturnValue(<div data-testid="custom-actions" />);
+
+ render(
+ <TestWrapper>
+ <DataTable columns={columns} data={data} customActionsRenderer={mockRenderer} />
+ </TestWrapper>,
+ );
+
+ // Initial call should have 0 selected
+ expect(mockRenderer).toHaveBeenLastCalledWith(
+ expect.objectContaining({
+ selectedCount: 0,
+ selectedRows: [],
+ }),
+ );
+ });
+ });
+
+ describe('Skeleton Loading', () => {
+ it('should show skeleton rows based on skeleton count config', () => {
+ const columns = createTestColumns();
+
+ render(
+ <TestWrapper>
+ <DataTable
+ columns={columns}
+ data={[]}
+ isLoading={true}
+ config={{ skeleton: { count: 5 } }}
+ />
+ </TestWrapper>,
+ );
+
+ const skeletons = screen.getAllByTestId('skeleton');
+ // 5 rows * number of columns
+ expect(skeletons.length).toBeGreaterThan(0);
+ });
+
+ it('should show skeletons when isFetching but not isFetchingNextPage', () => {
+ const columns = createTestColumns();
+
+ render(
+ <TestWrapper>
+ <DataTable
+ columns={columns}
+ data={[]}
+ isFetching={true}
+ isFetchingNextPage={false}
+ hasNextPage={true}
+ fetchNextPage={jest.fn()}
+ />
+ </TestWrapper>,
+ );
+
+ const skeletons = screen.getAllByTestId('skeleton');
+ expect(skeletons.length).toBeGreaterThan(0);
+ });
+ });
+
+ describe('Data without IDs', () => {
+ it('should handle data without id property using index fallback', () => {
+ const columns: TableColumn<{ name: string }, string>[] = [
+ { accessorKey: 'name', header: 'Name' },
+ ];
+ const dataWithoutIds = [{ name: 'Item 1' }, { name: 'Item 2' }];
+
+ // Should render without errors
+ render(
+ <TestWrapper>
+ <DataTable columns={columns} data={dataWithoutIds as TestData[]} />
+ </TestWrapper>,
+ );
+
+ expect(screen.getByTestId('data-table')).toBeInTheDocument();
+ });
+ });
+
+ describe('Accessibility', () => {
+ it('should have role="region" on container', () => {
+ const columns = createTestColumns();
+ const data = createTestData(5);
+
+ render(
+ <TestWrapper>
+ <DataTable columns={columns} data={data} />
+ </TestWrapper>,
+ );
+
+ expect(screen.getByRole('region', { name: 'com_ui_data_table' })).toBeInTheDocument();
+ });
+
+ it('should have aria-label on table', () => {
+ const columns = createTestColumns();
+ const data = createTestData(5);
+
+ render(
+ <TestWrapper>
+ <DataTable columns={columns} data={data} />
+ </TestWrapper>,
+ );
+
+ const table = screen.getByTestId('data-table');
+ expect(table).toHaveAttribute('aria-label', 'com_ui_data_table');
+ });
+
+ it('should have proper role on sortable headers', () => {
+ const columns: TableColumn<TestData, string>[] = [
+ {
+ accessorKey: 'name',
+ header: 'Name',
+ enableSorting: true,
+ },
+ ];
+ const data = createTestData(5);
+
+ render(
+ <TestWrapper>
+ <DataTable columns={columns} data={data} />
+ </TestWrapper>,
+ );
+
+ const sortableHeader = screen.getAllByTestId('table-head')[1];
+ expect(sortableHeader).toHaveAttribute('role', 'button');
+ expect(sortableHeader).toHaveAttribute('tabIndex', '0');
+ });
+ });
+});
diff --git a/packages/client/src/components/DataTable/DataTable.tsx b/packages/client/src/components/DataTable/DataTable.tsx
new file mode 100644
index 0000000000..4320b86db3
--- /dev/null
+++ b/packages/client/src/components/DataTable/DataTable.tsx
@@ -0,0 +1,609 @@
+import React, { useRef, useState, useEffect, useMemo, useCallback } from 'react';
+import { useVirtualizer } from '@tanstack/react-virtual';
+import { ArrowUp, ArrowDown, ArrowDownUp } from 'lucide-react';
+import {
+ useReactTable,
+ getCoreRowModel,
+ flexRender,
+ type SortingState,
+ type VisibilityState,
+ type ColumnDef,
+ type Row,
+ type Table as TTable,
+} from '@tanstack/react-table';
+import type { DataTableProps, ProcessedDataRow } from './DataTable.types';
+import { SelectionCheckbox, MemoizedTableRow, SkeletonRows } from './DataTableComponents';
+import { Table, TableBody, TableHead, TableHeader, TableCell, TableRow } from '../Table';
+import { useDebounced, useOptimizedRowSelection } from './DataTable.hooks';
+import { useMediaQuery, useLocalize } from '~/hooks';
+import { DataTableSearch } from './DataTableSearch';
+import { cn, logger } from '~/utils';
+import { Label } from '../Label';
+import { Spinner } from '~/svgs';
+
+function DataTable<TData extends Record<string, unknown>, TValue>({
+ columns,
+ data,
+ className = '',
+ isLoading = false,
+ isFetching = false,
+ config,
+ filterValue = '',
+ onFilterChange,
+ defaultSort = [],
+ isFetchingNextPage = false,
+ hasNextPage = false,
+ fetchNextPage,
+ sorting,
+ onSortingChange,
+ customActionsRenderer,
+}: DataTableProps<TData, TValue>) {
+ const localize = useLocalize();
+ const isSmallScreen = useMediaQuery('(max-width: 768px)');
+
+ const tableContainerRef = useRef<HTMLDivElement>(null);
+ const scrollTimeoutRef = useRef<number | null>(null);
+ const scrollRAFRef = useRef<number | null>(null);
+
+ const {
+ selection: { enableRowSelection = true, showCheckboxes = true } = {},
+ search: { enableSearch = true, debounce: debounceDelay = 300 } = {},
+ skeleton: { count: skeletonCount = 10 } = {},
+ virtualization: {
+ overscan = 10,
+ minRows = 50,
+ rowHeight = 56,
+ fastOverscanMultiplier = 4,
+ } = {},
+ } = config || {};
+
+ const virtualizationActive = data.length >= minRows;
+
+ // Dynamic overscan for fast scrolling - increases rendered rows during rapid scroll
+ const [dynamicOverscan, setDynamicOverscan] = useState(overscan);
+ const lastScrollTopRef = useRef(0);
+ const lastScrollTimeRef = useRef(performance.now());
+ const fastScrollTimeoutRef = useRef<number | null>(null);
+
+ useEffect(() => {
+ setDynamicOverscan(overscan);
+ }, [overscan]);
+
+ useEffect(() => {
+ return () => {
+ if (fastScrollTimeoutRef.current) {
+ clearTimeout(fastScrollTimeoutRef.current);
+ }
+ };
+ }, []);
+
+ const [columnVisibility, setColumnVisibility] = useState<VisibilityState>({});
+ const [optimizedRowSelection, setOptimizedRowSelection] = useOptimizedRowSelection();
+ const [searchTerm, setSearchTerm] = useState(filterValue);
+ const [internalSorting, setInternalSorting] = useState<SortingState>(defaultSort);
+
+ const selectedCount = Object.keys(optimizedRowSelection).length;
+ const isAllSelected = useMemo(
+ () => data.length > 0 && selectedCount === data.length,
+ [data.length, selectedCount],
+ );
+ const isIndeterminate = selectedCount > 0 && !isAllSelected;
+
+ const getRowId = useCallback(
+ (row: TData, index?: number) => String(row.id ?? `row-${index ?? 0}`),
+ [],
+ );
+
+ const selectedRows = useMemo(() => {
+ if (Object.keys(optimizedRowSelection).length === 0) return [];
+
+ const dataMap = new Map(data.map((item, index) => [getRowId(item, index), item]));
+ return Object.keys(optimizedRowSelection)
+ .map((id) => dataMap.get(id))
+ .filter(Boolean) as TData[];
+ }, [optimizedRowSelection, data, getRowId]);
+
+ const cleanupTimers = useCallback(() => {
+ if (scrollRAFRef.current) {
+ cancelAnimationFrame(scrollRAFRef.current);
+ scrollRAFRef.current = null;
+ }
+ if (scrollTimeoutRef.current) {
+ clearTimeout(scrollTimeoutRef.current);
+ scrollTimeoutRef.current = null;
+ }
+ }, []);
+
+ const debouncedTerm = useDebounced(searchTerm, debounceDelay);
+ const finalSorting = sorting ?? internalSorting;
+
+ // Mobile column visibility: columns with desktopOnly meta are hidden via CSS on mobile
+ // but remain in DOM for accessibility. CSS classes handle visual hiding.
+ const calculatedVisibility = useMemo(() => {
+ const newVisibility: VisibilityState = {};
+
+ columns.forEach((col) => {
+ const meta = (col as { meta?: { desktopOnly?: boolean } }).meta;
+ if (!meta?.desktopOnly) return;
+
+ const rawId =
+ (col as { id?: string | number; accessorKey?: string | number }).id ??
+ (col as { accessorKey?: string | number }).accessorKey;
+
+ if ((typeof rawId === 'string' || typeof rawId === 'number') && String(rawId).length > 0) {
+ newVisibility[String(rawId)] = true;
+ } else {
+ logger.warn(
+ 'DataTable: A desktopOnly column is missing id/accessorKey; cannot control header visibility automatically.',
+ col,
+ );
+ }
+ });
+ return newVisibility;
+ }, [isSmallScreen, columns]);
+
+ useEffect(() => {
+ setColumnVisibility((prev) => ({ ...prev, ...calculatedVisibility }));
+ }, [calculatedVisibility]);
+
+ // Warn about missing row IDs - only once per component lifecycle
+ const hasWarnedAboutMissingIds = useRef(false);
+
+ useEffect(() => {
+ if (data.length > 0 && !hasWarnedAboutMissingIds.current) {
+ const missing = data.filter((item) => item.id === null || item.id === undefined);
+ if (missing.length > 0) {
+ logger.warn(
+ `DataTable Warning: ${missing.length} data rows are missing a unique "id" property. Using index as a fallback. This can lead to unexpected behavior with selection and sorting.`,
+ { missingCount: missing.length, sample: missing.slice(0, 3) },
+ );
+ hasWarnedAboutMissingIds.current = true;
+ }
+ }
+ }, [data]);
+
+ const tableColumns = useMemo((): ColumnDef<TData, TValue>[] => {
+ if (!enableRowSelection || !showCheckboxes) {
+ return columns.map((col) => col as unknown as ColumnDef<TData, TValue>);
+ }
+
+ const selectColumn: ColumnDef<TData, TValue> = {
+ id: 'select',
+ enableResizing: false,
+ header: () => {
+ const extraCheckboxProps = (isIndeterminate ? { indeterminate: true } : {}) as Record<
+ string,
+ unknown
+ >;
+ return (
+ <div
+ className="flex h-full items-center justify-center"
+ aria-label={localize('com_ui_select_all')}
+ >
+ <SelectionCheckbox
+ checked={isAllSelected}
+ onChange={(value) => {
+ if (isAllSelected || !value) {
+ setOptimizedRowSelection({});
+ } else {
+ const allSelection = data.reduce<Record<string, boolean>>((acc, item, index) => {
+ acc[getRowId(item, index)] = true;
+ return acc;
+ }, {});
+ setOptimizedRowSelection(allSelection);
+ }
+ }}
+ ariaLabel={localize('com_ui_select_all')}
+ {...extraCheckboxProps}
+ />
+ </div>
+ );
+ },
+ cell: ({ row }) => {
+ const rowDescription = row.original.name
+ ? `named ${row.original.name}`
+ : `at position ${row.index + 1}`;
+ return (
+ <div
+ className="flex h-full items-center justify-center"
+ role="button"
+ tabIndex={0}
+ aria-label={localize(`com_ui_select_row`, { 0: rowDescription })}
+ >
+ <SelectionCheckbox
+ checked={row.getIsSelected()}
+ onChange={(value) => row.toggleSelected(value)}
+ ariaLabel={localize(`com_ui_select_row`, { 0: rowDescription })}
+ />
+ </div>
+ );
+ },
+ meta: {
+ className: 'max-w-[20px] flex-1',
+ },
+ };
+
+ return [selectColumn, ...columns.map((col) => col as unknown as ColumnDef<TData, TValue>)];
+ }, [
+ columns,
+ enableRowSelection,
+ showCheckboxes,
+ localize,
+ data,
+ getRowId,
+ isAllSelected,
+ isIndeterminate,
+ setOptimizedRowSelection,
+ ]);
+
+ const sizedColumns = tableColumns;
+
+ const table = useReactTable<TData>({
+ data,
+ columns: sizedColumns,
+ getRowId: getRowId,
+ getCoreRowModel: getCoreRowModel(),
+ enableRowSelection,
+ enableMultiRowSelection: true,
+ manualSorting: true,
+ manualFiltering: true,
+ state: {
+ sorting: finalSorting,
+ columnVisibility,
+ rowSelection: optimizedRowSelection,
+ },
+ onSortingChange: onSortingChange ?? setInternalSorting,
+ onColumnVisibilityChange: setColumnVisibility,
+ onRowSelectionChange: setOptimizedRowSelection,
+ });
+
+ const rowVirtualizer = useVirtualizer({
+ enabled: virtualizationActive,
+ count: data.length,
+ getScrollElement: () => tableContainerRef.current,
+ getItemKey: (index) => getRowId(data[index] as TData, index),
+ estimateSize: useCallback(() => rowHeight, [rowHeight]),
+ overscan: dynamicOverscan,
+ });
+
+ const virtualRows = rowVirtualizer.getVirtualItems();
+ const totalSize = rowVirtualizer.getTotalSize();
+ const paddingTop = virtualRows[0]?.start ?? 0;
+ const paddingBottom =
+ virtualRows.length > 0 ? totalSize - (virtualRows[virtualRows.length - 1]?.end ?? 0) : 0;
+
+ const { rows } = table.getRowModel();
+ const headerGroups = table.getHeaderGroups();
+
+ const showSkeletons = isLoading || (isFetching && !isFetchingNextPage);
+ const shouldShowSearch = enableSearch && onFilterChange;
+
+ // Render table body based on loading state and virtualization
+ let tableBodyContent: React.ReactNode;
+ if (showSkeletons) {
+ tableBodyContent = (
+ <SkeletonRows
+ count={skeletonCount}
+ columns={tableColumns as ColumnDef<Record<string, unknown>>[]}
+ />
+ );
+ } else if (virtualizationActive) {
+ tableBodyContent = (
+ <>
+ {paddingTop > 0 && (
+ <TableRow aria-hidden="true">
+ <TableCell
+ colSpan={tableColumns.length}
+ style={{ height: paddingTop, padding: 0, border: 0 }}
+ />
+ </TableRow>
+ )}
+ {virtualRows.map((virtualRow) => {
+ const row = rows[virtualRow.index];
+ if (!row) return null;
+
+ return (
+ <MemoizedTableRow
+ key={virtualRow.key}
+ row={row as unknown as Row<Record<string, unknown>>}
+ virtualIndex={virtualRow.index}
+ selected={row.getIsSelected()}
+ style={{ height: rowHeight }}
+ />
+ );
+ })}
+ {paddingBottom > 0 && (
+ <TableRow aria-hidden="true">
+ <TableCell
+ colSpan={tableColumns.length}
+ style={{ height: paddingBottom, padding: 0, border: 0 }}
+ />
+ </TableRow>
+ )}
+ </>
+ );
+ } else {
+ tableBodyContent = rows.map((row) => (
+ <MemoizedTableRow
+ key={getRowId(row.original as TData, row.index)}
+ row={row as unknown as Row<Record<string, unknown>>}
+ virtualIndex={row.index}
+ selected={row.getIsSelected()}
+ style={{ height: rowHeight }}
+ />
+ ));
+ }
+
+ useEffect(() => {
+ setSearchTerm(filterValue);
+ }, [filterValue]);
+
+ useEffect(() => {
+ if (debouncedTerm !== filterValue && onFilterChange) {
+ onFilterChange(debouncedTerm);
+ setOptimizedRowSelection({});
+ }
+ }, [debouncedTerm, filterValue, onFilterChange, setOptimizedRowSelection]);
+
+ // Recalculate virtual range when data or state changes
+ useEffect(() => {
+ if (!virtualizationActive) return;
+ rowVirtualizer.calculateRange();
+ }, [data.length, finalSorting, columnVisibility, virtualizationActive, rowVirtualizer]);
+
+ // Recalculate when container is resized
+ useEffect(() => {
+ if (!virtualizationActive) return;
+ const container = tableContainerRef.current;
+ if (!container) return;
+ const ro = new ResizeObserver(() => {
+ rowVirtualizer.calculateRange();
+ });
+ ro.observe(container);
+ return () => ro.disconnect();
+ }, [virtualizationActive, rowVirtualizer]);
+
+ const handleScroll = useMemo(() => {
+ let rafId: number | null = null;
+ let timeoutId: number | null = null;
+
+ return () => {
+ if (rafId) cancelAnimationFrame(rafId);
+
+ rafId = requestAnimationFrame(() => {
+ const container = tableContainerRef.current;
+ if (container) {
+ const now = performance.now();
+ const delta = Math.abs(container.scrollTop - lastScrollTopRef.current);
+ const dt = now - lastScrollTimeRef.current;
+ if (dt > 0) {
+ const velocity = delta / dt;
+ // Increase overscan during fast scrolling for smoother experience
+ if (velocity > 2 && virtualizationActive && dynamicOverscan === overscan) {
+ if (fastScrollTimeoutRef.current) {
+ window.clearTimeout(fastScrollTimeoutRef.current);
+ }
+ setDynamicOverscan(Math.min(overscan * fastOverscanMultiplier, overscan * 8));
+ fastScrollTimeoutRef.current = window.setTimeout(() => {
+ setDynamicOverscan((current) => (current !== overscan ? overscan : current));
+ }, 160);
+ }
+ }
+ lastScrollTopRef.current = container.scrollTop;
+ lastScrollTimeRef.current = now;
+ }
+
+ if (timeoutId) clearTimeout(timeoutId);
+
+ // Trigger infinite scroll pagination
+ timeoutId = window.setTimeout(() => {
+ const loaderContainer = tableContainerRef.current;
+ if (!loaderContainer || !fetchNextPage || !hasNextPage || isFetchingNextPage) return;
+
+ const { scrollTop, scrollHeight, clientHeight } = loaderContainer;
+ if (scrollTop + clientHeight >= scrollHeight - 200) {
+ fetchNextPage().finally();
+ }
+ }, 100);
+ });
+ };
+ }, [
+ fetchNextPage,
+ hasNextPage,
+ isFetchingNextPage,
+ overscan,
+ fastOverscanMultiplier,
+ virtualizationActive,
+ dynamicOverscan,
+ ]);
+
+ useEffect(() => {
+ const scrollElement = tableContainerRef.current;
+ if (!scrollElement) return;
+
+ scrollElement.addEventListener('scroll', handleScroll, { passive: true });
+ return () => {
+ scrollElement.removeEventListener('scroll', handleScroll);
+ cleanupTimers();
+ };
+ }, [handleScroll, cleanupTimers]);
+
+ return (
+ <div
+ className={cn(
+ 'relative flex w-full flex-col overflow-hidden rounded-lg border border-border-light bg-background',
+ 'h-[calc(100vh-8rem)] max-h-[80vh]',
+ className,
+ )}
+ role="region"
+ aria-label={localize('com_ui_data_table')}
+ >
+ <div className="flex w-full shrink-0 items-center gap-2 border-b border-border-light md:gap-3">
+ {shouldShowSearch && <DataTableSearch value={searchTerm} onChange={setSearchTerm} />}
+ {customActionsRenderer &&
+ customActionsRenderer({
+ selectedCount,
+ selectedRows,
+ table: table as unknown as TTable<ProcessedDataRow<TData>>,
+ })}
+ </div>
+ <div
+ ref={tableContainerRef}
+ className="overflow-anchor-none relative min-h-0 flex-1 overflow-auto will-change-scroll"
+ style={
+ {
+ WebkitOverflowScrolling: 'touch',
+ overscrollBehavior: 'contain',
+ } as React.CSSProperties
+ }
+ role="region"
+ aria-label={localize('com_ui_data_table_scroll_area')}
+ aria-describedby={showSkeletons ? 'loading-status' : undefined}
+ >
+ <Table
+ role="table"
+ aria-label={localize('com_ui_data_table')}
+ aria-rowcount={data.length}
+ className="table-auto"
+ unwrapped={true}
+ >
+ <TableHeader className="sticky top-0 z-10 bg-surface-secondary">
+ {headerGroups.map((headerGroup) => (
+ <TableRow key={headerGroup.id}>
+ {headerGroup.headers.map((header) => {
+ const isDesktopOnly =
+ (header.column.columnDef.meta as { desktopOnly?: boolean } | undefined)
+ ?.desktopOnly ?? false;
+
+ if (!header.column.getIsVisible()) {
+ return null;
+ }
+
+ const isSelectHeader = header.id === 'select';
+ const meta = header.column.columnDef.meta as { className?: string } | undefined;
+ const canSort = header.column.getCanSort();
+
+ let sortAriaLabel: string | undefined;
+ if (canSort) {
+ const sortState = header.column.getIsSorted();
+ let sortStateLabel = 'sortable';
+ if (sortState === 'asc') {
+ sortStateLabel = 'ascending';
+ } else if (sortState === 'desc') {
+ sortStateLabel = 'descending';
+ }
+
+ const headerLabel =
+ typeof header.column.columnDef.header === 'string'
+ ? header.column.columnDef.header
+ : header.column.id;
+
+ sortAriaLabel = `${headerLabel ?? ''} column, ${sortStateLabel}`;
+ }
+
+ const handleSortingKeyDown = (e: React.KeyboardEvent) => {
+ if (canSort && (e.key === 'Enter' || e.key === ' ')) {
+ e.preventDefault();
+ header.column.toggleSorting();
+ }
+ };
+
+ const metaWidth = (header.column.columnDef.meta as { width?: number } | undefined)
+ ?.width;
+ const widthStyle = isSelectHeader
+ ? { width: '32px', maxWidth: '32px', minWidth: '32px' }
+ : metaWidth && metaWidth >= 1 && metaWidth <= 100
+ ? {
+ width: `${metaWidth}%`,
+ maxWidth: `${metaWidth}%`,
+ minWidth: `${metaWidth}%`,
+ }
+ : {};
+ return (
+ <TableHead
+ key={header.id}
+ scope="col"
+ className={cn(
+ 'border-b border-border-light px-2 py-2 md:px-3 md:py-2',
+ isSelectHeader && 'px-0 text-center',
+ canSort && 'cursor-pointer hover:bg-surface-tertiary',
+ meta?.className,
+ header.column.getIsResizing() && 'bg-surface-tertiary/60',
+ isDesktopOnly && 'hidden md:table-cell',
+ )}
+ style={widthStyle}
+ onClick={header.column.getToggleSortingHandler()}
+ onKeyDown={handleSortingKeyDown}
+ role={canSort ? 'button' : undefined}
+ tabIndex={canSort ? 0 : undefined}
+ aria-label={sortAriaLabel}
+ aria-sort={
+ header.column.getIsSorted() === 'asc'
+ ? 'ascending'
+ : header.column.getIsSorted() === 'desc'
+ ? 'descending'
+ : undefined
+ }
+ >
+ {isSelectHeader ? (
+ flexRender(header.column.columnDef.header, header.getContext())
+ ) : (
+ <div className="flex items-center gap-1 md:gap-2">
+ {flexRender(header.column.columnDef.header, header.getContext())}
+ {canSort && (
+ <span className="text-text-primary" aria-hidden="true">
+ {{
+ asc: <ArrowUp className="size-4 text-text-primary" />,
+ desc: <ArrowDown className="size-4 text-text-primary" />,
+ }[header.column.getIsSorted() as string] ?? (
+ <ArrowDownUp className="size-4 text-text-primary" />
+ )}
+ </span>
+ )}
+ </div>
+ )}
+ </TableHead>
+ );
+ })}
+ </TableRow>
+ ))}
+ </TableHeader>
+
+ <TableBody>
+ {tableBodyContent}
+ {isFetchingNextPage && (
+ <TableRow>
+ <TableCell
+ colSpan={tableColumns.length}
+ className="p-4 text-center"
+ id="loading-status"
+ role="status"
+ aria-live="polite"
+ >
+ <div className="flex items-center justify-center gap-2">
+ <Spinner className="h-5 w-5" aria-hidden="true" />
+ <span className="sr-only">{localize('com_ui_loading_more_data')}</span>
+ </div>
+ </TableCell>
+ </TableRow>
+ )}
+ </TableBody>
+ </Table>
+
+ {!isLoading && !showSkeletons && rows.length === 0 && (
+ <div
+ className="flex flex-col items-center justify-center py-12"
+ role="status"
+ aria-live="polite"
+ >
+ <Label className="text-center text-text-secondary">
+ {searchTerm ? localize('com_ui_no_search_results') : localize('com_ui_no_data')}
+ </Label>
+ </div>
+ )}
+ </div>
+ </div>
+ );
+}
+
+export default DataTable;
diff --git a/packages/client/src/components/DataTable/DataTable.types.ts b/packages/client/src/components/DataTable/DataTable.types.ts
new file mode 100644
index 0000000000..42a7a23267
--- /dev/null
+++ b/packages/client/src/components/DataTable/DataTable.types.ts
@@ -0,0 +1,124 @@
+import type { ColumnDef, SortingState, Table } from '@tanstack/react-table';
+import type React from 'react';
+
+export type ProcessedDataRow<TData> = TData & { _id: string; _index: number };
+
+export type TableColumnDef<TData, TValue> = ColumnDef<ProcessedDataRow<TData>, TValue>;
+
+export type TableColumn<TData, TValue> = ColumnDef<TData, TValue> & {
+ accessorKey?: string | number;
+ meta?: {
+ /** Column width as a percentage (1-100). Used for proportional column sizing. */
+ width?: number;
+ /** Fixed column size in pixels (e.g., '150px'). Takes precedence over width percentage. */
+ size?: string | number;
+ /** Fixed column size for mobile screens. Falls back to size if not specified. */
+ mobileSize?: string | number;
+ /** Minimum width for the column (e.g., '80px'). */
+ minWidth?: string | number;
+ /** Priority for flexible column width distribution. Higher priority = more space. Default is 1. */
+ priority?: number;
+ /** Additional CSS classes to apply to the column cells and header. */
+ className?: string;
+ /**
+ * When true, this column will be hidden on mobile devices (viewport < 768px).
+ * This is useful for hiding less critical information on smaller screens.
+ *
+ * **Usage Example:**
+ * ```typescript
+ * {
+ * accessorKey: 'createdAt',
+ * header: 'Date Created',
+ * cell: ({ row }) => formatDate(row.original.createdAt),
+ * meta: {
+ * desktopOnly: true, // Hide this column on mobile
+ * width: 20,
+ * className: 'min-w-[6rem]'
+ * }
+ * }
+ * ```
+ *
+ * The column will be completely hidden including:
+ * - Header cell
+ * - Data cells
+ * - Skeleton loading cells
+ */
+ desktopOnly?: boolean;
+ /**
+ * When true, this column's cells will use `<th scope="row">` instead of `<td>`.
+ * This is important for accessibility as it marks the cell as a row header,
+ * providing context for screen readers about what each row represents.
+ *
+ * Typically the first column (e.g., name, title) should be marked as a row header.
+ *
+ * **Usage Example:**
+ * ```typescript
+ * {
+ * accessorKey: 'title',
+ * header: 'Conversation Name',
+ * cell: ({ row }) => row.original.title,
+ * meta: {
+ * isRowHeader: true // Mark this column as row headers
+ * }
+ * }
+ * ```
+ */
+ isRowHeader?: boolean;
+ };
+};
+
+export interface DataTableConfig {
+ selection?: {
+ enableRowSelection?: boolean;
+ showCheckboxes?: boolean;
+ };
+ search?: {
+ enableSearch?: boolean;
+ debounce?: number;
+ filterColumn?: string;
+ };
+ skeleton?: {
+ count?: number;
+ };
+ virtualization?: {
+ overscan?: number;
+ minRows?: number;
+ rowHeight?: number;
+ fastOverscanMultiplier?: number;
+ };
+ pinning?: {
+ enableColumnPinning?: boolean;
+ };
+}
+
+export interface DataTableProps<TData extends Record<string, unknown>, TValue> {
+ columns: TableColumn<TData, TValue>[];
+ data: TData[];
+ className?: string;
+ isLoading?: boolean;
+ isFetching?: boolean;
+ config?: DataTableConfig;
+ onDelete?: (selectedRows: TData[]) => Promise<void>;
+ filterValue?: string;
+ onFilterChange?: (value: string) => void;
+ defaultSort?: SortingState;
+ isFetchingNextPage?: boolean;
+ hasNextPage?: boolean;
+ fetchNextPage?: () => Promise<unknown>;
+ sorting?: SortingState;
+ onSortingChange?: (updater: SortingState | ((old: SortingState) => SortingState)) => void;
+ conversationIndex?: number;
+ customActionsRenderer?: (params: {
+ selectedCount: number;
+ selectedRows: TData[];
+ table: Table<ProcessedDataRow<TData>>;
+ }) => React.ReactNode;
+}
+
+export interface DataTableSearchProps {
+ value: string;
+ onChange: (value: string) => void;
+ placeholder?: string;
+ className?: string;
+ disabled?: boolean;
+}
diff --git a/packages/client/src/components/DataTable/DataTableComponents.spec.tsx b/packages/client/src/components/DataTable/DataTableComponents.spec.tsx
new file mode 100644
index 0000000000..735df57d2c
--- /dev/null
+++ b/packages/client/src/components/DataTable/DataTableComponents.spec.tsx
@@ -0,0 +1,362 @@
+import React from 'react';
+import { render, screen, fireEvent } from '@testing-library/react';
+import { SelectionCheckbox, SkeletonRows } from './DataTableComponents';
+import type { TableColumn } from './DataTable.types';
+
+// Mock the cn utility
+jest.mock('~/utils', () => ({
+ cn: (...classes: (string | undefined | boolean)[]) => classes.filter(Boolean).join(' '),
+ logger: {
+ log: jest.fn(),
+ warn: jest.fn(),
+ error: jest.fn(),
+ },
+}));
+
+// Mock the Checkbox component
+jest.mock('../Checkbox', () => ({
+ Checkbox: ({
+ checked,
+ onCheckedChange,
+ 'aria-label': ariaLabel,
+ }: {
+ checked: boolean;
+ onCheckedChange: (value: boolean) => void;
+ 'aria-label': string;
+ }) => (
+ <input
+ type="checkbox"
+ checked={checked}
+ onChange={(e) => onCheckedChange(e.target.checked)}
+ aria-label={ariaLabel}
+ data-testid="checkbox-input"
+ />
+ ),
+}));
+
+// Mock the Skeleton component
+jest.mock('../Skeleton', () => ({
+ Skeleton: ({ className }: { className?: string }) => (
+ <div data-testid="skeleton" className={className} />
+ ),
+}));
+
+// Mock the Table components
+jest.mock('../Table', () => ({
+ TableCell: ({
+ children,
+ className,
+ style,
+ }: {
+ children?: React.ReactNode;
+ className?: string;
+ style?: React.CSSProperties;
+ }) => (
+ <td data-testid="table-cell" className={className} style={style}>
+ {children}
+ </td>
+ ),
+ TableRow: ({
+ children,
+ className,
+ 'data-state': dataState,
+ 'data-index': dataIndex,
+ style,
+ }: {
+ children?: React.ReactNode;
+ className?: string;
+ 'data-state'?: string;
+ 'data-index'?: number;
+ style?: React.CSSProperties;
+ }) => (
+ <tr
+ data-testid="table-row"
+ className={className}
+ data-state={dataState}
+ data-index={dataIndex}
+ style={style}
+ >
+ {children}
+ </tr>
+ ),
+ TableRowHeader: ({
+ children,
+ className,
+ style,
+ }: {
+ children?: React.ReactNode;
+ className?: string;
+ style?: React.CSSProperties;
+ }) => (
+ <th data-testid="table-row-header" className={className} style={style}>
+ {children}
+ </th>
+ ),
+}));
+
+describe('DataTableComponents', () => {
+ describe('SelectionCheckbox', () => {
+ it('should render checkbox with correct aria-label', () => {
+ render(<SelectionCheckbox checked={false} onChange={jest.fn()} ariaLabel="Select row 1" />);
+
+ const checkbox = screen.getByRole('checkbox');
+ expect(checkbox).toHaveAttribute('aria-label', 'Select row 1');
+ });
+
+ it('should render in checked state', () => {
+ render(<SelectionCheckbox checked={true} onChange={jest.fn()} ariaLabel="Select row" />);
+
+ const checkbox = screen.getByRole('checkbox');
+ expect(checkbox).toBeChecked();
+ });
+
+ it('should render in unchecked state', () => {
+ render(<SelectionCheckbox checked={false} onChange={jest.fn()} ariaLabel="Select row" />);
+
+ const checkbox = screen.getByRole('checkbox');
+ expect(checkbox).not.toBeChecked();
+ });
+
+ it('should call onChange when clicked', () => {
+ const mockOnChange = jest.fn();
+ render(<SelectionCheckbox checked={false} onChange={mockOnChange} ariaLabel="Select row" />);
+
+ const wrapper = screen.getByRole('button');
+ fireEvent.click(wrapper);
+
+ expect(mockOnChange).toHaveBeenCalledWith(true);
+ });
+
+ it('should call onChange with false when unchecking', () => {
+ const mockOnChange = jest.fn();
+ render(<SelectionCheckbox checked={true} onChange={mockOnChange} ariaLabel="Select row" />);
+
+ const wrapper = screen.getByRole('button');
+ fireEvent.click(wrapper);
+
+ expect(mockOnChange).toHaveBeenCalledWith(false);
+ });
+
+ it('should trigger onChange on Enter key', () => {
+ const mockOnChange = jest.fn();
+ render(<SelectionCheckbox checked={false} onChange={mockOnChange} ariaLabel="Select row" />);
+
+ const wrapper = screen.getByRole('button');
+ fireEvent.keyDown(wrapper, { key: 'Enter' });
+
+ expect(mockOnChange).toHaveBeenCalledWith(true);
+ });
+
+ it('should trigger onChange on Space key', () => {
+ const mockOnChange = jest.fn();
+ render(<SelectionCheckbox checked={false} onChange={mockOnChange} ariaLabel="Select row" />);
+
+ const wrapper = screen.getByRole('button');
+ fireEvent.keyDown(wrapper, { key: ' ' });
+
+ expect(mockOnChange).toHaveBeenCalledWith(true);
+ });
+
+ it('should not trigger onChange on other keys', () => {
+ const mockOnChange = jest.fn();
+ render(<SelectionCheckbox checked={false} onChange={mockOnChange} ariaLabel="Select row" />);
+
+ const wrapper = screen.getByRole('button');
+ fireEvent.keyDown(wrapper, { key: 'a' });
+ fireEvent.keyDown(wrapper, { key: 'Tab' });
+ fireEvent.keyDown(wrapper, { key: 'Escape' });
+
+ expect(mockOnChange).not.toHaveBeenCalled();
+ });
+
+ it('should stop event propagation on click', () => {
+ const mockOnChange = jest.fn();
+ const mockParentClick = jest.fn();
+
+ render(
+ <div onClick={mockParentClick}>
+ <SelectionCheckbox checked={false} onChange={mockOnChange} ariaLabel="Select row" />
+ </div>,
+ );
+
+ const wrapper = screen.getByRole('button');
+ fireEvent.click(wrapper);
+
+ expect(mockOnChange).toHaveBeenCalled();
+ expect(mockParentClick).not.toHaveBeenCalled();
+ });
+
+ it('should stop event propagation on keydown', () => {
+ const mockOnChange = jest.fn();
+ const mockParentKeyDown = jest.fn();
+
+ render(
+ <div onKeyDown={mockParentKeyDown}>
+ <SelectionCheckbox checked={false} onChange={mockOnChange} ariaLabel="Select row" />
+ </div>,
+ );
+
+ const wrapper = screen.getByRole('button');
+ fireEvent.keyDown(wrapper, { key: 'Enter' });
+
+ expect(mockOnChange).toHaveBeenCalled();
+ expect(mockParentKeyDown).not.toHaveBeenCalled();
+ });
+
+ it('should have tabIndex 0 for keyboard accessibility', () => {
+ render(<SelectionCheckbox checked={false} onChange={jest.fn()} ariaLabel="Select row" />);
+
+ const wrapper = screen.getByRole('button');
+ expect(wrapper).toHaveAttribute('tabindex', '0');
+ });
+ });
+
+ describe('SkeletonRows', () => {
+ const createTestColumns = () =>
+ [
+ { accessorKey: 'name', header: 'Name' },
+ { accessorKey: 'status', header: 'Status' },
+ ] as TableColumn<Record<string, unknown>, unknown>[];
+
+ it('should render correct number of skeleton rows', () => {
+ const columns = createTestColumns();
+ render(
+ <table>
+ <tbody>
+ <SkeletonRows count={5} columns={columns} />
+ </tbody>
+ </table>,
+ );
+
+ const rows = screen.getAllByTestId('table-row');
+ expect(rows).toHaveLength(5);
+ });
+
+ it('should use default count of 10 when not provided', () => {
+ const columns = createTestColumns();
+ render(
+ <table>
+ <tbody>
+ <SkeletonRows columns={columns} />
+ </tbody>
+ </table>,
+ );
+
+ const rows = screen.getAllByTestId('table-row');
+ expect(rows).toHaveLength(10);
+ });
+
+ it('should render skeleton for each column', () => {
+ const columns = createTestColumns();
+ render(
+ <table>
+ <tbody>
+ <SkeletonRows count={1} columns={columns} />
+ </tbody>
+ </table>,
+ );
+
+ const skeletons = screen.getAllByTestId('skeleton');
+ expect(skeletons).toHaveLength(2); // One per column
+ });
+
+ it('should apply desktopOnly class to column cells', () => {
+ const columns = [
+ { accessorKey: 'name', header: 'Name' },
+ { accessorKey: 'status', header: 'Status', meta: { desktopOnly: true } },
+ ] as TableColumn<Record<string, unknown>, unknown>[];
+
+ render(
+ <table>
+ <tbody>
+ <SkeletonRows count={1} columns={columns} />
+ </tbody>
+ </table>,
+ );
+
+ const cells = screen.getAllByTestId('table-cell');
+ // Second cell should have desktopOnly class
+ expect(cells[1]).toHaveClass('hidden');
+ expect(cells[1]).toHaveClass('md:table-cell');
+ });
+
+ it('should apply custom className from column meta', () => {
+ const columns = [
+ { accessorKey: 'name', header: 'Name', meta: { className: 'custom-class' } },
+ ] as TableColumn<Record<string, unknown>, unknown>[];
+
+ render(
+ <table>
+ <tbody>
+ <SkeletonRows count={1} columns={columns} />
+ </tbody>
+ </table>,
+ );
+
+ const cell = screen.getByTestId('table-cell');
+ expect(cell).toHaveClass('custom-class');
+ });
+
+ it('should generate unique keys for each row', () => {
+ const columns = createTestColumns();
+ const { container } = render(
+ <table>
+ <tbody>
+ <SkeletonRows count={3} columns={columns} />
+ </tbody>
+ </table>,
+ );
+
+ // Verify no duplicate keys warning (React would warn in console)
+ const rows = container.querySelectorAll('tr');
+ expect(rows).toHaveLength(3);
+ });
+
+ it('should handle columns with id instead of accessorKey', () => {
+ const columns: TableColumn<Record<string, unknown>, unknown>[] = [
+ { id: 'custom-id', header: 'Custom Column' },
+ ];
+
+ render(
+ <table>
+ <tbody>
+ <SkeletonRows count={1} columns={columns} />
+ </tbody>
+ </table>,
+ );
+
+ const cells = screen.getAllByTestId('table-cell');
+ expect(cells).toHaveLength(1);
+ });
+
+ it('should handle zero count', () => {
+ const columns = createTestColumns();
+ render(
+ <table>
+ <tbody>
+ <SkeletonRows count={0} columns={columns} />
+ </tbody>
+ </table>,
+ );
+
+ const rows = screen.queryAllByTestId('table-row');
+ expect(rows).toHaveLength(0);
+ });
+
+ it('should handle empty columns array', () => {
+ render(
+ <table>
+ <tbody>
+ <SkeletonRows count={3} columns={[]} />
+ </tbody>
+ </table>,
+ );
+
+ const rows = screen.getAllByTestId('table-row');
+ expect(rows).toHaveLength(3);
+ // Rows should have no cells
+ const cells = screen.queryAllByTestId('table-cell');
+ expect(cells).toHaveLength(0);
+ });
+ });
+});
diff --git a/packages/client/src/components/DataTable/DataTableComponents.tsx b/packages/client/src/components/DataTable/DataTableComponents.tsx
new file mode 100644
index 0000000000..d058ad409b
--- /dev/null
+++ b/packages/client/src/components/DataTable/DataTableComponents.tsx
@@ -0,0 +1,168 @@
+import React, { memo, forwardRef } from 'react';
+import { flexRender } from '@tanstack/react-table';
+import type { TableColumn } from './DataTable.types';
+import type { Row } from '@tanstack/react-table';
+import { TableCell, TableRow, TableRowHeader } from '../Table';
+import { Checkbox } from '../Checkbox';
+import { Skeleton } from '../Skeleton';
+import { cn } from '~/utils';
+
+export const SelectionCheckbox = memo(
+ ({
+ checked,
+ onChange,
+ ariaLabel,
+ }: {
+ checked: boolean;
+ onChange: (value: boolean) => void;
+ ariaLabel: string;
+ }) => (
+ <div
+ role="button"
+ tabIndex={0}
+ onKeyDown={(e) => {
+ if (e.key === 'Enter' || e.key === ' ') {
+ e.preventDefault();
+ onChange(!checked);
+ }
+ e.stopPropagation();
+ }}
+ className="flex h-full w-8 items-center justify-center"
+ onClick={(e) => {
+ e.stopPropagation();
+ onChange(!checked);
+ }}
+ >
+ <Checkbox checked={checked} onCheckedChange={onChange} aria-label={ariaLabel} />
+ </div>
+ ),
+);
+
+SelectionCheckbox.displayName = 'SelectionCheckbox';
+
+interface TableRowComponentProps<TData extends Record<string, unknown>> {
+ row: Row<TData>;
+ virtualIndex?: number;
+ style?: React.CSSProperties;
+ selected: boolean;
+}
+
+// ...existing code...
+const TableRowComponent = <TData extends Record<string, unknown>>(
+ { row, virtualIndex, style, selected }: TableRowComponentProps<TData>,
+ ref: React.Ref<HTMLTableRowElement>,
+) => {
+ // Check if we're on mobile - use window.innerWidth for component-level check
+ const isSmallScreen = typeof window !== 'undefined' && window.innerWidth < 768;
+
+ return (
+ <TableRow
+ ref={ref}
+ data-state={selected ? 'selected' : undefined}
+ data-index={virtualIndex}
+ className="border-none hover:bg-surface-secondary"
+ style={style}
+ >
+ {row.getVisibleCells().map((cell) => {
+ const meta = cell.column.columnDef.meta as
+ | { className?: string; desktopOnly?: boolean; width?: number; isRowHeader?: boolean }
+ | undefined;
+ const isDesktopOnly = meta?.desktopOnly;
+ const isRowHeader = meta?.isRowHeader;
+ const percent = meta?.width;
+ const widthStyle =
+ cell.column.id === 'select'
+ ? { width: '32px', maxWidth: '32px', minWidth: '32px' }
+ : percent
+ ? {
+ width: `${percent}%`,
+ maxWidth: `${percent}%`,
+ minWidth: `${percent}%`, // Don't shrink on mobile
+ }
+ : undefined;
+
+ const CellComponent = isRowHeader ? TableRowHeader : TableCell;
+
+ // For desktop-only columns on mobile, keep them in DOM but visually hidden
+ // This ensures screen readers can still access the content
+ const cellProps =
+ isDesktopOnly && isSmallScreen
+ ? { 'aria-hidden': false as const } // Keep accessible to screen readers
+ : {};
+
+ return (
+ <CellComponent
+ key={cell.id}
+ className={cn(
+ 'max-w-0 truncate px-2 py-2 md:px-3 md:py-3',
+ cell.column.id === 'select' && 'w-8 p-1',
+ meta?.className,
+ isDesktopOnly && 'hidden md:table-cell',
+ )}
+ style={widthStyle}
+ {...cellProps}
+ >
+ {flexRender(cell.column.columnDef.cell, cell.getContext())}
+ </CellComponent>
+ );
+ })}
+ </TableRow>
+ );
+};
+// ...existing code...
+
+type ForwardTableRowComponentType = <TData extends Record<string, unknown>>(
+ props: TableRowComponentProps<TData> & React.RefAttributes<HTMLTableRowElement>,
+) => JSX.Element;
+
+const ForwardTableRowComponent = forwardRef(TableRowComponent) as ForwardTableRowComponentType;
+
+interface GenericRowProps {
+ row: Row<Record<string, unknown>>;
+ virtualIndex?: number;
+ style?: React.CSSProperties;
+ selected: boolean;
+}
+
+export const MemoizedTableRow = memo(
+ ForwardTableRowComponent as (props: GenericRowProps) => JSX.Element,
+ (prev: GenericRowProps, next: GenericRowProps) =>
+ prev.row.original === next.row.original && prev.selected === next.selected,
+);
+
+export const SkeletonRows = memo(
+ <TData extends Record<string, unknown>, TValue>({
+ count = 10,
+ columns,
+ }: {
+ count?: number;
+ columns: TableColumn<TData, TValue>[];
+ }) => (
+ <>
+ {Array.from({ length: count }, (_, index) => (
+ <TableRow key={`skeleton-${index}`} className="h-[56px] border-b border-border-light">
+ {columns.map((column) => {
+ const columnKey = String(
+ column.id ?? ('accessorKey' in column && column.accessorKey) ?? '',
+ );
+ const meta = column.meta as { className?: string; desktopOnly?: boolean } | undefined;
+ return (
+ <TableCell
+ key={columnKey}
+ className={cn(
+ 'px-2 py-2 md:px-3',
+ meta?.className,
+ meta?.desktopOnly && 'hidden md:table-cell',
+ )}
+ >
+ <Skeleton className="h-6 w-full" />
+ </TableCell>
+ );
+ })}
+ </TableRow>
+ ))}
+ </>
+ ),
+);
+
+SkeletonRows.displayName = 'SkeletonRows';
diff --git a/packages/client/src/components/DataTable/DataTableErrorBoundary.spec.tsx b/packages/client/src/components/DataTable/DataTableErrorBoundary.spec.tsx
new file mode 100644
index 0000000000..658fc9f706
--- /dev/null
+++ b/packages/client/src/components/DataTable/DataTableErrorBoundary.spec.tsx
@@ -0,0 +1,311 @@
+import React from 'react';
+import { render, screen, fireEvent } from '@testing-library/react';
+import { DataTableErrorBoundary } from './DataTableErrorBoundary';
+
+// Mock the logger
+jest.mock('~/utils', () => ({
+ logger: {
+ error: jest.fn(),
+ log: jest.fn(),
+ warn: jest.fn(),
+ },
+}));
+
+// Mock lucide-react
+jest.mock('lucide-react', () => ({
+ RefreshCw: ({ className }: { className?: string }) => (
+ <svg data-testid="refresh-icon" className={className} />
+ ),
+}));
+
+// Mock the Button component
+jest.mock('../Button', () => ({
+ Button: ({
+ children,
+ onClick,
+ variant,
+ className,
+ 'aria-label': ariaLabel,
+ }: {
+ children: React.ReactNode;
+ onClick?: () => void;
+ variant?: string;
+ className?: string;
+ 'aria-label'?: string;
+ }) => (
+ <button
+ onClick={onClick}
+ data-variant={variant}
+ className={className}
+ aria-label={ariaLabel}
+ data-testid="retry-button"
+ >
+ {children}
+ </button>
+ ),
+}));
+
+// Component that throws an error
+const ThrowingComponent = ({ shouldThrow }: { shouldThrow: boolean }) => {
+ if (shouldThrow) {
+ throw new Error('Test error message');
+ }
+ return <div data-testid="child-content">Child content</div>;
+};
+
+// Suppress console.error for expected errors during tests
+const originalConsoleError = console.error;
+beforeAll(() => {
+ console.error = jest.fn();
+});
+
+afterAll(() => {
+ console.error = originalConsoleError;
+});
+
+beforeEach(() => {
+ jest.clearAllMocks();
+});
+
+describe('DataTableErrorBoundary', () => {
+ it('should render children when no error', () => {
+ render(
+ <DataTableErrorBoundary>
+ <ThrowingComponent shouldThrow={false} />
+ </DataTableErrorBoundary>,
+ );
+
+ expect(screen.getByTestId('child-content')).toBeInTheDocument();
+ expect(screen.getByText('Child content')).toBeInTheDocument();
+ });
+
+ it('should catch errors and display fallback UI', () => {
+ render(
+ <DataTableErrorBoundary>
+ <ThrowingComponent shouldThrow={true} />
+ </DataTableErrorBoundary>,
+ );
+
+ expect(screen.queryByTestId('child-content')).not.toBeInTheDocument();
+ expect(screen.getByRole('alert')).toBeInTheDocument();
+ });
+
+ it('should show error title', () => {
+ render(
+ <DataTableErrorBoundary>
+ <ThrowingComponent shouldThrow={true} />
+ </DataTableErrorBoundary>,
+ );
+
+ // The title comes from localize which returns the key
+ expect(screen.getByText('com_ui_table_error')).toBeInTheDocument();
+ });
+
+ it('should show error description', () => {
+ render(
+ <DataTableErrorBoundary>
+ <ThrowingComponent shouldThrow={true} />
+ </DataTableErrorBoundary>,
+ );
+
+ expect(screen.getByText('com_ui_table_error_description')).toBeInTheDocument();
+ });
+
+ it('should render retry button', () => {
+ render(
+ <DataTableErrorBoundary>
+ <ThrowingComponent shouldThrow={true} />
+ </DataTableErrorBoundary>,
+ );
+
+ expect(screen.getByTestId('retry-button')).toBeInTheDocument();
+ expect(screen.getByText('com_ui_retry')).toBeInTheDocument();
+ });
+
+ it('should reset error state when retry button is clicked', () => {
+ const { rerender } = render(
+ <DataTableErrorBoundary>
+ <ThrowingComponent shouldThrow={true} />
+ </DataTableErrorBoundary>,
+ );
+
+ // Error state should be shown
+ expect(screen.getByRole('alert')).toBeInTheDocument();
+
+ // First rerender with non-throwing component (error boundary still shows fallback
+ // because it hasn't reset yet)
+ rerender(
+ <DataTableErrorBoundary>
+ <ThrowingComponent shouldThrow={false} />
+ </DataTableErrorBoundary>,
+ );
+
+ // Still showing error (because error boundary hasn't reset)
+ expect(screen.getByRole('alert')).toBeInTheDocument();
+
+ // Click retry to reset error boundary state
+ fireEvent.click(screen.getByTestId('retry-button'));
+
+ // Now children should render without throwing
+ expect(screen.getByTestId('child-content')).toBeInTheDocument();
+ });
+
+ it('should call onError callback with error', () => {
+ const mockOnError = jest.fn();
+
+ render(
+ <DataTableErrorBoundary onError={mockOnError}>
+ <ThrowingComponent shouldThrow={true} />
+ </DataTableErrorBoundary>,
+ );
+
+ expect(mockOnError).toHaveBeenCalledTimes(1);
+ expect(mockOnError).toHaveBeenCalledWith(expect.any(Error));
+ expect(mockOnError.mock.calls[0][0].message).toBe('Test error message');
+ });
+
+ it('should call onReset callback on retry', () => {
+ const mockOnReset = jest.fn();
+
+ render(
+ <DataTableErrorBoundary onReset={mockOnReset}>
+ <ThrowingComponent shouldThrow={true} />
+ </DataTableErrorBoundary>,
+ );
+
+ fireEvent.click(screen.getByTestId('retry-button'));
+
+ expect(mockOnReset).toHaveBeenCalledTimes(1);
+ });
+
+ it('should have proper ARIA attributes on error card', () => {
+ render(
+ <DataTableErrorBoundary>
+ <ThrowingComponent shouldThrow={true} />
+ </DataTableErrorBoundary>,
+ );
+
+ const alertElement = screen.getByRole('alert');
+ expect(alertElement).toHaveAttribute('aria-live', 'assertive');
+ expect(alertElement).toHaveAttribute('aria-labelledby', 'datatable-error-title');
+ expect(alertElement).toHaveAttribute('aria-describedby', 'datatable-error-desc');
+ });
+
+ it('should have proper id on title element', () => {
+ render(
+ <DataTableErrorBoundary>
+ <ThrowingComponent shouldThrow={true} />
+ </DataTableErrorBoundary>,
+ );
+
+ const title = screen.getByText('com_ui_table_error');
+ expect(title).toHaveAttribute('id', 'datatable-error-title');
+ });
+
+ it('should have proper id on description element', () => {
+ render(
+ <DataTableErrorBoundary>
+ <ThrowingComponent shouldThrow={true} />
+ </DataTableErrorBoundary>,
+ );
+
+ const description = screen.getByText('com_ui_table_error_description');
+ expect(description).toHaveAttribute('id', 'datatable-error-desc');
+ });
+
+ it('should render refresh icon in error state', () => {
+ render(
+ <DataTableErrorBoundary>
+ <ThrowingComponent shouldThrow={true} />
+ </DataTableErrorBoundary>,
+ );
+
+ const refreshIcons = screen.getAllByTestId('refresh-icon');
+ expect(refreshIcons.length).toBeGreaterThanOrEqual(1);
+ });
+
+ it('should have aria-label on retry button', () => {
+ render(
+ <DataTableErrorBoundary>
+ <ThrowingComponent shouldThrow={true} />
+ </DataTableErrorBoundary>,
+ );
+
+ const retryButton = screen.getByTestId('retry-button');
+ expect(retryButton).toHaveAttribute('aria-label', 'Retry loading table');
+ });
+
+ it('should render with outline variant button', () => {
+ render(
+ <DataTableErrorBoundary>
+ <ThrowingComponent shouldThrow={true} />
+ </DataTableErrorBoundary>,
+ );
+
+ const retryButton = screen.getByTestId('retry-button');
+ expect(retryButton).toHaveAttribute('data-variant', 'outline');
+ });
+
+ it('should handle multiple consecutive errors', () => {
+ const mockOnError = jest.fn();
+
+ const { rerender } = render(
+ <DataTableErrorBoundary onError={mockOnError}>
+ <ThrowingComponent shouldThrow={true} />
+ </DataTableErrorBoundary>,
+ );
+
+ expect(mockOnError).toHaveBeenCalledTimes(1);
+
+ // Reset and throw again
+ fireEvent.click(screen.getByTestId('retry-button'));
+
+ rerender(
+ <DataTableErrorBoundary onError={mockOnError}>
+ <ThrowingComponent shouldThrow={true} />
+ </DataTableErrorBoundary>,
+ );
+
+ // Should have caught the error again
+ expect(screen.getByRole('alert')).toBeInTheDocument();
+ });
+
+ it('should not call onError when no error occurs', () => {
+ const mockOnError = jest.fn();
+
+ render(
+ <DataTableErrorBoundary onError={mockOnError}>
+ <ThrowingComponent shouldThrow={false} />
+ </DataTableErrorBoundary>,
+ );
+
+ expect(mockOnError).not.toHaveBeenCalled();
+ });
+
+ it('should handle children that return null', () => {
+ const NullComponent = () => null;
+
+ render(
+ <DataTableErrorBoundary>
+ <NullComponent />
+ </DataTableErrorBoundary>,
+ );
+
+ // Should not show error state
+ expect(screen.queryByRole('alert')).not.toBeInTheDocument();
+ });
+
+ it('should handle nested children', () => {
+ render(
+ <DataTableErrorBoundary>
+ <div>
+ <span>Nested content</span>
+ <ThrowingComponent shouldThrow={false} />
+ </div>
+ </DataTableErrorBoundary>,
+ );
+
+ expect(screen.getByText('Nested content')).toBeInTheDocument();
+ expect(screen.getByTestId('child-content')).toBeInTheDocument();
+ });
+});
diff --git a/packages/client/src/components/DataTable/DataTableErrorBoundary.tsx b/packages/client/src/components/DataTable/DataTableErrorBoundary.tsx
new file mode 100644
index 0000000000..aa6dd2294f
--- /dev/null
+++ b/packages/client/src/components/DataTable/DataTableErrorBoundary.tsx
@@ -0,0 +1,122 @@
+import { Component, ErrorInfo, ReactNode, createRef } from 'react';
+import { RefreshCw } from 'lucide-react';
+import { Button } from '../Button';
+import { logger } from '~/utils';
+import { useLocalize } from '~/hooks';
+
+/**
+ * Error boundary specifically for DataTable component.
+ * Catches JavaScript errors in the table rendering and provides a fallback UI.
+ * Handles errors from virtualizer, cell renderers, fetch operations, and child components.
+ */
+interface DataTableErrorBoundaryState {
+ hasError: boolean;
+ error?: Error;
+}
+
+interface DataTableErrorBoundaryProps {
+ children: ReactNode;
+ onError?: (error: Error) => void;
+ onReset?: () => void;
+}
+interface DataTableErrorBoundaryInnerProps extends DataTableErrorBoundaryProps {
+ localize: ReturnType<typeof useLocalize>;
+}
+
+class DataTableErrorBoundaryInner extends Component<
+ DataTableErrorBoundaryInnerProps,
+ DataTableErrorBoundaryState
+> {
+ private errorCardRef = createRef<HTMLDivElement>();
+
+ constructor(props: DataTableErrorBoundaryInnerProps) {
+ super(props);
+ this.state = { hasError: false };
+ }
+
+ static getDerivedStateFromError(error: Error): DataTableErrorBoundaryState {
+ return { hasError: true, error };
+ }
+
+ componentDidCatch(error: Error, errorInfo: ErrorInfo) {
+ logger.error('DataTable Error Boundary caught an error:', error, errorInfo);
+ this.props.onError?.(error);
+ }
+
+ componentDidUpdate(
+ _prevProps: DataTableErrorBoundaryInnerProps,
+ prevState: DataTableErrorBoundaryState,
+ ) {
+ if (!prevState.hasError && this.state.hasError && this.errorCardRef.current) {
+ this.errorCardRef.current.focus();
+ }
+ }
+
+ /**
+ * Reset the error state and attempt to re-render the children.
+ * This can be used to retry after a table error (e.g., network retry).
+ */
+ private handleReset = () => {
+ this.setState({ hasError: false, error: undefined });
+ this.props.onReset?.();
+ };
+
+ render() {
+ if (this.state.hasError) {
+ return (
+ <div className="flex h-full w-full flex-col items-center justify-center p-8">
+ <div
+ ref={this.errorCardRef}
+ role="alert"
+ aria-live="assertive"
+ aria-labelledby="datatable-error-title"
+ aria-describedby="datatable-error-desc"
+ tabIndex={-1}
+ className="before:bg-surface-destructive/80 relative w-full max-w-md overflow-hidden rounded-lg border border-border-light bg-surface-primary-alt p-6 shadow-sm outline-none before:absolute before:left-0 before:top-0 before:h-full before:w-1 focus:ring-2 focus:ring-ring focus:ring-offset-2 dark:border-border-medium dark:bg-surface-secondary"
+ >
+ <div className="flex items-center gap-2">
+ <RefreshCw className="h-4 w-4 text-surface-destructive" />
+ <h3 id="datatable-error-title" className="text-sm font-medium text-text-primary">
+ {this.props.localize('com_ui_table_error')}
+ </h3>
+ </div>
+ <p id="datatable-error-desc" className="mt-2 text-sm text-text-secondary">
+ {this.props.localize('com_ui_table_error_description')}
+ </p>
+ <div className="mt-4 flex justify-center">
+ <Button
+ variant="outline"
+ onClick={this.handleReset}
+ className="flex items-center gap-2 px-3 py-1.5 text-sm hover:bg-surface-hover dark:hover:bg-surface-active"
+ aria-label="Retry loading table"
+ >
+ <RefreshCw className="h-3 w-3" />
+ {this.props.localize('com_ui_retry')}
+ </Button>
+ </div>
+ </div>
+
+ {import.meta.env.MODE === 'development' && this.state.error && (
+ <details className="mt-4 max-w-md rounded-md bg-surface-secondary p-3 text-xs dark:bg-surface-tertiary">
+ <summary className="cursor-pointer font-medium text-text-primary">
+ {this.props.localize('com_ui_error_details')}
+ </summary>
+ <pre className="mt-2 whitespace-pre-wrap text-text-secondary">
+ {this.state.error.message}
+ </pre>
+ </details>
+ )}
+ </div>
+ );
+ }
+
+ return this.props.children;
+ }
+}
+
+export function DataTableErrorBoundary(props: DataTableErrorBoundaryProps) {
+ const localize = useLocalize();
+ return <DataTableErrorBoundaryInner {...props} localize={localize} />;
+}
+
+export default DataTableErrorBoundary;
diff --git a/packages/client/src/components/DataTable/DataTableSearch.spec.tsx b/packages/client/src/components/DataTable/DataTableSearch.spec.tsx
new file mode 100644
index 0000000000..8173dd8f9f
--- /dev/null
+++ b/packages/client/src/components/DataTable/DataTableSearch.spec.tsx
@@ -0,0 +1,178 @@
+import React from 'react';
+import { render, screen, fireEvent } from '@testing-library/react';
+import { DataTableSearch } from './DataTableSearch';
+
+// Mock the cn utility
+jest.mock('~/utils', () => ({
+ cn: (...classes: (string | undefined | boolean)[]) => classes.filter(Boolean).join(' '),
+}));
+
+// Mock the Input component
+
+jest.mock('../Input', () => {
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
+ const ReactModule = require('react');
+ return {
+ Input: ReactModule.forwardRef(function MockInput(
+ props: {
+ id?: string;
+ value?: string;
+ onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
+ disabled?: boolean;
+ 'aria-label'?: string;
+ 'aria-describedby'?: string;
+ placeholder?: string;
+ className?: string;
+ },
+ ref: React.Ref<HTMLInputElement>,
+ ) {
+ return ReactModule.createElement('input', {
+ ref,
+ id: props.id,
+ value: props.value,
+ onChange: props.onChange,
+ disabled: props.disabled,
+ 'aria-label': props['aria-label'],
+ 'aria-describedby': props['aria-describedby'],
+ placeholder: props.placeholder,
+ className: props.className,
+ 'data-testid': 'search-input',
+ });
+ }),
+ };
+});
+
+describe('DataTableSearch', () => {
+ it('should render input with correct placeholder', () => {
+ render(<DataTableSearch value="" onChange={jest.fn()} placeholder="Search items..." />);
+
+ const input = screen.getByTestId('search-input');
+ expect(input).toHaveAttribute('placeholder', 'Search items...');
+ });
+
+ it('should render with default placeholder when not provided', () => {
+ render(<DataTableSearch value="" onChange={jest.fn()} />);
+
+ const input = screen.getByTestId('search-input');
+ // Default placeholder is from localize function which returns the key
+ expect(input).toHaveAttribute('placeholder', 'com_ui_search');
+ });
+
+ it('should display the current value', () => {
+ render(<DataTableSearch value="test query" onChange={jest.fn()} />);
+
+ const input = screen.getByTestId('search-input');
+ expect(input).toHaveValue('test query');
+ });
+
+ it('should call onChange when user types', () => {
+ const mockOnChange = jest.fn();
+ render(<DataTableSearch value="" onChange={mockOnChange} />);
+
+ const input = screen.getByTestId('search-input');
+ fireEvent.change(input, { target: { value: 'new search' } });
+
+ expect(mockOnChange).toHaveBeenCalledWith('new search');
+ });
+
+ it('should have accessible label (sr-only)', () => {
+ render(<DataTableSearch value="" onChange={jest.fn()} />);
+
+ // The label should be present but visually hidden (sr-only class)
+ const label = screen.getByText('com_ui_search_table');
+ expect(label).toHaveClass('sr-only');
+ });
+
+ it('should have aria-label on input', () => {
+ render(<DataTableSearch value="" onChange={jest.fn()} />);
+
+ const input = screen.getByTestId('search-input');
+ expect(input).toHaveAttribute('aria-label', 'com_ui_search_table');
+ });
+
+ it('should have aria-describedby linking to description', () => {
+ render(<DataTableSearch value="" onChange={jest.fn()} />);
+
+ const input = screen.getByTestId('search-input');
+ expect(input).toHaveAttribute('aria-describedby', 'search-description');
+
+ // Description should be present
+ const description = screen.getByText('com_ui_search_table_description');
+ expect(description).toHaveAttribute('id', 'search-description');
+ expect(description).toHaveClass('sr-only');
+ });
+
+ it('should respect disabled prop', () => {
+ render(<DataTableSearch value="" onChange={jest.fn()} disabled={true} />);
+
+ const input = screen.getByTestId('search-input');
+ expect(input).toBeDisabled();
+ });
+
+ it('should not be disabled by default', () => {
+ render(<DataTableSearch value="" onChange={jest.fn()} />);
+
+ const input = screen.getByTestId('search-input');
+ expect(input).not.toBeDisabled();
+ });
+
+ it('should apply custom className', () => {
+ render(<DataTableSearch value="" onChange={jest.fn()} className="custom-class" />);
+
+ const input = screen.getByTestId('search-input');
+ expect(input.className).toContain('custom-class');
+ });
+
+ it('should apply default styling classes', () => {
+ render(<DataTableSearch value="" onChange={jest.fn()} />);
+
+ const input = screen.getByTestId('search-input');
+ expect(input.className).toContain('h-10');
+ expect(input.className).toContain('bg-surface-secondary');
+ });
+
+ it('should have correct id for label association', () => {
+ render(<DataTableSearch value="" onChange={jest.fn()} />);
+
+ const input = screen.getByTestId('search-input');
+ const label = screen.getByText('com_ui_search_table');
+
+ expect(input).toHaveAttribute('id', 'table-search');
+ expect(label).toHaveAttribute('for', 'table-search');
+ });
+
+ it('should handle empty string onChange', () => {
+ const mockOnChange = jest.fn();
+ render(<DataTableSearch value="existing" onChange={mockOnChange} />);
+
+ const input = screen.getByTestId('search-input');
+ fireEvent.change(input, { target: { value: '' } });
+
+ expect(mockOnChange).toHaveBeenCalledWith('');
+ });
+
+ it('should handle special characters in search', () => {
+ const mockOnChange = jest.fn();
+ render(<DataTableSearch value="" onChange={mockOnChange} />);
+
+ const input = screen.getByTestId('search-input');
+ fireEvent.change(input, { target: { value: 'test@#$%^&*()' } });
+
+ expect(mockOnChange).toHaveBeenCalledWith('test@#$%^&*()');
+ });
+
+ it('should handle long text input', () => {
+ const mockOnChange = jest.fn();
+ const longText = 'a'.repeat(1000);
+ render(<DataTableSearch value="" onChange={mockOnChange} />);
+
+ const input = screen.getByTestId('search-input');
+ fireEvent.change(input, { target: { value: longText } });
+
+ expect(mockOnChange).toHaveBeenCalledWith(longText);
+ });
+
+ it('should be memoized (displayName check)', () => {
+ expect(DataTableSearch.displayName).toBe('DataTableSearch');
+ });
+});
diff --git a/packages/client/src/components/DataTable/DataTableSearch.tsx b/packages/client/src/components/DataTable/DataTableSearch.tsx
new file mode 100644
index 0000000000..30ced61cbe
--- /dev/null
+++ b/packages/client/src/components/DataTable/DataTableSearch.tsx
@@ -0,0 +1,37 @@
+import { memo } from 'react';
+import { startTransition } from 'react';
+import type { DataTableSearchProps } from './DataTable.types';
+import { useLocalize } from '~/hooks';
+import { Input } from '../Input';
+import { cn } from '~/utils';
+
+export const DataTableSearch = memo(
+ ({ value, onChange, placeholder, className, disabled = false }: DataTableSearchProps) => {
+ const localize = useLocalize();
+
+ return (
+ <div className="relative flex-1">
+ <label htmlFor="table-search" className="sr-only">
+ {localize('com_ui_search_table')}
+ </label>
+ <Input
+ id="table-search"
+ value={value}
+ onChange={(e) => {
+ startTransition(() => onChange(e.target.value));
+ }}
+ disabled={disabled}
+ aria-label={localize('com_ui_search_table')}
+ aria-describedby="search-description"
+ placeholder={placeholder || localize('com_ui_search')}
+ className={cn('h-10 rounded-b-none border-0 bg-surface-secondary md:h-12', className)}
+ />
+ <span id="search-description" className="sr-only">
+ {localize('com_ui_search_table_description')}
+ </span>
+ </div>
+ );
+ },
+);
+
+DataTableSearch.displayName = 'DataTableSearch';
diff --git a/packages/client/src/components/DataTable/index.ts b/packages/client/src/components/DataTable/index.ts
new file mode 100644
index 0000000000..03e6fb62a1
--- /dev/null
+++ b/packages/client/src/components/DataTable/index.ts
@@ -0,0 +1,3 @@
+export { default as DataTable } from './DataTable';
+export * from './DataTable.types';
+// Removed legacy DataTableSettings exports (store/context) as column resizing & dynamic sizing were deprecated.
diff --git a/packages/client/src/components/DataTableColumnHeader.tsx b/packages/client/src/components/DataTableColumnHeader.tsx
deleted file mode 100644
index 368aae2879..0000000000
--- a/packages/client/src/components/DataTableColumnHeader.tsx
+++ /dev/null
@@ -1,73 +0,0 @@
-import { Column } from '@tanstack/react-table';
-import { ArrowDownIcon, ArrowUpIcon, CaretSortIcon, EyeNoneIcon } from '@radix-ui/react-icons';
-import {
- DropdownMenu,
- DropdownMenuContent,
- DropdownMenuItem,
- DropdownMenuSeparator,
- DropdownMenuTrigger,
-} from './DropdownMenu';
-import { useLocalize } from '~/hooks';
-import { Button } from './Button';
-import { cn } from '~/utils';
-
-interface DataTableColumnHeaderProps<TData, TValue> extends React.HTMLAttributes<HTMLDivElement> {
- column: Column<TData, TValue>;
- title: string;
-}
-
-export function DataTableColumnHeader<TData, TValue>({
- column,
- title,
- className = '',
-}: DataTableColumnHeaderProps<TData, TValue>) {
- const localize = useLocalize();
-
- const getSortIcon = () => {
- const sortDirection = column.getIsSorted();
- if (sortDirection === 'desc') {
- return <ArrowDownIcon className="ml-2 h-4 w-4" />;
- }
- if (sortDirection === 'asc') {
- return <ArrowUpIcon className="ml-2 h-4 w-4" />;
- }
- return <CaretSortIcon className="ml-2 h-4 w-4" />;
- };
-
- if (!column.getCanSort()) {
- return <div className={cn(className)}>{title}</div>;
- }
-
- return (
- <div className={cn('flex items-center space-x-2', className)}>
- <DropdownMenu>
- <DropdownMenuTrigger asChild>
- <Button
- variant="ghost"
- size="sm"
- className="-ml-3 h-8 data-[state=open]:bg-accent"
- aria-label={localize('com_ui_filter_by', { title })}
- >
- <span>{title}</span>
- {getSortIcon()}
- </Button>
- </DropdownMenuTrigger>
- <DropdownMenuContent align="start" className="z-[1001]">
- <DropdownMenuItem onClick={() => column.toggleSorting(false)}>
- <ArrowUpIcon className="mr-2 h-3.5 w-3.5 text-muted-foreground/70" />
- Asc
- </DropdownMenuItem>
- <DropdownMenuItem onClick={() => column.toggleSorting(true)}>
- <ArrowDownIcon className="mr-2 h-3.5 w-3.5 text-muted-foreground/70" />
- Desc
- </DropdownMenuItem>
- <DropdownMenuSeparator />
- <DropdownMenuItem onClick={() => column.toggleVisibility(false)}>
- <EyeNoneIcon className="mr-2 h-3.5 w-3.5 text-muted-foreground/70" />
- Hide
- </DropdownMenuItem>
- </DropdownMenuContent>
- </DropdownMenu>
- </div>
- );
-}
diff --git a/packages/client/src/components/DialogTemplate.spec.tsx b/packages/client/src/components/DialogTemplate.spec.tsx
index fedc4282ec..b7e80f68d2 100644
--- a/packages/client/src/components/DialogTemplate.spec.tsx
+++ b/packages/client/src/components/DialogTemplate.spec.tsx
@@ -1,6 +1,5 @@
-import 'test/matchMedia.mock';
import { render, fireEvent } from '@testing-library/react';
-import '@testing-library/jest-dom/extend-expect';
+import '@testing-library/jest-dom';
import DialogTemplate from './DialogTemplate';
import { Dialog } from '@radix-ui/react-dialog';
import { Provider } from 'jotai';
@@ -39,7 +38,8 @@ describe('DialogTemplate', () => {
expect(getByText('Main Content')).toBeInTheDocument();
expect(getByText('Button')).toBeInTheDocument();
expect(getByText('Left Button')).toBeInTheDocument();
- expect(getByText('Cancel')).toBeInTheDocument();
+ // Cancel text is hardcoded in DialogTemplate as 'cancel'
+ expect(getByText('cancel')).toBeInTheDocument();
expect(getByText('Select')).toBeInTheDocument();
});
@@ -60,7 +60,7 @@ describe('DialogTemplate', () => {
expect(queryByText('Main Content')).not.toBeInTheDocument();
expect(queryByText('Button')).not.toBeInTheDocument();
expect(queryByText('Left Button')).not.toBeInTheDocument();
- expect(queryByText('Cancel')).not.toBeInTheDocument();
+ expect(queryByText('cancel')).not.toBeInTheDocument();
expect(queryByText('Select')).not.toBeInTheDocument();
});
diff --git a/packages/client/src/components/MultiSelect.tsx b/packages/client/src/components/MultiSelect.tsx
index 66efe92b1a..fa84b6031d 100644
--- a/packages/client/src/components/MultiSelect.tsx
+++ b/packages/client/src/components/MultiSelect.tsx
@@ -1,4 +1,4 @@
-import React, { useRef } from 'react';
+import React, { useRef, useState } from 'react';
import {
Select,
SelectArrow,
@@ -86,6 +86,7 @@ export default function MultiSelect<T extends string>({
renderItemContent,
}: MultiSelectProps<T>) {
const selectRef = useRef<HTMLButtonElement>(null);
+ const [isPopoverOpen, setIsPopoverOpen] = useState(false);
const handleValueChange = (values: T[]) => {
setSelectedValues(values);
@@ -96,7 +97,12 @@ export default function MultiSelect<T extends string>({
return (
<div className={className}>
- <SelectProvider value={selectedValues} setValue={handleValueChange}>
+ <SelectProvider
+ value={selectedValues}
+ setValue={handleValueChange}
+ open={isPopoverOpen}
+ setOpen={setIsPopoverOpen}
+ >
{label && (
<SelectLabel className={cn('mb-1 block text-sm text-text-primary', labelClassName)}>
{label}
@@ -117,7 +123,12 @@ export default function MultiSelect<T extends string>({
<span className="mr-auto hidden truncate md:block">
{renderSelectedValues(selectedValues, placeholder, items)}
</span>
- <SelectArrow className="ml-1 hidden stroke-1 text-base opacity-75 md:block" />
+ <SelectArrow
+ className={cn(
+ 'ml-1 hidden stroke-1 text-base opacity-75 transition-transform duration-300 md:block',
+ isPopoverOpen && 'rotate-180',
+ )}
+ />
</Select>
<SelectPopover
gutter={4}
diff --git a/packages/client/src/components/SplitText.spec.tsx b/packages/client/src/components/SplitText.spec.tsx
index 3f8a8e49ae..daf6419bc9 100644
--- a/packages/client/src/components/SplitText.spec.tsx
+++ b/packages/client/src/components/SplitText.spec.tsx
@@ -1,19 +1,6 @@
import { render } from '@testing-library/react';
import SplitText from './SplitText';
-// Mock IntersectionObserver
-class MockIntersectionObserver {
- observe = jest.fn();
- unobserve = jest.fn();
- disconnect = jest.fn();
-}
-
-Object.defineProperty(window, 'IntersectionObserver', {
- writable: true,
- configurable: true,
- value: MockIntersectionObserver,
-});
-
describe('SplitText', () => {
it('renders emojis correctly', () => {
const emojis = ['🚧', '❤️‍🔥', '💜', '🦎', '❌', '✅', '⚠️'];
diff --git a/packages/client/src/components/Table.tsx b/packages/client/src/components/Table.tsx
index 6dac6d54ff..a14ac3a8ac 100644
--- a/packages/client/src/components/Table.tsx
+++ b/packages/client/src/components/Table.tsx
@@ -1,12 +1,22 @@
import * as React from 'react';
import { cn } from '~/utils';
-const Table = React.forwardRef<HTMLTableElement, React.HTMLAttributes<HTMLTableElement>>(
- ({ className, ...props }, ref) => (
- <div className="relative w-full overflow-auto">
+interface TableProps extends React.HTMLAttributes<HTMLTableElement> {
+ unwrapped?: boolean;
+}
+
+const Table = React.forwardRef<HTMLTableElement, TableProps>(
+ ({ className, unwrapped = false, ...props }, ref) => {
+ const tableElement = (
<table ref={ref} className={cn('w-full caption-bottom text-sm', className)} {...props} />
- </div>
- ),
+ );
+
+ if (unwrapped) {
+ return tableElement;
+ }
+
+ return <div className="relative w-full overflow-auto">{tableElement}</div>;
+ },
);
Table.displayName = 'Table';
@@ -79,6 +89,22 @@ const TableCell = React.forwardRef<
));
TableCell.displayName = 'TableCell';
+const TableRowHeader = React.forwardRef<
+ HTMLTableCellElement,
+ React.ThHTMLAttributes<HTMLTableCellElement>
+>(({ className, ...props }, ref) => (
+ <th
+ ref={ref}
+ scope="row"
+ className={cn(
+ 'p-4 text-left align-middle font-medium [&:has([role=checkbox])]:pr-0',
+ className,
+ )}
+ {...props}
+ />
+));
+TableRowHeader.displayName = 'TableRowHeader';
+
const TableCaption = React.forwardRef<
HTMLTableCaptionElement,
React.HTMLAttributes<HTMLTableCaptionElement>
@@ -87,4 +113,14 @@ const TableCaption = React.forwardRef<
));
TableCaption.displayName = 'TableCaption';
-export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption };
+export {
+ Table,
+ TableHeader,
+ TableBody,
+ TableFooter,
+ TableHead,
+ TableRow,
+ TableCell,
+ TableRowHeader,
+ TableCaption,
+};
diff --git a/packages/client/src/components/index.ts b/packages/client/src/components/index.ts
index d1de8a8530..5f37ae25fc 100644
--- a/packages/client/src/components/index.ts
+++ b/packages/client/src/components/index.ts
@@ -4,7 +4,6 @@ export * from './AlertDialog';
export * from './Breadcrumb';
export * from './Button';
export * from './Checkbox';
-export * from './DataTableColumnHeader';
export * from './Dialog';
export * from './DropdownMenu';
export * from './HoverCard';
@@ -31,13 +30,13 @@ export * from './InputOTP';
export * from './MultiSearch';
export * from './Resizable';
export * from './Select';
+export * from './DataTable/index';
export { default as Radio } from './Radio';
export { default as Badge } from './Badge';
export { default as Avatar } from './Avatar';
export { default as Combobox } from './Combobox';
export { default as Dropdown } from './Dropdown';
export { default as SplitText } from './SplitText';
-export { default as DataTable } from './DataTable';
export { default as FormInput } from './FormInput';
export { default as PixelCard } from './PixelCard';
export { default as FileUpload } from './FileUpload';
diff --git a/packages/client/src/locales/Translation.spec.ts b/packages/client/src/locales/Translation.spec.ts
index fc3de6e0ef..20f84b343a 100644
--- a/packages/client/src/locales/Translation.spec.ts
+++ b/packages/client/src/locales/Translation.spec.ts
@@ -1,3 +1,6 @@
+// Unmock react-i18next for this test file since we're testing actual i18n functionality
+jest.unmock('react-i18next');
+
import i18n from './i18n';
import English from './en/translation.json';
import French from './fr/translation.json';
@@ -13,23 +16,23 @@ describe('i18next translation tests', () => {
it('should return the correct translation for a valid key in English', () => {
i18n.changeLanguage('en');
- expect(i18n.t('com_ui_examples')).toBe(English.com_ui_examples);
+ expect(i18n.t('com_ui_cancel')).toBe(English.com_ui_cancel);
});
it('should return the correct translation for a valid key in French', () => {
i18n.changeLanguage('fr');
- expect(i18n.t('com_ui_examples')).toBe(French.com_ui_examples);
+ expect(i18n.t('com_ui_cancel')).toBe(French.com_ui_cancel);
});
it('should return the correct translation for a valid key in Spanish', () => {
i18n.changeLanguage('es');
- expect(i18n.t('com_ui_examples')).toBe(Spanish.com_ui_examples);
+ expect(i18n.t('com_ui_cancel')).toBe(Spanish.com_ui_cancel);
});
it('should fallback to English for an invalid language code', () => {
// When an invalid language is provided, i18next should fallback to English
i18n.changeLanguage('invalid-code');
- expect(i18n.t('com_ui_examples')).toBe(English.com_ui_examples);
+ expect(i18n.t('com_ui_cancel')).toBe(English.com_ui_cancel);
});
it('should return the key itself for an invalid key', () => {
@@ -39,9 +42,8 @@ describe('i18next translation tests', () => {
it('should correctly format placeholders in the translation', () => {
i18n.changeLanguage('en');
- expect(i18n.t('com_endpoint_default_with_num', { 0: 'John' })).toBe('default: John');
-
- i18n.changeLanguage('fr');
- expect(i18n.t('com_endpoint_default_with_num', { 0: 'Marie' })).toBe('par défaut : Marie');
+ // The translation uses {count} syntax (not standard i18next {{count}})
+ // Verify i18next returns the template string with the placeholder
+ expect(i18n.t('com_ui_selected_count', { count: 5 })).toBe('{count} selected');
});
});
diff --git a/packages/client/src/locales/en/translation.json b/packages/client/src/locales/en/translation.json
index e0078f519e..086e6c3401 100644
--- a/packages/client/src/locales/en/translation.json
+++ b/packages/client/src/locales/en/translation.json
@@ -4,8 +4,29 @@
"com_ui_delete_selected_items": "Delete selected items",
"com_ui_filter_by": "Filter by {{title}}",
"com_ui_cancel_dialog": "Cancel dialog",
+ "com_ui_no_results_found": "No results found",
+ "com_ui_select_all": "Select All",
+ "com_ui_no_selection": "No selection",
+ "com_ui_confirm_bulk_delete": "Are you sure you want to delete the selected items? This action cannot be undone.",
+ "com_ui_delete_success": "Items deleted successfully",
+ "com_ui_retry": "Retry",
+ "com_ui_selected_count": "{count} selected",
+ "com_ui_data_table": "Data Table",
+ "com_ui_no_data": "No data",
+ "com_ui_delete_selected": "Delete Selected",
+ "com_ui_search": "Search...",
+ "com_ui_search_table": "Search table",
+ "com_ui_search_table_description": "Type to filter results",
+ "com_ui_data_table_scroll_area": "Scrollable data table area",
+ "com_ui_select_row": "Select row {{0}}",
+ "com_ui_loading_more_data": "Loading more data...",
+ "com_ui_no_search_results": "No search results found",
+ "com_ui_table_error": "Table Error",
+ "com_ui_table_error_description": "Table failed to load. Please refresh or try again.",
+ "com_ui_error_details": "Error Details (Dev)",
+ "com_ui_enabled": "Enabled",
+ "com_ui_disabled": "Disabled",
"com_ui_toggle_theme": "Toggle theme",
"com_ui_dark_theme_enabled": "Dark theme enabled",
- "com_ui_light_theme_enabled": "Light theme enabled",
- "com_ui_search": "Search..."
+ "com_ui_light_theme_enabled": "Light theme enabled"
}
diff --git a/packages/client/src/utils/index.ts b/packages/client/src/utils/index.ts
index 94696af633..dfa740defd 100644
--- a/packages/client/src/utils/index.ts
+++ b/packages/client/src/utils/index.ts
@@ -1,2 +1,3 @@
export * from './utils';
export * from './theme';
+export { default as logger } from './logger';
diff --git a/packages/client/src/utils/logger.ts b/packages/client/src/utils/logger.ts
new file mode 100644
index 0000000000..73e4fac5a5
--- /dev/null
+++ b/packages/client/src/utils/logger.ts
@@ -0,0 +1,49 @@
+const isDevelopment = process.env.NODE_ENV === 'development';
+const isLoggerEnabled = process.env.VITE_ENABLE_LOGGER === 'true';
+const loggerFilter = process.env.VITE_LOGGER_FILTER || '';
+
+type LogFunction = (...args: unknown[]) => void;
+
+const createLogFunction = (
+ consoleMethod: LogFunction,
+ type?: 'log' | 'warn' | 'error' | 'info' | 'debug' | 'dir',
+): LogFunction => {
+ return (...args: unknown[]) => {
+ if (isDevelopment || isLoggerEnabled) {
+ const tag = typeof args[0] === 'string' ? args[0] : '';
+ if (shouldLog(tag)) {
+ if (tag && typeof args[1] === 'string' && type === 'error') {
+ consoleMethod(`[${tag}] ${args[1]}`, ...args.slice(2));
+ } else if (tag && args.length > 1) {
+ consoleMethod(`[${tag}]`, ...args.slice(1));
+ } else {
+ consoleMethod(...args);
+ }
+ }
+ }
+ };
+};
+
+const logger = {
+ log: createLogFunction(console.log, 'log'),
+ dir: createLogFunction(console.dir, 'dir'),
+ warn: createLogFunction(console.warn, 'warn'),
+ info: createLogFunction(console.info, 'info'),
+ error: createLogFunction(console.error, 'error'),
+ debug: createLogFunction(console.debug, 'debug'),
+};
+
+function shouldLog(tag: string): boolean {
+ if (!loggerFilter) {
+ return true;
+ }
+ /* If no tag is provided, always log */
+ if (!tag) {
+ return true;
+ }
+ return loggerFilter
+ .split(',')
+ .some((filter) => tag.toLowerCase().includes(filter.trim().toLowerCase()));
+}
+
+export default logger;
diff --git a/packages/client/tsconfig.test.json b/packages/client/tsconfig.test.json
new file mode 100644
index 0000000000..b68969fef5
--- /dev/null
+++ b/packages/client/tsconfig.test.json
@@ -0,0 +1,20 @@
+{
+ "extends": "./tsconfig.json",
+ "compilerOptions": {
+ "rootDir": ".",
+ "noEmit": true,
+ "declaration": false,
+ "declarationMap": false,
+ "declarationDir": null,
+ "outDir": null,
+ "types": ["jest", "node"]
+ },
+ "include": [
+ "src/**/*.spec.ts",
+ "src/**/*.spec.tsx",
+ "src/**/*.test.ts",
+ "src/**/*.test.tsx",
+ "jest.setup.ts"
+ ],
+ "exclude": ["dist", "node_modules"]
+}