@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
|
@@ -4422,9 +4422,15 @@
|
|
|
4422
4422
|
var tabResults_1 = [];
|
|
4423
4423
|
/** @type {?} */
|
|
4424
4424
|
var queryParams = lodash.get(strip.request.enrollmentList, 'queryParams');
|
|
4425
|
+
// if (queryParams && queryParams.batchDetails) {
|
|
4426
|
+
// if (!queryParams.batchDetails.includes('&retiredCoursesEnabled=true')) {
|
|
4427
|
+
// queryParams.batchDetails += '&retiredCoursesEnabled=true'
|
|
4428
|
+
// }
|
|
4429
|
+
// }
|
|
4425
4430
|
if (this.configSvc.userProfile) {
|
|
4426
4431
|
userId = this.configSvc.userProfile.userId;
|
|
4427
4432
|
}
|
|
4433
|
+
// this.userSvc.resetTime('enrollmentService')
|
|
4428
4434
|
// tslint:disable-next-line: deprecation
|
|
4429
4435
|
this.userSvc.fetchUserBatchList(userId, queryParams).subscribe((/**
|
|
4430
4436
|
* @param {?} result
|
|
@@ -4566,14 +4572,55 @@
|
|
|
4566
4572
|
/** @type {?} */
|
|
4567
4573
|
var inprogress = [];
|
|
4568
4574
|
/** @type {?} */
|
|
4569
|
-
var completed = []
|
|
4575
|
+
var completed = []
|
|
4576
|
+
// array.forEach((e: any, idx: number, arr: any[]) => (customFilter(e, idx, arr) ? inprogress : completed).push(e))
|
|
4577
|
+
;
|
|
4578
|
+
// array.forEach((e: any, idx: number, arr: any[]) => (customFilter(e, idx, arr) ? inprogress : completed).push(e))
|
|
4570
4579
|
array.forEach((/**
|
|
4571
4580
|
* @param {?} e
|
|
4572
4581
|
* @param {?} idx
|
|
4573
4582
|
* @param {?} arr
|
|
4574
4583
|
* @return {?}
|
|
4575
4584
|
*/
|
|
4576
|
-
function (e, idx, arr) {
|
|
4585
|
+
function (e, idx, arr) {
|
|
4586
|
+
/** @type {?} */
|
|
4587
|
+
var status = e.status ? ((/** @type {?} */ (e.status))).toLowerCase() : '';
|
|
4588
|
+
/** @type {?} */
|
|
4589
|
+
var statusRetired = status === 'retired';
|
|
4590
|
+
if (customFilter(e, idx, arr)) {
|
|
4591
|
+
if (!statusRetired) {
|
|
4592
|
+
inprogress.push(e);
|
|
4593
|
+
}
|
|
4594
|
+
}
|
|
4595
|
+
else {
|
|
4596
|
+
completed.push(e);
|
|
4597
|
+
}
|
|
4598
|
+
}));
|
|
4599
|
+
// Sort the completed array with 'Live' status first and 'Retired' status second
|
|
4600
|
+
completed.sort((/**
|
|
4601
|
+
* @param {?} a
|
|
4602
|
+
* @param {?} b
|
|
4603
|
+
* @return {?}
|
|
4604
|
+
*/
|
|
4605
|
+
function (a, b) {
|
|
4606
|
+
/** @type {?} */
|
|
4607
|
+
var statusA = a.status ? a.status.toLowerCase() : '';
|
|
4608
|
+
/** @type {?} */
|
|
4609
|
+
var statusB = b.status ? b.status.toLowerCase() : '';
|
|
4610
|
+
if (statusA === 'live' && statusB !== 'live') {
|
|
4611
|
+
return -1;
|
|
4612
|
+
}
|
|
4613
|
+
if (statusA !== 'live' && statusB === 'live') {
|
|
4614
|
+
return 1;
|
|
4615
|
+
}
|
|
4616
|
+
if (statusA === 'retired' && statusB !== 'retired') {
|
|
4617
|
+
return 1;
|
|
4618
|
+
}
|
|
4619
|
+
if (statusA !== 'retired' && statusB === 'retired') {
|
|
4620
|
+
return -1;
|
|
4621
|
+
}
|
|
4622
|
+
return 0;
|
|
4623
|
+
}));
|
|
4577
4624
|
return [
|
|
4578
4625
|
{ value: 'inprogress', widgets: this.transformContentsToWidgets(inprogress, strip) },
|
|
4579
4626
|
{ value: 'completed', widgets: this.transformContentsToWidgets(completed, strip) }
|
|
@@ -4688,17 +4735,41 @@
|
|
|
4688
4735
|
this.enrollmentMapData = JSON.parse(localStorage.getItem('enrollmentMapData') || '{}');
|
|
4689
4736
|
/** @type {?} */
|
|
4690
4737
|
var filteredArray_1 = [];
|
|
4738
|
+
/** @type {?} */
|
|
4739
|
+
var now_1 = new Date().getTime();
|
|
4691
4740
|
content.forEach((/**
|
|
4692
4741
|
* @param {?} data
|
|
4693
4742
|
* @return {?}
|
|
4694
4743
|
*/
|
|
4695
4744
|
function (data) {
|
|
4696
4745
|
if (_this.enrollmentMapData[data.identifier]) {
|
|
4697
|
-
|
|
4698
|
-
|
|
4699
|
-
|
|
4746
|
+
if (_this.enrollmentMapData[data.identifier].batch) {
|
|
4747
|
+
/** @type {?} */
|
|
4748
|
+
var enrollData = _this.enrollmentMapData[data.identifier].batch;
|
|
4749
|
+
/** @type {?} */
|
|
4750
|
+
var endDateTime = new Date((enrollData.endDate) + "T" + enrollData.endTime);
|
|
4751
|
+
/** @type {?} */
|
|
4752
|
+
var timeDuration = endDateTime.getTime() - now_1;
|
|
4753
|
+
if (timeDuration > 0) {
|
|
4754
|
+
data['batch'] = _this.enrollmentMapData[data.identifier].batch;
|
|
4755
|
+
data['completionPercentage'] = _this.enrollmentMapData[data.identifier].completionPercentage;
|
|
4756
|
+
filteredArray_1.push(data);
|
|
4757
|
+
}
|
|
4758
|
+
}
|
|
4700
4759
|
}
|
|
4701
4760
|
}));
|
|
4761
|
+
filteredArray_1 = filteredArray_1.sort((/**
|
|
4762
|
+
* @param {?} a
|
|
4763
|
+
* @param {?} b
|
|
4764
|
+
* @return {?}
|
|
4765
|
+
*/
|
|
4766
|
+
function (a, b) {
|
|
4767
|
+
/** @type {?} */
|
|
4768
|
+
var dateA = new Date(a.batch.startDate || 0);
|
|
4769
|
+
/** @type {?} */
|
|
4770
|
+
var dateB = new Date(b.batch.startDate || 0);
|
|
4771
|
+
return dateB - dateA;
|
|
4772
|
+
}));
|
|
4702
4773
|
this.processStrip(strip, this.transformContentsToWidgets(filteredArray_1, strip), 'done', calculateParentStatus, viewMoreUrl);
|
|
4703
4774
|
clearInterval(this.enrollInterval);
|
|
4704
4775
|
}
|
|
@@ -5926,7 +5997,15 @@
|
|
|
5926
5997
|
*/
|
|
5927
5998
|
function (results) {
|
|
5928
5999
|
/** @type {?} */
|
|
5929
|
-
var showViewMore
|
|
6000
|
+
var showViewMore;
|
|
6001
|
+
if (results.result.data) {
|
|
6002
|
+
showViewMore = Boolean(results.result.data && results.result.data.orgList.length > 5 && strip.stripConfig && strip.stripConfig.postCardForSearch);
|
|
6003
|
+
}
|
|
6004
|
+
else if (results.result.content) {
|
|
6005
|
+
/** @type {?} */
|
|
6006
|
+
var featuredProvider = JSON.parse(results.result.content.featuredProviders || '[]');
|
|
6007
|
+
showViewMore = Boolean(featuredProvider && featuredProvider.length > 5 && strip.stripConfig && strip.stripConfig.postCardForSearch);
|
|
6008
|
+
}
|
|
5930
6009
|
/** @type {?} */
|
|
5931
6010
|
var viewMoreUrl = showViewMore
|
|
5932
6011
|
? {
|
|
@@ -5982,6 +6061,9 @@
|
|
|
5982
6061
|
formedUrl = apiUrl.replace('<playlistKey>', this.providerId + id);
|
|
5983
6062
|
formedUrl = formedUrl.replace('<orgID>', this.providerId);
|
|
5984
6063
|
}
|
|
6064
|
+
else if (apiUrl.indexOf('<doId>') >= 0) {
|
|
6065
|
+
formedUrl = apiUrl.replace('<doId>', this.environment.providerDataKey);
|
|
6066
|
+
}
|
|
5985
6067
|
return formedUrl;
|
|
5986
6068
|
};
|
|
5987
6069
|
/**
|
|
@@ -6168,7 +6250,7 @@
|
|
|
6168
6250
|
function (strip, calculateParentStatus) {
|
|
6169
6251
|
if (calculateParentStatus === void 0) { calculateParentStatus = true; }
|
|
6170
6252
|
return __awaiter(this, void 0, void 0, function () {
|
|
6171
|
-
var originalFilters, response, content, error_9;
|
|
6253
|
+
var originalFilters, response, content, featuredProviders, error_9;
|
|
6172
6254
|
return __generator(this, function (_a) {
|
|
6173
6255
|
switch (_a.label) {
|
|
6174
6256
|
case 0:
|
|
@@ -6187,7 +6269,13 @@
|
|
|
6187
6269
|
response = _a.sent();
|
|
6188
6270
|
if (response && response.results.result.content) {
|
|
6189
6271
|
content = response.results.result.content;
|
|
6190
|
-
|
|
6272
|
+
if (strip.key === 'providers') {
|
|
6273
|
+
featuredProviders = JSON.parse(content.featuredProviders || '[]');
|
|
6274
|
+
this.processStrip(strip, this.transformAllContentsToWidgets(featuredProviders, strip), 'done', calculateParentStatus, response);
|
|
6275
|
+
}
|
|
6276
|
+
else {
|
|
6277
|
+
this.processStrip(strip, this.transformAllContentsToWidgets(content, strip), 'done', calculateParentStatus, response);
|
|
6278
|
+
}
|
|
6191
6279
|
}
|
|
6192
6280
|
else {
|
|
6193
6281
|
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
@@ -6221,7 +6309,6 @@
|
|
|
6221
6309
|
switch (_a.label) {
|
|
6222
6310
|
case 0:
|
|
6223
6311
|
if (!(strip.request && strip.request.ciosContent && Object.keys(strip.request.ciosContent).length)) return [3 /*break*/, 4];
|
|
6224
|
-
debugger;
|
|
6225
6312
|
originalFilters = [];
|
|
6226
6313
|
if (strip.request &&
|
|
6227
6314
|
strip.request.ciosContent &&
|
|
@@ -9007,7 +9094,7 @@
|
|
|
9007
9094
|
CardsComponent.decorators = [
|
|
9008
9095
|
{ type: core.Component, args: [{
|
|
9009
9096
|
selector: 'sb-uic-cards',
|
|
9010
|
-
template: "<div class=\"widget-card-content-new\">\n <ng-container *ngIf=\"widgetData && (((widgetData?.deletedMode || 'none') === 'hide' && !!!isLiveOrMarkForDeletion)\n ? false\n : !((widgetData?.intranetMode || 'none') === 'hide' && !!showIntranetContent))\"\n [ngSwitch]=\"( (widgetData && widgetData?.cardSubType) || 'cardPortraitLib')\">\n <ng-container *ngSwitchDefault [ngTemplateOutlet]=\"cardPortraitLib\"></ng-container>\n <ng-container *ngSwitchCase=\"'user-card'\" [ngTemplateOutlet]=\"cardUser\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-portrait-lib-skeleton'\" [ngTemplateOutlet]=\"cardPortraitLibSkeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-portrait-lib'\" [ngTemplateOutlet]=\"cardPortraitLib\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-landscape-lib-skeleton'\" [ngTemplateOutlet]=\"cardLandscapeLibSkeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-landscape-lib'\" [ngTemplateOutlet]=\"cardLandscapeLib\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-wide-lib-skeleton'\" [ngTemplateOutlet]=\"cardWideLibSkeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-wide-lib'\" [ngTemplateOutlet]=\"cardWideLib\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-wide-v2'\" [ngTemplateOutlet]=\"cardWideV2\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-wide-v2-skeleton'\" [ngTemplateOutlet]=\"cardWideV2Skeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-mdo-lib'\" [ngTemplateOutlet]=\"cardMdo\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-mdo-home-lib'\" [ngTemplateOutlet]=\"cardMdoHome\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-mdo-lib-skeleton'\" [ngTemplateOutlet]=\"cardMdoSkeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-scheduled-assessment'\" [ngTemplateOutlet]=\"cardScheduledAssessment\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-scheduled-assessment-skeleton'\" [ngTemplateOutlet]=\"cardScheduledAssessmentSkelton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-karma-program-lib'\" [ngTemplateOutlet]=\"cardKarmaProgram\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-karma-program-lib-skeleton'\" [ngTemplateOutlet]=\"cardKarmaProgramSkeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-progress-portrait-lib'\" [ngTemplateOutlet]=\"cardProgressLib\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-progress-portrait-lib-skeleton'\" [ngTemplateOutlet]=\"cardProgressLibSkeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-karma-program-lib-v2'\" [ngTemplateOutlet]=\"cardKarmaProgramV2\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-karma-program-lib-v2-skeleton'\" [ngTemplateOutlet]=\"cardKarmaProgramV2\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-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",
|
|
9097
|
+
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",
|
|
9011
9098
|
styles: [""]
|
|
9012
9099
|
}] }
|
|
9013
9100
|
];
|
|
@@ -9172,7 +9259,7 @@
|
|
|
9172
9259
|
CardPortraitComponent.decorators = [
|
|
9173
9260
|
{ type: core.Component, args: [{
|
|
9174
9261
|
selector: 'sb-uic-card-portrait',
|
|
9175
|
-
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>",
|
|
9262
|
+
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>",
|
|
9176
9263
|
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}"]
|
|
9177
9264
|
}] }
|
|
9178
9265
|
];
|
|
@@ -9964,7 +10051,7 @@
|
|
|
9964
10051
|
CardLandscapeComponent.decorators = [
|
|
9965
10052
|
{ type: core.Component, args: [{
|
|
9966
10053
|
selector: 'sb-uic-card-landscape',
|
|
9967
|
-
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>",
|
|
10054
|
+
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>",
|
|
9968
10055
|
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}"]
|
|
9969
10056
|
}] }
|
|
9970
10057
|
];
|
|
@@ -10229,6 +10316,7 @@
|
|
|
10229
10316
|
this.router = router;
|
|
10230
10317
|
this.channelData = new core.EventEmitter();
|
|
10231
10318
|
this.emitTelemetry = new core.EventEmitter();
|
|
10319
|
+
this.isCardLoading = false;
|
|
10232
10320
|
this.widgetType = '';
|
|
10233
10321
|
this.widgetSubType = '';
|
|
10234
10322
|
this.langtranslations.languageSelectedObservable.subscribe((/**
|
|
@@ -10302,7 +10390,7 @@
|
|
|
10302
10390
|
CardMDOChannelComponent.decorators = [
|
|
10303
10391
|
{ type: core.Component, args: [{
|
|
10304
10392
|
selector: 'sb-uic-card-mdo-channel',
|
|
10305
|
-
template: "<mat-card class=\"channels-card card-channels-container mr-5 padding-remove cursor-pointer\">\n
|
|
10393
|
+
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>",
|
|
10306
10394
|
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}}"]
|
|
10307
10395
|
}] }
|
|
10308
10396
|
];
|
|
@@ -10318,7 +10406,8 @@
|
|
|
10318
10406
|
CardMDOChannelComponent.propDecorators = {
|
|
10319
10407
|
widgetData: [{ type: core.Input }],
|
|
10320
10408
|
channelData: [{ type: core.Output }],
|
|
10321
|
-
emitTelemetry: [{ type: core.Output }]
|
|
10409
|
+
emitTelemetry: [{ type: core.Output }],
|
|
10410
|
+
isCardLoading: [{ type: core.Input }]
|
|
10322
10411
|
};
|
|
10323
10412
|
return CardMDOChannelComponent;
|
|
10324
10413
|
}());
|
|
@@ -10330,6 +10419,8 @@
|
|
|
10330
10419
|
/** @type {?} */
|
|
10331
10420
|
CardMDOChannelComponent.prototype.emitTelemetry;
|
|
10332
10421
|
/** @type {?} */
|
|
10422
|
+
CardMDOChannelComponent.prototype.isCardLoading;
|
|
10423
|
+
/** @type {?} */
|
|
10333
10424
|
CardMDOChannelComponent.prototype.defaultThumbnail;
|
|
10334
10425
|
/** @type {?} */
|
|
10335
10426
|
CardMDOChannelComponent.prototype.sourceLogos;
|
|
@@ -10899,134 +10990,10 @@
|
|
|
10899
10990
|
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
10900
10991
|
*/
|
|
10901
10992
|
var ProviderCardComponent = /** @class */ (function () {
|
|
10902
|
-
function ProviderCardComponent() {
|
|
10903
|
-
this.
|
|
10904
|
-
|
|
10905
|
-
|
|
10906
|
-
link: 'https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/IIMB/all-CBP',
|
|
10907
|
-
logo: 'assets/icons/top-providers/ef8a88cf-33cc-42de-bdc3-7deed1ab2418.png'
|
|
10908
|
-
},
|
|
10909
|
-
{
|
|
10910
|
-
name: 'Department for Promotion of Industry and Internal Trade',
|
|
10911
|
-
link: 'https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/Department for Promotion of Industry and Internal Trade/all-CBP',
|
|
10912
|
-
logo: 'assets/icons/top-providers/0d400bdf-4ad8-45bf-914c-be44018c2d07.png'
|
|
10913
|
-
},
|
|
10914
|
-
{
|
|
10915
|
-
name: 'RAKNPA',
|
|
10916
|
-
link: 'https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/RAKNPA/all-CBP',
|
|
10917
|
-
logo: 'assets/icons/top-providers/1becfffa-956e-48ba-8ffd-77c19cd720c8.jpeg'
|
|
10918
|
-
},
|
|
10919
|
-
{
|
|
10920
|
-
name: 'Lal Bahadur Shastri National Academy of Administration (LBSNAA)',
|
|
10921
|
-
link: 'https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/Ministry of Environment, Forest and Climate Change/all-CBP',
|
|
10922
|
-
logo: 'assets/icons/top-providers/1d76c041-a7c9-437c-94d9-36d997f3804c.jpeg'
|
|
10923
|
-
},
|
|
10924
|
-
{
|
|
10925
|
-
name: 'Ministry of Environment, Forest and Climate Change',
|
|
10926
|
-
link: 'https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/LBSNAA/all-CBP',
|
|
10927
|
-
logo: 'assets/icons/top-providers/1fb72c3f-1c96-4600-8e22-09871a85e6c4.jpeg'
|
|
10928
|
-
},
|
|
10929
|
-
{
|
|
10930
|
-
name: 'ISTM',
|
|
10931
|
-
link: 'https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/Institute of Secretariat Training and Management/all-CBP',
|
|
10932
|
-
logo: 'assets/icons/top-providers/6f046f76-b778-476a-987b-8669e106b44c.jpeg'
|
|
10933
|
-
},
|
|
10934
|
-
{
|
|
10935
|
-
name: 'Department of Expenditure',
|
|
10936
|
-
link: 'https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/Department%20of%20Expenditure%20/all-CBP',
|
|
10937
|
-
logo: 'assets/icons/top-providers/7f6df809-6930-44f4-abcf-c8297363d3e0.png'
|
|
10938
|
-
},
|
|
10939
|
-
{
|
|
10940
|
-
name: 'Department of Personnel and Training DoPT',
|
|
10941
|
-
link: 'https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/Department%20of%20Personnel%20and%20Training%20DoPT/all-CBP',
|
|
10942
|
-
logo: 'assets/icons/top-providers/dopt.png'
|
|
10943
|
-
},
|
|
10944
|
-
{
|
|
10945
|
-
name: 'Indian Cybercrime Coordination Centre - I4C',
|
|
10946
|
-
link: 'https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/Indian%20Cybercrime%20Coordination%20Centre%20-%20I4C/all-CBP',
|
|
10947
|
-
logo: 'assets/icons/top-providers/7f8cab8e-9d22-44ba-a41e-83b907e5a5f0.jpeg'
|
|
10948
|
-
},
|
|
10949
|
-
{
|
|
10950
|
-
"name": "Capacity Building Commission",
|
|
10951
|
-
"link": "https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/Capacity%20Building%20Commission/all-CBP",
|
|
10952
|
-
"logo": "assets/icons/top-providers/33e9c66f-312f-4244-901e-7d7525ae8847.jpeg"
|
|
10953
|
-
},
|
|
10954
|
-
{
|
|
10955
|
-
"name": "Ministry of Railways",
|
|
10956
|
-
"link": "https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/Ministry%20of%20Railways/all-CBP",
|
|
10957
|
-
"logo": "assets/icons/top-providers/36d93700-c43f-499e-ab3c-68ea76388a2a.png"
|
|
10958
|
-
},
|
|
10959
|
-
{
|
|
10960
|
-
"name": "World Bank",
|
|
10961
|
-
"link": "https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/World%20Bank/all-CBP",
|
|
10962
|
-
"logo": "assets/icons/top-providers/385ff4a0-41af-4114-8015-10d26c1e8af4.jpeg"
|
|
10963
|
-
},
|
|
10964
|
-
{
|
|
10965
|
-
"name": "Sashastra Seema Bal (SSB)",
|
|
10966
|
-
"link": "https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/Sashastra%20Seema%20Bal%20%28SSB%29/all-CBP",
|
|
10967
|
-
"logo": "assets/icons/top-providers/778b56bf-8946-45fe-87d3-358203f2faf4.png"
|
|
10968
|
-
},
|
|
10969
|
-
{
|
|
10970
|
-
"name": "SVPNPA",
|
|
10971
|
-
"link": "https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/SVPNPA/all-CBP",
|
|
10972
|
-
"logo": "assets/icons/top-providers/2862d2e5-473e-4c55-abaa-8a2f86e5eee4.jpeg"
|
|
10973
|
-
},
|
|
10974
|
-
{
|
|
10975
|
-
"name": "Microsoft",
|
|
10976
|
-
"link": "https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/Microsoft/all-CBP",
|
|
10977
|
-
"logo": "assets/icons/top-providers/53407dd6-d22c-4dba-a394-015fae667636.png"
|
|
10978
|
-
},
|
|
10979
|
-
{
|
|
10980
|
-
"name": "Indian Institute of Public Administration",
|
|
10981
|
-
"link": "https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/Indian%20Institute%20of%20Public%20Administration/all-CBP",
|
|
10982
|
-
"logo": "assets/icons/top-providers/869960d7-2dc7-4205-8c4b-11321d901060.jpeg"
|
|
10983
|
-
},
|
|
10984
|
-
{
|
|
10985
|
-
"name": "Food Corporation of India (FCI)",
|
|
10986
|
-
"link": "https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/Food%20Corporation%20of%20India%20%28FCI%29/all-CBP",
|
|
10987
|
-
"logo": "assets/icons/top-providers/4183673f-9063-4fa9-bf84-1e8856c8e531.jpeg"
|
|
10988
|
-
},
|
|
10989
|
-
{
|
|
10990
|
-
"name": "National Telecommunications Institute for Policy Research, Innovation and Training",
|
|
10991
|
-
"link": "https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/NTIPRIT/all-CBP",
|
|
10992
|
-
"logo": "assets/icons/top-providers/a976f025-e990-49b0-a52a-9bd0a8e43584.jpeg"
|
|
10993
|
-
},
|
|
10994
|
-
{
|
|
10995
|
-
"name": "The Art of Living",
|
|
10996
|
-
"link": "https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/The%20Art%20of%20Living/all-CBP",
|
|
10997
|
-
"logo": "assets/icons/top-providers/abbb8f64-84db-4a92-85c9-1b394ffab71c.png"
|
|
10998
|
-
},
|
|
10999
|
-
{
|
|
11000
|
-
"name": "National Institute of Communication Finance",
|
|
11001
|
-
"link": "https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/National%20Institute%20of%20Communication%20Finance/all-CBP",
|
|
11002
|
-
"logo": "assets/icons/top-providers/b6bf0be6-7e29-4187-a29d-da6db1db7c69.jpeg"
|
|
11003
|
-
},
|
|
11004
|
-
{
|
|
11005
|
-
"name": "Department of Posts",
|
|
11006
|
-
"link": "https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/Department%20of%20Posts/all-CBP",
|
|
11007
|
-
"logo": "assets/icons/top-providers/cf567f4c-d0fa-447f-aba4-cb378ea3c90d.png"
|
|
11008
|
-
},
|
|
11009
|
-
{
|
|
11010
|
-
"name": "Government e Market Place(GeM)",
|
|
11011
|
-
"link": "https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/Government%20e%20Market%20Place%28GeM%29/all-CBP",
|
|
11012
|
-
"logo": "assets/icons/top-providers/f445c11b-ff73-4ca4-9dea-8d8945d92a4a.png"
|
|
11013
|
-
},
|
|
11014
|
-
{
|
|
11015
|
-
"name": "Bharat Sanchar Nigam Limited(BSNL)",
|
|
11016
|
-
"link": "https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/Bharat%20Sanchar%20Nigam%20Limited%28BSNL%29/all-CBP",
|
|
11017
|
-
"logo": "assets/icons/top-providers/fc67226a-4bbc-449a-8c5c-e1b338716545.png"
|
|
11018
|
-
},
|
|
11019
|
-
{
|
|
11020
|
-
"name": "Defence Accounts Department (DAD)",
|
|
11021
|
-
"link": "https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/Defence%20Accounts%20Department%20%28DAD%29/all-CBP",
|
|
11022
|
-
"logo": "assets/icons/top-providers/fccdb487-a389-48d9-bce0-c4d64315b546.png"
|
|
11023
|
-
},
|
|
11024
|
-
{
|
|
11025
|
-
"name": "Morarji Desai National Institute of Yoga (MDNIY)",
|
|
11026
|
-
"link": "https://portal.igotkarmayogi.gov.in/app/learn/browse-by/provider/Morarji%20Desai%20National%20Institute%20of%20Yoga%20%28MDNIY%29/all-CBP",
|
|
11027
|
-
"logo": "assets/icons/top-providers/fcde4c60-7ccd-456e-a5df-260dcfa2d3ee.png"
|
|
11028
|
-
}
|
|
11029
|
-
];
|
|
10993
|
+
function ProviderCardComponent(router) {
|
|
10994
|
+
this.router = router;
|
|
10995
|
+
this.randomColorApply = true;
|
|
10996
|
+
this.isCardLoading = false;
|
|
11030
10997
|
this.colors = [
|
|
11031
10998
|
'#EF941D', '#F97440', '#35B5B0', '#9988FF', '#816FEC',
|
|
11032
10999
|
'#254092', '#926525', '#4F72DF'
|
|
@@ -11039,34 +11006,69 @@
|
|
|
11039
11006
|
* @return {?}
|
|
11040
11007
|
*/
|
|
11041
11008
|
function () {
|
|
11009
|
+
this.setRandomColor();
|
|
11010
|
+
};
|
|
11011
|
+
/**
|
|
11012
|
+
* @return {?}
|
|
11013
|
+
*/
|
|
11014
|
+
ProviderCardComponent.prototype.setRandomColor = /**
|
|
11015
|
+
* @return {?}
|
|
11016
|
+
*/
|
|
11017
|
+
function () {
|
|
11018
|
+
if (this.widgetData && this.widgetData.content) {
|
|
11019
|
+
if (this.randomColorApply) {
|
|
11020
|
+
/** @type {?} */
|
|
11021
|
+
var randomIndex1 = Math.floor(Math.random() * Math.floor(this.colors.length));
|
|
11022
|
+
this.widgetData.content['bgColor'] = this.colors[randomIndex1];
|
|
11023
|
+
}
|
|
11024
|
+
else {
|
|
11025
|
+
this.widgetData.content['bgColor'] = '#1a4ca1';
|
|
11026
|
+
}
|
|
11027
|
+
}
|
|
11042
11028
|
};
|
|
11043
11029
|
/**
|
|
11044
|
-
* @param {?}
|
|
11030
|
+
* @param {?} content
|
|
11045
11031
|
* @return {?}
|
|
11046
11032
|
*/
|
|
11047
11033
|
ProviderCardComponent.prototype.redirectTo = /**
|
|
11048
|
-
* @param {?}
|
|
11034
|
+
* @param {?} content
|
|
11049
11035
|
* @return {?}
|
|
11050
11036
|
*/
|
|
11051
|
-
function (
|
|
11052
|
-
|
|
11037
|
+
function (content) {
|
|
11038
|
+
this.router.navigate(["/app/learn/browse-by/provider/" + content.name + "/" + content.orgId + "/micro-sites"]);
|
|
11053
11039
|
};
|
|
11054
11040
|
ProviderCardComponent.decorators = [
|
|
11055
11041
|
{ type: core.Component, args: [{
|
|
11056
11042
|
selector: 'sb-uic-provider-card',
|
|
11057
|
-
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 ",
|
|
11043
|
+
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>",
|
|
11058
11044
|
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}"]
|
|
11059
11045
|
}] }
|
|
11060
11046
|
];
|
|
11061
11047
|
/** @nocollapse */
|
|
11062
|
-
ProviderCardComponent.ctorParameters = function () { return [
|
|
11048
|
+
ProviderCardComponent.ctorParameters = function () { return [
|
|
11049
|
+
{ type: router.Router }
|
|
11050
|
+
]; };
|
|
11051
|
+
ProviderCardComponent.propDecorators = {
|
|
11052
|
+
widgetData: [{ type: core.Input }],
|
|
11053
|
+
randomColorApply: [{ type: core.Input }],
|
|
11054
|
+
isCardLoading: [{ type: core.Input }]
|
|
11055
|
+
};
|
|
11063
11056
|
return ProviderCardComponent;
|
|
11064
11057
|
}());
|
|
11065
11058
|
if (false) {
|
|
11066
11059
|
/** @type {?} */
|
|
11067
|
-
ProviderCardComponent.prototype.
|
|
11060
|
+
ProviderCardComponent.prototype.widgetData;
|
|
11061
|
+
/** @type {?} */
|
|
11062
|
+
ProviderCardComponent.prototype.randomColorApply;
|
|
11063
|
+
/** @type {?} */
|
|
11064
|
+
ProviderCardComponent.prototype.isCardLoading;
|
|
11068
11065
|
/** @type {?} */
|
|
11069
11066
|
ProviderCardComponent.prototype.colors;
|
|
11067
|
+
/**
|
|
11068
|
+
* @type {?}
|
|
11069
|
+
* @private
|
|
11070
|
+
*/
|
|
11071
|
+
ProviderCardComponent.prototype.router;
|
|
11070
11072
|
}
|
|
11071
11073
|
|
|
11072
11074
|
/**
|
|
@@ -11153,7 +11155,7 @@
|
|
|
11153
11155
|
CardPortraitExtComponent.decorators = [
|
|
11154
11156
|
{ type: core.Component, args: [{
|
|
11155
11157
|
selector: 'sb-uic-card-portrait-ext',
|
|
11156
|
-
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>",
|
|
11158
|
+
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>",
|
|
11157
11159
|
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}"]
|
|
11158
11160
|
}] }
|
|
11159
11161
|
];
|
|
@@ -11289,67 +11291,58 @@
|
|
|
11289
11291
|
*/
|
|
11290
11292
|
function (data) {
|
|
11291
11293
|
var _this = this;
|
|
11292
|
-
|
|
11293
|
-
|
|
11294
|
+
/** @type {?} */
|
|
11295
|
+
var startDate = data.startDate;
|
|
11296
|
+
/** @type {?} */
|
|
11297
|
+
var startTime = data.startTime;
|
|
11298
|
+
this.updateCountdown(startDate, startTime);
|
|
11294
11299
|
this.intervalId = setInterval((/**
|
|
11295
11300
|
* @return {?}
|
|
11296
11301
|
*/
|
|
11297
11302
|
function () {
|
|
11298
|
-
_this.updateCountdown(
|
|
11303
|
+
_this.updateCountdown(startDate, startTime);
|
|
11299
11304
|
}), 1000);
|
|
11300
11305
|
};
|
|
11301
11306
|
// Method to update the countdown values
|
|
11302
11307
|
// Method to update the countdown values
|
|
11303
11308
|
/**
|
|
11304
11309
|
* @param {?} startDate
|
|
11305
|
-
* @param {?}
|
|
11310
|
+
* @param {?} startTime
|
|
11306
11311
|
* @return {?}
|
|
11307
11312
|
*/
|
|
11308
11313
|
CardAssessmentComponent.prototype.updateCountdown =
|
|
11309
11314
|
// Method to update the countdown values
|
|
11310
11315
|
/**
|
|
11311
11316
|
* @param {?} startDate
|
|
11312
|
-
* @param {?}
|
|
11317
|
+
* @param {?} startTime
|
|
11313
11318
|
* @return {?}
|
|
11314
11319
|
*/
|
|
11315
|
-
function (startDate,
|
|
11320
|
+
function (startDate, startTime) {
|
|
11316
11321
|
/** @type {?} */
|
|
11317
11322
|
var now = new Date().getTime();
|
|
11318
|
-
// Current time in milliseconds
|
|
11319
11323
|
/** @type {?} */
|
|
11320
|
-
var
|
|
11324
|
+
var startDateTime = new Date(startDate + "T" + startTime);
|
|
11321
11325
|
/** @type {?} */
|
|
11322
|
-
var
|
|
11323
|
-
/** @type {?} */
|
|
11324
|
-
var distance = targetTime - now;
|
|
11325
|
-
// Distance in milliseconds
|
|
11326
|
-
/** @type {?} */
|
|
11327
|
-
var endDistance = now - targetEndDate;
|
|
11326
|
+
var distance = startDateTime.getTime() - now;
|
|
11328
11327
|
if (distance > 0) {
|
|
11329
|
-
this.daysRemaining = Math.ceil(distance / (1000 * 60 * 60 * 24));
|
|
11330
11328
|
this.daysPending = true;
|
|
11329
|
+
// this.days = Math.ceil(distance / (1000 * 60 * 60 * 24));
|
|
11330
|
+
// this.hours = Math.ceil(distance / (1000 * 60 * 60));
|
|
11331
|
+
// this.minutes = Math.ceil((distance % (1000 * 60 * 60)) / (1000 * 60));
|
|
11332
|
+
this.days = Math.floor(distance / (1000 * 60 * 60 * 24));
|
|
11333
|
+
this.hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
|
|
11334
|
+
this.minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
|
|
11331
11335
|
}
|
|
11332
11336
|
else {
|
|
11333
11337
|
this.daysRemaining = 0;
|
|
11334
11338
|
this.daysPending = false;
|
|
11335
11339
|
this.clearTimer();
|
|
11336
11340
|
}
|
|
11337
|
-
if (endDistance > 0) {
|
|
11338
|
-
this.daysFinish = true;
|
|
11339
|
-
this.clearTimer();
|
|
11340
|
-
}
|
|
11341
|
-
else {
|
|
11342
|
-
this.daysFinish = false;
|
|
11343
|
-
}
|
|
11344
11341
|
};
|
|
11345
|
-
// Method to clear the interval
|
|
11346
|
-
// Method to clear the interval
|
|
11347
11342
|
/**
|
|
11348
11343
|
* @return {?}
|
|
11349
11344
|
*/
|
|
11350
|
-
CardAssessmentComponent.prototype.clearTimer =
|
|
11351
|
-
// Method to clear the interval
|
|
11352
|
-
/**
|
|
11345
|
+
CardAssessmentComponent.prototype.clearTimer = /**
|
|
11353
11346
|
* @return {?}
|
|
11354
11347
|
*/
|
|
11355
11348
|
function () {
|
|
@@ -11384,8 +11377,8 @@
|
|
|
11384
11377
|
CardAssessmentComponent.decorators = [
|
|
11385
11378
|
{ type: core.Component, args: [{
|
|
11386
11379
|
selector: 'sb-uic-card-assessment',
|
|
11387
|
-
template: "
|
|
11388
|
-
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}"]
|
|
11380
|
+
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>",
|
|
11381
|
+
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}"]
|
|
11389
11382
|
}] }
|
|
11390
11383
|
];
|
|
11391
11384
|
/** @nocollapse */
|
|
@@ -11435,6 +11428,12 @@
|
|
|
11435
11428
|
* @private
|
|
11436
11429
|
*/
|
|
11437
11430
|
CardAssessmentComponent.prototype.intervalId;
|
|
11431
|
+
/** @type {?} */
|
|
11432
|
+
CardAssessmentComponent.prototype.days;
|
|
11433
|
+
/** @type {?} */
|
|
11434
|
+
CardAssessmentComponent.prototype.hours;
|
|
11435
|
+
/** @type {?} */
|
|
11436
|
+
CardAssessmentComponent.prototype.minutes;
|
|
11438
11437
|
/**
|
|
11439
11438
|
* @type {?}
|
|
11440
11439
|
* @private
|
|
@@ -11918,7 +11917,7 @@
|
|
|
11918
11917
|
CardProgressPortraitLibComponent.decorators = [
|
|
11919
11918
|
{ type: core.Component, args: [{
|
|
11920
11919
|
selector: 'sb-uic-card-progress-portrait-lib',
|
|
11921
|
-
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>",
|
|
11920
|
+
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>",
|
|
11922
11921
|
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}"]
|
|
11923
11922
|
}] }
|
|
11924
11923
|
];
|
|
@@ -12184,6 +12183,7 @@
|
|
|
12184
12183
|
this.router = router;
|
|
12185
12184
|
this.channelData = new core.EventEmitter();
|
|
12186
12185
|
this.emitTelemetry = new core.EventEmitter();
|
|
12186
|
+
this.isCardLoading = false;
|
|
12187
12187
|
this.widgetType = '';
|
|
12188
12188
|
this.widgetSubType = '';
|
|
12189
12189
|
this.langtranslations.languageSelectedObservable.subscribe((/**
|
|
@@ -12257,7 +12257,7 @@
|
|
|
12257
12257
|
CardMdoChannelV1Component.decorators = [
|
|
12258
12258
|
{ type: core.Component, args: [{
|
|
12259
12259
|
selector: 'sb-uic-card-mdo-channel-v1',
|
|
12260
|
-
template: "<mat-card class=\"channels-card card-channels-container mr-5 padding-remove cursor-pointer\">\n
|
|
12260
|
+
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>",
|
|
12261
12261
|
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}"]
|
|
12262
12262
|
}] }
|
|
12263
12263
|
];
|
|
@@ -12273,7 +12273,8 @@
|
|
|
12273
12273
|
CardMdoChannelV1Component.propDecorators = {
|
|
12274
12274
|
widgetData: [{ type: core.Input }],
|
|
12275
12275
|
channelData: [{ type: core.Output }],
|
|
12276
|
-
emitTelemetry: [{ type: core.Output }]
|
|
12276
|
+
emitTelemetry: [{ type: core.Output }],
|
|
12277
|
+
isCardLoading: [{ type: core.Input }]
|
|
12277
12278
|
};
|
|
12278
12279
|
return CardMdoChannelV1Component;
|
|
12279
12280
|
}());
|
|
@@ -12285,6 +12286,8 @@
|
|
|
12285
12286
|
/** @type {?} */
|
|
12286
12287
|
CardMdoChannelV1Component.prototype.emitTelemetry;
|
|
12287
12288
|
/** @type {?} */
|
|
12289
|
+
CardMdoChannelV1Component.prototype.isCardLoading;
|
|
12290
|
+
/** @type {?} */
|
|
12288
12291
|
CardMdoChannelV1Component.prototype.defaultThumbnail;
|
|
12289
12292
|
/** @type {?} */
|
|
12290
12293
|
CardMdoChannelV1Component.prototype.sourceLogos;
|
|
@@ -13164,15 +13167,7 @@
|
|
|
13164
13167
|
// setting initial values
|
|
13165
13168
|
strip.loaderWidgets = this.transformSkeletonToWidgets(strip);
|
|
13166
13169
|
this.processStrip(strip, [], 'fetching', false, null);
|
|
13167
|
-
this.fetchFromEnrollmentList(strip, calculateParentStatus);
|
|
13168
13170
|
this.fetchFromSearchV6(strip, calculateParentStatus);
|
|
13169
|
-
this.fetchFromTrendingContent(strip, calculateParentStatus);
|
|
13170
|
-
this.fetchAllTopContent(strip, calculateParentStatus);
|
|
13171
|
-
this.fetchAllFeaturedContent(strip, calculateParentStatus);
|
|
13172
|
-
this.fetchAllBookMarkData(strip, calculateParentStatus);
|
|
13173
|
-
this.fetchAllPlaylistSearch(strip, calculateParentStatus);
|
|
13174
|
-
this.fetchPlaylistReadData(strip, calculateParentStatus);
|
|
13175
|
-
this.fetchCiosContentData(strip, calculateParentStatus);
|
|
13176
13171
|
this.fetchForYouData(strip, calculateParentStatus);
|
|
13177
13172
|
this.fetchAllCbpPlans(strip, calculateParentStatus);
|
|
13178
13173
|
// this.enrollInterval = setInterval(() => {
|
|
@@ -13180,877 +13175,35 @@
|
|
|
13180
13175
|
// }, 1000)
|
|
13181
13176
|
};
|
|
13182
13177
|
/**
|
|
13183
|
-
* @param {?}
|
|
13184
|
-
* @param {?=} calculateParentStatus
|
|
13178
|
+
* @param {?} data
|
|
13185
13179
|
* @return {?}
|
|
13186
13180
|
*/
|
|
13187
|
-
ContentStripWithTabsPillsComponent.prototype.
|
|
13188
|
-
* @param {?}
|
|
13189
|
-
* @param {?=} calculateParentStatus
|
|
13181
|
+
ContentStripWithTabsPillsComponent.prototype.toggleInfo = /**
|
|
13182
|
+
* @param {?} data
|
|
13190
13183
|
* @return {?}
|
|
13191
13184
|
*/
|
|
13192
|
-
function (
|
|
13193
|
-
|
|
13194
|
-
|
|
13195
|
-
if (
|
|
13196
|
-
|
|
13197
|
-
|
|
13198
|
-
|
|
13199
|
-
|
|
13200
|
-
|
|
13201
|
-
|
|
13202
|
-
/** @type {?} */
|
|
13203
|
-
var tabResults_1 = [];
|
|
13204
|
-
/** @type {?} */
|
|
13205
|
-
var queryParams = lodash.get(strip.request.enrollmentList, 'queryParams');
|
|
13206
|
-
if (this.configSvc.userProfile) {
|
|
13207
|
-
userId = this.configSvc.userProfile.userId;
|
|
13185
|
+
function (data) {
|
|
13186
|
+
/** @type {?} */
|
|
13187
|
+
var stripInfo = this.stripsResultDataMap[data.key].stripInfo;
|
|
13188
|
+
if (stripInfo) {
|
|
13189
|
+
if (stripInfo.mode !== 'below') {
|
|
13190
|
+
this.loggerSvc.warn("strip info mode: " + stripInfo.mode + " not implemented yet");
|
|
13191
|
+
stripInfo.mode = 'below';
|
|
13192
|
+
}
|
|
13193
|
+
if (stripInfo.mode === 'below') {
|
|
13194
|
+
this.stripsResultDataMap[data.key].stripInfo = __assign({}, stripInfo, { visibilityMode: stripInfo.visibilityMode === 'hidden' ? 'visible' : 'hidden' });
|
|
13208
13195
|
}
|
|
13209
|
-
// tslint:disable-next-line: deprecation
|
|
13210
|
-
this.userSvc.fetchUserBatchList(userId, queryParams).subscribe((/**
|
|
13211
|
-
* @param {?} result
|
|
13212
|
-
* @return {?}
|
|
13213
|
-
*/
|
|
13214
|
-
function (result) {
|
|
13215
|
-
/** @type {?} */
|
|
13216
|
-
var courses = result && result.courses;
|
|
13217
|
-
/** @type {?} */
|
|
13218
|
-
var showViewMore = Boolean(courses.length > 5 && strip.stripConfig && strip.stripConfig.postCardForSearch);
|
|
13219
|
-
/** @type {?} */
|
|
13220
|
-
var viewMoreUrl = showViewMore
|
|
13221
|
-
? {
|
|
13222
|
-
path: (strip.viewMoreUrl && strip.viewMoreUrl.path) || '',
|
|
13223
|
-
queryParams: {
|
|
13224
|
-
q: strip.viewMoreUrl && strip.viewMoreUrl.queryParams,
|
|
13225
|
-
f: strip.request && strip.request.searchV6 && strip.request.searchV6.filters
|
|
13226
|
-
? JSON.stringify(
|
|
13227
|
-
// this.searchServSvc.transformSearchV6Filters(
|
|
13228
|
-
strip.request.searchV6.filters
|
|
13229
|
-
// ),
|
|
13230
|
-
)
|
|
13231
|
-
: {},
|
|
13232
|
-
},
|
|
13233
|
-
}
|
|
13234
|
-
: null;
|
|
13235
|
-
if (courses && courses.length) {
|
|
13236
|
-
content_1 = courses.map((/**
|
|
13237
|
-
* @param {?} c
|
|
13238
|
-
* @return {?}
|
|
13239
|
-
*/
|
|
13240
|
-
function (c) {
|
|
13241
|
-
/** @type {?} */
|
|
13242
|
-
var contentTemp = c.content;
|
|
13243
|
-
contentTemp.completionPercentage = c.completionPercentage || c.progress || 0;
|
|
13244
|
-
contentTemp.completionStatus = c.completionStatus || c.status || 0;
|
|
13245
|
-
contentTemp.enrolledDate = c.enrolledDate || '';
|
|
13246
|
-
contentTemp.lastContentAccessTime = c.lastContentAccessTime || '';
|
|
13247
|
-
contentTemp.lastReadContentStatus = c.lastReadContentStatus || '';
|
|
13248
|
-
contentTemp.lastReadContentId = c.lastReadContentId || '';
|
|
13249
|
-
contentTemp.lrcProgressDetails = c.lrcProgressDetails || '';
|
|
13250
|
-
contentTemp.issuedCertificates = c.issuedCertificates || [];
|
|
13251
|
-
contentTemp.batchId = c.batchId || '';
|
|
13252
|
-
return contentTemp;
|
|
13253
|
-
}));
|
|
13254
|
-
}
|
|
13255
|
-
// To filter content with completionPercentage > 0,
|
|
13256
|
-
// so that only those content will show in home page
|
|
13257
|
-
// continue learing strip
|
|
13258
|
-
// if (content && content.length) {
|
|
13259
|
-
// contentNew = content.filter((c: any) => {
|
|
13260
|
-
// /** commented as both are 0 after enrolll */
|
|
13261
|
-
// if (c.completionPercentage && c.completionPercentage > 0) {
|
|
13262
|
-
// return c
|
|
13263
|
-
// }
|
|
13264
|
-
// })
|
|
13265
|
-
// }
|
|
13266
|
-
// To sort in descending order of the enrolled date
|
|
13267
|
-
contentNew_1 = (content_1 || []).sort((/**
|
|
13268
|
-
* @param {?} a
|
|
13269
|
-
* @param {?} b
|
|
13270
|
-
* @return {?}
|
|
13271
|
-
*/
|
|
13272
|
-
function (a, b) {
|
|
13273
|
-
/** @type {?} */
|
|
13274
|
-
var dateA = new Date(a.lastContentAccessTime || 0);
|
|
13275
|
-
/** @type {?} */
|
|
13276
|
-
var dateB = new Date(b.lastContentAccessTime || 0);
|
|
13277
|
-
return dateB - dateA;
|
|
13278
|
-
}));
|
|
13279
|
-
if (strip.tabs && strip.tabs.length) {
|
|
13280
|
-
tabResults_1 = _this.splitEnrollmentTabsData(contentNew_1, strip);
|
|
13281
|
-
_this.processStrip(strip, _this.transformContentsToWidgets(contentNew_1, strip), 'done', calculateParentStatus, viewMoreUrl, tabResults_1);
|
|
13282
|
-
}
|
|
13283
|
-
else {
|
|
13284
|
-
_this.processStrip(strip, _this.transformContentsToWidgets(contentNew_1, strip), 'done', calculateParentStatus, viewMoreUrl);
|
|
13285
|
-
}
|
|
13286
|
-
}), (/**
|
|
13287
|
-
* @return {?}
|
|
13288
|
-
*/
|
|
13289
|
-
function () {
|
|
13290
|
-
_this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
13291
|
-
}));
|
|
13292
13196
|
}
|
|
13293
13197
|
};
|
|
13294
13198
|
/**
|
|
13295
|
-
* @
|
|
13199
|
+
* @private
|
|
13200
|
+
* @param {?} contents
|
|
13296
13201
|
* @param {?} strip
|
|
13297
13202
|
* @return {?}
|
|
13298
13203
|
*/
|
|
13299
|
-
ContentStripWithTabsPillsComponent.prototype.
|
|
13300
|
-
* @
|
|
13301
|
-
* @param {?}
|
|
13302
|
-
* @return {?}
|
|
13303
|
-
*/
|
|
13304
|
-
function (contentNew, strip) {
|
|
13305
|
-
/** @type {?} */
|
|
13306
|
-
var tabResults = [];
|
|
13307
|
-
/** @type {?} */
|
|
13308
|
-
var splitData = this.getInprogressAndCompleted(contentNew, (/**
|
|
13309
|
-
* @param {?} e
|
|
13310
|
-
* @return {?}
|
|
13311
|
-
*/
|
|
13312
|
-
function (e) { return e.completionStatus === 1 || e.completionPercentage < 100; }), strip);
|
|
13313
|
-
if (strip.tabs && strip.tabs.length) {
|
|
13314
|
-
var _loop_1 = function (i) {
|
|
13315
|
-
if (strip.tabs[i]) {
|
|
13316
|
-
tabResults.push(__assign({}, strip.tabs[i], { fetchTabStatus: 'done' }, (splitData.find((/**
|
|
13317
|
-
* @param {?} itmInner
|
|
13318
|
-
* @return {?}
|
|
13319
|
-
*/
|
|
13320
|
-
function (itmInner) {
|
|
13321
|
-
if (strip.tabs && strip.tabs[i] && itmInner.value === strip.tabs[i].value) {
|
|
13322
|
-
return itmInner;
|
|
13323
|
-
}
|
|
13324
|
-
return undefined;
|
|
13325
|
-
})))));
|
|
13326
|
-
}
|
|
13327
|
-
};
|
|
13328
|
-
for (var i = 0; i < strip.tabs.length; i += 1) {
|
|
13329
|
-
_loop_1(i);
|
|
13330
|
-
}
|
|
13331
|
-
}
|
|
13332
|
-
return tabResults;
|
|
13333
|
-
};
|
|
13334
|
-
/**
|
|
13335
|
-
* @param {?} array
|
|
13336
|
-
* @param {?} customFilter
|
|
13337
|
-
* @param {?} strip
|
|
13338
|
-
* @return {?}
|
|
13339
|
-
*/
|
|
13340
|
-
ContentStripWithTabsPillsComponent.prototype.getInprogressAndCompleted = /**
|
|
13341
|
-
* @param {?} array
|
|
13342
|
-
* @param {?} customFilter
|
|
13343
|
-
* @param {?} strip
|
|
13344
|
-
* @return {?}
|
|
13345
|
-
*/
|
|
13346
|
-
function (array, customFilter, strip) {
|
|
13347
|
-
/** @type {?} */
|
|
13348
|
-
var inprogress = [];
|
|
13349
|
-
/** @type {?} */
|
|
13350
|
-
var completed = [];
|
|
13351
|
-
array.forEach((/**
|
|
13352
|
-
* @param {?} e
|
|
13353
|
-
* @param {?} idx
|
|
13354
|
-
* @param {?} arr
|
|
13355
|
-
* @return {?}
|
|
13356
|
-
*/
|
|
13357
|
-
function (e, idx, arr) { return (customFilter(e, idx, arr) ? inprogress : completed).push(e); }));
|
|
13358
|
-
return [
|
|
13359
|
-
{ value: 'inprogress', widgets: this.transformContentsToWidgets(inprogress, strip) },
|
|
13360
|
-
{ value: 'completed', widgets: this.transformContentsToWidgets(completed, strip) }
|
|
13361
|
-
];
|
|
13362
|
-
};
|
|
13363
|
-
// async fetchFromSearchV6(strip: NsContentStripWithTabs.IContentStripUnit, calculateParentStatus = true) {
|
|
13364
|
-
// if (strip.request && strip.request.searchV6 && Object.keys(strip.request.searchV6).length) {
|
|
13365
|
-
// // if (!(strip.request.searchV6.locale && strip.request.searchV6.locale.length > 0)) {
|
|
13366
|
-
// // if (this.configSvc.activeLocale) {
|
|
13367
|
-
// // strip.request.searchV6.locale = [this.configSvc.activeLocale.locals[0]]
|
|
13368
|
-
// // } else {
|
|
13369
|
-
// // strip.request.searchV6.locale = ['en']
|
|
13370
|
-
// // }
|
|
13371
|
-
// // }
|
|
13372
|
-
// let originalFilters: any = [];
|
|
13373
|
-
// // tslint:disable:no-console
|
|
13374
|
-
// console.log(originalFilters);
|
|
13375
|
-
// if (strip.request &&
|
|
13376
|
-
// strip.request.searchV6 &&
|
|
13377
|
-
// strip.request.searchV6.request &&
|
|
13378
|
-
// strip.request.searchV6.request.filters) {
|
|
13379
|
-
// originalFilters = strip.request.searchV6.request.filters;
|
|
13380
|
-
// strip.request.searchV6.request.filters = this.checkForDateFilters(strip.request.searchV6.request.filters);
|
|
13381
|
-
// strip.request.searchV6.request.filters = this.getFiltersFromArray(
|
|
13382
|
-
// strip.request.searchV6.request.filters,
|
|
13383
|
-
// );
|
|
13384
|
-
// }
|
|
13385
|
-
// if (strip.tabs && strip.tabs.length) {
|
|
13386
|
-
// // TODO: Have to extract requestRequired to outer level of tabs config
|
|
13387
|
-
// const firstTab = strip.tabs[0];
|
|
13388
|
-
// if (firstTab.requestRequired) {
|
|
13389
|
-
// if (this.stripsResultDataMap[strip.key] && this.stripsResultDataMap[strip.key].tabs) {
|
|
13390
|
-
// const allTabs = this.stripsResultDataMap[strip.key].tabs;
|
|
13391
|
-
// const currentTabFromMap = (allTabs && allTabs.length && allTabs[0]) as NsContentStripWithTabs.IContentStripTab;
|
|
13392
|
-
// this.getTabDataByNewReqSearchV6(strip, 0, currentTabFromMap, calculateParentStatus);
|
|
13393
|
-
// }
|
|
13394
|
-
// }
|
|
13395
|
-
// } else {
|
|
13396
|
-
// try {
|
|
13397
|
-
// const response = await this.searchV6Request(strip, strip.request, calculateParentStatus);
|
|
13398
|
-
// // console.log('calling after - response, ', response)
|
|
13399
|
-
// if (response && response.results) {
|
|
13400
|
-
// // console.log('calling after-- ')
|
|
13401
|
-
// if (response.results.result.content) {
|
|
13402
|
-
// if(strip.key === 'scheduledAssessment') {
|
|
13403
|
-
// this.enrollInterval = setInterval(() => {
|
|
13404
|
-
// this.checkInvitOnlyAssessments(response.results.result.content, strip, calculateParentStatus, response.viewMoreUrl)
|
|
13405
|
-
// // tslint:disable-next-line
|
|
13406
|
-
// }, 1000)
|
|
13407
|
-
// } else {
|
|
13408
|
-
// this.processStrip(
|
|
13409
|
-
// strip,
|
|
13410
|
-
// this.transformContentsToWidgets(response.results.result.content, strip),
|
|
13411
|
-
// 'done',
|
|
13412
|
-
// calculateParentStatus,
|
|
13413
|
-
// response.viewMoreUrl,
|
|
13414
|
-
// );
|
|
13415
|
-
// }
|
|
13416
|
-
// } else if (response.results.result.Event) {
|
|
13417
|
-
// this.processStrip(
|
|
13418
|
-
// strip,
|
|
13419
|
-
// this.transformEventsToWidgets(response.results.result.Event, strip),
|
|
13420
|
-
// 'done',
|
|
13421
|
-
// calculateParentStatus,
|
|
13422
|
-
// response.viewMoreUrl,
|
|
13423
|
-
// );
|
|
13424
|
-
// } else {
|
|
13425
|
-
// this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
13426
|
-
// }
|
|
13427
|
-
// } else {
|
|
13428
|
-
// this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
13429
|
-
// }
|
|
13430
|
-
// } catch (error) {
|
|
13431
|
-
// // Handle errors
|
|
13432
|
-
// // console.error('Error:', error);
|
|
13433
|
-
// }
|
|
13434
|
-
// }
|
|
13435
|
-
// }
|
|
13436
|
-
// }
|
|
13437
|
-
// async fetchFromSearchV6(strip: NsContentStripWithTabs.IContentStripUnit, calculateParentStatus = true) {
|
|
13438
|
-
// if (strip.request && strip.request.searchV6 && Object.keys(strip.request.searchV6).length) {
|
|
13439
|
-
// // if (!(strip.request.searchV6.locale && strip.request.searchV6.locale.length > 0)) {
|
|
13440
|
-
// // if (this.configSvc.activeLocale) {
|
|
13441
|
-
// // strip.request.searchV6.locale = [this.configSvc.activeLocale.locals[0]]
|
|
13442
|
-
// // } else {
|
|
13443
|
-
// // strip.request.searchV6.locale = ['en']
|
|
13444
|
-
// // }
|
|
13445
|
-
// // }
|
|
13446
|
-
// let originalFilters: any = [];
|
|
13447
|
-
// // tslint:disable:no-console
|
|
13448
|
-
// console.log(originalFilters);
|
|
13449
|
-
// if (strip.request &&
|
|
13450
|
-
// strip.request.searchV6 &&
|
|
13451
|
-
// strip.request.searchV6.request &&
|
|
13452
|
-
// strip.request.searchV6.request.filters) {
|
|
13453
|
-
// originalFilters = strip.request.searchV6.request.filters;
|
|
13454
|
-
// strip.request.searchV6.request.filters = this.checkForDateFilters(strip.request.searchV6.request.filters);
|
|
13455
|
-
// strip.request.searchV6.request.filters = this.getFiltersFromArray(
|
|
13456
|
-
// strip.request.searchV6.request.filters,
|
|
13457
|
-
// );
|
|
13458
|
-
// }
|
|
13459
|
-
// if (strip.tabs && strip.tabs.length) {
|
|
13460
|
-
// // TODO: Have to extract requestRequired to outer level of tabs config
|
|
13461
|
-
// const firstTab = strip.tabs[0];
|
|
13462
|
-
// if (firstTab.requestRequired) {
|
|
13463
|
-
// if (this.stripsResultDataMap[strip.key] && this.stripsResultDataMap[strip.key].tabs) {
|
|
13464
|
-
// const allTabs = this.stripsResultDataMap[strip.key].tabs;
|
|
13465
|
-
// const currentTabFromMap = (allTabs && allTabs.length && allTabs[0]) as NsContentStripWithTabs.IContentStripTab;
|
|
13466
|
-
// this.getTabDataByNewReqSearchV6(strip, 0, currentTabFromMap, calculateParentStatus);
|
|
13467
|
-
// }
|
|
13468
|
-
// }
|
|
13469
|
-
// } else {
|
|
13470
|
-
// try {
|
|
13471
|
-
// const response = await this.searchV6Request(strip, strip.request, calculateParentStatus);
|
|
13472
|
-
// // console.log('calling after - response, ', response)
|
|
13473
|
-
// if (response && response.results) {
|
|
13474
|
-
// // console.log('calling after-- ')
|
|
13475
|
-
// if (response.results.result.content) {
|
|
13476
|
-
// if(strip.key === 'scheduledAssessment') {
|
|
13477
|
-
// this.enrollInterval = setInterval(() => {
|
|
13478
|
-
// this.checkInvitOnlyAssessments(response.results.result.content, strip, calculateParentStatus, response.viewMoreUrl)
|
|
13479
|
-
// // tslint:disable-next-line
|
|
13480
|
-
// }, 1000)
|
|
13481
|
-
// } else {
|
|
13482
|
-
// this.processStrip(
|
|
13483
|
-
// strip,
|
|
13484
|
-
// this.transformContentsToWidgets(response.results.result.content, strip),
|
|
13485
|
-
// 'done',
|
|
13486
|
-
// calculateParentStatus,
|
|
13487
|
-
// response.viewMoreUrl,
|
|
13488
|
-
// );
|
|
13489
|
-
// }
|
|
13490
|
-
// } else if (response.results.result.Event) {
|
|
13491
|
-
// this.processStrip(
|
|
13492
|
-
// strip,
|
|
13493
|
-
// this.transformEventsToWidgets(response.results.result.Event, strip),
|
|
13494
|
-
// 'done',
|
|
13495
|
-
// calculateParentStatus,
|
|
13496
|
-
// response.viewMoreUrl,
|
|
13497
|
-
// );
|
|
13498
|
-
// } else {
|
|
13499
|
-
// this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
13500
|
-
// }
|
|
13501
|
-
// } else {
|
|
13502
|
-
// this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
13503
|
-
// }
|
|
13504
|
-
// } catch (error) {
|
|
13505
|
-
// // Handle errors
|
|
13506
|
-
// // console.error('Error:', error);
|
|
13507
|
-
// }
|
|
13508
|
-
// }
|
|
13509
|
-
// }
|
|
13510
|
-
// }
|
|
13511
|
-
/**
|
|
13512
|
-
* @param {?} content
|
|
13513
|
-
* @param {?} strip
|
|
13514
|
-
* @param {?} calculateParentStatus
|
|
13515
|
-
* @param {?} viewMoreUrl
|
|
13516
|
-
* @return {?}
|
|
13517
|
-
*/
|
|
13518
|
-
ContentStripWithTabsPillsComponent.prototype.checkInvitOnlyAssessments =
|
|
13519
|
-
// async fetchFromSearchV6(strip: NsContentStripWithTabs.IContentStripUnit, calculateParentStatus = true) {
|
|
13520
|
-
// if (strip.request && strip.request.searchV6 && Object.keys(strip.request.searchV6).length) {
|
|
13521
|
-
// // if (!(strip.request.searchV6.locale && strip.request.searchV6.locale.length > 0)) {
|
|
13522
|
-
// // if (this.configSvc.activeLocale) {
|
|
13523
|
-
// // strip.request.searchV6.locale = [this.configSvc.activeLocale.locals[0]]
|
|
13524
|
-
// // } else {
|
|
13525
|
-
// // strip.request.searchV6.locale = ['en']
|
|
13526
|
-
// // }
|
|
13527
|
-
// // }
|
|
13528
|
-
// let originalFilters: any = [];
|
|
13529
|
-
// // tslint:disable:no-console
|
|
13530
|
-
// console.log(originalFilters);
|
|
13531
|
-
// if (strip.request &&
|
|
13532
|
-
// strip.request.searchV6 &&
|
|
13533
|
-
// strip.request.searchV6.request &&
|
|
13534
|
-
// strip.request.searchV6.request.filters) {
|
|
13535
|
-
// originalFilters = strip.request.searchV6.request.filters;
|
|
13536
|
-
// strip.request.searchV6.request.filters = this.checkForDateFilters(strip.request.searchV6.request.filters);
|
|
13537
|
-
// strip.request.searchV6.request.filters = this.getFiltersFromArray(
|
|
13538
|
-
// strip.request.searchV6.request.filters,
|
|
13539
|
-
// );
|
|
13540
|
-
// }
|
|
13541
|
-
// if (strip.tabs && strip.tabs.length) {
|
|
13542
|
-
// // TODO: Have to extract requestRequired to outer level of tabs config
|
|
13543
|
-
// const firstTab = strip.tabs[0];
|
|
13544
|
-
// if (firstTab.requestRequired) {
|
|
13545
|
-
// if (this.stripsResultDataMap[strip.key] && this.stripsResultDataMap[strip.key].tabs) {
|
|
13546
|
-
// const allTabs = this.stripsResultDataMap[strip.key].tabs;
|
|
13547
|
-
// const currentTabFromMap = (allTabs && allTabs.length && allTabs[0]) as NsContentStripWithTabs.IContentStripTab;
|
|
13548
|
-
// this.getTabDataByNewReqSearchV6(strip, 0, currentTabFromMap, calculateParentStatus);
|
|
13549
|
-
// }
|
|
13550
|
-
// }
|
|
13551
|
-
// } else {
|
|
13552
|
-
// try {
|
|
13553
|
-
// const response = await this.searchV6Request(strip, strip.request, calculateParentStatus);
|
|
13554
|
-
// // console.log('calling after - response, ', response)
|
|
13555
|
-
// if (response && response.results) {
|
|
13556
|
-
// // console.log('calling after-- ')
|
|
13557
|
-
// if (response.results.result.content) {
|
|
13558
|
-
// if(strip.key === 'scheduledAssessment') {
|
|
13559
|
-
// this.enrollInterval = setInterval(() => {
|
|
13560
|
-
// this.checkInvitOnlyAssessments(response.results.result.content, strip, calculateParentStatus, response.viewMoreUrl)
|
|
13561
|
-
// // tslint:disable-next-line
|
|
13562
|
-
// }, 1000)
|
|
13563
|
-
// } else {
|
|
13564
|
-
// this.processStrip(
|
|
13565
|
-
// strip,
|
|
13566
|
-
// this.transformContentsToWidgets(response.results.result.content, strip),
|
|
13567
|
-
// 'done',
|
|
13568
|
-
// calculateParentStatus,
|
|
13569
|
-
// response.viewMoreUrl,
|
|
13570
|
-
// );
|
|
13571
|
-
// }
|
|
13572
|
-
// } else if (response.results.result.Event) {
|
|
13573
|
-
// this.processStrip(
|
|
13574
|
-
// strip,
|
|
13575
|
-
// this.transformEventsToWidgets(response.results.result.Event, strip),
|
|
13576
|
-
// 'done',
|
|
13577
|
-
// calculateParentStatus,
|
|
13578
|
-
// response.viewMoreUrl,
|
|
13579
|
-
// );
|
|
13580
|
-
// } else {
|
|
13581
|
-
// this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
13582
|
-
// }
|
|
13583
|
-
// } else {
|
|
13584
|
-
// this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
13585
|
-
// }
|
|
13586
|
-
// } catch (error) {
|
|
13587
|
-
// // Handle errors
|
|
13588
|
-
// // console.error('Error:', error);
|
|
13589
|
-
// }
|
|
13590
|
-
// }
|
|
13591
|
-
// }
|
|
13592
|
-
// }
|
|
13593
|
-
/**
|
|
13594
|
-
* @param {?} content
|
|
13595
|
-
* @param {?} strip
|
|
13596
|
-
* @param {?} calculateParentStatus
|
|
13597
|
-
* @param {?} viewMoreUrl
|
|
13598
|
-
* @return {?}
|
|
13599
|
-
*/
|
|
13600
|
-
function (content, strip, calculateParentStatus, viewMoreUrl) {
|
|
13601
|
-
var _this = this;
|
|
13602
|
-
if (localStorage.getItem('enrollmentMapData')) {
|
|
13603
|
-
this.enrollmentMapData = JSON.parse(localStorage.getItem('enrollmentMapData') || '{}');
|
|
13604
|
-
/** @type {?} */
|
|
13605
|
-
var filteredArray_1 = [];
|
|
13606
|
-
content.forEach((/**
|
|
13607
|
-
* @param {?} data
|
|
13608
|
-
* @return {?}
|
|
13609
|
-
*/
|
|
13610
|
-
function (data) {
|
|
13611
|
-
if (_this.enrollmentMapData[data.identifier]) {
|
|
13612
|
-
data['batch'] = _this.enrollmentMapData[data.identifier].batch;
|
|
13613
|
-
data['completionPercentage'] = _this.enrollmentMapData[data.identifier].completionPercentage;
|
|
13614
|
-
filteredArray_1.push(data);
|
|
13615
|
-
}
|
|
13616
|
-
}));
|
|
13617
|
-
this.processStrip(strip, this.transformContentsToWidgets(filteredArray_1, strip), 'done', calculateParentStatus, viewMoreUrl);
|
|
13618
|
-
clearInterval(this.enrollInterval);
|
|
13619
|
-
}
|
|
13620
|
-
};
|
|
13621
|
-
// async searchV6Request(strip: NsContentStripWithTabs.IContentStripUnit,
|
|
13622
|
-
// request: NsContentStripWithTabs.IContentStripUnit['request'],
|
|
13623
|
-
// calculateParentStatus: boolean
|
|
13624
|
-
// ): Promise<any> {
|
|
13625
|
-
// const originalFilters: any = [];
|
|
13626
|
-
// return new Promise<any>((resolve, reject) => {
|
|
13627
|
-
// if (request && request.searchV6) {
|
|
13628
|
-
// this.contentSvc.searchV6(request.searchV6).subscribe(results => {
|
|
13629
|
-
// const showViewMore = Boolean(
|
|
13630
|
-
// results.result.content && results.result.content.length > 5 && strip.stripConfig && strip.stripConfig.postCardForSearch,
|
|
13631
|
-
// );
|
|
13632
|
-
// const viewMoreUrl = showViewMore
|
|
13633
|
-
// ? {
|
|
13634
|
-
// path: strip.viewMoreUrl && strip.viewMoreUrl.path || '',
|
|
13635
|
-
// queryParams: {
|
|
13636
|
-
// tab: 'Learn',
|
|
13637
|
-
// q: strip.viewMoreUrl && strip.viewMoreUrl.queryParams,
|
|
13638
|
-
// f:
|
|
13639
|
-
// request &&
|
|
13640
|
-
// request.searchV6 &&
|
|
13641
|
-
// request.searchV6.request &&
|
|
13642
|
-
// request.searchV6.request.filters
|
|
13643
|
-
// ? JSON.stringify(
|
|
13644
|
-
// this.transformSearchV6FiltersV2(
|
|
13645
|
-
// originalFilters,
|
|
13646
|
-
// )
|
|
13647
|
-
// )
|
|
13648
|
-
// : {},
|
|
13649
|
-
// },
|
|
13650
|
-
// }
|
|
13651
|
-
// : null;
|
|
13652
|
-
// // if (viewMoreUrl && viewMoreUrl.queryParams) {
|
|
13653
|
-
// // viewMoreUrl.queryParams = viewMoreUrl.queryParams
|
|
13654
|
-
// // }
|
|
13655
|
-
// resolve({ results, viewMoreUrl });
|
|
13656
|
-
// }, (error: any) => {
|
|
13657
|
-
// this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
13658
|
-
// reject(error);
|
|
13659
|
-
// },
|
|
13660
|
-
// );
|
|
13661
|
-
// }
|
|
13662
|
-
// });
|
|
13663
|
-
// }
|
|
13664
|
-
// async searchV6Request(strip: NsContentStripWithTabs.IContentStripUnit,
|
|
13665
|
-
// request: NsContentStripWithTabs.IContentStripUnit['request'],
|
|
13666
|
-
// calculateParentStatus: boolean
|
|
13667
|
-
// ): Promise<any> {
|
|
13668
|
-
// const originalFilters: any = [];
|
|
13669
|
-
// return new Promise<any>((resolve, reject) => {
|
|
13670
|
-
// if (request && request.searchV6) {
|
|
13671
|
-
// this.contentSvc.searchV6(request.searchV6).subscribe(results => {
|
|
13672
|
-
// const showViewMore = Boolean(
|
|
13673
|
-
// results.result.content && results.result.content.length > 5 && strip.stripConfig && strip.stripConfig.postCardForSearch,
|
|
13674
|
-
// );
|
|
13675
|
-
// const viewMoreUrl = showViewMore
|
|
13676
|
-
// ? {
|
|
13677
|
-
// path: strip.viewMoreUrl && strip.viewMoreUrl.path || '',
|
|
13678
|
-
// queryParams: {
|
|
13679
|
-
// tab: 'Learn',
|
|
13680
|
-
// q: strip.viewMoreUrl && strip.viewMoreUrl.queryParams,
|
|
13681
|
-
// f:
|
|
13682
|
-
// request &&
|
|
13683
|
-
// request.searchV6 &&
|
|
13684
|
-
// request.searchV6.request &&
|
|
13685
|
-
// request.searchV6.request.filters
|
|
13686
|
-
// ? JSON.stringify(
|
|
13687
|
-
// this.transformSearchV6FiltersV2(
|
|
13688
|
-
// originalFilters,
|
|
13689
|
-
// )
|
|
13690
|
-
// )
|
|
13691
|
-
// : {},
|
|
13692
|
-
// },
|
|
13693
|
-
// }
|
|
13694
|
-
// : null;
|
|
13695
|
-
// // if (viewMoreUrl && viewMoreUrl.queryParams) {
|
|
13696
|
-
// // viewMoreUrl.queryParams = viewMoreUrl.queryParams
|
|
13697
|
-
// // }
|
|
13698
|
-
// resolve({ results, viewMoreUrl });
|
|
13699
|
-
// }, (error: any) => {
|
|
13700
|
-
// this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
13701
|
-
// reject(error);
|
|
13702
|
-
// },
|
|
13703
|
-
// );
|
|
13704
|
-
// }
|
|
13705
|
-
// });
|
|
13706
|
-
// }
|
|
13707
|
-
/**
|
|
13708
|
-
* @param {?} strip
|
|
13709
|
-
* @param {?=} calculateParentStatus
|
|
13710
|
-
* @return {?}
|
|
13711
|
-
*/
|
|
13712
|
-
ContentStripWithTabsPillsComponent.prototype.fetchFromTrendingContent =
|
|
13713
|
-
// async searchV6Request(strip: NsContentStripWithTabs.IContentStripUnit,
|
|
13714
|
-
// request: NsContentStripWithTabs.IContentStripUnit['request'],
|
|
13715
|
-
// calculateParentStatus: boolean
|
|
13716
|
-
// ): Promise<any> {
|
|
13717
|
-
// const originalFilters: any = [];
|
|
13718
|
-
// return new Promise<any>((resolve, reject) => {
|
|
13719
|
-
// if (request && request.searchV6) {
|
|
13720
|
-
// this.contentSvc.searchV6(request.searchV6).subscribe(results => {
|
|
13721
|
-
// const showViewMore = Boolean(
|
|
13722
|
-
// results.result.content && results.result.content.length > 5 && strip.stripConfig && strip.stripConfig.postCardForSearch,
|
|
13723
|
-
// );
|
|
13724
|
-
// const viewMoreUrl = showViewMore
|
|
13725
|
-
// ? {
|
|
13726
|
-
// path: strip.viewMoreUrl && strip.viewMoreUrl.path || '',
|
|
13727
|
-
// queryParams: {
|
|
13728
|
-
// tab: 'Learn',
|
|
13729
|
-
// q: strip.viewMoreUrl && strip.viewMoreUrl.queryParams,
|
|
13730
|
-
// f:
|
|
13731
|
-
// request &&
|
|
13732
|
-
// request.searchV6 &&
|
|
13733
|
-
// request.searchV6.request &&
|
|
13734
|
-
// request.searchV6.request.filters
|
|
13735
|
-
// ? JSON.stringify(
|
|
13736
|
-
// this.transformSearchV6FiltersV2(
|
|
13737
|
-
// originalFilters,
|
|
13738
|
-
// )
|
|
13739
|
-
// )
|
|
13740
|
-
// : {},
|
|
13741
|
-
// },
|
|
13742
|
-
// }
|
|
13743
|
-
// : null;
|
|
13744
|
-
// // if (viewMoreUrl && viewMoreUrl.queryParams) {
|
|
13745
|
-
// // viewMoreUrl.queryParams = viewMoreUrl.queryParams
|
|
13746
|
-
// // }
|
|
13747
|
-
// resolve({ results, viewMoreUrl });
|
|
13748
|
-
// }, (error: any) => {
|
|
13749
|
-
// this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
13750
|
-
// reject(error);
|
|
13751
|
-
// },
|
|
13752
|
-
// );
|
|
13753
|
-
// }
|
|
13754
|
-
// });
|
|
13755
|
-
// }
|
|
13756
|
-
/**
|
|
13757
|
-
* @param {?} strip
|
|
13758
|
-
* @param {?=} calculateParentStatus
|
|
13759
|
-
* @return {?}
|
|
13760
|
-
*/
|
|
13761
|
-
function (strip, calculateParentStatus) {
|
|
13762
|
-
if (calculateParentStatus === void 0) { calculateParentStatus = true; }
|
|
13763
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
13764
|
-
var originalFilters, firstTab, allTabs, currentTabFromMap, response, content, error_1;
|
|
13765
|
-
return __generator(this, function (_a) {
|
|
13766
|
-
switch (_a.label) {
|
|
13767
|
-
case 0:
|
|
13768
|
-
if (!(strip.request && strip.request.trendingSearch && Object.keys(strip.request.trendingSearch).length)) return [3 /*break*/, 4];
|
|
13769
|
-
// if (!(strip.request.searchV6.locale && strip.request.searchV6.locale.length > 0)) {
|
|
13770
|
-
// if (this.configSvc.activeLocale) {
|
|
13771
|
-
// strip.request.searchV6.locale = [this.configSvc.activeLocale.locals[0]]
|
|
13772
|
-
// } else {
|
|
13773
|
-
// strip.request.searchV6.locale = ['en']
|
|
13774
|
-
// }
|
|
13775
|
-
// }
|
|
13776
|
-
originalFilters = [];
|
|
13777
|
-
// tslint:disable:no-console
|
|
13778
|
-
if (strip.request &&
|
|
13779
|
-
strip.request.trendingSearch &&
|
|
13780
|
-
strip.request.trendingSearch.request &&
|
|
13781
|
-
strip.request.trendingSearch.request.filters) {
|
|
13782
|
-
originalFilters = strip.request.trendingSearch.request.filters;
|
|
13783
|
-
strip.request.trendingSearch.request.filters = this.checkForDateFilters(strip.request.trendingSearch.request.filters);
|
|
13784
|
-
strip.request.trendingSearch.request.filters = this.getFiltersFromArray(strip.request.trendingSearch.request.filters);
|
|
13785
|
-
}
|
|
13786
|
-
if (!(strip.tabs && strip.tabs.length)) return [3 /*break*/, 1];
|
|
13787
|
-
// TODO: Have to extract requestRequired to outer level of tabs config
|
|
13788
|
-
firstTab = strip.tabs[0];
|
|
13789
|
-
if (firstTab.requestRequired) {
|
|
13790
|
-
if (this.stripsResultDataMap[strip.key] && this.stripsResultDataMap[strip.key].tabs) {
|
|
13791
|
-
allTabs = this.stripsResultDataMap[strip.key].tabs;
|
|
13792
|
-
currentTabFromMap = (/** @type {?} */ ((allTabs && allTabs.length && allTabs[0])));
|
|
13793
|
-
this.getTabDataByNewReqTrending(strip, 0, 0, currentTabFromMap, calculateParentStatus);
|
|
13794
|
-
}
|
|
13795
|
-
}
|
|
13796
|
-
return [3 /*break*/, 4];
|
|
13797
|
-
case 1:
|
|
13798
|
-
_a.trys.push([1, 3, , 4]);
|
|
13799
|
-
return [4 /*yield*/, this.trendingSearchRequest(strip, strip.request, calculateParentStatus)];
|
|
13800
|
-
case 2:
|
|
13801
|
-
response = _a.sent();
|
|
13802
|
-
if (response && response.results && response.results.response) {
|
|
13803
|
-
content = response.results.response[strip.request.trendingSearch.responseKey] || [];
|
|
13804
|
-
this.processStrip(strip, this.transformContentsToWidgets(content, strip), 'done', calculateParentStatus, response.viewMoreUrl || '');
|
|
13805
|
-
if (!content.length) {
|
|
13806
|
-
this.emptyResponse.emit(true);
|
|
13807
|
-
}
|
|
13808
|
-
}
|
|
13809
|
-
else {
|
|
13810
|
-
this.emptyResponse.emit(true);
|
|
13811
|
-
this.processStrip(strip, [], 'done', calculateParentStatus, null);
|
|
13812
|
-
}
|
|
13813
|
-
return [3 /*break*/, 4];
|
|
13814
|
-
case 3:
|
|
13815
|
-
error_1 = _a.sent();
|
|
13816
|
-
// Handle errors
|
|
13817
|
-
this.emptyResponse.emit(true);
|
|
13818
|
-
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
13819
|
-
return [3 /*break*/, 4];
|
|
13820
|
-
case 4: return [2 /*return*/];
|
|
13821
|
-
}
|
|
13822
|
-
});
|
|
13823
|
-
});
|
|
13824
|
-
};
|
|
13825
|
-
// async trendingSearchRequest(strip: NsContentStripWithTabs.IContentStripUnit,
|
|
13826
|
-
// request: NsContentStripWithTabs.IContentStripUnit['request'],
|
|
13827
|
-
// calculateParentStatus: boolean
|
|
13828
|
-
// ): Promise<any> {
|
|
13829
|
-
// const originalFilters: any = [];
|
|
13830
|
-
// return new Promise<any>((resolve, reject) => {
|
|
13831
|
-
// if (request && request.trendingSearch) {
|
|
13832
|
-
// // check for the request if it has dynamic values]
|
|
13833
|
-
// if (request.trendingSearch.request.filters.organisation &&
|
|
13834
|
-
// request.trendingSearch.request.filters.organisation.indexOf('<orgID>') >= 0
|
|
13835
|
-
// ) {
|
|
13836
|
-
// let userRootOrgId;
|
|
13837
|
-
// if (this.configSvc.userProfile) {
|
|
13838
|
-
// userRootOrgId = this.configSvc.userProfile.rootOrgId;
|
|
13839
|
-
// }
|
|
13840
|
-
// request.trendingSearch.request.filters.organisation = userRootOrgId;
|
|
13841
|
-
// }
|
|
13842
|
-
// this.contentSvc.trendingContentSearch(request.trendingSearch).subscribe(results => {
|
|
13843
|
-
// const showViewMore = Boolean(
|
|
13844
|
-
// results.result &&
|
|
13845
|
-
// strip.request &&
|
|
13846
|
-
// results.result[strip.request.trendingSearch.responseKey] &&
|
|
13847
|
-
// results.result[strip.request.trendingSearch.responseKey].length > 5 &&
|
|
13848
|
-
// strip.stripConfig && strip.stripConfig.postCardForSearch,
|
|
13849
|
-
// );
|
|
13850
|
-
// const viewMoreUrl = showViewMore
|
|
13851
|
-
// ? {
|
|
13852
|
-
// path: strip.viewMoreUrl && strip.viewMoreUrl.path || '',
|
|
13853
|
-
// queryParams: {
|
|
13854
|
-
// tab: 'Learn',
|
|
13855
|
-
// q: strip.viewMoreUrl && strip.viewMoreUrl.queryParams,
|
|
13856
|
-
// f:
|
|
13857
|
-
// request &&
|
|
13858
|
-
// request.trendingSearch &&
|
|
13859
|
-
// request.trendingSearch.request &&
|
|
13860
|
-
// request.trendingSearch.request.filters
|
|
13861
|
-
// ? JSON.stringify(
|
|
13862
|
-
// this.transformSearchV6FiltersV2(
|
|
13863
|
-
// originalFilters,
|
|
13864
|
-
// )
|
|
13865
|
-
// )
|
|
13866
|
-
// : {},
|
|
13867
|
-
// },
|
|
13868
|
-
// }
|
|
13869
|
-
// : null;
|
|
13870
|
-
// let proccesedResult: any = []
|
|
13871
|
-
// if (results && results.response && results.response.certifications) {
|
|
13872
|
-
// results.response.certifications.map((result: any) => {
|
|
13873
|
-
// if (result.source === this.channnelName) {
|
|
13874
|
-
// proccesedResult.push(result)
|
|
13875
|
-
// }
|
|
13876
|
-
// })
|
|
13877
|
-
// }
|
|
13878
|
-
// results = {response: {certifications: proccesedResult}}
|
|
13879
|
-
// resolve({ results, viewMoreUrl });
|
|
13880
|
-
// }, (error: any) => {
|
|
13881
|
-
// if (error.error && error.error.status === 400) {
|
|
13882
|
-
// this.processStrip(strip, [], 'done', calculateParentStatus, null);
|
|
13883
|
-
// }
|
|
13884
|
-
// // this.processStrip(strip, [], 'done', calculateParentStatus, null)
|
|
13885
|
-
// reject(error);
|
|
13886
|
-
// },
|
|
13887
|
-
// );
|
|
13888
|
-
// }
|
|
13889
|
-
// });
|
|
13890
|
-
// }
|
|
13891
|
-
// async trendingSearchRequest(strip: NsContentStripWithTabs.IContentStripUnit,
|
|
13892
|
-
// request: NsContentStripWithTabs.IContentStripUnit['request'],
|
|
13893
|
-
// calculateParentStatus: boolean
|
|
13894
|
-
// ): Promise<any> {
|
|
13895
|
-
// const originalFilters: any = [];
|
|
13896
|
-
// return new Promise<any>((resolve, reject) => {
|
|
13897
|
-
// if (request && request.trendingSearch) {
|
|
13898
|
-
// // check for the request if it has dynamic values]
|
|
13899
|
-
// if (request.trendingSearch.request.filters.organisation &&
|
|
13900
|
-
// request.trendingSearch.request.filters.organisation.indexOf('<orgID>') >= 0
|
|
13901
|
-
// ) {
|
|
13902
|
-
// let userRootOrgId;
|
|
13903
|
-
// if (this.configSvc.userProfile) {
|
|
13904
|
-
// userRootOrgId = this.configSvc.userProfile.rootOrgId;
|
|
13905
|
-
// }
|
|
13906
|
-
// request.trendingSearch.request.filters.organisation = userRootOrgId;
|
|
13907
|
-
// }
|
|
13908
|
-
// this.contentSvc.trendingContentSearch(request.trendingSearch).subscribe(results => {
|
|
13909
|
-
// const showViewMore = Boolean(
|
|
13910
|
-
// results.result &&
|
|
13911
|
-
// strip.request &&
|
|
13912
|
-
// results.result[strip.request.trendingSearch.responseKey] &&
|
|
13913
|
-
// results.result[strip.request.trendingSearch.responseKey].length > 5 &&
|
|
13914
|
-
// strip.stripConfig && strip.stripConfig.postCardForSearch,
|
|
13915
|
-
// );
|
|
13916
|
-
// const viewMoreUrl = showViewMore
|
|
13917
|
-
// ? {
|
|
13918
|
-
// path: strip.viewMoreUrl && strip.viewMoreUrl.path || '',
|
|
13919
|
-
// queryParams: {
|
|
13920
|
-
// tab: 'Learn',
|
|
13921
|
-
// q: strip.viewMoreUrl && strip.viewMoreUrl.queryParams,
|
|
13922
|
-
// f:
|
|
13923
|
-
// request &&
|
|
13924
|
-
// request.trendingSearch &&
|
|
13925
|
-
// request.trendingSearch.request &&
|
|
13926
|
-
// request.trendingSearch.request.filters
|
|
13927
|
-
// ? JSON.stringify(
|
|
13928
|
-
// this.transformSearchV6FiltersV2(
|
|
13929
|
-
// originalFilters,
|
|
13930
|
-
// )
|
|
13931
|
-
// )
|
|
13932
|
-
// : {},
|
|
13933
|
-
// },
|
|
13934
|
-
// }
|
|
13935
|
-
// : null;
|
|
13936
|
-
// let proccesedResult: any = []
|
|
13937
|
-
// if (results && results.response && results.response.certifications) {
|
|
13938
|
-
// results.response.certifications.map((result: any) => {
|
|
13939
|
-
// if (result.source === this.channnelName) {
|
|
13940
|
-
// proccesedResult.push(result)
|
|
13941
|
-
// }
|
|
13942
|
-
// })
|
|
13943
|
-
// }
|
|
13944
|
-
// results = {response: {certifications: proccesedResult}}
|
|
13945
|
-
// resolve({ results, viewMoreUrl });
|
|
13946
|
-
// }, (error: any) => {
|
|
13947
|
-
// if (error.error && error.error.status === 400) {
|
|
13948
|
-
// this.processStrip(strip, [], 'done', calculateParentStatus, null);
|
|
13949
|
-
// }
|
|
13950
|
-
// // this.processStrip(strip, [], 'done', calculateParentStatus, null)
|
|
13951
|
-
// reject(error);
|
|
13952
|
-
// },
|
|
13953
|
-
// );
|
|
13954
|
-
// }
|
|
13955
|
-
// });
|
|
13956
|
-
// }
|
|
13957
|
-
/**
|
|
13958
|
-
* @param {?} data
|
|
13959
|
-
* @return {?}
|
|
13960
|
-
*/
|
|
13961
|
-
ContentStripWithTabsPillsComponent.prototype.toggleInfo =
|
|
13962
|
-
// async trendingSearchRequest(strip: NsContentStripWithTabs.IContentStripUnit,
|
|
13963
|
-
// request: NsContentStripWithTabs.IContentStripUnit['request'],
|
|
13964
|
-
// calculateParentStatus: boolean
|
|
13965
|
-
// ): Promise<any> {
|
|
13966
|
-
// const originalFilters: any = [];
|
|
13967
|
-
// return new Promise<any>((resolve, reject) => {
|
|
13968
|
-
// if (request && request.trendingSearch) {
|
|
13969
|
-
// // check for the request if it has dynamic values]
|
|
13970
|
-
// if (request.trendingSearch.request.filters.organisation &&
|
|
13971
|
-
// request.trendingSearch.request.filters.organisation.indexOf('<orgID>') >= 0
|
|
13972
|
-
// ) {
|
|
13973
|
-
// let userRootOrgId;
|
|
13974
|
-
// if (this.configSvc.userProfile) {
|
|
13975
|
-
// userRootOrgId = this.configSvc.userProfile.rootOrgId;
|
|
13976
|
-
// }
|
|
13977
|
-
// request.trendingSearch.request.filters.organisation = userRootOrgId;
|
|
13978
|
-
// }
|
|
13979
|
-
// this.contentSvc.trendingContentSearch(request.trendingSearch).subscribe(results => {
|
|
13980
|
-
// const showViewMore = Boolean(
|
|
13981
|
-
// results.result &&
|
|
13982
|
-
// strip.request &&
|
|
13983
|
-
// results.result[strip.request.trendingSearch.responseKey] &&
|
|
13984
|
-
// results.result[strip.request.trendingSearch.responseKey].length > 5 &&
|
|
13985
|
-
// strip.stripConfig && strip.stripConfig.postCardForSearch,
|
|
13986
|
-
// );
|
|
13987
|
-
// const viewMoreUrl = showViewMore
|
|
13988
|
-
// ? {
|
|
13989
|
-
// path: strip.viewMoreUrl && strip.viewMoreUrl.path || '',
|
|
13990
|
-
// queryParams: {
|
|
13991
|
-
// tab: 'Learn',
|
|
13992
|
-
// q: strip.viewMoreUrl && strip.viewMoreUrl.queryParams,
|
|
13993
|
-
// f:
|
|
13994
|
-
// request &&
|
|
13995
|
-
// request.trendingSearch &&
|
|
13996
|
-
// request.trendingSearch.request &&
|
|
13997
|
-
// request.trendingSearch.request.filters
|
|
13998
|
-
// ? JSON.stringify(
|
|
13999
|
-
// this.transformSearchV6FiltersV2(
|
|
14000
|
-
// originalFilters,
|
|
14001
|
-
// )
|
|
14002
|
-
// )
|
|
14003
|
-
// : {},
|
|
14004
|
-
// },
|
|
14005
|
-
// }
|
|
14006
|
-
// : null;
|
|
14007
|
-
// let proccesedResult: any = []
|
|
14008
|
-
// if (results && results.response && results.response.certifications) {
|
|
14009
|
-
// results.response.certifications.map((result: any) => {
|
|
14010
|
-
// if (result.source === this.channnelName) {
|
|
14011
|
-
// proccesedResult.push(result)
|
|
14012
|
-
// }
|
|
14013
|
-
// })
|
|
14014
|
-
// }
|
|
14015
|
-
// results = {response: {certifications: proccesedResult}}
|
|
14016
|
-
// resolve({ results, viewMoreUrl });
|
|
14017
|
-
// }, (error: any) => {
|
|
14018
|
-
// if (error.error && error.error.status === 400) {
|
|
14019
|
-
// this.processStrip(strip, [], 'done', calculateParentStatus, null);
|
|
14020
|
-
// }
|
|
14021
|
-
// // this.processStrip(strip, [], 'done', calculateParentStatus, null)
|
|
14022
|
-
// reject(error);
|
|
14023
|
-
// },
|
|
14024
|
-
// );
|
|
14025
|
-
// }
|
|
14026
|
-
// });
|
|
14027
|
-
// }
|
|
14028
|
-
/**
|
|
14029
|
-
* @param {?} data
|
|
14030
|
-
* @return {?}
|
|
14031
|
-
*/
|
|
14032
|
-
function (data) {
|
|
14033
|
-
/** @type {?} */
|
|
14034
|
-
var stripInfo = this.stripsResultDataMap[data.key].stripInfo;
|
|
14035
|
-
if (stripInfo) {
|
|
14036
|
-
if (stripInfo.mode !== 'below') {
|
|
14037
|
-
this.loggerSvc.warn("strip info mode: " + stripInfo.mode + " not implemented yet");
|
|
14038
|
-
stripInfo.mode = 'below';
|
|
14039
|
-
}
|
|
14040
|
-
if (stripInfo.mode === 'below') {
|
|
14041
|
-
this.stripsResultDataMap[data.key].stripInfo = __assign({}, stripInfo, { visibilityMode: stripInfo.visibilityMode === 'hidden' ? 'visible' : 'hidden' });
|
|
14042
|
-
}
|
|
14043
|
-
}
|
|
14044
|
-
};
|
|
14045
|
-
/**
|
|
14046
|
-
* @private
|
|
14047
|
-
* @param {?} contents
|
|
14048
|
-
* @param {?} strip
|
|
14049
|
-
* @return {?}
|
|
14050
|
-
*/
|
|
14051
|
-
ContentStripWithTabsPillsComponent.prototype.transformContentsToWidgets = /**
|
|
14052
|
-
* @private
|
|
14053
|
-
* @param {?} contents
|
|
13204
|
+
ContentStripWithTabsPillsComponent.prototype.transformContentsToWidgets = /**
|
|
13205
|
+
* @private
|
|
13206
|
+
* @param {?} contents
|
|
14054
13207
|
* @param {?} strip
|
|
14055
13208
|
* @return {?}
|
|
14056
13209
|
*/
|
|
@@ -14268,428 +13421,19 @@
|
|
|
14268
13421
|
(strip.request.search && Object.keys(strip.request.search).length) ||
|
|
14269
13422
|
(strip.request.searchRegionRecommendation &&
|
|
14270
13423
|
Object.keys(strip.request.searchRegionRecommendation).length) ||
|
|
14271
|
-
(strip.request.searchV6 && Object.keys(strip.request.searchV6).length) ||
|
|
14272
|
-
(strip.request.enrollmentList && Object.keys(strip.request.enrollmentList).length) ||
|
|
14273
13424
|
(strip.request.cbpList && Object.keys(strip.request.cbpList).length) ||
|
|
14274
|
-
(strip.request.trendingSearch && Object.keys(strip.request.trendingSearch).length) ||
|
|
14275
|
-
(strip.request.topContent && Object.keys(strip.request.topContent).length) ||
|
|
14276
|
-
(strip.request.featureContent && Object.keys(strip.request.featureContent).length) ||
|
|
14277
|
-
(strip.request.bookmarkRead && Object.keys(strip.request.bookmarkRead).length) ||
|
|
14278
|
-
(strip.request.playlistSearch && Object.keys(strip.request.playlistSearch).length) ||
|
|
14279
|
-
(strip.request.playlistRead && Object.keys(strip.request.playlistRead).length) ||
|
|
14280
|
-
(strip.request.ciosContent && Object.keys(strip.request.ciosContent).length) ||
|
|
14281
13425
|
(strip && strip.tabs.length))) {
|
|
14282
13426
|
return true;
|
|
14283
13427
|
}
|
|
14284
13428
|
return false;
|
|
14285
13429
|
};
|
|
14286
|
-
// public tabClicked(tabEvent: MatTabChangeEvent, stripMap: IStripUnitContentData, stripKey: string) {
|
|
14287
|
-
// if (stripMap && stripMap.tabs && stripMap.tabs[tabEvent.index]) {
|
|
14288
|
-
// stripMap.tabs[tabEvent.index].fetchTabStatus = 'inprogress';
|
|
14289
|
-
// stripMap.tabs[tabEvent.index].tabLoading = true;
|
|
14290
|
-
// stripMap.showOnLoader = true;
|
|
14291
|
-
// }
|
|
14292
|
-
// const data: WsEvents.ITelemetryTabData = {
|
|
14293
|
-
// label: `${tabEvent.tab.textLabel}`,
|
|
14294
|
-
// index: tabEvent.index,
|
|
14295
|
-
// };
|
|
14296
|
-
// this.eventSvc.raiseInteractTelemetry(
|
|
14297
|
-
// {
|
|
14298
|
-
// type: WsEvents.EnumInteractTypes.CLICK,
|
|
14299
|
-
// subType: WsEvents.EnumInteractSubTypes.HOME_PAGE_STRIP_TABS,
|
|
14300
|
-
// id: `${_.camelCase(data.label)}-tab`,
|
|
14301
|
-
// },
|
|
14302
|
-
// {},
|
|
14303
|
-
// {
|
|
14304
|
-
// module: WsEvents.EnumTelemetrymodules.HOME,
|
|
14305
|
-
// }
|
|
14306
|
-
// );
|
|
14307
|
-
// const currentTabFromMap: any = stripMap.tabs && stripMap.tabs[tabEvent.index];
|
|
14308
|
-
// const currentStrip = this.widgetData.strips.find(s => s.key === stripKey);
|
|
14309
|
-
// if (this.stripsResultDataMap[stripKey] && currentTabFromMap) {
|
|
14310
|
-
// this.stripsResultDataMap[stripKey].viewMoreUrl.queryParams = {
|
|
14311
|
-
// ...this.stripsResultDataMap[stripKey].viewMoreUrl.queryParams,
|
|
14312
|
-
// tabSelected: currentTabFromMap.label,
|
|
14313
|
-
// };
|
|
14314
|
-
// }
|
|
14315
|
-
// if (currentStrip && currentTabFromMap && !currentTabFromMap.computeDataOnClick) {
|
|
14316
|
-
// if (currentTabFromMap.requestRequired && currentTabFromMap.request) {
|
|
14317
|
-
// // call API to get tab data and process
|
|
14318
|
-
// // this.processStrip(currentStrip, [], 'fetching', true, null)
|
|
14319
|
-
// if (currentTabFromMap.request.searchV6) {
|
|
14320
|
-
// this.getTabDataByNewReqSearchV6(currentStrip, tabEvent.index, currentTabFromMap, true);
|
|
14321
|
-
// } else if (currentTabFromMap.request.trendingSearch) {
|
|
14322
|
-
// this.getTabDataByNewReqTrending(currentStrip, tabEvent.index, 0, currentTabFromMap, true);
|
|
14323
|
-
// }
|
|
14324
|
-
// if (stripMap && stripMap.tabs && stripMap.tabs[tabEvent.index]) {
|
|
14325
|
-
// stripMap.tabs[tabEvent.index].tabLoading = false;
|
|
14326
|
-
// }
|
|
14327
|
-
// } else {
|
|
14328
|
-
// this.getTabDataByfilter(currentStrip, currentTabFromMap, true);
|
|
14329
|
-
// setTimeout(() => {
|
|
14330
|
-
// if (stripMap && stripMap.tabs && stripMap.tabs[tabEvent.index]) {
|
|
14331
|
-
// stripMap.tabs[tabEvent.index].tabLoading = false;
|
|
14332
|
-
// stripMap.tabs[tabEvent.index].fetchTabStatus = 'done';
|
|
14333
|
-
// stripMap.showOnLoader = false;
|
|
14334
|
-
// }
|
|
14335
|
-
// }, 200);
|
|
14336
|
-
// }
|
|
14337
|
-
// }
|
|
14338
|
-
// }
|
|
14339
|
-
// async getTabDataByNewReqSearchV6(
|
|
14340
|
-
// strip: NsContentStripWithTabs.IContentStripUnit,
|
|
14341
|
-
// tabIndex: number,
|
|
14342
|
-
// currentTab: NsContentStripWithTabs.IContentStripTab,
|
|
14343
|
-
// calculateParentStatus: boolean
|
|
14344
|
-
// ) {
|
|
14345
|
-
// try {
|
|
14346
|
-
// const response = await this.searchV6Request(strip, currentTab.request, calculateParentStatus);
|
|
14347
|
-
// if (response && response.results) {
|
|
14348
|
-
// const widgets = this.transformContentsToWidgets(response.results.result.content, strip);
|
|
14349
|
-
// let tabResults: any[] = [];
|
|
14350
|
-
// if (this.stripsResultDataMap[strip.key] && this.stripsResultDataMap[strip.key].tabs) {
|
|
14351
|
-
// const allTabs = this.stripsResultDataMap[strip.key].tabs;
|
|
14352
|
-
// if (allTabs && allTabs.length && allTabs[tabIndex]) {
|
|
14353
|
-
// allTabs[tabIndex] = {
|
|
14354
|
-
// ...allTabs[tabIndex],
|
|
14355
|
-
// widgets,
|
|
14356
|
-
// fetchTabStatus: 'done',
|
|
14357
|
-
// };
|
|
14358
|
-
// tabResults = allTabs;
|
|
14359
|
-
// }
|
|
14360
|
-
// }
|
|
14361
|
-
// this.processStrip(
|
|
14362
|
-
// strip,
|
|
14363
|
-
// widgets,
|
|
14364
|
-
// 'done',
|
|
14365
|
-
// calculateParentStatus,
|
|
14366
|
-
// response.viewMoreUrl,
|
|
14367
|
-
// tabResults // tabResults as widgets
|
|
14368
|
-
// );
|
|
14369
|
-
// } else {
|
|
14370
|
-
// this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
14371
|
-
// }
|
|
14372
|
-
// } catch (error) {
|
|
14373
|
-
// // Handle errors
|
|
14374
|
-
// // console.error('Error:', error);
|
|
14375
|
-
// }
|
|
14376
|
-
// }
|
|
14377
|
-
// async getTabDataByNewReqTrending(
|
|
14378
|
-
// strip: NsContentStripWithTabs.IContentStripUnit,
|
|
14379
|
-
// tabIndex: number,
|
|
14380
|
-
// currentTab: NsContentStripWithTabs.IContentStripTab,
|
|
14381
|
-
// calculateParentStatus: boolean
|
|
14382
|
-
// ) {
|
|
14383
|
-
// try {
|
|
14384
|
-
// const response = await this.trendingSearchRequest(strip, currentTab.request, calculateParentStatus);
|
|
14385
|
-
// if (response && response.results && response.results.response) {
|
|
14386
|
-
// const content = response.results.response[currentTab.value] || [];
|
|
14387
|
-
// const widgets = this.transformContentsToWidgets(content, strip);
|
|
14388
|
-
// // console.log('currentTab --- widgets', widgets)
|
|
14389
|
-
// let tabResults: any[] = [];
|
|
14390
|
-
// if (this.stripsResultDataMap[strip.key] && this.stripsResultDataMap[strip.key].tabs) {
|
|
14391
|
-
// const allTabs = this.stripsResultDataMap[strip.key].tabs;
|
|
14392
|
-
// if (allTabs && allTabs.length && allTabs[tabIndex]) {
|
|
14393
|
-
// allTabs[tabIndex] = {
|
|
14394
|
-
// ...allTabs[tabIndex],
|
|
14395
|
-
// widgets,
|
|
14396
|
-
// fetchTabStatus: 'done',
|
|
14397
|
-
// };
|
|
14398
|
-
// tabResults = allTabs;
|
|
14399
|
-
// }
|
|
14400
|
-
// }
|
|
14401
|
-
// // console.log('tabResults -++++***--', tabResults)
|
|
14402
|
-
// // console.log('calling after-- ')
|
|
14403
|
-
// this.processStrip(
|
|
14404
|
-
// strip,
|
|
14405
|
-
// widgets,
|
|
14406
|
-
// 'done',
|
|
14407
|
-
// calculateParentStatus,
|
|
14408
|
-
// response.viewMoreUrl,
|
|
14409
|
-
// tabResults // tabResults as widgets
|
|
14410
|
-
// );
|
|
14411
|
-
// } else {
|
|
14412
|
-
// this.processStrip(strip, [], 'done', calculateParentStatus, null);
|
|
14413
|
-
// }
|
|
14414
|
-
// } catch (error) {
|
|
14415
|
-
// // Handle errors
|
|
14416
|
-
// this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
14417
|
-
// }
|
|
14418
|
-
// }
|
|
14419
|
-
// public tabClicked(tabEvent: MatTabChangeEvent, stripMap: IStripUnitContentData, stripKey: string) {
|
|
14420
|
-
// if (stripMap && stripMap.tabs && stripMap.tabs[tabEvent.index]) {
|
|
14421
|
-
// stripMap.tabs[tabEvent.index].fetchTabStatus = 'inprogress';
|
|
14422
|
-
// stripMap.tabs[tabEvent.index].tabLoading = true;
|
|
14423
|
-
// stripMap.showOnLoader = true;
|
|
14424
|
-
// }
|
|
14425
|
-
// const data: WsEvents.ITelemetryTabData = {
|
|
14426
|
-
// label: `${tabEvent.tab.textLabel}`,
|
|
14427
|
-
// index: tabEvent.index,
|
|
14428
|
-
// };
|
|
14429
|
-
// this.eventSvc.raiseInteractTelemetry(
|
|
14430
|
-
// {
|
|
14431
|
-
// type: WsEvents.EnumInteractTypes.CLICK,
|
|
14432
|
-
// subType: WsEvents.EnumInteractSubTypes.HOME_PAGE_STRIP_TABS,
|
|
14433
|
-
// id: `${_.camelCase(data.label)}-tab`,
|
|
14434
|
-
// },
|
|
14435
|
-
// {},
|
|
14436
|
-
// {
|
|
14437
|
-
// module: WsEvents.EnumTelemetrymodules.HOME,
|
|
14438
|
-
// }
|
|
14439
|
-
// );
|
|
14440
|
-
// const currentTabFromMap: any = stripMap.tabs && stripMap.tabs[tabEvent.index];
|
|
14441
|
-
// const currentStrip = this.widgetData.strips.find(s => s.key === stripKey);
|
|
14442
|
-
// if (this.stripsResultDataMap[stripKey] && currentTabFromMap) {
|
|
14443
|
-
// this.stripsResultDataMap[stripKey].viewMoreUrl.queryParams = {
|
|
14444
|
-
// ...this.stripsResultDataMap[stripKey].viewMoreUrl.queryParams,
|
|
14445
|
-
// tabSelected: currentTabFromMap.label,
|
|
14446
|
-
// };
|
|
14447
|
-
// }
|
|
14448
|
-
// if (currentStrip && currentTabFromMap && !currentTabFromMap.computeDataOnClick) {
|
|
14449
|
-
// if (currentTabFromMap.requestRequired && currentTabFromMap.request) {
|
|
14450
|
-
// // call API to get tab data and process
|
|
14451
|
-
// // this.processStrip(currentStrip, [], 'fetching', true, null)
|
|
14452
|
-
// if (currentTabFromMap.request.searchV6) {
|
|
14453
|
-
// this.getTabDataByNewReqSearchV6(currentStrip, tabEvent.index, currentTabFromMap, true);
|
|
14454
|
-
// } else if (currentTabFromMap.request.trendingSearch) {
|
|
14455
|
-
// this.getTabDataByNewReqTrending(currentStrip, tabEvent.index, 0, currentTabFromMap, true);
|
|
14456
|
-
// }
|
|
14457
|
-
// if (stripMap && stripMap.tabs && stripMap.tabs[tabEvent.index]) {
|
|
14458
|
-
// stripMap.tabs[tabEvent.index].tabLoading = false;
|
|
14459
|
-
// }
|
|
14460
|
-
// } else {
|
|
14461
|
-
// this.getTabDataByfilter(currentStrip, currentTabFromMap, true);
|
|
14462
|
-
// setTimeout(() => {
|
|
14463
|
-
// if (stripMap && stripMap.tabs && stripMap.tabs[tabEvent.index]) {
|
|
14464
|
-
// stripMap.tabs[tabEvent.index].tabLoading = false;
|
|
14465
|
-
// stripMap.tabs[tabEvent.index].fetchTabStatus = 'done';
|
|
14466
|
-
// stripMap.showOnLoader = false;
|
|
14467
|
-
// }
|
|
14468
|
-
// }, 200);
|
|
14469
|
-
// }
|
|
14470
|
-
// }
|
|
14471
|
-
// }
|
|
14472
|
-
// async getTabDataByNewReqSearchV6(
|
|
14473
|
-
// strip: NsContentStripWithTabs.IContentStripUnit,
|
|
14474
|
-
// tabIndex: number,
|
|
14475
|
-
// currentTab: NsContentStripWithTabs.IContentStripTab,
|
|
14476
|
-
// calculateParentStatus: boolean
|
|
14477
|
-
// ) {
|
|
14478
|
-
// try {
|
|
14479
|
-
// const response = await this.searchV6Request(strip, currentTab.request, calculateParentStatus);
|
|
14480
|
-
// if (response && response.results) {
|
|
14481
|
-
// const widgets = this.transformContentsToWidgets(response.results.result.content, strip);
|
|
14482
|
-
// let tabResults: any[] = [];
|
|
14483
|
-
// if (this.stripsResultDataMap[strip.key] && this.stripsResultDataMap[strip.key].tabs) {
|
|
14484
|
-
// const allTabs = this.stripsResultDataMap[strip.key].tabs;
|
|
14485
|
-
// if (allTabs && allTabs.length && allTabs[tabIndex]) {
|
|
14486
|
-
// allTabs[tabIndex] = {
|
|
14487
|
-
// ...allTabs[tabIndex],
|
|
14488
|
-
// widgets,
|
|
14489
|
-
// fetchTabStatus: 'done',
|
|
14490
|
-
// };
|
|
14491
|
-
// tabResults = allTabs;
|
|
14492
|
-
// }
|
|
14493
|
-
// }
|
|
14494
|
-
// this.processStrip(
|
|
14495
|
-
// strip,
|
|
14496
|
-
// widgets,
|
|
14497
|
-
// 'done',
|
|
14498
|
-
// calculateParentStatus,
|
|
14499
|
-
// response.viewMoreUrl,
|
|
14500
|
-
// tabResults // tabResults as widgets
|
|
14501
|
-
// );
|
|
14502
|
-
// } else {
|
|
14503
|
-
// this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
14504
|
-
// }
|
|
14505
|
-
// } catch (error) {
|
|
14506
|
-
// // Handle errors
|
|
14507
|
-
// // console.error('Error:', error);
|
|
14508
|
-
// }
|
|
14509
|
-
// }
|
|
14510
|
-
// async getTabDataByNewReqTrending(
|
|
14511
|
-
// strip: NsContentStripWithTabs.IContentStripUnit,
|
|
14512
|
-
// tabIndex: number,
|
|
14513
|
-
// currentTab: NsContentStripWithTabs.IContentStripTab,
|
|
14514
|
-
// calculateParentStatus: boolean
|
|
14515
|
-
// ) {
|
|
14516
|
-
// try {
|
|
14517
|
-
// const response = await this.trendingSearchRequest(strip, currentTab.request, calculateParentStatus);
|
|
14518
|
-
// if (response && response.results && response.results.response) {
|
|
14519
|
-
// const content = response.results.response[currentTab.value] || [];
|
|
14520
|
-
// const widgets = this.transformContentsToWidgets(content, strip);
|
|
14521
|
-
// // console.log('currentTab --- widgets', widgets)
|
|
14522
|
-
// let tabResults: any[] = [];
|
|
14523
|
-
// if (this.stripsResultDataMap[strip.key] && this.stripsResultDataMap[strip.key].tabs) {
|
|
14524
|
-
// const allTabs = this.stripsResultDataMap[strip.key].tabs;
|
|
14525
|
-
// if (allTabs && allTabs.length && allTabs[tabIndex]) {
|
|
14526
|
-
// allTabs[tabIndex] = {
|
|
14527
|
-
// ...allTabs[tabIndex],
|
|
14528
|
-
// widgets,
|
|
14529
|
-
// fetchTabStatus: 'done',
|
|
14530
|
-
// };
|
|
14531
|
-
// tabResults = allTabs;
|
|
14532
|
-
// }
|
|
14533
|
-
// }
|
|
14534
|
-
// // console.log('tabResults -++++***--', tabResults)
|
|
14535
|
-
// // console.log('calling after-- ')
|
|
14536
|
-
// this.processStrip(
|
|
14537
|
-
// strip,
|
|
14538
|
-
// widgets,
|
|
14539
|
-
// 'done',
|
|
14540
|
-
// calculateParentStatus,
|
|
14541
|
-
// response.viewMoreUrl,
|
|
14542
|
-
// tabResults // tabResults as widgets
|
|
14543
|
-
// );
|
|
14544
|
-
// } else {
|
|
14545
|
-
// this.processStrip(strip, [], 'done', calculateParentStatus, null);
|
|
14546
|
-
// }
|
|
14547
|
-
// } catch (error) {
|
|
14548
|
-
// // Handle errors
|
|
14549
|
-
// this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
14550
|
-
// }
|
|
14551
|
-
// }
|
|
14552
13430
|
/**
|
|
14553
13431
|
* @param {?} strip
|
|
14554
13432
|
* @param {?} currentTab
|
|
14555
13433
|
* @param {?} calculateParentStatus
|
|
14556
13434
|
* @return {?}
|
|
14557
13435
|
*/
|
|
14558
|
-
ContentStripWithTabsPillsComponent.prototype.getTabDataByfilter =
|
|
14559
|
-
// public tabClicked(tabEvent: MatTabChangeEvent, stripMap: IStripUnitContentData, stripKey: string) {
|
|
14560
|
-
// if (stripMap && stripMap.tabs && stripMap.tabs[tabEvent.index]) {
|
|
14561
|
-
// stripMap.tabs[tabEvent.index].fetchTabStatus = 'inprogress';
|
|
14562
|
-
// stripMap.tabs[tabEvent.index].tabLoading = true;
|
|
14563
|
-
// stripMap.showOnLoader = true;
|
|
14564
|
-
// }
|
|
14565
|
-
// const data: WsEvents.ITelemetryTabData = {
|
|
14566
|
-
// label: `${tabEvent.tab.textLabel}`,
|
|
14567
|
-
// index: tabEvent.index,
|
|
14568
|
-
// };
|
|
14569
|
-
// this.eventSvc.raiseInteractTelemetry(
|
|
14570
|
-
// {
|
|
14571
|
-
// type: WsEvents.EnumInteractTypes.CLICK,
|
|
14572
|
-
// subType: WsEvents.EnumInteractSubTypes.HOME_PAGE_STRIP_TABS,
|
|
14573
|
-
// id: `${_.camelCase(data.label)}-tab`,
|
|
14574
|
-
// },
|
|
14575
|
-
// {},
|
|
14576
|
-
// {
|
|
14577
|
-
// module: WsEvents.EnumTelemetrymodules.HOME,
|
|
14578
|
-
// }
|
|
14579
|
-
// );
|
|
14580
|
-
// const currentTabFromMap: any = stripMap.tabs && stripMap.tabs[tabEvent.index];
|
|
14581
|
-
// const currentStrip = this.widgetData.strips.find(s => s.key === stripKey);
|
|
14582
|
-
// if (this.stripsResultDataMap[stripKey] && currentTabFromMap) {
|
|
14583
|
-
// this.stripsResultDataMap[stripKey].viewMoreUrl.queryParams = {
|
|
14584
|
-
// ...this.stripsResultDataMap[stripKey].viewMoreUrl.queryParams,
|
|
14585
|
-
// tabSelected: currentTabFromMap.label,
|
|
14586
|
-
// };
|
|
14587
|
-
// }
|
|
14588
|
-
// if (currentStrip && currentTabFromMap && !currentTabFromMap.computeDataOnClick) {
|
|
14589
|
-
// if (currentTabFromMap.requestRequired && currentTabFromMap.request) {
|
|
14590
|
-
// // call API to get tab data and process
|
|
14591
|
-
// // this.processStrip(currentStrip, [], 'fetching', true, null)
|
|
14592
|
-
// if (currentTabFromMap.request.searchV6) {
|
|
14593
|
-
// this.getTabDataByNewReqSearchV6(currentStrip, tabEvent.index, currentTabFromMap, true);
|
|
14594
|
-
// } else if (currentTabFromMap.request.trendingSearch) {
|
|
14595
|
-
// this.getTabDataByNewReqTrending(currentStrip, tabEvent.index, 0, currentTabFromMap, true);
|
|
14596
|
-
// }
|
|
14597
|
-
// if (stripMap && stripMap.tabs && stripMap.tabs[tabEvent.index]) {
|
|
14598
|
-
// stripMap.tabs[tabEvent.index].tabLoading = false;
|
|
14599
|
-
// }
|
|
14600
|
-
// } else {
|
|
14601
|
-
// this.getTabDataByfilter(currentStrip, currentTabFromMap, true);
|
|
14602
|
-
// setTimeout(() => {
|
|
14603
|
-
// if (stripMap && stripMap.tabs && stripMap.tabs[tabEvent.index]) {
|
|
14604
|
-
// stripMap.tabs[tabEvent.index].tabLoading = false;
|
|
14605
|
-
// stripMap.tabs[tabEvent.index].fetchTabStatus = 'done';
|
|
14606
|
-
// stripMap.showOnLoader = false;
|
|
14607
|
-
// }
|
|
14608
|
-
// }, 200);
|
|
14609
|
-
// }
|
|
14610
|
-
// }
|
|
14611
|
-
// }
|
|
14612
|
-
// async getTabDataByNewReqSearchV6(
|
|
14613
|
-
// strip: NsContentStripWithTabs.IContentStripUnit,
|
|
14614
|
-
// tabIndex: number,
|
|
14615
|
-
// currentTab: NsContentStripWithTabs.IContentStripTab,
|
|
14616
|
-
// calculateParentStatus: boolean
|
|
14617
|
-
// ) {
|
|
14618
|
-
// try {
|
|
14619
|
-
// const response = await this.searchV6Request(strip, currentTab.request, calculateParentStatus);
|
|
14620
|
-
// if (response && response.results) {
|
|
14621
|
-
// const widgets = this.transformContentsToWidgets(response.results.result.content, strip);
|
|
14622
|
-
// let tabResults: any[] = [];
|
|
14623
|
-
// if (this.stripsResultDataMap[strip.key] && this.stripsResultDataMap[strip.key].tabs) {
|
|
14624
|
-
// const allTabs = this.stripsResultDataMap[strip.key].tabs;
|
|
14625
|
-
// if (allTabs && allTabs.length && allTabs[tabIndex]) {
|
|
14626
|
-
// allTabs[tabIndex] = {
|
|
14627
|
-
// ...allTabs[tabIndex],
|
|
14628
|
-
// widgets,
|
|
14629
|
-
// fetchTabStatus: 'done',
|
|
14630
|
-
// };
|
|
14631
|
-
// tabResults = allTabs;
|
|
14632
|
-
// }
|
|
14633
|
-
// }
|
|
14634
|
-
// this.processStrip(
|
|
14635
|
-
// strip,
|
|
14636
|
-
// widgets,
|
|
14637
|
-
// 'done',
|
|
14638
|
-
// calculateParentStatus,
|
|
14639
|
-
// response.viewMoreUrl,
|
|
14640
|
-
// tabResults // tabResults as widgets
|
|
14641
|
-
// );
|
|
14642
|
-
// } else {
|
|
14643
|
-
// this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
14644
|
-
// }
|
|
14645
|
-
// } catch (error) {
|
|
14646
|
-
// // Handle errors
|
|
14647
|
-
// // console.error('Error:', error);
|
|
14648
|
-
// }
|
|
14649
|
-
// }
|
|
14650
|
-
// async getTabDataByNewReqTrending(
|
|
14651
|
-
// strip: NsContentStripWithTabs.IContentStripUnit,
|
|
14652
|
-
// tabIndex: number,
|
|
14653
|
-
// currentTab: NsContentStripWithTabs.IContentStripTab,
|
|
14654
|
-
// calculateParentStatus: boolean
|
|
14655
|
-
// ) {
|
|
14656
|
-
// try {
|
|
14657
|
-
// const response = await this.trendingSearchRequest(strip, currentTab.request, calculateParentStatus);
|
|
14658
|
-
// if (response && response.results && response.results.response) {
|
|
14659
|
-
// const content = response.results.response[currentTab.value] || [];
|
|
14660
|
-
// const widgets = this.transformContentsToWidgets(content, strip);
|
|
14661
|
-
// // console.log('currentTab --- widgets', widgets)
|
|
14662
|
-
// let tabResults: any[] = [];
|
|
14663
|
-
// if (this.stripsResultDataMap[strip.key] && this.stripsResultDataMap[strip.key].tabs) {
|
|
14664
|
-
// const allTabs = this.stripsResultDataMap[strip.key].tabs;
|
|
14665
|
-
// if (allTabs && allTabs.length && allTabs[tabIndex]) {
|
|
14666
|
-
// allTabs[tabIndex] = {
|
|
14667
|
-
// ...allTabs[tabIndex],
|
|
14668
|
-
// widgets,
|
|
14669
|
-
// fetchTabStatus: 'done',
|
|
14670
|
-
// };
|
|
14671
|
-
// tabResults = allTabs;
|
|
14672
|
-
// }
|
|
14673
|
-
// }
|
|
14674
|
-
// // console.log('tabResults -++++***--', tabResults)
|
|
14675
|
-
// // console.log('calling after-- ')
|
|
14676
|
-
// this.processStrip(
|
|
14677
|
-
// strip,
|
|
14678
|
-
// widgets,
|
|
14679
|
-
// 'done',
|
|
14680
|
-
// calculateParentStatus,
|
|
14681
|
-
// response.viewMoreUrl,
|
|
14682
|
-
// tabResults // tabResults as widgets
|
|
14683
|
-
// );
|
|
14684
|
-
// } else {
|
|
14685
|
-
// this.processStrip(strip, [], 'done', calculateParentStatus, null);
|
|
14686
|
-
// }
|
|
14687
|
-
// } catch (error) {
|
|
14688
|
-
// // Handle errors
|
|
14689
|
-
// this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
14690
|
-
// }
|
|
14691
|
-
// }
|
|
14692
|
-
/**
|
|
13436
|
+
ContentStripWithTabsPillsComponent.prototype.getTabDataByfilter = /**
|
|
14693
13437
|
* @param {?} strip
|
|
14694
13438
|
* @param {?} currentTab
|
|
14695
13439
|
* @param {?} calculateParentStatus
|
|
@@ -14705,406 +13449,12 @@
|
|
|
14705
13449
|
// TODO: Write logic for individual filter if passed in config
|
|
14706
13450
|
// add switch case based on config key passed
|
|
14707
13451
|
};
|
|
14708
|
-
// async fetchAllCbpPlans(strip: any, calculateParentStatus = true) {
|
|
14709
|
-
// if (strip.request && strip.request.cbpList && Object.keys(strip.request.cbpList).length) {
|
|
14710
|
-
// let courses: NsContent.IContent[];
|
|
14711
|
-
// let tabResults: any[] = [];
|
|
14712
|
-
// const response = await this.userSvc.fetchCbpPlanList().toPromise();
|
|
14713
|
-
// if (response) {
|
|
14714
|
-
// courses = response;
|
|
14715
|
-
// if (strip.tabs && strip.tabs.length) {
|
|
14716
|
-
// tabResults = this.splitCbpTabsData(courses, strip);
|
|
14717
|
-
// await this.processStrip(
|
|
14718
|
-
// strip,
|
|
14719
|
-
// this.transformContentsToWidgets(courses, strip),
|
|
14720
|
-
// 'done',
|
|
14721
|
-
// calculateParentStatus,
|
|
14722
|
-
// '',
|
|
14723
|
-
// tabResults
|
|
14724
|
-
// );
|
|
14725
|
-
// } else {
|
|
14726
|
-
// this.processStrip(
|
|
14727
|
-
// strip,
|
|
14728
|
-
// this.transformContentsToWidgets(courses, strip),
|
|
14729
|
-
// 'done',
|
|
14730
|
-
// calculateParentStatus,
|
|
14731
|
-
// 'viewMoreUrl',
|
|
14732
|
-
// );
|
|
14733
|
-
// }
|
|
14734
|
-
// }
|
|
14735
|
-
// // this.userSvc.fetchCbpPlanList().subscribe( async (res: any) => {
|
|
14736
|
-
// // if (res) {
|
|
14737
|
-
// // console.log(res,'===============================>')
|
|
14738
|
-
// // courses = res
|
|
14739
|
-
// // if (strip.tabs && strip.tabs.length) {
|
|
14740
|
-
// // tabResults = this.splitCbpTabsData(courses, strip)
|
|
14741
|
-
// // await this.processStrip(
|
|
14742
|
-
// // strip,
|
|
14743
|
-
// // this.transformContentsToWidgets(courses, strip),
|
|
14744
|
-
// // 'done',
|
|
14745
|
-
// // calculateParentStatus,
|
|
14746
|
-
// // '',
|
|
14747
|
-
// // tabResults
|
|
14748
|
-
// // )
|
|
14749
|
-
// // } else {
|
|
14750
|
-
// // this.processStrip(
|
|
14751
|
-
// // strip,
|
|
14752
|
-
// // this.transformContentsToWidgets(courses, strip),
|
|
14753
|
-
// // 'done',
|
|
14754
|
-
// // calculateParentStatus,
|
|
14755
|
-
// // 'viewMoreUrl',
|
|
14756
|
-
// // )
|
|
14757
|
-
// // }
|
|
14758
|
-
// // }
|
|
14759
|
-
// // }, (_err: any) => {
|
|
14760
|
-
// // })
|
|
14761
|
-
// clearInterval(this.enrollInterval);
|
|
14762
|
-
// }
|
|
14763
|
-
// }
|
|
14764
|
-
// splitCbpTabsData(contentNew: NsContent.IContent[], strip: NsContentStripWithTabs.IContentStripUnit) {
|
|
14765
|
-
// const tabResults: any[] = [];
|
|
14766
|
-
// const splitData = this.getTabsList(
|
|
14767
|
-
// contentNew,
|
|
14768
|
-
// strip,
|
|
14769
|
-
// );
|
|
14770
|
-
// if (strip.tabs && strip.tabs.length) {
|
|
14771
|
-
// for (let i = 0; i < strip.tabs.length; i += 1) {
|
|
14772
|
-
// if (strip.tabs[i]) {
|
|
14773
|
-
// tabResults.push(
|
|
14774
|
-
// {
|
|
14775
|
-
// ...strip.tabs[i],
|
|
14776
|
-
// fetchTabStatus: 'done',
|
|
14777
|
-
// ...(splitData.find(itmInner => {
|
|
14778
|
-
// if (strip.tabs && strip.tabs[i] && itmInner.value === strip.tabs[i].value) {
|
|
14779
|
-
// return itmInner;
|
|
14780
|
-
// }
|
|
14781
|
-
// return undefined;
|
|
14782
|
-
// })),
|
|
14783
|
-
// }
|
|
14784
|
-
// );
|
|
14785
|
-
// }
|
|
14786
|
-
// }
|
|
14787
|
-
// }
|
|
14788
|
-
// return tabResults;
|
|
14789
|
-
// }
|
|
14790
|
-
// getTabsList(array: NsContent.IContent[],
|
|
14791
|
-
// strip: NsContentStripWithTabs.IContentStripUnit) {
|
|
14792
|
-
// let all: any[] = [];
|
|
14793
|
-
// let upcoming: any[] = [];
|
|
14794
|
-
// let overdue: any[] = [];
|
|
14795
|
-
// array.forEach((e: any) => {
|
|
14796
|
-
// all.push(e);
|
|
14797
|
-
// if (e.planDuration === NsCardContent.ACBPConst.OVERDUE) {
|
|
14798
|
-
// overdue.push(e);
|
|
14799
|
-
// } else if (e.planDuration === NsCardContent.ACBPConst.UPCOMING) {
|
|
14800
|
-
// upcoming.push(e);
|
|
14801
|
-
// }
|
|
14802
|
-
// });
|
|
14803
|
-
// const allCompleted = all.filter((allData: any) => allData.contentStatus === 2);
|
|
14804
|
-
// let allInCompleted = all.filter((allData: any) => allData.contentStatus < 2);
|
|
14805
|
-
// let allCompletedOverDue = allCompleted.filter((allData: any) => allData.planDuration === NsCardContent.ACBPConst.OVERDUE);
|
|
14806
|
-
// const allCompletedAll = allCompleted.filter((allData: any) => allData.planDuration !== NsCardContent.ACBPConst.OVERDUE);
|
|
14807
|
-
// allCompletedOverDue = allCompletedOverDue.sort((a: any, b: any): any => {
|
|
14808
|
-
// if (a.planDuration === NsCardContent.ACBPConst.OVERDUE && b.planDuration === NsCardContent.ACBPConst.OVERDUE) {
|
|
14809
|
-
// const firstDate: any = new Date(a.endDate);
|
|
14810
|
-
// const secondDate: any = new Date(b.endDate);
|
|
14811
|
-
// return firstDate > secondDate ? -1 : 1;
|
|
14812
|
-
// }
|
|
14813
|
-
// });
|
|
14814
|
-
// allInCompleted = allInCompleted.sort((a: any, b: any): any => {
|
|
14815
|
-
// if (a.planDuration === NsCardContent.ACBPConst.OVERDUE && b.planDuration === NsCardContent.ACBPConst.OVERDUE) {
|
|
14816
|
-
// const firstDate: any = new Date(a.endDate);
|
|
14817
|
-
// const secondDate: any = new Date(b.endDate);
|
|
14818
|
-
// return firstDate > secondDate ? -1 : 1;
|
|
14819
|
-
// }
|
|
14820
|
-
// });
|
|
14821
|
-
// all = [...allInCompleted, ...allCompletedAll, ...allCompletedOverDue];
|
|
14822
|
-
// overdue = overdue.filter((data: any): any => {
|
|
14823
|
-
// return data.contentStatus < 2;
|
|
14824
|
-
// });
|
|
14825
|
-
// overdue = overdue.sort((a: any, b: any): any => {
|
|
14826
|
-
// const firstDate: any = new Date(a.endDate);
|
|
14827
|
-
// const secondDate: any = new Date(b.endDate);
|
|
14828
|
-
// return firstDate > secondDate ? -1 : 1;
|
|
14829
|
-
// });
|
|
14830
|
-
// upcoming = upcoming.filter((data: any): any => {
|
|
14831
|
-
// return data.contentStatus < 2;
|
|
14832
|
-
// });
|
|
14833
|
-
// // this.getSelectedIndex(1)
|
|
14834
|
-
// return [
|
|
14835
|
-
// { value: 'all', widgets: this.transformContentsToWidgets(all, strip) },
|
|
14836
|
-
// { value: 'upcoming', widgets: this.transformContentsToWidgets(upcoming, strip) },
|
|
14837
|
-
// { value: 'overdue', widgets: this.transformContentsToWidgets(overdue, strip) }];
|
|
14838
|
-
// }
|
|
14839
|
-
// async fetchAllCbpPlans(strip: any, calculateParentStatus = true) {
|
|
14840
|
-
// if (strip.request && strip.request.cbpList && Object.keys(strip.request.cbpList).length) {
|
|
14841
|
-
// let courses: NsContent.IContent[];
|
|
14842
|
-
// let tabResults: any[] = [];
|
|
14843
|
-
// const response = await this.userSvc.fetchCbpPlanList().toPromise();
|
|
14844
|
-
// if (response) {
|
|
14845
|
-
// courses = response;
|
|
14846
|
-
// if (strip.tabs && strip.tabs.length) {
|
|
14847
|
-
// tabResults = this.splitCbpTabsData(courses, strip);
|
|
14848
|
-
// await this.processStrip(
|
|
14849
|
-
// strip,
|
|
14850
|
-
// this.transformContentsToWidgets(courses, strip),
|
|
14851
|
-
// 'done',
|
|
14852
|
-
// calculateParentStatus,
|
|
14853
|
-
// '',
|
|
14854
|
-
// tabResults
|
|
14855
|
-
// );
|
|
14856
|
-
// } else {
|
|
14857
|
-
// this.processStrip(
|
|
14858
|
-
// strip,
|
|
14859
|
-
// this.transformContentsToWidgets(courses, strip),
|
|
14860
|
-
// 'done',
|
|
14861
|
-
// calculateParentStatus,
|
|
14862
|
-
// 'viewMoreUrl',
|
|
14863
|
-
// );
|
|
14864
|
-
// }
|
|
14865
|
-
// }
|
|
14866
|
-
// // this.userSvc.fetchCbpPlanList().subscribe( async (res: any) => {
|
|
14867
|
-
// // if (res) {
|
|
14868
|
-
// // console.log(res,'===============================>')
|
|
14869
|
-
// // courses = res
|
|
14870
|
-
// // if (strip.tabs && strip.tabs.length) {
|
|
14871
|
-
// // tabResults = this.splitCbpTabsData(courses, strip)
|
|
14872
|
-
// // await this.processStrip(
|
|
14873
|
-
// // strip,
|
|
14874
|
-
// // this.transformContentsToWidgets(courses, strip),
|
|
14875
|
-
// // 'done',
|
|
14876
|
-
// // calculateParentStatus,
|
|
14877
|
-
// // '',
|
|
14878
|
-
// // tabResults
|
|
14879
|
-
// // )
|
|
14880
|
-
// // } else {
|
|
14881
|
-
// // this.processStrip(
|
|
14882
|
-
// // strip,
|
|
14883
|
-
// // this.transformContentsToWidgets(courses, strip),
|
|
14884
|
-
// // 'done',
|
|
14885
|
-
// // calculateParentStatus,
|
|
14886
|
-
// // 'viewMoreUrl',
|
|
14887
|
-
// // )
|
|
14888
|
-
// // }
|
|
14889
|
-
// // }
|
|
14890
|
-
// // }, (_err: any) => {
|
|
14891
|
-
// // })
|
|
14892
|
-
// clearInterval(this.enrollInterval);
|
|
14893
|
-
// }
|
|
14894
|
-
// }
|
|
14895
|
-
// splitCbpTabsData(contentNew: NsContent.IContent[], strip: NsContentStripWithTabs.IContentStripUnit) {
|
|
14896
|
-
// const tabResults: any[] = [];
|
|
14897
|
-
// const splitData = this.getTabsList(
|
|
14898
|
-
// contentNew,
|
|
14899
|
-
// strip,
|
|
14900
|
-
// );
|
|
14901
|
-
// if (strip.tabs && strip.tabs.length) {
|
|
14902
|
-
// for (let i = 0; i < strip.tabs.length; i += 1) {
|
|
14903
|
-
// if (strip.tabs[i]) {
|
|
14904
|
-
// tabResults.push(
|
|
14905
|
-
// {
|
|
14906
|
-
// ...strip.tabs[i],
|
|
14907
|
-
// fetchTabStatus: 'done',
|
|
14908
|
-
// ...(splitData.find(itmInner => {
|
|
14909
|
-
// if (strip.tabs && strip.tabs[i] && itmInner.value === strip.tabs[i].value) {
|
|
14910
|
-
// return itmInner;
|
|
14911
|
-
// }
|
|
14912
|
-
// return undefined;
|
|
14913
|
-
// })),
|
|
14914
|
-
// }
|
|
14915
|
-
// );
|
|
14916
|
-
// }
|
|
14917
|
-
// }
|
|
14918
|
-
// }
|
|
14919
|
-
// return tabResults;
|
|
14920
|
-
// }
|
|
14921
|
-
// getTabsList(array: NsContent.IContent[],
|
|
14922
|
-
// strip: NsContentStripWithTabs.IContentStripUnit) {
|
|
14923
|
-
// let all: any[] = [];
|
|
14924
|
-
// let upcoming: any[] = [];
|
|
14925
|
-
// let overdue: any[] = [];
|
|
14926
|
-
// array.forEach((e: any) => {
|
|
14927
|
-
// all.push(e);
|
|
14928
|
-
// if (e.planDuration === NsCardContent.ACBPConst.OVERDUE) {
|
|
14929
|
-
// overdue.push(e);
|
|
14930
|
-
// } else if (e.planDuration === NsCardContent.ACBPConst.UPCOMING) {
|
|
14931
|
-
// upcoming.push(e);
|
|
14932
|
-
// }
|
|
14933
|
-
// });
|
|
14934
|
-
// const allCompleted = all.filter((allData: any) => allData.contentStatus === 2);
|
|
14935
|
-
// let allInCompleted = all.filter((allData: any) => allData.contentStatus < 2);
|
|
14936
|
-
// let allCompletedOverDue = allCompleted.filter((allData: any) => allData.planDuration === NsCardContent.ACBPConst.OVERDUE);
|
|
14937
|
-
// const allCompletedAll = allCompleted.filter((allData: any) => allData.planDuration !== NsCardContent.ACBPConst.OVERDUE);
|
|
14938
|
-
// allCompletedOverDue = allCompletedOverDue.sort((a: any, b: any): any => {
|
|
14939
|
-
// if (a.planDuration === NsCardContent.ACBPConst.OVERDUE && b.planDuration === NsCardContent.ACBPConst.OVERDUE) {
|
|
14940
|
-
// const firstDate: any = new Date(a.endDate);
|
|
14941
|
-
// const secondDate: any = new Date(b.endDate);
|
|
14942
|
-
// return firstDate > secondDate ? -1 : 1;
|
|
14943
|
-
// }
|
|
14944
|
-
// });
|
|
14945
|
-
// allInCompleted = allInCompleted.sort((a: any, b: any): any => {
|
|
14946
|
-
// if (a.planDuration === NsCardContent.ACBPConst.OVERDUE && b.planDuration === NsCardContent.ACBPConst.OVERDUE) {
|
|
14947
|
-
// const firstDate: any = new Date(a.endDate);
|
|
14948
|
-
// const secondDate: any = new Date(b.endDate);
|
|
14949
|
-
// return firstDate > secondDate ? -1 : 1;
|
|
14950
|
-
// }
|
|
14951
|
-
// });
|
|
14952
|
-
// all = [...allInCompleted, ...allCompletedAll, ...allCompletedOverDue];
|
|
14953
|
-
// overdue = overdue.filter((data: any): any => {
|
|
14954
|
-
// return data.contentStatus < 2;
|
|
14955
|
-
// });
|
|
14956
|
-
// overdue = overdue.sort((a: any, b: any): any => {
|
|
14957
|
-
// const firstDate: any = new Date(a.endDate);
|
|
14958
|
-
// const secondDate: any = new Date(b.endDate);
|
|
14959
|
-
// return firstDate > secondDate ? -1 : 1;
|
|
14960
|
-
// });
|
|
14961
|
-
// upcoming = upcoming.filter((data: any): any => {
|
|
14962
|
-
// return data.contentStatus < 2;
|
|
14963
|
-
// });
|
|
14964
|
-
// // this.getSelectedIndex(1)
|
|
14965
|
-
// return [
|
|
14966
|
-
// { value: 'all', widgets: this.transformContentsToWidgets(all, strip) },
|
|
14967
|
-
// { value: 'upcoming', widgets: this.transformContentsToWidgets(upcoming, strip) },
|
|
14968
|
-
// { value: 'overdue', widgets: this.transformContentsToWidgets(overdue, strip) }];
|
|
14969
|
-
// }
|
|
14970
13452
|
/**
|
|
14971
13453
|
* @param {?} stripsResultDataMap
|
|
14972
13454
|
* @param {?} key
|
|
14973
13455
|
* @return {?}
|
|
14974
13456
|
*/
|
|
14975
|
-
ContentStripWithTabsPillsComponent.prototype.getSelectedIndex =
|
|
14976
|
-
// async fetchAllCbpPlans(strip: any, calculateParentStatus = true) {
|
|
14977
|
-
// if (strip.request && strip.request.cbpList && Object.keys(strip.request.cbpList).length) {
|
|
14978
|
-
// let courses: NsContent.IContent[];
|
|
14979
|
-
// let tabResults: any[] = [];
|
|
14980
|
-
// const response = await this.userSvc.fetchCbpPlanList().toPromise();
|
|
14981
|
-
// if (response) {
|
|
14982
|
-
// courses = response;
|
|
14983
|
-
// if (strip.tabs && strip.tabs.length) {
|
|
14984
|
-
// tabResults = this.splitCbpTabsData(courses, strip);
|
|
14985
|
-
// await this.processStrip(
|
|
14986
|
-
// strip,
|
|
14987
|
-
// this.transformContentsToWidgets(courses, strip),
|
|
14988
|
-
// 'done',
|
|
14989
|
-
// calculateParentStatus,
|
|
14990
|
-
// '',
|
|
14991
|
-
// tabResults
|
|
14992
|
-
// );
|
|
14993
|
-
// } else {
|
|
14994
|
-
// this.processStrip(
|
|
14995
|
-
// strip,
|
|
14996
|
-
// this.transformContentsToWidgets(courses, strip),
|
|
14997
|
-
// 'done',
|
|
14998
|
-
// calculateParentStatus,
|
|
14999
|
-
// 'viewMoreUrl',
|
|
15000
|
-
// );
|
|
15001
|
-
// }
|
|
15002
|
-
// }
|
|
15003
|
-
// // this.userSvc.fetchCbpPlanList().subscribe( async (res: any) => {
|
|
15004
|
-
// // if (res) {
|
|
15005
|
-
// // console.log(res,'===============================>')
|
|
15006
|
-
// // courses = res
|
|
15007
|
-
// // if (strip.tabs && strip.tabs.length) {
|
|
15008
|
-
// // tabResults = this.splitCbpTabsData(courses, strip)
|
|
15009
|
-
// // await this.processStrip(
|
|
15010
|
-
// // strip,
|
|
15011
|
-
// // this.transformContentsToWidgets(courses, strip),
|
|
15012
|
-
// // 'done',
|
|
15013
|
-
// // calculateParentStatus,
|
|
15014
|
-
// // '',
|
|
15015
|
-
// // tabResults
|
|
15016
|
-
// // )
|
|
15017
|
-
// // } else {
|
|
15018
|
-
// // this.processStrip(
|
|
15019
|
-
// // strip,
|
|
15020
|
-
// // this.transformContentsToWidgets(courses, strip),
|
|
15021
|
-
// // 'done',
|
|
15022
|
-
// // calculateParentStatus,
|
|
15023
|
-
// // 'viewMoreUrl',
|
|
15024
|
-
// // )
|
|
15025
|
-
// // }
|
|
15026
|
-
// // }
|
|
15027
|
-
// // }, (_err: any) => {
|
|
15028
|
-
// // })
|
|
15029
|
-
// clearInterval(this.enrollInterval);
|
|
15030
|
-
// }
|
|
15031
|
-
// }
|
|
15032
|
-
// splitCbpTabsData(contentNew: NsContent.IContent[], strip: NsContentStripWithTabs.IContentStripUnit) {
|
|
15033
|
-
// const tabResults: any[] = [];
|
|
15034
|
-
// const splitData = this.getTabsList(
|
|
15035
|
-
// contentNew,
|
|
15036
|
-
// strip,
|
|
15037
|
-
// );
|
|
15038
|
-
// if (strip.tabs && strip.tabs.length) {
|
|
15039
|
-
// for (let i = 0; i < strip.tabs.length; i += 1) {
|
|
15040
|
-
// if (strip.tabs[i]) {
|
|
15041
|
-
// tabResults.push(
|
|
15042
|
-
// {
|
|
15043
|
-
// ...strip.tabs[i],
|
|
15044
|
-
// fetchTabStatus: 'done',
|
|
15045
|
-
// ...(splitData.find(itmInner => {
|
|
15046
|
-
// if (strip.tabs && strip.tabs[i] && itmInner.value === strip.tabs[i].value) {
|
|
15047
|
-
// return itmInner;
|
|
15048
|
-
// }
|
|
15049
|
-
// return undefined;
|
|
15050
|
-
// })),
|
|
15051
|
-
// }
|
|
15052
|
-
// );
|
|
15053
|
-
// }
|
|
15054
|
-
// }
|
|
15055
|
-
// }
|
|
15056
|
-
// return tabResults;
|
|
15057
|
-
// }
|
|
15058
|
-
// getTabsList(array: NsContent.IContent[],
|
|
15059
|
-
// strip: NsContentStripWithTabs.IContentStripUnit) {
|
|
15060
|
-
// let all: any[] = [];
|
|
15061
|
-
// let upcoming: any[] = [];
|
|
15062
|
-
// let overdue: any[] = [];
|
|
15063
|
-
// array.forEach((e: any) => {
|
|
15064
|
-
// all.push(e);
|
|
15065
|
-
// if (e.planDuration === NsCardContent.ACBPConst.OVERDUE) {
|
|
15066
|
-
// overdue.push(e);
|
|
15067
|
-
// } else if (e.planDuration === NsCardContent.ACBPConst.UPCOMING) {
|
|
15068
|
-
// upcoming.push(e);
|
|
15069
|
-
// }
|
|
15070
|
-
// });
|
|
15071
|
-
// const allCompleted = all.filter((allData: any) => allData.contentStatus === 2);
|
|
15072
|
-
// let allInCompleted = all.filter((allData: any) => allData.contentStatus < 2);
|
|
15073
|
-
// let allCompletedOverDue = allCompleted.filter((allData: any) => allData.planDuration === NsCardContent.ACBPConst.OVERDUE);
|
|
15074
|
-
// const allCompletedAll = allCompleted.filter((allData: any) => allData.planDuration !== NsCardContent.ACBPConst.OVERDUE);
|
|
15075
|
-
// allCompletedOverDue = allCompletedOverDue.sort((a: any, b: any): any => {
|
|
15076
|
-
// if (a.planDuration === NsCardContent.ACBPConst.OVERDUE && b.planDuration === NsCardContent.ACBPConst.OVERDUE) {
|
|
15077
|
-
// const firstDate: any = new Date(a.endDate);
|
|
15078
|
-
// const secondDate: any = new Date(b.endDate);
|
|
15079
|
-
// return firstDate > secondDate ? -1 : 1;
|
|
15080
|
-
// }
|
|
15081
|
-
// });
|
|
15082
|
-
// allInCompleted = allInCompleted.sort((a: any, b: any): any => {
|
|
15083
|
-
// if (a.planDuration === NsCardContent.ACBPConst.OVERDUE && b.planDuration === NsCardContent.ACBPConst.OVERDUE) {
|
|
15084
|
-
// const firstDate: any = new Date(a.endDate);
|
|
15085
|
-
// const secondDate: any = new Date(b.endDate);
|
|
15086
|
-
// return firstDate > secondDate ? -1 : 1;
|
|
15087
|
-
// }
|
|
15088
|
-
// });
|
|
15089
|
-
// all = [...allInCompleted, ...allCompletedAll, ...allCompletedOverDue];
|
|
15090
|
-
// overdue = overdue.filter((data: any): any => {
|
|
15091
|
-
// return data.contentStatus < 2;
|
|
15092
|
-
// });
|
|
15093
|
-
// overdue = overdue.sort((a: any, b: any): any => {
|
|
15094
|
-
// const firstDate: any = new Date(a.endDate);
|
|
15095
|
-
// const secondDate: any = new Date(b.endDate);
|
|
15096
|
-
// return firstDate > secondDate ? -1 : 1;
|
|
15097
|
-
// });
|
|
15098
|
-
// upcoming = upcoming.filter((data: any): any => {
|
|
15099
|
-
// return data.contentStatus < 2;
|
|
15100
|
-
// });
|
|
15101
|
-
// // this.getSelectedIndex(1)
|
|
15102
|
-
// return [
|
|
15103
|
-
// { value: 'all', widgets: this.transformContentsToWidgets(all, strip) },
|
|
15104
|
-
// { value: 'upcoming', widgets: this.transformContentsToWidgets(upcoming, strip) },
|
|
15105
|
-
// { value: 'overdue', widgets: this.transformContentsToWidgets(overdue, strip) }];
|
|
15106
|
-
// }
|
|
15107
|
-
/**
|
|
13457
|
+
ContentStripWithTabsPillsComponent.prototype.getSelectedIndex = /**
|
|
15108
13458
|
* @param {?} stripsResultDataMap
|
|
15109
13459
|
* @param {?} key
|
|
15110
13460
|
* @return {?}
|
|
@@ -15112,12 +13462,6 @@
|
|
|
15112
13462
|
function (stripsResultDataMap, key) {
|
|
15113
13463
|
/** @type {?} */
|
|
15114
13464
|
var returnValue = 0;
|
|
15115
|
-
// if (key === 'cbpPlan') {
|
|
15116
|
-
// if (stripsResultDataMap.tabs.length) {
|
|
15117
|
-
// const data = stripsResultDataMap.tabs.filter((ele: any) => ele.value === 'upcoming');
|
|
15118
|
-
// returnValue = data[0].widgets && data[0].widgets.length > 0 ? 1 : 0;
|
|
15119
|
-
// }
|
|
15120
|
-
// }
|
|
15121
13465
|
return returnValue;
|
|
15122
13466
|
};
|
|
15123
13467
|
/**
|
|
@@ -15149,602 +13493,48 @@
|
|
|
15149
13493
|
};
|
|
15150
13494
|
/**
|
|
15151
13495
|
* @param {?} index
|
|
15152
|
-
* @param {?} item
|
|
15153
|
-
* @return {?}
|
|
15154
|
-
*/
|
|
15155
|
-
ContentStripWithTabsPillsComponent.prototype.tracker = /**
|
|
15156
|
-
* @param {?} index
|
|
15157
|
-
* @param {?} item
|
|
15158
|
-
* @return {?}
|
|
15159
|
-
*/
|
|
15160
|
-
function (index, item) {
|
|
15161
|
-
if (index >= 0) { }
|
|
15162
|
-
return lodash.get(item, 'widgetData.content.identifier');
|
|
15163
|
-
};
|
|
15164
|
-
/**
|
|
15165
|
-
* @param {?} strip
|
|
15166
|
-
* @param {?=} calculateParentStatus
|
|
15167
|
-
* @return {?}
|
|
15168
|
-
*/
|
|
15169
|
-
ContentStripWithTabsPillsComponent.prototype.fetchAllTopContent = /**
|
|
15170
|
-
* @param {?} strip
|
|
15171
|
-
* @param {?=} calculateParentStatus
|
|
15172
|
-
* @return {?}
|
|
15173
|
-
*/
|
|
15174
|
-
function (strip, calculateParentStatus) {
|
|
15175
|
-
if (calculateParentStatus === void 0) { calculateParentStatus = true; }
|
|
15176
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
15177
|
-
var originalFilters, response, error_2;
|
|
15178
|
-
return __generator(this, function (_a) {
|
|
15179
|
-
switch (_a.label) {
|
|
15180
|
-
case 0:
|
|
15181
|
-
if (!(strip.request && strip.request.topContent && Object.keys(strip.request.topContent).length)) return [3 /*break*/, 4];
|
|
15182
|
-
originalFilters = [];
|
|
15183
|
-
if (strip.request &&
|
|
15184
|
-
strip.request.topContent &&
|
|
15185
|
-
strip.request.topContent.request &&
|
|
15186
|
-
strip.request.topContent.request.filters) {
|
|
15187
|
-
originalFilters = strip.request.topContent.request.filters;
|
|
15188
|
-
strip.request.topContent.request.filters = this.postMethodFilters(strip.request.topContent.request.filters);
|
|
15189
|
-
}
|
|
15190
|
-
_a.label = 1;
|
|
15191
|
-
case 1:
|
|
15192
|
-
_a.trys.push([1, 3, , 4]);
|
|
15193
|
-
return [4 /*yield*/, this.postRequestMethod(strip, strip.request.topContent, strip.request.apiUrl, calculateParentStatus)];
|
|
15194
|
-
case 2:
|
|
15195
|
-
response = _a.sent();
|
|
15196
|
-
// console.log('calling after - response, ', response)
|
|
15197
|
-
if (response && response.results) {
|
|
15198
|
-
// console.log('calling after-- ')
|
|
15199
|
-
if (response.results.result.content && response.results.result.content.length) {
|
|
15200
|
-
this.processStrip(strip, this.transformContentsToWidgets(response.results.result.content, strip), 'done', calculateParentStatus, response.viewMoreUrl);
|
|
15201
|
-
}
|
|
15202
|
-
else {
|
|
15203
|
-
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
15204
|
-
this.emptyResponse.emit(true);
|
|
15205
|
-
}
|
|
15206
|
-
}
|
|
15207
|
-
else {
|
|
15208
|
-
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
15209
|
-
this.emptyResponse.emit(true);
|
|
15210
|
-
}
|
|
15211
|
-
return [3 /*break*/, 4];
|
|
15212
|
-
case 3:
|
|
15213
|
-
error_2 = _a.sent();
|
|
15214
|
-
return [3 /*break*/, 4];
|
|
15215
|
-
case 4: return [2 /*return*/];
|
|
15216
|
-
}
|
|
15217
|
-
});
|
|
15218
|
-
});
|
|
15219
|
-
};
|
|
15220
|
-
/**
|
|
15221
|
-
* @param {?} strip
|
|
15222
|
-
* @param {?=} calculateParentStatus
|
|
15223
|
-
* @return {?}
|
|
15224
|
-
*/
|
|
15225
|
-
ContentStripWithTabsPillsComponent.prototype.fetchAllFeaturedContent = /**
|
|
15226
|
-
* @param {?} strip
|
|
15227
|
-
* @param {?=} calculateParentStatus
|
|
15228
|
-
* @return {?}
|
|
15229
|
-
*/
|
|
15230
|
-
function (strip, calculateParentStatus) {
|
|
15231
|
-
if (calculateParentStatus === void 0) { calculateParentStatus = true; }
|
|
15232
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
15233
|
-
var originalFilters, response, error_3;
|
|
15234
|
-
return __generator(this, function (_a) {
|
|
15235
|
-
switch (_a.label) {
|
|
15236
|
-
case 0:
|
|
15237
|
-
if (!(strip.request && strip.request.featureContent && Object.keys(strip.request.featureContent).length)) return [3 /*break*/, 4];
|
|
15238
|
-
originalFilters = [];
|
|
15239
|
-
if (strip.request &&
|
|
15240
|
-
strip.request.featureContent &&
|
|
15241
|
-
strip.request.featureContent.request &&
|
|
15242
|
-
strip.request.featureContent.request.filters) {
|
|
15243
|
-
originalFilters = strip.request.featureContent.request.filters;
|
|
15244
|
-
strip.request.featureContent.request.filters = this.postMethodFilters(strip.request.featureContent.request.filters);
|
|
15245
|
-
}
|
|
15246
|
-
_a.label = 1;
|
|
15247
|
-
case 1:
|
|
15248
|
-
_a.trys.push([1, 3, , 4]);
|
|
15249
|
-
return [4 /*yield*/, this.postRequestMethod(strip, strip.request.featureContent, strip.request.apiUrl, calculateParentStatus)];
|
|
15250
|
-
case 2:
|
|
15251
|
-
response = _a.sent();
|
|
15252
|
-
// console.log('calling after - response, ', response)
|
|
15253
|
-
if (response && response.results) {
|
|
15254
|
-
// console.log('calling after-- ')
|
|
15255
|
-
if (response.results.result.content && response.results.result.content.length) {
|
|
15256
|
-
this.processStrip(strip, this.transformContentsToWidgets(response.results.result.content, strip), 'done', calculateParentStatus, response.viewMoreUrl);
|
|
15257
|
-
}
|
|
15258
|
-
else {
|
|
15259
|
-
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
15260
|
-
this.emptyResponse.emit(true);
|
|
15261
|
-
}
|
|
15262
|
-
}
|
|
15263
|
-
else {
|
|
15264
|
-
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
15265
|
-
this.emptyResponse.emit(true);
|
|
15266
|
-
}
|
|
15267
|
-
return [3 /*break*/, 4];
|
|
15268
|
-
case 3:
|
|
15269
|
-
error_3 = _a.sent();
|
|
15270
|
-
this.emptyResponse.emit(true);
|
|
15271
|
-
return [3 /*break*/, 4];
|
|
15272
|
-
case 4: return [2 /*return*/];
|
|
15273
|
-
}
|
|
15274
|
-
});
|
|
15275
|
-
});
|
|
15276
|
-
};
|
|
15277
|
-
/**
|
|
15278
|
-
* @param {?} stripData
|
|
15279
|
-
* @return {?}
|
|
15280
|
-
*/
|
|
15281
|
-
ContentStripWithTabsPillsComponent.prototype.raiseTelemetry = /**
|
|
15282
|
-
* @param {?} stripData
|
|
15283
|
-
* @return {?}
|
|
15284
|
-
*/
|
|
15285
|
-
function (stripData) {
|
|
15286
|
-
this.telemtryResponse.emit(stripData);
|
|
15287
|
-
};
|
|
15288
|
-
/**
|
|
15289
|
-
* @param {?} strip
|
|
15290
|
-
* @param {?} request
|
|
15291
|
-
* @param {?} apiUrl
|
|
15292
|
-
* @param {?} calculateParentStatus
|
|
15293
|
-
* @return {?}
|
|
15294
|
-
*/
|
|
15295
|
-
ContentStripWithTabsPillsComponent.prototype.postRequestMethod = /**
|
|
15296
|
-
* @param {?} strip
|
|
15297
|
-
* @param {?} request
|
|
15298
|
-
* @param {?} apiUrl
|
|
15299
|
-
* @param {?} calculateParentStatus
|
|
15300
|
-
* @return {?}
|
|
15301
|
-
*/
|
|
15302
|
-
function (strip, request, apiUrl, calculateParentStatus) {
|
|
15303
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
15304
|
-
var _this = this;
|
|
15305
|
-
return __generator(this, function (_a) {
|
|
15306
|
-
return [2 /*return*/, new Promise((/**
|
|
15307
|
-
* @param {?} resolve
|
|
15308
|
-
* @param {?} reject
|
|
15309
|
-
* @return {?}
|
|
15310
|
-
*/
|
|
15311
|
-
function (resolve, reject) {
|
|
15312
|
-
if (request && request) {
|
|
15313
|
-
_this.contentSvc.postApiMethod(apiUrl, request).subscribe((/**
|
|
15314
|
-
* @param {?} results
|
|
15315
|
-
* @return {?}
|
|
15316
|
-
*/
|
|
15317
|
-
function (results) {
|
|
15318
|
-
if (results.result && results.result.content) {
|
|
15319
|
-
/** @type {?} */
|
|
15320
|
-
var showViewMore = Boolean(results.result.content && results.result.content.length > 5 && strip.stripConfig && strip.stripConfig.postCardForSearch);
|
|
15321
|
-
/** @type {?} */
|
|
15322
|
-
var viewMoreUrl = showViewMore
|
|
15323
|
-
? {
|
|
15324
|
-
path: strip.viewMoreUrl && strip.viewMoreUrl.path || '',
|
|
15325
|
-
queryParams: {
|
|
15326
|
-
tab: 'Learn',
|
|
15327
|
-
q: strip.viewMoreUrl && strip.viewMoreUrl.queryParams,
|
|
15328
|
-
f: {},
|
|
15329
|
-
},
|
|
15330
|
-
}
|
|
15331
|
-
: null;
|
|
15332
|
-
resolve({ results: results, viewMoreUrl: viewMoreUrl });
|
|
15333
|
-
}
|
|
15334
|
-
else if (results && results.data) {
|
|
15335
|
-
/** @type {?} */
|
|
15336
|
-
var showViewMore = Boolean(results.data && results.data.length > 5 && strip.stripConfig && strip.stripConfig.postCardForSearch);
|
|
15337
|
-
/** @type {?} */
|
|
15338
|
-
var viewMoreUrl = showViewMore ? {
|
|
15339
|
-
path: strip.viewMoreUrl && strip.viewMoreUrl.path || '',
|
|
15340
|
-
queryParams: {
|
|
15341
|
-
tab: 'Learn',
|
|
15342
|
-
q: strip.viewMoreUrl && strip.viewMoreUrl.queryParams,
|
|
15343
|
-
f: {},
|
|
15344
|
-
},
|
|
15345
|
-
}
|
|
15346
|
-
: null;
|
|
15347
|
-
resolve({ results: results, viewMoreUrl: viewMoreUrl });
|
|
15348
|
-
}
|
|
15349
|
-
else if (results.result && results.result.data) {
|
|
15350
|
-
/** @type {?} */
|
|
15351
|
-
var showViewMore = Boolean(results.data && results.result.data && results.result.data.length > 5 && strip.stripConfig && strip.stripConfig.postCardForSearch);
|
|
15352
|
-
/** @type {?} */
|
|
15353
|
-
var viewMoreUrl = showViewMore ? {
|
|
15354
|
-
path: strip.viewMoreUrl && strip.viewMoreUrl.path || '',
|
|
15355
|
-
queryParams: {
|
|
15356
|
-
tab: 'Learn',
|
|
15357
|
-
q: strip.viewMoreUrl && strip.viewMoreUrl.queryParams,
|
|
15358
|
-
f: {},
|
|
15359
|
-
},
|
|
15360
|
-
}
|
|
15361
|
-
: null;
|
|
15362
|
-
resolve({ results: results, viewMoreUrl: viewMoreUrl });
|
|
15363
|
-
}
|
|
15364
|
-
}), (/**
|
|
15365
|
-
* @param {?} error
|
|
15366
|
-
* @return {?}
|
|
15367
|
-
*/
|
|
15368
|
-
function (error) {
|
|
15369
|
-
_this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
15370
|
-
reject(error);
|
|
15371
|
-
}));
|
|
15372
|
-
}
|
|
15373
|
-
}))];
|
|
15374
|
-
});
|
|
15375
|
-
});
|
|
15376
|
-
};
|
|
15377
|
-
/**
|
|
15378
|
-
* @param {?} strip
|
|
15379
|
-
* @param {?} request
|
|
15380
|
-
* @param {?} apiUrl
|
|
15381
|
-
* @param {?} calculateParentStatus
|
|
15382
|
-
* @return {?}
|
|
15383
|
-
*/
|
|
15384
|
-
ContentStripWithTabsPillsComponent.prototype.getRequestMethod = /**
|
|
15385
|
-
* @param {?} strip
|
|
15386
|
-
* @param {?} request
|
|
15387
|
-
* @param {?} apiUrl
|
|
15388
|
-
* @param {?} calculateParentStatus
|
|
15389
|
-
* @return {?}
|
|
15390
|
-
*/
|
|
15391
|
-
function (strip, request, apiUrl, calculateParentStatus) {
|
|
15392
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
15393
|
-
var originalFilters;
|
|
15394
|
-
var _this = this;
|
|
15395
|
-
return __generator(this, function (_a) {
|
|
15396
|
-
originalFilters = [];
|
|
15397
|
-
return [2 /*return*/, new Promise((/**
|
|
15398
|
-
* @param {?} resolve
|
|
15399
|
-
* @param {?} reject
|
|
15400
|
-
* @return {?}
|
|
15401
|
-
*/
|
|
15402
|
-
function (resolve, reject) {
|
|
15403
|
-
if (request && request) {
|
|
15404
|
-
_this.contentSvc.getApiMethod(apiUrl).subscribe((/**
|
|
15405
|
-
* @param {?} results
|
|
15406
|
-
* @return {?}
|
|
15407
|
-
*/
|
|
15408
|
-
function (results) {
|
|
15409
|
-
/** @type {?} */
|
|
15410
|
-
var showViewMore = Boolean(results.result.data && results.result.data.orgList.length > 5 && strip.stripConfig && strip.stripConfig.postCardForSearch);
|
|
15411
|
-
/** @type {?} */
|
|
15412
|
-
var viewMoreUrl = showViewMore
|
|
15413
|
-
? {
|
|
15414
|
-
path: strip.viewMoreUrl && strip.viewMoreUrl.path || '',
|
|
15415
|
-
}
|
|
15416
|
-
: null;
|
|
15417
|
-
resolve({ results: results, viewMoreUrl: viewMoreUrl });
|
|
15418
|
-
}), (/**
|
|
15419
|
-
* @param {?} error
|
|
15420
|
-
* @return {?}
|
|
15421
|
-
*/
|
|
15422
|
-
function (error) {
|
|
15423
|
-
_this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
15424
|
-
reject(error);
|
|
15425
|
-
}));
|
|
15426
|
-
}
|
|
15427
|
-
}))];
|
|
15428
|
-
});
|
|
15429
|
-
});
|
|
15430
|
-
};
|
|
15431
|
-
/**
|
|
15432
|
-
* @param {?} filters
|
|
15433
|
-
* @return {?}
|
|
15434
|
-
*/
|
|
15435
|
-
ContentStripWithTabsPillsComponent.prototype.postMethodFilters = /**
|
|
15436
|
-
* @param {?} filters
|
|
15437
|
-
* @return {?}
|
|
15438
|
-
*/
|
|
15439
|
-
function (filters) {
|
|
15440
|
-
if (filters.organisation &&
|
|
15441
|
-
filters.organisation.indexOf('<orgID>') >= 0) {
|
|
15442
|
-
filters.organisation = this.providerId;
|
|
15443
|
-
}
|
|
15444
|
-
return filters;
|
|
15445
|
-
};
|
|
15446
|
-
/**
|
|
15447
|
-
* @param {?} apiUrl
|
|
15448
|
-
* @param {?} id
|
|
15449
|
-
* @return {?}
|
|
15450
|
-
*/
|
|
15451
|
-
ContentStripWithTabsPillsComponent.prototype.getFullUrl = /**
|
|
15452
|
-
* @param {?} apiUrl
|
|
15453
|
-
* @param {?} id
|
|
15454
|
-
* @return {?}
|
|
15455
|
-
*/
|
|
15456
|
-
function (apiUrl, id) {
|
|
15457
|
-
/** @type {?} */
|
|
15458
|
-
var formedUrl = '';
|
|
15459
|
-
if (apiUrl.indexOf('<bookmarkId>') >= 0) {
|
|
15460
|
-
formedUrl = apiUrl.replace('<bookmarkId>', this.environment.mdoChannelsBookmarkId);
|
|
15461
|
-
}
|
|
15462
|
-
else if (apiUrl.indexOf('<playlistKey>') >= 0 && apiUrl.indexOf('<orgID>') >= 0) {
|
|
15463
|
-
formedUrl = apiUrl.replace('<playlistKey>', this.providerId + id);
|
|
15464
|
-
formedUrl = formedUrl.replace('<orgID>', this.providerId);
|
|
15465
|
-
}
|
|
15466
|
-
return formedUrl;
|
|
15467
|
-
};
|
|
15468
|
-
/**
|
|
15469
|
-
* @param {?} stripData
|
|
15470
|
-
* @param {?} path
|
|
15471
|
-
* @param {?} queryParamsData
|
|
15472
|
-
* @return {?}
|
|
15473
|
-
*/
|
|
15474
|
-
ContentStripWithTabsPillsComponent.prototype.redirectViewAll = /**
|
|
15475
|
-
* @param {?} stripData
|
|
15476
|
-
* @param {?} path
|
|
15477
|
-
* @param {?} queryParamsData
|
|
15478
|
-
* @return {?}
|
|
15479
|
-
*/
|
|
15480
|
-
function (stripData, path, queryParamsData) {
|
|
15481
|
-
if (this.emitViewAll) {
|
|
15482
|
-
this.viewAllResponse.emit(stripData);
|
|
15483
|
-
}
|
|
15484
|
-
else {
|
|
15485
|
-
this.router.navigate([path], { queryParams: queryParamsData });
|
|
15486
|
-
}
|
|
15487
|
-
};
|
|
15488
|
-
/**
|
|
15489
|
-
* @param {?} strip
|
|
15490
|
-
* @param {?=} calculateParentStatus
|
|
15491
|
-
* @return {?}
|
|
15492
|
-
*/
|
|
15493
|
-
ContentStripWithTabsPillsComponent.prototype.fetchAllBookMarkData = /**
|
|
15494
|
-
* @param {?} strip
|
|
15495
|
-
* @param {?=} calculateParentStatus
|
|
15496
|
-
* @return {?}
|
|
15497
|
-
*/
|
|
15498
|
-
function (strip, calculateParentStatus) {
|
|
15499
|
-
if (calculateParentStatus === void 0) { calculateParentStatus = true; }
|
|
15500
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
15501
|
-
var originalFilters, response, content, error_4;
|
|
15502
|
-
return __generator(this, function (_a) {
|
|
15503
|
-
switch (_a.label) {
|
|
15504
|
-
case 0:
|
|
15505
|
-
if (!(strip.request && strip.request.bookmarkRead && Object.keys(strip.request.bookmarkRead).length)) return [3 /*break*/, 4];
|
|
15506
|
-
originalFilters = [];
|
|
15507
|
-
if (strip.request &&
|
|
15508
|
-
strip.request.bookmarkRead &&
|
|
15509
|
-
strip.request.bookmarkRead.bookmarkId) {
|
|
15510
|
-
strip.request.apiUrl = this.getFullUrl(strip.request.apiUrl, strip.request.bookmarkRead.bookmarkId);
|
|
15511
|
-
}
|
|
15512
|
-
_a.label = 1;
|
|
15513
|
-
case 1:
|
|
15514
|
-
_a.trys.push([1, 3, , 4]);
|
|
15515
|
-
return [4 /*yield*/, this.getRequestMethod(strip, strip.request.bookmarkRead, strip.request.apiUrl, calculateParentStatus)];
|
|
15516
|
-
case 2:
|
|
15517
|
-
response = _a.sent();
|
|
15518
|
-
content = response.results.result.data.orgList;
|
|
15519
|
-
if (response) {
|
|
15520
|
-
this.processStrip(strip, this.transformAllContentsToWidgets(content, strip), 'done', calculateParentStatus, response);
|
|
15521
|
-
}
|
|
15522
|
-
else {
|
|
15523
|
-
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
15524
|
-
this.emptyResponse.emit(true);
|
|
15525
|
-
}
|
|
15526
|
-
return [3 /*break*/, 4];
|
|
15527
|
-
case 3:
|
|
15528
|
-
error_4 = _a.sent();
|
|
15529
|
-
this.emptyResponse.emit(true);
|
|
15530
|
-
return [3 /*break*/, 4];
|
|
15531
|
-
case 4: return [2 /*return*/];
|
|
15532
|
-
}
|
|
15533
|
-
});
|
|
15534
|
-
});
|
|
15535
|
-
};
|
|
15536
|
-
/**
|
|
15537
|
-
* @private
|
|
15538
|
-
* @param {?} contents
|
|
15539
|
-
* @param {?} strip
|
|
15540
|
-
* @return {?}
|
|
15541
|
-
*/
|
|
15542
|
-
ContentStripWithTabsPillsComponent.prototype.transformAllContentsToWidgets = /**
|
|
15543
|
-
* @private
|
|
15544
|
-
* @param {?} contents
|
|
15545
|
-
* @param {?} strip
|
|
15546
|
-
* @return {?}
|
|
15547
|
-
*/
|
|
15548
|
-
function (contents, strip) {
|
|
15549
|
-
return (contents || []).map((/**
|
|
15550
|
-
* @param {?} content
|
|
15551
|
-
* @param {?} idx
|
|
15552
|
-
* @return {?}
|
|
15553
|
-
*/
|
|
15554
|
-
function (content, idx) { return (content ? {
|
|
15555
|
-
widgetType: 'cardLib',
|
|
15556
|
-
widgetSubType: 'cardContentLib',
|
|
15557
|
-
widgetHostClass: 'mb-2',
|
|
15558
|
-
widgetData: __assign({ content: 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 }),
|
|
15559
|
-
} : {
|
|
15560
|
-
widgetType: 'card',
|
|
15561
|
-
widgetSubType: 'cardContent',
|
|
15562
|
-
widgetHostClass: 'mb-2',
|
|
15563
|
-
widgetData: {},
|
|
15564
|
-
}); }));
|
|
15565
|
-
};
|
|
15566
|
-
/**
|
|
15567
|
-
* @param {?} strip
|
|
15568
|
-
* @param {?=} calculateParentStatus
|
|
13496
|
+
* @param {?} item
|
|
15569
13497
|
* @return {?}
|
|
15570
13498
|
*/
|
|
15571
|
-
ContentStripWithTabsPillsComponent.prototype.
|
|
15572
|
-
* @param {?}
|
|
15573
|
-
* @param {
|
|
13499
|
+
ContentStripWithTabsPillsComponent.prototype.tracker = /**
|
|
13500
|
+
* @param {?} index
|
|
13501
|
+
* @param {?} item
|
|
15574
13502
|
* @return {?}
|
|
15575
13503
|
*/
|
|
15576
|
-
function (
|
|
15577
|
-
if (
|
|
15578
|
-
return
|
|
15579
|
-
var originalFilters, response, finalPlaylistData_1, programData, error_5;
|
|
15580
|
-
return __generator(this, function (_a) {
|
|
15581
|
-
switch (_a.label) {
|
|
15582
|
-
case 0:
|
|
15583
|
-
if (!(strip.request && strip.request.playlistSearch && Object.keys(strip.request.playlistSearch).length)) return [3 /*break*/, 4];
|
|
15584
|
-
originalFilters = [];
|
|
15585
|
-
if (strip.request &&
|
|
15586
|
-
strip.request.playlistSearch &&
|
|
15587
|
-
strip.request.playlistSearch.request &&
|
|
15588
|
-
strip.request.playlistSearch.request.filters) {
|
|
15589
|
-
originalFilters = strip.request.playlistSearch.request.filters;
|
|
15590
|
-
strip.request.playlistSearch.request.filters = this.postMethodFilters(strip.request.playlistSearch.request.filters);
|
|
15591
|
-
}
|
|
15592
|
-
_a.label = 1;
|
|
15593
|
-
case 1:
|
|
15594
|
-
_a.trys.push([1, 3, , 4]);
|
|
15595
|
-
return [4 /*yield*/, this.postRequestMethod(strip, strip.request.playlistSearch.request, strip.request.apiUrl, calculateParentStatus)];
|
|
15596
|
-
case 2:
|
|
15597
|
-
response = _a.sent();
|
|
15598
|
-
// console.log('calling after - response, ', response)
|
|
15599
|
-
if (response && response.results) {
|
|
15600
|
-
// console.log('calling after-- ')
|
|
15601
|
-
if (response.results.result.data && response.results.result.data.length) {
|
|
15602
|
-
finalPlaylistData_1 = [];
|
|
15603
|
-
programData = response.results.result.data;
|
|
15604
|
-
programData.forEach((/**
|
|
15605
|
-
* @param {?} prgData
|
|
15606
|
-
* @return {?}
|
|
15607
|
-
*/
|
|
15608
|
-
function (prgData) {
|
|
15609
|
-
if (prgData.children && prgData.children.length) {
|
|
15610
|
-
finalPlaylistData_1.push(prgData);
|
|
15611
|
-
}
|
|
15612
|
-
}));
|
|
15613
|
-
if (finalPlaylistData_1.length) {
|
|
15614
|
-
this.processStrip(strip, this.transformContentsToWidgets(finalPlaylistData_1, strip), 'done', calculateParentStatus, response.viewMoreUrl);
|
|
15615
|
-
}
|
|
15616
|
-
else {
|
|
15617
|
-
this.emptyResponse.emit(true);
|
|
15618
|
-
}
|
|
15619
|
-
}
|
|
15620
|
-
else {
|
|
15621
|
-
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
15622
|
-
this.emptyResponse.emit(true);
|
|
15623
|
-
}
|
|
15624
|
-
}
|
|
15625
|
-
else {
|
|
15626
|
-
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
15627
|
-
this.emptyResponse.emit(true);
|
|
15628
|
-
}
|
|
15629
|
-
return [3 /*break*/, 4];
|
|
15630
|
-
case 3:
|
|
15631
|
-
error_5 = _a.sent();
|
|
15632
|
-
this.emptyResponse.emit(true);
|
|
15633
|
-
return [3 /*break*/, 4];
|
|
15634
|
-
case 4: return [2 /*return*/];
|
|
15635
|
-
}
|
|
15636
|
-
});
|
|
15637
|
-
});
|
|
13504
|
+
function (index, item) {
|
|
13505
|
+
if (index >= 0) { }
|
|
13506
|
+
return lodash.get(item, 'widgetData.content.identifier');
|
|
15638
13507
|
};
|
|
15639
13508
|
/**
|
|
15640
|
-
* @param {?}
|
|
15641
|
-
* @param {?=} calculateParentStatus
|
|
13509
|
+
* @param {?} stripData
|
|
15642
13510
|
* @return {?}
|
|
15643
13511
|
*/
|
|
15644
|
-
ContentStripWithTabsPillsComponent.prototype.
|
|
15645
|
-
* @param {?}
|
|
15646
|
-
* @param {?=} calculateParentStatus
|
|
13512
|
+
ContentStripWithTabsPillsComponent.prototype.raiseTelemetry = /**
|
|
13513
|
+
* @param {?} stripData
|
|
15647
13514
|
* @return {?}
|
|
15648
13515
|
*/
|
|
15649
|
-
function (
|
|
15650
|
-
|
|
15651
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
15652
|
-
var originalFilters, response, content, error_6;
|
|
15653
|
-
return __generator(this, function (_a) {
|
|
15654
|
-
switch (_a.label) {
|
|
15655
|
-
case 0:
|
|
15656
|
-
if (!(strip.request && strip.request.playlistRead && Object.keys(strip.request.playlistRead).length)) return [3 /*break*/, 4];
|
|
15657
|
-
originalFilters = [];
|
|
15658
|
-
if (strip.request &&
|
|
15659
|
-
strip.request.playlistRead &&
|
|
15660
|
-
strip.request.playlistRead.type) {
|
|
15661
|
-
strip.request.apiUrl = this.getFullUrl(strip.request.apiUrl, strip.request.playlistRead.type);
|
|
15662
|
-
}
|
|
15663
|
-
_a.label = 1;
|
|
15664
|
-
case 1:
|
|
15665
|
-
_a.trys.push([1, 3, , 4]);
|
|
15666
|
-
return [4 /*yield*/, this.getRequestMethod(strip, strip.request.playlistRead, strip.request.apiUrl, calculateParentStatus)];
|
|
15667
|
-
case 2:
|
|
15668
|
-
response = _a.sent();
|
|
15669
|
-
if (response && response.results.result.content) {
|
|
15670
|
-
content = response.results.result.content;
|
|
15671
|
-
this.processStrip(strip, this.transformAllContentsToWidgets(content, strip), 'done', calculateParentStatus, response);
|
|
15672
|
-
}
|
|
15673
|
-
else {
|
|
15674
|
-
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
15675
|
-
this.emptyResponse.emit(true);
|
|
15676
|
-
}
|
|
15677
|
-
return [3 /*break*/, 4];
|
|
15678
|
-
case 3:
|
|
15679
|
-
error_6 = _a.sent();
|
|
15680
|
-
this.emptyResponse.emit(true);
|
|
15681
|
-
return [3 /*break*/, 4];
|
|
15682
|
-
case 4: return [2 /*return*/];
|
|
15683
|
-
}
|
|
15684
|
-
});
|
|
15685
|
-
});
|
|
13516
|
+
function (stripData) {
|
|
13517
|
+
this.telemtryResponse.emit(stripData);
|
|
15686
13518
|
};
|
|
15687
13519
|
/**
|
|
15688
|
-
* @param {?}
|
|
15689
|
-
* @param {
|
|
13520
|
+
* @param {?} stripData
|
|
13521
|
+
* @param {?} path
|
|
13522
|
+
* @param {?} queryParamsData
|
|
15690
13523
|
* @return {?}
|
|
15691
13524
|
*/
|
|
15692
|
-
ContentStripWithTabsPillsComponent.prototype.
|
|
15693
|
-
* @param {?}
|
|
15694
|
-
* @param {
|
|
13525
|
+
ContentStripWithTabsPillsComponent.prototype.redirectViewAll = /**
|
|
13526
|
+
* @param {?} stripData
|
|
13527
|
+
* @param {?} path
|
|
13528
|
+
* @param {?} queryParamsData
|
|
15695
13529
|
* @return {?}
|
|
15696
13530
|
*/
|
|
15697
|
-
function (
|
|
15698
|
-
if (
|
|
15699
|
-
|
|
15700
|
-
|
|
15701
|
-
|
|
15702
|
-
|
|
15703
|
-
|
|
15704
|
-
if (!(strip.request && strip.request.ciosContent && Object.keys(strip.request.ciosContent).length)) return [3 /*break*/, 4];
|
|
15705
|
-
originalFilters = [];
|
|
15706
|
-
if (strip.request &&
|
|
15707
|
-
strip.request.ciosContent &&
|
|
15708
|
-
strip.request.ciosContent.filterCriteriaMap) {
|
|
15709
|
-
originalFilters = strip.request.ciosContent.filterCriteriaMap;
|
|
15710
|
-
strip.request.ciosContent.filterCriteriaMap = this.postMethodFilters(strip.request.ciosContent.filterCriteriaMap);
|
|
15711
|
-
}
|
|
15712
|
-
_a.label = 1;
|
|
15713
|
-
case 1:
|
|
15714
|
-
_a.trys.push([1, 3, , 4]);
|
|
15715
|
-
return [4 /*yield*/, this.postRequestMethod(strip, strip.request.ciosContent, strip.request.apiUrl, calculateParentStatus)];
|
|
15716
|
-
case 2:
|
|
15717
|
-
response = _a.sent();
|
|
15718
|
-
// console.log('calling after - response, ', response)
|
|
15719
|
-
if (response && response.results) {
|
|
15720
|
-
// console.log('calling after-- ')
|
|
15721
|
-
if (response.results.data && response.results.data.length) {
|
|
15722
|
-
extContentData = response.results.data;
|
|
15723
|
-
if (extContentData.length) {
|
|
15724
|
-
this.processStrip(strip, this.transformContentsToWidgets(extContentData, strip), 'done', calculateParentStatus, response.viewMoreUrl);
|
|
15725
|
-
}
|
|
15726
|
-
else {
|
|
15727
|
-
this.emptyResponse.emit(true);
|
|
15728
|
-
}
|
|
15729
|
-
}
|
|
15730
|
-
else {
|
|
15731
|
-
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
15732
|
-
this.emptyResponse.emit(true);
|
|
15733
|
-
}
|
|
15734
|
-
}
|
|
15735
|
-
else {
|
|
15736
|
-
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
15737
|
-
this.emptyResponse.emit(true);
|
|
15738
|
-
}
|
|
15739
|
-
return [3 /*break*/, 4];
|
|
15740
|
-
case 3:
|
|
15741
|
-
error_7 = _a.sent();
|
|
15742
|
-
this.emptyResponse.emit(true);
|
|
15743
|
-
return [3 /*break*/, 4];
|
|
15744
|
-
case 4: return [2 /*return*/];
|
|
15745
|
-
}
|
|
15746
|
-
});
|
|
15747
|
-
});
|
|
13531
|
+
function (stripData, path, queryParamsData) {
|
|
13532
|
+
if (this.emitViewAll) {
|
|
13533
|
+
this.viewAllResponse.emit(stripData);
|
|
13534
|
+
}
|
|
13535
|
+
else {
|
|
13536
|
+
this.router.navigate([path], { queryParams: queryParamsData });
|
|
13537
|
+
}
|
|
15748
13538
|
};
|
|
15749
13539
|
// new code writting from here====new====
|
|
15750
13540
|
// new code writting from here====new====
|
|
@@ -15796,8 +13586,7 @@
|
|
|
15796
13586
|
function (strip, calculateParentStatus) {
|
|
15797
13587
|
if (calculateParentStatus === void 0) { calculateParentStatus = true; }
|
|
15798
13588
|
return __awaiter(this, void 0, void 0, function () {
|
|
15799
|
-
var originalFilters, firstTab, allTabs, currentTabFromMap,
|
|
15800
|
-
var _this = this;
|
|
13589
|
+
var originalFilters, firstTab, allTabs, currentTabFromMap, response, error_1;
|
|
15801
13590
|
return __generator(this, function (_a) {
|
|
15802
13591
|
switch (_a.label) {
|
|
15803
13592
|
case 0:
|
|
@@ -15834,26 +13623,15 @@
|
|
|
15834
13623
|
_a.trys.push([1, 3, , 4]);
|
|
15835
13624
|
return [4 /*yield*/, this.searchV6Request(strip, strip.request, calculateParentStatus)];
|
|
15836
13625
|
case 2:
|
|
15837
|
-
|
|
13626
|
+
response = _a.sent();
|
|
15838
13627
|
// console.log('calling after - response, ', response)
|
|
15839
|
-
if (
|
|
13628
|
+
if (response && response.results) {
|
|
15840
13629
|
// console.log('calling after-- ')
|
|
15841
|
-
if (
|
|
15842
|
-
|
|
15843
|
-
this.enrollInterval = setInterval((/**
|
|
15844
|
-
* @return {?}
|
|
15845
|
-
*/
|
|
15846
|
-
function () {
|
|
15847
|
-
_this.checkInvitOnlyAssessments(response_1.results.result.content, strip, calculateParentStatus, response_1.viewMoreUrl);
|
|
15848
|
-
// tslint:disable-next-line
|
|
15849
|
-
}), 1000);
|
|
15850
|
-
}
|
|
15851
|
-
else {
|
|
15852
|
-
this.processStrip(strip, this.transformContentsToWidgets(response_1.results.result.content, strip), 'done', calculateParentStatus, response_1.viewMoreUrl);
|
|
15853
|
-
}
|
|
13630
|
+
if (response.results.result.content) {
|
|
13631
|
+
this.processStrip(strip, this.transformContentsToWidgets(response.results.result.content, strip), 'done', calculateParentStatus, response.viewMoreUrl);
|
|
15854
13632
|
}
|
|
15855
|
-
else if (
|
|
15856
|
-
this.processStrip(strip, this.transformEventsToWidgets(
|
|
13633
|
+
else if (response.results.result.Event) {
|
|
13634
|
+
this.processStrip(strip, this.transformEventsToWidgets(response.results.result.Event, strip), 'done', calculateParentStatus, response.viewMoreUrl);
|
|
15857
13635
|
}
|
|
15858
13636
|
else {
|
|
15859
13637
|
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
@@ -15864,7 +13642,7 @@
|
|
|
15864
13642
|
}
|
|
15865
13643
|
return [3 /*break*/, 4];
|
|
15866
13644
|
case 3:
|
|
15867
|
-
|
|
13645
|
+
error_1 = _a.sent();
|
|
15868
13646
|
return [3 /*break*/, 4];
|
|
15869
13647
|
case 4: return [2 /*return*/];
|
|
15870
13648
|
}
|
|
@@ -15889,7 +13667,7 @@
|
|
|
15889
13667
|
*/
|
|
15890
13668
|
function (strip, tabIndex, pillIndex, currentTab, calculateParentStatus) {
|
|
15891
13669
|
return __awaiter(this, void 0, void 0, function () {
|
|
15892
|
-
var response, tabResults, content, widgets, allTabs, allPills, allTabs, allPills,
|
|
13670
|
+
var response, tabResults, content, widgets, allTabs, allPills, allTabs, allPills, error_2;
|
|
15893
13671
|
return __generator(this, function (_a) {
|
|
15894
13672
|
switch (_a.label) {
|
|
15895
13673
|
case 0:
|
|
@@ -15933,7 +13711,7 @@
|
|
|
15933
13711
|
}
|
|
15934
13712
|
return [3 /*break*/, 3];
|
|
15935
13713
|
case 2:
|
|
15936
|
-
|
|
13714
|
+
error_2 = _a.sent();
|
|
15937
13715
|
// Handle errors
|
|
15938
13716
|
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
15939
13717
|
return [3 /*break*/, 3];
|
|
@@ -15960,7 +13738,7 @@
|
|
|
15960
13738
|
*/
|
|
15961
13739
|
function (strip, tabIndex, pillIndex, currentTab, calculateParentStatus) {
|
|
15962
13740
|
return __awaiter(this, void 0, void 0, function () {
|
|
15963
|
-
var response, widgets, tabResults, allTabs, allPills,
|
|
13741
|
+
var response, widgets, tabResults, allTabs, allPills, error_3;
|
|
15964
13742
|
return __generator(this, function (_a) {
|
|
15965
13743
|
switch (_a.label) {
|
|
15966
13744
|
case 0:
|
|
@@ -15991,7 +13769,7 @@
|
|
|
15991
13769
|
}
|
|
15992
13770
|
return [3 /*break*/, 3];
|
|
15993
13771
|
case 2:
|
|
15994
|
-
|
|
13772
|
+
error_3 = _a.sent();
|
|
15995
13773
|
return [3 /*break*/, 3];
|
|
15996
13774
|
case 3: return [2 /*return*/];
|
|
15997
13775
|
}
|
|
@@ -16216,12 +13994,17 @@
|
|
|
16216
13994
|
}
|
|
16217
13995
|
else {
|
|
16218
13996
|
this.getTabDataByfilter(currentStrip, currentTabFromMap, true);
|
|
13997
|
+
if (stripMap && stripMap.tabs && stripMap.tabs[tabIndex]) {
|
|
13998
|
+
stripMap.tabs[tabIndex].pillsData[pillIndex].fetchTabStatus = 'inprogress';
|
|
13999
|
+
stripMap.tabs[tabIndex].pillsData[pillIndex].tabLoading = false;
|
|
14000
|
+
stripMap.showOnLoader = true;
|
|
14001
|
+
}
|
|
16219
14002
|
setTimeout((/**
|
|
16220
14003
|
* @return {?}
|
|
16221
14004
|
*/
|
|
16222
14005
|
function () {
|
|
16223
14006
|
if (stripMap && stripMap.tabs && stripMap.tabs[tabIndex]) {
|
|
16224
|
-
stripMap.tabs[tabIndex].pillsData[pillIndex].fetchTabStatus = '
|
|
14007
|
+
stripMap.tabs[tabIndex].pillsData[pillIndex].fetchTabStatus = 'done';
|
|
16225
14008
|
stripMap.tabs[tabIndex].pillsData[pillIndex].tabLoading = false;
|
|
16226
14009
|
stripMap.showOnLoader = false;
|
|
16227
14010
|
_this.resetSelectedPill(stripMap.tabs[tabIndex].pillsData);
|
|
@@ -16308,22 +14091,13 @@
|
|
|
16308
14091
|
*/
|
|
16309
14092
|
function (tabdata, tabIndex) {
|
|
16310
14093
|
if (tabdata.pillsData && tabdata.pillsData.length) {
|
|
16311
|
-
// tabdata.pillsData.forEach((ele: any, index: any) => {
|
|
16312
|
-
// if(ele.selected) {
|
|
16313
|
-
// console.log(ele,'---------')
|
|
16314
|
-
// return index
|
|
16315
|
-
// }
|
|
16316
|
-
// // })
|
|
16317
|
-
// console.log(tabdata,'==========123')
|
|
16318
14094
|
/** @type {?} */
|
|
16319
14095
|
var index = tabdata.pillsData.findIndex((/**
|
|
16320
14096
|
* @param {?} pill
|
|
16321
14097
|
* @return {?}
|
|
16322
14098
|
*/
|
|
16323
14099
|
function (pill) {
|
|
16324
|
-
// if(pill.selected){
|
|
16325
14100
|
return pill.selected;
|
|
16326
|
-
// }
|
|
16327
14101
|
}));
|
|
16328
14102
|
return index;
|
|
16329
14103
|
}
|
|
@@ -16346,7 +14120,7 @@
|
|
|
16346
14120
|
function (strip, calculateParentStatus) {
|
|
16347
14121
|
if (calculateParentStatus === void 0) { calculateParentStatus = true; }
|
|
16348
14122
|
return __awaiter(this, void 0, void 0, function () {
|
|
16349
|
-
var courses, tabResults, response;
|
|
14123
|
+
var courses, tabResults, response, countOfWidget_1;
|
|
16350
14124
|
return __generator(this, function (_a) {
|
|
16351
14125
|
switch (_a.label) {
|
|
16352
14126
|
case 0:
|
|
@@ -16360,6 +14134,29 @@
|
|
|
16360
14134
|
courses = response;
|
|
16361
14135
|
if (!(strip.tabs && strip.tabs.length)) return [3 /*break*/, 3];
|
|
16362
14136
|
tabResults = this.splitCbpTabsData(courses, strip);
|
|
14137
|
+
countOfWidget_1 = true;
|
|
14138
|
+
if (strip && strip.tabs && strip.tabs.length) {
|
|
14139
|
+
strip.tabs.forEach((/**
|
|
14140
|
+
* @param {?} tab
|
|
14141
|
+
* @return {?}
|
|
14142
|
+
*/
|
|
14143
|
+
function (tab) {
|
|
14144
|
+
if (tab.pillsData && tab.pillsData.length) {
|
|
14145
|
+
tab.pillsData.forEach((/**
|
|
14146
|
+
* @param {?} pill
|
|
14147
|
+
* @return {?}
|
|
14148
|
+
*/
|
|
14149
|
+
function (pill) {
|
|
14150
|
+
if (pill && pill.widgets && pill.widgets.length) {
|
|
14151
|
+
if (countOfWidget_1) {
|
|
14152
|
+
pill.selected = true;
|
|
14153
|
+
countOfWidget_1 = false;
|
|
14154
|
+
}
|
|
14155
|
+
}
|
|
14156
|
+
}));
|
|
14157
|
+
}
|
|
14158
|
+
}));
|
|
14159
|
+
}
|
|
16363
14160
|
return [4 /*yield*/, this.processStrip(strip, this.transformContentsToWidgets(courses, strip), 'done', calculateParentStatus, '', tabResults)];
|
|
16364
14161
|
case 2:
|
|
16365
14162
|
_a.sent();
|
|
@@ -16368,32 +14165,6 @@
|
|
|
16368
14165
|
this.processStrip(strip, this.transformContentsToWidgets(courses, strip), 'done', calculateParentStatus, 'viewMoreUrl');
|
|
16369
14166
|
_a.label = 4;
|
|
16370
14167
|
case 4:
|
|
16371
|
-
// this.userSvc.fetchCbpPlanList().subscribe( async (res: any) => {
|
|
16372
|
-
// if (res) {
|
|
16373
|
-
// console.log(res,'===============================>')
|
|
16374
|
-
// courses = res
|
|
16375
|
-
// if (strip.tabs && strip.tabs.length) {
|
|
16376
|
-
// tabResults = this.splitCbpTabsData(courses, strip)
|
|
16377
|
-
// await this.processStrip(
|
|
16378
|
-
// strip,
|
|
16379
|
-
// this.transformContentsToWidgets(courses, strip),
|
|
16380
|
-
// 'done',
|
|
16381
|
-
// calculateParentStatus,
|
|
16382
|
-
// '',
|
|
16383
|
-
// tabResults
|
|
16384
|
-
// )
|
|
16385
|
-
// } else {
|
|
16386
|
-
// this.processStrip(
|
|
16387
|
-
// strip,
|
|
16388
|
-
// this.transformContentsToWidgets(courses, strip),
|
|
16389
|
-
// 'done',
|
|
16390
|
-
// calculateParentStatus,
|
|
16391
|
-
// 'viewMoreUrl',
|
|
16392
|
-
// )
|
|
16393
|
-
// }
|
|
16394
|
-
// }
|
|
16395
|
-
// }, (_err: any) => {
|
|
16396
|
-
// })
|
|
16397
14168
|
clearInterval(this.enrollInterval);
|
|
16398
14169
|
_a.label = 5;
|
|
16399
14170
|
case 5: return [2 /*return*/];
|
|
@@ -16417,13 +14188,19 @@
|
|
|
16417
14188
|
/** @type {?} */
|
|
16418
14189
|
var splitData = this.getTabsList(contentNew, strip);
|
|
16419
14190
|
if (strip.tabs && strip.tabs.length) {
|
|
16420
|
-
var
|
|
14191
|
+
var _loop_1 = function (i) {
|
|
16421
14192
|
if (strip.tabs[i].value === "myIgotPlans") {
|
|
14193
|
+
/** @type {?} */
|
|
14194
|
+
var checkWidgetAndActivePill = true;
|
|
16422
14195
|
if (strip.tabs[i].pillsData && strip.tabs[i].pillsData.length) {
|
|
16423
|
-
var
|
|
16424
|
-
if
|
|
16425
|
-
|
|
16426
|
-
|
|
14196
|
+
var _loop_2 = function (j) {
|
|
14197
|
+
// if(j === 0 ){
|
|
14198
|
+
// if(strip.tabs[i].pillsData[j].widgets && strip.tabs[i].pillsData[j].widgets.length ) {
|
|
14199
|
+
// strip.tabs[i].pillsData[j].selected = true
|
|
14200
|
+
// checkWidgetAndActivePill = false
|
|
14201
|
+
// }
|
|
14202
|
+
// strip.tabs[i].pillsData[j].selected = true
|
|
14203
|
+
// }
|
|
16427
14204
|
if (strip.tabs[i].pillsData[j]) {
|
|
16428
14205
|
tabResults.push(__assign({}, strip.tabs[i].pillsData[j], { fetchTabStatus: 'done' }, (splitData.find((/**
|
|
16429
14206
|
* @param {?} itmInner
|
|
@@ -16438,14 +14215,14 @@
|
|
|
16438
14215
|
}
|
|
16439
14216
|
};
|
|
16440
14217
|
for (var j = 0; j < strip.tabs[i].pillsData.length; j += 1) {
|
|
16441
|
-
|
|
14218
|
+
_loop_2(j);
|
|
16442
14219
|
}
|
|
16443
14220
|
strip.tabs[i].pillsData = tabResults;
|
|
16444
14221
|
}
|
|
16445
14222
|
}
|
|
16446
14223
|
};
|
|
16447
14224
|
for (var i = 0; i < strip.tabs.length; i += 1) {
|
|
16448
|
-
|
|
14225
|
+
_loop_1(i);
|
|
16449
14226
|
}
|
|
16450
14227
|
}
|
|
16451
14228
|
return strip.tabs;
|
|
@@ -16559,7 +14336,6 @@
|
|
|
16559
14336
|
function (data) {
|
|
16560
14337
|
return data.contentStatus < 2;
|
|
16561
14338
|
}));
|
|
16562
|
-
// this.getSelectedIndex(1)
|
|
16563
14339
|
return [
|
|
16564
14340
|
{ value: 'all', widgets: this.transformContentsToWidgets(all, strip) },
|
|
16565
14341
|
{ value: 'upcoming', widgets: this.transformContentsToWidgets(upcoming, strip) },
|
|
@@ -16589,7 +14365,7 @@
|
|
|
16589
14365
|
ContentStripWithTabsPillsComponent.decorators = [
|
|
16590
14366
|
{ type: core.Component, args: [{
|
|
16591
14367
|
selector: 'sb-uic-content-strip-with-tabs-pills',
|
|
16592
|
-
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>",
|
|
14368
|
+
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>",
|
|
16593
14369
|
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}"]
|
|
16594
14370
|
}] }
|
|
16595
14371
|
];
|