@sunbird-cb/toc 0.0.7 → 0.0.8-mauritius

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.
Files changed (84) hide show
  1. package/esm2022/lib/_collection/_common/ai-tutor/ai-tutor.component.mjs +1169 -0
  2. package/esm2022/lib/_collection/_common/ai-tutor/socket.service.mjs +121 -0
  3. package/esm2022/lib/_collection/_common/card-competency/card-competency.component.mjs +58 -0
  4. package/esm2022/lib/_collection/_common/card-competency/card-competency.module.mjs +22 -0
  5. package/esm2022/lib/_collection/_common/card-content-v2/card-content-v2.model.mjs +23 -0
  6. package/esm2022/lib/_collection/_common/certificate-dialog/certificate-dialog.component.mjs +115 -12
  7. package/esm2022/lib/_collection/_common/certificate-dialog/certificate-dialog.module.mjs +5 -1
  8. package/esm2022/lib/_collection/_common/content-toc/ai-tutor-confirm-popup/ai-tutor-confirm-popup.component.mjs +3 -3
  9. package/esm2022/lib/_collection/_common/content-toc/app-toc-about/app-toc-about.component.mjs +32 -12
  10. package/esm2022/lib/_collection/_common/content-toc/app-toc-content/app-toc-content.component.mjs +86 -7
  11. package/esm2022/lib/_collection/_common/content-toc/app-toc-content-card-v2/app-toc-content-card-v2.component.mjs +294 -97
  12. package/esm2022/lib/_collection/_common/content-toc/content-toc.component.mjs +25 -37
  13. package/esm2022/lib/_collection/_common/content-toc/content-toc.module.mjs +7 -2
  14. package/esm2022/lib/_collection/_common/content-toc/karma-points/karma-points.component.mjs +70 -3
  15. package/esm2022/lib/_collection/_common/toc-kpi-values/toc-kpi-values.component.mjs +3 -3
  16. package/esm2022/lib/_collection/sliders-dynamic/sliders-dynamic.component.mjs +6 -3
  17. package/esm2022/lib/_services/viewer-route-util.mjs +2 -2
  18. package/esm2022/lib/_services/widget-content.model.mjs +8 -1
  19. package/esm2022/lib/_services/widget-content.service.mjs +8 -8
  20. package/esm2022/lib/app-toc-lib.module.mjs +16 -7
  21. package/esm2022/lib/components/app-toc-cios-home/app-toc-cios-home.component.mjs +55 -8
  22. package/esm2022/lib/components/app-toc-dialog-intro-video/app-toc-dialog-intro-video.component.mjs +3 -3
  23. package/esm2022/lib/components/app-toc-discussion/app-toc-discussion.component.mjs +3 -3
  24. package/esm2022/lib/components/app-toc-home/app-toc-home.component.mjs +7 -6
  25. package/esm2022/lib/components/app-toc-home-v2/app-toc-home-v2.component.mjs +187 -75
  26. package/esm2022/lib/components/enroll-profile-form/enroll-profile-form.component.mjs +22 -6
  27. package/esm2022/lib/components/public-survey-form/public-survey-form.component.mjs +5 -3
  28. package/esm2022/lib/models/user-profile.model.mjs +1 -1
  29. package/esm2022/lib/registration-toc-lib.config.mjs +14 -0
  30. package/esm2022/lib/routes/app-toc-home/app-toc-home.component.mjs +1 -1
  31. package/esm2022/lib/services/app-toc-v2.service.mjs +183 -58
  32. package/esm2022/lib/services/app-toc.service.mjs +328 -138
  33. package/esm2022/lib/services/certificate.service.mjs +54 -9
  34. package/esm2022/lib/services/discuss-utils.service.mjs +30 -43
  35. package/esm2022/lib/services/netcore.service.mjs +116 -46
  36. package/esm2022/lib/services/nps-grid.service.mjs +34 -22
  37. package/esm2022/lib/services/otp.service.mjs +63 -25
  38. package/esm2022/lib/services/profile-v2.service.mjs +47 -19
  39. package/esm2022/lib/services/root.service.mjs +106 -0
  40. package/esm2022/lib/services/user-profile.service.mjs +160 -35
  41. package/esm2022/lib/services/viewer-data.service.mjs +1 -1
  42. package/esm2022/lib/services/viewer-util.service.mjs +159 -32
  43. package/esm2022/public-api.mjs +12 -1
  44. package/fesm2022/sunbird-cb-toc.mjs +9619 -6783
  45. package/fesm2022/sunbird-cb-toc.mjs.map +1 -1
  46. package/lib/_collection/_common/ai-tutor/ai-tutor.component.d.ts +139 -0
  47. package/lib/_collection/_common/ai-tutor/socket.service.d.ts +19 -0
  48. package/lib/_collection/_common/card-competency/card-competency.component.d.ts +14 -0
  49. package/lib/_collection/_common/card-competency/card-competency.module.d.ts +8 -0
  50. package/lib/_collection/_common/card-content-v2/card-content-v2.model.d.ts +44 -0
  51. package/lib/_collection/_common/certificate-dialog/certificate-dialog.component.d.ts +11 -2
  52. package/lib/_collection/_common/certificate-dialog/certificate-dialog.module.d.ts +12 -11
  53. package/lib/_collection/_common/content-toc/ai-tutor-confirm-popup/ai-tutor-confirm-popup.component.d.ts +1 -1
  54. package/lib/_collection/_common/content-toc/app-toc-about/app-toc-about.component.d.ts +7 -3
  55. package/lib/_collection/_common/content-toc/app-toc-content/app-toc-content.component.d.ts +8 -0
  56. package/lib/_collection/_common/content-toc/app-toc-content-card-v2/app-toc-content-card-v2.component.d.ts +48 -7
  57. package/lib/_collection/_common/content-toc/content-toc.component.d.ts +6 -3
  58. package/lib/_collection/_common/content-toc/content-toc.module.d.ts +29 -28
  59. package/lib/_collection/_common/content-toc/karma-points/karma-points.component.d.ts +4 -1
  60. package/lib/_collection/sliders-dynamic/sliders-dynamic.component.d.ts +2 -1
  61. package/lib/_services/widget-content.model.d.ts +6 -0
  62. package/lib/app-toc-lib.module.d.ts +2 -1
  63. package/lib/components/app-toc-cios-home/app-toc-cios-home.component.d.ts +5 -0
  64. package/lib/components/app-toc-home/app-toc-home.component.d.ts +3 -2
  65. package/lib/components/app-toc-home-v2/app-toc-home-v2.component.d.ts +13 -3
  66. package/lib/components/enroll-profile-form/enroll-profile-form.component.d.ts +2 -0
  67. package/lib/components/public-survey-form/public-survey-form.component.d.ts +1 -0
  68. package/lib/models/user-profile.model.d.ts +87 -0
  69. package/lib/registration-toc-lib.config.d.ts +4 -0
  70. package/lib/services/app-toc-v2.service.d.ts +3 -0
  71. package/lib/services/app-toc.service.d.ts +30 -17
  72. package/lib/services/certificate.service.d.ts +5 -6
  73. package/lib/services/discuss-utils.service.d.ts +5 -27
  74. package/lib/services/netcore.service.d.ts +16 -28
  75. package/lib/services/nps-grid.service.d.ts +11 -10
  76. package/lib/services/otp.service.d.ts +5 -10
  77. package/lib/services/profile-v2.service.d.ts +7 -10
  78. package/lib/services/root.service.d.ts +26 -0
  79. package/lib/services/user-profile.service.d.ts +35 -15
  80. package/lib/services/viewer-data.service.d.ts +9 -5
  81. package/lib/services/viewer-util.service.d.ts +14 -0
  82. package/package.json +3 -3
  83. package/public-api.d.ts +10 -0
  84. package/sunbird-cb-toc-0.0.8-mauritius.tgz +0 -0
@@ -1,15 +1,16 @@
1
- import { Observable } from 'rxjs';
1
+ import { HttpClient } from '@angular/common/http';
2
2
  import * as i0 from "@angular/core";
3
- /**
4
- * NPS Grid Service - Stub implementation
5
- * Provides NPS grid/survey functionality
6
- */
7
3
  export declare class NPSGridService {
8
- constructor();
9
- getGridData(): Observable<any>;
10
- submitGridResponse(data: any): Observable<any>;
11
- getGridConfig(): Observable<any>;
12
- submitBpFormWithProfileDetails(formData: any, profileData?: any): Observable<any>;
4
+ private http;
5
+ private telemetryEvents;
6
+ updateTelemetryDataObservable: import("rxjs").Observable<boolean>;
7
+ constructor(http: HttpClient);
8
+ updateTelemetryData(state: boolean): void;
9
+ getFeedStatus(id: any): import("rxjs").Observable<any>;
10
+ getFormData(formid: any): import("rxjs").Observable<any>;
11
+ submitPlatformRating(req: any): import("rxjs").Observable<any>;
12
+ deleteFeed(req: any): import("rxjs").Observable<any>;
13
+ submitBpFormWithProfileDetails(req: any): import("rxjs").Observable<any>;
13
14
  static ɵfac: i0.ɵɵFactoryDeclaration<NPSGridService, never>;
14
15
  static ɵprov: i0.ɵɵInjectableDeclaration<NPSGridService>;
15
16
  }
@@ -1,20 +1,15 @@
1
1
  import { HttpClient } from '@angular/common/http';
2
2
  import { Observable } from 'rxjs';
3
3
  import * as i0 from "@angular/core";
4
- /**
5
- * OTP Service - Stub implementation
6
- * Provides OTP generation and verification functionality
7
- */
8
4
  export declare class OtpService {
9
5
  private http;
10
6
  constructor(http: HttpClient);
11
- generateOtp(mobileNumber: string): Observable<any>;
12
- verifyOtp(mobileNumber: string, otp: string): Observable<any>;
13
- resendOtp(mobileNumber: string): Observable<any>;
14
- sendOtp(mobileNumber: string): Observable<any>;
7
+ sendOtp(mob: number): Observable<any>;
8
+ resendOtp(mob: number): Observable<Object>;
9
+ verifyOTP(otp: string, mob: number): Observable<Object>;
15
10
  sendEmailOtp(email: string): Observable<any>;
16
- verifyEmailOTP(email: string, otp: string): Observable<any>;
17
- verifyOTP(mobileNumber: string, otp: string): Observable<any>;
11
+ reSendEmailOtp(email: string): Observable<any>;
12
+ verifyEmailOTP(otp: any, email: number): Observable<Object>;
18
13
  static ɵfac: i0.ɵɵFactoryDeclaration<OtpService, never>;
19
14
  static ɵprov: i0.ɵɵInjectableDeclaration<OtpService>;
20
15
  }
@@ -1,20 +1,17 @@
1
1
  import { HttpClient } from '@angular/common/http';
2
2
  import { Observable } from 'rxjs';
3
+ import { NSProfileDataV2 } from '../_collection/_common/connection-name/profile-v2.model';
3
4
  import * as i0 from "@angular/core";
4
- /**
5
- * Profile V2 Service - Stub implementation
6
- * Provides profile management functionality
7
- */
8
5
  export declare class ProfileV2Service {
9
6
  private http;
10
7
  constructor(http: HttpClient);
11
- getProfile(userId: string): Observable<any>;
12
- updateProfile(profileData: any): Observable<any>;
13
- getProfileDetails(userId: string): Observable<any>;
14
- getFormV2ByID(formId: string): Observable<any>;
8
+ fetchDiscussProfile(wid: string): Observable<any>;
9
+ fetchProfile(userId: string): Observable<NSProfileDataV2.IProfile>;
10
+ fetchPost(request: any): Observable<any>;
15
11
  fetchCadre(): Observable<any>;
16
- fetchApprovalDetails(userId?: string): Observable<any>;
17
- withDrawApprovalRequest(userId: string, wfId?: string): Observable<any>;
12
+ fetchApprovalDetails(): Observable<any>;
13
+ withDrawApprovalRequest(userId: string, wfId: string): Observable<any>;
14
+ getFormV2ByID(formid: any): Observable<any>;
18
15
  static ɵfac: i0.ɵɵFactoryDeclaration<ProfileV2Service, never>;
19
16
  static ɵprov: i0.ɵɵInjectableDeclaration<ProfileV2Service>;
20
17
  }
@@ -0,0 +1,26 @@
1
+ import { BehaviorSubject, Observable } from 'rxjs';
2
+ import { HttpClient } from '@angular/common/http';
3
+ import * as i0 from "@angular/core";
4
+ export declare class RootService {
5
+ private http;
6
+ openSupportAIChatbot: BehaviorSubject<boolean>;
7
+ showNavbarDisplay$: BehaviorSubject<boolean>;
8
+ discussionCnfig: any;
9
+ iGOTAIChatHistory: any;
10
+ constructor(http: HttpClient);
11
+ createUser(request: any): Observable<any>;
12
+ setDiscussionConfig(config: any): void;
13
+ getCookie(name: string): string;
14
+ deleteCookie(name: string): void;
15
+ setCookie(name: string, value: string, expireDays: number, path?: string): void;
16
+ getChatData(tabType: any): any;
17
+ getLangugages(): Observable<any>;
18
+ aiGlobalSearch(requestBody: any, chatId: any, userID: any): Observable<any>;
19
+ saveAIChatPositiveContentRating(requestBody: any, chatId: any, userID: any): Observable<any>;
20
+ shareAIFeedback(requestBody: any, chatId: any, userID: any): Observable<any>;
21
+ aiGlobalSearchFromInternet(requestBody: any, chatId: any, userID: any): Observable<any>;
22
+ aiStartChathForSupport(requestBody: any, userID: any): Observable<any>;
23
+ aiSendChathForSupport(requestBody: any, userID: any): Observable<any>;
24
+ static ɵfac: i0.ɵɵFactoryDeclaration<RootService, never>;
25
+ static ɵprov: i0.ɵɵInjectableDeclaration<RootService>;
26
+ }
@@ -1,24 +1,44 @@
1
- import { Observable } from 'rxjs';
2
1
  import { HttpClient } from '@angular/common/http';
2
+ import { TranslateService } from '@ngx-translate/core';
3
+ import { Observable } from 'rxjs';
4
+ import { IUserProfileDetails, ILanguagesApiData, INationalityApiData, ICountryApiData, IUserProfileDetailsFromRegistry, IProfileMetaApiData } from '../models/user-profile.model';
3
5
  import * as i0 from "@angular/core";
4
- /**
5
- * User Profile Service stub
6
- * Handles user profile related operations
7
- */
8
6
  export declare class UserProfileService {
9
7
  private http;
10
- constructor(http: HttpClient);
11
- getUserProfile(): Observable<any>;
12
- updateUserProfile(data: any): Observable<any>;
13
- searchProfile(data: any): Observable<any>;
14
- getWhiteListDomain(): Observable<any>;
15
- getGroups(): Observable<any>;
16
- handleTranslateTo(key: string): string;
17
- searchIgotDesignation(query: string): Observable<any>;
18
- searchDesignation(query: string): Observable<any>;
19
- getMasterLanguages(): Observable<any>;
8
+ private translateService;
9
+ constructor(http: HttpClient, translateService: TranslateService);
10
+ handleTranslateTo(menuName: string): string;
20
11
  editProfileDetails(data: any): Observable<any>;
21
12
  updatePrimaryEmailDetails(data: any): Observable<any>;
13
+ updateProfileDetails(data: any): Observable<any>;
14
+ getUserdetails(email: string | undefined): Observable<[IUserProfileDetails]>;
15
+ getMasterLanguages(): Observable<ILanguagesApiData>;
16
+ getMasterNationality(): Observable<INationalityApiData>;
17
+ getMasterCountries(): Observable<ICountryApiData>;
18
+ getProfilePageMeta(): Observable<IProfileMetaApiData>;
19
+ getUserdetailsFromRegistry(wid: string): Observable<[IUserProfileDetailsFromRegistry]>;
20
+ getOrganizationData(request: any): Observable<any>;
21
+ readOrgData(request: any): Observable<any>;
22
+ getAllDepartments(): Observable<INationalityApiData>;
23
+ approveRequest(data: any): Observable<Object>;
24
+ listApprovalPendingFields(): Observable<any>;
25
+ fetchApprovalPendingFields(): Observable<any>;
26
+ fetchApprovedFields(): Observable<any>;
27
+ listRejectedFields(): Observable<any>;
28
+ getDesignations(_req: any): Observable<IProfileMetaApiData>;
29
+ searchDesignation(_req: any): Observable<any>;
30
+ searchPublicDesignation(_req: any): Observable<any>;
31
+ searchIgotDesignation(_req: any): Observable<any>;
32
+ getDesignationV2(_req: any): Observable<IProfileMetaApiData>;
33
+ uploadProfilePhoto(req: any): Observable<any>;
34
+ getGroups(): Observable<any>;
35
+ getApprovalReqs(data: any): Observable<any>;
36
+ withDrawRequest(userId: string, wfId: string): Observable<any>;
37
+ fetchEhrmsDetails(): Observable<any>;
38
+ getWhiteListDomain(): Observable<any>;
39
+ fetchCustomFields(requestBody: any): Observable<any>;
40
+ updateCustomFields(requestBody: any): Observable<any>;
41
+ readCustomattributeDetails(userId: string, orgId: string): Observable<any>;
22
42
  static ɵfac: i0.ɵɵFactoryDeclaration<UserProfileService, never>;
23
43
  static ɵprov: i0.ɵɵInjectableDeclaration<UserProfileService>;
24
44
  }
@@ -8,12 +8,16 @@ export interface IViewerTocCard {
8
8
  title: string;
9
9
  duration: number;
10
10
  type: string;
11
+ mimeType: NsContent.EMimeTypes;
11
12
  complexity: string;
12
- primaryCategory?: string;
13
- mimeType?: NsContent.EMimeTypes;
14
- optionalReading?: boolean;
15
- subTitle?: string;
16
- content?: NsContent.IContent;
13
+ children: null | IViewerTocCard[];
14
+ primaryCategory: NsContent.EPrimaryCategory;
15
+ collectionId: string | null;
16
+ collectionType: string;
17
+ batchId: string | number;
18
+ viewMode: string;
19
+ optionalReading: boolean;
20
+ channelId: string;
17
21
  }
18
22
  export interface IViewerTocChangeEvent {
19
23
  tocAvailable: boolean;
@@ -40,6 +40,20 @@ export declare class ViewerUtilService {
40
40
  courseId: string;
41
41
  batchId: string;
42
42
  };
43
+ /**
44
+ * Recursively searches for a resource ID in a content's children hierarchy
45
+ * @param content The content object to search in
46
+ * @param resourceId The resource ID to find
47
+ * @returns true if resource is found, false otherwise
48
+ */
49
+ private findResourceInContent;
50
+ /**
51
+ * Finds the course that contains a given resource ID in a Learning Pathway
52
+ * @param learningPathwayContent The Learning Pathway content data
53
+ * @param resourceId The resource ID to find
54
+ * @returns The course object containing the resource, or null if not found
55
+ */
56
+ findCourseContainingResource(learningPathwayContent: any, resourceId: string): any;
43
57
  getResourceContentLanguage(resourceId: string): any;
44
58
  checkForCourseEnrollment(childList: NsContent.IContent, _resourceId: string, _enrollmentList: any, _tempData: any): Promise<any>;
45
59
  realTimeProgressUpdateQuiz(contentId: string, collectionId?: string, batchId?: string, status?: number): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sunbird-cb/toc",
3
- "version": "0.0.7",
3
+ "version": "0.0.8-mauritius",
4
4
  "dependencies": {
5
5
  "tslib": "^2.0.0"
6
6
  },
@@ -12,9 +12,9 @@
12
12
  "@angular/material": "^16.2.14",
13
13
  "@ngx-translate/core": "^15.0.0",
14
14
  "@sunbird-cb/design-system": "0.0.3",
15
- "@sunbird-cb/utils-v2": "0.0.2-cbrelease-4.8.31",
15
+ "@sunbird-cb/utils-v2": "0.0.2-cbrelease-4.8.35-mauritius",
16
16
  "@sunbird-cb/resolver-v2": "0.0.7-ang-13-16",
17
- "@sunbird-cb/consumption": "0.0.9-cbrelease-4.8.32",
17
+ "@sunbird-cb/consumption": "0.0.32-cbrelease-4.8.32",
18
18
  "@sunbird-cb/discussion-v2": "0.0.8-cbrelease-4.8.28"
19
19
  },
20
20
  "module": "fesm2022/sunbird-cb-toc.mjs",
package/public-api.d.ts CHANGED
@@ -1,4 +1,6 @@
1
1
  export * from './lib/app-toc-lib.module';
2
+ export * from './lib/registration-toc-lib.config';
3
+ export * from './lib/collection.config';
2
4
  export * from './lib/services/app-toc.service';
3
5
  export * from './lib/services/app-toc-v2.service';
4
6
  export * from './lib/services/action.service';
@@ -6,6 +8,9 @@ export * from './lib/services/load-check.service';
6
8
  export * from './lib/services/reset-ratings.service';
7
9
  export * from './lib/services/timer.service';
8
10
  export * from './lib/services/title-tag.service';
11
+ export * from './lib/services/viewer-util.service';
12
+ export * from './lib/services/viewer-data.service';
13
+ export * from './lib/services/user-profile.service';
9
14
  export * from './lib/models/app-toc.model';
10
15
  export * from './lib/models/app-toc-analytics.model';
11
16
  export * from './lib/models/meta-tag.model';
@@ -49,7 +54,12 @@ export * from './lib/_collection/_common/content-toc/app-toc-about/app-toc-about
49
54
  export * from './lib/_collection/_common/content-toc/app-toc-content/app-toc-content.component';
50
55
  export * from './lib/_collection/_common/content-toc/app-toc-teachers-notes/app-toc-teachers-notes.component';
51
56
  export * from './lib/_collection/_common/content-toc/app-toc-batch-assignments/app-toc-batch-assignments.component';
57
+ export * from './lib/_services/widget-content.service';
58
+ export * from './lib/models/discussion-forum.model';
52
59
  export * from './lib/_collection/_common/content-toc/karma-points/karma-points.module';
53
60
  export * from './lib/_collection/_common/content-toc/karma-points/karma-points.component';
54
61
  export * from './lib/_collection/_common/toc-kpi-values/toc-kpi-values.module';
55
62
  export * from './lib/_collection/_common/toc-kpi-values/toc-kpi-values.component';
63
+ export * from './lib/_collection/_common/card-competency/card-competency.component';
64
+ export * from './lib/_collection/_common/card-competency/card-competency.module';
65
+ export * from './lib/services/access-control.service';