@sunbird-cb/consumption 0.0.46 → 0.0.48
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.
- package/bundles/sunbird-cb-consumption.umd.js +287 -2511
- package/bundles/sunbird-cb-consumption.umd.js.map +1 -1
- package/bundles/sunbird-cb-consumption.umd.min.js +1 -1
- package/bundles/sunbird-cb-consumption.umd.min.js.map +1 -1
- package/esm2015/lib/_common/cards/card-assessment/card-assessment/card-assessment.component.js +25 -25
- package/esm2015/lib/_common/cards/card-landscape/card-landscape.component.js +2 -2
- package/esm2015/lib/_common/cards/card-mdo-channel/card-mdo-channel.component.js +7 -3
- package/esm2015/lib/_common/cards/card-mdo-channel-v1/card-mdo-channel-v1.component.js +7 -3
- package/esm2015/lib/_common/cards/card-portrait/card-portrait.component.js +2 -2
- package/esm2015/lib/_common/cards/card-portrait-ext/card-portrait-ext.component.js +2 -2
- package/esm2015/lib/_common/cards/card-progress-portrait-lib/card-progress-portrait-lib.component.js +2 -2
- package/esm2015/lib/_common/cards/cards.component.js +2 -2
- package/esm2015/lib/_common/cards/provider-card/provider-card.component.js +49 -136
- package/esm2015/lib/_common/content-strip-with-tabs-lib/content-strip-with-tabs-lib.component.js +97 -9
- package/esm2015/lib/_common/strips/content-strip-with-tabs-pills/content-strip-with-tabs-pills.component.js +42 -1223
- package/esm2015/lib/_common/strips/content-strip-with-tabs-pills/content-strip-with-tabs-pills.model.js +12 -12
- package/esm5/lib/_common/cards/card-assessment/card-assessment/card-assessment.component.js +27 -30
- package/esm5/lib/_common/cards/card-landscape/card-landscape.component.js +2 -2
- package/esm5/lib/_common/cards/card-mdo-channel/card-mdo-channel.component.js +7 -3
- package/esm5/lib/_common/cards/card-mdo-channel-v1/card-mdo-channel-v1.component.js +7 -3
- package/esm5/lib/_common/cards/card-portrait/card-portrait.component.js +2 -2
- package/esm5/lib/_common/cards/card-portrait-ext/card-portrait-ext.component.js +2 -2
- package/esm5/lib/_common/cards/card-progress-portrait-lib/card-progress-portrait-lib.component.js +2 -2
- package/esm5/lib/_common/cards/cards.component.js +2 -2
- package/esm5/lib/_common/cards/provider-card/provider-card.component.js +50 -137
- package/esm5/lib/_common/content-strip-with-tabs-lib/content-strip-with-tabs-lib.component.js +97 -10
- package/esm5/lib/_common/strips/content-strip-with-tabs-pills/content-strip-with-tabs-pills.component.js +111 -2338
- package/esm5/lib/_common/strips/content-strip-with-tabs-pills/content-strip-with-tabs-pills.model.js +12 -12
- package/fesm2015/sunbird-cb-consumption.js +288 -1462
- package/fesm2015/sunbird-cb-consumption.js.map +1 -1
- package/fesm5/sunbird-cb-consumption.js +287 -2511
- package/fesm5/sunbird-cb-consumption.js.map +1 -1
- package/lib/_common/cards/card-assessment/card-assessment/card-assessment.component.d.ts +4 -1
- package/lib/_common/cards/card-mdo-channel/card-mdo-channel.component.d.ts +1 -0
- package/lib/_common/cards/card-mdo-channel-v1/card-mdo-channel-v1.component.d.ts +1 -0
- package/lib/_common/cards/provider-card/provider-card.component.d.ts +9 -7
- package/lib/_common/strips/content-strip-with-tabs-pills/content-strip-with-tabs-pills.component.d.ts +17 -58
- package/lib/_common/strips/content-strip-with-tabs-pills/content-strip-with-tabs-pills.model.d.ts +2 -2
- package/package.json +1 -1
- package/sunbird-cb-consumption.metadata.json +1 -1
|
@@ -3731,9 +3731,15 @@ class ContentStripWithTabsLibComponent extends WidgetBaseComponent {
|
|
|
3731
3731
|
let tabResults = [];
|
|
3732
3732
|
/** @type {?} */
|
|
3733
3733
|
const queryParams = get(strip.request.enrollmentList, 'queryParams');
|
|
3734
|
+
// if (queryParams && queryParams.batchDetails) {
|
|
3735
|
+
// if (!queryParams.batchDetails.includes('&retiredCoursesEnabled=true')) {
|
|
3736
|
+
// queryParams.batchDetails += '&retiredCoursesEnabled=true'
|
|
3737
|
+
// }
|
|
3738
|
+
// }
|
|
3734
3739
|
if (this.configSvc.userProfile) {
|
|
3735
3740
|
userId = this.configSvc.userProfile.userId;
|
|
3736
3741
|
}
|
|
3742
|
+
// this.userSvc.resetTime('enrollmentService')
|
|
3737
3743
|
// tslint:disable-next-line: deprecation
|
|
3738
3744
|
this.userSvc.fetchUserBatchList(userId, queryParams).subscribe((/**
|
|
3739
3745
|
* @param {?} result
|
|
@@ -3861,14 +3867,55 @@ class ContentStripWithTabsLibComponent extends WidgetBaseComponent {
|
|
|
3861
3867
|
/** @type {?} */
|
|
3862
3868
|
const inprogress = [];
|
|
3863
3869
|
/** @type {?} */
|
|
3864
|
-
const completed = []
|
|
3870
|
+
const completed = []
|
|
3871
|
+
// array.forEach((e: any, idx: number, arr: any[]) => (customFilter(e, idx, arr) ? inprogress : completed).push(e))
|
|
3872
|
+
;
|
|
3873
|
+
// array.forEach((e: any, idx: number, arr: any[]) => (customFilter(e, idx, arr) ? inprogress : completed).push(e))
|
|
3865
3874
|
array.forEach((/**
|
|
3866
3875
|
* @param {?} e
|
|
3867
3876
|
* @param {?} idx
|
|
3868
3877
|
* @param {?} arr
|
|
3869
3878
|
* @return {?}
|
|
3870
3879
|
*/
|
|
3871
|
-
(e, idx, arr) =>
|
|
3880
|
+
(e, idx, arr) => {
|
|
3881
|
+
/** @type {?} */
|
|
3882
|
+
const status = e.status ? ((/** @type {?} */ (e.status))).toLowerCase() : '';
|
|
3883
|
+
/** @type {?} */
|
|
3884
|
+
const statusRetired = status === 'retired';
|
|
3885
|
+
if (customFilter(e, idx, arr)) {
|
|
3886
|
+
if (!statusRetired) {
|
|
3887
|
+
inprogress.push(e);
|
|
3888
|
+
}
|
|
3889
|
+
}
|
|
3890
|
+
else {
|
|
3891
|
+
completed.push(e);
|
|
3892
|
+
}
|
|
3893
|
+
}));
|
|
3894
|
+
// Sort the completed array with 'Live' status first and 'Retired' status second
|
|
3895
|
+
completed.sort((/**
|
|
3896
|
+
* @param {?} a
|
|
3897
|
+
* @param {?} b
|
|
3898
|
+
* @return {?}
|
|
3899
|
+
*/
|
|
3900
|
+
(a, b) => {
|
|
3901
|
+
/** @type {?} */
|
|
3902
|
+
const statusA = a.status ? a.status.toLowerCase() : '';
|
|
3903
|
+
/** @type {?} */
|
|
3904
|
+
const statusB = b.status ? b.status.toLowerCase() : '';
|
|
3905
|
+
if (statusA === 'live' && statusB !== 'live') {
|
|
3906
|
+
return -1;
|
|
3907
|
+
}
|
|
3908
|
+
if (statusA !== 'live' && statusB === 'live') {
|
|
3909
|
+
return 1;
|
|
3910
|
+
}
|
|
3911
|
+
if (statusA === 'retired' && statusB !== 'retired') {
|
|
3912
|
+
return 1;
|
|
3913
|
+
}
|
|
3914
|
+
if (statusA !== 'retired' && statusB === 'retired') {
|
|
3915
|
+
return -1;
|
|
3916
|
+
}
|
|
3917
|
+
return 0;
|
|
3918
|
+
}));
|
|
3872
3919
|
return [
|
|
3873
3920
|
{ value: 'inprogress', widgets: this.transformContentsToWidgets(inprogress, strip) },
|
|
3874
3921
|
{ value: 'completed', widgets: this.transformContentsToWidgets(completed, strip) }
|
|
@@ -3967,17 +4014,41 @@ class ContentStripWithTabsLibComponent extends WidgetBaseComponent {
|
|
|
3967
4014
|
this.enrollmentMapData = JSON.parse(localStorage.getItem('enrollmentMapData') || '{}');
|
|
3968
4015
|
/** @type {?} */
|
|
3969
4016
|
let filteredArray = [];
|
|
4017
|
+
/** @type {?} */
|
|
4018
|
+
let now = new Date().getTime();
|
|
3970
4019
|
content.forEach((/**
|
|
3971
4020
|
* @param {?} data
|
|
3972
4021
|
* @return {?}
|
|
3973
4022
|
*/
|
|
3974
4023
|
(data) => {
|
|
3975
4024
|
if (this.enrollmentMapData[data.identifier]) {
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
|
|
4025
|
+
if (this.enrollmentMapData[data.identifier].batch) {
|
|
4026
|
+
/** @type {?} */
|
|
4027
|
+
const enrollData = this.enrollmentMapData[data.identifier].batch;
|
|
4028
|
+
/** @type {?} */
|
|
4029
|
+
let endDateTime = new Date(`${(enrollData.endDate)}T${enrollData.endTime}`);
|
|
4030
|
+
/** @type {?} */
|
|
4031
|
+
let timeDuration = endDateTime.getTime() - now;
|
|
4032
|
+
if (timeDuration > 0) {
|
|
4033
|
+
data['batch'] = this.enrollmentMapData[data.identifier].batch;
|
|
4034
|
+
data['completionPercentage'] = this.enrollmentMapData[data.identifier].completionPercentage;
|
|
4035
|
+
filteredArray.push(data);
|
|
4036
|
+
}
|
|
4037
|
+
}
|
|
3979
4038
|
}
|
|
3980
4039
|
}));
|
|
4040
|
+
filteredArray = filteredArray.sort((/**
|
|
4041
|
+
* @param {?} a
|
|
4042
|
+
* @param {?} b
|
|
4043
|
+
* @return {?}
|
|
4044
|
+
*/
|
|
4045
|
+
(a, b) => {
|
|
4046
|
+
/** @type {?} */
|
|
4047
|
+
const dateA = new Date(a.batch.startDate || 0);
|
|
4048
|
+
/** @type {?} */
|
|
4049
|
+
const dateB = new Date(b.batch.startDate || 0);
|
|
4050
|
+
return dateB - dateA;
|
|
4051
|
+
}));
|
|
3981
4052
|
this.processStrip(strip, this.transformContentsToWidgets(filteredArray, strip), 'done', calculateParentStatus, viewMoreUrl);
|
|
3982
4053
|
clearInterval(this.enrollInterval);
|
|
3983
4054
|
}
|
|
@@ -5006,7 +5077,15 @@ class ContentStripWithTabsLibComponent extends WidgetBaseComponent {
|
|
|
5006
5077
|
*/
|
|
5007
5078
|
results => {
|
|
5008
5079
|
/** @type {?} */
|
|
5009
|
-
|
|
5080
|
+
let showViewMore;
|
|
5081
|
+
if (results.result.data) {
|
|
5082
|
+
showViewMore = Boolean(results.result.data && results.result.data.orgList.length > 5 && strip.stripConfig && strip.stripConfig.postCardForSearch);
|
|
5083
|
+
}
|
|
5084
|
+
else if (results.result.content) {
|
|
5085
|
+
/** @type {?} */
|
|
5086
|
+
let featuredProvider = JSON.parse(results.result.content.featuredProviders || '[]');
|
|
5087
|
+
showViewMore = Boolean(featuredProvider && featuredProvider.length > 5 && strip.stripConfig && strip.stripConfig.postCardForSearch);
|
|
5088
|
+
}
|
|
5010
5089
|
/** @type {?} */
|
|
5011
5090
|
const viewMoreUrl = showViewMore
|
|
5012
5091
|
? {
|
|
@@ -5052,6 +5131,9 @@ class ContentStripWithTabsLibComponent extends WidgetBaseComponent {
|
|
|
5052
5131
|
formedUrl = apiUrl.replace('<playlistKey>', this.providerId + id);
|
|
5053
5132
|
formedUrl = formedUrl.replace('<orgID>', this.providerId);
|
|
5054
5133
|
}
|
|
5134
|
+
else if (apiUrl.indexOf('<doId>') >= 0) {
|
|
5135
|
+
formedUrl = apiUrl.replace('<doId>', this.environment.providerDataKey);
|
|
5136
|
+
}
|
|
5055
5137
|
return formedUrl;
|
|
5056
5138
|
}
|
|
5057
5139
|
/**
|
|
@@ -5211,7 +5293,14 @@ class ContentStripWithTabsLibComponent extends WidgetBaseComponent {
|
|
|
5211
5293
|
if (response && response.results.result.content) {
|
|
5212
5294
|
/** @type {?} */
|
|
5213
5295
|
let content = response.results.result.content;
|
|
5214
|
-
|
|
5296
|
+
if (strip.key === 'providers') {
|
|
5297
|
+
/** @type {?} */
|
|
5298
|
+
let featuredProviders = JSON.parse(content.featuredProviders || '[]');
|
|
5299
|
+
this.processStrip(strip, this.transformAllContentsToWidgets(featuredProviders, strip), 'done', calculateParentStatus, response);
|
|
5300
|
+
}
|
|
5301
|
+
else {
|
|
5302
|
+
this.processStrip(strip, this.transformAllContentsToWidgets(content, strip), 'done', calculateParentStatus, response);
|
|
5303
|
+
}
|
|
5215
5304
|
}
|
|
5216
5305
|
else {
|
|
5217
5306
|
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
@@ -5234,7 +5323,6 @@ class ContentStripWithTabsLibComponent extends WidgetBaseComponent {
|
|
|
5234
5323
|
fetchCiosContentData(strip, calculateParentStatus = true) {
|
|
5235
5324
|
return __awaiter(this, void 0, void 0, function* () {
|
|
5236
5325
|
if (strip.request && strip.request.ciosContent && Object.keys(strip.request.ciosContent).length) {
|
|
5237
|
-
debugger;
|
|
5238
5326
|
/** @type {?} */
|
|
5239
5327
|
let originalFilters = [];
|
|
5240
5328
|
if (strip.request &&
|
|
@@ -7698,7 +7786,7 @@ class CardsComponent extends WidgetBaseComponent {
|
|
|
7698
7786
|
CardsComponent.decorators = [
|
|
7699
7787
|
{ type: Component, args: [{
|
|
7700
7788
|
selector: 'sb-uic-cards',
|
|
7701
|
-
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-providers-lib'\" [ngTemplateOutlet]=\"cardProvider\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-portrait-ext-lib-skeleton'\" [ngTemplateOutlet]=\"cardPortraitExtLibSkeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-portrait-ext-lib'\" [ngTemplateOutlet]=\"cardPortraitExtLib\"></ng-container>\n\n </ng-container>\n</div>\n\n<ng-template #cardPortraitLibSkeleton>\n <sb-uic-card-portrait [widgetData]=\"widgetData\" [isCardLoading]=\"true\"></sb-uic-card-portrait>\n</ng-template>\n<ng-template #cardPortraitLib>\n <sb-uic-card-portrait \n [cbPlanMapData]=\"cbPlanMapData\"\n (contentData)=\"getRedirectUrlData($event)\" [widgetData]=\"widgetData\" [isCardLoading]=\"false\"></sb-uic-card-portrait>\n</ng-template>\n<ng-template #cardLandscapeLibSkeleton>\n <sb-uic-card-landscape [widgetData]=\"widgetData\" \n [cbPlanMapData]=\"cbPlanMapData\" [isCardLoading]=\"true\"></sb-uic-card-landscape>\n</ng-template>\n<ng-template #cardLandscapeLib>\n <sb-uic-card-landscape\n (contentData)=\"getRedirectUrlData($event)\"\n (triggerTelemetry)=\"raiseCardClick($event)\"\n [widgetData]=\"widgetData\"\n [cbPlanMapData]=\"cbPlanMapData\"\n [isCardLoading]=\"false\">\n </sb-uic-card-landscape>\n</ng-template>\n\n<ng-template #cardWideLib>\n <sb-uic-card-wide (contentData)=\"getRedirectUrlData($event)\" [widgetData]=\"widgetData\"></sb-uic-card-wide>\n</ng-template>\n<ng-template #cardWideLibSkeleton>\n <sb-uic-card-wide [widgetData]=\"widgetData\"></sb-uic-card-wide>\n</ng-template>\n\n<ng-template #cardWideV2Skeleton>\n <sb-uic-card-wide-v2 [widgetData]=\"widgetData\" [isCardLoading]=\"true\" ></sb-uic-card-wide-v2>\n</ng-template>\n<ng-template #cardWideV2>\n <sb-uic-card-wide-v2\n (contentData)=\"getRedirectUrlData($event)\"\n (triggerTelemetry)=\"raiseCardClick($event)\"\n [cbPlanMapData]=\"cbPlanMapData\"\n [isCardLoading]=\"false\"\n [widgetData]=\"widgetData\">\n </sb-uic-card-wide-v2>\n</ng-template>\n\n<ng-template #cardUser>\n <sb-uic-card-user [widgetData]=\"widgetData\"></sb-uic-card-user>\n</ng-template>\n<ng-template #cardMdoHome>\n <sb-uic-card-mdo-channel-v1 [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<ng-template #cardProvider>\n <sb-uic-provider-card ></sb-uic-provider-card>\n</ng-template>\n\n<!-- cios card -->\n<ng-template #cardPortraitExtLibSkeleton>\n <sb-uic-card-portrait-ext [widgetData]=\"widgetData\" [isCardLoading]=\"true\"></sb-uic-card-portrait-ext>\n</ng-template>\n<ng-template #cardPortraitExtLib>\n <sb-uic-card-portrait-ext \n [cbPlanMapData]=\"cbPlanMapData\"\n (contentData)=\"getRedirectUrlData($event)\" [widgetData]=\"widgetData\" [isCardLoading]=\"false\"></sb-uic-card-portrait-ext>\n</ng-template>\n",
|
|
7789
|
+
template: "<div class=\"widget-card-content-new\">\n <ng-container *ngIf=\"widgetData && (((widgetData?.deletedMode || 'none') === 'hide' && !!!isLiveOrMarkForDeletion)\n ? false\n : !((widgetData?.intranetMode || 'none') === 'hide' && !!showIntranetContent))\"\n [ngSwitch]=\"( (widgetData && widgetData?.cardSubType) || 'cardPortraitLib')\">\n <ng-container *ngSwitchDefault [ngTemplateOutlet]=\"cardPortraitLib\"></ng-container>\n <ng-container *ngSwitchCase=\"'user-card'\" [ngTemplateOutlet]=\"cardUser\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-portrait-lib-skeleton'\" [ngTemplateOutlet]=\"cardPortraitLibSkeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-portrait-lib'\" [ngTemplateOutlet]=\"cardPortraitLib\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-landscape-lib-skeleton'\" [ngTemplateOutlet]=\"cardLandscapeLibSkeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-landscape-lib'\" [ngTemplateOutlet]=\"cardLandscapeLib\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-wide-lib-skeleton'\" [ngTemplateOutlet]=\"cardWideLibSkeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-wide-lib'\" [ngTemplateOutlet]=\"cardWideLib\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-wide-v2'\" [ngTemplateOutlet]=\"cardWideV2\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-wide-v2-skeleton'\" [ngTemplateOutlet]=\"cardWideV2Skeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-mdo-lib'\" [ngTemplateOutlet]=\"cardMdo\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-mdo-home-lib'\" [ngTemplateOutlet]=\"cardMdoHome\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-mdo-home-lib-skeleton'\" [ngTemplateOutlet]=\"cardMdoHomeSkeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-mdo-lib-skeleton'\" [ngTemplateOutlet]=\"cardMdoSkeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-scheduled-assessment'\" [ngTemplateOutlet]=\"cardScheduledAssessment\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-scheduled-assessment-skeleton'\" [ngTemplateOutlet]=\"cardScheduledAssessmentSkelton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-karma-program-lib'\" [ngTemplateOutlet]=\"cardKarmaProgram\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-karma-program-lib-skeleton'\" [ngTemplateOutlet]=\"cardKarmaProgramSkeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-progress-portrait-lib'\" [ngTemplateOutlet]=\"cardProgressLib\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-progress-portrait-lib-skeleton'\" [ngTemplateOutlet]=\"cardProgressLibSkeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-karma-program-lib-v2'\" [ngTemplateOutlet]=\"cardKarmaProgramV2\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-karma-program-lib-v2-skeleton'\" [ngTemplateOutlet]=\"cardKarmaProgramV2\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-providers-lib'\" [ngTemplateOutlet]=\"cardProvider\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-providers-lib-skeleton'\" [ngTemplateOutlet]=\"cardProviderSkeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-portrait-ext-lib-skeleton'\" [ngTemplateOutlet]=\"cardPortraitExtLibSkeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-portrait-ext-lib'\" [ngTemplateOutlet]=\"cardPortraitExtLib\"></ng-container>\n\n </ng-container>\n</div>\n\n<ng-template #cardPortraitLibSkeleton>\n <sb-uic-card-portrait [widgetData]=\"widgetData\" [isCardLoading]=\"true\"></sb-uic-card-portrait>\n</ng-template>\n<ng-template #cardPortraitLib>\n <sb-uic-card-portrait \n [cbPlanMapData]=\"cbPlanMapData\"\n (contentData)=\"getRedirectUrlData($event)\" [widgetData]=\"widgetData\" [isCardLoading]=\"false\"></sb-uic-card-portrait>\n</ng-template>\n<ng-template #cardLandscapeLibSkeleton>\n <sb-uic-card-landscape [widgetData]=\"widgetData\" \n [cbPlanMapData]=\"cbPlanMapData\" [isCardLoading]=\"true\"></sb-uic-card-landscape>\n</ng-template>\n<ng-template #cardLandscapeLib>\n <sb-uic-card-landscape\n (contentData)=\"getRedirectUrlData($event)\"\n (triggerTelemetry)=\"raiseCardClick($event)\"\n [widgetData]=\"widgetData\"\n [cbPlanMapData]=\"cbPlanMapData\"\n [isCardLoading]=\"false\">\n </sb-uic-card-landscape>\n</ng-template>\n\n<ng-template #cardWideLib>\n <sb-uic-card-wide (contentData)=\"getRedirectUrlData($event)\" [widgetData]=\"widgetData\"></sb-uic-card-wide>\n</ng-template>\n<ng-template #cardWideLibSkeleton>\n <sb-uic-card-wide [widgetData]=\"widgetData\"></sb-uic-card-wide>\n</ng-template>\n\n<ng-template #cardWideV2Skeleton>\n <sb-uic-card-wide-v2 [widgetData]=\"widgetData\" [isCardLoading]=\"true\" ></sb-uic-card-wide-v2>\n</ng-template>\n<ng-template #cardWideV2>\n <sb-uic-card-wide-v2\n (contentData)=\"getRedirectUrlData($event)\"\n (triggerTelemetry)=\"raiseCardClick($event)\"\n [cbPlanMapData]=\"cbPlanMapData\"\n [isCardLoading]=\"false\"\n [widgetData]=\"widgetData\">\n </sb-uic-card-wide-v2>\n</ng-template>\n\n<ng-template #cardUser>\n <sb-uic-card-user [widgetData]=\"widgetData\"></sb-uic-card-user>\n</ng-template>\n<ng-template #cardMdoHome>\n <sb-uic-card-mdo-channel-v1 [isCardLoading]=\"false\" [widgetData]=\"widgetData\"></sb-uic-card-mdo-channel-v1>\n</ng-template>\n<ng-template #cardMdoHomeSkeleton>\n <sb-uic-card-mdo-channel-v1 [isCardLoading]=\"true\" [widgetData]=\"widgetData\"></sb-uic-card-mdo-channel-v1>\n</ng-template>\n<ng-template #cardMdo>\n <sb-uic-card-mdo-channel [isCardLoading]=\"true\" [widgetData]=\"widgetData\"></sb-uic-card-mdo-channel>\n</ng-template>\n<ng-template #cardMdoSkeleton>\n <sb-uic-card-mdo-channel [isCardLoading]=\"true\" [widgetData]=\"widgetData\"></sb-uic-card-mdo-channel>\n</ng-template>\n<ng-template #cardKarmaProgramSkeleton>\n <sb-uic-card-karma-programs [randomColorApply]=\"true\" \n [isCardLoading]=\"true\" [widgetData]=\"widgetData\"></sb-uic-card-karma-programs>\n</ng-template>\n<ng-template #cardKarmaProgram>\n <sb-uic-card-karma-programs [randomColorApply]=\"true\" \n [isCardLoading]=\"false\" [widgetData]=\"widgetData\"></sb-uic-card-karma-programs>\n</ng-template>\n<ng-template #cardScheduledAssessmentSkelton>\n <sb-uic-card-assessment [widgetData]=\"widgetData\" [isCardLoading]=\"true\"></sb-uic-card-assessment>\n</ng-template>\n<ng-template #cardScheduledAssessment>\n <sb-uic-card-assessment [widgetData]=\"widgetData\" (contentData)=\"getRedirectUrlData($event)\" [isCardLoading]=\"false\" [enrollmentMapData]=\"enrollmentMapData\"></sb-uic-card-assessment>\n</ng-template>\n<ng-template #cardProgressLibSkeleton>\n <sb-uic-card-progress-portrait-lib \n [isCardLoading]=\"true\" [widgetData]=\"widgetData\"></sb-uic-card-progress-portrait-lib>\n</ng-template>\n<ng-template #cardProgressLib>\n <sb-uic-card-progress-portrait-lib \n [isCardLoading]=\"false\" (contentData)=\"getRedirectUrlData($event)\" [widgetData]=\"widgetData\"></sb-uic-card-progress-portrait-lib>\n</ng-template>\n<ng-template #cardKarmaProgramV2>\n <!-- <sb-uic-card-karma-programs-v2 [widgetData]=\"widgetData\"><sb-uic-card-karma-programs-v2> -->\n</ng-template>\n<ng-template #cardProvider>\n <sb-uic-provider-card [isCardLoading]=\"false\" [widgetData]=\"widgetData\"></sb-uic-provider-card>\n</ng-template>\n<ng-template #cardProviderSkeleton>\n <sb-uic-provider-card [isCardLoading]=\"true\" [widgetData]=\"widgetData\"></sb-uic-provider-card>\n</ng-template>\n\n<!-- cios card -->\n<ng-template #cardPortraitExtLibSkeleton>\n <sb-uic-card-portrait-ext [widgetData]=\"widgetData\" [isCardLoading]=\"true\"></sb-uic-card-portrait-ext>\n</ng-template>\n<ng-template #cardPortraitExtLib>\n <sb-uic-card-portrait-ext \n [cbPlanMapData]=\"cbPlanMapData\"\n (contentData)=\"getRedirectUrlData($event)\" [widgetData]=\"widgetData\" [isCardLoading]=\"false\"></sb-uic-card-portrait-ext>\n</ng-template>\n",
|
|
7702
7790
|
styles: [""]
|
|
7703
7791
|
}] }
|
|
7704
7792
|
];
|
|
@@ -7853,7 +7941,7 @@ class CardPortraitComponent {
|
|
|
7853
7941
|
CardPortraitComponent.decorators = [
|
|
7854
7942
|
{ type: Component, args: [{
|
|
7855
7943
|
selector: 'sb-uic-card-portrait',
|
|
7856
|
-
template: "<ng-container *ngIf=\"!isCardLoading\">\n <mat-card class=\"card-standard-container mr-5 padding-remove cursor-pointer {{widgetData?.cardCustomeClass}}\" [ngClass]=\"{\n greyOut:\n widgetData.deletedMode === 'greyOut' && !isLiveOrMarkForDeletion\n ? true\n : widgetData?.intranetMode === 'greyOut' && showIntranetContent\n }\" (click)=\"(showIntranetContent || !isLiveOrMarkForDeletion) && showSnackbar()\">\n <div class=\"display-contents\" [ngClass]=\"{\n disableClick:\n widgetData.deletedMode === 'greyOut' && !isLiveOrMarkForDeletion\n ? true\n : widgetData?.intranetMode === 'greyOut' && showIntranetContent\n }\">\n <ng-container *ngIf=\"widgetData.content\">\n <a (click)=\"getRedirectUrlData(widgetData?.content); $event.stopPropagation()\"\n role=\"link\" i18n-aria-label>\n <ng-container *ngIf=\"!isCardFlipped\">\n <div class=\"status-danger\" role=\"note\" i18n-aria-label aria-label=\"Content expired or deleted\" i18n-matTooltip\n matTooltip=\"Content may be expired or deleted\" *ngIf=\"!isLiveOrMarkForDeletion\"></div>\n <div class=\"status-danger\" role=\"note\" i18n-aria-label aria-label=\"Intranet content\" i18n-matTooltip\n matTooltip=\"Available only in Company's network\"\n *ngIf=\"widgetData?.intranetMode === 'greyOut' && showIntranetContent\"></div>\n <button *ngIf=\"showFlip\" class=\"detail-button ws-mat-primary-lite-background-op30\" mat-icon-button\n (click)=\"isCardFlipped = true\" aria-label=\"Details\" i18n-aria-label=\"Details | Click to see details\">\n <mat-icon>flip_to_back</mat-icon>\n </button>\n <mat-card-content class=\"min-top\">\n <div style=\"position: relative; z-index: 1;\">\n <ng-container *ngIf=\"widgetData.content.posterImage\">\n <img mat-card-image [src]=\"widgetData.content.posterImage | pipePublicURL\" loading=\"lazy\"\n class=\"card-img ws-mat-primary-lite-background margin-remove\" [wsUtilsDefaultThumbnail]=\"defaultThumbnail\"\n [alt]=\"widgetData.content.name\" />\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-img 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-img ws-mat-primary-lite-background margin-remove\"\n [alt]=\"widgetData.content.name\" />\n </ng-template>\n </ng-container>\n <div class=\"source-div\" style=\"display: none;\">\n <img [src]=\"widgetData.content.creatorLogo\" class=\"source-icon\" [wsUtilsDefaultThumbnail]=\"defaultSLogo\"\n [alt]=\"(widgetData.content.sourceName + '_' + widgetData.content.identifier)\" />\n </div>\n <ng-container *ngIf=\"widgetData?.content?.cbPlanEndDate\">\n <div class=\"cbp-mark\">\n <span>{{widgetData?.content?.cbPlanEndDate | date: 'd MMM, y'}}</span>\n </div>\n </ng-container>\n <!-- <ng-container *ngIf=\"widgetData?.content?.endDate\">\n <div class=\"cbp-mark\">\n <p *ngIf=\"widgetData?.content?.planDuration === acbpConstants?.UPCOMING\" class=\"cbp-warning\">{{widgetData?.content?.endDate | date: 'd MMM, y'}}</p>\n <p *ngIf=\"widgetData?.content?.planDuration === acbpConstants?.SUCCESS\" class=\"cbp-success\">{{widgetData?.content?.endDate | date: 'd MMM, y'}}</p>\n <p *ngIf=\"widgetData?.content?.planDuration === acbpConstants?.OVERDUE\" class=\"cbp-danger\">Over due</p>\n </div>\n </ng-container> -->\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 class=\"duration-box right-corner\" *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\" *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 </div>\n <div class=\"padding-m\">\n <div class=\"course_widget flex margin-remove\">\n <div class=\"flex flex-end course_v2\">\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\n </sb-uic-display-content-type>\n </div>\n </div>\n <div [id]=\"'m-c-'+ widgetData.content?.identifier\"\n class=\"mat-subheading-1 title-text ws-mat-text-block-fade-gradient\">\n {{ widgetData.content.name }}\n </div>\n <div class=\"flex w-full flex-wrap flex-middle\">\n <div class=\"course_logo_box\">\n <img [src]=\"widgetData.content.creatorLogo | pipePublicURL \" class=\"source-icon\" [wsUtilsDefaultThumbnail]=\"defaultSLogo\"\n [alt]=\"(widgetData.content.sourceName + '_' + widgetData.content.identifier)\" />\n </div>\n <!-- <span class=\"org-text\">{{'cardcontentv2.by' | translate}} -->\n <span class=\"org-text\">By {{ (widgetData?.content?.organisation && widgetData?.content?.organisation[0]) ? widgetData?.content?.organisation[0] : 'Karmayogi Bharat' }}</span>\n </div>\n <div class=\"flex flex-middle rating-session margin-top-m\">\n <div class=\"flex flex-middle\" *ngIf=\"widgetData?.content?.avgRating\">\n <mat-icon class=\"mr-1\">star</mat-icon>\n <span>{{widgetData.content.avgRating}}</span>\n </div>\n <!-- <span class=\"most-enrolled-text margin-left-m\">{{ 'cardcontentv2.mostEnrolled' | translate }}</span> -->\n <ng-container *ngIf=\"widgetData?.content?.additionalTags && widgetData?.content?.additionalTags.includes('mostEnrolled')\">\n <span class=\"most-enrolled-text margin-left-xs\">\n <!-- {{ 'cardcontentv2.mostEnrolled' | translate }} -->\n </span>\n </ng-container>\n <ng-container *ngIf=\"widgetData?.content?.additionalTags && widgetData?.content?.additionalTags.includes('mostTrending')\">\n <span class=\"most-enrolled-text margin-left-xs\">\n <!-- {{ 'cardcontentv2.mostTrending' | translate }} -->\n </span>\n </ng-container>\n </div>\n </div>\n </mat-card-content>\n </ng-container>\n <ng-container *ngIf=\"isCardFlipped\">\n <div class=\"flex items-center\">\n <!-- <h2 class=\"mat-subheading-2 flex-1 min-w-0 margin-remove-bottom\" i18n>{{'cardcontentv2.reason' | translate}}</h2> -->\n <button mat-icon-button (click)=\"isCardFlipped = false\">\n <mat-icon>close</mat-icon>\n </button>\n </div>\n <p class=\"text-justify mat-body-1\">\n {{ widgetData.content.reason }}\n </p>\n </ng-container>\n </a>\n </ng-container>\n </div>\n</mat-card>\n</ng-container>\n\n<ng-container *ngIf=\"isCardLoading\">\n <mat-card class=\"card-standard-container mr-5 padding-remove\" >\n <div class=\"display-contents\" >\n <ng-container *ngIf=\"!isCardFlipped\">\n <mat-card-content class=\"min-top\">\n <div style=\"position: relative; z-index: 1;\">\n <ng-container>\n <sb-uic-skeleton-loader [width]=\"'100%'\" [height]=\"'140px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </ng-container>\n </div>\n <div class=\"padding-m\">\n <div class=\"course_widget flex margin-remove\">\n <div class=\"flex flex-end\">\n <sb-uic-skeleton-loader [width]=\"'65px'\" [height]=\"'16px'\" [bindingClass]=\"'flex rounded br-8'\"></sb-uic-skeleton-loader>\n </div>\n </div>\n <div class=\"mat-subheading-1 title-text ws-mat-text-block-fade-gradient\">\n <sb-uic-skeleton-loader [width]=\"'100%'\" [height]=\"'16px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n <sb-uic-skeleton-loader [width]=\"'111px'\" [height]=\"'16px'\" [bindingClass]=\"'flex rounded margin-top-s'\"></sb-uic-skeleton-loader>\n </div>\n <div class=\"flex w-full flex-wrap flex-middle margin-top-m\">\n <div class=\"\">\n <sb-uic-skeleton-loader [width]=\"'28px'\" [height]=\"'28px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </div>\n <span class=\"org-text\"> <sb-uic-skeleton-loader [width]=\"'111px'\" [height]=\"'16px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader></span>\n </div>\n <div class=\"flex flex-middle rating-session margin-top-m\">\n <div class=\"flex flex-middle\">\n <sb-uic-skeleton-loader [width]=\"'45px'\" [height]=\"'12px'\" [bindingClass]=\"'flex rounded margin-top-m'\"></sb-uic-skeleton-loader>\n </div>\n </div>\n </div>\n </mat-card-content>\n </ng-container>\n </div>\n </mat-card>\n</ng-container>\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>",
|
|
7944
|
+
template: "<ng-container *ngIf=\"!isCardLoading\">\n <mat-card class=\"card-standard-container mr-5 padding-remove cursor-pointer {{widgetData?.cardCustomeClass}}\" [ngClass]=\"{\n greyOut:\n widgetData.deletedMode === 'greyOut' && !isLiveOrMarkForDeletion\n ? true\n : widgetData?.intranetMode === 'greyOut' && showIntranetContent\n }\" (click)=\"(showIntranetContent || !isLiveOrMarkForDeletion) && showSnackbar()\">\n <div class=\"display-contents\" [ngClass]=\"{\n disableClick:\n widgetData.deletedMode === 'greyOut' && !isLiveOrMarkForDeletion\n ? true\n : widgetData?.intranetMode === 'greyOut' && showIntranetContent\n }\">\n <ng-container *ngIf=\"widgetData.content\">\n <a (click)=\"getRedirectUrlData(widgetData?.content); $event.stopPropagation()\"\n role=\"link\" i18n-aria-label>\n <ng-container *ngIf=\"!isCardFlipped\">\n <div class=\"status-danger\" role=\"note\" i18n-aria-label aria-label=\"Content expired or deleted\" i18n-matTooltip\n matTooltip=\"Content may be expired or deleted\" *ngIf=\"!isLiveOrMarkForDeletion\"></div>\n <div class=\"status-danger\" role=\"note\" i18n-aria-label aria-label=\"Intranet content\" i18n-matTooltip\n matTooltip=\"Available only in Company's network\"\n *ngIf=\"widgetData?.intranetMode === 'greyOut' && showIntranetContent\"></div>\n <button *ngIf=\"showFlip\" class=\"detail-button ws-mat-primary-lite-background-op30\" mat-icon-button\n (click)=\"isCardFlipped = true\" aria-label=\"Details\" i18n-aria-label=\"Details | Click to see details\">\n <mat-icon>flip_to_back</mat-icon>\n </button>\n <mat-card-content class=\"min-top\">\n <div style=\"position: relative; z-index: 1;\">\n <ng-container *ngIf=\"widgetData.content.posterImage\">\n <img mat-card-image [src]=\"widgetData.content.posterImage | pipePublicURL\" loading=\"lazy\"\n class=\"card-img ws-mat-primary-lite-background margin-remove\" [wsUtilsDefaultThumbnail]=\"defaultThumbnail\"\n [alt]=\"widgetData.content.name\" />\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-img 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-img ws-mat-primary-lite-background margin-remove\"\n [alt]=\"widgetData.content.name\" />\n </ng-template>\n </ng-container>\n <div class=\"source-div\" style=\"display: none;\">\n <img [src]=\"widgetData.content.creatorLogo\" class=\"source-icon\" [wsUtilsDefaultThumbnail]=\"defaultSLogo\"\n [alt]=\"(widgetData.content.sourceName + '_' + widgetData.content.identifier)\" />\n </div>\n <ng-container *ngIf=\"widgetData?.content?.cbPlanEndDate\">\n <div class=\"cbp-mark\">\n <span>{{widgetData?.content?.cbPlanEndDate | date: 'd MMM, y'}}</span>\n </div>\n </ng-container>\n <!-- <ng-container *ngIf=\"widgetData?.content?.endDate\">\n <div class=\"cbp-mark\">\n <p *ngIf=\"widgetData?.content?.planDuration === acbpConstants?.UPCOMING\" class=\"cbp-warning\">{{widgetData?.content?.endDate | date: 'd MMM, y'}}</p>\n <p *ngIf=\"widgetData?.content?.planDuration === acbpConstants?.SUCCESS\" class=\"cbp-success\">{{widgetData?.content?.endDate | date: 'd MMM, y'}}</p>\n <p *ngIf=\"widgetData?.content?.planDuration === acbpConstants?.OVERDUE\" class=\"cbp-danger\">Over due</p>\n </div>\n </ng-container> -->\n <ng-container *ngIf=\"cbPlanMapData && cbPlanMapData[widgetData?.content?.identifier] && cbPlanMapData[widgetData?.content?.identifier]?.contentStatus < 2\">\n <ng-container [ngTemplateOutlet]=\"cbpPlan\" [ngTemplateOutletContext]=\"{data: {\n cbpData: cbPlanMapData[widgetData?.content?.identifier]\n }}\"></ng-container>\n </ng-container>\n <div class=\"duration-box right-corner\" *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\" *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 </div>\n <div class=\"padding-m\">\n <div class=\"course_widget flex margin-remove\">\n <div class=\"flex flex-end course_v2\">\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\n </sb-uic-display-content-type>\n </div>\n </div>\n <div [id]=\"'m-c-'+ widgetData.content?.identifier\"\n class=\"mat-subheading-1 title-text ws-mat-text-block-fade-gradient\">\n {{ widgetData.content.name }}\n </div>\n <div class=\"flex w-full flex-wrap flex-middle\">\n <div class=\"course_logo_box\">\n <img [src]=\"widgetData.content.creatorLogo | pipePublicURL \" class=\"source-icon\" [wsUtilsDefaultThumbnail]=\"defaultSLogo\"\n [alt]=\"(widgetData.content.sourceName + '_' + widgetData.content.identifier)\" />\n </div>\n <!-- <span class=\"org-text\">{{'cardcontentv2.by' | translate}} -->\n <span class=\"org-text\">By {{ (widgetData?.content?.organisation && widgetData?.content?.organisation[0]) ? widgetData?.content?.organisation[0] : 'Karmayogi Bharat' }}</span>\n </div>\n <div class=\"flex flex-middle rating-session margin-top-m\">\n <div class=\"flex flex-middle\" *ngIf=\"widgetData?.content?.avgRating\">\n <mat-icon class=\"mr-1\">star</mat-icon>\n <span>{{widgetData.content.avgRating}}</span>\n </div>\n <!-- <span class=\"most-enrolled-text margin-left-m\">{{ 'cardcontentv2.mostEnrolled' | translate }}</span> -->\n <ng-container *ngIf=\"widgetData?.content?.additionalTags && widgetData?.content?.additionalTags.includes('mostEnrolled')\">\n <span class=\"most-enrolled-text margin-left-xs\">\n <!-- {{ 'cardcontentv2.mostEnrolled' | translate }} -->\n </span>\n </ng-container>\n <ng-container *ngIf=\"widgetData?.content?.additionalTags && widgetData?.content?.additionalTags.includes('mostTrending')\">\n <span class=\"most-enrolled-text margin-left-xs\">\n <!-- {{ 'cardcontentv2.mostTrending' | translate }} -->\n </span>\n </ng-container>\n </div>\n </div>\n </mat-card-content>\n </ng-container>\n <ng-container *ngIf=\"isCardFlipped\">\n <div class=\"flex items-center\">\n <!-- <h2 class=\"mat-subheading-2 flex-1 min-w-0 margin-remove-bottom\" i18n>{{'cardcontentv2.reason' | translate}}</h2> -->\n <button mat-icon-button (click)=\"isCardFlipped = false\">\n <mat-icon>close</mat-icon>\n </button>\n </div>\n <p class=\"text-justify mat-body-1\">\n {{ widgetData.content.reason }}\n </p>\n </ng-container>\n </a>\n </ng-container>\n </div>\n</mat-card>\n</ng-container>\n\n<ng-container *ngIf=\"isCardLoading\">\n <mat-card class=\"card-standard-container mr-5 padding-remove\" >\n <div class=\"display-contents\" >\n <ng-container *ngIf=\"!isCardFlipped\">\n <mat-card-content class=\"min-top\">\n <div style=\"position: relative; z-index: 1;\">\n <ng-container>\n <sb-uic-skeleton-loader [width]=\"'100%'\" [height]=\"'140px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </ng-container>\n </div>\n <div class=\"padding-m\">\n <div class=\"course_widget flex margin-remove\">\n <div class=\"flex flex-end\">\n <sb-uic-skeleton-loader [width]=\"'65px'\" [height]=\"'16px'\" [bindingClass]=\"'flex rounded br-8'\"></sb-uic-skeleton-loader>\n </div>\n </div>\n <div class=\"mat-subheading-1 title-text ws-mat-text-block-fade-gradient\">\n <sb-uic-skeleton-loader [width]=\"'100%'\" [height]=\"'16px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n <sb-uic-skeleton-loader [width]=\"'111px'\" [height]=\"'16px'\" [bindingClass]=\"'flex rounded margin-top-s'\"></sb-uic-skeleton-loader>\n </div>\n <div class=\"flex w-full flex-wrap flex-middle margin-top-m\">\n <div class=\"\">\n <sb-uic-skeleton-loader [width]=\"'28px'\" [height]=\"'28px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </div>\n <span class=\"org-text\"> <sb-uic-skeleton-loader [width]=\"'111px'\" [height]=\"'16px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader></span>\n </div>\n <div class=\"flex flex-middle rating-session margin-top-m\">\n <div class=\"flex flex-middle\">\n <sb-uic-skeleton-loader [width]=\"'45px'\" [height]=\"'12px'\" [bindingClass]=\"'flex rounded margin-top-m'\"></sb-uic-skeleton-loader>\n </div>\n </div>\n </div>\n </mat-card-content>\n </ng-container>\n </div>\n </mat-card>\n</ng-container>\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>",
|
|
7857
7945
|
styles: [".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}.card-standard-container{position:relative;width:245px;min-height:346px;border-radius:8px;box-sizing:border-box;box-shadow:0 10px 30px rgba(153,153,153,.2);overflow:hidden;height:346px;margin:20px 8px}.card-standard-container .progress-bar{width:101%;margin-left:-15px;display:flex;margin-top:0;background:bisque;position:absolute;bottom:0}.card-standard-container ::ng-deep .mat-progress-bar{height:8px!important}.card-standard-container .icon_text{font-size:12px;line-height:16px;text-transform:uppercase}.card-standard-container .course_logo_box{width:38px;height:38px;background:#fff;border-radius:8px;box-sizing:border-box;box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12)}.card-standard-container .course_logo_box img{height:28px;width:28px;padding:5px;display:inline-block}.card-standard-container .course_logo_box p{display:inline-block;vertical-align:top}.card-standard-container .org-text{font-size:12px;font-weight:400;width:75%;padding-left:10px;word-break:break-all;white-space:initial;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical}.card-standard-container .source-div{position:relative;top:100px;background:#fff;z-index:3;border:1px solid #dedfe0;min-width:72px;min-height:72px;max-width:72px;max-height:72px;display:flex;border-radius:8px}.card-standard-container .source-div .source-icon{border-radius:8px;display:block;margin:auto;max-width:58px;max-height:-webkit-fill-available}.card-standard-container mat-card-content{background:#fff}.card-standard-container .card-img{min-width:245px;max-height:140px;min-height:140px;display:block;-o-object-fit:fill;object-fit:fill;border-top-left-radius:8px;border-top-right-radius:8px;width:100%}.card-standard-container .mat-subheading-1{font:600 14px/24px Montserrat}.card-standard-container .complexity{padding-top:70px;display:flex;font-size:14px;line-height:21px;padding-bottom:10px}.card-standard-container .complexity .mode-tag{border-radius:5px;order:2;margin-left:auto;color:#fff;font-size:10px}.card-standard-container .complexity .duration{display:flex;margin-left:auto;order:3;font-weight:700}.card-standard-container .complexity .time-text{margin:0 5px 0 6px;font-weight:700}.card-standard-container .basic{margin:auto 0}.card-standard-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;min-height:48px}.card-standard-container .description-text{position:relative;overflow:hidden;height:42px;white-space:normal;text-overflow:ellipsis}.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}.width-238{width:238px!important}.cbp-mark{border-radius:12px 0;opacity:1;background-image:linear-gradient(90deg,rgba(0,0,0,.6) 0,rgba(0,0,0,0) 100%);position:absolute;top:0;padding:8px}.cbp-mark p{opacity:1;background-color:#fff;padding:4px;opacity:1;color:#1b2133;font-family:Lato-Regular;font-size:10px;font-weight:400;font-style:Regular;letter-spacing:.5px;text-align:left;line-height:12px;margin-bottom:0}.cbpwidth{width:340px}.cbp-plan{border-radius:4px;opacity:1;background-color:#1b4ca1;top:4px;left:4px;opacity:1;color:rgba(255,255,255,.95);font-family:Lato-Bold;font-size:12px;font-weight:700;font-style:normal;letter-spacing:.25px;text-align:center;line-height:16px;padding:4px}.cbp-info{opacity:1;color:#fff;font-family:Lato-Regular;font-size:10px;font-weight:400;font-style:normal;letter-spacing:.5px;text-align:left;line-height:12px;padding:2px}.cbp-danger{border-radius:2px;border:1px solid rgba(0,0,0,.08);background-color:#d13924!important;color:#fff!important;opacity:1}.cbp-success{border-radius:2px;border:1px solid #1d8922;background-color:#1d8922!important;color:#fff!important;opacity:1}.cbp-warning{border-radius:2px;border:1px solid #ef951e;background-color:#ef951e!important;color:#fff!important;opacity:1}"]
|
|
7858
7946
|
}] }
|
|
7859
7947
|
];
|
|
@@ -8547,7 +8635,7 @@ class CardLandscapeComponent {
|
|
|
8547
8635
|
CardLandscapeComponent.decorators = [
|
|
8548
8636
|
{ type: Component, args: [{
|
|
8549
8637
|
selector: 'sb-uic-card-landscape',
|
|
8550
|
-
template: "<ng-container *ngIf=\"!isCardLoading\">\n <a class=\"cursor-pointer\" (click)=\"raiseTelemetry(widgetData?.content);getRedirectUrlData(widgetData?.content); $event.stopPropagation()\" \n role=\"link\" i18n-aria-label>\n <mat-card class=\"card-portrait mr-2 card-portrait-clickable min-height-remove\" [ngClass]=\"widgetData.cardCustomeClass ? widgetData.cardCustomeClass : ''\">\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 \" [useTranslation]=\"false\" [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\">By {{ (widgetData.content.organisation && widgetData.content.organisation[0]) ? widgetData.content.organisation[0] : 'Karmayogi Bharat' }}</span>\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 class=\"flex flex-middle rating-session margin-top-xs\">\n <div class=\"flex flex-middle\" *ngIf=\"widgetData?.content?.avgRating\">\n <mat-icon class=\"mr-1\">star</mat-icon>\n <span>{{widgetData.content.avgRating}}</span>\n </div>\n <!-- <ng-container *ngIf=\"widgetData?.content?.additionalTags && widgetData?.content?.additionalTags.includes('mostEnrolled')\">\n <span class=\"most-enrolled-text margin-left-xs\">{{ 'cardcontentv2.mostEnrolled' | translate }}</span>\n </ng-container>\n <ng-container *ngIf=\"widgetData?.content?.additionalTags && widgetData?.content?.additionalTags.includes('mostTrending')\">\n <span class=\"most-enrolled-text margin-left-xs\">{{ 'cardcontentv2.mostTrending' | translate }}</span>\n </ng-container> -->\n </div>\n </div>\n </div>\n </mat-card>\n </a>\n</ng-container>\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 mr-2 card-portrait-clickable\" [ngClass]=\"widgetData.cardCustomeClass ? widgetData.cardCustomeClass : ''\">\n <div class=\"flex\">\n <div class=\"margin-right-s\">\n <ng-container>\n <sb-uic-skeleton-loader [width]=\"'147px'\" [height]=\"'100px'\" [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 <sb-uic-skeleton-loader [width]=\"'24px'\" [height]=\"'24px'\" [bindingClass]=\"'flex rounded margin-right-xs'\"></sb-uic-skeleton-loader>\n <sb-uic-skeleton-loader [width]=\"'100px'\" [height]=\"'12px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\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 </mat-card>\n</ng-container>",
|
|
8638
|
+
template: "<ng-container *ngIf=\"!isCardLoading\">\n <a class=\"cursor-pointer\" (click)=\"raiseTelemetry(widgetData?.content);getRedirectUrlData(widgetData?.content); $event.stopPropagation()\" \n role=\"link\" i18n-aria-label>\n <mat-card class=\"card-portrait mr-2 card-portrait-clickable min-height-remove\" [ngClass]=\"widgetData.cardCustomeClass ? widgetData.cardCustomeClass : ''\">\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 \" [useTranslation]=\"false\" [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] && cbPlanMapData[widgetData?.content?.identifier]?.contentStatus < 2\">\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\">By {{ (widgetData.content.organisation && widgetData.content.organisation[0]) ? widgetData.content.organisation[0] : 'Karmayogi Bharat' }}</span>\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 class=\"flex flex-middle rating-session margin-top-xs\">\n <div class=\"flex flex-middle\" *ngIf=\"widgetData?.content?.avgRating\">\n <mat-icon class=\"mr-1\">star</mat-icon>\n <span>{{widgetData.content.avgRating}}</span>\n </div>\n <!-- <ng-container *ngIf=\"widgetData?.content?.additionalTags && widgetData?.content?.additionalTags.includes('mostEnrolled')\">\n <span class=\"most-enrolled-text margin-left-xs\">{{ 'cardcontentv2.mostEnrolled' | translate }}</span>\n </ng-container>\n <ng-container *ngIf=\"widgetData?.content?.additionalTags && widgetData?.content?.additionalTags.includes('mostTrending')\">\n <span class=\"most-enrolled-text margin-left-xs\">{{ 'cardcontentv2.mostTrending' | translate }}</span>\n </ng-container> -->\n </div>\n </div>\n </div>\n </mat-card>\n </a>\n</ng-container>\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 mr-2 card-portrait-clickable\" [ngClass]=\"widgetData.cardCustomeClass ? widgetData.cardCustomeClass : ''\">\n <div class=\"flex\">\n <div class=\"margin-right-s\">\n <ng-container>\n <sb-uic-skeleton-loader [width]=\"'147px'\" [height]=\"'100px'\" [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 <sb-uic-skeleton-loader [width]=\"'24px'\" [height]=\"'24px'\" [bindingClass]=\"'flex rounded margin-right-xs'\"></sb-uic-skeleton-loader>\n <sb-uic-skeleton-loader [width]=\"'100px'\" [height]=\"'12px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\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 </mat-card>\n</ng-container>",
|
|
8551
8639
|
styles: [".card-portrait{border-radius:12px;border:1px solid rgba(0,0,0,.08);opacity:1;width:350px;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}.card-portrait-clickable{min-height:146px!important}.card-portrait-clickable .right-corner-portrait{right:8px;bottom:8px}.card-portrait-clickable:hover{transform:scale(1.02)}.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}@media only screen and (max-width:768px){.card-portrait{width:calc(100vw - 66px)}.card-wide-v2{min-height:356px}.card-wide-v2 .imageholder img{border-radius:12px 12px 0 0!important}.cbpwidth{width:calc(100vw - 100px)}}.cbp-mark{border-radius:12px 0;opacity:1;background-image:linear-gradient(90deg,rgba(0,0,0,.6) 0,rgba(0,0,0,0) 100%);position:absolute;top:0;padding:8px}.cbp-mark p{opacity:1;background-color:#fff;padding:4px;opacity:1;color:#1b2133;font-family:Lato-Regular;font-size:10px;font-weight:400;font-style:Regular;letter-spacing:.5px;text-align:left;line-height:12px;margin-bottom:0}.cbpwidth{width:340px}.cbp-plan{border-radius:4px;opacity:1;background-color:#1b4ca1;top:4px;left:4px;opacity:1;color:rgba(255,255,255,.95);font-family:Lato-Bold;font-size:12px;font-weight:700;font-style:normal;letter-spacing:.25px;text-align:center;line-height:16px;padding:4px}.cbp-info{opacity:1;color:#fff;font-family:Lato-Regular;font-size:10px;font-weight:400;font-style:normal;letter-spacing:.5px;text-align:left;line-height:12px;padding:2px}.cbp-danger{border-radius:2px;border:1px solid rgba(0,0,0,.08);background-color:#d13924!important;color:#fff!important;opacity:1}.cbp-success{border-radius:2px;border:1px solid #1d8922;background-color:#1d8922!important;color:#fff!important;opacity:1}.cbp-warning{border-radius:2px;border:1px solid #ef951e;background-color:#ef951e!important;color:#fff!important;opacity:1}"]
|
|
8552
8640
|
}] }
|
|
8553
8641
|
];
|
|
@@ -8812,6 +8900,7 @@ class CardMDOChannelComponent {
|
|
|
8812
8900
|
this.router = router;
|
|
8813
8901
|
this.channelData = new EventEmitter();
|
|
8814
8902
|
this.emitTelemetry = new EventEmitter();
|
|
8903
|
+
this.isCardLoading = false;
|
|
8815
8904
|
this.widgetType = '';
|
|
8816
8905
|
this.widgetSubType = '';
|
|
8817
8906
|
this.langtranslations.languageSelectedObservable.subscribe((/**
|
|
@@ -8871,7 +8960,7 @@ class CardMDOChannelComponent {
|
|
|
8871
8960
|
CardMDOChannelComponent.decorators = [
|
|
8872
8961
|
{ type: Component, args: [{
|
|
8873
8962
|
selector: 'sb-uic-card-mdo-channel',
|
|
8874
|
-
template: "<mat-card class=\"channels-card card-channels-container mr-5 padding-remove cursor-pointer\">\n
|
|
8963
|
+
template: "<ng-container *ngIf=\"!isCardLoading\">\n <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>\n</ng-container>\n\n<ng-container *ngIf=\"isCardLoading\">\n <mat-card class=\"channels-card card-channels-container mr-5 padding-remove cursor-pointer\">\n <div class=\"display-contents\">\n <ng-container >\n <a 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 <sb-uic-skeleton-loader [width]=\"'100%'\" [height]=\"'140px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\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>\n</ng-container>",
|
|
8875
8964
|
styles: [".card-channels-container{position:relative;width:282px;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}@media screen and (max-width:768px){.card-channels-container{width:100%;margin:0}}"]
|
|
8876
8965
|
}] }
|
|
8877
8966
|
];
|
|
@@ -8887,7 +8976,8 @@ CardMDOChannelComponent.ctorParameters = () => [
|
|
|
8887
8976
|
CardMDOChannelComponent.propDecorators = {
|
|
8888
8977
|
widgetData: [{ type: Input }],
|
|
8889
8978
|
channelData: [{ type: Output }],
|
|
8890
|
-
emitTelemetry: [{ type: Output }]
|
|
8979
|
+
emitTelemetry: [{ type: Output }],
|
|
8980
|
+
isCardLoading: [{ type: Input }]
|
|
8891
8981
|
};
|
|
8892
8982
|
if (false) {
|
|
8893
8983
|
/** @type {?} */
|
|
@@ -8897,6 +8987,8 @@ if (false) {
|
|
|
8897
8987
|
/** @type {?} */
|
|
8898
8988
|
CardMDOChannelComponent.prototype.emitTelemetry;
|
|
8899
8989
|
/** @type {?} */
|
|
8990
|
+
CardMDOChannelComponent.prototype.isCardLoading;
|
|
8991
|
+
/** @type {?} */
|
|
8900
8992
|
CardMDOChannelComponent.prototype.defaultThumbnail;
|
|
8901
8993
|
/** @type {?} */
|
|
8902
8994
|
CardMDOChannelComponent.prototype.sourceLogos;
|
|
@@ -9440,134 +9532,13 @@ if (false) {
|
|
|
9440
9532
|
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
9441
9533
|
*/
|
|
9442
9534
|
class ProviderCardComponent {
|
|
9443
|
-
|
|
9444
|
-
|
|
9445
|
-
|
|
9446
|
-
|
|
9447
|
-
|
|
9448
|
-
|
|
9449
|
-
|
|
9450
|
-
{
|
|
9451
|
-
name: 'Department for Promotion of Industry and Internal Trade',
|
|
9452
|
-
link: 'https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/Department for Promotion of Industry and Internal Trade/all-CBP',
|
|
9453
|
-
logo: 'assets/icons/top-providers/0d400bdf-4ad8-45bf-914c-be44018c2d07.png'
|
|
9454
|
-
},
|
|
9455
|
-
{
|
|
9456
|
-
name: 'RAKNPA',
|
|
9457
|
-
link: 'https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/RAKNPA/all-CBP',
|
|
9458
|
-
logo: 'assets/icons/top-providers/1becfffa-956e-48ba-8ffd-77c19cd720c8.jpeg'
|
|
9459
|
-
},
|
|
9460
|
-
{
|
|
9461
|
-
name: 'Lal Bahadur Shastri National Academy of Administration (LBSNAA)',
|
|
9462
|
-
link: 'https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/Ministry of Environment, Forest and Climate Change/all-CBP',
|
|
9463
|
-
logo: 'assets/icons/top-providers/1d76c041-a7c9-437c-94d9-36d997f3804c.jpeg'
|
|
9464
|
-
},
|
|
9465
|
-
{
|
|
9466
|
-
name: 'Ministry of Environment, Forest and Climate Change',
|
|
9467
|
-
link: 'https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/LBSNAA/all-CBP',
|
|
9468
|
-
logo: 'assets/icons/top-providers/1fb72c3f-1c96-4600-8e22-09871a85e6c4.jpeg'
|
|
9469
|
-
},
|
|
9470
|
-
{
|
|
9471
|
-
name: 'ISTM',
|
|
9472
|
-
link: 'https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/Institute of Secretariat Training and Management/all-CBP',
|
|
9473
|
-
logo: 'assets/icons/top-providers/6f046f76-b778-476a-987b-8669e106b44c.jpeg'
|
|
9474
|
-
},
|
|
9475
|
-
{
|
|
9476
|
-
name: 'Department of Expenditure',
|
|
9477
|
-
link: 'https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/Department%20of%20Expenditure%20/all-CBP',
|
|
9478
|
-
logo: 'assets/icons/top-providers/7f6df809-6930-44f4-abcf-c8297363d3e0.png'
|
|
9479
|
-
},
|
|
9480
|
-
{
|
|
9481
|
-
name: 'Department of Personnel and Training DoPT',
|
|
9482
|
-
link: 'https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/Department%20of%20Personnel%20and%20Training%20DoPT/all-CBP',
|
|
9483
|
-
logo: 'assets/icons/top-providers/dopt.png'
|
|
9484
|
-
},
|
|
9485
|
-
{
|
|
9486
|
-
name: 'Indian Cybercrime Coordination Centre - I4C',
|
|
9487
|
-
link: 'https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/Indian%20Cybercrime%20Coordination%20Centre%20-%20I4C/all-CBP',
|
|
9488
|
-
logo: 'assets/icons/top-providers/7f8cab8e-9d22-44ba-a41e-83b907e5a5f0.jpeg'
|
|
9489
|
-
},
|
|
9490
|
-
{
|
|
9491
|
-
"name": "Capacity Building Commission",
|
|
9492
|
-
"link": "https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/Capacity%20Building%20Commission/all-CBP",
|
|
9493
|
-
"logo": "assets/icons/top-providers/33e9c66f-312f-4244-901e-7d7525ae8847.jpeg"
|
|
9494
|
-
},
|
|
9495
|
-
{
|
|
9496
|
-
"name": "Ministry of Railways",
|
|
9497
|
-
"link": "https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/Ministry%20of%20Railways/all-CBP",
|
|
9498
|
-
"logo": "assets/icons/top-providers/36d93700-c43f-499e-ab3c-68ea76388a2a.png"
|
|
9499
|
-
},
|
|
9500
|
-
{
|
|
9501
|
-
"name": "World Bank",
|
|
9502
|
-
"link": "https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/World%20Bank/all-CBP",
|
|
9503
|
-
"logo": "assets/icons/top-providers/385ff4a0-41af-4114-8015-10d26c1e8af4.jpeg"
|
|
9504
|
-
},
|
|
9505
|
-
{
|
|
9506
|
-
"name": "Sashastra Seema Bal (SSB)",
|
|
9507
|
-
"link": "https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/Sashastra%20Seema%20Bal%20%28SSB%29/all-CBP",
|
|
9508
|
-
"logo": "assets/icons/top-providers/778b56bf-8946-45fe-87d3-358203f2faf4.png"
|
|
9509
|
-
},
|
|
9510
|
-
{
|
|
9511
|
-
"name": "SVPNPA",
|
|
9512
|
-
"link": "https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/SVPNPA/all-CBP",
|
|
9513
|
-
"logo": "assets/icons/top-providers/2862d2e5-473e-4c55-abaa-8a2f86e5eee4.jpeg"
|
|
9514
|
-
},
|
|
9515
|
-
{
|
|
9516
|
-
"name": "Microsoft",
|
|
9517
|
-
"link": "https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/Microsoft/all-CBP",
|
|
9518
|
-
"logo": "assets/icons/top-providers/53407dd6-d22c-4dba-a394-015fae667636.png"
|
|
9519
|
-
},
|
|
9520
|
-
{
|
|
9521
|
-
"name": "Indian Institute of Public Administration",
|
|
9522
|
-
"link": "https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/Indian%20Institute%20of%20Public%20Administration/all-CBP",
|
|
9523
|
-
"logo": "assets/icons/top-providers/869960d7-2dc7-4205-8c4b-11321d901060.jpeg"
|
|
9524
|
-
},
|
|
9525
|
-
{
|
|
9526
|
-
"name": "Food Corporation of India (FCI)",
|
|
9527
|
-
"link": "https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/Food%20Corporation%20of%20India%20%28FCI%29/all-CBP",
|
|
9528
|
-
"logo": "assets/icons/top-providers/4183673f-9063-4fa9-bf84-1e8856c8e531.jpeg"
|
|
9529
|
-
},
|
|
9530
|
-
{
|
|
9531
|
-
"name": "National Telecommunications Institute for Policy Research, Innovation and Training",
|
|
9532
|
-
"link": "https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/NTIPRIT/all-CBP",
|
|
9533
|
-
"logo": "assets/icons/top-providers/a976f025-e990-49b0-a52a-9bd0a8e43584.jpeg"
|
|
9534
|
-
},
|
|
9535
|
-
{
|
|
9536
|
-
"name": "The Art of Living",
|
|
9537
|
-
"link": "https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/The%20Art%20of%20Living/all-CBP",
|
|
9538
|
-
"logo": "assets/icons/top-providers/abbb8f64-84db-4a92-85c9-1b394ffab71c.png"
|
|
9539
|
-
},
|
|
9540
|
-
{
|
|
9541
|
-
"name": "National Institute of Communication Finance",
|
|
9542
|
-
"link": "https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/National%20Institute%20of%20Communication%20Finance/all-CBP",
|
|
9543
|
-
"logo": "assets/icons/top-providers/b6bf0be6-7e29-4187-a29d-da6db1db7c69.jpeg"
|
|
9544
|
-
},
|
|
9545
|
-
{
|
|
9546
|
-
"name": "Department of Posts",
|
|
9547
|
-
"link": "https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/Department%20of%20Posts/all-CBP",
|
|
9548
|
-
"logo": "assets/icons/top-providers/cf567f4c-d0fa-447f-aba4-cb378ea3c90d.png"
|
|
9549
|
-
},
|
|
9550
|
-
{
|
|
9551
|
-
"name": "Government e Market Place(GeM)",
|
|
9552
|
-
"link": "https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/Government%20e%20Market%20Place%28GeM%29/all-CBP",
|
|
9553
|
-
"logo": "assets/icons/top-providers/f445c11b-ff73-4ca4-9dea-8d8945d92a4a.png"
|
|
9554
|
-
},
|
|
9555
|
-
{
|
|
9556
|
-
"name": "Bharat Sanchar Nigam Limited(BSNL)",
|
|
9557
|
-
"link": "https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/Bharat%20Sanchar%20Nigam%20Limited%28BSNL%29/all-CBP",
|
|
9558
|
-
"logo": "assets/icons/top-providers/fc67226a-4bbc-449a-8c5c-e1b338716545.png"
|
|
9559
|
-
},
|
|
9560
|
-
{
|
|
9561
|
-
"name": "Defence Accounts Department (DAD)",
|
|
9562
|
-
"link": "https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/Defence%20Accounts%20Department%20%28DAD%29/all-CBP",
|
|
9563
|
-
"logo": "assets/icons/top-providers/fccdb487-a389-48d9-bce0-c4d64315b546.png"
|
|
9564
|
-
},
|
|
9565
|
-
{
|
|
9566
|
-
"name": "Morarji Desai National Institute of Yoga (MDNIY)",
|
|
9567
|
-
"link": "https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/Morarji%20Desai%20National%20Institute%20of%20Yoga%20%28MDNIY%29/all-CBP",
|
|
9568
|
-
"logo": "assets/icons/top-providers/fcde4c60-7ccd-456e-a5df-260dcfa2d3ee.png"
|
|
9569
|
-
}
|
|
9570
|
-
];
|
|
9535
|
+
/**
|
|
9536
|
+
* @param {?} router
|
|
9537
|
+
*/
|
|
9538
|
+
constructor(router) {
|
|
9539
|
+
this.router = router;
|
|
9540
|
+
this.randomColorApply = true;
|
|
9541
|
+
this.isCardLoading = false;
|
|
9571
9542
|
this.colors = [
|
|
9572
9543
|
'#EF941D', '#F97440', '#35B5B0', '#9988FF', '#816FEC',
|
|
9573
9544
|
'#254092', '#926525', '#4F72DF'
|
|
@@ -9577,29 +9548,61 @@ class ProviderCardComponent {
|
|
|
9577
9548
|
* @return {?}
|
|
9578
9549
|
*/
|
|
9579
9550
|
ngOnInit() {
|
|
9551
|
+
this.setRandomColor();
|
|
9552
|
+
}
|
|
9553
|
+
/**
|
|
9554
|
+
* @return {?}
|
|
9555
|
+
*/
|
|
9556
|
+
setRandomColor() {
|
|
9557
|
+
if (this.widgetData && this.widgetData.content) {
|
|
9558
|
+
if (this.randomColorApply) {
|
|
9559
|
+
/** @type {?} */
|
|
9560
|
+
const randomIndex1 = Math.floor(Math.random() * Math.floor(this.colors.length));
|
|
9561
|
+
this.widgetData.content['bgColor'] = this.colors[randomIndex1];
|
|
9562
|
+
}
|
|
9563
|
+
else {
|
|
9564
|
+
this.widgetData.content['bgColor'] = '#1a4ca1';
|
|
9565
|
+
}
|
|
9566
|
+
}
|
|
9580
9567
|
}
|
|
9581
9568
|
/**
|
|
9582
|
-
* @param {?}
|
|
9569
|
+
* @param {?} content
|
|
9583
9570
|
* @return {?}
|
|
9584
9571
|
*/
|
|
9585
|
-
redirectTo(
|
|
9586
|
-
|
|
9572
|
+
redirectTo(content) {
|
|
9573
|
+
this.router.navigate([`/app/learn/browse-by/provider/${content.name}/${content.orgId}/micro-sites`]);
|
|
9587
9574
|
}
|
|
9588
9575
|
}
|
|
9589
9576
|
ProviderCardComponent.decorators = [
|
|
9590
9577
|
{ type: Component, args: [{
|
|
9591
9578
|
selector: 'sb-uic-provider-card',
|
|
9592
|
-
template: "<div class=\"providers-container\">\n <div class=\"provider-card\" *ngFor=\"let provider of providers; let i = index\" [ngStyle]=\"{'border-top': '72px solid ' + colors[i % colors.length]}\">\n <div class=\"circle-wrapper\">\n <div class=\"circle\">\n <div class=\"background-circle\">\n <img [src]=\"provider.logo\" alt=\"{{ provider.name }}\">\n </div>\n </div>\n </div>\n <div class=\"provider-content\">\n <p>{{ provider.name }}</p>\n <div class=\"view-provider-button\" (click)=\"redirectTo(provider)\">View Provider ></div>\n </div>\n </div>\n </div>\n ",
|
|
9579
|
+
template: "<!-- <div class=\"providers-container\">\n <div class=\"provider-card\" *ngFor=\"let provider of providers; let i = index\" [ngStyle]=\"{'border-top': '72px solid ' + colors[i % colors.length]}\">\n <div class=\"circle-wrapper\">\n <div class=\"circle\">\n <div class=\"background-circle\">\n <img [src]=\"provider.logo\" alt=\"{{ provider.name }}\">\n </div>\n </div>\n </div>\n <div class=\"provider-content\">\n <p>{{ provider.name }}</p>\n <div class=\"view-provider-button\" (click)=\"redirectTo(provider)\">View Provider ></div>\n </div>\n </div>\n </div> -->\n <!-- {{widgetData|json}} -->\n\n\n<ng-container *ngIf=\"!isCardLoading\">\n <ng-container *ngIf=\"widgetData && widgetData?.content\">\n <div class=\"providers-container\">\n <div class=\"provider-card\" [ngStyle]=\"{'border-top': '72px solid ' + widgetData?.content?.bgColor || 'transparent'}\">\n <div class=\"circle-wrapper\">\n <div class=\"circle\">\n <div class=\"background-circle\">\n <ng-container *ngIf=\"widgetData?.content?.logoUrl; else defaultImg\">\n <img [src]=\"widgetData?.content?.logoUrl\" alt=\"{{ widgetData?.content?.name }}\">\n </ng-container>\n <ng-template #defaultImg>\n <sb-uic-avatar-photo [randomColor]=\"true\" [name]=\"widgetData?.content?.name\" [photoUrl]=\"widgetData?.content?.logoUrl\" size=\"m-side-rating\">\n </sb-uic-avatar-photo>\n </ng-template>\n \n </div>\n </div>\n </div>\n <div class=\"provider-content\">\n <p>{{ widgetData?.content?.name }}</p>\n <div class=\"view-provider-button flex items-center\" (click)=\"redirectTo(widgetData.content)\">View Provider \n <mat-icon class=\"\" color=\"accent\">navigate_next</mat-icon></div>\n </div>\n </div>\n </div>\n </ng-container>\n</ng-container>\n<ng-container *ngIf=\"isCardLoading\">\n <div class=\"providers-container\">\n <div class=\"provider-card\" [ngStyle]=\"{'border-top': '72px solid gray'}\">\n <div class=\"circle-wrapper\">\n <div class=\"circle\">\n <div class=\"background-circle\">\n <sb-uic-skeleton-loader [width]=\"'100%'\" [height]=\"'100%'\" class=\"w-full h-full\" [bindingClass]=\"'flex rounded rounded-full'\"></sb-uic-skeleton-loader>\n </div>\n </div>\n </div>\n <div class=\"w-full p-4 provider-content\">\n <p class=\"w-full pl-4\"> <sb-uic-skeleton-loader [width]=\"'200px'\" [height]=\"'12px'\" class=\"w-full h-full\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader></p>\n <div class=\"w-full pl-4 view-provider-button\" (click)=\"redirectTo(widgetData.content)\"><sb-uic-skeleton-loader [width]=\"'200px'\" [height]=\"'12px'\" class=\"w-full h-full\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader></div>\n </div>\n </div>\n </div>\n</ng-container>",
|
|
9593
9580
|
styles: [".providers-container{display:flex;justify-content:center}.provider-card{height:168px;width:245px;margin:20px 8px;border-radius:12px;box-shadow:0 2px 4px rgba(0,0,0,.1);background-color:#fff;position:relative;display:flex;flex-direction:column;justify-content:flex-start;align-items:center;z-index:1}.circle-wrapper{position:absolute;display:flex;justify-content:center;top:-50px;z-index:1}.circle{width:90px;height:90px;border-radius:50%;background-color:#f0f0f0;box-shadow:0 4px 8px rgba(0,0,0,.1)}.background-circle{position:relative;display:flex;justify-content:center;align-items:center;height:80px;width:80px;background-color:#fff;border-radius:50%;border:5px solid #fff;margin:0 auto}.background-circle img{width:66px;height:50px;background-size:cover;background-position:center;position:relative}.provider-content{padding:16px;text-align:center;flex-grow:1;display:flex;flex-direction:column;justify-content:center;align-items:center}.provider-content p{font-size:14px;font-weight:700;font-family:Lato,sans-serif;margin-bottom:8px;line-height:16.8px;word-wrap:break-word;white-space:normal;height:51px}.view-provider-button{color:#1b4ca1;font-size:14px;font-family:Lato,sans-serif;cursor:pointer;transition:color .3s}"]
|
|
9594
9581
|
}] }
|
|
9595
9582
|
];
|
|
9596
9583
|
/** @nocollapse */
|
|
9597
|
-
ProviderCardComponent.ctorParameters = () => [
|
|
9584
|
+
ProviderCardComponent.ctorParameters = () => [
|
|
9585
|
+
{ type: Router }
|
|
9586
|
+
];
|
|
9587
|
+
ProviderCardComponent.propDecorators = {
|
|
9588
|
+
widgetData: [{ type: Input }],
|
|
9589
|
+
randomColorApply: [{ type: Input }],
|
|
9590
|
+
isCardLoading: [{ type: Input }]
|
|
9591
|
+
};
|
|
9598
9592
|
if (false) {
|
|
9599
9593
|
/** @type {?} */
|
|
9600
|
-
ProviderCardComponent.prototype.
|
|
9594
|
+
ProviderCardComponent.prototype.widgetData;
|
|
9595
|
+
/** @type {?} */
|
|
9596
|
+
ProviderCardComponent.prototype.randomColorApply;
|
|
9597
|
+
/** @type {?} */
|
|
9598
|
+
ProviderCardComponent.prototype.isCardLoading;
|
|
9601
9599
|
/** @type {?} */
|
|
9602
9600
|
ProviderCardComponent.prototype.colors;
|
|
9601
|
+
/**
|
|
9602
|
+
* @type {?}
|
|
9603
|
+
* @private
|
|
9604
|
+
*/
|
|
9605
|
+
ProviderCardComponent.prototype.router;
|
|
9603
9606
|
}
|
|
9604
9607
|
|
|
9605
9608
|
/**
|
|
@@ -9683,7 +9686,7 @@ class CardPortraitExtComponent {
|
|
|
9683
9686
|
CardPortraitExtComponent.decorators = [
|
|
9684
9687
|
{ type: Component, args: [{
|
|
9685
9688
|
selector: 'sb-uic-card-portrait-ext',
|
|
9686
|
-
template: "<ng-container *ngIf=\"!isCardLoading\">\n <mat-card class=\"card-standard-container mr-5 padding-remove cursor-pointer {{widgetData?.cardCustomeClass}}\" [ngClass]=\"{\n greyOut:\n widgetData?.deletedMode === 'greyOut' && !isLiveOrMarkForDeletion\n ? true\n : widgetData?.intranetMode === 'greyOut' && showIntranetContent\n }\" (click)=\"(showIntranetContent || !isLiveOrMarkForDeletion) && showSnackbar()\">\n <div class=\"display-contents\" [ngClass]=\"{\n disableClick:\n widgetData?.deletedMode === 'greyOut' && !isLiveOrMarkForDeletion\n ? true\n : widgetData?.intranetMode === 'greyOut' && showIntranetContent\n }\">\n <ng-container *ngIf=\"widgetData?.content\">\n <a (click)=\"getRedirectUrlData(widgetData?.content); $event.stopPropagation()\"\n role=\"link\" i18n-aria-label>\n <ng-container *ngIf=\"!isCardFlipped\">\n <div class=\"status-danger\" role=\"note\" i18n-aria-label aria-label=\"Content expired or deleted\" i18n-matTooltip\n matTooltip=\"Content may be expired or deleted\" *ngIf=\"!isLiveOrMarkForDeletion\"></div>\n <div class=\"status-danger\" role=\"note\" i18n-aria-label aria-label=\"Intranet content\" i18n-matTooltip\n matTooltip=\"Available only in Company's network\"\n *ngIf=\"widgetData?.intranetMode === 'greyOut' && showIntranetContent\"></div>\n <button *ngIf=\"showFlip\" class=\"detail-button ws-mat-primary-lite-background-op30\" mat-icon-button\n (click)=\"isCardFlipped = true\" aria-label=\"Details\" i18n-aria-label=\"Details | Click to see details\">\n <mat-icon>flip_to_back</mat-icon>\n </button>\n <mat-card-content class=\"min-top\">\n <div style=\"position: relative; z-index: 1;\">\n <ng-container *ngIf=\"widgetData?.content?.posterImage\">\n <img mat-card-image [src]=\"widgetData.content.posterImage | pipePublicURL\" loading=\"lazy\"\n class=\"card-img ws-mat-primary-lite-background margin-remove\" [wsUtilsDefaultThumbnail]=\"defaultThumbnail\"\n [alt]=\"widgetData.content.name\" />\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 \" loading=\"lazy\"\n class=\"card-img 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-img ws-mat-primary-lite-background margin-remove\"\n [alt]=\"widgetData?.content?.name\" />\n </ng-template>\n </ng-container>\n <div class=\"source-div\" style=\"display: none;\">\n <img [src]=\"widgetData?.content.creatorLogo\" class=\"source-icon\" [wsUtilsDefaultThumbnail]=\"defaultSLogo\"\n [alt]=\"(widgetData?.content?.sourceName + '_' + widgetData.content?.contentId)\" />\n </div>\n <ng-container *ngIf=\"widgetData?.content?.cbPlanEndDate\">\n <div class=\"cbp-mark\">\n <span>{{widgetData?.content?.cbPlanEndDate | date: 'd MMM, y'}}</span>\n </div>\n </ng-container>\n <ng-container *ngIf=\"cbPlanMapData && cbPlanMapData[widgetData?.content?.contentId]\">\n <ng-container [ngTemplateOutlet]=\"cbpPlan\" [ngTemplateOutletContext]=\"{data: {\n cbpData: cbPlanMapData[widgetData?.content?.contentId]\n }}\"></ng-container>\n </ng-container>\n <div class=\"duration-box right-corner\" *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\" *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 </div>\n <div class=\"padding-m\">\n <div class=\"course_widget flex margin-remove\">\n <div class=\"flex flex-end course_v2\">\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 [useTranslation]=\"false\" i18n-title title=\"Content Type\" *ngIf=\"widgetData.content?.topic\"\n class=\"ws-mat-black60-text font-normal mat-caption \" [displayContentType]=\"widgetData?.content?.primaryCategory==='Course Unit'\n ?'Module'\n :widgetData?.content?.primaryCategory? widgetData?.content?.primaryCategory : 'Course'\">\n \n </sb-uic-display-content-type>\n </div>\n </div>\n <div [id]=\"'m-c-'+ widgetData.content?.contentId\"\n class=\"mat-subheading-1 title-text ws-mat-text-block-fade-gradient\">\n {{ widgetData.content.name }}\n </div>\n <div class=\"flex w-full flex-wrap flex-middle\">\n <div class=\"course_logo_box\">\n <img [src]=\"widgetData.content.creatorLogo | pipePublicURL \" class=\"source-icon\" [wsUtilsDefaultThumbnail]=\"defaultSLogo\"\n [alt]=\"(widgetData.content.sourceName + '_' + widgetData.content.contentId)\" />\n </div>\n <!-- <span class=\"org-text\">{{'cardcontentv2.by' | translate}} -->\n <span class=\"org-text\">By {{ (widgetData?.content?.organisation && widgetData?.content?.organisation[0]) ? widgetData?.content?.organisation[0] : 'Karmayogi Bharat' }}</span>\n </div>\n <div class=\"flex flex-middle rating-session margin-top-m\">\n <div class=\"flex flex-middle\" *ngIf=\"widgetData?.content?.avgRating\">\n <mat-icon class=\"mr-1\">star</mat-icon>\n <span>{{widgetData.content.avgRating}}</span>\n </div>\n <!-- <span class=\"most-enrolled-text margin-left-m\">{{ 'cardcontentv2.mostEnrolled' | translate }}</span> -->\n <ng-container *ngIf=\"widgetData?.content?.additionalTags && widgetData?.content?.additionalTags.includes('mostEnrolled')\">\n <span class=\"most-enrolled-text margin-left-xs\">\n <!-- {{ 'cardcontentv2.mostEnrolled' | translate }} -->\n </span>\n </ng-container>\n <ng-container *ngIf=\"widgetData?.content?.additionalTags && widgetData?.content?.additionalTags.includes('mostTrending')\">\n <span class=\"most-enrolled-text margin-left-xs\">\n <!-- {{ 'cardcontentv2.mostTrending' | translate }} -->\n </span>\n </ng-container>\n </div>\n </div>\n </mat-card-content>\n </ng-container>\n <ng-container *ngIf=\"isCardFlipped\">\n <div class=\"flex items-center\">\n <!-- <h2 class=\"mat-subheading-2 flex-1 min-w-0 margin-remove-bottom\" i18n>{{'cardcontentv2.reason' | translate}}</h2> -->\n <button mat-icon-button (click)=\"isCardFlipped = false\">\n <mat-icon>close</mat-icon>\n </button>\n </div>\n <p class=\"text-justify mat-body-1\">\n {{ widgetData.content.reason }}\n </p>\n </ng-container>\n </a>\n </ng-container>\n </div>\n </mat-card>\n </ng-container>\n \n <ng-container *ngIf=\"isCardLoading\">\n <mat-card class=\"card-standard-container mr-5 padding-remove\" >\n <div class=\"display-contents\" >\n <ng-container *ngIf=\"!isCardFlipped\">\n <mat-card-content class=\"min-top\">\n <div style=\"position: relative; z-index: 1;\">\n <ng-container>\n <sb-uic-skeleton-loader [width]=\"'100%'\" [height]=\"'140px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </ng-container>\n </div>\n <div class=\"padding-m\">\n <div class=\"course_widget flex margin-remove\">\n <div class=\"flex flex-end\">\n <sb-uic-skeleton-loader [width]=\"'65px'\" [height]=\"'16px'\" [bindingClass]=\"'flex rounded br-8'\"></sb-uic-skeleton-loader>\n </div>\n </div>\n <div class=\"mat-subheading-1 title-text ws-mat-text-block-fade-gradient\">\n <sb-uic-skeleton-loader [width]=\"'100%'\" [height]=\"'16px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n <sb-uic-skeleton-loader [width]=\"'111px'\" [height]=\"'16px'\" [bindingClass]=\"'flex rounded margin-top-s'\"></sb-uic-skeleton-loader>\n </div>\n <div class=\"flex w-full flex-wrap flex-middle margin-top-m\">\n <div class=\"\">\n <sb-uic-skeleton-loader [width]=\"'28px'\" [height]=\"'28px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </div>\n <span class=\"org-text\"> <sb-uic-skeleton-loader [width]=\"'111px'\" [height]=\"'16px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader></span>\n </div>\n <div class=\"flex flex-middle rating-session margin-top-m\">\n <div class=\"flex flex-middle\">\n <sb-uic-skeleton-loader [width]=\"'45px'\" [height]=\"'12px'\" [bindingClass]=\"'flex rounded margin-top-m'\"></sb-uic-skeleton-loader>\n </div>\n </div>\n </div>\n </mat-card-content>\n </ng-container>\n </div>\n </mat-card>\n </ng-container>\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>",
|
|
9689
|
+
template: "<ng-container *ngIf=\"!isCardLoading\">\n <mat-card class=\"card-standard-container mr-5 padding-remove cursor-pointer {{widgetData?.cardCustomeClass}}\" [ngClass]=\"{\n greyOut:\n widgetData?.deletedMode === 'greyOut' && !isLiveOrMarkForDeletion\n ? true\n : widgetData?.intranetMode === 'greyOut' && showIntranetContent\n }\" (click)=\"(showIntranetContent || !isLiveOrMarkForDeletion) && showSnackbar()\">\n <div class=\"display-contents\" [ngClass]=\"{\n disableClick:\n widgetData?.deletedMode === 'greyOut' && !isLiveOrMarkForDeletion\n ? true\n : widgetData?.intranetMode === 'greyOut' && showIntranetContent\n }\">\n <ng-container *ngIf=\"widgetData?.content\">\n <a (click)=\"getRedirectUrlData(widgetData?.content); $event.stopPropagation()\"\n role=\"link\" i18n-aria-label>\n <ng-container *ngIf=\"!isCardFlipped\">\n <div class=\"status-danger\" role=\"note\" i18n-aria-label aria-label=\"Content expired or deleted\" i18n-matTooltip\n matTooltip=\"Content may be expired or deleted\" *ngIf=\"!isLiveOrMarkForDeletion\"></div>\n <div class=\"status-danger\" role=\"note\" i18n-aria-label aria-label=\"Intranet content\" i18n-matTooltip\n matTooltip=\"Available only in Company's network\"\n *ngIf=\"widgetData?.intranetMode === 'greyOut' && showIntranetContent\"></div>\n <button *ngIf=\"showFlip\" class=\"detail-button ws-mat-primary-lite-background-op30\" mat-icon-button\n (click)=\"isCardFlipped = true\" aria-label=\"Details\" i18n-aria-label=\"Details | Click to see details\">\n <mat-icon>flip_to_back</mat-icon>\n </button>\n <mat-card-content class=\"min-top\">\n <div style=\"position: relative; z-index: 1;\">\n <ng-container *ngIf=\"widgetData?.content?.posterImage\">\n <img mat-card-image [src]=\"widgetData.content.posterImage | pipePublicURL\" loading=\"lazy\"\n class=\"card-img ws-mat-primary-lite-background margin-remove\" [wsUtilsDefaultThumbnail]=\"defaultThumbnail\"\n [alt]=\"widgetData.content.name\" />\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 \" loading=\"lazy\"\n class=\"card-img 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-img ws-mat-primary-lite-background margin-remove\"\n [alt]=\"widgetData?.content?.name\" />\n </ng-template>\n </ng-container>\n <div class=\"source-div\" style=\"display: none;\">\n <img [src]=\"widgetData?.content.creatorLogo\" class=\"source-icon\" [wsUtilsDefaultThumbnail]=\"defaultSLogo\"\n [alt]=\"(widgetData?.content?.sourceName + '_' + widgetData.content?.contentId)\" />\n </div>\n <ng-container *ngIf=\"widgetData?.content?.cbPlanEndDate\">\n <div class=\"cbp-mark\">\n <span>{{widgetData?.content?.cbPlanEndDate | date: 'd MMM, y'}}</span>\n </div>\n </ng-container>\n <ng-container *ngIf=\"cbPlanMapData && cbPlanMapData[widgetData?.content?.contentId] && cbPlanMapData[widgetData?.content?.identifier]?.contentStatus < 2 \">\n <ng-container [ngTemplateOutlet]=\"cbpPlan\" [ngTemplateOutletContext]=\"{data: {\n cbpData: cbPlanMapData[widgetData?.content?.contentId]\n }}\"></ng-container>\n </ng-container>\n <div class=\"duration-box right-corner\" *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\" *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 </div>\n <div class=\"padding-m\">\n <div class=\"course_widget flex margin-remove\">\n <div class=\"flex flex-end course_v2\">\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 [useTranslation]=\"false\" i18n-title title=\"Content Type\" *ngIf=\"widgetData.content?.topic\"\n class=\"ws-mat-black60-text font-normal mat-caption \" [displayContentType]=\"widgetData?.content?.primaryCategory==='Course Unit'\n ?'Module'\n :widgetData?.content?.primaryCategory? widgetData?.content?.primaryCategory : 'Course'\">\n \n </sb-uic-display-content-type>\n </div>\n </div>\n <div [id]=\"'m-c-'+ widgetData.content?.contentId\"\n class=\"mat-subheading-1 title-text ws-mat-text-block-fade-gradient\">\n {{ widgetData.content.name }}\n </div>\n <div class=\"flex w-full flex-wrap flex-middle\">\n <div class=\"course_logo_box\">\n <img [src]=\"widgetData.content.creatorLogo | pipePublicURL \" class=\"source-icon\" [wsUtilsDefaultThumbnail]=\"defaultSLogo\"\n [alt]=\"(widgetData.content.sourceName + '_' + widgetData.content.contentId)\" />\n </div>\n <!-- <span class=\"org-text\">{{'cardcontentv2.by' | translate}} -->\n <span class=\"org-text\">By {{ (widgetData?.content?.organisation && widgetData?.content?.organisation[0]) ? widgetData?.content?.organisation[0] : 'Karmayogi Bharat' }}</span>\n </div>\n <div class=\"flex flex-middle rating-session margin-top-m\">\n <div class=\"flex flex-middle\" *ngIf=\"widgetData?.content?.avgRating\">\n <mat-icon class=\"mr-1\">star</mat-icon>\n <span>{{widgetData.content.avgRating}}</span>\n </div>\n <!-- <span class=\"most-enrolled-text margin-left-m\">{{ 'cardcontentv2.mostEnrolled' | translate }}</span> -->\n <ng-container *ngIf=\"widgetData?.content?.additionalTags && widgetData?.content?.additionalTags.includes('mostEnrolled')\">\n <span class=\"most-enrolled-text margin-left-xs\">\n <!-- {{ 'cardcontentv2.mostEnrolled' | translate }} -->\n </span>\n </ng-container>\n <ng-container *ngIf=\"widgetData?.content?.additionalTags && widgetData?.content?.additionalTags.includes('mostTrending')\">\n <span class=\"most-enrolled-text margin-left-xs\">\n <!-- {{ 'cardcontentv2.mostTrending' | translate }} -->\n </span>\n </ng-container>\n </div>\n </div>\n </mat-card-content>\n </ng-container>\n <ng-container *ngIf=\"isCardFlipped\">\n <div class=\"flex items-center\">\n <!-- <h2 class=\"mat-subheading-2 flex-1 min-w-0 margin-remove-bottom\" i18n>{{'cardcontentv2.reason' | translate}}</h2> -->\n <button mat-icon-button (click)=\"isCardFlipped = false\">\n <mat-icon>close</mat-icon>\n </button>\n </div>\n <p class=\"text-justify mat-body-1\">\n {{ widgetData.content.reason }}\n </p>\n </ng-container>\n </a>\n </ng-container>\n </div>\n </mat-card>\n </ng-container>\n \n <ng-container *ngIf=\"isCardLoading\">\n <mat-card class=\"card-standard-container mr-5 padding-remove\" >\n <div class=\"display-contents\" >\n <ng-container *ngIf=\"!isCardFlipped\">\n <mat-card-content class=\"min-top\">\n <div style=\"position: relative; z-index: 1;\">\n <ng-container>\n <sb-uic-skeleton-loader [width]=\"'100%'\" [height]=\"'140px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </ng-container>\n </div>\n <div class=\"padding-m\">\n <div class=\"course_widget flex margin-remove\">\n <div class=\"flex flex-end\">\n <sb-uic-skeleton-loader [width]=\"'65px'\" [height]=\"'16px'\" [bindingClass]=\"'flex rounded br-8'\"></sb-uic-skeleton-loader>\n </div>\n </div>\n <div class=\"mat-subheading-1 title-text ws-mat-text-block-fade-gradient\">\n <sb-uic-skeleton-loader [width]=\"'100%'\" [height]=\"'16px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n <sb-uic-skeleton-loader [width]=\"'111px'\" [height]=\"'16px'\" [bindingClass]=\"'flex rounded margin-top-s'\"></sb-uic-skeleton-loader>\n </div>\n <div class=\"flex w-full flex-wrap flex-middle margin-top-m\">\n <div class=\"\">\n <sb-uic-skeleton-loader [width]=\"'28px'\" [height]=\"'28px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </div>\n <span class=\"org-text\"> <sb-uic-skeleton-loader [width]=\"'111px'\" [height]=\"'16px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader></span>\n </div>\n <div class=\"flex flex-middle rating-session margin-top-m\">\n <div class=\"flex flex-middle\">\n <sb-uic-skeleton-loader [width]=\"'45px'\" [height]=\"'12px'\" [bindingClass]=\"'flex rounded margin-top-m'\"></sb-uic-skeleton-loader>\n </div>\n </div>\n </div>\n </mat-card-content>\n </ng-container>\n </div>\n </mat-card>\n </ng-container>\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>",
|
|
9687
9690
|
styles: [".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}.card-standard-container{position:relative;width:245px;min-height:346px;border-radius:8px;box-sizing:border-box;box-shadow:0 10px 30px rgba(153,153,153,.2);overflow:hidden;height:346px;margin:20px 8px}.card-standard-container .progress-bar{width:101%;margin-left:-15px;display:flex;margin-top:0;background:bisque;position:absolute;bottom:0}.card-standard-container ::ng-deep .mat-progress-bar{height:8px!important}.card-standard-container .icon_text{font-size:12px;line-height:16px;text-transform:uppercase}.card-standard-container .course_logo_box{width:38px;height:38px;background:#fff;border-radius:8px;box-sizing:border-box;box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12)}.card-standard-container .course_logo_box img{height:28px;width:28px;padding:5px;display:inline-block}.card-standard-container .course_logo_box p{display:inline-block;vertical-align:top}.card-standard-container .org-text{font-size:12px;font-weight:400;width:75%;padding-left:10px;word-break:break-all;white-space:initial;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical}.card-standard-container .source-div{position:relative;top:100px;background:#fff;z-index:3;border:1px solid #dedfe0;min-width:72px;min-height:72px;max-width:72px;max-height:72px;display:flex;border-radius:8px}.card-standard-container .source-div .source-icon{border-radius:8px;display:block;margin:auto;max-width:58px;max-height:-webkit-fill-available}.card-standard-container mat-card-content{background:#fff}.card-standard-container .card-img{min-width:245px;max-height:140px;min-height:140px;display:block;-o-object-fit:fill;object-fit:fill;border-top-left-radius:8px;border-top-right-radius:8px;width:100%}.card-standard-container .mat-subheading-1{font:600 14px/24px Montserrat}.card-standard-container .complexity{padding-top:70px;display:flex;font-size:14px;line-height:21px;padding-bottom:10px}.card-standard-container .complexity .mode-tag{border-radius:5px;order:2;margin-left:auto;color:#fff;font-size:10px}.card-standard-container .complexity .duration{display:flex;margin-left:auto;order:3;font-weight:700}.card-standard-container .complexity .time-text{margin:0 5px 0 6px;font-weight:700}.card-standard-container .basic{margin:auto 0}.card-standard-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;min-height:48px}.card-standard-container .description-text{position:relative;overflow:hidden;height:42px;white-space:normal;text-overflow:ellipsis}.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}.width-238{width:238px!important}.cbp-mark{border-radius:12px 0;opacity:1;background-image:linear-gradient(90deg,rgba(0,0,0,.6) 0,rgba(0,0,0,0) 100%);position:absolute;top:0;padding:8px}.cbp-mark p{opacity:1;background-color:#fff;padding:4px;opacity:1;color:#1b2133;font-family:Lato-Regular;font-size:10px;font-weight:400;font-style:Regular;letter-spacing:.5px;text-align:left;line-height:12px;margin-bottom:0}.cbpwidth{width:340px}.cbp-plan{border-radius:4px;opacity:1;background-color:#1b4ca1;top:4px;left:4px;opacity:1;color:rgba(255,255,255,.95);font-family:Lato-Bold;font-size:12px;font-weight:700;font-style:normal;letter-spacing:.25px;text-align:center;line-height:16px;padding:4px}.cbp-info{opacity:1;color:#fff;font-family:Lato-Regular;font-size:10px;font-weight:400;font-style:normal;letter-spacing:.5px;text-align:left;line-height:12px;padding:2px}.cbp-danger{border-radius:2px;border:1px solid rgba(0,0,0,.08);background-color:#d13924!important;color:#fff!important;opacity:1}.cbp-success{border-radius:2px;border:1px solid #1d8922;background-color:#1d8922!important;color:#fff!important;opacity:1}.cbp-warning{border-radius:2px;border:1px solid #ef951e;background-color:#ef951e!important;color:#fff!important;opacity:1}"]
|
|
9688
9691
|
}] }
|
|
9689
9692
|
];
|
|
@@ -9807,52 +9810,46 @@ class CardAssessmentComponent {
|
|
|
9807
9810
|
* @return {?}
|
|
9808
9811
|
*/
|
|
9809
9812
|
startCountdown(data) {
|
|
9810
|
-
|
|
9811
|
-
|
|
9813
|
+
/** @type {?} */
|
|
9814
|
+
let startDate = data.startDate;
|
|
9815
|
+
/** @type {?} */
|
|
9816
|
+
let startTime = data.startTime;
|
|
9817
|
+
this.updateCountdown(startDate, startTime);
|
|
9812
9818
|
this.intervalId = setInterval((/**
|
|
9813
9819
|
* @return {?}
|
|
9814
9820
|
*/
|
|
9815
9821
|
() => {
|
|
9816
|
-
this.updateCountdown(
|
|
9822
|
+
this.updateCountdown(startDate, startTime);
|
|
9817
9823
|
}), 1000);
|
|
9818
9824
|
}
|
|
9819
9825
|
// Method to update the countdown values
|
|
9820
9826
|
/**
|
|
9821
9827
|
* @param {?} startDate
|
|
9822
|
-
* @param {?}
|
|
9828
|
+
* @param {?} startTime
|
|
9823
9829
|
* @return {?}
|
|
9824
9830
|
*/
|
|
9825
|
-
updateCountdown(startDate,
|
|
9831
|
+
updateCountdown(startDate, startTime) {
|
|
9826
9832
|
/** @type {?} */
|
|
9827
9833
|
const now = new Date().getTime();
|
|
9828
|
-
// Current time in milliseconds
|
|
9829
|
-
/** @type {?} */
|
|
9830
|
-
const targetTime = new Date(startDate).getTime();
|
|
9831
|
-
/** @type {?} */
|
|
9832
|
-
const targetEndDate = new Date(endDate).getTime();
|
|
9833
9834
|
/** @type {?} */
|
|
9834
|
-
const
|
|
9835
|
-
// Distance in milliseconds
|
|
9835
|
+
const startDateTime = new Date(`${startDate}T${startTime}`);
|
|
9836
9836
|
/** @type {?} */
|
|
9837
|
-
const
|
|
9837
|
+
const distance = startDateTime.getTime() - now;
|
|
9838
9838
|
if (distance > 0) {
|
|
9839
|
-
this.daysRemaining = Math.ceil(distance / (1000 * 60 * 60 * 24));
|
|
9840
9839
|
this.daysPending = true;
|
|
9840
|
+
// this.days = Math.ceil(distance / (1000 * 60 * 60 * 24));
|
|
9841
|
+
// this.hours = Math.ceil(distance / (1000 * 60 * 60));
|
|
9842
|
+
// this.minutes = Math.ceil((distance % (1000 * 60 * 60)) / (1000 * 60));
|
|
9843
|
+
this.days = Math.floor(distance / (1000 * 60 * 60 * 24));
|
|
9844
|
+
this.hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
|
|
9845
|
+
this.minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
|
|
9841
9846
|
}
|
|
9842
9847
|
else {
|
|
9843
9848
|
this.daysRemaining = 0;
|
|
9844
9849
|
this.daysPending = false;
|
|
9845
9850
|
this.clearTimer();
|
|
9846
9851
|
}
|
|
9847
|
-
if (endDistance > 0) {
|
|
9848
|
-
this.daysFinish = true;
|
|
9849
|
-
this.clearTimer();
|
|
9850
|
-
}
|
|
9851
|
-
else {
|
|
9852
|
-
this.daysFinish = false;
|
|
9853
|
-
}
|
|
9854
9852
|
}
|
|
9855
|
-
// Method to clear the interval
|
|
9856
9853
|
/**
|
|
9857
9854
|
* @return {?}
|
|
9858
9855
|
*/
|
|
@@ -9882,8 +9879,8 @@ class CardAssessmentComponent {
|
|
|
9882
9879
|
CardAssessmentComponent.decorators = [
|
|
9883
9880
|
{ type: Component, args: [{
|
|
9884
9881
|
selector: 'sb-uic-card-assessment',
|
|
9885
|
-
template: "
|
|
9886
|
-
styles: [".card-assessment{width:100%;min-height:190px;box-sizing:border-box;min-width:340px;margin-top:16px;margin-right:12px;border-radius:12px}.image-container{width:145px;height:120px;border-radius:8px;overflow:hidden;border:1px solid rgba(0,0,0,.08)}.image-container img{border-radius:8px;opacity:1;background-size:100%;width:145px!important;height:120px!important;display:flex}.title-container{width:155px;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;width:75px}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;border-radius:0 0 8px 8px}.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}"]
|
|
9882
|
+
template: "<ng-container *ngIf=\"!isCardLoading\">\n\t<mat-card class=\"card-assessment card-scheduled-assessment card-users-container padding-remove cursor-pointer mr-4\">\n\t\t<a (click)=\"getRedirectUrlData(widgetData?.content); $event.stopPropagation()\">\n\t\t\t<div class=\"display-contents\">\n\t\t\t\t<ng-container *ngIf=\"widgetData\">\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 *ngIf=\"widgetData?.content?.posterImage\">\n\t\t\t\t\t\t\t\t\t\t<img mat-card-image class=\"margin-remove assess-img\"\n\t\t\t\t\t\t\t\t\t\t\t[src]=\"widgetData?.content?.posterImage | pipePublicURL\" [alt]=\"widgetData?.content?.name\">\n\t\t\t\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t\t\t\t\t<ng-container *ngIf=\"!widgetData?.content?.posterImage\">\n\t\t\t\t\t\t\t\t\t\t<ng-template #defaultImg>\n\t\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\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\t[alt]=\"widgetData?.content?.name\" />\n\t\t\t\t\t\t\t\t\t\t</ng-template>\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 title-text mat-subheading-1\">\n\t\t\t\t\t\t\t\t\t\t{{ widgetData?.content?.name }}\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-s font-normal mat-caption sub-title-text\">\n\t\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\t<img [src]=\"widgetData?.content?.creatorLogo | pipePublicURL \" class=\"source-icon\"\n\t\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\t[alt]=\"(widgetData?.content?.sourceName + '_' + widgetData?.content?.identifier)\" />\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\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\t{{ (widgetData?.content?.organisation &&\n\t\t\t\t\t\t\t\t\t\t\twidgetData?.content?.organisation[0]) ?\n\t\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\t</span>\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=\"start-span\">Assessment starts in </span>\n\t\t\t\t\t\t\t<mat-card-footer class=\"assessment-card-footer padding-m\">\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\t<div class=\"flex margin-right-m\">\n\t\t\t\t\t\t\t\t\t\t<span >{{ startCountdown(widgetData?.content?.batch) }}</span>\n\t\t\t\t\t\t\t\t\t\t<span *ngIf=\"daysPending\">\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"big-text\"><b>{{ days }}</b> <span class=\"small-text\">days</span> </span> : <span\n\t\t\t\t\t\t\t\t\t\t\t\tclass=\"big-text\"><b>{{ hours }} </b><span class=\"small-text\">hours</span>\n\t\t\t\t\t\t\t\t\t\t\t</span> : <span class=\"big-text\"> <b>{{ minutes }}</b> <span class=\"small-text\">minutes</span>\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t<span *ngIf=\"!daysPending\" class=\"start-btn\"> Start Assessment </span>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"flex\">\n\t\t\t\t\t\t\t\t\t\t<span class=\"time-span flex items-center justify-center\">{{widgetData?.content?.batch?.startDate\n\t\t\t\t\t\t\t\t\t\t\t| date: 'd MMM, y' }}</span>\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</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-container>\n\n<ng-container *ngIf=\"isCardLoading\">\n\t<ng-container [ngTemplateOutlet]=\"skeltonLoader\"></ng-container>\n</ng-container>\n\n<ng-template #skeltonLoader>\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'\"></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 margin-top-m\">\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 class=\"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\t<div class=\"flex margin-right-m\">\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\">\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</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>",
|
|
9883
|
+
styles: [".card-assessment{width:100%;min-height:190px;box-sizing:border-box;min-width:340px;margin-top:16px;margin-right:12px;border-radius:12px}.image-container{width:145px;height:120px;border-radius:8px;overflow:hidden;border:1px solid rgba(0,0,0,.08)}.image-container img{border-radius:8px;opacity:1;background-size:100%;width:145px!important;height:120px!important;display:flex}.title-container{width:155px;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;width:75px}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;border-radius:0 0 8px 8px}.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}.big-text{font-size:14px}.small-text{font-size:12px!important;vertical-align:top}"]
|
|
9887
9884
|
}] }
|
|
9888
9885
|
];
|
|
9889
9886
|
/** @nocollapse */
|
|
@@ -9931,6 +9928,12 @@ if (false) {
|
|
|
9931
9928
|
* @private
|
|
9932
9929
|
*/
|
|
9933
9930
|
CardAssessmentComponent.prototype.intervalId;
|
|
9931
|
+
/** @type {?} */
|
|
9932
|
+
CardAssessmentComponent.prototype.days;
|
|
9933
|
+
/** @type {?} */
|
|
9934
|
+
CardAssessmentComponent.prototype.hours;
|
|
9935
|
+
/** @type {?} */
|
|
9936
|
+
CardAssessmentComponent.prototype.minutes;
|
|
9934
9937
|
/**
|
|
9935
9938
|
* @type {?}
|
|
9936
9939
|
* @private
|
|
@@ -10372,7 +10375,7 @@ class CardProgressPortraitLibComponent {
|
|
|
10372
10375
|
CardProgressPortraitLibComponent.decorators = [
|
|
10373
10376
|
{ type: Component, args: [{
|
|
10374
10377
|
selector: 'sb-uic-card-progress-portrait-lib',
|
|
10375
|
-
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>",
|
|
10378
|
+
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\" [ngClass]=\"{'retiredCards': widgetData?.content?.status === 'Retired' && widgetData?.content?.completionPercentage === 100}\">\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\" [ngClass]=\"{'retiredCards': widgetData?.content?.status === 'Retired' && widgetData?.content?.completionPercentage === 100}\">\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] && cbPlanMapData[widgetData?.content?.identifier]?.contentStatus < 2\">\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>",
|
|
10376
10379
|
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}"]
|
|
10377
10380
|
}] }
|
|
10378
10381
|
];
|
|
@@ -10633,6 +10636,7 @@ class CardMdoChannelV1Component {
|
|
|
10633
10636
|
this.router = router;
|
|
10634
10637
|
this.channelData = new EventEmitter();
|
|
10635
10638
|
this.emitTelemetry = new EventEmitter();
|
|
10639
|
+
this.isCardLoading = false;
|
|
10636
10640
|
this.widgetType = '';
|
|
10637
10641
|
this.widgetSubType = '';
|
|
10638
10642
|
this.langtranslations.languageSelectedObservable.subscribe((/**
|
|
@@ -10692,7 +10696,7 @@ class CardMdoChannelV1Component {
|
|
|
10692
10696
|
CardMdoChannelV1Component.decorators = [
|
|
10693
10697
|
{ type: Component, args: [{
|
|
10694
10698
|
selector: 'sb-uic-card-mdo-channel-v1',
|
|
10695
|
-
template: "<mat-card class=\"channels-card card-channels-container mr-5 padding-remove cursor-pointer\">\n
|
|
10699
|
+
template: "\n<ng-container *ngIf=\"!isCardLoading\">\n <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>\n</ng-container>\n\n\n<ng-container *ngIf=\"isCardLoading\">\n <mat-card class=\"channels-card card-channels-container mr-5 padding-remove cursor-pointer\">\n <div class=\"display-contents\">\n <ng-container >\n <a 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 <sb-uic-skeleton-loader class=\"w-full\" [width]=\"'100%'\" [height]=\"'140px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </div>\n <div class=\"flex title-container px-2\">\n <div class=\"flex-1 text-center mat-subheading-2 title-text ws-mat-black-text\">\n <sb-uic-skeleton-loader [width]=\"'100%'\" [height]=\"'12px'\" [bindingClass]=\"'flex rounded mb-2'\"></sb-uic-skeleton-loader>\n <sb-uic-skeleton-loader [width]=\"'100%'\" [height]=\"'12px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </div>\n </div>\n </div>\n </mat-card-content>\n </ng-container>\n </a>\n </ng-container>\n </div>\n </mat-card>\n</ng-container>",
|
|
10696
10700
|
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}"]
|
|
10697
10701
|
}] }
|
|
10698
10702
|
];
|
|
@@ -10708,7 +10712,8 @@ CardMdoChannelV1Component.ctorParameters = () => [
|
|
|
10708
10712
|
CardMdoChannelV1Component.propDecorators = {
|
|
10709
10713
|
widgetData: [{ type: Input }],
|
|
10710
10714
|
channelData: [{ type: Output }],
|
|
10711
|
-
emitTelemetry: [{ type: Output }]
|
|
10715
|
+
emitTelemetry: [{ type: Output }],
|
|
10716
|
+
isCardLoading: [{ type: Input }]
|
|
10712
10717
|
};
|
|
10713
10718
|
if (false) {
|
|
10714
10719
|
/** @type {?} */
|
|
@@ -10718,6 +10723,8 @@ if (false) {
|
|
|
10718
10723
|
/** @type {?} */
|
|
10719
10724
|
CardMdoChannelV1Component.prototype.emitTelemetry;
|
|
10720
10725
|
/** @type {?} */
|
|
10726
|
+
CardMdoChannelV1Component.prototype.isCardLoading;
|
|
10727
|
+
/** @type {?} */
|
|
10721
10728
|
CardMdoChannelV1Component.prototype.defaultThumbnail;
|
|
10722
10729
|
/** @type {?} */
|
|
10723
10730
|
CardMdoChannelV1Component.prototype.sourceLogos;
|
|
@@ -11488,15 +11495,7 @@ class ContentStripWithTabsPillsComponent extends WidgetBaseComponent {
|
|
|
11488
11495
|
// setting initial values
|
|
11489
11496
|
strip.loaderWidgets = this.transformSkeletonToWidgets(strip);
|
|
11490
11497
|
this.processStrip(strip, [], 'fetching', false, null);
|
|
11491
|
-
this.fetchFromEnrollmentList(strip, calculateParentStatus);
|
|
11492
11498
|
this.fetchFromSearchV6(strip, calculateParentStatus);
|
|
11493
|
-
this.fetchFromTrendingContent(strip, calculateParentStatus);
|
|
11494
|
-
this.fetchAllTopContent(strip, calculateParentStatus);
|
|
11495
|
-
this.fetchAllFeaturedContent(strip, calculateParentStatus);
|
|
11496
|
-
this.fetchAllBookMarkData(strip, calculateParentStatus);
|
|
11497
|
-
this.fetchAllPlaylistSearch(strip, calculateParentStatus);
|
|
11498
|
-
this.fetchPlaylistReadData(strip, calculateParentStatus);
|
|
11499
|
-
this.fetchCiosContentData(strip, calculateParentStatus);
|
|
11500
11499
|
this.fetchForYouData(strip, calculateParentStatus);
|
|
11501
11500
|
this.fetchAllCbpPlans(strip, calculateParentStatus);
|
|
11502
11501
|
// this.enrollInterval = setInterval(() => {
|
|
@@ -11504,468 +11503,32 @@ class ContentStripWithTabsPillsComponent extends WidgetBaseComponent {
|
|
|
11504
11503
|
// }, 1000)
|
|
11505
11504
|
}
|
|
11506
11505
|
/**
|
|
11507
|
-
* @param {?}
|
|
11508
|
-
* @param {?=} calculateParentStatus
|
|
11506
|
+
* @param {?} data
|
|
11509
11507
|
* @return {?}
|
|
11510
11508
|
*/
|
|
11511
|
-
|
|
11512
|
-
|
|
11513
|
-
|
|
11514
|
-
|
|
11515
|
-
|
|
11516
|
-
|
|
11517
|
-
|
|
11518
|
-
|
|
11519
|
-
|
|
11520
|
-
|
|
11521
|
-
/** @type {?} */
|
|
11522
|
-
const queryParams = get(strip.request.enrollmentList, 'queryParams');
|
|
11523
|
-
if (this.configSvc.userProfile) {
|
|
11524
|
-
userId = this.configSvc.userProfile.userId;
|
|
11509
|
+
toggleInfo(data) {
|
|
11510
|
+
/** @type {?} */
|
|
11511
|
+
const stripInfo = this.stripsResultDataMap[data.key].stripInfo;
|
|
11512
|
+
if (stripInfo) {
|
|
11513
|
+
if (stripInfo.mode !== 'below') {
|
|
11514
|
+
this.loggerSvc.warn(`strip info mode: ${stripInfo.mode} not implemented yet`);
|
|
11515
|
+
stripInfo.mode = 'below';
|
|
11516
|
+
}
|
|
11517
|
+
if (stripInfo.mode === 'below') {
|
|
11518
|
+
this.stripsResultDataMap[data.key].stripInfo = Object.assign({}, stripInfo, { visibilityMode: stripInfo.visibilityMode === 'hidden' ? 'visible' : 'hidden' });
|
|
11525
11519
|
}
|
|
11526
|
-
// tslint:disable-next-line: deprecation
|
|
11527
|
-
this.userSvc.fetchUserBatchList(userId, queryParams).subscribe((/**
|
|
11528
|
-
* @param {?} result
|
|
11529
|
-
* @return {?}
|
|
11530
|
-
*/
|
|
11531
|
-
(result) => {
|
|
11532
|
-
/** @type {?} */
|
|
11533
|
-
const courses = result && result.courses;
|
|
11534
|
-
/** @type {?} */
|
|
11535
|
-
const showViewMore = Boolean(courses.length > 5 && strip.stripConfig && strip.stripConfig.postCardForSearch);
|
|
11536
|
-
/** @type {?} */
|
|
11537
|
-
const viewMoreUrl = showViewMore
|
|
11538
|
-
? {
|
|
11539
|
-
path: (strip.viewMoreUrl && strip.viewMoreUrl.path) || '',
|
|
11540
|
-
queryParams: {
|
|
11541
|
-
q: strip.viewMoreUrl && strip.viewMoreUrl.queryParams,
|
|
11542
|
-
f: strip.request && strip.request.searchV6 && strip.request.searchV6.filters
|
|
11543
|
-
? JSON.stringify(
|
|
11544
|
-
// this.searchServSvc.transformSearchV6Filters(
|
|
11545
|
-
strip.request.searchV6.filters
|
|
11546
|
-
// ),
|
|
11547
|
-
)
|
|
11548
|
-
: {},
|
|
11549
|
-
},
|
|
11550
|
-
}
|
|
11551
|
-
: null;
|
|
11552
|
-
if (courses && courses.length) {
|
|
11553
|
-
content = courses.map((/**
|
|
11554
|
-
* @param {?} c
|
|
11555
|
-
* @return {?}
|
|
11556
|
-
*/
|
|
11557
|
-
(c) => {
|
|
11558
|
-
/** @type {?} */
|
|
11559
|
-
const contentTemp = c.content;
|
|
11560
|
-
contentTemp.completionPercentage = c.completionPercentage || c.progress || 0;
|
|
11561
|
-
contentTemp.completionStatus = c.completionStatus || c.status || 0;
|
|
11562
|
-
contentTemp.enrolledDate = c.enrolledDate || '';
|
|
11563
|
-
contentTemp.lastContentAccessTime = c.lastContentAccessTime || '';
|
|
11564
|
-
contentTemp.lastReadContentStatus = c.lastReadContentStatus || '';
|
|
11565
|
-
contentTemp.lastReadContentId = c.lastReadContentId || '';
|
|
11566
|
-
contentTemp.lrcProgressDetails = c.lrcProgressDetails || '';
|
|
11567
|
-
contentTemp.issuedCertificates = c.issuedCertificates || [];
|
|
11568
|
-
contentTemp.batchId = c.batchId || '';
|
|
11569
|
-
return contentTemp;
|
|
11570
|
-
}));
|
|
11571
|
-
}
|
|
11572
|
-
// To filter content with completionPercentage > 0,
|
|
11573
|
-
// so that only those content will show in home page
|
|
11574
|
-
// continue learing strip
|
|
11575
|
-
// if (content && content.length) {
|
|
11576
|
-
// contentNew = content.filter((c: any) => {
|
|
11577
|
-
// /** commented as both are 0 after enrolll */
|
|
11578
|
-
// if (c.completionPercentage && c.completionPercentage > 0) {
|
|
11579
|
-
// return c
|
|
11580
|
-
// }
|
|
11581
|
-
// })
|
|
11582
|
-
// }
|
|
11583
|
-
// To sort in descending order of the enrolled date
|
|
11584
|
-
contentNew = (content || []).sort((/**
|
|
11585
|
-
* @param {?} a
|
|
11586
|
-
* @param {?} b
|
|
11587
|
-
* @return {?}
|
|
11588
|
-
*/
|
|
11589
|
-
(a, b) => {
|
|
11590
|
-
/** @type {?} */
|
|
11591
|
-
const dateA = new Date(a.lastContentAccessTime || 0);
|
|
11592
|
-
/** @type {?} */
|
|
11593
|
-
const dateB = new Date(b.lastContentAccessTime || 0);
|
|
11594
|
-
return dateB - dateA;
|
|
11595
|
-
}));
|
|
11596
|
-
if (strip.tabs && strip.tabs.length) {
|
|
11597
|
-
tabResults = this.splitEnrollmentTabsData(contentNew, strip);
|
|
11598
|
-
this.processStrip(strip, this.transformContentsToWidgets(contentNew, strip), 'done', calculateParentStatus, viewMoreUrl, tabResults);
|
|
11599
|
-
}
|
|
11600
|
-
else {
|
|
11601
|
-
this.processStrip(strip, this.transformContentsToWidgets(contentNew, strip), 'done', calculateParentStatus, viewMoreUrl);
|
|
11602
|
-
}
|
|
11603
|
-
}), (/**
|
|
11604
|
-
* @return {?}
|
|
11605
|
-
*/
|
|
11606
|
-
() => {
|
|
11607
|
-
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
11608
|
-
}));
|
|
11609
11520
|
}
|
|
11610
11521
|
}
|
|
11611
11522
|
/**
|
|
11612
|
-
* @
|
|
11523
|
+
* @private
|
|
11524
|
+
* @param {?} contents
|
|
11613
11525
|
* @param {?} strip
|
|
11614
11526
|
* @return {?}
|
|
11615
11527
|
*/
|
|
11616
|
-
|
|
11617
|
-
|
|
11618
|
-
|
|
11619
|
-
|
|
11620
|
-
const splitData = this.getInprogressAndCompleted(contentNew, (/**
|
|
11621
|
-
* @param {?} e
|
|
11622
|
-
* @return {?}
|
|
11623
|
-
*/
|
|
11624
|
-
(e) => e.completionStatus === 1 || e.completionPercentage < 100), strip);
|
|
11625
|
-
if (strip.tabs && strip.tabs.length) {
|
|
11626
|
-
for (let i = 0; i < strip.tabs.length; i += 1) {
|
|
11627
|
-
if (strip.tabs[i]) {
|
|
11628
|
-
tabResults.push(Object.assign({}, strip.tabs[i], { fetchTabStatus: 'done' }, (splitData.find((/**
|
|
11629
|
-
* @param {?} itmInner
|
|
11630
|
-
* @return {?}
|
|
11631
|
-
*/
|
|
11632
|
-
itmInner => {
|
|
11633
|
-
if (strip.tabs && strip.tabs[i] && itmInner.value === strip.tabs[i].value) {
|
|
11634
|
-
return itmInner;
|
|
11635
|
-
}
|
|
11636
|
-
return undefined;
|
|
11637
|
-
})))));
|
|
11638
|
-
}
|
|
11639
|
-
}
|
|
11640
|
-
}
|
|
11641
|
-
return tabResults;
|
|
11642
|
-
}
|
|
11643
|
-
/**
|
|
11644
|
-
* @param {?} array
|
|
11645
|
-
* @param {?} customFilter
|
|
11646
|
-
* @param {?} strip
|
|
11647
|
-
* @return {?}
|
|
11648
|
-
*/
|
|
11649
|
-
getInprogressAndCompleted(array, customFilter, strip) {
|
|
11650
|
-
/** @type {?} */
|
|
11651
|
-
const inprogress = [];
|
|
11652
|
-
/** @type {?} */
|
|
11653
|
-
const completed = [];
|
|
11654
|
-
array.forEach((/**
|
|
11655
|
-
* @param {?} e
|
|
11656
|
-
* @param {?} idx
|
|
11657
|
-
* @param {?} arr
|
|
11658
|
-
* @return {?}
|
|
11659
|
-
*/
|
|
11660
|
-
(e, idx, arr) => (customFilter(e, idx, arr) ? inprogress : completed).push(e)));
|
|
11661
|
-
return [
|
|
11662
|
-
{ value: 'inprogress', widgets: this.transformContentsToWidgets(inprogress, strip) },
|
|
11663
|
-
{ value: 'completed', widgets: this.transformContentsToWidgets(completed, strip) }
|
|
11664
|
-
];
|
|
11665
|
-
}
|
|
11666
|
-
// async fetchFromSearchV6(strip: NsContentStripWithTabs.IContentStripUnit, calculateParentStatus = true) {
|
|
11667
|
-
// if (strip.request && strip.request.searchV6 && Object.keys(strip.request.searchV6).length) {
|
|
11668
|
-
// // if (!(strip.request.searchV6.locale && strip.request.searchV6.locale.length > 0)) {
|
|
11669
|
-
// // if (this.configSvc.activeLocale) {
|
|
11670
|
-
// // strip.request.searchV6.locale = [this.configSvc.activeLocale.locals[0]]
|
|
11671
|
-
// // } else {
|
|
11672
|
-
// // strip.request.searchV6.locale = ['en']
|
|
11673
|
-
// // }
|
|
11674
|
-
// // }
|
|
11675
|
-
// let originalFilters: any = [];
|
|
11676
|
-
// // tslint:disable:no-console
|
|
11677
|
-
// console.log(originalFilters);
|
|
11678
|
-
// if (strip.request &&
|
|
11679
|
-
// strip.request.searchV6 &&
|
|
11680
|
-
// strip.request.searchV6.request &&
|
|
11681
|
-
// strip.request.searchV6.request.filters) {
|
|
11682
|
-
// originalFilters = strip.request.searchV6.request.filters;
|
|
11683
|
-
// strip.request.searchV6.request.filters = this.checkForDateFilters(strip.request.searchV6.request.filters);
|
|
11684
|
-
// strip.request.searchV6.request.filters = this.getFiltersFromArray(
|
|
11685
|
-
// strip.request.searchV6.request.filters,
|
|
11686
|
-
// );
|
|
11687
|
-
// }
|
|
11688
|
-
// if (strip.tabs && strip.tabs.length) {
|
|
11689
|
-
// // TODO: Have to extract requestRequired to outer level of tabs config
|
|
11690
|
-
// const firstTab = strip.tabs[0];
|
|
11691
|
-
// if (firstTab.requestRequired) {
|
|
11692
|
-
// if (this.stripsResultDataMap[strip.key] && this.stripsResultDataMap[strip.key].tabs) {
|
|
11693
|
-
// const allTabs = this.stripsResultDataMap[strip.key].tabs;
|
|
11694
|
-
// const currentTabFromMap = (allTabs && allTabs.length && allTabs[0]) as NsContentStripWithTabs.IContentStripTab;
|
|
11695
|
-
// this.getTabDataByNewReqSearchV6(strip, 0, currentTabFromMap, calculateParentStatus);
|
|
11696
|
-
// }
|
|
11697
|
-
// }
|
|
11698
|
-
// } else {
|
|
11699
|
-
// try {
|
|
11700
|
-
// const response = await this.searchV6Request(strip, strip.request, calculateParentStatus);
|
|
11701
|
-
// // console.log('calling after - response, ', response)
|
|
11702
|
-
// if (response && response.results) {
|
|
11703
|
-
// // console.log('calling after-- ')
|
|
11704
|
-
// if (response.results.result.content) {
|
|
11705
|
-
// if(strip.key === 'scheduledAssessment') {
|
|
11706
|
-
// this.enrollInterval = setInterval(() => {
|
|
11707
|
-
// this.checkInvitOnlyAssessments(response.results.result.content, strip, calculateParentStatus, response.viewMoreUrl)
|
|
11708
|
-
// // tslint:disable-next-line
|
|
11709
|
-
// }, 1000)
|
|
11710
|
-
// } else {
|
|
11711
|
-
// this.processStrip(
|
|
11712
|
-
// strip,
|
|
11713
|
-
// this.transformContentsToWidgets(response.results.result.content, strip),
|
|
11714
|
-
// 'done',
|
|
11715
|
-
// calculateParentStatus,
|
|
11716
|
-
// response.viewMoreUrl,
|
|
11717
|
-
// );
|
|
11718
|
-
// }
|
|
11719
|
-
// } else if (response.results.result.Event) {
|
|
11720
|
-
// this.processStrip(
|
|
11721
|
-
// strip,
|
|
11722
|
-
// this.transformEventsToWidgets(response.results.result.Event, strip),
|
|
11723
|
-
// 'done',
|
|
11724
|
-
// calculateParentStatus,
|
|
11725
|
-
// response.viewMoreUrl,
|
|
11726
|
-
// );
|
|
11727
|
-
// } else {
|
|
11728
|
-
// this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
11729
|
-
// }
|
|
11730
|
-
// } else {
|
|
11731
|
-
// this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
11732
|
-
// }
|
|
11733
|
-
// } catch (error) {
|
|
11734
|
-
// // Handle errors
|
|
11735
|
-
// // console.error('Error:', error);
|
|
11736
|
-
// }
|
|
11737
|
-
// }
|
|
11738
|
-
// }
|
|
11739
|
-
// }
|
|
11740
|
-
/**
|
|
11741
|
-
* @param {?} content
|
|
11742
|
-
* @param {?} strip
|
|
11743
|
-
* @param {?} calculateParentStatus
|
|
11744
|
-
* @param {?} viewMoreUrl
|
|
11745
|
-
* @return {?}
|
|
11746
|
-
*/
|
|
11747
|
-
checkInvitOnlyAssessments(content, strip, calculateParentStatus, viewMoreUrl) {
|
|
11748
|
-
if (localStorage.getItem('enrollmentMapData')) {
|
|
11749
|
-
this.enrollmentMapData = JSON.parse(localStorage.getItem('enrollmentMapData') || '{}');
|
|
11750
|
-
/** @type {?} */
|
|
11751
|
-
let filteredArray = [];
|
|
11752
|
-
content.forEach((/**
|
|
11753
|
-
* @param {?} data
|
|
11754
|
-
* @return {?}
|
|
11755
|
-
*/
|
|
11756
|
-
(data) => {
|
|
11757
|
-
if (this.enrollmentMapData[data.identifier]) {
|
|
11758
|
-
data['batch'] = this.enrollmentMapData[data.identifier].batch;
|
|
11759
|
-
data['completionPercentage'] = this.enrollmentMapData[data.identifier].completionPercentage;
|
|
11760
|
-
filteredArray.push(data);
|
|
11761
|
-
}
|
|
11762
|
-
}));
|
|
11763
|
-
this.processStrip(strip, this.transformContentsToWidgets(filteredArray, strip), 'done', calculateParentStatus, viewMoreUrl);
|
|
11764
|
-
clearInterval(this.enrollInterval);
|
|
11765
|
-
}
|
|
11766
|
-
}
|
|
11767
|
-
// async searchV6Request(strip: NsContentStripWithTabs.IContentStripUnit,
|
|
11768
|
-
// request: NsContentStripWithTabs.IContentStripUnit['request'],
|
|
11769
|
-
// calculateParentStatus: boolean
|
|
11770
|
-
// ): Promise<any> {
|
|
11771
|
-
// const originalFilters: any = [];
|
|
11772
|
-
// return new Promise<any>((resolve, reject) => {
|
|
11773
|
-
// if (request && request.searchV6) {
|
|
11774
|
-
// this.contentSvc.searchV6(request.searchV6).subscribe(results => {
|
|
11775
|
-
// const showViewMore = Boolean(
|
|
11776
|
-
// results.result.content && results.result.content.length > 5 && strip.stripConfig && strip.stripConfig.postCardForSearch,
|
|
11777
|
-
// );
|
|
11778
|
-
// const viewMoreUrl = showViewMore
|
|
11779
|
-
// ? {
|
|
11780
|
-
// path: strip.viewMoreUrl && strip.viewMoreUrl.path || '',
|
|
11781
|
-
// queryParams: {
|
|
11782
|
-
// tab: 'Learn',
|
|
11783
|
-
// q: strip.viewMoreUrl && strip.viewMoreUrl.queryParams,
|
|
11784
|
-
// f:
|
|
11785
|
-
// request &&
|
|
11786
|
-
// request.searchV6 &&
|
|
11787
|
-
// request.searchV6.request &&
|
|
11788
|
-
// request.searchV6.request.filters
|
|
11789
|
-
// ? JSON.stringify(
|
|
11790
|
-
// this.transformSearchV6FiltersV2(
|
|
11791
|
-
// originalFilters,
|
|
11792
|
-
// )
|
|
11793
|
-
// )
|
|
11794
|
-
// : {},
|
|
11795
|
-
// },
|
|
11796
|
-
// }
|
|
11797
|
-
// : null;
|
|
11798
|
-
// // if (viewMoreUrl && viewMoreUrl.queryParams) {
|
|
11799
|
-
// // viewMoreUrl.queryParams = viewMoreUrl.queryParams
|
|
11800
|
-
// // }
|
|
11801
|
-
// resolve({ results, viewMoreUrl });
|
|
11802
|
-
// }, (error: any) => {
|
|
11803
|
-
// this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
11804
|
-
// reject(error);
|
|
11805
|
-
// },
|
|
11806
|
-
// );
|
|
11807
|
-
// }
|
|
11808
|
-
// });
|
|
11809
|
-
// }
|
|
11810
|
-
/**
|
|
11811
|
-
* @param {?} strip
|
|
11812
|
-
* @param {?=} calculateParentStatus
|
|
11813
|
-
* @return {?}
|
|
11814
|
-
*/
|
|
11815
|
-
fetchFromTrendingContent(strip, calculateParentStatus = true) {
|
|
11816
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
11817
|
-
if (strip.request && strip.request.trendingSearch && Object.keys(strip.request.trendingSearch).length) {
|
|
11818
|
-
// if (!(strip.request.searchV6.locale && strip.request.searchV6.locale.length > 0)) {
|
|
11819
|
-
// if (this.configSvc.activeLocale) {
|
|
11820
|
-
// strip.request.searchV6.locale = [this.configSvc.activeLocale.locals[0]]
|
|
11821
|
-
// } else {
|
|
11822
|
-
// strip.request.searchV6.locale = ['en']
|
|
11823
|
-
// }
|
|
11824
|
-
// }
|
|
11825
|
-
/** @type {?} */
|
|
11826
|
-
let originalFilters = [];
|
|
11827
|
-
// tslint:disable:no-console
|
|
11828
|
-
if (strip.request &&
|
|
11829
|
-
strip.request.trendingSearch &&
|
|
11830
|
-
strip.request.trendingSearch.request &&
|
|
11831
|
-
strip.request.trendingSearch.request.filters) {
|
|
11832
|
-
originalFilters = strip.request.trendingSearch.request.filters;
|
|
11833
|
-
strip.request.trendingSearch.request.filters = this.checkForDateFilters(strip.request.trendingSearch.request.filters);
|
|
11834
|
-
strip.request.trendingSearch.request.filters = this.getFiltersFromArray(strip.request.trendingSearch.request.filters);
|
|
11835
|
-
}
|
|
11836
|
-
if (strip.tabs && strip.tabs.length) {
|
|
11837
|
-
// TODO: Have to extract requestRequired to outer level of tabs config
|
|
11838
|
-
/** @type {?} */
|
|
11839
|
-
const firstTab = strip.tabs[0];
|
|
11840
|
-
if (firstTab.requestRequired) {
|
|
11841
|
-
if (this.stripsResultDataMap[strip.key] && this.stripsResultDataMap[strip.key].tabs) {
|
|
11842
|
-
/** @type {?} */
|
|
11843
|
-
const allTabs = this.stripsResultDataMap[strip.key].tabs;
|
|
11844
|
-
/** @type {?} */
|
|
11845
|
-
const currentTabFromMap = (/** @type {?} */ ((allTabs && allTabs.length && allTabs[0])));
|
|
11846
|
-
this.getTabDataByNewReqTrending(strip, 0, 0, currentTabFromMap, calculateParentStatus);
|
|
11847
|
-
}
|
|
11848
|
-
}
|
|
11849
|
-
}
|
|
11850
|
-
else {
|
|
11851
|
-
try {
|
|
11852
|
-
/** @type {?} */
|
|
11853
|
-
const response = yield this.trendingSearchRequest(strip, strip.request, calculateParentStatus);
|
|
11854
|
-
if (response && response.results && response.results.response) {
|
|
11855
|
-
/** @type {?} */
|
|
11856
|
-
const content = response.results.response[strip.request.trendingSearch.responseKey] || [];
|
|
11857
|
-
this.processStrip(strip, this.transformContentsToWidgets(content, strip), 'done', calculateParentStatus, response.viewMoreUrl || '');
|
|
11858
|
-
if (!content.length) {
|
|
11859
|
-
this.emptyResponse.emit(true);
|
|
11860
|
-
}
|
|
11861
|
-
}
|
|
11862
|
-
else {
|
|
11863
|
-
this.emptyResponse.emit(true);
|
|
11864
|
-
this.processStrip(strip, [], 'done', calculateParentStatus, null);
|
|
11865
|
-
}
|
|
11866
|
-
}
|
|
11867
|
-
catch (error) {
|
|
11868
|
-
// Handle errors
|
|
11869
|
-
this.emptyResponse.emit(true);
|
|
11870
|
-
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
11871
|
-
}
|
|
11872
|
-
}
|
|
11873
|
-
}
|
|
11874
|
-
});
|
|
11875
|
-
}
|
|
11876
|
-
// async trendingSearchRequest(strip: NsContentStripWithTabs.IContentStripUnit,
|
|
11877
|
-
// request: NsContentStripWithTabs.IContentStripUnit['request'],
|
|
11878
|
-
// calculateParentStatus: boolean
|
|
11879
|
-
// ): Promise<any> {
|
|
11880
|
-
// const originalFilters: any = [];
|
|
11881
|
-
// return new Promise<any>((resolve, reject) => {
|
|
11882
|
-
// if (request && request.trendingSearch) {
|
|
11883
|
-
// // check for the request if it has dynamic values]
|
|
11884
|
-
// if (request.trendingSearch.request.filters.organisation &&
|
|
11885
|
-
// request.trendingSearch.request.filters.organisation.indexOf('<orgID>') >= 0
|
|
11886
|
-
// ) {
|
|
11887
|
-
// let userRootOrgId;
|
|
11888
|
-
// if (this.configSvc.userProfile) {
|
|
11889
|
-
// userRootOrgId = this.configSvc.userProfile.rootOrgId;
|
|
11890
|
-
// }
|
|
11891
|
-
// request.trendingSearch.request.filters.organisation = userRootOrgId;
|
|
11892
|
-
// }
|
|
11893
|
-
// this.contentSvc.trendingContentSearch(request.trendingSearch).subscribe(results => {
|
|
11894
|
-
// const showViewMore = Boolean(
|
|
11895
|
-
// results.result &&
|
|
11896
|
-
// strip.request &&
|
|
11897
|
-
// results.result[strip.request.trendingSearch.responseKey] &&
|
|
11898
|
-
// results.result[strip.request.trendingSearch.responseKey].length > 5 &&
|
|
11899
|
-
// strip.stripConfig && strip.stripConfig.postCardForSearch,
|
|
11900
|
-
// );
|
|
11901
|
-
// const viewMoreUrl = showViewMore
|
|
11902
|
-
// ? {
|
|
11903
|
-
// path: strip.viewMoreUrl && strip.viewMoreUrl.path || '',
|
|
11904
|
-
// queryParams: {
|
|
11905
|
-
// tab: 'Learn',
|
|
11906
|
-
// q: strip.viewMoreUrl && strip.viewMoreUrl.queryParams,
|
|
11907
|
-
// f:
|
|
11908
|
-
// request &&
|
|
11909
|
-
// request.trendingSearch &&
|
|
11910
|
-
// request.trendingSearch.request &&
|
|
11911
|
-
// request.trendingSearch.request.filters
|
|
11912
|
-
// ? JSON.stringify(
|
|
11913
|
-
// this.transformSearchV6FiltersV2(
|
|
11914
|
-
// originalFilters,
|
|
11915
|
-
// )
|
|
11916
|
-
// )
|
|
11917
|
-
// : {},
|
|
11918
|
-
// },
|
|
11919
|
-
// }
|
|
11920
|
-
// : null;
|
|
11921
|
-
// let proccesedResult: any = []
|
|
11922
|
-
// if (results && results.response && results.response.certifications) {
|
|
11923
|
-
// results.response.certifications.map((result: any) => {
|
|
11924
|
-
// if (result.source === this.channnelName) {
|
|
11925
|
-
// proccesedResult.push(result)
|
|
11926
|
-
// }
|
|
11927
|
-
// })
|
|
11928
|
-
// }
|
|
11929
|
-
// results = {response: {certifications: proccesedResult}}
|
|
11930
|
-
// resolve({ results, viewMoreUrl });
|
|
11931
|
-
// }, (error: any) => {
|
|
11932
|
-
// if (error.error && error.error.status === 400) {
|
|
11933
|
-
// this.processStrip(strip, [], 'done', calculateParentStatus, null);
|
|
11934
|
-
// }
|
|
11935
|
-
// // this.processStrip(strip, [], 'done', calculateParentStatus, null)
|
|
11936
|
-
// reject(error);
|
|
11937
|
-
// },
|
|
11938
|
-
// );
|
|
11939
|
-
// }
|
|
11940
|
-
// });
|
|
11941
|
-
// }
|
|
11942
|
-
/**
|
|
11943
|
-
* @param {?} data
|
|
11944
|
-
* @return {?}
|
|
11945
|
-
*/
|
|
11946
|
-
toggleInfo(data) {
|
|
11947
|
-
/** @type {?} */
|
|
11948
|
-
const stripInfo = this.stripsResultDataMap[data.key].stripInfo;
|
|
11949
|
-
if (stripInfo) {
|
|
11950
|
-
if (stripInfo.mode !== 'below') {
|
|
11951
|
-
this.loggerSvc.warn(`strip info mode: ${stripInfo.mode} not implemented yet`);
|
|
11952
|
-
stripInfo.mode = 'below';
|
|
11953
|
-
}
|
|
11954
|
-
if (stripInfo.mode === 'below') {
|
|
11955
|
-
this.stripsResultDataMap[data.key].stripInfo = Object.assign({}, stripInfo, { visibilityMode: stripInfo.visibilityMode === 'hidden' ? 'visible' : 'hidden' });
|
|
11956
|
-
}
|
|
11957
|
-
}
|
|
11958
|
-
}
|
|
11959
|
-
/**
|
|
11960
|
-
* @private
|
|
11961
|
-
* @param {?} contents
|
|
11962
|
-
* @param {?} strip
|
|
11963
|
-
* @return {?}
|
|
11964
|
-
*/
|
|
11965
|
-
transformContentsToWidgets(contents, strip) {
|
|
11966
|
-
return (contents || []).map((/**
|
|
11967
|
-
* @param {?} content
|
|
11968
|
-
* @param {?} idx
|
|
11528
|
+
transformContentsToWidgets(contents, strip) {
|
|
11529
|
+
return (contents || []).map((/**
|
|
11530
|
+
* @param {?} content
|
|
11531
|
+
* @param {?} idx
|
|
11969
11532
|
* @return {?}
|
|
11970
11533
|
*/
|
|
11971
11534
|
(content, idx) => (content ? {
|
|
@@ -12144,154 +11707,12 @@ class ContentStripWithTabsPillsComponent extends WidgetBaseComponent {
|
|
|
12144
11707
|
(strip.request.search && Object.keys(strip.request.search).length) ||
|
|
12145
11708
|
(strip.request.searchRegionRecommendation &&
|
|
12146
11709
|
Object.keys(strip.request.searchRegionRecommendation).length) ||
|
|
12147
|
-
(strip.request.searchV6 && Object.keys(strip.request.searchV6).length) ||
|
|
12148
|
-
(strip.request.enrollmentList && Object.keys(strip.request.enrollmentList).length) ||
|
|
12149
11710
|
(strip.request.cbpList && Object.keys(strip.request.cbpList).length) ||
|
|
12150
|
-
(strip.request.trendingSearch && Object.keys(strip.request.trendingSearch).length) ||
|
|
12151
|
-
(strip.request.topContent && Object.keys(strip.request.topContent).length) ||
|
|
12152
|
-
(strip.request.featureContent && Object.keys(strip.request.featureContent).length) ||
|
|
12153
|
-
(strip.request.bookmarkRead && Object.keys(strip.request.bookmarkRead).length) ||
|
|
12154
|
-
(strip.request.playlistSearch && Object.keys(strip.request.playlistSearch).length) ||
|
|
12155
|
-
(strip.request.playlistRead && Object.keys(strip.request.playlistRead).length) ||
|
|
12156
|
-
(strip.request.ciosContent && Object.keys(strip.request.ciosContent).length) ||
|
|
12157
11711
|
(strip && strip.tabs.length))) {
|
|
12158
11712
|
return true;
|
|
12159
11713
|
}
|
|
12160
11714
|
return false;
|
|
12161
11715
|
}
|
|
12162
|
-
// public tabClicked(tabEvent: MatTabChangeEvent, stripMap: IStripUnitContentData, stripKey: string) {
|
|
12163
|
-
// if (stripMap && stripMap.tabs && stripMap.tabs[tabEvent.index]) {
|
|
12164
|
-
// stripMap.tabs[tabEvent.index].fetchTabStatus = 'inprogress';
|
|
12165
|
-
// stripMap.tabs[tabEvent.index].tabLoading = true;
|
|
12166
|
-
// stripMap.showOnLoader = true;
|
|
12167
|
-
// }
|
|
12168
|
-
// const data: WsEvents.ITelemetryTabData = {
|
|
12169
|
-
// label: `${tabEvent.tab.textLabel}`,
|
|
12170
|
-
// index: tabEvent.index,
|
|
12171
|
-
// };
|
|
12172
|
-
// this.eventSvc.raiseInteractTelemetry(
|
|
12173
|
-
// {
|
|
12174
|
-
// type: WsEvents.EnumInteractTypes.CLICK,
|
|
12175
|
-
// subType: WsEvents.EnumInteractSubTypes.HOME_PAGE_STRIP_TABS,
|
|
12176
|
-
// id: `${_.camelCase(data.label)}-tab`,
|
|
12177
|
-
// },
|
|
12178
|
-
// {},
|
|
12179
|
-
// {
|
|
12180
|
-
// module: WsEvents.EnumTelemetrymodules.HOME,
|
|
12181
|
-
// }
|
|
12182
|
-
// );
|
|
12183
|
-
// const currentTabFromMap: any = stripMap.tabs && stripMap.tabs[tabEvent.index];
|
|
12184
|
-
// const currentStrip = this.widgetData.strips.find(s => s.key === stripKey);
|
|
12185
|
-
// if (this.stripsResultDataMap[stripKey] && currentTabFromMap) {
|
|
12186
|
-
// this.stripsResultDataMap[stripKey].viewMoreUrl.queryParams = {
|
|
12187
|
-
// ...this.stripsResultDataMap[stripKey].viewMoreUrl.queryParams,
|
|
12188
|
-
// tabSelected: currentTabFromMap.label,
|
|
12189
|
-
// };
|
|
12190
|
-
// }
|
|
12191
|
-
// if (currentStrip && currentTabFromMap && !currentTabFromMap.computeDataOnClick) {
|
|
12192
|
-
// if (currentTabFromMap.requestRequired && currentTabFromMap.request) {
|
|
12193
|
-
// // call API to get tab data and process
|
|
12194
|
-
// // this.processStrip(currentStrip, [], 'fetching', true, null)
|
|
12195
|
-
// if (currentTabFromMap.request.searchV6) {
|
|
12196
|
-
// this.getTabDataByNewReqSearchV6(currentStrip, tabEvent.index, currentTabFromMap, true);
|
|
12197
|
-
// } else if (currentTabFromMap.request.trendingSearch) {
|
|
12198
|
-
// this.getTabDataByNewReqTrending(currentStrip, tabEvent.index, 0, currentTabFromMap, true);
|
|
12199
|
-
// }
|
|
12200
|
-
// if (stripMap && stripMap.tabs && stripMap.tabs[tabEvent.index]) {
|
|
12201
|
-
// stripMap.tabs[tabEvent.index].tabLoading = false;
|
|
12202
|
-
// }
|
|
12203
|
-
// } else {
|
|
12204
|
-
// this.getTabDataByfilter(currentStrip, currentTabFromMap, true);
|
|
12205
|
-
// setTimeout(() => {
|
|
12206
|
-
// if (stripMap && stripMap.tabs && stripMap.tabs[tabEvent.index]) {
|
|
12207
|
-
// stripMap.tabs[tabEvent.index].tabLoading = false;
|
|
12208
|
-
// stripMap.tabs[tabEvent.index].fetchTabStatus = 'done';
|
|
12209
|
-
// stripMap.showOnLoader = false;
|
|
12210
|
-
// }
|
|
12211
|
-
// }, 200);
|
|
12212
|
-
// }
|
|
12213
|
-
// }
|
|
12214
|
-
// }
|
|
12215
|
-
// async getTabDataByNewReqSearchV6(
|
|
12216
|
-
// strip: NsContentStripWithTabs.IContentStripUnit,
|
|
12217
|
-
// tabIndex: number,
|
|
12218
|
-
// currentTab: NsContentStripWithTabs.IContentStripTab,
|
|
12219
|
-
// calculateParentStatus: boolean
|
|
12220
|
-
// ) {
|
|
12221
|
-
// try {
|
|
12222
|
-
// const response = await this.searchV6Request(strip, currentTab.request, calculateParentStatus);
|
|
12223
|
-
// if (response && response.results) {
|
|
12224
|
-
// const widgets = this.transformContentsToWidgets(response.results.result.content, strip);
|
|
12225
|
-
// let tabResults: any[] = [];
|
|
12226
|
-
// if (this.stripsResultDataMap[strip.key] && this.stripsResultDataMap[strip.key].tabs) {
|
|
12227
|
-
// const allTabs = this.stripsResultDataMap[strip.key].tabs;
|
|
12228
|
-
// if (allTabs && allTabs.length && allTabs[tabIndex]) {
|
|
12229
|
-
// allTabs[tabIndex] = {
|
|
12230
|
-
// ...allTabs[tabIndex],
|
|
12231
|
-
// widgets,
|
|
12232
|
-
// fetchTabStatus: 'done',
|
|
12233
|
-
// };
|
|
12234
|
-
// tabResults = allTabs;
|
|
12235
|
-
// }
|
|
12236
|
-
// }
|
|
12237
|
-
// this.processStrip(
|
|
12238
|
-
// strip,
|
|
12239
|
-
// widgets,
|
|
12240
|
-
// 'done',
|
|
12241
|
-
// calculateParentStatus,
|
|
12242
|
-
// response.viewMoreUrl,
|
|
12243
|
-
// tabResults // tabResults as widgets
|
|
12244
|
-
// );
|
|
12245
|
-
// } else {
|
|
12246
|
-
// this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
12247
|
-
// }
|
|
12248
|
-
// } catch (error) {
|
|
12249
|
-
// // Handle errors
|
|
12250
|
-
// // console.error('Error:', error);
|
|
12251
|
-
// }
|
|
12252
|
-
// }
|
|
12253
|
-
// async getTabDataByNewReqTrending(
|
|
12254
|
-
// strip: NsContentStripWithTabs.IContentStripUnit,
|
|
12255
|
-
// tabIndex: number,
|
|
12256
|
-
// currentTab: NsContentStripWithTabs.IContentStripTab,
|
|
12257
|
-
// calculateParentStatus: boolean
|
|
12258
|
-
// ) {
|
|
12259
|
-
// try {
|
|
12260
|
-
// const response = await this.trendingSearchRequest(strip, currentTab.request, calculateParentStatus);
|
|
12261
|
-
// if (response && response.results && response.results.response) {
|
|
12262
|
-
// const content = response.results.response[currentTab.value] || [];
|
|
12263
|
-
// const widgets = this.transformContentsToWidgets(content, strip);
|
|
12264
|
-
// // console.log('currentTab --- widgets', widgets)
|
|
12265
|
-
// let tabResults: any[] = [];
|
|
12266
|
-
// if (this.stripsResultDataMap[strip.key] && this.stripsResultDataMap[strip.key].tabs) {
|
|
12267
|
-
// const allTabs = this.stripsResultDataMap[strip.key].tabs;
|
|
12268
|
-
// if (allTabs && allTabs.length && allTabs[tabIndex]) {
|
|
12269
|
-
// allTabs[tabIndex] = {
|
|
12270
|
-
// ...allTabs[tabIndex],
|
|
12271
|
-
// widgets,
|
|
12272
|
-
// fetchTabStatus: 'done',
|
|
12273
|
-
// };
|
|
12274
|
-
// tabResults = allTabs;
|
|
12275
|
-
// }
|
|
12276
|
-
// }
|
|
12277
|
-
// // console.log('tabResults -++++***--', tabResults)
|
|
12278
|
-
// // console.log('calling after-- ')
|
|
12279
|
-
// this.processStrip(
|
|
12280
|
-
// strip,
|
|
12281
|
-
// widgets,
|
|
12282
|
-
// 'done',
|
|
12283
|
-
// calculateParentStatus,
|
|
12284
|
-
// response.viewMoreUrl,
|
|
12285
|
-
// tabResults // tabResults as widgets
|
|
12286
|
-
// );
|
|
12287
|
-
// } else {
|
|
12288
|
-
// this.processStrip(strip, [], 'done', calculateParentStatus, null);
|
|
12289
|
-
// }
|
|
12290
|
-
// } catch (error) {
|
|
12291
|
-
// // Handle errors
|
|
12292
|
-
// this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
12293
|
-
// }
|
|
12294
|
-
// }
|
|
12295
11716
|
/**
|
|
12296
11717
|
* @param {?} strip
|
|
12297
11718
|
* @param {?} currentTab
|
|
@@ -12300,653 +11721,70 @@ class ContentStripWithTabsPillsComponent extends WidgetBaseComponent {
|
|
|
12300
11721
|
*/
|
|
12301
11722
|
getTabDataByfilter(strip, currentTab, calculateParentStatus) {
|
|
12302
11723
|
// tslint:disable:no-console
|
|
12303
|
-
console.log('strip -- ', strip);
|
|
12304
|
-
// tslint:disable:no-console
|
|
12305
|
-
console.log('currentTab -- ', currentTab);
|
|
12306
|
-
// tslint:disable:no-console
|
|
12307
|
-
console.log('calculateParentStatus-- ', calculateParentStatus);
|
|
12308
|
-
// TODO: Write logic for individual filter if passed in config
|
|
12309
|
-
// add switch case based on config key passed
|
|
12310
|
-
}
|
|
12311
|
-
// async fetchAllCbpPlans(strip: any, calculateParentStatus = true) {
|
|
12312
|
-
// if (strip.request && strip.request.cbpList && Object.keys(strip.request.cbpList).length) {
|
|
12313
|
-
// let courses: NsContent.IContent[];
|
|
12314
|
-
// let tabResults: any[] = [];
|
|
12315
|
-
// const response = await this.userSvc.fetchCbpPlanList().toPromise();
|
|
12316
|
-
// if (response) {
|
|
12317
|
-
// courses = response;
|
|
12318
|
-
// if (strip.tabs && strip.tabs.length) {
|
|
12319
|
-
// tabResults = this.splitCbpTabsData(courses, strip);
|
|
12320
|
-
// await this.processStrip(
|
|
12321
|
-
// strip,
|
|
12322
|
-
// this.transformContentsToWidgets(courses, strip),
|
|
12323
|
-
// 'done',
|
|
12324
|
-
// calculateParentStatus,
|
|
12325
|
-
// '',
|
|
12326
|
-
// tabResults
|
|
12327
|
-
// );
|
|
12328
|
-
// } else {
|
|
12329
|
-
// this.processStrip(
|
|
12330
|
-
// strip,
|
|
12331
|
-
// this.transformContentsToWidgets(courses, strip),
|
|
12332
|
-
// 'done',
|
|
12333
|
-
// calculateParentStatus,
|
|
12334
|
-
// 'viewMoreUrl',
|
|
12335
|
-
// );
|
|
12336
|
-
// }
|
|
12337
|
-
// }
|
|
12338
|
-
// // this.userSvc.fetchCbpPlanList().subscribe( async (res: any) => {
|
|
12339
|
-
// // if (res) {
|
|
12340
|
-
// // console.log(res,'===============================>')
|
|
12341
|
-
// // courses = res
|
|
12342
|
-
// // if (strip.tabs && strip.tabs.length) {
|
|
12343
|
-
// // tabResults = this.splitCbpTabsData(courses, strip)
|
|
12344
|
-
// // await this.processStrip(
|
|
12345
|
-
// // strip,
|
|
12346
|
-
// // this.transformContentsToWidgets(courses, strip),
|
|
12347
|
-
// // 'done',
|
|
12348
|
-
// // calculateParentStatus,
|
|
12349
|
-
// // '',
|
|
12350
|
-
// // tabResults
|
|
12351
|
-
// // )
|
|
12352
|
-
// // } else {
|
|
12353
|
-
// // this.processStrip(
|
|
12354
|
-
// // strip,
|
|
12355
|
-
// // this.transformContentsToWidgets(courses, strip),
|
|
12356
|
-
// // 'done',
|
|
12357
|
-
// // calculateParentStatus,
|
|
12358
|
-
// // 'viewMoreUrl',
|
|
12359
|
-
// // )
|
|
12360
|
-
// // }
|
|
12361
|
-
// // }
|
|
12362
|
-
// // }, (_err: any) => {
|
|
12363
|
-
// // })
|
|
12364
|
-
// clearInterval(this.enrollInterval);
|
|
12365
|
-
// }
|
|
12366
|
-
// }
|
|
12367
|
-
// splitCbpTabsData(contentNew: NsContent.IContent[], strip: NsContentStripWithTabs.IContentStripUnit) {
|
|
12368
|
-
// const tabResults: any[] = [];
|
|
12369
|
-
// const splitData = this.getTabsList(
|
|
12370
|
-
// contentNew,
|
|
12371
|
-
// strip,
|
|
12372
|
-
// );
|
|
12373
|
-
// if (strip.tabs && strip.tabs.length) {
|
|
12374
|
-
// for (let i = 0; i < strip.tabs.length; i += 1) {
|
|
12375
|
-
// if (strip.tabs[i]) {
|
|
12376
|
-
// tabResults.push(
|
|
12377
|
-
// {
|
|
12378
|
-
// ...strip.tabs[i],
|
|
12379
|
-
// fetchTabStatus: 'done',
|
|
12380
|
-
// ...(splitData.find(itmInner => {
|
|
12381
|
-
// if (strip.tabs && strip.tabs[i] && itmInner.value === strip.tabs[i].value) {
|
|
12382
|
-
// return itmInner;
|
|
12383
|
-
// }
|
|
12384
|
-
// return undefined;
|
|
12385
|
-
// })),
|
|
12386
|
-
// }
|
|
12387
|
-
// );
|
|
12388
|
-
// }
|
|
12389
|
-
// }
|
|
12390
|
-
// }
|
|
12391
|
-
// return tabResults;
|
|
12392
|
-
// }
|
|
12393
|
-
// getTabsList(array: NsContent.IContent[],
|
|
12394
|
-
// strip: NsContentStripWithTabs.IContentStripUnit) {
|
|
12395
|
-
// let all: any[] = [];
|
|
12396
|
-
// let upcoming: any[] = [];
|
|
12397
|
-
// let overdue: any[] = [];
|
|
12398
|
-
// array.forEach((e: any) => {
|
|
12399
|
-
// all.push(e);
|
|
12400
|
-
// if (e.planDuration === NsCardContent.ACBPConst.OVERDUE) {
|
|
12401
|
-
// overdue.push(e);
|
|
12402
|
-
// } else if (e.planDuration === NsCardContent.ACBPConst.UPCOMING) {
|
|
12403
|
-
// upcoming.push(e);
|
|
12404
|
-
// }
|
|
12405
|
-
// });
|
|
12406
|
-
// const allCompleted = all.filter((allData: any) => allData.contentStatus === 2);
|
|
12407
|
-
// let allInCompleted = all.filter((allData: any) => allData.contentStatus < 2);
|
|
12408
|
-
// let allCompletedOverDue = allCompleted.filter((allData: any) => allData.planDuration === NsCardContent.ACBPConst.OVERDUE);
|
|
12409
|
-
// const allCompletedAll = allCompleted.filter((allData: any) => allData.planDuration !== NsCardContent.ACBPConst.OVERDUE);
|
|
12410
|
-
// allCompletedOverDue = allCompletedOverDue.sort((a: any, b: any): any => {
|
|
12411
|
-
// if (a.planDuration === NsCardContent.ACBPConst.OVERDUE && b.planDuration === NsCardContent.ACBPConst.OVERDUE) {
|
|
12412
|
-
// const firstDate: any = new Date(a.endDate);
|
|
12413
|
-
// const secondDate: any = new Date(b.endDate);
|
|
12414
|
-
// return firstDate > secondDate ? -1 : 1;
|
|
12415
|
-
// }
|
|
12416
|
-
// });
|
|
12417
|
-
// allInCompleted = allInCompleted.sort((a: any, b: any): any => {
|
|
12418
|
-
// if (a.planDuration === NsCardContent.ACBPConst.OVERDUE && b.planDuration === NsCardContent.ACBPConst.OVERDUE) {
|
|
12419
|
-
// const firstDate: any = new Date(a.endDate);
|
|
12420
|
-
// const secondDate: any = new Date(b.endDate);
|
|
12421
|
-
// return firstDate > secondDate ? -1 : 1;
|
|
12422
|
-
// }
|
|
12423
|
-
// });
|
|
12424
|
-
// all = [...allInCompleted, ...allCompletedAll, ...allCompletedOverDue];
|
|
12425
|
-
// overdue = overdue.filter((data: any): any => {
|
|
12426
|
-
// return data.contentStatus < 2;
|
|
12427
|
-
// });
|
|
12428
|
-
// overdue = overdue.sort((a: any, b: any): any => {
|
|
12429
|
-
// const firstDate: any = new Date(a.endDate);
|
|
12430
|
-
// const secondDate: any = new Date(b.endDate);
|
|
12431
|
-
// return firstDate > secondDate ? -1 : 1;
|
|
12432
|
-
// });
|
|
12433
|
-
// upcoming = upcoming.filter((data: any): any => {
|
|
12434
|
-
// return data.contentStatus < 2;
|
|
12435
|
-
// });
|
|
12436
|
-
// // this.getSelectedIndex(1)
|
|
12437
|
-
// return [
|
|
12438
|
-
// { value: 'all', widgets: this.transformContentsToWidgets(all, strip) },
|
|
12439
|
-
// { value: 'upcoming', widgets: this.transformContentsToWidgets(upcoming, strip) },
|
|
12440
|
-
// { value: 'overdue', widgets: this.transformContentsToWidgets(overdue, strip) }];
|
|
12441
|
-
// }
|
|
12442
|
-
/**
|
|
12443
|
-
* @param {?} stripsResultDataMap
|
|
12444
|
-
* @param {?} key
|
|
12445
|
-
* @return {?}
|
|
12446
|
-
*/
|
|
12447
|
-
getSelectedIndex(stripsResultDataMap, key) {
|
|
12448
|
-
/** @type {?} */
|
|
12449
|
-
let returnValue = 0;
|
|
12450
|
-
// if (key === 'cbpPlan') {
|
|
12451
|
-
// if (stripsResultDataMap.tabs.length) {
|
|
12452
|
-
// const data = stripsResultDataMap.tabs.filter((ele: any) => ele.value === 'upcoming');
|
|
12453
|
-
// returnValue = data[0].widgets && data[0].widgets.length > 0 ? 1 : 0;
|
|
12454
|
-
// }
|
|
12455
|
-
// }
|
|
12456
|
-
return returnValue;
|
|
12457
|
-
}
|
|
12458
|
-
/**
|
|
12459
|
-
* @param {?} label
|
|
12460
|
-
* @param {?} type
|
|
12461
|
-
* @return {?}
|
|
12462
|
-
*/
|
|
12463
|
-
translateLabels(label, type) {
|
|
12464
|
-
return this.langtranslations.translateLabel(label, type, '');
|
|
12465
|
-
}
|
|
12466
|
-
/**
|
|
12467
|
-
* @param {?} index
|
|
12468
|
-
* @param {?} item
|
|
12469
|
-
* @return {?}
|
|
12470
|
-
*/
|
|
12471
|
-
identify(index, item) {
|
|
12472
|
-
if (index >= 0) { }
|
|
12473
|
-
return item;
|
|
12474
|
-
}
|
|
12475
|
-
/**
|
|
12476
|
-
* @param {?} index
|
|
12477
|
-
* @param {?} item
|
|
12478
|
-
* @return {?}
|
|
12479
|
-
*/
|
|
12480
|
-
tracker(index, item) {
|
|
12481
|
-
if (index >= 0) { }
|
|
12482
|
-
return get(item, 'widgetData.content.identifier');
|
|
12483
|
-
}
|
|
12484
|
-
/**
|
|
12485
|
-
* @param {?} strip
|
|
12486
|
-
* @param {?=} calculateParentStatus
|
|
12487
|
-
* @return {?}
|
|
12488
|
-
*/
|
|
12489
|
-
fetchAllTopContent(strip, calculateParentStatus = true) {
|
|
12490
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
12491
|
-
if (strip.request && strip.request.topContent && Object.keys(strip.request.topContent).length) {
|
|
12492
|
-
/** @type {?} */
|
|
12493
|
-
let originalFilters = [];
|
|
12494
|
-
if (strip.request &&
|
|
12495
|
-
strip.request.topContent &&
|
|
12496
|
-
strip.request.topContent.request &&
|
|
12497
|
-
strip.request.topContent.request.filters) {
|
|
12498
|
-
originalFilters = strip.request.topContent.request.filters;
|
|
12499
|
-
strip.request.topContent.request.filters = this.postMethodFilters(strip.request.topContent.request.filters);
|
|
12500
|
-
}
|
|
12501
|
-
try {
|
|
12502
|
-
/** @type {?} */
|
|
12503
|
-
const response = yield this.postRequestMethod(strip, strip.request.topContent, strip.request.apiUrl, calculateParentStatus);
|
|
12504
|
-
// console.log('calling after - response, ', response)
|
|
12505
|
-
if (response && response.results) {
|
|
12506
|
-
// console.log('calling after-- ')
|
|
12507
|
-
if (response.results.result.content && response.results.result.content.length) {
|
|
12508
|
-
this.processStrip(strip, this.transformContentsToWidgets(response.results.result.content, strip), 'done', calculateParentStatus, response.viewMoreUrl);
|
|
12509
|
-
}
|
|
12510
|
-
else {
|
|
12511
|
-
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
12512
|
-
this.emptyResponse.emit(true);
|
|
12513
|
-
}
|
|
12514
|
-
}
|
|
12515
|
-
else {
|
|
12516
|
-
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
12517
|
-
this.emptyResponse.emit(true);
|
|
12518
|
-
}
|
|
12519
|
-
}
|
|
12520
|
-
catch (error) {
|
|
12521
|
-
// Handle errors
|
|
12522
|
-
// console.error('Error:', error);
|
|
12523
|
-
}
|
|
12524
|
-
}
|
|
12525
|
-
});
|
|
12526
|
-
}
|
|
12527
|
-
/**
|
|
12528
|
-
* @param {?} strip
|
|
12529
|
-
* @param {?=} calculateParentStatus
|
|
12530
|
-
* @return {?}
|
|
12531
|
-
*/
|
|
12532
|
-
fetchAllFeaturedContent(strip, calculateParentStatus = true) {
|
|
12533
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
12534
|
-
if (strip.request && strip.request.featureContent && Object.keys(strip.request.featureContent).length) {
|
|
12535
|
-
/** @type {?} */
|
|
12536
|
-
let originalFilters = [];
|
|
12537
|
-
if (strip.request &&
|
|
12538
|
-
strip.request.featureContent &&
|
|
12539
|
-
strip.request.featureContent.request &&
|
|
12540
|
-
strip.request.featureContent.request.filters) {
|
|
12541
|
-
originalFilters = strip.request.featureContent.request.filters;
|
|
12542
|
-
strip.request.featureContent.request.filters = this.postMethodFilters(strip.request.featureContent.request.filters);
|
|
12543
|
-
}
|
|
12544
|
-
try {
|
|
12545
|
-
/** @type {?} */
|
|
12546
|
-
const response = yield this.postRequestMethod(strip, strip.request.featureContent, strip.request.apiUrl, calculateParentStatus);
|
|
12547
|
-
// console.log('calling after - response, ', response)
|
|
12548
|
-
if (response && response.results) {
|
|
12549
|
-
// console.log('calling after-- ')
|
|
12550
|
-
if (response.results.result.content && response.results.result.content.length) {
|
|
12551
|
-
this.processStrip(strip, this.transformContentsToWidgets(response.results.result.content, strip), 'done', calculateParentStatus, response.viewMoreUrl);
|
|
12552
|
-
}
|
|
12553
|
-
else {
|
|
12554
|
-
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
12555
|
-
this.emptyResponse.emit(true);
|
|
12556
|
-
}
|
|
12557
|
-
}
|
|
12558
|
-
else {
|
|
12559
|
-
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
12560
|
-
this.emptyResponse.emit(true);
|
|
12561
|
-
}
|
|
12562
|
-
}
|
|
12563
|
-
catch (error) {
|
|
12564
|
-
this.emptyResponse.emit(true);
|
|
12565
|
-
// Handle errors
|
|
12566
|
-
// console.error('Error:', error);
|
|
12567
|
-
}
|
|
12568
|
-
}
|
|
12569
|
-
});
|
|
12570
|
-
}
|
|
12571
|
-
/**
|
|
12572
|
-
* @param {?} stripData
|
|
12573
|
-
* @return {?}
|
|
12574
|
-
*/
|
|
12575
|
-
raiseTelemetry(stripData) {
|
|
12576
|
-
this.telemtryResponse.emit(stripData);
|
|
12577
|
-
}
|
|
12578
|
-
/**
|
|
12579
|
-
* @param {?} strip
|
|
12580
|
-
* @param {?} request
|
|
12581
|
-
* @param {?} apiUrl
|
|
12582
|
-
* @param {?} calculateParentStatus
|
|
12583
|
-
* @return {?}
|
|
12584
|
-
*/
|
|
12585
|
-
postRequestMethod(strip, request, apiUrl, calculateParentStatus) {
|
|
12586
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
12587
|
-
return new Promise((/**
|
|
12588
|
-
* @param {?} resolve
|
|
12589
|
-
* @param {?} reject
|
|
12590
|
-
* @return {?}
|
|
12591
|
-
*/
|
|
12592
|
-
(resolve, reject) => {
|
|
12593
|
-
if (request && request) {
|
|
12594
|
-
this.contentSvc.postApiMethod(apiUrl, request).subscribe((/**
|
|
12595
|
-
* @param {?} results
|
|
12596
|
-
* @return {?}
|
|
12597
|
-
*/
|
|
12598
|
-
results => {
|
|
12599
|
-
if (results.result && results.result.content) {
|
|
12600
|
-
/** @type {?} */
|
|
12601
|
-
const showViewMore = Boolean(results.result.content && results.result.content.length > 5 && strip.stripConfig && strip.stripConfig.postCardForSearch);
|
|
12602
|
-
/** @type {?} */
|
|
12603
|
-
const viewMoreUrl = showViewMore
|
|
12604
|
-
? {
|
|
12605
|
-
path: strip.viewMoreUrl && strip.viewMoreUrl.path || '',
|
|
12606
|
-
queryParams: {
|
|
12607
|
-
tab: 'Learn',
|
|
12608
|
-
q: strip.viewMoreUrl && strip.viewMoreUrl.queryParams,
|
|
12609
|
-
f: {},
|
|
12610
|
-
},
|
|
12611
|
-
}
|
|
12612
|
-
: null;
|
|
12613
|
-
resolve({ results, viewMoreUrl });
|
|
12614
|
-
}
|
|
12615
|
-
else if (results && results.data) {
|
|
12616
|
-
/** @type {?} */
|
|
12617
|
-
const showViewMore = Boolean(results.data && results.data.length > 5 && strip.stripConfig && strip.stripConfig.postCardForSearch);
|
|
12618
|
-
/** @type {?} */
|
|
12619
|
-
const viewMoreUrl = showViewMore ? {
|
|
12620
|
-
path: strip.viewMoreUrl && strip.viewMoreUrl.path || '',
|
|
12621
|
-
queryParams: {
|
|
12622
|
-
tab: 'Learn',
|
|
12623
|
-
q: strip.viewMoreUrl && strip.viewMoreUrl.queryParams,
|
|
12624
|
-
f: {},
|
|
12625
|
-
},
|
|
12626
|
-
}
|
|
12627
|
-
: null;
|
|
12628
|
-
resolve({ results, viewMoreUrl });
|
|
12629
|
-
}
|
|
12630
|
-
else if (results.result && results.result.data) {
|
|
12631
|
-
/** @type {?} */
|
|
12632
|
-
const showViewMore = Boolean(results.data && results.result.data && results.result.data.length > 5 && strip.stripConfig && strip.stripConfig.postCardForSearch);
|
|
12633
|
-
/** @type {?} */
|
|
12634
|
-
const viewMoreUrl = showViewMore ? {
|
|
12635
|
-
path: strip.viewMoreUrl && strip.viewMoreUrl.path || '',
|
|
12636
|
-
queryParams: {
|
|
12637
|
-
tab: 'Learn',
|
|
12638
|
-
q: strip.viewMoreUrl && strip.viewMoreUrl.queryParams,
|
|
12639
|
-
f: {},
|
|
12640
|
-
},
|
|
12641
|
-
}
|
|
12642
|
-
: null;
|
|
12643
|
-
resolve({ results, viewMoreUrl });
|
|
12644
|
-
}
|
|
12645
|
-
}), (/**
|
|
12646
|
-
* @param {?} error
|
|
12647
|
-
* @return {?}
|
|
12648
|
-
*/
|
|
12649
|
-
(error) => {
|
|
12650
|
-
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
12651
|
-
reject(error);
|
|
12652
|
-
}));
|
|
12653
|
-
}
|
|
12654
|
-
}));
|
|
12655
|
-
});
|
|
12656
|
-
}
|
|
12657
|
-
/**
|
|
12658
|
-
* @param {?} strip
|
|
12659
|
-
* @param {?} request
|
|
12660
|
-
* @param {?} apiUrl
|
|
12661
|
-
* @param {?} calculateParentStatus
|
|
12662
|
-
* @return {?}
|
|
12663
|
-
*/
|
|
12664
|
-
getRequestMethod(strip, request, apiUrl, calculateParentStatus) {
|
|
12665
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
12666
|
-
/** @type {?} */
|
|
12667
|
-
const originalFilters = [];
|
|
12668
|
-
return new Promise((/**
|
|
12669
|
-
* @param {?} resolve
|
|
12670
|
-
* @param {?} reject
|
|
12671
|
-
* @return {?}
|
|
12672
|
-
*/
|
|
12673
|
-
(resolve, reject) => {
|
|
12674
|
-
if (request && request) {
|
|
12675
|
-
this.contentSvc.getApiMethod(apiUrl).subscribe((/**
|
|
12676
|
-
* @param {?} results
|
|
12677
|
-
* @return {?}
|
|
12678
|
-
*/
|
|
12679
|
-
results => {
|
|
12680
|
-
/** @type {?} */
|
|
12681
|
-
const showViewMore = Boolean(results.result.data && results.result.data.orgList.length > 5 && strip.stripConfig && strip.stripConfig.postCardForSearch);
|
|
12682
|
-
/** @type {?} */
|
|
12683
|
-
const viewMoreUrl = showViewMore
|
|
12684
|
-
? {
|
|
12685
|
-
path: strip.viewMoreUrl && strip.viewMoreUrl.path || '',
|
|
12686
|
-
}
|
|
12687
|
-
: null;
|
|
12688
|
-
resolve({ results, viewMoreUrl });
|
|
12689
|
-
}), (/**
|
|
12690
|
-
* @param {?} error
|
|
12691
|
-
* @return {?}
|
|
12692
|
-
*/
|
|
12693
|
-
(error) => {
|
|
12694
|
-
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
12695
|
-
reject(error);
|
|
12696
|
-
}));
|
|
12697
|
-
}
|
|
12698
|
-
}));
|
|
12699
|
-
});
|
|
12700
|
-
}
|
|
12701
|
-
/**
|
|
12702
|
-
* @param {?} filters
|
|
12703
|
-
* @return {?}
|
|
12704
|
-
*/
|
|
12705
|
-
postMethodFilters(filters) {
|
|
12706
|
-
if (filters.organisation &&
|
|
12707
|
-
filters.organisation.indexOf('<orgID>') >= 0) {
|
|
12708
|
-
filters.organisation = this.providerId;
|
|
12709
|
-
}
|
|
12710
|
-
return filters;
|
|
12711
|
-
}
|
|
12712
|
-
/**
|
|
12713
|
-
* @param {?} apiUrl
|
|
12714
|
-
* @param {?} id
|
|
12715
|
-
* @return {?}
|
|
12716
|
-
*/
|
|
12717
|
-
getFullUrl(apiUrl, id) {
|
|
12718
|
-
/** @type {?} */
|
|
12719
|
-
let formedUrl = '';
|
|
12720
|
-
if (apiUrl.indexOf('<bookmarkId>') >= 0) {
|
|
12721
|
-
formedUrl = apiUrl.replace('<bookmarkId>', this.environment.mdoChannelsBookmarkId);
|
|
12722
|
-
}
|
|
12723
|
-
else if (apiUrl.indexOf('<playlistKey>') >= 0 && apiUrl.indexOf('<orgID>') >= 0) {
|
|
12724
|
-
formedUrl = apiUrl.replace('<playlistKey>', this.providerId + id);
|
|
12725
|
-
formedUrl = formedUrl.replace('<orgID>', this.providerId);
|
|
12726
|
-
}
|
|
12727
|
-
return formedUrl;
|
|
12728
|
-
}
|
|
12729
|
-
/**
|
|
12730
|
-
* @param {?} stripData
|
|
12731
|
-
* @param {?} path
|
|
12732
|
-
* @param {?} queryParamsData
|
|
12733
|
-
* @return {?}
|
|
12734
|
-
*/
|
|
12735
|
-
redirectViewAll(stripData, path, queryParamsData) {
|
|
12736
|
-
if (this.emitViewAll) {
|
|
12737
|
-
this.viewAllResponse.emit(stripData);
|
|
12738
|
-
}
|
|
12739
|
-
else {
|
|
12740
|
-
this.router.navigate([path], { queryParams: queryParamsData });
|
|
12741
|
-
}
|
|
12742
|
-
}
|
|
12743
|
-
/**
|
|
12744
|
-
* @param {?} strip
|
|
12745
|
-
* @param {?=} calculateParentStatus
|
|
12746
|
-
* @return {?}
|
|
12747
|
-
*/
|
|
12748
|
-
fetchAllBookMarkData(strip, calculateParentStatus = true) {
|
|
12749
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
12750
|
-
if (strip.request && strip.request.bookmarkRead && Object.keys(strip.request.bookmarkRead).length) {
|
|
12751
|
-
/** @type {?} */
|
|
12752
|
-
let originalFilters = [];
|
|
12753
|
-
if (strip.request &&
|
|
12754
|
-
strip.request.bookmarkRead &&
|
|
12755
|
-
strip.request.bookmarkRead.bookmarkId) {
|
|
12756
|
-
strip.request.apiUrl = this.getFullUrl(strip.request.apiUrl, strip.request.bookmarkRead.bookmarkId);
|
|
12757
|
-
}
|
|
12758
|
-
try {
|
|
12759
|
-
/** @type {?} */
|
|
12760
|
-
const response = yield this.getRequestMethod(strip, strip.request.bookmarkRead, strip.request.apiUrl, calculateParentStatus);
|
|
12761
|
-
/** @type {?} */
|
|
12762
|
-
let content = response.results.result.data.orgList;
|
|
12763
|
-
if (response) {
|
|
12764
|
-
this.processStrip(strip, this.transformAllContentsToWidgets(content, strip), 'done', calculateParentStatus, response);
|
|
12765
|
-
}
|
|
12766
|
-
else {
|
|
12767
|
-
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
12768
|
-
this.emptyResponse.emit(true);
|
|
12769
|
-
}
|
|
12770
|
-
}
|
|
12771
|
-
catch (error) {
|
|
12772
|
-
this.emptyResponse.emit(true);
|
|
12773
|
-
// Handle errors
|
|
12774
|
-
// console.error('Error:', error);
|
|
12775
|
-
}
|
|
12776
|
-
}
|
|
12777
|
-
});
|
|
11724
|
+
console.log('strip -- ', strip);
|
|
11725
|
+
// tslint:disable:no-console
|
|
11726
|
+
console.log('currentTab -- ', currentTab);
|
|
11727
|
+
// tslint:disable:no-console
|
|
11728
|
+
console.log('calculateParentStatus-- ', calculateParentStatus);
|
|
11729
|
+
// TODO: Write logic for individual filter if passed in config
|
|
11730
|
+
// add switch case based on config key passed
|
|
12778
11731
|
}
|
|
12779
11732
|
/**
|
|
12780
|
-
* @
|
|
12781
|
-
* @param {?}
|
|
12782
|
-
* @param {?} strip
|
|
11733
|
+
* @param {?} stripsResultDataMap
|
|
11734
|
+
* @param {?} key
|
|
12783
11735
|
* @return {?}
|
|
12784
11736
|
*/
|
|
12785
|
-
|
|
12786
|
-
|
|
12787
|
-
|
|
12788
|
-
|
|
12789
|
-
* @return {?}
|
|
12790
|
-
*/
|
|
12791
|
-
(content, idx) => (content ? {
|
|
12792
|
-
widgetType: 'cardLib',
|
|
12793
|
-
widgetSubType: 'cardContentLib',
|
|
12794
|
-
widgetHostClass: 'mb-2',
|
|
12795
|
-
widgetData: Object.assign({ content }, (content.batch && { batch: content.batch }), { cardSubType: strip.stripConfig && strip.stripConfig.cardSubType, cardCustomeClass: strip.customeClass ? strip.customeClass : '', context: { pageSection: strip.key, position: idx }, intranetMode: strip.stripConfig && strip.stripConfig.intranetMode, deletedMode: strip.stripConfig && strip.stripConfig.deletedMode, contentTags: strip.stripConfig && strip.stripConfig.contentTags }),
|
|
12796
|
-
} : {
|
|
12797
|
-
widgetType: 'card',
|
|
12798
|
-
widgetSubType: 'cardContent',
|
|
12799
|
-
widgetHostClass: 'mb-2',
|
|
12800
|
-
widgetData: {},
|
|
12801
|
-
})));
|
|
11737
|
+
getSelectedIndex(stripsResultDataMap, key) {
|
|
11738
|
+
/** @type {?} */
|
|
11739
|
+
let returnValue = 0;
|
|
11740
|
+
return returnValue;
|
|
12802
11741
|
}
|
|
12803
11742
|
/**
|
|
12804
|
-
* @param {?}
|
|
12805
|
-
* @param {
|
|
11743
|
+
* @param {?} label
|
|
11744
|
+
* @param {?} type
|
|
12806
11745
|
* @return {?}
|
|
12807
11746
|
*/
|
|
12808
|
-
|
|
12809
|
-
return
|
|
12810
|
-
if (strip.request && strip.request.playlistSearch && Object.keys(strip.request.playlistSearch).length) {
|
|
12811
|
-
/** @type {?} */
|
|
12812
|
-
let originalFilters = [];
|
|
12813
|
-
if (strip.request &&
|
|
12814
|
-
strip.request.playlistSearch &&
|
|
12815
|
-
strip.request.playlistSearch.request &&
|
|
12816
|
-
strip.request.playlistSearch.request.filters) {
|
|
12817
|
-
originalFilters = strip.request.playlistSearch.request.filters;
|
|
12818
|
-
strip.request.playlistSearch.request.filters = this.postMethodFilters(strip.request.playlistSearch.request.filters);
|
|
12819
|
-
}
|
|
12820
|
-
try {
|
|
12821
|
-
/** @type {?} */
|
|
12822
|
-
const response = yield this.postRequestMethod(strip, strip.request.playlistSearch.request, strip.request.apiUrl, calculateParentStatus);
|
|
12823
|
-
// console.log('calling after - response, ', response)
|
|
12824
|
-
if (response && response.results) {
|
|
12825
|
-
// console.log('calling after-- ')
|
|
12826
|
-
if (response.results.result.data && response.results.result.data.length) {
|
|
12827
|
-
/** @type {?} */
|
|
12828
|
-
let finalPlaylistData = [];
|
|
12829
|
-
/** @type {?} */
|
|
12830
|
-
let programData = response.results.result.data;
|
|
12831
|
-
programData.forEach((/**
|
|
12832
|
-
* @param {?} prgData
|
|
12833
|
-
* @return {?}
|
|
12834
|
-
*/
|
|
12835
|
-
(prgData) => {
|
|
12836
|
-
if (prgData.children && prgData.children.length) {
|
|
12837
|
-
finalPlaylistData.push(prgData);
|
|
12838
|
-
}
|
|
12839
|
-
}));
|
|
12840
|
-
if (finalPlaylistData.length) {
|
|
12841
|
-
this.processStrip(strip, this.transformContentsToWidgets(finalPlaylistData, strip), 'done', calculateParentStatus, response.viewMoreUrl);
|
|
12842
|
-
}
|
|
12843
|
-
else {
|
|
12844
|
-
this.emptyResponse.emit(true);
|
|
12845
|
-
}
|
|
12846
|
-
}
|
|
12847
|
-
else {
|
|
12848
|
-
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
12849
|
-
this.emptyResponse.emit(true);
|
|
12850
|
-
}
|
|
12851
|
-
}
|
|
12852
|
-
else {
|
|
12853
|
-
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
12854
|
-
this.emptyResponse.emit(true);
|
|
12855
|
-
}
|
|
12856
|
-
}
|
|
12857
|
-
catch (error) {
|
|
12858
|
-
this.emptyResponse.emit(true);
|
|
12859
|
-
// Handle errors
|
|
12860
|
-
// console.error('Error:', error);
|
|
12861
|
-
}
|
|
12862
|
-
}
|
|
12863
|
-
});
|
|
11747
|
+
translateLabels(label, type) {
|
|
11748
|
+
return this.langtranslations.translateLabel(label, type, '');
|
|
12864
11749
|
}
|
|
12865
11750
|
/**
|
|
12866
|
-
* @param {?}
|
|
12867
|
-
* @param {
|
|
11751
|
+
* @param {?} index
|
|
11752
|
+
* @param {?} item
|
|
12868
11753
|
* @return {?}
|
|
12869
11754
|
*/
|
|
12870
|
-
|
|
12871
|
-
|
|
12872
|
-
|
|
12873
|
-
/** @type {?} */
|
|
12874
|
-
let originalFilters = [];
|
|
12875
|
-
if (strip.request &&
|
|
12876
|
-
strip.request.playlistRead &&
|
|
12877
|
-
strip.request.playlistRead.type) {
|
|
12878
|
-
strip.request.apiUrl = this.getFullUrl(strip.request.apiUrl, strip.request.playlistRead.type);
|
|
12879
|
-
}
|
|
12880
|
-
try {
|
|
12881
|
-
/** @type {?} */
|
|
12882
|
-
const response = yield this.getRequestMethod(strip, strip.request.playlistRead, strip.request.apiUrl, calculateParentStatus);
|
|
12883
|
-
if (response && response.results.result.content) {
|
|
12884
|
-
/** @type {?} */
|
|
12885
|
-
let content = response.results.result.content;
|
|
12886
|
-
this.processStrip(strip, this.transformAllContentsToWidgets(content, strip), 'done', calculateParentStatus, response);
|
|
12887
|
-
}
|
|
12888
|
-
else {
|
|
12889
|
-
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
12890
|
-
this.emptyResponse.emit(true);
|
|
12891
|
-
}
|
|
12892
|
-
}
|
|
12893
|
-
catch (error) {
|
|
12894
|
-
this.emptyResponse.emit(true);
|
|
12895
|
-
// Handle errors
|
|
12896
|
-
// console.error('Error:', error);
|
|
12897
|
-
}
|
|
12898
|
-
}
|
|
12899
|
-
});
|
|
11755
|
+
identify(index, item) {
|
|
11756
|
+
if (index >= 0) { }
|
|
11757
|
+
return item;
|
|
12900
11758
|
}
|
|
12901
11759
|
/**
|
|
12902
|
-
* @param {?}
|
|
12903
|
-
* @param {
|
|
11760
|
+
* @param {?} index
|
|
11761
|
+
* @param {?} item
|
|
12904
11762
|
* @return {?}
|
|
12905
11763
|
*/
|
|
12906
|
-
|
|
12907
|
-
|
|
12908
|
-
|
|
12909
|
-
|
|
12910
|
-
|
|
12911
|
-
|
|
12912
|
-
|
|
12913
|
-
|
|
12914
|
-
|
|
12915
|
-
|
|
12916
|
-
|
|
12917
|
-
|
|
12918
|
-
|
|
12919
|
-
|
|
12920
|
-
|
|
12921
|
-
|
|
12922
|
-
|
|
12923
|
-
|
|
12924
|
-
|
|
12925
|
-
|
|
12926
|
-
|
|
12927
|
-
|
|
12928
|
-
|
|
12929
|
-
|
|
12930
|
-
this.emptyResponse.emit(true);
|
|
12931
|
-
}
|
|
12932
|
-
}
|
|
12933
|
-
else {
|
|
12934
|
-
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
12935
|
-
this.emptyResponse.emit(true);
|
|
12936
|
-
}
|
|
12937
|
-
}
|
|
12938
|
-
else {
|
|
12939
|
-
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
12940
|
-
this.emptyResponse.emit(true);
|
|
12941
|
-
}
|
|
12942
|
-
}
|
|
12943
|
-
catch (error) {
|
|
12944
|
-
this.emptyResponse.emit(true);
|
|
12945
|
-
// Handle errors
|
|
12946
|
-
// console.error('Error:', error);
|
|
12947
|
-
}
|
|
12948
|
-
}
|
|
12949
|
-
});
|
|
11764
|
+
tracker(index, item) {
|
|
11765
|
+
if (index >= 0) { }
|
|
11766
|
+
return get(item, 'widgetData.content.identifier');
|
|
11767
|
+
}
|
|
11768
|
+
/**
|
|
11769
|
+
* @param {?} stripData
|
|
11770
|
+
* @return {?}
|
|
11771
|
+
*/
|
|
11772
|
+
raiseTelemetry(stripData) {
|
|
11773
|
+
this.telemtryResponse.emit(stripData);
|
|
11774
|
+
}
|
|
11775
|
+
/**
|
|
11776
|
+
* @param {?} stripData
|
|
11777
|
+
* @param {?} path
|
|
11778
|
+
* @param {?} queryParamsData
|
|
11779
|
+
* @return {?}
|
|
11780
|
+
*/
|
|
11781
|
+
redirectViewAll(stripData, path, queryParamsData) {
|
|
11782
|
+
if (this.emitViewAll) {
|
|
11783
|
+
this.viewAllResponse.emit(stripData);
|
|
11784
|
+
}
|
|
11785
|
+
else {
|
|
11786
|
+
this.router.navigate([path], { queryParams: queryParamsData });
|
|
11787
|
+
}
|
|
12950
11788
|
}
|
|
12951
11789
|
// new code writting from here====new====
|
|
12952
11790
|
/**
|
|
@@ -13024,18 +11862,7 @@ class ContentStripWithTabsPillsComponent extends WidgetBaseComponent {
|
|
|
13024
11862
|
if (response && response.results) {
|
|
13025
11863
|
// console.log('calling after-- ')
|
|
13026
11864
|
if (response.results.result.content) {
|
|
13027
|
-
|
|
13028
|
-
this.enrollInterval = setInterval((/**
|
|
13029
|
-
* @return {?}
|
|
13030
|
-
*/
|
|
13031
|
-
() => {
|
|
13032
|
-
this.checkInvitOnlyAssessments(response.results.result.content, strip, calculateParentStatus, response.viewMoreUrl);
|
|
13033
|
-
// tslint:disable-next-line
|
|
13034
|
-
}), 1000);
|
|
13035
|
-
}
|
|
13036
|
-
else {
|
|
13037
|
-
this.processStrip(strip, this.transformContentsToWidgets(response.results.result.content, strip), 'done', calculateParentStatus, response.viewMoreUrl);
|
|
13038
|
-
}
|
|
11865
|
+
this.processStrip(strip, this.transformContentsToWidgets(response.results.result.content, strip), 'done', calculateParentStatus, response.viewMoreUrl);
|
|
13039
11866
|
}
|
|
13040
11867
|
else if (response.results.result.Event) {
|
|
13041
11868
|
this.processStrip(strip, this.transformEventsToWidgets(response.results.result.Event, strip), 'done', calculateParentStatus, response.viewMoreUrl);
|
|
@@ -13355,12 +12182,17 @@ class ContentStripWithTabsPillsComponent extends WidgetBaseComponent {
|
|
|
13355
12182
|
}
|
|
13356
12183
|
else {
|
|
13357
12184
|
this.getTabDataByfilter(currentStrip, currentTabFromMap, true);
|
|
12185
|
+
if (stripMap && stripMap.tabs && stripMap.tabs[tabIndex]) {
|
|
12186
|
+
stripMap.tabs[tabIndex].pillsData[pillIndex].fetchTabStatus = 'inprogress';
|
|
12187
|
+
stripMap.tabs[tabIndex].pillsData[pillIndex].tabLoading = false;
|
|
12188
|
+
stripMap.showOnLoader = true;
|
|
12189
|
+
}
|
|
13358
12190
|
setTimeout((/**
|
|
13359
12191
|
* @return {?}
|
|
13360
12192
|
*/
|
|
13361
12193
|
() => {
|
|
13362
12194
|
if (stripMap && stripMap.tabs && stripMap.tabs[tabIndex]) {
|
|
13363
|
-
stripMap.tabs[tabIndex].pillsData[pillIndex].fetchTabStatus = '
|
|
12195
|
+
stripMap.tabs[tabIndex].pillsData[pillIndex].fetchTabStatus = 'done';
|
|
13364
12196
|
stripMap.tabs[tabIndex].pillsData[pillIndex].tabLoading = false;
|
|
13365
12197
|
stripMap.showOnLoader = false;
|
|
13366
12198
|
this.resetSelectedPill(stripMap.tabs[tabIndex].pillsData);
|
|
@@ -13433,22 +12265,13 @@ class ContentStripWithTabsPillsComponent extends WidgetBaseComponent {
|
|
|
13433
12265
|
*/
|
|
13434
12266
|
getSelectedPillIndex(tabdata, tabIndex) {
|
|
13435
12267
|
if (tabdata.pillsData && tabdata.pillsData.length) {
|
|
13436
|
-
// tabdata.pillsData.forEach((ele: any, index: any) => {
|
|
13437
|
-
// if(ele.selected) {
|
|
13438
|
-
// console.log(ele,'---------')
|
|
13439
|
-
// return index
|
|
13440
|
-
// }
|
|
13441
|
-
// // })
|
|
13442
|
-
// console.log(tabdata,'==========123')
|
|
13443
12268
|
/** @type {?} */
|
|
13444
12269
|
let index = tabdata.pillsData.findIndex((/**
|
|
13445
12270
|
* @param {?} pill
|
|
13446
12271
|
* @return {?}
|
|
13447
12272
|
*/
|
|
13448
12273
|
(pill) => {
|
|
13449
|
-
// if(pill.selected){
|
|
13450
12274
|
return pill.selected;
|
|
13451
|
-
// }
|
|
13452
12275
|
}));
|
|
13453
12276
|
return index;
|
|
13454
12277
|
}
|
|
@@ -13473,38 +12296,36 @@ class ContentStripWithTabsPillsComponent extends WidgetBaseComponent {
|
|
|
13473
12296
|
courses = response;
|
|
13474
12297
|
if (strip.tabs && strip.tabs.length) {
|
|
13475
12298
|
tabResults = this.splitCbpTabsData(courses, strip);
|
|
12299
|
+
/** @type {?} */
|
|
12300
|
+
let countOfWidget = true;
|
|
12301
|
+
if (strip && strip.tabs && strip.tabs.length) {
|
|
12302
|
+
strip.tabs.forEach((/**
|
|
12303
|
+
* @param {?} tab
|
|
12304
|
+
* @return {?}
|
|
12305
|
+
*/
|
|
12306
|
+
(tab) => {
|
|
12307
|
+
if (tab.pillsData && tab.pillsData.length) {
|
|
12308
|
+
tab.pillsData.forEach((/**
|
|
12309
|
+
* @param {?} pill
|
|
12310
|
+
* @return {?}
|
|
12311
|
+
*/
|
|
12312
|
+
(pill) => {
|
|
12313
|
+
if (pill && pill.widgets && pill.widgets.length) {
|
|
12314
|
+
if (countOfWidget) {
|
|
12315
|
+
pill.selected = true;
|
|
12316
|
+
countOfWidget = false;
|
|
12317
|
+
}
|
|
12318
|
+
}
|
|
12319
|
+
}));
|
|
12320
|
+
}
|
|
12321
|
+
}));
|
|
12322
|
+
}
|
|
13476
12323
|
yield this.processStrip(strip, this.transformContentsToWidgets(courses, strip), 'done', calculateParentStatus, '', tabResults);
|
|
13477
12324
|
}
|
|
13478
12325
|
else {
|
|
13479
12326
|
this.processStrip(strip, this.transformContentsToWidgets(courses, strip), 'done', calculateParentStatus, 'viewMoreUrl');
|
|
13480
12327
|
}
|
|
13481
12328
|
}
|
|
13482
|
-
// this.userSvc.fetchCbpPlanList().subscribe( async (res: any) => {
|
|
13483
|
-
// if (res) {
|
|
13484
|
-
// console.log(res,'===============================>')
|
|
13485
|
-
// courses = res
|
|
13486
|
-
// if (strip.tabs && strip.tabs.length) {
|
|
13487
|
-
// tabResults = this.splitCbpTabsData(courses, strip)
|
|
13488
|
-
// await this.processStrip(
|
|
13489
|
-
// strip,
|
|
13490
|
-
// this.transformContentsToWidgets(courses, strip),
|
|
13491
|
-
// 'done',
|
|
13492
|
-
// calculateParentStatus,
|
|
13493
|
-
// '',
|
|
13494
|
-
// tabResults
|
|
13495
|
-
// )
|
|
13496
|
-
// } else {
|
|
13497
|
-
// this.processStrip(
|
|
13498
|
-
// strip,
|
|
13499
|
-
// this.transformContentsToWidgets(courses, strip),
|
|
13500
|
-
// 'done',
|
|
13501
|
-
// calculateParentStatus,
|
|
13502
|
-
// 'viewMoreUrl',
|
|
13503
|
-
// )
|
|
13504
|
-
// }
|
|
13505
|
-
// }
|
|
13506
|
-
// }, (_err: any) => {
|
|
13507
|
-
// })
|
|
13508
12329
|
clearInterval(this.enrollInterval);
|
|
13509
12330
|
}
|
|
13510
12331
|
});
|
|
@@ -13522,11 +12343,17 @@ class ContentStripWithTabsPillsComponent extends WidgetBaseComponent {
|
|
|
13522
12343
|
if (strip.tabs && strip.tabs.length) {
|
|
13523
12344
|
for (let i = 0; i < strip.tabs.length; i += 1) {
|
|
13524
12345
|
if (strip.tabs[i].value === "myIgotPlans") {
|
|
12346
|
+
/** @type {?} */
|
|
12347
|
+
let checkWidgetAndActivePill = true;
|
|
13525
12348
|
if (strip.tabs[i].pillsData && strip.tabs[i].pillsData.length) {
|
|
13526
12349
|
for (let j = 0; j < strip.tabs[i].pillsData.length; j += 1) {
|
|
13527
|
-
if
|
|
13528
|
-
|
|
13529
|
-
|
|
12350
|
+
// if(j === 0 ){
|
|
12351
|
+
// if(strip.tabs[i].pillsData[j].widgets && strip.tabs[i].pillsData[j].widgets.length ) {
|
|
12352
|
+
// strip.tabs[i].pillsData[j].selected = true
|
|
12353
|
+
// checkWidgetAndActivePill = false
|
|
12354
|
+
// }
|
|
12355
|
+
// strip.tabs[i].pillsData[j].selected = true
|
|
12356
|
+
// }
|
|
13530
12357
|
if (strip.tabs[i].pillsData[j]) {
|
|
13531
12358
|
tabResults.push(Object.assign({}, strip.tabs[i].pillsData[j], { fetchTabStatus: 'done' }, (splitData.find((/**
|
|
13532
12359
|
* @param {?} itmInner
|
|
@@ -13651,7 +12478,6 @@ class ContentStripWithTabsPillsComponent extends WidgetBaseComponent {
|
|
|
13651
12478
|
(data) => {
|
|
13652
12479
|
return data.contentStatus < 2;
|
|
13653
12480
|
}));
|
|
13654
|
-
// this.getSelectedIndex(1)
|
|
13655
12481
|
return [
|
|
13656
12482
|
{ value: 'all', widgets: this.transformContentsToWidgets(all, strip) },
|
|
13657
12483
|
{ value: 'upcoming', widgets: this.transformContentsToWidgets(upcoming, strip) },
|
|
@@ -13678,7 +12504,7 @@ class ContentStripWithTabsPillsComponent extends WidgetBaseComponent {
|
|
|
13678
12504
|
ContentStripWithTabsPillsComponent.decorators = [
|
|
13679
12505
|
{ type: Component, args: [{
|
|
13680
12506
|
selector: 'sb-uic-content-strip-with-tabs-pills',
|
|
13681
|
-
template: "<ng-container *ngIf=\"!contentAvailable; else otherTemplate\"></ng-container>\n<ng-template #otherTemplate>\n <!-- <div *ngIf=\"showParentLoader\" class=\"text-center my-2\">\n <mat-spinner class=\"inline-block\"></mat-spinner>\n </div> -->\n <ng-container *ngIf=\"showParentError\" [sbUiResolverWidget]=\"widgetData.errorWidget\"></ng-container>\n <ng-container *ngIf=\"showParentNoData\" [sbUiResolverWidget]=\"widgetData.noDataWidget\"></ng-container>\n <ng-container *ngFor=\"let key of stripsKeyOrder; let i = index; trackBy: identify\">\n <ng-container *ngIf=\"isStripShowing(stripsResultDataMap[key])\">\n <a name=\"{{stripsResultDataMap[key]?.stripTitle}}\" [class]=\"key\">\n <div *ngIf=\"stripsResultDataMap && (getLength(stripsResultDataMap[key]) ||\n stripsResultDataMap[key]?.showOnNoData ||\n stripsResultDataMap[key]?.showOnLoader ||\n stripsResultDataMap[key]?.showOnError)\n \" [ngClass]=\"\n !widgetData?.isChannelStrip ? 'xs:px-8 sx:px-10ss' : i > 0 ? 'mt-12' : ''\n \" [id]=\"key\" [ngClass]=\"!widgetData?.isChannelStrip ? margin-bottom-custom : margin-bottom-xs\">\n <div [ngClass]=\"{ pad: stripsResultDataMap[key]?.stripBackground }\"\n [ngStyle]=\"{ 'background-color': stripsResultDataMap[key]?.stripBackground }\">\n <div class=\"flex flex-col pl-4 pr-4 md:pr-0 md:pl-0 \" [ngClass]=\"\n !widgetData?.isChannelStrip\n ? ''\n : stripsResultDataMap[key]?.stripTitle\n ? 'mb-8'\n : ''\n \">\n <div class=\"flex flex-1 items-center\">\n <p class=\"mat-subheading-1 margin-remove inline-block \" *ngIf=\"stripsResultDataMap[key]?.stripTitle\">\n <span class=\"capitalize\" *ngIf=\"stripsResultDataMap[key]?.disableTranslate\">\n {{stripsResultDataMap[key]?.stripTitle}}\n </span>\n <span *ngIf=\"!stripsResultDataMap[key]?.disableTranslate\">\n {{ translateLabels(stripsResultDataMap[key]?.stripTitle, 'home') }}\n </span>\n </p>\n\n <button *ngIf=\"stripsResultDataMap[key]?.stripInfo?.icon\" type=\"button\" mat-icon-button\n (click)=\"toggleInfo(stripsResultDataMap[key])\" i18n-matTooltip matTooltip=\"info\"\n class=\"margin-left-xs\">\n <mat-icon>{{ stripsResultDataMap[key]?.stripInfo?.icon.icon }}</mat-icon>\n </button>\n <a *ngIf=\"stripsResultDataMap[key]?.stripTitleLink?.link\"\n [routerLink]=\"stripsResultDataMap[key]?.stripTitleLink?.link\"\n [queryParams]=\"stripsResultDataMap[key]?.stripTitleLink?.link?.queryParams\">\n <mat-icon class=\"ws-mat-primary-primary-text ws-mat-default-text\" [color]=\"'accent'\">{{\n stripsResultDataMap[key]?.stripTitleLink?.icon }}</mat-icon>\n </a>\n <span class=\"spacer\"></span>\n <!-- viewAll start-->\n <!-- <div *ngIf=\"checkCondition(widgetData , stripsResultDataMap[key])\"\n class=\"ml-4 pl-2 view-more ws-mat-default-text\">\n <a class=\"flex ws-mat-default-text items-center justify-center mat-body-1 cursor-pointer\" \n (click)=\"raiseTelemetry(stripsResultDataMap[key]);redirectViewAll(stripsResultDataMap[key], stripsResultDataMap[key]?.viewMoreUrl?.path, stripsResultDataMap[key]?.viewMoreUrl?.queryParams )\">\n <span i18n class=\"ws-mat-default-text\">{{translateLabels(widgetData.strips[0].viewMoreUrl.viewMoreText,'home') || 'See all'}}</span>\n <mat-icon class=\"ws-mat-default-text mat-icon notranslate material-icons mat-icon-no-color\" color=\"accent\">navigate_next</mat-icon>\n </a>\n </div> -->\n <!-- viewAll end-->\n </div>\n <button mat-icon-button (click)=\"setHiddenForStrip(key)\" *ngIf=\"stripsResultDataMap[key]?.canHideStrip\">\n <mat-icon>close</mat-icon>\n </button>\n <mat-icon class=\"cursor-pointer\" *ngIf=\"stripsResultDataMap[key]?.mode === 'accordion' && isMobile\"\n (click)=\"showAccordionData = !showAccordionData\">{{ showAccordionData ? 'expand_less' : 'expand_more' }}\n </mat-icon>\n </div>\n\n <div class=\"mb-4\" *ngIf=\"checkVisible(stripsResultDataMap[key])\">\n <ng-container [sbUiResolverWidget]=\"getdata(stripsResultDataMap[key])\">\n </ng-container>\n </div>\n <ng-container *ngIf=\"stripsResultDataMap[key]?.showOnNoData\"\n [sbUiResolverWidget]=\"stripsResultDataMap[key]?.noDataWidget\"></ng-container>\n <ng-container *ngIf=\"stripsResultDataMap[key]?.showOnError\"\n [sbUiResolverWidget]=\"stripsResultDataMap[key]?.errorWidget\"></ng-container>\n <!-- IF no errors then proceed to show tabs or non tabs strip -->\n <ng-container *ngIf=\"!stripsResultDataMap[key]?.showOnNoData && !stripsResultDataMap[key]?.showOnError\">\n <ng-container *ngIf=\"stripsResultDataMap[key].tabs && stripsResultDataMap[key].tabs.length\">\n <mat-tab-group animationDuration=\"0ms\" [selectedIndex]=\"getSelectedIndex(stripsResultDataMap[key], key)\"\n class=\"mat-tab-labels w-full strips-tabgroup\" dynamicHeight\n (selectedTabChange)=\"tabClicked($event, 0, stripsResultDataMap[key], key)\">\n <mat-tab label=\"{{tab?.label}}\" *ngFor=\"let tab of stripsResultDataMap[key].tabs; let last = last;let tabIndex = index\">\n <ng-template mat-tab-label>\n <span>{{ translateLabels(tab?.label, 'home') }} </span>\n <span *ngIf=\"tab?.showTabDataCount && tab?.widgets?.length\">({{tab?.widgets?.length}})</span>\n </ng-template>\n\n <div class=\"wfull\" *ngIf=\"tab?.pillsData && tab?.pillsData?.length\">\n <div class=\"flex justify-between\">\n <div>\n <ng-container >\n <mat-chip-list class=\"content-pill\" aria-label=\"Fish selection\">\n <ng-container *ngFor=\"let pill of tab?.pillsData;let p = index\">\n <mat-chip [selected]=\"pill?.selected\" (click)=\"pillClicked($event, stripsResultDataMap[key], key, p, tabIndex)\">\n <span class=\"pill-name\">{{pill?.label}}</span></mat-chip>\n </ng-container>\n </mat-chip-list>\n </ng-container>\n </div>\n <!-- viewAll start-->\n <!-- <div *ngIf=\"checkCondition(widgetData , stripsResultDataMap[key])\"\n class=\"ml-4 pl-2 view-more ws-mat-default-text\">\n <a class=\"flex ws-mat-default-text items-center justify-center mat-body-1 cursor-pointer\" \n (click)=\"raiseTelemetry(stripsResultDataMap[key]);redirectViewAll(stripsResultDataMap[key], stripsResultDataMap[key]?.viewMoreUrl?.path, stripsResultDataMap[key]?.viewMoreUrl?.queryParams )\">\n <span i18n class=\"ws-mat-default-text\">{{translateLabels(widgetData.strips[0].viewMoreUrl.viewMoreText,'home') || 'See all'}}</span>\n <mat-icon class=\"ws-mat-default-text mat-icon notranslate material-icons mat-icon-no-color\" color=\"accent\">navigate_next</mat-icon>\n </a>\n </div> -->\n <!-- viewAll end-->\n </div>\n <div *ngIf=\"stripsResultDataMap && stripsResultDataMap[key]?.showOnLoader ||\n !tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.fetchTabStatus\"\n class=\"text-center my-2\">\n <sb-uic-horizontal-scroller-v2 [sliderConfig]=\"stripsResultDataMap[key]?.sliderConfig\" [id]=\"key+'-scroller'\"\n [loadStatus]=\"'fetching'\" [stripConfig]=\"stripsResultDataMap[key]?.stripConfig\">\n <ng-container *ngFor=\"let widget of stripsResultDataMap[key]?.loaderWidgets; trackBy: tracker\">\n <ng-container [sbUiResolverWidget]=\"widget\"></ng-container>\n </ng-container>\n </sb-uic-horizontal-scroller-v2>\n </div>\n <ng-container *ngIf=\"tab?.pillsData && tab?.pillsData.length && tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]\">\n <div *ngIf=\"((tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.fetchTabStatus && tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.fetchTabStatus === 'done') &&\n (!tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.widgets || !tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.widgets?.length))\">\n <ng-container *ngIf=\"tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.value === 'inprogress'; else msgTemp\">\n <div class=\"w-full flex flex-col items-center justify-center\">\n <img alt=\"\" class=\"mt-4 mb-4\" src=\"assets/icons/home/nodataDefault.svg\">\n <div class=\"mat-subheading-1 text-center info-content\">{{ 'contentstripmultiple.getReadyForLearningAdventure' | translate }} -\n <a class=\"click-here\" [routerLink]=\"'/page/learn'\">{{ 'contentstripmultiple.clickHere' | translate }}</a> {{ 'contentstripmultiple.toEnrollNextCourse' | translate }}</div>\n </div>\n </ng-container>\n <ng-template #msgTemp>\n <div class=\"w-full flex flex-col items-center justify-center\">\n <img alt=\"\" class=\"mt-4 mb-4\" src=\"assets/icons/home/nodataDefault.png\">\n <div class=\"mat-subheading-1 text-center\">{{ translateLabels(tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.nodataMsg, 'home') }}</div>\n </div>\n </ng-template>\n </div>\n </ng-container>\n <ng-container *ngIf=\"(tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.fetchTabStatus === 'done' || tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.widgets?.length)\">\n <ng-container *ngIf=\"!tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.tabLoading\">\n <sb-uic-horizontal-scroller-v2 [id]=\"key+'-scroller'\" [sliderConfig]=\"stripsResultDataMap[key]?.sliderConfig\" [widgetsLength]=\"tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.widgets?.length\"\n *ngIf=\"getContineuLearningLenth(stripsResultDataMap[key]) && showAccordion(key)\"\n [loadStatus]=\"'done'\" [defaultMaxWidgets]=\"tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.maxWidgets ||\n stripsResultDataMap[key]?.sliderConfig?.maxWidgets || defaultMaxWidgets\" [stripConfig]=\"stripsResultDataMap[key]?.stripConfig\">\n <ng-container *ngFor=\"let widget of tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.widgets| slice:0:(tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.maxWidgets ||\n stripsResultDataMap[key]?.sliderConfig?.maxWidgets || defaultMaxWidgets); trackBy: tracker\">\n <ng-container [sbUiResolverWidget]=\"widget\"></ng-container>\n </ng-container>\n </sb-uic-horizontal-scroller-v2>\n </ng-container>\n </ng-container>\n </div>\n </mat-tab>\n </mat-tab-group>\n </ng-container>\n </ng-container>\n </div>\n </div>\n </a>\n\n </ng-container>\n </ng-container>\n</ng-template>",
|
|
12507
|
+
template: "<ng-container *ngIf=\"!contentAvailable; else otherTemplate\"></ng-container>\n<ng-template #otherTemplate>\n <!-- <div *ngIf=\"showParentLoader\" class=\"text-center my-2\">\n <mat-spinner class=\"inline-block\"></mat-spinner>\n </div> -->\n <ng-container *ngIf=\"showParentError\" [sbUiResolverWidget]=\"widgetData.errorWidget\"></ng-container>\n <ng-container *ngIf=\"showParentNoData\" [sbUiResolverWidget]=\"widgetData.noDataWidget\"></ng-container>\n <ng-container *ngFor=\"let key of stripsKeyOrder; let i = index; trackBy: identify\">\n <ng-container *ngIf=\"isStripShowing(stripsResultDataMap[key])\">\n <a name=\"{{stripsResultDataMap[key]?.stripTitle}}\" [class]=\"key\">\n <div *ngIf=\"stripsResultDataMap && (getLength(stripsResultDataMap[key]) ||\n stripsResultDataMap[key]?.showOnNoData ||\n stripsResultDataMap[key]?.showOnLoader ||\n stripsResultDataMap[key]?.showOnError)\n \" [ngClass]=\"\n !widgetData?.isChannelStrip ? 'xs:px-8 sx:px-10ss' : i > 0 ? 'mt-12' : ''\n \" [id]=\"key\" [ngClass]=\"!widgetData?.isChannelStrip ? margin-bottom-custom : margin-bottom-xs\">\n <div [ngClass]=\"{ pad: stripsResultDataMap[key]?.stripBackground }\"\n [ngStyle]=\"{ 'background-color': stripsResultDataMap[key]?.stripBackground }\">\n <div class=\"flex flex-col pl-4 pr-4 md:pr-0 md:pl-0 \" [ngClass]=\"\n !widgetData?.isChannelStrip\n ? ''\n : stripsResultDataMap[key]?.stripTitle\n ? 'mb-8'\n : ''\n \">\n <div class=\"flex flex-1 items-center\">\n <p class=\"mat-subheading-1 margin-remove inline-block \" *ngIf=\"stripsResultDataMap[key]?.stripTitle\">\n <span class=\"capitalize\" *ngIf=\"stripsResultDataMap[key]?.disableTranslate\">\n {{stripsResultDataMap[key]?.stripTitle}}\n </span>\n <span *ngIf=\"!stripsResultDataMap[key]?.disableTranslate\">\n {{ translateLabels(stripsResultDataMap[key]?.stripTitle, 'home') }}\n </span>\n </p>\n\n <button *ngIf=\"stripsResultDataMap[key]?.stripInfo?.icon\" type=\"button\" mat-icon-button\n (click)=\"toggleInfo(stripsResultDataMap[key])\" i18n-matTooltip matTooltip=\"info\"\n class=\"margin-left-xs\">\n <mat-icon>{{ stripsResultDataMap[key]?.stripInfo?.icon.icon }}</mat-icon>\n </button>\n <a *ngIf=\"stripsResultDataMap[key]?.stripTitleLink?.link\"\n [routerLink]=\"stripsResultDataMap[key]?.stripTitleLink?.link\"\n [queryParams]=\"stripsResultDataMap[key]?.stripTitleLink?.link?.queryParams\">\n <mat-icon class=\"ws-mat-primary-primary-text ws-mat-default-text\" [color]=\"'accent'\">{{\n stripsResultDataMap[key]?.stripTitleLink?.icon }}</mat-icon>\n </a>\n <span class=\"spacer\"></span>\n <!-- viewAll start-->\n <!-- <div *ngIf=\"checkCondition(widgetData , stripsResultDataMap[key])\"\n class=\"ml-4 pl-2 view-more ws-mat-default-text\">\n <a class=\"flex ws-mat-default-text items-center justify-center mat-body-1 cursor-pointer\" \n (click)=\"raiseTelemetry(stripsResultDataMap[key]);redirectViewAll(stripsResultDataMap[key], stripsResultDataMap[key]?.viewMoreUrl?.path, stripsResultDataMap[key]?.viewMoreUrl?.queryParams )\">\n <span i18n class=\"ws-mat-default-text\">{{translateLabels(widgetData.strips[0].viewMoreUrl.viewMoreText,'home') || 'See all'}}</span>\n <mat-icon class=\"ws-mat-default-text mat-icon notranslate material-icons mat-icon-no-color\" color=\"accent\">navigate_next</mat-icon>\n </a>\n </div> -->\n <!-- viewAll end-->\n </div>\n <button mat-icon-button (click)=\"setHiddenForStrip(key)\" *ngIf=\"stripsResultDataMap[key]?.canHideStrip\">\n <mat-icon>close</mat-icon>\n </button>\n <mat-icon class=\"cursor-pointer\" *ngIf=\"stripsResultDataMap[key]?.mode === 'accordion' && isMobile\"\n (click)=\"showAccordionData = !showAccordionData\">{{ showAccordionData ? 'expand_less' : 'expand_more' }}\n </mat-icon>\n </div>\n\n <div class=\"mb-4\" *ngIf=\"checkVisible(stripsResultDataMap[key])\">\n <ng-container [sbUiResolverWidget]=\"getdata(stripsResultDataMap[key])\">\n </ng-container>\n </div>\n <ng-container *ngIf=\"stripsResultDataMap[key]?.showOnNoData\"\n [sbUiResolverWidget]=\"stripsResultDataMap[key]?.noDataWidget\"></ng-container>\n <ng-container *ngIf=\"stripsResultDataMap[key]?.showOnError\"\n [sbUiResolverWidget]=\"stripsResultDataMap[key]?.errorWidget\"></ng-container>\n <!-- IF no errors then proceed to show tabs or non tabs strip -->\n <ng-container *ngIf=\"!stripsResultDataMap[key]?.showOnNoData && !stripsResultDataMap[key]?.showOnError\">\n <ng-container *ngIf=\"stripsResultDataMap[key].tabs && stripsResultDataMap[key].tabs.length\">\n <mat-tab-group animationDuration=\"0ms\" [selectedIndex]=\"getSelectedIndex(stripsResultDataMap[key], key)\"\n class=\"mat-tab-labels w-full strips-tabgroup\" dynamicHeight\n (selectedTabChange)=\"tabClicked($event, 0, stripsResultDataMap[key], key)\">\n <mat-tab label=\"{{tab?.label}}\" *ngFor=\"let tab of stripsResultDataMap[key].tabs; let last = last;let tabIndex = index\">\n <ng-template mat-tab-label>\n <span>{{ translateLabels(tab?.label, 'home') }} </span>\n <span *ngIf=\"tab?.showTabDataCount && tab?.widgets?.length\">({{tab?.widgets?.length}})</span>\n </ng-template>\n\n <div class=\"wfull\" *ngIf=\"tab?.pillsData && tab?.pillsData?.length\">\n <div class=\"flex justify-between\">\n <div>\n <ng-container >\n <mat-chip-list class=\"content-pill\" aria-label=\"Fish selection\">\n <ng-container *ngFor=\"let pill of tab?.pillsData;let p = index\">\n <mat-chip [selected]=\"pill?.selected\" (click)=\"pillClicked($event, stripsResultDataMap[key], key, p, tabIndex)\">\n <span class=\"pill-name\">{{pill?.label}}</span></mat-chip>\n </ng-container>\n </mat-chip-list>\n </ng-container>\n </div>\n <!-- viewAll start-->\n <div *ngIf=\"checkCondition(widgetData , stripsResultDataMap[key])\"\n class=\"ml-4 pl-2 view-more ws-mat-default-text\">\n <a class=\"flex ws-mat-default-text items-center justify-center mat-body-1 cursor-pointer\" \n (click)=\"raiseTelemetry(stripsResultDataMap[key]);redirectViewAll(stripsResultDataMap[key], stripsResultDataMap[key]?.viewMoreUrl?.path, stripsResultDataMap[key]?.viewMoreUrl?.queryParams )\">\n <span i18n class=\"ws-mat-default-text\">{{translateLabels(widgetData.strips[0].viewMoreUrl.viewMoreText,'home') || 'See all'}}</span>\n <mat-icon class=\"ws-mat-default-text mat-icon notranslate material-icons mat-icon-no-color\" color=\"accent\">navigate_next</mat-icon>\n </a>\n </div>\n <!-- viewAll end-->\n </div>\n <div *ngIf=\"stripsResultDataMap && stripsResultDataMap[key]?.showOnLoader ||\n !tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.fetchTabStatus\"\n class=\"text-center my-2\">\n <sb-uic-horizontal-scroller-v2 [sliderConfig]=\"stripsResultDataMap[key]?.sliderConfig\" [id]=\"key+'-scroller'\"\n [loadStatus]=\"'fetching'\" [stripConfig]=\"stripsResultDataMap[key]?.stripConfig\">\n <ng-container *ngFor=\"let widget of stripsResultDataMap[key]?.loaderWidgets; trackBy: tracker\">\n <ng-container [sbUiResolverWidget]=\"widget\"></ng-container>\n </ng-container>\n </sb-uic-horizontal-scroller-v2>\n </div>\n <ng-container *ngIf=\"tab?.pillsData && tab?.pillsData.length && tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]\">\n <div *ngIf=\"((tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.fetchTabStatus && tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.fetchTabStatus === 'done') &&\n (!tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.widgets || !tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.widgets?.length))\">\n <ng-container *ngIf=\"tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.value === 'inprogress'; else msgTemp\">\n <div class=\"w-full flex flex-col items-center justify-center\">\n <img alt=\"\" class=\"mt-4 mb-4\" src=\"assets/icons/home/nodataDefault.svg\">\n <div class=\"mat-subheading-1 text-center info-content\">{{ 'contentstripmultiple.getReadyForLearningAdventure' | translate }} -\n <a class=\"click-here\" [routerLink]=\"'/page/learn'\">{{ 'contentstripmultiple.clickHere' | translate }}</a> {{ 'contentstripmultiple.toEnrollNextCourse' | translate }}</div>\n </div>\n </ng-container>\n <ng-template #msgTemp>\n <div class=\"w-full flex flex-col items-center justify-center\">\n <img alt=\"\" class=\"mt-4 mb-4\" src=\"assets/icons/home/nodataDefault.png\">\n <div class=\"mat-subheading-1 text-center\">{{ translateLabels(tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.nodataMsg, 'home') }}</div>\n </div>\n </ng-template>\n </div>\n </ng-container>\n <ng-container *ngIf=\"(tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.fetchTabStatus === 'done' || tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.widgets?.length)\">\n <ng-container *ngIf=\"!tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.tabLoading\">\n <sb-uic-horizontal-scroller-v2 [id]=\"key+'-scroller'\" [sliderConfig]=\"stripsResultDataMap[key]?.sliderConfig\" [widgetsLength]=\"tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.widgets?.length\"\n *ngIf=\"getContineuLearningLenth(stripsResultDataMap[key]) && showAccordion(key)\"\n [loadStatus]=\"'done'\" [defaultMaxWidgets]=\"tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.maxWidgets ||\n stripsResultDataMap[key]?.sliderConfig?.maxWidgets || defaultMaxWidgets\" [stripConfig]=\"stripsResultDataMap[key]?.stripConfig\">\n <ng-container *ngFor=\"let widget of tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.widgets| slice:0:(tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.maxWidgets ||\n stripsResultDataMap[key]?.sliderConfig?.maxWidgets || defaultMaxWidgets); trackBy: tracker\">\n <ng-container [sbUiResolverWidget]=\"widget\"></ng-container>\n </ng-container>\n </sb-uic-horizontal-scroller-v2>\n </ng-container>\n </ng-container>\n </div>\n </mat-tab>\n </mat-tab-group>\n </ng-container>\n </ng-container>\n </div>\n </div>\n </a>\n\n </ng-container>\n </ng-container>\n</ng-template>",
|
|
13682
12508
|
styles: [".view-more{display:flex;align-items:center;text-align:center;height:40px;justify-content:center}.view-more .icon{font-size:24px;width:24px;height:24px;border:1px solid;border-radius:50%;padding:8px;margin-bottom:8px}.margin-bottom-custom{margin-bottom:60px}.view-more:hover{background-color:#dcdfe5}::ng-deep.strips-tabgroup .mat-tab-header{border-bottom:2px solid rgba(0,0,0,.12)}::ng-deep.strips-tabgroup .mat-tab-body{padding:20px 0!important;box-sizing:border-box;overflow-y:initial!important}::ng-deep.strips-tabgroup .mat-tab-body-wrapper{overflow:inherit!important}::ng-deep.strips-tabgroup .mat-tab-label{border-bottom:0 solid rgba(0,0,0,.1);margin-right:0;opacity:1}::ng-deep.strips-tabgroup .mat-tab-label .mat-tab-label-content{text-transform:inherit;font:400 14px/20px Lato}::ng-deep.strips-tabgroup .mat-tab-label-active .mat-tab-label-content{font-weight:700!important}.click-here{color:#1b4ca1}.info-content{opacity:1;color:rgba(0,0,0,.87);font:700 14px/20px Lato-Bold;text-align:center}.active{background:#1b4ca1!important}.active .pill-name{color:#fff!important}::ng-deep .content-pill .mat-chip-selected{background-color:#1b4ca1!important}::ng-deep .content-pill .mat-chip-selected .pill-name{color:#fff!important}"]
|
|
13683
12509
|
}] }
|
|
13684
12510
|
];
|