@iblai/iblai-js 2.20.0 → 2.21.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.
|
@@ -3916,6 +3916,7 @@ var disclaimersTabLabels$3 = {
|
|
|
3916
3916
|
title: "Disclaimers",
|
|
3917
3917
|
description: "Configure disclaimer settings for your agent."
|
|
3918
3918
|
},
|
|
3919
|
+
infoBox: "Show your users the fine print. Add notices — like 'This is an AI assistant' or a compliance statement — that appear in the chat so people know what to expect.",
|
|
3919
3920
|
userAgreement: {
|
|
3920
3921
|
title: "User Agreement",
|
|
3921
3922
|
tooltip: "Controls User Agreement",
|
|
@@ -3936,7 +3937,8 @@ var disclaimersTabLabels$3 = {
|
|
|
3936
3937
|
edit: "Edit",
|
|
3937
3938
|
save: "Save",
|
|
3938
3939
|
saving: "Saving...",
|
|
3939
|
-
cancel: "Cancel"
|
|
3940
|
+
cancel: "Cancel",
|
|
3941
|
+
viewAgreements: "View Agreements"
|
|
3940
3942
|
},
|
|
3941
3943
|
toasts: {
|
|
3942
3944
|
advisorySuccess: "Agent updated successfully",
|
|
@@ -3946,6 +3948,20 @@ var disclaimersTabLabels$3 = {
|
|
|
3946
3948
|
userAgreementEnabled: "User agreement enabled successfully",
|
|
3947
3949
|
userAgreementDisabled: "User agreement disabled successfully",
|
|
3948
3950
|
toggleError: "Failed to update user agreement"
|
|
3951
|
+
},
|
|
3952
|
+
agreements: {
|
|
3953
|
+
title: "Agreements",
|
|
3954
|
+
dialogDescription: "Users who have accepted this agent's User Agreement.",
|
|
3955
|
+
totalAgreements: "{count} Total Agreements",
|
|
3956
|
+
summaryDescription: "Review the users who have accepted this agent's User Agreement. Each entry shows the user's name, email and when they agreed. Users who haven't accepted yet aren't listed. Search matches the exact username.",
|
|
3957
|
+
searchPlaceholder: "Search by username",
|
|
3958
|
+
searchAriaLabel: "Search agreements by username",
|
|
3959
|
+
columnUser: "User",
|
|
3960
|
+
columnAgreedAt: "Agreed at",
|
|
3961
|
+
empty: "No agreements yet",
|
|
3962
|
+
emptyDescription: "Users who accept the User Agreement will appear here with the time they agreed.",
|
|
3963
|
+
noMatches: "No users match your search",
|
|
3964
|
+
noMatchesDescription: "Search matches the exact username — try the full username."
|
|
3949
3965
|
}
|
|
3950
3966
|
};
|
|
3951
3967
|
var documentSidebar$3 = {
|
|
@@ -11387,6 +11403,7 @@ var disclaimersTabLabels$2 = {
|
|
|
11387
11403
|
title: "Avertissements",
|
|
11388
11404
|
description: "Configurez les paramètres d'avertissement pour votre agent."
|
|
11389
11405
|
},
|
|
11406
|
+
infoBox: "Affichez les mentions légales à vos utilisateurs. Ajoutez des avis — comme « Ceci est un assistant IA » ou une déclaration de conformité — qui apparaissent dans la conversation pour que les gens sachent à quoi s'attendre.",
|
|
11390
11407
|
userAgreement: {
|
|
11391
11408
|
title: "Accord utilisateur",
|
|
11392
11409
|
tooltip: "Contrôle l'accord utilisateur",
|
|
@@ -11407,7 +11424,8 @@ var disclaimersTabLabels$2 = {
|
|
|
11407
11424
|
edit: "Modifier",
|
|
11408
11425
|
save: "Enregistrer",
|
|
11409
11426
|
saving: "Enregistrement...",
|
|
11410
|
-
cancel: "Annuler"
|
|
11427
|
+
cancel: "Annuler",
|
|
11428
|
+
viewAgreements: "Voir les acceptations"
|
|
11411
11429
|
},
|
|
11412
11430
|
toasts: {
|
|
11413
11431
|
advisorySuccess: "Agent mis à jour avec succès",
|
|
@@ -11417,6 +11435,20 @@ var disclaimersTabLabels$2 = {
|
|
|
11417
11435
|
userAgreementEnabled: "Accord utilisateur activé avec succès",
|
|
11418
11436
|
userAgreementDisabled: "Accord utilisateur désactivé avec succès",
|
|
11419
11437
|
toggleError: "Échec de la mise à jour de l'accord utilisateur"
|
|
11438
|
+
},
|
|
11439
|
+
agreements: {
|
|
11440
|
+
title: "Acceptations",
|
|
11441
|
+
dialogDescription: "Utilisateurs ayant accepté l'Accord utilisateur de cet agent.",
|
|
11442
|
+
totalAgreements: "{count} acceptations au total",
|
|
11443
|
+
summaryDescription: "Consultez les utilisateurs ayant accepté l'Accord utilisateur de cet agent. Chaque entrée indique le nom et l'e-mail de l'utilisateur ainsi que la date de son acceptation. Les utilisateurs qui ne l'ont pas encore accepté n'apparaissent pas. La recherche correspond au nom d'utilisateur exact.",
|
|
11444
|
+
searchPlaceholder: "Rechercher par nom d'utilisateur",
|
|
11445
|
+
searchAriaLabel: "Rechercher les acceptations par nom d'utilisateur",
|
|
11446
|
+
columnUser: "Utilisateur",
|
|
11447
|
+
columnAgreedAt: "Accepté le",
|
|
11448
|
+
empty: "Aucune acceptation pour le moment",
|
|
11449
|
+
emptyDescription: "Les utilisateurs qui acceptent l'Accord utilisateur apparaîtront ici avec l'heure de leur acceptation.",
|
|
11450
|
+
noMatches: "Aucun utilisateur ne correspond à votre recherche",
|
|
11451
|
+
noMatchesDescription: "La recherche correspond au nom d'utilisateur exact : essayez le nom d'utilisateur complet."
|
|
11420
11452
|
}
|
|
11421
11453
|
};
|
|
11422
11454
|
var documentSidebar$2 = {
|
|
@@ -18692,6 +18724,7 @@ var disclaimersTabLabels$1 = {
|
|
|
18692
18724
|
title: "Avisos legales",
|
|
18693
18725
|
description: "Configure los ajustes de aviso legal para su agente."
|
|
18694
18726
|
},
|
|
18727
|
+
infoBox: "Muestra la letra pequeña a tus usuarios. Agrega avisos —como «Este es un asistente de IA» o una declaración de cumplimiento— que aparecen en el chat para que las personas sepan qué esperar.",
|
|
18695
18728
|
userAgreement: {
|
|
18696
18729
|
title: "Acuerdo de usuario",
|
|
18697
18730
|
tooltip: "Controla el acuerdo de usuario",
|
|
@@ -18712,7 +18745,8 @@ var disclaimersTabLabels$1 = {
|
|
|
18712
18745
|
edit: "Editar",
|
|
18713
18746
|
save: "Guardar",
|
|
18714
18747
|
saving: "Guardando...",
|
|
18715
|
-
cancel: "Cancelar"
|
|
18748
|
+
cancel: "Cancelar",
|
|
18749
|
+
viewAgreements: "Ver aceptaciones"
|
|
18716
18750
|
},
|
|
18717
18751
|
toasts: {
|
|
18718
18752
|
advisorySuccess: "Agente actualizado correctamente",
|
|
@@ -18722,6 +18756,20 @@ var disclaimersTabLabels$1 = {
|
|
|
18722
18756
|
userAgreementEnabled: "Acuerdo de usuario habilitado correctamente",
|
|
18723
18757
|
userAgreementDisabled: "Acuerdo de usuario deshabilitado correctamente",
|
|
18724
18758
|
toggleError: "Error al actualizar el acuerdo de usuario"
|
|
18759
|
+
},
|
|
18760
|
+
agreements: {
|
|
18761
|
+
title: "Aceptaciones",
|
|
18762
|
+
dialogDescription: "Usuarios que han aceptado el Acuerdo de usuario de este agente.",
|
|
18763
|
+
totalAgreements: "{count} aceptaciones en total",
|
|
18764
|
+
summaryDescription: "Revisa los usuarios que han aceptado el Acuerdo de usuario de este agente. Cada entrada muestra el nombre y el correo electrónico del usuario y cuándo lo aceptó. Los usuarios que aún no lo han aceptado no aparecen. La búsqueda coincide con el nombre de usuario exacto.",
|
|
18765
|
+
searchPlaceholder: "Buscar por nombre de usuario",
|
|
18766
|
+
searchAriaLabel: "Buscar aceptaciones por nombre de usuario",
|
|
18767
|
+
columnUser: "Usuario",
|
|
18768
|
+
columnAgreedAt: "Aceptado el",
|
|
18769
|
+
empty: "Aún no hay aceptaciones",
|
|
18770
|
+
emptyDescription: "Los usuarios que acepten el Acuerdo de usuario aparecerán aquí con la hora en que lo aceptaron.",
|
|
18771
|
+
noMatches: "Ningún usuario coincide con tu búsqueda",
|
|
18772
|
+
noMatchesDescription: "La búsqueda coincide con el nombre de usuario exacto: prueba con el nombre de usuario completo."
|
|
18725
18773
|
}
|
|
18726
18774
|
};
|
|
18727
18775
|
var documentSidebar$1 = {
|
|
@@ -25997,6 +26045,7 @@ var disclaimersTabLabels = {
|
|
|
25997
26045
|
title: "免责声明",
|
|
25998
26046
|
description: "为您的智能体配置免责声明设置。"
|
|
25999
26047
|
},
|
|
26048
|
+
infoBox: "向用户展示必要的声明。添加提示——例如“这是一个 AI 助手”或合规声明——它们会显示在对话中,让用户知道会得到什么。",
|
|
26000
26049
|
userAgreement: {
|
|
26001
26050
|
title: "用户协议",
|
|
26002
26051
|
tooltip: "控制用户协议",
|
|
@@ -26017,7 +26066,8 @@ var disclaimersTabLabels = {
|
|
|
26017
26066
|
edit: "编辑",
|
|
26018
26067
|
save: "保存",
|
|
26019
26068
|
saving: "保存中……",
|
|
26020
|
-
cancel: "取消"
|
|
26069
|
+
cancel: "取消",
|
|
26070
|
+
viewAgreements: "查看同意记录"
|
|
26021
26071
|
},
|
|
26022
26072
|
toasts: {
|
|
26023
26073
|
advisorySuccess: "智能体更新成功",
|
|
@@ -26027,6 +26077,20 @@ var disclaimersTabLabels = {
|
|
|
26027
26077
|
userAgreementEnabled: "用户协议已成功启用",
|
|
26028
26078
|
userAgreementDisabled: "用户协议已成功停用",
|
|
26029
26079
|
toggleError: "更新用户协议失败"
|
|
26080
|
+
},
|
|
26081
|
+
agreements: {
|
|
26082
|
+
title: "同意记录",
|
|
26083
|
+
dialogDescription: "已接受此智能体用户协议的用户。",
|
|
26084
|
+
totalAgreements: "共 {count} 条同意记录",
|
|
26085
|
+
summaryDescription: "查看已接受此智能体用户协议的用户。每条记录显示用户的姓名、邮箱和同意时间。尚未接受的用户不会列出。搜索需与用户名完全匹配。",
|
|
26086
|
+
searchPlaceholder: "按用户名搜索",
|
|
26087
|
+
searchAriaLabel: "按用户名搜索同意记录",
|
|
26088
|
+
columnUser: "用户",
|
|
26089
|
+
columnAgreedAt: "同意时间",
|
|
26090
|
+
empty: "尚无同意记录",
|
|
26091
|
+
emptyDescription: "接受用户协议的用户将与其同意时间一起显示在此处。",
|
|
26092
|
+
noMatches: "没有匹配的用户",
|
|
26093
|
+
noMatchesDescription: "搜索需与用户名完全匹配,请尝试输入完整的用户名。"
|
|
26030
26094
|
}
|
|
26031
26095
|
};
|
|
26032
26096
|
var documentSidebar = {
|
|
@@ -2,7 +2,7 @@ import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import React__default, { useState, useEffect, forwardRef, createElement as createElement$3, useLayoutEffect, createContext, useContext, useMemo, useReducer, useRef, useImperativeHandle, useCallback, isValidElement, Children, PureComponent, cloneElement, Component as Component$1, Fragment as Fragment$2, useId as useId$2, useDebugValue, lazy, Suspense } from 'react';
|
|
4
4
|
import * as dataLayer from '@iblai/data-layer';
|
|
5
|
-
import { useGetUserMetadataQuery, useGetUserMetadataEdxQuery, useGetUserProfileSummaryQuery, useUpdateUserMetadataMutation, useUpdateUserMetadataEdxMutation, useUploadProfileImageMutation, useResetPasswordMutation, useSelfRetireMutation, useCreateUserInstitutionMutation, useGetUserInstitutionsQuery, useCreateUserEducationMutation, useUpdateUserEducationMutation, useDeleteUserEducationMutation, useGetUserEducationQuery, useCreateUserCompanyMutation, useGetUserCompaniesQuery, useCreateUserExperienceMutation, useUpdateUserExperienceMutation, useDeleteUserExperienceMutation, useGetUserExperienceQuery, useGetUserResumeQuery, useCreateUserResumeMutation, useGetMySubscriptionsQuery, useGetItemSubscriptionQuery, useCancelSubscriptionMutation, useGetLearnerDetailsQuery, useGetUserEnrolledCoursesQuery, useGetUserEnrolledProgramsQuery, useGetUserCatalogPathwaysQuery, useGetUsersAsAssertionsQuery, useGetUserEarnedSkillsQuery, useGetUserReportedSkillsQuery, useGetUserDesiredSkillsQuery, useCreateGlobalMemoryMutation, useUpdateGlobalMemoryMutation, useUpdateMentorMemoryMutation, useGetMemsearchStatusQuery, useGetUserMemorySettingsQuery, useUpdateUserMemorySettingsMutation, useGetGlobalMemoriesQuery, useGetAllMentorMemoriesQuery, useDeleteGlobalMemoryMutation, useDeleteMentorMemoryMutation, useGetAiSearchMentorsQuery, useStarMentorMutation, useUnstarMentorMutation, useGetUserChatHistoryReportsQuery, USER_CHAT_HISTORY_REPORT_ACTIVE_STATES, useCreateUserChatHistoryReportMutation, useLazyGetDownloadReportFromURLQuery, useGetUserChatHistoryReportStatusQuery, userChatHistoryApiSlice, USER_CHAT_HISTORY_QUERY_KEYS, useGetUserChatHistoryQuery, useGetUserChatHistoryFilterQuery, useGetMentorsQuery, useGetUserChatHistorySessionQuery, useUserLlmUsageSummary, useUserLlmSpendOverTime, useUserLlmCostByModel, useUserLlmCostByService, useUserLlmRecentActivity, USER_LLM_RECENT_ACTIVITY_PAGE_SIZE, useUserLlmTraceObservations, useInviteUserMutation, usePlatformInvitationsQuery, useCreateCatalogInvitationCourseBulkMutation, useGetCatalogInvitationsCourseQuery, useLazyPlatformUsersQuery, useLazyPlatformUserGroupsQuery, useGetPersonnalizedSearchQuery, useCreateCatalogInvitationProgramBulkMutation, useGetCatalogInvitationsProgramQuery, useGetVectorDocumentsQuery, useGetLlmsQuery, useUpdateUserRoleMutation, useUpdateUserStatusMutation, useUpdatePlatformUserRoleWithPoliciesMutation, usePlatformUsersQuery, useGetAccessibleUsersQuery, isPoliciesResponse, platformApiSlice, featureTags, useLazyGetRbacTeamsAccessListQuery, useCreateRbacTeamsAccessMutation, useGetRbacGroupsQuery, usePlatformUserGroupsQuery, useCreateRbacGroupMutation, useUpdateRbacGroupMutation, useDeleteRbacGroupMutation, useCreatePlatformUserGroupMutation, useUpdatePlatformUserGroupMutation, useDeletePlatformUserGroupMutation, useGetRbacGroupDetailsQuery, useGetPlatformUserGroupDetailsQuery, useGetRbacPermissionsMutation, useGetRbacRolesQuery, useCreateRbacRoleMutation, useUpdateRbacRoleMutation, useDeleteRbacRoleMutation, useGetRbacRoleDetailsQuery, useGetRbacActionsDefinitionQuery, useGetRbacResourceDiscoveryQuery, useGetRbacResourceListQuery, useGetRbacPoliciesQuery, useCreateRbacPolicyMutation, useUpdateRbacPolicyMutation, useDeleteRbacPolicyMutation, useGetRbacPolicyDetailsQuery, useGetWatchedGroupsQuery, useCreateWatchedGroupMutation, useUpdateWatchedGroupMutation, useDeleteWatchedGroupMutation, useAddWatchedUserMutation, useRemoveWatchedUserMutation, useAddWatcherMutation, useUpdateWatcherMutation, useDeleteWatcherMutation, useGetWatchedUsersQuery, useGetWatchersQuery, WATCHER_NOTIFICATION_EVENTS, WATCHER_NOTIFICATION_EVENT_LABELS, useGetApplicationFormsQuery, useGetApplicationFormDetailQuery, useCreateApplicationFormMutation, useUpdateApplicationFormMutation, useGetApplicationAdminDetailQuery, useInviteApplicationCandidateMutation, useLazyGetApplicationAttachmentFileQuery, useCreateApplicationWaiverMutation, useDeleteApplicationWaiverMutation, useSubmitApplicationOverrideMutation, useUpdateApplicationPlacementMutation, useDeleteApplicationCourseAssignmentMutation, useCreateApplicationNoteMutation, useUpdateApplicationNoteMutation, useDeleteApplicationNoteMutation, useTransitionApplicationMutation, useLinkApplicationCandidateMutation, useCreateApplicationPlacementsMutation, useGetCustomMentorsQuery, useCreateApplicationCourseAssignmentsMutation, useGetApplicationBlocksQuery, useDeleteApplicationBlockMutation, useGetApplicationsPipelineStatsQuery, useGetApplicationsPipelineQuery, useGetTenantMetadataQuery, useUpdateTenantMetadataMutation, useLazyGetTenantMetadataQuery, useDeleteApiKeyMutation, useGetApiKeyQuery, useGetApiKeyFieldPermissionsQuery, useUpdateApiKeyMutation, useGetApiKeysQuery, unwrapApiTokenList, useCreateApiKeyMutation, useCreateLLMCredentialMutation, useGetCredentialsSchemaQuery, useGetMaskedLLMCredentialsQuery, useDeleteIntegrationCredentialMutation, useDeleteCredentialMutation, useCreateIntegrationCredentialMutation, useGetIntegrationCredentialsSchemaQuery, useGetMaskedIntegrationCredentialsQuery, useGetAccountBillingInfoQuery, useUpdateAutoRechargeInfoMutation, useTriggerAutoRechargeMutation, useGetAgentSpendCapQuery, useGetTenantSpendCapQuery, useListAgentUserSpendCapsQuery, useUpsertAgentSpendCapMutation, useDeleteAgentSpendCapMutation, useUpsertTenantSpendCapMutation, useDeleteTenantSpendCapMutation, useUpsertUserSpendCapMutation, useDeleteUserSpendCapMutation, useGetLlmUsageMetricsQuery, useListAgentSpendCapsQuery, useGetCreditTransactionsQuery, useCreateStripeCustomerPortalMutation, useSetPlatformConfigurationsMutation, useGetPlatformConfigurationsQuery, useUpdatePlatformMembershipMutation, useGetPlatformMembershipQuery, VERCEL_SPA, useGetCustomDomainsQuery, useGetHostingProjectsQuery, useCreateCustomDomainMutation, useDeleteCustomDomainMutation, useCreateHostingProjectDomainMutation, useUpdateHostingDomainMutation, useDeleteHostingDomainMutation, useGetStudentMentorCreationStatusQuery, useSetStudentMentorCreationStatusMutation, coreApiSlice, recommendationPromptTypeEnum, useGetRecommendedPromptsListQuery, useCreateRecommendedPromptMutation, useUpdateRecommendedPromptMutation, useDeleteRecommendedPromptMutation, useLazyGetPublicPlatformImageAssetFileUrlQuery, useCreatePlatformImageAssetMutation, useGetProviderConfigQuery, useCreateProviderConfigMutation, useDeleteProviderConfigMutation, useGetExternalMappingQuery, useGetCredentialsListQuery, useCreateExternalMappingMutation, useDeleteExternalMappingMutation, useGetMemsearchConfigQuery, useUpdateMemsearchConfigMutation, useGetStripeConnectStatusQuery, useStartStripeConnectOnboardingMutation, useLazyGetStripeConnectDashboardQuery, useListPaywallsQuery, useListPricesQuery, useCreatePriceMutation, useUpdatePriceMutation, useDeletePriceMutation, useGetPaywallConfigQuery, useEnablePaywallMutation, useUpdatePaywallMutation, useGetMentorMemoriesListQuery, useGetMemoryCategoriesAdminQuery, useCreateMentorMemoryMutation, useLazyGetCourseMetaDataQuery, useLazyGetCourseCompletionOutlinesQuery, useLazyGetCourseEligibilityQuery, useLazyGetEdxSSOTokenQuery, useCreateCourseEnrollmentMutation, useCreateStripeCheckoutSessionMutation, useLazyGetCourseProgressQuery, useLazyGetCourseCompletionQuery, useUpdateExamAttemptMutation, useStartExamMutation, useLazyGetExamInfoQuery, useGetAgentSkillResourcesQuery, useCreateAgentSkillResourceMutation, useUpdateAgentSkillResourceMutation, useUploadAgentSkillResourceAssetMutation, useDeleteAgentSkillResourceMutation, useGetMentorSkillAssignmentsQuery, useGetAgentSkillsQuery, useCreateMentorSkillAssignmentMutation, useUpdateMentorSkillAssignmentMutation, useDeleteMentorSkillAssignmentMutation, useCreateAgentSkillMutation, useUpdateAgentSkillMutation, useDeleteAgentSkillMutation, filterSlashSkills, useGetMentorSkillAssignmentsInfiniteQuery, MENTOR_SKILL_ASSIGNMENTS_PAGE_SIZE, useUpdateUserProjectMutation, useGetTrainingDocumentsQuery, useLazyGetConnectedServiceAuthUrlQuery, useCreateUserProjectMutation, useDeleteUserProjectMutation, useGetUserProjectDetailsQuery, useEditTrainingDocumentMutation, useAddTrainingDocumentMutation, useLazyGetCredentialsQuery, useGetMentorSettingsQuery, useEditMentorMutation, useUploadLightLogoMutation, useUploadDarkLogoMutation, useUpdatePlatformInfoMutation, LOGO_ENDPOINTS, useCreateEvalDatasetMutation, useAddEvalDatasetItemsMutation, useUploadEvalDatasetCsvMutation, useDeleteEvalDatasetItemMutation, useListEvalDatasetItemsQuery, evalTotalPages, useListEvalDatasetsQuery, useGetUserProjectsQuery, useCreateSessionIdMutation, useGetMentorCategoriesQuery, useGetTenantChatPrivacyConfigQuery as useGetTenantChatPrivacyConfigQuery$1, useGetCallConfigurationsQuery, useCreateCallConfigurationMutation, useUpdateCallConfigurationMutation, chatPrivacyApiSlice, useDeleteMentorMutation, useForkMentorMutation, useGetToolsQuery, useLazyGetMCPServersQuery, useOauthFindMutation, useLazyStartOAuthFlowQuery, useCreateMCPServerMutation, usePartialUpdateMCPServerMutation, useCreateMCPServerConnectionMutation, usePatchMCPServerConnectionMutation, useGetConnectedServicesQuery, useGetMCPServersQuery, useGetMCPServerConnectionsQuery, useUpdateMCPServerMutation, useDeleteMCPServerMutation, useEditMentorJsonMutation, useDisconnectServiceMutation, useGetPromptCategoriesQuery, PRIVACY_ACTIONS, PRIVACY_ENTITY_TYPES, useGetVoicesQuery, useGetVoiceQuery, isBaseAgentMentor, useGetGradeResultQuery, useOverrideGradeResultMutation, useGetChatHistoryFilterQuery, useListGradeResultsQuery, useGetMentorGraderConfigurationQuery, useListGraderCriteriaQuery, useCreateMentorGraderConfigurationMutation, useUpdateMentorGraderConfigurationMutation, useCreateGraderCriterionMutation, useUpdateGraderCriterionMutation, useDeleteGraderCriterionMutation, useGetSpendCapStatusQuery, useGetMentorPublicSettingsQuery, useGetChatHistoryQuery, useGetMentorSummariesQuery, useGetConversationMemoriesQuery, useGetSupportTicketsQuery, useGetSupportTicketMessagesQuery, useCreateSupportTicketMessageMutation, usePatchSupportTicketMutation, useCloseSupportTicketMutation, useCreateLtiMentorMutation, useUpdateLtiMentorMutation, useGetLtiMentorsQuery, useDeleteLtiMentorMutation, useCreateLtiKeyMutation, useUpdateLtiKeyMutation, useDeleteLtiKeyMutation, useGetLtiKeysQuery, useCreateLtiToolMutation, useUpdateLtiToolMutation, useGetLtiToolsQuery, useGetPlatformInfoQuery, useCreatePromptMutation, useGetPromptsSearchQuery, useUpdatePromptMutation, useCreateRedirectTokenMutation, useGetShareableLinkQuery, useCreateShareableLinkMutation, useUpdateShareableLinkMutation, useCreateDisclaimerMutation, useUpdateDisclaimerMutation, useGetDisclaimersQuery, useUpdateRbacMentorAccessMutation, useGetRbacMentorAccessListQuery, useStartEvalRunMutation, useEvaluateEvalRunMutation, useGetEvalRunQuery, useDeleteEvalScoreMutation, useListEvalRunJudgesQuery, useCreateEvalScoreMutation, useDeleteEvalRunMutation, useExportEvalRunMutation, useListEvalRunsQuery, useLazyGetEvalRunQuery, evaluationsApiSlice, EVALUATIONS_TAGS, useGetPersonnalizedMentorsQuery, useCreateCallCredentialsMutation, useGetGuidedPromptsQuery, useUpdateChatSessionSharedMutation, useUpdateMessageFeedbackMutation, useLazyGetPromptsSearchQuery, useLazyGetGuidedPromptsQuery, useGetPublicMentorsQuery, useGetPeriodicAgentsQuery, useGetPeriodicAgentLogsListQuery, useCreatePeriodicAgentMutation, useDeletePeriodicAgentMutation, useCreateMemoryCategoryMutation, useUpdateMemoryCategoryMutation, useDeleteMemoryCategoryMutation, useDeletePromptMutation, useDeleteTrainingDocumentMutation, useGetTrainingDocumentRetrainScheduleQuery, useCreateTrainingDocumentRetrainScheduleMutation, useUpdateArtifactMutation, useLazyGetArtifactVersionQuery, useLazyListArtifactVersionsQuery, useSetCurrentVersionMutation, useListArtifactVersionsQuery, useLazyGetArtifactQuery, useLazyListArtifactsQuery, useEditSessionMutation } from '@iblai/data-layer';
|
|
5
|
+
import { useGetUserMetadataQuery, useGetUserMetadataEdxQuery, useGetUserProfileSummaryQuery, useUpdateUserMetadataMutation, useUpdateUserMetadataEdxMutation, useUploadProfileImageMutation, useResetPasswordMutation, useSelfRetireMutation, useCreateUserInstitutionMutation, useGetUserInstitutionsQuery, useCreateUserEducationMutation, useUpdateUserEducationMutation, useDeleteUserEducationMutation, useGetUserEducationQuery, useCreateUserCompanyMutation, useGetUserCompaniesQuery, useCreateUserExperienceMutation, useUpdateUserExperienceMutation, useDeleteUserExperienceMutation, useGetUserExperienceQuery, useGetUserResumeQuery, useCreateUserResumeMutation, useGetMySubscriptionsQuery, useGetItemSubscriptionQuery, useCancelSubscriptionMutation, useGetLearnerDetailsQuery, useGetUserEnrolledCoursesQuery, useGetUserEnrolledProgramsQuery, useGetUserCatalogPathwaysQuery, useGetUsersAsAssertionsQuery, useGetUserEarnedSkillsQuery, useGetUserReportedSkillsQuery, useGetUserDesiredSkillsQuery, useCreateGlobalMemoryMutation, useUpdateGlobalMemoryMutation, useUpdateMentorMemoryMutation, useGetMemsearchStatusQuery, useGetUserMemorySettingsQuery, useUpdateUserMemorySettingsMutation, useGetGlobalMemoriesQuery, useGetAllMentorMemoriesQuery, useDeleteGlobalMemoryMutation, useDeleteMentorMemoryMutation, useGetAiSearchMentorsQuery, useStarMentorMutation, useUnstarMentorMutation, useGetUserChatHistoryReportsQuery, USER_CHAT_HISTORY_REPORT_ACTIVE_STATES, useCreateUserChatHistoryReportMutation, useLazyGetDownloadReportFromURLQuery, useGetUserChatHistoryReportStatusQuery, userChatHistoryApiSlice, USER_CHAT_HISTORY_QUERY_KEYS, useGetUserChatHistoryQuery, useGetUserChatHistoryFilterQuery, useGetMentorsQuery, useGetUserChatHistorySessionQuery, useUserLlmUsageSummary, useUserLlmSpendOverTime, useUserLlmCostByModel, useUserLlmCostByService, useUserLlmRecentActivity, USER_LLM_RECENT_ACTIVITY_PAGE_SIZE, useUserLlmTraceObservations, useInviteUserMutation, usePlatformInvitationsQuery, useCreateCatalogInvitationCourseBulkMutation, useGetCatalogInvitationsCourseQuery, useLazyPlatformUsersQuery, useLazyPlatformUserGroupsQuery, useGetPersonnalizedSearchQuery, useCreateCatalogInvitationProgramBulkMutation, useGetCatalogInvitationsProgramQuery, useGetVectorDocumentsQuery, useGetLlmsQuery, useUpdateUserRoleMutation, useUpdateUserStatusMutation, useUpdatePlatformUserRoleWithPoliciesMutation, usePlatformUsersQuery, useGetAccessibleUsersQuery, isPoliciesResponse, platformApiSlice, featureTags, useLazyGetRbacTeamsAccessListQuery, useCreateRbacTeamsAccessMutation, useGetRbacGroupsQuery, usePlatformUserGroupsQuery, useCreateRbacGroupMutation, useUpdateRbacGroupMutation, useDeleteRbacGroupMutation, useCreatePlatformUserGroupMutation, useUpdatePlatformUserGroupMutation, useDeletePlatformUserGroupMutation, useGetRbacGroupDetailsQuery, useGetPlatformUserGroupDetailsQuery, useGetRbacPermissionsMutation, useGetRbacRolesQuery, useCreateRbacRoleMutation, useUpdateRbacRoleMutation, useDeleteRbacRoleMutation, useGetRbacRoleDetailsQuery, useGetRbacActionsDefinitionQuery, useGetRbacResourceDiscoveryQuery, useGetRbacResourceListQuery, useGetRbacPoliciesQuery, useCreateRbacPolicyMutation, useUpdateRbacPolicyMutation, useDeleteRbacPolicyMutation, useGetRbacPolicyDetailsQuery, useGetWatchedGroupsQuery, useCreateWatchedGroupMutation, useUpdateWatchedGroupMutation, useDeleteWatchedGroupMutation, useAddWatchedUserMutation, useRemoveWatchedUserMutation, useAddWatcherMutation, useUpdateWatcherMutation, useDeleteWatcherMutation, useGetWatchedUsersQuery, useGetWatchersQuery, WATCHER_NOTIFICATION_EVENTS, WATCHER_NOTIFICATION_EVENT_LABELS, useGetApplicationFormsQuery, useGetApplicationFormDetailQuery, useCreateApplicationFormMutation, useUpdateApplicationFormMutation, useGetApplicationAdminDetailQuery, useInviteApplicationCandidateMutation, useLazyGetApplicationAttachmentFileQuery, useCreateApplicationWaiverMutation, useDeleteApplicationWaiverMutation, useSubmitApplicationOverrideMutation, useUpdateApplicationPlacementMutation, useDeleteApplicationCourseAssignmentMutation, useCreateApplicationNoteMutation, useUpdateApplicationNoteMutation, useDeleteApplicationNoteMutation, useTransitionApplicationMutation, useLinkApplicationCandidateMutation, useCreateApplicationPlacementsMutation, useGetCustomMentorsQuery, useCreateApplicationCourseAssignmentsMutation, useGetApplicationBlocksQuery, useDeleteApplicationBlockMutation, useGetApplicationsPipelineStatsQuery, useGetApplicationsPipelineQuery, useGetTenantMetadataQuery, useUpdateTenantMetadataMutation, useLazyGetTenantMetadataQuery, useDeleteApiKeyMutation, useGetApiKeyQuery, useGetApiKeyFieldPermissionsQuery, useUpdateApiKeyMutation, useGetApiKeysQuery, unwrapApiTokenList, useCreateApiKeyMutation, useCreateLLMCredentialMutation, useGetCredentialsSchemaQuery, useGetMaskedLLMCredentialsQuery, useDeleteIntegrationCredentialMutation, useDeleteCredentialMutation, useCreateIntegrationCredentialMutation, useGetIntegrationCredentialsSchemaQuery, useGetMaskedIntegrationCredentialsQuery, useGetAccountBillingInfoQuery, useUpdateAutoRechargeInfoMutation, useTriggerAutoRechargeMutation, useGetAgentSpendCapQuery, useGetTenantSpendCapQuery, useListAgentUserSpendCapsQuery, useUpsertAgentSpendCapMutation, useDeleteAgentSpendCapMutation, useUpsertTenantSpendCapMutation, useDeleteTenantSpendCapMutation, useUpsertUserSpendCapMutation, useDeleteUserSpendCapMutation, useGetLlmUsageMetricsQuery, useListAgentSpendCapsQuery, useGetCreditTransactionsQuery, useCreateStripeCustomerPortalMutation, useSetPlatformConfigurationsMutation, useGetPlatformConfigurationsQuery, useUpdatePlatformMembershipMutation, useGetPlatformMembershipQuery, VERCEL_SPA, useGetCustomDomainsQuery, useGetHostingProjectsQuery, useCreateCustomDomainMutation, useDeleteCustomDomainMutation, useCreateHostingProjectDomainMutation, useUpdateHostingDomainMutation, useDeleteHostingDomainMutation, useGetStudentMentorCreationStatusQuery, useSetStudentMentorCreationStatusMutation, coreApiSlice, recommendationPromptTypeEnum, useGetRecommendedPromptsListQuery, useCreateRecommendedPromptMutation, useUpdateRecommendedPromptMutation, useDeleteRecommendedPromptMutation, useLazyGetPublicPlatformImageAssetFileUrlQuery, useCreatePlatformImageAssetMutation, useGetProviderConfigQuery, useCreateProviderConfigMutation, useDeleteProviderConfigMutation, useGetExternalMappingQuery, useGetCredentialsListQuery, useCreateExternalMappingMutation, useDeleteExternalMappingMutation, useGetMemsearchConfigQuery, useUpdateMemsearchConfigMutation, useGetStripeConnectStatusQuery, useStartStripeConnectOnboardingMutation, useLazyGetStripeConnectDashboardQuery, useListPaywallsQuery, useListPricesQuery, useCreatePriceMutation, useUpdatePriceMutation, useDeletePriceMutation, useGetPaywallConfigQuery, useEnablePaywallMutation, useUpdatePaywallMutation, useGetMentorMemoriesListQuery, useGetMemoryCategoriesAdminQuery, useCreateMentorMemoryMutation, useLazyGetCourseMetaDataQuery, useLazyGetCourseCompletionOutlinesQuery, useLazyGetCourseEligibilityQuery, useLazyGetEdxSSOTokenQuery, useCreateCourseEnrollmentMutation, useCreateStripeCheckoutSessionMutation, useLazyGetCourseProgressQuery, useLazyGetCourseCompletionQuery, useUpdateExamAttemptMutation, useStartExamMutation, useLazyGetExamInfoQuery, useGetAgentSkillResourcesQuery, useCreateAgentSkillResourceMutation, useUpdateAgentSkillResourceMutation, useUploadAgentSkillResourceAssetMutation, useDeleteAgentSkillResourceMutation, useGetMentorSkillAssignmentsQuery, useGetAgentSkillsQuery, useCreateMentorSkillAssignmentMutation, useUpdateMentorSkillAssignmentMutation, useDeleteMentorSkillAssignmentMutation, useCreateAgentSkillMutation, useUpdateAgentSkillMutation, useDeleteAgentSkillMutation, filterSlashSkills, useGetMentorSkillAssignmentsInfiniteQuery, MENTOR_SKILL_ASSIGNMENTS_PAGE_SIZE, useUpdateUserProjectMutation, useGetTrainingDocumentsQuery, useLazyGetConnectedServiceAuthUrlQuery, useCreateUserProjectMutation, useDeleteUserProjectMutation, useGetUserProjectDetailsQuery, useEditTrainingDocumentMutation, useAddTrainingDocumentMutation, useLazyGetCredentialsQuery, useGetMentorSettingsQuery, useEditMentorMutation, useUploadLightLogoMutation, useUploadDarkLogoMutation, useUpdatePlatformInfoMutation, LOGO_ENDPOINTS, useCreateEvalDatasetMutation, useAddEvalDatasetItemsMutation, useUploadEvalDatasetCsvMutation, useDeleteEvalDatasetItemMutation, useListEvalDatasetItemsQuery, evalTotalPages, useListEvalDatasetsQuery, useGetUserProjectsQuery, useCreateSessionIdMutation, useGetMentorCategoriesQuery, useGetTenantChatPrivacyConfigQuery as useGetTenantChatPrivacyConfigQuery$1, useGetCallConfigurationsQuery, useCreateCallConfigurationMutation, useUpdateCallConfigurationMutation, chatPrivacyApiSlice, useDeleteMentorMutation, useForkMentorMutation, useGetToolsQuery, useLazyGetMCPServersQuery, useOauthFindMutation, useLazyStartOAuthFlowQuery, useCreateMCPServerMutation, usePartialUpdateMCPServerMutation, useCreateMCPServerConnectionMutation, usePatchMCPServerConnectionMutation, useGetConnectedServicesQuery, useGetMCPServersQuery, useGetMCPServerConnectionsQuery, useUpdateMCPServerMutation, useDeleteMCPServerMutation, useEditMentorJsonMutation, useDisconnectServiceMutation, useGetPromptCategoriesQuery, PRIVACY_ACTIONS, PRIVACY_ENTITY_TYPES, useGetVoicesQuery, useGetVoiceQuery, isBaseAgentMentor, useGetGradeResultQuery, useOverrideGradeResultMutation, useGetChatHistoryFilterQuery, useListGradeResultsQuery, useGetMentorGraderConfigurationQuery, useListGraderCriteriaQuery, useCreateMentorGraderConfigurationMutation, useUpdateMentorGraderConfigurationMutation, useCreateGraderCriterionMutation, useUpdateGraderCriterionMutation, useDeleteGraderCriterionMutation, useGetSpendCapStatusQuery, useGetMentorPublicSettingsQuery, useGetChatHistoryQuery, useGetMentorSummariesQuery, useGetConversationMemoriesQuery, useGetSupportTicketsQuery, useGetSupportTicketMessagesQuery, useCreateSupportTicketMessageMutation, usePatchSupportTicketMutation, useCloseSupportTicketMutation, useCreateLtiMentorMutation, useUpdateLtiMentorMutation, useGetLtiMentorsQuery, useDeleteLtiMentorMutation, useCreateLtiKeyMutation, useUpdateLtiKeyMutation, useDeleteLtiKeyMutation, useGetLtiKeysQuery, useCreateLtiToolMutation, useUpdateLtiToolMutation, useGetLtiToolsQuery, useGetPlatformInfoQuery, useCreatePromptMutation, useGetPromptsSearchQuery, useUpdatePromptMutation, useCreateRedirectTokenMutation, useGetShareableLinkQuery, useCreateShareableLinkMutation, useUpdateShareableLinkMutation, useCreateDisclaimerMutation, useUpdateDisclaimerMutation, useGetDisclaimersQuery, useUpdateRbacMentorAccessMutation, useGetRbacMentorAccessListQuery, useStartEvalRunMutation, useEvaluateEvalRunMutation, useGetEvalRunQuery, useDeleteEvalScoreMutation, useListEvalRunJudgesQuery, useCreateEvalScoreMutation, useDeleteEvalRunMutation, useExportEvalRunMutation, useListEvalRunsQuery, useLazyGetEvalRunQuery, evaluationsApiSlice, EVALUATIONS_TAGS, useGetPersonnalizedMentorsQuery, useCreateCallCredentialsMutation, useGetGuidedPromptsQuery, useUpdateChatSessionSharedMutation, useUpdateMessageFeedbackMutation, useLazyGetPromptsSearchQuery, useLazyGetGuidedPromptsQuery, useGetPublicMentorsQuery, useGetPeriodicAgentsQuery, useGetPeriodicAgentLogsListQuery, useCreatePeriodicAgentMutation, useDeletePeriodicAgentMutation, useCreateMemoryCategoryMutation, useUpdateMemoryCategoryMutation, useDeleteMemoryCategoryMutation, useDeletePromptMutation, useDeleteTrainingDocumentMutation, useGetTrainingDocumentRetrainScheduleQuery, useCreateTrainingDocumentRetrainScheduleMutation, useGetDisclaimerAgreementsQuery, useUpdateArtifactMutation, useLazyGetArtifactVersionQuery, useLazyListArtifactVersionsQuery, useSetCurrentVersionMutation, useListArtifactVersionsQuery, useLazyGetArtifactQuery, useLazyListArtifactsQuery, useEditSessionMutation } from '@iblai/data-layer';
|
|
6
6
|
import { removeAuthItem, setAuthItem, isTauriEmbeddedLLMHost, selectRbacPermissions, useCurrentTenant, canViewOtherUsersChatHistory, isPureWatcher, getInitials, useTenantMetadata, useUsername, selectStreaming, isLoggedIn, TOOL_NAME_MAP, WRITE_TODOS_TOOL, WithPermissions, canWriteField, useStripeUpgrade, openExternalUrl, CHAT_AREA_SIZE, isAlphaNumeric32, checkRbacPermission, selectNumberOfActiveChatMessages, TOOLS, hasRemoteAiConfig, isSafariBrowser, useShowAttachment, useShowVoiceCall, useShowVoiceRecorder, useMentorSettings, selectShowingSharedChat, useShowFreeTrialDialog, useEmbedMode, chatInputSliceSelectors, useResponsive, useAccessingPublicRoute, useVisitingTenant, useModelFileUploadCapabilities, useChatFileUpload, useVoiceChat, selectAttachedFiles, MENTOR_CHAT_DOCUMENTS_EXTENSIONS, removeFile, chatInputSliceActions, chatActions, WithFormPermissions, useTenantContext, TimeTracker, advancedTabsProperties, defaultSessionIds, pickWritableFields, ANONYMOUS_USERNAME as ANONYMOUS_USERNAME$3, redirectToAuthSpaJoinTenant, selectActiveTab, useAxdToken, useWelcomeMessage, markdownToPlainText, useCachedSessionId, use402ErrorCheck, use401TokenRefresh, selectTokenEnabled, selectToken, useServiceWorker, useUserAgreement, useAdvancedChat, sendMessageToParentWebsite, useMentorTools, useFileDragDrop, eventBus, RemoteEvents, selectEnableChatActionsPopup, advancedTabs, isInIframe, getAuthSpaJoinUrl, addMessage, clearFiles, MENTOR_VISIBILITY } from '@iblai/web-utils';
|
|
7
7
|
import { useDispatch, useSelector } from 'react-redux';
|
|
8
8
|
import { toast } from 'sonner';
|
|
@@ -98487,6 +98487,7 @@ var disclaimersTabLabels$3 = {
|
|
|
98487
98487
|
title: "Disclaimers",
|
|
98488
98488
|
description: "Configure disclaimer settings for your agent."
|
|
98489
98489
|
},
|
|
98490
|
+
infoBox: "Show your users the fine print. Add notices — like 'This is an AI assistant' or a compliance statement — that appear in the chat so people know what to expect.",
|
|
98490
98491
|
userAgreement: {
|
|
98491
98492
|
title: "User Agreement",
|
|
98492
98493
|
tooltip: "Controls User Agreement",
|
|
@@ -98507,7 +98508,8 @@ var disclaimersTabLabels$3 = {
|
|
|
98507
98508
|
edit: "Edit",
|
|
98508
98509
|
save: "Save",
|
|
98509
98510
|
saving: "Saving...",
|
|
98510
|
-
cancel: "Cancel"
|
|
98511
|
+
cancel: "Cancel",
|
|
98512
|
+
viewAgreements: "View Agreements"
|
|
98511
98513
|
},
|
|
98512
98514
|
toasts: {
|
|
98513
98515
|
advisorySuccess: "Agent updated successfully",
|
|
@@ -98517,6 +98519,20 @@ var disclaimersTabLabels$3 = {
|
|
|
98517
98519
|
userAgreementEnabled: "User agreement enabled successfully",
|
|
98518
98520
|
userAgreementDisabled: "User agreement disabled successfully",
|
|
98519
98521
|
toggleError: "Failed to update user agreement"
|
|
98522
|
+
},
|
|
98523
|
+
agreements: {
|
|
98524
|
+
title: "Agreements",
|
|
98525
|
+
dialogDescription: "Users who have accepted this agent's User Agreement.",
|
|
98526
|
+
totalAgreements: "{count} Total Agreements",
|
|
98527
|
+
summaryDescription: "Review the users who have accepted this agent's User Agreement. Each entry shows the user's name, email and when they agreed. Users who haven't accepted yet aren't listed. Search matches the exact username.",
|
|
98528
|
+
searchPlaceholder: "Search by username",
|
|
98529
|
+
searchAriaLabel: "Search agreements by username",
|
|
98530
|
+
columnUser: "User",
|
|
98531
|
+
columnAgreedAt: "Agreed at",
|
|
98532
|
+
empty: "No agreements yet",
|
|
98533
|
+
emptyDescription: "Users who accept the User Agreement will appear here with the time they agreed.",
|
|
98534
|
+
noMatches: "No users match your search",
|
|
98535
|
+
noMatchesDescription: "Search matches the exact username — try the full username."
|
|
98520
98536
|
}
|
|
98521
98537
|
};
|
|
98522
98538
|
var documentSidebar$3 = {
|
|
@@ -105958,6 +105974,7 @@ var disclaimersTabLabels$2 = {
|
|
|
105958
105974
|
title: "Avertissements",
|
|
105959
105975
|
description: "Configurez les paramètres d'avertissement pour votre agent."
|
|
105960
105976
|
},
|
|
105977
|
+
infoBox: "Affichez les mentions légales à vos utilisateurs. Ajoutez des avis — comme « Ceci est un assistant IA » ou une déclaration de conformité — qui apparaissent dans la conversation pour que les gens sachent à quoi s'attendre.",
|
|
105961
105978
|
userAgreement: {
|
|
105962
105979
|
title: "Accord utilisateur",
|
|
105963
105980
|
tooltip: "Contrôle l'accord utilisateur",
|
|
@@ -105978,7 +105995,8 @@ var disclaimersTabLabels$2 = {
|
|
|
105978
105995
|
edit: "Modifier",
|
|
105979
105996
|
save: "Enregistrer",
|
|
105980
105997
|
saving: "Enregistrement...",
|
|
105981
|
-
cancel: "Annuler"
|
|
105998
|
+
cancel: "Annuler",
|
|
105999
|
+
viewAgreements: "Voir les acceptations"
|
|
105982
106000
|
},
|
|
105983
106001
|
toasts: {
|
|
105984
106002
|
advisorySuccess: "Agent mis à jour avec succès",
|
|
@@ -105988,6 +106006,20 @@ var disclaimersTabLabels$2 = {
|
|
|
105988
106006
|
userAgreementEnabled: "Accord utilisateur activé avec succès",
|
|
105989
106007
|
userAgreementDisabled: "Accord utilisateur désactivé avec succès",
|
|
105990
106008
|
toggleError: "Échec de la mise à jour de l'accord utilisateur"
|
|
106009
|
+
},
|
|
106010
|
+
agreements: {
|
|
106011
|
+
title: "Acceptations",
|
|
106012
|
+
dialogDescription: "Utilisateurs ayant accepté l'Accord utilisateur de cet agent.",
|
|
106013
|
+
totalAgreements: "{count} acceptations au total",
|
|
106014
|
+
summaryDescription: "Consultez les utilisateurs ayant accepté l'Accord utilisateur de cet agent. Chaque entrée indique le nom et l'e-mail de l'utilisateur ainsi que la date de son acceptation. Les utilisateurs qui ne l'ont pas encore accepté n'apparaissent pas. La recherche correspond au nom d'utilisateur exact.",
|
|
106015
|
+
searchPlaceholder: "Rechercher par nom d'utilisateur",
|
|
106016
|
+
searchAriaLabel: "Rechercher les acceptations par nom d'utilisateur",
|
|
106017
|
+
columnUser: "Utilisateur",
|
|
106018
|
+
columnAgreedAt: "Accepté le",
|
|
106019
|
+
empty: "Aucune acceptation pour le moment",
|
|
106020
|
+
emptyDescription: "Les utilisateurs qui acceptent l'Accord utilisateur apparaîtront ici avec l'heure de leur acceptation.",
|
|
106021
|
+
noMatches: "Aucun utilisateur ne correspond à votre recherche",
|
|
106022
|
+
noMatchesDescription: "La recherche correspond au nom d'utilisateur exact : essayez le nom d'utilisateur complet."
|
|
105991
106023
|
}
|
|
105992
106024
|
};
|
|
105993
106025
|
var documentSidebar$2 = {
|
|
@@ -113263,6 +113295,7 @@ var disclaimersTabLabels$1 = {
|
|
|
113263
113295
|
title: "Avisos legales",
|
|
113264
113296
|
description: "Configure los ajustes de aviso legal para su agente."
|
|
113265
113297
|
},
|
|
113298
|
+
infoBox: "Muestra la letra pequeña a tus usuarios. Agrega avisos —como «Este es un asistente de IA» o una declaración de cumplimiento— que aparecen en el chat para que las personas sepan qué esperar.",
|
|
113266
113299
|
userAgreement: {
|
|
113267
113300
|
title: "Acuerdo de usuario",
|
|
113268
113301
|
tooltip: "Controla el acuerdo de usuario",
|
|
@@ -113283,7 +113316,8 @@ var disclaimersTabLabels$1 = {
|
|
|
113283
113316
|
edit: "Editar",
|
|
113284
113317
|
save: "Guardar",
|
|
113285
113318
|
saving: "Guardando...",
|
|
113286
|
-
cancel: "Cancelar"
|
|
113319
|
+
cancel: "Cancelar",
|
|
113320
|
+
viewAgreements: "Ver aceptaciones"
|
|
113287
113321
|
},
|
|
113288
113322
|
toasts: {
|
|
113289
113323
|
advisorySuccess: "Agente actualizado correctamente",
|
|
@@ -113293,6 +113327,20 @@ var disclaimersTabLabels$1 = {
|
|
|
113293
113327
|
userAgreementEnabled: "Acuerdo de usuario habilitado correctamente",
|
|
113294
113328
|
userAgreementDisabled: "Acuerdo de usuario deshabilitado correctamente",
|
|
113295
113329
|
toggleError: "Error al actualizar el acuerdo de usuario"
|
|
113330
|
+
},
|
|
113331
|
+
agreements: {
|
|
113332
|
+
title: "Aceptaciones",
|
|
113333
|
+
dialogDescription: "Usuarios que han aceptado el Acuerdo de usuario de este agente.",
|
|
113334
|
+
totalAgreements: "{count} aceptaciones en total",
|
|
113335
|
+
summaryDescription: "Revisa los usuarios que han aceptado el Acuerdo de usuario de este agente. Cada entrada muestra el nombre y el correo electrónico del usuario y cuándo lo aceptó. Los usuarios que aún no lo han aceptado no aparecen. La búsqueda coincide con el nombre de usuario exacto.",
|
|
113336
|
+
searchPlaceholder: "Buscar por nombre de usuario",
|
|
113337
|
+
searchAriaLabel: "Buscar aceptaciones por nombre de usuario",
|
|
113338
|
+
columnUser: "Usuario",
|
|
113339
|
+
columnAgreedAt: "Aceptado el",
|
|
113340
|
+
empty: "Aún no hay aceptaciones",
|
|
113341
|
+
emptyDescription: "Los usuarios que acepten el Acuerdo de usuario aparecerán aquí con la hora en que lo aceptaron.",
|
|
113342
|
+
noMatches: "Ningún usuario coincide con tu búsqueda",
|
|
113343
|
+
noMatchesDescription: "La búsqueda coincide con el nombre de usuario exacto: prueba con el nombre de usuario completo."
|
|
113296
113344
|
}
|
|
113297
113345
|
};
|
|
113298
113346
|
var documentSidebar$1 = {
|
|
@@ -120568,6 +120616,7 @@ var disclaimersTabLabels = {
|
|
|
120568
120616
|
title: "免责声明",
|
|
120569
120617
|
description: "为您的智能体配置免责声明设置。"
|
|
120570
120618
|
},
|
|
120619
|
+
infoBox: "向用户展示必要的声明。添加提示——例如“这是一个 AI 助手”或合规声明——它们会显示在对话中,让用户知道会得到什么。",
|
|
120571
120620
|
userAgreement: {
|
|
120572
120621
|
title: "用户协议",
|
|
120573
120622
|
tooltip: "控制用户协议",
|
|
@@ -120588,7 +120637,8 @@ var disclaimersTabLabels = {
|
|
|
120588
120637
|
edit: "编辑",
|
|
120589
120638
|
save: "保存",
|
|
120590
120639
|
saving: "保存中……",
|
|
120591
|
-
cancel: "取消"
|
|
120640
|
+
cancel: "取消",
|
|
120641
|
+
viewAgreements: "查看同意记录"
|
|
120592
120642
|
},
|
|
120593
120643
|
toasts: {
|
|
120594
120644
|
advisorySuccess: "智能体更新成功",
|
|
@@ -120598,6 +120648,20 @@ var disclaimersTabLabels = {
|
|
|
120598
120648
|
userAgreementEnabled: "用户协议已成功启用",
|
|
120599
120649
|
userAgreementDisabled: "用户协议已成功停用",
|
|
120600
120650
|
toggleError: "更新用户协议失败"
|
|
120651
|
+
},
|
|
120652
|
+
agreements: {
|
|
120653
|
+
title: "同意记录",
|
|
120654
|
+
dialogDescription: "已接受此智能体用户协议的用户。",
|
|
120655
|
+
totalAgreements: "共 {count} 条同意记录",
|
|
120656
|
+
summaryDescription: "查看已接受此智能体用户协议的用户。每条记录显示用户的姓名、邮箱和同意时间。尚未接受的用户不会列出。搜索需与用户名完全匹配。",
|
|
120657
|
+
searchPlaceholder: "按用户名搜索",
|
|
120658
|
+
searchAriaLabel: "按用户名搜索同意记录",
|
|
120659
|
+
columnUser: "用户",
|
|
120660
|
+
columnAgreedAt: "同意时间",
|
|
120661
|
+
empty: "尚无同意记录",
|
|
120662
|
+
emptyDescription: "接受用户协议的用户将与其同意时间一起显示在此处。",
|
|
120663
|
+
noMatches: "没有匹配的用户",
|
|
120664
|
+
noMatchesDescription: "搜索需与用户名完全匹配,请尝试输入完整的用户名。"
|
|
120601
120665
|
}
|
|
120602
120666
|
};
|
|
120603
120667
|
var documentSidebar = {
|
|
@@ -179388,7 +179452,7 @@ function DetailRow({ label, children }) {
|
|
|
179388
179452
|
return (jsxs("div", { className: "flex items-center justify-between gap-4 py-2", children: [jsx("span", { className: "text-sm text-gray-500", children: label }), jsx("span", { className: "text-sm font-medium text-gray-900 text-right", children: children })] }));
|
|
179389
179453
|
}
|
|
179390
179454
|
|
|
179391
|
-
const PAGE_SIZE$
|
|
179455
|
+
const PAGE_SIZE$f = 8;
|
|
179392
179456
|
const CONTENT_TYPES = [
|
|
179393
179457
|
{ value: 'courses', labelKey: 'gradebookGradebookTab.typeCourses', icon: GraduationCap },
|
|
179394
179458
|
{ value: 'programs', labelKey: 'gradebookGradebookTab.typePrograms', icon: Layers },
|
|
@@ -179419,14 +179483,14 @@ function useGradebookData(type, org, username, page, search) {
|
|
|
179419
179483
|
username,
|
|
179420
179484
|
query: {
|
|
179421
179485
|
page,
|
|
179422
|
-
page_size: PAGE_SIZE$
|
|
179486
|
+
page_size: PAGE_SIZE$f,
|
|
179423
179487
|
platform_key: org,
|
|
179424
179488
|
...(trimmed ? { course_name: trimmed } : {}),
|
|
179425
179489
|
},
|
|
179426
179490
|
}, { skip: type !== 'courses', refetchOnMountOrArgChange: true });
|
|
179427
179491
|
const programsQ = useGetUserEnrolledProgramsQuery([{ username, platformKey: org }], { skip: type !== 'programs' });
|
|
179428
179492
|
const pathwaysQ = useGetUserCatalogPathwaysQuery({ username, platform_key: org }, { skip: type !== 'pathways' });
|
|
179429
|
-
const credentialsQ = useGetUsersAsAssertionsQuery({ platformKey: org, userId: username, page, pageSize: PAGE_SIZE$
|
|
179493
|
+
const credentialsQ = useGetUsersAsAssertionsQuery({ platformKey: org, userId: username, page, pageSize: PAGE_SIZE$f }, { skip: type !== 'credentials', refetchOnMountOrArgChange: true });
|
|
179430
179494
|
const earnedQ = useGetUserEarnedSkillsQuery([{ org, userId: username }], { skip: type !== 'skills' });
|
|
179431
179495
|
const reportedQ = useGetUserReportedSkillsQuery([{ username }], { skip: type !== 'skills' });
|
|
179432
179496
|
const desiredQ = useGetUserDesiredSkillsQuery([{ username }], { skip: type !== 'skills' });
|
|
@@ -179436,12 +179500,12 @@ function useGradebookData(type, org, username, page, search) {
|
|
|
179436
179500
|
const filtered = trimmed
|
|
179437
179501
|
? rows.filter((row) => row.name.toLowerCase().includes(trimmed.toLowerCase()))
|
|
179438
179502
|
: rows;
|
|
179439
|
-
const start = (page - 1) * PAGE_SIZE$
|
|
179503
|
+
const start = (page - 1) * PAGE_SIZE$f;
|
|
179440
179504
|
return {
|
|
179441
|
-
rows: filtered.slice(start, start + PAGE_SIZE$
|
|
179505
|
+
rows: filtered.slice(start, start + PAGE_SIZE$f),
|
|
179442
179506
|
total: filtered.length,
|
|
179443
179507
|
hasPrev: page > 1,
|
|
179444
|
-
hasNext: start + PAGE_SIZE$
|
|
179508
|
+
hasNext: start + PAGE_SIZE$f < filtered.length,
|
|
179445
179509
|
};
|
|
179446
179510
|
};
|
|
179447
179511
|
switch (type) {
|
|
@@ -179498,7 +179562,7 @@ function useGradebookData(type, org, username, page, search) {
|
|
|
179498
179562
|
rows,
|
|
179499
179563
|
total,
|
|
179500
179564
|
hasPrev: page > 1,
|
|
179501
|
-
hasNext: page * PAGE_SIZE$
|
|
179565
|
+
hasNext: page * PAGE_SIZE$f < total,
|
|
179502
179566
|
isLoading: credentialsQ.isLoading,
|
|
179503
179567
|
isFetching: credentialsQ.isFetching,
|
|
179504
179568
|
isError: credentialsQ.isError,
|
|
@@ -222482,7 +222546,7 @@ const AdvancedPagination = ({ currentPage, totalPages, onPageChange, totalCount,
|
|
|
222482
222546
|
return (jsxs("div", { className: cn('flex items-center gap-2', showSummary ? 'justify-between' : 'justify-center', variant === 'footer' && 'border-t border-gray-200 bg-gray-50 px-3 py-3 sm:px-6 sm:py-4', className), children: [showSummary && (jsx("p", { className: "hidden text-sm text-gray-700 sm:block", children: t('advancePagination.showing', { from, to, totalCount, itemLabel }) })), jsxs("div", { className: "flex items-center justify-center gap-1 sm:gap-2", children: [jsx(Button$1, { variant: "outline", size: "sm", className: "hidden h-8 w-8 items-center justify-center rounded-md border-gray-300 bg-transparent p-0 hover:bg-gray-100 sm:flex", onClick: () => onPageChange(1), disabled: currentPage === 1, "aria-label": t('advancePagination.goToFirstPage'), children: jsx(ChevronFirst, { className: "h-4 w-4" }) }), jsxs(Button$1, { variant: "outline", size: "sm", className: "flex h-8 w-8 items-center justify-center rounded-md border-none bg-transparent px-2 text-xs hover:bg-gray-100 sm:border-gray-300 sm:p-0 sm:text-sm", onClick: () => onPageChange(currentPage - 1), disabled: currentPage === 1, "aria-label": t('advancePagination.goToPreviousPage'), children: [jsx(ChevronLeft, { className: "mr-1 h-4 w-4 sm:mr-0" }), jsx("span", { className: "sm:hidden", children: t('advancePagination.prev') })] }), jsxs("span", { className: "mx-1 px-2 text-xs text-gray-700 sm:mx-2 sm:text-sm", children: [jsxs("span", { className: "hidden sm:inline", children: [t('advancePagination.page'), " "] }), currentPage, " ", jsxs("span", { className: "hidden sm:inline", children: [t('advancePagination.of'), " "] }), jsxs("span", { className: "inline sm:hidden", children: [" ", t('advancePagination.mobileSeparator'), " "] }), totalPages] }), jsxs(Button$1, { variant: "outline", size: "sm", className: "flex h-8 w-8 items-center justify-center rounded-md border-none bg-transparent px-2 text-xs hover:bg-gray-100 sm:border-gray-300 sm:p-0 sm:text-sm", onClick: () => onPageChange(currentPage + 1), disabled: currentPage === totalPages, "aria-label": t('advancePagination.goToNextPage'), children: [jsx("span", { className: "sm:hidden", children: t('advancePagination.next') }), jsx(ChevronRight, { className: "ml-1 h-4 w-4 sm:ml-0" })] }), jsx(Button$1, { variant: "outline", size: "sm", className: "hidden h-8 w-8 items-center justify-center rounded-md border-gray-300 bg-transparent p-0 hover:bg-gray-100 sm:flex", onClick: () => onPageChange(totalPages), disabled: currentPage === totalPages, "aria-label": t('advancePagination.goToLastPage'), children: jsx(ChevronLast, { className: "h-4 w-4" }) })] })] }));
|
|
222483
222547
|
};
|
|
222484
222548
|
|
|
222485
|
-
const PAGE_SIZE$
|
|
222549
|
+
const PAGE_SIZE$e = 10;
|
|
222486
222550
|
function UsersTab({ tenant, onInviteClick, currentSpa, showGradebookTab = false, }) {
|
|
222487
222551
|
var _a, _b;
|
|
222488
222552
|
const t = useT();
|
|
@@ -222505,7 +222569,7 @@ function UsersTab({ tenant, onInviteClick, currentSpa, showGradebookTab = false,
|
|
|
222505
222569
|
const isWatcher = isPureWatcher(rbacPermissions, currentTenant);
|
|
222506
222570
|
const { data: users, refetch: refetchPlatformUsers, isLoading: isLoadingPlatformUsers, } = usePlatformUsersQuery({
|
|
222507
222571
|
page,
|
|
222508
|
-
page_size: PAGE_SIZE$
|
|
222572
|
+
page_size: PAGE_SIZE$e,
|
|
222509
222573
|
platform_key: tenant,
|
|
222510
222574
|
platform_org: tenant,
|
|
222511
222575
|
query: debouncedSearchQuery,
|
|
@@ -222519,7 +222583,7 @@ function UsersTab({ tenant, onInviteClick, currentSpa, showGradebookTab = false,
|
|
|
222519
222583
|
// TODO to use required_action: 'Ibl.Core/Users/read',
|
|
222520
222584
|
required_action: 'Ibl.Mentor/Memory/list',
|
|
222521
222585
|
page,
|
|
222522
|
-
page_size: PAGE_SIZE$
|
|
222586
|
+
page_size: PAGE_SIZE$e,
|
|
222523
222587
|
sort: 'name',
|
|
222524
222588
|
...(debouncedSearchQuery.includes('@')
|
|
222525
222589
|
? { email: debouncedSearchQuery }
|
|
@@ -222694,7 +222758,7 @@ function UsersTab({ tenant, onInviteClick, currentSpa, showGradebookTab = false,
|
|
|
222694
222758
|
managed: user,
|
|
222695
222759
|
}));
|
|
222696
222760
|
const totalCount = (_b = (isWatcher ? accessibleUsers === null || accessibleUsers === void 0 ? void 0 : accessibleUsers.count : users === null || users === void 0 ? void 0 : users.count)) !== null && _b !== void 0 ? _b : 0;
|
|
222697
|
-
const totalPages = Math.ceil(totalCount / PAGE_SIZE$
|
|
222761
|
+
const totalPages = Math.ceil(totalCount / PAGE_SIZE$e);
|
|
222698
222762
|
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: t('tabsUserstab.searchPlaceholder'), className: "pl-10 pr-10 focus:ring-blue-500 focus:border-blue-500 h-[35px]", "aria-label": t('tabsUserstab.searchAriaLabel') }), 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" }))] }), !isWatcher && (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: t('tabsUserstab.inviteButton') }) }))] }), 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 ${isWatcher ? 'w-full' : 'w-[41%]'}`, children: t('tabsUserstab.columnEmail') }), !isWatcher && (jsxs(Fragment$1, { children: [jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400 w-[16%]", children: t('tabsUserstab.columnRole') }), jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400 w-[25%]", children: t('tabsUserstab.columnPolicies') }), jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400 w-[18%]", children: t('tabsUserstab.columnStatus') })] }))] }) }), jsxs("tbody", { className: "divide-y divide-gray-200 dark:divide-gray-600", children: [rows.map((row) => {
|
|
222699
222763
|
var _a;
|
|
222700
222764
|
// Only set on the admin path — see {@link UserRow}.
|
|
@@ -222725,7 +222789,7 @@ function UsersTab({ tenant, onInviteClick, currentSpa, showGradebookTab = false,
|
|
|
222725
222789
|
})] }) })] }) }), jsx("td", { className: "px-6 py-4", onClick: (e) => e.stopPropagation(), children: jsx(Switch, { checked: user.active, onCheckedChange: (checked) => handleUserStatusChange(user, checked), disabled: updatingUserIds.has(user === null || user === void 0 ? void 0 : user.user_id), "aria-label": t('tabsUserstab.toggleStatusAriaLabel', {
|
|
222726
222790
|
name: user.name,
|
|
222727
222791
|
}), className: "cursor-pointer data-[state=checked]:bg-blue-500 disabled:cursor-not-allowed disabled:opacity-50" }) })] }))] }, row.key));
|
|
222728
|
-
}), rows.length === 0 && (jsx("tr", { children: jsx("td", { colSpan: isWatcher ? 2 : 5, className: "px-6 py-8 text-center text-gray-500 dark:text-gray-400", children: t('tabsUserstab.noUsersFound') }) }))] })] }) }), jsx(AdvancedPagination, { variant: "footer", className: "-mx-6 -mb-6 mt-4 rounded-b-lg", totalPages: totalPages, currentPage: page, onPageChange: (_page) => handlePageChange(_page), totalCount: totalCount, itemsPerPage: PAGE_SIZE$
|
|
222792
|
+
}), rows.length === 0 && (jsx("tr", { children: jsx("td", { colSpan: isWatcher ? 2 : 5, className: "px-6 py-8 text-center text-gray-500 dark:text-gray-400", children: t('tabsUserstab.noUsersFound') }) }))] })] }) }), jsx(AdvancedPagination, { variant: "footer", className: "-mx-6 -mb-6 mt-4 rounded-b-lg", totalPages: totalPages, currentPage: page, onPageChange: (_page) => handlePageChange(_page), totalCount: totalCount, itemsPerPage: PAGE_SIZE$e, itemLabel: "users" })] })), selectedUser && (jsx(Dialog, { open: !!selectedUser, onOpenChange: (open) => {
|
|
222729
222793
|
if (!open)
|
|
222730
222794
|
setSelectedUser(null);
|
|
222731
222795
|
}, children: jsxs(DialogContent, { autoFocus: false, className: "max-w-7xl w-[85vw] p-0 gap-0 overflow-hidden bg-white profile-component-dialog", style: { height: '85vh', display: 'flex', flexDirection: 'column' }, children: [jsx(DialogTitle, { className: "sr-only", children: t('tabsUserstab.profileDialogTitle') }), jsx(DialogDescription, { className: "sr-only", children: t('tabsUserstab.profileDialogDescription') }), jsx(Profile, { tenant: tenant, tenants: [], username: selectedUser.username, isAdmin: selectedUser.isAdmin, currentSPA: currentSpa, onClose: () => setSelectedUser(null), customization: {
|
|
@@ -223945,7 +224009,7 @@ function PoliciesTab({ tenant }) {
|
|
|
223945
224009
|
: t('tabsPoliciestab.createPolicy')] }) }) }), editing && (policyDetails === null || policyDetails === void 0 ? void 0 : policyDetails.is_internal) && (jsx(TooltipContent, { children: jsx("p", { children: t('tabsPoliciestab.cannotEditInternal') }) }))] }) })] })] }) }), jsx(ResourcePickerModal, { open: isResourcePickerOpen, onOpenChange: setIsResourcePickerOpen, tenant: tenant, onSelect: addPickedResource })] }));
|
|
223946
224010
|
}
|
|
223947
224011
|
|
|
223948
|
-
const PAGE_SIZE$
|
|
224012
|
+
const PAGE_SIZE$d = 10;
|
|
223949
224013
|
function normalizeEvents(events) {
|
|
223950
224014
|
if (!events)
|
|
223951
224015
|
return [];
|
|
@@ -223994,8 +224058,8 @@ function AlertsTab({ tenant }) {
|
|
|
223994
224058
|
const { data: watchedGroupsData, isLoading, isError, refetch, } = useGetWatchedGroupsQuery({
|
|
223995
224059
|
params: {
|
|
223996
224060
|
platform_key: tenant,
|
|
223997
|
-
limit: PAGE_SIZE$
|
|
223998
|
-
offset: (page - 1) * PAGE_SIZE$
|
|
224061
|
+
limit: PAGE_SIZE$d,
|
|
224062
|
+
offset: (page - 1) * PAGE_SIZE$d,
|
|
223999
224063
|
},
|
|
224000
224064
|
});
|
|
224001
224065
|
const groups = useMemo(() => {
|
|
@@ -224008,7 +224072,7 @@ function AlertsTab({ tenant }) {
|
|
|
224008
224072
|
return results;
|
|
224009
224073
|
}, [watchedGroupsData, debouncedSearchQuery]);
|
|
224010
224074
|
const totalPages = watchedGroupsData
|
|
224011
|
-
? Math.max(1, Math.ceil(watchedGroupsData.count / PAGE_SIZE$
|
|
224075
|
+
? Math.max(1, Math.ceil(watchedGroupsData.count / PAGE_SIZE$d))
|
|
224012
224076
|
: 0;
|
|
224013
224077
|
const handlePageChange = async (newPage) => {
|
|
224014
224078
|
setPage(newPage);
|
|
@@ -224317,7 +224381,7 @@ function AlertsTab({ tenant }) {
|
|
|
224317
224381
|
setDeletingGroupId(null);
|
|
224318
224382
|
}
|
|
224319
224383
|
}
|
|
224320
|
-
return (jsxs("div", { className: "mt-4", children: [jsxs("div", { className: "flex mb-6 gap-2 flex-row items-center justify-between", children: [jsxs("div", { className: "relative max-w-sm w-full sm:w-auto", children: [jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" }), jsx(Input, { value: searchQuery, onChange: (e) => setSearchQuery(e.target.value), placeholder: t('tabsAlertstab.searchAlertsPlaceholder'), "aria-label": t('tabsAlertstab.searchAlertsAriaLabel'), className: "pl-10 pr-10 focus:ring-blue-500 focus:border-blue-500 h-[35px]" }), 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: "flex gap-2", children: jsx(Button$1, { onClick: openNew, "aria-label": t('tabsAlertstab.newAlertAriaLabel'), className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] hover:opacity-90 text-white h-[35px]", children: t('tabsAlertstab.newAlert') }) })] }), isLoading && (jsx("div", { className: "flex justify-center items-center h-64", children: jsx("div", { className: "py-8 text-center text-sm text-gray-500 dark:text-gray-400", children: t('tabsAlertstab.loading') }) })), isError && (jsx("div", { className: "py-8 text-center text-sm text-red-500", children: t('tabsAlertstab.failedToLoadAlerts') })), !isLoading && !isError && (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", children: t('tabsAlertstab.columnName') }), jsx("th", { className: "px-6 py-3 text-right font-medium text-gray-500 dark:text-gray-400 w-[120px]" })] }) }), jsxs("tbody", { className: "divide-y divide-gray-200 dark:divide-gray-600", children: [groups.map((g) => (jsxs("tr", { children: [jsx("td", { className: "px-6 py-4 text-gray-900 dark:text-gray-100 text-sm", children: g.name }), jsx("td", { className: "px-6 py-4", children: jsxs("div", { className: "flex gap-2 justify-end", children: [jsx(Button$1, { variant: "ghost", size: "sm", onClick: () => openEdit(g), disabled: deletingGroupId === g.id, "aria-label": t('tabsAlertstab.editAlertAriaLabel', { name: g.name }), children: jsx(Pencil, { className: "h-4 w-4", "aria-hidden": "true" }) }), jsx(Button$1, { variant: "ghost", size: "sm", onClick: () => onDelete(g), className: "text-red-600 hover:text-red-700", disabled: deletingGroupId === g.id, "aria-label": t('tabsAlertstab.deleteAlertAriaLabel', { name: g.name }), children: deletingGroupId === g.id ? (jsx(LoaderCircle, { className: "h-4 w-4 animate-spin", "aria-hidden": "true" })) : (jsx(Trash2, { className: "h-4 w-4", "aria-hidden": "true" })) })] }) })] }, g.id))), groups.length === 0 && (jsx("tr", { children: jsx("td", { colSpan: 2, className: "px-6 py-8 text-center text-gray-500 dark:text-gray-400", children: t('tabsAlertstab.noAlertsFound') }) }))] })] }) })), !isLoading && !isError && (jsx(AdvancedPagination, { variant: "footer", className: "-mx-6 -mb-6 mt-4 rounded-b-lg", totalPages: totalPages, currentPage: page, onPageChange: (newPage) => handlePageChange(newPage), totalCount: watchedGroupsData === null || watchedGroupsData === void 0 ? void 0 : watchedGroupsData.count, itemsPerPage: PAGE_SIZE$
|
|
224384
|
+
return (jsxs("div", { className: "mt-4", children: [jsxs("div", { className: "flex mb-6 gap-2 flex-row items-center justify-between", children: [jsxs("div", { className: "relative max-w-sm w-full sm:w-auto", children: [jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" }), jsx(Input, { value: searchQuery, onChange: (e) => setSearchQuery(e.target.value), placeholder: t('tabsAlertstab.searchAlertsPlaceholder'), "aria-label": t('tabsAlertstab.searchAlertsAriaLabel'), className: "pl-10 pr-10 focus:ring-blue-500 focus:border-blue-500 h-[35px]" }), 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: "flex gap-2", children: jsx(Button$1, { onClick: openNew, "aria-label": t('tabsAlertstab.newAlertAriaLabel'), className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] hover:opacity-90 text-white h-[35px]", children: t('tabsAlertstab.newAlert') }) })] }), isLoading && (jsx("div", { className: "flex justify-center items-center h-64", children: jsx("div", { className: "py-8 text-center text-sm text-gray-500 dark:text-gray-400", children: t('tabsAlertstab.loading') }) })), isError && (jsx("div", { className: "py-8 text-center text-sm text-red-500", children: t('tabsAlertstab.failedToLoadAlerts') })), !isLoading && !isError && (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", children: t('tabsAlertstab.columnName') }), jsx("th", { className: "px-6 py-3 text-right font-medium text-gray-500 dark:text-gray-400 w-[120px]" })] }) }), jsxs("tbody", { className: "divide-y divide-gray-200 dark:divide-gray-600", children: [groups.map((g) => (jsxs("tr", { children: [jsx("td", { className: "px-6 py-4 text-gray-900 dark:text-gray-100 text-sm", children: g.name }), jsx("td", { className: "px-6 py-4", children: jsxs("div", { className: "flex gap-2 justify-end", children: [jsx(Button$1, { variant: "ghost", size: "sm", onClick: () => openEdit(g), disabled: deletingGroupId === g.id, "aria-label": t('tabsAlertstab.editAlertAriaLabel', { name: g.name }), children: jsx(Pencil, { className: "h-4 w-4", "aria-hidden": "true" }) }), jsx(Button$1, { variant: "ghost", size: "sm", onClick: () => onDelete(g), className: "text-red-600 hover:text-red-700", disabled: deletingGroupId === g.id, "aria-label": t('tabsAlertstab.deleteAlertAriaLabel', { name: g.name }), children: deletingGroupId === g.id ? (jsx(LoaderCircle, { className: "h-4 w-4 animate-spin", "aria-hidden": "true" })) : (jsx(Trash2, { className: "h-4 w-4", "aria-hidden": "true" })) })] }) })] }, g.id))), groups.length === 0 && (jsx("tr", { children: jsx("td", { colSpan: 2, className: "px-6 py-8 text-center text-gray-500 dark:text-gray-400", children: t('tabsAlertstab.noAlertsFound') }) }))] })] }) })), !isLoading && !isError && (jsx(AdvancedPagination, { variant: "footer", className: "-mx-6 -mb-6 mt-4 rounded-b-lg", totalPages: totalPages, currentPage: page, onPageChange: (newPage) => handlePageChange(newPage), totalCount: watchedGroupsData === null || watchedGroupsData === void 0 ? void 0 : watchedGroupsData.count, itemsPerPage: PAGE_SIZE$d, itemLabel: "alerts" })), jsx(Dialog, { open: isOpen, onOpenChange: setIsOpen, children: jsxs(DialogContent, { "aria-describedby": undefined, className: "max-w-2xl max-h-[90vh] overflow-y-auto", children: [jsx(DialogHeader, { children: jsx(DialogTitle, { children: editingGroup ? t('tabsAlertstab.editAlert') : t('tabsAlertstab.newAlert') }) }), jsxs("div", { className: "space-y-5", children: [jsxs("div", { className: "grid gap-1.5", children: [jsx(Label$1, { htmlFor: "wg-name", children: t('tabsAlertstab.nameLabel') }), jsx(Input, { id: "wg-name", value: name, onChange: (e) => setName(e.target.value), placeholder: t('tabsAlertstab.enterAlertNamePlaceholder'), required: true })] }), jsxs("div", { className: "grid gap-1.5", children: [jsx(Label$1, { children: t('tabsAlertstab.watchedUsersLabel') }), jsx("p", { className: "text-xs text-gray-500 dark:text-gray-400", children: t('tabsAlertstab.watchedUsersDescription') }), watchedUsers.length > 0 ? (jsx("div", { className: "space-y-2 max-h-48 overflow-y-auto border border-gray-200 dark:border-gray-700 rounded-md p-2", children: watchedUsers.map((user) => (jsxs("div", { className: "flex items-center justify-between bg-gray-50 dark:bg-gray-800 p-2 rounded-md", children: [jsxs("div", { className: "flex flex-col", children: [jsx("span", { className: "text-sm font-medium text-gray-900 dark:text-gray-100", children: user.name || user.username }), user.email && (jsx("span", { className: "text-xs text-gray-500 dark:text-gray-400", children: user.email }))] }), jsx(Button$1, { type: "button", variant: "ghost", size: "sm", onClick: () => removeWatchedUserDraft(user.id), className: "h-8 w-8 p-0 text-red-600 hover:text-red-700 hover:bg-red-50 dark:hover:bg-red-900/20", "aria-label": t('tabsAlertstab.removeWatchedUserAriaLabel', {
|
|
224321
224385
|
username: user.username,
|
|
224322
224386
|
}), children: jsx(X$2, { className: "h-4 w-4" }) })] }, user.id))) })) : (jsx("div", { className: "text-sm text-gray-500 dark:text-gray-400 p-4 text-center border border-dashed border-gray-300 dark:border-gray-600 rounded-md", children: t('tabsAlertstab.noWatchedUsersAdded') })), jsxs("div", { className: "relative", children: [jsx(Input, { value: watchedUserSearch, onChange: (e) => {
|
|
224323
224387
|
setWatchedUserSearch(e.target.value);
|
|
@@ -225505,7 +225569,7 @@ function BlocksView({ platformKey, onBack, }) {
|
|
|
225505
225569
|
}
|
|
225506
225570
|
|
|
225507
225571
|
const FILTER_ORDER = ['all', ...APPLICATION_STATUSES];
|
|
225508
|
-
const PAGE_SIZE$
|
|
225572
|
+
const PAGE_SIZE$c = 20;
|
|
225509
225573
|
const SEARCH_DEBOUNCE_MS$1 = 300;
|
|
225510
225574
|
/**
|
|
225511
225575
|
* The public application URL on the auth SPA for one form of a platform
|
|
@@ -225648,7 +225712,7 @@ function SubmissionsPipeline({ platformKey, form, onBack, onOpen, }) {
|
|
|
225648
225712
|
...(sort !== '-created' ? { sort } : {}),
|
|
225649
225713
|
...candidateParams,
|
|
225650
225714
|
page,
|
|
225651
|
-
page_size: PAGE_SIZE$
|
|
225715
|
+
page_size: PAGE_SIZE$c,
|
|
225652
225716
|
}, {
|
|
225653
225717
|
refetchOnMountOrArgChange: true,
|
|
225654
225718
|
});
|
|
@@ -225657,7 +225721,7 @@ function SubmissionsPipeline({ platformKey, form, onBack, onOpen, }) {
|
|
|
225657
225721
|
: [];
|
|
225658
225722
|
const rows = form ? allRows.filter((row) => row.form_id === form.id) : allRows;
|
|
225659
225723
|
const count = typeof (pipeline === null || pipeline === void 0 ? void 0 : pipeline.count) === 'number' ? pipeline.count : allRows.length;
|
|
225660
|
-
const totalPages = Math.max(1, Math.ceil(count / PAGE_SIZE$
|
|
225724
|
+
const totalPages = Math.max(1, Math.ceil(count / PAGE_SIZE$c));
|
|
225661
225725
|
const counts = statsCounts(stats);
|
|
225662
225726
|
const countFor = (key) => {
|
|
225663
225727
|
if (!stats)
|
|
@@ -225695,7 +225759,7 @@ function SubmissionsPipeline({ platformKey, form, onBack, onOpen, }) {
|
|
|
225695
225759
|
}) }) }), jsx("td", { className: "whitespace-nowrap px-6 py-4 text-sm text-gray-600 dark:text-gray-300", children: formatDate(row) }), jsx("td", { className: "px-6 py-4", children: jsx(Badge, { variant: "outline", className: approvalTone(row.status), children: STATUS_LABEL_KEYS[row.status]
|
|
225696
225760
|
? t(STATUS_LABEL_KEYS[row.status])
|
|
225697
225761
|
: row.status }) })] }, row.id));
|
|
225698
|
-
})) })] }) }), jsx(AdvancedPagination, { variant: "footer", className: "-mx-6 -mb-6 mt-4 rounded-b-lg", totalPages: totalPages, currentPage: page, onPageChange: (newPage) => setPage(newPage), totalCount: count, itemsPerPage: PAGE_SIZE$
|
|
225762
|
+
})) })] }) }), jsx(AdvancedPagination, { variant: "footer", className: "-mx-6 -mb-6 mt-4 rounded-b-lg", totalPages: totalPages, currentPage: page, onPageChange: (newPage) => setPage(newPage), totalCount: count, itemsPerPage: PAGE_SIZE$c, itemLabel: "applications" })] }))] }));
|
|
225699
225763
|
}
|
|
225700
225764
|
|
|
225701
225765
|
// The user-onboarding form contract: the schema an admin authors in the admin
|
|
@@ -231744,7 +231808,7 @@ function ItemSearchDropdown({ platformKey, onSelect, }) {
|
|
|
231744
231808
|
}, children: [jsx("div", { className: "flex-1 min-w-0", children: jsx("span", { className: "text-sm font-medium text-gray-900 dark:text-gray-100 block truncate", children: item.name }) }), jsx(Badge, { variant: "secondary", className: "text-xs shrink-0 capitalize", children: displayItemType(item.itemType) })] }, `${item.itemType}-${item.id}`)))) : isFetching ? (jsx("div", { className: "px-3 py-4 text-center text-sm text-gray-400", children: t('monetizationItemSearchDropdown.searching') })) : (jsx("div", { className: "px-3 py-4 text-center text-sm text-gray-400", children: t('monetizationItemSearchDropdown.noItemsFound') })) }))] }));
|
|
231745
231809
|
}
|
|
231746
231810
|
|
|
231747
|
-
const PAGE_SIZE$
|
|
231811
|
+
const PAGE_SIZE$b = 8;
|
|
231748
231812
|
function PaywalledItemsList({ platformKey, onSelectItem, onAddCustomItem, }) {
|
|
231749
231813
|
const t = useT();
|
|
231750
231814
|
const [page, setPage] = useState(1);
|
|
@@ -231752,7 +231816,7 @@ function PaywalledItemsList({ platformKey, onSelectItem, onAddCustomItem, }) {
|
|
|
231752
231816
|
const { data: paywalls, isLoading } = useListPaywallsQuery({
|
|
231753
231817
|
platform_key: platformKey,
|
|
231754
231818
|
page,
|
|
231755
|
-
page_size: PAGE_SIZE$
|
|
231819
|
+
page_size: PAGE_SIZE$b,
|
|
231756
231820
|
...(statusFilter !== 'all' && { is_enabled: statusFilter === 'active' }),
|
|
231757
231821
|
}, { refetchOnMountOrArgChange: true });
|
|
231758
231822
|
return (jsxs("div", { className: "space-y-4", children: [jsx(Card$1, { className: "shadow-sm border", style: { borderColor: 'oklch(.922 0 0)' }, children: jsxs(CardContent, { className: "p-4", children: [jsx("h4", { className: "text-sm font-medium text-gray-700 dark:text-gray-300 mb-3", children: t('monetizationPaywalledItemsList.configureItemForSale') }), jsxs("div", { className: "flex items-center gap-2", children: [jsx(ItemSearchDropdown, { platformKey: platformKey, onSelect: (itemType, uniqueId, name) => onSelectItem(itemType, uniqueId, name) }), jsx(Button$1, { variant: "outline", size: "icon", onClick: onAddCustomItem, className: "shrink-0 cursor-pointer", title: t('monetizationPaywalledItemsList.addCustomItemTitle'), children: jsx(Plus, { className: "h-4 w-4" }) })] })] }) }), jsxs("div", { className: "space-y-2", children: [jsxs("div", { className: "flex items-center justify-between", children: [jsx("h4", { className: "text-sm font-medium text-gray-500", children: t('monetizationPaywalledItemsList.configuredItems') }), jsxs(Select$1, { value: statusFilter, onValueChange: (v) => {
|
|
@@ -231775,7 +231839,7 @@ function PaywalledItemsList({ platformKey, onSelectItem, onAddCustomItem, }) {
|
|
|
231775
231839
|
: 'bg-gray-100 text-gray-500 border-gray-200 hover:bg-gray-100', children: pw.is_enabled
|
|
231776
231840
|
? t('monetizationPaywalledItemsList.statusActive')
|
|
231777
231841
|
: t('monetizationPaywalledItemsList.statusDisabled') })] }) }, `${pw.item_type}-${pw.item_id}`));
|
|
231778
|
-
}), jsx(AdvancedPagination, { variant: "footer", className: "mt-2 rounded-lg border", currentPage: page, totalPages: Math.ceil(paywalls.count / PAGE_SIZE$
|
|
231842
|
+
}), jsx(AdvancedPagination, { variant: "footer", className: "mt-2 rounded-lg border", currentPage: page, totalPages: Math.ceil(paywalls.count / PAGE_SIZE$b), onPageChange: setPage, totalCount: paywalls.count, itemsPerPage: PAGE_SIZE$b, itemLabel: "items" })] })) : (jsx("p", { className: "text-sm text-gray-400 text-center py-6", children: statusFilter !== 'all'
|
|
231779
231843
|
? t('monetizationPaywalledItemsList.noFilteredItemsFound', { status: statusFilter })
|
|
231780
231844
|
: t('monetizationPaywalledItemsList.noItemsConfigured') }))] })] }));
|
|
231781
231845
|
}
|
|
@@ -232126,7 +232190,7 @@ function MonetizationTab({ platformKey, authURL }) {
|
|
|
232126
232190
|
}
|
|
232127
232191
|
|
|
232128
232192
|
/** Matches the server-side cap on the global memories listing. */
|
|
232129
|
-
const PAGE_SIZE$
|
|
232193
|
+
const PAGE_SIZE$a = 25;
|
|
232130
232194
|
/**
|
|
232131
232195
|
* Popup for managing one user's global memories. Reads them the way the
|
|
232132
232196
|
* profile preview does — the caller in the path, the managed user identified
|
|
@@ -232147,10 +232211,10 @@ function UserMemoriesModal({ isOpen, onClose, tenantKey, adminUsername, user, })
|
|
|
232147
232211
|
userId: adminUsername,
|
|
232148
232212
|
// `user_id` must be the managed user's id (username) — the backend does
|
|
232149
232213
|
// not resolve emails here, so passing one returns an empty list.
|
|
232150
|
-
params: { page, page_size: PAGE_SIZE$
|
|
232214
|
+
params: { page, page_size: PAGE_SIZE$a, user_id: user.username },
|
|
232151
232215
|
});
|
|
232152
232216
|
const memories = (_a = memoriesData === null || memoriesData === void 0 ? void 0 : memoriesData.results) !== null && _a !== void 0 ? _a : [];
|
|
232153
|
-
const totalPages = (memoriesData === null || memoriesData === void 0 ? void 0 : memoriesData.count) ? Math.ceil(memoriesData.count / PAGE_SIZE$
|
|
232217
|
+
const totalPages = (memoriesData === null || memoriesData === void 0 ? void 0 : memoriesData.count) ? Math.ceil(memoriesData.count / PAGE_SIZE$a) : 0;
|
|
232154
232218
|
const isForbidden = !!error && error.status === 403;
|
|
232155
232219
|
// The managed user's capture/personalization toggles, addressed through
|
|
232156
232220
|
// their path the way every admin write here is. Hidden unless they load.
|
|
@@ -232206,7 +232270,7 @@ function UserMemoriesModal({ isOpen, onClose, tenantKey, adminUsername, user, })
|
|
|
232206
232270
|
}), className: "cursor-pointer data-[state=checked]:bg-blue-500 flex-shrink-0" })] })] })), !isForbidden && (jsx("div", { className: "flex justify-end mb-4", children: jsxs(Button$1, { "data-testid": "user-memories-add", variant: "outline", size: "sm", onClick: () => setShowAdd(true), className: "text-xs", children: [jsx(Plus, { className: "h-3 w-3 mr-1" }), t('memoryAdminUserMemoriesModal.addMemoryButton')] }) })), isForbidden ? (jsx("div", { className: "rounded-lg border px-6 py-8 text-center", style: { borderColor: 'oklch(.922 0 0)' }, children: jsx("p", { className: "text-sm text-gray-500", children: t('memoryAdminUserMemoriesModal.forbidden') }) })) : error ? (jsx("div", { className: "rounded-lg border px-6 py-8 text-center", style: { borderColor: 'oklch(.922 0 0)' }, children: jsx("p", { className: "text-sm text-gray-500", children: t('memoryAdminUserMemoriesModal.failedToLoad') }) })) : (jsx(MemoriesList, { memories: memories, isLoading: isLoading, emptyText: t('memoryAdminUserMemoriesModal.noMemories'), deletingId: deletingId, onEdit: setEditingMemory, onDelete: handleDeleteMemory, totalPages: totalPages, currentPage: page, onPageChange: setPage })), jsx(AddMemoryDialog, { open: showAdd, onOpenChange: setShowAdd, org: tenantKey, username: user.username }), editingMemory && (jsx(EditMemoryDialog, { open: !!editingMemory, onOpenChange: (open) => !open && setEditingMemory(null), org: tenantKey, username: user.username, memory: editingMemory }))] }) }));
|
|
232207
232271
|
}
|
|
232208
232272
|
|
|
232209
|
-
const PAGE_SIZE$
|
|
232273
|
+
const PAGE_SIZE$9 = 10;
|
|
232210
232274
|
const SEARCH_DEBOUNCE_MS = 300;
|
|
232211
232275
|
/**
|
|
232212
232276
|
* Tenant users table with server-side search. Opening a row shows that user's
|
|
@@ -232239,7 +232303,7 @@ function GlobalMemoriesSection({ tenantKey, username }) {
|
|
|
232239
232303
|
platform_key: tenantKey,
|
|
232240
232304
|
platform_org: tenantKey,
|
|
232241
232305
|
page,
|
|
232242
|
-
page_size: PAGE_SIZE$
|
|
232306
|
+
page_size: PAGE_SIZE$9,
|
|
232243
232307
|
query: debouncedSearch,
|
|
232244
232308
|
return_policies: 'false',
|
|
232245
232309
|
});
|
|
@@ -232260,7 +232324,7 @@ function GlobalMemoriesSection({ tenantKey, username }) {
|
|
|
232260
232324
|
email: user.email,
|
|
232261
232325
|
}));
|
|
232262
232326
|
}, [data]);
|
|
232263
|
-
const totalPages = Math.ceil(((_a = data === null || data === void 0 ? void 0 : data.count) !== null && _a !== void 0 ? _a : 0) / PAGE_SIZE$
|
|
232327
|
+
const totalPages = Math.ceil(((_a = data === null || data === void 0 ? void 0 : data.count) !== null && _a !== void 0 ? _a : 0) / PAGE_SIZE$9);
|
|
232264
232328
|
const isForbidden = !!error && error.status === 403;
|
|
232265
232329
|
return (jsxs("div", { "data-testid": "memory-admin-global-section", children: [jsxs("div", { className: "relative mb-6 max-w-sm w-full sm:w-auto", children: [jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" }), jsx(Input, { "data-testid": "memory-admin-users-search", type: "text", value: searchQuery, onChange: (event) => setSearchQuery(event.target.value), placeholder: t('memoryAdminTab.searchUsersPlaceholder'), className: "pl-10 pr-10 focus:ring-blue-500 focus:border-blue-500 h-[35px]", "aria-label": t('memoryAdminTab.searchUsersAriaLabel') }), searchQuery.length > 0 && (searchQuery !== debouncedSearch || isFetching) && (jsx(LoaderCircle, { "data-testid": "user-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" }))] }), isForbidden ? (jsx("div", { className: "rounded-lg border px-6 py-8 text-center", style: { borderColor: 'oklch(.922 0 0)' }, children: jsx("p", { className: "text-sm text-gray-500", children: t('memoryAdminTab.forbidden') }) })) : 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-[28%]", children: t('memoryAdminTab.nameColumn') }), jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400 w-[26%]", children: t('memoryAdminTab.usernameColumn') }), jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400 w-[30%]", children: t('memoryAdminTab.emailColumn') }), jsx("th", { className: "px-6 py-3 text-right font-medium text-gray-500 dark:text-gray-400 w-[16%]", children: t('memoryAdminTab.actionsColumn') })] }) }), jsxs("tbody", { className: "divide-y divide-gray-200 dark:divide-gray-600", children: [users.map((user) => (jsxs("tr", { "data-testid": `memory-admin-user-row-${user.username}`, children: [jsx("td", { className: "px-6 py-4 text-gray-900 dark:text-gray-100 max-w-0", children: jsx("div", { className: "truncate font-medium", children: user.name || '—' }) }), jsx("td", { className: "px-6 py-4 text-gray-600 dark:text-gray-300 max-w-0", children: jsx("div", { className: "truncate", children: user.username }) }), jsx("td", { className: "px-6 py-4 text-gray-600 dark:text-gray-300 max-w-0", children: jsx("div", { className: "truncate", children: user.email || '—' }) }), jsx("td", { className: "px-6 py-4", children: jsx("div", { className: "flex justify-end gap-2", children: jsx(Button$1, { "data-testid": `memory-admin-user-view-${user.username}`, variant: "ghost", size: "sm", "aria-label": t('memoryAdminTab.viewMemoriesAriaLabel', {
|
|
232266
232330
|
name: user.email || user.username,
|
|
@@ -232282,7 +232346,7 @@ const BulkDeleteMemoryModal$1 = dynamic(() => Promise.resolve().then(function ()
|
|
|
232282
232346
|
const ManageCategoriesModal$1 = dynamic(() => Promise.resolve().then(function () { return manageCategoriesModal; }).then((module) => ({
|
|
232283
232347
|
default: module.ManageCategoriesModal,
|
|
232284
232348
|
})), { ssr: false });
|
|
232285
|
-
const PAGE_SIZE$
|
|
232349
|
+
const PAGE_SIZE$8 = 20;
|
|
232286
232350
|
const SNAPSHOT_PAGE_SIZE = 1000;
|
|
232287
232351
|
function ManageMemories({ tenantKey, username, mentorId }) {
|
|
232288
232352
|
var _a, _b, _c, _d, _e;
|
|
@@ -232297,7 +232361,7 @@ function ManageMemories({ tenantKey, username, mentorId }) {
|
|
|
232297
232361
|
setPage(1);
|
|
232298
232362
|
}, [selectedLearner, dateRange, selectedCategorySlug]);
|
|
232299
232363
|
const listParams = useMemo(() => {
|
|
232300
|
-
const params = { page, page_size: PAGE_SIZE$
|
|
232364
|
+
const params = { page, page_size: PAGE_SIZE$8 };
|
|
232301
232365
|
if (selectedLearner)
|
|
232302
232366
|
params.email = selectedLearner;
|
|
232303
232367
|
if (selectedCategorySlug !== 'all')
|
|
@@ -232316,7 +232380,7 @@ function ManageMemories({ tenantKey, username, mentorId }) {
|
|
|
232316
232380
|
}, {
|
|
232317
232381
|
skip: !tenantKey || !username || !mentorId,
|
|
232318
232382
|
});
|
|
232319
|
-
const totalPages = Math.max(1, Math.ceil(((_a = listResponse === null || listResponse === void 0 ? void 0 : listResponse.count) !== null && _a !== void 0 ? _a : 0) / PAGE_SIZE$
|
|
232383
|
+
const totalPages = Math.max(1, Math.ceil(((_a = listResponse === null || listResponse === void 0 ? void 0 : listResponse.count) !== null && _a !== void 0 ? _a : 0) / PAGE_SIZE$8));
|
|
232320
232384
|
const { data: adminCategories } = useGetMemoryCategoriesAdminQuery({
|
|
232321
232385
|
org: tenantKey,
|
|
232322
232386
|
mentorId,
|
|
@@ -232558,7 +232622,7 @@ function AgentMemoriesModal({ isOpen, onClose, tenantKey, username, agent, }) {
|
|
|
232558
232622
|
return (jsx(Dialog, { open: isOpen, onOpenChange: (open) => !open && onClose(), children: jsxs(DialogContent, { "data-testid": "agent-memories-modal", "aria-label": "agent-memories", className: "flex max-h-[90vh] w-[calc(100vw-2rem)] flex-col gap-0 overflow-hidden p-0 sm:max-w-4xl", children: [jsxs(DialogHeader, { className: "flex-shrink-0 border-b border-gray-200 px-6 py-4 pr-12", children: [jsx(DialogTitle, { className: "ibl-dialog-title", children: agent.name }), jsx(DialogDescription, { children: t('memoryAdminAgentMemoriesModal.description') })] }), jsx("div", { className: "min-h-0 flex-1 overflow-y-auto p-3 lg:p-4", children: jsx("div", { className: "space-y-8", children: jsx(ManageMemories, { tenantKey: tenantKey, username: username, mentorId: agent.unique_id }) }) })] }) }));
|
|
232559
232623
|
}
|
|
232560
232624
|
|
|
232561
|
-
const PAGE_SIZE$
|
|
232625
|
+
const PAGE_SIZE$7 = 10;
|
|
232562
232626
|
/**
|
|
232563
232627
|
* Agents table filtered by the same agent autocomplete the Billing tab's
|
|
232564
232628
|
* Agent Limits section uses. Opening a row shows that agent's memories in a
|
|
@@ -232591,12 +232655,12 @@ function AgentMemoriesSection({ tenantKey, username }) {
|
|
|
232591
232655
|
const { data, isLoading, isFetching, error } = useGetMentorsQuery({
|
|
232592
232656
|
org: tenantKey,
|
|
232593
232657
|
username,
|
|
232594
|
-
limit: PAGE_SIZE$
|
|
232595
|
-
offset: (page - 1) * PAGE_SIZE$
|
|
232658
|
+
limit: PAGE_SIZE$7,
|
|
232659
|
+
offset: (page - 1) * PAGE_SIZE$7,
|
|
232596
232660
|
...(agentFilter ? { uniqueId: agentFilter.value } : {}),
|
|
232597
232661
|
});
|
|
232598
232662
|
const agents = ((_a = data === null || data === void 0 ? void 0 : data.results) !== null && _a !== void 0 ? _a : []);
|
|
232599
|
-
const totalPages = (data === null || data === void 0 ? void 0 : data.count) ? Math.ceil(data.count / PAGE_SIZE$
|
|
232663
|
+
const totalPages = (data === null || data === void 0 ? void 0 : data.count) ? Math.ceil(data.count / PAGE_SIZE$7) : 0;
|
|
232600
232664
|
const isForbidden = !!error && error.status === 403;
|
|
232601
232665
|
return (jsxs("div", { "data-testid": "memory-admin-agent-section", children: [jsx("div", { className: "mb-6 max-w-sm", children: jsx(SearchSelect, { labels: {
|
|
232602
232666
|
// No field label — the users tab's search carries none either.
|
|
@@ -263346,7 +263410,7 @@ const AutoResizeTextarea = ({ allowEmptySubmit = false, value, onChange, onSubmi
|
|
|
263346
263410
|
disabled, placeholder: placeholder, style: combinedStyle, className: `flex max-h-32 min-h-[36px] w-full resize-none rounded-2xl border-0 border-gray-200 bg-transparent px-4 py-2 pt-2 pb-1 text-base ring-offset-white placeholder:text-gray-400 focus:outline-none focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 dark:border-gray-800 dark:bg-gray-950 dark:ring-offset-gray-950 dark:placeholder:text-gray-400 ${className}`, ...props }));
|
|
263347
263411
|
};
|
|
263348
263412
|
|
|
263349
|
-
const PAGE_SIZE$
|
|
263413
|
+
const PAGE_SIZE$6 = 10;
|
|
263350
263414
|
const MemoryMenu = ({ onClose, mentorId, tenantKey, username }) => {
|
|
263351
263415
|
const t = useT();
|
|
263352
263416
|
const [page, setPage] = useState(1);
|
|
@@ -263364,7 +263428,7 @@ const MemoryMenu = ({ onClose, mentorId, tenantKey, username }) => {
|
|
|
263364
263428
|
mentorId,
|
|
263365
263429
|
params: {
|
|
263366
263430
|
page,
|
|
263367
|
-
page_size: PAGE_SIZE$
|
|
263431
|
+
page_size: PAGE_SIZE$6,
|
|
263368
263432
|
my_memory: true,
|
|
263369
263433
|
},
|
|
263370
263434
|
}, {
|
|
@@ -267316,7 +267380,7 @@ function DeleteItemConfirm({ isOpen, onClose, tenantKey, username, datasetName,
|
|
|
267316
267380
|
: t('benchmarksDeleteItemConfirm.delete') })] })] }) }));
|
|
267317
267381
|
}
|
|
267318
267382
|
|
|
267319
|
-
const PAGE_SIZE$
|
|
267383
|
+
const PAGE_SIZE$5 = 10;
|
|
267320
267384
|
function BenchmarkItemsModal({ isOpen, onClose, tenantKey, username, datasetName }) {
|
|
267321
267385
|
var _a;
|
|
267322
267386
|
const t = useT();
|
|
@@ -267328,17 +267392,17 @@ function BenchmarkItemsModal({ isOpen, onClose, tenantKey, username, datasetName
|
|
|
267328
267392
|
userId: username,
|
|
267329
267393
|
datasetName,
|
|
267330
267394
|
page,
|
|
267331
|
-
limit: PAGE_SIZE$
|
|
267395
|
+
limit: PAGE_SIZE$5,
|
|
267332
267396
|
});
|
|
267333
267397
|
const items = (_a = data === null || data === void 0 ? void 0 : data.results) !== null && _a !== void 0 ? _a : [];
|
|
267334
|
-
const totalPages = evalTotalPages(data === null || data === void 0 ? void 0 : data.count, PAGE_SIZE$
|
|
267398
|
+
const totalPages = evalTotalPages(data === null || data === void 0 ? void 0 : data.count, PAGE_SIZE$5);
|
|
267335
267399
|
return (jsx(Dialog, { open: isOpen, onOpenChange: (open) => !open && onClose(), children: jsxs(DialogContent, { "aria-label": "benchmark-items", className: "w-full max-w-4xl max-h-[90vh] overflow-y-auto", children: [jsxs(DialogHeader, { children: [jsx(DialogTitle, { children: datasetName }), jsx(DialogDescription, { children: t('benchmarksBenchmarkItemsModal.description') })] }), jsx("div", { className: "flex justify-end mb-4", children: jsxs(Button$1, { onClick: () => setShowAdd(true), className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] hover:opacity-90 text-white h-[35px]", children: [jsx(Plus, { className: "h-4 w-4 mr-1" }), t('benchmarksBenchmarkItemsModal.addItems')] }) }), isLoading ? (jsx("div", { className: "flex justify-center items-center h-40", 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-4 py-3 text-left font-medium text-gray-500 dark:text-gray-400 w-[45%]", children: t('benchmarksBenchmarkItemsModal.questionColumn') }), jsx("th", { className: "px-4 py-3 text-left font-medium text-gray-500 dark:text-gray-400 w-[45%]", children: t('benchmarksBenchmarkItemsModal.answerColumn') }), jsx("th", { className: "px-4 py-3 text-right font-medium text-gray-500 dark:text-gray-400 w-[10%]", children: t('benchmarksBenchmarkItemsModal.actionsColumn') })] }) }), jsxs("tbody", { className: "divide-y divide-gray-200 dark:divide-gray-600", children: [items.map((item) => {
|
|
267336
267400
|
var _a;
|
|
267337
267401
|
return (jsxs("tr", { className: "align-top", children: [jsx("td", { className: "px-4 py-3 text-gray-900 dark:text-gray-100", children: jsx("div", { className: "line-clamp-3 break-words", children: typeof item.input === 'string' ? item.input : JSON.stringify(item.input) }) }), jsx("td", { className: "px-4 py-3 text-gray-600 dark:text-gray-300", children: jsx("div", { className: "line-clamp-3 break-words", children: (_a = item.expected_output) !== null && _a !== void 0 ? _a : jsx("span", { className: "text-gray-400", children: "\u2014" }) }) }), jsx("td", { className: "px-4 py-3 text-right", children: jsx(Button$1, { variant: "ghost", size: "sm", "aria-label": t('benchmarksBenchmarkItemsModal.deleteItemAriaLabel'), onClick: () => setDeleteItemId(item.id), children: jsx(Trash2, { className: "h-4 w-4 text-red-500" }) }) })] }, item.id));
|
|
267338
267402
|
}), items.length === 0 && (jsx("tr", { children: jsx("td", { colSpan: 3, className: "px-4 py-8 text-center text-gray-500 dark:text-gray-400", children: t('benchmarksBenchmarkItemsModal.empty') }) }))] })] }) }), totalPages > 1 && (jsx("div", { className: "mt-6", children: jsx(AdvancedPagination, { totalPages: totalPages, currentPage: page, onPageChange: setPage }) }))] })), jsx(AddItemsModal, { isOpen: showAdd, onClose: () => setShowAdd(false), tenantKey: tenantKey, username: username, datasetName: datasetName }), deleteItemId && (jsx(DeleteItemConfirm, { isOpen: !!deleteItemId, onClose: () => setDeleteItemId(null), tenantKey: tenantKey, username: username, datasetName: datasetName, itemId: deleteItemId }))] }) }));
|
|
267339
267403
|
}
|
|
267340
267404
|
|
|
267341
|
-
const PAGE_SIZE$
|
|
267405
|
+
const PAGE_SIZE$4 = 10;
|
|
267342
267406
|
function BenchmarksTab({ tenantKey, username, }) {
|
|
267343
267407
|
var _a;
|
|
267344
267408
|
const t = useT();
|
|
@@ -267350,13 +267414,13 @@ function BenchmarksTab({ tenantKey, username, }) {
|
|
|
267350
267414
|
org: tenantKey,
|
|
267351
267415
|
userId: username,
|
|
267352
267416
|
page,
|
|
267353
|
-
limit: PAGE_SIZE$
|
|
267417
|
+
limit: PAGE_SIZE$4,
|
|
267354
267418
|
});
|
|
267355
267419
|
const benchmarks = (_a = data === null || data === void 0 ? void 0 : data.results) !== null && _a !== void 0 ? _a : [];
|
|
267356
267420
|
const filtered = searchQuery.trim()
|
|
267357
267421
|
? benchmarks.filter((benchmark) => benchmark.name.toLowerCase().includes(searchQuery.toLowerCase()))
|
|
267358
267422
|
: benchmarks;
|
|
267359
|
-
const totalPages = evalTotalPages(data === null || data === void 0 ? void 0 : data.count, PAGE_SIZE$
|
|
267423
|
+
const totalPages = evalTotalPages(data === null || data === void 0 ? void 0 : data.count, PAGE_SIZE$4);
|
|
267360
267424
|
return (jsxs("div", { className: "mt-4", children: [jsxs("div", { className: "flex justify-between items-center gap-1 flex-wrap", children: [jsxs("div", { className: "relative mb-6 max-w-sm w-full sm:w-auto", 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) => setSearchQuery(event.target.value), placeholder: t('benchmarksIndex.searchPlaceholder'), className: "pl-10 pr-10 focus:ring-blue-500 focus:border-blue-500 h-[35px]", "aria-label": t('benchmarksIndex.searchAriaLabel') })] }), jsx("div", { className: "mb-6", children: jsxs(Button$1, { className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] hover:opacity-90 text-white h-[35px]", onClick: () => setShowCreate(true), children: [jsx(Plus, { className: "h-4 w-4 mr-1" }), t('benchmarksIndex.newBenchmark')] }) })] }), 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-[28%]", children: t('benchmarksIndex.nameColumn') }), jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400 w-[36%]", children: t('benchmarksIndex.descriptionColumn') }), jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400 w-[20%]", children: t('benchmarksIndex.createdColumn') }), jsx("th", { className: "px-6 py-3 text-right font-medium text-gray-500 dark:text-gray-400 w-[16%]", children: t('benchmarksIndex.actionsColumn') })] }) }), jsxs("tbody", { className: "divide-y divide-gray-200 dark:divide-gray-600", children: [filtered.map((benchmark) => (jsxs("tr", { children: [jsx("td", { className: "px-6 py-4 text-gray-900 dark:text-gray-100 max-w-0", children: jsx("div", { className: "truncate font-medium", children: benchmark.name }) }), jsx("td", { className: "px-6 py-4 text-gray-600 dark:text-gray-300 max-w-0", children: jsx("div", { className: "truncate", children: benchmark.description || '—' }) }), jsx("td", { className: "px-6 py-4 text-gray-600 dark:text-gray-300 whitespace-nowrap", children: benchmark.created_at
|
|
267361
267425
|
? formatDistanceToNow(new Date(benchmark.created_at), {
|
|
267362
267426
|
addSuffix: true,
|
|
@@ -276950,7 +277014,7 @@ function isIblaiVoice(voice) {
|
|
|
276950
277014
|
return voice.provider === 'iblai';
|
|
276951
277015
|
}
|
|
276952
277016
|
|
|
276953
|
-
const PAGE_SIZE$
|
|
277017
|
+
const PAGE_SIZE$3 = 20;
|
|
276954
277018
|
function VoicePicker({ org, userId, provider, selectedVoiceId, onSelect, disabled, labels, }) {
|
|
276955
277019
|
var _a, _b;
|
|
276956
277020
|
const t = useT();
|
|
@@ -276970,13 +277034,13 @@ function VoicePicker({ org, userId, provider, selectedVoiceId, onSelect, disable
|
|
|
276970
277034
|
userId,
|
|
276971
277035
|
provider,
|
|
276972
277036
|
page,
|
|
276973
|
-
pageSize: PAGE_SIZE$
|
|
277037
|
+
pageSize: PAGE_SIZE$3,
|
|
276974
277038
|
...(debouncedSearch ? { search: debouncedSearch } : {}),
|
|
276975
277039
|
}, { skip: !org || !userId });
|
|
276976
277040
|
const paginated = data;
|
|
276977
277041
|
const voices = (_a = paginated === null || paginated === void 0 ? void 0 : paginated.results) !== null && _a !== void 0 ? _a : [];
|
|
276978
277042
|
const total = (_b = paginated === null || paginated === void 0 ? void 0 : paginated.count) !== null && _b !== void 0 ? _b : 0;
|
|
276979
|
-
const totalPages = total > 0 ? Math.ceil(total / PAGE_SIZE$
|
|
277043
|
+
const totalPages = total > 0 ? Math.ceil(total / PAGE_SIZE$3) : 1;
|
|
276980
277044
|
// Whenever a voice id is saved on the mentor settings, fetch it directly
|
|
276981
277045
|
// so we can pin it at the top of the list. Otherwise the user can land
|
|
276982
277046
|
// on a page that doesn't contain the selected voice and the selection
|
|
@@ -278555,7 +278619,7 @@ function GradeResultOverrideModal({ isOpen, onClose, result, tenantKey, mentorId
|
|
|
278555
278619
|
return (jsx(Dialog, { open: isOpen, onOpenChange: onClose, children: jsxs(DialogContent, { "aria-describedby": "grader-override-modal-description", "data-testid": "grader-override-modal", children: [jsx(DialogHeader, { children: jsx(DialogTitle, { className: "ibl-dialog-title", children: m.title }) }), isLoading || !detail ? (jsx("div", { className: "flex items-center justify-center py-8", "data-testid": "grader-override-loading", children: jsx(Spinner, {}) })) : (jsxs("div", { className: "space-y-4", id: "grader-override-modal-description", children: [jsxs("div", { className: "grid grid-cols-2 gap-2 rounded-lg border border-gray-200 bg-gray-50/60 p-3 text-sm", children: [jsx("span", { className: "text-gray-500", children: m.learnerLabel }), jsx("span", { className: "truncate text-gray-900", title: detail.student.email, children: detail.student.email }), jsx("span", { className: "text-gray-500", children: m.aiScoreLabel }), jsx("span", { className: "text-gray-900", children: formatPercent$1(detail.score) }), jsx("span", { className: "text-gray-500", children: m.currentOverrideLabel }), jsx("span", { className: "text-gray-900", "data-testid": "grader-override-current", children: hasExistingOverride ? `${detail.override_points} / ${totalPoints}` : m.noOverride })] }), jsxs("div", { className: "space-y-1.5", children: [jsx(Label$1, { htmlFor: "grader-override-points", children: m.pointsLabel }), jsx(Input, { id: "grader-override-points", type: "number", min: 0, max: maxPoints, step: "any", value: points, className: "w-28", onChange: (e) => setPoints(e.target.value) }), jsx("p", { className: "text-xs text-gray-500", children: m.pointsHelp.replace('{total}', String(maxPoints)) }), showErrors && !pointsValid && (jsx("p", { className: "text-xs text-red-500", children: m.pointsRange.replace('{total}', String(maxPoints)) }))] }), jsxs("div", { className: "space-y-1.5", children: [jsx(Label$1, { htmlFor: "grader-override-feedback", children: m.feedbackLabel }), jsx(Textarea, { id: "grader-override-feedback", value: feedback, placeholder: m.feedbackPlaceholder, rows: 3, onChange: (e) => setFeedback(e.target.value) })] }), hasExistingOverride && jsx("p", { className: "text-xs text-gray-500", children: m.clearHelp })] })), jsxs(DialogFooter, { className: "gap-3", children: [hasExistingOverride && (jsx(Button$1, { variant: "outline", className: "mr-auto text-red-600 hover:text-red-700", onClick: handleClear, disabled: isSaving || isLoading, "data-testid": "grader-override-clear", children: isClearing ? m.clearing : m.clear })), jsx(Button$1, { variant: "outline", onClick: onClose, children: m.cancel }), jsx(Button$1, { className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] text-white hover:opacity-90", onClick: handleSave, disabled: isSaving || isLoading, "data-testid": "grader-override-save", children: isSaving && !isClearing ? m.saving : m.save })] })] }) }));
|
|
278556
278620
|
}
|
|
278557
278621
|
|
|
278558
|
-
const PAGE_SIZE$
|
|
278622
|
+
const PAGE_SIZE$2 = 10;
|
|
278559
278623
|
const STATUS_ALL = 'all';
|
|
278560
278624
|
function formatPercent(score) {
|
|
278561
278625
|
return `${Math.round(score * 100)}%`;
|
|
@@ -278597,10 +278661,10 @@ function ResultsSection({ labels, tenantKey, mentorId, username, canOverride, })
|
|
|
278597
278661
|
graded_at_after: gradedAtAfter,
|
|
278598
278662
|
graded_at_before: gradedAtBefore,
|
|
278599
278663
|
page,
|
|
278600
|
-
page_size: PAGE_SIZE$
|
|
278664
|
+
page_size: PAGE_SIZE$2,
|
|
278601
278665
|
}, { skip: !tenantKey || !mentorId });
|
|
278602
278666
|
const results = (_b = data === null || data === void 0 ? void 0 : data.results) !== null && _b !== void 0 ? _b : [];
|
|
278603
|
-
const totalPages = Math.max(1, Math.ceil(((_c = data === null || data === void 0 ? void 0 : data.count) !== null && _c !== void 0 ? _c : 0) / PAGE_SIZE$
|
|
278667
|
+
const totalPages = Math.max(1, Math.ceil(((_c = data === null || data === void 0 ? void 0 : data.count) !== null && _c !== void 0 ? _c : 0) / PAGE_SIZE$2));
|
|
278604
278668
|
const statusText = (value) => value ? labels.statusValues[value] : '—';
|
|
278605
278669
|
return (jsxs("div", { className: "space-y-3", "data-testid": "grader-results-section", children: [jsxs("div", { children: [jsx("h4", { className: "text-sm font-medium text-gray-900", children: labels.sectionTitle }), jsx("p", { className: "text-xs text-gray-600", children: labels.description })] }), jsx("div", { className: "rounded-lg border p-4", children: jsxs("div", { className: "flex flex-col gap-3 lg:flex-row", children: [jsx("div", { className: "relative min-w-[200px] flex-1", children: jsxs(Popover, { children: [jsx(PopoverTrigger, { asChild: true, children: jsxs(Button$1, { variant: "outline", role: "combobox", "aria-label": labels.filters.searchUser, className: "w-full justify-between bg-transparent font-normal", "data-testid": "grader-results-user-filter", children: [selectedEmail || labels.filters.searchUser, 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: labels.filters.searchUsersPlaceholder }), jsxs(CommandList, { children: [jsx(CommandEmpty, { children: labels.filters.noUsersFound }), jsxs(CommandGroup, { children: [jsxs(CommandItem, { value: "", onSelect: () => setSelectedEmail(''), children: [jsx(Check, { className: cn('mr-2 h-4 w-4', !selectedEmail ? 'opacity-100' : 'opacity-0') }), labels.filters.allUsers] }), learners.map((learner) => (jsxs(CommandItem, { value: learner.email, onSelect: () => setSelectedEmail(learner.email), children: [jsx(Check, { className: cn('mr-2 h-4 w-4', selectedEmail === learner.email ? 'opacity-100' : 'opacity-0') }), jsx("div", { className: "flex flex-col", children: jsx("span", { className: "font-medium text-gray-700", children: learner.email }) })] }, learner.email)))] })] })] }) })] }) }), jsxs(Select$1, { value: status, onValueChange: setStatus, children: [jsx(SelectTrigger, { className: "w-full lg:w-[160px]", "aria-label": labels.filters.statusLabel, "data-testid": "grader-results-status-filter", children: jsx(SelectValue, { placeholder: labels.filters.statusLabel }) }), jsxs(SelectContent, { children: [jsx(SelectItem, { value: STATUS_ALL, children: labels.filters.allStatuses }), jsx(SelectItem, { value: "pending", children: labels.statusValues.pending }), jsx(SelectItem, { value: "published", children: labels.statusValues.published }), jsx(SelectItem, { value: "failed", children: labels.statusValues.failed })] })] }), jsxs(Popover, { children: [jsx(PopoverTrigger, { asChild: true, children: jsxs(Button$1, { variant: "outline", className: "flex w-full items-center gap-2 bg-transparent font-normal whitespace-nowrap lg:w-auto", "data-testid": "grader-results-date-filter", children: [jsx(Calendar$1, { className: "h-4 w-4" }), (dateRange === null || dateRange === void 0 ? void 0 : dateRange.from) && (dateRange === null || dateRange === void 0 ? void 0 : dateRange.to)
|
|
278606
278670
|
? `${format$1(dateRange.from, 'MMM dd')} - ${format$1(dateRange.to, 'MMM dd')}`
|
|
@@ -282613,6 +282677,7 @@ const AGENT_DISCLAIMERS_TAB_LABELS = {
|
|
|
282613
282677
|
title: 'Disclaimers',
|
|
282614
282678
|
description: 'Configure disclaimer settings for your agent.',
|
|
282615
282679
|
},
|
|
282680
|
+
infoBox: "Show your users the fine print. Add notices — like 'This is an AI assistant' or a compliance statement — that appear in the chat so people know what to expect.",
|
|
282616
282681
|
userAgreement: {
|
|
282617
282682
|
title: 'User Agreement',
|
|
282618
282683
|
tooltip: 'Controls User Agreement',
|
|
@@ -282634,6 +282699,7 @@ const AGENT_DISCLAIMERS_TAB_LABELS = {
|
|
|
282634
282699
|
save: 'Save',
|
|
282635
282700
|
saving: 'Saving...',
|
|
282636
282701
|
cancel: 'Cancel',
|
|
282702
|
+
viewAgreements: 'View Agreements',
|
|
282637
282703
|
},
|
|
282638
282704
|
toasts: {
|
|
282639
282705
|
advisorySuccess: 'Agent updated successfully',
|
|
@@ -282644,6 +282710,20 @@ const AGENT_DISCLAIMERS_TAB_LABELS = {
|
|
|
282644
282710
|
userAgreementDisabled: 'User agreement disabled successfully',
|
|
282645
282711
|
toggleError: 'Failed to update user agreement',
|
|
282646
282712
|
},
|
|
282713
|
+
agreements: {
|
|
282714
|
+
title: 'Agreements',
|
|
282715
|
+
dialogDescription: "Users who have accepted this agent's User Agreement.",
|
|
282716
|
+
totalAgreements: (count) => `${count} Total Agreements`,
|
|
282717
|
+
summaryDescription: "Review the users who have accepted this agent's User Agreement. Each entry shows the user's name, email and when they agreed. Users who haven't accepted yet aren't listed. Search matches the exact username.",
|
|
282718
|
+
searchPlaceholder: 'Search by username',
|
|
282719
|
+
searchAriaLabel: 'Search agreements by username',
|
|
282720
|
+
columnUser: 'User',
|
|
282721
|
+
columnAgreedAt: 'Agreed at',
|
|
282722
|
+
empty: 'No agreements yet',
|
|
282723
|
+
emptyDescription: 'Users who accept the User Agreement will appear here with the time they agreed.',
|
|
282724
|
+
noMatches: 'No users match your search',
|
|
282725
|
+
noMatchesDescription: 'Search matches the exact username — try the full username.',
|
|
282726
|
+
},
|
|
282647
282727
|
};
|
|
282648
282728
|
function buildDisclaimersTabLabels(t) {
|
|
282649
282729
|
return {
|
|
@@ -282651,6 +282731,7 @@ function buildDisclaimersTabLabels(t) {
|
|
|
282651
282731
|
title: t('disclaimersTabLabels.header.title'),
|
|
282652
282732
|
description: t('disclaimersTabLabels.header.description'),
|
|
282653
282733
|
},
|
|
282734
|
+
infoBox: t('disclaimersTabLabels.infoBox'),
|
|
282654
282735
|
userAgreement: {
|
|
282655
282736
|
title: t('disclaimersTabLabels.userAgreement.title'),
|
|
282656
282737
|
tooltip: t('disclaimersTabLabels.userAgreement.tooltip'),
|
|
@@ -282672,6 +282753,7 @@ function buildDisclaimersTabLabels(t) {
|
|
|
282672
282753
|
save: t('disclaimersTabLabels.actions.save'),
|
|
282673
282754
|
saving: t('disclaimersTabLabels.actions.saving'),
|
|
282674
282755
|
cancel: t('disclaimersTabLabels.actions.cancel'),
|
|
282756
|
+
viewAgreements: t('disclaimersTabLabels.actions.viewAgreements'),
|
|
282675
282757
|
},
|
|
282676
282758
|
toasts: {
|
|
282677
282759
|
advisorySuccess: t('disclaimersTabLabels.toasts.advisorySuccess'),
|
|
@@ -282682,6 +282764,20 @@ function buildDisclaimersTabLabels(t) {
|
|
|
282682
282764
|
userAgreementDisabled: t('disclaimersTabLabels.toasts.userAgreementDisabled'),
|
|
282683
282765
|
toggleError: t('disclaimersTabLabels.toasts.toggleError'),
|
|
282684
282766
|
},
|
|
282767
|
+
agreements: {
|
|
282768
|
+
title: t('disclaimersTabLabels.agreements.title'),
|
|
282769
|
+
dialogDescription: t('disclaimersTabLabels.agreements.dialogDescription'),
|
|
282770
|
+
totalAgreements: (count) => t('disclaimersTabLabels.agreements.totalAgreements', { count }),
|
|
282771
|
+
summaryDescription: t('disclaimersTabLabels.agreements.summaryDescription'),
|
|
282772
|
+
searchPlaceholder: t('disclaimersTabLabels.agreements.searchPlaceholder'),
|
|
282773
|
+
searchAriaLabel: t('disclaimersTabLabels.agreements.searchAriaLabel'),
|
|
282774
|
+
columnUser: t('disclaimersTabLabels.agreements.columnUser'),
|
|
282775
|
+
columnAgreedAt: t('disclaimersTabLabels.agreements.columnAgreedAt'),
|
|
282776
|
+
empty: t('disclaimersTabLabels.agreements.empty'),
|
|
282777
|
+
emptyDescription: t('disclaimersTabLabels.agreements.emptyDescription'),
|
|
282778
|
+
noMatches: t('disclaimersTabLabels.agreements.noMatches'),
|
|
282779
|
+
noMatchesDescription: t('disclaimersTabLabels.agreements.noMatchesDescription'),
|
|
282780
|
+
},
|
|
282685
282781
|
};
|
|
282686
282782
|
}
|
|
282687
282783
|
function resolveDisclaimersTabLabels(override, t) {
|
|
@@ -282691,18 +282787,23 @@ function resolveDisclaimersTabLabels(override, t) {
|
|
|
282691
282787
|
return deepMerge(base, override);
|
|
282692
282788
|
}
|
|
282693
282789
|
|
|
282790
|
+
/* istanbul ignore next -- @preserve dynamic import is not testable in unit tests */
|
|
282791
|
+
const AgreementsModal$1 = dynamic(() => Promise.resolve().then(function () { return agreementsModal; }).then((module) => ({
|
|
282792
|
+
default: module.AgreementsModal,
|
|
282793
|
+
})), { ssr: false });
|
|
282694
282794
|
// ── Component ────────────────────────────────────────────────────────────
|
|
282695
282795
|
const DEFAULT_FALLBACK_DISCLAIMER = '';
|
|
282696
282796
|
function AgentDisclaimersTab({ labels: labelsProp, defaultDisclaimerContent = DEFAULT_FALLBACK_DISCLAIMER, renderContent, }) {
|
|
282697
282797
|
var _a, _b, _c, _d, _e;
|
|
282698
282798
|
const t = useT();
|
|
282699
282799
|
const labels = React__default.useMemo(() => resolveDisclaimersTabLabels(labelsProp, t), [labelsProp, t]);
|
|
282700
|
-
const { tenantKey, mentorId, username, rbacPermissions } = useAgentSettings();
|
|
282800
|
+
const { tenantKey, mentorId, username, enableRBAC, rbacPermissions } = useAgentSettings();
|
|
282701
282801
|
const [editMentor, { isLoading: isEditMentorLoading }] = useEditMentorMutation();
|
|
282702
282802
|
const [createDisclaimer, { isLoading: isCreateDisclaimerLoading }] = useCreateDisclaimerMutation();
|
|
282703
282803
|
const [updateDisclaimer, { isLoading: isUpdateDisclaimerLoading }] = useUpdateDisclaimerMutation();
|
|
282704
282804
|
const [isEditDisclaimerModalOpen, setIsEditDisclaimerModalOpen] = React__default.useState(false);
|
|
282705
282805
|
const [isEditUserAgreementModalOpen, setIsEditUserAgreementModalOpen] = React__default.useState(false);
|
|
282806
|
+
const [isAgreementsModalOpen, setIsAgreementsModalOpen] = React__default.useState(false);
|
|
282706
282807
|
const { data: mentorSettings } = useGetMentorSettingsQuery({
|
|
282707
282808
|
mentor: mentorId,
|
|
282708
282809
|
org: tenantKey,
|
|
@@ -282816,25 +282917,27 @@ function AgentDisclaimersTab({ labels: labelsProp, defaultDisclaimerContent = DE
|
|
|
282816
282917
|
// match any entry and WithPermissions resolves hasPermission=false.
|
|
282817
282918
|
// @ts-ignore mentor_id exists on MentorSettings
|
|
282818
282919
|
const viewDisclaimersResource = `/mentors/${mentorSettings === null || mentorSettings === void 0 ? void 0 : mentorSettings.mentor_id}/#view_disclaimers`;
|
|
282819
|
-
return (jsxs(Fragment$1, { children: [jsx("div", { className: "flex h-[73px] flex-shrink-0 items-center border-b border-gray-200 bg-white p-4 lg:block", children: jsxs("div", { children: [jsx("h3", { className: "mb-1 text-base font-medium text-gray-900", children: labels.header.title }), jsx("p", { className: "text-xs text-gray-600", children: labels.header.description })] }) }),
|
|
282820
|
-
|
|
282821
|
-
|
|
282822
|
-
|
|
282823
|
-
|
|
282824
|
-
|
|
282825
|
-
|
|
282826
|
-
|
|
282827
|
-
|
|
282828
|
-
|
|
282829
|
-
|
|
282830
|
-
|
|
282831
|
-
|
|
282832
|
-
|
|
282920
|
+
return (jsxs(Fragment$1, { children: [jsx("div", { className: "flex h-[73px] flex-shrink-0 items-center border-b border-gray-200 bg-white p-4 lg:block", children: jsxs("div", { children: [jsx("h3", { className: "mb-1 text-base font-medium text-gray-900", children: labels.header.title }), jsx("p", { className: "text-xs text-gray-600", children: labels.header.description })] }) }), jsxs("div", { className: "flex-1 space-y-6 overflow-y-auto p-3 lg:p-4", children: [jsx("div", { className: "rounded-md border border-gray-200 bg-gray-50 p-3 text-xs text-gray-600", "data-testid": "disclaimers-info-box", children: labels.infoBox }), jsx(WithPermissions, { rbacResource: viewDisclaimersResource, rbacPermissions: rbacPermissions !== null && rbacPermissions !== void 0 ? rbacPermissions : {}, children: ({ hasPermission }) => hasPermission &&
|
|
282921
|
+
userAgreementRecord &&
|
|
282922
|
+
userAgreement.active && (jsx("div", { className: "flex justify-end", children: jsxs(Button$1, { onClick: () => setIsAgreementsModalOpen(true), className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] text-white hover:opacity-90", "data-testid": "view-agreements-button", children: [jsx(Users, { className: "mr-2 h-4 w-4" }), labels.actions.viewAgreements] }) })) }), jsxs("div", { className: "grid grid-cols-1 gap-6 md:grid-cols-2", children: [jsx(WithPermissions, { rbacResource: viewDisclaimersResource, rbacPermissions: rbacPermissions !== null && rbacPermissions !== void 0 ? rbacPermissions : {}, children: ({ hasPermission }) => {
|
|
282923
|
+
var _a;
|
|
282924
|
+
return hasPermission && (jsx(UserAgreementCard, { content: (_a = userAgreement.content) !== null && _a !== void 0 ? _a : '', active: userAgreement.active, isDisabled: isUserAgreementDisabled, onToggle: toggleUserAgreement, onEditClick: () => setIsEditUserAgreementModalOpen(true), renderText: renderText, labels: labels }));
|
|
282925
|
+
} }), jsx(WithFormPermissions, { name: "disclaimer",
|
|
282926
|
+
// @ts-ignore permissions not in type of MentorSettingsPublic
|
|
282927
|
+
permissions: (_c = mentorSettings === null || mentorSettings === void 0 ? void 0 : mentorSettings.permissions) === null || _c === void 0 ? void 0 : _c.field, enableRBAC: enableRBAC, children: ({ disabled }) => {
|
|
282928
|
+
var _a, _b;
|
|
282929
|
+
return (jsxs("div", { className: "overflow-hidden rounded-lg bg-gray-50", children: [jsx("div", { className: "flex items-center justify-between border-b border-gray-200 p-4", children: jsxs("div", { className: "flex items-center gap-2", children: [jsx("h3", { className: "text-sm font-medium text-gray-900", children: labels.advisory.title }), jsx(TooltipProvider, { children: jsxs(Tooltip$1, { children: [jsx(TooltipTrigger, { "aria-label": t('tabsDisclaimersTab.advisoryMoreInfo', {
|
|
282930
|
+
title: labels.advisory.title,
|
|
282931
|
+
}), children: jsx(Info$3, { className: "h-4 w-4 text-gray-400" }) }), jsx(TooltipContent, { className: "ibl-tooltip-content", children: jsx("p", { children: labels.advisory.tooltip }) })] }) })] }) }), jsxs("div", { className: "flex items-start gap-2 p-4", children: [jsx("div", { className: "mt-1 flex-shrink-0", children: "\uD83D\uDCDD" }), jsx("div", { className: "flex h-[180px] flex-1 flex-col", children: jsx("div", { className: "mb-4 flex-grow overflow-y-auto", tabIndex: 0, role: "region", "aria-label": t('tabsDisclaimersTab.advisoryContentRegion', {
|
|
282932
|
+
title: labels.advisory.title,
|
|
282933
|
+
}), children: renderText((_a = mentorSettings === null || mentorSettings === void 0 ? void 0 : mentorSettings.disclaimer) !== null && _a !== void 0 ? _a : '') }) })] }), jsxs("div", { className: "flex w-full gap-2 px-4 pb-4", children: [jsxs(Button$1, { variant: "outline", size: "sm", className: "h-8 flex-1 py-5", disabled: disabled, onClick: () => setIsEditDisclaimerModalOpen(true), children: [jsx(SquarePen, { className: "mr-2 h-4 w-4" }), labels.actions.edit] }), jsx(CopyButton
|
|
282833
282934
|
// @ts-ignore disclaimer not in type of MentorSettingsPublic
|
|
282834
|
-
|
|
282835
|
-
|
|
282935
|
+
, {
|
|
282936
|
+
// @ts-ignore disclaimer not in type of MentorSettingsPublic
|
|
282937
|
+
text: (_b = mentorSettings === null || mentorSettings === void 0 ? void 0 : mentorSettings.disclaimer) !== null && _b !== void 0 ? _b : '' })] })] }));
|
|
282938
|
+
} })] })] }), jsx(EditDisclaimerModal, { open: isEditDisclaimerModalOpen, onOpenChange: setIsEditDisclaimerModalOpen,
|
|
282836
282939
|
// @ts-ignore disclaimer not in type of MentorSettingsPublic
|
|
282837
|
-
disclaimer: (_d = mentorSettings === null || mentorSettings === void 0 ? void 0 : mentorSettings.disclaimer) !== null && _d !== void 0 ? _d : '', onSave: handleSaveDisclaimer, onCancel: () => setIsEditDisclaimerModalOpen(false), isSaving: isEditMentorLoading, labels: labels }), jsx(EditUserAgreementModal, { open: isEditUserAgreementModalOpen, onOpenChange: setIsEditUserAgreementModalOpen, content: (_e = userAgreement.content) !== null && _e !== void 0 ? _e : '', onSave: handleSaveUserAgreement, onCancel: () => setIsEditUserAgreementModalOpen(false), isSaving: isUserAgreementDisabled, labels: labels })] }));
|
|
282940
|
+
disclaimer: (_d = mentorSettings === null || mentorSettings === void 0 ? void 0 : mentorSettings.disclaimer) !== null && _d !== void 0 ? _d : '', onSave: handleSaveDisclaimer, onCancel: () => setIsEditDisclaimerModalOpen(false), isSaving: isEditMentorLoading, labels: labels }), jsx(EditUserAgreementModal, { open: isEditUserAgreementModalOpen, onOpenChange: setIsEditUserAgreementModalOpen, content: (_e = userAgreement.content) !== null && _e !== void 0 ? _e : '', onSave: handleSaveUserAgreement, onCancel: () => setIsEditUserAgreementModalOpen(false), isSaving: isUserAgreementDisabled, labels: labels }), userAgreementRecord && (jsx(AgreementsModal$1, { open: isAgreementsModalOpen, onOpenChange: setIsAgreementsModalOpen, org: tenantKey, userId: username, mentorId: mentorId, disclaimerId: userAgreementRecord.id, labels: labels }))] }));
|
|
282838
282941
|
}
|
|
282839
282942
|
|
|
282840
282943
|
const DEFAULT_MENTOR_ROLES = ['editor', 'chat'];
|
|
@@ -284522,7 +284625,7 @@ function resolveEvaluationTabLabels(override, t) {
|
|
|
284522
284625
|
return deepMerge(base, override);
|
|
284523
284626
|
}
|
|
284524
284627
|
|
|
284525
|
-
const PAGE_SIZE = 10;
|
|
284628
|
+
const PAGE_SIZE$1 = 10;
|
|
284526
284629
|
function StatusBadge({ status }) {
|
|
284527
284630
|
const upper = status === null || status === void 0 ? void 0 : status.toUpperCase();
|
|
284528
284631
|
const color = upper === 'COMPLETED'
|
|
@@ -284575,7 +284678,7 @@ function AgentEvaluationTabContent({ labels: labelsOverride, PaginationComponent
|
|
|
284575
284678
|
userId: username,
|
|
284576
284679
|
datasetName: selectedBenchmark,
|
|
284577
284680
|
page,
|
|
284578
|
-
limit: PAGE_SIZE,
|
|
284681
|
+
limit: PAGE_SIZE$1,
|
|
284579
284682
|
}, { skip: !selectedBenchmark });
|
|
284580
284683
|
// Runs are benchmark-scoped server-side, but a benchmark can be evaluated
|
|
284581
284684
|
// against multiple agents. Filter client-side to the agent we're editing:
|
|
@@ -284591,7 +284694,7 @@ function AgentEvaluationTabContent({ labels: labelsOverride, PaginationComponent
|
|
|
284591
284694
|
return runMentor === mentorId;
|
|
284592
284695
|
return !!username && run.username === username;
|
|
284593
284696
|
}), [allRuns, mentorId, username]);
|
|
284594
|
-
const totalPages = evalTotalPages(runsData === null || runsData === void 0 ? void 0 : runsData.count, PAGE_SIZE);
|
|
284697
|
+
const totalPages = evalTotalPages(runsData === null || runsData === void 0 ? void 0 : runsData.count, PAGE_SIZE$1);
|
|
284595
284698
|
const [fetchRunDetail] = useLazyGetEvalRunQuery();
|
|
284596
284699
|
const handleCheckStatus = async (runName) => {
|
|
284597
284700
|
setCheckingRun(runName);
|
|
@@ -291176,6 +291279,62 @@ var trainOrDeleteModal = /*#__PURE__*/Object.freeze({
|
|
|
291176
291279
|
TrainOrDeleteModal: TrainOrDeleteModal
|
|
291177
291280
|
});
|
|
291178
291281
|
|
|
291282
|
+
const PAGE_SIZE = 20;
|
|
291283
|
+
function AgreementsModal({ open, onOpenChange, ...bodyProps }) {
|
|
291284
|
+
return (jsx(Dialog, { open: open, onOpenChange: onOpenChange, children: open && jsx(AgreementsBody, { ...bodyProps }) }));
|
|
291285
|
+
}
|
|
291286
|
+
function AgreementsBody({ org, userId, mentorId, disclaimerId, labels }) {
|
|
291287
|
+
var _a, _b;
|
|
291288
|
+
const t = labels.agreements;
|
|
291289
|
+
const [searchTerm, setSearchTerm] = React__default.useState('');
|
|
291290
|
+
const [debouncedSearchTerm] = a$3(searchTerm, 300);
|
|
291291
|
+
const [page, setPage] = React__default.useState(1);
|
|
291292
|
+
const [pageSearchTerm, setPageSearchTerm] = React__default.useState(debouncedSearchTerm);
|
|
291293
|
+
// A new search always starts from the first page. Adjusting during render
|
|
291294
|
+
// (not in an effect) means no render is committed -- and no request fired --
|
|
291295
|
+
// with the new term and the old page.
|
|
291296
|
+
if (pageSearchTerm !== debouncedSearchTerm) {
|
|
291297
|
+
setPageSearchTerm(debouncedSearchTerm);
|
|
291298
|
+
setPage(1);
|
|
291299
|
+
}
|
|
291300
|
+
const { data, isLoading, isFetching } = useGetDisclaimerAgreementsQuery({
|
|
291301
|
+
org,
|
|
291302
|
+
userId,
|
|
291303
|
+
params: {
|
|
291304
|
+
disclaimer: disclaimerId,
|
|
291305
|
+
mentor_id: mentorId,
|
|
291306
|
+
username: debouncedSearchTerm || undefined,
|
|
291307
|
+
page,
|
|
291308
|
+
page_size: PAGE_SIZE,
|
|
291309
|
+
},
|
|
291310
|
+
},
|
|
291311
|
+
// Other users' agreements land in other clients, so the cached list goes
|
|
291312
|
+
// stale without any invalidation here; always refetch on (re)open.
|
|
291313
|
+
{ refetchOnMountOrArgChange: true });
|
|
291314
|
+
const agreements = (_a = data === null || data === void 0 ? void 0 : data.results) !== null && _a !== void 0 ? _a : [];
|
|
291315
|
+
const count = (_b = data === null || data === void 0 ? void 0 : data.count) !== null && _b !== void 0 ? _b : 0;
|
|
291316
|
+
const totalPages = Math.max(1, Math.ceil(count / PAGE_SIZE));
|
|
291317
|
+
// An empty list is either nobody agreed yet or a search miss.
|
|
291318
|
+
const emptyState = debouncedSearchTerm
|
|
291319
|
+
? { Icon: Search, heading: t.noMatches, description: t.noMatchesDescription }
|
|
291320
|
+
: { Icon: Users, heading: t.empty, description: t.emptyDescription };
|
|
291321
|
+
return (jsxs(DialogContent, { className: "flex h-[90vh] max-w-6xl flex-col p-0", "data-testid": "disclaimer-agreements", children: [jsxs(DialogHeader, { className: "flex-shrink-0 border-b border-gray-200 px-6 pt-6 pb-4", children: [jsx(DialogTitle, { className: "text-xl font-semibold text-gray-900", children: t.title }), jsx(DialogDescription, { className: "sr-only", children: t.dialogDescription })] }), jsx("div", { className: "scrollbar-hide flex-1 overflow-y-auto p-4", children: jsxs("div", { className: "space-y-6", children: [jsxs("div", { className: "rounded-lg border p-4", "data-testid": "disclaimer-agreements-summary", children: [jsxs("div", { className: "mb-3 flex items-center gap-2", children: [jsx(Users, { className: "h-5 w-5 text-blue-600", "aria-hidden": "true" }), jsx("span", { className: "font-semibold text-gray-900", "data-testid": "disclaimer-agreements-count", children: t.totalAgreements(count) })] }), jsx("p", { className: "text-sm leading-relaxed text-gray-900", role: "note", "data-testid": "disclaimer-agreements-banner", children: t.summaryDescription })] }), jsx("div", { className: "rounded-lg border p-4", children: jsxs("div", { className: "relative", children: [jsx(Search, { className: "absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2 transform text-gray-500", "aria-hidden": "true" }), jsx(Input, { type: "search", value: searchTerm, onChange: (event) => setSearchTerm(event.target.value), placeholder: t.searchPlaceholder, "aria-label": t.searchAriaLabel, className: "w-full pl-9", "data-testid": "disclaimer-agreements-search" })] }) }), isLoading ? (jsx("div", { className: "space-y-2", "data-testid": "disclaimer-agreements-loading", "aria-busy": "true", children: [0, 1, 2].map((key) => (jsx("div", { className: "h-9 animate-pulse rounded bg-gray-200" }, key))) })) : agreements.length === 0 ? (jsxs("div", { className: "rounded-lg border border-dashed border-gray-200 bg-gray-50 p-6 text-center text-sm text-gray-600 md:p-10", "data-testid": "disclaimer-agreements-empty", children: [jsx(emptyState.Icon, { className: "mx-auto mb-2 h-8 w-8 text-blue-600", "aria-hidden": "true" }), jsx("p", { className: "font-medium text-gray-900", children: emptyState.heading }), jsx("p", { className: "mt-1 text-sm text-gray-600", children: emptyState.description })] })) : (jsx("div", { className: "overflow-hidden rounded-lg border border-gray-200 bg-white", children: jsxs(Table$1, { children: [jsx(TableHeader$1, { children: jsxs(TableRow$1, { children: [jsx(TableHead, { children: t.columnUser }), jsx(TableHead, { className: "w-0 whitespace-nowrap", children: t.columnAgreedAt })] }) }), jsx(TableBody, { children: agreements.map((agreement) => {
|
|
291322
|
+
const agreedAt = new Date(agreement.agreed_at);
|
|
291323
|
+
// Primary is the full name, falling back to the username.
|
|
291324
|
+
// Secondary is the email, falling back to the username only
|
|
291325
|
+
// when the primary is the name (never print it twice).
|
|
291326
|
+
const primary = agreement.user_full_name || agreement.user_id;
|
|
291327
|
+
const secondary = agreement.user_email ||
|
|
291328
|
+
(primary !== agreement.user_id ? agreement.user_id : null);
|
|
291329
|
+
return (jsxs(TableRow$1, { "data-testid": "disclaimer-agreement-row", "data-username": agreement.user_id, children: [jsxs(TableCell$1, { children: [jsx("div", { className: "font-medium text-gray-900", "data-testid": "disclaimer-agreement-user", children: primary }), secondary && jsx("div", { className: "text-xs text-gray-500", children: secondary })] }), jsx(TableCell$1, { className: "text-sm whitespace-nowrap text-gray-600", children: jsxs(Tooltip$1, { children: [jsx(TooltipTrigger, { asChild: true, children: jsx("span", { children: formatDistanceToNow(agreedAt, { addSuffix: true }) }) }), jsx(TooltipContent, { className: "ibl-tooltip-content", children: jsx("p", { children: format$1(agreedAt, "MMM dd, yyyy 'at' h:mm a") }) })] }) })] }, agreement.id));
|
|
291330
|
+
}) })] }) })), jsx(IblPagination, { currentPage: page, totalPages: totalPages, onPageChange: setPage, disabled: isFetching })] }) })] }));
|
|
291331
|
+
}
|
|
291332
|
+
|
|
291333
|
+
var agreementsModal = /*#__PURE__*/Object.freeze({
|
|
291334
|
+
__proto__: null,
|
|
291335
|
+
AgreementsModal: AgreementsModal
|
|
291336
|
+
});
|
|
291337
|
+
|
|
291179
291338
|
function ImagePreviewModal({ url, onClose }) {
|
|
291180
291339
|
return (jsx("div", { className: "bg-opacity-75 fixed inset-0 z-50 flex items-center justify-center bg-black p-4", onClick: onClose, children: jsxs("div", { className: "relative flex h-full w-full items-center justify-center", children: [jsx("button", { className: "bg-opacity-50 hover:bg-opacity-70 absolute top-2 right-2 rounded-full bg-black p-1 text-white", onClick: (e) => {
|
|
291181
291340
|
e.stopPropagation();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iblai/iblai-js",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.21.0",
|
|
4
4
|
"description": "Unified JavaScript SDK for IBL.ai — re-exports data-layer, web-containers, and web-utils under a single package",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -76,9 +76,9 @@
|
|
|
76
76
|
"axios": "1.13.6",
|
|
77
77
|
"dotenv": "16.6.1",
|
|
78
78
|
"winston": "3.19.0",
|
|
79
|
-
"@iblai/data-layer": "1.
|
|
80
|
-
"@iblai/
|
|
81
|
-
"@iblai/
|
|
79
|
+
"@iblai/data-layer": "1.19.1",
|
|
80
|
+
"@iblai/web-containers": "1.28.0",
|
|
81
|
+
"@iblai/mcp": "1.19.0",
|
|
82
82
|
"@iblai/web-utils": "2.5.1"
|
|
83
83
|
},
|
|
84
84
|
"peerDependencies": {
|