@sunbird-cb/consumption 0.0.1

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 (185) hide show
  1. package/README.md +24 -0
  2. package/bundles/sunbird-cb-consumption.umd.js +8116 -0
  3. package/bundles/sunbird-cb-consumption.umd.js.map +1 -0
  4. package/bundles/sunbird-cb-consumption.umd.min.js +17 -0
  5. package/bundles/sunbird-cb-consumption.umd.min.js.map +1 -0
  6. package/esm2015/lib/_common/cards/card-landscape/card-landscape.component.js +209 -0
  7. package/esm2015/lib/_common/cards/card-portrait/card-portrait.component.js +173 -0
  8. package/esm2015/lib/_common/cards/card-resource/card-resource.component.js +34 -0
  9. package/esm2015/lib/_common/cards/card-user/card-user.component.js +141 -0
  10. package/esm2015/lib/_common/cards/cards.component.js +107 -0
  11. package/esm2015/lib/_common/cards/cards.module.js +47 -0
  12. package/esm2015/lib/_common/competency-passbook/competency-passbook.component.js +324 -0
  13. package/esm2015/lib/_common/competency-passbook/competency-passbook.module.js +27 -0
  14. package/esm2015/lib/_common/competency-passbook/competency-passbook.service.js +52 -0
  15. package/esm2015/lib/_common/content-strip-with-tabs-lib/content-strip-with-tabs-lib.component.js +1594 -0
  16. package/esm2015/lib/_common/content-strip-with-tabs-lib/content-strip-with-tabs-lib.model.js +212 -0
  17. package/esm2015/lib/_common/content-strip-with-tabs-lib/content-strip-with-tabs-lib.module.js +69 -0
  18. package/esm2015/lib/_common/data-points/data-points.component.js +53 -0
  19. package/esm2015/lib/_common/data-points/data-points.module.js +19 -0
  20. package/esm2015/lib/_common/display-content-type-lib/display-content-type-lib.component.js +56 -0
  21. package/esm2015/lib/_common/display-content-type-lib/display-content-type-lib.module.js +18 -0
  22. package/esm2015/lib/_common/horizontal-scroller-v2/horizontal-scroller-v2.component.js +268 -0
  23. package/esm2015/lib/_common/horizontal-scroller-v2/horizontal-scroller-v2.module.js +23 -0
  24. package/esm2015/lib/_common/pills/pills.component.js +49 -0
  25. package/esm2015/lib/_common/pills/pills.module.js +24 -0
  26. package/esm2015/lib/_common/skeleton-loader-lib/skeleton-loader-lib.component.js +40 -0
  27. package/esm2015/lib/_common/skeleton-loader-lib/skeleton-loader-lib.module.js +28 -0
  28. package/esm2015/lib/_common/sliders/sliders.component.js +184 -0
  29. package/esm2015/lib/_common/sliders/sliders.model.js +61 -0
  30. package/esm2015/lib/_common/sliders/sliders.module.js +50 -0
  31. package/esm2015/lib/_constants/misc.constants.js +5 -0
  32. package/esm2015/lib/_directives/default-thumbnail/default-thumbnail.directive.js +52 -0
  33. package/esm2015/lib/_directives/default-thumbnail/default-thumbnail.module.js +19 -0
  34. package/esm2015/lib/_directives/image-responsive/image-responsive.directive.js +127 -0
  35. package/esm2015/lib/_directives/image-responsive/image-responsive.module.js +19 -0
  36. package/esm2015/lib/_directives/navigation/navigation.directive.js +54 -0
  37. package/esm2015/lib/_directives/navigation/navigation.module.js +19 -0
  38. package/esm2015/lib/_models/card-content-v2.model.js +78 -0
  39. package/esm2015/lib/_models/card-content.model.js +69 -0
  40. package/esm2015/lib/_models/card-users.model.js +101 -0
  41. package/esm2015/lib/_models/content-strip-multiple.model.js +195 -0
  42. package/esm2015/lib/_models/event.js +45 -0
  43. package/esm2015/lib/_models/profile-v3.models.js +196 -0
  44. package/esm2015/lib/_models/widget-content.model.js +876 -0
  45. package/esm2015/lib/_models/widget-search.model.js +472 -0
  46. package/esm2015/lib/_models/widget-user.model.js +17 -0
  47. package/esm2015/lib/_pipes/pipe-duration-transform/pipe-duration-transform.module.js +19 -0
  48. package/esm2015/lib/_pipes/pipe-duration-transform/pipe-duration-transform.pipe.js +120 -0
  49. package/esm2015/lib/_pipes/pipe-public-URL/pipe-public-URL.module.js +19 -0
  50. package/esm2015/lib/_pipes/pipe-public-URL/pipe-public-URL.pipe.js +38 -0
  51. package/esm2015/lib/_services/common-methods.service.js +60 -0
  52. package/esm2015/lib/_services/configurations.service.js +243 -0
  53. package/esm2015/lib/_services/multilingual-translations.service.js +228 -0
  54. package/esm2015/lib/_services/viewer-route-util.js +125 -0
  55. package/esm2015/lib/_services/widget-content.service.js +818 -0
  56. package/esm2015/lib/_services/widget-user.service.js +439 -0
  57. package/esm2015/lib/consumption.component.js +26 -0
  58. package/esm2015/lib/consumption.config.js +12 -0
  59. package/esm2015/lib/consumption.module.js +26 -0
  60. package/esm2015/lib/consumption.service.js +18 -0
  61. package/esm2015/lib/registration-lib.config.js +21 -0
  62. package/esm2015/public-api.js +19 -0
  63. package/esm2015/sunbird-cb-consumption.js +41 -0
  64. package/esm5/lib/_common/cards/card-landscape/card-landscape.component.js +222 -0
  65. package/esm5/lib/_common/cards/card-portrait/card-portrait.component.js +182 -0
  66. package/esm5/lib/_common/cards/card-resource/card-resource.component.js +41 -0
  67. package/esm5/lib/_common/cards/card-user/card-user.component.js +147 -0
  68. package/esm5/lib/_common/cards/cards.component.js +127 -0
  69. package/esm5/lib/_common/cards/cards.module.js +51 -0
  70. package/esm5/lib/_common/competency-passbook/competency-passbook.component.js +391 -0
  71. package/esm5/lib/_common/competency-passbook/competency-passbook.module.js +31 -0
  72. package/esm5/lib/_common/competency-passbook/competency-passbook.service.js +59 -0
  73. package/esm5/lib/_common/content-strip-with-tabs-lib/content-strip-with-tabs-lib.component.js +1861 -0
  74. package/esm5/lib/_common/content-strip-with-tabs-lib/content-strip-with-tabs-lib.model.js +212 -0
  75. package/esm5/lib/_common/content-strip-with-tabs-lib/content-strip-with-tabs-lib.module.js +73 -0
  76. package/esm5/lib/_common/data-points/data-points.component.js +62 -0
  77. package/esm5/lib/_common/data-points/data-points.module.js +23 -0
  78. package/esm5/lib/_common/display-content-type-lib/display-content-type-lib.component.js +63 -0
  79. package/esm5/lib/_common/display-content-type-lib/display-content-type-lib.module.js +22 -0
  80. package/esm5/lib/_common/horizontal-scroller-v2/horizontal-scroller-v2.component.js +300 -0
  81. package/esm5/lib/_common/horizontal-scroller-v2/horizontal-scroller-v2.module.js +27 -0
  82. package/esm5/lib/_common/pills/pills.component.js +58 -0
  83. package/esm5/lib/_common/pills/pills.module.js +28 -0
  84. package/esm5/lib/_common/skeleton-loader-lib/skeleton-loader-lib.component.js +45 -0
  85. package/esm5/lib/_common/skeleton-loader-lib/skeleton-loader-lib.module.js +32 -0
  86. package/esm5/lib/_common/sliders/sliders.component.js +211 -0
  87. package/esm5/lib/_common/sliders/sliders.model.js +61 -0
  88. package/esm5/lib/_common/sliders/sliders.module.js +67 -0
  89. package/esm5/lib/_constants/misc.constants.js +5 -0
  90. package/esm5/lib/_directives/default-thumbnail/default-thumbnail.directive.js +60 -0
  91. package/esm5/lib/_directives/default-thumbnail/default-thumbnail.module.js +23 -0
  92. package/esm5/lib/_directives/image-responsive/image-responsive.directive.js +137 -0
  93. package/esm5/lib/_directives/image-responsive/image-responsive.module.js +23 -0
  94. package/esm5/lib/_directives/navigation/navigation.directive.js +63 -0
  95. package/esm5/lib/_directives/navigation/navigation.module.js +23 -0
  96. package/esm5/lib/_models/card-content-v2.model.js +78 -0
  97. package/esm5/lib/_models/card-content.model.js +69 -0
  98. package/esm5/lib/_models/card-users.model.js +101 -0
  99. package/esm5/lib/_models/content-strip-multiple.model.js +195 -0
  100. package/esm5/lib/_models/event.js +45 -0
  101. package/esm5/lib/_models/profile-v3.models.js +196 -0
  102. package/esm5/lib/_models/widget-content.model.js +876 -0
  103. package/esm5/lib/_models/widget-search.model.js +472 -0
  104. package/esm5/lib/_models/widget-user.model.js +17 -0
  105. package/esm5/lib/_pipes/pipe-duration-transform/pipe-duration-transform.module.js +23 -0
  106. package/esm5/lib/_pipes/pipe-duration-transform/pipe-duration-transform.pipe.js +143 -0
  107. package/esm5/lib/_pipes/pipe-public-URL/pipe-public-URL.module.js +23 -0
  108. package/esm5/lib/_pipes/pipe-public-URL/pipe-public-URL.pipe.js +41 -0
  109. package/esm5/lib/_services/common-methods.service.js +73 -0
  110. package/esm5/lib/_services/configurations.service.js +257 -0
  111. package/esm5/lib/_services/multilingual-translations.service.js +256 -0
  112. package/esm5/lib/_services/viewer-route-util.js +127 -0
  113. package/esm5/lib/_services/widget-content.service.js +1062 -0
  114. package/esm5/lib/_services/widget-user.service.js +501 -0
  115. package/esm5/lib/consumption.component.js +28 -0
  116. package/esm5/lib/consumption.config.js +12 -0
  117. package/esm5/lib/consumption.module.js +30 -0
  118. package/esm5/lib/consumption.service.js +21 -0
  119. package/esm5/lib/registration-lib.config.js +21 -0
  120. package/esm5/public-api.js +19 -0
  121. package/esm5/sunbird-cb-consumption.js +41 -0
  122. package/fesm2015/sunbird-cb-consumption.js +6940 -0
  123. package/fesm2015/sunbird-cb-consumption.js.map +1 -0
  124. package/fesm5/sunbird-cb-consumption.js +7871 -0
  125. package/fesm5/sunbird-cb-consumption.js.map +1 -0
  126. package/lib/_common/cards/card-landscape/card-landscape.component.d.ts +35 -0
  127. package/lib/_common/cards/card-portrait/card-portrait.component.d.ts +31 -0
  128. package/lib/_common/cards/card-resource/card-resource.component.d.ts +8 -0
  129. package/lib/_common/cards/card-user/card-user.component.d.ts +24 -0
  130. package/lib/_common/cards/cards.component.d.ts +20 -0
  131. package/lib/_common/cards/cards.module.d.ts +2 -0
  132. package/lib/_common/competency-passbook/competency-passbook.component.d.ts +36 -0
  133. package/lib/_common/competency-passbook/competency-passbook.module.d.ts +2 -0
  134. package/lib/_common/competency-passbook/competency-passbook.service.d.ts +8 -0
  135. package/lib/_common/content-strip-with-tabs-lib/content-strip-with-tabs-lib.component.d.ts +174 -0
  136. package/lib/_common/content-strip-with-tabs-lib/content-strip-with-tabs-lib.model.d.ts +131 -0
  137. package/lib/_common/content-strip-with-tabs-lib/content-strip-with-tabs-lib.module.d.ts +5 -0
  138. package/lib/_common/data-points/data-points.component.d.ts +9 -0
  139. package/lib/_common/data-points/data-points.module.d.ts +2 -0
  140. package/lib/_common/display-content-type-lib/display-content-type-lib.component.d.ts +11 -0
  141. package/lib/_common/display-content-type-lib/display-content-type-lib.module.d.ts +2 -0
  142. package/lib/_common/horizontal-scroller-v2/horizontal-scroller-v2.component.d.ts +31 -0
  143. package/lib/_common/horizontal-scroller-v2/horizontal-scroller-v2.module.d.ts +2 -0
  144. package/lib/_common/pills/pills.component.d.ts +10 -0
  145. package/lib/_common/pills/pills.module.d.ts +2 -0
  146. package/lib/_common/skeleton-loader-lib/skeleton-loader-lib.component.d.ts +8 -0
  147. package/lib/_common/skeleton-loader-lib/skeleton-loader-lib.module.d.ts +2 -0
  148. package/lib/_common/sliders/sliders.component.d.ts +26 -0
  149. package/lib/_common/sliders/sliders.model.d.ts +34 -0
  150. package/lib/_common/sliders/sliders.module.d.ts +6 -0
  151. package/lib/_constants/misc.constants.d.ts +2 -0
  152. package/lib/_directives/default-thumbnail/default-thumbnail.directive.d.ts +9 -0
  153. package/lib/_directives/default-thumbnail/default-thumbnail.module.d.ts +2 -0
  154. package/lib/_directives/image-responsive/image-responsive.directive.d.ts +17 -0
  155. package/lib/_directives/image-responsive/image-responsive.module.d.ts +2 -0
  156. package/lib/_directives/navigation/navigation.directive.d.ts +9 -0
  157. package/lib/_directives/navigation/navigation.module.d.ts +2 -0
  158. package/lib/_models/card-content-v2.model.d.ts +44 -0
  159. package/lib/_models/card-content.model.d.ts +41 -0
  160. package/lib/_models/card-users.model.d.ts +49 -0
  161. package/lib/_models/content-strip-multiple.model.d.ts +128 -0
  162. package/lib/_models/event.d.ts +18 -0
  163. package/lib/_models/profile-v3.models.d.ts +91 -0
  164. package/lib/_models/widget-content.model.d.ts +497 -0
  165. package/lib/_models/widget-search.model.d.ts +252 -0
  166. package/lib/_models/widget-user.model.d.ts +5 -0
  167. package/lib/_pipes/pipe-duration-transform/pipe-duration-transform.module.d.ts +2 -0
  168. package/lib/_pipes/pipe-duration-transform/pipe-duration-transform.pipe.d.ts +6 -0
  169. package/lib/_pipes/pipe-public-URL/pipe-public-URL.module.d.ts +2 -0
  170. package/lib/_pipes/pipe-public-URL/pipe-public-URL.pipe.d.ts +6 -0
  171. package/lib/_services/common-methods.service.d.ts +37 -0
  172. package/lib/_services/configurations.service.d.ts +71 -0
  173. package/lib/_services/multilingual-translations.service.d.ts +20 -0
  174. package/lib/_services/viewer-route-util.d.ts +8 -0
  175. package/lib/_services/widget-content.service.d.ts +82 -0
  176. package/lib/_services/widget-user.service.d.ts +31 -0
  177. package/lib/consumption.component.d.ts +5 -0
  178. package/lib/consumption.config.d.ts +6 -0
  179. package/lib/consumption.module.d.ts +2 -0
  180. package/lib/consumption.service.d.ts +3 -0
  181. package/lib/registration-lib.config.d.ts +4 -0
  182. package/package.json +23 -0
  183. package/public-api.d.ts +11 -0
  184. package/sunbird-cb-consumption.d.ts +36 -0
  185. package/sunbird-cb-consumption.metadata.json +1 -0
@@ -0,0 +1,252 @@
1
+ import { NsContent } from './widget-content.model';
2
+ export declare namespace NSSearch {
3
+ interface IFeatureSearchConfig {
4
+ tabs: IConfigContentStrip[];
5
+ }
6
+ interface IFilterSearchRequest {
7
+ contentType?: NsContent.EContentTypes[];
8
+ creatorContacts?: string[];
9
+ labels?: string[];
10
+ resourceCategory?: string[];
11
+ catalogPaths?: string[];
12
+ }
13
+ interface ISearchRequest {
14
+ filters?: IFilterSearchRequest;
15
+ query?: string;
16
+ isStandAlone?: boolean;
17
+ instanceCatalog?: boolean;
18
+ locale?: string[];
19
+ pageNo?: number;
20
+ pageSize?: number;
21
+ uuid?: string;
22
+ rootOrg?: string;
23
+ sort?: {
24
+ [key: string]: string;
25
+ }[];
26
+ }
27
+ interface ISearchOrgRegionRecommendationRequest extends ISearchRequest {
28
+ defaultLabel?: string;
29
+ preLabelValue?: string;
30
+ }
31
+ interface ISearchV6Request {
32
+ visibleFilters?: ISearchV6VisibleFilters;
33
+ excludeSourceFields?: string[];
34
+ includeSourceFields?: string[];
35
+ sort?: ISearchSort[];
36
+ query: string;
37
+ sourceFields?: string[];
38
+ locale?: string[];
39
+ pageNo?: number;
40
+ pageSize?: number;
41
+ filters?: ISearchV6Filters[];
42
+ isStandAlone?: boolean;
43
+ didYouMean?: boolean;
44
+ request?: ISearchV6Request;
45
+ }
46
+ interface ISearchV6RequestV2 {
47
+ request: {
48
+ filters: {
49
+ primaryCategory: any;
50
+ };
51
+ query: string;
52
+ sort_by: {
53
+ lastUpdatedOn: string;
54
+ };
55
+ fields: string[];
56
+ facets: string[];
57
+ fuzzy?: false;
58
+ };
59
+ }
60
+ interface ISearchV6RequestV3 {
61
+ request: {
62
+ secureSettings?: boolean;
63
+ filters: {
64
+ primaryCategory?: string[];
65
+ courseCategory?: string[];
66
+ contentType?: string[];
67
+ status: string[];
68
+ organisation?: any;
69
+ 'secureSettings.isVerifiedKarmayogi'?: string;
70
+ 'secureSettings.organisation'?: string;
71
+ };
72
+ query: string;
73
+ sort_by: {
74
+ lastUpdatedOn: string;
75
+ };
76
+ facets: string[];
77
+ limit: number;
78
+ };
79
+ }
80
+ interface ISearchSort {
81
+ [key: string]: 'asc' | 'desc';
82
+ }
83
+ interface ISearchV6VisibleFilters {
84
+ [key: string]: {
85
+ displayName: string;
86
+ order?: {
87
+ [key: string]: 'asc' | 'desc';
88
+ }[];
89
+ };
90
+ }
91
+ interface ISearchV6Filters {
92
+ andFilters?: {
93
+ [key: string]: string[];
94
+ }[];
95
+ notFilters?: {
96
+ [key: string]: string[];
97
+ }[];
98
+ }
99
+ interface ISearchRedirection {
100
+ f?: {
101
+ [index: string]: string[];
102
+ };
103
+ q?: string;
104
+ tab?: string;
105
+ }
106
+ interface IConfigContentStrip {
107
+ titleKey?: string;
108
+ title?: string;
109
+ reqRoles?: string[];
110
+ reqFeatures?: string[];
111
+ searchRedirection?: ISearchRedirection;
112
+ searchQuery?: ISearchRequest;
113
+ contentIds?: string[];
114
+ }
115
+ interface ISearchApiResult {
116
+ totalHits: number;
117
+ result: NsContent.IContent[];
118
+ filters: IFilterUnitResponse[];
119
+ notToBeShownFilters?: IFilterUnitResponse[];
120
+ filtersUsed: string[];
121
+ }
122
+ interface ISearchV6ApiResult {
123
+ totalHits: number;
124
+ result: NsContent.IContent[];
125
+ filtersUsed: string[];
126
+ notVisibleFilters: string[];
127
+ filters: IFilterUnitResponse[];
128
+ queryUsed?: string;
129
+ doYouMean?: string;
130
+ }
131
+ interface IFilterUnitResponse {
132
+ id?: string;
133
+ type: string;
134
+ displayName: string;
135
+ content: IFilterUnitContent[];
136
+ }
137
+ interface IFilterUnitContent {
138
+ type?: string;
139
+ id?: string;
140
+ displayName: string;
141
+ count: number;
142
+ children?: IFilterUnitContent[];
143
+ }
144
+ interface ITypeUnitResponse {
145
+ displayName: string;
146
+ type: string;
147
+ count: string;
148
+ }
149
+ interface ISearchV6ApiResultV2 {
150
+ totalHits: number;
151
+ id: string;
152
+ ver: string;
153
+ ts: string;
154
+ params: IParamsContent;
155
+ responseCode: string;
156
+ result: ISearchData;
157
+ filters: IFilterUnitResponse[];
158
+ api: string;
159
+ }
160
+ interface IFacet {
161
+ displayName: string;
162
+ type: string;
163
+ content: IContentFilter[];
164
+ }
165
+ interface IContentFilter {
166
+ displayName: string;
167
+ type: string;
168
+ count: number;
169
+ id: string;
170
+ }
171
+ interface ISearchData {
172
+ count: number;
173
+ content: NsContent.IContent[];
174
+ facets: IFacetsData[];
175
+ }
176
+ interface IFacetsData {
177
+ values: IFacetsValues[];
178
+ name: string;
179
+ }
180
+ interface IFacetsValues {
181
+ name: string;
182
+ count: number;
183
+ }
184
+ interface ISearchContentData {
185
+ ownershipType: string[];
186
+ parent: string;
187
+ code: string;
188
+ credentials: {
189
+ enabled: string;
190
+ };
191
+ channel: string;
192
+ downloadUrl: string;
193
+ language: string[];
194
+ mimeType: string;
195
+ variants: IVariantsData;
196
+ idealScreenSize: string;
197
+ leafNodes: string[];
198
+ createdOn: string;
199
+ objectType: string;
200
+ primaryCategory: string;
201
+ children: string[];
202
+ contentDisposition: string;
203
+ lastUpdatedOn: string;
204
+ contentEncoding: string;
205
+ contentType: string;
206
+ dialcodeRequired: string;
207
+ trackable: {
208
+ enabled: string;
209
+ autoBatch: string;
210
+ };
211
+ identifier: string;
212
+ lastStatusChangedOn: string;
213
+ audience: string[];
214
+ os: string[];
215
+ visibility: string;
216
+ index: number;
217
+ mediaType: string;
218
+ osId: string;
219
+ languageCode: string[];
220
+ graph_id: string;
221
+ nodeType: string;
222
+ version: number;
223
+ pkgVersion: number;
224
+ versionKey: string;
225
+ license: string;
226
+ idealScreenDensity: string;
227
+ depth: number;
228
+ lastPublishedOn: string;
229
+ compatibilityLevel: number;
230
+ leafNodesCount: number;
231
+ name: string;
232
+ status: string;
233
+ node_id: number;
234
+ }
235
+ interface IVariantsData {
236
+ online: {
237
+ ecarUrl: string;
238
+ size: number;
239
+ };
240
+ spine: {
241
+ ecarUrl: string;
242
+ size: number;
243
+ };
244
+ }
245
+ interface IParamsContent {
246
+ resmsgid: string;
247
+ msgid: string;
248
+ status: string;
249
+ err: string;
250
+ errmsg: string;
251
+ }
252
+ }
@@ -0,0 +1,5 @@
1
+ export interface IUserGroupDetails {
2
+ group_id: number;
3
+ friendly_name: string;
4
+ description: string;
5
+ }
@@ -0,0 +1,2 @@
1
+ export declare class PipeDurationTransformModule {
2
+ }
@@ -0,0 +1,6 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ export declare class PipeDurationTransformPipe implements PipeTransform {
3
+ transform(data: number, type: 'time24' | 'hms' | 'hour' | 'hms2H' | 'hms2M' | 'day'): any;
4
+ defaultDuration(h: number, m: number, s: number): string;
5
+ hmsCalculation(h: number, m: number, s: number, dur: string, type: string): string;
6
+ }
@@ -0,0 +1,2 @@
1
+ export declare class PipePublicURLModule {
2
+ }
@@ -0,0 +1,6 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ export declare class PipePublicURL implements PipeTransform {
3
+ environment: any;
4
+ constructor(environment: any);
5
+ transform(value: string): any;
6
+ }
@@ -0,0 +1,37 @@
1
+ import { NsContent } from '../_models/widget-content.model';
2
+ import { NsContentStripWithTabs } from '../_common/content-strip-with-tabs-lib/content-strip-with-tabs-lib.model';
3
+ export declare class CommonMethodsService {
4
+ constructor();
5
+ transformContentsToWidgets(contents: NsContent.IContent[], strip: NsContentStripWithTabs.IContentStripUnit): ({
6
+ widgetType: string;
7
+ widgetSubType: string;
8
+ widgetHostClass: string;
9
+ widgetData: {
10
+ cardSubType: "" | "standard" | "minimal" | "space-saving" | "card-user-details" | "basic-info" | "basic-details" | "card-description-back" | "network-card" | "user-card";
11
+ cardCustomeClass: string;
12
+ context: {
13
+ pageSection: string;
14
+ position: number;
15
+ };
16
+ intranetMode: "" | "hide" | "greyOut";
17
+ deletedMode: "" | "hide" | "greyOut";
18
+ contentTags: NsContentStripWithTabs.IContentTags;
19
+ batch: any;
20
+ content: NsContent.IContent;
21
+ };
22
+ } | {
23
+ widgetType: string;
24
+ widgetSubType: string;
25
+ widgetHostClass: string;
26
+ widgetData: {};
27
+ })[];
28
+ transformSkeletonToWidgets(strip: any): {
29
+ widgetType: string;
30
+ widgetSubType: string;
31
+ widgetHostClass: string;
32
+ widgetData: {
33
+ cardSubType: any;
34
+ cardCustomeClass: any;
35
+ };
36
+ }[];
37
+ }
@@ -0,0 +1,71 @@
1
+ import { BehaviorSubject, ReplaySubject, Subject } from 'rxjs';
2
+ import { IPortalUrls, IUserPreference, NsAppsConfig, NsInstanceConfig, NsPage, NsUser } from '@sunbird-cb/utils';
3
+ import { NSProfileDataV3 } from '../_models/profile-v3.models';
4
+ export declare class ConfigurationsService {
5
+ constructor();
6
+ appSetup: boolean;
7
+ userUrl: string;
8
+ baseUrl: string;
9
+ sitePath: string;
10
+ hostPath: string;
11
+ userRoles: Set<string> | null;
12
+ userGroups: Set<string> | null;
13
+ restrictedFeatures: Set<string> | null;
14
+ restrictedWidgets: Set<string> | null;
15
+ instanceConfig: NsInstanceConfig.IConfig | null;
16
+ appsConfig: NsAppsConfig.IAppsConfig | null;
17
+ rootOrg: string | null;
18
+ courseContentPath?: string;
19
+ org: string[] | null;
20
+ activeOrg: string | null;
21
+ isProduction: boolean;
22
+ hasAcceptedTnc: boolean;
23
+ profileDetailsStatus: boolean;
24
+ isActive: boolean;
25
+ userPreference: IUserPreference | null;
26
+ userProfile: NsUser.IUserProfile | null;
27
+ userProfileV2: NsUser.IUserProfile | null;
28
+ nodebbUserProfile: NsUser.INodebbUserProfile | null;
29
+ unMappedUser: any;
30
+ isAuthenticated: boolean;
31
+ isNewUser: boolean;
32
+ portalUrls: IPortalUrls | undefined;
33
+ positions: any;
34
+ overrideThemeChanges: any;
35
+ profileTimelyNudges: any;
36
+ pinnedApps: BehaviorSubject<Set<string>>;
37
+ prefChangeNotifier: ReplaySubject<Partial<IUserPreference>>;
38
+ tourGuideNotifier: ReplaySubject<boolean>;
39
+ authChangeNotifier: ReplaySubject<boolean>;
40
+ private updateProfile;
41
+ updateProfileObservable: import("rxjs").Observable<boolean>;
42
+ updateTourGuide: BehaviorSubject<boolean>;
43
+ updateTourGuideObservable: import("rxjs").Observable<boolean>;
44
+ updatePlatformRating: BehaviorSubject<{
45
+ bottom: string;
46
+ }>;
47
+ updatePlatformRatingObservable$: import("rxjs").Observable<{
48
+ bottom: string;
49
+ }>;
50
+ languageTranslationFlag: Subject<unknown>;
51
+ activeThemeObject: NsInstanceConfig.ITheme | null;
52
+ activeFontObject: NsInstanceConfig.IFontSize | null;
53
+ isDarkMode: boolean;
54
+ isIntranetAllowed: boolean;
55
+ isRTL: boolean;
56
+ activeLocale: NsInstanceConfig.ILocalsConfig | null;
57
+ activeLocaleGroup: string;
58
+ completedActivity: string[] | null;
59
+ completedTour: boolean;
60
+ profileSettings: string[];
61
+ primaryNavBar: Partial<NsPage.INavBackground>;
62
+ pageNavBar: Partial<NsPage.INavBackground>;
63
+ primaryNavBarConfig: NsInstanceConfig.IPrimaryNavbarConfig | null;
64
+ welcomeTabs: NSProfileDataV3.IProfileTab | null;
65
+ cstoken: string;
66
+ changeNavBarFullView: Subject<unknown>;
67
+ openExploreMenuForMWeb: Subject<unknown>;
68
+ updateGlobalProfile(state: boolean): void;
69
+ updateTourGuideMethod(state: boolean): void;
70
+ updatePlatformRatingMethod(state: any): void;
71
+ }
@@ -0,0 +1,20 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { TranslateService } from '@ngx-translate/core';
3
+ import { BehaviorSubject } from 'rxjs';
4
+ import { ConfigurationsService } from './configurations.service';
5
+ export declare class MultilingualTranslationsService {
6
+ private translate;
7
+ private http;
8
+ private configSvc;
9
+ selectedLang: string;
10
+ languageSelected: BehaviorSubject<boolean>;
11
+ languageSelectedObservable: import("rxjs").Observable<boolean>;
12
+ editProfileDetails: string;
13
+ constructor(translate: TranslateService, http: HttpClient, configSvc: ConfigurationsService);
14
+ getLanguage(): void;
15
+ translateLabelWithoutspace(label: string, type: any, subtype: any): any;
16
+ translateLabel(label: string, type: any, subtype: any): any;
17
+ translateActualLabel(label: string, type: any, subtype: any): any;
18
+ editProfileDetailsAPI(data: any): import("rxjs").Observable<any>;
19
+ updatelanguageSelected(state: any, lang: any, userid: any): void;
20
+ }
@@ -0,0 +1,8 @@
1
+ import { NsContent } from '../_models/widget-content.model';
2
+ export declare const VIEWER_ROUTE_FROM_MIME: (mimeType: NsContent.EMimeTypes) => "audio" | "html" | "video" | "audio-native" | "certification" | "mobile/html" | "youtube" | "survey" | "iap" | "ilp-fp" | "pdf" | "web-module" | "class-diagram" | "hands-on" | "rdbms-hands-on" | "html-picker" | "quiz" | "practice" | "resource-collection" | "offline-session";
3
+ export declare function viewerRouteGenerator(id: string, mimeType: NsContent.EMimeTypes, collectionId?: string, collectionType?: string, forPreview?: boolean, primaryCategory?: string, batchId?: string, courseName?: string): {
4
+ url: string;
5
+ queryParams: {
6
+ [key: string]: any;
7
+ };
8
+ };
@@ -0,0 +1,82 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { ConfigurationsService } from '@sunbird-cb/utils';
3
+ import { Observable, BehaviorSubject } from 'rxjs';
4
+ import { NsContentStripMultiple } from '../_models/content-strip-multiple.model';
5
+ import { NsContent } from '../_models/widget-content.model';
6
+ import { NSSearch } from '../_models/widget-search.model';
7
+ export declare class WidgetContentService {
8
+ private http;
9
+ private configSvc;
10
+ constructor(http: HttpClient, configSvc: ConfigurationsService);
11
+ tocConfigData: any;
12
+ tocConfigData$: any;
13
+ currentMetaData: NsContent.IContent;
14
+ currentContentReadMetaData: NsContent.IContent;
15
+ currentBatchEnrollmentList: NsContent.ICourse[];
16
+ programChildCourseResumeData: BehaviorSubject<any>;
17
+ programChildCourseResumeData$: Observable<any>;
18
+ isResource(primaryCategory: string): boolean;
19
+ fetchMarkAsCompleteMeta(identifier: string): Promise<any>;
20
+ updateTocConfig(data: any): void;
21
+ fetchContent(contentId: string, hierarchyType?: 'all' | 'minimal' | 'detail', _additionalFields?: string[], primaryCategory?: string | null): Observable<NsContent.IContent>;
22
+ fetchAuthoringContent(contentId: string): Observable<NsContent.IContent>;
23
+ fetchMultipleContent(ids: string[]): Observable<NsContent.IContent[]>;
24
+ fetchCollectionHierarchy(type: string, id: string, pageNumber?: number, pageSize?: number): Observable<NsContent.ICollectionHierarchyResponse>;
25
+ fetchBlendedCourse(): void;
26
+ fetchCourseBatches(req: any): Observable<NsContent.IBatchListResponse>;
27
+ fetchCourseBatch(batchId: string): Observable<NsContent.IContinueLearningData>;
28
+ autoAssignBatchApi(identifier: any): Observable<NsContent.IBatchListResponse>;
29
+ autoAssignCuratedBatchApi(request: any, programType: any): Observable<NsContent.IBatchListResponse>;
30
+ enrollUserToBatch(req: any): Promise<Object>;
31
+ enrollAndUnenrollUserToBatchWF(req: any, type: any): Promise<Object>;
32
+ fetchBlendedUserWF(req: any): Promise<Object>;
33
+ fetchBlendedUserCOUNT(req: any): Promise<Object>;
34
+ fetchContentLikes(contentIds: {
35
+ content_id: string[];
36
+ }): Promise<{
37
+ [identifier: string]: number;
38
+ }>;
39
+ fetchContentRatings(contentIds: {
40
+ contentIds: string[];
41
+ }): Promise<unknown>;
42
+ fetchContentHistory(contentId: string): Observable<NsContent.IContinueLearningData>;
43
+ fetchContentHistoryV2(req: NsContent.IContinueLearningDataReq): Observable<NsContent.IContinueLearningData>;
44
+ continueLearning(id: string, collectionId?: string, collectionType?: string): Promise<any>;
45
+ saveContinueLearning(content: NsContent.IViewerContinueLearningRequest): Observable<any>;
46
+ setS3Cookie(_contentId: string): Observable<any>;
47
+ setS3ImageCookie(): Observable<any>;
48
+ fetchManifest(url: string): Observable<any>;
49
+ fetchWebModuleContent(url: string): Observable<any>;
50
+ search(req: NSSearch.ISearchRequest): Observable<NSSearch.ISearchApiResult>;
51
+ searchRegionRecommendation(req: NSSearch.ISearchOrgRegionRecommendationRequest): Observable<NsContentStripMultiple.IContentStripResponseApi>;
52
+ searchV6(req: NSSearch.ISearchV6Request): Observable<NSSearch.ISearchV6ApiResultV2>;
53
+ searchRelatedCBPV6(req: NSSearch.ISearchV6RequestV2): Observable<NSSearch.ISearchV6ApiResultV2>;
54
+ fetchContentRating(contentId: string): Observable<{
55
+ rating: number;
56
+ }>;
57
+ deleteContentRating(contentId: string): Observable<any>;
58
+ addContentRating(contentId: string, data: {
59
+ rating: number;
60
+ }): Observable<any>;
61
+ getFirstChildInHierarchy(content: NsContent.IContent): NsContent.IContent;
62
+ getRegistrationStatus(source: string): Promise<{
63
+ hasAccess: boolean;
64
+ registrationUrl?: string;
65
+ }>;
66
+ fetchConfig(url: string): Observable<any>;
67
+ addCertTemplate(body: any): Observable<any>;
68
+ issueCert(body: any): Observable<any>;
69
+ downloadCert(certId: any): Observable<any>;
70
+ trendingContentSearch(req: any): Observable<NsContent.IContent>;
71
+ getKarmaPoitns(limit: number, offset: any): Observable<boolean | Object>;
72
+ fetchProgramContent(contentId: string[]): Observable<NsContent.IContent[]>;
73
+ getCourseKarmaPoints(request: any): Observable<any>;
74
+ claimKarmapoints(request: any): Observable<any>;
75
+ userKarmaPoints(): Observable<any>;
76
+ getEnrolledData(doId: string): any;
77
+ getResourseLink(content: any): Promise<any>;
78
+ checkForDataToFormUrl(content: any, enrollData: any): Promise<any>;
79
+ getResourseDataWithData(content: any, resourseId: any, mimeType: any): any;
80
+ gotoTocPage(content: any): any;
81
+ isBatchInProgress(batchData: any): boolean;
82
+ }
@@ -0,0 +1,31 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { Observable } from 'rxjs';
3
+ import { IUserGroupDetails } from '../_models/widget-user.model';
4
+ import { NsContent } from '../_models/widget-content.model';
5
+ export declare class WidgetUserService {
6
+ private http;
7
+ environment: any;
8
+ constructor(environment: any, http: HttpClient);
9
+ handleError(error: ErrorEvent): Observable<never>;
10
+ fetchUserGroupDetails(userId: string): Observable<IUserGroupDetails[]>;
11
+ fetchUserBatchList(userId: string | undefined, queryParams?: {
12
+ orgdetails: any;
13
+ licenseDetails: any;
14
+ fields: any;
15
+ batchDetails: any;
16
+ }): Observable<NsContent.ICourse[]>;
17
+ fetchProfileUserBatchList(userId: string | undefined, queryParams?: {
18
+ orgdetails: any;
19
+ licenseDetails: any;
20
+ fields: any;
21
+ batchDetails: any;
22
+ }): Observable<NsContent.ICourse[]>;
23
+ checkStorageData(key: any, dataKey: any): boolean;
24
+ getData(key: any): Observable<any>;
25
+ getSavedData(key: any): Observable<any>;
26
+ setTime(key: any): void;
27
+ resetTime(key: any): void;
28
+ fetchCbpPlanList(): any;
29
+ mapData(data: any): Promise<any>;
30
+ mapEnrollmentData(courseData: any): void;
31
+ }
@@ -0,0 +1,5 @@
1
+ import { OnInit } from '@angular/core';
2
+ export declare class ConsumptionComponent implements OnInit {
3
+ constructor();
4
+ ngOnInit(): void;
5
+ }
@@ -0,0 +1,6 @@
1
+ export declare const ROOT_WIDGET_CONFIG: {
2
+ card: {
3
+ _type: string;
4
+ cardResource: string;
5
+ };
6
+ };
@@ -0,0 +1,2 @@
1
+ export declare class ConsumptionModule {
2
+ }
@@ -0,0 +1,3 @@
1
+ export declare class ConsumptionService {
2
+ constructor();
3
+ }
@@ -0,0 +1,4 @@
1
+ import { NsWidgetResolver } from '@sunbird-cb/resolver';
2
+ import { CardsModule } from './_common/cards/cards.module';
3
+ export declare const WIDGET_REGISTERED_LIB_MODULES: (typeof CardsModule)[];
4
+ export declare const WIDGET_REGISTRATION_LIB_CONFIG: NsWidgetResolver.IRegistrationConfig[];
package/package.json ADDED
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "@sunbird-cb/consumption",
3
+ "version": "0.0.1",
4
+ "peerDependencies": {
5
+ "@angular/common": "^8.2.14",
6
+ "@angular/core": "^8.2.14",
7
+ "@sunbird-cb/design-system": "0.0.2",
8
+ "@sunbird-cb/utils": "^1.0.16"
9
+ },
10
+ "main": "bundles/sunbird-cb-consumption.umd.js",
11
+ "module": "fesm5/sunbird-cb-consumption.js",
12
+ "es2015": "fesm2015/sunbird-cb-consumption.js",
13
+ "esm5": "esm5/sunbird-cb-consumption.js",
14
+ "esm2015": "esm2015/sunbird-cb-consumption.js",
15
+ "fesm5": "fesm5/sunbird-cb-consumption.js",
16
+ "fesm2015": "fesm2015/sunbird-cb-consumption.js",
17
+ "typings": "sunbird-cb-consumption.d.ts",
18
+ "metadata": "sunbird-cb-consumption.metadata.json",
19
+ "sideEffects": false,
20
+ "dependencies": {
21
+ "tslib": "^1.9.0"
22
+ }
23
+ }
@@ -0,0 +1,11 @@
1
+ export * from './lib/consumption.service';
2
+ export * from './lib/consumption.component';
3
+ export * from './lib/consumption.module';
4
+ export * from './lib/registration-lib.config';
5
+ export * from './lib/consumption.config';
6
+ export * from './lib/_common/content-strip-with-tabs-lib/content-strip-with-tabs-lib.module';
7
+ export * from './lib/_common/sliders/sliders.module';
8
+ export * from './lib/_common/data-points/data-points.module';
9
+ export * from './lib/_common/cards/cards.module';
10
+ export * from './lib/_common/competency-passbook/competency-passbook.module';
11
+ export * from './lib/_services/common-methods.service';
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './public-api';
5
+ export { CardLandscapeComponent as ɵr } from './lib/_common/cards/card-landscape/card-landscape.component';
6
+ export { CardPortraitComponent as ɵp } from './lib/_common/cards/card-portrait/card-portrait.component';
7
+ export { CardResourceComponent as ɵn } from './lib/_common/cards/card-resource/card-resource.component';
8
+ export { CardUserComponent as ɵq } from './lib/_common/cards/card-user/card-user.component';
9
+ export { CardsComponent as ɵo } from './lib/_common/cards/cards.component';
10
+ export { CompetencyPassbookComponent as ɵbc } from './lib/_common/competency-passbook/competency-passbook.component';
11
+ export { CompetencyPassbookService as ɵbd } from './lib/_common/competency-passbook/competency-passbook.service';
12
+ export { ContentStripWithTabsLibComponent as ɵa } from './lib/_common/content-strip-with-tabs-lib/content-strip-with-tabs-lib.component';
13
+ export { DataPointsComponent as ɵm } from './lib/_common/data-points/data-points.component';
14
+ export { DisplayContentTypeLibComponent as ɵv } from './lib/_common/display-content-type-lib/display-content-type-lib.component';
15
+ export { DisplayContentTypeLibModule as ɵu } from './lib/_common/display-content-type-lib/display-content-type-lib.module';
16
+ export { HorizontalScrollerV2Component as ɵg } from './lib/_common/horizontal-scroller-v2/horizontal-scroller-v2.component';
17
+ export { HorizontalScrollerV2Module as ɵf } from './lib/_common/horizontal-scroller-v2/horizontal-scroller-v2.module';
18
+ export { PillsComponent as ɵbf } from './lib/_common/pills/pills.component';
19
+ export { PillsModule as ɵbe } from './lib/_common/pills/pills.module';
20
+ export { SkeletonLoaderLibComponent as ɵbb } from './lib/_common/skeleton-loader-lib/skeleton-loader-lib.component';
21
+ export { SkeletonLoaderLibModule as ɵba } from './lib/_common/skeleton-loader-lib/skeleton-loader-lib.module';
22
+ export { SlidersLibComponent as ɵh } from './lib/_common/sliders/sliders.component';
23
+ export { DefaultThumbnailDirective as ɵx } from './lib/_directives/default-thumbnail/default-thumbnail.directive';
24
+ export { DefaultThumbnailModule as ɵw } from './lib/_directives/default-thumbnail/default-thumbnail.module';
25
+ export { ImageResponsiveDirective as ɵl } from './lib/_directives/image-responsive/image-responsive.directive';
26
+ export { ImageResponsiveModule as ɵk } from './lib/_directives/image-responsive/image-responsive.module';
27
+ export { NavigationDirective as ɵj } from './lib/_directives/navigation/navigation.directive';
28
+ export { NavigationModule as ɵi } from './lib/_directives/navigation/navigation.module';
29
+ export { PipeDurationTransformModule as ɵy } from './lib/_pipes/pipe-duration-transform/pipe-duration-transform.module';
30
+ export { PipeDurationTransformPipe as ɵz } from './lib/_pipes/pipe-duration-transform/pipe-duration-transform.pipe';
31
+ export { PipePublicURLModule as ɵs } from './lib/_pipes/pipe-public-URL/pipe-public-URL.module';
32
+ export { PipePublicURL as ɵt } from './lib/_pipes/pipe-public-URL/pipe-public-URL.pipe';
33
+ export { ConfigurationsService as ɵe } from './lib/_services/configurations.service';
34
+ export { MultilingualTranslationsService as ɵd } from './lib/_services/multilingual-translations.service';
35
+ export { WidgetContentService as ɵb } from './lib/_services/widget-content.service';
36
+ export { WidgetUserService as ɵc } from './lib/_services/widget-user.service';