@sunbird-cb/utils-v2 0.0.13 → 0.0.15-ang-9-12

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 (162) hide show
  1. package/bundles/sunbird-cb-utils-v2.umd.js +964 -2255
  2. package/bundles/sunbird-cb-utils-v2.umd.js.map +1 -1
  3. package/bundles/sunbird-cb-utils-v2.umd.min.js +1 -1
  4. package/bundles/sunbird-cb-utils-v2.umd.min.js.map +1 -1
  5. package/esm2015/lib/components/image-crop/image-crop.component.js +19 -47
  6. package/esm2015/lib/components/image-crop/image-crop.module.js +8 -2
  7. package/esm2015/lib/constants/features.enum.js +555 -555
  8. package/esm2015/lib/constants/instances.enum.js +5 -5
  9. package/esm2015/lib/constants/misc.constants.js +1 -0
  10. package/esm2015/lib/directives/class-change-on-scroll/class-change-on-scroll.directive.js +11 -21
  11. package/esm2015/lib/directives/default-thumbnail/default-thumbnail.directive.js +1 -7
  12. package/esm2015/lib/directives/image-responsive/image-responsive.directive.js +6 -11
  13. package/esm2015/lib/directives/in-view-port/in-view-port.directive.js +9 -12
  14. package/esm2015/lib/directives/navigation/navigation.directive.js +1 -6
  15. package/esm2015/lib/helpers/functions/getStringifiedQueryParams.js +4 -4
  16. package/esm2015/lib/helpers/horizontal-scroller/horizontal-scroller.component.js +10 -19
  17. package/esm2015/lib/helpers/horizontal-scroller/horizontal-scroller.module.js +4 -2
  18. package/esm2015/lib/helpers/horizontal-scroller-v2/horizontal-scroller-v2.component.js +15 -31
  19. package/esm2015/lib/helpers/horizontal-scroller-v2/horizontal-scroller-v2.module.js +4 -2
  20. package/esm2015/lib/helpers/logout/logout.component.js +11 -14
  21. package/esm2015/lib/helpers/logout/logout.module.js +3 -2
  22. package/esm2015/lib/models/profile-v3.models.js +2 -104
  23. package/esm2015/lib/pipes/pipe-certificate-image-URL/pipe-certimage-URL.pipe.js +4 -4
  24. package/esm2015/lib/pipes/pipe-concise-date-range/pipe-concise-date-range.pipe.js +1 -7
  25. package/esm2015/lib/pipes/pipe-count-transform/pipe-count-transform.pipe.js +1 -1
  26. package/esm2015/lib/pipes/pipe-coursename/pipe-coursename.pipe.js +1 -1
  27. package/esm2015/lib/pipes/pipe-date-concat/pipe-date-concat.pipe.js +1 -11
  28. package/esm2015/lib/pipes/pipe-duration-transform/pipe-duration-transform.pipe.js +1 -1
  29. package/esm2015/lib/pipes/pipe-filter/pipe-filter.pipe.js +3 -3
  30. package/esm2015/lib/pipes/pipe-filter-search/pipe-filter-search.pipe.js +5 -5
  31. package/esm2015/lib/pipes/pipe-filter-v2/pipe-filter-v2.pipe.js +3 -3
  32. package/esm2015/lib/pipes/pipe-filter-v3/pipe-filter-v3.pipe.js +6 -6
  33. package/esm2015/lib/pipes/pipe-limit-to/pipe-limit-to.pipe.js +1 -1
  34. package/esm2015/lib/pipes/pipe-list-filter/pipe-list-filter.pipe.js +4 -4
  35. package/esm2015/lib/pipes/pipe-name-transform/pipe-name-transform.pipe.js +1 -6
  36. package/esm2015/lib/pipes/pipe-nic-relative/pipe-nic-relative.pipe.js +4 -4
  37. package/esm2015/lib/pipes/pipe-order-by/pipe-order-by.pipe.js +1 -4
  38. package/esm2015/lib/pipes/pipe-ordinal/pipe-ordinal.pipe.js +1 -1
  39. package/esm2015/lib/pipes/pipe-partial-content/pipe-partial-content.pipe.js +1 -1
  40. package/esm2015/lib/pipes/pipe-public-URL/pipe-public-URL.pipe.js +4 -4
  41. package/esm2015/lib/pipes/pipe-safe-sanitizer/pipe-safe-sanitizer.pipe.js +5 -5
  42. package/esm2015/lib/resolvers/explore-detail.resolver.js +17 -19
  43. package/esm2015/lib/resolvers/marketing-offering.resolve.js +10 -10
  44. package/esm2015/lib/resolvers/module-name.resolver.js +2 -5
  45. package/esm2015/lib/resolvers/page-name.resolver.js +2 -2
  46. package/esm2015/lib/resolvers/page.constant.js +1 -1
  47. package/esm2015/lib/resolvers/page.model.js +2 -48
  48. package/esm2015/lib/resolvers/page.resolver.js +16 -17
  49. package/esm2015/lib/resolvers/resolver.model.js +2 -6
  50. package/esm2015/lib/services/auth-keycloak.service.js +27 -35
  51. package/esm2015/lib/services/auth-microsoft.service.js +13 -17
  52. package/esm2015/lib/services/card-content.model.js +1 -21
  53. package/esm2015/lib/services/configurations.model.js +2 -550
  54. package/esm2015/lib/services/configurations.service.js +2 -63
  55. package/esm2015/lib/services/content-strip-multiple.model.js +2 -75
  56. package/esm2015/lib/services/event.model.js +1 -114
  57. package/esm2015/lib/services/event.service.js +8 -17
  58. package/esm2015/lib/services/logger.service.js +8 -13
  59. package/esm2015/lib/services/ms-office.model.js +2 -8
  60. package/esm2015/lib/services/multilingual-translations.service.js +11 -15
  61. package/esm2015/lib/services/nps-grid.service.js +6 -8
  62. package/esm2015/lib/services/subapplication-respond.service.js +16 -20
  63. package/esm2015/lib/services/telemetry.service.js +74 -83
  64. package/esm2015/lib/services/user-preference.model.js +2 -38
  65. package/esm2015/lib/services/user-preference.service.js +15 -15
  66. package/esm2015/lib/services/utility.service.js +16 -27
  67. package/esm2015/lib/services/value.service.js +8 -10
  68. package/esm2015/lib/services/widget-content.model.js +1 -242
  69. package/esm2015/lib/services/widget-content.service.js +21 -21
  70. package/esm2015/lib/services/widget-resolver.model.js +2 -57
  71. package/esm2015/lib/services/widget-search.model.js +2 -126
  72. package/esm2015/public-api.js +96 -88
  73. package/esm2015/sunbird-cb-utils-v2.js +2 -10
  74. package/esm5/lib/components/image-crop/image-crop.component.js +20 -48
  75. package/esm5/lib/components/image-crop/image-crop.module.js +8 -2
  76. package/esm5/lib/constants/features.enum.js +555 -555
  77. package/esm5/lib/constants/instances.enum.js +5 -5
  78. package/esm5/lib/constants/misc.constants.js +1 -0
  79. package/esm5/lib/directives/class-change-on-scroll/class-change-on-scroll.directive.js +14 -24
  80. package/esm5/lib/directives/default-thumbnail/default-thumbnail.directive.js +1 -7
  81. package/esm5/lib/directives/image-responsive/image-responsive.directive.js +6 -11
  82. package/esm5/lib/directives/in-view-port/in-view-port.directive.js +9 -12
  83. package/esm5/lib/directives/navigation/navigation.directive.js +1 -6
  84. package/esm5/lib/helpers/functions/getStringifiedQueryParams.js +4 -4
  85. package/esm5/lib/helpers/horizontal-scroller/horizontal-scroller.component.js +10 -19
  86. package/esm5/lib/helpers/horizontal-scroller/horizontal-scroller.module.js +4 -2
  87. package/esm5/lib/helpers/horizontal-scroller-v2/horizontal-scroller-v2.component.js +15 -31
  88. package/esm5/lib/helpers/horizontal-scroller-v2/horizontal-scroller-v2.module.js +4 -2
  89. package/esm5/lib/helpers/logout/logout.component.js +12 -15
  90. package/esm5/lib/helpers/logout/logout.module.js +3 -2
  91. package/esm5/lib/models/profile-v3.models.js +2 -104
  92. package/esm5/lib/pipes/pipe-certificate-image-URL/pipe-certimage-URL.pipe.js +4 -4
  93. package/esm5/lib/pipes/pipe-concise-date-range/pipe-concise-date-range.pipe.js +1 -7
  94. package/esm5/lib/pipes/pipe-count-transform/pipe-count-transform.pipe.js +1 -1
  95. package/esm5/lib/pipes/pipe-coursename/pipe-coursename.pipe.js +1 -1
  96. package/esm5/lib/pipes/pipe-date-concat/pipe-date-concat.pipe.js +1 -11
  97. package/esm5/lib/pipes/pipe-duration-transform/pipe-duration-transform.pipe.js +1 -1
  98. package/esm5/lib/pipes/pipe-filter/pipe-filter.pipe.js +3 -3
  99. package/esm5/lib/pipes/pipe-filter-search/pipe-filter-search.pipe.js +5 -5
  100. package/esm5/lib/pipes/pipe-filter-v2/pipe-filter-v2.pipe.js +3 -3
  101. package/esm5/lib/pipes/pipe-filter-v3/pipe-filter-v3.pipe.js +9 -9
  102. package/esm5/lib/pipes/pipe-limit-to/pipe-limit-to.pipe.js +1 -1
  103. package/esm5/lib/pipes/pipe-list-filter/pipe-list-filter.pipe.js +4 -4
  104. package/esm5/lib/pipes/pipe-name-transform/pipe-name-transform.pipe.js +1 -6
  105. package/esm5/lib/pipes/pipe-nic-relative/pipe-nic-relative.pipe.js +4 -4
  106. package/esm5/lib/pipes/pipe-order-by/pipe-order-by.pipe.js +1 -4
  107. package/esm5/lib/pipes/pipe-ordinal/pipe-ordinal.pipe.js +1 -1
  108. package/esm5/lib/pipes/pipe-partial-content/pipe-partial-content.pipe.js +3 -3
  109. package/esm5/lib/pipes/pipe-public-URL/pipe-public-URL.pipe.js +4 -4
  110. package/esm5/lib/pipes/pipe-safe-sanitizer/pipe-safe-sanitizer.pipe.js +5 -5
  111. package/esm5/lib/resolvers/explore-detail.resolver.js +17 -19
  112. package/esm5/lib/resolvers/marketing-offering.resolve.js +10 -10
  113. package/esm5/lib/resolvers/module-name.resolver.js +2 -5
  114. package/esm5/lib/resolvers/page-name.resolver.js +2 -2
  115. package/esm5/lib/resolvers/page.constant.js +1 -1
  116. package/esm5/lib/resolvers/page.model.js +2 -48
  117. package/esm5/lib/resolvers/page.resolver.js +21 -22
  118. package/esm5/lib/resolvers/resolver.model.js +2 -6
  119. package/esm5/lib/services/auth-keycloak.service.js +40 -48
  120. package/esm5/lib/services/auth-microsoft.service.js +20 -24
  121. package/esm5/lib/services/card-content.model.js +1 -21
  122. package/esm5/lib/services/configurations.model.js +2 -550
  123. package/esm5/lib/services/configurations.service.js +2 -63
  124. package/esm5/lib/services/content-strip-multiple.model.js +2 -75
  125. package/esm5/lib/services/event.model.js +1 -114
  126. package/esm5/lib/services/event.service.js +11 -20
  127. package/esm5/lib/services/logger.service.js +12 -17
  128. package/esm5/lib/services/ms-office.model.js +2 -8
  129. package/esm5/lib/services/multilingual-translations.service.js +11 -15
  130. package/esm5/lib/services/nps-grid.service.js +6 -8
  131. package/esm5/lib/services/subapplication-respond.service.js +20 -24
  132. package/esm5/lib/services/telemetry.service.js +85 -94
  133. package/esm5/lib/services/user-preference.model.js +2 -38
  134. package/esm5/lib/services/user-preference.service.js +17 -17
  135. package/esm5/lib/services/utility.service.js +23 -34
  136. package/esm5/lib/services/value.service.js +8 -10
  137. package/esm5/lib/services/widget-content.model.js +1 -242
  138. package/esm5/lib/services/widget-content.service.js +23 -23
  139. package/esm5/lib/services/widget-resolver.model.js +2 -57
  140. package/esm5/lib/services/widget-search.model.js +2 -126
  141. package/esm5/public-api.js +96 -88
  142. package/esm5/sunbird-cb-utils-v2.js +2 -10
  143. package/fesm2015/sunbird-cb-utils-v2.js +908 -2195
  144. package/fesm2015/sunbird-cb-utils-v2.js.map +1 -1
  145. package/fesm5/sunbird-cb-utils-v2.js +942 -2229
  146. package/fesm5/sunbird-cb-utils-v2.js.map +1 -1
  147. package/lib/directives/class-change-on-scroll/class-change-on-scroll.directive.d.ts +3 -3
  148. package/lib/helpers/logout/logout.component.d.ts +2 -2
  149. package/lib/pipes/pipe-order-by/pipe-order-by.pipe.d.ts +4 -4
  150. package/lib/resolvers/page.model.d.ts +1 -1
  151. package/lib/services/auth-keycloak.service.d.ts +9 -9
  152. package/lib/services/auth-microsoft.service.d.ts +2 -2
  153. package/lib/services/configurations.model.d.ts +30 -27
  154. package/lib/services/content-strip-multiple.model.d.ts +7 -6
  155. package/lib/services/logger.service.d.ts +4 -4
  156. package/lib/services/telemetry.service.d.ts +3 -3
  157. package/lib/services/utility.service.d.ts +7 -7
  158. package/lib/services/widget-content.model.d.ts +21 -20
  159. package/package.json +12 -12
  160. package/public-api.d.ts +8 -0
  161. package/sunbird-cb-utils-v2.d.ts +0 -8
  162. package/sunbird-cb-utils-v2.metadata.json +1 -1
@@ -1,9 +1,9 @@
1
1
  import { OnInit, OnDestroy, AfterViewInit } from '@angular/core';
2
2
  export declare class ClassChangeOnScrollDirective implements OnInit, OnDestroy, AfterViewInit {
3
3
  wsClassOnScrollDirChange: number;
4
- readonly isScrollingDown: boolean;
5
- readonly isScrollingUp: boolean;
6
- readonly isNotScrolling: boolean;
4
+ get isScrollingDown(): boolean;
5
+ get isScrollingUp(): boolean;
6
+ get isNotScrolling(): boolean;
7
7
  hasScrolledDown: boolean;
8
8
  private windowScrollSubscription;
9
9
  private timeoutTimer;
@@ -1,5 +1,5 @@
1
1
  import { OnInit } from '@angular/core';
2
- import { MatDialogRef } from '@angular/material';
2
+ import { MatDialogRef } from '@angular/material/dialog';
3
3
  import { AuthKeycloakService } from '../../services/auth-keycloak.service';
4
4
  import { ConfigurationsService } from '../../services/configurations.service';
5
5
  import { UtilityService } from '../../services/utility.service';
@@ -16,5 +16,5 @@ export declare class LogoutComponent implements OnInit {
16
16
  constructor(dialogRef: MatDialogRef<LogoutComponent>, authSvc: AuthKeycloakService, configSvc: ConfigurationsService, utilitySvc: UtilityService, translate: TranslateService);
17
17
  ngOnInit(): void;
18
18
  confirmed(): void;
19
- readonly isDownloadable: boolean;
19
+ get isDownloadable(): boolean;
20
20
  }
@@ -1,9 +1,9 @@
1
1
  import { PipeTransform } from '@angular/core';
2
2
  export declare class OrderByPipe implements PipeTransform {
3
3
  transform: {
4
- <T>(collection: ArrayLike<T> | null | undefined, iteratees?: import("lodash").ListIterator<T, unknown> | readonly import("lodash").ListIterator<T, unknown>[] | undefined, orders?: boolean | "desc" | "asc" | readonly (boolean | "desc" | "asc")[] | undefined): T[];
5
- <T>(collection: ArrayLike<T> | null | undefined, iteratees?: string | number | symbol | [string | number | symbol, any] | import("lodash").ListIterator<T, unknown> | import("lodash").PartialShallow<T> | readonly import("lodash").ListIteratee<T>[] | undefined, orders?: boolean | "desc" | "asc" | readonly (boolean | "desc" | "asc")[] | undefined): T[];
6
- <T extends object>(collection: T | null | undefined, iteratees?: import("lodash").ObjectIterator<T, unknown> | readonly import("lodash").ObjectIterator<T, unknown>[] | undefined, orders?: boolean | "desc" | "asc" | readonly (boolean | "desc" | "asc")[] | undefined): T[keyof T][];
7
- <T extends object>(collection: T | null | undefined, iteratees?: string | number | symbol | [string | number | symbol, any] | import("lodash").ObjectIterator<T, unknown> | import("lodash").PartialShallow<T[keyof T]> | readonly import("lodash").ObjectIteratee<T>[] | undefined, orders?: boolean | "desc" | "asc" | readonly (boolean | "desc" | "asc")[] | undefined): T[keyof T][];
4
+ <T>(collection: import("lodash").List<T> | null | undefined, iteratees?: import("lodash").Many<import("lodash").ListIterator<T, unknown>> | undefined, orders?: import("lodash").Many<boolean | "desc" | "asc"> | undefined): T[];
5
+ <T_1>(collection: import("lodash").List<T_1> | null | undefined, iteratees?: import("lodash").Many<import("lodash").ListIteratee<T_1>> | undefined, orders?: import("lodash").Many<boolean | "desc" | "asc"> | undefined): T_1[];
6
+ <T_2 extends object>(collection: T_2 | null | undefined, iteratees?: import("lodash").Many<import("lodash").ObjectIterator<T_2, unknown>> | undefined, orders?: import("lodash").Many<boolean | "desc" | "asc"> | undefined): T_2[keyof T_2][];
7
+ <T_3 extends object>(collection: T_3 | null | undefined, iteratees?: import("lodash").Many<import("lodash").ObjectIteratee<T_3>> | undefined, orders?: import("lodash").Many<boolean | "desc" | "asc"> | undefined): T_3[keyof T_3][];
8
8
  };
9
9
  }
@@ -1,4 +1,4 @@
1
- import { ThemePalette } from '@angular/material';
1
+ import { ThemePalette } from '@angular/material/core';
2
2
  import { NsAppsConfig } from '../services/configurations.model';
3
3
  import { NsWidgetResolver } from '../services/widget-resolver.model';
4
4
  export declare namespace NsPage {
@@ -9,14 +9,14 @@ export declare class AuthKeycloakService {
9
9
  private msAuthSvc;
10
10
  private loginChangeSubject;
11
11
  constructor(http: HttpClient, configSvc: ConfigurationsService, keycloakSvc: KeycloakService, msAuthSvc: AuthMicrosoftService);
12
- readonly isLoggedIn$: import("rxjs").Observable<boolean>;
13
- readonly isLoggedIn: Promise<boolean>;
14
- readonly isAuthenticated: boolean | undefined;
15
- readonly token: string | undefined;
16
- readonly sessionId: string | undefined;
17
- readonly userId: string | undefined;
18
- readonly userEmail: string | undefined;
19
- readonly userName: string | undefined;
12
+ get isLoggedIn$(): import("rxjs").Observable<boolean>;
13
+ get isLoggedIn(): Promise<boolean>;
14
+ get isAuthenticated(): boolean | undefined;
15
+ get token(): string | undefined;
16
+ get sessionId(): string | undefined;
17
+ get userId(): string | undefined;
18
+ get userEmail(): string | undefined;
19
+ get userName(): string | undefined;
20
20
  initAuth(): Promise<boolean>;
21
21
  login(idpHint?: 'E' | 'N' | 'S', redirectUrl?: string): Promise<void>;
22
22
  loginV2(_idpHint?: 'E' | 'N' | 'S', redirectUrl?: string): Promise<void>;
@@ -27,5 +27,5 @@ export declare class AuthKeycloakService {
27
27
  private setupGlobalAuthResponder;
28
28
  private saveKeycloakConfig;
29
29
  private getSavedKcConfig;
30
- private readonly defaultRedirectUrl;
30
+ private get defaultRedirectUrl();
31
31
  }
@@ -10,8 +10,8 @@ export declare class AuthMicrosoftService {
10
10
  private code;
11
11
  private msToken;
12
12
  constructor(loggerSvc: LoggerService, http: HttpClient);
13
- readonly isLogoutRequired: boolean;
14
- readonly loginUrl: string | null;
13
+ get isLogoutRequired(): boolean;
14
+ get loginUrl(): string | null;
15
15
  logoutUrl(redirectUrl: string): string;
16
16
  init(config: Pick<NsInstanceConfig.IConfig, 'microsoft'>): Promise<void>;
17
17
  login(email: string): Promise<void>;
@@ -1,7 +1,7 @@
1
1
  import { NsPage } from '../resolvers/page.model';
2
2
  import { NsWidgetResolver } from './widget-resolver.model';
3
3
  export declare namespace NsInstanceConfig {
4
- interface IConfig {
4
+ export interface IConfig {
5
5
  authoring: {
6
6
  doUniqueCheck: boolean;
7
7
  isMultiStepFlow: boolean;
@@ -68,8 +68,9 @@ export declare namespace NsInstanceConfig {
68
68
  websitelanguages: any[];
69
69
  profileTimelyNudges: any;
70
70
  npsCategory?: string;
71
+ compentency?: any;
71
72
  }
72
- interface IPortalUrls {
73
+ export interface IPortalUrls {
73
74
  igot: string;
74
75
  spv: string;
75
76
  mdo: string;
@@ -77,20 +78,20 @@ export declare namespace NsInstanceConfig {
77
78
  cbp: string;
78
79
  frac: string;
79
80
  }
80
- interface IForgotPassword {
81
+ export interface IForgotPassword {
81
82
  local?: string;
82
83
  enterprise?: string;
83
84
  social?: string;
84
85
  }
85
- interface ISourceLogo {
86
+ export interface ISourceLogo {
86
87
  sourceName?: string;
87
88
  sourceId?: string;
88
89
  logo?: string;
89
90
  }
90
- interface IPath {
91
+ export interface IPath {
91
92
  [key: string]: string;
92
93
  }
93
- interface IHubs {
94
+ export interface IHubs {
94
95
  active: boolean;
95
96
  desc: string;
96
97
  hubname: string;
@@ -98,19 +99,19 @@ export declare namespace NsInstanceConfig {
98
99
  path: string;
99
100
  order: number;
100
101
  }
101
- interface IIndexHtmlMeta {
102
+ export interface IIndexHtmlMeta {
102
103
  description?: string;
103
104
  openSearchUrl?: string;
104
105
  webmanifest: string;
105
106
  xIcon?: string;
106
107
  pngIcon?: string;
107
108
  }
108
- interface IFontSize {
109
+ export interface IFontSize {
109
110
  baseFontSize: string;
110
111
  fontClass: string;
111
112
  scale: number;
112
113
  }
113
- interface IKeycloak {
114
+ export interface IKeycloak {
114
115
  defaultidpHint: 'E' | 'N' | 'S';
115
116
  isLoginHidden: boolean;
116
117
  bearerExcludedUrls: string[];
@@ -121,48 +122,48 @@ export declare namespace NsInstanceConfig {
121
122
  changePasswordUrl?: string;
122
123
  onLoad?: 'check-sso' | 'login-required';
123
124
  }
124
- interface ILocalsConfig {
125
+ export interface ILocalsConfig {
125
126
  isAvailable: boolean;
126
127
  isEnabled: boolean;
127
128
  locals: string[];
128
129
  path: string;
129
130
  isRTL: boolean;
130
131
  }
131
- interface IMicrosoft {
132
+ export interface IMicrosoft {
132
133
  clientId: string;
133
134
  defaultEmailId: string;
134
135
  tenant: string;
135
136
  validEmailExtensions: string[];
136
137
  isConfigured: boolean;
137
138
  }
138
- interface ITheme {
139
+ export interface ITheme {
139
140
  color: IThemeColor;
140
141
  themeFile: string;
141
142
  themeClass: string;
142
143
  themeName: string;
143
144
  }
144
- interface IThemeColor {
145
+ export interface IThemeColor {
145
146
  accent: string;
146
147
  primary: string;
147
148
  warn: string;
148
149
  }
149
- interface IOverrideThemeChanges {
150
+ export interface IOverrideThemeChanges {
150
151
  isEnabled: boolean;
151
152
  desktop: IDesktop;
152
153
  mWeb: IMWeb;
153
154
  }
154
- interface IDesktop {
155
+ export interface IDesktop {
155
156
  animationDuration: number;
156
157
  logoUrl: string;
157
158
  logoText: string;
158
159
  logoDisplayTime: number;
159
160
  backgroundTheme: string;
160
161
  }
161
- interface IMWeb {
162
+ export interface IMWeb {
162
163
  logoUrl: string;
163
164
  logoText: string;
164
165
  }
165
- interface ILogos {
166
+ export interface ILogos {
166
167
  app: string;
167
168
  appTransparent: string;
168
169
  appSecondary: string;
@@ -179,15 +180,15 @@ export declare namespace NsInstanceConfig {
179
180
  playListLogo?: string;
180
181
  thumpsUp?: string;
181
182
  }
182
- interface IMailIds {
183
+ export interface IMailIds {
183
184
  contactUs: string;
184
185
  default: string;
185
186
  support: string;
186
187
  }
187
- interface IDetails {
188
+ export interface IDetails {
188
189
  appName: string;
189
190
  }
190
- interface IPrimaryNavbarConfig {
191
+ export interface IPrimaryNavbarConfig {
191
192
  mediumScreen: IPrimaryNavBarScreen;
192
193
  smallScreen: IPrimaryNavBarScreen;
193
194
  }
@@ -199,7 +200,7 @@ export declare namespace NsInstanceConfig {
199
200
  type: 'widgetButton' | 'featureButton';
200
201
  config: NsWidgetResolver.IRenderConfigWithAnyData | NsPage.INavLink;
201
202
  }
202
- interface ITelemetryConfig {
203
+ export interface ITelemetryConfig {
203
204
  pdata: {
204
205
  id: string;
205
206
  ver: string;
@@ -221,6 +222,7 @@ export declare namespace NsInstanceConfig {
221
222
  publicEndpoint: string;
222
223
  protectedEndpoint: string;
223
224
  }
225
+ export {};
224
226
  }
225
227
  export declare namespace NsAppsConfig {
226
228
  type TIconType = 'mat-icon' | 'url';
@@ -266,7 +268,7 @@ export declare namespace NsAppsConfig {
266
268
  }
267
269
  }
268
270
  export declare namespace NsUser {
269
- interface IUserProfile {
271
+ export interface IUserProfile {
270
272
  userId: string;
271
273
  email?: string;
272
274
  departmentName?: string;
@@ -295,21 +297,21 @@ export declare namespace NsUser {
295
297
  webPortalLang?: any;
296
298
  departmentImg?: any;
297
299
  }
298
- interface INodebbUserProfile {
300
+ export interface INodebbUserProfile {
299
301
  username: string;
300
302
  email: string;
301
303
  }
302
- interface IUserPidProfile {
304
+ export interface IUserPidProfile {
303
305
  kid_updated: boolean;
304
306
  user: IUser;
305
307
  }
306
- interface IUserPidProfileV2 {
308
+ export interface IUserPidProfileV2 {
307
309
  kid_updated: boolean;
308
310
  result: {
309
311
  response: IUserV2;
310
312
  };
311
313
  }
312
- interface IUserPidProfileVer2 {
314
+ export interface IUserPidProfileVer2 {
313
315
  result: {
314
316
  UserProfile: IUserVer2;
315
317
  };
@@ -517,7 +519,8 @@ export declare namespace NsUser {
517
519
  'residenceAddress': string;
518
520
  'result': any;
519
521
  }
520
- interface ILanguages {
522
+ export interface ILanguages {
521
523
  name: string;
522
524
  }
525
+ export {};
523
526
  }
@@ -3,14 +3,14 @@ import { NsContent } from './widget-content.model';
3
3
  import { NsCardContent } from './card-content.model';
4
4
  import { NsWidgetResolver } from './widget-resolver.model';
5
5
  export declare namespace NsContentStripMultiple {
6
- interface IContentStripMultiple {
6
+ export interface IContentStripMultiple {
7
7
  errorWidget?: NsWidgetResolver.IRenderConfigWithAnyData;
8
8
  loader?: boolean;
9
9
  noDataWidget?: NsWidgetResolver.IRenderConfigWithAnyData;
10
10
  strips: IContentStripUnit[];
11
11
  isChannelStrip?: boolean;
12
12
  }
13
- interface IContentStripUnit {
13
+ export interface IContentStripUnit {
14
14
  key: string;
15
15
  title: string;
16
16
  name?: string;
@@ -37,7 +37,7 @@ export declare namespace NsContentStripMultiple {
37
37
  refreshEvent?: Record<'eventType' | 'from', string>;
38
38
  fetchLikes?: boolean;
39
39
  }
40
- interface IStripRequestApi {
40
+ export interface IStripRequestApi {
41
41
  path: string;
42
42
  queryParams?: {
43
43
  pageNo?: number;
@@ -46,7 +46,7 @@ export declare namespace NsContentStripMultiple {
46
46
  sourceFields?: string;
47
47
  };
48
48
  }
49
- interface IStripInfo {
49
+ export interface IStripInfo {
50
50
  mode: 'below' | 'popup' | 'modal';
51
51
  visibilityMode?: 'hidden' | 'visible';
52
52
  icon: {
@@ -63,17 +63,18 @@ export declare namespace NsContentStripMultiple {
63
63
  deletedMode?: 'greyOut' | 'hide';
64
64
  contentTags?: IContentTags;
65
65
  }
66
- interface IContentTags {
66
+ export interface IContentTags {
67
67
  daysSpan?: number;
68
68
  excludeContentType?: NsContent.EContentTypes[];
69
69
  excludeMimeType?: string[];
70
70
  tag: string;
71
71
  criteriaField: string;
72
72
  }
73
- interface IContentStripResponseApi {
73
+ export interface IContentStripResponseApi {
74
74
  contents: NsContent.IContent[];
75
75
  hasMore?: boolean;
76
76
  pageState?: string;
77
77
  totalHits?: number;
78
78
  }
79
+ export {};
79
80
  }
@@ -7,9 +7,9 @@ export declare class LoggerService {
7
7
  private consoleLog;
8
8
  private consoleWarn;
9
9
  private noConsole;
10
- readonly error: (message?: any, ...optionalParams: any[]) => void;
11
- readonly info: (message?: any, ...optionalParams: any[]) => void;
12
- readonly log: (message?: any, ...optionalParams: any[]) => void;
13
- readonly warn: (message?: any, ...optionalParams: any[]) => void;
10
+ get error(): (...data: any[]) => void;
11
+ get info(): (...data: any[]) => void;
12
+ get log(): (...data: any[]) => void;
13
+ get warn(): (...data: any[]) => void;
14
14
  removeConsoleAccess(): void;
15
15
  }
@@ -21,11 +21,11 @@ export declare class TelemetryService {
21
21
  environment: any;
22
22
  constructor(configSvc: ConfigurationsService, eventsSvc: EventService, environment: any, logger: LoggerService, router: Router, npsSvc: NPSGridService);
23
23
  private navigationStart;
24
- readonly isAnonymousTelemetryRequired: boolean;
24
+ get isAnonymousTelemetryRequired(): boolean;
25
25
  private updateTelemetryConfig;
26
26
  private initializeConfig;
27
- readonly getTelemetrySessionId: string;
28
- readonly rootOrgId: string;
27
+ get getTelemetrySessionId(): string;
28
+ get rootOrgId(): string;
29
29
  triggerNPSUpdate(data: any): void;
30
30
  start(edata: any, data: any, pageContext?: WsEvents.ITelemetryPageContext): void;
31
31
  end(edata: any, data: any, pageContext?: WsEvents.ITelemetryPageContext): void;
@@ -15,17 +15,17 @@ export declare class UtilityService {
15
15
  currentRouteData: any[];
16
16
  constructor(http: HttpClient, platform: Platform, router: Router, route: ActivatedRoute);
17
17
  private getChildRouteData;
18
- readonly randomId: number;
18
+ get randomId(): number;
19
19
  getJson<T>(url: string): Observable<T>;
20
20
  getLeafNodes<T extends IRecursiveData>(node: T, nodes: T[]): T[];
21
21
  getPath<T extends IRecursiveData>(node: T, id: string): T[];
22
22
  private hasPath;
23
- readonly isMobile: boolean;
24
- readonly isIos: boolean;
25
- readonly isAndroid: boolean;
26
- readonly isAndroidApp: boolean;
27
- readonly iOsAppRef: any;
23
+ get isMobile(): boolean;
24
+ get isIos(): boolean;
25
+ get isAndroid(): boolean;
26
+ get isAndroidApp(): boolean;
27
+ get iOsAppRef(): any;
28
28
  setRouteData(data: any): void;
29
- readonly routeData: WsEvents.ITelemetryPageContext;
29
+ get routeData(): WsEvents.ITelemetryPageContext;
30
30
  }
31
31
  export {};
@@ -1,8 +1,8 @@
1
1
  export declare namespace NsContent {
2
- interface IContinueLearningData extends IContent {
2
+ export interface IContinueLearningData extends IContent {
3
3
  continueData: any;
4
4
  }
5
- interface IContent {
5
+ export interface IContent {
6
6
  platform?: any;
7
7
  addedOn: string;
8
8
  appIcon: string;
@@ -130,7 +130,7 @@ export declare namespace NsContent {
130
130
  optionalReading: boolean;
131
131
  additionalTags?: string[];
132
132
  }
133
- enum EPrimaryCategory {
133
+ export enum EPrimaryCategory {
134
134
  PROGRAM = "Program",
135
135
  COURSE = "Course",
136
136
  MODULE = "Course Unit",
@@ -151,7 +151,7 @@ export declare namespace NsContent {
151
151
  LEARNING_JOURNEY = "Learning Journeys",
152
152
  CHANNEL = "Channel"
153
153
  }
154
- interface IContentMinimal {
154
+ export interface IContentMinimal {
155
155
  appIcon: string;
156
156
  artifactUrl: string;
157
157
  complexityLevel: string;
@@ -172,17 +172,17 @@ export declare namespace NsContent {
172
172
  resourceType?: string;
173
173
  totalRating?: number;
174
174
  }
175
- interface ICollectionHierarchyResponse {
175
+ export interface ICollectionHierarchyResponse {
176
176
  data: IContent;
177
177
  hasMore: boolean;
178
178
  totalContents: number;
179
179
  }
180
- interface IRelatedContentMeta {
180
+ export interface IRelatedContentMeta {
181
181
  identifier: string;
182
182
  name: string;
183
183
  }
184
184
  type TCertificationStatus = 'ongoing' | 'passed' | 'canAttempt' | 'cannotAttempt';
185
- type TLearningMode = 'Self-Paced' | 'Instructor-Led' | 'Open' | 'Closed';
185
+ export type TLearningMode = 'Self-Paced' | 'Instructor-Led' | 'Open' | 'Closed';
186
186
  interface IMarkAsCompleteProgress {
187
187
  progressStatus: 'open' | 'started' | 'completed';
188
188
  showMarkAsComplete: boolean;
@@ -235,28 +235,28 @@ export declare namespace NsContent {
235
235
  skill: string;
236
236
  name: string;
237
237
  }
238
- interface ICreator {
238
+ export interface ICreator {
239
239
  id: string;
240
240
  name: string;
241
241
  email: string;
242
242
  }
243
- interface IContentTopic {
243
+ export interface IContentTopic {
244
244
  identifier: string;
245
245
  name: string;
246
246
  }
247
- interface IContact {
247
+ export interface IContact {
248
248
  id: string;
249
249
  name: string;
250
250
  email: string;
251
251
  }
252
- interface IViewerContinueLearningRequest {
252
+ export interface IViewerContinueLearningRequest {
253
253
  resourceId: string;
254
254
  contextPathId: string;
255
255
  data: string;
256
256
  dateAccessed: number;
257
257
  contextType?: string;
258
258
  }
259
- enum EContentTypes {
259
+ export enum EContentTypes {
260
260
  PROGRAM = "Learning Path",
261
261
  CHANNEL = "Channel",
262
262
  COURSE = "Course",
@@ -266,13 +266,13 @@ export declare namespace NsContent {
266
266
  MODULE = "Collection",
267
267
  RESOURCE = "Resource"
268
268
  }
269
- enum EMiscPlayerSupportedCollectionTypes {
269
+ export enum EMiscPlayerSupportedCollectionTypes {
270
270
  PLAYLIST = "Playlist"
271
271
  }
272
- const PLAYER_SUPPORTED_COLLECTION_TYPES: string[];
273
- const KB_SUPPORTED_CONTENT_TYPES: EContentTypes[];
274
- const PLAYLIST_SUPPORTED_CONTENT_TYPES: EContentTypes[];
275
- enum EMimeTypes {
272
+ export const PLAYER_SUPPORTED_COLLECTION_TYPES: string[];
273
+ export const KB_SUPPORTED_CONTENT_TYPES: EContentTypes[];
274
+ export const PLAYLIST_SUPPORTED_CONTENT_TYPES: EContentTypes[];
275
+ export enum EMimeTypes {
276
276
  COLLECTION = "application/vnd.ekstep.content-collection",
277
277
  HTML = "application/html",
278
278
  ILP_FP = "application/ilpfp",
@@ -301,7 +301,7 @@ export declare namespace NsContent {
301
301
  UNKNOWN = "application/unknown",
302
302
  OFFLINE_SESSION = "application/offline"
303
303
  }
304
- enum EDisplayContentTypes {
304
+ export enum EDisplayContentTypes {
305
305
  ASSESSMENT = "ASSESSMENT",
306
306
  AUDIO = "AUDIO",
307
307
  CERTIFICATION = "CERTIFICATION",
@@ -332,13 +332,14 @@ export declare namespace NsContent {
332
332
  KNOWLEDGE_BOARD = "Knowledge Board",
333
333
  LEARNING_JOURNEY = "Learning Journeys"
334
334
  }
335
- enum EFilterCategory {
335
+ export enum EFilterCategory {
336
336
  ALL = "ALL",
337
337
  LEARN = "LEARN",
338
338
  PRACTICE = "PRACTICE",
339
339
  ASSESS = "ASSESS"
340
340
  }
341
- enum ETagType {
341
+ export enum ETagType {
342
342
  NEWLY_ADDED = "NEWLY ADDED"
343
343
  }
344
+ export {};
344
345
  }
package/package.json CHANGED
@@ -1,21 +1,21 @@
1
1
  {
2
2
  "name": "@sunbird-cb/utils-v2",
3
- "version": "0.0.13",
3
+ "version": "0.0.15-ang-9-12",
4
4
  "main": "bundles/sunbird-cb-utils-v2.umd.js",
5
5
  "dependencies": {
6
- "tslib": "^1.9.0"
6
+ "tslib": "^2.0.0"
7
7
  },
8
8
  "peerDependencies": {
9
- "@angular/animations": "~8.2.1",
10
- "@angular/cdk": "~8.1.2",
11
- "@angular/common": "~8.2.1",
12
- "@angular/compiler": "~8.2.1",
13
- "@angular/core": "~8.2.1",
14
- "@angular/forms": "~8.2.1",
15
- "@angular/material": "^8.1.2",
16
- "@angular/platform-browser": "~8.2.1",
17
- "@angular/platform-browser-dynamic": "~8.2.1",
18
- "@angular/router": "~8.2.1",
9
+ "@angular/animations": "~12.2.17",
10
+ "@angular/cdk": "~12.2.13",
11
+ "@angular/common": "~12.2.17",
12
+ "@angular/compiler": "~12.2.17",
13
+ "@angular/core": "~12.2.17",
14
+ "@angular/forms": "~12.2.17",
15
+ "@angular/material": "^12.2.13",
16
+ "@angular/platform-browser": "~12.2.17",
17
+ "@angular/platform-browser-dynamic": "~12.2.17",
18
+ "@angular/router": "~12.2.17",
19
19
  "ngx-image-cropper": "^3.3.4",
20
20
  "keycloak-angular": "^6.1.0",
21
21
  "@types/lodash": "^4.14.168",
package/public-api.d.ts CHANGED
@@ -85,3 +85,11 @@ export * from './lib/services/widget-content.service';
85
85
  export * from './lib/services/subapplication-respond.service';
86
86
  export * from './lib/services/widget-content.model';
87
87
  export * from './lib/services/widget-resolver.model';
88
+ export * from './lib/directives/class-change-on-scroll/class-change-on-scroll.directive';
89
+ export * from './lib/directives/default-thumbnail/default-thumbnail.directive';
90
+ export * from './lib/directives/image-responsive/image-responsive.directive';
91
+ export * from './lib/directives/in-view-port/in-view-port.directive';
92
+ export * from './lib/directives/navigation/navigation.directive';
93
+ export * from './lib/directives/permission/permission.directive';
94
+ export * from './lib/helpers/horizontal-scroller/horizontal-scroller.component';
95
+ export * from './lib/helpers/horizontal-scroller-v2/horizontal-scroller-v2.component';
@@ -1,9 +1 @@
1
1
  export * from './public-api';
2
- export { ClassChangeOnScrollDirective as ɵa } from './lib/directives/class-change-on-scroll/class-change-on-scroll.directive';
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 { HorizontalScrollerV2Component as ɵh } from './lib/helpers/horizontal-scroller-v2/horizontal-scroller-v2.component';
9
- export { HorizontalScrollerComponent as ɵg } from './lib/helpers/horizontal-scroller/horizontal-scroller.component';