@sunbird-cb/toc 0.0.3-mauritius → 0.0.4-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 (37) hide show
  1. package/esm2022/lib/_collection/_common/content-toc/app-toc-about/app-toc-about.component.mjs +2 -2
  2. package/esm2022/lib/_collection/_common/content-toc/app-toc-content-card-v2/app-toc-content-card-v2.component.mjs +3 -5
  3. package/esm2022/lib/_collection/_common/content-toc/content-toc.component.mjs +5 -3
  4. package/esm2022/lib/_collection/_common/content-toc/karma-points/karma-points.component.mjs +46 -26
  5. package/esm2022/lib/_services/widget-content.service.mjs +8 -8
  6. package/esm2022/lib/app-toc-lib.module.mjs +10 -5
  7. package/esm2022/lib/components/app-toc-cios-home/app-toc-cios-home.component.mjs +20 -3
  8. package/esm2022/lib/components/app-toc-home-v2/app-toc-home-v2.component.mjs +19 -3
  9. package/esm2022/lib/components/enroll-profile-form/enroll-profile-form.component.mjs +22 -6
  10. package/esm2022/lib/models/user-profile.model.mjs +1 -1
  11. package/esm2022/lib/services/app-toc.service.mjs +5 -5
  12. package/esm2022/lib/services/discuss-utils.service.mjs +30 -43
  13. package/esm2022/lib/services/netcore.service.mjs +116 -46
  14. package/esm2022/lib/services/nps-grid.service.mjs +34 -22
  15. package/esm2022/lib/services/otp.service.mjs +63 -25
  16. package/esm2022/lib/services/profile-v2.service.mjs +47 -19
  17. package/esm2022/lib/services/user-profile.service.mjs +160 -35
  18. package/esm2022/lib/services/viewer-util.service.mjs +6 -6
  19. package/esm2022/public-api.mjs +2 -1
  20. package/fesm2022/sunbird-cb-toc.mjs +698 -373
  21. package/fesm2022/sunbird-cb-toc.mjs.map +1 -1
  22. package/lib/_collection/_common/content-toc/karma-points/karma-points.component.d.ts +1 -0
  23. package/lib/components/app-toc-cios-home/app-toc-cios-home.component.d.ts +1 -0
  24. package/lib/components/app-toc-home-v2/app-toc-home-v2.component.d.ts +1 -0
  25. package/lib/components/enroll-profile-form/enroll-profile-form.component.d.ts +2 -0
  26. package/lib/models/user-profile.model.d.ts +87 -0
  27. package/lib/services/app-toc.service.d.ts +2 -2
  28. package/lib/services/discuss-utils.service.d.ts +5 -27
  29. package/lib/services/netcore.service.d.ts +16 -28
  30. package/lib/services/nps-grid.service.d.ts +11 -10
  31. package/lib/services/otp.service.d.ts +5 -10
  32. package/lib/services/profile-v2.service.d.ts +7 -10
  33. package/lib/services/user-profile.service.d.ts +35 -15
  34. package/package.json +1 -1
  35. package/public-api.d.ts +1 -0
  36. package/sunbird-cb-toc-0.0.4-mauritius.tgz +0 -0
  37. package/sunbird-cb-toc-0.0.3-mauritius.tgz +0 -0
@@ -26,6 +26,7 @@ export declare class KarmaPointsComponent implements OnInit, OnChanges {
26
26
  constructNudgeData(): void;
27
27
  getDynamicText(helText: string): string;
28
28
  translateLabels(label: string, type: any): any;
29
+ private getQuickLearnerBadgeText;
29
30
  static ɵfac: i0.ɵɵFactoryDeclaration<KarmaPointsComponent, never>;
30
31
  static ɵcmp: i0.ɵɵComponentDeclaration<KarmaPointsComponent, "ws-widget-karma-points", never, { "content": { "alias": "content"; "required": false; }; "data": { "alias": "data"; "required": false; }; "pCategory": { "alias": "pCategory"; "required": false; }; "condition": { "alias": "condition"; "required": false; }; "baseContentReadData": { "alias": "baseContentReadData"; "required": false; }; "btnCategory": { "alias": "btnCategory"; "required": false; }; }, { "clickClaimKarmaPoints": "clickClaimKarmaPoints"; }, never, never, false, never>;
31
32
  }
@@ -75,6 +75,7 @@ export declare class AppTocCiosHomeComponent implements OnInit, AfterViewInit {
75
75
  secondsToTime(d: any): string;
76
76
  clearCommentIdFromUrl(): void;
77
77
  private validateEnrollmentEligibility;
78
+ showBadgeIcon(): boolean;
78
79
  get showEnroll(): boolean;
79
80
  get showRedirect(): boolean;
80
81
  static ɵfac: i0.ɵɵFactoryDeclaration<AppTocCiosHomeComponent, [null, null, null, null, null, null, null, null, null, null, null, null, { optional: true; }]>;
@@ -412,6 +412,7 @@ export declare class AppTocHomeV2Component implements OnInit, OnDestroy, AfterVi
412
412
  navigateToNewVersion(): void;
413
413
  canEnroll(): boolean;
414
414
  goBack(): void;
415
+ showBadgeIcon(): boolean;
415
416
  static ɵfac: i0.ɵɵFactoryDeclaration<AppTocHomeV2Component, never>;
416
417
  static ɵcmp: i0.ɵɵComponentDeclaration<AppTocHomeV2Component, "ws-app-app-toc-home-v2", never, { "forPreview": { "alias": "forPreview"; "required": false; }; "inputContent": { "alias": "inputContent"; "required": false; }; "displayViewBtn": { "alias": "displayViewBtn"; "required": false; }; }, {}, never, never, false, never>;
417
418
  }
@@ -113,6 +113,8 @@ export declare class EnrollProfileFormComponent implements OnInit {
113
113
  verifyEmail: boolean;
114
114
  approvedDomainList: any;
115
115
  contextToken: any;
116
+ verifiedEmailOtp: string;
117
+ verifiedPhoneOtp: string;
116
118
  currentDate: Date;
117
119
  openDesignationDropdown: boolean;
118
120
  openLanguageDropdown: boolean;
@@ -35,3 +35,90 @@ export declare namespace NsUserProfileDetails {
35
35
  OTHER = "Other"
36
36
  }
37
37
  }
38
+ export interface IUserProfileDetails {
39
+ first_name: string;
40
+ last_name: string;
41
+ email: string;
42
+ wid: string;
43
+ department_name: string;
44
+ }
45
+ export interface IUserProfileDetailsFromRegistry {
46
+ 'firstname': string;
47
+ 'motherTongue': string;
48
+ 'secondaryEmail': string;
49
+ 'gender': string;
50
+ '@type': string;
51
+ 'mobile': number;
52
+ 'middlename': string;
53
+ 'telephone': number;
54
+ 'osid': string;
55
+ 'primaryEmailType': string;
56
+ 'knownLanguages': ILanguages[];
57
+ 'wid': string;
58
+ 'nationality': string;
59
+ 'surname': string;
60
+ 'dob': string;
61
+ 'category': string;
62
+ 'primaryEmail': string;
63
+ 'maritalStatus': string;
64
+ 'residenceAddress': string;
65
+ 'result': any;
66
+ }
67
+ export interface ILanguages {
68
+ name: string;
69
+ }
70
+ export interface IChipItems {
71
+ name: string;
72
+ }
73
+ export interface ILanguagesApiData {
74
+ languages: ILanguages[];
75
+ }
76
+ export interface INation {
77
+ name: string;
78
+ }
79
+ export interface INationality {
80
+ name: string;
81
+ countryCode: string;
82
+ }
83
+ export interface ICountry {
84
+ name: string;
85
+ countryCode: string;
86
+ }
87
+ export interface INationalityApiData {
88
+ nationality: INationality[];
89
+ }
90
+ export interface ICountryApiData {
91
+ countries: ICountry[];
92
+ }
93
+ export interface INameField {
94
+ name: string;
95
+ }
96
+ export interface IGovtOrgMeta {
97
+ ministries: INameField[];
98
+ service: INameField[];
99
+ cadre: INameField[];
100
+ }
101
+ export interface IIndustriesMeta {
102
+ industries: INameField[];
103
+ }
104
+ export interface IdegreesMeta {
105
+ graduations: INameField[];
106
+ postGraduations: INameField[];
107
+ }
108
+ export interface IdesignationsMeta {
109
+ designations: INameField[];
110
+ gradePay: INameField[];
111
+ }
112
+ export interface IProfileMetaApiData {
113
+ govtOrg: IGovtOrgMeta;
114
+ industries: IIndustriesMeta;
115
+ degrees: IdegreesMeta;
116
+ designations: IdesignationsMeta;
117
+ }
118
+ export interface IProfileAcademics {
119
+ nameOfQualification: string;
120
+ type: string;
121
+ nameOfInstitute: string;
122
+ yearOfPassing: string;
123
+ nameOfOtherQualification?: string;
124
+ }
@@ -1,5 +1,5 @@
1
1
  import { Data } from '@angular/router';
2
- import { Subject, Observable, Subscription, BehaviorSubject } from 'rxjs';
2
+ import { Subject, Observable, Subscription, BehaviorSubject, ReplaySubject } from 'rxjs';
3
3
  import { HttpClient } from '@angular/common/http';
4
4
  import { NsContent } from '../_services/widget-content.model';
5
5
  import { WidgetContentService } from '../_services/widget-content.service';
@@ -45,7 +45,7 @@ export declare class AppTocService {
45
45
  transriptionActiveLanguageDataObject: BehaviorSubject<any>;
46
46
  transriptionActiveLanguageDataObject$: Observable<any>;
47
47
  transriptionIdentifier: Subject<unknown>;
48
- changeTranscriptionLanguageEvent: Subject<unknown>;
48
+ changeTranscriptionLanguageEvent: ReplaySubject<unknown>;
49
49
  playTranscriptionVideo: Subject<unknown>;
50
50
  constructor(http: HttpClient, contentLangSvc: ContentLanguageService, configSvc: ConfigurationsService, widgetSvc: WidgetContentService);
51
51
  get subtitleOnBanners(): boolean;
@@ -1,33 +1,11 @@
1
- import { Observable } from 'rxjs';
2
- import { HttpClient } from '@angular/common/http';
3
1
  import * as i0 from "@angular/core";
4
- /**
5
- * Discuss Utils Service
6
- * Handles discussion forum related utilities
7
- */
8
2
  export declare class DiscussUtilsService {
9
- private http;
10
- constructor(http: HttpClient);
11
- /**
12
- * Get discussion forum configuration
13
- */
14
- getDiscussionConfig(): any;
15
- /**
16
- * Set discussion forum configuration
17
- */
3
+ discussionCnfig: any;
4
+ constructor();
5
+ stringToColor(str: string): string;
6
+ getContrast(_hexcolor: any): string;
18
7
  setDiscussionConfig(config: any): void;
19
- /**
20
- * Navigate to discussion forum
21
- */
22
- navigateToDiscussion(contentId: string): void;
23
- /**
24
- * Get discussion count for content
25
- */
26
- getDiscussionCount(contentId: string): Observable<number>;
27
- /**
28
- * Set discussion configuration (alias)
29
- */
30
- setDiscussConfig(config: any): void;
8
+ getDiscussionConfig(): any;
31
9
  static ɵfac: i0.ɵɵFactoryDeclaration<DiscussUtilsService, never>;
32
10
  static ɵprov: i0.ɵɵInjectableDeclaration<DiscussUtilsService>;
33
11
  }
@@ -1,33 +1,21 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { ConfigurationsService } from '@sunbird-cb/utils-v2';
3
+ import { Observable } from 'rxjs';
1
4
  import * as i0 from "@angular/core";
2
- /**
3
- * NetCore Service stub
4
- * Handles NetCore integration for analytics
5
- *
6
- * Note: This is a minimal stub. The consuming application should provide
7
- * a proper implementation if full functionality is needed.
8
- */
9
5
  export declare class NetCoreService {
10
- constructor();
11
- /**
12
- * Track event
13
- */
14
- trackEvent(eventName: string, eventData?: any): void;
15
- /**
16
- * Track page view
17
- */
18
- trackPageView(pageName: string, pageData?: any): void;
19
- /**
20
- * Set user properties
21
- */
22
- setUserProperties(properties: any): void;
23
- /**
24
- * Log out user
25
- */
26
- logout(): void;
27
- /**
28
- * Track event for content and event
29
- */
30
- trackEventForContentAndEvent(eventType: string, userId: string, payload: any): void;
6
+ private http;
7
+ configSvc: ConfigurationsService;
8
+ constructor(http: HttpClient, configSvc: ConfigurationsService);
9
+ getOrgReadData(organisationId: string): Observable<any>;
10
+ netCoreConfigReadData(payload: any): Observable<any>;
11
+ formReadData(request: any): Observable<any>;
12
+ netCoreUserLoginSetup(payload: any): void;
13
+ netCoreUserNameUpdate(payload: any): void;
14
+ netCoreUserProfilePhotoUpdate(payload: any): void;
15
+ netCoreUserProfilepdate(payload: any): void;
16
+ netCoreUserProfileUpdateEvent(payload: any, eventName: any, userIdentifier: any): void;
17
+ trackEvent(eventName: any, userIdentifier: any, userpayload?: any): void;
18
+ trackEventForContentAndEvent(eventName: any, userIdentifier: any, contentpayload?: any): void;
31
19
  static ɵfac: i0.ɵɵFactoryDeclaration<NetCoreService, never>;
32
20
  static ɵprov: i0.ɵɵInjectableDeclaration<NetCoreService>;
33
21
  }
@@ -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
  }
@@ -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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sunbird-cb/toc",
3
- "version": "0.0.3-mauritius",
3
+ "version": "0.0.4-mauritius",
4
4
  "dependencies": {
5
5
  "tslib": "^2.0.0"
6
6
  },
package/public-api.d.ts CHANGED
@@ -10,6 +10,7 @@ export * from './lib/services/timer.service';
10
10
  export * from './lib/services/title-tag.service';
11
11
  export * from './lib/services/viewer-util.service';
12
12
  export * from './lib/services/viewer-data.service';
13
+ export * from './lib/services/user-profile.service';
13
14
  export * from './lib/models/app-toc.model';
14
15
  export * from './lib/models/app-toc-analytics.model';
15
16
  export * from './lib/models/meta-tag.model';
Binary file