@iblai/iblai-js 1.18.1 → 1.19.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.
@@ -86744,7 +86744,7 @@ function Profile({ tenant, username, tenants, onClose, customization = {}, isAdm
86744
86744
  }, children: [jsxs("div", { className: "flex flex-col items-center justify-center py-8 px-6 border-b border-gray-200 dark:border-gray-700 flex-shrink-0", children: [isUserMetadataEdxLoading || isUploadingProfileImage ? (jsx(Skeleton, { className: "h-20 w-20 mb-6 rounded-full", "aria-label": "Loading profile image" })) : (jsxs("button", { type: "button", className: "relative w-20 h-20 mb-6 cursor-pointer group rounded-full focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2", onMouseEnter: () => setIsHovering(true), onMouseLeave: () => setIsHovering(false), onClick: handleAvatarClick, "aria-label": "Upload profile picture", children: [jsxs(Avatar, { className: "h-20 w-20", children: [((_b = userMetadataEdx === null || userMetadataEdx === void 0 ? void 0 : userMetadataEdx.profile_image) === null || _b === void 0 ? void 0 : _b.has_image) ? (jsx(AvatarImage, { src: (_c = userMetadataEdx === null || userMetadataEdx === void 0 ? void 0 : userMetadataEdx.profile_image) === null || _c === void 0 ? void 0 : _c.image_url_full, alt: "Profile picture", className: "rounded-full object-cover w-full h-full group-hover:opacity-80 transition-opacity" })) : customization.useGravatarPicFallback ? (jsx(Gravatar$1, { className: "w-full h-full rounded-full object-cover group-hover:opacity-80 transition-opacity", email: userMetadata === null || userMetadata === void 0 ? void 0 : userMetadata.email, size: 80, alt: "Profile picture from Gravatar" })) : (jsx(Fragment$1, {})), jsx(AvatarFallback, { className: cn('bg-blue-800 text-white text-xl rounded-full', customization.useGravatarPicFallback &&
86745
86745
  !((_d = userMetadataEdx === null || userMetadataEdx === void 0 ? void 0 : userMetadataEdx.profile_image) === null || _d === void 0 ? void 0 : _d.image_url_full)
86746
86746
  ? 'hidden'
86747
- : ''), children: getInitials((userMetadata === null || userMetadata === void 0 ? void 0 : userMetadata.name) || (userMetadata === null || userMetadata === void 0 ? void 0 : userMetadata.username) || (userMetadata === null || userMetadata === void 0 ? void 0 : userMetadata.email) || '') })] }), isHovering && (jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-blue-800 rounded-full border-4 border-white/20", "aria-hidden": "true", children: jsx("span", { className: "text-white text-xs font-medium text-center px-2", children: "Upload" }) })), jsx("input", { ref: fileInputRef, type: "file", accept: "image/*", onChange: handleFileUpload, className: "hidden", "aria-label": "Choose profile picture to upload", tabIndex: -1 })] })), jsxs("h2", { className: "text-xl font-semibold text-gray-900 dark:text-gray-100 text-center mb-4", children: [userMetadata === null || userMetadata === void 0 ? void 0 : userMetadata.name, customization.showUsernameField && `, ${userMetadata === null || userMetadata === void 0 ? void 0 : userMetadata.username}`] }), jsxs("div", { className: "flex justify-center space-x-3", children: [jsxs("div", { className: "bg-blue-100 text-blue-700 px-2 py-1 rounded font-medium flex items-center text-sm", children: [jsx(RoleIcon, { className: "h-4 w-4 mr-2", "aria-hidden": "true" }), jsx("span", { children: isAdmin ? 'Admin' : 'Student' })] }), customization.showPlatformName && (jsx("div", { className: "bg-gray-100 text-gray-600 px-4 py-2 rounded text-xs font-medium", children: tenant.toUpperCase() }))] })] }), jsx("nav", { className: "flex-1 overflow-y-auto", style: { minHeight: 0 }, "aria-label": "Profile tabs", children: jsx("div", { className: "p-4", children: jsx("div", { className: "flex flex-col space-y-2", role: "tablist", "aria-orientation": "vertical", children: TABS.map((tab) => (jsxs("button", { role: "tab", "aria-selected": activeTab === tab.id, "aria-controls": `${tab.id}-tabpanel`, id: `${tab.id}-tab`, onClick: () => setActiveTab(tab.id), className: `w-full justify-start px-4 py-3 text-left rounded-lg transition-all flex items-center text-base ${activeTab === tab.id
86747
+ : ''), children: getInitials((userMetadata === null || userMetadata === void 0 ? void 0 : userMetadata.name) || (userMetadata === null || userMetadata === void 0 ? void 0 : userMetadata.username) || (userMetadata === null || userMetadata === void 0 ? void 0 : userMetadata.email) || '') })] }), isHovering && (jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-blue-800 rounded-full border-4 border-white/20", "aria-hidden": "true", children: jsx("span", { className: "text-white text-xs font-medium text-center px-2", children: "Upload" }) })), jsx("input", { ref: fileInputRef, type: "file", accept: "image/*", onChange: handleFileUpload, className: "hidden", "aria-label": "Choose profile picture to upload", tabIndex: -1 })] })), jsxs("h2", { className: "text-xl font-semibold text-gray-900 dark:text-gray-100 text-center mb-4", children: [userMetadata === null || userMetadata === void 0 ? void 0 : userMetadata.name, customization.showUsernameField && `, ${userMetadata === null || userMetadata === void 0 ? void 0 : userMetadata.username}`] }), jsxs("div", { className: "flex justify-center space-x-3", children: [jsxs("div", { className: "bg-blue-100 text-blue-700 px-2 py-1 rounded font-medium flex items-center text-sm", children: [jsx(RoleIcon, { className: "h-4 w-4 mr-2", "aria-hidden": "true" }), jsx("span", { children: isAdmin ? 'Admin' : 'User' })] }), customization.showPlatformName && (jsx("div", { className: "bg-gray-100 text-gray-600 px-4 py-2 rounded text-xs font-medium", children: tenant.toUpperCase() }))] })] }), jsx("nav", { className: "flex-1 overflow-y-auto", style: { minHeight: 0 }, "aria-label": "Profile tabs", children: jsx("div", { className: "p-4", children: jsx("div", { className: "flex flex-col space-y-2", role: "tablist", "aria-orientation": "vertical", children: TABS.map((tab) => (jsxs("button", { role: "tab", "aria-selected": activeTab === tab.id, "aria-controls": `${tab.id}-tabpanel`, id: `${tab.id}-tab`, onClick: () => setActiveTab(tab.id), className: `w-full justify-start px-4 py-3 text-left rounded-lg transition-all flex items-center text-base ${activeTab === tab.id
86748
86748
  ? 'bg-blue-50 text-blue-700 font-medium'
86749
86749
  : 'hover:bg-gray-50 text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-gray-100'}`, children: [jsx(tab.renderIcon, { className: "h-5 w-5 mr-3 flex-shrink-0", "aria-hidden": "true" }), jsx("span", { className: "truncate", children: tab.label })] }, tab.id))) }) }) })] }), jsx("nav", { className: "lg:hidden", "aria-label": "Profile tabs mobile", children: jsx("div", { className: "w-full justify-start px-6 py-2 bg-white border-b border-gray-200 rounded-none h-auto overflow-x-auto", children: jsx("div", { className: "flex space-x-2", role: "tablist", "aria-orientation": "horizontal", children: TABS.map((tab) => (jsxs("button", { role: "tab", "aria-selected": activeTab === tab.id, "aria-controls": `${tab.id}-tabpanel`, id: `${tab.id}-tab-mobile`, onClick: () => setActiveTab(tab.id), className: `flex items-center gap-2 px-3 py-2 rounded-lg whitespace-nowrap text-sm transition-all ${activeTab === tab.id
86750
86750
  ? 'bg-blue-50 text-blue-600 font-medium'
@@ -89043,7 +89043,7 @@ function UsersTab({ tenant, onInviteClick }) {
89043
89043
  const userData = isResultsWithPolicies
89044
89044
  ? (users === null || users === void 0 ? void 0 : users.results).data
89045
89045
  : [];
89046
- return (jsxs("div", { className: "mt-4", children: [jsxs("div", { className: "flex justify-between items-center gap-1", children: [jsxs("div", { className: "relative mb-6 max-w-sm", children: [jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" }), jsx(Input, { type: "text", value: searchQuery, onChange: (event) => setQuerySearch(event.target.value), placeholder: "Search users", className: "pl-10 pr-10 focus:ring-blue-500 focus:border-blue-500 h-[35px]", "aria-label": "Search users" }), searchQuery.length > 0 && (searchQuery !== debouncedSearchQuery || isLoading) && (jsx(LoaderCircle, { "data-testid": "search-spinner", className: "absolute right-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400 animate-spin", "aria-hidden": "true" }))] }), jsx("div", { className: "mb-6", children: jsx(Button$1, { className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] hover:opacity-90 text-white h-[35px]", onClick: onInviteClick, children: "Invite" }) })] }), isLoading ? (jsx("div", { className: "flex justify-center items-center h-64", children: jsx(Spinner, {}) })) : (jsxs(Fragment$1, { children: [jsx("div", { className: "bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg overflow-x-auto", children: jsxs("table", { className: "w-full text-sm", children: [jsx("thead", { className: "bg-gray-50 dark:bg-gray-700 border-b border-gray-200 dark:border-gray-600", children: jsxs("tr", { children: [jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400 w-[16%]", children: "Name" }), jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400 w-[25%]", children: "Email" }), jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400 w-[16%]", children: "Role" }), jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400 w-[25%]", children: "Policies" }), jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400 w-[18%]", children: "Status" })] }) }), jsxs("tbody", { className: "divide-y divide-gray-200 dark:divide-gray-600", children: [userData.map((user, index) => (jsxs("tr", { children: [jsx("td", { "aria-label": 'user-management-name-column', className: "px-6 py-4 text-gray-900 dark:text-gray-100 text-sm whitespace-nowrap overflow-hidden text-ellipsis max-w-0", children: jsx("div", { className: "truncate", children: user.name }) }), jsx("td", { "aria-label": 'user-management-email-column', className: "px-6 py-4 text-gray-600 dark:text-gray-300 text-sm max-w-0", children: jsx("div", { className: "truncate", children: user.email }) }), jsx("td", { className: "px-6 py-4", children: jsxs(Select$1, { value: user.is_admin ? 'admin' : 'student', onValueChange: () => handleUserRoleChange(user), children: [jsx(SelectTrigger, { className: "w-full text-sm", children: jsx(SelectValue, {}) }), jsxs(SelectContent, { className: "text-sm", children: [jsx(SelectItem, { value: "admin", children: "Admin" }), jsx(SelectItem, { value: "student", children: "Student" })] })] }) }), jsx("td", { className: "px-6 py-4", children: jsxs(Popover, { modal: true, open: openPolicyPopover === user.user_id, onOpenChange: (open) => setOpenPolicyPopover(open ? user.user_id : null), children: [jsx(PopoverTrigger, { asChild: true, children: jsxs(Button$1, { variant: "outline", role: "combobox", "aria-expanded": openPolicyPopover === user.user_id, "aria-label": `Select policies for ${user.name}`, className: "w-full justify-between text-sm h-9 font-normal", disabled: updatingUserIds.has(user === null || user === void 0 ? void 0 : user.user_id), children: [jsx("span", { className: "truncate", children: user.is_admin
89046
+ return (jsxs("div", { className: "mt-4", children: [jsxs("div", { className: "flex justify-between items-center gap-1", children: [jsxs("div", { className: "relative mb-6 max-w-sm", children: [jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" }), jsx(Input, { type: "text", value: searchQuery, onChange: (event) => setQuerySearch(event.target.value), placeholder: "Search users", className: "pl-10 pr-10 focus:ring-blue-500 focus:border-blue-500 h-[35px]", "aria-label": "Search users" }), searchQuery.length > 0 && (searchQuery !== debouncedSearchQuery || isLoading) && (jsx(LoaderCircle, { "data-testid": "search-spinner", className: "absolute right-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400 animate-spin", "aria-hidden": "true" }))] }), jsx("div", { className: "mb-6", children: jsx(Button$1, { className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] hover:opacity-90 text-white h-[35px]", onClick: onInviteClick, children: "Invite" }) })] }), isLoading ? (jsx("div", { className: "flex justify-center items-center h-64", children: jsx(Spinner, {}) })) : (jsxs(Fragment$1, { children: [jsx("div", { className: "bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg overflow-x-auto", children: jsxs("table", { className: "w-full text-sm", children: [jsx("thead", { className: "bg-gray-50 dark:bg-gray-700 border-b border-gray-200 dark:border-gray-600", children: jsxs("tr", { children: [jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400 w-[16%]", children: "Name" }), jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400 w-[25%]", children: "Email" }), jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400 w-[16%]", children: "Role" }), jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400 w-[25%]", children: "Policies" }), jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400 w-[18%]", children: "Status" })] }) }), jsxs("tbody", { className: "divide-y divide-gray-200 dark:divide-gray-600", children: [userData.map((user, index) => (jsxs("tr", { children: [jsx("td", { "aria-label": 'user-management-name-column', className: "px-6 py-4 text-gray-900 dark:text-gray-100 text-sm whitespace-nowrap overflow-hidden text-ellipsis max-w-0", children: jsx("div", { className: "truncate", children: user.name }) }), jsx("td", { "aria-label": 'user-management-email-column', className: "px-6 py-4 text-gray-600 dark:text-gray-300 text-sm max-w-0", children: jsx("div", { className: "truncate", children: user.email }) }), jsx("td", { className: "px-6 py-4", children: jsxs(Select$1, { value: user.is_admin ? 'admin' : 'student', onValueChange: () => handleUserRoleChange(user), children: [jsx(SelectTrigger, { className: "w-full text-sm", children: jsx(SelectValue, {}) }), jsxs(SelectContent, { className: "text-sm", children: [jsx(SelectItem, { value: "admin", children: "Admin" }), jsx(SelectItem, { value: "student", children: "User" })] })] }) }), jsx("td", { className: "px-6 py-4", children: jsxs(Popover, { modal: true, open: openPolicyPopover === user.user_id, onOpenChange: (open) => setOpenPolicyPopover(open ? user.user_id : null), children: [jsx(PopoverTrigger, { asChild: true, children: jsxs(Button$1, { variant: "outline", role: "combobox", "aria-expanded": openPolicyPopover === user.user_id, "aria-label": `Select policies for ${user.name}`, className: "w-full justify-between text-sm h-9 font-normal", disabled: updatingUserIds.has(user === null || user === void 0 ? void 0 : user.user_id), children: [jsx("span", { className: "truncate", children: user.is_admin
89047
89047
  ? `All (${allowedPolicies.length}) selected`
89048
89048
  : user.policies && user.policies.length > 0
89049
89049
  ? `${user.policies.length} selected`
@@ -90567,7 +90567,7 @@ const TabDescription = ({ icon, title, children }) => {
90567
90567
  return (jsxs("div", { className: "flex gap-3 items-start border rounded-lg p-4 bg-blue-50/60 border-blue-100", children: [jsx("div", { className: "shrink-0 w-9 h-9 rounded-md flex items-center justify-center bg-blue-100 text-blue-600", children: icon }), jsxs("div", { className: "flex-1 min-w-0", children: [jsx("h3", { className: "text-sm font-semibold mb-1 text-blue-900 hidden sm:block", children: title }), jsx("p", { className: `text-sm text-gray-600 leading-relaxed sm:line-clamp-none! ${expanded ? '' : 'line-clamp-2'}`, children: children }), jsx("button", { type: "button", onClick: () => setExpanded((prev) => !prev), className: "mt-1 text-xs font-medium text-blue-700 hover:text-blue-800 sm:hidden", children: expanded ? 'Read less' : 'Read more' })] })] }));
90568
90568
  };
90569
90569
  const Admin = ({ tenant, onInviteClick, hasUserTabPermission = false, hasGroupsTabPermission = false, hasRolesTabPermission = false, hasPoliciesTabPermission = false, hasTeamsTabPermission = false, hasAlertsTabPermission = false, hasInviteUserPermission = false, hasCreateTeamPermission = false, onLoadGroupPermissions, rbacPermissions = {}, enableRbac = false, }) => {
90570
- return (jsx("div", { className: "border border-gray-200 rounded-lg p-6", children: jsxs(Tabs, { defaultValue: "users", "aria-label": "RBAC Management Tabs", children: [jsxs(TabsList, { "aria-label": "Management tabs", className: "max-w-full overflow-x-auto justify-start px-1", children: [hasUserTabPermission && jsx(TabsTrigger, { value: "users", children: "Users" }), hasGroupsTabPermission && jsx(TabsTrigger, { value: "groups", children: "Groups" }), hasRolesTabPermission && jsx(TabsTrigger, { value: "roles", children: "Roles" }), hasPoliciesTabPermission && jsx(TabsTrigger, { value: "policies", children: "Policies" }), hasTeamsTabPermission && jsx(TabsTrigger, { value: "teams", children: "Teams" }), hasAlertsTabPermission && jsx(TabsTrigger, { value: "alerts", children: "Alerts" })] }), hasUserTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "users", children: [jsx(TabDescription, { icon: jsx(Users, { className: "w-5 h-5" }), title: "Users", children: "Manage platform-wide users and their predefined roles. Admins have the highest level of permissions; Students can optionally be granted limited policies." }), jsx(UsersTab, { tenant: tenant, onInviteClick: onInviteClick })] })), hasGroupsTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "groups", children: [jsx(TabDescription, { icon: jsx(UsersRound, { className: "w-5 h-5" }), title: "Groups", children: "RBAC groups bundle users so a single policy assignment grants permissions to all of them. The same group can be reused across policies." }), jsx(GroupsTab, { tenant: tenant })] })), hasRolesTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "roles", children: [jsx(TabDescription, { icon: jsx(UserCog, { className: "w-5 h-5" }), title: "Roles", children: "An RBAC role is a named bundle of permissions (actions applied to resources in policies)." }), jsx(RolesTab, { tenant: tenant })] })), hasPoliciesTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "policies", children: [jsxs(TabDescription, { icon: jsx(ScrollText, { className: "w-5 h-5" }), title: "Policies", children: ["An RBAC policy grants a role's permissions to a set of users or groups on a set of resources. Resources are hierarchical: granting on /platforms/", '{pk}', "/mentors/ covers every mentor, while /platforms/", '{pk}', "/mentors/", '{pk}', "/ scopes to one."] }), jsx(PoliciesTab, { tenant: tenant })] })), hasTeamsTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "teams", children: [jsx(TabDescription, { icon: jsx(Shield, { className: "w-5 h-5" }), title: "Teams", children: "A team is a curated set of users that you can share with others \u2014 e.g., grant another user permission to view the team's analytics or send notifications to them." }), jsx(GroupsTab, { tenant: tenant, isTeam: true, onInviteClick: onInviteClick, hasInviteUserPermission: hasInviteUserPermission, hasCreateTeamPermission: hasCreateTeamPermission, onLoadGroupPermissions: onLoadGroupPermissions, rbacPermissions: rbacPermissions, enableRbac: enableRbac })] })), hasAlertsTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "alerts", children: [jsx(TabDescription, { icon: jsx(BellRing, { className: "w-5 h-5" }), title: "Alerts", children: "An alert pairs a team of watched users with one or more watchers who get notified when monitored events occur for a watched user. Each watcher subscribes to its own subset of events." }), jsx(AlertsTab$1, { tenant: tenant })] }))] }) }));
90570
+ return (jsx("div", { className: "border border-gray-200 rounded-lg p-6", children: jsxs(Tabs, { defaultValue: "users", "aria-label": "RBAC Management Tabs", children: [jsxs(TabsList, { "aria-label": "Management tabs", className: "max-w-full overflow-x-auto justify-start px-1", children: [hasUserTabPermission && jsx(TabsTrigger, { value: "users", children: "Users" }), hasGroupsTabPermission && jsx(TabsTrigger, { value: "groups", children: "Groups" }), hasRolesTabPermission && jsx(TabsTrigger, { value: "roles", children: "Roles" }), hasPoliciesTabPermission && jsx(TabsTrigger, { value: "policies", children: "Policies" }), hasTeamsTabPermission && jsx(TabsTrigger, { value: "teams", children: "Teams" }), hasAlertsTabPermission && jsx(TabsTrigger, { value: "alerts", children: "Alerts" })] }), hasUserTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "users", children: [jsx(TabDescription, { icon: jsx(Users, { className: "w-5 h-5" }), title: "Users", children: "Manage platform-wide users and their predefined roles. Admins have the highest level of permissions; Users can optionally be granted limited policies." }), jsx(UsersTab, { tenant: tenant, onInviteClick: onInviteClick })] })), hasGroupsTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "groups", children: [jsx(TabDescription, { icon: jsx(UsersRound, { className: "w-5 h-5" }), title: "Groups", children: "RBAC groups bundle users so a single policy assignment grants permissions to all of them. The same group can be reused across policies." }), jsx(GroupsTab, { tenant: tenant })] })), hasRolesTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "roles", children: [jsx(TabDescription, { icon: jsx(UserCog, { className: "w-5 h-5" }), title: "Roles", children: "An RBAC role is a named bundle of permissions (actions applied to resources in policies)." }), jsx(RolesTab, { tenant: tenant })] })), hasPoliciesTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "policies", children: [jsxs(TabDescription, { icon: jsx(ScrollText, { className: "w-5 h-5" }), title: "Policies", children: ["An RBAC policy grants a role's permissions to a set of users or groups on a set of resources. Resources are hierarchical: granting on /platforms/", '{pk}', "/mentors/ covers every mentor, while /platforms/", '{pk}', "/mentors/", '{pk}', "/ scopes to one."] }), jsx(PoliciesTab, { tenant: tenant })] })), hasTeamsTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "teams", children: [jsx(TabDescription, { icon: jsx(Shield, { className: "w-5 h-5" }), title: "Teams", children: "A team is a curated set of users that you can share with others \u2014 e.g., grant another user permission to view the team's analytics or send notifications to them." }), jsx(GroupsTab, { tenant: tenant, isTeam: true, onInviteClick: onInviteClick, hasInviteUserPermission: hasInviteUserPermission, hasCreateTeamPermission: hasCreateTeamPermission, onLoadGroupPermissions: onLoadGroupPermissions, rbacPermissions: rbacPermissions, enableRbac: enableRbac })] })), hasAlertsTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "alerts", children: [jsx(TabDescription, { icon: jsx(BellRing, { className: "w-5 h-5" }), title: "Alerts", children: "An alert pairs a team of watched users with one or more watchers who get notified when monitored events occur for a watched user. Each watcher subscribes to its own subset of events." }), jsx(AlertsTab$1, { tenant: tenant })] }))] }) }));
90571
90571
  };
90572
90572
 
90573
90573
  function DeleteApiModal({ isOpen, onClose, apiKey, tenantKey }) {
@@ -95661,17 +95661,17 @@ const StudentMentorCreationContent = ({ platformKey, }) => {
95661
95661
  dispatch(coreApiSlice.util.updateQueryData('getStudentMentorCreationStatus', { platformKey }, (draft) => {
95662
95662
  draft.allow_students_to_create_mentors = checked;
95663
95663
  }));
95664
- toast.success('Student mentor creation setting updated successfully');
95664
+ toast.success('User mentor creation setting updated successfully');
95665
95665
  }
95666
95666
  catch (error) {
95667
95667
  console.error(JSON.stringify(error));
95668
- toast.error('Failed to update student mentor creation setting');
95668
+ toast.error('Failed to update user mentor creation setting');
95669
95669
  }
95670
95670
  };
95671
95671
  if (isLoadingStudentMentorCreationStatus) {
95672
95672
  return (jsx("div", { className: "rounded-lg border px-6 py-6", style: { borderColor: 'oklch(.922 0 0)' }, children: jsx("div", { className: "animate-pulse", children: jsxs("div", { className: "flex items-center justify-between", children: [jsx("div", { className: "h-4 bg-gray-200 rounded w-1/3" }), jsx("div", { className: "h-6 w-11 bg-gray-200 rounded" })] }) }) }));
95673
95673
  }
95674
- return (jsxs("div", { className: "flex items-center justify-between rounded-lg border px-6 py-6", style: { borderColor: 'oklch(.922 0 0)' }, children: [jsxs("div", { className: "flex items-center gap-2", children: [jsx("span", { className: "text-sm font-medium text-[#646464]", children: "Student Mentor Creation" }), jsx(TooltipProvider, { children: jsxs(Tooltip$1, { children: [jsx(TooltipTrigger, { "aria-label": "More info about public registration", className: "hidden sm:block", children: jsx(Info$3, { className: "h-4 w-4 text-gray-400" }) }), jsx(TooltipContent, { className: "rounded-lg bg-gray-700 px-3 py-2 text-sm font-medium whitespace-nowrap text-white shadow-sm transition-opacity duration-300 z-50", children: jsx("p", { children: "Allow students to create mentors in the mentor platform" }) })] }) })] }), jsxs("div", { className: "flex items-center gap-2", children: [jsx(Switch, { checked: studentMentorCreationStatus === null || studentMentorCreationStatus === void 0 ? void 0 : studentMentorCreationStatus.allow_students_to_create_mentors, onCheckedChange: handleToggleStudentMentorCreation, disabled: isUpdatingStudentMentorCreationStatus, "aria-label": `Student mentor creation ${(studentMentorCreationStatus === null || studentMentorCreationStatus === void 0 ? void 0 : studentMentorCreationStatus.allow_students_to_create_mentors) ? 'enabled' : 'disabled'}`, className: "cursor-pointer data-[state=checked]:bg-blue-500" }), isUpdatingStudentMentorCreationStatus && (jsx("div", { className: "w-4 h-4 border-2 border-blue-500 border-t-transparent rounded-full animate-spin" }))] })] }));
95674
+ return (jsxs("div", { className: "flex items-center justify-between rounded-lg border px-6 py-6", style: { borderColor: 'oklch(.922 0 0)' }, children: [jsxs("div", { className: "flex items-center gap-2", children: [jsx("span", { className: "text-sm font-medium text-[#646464]", children: "User Mentor Creation" }), jsx(TooltipProvider, { children: jsxs(Tooltip$1, { children: [jsx(TooltipTrigger, { "aria-label": "More info about public registration", className: "hidden sm:block", children: jsx(Info$3, { className: "h-4 w-4 text-gray-400" }) }), jsx(TooltipContent, { className: "rounded-lg bg-gray-700 px-3 py-2 text-sm font-medium whitespace-nowrap text-white shadow-sm transition-opacity duration-300 z-50", children: jsx("p", { children: "Allow users to create mentors in the mentor platform" }) })] }) })] }), jsxs("div", { className: "flex items-center gap-2", children: [jsx(Switch, { checked: studentMentorCreationStatus === null || studentMentorCreationStatus === void 0 ? void 0 : studentMentorCreationStatus.allow_students_to_create_mentors, onCheckedChange: handleToggleStudentMentorCreation, disabled: isUpdatingStudentMentorCreationStatus, "aria-label": `User mentor creation ${(studentMentorCreationStatus === null || studentMentorCreationStatus === void 0 ? void 0 : studentMentorCreationStatus.allow_students_to_create_mentors) ? 'enabled' : 'disabled'}`, className: "cursor-pointer data-[state=checked]:bg-blue-500" }), isUpdatingStudentMentorCreationStatus && (jsx("div", { className: "w-4 h-4 border-2 border-blue-500 border-t-transparent rounded-full animate-spin" }))] })] }));
95675
95675
  };
95676
95676
 
95677
95677
  const RecommendationSystemPromptsContent = ({ platformKey, currentSPA, }) => {
@@ -191487,7 +191487,7 @@ function AnalyticsTranscriptsStats({ tenantKey, mentorId, selectedMentorId, user
191487
191487
  /* Error or no data state */
191488
191488
  jsx("div", { className: "flex items-center justify-center h-full text-gray-400", children: jsxs("div", { className: "text-center", children: [jsx(X$1, { className: "h-6 w-6 mx-auto mb-2 text-red-400" }), jsx("p", { children: "No transcript details available" }), jsx("p", { className: "text-sm mt-1", children: "Unable to load transcript for this conversation." })] }) })) : (
191489
191489
  /* Data loaded successfully */
191490
- jsxs(Fragment$1, { children: [jsxs("div", { className: "mb-4 flex-shrink-0", children: [jsx("h2", { className: "text-lg font-semibold mb-2", children: "Conversation Transcript" }), jsxs("div", { className: "text-sm text-gray-500", children: [jsxs("div", { children: ["Full Name: ", ((_a = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.summary) === null || _a === void 0 ? void 0 : _a.name) || '-'] }), jsxs("div", { children: ["Username: ", ((_b = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.summary) === null || _b === void 0 ? void 0 : _b.username) || '-'] }), jsxs("div", { children: ["Mentor: ", ((_c = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.summary) === null || _c === void 0 ? void 0 : _c.mentor) || '-'] }), jsxs("div", { children: ["Model: ", ((_d = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.summary) === null || _d === void 0 ? void 0 : _d.model) || '-'] })] })] }), jsx("div", { className: "flex-1 overflow-y-auto space-y-4 min-h-0", children: ((_e = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.messages) === null || _e === void 0 ? void 0 : _e.length) > 0 ? ((_f = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.messages) === null || _f === void 0 ? void 0 : _f.map((message, index) => (jsxs(React__default.Fragment, { children: [(message === null || message === void 0 ? void 0 : message.human) && (jsxs("div", { className: `p-3 rounded-lg bg-blue-100 ml-4`, children: [jsx("div", { className: "flex justify-between items-start mb-1", children: jsx("span", { className: "font-medium text-sm", children: "Student" }) }), jsx("p", { className: "text-sm", children: getMessageContent(message.human) })] }, `${index}-human`)), (message === null || message === void 0 ? void 0 : message.ai) && (jsxs("div", { className: `p-3 rounded-lg bg-white mr-4`, children: [jsx("div", { className: "flex justify-between items-start mb-1", children: jsx("span", { className: "font-medium text-sm", children: "Mentor" }) }), jsx(Markdown, { children: getMessageContent(message.ai) })] }, `${index}-ai`))] }, index)))) : (jsx("div", { className: "text-center text-gray-500 py-8", children: jsx("p", { children: "No messages in this conversation." }) })) })] })) }));
191490
+ jsxs(Fragment$1, { children: [jsxs("div", { className: "mb-4 flex-shrink-0", children: [jsx("h2", { className: "text-lg font-semibold mb-2", children: "Conversation Transcript" }), jsxs("div", { className: "text-sm text-gray-500", children: [jsxs("div", { children: ["Full Name: ", ((_a = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.summary) === null || _a === void 0 ? void 0 : _a.name) || '-'] }), jsxs("div", { children: ["Username: ", ((_b = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.summary) === null || _b === void 0 ? void 0 : _b.username) || '-'] }), jsxs("div", { children: ["Mentor: ", ((_c = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.summary) === null || _c === void 0 ? void 0 : _c.mentor) || '-'] }), jsxs("div", { children: ["Model: ", ((_d = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.summary) === null || _d === void 0 ? void 0 : _d.model) || '-'] })] })] }), jsx("div", { className: "flex-1 overflow-y-auto space-y-4 min-h-0", children: ((_e = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.messages) === null || _e === void 0 ? void 0 : _e.length) > 0 ? ((_f = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.messages) === null || _f === void 0 ? void 0 : _f.map((message, index) => (jsxs(React__default.Fragment, { children: [(message === null || message === void 0 ? void 0 : message.human) && (jsxs("div", { className: `p-3 rounded-lg bg-blue-100 ml-4`, children: [jsx("div", { className: "flex justify-between items-start mb-1", children: jsx("span", { className: "font-medium text-sm", children: "User" }) }), jsx("p", { className: "text-sm", children: getMessageContent(message.human) })] }, `${index}-human`)), (message === null || message === void 0 ? void 0 : message.ai) && (jsxs("div", { className: `p-3 rounded-lg bg-white mr-4`, children: [jsx("div", { className: "flex justify-between items-start mb-1", children: jsx("span", { className: "font-medium text-sm", children: "Mentor" }) }), jsx(Markdown, { children: getMessageContent(message.ai) })] }, `${index}-ai`))] }, index)))) : (jsx("div", { className: "text-center text-gray-500 py-8", children: jsx("p", { children: "No messages in this conversation." }) })) })] })) }));
191491
191491
  };
191492
191492
  return (jsxs("div", { className: "space-y-8", children: [jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 mb-6", children: [jsx(StatCard, { title: "Average number of messages per conversation", value: ((_a = transcriptsConversationHeadlineData === null || transcriptsConversationHeadlineData === void 0 ? void 0 : transcriptsConversationHeadlineData.avg_messages_per_conversation) === null || _a === void 0 ? void 0 : _a.value) || 0, percentage: ((_b = transcriptsConversationHeadlineData === null || transcriptsConversationHeadlineData === void 0 ? void 0 : transcriptsConversationHeadlineData.avg_messages_per_conversation) === null || _b === void 0 ? void 0 : _b.percentage_change) ||
191493
191493
  undefined, loading: isLoadingTranscriptsConversationHeadlineData }), jsx(StatCard, { title: "Average cost per conversation", value: Number(((_c = transcriptsConversationHeadlineData === null || transcriptsConversationHeadlineData === void 0 ? void 0 : transcriptsConversationHeadlineData.avg_cost_per_conversation) === null || _c === void 0 ? void 0 : _c.value) || 0).toFixed(2), percentage: ((_d = transcriptsConversationHeadlineData === null || transcriptsConversationHeadlineData === void 0 ? void 0 : transcriptsConversationHeadlineData.avg_cost_per_conversation) === null || _d === void 0 ? void 0 : _d.percentage_change) ||
@@ -191508,7 +191508,7 @@ function AnalyticsTranscriptsStats({ tenantKey, mentorId, selectedMentorId, user
191508
191508
  ? 'Negative'
191509
191509
  : transcript.sentiment === 'positive'
191510
191510
  ? 'Positive'
191511
- : 'Neutral', ' ', "User Sentiment"] })] }) }), jsxs("div", { className: "flex flex-wrap gap-x-6 gap-y-2 text-xs text-gray-500 mb-2", children: [jsxs("div", { children: ["Student: ", (transcript === null || transcript === void 0 ? void 0 : transcript.name) || (transcript === null || transcript === void 0 ? void 0 : transcript.username) || '-'] }), jsxs("div", { children: ["Mentor: ", (transcript === null || transcript === void 0 ? void 0 : transcript.mentor) || '-'] })] }), jsxs("div", { className: "flex flex-wrap gap-x-6 gap-y-2 text-xs text-gray-500 mb-2", children: [jsxs("div", { children: ["model: ", (transcript === null || transcript === void 0 ? void 0 : transcript.model) || '-'] }), jsxs("div", { children: ["user_id: ", (transcript === null || transcript === void 0 ? void 0 : transcript.username) || '-'] })] }), jsxs("div", { className: "flex flex-wrap gap-x-6 gap-y-2 text-xs text-gray-500", children: [jsxs("div", { children: [transcript.message_count, " messages"] }), jsx("div", { children: "\u2022" }), jsxs("div", { children: ["$", Number((transcript === null || transcript === void 0 ? void 0 : transcript.cost) || 0).toFixed(2), " estimated cost"] }), (transcript === null || transcript === void 0 ? void 0 : transcript.created_at) && (jsxs(Fragment$1, { children: [jsx("div", { children: "\u2022" }), jsxs("div", { children: ["Created ", formatRelativeTime(transcript.created_at)] })] }))] })] }, transcript.session));
191511
+ : 'Neutral', ' ', "User Sentiment"] })] }) }), jsxs("div", { className: "flex flex-wrap gap-x-6 gap-y-2 text-xs text-gray-500 mb-2", children: [jsxs("div", { children: ["User: ", (transcript === null || transcript === void 0 ? void 0 : transcript.name) || (transcript === null || transcript === void 0 ? void 0 : transcript.username) || '-'] }), jsxs("div", { children: ["Mentor: ", (transcript === null || transcript === void 0 ? void 0 : transcript.mentor) || '-'] })] }), jsxs("div", { className: "flex flex-wrap gap-x-6 gap-y-2 text-xs text-gray-500 mb-2", children: [jsxs("div", { children: ["model: ", (transcript === null || transcript === void 0 ? void 0 : transcript.model) || '-'] }), jsxs("div", { children: ["user_id: ", (transcript === null || transcript === void 0 ? void 0 : transcript.username) || '-'] })] }), jsxs("div", { className: "flex flex-wrap gap-x-6 gap-y-2 text-xs text-gray-500", children: [jsxs("div", { children: [transcript.message_count, " messages"] }), jsx("div", { children: "\u2022" }), jsxs("div", { children: ["$", Number((transcript === null || transcript === void 0 ? void 0 : transcript.cost) || 0).toFixed(2), " estimated cost"] }), (transcript === null || transcript === void 0 ? void 0 : transcript.created_at) && (jsxs(Fragment$1, { children: [jsx("div", { children: "\u2022" }), jsxs("div", { children: ["Created ", formatRelativeTime(transcript.created_at)] })] }))] })] }, transcript.session));
191512
191512
  })) : (
191513
191513
  // Empty state
191514
191514
  jsx("div", { className: "text-center py-12", children: jsx("p", { className: "text-gray-500", children: filters.topicSearch || filters.userSearch || filters.rating
@@ -191527,7 +191527,7 @@ function AnalyticsTranscriptsStats({ tenantKey, mentorId, selectedMentorId, user
191527
191527
  /* Error or no data state */
191528
191528
  jsx("div", { className: "flex items-center justify-center h-full text-gray-400", children: jsxs("div", { className: "text-center", children: [jsx(X$1, { className: "h-6 w-6 mx-auto mb-2 text-red-400" }), jsx("p", { children: "No transcript details available" }), jsx("p", { className: "text-sm mt-1", children: "Unable to load transcript for this conversation." })] }) })) : (
191529
191529
  /* Data loaded successfully */
191530
- jsxs("div", { className: "space-y-4", children: [jsx("div", { className: "mb-4", children: jsxs("div", { className: "text-sm text-gray-500 space-y-1", children: [jsxs("div", { children: ["Full Name: ", ((_g = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.summary) === null || _g === void 0 ? void 0 : _g.name) || '-'] }), jsxs("div", { children: ["Username: ", ((_h = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.summary) === null || _h === void 0 ? void 0 : _h.username) || '-'] }), jsxs("div", { children: ["Mentor: ", ((_j = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.summary) === null || _j === void 0 ? void 0 : _j.mentor) || '-'] }), jsxs("div", { children: ["Model: ", ((_k = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.summary) === null || _k === void 0 ? void 0 : _k.model) || '-'] })] }) }), jsx("div", { className: "space-y-4 pb-4", children: ((_l = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.messages) === null || _l === void 0 ? void 0 : _l.length) > 0 ? ((_m = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.messages) === null || _m === void 0 ? void 0 : _m.map((message, index) => (jsxs(React__default.Fragment, { children: [(message === null || message === void 0 ? void 0 : message.human) && (jsxs("div", { className: "p-3 rounded-lg bg-blue-100 ml-4", children: [jsx("div", { className: "flex justify-between items-start mb-1", children: jsx("span", { className: "font-medium text-sm", children: "Student" }) }), jsx("p", { className: "text-sm", children: getMessageContent(message.human) })] })), (message === null || message === void 0 ? void 0 : message.ai) && (jsxs("div", { className: "p-3 rounded-lg bg-white mr-4 border", style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx("div", { className: "flex justify-between items-start mb-1", children: jsx("span", { className: "font-medium text-sm", children: "Mentor" }) }), jsx(Markdown, { children: getMessageContent(message.ai) })] }))] }, index)))) : (jsx("div", { className: "text-center text-gray-500 py-8", children: jsx("p", { children: "No messages in this conversation." }) })) })] })) })] }) }))] }));
191530
+ jsxs("div", { className: "space-y-4", children: [jsx("div", { className: "mb-4", children: jsxs("div", { className: "text-sm text-gray-500 space-y-1", children: [jsxs("div", { children: ["Full Name: ", ((_g = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.summary) === null || _g === void 0 ? void 0 : _g.name) || '-'] }), jsxs("div", { children: ["Username: ", ((_h = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.summary) === null || _h === void 0 ? void 0 : _h.username) || '-'] }), jsxs("div", { children: ["Mentor: ", ((_j = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.summary) === null || _j === void 0 ? void 0 : _j.mentor) || '-'] }), jsxs("div", { children: ["Model: ", ((_k = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.summary) === null || _k === void 0 ? void 0 : _k.model) || '-'] })] }) }), jsx("div", { className: "space-y-4 pb-4", children: ((_l = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.messages) === null || _l === void 0 ? void 0 : _l.length) > 0 ? ((_m = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.messages) === null || _m === void 0 ? void 0 : _m.map((message, index) => (jsxs(React__default.Fragment, { children: [(message === null || message === void 0 ? void 0 : message.human) && (jsxs("div", { className: "p-3 rounded-lg bg-blue-100 ml-4", children: [jsx("div", { className: "flex justify-between items-start mb-1", children: jsx("span", { className: "font-medium text-sm", children: "User" }) }), jsx("p", { className: "text-sm", children: getMessageContent(message.human) })] })), (message === null || message === void 0 ? void 0 : message.ai) && (jsxs("div", { className: "p-3 rounded-lg bg-white mr-4 border", style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx("div", { className: "flex justify-between items-start mb-1", children: jsx("span", { className: "font-medium text-sm", children: "Mentor" }) }), jsx(Markdown, { children: getMessageContent(message.ai) })] }))] }, index)))) : (jsx("div", { className: "text-center text-gray-500 py-8", children: jsx("p", { children: "No messages in this conversation." }) })) })] })) })] }) }))] }));
191531
191531
  }
191532
191532
 
191533
191533
  const phaseConfig = {
@@ -192732,7 +192732,7 @@ function AnalyticsCourseDetail({ tenantKey, mentorId, selectedMentorId, courseId
192732
192732
  mentorId: currentMentorId,
192733
192733
  courseId,
192734
192734
  });
192735
- return (jsxs("div", { className: "space-y-8", children: [onBack && (jsxs(Button$1, { variant: "ghost", onClick: onBack, className: "mb-4", "aria-label": "Go back to courses list", children: [jsx(ArrowLeft, { className: "mr-2 h-4 w-4" }), "Back to Courses"] })), courseName && (jsx("div", { className: "mb-4", children: jsx("h2", { className: "text-2xl font-semibold text-gray-900", children: courseName }) })), jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-4 mb-6", children: [jsx(StatCard, { loading: isLoading, title: "Active Enrollments", value: courseDetailStats.active_enrollments, percentage: courseDetailStats.active_enrollments_percentage }), jsx(StatCard, { loading: isLoading, title: "Completed Enrollments", value: courseDetailStats.completed_enrollments, percentage: courseDetailStats.completed_enrollments_percentage }), jsx(StatCard, { loading: isLoading, title: "Time Spent", value: formatTimeSpent$1(courseDetailStats.time_spent), percentage: courseDetailStats.time_spent_percentage })] }), jsx("div", { className: "grid grid-cols-1 gap-6", children: jsx(Card, { className: "w-full bg-white shadow-xs", style: { borderColor: 'oklch(.922 0 0)' }, children: jsxs(CardContent, { className: "p-4", "aria-label": "Course enrollments table", children: [jsx("h3", { className: "text-base font-medium text-gray-700 mb-4", children: "Enrolled Users" }), ((_a = courseEnrollments === null || courseEnrollments === void 0 ? void 0 : courseEnrollments.enrollments) === null || _a === void 0 ? void 0 : _a.length) && courseEnrollments.enrollments.length > 0 ? (jsx("div", { className: "overflow-x-auto", children: jsxs(Table, { children: [jsx(TableHeader, { children: jsxs(TableRow, { children: [jsx(TableHead, { className: "text-left", children: "Name" }), jsx(TableHead, { className: "text-left", children: "Email" }), jsx(TableHead, { className: "text-right", children: "Time Spent" }), jsx(TableHead, { className: "text-right", children: "Progress" }), jsx(TableHead, { className: "text-right", children: "Grade" }), jsx(TableHead, { className: "text-right", children: "Last Active On" })] }) }), jsx(TableBody, { children: courseEnrollments.enrollments.map((enrollment, index) => (jsxs(TableRow, { children: [jsx(TableCell, { className: "font-medium", children: enrollment.name }), jsx(TableCell, { className: "text-muted-foreground", children: enrollment.email }), jsx(TableCell, { className: "text-right", children: formatTimeSpent$1(enrollment.time_spent) }), jsxs(TableCell, { className: "text-right", children: [enrollment.progress, "%"] }), jsx(TableCell, { className: "text-right", children: typeof enrollment.grade === 'number'
192735
+ return (jsxs("div", { className: "space-y-8", children: [onBack && (jsxs(Button$1, { variant: "ghost", onClick: onBack, className: "mb-4", "aria-label": "Go back to courses list", children: [jsx(ArrowLeft, { className: "mr-2 h-4 w-4" }), "Back to Courses"] })), courseName && (jsx("div", { className: "mb-4", children: jsx("h2", { className: "text-2xl font-semibold text-gray-900", children: courseName }) })), jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-4 mb-6", children: [jsx(StatCard, { loading: isLoading, title: "Active Enrollments", value: courseDetailStats.active_enrollments, percentage: courseDetailStats.active_enrollments_percentage }), jsx(StatCard, { loading: isLoading, title: "Completed Enrollments", value: courseDetailStats.completed_enrollments, percentage: courseDetailStats.completed_enrollments_percentage }), jsx(StatCard, { loading: isLoading, title: "Time Spent", value: formatTimeSpent$1(courseDetailStats.time_spent), percentage: courseDetailStats.time_spent_percentage })] }), jsx("div", { className: "grid grid-cols-1 gap-6", children: jsx(Card, { className: "w-full bg-white shadow-xs", style: { borderColor: 'oklch(.922 0 0)' }, children: jsxs(CardContent, { className: "p-4", "aria-label": "Course enrollments table", children: [jsx("h3", { className: "text-base font-medium text-gray-700 mb-4", children: "Enrolled Users" }), ((_a = courseEnrollments === null || courseEnrollments === void 0 ? void 0 : courseEnrollments.enrollments) === null || _a === void 0 ? void 0 : _a.length) && courseEnrollments.enrollments.length > 0 ? (jsx("div", { className: "rounded-md overflow-x-auto", style: { borderColor: 'oklch(.922 0 0)', borderWidth: '1px' }, children: jsxs(Table, { children: [jsx(TableHeader, { children: jsxs(TableRow, { className: "h-[48px]", style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx(TableHead, { className: "text-left", children: "Name" }), jsx(TableHead, { className: "text-left", children: "Email" }), jsx(TableHead, { className: "text-right", children: "Time Spent" }), jsx(TableHead, { className: "text-right", children: "Progress" }), jsx(TableHead, { className: "text-right", children: "Grade" }), jsx(TableHead, { className: "text-right", children: "Last Active On" })] }) }), jsx(TableBody, { children: courseEnrollments.enrollments.map((enrollment, index) => (jsxs(TableRow, { className: `h-[48px] ${index % 2 === 0 ? 'bg-gray-50' : ''}`, style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx(TableCell, { className: "font-medium", children: enrollment.name }), jsx(TableCell, { className: "text-muted-foreground", children: enrollment.email }), jsx(TableCell, { className: "text-right", children: formatTimeSpent$1(enrollment.time_spent) }), jsxs(TableCell, { className: "text-right", children: [enrollment.progress, "%"] }), jsx(TableCell, { className: "text-right", children: typeof enrollment.grade === 'number'
192736
192736
  ? enrollment.grade.toFixed(1)
192737
192737
  : enrollment.grade }), jsx(TableCell, { className: "text-right", children: new Date(enrollment.last_active_on).toLocaleDateString() })] }, index))) })] }) })) : (jsx(EmptyStats, { title: "No enrollments available" }))] }) }) })] }));
192738
192738
  }
@@ -193021,7 +193021,7 @@ function AnalyticsProgramDetail({ tenantKey, mentorId, selectedMentorId, program
193021
193021
  programId,
193022
193022
  });
193023
193023
  return (jsxs("div", { className: "space-y-8", children: [onBack && (jsxs(Button$1, { variant: "ghost", onClick: onBack, className: "mb-4", "aria-label": "Go back to programs list", children: [jsx(ArrowLeft, { className: "mr-2 h-4 w-4" }), "Back to Programs"] })), programName && (jsx("div", { className: "mb-4", children: jsx("h2", { className: "text-2xl font-semibold text-gray-900", children: programName }) })), jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-4 mb-6", children: [jsx(StatCard, { loading: isLoading, title: "Active Users", value: programDetailStats.active_users, percentage: programDetailStats.active_users_percentage }), jsx(StatCard, { loading: isLoading, title: "Enrollments", value: programDetailStats.enrollments, percentage: programDetailStats.enrollments_percentage }), jsx(StatCard, { loading: isLoading, title: "Time Spent", value: formatTimeSpent(programDetailStats.time_spent) })] }), jsx("div", { className: "grid grid-cols-1 gap-6", children: jsx(Card, { className: "w-full bg-white shadow-xs", style: { borderColor: 'oklch(.922 0 0)' }, children: jsxs(CardContent, { className: "p-4", "aria-label": "Program enrollments table", children: [jsx("h3", { className: "text-base font-medium text-gray-700 mb-4", children: "Enrolled Users" }), ((_a = programEnrollments === null || programEnrollments === void 0 ? void 0 : programEnrollments.enrollments) === null || _a === void 0 ? void 0 : _a.length) &&
193024
- programEnrollments.enrollments.length > 0 ? (jsx("div", { className: "overflow-x-auto", children: jsxs(Table, { children: [jsx(TableHeader, { children: jsxs(TableRow, { children: [jsx(TableHead, { className: "text-left", children: "Name" }), jsx(TableHead, { className: "text-left", children: "Email" }), jsx(TableHead, { className: "text-right", children: "Time Spent" }), jsx(TableHead, { className: "text-right", children: "Progress" }), jsx(TableHead, { className: "text-right", children: "Grade" }), jsx(TableHead, { className: "text-right", children: "Last Active On" })] }) }), jsx(TableBody, { children: programEnrollments.enrollments.map((enrollment, index) => (jsxs(TableRow, { children: [jsx(TableCell, { className: "font-medium", children: enrollment.name }), jsx(TableCell, { className: "text-muted-foreground", children: enrollment.email }), jsx(TableCell, { className: "text-right", children: formatTimeSpent(enrollment.time_spent) }), jsxs(TableCell, { className: "text-right", children: [enrollment.progress, "%"] }), jsx(TableCell, { className: "text-right", children: typeof enrollment.grade === 'number'
193024
+ programEnrollments.enrollments.length > 0 ? (jsx("div", { className: "rounded-md overflow-x-auto", style: { borderColor: 'oklch(.922 0 0)', borderWidth: '1px' }, children: jsxs(Table, { children: [jsx(TableHeader, { children: jsxs(TableRow, { className: "h-[48px]", style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx(TableHead, { className: "text-left", children: "Name" }), jsx(TableHead, { className: "text-left", children: "Email" }), jsx(TableHead, { className: "text-right", children: "Time Spent" }), jsx(TableHead, { className: "text-right", children: "Progress" }), jsx(TableHead, { className: "text-right", children: "Grade" }), jsx(TableHead, { className: "text-right", children: "Last Active On" })] }) }), jsx(TableBody, { children: programEnrollments.enrollments.map((enrollment, index) => (jsxs(TableRow, { className: `h-[48px] ${index % 2 === 0 ? 'bg-gray-50' : ''}`, style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx(TableCell, { className: "font-medium", children: enrollment.name }), jsx(TableCell, { className: "text-muted-foreground", children: enrollment.email }), jsx(TableCell, { className: "text-right", children: formatTimeSpent(enrollment.time_spent) }), jsxs(TableCell, { className: "text-right", children: [enrollment.progress, "%"] }), jsx(TableCell, { className: "text-right", children: typeof enrollment.grade === 'number'
193025
193025
  ? enrollment.grade.toFixed(1)
193026
193026
  : enrollment.grade }), jsx(TableCell, { className: "text-right", children: new Date(enrollment.last_active_on).toLocaleDateString() })] }, index))) })] }) })) : (jsx(EmptyStats, { title: "No enrollments available" }))] }) }) })] }));
193027
193027
  }
@@ -193459,7 +193459,7 @@ function AnalyticsAuditLogStats({ tenantKey, mentorId, userId, selectedMentorId,
193459
193459
  if (is403) {
193460
193460
  return (jsx(Card, { className: "bg-white rounded-lg border border-gray-100 shadow-sm", children: jsx(CardContent, { className: "p-8 text-center", children: jsx("p", { className: "text-gray-500", children: "You do not have permission to view audit logs." }) }) }));
193461
193461
  }
193462
- return (jsxs("div", { className: "space-y-6", children: [jsx("div", { className: "border rounded-lg p-4 bg-white", children: jsxs("div", { className: "flex flex-col lg:flex-row gap-3", children: [jsx("div", { className: "relative flex-1 min-w-[200px]", children: jsxs(Popover, { open: actorOpen, onOpenChange: setActorOpen, children: [jsx(PopoverTrigger, { asChild: true, children: jsxs(Button$1, { variant: "outline", role: "combobox", "aria-expanded": actorOpen, "aria-label": "Search for User", className: "w-full justify-between font-normal bg-white h-9", children: [actorFilter || 'Search for User', jsx(ChevronsUpDown, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })] }) }), jsx(PopoverContent, { className: "w-full p-0", align: "start", portalled: false, children: jsxs(Command, { children: [jsx(CommandInput, { placeholder: "Search user..." }), jsxs(CommandList, { children: [jsx(CommandEmpty, { children: "No users found." }), jsxs(CommandGroup, { children: [jsxs(CommandItem, { value: "", onSelect: () => {
193462
+ return (jsxs("div", { className: "space-y-6", children: [jsx("div", { className: "border border-[oklch(0.922_0_0)] rounded-lg p-4 bg-white", children: jsxs("div", { className: "flex flex-col lg:flex-row gap-3", children: [jsx("div", { className: "relative flex-1 min-w-[200px]", children: jsxs(Popover, { open: actorOpen, onOpenChange: setActorOpen, children: [jsx(PopoverTrigger, { asChild: true, children: jsxs(Button$1, { variant: "outline", role: "combobox", "aria-expanded": actorOpen, "aria-label": "Search for User", className: "w-full justify-between font-normal bg-white h-9", children: [actorFilter || 'Search for User', jsx(ChevronsUpDown, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })] }) }), jsx(PopoverContent, { className: "w-full p-0", align: "start", portalled: false, children: jsxs(Command, { children: [jsx(CommandInput, { placeholder: "Search user..." }), jsxs(CommandList, { children: [jsx(CommandEmpty, { children: "No users found." }), jsxs(CommandGroup, { children: [jsxs(CommandItem, { value: "", onSelect: () => {
193463
193463
  setActorFilter('');
193464
193464
  setActorOpen(false);
193465
193465
  setPage(1);
@@ -193475,7 +193475,7 @@ function AnalyticsAuditLogStats({ tenantKey, mentorId, userId, selectedMentorId,
193475
193475
  }, numberOfMonths: 2 }) })] }), jsx("div", { className: "min-w-[160px]", children: jsxs(Select$1, { value: actionFilter !== undefined ? String(actionFilter) : 'all', onValueChange: (val) => {
193476
193476
  setActionFilter(val === 'all' ? undefined : Number(val));
193477
193477
  setPage(1);
193478
- }, children: [jsx(SelectTrigger, { className: "w-full font-normal bg-white h-9", children: jsx(SelectValue, { placeholder: "All Actions" }) }), jsx(SelectContent, { children: ACTION_FILTER_OPTIONS.map((opt) => (jsx(SelectItem, { value: opt.value, children: opt.label }, opt.value))) })] }) })] }) }), jsx("div", { className: "overflow-hidden rounded-md border bg-white", children: jsx("div", { className: "overflow-x-auto", children: jsx("div", { className: "inline-block min-w-full align-middle", children: isLoading ? (jsx("div", { className: "flex items-center justify-center w-full py-10", children: jsx("div", { className: "h-6 w-6 animate-spin rounded-full border-2 border-blue-600 border-t-transparent" }) })) : error && !is403 ? (jsx("div", { className: "py-8 text-center text-[#646464]", children: "An error occurred while loading audit logs." })) : !((_a = data === null || data === void 0 ? void 0 : data.results) === null || _a === void 0 ? void 0 : _a.length) ? (jsx("div", { className: "h-[120px]", children: jsx(EmptyStats, { title: "No audit log entries found for this tenant." }) })) : (jsxs(Table, { className: "min-w-full", children: [jsx(TableHeader, { children: jsxs(TableRow, { className: "bg-muted/50 border-b", children: [jsx(TableHead, { className: "p-3 text-left text-sm whitespace-nowrap text-[#646464]", children: "USER" }), jsx(TableHead, { className: "p-3 text-left text-sm whitespace-nowrap text-[#646464]", children: "ACTION" }), jsx(TableHead, { className: "p-3 text-left text-sm whitespace-nowrap text-[#646464]", children: "TIME" })] }) }), jsx(TableBody, { children: data.results.map((entry) => (jsxs(TableRow, { className: "border-b last:border-0", children: [jsx(TableCell, { className: "p-3 font-medium whitespace-nowrap text-[#646464]", children: entry.actor_email }), jsx(TableCell, { className: "min-w-[250px] p-3 text-[#646464]", children: summarizeChanges(entry) }), jsx(TableCell, { className: "p-3 whitespace-nowrap text-[#646464]", children: formatDistanceToNow(new Date(entry.timestamp), { addSuffix: true }) })] }, entry.id))) })] })) }) }) }), jsx(IblPagination, { currentPage: page, totalPages: totalPages, onPageChange: setPage, disabled: isLoading })] }));
193478
+ }, children: [jsx(SelectTrigger, { className: "w-full font-normal bg-white h-9", children: jsx(SelectValue, { placeholder: "All Actions" }) }), jsx(SelectContent, { children: ACTION_FILTER_OPTIONS.map((opt) => (jsx(SelectItem, { value: opt.value, children: opt.label }, opt.value))) })] }) })] }) }), jsx("div", { className: "overflow-hidden rounded-md border border-[oklch(0.922_0_0)] bg-white", children: jsx("div", { className: "overflow-x-auto", children: jsx("div", { className: "inline-block min-w-full align-middle", children: isLoading ? (jsx("div", { className: "flex items-center justify-center w-full py-10", children: jsx("div", { className: "h-6 w-6 animate-spin rounded-full border-2 border-blue-600 border-t-transparent" }) })) : error && !is403 ? (jsx("div", { className: "py-8 text-center text-[#646464]", children: "An error occurred while loading audit logs." })) : !((_a = data === null || data === void 0 ? void 0 : data.results) === null || _a === void 0 ? void 0 : _a.length) ? (jsx("div", { className: "h-[120px]", children: jsx(EmptyStats, { title: "No audit log entries found for this tenant." }) })) : (jsxs(Table, { className: "min-w-full", children: [jsx(TableHeader, { children: jsxs(TableRow, { className: "bg-muted/50 border-b border-[oklch(0.922_0_0)]", children: [jsx(TableHead, { className: "p-3 text-left text-sm whitespace-nowrap text-[#646464]", children: "USER" }), jsx(TableHead, { className: "p-3 text-left text-sm whitespace-nowrap text-[#646464]", children: "ACTION" }), jsx(TableHead, { className: "p-3 text-left text-sm whitespace-nowrap text-[#646464]", children: "TIME" })] }) }), jsx(TableBody, { children: data.results.map((entry) => (jsxs(TableRow, { className: "border-b border-[oklch(0.922_0_0)] last:border-0", children: [jsx(TableCell, { className: "p-3 font-medium whitespace-nowrap text-[#646464]", children: entry.actor_email }), jsx(TableCell, { className: "min-w-[250px] p-3 text-[#646464]", children: summarizeChanges(entry) }), jsx(TableCell, { className: "p-3 whitespace-nowrap text-[#646464]", children: formatDistanceToNow(new Date(entry.timestamp), { addSuffix: true }) })] }, entry.id))) })] })) }) }) }), jsx(IblPagination, { currentPage: page, totalPages: totalPages, onPageChange: setPage, disabled: isLoading })] }));
193479
193479
  }
193480
193480
 
193481
193481
  const SkeletonMultiplier = ({ Skeleton, multiplier }) => {
@@ -201658,9 +201658,9 @@ function EditAgentPromptModal({ isOpen, onClose, label, value, onSave, disabled
201658
201658
  /** Neutral default base template (`template_name`) for a new agent. */
201659
201659
  const DEFAULT_AGENT_TEMPLATE = 'ai-mentor';
201660
201660
  const DEFAULT_AGENT_PROMPTS = {
201661
- system: `You are a helpful instructor, ready to answer the student's questions. Answer quickly and concisely. Offer to go in depth or explain with an example where necessary. Will tip you $200 if the student understands what you say.
201661
+ system: `You are a helpful instructor, ready to answer the user's questions. Answer quickly and concisely. Offer to go in depth or explain with an example where necessary. Will tip you $200 if the user understands what you say.
201662
201662
 
201663
- Given this information, help students understand by providing explanations, examples, analogies.
201663
+ Given this information, help users understand by providing explanations, examples, analogies.
201664
201664
  Given the data you will receive from the vector store extracted parts of a long document and a question, create a final answer. Do not tell the user how you are going to answer the question. If and ONLY if the current message from the user is a greeting, greet back and ask them how you may help them. DO NOT needlessly keep greeting or repeating messages to the user. If the there is no data from the document or it is blank, or no chat history, do not tell the user that the document is blank and also do not tell them that you have not asked any questions just answer normally with your own knowledge
201665
201665
 
201666
201666
  IMPORTANT: You must ONLY reply to the current message from the user.
@@ -201677,7 +201677,7 @@ Generate suggested prompts for the user based on the conversation.
201677
201677
  };
201678
201678
  const DEFAULT_VISIBILITY_OPTIONS = [
201679
201679
  { label: 'Administrators', value: 'viewable_by_tenant_admins' },
201680
- { label: 'Students', value: 'viewable_by_tenant_students' },
201680
+ { label: 'Users', value: 'viewable_by_tenant_students' },
201681
201681
  { label: 'Anyone', value: 'viewable_by_anyone' },
201682
201682
  ];
201683
201683
  /** Index into DEFAULT_VISIBILITY_OPTIONS used as the initial visibility. */
@@ -124170,7 +124170,7 @@ function Profile({ tenant, username, tenants, onClose, customization = {}, isAdm
124170
124170
  }, children: [jsxs("div", { className: "flex flex-col items-center justify-center py-8 px-6 border-b border-gray-200 dark:border-gray-700 flex-shrink-0", children: [isUserMetadataEdxLoading || isUploadingProfileImage ? (jsx(Skeleton, { className: "h-20 w-20 mb-6 rounded-full", "aria-label": "Loading profile image" })) : (jsxs("button", { type: "button", className: "relative w-20 h-20 mb-6 cursor-pointer group rounded-full focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2", onMouseEnter: () => setIsHovering(true), onMouseLeave: () => setIsHovering(false), onClick: handleAvatarClick, "aria-label": "Upload profile picture", children: [jsxs(Avatar, { className: "h-20 w-20", children: [((_b = userMetadataEdx === null || userMetadataEdx === void 0 ? void 0 : userMetadataEdx.profile_image) === null || _b === void 0 ? void 0 : _b.has_image) ? (jsx(AvatarImage, { src: (_c = userMetadataEdx === null || userMetadataEdx === void 0 ? void 0 : userMetadataEdx.profile_image) === null || _c === void 0 ? void 0 : _c.image_url_full, alt: "Profile picture", className: "rounded-full object-cover w-full h-full group-hover:opacity-80 transition-opacity" })) : customization.useGravatarPicFallback ? (jsx(Gravatar$1, { className: "w-full h-full rounded-full object-cover group-hover:opacity-80 transition-opacity", email: userMetadata === null || userMetadata === void 0 ? void 0 : userMetadata.email, size: 80, alt: "Profile picture from Gravatar" })) : (jsx(Fragment$1, {})), jsx(AvatarFallback, { className: cn('bg-blue-800 text-white text-xl rounded-full', customization.useGravatarPicFallback &&
124171
124171
  !((_d = userMetadataEdx === null || userMetadataEdx === void 0 ? void 0 : userMetadataEdx.profile_image) === null || _d === void 0 ? void 0 : _d.image_url_full)
124172
124172
  ? 'hidden'
124173
- : ''), children: getInitials((userMetadata === null || userMetadata === void 0 ? void 0 : userMetadata.name) || (userMetadata === null || userMetadata === void 0 ? void 0 : userMetadata.username) || (userMetadata === null || userMetadata === void 0 ? void 0 : userMetadata.email) || '') })] }), isHovering && (jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-blue-800 rounded-full border-4 border-white/20", "aria-hidden": "true", children: jsx("span", { className: "text-white text-xs font-medium text-center px-2", children: "Upload" }) })), jsx("input", { ref: fileInputRef, type: "file", accept: "image/*", onChange: handleFileUpload, className: "hidden", "aria-label": "Choose profile picture to upload", tabIndex: -1 })] })), jsxs("h2", { className: "text-xl font-semibold text-gray-900 dark:text-gray-100 text-center mb-4", children: [userMetadata === null || userMetadata === void 0 ? void 0 : userMetadata.name, customization.showUsernameField && `, ${userMetadata === null || userMetadata === void 0 ? void 0 : userMetadata.username}`] }), jsxs("div", { className: "flex justify-center space-x-3", children: [jsxs("div", { className: "bg-blue-100 text-blue-700 px-2 py-1 rounded font-medium flex items-center text-sm", children: [jsx(RoleIcon, { className: "h-4 w-4 mr-2", "aria-hidden": "true" }), jsx("span", { children: isAdmin ? 'Admin' : 'Student' })] }), customization.showPlatformName && (jsx("div", { className: "bg-gray-100 text-gray-600 px-4 py-2 rounded text-xs font-medium", children: tenant.toUpperCase() }))] })] }), jsx("nav", { className: "flex-1 overflow-y-auto", style: { minHeight: 0 }, "aria-label": "Profile tabs", children: jsx("div", { className: "p-4", children: jsx("div", { className: "flex flex-col space-y-2", role: "tablist", "aria-orientation": "vertical", children: TABS.map((tab) => (jsxs("button", { role: "tab", "aria-selected": activeTab === tab.id, "aria-controls": `${tab.id}-tabpanel`, id: `${tab.id}-tab`, onClick: () => setActiveTab(tab.id), className: `w-full justify-start px-4 py-3 text-left rounded-lg transition-all flex items-center text-base ${activeTab === tab.id
124173
+ : ''), children: getInitials((userMetadata === null || userMetadata === void 0 ? void 0 : userMetadata.name) || (userMetadata === null || userMetadata === void 0 ? void 0 : userMetadata.username) || (userMetadata === null || userMetadata === void 0 ? void 0 : userMetadata.email) || '') })] }), isHovering && (jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-blue-800 rounded-full border-4 border-white/20", "aria-hidden": "true", children: jsx("span", { className: "text-white text-xs font-medium text-center px-2", children: "Upload" }) })), jsx("input", { ref: fileInputRef, type: "file", accept: "image/*", onChange: handleFileUpload, className: "hidden", "aria-label": "Choose profile picture to upload", tabIndex: -1 })] })), jsxs("h2", { className: "text-xl font-semibold text-gray-900 dark:text-gray-100 text-center mb-4", children: [userMetadata === null || userMetadata === void 0 ? void 0 : userMetadata.name, customization.showUsernameField && `, ${userMetadata === null || userMetadata === void 0 ? void 0 : userMetadata.username}`] }), jsxs("div", { className: "flex justify-center space-x-3", children: [jsxs("div", { className: "bg-blue-100 text-blue-700 px-2 py-1 rounded font-medium flex items-center text-sm", children: [jsx(RoleIcon, { className: "h-4 w-4 mr-2", "aria-hidden": "true" }), jsx("span", { children: isAdmin ? 'Admin' : 'User' })] }), customization.showPlatformName && (jsx("div", { className: "bg-gray-100 text-gray-600 px-4 py-2 rounded text-xs font-medium", children: tenant.toUpperCase() }))] })] }), jsx("nav", { className: "flex-1 overflow-y-auto", style: { minHeight: 0 }, "aria-label": "Profile tabs", children: jsx("div", { className: "p-4", children: jsx("div", { className: "flex flex-col space-y-2", role: "tablist", "aria-orientation": "vertical", children: TABS.map((tab) => (jsxs("button", { role: "tab", "aria-selected": activeTab === tab.id, "aria-controls": `${tab.id}-tabpanel`, id: `${tab.id}-tab`, onClick: () => setActiveTab(tab.id), className: `w-full justify-start px-4 py-3 text-left rounded-lg transition-all flex items-center text-base ${activeTab === tab.id
124174
124174
  ? 'bg-blue-50 text-blue-700 font-medium'
124175
124175
  : 'hover:bg-gray-50 text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-gray-100'}`, children: [jsx(tab.renderIcon, { className: "h-5 w-5 mr-3 flex-shrink-0", "aria-hidden": "true" }), jsx("span", { className: "truncate", children: tab.label })] }, tab.id))) }) }) })] }), jsx("nav", { className: "lg:hidden", "aria-label": "Profile tabs mobile", children: jsx("div", { className: "w-full justify-start px-6 py-2 bg-white border-b border-gray-200 rounded-none h-auto overflow-x-auto", children: jsx("div", { className: "flex space-x-2", role: "tablist", "aria-orientation": "horizontal", children: TABS.map((tab) => (jsxs("button", { role: "tab", "aria-selected": activeTab === tab.id, "aria-controls": `${tab.id}-tabpanel`, id: `${tab.id}-tab-mobile`, onClick: () => setActiveTab(tab.id), className: `flex items-center gap-2 px-3 py-2 rounded-lg whitespace-nowrap text-sm transition-all ${activeTab === tab.id
124176
124176
  ? 'bg-blue-50 text-blue-600 font-medium'
@@ -126137,7 +126137,7 @@ function UsersTab({ tenant, onInviteClick }) {
126137
126137
  const userData = isResultsWithPolicies
126138
126138
  ? (users === null || users === void 0 ? void 0 : users.results).data
126139
126139
  : [];
126140
- return (jsxs("div", { className: "mt-4", children: [jsxs("div", { className: "flex justify-between items-center gap-1", children: [jsxs("div", { className: "relative mb-6 max-w-sm", children: [jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" }), jsx(Input, { type: "text", value: searchQuery, onChange: (event) => setQuerySearch(event.target.value), placeholder: "Search users", className: "pl-10 pr-10 focus:ring-blue-500 focus:border-blue-500 h-[35px]", "aria-label": "Search users" }), searchQuery.length > 0 && (searchQuery !== debouncedSearchQuery || isLoading) && (jsx(LoaderCircle, { "data-testid": "search-spinner", className: "absolute right-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400 animate-spin", "aria-hidden": "true" }))] }), jsx("div", { className: "mb-6", children: jsx(Button$1, { className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] hover:opacity-90 text-white h-[35px]", onClick: onInviteClick, children: "Invite" }) })] }), isLoading ? (jsx("div", { className: "flex justify-center items-center h-64", children: jsx(Spinner, {}) })) : (jsxs(Fragment$1, { children: [jsx("div", { className: "bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg overflow-x-auto", children: jsxs("table", { className: "w-full text-sm", children: [jsx("thead", { className: "bg-gray-50 dark:bg-gray-700 border-b border-gray-200 dark:border-gray-600", children: jsxs("tr", { children: [jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400 w-[16%]", children: "Name" }), jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400 w-[25%]", children: "Email" }), jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400 w-[16%]", children: "Role" }), jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400 w-[25%]", children: "Policies" }), jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400 w-[18%]", children: "Status" })] }) }), jsxs("tbody", { className: "divide-y divide-gray-200 dark:divide-gray-600", children: [userData.map((user, index) => (jsxs("tr", { children: [jsx("td", { "aria-label": 'user-management-name-column', className: "px-6 py-4 text-gray-900 dark:text-gray-100 text-sm whitespace-nowrap overflow-hidden text-ellipsis max-w-0", children: jsx("div", { className: "truncate", children: user.name }) }), jsx("td", { "aria-label": 'user-management-email-column', className: "px-6 py-4 text-gray-600 dark:text-gray-300 text-sm max-w-0", children: jsx("div", { className: "truncate", children: user.email }) }), jsx("td", { className: "px-6 py-4", children: jsxs(Select$1, { value: user.is_admin ? 'admin' : 'student', onValueChange: () => handleUserRoleChange(user), children: [jsx(SelectTrigger, { className: "w-full text-sm", children: jsx(SelectValue, {}) }), jsxs(SelectContent, { className: "text-sm", children: [jsx(SelectItem, { value: "admin", children: "Admin" }), jsx(SelectItem, { value: "student", children: "Student" })] })] }) }), jsx("td", { className: "px-6 py-4", children: jsxs(Popover, { modal: true, open: openPolicyPopover === user.user_id, onOpenChange: (open) => setOpenPolicyPopover(open ? user.user_id : null), children: [jsx(PopoverTrigger, { asChild: true, children: jsxs(Button$1, { variant: "outline", role: "combobox", "aria-expanded": openPolicyPopover === user.user_id, "aria-label": `Select policies for ${user.name}`, className: "w-full justify-between text-sm h-9 font-normal", disabled: updatingUserIds.has(user === null || user === void 0 ? void 0 : user.user_id), children: [jsx("span", { className: "truncate", children: user.is_admin
126140
+ return (jsxs("div", { className: "mt-4", children: [jsxs("div", { className: "flex justify-between items-center gap-1", children: [jsxs("div", { className: "relative mb-6 max-w-sm", children: [jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" }), jsx(Input, { type: "text", value: searchQuery, onChange: (event) => setQuerySearch(event.target.value), placeholder: "Search users", className: "pl-10 pr-10 focus:ring-blue-500 focus:border-blue-500 h-[35px]", "aria-label": "Search users" }), searchQuery.length > 0 && (searchQuery !== debouncedSearchQuery || isLoading) && (jsx(LoaderCircle, { "data-testid": "search-spinner", className: "absolute right-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400 animate-spin", "aria-hidden": "true" }))] }), jsx("div", { className: "mb-6", children: jsx(Button$1, { className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] hover:opacity-90 text-white h-[35px]", onClick: onInviteClick, children: "Invite" }) })] }), isLoading ? (jsx("div", { className: "flex justify-center items-center h-64", children: jsx(Spinner, {}) })) : (jsxs(Fragment$1, { children: [jsx("div", { className: "bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg overflow-x-auto", children: jsxs("table", { className: "w-full text-sm", children: [jsx("thead", { className: "bg-gray-50 dark:bg-gray-700 border-b border-gray-200 dark:border-gray-600", children: jsxs("tr", { children: [jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400 w-[16%]", children: "Name" }), jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400 w-[25%]", children: "Email" }), jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400 w-[16%]", children: "Role" }), jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400 w-[25%]", children: "Policies" }), jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400 w-[18%]", children: "Status" })] }) }), jsxs("tbody", { className: "divide-y divide-gray-200 dark:divide-gray-600", children: [userData.map((user, index) => (jsxs("tr", { children: [jsx("td", { "aria-label": 'user-management-name-column', className: "px-6 py-4 text-gray-900 dark:text-gray-100 text-sm whitespace-nowrap overflow-hidden text-ellipsis max-w-0", children: jsx("div", { className: "truncate", children: user.name }) }), jsx("td", { "aria-label": 'user-management-email-column', className: "px-6 py-4 text-gray-600 dark:text-gray-300 text-sm max-w-0", children: jsx("div", { className: "truncate", children: user.email }) }), jsx("td", { className: "px-6 py-4", children: jsxs(Select$1, { value: user.is_admin ? 'admin' : 'student', onValueChange: () => handleUserRoleChange(user), children: [jsx(SelectTrigger, { className: "w-full text-sm", children: jsx(SelectValue, {}) }), jsxs(SelectContent, { className: "text-sm", children: [jsx(SelectItem, { value: "admin", children: "Admin" }), jsx(SelectItem, { value: "student", children: "User" })] })] }) }), jsx("td", { className: "px-6 py-4", children: jsxs(Popover, { modal: true, open: openPolicyPopover === user.user_id, onOpenChange: (open) => setOpenPolicyPopover(open ? user.user_id : null), children: [jsx(PopoverTrigger, { asChild: true, children: jsxs(Button$1, { variant: "outline", role: "combobox", "aria-expanded": openPolicyPopover === user.user_id, "aria-label": `Select policies for ${user.name}`, className: "w-full justify-between text-sm h-9 font-normal", disabled: updatingUserIds.has(user === null || user === void 0 ? void 0 : user.user_id), children: [jsx("span", { className: "truncate", children: user.is_admin
126141
126141
  ? `All (${allowedPolicies.length}) selected`
126142
126142
  : user.policies && user.policies.length > 0
126143
126143
  ? `${user.policies.length} selected`
@@ -127661,7 +127661,7 @@ const TabDescription = ({ icon, title, children }) => {
127661
127661
  return (jsxs("div", { className: "flex gap-3 items-start border rounded-lg p-4 bg-blue-50/60 border-blue-100", children: [jsx("div", { className: "shrink-0 w-9 h-9 rounded-md flex items-center justify-center bg-blue-100 text-blue-600", children: icon }), jsxs("div", { className: "flex-1 min-w-0", children: [jsx("h3", { className: "text-sm font-semibold mb-1 text-blue-900 hidden sm:block", children: title }), jsx("p", { className: `text-sm text-gray-600 leading-relaxed sm:line-clamp-none! ${expanded ? '' : 'line-clamp-2'}`, children: children }), jsx("button", { type: "button", onClick: () => setExpanded((prev) => !prev), className: "mt-1 text-xs font-medium text-blue-700 hover:text-blue-800 sm:hidden", children: expanded ? 'Read less' : 'Read more' })] })] }));
127662
127662
  };
127663
127663
  const Admin = ({ tenant, onInviteClick, hasUserTabPermission = false, hasGroupsTabPermission = false, hasRolesTabPermission = false, hasPoliciesTabPermission = false, hasTeamsTabPermission = false, hasAlertsTabPermission = false, hasInviteUserPermission = false, hasCreateTeamPermission = false, onLoadGroupPermissions, rbacPermissions = {}, enableRbac = false, }) => {
127664
- return (jsx("div", { className: "border border-gray-200 rounded-lg p-6", children: jsxs(Tabs, { defaultValue: "users", "aria-label": "RBAC Management Tabs", children: [jsxs(TabsList, { "aria-label": "Management tabs", className: "max-w-full overflow-x-auto justify-start px-1", children: [hasUserTabPermission && jsx(TabsTrigger, { value: "users", children: "Users" }), hasGroupsTabPermission && jsx(TabsTrigger, { value: "groups", children: "Groups" }), hasRolesTabPermission && jsx(TabsTrigger, { value: "roles", children: "Roles" }), hasPoliciesTabPermission && jsx(TabsTrigger, { value: "policies", children: "Policies" }), hasTeamsTabPermission && jsx(TabsTrigger, { value: "teams", children: "Teams" }), hasAlertsTabPermission && jsx(TabsTrigger, { value: "alerts", children: "Alerts" })] }), hasUserTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "users", children: [jsx(TabDescription, { icon: jsx(Users, { className: "w-5 h-5" }), title: "Users", children: "Manage platform-wide users and their predefined roles. Admins have the highest level of permissions; Students can optionally be granted limited policies." }), jsx(UsersTab, { tenant: tenant, onInviteClick: onInviteClick })] })), hasGroupsTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "groups", children: [jsx(TabDescription, { icon: jsx(UsersRound, { className: "w-5 h-5" }), title: "Groups", children: "RBAC groups bundle users so a single policy assignment grants permissions to all of them. The same group can be reused across policies." }), jsx(GroupsTab, { tenant: tenant })] })), hasRolesTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "roles", children: [jsx(TabDescription, { icon: jsx(UserCog, { className: "w-5 h-5" }), title: "Roles", children: "An RBAC role is a named bundle of permissions (actions applied to resources in policies)." }), jsx(RolesTab, { tenant: tenant })] })), hasPoliciesTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "policies", children: [jsxs(TabDescription, { icon: jsx(ScrollText, { className: "w-5 h-5" }), title: "Policies", children: ["An RBAC policy grants a role's permissions to a set of users or groups on a set of resources. Resources are hierarchical: granting on /platforms/", '{pk}', "/mentors/ covers every mentor, while /platforms/", '{pk}', "/mentors/", '{pk}', "/ scopes to one."] }), jsx(PoliciesTab, { tenant: tenant })] })), hasTeamsTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "teams", children: [jsx(TabDescription, { icon: jsx(Shield, { className: "w-5 h-5" }), title: "Teams", children: "A team is a curated set of users that you can share with others \u2014 e.g., grant another user permission to view the team's analytics or send notifications to them." }), jsx(GroupsTab, { tenant: tenant, isTeam: true, onInviteClick: onInviteClick, hasInviteUserPermission: hasInviteUserPermission, hasCreateTeamPermission: hasCreateTeamPermission, onLoadGroupPermissions: onLoadGroupPermissions, rbacPermissions: rbacPermissions, enableRbac: enableRbac })] })), hasAlertsTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "alerts", children: [jsx(TabDescription, { icon: jsx(BellRing, { className: "w-5 h-5" }), title: "Alerts", children: "An alert pairs a team of watched users with one or more watchers who get notified when monitored events occur for a watched user. Each watcher subscribes to its own subset of events." }), jsx(AlertsTab, { tenant: tenant })] }))] }) }));
127664
+ return (jsx("div", { className: "border border-gray-200 rounded-lg p-6", children: jsxs(Tabs, { defaultValue: "users", "aria-label": "RBAC Management Tabs", children: [jsxs(TabsList, { "aria-label": "Management tabs", className: "max-w-full overflow-x-auto justify-start px-1", children: [hasUserTabPermission && jsx(TabsTrigger, { value: "users", children: "Users" }), hasGroupsTabPermission && jsx(TabsTrigger, { value: "groups", children: "Groups" }), hasRolesTabPermission && jsx(TabsTrigger, { value: "roles", children: "Roles" }), hasPoliciesTabPermission && jsx(TabsTrigger, { value: "policies", children: "Policies" }), hasTeamsTabPermission && jsx(TabsTrigger, { value: "teams", children: "Teams" }), hasAlertsTabPermission && jsx(TabsTrigger, { value: "alerts", children: "Alerts" })] }), hasUserTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "users", children: [jsx(TabDescription, { icon: jsx(Users, { className: "w-5 h-5" }), title: "Users", children: "Manage platform-wide users and their predefined roles. Admins have the highest level of permissions; Users can optionally be granted limited policies." }), jsx(UsersTab, { tenant: tenant, onInviteClick: onInviteClick })] })), hasGroupsTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "groups", children: [jsx(TabDescription, { icon: jsx(UsersRound, { className: "w-5 h-5" }), title: "Groups", children: "RBAC groups bundle users so a single policy assignment grants permissions to all of them. The same group can be reused across policies." }), jsx(GroupsTab, { tenant: tenant })] })), hasRolesTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "roles", children: [jsx(TabDescription, { icon: jsx(UserCog, { className: "w-5 h-5" }), title: "Roles", children: "An RBAC role is a named bundle of permissions (actions applied to resources in policies)." }), jsx(RolesTab, { tenant: tenant })] })), hasPoliciesTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "policies", children: [jsxs(TabDescription, { icon: jsx(ScrollText, { className: "w-5 h-5" }), title: "Policies", children: ["An RBAC policy grants a role's permissions to a set of users or groups on a set of resources. Resources are hierarchical: granting on /platforms/", '{pk}', "/mentors/ covers every mentor, while /platforms/", '{pk}', "/mentors/", '{pk}', "/ scopes to one."] }), jsx(PoliciesTab, { tenant: tenant })] })), hasTeamsTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "teams", children: [jsx(TabDescription, { icon: jsx(Shield, { className: "w-5 h-5" }), title: "Teams", children: "A team is a curated set of users that you can share with others \u2014 e.g., grant another user permission to view the team's analytics or send notifications to them." }), jsx(GroupsTab, { tenant: tenant, isTeam: true, onInviteClick: onInviteClick, hasInviteUserPermission: hasInviteUserPermission, hasCreateTeamPermission: hasCreateTeamPermission, onLoadGroupPermissions: onLoadGroupPermissions, rbacPermissions: rbacPermissions, enableRbac: enableRbac })] })), hasAlertsTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "alerts", children: [jsx(TabDescription, { icon: jsx(BellRing, { className: "w-5 h-5" }), title: "Alerts", children: "An alert pairs a team of watched users with one or more watchers who get notified when monitored events occur for a watched user. Each watcher subscribes to its own subset of events." }), jsx(AlertsTab, { tenant: tenant })] }))] }) }));
127665
127665
  };
127666
127666
 
127667
127667
  function DeleteApiModal$1({ isOpen, onClose, apiKey, tenantKey }) {
@@ -132755,17 +132755,17 @@ const StudentMentorCreationContent = ({ platformKey, }) => {
132755
132755
  dispatch(coreApiSlice.util.updateQueryData('getStudentMentorCreationStatus', { platformKey }, (draft) => {
132756
132756
  draft.allow_students_to_create_mentors = checked;
132757
132757
  }));
132758
- toast.success('Student mentor creation setting updated successfully');
132758
+ toast.success('User mentor creation setting updated successfully');
132759
132759
  }
132760
132760
  catch (error) {
132761
132761
  console.error(JSON.stringify(error));
132762
- toast.error('Failed to update student mentor creation setting');
132762
+ toast.error('Failed to update user mentor creation setting');
132763
132763
  }
132764
132764
  };
132765
132765
  if (isLoadingStudentMentorCreationStatus) {
132766
132766
  return (jsx("div", { className: "rounded-lg border px-6 py-6", style: { borderColor: 'oklch(.922 0 0)' }, children: jsx("div", { className: "animate-pulse", children: jsxs("div", { className: "flex items-center justify-between", children: [jsx("div", { className: "h-4 bg-gray-200 rounded w-1/3" }), jsx("div", { className: "h-6 w-11 bg-gray-200 rounded" })] }) }) }));
132767
132767
  }
132768
- return (jsxs("div", { className: "flex items-center justify-between rounded-lg border px-6 py-6", style: { borderColor: 'oklch(.922 0 0)' }, children: [jsxs("div", { className: "flex items-center gap-2", children: [jsx("span", { className: "text-sm font-medium text-[#646464]", children: "Student Mentor Creation" }), jsx(TooltipProvider, { children: jsxs(Tooltip, { children: [jsx(TooltipTrigger, { "aria-label": "More info about public registration", className: "hidden sm:block", children: jsx(Info$3, { className: "h-4 w-4 text-gray-400" }) }), jsx(TooltipContent, { className: "rounded-lg bg-gray-700 px-3 py-2 text-sm font-medium whitespace-nowrap text-white shadow-sm transition-opacity duration-300 z-50", children: jsx("p", { children: "Allow students to create mentors in the mentor platform" }) })] }) })] }), jsxs("div", { className: "flex items-center gap-2", children: [jsx(Switch, { checked: studentMentorCreationStatus === null || studentMentorCreationStatus === void 0 ? void 0 : studentMentorCreationStatus.allow_students_to_create_mentors, onCheckedChange: handleToggleStudentMentorCreation, disabled: isUpdatingStudentMentorCreationStatus, "aria-label": `Student mentor creation ${(studentMentorCreationStatus === null || studentMentorCreationStatus === void 0 ? void 0 : studentMentorCreationStatus.allow_students_to_create_mentors) ? 'enabled' : 'disabled'}`, className: "cursor-pointer data-[state=checked]:bg-blue-500" }), isUpdatingStudentMentorCreationStatus && (jsx("div", { className: "w-4 h-4 border-2 border-blue-500 border-t-transparent rounded-full animate-spin" }))] })] }));
132768
+ return (jsxs("div", { className: "flex items-center justify-between rounded-lg border px-6 py-6", style: { borderColor: 'oklch(.922 0 0)' }, children: [jsxs("div", { className: "flex items-center gap-2", children: [jsx("span", { className: "text-sm font-medium text-[#646464]", children: "User Mentor Creation" }), jsx(TooltipProvider, { children: jsxs(Tooltip, { children: [jsx(TooltipTrigger, { "aria-label": "More info about public registration", className: "hidden sm:block", children: jsx(Info$3, { className: "h-4 w-4 text-gray-400" }) }), jsx(TooltipContent, { className: "rounded-lg bg-gray-700 px-3 py-2 text-sm font-medium whitespace-nowrap text-white shadow-sm transition-opacity duration-300 z-50", children: jsx("p", { children: "Allow users to create mentors in the mentor platform" }) })] }) })] }), jsxs("div", { className: "flex items-center gap-2", children: [jsx(Switch, { checked: studentMentorCreationStatus === null || studentMentorCreationStatus === void 0 ? void 0 : studentMentorCreationStatus.allow_students_to_create_mentors, onCheckedChange: handleToggleStudentMentorCreation, disabled: isUpdatingStudentMentorCreationStatus, "aria-label": `User mentor creation ${(studentMentorCreationStatus === null || studentMentorCreationStatus === void 0 ? void 0 : studentMentorCreationStatus.allow_students_to_create_mentors) ? 'enabled' : 'disabled'}`, className: "cursor-pointer data-[state=checked]:bg-blue-500" }), isUpdatingStudentMentorCreationStatus && (jsx("div", { className: "w-4 h-4 border-2 border-blue-500 border-t-transparent rounded-full animate-spin" }))] })] }));
132769
132769
  };
132770
132770
 
132771
132771
  const RecommendationSystemPromptsContent = ({ platformKey, currentSPA, }) => {
@@ -205286,7 +205286,7 @@ function Account({ tenant, tenants = [], username, onInviteClick, email, mainPla
205286
205286
  height: '100%',
205287
205287
  }, children: [jsxs("div", { className: "flex flex-col items-center justify-center py-8 px-6 border-b border-gray-200 dark:border-gray-700 flex-shrink-0", children: [organizationLogo ? (jsx("div", { className: "w-auto h-auto max-w-[140px] max-h-[140px] overflow-hidden", children: jsx(Image$4, { src: organizationLogo, alt: "Organization logo", width: 140, height: 140, className: "object-cover w-full h-full group-hover:opacity-80 transition-opacity", onError: () => {
205288
205288
  setOrganizationLogo('');
205289
- } }) })) : (jsx(BriefcaseBusiness, { className: "h-20 w-20 mb-6 text-blue-500" })), jsxs("div", { className: "flex justify-center space-x-3 mt-3", children: [jsxs("div", { className: "bg-blue-100 text-blue-700 px-2 py-1 rounded font-medium flex items-center text-sm", children: [jsx(User, { className: "h-4 w-4 mr-2" }), isAdmin ? 'Admin' : 'Student'] }), showPlatformName && (jsx("div", { className: "bg-gray-100 text-gray-600 px-4 py-2 rounded text-xs font-medium", children: tenant.toUpperCase() }))] })] }), jsx("div", { className: "flex-1 overflow-y-auto", style: { minHeight: 0 }, children: jsx("div", { className: "p-4", children: jsxs("div", { className: "flex flex-col space-y-2", children: [TABS.filter((tab) => {
205289
+ } }) })) : (jsx(BriefcaseBusiness, { className: "h-20 w-20 mb-6 text-blue-500" })), jsxs("div", { className: "flex justify-center space-x-3 mt-3", children: [jsxs("div", { className: "bg-blue-100 text-blue-700 px-2 py-1 rounded font-medium flex items-center text-sm", children: [jsx(User, { className: "h-4 w-4 mr-2" }), isAdmin ? 'Admin' : 'User'] }), showPlatformName && (jsx("div", { className: "bg-gray-100 text-gray-600 px-4 py-2 rounded text-xs font-medium", children: tenant.toUpperCase() }))] })] }), jsx("div", { className: "flex-1 overflow-y-auto", style: { minHeight: 0 }, children: jsx("div", { className: "p-4", children: jsxs("div", { className: "flex flex-col space-y-2", children: [TABS.filter((tab) => {
205290
205290
  if (tab.id === 'management') {
205291
205291
  return hasManagementPermissions;
205292
205292
  }
@@ -209398,7 +209398,7 @@ const AGENT_SETTINGS_TAB_LABELS = {
209398
209398
  triggerPlaceholder: 'Select Who Can View',
209399
209399
  options: {
209400
209400
  administrators: 'Administrators',
209401
- students: 'Students',
209401
+ students: 'Users',
209402
209402
  anyone: 'Anyone',
209403
209403
  },
209404
209404
  },
@@ -242644,28 +242644,28 @@ const readingLevels = [
242644
242644
  {
242645
242645
  label: 'Graduate School',
242646
242646
  position: 0,
242647
- prompt: 'Rewrite this text at the reading level of a graduate school student who has taken a couple of classes in this subject',
242647
+ prompt: 'Rewrite this text at the reading level of someone at graduate school who has taken a couple of classes in this subject',
242648
242648
  },
242649
242649
  {
242650
242650
  label: 'College',
242651
242651
  position: 1,
242652
- prompt: 'Rewrite this text at the reading level of a college student who has taken a couple of classes in this subject',
242652
+ prompt: 'Rewrite this text at the reading level of someone at college who has taken a couple of classes in this subject',
242653
242653
  },
242654
242654
  {
242655
242655
  label: 'High School',
242656
242656
  position: 2,
242657
- prompt: 'Rewrite this text at the reading level of a high school student who has taken a couple of classes in this subject',
242657
+ prompt: 'Rewrite this text at the reading level of someone at high school who has taken a couple of classes in this subject',
242658
242658
  },
242659
242659
  { label: 'Keep current reading level', position: 3, prompt: '' },
242660
242660
  {
242661
242661
  label: 'Middle School',
242662
242662
  position: 4,
242663
- prompt: 'Rewrite this text at the reading level of a middle school student who has taken a couple of classes in this subject',
242663
+ prompt: 'Rewrite this text at the reading level of someone at middle school who has taken a couple of classes in this subject',
242664
242664
  },
242665
242665
  {
242666
242666
  label: 'Kindergarten',
242667
242667
  position: 5,
242668
- prompt: 'Rewrite this text at the reading level of a kindergarten student who has taken a couple of classes in this subject',
242668
+ prompt: 'Rewrite this text at the reading level of someone at kindergarten who has taken a couple of classes in this subject',
242669
242669
  },
242670
242670
  ];
242671
242671
  const polishPrompt = 'Add some final polish to the text. If relevant, add a large title or any section titles. Check grammar and mechanics, make sure everything is consistent and reads well. You can reply that you added some final polish and checked for grammar, but do not mention the prompt.';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iblai/iblai-js",
3
- "version": "1.18.1",
3
+ "version": "1.19.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": {
@@ -66,10 +66,10 @@
66
66
  "axios": "1.13.6",
67
67
  "dotenv": "16.6.1",
68
68
  "winston": "3.19.0",
69
- "@iblai/data-layer": "1.8.1",
70
- "@iblai/web-containers": "1.9.1",
71
- "@iblai/web-utils": "1.10.11",
72
- "@iblai/mcp": "1.6.0"
69
+ "@iblai/mcp": "1.7.0",
70
+ "@iblai/web-containers": "1.9.2",
71
+ "@iblai/web-utils": "1.11.0",
72
+ "@iblai/data-layer": "1.8.1"
73
73
  },
74
74
  "peerDependencies": {
75
75
  "@radix-ui/react-dialog": "^1.1.7",