@sunbird-cb/consumption 0.0.46 → 0.0.47
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 +176 -2403
- 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-landscape/card-landscape.component.js +2 -2
- 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/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-landscape/card-landscape.component.js +2 -2
- 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/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 +167 -1348
- package/fesm2015/sunbird-cb-consumption.js.map +1 -1
- package/fesm5/sunbird-cb-consumption.js +176 -2403
- package/fesm5/sunbird-cb-consumption.js.map +1 -1
- 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
|
@@ -7853,7 +7853,7 @@ class CardPortraitComponent {
|
|
|
7853
7853
|
CardPortraitComponent.decorators = [
|
|
7854
7854
|
{ type: Component, args: [{
|
|
7855
7855
|
selector: 'sb-uic-card-portrait',
|
|
7856
|
-
template: "<ng-container *ngIf=\"!isCardLoading\">\n <mat-card class=\"card-standard-container mr-5 padding-remove cursor-pointer {{widgetData?.cardCustomeClass}}\" [ngClass]=\"{\n greyOut:\n widgetData.deletedMode === 'greyOut' && !isLiveOrMarkForDeletion\n ? true\n : widgetData?.intranetMode === 'greyOut' && showIntranetContent\n }\" (click)=\"(showIntranetContent || !isLiveOrMarkForDeletion) && showSnackbar()\">\n <div class=\"display-contents\" [ngClass]=\"{\n disableClick:\n widgetData.deletedMode === 'greyOut' && !isLiveOrMarkForDeletion\n ? true\n : widgetData?.intranetMode === 'greyOut' && showIntranetContent\n }\">\n <ng-container *ngIf=\"widgetData.content\">\n <a (click)=\"getRedirectUrlData(widgetData?.content); $event.stopPropagation()\"\n role=\"link\" i18n-aria-label>\n <ng-container *ngIf=\"!isCardFlipped\">\n <div class=\"status-danger\" role=\"note\" i18n-aria-label aria-label=\"Content expired or deleted\" i18n-matTooltip\n matTooltip=\"Content may be expired or deleted\" *ngIf=\"!isLiveOrMarkForDeletion\"></div>\n <div class=\"status-danger\" role=\"note\" i18n-aria-label aria-label=\"Intranet content\" i18n-matTooltip\n matTooltip=\"Available only in Company's network\"\n *ngIf=\"widgetData?.intranetMode === 'greyOut' && showIntranetContent\"></div>\n <button *ngIf=\"showFlip\" class=\"detail-button ws-mat-primary-lite-background-op30\" mat-icon-button\n (click)=\"isCardFlipped = true\" aria-label=\"Details\" i18n-aria-label=\"Details | Click to see details\">\n <mat-icon>flip_to_back</mat-icon>\n </button>\n <mat-card-content class=\"min-top\">\n <div style=\"position: relative; z-index: 1;\">\n <ng-container *ngIf=\"widgetData.content.posterImage\">\n <img mat-card-image [src]=\"widgetData.content.posterImage | pipePublicURL\" loading=\"lazy\"\n class=\"card-img ws-mat-primary-lite-background margin-remove\" [wsUtilsDefaultThumbnail]=\"defaultThumbnail\"\n [alt]=\"widgetData.content.name\" />\n </ng-container>\n <ng-container *ngIf=\"!widgetData.content.posterImage\">\n <ng-container *ngIf=\"widgetData.content.appIcon; else defaultImg\">\n <img mat-card-image [src]=\"widgetData.content.appIcon | pipePublicURL\" loading=\"lazy\"\n class=\"card-img ws-mat-primary-lite-background margin-remove\" [wsUtilsDefaultThumbnail]=\"defaultThumbnail\"\n [alt]=\"widgetData.content.name\" />\n </ng-container>\n <ng-template #defaultImg>\n <img mat-card-image [src]=\"defaultThumbnail\" loading=\"lazy\"\n class=\"card-img ws-mat-primary-lite-background margin-remove\"\n [alt]=\"widgetData.content.name\" />\n </ng-template>\n </ng-container>\n <div class=\"source-div\" style=\"display: none;\">\n <img [src]=\"widgetData.content.creatorLogo\" class=\"source-icon\" [wsUtilsDefaultThumbnail]=\"defaultSLogo\"\n [alt]=\"(widgetData.content.sourceName + '_' + widgetData.content.identifier)\" />\n </div>\n <ng-container *ngIf=\"widgetData?.content?.cbPlanEndDate\">\n <div class=\"cbp-mark\">\n <span>{{widgetData?.content?.cbPlanEndDate | date: 'd MMM, y'}}</span>\n </div>\n </ng-container>\n <!-- <ng-container *ngIf=\"widgetData?.content?.endDate\">\n <div class=\"cbp-mark\">\n <p *ngIf=\"widgetData?.content?.planDuration === acbpConstants?.UPCOMING\" class=\"cbp-warning\">{{widgetData?.content?.endDate | date: 'd MMM, y'}}</p>\n <p *ngIf=\"widgetData?.content?.planDuration === acbpConstants?.SUCCESS\" class=\"cbp-success\">{{widgetData?.content?.endDate | date: 'd MMM, y'}}</p>\n <p *ngIf=\"widgetData?.content?.planDuration === acbpConstants?.OVERDUE\" class=\"cbp-danger\">Over due</p>\n </div>\n </ng-container> -->\n <ng-container *ngIf=\"cbPlanMapData && cbPlanMapData[widgetData?.content?.identifier]\">\n <ng-container [ngTemplateOutlet]=\"cbpPlan\" [ngTemplateOutletContext]=\"{data: {\n cbpData: cbPlanMapData[widgetData?.content?.identifier]\n }}\"></ng-container>\n </ng-container>\n <div class=\"duration-box right-corner\" *ngIf=\"widgetData?.content?.duration > 0\">\n <mat-icon class=\"mat-icon main_icon mr-1\">access_time</mat-icon>\n <span class=\" ws-mat-white-text duration\">\n {{ (widgetData?.content?.duration || 120)| pipeDurationTransform: 'hms' }}\n </span>\n </div>\n <div class=\"duration-box right-corner\" *ngIf=\"widgetData?.content?.programDuration > 0\">\n <mat-icon class=\"mat-icon main_icon mr-1\">access_time</mat-icon>\n <span class=\" ws-mat-white-text duration\">\n {{widgetData?.content?.programDuration}} {{widgetData?.content?.programDuration === 1 ? 'day' : 'days'}}\n </span>\n </div>\n </div>\n <div class=\"padding-m\">\n <div class=\"course_widget flex margin-remove\">\n <div class=\"flex flex-end course_v2\">\n <mat-icon class=\"mat-icon main_icon ws-mat-default-text margin-right-xs\">video_library</mat-icon>\n <sb-uic-display-content-type i18n-title title=\"Content Type\" *ngIf=\"widgetData.content?.primaryCategory\"\n class=\"ws-mat-black60-text font-normal mat-caption \" [displayContentType]=\"widgetData.content?.primaryCategory==='Course Unit'\n ?'Module'\n :widgetData.content?.primaryCategory\">\n\n </sb-uic-display-content-type>\n </div>\n </div>\n <div [id]=\"'m-c-'+ widgetData.content?.identifier\"\n class=\"mat-subheading-1 title-text ws-mat-text-block-fade-gradient\">\n {{ widgetData.content.name }}\n </div>\n <div class=\"flex w-full flex-wrap flex-middle\">\n <div class=\"course_logo_box\">\n <img [src]=\"widgetData.content.creatorLogo | pipePublicURL \" class=\"source-icon\" [wsUtilsDefaultThumbnail]=\"defaultSLogo\"\n [alt]=\"(widgetData.content.sourceName + '_' + widgetData.content.identifier)\" />\n </div>\n <!-- <span class=\"org-text\">{{'cardcontentv2.by' | translate}} -->\n <span class=\"org-text\">By {{ (widgetData?.content?.organisation && widgetData?.content?.organisation[0]) ? widgetData?.content?.organisation[0] : 'Karmayogi Bharat' }}</span>\n </div>\n <div class=\"flex flex-middle rating-session margin-top-m\">\n <div class=\"flex flex-middle\" *ngIf=\"widgetData?.content?.avgRating\">\n <mat-icon class=\"mr-1\">star</mat-icon>\n <span>{{widgetData.content.avgRating}}</span>\n </div>\n <!-- <span class=\"most-enrolled-text margin-left-m\">{{ 'cardcontentv2.mostEnrolled' | translate }}</span> -->\n <ng-container *ngIf=\"widgetData?.content?.additionalTags && widgetData?.content?.additionalTags.includes('mostEnrolled')\">\n <span class=\"most-enrolled-text margin-left-xs\">\n <!-- {{ 'cardcontentv2.mostEnrolled' | translate }} -->\n </span>\n </ng-container>\n <ng-container *ngIf=\"widgetData?.content?.additionalTags && widgetData?.content?.additionalTags.includes('mostTrending')\">\n <span class=\"most-enrolled-text margin-left-xs\">\n <!-- {{ 'cardcontentv2.mostTrending' | translate }} -->\n </span>\n </ng-container>\n </div>\n </div>\n </mat-card-content>\n </ng-container>\n <ng-container *ngIf=\"isCardFlipped\">\n <div class=\"flex items-center\">\n <!-- <h2 class=\"mat-subheading-2 flex-1 min-w-0 margin-remove-bottom\" i18n>{{'cardcontentv2.reason' | translate}}</h2> -->\n <button mat-icon-button (click)=\"isCardFlipped = false\">\n <mat-icon>close</mat-icon>\n </button>\n </div>\n <p class=\"text-justify mat-body-1\">\n {{ widgetData.content.reason }}\n </p>\n </ng-container>\n </a>\n </ng-container>\n </div>\n</mat-card>\n</ng-container>\n\n<ng-container *ngIf=\"isCardLoading\">\n <mat-card class=\"card-standard-container mr-5 padding-remove\" >\n <div class=\"display-contents\" >\n <ng-container *ngIf=\"!isCardFlipped\">\n <mat-card-content class=\"min-top\">\n <div style=\"position: relative; z-index: 1;\">\n <ng-container>\n <sb-uic-skeleton-loader [width]=\"'100%'\" [height]=\"'140px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </ng-container>\n </div>\n <div class=\"padding-m\">\n <div class=\"course_widget flex margin-remove\">\n <div class=\"flex flex-end\">\n <sb-uic-skeleton-loader [width]=\"'65px'\" [height]=\"'16px'\" [bindingClass]=\"'flex rounded br-8'\"></sb-uic-skeleton-loader>\n </div>\n </div>\n <div class=\"mat-subheading-1 title-text ws-mat-text-block-fade-gradient\">\n <sb-uic-skeleton-loader [width]=\"'100%'\" [height]=\"'16px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n <sb-uic-skeleton-loader [width]=\"'111px'\" [height]=\"'16px'\" [bindingClass]=\"'flex rounded margin-top-s'\"></sb-uic-skeleton-loader>\n </div>\n <div class=\"flex w-full flex-wrap flex-middle margin-top-m\">\n <div class=\"\">\n <sb-uic-skeleton-loader [width]=\"'28px'\" [height]=\"'28px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </div>\n <span class=\"org-text\"> <sb-uic-skeleton-loader [width]=\"'111px'\" [height]=\"'16px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader></span>\n </div>\n <div class=\"flex flex-middle rating-session margin-top-m\">\n <div class=\"flex flex-middle\">\n <sb-uic-skeleton-loader [width]=\"'45px'\" [height]=\"'12px'\" [bindingClass]=\"'flex rounded margin-top-m'\"></sb-uic-skeleton-loader>\n </div>\n </div>\n </div>\n </mat-card-content>\n </ng-container>\n </div>\n </mat-card>\n</ng-container>\n\n<ng-template #cbpPlan let-data=\"data\">\n <div class=\"cbp-mark left-0 border-top-radius\">\n <p *ngIf=\"data.cbpData.planDuration === acbpConstants?.UPCOMING\" class=\"cbp-warning\">{{data.cbpData.endDate | date: 'd MMM, y'}}</p>\n <p *ngIf=\"data.cbpData.planDuration === acbpConstants?.SUCCESS\" class=\"cbp-success\">{{data.cbpData.endDate | date: 'd MMM, y'}}</p>\n <p *ngIf=\"data.cbpData.planDuration === acbpConstants?.OVERDUE\" class=\"cbp-danger\">{{'OverDue' }}</p>\n </div>\n</ng-template>",
|
|
7856
|
+
template: "<ng-container *ngIf=\"!isCardLoading\">\n <mat-card class=\"card-standard-container mr-5 padding-remove cursor-pointer {{widgetData?.cardCustomeClass}}\" [ngClass]=\"{\n greyOut:\n widgetData.deletedMode === 'greyOut' && !isLiveOrMarkForDeletion\n ? true\n : widgetData?.intranetMode === 'greyOut' && showIntranetContent\n }\" (click)=\"(showIntranetContent || !isLiveOrMarkForDeletion) && showSnackbar()\">\n <div class=\"display-contents\" [ngClass]=\"{\n disableClick:\n widgetData.deletedMode === 'greyOut' && !isLiveOrMarkForDeletion\n ? true\n : widgetData?.intranetMode === 'greyOut' && showIntranetContent\n }\">\n <ng-container *ngIf=\"widgetData.content\">\n <a (click)=\"getRedirectUrlData(widgetData?.content); $event.stopPropagation()\"\n role=\"link\" i18n-aria-label>\n <ng-container *ngIf=\"!isCardFlipped\">\n <div class=\"status-danger\" role=\"note\" i18n-aria-label aria-label=\"Content expired or deleted\" i18n-matTooltip\n matTooltip=\"Content may be expired or deleted\" *ngIf=\"!isLiveOrMarkForDeletion\"></div>\n <div class=\"status-danger\" role=\"note\" i18n-aria-label aria-label=\"Intranet content\" i18n-matTooltip\n matTooltip=\"Available only in Company's network\"\n *ngIf=\"widgetData?.intranetMode === 'greyOut' && showIntranetContent\"></div>\n <button *ngIf=\"showFlip\" class=\"detail-button ws-mat-primary-lite-background-op30\" mat-icon-button\n (click)=\"isCardFlipped = true\" aria-label=\"Details\" i18n-aria-label=\"Details | Click to see details\">\n <mat-icon>flip_to_back</mat-icon>\n </button>\n <mat-card-content class=\"min-top\">\n <div style=\"position: relative; z-index: 1;\">\n <ng-container *ngIf=\"widgetData.content.posterImage\">\n <img mat-card-image [src]=\"widgetData.content.posterImage | pipePublicURL\" loading=\"lazy\"\n class=\"card-img ws-mat-primary-lite-background margin-remove\" [wsUtilsDefaultThumbnail]=\"defaultThumbnail\"\n [alt]=\"widgetData.content.name\" />\n </ng-container>\n <ng-container *ngIf=\"!widgetData.content.posterImage\">\n <ng-container *ngIf=\"widgetData.content.appIcon; else defaultImg\">\n <img mat-card-image [src]=\"widgetData.content.appIcon | pipePublicURL\" loading=\"lazy\"\n class=\"card-img ws-mat-primary-lite-background margin-remove\" [wsUtilsDefaultThumbnail]=\"defaultThumbnail\"\n [alt]=\"widgetData.content.name\" />\n </ng-container>\n <ng-template #defaultImg>\n <img mat-card-image [src]=\"defaultThumbnail\" loading=\"lazy\"\n class=\"card-img ws-mat-primary-lite-background margin-remove\"\n [alt]=\"widgetData.content.name\" />\n </ng-template>\n </ng-container>\n <div class=\"source-div\" style=\"display: none;\">\n <img [src]=\"widgetData.content.creatorLogo\" class=\"source-icon\" [wsUtilsDefaultThumbnail]=\"defaultSLogo\"\n [alt]=\"(widgetData.content.sourceName + '_' + widgetData.content.identifier)\" />\n </div>\n <ng-container *ngIf=\"widgetData?.content?.cbPlanEndDate\">\n <div class=\"cbp-mark\">\n <span>{{widgetData?.content?.cbPlanEndDate | date: 'd MMM, y'}}</span>\n </div>\n </ng-container>\n <!-- <ng-container *ngIf=\"widgetData?.content?.endDate\">\n <div class=\"cbp-mark\">\n <p *ngIf=\"widgetData?.content?.planDuration === acbpConstants?.UPCOMING\" class=\"cbp-warning\">{{widgetData?.content?.endDate | date: 'd MMM, y'}}</p>\n <p *ngIf=\"widgetData?.content?.planDuration === acbpConstants?.SUCCESS\" class=\"cbp-success\">{{widgetData?.content?.endDate | date: 'd MMM, y'}}</p>\n <p *ngIf=\"widgetData?.content?.planDuration === acbpConstants?.OVERDUE\" class=\"cbp-danger\">Over due</p>\n </div>\n </ng-container> -->\n <ng-container *ngIf=\"cbPlanMapData && cbPlanMapData[widgetData?.content?.identifier] && cbPlanMapData[widgetData?.content?.identifier]?.contentStatus < 2\">\n <ng-container [ngTemplateOutlet]=\"cbpPlan\" [ngTemplateOutletContext]=\"{data: {\n cbpData: cbPlanMapData[widgetData?.content?.identifier]\n }}\"></ng-container>\n </ng-container>\n <div class=\"duration-box right-corner\" *ngIf=\"widgetData?.content?.duration > 0\">\n <mat-icon class=\"mat-icon main_icon mr-1\">access_time</mat-icon>\n <span class=\" ws-mat-white-text duration\">\n {{ (widgetData?.content?.duration || 120)| pipeDurationTransform: 'hms' }}\n </span>\n </div>\n <div class=\"duration-box right-corner\" *ngIf=\"widgetData?.content?.programDuration > 0\">\n <mat-icon class=\"mat-icon main_icon mr-1\">access_time</mat-icon>\n <span class=\" ws-mat-white-text duration\">\n {{widgetData?.content?.programDuration}} {{widgetData?.content?.programDuration === 1 ? 'day' : 'days'}}\n </span>\n </div>\n </div>\n <div class=\"padding-m\">\n <div class=\"course_widget flex margin-remove\">\n <div class=\"flex flex-end course_v2\">\n <mat-icon class=\"mat-icon main_icon ws-mat-default-text margin-right-xs\">video_library</mat-icon>\n <sb-uic-display-content-type i18n-title title=\"Content Type\" *ngIf=\"widgetData.content?.primaryCategory\"\n class=\"ws-mat-black60-text font-normal mat-caption \" [displayContentType]=\"widgetData.content?.primaryCategory==='Course Unit'\n ?'Module'\n :widgetData.content?.primaryCategory\">\n\n </sb-uic-display-content-type>\n </div>\n </div>\n <div [id]=\"'m-c-'+ widgetData.content?.identifier\"\n class=\"mat-subheading-1 title-text ws-mat-text-block-fade-gradient\">\n {{ widgetData.content.name }}\n </div>\n <div class=\"flex w-full flex-wrap flex-middle\">\n <div class=\"course_logo_box\">\n <img [src]=\"widgetData.content.creatorLogo | pipePublicURL \" class=\"source-icon\" [wsUtilsDefaultThumbnail]=\"defaultSLogo\"\n [alt]=\"(widgetData.content.sourceName + '_' + widgetData.content.identifier)\" />\n </div>\n <!-- <span class=\"org-text\">{{'cardcontentv2.by' | translate}} -->\n <span class=\"org-text\">By {{ (widgetData?.content?.organisation && widgetData?.content?.organisation[0]) ? widgetData?.content?.organisation[0] : 'Karmayogi Bharat' }}</span>\n </div>\n <div class=\"flex flex-middle rating-session margin-top-m\">\n <div class=\"flex flex-middle\" *ngIf=\"widgetData?.content?.avgRating\">\n <mat-icon class=\"mr-1\">star</mat-icon>\n <span>{{widgetData.content.avgRating}}</span>\n </div>\n <!-- <span class=\"most-enrolled-text margin-left-m\">{{ 'cardcontentv2.mostEnrolled' | translate }}</span> -->\n <ng-container *ngIf=\"widgetData?.content?.additionalTags && widgetData?.content?.additionalTags.includes('mostEnrolled')\">\n <span class=\"most-enrolled-text margin-left-xs\">\n <!-- {{ 'cardcontentv2.mostEnrolled' | translate }} -->\n </span>\n </ng-container>\n <ng-container *ngIf=\"widgetData?.content?.additionalTags && widgetData?.content?.additionalTags.includes('mostTrending')\">\n <span class=\"most-enrolled-text margin-left-xs\">\n <!-- {{ 'cardcontentv2.mostTrending' | translate }} -->\n </span>\n </ng-container>\n </div>\n </div>\n </mat-card-content>\n </ng-container>\n <ng-container *ngIf=\"isCardFlipped\">\n <div class=\"flex items-center\">\n <!-- <h2 class=\"mat-subheading-2 flex-1 min-w-0 margin-remove-bottom\" i18n>{{'cardcontentv2.reason' | translate}}</h2> -->\n <button mat-icon-button (click)=\"isCardFlipped = false\">\n <mat-icon>close</mat-icon>\n </button>\n </div>\n <p class=\"text-justify mat-body-1\">\n {{ widgetData.content.reason }}\n </p>\n </ng-container>\n </a>\n </ng-container>\n </div>\n</mat-card>\n</ng-container>\n\n<ng-container *ngIf=\"isCardLoading\">\n <mat-card class=\"card-standard-container mr-5 padding-remove\" >\n <div class=\"display-contents\" >\n <ng-container *ngIf=\"!isCardFlipped\">\n <mat-card-content class=\"min-top\">\n <div style=\"position: relative; z-index: 1;\">\n <ng-container>\n <sb-uic-skeleton-loader [width]=\"'100%'\" [height]=\"'140px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </ng-container>\n </div>\n <div class=\"padding-m\">\n <div class=\"course_widget flex margin-remove\">\n <div class=\"flex flex-end\">\n <sb-uic-skeleton-loader [width]=\"'65px'\" [height]=\"'16px'\" [bindingClass]=\"'flex rounded br-8'\"></sb-uic-skeleton-loader>\n </div>\n </div>\n <div class=\"mat-subheading-1 title-text ws-mat-text-block-fade-gradient\">\n <sb-uic-skeleton-loader [width]=\"'100%'\" [height]=\"'16px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n <sb-uic-skeleton-loader [width]=\"'111px'\" [height]=\"'16px'\" [bindingClass]=\"'flex rounded margin-top-s'\"></sb-uic-skeleton-loader>\n </div>\n <div class=\"flex w-full flex-wrap flex-middle margin-top-m\">\n <div class=\"\">\n <sb-uic-skeleton-loader [width]=\"'28px'\" [height]=\"'28px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </div>\n <span class=\"org-text\"> <sb-uic-skeleton-loader [width]=\"'111px'\" [height]=\"'16px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader></span>\n </div>\n <div class=\"flex flex-middle rating-session margin-top-m\">\n <div class=\"flex flex-middle\">\n <sb-uic-skeleton-loader [width]=\"'45px'\" [height]=\"'12px'\" [bindingClass]=\"'flex rounded margin-top-m'\"></sb-uic-skeleton-loader>\n </div>\n </div>\n </div>\n </mat-card-content>\n </ng-container>\n </div>\n </mat-card>\n</ng-container>\n\n<ng-template #cbpPlan let-data=\"data\">\n <div class=\"cbp-mark left-0 border-top-radius\">\n <p *ngIf=\"data.cbpData.planDuration === acbpConstants?.UPCOMING\" class=\"cbp-warning\">{{data.cbpData.endDate | date: 'd MMM, y'}}</p>\n <p *ngIf=\"data.cbpData.planDuration === acbpConstants?.SUCCESS\" class=\"cbp-success\">{{data.cbpData.endDate | date: 'd MMM, y'}}</p>\n <p *ngIf=\"data.cbpData.planDuration === acbpConstants?.OVERDUE\" class=\"cbp-danger\">{{'OverDue' }}</p>\n </div>\n</ng-template>",
|
|
7857
7857
|
styles: [".course_widget{margin-top:10px}.course_widget .mat-icon{vertical-align:middle;color:#ef951e!important}.course_widget .course_v2{border:1px solid #ef951e;padding:4px 8px;align-items:end;border-radius:16px}.course_widget .main_icon{font-size:16px;width:16px;height:16px}.rating-session mat-icon{font-size:16px;height:16px;width:12px;padding-right:3px;color:#ef951e}.rating-session span{font-size:11px}.rating-session .most-enrolled-text{padding:0 8px;background:#ffea9e;border-radius:4px}.card-standard-container{position:relative;width:245px;min-height:346px;border-radius:8px;box-sizing:border-box;box-shadow:0 10px 30px rgba(153,153,153,.2);overflow:hidden;height:346px;margin:20px 8px}.card-standard-container .progress-bar{width:101%;margin-left:-15px;display:flex;margin-top:0;background:bisque;position:absolute;bottom:0}.card-standard-container ::ng-deep .mat-progress-bar{height:8px!important}.card-standard-container .icon_text{font-size:12px;line-height:16px;text-transform:uppercase}.card-standard-container .course_logo_box{width:38px;height:38px;background:#fff;border-radius:8px;box-sizing:border-box;box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12)}.card-standard-container .course_logo_box img{height:28px;width:28px;padding:5px;display:inline-block}.card-standard-container .course_logo_box p{display:inline-block;vertical-align:top}.card-standard-container .org-text{font-size:12px;font-weight:400;width:75%;padding-left:10px;word-break:break-all;white-space:initial;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical}.card-standard-container .source-div{position:relative;top:100px;background:#fff;z-index:3;border:1px solid #dedfe0;min-width:72px;min-height:72px;max-width:72px;max-height:72px;display:flex;border-radius:8px}.card-standard-container .source-div .source-icon{border-radius:8px;display:block;margin:auto;max-width:58px;max-height:-webkit-fill-available}.card-standard-container mat-card-content{background:#fff}.card-standard-container .card-img{min-width:245px;max-height:140px;min-height:140px;display:block;-o-object-fit:fill;object-fit:fill;border-top-left-radius:8px;border-top-right-radius:8px;width:100%}.card-standard-container .mat-subheading-1{font:600 14px/24px Montserrat}.card-standard-container .complexity{padding-top:70px;display:flex;font-size:14px;line-height:21px;padding-bottom:10px}.card-standard-container .complexity .mode-tag{border-radius:5px;order:2;margin-left:auto;color:#fff;font-size:10px}.card-standard-container .complexity .duration{display:flex;margin-left:auto;order:3;font-weight:700}.card-standard-container .complexity .time-text{margin:0 5px 0 6px;font-weight:700}.card-standard-container .basic{margin:auto 0}.card-standard-container .title-text{word-break:break-all;white-space:initial;margin:8px 0;position:relative;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;min-height:48px}.card-standard-container .description-text{position:relative;overflow:hidden;height:42px;white-space:normal;text-overflow:ellipsis}.duration-box{background:#000;position:absolute;border:none;display:flex;align-items:center;padding:4px;border-radius:4px}.duration-box.right-corner{right:4px;bottom:4px}.duration-box .mat-icon{vertical-align:middle;color:#fff!important;height:14px!important;width:14px!important;font-size:14px}.duration-box .duration{font:700 12px/16px Lato;display:inline-block;margin:0;padding:0}.width-238{width:238px!important}.cbp-mark{border-radius:12px 0;opacity:1;background-image:linear-gradient(90deg,rgba(0,0,0,.6) 0,rgba(0,0,0,0) 100%);position:absolute;top:0;padding:8px}.cbp-mark p{opacity:1;background-color:#fff;padding:4px;opacity:1;color:#1b2133;font-family:Lato-Regular;font-size:10px;font-weight:400;font-style:Regular;letter-spacing:.5px;text-align:left;line-height:12px;margin-bottom:0}.cbpwidth{width:340px}.cbp-plan{border-radius:4px;opacity:1;background-color:#1b4ca1;top:4px;left:4px;opacity:1;color:rgba(255,255,255,.95);font-family:Lato-Bold;font-size:12px;font-weight:700;font-style:normal;letter-spacing:.25px;text-align:center;line-height:16px;padding:4px}.cbp-info{opacity:1;color:#fff;font-family:Lato-Regular;font-size:10px;font-weight:400;font-style:normal;letter-spacing:.5px;text-align:left;line-height:12px;padding:2px}.cbp-danger{border-radius:2px;border:1px solid rgba(0,0,0,.08);background-color:#d13924!important;color:#fff!important;opacity:1}.cbp-success{border-radius:2px;border:1px solid #1d8922;background-color:#1d8922!important;color:#fff!important;opacity:1}.cbp-warning{border-radius:2px;border:1px solid #ef951e;background-color:#ef951e!important;color:#fff!important;opacity:1}"]
|
|
7858
7858
|
}] }
|
|
7859
7859
|
];
|
|
@@ -8547,7 +8547,7 @@ class CardLandscapeComponent {
|
|
|
8547
8547
|
CardLandscapeComponent.decorators = [
|
|
8548
8548
|
{ type: Component, args: [{
|
|
8549
8549
|
selector: 'sb-uic-card-landscape',
|
|
8550
|
-
template: "<ng-container *ngIf=\"!isCardLoading\">\n <a class=\"cursor-pointer\" (click)=\"raiseTelemetry(widgetData?.content);getRedirectUrlData(widgetData?.content); $event.stopPropagation()\" \n role=\"link\" i18n-aria-label>\n <mat-card class=\"card-portrait mr-2 card-portrait-clickable min-height-remove\" [ngClass]=\"widgetData.cardCustomeClass ? widgetData.cardCustomeClass : ''\">\n <div class=\"course_widget portrait_widget flex margin-bottom-xs\">\n <div class=\"flex flex-end flex-middle course_port\">\n <mat-icon class=\"mat-icon main_icon ws-mat-default-text margin-right-xs\">video_library</mat-icon>\n <sb-uic-display-content-type i18n-title title=\"Content Type\" *ngIf=\"widgetData.content?.primaryCategory\"\n class=\"ws-mat-black60-text font-normal mat-caption \" [useTranslation]=\"false\" [displayContentType]=\"widgetData.content?.primaryCategory==='Course Unit'\n ?'Module'\n :widgetData.content?.primaryCategory\">\n </sb-uic-display-content-type>\n </div>\n </div>\n <div class=\"flex\">\n <div class=\"margin-right-s\">\n <ng-container *ngIf=\"widgetData?.content?.posterImage\">\n <div class=\" img-block-portrait position-relative\">\n <img mat-card-image [src]=\"widgetData?.content?.posterImage | pipePublicURL\" loading=\"lazy\"\n class=\"card-image ws-mat-primary-lite-background margin-remove\" [wsUtilsDefaultThumbnail]=\"defaultThumbnail\"\n [alt]=\"widgetData.content.name\" />\n <div class=\"duration-box right-corner-portrait\" *ngIf=\"widgetData?.content?.duration > 0\">\n <mat-icon class=\"mat-icon main_icon mr-1\">access_time</mat-icon>\n <span class=\" ws-mat-white-text duration\">\n {{ (widgetData?.content?.duration || 120)| pipeDurationTransform: 'hms' }}\n </span>\n </div>\n <div class=\"duration-box right-corner-portrait\" *ngIf=\"widgetData?.content?.programDuration > 0\">\n <mat-icon class=\"mat-icon main_icon mr-1\">access_time</mat-icon>\n <span class=\" ws-mat-white-text duration\">\n {{widgetData?.content?.programDuration}} {{widgetData?.content?.programDuration === 1 ? 'day' : 'days'}}\n </span>\n </div>\n <ng-container *ngIf=\"cbPlanMapData && cbPlanMapData[widgetData?.content?.identifier]\">\n <ng-container [ngTemplateOutlet]=\"cbpPlan\" [ngTemplateOutletContext]=\"{data: {\n cbpData: cbPlanMapData[widgetData?.content?.identifier]\n }}\"></ng-container>\n </ng-container>\n </div>\n </ng-container>\n <ng-container *ngIf=\"!widgetData?.content?.posterImage\">\n <ng-container *ngIf=\"widgetData?.content?.appIcon; else defaultImg\">\n <img mat-card-image [src]=\"widgetData.content.appIcon | pipePublicURL\" loading=\"lazy\"\n class=\"card-image ws-mat-primary-lite-background margin-remove\" [wsUtilsDefaultThumbnail]=\"defaultThumbnail\"\n [alt]=\"widgetData.content.name\" />\n </ng-container>\n <ng-template #defaultImg>\n <img mat-card-image [src]=\"defaultThumbnail\" loading=\"lazy\"\n class=\"card-image ws-mat-primary-lite-background margin-remove\"\n [alt]=\"widgetData?.content?.name\" />\n </ng-template>\n </ng-container>\n </div>\n <div class=\"width-1-1\">\n <div [id]=\"'m-c-'+ widgetData?.content?.identifier\"\n class=\"portrait-subheading mat-subheading-2 title-text\">\n {{ widgetData?.content?.name }}\n </div>\n <div class=\"flex w-full flex-middle\">\n <div class=\"portrait_course_logo_box margin-right-xs\">\n <img [src]=\"widgetData?.content?.creatorLogo | pipePublicURL \" class=\"source-icon\" loading=\"lazy\" [wsUtilsDefaultThumbnail]=\"defaultSLogo\"\n [alt]=\"(widgetData?.content?.sourceName + '_' + widgetData?.content?.identifier)\" />\n </div>\n <span class=\"portrait-org-name font-normal mat-caption\">By {{ (widgetData.content.organisation && widgetData.content.organisation[0]) ? widgetData.content.organisation[0] : 'Karmayogi Bharat' }}</span>\n <!-- <span class=\"portrait-org-name font-normal mat-caption\">{{'cardcontentv2.by' | translate}} {{ (widgetData.content.organisation && widgetData.content.organisation[0]) ? widgetData.content.organisation[0] : 'Karmayogi Bharat' }}</span> -->\n </div>\n\n <div class=\"flex flex-middle rating-session margin-top-xs\">\n <div class=\"flex flex-middle\" *ngIf=\"widgetData?.content?.avgRating\">\n <mat-icon class=\"mr-1\">star</mat-icon>\n <span>{{widgetData.content.avgRating}}</span>\n </div>\n <!-- <ng-container *ngIf=\"widgetData?.content?.additionalTags && widgetData?.content?.additionalTags.includes('mostEnrolled')\">\n <span class=\"most-enrolled-text margin-left-xs\">{{ 'cardcontentv2.mostEnrolled' | translate }}</span>\n </ng-container>\n <ng-container *ngIf=\"widgetData?.content?.additionalTags && widgetData?.content?.additionalTags.includes('mostTrending')\">\n <span class=\"most-enrolled-text margin-left-xs\">{{ 'cardcontentv2.mostTrending' | translate }}</span>\n </ng-container> -->\n </div>\n </div>\n </div>\n </mat-card>\n </a>\n</ng-container>\n\n<ng-template #cbpPlan let-data=\"data\">\n <div class=\"cbp-mark left-0 border-top-radius\">\n <p *ngIf=\"data.cbpData.planDuration === acbpConstants?.UPCOMING\" class=\"cbp-warning\">{{data.cbpData.endDate | date: 'd MMM, y'}}</p>\n <p *ngIf=\"data.cbpData.planDuration === acbpConstants?.SUCCESS\" class=\"cbp-success\">{{data.cbpData.endDate | date: 'd MMM, y'}}</p>\n <p *ngIf=\"data.cbpData.planDuration === acbpConstants?.OVERDUE\" class=\"cbp-danger\">{{'OverDue' }}</p>\n </div>\n </ng-template>\n\n<ng-container *ngIf=\"isCardLoading\">\n <mat-card class=\"card-portrait mr-2 card-portrait-clickable\" [ngClass]=\"widgetData.cardCustomeClass ? widgetData.cardCustomeClass : ''\">\n <div class=\"flex\">\n <div class=\"margin-right-s\">\n <ng-container>\n <sb-uic-skeleton-loader [width]=\"'147px'\" [height]=\"'100px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </ng-container>\n </div>\n <div class=\"width-1-1\">\n <div class=\"portrait-subheading title-text\">\n <sb-uic-skeleton-loader [bindingClass]=\"'flex rounded width-1-1'\"></sb-uic-skeleton-loader>\n </div>\n <div class=\"flex w-full flex-wrap flex-middle\">\n <sb-uic-skeleton-loader [width]=\"'24px'\" [height]=\"'24px'\" [bindingClass]=\"'flex rounded margin-right-xs'\"></sb-uic-skeleton-loader>\n <sb-uic-skeleton-loader [width]=\"'100px'\" [height]=\"'12px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </div>\n <div class=\"portrait_widget flex margin-top-xs\">\n <div class=\"flex flex-end flex-middle\">\n <sb-uic-skeleton-loader [width]=\"'65px'\" [height]=\"'12px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </div>\n </div>\n </div>\n </div>\n </mat-card>\n</ng-container>",
|
|
8550
|
+
template: "<ng-container *ngIf=\"!isCardLoading\">\n <a class=\"cursor-pointer\" (click)=\"raiseTelemetry(widgetData?.content);getRedirectUrlData(widgetData?.content); $event.stopPropagation()\" \n role=\"link\" i18n-aria-label>\n <mat-card class=\"card-portrait mr-2 card-portrait-clickable min-height-remove\" [ngClass]=\"widgetData.cardCustomeClass ? widgetData.cardCustomeClass : ''\">\n <div class=\"course_widget portrait_widget flex margin-bottom-xs\">\n <div class=\"flex flex-end flex-middle course_port\">\n <mat-icon class=\"mat-icon main_icon ws-mat-default-text margin-right-xs\">video_library</mat-icon>\n <sb-uic-display-content-type i18n-title title=\"Content Type\" *ngIf=\"widgetData.content?.primaryCategory\"\n class=\"ws-mat-black60-text font-normal mat-caption \" [useTranslation]=\"false\" [displayContentType]=\"widgetData.content?.primaryCategory==='Course Unit'\n ?'Module'\n :widgetData.content?.primaryCategory\">\n </sb-uic-display-content-type>\n </div>\n </div>\n <div class=\"flex\">\n <div class=\"margin-right-s\">\n <ng-container *ngIf=\"widgetData?.content?.posterImage\">\n <div class=\" img-block-portrait position-relative\">\n <img mat-card-image [src]=\"widgetData?.content?.posterImage | pipePublicURL\" loading=\"lazy\"\n class=\"card-image ws-mat-primary-lite-background margin-remove\" [wsUtilsDefaultThumbnail]=\"defaultThumbnail\"\n [alt]=\"widgetData.content.name\" />\n <div class=\"duration-box right-corner-portrait\" *ngIf=\"widgetData?.content?.duration > 0\">\n <mat-icon class=\"mat-icon main_icon mr-1\">access_time</mat-icon>\n <span class=\" ws-mat-white-text duration\">\n {{ (widgetData?.content?.duration || 120)| pipeDurationTransform: 'hms' }}\n </span>\n </div>\n <div class=\"duration-box right-corner-portrait\" *ngIf=\"widgetData?.content?.programDuration > 0\">\n <mat-icon class=\"mat-icon main_icon mr-1\">access_time</mat-icon>\n <span class=\" ws-mat-white-text duration\">\n {{widgetData?.content?.programDuration}} {{widgetData?.content?.programDuration === 1 ? 'day' : 'days'}}\n </span>\n </div>\n <ng-container *ngIf=\"cbPlanMapData && cbPlanMapData[widgetData?.content?.identifier] && cbPlanMapData[widgetData?.content?.identifier]?.contentStatus < 2\">\n <ng-container [ngTemplateOutlet]=\"cbpPlan\" [ngTemplateOutletContext]=\"{data: {\n cbpData: cbPlanMapData[widgetData?.content?.identifier]\n }}\"></ng-container>\n </ng-container>\n </div>\n </ng-container>\n <ng-container *ngIf=\"!widgetData?.content?.posterImage\">\n <ng-container *ngIf=\"widgetData?.content?.appIcon; else defaultImg\">\n <img mat-card-image [src]=\"widgetData.content.appIcon | pipePublicURL\" loading=\"lazy\"\n class=\"card-image ws-mat-primary-lite-background margin-remove\" [wsUtilsDefaultThumbnail]=\"defaultThumbnail\"\n [alt]=\"widgetData.content.name\" />\n </ng-container>\n <ng-template #defaultImg>\n <img mat-card-image [src]=\"defaultThumbnail\" loading=\"lazy\"\n class=\"card-image ws-mat-primary-lite-background margin-remove\"\n [alt]=\"widgetData?.content?.name\" />\n </ng-template>\n </ng-container>\n </div>\n <div class=\"width-1-1\">\n <div [id]=\"'m-c-'+ widgetData?.content?.identifier\"\n class=\"portrait-subheading mat-subheading-2 title-text\">\n {{ widgetData?.content?.name }}\n </div>\n <div class=\"flex w-full flex-middle\">\n <div class=\"portrait_course_logo_box margin-right-xs\">\n <img [src]=\"widgetData?.content?.creatorLogo | pipePublicURL \" class=\"source-icon\" loading=\"lazy\" [wsUtilsDefaultThumbnail]=\"defaultSLogo\"\n [alt]=\"(widgetData?.content?.sourceName + '_' + widgetData?.content?.identifier)\" />\n </div>\n <span class=\"portrait-org-name font-normal mat-caption\">By {{ (widgetData.content.organisation && widgetData.content.organisation[0]) ? widgetData.content.organisation[0] : 'Karmayogi Bharat' }}</span>\n <!-- <span class=\"portrait-org-name font-normal mat-caption\">{{'cardcontentv2.by' | translate}} {{ (widgetData.content.organisation && widgetData.content.organisation[0]) ? widgetData.content.organisation[0] : 'Karmayogi Bharat' }}</span> -->\n </div>\n\n <div class=\"flex flex-middle rating-session margin-top-xs\">\n <div class=\"flex flex-middle\" *ngIf=\"widgetData?.content?.avgRating\">\n <mat-icon class=\"mr-1\">star</mat-icon>\n <span>{{widgetData.content.avgRating}}</span>\n </div>\n <!-- <ng-container *ngIf=\"widgetData?.content?.additionalTags && widgetData?.content?.additionalTags.includes('mostEnrolled')\">\n <span class=\"most-enrolled-text margin-left-xs\">{{ 'cardcontentv2.mostEnrolled' | translate }}</span>\n </ng-container>\n <ng-container *ngIf=\"widgetData?.content?.additionalTags && widgetData?.content?.additionalTags.includes('mostTrending')\">\n <span class=\"most-enrolled-text margin-left-xs\">{{ 'cardcontentv2.mostTrending' | translate }}</span>\n </ng-container> -->\n </div>\n </div>\n </div>\n </mat-card>\n </a>\n</ng-container>\n\n<ng-template #cbpPlan let-data=\"data\">\n <div class=\"cbp-mark left-0 border-top-radius\">\n <p *ngIf=\"data.cbpData.planDuration === acbpConstants?.UPCOMING\" class=\"cbp-warning\">{{data.cbpData.endDate | date: 'd MMM, y'}}</p>\n <p *ngIf=\"data.cbpData.planDuration === acbpConstants?.SUCCESS\" class=\"cbp-success\">{{data.cbpData.endDate | date: 'd MMM, y'}}</p>\n <p *ngIf=\"data.cbpData.planDuration === acbpConstants?.OVERDUE\" class=\"cbp-danger\">{{'OverDue' }}</p>\n </div>\n </ng-template>\n\n<ng-container *ngIf=\"isCardLoading\">\n <mat-card class=\"card-portrait mr-2 card-portrait-clickable\" [ngClass]=\"widgetData.cardCustomeClass ? widgetData.cardCustomeClass : ''\">\n <div class=\"flex\">\n <div class=\"margin-right-s\">\n <ng-container>\n <sb-uic-skeleton-loader [width]=\"'147px'\" [height]=\"'100px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </ng-container>\n </div>\n <div class=\"width-1-1\">\n <div class=\"portrait-subheading title-text\">\n <sb-uic-skeleton-loader [bindingClass]=\"'flex rounded width-1-1'\"></sb-uic-skeleton-loader>\n </div>\n <div class=\"flex w-full flex-wrap flex-middle\">\n <sb-uic-skeleton-loader [width]=\"'24px'\" [height]=\"'24px'\" [bindingClass]=\"'flex rounded margin-right-xs'\"></sb-uic-skeleton-loader>\n <sb-uic-skeleton-loader [width]=\"'100px'\" [height]=\"'12px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </div>\n <div class=\"portrait_widget flex margin-top-xs\">\n <div class=\"flex flex-end flex-middle\">\n <sb-uic-skeleton-loader [width]=\"'65px'\" [height]=\"'12px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </div>\n </div>\n </div>\n </div>\n </mat-card>\n</ng-container>",
|
|
8551
8551
|
styles: [".card-portrait{border-radius:12px;border:1px solid rgba(0,0,0,.08);opacity:1;width:350px;min-height:154px;padding:16px}.card-portrait .img-block-portrait{line-height:10px}.card-portrait .card-image{border-radius:8px;opacity:1;background-size:100%;width:147px;height:100px}.card-portrait .portrait-subheading{opacity:1;color:rgba(0,0,0,.87);font-weight:700;font-style:normal;letter-spacing:.25px;text-align:left;word-break:break-word;white-space:initial;margin:0 0 8px;position:relative;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;min-height:40px}.card-portrait .portrait_course_logo_box img{padding:3px;display:inline-block;width:24px;height:24px;border:1px solid #d6d6d6;border-radius:4px;box-sizing:border-box}.card-portrait span.portrait-org-name{width:75%;word-break:break-all;white-space:initial;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical}.card-portrait .portrait_widget{align-items:center;margin-top:0}.card-portrait .portrait_widget .course_port{border:1px solid #ef951e;padding:4px 8px;align-items:center;border-radius:16px}.card-portrait .portrait_widget .video-icon{opacity:1;color:#ef951e;width:15px;height:15px;font-size:15px}.card-portrait .portrait_widget .portrait-category{color:rgba(0,0,0,.6)!important;font-size:.75rem;opacity:1;font-family:Lato-Regular;font-weight:400;font-style:normal;letter-spacing:.25px;text-align:left;line-height:20px}.card-portrait .progress-wrapper .progress-block{width:60%}.card-portrait .progress-wrapper .progress-block .completed-time{color:#ef951e;display:flex;padding:8px 0}.card-portrait .progress-wrapper .progress-block .completed-time mat-icon{width:1rem;height:1rem;font-size:1rem}.card-portrait .progress-wrapper .progress-block .completed-time span{opacity:1;color:rgba(0,0,0,.87);font-family:Lato-Regular;font-size:.75rem;font-weight:400;font-style:normal;letter-spacing:.25px;text-align:left;line-height:16px}.card-portrait .progress-wrapper .progress-btn .resume-btn{opacity:1;color:#fff;font-family:Lato-Bold;font-size:14px;font-weight:700;font-style:normal;letter-spacing:.5px;text-align:left;line-height:20px;background:#1a4ca1;border-radius:63px;padding:6px 16px;border:none;width:100%;cursor:pointer}.card-portrait .progress-wrapper .progress-btn .resume-btn .textwrap{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:82px}.card-portrait .progress-wrapper .progress-btn .resume-btn:hover{background-color:#253379}.card-portrait .progress-bar-new{color:#ef951e!important;height:10px;border-radius:5px}.card-portrait .rating-session mat-icon{font-size:20px;height:20px;width:20px;color:#ef951e}.card-portrait .rating-session .rating-number{font-size:14px}.card-portrait .rating-session .most-enrolled-text{font-size:10px;font-weight:400;padding:4px;background:#ffea9e;border-radius:4px;line-height:12px}.card-portrait .right-corner-portrait{right:8px;bottom:8px}.card-portrait-clickable{min-height:146px!important}.card-portrait-clickable .right-corner-portrait{right:8px;bottom:8px}.card-portrait-clickable:hover{transform:scale(1.02)}.course_widget{margin-top:10px}.course_widget .mat-icon{vertical-align:middle;color:#ef951e!important}.course_widget .course_v2{border:1px solid #ef951e;padding:4px 8px;align-items:end;border-radius:16px}.course_widget .main_icon{font-size:16px;width:16px;height:16px}.rating-session mat-icon{font-size:16px;height:16px;width:12px;padding-right:3px;color:#ef951e}.rating-session span{font-size:11px}.rating-session .most-enrolled-text{padding:0 8px;background:#ffea9e;border-radius:4px}.duration-box{background:#000;position:absolute;border:none;display:flex;align-items:center;padding:4px;border-radius:4px}.duration-box.right-corner{right:4px;bottom:4px}.duration-box .mat-icon{vertical-align:middle;color:#fff!important;height:14px!important;width:14px!important;font-size:14px}.duration-box .duration{font:700 12px/16px Lato;display:inline-block;margin:0;padding:0}@media only screen and (max-width:768px){.card-portrait{width:calc(100vw - 66px)}.card-wide-v2{min-height:356px}.card-wide-v2 .imageholder img{border-radius:12px 12px 0 0!important}.cbpwidth{width:calc(100vw - 100px)}}.cbp-mark{border-radius:12px 0;opacity:1;background-image:linear-gradient(90deg,rgba(0,0,0,.6) 0,rgba(0,0,0,0) 100%);position:absolute;top:0;padding:8px}.cbp-mark p{opacity:1;background-color:#fff;padding:4px;opacity:1;color:#1b2133;font-family:Lato-Regular;font-size:10px;font-weight:400;font-style:Regular;letter-spacing:.5px;text-align:left;line-height:12px;margin-bottom:0}.cbpwidth{width:340px}.cbp-plan{border-radius:4px;opacity:1;background-color:#1b4ca1;top:4px;left:4px;opacity:1;color:rgba(255,255,255,.95);font-family:Lato-Bold;font-size:12px;font-weight:700;font-style:normal;letter-spacing:.25px;text-align:center;line-height:16px;padding:4px}.cbp-info{opacity:1;color:#fff;font-family:Lato-Regular;font-size:10px;font-weight:400;font-style:normal;letter-spacing:.5px;text-align:left;line-height:12px;padding:2px}.cbp-danger{border-radius:2px;border:1px solid rgba(0,0,0,.08);background-color:#d13924!important;color:#fff!important;opacity:1}.cbp-success{border-radius:2px;border:1px solid #1d8922;background-color:#1d8922!important;color:#fff!important;opacity:1}.cbp-warning{border-radius:2px;border:1px solid #ef951e;background-color:#ef951e!important;color:#fff!important;opacity:1}"]
|
|
8552
8552
|
}] }
|
|
8553
8553
|
];
|
|
@@ -9683,7 +9683,7 @@ class CardPortraitExtComponent {
|
|
|
9683
9683
|
CardPortraitExtComponent.decorators = [
|
|
9684
9684
|
{ type: Component, args: [{
|
|
9685
9685
|
selector: 'sb-uic-card-portrait-ext',
|
|
9686
|
-
template: "<ng-container *ngIf=\"!isCardLoading\">\n <mat-card class=\"card-standard-container mr-5 padding-remove cursor-pointer {{widgetData?.cardCustomeClass}}\" [ngClass]=\"{\n greyOut:\n widgetData?.deletedMode === 'greyOut' && !isLiveOrMarkForDeletion\n ? true\n : widgetData?.intranetMode === 'greyOut' && showIntranetContent\n }\" (click)=\"(showIntranetContent || !isLiveOrMarkForDeletion) && showSnackbar()\">\n <div class=\"display-contents\" [ngClass]=\"{\n disableClick:\n widgetData?.deletedMode === 'greyOut' && !isLiveOrMarkForDeletion\n ? true\n : widgetData?.intranetMode === 'greyOut' && showIntranetContent\n }\">\n <ng-container *ngIf=\"widgetData?.content\">\n <a (click)=\"getRedirectUrlData(widgetData?.content); $event.stopPropagation()\"\n role=\"link\" i18n-aria-label>\n <ng-container *ngIf=\"!isCardFlipped\">\n <div class=\"status-danger\" role=\"note\" i18n-aria-label aria-label=\"Content expired or deleted\" i18n-matTooltip\n matTooltip=\"Content may be expired or deleted\" *ngIf=\"!isLiveOrMarkForDeletion\"></div>\n <div class=\"status-danger\" role=\"note\" i18n-aria-label aria-label=\"Intranet content\" i18n-matTooltip\n matTooltip=\"Available only in Company's network\"\n *ngIf=\"widgetData?.intranetMode === 'greyOut' && showIntranetContent\"></div>\n <button *ngIf=\"showFlip\" class=\"detail-button ws-mat-primary-lite-background-op30\" mat-icon-button\n (click)=\"isCardFlipped = true\" aria-label=\"Details\" i18n-aria-label=\"Details | Click to see details\">\n <mat-icon>flip_to_back</mat-icon>\n </button>\n <mat-card-content class=\"min-top\">\n <div style=\"position: relative; z-index: 1;\">\n <ng-container *ngIf=\"widgetData?.content?.posterImage\">\n <img mat-card-image [src]=\"widgetData.content.posterImage | pipePublicURL\" loading=\"lazy\"\n class=\"card-img ws-mat-primary-lite-background margin-remove\" [wsUtilsDefaultThumbnail]=\"defaultThumbnail\"\n [alt]=\"widgetData.content.name\" />\n </ng-container>\n <ng-container *ngIf=\"!widgetData.content.posterImage\">\n <ng-container *ngIf=\"widgetData.content.appIcon; else defaultImg\">\n <img mat-card-image [src]=\"widgetData.content.appIcon \" loading=\"lazy\"\n class=\"card-img ws-mat-primary-lite-background margin-remove\" [wsUtilsDefaultThumbnail]=\"defaultThumbnail\"\n [alt]=\"widgetData?.content?.name\" />\n </ng-container>\n <ng-template #defaultImg>\n <img mat-card-image [src]=\"defaultThumbnail\" loading=\"lazy\"\n class=\"card-img ws-mat-primary-lite-background margin-remove\"\n [alt]=\"widgetData?.content?.name\" />\n </ng-template>\n </ng-container>\n <div class=\"source-div\" style=\"display: none;\">\n <img [src]=\"widgetData?.content.creatorLogo\" class=\"source-icon\" [wsUtilsDefaultThumbnail]=\"defaultSLogo\"\n [alt]=\"(widgetData?.content?.sourceName + '_' + widgetData.content?.contentId)\" />\n </div>\n <ng-container *ngIf=\"widgetData?.content?.cbPlanEndDate\">\n <div class=\"cbp-mark\">\n <span>{{widgetData?.content?.cbPlanEndDate | date: 'd MMM, y'}}</span>\n </div>\n </ng-container>\n <ng-container *ngIf=\"cbPlanMapData && cbPlanMapData[widgetData?.content?.contentId]\">\n <ng-container [ngTemplateOutlet]=\"cbpPlan\" [ngTemplateOutletContext]=\"{data: {\n cbpData: cbPlanMapData[widgetData?.content?.contentId]\n }}\"></ng-container>\n </ng-container>\n <div class=\"duration-box right-corner\" *ngIf=\"widgetData?.content?.duration > 0\">\n <mat-icon class=\"mat-icon main_icon mr-1\">access_time</mat-icon>\n <span class=\" ws-mat-white-text duration\">\n {{ (widgetData?.content?.duration || 120)| pipeDurationTransform: 'hms' }}\n </span>\n </div>\n <div class=\"duration-box right-corner\" *ngIf=\"widgetData?.content?.programDuration > 0\">\n <mat-icon class=\"mat-icon main_icon mr-1\">access_time</mat-icon>\n <span class=\" ws-mat-white-text duration\">\n {{widgetData?.content?.programDuration}} {{widgetData?.content?.programDuration === 1 ? 'day' : 'days'}}\n </span>\n </div>\n </div>\n <div class=\"padding-m\">\n <div class=\"course_widget flex margin-remove\">\n <div class=\"flex flex-end course_v2\">\n <mat-icon class=\"mat-icon main_icon ws-mat-default-text margin-right-xs\">video_library</mat-icon>\n <sb-uic-display-content-type [useTranslation]=\"false\" i18n-title title=\"Content Type\" *ngIf=\"widgetData.content?.topic\"\n class=\"ws-mat-black60-text font-normal mat-caption \" [displayContentType]=\"widgetData?.content?.primaryCategory==='Course Unit'\n ?'Module'\n :widgetData?.content?.primaryCategory? widgetData?.content?.primaryCategory : 'Course'\">\n \n </sb-uic-display-content-type>\n </div>\n </div>\n <div [id]=\"'m-c-'+ widgetData.content?.contentId\"\n class=\"mat-subheading-1 title-text ws-mat-text-block-fade-gradient\">\n {{ widgetData.content.name }}\n </div>\n <div class=\"flex w-full flex-wrap flex-middle\">\n <div class=\"course_logo_box\">\n <img [src]=\"widgetData.content.creatorLogo | pipePublicURL \" class=\"source-icon\" [wsUtilsDefaultThumbnail]=\"defaultSLogo\"\n [alt]=\"(widgetData.content.sourceName + '_' + widgetData.content.contentId)\" />\n </div>\n <!-- <span class=\"org-text\">{{'cardcontentv2.by' | translate}} -->\n <span class=\"org-text\">By {{ (widgetData?.content?.organisation && widgetData?.content?.organisation[0]) ? widgetData?.content?.organisation[0] : 'Karmayogi Bharat' }}</span>\n </div>\n <div class=\"flex flex-middle rating-session margin-top-m\">\n <div class=\"flex flex-middle\" *ngIf=\"widgetData?.content?.avgRating\">\n <mat-icon class=\"mr-1\">star</mat-icon>\n <span>{{widgetData.content.avgRating}}</span>\n </div>\n <!-- <span class=\"most-enrolled-text margin-left-m\">{{ 'cardcontentv2.mostEnrolled' | translate }}</span> -->\n <ng-container *ngIf=\"widgetData?.content?.additionalTags && widgetData?.content?.additionalTags.includes('mostEnrolled')\">\n <span class=\"most-enrolled-text margin-left-xs\">\n <!-- {{ 'cardcontentv2.mostEnrolled' | translate }} -->\n </span>\n </ng-container>\n <ng-container *ngIf=\"widgetData?.content?.additionalTags && widgetData?.content?.additionalTags.includes('mostTrending')\">\n <span class=\"most-enrolled-text margin-left-xs\">\n <!-- {{ 'cardcontentv2.mostTrending' | translate }} -->\n </span>\n </ng-container>\n </div>\n </div>\n </mat-card-content>\n </ng-container>\n <ng-container *ngIf=\"isCardFlipped\">\n <div class=\"flex items-center\">\n <!-- <h2 class=\"mat-subheading-2 flex-1 min-w-0 margin-remove-bottom\" i18n>{{'cardcontentv2.reason' | translate}}</h2> -->\n <button mat-icon-button (click)=\"isCardFlipped = false\">\n <mat-icon>close</mat-icon>\n </button>\n </div>\n <p class=\"text-justify mat-body-1\">\n {{ widgetData.content.reason }}\n </p>\n </ng-container>\n </a>\n </ng-container>\n </div>\n </mat-card>\n </ng-container>\n \n <ng-container *ngIf=\"isCardLoading\">\n <mat-card class=\"card-standard-container mr-5 padding-remove\" >\n <div class=\"display-contents\" >\n <ng-container *ngIf=\"!isCardFlipped\">\n <mat-card-content class=\"min-top\">\n <div style=\"position: relative; z-index: 1;\">\n <ng-container>\n <sb-uic-skeleton-loader [width]=\"'100%'\" [height]=\"'140px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </ng-container>\n </div>\n <div class=\"padding-m\">\n <div class=\"course_widget flex margin-remove\">\n <div class=\"flex flex-end\">\n <sb-uic-skeleton-loader [width]=\"'65px'\" [height]=\"'16px'\" [bindingClass]=\"'flex rounded br-8'\"></sb-uic-skeleton-loader>\n </div>\n </div>\n <div class=\"mat-subheading-1 title-text ws-mat-text-block-fade-gradient\">\n <sb-uic-skeleton-loader [width]=\"'100%'\" [height]=\"'16px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n <sb-uic-skeleton-loader [width]=\"'111px'\" [height]=\"'16px'\" [bindingClass]=\"'flex rounded margin-top-s'\"></sb-uic-skeleton-loader>\n </div>\n <div class=\"flex w-full flex-wrap flex-middle margin-top-m\">\n <div class=\"\">\n <sb-uic-skeleton-loader [width]=\"'28px'\" [height]=\"'28px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </div>\n <span class=\"org-text\"> <sb-uic-skeleton-loader [width]=\"'111px'\" [height]=\"'16px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader></span>\n </div>\n <div class=\"flex flex-middle rating-session margin-top-m\">\n <div class=\"flex flex-middle\">\n <sb-uic-skeleton-loader [width]=\"'45px'\" [height]=\"'12px'\" [bindingClass]=\"'flex rounded margin-top-m'\"></sb-uic-skeleton-loader>\n </div>\n </div>\n </div>\n </mat-card-content>\n </ng-container>\n </div>\n </mat-card>\n </ng-container>\n \n <ng-template #cbpPlan let-data=\"data\">\n <div class=\"cbp-mark left-0 border-top-radius\">\n <p *ngIf=\"data.cbpData.planDuration === acbpConstants?.UPCOMING\" class=\"cbp-warning\">{{data.cbpData.endDate | date: 'd MMM, y'}}</p>\n <p *ngIf=\"data.cbpData.planDuration === acbpConstants?.SUCCESS\" class=\"cbp-success\">{{data.cbpData.endDate | date: 'd MMM, y'}}</p>\n <p *ngIf=\"data.cbpData.planDuration === acbpConstants?.OVERDUE\" class=\"cbp-danger\">{{'OverDue' }}</p>\n </div>\n </ng-template>",
|
|
9686
|
+
template: "<ng-container *ngIf=\"!isCardLoading\">\n <mat-card class=\"card-standard-container mr-5 padding-remove cursor-pointer {{widgetData?.cardCustomeClass}}\" [ngClass]=\"{\n greyOut:\n widgetData?.deletedMode === 'greyOut' && !isLiveOrMarkForDeletion\n ? true\n : widgetData?.intranetMode === 'greyOut' && showIntranetContent\n }\" (click)=\"(showIntranetContent || !isLiveOrMarkForDeletion) && showSnackbar()\">\n <div class=\"display-contents\" [ngClass]=\"{\n disableClick:\n widgetData?.deletedMode === 'greyOut' && !isLiveOrMarkForDeletion\n ? true\n : widgetData?.intranetMode === 'greyOut' && showIntranetContent\n }\">\n <ng-container *ngIf=\"widgetData?.content\">\n <a (click)=\"getRedirectUrlData(widgetData?.content); $event.stopPropagation()\"\n role=\"link\" i18n-aria-label>\n <ng-container *ngIf=\"!isCardFlipped\">\n <div class=\"status-danger\" role=\"note\" i18n-aria-label aria-label=\"Content expired or deleted\" i18n-matTooltip\n matTooltip=\"Content may be expired or deleted\" *ngIf=\"!isLiveOrMarkForDeletion\"></div>\n <div class=\"status-danger\" role=\"note\" i18n-aria-label aria-label=\"Intranet content\" i18n-matTooltip\n matTooltip=\"Available only in Company's network\"\n *ngIf=\"widgetData?.intranetMode === 'greyOut' && showIntranetContent\"></div>\n <button *ngIf=\"showFlip\" class=\"detail-button ws-mat-primary-lite-background-op30\" mat-icon-button\n (click)=\"isCardFlipped = true\" aria-label=\"Details\" i18n-aria-label=\"Details | Click to see details\">\n <mat-icon>flip_to_back</mat-icon>\n </button>\n <mat-card-content class=\"min-top\">\n <div style=\"position: relative; z-index: 1;\">\n <ng-container *ngIf=\"widgetData?.content?.posterImage\">\n <img mat-card-image [src]=\"widgetData.content.posterImage | pipePublicURL\" loading=\"lazy\"\n class=\"card-img ws-mat-primary-lite-background margin-remove\" [wsUtilsDefaultThumbnail]=\"defaultThumbnail\"\n [alt]=\"widgetData.content.name\" />\n </ng-container>\n <ng-container *ngIf=\"!widgetData.content.posterImage\">\n <ng-container *ngIf=\"widgetData.content.appIcon; else defaultImg\">\n <img mat-card-image [src]=\"widgetData.content.appIcon \" loading=\"lazy\"\n class=\"card-img ws-mat-primary-lite-background margin-remove\" [wsUtilsDefaultThumbnail]=\"defaultThumbnail\"\n [alt]=\"widgetData?.content?.name\" />\n </ng-container>\n <ng-template #defaultImg>\n <img mat-card-image [src]=\"defaultThumbnail\" loading=\"lazy\"\n class=\"card-img ws-mat-primary-lite-background margin-remove\"\n [alt]=\"widgetData?.content?.name\" />\n </ng-template>\n </ng-container>\n <div class=\"source-div\" style=\"display: none;\">\n <img [src]=\"widgetData?.content.creatorLogo\" class=\"source-icon\" [wsUtilsDefaultThumbnail]=\"defaultSLogo\"\n [alt]=\"(widgetData?.content?.sourceName + '_' + widgetData.content?.contentId)\" />\n </div>\n <ng-container *ngIf=\"widgetData?.content?.cbPlanEndDate\">\n <div class=\"cbp-mark\">\n <span>{{widgetData?.content?.cbPlanEndDate | date: 'd MMM, y'}}</span>\n </div>\n </ng-container>\n <ng-container *ngIf=\"cbPlanMapData && cbPlanMapData[widgetData?.content?.contentId] && cbPlanMapData[widgetData?.content?.identifier]?.contentStatus < 2 \">\n <ng-container [ngTemplateOutlet]=\"cbpPlan\" [ngTemplateOutletContext]=\"{data: {\n cbpData: cbPlanMapData[widgetData?.content?.contentId]\n }}\"></ng-container>\n </ng-container>\n <div class=\"duration-box right-corner\" *ngIf=\"widgetData?.content?.duration > 0\">\n <mat-icon class=\"mat-icon main_icon mr-1\">access_time</mat-icon>\n <span class=\" ws-mat-white-text duration\">\n {{ (widgetData?.content?.duration || 120)| pipeDurationTransform: 'hms' }}\n </span>\n </div>\n <div class=\"duration-box right-corner\" *ngIf=\"widgetData?.content?.programDuration > 0\">\n <mat-icon class=\"mat-icon main_icon mr-1\">access_time</mat-icon>\n <span class=\" ws-mat-white-text duration\">\n {{widgetData?.content?.programDuration}} {{widgetData?.content?.programDuration === 1 ? 'day' : 'days'}}\n </span>\n </div>\n </div>\n <div class=\"padding-m\">\n <div class=\"course_widget flex margin-remove\">\n <div class=\"flex flex-end course_v2\">\n <mat-icon class=\"mat-icon main_icon ws-mat-default-text margin-right-xs\">video_library</mat-icon>\n <sb-uic-display-content-type [useTranslation]=\"false\" i18n-title title=\"Content Type\" *ngIf=\"widgetData.content?.topic\"\n class=\"ws-mat-black60-text font-normal mat-caption \" [displayContentType]=\"widgetData?.content?.primaryCategory==='Course Unit'\n ?'Module'\n :widgetData?.content?.primaryCategory? widgetData?.content?.primaryCategory : 'Course'\">\n \n </sb-uic-display-content-type>\n </div>\n </div>\n <div [id]=\"'m-c-'+ widgetData.content?.contentId\"\n class=\"mat-subheading-1 title-text ws-mat-text-block-fade-gradient\">\n {{ widgetData.content.name }}\n </div>\n <div class=\"flex w-full flex-wrap flex-middle\">\n <div class=\"course_logo_box\">\n <img [src]=\"widgetData.content.creatorLogo | pipePublicURL \" class=\"source-icon\" [wsUtilsDefaultThumbnail]=\"defaultSLogo\"\n [alt]=\"(widgetData.content.sourceName + '_' + widgetData.content.contentId)\" />\n </div>\n <!-- <span class=\"org-text\">{{'cardcontentv2.by' | translate}} -->\n <span class=\"org-text\">By {{ (widgetData?.content?.organisation && widgetData?.content?.organisation[0]) ? widgetData?.content?.organisation[0] : 'Karmayogi Bharat' }}</span>\n </div>\n <div class=\"flex flex-middle rating-session margin-top-m\">\n <div class=\"flex flex-middle\" *ngIf=\"widgetData?.content?.avgRating\">\n <mat-icon class=\"mr-1\">star</mat-icon>\n <span>{{widgetData.content.avgRating}}</span>\n </div>\n <!-- <span class=\"most-enrolled-text margin-left-m\">{{ 'cardcontentv2.mostEnrolled' | translate }}</span> -->\n <ng-container *ngIf=\"widgetData?.content?.additionalTags && widgetData?.content?.additionalTags.includes('mostEnrolled')\">\n <span class=\"most-enrolled-text margin-left-xs\">\n <!-- {{ 'cardcontentv2.mostEnrolled' | translate }} -->\n </span>\n </ng-container>\n <ng-container *ngIf=\"widgetData?.content?.additionalTags && widgetData?.content?.additionalTags.includes('mostTrending')\">\n <span class=\"most-enrolled-text margin-left-xs\">\n <!-- {{ 'cardcontentv2.mostTrending' | translate }} -->\n </span>\n </ng-container>\n </div>\n </div>\n </mat-card-content>\n </ng-container>\n <ng-container *ngIf=\"isCardFlipped\">\n <div class=\"flex items-center\">\n <!-- <h2 class=\"mat-subheading-2 flex-1 min-w-0 margin-remove-bottom\" i18n>{{'cardcontentv2.reason' | translate}}</h2> -->\n <button mat-icon-button (click)=\"isCardFlipped = false\">\n <mat-icon>close</mat-icon>\n </button>\n </div>\n <p class=\"text-justify mat-body-1\">\n {{ widgetData.content.reason }}\n </p>\n </ng-container>\n </a>\n </ng-container>\n </div>\n </mat-card>\n </ng-container>\n \n <ng-container *ngIf=\"isCardLoading\">\n <mat-card class=\"card-standard-container mr-5 padding-remove\" >\n <div class=\"display-contents\" >\n <ng-container *ngIf=\"!isCardFlipped\">\n <mat-card-content class=\"min-top\">\n <div style=\"position: relative; z-index: 1;\">\n <ng-container>\n <sb-uic-skeleton-loader [width]=\"'100%'\" [height]=\"'140px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </ng-container>\n </div>\n <div class=\"padding-m\">\n <div class=\"course_widget flex margin-remove\">\n <div class=\"flex flex-end\">\n <sb-uic-skeleton-loader [width]=\"'65px'\" [height]=\"'16px'\" [bindingClass]=\"'flex rounded br-8'\"></sb-uic-skeleton-loader>\n </div>\n </div>\n <div class=\"mat-subheading-1 title-text ws-mat-text-block-fade-gradient\">\n <sb-uic-skeleton-loader [width]=\"'100%'\" [height]=\"'16px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n <sb-uic-skeleton-loader [width]=\"'111px'\" [height]=\"'16px'\" [bindingClass]=\"'flex rounded margin-top-s'\"></sb-uic-skeleton-loader>\n </div>\n <div class=\"flex w-full flex-wrap flex-middle margin-top-m\">\n <div class=\"\">\n <sb-uic-skeleton-loader [width]=\"'28px'\" [height]=\"'28px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </div>\n <span class=\"org-text\"> <sb-uic-skeleton-loader [width]=\"'111px'\" [height]=\"'16px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader></span>\n </div>\n <div class=\"flex flex-middle rating-session margin-top-m\">\n <div class=\"flex flex-middle\">\n <sb-uic-skeleton-loader [width]=\"'45px'\" [height]=\"'12px'\" [bindingClass]=\"'flex rounded margin-top-m'\"></sb-uic-skeleton-loader>\n </div>\n </div>\n </div>\n </mat-card-content>\n </ng-container>\n </div>\n </mat-card>\n </ng-container>\n \n <ng-template #cbpPlan let-data=\"data\">\n <div class=\"cbp-mark left-0 border-top-radius\">\n <p *ngIf=\"data.cbpData.planDuration === acbpConstants?.UPCOMING\" class=\"cbp-warning\">{{data.cbpData.endDate | date: 'd MMM, y'}}</p>\n <p *ngIf=\"data.cbpData.planDuration === acbpConstants?.SUCCESS\" class=\"cbp-success\">{{data.cbpData.endDate | date: 'd MMM, y'}}</p>\n <p *ngIf=\"data.cbpData.planDuration === acbpConstants?.OVERDUE\" class=\"cbp-danger\">{{'OverDue' }}</p>\n </div>\n </ng-template>",
|
|
9687
9687
|
styles: [".course_widget{margin-top:10px}.course_widget .mat-icon{vertical-align:middle;color:#ef951e!important}.course_widget .course_v2{border:1px solid #ef951e;padding:4px 8px;align-items:end;border-radius:16px}.course_widget .main_icon{font-size:16px;width:16px;height:16px}.rating-session mat-icon{font-size:16px;height:16px;width:12px;padding-right:3px;color:#ef951e}.rating-session span{font-size:11px}.rating-session .most-enrolled-text{padding:0 8px;background:#ffea9e;border-radius:4px}.card-standard-container{position:relative;width:245px;min-height:346px;border-radius:8px;box-sizing:border-box;box-shadow:0 10px 30px rgba(153,153,153,.2);overflow:hidden;height:346px;margin:20px 8px}.card-standard-container .progress-bar{width:101%;margin-left:-15px;display:flex;margin-top:0;background:bisque;position:absolute;bottom:0}.card-standard-container ::ng-deep .mat-progress-bar{height:8px!important}.card-standard-container .icon_text{font-size:12px;line-height:16px;text-transform:uppercase}.card-standard-container .course_logo_box{width:38px;height:38px;background:#fff;border-radius:8px;box-sizing:border-box;box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12)}.card-standard-container .course_logo_box img{height:28px;width:28px;padding:5px;display:inline-block}.card-standard-container .course_logo_box p{display:inline-block;vertical-align:top}.card-standard-container .org-text{font-size:12px;font-weight:400;width:75%;padding-left:10px;word-break:break-all;white-space:initial;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical}.card-standard-container .source-div{position:relative;top:100px;background:#fff;z-index:3;border:1px solid #dedfe0;min-width:72px;min-height:72px;max-width:72px;max-height:72px;display:flex;border-radius:8px}.card-standard-container .source-div .source-icon{border-radius:8px;display:block;margin:auto;max-width:58px;max-height:-webkit-fill-available}.card-standard-container mat-card-content{background:#fff}.card-standard-container .card-img{min-width:245px;max-height:140px;min-height:140px;display:block;-o-object-fit:fill;object-fit:fill;border-top-left-radius:8px;border-top-right-radius:8px;width:100%}.card-standard-container .mat-subheading-1{font:600 14px/24px Montserrat}.card-standard-container .complexity{padding-top:70px;display:flex;font-size:14px;line-height:21px;padding-bottom:10px}.card-standard-container .complexity .mode-tag{border-radius:5px;order:2;margin-left:auto;color:#fff;font-size:10px}.card-standard-container .complexity .duration{display:flex;margin-left:auto;order:3;font-weight:700}.card-standard-container .complexity .time-text{margin:0 5px 0 6px;font-weight:700}.card-standard-container .basic{margin:auto 0}.card-standard-container .title-text{word-break:break-all;white-space:initial;margin:8px 0;position:relative;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;min-height:48px}.card-standard-container .description-text{position:relative;overflow:hidden;height:42px;white-space:normal;text-overflow:ellipsis}.duration-box{background:#000;position:absolute;border:none;display:flex;align-items:center;padding:4px;border-radius:4px}.duration-box.right-corner{right:4px;bottom:4px}.duration-box .mat-icon{vertical-align:middle;color:#fff!important;height:14px!important;width:14px!important;font-size:14px}.duration-box .duration{font:700 12px/16px Lato;display:inline-block;margin:0;padding:0}.width-238{width:238px!important}.cbp-mark{border-radius:12px 0;opacity:1;background-image:linear-gradient(90deg,rgba(0,0,0,.6) 0,rgba(0,0,0,0) 100%);position:absolute;top:0;padding:8px}.cbp-mark p{opacity:1;background-color:#fff;padding:4px;opacity:1;color:#1b2133;font-family:Lato-Regular;font-size:10px;font-weight:400;font-style:Regular;letter-spacing:.5px;text-align:left;line-height:12px;margin-bottom:0}.cbpwidth{width:340px}.cbp-plan{border-radius:4px;opacity:1;background-color:#1b4ca1;top:4px;left:4px;opacity:1;color:rgba(255,255,255,.95);font-family:Lato-Bold;font-size:12px;font-weight:700;font-style:normal;letter-spacing:.25px;text-align:center;line-height:16px;padding:4px}.cbp-info{opacity:1;color:#fff;font-family:Lato-Regular;font-size:10px;font-weight:400;font-style:normal;letter-spacing:.5px;text-align:left;line-height:12px;padding:2px}.cbp-danger{border-radius:2px;border:1px solid rgba(0,0,0,.08);background-color:#d13924!important;color:#fff!important;opacity:1}.cbp-success{border-radius:2px;border:1px solid #1d8922;background-color:#1d8922!important;color:#fff!important;opacity:1}.cbp-warning{border-radius:2px;border:1px solid #ef951e;background-color:#ef951e!important;color:#fff!important;opacity:1}"]
|
|
9688
9688
|
}] }
|
|
9689
9689
|
];
|
|
@@ -10372,7 +10372,7 @@ class CardProgressPortraitLibComponent {
|
|
|
10372
10372
|
CardProgressPortraitLibComponent.decorators = [
|
|
10373
10373
|
{ type: Component, args: [{
|
|
10374
10374
|
selector: 'sb-uic-card-progress-portrait-lib',
|
|
10375
|
-
template: "<ng-container *ngIf=\"!isCardLoading\">\n <mat-card class=\"card-portrait card-progress-portrait-lib cursor-pointer\" [ngClass]=\"widgetData?.cardCustomeClass ? widgetData?.cardCustomeClass : ''\" (click)=\"raiseTelemetry();getRedirectUrlData(widgetData?.content); $event.stopPropagation()\" >\n <div class=\"course_widget portrait_widget flex margin-bottom-xs\">\n <div class=\"flex flex-end flex-middle course_port\">\n <mat-icon class=\"mat-icon main_icon ws-mat-default-text margin-right-xs\">video_library</mat-icon>\n <sb-uic-display-content-type i18n-title title=\"Content Type\" *ngIf=\"widgetData?.content?.primaryCategory\"\n class=\"ws-mat-black60-text font-normal mat-caption \" [displayContentType]=\"widgetData?.content?.primaryCategory==='Course Unit'\n ?'Module'\n :widgetData?.content?.primaryCategory\">\n </sb-uic-display-content-type>\n </div>\n </div>\n <div class=\"flex\">\n <div class=\"margin-right-s\">\n <ng-container *ngIf=\"widgetData?.content?.posterImage\">\n <div class=\" img-block-portrait position-relative\">\n <img mat-card-image [src]=\"widgetData?.content?.posterImage | pipePublicURL\" loading=\"lazy\"\n class=\"card-image ws-mat-primary-lite-background margin-remove\" [wsUtilsDefaultThumbnail]=\"defaultThumbnail\"\n [alt]=\"widgetData?.content?.name\" />\n <div class=\"duration-box right-corner-portrait\" *ngIf=\"widgetData?.content?.duration > 0\">\n <mat-icon class=\"mat-icon main_icon mr-1\">access_time</mat-icon>\n <span class=\" ws-mat-white-text duration\">\n {{ (widgetData?.content?.duration || 120)| pipeDurationTransform: 'hms' }}\n </span>\n </div>\n <div class=\"duration-box right-corner-portrait\" *ngIf=\"widgetData?.content?.programDuration > 0\">\n <mat-icon class=\"mat-icon main_icon mr-1\">access_time</mat-icon>\n <span class=\" ws-mat-white-text duration\">\n {{widgetData?.content?.programDuration}} {{widgetData?.content?.programDuration === 1 ? 'day' : 'days'}}\n </span>\n </div>\n <ng-container *ngIf=\"cbPlanMapData && cbPlanMapData[widgetData?.content?.identifier]\">\n <ng-container [ngTemplateOutlet]=\"cbpPlan\" [ngTemplateOutletContext]=\"{data: {\n cbpData: cbPlanMapData[widgetData?.content?.identifier]\n }}\"></ng-container>\n </ng-container>\n </div>\n </ng-container>\n <ng-container *ngIf=\"!widgetData?.content?.posterImage\">\n <ng-container *ngIf=\"widgetData?.content?.appIcon; else defaultImg\">\n <img mat-card-image [src]=\"widgetData?.content?.appIcon | pipePublicURL\" loading=\"lazy\"\n class=\"card-image ws-mat-primary-lite-background margin-remove\" [wsUtilsDefaultThumbnail]=\"defaultThumbnail\"\n [alt]=\"widgetData?.content?.name\" />\n </ng-container>\n <ng-template #defaultImg>\n <img mat-card-image [src]=\"defaultThumbnail\" loading=\"lazy\"\n class=\"card-image ws-mat-primary-lite-background margin-remove\"\n [alt]=\"widgetData?.content?.name\" />\n </ng-template>\n </ng-container>\n </div>\n <div class=\"width-1-1\">\n <div [id]=\"'m-c-'+ widgetData?.content?.identifier\"\n class=\"portrait-subheading mat-subheading-2 title-text\">\n {{ widgetData?.content?.name }}\n </div>\n <div class=\"flex w-full flex-middle\">\n <div class=\"portrait_course_logo_box margin-right-xs\">\n <img [src]=\"widgetData?.content?.creatorLogo | pipePublicURL \" class=\"source-icon\" loading=\"lazy\" [wsUtilsDefaultThumbnail]=\"defaultSLogo\"\n [alt]=\"(widgetData?.content?.sourceName + '_' + widgetData?.content?.identifier)\" />\n </div>\n <span class=\"portrait-org-name font-normal mat-caption\">{{'cardcontentv2.by' | translate}} {{ (widgetData?.content?.organisation && widgetData?.content?.organisation[0]) ? widgetData?.content?.organisation[0] : 'Karmayogi Bharat' }}</span>\n </div>\n\n </div>\n </div>\n <ng-container *ngIf=\"widgetData?.content?.completionPercentage < 100\">\n <div class=\"flex flex-align-end progress-wrapper flex-between\" >\n <div class=\"progress-block\" >\n <div class=\"completed-time\">\n <mat-icon class=\"mat-icon schedule margin-right-xs\">schedule</mat-icon>\n <span>{{widgetData?.content?.completionPercentage}}%</span>\n </div>\n <div>\n <ng-container *ngIf=\"widgetData?.content?.completionStatus < 2\">\n <sb-uic-content-progress class=\"progress-bar-new\" [customClassName]=\"'course-progress-bar'\" *ngIf=\"widgetData?.content?.identifier\"\n [contentId]=\"widgetData?.content?.identifier\" [progress]=\"widgetData?.content?.completionPercentage\"\n [progressType]=\"'percentage'\">\n </sb-uic-content-progress>\n </ng-container>\n </div>\n </div>\n <div class=\"progress-btn\">\n <button class=\"resume-btn flex flex-middle flex-between\" [routerLink]=\"['/app/toc/',widgetData?.content?.identifier,'overview']\"\n [queryParams]=\"{primaryCategory: widgetData?.content?.primaryCategory}\" [state]=\"widgetData?.stateData\" \n [matTooltipPosition]=\"'below'\"\n [matTooltipDisabled]=\"(!widgetData?.content?.completionPercentage ? translateLabels('start', 'cardcontentv2') : translateLabels('resume', 'cardcontentv2')).length < 11\"\n matTooltip=\"{{!widgetData?.content?.completionPercentage ? translateLabels('start', 'cardcontentv2') : translateLabels('resume', 'cardcontentv2')}}\">\n <span class=\"textwrap margin-right-xs\">\n {{!widgetData?.content?.completionPercentage ? translateLabels('start', 'cardcontentv2') : translateLabels('resume', 'cardcontentv2')}}</span>\n <img class=\"stats-icon\" height=\"20\" width=\"20\" src=\"/assets/icons/home/play.svg\">\n </button>\n </div>\n </div>\n </ng-container>\n <ng-container *ngIf=\"widgetData?.content?.completionPercentage === 100\">\n <div class=\"flex flex-align-end progress-wrapper flex-end mt-1\">\n <div class=\"progress-btn\">\n <button class=\"resume-btn flex flex-middle flex-between view-btn\" [ngClass]=\"{'disable-btn': downloadCertificateLoading || widgetData?.content?.issuedCertificates?.length === 0}\" (click)=\"!downloadCertificateLoading && downloadCertificate(widgetData?.content);$event.stopPropagation()\" \n [matTooltipPosition]=\"'below'\"\n [matTooltipDisabled]=\"(translateLabels('viewCertificate', 'cardcontentv2')).length < 11\"\n matTooltip=\"{{'cardcontentv2.viewCertificate' | translate }}\">\n <span class=\"margin-right-xs textwrap\">{{'cardcontentv2.viewCertificate' | translate }}</span>\n <img class=\"stats-icon\" *ngIf=\"!downloadCertificateLoading\" height=\"20\" width=\"20\" src=\"/assets/icons/home/eye-white.svg\">\n <div class=\"center flex flex-middle\" *ngIf=\"downloadCertificateLoading\">\n <mat-spinner strokeWidth=\"2\" stroke=\"'red'\" class=\"white-spinner\" [diameter]=\"16\"></mat-spinner>\n </div>\n </button>\n </div>\n </div>\n </ng-container>\n </mat-card>\n</ng-container>\n\n\n<ng-template #cbpPlan let-data=\"data\">\n <div class=\"cbp-mark left-0 border-top-radius\">\n <p *ngIf=\"data.cbpData.planDuration === acbpConstants?.UPCOMING\" class=\"cbp-warning\">{{data.cbpData.endDate | date: 'd MMM, y'}}</p>\n <p *ngIf=\"data.cbpData.planDuration === acbpConstants?.SUCCESS\" class=\"cbp-success\">{{data.cbpData.endDate | date: 'd MMM, y'}}</p>\n <p *ngIf=\"data.cbpData.planDuration === acbpConstants?.OVERDUE\" class=\"cbp-danger\">{{'OverDue' }}</p>\n </div>\n</ng-template>\n\n<ng-container *ngIf=\"isCardLoading\">\n <mat-card class=\"card-portrait\" [ngClass]=\"widgetData.cardCustomeClass ? widgetData.cardCustomeClass : ''\">\n <div class=\"margin-bottom-xs\">\n <ng-container>\n <sb-uic-skeleton-loader [width]=\"'147px'\" [height]=\"'26px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </ng-container>\n </div>\n <div class=\"flex\">\n <div class=\"margin-right-s\">\n <ng-container>\n <sb-uic-skeleton-loader [width]=\"'147px'\" [height]=\"'98px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </ng-container>\n </div>\n <div class=\"width-1-1\">\n <div class=\"portrait-subheading title-text\">\n <sb-uic-skeleton-loader [bindingClass]=\"'flex rounded width-1-1'\"></sb-uic-skeleton-loader>\n </div>\n <div class=\"flex w-full flex-wrap flex-middle\">\n <div class=\" margin-right-xs\">\n <sb-uic-skeleton-loader [width]=\"'24px'\" [height]=\"'24px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </div>\n <span class=\"\"><sb-uic-skeleton-loader [width]=\"'133px'\" [height]=\"'12px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader></span>\n </div>\n <div class=\"portrait_widget flex margin-top-xs\">\n <div class=\"flex flex-end flex-middle\">\n <sb-uic-skeleton-loader [width]=\"'65px'\" [height]=\"'12px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </div>\n </div>\n </div>\n </div>\n <div class=\"flex flex-align-end progress-wrapper flex-between\">\n <div class=\"progress-block\">\n <div class=\"completed-time\">\n <sb-uic-skeleton-loader [width]=\"'211px'\" [height]=\"'16px'\" [bindingClass]=\"'flex rounded margin-top-xs md:w-211'\"></sb-uic-skeleton-loader>\n </div>\n </div>\n <div class=\"progress-btn\">\n <sb-uic-skeleton-loader [width]=\"'117px'\" [height]=\"'32px'\" [bindingClass]=\"'flex rounded margin-top-xs'\"></sb-uic-skeleton-loader>\n </div>\n </div>\n </mat-card>\n</ng-container>",
|
|
10375
|
+
template: "<ng-container *ngIf=\"!isCardLoading\">\n <mat-card class=\"card-portrait card-progress-portrait-lib cursor-pointer\" [ngClass]=\"widgetData?.cardCustomeClass ? widgetData?.cardCustomeClass : ''\" (click)=\"raiseTelemetry();getRedirectUrlData(widgetData?.content); $event.stopPropagation()\" >\n <div class=\"course_widget portrait_widget flex margin-bottom-xs\">\n <div class=\"flex flex-end flex-middle course_port\">\n <mat-icon class=\"mat-icon main_icon ws-mat-default-text margin-right-xs\">video_library</mat-icon>\n <sb-uic-display-content-type i18n-title title=\"Content Type\" *ngIf=\"widgetData?.content?.primaryCategory\"\n class=\"ws-mat-black60-text font-normal mat-caption \" [displayContentType]=\"widgetData?.content?.primaryCategory==='Course Unit'\n ?'Module'\n :widgetData?.content?.primaryCategory\">\n </sb-uic-display-content-type>\n </div>\n </div>\n <div class=\"flex\">\n <div class=\"margin-right-s\">\n <ng-container *ngIf=\"widgetData?.content?.posterImage\">\n <div class=\" img-block-portrait position-relative\">\n <img mat-card-image [src]=\"widgetData?.content?.posterImage | pipePublicURL\" loading=\"lazy\"\n class=\"card-image ws-mat-primary-lite-background margin-remove\" [wsUtilsDefaultThumbnail]=\"defaultThumbnail\"\n [alt]=\"widgetData?.content?.name\" />\n <div class=\"duration-box right-corner-portrait\" *ngIf=\"widgetData?.content?.duration > 0\">\n <mat-icon class=\"mat-icon main_icon mr-1\">access_time</mat-icon>\n <span class=\" ws-mat-white-text duration\">\n {{ (widgetData?.content?.duration || 120)| pipeDurationTransform: 'hms' }}\n </span>\n </div>\n <div class=\"duration-box right-corner-portrait\" *ngIf=\"widgetData?.content?.programDuration > 0\">\n <mat-icon class=\"mat-icon main_icon mr-1\">access_time</mat-icon>\n <span class=\" ws-mat-white-text duration\">\n {{widgetData?.content?.programDuration}} {{widgetData?.content?.programDuration === 1 ? 'day' : 'days'}}\n </span>\n </div>\n <ng-container *ngIf=\"cbPlanMapData && cbPlanMapData[widgetData?.content?.identifier] && cbPlanMapData[widgetData?.content?.identifier]?.contentStatus < 2\">\n <ng-container [ngTemplateOutlet]=\"cbpPlan\" [ngTemplateOutletContext]=\"{data: {\n cbpData: cbPlanMapData[widgetData?.content?.identifier]\n }}\"></ng-container>\n </ng-container>\n </div>\n </ng-container>\n <ng-container *ngIf=\"!widgetData?.content?.posterImage\">\n <ng-container *ngIf=\"widgetData?.content?.appIcon; else defaultImg\">\n <img mat-card-image [src]=\"widgetData?.content?.appIcon | pipePublicURL\" loading=\"lazy\"\n class=\"card-image ws-mat-primary-lite-background margin-remove\" [wsUtilsDefaultThumbnail]=\"defaultThumbnail\"\n [alt]=\"widgetData?.content?.name\" />\n </ng-container>\n <ng-template #defaultImg>\n <img mat-card-image [src]=\"defaultThumbnail\" loading=\"lazy\"\n class=\"card-image ws-mat-primary-lite-background margin-remove\"\n [alt]=\"widgetData?.content?.name\" />\n </ng-template>\n </ng-container>\n </div>\n <div class=\"width-1-1\">\n <div [id]=\"'m-c-'+ widgetData?.content?.identifier\"\n class=\"portrait-subheading mat-subheading-2 title-text\">\n {{ widgetData?.content?.name }}\n </div>\n <div class=\"flex w-full flex-middle\">\n <div class=\"portrait_course_logo_box margin-right-xs\">\n <img [src]=\"widgetData?.content?.creatorLogo | pipePublicURL \" class=\"source-icon\" loading=\"lazy\" [wsUtilsDefaultThumbnail]=\"defaultSLogo\"\n [alt]=\"(widgetData?.content?.sourceName + '_' + widgetData?.content?.identifier)\" />\n </div>\n <span class=\"portrait-org-name font-normal mat-caption\">{{'cardcontentv2.by' | translate}} {{ (widgetData?.content?.organisation && widgetData?.content?.organisation[0]) ? widgetData?.content?.organisation[0] : 'Karmayogi Bharat' }}</span>\n </div>\n\n </div>\n </div>\n <ng-container *ngIf=\"widgetData?.content?.completionPercentage < 100\">\n <div class=\"flex flex-align-end progress-wrapper flex-between\" >\n <div class=\"progress-block\" >\n <div class=\"completed-time\">\n <mat-icon class=\"mat-icon schedule margin-right-xs\">schedule</mat-icon>\n <span>{{widgetData?.content?.completionPercentage}}%</span>\n </div>\n <div>\n <ng-container *ngIf=\"widgetData?.content?.completionStatus < 2\">\n <sb-uic-content-progress class=\"progress-bar-new\" [customClassName]=\"'course-progress-bar'\" *ngIf=\"widgetData?.content?.identifier\"\n [contentId]=\"widgetData?.content?.identifier\" [progress]=\"widgetData?.content?.completionPercentage\"\n [progressType]=\"'percentage'\">\n </sb-uic-content-progress>\n </ng-container>\n </div>\n </div>\n <div class=\"progress-btn\">\n <button class=\"resume-btn flex flex-middle flex-between\" [routerLink]=\"['/app/toc/',widgetData?.content?.identifier,'overview']\"\n [queryParams]=\"{primaryCategory: widgetData?.content?.primaryCategory}\" [state]=\"widgetData?.stateData\" \n [matTooltipPosition]=\"'below'\"\n [matTooltipDisabled]=\"(!widgetData?.content?.completionPercentage ? translateLabels('start', 'cardcontentv2') : translateLabels('resume', 'cardcontentv2')).length < 11\"\n matTooltip=\"{{!widgetData?.content?.completionPercentage ? translateLabels('start', 'cardcontentv2') : translateLabels('resume', 'cardcontentv2')}}\">\n <span class=\"textwrap margin-right-xs\">\n {{!widgetData?.content?.completionPercentage ? translateLabels('start', 'cardcontentv2') : translateLabels('resume', 'cardcontentv2')}}</span>\n <img class=\"stats-icon\" height=\"20\" width=\"20\" src=\"/assets/icons/home/play.svg\">\n </button>\n </div>\n </div>\n </ng-container>\n <ng-container *ngIf=\"widgetData?.content?.completionPercentage === 100\">\n <div class=\"flex flex-align-end progress-wrapper flex-end mt-1\">\n <div class=\"progress-btn\">\n <button class=\"resume-btn flex flex-middle flex-between view-btn\" [ngClass]=\"{'disable-btn': downloadCertificateLoading || widgetData?.content?.issuedCertificates?.length === 0}\" (click)=\"!downloadCertificateLoading && downloadCertificate(widgetData?.content);$event.stopPropagation()\" \n [matTooltipPosition]=\"'below'\"\n [matTooltipDisabled]=\"(translateLabels('viewCertificate', 'cardcontentv2')).length < 11\"\n matTooltip=\"{{'cardcontentv2.viewCertificate' | translate }}\">\n <span class=\"margin-right-xs textwrap\">{{'cardcontentv2.viewCertificate' | translate }}</span>\n <img class=\"stats-icon\" *ngIf=\"!downloadCertificateLoading\" height=\"20\" width=\"20\" src=\"/assets/icons/home/eye-white.svg\">\n <div class=\"center flex flex-middle\" *ngIf=\"downloadCertificateLoading\">\n <mat-spinner strokeWidth=\"2\" stroke=\"'red'\" class=\"white-spinner\" [diameter]=\"16\"></mat-spinner>\n </div>\n </button>\n </div>\n </div>\n </ng-container>\n </mat-card>\n</ng-container>\n\n\n<ng-template #cbpPlan let-data=\"data\">\n <div class=\"cbp-mark left-0 border-top-radius\">\n <p *ngIf=\"data.cbpData.planDuration === acbpConstants?.UPCOMING\" class=\"cbp-warning\">{{data.cbpData.endDate | date: 'd MMM, y'}}</p>\n <p *ngIf=\"data.cbpData.planDuration === acbpConstants?.SUCCESS\" class=\"cbp-success\">{{data.cbpData.endDate | date: 'd MMM, y'}}</p>\n <p *ngIf=\"data.cbpData.planDuration === acbpConstants?.OVERDUE\" class=\"cbp-danger\">{{'OverDue' }}</p>\n </div>\n</ng-template>\n\n<ng-container *ngIf=\"isCardLoading\">\n <mat-card class=\"card-portrait\" [ngClass]=\"widgetData.cardCustomeClass ? widgetData.cardCustomeClass : ''\">\n <div class=\"margin-bottom-xs\">\n <ng-container>\n <sb-uic-skeleton-loader [width]=\"'147px'\" [height]=\"'26px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </ng-container>\n </div>\n <div class=\"flex\">\n <div class=\"margin-right-s\">\n <ng-container>\n <sb-uic-skeleton-loader [width]=\"'147px'\" [height]=\"'98px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </ng-container>\n </div>\n <div class=\"width-1-1\">\n <div class=\"portrait-subheading title-text\">\n <sb-uic-skeleton-loader [bindingClass]=\"'flex rounded width-1-1'\"></sb-uic-skeleton-loader>\n </div>\n <div class=\"flex w-full flex-wrap flex-middle\">\n <div class=\" margin-right-xs\">\n <sb-uic-skeleton-loader [width]=\"'24px'\" [height]=\"'24px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </div>\n <span class=\"\"><sb-uic-skeleton-loader [width]=\"'133px'\" [height]=\"'12px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader></span>\n </div>\n <div class=\"portrait_widget flex margin-top-xs\">\n <div class=\"flex flex-end flex-middle\">\n <sb-uic-skeleton-loader [width]=\"'65px'\" [height]=\"'12px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </div>\n </div>\n </div>\n </div>\n <div class=\"flex flex-align-end progress-wrapper flex-between\">\n <div class=\"progress-block\">\n <div class=\"completed-time\">\n <sb-uic-skeleton-loader [width]=\"'211px'\" [height]=\"'16px'\" [bindingClass]=\"'flex rounded margin-top-xs md:w-211'\"></sb-uic-skeleton-loader>\n </div>\n </div>\n <div class=\"progress-btn\">\n <sb-uic-skeleton-loader [width]=\"'117px'\" [height]=\"'32px'\" [bindingClass]=\"'flex rounded margin-top-xs'\"></sb-uic-skeleton-loader>\n </div>\n </div>\n </mat-card>\n</ng-container>",
|
|
10376
10376
|
styles: [".card-portrait{border-radius:12px;border:1px solid rgba(0,0,0,.08);opacity:1;width:318px;min-height:154px;padding:16px}.card-portrait .img-block-portrait{line-height:10px}.card-portrait .card-image{border-radius:8px;opacity:1;background-size:100%;width:147px;height:100px}.card-portrait .portrait-subheading{opacity:1;color:rgba(0,0,0,.87);font-weight:700;font-style:normal;letter-spacing:.25px;text-align:left;word-break:break-word;white-space:initial;margin:0 0 8px;position:relative;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;min-height:40px}.card-portrait .portrait_course_logo_box img{padding:3px;display:inline-block;width:24px;height:24px;border:1px solid #d6d6d6;border-radius:4px;box-sizing:border-box}.card-portrait span.portrait-org-name{width:75%;word-break:break-all;white-space:initial;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical}.card-portrait .portrait_widget{align-items:center;margin-top:0}.card-portrait .portrait_widget .course_port{border:1px solid #ef951e;padding:4px 8px;align-items:center;border-radius:16px}.card-portrait .portrait_widget .video-icon{opacity:1;color:#ef951e;width:15px;height:15px;font-size:15px}.card-portrait .portrait_widget .portrait-category{color:rgba(0,0,0,.6)!important;font-size:.75rem;opacity:1;font-family:Lato-Regular;font-weight:400;font-style:normal;letter-spacing:.25px;text-align:left;line-height:20px}.card-portrait .progress-wrapper .progress-block{width:60%}.card-portrait .progress-wrapper .progress-block .completed-time{color:#ef951e;display:flex;padding:8px 0}.card-portrait .progress-wrapper .progress-block .completed-time mat-icon{width:1rem;height:1rem;font-size:1rem}.card-portrait .progress-wrapper .progress-block .completed-time span{opacity:1;color:rgba(0,0,0,.87);font-family:Lato-Regular;font-size:.75rem;font-weight:400;font-style:normal;letter-spacing:.25px;text-align:left;line-height:16px}.card-portrait .progress-wrapper .progress-btn .resume-btn{opacity:1;color:#fff;font-family:Lato-Bold;font-size:14px;font-weight:700;font-style:normal;letter-spacing:.5px;text-align:left;line-height:20px;background:#1a4ca1;border-radius:63px;padding:6px 16px;border:none;width:100%;cursor:pointer}.card-portrait .progress-wrapper .progress-btn .resume-btn .textwrap{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:82px}.card-portrait .progress-wrapper .progress-btn .resume-btn:hover{background-color:#253379}.card-portrait .progress-bar-new{color:#ef951e!important;height:10px;border-radius:5px}.card-portrait .rating-session mat-icon{font-size:20px;height:20px;width:20px;color:#ef951e}.card-portrait .rating-session .rating-number{font-size:14px}.card-portrait .rating-session .most-enrolled-text{font-size:10px;font-weight:400;padding:4px;background:#ffea9e;border-radius:4px;line-height:12px}.card-portrait .right-corner-portrait{right:8px;bottom:8px}.course_widget{margin-top:10px}.course_widget .mat-icon{vertical-align:middle;color:#ef951e!important}.course_widget .course_v2{border:1px solid #ef951e;padding:4px 8px;align-items:end;border-radius:16px}.course_widget .main_icon{font-size:16px;width:16px;height:16px}.rating-session mat-icon{font-size:16px;height:16px;width:12px;padding-right:3px;color:#ef951e}.rating-session span{font-size:11px}.rating-session .most-enrolled-text{padding:0 8px;background:#ffea9e;border-radius:4px}.duration-box{background:#000;position:absolute;border:none;display:flex;align-items:center;padding:4px;border-radius:4px}.duration-box.right-corner{right:4px;bottom:4px}.duration-box .mat-icon{vertical-align:middle;color:#fff!important;height:14px!important;width:14px!important;font-size:14px}.duration-box .duration{font:700 12px/16px Lato;display:inline-block;margin:0;padding:0}"]
|
|
10377
10377
|
}] }
|
|
10378
10378
|
];
|
|
@@ -11488,15 +11488,7 @@ class ContentStripWithTabsPillsComponent extends WidgetBaseComponent {
|
|
|
11488
11488
|
// setting initial values
|
|
11489
11489
|
strip.loaderWidgets = this.transformSkeletonToWidgets(strip);
|
|
11490
11490
|
this.processStrip(strip, [], 'fetching', false, null);
|
|
11491
|
-
this.fetchFromEnrollmentList(strip, calculateParentStatus);
|
|
11492
11491
|
this.fetchFromSearchV6(strip, calculateParentStatus);
|
|
11493
|
-
this.fetchFromTrendingContent(strip, calculateParentStatus);
|
|
11494
|
-
this.fetchAllTopContent(strip, calculateParentStatus);
|
|
11495
|
-
this.fetchAllFeaturedContent(strip, calculateParentStatus);
|
|
11496
|
-
this.fetchAllBookMarkData(strip, calculateParentStatus);
|
|
11497
|
-
this.fetchAllPlaylistSearch(strip, calculateParentStatus);
|
|
11498
|
-
this.fetchPlaylistReadData(strip, calculateParentStatus);
|
|
11499
|
-
this.fetchCiosContentData(strip, calculateParentStatus);
|
|
11500
11492
|
this.fetchForYouData(strip, calculateParentStatus);
|
|
11501
11493
|
this.fetchAllCbpPlans(strip, calculateParentStatus);
|
|
11502
11494
|
// this.enrollInterval = setInterval(() => {
|
|
@@ -11504,546 +11496,110 @@ class ContentStripWithTabsPillsComponent extends WidgetBaseComponent {
|
|
|
11504
11496
|
// }, 1000)
|
|
11505
11497
|
}
|
|
11506
11498
|
/**
|
|
11507
|
-
* @param {?}
|
|
11508
|
-
* @param {?=} calculateParentStatus
|
|
11499
|
+
* @param {?} data
|
|
11509
11500
|
* @return {?}
|
|
11510
11501
|
*/
|
|
11511
|
-
|
|
11512
|
-
|
|
11513
|
-
|
|
11514
|
-
|
|
11515
|
-
|
|
11516
|
-
|
|
11517
|
-
|
|
11518
|
-
|
|
11519
|
-
|
|
11520
|
-
|
|
11521
|
-
/** @type {?} */
|
|
11522
|
-
const queryParams = get(strip.request.enrollmentList, 'queryParams');
|
|
11523
|
-
if (this.configSvc.userProfile) {
|
|
11524
|
-
userId = this.configSvc.userProfile.userId;
|
|
11502
|
+
toggleInfo(data) {
|
|
11503
|
+
/** @type {?} */
|
|
11504
|
+
const stripInfo = this.stripsResultDataMap[data.key].stripInfo;
|
|
11505
|
+
if (stripInfo) {
|
|
11506
|
+
if (stripInfo.mode !== 'below') {
|
|
11507
|
+
this.loggerSvc.warn(`strip info mode: ${stripInfo.mode} not implemented yet`);
|
|
11508
|
+
stripInfo.mode = 'below';
|
|
11509
|
+
}
|
|
11510
|
+
if (stripInfo.mode === 'below') {
|
|
11511
|
+
this.stripsResultDataMap[data.key].stripInfo = Object.assign({}, stripInfo, { visibilityMode: stripInfo.visibilityMode === 'hidden' ? 'visible' : 'hidden' });
|
|
11525
11512
|
}
|
|
11526
|
-
// tslint:disable-next-line: deprecation
|
|
11527
|
-
this.userSvc.fetchUserBatchList(userId, queryParams).subscribe((/**
|
|
11528
|
-
* @param {?} result
|
|
11529
|
-
* @return {?}
|
|
11530
|
-
*/
|
|
11531
|
-
(result) => {
|
|
11532
|
-
/** @type {?} */
|
|
11533
|
-
const courses = result && result.courses;
|
|
11534
|
-
/** @type {?} */
|
|
11535
|
-
const showViewMore = Boolean(courses.length > 5 && strip.stripConfig && strip.stripConfig.postCardForSearch);
|
|
11536
|
-
/** @type {?} */
|
|
11537
|
-
const viewMoreUrl = showViewMore
|
|
11538
|
-
? {
|
|
11539
|
-
path: (strip.viewMoreUrl && strip.viewMoreUrl.path) || '',
|
|
11540
|
-
queryParams: {
|
|
11541
|
-
q: strip.viewMoreUrl && strip.viewMoreUrl.queryParams,
|
|
11542
|
-
f: strip.request && strip.request.searchV6 && strip.request.searchV6.filters
|
|
11543
|
-
? JSON.stringify(
|
|
11544
|
-
// this.searchServSvc.transformSearchV6Filters(
|
|
11545
|
-
strip.request.searchV6.filters
|
|
11546
|
-
// ),
|
|
11547
|
-
)
|
|
11548
|
-
: {},
|
|
11549
|
-
},
|
|
11550
|
-
}
|
|
11551
|
-
: null;
|
|
11552
|
-
if (courses && courses.length) {
|
|
11553
|
-
content = courses.map((/**
|
|
11554
|
-
* @param {?} c
|
|
11555
|
-
* @return {?}
|
|
11556
|
-
*/
|
|
11557
|
-
(c) => {
|
|
11558
|
-
/** @type {?} */
|
|
11559
|
-
const contentTemp = c.content;
|
|
11560
|
-
contentTemp.completionPercentage = c.completionPercentage || c.progress || 0;
|
|
11561
|
-
contentTemp.completionStatus = c.completionStatus || c.status || 0;
|
|
11562
|
-
contentTemp.enrolledDate = c.enrolledDate || '';
|
|
11563
|
-
contentTemp.lastContentAccessTime = c.lastContentAccessTime || '';
|
|
11564
|
-
contentTemp.lastReadContentStatus = c.lastReadContentStatus || '';
|
|
11565
|
-
contentTemp.lastReadContentId = c.lastReadContentId || '';
|
|
11566
|
-
contentTemp.lrcProgressDetails = c.lrcProgressDetails || '';
|
|
11567
|
-
contentTemp.issuedCertificates = c.issuedCertificates || [];
|
|
11568
|
-
contentTemp.batchId = c.batchId || '';
|
|
11569
|
-
return contentTemp;
|
|
11570
|
-
}));
|
|
11571
|
-
}
|
|
11572
|
-
// To filter content with completionPercentage > 0,
|
|
11573
|
-
// so that only those content will show in home page
|
|
11574
|
-
// continue learing strip
|
|
11575
|
-
// if (content && content.length) {
|
|
11576
|
-
// contentNew = content.filter((c: any) => {
|
|
11577
|
-
// /** commented as both are 0 after enrolll */
|
|
11578
|
-
// if (c.completionPercentage && c.completionPercentage > 0) {
|
|
11579
|
-
// return c
|
|
11580
|
-
// }
|
|
11581
|
-
// })
|
|
11582
|
-
// }
|
|
11583
|
-
// To sort in descending order of the enrolled date
|
|
11584
|
-
contentNew = (content || []).sort((/**
|
|
11585
|
-
* @param {?} a
|
|
11586
|
-
* @param {?} b
|
|
11587
|
-
* @return {?}
|
|
11588
|
-
*/
|
|
11589
|
-
(a, b) => {
|
|
11590
|
-
/** @type {?} */
|
|
11591
|
-
const dateA = new Date(a.lastContentAccessTime || 0);
|
|
11592
|
-
/** @type {?} */
|
|
11593
|
-
const dateB = new Date(b.lastContentAccessTime || 0);
|
|
11594
|
-
return dateB - dateA;
|
|
11595
|
-
}));
|
|
11596
|
-
if (strip.tabs && strip.tabs.length) {
|
|
11597
|
-
tabResults = this.splitEnrollmentTabsData(contentNew, strip);
|
|
11598
|
-
this.processStrip(strip, this.transformContentsToWidgets(contentNew, strip), 'done', calculateParentStatus, viewMoreUrl, tabResults);
|
|
11599
|
-
}
|
|
11600
|
-
else {
|
|
11601
|
-
this.processStrip(strip, this.transformContentsToWidgets(contentNew, strip), 'done', calculateParentStatus, viewMoreUrl);
|
|
11602
|
-
}
|
|
11603
|
-
}), (/**
|
|
11604
|
-
* @return {?}
|
|
11605
|
-
*/
|
|
11606
|
-
() => {
|
|
11607
|
-
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
11608
|
-
}));
|
|
11609
11513
|
}
|
|
11610
11514
|
}
|
|
11611
11515
|
/**
|
|
11612
|
-
* @
|
|
11516
|
+
* @private
|
|
11517
|
+
* @param {?} contents
|
|
11613
11518
|
* @param {?} strip
|
|
11614
11519
|
* @return {?}
|
|
11615
11520
|
*/
|
|
11616
|
-
|
|
11617
|
-
|
|
11618
|
-
|
|
11619
|
-
|
|
11620
|
-
const splitData = this.getInprogressAndCompleted(contentNew, (/**
|
|
11621
|
-
* @param {?} e
|
|
11521
|
+
transformContentsToWidgets(contents, strip) {
|
|
11522
|
+
return (contents || []).map((/**
|
|
11523
|
+
* @param {?} content
|
|
11524
|
+
* @param {?} idx
|
|
11622
11525
|
* @return {?}
|
|
11623
11526
|
*/
|
|
11624
|
-
(
|
|
11625
|
-
|
|
11626
|
-
|
|
11627
|
-
|
|
11628
|
-
|
|
11629
|
-
|
|
11630
|
-
|
|
11631
|
-
|
|
11632
|
-
|
|
11633
|
-
|
|
11634
|
-
|
|
11635
|
-
}
|
|
11636
|
-
return undefined;
|
|
11637
|
-
})))));
|
|
11638
|
-
}
|
|
11639
|
-
}
|
|
11640
|
-
}
|
|
11641
|
-
return tabResults;
|
|
11527
|
+
(content, idx) => (content ? {
|
|
11528
|
+
widgetType: 'cardLib',
|
|
11529
|
+
widgetSubType: 'cardContentLib',
|
|
11530
|
+
widgetHostClass: 'mb-2',
|
|
11531
|
+
widgetData: Object.assign({ content }, (content.batch && { batch: content.batch }), { cardSubType: strip.stripConfig && strip.stripConfig.cardSubType, cardCustomeClass: strip.customeClass ? strip.customeClass : '', context: { pageSection: strip.key, position: idx }, intranetMode: strip.stripConfig && strip.stripConfig.intranetMode, deletedMode: strip.stripConfig && strip.stripConfig.deletedMode, contentTags: strip.stripConfig && strip.stripConfig.contentTags }),
|
|
11532
|
+
} : {
|
|
11533
|
+
widgetType: 'card',
|
|
11534
|
+
widgetSubType: 'cardContent',
|
|
11535
|
+
widgetHostClass: 'mb-2',
|
|
11536
|
+
widgetData: {},
|
|
11537
|
+
})));
|
|
11642
11538
|
}
|
|
11643
11539
|
/**
|
|
11644
|
-
* @
|
|
11645
|
-
* @param {?}
|
|
11540
|
+
* @private
|
|
11541
|
+
* @param {?} contents
|
|
11646
11542
|
* @param {?} strip
|
|
11647
11543
|
* @return {?}
|
|
11648
11544
|
*/
|
|
11649
|
-
|
|
11650
|
-
|
|
11651
|
-
|
|
11652
|
-
|
|
11653
|
-
const completed = [];
|
|
11654
|
-
array.forEach((/**
|
|
11655
|
-
* @param {?} e
|
|
11545
|
+
transformEventsToWidgets(contents, strip) {
|
|
11546
|
+
this.eventSvc.setEventListData(contents);
|
|
11547
|
+
return (this.eventSvc.todaysEvents || []).map((/**
|
|
11548
|
+
* @param {?} content
|
|
11656
11549
|
* @param {?} idx
|
|
11657
|
-
* @param {?} arr
|
|
11658
11550
|
* @return {?}
|
|
11659
11551
|
*/
|
|
11660
|
-
(
|
|
11661
|
-
|
|
11662
|
-
|
|
11663
|
-
|
|
11664
|
-
|
|
11552
|
+
(content, idx) => (content ? {
|
|
11553
|
+
widgetType: 'card',
|
|
11554
|
+
widgetSubType: 'eventHubCard',
|
|
11555
|
+
widgetHostClass: 'mb-2',
|
|
11556
|
+
widgetData: {
|
|
11557
|
+
content,
|
|
11558
|
+
cardSubType: strip.stripConfig && strip.stripConfig.cardSubType,
|
|
11559
|
+
cardCustomeClass: strip.customeClass ? strip.customeClass : '',
|
|
11560
|
+
context: { pageSection: strip.key, position: idx },
|
|
11561
|
+
intranetMode: strip.stripConfig && strip.stripConfig.intranetMode,
|
|
11562
|
+
deletedMode: strip.stripConfig && strip.stripConfig.deletedMode,
|
|
11563
|
+
contentTags: strip.stripConfig && strip.stripConfig.contentTags,
|
|
11564
|
+
},
|
|
11565
|
+
} : {
|
|
11566
|
+
widgetType: 'card',
|
|
11567
|
+
widgetSubType: 'eventHubCard',
|
|
11568
|
+
widgetHostClass: 'mb-2',
|
|
11569
|
+
widgetData: {},
|
|
11570
|
+
})));
|
|
11665
11571
|
}
|
|
11666
|
-
// async fetchFromSearchV6(strip: NsContentStripWithTabs.IContentStripUnit, calculateParentStatus = true) {
|
|
11667
|
-
// if (strip.request && strip.request.searchV6 && Object.keys(strip.request.searchV6).length) {
|
|
11668
|
-
// // if (!(strip.request.searchV6.locale && strip.request.searchV6.locale.length > 0)) {
|
|
11669
|
-
// // if (this.configSvc.activeLocale) {
|
|
11670
|
-
// // strip.request.searchV6.locale = [this.configSvc.activeLocale.locals[0]]
|
|
11671
|
-
// // } else {
|
|
11672
|
-
// // strip.request.searchV6.locale = ['en']
|
|
11673
|
-
// // }
|
|
11674
|
-
// // }
|
|
11675
|
-
// let originalFilters: any = [];
|
|
11676
|
-
// // tslint:disable:no-console
|
|
11677
|
-
// console.log(originalFilters);
|
|
11678
|
-
// if (strip.request &&
|
|
11679
|
-
// strip.request.searchV6 &&
|
|
11680
|
-
// strip.request.searchV6.request &&
|
|
11681
|
-
// strip.request.searchV6.request.filters) {
|
|
11682
|
-
// originalFilters = strip.request.searchV6.request.filters;
|
|
11683
|
-
// strip.request.searchV6.request.filters = this.checkForDateFilters(strip.request.searchV6.request.filters);
|
|
11684
|
-
// strip.request.searchV6.request.filters = this.getFiltersFromArray(
|
|
11685
|
-
// strip.request.searchV6.request.filters,
|
|
11686
|
-
// );
|
|
11687
|
-
// }
|
|
11688
|
-
// if (strip.tabs && strip.tabs.length) {
|
|
11689
|
-
// // TODO: Have to extract requestRequired to outer level of tabs config
|
|
11690
|
-
// const firstTab = strip.tabs[0];
|
|
11691
|
-
// if (firstTab.requestRequired) {
|
|
11692
|
-
// if (this.stripsResultDataMap[strip.key] && this.stripsResultDataMap[strip.key].tabs) {
|
|
11693
|
-
// const allTabs = this.stripsResultDataMap[strip.key].tabs;
|
|
11694
|
-
// const currentTabFromMap = (allTabs && allTabs.length && allTabs[0]) as NsContentStripWithTabs.IContentStripTab;
|
|
11695
|
-
// this.getTabDataByNewReqSearchV6(strip, 0, currentTabFromMap, calculateParentStatus);
|
|
11696
|
-
// }
|
|
11697
|
-
// }
|
|
11698
|
-
// } else {
|
|
11699
|
-
// try {
|
|
11700
|
-
// const response = await this.searchV6Request(strip, strip.request, calculateParentStatus);
|
|
11701
|
-
// // console.log('calling after - response, ', response)
|
|
11702
|
-
// if (response && response.results) {
|
|
11703
|
-
// // console.log('calling after-- ')
|
|
11704
|
-
// if (response.results.result.content) {
|
|
11705
|
-
// if(strip.key === 'scheduledAssessment') {
|
|
11706
|
-
// this.enrollInterval = setInterval(() => {
|
|
11707
|
-
// this.checkInvitOnlyAssessments(response.results.result.content, strip, calculateParentStatus, response.viewMoreUrl)
|
|
11708
|
-
// // tslint:disable-next-line
|
|
11709
|
-
// }, 1000)
|
|
11710
|
-
// } else {
|
|
11711
|
-
// this.processStrip(
|
|
11712
|
-
// strip,
|
|
11713
|
-
// this.transformContentsToWidgets(response.results.result.content, strip),
|
|
11714
|
-
// 'done',
|
|
11715
|
-
// calculateParentStatus,
|
|
11716
|
-
// response.viewMoreUrl,
|
|
11717
|
-
// );
|
|
11718
|
-
// }
|
|
11719
|
-
// } else if (response.results.result.Event) {
|
|
11720
|
-
// this.processStrip(
|
|
11721
|
-
// strip,
|
|
11722
|
-
// this.transformEventsToWidgets(response.results.result.Event, strip),
|
|
11723
|
-
// 'done',
|
|
11724
|
-
// calculateParentStatus,
|
|
11725
|
-
// response.viewMoreUrl,
|
|
11726
|
-
// );
|
|
11727
|
-
// } else {
|
|
11728
|
-
// this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
11729
|
-
// }
|
|
11730
|
-
// } else {
|
|
11731
|
-
// this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
11732
|
-
// }
|
|
11733
|
-
// } catch (error) {
|
|
11734
|
-
// // Handle errors
|
|
11735
|
-
// // console.error('Error:', error);
|
|
11736
|
-
// }
|
|
11737
|
-
// }
|
|
11738
|
-
// }
|
|
11739
|
-
// }
|
|
11740
11572
|
/**
|
|
11741
|
-
* @
|
|
11573
|
+
* @private
|
|
11742
11574
|
* @param {?} strip
|
|
11743
|
-
* @param {?} calculateParentStatus
|
|
11744
|
-
* @param {?} viewMoreUrl
|
|
11745
11575
|
* @return {?}
|
|
11746
11576
|
*/
|
|
11747
|
-
|
|
11748
|
-
|
|
11749
|
-
|
|
11750
|
-
|
|
11751
|
-
|
|
11752
|
-
|
|
11753
|
-
|
|
11754
|
-
|
|
11755
|
-
|
|
11756
|
-
|
|
11757
|
-
|
|
11758
|
-
|
|
11759
|
-
|
|
11760
|
-
|
|
11761
|
-
}
|
|
11762
|
-
}));
|
|
11763
|
-
this.processStrip(strip, this.transformContentsToWidgets(filteredArray, strip), 'done', calculateParentStatus, viewMoreUrl);
|
|
11764
|
-
clearInterval(this.enrollInterval);
|
|
11765
|
-
}
|
|
11577
|
+
transformSkeletonToWidgets(strip) {
|
|
11578
|
+
return [1, 2, 3, 4, 5, 6, 7, 7, 8, 9, 10].map((/**
|
|
11579
|
+
* @param {?} _content
|
|
11580
|
+
* @return {?}
|
|
11581
|
+
*/
|
|
11582
|
+
_content => ({
|
|
11583
|
+
widgetType: 'cardLib',
|
|
11584
|
+
widgetSubType: 'cardContentLib',
|
|
11585
|
+
widgetHostClass: 'mb-2',
|
|
11586
|
+
widgetData: {
|
|
11587
|
+
cardSubType: strip.loaderConfig && strip.loaderConfig.cardSubType || 'card-standard-skeleton',
|
|
11588
|
+
cardCustomeClass: strip.customeClass ? strip.customeClass : '',
|
|
11589
|
+
},
|
|
11590
|
+
})));
|
|
11766
11591
|
}
|
|
11767
|
-
// async searchV6Request(strip: NsContentStripWithTabs.IContentStripUnit,
|
|
11768
|
-
// request: NsContentStripWithTabs.IContentStripUnit['request'],
|
|
11769
|
-
// calculateParentStatus: boolean
|
|
11770
|
-
// ): Promise<any> {
|
|
11771
|
-
// const originalFilters: any = [];
|
|
11772
|
-
// return new Promise<any>((resolve, reject) => {
|
|
11773
|
-
// if (request && request.searchV6) {
|
|
11774
|
-
// this.contentSvc.searchV6(request.searchV6).subscribe(results => {
|
|
11775
|
-
// const showViewMore = Boolean(
|
|
11776
|
-
// results.result.content && results.result.content.length > 5 && strip.stripConfig && strip.stripConfig.postCardForSearch,
|
|
11777
|
-
// );
|
|
11778
|
-
// const viewMoreUrl = showViewMore
|
|
11779
|
-
// ? {
|
|
11780
|
-
// path: strip.viewMoreUrl && strip.viewMoreUrl.path || '',
|
|
11781
|
-
// queryParams: {
|
|
11782
|
-
// tab: 'Learn',
|
|
11783
|
-
// q: strip.viewMoreUrl && strip.viewMoreUrl.queryParams,
|
|
11784
|
-
// f:
|
|
11785
|
-
// request &&
|
|
11786
|
-
// request.searchV6 &&
|
|
11787
|
-
// request.searchV6.request &&
|
|
11788
|
-
// request.searchV6.request.filters
|
|
11789
|
-
// ? JSON.stringify(
|
|
11790
|
-
// this.transformSearchV6FiltersV2(
|
|
11791
|
-
// originalFilters,
|
|
11792
|
-
// )
|
|
11793
|
-
// )
|
|
11794
|
-
// : {},
|
|
11795
|
-
// },
|
|
11796
|
-
// }
|
|
11797
|
-
// : null;
|
|
11798
|
-
// // if (viewMoreUrl && viewMoreUrl.queryParams) {
|
|
11799
|
-
// // viewMoreUrl.queryParams = viewMoreUrl.queryParams
|
|
11800
|
-
// // }
|
|
11801
|
-
// resolve({ results, viewMoreUrl });
|
|
11802
|
-
// }, (error: any) => {
|
|
11803
|
-
// this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
11804
|
-
// reject(error);
|
|
11805
|
-
// },
|
|
11806
|
-
// );
|
|
11807
|
-
// }
|
|
11808
|
-
// });
|
|
11809
|
-
// }
|
|
11810
11592
|
/**
|
|
11593
|
+
* @private
|
|
11811
11594
|
* @param {?} strip
|
|
11595
|
+
* @param {?=} results
|
|
11596
|
+
* @param {?=} fetchStatus
|
|
11812
11597
|
* @param {?=} calculateParentStatus
|
|
11598
|
+
* @param {?=} _viewMoreUrl
|
|
11599
|
+
* @param {?=} tabsResults
|
|
11813
11600
|
* @return {?}
|
|
11814
11601
|
*/
|
|
11815
|
-
|
|
11816
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
11817
|
-
if (strip.request && strip.request.trendingSearch && Object.keys(strip.request.trendingSearch).length) {
|
|
11818
|
-
// if (!(strip.request.searchV6.locale && strip.request.searchV6.locale.length > 0)) {
|
|
11819
|
-
// if (this.configSvc.activeLocale) {
|
|
11820
|
-
// strip.request.searchV6.locale = [this.configSvc.activeLocale.locals[0]]
|
|
11821
|
-
// } else {
|
|
11822
|
-
// strip.request.searchV6.locale = ['en']
|
|
11823
|
-
// }
|
|
11824
|
-
// }
|
|
11825
|
-
/** @type {?} */
|
|
11826
|
-
let originalFilters = [];
|
|
11827
|
-
// tslint:disable:no-console
|
|
11828
|
-
if (strip.request &&
|
|
11829
|
-
strip.request.trendingSearch &&
|
|
11830
|
-
strip.request.trendingSearch.request &&
|
|
11831
|
-
strip.request.trendingSearch.request.filters) {
|
|
11832
|
-
originalFilters = strip.request.trendingSearch.request.filters;
|
|
11833
|
-
strip.request.trendingSearch.request.filters = this.checkForDateFilters(strip.request.trendingSearch.request.filters);
|
|
11834
|
-
strip.request.trendingSearch.request.filters = this.getFiltersFromArray(strip.request.trendingSearch.request.filters);
|
|
11835
|
-
}
|
|
11836
|
-
if (strip.tabs && strip.tabs.length) {
|
|
11837
|
-
// TODO: Have to extract requestRequired to outer level of tabs config
|
|
11838
|
-
/** @type {?} */
|
|
11839
|
-
const firstTab = strip.tabs[0];
|
|
11840
|
-
if (firstTab.requestRequired) {
|
|
11841
|
-
if (this.stripsResultDataMap[strip.key] && this.stripsResultDataMap[strip.key].tabs) {
|
|
11842
|
-
/** @type {?} */
|
|
11843
|
-
const allTabs = this.stripsResultDataMap[strip.key].tabs;
|
|
11844
|
-
/** @type {?} */
|
|
11845
|
-
const currentTabFromMap = (/** @type {?} */ ((allTabs && allTabs.length && allTabs[0])));
|
|
11846
|
-
this.getTabDataByNewReqTrending(strip, 0, 0, currentTabFromMap, calculateParentStatus);
|
|
11847
|
-
}
|
|
11848
|
-
}
|
|
11849
|
-
}
|
|
11850
|
-
else {
|
|
11851
|
-
try {
|
|
11852
|
-
/** @type {?} */
|
|
11853
|
-
const response = yield this.trendingSearchRequest(strip, strip.request, calculateParentStatus);
|
|
11854
|
-
if (response && response.results && response.results.response) {
|
|
11855
|
-
/** @type {?} */
|
|
11856
|
-
const content = response.results.response[strip.request.trendingSearch.responseKey] || [];
|
|
11857
|
-
this.processStrip(strip, this.transformContentsToWidgets(content, strip), 'done', calculateParentStatus, response.viewMoreUrl || '');
|
|
11858
|
-
if (!content.length) {
|
|
11859
|
-
this.emptyResponse.emit(true);
|
|
11860
|
-
}
|
|
11861
|
-
}
|
|
11862
|
-
else {
|
|
11863
|
-
this.emptyResponse.emit(true);
|
|
11864
|
-
this.processStrip(strip, [], 'done', calculateParentStatus, null);
|
|
11865
|
-
}
|
|
11866
|
-
}
|
|
11867
|
-
catch (error) {
|
|
11868
|
-
// Handle errors
|
|
11869
|
-
this.emptyResponse.emit(true);
|
|
11870
|
-
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
11871
|
-
}
|
|
11872
|
-
}
|
|
11873
|
-
}
|
|
11874
|
-
});
|
|
11875
|
-
}
|
|
11876
|
-
// async trendingSearchRequest(strip: NsContentStripWithTabs.IContentStripUnit,
|
|
11877
|
-
// request: NsContentStripWithTabs.IContentStripUnit['request'],
|
|
11878
|
-
// calculateParentStatus: boolean
|
|
11879
|
-
// ): Promise<any> {
|
|
11880
|
-
// const originalFilters: any = [];
|
|
11881
|
-
// return new Promise<any>((resolve, reject) => {
|
|
11882
|
-
// if (request && request.trendingSearch) {
|
|
11883
|
-
// // check for the request if it has dynamic values]
|
|
11884
|
-
// if (request.trendingSearch.request.filters.organisation &&
|
|
11885
|
-
// request.trendingSearch.request.filters.organisation.indexOf('<orgID>') >= 0
|
|
11886
|
-
// ) {
|
|
11887
|
-
// let userRootOrgId;
|
|
11888
|
-
// if (this.configSvc.userProfile) {
|
|
11889
|
-
// userRootOrgId = this.configSvc.userProfile.rootOrgId;
|
|
11890
|
-
// }
|
|
11891
|
-
// request.trendingSearch.request.filters.organisation = userRootOrgId;
|
|
11892
|
-
// }
|
|
11893
|
-
// this.contentSvc.trendingContentSearch(request.trendingSearch).subscribe(results => {
|
|
11894
|
-
// const showViewMore = Boolean(
|
|
11895
|
-
// results.result &&
|
|
11896
|
-
// strip.request &&
|
|
11897
|
-
// results.result[strip.request.trendingSearch.responseKey] &&
|
|
11898
|
-
// results.result[strip.request.trendingSearch.responseKey].length > 5 &&
|
|
11899
|
-
// strip.stripConfig && strip.stripConfig.postCardForSearch,
|
|
11900
|
-
// );
|
|
11901
|
-
// const viewMoreUrl = showViewMore
|
|
11902
|
-
// ? {
|
|
11903
|
-
// path: strip.viewMoreUrl && strip.viewMoreUrl.path || '',
|
|
11904
|
-
// queryParams: {
|
|
11905
|
-
// tab: 'Learn',
|
|
11906
|
-
// q: strip.viewMoreUrl && strip.viewMoreUrl.queryParams,
|
|
11907
|
-
// f:
|
|
11908
|
-
// request &&
|
|
11909
|
-
// request.trendingSearch &&
|
|
11910
|
-
// request.trendingSearch.request &&
|
|
11911
|
-
// request.trendingSearch.request.filters
|
|
11912
|
-
// ? JSON.stringify(
|
|
11913
|
-
// this.transformSearchV6FiltersV2(
|
|
11914
|
-
// originalFilters,
|
|
11915
|
-
// )
|
|
11916
|
-
// )
|
|
11917
|
-
// : {},
|
|
11918
|
-
// },
|
|
11919
|
-
// }
|
|
11920
|
-
// : null;
|
|
11921
|
-
// let proccesedResult: any = []
|
|
11922
|
-
// if (results && results.response && results.response.certifications) {
|
|
11923
|
-
// results.response.certifications.map((result: any) => {
|
|
11924
|
-
// if (result.source === this.channnelName) {
|
|
11925
|
-
// proccesedResult.push(result)
|
|
11926
|
-
// }
|
|
11927
|
-
// })
|
|
11928
|
-
// }
|
|
11929
|
-
// results = {response: {certifications: proccesedResult}}
|
|
11930
|
-
// resolve({ results, viewMoreUrl });
|
|
11931
|
-
// }, (error: any) => {
|
|
11932
|
-
// if (error.error && error.error.status === 400) {
|
|
11933
|
-
// this.processStrip(strip, [], 'done', calculateParentStatus, null);
|
|
11934
|
-
// }
|
|
11935
|
-
// // this.processStrip(strip, [], 'done', calculateParentStatus, null)
|
|
11936
|
-
// reject(error);
|
|
11937
|
-
// },
|
|
11938
|
-
// );
|
|
11939
|
-
// }
|
|
11940
|
-
// });
|
|
11941
|
-
// }
|
|
11942
|
-
/**
|
|
11943
|
-
* @param {?} data
|
|
11944
|
-
* @return {?}
|
|
11945
|
-
*/
|
|
11946
|
-
toggleInfo(data) {
|
|
11947
|
-
/** @type {?} */
|
|
11948
|
-
const stripInfo = this.stripsResultDataMap[data.key].stripInfo;
|
|
11949
|
-
if (stripInfo) {
|
|
11950
|
-
if (stripInfo.mode !== 'below') {
|
|
11951
|
-
this.loggerSvc.warn(`strip info mode: ${stripInfo.mode} not implemented yet`);
|
|
11952
|
-
stripInfo.mode = 'below';
|
|
11953
|
-
}
|
|
11954
|
-
if (stripInfo.mode === 'below') {
|
|
11955
|
-
this.stripsResultDataMap[data.key].stripInfo = Object.assign({}, stripInfo, { visibilityMode: stripInfo.visibilityMode === 'hidden' ? 'visible' : 'hidden' });
|
|
11956
|
-
}
|
|
11957
|
-
}
|
|
11958
|
-
}
|
|
11959
|
-
/**
|
|
11960
|
-
* @private
|
|
11961
|
-
* @param {?} contents
|
|
11962
|
-
* @param {?} strip
|
|
11963
|
-
* @return {?}
|
|
11964
|
-
*/
|
|
11965
|
-
transformContentsToWidgets(contents, strip) {
|
|
11966
|
-
return (contents || []).map((/**
|
|
11967
|
-
* @param {?} content
|
|
11968
|
-
* @param {?} idx
|
|
11969
|
-
* @return {?}
|
|
11970
|
-
*/
|
|
11971
|
-
(content, idx) => (content ? {
|
|
11972
|
-
widgetType: 'cardLib',
|
|
11973
|
-
widgetSubType: 'cardContentLib',
|
|
11974
|
-
widgetHostClass: 'mb-2',
|
|
11975
|
-
widgetData: Object.assign({ content }, (content.batch && { batch: content.batch }), { cardSubType: strip.stripConfig && strip.stripConfig.cardSubType, cardCustomeClass: strip.customeClass ? strip.customeClass : '', context: { pageSection: strip.key, position: idx }, intranetMode: strip.stripConfig && strip.stripConfig.intranetMode, deletedMode: strip.stripConfig && strip.stripConfig.deletedMode, contentTags: strip.stripConfig && strip.stripConfig.contentTags }),
|
|
11976
|
-
} : {
|
|
11977
|
-
widgetType: 'card',
|
|
11978
|
-
widgetSubType: 'cardContent',
|
|
11979
|
-
widgetHostClass: 'mb-2',
|
|
11980
|
-
widgetData: {},
|
|
11981
|
-
})));
|
|
11982
|
-
}
|
|
11983
|
-
/**
|
|
11984
|
-
* @private
|
|
11985
|
-
* @param {?} contents
|
|
11986
|
-
* @param {?} strip
|
|
11987
|
-
* @return {?}
|
|
11988
|
-
*/
|
|
11989
|
-
transformEventsToWidgets(contents, strip) {
|
|
11990
|
-
this.eventSvc.setEventListData(contents);
|
|
11991
|
-
return (this.eventSvc.todaysEvents || []).map((/**
|
|
11992
|
-
* @param {?} content
|
|
11993
|
-
* @param {?} idx
|
|
11994
|
-
* @return {?}
|
|
11995
|
-
*/
|
|
11996
|
-
(content, idx) => (content ? {
|
|
11997
|
-
widgetType: 'card',
|
|
11998
|
-
widgetSubType: 'eventHubCard',
|
|
11999
|
-
widgetHostClass: 'mb-2',
|
|
12000
|
-
widgetData: {
|
|
12001
|
-
content,
|
|
12002
|
-
cardSubType: strip.stripConfig && strip.stripConfig.cardSubType,
|
|
12003
|
-
cardCustomeClass: strip.customeClass ? strip.customeClass : '',
|
|
12004
|
-
context: { pageSection: strip.key, position: idx },
|
|
12005
|
-
intranetMode: strip.stripConfig && strip.stripConfig.intranetMode,
|
|
12006
|
-
deletedMode: strip.stripConfig && strip.stripConfig.deletedMode,
|
|
12007
|
-
contentTags: strip.stripConfig && strip.stripConfig.contentTags,
|
|
12008
|
-
},
|
|
12009
|
-
} : {
|
|
12010
|
-
widgetType: 'card',
|
|
12011
|
-
widgetSubType: 'eventHubCard',
|
|
12012
|
-
widgetHostClass: 'mb-2',
|
|
12013
|
-
widgetData: {},
|
|
12014
|
-
})));
|
|
12015
|
-
}
|
|
12016
|
-
/**
|
|
12017
|
-
* @private
|
|
12018
|
-
* @param {?} strip
|
|
12019
|
-
* @return {?}
|
|
12020
|
-
*/
|
|
12021
|
-
transformSkeletonToWidgets(strip) {
|
|
12022
|
-
return [1, 2, 3, 4, 5, 6, 7, 7, 8, 9, 10].map((/**
|
|
12023
|
-
* @param {?} _content
|
|
12024
|
-
* @return {?}
|
|
12025
|
-
*/
|
|
12026
|
-
_content => ({
|
|
12027
|
-
widgetType: 'cardLib',
|
|
12028
|
-
widgetSubType: 'cardContentLib',
|
|
12029
|
-
widgetHostClass: 'mb-2',
|
|
12030
|
-
widgetData: {
|
|
12031
|
-
cardSubType: strip.loaderConfig && strip.loaderConfig.cardSubType || 'card-standard-skeleton',
|
|
12032
|
-
cardCustomeClass: strip.customeClass ? strip.customeClass : '',
|
|
12033
|
-
},
|
|
12034
|
-
})));
|
|
12035
|
-
}
|
|
12036
|
-
/**
|
|
12037
|
-
* @private
|
|
12038
|
-
* @param {?} strip
|
|
12039
|
-
* @param {?=} results
|
|
12040
|
-
* @param {?=} fetchStatus
|
|
12041
|
-
* @param {?=} calculateParentStatus
|
|
12042
|
-
* @param {?=} _viewMoreUrl
|
|
12043
|
-
* @param {?=} tabsResults
|
|
12044
|
-
* @return {?}
|
|
12045
|
-
*/
|
|
12046
|
-
processStrip(strip, results = [], fetchStatus, calculateParentStatus = true, _viewMoreUrl, tabsResults) {
|
|
11602
|
+
processStrip(strip, results = [], fetchStatus, calculateParentStatus = true, _viewMoreUrl, tabsResults) {
|
|
12047
11603
|
return __awaiter(this, void 0, void 0, function* () {
|
|
12048
11604
|
/** @type {?} */
|
|
12049
11605
|
const stripData = {
|
|
@@ -12144,154 +11700,12 @@ class ContentStripWithTabsPillsComponent extends WidgetBaseComponent {
|
|
|
12144
11700
|
(strip.request.search && Object.keys(strip.request.search).length) ||
|
|
12145
11701
|
(strip.request.searchRegionRecommendation &&
|
|
12146
11702
|
Object.keys(strip.request.searchRegionRecommendation).length) ||
|
|
12147
|
-
(strip.request.searchV6 && Object.keys(strip.request.searchV6).length) ||
|
|
12148
|
-
(strip.request.enrollmentList && Object.keys(strip.request.enrollmentList).length) ||
|
|
12149
11703
|
(strip.request.cbpList && Object.keys(strip.request.cbpList).length) ||
|
|
12150
|
-
(strip.request.trendingSearch && Object.keys(strip.request.trendingSearch).length) ||
|
|
12151
|
-
(strip.request.topContent && Object.keys(strip.request.topContent).length) ||
|
|
12152
|
-
(strip.request.featureContent && Object.keys(strip.request.featureContent).length) ||
|
|
12153
|
-
(strip.request.bookmarkRead && Object.keys(strip.request.bookmarkRead).length) ||
|
|
12154
|
-
(strip.request.playlistSearch && Object.keys(strip.request.playlistSearch).length) ||
|
|
12155
|
-
(strip.request.playlistRead && Object.keys(strip.request.playlistRead).length) ||
|
|
12156
|
-
(strip.request.ciosContent && Object.keys(strip.request.ciosContent).length) ||
|
|
12157
11704
|
(strip && strip.tabs.length))) {
|
|
12158
11705
|
return true;
|
|
12159
11706
|
}
|
|
12160
11707
|
return false;
|
|
12161
11708
|
}
|
|
12162
|
-
// public tabClicked(tabEvent: MatTabChangeEvent, stripMap: IStripUnitContentData, stripKey: string) {
|
|
12163
|
-
// if (stripMap && stripMap.tabs && stripMap.tabs[tabEvent.index]) {
|
|
12164
|
-
// stripMap.tabs[tabEvent.index].fetchTabStatus = 'inprogress';
|
|
12165
|
-
// stripMap.tabs[tabEvent.index].tabLoading = true;
|
|
12166
|
-
// stripMap.showOnLoader = true;
|
|
12167
|
-
// }
|
|
12168
|
-
// const data: WsEvents.ITelemetryTabData = {
|
|
12169
|
-
// label: `${tabEvent.tab.textLabel}`,
|
|
12170
|
-
// index: tabEvent.index,
|
|
12171
|
-
// };
|
|
12172
|
-
// this.eventSvc.raiseInteractTelemetry(
|
|
12173
|
-
// {
|
|
12174
|
-
// type: WsEvents.EnumInteractTypes.CLICK,
|
|
12175
|
-
// subType: WsEvents.EnumInteractSubTypes.HOME_PAGE_STRIP_TABS,
|
|
12176
|
-
// id: `${_.camelCase(data.label)}-tab`,
|
|
12177
|
-
// },
|
|
12178
|
-
// {},
|
|
12179
|
-
// {
|
|
12180
|
-
// module: WsEvents.EnumTelemetrymodules.HOME,
|
|
12181
|
-
// }
|
|
12182
|
-
// );
|
|
12183
|
-
// const currentTabFromMap: any = stripMap.tabs && stripMap.tabs[tabEvent.index];
|
|
12184
|
-
// const currentStrip = this.widgetData.strips.find(s => s.key === stripKey);
|
|
12185
|
-
// if (this.stripsResultDataMap[stripKey] && currentTabFromMap) {
|
|
12186
|
-
// this.stripsResultDataMap[stripKey].viewMoreUrl.queryParams = {
|
|
12187
|
-
// ...this.stripsResultDataMap[stripKey].viewMoreUrl.queryParams,
|
|
12188
|
-
// tabSelected: currentTabFromMap.label,
|
|
12189
|
-
// };
|
|
12190
|
-
// }
|
|
12191
|
-
// if (currentStrip && currentTabFromMap && !currentTabFromMap.computeDataOnClick) {
|
|
12192
|
-
// if (currentTabFromMap.requestRequired && currentTabFromMap.request) {
|
|
12193
|
-
// // call API to get tab data and process
|
|
12194
|
-
// // this.processStrip(currentStrip, [], 'fetching', true, null)
|
|
12195
|
-
// if (currentTabFromMap.request.searchV6) {
|
|
12196
|
-
// this.getTabDataByNewReqSearchV6(currentStrip, tabEvent.index, currentTabFromMap, true);
|
|
12197
|
-
// } else if (currentTabFromMap.request.trendingSearch) {
|
|
12198
|
-
// this.getTabDataByNewReqTrending(currentStrip, tabEvent.index, 0, currentTabFromMap, true);
|
|
12199
|
-
// }
|
|
12200
|
-
// if (stripMap && stripMap.tabs && stripMap.tabs[tabEvent.index]) {
|
|
12201
|
-
// stripMap.tabs[tabEvent.index].tabLoading = false;
|
|
12202
|
-
// }
|
|
12203
|
-
// } else {
|
|
12204
|
-
// this.getTabDataByfilter(currentStrip, currentTabFromMap, true);
|
|
12205
|
-
// setTimeout(() => {
|
|
12206
|
-
// if (stripMap && stripMap.tabs && stripMap.tabs[tabEvent.index]) {
|
|
12207
|
-
// stripMap.tabs[tabEvent.index].tabLoading = false;
|
|
12208
|
-
// stripMap.tabs[tabEvent.index].fetchTabStatus = 'done';
|
|
12209
|
-
// stripMap.showOnLoader = false;
|
|
12210
|
-
// }
|
|
12211
|
-
// }, 200);
|
|
12212
|
-
// }
|
|
12213
|
-
// }
|
|
12214
|
-
// }
|
|
12215
|
-
// async getTabDataByNewReqSearchV6(
|
|
12216
|
-
// strip: NsContentStripWithTabs.IContentStripUnit,
|
|
12217
|
-
// tabIndex: number,
|
|
12218
|
-
// currentTab: NsContentStripWithTabs.IContentStripTab,
|
|
12219
|
-
// calculateParentStatus: boolean
|
|
12220
|
-
// ) {
|
|
12221
|
-
// try {
|
|
12222
|
-
// const response = await this.searchV6Request(strip, currentTab.request, calculateParentStatus);
|
|
12223
|
-
// if (response && response.results) {
|
|
12224
|
-
// const widgets = this.transformContentsToWidgets(response.results.result.content, strip);
|
|
12225
|
-
// let tabResults: any[] = [];
|
|
12226
|
-
// if (this.stripsResultDataMap[strip.key] && this.stripsResultDataMap[strip.key].tabs) {
|
|
12227
|
-
// const allTabs = this.stripsResultDataMap[strip.key].tabs;
|
|
12228
|
-
// if (allTabs && allTabs.length && allTabs[tabIndex]) {
|
|
12229
|
-
// allTabs[tabIndex] = {
|
|
12230
|
-
// ...allTabs[tabIndex],
|
|
12231
|
-
// widgets,
|
|
12232
|
-
// fetchTabStatus: 'done',
|
|
12233
|
-
// };
|
|
12234
|
-
// tabResults = allTabs;
|
|
12235
|
-
// }
|
|
12236
|
-
// }
|
|
12237
|
-
// this.processStrip(
|
|
12238
|
-
// strip,
|
|
12239
|
-
// widgets,
|
|
12240
|
-
// 'done',
|
|
12241
|
-
// calculateParentStatus,
|
|
12242
|
-
// response.viewMoreUrl,
|
|
12243
|
-
// tabResults // tabResults as widgets
|
|
12244
|
-
// );
|
|
12245
|
-
// } else {
|
|
12246
|
-
// this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
12247
|
-
// }
|
|
12248
|
-
// } catch (error) {
|
|
12249
|
-
// // Handle errors
|
|
12250
|
-
// // console.error('Error:', error);
|
|
12251
|
-
// }
|
|
12252
|
-
// }
|
|
12253
|
-
// async getTabDataByNewReqTrending(
|
|
12254
|
-
// strip: NsContentStripWithTabs.IContentStripUnit,
|
|
12255
|
-
// tabIndex: number,
|
|
12256
|
-
// currentTab: NsContentStripWithTabs.IContentStripTab,
|
|
12257
|
-
// calculateParentStatus: boolean
|
|
12258
|
-
// ) {
|
|
12259
|
-
// try {
|
|
12260
|
-
// const response = await this.trendingSearchRequest(strip, currentTab.request, calculateParentStatus);
|
|
12261
|
-
// if (response && response.results && response.results.response) {
|
|
12262
|
-
// const content = response.results.response[currentTab.value] || [];
|
|
12263
|
-
// const widgets = this.transformContentsToWidgets(content, strip);
|
|
12264
|
-
// // console.log('currentTab --- widgets', widgets)
|
|
12265
|
-
// let tabResults: any[] = [];
|
|
12266
|
-
// if (this.stripsResultDataMap[strip.key] && this.stripsResultDataMap[strip.key].tabs) {
|
|
12267
|
-
// const allTabs = this.stripsResultDataMap[strip.key].tabs;
|
|
12268
|
-
// if (allTabs && allTabs.length && allTabs[tabIndex]) {
|
|
12269
|
-
// allTabs[tabIndex] = {
|
|
12270
|
-
// ...allTabs[tabIndex],
|
|
12271
|
-
// widgets,
|
|
12272
|
-
// fetchTabStatus: 'done',
|
|
12273
|
-
// };
|
|
12274
|
-
// tabResults = allTabs;
|
|
12275
|
-
// }
|
|
12276
|
-
// }
|
|
12277
|
-
// // console.log('tabResults -++++***--', tabResults)
|
|
12278
|
-
// // console.log('calling after-- ')
|
|
12279
|
-
// this.processStrip(
|
|
12280
|
-
// strip,
|
|
12281
|
-
// widgets,
|
|
12282
|
-
// 'done',
|
|
12283
|
-
// calculateParentStatus,
|
|
12284
|
-
// response.viewMoreUrl,
|
|
12285
|
-
// tabResults // tabResults as widgets
|
|
12286
|
-
// );
|
|
12287
|
-
// } else {
|
|
12288
|
-
// this.processStrip(strip, [], 'done', calculateParentStatus, null);
|
|
12289
|
-
// }
|
|
12290
|
-
// } catch (error) {
|
|
12291
|
-
// // Handle errors
|
|
12292
|
-
// this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
12293
|
-
// }
|
|
12294
|
-
// }
|
|
12295
11709
|
/**
|
|
12296
11710
|
* @param {?} strip
|
|
12297
11711
|
* @param {?} currentTab
|
|
@@ -12300,653 +11714,70 @@ class ContentStripWithTabsPillsComponent extends WidgetBaseComponent {
|
|
|
12300
11714
|
*/
|
|
12301
11715
|
getTabDataByfilter(strip, currentTab, calculateParentStatus) {
|
|
12302
11716
|
// tslint:disable:no-console
|
|
12303
|
-
console.log('strip -- ', strip);
|
|
12304
|
-
// tslint:disable:no-console
|
|
12305
|
-
console.log('currentTab -- ', currentTab);
|
|
12306
|
-
// tslint:disable:no-console
|
|
12307
|
-
console.log('calculateParentStatus-- ', calculateParentStatus);
|
|
12308
|
-
// TODO: Write logic for individual filter if passed in config
|
|
12309
|
-
// add switch case based on config key passed
|
|
12310
|
-
}
|
|
12311
|
-
// async fetchAllCbpPlans(strip: any, calculateParentStatus = true) {
|
|
12312
|
-
// if (strip.request && strip.request.cbpList && Object.keys(strip.request.cbpList).length) {
|
|
12313
|
-
// let courses: NsContent.IContent[];
|
|
12314
|
-
// let tabResults: any[] = [];
|
|
12315
|
-
// const response = await this.userSvc.fetchCbpPlanList().toPromise();
|
|
12316
|
-
// if (response) {
|
|
12317
|
-
// courses = response;
|
|
12318
|
-
// if (strip.tabs && strip.tabs.length) {
|
|
12319
|
-
// tabResults = this.splitCbpTabsData(courses, strip);
|
|
12320
|
-
// await this.processStrip(
|
|
12321
|
-
// strip,
|
|
12322
|
-
// this.transformContentsToWidgets(courses, strip),
|
|
12323
|
-
// 'done',
|
|
12324
|
-
// calculateParentStatus,
|
|
12325
|
-
// '',
|
|
12326
|
-
// tabResults
|
|
12327
|
-
// );
|
|
12328
|
-
// } else {
|
|
12329
|
-
// this.processStrip(
|
|
12330
|
-
// strip,
|
|
12331
|
-
// this.transformContentsToWidgets(courses, strip),
|
|
12332
|
-
// 'done',
|
|
12333
|
-
// calculateParentStatus,
|
|
12334
|
-
// 'viewMoreUrl',
|
|
12335
|
-
// );
|
|
12336
|
-
// }
|
|
12337
|
-
// }
|
|
12338
|
-
// // this.userSvc.fetchCbpPlanList().subscribe( async (res: any) => {
|
|
12339
|
-
// // if (res) {
|
|
12340
|
-
// // console.log(res,'===============================>')
|
|
12341
|
-
// // courses = res
|
|
12342
|
-
// // if (strip.tabs && strip.tabs.length) {
|
|
12343
|
-
// // tabResults = this.splitCbpTabsData(courses, strip)
|
|
12344
|
-
// // await this.processStrip(
|
|
12345
|
-
// // strip,
|
|
12346
|
-
// // this.transformContentsToWidgets(courses, strip),
|
|
12347
|
-
// // 'done',
|
|
12348
|
-
// // calculateParentStatus,
|
|
12349
|
-
// // '',
|
|
12350
|
-
// // tabResults
|
|
12351
|
-
// // )
|
|
12352
|
-
// // } else {
|
|
12353
|
-
// // this.processStrip(
|
|
12354
|
-
// // strip,
|
|
12355
|
-
// // this.transformContentsToWidgets(courses, strip),
|
|
12356
|
-
// // 'done',
|
|
12357
|
-
// // calculateParentStatus,
|
|
12358
|
-
// // 'viewMoreUrl',
|
|
12359
|
-
// // )
|
|
12360
|
-
// // }
|
|
12361
|
-
// // }
|
|
12362
|
-
// // }, (_err: any) => {
|
|
12363
|
-
// // })
|
|
12364
|
-
// clearInterval(this.enrollInterval);
|
|
12365
|
-
// }
|
|
12366
|
-
// }
|
|
12367
|
-
// splitCbpTabsData(contentNew: NsContent.IContent[], strip: NsContentStripWithTabs.IContentStripUnit) {
|
|
12368
|
-
// const tabResults: any[] = [];
|
|
12369
|
-
// const splitData = this.getTabsList(
|
|
12370
|
-
// contentNew,
|
|
12371
|
-
// strip,
|
|
12372
|
-
// );
|
|
12373
|
-
// if (strip.tabs && strip.tabs.length) {
|
|
12374
|
-
// for (let i = 0; i < strip.tabs.length; i += 1) {
|
|
12375
|
-
// if (strip.tabs[i]) {
|
|
12376
|
-
// tabResults.push(
|
|
12377
|
-
// {
|
|
12378
|
-
// ...strip.tabs[i],
|
|
12379
|
-
// fetchTabStatus: 'done',
|
|
12380
|
-
// ...(splitData.find(itmInner => {
|
|
12381
|
-
// if (strip.tabs && strip.tabs[i] && itmInner.value === strip.tabs[i].value) {
|
|
12382
|
-
// return itmInner;
|
|
12383
|
-
// }
|
|
12384
|
-
// return undefined;
|
|
12385
|
-
// })),
|
|
12386
|
-
// }
|
|
12387
|
-
// );
|
|
12388
|
-
// }
|
|
12389
|
-
// }
|
|
12390
|
-
// }
|
|
12391
|
-
// return tabResults;
|
|
12392
|
-
// }
|
|
12393
|
-
// getTabsList(array: NsContent.IContent[],
|
|
12394
|
-
// strip: NsContentStripWithTabs.IContentStripUnit) {
|
|
12395
|
-
// let all: any[] = [];
|
|
12396
|
-
// let upcoming: any[] = [];
|
|
12397
|
-
// let overdue: any[] = [];
|
|
12398
|
-
// array.forEach((e: any) => {
|
|
12399
|
-
// all.push(e);
|
|
12400
|
-
// if (e.planDuration === NsCardContent.ACBPConst.OVERDUE) {
|
|
12401
|
-
// overdue.push(e);
|
|
12402
|
-
// } else if (e.planDuration === NsCardContent.ACBPConst.UPCOMING) {
|
|
12403
|
-
// upcoming.push(e);
|
|
12404
|
-
// }
|
|
12405
|
-
// });
|
|
12406
|
-
// const allCompleted = all.filter((allData: any) => allData.contentStatus === 2);
|
|
12407
|
-
// let allInCompleted = all.filter((allData: any) => allData.contentStatus < 2);
|
|
12408
|
-
// let allCompletedOverDue = allCompleted.filter((allData: any) => allData.planDuration === NsCardContent.ACBPConst.OVERDUE);
|
|
12409
|
-
// const allCompletedAll = allCompleted.filter((allData: any) => allData.planDuration !== NsCardContent.ACBPConst.OVERDUE);
|
|
12410
|
-
// allCompletedOverDue = allCompletedOverDue.sort((a: any, b: any): any => {
|
|
12411
|
-
// if (a.planDuration === NsCardContent.ACBPConst.OVERDUE && b.planDuration === NsCardContent.ACBPConst.OVERDUE) {
|
|
12412
|
-
// const firstDate: any = new Date(a.endDate);
|
|
12413
|
-
// const secondDate: any = new Date(b.endDate);
|
|
12414
|
-
// return firstDate > secondDate ? -1 : 1;
|
|
12415
|
-
// }
|
|
12416
|
-
// });
|
|
12417
|
-
// allInCompleted = allInCompleted.sort((a: any, b: any): any => {
|
|
12418
|
-
// if (a.planDuration === NsCardContent.ACBPConst.OVERDUE && b.planDuration === NsCardContent.ACBPConst.OVERDUE) {
|
|
12419
|
-
// const firstDate: any = new Date(a.endDate);
|
|
12420
|
-
// const secondDate: any = new Date(b.endDate);
|
|
12421
|
-
// return firstDate > secondDate ? -1 : 1;
|
|
12422
|
-
// }
|
|
12423
|
-
// });
|
|
12424
|
-
// all = [...allInCompleted, ...allCompletedAll, ...allCompletedOverDue];
|
|
12425
|
-
// overdue = overdue.filter((data: any): any => {
|
|
12426
|
-
// return data.contentStatus < 2;
|
|
12427
|
-
// });
|
|
12428
|
-
// overdue = overdue.sort((a: any, b: any): any => {
|
|
12429
|
-
// const firstDate: any = new Date(a.endDate);
|
|
12430
|
-
// const secondDate: any = new Date(b.endDate);
|
|
12431
|
-
// return firstDate > secondDate ? -1 : 1;
|
|
12432
|
-
// });
|
|
12433
|
-
// upcoming = upcoming.filter((data: any): any => {
|
|
12434
|
-
// return data.contentStatus < 2;
|
|
12435
|
-
// });
|
|
12436
|
-
// // this.getSelectedIndex(1)
|
|
12437
|
-
// return [
|
|
12438
|
-
// { value: 'all', widgets: this.transformContentsToWidgets(all, strip) },
|
|
12439
|
-
// { value: 'upcoming', widgets: this.transformContentsToWidgets(upcoming, strip) },
|
|
12440
|
-
// { value: 'overdue', widgets: this.transformContentsToWidgets(overdue, strip) }];
|
|
12441
|
-
// }
|
|
12442
|
-
/**
|
|
12443
|
-
* @param {?} stripsResultDataMap
|
|
12444
|
-
* @param {?} key
|
|
12445
|
-
* @return {?}
|
|
12446
|
-
*/
|
|
12447
|
-
getSelectedIndex(stripsResultDataMap, key) {
|
|
12448
|
-
/** @type {?} */
|
|
12449
|
-
let returnValue = 0;
|
|
12450
|
-
// if (key === 'cbpPlan') {
|
|
12451
|
-
// if (stripsResultDataMap.tabs.length) {
|
|
12452
|
-
// const data = stripsResultDataMap.tabs.filter((ele: any) => ele.value === 'upcoming');
|
|
12453
|
-
// returnValue = data[0].widgets && data[0].widgets.length > 0 ? 1 : 0;
|
|
12454
|
-
// }
|
|
12455
|
-
// }
|
|
12456
|
-
return returnValue;
|
|
12457
|
-
}
|
|
12458
|
-
/**
|
|
12459
|
-
* @param {?} label
|
|
12460
|
-
* @param {?} type
|
|
12461
|
-
* @return {?}
|
|
12462
|
-
*/
|
|
12463
|
-
translateLabels(label, type) {
|
|
12464
|
-
return this.langtranslations.translateLabel(label, type, '');
|
|
12465
|
-
}
|
|
12466
|
-
/**
|
|
12467
|
-
* @param {?} index
|
|
12468
|
-
* @param {?} item
|
|
12469
|
-
* @return {?}
|
|
12470
|
-
*/
|
|
12471
|
-
identify(index, item) {
|
|
12472
|
-
if (index >= 0) { }
|
|
12473
|
-
return item;
|
|
12474
|
-
}
|
|
12475
|
-
/**
|
|
12476
|
-
* @param {?} index
|
|
12477
|
-
* @param {?} item
|
|
12478
|
-
* @return {?}
|
|
12479
|
-
*/
|
|
12480
|
-
tracker(index, item) {
|
|
12481
|
-
if (index >= 0) { }
|
|
12482
|
-
return get(item, 'widgetData.content.identifier');
|
|
12483
|
-
}
|
|
12484
|
-
/**
|
|
12485
|
-
* @param {?} strip
|
|
12486
|
-
* @param {?=} calculateParentStatus
|
|
12487
|
-
* @return {?}
|
|
12488
|
-
*/
|
|
12489
|
-
fetchAllTopContent(strip, calculateParentStatus = true) {
|
|
12490
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
12491
|
-
if (strip.request && strip.request.topContent && Object.keys(strip.request.topContent).length) {
|
|
12492
|
-
/** @type {?} */
|
|
12493
|
-
let originalFilters = [];
|
|
12494
|
-
if (strip.request &&
|
|
12495
|
-
strip.request.topContent &&
|
|
12496
|
-
strip.request.topContent.request &&
|
|
12497
|
-
strip.request.topContent.request.filters) {
|
|
12498
|
-
originalFilters = strip.request.topContent.request.filters;
|
|
12499
|
-
strip.request.topContent.request.filters = this.postMethodFilters(strip.request.topContent.request.filters);
|
|
12500
|
-
}
|
|
12501
|
-
try {
|
|
12502
|
-
/** @type {?} */
|
|
12503
|
-
const response = yield this.postRequestMethod(strip, strip.request.topContent, strip.request.apiUrl, calculateParentStatus);
|
|
12504
|
-
// console.log('calling after - response, ', response)
|
|
12505
|
-
if (response && response.results) {
|
|
12506
|
-
// console.log('calling after-- ')
|
|
12507
|
-
if (response.results.result.content && response.results.result.content.length) {
|
|
12508
|
-
this.processStrip(strip, this.transformContentsToWidgets(response.results.result.content, strip), 'done', calculateParentStatus, response.viewMoreUrl);
|
|
12509
|
-
}
|
|
12510
|
-
else {
|
|
12511
|
-
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
12512
|
-
this.emptyResponse.emit(true);
|
|
12513
|
-
}
|
|
12514
|
-
}
|
|
12515
|
-
else {
|
|
12516
|
-
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
12517
|
-
this.emptyResponse.emit(true);
|
|
12518
|
-
}
|
|
12519
|
-
}
|
|
12520
|
-
catch (error) {
|
|
12521
|
-
// Handle errors
|
|
12522
|
-
// console.error('Error:', error);
|
|
12523
|
-
}
|
|
12524
|
-
}
|
|
12525
|
-
});
|
|
12526
|
-
}
|
|
12527
|
-
/**
|
|
12528
|
-
* @param {?} strip
|
|
12529
|
-
* @param {?=} calculateParentStatus
|
|
12530
|
-
* @return {?}
|
|
12531
|
-
*/
|
|
12532
|
-
fetchAllFeaturedContent(strip, calculateParentStatus = true) {
|
|
12533
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
12534
|
-
if (strip.request && strip.request.featureContent && Object.keys(strip.request.featureContent).length) {
|
|
12535
|
-
/** @type {?} */
|
|
12536
|
-
let originalFilters = [];
|
|
12537
|
-
if (strip.request &&
|
|
12538
|
-
strip.request.featureContent &&
|
|
12539
|
-
strip.request.featureContent.request &&
|
|
12540
|
-
strip.request.featureContent.request.filters) {
|
|
12541
|
-
originalFilters = strip.request.featureContent.request.filters;
|
|
12542
|
-
strip.request.featureContent.request.filters = this.postMethodFilters(strip.request.featureContent.request.filters);
|
|
12543
|
-
}
|
|
12544
|
-
try {
|
|
12545
|
-
/** @type {?} */
|
|
12546
|
-
const response = yield this.postRequestMethod(strip, strip.request.featureContent, strip.request.apiUrl, calculateParentStatus);
|
|
12547
|
-
// console.log('calling after - response, ', response)
|
|
12548
|
-
if (response && response.results) {
|
|
12549
|
-
// console.log('calling after-- ')
|
|
12550
|
-
if (response.results.result.content && response.results.result.content.length) {
|
|
12551
|
-
this.processStrip(strip, this.transformContentsToWidgets(response.results.result.content, strip), 'done', calculateParentStatus, response.viewMoreUrl);
|
|
12552
|
-
}
|
|
12553
|
-
else {
|
|
12554
|
-
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
12555
|
-
this.emptyResponse.emit(true);
|
|
12556
|
-
}
|
|
12557
|
-
}
|
|
12558
|
-
else {
|
|
12559
|
-
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
12560
|
-
this.emptyResponse.emit(true);
|
|
12561
|
-
}
|
|
12562
|
-
}
|
|
12563
|
-
catch (error) {
|
|
12564
|
-
this.emptyResponse.emit(true);
|
|
12565
|
-
// Handle errors
|
|
12566
|
-
// console.error('Error:', error);
|
|
12567
|
-
}
|
|
12568
|
-
}
|
|
12569
|
-
});
|
|
12570
|
-
}
|
|
12571
|
-
/**
|
|
12572
|
-
* @param {?} stripData
|
|
12573
|
-
* @return {?}
|
|
12574
|
-
*/
|
|
12575
|
-
raiseTelemetry(stripData) {
|
|
12576
|
-
this.telemtryResponse.emit(stripData);
|
|
12577
|
-
}
|
|
12578
|
-
/**
|
|
12579
|
-
* @param {?} strip
|
|
12580
|
-
* @param {?} request
|
|
12581
|
-
* @param {?} apiUrl
|
|
12582
|
-
* @param {?} calculateParentStatus
|
|
12583
|
-
* @return {?}
|
|
12584
|
-
*/
|
|
12585
|
-
postRequestMethod(strip, request, apiUrl, calculateParentStatus) {
|
|
12586
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
12587
|
-
return new Promise((/**
|
|
12588
|
-
* @param {?} resolve
|
|
12589
|
-
* @param {?} reject
|
|
12590
|
-
* @return {?}
|
|
12591
|
-
*/
|
|
12592
|
-
(resolve, reject) => {
|
|
12593
|
-
if (request && request) {
|
|
12594
|
-
this.contentSvc.postApiMethod(apiUrl, request).subscribe((/**
|
|
12595
|
-
* @param {?} results
|
|
12596
|
-
* @return {?}
|
|
12597
|
-
*/
|
|
12598
|
-
results => {
|
|
12599
|
-
if (results.result && results.result.content) {
|
|
12600
|
-
/** @type {?} */
|
|
12601
|
-
const showViewMore = Boolean(results.result.content && results.result.content.length > 5 && strip.stripConfig && strip.stripConfig.postCardForSearch);
|
|
12602
|
-
/** @type {?} */
|
|
12603
|
-
const viewMoreUrl = showViewMore
|
|
12604
|
-
? {
|
|
12605
|
-
path: strip.viewMoreUrl && strip.viewMoreUrl.path || '',
|
|
12606
|
-
queryParams: {
|
|
12607
|
-
tab: 'Learn',
|
|
12608
|
-
q: strip.viewMoreUrl && strip.viewMoreUrl.queryParams,
|
|
12609
|
-
f: {},
|
|
12610
|
-
},
|
|
12611
|
-
}
|
|
12612
|
-
: null;
|
|
12613
|
-
resolve({ results, viewMoreUrl });
|
|
12614
|
-
}
|
|
12615
|
-
else if (results && results.data) {
|
|
12616
|
-
/** @type {?} */
|
|
12617
|
-
const showViewMore = Boolean(results.data && results.data.length > 5 && strip.stripConfig && strip.stripConfig.postCardForSearch);
|
|
12618
|
-
/** @type {?} */
|
|
12619
|
-
const viewMoreUrl = showViewMore ? {
|
|
12620
|
-
path: strip.viewMoreUrl && strip.viewMoreUrl.path || '',
|
|
12621
|
-
queryParams: {
|
|
12622
|
-
tab: 'Learn',
|
|
12623
|
-
q: strip.viewMoreUrl && strip.viewMoreUrl.queryParams,
|
|
12624
|
-
f: {},
|
|
12625
|
-
},
|
|
12626
|
-
}
|
|
12627
|
-
: null;
|
|
12628
|
-
resolve({ results, viewMoreUrl });
|
|
12629
|
-
}
|
|
12630
|
-
else if (results.result && results.result.data) {
|
|
12631
|
-
/** @type {?} */
|
|
12632
|
-
const showViewMore = Boolean(results.data && results.result.data && results.result.data.length > 5 && strip.stripConfig && strip.stripConfig.postCardForSearch);
|
|
12633
|
-
/** @type {?} */
|
|
12634
|
-
const viewMoreUrl = showViewMore ? {
|
|
12635
|
-
path: strip.viewMoreUrl && strip.viewMoreUrl.path || '',
|
|
12636
|
-
queryParams: {
|
|
12637
|
-
tab: 'Learn',
|
|
12638
|
-
q: strip.viewMoreUrl && strip.viewMoreUrl.queryParams,
|
|
12639
|
-
f: {},
|
|
12640
|
-
},
|
|
12641
|
-
}
|
|
12642
|
-
: null;
|
|
12643
|
-
resolve({ results, viewMoreUrl });
|
|
12644
|
-
}
|
|
12645
|
-
}), (/**
|
|
12646
|
-
* @param {?} error
|
|
12647
|
-
* @return {?}
|
|
12648
|
-
*/
|
|
12649
|
-
(error) => {
|
|
12650
|
-
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
12651
|
-
reject(error);
|
|
12652
|
-
}));
|
|
12653
|
-
}
|
|
12654
|
-
}));
|
|
12655
|
-
});
|
|
12656
|
-
}
|
|
12657
|
-
/**
|
|
12658
|
-
* @param {?} strip
|
|
12659
|
-
* @param {?} request
|
|
12660
|
-
* @param {?} apiUrl
|
|
12661
|
-
* @param {?} calculateParentStatus
|
|
12662
|
-
* @return {?}
|
|
12663
|
-
*/
|
|
12664
|
-
getRequestMethod(strip, request, apiUrl, calculateParentStatus) {
|
|
12665
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
12666
|
-
/** @type {?} */
|
|
12667
|
-
const originalFilters = [];
|
|
12668
|
-
return new Promise((/**
|
|
12669
|
-
* @param {?} resolve
|
|
12670
|
-
* @param {?} reject
|
|
12671
|
-
* @return {?}
|
|
12672
|
-
*/
|
|
12673
|
-
(resolve, reject) => {
|
|
12674
|
-
if (request && request) {
|
|
12675
|
-
this.contentSvc.getApiMethod(apiUrl).subscribe((/**
|
|
12676
|
-
* @param {?} results
|
|
12677
|
-
* @return {?}
|
|
12678
|
-
*/
|
|
12679
|
-
results => {
|
|
12680
|
-
/** @type {?} */
|
|
12681
|
-
const showViewMore = Boolean(results.result.data && results.result.data.orgList.length > 5 && strip.stripConfig && strip.stripConfig.postCardForSearch);
|
|
12682
|
-
/** @type {?} */
|
|
12683
|
-
const viewMoreUrl = showViewMore
|
|
12684
|
-
? {
|
|
12685
|
-
path: strip.viewMoreUrl && strip.viewMoreUrl.path || '',
|
|
12686
|
-
}
|
|
12687
|
-
: null;
|
|
12688
|
-
resolve({ results, viewMoreUrl });
|
|
12689
|
-
}), (/**
|
|
12690
|
-
* @param {?} error
|
|
12691
|
-
* @return {?}
|
|
12692
|
-
*/
|
|
12693
|
-
(error) => {
|
|
12694
|
-
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
12695
|
-
reject(error);
|
|
12696
|
-
}));
|
|
12697
|
-
}
|
|
12698
|
-
}));
|
|
12699
|
-
});
|
|
12700
|
-
}
|
|
12701
|
-
/**
|
|
12702
|
-
* @param {?} filters
|
|
12703
|
-
* @return {?}
|
|
12704
|
-
*/
|
|
12705
|
-
postMethodFilters(filters) {
|
|
12706
|
-
if (filters.organisation &&
|
|
12707
|
-
filters.organisation.indexOf('<orgID>') >= 0) {
|
|
12708
|
-
filters.organisation = this.providerId;
|
|
12709
|
-
}
|
|
12710
|
-
return filters;
|
|
12711
|
-
}
|
|
12712
|
-
/**
|
|
12713
|
-
* @param {?} apiUrl
|
|
12714
|
-
* @param {?} id
|
|
12715
|
-
* @return {?}
|
|
12716
|
-
*/
|
|
12717
|
-
getFullUrl(apiUrl, id) {
|
|
12718
|
-
/** @type {?} */
|
|
12719
|
-
let formedUrl = '';
|
|
12720
|
-
if (apiUrl.indexOf('<bookmarkId>') >= 0) {
|
|
12721
|
-
formedUrl = apiUrl.replace('<bookmarkId>', this.environment.mdoChannelsBookmarkId);
|
|
12722
|
-
}
|
|
12723
|
-
else if (apiUrl.indexOf('<playlistKey>') >= 0 && apiUrl.indexOf('<orgID>') >= 0) {
|
|
12724
|
-
formedUrl = apiUrl.replace('<playlistKey>', this.providerId + id);
|
|
12725
|
-
formedUrl = formedUrl.replace('<orgID>', this.providerId);
|
|
12726
|
-
}
|
|
12727
|
-
return formedUrl;
|
|
12728
|
-
}
|
|
12729
|
-
/**
|
|
12730
|
-
* @param {?} stripData
|
|
12731
|
-
* @param {?} path
|
|
12732
|
-
* @param {?} queryParamsData
|
|
12733
|
-
* @return {?}
|
|
12734
|
-
*/
|
|
12735
|
-
redirectViewAll(stripData, path, queryParamsData) {
|
|
12736
|
-
if (this.emitViewAll) {
|
|
12737
|
-
this.viewAllResponse.emit(stripData);
|
|
12738
|
-
}
|
|
12739
|
-
else {
|
|
12740
|
-
this.router.navigate([path], { queryParams: queryParamsData });
|
|
12741
|
-
}
|
|
12742
|
-
}
|
|
12743
|
-
/**
|
|
12744
|
-
* @param {?} strip
|
|
12745
|
-
* @param {?=} calculateParentStatus
|
|
12746
|
-
* @return {?}
|
|
12747
|
-
*/
|
|
12748
|
-
fetchAllBookMarkData(strip, calculateParentStatus = true) {
|
|
12749
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
12750
|
-
if (strip.request && strip.request.bookmarkRead && Object.keys(strip.request.bookmarkRead).length) {
|
|
12751
|
-
/** @type {?} */
|
|
12752
|
-
let originalFilters = [];
|
|
12753
|
-
if (strip.request &&
|
|
12754
|
-
strip.request.bookmarkRead &&
|
|
12755
|
-
strip.request.bookmarkRead.bookmarkId) {
|
|
12756
|
-
strip.request.apiUrl = this.getFullUrl(strip.request.apiUrl, strip.request.bookmarkRead.bookmarkId);
|
|
12757
|
-
}
|
|
12758
|
-
try {
|
|
12759
|
-
/** @type {?} */
|
|
12760
|
-
const response = yield this.getRequestMethod(strip, strip.request.bookmarkRead, strip.request.apiUrl, calculateParentStatus);
|
|
12761
|
-
/** @type {?} */
|
|
12762
|
-
let content = response.results.result.data.orgList;
|
|
12763
|
-
if (response) {
|
|
12764
|
-
this.processStrip(strip, this.transformAllContentsToWidgets(content, strip), 'done', calculateParentStatus, response);
|
|
12765
|
-
}
|
|
12766
|
-
else {
|
|
12767
|
-
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
12768
|
-
this.emptyResponse.emit(true);
|
|
12769
|
-
}
|
|
12770
|
-
}
|
|
12771
|
-
catch (error) {
|
|
12772
|
-
this.emptyResponse.emit(true);
|
|
12773
|
-
// Handle errors
|
|
12774
|
-
// console.error('Error:', error);
|
|
12775
|
-
}
|
|
12776
|
-
}
|
|
12777
|
-
});
|
|
11717
|
+
console.log('strip -- ', strip);
|
|
11718
|
+
// tslint:disable:no-console
|
|
11719
|
+
console.log('currentTab -- ', currentTab);
|
|
11720
|
+
// tslint:disable:no-console
|
|
11721
|
+
console.log('calculateParentStatus-- ', calculateParentStatus);
|
|
11722
|
+
// TODO: Write logic for individual filter if passed in config
|
|
11723
|
+
// add switch case based on config key passed
|
|
12778
11724
|
}
|
|
12779
11725
|
/**
|
|
12780
|
-
* @
|
|
12781
|
-
* @param {?}
|
|
12782
|
-
* @param {?} strip
|
|
11726
|
+
* @param {?} stripsResultDataMap
|
|
11727
|
+
* @param {?} key
|
|
12783
11728
|
* @return {?}
|
|
12784
11729
|
*/
|
|
12785
|
-
|
|
12786
|
-
|
|
12787
|
-
|
|
12788
|
-
|
|
12789
|
-
* @return {?}
|
|
12790
|
-
*/
|
|
12791
|
-
(content, idx) => (content ? {
|
|
12792
|
-
widgetType: 'cardLib',
|
|
12793
|
-
widgetSubType: 'cardContentLib',
|
|
12794
|
-
widgetHostClass: 'mb-2',
|
|
12795
|
-
widgetData: Object.assign({ content }, (content.batch && { batch: content.batch }), { cardSubType: strip.stripConfig && strip.stripConfig.cardSubType, cardCustomeClass: strip.customeClass ? strip.customeClass : '', context: { pageSection: strip.key, position: idx }, intranetMode: strip.stripConfig && strip.stripConfig.intranetMode, deletedMode: strip.stripConfig && strip.stripConfig.deletedMode, contentTags: strip.stripConfig && strip.stripConfig.contentTags }),
|
|
12796
|
-
} : {
|
|
12797
|
-
widgetType: 'card',
|
|
12798
|
-
widgetSubType: 'cardContent',
|
|
12799
|
-
widgetHostClass: 'mb-2',
|
|
12800
|
-
widgetData: {},
|
|
12801
|
-
})));
|
|
11730
|
+
getSelectedIndex(stripsResultDataMap, key) {
|
|
11731
|
+
/** @type {?} */
|
|
11732
|
+
let returnValue = 0;
|
|
11733
|
+
return returnValue;
|
|
12802
11734
|
}
|
|
12803
11735
|
/**
|
|
12804
|
-
* @param {?}
|
|
12805
|
-
* @param {
|
|
11736
|
+
* @param {?} label
|
|
11737
|
+
* @param {?} type
|
|
12806
11738
|
* @return {?}
|
|
12807
11739
|
*/
|
|
12808
|
-
|
|
12809
|
-
return
|
|
12810
|
-
if (strip.request && strip.request.playlistSearch && Object.keys(strip.request.playlistSearch).length) {
|
|
12811
|
-
/** @type {?} */
|
|
12812
|
-
let originalFilters = [];
|
|
12813
|
-
if (strip.request &&
|
|
12814
|
-
strip.request.playlistSearch &&
|
|
12815
|
-
strip.request.playlistSearch.request &&
|
|
12816
|
-
strip.request.playlistSearch.request.filters) {
|
|
12817
|
-
originalFilters = strip.request.playlistSearch.request.filters;
|
|
12818
|
-
strip.request.playlistSearch.request.filters = this.postMethodFilters(strip.request.playlistSearch.request.filters);
|
|
12819
|
-
}
|
|
12820
|
-
try {
|
|
12821
|
-
/** @type {?} */
|
|
12822
|
-
const response = yield this.postRequestMethod(strip, strip.request.playlistSearch.request, strip.request.apiUrl, calculateParentStatus);
|
|
12823
|
-
// console.log('calling after - response, ', response)
|
|
12824
|
-
if (response && response.results) {
|
|
12825
|
-
// console.log('calling after-- ')
|
|
12826
|
-
if (response.results.result.data && response.results.result.data.length) {
|
|
12827
|
-
/** @type {?} */
|
|
12828
|
-
let finalPlaylistData = [];
|
|
12829
|
-
/** @type {?} */
|
|
12830
|
-
let programData = response.results.result.data;
|
|
12831
|
-
programData.forEach((/**
|
|
12832
|
-
* @param {?} prgData
|
|
12833
|
-
* @return {?}
|
|
12834
|
-
*/
|
|
12835
|
-
(prgData) => {
|
|
12836
|
-
if (prgData.children && prgData.children.length) {
|
|
12837
|
-
finalPlaylistData.push(prgData);
|
|
12838
|
-
}
|
|
12839
|
-
}));
|
|
12840
|
-
if (finalPlaylistData.length) {
|
|
12841
|
-
this.processStrip(strip, this.transformContentsToWidgets(finalPlaylistData, strip), 'done', calculateParentStatus, response.viewMoreUrl);
|
|
12842
|
-
}
|
|
12843
|
-
else {
|
|
12844
|
-
this.emptyResponse.emit(true);
|
|
12845
|
-
}
|
|
12846
|
-
}
|
|
12847
|
-
else {
|
|
12848
|
-
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
12849
|
-
this.emptyResponse.emit(true);
|
|
12850
|
-
}
|
|
12851
|
-
}
|
|
12852
|
-
else {
|
|
12853
|
-
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
12854
|
-
this.emptyResponse.emit(true);
|
|
12855
|
-
}
|
|
12856
|
-
}
|
|
12857
|
-
catch (error) {
|
|
12858
|
-
this.emptyResponse.emit(true);
|
|
12859
|
-
// Handle errors
|
|
12860
|
-
// console.error('Error:', error);
|
|
12861
|
-
}
|
|
12862
|
-
}
|
|
12863
|
-
});
|
|
11740
|
+
translateLabels(label, type) {
|
|
11741
|
+
return this.langtranslations.translateLabel(label, type, '');
|
|
12864
11742
|
}
|
|
12865
11743
|
/**
|
|
12866
|
-
* @param {?}
|
|
12867
|
-
* @param {
|
|
11744
|
+
* @param {?} index
|
|
11745
|
+
* @param {?} item
|
|
12868
11746
|
* @return {?}
|
|
12869
11747
|
*/
|
|
12870
|
-
|
|
12871
|
-
|
|
12872
|
-
|
|
12873
|
-
/** @type {?} */
|
|
12874
|
-
let originalFilters = [];
|
|
12875
|
-
if (strip.request &&
|
|
12876
|
-
strip.request.playlistRead &&
|
|
12877
|
-
strip.request.playlistRead.type) {
|
|
12878
|
-
strip.request.apiUrl = this.getFullUrl(strip.request.apiUrl, strip.request.playlistRead.type);
|
|
12879
|
-
}
|
|
12880
|
-
try {
|
|
12881
|
-
/** @type {?} */
|
|
12882
|
-
const response = yield this.getRequestMethod(strip, strip.request.playlistRead, strip.request.apiUrl, calculateParentStatus);
|
|
12883
|
-
if (response && response.results.result.content) {
|
|
12884
|
-
/** @type {?} */
|
|
12885
|
-
let content = response.results.result.content;
|
|
12886
|
-
this.processStrip(strip, this.transformAllContentsToWidgets(content, strip), 'done', calculateParentStatus, response);
|
|
12887
|
-
}
|
|
12888
|
-
else {
|
|
12889
|
-
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
12890
|
-
this.emptyResponse.emit(true);
|
|
12891
|
-
}
|
|
12892
|
-
}
|
|
12893
|
-
catch (error) {
|
|
12894
|
-
this.emptyResponse.emit(true);
|
|
12895
|
-
// Handle errors
|
|
12896
|
-
// console.error('Error:', error);
|
|
12897
|
-
}
|
|
12898
|
-
}
|
|
12899
|
-
});
|
|
11748
|
+
identify(index, item) {
|
|
11749
|
+
if (index >= 0) { }
|
|
11750
|
+
return item;
|
|
12900
11751
|
}
|
|
12901
11752
|
/**
|
|
12902
|
-
* @param {?}
|
|
12903
|
-
* @param {
|
|
11753
|
+
* @param {?} index
|
|
11754
|
+
* @param {?} item
|
|
12904
11755
|
* @return {?}
|
|
12905
11756
|
*/
|
|
12906
|
-
|
|
12907
|
-
|
|
12908
|
-
|
|
12909
|
-
|
|
12910
|
-
|
|
12911
|
-
|
|
12912
|
-
|
|
12913
|
-
|
|
12914
|
-
|
|
12915
|
-
|
|
12916
|
-
|
|
12917
|
-
|
|
12918
|
-
|
|
12919
|
-
|
|
12920
|
-
|
|
12921
|
-
|
|
12922
|
-
|
|
12923
|
-
|
|
12924
|
-
|
|
12925
|
-
|
|
12926
|
-
|
|
12927
|
-
|
|
12928
|
-
|
|
12929
|
-
|
|
12930
|
-
this.emptyResponse.emit(true);
|
|
12931
|
-
}
|
|
12932
|
-
}
|
|
12933
|
-
else {
|
|
12934
|
-
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
12935
|
-
this.emptyResponse.emit(true);
|
|
12936
|
-
}
|
|
12937
|
-
}
|
|
12938
|
-
else {
|
|
12939
|
-
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
12940
|
-
this.emptyResponse.emit(true);
|
|
12941
|
-
}
|
|
12942
|
-
}
|
|
12943
|
-
catch (error) {
|
|
12944
|
-
this.emptyResponse.emit(true);
|
|
12945
|
-
// Handle errors
|
|
12946
|
-
// console.error('Error:', error);
|
|
12947
|
-
}
|
|
12948
|
-
}
|
|
12949
|
-
});
|
|
11757
|
+
tracker(index, item) {
|
|
11758
|
+
if (index >= 0) { }
|
|
11759
|
+
return get(item, 'widgetData.content.identifier');
|
|
11760
|
+
}
|
|
11761
|
+
/**
|
|
11762
|
+
* @param {?} stripData
|
|
11763
|
+
* @return {?}
|
|
11764
|
+
*/
|
|
11765
|
+
raiseTelemetry(stripData) {
|
|
11766
|
+
this.telemtryResponse.emit(stripData);
|
|
11767
|
+
}
|
|
11768
|
+
/**
|
|
11769
|
+
* @param {?} stripData
|
|
11770
|
+
* @param {?} path
|
|
11771
|
+
* @param {?} queryParamsData
|
|
11772
|
+
* @return {?}
|
|
11773
|
+
*/
|
|
11774
|
+
redirectViewAll(stripData, path, queryParamsData) {
|
|
11775
|
+
if (this.emitViewAll) {
|
|
11776
|
+
this.viewAllResponse.emit(stripData);
|
|
11777
|
+
}
|
|
11778
|
+
else {
|
|
11779
|
+
this.router.navigate([path], { queryParams: queryParamsData });
|
|
11780
|
+
}
|
|
12950
11781
|
}
|
|
12951
11782
|
// new code writting from here====new====
|
|
12952
11783
|
/**
|
|
@@ -13024,18 +11855,7 @@ class ContentStripWithTabsPillsComponent extends WidgetBaseComponent {
|
|
|
13024
11855
|
if (response && response.results) {
|
|
13025
11856
|
// console.log('calling after-- ')
|
|
13026
11857
|
if (response.results.result.content) {
|
|
13027
|
-
|
|
13028
|
-
this.enrollInterval = setInterval((/**
|
|
13029
|
-
* @return {?}
|
|
13030
|
-
*/
|
|
13031
|
-
() => {
|
|
13032
|
-
this.checkInvitOnlyAssessments(response.results.result.content, strip, calculateParentStatus, response.viewMoreUrl);
|
|
13033
|
-
// tslint:disable-next-line
|
|
13034
|
-
}), 1000);
|
|
13035
|
-
}
|
|
13036
|
-
else {
|
|
13037
|
-
this.processStrip(strip, this.transformContentsToWidgets(response.results.result.content, strip), 'done', calculateParentStatus, response.viewMoreUrl);
|
|
13038
|
-
}
|
|
11858
|
+
this.processStrip(strip, this.transformContentsToWidgets(response.results.result.content, strip), 'done', calculateParentStatus, response.viewMoreUrl);
|
|
13039
11859
|
}
|
|
13040
11860
|
else if (response.results.result.Event) {
|
|
13041
11861
|
this.processStrip(strip, this.transformEventsToWidgets(response.results.result.Event, strip), 'done', calculateParentStatus, response.viewMoreUrl);
|
|
@@ -13355,12 +12175,17 @@ class ContentStripWithTabsPillsComponent extends WidgetBaseComponent {
|
|
|
13355
12175
|
}
|
|
13356
12176
|
else {
|
|
13357
12177
|
this.getTabDataByfilter(currentStrip, currentTabFromMap, true);
|
|
12178
|
+
if (stripMap && stripMap.tabs && stripMap.tabs[tabIndex]) {
|
|
12179
|
+
stripMap.tabs[tabIndex].pillsData[pillIndex].fetchTabStatus = 'inprogress';
|
|
12180
|
+
stripMap.tabs[tabIndex].pillsData[pillIndex].tabLoading = false;
|
|
12181
|
+
stripMap.showOnLoader = true;
|
|
12182
|
+
}
|
|
13358
12183
|
setTimeout((/**
|
|
13359
12184
|
* @return {?}
|
|
13360
12185
|
*/
|
|
13361
12186
|
() => {
|
|
13362
12187
|
if (stripMap && stripMap.tabs && stripMap.tabs[tabIndex]) {
|
|
13363
|
-
stripMap.tabs[tabIndex].pillsData[pillIndex].fetchTabStatus = '
|
|
12188
|
+
stripMap.tabs[tabIndex].pillsData[pillIndex].fetchTabStatus = 'done';
|
|
13364
12189
|
stripMap.tabs[tabIndex].pillsData[pillIndex].tabLoading = false;
|
|
13365
12190
|
stripMap.showOnLoader = false;
|
|
13366
12191
|
this.resetSelectedPill(stripMap.tabs[tabIndex].pillsData);
|
|
@@ -13433,22 +12258,13 @@ class ContentStripWithTabsPillsComponent extends WidgetBaseComponent {
|
|
|
13433
12258
|
*/
|
|
13434
12259
|
getSelectedPillIndex(tabdata, tabIndex) {
|
|
13435
12260
|
if (tabdata.pillsData && tabdata.pillsData.length) {
|
|
13436
|
-
// tabdata.pillsData.forEach((ele: any, index: any) => {
|
|
13437
|
-
// if(ele.selected) {
|
|
13438
|
-
// console.log(ele,'---------')
|
|
13439
|
-
// return index
|
|
13440
|
-
// }
|
|
13441
|
-
// // })
|
|
13442
|
-
// console.log(tabdata,'==========123')
|
|
13443
12261
|
/** @type {?} */
|
|
13444
12262
|
let index = tabdata.pillsData.findIndex((/**
|
|
13445
12263
|
* @param {?} pill
|
|
13446
12264
|
* @return {?}
|
|
13447
12265
|
*/
|
|
13448
12266
|
(pill) => {
|
|
13449
|
-
// if(pill.selected){
|
|
13450
12267
|
return pill.selected;
|
|
13451
|
-
// }
|
|
13452
12268
|
}));
|
|
13453
12269
|
return index;
|
|
13454
12270
|
}
|
|
@@ -13473,38 +12289,36 @@ class ContentStripWithTabsPillsComponent extends WidgetBaseComponent {
|
|
|
13473
12289
|
courses = response;
|
|
13474
12290
|
if (strip.tabs && strip.tabs.length) {
|
|
13475
12291
|
tabResults = this.splitCbpTabsData(courses, strip);
|
|
12292
|
+
/** @type {?} */
|
|
12293
|
+
let countOfWidget = true;
|
|
12294
|
+
if (strip && strip.tabs && strip.tabs.length) {
|
|
12295
|
+
strip.tabs.forEach((/**
|
|
12296
|
+
* @param {?} tab
|
|
12297
|
+
* @return {?}
|
|
12298
|
+
*/
|
|
12299
|
+
(tab) => {
|
|
12300
|
+
if (tab.pillsData && tab.pillsData.length) {
|
|
12301
|
+
tab.pillsData.forEach((/**
|
|
12302
|
+
* @param {?} pill
|
|
12303
|
+
* @return {?}
|
|
12304
|
+
*/
|
|
12305
|
+
(pill) => {
|
|
12306
|
+
if (pill && pill.widgets && pill.widgets.length) {
|
|
12307
|
+
if (countOfWidget) {
|
|
12308
|
+
pill.selected = true;
|
|
12309
|
+
countOfWidget = false;
|
|
12310
|
+
}
|
|
12311
|
+
}
|
|
12312
|
+
}));
|
|
12313
|
+
}
|
|
12314
|
+
}));
|
|
12315
|
+
}
|
|
13476
12316
|
yield this.processStrip(strip, this.transformContentsToWidgets(courses, strip), 'done', calculateParentStatus, '', tabResults);
|
|
13477
12317
|
}
|
|
13478
12318
|
else {
|
|
13479
12319
|
this.processStrip(strip, this.transformContentsToWidgets(courses, strip), 'done', calculateParentStatus, 'viewMoreUrl');
|
|
13480
12320
|
}
|
|
13481
12321
|
}
|
|
13482
|
-
// this.userSvc.fetchCbpPlanList().subscribe( async (res: any) => {
|
|
13483
|
-
// if (res) {
|
|
13484
|
-
// console.log(res,'===============================>')
|
|
13485
|
-
// courses = res
|
|
13486
|
-
// if (strip.tabs && strip.tabs.length) {
|
|
13487
|
-
// tabResults = this.splitCbpTabsData(courses, strip)
|
|
13488
|
-
// await this.processStrip(
|
|
13489
|
-
// strip,
|
|
13490
|
-
// this.transformContentsToWidgets(courses, strip),
|
|
13491
|
-
// 'done',
|
|
13492
|
-
// calculateParentStatus,
|
|
13493
|
-
// '',
|
|
13494
|
-
// tabResults
|
|
13495
|
-
// )
|
|
13496
|
-
// } else {
|
|
13497
|
-
// this.processStrip(
|
|
13498
|
-
// strip,
|
|
13499
|
-
// this.transformContentsToWidgets(courses, strip),
|
|
13500
|
-
// 'done',
|
|
13501
|
-
// calculateParentStatus,
|
|
13502
|
-
// 'viewMoreUrl',
|
|
13503
|
-
// )
|
|
13504
|
-
// }
|
|
13505
|
-
// }
|
|
13506
|
-
// }, (_err: any) => {
|
|
13507
|
-
// })
|
|
13508
12322
|
clearInterval(this.enrollInterval);
|
|
13509
12323
|
}
|
|
13510
12324
|
});
|
|
@@ -13522,11 +12336,17 @@ class ContentStripWithTabsPillsComponent extends WidgetBaseComponent {
|
|
|
13522
12336
|
if (strip.tabs && strip.tabs.length) {
|
|
13523
12337
|
for (let i = 0; i < strip.tabs.length; i += 1) {
|
|
13524
12338
|
if (strip.tabs[i].value === "myIgotPlans") {
|
|
12339
|
+
/** @type {?} */
|
|
12340
|
+
let checkWidgetAndActivePill = true;
|
|
13525
12341
|
if (strip.tabs[i].pillsData && strip.tabs[i].pillsData.length) {
|
|
13526
12342
|
for (let j = 0; j < strip.tabs[i].pillsData.length; j += 1) {
|
|
13527
|
-
if
|
|
13528
|
-
|
|
13529
|
-
|
|
12343
|
+
// if(j === 0 ){
|
|
12344
|
+
// if(strip.tabs[i].pillsData[j].widgets && strip.tabs[i].pillsData[j].widgets.length ) {
|
|
12345
|
+
// strip.tabs[i].pillsData[j].selected = true
|
|
12346
|
+
// checkWidgetAndActivePill = false
|
|
12347
|
+
// }
|
|
12348
|
+
// strip.tabs[i].pillsData[j].selected = true
|
|
12349
|
+
// }
|
|
13530
12350
|
if (strip.tabs[i].pillsData[j]) {
|
|
13531
12351
|
tabResults.push(Object.assign({}, strip.tabs[i].pillsData[j], { fetchTabStatus: 'done' }, (splitData.find((/**
|
|
13532
12352
|
* @param {?} itmInner
|
|
@@ -13651,7 +12471,6 @@ class ContentStripWithTabsPillsComponent extends WidgetBaseComponent {
|
|
|
13651
12471
|
(data) => {
|
|
13652
12472
|
return data.contentStatus < 2;
|
|
13653
12473
|
}));
|
|
13654
|
-
// this.getSelectedIndex(1)
|
|
13655
12474
|
return [
|
|
13656
12475
|
{ value: 'all', widgets: this.transformContentsToWidgets(all, strip) },
|
|
13657
12476
|
{ value: 'upcoming', widgets: this.transformContentsToWidgets(upcoming, strip) },
|
|
@@ -13678,7 +12497,7 @@ class ContentStripWithTabsPillsComponent extends WidgetBaseComponent {
|
|
|
13678
12497
|
ContentStripWithTabsPillsComponent.decorators = [
|
|
13679
12498
|
{ type: Component, args: [{
|
|
13680
12499
|
selector: 'sb-uic-content-strip-with-tabs-pills',
|
|
13681
|
-
template: "<ng-container *ngIf=\"!contentAvailable; else otherTemplate\"></ng-container>\n<ng-template #otherTemplate>\n <!-- <div *ngIf=\"showParentLoader\" class=\"text-center my-2\">\n <mat-spinner class=\"inline-block\"></mat-spinner>\n </div> -->\n <ng-container *ngIf=\"showParentError\" [sbUiResolverWidget]=\"widgetData.errorWidget\"></ng-container>\n <ng-container *ngIf=\"showParentNoData\" [sbUiResolverWidget]=\"widgetData.noDataWidget\"></ng-container>\n <ng-container *ngFor=\"let key of stripsKeyOrder; let i = index; trackBy: identify\">\n <ng-container *ngIf=\"isStripShowing(stripsResultDataMap[key])\">\n <a name=\"{{stripsResultDataMap[key]?.stripTitle}}\" [class]=\"key\">\n <div *ngIf=\"stripsResultDataMap && (getLength(stripsResultDataMap[key]) ||\n stripsResultDataMap[key]?.showOnNoData ||\n stripsResultDataMap[key]?.showOnLoader ||\n stripsResultDataMap[key]?.showOnError)\n \" [ngClass]=\"\n !widgetData?.isChannelStrip ? 'xs:px-8 sx:px-10ss' : i > 0 ? 'mt-12' : ''\n \" [id]=\"key\" [ngClass]=\"!widgetData?.isChannelStrip ? margin-bottom-custom : margin-bottom-xs\">\n <div [ngClass]=\"{ pad: stripsResultDataMap[key]?.stripBackground }\"\n [ngStyle]=\"{ 'background-color': stripsResultDataMap[key]?.stripBackground }\">\n <div class=\"flex flex-col pl-4 pr-4 md:pr-0 md:pl-0 \" [ngClass]=\"\n !widgetData?.isChannelStrip\n ? ''\n : stripsResultDataMap[key]?.stripTitle\n ? 'mb-8'\n : ''\n \">\n <div class=\"flex flex-1 items-center\">\n <p class=\"mat-subheading-1 margin-remove inline-block \" *ngIf=\"stripsResultDataMap[key]?.stripTitle\">\n <span class=\"capitalize\" *ngIf=\"stripsResultDataMap[key]?.disableTranslate\">\n {{stripsResultDataMap[key]?.stripTitle}}\n </span>\n <span *ngIf=\"!stripsResultDataMap[key]?.disableTranslate\">\n {{ translateLabels(stripsResultDataMap[key]?.stripTitle, 'home') }}\n </span>\n </p>\n\n <button *ngIf=\"stripsResultDataMap[key]?.stripInfo?.icon\" type=\"button\" mat-icon-button\n (click)=\"toggleInfo(stripsResultDataMap[key])\" i18n-matTooltip matTooltip=\"info\"\n class=\"margin-left-xs\">\n <mat-icon>{{ stripsResultDataMap[key]?.stripInfo?.icon.icon }}</mat-icon>\n </button>\n <a *ngIf=\"stripsResultDataMap[key]?.stripTitleLink?.link\"\n [routerLink]=\"stripsResultDataMap[key]?.stripTitleLink?.link\"\n [queryParams]=\"stripsResultDataMap[key]?.stripTitleLink?.link?.queryParams\">\n <mat-icon class=\"ws-mat-primary-primary-text ws-mat-default-text\" [color]=\"'accent'\">{{\n stripsResultDataMap[key]?.stripTitleLink?.icon }}</mat-icon>\n </a>\n <span class=\"spacer\"></span>\n <!-- viewAll start-->\n <!-- <div *ngIf=\"checkCondition(widgetData , stripsResultDataMap[key])\"\n class=\"ml-4 pl-2 view-more ws-mat-default-text\">\n <a class=\"flex ws-mat-default-text items-center justify-center mat-body-1 cursor-pointer\" \n (click)=\"raiseTelemetry(stripsResultDataMap[key]);redirectViewAll(stripsResultDataMap[key], stripsResultDataMap[key]?.viewMoreUrl?.path, stripsResultDataMap[key]?.viewMoreUrl?.queryParams )\">\n <span i18n class=\"ws-mat-default-text\">{{translateLabels(widgetData.strips[0].viewMoreUrl.viewMoreText,'home') || 'See all'}}</span>\n <mat-icon class=\"ws-mat-default-text mat-icon notranslate material-icons mat-icon-no-color\" color=\"accent\">navigate_next</mat-icon>\n </a>\n </div> -->\n <!-- viewAll end-->\n </div>\n <button mat-icon-button (click)=\"setHiddenForStrip(key)\" *ngIf=\"stripsResultDataMap[key]?.canHideStrip\">\n <mat-icon>close</mat-icon>\n </button>\n <mat-icon class=\"cursor-pointer\" *ngIf=\"stripsResultDataMap[key]?.mode === 'accordion' && isMobile\"\n (click)=\"showAccordionData = !showAccordionData\">{{ showAccordionData ? 'expand_less' : 'expand_more' }}\n </mat-icon>\n </div>\n\n <div class=\"mb-4\" *ngIf=\"checkVisible(stripsResultDataMap[key])\">\n <ng-container [sbUiResolverWidget]=\"getdata(stripsResultDataMap[key])\">\n </ng-container>\n </div>\n <ng-container *ngIf=\"stripsResultDataMap[key]?.showOnNoData\"\n [sbUiResolverWidget]=\"stripsResultDataMap[key]?.noDataWidget\"></ng-container>\n <ng-container *ngIf=\"stripsResultDataMap[key]?.showOnError\"\n [sbUiResolverWidget]=\"stripsResultDataMap[key]?.errorWidget\"></ng-container>\n <!-- IF no errors then proceed to show tabs or non tabs strip -->\n <ng-container *ngIf=\"!stripsResultDataMap[key]?.showOnNoData && !stripsResultDataMap[key]?.showOnError\">\n <ng-container *ngIf=\"stripsResultDataMap[key].tabs && stripsResultDataMap[key].tabs.length\">\n <mat-tab-group animationDuration=\"0ms\" [selectedIndex]=\"getSelectedIndex(stripsResultDataMap[key], key)\"\n class=\"mat-tab-labels w-full strips-tabgroup\" dynamicHeight\n (selectedTabChange)=\"tabClicked($event, 0, stripsResultDataMap[key], key)\">\n <mat-tab label=\"{{tab?.label}}\" *ngFor=\"let tab of stripsResultDataMap[key].tabs; let last = last;let tabIndex = index\">\n <ng-template mat-tab-label>\n <span>{{ translateLabels(tab?.label, 'home') }} </span>\n <span *ngIf=\"tab?.showTabDataCount && tab?.widgets?.length\">({{tab?.widgets?.length}})</span>\n </ng-template>\n\n <div class=\"wfull\" *ngIf=\"tab?.pillsData && tab?.pillsData?.length\">\n <div class=\"flex justify-between\">\n <div>\n <ng-container >\n <mat-chip-list class=\"content-pill\" aria-label=\"Fish selection\">\n <ng-container *ngFor=\"let pill of tab?.pillsData;let p = index\">\n <mat-chip [selected]=\"pill?.selected\" (click)=\"pillClicked($event, stripsResultDataMap[key], key, p, tabIndex)\">\n <span class=\"pill-name\">{{pill?.label}}</span></mat-chip>\n </ng-container>\n </mat-chip-list>\n </ng-container>\n </div>\n <!-- viewAll start-->\n <!-- <div *ngIf=\"checkCondition(widgetData , stripsResultDataMap[key])\"\n class=\"ml-4 pl-2 view-more ws-mat-default-text\">\n <a class=\"flex ws-mat-default-text items-center justify-center mat-body-1 cursor-pointer\" \n (click)=\"raiseTelemetry(stripsResultDataMap[key]);redirectViewAll(stripsResultDataMap[key], stripsResultDataMap[key]?.viewMoreUrl?.path, stripsResultDataMap[key]?.viewMoreUrl?.queryParams )\">\n <span i18n class=\"ws-mat-default-text\">{{translateLabels(widgetData.strips[0].viewMoreUrl.viewMoreText,'home') || 'See all'}}</span>\n <mat-icon class=\"ws-mat-default-text mat-icon notranslate material-icons mat-icon-no-color\" color=\"accent\">navigate_next</mat-icon>\n </a>\n </div> -->\n <!-- viewAll end-->\n </div>\n <div *ngIf=\"stripsResultDataMap && stripsResultDataMap[key]?.showOnLoader ||\n !tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.fetchTabStatus\"\n class=\"text-center my-2\">\n <sb-uic-horizontal-scroller-v2 [sliderConfig]=\"stripsResultDataMap[key]?.sliderConfig\" [id]=\"key+'-scroller'\"\n [loadStatus]=\"'fetching'\" [stripConfig]=\"stripsResultDataMap[key]?.stripConfig\">\n <ng-container *ngFor=\"let widget of stripsResultDataMap[key]?.loaderWidgets; trackBy: tracker\">\n <ng-container [sbUiResolverWidget]=\"widget\"></ng-container>\n </ng-container>\n </sb-uic-horizontal-scroller-v2>\n </div>\n <ng-container *ngIf=\"tab?.pillsData && tab?.pillsData.length && tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]\">\n <div *ngIf=\"((tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.fetchTabStatus && tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.fetchTabStatus === 'done') &&\n (!tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.widgets || !tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.widgets?.length))\">\n <ng-container *ngIf=\"tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.value === 'inprogress'; else msgTemp\">\n <div class=\"w-full flex flex-col items-center justify-center\">\n <img alt=\"\" class=\"mt-4 mb-4\" src=\"assets/icons/home/nodataDefault.svg\">\n <div class=\"mat-subheading-1 text-center info-content\">{{ 'contentstripmultiple.getReadyForLearningAdventure' | translate }} -\n <a class=\"click-here\" [routerLink]=\"'/page/learn'\">{{ 'contentstripmultiple.clickHere' | translate }}</a> {{ 'contentstripmultiple.toEnrollNextCourse' | translate }}</div>\n </div>\n </ng-container>\n <ng-template #msgTemp>\n <div class=\"w-full flex flex-col items-center justify-center\">\n <img alt=\"\" class=\"mt-4 mb-4\" src=\"assets/icons/home/nodataDefault.png\">\n <div class=\"mat-subheading-1 text-center\">{{ translateLabels(tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.nodataMsg, 'home') }}</div>\n </div>\n </ng-template>\n </div>\n </ng-container>\n <ng-container *ngIf=\"(tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.fetchTabStatus === 'done' || tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.widgets?.length)\">\n <ng-container *ngIf=\"!tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.tabLoading\">\n <sb-uic-horizontal-scroller-v2 [id]=\"key+'-scroller'\" [sliderConfig]=\"stripsResultDataMap[key]?.sliderConfig\" [widgetsLength]=\"tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.widgets?.length\"\n *ngIf=\"getContineuLearningLenth(stripsResultDataMap[key]) && showAccordion(key)\"\n [loadStatus]=\"'done'\" [defaultMaxWidgets]=\"tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.maxWidgets ||\n stripsResultDataMap[key]?.sliderConfig?.maxWidgets || defaultMaxWidgets\" [stripConfig]=\"stripsResultDataMap[key]?.stripConfig\">\n <ng-container *ngFor=\"let widget of tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.widgets| slice:0:(tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.maxWidgets ||\n stripsResultDataMap[key]?.sliderConfig?.maxWidgets || defaultMaxWidgets); trackBy: tracker\">\n <ng-container [sbUiResolverWidget]=\"widget\"></ng-container>\n </ng-container>\n </sb-uic-horizontal-scroller-v2>\n </ng-container>\n </ng-container>\n </div>\n </mat-tab>\n </mat-tab-group>\n </ng-container>\n </ng-container>\n </div>\n </div>\n </a>\n\n </ng-container>\n </ng-container>\n</ng-template>",
|
|
12500
|
+
template: "<ng-container *ngIf=\"!contentAvailable; else otherTemplate\"></ng-container>\n<ng-template #otherTemplate>\n <!-- <div *ngIf=\"showParentLoader\" class=\"text-center my-2\">\n <mat-spinner class=\"inline-block\"></mat-spinner>\n </div> -->\n <ng-container *ngIf=\"showParentError\" [sbUiResolverWidget]=\"widgetData.errorWidget\"></ng-container>\n <ng-container *ngIf=\"showParentNoData\" [sbUiResolverWidget]=\"widgetData.noDataWidget\"></ng-container>\n <ng-container *ngFor=\"let key of stripsKeyOrder; let i = index; trackBy: identify\">\n <ng-container *ngIf=\"isStripShowing(stripsResultDataMap[key])\">\n <a name=\"{{stripsResultDataMap[key]?.stripTitle}}\" [class]=\"key\">\n <div *ngIf=\"stripsResultDataMap && (getLength(stripsResultDataMap[key]) ||\n stripsResultDataMap[key]?.showOnNoData ||\n stripsResultDataMap[key]?.showOnLoader ||\n stripsResultDataMap[key]?.showOnError)\n \" [ngClass]=\"\n !widgetData?.isChannelStrip ? 'xs:px-8 sx:px-10ss' : i > 0 ? 'mt-12' : ''\n \" [id]=\"key\" [ngClass]=\"!widgetData?.isChannelStrip ? margin-bottom-custom : margin-bottom-xs\">\n <div [ngClass]=\"{ pad: stripsResultDataMap[key]?.stripBackground }\"\n [ngStyle]=\"{ 'background-color': stripsResultDataMap[key]?.stripBackground }\">\n <div class=\"flex flex-col pl-4 pr-4 md:pr-0 md:pl-0 \" [ngClass]=\"\n !widgetData?.isChannelStrip\n ? ''\n : stripsResultDataMap[key]?.stripTitle\n ? 'mb-8'\n : ''\n \">\n <div class=\"flex flex-1 items-center\">\n <p class=\"mat-subheading-1 margin-remove inline-block \" *ngIf=\"stripsResultDataMap[key]?.stripTitle\">\n <span class=\"capitalize\" *ngIf=\"stripsResultDataMap[key]?.disableTranslate\">\n {{stripsResultDataMap[key]?.stripTitle}}\n </span>\n <span *ngIf=\"!stripsResultDataMap[key]?.disableTranslate\">\n {{ translateLabels(stripsResultDataMap[key]?.stripTitle, 'home') }}\n </span>\n </p>\n\n <button *ngIf=\"stripsResultDataMap[key]?.stripInfo?.icon\" type=\"button\" mat-icon-button\n (click)=\"toggleInfo(stripsResultDataMap[key])\" i18n-matTooltip matTooltip=\"info\"\n class=\"margin-left-xs\">\n <mat-icon>{{ stripsResultDataMap[key]?.stripInfo?.icon.icon }}</mat-icon>\n </button>\n <a *ngIf=\"stripsResultDataMap[key]?.stripTitleLink?.link\"\n [routerLink]=\"stripsResultDataMap[key]?.stripTitleLink?.link\"\n [queryParams]=\"stripsResultDataMap[key]?.stripTitleLink?.link?.queryParams\">\n <mat-icon class=\"ws-mat-primary-primary-text ws-mat-default-text\" [color]=\"'accent'\">{{\n stripsResultDataMap[key]?.stripTitleLink?.icon }}</mat-icon>\n </a>\n <span class=\"spacer\"></span>\n <!-- viewAll start-->\n <!-- <div *ngIf=\"checkCondition(widgetData , stripsResultDataMap[key])\"\n class=\"ml-4 pl-2 view-more ws-mat-default-text\">\n <a class=\"flex ws-mat-default-text items-center justify-center mat-body-1 cursor-pointer\" \n (click)=\"raiseTelemetry(stripsResultDataMap[key]);redirectViewAll(stripsResultDataMap[key], stripsResultDataMap[key]?.viewMoreUrl?.path, stripsResultDataMap[key]?.viewMoreUrl?.queryParams )\">\n <span i18n class=\"ws-mat-default-text\">{{translateLabels(widgetData.strips[0].viewMoreUrl.viewMoreText,'home') || 'See all'}}</span>\n <mat-icon class=\"ws-mat-default-text mat-icon notranslate material-icons mat-icon-no-color\" color=\"accent\">navigate_next</mat-icon>\n </a>\n </div> -->\n <!-- viewAll end-->\n </div>\n <button mat-icon-button (click)=\"setHiddenForStrip(key)\" *ngIf=\"stripsResultDataMap[key]?.canHideStrip\">\n <mat-icon>close</mat-icon>\n </button>\n <mat-icon class=\"cursor-pointer\" *ngIf=\"stripsResultDataMap[key]?.mode === 'accordion' && isMobile\"\n (click)=\"showAccordionData = !showAccordionData\">{{ showAccordionData ? 'expand_less' : 'expand_more' }}\n </mat-icon>\n </div>\n\n <div class=\"mb-4\" *ngIf=\"checkVisible(stripsResultDataMap[key])\">\n <ng-container [sbUiResolverWidget]=\"getdata(stripsResultDataMap[key])\">\n </ng-container>\n </div>\n <ng-container *ngIf=\"stripsResultDataMap[key]?.showOnNoData\"\n [sbUiResolverWidget]=\"stripsResultDataMap[key]?.noDataWidget\"></ng-container>\n <ng-container *ngIf=\"stripsResultDataMap[key]?.showOnError\"\n [sbUiResolverWidget]=\"stripsResultDataMap[key]?.errorWidget\"></ng-container>\n <!-- IF no errors then proceed to show tabs or non tabs strip -->\n <ng-container *ngIf=\"!stripsResultDataMap[key]?.showOnNoData && !stripsResultDataMap[key]?.showOnError\">\n <ng-container *ngIf=\"stripsResultDataMap[key].tabs && stripsResultDataMap[key].tabs.length\">\n <mat-tab-group animationDuration=\"0ms\" [selectedIndex]=\"getSelectedIndex(stripsResultDataMap[key], key)\"\n class=\"mat-tab-labels w-full strips-tabgroup\" dynamicHeight\n (selectedTabChange)=\"tabClicked($event, 0, stripsResultDataMap[key], key)\">\n <mat-tab label=\"{{tab?.label}}\" *ngFor=\"let tab of stripsResultDataMap[key].tabs; let last = last;let tabIndex = index\">\n <ng-template mat-tab-label>\n <span>{{ translateLabels(tab?.label, 'home') }} </span>\n <span *ngIf=\"tab?.showTabDataCount && tab?.widgets?.length\">({{tab?.widgets?.length}})</span>\n </ng-template>\n\n <div class=\"wfull\" *ngIf=\"tab?.pillsData && tab?.pillsData?.length\">\n <div class=\"flex justify-between\">\n <div>\n <ng-container >\n <mat-chip-list class=\"content-pill\" aria-label=\"Fish selection\">\n <ng-container *ngFor=\"let pill of tab?.pillsData;let p = index\">\n <mat-chip [selected]=\"pill?.selected\" (click)=\"pillClicked($event, stripsResultDataMap[key], key, p, tabIndex)\">\n <span class=\"pill-name\">{{pill?.label}}</span></mat-chip>\n </ng-container>\n </mat-chip-list>\n </ng-container>\n </div>\n <!-- viewAll start-->\n <div *ngIf=\"checkCondition(widgetData , stripsResultDataMap[key])\"\n class=\"ml-4 pl-2 view-more ws-mat-default-text\">\n <a class=\"flex ws-mat-default-text items-center justify-center mat-body-1 cursor-pointer\" \n (click)=\"raiseTelemetry(stripsResultDataMap[key]);redirectViewAll(stripsResultDataMap[key], stripsResultDataMap[key]?.viewMoreUrl?.path, stripsResultDataMap[key]?.viewMoreUrl?.queryParams )\">\n <span i18n class=\"ws-mat-default-text\">{{translateLabels(widgetData.strips[0].viewMoreUrl.viewMoreText,'home') || 'See all'}}</span>\n <mat-icon class=\"ws-mat-default-text mat-icon notranslate material-icons mat-icon-no-color\" color=\"accent\">navigate_next</mat-icon>\n </a>\n </div>\n <!-- viewAll end-->\n </div>\n <div *ngIf=\"stripsResultDataMap && stripsResultDataMap[key]?.showOnLoader ||\n !tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.fetchTabStatus\"\n class=\"text-center my-2\">\n <sb-uic-horizontal-scroller-v2 [sliderConfig]=\"stripsResultDataMap[key]?.sliderConfig\" [id]=\"key+'-scroller'\"\n [loadStatus]=\"'fetching'\" [stripConfig]=\"stripsResultDataMap[key]?.stripConfig\">\n <ng-container *ngFor=\"let widget of stripsResultDataMap[key]?.loaderWidgets; trackBy: tracker\">\n <ng-container [sbUiResolverWidget]=\"widget\"></ng-container>\n </ng-container>\n </sb-uic-horizontal-scroller-v2>\n </div>\n <ng-container *ngIf=\"tab?.pillsData && tab?.pillsData.length && tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]\">\n <div *ngIf=\"((tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.fetchTabStatus && tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.fetchTabStatus === 'done') &&\n (!tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.widgets || !tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.widgets?.length))\">\n <ng-container *ngIf=\"tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.value === 'inprogress'; else msgTemp\">\n <div class=\"w-full flex flex-col items-center justify-center\">\n <img alt=\"\" class=\"mt-4 mb-4\" src=\"assets/icons/home/nodataDefault.svg\">\n <div class=\"mat-subheading-1 text-center info-content\">{{ 'contentstripmultiple.getReadyForLearningAdventure' | translate }} -\n <a class=\"click-here\" [routerLink]=\"'/page/learn'\">{{ 'contentstripmultiple.clickHere' | translate }}</a> {{ 'contentstripmultiple.toEnrollNextCourse' | translate }}</div>\n </div>\n </ng-container>\n <ng-template #msgTemp>\n <div class=\"w-full flex flex-col items-center justify-center\">\n <img alt=\"\" class=\"mt-4 mb-4\" src=\"assets/icons/home/nodataDefault.png\">\n <div class=\"mat-subheading-1 text-center\">{{ translateLabels(tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.nodataMsg, 'home') }}</div>\n </div>\n </ng-template>\n </div>\n </ng-container>\n <ng-container *ngIf=\"(tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.fetchTabStatus === 'done' || tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.widgets?.length)\">\n <ng-container *ngIf=\"!tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.tabLoading\">\n <sb-uic-horizontal-scroller-v2 [id]=\"key+'-scroller'\" [sliderConfig]=\"stripsResultDataMap[key]?.sliderConfig\" [widgetsLength]=\"tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.widgets?.length\"\n *ngIf=\"getContineuLearningLenth(stripsResultDataMap[key]) && showAccordion(key)\"\n [loadStatus]=\"'done'\" [defaultMaxWidgets]=\"tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.maxWidgets ||\n stripsResultDataMap[key]?.sliderConfig?.maxWidgets || defaultMaxWidgets\" [stripConfig]=\"stripsResultDataMap[key]?.stripConfig\">\n <ng-container *ngFor=\"let widget of tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.widgets| slice:0:(tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.maxWidgets ||\n stripsResultDataMap[key]?.sliderConfig?.maxWidgets || defaultMaxWidgets); trackBy: tracker\">\n <ng-container [sbUiResolverWidget]=\"widget\"></ng-container>\n </ng-container>\n </sb-uic-horizontal-scroller-v2>\n </ng-container>\n </ng-container>\n </div>\n </mat-tab>\n </mat-tab-group>\n </ng-container>\n </ng-container>\n </div>\n </div>\n </a>\n\n </ng-container>\n </ng-container>\n</ng-template>",
|
|
13682
12501
|
styles: [".view-more{display:flex;align-items:center;text-align:center;height:40px;justify-content:center}.view-more .icon{font-size:24px;width:24px;height:24px;border:1px solid;border-radius:50%;padding:8px;margin-bottom:8px}.margin-bottom-custom{margin-bottom:60px}.view-more:hover{background-color:#dcdfe5}::ng-deep.strips-tabgroup .mat-tab-header{border-bottom:2px solid rgba(0,0,0,.12)}::ng-deep.strips-tabgroup .mat-tab-body{padding:20px 0!important;box-sizing:border-box;overflow-y:initial!important}::ng-deep.strips-tabgroup .mat-tab-body-wrapper{overflow:inherit!important}::ng-deep.strips-tabgroup .mat-tab-label{border-bottom:0 solid rgba(0,0,0,.1);margin-right:0;opacity:1}::ng-deep.strips-tabgroup .mat-tab-label .mat-tab-label-content{text-transform:inherit;font:400 14px/20px Lato}::ng-deep.strips-tabgroup .mat-tab-label-active .mat-tab-label-content{font-weight:700!important}.click-here{color:#1b4ca1}.info-content{opacity:1;color:rgba(0,0,0,.87);font:700 14px/20px Lato-Bold;text-align:center}.active{background:#1b4ca1!important}.active .pill-name{color:#fff!important}::ng-deep .content-pill .mat-chip-selected{background-color:#1b4ca1!important}::ng-deep .content-pill .mat-chip-selected .pill-name{color:#fff!important}"]
|
|
13683
12502
|
}] }
|
|
13684
12503
|
];
|