@iblai/iblai-js 2.14.0 → 2.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -96763,6 +96763,7 @@ var analyticsAnalyticsCourses$3 = {
96763
96763
  loading: "Loading...",
96764
96764
  colCourseName: "Course Name",
96765
96765
  colCourseId: "Course ID",
96766
+ openCourseAriaLabel: "Open course {id} in a new tab",
96766
96767
  colEnrollments: "Enrollments",
96767
96768
  viewCourseAriaLabel: "View details for {name}",
96768
96769
  goToFirstPage: "Go to first page",
@@ -96815,15 +96816,15 @@ var analyticsAnalyticsFinancialStats$3 = {
96815
96816
  viewTraces: "Traces →",
96816
96817
  costByLLMFooter: "{shown} models · ranked by cost"
96817
96818
  };
96819
+ var analyticsAgentScopeLink$3 = {
96820
+ scopeToAgent: "View analytics for {name}"
96821
+ };
96818
96822
  var analyticsAnalyticsMemoryStats$3 = {
96819
96823
  noPermission: "You do not have permission to view user memories.",
96820
96824
  scopeLabel: "Memory scope",
96821
96825
  scopeMentor: "This Agent",
96822
96826
  scopeAllMentors: "All Agents",
96823
96827
  scopeGlobal: "Global",
96824
- searchAgents: "Search Agents…",
96825
- searchAgentsTitle: "Search Agents",
96826
- clearAgentSearch: "Clear Agent Search",
96827
96828
  contentPlaceholder: "Search memory content",
96828
96829
  pickDateRange: "Pick a Date Range",
96829
96830
  allCategories: "All Categories",
@@ -96968,6 +96969,7 @@ var analyticsAnalyticsPrograms$3 = {
96968
96969
  loading: "Loading...",
96969
96970
  programName: "Program Name",
96970
96971
  programId: "Program ID",
96972
+ openProgramAriaLabel: "Open program {id} in a new tab",
96971
96973
  viewDetailsAriaLabel: "View details for {name}",
96972
96974
  goToFirstPage: "Go to first page",
96973
96975
  goToPreviousPage: "Go to previous page",
@@ -97047,7 +97049,6 @@ var analyticsAnalyticsTranscriptsStats$3 = {
97047
97049
  labelModel: "Model:",
97048
97050
  labelModelCard: "model:",
97049
97051
  labelUser: "User:",
97050
- labelUserId: "user_id:",
97051
97052
  roleUser: "User",
97052
97053
  roleAgent: "Agent",
97053
97054
  noMessages: "No messages in this conversation.",
@@ -102967,6 +102968,7 @@ var en = {
102967
102968
  analyticsAnalyticsCourseDetail: analyticsAnalyticsCourseDetail$3,
102968
102969
  analyticsAnalyticsCourses: analyticsAnalyticsCourses$3,
102969
102970
  analyticsAnalyticsFinancialStats: analyticsAnalyticsFinancialStats$3,
102971
+ analyticsAgentScopeLink: analyticsAgentScopeLink$3,
102970
102972
  analyticsAnalyticsMemoryStats: analyticsAnalyticsMemoryStats$3,
102971
102973
  analyticsAnalyticsMonetizationStats: analyticsAnalyticsMonetizationStats$3,
102972
102974
  analyticsAnalyticsOverview: analyticsAnalyticsOverview$3,
@@ -103914,6 +103916,7 @@ var analyticsAnalyticsCourses$2 = {
103914
103916
  loading: "Chargement...",
103915
103917
  colCourseName: "Nom du cours",
103916
103918
  colCourseId: "ID du cours",
103919
+ openCourseAriaLabel: "Ouvrir le cours {id} dans un nouvel onglet",
103917
103920
  colEnrollments: "Inscriptions",
103918
103921
  viewCourseAriaLabel: "Voir les détails de {name}",
103919
103922
  goToFirstPage: "Aller à la première page",
@@ -103966,15 +103969,15 @@ var analyticsAnalyticsFinancialStats$2 = {
103966
103969
  viewTraces: "Traces →",
103967
103970
  costByLLMFooter: "{shown} modèles · classés par coût"
103968
103971
  };
103972
+ var analyticsAgentScopeLink$2 = {
103973
+ scopeToAgent: "Voir les analyses de {name}"
103974
+ };
103969
103975
  var analyticsAnalyticsMemoryStats$2 = {
103970
103976
  noPermission: "Vous n'avez pas l'autorisation de consulter les mémoires des utilisateurs.",
103971
103977
  scopeLabel: "Portée de la mémoire",
103972
103978
  scopeMentor: "Cet agent",
103973
103979
  scopeAllMentors: "Tous les agents",
103974
103980
  scopeGlobal: "Global",
103975
- searchAgents: "Rechercher des agents…",
103976
- searchAgentsTitle: "Rechercher des agents",
103977
- clearAgentSearch: "Effacer la recherche d'agent",
103978
103981
  contentPlaceholder: "Rechercher dans le contenu des mémoires",
103979
103982
  pickDateRange: "Choisir une plage de dates",
103980
103983
  allCategories: "Toutes les catégories",
@@ -104119,6 +104122,7 @@ var analyticsAnalyticsPrograms$2 = {
104119
104122
  loading: "Chargement...",
104120
104123
  programName: "Nom du programme",
104121
104124
  programId: "ID du programme",
104125
+ openProgramAriaLabel: "Ouvrir le programme {id} dans un nouvel onglet",
104122
104126
  viewDetailsAriaLabel: "Voir les détails de {name}",
104123
104127
  goToFirstPage: "Aller à la première page",
104124
104128
  goToPreviousPage: "Aller à la page précédente",
@@ -104198,7 +104202,6 @@ var analyticsAnalyticsTranscriptsStats$2 = {
104198
104202
  labelModel: "Modèle :",
104199
104203
  labelModelCard: "modèle :",
104200
104204
  labelUser: "Utilisateur :",
104201
- labelUserId: "ID utilisateur :",
104202
104205
  roleUser: "Utilisateur",
104203
104206
  roleAgent: "Agent",
104204
104207
  noMessages: "Aucun message dans cette conversation.",
@@ -110118,6 +110121,7 @@ var fr = {
110118
110121
  analyticsAnalyticsCourseDetail: analyticsAnalyticsCourseDetail$2,
110119
110122
  analyticsAnalyticsCourses: analyticsAnalyticsCourses$2,
110120
110123
  analyticsAnalyticsFinancialStats: analyticsAnalyticsFinancialStats$2,
110124
+ analyticsAgentScopeLink: analyticsAgentScopeLink$2,
110121
110125
  analyticsAnalyticsMemoryStats: analyticsAnalyticsMemoryStats$2,
110122
110126
  analyticsAnalyticsMonetizationStats: analyticsAnalyticsMonetizationStats$2,
110123
110127
  analyticsAnalyticsOverview: analyticsAnalyticsOverview$2,
@@ -111065,6 +111069,7 @@ var analyticsAnalyticsCourses$1 = {
111065
111069
  loading: "Cargando...",
111066
111070
  colCourseName: "Nombre del curso",
111067
111071
  colCourseId: "ID del curso",
111072
+ openCourseAriaLabel: "Abrir el curso {id} en una pestaña nueva",
111068
111073
  colEnrollments: "Inscripciones",
111069
111074
  viewCourseAriaLabel: "Ver detalles de {name}",
111070
111075
  goToFirstPage: "Ir a la primera página",
@@ -111117,15 +111122,15 @@ var analyticsAnalyticsFinancialStats$1 = {
111117
111122
  viewTraces: "Trazas →",
111118
111123
  costByLLMFooter: "{shown} modelos · ordenados por costo"
111119
111124
  };
111125
+ var analyticsAgentScopeLink$1 = {
111126
+ scopeToAgent: "Ver analíticas de {name}"
111127
+ };
111120
111128
  var analyticsAnalyticsMemoryStats$1 = {
111121
111129
  noPermission: "No tienes permiso para ver los recuerdos de los usuarios.",
111122
111130
  scopeLabel: "Alcance de la memoria",
111123
111131
  scopeMentor: "Este agente",
111124
111132
  scopeAllMentors: "Todos los agentes",
111125
111133
  scopeGlobal: "Global",
111126
- searchAgents: "Buscar agentes…",
111127
- searchAgentsTitle: "Buscar agentes",
111128
- clearAgentSearch: "Borrar la búsqueda de agentes",
111129
111134
  contentPlaceholder: "Buscar en el contenido de los recuerdos",
111130
111135
  pickDateRange: "Elige un rango de fechas",
111131
111136
  allCategories: "Todas las categorías",
@@ -111270,6 +111275,7 @@ var analyticsAnalyticsPrograms$1 = {
111270
111275
  loading: "Cargando...",
111271
111276
  programName: "Nombre del programa",
111272
111277
  programId: "ID del programa",
111278
+ openProgramAriaLabel: "Abrir el programa {id} en una pestaña nueva",
111273
111279
  viewDetailsAriaLabel: "Ver detalles de {name}",
111274
111280
  goToFirstPage: "Ir a la primera página",
111275
111281
  goToPreviousPage: "Ir a la página anterior",
@@ -111349,7 +111355,6 @@ var analyticsAnalyticsTranscriptsStats$1 = {
111349
111355
  labelModel: "Modelo:",
111350
111356
  labelModelCard: "modelo:",
111351
111357
  labelUser: "Usuario:",
111352
- labelUserId: "ID de usuario:",
111353
111358
  roleUser: "Usuario",
111354
111359
  roleAgent: "Agente",
111355
111360
  noMessages: "No hay mensajes en esta conversación.",
@@ -117269,6 +117274,7 @@ var es = {
117269
117274
  analyticsAnalyticsCourseDetail: analyticsAnalyticsCourseDetail$1,
117270
117275
  analyticsAnalyticsCourses: analyticsAnalyticsCourses$1,
117271
117276
  analyticsAnalyticsFinancialStats: analyticsAnalyticsFinancialStats$1,
117277
+ analyticsAgentScopeLink: analyticsAgentScopeLink$1,
117272
117278
  analyticsAnalyticsMemoryStats: analyticsAnalyticsMemoryStats$1,
117273
117279
  analyticsAnalyticsMonetizationStats: analyticsAnalyticsMonetizationStats$1,
117274
117280
  analyticsAnalyticsOverview: analyticsAnalyticsOverview$1,
@@ -118216,6 +118222,7 @@ var analyticsAnalyticsCourses = {
118216
118222
  loading: "加载中...",
118217
118223
  colCourseName: "课程名称",
118218
118224
  colCourseId: "课程 ID",
118225
+ openCourseAriaLabel: "在新标签页中打开课程 {id}",
118219
118226
  colEnrollments: "注册人数",
118220
118227
  viewCourseAriaLabel: "查看 {name} 的详情",
118221
118228
  goToFirstPage: "跳转到第一页",
@@ -118268,15 +118275,15 @@ var analyticsAnalyticsFinancialStats = {
118268
118275
  viewTraces: "追踪 →",
118269
118276
  costByLLMFooter: "{shown} 个模型 · 按成本排序"
118270
118277
  };
118278
+ var analyticsAgentScopeLink = {
118279
+ scopeToAgent: "查看 {name} 的分析"
118280
+ };
118271
118281
  var analyticsAnalyticsMemoryStats = {
118272
118282
  noPermission: "您没有查看用户记忆的权限。",
118273
118283
  scopeLabel: "记忆范围",
118274
118284
  scopeMentor: "当前智能体",
118275
118285
  scopeAllMentors: "所有智能体",
118276
118286
  scopeGlobal: "全局",
118277
- searchAgents: "搜索智能体…",
118278
- searchAgentsTitle: "搜索智能体",
118279
- clearAgentSearch: "清除智能体搜索",
118280
118287
  contentPlaceholder: "搜索记忆内容",
118281
118288
  pickDateRange: "选择日期范围",
118282
118289
  allCategories: "所有类别",
@@ -118421,6 +118428,7 @@ var analyticsAnalyticsPrograms = {
118421
118428
  loading: "加载中...",
118422
118429
  programName: "项目名称",
118423
118430
  programId: "项目 ID",
118431
+ openProgramAriaLabel: "在新标签页中打开项目 {id}",
118424
118432
  viewDetailsAriaLabel: "查看 {name} 的详情",
118425
118433
  goToFirstPage: "跳至第一页",
118426
118434
  goToPreviousPage: "跳至上一页",
@@ -118500,7 +118508,6 @@ var analyticsAnalyticsTranscriptsStats = {
118500
118508
  labelModel: "模型:",
118501
118509
  labelModelCard: "模型:",
118502
118510
  labelUser: "用户:",
118503
- labelUserId: "用户 ID:",
118504
118511
  roleUser: "用户",
118505
118512
  roleAgent: "智能体",
118506
118513
  noMessages: "此对话中没有消息。",
@@ -124420,6 +124427,7 @@ var zh = {
124420
124427
  analyticsAnalyticsCourseDetail: analyticsAnalyticsCourseDetail,
124421
124428
  analyticsAnalyticsCourses: analyticsAnalyticsCourses,
124422
124429
  analyticsAnalyticsFinancialStats: analyticsAnalyticsFinancialStats,
124430
+ analyticsAgentScopeLink: analyticsAgentScopeLink,
124423
124431
  analyticsAnalyticsMemoryStats: analyticsAnalyticsMemoryStats,
124424
124432
  analyticsAnalyticsMonetizationStats: analyticsAnalyticsMonetizationStats,
124425
124433
  analyticsAnalyticsOverview: analyticsAnalyticsOverview,
@@ -218122,7 +218130,7 @@ function MultiSearchSelect({ labels, selected, onSelect, onRemove, searchTerm, o
218122
218130
  */
218123
218131
  function useAgentSearch({ tenantKey, query, limit = 6, offset, starred, featured, category, subjects, llm, types, includeMainPublicMentors, orderDirection, skip = false, }) {
218124
218132
  var _a, _b, _c;
218125
- const { data, isLoading, isFetching, refetch } = useGetAiSearchMentorsQuery({
218133
+ const { data, isLoading, isFetching, isUninitialized, refetch } = useGetAiSearchMentorsQuery({
218126
218134
  platform_key: tenantKey,
218127
218135
  query: query || undefined,
218128
218136
  limit,
@@ -218146,6 +218154,7 @@ function useAgentSearch({ tenantKey, query, limit = 6, offset, starred, featured
218146
218154
  totalPages: (_c = data === null || data === void 0 ? void 0 : data.total_pages) !== null && _c !== void 0 ? _c : 0,
218147
218155
  isLoading,
218148
218156
  isFetching,
218157
+ isUninitialized,
218149
218158
  refetch,
218150
218159
  };
218151
218160
  }
@@ -226751,29 +226760,60 @@ function SpendLimitsSection({ tenantKey, labels: labelsOverride }) {
226751
226760
  return (jsxs(Fragment$1, { children: [jsxs("div", { "data-testid": "spend-limits-workspace-section", className: "rounded-lg border border-[#e5e5e5] bg-white shadow-[0_1px_2px_0_rgba(0,0,0,0.05)] dark:bg-zinc-900 dark:border-zinc-800", children: [jsx("div", { className: "flex flex-col gap-2 p-4 sm:flex-row sm:items-start sm:justify-between", children: jsxs("div", { className: "space-y-0.5", children: [jsx("h3", { className: "text-[16px] font-medium leading-6 text-[#101828] dark:text-gray-100", children: labels.tenantSections.workspace.title }), jsx("p", { className: "text-[13px] font-normal leading-5 text-[#4a5565] dark:text-gray-400", children: labels.tenantSections.workspace.description })] }) }), jsx("div", { className: "border-t border-[#e5e7eb] dark:border-zinc-800 px-4 py-3", children: isTenantCapLoading ? (jsx("div", { className: "flex items-center justify-center py-8", "data-testid": "tenant-cap-loading", children: jsx(Spinner, {}) })) : isTenantForbidden ? (jsxs("div", { className: "flex flex-col items-center gap-2 rounded-lg border border-gray-200 bg-gray-50 px-4 py-10 text-center", "data-testid": "spend-limits-denied", children: [jsx(ShieldAlert, { className: "h-6 w-6 text-gray-400" }), jsx("p", { className: "text-sm font-medium text-gray-900", children: labels.denied.title }), jsx("p", { className: "max-w-sm text-xs text-gray-600", children: labels.denied.description })] })) : (jsxs("div", { className: "space-y-4", children: [!tenantCap && (monthlySpend != null || totalSpend != null) && (jsxs("div", { className: "space-y-1", "data-testid": "workspace-actual-spend-stats", children: [jsxs("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [monthlySpend != null && (jsxs("div", { className: "space-y-0.5", children: [jsx("p", { className: "text-[11px] font-medium uppercase tracking-wide text-[#6a7282] dark:text-gray-400", children: labels.tenantSections.noCapStats.spentThisMonth }), jsx("p", { className: "text-[18px] font-semibold leading-6 text-[#101828] dark:text-gray-100", "data-testid": "workspace-actual-spend-month", children: formatUsd$1(String(monthlySpend)) })] })), totalSpend != null && (jsxs("div", { className: "space-y-0.5", children: [jsx("p", { className: "text-[11px] font-medium uppercase tracking-wide text-[#6a7282] dark:text-gray-400", children: labels.tenantSections.noCapStats.spentAllTime }), jsx("p", { className: "text-[18px] font-semibold leading-6 text-[#101828] dark:text-gray-100", "data-testid": "workspace-actual-spend-total", children: formatUsd$1(String(totalSpend)) })] }))] }), jsx("p", { className: "text-[12px] font-normal leading-4 text-[#6a7282] dark:text-gray-500", children: labels.tenantSections.noCapStats.hint })] })), jsx(SpendCapForm, { labels: labels, cap: tenantCap, isSaving: isSavingTenantCap, isDeleting: isDeletingTenantCap, onSave: saveTenantCap, onDelete: () => setIsDeleteOpen(true), testId: "tenant-cap" })] })) })] }), jsx(Dialog, { open: isDeleteOpen, onOpenChange: () => setIsDeleteOpen(false), children: jsxs(DialogContent, { "aria-describedby": "tenant-cap-delete-description", "data-testid": "tenant-cap-delete-modal", children: [jsx(DialogHeader, { children: jsx(DialogTitle, { className: "ibl-dialog-title", children: labels.deleteModal.title }) }), jsx("div", { className: "my-5", id: "tenant-cap-delete-description", children: jsx("p", { className: "text-sm text-[#646464]", children: labels.deleteModal.description }) }), jsxs(DialogFooter, { className: "gap-3", children: [jsx(Button$1, { variant: "outline", onClick: () => setIsDeleteOpen(false), children: labels.deleteModal.cancel }), jsx(Button$1, { className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] text-white hover:opacity-90", onClick: handleConfirmDelete, disabled: isDeletingTenantCap, "data-testid": "tenant-cap-delete-confirm", children: isDeletingTenantCap ? labels.form.removing : labels.deleteModal.confirm })] })] }) })] }));
226752
226761
  }
226753
226762
 
226763
+ /** SPAs whose users have coursework, so the profile leads with a Gradebook tab. */
226764
+ const GRADEBOOK_SPAS = ['lms', 'skills'];
226765
+ /**
226766
+ * The customization `Profile` is opened with: whatever the host passed, with
226767
+ * the Gradebook tab defaulted from the SPA it runs in. An explicit
226768
+ * `showGradebookTab` always wins, so a host can force it either way.
226769
+ */
226770
+ function profileCustomization(customization, currentSPA) {
226771
+ var _a;
226772
+ return {
226773
+ ...customization,
226774
+ showGradebookTab: (_a = customization === null || customization === void 0 ? void 0 : customization.showGradebookTab) !== null && _a !== void 0 ? _a : GRADEBOOK_SPAS.includes((currentSPA !== null && currentSPA !== void 0 ? currentSPA : '').trim().toLowerCase()),
226775
+ };
226776
+ }
226754
226777
  /**
226755
226778
  * The shared `Profile` viewer in a dialog — the same modal the tenant
226756
226779
  * Management tab opens when a user row is clicked. Controlled variant for
226757
226780
  * hosts that trigger it from a whole table row.
226781
+ *
226782
+ * Radix portals the dialog into `document.body`, but a React portal still
226783
+ * bubbles its events through the React tree — so without the guard below, a
226784
+ * click *inside* the open profile would reach the row this dialog is rendered
226785
+ * from and fire its `onClick` (e.g. opening the enrollment progress modal
226786
+ * behind the profile). The wrapper is `display: contents`, so it adds nothing
226787
+ * to the host's layout.
226758
226788
  */
226759
- function UserProfileDialog({ tenantKey, username, isOpen, onClose }) {
226789
+ function UserProfileDialog({ tenantKey, username, isOpen, onClose, customization, currentSPA, }) {
226760
226790
  const t = useT();
226761
226791
  if (!isOpen)
226762
226792
  return null;
226763
- return (jsx(Dialog, { open: true, onOpenChange: onClose, children: jsxs(DialogContent, { autoFocus: false, className: "profile-component-dialog max-w-7xl w-[85vw] gap-0 overflow-hidden bg-white p-0", style: { height: '85vh', display: 'flex', flexDirection: 'column' }, "data-testid": "user-profile-link-dialog", children: [jsx(DialogTitle, { className: "sr-only", children: t('tabsUserstab.profileDialogTitle') }), jsx(DialogDescription, { className: "sr-only", children: t('tabsUserstab.profileDialogDescription') }), jsx(Profile, { tenant: tenantKey, tenants: [], username: username, onClose: onClose })] }) }));
226793
+ return (jsx("span", { className: "contents", onClick: (event) => event.stopPropagation(), onMouseDown: (event) => event.stopPropagation(), onKeyDown: (event) => event.stopPropagation(), children: jsx(Dialog, { open: true, onOpenChange: onClose, children: jsxs(DialogContent, { autoFocus: false, className: "profile-component-dialog max-w-7xl w-[85vw] gap-0 overflow-hidden bg-white p-0", style: { height: '85vh', display: 'flex', flexDirection: 'column' }, "data-testid": "user-profile-link-dialog", children: [jsx(DialogTitle, { className: "sr-only", children: t('tabsUserstab.profileDialogTitle') }), jsx(DialogDescription, { className: "sr-only", children: t('tabsUserstab.profileDialogDescription') }), jsx(Profile, { tenant: tenantKey, tenants: [], username: username, onClose: onClose, customization: profileCustomization(customization, currentSPA), currentSPA: currentSPA })] }) }) }));
226764
226794
  }
226765
226795
  /**
226766
226796
  * Clickable user identity that opens the shared `Profile` viewer in a dialog
226767
226797
  * — the same modal the tenant Management tab opens when a user row is
226768
- * clicked. Used by the per-user limits table and the user-limit modal.
226798
+ * clicked. `Profile` drops into preview (read-only) mode on its own for anyone
226799
+ * but the signed-in user. Used by the spend-cap tables and every analytics
226800
+ * surface that names a user; safe inside clickable rows and cards, since
226801
+ * neither its clicks nor its key presses reach the host's handlers.
226769
226802
  */
226770
- function UserProfileLink({ tenantKey, username, display, className, testId, }) {
226803
+ function UserProfileLink({ tenantKey, username, display, className, testId, customization, currentSPA, }) {
226771
226804
  const t = useT();
226772
226805
  const [isOpen, setIsOpen] = React__default.useState(false);
226806
+ if (!username) {
226807
+ // `inline-block`, or `truncate`'s `overflow: hidden` has nothing to clip:
226808
+ // an inline box takes its width from its own text.
226809
+ return (jsx("span", { className: cn('inline-block max-w-full truncate', className), "data-testid": testId, children: display }));
226810
+ }
226773
226811
  return (jsxs(Fragment$1, { children: [jsx("button", { type: "button", onClick: (event) => {
226774
226812
  event.stopPropagation();
226775
226813
  setIsOpen(true);
226776
- }, className: cn('max-w-full cursor-pointer truncate text-left hover:text-blue-600 hover:underline focus:text-blue-600 focus:outline-none', className), "aria-label": t('tabsUserstab.viewProfileAriaLabel', { name: display }), "data-testid": testId, children: display }), jsx(UserProfileDialog, { tenantKey: tenantKey, username: username, isOpen: isOpen, onClose: () => setIsOpen(false) })] }));
226814
+ },
226815
+ // Rows that open on Enter/Space would otherwise swallow the key press.
226816
+ onKeyDown: (event) => event.stopPropagation(), className: cn('max-w-full cursor-pointer truncate text-left hover:text-blue-600 hover:underline focus:text-blue-600 focus:outline-none', className), "aria-label": t('tabsUserstab.viewProfileAriaLabel', { name: display }), "data-testid": testId, children: display }), jsx(UserProfileDialog, { tenantKey: tenantKey, username: username, isOpen: isOpen, onClose: () => setIsOpen(false), customization: customization, currentSPA: currentSPA })] }));
226777
226817
  }
226778
226818
 
226779
226819
  /**
@@ -258095,27 +258135,6 @@ function SheetDescription({ className, ...props }) {
258095
258135
  return (jsx(DialogPrimitive.Description, { "data-slot": "sheet-description", className: cn('text-muted-foreground text-sm', className), ...props }));
258096
258136
  }
258097
258137
 
258098
- function MentorSelectionGrid({ selectedMentorIds, onMentorSelect, searchQuery, onSearchChange, tenantKey, itemsPerPage = 8, showSearch = true, minHeight = '400px', }) {
258099
- const t = useT();
258100
- const { agents: mentors, isLoading: isMentorsLoading, isFetching: isMentorsFetching, currentPage, totalPages, setSearchQuery: setMentorSearch, handlePageChange, } = useAgentSearchWithPagination({ tenantKey, itemsPerPage });
258101
- // Update search query with debounce effect handled by the hook
258102
- React__default.useEffect(() => {
258103
- setMentorSearch(searchQuery);
258104
- }, [searchQuery]);
258105
- const isMentorSelected = (mentorId) => {
258106
- return selectedMentorIds.includes(mentorId);
258107
- };
258108
- return (jsxs("div", { className: "space-y-4", children: [showSearch && (jsxs("div", { className: "relative", children: [isMentorsFetching ? (jsx(Spinner, { className: "absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2 transform text-gray-400" })) : (jsx(Search, { className: "absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2 transform text-gray-400" })), jsx(Input, { placeholder: t('mentorsMentorSelectionGrid.searchAgentsPlaceholder'), value: searchQuery, onChange: (e) => onSearchChange(e.target.value), className: "h-10 border-gray-200 pl-10 focus:border-blue-500 focus:ring-0" })] })), jsxs("div", { className: "space-y-4", children: [jsx("div", { className: "grid max-h-96 auto-rows-min grid-cols-1 items-start gap-3 overflow-y-auto rounded-lg border border-gray-200 p-4 md:max-h-none md:grid-cols-2", style: { minHeight }, children: isMentorsLoading ? (jsx("div", { className: "col-span-full py-8 text-center text-gray-500", children: t('mentorsMentorSelectionGrid.loadingAgents') })) : mentors.length === 0 ? (jsx("div", { className: "col-span-full py-8 text-center text-gray-500", children: t('mentorsMentorSelectionGrid.noAgentsFound') })) : (mentors.map((mentor) => {
258109
- const isSelected = isMentorSelected(mentor.unique_id || '');
258110
- const isAlreadyAdded = selectedMentorIds.includes(mentor.unique_id || '');
258111
- return (jsxs("button", { onClick: () => onMentorSelect(mentor), className: `flex cursor-pointer items-center gap-3 rounded-lg border-2 p-3 transition-all ${isSelected
258112
- ? 'border-blue-500 bg-blue-50'
258113
- : isAlreadyAdded
258114
- ? 'bg-blue-25 border-blue-300'
258115
- : 'border-gray-200 hover:border-gray-300 hover:bg-gray-50'}`, children: [jsxs(Avatar, { className: "h-12 w-12 flex-shrink-0", children: [jsx(AvatarImage, { src: mentor.profile_image || '/placeholder.svg', alt: mentor.name }), jsx(AvatarFallback, { children: mentor.name.substring(0, 2) })] }), jsxs("div", { className: "flex min-w-0 flex-1 flex-col justify-start text-left", children: [jsx("h4", { className: "truncate text-sm font-medium text-gray-900", children: mentor.name }), jsx("p", { className: "line-clamp-2 text-xs text-gray-600", children: mentor.description })] }), isSelected && (jsx("div", { className: "flex-shrink-0", children: jsx("div", { className: "flex h-6 w-6 items-center justify-center rounded-full bg-blue-600", children: jsx(Check, { className: "h-4 w-4 text-white" }) }) })), isAlreadyAdded && !isSelected && (jsx("div", { className: "flex-shrink-0", children: jsx("div", { className: "flex h-6 w-6 items-center justify-center rounded-full bg-blue-400", children: jsx(Check, { className: "h-4 w-4 text-white" }) }) }))] }, mentor.unique_id));
258116
- })) }), jsx(IblPagination, { currentPage: currentPage, totalPages: totalPages, onPageChange: handlePageChange, disabled: isMentorsFetching || isMentorsLoading })] })] }));
258117
- }
258118
-
258119
258138
  const SkeletonMultiplier = ({ Skeleton, multiplier }) => {
258120
258139
  return (jsx(Fragment$1, { children: Array.from({ length: multiplier }).map((_, index) => (jsx(Skeleton, {}, index))) }));
258121
258140
  };
@@ -262507,6 +262526,27 @@ var minimumMentorAlert = /*#__PURE__*/Object.freeze({
262507
262526
  MinimumMentorAlert: MinimumMentorAlert
262508
262527
  });
262509
262528
 
262529
+ function MentorSelectionGrid({ selectedMentorIds, onMentorSelect, searchQuery, onSearchChange, tenantKey, itemsPerPage = 8, showSearch = true, minHeight = '400px', }) {
262530
+ const t = useT();
262531
+ const { agents: mentors, isLoading: isMentorsLoading, isFetching: isMentorsFetching, currentPage, totalPages, setSearchQuery: setMentorSearch, handlePageChange, } = useAgentSearchWithPagination({ tenantKey, itemsPerPage });
262532
+ // Update search query with debounce effect handled by the hook
262533
+ React__default.useEffect(() => {
262534
+ setMentorSearch(searchQuery);
262535
+ }, [searchQuery]);
262536
+ const isMentorSelected = (mentorId) => {
262537
+ return selectedMentorIds.includes(mentorId);
262538
+ };
262539
+ return (jsxs("div", { className: "space-y-4", children: [showSearch && (jsxs("div", { className: "relative", children: [isMentorsFetching ? (jsx(Spinner, { className: "absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2 transform text-gray-400" })) : (jsx(Search, { className: "absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2 transform text-gray-400" })), jsx(Input, { placeholder: t('mentorsMentorSelectionGrid.searchAgentsPlaceholder'), value: searchQuery, onChange: (e) => onSearchChange(e.target.value), className: "h-10 border-gray-200 pl-10 focus:border-blue-500 focus:ring-0" })] })), jsxs("div", { className: "space-y-4", children: [jsx("div", { className: "grid max-h-96 auto-rows-min grid-cols-1 items-start gap-3 overflow-y-auto rounded-lg border border-gray-200 p-4 md:max-h-none md:grid-cols-2", style: { minHeight }, children: isMentorsLoading ? (jsx("div", { className: "col-span-full py-8 text-center text-gray-500", children: t('mentorsMentorSelectionGrid.loadingAgents') })) : mentors.length === 0 ? (jsx("div", { className: "col-span-full py-8 text-center text-gray-500", children: t('mentorsMentorSelectionGrid.noAgentsFound') })) : (mentors.map((mentor) => {
262540
+ const isSelected = isMentorSelected(mentor.unique_id || '');
262541
+ const isAlreadyAdded = selectedMentorIds.includes(mentor.unique_id || '');
262542
+ return (jsxs("button", { onClick: () => onMentorSelect(mentor), className: `flex cursor-pointer items-center gap-3 rounded-lg border-2 p-3 transition-all ${isSelected
262543
+ ? 'border-blue-500 bg-blue-50'
262544
+ : isAlreadyAdded
262545
+ ? 'bg-blue-25 border-blue-300'
262546
+ : 'border-gray-200 hover:border-gray-300 hover:bg-gray-50'}`, children: [jsxs(Avatar, { className: "h-12 w-12 flex-shrink-0", children: [jsx(AvatarImage, { src: mentor.profile_image || '/placeholder.svg', alt: mentor.name }), jsx(AvatarFallback, { children: mentor.name.substring(0, 2) })] }), jsxs("div", { className: "flex min-w-0 flex-1 flex-col justify-start text-left", children: [jsx("h4", { className: "truncate text-sm font-medium text-gray-900", children: mentor.name }), jsx("p", { className: "line-clamp-2 text-xs text-gray-600", children: mentor.description })] }), isSelected && (jsx("div", { className: "flex-shrink-0", children: jsx("div", { className: "flex h-6 w-6 items-center justify-center rounded-full bg-blue-600", children: jsx(Check, { className: "h-4 w-4 text-white" }) }) })), isAlreadyAdded && !isSelected && (jsx("div", { className: "flex-shrink-0", children: jsx("div", { className: "flex h-6 w-6 items-center justify-center rounded-full bg-blue-400", children: jsx(Check, { className: "h-4 w-4 text-white" }) }) }))] }, mentor.unique_id));
262547
+ })) }), jsx(IblPagination, { currentPage: currentPage, totalPages: totalPages, onPageChange: handlePageChange, disabled: isMentorsFetching || isMentorsLoading })] })] }));
262548
+ }
262549
+
262510
262550
  function CreateProjectModal$1({ isOpen, onClose, tenantKey, username, navigateToMentorInProject, }) {
262511
262551
  const t = useT();
262512
262552
  const dispatch = useDispatch();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iblai/iblai-js",
3
- "version": "2.14.0",
3
+ "version": "2.15.0",
4
4
  "description": "Unified JavaScript SDK for IBL.ai — re-exports data-layer, web-containers, and web-utils under a single package",
5
5
  "type": "module",
6
6
  "engines": {
@@ -76,9 +76,9 @@
76
76
  "axios": "1.13.6",
77
77
  "dotenv": "16.6.1",
78
78
  "winston": "3.19.0",
79
- "@iblai/data-layer": "1.16.0",
80
- "@iblai/mcp": "1.13.1",
81
- "@iblai/web-containers": "1.22.0",
79
+ "@iblai/mcp": "1.14.0",
80
+ "@iblai/data-layer": "1.17.0",
81
+ "@iblai/web-containers": "1.23.0",
82
82
  "@iblai/web-utils": "2.4.8"
83
83
  },
84
84
  "peerDependencies": {