@iblai/iblai-js 1.4.9 → 1.4.10
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default, { useRef, useEffect, useState, useCallback, useLayoutEffect, forwardRef, createElement as createElement$1, useMemo, createContext, useReducer, useImperativeHandle, useContext, useDebugValue, isValidElement, Children, PureComponent, cloneElement, Component } from 'react';
|
|
3
|
-
import { LOCAL_STORAGE_KEYS, TimeTracker, getInitials, useTenantMetadata, isAlphaNumeric32, checkRbacPermission, getTimeAgo, formatRelativeTime as formatRelativeTime$2, ANONYMOUS_USERNAME, combineCSVData, redirectToAuthSpaJoinTenant, redirectToAuthSpa, getAuthSpaJoinUrl } from '@iblai/web-utils';
|
|
3
|
+
import { LOCAL_STORAGE_KEYS, TimeTracker, getInitials, useTenantMetadata, isAlphaNumeric32, checkRbacPermission, getTimeAgo, REQUIRED_ACTIONS_FOR_GROUPS, formatRelativeTime as formatRelativeTime$2, ANONYMOUS_USERNAME, combineCSVData, redirectToAuthSpaJoinTenant, redirectToAuthSpa, getAuthSpaJoinUrl } from '@iblai/web-utils';
|
|
4
4
|
import { useTimeTrackingMutation, useGetUserMetadataQuery, useGetUserMetadataEdxQuery, useUpdateUserMetadataMutation, useUpdateUserMetadataEdxMutation, useUploadProfileImageMutation, useResetPasswordMutation, useSelfRetireMutation, useCreateUserInstitutionMutation, useGetUserInstitutionsQuery, useCreateUserEducationMutation, useUpdateUserEducationMutation, useDeleteUserEducationMutation, useGetUserEducationQuery, useCreateUserCompanyMutation, useGetUserCompaniesQuery, useCreateUserExperienceMutation, useUpdateUserExperienceMutation, useDeleteUserExperienceMutation, useGetUserExperienceQuery, useGetUserResumeQuery, useCreateUserResumeMutation, useGetMySubscriptionsQuery, useGetItemSubscriptionQuery, useCancelSubscriptionMutation, useCreateGlobalMemoryMutation, useGetMemsearchStatusQuery, useGetUserMemorySettingsQuery, useUpdateUserMemorySettingsMutation, useGetGlobalMemoriesQuery, useDeleteGlobalMemoryMutation, useInviteUserMutation, usePlatformInvitationsQuery, useCreateCatalogInvitationCourseBulkMutation, useGetCatalogInvitationsCourseQuery, useLazyPlatformUsersQuery, useLazyPlatformUserGroupsQuery, useGetPersonnalizedSearchQuery, useCreateCatalogInvitationProgramBulkMutation, useGetCatalogInvitationsProgramQuery, useGetNotificationsCountQuery, useLazyGetNotificationsQuery, useMarkAllAsReadMutation, useCreateNotificationPreviewMutation, useSendNotificationMutation, useGetMentorsQuery, useGetRbacPoliciesQuery, usePlatformUsersQuery, usePlatformUserGroupsQuery, useUpdateTemplateMutation, useGetTemplateDetailsQuery, useGetTemplatesQuery, useLazyGetTemplateDetailsQuery, useToggleTemplateMutation, useGetTopicsStatsQuery, useGetUsersStatsQuery, useGetSessionStatsQuery, useGetTopicsDetailsStatsQuery, useGetAccessTimeHeatmapQuery, useGetUserDetailsStatsQuery, useGetTranscriptsConversationHeadlineQuery, useGetAverageRatingQuery, useGetFinancialStatsQuery, useGetDetailedFinancialStatsQuery, useGetTranscriptsMessagesDetailsQuery, useGetTranscriptsMessagesQuery, useGetReportDetailQuery, useLazyGetDownloadReportFromURLQuery, useGetReportsQuery, useCreateReportMutation, useGetMentorPublicSettingsQuery, useGetContentAnalyticsQuery, useGetContentAnalyticsDetailsQuery, useGetRevenueQuery, useListPaywallsQuery, useListSubscribersQuery, useGetAuditLogsQuery, useLazyGetCourseMetaDataQuery, useLazyGetCourseCompletionOutlinesQuery, useLazyGetCourseEligibilityQuery, useLazyGetUserEnrolledCoursesQuery, useLazyGetUserAssignedCoursesQuery, useLazyGetUserCredentialsQuery, useLazyGetOverTimeActivityQuery, useLazyGetCatalogSearchQuery, useGetUserEarnedSkillsQuery, useGetUserReportedSkillsQuery, useGetUserDesiredSkillsQuery, useCreateOrUpdateUserReportedSkillMutation, useCreateOrUpdateUserDesiredSkillMutation, useLazyGetPathwayListQuery, useLazyGetUserAssignedPathwaysQuery, useLazyGetUserEnrolledPathwaysQuery, useLazyGetPathwayCompletionQuery, useLazyGetProgramListQuery, useLazyGetProgramCompletionQuery, useLazyGetUserEnrolledProgramsQuery, useLazyGetAssignedProgramsQuery, useLazyGetUserSkillsPointsQuery, useLazyGetUserReportedSkillsQuery, useLazyGetUserDesiredSkillsQuery, useLazyGetUserCatalogPathwaysQuery, useLazyGetPerLearnerInfoQuery, useLazyGetEdxSSOTokenQuery, useCreateCourseEnrollmentMutation, useCreateStripeCheckoutSessionMutation, useLazyGetCourseProgressQuery, useLazyGetCourseCompletionQuery, useUpdateExamAttemptMutation, useStartExamMutation, useLazyGetExamInfoQuery, useCreateCheckoutMutation } from '@iblai/data-layer';
|
|
5
5
|
import { toast, Toaster as Toaster$1 } from 'sonner';
|
|
6
6
|
import { jsx, Fragment as Fragment$1, jsxs } from 'react/jsx-runtime';
|
|
@@ -122167,7 +122167,11 @@ function SendNotificationDialog({ open, onOpenChange, tenant, onNotificationSent
|
|
|
122167
122167
|
}
|
|
122168
122168
|
else if (recipientType === 'groups') {
|
|
122169
122169
|
// Include users so we can extract unique users when sending notification
|
|
122170
|
-
getUserGroups({
|
|
122170
|
+
getUserGroups({
|
|
122171
|
+
platformKey: tenant,
|
|
122172
|
+
includeUsers: true,
|
|
122173
|
+
requiredAction: REQUIRED_ACTIONS_FOR_GROUPS.NOTIFICATIONS,
|
|
122174
|
+
});
|
|
122171
122175
|
}
|
|
122172
122176
|
// Only include debouncedSearch in deps when user has permission
|
|
122173
122177
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -122393,8 +122397,8 @@ function SendNotificationDialog({ open, onOpenChange, tenant, onNotificationSent
|
|
|
122393
122397
|
toggleUserSelection(user);
|
|
122394
122398
|
}
|
|
122395
122399
|
}, "data-testid": `user-option-${user.email}`, children: [jsx(Avatar, { className: "h-9 w-9", children: jsx(AvatarFallback, { className: "bg-blue-100 text-blue-700 font-medium", children: userName.substring(0, 2).toUpperCase() }) }), jsxs("div", { className: "flex-1 min-w-0", children: [jsx("div", { className: "text-sm font-medium text-gray-900", children: userName }), jsx("div", { className: "text-xs text-gray-500 truncate", children: user.email })] }), isSelected && (jsx("div", { className: "w-5 h-5 rounded-full bg-blue-500 flex items-center justify-center flex-shrink-0", "aria-hidden": "true", children: jsx("svg", { className: "w-3 h-3 text-white", fill: "none", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", viewBox: "0 0 24 24", stroke: "currentColor", children: jsx("path", { d: "M5 13l4 4L19 7" }) }) }))] }, user.email));
|
|
122396
|
-
})) : (jsx("div", { className: "text-center py-8 text-gray-500 text-sm", role: "status", "data-testid": "users-empty", children: "No users found" })) })), recipientType === 'groups' && (jsx("div", { className: "max-h-[280px] overflow-y-auto space-y-2 border rounded-lg p-2", role: "listbox", "aria-label": "Available
|
|
122397
|
-
const isSelected = selectedGroups.some((g) => g.name === group.
|
|
122400
|
+
})) : (jsx("div", { className: "text-center py-8 text-gray-500 text-sm", role: "status", "data-testid": "users-empty", children: "No users found" })) })), recipientType === 'groups' && (jsx("div", { className: "max-h-[280px] overflow-y-auto space-y-2 border rounded-lg p-2", role: "listbox", "aria-label": "Available groups", "aria-describedby": "recipients-label selected-count", "data-testid": "available-users-listbox", children: groupsLoading ? (jsx("div", { className: "text-center py-8 text-gray-500 text-sm", role: "status", "aria-live": "polite", "data-testid": "users-loading", children: "Loading ..." })) : groups.length > 0 ? (groups.map((group) => {
|
|
122401
|
+
const isSelected = selectedGroups.some((g) => g.name === group.name);
|
|
122398
122402
|
const groupName = group.name;
|
|
122399
122403
|
return (jsxs("div", { onClick: () => toggleGroupSelection(group), className: `flex items-center gap-3 p-3 rounded-lg cursor-pointer transition-colors ${isSelected
|
|
122400
122404
|
? 'bg-blue-50 border border-blue-200'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iblai/iblai-js",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.10",
|
|
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": {
|
|
@@ -61,10 +61,10 @@
|
|
|
61
61
|
"axios": "1.13.6",
|
|
62
62
|
"dotenv": "16.6.1",
|
|
63
63
|
"winston": "3.19.0",
|
|
64
|
-
"@iblai/data-layer": "1.3.6",
|
|
65
64
|
"@iblai/mcp": "1.3.2",
|
|
66
|
-
"@iblai/web-containers": "1.3.
|
|
67
|
-
"@iblai/
|
|
65
|
+
"@iblai/web-containers": "1.3.9",
|
|
66
|
+
"@iblai/data-layer": "1.3.6",
|
|
67
|
+
"@iblai/web-utils": "1.2.10"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
70
|
"@iblai/iblai-api": "4.166.0-ai",
|