@sunbird-cb/utils 1.0.15 → 1.0.17

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 (33) hide show
  1. package/bundles/sunbird-cb-utils.umd.js +155 -43
  2. package/bundles/sunbird-cb-utils.umd.js.map +1 -1
  3. package/bundles/sunbird-cb-utils.umd.min.js +2 -2
  4. package/bundles/sunbird-cb-utils.umd.min.js.map +1 -1
  5. package/esm2015/lib/pipes/pipe-relative-time/pipe-relative-time.pipe.js +3 -2
  6. package/esm2015/lib/services/auth-keycloak.service.js +18 -19
  7. package/esm2015/lib/services/card-content.model.js +2 -1
  8. package/esm2015/lib/services/event.model.js +2 -1
  9. package/esm2015/lib/services/event.service.js +115 -7
  10. package/esm2015/lib/services/user-preference.model.js +10 -1
  11. package/esm2015/public-api.js +2 -1
  12. package/esm2015/sunbird-cb-utils.js +6 -7
  13. package/esm5/lib/pipes/pipe-relative-time/pipe-relative-time.pipe.js +3 -2
  14. package/esm5/lib/services/auth-keycloak.service.js +23 -29
  15. package/esm5/lib/services/card-content.model.js +2 -1
  16. package/esm5/lib/services/event.model.js +2 -1
  17. package/esm5/lib/services/event.service.js +116 -7
  18. package/esm5/lib/services/user-preference.model.js +10 -1
  19. package/esm5/public-api.js +2 -1
  20. package/esm5/sunbird-cb-utils.js +6 -7
  21. package/fesm2015/sunbird-cb-utils.js +143 -24
  22. package/fesm2015/sunbird-cb-utils.js.map +1 -1
  23. package/fesm5/sunbird-cb-utils.js +149 -34
  24. package/fesm5/sunbird-cb-utils.js.map +1 -1
  25. package/lib/services/auth-keycloak.service.d.ts +1 -3
  26. package/lib/services/card-content.model.d.ts +2 -1
  27. package/lib/services/event.model.d.ts +2 -1
  28. package/lib/services/event.service.d.ts +17 -1
  29. package/lib/services/user-preference.model.d.ts +8 -0
  30. package/package.json +1 -1
  31. package/public-api.d.ts +1 -0
  32. package/sunbird-cb-utils.d.ts +4 -5
  33. package/sunbird-cb-utils.metadata.json +1 -1
@@ -1,14 +1,12 @@
1
- import { HttpClient } from '@angular/common/http';
2
1
  import { KeycloakService } from 'keycloak-angular';
3
2
  import { AuthMicrosoftService } from './auth-microsoft.service';
4
3
  import { ConfigurationsService } from './configurations.service';
5
4
  export declare class AuthKeycloakService {
6
- private http;
7
5
  private configSvc;
8
6
  private keycloakSvc;
9
7
  private msAuthSvc;
10
8
  private loginChangeSubject;
11
- constructor(http: HttpClient, configSvc: ConfigurationsService, keycloakSvc: KeycloakService, msAuthSvc: AuthMicrosoftService);
9
+ constructor(configSvc: ConfigurationsService, keycloakSvc: KeycloakService, msAuthSvc: AuthMicrosoftService);
12
10
  readonly isLoggedIn$: import("rxjs").Observable<boolean>;
13
11
  readonly isLoggedIn: Promise<boolean>;
14
12
  readonly isAuthenticated: boolean | undefined;
@@ -1,4 +1,4 @@
1
- import { NsContent } from '../services/widget-content.model';
1
+ import { NsContent } from './widget-content.model';
2
2
  export declare namespace NsCardContent {
3
3
  interface ICard {
4
4
  content: NsContent.IContent;
@@ -11,6 +11,7 @@ export declare namespace NsCardContent {
11
11
  deletedMode?: 'greyOut' | 'hide';
12
12
  likes?: number;
13
13
  contentTags?: IContentTags;
14
+ stateData: any;
14
15
  }
15
16
  interface IContentTags {
16
17
  daysSpan?: number;
@@ -187,6 +187,7 @@ export declare namespace WsEvents {
187
187
  PROFILE_EDIT_TAB = "profile-edit-tab",
188
188
  DISCUSS_TAB = "discuss-tab",
189
189
  EVENTS_TAB = "events-tab",
190
- SIDE_MENU = "side-menu"
190
+ SIDE_MENU = "side-menu",
191
+ HOME_PAGE_STRIP_TABS = "home-page-strip-tabs"
191
192
  }
192
193
  }
@@ -2,13 +2,29 @@ import { WsEvents } from './event.model';
2
2
  import { UtilityService } from './utility.service';
3
3
  export declare class EventService {
4
4
  private utilitySvc;
5
+ todaysEvents: any;
5
6
  private eventsSubject;
6
7
  events$: import("rxjs").Observable<WsEvents.IWsEvents<any>>;
7
- constructor(utilitySvc: UtilityService);
8
+ private eventsChatbotSubject;
9
+ chatbotEvents$: import("rxjs").Observable<WsEvents.IWsEvents<any>>;
10
+ private eventsGetStartSubject;
11
+ getStartEvents$: import("rxjs").Observable<WsEvents.IWsEvents<any>>;
12
+ private eventsPRSubject;
13
+ getPREvents$: import("rxjs").Observable<WsEvents.IWsEvents<any>>;
14
+ environment: any;
15
+ constructor(utilitySvc: UtilityService, environment: any);
8
16
  dispatchEvent<T>(event: WsEvents.IWsEvents<T>): void;
17
+ dispatchChatbotEvent<T>(event: WsEvents.IWsEvents<T>): void;
18
+ dispatchGetStartedEvent<T>(event: WsEvents.IWsEvents<T>): void;
19
+ dispatchPlatformRatingEvent<T>(event: WsEvents.IWsEvents<T>): void;
9
20
  raiseInteractTelemetry(edata: WsEvents.ITelemetryEdata, object: any, pageContext?: WsEvents.ITelemetryPageContext): void;
10
21
  raiseFeedbackTelemetry(edata: WsEvents.ITelemetryEdata, object: any, from?: string): void;
11
22
  raiseCustomImpression(object: any, pageContext?: WsEvents.ITelemetryPageContext): void;
12
23
  private getContext;
13
24
  handleTabTelemetry(subType: string, data: WsEvents.ITelemetryTabData, object?: any): void;
25
+ getPublicUrl(url: string): string;
26
+ allEventDateFormat(datetime: any): string;
27
+ compareDate(startDate: any): boolean;
28
+ customDateFormat(date: any, time: any): string;
29
+ setEventListData(eventObj: any): void;
14
30
  }
@@ -24,3 +24,11 @@ export interface IProfile {
24
24
  showBlogs: boolean;
25
25
  showQnA: boolean;
26
26
  }
27
+ export interface IPortalUrls {
28
+ igot: string;
29
+ spv: string;
30
+ mdo: string;
31
+ cbc: string;
32
+ cbp: string;
33
+ frac: string;
34
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sunbird-cb/utils",
3
- "version": "1.0.15",
3
+ "version": "1.0.17",
4
4
  "main": "bundles/sunbird-cb-utils.umd.js",
5
5
  "dependencies": {
6
6
  "tslib": "^1.9.0"
package/public-api.d.ts CHANGED
@@ -6,6 +6,7 @@ export * from './lib/constants/misc.constants';
6
6
  export * from './lib/directives/class-change-on-scroll/class-change-on-scroll.module';
7
7
  export * from './lib/directives/default-thumbnail/default-thumbnail.module';
8
8
  export * from './lib/directives/image-responsive/image-responsive.module';
9
+ export * from './lib/directives/image-responsive/image-responsive.directive';
9
10
  export * from './lib/directives/in-view-port/in-view-port.module';
10
11
  export * from './lib/directives/navigation/navigation.module';
11
12
  export * from './lib/directives/permission/permission.module';
@@ -1,8 +1,7 @@
1
1
  export * from './public-api';
2
2
  export { ClassChangeOnScrollDirective as ɵa } from './lib/directives/class-change-on-scroll/class-change-on-scroll.directive';
3
3
  export { DefaultThumbnailDirective as ɵb } from './lib/directives/default-thumbnail/default-thumbnail.directive';
4
- export { ImageResponsiveDirective as ɵc } from './lib/directives/image-responsive/image-responsive.directive';
5
- export { InViewPortDirective as ɵd } from './lib/directives/in-view-port/in-view-port.directive';
6
- export { NavigationDirective as ɵe } from './lib/directives/navigation/navigation.directive';
7
- export { PermissionDirective as ɵf } from './lib/directives/permission/permission.directive';
8
- export { HorizontalScrollerComponent as ɵg } from './lib/helpers/horizontal-scroller/horizontal-scroller.component';
4
+ export { InViewPortDirective as ɵc } from './lib/directives/in-view-port/in-view-port.directive';
5
+ export { NavigationDirective as ɵd } from './lib/directives/navigation/navigation.directive';
6
+ export { PermissionDirective as ɵe } from './lib/directives/permission/permission.directive';
7
+ export { HorizontalScrollerComponent as ɵf } from './lib/helpers/horizontal-scroller/horizontal-scroller.component';