@sunbird-cb/consumption 0.0.43 → 0.0.44

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 (60) hide show
  1. package/bundles/sunbird-cb-consumption.umd.js +1244 -165
  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 +175 -0
  6. package/esm2015/lib/_common/cards/card-progress-portrait-lib/card-progress-portrait-lib.component.js +261 -0
  7. package/esm2015/lib/_common/cards/cards.component.js +24 -25
  8. package/esm2015/lib/_common/cards/cards.module.js +28 -3
  9. package/esm2015/lib/_common/content-progress/content-progress.component.js +89 -0
  10. package/esm2015/lib/_common/content-progress/content-progress.module.js +22 -0
  11. package/esm2015/lib/_common/content-strip-with-tabs-lib/content-strip-with-tabs-lib.component.js +43 -2
  12. package/esm2015/lib/_common/dialog-components/certificate-dialog/certificate-dialog.component.js +225 -0
  13. package/esm2015/lib/_common/dialog-components/dialog-components.module.js +43 -0
  14. package/esm2015/lib/_common/horizontal-scroller-v2/horizontal-scroller-v2.component.js +2 -4
  15. package/esm2015/lib/_pipes/object-to-array/object-to-array.pipe.js +28 -0
  16. package/esm2015/lib/_pipes/object-to-array/object-to-array.pipe.module.js +19 -0
  17. package/esm2015/lib/_pipes/pipe-duration-transform/pipe-duration-transform.pipe.js +2 -2
  18. package/esm2015/lib/_services/certificate.service.js +63 -0
  19. package/esm2015/lib/_services/multilingual-translations.service.js +27 -24
  20. package/esm2015/lib/consumption.module.js +1 -1
  21. package/esm2015/public-api.js +2 -1
  22. package/esm2015/sunbird-cb-consumption.js +34 -26
  23. package/esm5/lib/_common/cards/card-assessment/card-assessment/card-assessment.component.js +202 -0
  24. package/esm5/lib/_common/cards/card-progress-portrait-lib/card-progress-portrait-lib.component.js +278 -0
  25. package/esm5/lib/_common/cards/cards.component.js +28 -17
  26. package/esm5/lib/_common/cards/cards.module.js +28 -3
  27. package/esm5/lib/_common/content-progress/content-progress.component.js +94 -0
  28. package/esm5/lib/_common/content-progress/content-progress.module.js +26 -0
  29. package/esm5/lib/_common/content-strip-with-tabs-lib/content-strip-with-tabs-lib.component.js +58 -8
  30. package/esm5/lib/_common/dialog-components/certificate-dialog/certificate-dialog.component.js +248 -0
  31. package/esm5/lib/_common/dialog-components/dialog-components.module.js +47 -0
  32. package/esm5/lib/_common/horizontal-scroller-v2/horizontal-scroller-v2.component.js +2 -4
  33. package/esm5/lib/_pipes/object-to-array/object-to-array.pipe.js +57 -0
  34. package/esm5/lib/_pipes/object-to-array/object-to-array.pipe.module.js +23 -0
  35. package/esm5/lib/_pipes/pipe-duration-transform/pipe-duration-transform.pipe.js +3 -3
  36. package/esm5/lib/_services/certificate.service.js +70 -0
  37. package/esm5/lib/_services/multilingual-translations.service.js +27 -24
  38. package/esm5/lib/consumption.module.js +1 -1
  39. package/esm5/public-api.js +2 -1
  40. package/esm5/sunbird-cb-consumption.js +34 -26
  41. package/fesm2015/sunbird-cb-consumption.js +1075 -136
  42. package/fesm2015/sunbird-cb-consumption.js.map +1 -1
  43. package/fesm5/sunbird-cb-consumption.js +1211 -140
  44. package/fesm5/sunbird-cb-consumption.js.map +1 -1
  45. package/lib/_common/cards/card-assessment/card-assessment/card-assessment.component.d.ts +28 -0
  46. package/lib/_common/cards/card-progress-portrait-lib/card-progress-portrait-lib.component.d.ts +41 -0
  47. package/lib/_common/cards/cards.component.d.ts +5 -3
  48. package/lib/_common/content-progress/content-progress.component.d.ts +13 -0
  49. package/lib/_common/content-progress/content-progress.module.d.ts +2 -0
  50. package/lib/_common/content-strip-with-tabs-lib/content-strip-with-tabs-lib.component.d.ts +2 -0
  51. package/lib/_common/dialog-components/certificate-dialog/certificate-dialog.component.d.ts +22 -0
  52. package/lib/_common/dialog-components/dialog-components.module.d.ts +2 -0
  53. package/lib/_pipes/object-to-array/object-to-array.pipe.d.ts +4 -0
  54. package/lib/_pipes/object-to-array/object-to-array.pipe.module.d.ts +2 -0
  55. package/lib/_pipes/pipe-duration-transform/pipe-duration-transform.pipe.d.ts +1 -1
  56. package/lib/_services/certificate.service.d.ts +8 -0
  57. package/package.json +1 -1
  58. package/public-api.d.ts +1 -0
  59. package/sunbird-cb-consumption.d.ts +32 -24
  60. package/sunbird-cb-consumption.metadata.json +1 -1
@@ -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('dayjs'), require('@ngx-translate/http-loader'), require('@angular/cdk/layout'), require('@angular/platform-browser'), require('hammerjs'), require('@angular/forms')) :
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', 'dayjs', '@ngx-translate/http-loader', '@angular/cdk/layout', '@angular/platform-browser', 'hammerjs', '@angular/forms'], 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.dayjs_, global.httpLoader, global.ng.cdk.layout, global.ng.platformBrowser, global.hammerjs, global.ng.forms));
5
- }(this, (function (exports, core, common, router, rxjs, operators, utilsV2, material, resolverV2, http, lodash, moment$1, core$1, dayjs_, httpLoader, layout, platformBrowser, Hammer, forms) { '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('moment'), require('@ngx-translate/core'), 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', '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.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$1, core$1, dayjs_, httpLoader, layout, platformBrowser, Hammer, forms, jspdf) { 'use strict';
6
6
 
7
7
  Hammer = Hammer && Hammer.hasOwnProperty('default') ? Hammer['default'] : Hammer;
8
8
 
@@ -557,15 +557,13 @@
557
557
  /** @type {?} */
558
558
  var totalCardsLength = cardWidth * this.widgetsLength;
559
559
  if (totalCardsLength > scrollerWidth) {
560
- arrLength_1 = (scrollerWidth / cardWidth);
560
+ arrLength_1 = Math.round(scrollerWidth / cardWidth);
561
561
  this.defaultMaxWidgets = this.defaultMaxWidgets ? this.widgetsLength < this.defaultMaxWidgets ?
562
562
  this.widgetsLength : this.defaultMaxWidgets : this.defaultMaxWidgets;
563
563
  arrLength_1 = this.defaultMaxWidgets / arrLength_1;
564
564
  for (var i = 0; i < arrLength_1; i += 1) {
565
565
  this.bottomDotsArray.push(i);
566
566
  }
567
- // console.log('this.cardSubType', this.cardSubType, arrLength, this.widgetsLength ,
568
- // this.defaultMaxWidgets, scrollerWidth, this.bottomDotsArray)
569
567
  }
570
568
  }
571
569
  }
@@ -3122,33 +3120,36 @@
3122
3120
  * @return {?}
3123
3121
  */
3124
3122
  function (label, type, subtype) {
3125
- /** @type {?} */
3126
- var nlabel = label;
3127
- nlabel = nlabel.toLowerCase();
3128
- /** @type {?} */
3129
- var sl = nlabel.split(' ');
3130
- sl.forEach((/**
3131
- * @param {?} w
3132
- * @param {?} index
3133
- * @return {?}
3134
- */
3135
- function (w, index) {
3136
- if (index !== 0) {
3137
- sl[index] = w[0].toUpperCase() + w.slice(1);
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);
3138
3146
  }
3139
- }));
3140
- nlabel = sl.join('');
3141
- nlabel = nlabel.replace(/\s/g, '');
3142
- if (subtype) {
3143
3147
  // tslint:disable-next-line: prefer-template
3144
3148
  /** @type {?} */
3145
- var translationKey = type + '.' + nlabel + subtype;
3146
- return this.translate.instant(translationKey);
3149
+ var translationKeyn = type + '.' + nlabel;
3150
+ return this.translate.instant(translationKeyn);
3147
3151
  }
3148
- // tslint:disable-next-line: prefer-template
3149
- /** @type {?} */
3150
- var translationKeyn = type + '.' + nlabel;
3151
- return this.translate.instant(translationKeyn);
3152
+ return label;
3152
3153
  };
3153
3154
  /**
3154
3155
  * @param {?} label
@@ -4591,7 +4592,8 @@
4591
4592
  function (strip, calculateParentStatus) {
4592
4593
  if (calculateParentStatus === void 0) { calculateParentStatus = true; }
4593
4594
  return __awaiter(this, void 0, void 0, function () {
4594
- var originalFilters, firstTab, allTabs, currentTabFromMap, response, error_1;
4595
+ var originalFilters, firstTab, allTabs, currentTabFromMap, response_1, error_1;
4596
+ var _this = this;
4595
4597
  return __generator(this, function (_a) {
4596
4598
  switch (_a.label) {
4597
4599
  case 0:
@@ -4629,15 +4631,26 @@
4629
4631
  _a.trys.push([1, 3, , 4]);
4630
4632
  return [4 /*yield*/, this.searchV6Request(strip, strip.request, calculateParentStatus)];
4631
4633
  case 2:
4632
- response = _a.sent();
4634
+ response_1 = _a.sent();
4633
4635
  // console.log('calling after - response, ', response)
4634
- if (response && response.results) {
4636
+ if (response_1 && response_1.results) {
4635
4637
  // console.log('calling after-- ')
4636
- if (response.results.result.content) {
4637
- this.processStrip(strip, this.transformContentsToWidgets(response.results.result.content, strip), 'done', calculateParentStatus, response.viewMoreUrl);
4638
+ if (response_1.results.result.content) {
4639
+ if (strip.key === 'scheduledAssessment') {
4640
+ this.enrollInterval = setInterval((/**
4641
+ * @return {?}
4642
+ */
4643
+ function () {
4644
+ _this.checkInvitOnlyAssessments(response_1.results.result.content, strip, calculateParentStatus, response_1.viewMoreUrl);
4645
+ // tslint:disable-next-line
4646
+ }), 1000);
4647
+ }
4648
+ else {
4649
+ this.processStrip(strip, this.transformContentsToWidgets(response_1.results.result.content, strip), 'done', calculateParentStatus, response_1.viewMoreUrl);
4650
+ }
4638
4651
  }
4639
- else if (response.results.result.Event) {
4640
- this.processStrip(strip, this.transformEventsToWidgets(response.results.result.Event, strip), 'done', calculateParentStatus, response.viewMoreUrl);
4652
+ else if (response_1.results.result.Event) {
4653
+ this.processStrip(strip, this.transformEventsToWidgets(response_1.results.result.Event, strip), 'done', calculateParentStatus, response_1.viewMoreUrl);
4641
4654
  }
4642
4655
  else {
4643
4656
  this.processStrip(strip, [], 'error', calculateParentStatus, null);
@@ -4655,6 +4668,41 @@
4655
4668
  });
4656
4669
  });
4657
4670
  };
4671
+ /**
4672
+ * @param {?} content
4673
+ * @param {?} strip
4674
+ * @param {?} calculateParentStatus
4675
+ * @param {?} viewMoreUrl
4676
+ * @return {?}
4677
+ */
4678
+ ContentStripWithTabsLibComponent.prototype.checkInvitOnlyAssessments = /**
4679
+ * @param {?} content
4680
+ * @param {?} strip
4681
+ * @param {?} calculateParentStatus
4682
+ * @param {?} viewMoreUrl
4683
+ * @return {?}
4684
+ */
4685
+ function (content, strip, calculateParentStatus, viewMoreUrl) {
4686
+ var _this = this;
4687
+ if (localStorage.getItem('enrollmentMapData')) {
4688
+ this.enrollmentMapData = JSON.parse(localStorage.getItem('enrollmentMapData') || '{}');
4689
+ /** @type {?} */
4690
+ var filteredArray_1 = [];
4691
+ content.forEach((/**
4692
+ * @param {?} data
4693
+ * @return {?}
4694
+ */
4695
+ function (data) {
4696
+ if (_this.enrollmentMapData[data.identifier]) {
4697
+ data['batch'] = _this.enrollmentMapData[data.identifier].batch;
4698
+ data['completionPercentage'] = _this.enrollmentMapData[data.identifier].completionPercentage;
4699
+ filteredArray_1.push(data);
4700
+ }
4701
+ }));
4702
+ this.processStrip(strip, this.transformContentsToWidgets(filteredArray_1, strip), 'done', calculateParentStatus, viewMoreUrl);
4703
+ clearInterval(this.enrollInterval);
4704
+ }
4705
+ };
4658
4706
  /**
4659
4707
  * @param {?} strip
4660
4708
  * @param {?} request
@@ -6173,6 +6221,7 @@
6173
6221
  switch (_a.label) {
6174
6222
  case 0:
6175
6223
  if (!(strip.request && strip.request.ciosContent && Object.keys(strip.request.ciosContent).length)) return [3 /*break*/, 4];
6224
+ debugger;
6176
6225
  originalFilters = [];
6177
6226
  if (strip.request &&
6178
6227
  strip.request.ciosContent &&
@@ -6300,6 +6349,8 @@
6300
6349
  ContentStripWithTabsLibComponent.prototype.enrollInterval;
6301
6350
  /** @type {?} */
6302
6351
  ContentStripWithTabsLibComponent.prototype.todaysEvents;
6352
+ /** @type {?} */
6353
+ ContentStripWithTabsLibComponent.prototype.enrollmentMapData;
6303
6354
  /**
6304
6355
  * @type {?}
6305
6356
  * @private
@@ -8816,10 +8867,9 @@
8816
8867
  */
8817
8868
  var CardsComponent = /** @class */ (function (_super) {
8818
8869
  __extends(CardsComponent, _super);
8819
- function CardsComponent(utilitySvc, configSvc, contSvc, router) {
8870
+ function CardsComponent(utilitySvc, contSvc, router) {
8820
8871
  var _this = _super.call(this) || this;
8821
8872
  _this.utilitySvc = utilitySvc;
8822
- _this.configSvc = configSvc;
8823
8873
  _this.contSvc = contSvc;
8824
8874
  _this.router = router;
8825
8875
  _this.triggerTelemetry = new core.EventEmitter();
@@ -8840,6 +8890,13 @@
8840
8890
  function () {
8841
8891
  _this.getCbPlanData();
8842
8892
  }), 1000);
8893
+ this.enrollInterval = setInterval((/**
8894
+ * @return {?}
8895
+ */
8896
+ function () {
8897
+ _this.getEnrollmentData();
8898
+ // tslint:disable-next-line
8899
+ }), 1000);
8843
8900
  };
8844
8901
  Object.defineProperty(CardsComponent.prototype, "isLiveOrMarkForDeletion", {
8845
8902
  get: /**
@@ -8879,16 +8936,11 @@
8879
8936
  */
8880
8937
  function (content) {
8881
8938
  return __awaiter(this, void 0, void 0, function () {
8882
- var userProfile, extUrl, urlData;
8939
+ var urlData;
8883
8940
  return __generator(this, function (_a) {
8884
8941
  switch (_a.label) {
8885
8942
  case 0:
8886
- userProfile = this.configSvc.userProfile;
8887
8943
  if (!content.externalId) return [3 /*break*/, 1];
8888
- extUrl = content.redirectUrl.replace('<username>', userProfile.userId);
8889
- // const url = this.router.serializeUrl(
8890
- // this.router.createUrlTree([extUrl])
8891
- // );
8892
8944
  this.router.navigate(["app/toc/ext/" + content.contentId]);
8893
8945
  return [3 /*break*/, 3];
8894
8946
  case 1: return [4 /*yield*/, this.contSvc.getResourseLink(content)];
@@ -8929,6 +8981,18 @@
8929
8981
  clearInterval(this.cbPlanInterval);
8930
8982
  }
8931
8983
  };
8984
+ /**
8985
+ * @return {?}
8986
+ */
8987
+ CardsComponent.prototype.getEnrollmentData = /**
8988
+ * @return {?}
8989
+ */
8990
+ function () {
8991
+ if (localStorage.getItem('enrollmentMapData')) {
8992
+ this.enrollmentMapData = JSON.parse(localStorage.getItem('enrollmentMapData') || '{}');
8993
+ clearInterval(this.enrollInterval);
8994
+ }
8995
+ };
8932
8996
  /**
8933
8997
  * @param {?} data
8934
8998
  * @return {?}
@@ -8943,14 +9007,13 @@
8943
9007
  CardsComponent.decorators = [
8944
9008
  { type: core.Component, args: [{
8945
9009
  selector: 'sb-uic-cards',
8946
- 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-lib-skeleton'\" [ngTemplateOutlet]=\"cardMdoSkeleton\"></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-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-portrait-ext-lib-skeleton'\" [ngTemplateOutlet]=\"cardPortraitExtLibSkeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-portrait-ext-lib'\" [ngTemplateOutlet]=\"cardPortraitExtLib\"></ng-container>\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 [widgetData]=\"widgetData\"></sb-uic-card-mdo-channel-v1>\n</ng-template>\n<ng-template #cardMdo>\n <sb-uic-card-mdo-channel [widgetData]=\"widgetData\"></sb-uic-card-mdo-channel>\n</ng-template>\n<ng-template #cardMdoSkeleton>\n <sb-uic-card-mdo-channel [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 #cardKarmaProgramV2>\n <!-- <sb-uic-card-karma-programs-v2 [widgetData]=\"widgetData\"><sb-uic-card-karma-programs-v2> -->\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>",
9010
+ 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-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-portrait-ext-lib-skeleton'\" [ngTemplateOutlet]=\"cardPortraitExtLibSkeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-portrait-ext-lib'\" [ngTemplateOutlet]=\"cardPortraitExtLib\"></ng-container>\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 [widgetData]=\"widgetData\"></sb-uic-card-mdo-channel-v1>\n</ng-template>\n<ng-template #cardMdo>\n <sb-uic-card-mdo-channel [widgetData]=\"widgetData\"></sb-uic-card-mdo-channel>\n</ng-template>\n<ng-template #cardMdoSkeleton>\n <sb-uic-card-mdo-channel [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\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>",
8947
9011
  styles: [""]
8948
9012
  }] }
8949
9013
  ];
8950
9014
  /** @nocollapse */
8951
9015
  CardsComponent.ctorParameters = function () { return [
8952
9016
  { type: utilsV2.UtilityService },
8953
- { type: utilsV2.ConfigurationsService },
8954
9017
  { type: WidgetContentService },
8955
9018
  { type: router.Router }
8956
9019
  ]; };
@@ -8971,16 +9034,15 @@
8971
9034
  CardsComponent.prototype.cbPlanMapData;
8972
9035
  /** @type {?} */
8973
9036
  CardsComponent.prototype.cbPlanInterval;
9037
+ /** @type {?} */
9038
+ CardsComponent.prototype.enrollInterval;
9039
+ /** @type {?} */
9040
+ CardsComponent.prototype.enrollmentMapData;
8974
9041
  /**
8975
9042
  * @type {?}
8976
9043
  * @private
8977
9044
  */
8978
9045
  CardsComponent.prototype.utilitySvc;
8979
- /**
8980
- * @type {?}
8981
- * @private
8982
- */
8983
- CardsComponent.prototype.configSvc;
8984
9046
  /**
8985
9047
  * @type {?}
8986
9048
  * @private
@@ -9249,6 +9311,80 @@
9249
9311
  return PipePublicURLModule;
9250
9312
  }());
9251
9313
 
9314
+ /**
9315
+ * @fileoverview added by tsickle
9316
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
9317
+ */
9318
+ var ObjectToArrayPipe = /** @class */ (function () {
9319
+ function ObjectToArrayPipe() {
9320
+ }
9321
+ // transform(value: any, ...args: any[]): any[] {
9322
+ // console.log("function called")
9323
+ // if (!value) {
9324
+ // return [];
9325
+ // }
9326
+ // console.log(Object.keys(value).map(key => ({ key, value: value[key] })), "Object.keys(value).map(key => ({ key, value: value[key] }))==----------")
9327
+ // return Object.keys(value).map(key => ({ key, value: value[key] }));
9328
+ // }
9329
+ // transform(value: any, ...args: any[]): any[] {
9330
+ // console.log("function called")
9331
+ // if (!value) {
9332
+ // return [];
9333
+ // }
9334
+ // console.log(Object.keys(value).map(key => ({ key, value: value[key] })), "Object.keys(value).map(key => ({ key, value: value[key] }))==----------")
9335
+ // return Object.keys(value).map(key => ({ key, value: value[key] }));
9336
+ // }
9337
+ /**
9338
+ * @param {...?} args
9339
+ * @return {?}
9340
+ */
9341
+ ObjectToArrayPipe.prototype.transform =
9342
+ // transform(value: any, ...args: any[]): any[] {
9343
+ // console.log("function called")
9344
+ // if (!value) {
9345
+ // return [];
9346
+ // }
9347
+ // console.log(Object.keys(value).map(key => ({ key, value: value[key] })), "Object.keys(value).map(key => ({ key, value: value[key] }))==----------")
9348
+ // return Object.keys(value).map(key => ({ key, value: value[key] }));
9349
+ // }
9350
+ /**
9351
+ * @param {...?} args
9352
+ * @return {?}
9353
+ */
9354
+ function () {
9355
+ var args = [];
9356
+ for (var _i = 0; _i < arguments.length; _i++) {
9357
+ args[_i] = arguments[_i];
9358
+ }
9359
+ return args;
9360
+ };
9361
+ ObjectToArrayPipe.decorators = [
9362
+ { type: core.Pipe, args: [{
9363
+ name: 'objectToArray'
9364
+ },] }
9365
+ ];
9366
+ return ObjectToArrayPipe;
9367
+ }());
9368
+
9369
+ /**
9370
+ * @fileoverview added by tsickle
9371
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
9372
+ */
9373
+ var ObjectToArrayPipeModule = /** @class */ (function () {
9374
+ function ObjectToArrayPipeModule() {
9375
+ }
9376
+ ObjectToArrayPipeModule.decorators = [
9377
+ { type: core.NgModule, args: [{
9378
+ declarations: [ObjectToArrayPipe],
9379
+ imports: [
9380
+ common.CommonModule,
9381
+ ],
9382
+ exports: [ObjectToArrayPipe],
9383
+ },] }
9384
+ ];
9385
+ return ObjectToArrayPipeModule;
9386
+ }());
9387
+
9252
9388
  /**
9253
9389
  * @fileoverview added by tsickle
9254
9390
  * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
@@ -9415,12 +9551,12 @@
9415
9551
  }
9416
9552
  /**
9417
9553
  * @param {?} data
9418
- * @param {?} type
9554
+ * @param {?=} type
9419
9555
  * @return {?}
9420
9556
  */
9421
9557
  PipeDurationTransformPipe.prototype.transform = /**
9422
9558
  * @param {?} data
9423
- * @param {?} type
9559
+ * @param {?=} type
9424
9560
  * @return {?}
9425
9561
  */
9426
9562
  function (data, type) {
@@ -10927,35 +11063,22 @@
10927
11063
  * @fileoverview added by tsickle
10928
11064
  * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
10929
11065
  */
10930
- var CardMdoChannelV1Component = /** @class */ (function () {
10931
- function CardMdoChannelV1Component(events, translate, langtranslations, configSvc, contSvc, router) {
10932
- var _this = this;
10933
- this.events = events;
10934
- this.translate = translate;
10935
- this.langtranslations = langtranslations;
11066
+ var CardAssessmentComponent = /** @class */ (function () {
11067
+ function CardAssessmentComponent(configSvc, contSvc) {
10936
11068
  this.configSvc = configSvc;
10937
11069
  this.contSvc = contSvc;
10938
- this.router = router;
10939
- this.channelData = new core.EventEmitter();
10940
- this.emitTelemetry = new core.EventEmitter();
10941
- this.widgetType = '';
10942
- this.widgetSubType = '';
10943
- this.langtranslations.languageSelectedObservable.subscribe((/**
10944
- * @return {?}
10945
- */
10946
- function () {
10947
- if (localStorage.getItem('websiteLanguage')) {
10948
- _this.translate.setDefaultLang('en');
10949
- /** @type {?} */
10950
- var lang = (/** @type {?} */ (localStorage.getItem('websiteLanguage')));
10951
- _this.translate.use(lang);
10952
- }
10953
- }));
11070
+ this.contentData = new core.EventEmitter();
11071
+ this.isCardLoading = false;
11072
+ this.stripData = [];
11073
+ this.enrollList = [];
11074
+ this.activeResource = [];
11075
+ this.daysRemaining = 0;
11076
+ this.daysPending = false;
10954
11077
  }
10955
11078
  /**
10956
11079
  * @return {?}
10957
11080
  */
10958
- CardMdoChannelV1Component.prototype.ngOnInit = /**
11081
+ CardAssessmentComponent.prototype.ngOnInit = /**
10959
11082
  * @return {?}
10960
11083
  */
10961
11084
  function () {
@@ -10963,8 +11086,7 @@
10963
11086
  var instanceConfig = this.configSvc.instanceConfig;
10964
11087
  if (instanceConfig) {
10965
11088
  this.defaultThumbnail = instanceConfig.logos.defaultContent || '';
10966
- this.sourceLogos = instanceConfig.sources;
10967
- this.defaultSLogo = instanceConfig.logos.defaultSourceLogo || '';
11089
+ this.defaultSLogo = instanceConfig.logos.defaultSourceLogo || '/assets/instances/eagle/app_logos/KarmayogiBharat_Logo.svg';
10968
11090
  }
10969
11091
  else {
10970
11092
  this.defaultThumbnail = '/assets/instances/eagle/app_logos/default.png';
@@ -10972,116 +11094,1049 @@
10972
11094
  }
10973
11095
  };
10974
11096
  /**
10975
- * @param {?} contentData
11097
+ * @param {?} startDate
10976
11098
  * @return {?}
10977
11099
  */
10978
- CardMdoChannelV1Component.prototype.raiseTelemetry = /**
10979
- * @param {?} contentData
11100
+ CardAssessmentComponent.prototype.updateStartDate = /**
11101
+ * @param {?} startDate
10980
11102
  * @return {?}
10981
11103
  */
10982
- function (contentData) {
10983
- this.emitTelemetry.emit(contentData);
10984
- if (this.widgetData) {
10985
- contentData['typeOfTelemetry'] = 'mdo-channel';
11104
+ function (startDate) {
11105
+ this.startDate = startDate;
11106
+ this.startCountdown(this.startDate);
11107
+ };
11108
+ /**
11109
+ * @param {?} date
11110
+ * @return {?}
11111
+ */
11112
+ CardAssessmentComponent.prototype.startCountdown = /**
11113
+ * @param {?} date
11114
+ * @return {?}
11115
+ */
11116
+ function (date) {
11117
+ var _this = this;
11118
+ // Update the countdown immediately on start
11119
+ this.updateCountdown(date);
11120
+ // Update the countdown every second
11121
+ this.intervalId = setInterval((/**
11122
+ * @return {?}
11123
+ */
11124
+ function () {
11125
+ _this.updateCountdown(date);
11126
+ }), 1000);
11127
+ };
11128
+ // Method to update the countdown values
11129
+ // Method to update the countdown values
11130
+ /**
11131
+ * @param {?} targetDate
11132
+ * @return {?}
11133
+ */
11134
+ CardAssessmentComponent.prototype.updateCountdown =
11135
+ // Method to update the countdown values
11136
+ /**
11137
+ * @param {?} targetDate
11138
+ * @return {?}
11139
+ */
11140
+ function (targetDate) {
11141
+ /** @type {?} */
11142
+ var now = new Date().getTime();
11143
+ // Current time in milliseconds
11144
+ /** @type {?} */
11145
+ var targetTime = new Date(targetDate).getTime();
11146
+ /** @type {?} */
11147
+ var distance = targetTime - now;
11148
+ if (distance > 0) {
11149
+ this.daysRemaining = Math.ceil(distance / (1000 * 60 * 60 * 24));
11150
+ this.daysPending = true;
11151
+ }
11152
+ else {
11153
+ this.daysRemaining = 0;
11154
+ this.daysPending = false;
11155
+ this.clearTimer();
10986
11156
  }
10987
- this.contSvc.changeTelemetryData(contentData);
10988
11157
  };
11158
+ // Method to clear the interval
11159
+ // Method to clear the interval
10989
11160
  /**
10990
- * @param {?} channeldata
10991
11161
  * @return {?}
10992
11162
  */
10993
- CardMdoChannelV1Component.prototype.channelClick = /**
10994
- * @param {?} channeldata
11163
+ CardAssessmentComponent.prototype.clearTimer =
11164
+ // Method to clear the interval
11165
+ /**
10995
11166
  * @return {?}
10996
11167
  */
10997
- function (channeldata) {
10998
- this.channelData.emit(channeldata);
11168
+ function () {
11169
+ clearInterval(this.intervalId);
10999
11170
  };
11000
11171
  /**
11001
- * @param {?} content
11002
11172
  * @return {?}
11003
11173
  */
11004
- CardMdoChannelV1Component.prototype.redirectTo = /**
11005
- * @param {?} content
11174
+ CardAssessmentComponent.prototype.ngOnDestroy = /**
11006
11175
  * @return {?}
11007
11176
  */
11008
- function (content) {
11009
- this.router.navigate(["/app/learn/mdo-channels/" + content.orgName + "/" + content.identifier + "/micro-sites"]);
11177
+ function () {
11178
+ this.clearTimer();
11010
11179
  };
11011
- CardMdoChannelV1Component.decorators = [
11180
+ /**
11181
+ * @param {?} contentData
11182
+ * @return {?}
11183
+ */
11184
+ CardAssessmentComponent.prototype.getRedirectUrlData = /**
11185
+ * @param {?} contentData
11186
+ * @return {?}
11187
+ */
11188
+ function (contentData) {
11189
+ // for telemetry
11190
+ if (this.widgetData && this.widgetData.context && this.widgetData.context.pageSection) {
11191
+ contentData['typeOfTelemetry'] = this.widgetData.context.pageSection;
11192
+ }
11193
+ this.contSvc.changeTelemetryData(contentData);
11194
+ // for redirection
11195
+ this.contentData.emit(contentData);
11196
+ };
11197
+ CardAssessmentComponent.decorators = [
11012
11198
  { type: core.Component, args: [{
11013
- selector: 'sb-uic-card-mdo-channel-v1',
11014
- template: "<mat-card class=\"channels-card card-channels-container mr-5 padding-remove cursor-pointer\">\n <div class=\"display-contents\">\n <ng-container *ngIf=\"widgetData?.content\">\n <a (click)=\"raiseTelemetry(widgetData?.content); redirectTo(widgetData?.content); $event.stopPropagation()\"\n i18n-aria-label>\n <ng-container>\n <mat-card-content class=\"min-top\">\n <div class=\"flex flex-col h-full\">\n <div class=\"image-container\">\n <ng-container *ngIf=\"widgetData?.content?.imgUrl; else defaultImg\">\n <img mat-card-image [src]=\"widgetData?.content?.imgUrl\" loading=\"lazy\"\n class=\"card-img ws-mat-primary-lite-background margin-remove\" [wsUtilsDefaultThumbnail]=\"defaultThumbnail\"\n [alt]=\"widgetData?.content?.orgName\" />\n </ng-container>\n <ng-template #defaultImg>\n <sb-uic-avatar-photo [randomColor]=\"true\" [name]=\"widgetData?.content?.orgName\" [photoUrl]=\"widgetData?.content?.imgUrl\" size=\"m-side-rating\">\n </sb-uic-avatar-photo>\n </ng-template>\n </div>\n <div class=\"flex title-container px-2\">\n <div [id]=\"'m-c-'+ widgetData?.content?.identifier\"\n class=\"flex-1 text-center mat-subheading-2 title-text ws-mat-black-text\">\n {{ widgetData?.content?.orgName }}\n </div>\n </div>\n </div>\n </mat-card-content>\n </ng-container>\n </a>\n </ng-container>\n </div>\n</mat-card>",
11015
- styles: [".card-channels-container{position:relative;width:245px;box-sizing:border-box;box-shadow:0 10px 30px rgba(153,153,153,.2);overflow:hidden;min-height:156px;height:156px;max-height:156px;margin:20px 8px;background:#7faeff!important;border-radius:12px;padding:4px!important}.card-channels-container .min-top{background:inherit;margin-bottom:0;height:inherit}.card-channels-container .image-container{background-color:#fff;width:inherit;height:86px;max-height:86px;overflow:hidden;display:flex;align-items:center;justify-content:center;border-radius:12px}.card-channels-container .card-img{max-height:62px;min-height:62px;display:block;-o-object-fit:fill;object-fit:contain}.card-channels-container .mat-subheading-1{font:600 14px/24px Montserrat}.card-channels-container .title-container{background:inherit}.card-channels-container .description-text{position:relative;overflow:hidden;height:51px}.card-channels-container .title-text{word-break:break-all;white-space:initial;margin:8px 0;position:relative;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}"]
11199
+ selector: 'sb-uic-card-assessment',
11200
+ template: "<ng-container *ngIf=\"!isCardLoading\">\n<ng-container >\n\t<mat-card class=\"card-assessment card-scheduled-assessment card-users-container padding-remove cursor-pointer mr-4\">\n\t<a (click)=\"getRedirectUrlData(widgetData?.content); $event.stopPropagation()\">\n\t\t<div class=\"display-contents\">\n\t\t\t<ng-container *ngIf=\"widgetData\">\n\t\t\t\t<mat-card-content>\n\t\t\t\t\t<div class=\"flex flex-col h-full\">\n\t\t\t\t\t\t<div class=\"flex flex-1 flex-row padding-s\">\n\t\t\t\t\t\t\t<div class=\"flex image-container\">\n\t\t\t\t\t\t\t\t<ng-container *ngIf=\"widgetData?.content?.posterImage\">\n\t\t\t\t\t\t\t\t\t<img mat-card-image class=\"margin-remove assess-img\" [src]=\"widgetData?.content?.posterImage | pipePublicURL\"\n\t\t\t\t\t\t\t\t\t\t[alt]=\"widgetData?.content?.name\">\n\t\t\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t\t\t\t<ng-container *ngIf=\"!widgetData?.content?.posterImage\">\n\t\t\t\t\t\t\t\t\t<ng-template #defaultImg>\n\t\t\t\t\t\t\t\t\t\t<img mat-card-image [src]=\"defaultThumbnail\" loading=\"lazy\"\n\t\t\t\t\t\t\t\t\t\t\tclass=\"card-wide-img ws-mat-primary-lite-background margin-remove assess-img\"\n\t\t\t\t\t\t\t\t\t\t\t[alt]=\"widgetData?.content?.name\" />\n\t\t\t\t\t\t\t\t\t</ng-template>\n\t\t\t\t\t\t\t\t</ng-container>\n\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"flex title-container flex-col\">\n\t\t\t\t\t\t\t\t<div class=\"flex title-text mat-subheading-1\">\n\t\t\t\t\t\t\t\t\t{{ widgetData?.content?.name }}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"flex margin-remove margin-top-s font-normal mat-caption sub-title-text\">\n\t\t\t\t\t\t\t\t\t<div class=\"course_logo_box\">\n\t\t\t\t\t\t\t\t\t\t<img [src]=\"widgetData?.content?.creatorLogo | pipePublicURL \" class=\"source-icon\"\n\t\t\t\t\t\t\t\t\t\t\t[wsUtilsDefaultThumbnail]=\"defaultSLogo\"\n\t\t\t\t\t\t\t\t\t\t\t[alt]=\"(widgetData?.content?.sourceName + '_' + widgetData?.content?.identifier)\" />\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<span class=\"sub-title-text\">\n\t\t\t\t\t\t\t\t\t\t{{ (widgetData?.content?.organisation && widgetData?.content?.organisation[0]) ?\n\t\t\t\t\t\t\t\t\t\twidgetData?.content?.organisation[0] : 'Karmayogi Bharat' }}\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<span class=\"start-span\">Assessment starts in </span>\n\t\t\t\t\t\t<mat-card-footer class=\"assessment-card-footer padding-m\">\n\t\t\t\t\t\t\t<div class=\"flex flex-1 items-center justify-center col-row margin-top-m\">\n\t\t\t\t\t\t\t\t<div class=\"flex margin-right-m\">\n\t\t\t\t\t\t\t\t\t<span *ngIf=\"daysPending\"> {{ startCountdown(widgetData?.content?.batch?.startDate) }}<div id=\"demo\"></div> </span>\n\t\t\t\t\t\t\t\t\t<span *ngIf=\"!daysPending\" class=\"start-btn\"> Start Assessment\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"flex\">\n\t\t\t\t\t\t\t\t\t<span class=\"time-span flex items-center justify-center\">{{widgetData?.content?.batch?.startDate | date: 'd MMM, y' }}</span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</mat-card-footer>\n\t\t\t\t\t</div>\n\t\t\t\t</mat-card-content>\n\t\t\t</ng-container>\n\t\t</div>\n\t</a>\n</mat-card>\n</ng-container>\n</ng-container>\n\n\n\n<ng-container *ngIf=\"isCardLoading\">\n\t<ng-container [ngTemplateOutlet]=\"skeltonLoader\"></ng-container>\n</ng-container>\n\n<ng-template #skeltonLoader>\n\n\t<mat-card class=\"card-assessment card-scheduled-assessment card-users-container padding-remove cursor-pointer mr-4\">\n\t\t<a>\n\t\t\t<div class=\"display-contents\">\n\t\t\t\t<ng-container>\n\t\t\t\t\t<mat-card-content>\n\t\t\t\t\t\t<div class=\"flex flex-col h-full\">\n\t\t\t\t\t\t\t<div class=\"flex flex-1 flex-row padding-s\">\n\t\t\t\t\t\t\t\t<div class=\"flex image-container\">\n\t\t\t\t\t\t\t\t\t<ng-container>\n\t\t\t\t\t\t\t\t\t\t<sb-uic-skeleton-loader [width]=\"'300px'\" [height]=\"'155px'\"\n\t\t\t\t\t\t\t\t\t\t\t></sb-uic-skeleton-loader>\n\t\t\t\t\t\t\t\t\t</ng-container>\n\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"flex title-container flex-col\">\n\t\t\t\t\t\t\t\t\t<div class=\"flex\">\n\t\t\t\t\t\t\t\t\t\t<sb-uic-skeleton-loader [width]=\"'100px'\" [height]=\"'16px'\"\n\t\t\t\t\t\t\t\t\t\t\t[bindingClass]=\"'flex rounded br-8'\"></sb-uic-skeleton-loader>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"flex margin-remove margin-top-l font-normal\">\n\t\t\t\t\t\t\t\t\t\t<sb-uic-skeleton-loader [width]=\"'100px'\" [height]=\"'16px'\"\n\t\t\t\t\t\t\t\t\t\t\t[bindingClass]=\"'flex rounded br-8'\"></sb-uic-skeleton-loader>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<!-- <span class=\"text-center\"><sb-uic-skeleton-loader [width]=\"'90px'\" [height]=\"'16px'\"\n\t\t\t\t\t\t\t\t\t[bindingClass]=\"'flex rounded br-8'\"></sb-uic-skeleton-loader> </span> -->\n\t\t\t\t\t\t\t<mat-card-footer\n\t\t\t\t\t\t\t\tclass=\"assessment-card-footer col-row padding-l\">\n\t\t\t\t\t\t\t\t<div class=\"flex flex-1 items-center justify-center col-row margin-top-m\">\n\t\t\t\t\t\t\t\t<div class=\"flex margin-right-m\">\n\t\t\t\t\t\t\t\t\t<sb-uic-skeleton-loader [width]=\"'100px'\" [height]=\"'16px'\"\n\t\t\t\t\t\t\t\t\t\t[bindingClass]=\"'flex rounded br-8'\"></sb-uic-skeleton-loader>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"flex\">\n\t\t\t\t\t\t\t\t\t<sb-uic-skeleton-loader [width]=\"'100px'\" [height]=\"'16px'\"\n\t\t\t\t\t\t\t\t\t\t[bindingClass]=\"'flex rounded br-8'\"></sb-uic-skeleton-loader>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</mat-card-footer>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</mat-card-content>\n\t\t\t\t</ng-container>\n\t\t\t</div>\n\t\t</a>\n\t</mat-card>\n</ng-template>",
11201
+ styles: [".card-assessment{width:100%;min-height:190px;box-sizing:border-box;min-width:335px;margin-top:16px}.image-container{width:155px;height:120px;border-radius:8px;overflow:hidden;border:1px solid rgba(0,0,0,.08)}.title-container{margin-left:12px}.title-text{word-break:break-word;white-space:initial;margin:8px 0;position:relative;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;max-height:48px;font:600 14px/24px Montserrat}.sub-title-text{width:75%;word-break:break-word;white-space:initial;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.course_logo_box{width:38px;height:38px;background:#fff;border-radius:8px;box-sizing:border-box;margin-right:4px;box-shadow:0 2px 1px -1px rgb(0 0 0 / 20%),0 1px 1px 0 rgb(0 0 0 / 14%),0 1px 3px 0 rgb(0 0 0 / 12%)}.course_logo_box img.source-icon{height:28px;width:28px;padding:5px;display:inline-block}.mat-card-footer{margin:0!important}.time-span{padding:2px 8px;color:#fff;border-radius:4px;text-align:center;font-size:12px;background-color:green}span.start-span{border-radius:50px;border:2px solid rgba(0,0,0,.08);font-size:12px;text-align:center;position:absolute;bottom:0;width:140px;left:50%;margin-left:-70px;background-color:#fff;margin-bottom:62px;margin-right:8px}.assessment-card-footer{background:rgba(239,149,30,.16)!important;text-align:center;box-sizing:border-box}.start-btn{background:#1b4ca1!important;color:#fff;font-size:14px;font-weight:600;border-radius:25px;text-align:center;padding:4px 12px}.dots-container{display:none}"]
11016
11202
  }] }
11017
11203
  ];
11018
11204
  /** @nocollapse */
11019
- CardMdoChannelV1Component.ctorParameters = function () { return [
11020
- { type: utilsV2.EventService },
11021
- { type: core$1.TranslateService },
11022
- { type: utilsV2.MultilingualTranslationsService },
11205
+ CardAssessmentComponent.ctorParameters = function () { return [
11023
11206
  { type: utilsV2.ConfigurationsService },
11024
- { type: WidgetContentService },
11025
- { type: router.Router }
11207
+ { type: WidgetContentService }
11026
11208
  ]; };
11027
- CardMdoChannelV1Component.propDecorators = {
11209
+ CardAssessmentComponent.propDecorators = {
11028
11210
  widgetData: [{ type: core.Input }],
11029
- channelData: [{ type: core.Output }],
11030
- emitTelemetry: [{ type: core.Output }]
11211
+ enrollmentMapData: [{ type: core.Input }],
11212
+ contentData: [{ type: core.Output }],
11213
+ isCardLoading: [{ type: core.Input }]
11031
11214
  };
11032
- return CardMdoChannelV1Component;
11215
+ return CardAssessmentComponent;
11033
11216
  }());
11034
11217
  if (false) {
11035
11218
  /** @type {?} */
11036
- CardMdoChannelV1Component.prototype.widgetData;
11219
+ CardAssessmentComponent.prototype.widgetData;
11037
11220
  /** @type {?} */
11038
- CardMdoChannelV1Component.prototype.channelData;
11221
+ CardAssessmentComponent.prototype.enrollmentMapData;
11039
11222
  /** @type {?} */
11040
- CardMdoChannelV1Component.prototype.emitTelemetry;
11223
+ CardAssessmentComponent.prototype.contentData;
11041
11224
  /** @type {?} */
11042
- CardMdoChannelV1Component.prototype.defaultThumbnail;
11225
+ CardAssessmentComponent.prototype.isCardLoading;
11043
11226
  /** @type {?} */
11044
- CardMdoChannelV1Component.prototype.sourceLogos;
11227
+ CardAssessmentComponent.prototype.stripData;
11045
11228
  /** @type {?} */
11046
- CardMdoChannelV1Component.prototype.defaultSLogo;
11229
+ CardAssessmentComponent.prototype.enrollList;
11047
11230
  /** @type {?} */
11048
- CardMdoChannelV1Component.prototype.widgetType;
11231
+ CardAssessmentComponent.prototype.activeResource;
11049
11232
  /** @type {?} */
11050
- CardMdoChannelV1Component.prototype.widgetSubType;
11051
- /**
11052
- * @type {?}
11053
- * @private
11054
- */
11055
- CardMdoChannelV1Component.prototype.events;
11056
- /**
11057
- * @type {?}
11058
- * @private
11059
- */
11060
- CardMdoChannelV1Component.prototype.translate;
11233
+ CardAssessmentComponent.prototype.defaultThumbnail;
11234
+ /** @type {?} */
11235
+ CardAssessmentComponent.prototype.defaultSLogo;
11236
+ /** @type {?} */
11237
+ CardAssessmentComponent.prototype.daysRemaining;
11238
+ /** @type {?} */
11239
+ CardAssessmentComponent.prototype.startDate;
11240
+ /** @type {?} */
11241
+ CardAssessmentComponent.prototype.daysPending;
11061
11242
  /**
11062
11243
  * @type {?}
11063
11244
  * @private
11064
11245
  */
11065
- CardMdoChannelV1Component.prototype.langtranslations;
11246
+ CardAssessmentComponent.prototype.intervalId;
11066
11247
  /**
11067
11248
  * @type {?}
11068
11249
  * @private
11069
11250
  */
11070
- CardMdoChannelV1Component.prototype.configSvc;
11251
+ CardAssessmentComponent.prototype.configSvc;
11071
11252
  /**
11072
11253
  * @type {?}
11073
11254
  * @private
11074
11255
  */
11075
- CardMdoChannelV1Component.prototype.contSvc;
11076
- /** @type {?} */
11077
- CardMdoChannelV1Component.prototype.router;
11256
+ CardAssessmentComponent.prototype.contSvc;
11078
11257
  }
11079
11258
 
11080
11259
  /**
11081
11260
  * @fileoverview added by tsickle
11082
11261
  * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
11083
11262
  */
11084
- var AvatarPhotoLibComponent = /** @class */ (function () {
11263
+ var ɵ0$3 = /**
11264
+ * @param {?} id
11265
+ * @return {?}
11266
+ */
11267
+ function (id) { return "certreg/v2/certs/download/" + id; }, ɵ1$2 = /**
11268
+ * @param {?} id
11269
+ * @return {?}
11270
+ */
11271
+ function (id) { return "apis/protected/v8/cohorts/course/batch/cert/download/" + id; };
11272
+ /** @type {?} */
11273
+ var urls = {
11274
+ DOWNLOAD_CERTIFICATE: (ɵ0$3),
11275
+ DOWNLOAD_CERTIFICATE_v2: (ɵ1$2),
11276
+ };
11277
+ var CertificateService = /** @class */ (function () {
11278
+ function CertificateService(http) {
11279
+ this.http = http;
11280
+ }
11281
+ /**
11282
+ * @param {?} id
11283
+ * @return {?}
11284
+ */
11285
+ CertificateService.prototype.downloadCertificate = /**
11286
+ * @param {?} id
11287
+ * @return {?}
11288
+ */
11289
+ function (id) {
11290
+ return this.http.get(urls.DOWNLOAD_CERTIFICATE(id));
11291
+ };
11292
+ /**
11293
+ * @param {?} id
11294
+ * @return {?}
11295
+ */
11296
+ CertificateService.prototype.downloadCertificate_v2 = /**
11297
+ * @param {?} id
11298
+ * @return {?}
11299
+ */
11300
+ function (id) {
11301
+ return this.http.get(urls.DOWNLOAD_CERTIFICATE_v2(id));
11302
+ };
11303
+ CertificateService.decorators = [
11304
+ { type: core.Injectable, args: [{
11305
+ providedIn: 'root'
11306
+ },] }
11307
+ ];
11308
+ /** @nocollapse */
11309
+ CertificateService.ctorParameters = function () { return [
11310
+ { type: http.HttpClient }
11311
+ ]; };
11312
+ /** @nocollapse */ CertificateService.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function CertificateService_Factory() { return new CertificateService(core.ɵɵinject(http.HttpClient)); }, token: CertificateService, providedIn: "root" });
11313
+ return CertificateService;
11314
+ }());
11315
+ if (false) {
11316
+ /**
11317
+ * @type {?}
11318
+ * @private
11319
+ */
11320
+ CertificateService.prototype.http;
11321
+ }
11322
+
11323
+ /**
11324
+ * @fileoverview added by tsickle
11325
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
11326
+ */
11327
+ var CertificateDialogComponent = /** @class */ (function () {
11328
+ function CertificateDialogComponent(environment, events, translate, langtranslations, dialogRef, data) {
11329
+ var _this = this;
11330
+ this.events = events;
11331
+ this.translate = translate;
11332
+ this.langtranslations = langtranslations;
11333
+ this.dialogRef = dialogRef;
11334
+ this.data = data;
11335
+ this.navUrl = '';
11336
+ this.environment = environment;
11337
+ this.langtranslations.languageSelectedObservable.subscribe((/**
11338
+ * @return {?}
11339
+ */
11340
+ function () {
11341
+ if (localStorage.getItem('websiteLanguage')) {
11342
+ _this.translate.setDefaultLang('en');
11343
+ /** @type {?} */
11344
+ var lang = (/** @type {?} */ (localStorage.getItem('websiteLanguage')));
11345
+ _this.translate.use(lang);
11346
+ }
11347
+ }));
11348
+ }
11349
+ /**
11350
+ * @return {?}
11351
+ */
11352
+ CertificateDialogComponent.prototype.ngOnInit = /**
11353
+ * @return {?}
11354
+ */
11355
+ function () {
11356
+ this.url = this.data.cet;
11357
+ // tslint:disable-next-line:max-line-length
11358
+ this.navUrl = "https://www.linkedin.com/sharing/share-offsite/?url=" + this.environment.contentHost + "/apis/public/v8/cert/download/" + this.data.certId;
11359
+ };
11360
+ /**
11361
+ * @return {?}
11362
+ */
11363
+ CertificateDialogComponent.prototype.downloadCert = /**
11364
+ * @return {?}
11365
+ */
11366
+ function () {
11367
+ this.raiseIntreactTelemetry('svg');
11368
+ /** @type {?} */
11369
+ var a = document.createElement('a');
11370
+ a.href = this.data.cet;
11371
+ a.download = 'Certificate';
11372
+ document.body.appendChild(a);
11373
+ a.style = 'display: none';
11374
+ a.click();
11375
+ a.remove();
11376
+ };
11377
+ /**
11378
+ * @return {?}
11379
+ */
11380
+ CertificateDialogComponent.prototype.downloadCertPng = /**
11381
+ * @return {?}
11382
+ */
11383
+ function () {
11384
+ this.raiseIntreactTelemetry('png');
11385
+ /** @type {?} */
11386
+ var uriData = this.data.cet;
11387
+ /** @type {?} */
11388
+ var img = new Image();
11389
+ img.src = uriData;
11390
+ img.width = 1820;
11391
+ img.height = 1000;
11392
+ img.onload = (/**
11393
+ * @return {?}
11394
+ */
11395
+ function () {
11396
+ var _a;
11397
+ /** @type {?} */
11398
+ var canvas = document.createElement('canvas');
11399
+ _a = __read([img.width, img.height], 2), canvas.width = _a[0], canvas.height = _a[1];
11400
+ /** @type {?} */
11401
+ var ctx = canvas.getContext('2d');
11402
+ if (ctx) {
11403
+ // ctx.imageSmoothingEnabled = true
11404
+ ctx.drawImage(img, 0, 0, img.width, img.height);
11405
+ /** @type {?} */
11406
+ var a = document.createElement('a');
11407
+ /** @type {?} */
11408
+ var quality = 1.0 // https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/imageSmoothingQuality
11409
+ ;
11410
+ a.href = canvas.toDataURL('image/png', quality);
11411
+ a.download = 'Certificate';
11412
+ a.append(canvas);
11413
+ a.click();
11414
+ a.remove();
11415
+ }
11416
+ });
11417
+ };
11418
+ /**
11419
+ * @return {?}
11420
+ */
11421
+ CertificateDialogComponent.prototype.downloadCertPdf = /**
11422
+ * @return {?}
11423
+ */
11424
+ function () {
11425
+ return __awaiter(this, void 0, void 0, function () {
11426
+ var uriData, img;
11427
+ return __generator(this, function (_a) {
11428
+ this.raiseIntreactTelemetry('pdf');
11429
+ uriData = this.data.cet;
11430
+ img = new Image();
11431
+ img.src = uriData;
11432
+ img.width = 1820;
11433
+ img.height = 1000;
11434
+ img.onload = (/**
11435
+ * @return {?}
11436
+ */
11437
+ function () {
11438
+ var _a;
11439
+ /** @type {?} */
11440
+ var canvas = document.createElement('canvas');
11441
+ _a = __read([img.width, img.height], 2), canvas.width = _a[0], canvas.height = _a[1];
11442
+ /** @type {?} */
11443
+ var ctx = canvas.getContext('2d');
11444
+ if (ctx) {
11445
+ ctx.drawImage(img, 0, 0, img.width, img.height);
11446
+ /** @type {?} */
11447
+ var quality = 1.0 // https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/imageSmoothingQuality
11448
+ ;
11449
+ // https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/imageSmoothingQuality
11450
+ /** @type {?} */
11451
+ var dataImg = canvas.toDataURL('application/pdf', quality);
11452
+ /** @type {?} */
11453
+ var pdf = new jspdf.jsPDF('landscape', 'px', 'a4')
11454
+ // add the image to the PDF
11455
+ ;
11456
+ // add the image to the PDF
11457
+ pdf.addImage(dataImg, 10, 20, 600, 350);
11458
+ // download the PDF
11459
+ pdf.save('Certificate.pdf');
11460
+ }
11461
+ });
11462
+ return [2 /*return*/];
11463
+ });
11464
+ });
11465
+ };
11466
+ /**
11467
+ * @return {?}
11468
+ */
11469
+ CertificateDialogComponent.prototype.shareCert = /**
11470
+ * @return {?}
11471
+ */
11472
+ function () {
11473
+ this.raiseShareIntreactTelemetry('share');
11474
+ return window.open(this.navUrl, '_blank');
11475
+ };
11476
+ /**
11477
+ * @param {?=} type
11478
+ * @param {?=} action
11479
+ * @return {?}
11480
+ */
11481
+ CertificateDialogComponent.prototype.raiseShareIntreactTelemetry = /**
11482
+ * @param {?=} type
11483
+ * @param {?=} action
11484
+ * @return {?}
11485
+ */
11486
+ function (type, action) {
11487
+ this.events.raiseInteractTelemetry({
11488
+ type: utilsV2.WsEvents.EnumInteractTypes.CLICK,
11489
+ id: type + "-" + utilsV2.WsEvents.EnumInteractSubTypes.CERTIFICATE,
11490
+ subType: action && action,
11491
+ }, {
11492
+ id: this.data.certId,
11493
+ // id of the certificate
11494
+ type: utilsV2.WsEvents.EnumInteractSubTypes.CERTIFICATE,
11495
+ });
11496
+ };
11497
+ /**
11498
+ * @param {?=} action
11499
+ * @return {?}
11500
+ */
11501
+ CertificateDialogComponent.prototype.raiseIntreactTelemetry = /**
11502
+ * @param {?=} action
11503
+ * @return {?}
11504
+ */
11505
+ function (action) {
11506
+ this.events.raiseInteractTelemetry({
11507
+ type: utilsV2.WsEvents.EnumInteractTypes.CLICK,
11508
+ id: 'download-certificate',
11509
+ subType: action && action,
11510
+ }, {
11511
+ id: this.data.certId,
11512
+ // id of the certificate
11513
+ type: utilsV2.WsEvents.EnumInteractSubTypes.CERTIFICATE,
11514
+ });
11515
+ };
11516
+ CertificateDialogComponent.decorators = [
11517
+ { type: core.Component, args: [{
11518
+ selector: 'sb-uic-certificate-dialog',
11519
+ template: "<mat-card class=\"no-shadow certificate-img-box\">\n <button mat-icon-button class=\"close-button\" [mat-dialog-close]=\"true\">\n <mat-icon class=\"close-icon\" color=\"warn\">close</mat-icon>\n </button>\n <!-- <mat-card-title>\n\n </mat-card-title> -->\n <mat-card-content class=\"certificate-img-content\">\n <img #certificate [src]=\"url| pipeSafeSanitizer: 'url'\" alt=\"Certificate\" role=\"image\" class=\"certificate-banner-image\">\n </mat-card-content>\n <mat-card-actions class=\"flex flex-row-reverse\">\n <!-- <ws-widget-svg-to-pdf></ws-widget-svg-to-pdf> -->\n <a mat-button (click)=\"shareCert()\" class=\"ws-mat-accent-border-active mat-accent\">\n <mat-icon class=\"mat-icon material-icons-outlined download_icon margin-right-xs\">share</mat-icon>\n Share\n </a>\n <a mat-button [matMenuTriggerFor]=\"menu\" class=\"ws-mat-accent-border-active mat-accent\" (click)=\"raiseIntreactTelemetry()\">\n <mat-icon class=\"mat-icon material-icons-outlined download_icon margin-right-xs\">cloud_download</mat-icon>\n {{'certificatedialog.download' | translate}}\n </a>\n <mat-menu #menu=\"matMenu\">\n <button mat-menu-item (click)='downloadCertPdf()'>\n <mat-icon>picture_as_pdf</mat-icon>\n <span>{{'certificatedialog.pdf' | translate}}</span>\n </button>\n <button mat-menu-item (click)='downloadCertPng()'>\n <mat-icon>photo</mat-icon>\n <span>{{'certificatedialog.png' | translate}}</span>\n </button>\n <button mat-menu-item (click)='downloadCert()'>\n <mat-icon>photo_size_select_actual</mat-icon>\n <span>{{'certificatedialog.svg' | translate}}</span>\n </button>\n </mat-menu>\n </mat-card-actions>\n</mat-card>\n",
11520
+ /* tslint:disable */
11521
+ host: { class: 'certificate-inner-dialog-panel' },
11522
+ styles: [".no-shadow{box-shadow:none!important}.certificate-banner-image{height:30rem;display:flex;width:auto;margin:0 auto}.certificate-img-box{max-height:35rem;overflow-y:auto;overflow-x:hidden}.certificate-img-content{overflow:hidden}a.download_btn{background-color:#f0f0f0;border-radius:4px;float:right;height:40px;padding:0 16px;text-align:center;line-height:40px;text-decoration:none;color:rgba(0,0,0,.6);font-size:14px;font-weight:600;margin-top:16px;margin-right:0}.download_icon{font-size:16px;vertical-align:text-top}.close-icon{transition:1s ease-in-out;color:#fff!important}.close-icon:hover{transform:rotate(180deg)}::ng-deep .icon-outside .close-button{float:right;top:-52px;right:-52px}::ng-deep .icon-outside .mat-dialog-container{overflow:unset}::ng-deep .cdk-overlay-pane{max-height:96%!important;overflow-y:auto!important}.certificate-banner-image svg{width:500;height:500}@media only screen and (max-width:1279px){.certificate-banner-image{width:100%;height:auto;flex:1}.certificate-banner-image svg{width:auto;height:auto;flex:1}}.close-button{float:right;top:-16px;right:-12px;height:30px;width:30px;line-height:30px;background:#000!important;color:#fff!important;border-radius:50%!important}.ws-mat-accent-border{border:1px solid rgba(255,255,255,.08)}.ws-mat-accent-border-active{border:1px solid #1b4ca1;color:#1b4ca1}.mat-button,.mat-flat-button,.mat-icon-button,.mat-stroked-button{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible}"]
11523
+ }] }
11524
+ ];
11525
+ /** @nocollapse */
11526
+ CertificateDialogComponent.ctorParameters = function () { return [
11527
+ { type: undefined, decorators: [{ type: core.Inject, args: ['environment',] }] },
11528
+ { type: utilsV2.EventService },
11529
+ { type: core$1.TranslateService },
11530
+ { type: utilsV2.MultilingualTranslationsService },
11531
+ { type: material.MatDialogRef },
11532
+ { type: undefined, decorators: [{ type: core.Inject, args: [material.MAT_DIALOG_DATA,] }] }
11533
+ ]; };
11534
+ return CertificateDialogComponent;
11535
+ }());
11536
+ if (false) {
11537
+ /** @type {?} */
11538
+ CertificateDialogComponent.prototype.url;
11539
+ /** @type {?} */
11540
+ CertificateDialogComponent.prototype.navUrl;
11541
+ /** @type {?} */
11542
+ CertificateDialogComponent.prototype.environment;
11543
+ /**
11544
+ * @type {?}
11545
+ * @private
11546
+ */
11547
+ CertificateDialogComponent.prototype.events;
11548
+ /**
11549
+ * @type {?}
11550
+ * @private
11551
+ */
11552
+ CertificateDialogComponent.prototype.translate;
11553
+ /**
11554
+ * @type {?}
11555
+ * @private
11556
+ */
11557
+ CertificateDialogComponent.prototype.langtranslations;
11558
+ /** @type {?} */
11559
+ CertificateDialogComponent.prototype.dialogRef;
11560
+ /** @type {?} */
11561
+ CertificateDialogComponent.prototype.data;
11562
+ }
11563
+
11564
+ /**
11565
+ * @fileoverview added by tsickle
11566
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
11567
+ */
11568
+ var CardProgressPortraitLibComponent = /** @class */ (function () {
11569
+ function CardProgressPortraitLibComponent(snackBar, translate, events, langtranslations, configSvc, contSvc, certificateService, dialog) {
11570
+ var _this = this;
11571
+ this.snackBar = snackBar;
11572
+ this.translate = translate;
11573
+ this.events = events;
11574
+ this.langtranslations = langtranslations;
11575
+ this.configSvc = configSvc;
11576
+ this.contSvc = contSvc;
11577
+ this.certificateService = certificateService;
11578
+ this.dialog = dialog;
11579
+ this.isCardLoading = false;
11580
+ this.contentData = new core.EventEmitter();
11581
+ this.isCardFlipped = false;
11582
+ this.acbpConstants = NsCardContent$1.ACBPConst;
11583
+ this.showFlip = false;
11584
+ this.widgetType = 'df';
11585
+ this.widgetSubType = 'sdf';
11586
+ this.downloadCertificateLoading = false;
11587
+ this.langtranslations.languageSelectedObservable.subscribe((/**
11588
+ * @return {?}
11589
+ */
11590
+ function () {
11591
+ if (localStorage.getItem('websiteLanguage')) {
11592
+ _this.translate.setDefaultLang('en');
11593
+ /** @type {?} */
11594
+ var lang = (/** @type {?} */ (localStorage.getItem('websiteLanguage')));
11595
+ _this.translate.use(lang);
11596
+ }
11597
+ }));
11598
+ }
11599
+ /**
11600
+ * @return {?}
11601
+ */
11602
+ CardProgressPortraitLibComponent.prototype.ngOnInit = /**
11603
+ * @return {?}
11604
+ */
11605
+ function () {
11606
+ /** @type {?} */
11607
+ var instanceConfig = this.configSvc.instanceConfig;
11608
+ if (instanceConfig) {
11609
+ this.defaultThumbnail = instanceConfig.logos.defaultContent || '';
11610
+ this.sourceLogos = instanceConfig.sources;
11611
+ this.defaultSLogo = instanceConfig.logos.defaultSourceLogo || '';
11612
+ }
11613
+ else {
11614
+ this.defaultThumbnail = '/assets/instances/eagle/app_logos/default.png';
11615
+ this.defaultSLogo = '/assets/instances/eagle/app_logos/KarmayogiBharat_Logo.svg';
11616
+ }
11617
+ };
11618
+ /**
11619
+ * @return {?}
11620
+ */
11621
+ CardProgressPortraitLibComponent.prototype.showSnackbar = /**
11622
+ * @return {?}
11623
+ */
11624
+ function () {
11625
+ if (this.showIntranetContent) {
11626
+ this.snackBar.open('Content is only available in intranet', 'X', { duration: 2000 });
11627
+ }
11628
+ else if (!this.isLiveOrMarkForDeletion) {
11629
+ this.snackBar.open('Content may be expired or deleted', 'X', { duration: 2000 });
11630
+ }
11631
+ };
11632
+ /**
11633
+ * @param {?} contentData
11634
+ * @return {?}
11635
+ */
11636
+ CardProgressPortraitLibComponent.prototype.getRedirectUrlData = /**
11637
+ * @param {?} contentData
11638
+ * @return {?}
11639
+ */
11640
+ function (contentData) {
11641
+ // for telemetry
11642
+ if (this.widgetData && this.widgetData.context && this.widgetData.context.pageSection) {
11643
+ contentData['typeOfTelemetry'] = this.widgetData.context.pageSection;
11644
+ }
11645
+ this.contSvc.changeTelemetryData(contentData);
11646
+ // for redirection
11647
+ this.contentData.emit(contentData);
11648
+ };
11649
+ /**
11650
+ * @param {?} label
11651
+ * @param {?} type
11652
+ * @param {?=} subtype
11653
+ * @return {?}
11654
+ */
11655
+ CardProgressPortraitLibComponent.prototype.translateLabels = /**
11656
+ * @param {?} label
11657
+ * @param {?} type
11658
+ * @param {?=} subtype
11659
+ * @return {?}
11660
+ */
11661
+ function (label, type, subtype) {
11662
+ return this.langtranslations.translateLabelWithoutspace(label, type, subtype);
11663
+ };
11664
+ /**
11665
+ * @return {?}
11666
+ */
11667
+ CardProgressPortraitLibComponent.prototype.raiseTelemetry = /**
11668
+ * @return {?}
11669
+ */
11670
+ function () {
11671
+ this.events.raiseInteractTelemetry({
11672
+ type: 'click',
11673
+ subType: this.widgetType + "-" + this.widgetSubType,
11674
+ id: lodash.camelCase(this.widgetData.content.primaryCategory) + "-card",
11675
+ }, {
11676
+ id: this.widgetData.content.identifier,
11677
+ type: this.widgetData.content.primaryCategory,
11678
+ //context: this.widgetData.context,
11679
+ rollup: {},
11680
+ ver: "" + this.widgetData.content.version + '',
11681
+ }, {
11682
+ pageIdExt: lodash.camelCase(this.widgetData.content.primaryCategory) + "-card",
11683
+ module: lodash.camelCase(this.widgetData.content.primaryCategory),
11684
+ });
11685
+ };
11686
+ /**
11687
+ * @param {?} certificateData
11688
+ * @return {?}
11689
+ */
11690
+ CardProgressPortraitLibComponent.prototype.downloadCertificate = /**
11691
+ * @param {?} certificateData
11692
+ * @return {?}
11693
+ */
11694
+ function (certificateData) {
11695
+ var _this = this;
11696
+ this.events.raiseInteractTelemetry({
11697
+ type: utilsV2.WsEvents.EnumInteractTypes.CLICK,
11698
+ id: 'view-certificate',
11699
+ subType: utilsV2.WsEvents.EnumInteractSubTypes.CERTIFICATE,
11700
+ }, {
11701
+ id: certificateData.issuedCertificates[0].identifier,
11702
+ // id of the certificate
11703
+ type: utilsV2.WsEvents.EnumInteractSubTypes.CERTIFICATE,
11704
+ });
11705
+ if (certificateData.issuedCertificates.length > 0) {
11706
+ this.downloadCertificateLoading = true;
11707
+ /** @type {?} */
11708
+ var certData_1 = certificateData.issuedCertificates[0];
11709
+ this.certificateService.downloadCertificate_v2(certData_1.identifier).subscribe((/**
11710
+ * @param {?} res
11711
+ * @return {?}
11712
+ */
11713
+ function (res) {
11714
+ _this.downloadCertificateLoading = false;
11715
+ /** @type {?} */
11716
+ var cet = res.result.printUri;
11717
+ _this.dialog.open(CertificateDialogComponent, {
11718
+ width: '1300px',
11719
+ data: { cet: cet, certId: certData_1.identifier },
11720
+ });
11721
+ }));
11722
+ }
11723
+ else {
11724
+ this.downloadCertificateLoading = false;
11725
+ }
11726
+ };
11727
+ CardProgressPortraitLibComponent.decorators = [
11728
+ { type: core.Component, args: [{
11729
+ selector: 'sb-uic-card-progress-portrait-lib',
11730
+ template: "<ng-container *ngIf=\"!isCardLoading\">\n <mat-card class=\"card-portrait card-progress-portrait-lib cursor-pointer\" [ngClass]=\"widgetData?.cardCustomeClass ? widgetData?.cardCustomeClass : ''\" (click)=\"raiseTelemetry();getRedirectUrlData(widgetData?.content); $event.stopPropagation()\" >\n <div class=\"course_widget portrait_widget flex margin-bottom-xs\">\n <div class=\"flex flex-end flex-middle course_port\">\n <mat-icon class=\"mat-icon main_icon ws-mat-default-text margin-right-xs\">video_library</mat-icon>\n <sb-uic-display-content-type i18n-title title=\"Content Type\" *ngIf=\"widgetData?.content?.primaryCategory\"\n class=\"ws-mat-black60-text font-normal mat-caption \" [displayContentType]=\"widgetData?.content?.primaryCategory==='Course Unit'\n ?'Module'\n :widgetData?.content?.primaryCategory\">\n </sb-uic-display-content-type>\n </div>\n </div>\n <div class=\"flex\">\n <div class=\"margin-right-s\">\n <ng-container *ngIf=\"widgetData?.content?.posterImage\">\n <div class=\" img-block-portrait position-relative\">\n <img mat-card-image [src]=\"widgetData?.content?.posterImage | pipePublicURL\" loading=\"lazy\"\n class=\"card-image ws-mat-primary-lite-background margin-remove\" [wsUtilsDefaultThumbnail]=\"defaultThumbnail\"\n [alt]=\"widgetData?.content?.name\" />\n <div class=\"duration-box right-corner-portrait\" *ngIf=\"widgetData?.content?.duration > 0\">\n <mat-icon class=\"mat-icon main_icon mr-1\">access_time</mat-icon>\n <span class=\" ws-mat-white-text duration\">\n {{ (widgetData?.content?.duration || 120)| pipeDurationTransform: 'hms' }}\n </span>\n </div>\n <div class=\"duration-box right-corner-portrait\" *ngIf=\"widgetData?.content?.programDuration > 0\">\n <mat-icon class=\"mat-icon main_icon mr-1\">access_time</mat-icon>\n <span class=\" ws-mat-white-text duration\">\n {{widgetData?.content?.programDuration}} {{widgetData?.content?.programDuration === 1 ? 'day' : 'days'}}\n </span>\n </div>\n <ng-container *ngIf=\"cbPlanMapData && cbPlanMapData[widgetData?.content?.identifier]\">\n <ng-container [ngTemplateOutlet]=\"cbpPlan\" [ngTemplateOutletContext]=\"{data: {\n cbpData: cbPlanMapData[widgetData?.content?.identifier]\n }}\"></ng-container>\n </ng-container>\n </div>\n </ng-container>\n <ng-container *ngIf=\"!widgetData?.content?.posterImage\">\n <ng-container *ngIf=\"widgetData?.content?.appIcon; else defaultImg\">\n <img mat-card-image [src]=\"widgetData?.content?.appIcon | pipePublicURL\" loading=\"lazy\"\n class=\"card-image ws-mat-primary-lite-background margin-remove\" [wsUtilsDefaultThumbnail]=\"defaultThumbnail\"\n [alt]=\"widgetData?.content?.name\" />\n </ng-container>\n <ng-template #defaultImg>\n <img mat-card-image [src]=\"defaultThumbnail\" loading=\"lazy\"\n class=\"card-image ws-mat-primary-lite-background margin-remove\"\n [alt]=\"widgetData?.content?.name\" />\n </ng-template>\n </ng-container>\n </div>\n <div class=\"width-1-1\">\n <div [id]=\"'m-c-'+ widgetData?.content?.identifier\"\n class=\"portrait-subheading mat-subheading-2 title-text\">\n {{ widgetData?.content?.name }}\n </div>\n <div class=\"flex w-full flex-middle\">\n <div class=\"portrait_course_logo_box margin-right-xs\">\n <img [src]=\"widgetData?.content?.creatorLogo | pipePublicURL \" class=\"source-icon\" loading=\"lazy\" [wsUtilsDefaultThumbnail]=\"defaultSLogo\"\n [alt]=\"(widgetData?.content?.sourceName + '_' + widgetData?.content?.identifier)\" />\n </div>\n <span class=\"portrait-org-name font-normal mat-caption\">{{'cardcontentv2.by' | translate}} {{ (widgetData?.content?.organisation && widgetData?.content?.organisation[0]) ? widgetData?.content?.organisation[0] : 'Karmayogi Bharat' }}</span>\n </div>\n\n </div>\n </div>\n <ng-container *ngIf=\"widgetData?.content?.completionPercentage < 100\">\n <div class=\"flex flex-align-end progress-wrapper flex-between\" >\n <div class=\"progress-block\" >\n <div class=\"completed-time\">\n <mat-icon class=\"mat-icon schedule margin-right-xs\">schedule</mat-icon>\n <span>{{widgetData?.content?.completionPercentage}}%</span>\n </div>\n <div>\n <ng-container *ngIf=\"widgetData?.content?.completionStatus < 2\">\n <sb-uic-content-progress class=\"progress-bar-new\" [customClassName]=\"'course-progress-bar'\" *ngIf=\"widgetData?.content?.identifier\"\n [contentId]=\"widgetData?.content?.identifier\" [progress]=\"widgetData?.content?.completionPercentage\"\n [progressType]=\"'percentage'\">\n </sb-uic-content-progress>\n </ng-container>\n </div>\n </div>\n <div class=\"progress-btn\">\n <button class=\"resume-btn flex flex-middle flex-between\" [routerLink]=\"['/app/toc/',widgetData?.content?.identifier,'overview']\"\n [queryParams]=\"{primaryCategory: widgetData?.content?.primaryCategory}\" [state]=\"widgetData?.stateData\" \n [matTooltipPosition]=\"'below'\"\n [matTooltipDisabled]=\"(!widgetData?.content?.completionPercentage ? translateLabels('start', 'cardcontentv2') : translateLabels('resume', 'cardcontentv2')).length < 11\"\n matTooltip=\"{{!widgetData?.content?.completionPercentage ? translateLabels('start', 'cardcontentv2') : translateLabels('resume', 'cardcontentv2')}}\">\n <span class=\"textwrap margin-right-xs\">\n {{!widgetData?.content?.completionPercentage ? translateLabels('start', 'cardcontentv2') : translateLabels('resume', 'cardcontentv2')}}</span>\n <img class=\"stats-icon\" height=\"20\" width=\"20\" src=\"/assets/icons/home/play.svg\">\n </button>\n </div>\n </div>\n </ng-container>\n <ng-container *ngIf=\"widgetData?.content?.completionPercentage === 100\">\n <div class=\"flex flex-align-end progress-wrapper flex-end mt-1\">\n <div class=\"progress-btn\">\n <button class=\"resume-btn flex flex-middle flex-between view-btn\" [ngClass]=\"{'disable-btn': downloadCertificateLoading || widgetData?.content?.issuedCertificates?.length === 0}\" (click)=\"!downloadCertificateLoading && downloadCertificate(widgetData?.content);$event.stopPropagation()\" \n [matTooltipPosition]=\"'below'\"\n [matTooltipDisabled]=\"(translateLabels('viewCertificate', 'cardcontentv2')).length < 11\"\n matTooltip=\"{{'cardcontentv2.viewCertificate' | translate }}\">\n <span class=\"margin-right-xs textwrap\">{{'cardcontentv2.viewCertificate' | translate }}</span>\n <img class=\"stats-icon\" *ngIf=\"!downloadCertificateLoading\" height=\"20\" width=\"20\" src=\"/assets/icons/home/eye-white.svg\">\n <div class=\"center flex flex-middle\" *ngIf=\"downloadCertificateLoading\">\n <mat-spinner strokeWidth=\"2\" stroke=\"'red'\" class=\"white-spinner\" [diameter]=\"16\"></mat-spinner>\n </div>\n </button>\n </div>\n </div>\n </ng-container>\n </mat-card>\n</ng-container>\n\n\n<ng-template #cbpPlan let-data=\"data\">\n <div class=\"cbp-mark left-0 border-top-radius\">\n <p *ngIf=\"data.cbpData.planDuration === acbpConstants?.UPCOMING\" class=\"cbp-warning\">{{data.cbpData.endDate | date: 'd MMM, y'}}</p>\n <p *ngIf=\"data.cbpData.planDuration === acbpConstants?.SUCCESS\" class=\"cbp-success\">{{data.cbpData.endDate | date: 'd MMM, y'}}</p>\n <p *ngIf=\"data.cbpData.planDuration === acbpConstants?.OVERDUE\" class=\"cbp-danger\">{{'OverDue' }}</p>\n </div>\n</ng-template>\n\n<ng-container *ngIf=\"isCardLoading\">\n <mat-card class=\"card-portrait\" [ngClass]=\"widgetData.cardCustomeClass ? widgetData.cardCustomeClass : ''\">\n <div class=\"margin-bottom-xs\">\n <ng-container>\n <sb-uic-skeleton-loader [width]=\"'147px'\" [height]=\"'26px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </ng-container>\n </div>\n <div class=\"flex\">\n <div class=\"margin-right-s\">\n <ng-container>\n <sb-uic-skeleton-loader [width]=\"'147px'\" [height]=\"'98px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </ng-container>\n </div>\n <div class=\"width-1-1\">\n <div class=\"portrait-subheading title-text\">\n <sb-uic-skeleton-loader [bindingClass]=\"'flex rounded width-1-1'\"></sb-uic-skeleton-loader>\n </div>\n <div class=\"flex w-full flex-wrap flex-middle\">\n <div class=\" margin-right-xs\">\n <sb-uic-skeleton-loader [width]=\"'24px'\" [height]=\"'24px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </div>\n <span class=\"\"><sb-uic-skeleton-loader [width]=\"'133px'\" [height]=\"'12px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader></span>\n </div>\n <div class=\"portrait_widget flex margin-top-xs\">\n <div class=\"flex flex-end flex-middle\">\n <sb-uic-skeleton-loader [width]=\"'65px'\" [height]=\"'12px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </div>\n </div>\n </div>\n </div>\n <div class=\"flex flex-align-end progress-wrapper flex-between\">\n <div class=\"progress-block\">\n <div class=\"completed-time\">\n <sb-uic-skeleton-loader [width]=\"'211px'\" [height]=\"'16px'\" [bindingClass]=\"'flex rounded margin-top-xs md:w-211'\"></sb-uic-skeleton-loader>\n </div>\n </div>\n <div class=\"progress-btn\">\n <sb-uic-skeleton-loader [width]=\"'117px'\" [height]=\"'32px'\" [bindingClass]=\"'flex rounded margin-top-xs'\"></sb-uic-skeleton-loader>\n </div>\n </div>\n </mat-card>\n</ng-container>",
11731
+ styles: [".card-portrait{border-radius:12px;border:1px solid rgba(0,0,0,.08);opacity:1;width:318px;min-height:154px;padding:16px}.card-portrait .img-block-portrait{line-height:10px}.card-portrait .card-image{border-radius:8px;opacity:1;background-size:100%;width:147px;height:100px}.card-portrait .portrait-subheading{opacity:1;color:rgba(0,0,0,.87);font-weight:700;font-style:normal;letter-spacing:.25px;text-align:left;word-break:break-word;white-space:initial;margin:0 0 8px;position:relative;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;min-height:40px}.card-portrait .portrait_course_logo_box img{padding:3px;display:inline-block;width:24px;height:24px;border:1px solid #d6d6d6;border-radius:4px;box-sizing:border-box}.card-portrait span.portrait-org-name{width:75%;word-break:break-all;white-space:initial;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical}.card-portrait .portrait_widget{align-items:center;margin-top:0}.card-portrait .portrait_widget .course_port{border:1px solid #ef951e;padding:4px 8px;align-items:center;border-radius:16px}.card-portrait .portrait_widget .video-icon{opacity:1;color:#ef951e;width:15px;height:15px;font-size:15px}.card-portrait .portrait_widget .portrait-category{color:rgba(0,0,0,.6)!important;font-size:.75rem;opacity:1;font-family:Lato-Regular;font-weight:400;font-style:normal;letter-spacing:.25px;text-align:left;line-height:20px}.card-portrait .progress-wrapper .progress-block{width:60%}.card-portrait .progress-wrapper .progress-block .completed-time{color:#ef951e;display:flex;padding:8px 0}.card-portrait .progress-wrapper .progress-block .completed-time mat-icon{width:1rem;height:1rem;font-size:1rem}.card-portrait .progress-wrapper .progress-block .completed-time span{opacity:1;color:rgba(0,0,0,.87);font-family:Lato-Regular;font-size:.75rem;font-weight:400;font-style:normal;letter-spacing:.25px;text-align:left;line-height:16px}.card-portrait .progress-wrapper .progress-btn .resume-btn{opacity:1;color:#fff;font-family:Lato-Bold;font-size:14px;font-weight:700;font-style:normal;letter-spacing:.5px;text-align:left;line-height:20px;background:#1a4ca1;border-radius:63px;padding:6px 16px;border:none;width:100%;cursor:pointer}.card-portrait .progress-wrapper .progress-btn .resume-btn .textwrap{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:82px}.card-portrait .progress-wrapper .progress-btn .resume-btn:hover{background-color:#253379}.card-portrait .progress-bar-new{color:#ef951e!important;height:10px;border-radius:5px}.card-portrait .rating-session mat-icon{font-size:20px;height:20px;width:20px;color:#ef951e}.card-portrait .rating-session .rating-number{font-size:14px}.card-portrait .rating-session .most-enrolled-text{font-size:10px;font-weight:400;padding:4px;background:#ffea9e;border-radius:4px;line-height:12px}.card-portrait .right-corner-portrait{right:8px;bottom:8px}.course_widget{margin-top:10px}.course_widget .mat-icon{vertical-align:middle;color:#ef951e!important}.course_widget .course_v2{border:1px solid #ef951e;padding:4px 8px;align-items:end;border-radius:16px}.course_widget .main_icon{font-size:16px;width:16px;height:16px}.rating-session mat-icon{font-size:16px;height:16px;width:12px;padding-right:3px;color:#ef951e}.rating-session span{font-size:11px}.rating-session .most-enrolled-text{padding:0 8px;background:#ffea9e;border-radius:4px}.duration-box{background:#000;position:absolute;border:none;display:flex;align-items:center;padding:4px;border-radius:4px}.duration-box.right-corner{right:4px;bottom:4px}.duration-box .mat-icon{vertical-align:middle;color:#fff!important;height:14px!important;width:14px!important;font-size:14px}.duration-box .duration{font:700 12px/16px Lato;display:inline-block;margin:0;padding:0}"]
11732
+ }] }
11733
+ ];
11734
+ /** @nocollapse */
11735
+ CardProgressPortraitLibComponent.ctorParameters = function () { return [
11736
+ { type: material.MatSnackBar },
11737
+ { type: core$1.TranslateService },
11738
+ { type: utilsV2.EventService },
11739
+ { type: MultilingualTranslationsService },
11740
+ { type: utilsV2.ConfigurationsService },
11741
+ { type: WidgetContentService },
11742
+ { type: CertificateService },
11743
+ { type: material.MatDialog }
11744
+ ]; };
11745
+ CardProgressPortraitLibComponent.propDecorators = {
11746
+ widgetData: [{ type: core.Input }],
11747
+ isLiveOrMarkForDeletion: [{ type: core.Input }],
11748
+ showIntranetContent: [{ type: core.Input }],
11749
+ isIntranetAllowedSettings: [{ type: core.Input }],
11750
+ isCardLoading: [{ type: core.Input }],
11751
+ contentData: [{ type: core.Output }],
11752
+ cbPlanMapData: [{ type: core.Input }]
11753
+ };
11754
+ return CardProgressPortraitLibComponent;
11755
+ }());
11756
+ if (false) {
11757
+ /** @type {?} */
11758
+ CardProgressPortraitLibComponent.prototype.widgetData;
11759
+ /** @type {?} */
11760
+ CardProgressPortraitLibComponent.prototype.isLiveOrMarkForDeletion;
11761
+ /** @type {?} */
11762
+ CardProgressPortraitLibComponent.prototype.showIntranetContent;
11763
+ /** @type {?} */
11764
+ CardProgressPortraitLibComponent.prototype.isIntranetAllowedSettings;
11765
+ /** @type {?} */
11766
+ CardProgressPortraitLibComponent.prototype.isCardLoading;
11767
+ /** @type {?} */
11768
+ CardProgressPortraitLibComponent.prototype.contentData;
11769
+ /** @type {?} */
11770
+ CardProgressPortraitLibComponent.prototype.cbPlanMapData;
11771
+ /** @type {?} */
11772
+ CardProgressPortraitLibComponent.prototype.isCardFlipped;
11773
+ /** @type {?} */
11774
+ CardProgressPortraitLibComponent.prototype.acbpConstants;
11775
+ /** @type {?} */
11776
+ CardProgressPortraitLibComponent.prototype.defaultThumbnail;
11777
+ /** @type {?} */
11778
+ CardProgressPortraitLibComponent.prototype.sourceLogos;
11779
+ /** @type {?} */
11780
+ CardProgressPortraitLibComponent.prototype.defaultSLogo;
11781
+ /** @type {?} */
11782
+ CardProgressPortraitLibComponent.prototype.showFlip;
11783
+ /** @type {?} */
11784
+ CardProgressPortraitLibComponent.prototype.widgetType;
11785
+ /** @type {?} */
11786
+ CardProgressPortraitLibComponent.prototype.widgetSubType;
11787
+ /** @type {?} */
11788
+ CardProgressPortraitLibComponent.prototype.downloadCertificateLoading;
11789
+ /**
11790
+ * @type {?}
11791
+ * @private
11792
+ */
11793
+ CardProgressPortraitLibComponent.prototype.snackBar;
11794
+ /**
11795
+ * @type {?}
11796
+ * @private
11797
+ */
11798
+ CardProgressPortraitLibComponent.prototype.translate;
11799
+ /**
11800
+ * @type {?}
11801
+ * @private
11802
+ */
11803
+ CardProgressPortraitLibComponent.prototype.events;
11804
+ /**
11805
+ * @type {?}
11806
+ * @private
11807
+ */
11808
+ CardProgressPortraitLibComponent.prototype.langtranslations;
11809
+ /**
11810
+ * @type {?}
11811
+ * @private
11812
+ */
11813
+ CardProgressPortraitLibComponent.prototype.configSvc;
11814
+ /**
11815
+ * @type {?}
11816
+ * @private
11817
+ */
11818
+ CardProgressPortraitLibComponent.prototype.contSvc;
11819
+ /**
11820
+ * @type {?}
11821
+ * @private
11822
+ */
11823
+ CardProgressPortraitLibComponent.prototype.certificateService;
11824
+ /**
11825
+ * @type {?}
11826
+ * @private
11827
+ */
11828
+ CardProgressPortraitLibComponent.prototype.dialog;
11829
+ }
11830
+
11831
+ /**
11832
+ * @fileoverview added by tsickle
11833
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
11834
+ */
11835
+ var ContentProgressComponent = /** @class */ (function () {
11836
+ function ContentProgressComponent() {
11837
+ this.contentId = '';
11838
+ this.progress = 0;
11839
+ this.progressType = '';
11840
+ this.forPreview = false;
11841
+ this.className = '';
11842
+ this.customClassName = 'accent-progress';
11843
+ this.rendom = Math.random();
11844
+ this.id = "progress_" + Math.random();
11845
+ if (this.contentId) {
11846
+ this.id = this.contentId;
11847
+ }
11848
+ }
11849
+ /**
11850
+ * @return {?}
11851
+ */
11852
+ ContentProgressComponent.prototype.ngOnChanges = /**
11853
+ * @return {?}
11854
+ */
11855
+ function () {
11856
+ if (this.contentId && !this.progress && !this.forPreview) {
11857
+ // this.progressSvc.getProgressFor(this.contentId).subscribe(data => {
11858
+ // this.progress = data
11859
+ // if (this.progress) {
11860
+ // this.progress = Math.round(this.progress * 10000) / 100
11861
+ // }
11862
+ // })
11863
+ }
11864
+ if (this.progress) {
11865
+ if (this.progressType === 'percentage') {
11866
+ this.progress = this.progress;
11867
+ }
11868
+ else {
11869
+ this.progress = Math.round(this.progress * 10000) / 100;
11870
+ }
11871
+ }
11872
+ };
11873
+ ContentProgressComponent.decorators = [
11874
+ { type: core.Component, args: [{
11875
+ selector: 'sb-uic-content-progress',
11876
+ template: "<mat-progress-bar [mode]=\"'determinate'\" [matTooltip]=\"progress + ' %'\" [value]=\"progress\" class=\"new-w content-progress {{customClassName}}\"\n [attr.aria-labelledby]=\"'m-c-'+ contentId\" [ngClass]=\"{ 'visibility-0': progress === undefined, 'thick': className}\"\n i18n-aria-label> {{ progress }} % </mat-progress-bar>",
11877
+ /* tslint:disable */
11878
+ host: {
11879
+ // Sets the role for this component to "progressbar"
11880
+ role: 'progressbar',
11881
+ // Sets the minimum and maximum values for the progressbar role.
11882
+ 'aria-valuemin': '0',
11883
+ 'aria-valuemax': '100',
11884
+ 'title': 'progres',
11885
+ // Binding that updates the current value of the progressbar.
11886
+ '[attr.aria-valuenow]': 'progress',
11887
+ },
11888
+ styles: [".visibility-0{display:none}::ng-deep.mat-progress-bar.thick{height:10px}::ng-deep.theme-igot.day-mode .mat-progress-bar-fill::after{background:no-repeat padding-box #34d6a4}::ng-deep.theme-igot.day-mode .mat-progress-bar-background{fill:rgba(0,0,0,.001)!important}::ng-deep.theme-igot.day-mode .mat-progress-bar-buffer{background-color:rgba(0,0,0,.1)!important}::ng-deep .content-progress .mat-progress-bar-fill::after{background:#f69953!important}::ng-deep.theme-igot.day-mode .viewer-progress .mat-progress-bar-background{fill:rgba(0,0,0,.1)!important}::ng-deep.theme-igot.day-mode .viewer-progress .mat-progress-bar-buffer{background-color:rgba(0,0,0,.1)!important}::ng-deep.mat-progress-bar.viewer-progress{height:4px;border-radius:5px}"]
11889
+ }] }
11890
+ ];
11891
+ /** @nocollapse */
11892
+ ContentProgressComponent.ctorParameters = function () { return []; };
11893
+ ContentProgressComponent.propDecorators = {
11894
+ contentId: [{ type: core.Input }],
11895
+ progress: [{ type: core.Input }],
11896
+ progressType: [{ type: core.Input }],
11897
+ forPreview: [{ type: core.Input }],
11898
+ className: [{ type: core.Input }],
11899
+ customClassName: [{ type: core.Input }],
11900
+ id: [{ type: core.HostBinding, args: ['id',] }]
11901
+ };
11902
+ return ContentProgressComponent;
11903
+ }());
11904
+ if (false) {
11905
+ /** @type {?} */
11906
+ ContentProgressComponent.prototype.contentId;
11907
+ /** @type {?} */
11908
+ ContentProgressComponent.prototype.progress;
11909
+ /** @type {?} */
11910
+ ContentProgressComponent.prototype.progressType;
11911
+ /** @type {?} */
11912
+ ContentProgressComponent.prototype.forPreview;
11913
+ /** @type {?} */
11914
+ ContentProgressComponent.prototype.className;
11915
+ /** @type {?} */
11916
+ ContentProgressComponent.prototype.customClassName;
11917
+ /** @type {?} */
11918
+ ContentProgressComponent.prototype.rendom;
11919
+ /** @type {?} */
11920
+ ContentProgressComponent.prototype.id;
11921
+ }
11922
+
11923
+ /**
11924
+ * @fileoverview added by tsickle
11925
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
11926
+ */
11927
+ var ContentProgressModule = /** @class */ (function () {
11928
+ function ContentProgressModule() {
11929
+ }
11930
+ ContentProgressModule.decorators = [
11931
+ { type: core.NgModule, args: [{
11932
+ declarations: [ContentProgressComponent],
11933
+ imports: [
11934
+ common.CommonModule,
11935
+ material.MatProgressBarModule,
11936
+ material.MatTooltipModule,
11937
+ ],
11938
+ exports: [ContentProgressComponent],
11939
+ },] }
11940
+ ];
11941
+ return ContentProgressModule;
11942
+ }());
11943
+
11944
+ /**
11945
+ * @fileoverview added by tsickle
11946
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
11947
+ */
11948
+ var ɵ0$4 = HttpLoaderFactory;
11949
+ var DialogComponentsModule = /** @class */ (function () {
11950
+ function DialogComponentsModule() {
11951
+ }
11952
+ DialogComponentsModule.decorators = [
11953
+ { type: core.NgModule, args: [{
11954
+ declarations: [
11955
+ CertificateDialogComponent
11956
+ ],
11957
+ imports: [
11958
+ common.CommonModule,
11959
+ material.MatMenuModule,
11960
+ material.MatCardModule,
11961
+ material.MatIconModule,
11962
+ material.MatDialogModule,
11963
+ utilsV2.PipeSafeSanitizerModule,
11964
+ core$1.TranslateModule.forRoot({
11965
+ loader: {
11966
+ provide: core$1.TranslateLoader,
11967
+ useFactory: ɵ0$4,
11968
+ deps: [http.HttpClient],
11969
+ },
11970
+ }),
11971
+ ],
11972
+ exports: [
11973
+ CertificateDialogComponent
11974
+ ],
11975
+ entryComponents: [CertificateDialogComponent],
11976
+ },] }
11977
+ ];
11978
+ return DialogComponentsModule;
11979
+ }());
11980
+
11981
+ /**
11982
+ * @fileoverview added by tsickle
11983
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
11984
+ */
11985
+ var CardMdoChannelV1Component = /** @class */ (function () {
11986
+ function CardMdoChannelV1Component(events, translate, langtranslations, configSvc, contSvc, router) {
11987
+ var _this = this;
11988
+ this.events = events;
11989
+ this.translate = translate;
11990
+ this.langtranslations = langtranslations;
11991
+ this.configSvc = configSvc;
11992
+ this.contSvc = contSvc;
11993
+ this.router = router;
11994
+ this.channelData = new core.EventEmitter();
11995
+ this.emitTelemetry = new core.EventEmitter();
11996
+ this.widgetType = '';
11997
+ this.widgetSubType = '';
11998
+ this.langtranslations.languageSelectedObservable.subscribe((/**
11999
+ * @return {?}
12000
+ */
12001
+ function () {
12002
+ if (localStorage.getItem('websiteLanguage')) {
12003
+ _this.translate.setDefaultLang('en');
12004
+ /** @type {?} */
12005
+ var lang = (/** @type {?} */ (localStorage.getItem('websiteLanguage')));
12006
+ _this.translate.use(lang);
12007
+ }
12008
+ }));
12009
+ }
12010
+ /**
12011
+ * @return {?}
12012
+ */
12013
+ CardMdoChannelV1Component.prototype.ngOnInit = /**
12014
+ * @return {?}
12015
+ */
12016
+ function () {
12017
+ /** @type {?} */
12018
+ var instanceConfig = this.configSvc.instanceConfig;
12019
+ if (instanceConfig) {
12020
+ this.defaultThumbnail = instanceConfig.logos.defaultContent || '';
12021
+ this.sourceLogos = instanceConfig.sources;
12022
+ this.defaultSLogo = instanceConfig.logos.defaultSourceLogo || '';
12023
+ }
12024
+ else {
12025
+ this.defaultThumbnail = '/assets/instances/eagle/app_logos/default.png';
12026
+ this.defaultSLogo = '/assets/instances/eagle/app_logos/KarmayogiBharat_Logo.svg';
12027
+ }
12028
+ };
12029
+ /**
12030
+ * @param {?} contentData
12031
+ * @return {?}
12032
+ */
12033
+ CardMdoChannelV1Component.prototype.raiseTelemetry = /**
12034
+ * @param {?} contentData
12035
+ * @return {?}
12036
+ */
12037
+ function (contentData) {
12038
+ this.emitTelemetry.emit(contentData);
12039
+ if (this.widgetData) {
12040
+ contentData['typeOfTelemetry'] = 'mdo-channel';
12041
+ }
12042
+ this.contSvc.changeTelemetryData(contentData);
12043
+ };
12044
+ /**
12045
+ * @param {?} channeldata
12046
+ * @return {?}
12047
+ */
12048
+ CardMdoChannelV1Component.prototype.channelClick = /**
12049
+ * @param {?} channeldata
12050
+ * @return {?}
12051
+ */
12052
+ function (channeldata) {
12053
+ this.channelData.emit(channeldata);
12054
+ };
12055
+ /**
12056
+ * @param {?} content
12057
+ * @return {?}
12058
+ */
12059
+ CardMdoChannelV1Component.prototype.redirectTo = /**
12060
+ * @param {?} content
12061
+ * @return {?}
12062
+ */
12063
+ function (content) {
12064
+ this.router.navigate(["/app/learn/mdo-channels/" + content.orgName + "/" + content.identifier + "/micro-sites"]);
12065
+ };
12066
+ CardMdoChannelV1Component.decorators = [
12067
+ { type: core.Component, args: [{
12068
+ selector: 'sb-uic-card-mdo-channel-v1',
12069
+ template: "<mat-card class=\"channels-card card-channels-container mr-5 padding-remove cursor-pointer\">\n <div class=\"display-contents\">\n <ng-container *ngIf=\"widgetData?.content\">\n <a (click)=\"raiseTelemetry(widgetData?.content); redirectTo(widgetData?.content); $event.stopPropagation()\"\n i18n-aria-label>\n <ng-container>\n <mat-card-content class=\"min-top\">\n <div class=\"flex flex-col h-full\">\n <div class=\"image-container\">\n <ng-container *ngIf=\"widgetData?.content?.imgUrl; else defaultImg\">\n <img mat-card-image [src]=\"widgetData?.content?.imgUrl\" loading=\"lazy\"\n class=\"card-img ws-mat-primary-lite-background margin-remove\" [wsUtilsDefaultThumbnail]=\"defaultThumbnail\"\n [alt]=\"widgetData?.content?.orgName\" />\n </ng-container>\n <ng-template #defaultImg>\n <sb-uic-avatar-photo [randomColor]=\"true\" [name]=\"widgetData?.content?.orgName\" [photoUrl]=\"widgetData?.content?.imgUrl\" size=\"m-side-rating\">\n </sb-uic-avatar-photo>\n </ng-template>\n </div>\n <div class=\"flex title-container px-2\">\n <div [id]=\"'m-c-'+ widgetData?.content?.identifier\"\n class=\"flex-1 text-center mat-subheading-2 title-text ws-mat-black-text\">\n {{ widgetData?.content?.orgName }}\n </div>\n </div>\n </div>\n </mat-card-content>\n </ng-container>\n </a>\n </ng-container>\n </div>\n</mat-card>",
12070
+ styles: [".card-channels-container{position:relative;width:245px;box-sizing:border-box;box-shadow:0 10px 30px rgba(153,153,153,.2);overflow:hidden;min-height:156px;height:156px;max-height:156px;margin:20px 8px;background:#7faeff!important;border-radius:12px;padding:4px!important}.card-channels-container .min-top{background:inherit;margin-bottom:0;height:inherit}.card-channels-container .image-container{background-color:#fff;width:inherit;height:86px;max-height:86px;overflow:hidden;display:flex;align-items:center;justify-content:center;border-radius:12px}.card-channels-container .card-img{max-height:62px;min-height:62px;display:block;-o-object-fit:fill;object-fit:contain}.card-channels-container .mat-subheading-1{font:600 14px/24px Montserrat}.card-channels-container .title-container{background:inherit}.card-channels-container .description-text{position:relative;overflow:hidden;height:51px}.card-channels-container .title-text{word-break:break-all;white-space:initial;margin:8px 0;position:relative;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}"]
12071
+ }] }
12072
+ ];
12073
+ /** @nocollapse */
12074
+ CardMdoChannelV1Component.ctorParameters = function () { return [
12075
+ { type: utilsV2.EventService },
12076
+ { type: core$1.TranslateService },
12077
+ { type: utilsV2.MultilingualTranslationsService },
12078
+ { type: utilsV2.ConfigurationsService },
12079
+ { type: WidgetContentService },
12080
+ { type: router.Router }
12081
+ ]; };
12082
+ CardMdoChannelV1Component.propDecorators = {
12083
+ widgetData: [{ type: core.Input }],
12084
+ channelData: [{ type: core.Output }],
12085
+ emitTelemetry: [{ type: core.Output }]
12086
+ };
12087
+ return CardMdoChannelV1Component;
12088
+ }());
12089
+ if (false) {
12090
+ /** @type {?} */
12091
+ CardMdoChannelV1Component.prototype.widgetData;
12092
+ /** @type {?} */
12093
+ CardMdoChannelV1Component.prototype.channelData;
12094
+ /** @type {?} */
12095
+ CardMdoChannelV1Component.prototype.emitTelemetry;
12096
+ /** @type {?} */
12097
+ CardMdoChannelV1Component.prototype.defaultThumbnail;
12098
+ /** @type {?} */
12099
+ CardMdoChannelV1Component.prototype.sourceLogos;
12100
+ /** @type {?} */
12101
+ CardMdoChannelV1Component.prototype.defaultSLogo;
12102
+ /** @type {?} */
12103
+ CardMdoChannelV1Component.prototype.widgetType;
12104
+ /** @type {?} */
12105
+ CardMdoChannelV1Component.prototype.widgetSubType;
12106
+ /**
12107
+ * @type {?}
12108
+ * @private
12109
+ */
12110
+ CardMdoChannelV1Component.prototype.events;
12111
+ /**
12112
+ * @type {?}
12113
+ * @private
12114
+ */
12115
+ CardMdoChannelV1Component.prototype.translate;
12116
+ /**
12117
+ * @type {?}
12118
+ * @private
12119
+ */
12120
+ CardMdoChannelV1Component.prototype.langtranslations;
12121
+ /**
12122
+ * @type {?}
12123
+ * @private
12124
+ */
12125
+ CardMdoChannelV1Component.prototype.configSvc;
12126
+ /**
12127
+ * @type {?}
12128
+ * @private
12129
+ */
12130
+ CardMdoChannelV1Component.prototype.contSvc;
12131
+ /** @type {?} */
12132
+ CardMdoChannelV1Component.prototype.router;
12133
+ }
12134
+
12135
+ /**
12136
+ * @fileoverview added by tsickle
12137
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
12138
+ */
12139
+ var AvatarPhotoLibComponent = /** @class */ (function () {
11085
12140
  function AvatarPhotoLibComponent() {
11086
12141
  this.size = '';
11087
12142
  this.defaulfColor = '';
@@ -11280,6 +12335,7 @@
11280
12335
  * @fileoverview added by tsickle
11281
12336
  * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
11282
12337
  */
12338
+ var ɵ0$5 = HttpLoaderFactory;
11283
12339
  var CardsModule = /** @class */ (function () {
11284
12340
  function CardsModule() {
11285
12341
  }
@@ -11296,20 +12352,34 @@
11296
12352
  CardKarmaProgramsComponent,
11297
12353
  CardKarmaProgramsV2Component,
11298
12354
  CardPortraitExtComponent,
12355
+ CardAssessmentComponent,
12356
+ CardProgressPortraitLibComponent,
11299
12357
  CardMdoChannelV1Component
11300
12358
  ],
11301
12359
  imports: [
11302
12360
  common.CommonModule,
11303
12361
  material.MatCardModule,
11304
12362
  material.MatButtonModule,
12363
+ material.MatTooltipModule,
11305
12364
  material.MatIconModule,
11306
12365
  material.MatTooltipModule,
11307
12366
  router.RouterModule,
11308
12367
  PipePublicURLModule,
12368
+ ObjectToArrayPipeModule,
11309
12369
  DisplayContentTypeLibModule,
11310
12370
  DefaultThumbnailModule,
11311
12371
  PipeDurationTransformModule,
11312
12372
  SkeletonLoaderLibModule,
12373
+ material.MatProgressSpinnerModule,
12374
+ ContentProgressModule,
12375
+ DialogComponentsModule,
12376
+ core$1.TranslateModule.forRoot({
12377
+ loader: {
12378
+ provide: core$1.TranslateLoader,
12379
+ useFactory: ɵ0$5,
12380
+ deps: [http.HttpClient],
12381
+ },
12382
+ }),
11313
12383
  AvatarPhotoLibModule
11314
12384
  ],
11315
12385
  entryComponents: [CardsComponent],
@@ -11323,7 +12393,7 @@
11323
12393
  CardMDOChannelComponent,
11324
12394
  CardWideV2Component,
11325
12395
  CardKarmaProgramsComponent,
11326
- CardKarmaProgramsV2Component
12396
+ CardKarmaProgramsV2Component,
11327
12397
  ],
11328
12398
  },] }
11329
12399
  ];
@@ -12420,7 +13490,7 @@
12420
13490
  */
12421
13491
  /** @type {?} */
12422
13492
  var PROXY_SLAG_V8 = '/apis/proxies/v8';
12423
- var ɵ0$3 = /**
13493
+ var ɵ0$6 = /**
12424
13494
  * @param {?} contentId
12425
13495
  * @param {?} contentType
12426
13496
  * @param {?} userId
@@ -12428,7 +13498,7 @@
12428
13498
  */
12429
13499
  function (contentId, contentType, userId) {
12430
13500
  return PROXY_SLAG_V8 + "/ratings/v1/read/" + contentId + "/" + contentType + "/" + userId;
12431
- }, ɵ1$2 = /**
13501
+ }, ɵ1$3 = /**
12432
13502
  * @param {?} contentId
12433
13503
  * @param {?} contentType
12434
13504
  * @return {?}
@@ -12445,9 +13515,9 @@
12445
13515
  };
12446
13516
  /** @type {?} */
12447
13517
  var API_END_POINTS$3 = {
12448
- GET_RATING: (ɵ0$3),
13518
+ GET_RATING: (ɵ0$6),
12449
13519
  ADD_OR_UPDATE: PROXY_SLAG_V8 + "/ratings/v1/upsert",
12450
- GET_RATING_SUMMARY: (ɵ1$2),
13520
+ GET_RATING_SUMMARY: (ɵ1$3),
12451
13521
  GET_RATING_LOOKUP: PROXY_SLAG_V8 + "/ratings/v1/ratingLookUp",
12452
13522
  GET_AUTHOR_REPLY: (ɵ2$2),
12453
13523
  POST_AUTHOR_REPLY: PROXY_SLAG_V8 + "/ratings/v2/read",
@@ -13209,6 +14279,7 @@
13209
14279
  exports.ConsumptionComponent = ConsumptionComponent;
13210
14280
  exports.ConsumptionModule = ConsumptionModule;
13211
14281
  exports.ConsumptionService = ConsumptionService;
14282
+ exports.ContentProgressModule = ContentProgressModule;
13212
14283
  exports.ContentStripWithTabsLibModule = ContentStripWithTabsLibModule;
13213
14284
  exports.DataPointsModule = DataPointsModule;
13214
14285
  exports.HttpLoaderFactory = HttpLoaderFactory;
@@ -13225,32 +14296,40 @@
13225
14296
  exports.ɵbb = CardKarmaProgramsComponent;
13226
14297
  exports.ɵbc = CardKarmaProgramsV2Component;
13227
14298
  exports.ɵbd = CardPortraitExtComponent;
13228
- exports.ɵbe = CardMdoChannelV1Component;
13229
- exports.ɵbf = PipePublicURLModule;
13230
- exports.ɵbg = PipePublicURL;
13231
- exports.ɵbh = DisplayContentTypeLibModule;
13232
- exports.ɵbi = DisplayContentTypeLibComponent;
13233
- exports.ɵbj = DefaultThumbnailModule;
13234
- exports.ɵbk = DefaultThumbnailDirective;
13235
- exports.ɵbl = PipeDurationTransformModule;
13236
- exports.ɵbm = PipeDurationTransformPipe;
13237
- exports.ɵbn = AvatarPhotoLibModule;
13238
- exports.ɵbo = AvatarPhotoLibComponent;
13239
- exports.ɵbp = CompetencyPassbookComponent;
13240
- exports.ɵbq = CompetencyPassbookService;
13241
- exports.ɵbr = PillsModule;
13242
- exports.ɵbs = PillsComponent;
13243
- exports.ɵbt = CompetencyPassbookMdoComponent;
13244
- exports.ɵbu = CompetencyPassbookMdoService;
13245
- exports.ɵbv = UserContentRatingLibComponent;
13246
- exports.ɵbw = ScrollableItemDirective;
13247
- exports.ɵbx = RatingService;
13248
- exports.ɵby = UserContentRatingLibService;
13249
- exports.ɵbz = MyHammerConfig$1;
14299
+ exports.ɵbe = CardAssessmentComponent;
14300
+ exports.ɵbf = CardProgressPortraitLibComponent;
14301
+ exports.ɵbg = CertificateService;
14302
+ exports.ɵbh = CardMdoChannelV1Component;
14303
+ exports.ɵbi = PipePublicURLModule;
14304
+ exports.ɵbj = PipePublicURL;
14305
+ exports.ɵbk = ObjectToArrayPipeModule;
14306
+ exports.ɵbl = ObjectToArrayPipe;
14307
+ exports.ɵbm = DisplayContentTypeLibModule;
14308
+ exports.ɵbn = DisplayContentTypeLibComponent;
14309
+ exports.ɵbo = DefaultThumbnailModule;
14310
+ exports.ɵbp = DefaultThumbnailDirective;
14311
+ exports.ɵbq = PipeDurationTransformModule;
14312
+ exports.ɵbr = PipeDurationTransformPipe;
14313
+ exports.ɵbs = ContentProgressComponent;
14314
+ exports.ɵbt = DialogComponentsModule;
14315
+ exports.ɵbu = CertificateDialogComponent;
14316
+ exports.ɵbv = AvatarPhotoLibModule;
14317
+ exports.ɵbw = AvatarPhotoLibComponent;
14318
+ exports.ɵbx = CompetencyPassbookComponent;
14319
+ exports.ɵby = CompetencyPassbookService;
14320
+ exports.ɵbz = PillsModule;
13250
14321
  exports.ɵc = MultilingualTranslationsService;
13251
- exports.ɵca = SlidersNgContentLibModule;
13252
- exports.ɵcb = SlidersNgContentLibComponent;
13253
- exports.ɵcc = ScrollableItemModule;
14322
+ exports.ɵca = PillsComponent;
14323
+ exports.ɵcb = CompetencyPassbookMdoComponent;
14324
+ exports.ɵcc = CompetencyPassbookMdoService;
14325
+ exports.ɵcd = UserContentRatingLibComponent;
14326
+ exports.ɵce = ScrollableItemDirective;
14327
+ exports.ɵcf = RatingService;
14328
+ exports.ɵcg = UserContentRatingLibService;
14329
+ exports.ɵch = MyHammerConfig$1;
14330
+ exports.ɵci = SlidersNgContentLibModule;
14331
+ exports.ɵcj = SlidersNgContentLibComponent;
14332
+ exports.ɵck = ScrollableItemModule;
13254
14333
  exports.ɵd = ConfigurationsService;
13255
14334
  exports.ɵe = HorizontalScrollerV2Module;
13256
14335
  exports.ɵf = HorizontalScrollerV2Component;