@sunbird-cb/consumption 0.0.90 → 0.0.91

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 (72) hide show
  1. package/bundles/sunbird-cb-consumption.umd.js +1588 -1498
  2. package/bundles/sunbird-cb-consumption.umd.js.map +1 -1
  3. package/bundles/sunbird-cb-consumption.umd.min.js +2 -2
  4. package/bundles/sunbird-cb-consumption.umd.min.js.map +1 -1
  5. package/esm2015/lib/_common/cards/card-assessment/card-assessment/card-assessment.component.js +4 -7
  6. package/esm2015/lib/_common/cards/card-karma-programs/card-karma-programs.component.js +3 -3
  7. package/esm2015/lib/_common/cards/card-mdo-channel/card-mdo-channel.component.js +3 -3
  8. package/esm2015/lib/_common/cards/card-mdo-channel-v1/card-mdo-channel-v1.component.js +3 -3
  9. package/esm2015/lib/_common/cards/card-portrait/card-portrait.component.js +3 -3
  10. package/esm2015/lib/_common/cards/card-portrait-ext/card-portrait-ext.component.js +3 -3
  11. package/esm2015/lib/_common/cards/card-progress-portrait-lib/card-progress-portrait-lib.component.js +3 -3
  12. package/esm2015/lib/_common/cards/cards.component.js +4 -24
  13. package/esm2015/lib/_common/common-strip/common-strip.component.js +5 -5
  14. package/esm2015/lib/_common/competency-passbook/competency-passbook.component.js +3 -3
  15. package/esm2015/lib/_common/competency-passbook-mdo/competency-passbook-mdo.component.js +3 -3
  16. package/esm2015/lib/_common/content-strip-with-tabs-lib/content-strip-with-tabs-lib.component.js +50 -54
  17. package/esm2015/lib/_common/microsites/mdo-channels/mdo-channel-v2/mdo-channel-v2.component.js +2 -2
  18. package/esm2015/lib/_common/strips/content-strip-facet-filter/content-strip-facet-filter.component.js +5 -7
  19. package/esm2015/lib/_common/strips/content-strip-with-tabs-pills/content-strip-with-tabs-pills.component.js +8 -8
  20. package/esm2015/lib/_common/user-progress/user-progress.component.js +1 -2
  21. package/esm2015/lib/_services/widget-content-lib.service.js +899 -0
  22. package/esm2015/lib/_services/widget-user-lib.service.js +523 -0
  23. package/esm2015/public-api.js +3 -2
  24. package/esm2015/sunbird-cb-consumption.js +77 -78
  25. package/esm5/lib/_common/cards/card-assessment/card-assessment/card-assessment.component.js +4 -7
  26. package/esm5/lib/_common/cards/card-karma-programs/card-karma-programs.component.js +3 -3
  27. package/esm5/lib/_common/cards/card-mdo-channel/card-mdo-channel.component.js +3 -3
  28. package/esm5/lib/_common/cards/card-mdo-channel-v1/card-mdo-channel-v1.component.js +3 -3
  29. package/esm5/lib/_common/cards/card-portrait/card-portrait.component.js +3 -3
  30. package/esm5/lib/_common/cards/card-portrait-ext/card-portrait-ext.component.js +3 -3
  31. package/esm5/lib/_common/cards/card-progress-portrait-lib/card-progress-portrait-lib.component.js +3 -3
  32. package/esm5/lib/_common/cards/cards.component.js +4 -27
  33. package/esm5/lib/_common/common-strip/common-strip.component.js +5 -5
  34. package/esm5/lib/_common/competency-passbook/competency-passbook.component.js +3 -3
  35. package/esm5/lib/_common/competency-passbook-mdo/competency-passbook-mdo.component.js +3 -3
  36. package/esm5/lib/_common/content-strip-with-tabs-lib/content-strip-with-tabs-lib.component.js +83 -87
  37. package/esm5/lib/_common/microsites/mdo-channels/mdo-channel-v2/mdo-channel-v2.component.js +2 -2
  38. package/esm5/lib/_common/strips/content-strip-facet-filter/content-strip-facet-filter.component.js +5 -7
  39. package/esm5/lib/_common/strips/content-strip-with-tabs-pills/content-strip-with-tabs-pills.component.js +8 -9
  40. package/esm5/lib/_common/user-progress/user-progress.component.js +1 -2
  41. package/esm5/lib/_services/widget-content-lib.service.js +1170 -0
  42. package/esm5/lib/_services/widget-user-lib.service.js +607 -0
  43. package/esm5/public-api.js +3 -2
  44. package/esm5/sunbird-cb-consumption.js +77 -78
  45. package/fesm2015/sunbird-cb-consumption.js +1153 -1090
  46. package/fesm2015/sunbird-cb-consumption.js.map +1 -1
  47. package/fesm5/sunbird-cb-consumption.js +1513 -1423
  48. package/fesm5/sunbird-cb-consumption.js.map +1 -1
  49. package/lib/_common/cards/card-assessment/card-assessment/card-assessment.component.d.ts +2 -3
  50. package/lib/_common/cards/card-karma-programs/card-karma-programs.component.d.ts +2 -2
  51. package/lib/_common/cards/card-mdo-channel/card-mdo-channel.component.d.ts +2 -2
  52. package/lib/_common/cards/card-mdo-channel-v1/card-mdo-channel-v1.component.d.ts +2 -2
  53. package/lib/_common/cards/card-portrait/card-portrait.component.d.ts +2 -2
  54. package/lib/_common/cards/card-portrait-ext/card-portrait-ext.component.d.ts +2 -2
  55. package/lib/_common/cards/card-progress-portrait-lib/card-progress-portrait-lib.component.d.ts +2 -2
  56. package/lib/_common/cards/cards.component.d.ts +2 -5
  57. package/lib/_common/common-strip/common-strip.component.d.ts +3 -3
  58. package/lib/_common/competency-passbook/competency-passbook.component.d.ts +3 -3
  59. package/lib/_common/competency-passbook-mdo/competency-passbook-mdo.component.d.ts +3 -3
  60. package/lib/_common/content-strip-with-tabs-lib/content-strip-with-tabs-lib.component.d.ts +4 -6
  61. package/lib/_common/strips/content-strip-facet-filter/content-strip-facet-filter.component.d.ts +3 -4
  62. package/lib/_common/strips/content-strip-with-tabs-pills/content-strip-with-tabs-pills.component.d.ts +3 -4
  63. package/lib/_services/{widget-content.service.d.ts → widget-content-lib.service.d.ts} +6 -3
  64. package/lib/_services/{widget-user.service.d.ts → widget-user-lib.service.d.ts} +9 -4
  65. package/package.json +1 -1
  66. package/public-api.d.ts +2 -1
  67. package/sunbird-cb-consumption.d.ts +75 -76
  68. package/sunbird-cb-consumption.metadata.json +1 -1
  69. package/esm2015/lib/_services/widget-content.service.js +0 -852
  70. package/esm2015/lib/_services/widget-user.service.js +0 -475
  71. package/esm5/lib/_services/widget-content.service.js +0 -1109
  72. package/esm5/lib/_services/widget-user.service.js +0 -542
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/router'), require('rxjs'), require('rxjs/operators'), require('@sunbird-cb/utils-v2'), require('@angular/material'), require('@sunbird-cb/resolver-v2'), require('@angular/common/http'), require('lodash'), require('moment'), require('@ngx-translate/core'), require('rxjs/add/observable/of'), require('dayjs'), require('@ngx-translate/http-loader'), require('@angular/cdk/layout'), require('@angular/platform-browser'), require('hammerjs'), require('@angular/forms'), require('jspdf')) :
3
- typeof define === 'function' && define.amd ? define('@sunbird-cb/consumption', ['exports', '@angular/core', '@angular/common', '@angular/router', 'rxjs', 'rxjs/operators', '@sunbird-cb/utils-v2', '@angular/material', '@sunbird-cb/resolver-v2', '@angular/common/http', 'lodash', 'moment', '@ngx-translate/core', 'rxjs/add/observable/of', 'dayjs', '@ngx-translate/http-loader', '@angular/cdk/layout', '@angular/platform-browser', 'hammerjs', '@angular/forms', 'jspdf'], factory) :
4
- (global = global || self, factory((global['sunbird-cb'] = global['sunbird-cb'] || {}, global['sunbird-cb'].consumption = {}), global.ng.core, global.ng.common, global.ng.router, global.rxjs, global.rxjs.operators, global['@sunbird-cb/utils-v2'], global.ng.material, global['@sunbird-cb/resolver-v2'], global.ng.common.http, global.lodash, global.moment, global.core$1, global.rxjs['add/observable/of'], global.dayjs_, global.httpLoader, global.ng.cdk.layout, global.ng.platformBrowser, global.hammerjs, global.ng.forms, global.jspdf));
5
- }(this, (function (exports, core, common, router, rxjs, operators, utilsV2, material, resolverV2, http, lodash, moment$4, core$1, of, dayjs_, httpLoader, layout, platformBrowser, Hammer, forms, jspdf) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/router'), require('rxjs'), require('rxjs/operators'), require('@sunbird-cb/utils-v2'), require('@angular/material'), require('@sunbird-cb/resolver-v2'), require('@angular/common/http'), require('lodash'), require('rxjs/add/observable/of'), require('dayjs'), require('moment'), require('@ngx-translate/core'), require('@ngx-translate/http-loader'), require('@angular/cdk/layout'), require('@angular/platform-browser'), require('hammerjs'), require('@angular/forms'), require('jspdf')) :
3
+ typeof define === 'function' && define.amd ? define('@sunbird-cb/consumption', ['exports', '@angular/core', '@angular/common', '@angular/router', 'rxjs', 'rxjs/operators', '@sunbird-cb/utils-v2', '@angular/material', '@sunbird-cb/resolver-v2', '@angular/common/http', 'lodash', 'rxjs/add/observable/of', 'dayjs', 'moment', '@ngx-translate/core', '@ngx-translate/http-loader', '@angular/cdk/layout', '@angular/platform-browser', 'hammerjs', '@angular/forms', 'jspdf'], factory) :
4
+ (global = global || self, factory((global['sunbird-cb'] = global['sunbird-cb'] || {}, global['sunbird-cb'].consumption = {}), global.ng.core, global.ng.common, global.ng.router, global.rxjs, global.rxjs.operators, global['@sunbird-cb/utils-v2'], global.ng.material, global['@sunbird-cb/resolver-v2'], global.ng.common.http, global.lodash, global.rxjs['add/observable/of'], global.dayjs_, global.moment, global.core$1, global.httpLoader, global.ng.cdk.layout, global.ng.platformBrowser, global.hammerjs, global.ng.forms, global.jspdf));
5
+ }(this, (function (exports, core, common, router, rxjs, operators, utilsV2, material, resolverV2, http, lodash, of, dayjs_, moment$4, core$1, httpLoader, layout, platformBrowser, Hammer, forms, jspdf) { 'use strict';
6
6
 
7
7
  Hammer = Hammer && Hammer.hasOwnProperty('default') ? Hammer['default'] : Hammer;
8
8
 
@@ -1678,689 +1678,1361 @@
1678
1678
  };
1679
1679
  }
1680
1680
 
1681
+ /**
1682
+ * @fileoverview added by tsickle
1683
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1684
+ */
1685
+ var NsCardContent;
1686
+ (function (NsCardContent) {
1687
+ /**
1688
+ * @record
1689
+ */
1690
+ function ICard() { }
1691
+ NsCardContent.ICard = ICard;
1692
+ if (false) {
1693
+ /** @type {?} */
1694
+ ICard.prototype.content;
1695
+ /** @type {?} */
1696
+ ICard.prototype.cardSubType;
1697
+ /** @type {?} */
1698
+ ICard.prototype.context;
1699
+ /** @type {?|undefined} */
1700
+ ICard.prototype.intranetMode;
1701
+ /** @type {?|undefined} */
1702
+ ICard.prototype.deletedMode;
1703
+ /** @type {?|undefined} */
1704
+ ICard.prototype.likes;
1705
+ /** @type {?|undefined} */
1706
+ ICard.prototype.contentTags;
1707
+ /** @type {?} */
1708
+ ICard.prototype.stateData;
1709
+ }
1710
+ /**
1711
+ * @record
1712
+ */
1713
+ function IContentTags() { }
1714
+ NsCardContent.IContentTags = IContentTags;
1715
+ if (false) {
1716
+ /** @type {?|undefined} */
1717
+ IContentTags.prototype.daysSpan;
1718
+ /** @type {?|undefined} */
1719
+ IContentTags.prototype.excludeContentType;
1720
+ /** @type {?|undefined} */
1721
+ IContentTags.prototype.excludeMimeType;
1722
+ /** @type {?} */
1723
+ IContentTags.prototype.tag;
1724
+ /** @type {?|undefined} */
1725
+ IContentTags.prototype.criteriaField;
1726
+ }
1727
+ /**
1728
+ * @record
1729
+ */
1730
+ function ICompetency() { }
1731
+ NsCardContent.ICompetency = ICompetency;
1732
+ if (false) {
1733
+ /** @type {?} */
1734
+ ICompetency.prototype.competencyArea;
1735
+ /** @type {?} */
1736
+ ICompetency.prototype.competencyObject;
1737
+ }
1738
+ var EContentStatus;
1739
+ (function (EContentStatus) {
1740
+ EContentStatus["LIVE"] = "Live";
1741
+ EContentStatus["EXPIRED"] = "Expired";
1742
+ EContentStatus["DELETED"] = "Deleted";
1743
+ EContentStatus["MARK_FOR_DELETION"] = "MarkedForDeletion";
1744
+ })(EContentStatus = NsCardContent.EContentStatus || (NsCardContent.EContentStatus = {}));
1745
+ var ACBPConst;
1746
+ (function (ACBPConst) {
1747
+ ACBPConst["UPCOMING"] = "upcoming";
1748
+ ACBPConst["ALL"] = "All";
1749
+ ACBPConst["OVERDUE"] = "overdue";
1750
+ ACBPConst["SUCCESS"] = "success";
1751
+ })(ACBPConst = NsCardContent.ACBPConst || (NsCardContent.ACBPConst = {}));
1752
+ var IGOTConst;
1753
+ (function (IGOTConst) {
1754
+ IGOTConst["COMPETENCIES"] = "competencies_v5";
1755
+ IGOTConst["RETIRED"] = "Retired";
1756
+ })(IGOTConst = NsCardContent.IGOTConst || (NsCardContent.IGOTConst = {}));
1757
+ })(NsCardContent || (NsCardContent = {}));
1758
+
1681
1759
  /**
1682
1760
  * @fileoverview added by tsickle
1683
1761
  * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1684
1762
  */
1685
1763
  /** @type {?} */
1686
- var moment = moment$4;
1687
- // tslint:enable
1688
- // TODO: move this in some common place
1764
+ var dayjs = dayjs_
1765
+ // import { environment } from 'src/environments/environment'
1766
+ ;
1689
1767
  /** @type {?} */
1690
1768
  var PROTECTED_SLAG_V8 = '/apis/protected/v8';
1691
1769
  var ɵ0 = /**
1692
- * @param {?} type
1693
- * @param {?} id
1770
+ * @param {?} userId
1694
1771
  * @return {?}
1695
1772
  */
1696
- function (type, id) {
1697
- return PROTECTED_SLAG_V8 + "/content/collection/" + type + "/" + id;
1773
+ function (userId) {
1774
+ return PROTECTED_SLAG_V8 + "/user/group/fetchUserGroup?userId=" + userId;
1698
1775
  }, ɵ1 = /**
1699
- * @param {?} contentId
1776
+ * @param {?} userId
1700
1777
  * @return {?}
1701
1778
  */
1702
- function (contentId) { return PROTECTED_SLAG_V8 + "/user/progress/" + contentId; }, ɵ2 = /**
1703
- * @param {?} certId
1779
+ function (userId) {
1780
+ // tslint:disable-next-line: max-line-length
1781
+ return "/apis/proxies/v8/learner/course/v2/user/enrollment/list/" + userId + "?orgdetails=orgName,email&licenseDetails=name,description,url&fields=contentType,primaryCategory,courseCategory,topic,name,channel,mimeType,appIcon,gradeLevel,resourceType,identifier,medium,pkgVersion,board,subject,trackable,posterImage,duration,creatorLogo,license,version,versionKey,avgRating,additionalTags," + NsCardContent.IGOTConst.COMPETENCIES + "&batchDetails=name,endDate,startDate,status,enrollmentType,createdBy,certificates,batchAttributes";
1782
+ }, ɵ2 = /**
1783
+ * @param {?} userId
1704
1784
  * @return {?}
1705
1785
  */
1706
- function (certId) { return PROTECTED_SLAG_V8 + "/cohorts/course/batch/cert/download/" + certId; }, ɵ3 = /**
1707
- * @param {?} contentId
1786
+ function (userId) {
1787
+ // tslint:disable-next-line: max-line-length
1788
+ return "/apis/proxies/v8/learner/course/v2/user/enrollment/list/" + userId + "?orgdetails=orgName,email&licenseDetails=name,description,url&fields=contentType,primaryCategory,courseCategory,topic,name,channel,mimeType,appIcon,gradeLevel,resourceType,identifier,medium,pkgVersion,board,subject,trackable,posterImage,duration,creatorLogo,license,version,versionKey,avgRating,additionalTags," + NsCardContent.IGOTConst.COMPETENCIES + "&batchDetails=name,endDate,startDate,status,enrollmentType,createdBy,certificates,batchAttributes&retiredCoursesEnabled=true";
1789
+ }, ɵ3 = /**
1790
+ * @param {?} userId
1791
+ * @param {?} orgdetails
1792
+ * @param {?} licenseDetails
1793
+ * @param {?} fields
1794
+ * @param {?} batchDetails
1708
1795
  * @return {?}
1709
1796
  */
1710
- function (contentId) { return "/apis/proxies/v8/action/content/v3/read/" + contentId; };
1797
+ function (userId, orgdetails, licenseDetails, fields, batchDetails) {
1798
+ // tslint:disable-next-line: max-line-length
1799
+ return "apis/proxies/v8/learner/course/v2/user/enrollment/list/" + userId + "?orgdetails=" + orgdetails + "&licenseDetails=" + licenseDetails + "&fields=" + fields + ",courseCategory," + NsCardContent.IGOTConst.COMPETENCIES + "&batchDetails=" + batchDetails;
1800
+ };
1711
1801
  /** @type {?} */
1712
1802
  var API_END_POINTS = {
1713
- CONTENT: PROTECTED_SLAG_V8 + "/content",
1714
- AUTHORING_CONTENT: "/api/course/v1/hierarchy",
1715
- CONTENT_LIKES: PROTECTED_SLAG_V8 + "/content/likeCount",
1716
- SET_S3_COOKIE: PROTECTED_SLAG_V8 + "/content/setCookie",
1717
- SET_S3_IMAGE_COOKIE: PROTECTED_SLAG_V8 + "/content/setImageCookie",
1718
- FETCH_MANIFEST: PROTECTED_SLAG_V8 + "/content/getWebModuleManifest",
1719
- FETCH_WEB_MODULE_FILES: PROTECTED_SLAG_V8 + "/content/getWebModuleFiles",
1720
- MULTIPLE_CONTENT: PROTECTED_SLAG_V8 + "/content/multiple",
1721
- CONTENT_SEARCH_V5: PROTECTED_SLAG_V8 + "/content/searchV5",
1722
- CONTENT_SEARCH_V6: "/apis/proxies/v8/sunbirdigot/search",
1723
- TRENDING_CONTENT_SEARCH: "apis/proxies/v8/trending/content/search",
1724
- CONTENT_SEARCH_RELATED_CBP_V6: "/apis/proxies/v8/sunbirdigot/search",
1725
- CONTENT_SEARCH_REGION_RECOMMENDATION: PROTECTED_SLAG_V8 + "/content/searchRegionRecommendation",
1726
- CONTENT_HISTORY: PROTECTED_SLAG_V8 + "/user/history",
1727
- CONTENT_HISTORYV2: "/apis/proxies/v8/read/content-progres",
1728
- COURSE_BATCH_LIST: "/apis/proxies/v8/learner/course/v1/batch/list",
1729
- COURSE_BATCH: "/apis/proxies/v8/course/v1/batch/read",
1730
- AUTO_ASSIGN_BATCH: "/apis/protected/v8/cohorts/user/autoenrollment/",
1731
- AUTO_ASSIGN_CURATED_BATCH: "/apis/proxies/v8/curatedprogram/v1/enrol",
1732
- AUTO_ASSIGN_OPEN_PROGRAM: "/apis/proxies/v8/openprogram/v1/enrol",
1733
- USER_CONTINUE_LEARNING: PROTECTED_SLAG_V8 + "/user/history/continue",
1734
- CONTENT_RATING: PROTECTED_SLAG_V8 + "/user/rating",
1735
- COLLECTION_HIERARCHY: (ɵ0),
1736
- REGISTRATION_STATUS: PROTECTED_SLAG_V8 + "/admin/userRegistration/checkUserRegistrationContent",
1737
- MARK_AS_COMPLETE_META: (ɵ1),
1738
- ENROLL_BATCH: "/apis/proxies/v8/learner/course/v1/enrol",
1739
- ENROLL_BATCH_WF: "/apis/proxies/v8/workflow/blendedprogram/enrol",
1740
- WITHDRAW_BATCH_WF: "/apis/proxies/v8/workflow/blendedprogram/unenrol",
1741
- BLENDED_USER_WF: "/apis/proxies/v8/workflow/blendedprogram/user/search",
1742
- BLENDED_USER_COUNT: "apis/proxies/v8/workflow/blendedprogram/enrol/status/count",
1743
- CERT_ADD_TEMPLATE: PROTECTED_SLAG_V8 + "/cohorts/course/batch/cert/template/add",
1744
- CERT_ISSUE: PROTECTED_SLAG_V8 + "/cohorts/course/batch/cert/issue",
1745
- CERT_DOWNLOAD: (ɵ2),
1746
- READ_KARMAPOINTS: "/apis/proxies/v8/karmapoints/read",
1747
- CONTENT_READ: (ɵ3),
1748
- READ_COURSE_KARMAPOINTS: '/apis/proxies/v8/karmapoints/user/course/read',
1749
- CLAIM_KARMAPOINTS: '/apis/proxies/v8/claimkarmapoints',
1750
- USER_KARMA_POINTS: '/apis/proxies/v8/user/totalkarmapoints',
1751
- AGGREGATION_SEARCH: '/apis/proxies/v8/content/aggregation/search',
1752
- FEATURE_SEARCH: '/apis/proxies/v8/featured/content/search',
1803
+ FETCH_USER_GROUPS: (ɵ0),
1804
+ FETCH_CPB_PLANS: "/apis/proxies/v8/user/v1/cbplan",
1805
+ FETCH_USER_ENROLLMENT_LIST: (ɵ1),
1806
+ FETCH_USER_ENROLLMENT_LIST_PROFILE: (ɵ2),
1807
+ // tslint:disable-next-line: max-line-length
1808
+ FETCH_USER_ENROLLMENT_LIST_V2: (ɵ3),
1753
1809
  };
1754
- var WidgetContentService = /** @class */ (function () {
1755
- function WidgetContentService(http, configSvc) {
1810
+ var WidgetUserServiceLib = /** @class */ (function () {
1811
+ function WidgetUserServiceLib(environment, http) {
1756
1812
  this.http = http;
1757
- this.configSvc = configSvc;
1758
- this.tocConfigData = new rxjs.BehaviorSubject({});
1759
- this.tocConfigData$ = this.tocConfigData.asObservable();
1760
- this.telemetryData = new rxjs.Subject();
1761
- this.telemetryData$ = this.telemetryData.asObservable();
1762
- this.programChildCourseResumeData = new rxjs.BehaviorSubject({});
1763
- this.programChildCourseResumeData$ = this.programChildCourseResumeData.asObservable();
1813
+ this.environment = environment;
1764
1814
  }
1765
1815
  /**
1766
- * @param {?} message
1816
+ * @param {?} error
1767
1817
  * @return {?}
1768
1818
  */
1769
- WidgetContentService.prototype.changeTelemetryData = /**
1770
- * @param {?} message
1819
+ WidgetUserServiceLib.prototype.handleError = /**
1820
+ * @param {?} error
1771
1821
  * @return {?}
1772
1822
  */
1773
- function (message) {
1774
- this.telemetryData.next(message);
1823
+ function (error) {
1824
+ /** @type {?} */
1825
+ var errorMessage = '';
1826
+ if (error.error instanceof ErrorEvent) {
1827
+ errorMessage = "Error: " + error.error.message;
1828
+ }
1829
+ return rxjs.throwError(errorMessage);
1775
1830
  };
1776
1831
  /**
1777
- * @param {?} primaryCategory
1832
+ * @param {?} userId
1778
1833
  * @return {?}
1779
1834
  */
1780
- WidgetContentService.prototype.isResource = /**
1781
- * @param {?} primaryCategory
1835
+ WidgetUserServiceLib.prototype.fetchUserGroupDetails = /**
1836
+ * @param {?} userId
1782
1837
  * @return {?}
1783
1838
  */
1784
- function (primaryCategory) {
1785
- if (primaryCategory) {
1786
- /** @type {?} */
1787
- var isResource = (primaryCategory === NsContent.EResourcePrimaryCategories.LEARNING_RESOURCE) ||
1788
- (primaryCategory === NsContent.EResourcePrimaryCategories.PRACTICE_RESOURCE) ||
1789
- (primaryCategory === NsContent.EResourcePrimaryCategories.FINAL_ASSESSMENT) ||
1790
- (primaryCategory === NsContent.EResourcePrimaryCategories.COMP_ASSESSMENT) ||
1791
- (primaryCategory === NsContent.EResourcePrimaryCategories.OFFLINE_SESSION);
1792
- return isResource;
1793
- }
1794
- return false;
1839
+ function (userId) {
1840
+ return this.http
1841
+ .get(API_END_POINTS.FETCH_USER_GROUPS(userId))
1842
+ .pipe(operators.catchError(this.handleError));
1795
1843
  };
1844
+ // tslint:disable-next-line: max-line-length
1845
+ // tslint:disable-next-line: max-line-length
1796
1846
  /**
1797
- * @param {?} identifier
1847
+ * @param {?} userId
1848
+ * @param {?=} queryParams
1798
1849
  * @return {?}
1799
1850
  */
1800
- WidgetContentService.prototype.fetchMarkAsCompleteMeta = /**
1801
- * @param {?} identifier
1851
+ WidgetUserServiceLib.prototype.fetchUserBatchList =
1852
+ // tslint:disable-next-line: max-line-length
1853
+ /**
1854
+ * @param {?} userId
1855
+ * @param {?=} queryParams
1802
1856
  * @return {?}
1803
1857
  */
1804
- function (identifier) {
1805
- // tslint:disable-next-line
1858
+ function (userId, queryParams) {
1859
+ var _this = this;
1806
1860
  /** @type {?} */
1807
- var url = API_END_POINTS.MARK_AS_COMPLETE_META(identifier)
1808
- // return this.http.get(url).toPromise()
1809
- ;
1810
- // return this.http.get(url).toPromise()
1811
- if (url) { }
1812
- return rxjs.of().toPromise();
1861
+ var path = '';
1862
+ if (queryParams) {
1863
+ // tslint:disable-next-line: max-line-length
1864
+ path = API_END_POINTS.FETCH_USER_ENROLLMENT_LIST_V2(userId, queryParams.orgdetails, queryParams.licenseDetails, queryParams.fields, queryParams.batchDetails);
1865
+ }
1866
+ else {
1867
+ path = API_END_POINTS.FETCH_USER_ENROLLMENT_LIST(userId);
1868
+ }
1869
+ /** @type {?} */
1870
+ var headers = new http.HttpHeaders({
1871
+ 'Cache-Control': 'no-cache, no-store, must-revalidate, post-check=0, pre-check=0',
1872
+ Pragma: 'no-cache',
1873
+ Expires: '0',
1874
+ });
1875
+ /** @type {?} */
1876
+ var result = this.http.get(path, { headers: headers }).pipe(operators.catchError(this.handleError), operators.map((/**
1877
+ * @param {?} data
1878
+ * @return {?}
1879
+ */
1880
+ function (data) {
1881
+ /** @type {?} */
1882
+ var coursesData = [];
1883
+ if (data && data.result && data.result.courses) {
1884
+ data.result.courses.forEach((/**
1885
+ * @param {?} content
1886
+ * @return {?}
1887
+ */
1888
+ function (content) {
1889
+ if (content.contentStatus) {
1890
+ delete content.contentStatus;
1891
+ }
1892
+ coursesData.push(content);
1893
+ }));
1894
+ _this.storeUserEnrollmentInfo(data.result.userCourseEnrolmentInfo, data.result.courses.length);
1895
+ data.result.courses = coursesData;
1896
+ }
1897
+ return data.result;
1898
+ })));
1899
+ return result;
1813
1900
  };
1901
+ // tslint:disable-next-line: max-line-length
1902
+ // tslint:disable-next-line: max-line-length
1814
1903
  /**
1815
- * @param {?} data
1904
+ * @param {?} userId
1905
+ * @param {?=} queryParams
1816
1906
  * @return {?}
1817
1907
  */
1818
- WidgetContentService.prototype.updateTocConfig = /**
1819
- * @param {?} data
1908
+ WidgetUserServiceLib.prototype.fetchProfileUserBatchList =
1909
+ // tslint:disable-next-line: max-line-length
1910
+ /**
1911
+ * @param {?} userId
1912
+ * @param {?=} queryParams
1820
1913
  * @return {?}
1821
1914
  */
1822
- function (data) {
1823
- this.tocConfigData.next(data);
1915
+ function (userId, queryParams) {
1916
+ /** @type {?} */
1917
+ var path = '';
1918
+ if (queryParams) {
1919
+ // tslint:disable-next-line: max-line-length
1920
+ path = API_END_POINTS.FETCH_USER_ENROLLMENT_LIST_V2(userId, queryParams.orgdetails, queryParams.licenseDetails, queryParams.fields, queryParams.batchDetails);
1921
+ }
1922
+ else {
1923
+ path = API_END_POINTS.FETCH_USER_ENROLLMENT_LIST_PROFILE(userId);
1924
+ }
1925
+ /** @type {?} */
1926
+ var headers = new http.HttpHeaders({
1927
+ 'Cache-Control': 'no-cache, no-store, must-revalidate, post-check=0, pre-check=0',
1928
+ Pragma: 'no-cache',
1929
+ Expires: '0',
1930
+ });
1931
+ return this.http
1932
+ .get(path, { headers: headers })
1933
+ .pipe(operators.catchError(this.handleError), operators.map((/**
1934
+ * @param {?} data
1935
+ * @return {?}
1936
+ */
1937
+ function (data) { return data.result; })));
1824
1938
  };
1825
1939
  /**
1826
- * @param {?} contentId
1827
- * @param {?=} hierarchyType
1828
- * @param {?=} _additionalFields
1829
- * @param {?=} primaryCategory
1940
+ * @param {?} key
1941
+ * @param {?} dataKey
1830
1942
  * @return {?}
1831
1943
  */
1832
- WidgetContentService.prototype.fetchContent = /**
1833
- * @param {?} contentId
1834
- * @param {?=} hierarchyType
1835
- * @param {?=} _additionalFields
1836
- * @param {?=} primaryCategory
1944
+ WidgetUserServiceLib.prototype.checkStorageData = /**
1945
+ * @param {?} key
1946
+ * @param {?} dataKey
1837
1947
  * @return {?}
1838
1948
  */
1839
- function (contentId, hierarchyType, _additionalFields, primaryCategory) {
1840
- if (hierarchyType === void 0) { hierarchyType = 'detail'; }
1841
- if (_additionalFields === void 0) { _additionalFields = []; }
1842
- // const url = `${API_END_POINTS.CONTENT}/${contentId}?hierarchyType=${hierarchyType}`
1843
- /** @type {?} */
1844
- var url = '';
1949
+ function (key, dataKey) {
1845
1950
  /** @type {?} */
1846
- var forPreview = window.location.href.includes('/public/') || window.location.href.includes('&preview=true');
1847
- if (primaryCategory && this.isResource(primaryCategory)) {
1848
- if (!forPreview) {
1849
- url = "/apis/proxies/v8/action/content/v3/read/" + contentId;
1850
- }
1851
- else {
1852
- url = "/api/content/v1/read/" + contentId;
1853
- }
1854
- }
1855
- else {
1856
- if (!forPreview) {
1857
- url = "/apis/proxies/v8/action/content/v3/hierarchy/" + contentId + "?hierarchyType=" + hierarchyType;
1858
- }
1859
- else {
1951
+ var checkTime = localStorage.getItem('timeCheck');
1952
+ if (checkTime) {
1953
+ /** @type {?} */
1954
+ var parsedData = JSON.parse(checkTime);
1955
+ if (parsedData[key]) {
1860
1956
  /** @type {?} */
1861
- var forcreator = window.location.href.includes('editMode=true');
1862
- if (forcreator) {
1863
- url = "apis/proxies/v8/action/content/v3/hierarchy/" + contentId + "?mode=edit";
1864
- }
1865
- else {
1866
- url = "/api/course/v1/hierarchy/" + contentId + "?hierarchyType=" + hierarchyType;
1957
+ var date = dayjs();
1958
+ /** @type {?} */
1959
+ var diffMin = date.diff(parsedData[key], 'minute');
1960
+ /** @type {?} */
1961
+ var timeCheck = this.environment.apiCache || 0;
1962
+ if (diffMin >= timeCheck) {
1963
+ return true;
1867
1964
  }
1965
+ return localStorage.getItem(dataKey) ? false : true;
1868
1966
  }
1967
+ return true;
1869
1968
  }
1870
- // return this.http
1871
- // .post<NsContent.IContent>(url, { additionalFields })
1872
- // .pipe(retry(1))
1873
- return this.http
1874
- .get(url)
1875
- .pipe(operators.shareReplay(1));
1876
- // if (apiData && apiData.result) {
1877
- // return apiData.result.content
1878
- // }
1969
+ return true;
1879
1970
  };
1880
1971
  /**
1881
- * @param {?} contentId
1972
+ * @param {?} key
1882
1973
  * @return {?}
1883
1974
  */
1884
- WidgetContentService.prototype.fetchAuthoringContent = /**
1885
- * @param {?} contentId
1975
+ WidgetUserServiceLib.prototype.getData = /**
1976
+ * @param {?} key
1886
1977
  * @return {?}
1887
1978
  */
1888
- function (contentId) {
1889
- /** @type {?} */
1890
- var forcreator = window.location.href.includes('editMode=true');
1891
- /** @type {?} */
1892
- var url = '';
1893
- if (forcreator) {
1894
- url = "apis/proxies/v8/action/content/v3/hierarchy/" + contentId + "?mode=edit";
1895
- }
1896
- else {
1897
- url = API_END_POINTS.AUTHORING_CONTENT + "/" + contentId + "?hierarchyType=detail";
1898
- }
1899
- return this.http.get(url).pipe(operators.shareReplay(1), (/**
1900
- * @param {?} r
1901
- * @return {?}
1902
- */
1903
- function (r) { return r; }));
1979
+ function (key) {
1980
+ return rxjs.Observable.of(JSON.parse(localStorage.getItem(key) || '{}'));
1904
1981
  };
1905
1982
  /**
1906
- * @param {?} ids
1983
+ * @param {?} key
1907
1984
  * @return {?}
1908
1985
  */
1909
- WidgetContentService.prototype.fetchMultipleContent = /**
1910
- * @param {?} ids
1986
+ WidgetUserServiceLib.prototype.getSavedData = /**
1987
+ * @param {?} key
1911
1988
  * @return {?}
1912
1989
  */
1913
- function (ids) {
1914
- return this.http.get(API_END_POINTS.MULTIPLE_CONTENT + "/" + ids.join(','));
1990
+ function (key) {
1991
+ return JSON.parse(localStorage.getItem(key) || '');
1915
1992
  };
1916
1993
  /**
1917
- * @param {?} type
1918
- * @param {?} id
1919
- * @param {?=} pageNumber
1920
- * @param {?=} pageSize
1994
+ * @param {?} key
1921
1995
  * @return {?}
1922
1996
  */
1923
- WidgetContentService.prototype.fetchCollectionHierarchy = /**
1924
- * @param {?} type
1925
- * @param {?} id
1926
- * @param {?=} pageNumber
1927
- * @param {?=} pageSize
1997
+ WidgetUserServiceLib.prototype.setTime = /**
1998
+ * @param {?} key
1928
1999
  * @return {?}
1929
2000
  */
1930
- function (type, id, pageNumber, pageSize) {
1931
- if (pageNumber === void 0) { pageNumber = 0; }
1932
- if (pageSize === void 0) { pageSize = 1; }
1933
- return this.http.get(API_END_POINTS.COLLECTION_HIERARCHY(type, id) + "?pageNumber=" + pageNumber + "&pageSize=" + pageSize);
2001
+ function (key) {
2002
+ /** @type {?} */
2003
+ var checkTime = localStorage.getItem('timeCheck');
2004
+ if (checkTime) {
2005
+ /** @type {?} */
2006
+ var parsedData = JSON.parse(checkTime);
2007
+ parsedData[key] = new Date().getTime();
2008
+ localStorage.setItem('timeCheck', JSON.stringify(parsedData));
2009
+ }
2010
+ else {
2011
+ /** @type {?} */
2012
+ var data = {};
2013
+ data[key] = new Date().getTime();
2014
+ localStorage.setItem('timeCheck', JSON.stringify(data));
2015
+ }
1934
2016
  };
1935
2017
  /**
2018
+ * @param {?} key
1936
2019
  * @return {?}
1937
2020
  */
1938
- WidgetContentService.prototype.fetchBlendedCourse = /**
2021
+ WidgetUserServiceLib.prototype.resetTime = /**
2022
+ * @param {?} key
1939
2023
  * @return {?}
1940
2024
  */
1941
- function () {
2025
+ function (key) {
2026
+ /** @type {?} */
2027
+ var checkTime = localStorage.getItem('timeCheck');
2028
+ if (checkTime) {
2029
+ /** @type {?} */
2030
+ var parsedData = JSON.parse(checkTime);
2031
+ if (parsedData[key]) {
2032
+ delete parsedData[key];
2033
+ localStorage.setItem('timeCheck', JSON.stringify(parsedData));
2034
+ }
2035
+ }
1942
2036
  };
1943
2037
  /**
1944
- * @param {?} req
2038
+ * @param {?} userId
1945
2039
  * @return {?}
1946
2040
  */
1947
- WidgetContentService.prototype.fetchCourseBatches = /**
1948
- * @param {?} req
2041
+ WidgetUserServiceLib.prototype.fetchCbpPlanList = /**
2042
+ * @param {?} userId
1949
2043
  * @return {?}
1950
2044
  */
1951
- function (req) {
1952
- return this.http
1953
- .post(API_END_POINTS.COURSE_BATCH_LIST, req)
1954
- .pipe(operators.retry(1), operators.map((/**
1955
- * @param {?} data
1956
- * @return {?}
1957
- */
1958
- function (data) { return data.result.response; })));
2045
+ function (userId) {
2046
+ var _this = this;
2047
+ if (this.checkStorageData('cbpService', 'cbpData')) {
2048
+ /** @type {?} */
2049
+ var result = this.http.get(API_END_POINTS.FETCH_CPB_PLANS).pipe(operators.catchError(this.handleError), operators.map((/**
2050
+ * @param {?} data
2051
+ * @return {?}
2052
+ */
2053
+ function (data) { return __awaiter(_this, void 0, void 0, function () {
2054
+ var cbpData, cbpDoIds, cbpContentData, responseData;
2055
+ var _this = this;
2056
+ return __generator(this, function (_a) {
2057
+ switch (_a.label) {
2058
+ case 0:
2059
+ if (!(data.result && data.result.content && data.result.content.length)) return [3 /*break*/, 3];
2060
+ cbpData = this.getCbpFormatedData(data.result.content);
2061
+ cbpDoIds = cbpData.contentIds.join(',');
2062
+ cbpContentData = cbpData.cbpContentData || [];
2063
+ return [4 /*yield*/, this.fetchEnrollmentDataByContentId(userId, cbpDoIds).toPromise().then((/**
2064
+ * @param {?} res
2065
+ * @return {?}
2066
+ */
2067
+ function (res) { return __awaiter(_this, void 0, void 0, function () {
2068
+ var enrollData;
2069
+ return __generator(this, function (_a) {
2070
+ enrollData = {};
2071
+ if (res && res.courses && res.courses.length) {
2072
+ res.courses.forEach((/**
2073
+ * @param {?} data
2074
+ * @return {?}
2075
+ */
2076
+ function (data) {
2077
+ enrollData[data.collectionId] = data;
2078
+ }));
2079
+ return [2 /*return*/, enrollData];
2080
+ }
2081
+ else {
2082
+ return [2 /*return*/, {}];
2083
+ }
2084
+ return [2 /*return*/];
2085
+ });
2086
+ }); })).catch((/**
2087
+ * @param {?} _err
2088
+ * @return {?}
2089
+ */
2090
+ function (_err) {
2091
+ return {};
2092
+ }))];
2093
+ case 1:
2094
+ responseData = _a.sent();
2095
+ return [4 /*yield*/, this.mapCbpData(cbpContentData, responseData)];
2096
+ case 2: return [2 /*return*/, _a.sent()];
2097
+ case 3: return [2 /*return*/];
2098
+ }
2099
+ });
2100
+ }); })));
2101
+ this.setTime('cbpService');
2102
+ return result;
2103
+ }
2104
+ return this.getData('cbpData');
1959
2105
  };
1960
- // fetch individual batch
1961
- // fetch individual batch
1962
2106
  /**
1963
- * @param {?} batchId
2107
+ * @param {?} enrollmentData
2108
+ * @param {?} enrolledCourseCount
1964
2109
  * @return {?}
1965
2110
  */
1966
- WidgetContentService.prototype.fetchCourseBatch =
1967
- // fetch individual batch
1968
- /**
1969
- * @param {?} batchId
2111
+ WidgetUserServiceLib.prototype.storeUserEnrollmentInfo = /**
2112
+ * @param {?} enrollmentData
2113
+ * @param {?} enrolledCourseCount
1970
2114
  * @return {?}
1971
2115
  */
1972
- function (batchId) {
1973
- return this.http.get(API_END_POINTS.COURSE_BATCH + "/" + batchId);
2116
+ function (enrollmentData, enrolledCourseCount) {
2117
+ /** @type {?} */
2118
+ var userData = {
2119
+ enrolledCourseCount: enrolledCourseCount,
2120
+ userCourseEnrolmentInfo: enrollmentData,
2121
+ };
2122
+ localStorage.removeItem('userEnrollmentCount');
2123
+ localStorage.setItem('userEnrollmentCount', JSON.stringify(userData));
1974
2124
  };
1975
2125
  /**
1976
- * @param {?} identifier
2126
+ * @param {?} userId
2127
+ * @param {?} contentdata
1977
2128
  * @return {?}
1978
2129
  */
1979
- WidgetContentService.prototype.autoAssignBatchApi = /**
1980
- * @param {?} identifier
2130
+ WidgetUserServiceLib.prototype.fetchEnrollmentDataByContentId = /**
2131
+ * @param {?} userId
2132
+ * @param {?} contentdata
1981
2133
  * @return {?}
1982
2134
  */
1983
- function (identifier) {
1984
- return this.http.get("" + API_END_POINTS.AUTO_ASSIGN_BATCH + identifier)
1985
- .pipe(operators.retry(1), operators.map((/**
2135
+ function (userId, contentdata) {
2136
+ /** @type {?} */
2137
+ var path = API_END_POINTS.FETCH_USER_ENROLLMENT_LIST(userId);
2138
+ path = path + "&courseIds=" + contentdata + "&cache=false'";
2139
+ /** @type {?} */
2140
+ var headers = new http.HttpHeaders({
2141
+ 'Cache-Control': 'no-cache, no-store, must-revalidate, post-check=0, pre-check=0',
2142
+ Pragma: 'no-cache',
2143
+ Expires: '0',
2144
+ });
2145
+ return this.http
2146
+ .get(path, { headers: headers })
2147
+ .pipe(operators.catchError(this.handleError), operators.map((/**
1986
2148
  * @param {?} data
1987
2149
  * @return {?}
1988
2150
  */
1989
- function (data) { return data.result.response; })));
2151
+ function (data) { return data.result; })));
1990
2152
  };
1991
2153
  /**
1992
- * @param {?} request
1993
- * @param {?} programType
2154
+ * @param {?} cbpContent
1994
2155
  * @return {?}
1995
2156
  */
1996
- WidgetContentService.prototype.autoAssignCuratedBatchApi = /**
1997
- * @param {?} request
1998
- * @param {?} programType
2157
+ WidgetUserServiceLib.prototype.getCbpFormatedData = /**
2158
+ * @param {?} cbpContent
1999
2159
  * @return {?}
2000
2160
  */
2001
- function (request, programType) {
2161
+ function (cbpContent) {
2002
2162
  /** @type {?} */
2003
- var url = programType === NsContent.ECourseCategory.MODERATED_PROGRAM ?
2004
- API_END_POINTS.AUTO_ASSIGN_OPEN_PROGRAM : API_END_POINTS.AUTO_ASSIGN_CURATED_BATCH;
2005
- return this.http.post("" + url, request)
2006
- .pipe(operators.retry(1), operators.map((/**
2007
- * @param {?} data
2163
+ var cbpContentData = [];
2164
+ /** @type {?} */
2165
+ var contentIds = [];
2166
+ /** @type {?} */
2167
+ var todayDate = dayjs().format('YYYY-MM-DD');
2168
+ cbpContent.forEach((/**
2169
+ * @param {?} c
2008
2170
  * @return {?}
2009
2171
  */
2010
- function (data) { return data.result.response; })));
2011
- };
2012
- /**
2013
- * @param {?} req
2014
- * @return {?}
2015
- */
2016
- WidgetContentService.prototype.enrollUserToBatch = /**
2017
- * @param {?} req
2018
- * @return {?}
2019
- */
2020
- function (req) {
2021
- return this.http
2022
- .post(API_END_POINTS.ENROLL_BATCH, req)
2023
- .toPromise();
2024
- };
2025
- /**
2026
- * @param {?} req
2027
- * @param {?} type
2028
- * @return {?}
2029
- */
2030
- WidgetContentService.prototype.enrollAndUnenrollUserToBatchWF = /**
2031
- * @param {?} req
2032
- * @param {?} type
2033
- * @return {?}
2034
- */
2035
- function (req, type) {
2036
- /** @type {?} */
2037
- var url = type === 'WITHDRAW' ? API_END_POINTS.WITHDRAW_BATCH_WF : API_END_POINTS.ENROLL_BATCH_WF;
2038
- return this.http
2039
- .post(url, req)
2040
- .toPromise();
2172
+ function (c) {
2173
+ c.contentList.forEach((/**
2174
+ * @param {?} childData
2175
+ * @return {?}
2176
+ */
2177
+ function (childData) {
2178
+ /** @type {?} */
2179
+ var endDate = dayjs(c.endDate).format('YYYY-MM-DD');
2180
+ /** @type {?} */
2181
+ var daysCount = dayjs(endDate).diff(todayDate, 'day');
2182
+ childData['planDuration'] = daysCount < 0 ? NsCardContent.ACBPConst.OVERDUE : daysCount > 29
2183
+ ? NsCardContent.ACBPConst.SUCCESS : NsCardContent.ACBPConst.UPCOMING;
2184
+ childData['endDate'] = c.endDate;
2185
+ childData['parentId'] = c.id;
2186
+ childData['planType'] = 'cbPlan';
2187
+ childData['contentStatus'] = 0;
2188
+ contentIds.push(childData.identifier);
2189
+ if (childData.status !== NsCardContent.IGOTConst.RETIRED) {
2190
+ cbpContentData.push(childData);
2191
+ }
2192
+ }));
2193
+ }));
2194
+ return { cbpContentData: cbpContentData, contentIds: contentIds };
2041
2195
  };
2042
2196
  /**
2043
- * @param {?} req
2197
+ * @param {?} cbpContent
2198
+ * @param {?} enrollmentData
2044
2199
  * @return {?}
2045
2200
  */
2046
- WidgetContentService.prototype.fetchBlendedUserWF = /**
2047
- * @param {?} req
2201
+ WidgetUserServiceLib.prototype.mapCbpData = /**
2202
+ * @param {?} cbpContent
2203
+ * @param {?} enrollmentData
2048
2204
  * @return {?}
2049
2205
  */
2050
- function (req) {
2051
- return this.http
2052
- .post(API_END_POINTS.BLENDED_USER_WF, req)
2053
- .toPromise();
2054
- };
2055
- /**
2056
- * @param {?} req
2057
- * @return {?}
2206
+ function (cbpContent, enrollmentData) {
2207
+ return __awaiter(this, void 0, void 0, function () {
2208
+ var cbpFilteredContent, sortedData, uniqueUsersByID, sortedByEndDate, sortedByStatus;
2209
+ return __generator(this, function (_a) {
2210
+ cbpFilteredContent = [];
2211
+ if (cbpContent && cbpContent.length) {
2212
+ if (Object.keys(enrollmentData).length) {
2213
+ cbpContent.forEach((/**
2214
+ * @param {?} cbp
2215
+ * @return {?}
2216
+ */
2217
+ function (cbp) {
2218
+ /** @type {?} */
2219
+ var childEnrollData = enrollmentData[cbp.identifier];
2220
+ /** @type {?} */
2221
+ var competencyArea = [];
2222
+ /** @type {?} */
2223
+ var competencyTheme = [];
2224
+ /** @type {?} */
2225
+ var competencyThemeType = [];
2226
+ /** @type {?} */
2227
+ var competencySubTheme = [];
2228
+ /** @type {?} */
2229
+ var competencyAreaId = [];
2230
+ /** @type {?} */
2231
+ var competencyThemeId = [];
2232
+ /** @type {?} */
2233
+ var competencySubThemeId = [];
2234
+ cbp['contentStatus'] = 0;
2235
+ if (childEnrollData) {
2236
+ cbp['contentStatus'] = childEnrollData.status;
2237
+ }
2238
+ if (cbp.competencies_v5) {
2239
+ cbp.competencies_v5.forEach((/**
2240
+ * @param {?} element
2241
+ * @return {?}
2242
+ */
2243
+ function (element) {
2244
+ if (!competencyArea.includes(element.competencyArea)) {
2245
+ competencyArea.push(element.competencyArea);
2246
+ competencyAreaId.push(element.competencyAreaId);
2247
+ }
2248
+ if (!competencyTheme.includes(element.competencyTheme)) {
2249
+ competencyTheme.push(element.competencyTheme);
2250
+ competencyThemeId.push(element.competencyThemeId);
2251
+ }
2252
+ if (!competencyThemeType.includes(element.competencyThemeType)) {
2253
+ competencyThemeType.push(element.competencyThemeType);
2254
+ }
2255
+ if (!competencySubTheme.includes(element.competencySubTheme)) {
2256
+ competencySubTheme.push(element.competencySubTheme);
2257
+ competencySubThemeId.push(element.competencySubThemeId);
2258
+ }
2259
+ }));
2260
+ }
2261
+ cbp['competencyArea'] = competencyArea;
2262
+ cbp['competencyTheme'] = competencyTheme;
2263
+ cbp['competencyThemeType'] = competencyThemeType;
2264
+ cbp['competencySubTheme'] = competencySubTheme;
2265
+ cbp['competencyAreaId'] = competencyAreaId;
2266
+ cbp['competencyThemeId'] = competencyThemeId;
2267
+ cbp['competencySubThemeId'] = competencySubThemeId;
2268
+ if (cbp.status !== NsCardContent.IGOTConst.RETIRED) {
2269
+ cbpFilteredContent.push(cbp);
2270
+ }
2271
+ else {
2272
+ if (childEnrollData && childEnrollData.status === 2) {
2273
+ cbpFilteredContent.push(cbp);
2274
+ }
2275
+ }
2276
+ }));
2277
+ if (cbpFilteredContent.length > 1) {
2278
+ sortedData = cbpFilteredContent.sort((/**
2279
+ * @param {?} a
2280
+ * @param {?} b
2281
+ * @return {?}
2282
+ */
2283
+ function (a, b) {
2284
+ /** @type {?} */
2285
+ var firstDate = new Date(a.endDate);
2286
+ /** @type {?} */
2287
+ var secondDate = new Date(b.endDate);
2288
+ return secondDate > firstDate ? 1 : -1;
2289
+ }));
2290
+ uniqueUsersByID = lodash.uniqBy(sortedData, 'identifier');
2291
+ sortedByEndDate = lodash.orderBy(uniqueUsersByID, ['endDate'], ['asc']);
2292
+ sortedByStatus = lodash.orderBy(sortedByEndDate, ['contentStatus'], ['asc']);
2293
+ localStorage.setItem('cbpData', JSON.stringify(sortedByStatus));
2294
+ return [2 /*return*/, sortedByStatus];
2295
+ }
2296
+ localStorage.setItem('cbpData', JSON.stringify(cbpFilteredContent));
2297
+ return [2 /*return*/, cbpFilteredContent];
2298
+ }
2299
+ localStorage.setItem('cbpData', JSON.stringify(cbpContent));
2300
+ return [2 /*return*/, cbpContent];
2301
+ }
2302
+ localStorage.setItem('cbpData', JSON.stringify([]));
2303
+ return [2 /*return*/, []];
2304
+ });
2305
+ });
2306
+ };
2307
+ /**
2308
+ * @param {?} courseData
2309
+ * @return {?}
2058
2310
  */
2059
- WidgetContentService.prototype.fetchBlendedUserCOUNT = /**
2060
- * @param {?} req
2311
+ WidgetUserServiceLib.prototype.mapEnrollmentData = /**
2312
+ * @param {?} courseData
2061
2313
  * @return {?}
2062
2314
  */
2063
- function (req) {
2064
- return this.http
2065
- .post(API_END_POINTS.BLENDED_USER_COUNT, req)
2066
- .toPromise();
2315
+ function (courseData) {
2316
+ /** @type {?} */
2317
+ var enrollData = {};
2318
+ if (courseData && courseData.courses.length) {
2319
+ courseData.courses.forEach((/**
2320
+ * @param {?} data
2321
+ * @return {?}
2322
+ */
2323
+ function (data) {
2324
+ enrollData[data.collectionId] = data;
2325
+ }));
2326
+ }
2327
+ return enrollData;
2067
2328
  };
2329
+ WidgetUserServiceLib.decorators = [
2330
+ { type: core.Injectable, args: [{
2331
+ providedIn: 'root',
2332
+ },] }
2333
+ ];
2334
+ /** @nocollapse */
2335
+ WidgetUserServiceLib.ctorParameters = function () { return [
2336
+ { type: undefined, decorators: [{ type: core.Inject, args: ['environment',] }] },
2337
+ { type: http.HttpClient }
2338
+ ]; };
2339
+ /** @nocollapse */ WidgetUserServiceLib.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function WidgetUserServiceLib_Factory() { return new WidgetUserServiceLib(core.ɵɵinject("environment"), core.ɵɵinject(http.HttpClient)); }, token: WidgetUserServiceLib, providedIn: "root" });
2340
+ return WidgetUserServiceLib;
2341
+ }());
2342
+ if (false) {
2343
+ /** @type {?} */
2344
+ WidgetUserServiceLib.prototype.environment;
2068
2345
  /**
2069
- * @param {?} contentIds
2346
+ * @type {?}
2347
+ * @private
2348
+ */
2349
+ WidgetUserServiceLib.prototype.http;
2350
+ }
2351
+
2352
+ /**
2353
+ * @fileoverview added by tsickle
2354
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2355
+ */
2356
+ /** @type {?} */
2357
+ var moment = moment$4;
2358
+ // tslint:enable
2359
+ // TODO: move this in some common place
2360
+ /** @type {?} */
2361
+ var PROTECTED_SLAG_V8$1 = '/apis/protected/v8';
2362
+ var ɵ0$1 = /**
2363
+ * @param {?} type
2364
+ * @param {?} id
2365
+ * @return {?}
2366
+ */
2367
+ function (type, id) {
2368
+ return PROTECTED_SLAG_V8$1 + "/content/collection/" + type + "/" + id;
2369
+ }, ɵ1$1 = /**
2370
+ * @param {?} contentId
2371
+ * @return {?}
2372
+ */
2373
+ function (contentId) { return PROTECTED_SLAG_V8$1 + "/user/progress/" + contentId; }, ɵ2$1 = /**
2374
+ * @param {?} certId
2375
+ * @return {?}
2376
+ */
2377
+ function (certId) { return PROTECTED_SLAG_V8$1 + "/cohorts/course/batch/cert/download/" + certId; }, ɵ3$1 = /**
2378
+ * @param {?} contentId
2379
+ * @return {?}
2380
+ */
2381
+ function (contentId) { return "/apis/proxies/v8/action/content/v3/read/" + contentId; };
2382
+ /** @type {?} */
2383
+ var API_END_POINTS$1 = {
2384
+ CONTENT: PROTECTED_SLAG_V8$1 + "/content",
2385
+ AUTHORING_CONTENT: "/api/course/v1/hierarchy",
2386
+ CONTENT_LIKES: PROTECTED_SLAG_V8$1 + "/content/likeCount",
2387
+ SET_S3_COOKIE: PROTECTED_SLAG_V8$1 + "/content/setCookie",
2388
+ SET_S3_IMAGE_COOKIE: PROTECTED_SLAG_V8$1 + "/content/setImageCookie",
2389
+ FETCH_MANIFEST: PROTECTED_SLAG_V8$1 + "/content/getWebModuleManifest",
2390
+ FETCH_WEB_MODULE_FILES: PROTECTED_SLAG_V8$1 + "/content/getWebModuleFiles",
2391
+ MULTIPLE_CONTENT: PROTECTED_SLAG_V8$1 + "/content/multiple",
2392
+ CONTENT_SEARCH_V5: PROTECTED_SLAG_V8$1 + "/content/searchV5",
2393
+ CONTENT_SEARCH_V6: "/apis/proxies/v8/sunbirdigot/search",
2394
+ TRENDING_CONTENT_SEARCH: "apis/proxies/v8/trending/content/search",
2395
+ CONTENT_SEARCH_RELATED_CBP_V6: "/apis/proxies/v8/sunbirdigot/search",
2396
+ CONTENT_SEARCH_REGION_RECOMMENDATION: PROTECTED_SLAG_V8$1 + "/content/searchRegionRecommendation",
2397
+ CONTENT_HISTORY: PROTECTED_SLAG_V8$1 + "/user/history",
2398
+ CONTENT_HISTORYV2: "/apis/proxies/v8/read/content-progres",
2399
+ COURSE_BATCH_LIST: "/apis/proxies/v8/learner/course/v1/batch/list",
2400
+ COURSE_BATCH: "/apis/proxies/v8/course/v1/batch/read",
2401
+ AUTO_ASSIGN_BATCH: "/apis/protected/v8/cohorts/user/autoenrollment/",
2402
+ AUTO_ASSIGN_CURATED_BATCH: "/apis/proxies/v8/curatedprogram/v1/enrol",
2403
+ AUTO_ASSIGN_OPEN_PROGRAM: "/apis/proxies/v8/openprogram/v1/enrol",
2404
+ USER_CONTINUE_LEARNING: PROTECTED_SLAG_V8$1 + "/user/history/continue",
2405
+ CONTENT_RATING: PROTECTED_SLAG_V8$1 + "/user/rating",
2406
+ COLLECTION_HIERARCHY: (ɵ0$1),
2407
+ REGISTRATION_STATUS: PROTECTED_SLAG_V8$1 + "/admin/userRegistration/checkUserRegistrationContent",
2408
+ MARK_AS_COMPLETE_META: (ɵ1$1),
2409
+ ENROLL_BATCH: "/apis/proxies/v8/learner/course/v1/enrol",
2410
+ ENROLL_BATCH_WF: "/apis/proxies/v8/workflow/blendedprogram/enrol",
2411
+ WITHDRAW_BATCH_WF: "/apis/proxies/v8/workflow/blendedprogram/unenrol",
2412
+ BLENDED_USER_WF: "/apis/proxies/v8/workflow/blendedprogram/user/search",
2413
+ BLENDED_USER_COUNT: "apis/proxies/v8/workflow/blendedprogram/enrol/status/count",
2414
+ CERT_ADD_TEMPLATE: PROTECTED_SLAG_V8$1 + "/cohorts/course/batch/cert/template/add",
2415
+ CERT_ISSUE: PROTECTED_SLAG_V8$1 + "/cohorts/course/batch/cert/issue",
2416
+ CERT_DOWNLOAD: (ɵ2$1),
2417
+ READ_KARMAPOINTS: "/apis/proxies/v8/karmapoints/read",
2418
+ CONTENT_READ: (ɵ3$1),
2419
+ READ_COURSE_KARMAPOINTS: '/apis/proxies/v8/karmapoints/user/course/read',
2420
+ CLAIM_KARMAPOINTS: '/apis/proxies/v8/claimkarmapoints',
2421
+ USER_KARMA_POINTS: '/apis/proxies/v8/user/totalkarmapoints',
2422
+ AGGREGATION_SEARCH: '/apis/proxies/v8/content/aggregation/search',
2423
+ FEATURE_SEARCH: '/apis/proxies/v8/featured/content/search',
2424
+ };
2425
+ var WidgetContentLibService = /** @class */ (function () {
2426
+ function WidgetContentLibService(http, configSvc, userSvc) {
2427
+ this.http = http;
2428
+ this.configSvc = configSvc;
2429
+ this.userSvc = userSvc;
2430
+ this.tocConfigData = new rxjs.BehaviorSubject({});
2431
+ this.tocConfigData$ = this.tocConfigData.asObservable();
2432
+ this.telemetryData = new rxjs.Subject();
2433
+ this.telemetryData$ = this.telemetryData.asObservable();
2434
+ this.programChildCourseResumeData = new rxjs.BehaviorSubject({});
2435
+ this.programChildCourseResumeData$ = this.programChildCourseResumeData.asObservable();
2436
+ }
2437
+ /**
2438
+ * @param {?} message
2070
2439
  * @return {?}
2071
2440
  */
2072
- WidgetContentService.prototype.fetchContentLikes = /**
2073
- * @param {?} contentIds
2441
+ WidgetContentLibService.prototype.changeTelemetryData = /**
2442
+ * @param {?} message
2074
2443
  * @return {?}
2075
2444
  */
2076
- function (contentIds) {
2077
- return this.http
2078
- .post(API_END_POINTS.CONTENT_LIKES, contentIds)
2079
- .toPromise();
2445
+ function (message) {
2446
+ this.telemetryData.next(message);
2080
2447
  };
2081
2448
  /**
2082
- * @param {?} contentIds
2449
+ * @param {?} primaryCategory
2083
2450
  * @return {?}
2084
2451
  */
2085
- WidgetContentService.prototype.fetchContentRatings = /**
2086
- * @param {?} contentIds
2452
+ WidgetContentLibService.prototype.isResource = /**
2453
+ * @param {?} primaryCategory
2087
2454
  * @return {?}
2088
2455
  */
2089
- function (contentIds) {
2090
- if (contentIds) { }
2091
- // return this.http
2092
- // .post(`${API_END_POINTS.CONTENT_RATING}/rating`, contentIds)
2093
- // .toPromise()
2094
- return rxjs.of().toPromise();
2456
+ function (primaryCategory) {
2457
+ if (primaryCategory) {
2458
+ /** @type {?} */
2459
+ var isResource = (primaryCategory === NsContent.EResourcePrimaryCategories.LEARNING_RESOURCE) ||
2460
+ (primaryCategory === NsContent.EResourcePrimaryCategories.PRACTICE_RESOURCE) ||
2461
+ (primaryCategory === NsContent.EResourcePrimaryCategories.FINAL_ASSESSMENT) ||
2462
+ (primaryCategory === NsContent.EResourcePrimaryCategories.COMP_ASSESSMENT) ||
2463
+ (primaryCategory === NsContent.EResourcePrimaryCategories.OFFLINE_SESSION);
2464
+ return isResource;
2465
+ }
2466
+ return false;
2095
2467
  };
2096
2468
  /**
2097
- * @param {?} contentId
2469
+ * @param {?} identifier
2098
2470
  * @return {?}
2099
2471
  */
2100
- WidgetContentService.prototype.fetchContentHistory = /**
2101
- * @param {?} contentId
2472
+ WidgetContentLibService.prototype.fetchMarkAsCompleteMeta = /**
2473
+ * @param {?} identifier
2102
2474
  * @return {?}
2103
2475
  */
2104
- function (contentId) {
2105
- return this.http.get(API_END_POINTS.CONTENT_HISTORY + "/" + contentId);
2476
+ function (identifier) {
2477
+ // tslint:disable-next-line
2478
+ /** @type {?} */
2479
+ var url = API_END_POINTS$1.MARK_AS_COMPLETE_META(identifier)
2480
+ // return this.http.get(url).toPromise()
2481
+ ;
2482
+ // return this.http.get(url).toPromise()
2483
+ if (url) { }
2484
+ return rxjs.of().toPromise();
2106
2485
  };
2107
2486
  /**
2108
- * @param {?} req
2487
+ * @param {?} data
2109
2488
  * @return {?}
2110
2489
  */
2111
- WidgetContentService.prototype.fetchContentHistoryV2 = /**
2112
- * @param {?} req
2490
+ WidgetContentLibService.prototype.updateTocConfig = /**
2491
+ * @param {?} data
2113
2492
  * @return {?}
2114
2493
  */
2115
- function (req) {
2116
- var _this = this;
2117
- req.request.fields = ['progressdetails'];
2118
- /** @type {?} */
2119
- var data = this.http.post(API_END_POINTS.CONTENT_HISTORYV2 + "/" + req.request.courseId, req);
2120
- data.subscribe((/**
2121
- * @param {?} subscribeData
2122
- * @return {?}
2123
- */
2124
- function (subscribeData) {
2125
- _this.programChildCourseResumeData.next({ resumeData: subscribeData.result.contentList, courseId: req.request.courseId });
2126
- }));
2127
- return data;
2494
+ function (data) {
2495
+ this.tocConfigData.next(data);
2128
2496
  };
2129
2497
  /**
2130
- * @param {?} id
2131
- * @param {?=} collectionId
2132
- * @param {?=} collectionType
2498
+ * @param {?} contentId
2499
+ * @param {?=} hierarchyType
2500
+ * @param {?=} _additionalFields
2501
+ * @param {?=} primaryCategory
2133
2502
  * @return {?}
2134
2503
  */
2135
- WidgetContentService.prototype.continueLearning = /**
2136
- * @param {?} id
2137
- * @param {?=} collectionId
2138
- * @param {?=} collectionType
2504
+ WidgetContentLibService.prototype.fetchContent = /**
2505
+ * @param {?} contentId
2506
+ * @param {?=} hierarchyType
2507
+ * @param {?=} _additionalFields
2508
+ * @param {?=} primaryCategory
2139
2509
  * @return {?}
2140
2510
  */
2141
- function (id, collectionId, collectionType) {
2142
- return __awaiter(this, void 0, void 0, function () {
2143
- var _this = this;
2144
- return __generator(this, function (_a) {
2145
- return [2 /*return*/, new Promise((/**
2146
- * @param {?} resolve
2147
- * @return {?}
2148
- */
2149
- function (resolve) { return __awaiter(_this, void 0, void 0, function () {
2150
- var reqBody, reqBody;
2151
- return __generator(this, function (_a) {
2152
- switch (_a.label) {
2153
- case 0:
2154
- if (!(collectionType &&
2155
- collectionType.toLowerCase() === 'playlist')) return [3 /*break*/, 2];
2156
- reqBody = {
2157
- contextPathId: collectionId ? collectionId : id,
2158
- resourceId: id,
2159
- data: JSON.stringify({
2160
- timestamp: Date.now(),
2161
- contextFullPath: [collectionId, id],
2162
- }),
2163
- dateAccessed: Date.now(),
2164
- contextType: 'playlist',
2165
- };
2166
- return [4 /*yield*/, this.saveContinueLearning(reqBody).toPromise().catch().finally((/**
2167
- * @return {?}
2168
- */
2169
- function () {
2170
- resolve(true);
2171
- }))];
2172
- case 1:
2173
- _a.sent();
2174
- return [3 /*break*/, 4];
2175
- case 2:
2176
- reqBody = {
2177
- contextPathId: collectionId ? collectionId : id,
2178
- resourceId: id,
2179
- data: JSON.stringify({ timestamp: Date.now() }),
2180
- dateAccessed: Date.now(),
2181
- };
2182
- return [4 /*yield*/, this.saveContinueLearning(reqBody).toPromise().catch().finally((/**
2183
- * @return {?}
2184
- */
2185
- function () {
2186
- resolve(true);
2187
- }))];
2188
- case 3:
2189
- _a.sent();
2190
- _a.label = 4;
2191
- case 4: return [2 /*return*/];
2192
- }
2193
- });
2194
- }); }))];
2195
- });
2196
- });
2511
+ function (contentId, hierarchyType, _additionalFields, primaryCategory) {
2512
+ if (hierarchyType === void 0) { hierarchyType = 'detail'; }
2513
+ if (_additionalFields === void 0) { _additionalFields = []; }
2514
+ // const url = `${API_END_POINTS.CONTENT}/${contentId}?hierarchyType=${hierarchyType}`
2515
+ /** @type {?} */
2516
+ var url = '';
2517
+ /** @type {?} */
2518
+ var forPreview = window.location.href.includes('/public/') || window.location.href.includes('&preview=true');
2519
+ if (primaryCategory && this.isResource(primaryCategory)) {
2520
+ if (!forPreview) {
2521
+ url = "/apis/proxies/v8/action/content/v3/read/" + contentId;
2522
+ }
2523
+ else {
2524
+ url = "/api/content/v1/read/" + contentId;
2525
+ }
2526
+ }
2527
+ else {
2528
+ if (!forPreview) {
2529
+ url = "/apis/proxies/v8/action/content/v3/hierarchy/" + contentId + "?hierarchyType=" + hierarchyType;
2530
+ }
2531
+ else {
2532
+ /** @type {?} */
2533
+ var forcreator = window.location.href.includes('editMode=true');
2534
+ if (forcreator) {
2535
+ url = "apis/proxies/v8/action/content/v3/hierarchy/" + contentId + "?mode=edit";
2536
+ }
2537
+ else {
2538
+ url = "/api/course/v1/hierarchy/" + contentId + "?hierarchyType=" + hierarchyType;
2539
+ }
2540
+ }
2541
+ }
2542
+ // return this.http
2543
+ // .post<NsContent.IContent>(url, { additionalFields })
2544
+ // .pipe(retry(1))
2545
+ return this.http
2546
+ .get(url)
2547
+ .pipe(operators.shareReplay(1));
2548
+ // if (apiData && apiData.result) {
2549
+ // return apiData.result.content
2550
+ // }
2197
2551
  };
2198
2552
  /**
2199
- * @param {?} content
2553
+ * @param {?} contentId
2200
2554
  * @return {?}
2201
2555
  */
2202
- WidgetContentService.prototype.saveContinueLearning = /**
2203
- * @param {?} content
2556
+ WidgetContentLibService.prototype.fetchAuthoringContent = /**
2557
+ * @param {?} contentId
2204
2558
  * @return {?}
2205
2559
  */
2206
- function (content) {
2207
- // const url = API_END_POINTS.USER_CONTINUE_LEARNING
2208
- // return this.http.post<any>(url, content)
2209
- if (content) {
2560
+ function (contentId) {
2561
+ /** @type {?} */
2562
+ var forcreator = window.location.href.includes('editMode=true');
2563
+ /** @type {?} */
2564
+ var url = '';
2565
+ if (forcreator) {
2566
+ url = "apis/proxies/v8/action/content/v3/hierarchy/" + contentId + "?mode=edit";
2210
2567
  }
2211
- return (/** @type {?} */ (rxjs.of()));
2568
+ else {
2569
+ url = API_END_POINTS$1.AUTHORING_CONTENT + "/" + contentId + "?hierarchyType=detail";
2570
+ }
2571
+ return this.http.get(url).pipe(operators.shareReplay(1), (/**
2572
+ * @param {?} r
2573
+ * @return {?}
2574
+ */
2575
+ function (r) { return r; }));
2212
2576
  };
2213
2577
  /**
2214
- * @param {?} _contentId
2578
+ * @param {?} ids
2215
2579
  * @return {?}
2216
2580
  */
2217
- WidgetContentService.prototype.setS3Cookie = /**
2218
- * @param {?} _contentId
2581
+ WidgetContentLibService.prototype.fetchMultipleContent = /**
2582
+ * @param {?} ids
2219
2583
  * @return {?}
2220
2584
  */
2221
- function (_contentId) {
2222
- // return this.http
2223
- // .post(API_END_POINTS.SET_S3_COOKIE, { contentId })
2224
- // .pipe(catchError(_err => of(true)))
2225
- return rxjs.EMPTY;
2585
+ function (ids) {
2586
+ return this.http.get(API_END_POINTS$1.MULTIPLE_CONTENT + "/" + ids.join(','));
2587
+ };
2588
+ /**
2589
+ * @param {?} type
2590
+ * @param {?} id
2591
+ * @param {?=} pageNumber
2592
+ * @param {?=} pageSize
2593
+ * @return {?}
2594
+ */
2595
+ WidgetContentLibService.prototype.fetchCollectionHierarchy = /**
2596
+ * @param {?} type
2597
+ * @param {?} id
2598
+ * @param {?=} pageNumber
2599
+ * @param {?=} pageSize
2600
+ * @return {?}
2601
+ */
2602
+ function (type, id, pageNumber, pageSize) {
2603
+ if (pageNumber === void 0) { pageNumber = 0; }
2604
+ if (pageSize === void 0) { pageSize = 1; }
2605
+ return this.http.get(API_END_POINTS$1.COLLECTION_HIERARCHY(type, id) + "?pageNumber=" + pageNumber + "&pageSize=" + pageSize);
2226
2606
  };
2227
2607
  /**
2228
2608
  * @return {?}
2229
2609
  */
2230
- WidgetContentService.prototype.setS3ImageCookie = /**
2610
+ WidgetContentLibService.prototype.fetchBlendedCourse = /**
2231
2611
  * @return {?}
2232
2612
  */
2233
2613
  function () {
2234
- return this.http.post(API_END_POINTS.SET_S3_IMAGE_COOKIE, {}).pipe(operators.catchError((/**
2235
- * @param {?} _err
2614
+ };
2615
+ /**
2616
+ * @param {?} req
2617
+ * @return {?}
2618
+ */
2619
+ WidgetContentLibService.prototype.fetchCourseBatches = /**
2620
+ * @param {?} req
2621
+ * @return {?}
2622
+ */
2623
+ function (req) {
2624
+ return this.http
2625
+ .post(API_END_POINTS$1.COURSE_BATCH_LIST, req)
2626
+ .pipe(operators.retry(1), operators.map((/**
2627
+ * @param {?} data
2236
2628
  * @return {?}
2237
2629
  */
2238
- function (_err) { return rxjs.of(true); })));
2630
+ function (data) { return data.result.response; })));
2239
2631
  };
2632
+ // fetch individual batch
2633
+ // fetch individual batch
2240
2634
  /**
2241
- * @param {?} url
2635
+ * @param {?} batchId
2242
2636
  * @return {?}
2243
2637
  */
2244
- WidgetContentService.prototype.fetchManifest = /**
2245
- * @param {?} url
2638
+ WidgetContentLibService.prototype.fetchCourseBatch =
2639
+ // fetch individual batch
2640
+ /**
2641
+ * @param {?} batchId
2246
2642
  * @return {?}
2247
2643
  */
2248
- function (url) {
2249
- return this.http.post(API_END_POINTS.FETCH_MANIFEST, { url: url });
2644
+ function (batchId) {
2645
+ return this.http.get(API_END_POINTS$1.COURSE_BATCH + "/" + batchId);
2250
2646
  };
2251
2647
  /**
2252
- * @param {?} url
2648
+ * @param {?} identifier
2253
2649
  * @return {?}
2254
2650
  */
2255
- WidgetContentService.prototype.fetchWebModuleContent = /**
2256
- * @param {?} url
2651
+ WidgetContentLibService.prototype.autoAssignBatchApi = /**
2652
+ * @param {?} identifier
2257
2653
  * @return {?}
2258
2654
  */
2259
- function (url) {
2260
- return this.http.get(API_END_POINTS.FETCH_WEB_MODULE_FILES + "?url=" + encodeURIComponent(url));
2655
+ function (identifier) {
2656
+ return this.http.get("" + API_END_POINTS$1.AUTO_ASSIGN_BATCH + identifier)
2657
+ .pipe(operators.retry(1), operators.map((/**
2658
+ * @param {?} data
2659
+ * @return {?}
2660
+ */
2661
+ function (data) { return data.result.response; })));
2662
+ };
2663
+ /**
2664
+ * @param {?} request
2665
+ * @param {?} programType
2666
+ * @return {?}
2667
+ */
2668
+ WidgetContentLibService.prototype.autoAssignCuratedBatchApi = /**
2669
+ * @param {?} request
2670
+ * @param {?} programType
2671
+ * @return {?}
2672
+ */
2673
+ function (request, programType) {
2674
+ /** @type {?} */
2675
+ var url = programType === NsContent.ECourseCategory.MODERATED_PROGRAM ?
2676
+ API_END_POINTS$1.AUTO_ASSIGN_OPEN_PROGRAM : API_END_POINTS$1.AUTO_ASSIGN_CURATED_BATCH;
2677
+ return this.http.post("" + url, request)
2678
+ .pipe(operators.retry(1), operators.map((/**
2679
+ * @param {?} data
2680
+ * @return {?}
2681
+ */
2682
+ function (data) { return data.result.response; })));
2261
2683
  };
2262
2684
  /**
2263
2685
  * @param {?} req
2264
2686
  * @return {?}
2265
2687
  */
2266
- WidgetContentService.prototype.search = /**
2688
+ WidgetContentLibService.prototype.enrollUserToBatch = /**
2267
2689
  * @param {?} req
2268
2690
  * @return {?}
2269
2691
  */
2270
2692
  function (req) {
2271
- req.query = req.query || '';
2272
- return this.http.post(API_END_POINTS.CONTENT_SEARCH_V5, {
2273
- request: req,
2274
- });
2693
+ return this.http
2694
+ .post(API_END_POINTS$1.ENROLL_BATCH, req)
2695
+ .toPromise();
2275
2696
  };
2276
2697
  /**
2277
2698
  * @param {?} req
2699
+ * @param {?} type
2278
2700
  * @return {?}
2279
2701
  */
2280
- WidgetContentService.prototype.searchRegionRecommendation = /**
2702
+ WidgetContentLibService.prototype.enrollAndUnenrollUserToBatchWF = /**
2281
2703
  * @param {?} req
2704
+ * @param {?} type
2282
2705
  * @return {?}
2283
2706
  */
2284
- function (req) {
2285
- req.query = req.query || '';
2286
- req.preLabelValue =
2287
- (req.preLabelValue || '') +
2288
- ((this.configSvc.userProfile && this.configSvc.userProfile.country) || '');
2289
- req.filters = __assign({}, req.filters, { labels: [req.preLabelValue || ''] });
2290
- return this.http.post(API_END_POINTS.CONTENT_SEARCH_REGION_RECOMMENDATION, { request: req });
2707
+ function (req, type) {
2708
+ /** @type {?} */
2709
+ var url = type === 'WITHDRAW' ? API_END_POINTS$1.WITHDRAW_BATCH_WF : API_END_POINTS$1.ENROLL_BATCH_WF;
2710
+ return this.http
2711
+ .post(url, req)
2712
+ .toPromise();
2291
2713
  };
2292
2714
  /**
2293
2715
  * @param {?} req
2294
2716
  * @return {?}
2295
2717
  */
2296
- WidgetContentService.prototype.searchV6 = /**
2718
+ WidgetContentLibService.prototype.fetchBlendedUserWF = /**
2297
2719
  * @param {?} req
2298
2720
  * @return {?}
2299
2721
  */
2300
2722
  function (req) {
2301
- /** @type {?} */
2302
- var apiPath = lodash.get(req, 'api.path');
2303
- req.query = req.query || '';
2304
- if (apiPath) {
2305
- return this.http.get(apiPath);
2306
- }
2307
- return this.http.post(API_END_POINTS.CONTENT_SEARCH_V6, req);
2723
+ return this.http
2724
+ .post(API_END_POINTS$1.BLENDED_USER_WF, req)
2725
+ .toPromise();
2308
2726
  };
2309
2727
  /**
2310
2728
  * @param {?} req
2311
2729
  * @return {?}
2312
2730
  */
2313
- WidgetContentService.prototype.searchRelatedCBPV6 = /**
2731
+ WidgetContentLibService.prototype.fetchBlendedUserCOUNT = /**
2314
2732
  * @param {?} req
2315
2733
  * @return {?}
2316
2734
  */
2317
2735
  function (req) {
2318
- return this.http.post(API_END_POINTS.CONTENT_SEARCH_RELATED_CBP_V6, req);
2736
+ return this.http
2737
+ .post(API_END_POINTS$1.BLENDED_USER_COUNT, req)
2738
+ .toPromise();
2319
2739
  };
2320
2740
  /**
2321
- * @param {?} contentId
2741
+ * @param {?} contentIds
2322
2742
  * @return {?}
2323
2743
  */
2324
- WidgetContentService.prototype.fetchContentRating = /**
2325
- * @param {?} contentId
2744
+ WidgetContentLibService.prototype.fetchContentLikes = /**
2745
+ * @param {?} contentIds
2326
2746
  * @return {?}
2327
2747
  */
2328
- function (contentId) {
2329
- return this.http.get(API_END_POINTS.CONTENT_RATING + "/" + contentId);
2748
+ function (contentIds) {
2749
+ return this.http
2750
+ .post(API_END_POINTS$1.CONTENT_LIKES, contentIds)
2751
+ .toPromise();
2752
+ };
2753
+ /**
2754
+ * @param {?} contentIds
2755
+ * @return {?}
2756
+ */
2757
+ WidgetContentLibService.prototype.fetchContentRatings = /**
2758
+ * @param {?} contentIds
2759
+ * @return {?}
2760
+ */
2761
+ function (contentIds) {
2762
+ if (contentIds) { }
2763
+ // return this.http
2764
+ // .post(`${API_END_POINTS.CONTENT_RATING}/rating`, contentIds)
2765
+ // .toPromise()
2766
+ return rxjs.of().toPromise();
2330
2767
  };
2331
2768
  /**
2332
2769
  * @param {?} contentId
2333
2770
  * @return {?}
2334
2771
  */
2335
- WidgetContentService.prototype.deleteContentRating = /**
2772
+ WidgetContentLibService.prototype.fetchContentHistory = /**
2336
2773
  * @param {?} contentId
2337
2774
  * @return {?}
2338
2775
  */
2339
2776
  function (contentId) {
2340
- return this.http.delete(API_END_POINTS.CONTENT_RATING + "/" + contentId);
2777
+ return this.http.get(API_END_POINTS$1.CONTENT_HISTORY + "/" + contentId);
2341
2778
  };
2342
2779
  /**
2343
- * @param {?} contentId
2344
- * @param {?} data
2780
+ * @param {?} req
2345
2781
  * @return {?}
2346
2782
  */
2347
- WidgetContentService.prototype.addContentRating = /**
2348
- * @param {?} contentId
2349
- * @param {?} data
2783
+ WidgetContentLibService.prototype.fetchContentHistoryV2 = /**
2784
+ * @param {?} req
2350
2785
  * @return {?}
2351
2786
  */
2352
- function (contentId, data) {
2353
- return this.http.post(API_END_POINTS.CONTENT_RATING + "/" + contentId, data);
2787
+ function (req) {
2788
+ var _this = this;
2789
+ req.request.fields = ['progressdetails'];
2790
+ /** @type {?} */
2791
+ var data = this.http.post(API_END_POINTS$1.CONTENT_HISTORYV2 + "/" + req.request.courseId, req);
2792
+ data.subscribe((/**
2793
+ * @param {?} subscribeData
2794
+ * @return {?}
2795
+ */
2796
+ function (subscribeData) {
2797
+ _this.programChildCourseResumeData.next({ resumeData: subscribeData.result.contentList, courseId: req.request.courseId });
2798
+ }));
2799
+ return data;
2354
2800
  };
2355
2801
  /**
2356
- * @param {?} content
2802
+ * @param {?} id
2803
+ * @param {?=} collectionId
2804
+ * @param {?=} collectionType
2357
2805
  * @return {?}
2358
2806
  */
2359
- WidgetContentService.prototype.getFirstChildInHierarchy = /**
2360
- * @param {?} content
2807
+ WidgetContentLibService.prototype.continueLearning = /**
2808
+ * @param {?} id
2809
+ * @param {?=} collectionId
2810
+ * @param {?=} collectionType
2361
2811
  * @return {?}
2362
2812
  */
2363
- function (content) {
2813
+ function (id, collectionId, collectionType) {
2814
+ return __awaiter(this, void 0, void 0, function () {
2815
+ var _this = this;
2816
+ return __generator(this, function (_a) {
2817
+ return [2 /*return*/, new Promise((/**
2818
+ * @param {?} resolve
2819
+ * @return {?}
2820
+ */
2821
+ function (resolve) { return __awaiter(_this, void 0, void 0, function () {
2822
+ var reqBody, reqBody;
2823
+ return __generator(this, function (_a) {
2824
+ switch (_a.label) {
2825
+ case 0:
2826
+ if (!(collectionType &&
2827
+ collectionType.toLowerCase() === 'playlist')) return [3 /*break*/, 2];
2828
+ reqBody = {
2829
+ contextPathId: collectionId ? collectionId : id,
2830
+ resourceId: id,
2831
+ data: JSON.stringify({
2832
+ timestamp: Date.now(),
2833
+ contextFullPath: [collectionId, id],
2834
+ }),
2835
+ dateAccessed: Date.now(),
2836
+ contextType: 'playlist',
2837
+ };
2838
+ return [4 /*yield*/, this.saveContinueLearning(reqBody).toPromise().catch().finally((/**
2839
+ * @return {?}
2840
+ */
2841
+ function () {
2842
+ resolve(true);
2843
+ }))];
2844
+ case 1:
2845
+ _a.sent();
2846
+ return [3 /*break*/, 4];
2847
+ case 2:
2848
+ reqBody = {
2849
+ contextPathId: collectionId ? collectionId : id,
2850
+ resourceId: id,
2851
+ data: JSON.stringify({ timestamp: Date.now() }),
2852
+ dateAccessed: Date.now(),
2853
+ };
2854
+ return [4 /*yield*/, this.saveContinueLearning(reqBody).toPromise().catch().finally((/**
2855
+ * @return {?}
2856
+ */
2857
+ function () {
2858
+ resolve(true);
2859
+ }))];
2860
+ case 3:
2861
+ _a.sent();
2862
+ _a.label = 4;
2863
+ case 4: return [2 /*return*/];
2864
+ }
2865
+ });
2866
+ }); }))];
2867
+ });
2868
+ });
2869
+ };
2870
+ /**
2871
+ * @param {?} content
2872
+ * @return {?}
2873
+ */
2874
+ WidgetContentLibService.prototype.saveContinueLearning = /**
2875
+ * @param {?} content
2876
+ * @return {?}
2877
+ */
2878
+ function (content) {
2879
+ // const url = API_END_POINTS.USER_CONTINUE_LEARNING
2880
+ // return this.http.post<any>(url, content)
2881
+ if (content) {
2882
+ }
2883
+ return (/** @type {?} */ (rxjs.of()));
2884
+ };
2885
+ /**
2886
+ * @param {?} _contentId
2887
+ * @return {?}
2888
+ */
2889
+ WidgetContentLibService.prototype.setS3Cookie = /**
2890
+ * @param {?} _contentId
2891
+ * @return {?}
2892
+ */
2893
+ function (_contentId) {
2894
+ // return this.http
2895
+ // .post(API_END_POINTS.SET_S3_COOKIE, { contentId })
2896
+ // .pipe(catchError(_err => of(true)))
2897
+ return rxjs.EMPTY;
2898
+ };
2899
+ /**
2900
+ * @return {?}
2901
+ */
2902
+ WidgetContentLibService.prototype.setS3ImageCookie = /**
2903
+ * @return {?}
2904
+ */
2905
+ function () {
2906
+ return this.http.post(API_END_POINTS$1.SET_S3_IMAGE_COOKIE, {}).pipe(operators.catchError((/**
2907
+ * @param {?} _err
2908
+ * @return {?}
2909
+ */
2910
+ function (_err) { return rxjs.of(true); })));
2911
+ };
2912
+ /**
2913
+ * @param {?} url
2914
+ * @return {?}
2915
+ */
2916
+ WidgetContentLibService.prototype.fetchManifest = /**
2917
+ * @param {?} url
2918
+ * @return {?}
2919
+ */
2920
+ function (url) {
2921
+ return this.http.post(API_END_POINTS$1.FETCH_MANIFEST, { url: url });
2922
+ };
2923
+ /**
2924
+ * @param {?} url
2925
+ * @return {?}
2926
+ */
2927
+ WidgetContentLibService.prototype.fetchWebModuleContent = /**
2928
+ * @param {?} url
2929
+ * @return {?}
2930
+ */
2931
+ function (url) {
2932
+ return this.http.get(API_END_POINTS$1.FETCH_WEB_MODULE_FILES + "?url=" + encodeURIComponent(url));
2933
+ };
2934
+ /**
2935
+ * @param {?} req
2936
+ * @return {?}
2937
+ */
2938
+ WidgetContentLibService.prototype.search = /**
2939
+ * @param {?} req
2940
+ * @return {?}
2941
+ */
2942
+ function (req) {
2943
+ req.query = req.query || '';
2944
+ return this.http.post(API_END_POINTS$1.CONTENT_SEARCH_V5, {
2945
+ request: req,
2946
+ });
2947
+ };
2948
+ /**
2949
+ * @param {?} req
2950
+ * @return {?}
2951
+ */
2952
+ WidgetContentLibService.prototype.searchRegionRecommendation = /**
2953
+ * @param {?} req
2954
+ * @return {?}
2955
+ */
2956
+ function (req) {
2957
+ req.query = req.query || '';
2958
+ req.preLabelValue =
2959
+ (req.preLabelValue || '') +
2960
+ ((this.configSvc.userProfile && this.configSvc.userProfile.country) || '');
2961
+ req.filters = __assign({}, req.filters, { labels: [req.preLabelValue || ''] });
2962
+ return this.http.post(API_END_POINTS$1.CONTENT_SEARCH_REGION_RECOMMENDATION, { request: req });
2963
+ };
2964
+ /**
2965
+ * @param {?} req
2966
+ * @return {?}
2967
+ */
2968
+ WidgetContentLibService.prototype.searchV6 = /**
2969
+ * @param {?} req
2970
+ * @return {?}
2971
+ */
2972
+ function (req) {
2973
+ /** @type {?} */
2974
+ var apiPath = lodash.get(req, 'api.path');
2975
+ req.query = req.query || '';
2976
+ if (apiPath) {
2977
+ return this.http.get(apiPath);
2978
+ }
2979
+ return this.http.post(API_END_POINTS$1.CONTENT_SEARCH_V6, req);
2980
+ };
2981
+ /**
2982
+ * @param {?} req
2983
+ * @return {?}
2984
+ */
2985
+ WidgetContentLibService.prototype.searchRelatedCBPV6 = /**
2986
+ * @param {?} req
2987
+ * @return {?}
2988
+ */
2989
+ function (req) {
2990
+ return this.http.post(API_END_POINTS$1.CONTENT_SEARCH_RELATED_CBP_V6, req);
2991
+ };
2992
+ /**
2993
+ * @param {?} contentId
2994
+ * @return {?}
2995
+ */
2996
+ WidgetContentLibService.prototype.fetchContentRating = /**
2997
+ * @param {?} contentId
2998
+ * @return {?}
2999
+ */
3000
+ function (contentId) {
3001
+ return this.http.get(API_END_POINTS$1.CONTENT_RATING + "/" + contentId);
3002
+ };
3003
+ /**
3004
+ * @param {?} contentId
3005
+ * @return {?}
3006
+ */
3007
+ WidgetContentLibService.prototype.deleteContentRating = /**
3008
+ * @param {?} contentId
3009
+ * @return {?}
3010
+ */
3011
+ function (contentId) {
3012
+ return this.http.delete(API_END_POINTS$1.CONTENT_RATING + "/" + contentId);
3013
+ };
3014
+ /**
3015
+ * @param {?} contentId
3016
+ * @param {?} data
3017
+ * @return {?}
3018
+ */
3019
+ WidgetContentLibService.prototype.addContentRating = /**
3020
+ * @param {?} contentId
3021
+ * @param {?} data
3022
+ * @return {?}
3023
+ */
3024
+ function (contentId, data) {
3025
+ return this.http.post(API_END_POINTS$1.CONTENT_RATING + "/" + contentId, data);
3026
+ };
3027
+ /**
3028
+ * @param {?} content
3029
+ * @return {?}
3030
+ */
3031
+ WidgetContentLibService.prototype.getFirstChildInHierarchy = /**
3032
+ * @param {?} content
3033
+ * @return {?}
3034
+ */
3035
+ function (content) {
2364
3036
  if (!(content.children || []).length) {
2365
3037
  return content;
2366
3038
  }
@@ -2395,18 +3067,18 @@
2395
3067
  * @param {?} source
2396
3068
  * @return {?}
2397
3069
  */
2398
- WidgetContentService.prototype.getRegistrationStatus = /**
3070
+ WidgetContentLibService.prototype.getRegistrationStatus = /**
2399
3071
  * @param {?} source
2400
3072
  * @return {?}
2401
3073
  */
2402
3074
  function (source) {
2403
- return this.http.get(API_END_POINTS.REGISTRATION_STATUS + "/" + source).toPromise();
3075
+ return this.http.get(API_END_POINTS$1.REGISTRATION_STATUS + "/" + source).toPromise();
2404
3076
  };
2405
3077
  /**
2406
3078
  * @param {?} url
2407
3079
  * @return {?}
2408
3080
  */
2409
- WidgetContentService.prototype.fetchConfig = /**
3081
+ WidgetContentLibService.prototype.fetchConfig = /**
2410
3082
  * @param {?} url
2411
3083
  * @return {?}
2412
3084
  */
@@ -2417,59 +3089,59 @@
2417
3089
  * @param {?} body
2418
3090
  * @return {?}
2419
3091
  */
2420
- WidgetContentService.prototype.addCertTemplate = /**
3092
+ WidgetContentLibService.prototype.addCertTemplate = /**
2421
3093
  * @param {?} body
2422
3094
  * @return {?}
2423
3095
  */
2424
3096
  function (body) {
2425
- return this.http.patch("" + API_END_POINTS.CERT_ADD_TEMPLATE, body);
3097
+ return this.http.patch("" + API_END_POINTS$1.CERT_ADD_TEMPLATE, body);
2426
3098
  };
2427
3099
  /**
2428
3100
  * @param {?} body
2429
3101
  * @return {?}
2430
3102
  */
2431
- WidgetContentService.prototype.issueCert = /**
3103
+ WidgetContentLibService.prototype.issueCert = /**
2432
3104
  * @param {?} body
2433
3105
  * @return {?}
2434
3106
  */
2435
3107
  function (body) {
2436
- return this.http.post("" + API_END_POINTS.CERT_ISSUE, body);
3108
+ return this.http.post("" + API_END_POINTS$1.CERT_ISSUE, body);
2437
3109
  };
2438
3110
  /**
2439
3111
  * @param {?} certId
2440
3112
  * @return {?}
2441
3113
  */
2442
- WidgetContentService.prototype.downloadCert = /**
3114
+ WidgetContentLibService.prototype.downloadCert = /**
2443
3115
  * @param {?} certId
2444
3116
  * @return {?}
2445
3117
  */
2446
3118
  function (certId) {
2447
- return this.http.get("" + API_END_POINTS.CERT_DOWNLOAD(certId));
3119
+ return this.http.get("" + API_END_POINTS$1.CERT_DOWNLOAD(certId));
2448
3120
  };
2449
3121
  /**
2450
3122
  * @param {?} req
2451
3123
  * @return {?}
2452
3124
  */
2453
- WidgetContentService.prototype.trendingContentSearch = /**
3125
+ WidgetContentLibService.prototype.trendingContentSearch = /**
2454
3126
  * @param {?} req
2455
3127
  * @return {?}
2456
3128
  */
2457
3129
  function (req) {
2458
3130
  req.query = req.query || '';
2459
- return this.http.post(API_END_POINTS.TRENDING_CONTENT_SEARCH, req);
3131
+ return this.http.post(API_END_POINTS$1.TRENDING_CONTENT_SEARCH, req);
2460
3132
  };
2461
3133
  /**
2462
3134
  * @param {?} limit
2463
3135
  * @param {?} offset
2464
3136
  * @return {?}
2465
3137
  */
2466
- WidgetContentService.prototype.getKarmaPoitns = /**
3138
+ WidgetContentLibService.prototype.getKarmaPoitns = /**
2467
3139
  * @param {?} limit
2468
3140
  * @param {?} offset
2469
3141
  * @return {?}
2470
3142
  */
2471
3143
  function (limit, offset) {
2472
- return this.http.post(API_END_POINTS.READ_KARMAPOINTS, { limit: limit, offset: offset }).pipe(operators.catchError((/**
3144
+ return this.http.post(API_END_POINTS$1.READ_KARMAPOINTS, { limit: limit, offset: offset }).pipe(operators.catchError((/**
2473
3145
  * @param {?} _err
2474
3146
  * @return {?}
2475
3147
  */
@@ -2479,7 +3151,7 @@
2479
3151
  * @param {?} contentId
2480
3152
  * @return {?}
2481
3153
  */
2482
- WidgetContentService.prototype.fetchProgramContent = /**
3154
+ WidgetContentLibService.prototype.fetchProgramContent = /**
2483
3155
  * @param {?} contentId
2484
3156
  * @return {?}
2485
3157
  */
@@ -2489,7 +3161,7 @@
2489
3161
  /** @type {?} */
2490
3162
  var forPreview = window.location.href.includes('/public/') || window.location.href.includes('&preview=true');
2491
3163
  if (!forPreview) {
2492
- return this.http.get(API_END_POINTS.CONTENT_READ(contentId));
3164
+ return this.http.get(API_END_POINTS$1.CONTENT_READ(contentId));
2493
3165
  }
2494
3166
  url = "/api/content/v1/read/" + contentId;
2495
3167
  return this.http.get(url);
@@ -2499,81 +3171,112 @@
2499
3171
  * @param {?} request
2500
3172
  * @return {?}
2501
3173
  */
2502
- WidgetContentService.prototype.getCourseKarmaPoints = /**
3174
+ WidgetContentLibService.prototype.getCourseKarmaPoints = /**
2503
3175
  * @param {?} request
2504
3176
  * @return {?}
2505
3177
  */
2506
3178
  function (request) {
2507
- return this.http.post(API_END_POINTS.READ_COURSE_KARMAPOINTS, request);
3179
+ return this.http.post(API_END_POINTS$1.READ_COURSE_KARMAPOINTS, request);
2508
3180
  };
2509
3181
  /**
2510
3182
  * @param {?} request
2511
3183
  * @return {?}
2512
3184
  */
2513
- WidgetContentService.prototype.claimKarmapoints = /**
3185
+ WidgetContentLibService.prototype.claimKarmapoints = /**
2514
3186
  * @param {?} request
2515
3187
  * @return {?}
2516
3188
  */
2517
3189
  function (request) {
2518
- return this.http.post(API_END_POINTS.CLAIM_KARMAPOINTS, request);
3190
+ return this.http.post(API_END_POINTS$1.CLAIM_KARMAPOINTS, request);
2519
3191
  };
2520
3192
  /**
2521
3193
  * @return {?}
2522
3194
  */
2523
- WidgetContentService.prototype.userKarmaPoints = /**
3195
+ WidgetContentLibService.prototype.userKarmaPoints = /**
2524
3196
  * @return {?}
2525
3197
  */
2526
3198
  function () {
2527
- return this.http.post(API_END_POINTS.USER_KARMA_POINTS, {});
3199
+ return this.http.post(API_END_POINTS$1.USER_KARMA_POINTS, {});
2528
3200
  };
2529
3201
  /**
2530
3202
  * @param {?} doId
2531
3203
  * @return {?}
2532
3204
  */
2533
- WidgetContentService.prototype.getEnrolledData = /**
3205
+ WidgetContentLibService.prototype.getEnrolledData = /**
2534
3206
  * @param {?} doId
2535
3207
  * @return {?}
2536
3208
  */
2537
3209
  function (doId) {
2538
- /** @type {?} */
2539
- var enrollmentMapData = JSON.parse(localStorage.getItem('enrollmentMapData') || '{}');
2540
- /** @type {?} */
2541
- var enrolledCourseData = enrollmentMapData[doId];
2542
- return enrolledCourseData;
3210
+ return __awaiter(this, void 0, void 0, function () {
3211
+ var userId, responseData;
3212
+ var _this = this;
3213
+ return __generator(this, function (_a) {
3214
+ switch (_a.label) {
3215
+ case 0:
3216
+ userId = this.configSvc.userProfile.userId;
3217
+ return [4 /*yield*/, this.userSvc.fetchEnrollmentDataByContentId(userId, doId).toPromise().then((/**
3218
+ * @param {?} res
3219
+ * @return {?}
3220
+ */
3221
+ function (res) { return __awaiter(_this, void 0, void 0, function () {
3222
+ return __generator(this, function (_a) {
3223
+ if (res && res.courses && res.courses.length) {
3224
+ return [2 /*return*/, res.courses];
3225
+ }
3226
+ else {
3227
+ return [2 /*return*/, []];
3228
+ }
3229
+ return [2 /*return*/];
3230
+ });
3231
+ }); })).catch((/**
3232
+ * @param {?} _err
3233
+ * @return {?}
3234
+ */
3235
+ function (_err) {
3236
+ return [];
3237
+ }))];
3238
+ case 1:
3239
+ responseData = _a.sent();
3240
+ return [2 /*return*/, responseData || []];
3241
+ }
3242
+ });
3243
+ });
2543
3244
  };
2544
3245
  /**
2545
3246
  * @param {?} content
2546
3247
  * @return {?}
2547
3248
  */
2548
- WidgetContentService.prototype.getResourseLink = /**
3249
+ WidgetContentLibService.prototype.getResourseLink = /**
2549
3250
  * @param {?} content
2550
3251
  * @return {?}
2551
3252
  */
2552
3253
  function (content) {
2553
3254
  return __awaiter(this, void 0, void 0, function () {
2554
- var enrolledCourseData, data, data;
3255
+ var enrolledCourse, enrolledCourseData, data, data;
2555
3256
  return __generator(this, function (_a) {
2556
3257
  switch (_a.label) {
2557
- case 0:
2558
- enrolledCourseData = this.getEnrolledData(content.identifier);
2559
- if (!enrolledCourseData) return [3 /*break*/, 4];
3258
+ case 0: return [4 /*yield*/, this.getEnrolledData(content.identifier)];
3259
+ case 1:
3260
+ enrolledCourse = _a.sent();
3261
+ if (!(enrolledCourse && enrolledCourse.length)) return [3 /*break*/, 5];
3262
+ enrolledCourseData = enrolledCourse[0];
2560
3263
  if (!(enrolledCourseData.content.courseCategory === NsContent.ECourseCategory.BLENDED_PROGRAM ||
2561
3264
  enrolledCourseData.content.courseCategory === NsContent.ECourseCategory.INVITE_ONLY_PROGRAM ||
2562
3265
  enrolledCourseData.content.courseCategory === NsContent.ECourseCategory.MODERATED_PROGRAM ||
2563
3266
  enrolledCourseData.content.primaryCategory === NsContent.EPrimaryCategory.BLENDED_PROGRAM ||
2564
- enrolledCourseData.content.primaryCategory === NsContent.EPrimaryCategory.PROGRAM)) return [3 /*break*/, 2];
3267
+ enrolledCourseData.content.primaryCategory === NsContent.EPrimaryCategory.PROGRAM)) return [3 /*break*/, 3];
2565
3268
  if (!this.isBatchInProgress(enrolledCourseData.batch)) {
2566
3269
  return [2 /*return*/, this.gotoTocPage(content)];
2567
3270
  }
2568
3271
  return [4 /*yield*/, this.checkForDataToFormUrl(content, enrolledCourseData)];
2569
- case 1:
3272
+ case 2:
2570
3273
  data = _a.sent();
2571
3274
  return [2 /*return*/, data];
2572
- case 2: return [4 /*yield*/, this.checkForDataToFormUrl(content, enrolledCourseData)];
2573
- case 3:
3275
+ case 3: return [4 /*yield*/, this.checkForDataToFormUrl(content, enrolledCourseData)];
3276
+ case 4:
2574
3277
  data = _a.sent();
2575
3278
  return [2 /*return*/, data];
2576
- case 4: return [2 /*return*/, this.gotoTocPage(content)];
3279
+ case 5: return [2 /*return*/, this.gotoTocPage(content)];
2577
3280
  }
2578
3281
  });
2579
3282
  });
@@ -2583,7 +3286,7 @@
2583
3286
  * @param {?} enrollData
2584
3287
  * @return {?}
2585
3288
  */
2586
- WidgetContentService.prototype.checkForDataToFormUrl = /**
3289
+ WidgetContentLibService.prototype.checkForDataToFormUrl = /**
2587
3290
  * @param {?} content
2588
3291
  * @param {?} enrollData
2589
3292
  * @return {?}
@@ -2641,7 +3344,7 @@
2641
3344
  * @param {?} mimeType
2642
3345
  * @return {?}
2643
3346
  */
2644
- WidgetContentService.prototype.getResourseDataWithData = /**
3347
+ WidgetContentLibService.prototype.getResourseDataWithData = /**
2645
3348
  * @param {?} content
2646
3349
  * @param {?} resourseId
2647
3350
  * @param {?} mimeType
@@ -2659,7 +3362,7 @@
2659
3362
  * @param {?} content
2660
3363
  * @return {?}
2661
3364
  */
2662
- WidgetContentService.prototype.gotoTocPage = /**
3365
+ WidgetContentLibService.prototype.gotoTocPage = /**
2663
3366
  * @param {?} content
2664
3367
  * @return {?}
2665
3368
  */
@@ -2678,7 +3381,7 @@
2678
3381
  * @param {?} batchData
2679
3382
  * @return {?}
2680
3383
  */
2681
- WidgetContentService.prototype.isBatchInProgress = /**
3384
+ WidgetContentLibService.prototype.isBatchInProgress = /**
2682
3385
  * @param {?} batchData
2683
3386
  * @return {?}
2684
3387
  */
@@ -2704,7 +3407,7 @@
2704
3407
  * @param {?} req
2705
3408
  * @return {?}
2706
3409
  */
2707
- WidgetContentService.prototype.postApiMethod = /**
3410
+ WidgetContentLibService.prototype.postApiMethod = /**
2708
3411
  * @param {?} apiUrl
2709
3412
  * @param {?} req
2710
3413
  * @return {?}
@@ -2716,7 +3419,7 @@
2716
3419
  * @param {?} apiUrl
2717
3420
  * @return {?}
2718
3421
  */
2719
- WidgetContentService.prototype.getApiMethod = /**
3422
+ WidgetContentLibService.prototype.getApiMethod = /**
2720
3423
  * @param {?} apiUrl
2721
3424
  * @return {?}
2722
3425
  */
@@ -2724,51 +3427,78 @@
2724
3427
  // req.query = req.query || '';
2725
3428
  return this.http.get(apiUrl);
2726
3429
  };
2727
- WidgetContentService.decorators = [
3430
+ /**
3431
+ * @param {?} enrollmentList
3432
+ * @param {?} collectionId
3433
+ * @return {?}
3434
+ */
3435
+ WidgetContentLibService.prototype.getEnrolledDataFromList = /**
3436
+ * @param {?} enrollmentList
3437
+ * @param {?} collectionId
3438
+ * @return {?}
3439
+ */
3440
+ function (enrollmentList, collectionId) {
3441
+ if (enrollmentList && enrollmentList.length) {
3442
+ /** @type {?} */
3443
+ var enrolledData = enrollmentList.filter((/**
3444
+ * @param {?} ele
3445
+ * @return {?}
3446
+ */
3447
+ function (ele) { return ele.collectionId === collectionId; }));
3448
+ return enrolledData.length ? enrolledData[0] : {};
3449
+ }
3450
+ };
3451
+ WidgetContentLibService.decorators = [
2728
3452
  { type: core.Injectable, args: [{
2729
3453
  providedIn: 'root',
2730
3454
  },] }
2731
3455
  ];
2732
3456
  /** @nocollapse */
2733
- WidgetContentService.ctorParameters = function () { return [
3457
+ WidgetContentLibService.ctorParameters = function () { return [
2734
3458
  { type: http.HttpClient },
2735
- { type: utilsV2.ConfigurationsService }
3459
+ { type: utilsV2.ConfigurationsService },
3460
+ { type: WidgetUserServiceLib }
2736
3461
  ]; };
2737
- /** @nocollapse */ WidgetContentService.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function WidgetContentService_Factory() { return new WidgetContentService(core.ɵɵinject(http.HttpClient), core.ɵɵinject(utilsV2.ConfigurationsService)); }, token: WidgetContentService, providedIn: "root" });
2738
- return WidgetContentService;
3462
+ /** @nocollapse */ WidgetContentLibService.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function WidgetContentLibService_Factory() { return new WidgetContentLibService(core.ɵɵinject(http.HttpClient), core.ɵɵinject(utilsV2.ConfigurationsService), core.ɵɵinject(WidgetUserServiceLib)); }, token: WidgetContentLibService, providedIn: "root" });
3463
+ return WidgetContentLibService;
2739
3464
  }());
2740
3465
  if (false) {
2741
3466
  /** @type {?} */
2742
- WidgetContentService.prototype.tocConfigData;
3467
+ WidgetContentLibService.prototype.tocConfigData;
2743
3468
  /** @type {?} */
2744
- WidgetContentService.prototype.tocConfigData$;
3469
+ WidgetContentLibService.prototype.tocConfigData$;
2745
3470
  /**
2746
3471
  * @type {?}
2747
3472
  * @private
2748
3473
  */
2749
- WidgetContentService.prototype.telemetryData;
3474
+ WidgetContentLibService.prototype.telemetryData;
2750
3475
  /** @type {?} */
2751
- WidgetContentService.prototype.telemetryData$;
3476
+ WidgetContentLibService.prototype.telemetryData$;
2752
3477
  /** @type {?} */
2753
- WidgetContentService.prototype.currentMetaData;
3478
+ WidgetContentLibService.prototype.currentMetaData;
2754
3479
  /** @type {?} */
2755
- WidgetContentService.prototype.currentContentReadMetaData;
3480
+ WidgetContentLibService.prototype.currentContentReadMetaData;
2756
3481
  /** @type {?} */
2757
- WidgetContentService.prototype.currentBatchEnrollmentList;
3482
+ WidgetContentLibService.prototype.currentBatchEnrollmentList;
2758
3483
  /** @type {?} */
2759
- WidgetContentService.prototype.programChildCourseResumeData;
3484
+ WidgetContentLibService.prototype.programChildCourseResumeData;
2760
3485
  /** @type {?} */
2761
- WidgetContentService.prototype.programChildCourseResumeData$;
3486
+ WidgetContentLibService.prototype.programChildCourseResumeData$;
3487
+ /**
3488
+ * @type {?}
3489
+ * @private
3490
+ */
3491
+ WidgetContentLibService.prototype.http;
2762
3492
  /**
2763
3493
  * @type {?}
2764
3494
  * @private
2765
3495
  */
2766
- WidgetContentService.prototype.http;
3496
+ WidgetContentLibService.prototype.configSvc;
2767
3497
  /**
2768
3498
  * @type {?}
2769
3499
  * @private
2770
3500
  */
2771
- WidgetContentService.prototype.configSvc;
3501
+ WidgetContentLibService.prototype.userSvc;
2772
3502
  }
2773
3503
 
2774
3504
  /**
@@ -3024,859 +3754,253 @@
3024
3754
  ConfigurationsService.prototype.openExploreMenuForMWeb;
3025
3755
  }
3026
3756
 
3027
- /**
3028
- * @fileoverview added by tsickle
3029
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3030
- */
3031
- var MultilingualTranslationsService = /** @class */ (function () {
3032
- function MultilingualTranslationsService(translate, http, configSvc) {
3033
- this.translate = translate;
3034
- this.http = http;
3035
- this.configSvc = configSvc;
3036
- this.selectedLang = '';
3037
- // website lang change
3038
- this.languageSelected = new rxjs.BehaviorSubject(true);
3039
- this.languageSelectedObservable = this.languageSelected.asObservable();
3040
- this.editProfileDetails = '/apis/proxies/v8/user/v1/extPatch';
3041
- // this.getLanguage()
3042
- }
3043
- /**
3044
- * @return {?}
3045
- */
3046
- MultilingualTranslationsService.prototype.getLanguage = /**
3047
- * @return {?}
3048
- */
3049
- function () {
3050
- if (this.configSvc.unMappedUser) {
3051
- if (this.configSvc.unMappedUser.profileDetails &&
3052
- this.configSvc.unMappedUser.profileDetails.additionalProperties &&
3053
- this.configSvc.unMappedUser.profileDetails.additionalProperties.webPortalLang) {
3054
- /** @type {?} */
3055
- var lang = this.configSvc.unMappedUser.profileDetails.additionalProperties.webPortalLang;
3056
- this.translate.use(lang);
3057
- localStorage.setItem('websiteLanguage', lang);
3058
- }
3059
- else {
3060
- if (localStorage.getItem('websiteLanguage')) {
3061
- // this.translate.setDefaultLang('en')
3062
- /** @type {?} */
3063
- var lang = JSON.stringify(localStorage.getItem('websiteLanguage'));
3064
- lang = lang.replace(/\"/g, '');
3065
- this.translate.use(lang);
3066
- }
3067
- else {
3068
- this.translate.setDefaultLang('en');
3069
- localStorage.setItem('websiteLanguage', 'en');
3070
- }
3071
- }
3072
- }
3073
- else {
3074
- if (localStorage.getItem('websiteLanguage')) {
3075
- // this.translate.setDefaultLang('en')
3076
- /** @type {?} */
3077
- var lang = JSON.stringify(localStorage.getItem('websiteLanguage'));
3078
- lang = lang.replace(/\"/g, '');
3079
- this.translate.use(lang);
3080
- }
3081
- }
3082
- };
3083
- /**
3084
- * @param {?} label
3085
- * @param {?} type
3086
- * @param {?} subtype
3087
- * @return {?}
3088
- */
3089
- MultilingualTranslationsService.prototype.translateLabelWithoutspace = /**
3090
- * @param {?} label
3091
- * @param {?} type
3092
- * @param {?} subtype
3093
- * @return {?}
3094
- */
3095
- function (label, type, subtype) {
3096
- /** @type {?} */
3097
- var nlabel = label;
3098
- nlabel = nlabel && nlabel.replace(/\s/g, '');
3099
- if (subtype) {
3100
- // tslint:disable-next-line: prefer-template
3101
- /** @type {?} */
3102
- var translationKey = type + '.' + nlabel + subtype;
3103
- return this.translate.instant(translationKey);
3104
- }
3105
- // tslint:disable-next-line: prefer-template
3106
- /** @type {?} */
3107
- var translationKeyn = type + '.' + nlabel;
3108
- return this.translate.instant(translationKeyn);
3109
- };
3110
- /**
3111
- * @param {?} label
3112
- * @param {?} type
3113
- * @param {?} subtype
3114
- * @return {?}
3115
- */
3116
- MultilingualTranslationsService.prototype.translateLabel = /**
3117
- * @param {?} label
3118
- * @param {?} type
3119
- * @param {?} subtype
3120
- * @return {?}
3121
- */
3122
- function (label, type, subtype) {
3123
- if (label) {
3124
- /** @type {?} */
3125
- var nlabel = label;
3126
- nlabel = nlabel && nlabel.toLowerCase();
3127
- /** @type {?} */
3128
- var sl_1 = nlabel.split(' ');
3129
- sl_1.forEach((/**
3130
- * @param {?} w
3131
- * @param {?} index
3132
- * @return {?}
3133
- */
3134
- function (w, index) {
3135
- if (index !== 0) {
3136
- sl_1[index] = w[0].toUpperCase() + w.slice(1);
3137
- }
3138
- }));
3139
- nlabel = sl_1.join('');
3140
- nlabel = nlabel.replace(/\s/g, '');
3141
- if (subtype) {
3142
- // tslint:disable-next-line: prefer-template
3143
- /** @type {?} */
3144
- var translationKey = type + '.' + nlabel + subtype;
3145
- return this.translate.instant(translationKey);
3146
- }
3147
- // tslint:disable-next-line: prefer-template
3148
- /** @type {?} */
3149
- var translationKeyn = type + '.' + nlabel;
3150
- return this.translate.instant(translationKeyn);
3151
- }
3152
- return label;
3153
- };
3154
- /**
3155
- * @param {?} label
3156
- * @param {?} type
3157
- * @param {?} subtype
3158
- * @return {?}
3159
- */
3160
- MultilingualTranslationsService.prototype.translateActualLabel = /**
3161
- * @param {?} label
3162
- * @param {?} type
3163
- * @param {?} subtype
3164
- * @return {?}
3165
- */
3166
- function (label, type, subtype) {
3167
- /** @type {?} */
3168
- var nlabel = label;
3169
- /** @type {?} */
3170
- var sl = nlabel.split(' ');
3171
- sl.forEach((/**
3172
- * @param {?} w
3173
- * @param {?} index
3174
- * @return {?}
3175
- */
3176
- function (w, index) {
3177
- if (index !== 0) {
3178
- sl[index] = w[0].toUpperCase() + w.slice(1);
3179
- }
3180
- }));
3181
- nlabel = sl.join('');
3182
- nlabel = nlabel.replace(/\s/g, '');
3183
- if (subtype) {
3184
- // tslint:disable-next-line: prefer-template
3185
- /** @type {?} */
3186
- var translationKey = type + '.' + nlabel + subtype;
3187
- return this.translate.instant(translationKey);
3188
- }
3189
- // tslint:disable-next-line: prefer-template
3190
- /** @type {?} */
3191
- var translationKeyn = type + '.' + nlabel;
3192
- return this.translate.instant(translationKeyn);
3193
- };
3194
- /**
3195
- * @param {?} data
3196
- * @return {?}
3197
- */
3198
- MultilingualTranslationsService.prototype.editProfileDetailsAPI = /**
3199
- * @param {?} data
3200
- * @return {?}
3201
- */
3202
- function (data) {
3203
- return this.http.post(this.editProfileDetails, data);
3204
- };
3205
- /**
3206
- * @param {?} state
3207
- * @param {?} lang
3208
- * @param {?} userid
3209
- * @return {?}
3210
- */
3211
- MultilingualTranslationsService.prototype.updatelanguageSelected = /**
3212
- * @param {?} state
3213
- * @param {?} lang
3214
- * @param {?} userid
3215
- * @return {?}
3216
- */
3217
- function (state, lang, userid) {
3218
- this.languageSelected.next(state);
3219
- this.translate.use(lang);
3220
- this.selectedLang = lang;
3221
- if (userid) {
3222
- /** @type {?} */
3223
- var reqUpdates = {
3224
- request: {
3225
- userId: userid,
3226
- profileDetails: {
3227
- additionalProperties: {
3228
- webPortalLang: this.selectedLang,
3229
- },
3230
- },
3231
- },
3232
- };
3233
- this.editProfileDetailsAPI(reqUpdates).subscribe();
3234
- }
3235
- };
3236
- MultilingualTranslationsService.decorators = [
3237
- { type: core.Injectable, args: [{
3238
- providedIn: 'root',
3239
- },] }
3240
- ];
3241
- /** @nocollapse */
3242
- MultilingualTranslationsService.ctorParameters = function () { return [
3243
- { type: core$1.TranslateService },
3244
- { type: http.HttpClient },
3245
- { type: ConfigurationsService }
3246
- ]; };
3247
- /** @nocollapse */ MultilingualTranslationsService.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function MultilingualTranslationsService_Factory() { return new MultilingualTranslationsService(core.ɵɵinject(core$1.TranslateService), core.ɵɵinject(http.HttpClient), core.ɵɵinject(ConfigurationsService)); }, token: MultilingualTranslationsService, providedIn: "root" });
3248
- return MultilingualTranslationsService;
3249
- }());
3250
- if (false) {
3251
- /** @type {?} */
3252
- MultilingualTranslationsService.prototype.selectedLang;
3253
- /** @type {?} */
3254
- MultilingualTranslationsService.prototype.languageSelected;
3255
- /** @type {?} */
3256
- MultilingualTranslationsService.prototype.languageSelectedObservable;
3257
- /** @type {?} */
3258
- MultilingualTranslationsService.prototype.editProfileDetails;
3259
- /**
3260
- * @type {?}
3261
- * @private
3262
- */
3263
- MultilingualTranslationsService.prototype.translate;
3264
- /**
3265
- * @type {?}
3266
- * @private
3267
- */
3268
- MultilingualTranslationsService.prototype.http;
3269
- /**
3270
- * @type {?}
3271
- * @private
3272
- */
3273
- MultilingualTranslationsService.prototype.configSvc;
3274
- }
3275
-
3276
- /**
3277
- * @fileoverview added by tsickle
3278
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3279
- */
3280
- var NsCardContent;
3281
- (function (NsCardContent) {
3282
- /**
3283
- * @record
3284
- */
3285
- function ICard() { }
3286
- NsCardContent.ICard = ICard;
3287
- if (false) {
3288
- /** @type {?} */
3289
- ICard.prototype.content;
3290
- /** @type {?} */
3291
- ICard.prototype.cardSubType;
3292
- /** @type {?} */
3293
- ICard.prototype.context;
3294
- /** @type {?|undefined} */
3295
- ICard.prototype.intranetMode;
3296
- /** @type {?|undefined} */
3297
- ICard.prototype.deletedMode;
3298
- /** @type {?|undefined} */
3299
- ICard.prototype.likes;
3300
- /** @type {?|undefined} */
3301
- ICard.prototype.contentTags;
3302
- /** @type {?} */
3303
- ICard.prototype.stateData;
3304
- }
3305
- /**
3306
- * @record
3307
- */
3308
- function IContentTags() { }
3309
- NsCardContent.IContentTags = IContentTags;
3310
- if (false) {
3311
- /** @type {?|undefined} */
3312
- IContentTags.prototype.daysSpan;
3313
- /** @type {?|undefined} */
3314
- IContentTags.prototype.excludeContentType;
3315
- /** @type {?|undefined} */
3316
- IContentTags.prototype.excludeMimeType;
3317
- /** @type {?} */
3318
- IContentTags.prototype.tag;
3319
- /** @type {?|undefined} */
3320
- IContentTags.prototype.criteriaField;
3321
- }
3322
- /**
3323
- * @record
3324
- */
3325
- function ICompetency() { }
3326
- NsCardContent.ICompetency = ICompetency;
3327
- if (false) {
3328
- /** @type {?} */
3329
- ICompetency.prototype.competencyArea;
3330
- /** @type {?} */
3331
- ICompetency.prototype.competencyObject;
3332
- }
3333
- var EContentStatus;
3334
- (function (EContentStatus) {
3335
- EContentStatus["LIVE"] = "Live";
3336
- EContentStatus["EXPIRED"] = "Expired";
3337
- EContentStatus["DELETED"] = "Deleted";
3338
- EContentStatus["MARK_FOR_DELETION"] = "MarkedForDeletion";
3339
- })(EContentStatus = NsCardContent.EContentStatus || (NsCardContent.EContentStatus = {}));
3340
- var ACBPConst;
3341
- (function (ACBPConst) {
3342
- ACBPConst["UPCOMING"] = "upcoming";
3343
- ACBPConst["ALL"] = "All";
3344
- ACBPConst["OVERDUE"] = "overdue";
3345
- ACBPConst["SUCCESS"] = "success";
3346
- })(ACBPConst = NsCardContent.ACBPConst || (NsCardContent.ACBPConst = {}));
3347
- var IGOTConst;
3348
- (function (IGOTConst) {
3349
- IGOTConst["COMPETENCIES"] = "competencies_v5";
3350
- IGOTConst["RETIRED"] = "Retired";
3351
- })(IGOTConst = NsCardContent.IGOTConst || (NsCardContent.IGOTConst = {}));
3352
- })(NsCardContent || (NsCardContent = {}));
3353
-
3354
- /**
3355
- * @fileoverview added by tsickle
3356
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3357
- */
3358
- /** @type {?} */
3359
- var dayjs = dayjs_
3360
- // import { environment } from 'src/environments/environment'
3361
- ;
3362
- /** @type {?} */
3363
- var PROTECTED_SLAG_V8$1 = '/apis/protected/v8';
3364
- var ɵ0$1 = /**
3365
- * @param {?} userId
3366
- * @return {?}
3367
- */
3368
- function (userId) {
3369
- return PROTECTED_SLAG_V8$1 + "/user/group/fetchUserGroup?userId=" + userId;
3370
- }, ɵ1$1 = /**
3371
- * @param {?} userId
3372
- * @return {?}
3373
- */
3374
- function (userId) {
3375
- // tslint:disable-next-line: max-line-length
3376
- return "/apis/proxies/v8/learner/course/v2/user/enrollment/list/" + userId + "?orgdetails=orgName,email&licenseDetails=name,description,url&fields=contentType,primaryCategory,courseCategory,topic,name,channel,mimeType,appIcon,gradeLevel,resourceType,identifier,medium,pkgVersion,board,subject,trackable,posterImage,duration,creatorLogo,license,version,versionKey,avgRating,additionalTags," + NsCardContent.IGOTConst.COMPETENCIES + "&batchDetails=name,endDate,startDate,status,enrollmentType,createdBy,certificates,batchAttributes";
3377
- }, ɵ2$1 = /**
3378
- * @param {?} userId
3379
- * @return {?}
3380
- */
3381
- function (userId) {
3382
- // tslint:disable-next-line: max-line-length
3383
- return "/apis/proxies/v8/learner/course/v2/user/enrollment/list/" + userId + "?orgdetails=orgName,email&licenseDetails=name,description,url&fields=contentType,primaryCategory,courseCategory,topic,name,channel,mimeType,appIcon,gradeLevel,resourceType,identifier,medium,pkgVersion,board,subject,trackable,posterImage,duration,creatorLogo,license,version,versionKey,avgRating,additionalTags," + NsCardContent.IGOTConst.COMPETENCIES + "&batchDetails=name,endDate,startDate,status,enrollmentType,createdBy,certificates,batchAttributes&retiredCoursesEnabled=true";
3384
- }, ɵ3$1 = /**
3385
- * @param {?} userId
3386
- * @param {?} orgdetails
3387
- * @param {?} licenseDetails
3388
- * @param {?} fields
3389
- * @param {?} batchDetails
3390
- * @return {?}
3391
- */
3392
- function (userId, orgdetails, licenseDetails, fields, batchDetails) {
3393
- // tslint:disable-next-line: max-line-length
3394
- return "apis/proxies/v8/learner/course/v2/user/enrollment/list/" + userId + "?orgdetails=" + orgdetails + "&licenseDetails=" + licenseDetails + "&fields=" + fields + ",courseCategory," + NsCardContent.IGOTConst.COMPETENCIES + "&batchDetails=" + batchDetails;
3395
- };
3396
- /** @type {?} */
3397
- var API_END_POINTS$1 = {
3398
- FETCH_USER_GROUPS: (ɵ0$1),
3399
- FETCH_CPB_PLANS: "/apis/proxies/v8/user/v1/cbplan",
3400
- FETCH_USER_ENROLLMENT_LIST: (ɵ1$1),
3401
- FETCH_USER_ENROLLMENT_LIST_PROFILE: (ɵ2$1),
3402
- // tslint:disable-next-line: max-line-length
3403
- FETCH_USER_ENROLLMENT_LIST_V2: (ɵ3$1),
3404
- };
3405
- var WidgetUserService = /** @class */ (function () {
3406
- function WidgetUserService(environment, http) {
3407
- this.http = http;
3408
- this.environment = environment;
3409
- }
3410
- /**
3411
- * @param {?} error
3412
- * @return {?}
3413
- */
3414
- WidgetUserService.prototype.handleError = /**
3415
- * @param {?} error
3416
- * @return {?}
3417
- */
3418
- function (error) {
3419
- /** @type {?} */
3420
- var errorMessage = '';
3421
- if (error.error instanceof ErrorEvent) {
3422
- errorMessage = "Error: " + error.error.message;
3423
- }
3424
- return rxjs.throwError(errorMessage);
3425
- };
3426
- /**
3427
- * @param {?} userId
3428
- * @return {?}
3429
- */
3430
- WidgetUserService.prototype.fetchUserGroupDetails = /**
3431
- * @param {?} userId
3432
- * @return {?}
3433
- */
3434
- function (userId) {
3435
- return this.http
3436
- .get(API_END_POINTS$1.FETCH_USER_GROUPS(userId))
3437
- .pipe(operators.catchError(this.handleError));
3438
- };
3439
- // tslint:disable-next-line: max-line-length
3440
- // tslint:disable-next-line: max-line-length
3757
+ /**
3758
+ * @fileoverview added by tsickle
3759
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3760
+ */
3761
+ var MultilingualTranslationsService = /** @class */ (function () {
3762
+ function MultilingualTranslationsService(translate, http, configSvc) {
3763
+ this.translate = translate;
3764
+ this.http = http;
3765
+ this.configSvc = configSvc;
3766
+ this.selectedLang = '';
3767
+ // website lang change
3768
+ this.languageSelected = new rxjs.BehaviorSubject(true);
3769
+ this.languageSelectedObservable = this.languageSelected.asObservable();
3770
+ this.editProfileDetails = '/apis/proxies/v8/user/v1/extPatch';
3771
+ // this.getLanguage()
3772
+ }
3441
3773
  /**
3442
- * @param {?} userId
3443
- * @param {?=} queryParams
3444
3774
  * @return {?}
3445
3775
  */
3446
- WidgetUserService.prototype.fetchUserBatchList =
3447
- // tslint:disable-next-line: max-line-length
3448
- /**
3449
- * @param {?} userId
3450
- * @param {?=} queryParams
3776
+ MultilingualTranslationsService.prototype.getLanguage = /**
3451
3777
  * @return {?}
3452
3778
  */
3453
- function (userId, queryParams) {
3454
- var _this = this;
3455
- /** @type {?} */
3456
- var path = '';
3457
- if (queryParams) {
3458
- // tslint:disable-next-line: max-line-length
3459
- path = API_END_POINTS$1.FETCH_USER_ENROLLMENT_LIST_V2(userId, queryParams.orgdetails, queryParams.licenseDetails, queryParams.fields, queryParams.batchDetails);
3460
- }
3461
- else {
3462
- path = API_END_POINTS$1.FETCH_USER_ENROLLMENT_LIST(userId);
3463
- }
3464
- /** @type {?} */
3465
- var headers = new http.HttpHeaders({
3466
- 'Cache-Control': 'no-cache, no-store, must-revalidate, post-check=0, pre-check=0',
3467
- Pragma: 'no-cache',
3468
- Expires: '0',
3469
- });
3470
- if (this.checkStorageData('enrollmentService', 'enrollmentData')) {
3471
- /** @type {?} */
3472
- var result = this.http.get(path, { headers: headers }).pipe(operators.catchError(this.handleError), operators.map((/**
3473
- * @param {?} data
3474
- * @return {?}
3475
- */
3476
- function (data) {
3779
+ function () {
3780
+ if (this.configSvc.unMappedUser) {
3781
+ if (this.configSvc.unMappedUser.profileDetails &&
3782
+ this.configSvc.unMappedUser.profileDetails.additionalProperties &&
3783
+ this.configSvc.unMappedUser.profileDetails.additionalProperties.webPortalLang) {
3477
3784
  /** @type {?} */
3478
- var coursesData = [];
3479
- if (data && data.result && data.result.courses) {
3480
- data.result.courses.forEach((/**
3481
- * @param {?} content
3482
- * @return {?}
3483
- */
3484
- function (content) {
3485
- if (content.contentStatus) {
3486
- delete content.contentStatus;
3487
- }
3488
- coursesData.push(content);
3489
- }));
3490
- _this.storeUserEnrollmentInfo(data.result.userCourseEnrolmentInfo, data.result.courses.length);
3491
- data.result.courses = coursesData;
3492
- if (data.result.courses.length < 200) {
3493
- localStorage.removeItem('enrollmentData');
3494
- _this.setTime('enrollmentService');
3495
- localStorage.setItem('enrollmentData', JSON.stringify(data.result));
3496
- _this.mapEnrollmentData(data.result);
3497
- return data.result;
3498
- }
3785
+ var lang = this.configSvc.unMappedUser.profileDetails.additionalProperties.webPortalLang;
3786
+ this.translate.use(lang);
3787
+ localStorage.setItem('websiteLanguage', lang);
3788
+ }
3789
+ else {
3790
+ if (localStorage.getItem('websiteLanguage')) {
3791
+ // this.translate.setDefaultLang('en')
3792
+ /** @type {?} */
3793
+ var lang = JSON.stringify(localStorage.getItem('websiteLanguage'));
3794
+ lang = lang.replace(/\"/g, '');
3795
+ this.translate.use(lang);
3499
3796
  }
3500
- _this.mapEnrollmentData(data.result);
3501
- return data.result;
3502
- })));
3503
- return result;
3504
- }
3505
- return this.getData('enrollmentData');
3506
- };
3507
- // tslint:disable-next-line: max-line-length
3508
- // tslint:disable-next-line: max-line-length
3509
- /**
3510
- * @param {?} userId
3511
- * @param {?=} queryParams
3512
- * @return {?}
3513
- */
3514
- WidgetUserService.prototype.fetchProfileUserBatchList =
3515
- // tslint:disable-next-line: max-line-length
3516
- /**
3517
- * @param {?} userId
3518
- * @param {?=} queryParams
3519
- * @return {?}
3520
- */
3521
- function (userId, queryParams) {
3522
- /** @type {?} */
3523
- var path = '';
3524
- if (queryParams) {
3525
- // tslint:disable-next-line: max-line-length
3526
- path = API_END_POINTS$1.FETCH_USER_ENROLLMENT_LIST_V2(userId, queryParams.orgdetails, queryParams.licenseDetails, queryParams.fields, queryParams.batchDetails);
3797
+ else {
3798
+ this.translate.setDefaultLang('en');
3799
+ localStorage.setItem('websiteLanguage', 'en');
3800
+ }
3801
+ }
3527
3802
  }
3528
3803
  else {
3529
- path = API_END_POINTS$1.FETCH_USER_ENROLLMENT_LIST_PROFILE(userId);
3530
- }
3531
- /** @type {?} */
3532
- var headers = new http.HttpHeaders({
3533
- 'Cache-Control': 'no-cache, no-store, must-revalidate, post-check=0, pre-check=0',
3534
- Pragma: 'no-cache',
3535
- Expires: '0',
3536
- });
3537
- return this.http
3538
- .get(path, { headers: headers })
3539
- .pipe(operators.catchError(this.handleError), operators.map((/**
3540
- * @param {?} data
3541
- * @return {?}
3542
- */
3543
- function (data) { return data.result; })));
3544
- // if (this.checkStorageData('enrollmentService')) {
3545
- // const result: any = this.http.get(path, { headers }).pipe(catchError(this.handleError), map(
3546
- // (data: any) => {
3547
- // localStorage.setItem('enrollmentData', JSON.stringify(data.result))
3548
- // this.mapEnrollmentData(data.result)
3549
- // return data.result
3550
- // }
3551
- // )
3552
- // )
3553
- // this.setTime('enrollmentService')
3554
- // return result
3555
- // }
3556
- // return this.getData('enrollmentData')
3557
- };
3558
- /**
3559
- * @param {?} key
3560
- * @param {?} dataKey
3561
- * @return {?}
3562
- */
3563
- WidgetUserService.prototype.checkStorageData = /**
3564
- * @param {?} key
3565
- * @param {?} dataKey
3566
- * @return {?}
3567
- */
3568
- function (key, dataKey) {
3569
- /** @type {?} */
3570
- var checkTime = localStorage.getItem('timeCheck');
3571
- if (checkTime) {
3572
- /** @type {?} */
3573
- var parsedData = JSON.parse(checkTime);
3574
- if (parsedData[key]) {
3575
- /** @type {?} */
3576
- var date = dayjs();
3577
- /** @type {?} */
3578
- var diffMin = date.diff(parsedData[key], 'minute');
3804
+ if (localStorage.getItem('websiteLanguage')) {
3805
+ // this.translate.setDefaultLang('en')
3579
3806
  /** @type {?} */
3580
- var timeCheck = this.environment.apiCache || 0;
3581
- if (diffMin >= timeCheck) {
3582
- return true;
3583
- }
3584
- return localStorage.getItem(dataKey) ? false : true;
3807
+ var lang = JSON.stringify(localStorage.getItem('websiteLanguage'));
3808
+ lang = lang.replace(/\"/g, '');
3809
+ this.translate.use(lang);
3585
3810
  }
3586
- return true;
3587
3811
  }
3588
- return true;
3589
- };
3590
- /**
3591
- * @param {?} key
3592
- * @return {?}
3593
- */
3594
- WidgetUserService.prototype.getData = /**
3595
- * @param {?} key
3596
- * @return {?}
3597
- */
3598
- function (key) {
3599
- return rxjs.Observable.of(JSON.parse(localStorage.getItem(key) || '{}'));
3600
- };
3601
- /**
3602
- * @param {?} key
3603
- * @return {?}
3604
- */
3605
- WidgetUserService.prototype.getSavedData = /**
3606
- * @param {?} key
3607
- * @return {?}
3608
- */
3609
- function (key) {
3610
- return JSON.parse(localStorage.getItem(key) || '');
3611
3812
  };
3612
3813
  /**
3613
- * @param {?} key
3814
+ * @param {?} label
3815
+ * @param {?} type
3816
+ * @param {?} subtype
3614
3817
  * @return {?}
3615
3818
  */
3616
- WidgetUserService.prototype.setTime = /**
3617
- * @param {?} key
3819
+ MultilingualTranslationsService.prototype.translateLabelWithoutspace = /**
3820
+ * @param {?} label
3821
+ * @param {?} type
3822
+ * @param {?} subtype
3618
3823
  * @return {?}
3619
3824
  */
3620
- function (key) {
3825
+ function (label, type, subtype) {
3621
3826
  /** @type {?} */
3622
- var checkTime = localStorage.getItem('timeCheck');
3623
- if (checkTime) {
3624
- /** @type {?} */
3625
- var parsedData = JSON.parse(checkTime);
3626
- parsedData[key] = new Date().getTime();
3627
- localStorage.setItem('timeCheck', JSON.stringify(parsedData));
3628
- }
3629
- else {
3827
+ var nlabel = label;
3828
+ nlabel = nlabel && nlabel.replace(/\s/g, '');
3829
+ if (subtype) {
3830
+ // tslint:disable-next-line: prefer-template
3630
3831
  /** @type {?} */
3631
- var data = {};
3632
- data[key] = new Date().getTime();
3633
- localStorage.setItem('timeCheck', JSON.stringify(data));
3832
+ var translationKey = type + '.' + nlabel + subtype;
3833
+ return this.translate.instant(translationKey);
3634
3834
  }
3835
+ // tslint:disable-next-line: prefer-template
3836
+ /** @type {?} */
3837
+ var translationKeyn = type + '.' + nlabel;
3838
+ return this.translate.instant(translationKeyn);
3635
3839
  };
3636
3840
  /**
3637
- * @param {?} key
3841
+ * @param {?} label
3842
+ * @param {?} type
3843
+ * @param {?} subtype
3638
3844
  * @return {?}
3639
3845
  */
3640
- WidgetUserService.prototype.resetTime = /**
3641
- * @param {?} key
3846
+ MultilingualTranslationsService.prototype.translateLabel = /**
3847
+ * @param {?} label
3848
+ * @param {?} type
3849
+ * @param {?} subtype
3642
3850
  * @return {?}
3643
3851
  */
3644
- function (key) {
3645
- /** @type {?} */
3646
- var checkTime = localStorage.getItem('timeCheck');
3647
- if (checkTime) {
3852
+ function (label, type, subtype) {
3853
+ if (label) {
3648
3854
  /** @type {?} */
3649
- var parsedData = JSON.parse(checkTime);
3650
- if (parsedData[key]) {
3651
- delete parsedData[key];
3652
- localStorage.setItem('timeCheck', JSON.stringify(parsedData));
3855
+ var nlabel = label;
3856
+ nlabel = nlabel && nlabel.toLowerCase();
3857
+ /** @type {?} */
3858
+ var sl_1 = nlabel.split(' ');
3859
+ sl_1.forEach((/**
3860
+ * @param {?} w
3861
+ * @param {?} index
3862
+ * @return {?}
3863
+ */
3864
+ function (w, index) {
3865
+ if (index !== 0) {
3866
+ sl_1[index] = w[0].toUpperCase() + w.slice(1);
3867
+ }
3868
+ }));
3869
+ nlabel = sl_1.join('');
3870
+ nlabel = nlabel.replace(/\s/g, '');
3871
+ if (subtype) {
3872
+ // tslint:disable-next-line: prefer-template
3873
+ /** @type {?} */
3874
+ var translationKey = type + '.' + nlabel + subtype;
3875
+ return this.translate.instant(translationKey);
3653
3876
  }
3877
+ // tslint:disable-next-line: prefer-template
3878
+ /** @type {?} */
3879
+ var translationKeyn = type + '.' + nlabel;
3880
+ return this.translate.instant(translationKeyn);
3654
3881
  }
3882
+ return label;
3655
3883
  };
3656
3884
  /**
3885
+ * @param {?} label
3886
+ * @param {?} type
3887
+ * @param {?} subtype
3657
3888
  * @return {?}
3658
3889
  */
3659
- WidgetUserService.prototype.fetchCbpPlanList = /**
3890
+ MultilingualTranslationsService.prototype.translateActualLabel = /**
3891
+ * @param {?} label
3892
+ * @param {?} type
3893
+ * @param {?} subtype
3660
3894
  * @return {?}
3661
3895
  */
3662
- function () {
3663
- // let data = JSON.parse(localStorage.getItem('cbpData')|| '')
3664
- // if(!data) {
3665
- // this.http.get(API_END_POINTS.FETCH_CPB_PLANS).pipe(catchError(this.handleError), map(
3666
- // (data: any) => {
3667
- // const courseData = this.mapData(data.result)
3668
- // return courseData
3669
- // }
3670
- // )
3671
- // )
3672
- // } else {
3673
- // return this.getData('cbpData')
3674
- var _this = this;
3675
- // }
3676
- if (this.checkStorageData('cbpService', 'cbpData')) {
3896
+ function (label, type, subtype) {
3897
+ /** @type {?} */
3898
+ var nlabel = label;
3899
+ /** @type {?} */
3900
+ var sl = nlabel.split(' ');
3901
+ sl.forEach((/**
3902
+ * @param {?} w
3903
+ * @param {?} index
3904
+ * @return {?}
3905
+ */
3906
+ function (w, index) {
3907
+ if (index !== 0) {
3908
+ sl[index] = w[0].toUpperCase() + w.slice(1);
3909
+ }
3910
+ }));
3911
+ nlabel = sl.join('');
3912
+ nlabel = nlabel.replace(/\s/g, '');
3913
+ if (subtype) {
3914
+ // tslint:disable-next-line: prefer-template
3677
3915
  /** @type {?} */
3678
- var result = this.http.get(API_END_POINTS$1.FETCH_CPB_PLANS).pipe(operators.catchError(this.handleError), operators.map((/**
3679
- * @param {?} data
3680
- * @return {?}
3681
- */
3682
- function (data) { return __awaiter(_this, void 0, void 0, function () {
3683
- return __generator(this, function (_a) {
3684
- switch (_a.label) {
3685
- case 0: return [4 /*yield*/, this.mapData(data.result)];
3686
- case 1: return [2 /*return*/, _a.sent()];
3687
- }
3688
- });
3689
- }); })));
3690
- this.setTime('cbpService');
3691
- return result;
3916
+ var translationKey = type + '.' + nlabel + subtype;
3917
+ return this.translate.instant(translationKey);
3692
3918
  }
3693
- return this.getData('cbpData');
3919
+ // tslint:disable-next-line: prefer-template
3920
+ /** @type {?} */
3921
+ var translationKeyn = type + '.' + nlabel;
3922
+ return this.translate.instant(translationKeyn);
3694
3923
  };
3695
3924
  /**
3696
3925
  * @param {?} data
3697
3926
  * @return {?}
3698
3927
  */
3699
- WidgetUserService.prototype.mapData = /**
3928
+ MultilingualTranslationsService.prototype.editProfileDetailsAPI = /**
3700
3929
  * @param {?} data
3701
3930
  * @return {?}
3702
3931
  */
3703
3932
  function (data) {
3704
- return __awaiter(this, void 0, void 0, function () {
3705
- var contentNew, todayDate, enrollList, sortedData, uniqueUsersByID, sortedByEndDate, sortedByStatus;
3706
- return __generator(this, function (_a) {
3707
- contentNew = [];
3708
- todayDate = dayjs().format('YYYY-MM-DD');
3709
- enrollList = JSON.parse(localStorage.getItem('enrollmentMapData') || '{}');
3710
- if (data && data.count) {
3711
- data.content.forEach((/**
3712
- * @param {?} c
3713
- * @return {?}
3714
- */
3715
- function (c) {
3716
- c.contentList.forEach((/**
3717
- * @param {?} childData
3718
- * @return {?}
3719
- */
3720
- function (childData) {
3721
- /** @type {?} */
3722
- var childEnrollData = enrollList[childData.identifier];
3723
- /** @type {?} */
3724
- var endDate = dayjs(c.endDate).format('YYYY-MM-DD');
3725
- /** @type {?} */
3726
- var daysCount = dayjs(endDate).diff(todayDate, 'day');
3727
- childData['planDuration'] = daysCount < 0 ? NsCardContent.ACBPConst.OVERDUE : daysCount > 29
3728
- ? NsCardContent.ACBPConst.SUCCESS : NsCardContent.ACBPConst.UPCOMING;
3729
- childData['endDate'] = c.endDate;
3730
- childData['parentId'] = c.id;
3731
- childData['planType'] = 'cbPlan';
3732
- if (childData.status !== NsCardContent.IGOTConst.RETIRED) {
3733
- contentNew.push(childData);
3734
- }
3735
- else {
3736
- if (childEnrollData && childEnrollData.status === 2) {
3737
- contentNew.push(childData);
3738
- }
3739
- }
3740
- /** @type {?} */
3741
- var competencyArea = [];
3742
- /** @type {?} */
3743
- var competencyTheme = [];
3744
- /** @type {?} */
3745
- var competencyThemeType = [];
3746
- /** @type {?} */
3747
- var competencySubTheme = [];
3748
- /** @type {?} */
3749
- var competencyAreaId = [];
3750
- /** @type {?} */
3751
- var competencyThemeId = [];
3752
- /** @type {?} */
3753
- var competencySubThemeId = [];
3754
- childData['contentStatus'] = 0;
3755
- if (childEnrollData) {
3756
- childData['contentStatus'] = childEnrollData.status;
3757
- }
3758
- if (childData.competencies_v5) {
3759
- childData.competencies_v5.forEach((/**
3760
- * @param {?} element
3761
- * @return {?}
3762
- */
3763
- function (element) {
3764
- if (!competencyArea.includes(element.competencyArea)) {
3765
- competencyArea.push(element.competencyArea);
3766
- competencyAreaId.push(element.competencyAreaId);
3767
- }
3768
- if (!competencyTheme.includes(element.competencyTheme)) {
3769
- competencyTheme.push(element.competencyTheme);
3770
- competencyThemeId.push(element.competencyThemeId);
3771
- }
3772
- if (!competencyThemeType.includes(element.competencyThemeType)) {
3773
- competencyThemeType.push(element.competencyThemeType);
3774
- }
3775
- if (!competencySubTheme.includes(element.competencySubTheme)) {
3776
- competencySubTheme.push(element.competencySubTheme);
3777
- competencySubThemeId.push(element.competencySubThemeId);
3778
- }
3779
- }));
3780
- }
3781
- childData['competencyArea'] = competencyArea;
3782
- childData['competencyTheme'] = competencyTheme;
3783
- childData['competencyThemeType'] = competencyThemeType;
3784
- childData['competencySubTheme'] = competencySubTheme;
3785
- childData['competencyAreaId'] = competencyAreaId;
3786
- childData['competencyThemeId'] = competencyThemeId;
3787
- childData['competencySubThemeId'] = competencySubThemeId;
3788
- }));
3789
- }));
3790
- if (contentNew.length > 1) {
3791
- sortedData = contentNew.sort((/**
3792
- * @param {?} a
3793
- * @param {?} b
3794
- * @return {?}
3795
- */
3796
- function (a, b) {
3797
- /** @type {?} */
3798
- var firstDate = new Date(a.endDate);
3799
- /** @type {?} */
3800
- var secondDate = new Date(b.endDate);
3801
- return secondDate > firstDate ? 1 : -1;
3802
- }));
3803
- uniqueUsersByID = lodash.uniqBy(sortedData, 'identifier');
3804
- sortedByEndDate = lodash.orderBy(uniqueUsersByID, ['endDate'], ['asc']);
3805
- sortedByStatus = lodash.orderBy(sortedByEndDate, ['contentStatus'], ['asc']);
3806
- localStorage.setItem('cbpData', JSON.stringify(sortedByStatus));
3807
- return [2 /*return*/, sortedByStatus];
3808
- }
3809
- localStorage.setItem('cbpData', JSON.stringify(contentNew));
3810
- return [2 /*return*/, contentNew];
3811
- }
3812
- localStorage.setItem('cbpData', JSON.stringify([]));
3813
- return [2 /*return*/, []];
3814
- });
3815
- });
3933
+ return this.http.post(this.editProfileDetails, data);
3816
3934
  };
3817
3935
  /**
3818
- * @param {?} courseData
3936
+ * @param {?} state
3937
+ * @param {?} lang
3938
+ * @param {?} userid
3819
3939
  * @return {?}
3820
3940
  */
3821
- WidgetUserService.prototype.mapEnrollmentData = /**
3822
- * @param {?} courseData
3941
+ MultilingualTranslationsService.prototype.updatelanguageSelected = /**
3942
+ * @param {?} state
3943
+ * @param {?} lang
3944
+ * @param {?} userid
3823
3945
  * @return {?}
3824
3946
  */
3825
- function (courseData) {
3826
- /** @type {?} */
3827
- var enrollData = {};
3828
- if (courseData && courseData.courses.length) {
3829
- courseData.courses.forEach((/**
3830
- * @param {?} data
3831
- * @return {?}
3832
- */
3833
- function (data) {
3834
- enrollData[data.collectionId] = data;
3835
- }));
3947
+ function (state, lang, userid) {
3948
+ this.languageSelected.next(state);
3949
+ this.translate.use(lang);
3950
+ this.selectedLang = lang;
3951
+ if (userid) {
3952
+ /** @type {?} */
3953
+ var reqUpdates = {
3954
+ request: {
3955
+ userId: userid,
3956
+ profileDetails: {
3957
+ additionalProperties: {
3958
+ webPortalLang: this.selectedLang,
3959
+ },
3960
+ },
3961
+ },
3962
+ };
3963
+ this.editProfileDetailsAPI(reqUpdates).subscribe();
3836
3964
  }
3837
- localStorage.removeItem('enrollmentMapData');
3838
- localStorage.setItem('enrollmentMapData', JSON.stringify(enrollData));
3839
- };
3840
- /**
3841
- * @param {?} enrollmentData
3842
- * @param {?} enrolledCourseCount
3843
- * @return {?}
3844
- */
3845
- WidgetUserService.prototype.storeUserEnrollmentInfo = /**
3846
- * @param {?} enrollmentData
3847
- * @param {?} enrolledCourseCount
3848
- * @return {?}
3849
- */
3850
- function (enrollmentData, enrolledCourseCount) {
3851
- /** @type {?} */
3852
- var userData = {
3853
- enrolledCourseCount: enrolledCourseCount,
3854
- userCourseEnrolmentInfo: enrollmentData,
3855
- };
3856
- localStorage.removeItem('userEnrollmentCount');
3857
- localStorage.setItem('userEnrollmentCount', JSON.stringify(userData));
3858
3965
  };
3859
- WidgetUserService.decorators = [
3966
+ MultilingualTranslationsService.decorators = [
3860
3967
  { type: core.Injectable, args: [{
3861
3968
  providedIn: 'root',
3862
3969
  },] }
3863
3970
  ];
3864
3971
  /** @nocollapse */
3865
- WidgetUserService.ctorParameters = function () { return [
3866
- { type: undefined, decorators: [{ type: core.Inject, args: ['environment',] }] },
3867
- { type: http.HttpClient }
3972
+ MultilingualTranslationsService.ctorParameters = function () { return [
3973
+ { type: core$1.TranslateService },
3974
+ { type: http.HttpClient },
3975
+ { type: ConfigurationsService }
3868
3976
  ]; };
3869
- /** @nocollapse */ WidgetUserService.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function WidgetUserService_Factory() { return new WidgetUserService(core.ɵɵinject("environment"), core.ɵɵinject(http.HttpClient)); }, token: WidgetUserService, providedIn: "root" });
3870
- return WidgetUserService;
3977
+ /** @nocollapse */ MultilingualTranslationsService.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function MultilingualTranslationsService_Factory() { return new MultilingualTranslationsService(core.ɵɵinject(core$1.TranslateService), core.ɵɵinject(http.HttpClient), core.ɵɵinject(ConfigurationsService)); }, token: MultilingualTranslationsService, providedIn: "root" });
3978
+ return MultilingualTranslationsService;
3871
3979
  }());
3872
3980
  if (false) {
3873
3981
  /** @type {?} */
3874
- WidgetUserService.prototype.environment;
3982
+ MultilingualTranslationsService.prototype.selectedLang;
3983
+ /** @type {?} */
3984
+ MultilingualTranslationsService.prototype.languageSelected;
3985
+ /** @type {?} */
3986
+ MultilingualTranslationsService.prototype.languageSelectedObservable;
3987
+ /** @type {?} */
3988
+ MultilingualTranslationsService.prototype.editProfileDetails;
3989
+ /**
3990
+ * @type {?}
3991
+ * @private
3992
+ */
3993
+ MultilingualTranslationsService.prototype.translate;
3994
+ /**
3995
+ * @type {?}
3996
+ * @private
3997
+ */
3998
+ MultilingualTranslationsService.prototype.http;
3875
3999
  /**
3876
4000
  * @type {?}
3877
4001
  * @private
3878
4002
  */
3879
- WidgetUserService.prototype.http;
4003
+ MultilingualTranslationsService.prototype.configSvc;
3880
4004
  }
3881
4005
 
3882
4006
  /**
@@ -4437,9 +4561,6 @@
4437
4561
  this.fetchAllPlaylistSearch(strip, calculateParentStatus);
4438
4562
  this.fetchPlaylistReadData(strip, calculateParentStatus);
4439
4563
  this.fetchCiosContentData(strip, calculateParentStatus);
4440
- // this.enrollInterval = setInterval(() => {
4441
- // this.fetchAllCbpPlans(strip, calculateParentStatus)
4442
- // }, 1000)
4443
4564
  };
4444
4565
  /**
4445
4566
  * @param {?} strip
@@ -4682,12 +4803,12 @@
4682
4803
  function (strip, calculateParentStatus) {
4683
4804
  if (calculateParentStatus === void 0) { calculateParentStatus = true; }
4684
4805
  return __awaiter(this, void 0, void 0, function () {
4685
- var originalFilters, firstTab, allTabs, currentTabFromMap, response_1, error_1;
4806
+ var originalFilters, firstTab, allTabs, currentTabFromMap, response, result, responseData, error_1;
4686
4807
  var _this = this;
4687
4808
  return __generator(this, function (_a) {
4688
4809
  switch (_a.label) {
4689
4810
  case 0:
4690
- if (!(strip.request && strip.request.searchV6 && Object.keys(strip.request.searchV6).length)) return [3 /*break*/, 4];
4811
+ if (!(strip.request && strip.request.searchV6 && Object.keys(strip.request.searchV6).length)) return [3 /*break*/, 11];
4691
4812
  // if (!(strip.request.searchV6.locale && strip.request.searchV6.locale.length > 0)) {
4692
4813
  // if (this.configSvc.activeLocale) {
4693
4814
  // strip.request.searchV6.locale = [this.configSvc.activeLocale.locals[0]]
@@ -4716,44 +4837,75 @@
4716
4837
  this.getTabDataByNewReqSearchV6(strip, 0, currentTabFromMap, calculateParentStatus);
4717
4838
  }
4718
4839
  }
4719
- return [3 /*break*/, 4];
4840
+ return [3 /*break*/, 11];
4720
4841
  case 1:
4721
- _a.trys.push([1, 3, , 4]);
4842
+ _a.trys.push([1, 10, , 11]);
4722
4843
  return [4 /*yield*/, this.searchV6Request(strip, strip.request, calculateParentStatus)];
4723
4844
  case 2:
4724
- response_1 = _a.sent();
4725
- // console.log('calling after - response, ', response)
4726
- if (response_1 && response_1.results) {
4727
- // console.log('calling after-- ')
4728
- if (response_1.results.result.content) {
4729
- if (strip.key === 'scheduledAssessment') {
4730
- this.enrollInterval = setInterval((/**
4731
- * @return {?}
4732
- */
4733
- function () {
4734
- _this.checkInvitOnlyAssessments(response_1.results.result.content, strip, calculateParentStatus, response_1.viewMoreUrl);
4735
- // tslint:disable-next-line
4736
- }), 1000);
4737
- }
4738
- else {
4739
- this.processStrip(strip, this.transformContentsToWidgets(response_1.results.result.content, strip), 'done', calculateParentStatus, response_1.viewMoreUrl);
4740
- }
4741
- }
4742
- else if (response_1.results.result.Event) {
4743
- this.processStrip(strip, this.transformEventsToWidgets(response_1.results.result.Event, strip), 'done', calculateParentStatus, response_1.viewMoreUrl);
4744
- }
4745
- else {
4746
- this.processStrip(strip, [], 'error', calculateParentStatus, null);
4747
- }
4845
+ response = _a.sent();
4846
+ if (!(response && response.results)) return [3 /*break*/, 8];
4847
+ if (!response.results.result.content) return [3 /*break*/, 6];
4848
+ if (!(strip.key === 'scheduledAssessment')) return [3 /*break*/, 4];
4849
+ result = response.results.result.content.map((/**
4850
+ * @param {?} a
4851
+ * @return {?}
4852
+ */
4853
+ function (a) { return a.identifier; }));
4854
+ return [4 /*yield*/, this.userSvc.fetchEnrollmentDataByContentId(this.configSvc.userProfile.userId, result.join(',')).toPromise().then((/**
4855
+ * @param {?} res
4856
+ * @return {?}
4857
+ */
4858
+ function (res) { return __awaiter(_this, void 0, void 0, function () {
4859
+ var enrollData;
4860
+ return __generator(this, function (_a) {
4861
+ enrollData = {};
4862
+ if (res && res.courses && res.courses.length) {
4863
+ res.courses.forEach((/**
4864
+ * @param {?} data
4865
+ * @return {?}
4866
+ */
4867
+ function (data) {
4868
+ enrollData[data.collectionId] = data;
4869
+ }));
4870
+ return [2 /*return*/, enrollData];
4871
+ }
4872
+ else {
4873
+ return [2 /*return*/, {}];
4874
+ }
4875
+ return [2 /*return*/];
4876
+ });
4877
+ }); })).catch((/**
4878
+ * @param {?} _err
4879
+ * @return {?}
4880
+ */
4881
+ function (_err) {
4882
+ return {};
4883
+ }))];
4884
+ case 3:
4885
+ responseData = _a.sent();
4886
+ this.checkInvitOnlyAssessments(response.results.result.content, strip, calculateParentStatus, response.viewMoreUrl, responseData);
4887
+ return [3 /*break*/, 5];
4888
+ case 4:
4889
+ this.processStrip(strip, this.transformContentsToWidgets(response.results.result.content, strip), 'done', calculateParentStatus, response.viewMoreUrl);
4890
+ _a.label = 5;
4891
+ case 5: return [3 /*break*/, 7];
4892
+ case 6:
4893
+ if (response.results.result.Event) {
4894
+ this.processStrip(strip, this.transformEventsToWidgets(response.results.result.Event, strip), 'done', calculateParentStatus, response.viewMoreUrl);
4748
4895
  }
4749
4896
  else {
4750
4897
  this.processStrip(strip, [], 'error', calculateParentStatus, null);
4751
4898
  }
4752
- return [3 /*break*/, 4];
4753
- case 3:
4899
+ _a.label = 7;
4900
+ case 7: return [3 /*break*/, 9];
4901
+ case 8:
4902
+ this.processStrip(strip, [], 'error', calculateParentStatus, null);
4903
+ _a.label = 9;
4904
+ case 9: return [3 /*break*/, 11];
4905
+ case 10:
4754
4906
  error_1 = _a.sent();
4755
- return [3 /*break*/, 4];
4756
- case 4: return [2 /*return*/];
4907
+ return [3 /*break*/, 11];
4908
+ case 11: return [2 /*return*/];
4757
4909
  }
4758
4910
  });
4759
4911
  });
@@ -4763,6 +4915,7 @@
4763
4915
  * @param {?} strip
4764
4916
  * @param {?} calculateParentStatus
4765
4917
  * @param {?} viewMoreUrl
4918
+ * @param {?} enrollmentData
4766
4919
  * @return {?}
4767
4920
  */
4768
4921
  ContentStripWithTabsLibComponent.prototype.checkInvitOnlyAssessments = /**
@@ -4770,12 +4923,12 @@
4770
4923
  * @param {?} strip
4771
4924
  * @param {?} calculateParentStatus
4772
4925
  * @param {?} viewMoreUrl
4926
+ * @param {?} enrollmentData
4773
4927
  * @return {?}
4774
4928
  */
4775
- function (content, strip, calculateParentStatus, viewMoreUrl) {
4776
- var _this = this;
4777
- if (localStorage.getItem('enrollmentMapData')) {
4778
- this.enrollmentMapData = JSON.parse(localStorage.getItem('enrollmentMapData') || '{}');
4929
+ function (content, strip, calculateParentStatus, viewMoreUrl, enrollmentData) {
4930
+ if (Object.keys(enrollmentData).length) {
4931
+ enrollmentData = enrollmentData;
4779
4932
  /** @type {?} */
4780
4933
  var filteredArray_1 = [];
4781
4934
  /** @type {?} */
@@ -4785,10 +4938,10 @@
4785
4938
  * @return {?}
4786
4939
  */
4787
4940
  function (data) {
4788
- if (_this.enrollmentMapData[data.identifier]) {
4789
- if (_this.enrollmentMapData[data.identifier].status !== 2 && _this.enrollmentMapData[data.identifier].batch) {
4941
+ if (enrollmentData[data.identifier]) {
4942
+ if (enrollmentData[data.identifier].status !== 2 && enrollmentData[data.identifier].batch) {
4790
4943
  /** @type {?} */
4791
- var enrollData = _this.enrollmentMapData[data.identifier].batch;
4944
+ var enrollData = enrollmentData[data.identifier].batch;
4792
4945
  /** @type {?} */
4793
4946
  var endDate = new Date(enrollData.endDate).getTime()
4794
4947
  // let endDate:any = '2024-07-7T00:00:00.000Z'
@@ -4797,8 +4950,8 @@
4797
4950
  /** @type {?} */
4798
4951
  var timeDuration = endDate - now_1;
4799
4952
  if (timeDuration > 0) {
4800
- data['batch'] = _this.enrollmentMapData[data.identifier].batch;
4801
- data['completionPercentage'] = _this.enrollmentMapData[data.identifier].completionPercentage;
4953
+ data['batch'] = enrollmentData[data.identifier].batch;
4954
+ data['completionPercentage'] = enrollmentData[data.identifier].completionPercentage;
4802
4955
  filteredArray_1.push(data);
4803
4956
  }
4804
4957
  }
@@ -4817,7 +4970,6 @@
4817
4970
  return dateA - dateB;
4818
4971
  }));
4819
4972
  this.processStrip(strip, this.transformContentsToWidgets(filteredArray_1, strip), 'done', calculateParentStatus, viewMoreUrl);
4820
- clearInterval(this.enrollInterval);
4821
4973
  }
4822
4974
  };
4823
4975
  /**
@@ -5533,14 +5685,15 @@
5533
5685
  function (strip, calculateParentStatus) {
5534
5686
  if (calculateParentStatus === void 0) { calculateParentStatus = true; }
5535
5687
  return __awaiter(this, void 0, void 0, function () {
5536
- var courses, tabResults, response;
5688
+ var courses, tabResults, userId, response;
5537
5689
  return __generator(this, function (_a) {
5538
5690
  switch (_a.label) {
5539
5691
  case 0:
5540
- if (!(strip.request && strip.request.cbpList && Object.keys(strip.request.cbpList).length)) return [3 /*break*/, 5];
5692
+ if (!(strip.request && strip.request.cbpList && Object.keys(strip.request.cbpList).length)) return [3 /*break*/, 4];
5541
5693
  courses = void 0;
5542
5694
  tabResults = [];
5543
- return [4 /*yield*/, this.userSvc.fetchCbpPlanList().toPromise()];
5695
+ userId = this.configSvc.userProfile.userId;
5696
+ return [4 /*yield*/, this.userSvc.fetchCbpPlanList(userId).toPromise()];
5544
5697
  case 1:
5545
5698
  response = _a.sent();
5546
5699
  if (!response) return [3 /*break*/, 4];
@@ -5554,36 +5707,7 @@
5554
5707
  case 3:
5555
5708
  this.processStrip(strip, this.transformContentsToWidgets(courses, strip), 'done', calculateParentStatus, 'viewMoreUrl');
5556
5709
  _a.label = 4;
5557
- case 4:
5558
- // this.userSvc.fetchCbpPlanList().subscribe( async (res: any) => {
5559
- // if (res) {
5560
- // console.log(res,'===============================>')
5561
- // courses = res
5562
- // if (strip.tabs && strip.tabs.length) {
5563
- // tabResults = this.splitCbpTabsData(courses, strip)
5564
- // await this.processStrip(
5565
- // strip,
5566
- // this.transformContentsToWidgets(courses, strip),
5567
- // 'done',
5568
- // calculateParentStatus,
5569
- // '',
5570
- // tabResults
5571
- // )
5572
- // } else {
5573
- // this.processStrip(
5574
- // strip,
5575
- // this.transformContentsToWidgets(courses, strip),
5576
- // 'done',
5577
- // calculateParentStatus,
5578
- // 'viewMoreUrl',
5579
- // )
5580
- // }
5581
- // }
5582
- // }, (_err: any) => {
5583
- // })
5584
- clearInterval(this.enrollInterval);
5585
- _a.label = 5;
5586
- case 5: return [2 /*return*/];
5710
+ case 4: return [2 /*return*/];
5587
5711
  }
5588
5712
  });
5589
5713
  });
@@ -6717,13 +6841,13 @@
6717
6841
  /** @nocollapse */
6718
6842
  ContentStripWithTabsLibComponent.ctorParameters = function () { return [
6719
6843
  { type: undefined, decorators: [{ type: core.Inject, args: ['environment',] }] },
6720
- { type: WidgetContentService },
6844
+ { type: WidgetContentLibService },
6721
6845
  { type: utilsV2.LoggerService },
6722
6846
  { type: utilsV2.EventService },
6723
6847
  { type: utilsV2.ConfigurationsService },
6724
6848
  { type: utilsV2.UtilityService },
6725
6849
  { type: router.Router },
6726
- { type: WidgetUserService },
6850
+ { type: WidgetUserServiceLib },
6727
6851
  { type: core$1.TranslateService },
6728
6852
  { type: MultilingualTranslationsService }
6729
6853
  ]; };
@@ -6787,11 +6911,7 @@
6787
6911
  /** @type {?} */
6788
6912
  ContentStripWithTabsLibComponent.prototype.defaultMaxWidgets;
6789
6913
  /** @type {?} */
6790
- ContentStripWithTabsLibComponent.prototype.enrollInterval;
6791
- /** @type {?} */
6792
6914
  ContentStripWithTabsLibComponent.prototype.todaysEvents;
6793
- /** @type {?} */
6794
- ContentStripWithTabsLibComponent.prototype.enrollmentMapData;
6795
6915
  /**
6796
6916
  * @type {?}
6797
6917
  * @private
@@ -9009,12 +9129,12 @@
9009
9129
  /** @nocollapse */
9010
9130
  CommonStripComponent.ctorParameters = function () { return [
9011
9131
  { type: undefined, decorators: [{ type: core.Inject, args: ['environment',] }] },
9012
- { type: WidgetContentService },
9132
+ { type: WidgetContentLibService },
9013
9133
  { type: utilsV2.LoggerService },
9014
9134
  { type: utilsV2.EventService },
9015
9135
  { type: utilsV2.ConfigurationsService },
9016
9136
  { type: utilsV2.UtilityService },
9017
- { type: WidgetUserService },
9137
+ { type: WidgetUserServiceLib },
9018
9138
  { type: core$1.TranslateService },
9019
9139
  { type: MultilingualTranslationsService },
9020
9140
  { type: CommonMethodsService }
@@ -10224,13 +10344,6 @@
10224
10344
  function () {
10225
10345
  _this.getCbPlanData();
10226
10346
  }), 1000);
10227
- this.enrollInterval = setInterval((/**
10228
- * @return {?}
10229
- */
10230
- function () {
10231
- _this.getEnrollmentData();
10232
- // tslint:disable-next-line
10233
- }), 1000);
10234
10347
  };
10235
10348
  Object.defineProperty(CardsComponent.prototype, "isLiveOrMarkForDeletion", {
10236
10349
  get: /**
@@ -10315,18 +10428,6 @@
10315
10428
  clearInterval(this.cbPlanInterval);
10316
10429
  }
10317
10430
  };
10318
- /**
10319
- * @return {?}
10320
- */
10321
- CardsComponent.prototype.getEnrollmentData = /**
10322
- * @return {?}
10323
- */
10324
- function () {
10325
- if (localStorage.getItem('enrollmentMapData')) {
10326
- this.enrollmentMapData = JSON.parse(localStorage.getItem('enrollmentMapData') || '{}');
10327
- clearInterval(this.enrollInterval);
10328
- }
10329
- };
10330
10431
  /**
10331
10432
  * @param {?} data
10332
10433
  * @return {?}
@@ -10341,14 +10442,14 @@
10341
10442
  CardsComponent.decorators = [
10342
10443
  { type: core.Component, args: [{
10343
10444
  selector: 'sb-uic-cards',
10344
- template: "<div class=\"widget-card-content-new\">\n <ng-container *ngIf=\"widgetData && (((widgetData?.deletedMode || 'none') === 'hide' && !!!isLiveOrMarkForDeletion)\n ? false\n : !((widgetData?.intranetMode || 'none') === 'hide' && !!showIntranetContent))\"\n [ngSwitch]=\"( (widgetData && widgetData?.cardSubType) || 'cardPortraitLib')\">\n <ng-container *ngSwitchDefault [ngTemplateOutlet]=\"cardPortraitLib\"></ng-container>\n <ng-container *ngSwitchCase=\"'user-card'\" [ngTemplateOutlet]=\"cardUser\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-portrait-lib-skeleton'\" [ngTemplateOutlet]=\"cardPortraitLibSkeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-portrait-lib'\" [ngTemplateOutlet]=\"cardPortraitLib\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-landscape-lib-skeleton'\" [ngTemplateOutlet]=\"cardLandscapeLibSkeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-landscape-lib'\" [ngTemplateOutlet]=\"cardLandscapeLib\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-wide-lib-skeleton'\" [ngTemplateOutlet]=\"cardWideLibSkeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-wide-lib'\" [ngTemplateOutlet]=\"cardWideLib\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-wide-v2'\" [ngTemplateOutlet]=\"cardWideV2\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-wide-v2-skeleton'\" [ngTemplateOutlet]=\"cardWideV2Skeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-mdo-lib'\" [ngTemplateOutlet]=\"cardMdo\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-mdo-home-lib'\" [ngTemplateOutlet]=\"cardMdoHome\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-mdo-home-lib-skeleton'\" [ngTemplateOutlet]=\"cardMdoHomeSkeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-mdo-lib-skeleton'\" [ngTemplateOutlet]=\"cardMdoSkeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-scheduled-assessment'\" [ngTemplateOutlet]=\"cardScheduledAssessment\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-scheduled-assessment-skeleton'\" [ngTemplateOutlet]=\"cardScheduledAssessmentSkelton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-karma-program-lib'\" [ngTemplateOutlet]=\"cardKarmaProgram\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-karma-program-lib-skeleton'\" [ngTemplateOutlet]=\"cardKarmaProgramSkeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-progress-portrait-lib'\" [ngTemplateOutlet]=\"cardProgressLib\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-progress-portrait-lib-skeleton'\" [ngTemplateOutlet]=\"cardProgressLibSkeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-karma-program-lib-v2'\" [ngTemplateOutlet]=\"cardKarmaProgramV2\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-karma-program-lib-v2-skeleton'\" [ngTemplateOutlet]=\"cardKarmaProgramV2\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-providers-lib'\" [ngTemplateOutlet]=\"cardProvider\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-providers-lib-skeleton'\" [ngTemplateOutlet]=\"cardProviderSkeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-portrait-ext-lib-skeleton'\" [ngTemplateOutlet]=\"cardPortraitExtLibSkeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-portrait-ext-lib'\" [ngTemplateOutlet]=\"cardPortraitExtLib\"></ng-container>\n\n </ng-container>\n</div>\n\n<ng-template #cardPortraitLibSkeleton>\n <sb-uic-card-portrait [widgetData]=\"widgetData\" [isCardLoading]=\"true\"></sb-uic-card-portrait>\n</ng-template>\n<ng-template #cardPortraitLib>\n <sb-uic-card-portrait \n [cbPlanMapData]=\"cbPlanMapData\"\n (contentData)=\"getRedirectUrlData($event)\" [widgetData]=\"widgetData\" [isCardLoading]=\"false\"></sb-uic-card-portrait>\n</ng-template>\n<ng-template #cardLandscapeLibSkeleton>\n <sb-uic-card-landscape [widgetData]=\"widgetData\" \n [cbPlanMapData]=\"cbPlanMapData\" [isCardLoading]=\"true\"></sb-uic-card-landscape>\n</ng-template>\n<ng-template #cardLandscapeLib>\n <sb-uic-card-landscape\n (contentData)=\"getRedirectUrlData($event)\"\n (triggerTelemetry)=\"raiseCardClick($event)\"\n [widgetData]=\"widgetData\"\n [cbPlanMapData]=\"cbPlanMapData\"\n [isCardLoading]=\"false\">\n </sb-uic-card-landscape>\n</ng-template>\n\n<ng-template #cardWideLib>\n <sb-uic-card-wide (contentData)=\"getRedirectUrlData($event)\" [widgetData]=\"widgetData\"></sb-uic-card-wide>\n</ng-template>\n<ng-template #cardWideLibSkeleton>\n <sb-uic-card-wide [widgetData]=\"widgetData\"></sb-uic-card-wide>\n</ng-template>\n\n<ng-template #cardWideV2Skeleton>\n <sb-uic-card-wide-v2 [widgetData]=\"widgetData\" [isCardLoading]=\"true\" ></sb-uic-card-wide-v2>\n</ng-template>\n<ng-template #cardWideV2>\n <sb-uic-card-wide-v2\n (contentData)=\"getRedirectUrlData($event)\"\n (triggerTelemetry)=\"raiseCardClick($event)\"\n [cbPlanMapData]=\"cbPlanMapData\"\n [isCardLoading]=\"false\"\n [widgetData]=\"widgetData\">\n </sb-uic-card-wide-v2>\n</ng-template>\n\n<ng-template #cardUser>\n <sb-uic-card-user [widgetData]=\"widgetData\"></sb-uic-card-user>\n</ng-template>\n<ng-template #cardMdoHome>\n <sb-uic-card-mdo-channel-v1 [isCardLoading]=\"false\" [widgetData]=\"widgetData\"></sb-uic-card-mdo-channel-v1>\n</ng-template>\n<ng-template #cardMdoHomeSkeleton>\n <sb-uic-card-mdo-channel-v1 [isCardLoading]=\"true\" [widgetData]=\"widgetData\"></sb-uic-card-mdo-channel-v1>\n</ng-template>\n<ng-template #cardMdo>\n <sb-uic-card-mdo-channel [isCardLoading]=\"true\" [widgetData]=\"widgetData\"></sb-uic-card-mdo-channel>\n</ng-template>\n<ng-template #cardMdoSkeleton>\n <sb-uic-card-mdo-channel [isCardLoading]=\"true\" [widgetData]=\"widgetData\"></sb-uic-card-mdo-channel>\n</ng-template>\n<ng-template #cardKarmaProgramSkeleton>\n <sb-uic-card-karma-programs [randomColorApply]=\"true\" \n [isCardLoading]=\"true\" [widgetData]=\"widgetData\"></sb-uic-card-karma-programs>\n</ng-template>\n<ng-template #cardKarmaProgram>\n <sb-uic-card-karma-programs [randomColorApply]=\"true\" \n [isCardLoading]=\"false\" [widgetData]=\"widgetData\"></sb-uic-card-karma-programs>\n</ng-template>\n<ng-template #cardScheduledAssessmentSkelton>\n <sb-uic-card-assessment [widgetData]=\"widgetData\" [isCardLoading]=\"true\"></sb-uic-card-assessment>\n</ng-template>\n<ng-template #cardScheduledAssessment>\n <sb-uic-card-assessment [widgetData]=\"widgetData\" (contentData)=\"getRedirectUrlData($event)\" [isCardLoading]=\"false\" [enrollmentMapData]=\"enrollmentMapData\"></sb-uic-card-assessment>\n</ng-template>\n<ng-template #cardProgressLibSkeleton>\n <sb-uic-card-progress-portrait-lib \n [isCardLoading]=\"true\" [widgetData]=\"widgetData\"></sb-uic-card-progress-portrait-lib>\n</ng-template>\n<ng-template #cardProgressLib>\n <sb-uic-card-progress-portrait-lib \n [isCardLoading]=\"false\" (contentData)=\"getRedirectUrlData($event)\" [widgetData]=\"widgetData\"></sb-uic-card-progress-portrait-lib>\n</ng-template>\n<ng-template #cardKarmaProgramV2>\n <!-- <sb-uic-card-karma-programs-v2 [widgetData]=\"widgetData\"><sb-uic-card-karma-programs-v2> -->\n</ng-template>\n<ng-template #cardProvider>\n <sb-uic-provider-card [isCardLoading]=\"false\" [widgetData]=\"widgetData\"></sb-uic-provider-card>\n</ng-template>\n<ng-template #cardProviderSkeleton>\n <sb-uic-provider-card [isCardLoading]=\"true\" [widgetData]=\"widgetData\"></sb-uic-provider-card>\n</ng-template>\n\n<!-- cios card -->\n<ng-template #cardPortraitExtLibSkeleton>\n <sb-uic-card-portrait-ext [widgetData]=\"widgetData\" [isCardLoading]=\"true\"></sb-uic-card-portrait-ext>\n</ng-template>\n<ng-template #cardPortraitExtLib>\n <sb-uic-card-portrait-ext \n [cbPlanMapData]=\"cbPlanMapData\"\n (contentData)=\"getRedirectUrlData($event)\" [widgetData]=\"widgetData\" [isCardLoading]=\"false\"></sb-uic-card-portrait-ext>\n</ng-template>\n",
10445
+ template: "<div class=\"widget-card-content-new\">\n <ng-container *ngIf=\"widgetData && (((widgetData?.deletedMode || 'none') === 'hide' && !!!isLiveOrMarkForDeletion)\n ? false\n : !((widgetData?.intranetMode || 'none') === 'hide' && !!showIntranetContent))\"\n [ngSwitch]=\"( (widgetData && widgetData?.cardSubType) || 'cardPortraitLib')\">\n <ng-container *ngSwitchDefault [ngTemplateOutlet]=\"cardPortraitLib\"></ng-container>\n <ng-container *ngSwitchCase=\"'user-card'\" [ngTemplateOutlet]=\"cardUser\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-portrait-lib-skeleton'\" [ngTemplateOutlet]=\"cardPortraitLibSkeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-portrait-lib'\" [ngTemplateOutlet]=\"cardPortraitLib\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-landscape-lib-skeleton'\" [ngTemplateOutlet]=\"cardLandscapeLibSkeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-landscape-lib'\" [ngTemplateOutlet]=\"cardLandscapeLib\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-wide-lib-skeleton'\" [ngTemplateOutlet]=\"cardWideLibSkeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-wide-lib'\" [ngTemplateOutlet]=\"cardWideLib\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-wide-v2'\" [ngTemplateOutlet]=\"cardWideV2\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-wide-v2-skeleton'\" [ngTemplateOutlet]=\"cardWideV2Skeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-mdo-lib'\" [ngTemplateOutlet]=\"cardMdo\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-mdo-home-lib'\" [ngTemplateOutlet]=\"cardMdoHome\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-mdo-home-lib-skeleton'\" [ngTemplateOutlet]=\"cardMdoHomeSkeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-mdo-lib-skeleton'\" [ngTemplateOutlet]=\"cardMdoSkeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-scheduled-assessment'\" [ngTemplateOutlet]=\"cardScheduledAssessment\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-scheduled-assessment-skeleton'\" [ngTemplateOutlet]=\"cardScheduledAssessmentSkelton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-karma-program-lib'\" [ngTemplateOutlet]=\"cardKarmaProgram\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-karma-program-lib-skeleton'\" [ngTemplateOutlet]=\"cardKarmaProgramSkeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-progress-portrait-lib'\" [ngTemplateOutlet]=\"cardProgressLib\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-progress-portrait-lib-skeleton'\" [ngTemplateOutlet]=\"cardProgressLibSkeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-karma-program-lib-v2'\" [ngTemplateOutlet]=\"cardKarmaProgramV2\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-karma-program-lib-v2-skeleton'\" [ngTemplateOutlet]=\"cardKarmaProgramV2\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-providers-lib'\" [ngTemplateOutlet]=\"cardProvider\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-providers-lib-skeleton'\" [ngTemplateOutlet]=\"cardProviderSkeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-portrait-ext-lib-skeleton'\" [ngTemplateOutlet]=\"cardPortraitExtLibSkeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-portrait-ext-lib'\" [ngTemplateOutlet]=\"cardPortraitExtLib\"></ng-container>\n\n </ng-container>\n</div>\n\n<ng-template #cardPortraitLibSkeleton>\n <sb-uic-card-portrait [widgetData]=\"widgetData\" [isCardLoading]=\"true\"></sb-uic-card-portrait>\n</ng-template>\n<ng-template #cardPortraitLib>\n <sb-uic-card-portrait \n [cbPlanMapData]=\"cbPlanMapData\"\n (contentData)=\"getRedirectUrlData($event)\" [widgetData]=\"widgetData\" [isCardLoading]=\"false\"></sb-uic-card-portrait>\n</ng-template>\n<ng-template #cardLandscapeLibSkeleton>\n <sb-uic-card-landscape [widgetData]=\"widgetData\" \n [cbPlanMapData]=\"cbPlanMapData\" [isCardLoading]=\"true\"></sb-uic-card-landscape>\n</ng-template>\n<ng-template #cardLandscapeLib>\n <sb-uic-card-landscape\n (contentData)=\"getRedirectUrlData($event)\"\n (triggerTelemetry)=\"raiseCardClick($event)\"\n [widgetData]=\"widgetData\"\n [cbPlanMapData]=\"cbPlanMapData\"\n [isCardLoading]=\"false\">\n </sb-uic-card-landscape>\n</ng-template>\n\n<ng-template #cardWideLib>\n <sb-uic-card-wide (contentData)=\"getRedirectUrlData($event)\" [widgetData]=\"widgetData\"></sb-uic-card-wide>\n</ng-template>\n<ng-template #cardWideLibSkeleton>\n <sb-uic-card-wide [widgetData]=\"widgetData\"></sb-uic-card-wide>\n</ng-template>\n\n<ng-template #cardWideV2Skeleton>\n <sb-uic-card-wide-v2 [widgetData]=\"widgetData\" [isCardLoading]=\"true\" ></sb-uic-card-wide-v2>\n</ng-template>\n<ng-template #cardWideV2>\n <sb-uic-card-wide-v2\n (contentData)=\"getRedirectUrlData($event)\"\n (triggerTelemetry)=\"raiseCardClick($event)\"\n [cbPlanMapData]=\"cbPlanMapData\"\n [isCardLoading]=\"false\"\n [widgetData]=\"widgetData\">\n </sb-uic-card-wide-v2>\n</ng-template>\n\n<ng-template #cardUser>\n <sb-uic-card-user [widgetData]=\"widgetData\"></sb-uic-card-user>\n</ng-template>\n<ng-template #cardMdoHome>\n <sb-uic-card-mdo-channel-v1 [isCardLoading]=\"false\" [widgetData]=\"widgetData\"></sb-uic-card-mdo-channel-v1>\n</ng-template>\n<ng-template #cardMdoHomeSkeleton>\n <sb-uic-card-mdo-channel-v1 [isCardLoading]=\"true\" [widgetData]=\"widgetData\"></sb-uic-card-mdo-channel-v1>\n</ng-template>\n<ng-template #cardMdo>\n <sb-uic-card-mdo-channel [isCardLoading]=\"true\" [widgetData]=\"widgetData\"></sb-uic-card-mdo-channel>\n</ng-template>\n<ng-template #cardMdoSkeleton>\n <sb-uic-card-mdo-channel [isCardLoading]=\"true\" [widgetData]=\"widgetData\"></sb-uic-card-mdo-channel>\n</ng-template>\n<ng-template #cardKarmaProgramSkeleton>\n <sb-uic-card-karma-programs [randomColorApply]=\"true\" \n [isCardLoading]=\"true\" [widgetData]=\"widgetData\"></sb-uic-card-karma-programs>\n</ng-template>\n<ng-template #cardKarmaProgram>\n <sb-uic-card-karma-programs [randomColorApply]=\"true\" \n [isCardLoading]=\"false\" [widgetData]=\"widgetData\"></sb-uic-card-karma-programs>\n</ng-template>\n<ng-template #cardScheduledAssessmentSkelton>\n <sb-uic-card-assessment [widgetData]=\"widgetData\" [isCardLoading]=\"true\"></sb-uic-card-assessment>\n</ng-template>\n<ng-template #cardScheduledAssessment>\n <sb-uic-card-assessment [widgetData]=\"widgetData\" (contentData)=\"getRedirectUrlData($event)\" [isCardLoading]=\"false\" ></sb-uic-card-assessment>\n</ng-template>\n<ng-template #cardProgressLibSkeleton>\n <sb-uic-card-progress-portrait-lib \n [isCardLoading]=\"true\" [widgetData]=\"widgetData\"></sb-uic-card-progress-portrait-lib>\n</ng-template>\n<ng-template #cardProgressLib>\n <sb-uic-card-progress-portrait-lib \n [isCardLoading]=\"false\" (contentData)=\"getRedirectUrlData($event)\" [widgetData]=\"widgetData\"></sb-uic-card-progress-portrait-lib>\n</ng-template>\n<ng-template #cardKarmaProgramV2>\n <!-- <sb-uic-card-karma-programs-v2 [widgetData]=\"widgetData\"><sb-uic-card-karma-programs-v2> -->\n</ng-template>\n<ng-template #cardProvider>\n <sb-uic-provider-card [isCardLoading]=\"false\" [widgetData]=\"widgetData\"></sb-uic-provider-card>\n</ng-template>\n<ng-template #cardProviderSkeleton>\n <sb-uic-provider-card [isCardLoading]=\"true\" [widgetData]=\"widgetData\"></sb-uic-provider-card>\n</ng-template>\n\n<!-- cios card -->\n<ng-template #cardPortraitExtLibSkeleton>\n <sb-uic-card-portrait-ext [widgetData]=\"widgetData\" [isCardLoading]=\"true\"></sb-uic-card-portrait-ext>\n</ng-template>\n<ng-template #cardPortraitExtLib>\n <sb-uic-card-portrait-ext \n [cbPlanMapData]=\"cbPlanMapData\"\n (contentData)=\"getRedirectUrlData($event)\" [widgetData]=\"widgetData\" [isCardLoading]=\"false\"></sb-uic-card-portrait-ext>\n</ng-template>\n",
10345
10446
  styles: [""]
10346
10447
  }] }
10347
10448
  ];
10348
10449
  /** @nocollapse */
10349
10450
  CardsComponent.ctorParameters = function () { return [
10350
10451
  { type: utilsV2.UtilityService },
10351
- { type: WidgetContentService },
10452
+ { type: WidgetContentLibService },
10352
10453
  { type: router.Router }
10353
10454
  ]; };
10354
10455
  CardsComponent.propDecorators = {
@@ -10368,10 +10469,6 @@
10368
10469
  CardsComponent.prototype.cbPlanMapData;
10369
10470
  /** @type {?} */
10370
10471
  CardsComponent.prototype.cbPlanInterval;
10371
- /** @type {?} */
10372
- CardsComponent.prototype.enrollInterval;
10373
- /** @type {?} */
10374
- CardsComponent.prototype.enrollmentMapData;
10375
10472
  /**
10376
10473
  * @type {?}
10377
10474
  * @private
@@ -10516,7 +10613,7 @@
10516
10613
  { type: core$1.TranslateService },
10517
10614
  { type: MultilingualTranslationsService },
10518
10615
  { type: utilsV2.ConfigurationsService },
10519
- { type: WidgetContentService }
10616
+ { type: WidgetContentLibService }
10520
10617
  ]; };
10521
10618
  CardPortraitComponent.propDecorators = {
10522
10619
  widgetData: [{ type: core.Input }],
@@ -11647,7 +11744,7 @@
11647
11744
  { type: core$1.TranslateService },
11648
11745
  { type: utilsV2.MultilingualTranslationsService },
11649
11746
  { type: utilsV2.ConfigurationsService },
11650
- { type: WidgetContentService },
11747
+ { type: WidgetContentLibService },
11651
11748
  { type: router.Router }
11652
11749
  ]; };
11653
11750
  CardMDOChannelComponent.propDecorators = {
@@ -11997,7 +12094,7 @@
11997
12094
  { type: core$1.TranslateService },
11998
12095
  { type: utilsV2.MultilingualTranslationsService },
11999
12096
  { type: utilsV2.ConfigurationsService },
12000
- { type: WidgetContentService },
12097
+ { type: WidgetContentLibService },
12001
12098
  { type: router.Router }
12002
12099
  ]; };
12003
12100
  CardKarmaProgramsComponent.propDecorators = {
@@ -12415,7 +12512,7 @@
12415
12512
  { type: core$1.TranslateService },
12416
12513
  { type: MultilingualTranslationsService },
12417
12514
  { type: utilsV2.ConfigurationsService },
12418
- { type: WidgetContentService }
12515
+ { type: WidgetContentLibService }
12419
12516
  ]; };
12420
12517
  CardPortraitExtComponent.propDecorators = {
12421
12518
  widgetData: [{ type: core.Input }],
@@ -12605,11 +12702,10 @@
12605
12702
  /** @nocollapse */
12606
12703
  CardAssessmentComponent.ctorParameters = function () { return [
12607
12704
  { type: utilsV2.ConfigurationsService },
12608
- { type: WidgetContentService }
12705
+ { type: WidgetContentLibService }
12609
12706
  ]; };
12610
12707
  CardAssessmentComponent.propDecorators = {
12611
12708
  widgetData: [{ type: core.Input }],
12612
- enrollmentMapData: [{ type: core.Input }],
12613
12709
  contentData: [{ type: core.Output }],
12614
12710
  isCardLoading: [{ type: core.Input }]
12615
12711
  };
@@ -12619,8 +12715,6 @@
12619
12715
  /** @type {?} */
12620
12716
  CardAssessmentComponent.prototype.widgetData;
12621
12717
  /** @type {?} */
12622
- CardAssessmentComponent.prototype.enrollmentMapData;
12623
- /** @type {?} */
12624
12718
  CardAssessmentComponent.prototype.contentData;
12625
12719
  /** @type {?} */
12626
12720
  CardAssessmentComponent.prototype.isCardLoading;
@@ -13149,7 +13243,7 @@
13149
13243
  { type: utilsV2.EventService },
13150
13244
  { type: MultilingualTranslationsService },
13151
13245
  { type: utilsV2.ConfigurationsService },
13152
- { type: WidgetContentService },
13246
+ { type: WidgetContentLibService },
13153
13247
  { type: CertificateService },
13154
13248
  { type: material.MatDialog }
13155
13249
  ]; };
@@ -13488,7 +13582,7 @@
13488
13582
  { type: core$1.TranslateService },
13489
13583
  { type: utilsV2.MultilingualTranslationsService },
13490
13584
  { type: utilsV2.ConfigurationsService },
13491
- { type: WidgetContentService },
13585
+ { type: WidgetContentLibService },
13492
13586
  { type: router.Router }
13493
13587
  ]; };
13494
13588
  CardMdoChannelV1Component.propDecorators = {
@@ -15371,13 +15465,13 @@
15371
15465
  /** @nocollapse */
15372
15466
  ContentStripFacetFilterComponent.ctorParameters = function () { return [
15373
15467
  { type: undefined, decorators: [{ type: core.Inject, args: ['environment',] }] },
15374
- { type: WidgetContentService },
15468
+ { type: WidgetContentLibService },
15375
15469
  { type: utilsV2.LoggerService },
15376
15470
  { type: utilsV2.EventService },
15377
15471
  { type: utilsV2.ConfigurationsService },
15378
15472
  { type: utilsV2.UtilityService },
15379
15473
  { type: router.Router },
15380
- { type: WidgetUserService },
15474
+ { type: WidgetUserServiceLib },
15381
15475
  { type: core$1.TranslateService },
15382
15476
  { type: MultilingualTranslationsService },
15383
15477
  { type: forms.FormBuilder }
@@ -15446,8 +15540,6 @@
15446
15540
  /** @type {?} */
15447
15541
  ContentStripFacetFilterComponent.prototype.todaysEvents;
15448
15542
  /** @type {?} */
15449
- ContentStripFacetFilterComponent.prototype.enrollmentMapData;
15450
- /** @type {?} */
15451
15543
  ContentStripFacetFilterComponent.prototype.facetForm;
15452
15544
  /**
15453
15545
  * @type {?}
@@ -17003,14 +17095,15 @@
17003
17095
  function (strip, calculateParentStatus) {
17004
17096
  if (calculateParentStatus === void 0) { calculateParentStatus = true; }
17005
17097
  return __awaiter(this, void 0, void 0, function () {
17006
- var courses, tabResults, response, countOfWidget_1;
17098
+ var courses, tabResults, userId, response, countOfWidget_1;
17007
17099
  return __generator(this, function (_a) {
17008
17100
  switch (_a.label) {
17009
17101
  case 0:
17010
17102
  if (!(strip.request && strip.request.cbpList && Object.keys(strip.request.cbpList).length)) return [3 /*break*/, 5];
17011
17103
  courses = void 0;
17012
17104
  tabResults = [];
17013
- return [4 /*yield*/, this.userSvc.fetchCbpPlanList().toPromise()];
17105
+ userId = this.configSvc.userProfile.userId;
17106
+ return [4 /*yield*/, this.userSvc.fetchCbpPlanList(userId).toPromise()];
17014
17107
  case 1:
17015
17108
  response = _a.sent();
17016
17109
  if (!response) return [3 /*break*/, 4];
@@ -17255,13 +17348,13 @@
17255
17348
  /** @nocollapse */
17256
17349
  ContentStripWithTabsPillsComponent.ctorParameters = function () { return [
17257
17350
  { type: undefined, decorators: [{ type: core.Inject, args: ['environment',] }] },
17258
- { type: WidgetContentService },
17351
+ { type: WidgetContentLibService },
17259
17352
  { type: utilsV2.LoggerService },
17260
17353
  { type: utilsV2.EventService },
17261
17354
  { type: utilsV2.ConfigurationsService },
17262
17355
  { type: utilsV2.UtilityService },
17263
17356
  { type: router.Router },
17264
- { type: WidgetUserService },
17357
+ { type: WidgetUserServiceLib },
17265
17358
  { type: core$1.TranslateService },
17266
17359
  { type: MultilingualTranslationsService }
17267
17360
  ]; };
@@ -17328,8 +17421,6 @@
17328
17421
  ContentStripWithTabsPillsComponent.prototype.enrollInterval;
17329
17422
  /** @type {?} */
17330
17423
  ContentStripWithTabsPillsComponent.prototype.todaysEvents;
17331
- /** @type {?} */
17332
- ContentStripWithTabsPillsComponent.prototype.enrollmentMapData;
17333
17424
  /**
17334
17425
  * @type {?}
17335
17426
  * @private
@@ -18179,7 +18270,7 @@
18179
18270
  /** @nocollapse */
18180
18271
  CompetencyPassbookComponent.ctorParameters = function () { return [
18181
18272
  { type: utilsV2.ConfigurationsService },
18182
- { type: WidgetContentService },
18273
+ { type: WidgetContentLibService },
18183
18274
  { type: CompetencyPassbookService },
18184
18275
  { type: router.Router },
18185
18276
  { type: undefined, decorators: [{ type: core.Inject, args: ['environment',] }] }
@@ -18738,7 +18829,7 @@
18738
18829
  /** @nocollapse */
18739
18830
  CompetencyPassbookMdoComponent.ctorParameters = function () { return [
18740
18831
  { type: utilsV2.ConfigurationsService },
18741
- { type: WidgetContentService },
18832
+ { type: WidgetContentLibService },
18742
18833
  { type: CompetencyPassbookMdoService },
18743
18834
  { type: router.Router },
18744
18835
  { type: undefined, decorators: [{ type: core.Inject, args: ['environment',] }] }
@@ -19536,7 +19627,7 @@
19536
19627
  MdoChannelV2Component.decorators = [
19537
19628
  { type: core.Component, args: [{
19538
19629
  selector: 'sb-uic-mdo-channel-v2',
19539
- template: "<ws-widget-btn-page-back [widgetData]=\"{ url: 'home', titles: titles }\">\n</ws-widget-btn-page-back>\n\n<div class=\"container-fluid\" id=\"section-micro-sites\">\n <div class=\"flex flex-col flex-1\">\n <ng-container *ngIf=\"sectionList?.length\">\n <ng-container *ngFor=\"let section of sectionList\">\n <ng-container *ngIf=\"section?.enabled\">\n <section id=\"{{section?.key}}\" class=\"w-full grid grid-cols-12 gap-4\" [ngClass]=\"{'container': section.wrapperClass}\">\n <ng-container *ngFor=\"let column of section.column\">\n <div id=\"{{column?.key}}\" class=\"col-span-{{column.colspan || 12}} \">\n <ng-container *ngIf=\"column?.enabled\" [ngSwitch]=\"column?.key\">\n <ng-container *ngSwitchCase=\"'topSection'\" [ngTemplateOutlet]=\"topSection\"\n [ngTemplateOutletContext]=\"{data: column?.data}\"></ng-container>\n <ng-container *ngSwitchCase=\"'topLearners'\" [ngTemplateOutlet]=\"topLearners\"\n [ngTemplateOutletContext]=\"{data: column?.data}\"></ng-container>\n <ng-container *ngSwitchCase=\"'mainContent'\" [ngTemplateOutlet]=\"mainContent\"\n [ngTemplateOutletContext]=\"{data: column?.data}\"></ng-container>\n </ng-container>\n </div>\n </ng-container>\n </section>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n</div>\n\n\n<ng-template #topSection let-data=\"data\">\n <!-- top section desktop layout -->\n <div class=\"hidden md:block\">\n <div class=\"web-banner-background\">\n <div class=\"flex items-center justify-center\">\n <div class=\"container\">\n <div class=\"flex sticky-logo-square\" [style.width]=\"stripWidth\">\n </div>\n <div class=\"grid grid-cols-12 gap-4 padding-top-xxxl mb-10\">\n <div class=\"col-span-12 md:col-span-6\">\n <div class=\"flex-1 flex flex-col mr-4 ws-mat-black-text\">\n <div class=\"\">\n <div class=\"flex items-center logo-square \">\n <img alt=\"Application Logo\" class=\"logo-img\" [src]=\"data?.logo\">\n </div>\n <h1 class=\" txt-ellipsis-2 break-words pt-10\"\n [style.color]=\"data.titleColor\">{{data.title || channnelName}}</h1>\n <p class=\"mat-body-1\" [style.color]=\"data.descriptionColor\">\n {{data?.description | slice:0:descriptionMaxLength}}\n <span *ngIf=\"data?.description?.length > descriptionMaxLength\">...</span>\n </p>\n </div>\n </div>\n </div>\n <div class=\"col-span-12 md:col-span-6\">\n <div class=\"slider slider-box\" *ngIf=\"data.sliderData && data.sliderData.sliders\">\n <sb-uic-sliders [widgetData]=\"data.sliderData.sliders\" [styleData]=\"data.sliderData.styleData\" ></sb-uic-sliders>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n \n </div>\n <!-- top section m-site layout -->\n <div class=\"block md:hidden\">\n <div class=\"col-span-12\">\n <div class=\"slider slider-box\" *ngIf=\"data.sliderData && data.sliderData.sliders\">\n <sb-uic-sliders [widgetData]=\"data.sliderData.sliders\" [styleData]=\"data.sliderData.styleData\" ></sb-uic-sliders>\n </div>\n </div>\n <div class=\"container px-4 flex flex-col mob-container\">\n <div class=\"mr-4 logo-box-container\">\n <div class=\"flex logo-box-square top mr-4\">\n <img alt=\"Application Logo\" class=\"logo-img\" [src]=\"data?.logo\">\n </div>\n </div>\n <div class=\"w-full md:w-9/12 flex-1 flex flex-col\">\n <h1 class=\" txt-ellipsis-2 break-words\">{{data?.title || channnelName}}</h1>\n <p class=\"mat-body-2\">\n {{data?.description | slice:0:descriptionMaxLength}}\n <span *ngIf=\"data?.description?.length > descriptionMaxLength\">...</span>\n </p>\n </div>\n </div>\n </div>\n <div class=\"flex items-center justify-center\">\n <div class=\"container metrics-section\" >\n <div class=\"hidden md:block\">\n <div class=\"metrics\"\n [ngStyle]=\"{'background': data?.metrics?.background}\">\n <sb-uic-data-points\n [providerId]=\"orgId\"\n [fetchDataFromApi]=\"true\"\n [objectData]=\"data?.metrics?.data\"\n [layoutType]=\"'singleFlexeRow'\"\n [pageLayout]=\"'mdo'\">\n </sb-uic-data-points>\n </div>\n </div>\n <div class=\"block md:hidden pt-14 px-4\">\n <div class=\"mob-metrics mob-metrics-sec\">\n <sb-uic-data-points\n [providerId]=\"orgId\"\n [fetchDataFromApi]=\"true\"\n [objectData]=\"data?.metrics?.data\"\n [layoutType]=\"'singleRow'\"\n [pageLayout]=\"'mdo'\">\n </sb-uic-data-points>\n </div>\n \n </div>\n </div>\n </div>\n</ng-template>\n\n<ng-template #mainContent let-data=\"data\">\n <div class=\"flex items-center justify-center\" [ngStyle]=\"{'background': data.background}\">\n <div class=\"container\">\n <div class=\"block md:hidden col-span-12 padding-left-m padding-right-m padding-top-m padding-bottom-m\">\n <sb-uic-cbp-plan\n [layoutType]=\"'web'\"\n [mobileHeight]=\"false\"\n [fetchDataFromApi]=\"true\"\n [channelId]=\"orgId\"\n [objectData]=\"data?.cbpPlanSection?.data\">\n </sb-uic-cbp-plan>\n </div>\n <div class=\"block md:hidden col-span-12 mt-6\">\n <sb-uic-announcements\n [layoutType]=\"'mobile'\"\n (openDialog)=\"triggerOpenDialog($event)\"\n [objectData]=\"data?.announcementSection?.data\"\n [fetchDataFromApi]=\"false\"\n [channelId]=\"orgId\">\n </sb-uic-announcements>\n <div class=\"announcements-container\" *ngIf=\"showModal\">\n <div class=\"cursor-pointer close-share-dialog\">\n <mat-icon (click)=\"onClose()\" class=\"close-icon\">close</mat-icon>\n </div>\n <div class=\"share-modal px-3 pt-8\">\n <sb-uic-announcements\n [layoutType]=\"'web'\"\n (openDialog)=\"triggerOpenDialog($event)\"\n [objectData]=\"data?.announcementSection?.data\"\n [mobileHeight]=\"true\"\n [fetchDataFromApi]=\"true\"\n [channelId]=\"orgId\">\n </sb-uic-announcements>\n </div>\n </div>\n </div>\n <div class=\"grid grid-cols-12 gap-4 padding-top-m mb-6\">\n <div class=\"col-span-12 md:col-span-{{data.tabSection.colspan}}\">\n <!-- Tabs Section -->\n <mat-tab-group animationDuration=\"0ms\" class=\"mat-tab-labels mytabs w-full \"\n [selectedIndex]=\"selectedIndex\" (selectedTabChange)=\"selectedIndex = $event.index; tabClicked($event)\">\n <mat-tab label=\"Content\" >\n <ng-template mat-tab-label i18n>\n Learn\n </ng-template>\n <ng-container *ngIf=\"data.tabSection.contentTab.length === contentTabEmptyResponseCount\">\n <div class=\"flex justify-center w-full\">\n <div class=\"margin-xl text-center\" >\n <img src=\"/assets/common/error-pages/empty_search.svg\" wsUtilsImageResponsive alt=\"No results\"\n class=\"margin-top-l margin-bottom-s\">\n <h2 class=\"mat-h2\" i18n=\"search route no result\">{{'learnsearch.noResults' | translate}}</h2>\n </div>\n </div>\n </ng-container>\n <div class=\"padding-top-l \">\n <ng-container [ngTemplateOutlet]=\"columnSectionDisplay\"\n [ngTemplateOutletContext]=\"{data: data.tabSection.contentTab}\"></ng-container>\n </div>\n </mat-tab>\n <mat-tab label=\"Core Areas\">\n <ng-template mat-tab-label i18n>\n Competency\n </ng-template>\n <div>\n <ng-container [ngTemplateOutlet]=\"columnSectionDisplay\"\n [ngTemplateOutletContext]=\"{data: data.tabSection.coreAreasTab}\"></ng-container>\n </div>\n </mat-tab>\n </mat-tab-group>\n </div>\n <div class=\"col-span-12 md:col-span-4\">\n <div class=\"hidden md:block padding-top-xl padding-bottom-m\"\n *ngIf=\"data?.cbpPlanSection?.data\">\n <div class=\"pt-4\">\n <sb-uic-cbp-plan\n [layoutType]=\"'web'\"\n [mobileHeight]=\"false\"\n [fetchDataFromApi]=\"true\"\n [channelId]=\"orgId\"\n [objectData]=\"data?.cbpPlanSection?.data\">\n </sb-uic-cbp-plan>\n </div> \n </div>\n <div class=\"hidden md:block\" \n *ngIf=\"data?.announcementSection?.data\">\n <div class=\"pt-4\">\n <sb-uic-announcements\n [layoutType]=\"'web'\"\n [mobileHeight]=\"false\"\n [fetchDataFromApi]=\"true\"\n [channelId]=\"orgId\"\n [objectData]=\"data?.announcementSection?.data\">\n </sb-uic-announcements>\n </div> \n </div>\n </div> \n </div>\n </div>\n </div>\n</ng-template>\n<!-- \n<ng-template #announcement let-data=\"data\">\n <div class=\"flex items-center justify-center\" [ngStyle]=\"{'background': data.background}\">\n <div class=\"w-full\">\n Announcement Section -->\n <!-- <h1>Announcement</h1>\n </div>\n </div>\n</ng-template> -->\n\n\n<ng-template #columnSectionDisplay let-data=\"data\">\n <ng-container *ngIf=\"data?.length\">\n <ng-container *ngFor=\"let section of data\">\n <ng-container *ngIf=\"section?.enabled\">\n <section id=\"{{section?.key}}\" class=\"w-full grid grid-cols-12 gap-4\" [ngClass]=\"{'container': section.wrapperClass}\">\n <ng-container *ngFor=\"let column of section.column\">\n <div id=\"{{column?.key}}\" class=\"col-span-{{column.colspan || 12}} \">\n <ng-container *ngIf=\"column?.enabled\" [ngSwitch]=\"column?.key\">\n <ng-container *ngSwitchCase=\"'competency'\" [ngTemplateOutlet]=\"competency\"\n [ngTemplateOutletContext]=\"{competency: column}\"></ng-container>\n <ng-container *ngSwitchCase=\"'contentRecommendedProgramStrip'\" [ngTemplateOutlet]=\"contentStripTemplate\"\n [ngTemplateOutletContext]=\"{\n data: {contentStrip: column?.data, sectionKey: section.key}\n }\"></ng-container>\n <ng-container *ngSwitchCase=\"'contentRecommendedCoursesStrip'\" [ngTemplateOutlet]=\"contentStripTemplate\"\n [ngTemplateOutletContext]=\"{\n data: {contentStrip: column?.data, sectionKey: section.key}\n }\"></ng-container>\n <ng-container *ngSwitchCase=\"'contentFeaturedStrip'\" [ngTemplateOutlet]=\"contentStripTemplate\"\n [ngTemplateOutletContext]=\"{\n data: {contentStrip: column?.data, sectionKey: section.key}\n }\"></ng-container>\n <ng-container *ngSwitchCase=\"'contentcertificationsOfWeekStrip'\" [ngTemplateOutlet]=\"contentStripTemplate\"\n [ngTemplateOutletContext]=\"{\n data: {contentStrip: column?.data, sectionKey: section.key}\n }\"></ng-container>\n </ng-container>\n </div>\n </ng-container>\n </section>\n </ng-container>\n </ng-container>\n </ng-container>\n</ng-template>\n\n\n<!-- Start Competencies -->\n<ng-template #competency let-competency=\"competency\">\n <div class=\"padding-top-l padding-bottom-l relative\" [style.background]=\"competency?.background\" *ngIf=\"!hideCompetencyBlock;else noData\">\n <div class=\"w-full container-balanced\">\n <p class=\"mat-body-1 pl-5 pr-4 md:pl-0 md:pr-0\">This section shows the list of top competencies users in this MDO are learning, based on the courses they've completed and enrolled in.</p>\n <div class=\"pl-4 pr-4 md:pl-0 md:pr-0\">\n <sb-uic-competency-passbook-mdo\n [dynamicColor]=\"'#999999'\"\n [dynamicAlignPills]=\"'start'\"\n [cardDisplayCount]=\"2\"\n (emptyResponse)=\"hideCompetency($event)\"\n (temeletryResponse)=\"raiseCompetencyTelemetry($event)\"\n [objectData]=\"competency\"\n [providerId]=\"orgId\"\n >\n </sb-uic-competency-passbook-mdo>\n </div>\n </div>\n <!-- <img class=\"absolute comp-back-img\" src=\"assets/icons/microsite/competency.svg\" alt=\"\"> -->\n </div>\n</ng-template>\n<!-- End Competencies -->\n{{contentTabEmptyResponseCount}}hiiii\n<ng-template #contentStripTemplate let-data=\"data\">\n <ng-container *ngIf=\"!data?.contentStrip?.hideSection\">\n <div class=\"flex mb-8\">\n <div class=\"w-full\">\n <sb-uic-content-strip-with-tabs\n [emitViewAll]=\"true\"\n (viewAllResponse)=\"showAllContent($event, data)\"\n (telemtryResponse)=\"raiseTelemetryInteratEvent($event)\"\n (emptyResponse)=\"hideContentStrip($event, data)\"\n [providerId]=\"orgId\"\n [widgetData]=\"data?.contentStrip\"\n [channnelName]=\"channnelName\"\n >\n </sb-uic-content-strip-with-tabs>\n </div>\n </div>\n </ng-container>\n</ng-template>\n\n<ng-template #noData>\n <div class=\"flex justify-center w-full\">\n <div class=\"margin-xl text-center\" >\n <img src=\"/assets/common/error-pages/empty_search.svg\" wsUtilsImageResponsive alt=\"No results\"\n class=\"margin-top-l margin-bottom-s\">\n <h2 class=\"mat-h2\" i18n=\"search route no result\">{{'learnsearch.noResults' | translate}}</h2>\n </div>\n </div>\n</ng-template>\n\n<ng-template #topLearners let-data=\"data\">\n <div class=\"flex items-center justify-center\">\n <div class=\"container top-learners margin-bottom-l margin-top-l\">\n <sb-uic-top-learners\n [objectData]=\"data\"\n [channnelName]=\"channnelName\"\n [channelId]=\"orgId\">\n </sb-uic-top-learners>\n </div>\n </div>\n</ng-template>",
19630
+ template: "<ws-widget-btn-page-back [widgetData]=\"{ url: 'home', titles: titles }\">\n</ws-widget-btn-page-back>\n\n<div class=\"container-fluid\" id=\"section-micro-sites\">\n <div class=\"flex flex-col flex-1\">\n <ng-container *ngIf=\"sectionList?.length\">\n <ng-container *ngFor=\"let section of sectionList\">\n <ng-container *ngIf=\"section?.enabled\">\n <section id=\"{{section?.key}}\" class=\"w-full grid grid-cols-12 gap-4\" [ngClass]=\"{'container': section.wrapperClass}\">\n <ng-container *ngFor=\"let column of section.column\">\n <div id=\"{{column?.key}}\" class=\"col-span-{{column.colspan || 12}} \">\n <ng-container *ngIf=\"column?.enabled\" [ngSwitch]=\"column?.key\">\n <ng-container *ngSwitchCase=\"'topSection'\" [ngTemplateOutlet]=\"topSection\"\n [ngTemplateOutletContext]=\"{data: column?.data}\"></ng-container>\n <ng-container *ngSwitchCase=\"'topLearners'\" [ngTemplateOutlet]=\"topLearners\"\n [ngTemplateOutletContext]=\"{data: column?.data}\"></ng-container>\n <ng-container *ngSwitchCase=\"'mainContent'\" [ngTemplateOutlet]=\"mainContent\"\n [ngTemplateOutletContext]=\"{data: column?.data}\"></ng-container>\n </ng-container>\n </div>\n </ng-container>\n </section>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n</div>\n\n\n<ng-template #topSection let-data=\"data\">\n <!-- top section desktop layout -->\n <div class=\"hidden md:block\">\n <div class=\"web-banner-background\">\n <div class=\"flex items-center justify-center\">\n <div class=\"container\">\n <div class=\"flex sticky-logo-square\" [style.width]=\"stripWidth\">\n </div>\n <div class=\"grid grid-cols-12 gap-4 padding-top-xxxl mb-10\">\n <div class=\"col-span-12 md:col-span-6\">\n <div class=\"flex-1 flex flex-col mr-4 ws-mat-black-text\">\n <div class=\"\">\n <div class=\"flex items-center logo-square \">\n <img alt=\"Application Logo\" class=\"logo-img\" [src]=\"data?.logo\">\n </div>\n <h1 class=\" txt-ellipsis-2 break-words pt-10\"\n [style.color]=\"data.titleColor\">{{data.title || channnelName}}</h1>\n <p class=\"mat-body-1\" [style.color]=\"data.descriptionColor\">\n {{data?.description | slice:0:descriptionMaxLength}}\n <span *ngIf=\"data?.description?.length > descriptionMaxLength\">...</span>\n </p>\n </div>\n </div>\n </div>\n <div class=\"col-span-12 md:col-span-6\">\n <div class=\"slider slider-box\" *ngIf=\"data.sliderData && data.sliderData.sliders\">\n <sb-uic-sliders [widgetData]=\"data.sliderData.sliders\" [styleData]=\"data.sliderData.styleData\" ></sb-uic-sliders>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n \n </div>\n <!-- top section m-site layout -->\n <div class=\"block md:hidden\">\n <div class=\"col-span-12\">\n <div class=\"slider slider-box\" *ngIf=\"data.sliderData && data.sliderData.sliders\">\n <sb-uic-sliders [widgetData]=\"data.sliderData.sliders\" [styleData]=\"data.sliderData.styleData\" ></sb-uic-sliders>\n </div>\n </div>\n <div class=\"container px-4 flex flex-col mob-container\">\n <div class=\"mr-4 logo-box-container\">\n <div class=\"flex logo-box-square top mr-4\">\n <img alt=\"Application Logo\" class=\"logo-img\" [src]=\"data?.logo\">\n </div>\n </div>\n <div class=\"w-full md:w-9/12 flex-1 flex flex-col\">\n <h1 class=\" txt-ellipsis-2 break-words\">{{data?.title || channnelName}}</h1>\n <p class=\"mat-body-2\">\n {{data?.description | slice:0:descriptionMaxLength}}\n <span *ngIf=\"data?.description?.length > descriptionMaxLength\">...</span>\n </p>\n </div>\n </div>\n </div>\n <div class=\"flex items-center justify-center\">\n <div class=\"container metrics-section\" >\n <div class=\"hidden md:block\">\n <div class=\"metrics\"\n [ngStyle]=\"{'background': data?.metrics?.background}\">\n <sb-uic-data-points\n [providerId]=\"orgId\"\n [fetchDataFromApi]=\"true\"\n [objectData]=\"data?.metrics?.data\"\n [layoutType]=\"'singleFlexeRow'\"\n [pageLayout]=\"'mdo'\">\n </sb-uic-data-points>\n </div>\n </div>\n <div class=\"block md:hidden pt-14 px-4\">\n <div class=\"mob-metrics mob-metrics-sec\">\n <sb-uic-data-points\n [providerId]=\"orgId\"\n [fetchDataFromApi]=\"true\"\n [objectData]=\"data?.metrics?.data\"\n [layoutType]=\"'singleRow'\"\n [pageLayout]=\"'mdo'\">\n </sb-uic-data-points>\n </div>\n \n </div>\n </div>\n </div>\n</ng-template>\n\n<ng-template #mainContent let-data=\"data\">\n <div class=\"flex items-center justify-center\" [ngStyle]=\"{'background': data.background}\">\n <div class=\"container\">\n <div class=\"block md:hidden col-span-12 padding-left-m padding-right-m padding-top-m padding-bottom-m\">\n <sb-uic-cbp-plan\n [layoutType]=\"'web'\"\n [mobileHeight]=\"false\"\n [fetchDataFromApi]=\"true\"\n [channelId]=\"orgId\"\n [objectData]=\"data?.cbpPlanSection?.data\">\n </sb-uic-cbp-plan>\n </div>\n <div class=\"block md:hidden col-span-12 mt-6\">\n <sb-uic-announcements\n [layoutType]=\"'mobile'\"\n (openDialog)=\"triggerOpenDialog($event)\"\n [objectData]=\"data?.announcementSection?.data\"\n [fetchDataFromApi]=\"false\"\n [channelId]=\"orgId\">\n </sb-uic-announcements>\n <div class=\"announcements-container\" *ngIf=\"showModal\">\n <div class=\"cursor-pointer close-share-dialog\">\n <mat-icon (click)=\"onClose()\" class=\"close-icon\">close</mat-icon>\n </div>\n <div class=\"share-modal px-3 pt-8\">\n <sb-uic-announcements\n [layoutType]=\"'web'\"\n (openDialog)=\"triggerOpenDialog($event)\"\n [objectData]=\"data?.announcementSection?.data\"\n [mobileHeight]=\"true\"\n [fetchDataFromApi]=\"true\"\n [channelId]=\"orgId\">\n </sb-uic-announcements>\n </div>\n </div>\n </div>\n <div class=\"grid grid-cols-12 gap-4 padding-top-m mb-6\">\n <div class=\"col-span-12 md:col-span-{{data.tabSection.colspan}}\">\n <!-- Tabs Section -->\n <mat-tab-group animationDuration=\"0ms\" class=\"mat-tab-labels mytabs w-full \"\n [selectedIndex]=\"selectedIndex\" (selectedTabChange)=\"selectedIndex = $event.index; tabClicked($event)\">\n <mat-tab label=\"Content\" >\n <ng-template mat-tab-label i18n>\n Learn\n </ng-template>\n <ng-container *ngIf=\"data.tabSection.contentTab.length === contentTabEmptyResponseCount\">\n <div class=\"flex justify-center w-full\">\n <div class=\"margin-xl text-center\" >\n <img src=\"/assets/common/error-pages/empty_search.svg\" wsUtilsImageResponsive alt=\"No results\"\n class=\"margin-top-l margin-bottom-s\">\n <h2 class=\"mat-h2\" i18n=\"search route no result\">{{'learnsearch.noResults' | translate}}</h2>\n </div>\n </div>\n </ng-container>\n <div class=\"padding-top-l \">\n <ng-container [ngTemplateOutlet]=\"columnSectionDisplay\"\n [ngTemplateOutletContext]=\"{data: data.tabSection.contentTab}\"></ng-container>\n </div>\n </mat-tab>\n <mat-tab label=\"Core Areas\">\n <ng-template mat-tab-label i18n>\n Competency\n </ng-template>\n <div>\n <ng-container [ngTemplateOutlet]=\"columnSectionDisplay\"\n [ngTemplateOutletContext]=\"{data: data.tabSection.coreAreasTab}\"></ng-container>\n </div>\n </mat-tab>\n </mat-tab-group>\n </div>\n <div class=\"col-span-12 md:col-span-4\">\n <div class=\"hidden md:block padding-top-xl padding-bottom-m\"\n *ngIf=\"data?.cbpPlanSection?.data\">\n <div class=\"pt-4\">\n <sb-uic-cbp-plan\n [layoutType]=\"'web'\"\n [mobileHeight]=\"false\"\n [fetchDataFromApi]=\"true\"\n [channelId]=\"orgId\"\n [objectData]=\"data?.cbpPlanSection?.data\">\n </sb-uic-cbp-plan>\n </div> \n </div>\n <div class=\"hidden md:block\" \n *ngIf=\"data?.announcementSection?.data\">\n <div class=\"pt-4\">\n <sb-uic-announcements\n [layoutType]=\"'web'\"\n [mobileHeight]=\"false\"\n [fetchDataFromApi]=\"true\"\n [channelId]=\"orgId\"\n [objectData]=\"data?.announcementSection?.data\">\n </sb-uic-announcements>\n </div> \n </div>\n </div> \n </div>\n </div>\n </div>\n</ng-template>\n<!-- \n<ng-template #announcement let-data=\"data\">\n <div class=\"flex items-center justify-center\" [ngStyle]=\"{'background': data.background}\">\n <div class=\"w-full\">\n Announcement Section -->\n <!-- <h1>Announcement</h1>\n </div>\n </div>\n</ng-template> -->\n\n\n<ng-template #columnSectionDisplay let-data=\"data\">\n <ng-container *ngIf=\"data?.length\">\n <ng-container *ngFor=\"let section of data\">\n <ng-container *ngIf=\"section?.enabled\">\n <section id=\"{{section?.key}}\" class=\"w-full grid grid-cols-12 gap-4\" [ngClass]=\"{'container': section.wrapperClass}\">\n <ng-container *ngFor=\"let column of section.column\">\n <div id=\"{{column?.key}}\" class=\"col-span-{{column.colspan || 12}} \">\n <ng-container *ngIf=\"column?.enabled\" [ngSwitch]=\"column?.key\">\n <ng-container *ngSwitchCase=\"'competency'\" [ngTemplateOutlet]=\"competency\"\n [ngTemplateOutletContext]=\"{competency: column}\"></ng-container>\n <ng-container *ngSwitchCase=\"'contentRecommendedProgramStrip'\" [ngTemplateOutlet]=\"contentStripTemplate\"\n [ngTemplateOutletContext]=\"{\n data: {contentStrip: column?.data, sectionKey: section.key}\n }\"></ng-container>\n <ng-container *ngSwitchCase=\"'contentRecommendedCoursesStrip'\" [ngTemplateOutlet]=\"contentStripTemplate\"\n [ngTemplateOutletContext]=\"{\n data: {contentStrip: column?.data, sectionKey: section.key}\n }\"></ng-container>\n <ng-container *ngSwitchCase=\"'contentFeaturedStrip'\" [ngTemplateOutlet]=\"contentStripTemplate\"\n [ngTemplateOutletContext]=\"{\n data: {contentStrip: column?.data, sectionKey: section.key}\n }\"></ng-container>\n <ng-container *ngSwitchCase=\"'contentcertificationsOfWeekStrip'\" [ngTemplateOutlet]=\"contentStripTemplate\"\n [ngTemplateOutletContext]=\"{\n data: {contentStrip: column?.data, sectionKey: section.key}\n }\"></ng-container>\n </ng-container>\n </div>\n </ng-container>\n </section>\n </ng-container>\n </ng-container>\n </ng-container>\n</ng-template>\n\n\n<!-- Start Competencies -->\n<ng-template #competency let-competency=\"competency\">\n <div class=\"padding-top-l padding-bottom-l relative\" [style.background]=\"competency?.background\" *ngIf=\"!hideCompetencyBlock;else noData\">\n <div class=\"w-full container-balanced\">\n <p class=\"mat-body-1 pl-5 pr-4 md:pl-0 md:pr-0\">This section shows the list of top competencies users in this MDO are learning, based on the courses they've completed and enrolled in.</p>\n <div class=\"pl-4 pr-4 md:pl-0 md:pr-0\">\n <sb-uic-competency-passbook-mdo\n [dynamicColor]=\"'#999999'\"\n [dynamicAlignPills]=\"'start'\"\n [cardDisplayCount]=\"2\"\n (emptyResponse)=\"hideCompetency($event)\"\n (temeletryResponse)=\"raiseCompetencyTelemetry($event)\"\n [objectData]=\"competency\"\n [providerId]=\"orgId\"\n >\n </sb-uic-competency-passbook-mdo>\n </div>\n </div>\n <!-- <img class=\"absolute comp-back-img\" src=\"assets/icons/microsite/competency.svg\" alt=\"\"> -->\n </div>\n</ng-template>\n<!-- End Competencies -->\n<ng-template #contentStripTemplate let-data=\"data\">\n <ng-container *ngIf=\"!data?.contentStrip?.hideSection\">\n <div class=\"flex mb-8\">\n <div class=\"w-full\">\n <sb-uic-content-strip-with-tabs\n [emitViewAll]=\"true\"\n (viewAllResponse)=\"showAllContent($event, data)\"\n (telemtryResponse)=\"raiseTelemetryInteratEvent($event)\"\n (emptyResponse)=\"hideContentStrip($event, data)\"\n [providerId]=\"orgId\"\n [widgetData]=\"data?.contentStrip\"\n [channnelName]=\"channnelName\"\n >\n </sb-uic-content-strip-with-tabs>\n </div>\n </div>\n </ng-container>\n</ng-template>\n\n<ng-template #noData>\n <div class=\"flex justify-center w-full\">\n <div class=\"margin-xl text-center\" >\n <img src=\"/assets/common/error-pages/empty_search.svg\" wsUtilsImageResponsive alt=\"No results\"\n class=\"margin-top-l margin-bottom-s\">\n <h2 class=\"mat-h2\" i18n=\"search route no result\">{{'learnsearch.noResults' | translate}}</h2>\n </div>\n </div>\n</ng-template>\n\n<ng-template #topLearners let-data=\"data\">\n <div class=\"flex items-center justify-center\">\n <div class=\"container top-learners margin-bottom-l margin-top-l\">\n <sb-uic-top-learners\n [objectData]=\"data\"\n [channnelName]=\"channnelName\"\n [channelId]=\"orgId\">\n </sb-uic-top-learners>\n </div>\n </div>\n</ng-template>",
19540
19631
  styles: [".container-balanced{max-width:1202px;margin-left:auto!important;margin-right:auto!important}.container{max-width:1200px}.padding-top-xxxl{padding-top:47px}.banner-container{align-items:center;background:#eee;padding:16px;gap:2.5rem;justify-content:center}.web-banner-background{background-image:url(/assets/icons/microsite/MDO-channel-banner.png);background-size:cover;min-height:464px}.mob-container{background-image:url(/assets/icons/microsite/MDOChannel_RightGraphic.svg);background-position:right;background-repeat:no-repeat}.sticky-logo-square{position:absolute;top:215px;justify-content:end;border-bottom-right-radius:12px;border-top-right-radius:12px;background:#fff;display:flex;padding:10px;justify-content:end;height:53px;left:0}.logo-square{width:112px;max-height:73px;border-radius:12px;background:#fff;display:flex;align-items:center;justify-content:center;padding:16px;box-sizing:border-box}.logo-box-container{width:157px;position:relative;height:64px}.logo-box-square{height:99px;width:157px;background:#fff;border-radius:12px;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 8px 0 rgba(0,0,0,.06)}.logo-box-square .logo-img{max-width:122px}.logo-box-square.top{position:absolute;top:-54px}.logo-img{-o-object-fit:contain;object-fit:contain;max-height:52px;height:96px;z-index:10}.metrics{border:3px solid #fff;border-radius:10px;align-items:center}.mob-metrics{overflow:auto}.metrics-section{margin-top:-30px}.empty-div{height:15px}.mob-metrics-sec{padding-top:1rem}.announcements-container{position:fixed;height:calc(100vh - 67px);background:rgba(19,19,19,.6392156863);width:100vw;top:0;left:0;z-index:1000}.close-announcements-dialog{position:absolute;right:30px;top:30px}.close-icon{color:#fff;border-radius:15px;float:right;position:absolute;top:15px;right:15px}@media screen and (max-width:768px){::ng-deep.recommendedProgram .mat-tab-header{padding-left:20px}::ng-deep.featuredCourses .mat-tab-header{padding-left:20px}.metrics-section{margin-top:0}.top-learners{padding-left:30px}}::ng-deep .mytabs .mat-tab-label.mat-tab-label-active.cdk-keyboard-focused:not(.mat-tab-disabled),::ng-deep .mytabs .mat-tab-label.mat-tab-label-active:not(.mat-tab-disabled){font-weight:700;color:#000;opacity:1}"]
19541
19632
  }] }
19542
19633
  ];
@@ -21074,7 +21165,6 @@
21074
21165
  */
21075
21166
  function () {
21076
21167
  var _this = this;
21077
- debugger;
21078
21168
  this.insightSvc.fetchUserProgress().subscribe((/**
21079
21169
  * @param {?} res
21080
21170
  * @return {?}
@@ -21340,85 +21430,85 @@
21340
21430
  exports.UserProgressModule = UserProgressModule;
21341
21431
  exports.WIDGET_REGISTERED_LIB_MODULES = WIDGET_REGISTERED_LIB_MODULES;
21342
21432
  exports.WIDGET_REGISTRATION_LIB_CONFIG = WIDGET_REGISTRATION_LIB_CONFIG;
21343
- exports.WidgetContentService = WidgetContentService;
21433
+ exports.WidgetContentLibService = WidgetContentLibService;
21434
+ exports.WidgetUserServiceLib = WidgetUserServiceLib;
21344
21435
  exports.ɵa = ContentStripWithTabsLibComponent;
21345
- exports.ɵb = WidgetUserService;
21346
- exports.ɵba = CardResourceComponent;
21347
- exports.ɵbb = CardsComponent;
21348
- exports.ɵbc = CardPortraitComponent;
21349
- exports.ɵbd = CardUserComponent;
21350
- exports.ɵbe = CardLandscapeComponent;
21351
- exports.ɵbf = CardWideComponent;
21352
- exports.ɵbg = CardMDOChannelComponent;
21353
- exports.ɵbh = CardWideV2Component;
21354
- exports.ɵbi = CardKarmaProgramsComponent;
21355
- exports.ɵbj = CardKarmaProgramsV2Component;
21356
- exports.ɵbk = ProviderCardComponent;
21357
- exports.ɵbl = CardPortraitExtComponent;
21358
- exports.ɵbm = CardAssessmentComponent;
21359
- exports.ɵbn = CardProgressPortraitLibComponent;
21360
- exports.ɵbo = CertificateService;
21361
- exports.ɵbp = CardMdoChannelV1Component;
21362
- exports.ɵbq = PipePublicURLModule;
21363
- exports.ɵbr = PipePublicURL;
21364
- exports.ɵbs = ObjectToArrayPipeModule;
21365
- exports.ɵbt = ObjectToArrayPipe;
21366
- exports.ɵbu = DisplayContentTypeLibModule;
21367
- exports.ɵbv = DisplayContentTypeLibComponent;
21368
- exports.ɵbw = DefaultThumbnailModule;
21369
- exports.ɵbx = DefaultThumbnailDirective;
21370
- exports.ɵby = PipeDurationTransformModule;
21371
- exports.ɵbz = PipeDurationTransformPipe;
21372
- exports.ɵc = MultilingualTranslationsService;
21373
- exports.ɵca = ContentProgressComponent;
21374
- exports.ɵcb = CertificateDialogComponent;
21375
- exports.ɵcc = AvatarPhotoLibModule;
21376
- exports.ɵcd = AvatarPhotoLibComponent;
21377
- exports.ɵce = ContentStripFacetFilterComponent;
21378
- exports.ɵcf = ContentStripWithTabsPillsComponent;
21379
- exports.ɵcg = CompetencyPassbookComponent;
21380
- exports.ɵch = CompetencyPassbookService;
21381
- exports.ɵci = PillsModule;
21382
- exports.ɵcj = PillsComponent;
21383
- exports.ɵck = CompetencyPassbookMdoComponent;
21384
- exports.ɵcl = CompetencyPassbookMdoService;
21385
- exports.ɵcm = UserContentRatingLibComponent;
21386
- exports.ɵcn = RatingService;
21387
- exports.ɵco = UserContentRatingLibService;
21388
- exports.ɵcp = MdoChannelV1Component;
21389
- exports.ɵcq = MdoChannelV2Component;
21390
- exports.ɵcr = ProvidersV2Component;
21391
- exports.ɵcs = NationalLearningComponent;
21392
- exports.ɵct = KeyHighlightsComponent;
21393
- exports.ɵcu = EventsComponent;
21394
- exports.ɵcv = EventCardComponent;
21395
- exports.ɵcw = MdoLeaderboardComponent;
21396
- exports.ɵcx = HighlightsOfWeekComponent;
21397
- exports.ɵcy = SpeakersComponent;
21398
- exports.ɵcz = UserProgressComponent;
21399
- exports.ɵd = ConfigurationsService;
21400
- exports.ɵe = HorizontalScrollerV2Module;
21401
- exports.ɵf = HorizontalScrollerV2Component;
21402
- exports.ɵg = SlidersLibComponent;
21403
- exports.ɵh = NavigationModule;
21404
- exports.ɵi = NavigationDirective;
21405
- exports.ɵj = ImageResponsiveModule;
21406
- exports.ɵk = ImageResponsiveDirective;
21407
- exports.ɵl = DataPointsComponent;
21408
- exports.ɵm = InsiteDataService;
21409
- exports.ɵn = SkeletonLoaderLibModule;
21410
- exports.ɵo = SkeletonLoaderLibComponent;
21411
- exports.ɵp = CalenderComponent;
21412
- exports.ɵq = CalenderDayComponent;
21413
- exports.ɵr = CommonStripComponent;
21414
- exports.ɵs = AnnouncementsComponent;
21415
- exports.ɵt = TopLearnersComponent;
21416
- exports.ɵu = CbpPlanComponent;
21417
- exports.ɵv = ScrollableItemDirective;
21418
- exports.ɵw = ScrollableItemModule;
21419
- exports.ɵx = MyHammerConfig$1;
21420
- exports.ɵy = SlidersNgContentLibModule;
21421
- exports.ɵz = SlidersNgContentLibComponent;
21436
+ exports.ɵb = MultilingualTranslationsService;
21437
+ exports.ɵba = CardsComponent;
21438
+ exports.ɵbb = CardPortraitComponent;
21439
+ exports.ɵbc = CardUserComponent;
21440
+ exports.ɵbd = CardLandscapeComponent;
21441
+ exports.ɵbe = CardWideComponent;
21442
+ exports.ɵbf = CardMDOChannelComponent;
21443
+ exports.ɵbg = CardWideV2Component;
21444
+ exports.ɵbh = CardKarmaProgramsComponent;
21445
+ exports.ɵbi = CardKarmaProgramsV2Component;
21446
+ exports.ɵbj = ProviderCardComponent;
21447
+ exports.ɵbk = CardPortraitExtComponent;
21448
+ exports.ɵbl = CardAssessmentComponent;
21449
+ exports.ɵbm = CardProgressPortraitLibComponent;
21450
+ exports.ɵbn = CertificateService;
21451
+ exports.ɵbo = CardMdoChannelV1Component;
21452
+ exports.ɵbp = PipePublicURLModule;
21453
+ exports.ɵbq = PipePublicURL;
21454
+ exports.ɵbr = ObjectToArrayPipeModule;
21455
+ exports.ɵbs = ObjectToArrayPipe;
21456
+ exports.ɵbt = DisplayContentTypeLibModule;
21457
+ exports.ɵbu = DisplayContentTypeLibComponent;
21458
+ exports.ɵbv = DefaultThumbnailModule;
21459
+ exports.ɵbw = DefaultThumbnailDirective;
21460
+ exports.ɵbx = PipeDurationTransformModule;
21461
+ exports.ɵby = PipeDurationTransformPipe;
21462
+ exports.ɵbz = ContentProgressComponent;
21463
+ exports.ɵc = ConfigurationsService;
21464
+ exports.ɵca = CertificateDialogComponent;
21465
+ exports.ɵcb = AvatarPhotoLibModule;
21466
+ exports.ɵcc = AvatarPhotoLibComponent;
21467
+ exports.ɵcd = ContentStripFacetFilterComponent;
21468
+ exports.ɵce = ContentStripWithTabsPillsComponent;
21469
+ exports.ɵcf = CompetencyPassbookComponent;
21470
+ exports.ɵcg = CompetencyPassbookService;
21471
+ exports.ɵch = PillsModule;
21472
+ exports.ɵci = PillsComponent;
21473
+ exports.ɵcj = CompetencyPassbookMdoComponent;
21474
+ exports.ɵck = CompetencyPassbookMdoService;
21475
+ exports.ɵcl = UserContentRatingLibComponent;
21476
+ exports.ɵcm = RatingService;
21477
+ exports.ɵcn = UserContentRatingLibService;
21478
+ exports.ɵco = MdoChannelV1Component;
21479
+ exports.ɵcp = MdoChannelV2Component;
21480
+ exports.ɵcq = ProvidersV2Component;
21481
+ exports.ɵcr = NationalLearningComponent;
21482
+ exports.ɵcs = KeyHighlightsComponent;
21483
+ exports.ɵct = EventsComponent;
21484
+ exports.ɵcu = EventCardComponent;
21485
+ exports.ɵcv = MdoLeaderboardComponent;
21486
+ exports.ɵcw = HighlightsOfWeekComponent;
21487
+ exports.ɵcx = SpeakersComponent;
21488
+ exports.ɵcy = UserProgressComponent;
21489
+ exports.ɵd = HorizontalScrollerV2Module;
21490
+ exports.ɵe = HorizontalScrollerV2Component;
21491
+ exports.ɵf = SlidersLibComponent;
21492
+ exports.ɵg = NavigationModule;
21493
+ exports.ɵh = NavigationDirective;
21494
+ exports.ɵi = ImageResponsiveModule;
21495
+ exports.ɵj = ImageResponsiveDirective;
21496
+ exports.ɵk = DataPointsComponent;
21497
+ exports.ɵl = InsiteDataService;
21498
+ exports.ɵm = SkeletonLoaderLibModule;
21499
+ exports.ɵn = SkeletonLoaderLibComponent;
21500
+ exports.ɵo = CalenderComponent;
21501
+ exports.ɵp = CalenderDayComponent;
21502
+ exports.ɵq = CommonStripComponent;
21503
+ exports.ɵr = AnnouncementsComponent;
21504
+ exports.ɵs = TopLearnersComponent;
21505
+ exports.ɵt = CbpPlanComponent;
21506
+ exports.ɵu = ScrollableItemDirective;
21507
+ exports.ɵv = ScrollableItemModule;
21508
+ exports.ɵw = MyHammerConfig$1;
21509
+ exports.ɵx = SlidersNgContentLibModule;
21510
+ exports.ɵy = SlidersNgContentLibComponent;
21511
+ exports.ɵz = CardResourceComponent;
21422
21512
 
21423
21513
  Object.defineProperty(exports, '__esModule', { value: true });
21424
21514