@sunbird-cb/utils-v2 0.0.0-watch

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 (210) hide show
  1. package/README.md +24 -0
  2. package/esm2022/lib/components/image-crop/image-crop.component.mjs +172 -0
  3. package/esm2022/lib/components/image-crop/image-crop.module.mjs +55 -0
  4. package/esm2022/lib/constants/features.enum.mjs +555 -0
  5. package/esm2022/lib/constants/instances.enum.mjs +5 -0
  6. package/esm2022/lib/constants/misc.constants.mjs +2 -0
  7. package/esm2022/lib/directives/class-change-on-scroll/class-change-on-scroll.directive.mjs +87 -0
  8. package/esm2022/lib/directives/class-change-on-scroll/class-change-on-scroll.module.mjs +20 -0
  9. package/esm2022/lib/directives/default-thumbnail/default-thumbnail.directive.mjs +40 -0
  10. package/esm2022/lib/directives/default-thumbnail/default-thumbnail.module.mjs +20 -0
  11. package/esm2022/lib/directives/image-responsive/image-responsive.directive.mjs +86 -0
  12. package/esm2022/lib/directives/image-responsive/image-responsive.module.mjs +20 -0
  13. package/esm2022/lib/directives/in-view-port/in-view-port.directive.mjs +62 -0
  14. package/esm2022/lib/directives/in-view-port/in-view-port.module.mjs +20 -0
  15. package/esm2022/lib/directives/navigation/navigation.directive.mjs +43 -0
  16. package/esm2022/lib/directives/navigation/navigation.module.mjs +20 -0
  17. package/esm2022/lib/directives/permission/permission.directive.mjs +14 -0
  18. package/esm2022/lib/directives/permission/permission.module.mjs +20 -0
  19. package/esm2022/lib/helpers/functions/getStringifiedQueryParams.mjs +9 -0
  20. package/esm2022/lib/helpers/horizontal-scroller/horizontal-scroller.component.mjs +96 -0
  21. package/esm2022/lib/helpers/horizontal-scroller/horizontal-scroller.module.mjs +32 -0
  22. package/esm2022/lib/helpers/horizontal-scroller-v2/horizontal-scroller-v2.component.mjs +186 -0
  23. package/esm2022/lib/helpers/horizontal-scroller-v2/horizontal-scroller-v2.module.mjs +32 -0
  24. package/esm2022/lib/helpers/logout/logout.component.mjs +78 -0
  25. package/esm2022/lib/helpers/logout/logout.module.mjs +31 -0
  26. package/esm2022/lib/models/profile-v3.models.mjs +2 -0
  27. package/esm2022/lib/pipes/pipe-certificate-image-URL/pipe-certimage-URL.module.mjs +20 -0
  28. package/esm2022/lib/pipes/pipe-certificate-image-URL/pipe-certimage-URL.pipe.mjs +117 -0
  29. package/esm2022/lib/pipes/pipe-concise-date-range/pipe-concise-date-range.module.mjs +18 -0
  30. package/esm2022/lib/pipes/pipe-concise-date-range/pipe-concise-date-range.pipe.mjs +57 -0
  31. package/esm2022/lib/pipes/pipe-count-transform/pipe-count-transform.module.mjs +20 -0
  32. package/esm2022/lib/pipes/pipe-count-transform/pipe-count-transform.pipe.mjs +37 -0
  33. package/esm2022/lib/pipes/pipe-coursename/PipeCourseNameModule.mjs +20 -0
  34. package/esm2022/lib/pipes/pipe-coursename/pipe-coursename.pipe.mjs +17 -0
  35. package/esm2022/lib/pipes/pipe-date-concat/pipe-date-concat.module.mjs +20 -0
  36. package/esm2022/lib/pipes/pipe-date-concat/pipe-date-concat.pipe.mjs +36 -0
  37. package/esm2022/lib/pipes/pipe-duration-transform/pipe-duration-transform.module.mjs +20 -0
  38. package/esm2022/lib/pipes/pipe-duration-transform/pipe-duration-transform.pipe.mjs +86 -0
  39. package/esm2022/lib/pipes/pipe-email/pipe-email.module.mjs +20 -0
  40. package/esm2022/lib/pipes/pipe-email/pipe-email.pipe.mjs +16 -0
  41. package/esm2022/lib/pipes/pipe-filter/pipe-filter.module.mjs +20 -0
  42. package/esm2022/lib/pipes/pipe-filter/pipe-filter.pipe.mjs +20 -0
  43. package/esm2022/lib/pipes/pipe-filter-search/pipe-filter-search.module.mjs +20 -0
  44. package/esm2022/lib/pipes/pipe-filter-search/pipe-filter-search.pipe.mjs +42 -0
  45. package/esm2022/lib/pipes/pipe-filter-v2/pipe-filter-v2.module.mjs +20 -0
  46. package/esm2022/lib/pipes/pipe-filter-v2/pipe-filter-v2.pipe.mjs +25 -0
  47. package/esm2022/lib/pipes/pipe-filter-v3/pipe-filter-v3.module.mjs +20 -0
  48. package/esm2022/lib/pipes/pipe-filter-v3/pipe-filter-v3.pipe.mjs +27 -0
  49. package/esm2022/lib/pipes/pipe-html-tag-removal/pipe-html-tag-removal.module.mjs +20 -0
  50. package/esm2022/lib/pipes/pipe-html-tag-removal/pipe-html-tag-removal.pipe.mjs +16 -0
  51. package/esm2022/lib/pipes/pipe-limit-to/pipe-limit-to.module.mjs +20 -0
  52. package/esm2022/lib/pipes/pipe-limit-to/pipe-limit-to.pipe.mjs +29 -0
  53. package/esm2022/lib/pipes/pipe-list-filter/pipe-list-filter.module.mjs +20 -0
  54. package/esm2022/lib/pipes/pipe-list-filter/pipe-list-filter.pipe.mjs +21 -0
  55. package/esm2022/lib/pipes/pipe-name-transform/pipe-name-transform.module.mjs +20 -0
  56. package/esm2022/lib/pipes/pipe-name-transform/pipe-name-transform.pipe.mjs +26 -0
  57. package/esm2022/lib/pipes/pipe-nic-relative/pipe-nic-relative.module.mjs +20 -0
  58. package/esm2022/lib/pipes/pipe-nic-relative/pipe-nic-relative.pipe.mjs +40 -0
  59. package/esm2022/lib/pipes/pipe-order-by/pipe-order-by.module.mjs +20 -0
  60. package/esm2022/lib/pipes/pipe-order-by/pipe-order-by.pipe.mjs +17 -0
  61. package/esm2022/lib/pipes/pipe-ordinal/pipe-ordinal.module.mjs +20 -0
  62. package/esm2022/lib/pipes/pipe-ordinal/pipe-ordinal.pipe.mjs +21 -0
  63. package/esm2022/lib/pipes/pipe-partial-content/pipe-partial-content.module.mjs +20 -0
  64. package/esm2022/lib/pipes/pipe-partial-content/pipe-partial-content.pipe.mjs +22 -0
  65. package/esm2022/lib/pipes/pipe-public-URL/pipe-public-URL.module.mjs +20 -0
  66. package/esm2022/lib/pipes/pipe-public-URL/pipe-public-URL.pipe.mjs +27 -0
  67. package/esm2022/lib/pipes/pipe-relative-time/pipe-relative-time.module.mjs +20 -0
  68. package/esm2022/lib/pipes/pipe-relative-time/pipe-relative-time.pipe.mjs +20 -0
  69. package/esm2022/lib/pipes/pipe-safe-sanitizer/pipe-safe-sanitizer.module.mjs +20 -0
  70. package/esm2022/lib/pipes/pipe-safe-sanitizer/pipe-safe-sanitizer.pipe.mjs +33 -0
  71. package/esm2022/lib/resolvers/explore-detail.resolver.mjs +76 -0
  72. package/esm2022/lib/resolvers/marketing-offering.resolve.mjs +35 -0
  73. package/esm2022/lib/resolvers/module-name.resolver.mjs +36 -0
  74. package/esm2022/lib/resolvers/page-name.resolver.mjs +33 -0
  75. package/esm2022/lib/resolvers/page.constant.mjs +4 -0
  76. package/esm2022/lib/resolvers/page.model.mjs +2 -0
  77. package/esm2022/lib/resolvers/page.resolver.mjs +82 -0
  78. package/esm2022/lib/resolvers/resolver.model.mjs +2 -0
  79. package/esm2022/lib/services/auth-keycloak.service.mjs +124 -0
  80. package/esm2022/lib/services/auth-microsoft.service.mjs +173 -0
  81. package/esm2022/lib/services/card-content.model.mjs +11 -0
  82. package/esm2022/lib/services/configurations.model.mjs +2 -0
  83. package/esm2022/lib/services/configurations.service.mjs +83 -0
  84. package/esm2022/lib/services/content-strip-multiple.model.mjs +2 -0
  85. package/esm2022/lib/services/event.model.mjs +145 -0
  86. package/esm2022/lib/services/event.service.mjs +294 -0
  87. package/esm2022/lib/services/logger.service.mjs +45 -0
  88. package/esm2022/lib/services/ms-office.model.mjs +2 -0
  89. package/esm2022/lib/services/multilingual-translations.service.mjs +121 -0
  90. package/esm2022/lib/services/nps-grid.service.mjs +38 -0
  91. package/esm2022/lib/services/subapplication-respond.service.mjs +206 -0
  92. package/esm2022/lib/services/telemetry.service.mjs +695 -0
  93. package/esm2022/lib/services/user-preference.model.mjs +2 -0
  94. package/esm2022/lib/services/user-preference.service.mjs +92 -0
  95. package/esm2022/lib/services/utility.service.mjs +122 -0
  96. package/esm2022/lib/services/value.service.mjs +25 -0
  97. package/esm2022/lib/services/widget-content.model.mjs +144 -0
  98. package/esm2022/lib/services/widget-content.service.mjs +198 -0
  99. package/esm2022/lib/services/widget-resolver.model.mjs +2 -0
  100. package/esm2022/lib/services/widget-search.model.mjs +2 -0
  101. package/esm2022/lib/services-new/data-transfer.service.mjs +23 -0
  102. package/esm2022/lib/services-new/widget-enroll.service.mjs +55 -0
  103. package/esm2022/public-api.mjs +98 -0
  104. package/esm2022/sunbird-cb-utils-v2.mjs +2 -0
  105. package/fesm2022/sunbird-cb-utils-v2.mjs +5424 -0
  106. package/fesm2022/sunbird-cb-utils-v2.mjs.map +1 -0
  107. package/index.d.ts +2 -0
  108. package/lib/components/image-crop/image-crop.component.d.ts +59 -0
  109. package/lib/components/image-crop/image-crop.module.d.ts +16 -0
  110. package/lib/constants/features.enum.d.ts +553 -0
  111. package/lib/constants/instances.enum.d.ts +3 -0
  112. package/lib/constants/misc.constants.d.ts +2 -0
  113. package/lib/directives/class-change-on-scroll/class-change-on-scroll.directive.d.ts +21 -0
  114. package/lib/directives/class-change-on-scroll/class-change-on-scroll.module.d.ts +8 -0
  115. package/lib/directives/default-thumbnail/default-thumbnail.directive.d.ts +12 -0
  116. package/lib/directives/default-thumbnail/default-thumbnail.module.d.ts +8 -0
  117. package/lib/directives/image-responsive/image-responsive.directive.d.ts +20 -0
  118. package/lib/directives/image-responsive/image-responsive.module.d.ts +8 -0
  119. package/lib/directives/in-view-port/in-view-port.directive.d.ts +14 -0
  120. package/lib/directives/in-view-port/in-view-port.module.d.ts +8 -0
  121. package/lib/directives/navigation/navigation.directive.d.ts +12 -0
  122. package/lib/directives/navigation/navigation.module.d.ts +8 -0
  123. package/lib/directives/permission/permission.directive.d.ts +6 -0
  124. package/lib/directives/permission/permission.module.d.ts +8 -0
  125. package/lib/helpers/functions/getStringifiedQueryParams.d.ts +3 -0
  126. package/lib/helpers/horizontal-scroller/horizontal-scroller.component.d.ts +21 -0
  127. package/lib/helpers/horizontal-scroller/horizontal-scroller.module.d.ts +11 -0
  128. package/lib/helpers/horizontal-scroller-v2/horizontal-scroller-v2.component.d.ts +39 -0
  129. package/lib/helpers/horizontal-scroller-v2/horizontal-scroller-v2.module.d.ts +11 -0
  130. package/lib/helpers/logout/logout.component.d.ts +23 -0
  131. package/lib/helpers/logout/logout.module.d.ts +11 -0
  132. package/lib/models/profile-v3.models.d.ts +91 -0
  133. package/lib/pipes/pipe-certificate-image-URL/pipe-certimage-URL.module.d.ts +8 -0
  134. package/lib/pipes/pipe-certificate-image-URL/pipe-certimage-URL.pipe.d.ts +9 -0
  135. package/lib/pipes/pipe-concise-date-range/pipe-concise-date-range.module.d.ts +8 -0
  136. package/lib/pipes/pipe-concise-date-range/pipe-concise-date-range.pipe.d.ts +13 -0
  137. package/lib/pipes/pipe-count-transform/pipe-count-transform.module.d.ts +8 -0
  138. package/lib/pipes/pipe-count-transform/pipe-count-transform.pipe.d.ts +7 -0
  139. package/lib/pipes/pipe-coursename/PipeCourseNameModule.d.ts +8 -0
  140. package/lib/pipes/pipe-coursename/pipe-coursename.pipe.d.ts +7 -0
  141. package/lib/pipes/pipe-date-concat/pipe-date-concat.module.d.ts +8 -0
  142. package/lib/pipes/pipe-date-concat/pipe-date-concat.pipe.d.ts +16 -0
  143. package/lib/pipes/pipe-duration-transform/pipe-duration-transform.module.d.ts +8 -0
  144. package/lib/pipes/pipe-duration-transform/pipe-duration-transform.pipe.d.ts +9 -0
  145. package/lib/pipes/pipe-email/pipe-email.module.d.ts +8 -0
  146. package/lib/pipes/pipe-email/pipe-email.pipe.d.ts +7 -0
  147. package/lib/pipes/pipe-filter/pipe-filter.module.d.ts +8 -0
  148. package/lib/pipes/pipe-filter/pipe-filter.pipe.d.ts +7 -0
  149. package/lib/pipes/pipe-filter-search/pipe-filter-search.module.d.ts +8 -0
  150. package/lib/pipes/pipe-filter-search/pipe-filter-search.pipe.d.ts +7 -0
  151. package/lib/pipes/pipe-filter-v2/pipe-filter-v2.module.d.ts +8 -0
  152. package/lib/pipes/pipe-filter-v2/pipe-filter-v2.pipe.d.ts +7 -0
  153. package/lib/pipes/pipe-filter-v3/pipe-filter-v3.module.d.ts +8 -0
  154. package/lib/pipes/pipe-filter-v3/pipe-filter-v3.pipe.d.ts +7 -0
  155. package/lib/pipes/pipe-html-tag-removal/pipe-html-tag-removal.module.d.ts +8 -0
  156. package/lib/pipes/pipe-html-tag-removal/pipe-html-tag-removal.pipe.d.ts +7 -0
  157. package/lib/pipes/pipe-limit-to/pipe-limit-to.module.d.ts +8 -0
  158. package/lib/pipes/pipe-limit-to/pipe-limit-to.pipe.d.ts +7 -0
  159. package/lib/pipes/pipe-list-filter/pipe-list-filter.module.d.ts +8 -0
  160. package/lib/pipes/pipe-list-filter/pipe-list-filter.pipe.d.ts +7 -0
  161. package/lib/pipes/pipe-name-transform/pipe-name-transform.module.d.ts +8 -0
  162. package/lib/pipes/pipe-name-transform/pipe-name-transform.pipe.d.ts +12 -0
  163. package/lib/pipes/pipe-nic-relative/pipe-nic-relative.module.d.ts +8 -0
  164. package/lib/pipes/pipe-nic-relative/pipe-nic-relative.pipe.d.ts +10 -0
  165. package/lib/pipes/pipe-order-by/pipe-order-by.module.d.ts +8 -0
  166. package/lib/pipes/pipe-order-by/pipe-order-by.pipe.d.ts +12 -0
  167. package/lib/pipes/pipe-ordinal/pipe-ordinal.module.d.ts +8 -0
  168. package/lib/pipes/pipe-ordinal/pipe-ordinal.pipe.d.ts +7 -0
  169. package/lib/pipes/pipe-partial-content/pipe-partial-content.module.d.ts +8 -0
  170. package/lib/pipes/pipe-partial-content/pipe-partial-content.pipe.d.ts +7 -0
  171. package/lib/pipes/pipe-public-URL/pipe-public-URL.module.d.ts +8 -0
  172. package/lib/pipes/pipe-public-URL/pipe-public-URL.pipe.d.ts +9 -0
  173. package/lib/pipes/pipe-relative-time/pipe-relative-time.module.d.ts +8 -0
  174. package/lib/pipes/pipe-relative-time/pipe-relative-time.pipe.d.ts +7 -0
  175. package/lib/pipes/pipe-safe-sanitizer/pipe-safe-sanitizer.module.d.ts +8 -0
  176. package/lib/pipes/pipe-safe-sanitizer/pipe-safe-sanitizer.pipe.d.ts +10 -0
  177. package/lib/resolvers/explore-detail.resolver.d.ts +19 -0
  178. package/lib/resolvers/marketing-offering.resolve.d.ts +13 -0
  179. package/lib/resolvers/module-name.resolver.d.ts +9 -0
  180. package/lib/resolvers/page-name.resolver.d.ts +8 -0
  181. package/lib/resolvers/page.constant.d.ts +1 -0
  182. package/lib/resolvers/page.model.d.ts +41 -0
  183. package/lib/resolvers/page.resolver.d.ts +20 -0
  184. package/lib/resolvers/resolver.model.d.ts +4 -0
  185. package/lib/services/auth-keycloak.service.d.ts +23 -0
  186. package/lib/services/auth-microsoft.service.d.ts +33 -0
  187. package/lib/services/card-content.model.d.ts +29 -0
  188. package/lib/services/configurations.model.d.ts +526 -0
  189. package/lib/services/configurations.service.d.ts +79 -0
  190. package/lib/services/content-strip-multiple.model.d.ts +80 -0
  191. package/lib/services/event.model.d.ts +222 -0
  192. package/lib/services/event.service.d.ts +39 -0
  193. package/lib/services/logger.service.d.ts +18 -0
  194. package/lib/services/ms-office.model.d.ts +6 -0
  195. package/lib/services/multilingual-translations.service.d.ts +23 -0
  196. package/lib/services/nps-grid.service.d.ts +15 -0
  197. package/lib/services/subapplication-respond.service.d.ts +26 -0
  198. package/lib/services/telemetry.service.d.ts +59 -0
  199. package/lib/services/user-preference.model.d.ts +34 -0
  200. package/lib/services/user-preference.service.d.ts +14 -0
  201. package/lib/services/utility.service.d.ts +34 -0
  202. package/lib/services/value.service.d.ts +11 -0
  203. package/lib/services/widget-content.model.d.ts +356 -0
  204. package/lib/services/widget-content.service.d.ts +54 -0
  205. package/lib/services/widget-resolver.model.d.ts +48 -0
  206. package/lib/services/widget-search.model.d.ts +114 -0
  207. package/lib/services-new/data-transfer.service.d.ts +10 -0
  208. package/lib/services-new/widget-enroll.service.d.ts +17 -0
  209. package/package.json +38 -0
  210. package/public-api.d.ts +97 -0
@@ -0,0 +1,356 @@
1
+ export declare namespace NsContent {
2
+ export interface IContinueLearningData extends IContent {
3
+ continueData: any;
4
+ }
5
+ export interface IContent {
6
+ platform?: any;
7
+ addedOn: string;
8
+ appIcon: string;
9
+ artifactUrl: string;
10
+ averageRating?: any;
11
+ body?: string;
12
+ certificationList?: IRelatedContentMeta[];
13
+ certificationStatus?: TCertificationStatus;
14
+ certificationSubmissionDate?: string;
15
+ certificationUrl: string;
16
+ children: IContent[];
17
+ childrenClassifiers?: string[];
18
+ clients?: IClient[];
19
+ collections?: IContent[];
20
+ complexityLevel: string;
21
+ contentId: string;
22
+ contentType: EContentTypes;
23
+ difficultyLevel: string;
24
+ primaryCategory: EPrimaryCategory;
25
+ contentUrlAtSource: string;
26
+ creatorContacts: ICreator[];
27
+ creatorDetails: ICreator[];
28
+ creatorLogo: string;
29
+ creatorPosterImage: string;
30
+ creatorThumbnail: string;
31
+ curatedTags: string[];
32
+ description: string;
33
+ displayContentType: EDisplayContentTypes;
34
+ downloadUrl?: string;
35
+ duration: number;
36
+ exclusiveContent?: boolean;
37
+ expiryDate?: string;
38
+ equivalentCertifications?: IRelatedContentMeta[];
39
+ hasAccess: boolean;
40
+ hasAssessment?: string;
41
+ idealScreenSize?: string;
42
+ identifier: string;
43
+ introductoryVideo?: string;
44
+ introductoryVideoIcon?: string;
45
+ learningTrack?: string;
46
+ isExternal: boolean;
47
+ isIframeSupported: 'Yes' | 'No' | 'Maybe';
48
+ isInIntranet?: boolean;
49
+ keywords?: string[];
50
+ kArtifacts?: IRelatedContentMeta[];
51
+ lastUpdatedOn: string;
52
+ learningMode?: TLearningMode;
53
+ learningObjective: string;
54
+ labels?: string[];
55
+ locale?: string;
56
+ hasTranslations?: {
57
+ identifier: string;
58
+ locale: string;
59
+ }[];
60
+ isTranslationOf?: {
61
+ identifier: string;
62
+ locale: string;
63
+ }[];
64
+ me_totalSessionsCount: number;
65
+ mediaType: string;
66
+ mimeType: EMimeTypes;
67
+ miniGOTVersion?: string;
68
+ msArtifactDetails?: IMSArtifactDetails;
69
+ mode?: ETagType;
70
+ name: string;
71
+ nextCertificationAttemptDate?: string;
72
+ playgroundInstructions?: string;
73
+ playgroundResources?: IResourcePlayground[];
74
+ postContents?: IPrePostContent[];
75
+ posterImage?: string;
76
+ preContents?: IPrePostContent[];
77
+ preRequisites: string;
78
+ price?: {
79
+ currency: string;
80
+ value: number;
81
+ };
82
+ proctorUrl?: string;
83
+ progress?: IMarkAsCompleteProgress;
84
+ programDuration?: any;
85
+ publishedOn: string;
86
+ recentCertificationAttemptScore?: number;
87
+ recommendationReasons?: string[];
88
+ region?: string[];
89
+ registrationUrl?: string;
90
+ registrationInstructions?: string;
91
+ resourceCategory?: string[];
92
+ resourceType: string;
93
+ size?: number;
94
+ skills: ISkill[];
95
+ softwareRequirements?: IResourceDetail[];
96
+ sourceName: string;
97
+ sourceShortName: string;
98
+ sourceIconUrl?: string;
99
+ sourceUrl?: string;
100
+ ssoEnabled?: boolean;
101
+ status: 'Draft' | 'InReview' | 'QualityReview' | 'Reviewed' | 'Processing' | 'Live' | 'Deleted' | 'MarkedForDeletion' | 'Expired';
102
+ subTitle?: string;
103
+ subTitles?: ISubtitle[];
104
+ studyMaterials?: IRelatedContentMeta[];
105
+ systemRequirements?: string[];
106
+ tags: ITag[];
107
+ topics: IContentTopic[];
108
+ totalLikes?: {
109
+ [key: string]: number;
110
+ };
111
+ totalRating?: number;
112
+ track: ITrack[];
113
+ uniqueLearners?: number;
114
+ viewCount?: {
115
+ [key: string]: number;
116
+ };
117
+ reason?: string;
118
+ trainingLHubCount?: number;
119
+ verifiers?: {
120
+ name: string;
121
+ email: string;
122
+ id: string;
123
+ }[];
124
+ references?: {
125
+ url: string;
126
+ title: string;
127
+ }[];
128
+ resumePage?: number;
129
+ [key: string]: any;
130
+ optionalReading: boolean;
131
+ additionalTags?: string[];
132
+ }
133
+ export enum EPrimaryCategory {
134
+ PROGRAM = "Program",
135
+ COURSE = "Course",
136
+ MODULE = "Course Unit",
137
+ RESOURCE = "Learning Resource",
138
+ GOALS = "GOALS",
139
+ PRACTICE_RESOURCE = "Practice Question Set",
140
+ FINAL_ASSESSMENT = "Course Assessment",
141
+ COMP_ASSESSMENT = "Competency Assessment",
142
+ FTB_QUESTION = "FTB Question",
143
+ MTF_QUESTION = "MTF Question",
144
+ MULTIPLE_CHOICE_QUESTION = "Multiple Choice Question",
145
+ SINGLE_CHOICE_QUESTION = "Single Choice Question",
146
+ MANDATORY_COURSE_GOAL = "Mandatory Course Goal",
147
+ BLENDED_PROGRAM = "Blended Program",
148
+ OFFLINE_SESSION = "Offline Session",
149
+ KNOWLEDGE_ARTIFACT = "Knowledge Artifact",
150
+ KNOWLEDGE_BOARD = "Knowledge Board",
151
+ LEARNING_JOURNEY = "Learning Journeys",
152
+ CHANNEL = "Channel"
153
+ }
154
+ export interface IContentMinimal {
155
+ appIcon: string;
156
+ artifactUrl: string;
157
+ complexityLevel: string;
158
+ contentType: EContentTypes;
159
+ primaryCategory: EPrimaryCategory;
160
+ description: string;
161
+ displayContentType?: EDisplayContentTypes;
162
+ duration: number;
163
+ identifier: string;
164
+ hasAccess?: boolean;
165
+ isInIntranet?: boolean;
166
+ learningMode?: TLearningMode;
167
+ mimeType: EMimeTypes;
168
+ name: string;
169
+ creatorDetails: ICreator[];
170
+ creatorContacts: ICreator[];
171
+ PosterImage?: string;
172
+ resourceType?: string;
173
+ totalRating?: number;
174
+ }
175
+ export interface ICollectionHierarchyResponse {
176
+ data: IContent;
177
+ hasMore: boolean;
178
+ totalContents: number;
179
+ }
180
+ export interface IRelatedContentMeta {
181
+ identifier: string;
182
+ name: string;
183
+ }
184
+ type TCertificationStatus = 'ongoing' | 'passed' | 'canAttempt' | 'cannotAttempt';
185
+ export type TLearningMode = 'Self-Paced' | 'Instructor-Led' | 'Open' | 'Closed';
186
+ interface IMarkAsCompleteProgress {
187
+ progressStatus: 'open' | 'started' | 'completed';
188
+ showMarkAsComplete: boolean;
189
+ markAsCompleteReason: string;
190
+ progressSupported: boolean;
191
+ progress: number | null;
192
+ }
193
+ interface ITag {
194
+ id: string;
195
+ type: string;
196
+ value: string;
197
+ }
198
+ interface IMSArtifactDetails {
199
+ channelId: string;
200
+ videoId: string;
201
+ }
202
+ interface IClient {
203
+ displayName: string;
204
+ id: string;
205
+ name: string;
206
+ }
207
+ interface ISubtitle {
208
+ srclang: string;
209
+ label: string;
210
+ url: string;
211
+ }
212
+ interface IPrePostContent {
213
+ identifier: string;
214
+ name: string;
215
+ }
216
+ interface IResourceDetail {
217
+ title?: string;
218
+ url?: string;
219
+ }
220
+ interface IResourcePlayground {
221
+ appIcon: string;
222
+ artifactUrl: string;
223
+ identifier: string;
224
+ name: string;
225
+ }
226
+ interface ITrack {
227
+ id: string;
228
+ name: string;
229
+ status: string;
230
+ visibility: string;
231
+ }
232
+ interface ISkill {
233
+ id: string;
234
+ category: string;
235
+ skill: string;
236
+ name: string;
237
+ }
238
+ export interface ICreator {
239
+ id: string;
240
+ name: string;
241
+ email: string;
242
+ }
243
+ export interface IContentTopic {
244
+ identifier: string;
245
+ name: string;
246
+ }
247
+ export interface IContact {
248
+ id: string;
249
+ name: string;
250
+ email: string;
251
+ }
252
+ export interface IViewerContinueLearningRequest {
253
+ resourceId: string;
254
+ contextPathId: string;
255
+ data: string;
256
+ dateAccessed: number;
257
+ contextType?: string;
258
+ }
259
+ export enum EContentTypes {
260
+ PROGRAM = "Learning Path",
261
+ CHANNEL = "Channel",
262
+ COURSE = "Course",
263
+ KNOWLEDGE_ARTIFACT = "Knowledge Artifact",
264
+ KNOWLEDGE_BOARD = "Knowledge Board",
265
+ LEARNING_JOURNEY = "Learning Journeys",
266
+ MODULE = "Collection",
267
+ RESOURCE = "Resource"
268
+ }
269
+ export enum EMiscPlayerSupportedCollectionTypes {
270
+ PLAYLIST = "Playlist"
271
+ }
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
+ COLLECTION = "application/vnd.ekstep.content-collection",
277
+ HTML = "application/html",
278
+ ILP_FP = "application/ilpfp",
279
+ IAP = "application/iap-assessment",
280
+ M4A = "audio/m4a",
281
+ MP3 = "audio/mpeg",
282
+ MP4 = "video/mp4",
283
+ M3U8 = "application/x-mpegURL",
284
+ INTERACTION = "video/interactive",
285
+ PDF = "application/pdf",
286
+ QUIZ = "application/quiz",
287
+ DRAG_DROP = "application/drag-drop",
288
+ HTML_PICKER = "application/htmlpicker",
289
+ WEB_MODULE = "application/web-module",
290
+ WEB_MODULE_EXERCISE = "application/web-module-exercise",
291
+ YOUTUBE = "video/x-youtube",
292
+ HANDS_ON = "application/integrated-hands-on",
293
+ RDBMS_HANDS_ON = "application/rdbms",
294
+ CLASS_DIAGRAM = "application/class-diagram",
295
+ CHANNEL = "application/channel",
296
+ COLLECTION_RESOURCE = "resource/collection",
297
+ CERTIFICATION = "application/certification",
298
+ PLAYLIST = "application/playlist",
299
+ QUESTION_SET = "application/vnd.sunbird.questionset",
300
+ QUESTION = "application/vnd.sunbird.question",
301
+ UNKNOWN = "application/unknown",
302
+ OFFLINE_SESSION = "application/offline"
303
+ }
304
+ export enum EDisplayContentTypes {
305
+ ASSESSMENT = "ASSESSMENT",
306
+ AUDIO = "AUDIO",
307
+ CERTIFICATION = "CERTIFICATION",
308
+ CHANNEL = "Channel",
309
+ CLASS_DIAGRAM = "CLASS_DIAGRAM",
310
+ COURSE = "COURSE",
311
+ DEFAULT = "DEFAULT",
312
+ DRAG_DROP = "DRAG_DROP",
313
+ EXTERNAL_CERTIFICATION = "EXTERNAL_CERTIFICATION",
314
+ EXTERNAL_COURSE = "EXTERNAL_COURSE",
315
+ GOALS = "GOALS",
316
+ HANDS_ON = "HANDS_ON",
317
+ IAP = "IAP",
318
+ INSTRUCTOR_LED = "INSTRUCTOR_LED",
319
+ INTERACTIVE_VIDEO = "INTERACTIVE_VIDEO",
320
+ KNOWLEDGE_ARTIFACT = "KNOWLEDGE_ARTIFACT",
321
+ MODULE = "MODULE",
322
+ PDF = "PDF",
323
+ PLAYLIST = "PLAYLIST",
324
+ PROGRAM = "PROGRAM",
325
+ QUIZ = "QUIZ",
326
+ RESOURCE = "RESOURCE",
327
+ RDBMS_HANDS_ON = "RDBMS_HANDS_ON",
328
+ VIDEO = "VIDEO",
329
+ WEB_MODULE = "WEB_MODULE",
330
+ WEB_PAGE = "WEB_PAGE",
331
+ YOUTUBE = "YOUTUBE",
332
+ KNOWLEDGE_BOARD = "Knowledge Board",
333
+ LEARNING_JOURNEY = "Learning Journeys"
334
+ }
335
+ export enum EFilterCategory {
336
+ ALL = "ALL",
337
+ LEARN = "LEARN",
338
+ PRACTICE = "PRACTICE",
339
+ ASSESS = "ASSESS"
340
+ }
341
+ export enum ETagType {
342
+ NEWLY_ADDED = "NEWLY ADDED"
343
+ }
344
+ export enum ECourseCategory {
345
+ INVITE_ONLY_PROGRAM = "Invite-Only Program",
346
+ MODERATED_PROGRAM = "Moderated Program",
347
+ BLENDED_PROGRAM = "Blended Program",
348
+ CURATED_PROGRAM = "Curated Program",
349
+ COURSE = "Course",
350
+ MODERATED_COURSE = "Moderated Course",
351
+ STANDALONE_ASSESSMENT = "Standalone Assessment",
352
+ MODERATED_ASSESSEMENT = "Moderated Assessment",
353
+ CASE_STUDY = "Case Study"
354
+ }
355
+ export {};
356
+ }
@@ -0,0 +1,54 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { Observable } from 'rxjs';
3
+ import { ConfigurationsService } from './configurations.service';
4
+ import { NsContentStripMultiple } from './content-strip-multiple.model';
5
+ import { NsContent } from './widget-content.model';
6
+ import { NSSearch } from './widget-search.model';
7
+ import * as i0 from "@angular/core";
8
+ export declare class WidgetContentService {
9
+ private http;
10
+ private configSvc;
11
+ constructor(http: HttpClient, configSvc: ConfigurationsService);
12
+ fetchMarkAsCompleteMeta(identifier: string): Promise<any>;
13
+ fetchContent(contentId: string, hierarchyType?: 'all' | 'minimal' | 'detail', additionalFields?: string[]): Observable<NsContent.IContent>;
14
+ fetchAuthoringContent(contentId: string): Observable<NsContent.IContent>;
15
+ fetchMultipleContent(ids: string[]): Observable<NsContent.IContent[]>;
16
+ fetchCollectionHierarchy(type: string, id: string, pageNumber?: number, pageSize?: number): Observable<NsContent.ICollectionHierarchyResponse>;
17
+ fetchContentLikes(contentIds: {
18
+ content_id: string[];
19
+ }): Promise<{
20
+ [identifier: string]: number;
21
+ }>;
22
+ fetchContentRatings(contentIds: {
23
+ contentIds: string[];
24
+ }): Promise<unknown>;
25
+ fetchContentHistory(contentId: string): Observable<NsContent.IContinueLearningData>;
26
+ continueLearning(id: string, collectionId?: string, collectionType?: string): Promise<any>;
27
+ saveContinueLearning(content: NsContent.IViewerContinueLearningRequest): Observable<any>;
28
+ setS3Cookie(_contentId: string): Observable<any>;
29
+ setS3ImageCookie(): Observable<any>;
30
+ fetchManifest(url: string): Observable<any>;
31
+ fetchWebModuleContent(url: string): Observable<any>;
32
+ search(req: NSSearch.ISearchRequest): Observable<NSSearch.ISearchApiResult>;
33
+ searchRegionRecommendation(req: NSSearch.ISearchOrgRegionRecommendationRequest): Observable<NsContentStripMultiple.IContentStripResponseApi>;
34
+ searchV6(req: NSSearch.ISearchV6Request): Observable<NSSearch.ISearchV6ApiResult>;
35
+ fetchContentRating(contentId: string): Observable<{
36
+ rating: number;
37
+ }>;
38
+ deleteContentRating(contentId: string): Observable<any>;
39
+ addContentRating(contentId: string, data: {
40
+ rating: number;
41
+ }): Observable<any>;
42
+ getFirstChildInHierarchy(content: NsContent.IContent): NsContent.IContent;
43
+ getRegistrationStatus(source: string): Promise<{
44
+ hasAccess: boolean;
45
+ registrationUrl?: string;
46
+ }>;
47
+ fetchConfig(url: string): Observable<any>;
48
+ fetchExtUserContentEnroll(contentId: string): Observable<any>;
49
+ extContentEnroll(requestBody: any): Observable<any>;
50
+ downloadCert(certId: any): Observable<any>;
51
+ downloadCertV2(payload: any): Observable<any>;
52
+ static ɵfac: i0.ɵɵFactoryDeclaration<WidgetContentService, never>;
53
+ static ɵprov: i0.ɵɵInjectableDeclaration<WidgetContentService>;
54
+ }
@@ -0,0 +1,48 @@
1
+ import { Type } from '@angular/core';
2
+ import { SafeStyle } from '@angular/platform-browser';
3
+ type TUrl = undefined | 'none' | 'back' | string;
4
+ export declare namespace NsWidgetResolver {
5
+ type UnitPermissionPrimitive = undefined | null | string;
6
+ interface IUnitPermissionObject {
7
+ all: UnitPermissionPrimitive | string[];
8
+ none: UnitPermissionPrimitive | string[];
9
+ some: UnitPermissionPrimitive | string[];
10
+ }
11
+ type UnitPermission = UnitPermissionPrimitive | string[] | IUnitPermissionObject | Pick<IUnitPermissionObject, 'all'> | Pick<IUnitPermissionObject, 'none'> | Pick<IUnitPermissionObject, 'some'> | Exclude<IUnitPermissionObject, 'all'> | Exclude<IUnitPermissionObject, 'none'> | Exclude<IUnitPermissionObject, 'some'>;
12
+ interface IPermissions {
13
+ enabled: boolean;
14
+ available: boolean;
15
+ roles?: UnitPermission;
16
+ features?: UnitPermission;
17
+ groups?: UnitPermission;
18
+ }
19
+ interface IBaseConfig {
20
+ widgetType: string;
21
+ widgetSubType: string;
22
+ }
23
+ interface IRegistrationConfig extends IBaseConfig {
24
+ component: Type<IWidgetData<any>>;
25
+ }
26
+ interface IRegistrationsPermissionConfig extends IBaseConfig {
27
+ widgetPermission?: IPermissions;
28
+ }
29
+ interface IRenderConfigWithTypedData<T> extends IRegistrationsPermissionConfig {
30
+ widgetData: T;
31
+ widgetInstanceId?: string;
32
+ widgetHostClass?: string;
33
+ widgetHostStyle?: {
34
+ [key: string]: string;
35
+ };
36
+ }
37
+ type IRenderConfigWithAnyData = IRenderConfigWithTypedData<any>;
38
+ interface IWidgetData<T> extends Omit<IRenderConfigWithTypedData<T>, 'widgetPermission' | 'widgetHostStyle'> {
39
+ widgetSafeStyle?: SafeStyle;
40
+ updateBaseComponent: (widgetType: string, widgetSubType: string, widgetInstanceId?: string, widgetHostClass?: string, widgetSafeStyle?: SafeStyle) => void;
41
+ }
42
+ interface ITitle {
43
+ title: string;
44
+ url: TUrl;
45
+ icon?: string;
46
+ }
47
+ }
48
+ export {};
@@ -0,0 +1,114 @@
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
+ }
45
+ interface ISearchSort {
46
+ [key: string]: 'asc' | 'desc';
47
+ }
48
+ interface ISearchV6VisibleFilters {
49
+ [key: string]: {
50
+ displayName: string;
51
+ order?: {
52
+ [key: string]: 'asc' | 'desc';
53
+ }[];
54
+ };
55
+ }
56
+ interface ISearchV6Filters {
57
+ andFilters?: {
58
+ [key: string]: string[];
59
+ }[];
60
+ notFilters?: {
61
+ [key: string]: string[];
62
+ }[];
63
+ }
64
+ interface ISearchRedirection {
65
+ f?: {
66
+ [index: string]: string[];
67
+ };
68
+ q?: string;
69
+ tab?: string;
70
+ }
71
+ interface IConfigContentStrip {
72
+ titleKey?: string;
73
+ title?: string;
74
+ reqRoles?: string[];
75
+ reqFeatures?: string[];
76
+ searchRedirection?: ISearchRedirection;
77
+ searchQuery?: ISearchRequest;
78
+ contentIds?: string[];
79
+ }
80
+ interface ISearchApiResult {
81
+ totalHits: number;
82
+ result: NsContent.IContent[];
83
+ filters: IFilterUnitResponse[];
84
+ notToBeShownFilters?: IFilterUnitResponse[];
85
+ filtersUsed: string[];
86
+ }
87
+ interface ISearchV6ApiResult {
88
+ totalHits: number;
89
+ result: NsContent.IContent[];
90
+ filtersUsed: string[];
91
+ notVisibleFilters: string[];
92
+ filters: IFilterUnitResponse[];
93
+ queryUsed?: string;
94
+ doYouMean?: string;
95
+ }
96
+ interface IFilterUnitResponse {
97
+ id?: string;
98
+ type: string;
99
+ displayName: string;
100
+ content: IFilterUnitContent[];
101
+ }
102
+ interface IFilterUnitContent {
103
+ type?: string;
104
+ id?: string;
105
+ displayName: string;
106
+ count: number;
107
+ children?: IFilterUnitContent[];
108
+ }
109
+ interface ITypeUnitResponse {
110
+ displayName: string;
111
+ type: string;
112
+ count: string;
113
+ }
114
+ }
@@ -0,0 +1,10 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class DataTransferService {
3
+ private enrollData;
4
+ setEnrollData(data: any): void;
5
+ getEnrollData(): any;
6
+ clearEnrollData(): void;
7
+ constructor();
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<DataTransferService, never>;
9
+ static ɵprov: i0.ɵɵInjectableDeclaration<DataTransferService>;
10
+ }
@@ -0,0 +1,17 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { ConfigurationsService } from '../services/configurations.service';
3
+ import { Observable } from 'rxjs';
4
+ import { NsContent } from '../services/widget-content.model';
5
+ import * as i0 from "@angular/core";
6
+ export declare class WidgetEnrollService {
7
+ private http;
8
+ private configSvc;
9
+ constructor(http: HttpClient, configSvc: ConfigurationsService);
10
+ fetchEnrollContentData(payload: any): Observable<NsContent.IContent[]>;
11
+ fetchInternalEnrollmentData(userId: string, payload: any): Observable<Object>;
12
+ fetchExternalEnrollmentData(payload: any): Observable<any>;
13
+ fetchEventsEnrollmentData(userId: string, payload: any): Observable<Object>;
14
+ fetchEnrollStats(userId: any): Observable<NsContent.IContent[]>;
15
+ static ɵfac: i0.ɵɵFactoryDeclaration<WidgetEnrollService, never>;
16
+ static ɵprov: i0.ɵɵInjectableDeclaration<WidgetEnrollService>;
17
+ }
package/package.json ADDED
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "@sunbird-cb/utils-v2",
3
+ "version": "0.0.0-watch+1750611703003",
4
+ "main": "./src/public-api.ts",
5
+ "dependencies": {
6
+ "tslib": "^2.0.0"
7
+ },
8
+ "peerDependencies": {
9
+ "@angular/animations": "^16.2.12",
10
+ "@angular/cdk": "^16.2.14",
11
+ "@angular/common": "^16.2.12",
12
+ "@angular/compiler": "^16.2.12",
13
+ "@angular/core": "^16.2.12",
14
+ "@angular/forms": "^16.2.12",
15
+ "@angular/material": "^16.2.14",
16
+ "@angular/platform-browser": "^16.2.12",
17
+ "@angular/platform-browser-dynamic": "^16.2.12",
18
+ "@angular/router": "^16.2.12",
19
+ "ngx-image-cropper": "^6.3.4",
20
+ "@types/lodash": "^4.14.168",
21
+ "moment": "^2.29.1",
22
+ "rxjs": "~6.5.2"
23
+ },
24
+ "module": "fesm2022/sunbird-cb-utils-v2.mjs",
25
+ "typings": "index.d.ts",
26
+ "exports": {
27
+ "./package.json": {
28
+ "default": "./package.json"
29
+ },
30
+ ".": {
31
+ "types": "./index.d.ts",
32
+ "esm2022": "./esm2022/sunbird-cb-utils-v2.mjs",
33
+ "esm": "./esm2022/sunbird-cb-utils-v2.mjs",
34
+ "default": "./fesm2022/sunbird-cb-utils-v2.mjs"
35
+ }
36
+ },
37
+ "sideEffects": false
38
+ }