@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
|
@@ -9172,7 +9172,7 @@
|
|
|
9172
9172
|
CardPortraitComponent.decorators = [
|
|
9173
9173
|
{ type: core.Component, args: [{
|
|
9174
9174
|
selector: 'sb-uic-card-portrait',
|
|
9175
|
-
template: "<ng-container *ngIf=\"!isCardLoading\">\n <mat-card class=\"card-standard-container mr-5 padding-remove cursor-pointer {{widgetData?.cardCustomeClass}}\" [ngClass]=\"{\n greyOut:\n widgetData.deletedMode === 'greyOut' && !isLiveOrMarkForDeletion\n ? true\n : widgetData?.intranetMode === 'greyOut' && showIntranetContent\n }\" (click)=\"(showIntranetContent || !isLiveOrMarkForDeletion) && showSnackbar()\">\n <div class=\"display-contents\" [ngClass]=\"{\n disableClick:\n widgetData.deletedMode === 'greyOut' && !isLiveOrMarkForDeletion\n ? true\n : widgetData?.intranetMode === 'greyOut' && showIntranetContent\n }\">\n <ng-container *ngIf=\"widgetData.content\">\n <a (click)=\"getRedirectUrlData(widgetData?.content); $event.stopPropagation()\"\n role=\"link\" i18n-aria-label>\n <ng-container *ngIf=\"!isCardFlipped\">\n <div class=\"status-danger\" role=\"note\" i18n-aria-label aria-label=\"Content expired or deleted\" i18n-matTooltip\n matTooltip=\"Content may be expired or deleted\" *ngIf=\"!isLiveOrMarkForDeletion\"></div>\n <div class=\"status-danger\" role=\"note\" i18n-aria-label aria-label=\"Intranet content\" i18n-matTooltip\n matTooltip=\"Available only in Company's network\"\n *ngIf=\"widgetData?.intranetMode === 'greyOut' && showIntranetContent\"></div>\n <button *ngIf=\"showFlip\" class=\"detail-button ws-mat-primary-lite-background-op30\" mat-icon-button\n (click)=\"isCardFlipped = true\" aria-label=\"Details\" i18n-aria-label=\"Details | Click to see details\">\n <mat-icon>flip_to_back</mat-icon>\n </button>\n <mat-card-content class=\"min-top\">\n <div style=\"position: relative; z-index: 1;\">\n <ng-container *ngIf=\"widgetData.content.posterImage\">\n <img mat-card-image [src]=\"widgetData.content.posterImage | pipePublicURL\" loading=\"lazy\"\n class=\"card-img ws-mat-primary-lite-background margin-remove\" [wsUtilsDefaultThumbnail]=\"defaultThumbnail\"\n [alt]=\"widgetData.content.name\" />\n </ng-container>\n <ng-container *ngIf=\"!widgetData.content.posterImage\">\n <ng-container *ngIf=\"widgetData.content.appIcon; else defaultImg\">\n <img mat-card-image [src]=\"widgetData.content.appIcon | pipePublicURL\" loading=\"lazy\"\n class=\"card-img ws-mat-primary-lite-background margin-remove\" [wsUtilsDefaultThumbnail]=\"defaultThumbnail\"\n [alt]=\"widgetData.content.name\" />\n </ng-container>\n <ng-template #defaultImg>\n <img mat-card-image [src]=\"defaultThumbnail\" loading=\"lazy\"\n class=\"card-img ws-mat-primary-lite-background margin-remove\"\n [alt]=\"widgetData.content.name\" />\n </ng-template>\n </ng-container>\n <div class=\"source-div\" style=\"display: none;\">\n <img [src]=\"widgetData.content.creatorLogo\" class=\"source-icon\" [wsUtilsDefaultThumbnail]=\"defaultSLogo\"\n [alt]=\"(widgetData.content.sourceName + '_' + widgetData.content.identifier)\" />\n </div>\n <ng-container *ngIf=\"widgetData?.content?.cbPlanEndDate\">\n <div class=\"cbp-mark\">\n <span>{{widgetData?.content?.cbPlanEndDate | date: 'd MMM, y'}}</span>\n </div>\n </ng-container>\n <!-- <ng-container *ngIf=\"widgetData?.content?.endDate\">\n <div class=\"cbp-mark\">\n <p *ngIf=\"widgetData?.content?.planDuration === acbpConstants?.UPCOMING\" class=\"cbp-warning\">{{widgetData?.content?.endDate | date: 'd MMM, y'}}</p>\n <p *ngIf=\"widgetData?.content?.planDuration === acbpConstants?.SUCCESS\" class=\"cbp-success\">{{widgetData?.content?.endDate | date: 'd MMM, y'}}</p>\n <p *ngIf=\"widgetData?.content?.planDuration === acbpConstants?.OVERDUE\" class=\"cbp-danger\">Over due</p>\n </div>\n </ng-container> -->\n <ng-container *ngIf=\"cbPlanMapData && cbPlanMapData[widgetData?.content?.identifier]\">\n <ng-container [ngTemplateOutlet]=\"cbpPlan\" [ngTemplateOutletContext]=\"{data: {\n cbpData: cbPlanMapData[widgetData?.content?.identifier]\n }}\"></ng-container>\n </ng-container>\n <div class=\"duration-box right-corner\" *ngIf=\"widgetData?.content?.duration > 0\">\n <mat-icon class=\"mat-icon main_icon mr-1\">access_time</mat-icon>\n <span class=\" ws-mat-white-text duration\">\n {{ (widgetData?.content?.duration || 120)| pipeDurationTransform: 'hms' }}\n </span>\n </div>\n <div class=\"duration-box right-corner\" *ngIf=\"widgetData?.content?.programDuration > 0\">\n <mat-icon class=\"mat-icon main_icon mr-1\">access_time</mat-icon>\n <span class=\" ws-mat-white-text duration\">\n {{widgetData?.content?.programDuration}} {{widgetData?.content?.programDuration === 1 ? 'day' : 'days'}}\n </span>\n </div>\n </div>\n <div class=\"padding-m\">\n <div class=\"course_widget flex margin-remove\">\n <div class=\"flex flex-end course_v2\">\n <mat-icon class=\"mat-icon main_icon ws-mat-default-text margin-right-xs\">video_library</mat-icon>\n <sb-uic-display-content-type i18n-title title=\"Content Type\" *ngIf=\"widgetData.content?.primaryCategory\"\n class=\"ws-mat-black60-text font-normal mat-caption \" [displayContentType]=\"widgetData.content?.primaryCategory==='Course Unit'\n ?'Module'\n :widgetData.content?.primaryCategory\">\n\n </sb-uic-display-content-type>\n </div>\n </div>\n <div [id]=\"'m-c-'+ widgetData.content?.identifier\"\n class=\"mat-subheading-1 title-text ws-mat-text-block-fade-gradient\">\n {{ widgetData.content.name }}\n </div>\n <div class=\"flex w-full flex-wrap flex-middle\">\n <div class=\"course_logo_box\">\n <img [src]=\"widgetData.content.creatorLogo | pipePublicURL \" class=\"source-icon\" [wsUtilsDefaultThumbnail]=\"defaultSLogo\"\n [alt]=\"(widgetData.content.sourceName + '_' + widgetData.content.identifier)\" />\n </div>\n <!-- <span class=\"org-text\">{{'cardcontentv2.by' | translate}} -->\n <span class=\"org-text\">By {{ (widgetData?.content?.organisation && widgetData?.content?.organisation[0]) ? widgetData?.content?.organisation[0] : 'Karmayogi Bharat' }}</span>\n </div>\n <div class=\"flex flex-middle rating-session margin-top-m\">\n <div class=\"flex flex-middle\" *ngIf=\"widgetData?.content?.avgRating\">\n <mat-icon class=\"mr-1\">star</mat-icon>\n <span>{{widgetData.content.avgRating}}</span>\n </div>\n <!-- <span class=\"most-enrolled-text margin-left-m\">{{ 'cardcontentv2.mostEnrolled' | translate }}</span> -->\n <ng-container *ngIf=\"widgetData?.content?.additionalTags && widgetData?.content?.additionalTags.includes('mostEnrolled')\">\n <span class=\"most-enrolled-text margin-left-xs\">\n <!-- {{ 'cardcontentv2.mostEnrolled' | translate }} -->\n </span>\n </ng-container>\n <ng-container *ngIf=\"widgetData?.content?.additionalTags && widgetData?.content?.additionalTags.includes('mostTrending')\">\n <span class=\"most-enrolled-text margin-left-xs\">\n <!-- {{ 'cardcontentv2.mostTrending' | translate }} -->\n </span>\n </ng-container>\n </div>\n </div>\n </mat-card-content>\n </ng-container>\n <ng-container *ngIf=\"isCardFlipped\">\n <div class=\"flex items-center\">\n <!-- <h2 class=\"mat-subheading-2 flex-1 min-w-0 margin-remove-bottom\" i18n>{{'cardcontentv2.reason' | translate}}</h2> -->\n <button mat-icon-button (click)=\"isCardFlipped = false\">\n <mat-icon>close</mat-icon>\n </button>\n </div>\n <p class=\"text-justify mat-body-1\">\n {{ widgetData.content.reason }}\n </p>\n </ng-container>\n </a>\n </ng-container>\n </div>\n</mat-card>\n</ng-container>\n\n<ng-container *ngIf=\"isCardLoading\">\n <mat-card class=\"card-standard-container mr-5 padding-remove\" >\n <div class=\"display-contents\" >\n <ng-container *ngIf=\"!isCardFlipped\">\n <mat-card-content class=\"min-top\">\n <div style=\"position: relative; z-index: 1;\">\n <ng-container>\n <sb-uic-skeleton-loader [width]=\"'100%'\" [height]=\"'140px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </ng-container>\n </div>\n <div class=\"padding-m\">\n <div class=\"course_widget flex margin-remove\">\n <div class=\"flex flex-end\">\n <sb-uic-skeleton-loader [width]=\"'65px'\" [height]=\"'16px'\" [bindingClass]=\"'flex rounded br-8'\"></sb-uic-skeleton-loader>\n </div>\n </div>\n <div class=\"mat-subheading-1 title-text ws-mat-text-block-fade-gradient\">\n <sb-uic-skeleton-loader [width]=\"'100%'\" [height]=\"'16px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n <sb-uic-skeleton-loader [width]=\"'111px'\" [height]=\"'16px'\" [bindingClass]=\"'flex rounded margin-top-s'\"></sb-uic-skeleton-loader>\n </div>\n <div class=\"flex w-full flex-wrap flex-middle margin-top-m\">\n <div class=\"\">\n <sb-uic-skeleton-loader [width]=\"'28px'\" [height]=\"'28px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </div>\n <span class=\"org-text\"> <sb-uic-skeleton-loader [width]=\"'111px'\" [height]=\"'16px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader></span>\n </div>\n <div class=\"flex flex-middle rating-session margin-top-m\">\n <div class=\"flex flex-middle\">\n <sb-uic-skeleton-loader [width]=\"'45px'\" [height]=\"'12px'\" [bindingClass]=\"'flex rounded margin-top-m'\"></sb-uic-skeleton-loader>\n </div>\n </div>\n </div>\n </mat-card-content>\n </ng-container>\n </div>\n </mat-card>\n</ng-container>\n\n<ng-template #cbpPlan let-data=\"data\">\n <div class=\"cbp-mark left-0 border-top-radius\">\n <p *ngIf=\"data.cbpData.planDuration === acbpConstants?.UPCOMING\" class=\"cbp-warning\">{{data.cbpData.endDate | date: 'd MMM, y'}}</p>\n <p *ngIf=\"data.cbpData.planDuration === acbpConstants?.SUCCESS\" class=\"cbp-success\">{{data.cbpData.endDate | date: 'd MMM, y'}}</p>\n <p *ngIf=\"data.cbpData.planDuration === acbpConstants?.OVERDUE\" class=\"cbp-danger\">{{'OverDue' }}</p>\n </div>\n</ng-template>",
|
|
9175
|
+
template: "<ng-container *ngIf=\"!isCardLoading\">\n <mat-card class=\"card-standard-container mr-5 padding-remove cursor-pointer {{widgetData?.cardCustomeClass}}\" [ngClass]=\"{\n greyOut:\n widgetData.deletedMode === 'greyOut' && !isLiveOrMarkForDeletion\n ? true\n : widgetData?.intranetMode === 'greyOut' && showIntranetContent\n }\" (click)=\"(showIntranetContent || !isLiveOrMarkForDeletion) && showSnackbar()\">\n <div class=\"display-contents\" [ngClass]=\"{\n disableClick:\n widgetData.deletedMode === 'greyOut' && !isLiveOrMarkForDeletion\n ? true\n : widgetData?.intranetMode === 'greyOut' && showIntranetContent\n }\">\n <ng-container *ngIf=\"widgetData.content\">\n <a (click)=\"getRedirectUrlData(widgetData?.content); $event.stopPropagation()\"\n role=\"link\" i18n-aria-label>\n <ng-container *ngIf=\"!isCardFlipped\">\n <div class=\"status-danger\" role=\"note\" i18n-aria-label aria-label=\"Content expired or deleted\" i18n-matTooltip\n matTooltip=\"Content may be expired or deleted\" *ngIf=\"!isLiveOrMarkForDeletion\"></div>\n <div class=\"status-danger\" role=\"note\" i18n-aria-label aria-label=\"Intranet content\" i18n-matTooltip\n matTooltip=\"Available only in Company's network\"\n *ngIf=\"widgetData?.intranetMode === 'greyOut' && showIntranetContent\"></div>\n <button *ngIf=\"showFlip\" class=\"detail-button ws-mat-primary-lite-background-op30\" mat-icon-button\n (click)=\"isCardFlipped = true\" aria-label=\"Details\" i18n-aria-label=\"Details | Click to see details\">\n <mat-icon>flip_to_back</mat-icon>\n </button>\n <mat-card-content class=\"min-top\">\n <div style=\"position: relative; z-index: 1;\">\n <ng-container *ngIf=\"widgetData.content.posterImage\">\n <img mat-card-image [src]=\"widgetData.content.posterImage | pipePublicURL\" loading=\"lazy\"\n class=\"card-img ws-mat-primary-lite-background margin-remove\" [wsUtilsDefaultThumbnail]=\"defaultThumbnail\"\n [alt]=\"widgetData.content.name\" />\n </ng-container>\n <ng-container *ngIf=\"!widgetData.content.posterImage\">\n <ng-container *ngIf=\"widgetData.content.appIcon; else defaultImg\">\n <img mat-card-image [src]=\"widgetData.content.appIcon | pipePublicURL\" loading=\"lazy\"\n class=\"card-img ws-mat-primary-lite-background margin-remove\" [wsUtilsDefaultThumbnail]=\"defaultThumbnail\"\n [alt]=\"widgetData.content.name\" />\n </ng-container>\n <ng-template #defaultImg>\n <img mat-card-image [src]=\"defaultThumbnail\" loading=\"lazy\"\n class=\"card-img ws-mat-primary-lite-background margin-remove\"\n [alt]=\"widgetData.content.name\" />\n </ng-template>\n </ng-container>\n <div class=\"source-div\" style=\"display: none;\">\n <img [src]=\"widgetData.content.creatorLogo\" class=\"source-icon\" [wsUtilsDefaultThumbnail]=\"defaultSLogo\"\n [alt]=\"(widgetData.content.sourceName + '_' + widgetData.content.identifier)\" />\n </div>\n <ng-container *ngIf=\"widgetData?.content?.cbPlanEndDate\">\n <div class=\"cbp-mark\">\n <span>{{widgetData?.content?.cbPlanEndDate | date: 'd MMM, y'}}</span>\n </div>\n </ng-container>\n <!-- <ng-container *ngIf=\"widgetData?.content?.endDate\">\n <div class=\"cbp-mark\">\n <p *ngIf=\"widgetData?.content?.planDuration === acbpConstants?.UPCOMING\" class=\"cbp-warning\">{{widgetData?.content?.endDate | date: 'd MMM, y'}}</p>\n <p *ngIf=\"widgetData?.content?.planDuration === acbpConstants?.SUCCESS\" class=\"cbp-success\">{{widgetData?.content?.endDate | date: 'd MMM, y'}}</p>\n <p *ngIf=\"widgetData?.content?.planDuration === acbpConstants?.OVERDUE\" class=\"cbp-danger\">Over due</p>\n </div>\n </ng-container> -->\n <ng-container *ngIf=\"cbPlanMapData && cbPlanMapData[widgetData?.content?.identifier] && cbPlanMapData[widgetData?.content?.identifier]?.contentStatus < 2\">\n <ng-container [ngTemplateOutlet]=\"cbpPlan\" [ngTemplateOutletContext]=\"{data: {\n cbpData: cbPlanMapData[widgetData?.content?.identifier]\n }}\"></ng-container>\n </ng-container>\n <div class=\"duration-box right-corner\" *ngIf=\"widgetData?.content?.duration > 0\">\n <mat-icon class=\"mat-icon main_icon mr-1\">access_time</mat-icon>\n <span class=\" ws-mat-white-text duration\">\n {{ (widgetData?.content?.duration || 120)| pipeDurationTransform: 'hms' }}\n </span>\n </div>\n <div class=\"duration-box right-corner\" *ngIf=\"widgetData?.content?.programDuration > 0\">\n <mat-icon class=\"mat-icon main_icon mr-1\">access_time</mat-icon>\n <span class=\" ws-mat-white-text duration\">\n {{widgetData?.content?.programDuration}} {{widgetData?.content?.programDuration === 1 ? 'day' : 'days'}}\n </span>\n </div>\n </div>\n <div class=\"padding-m\">\n <div class=\"course_widget flex margin-remove\">\n <div class=\"flex flex-end course_v2\">\n <mat-icon class=\"mat-icon main_icon ws-mat-default-text margin-right-xs\">video_library</mat-icon>\n <sb-uic-display-content-type i18n-title title=\"Content Type\" *ngIf=\"widgetData.content?.primaryCategory\"\n class=\"ws-mat-black60-text font-normal mat-caption \" [displayContentType]=\"widgetData.content?.primaryCategory==='Course Unit'\n ?'Module'\n :widgetData.content?.primaryCategory\">\n\n </sb-uic-display-content-type>\n </div>\n </div>\n <div [id]=\"'m-c-'+ widgetData.content?.identifier\"\n class=\"mat-subheading-1 title-text ws-mat-text-block-fade-gradient\">\n {{ widgetData.content.name }}\n </div>\n <div class=\"flex w-full flex-wrap flex-middle\">\n <div class=\"course_logo_box\">\n <img [src]=\"widgetData.content.creatorLogo | pipePublicURL \" class=\"source-icon\" [wsUtilsDefaultThumbnail]=\"defaultSLogo\"\n [alt]=\"(widgetData.content.sourceName + '_' + widgetData.content.identifier)\" />\n </div>\n <!-- <span class=\"org-text\">{{'cardcontentv2.by' | translate}} -->\n <span class=\"org-text\">By {{ (widgetData?.content?.organisation && widgetData?.content?.organisation[0]) ? widgetData?.content?.organisation[0] : 'Karmayogi Bharat' }}</span>\n </div>\n <div class=\"flex flex-middle rating-session margin-top-m\">\n <div class=\"flex flex-middle\" *ngIf=\"widgetData?.content?.avgRating\">\n <mat-icon class=\"mr-1\">star</mat-icon>\n <span>{{widgetData.content.avgRating}}</span>\n </div>\n <!-- <span class=\"most-enrolled-text margin-left-m\">{{ 'cardcontentv2.mostEnrolled' | translate }}</span> -->\n <ng-container *ngIf=\"widgetData?.content?.additionalTags && widgetData?.content?.additionalTags.includes('mostEnrolled')\">\n <span class=\"most-enrolled-text margin-left-xs\">\n <!-- {{ 'cardcontentv2.mostEnrolled' | translate }} -->\n </span>\n </ng-container>\n <ng-container *ngIf=\"widgetData?.content?.additionalTags && widgetData?.content?.additionalTags.includes('mostTrending')\">\n <span class=\"most-enrolled-text margin-left-xs\">\n <!-- {{ 'cardcontentv2.mostTrending' | translate }} -->\n </span>\n </ng-container>\n </div>\n </div>\n </mat-card-content>\n </ng-container>\n <ng-container *ngIf=\"isCardFlipped\">\n <div class=\"flex items-center\">\n <!-- <h2 class=\"mat-subheading-2 flex-1 min-w-0 margin-remove-bottom\" i18n>{{'cardcontentv2.reason' | translate}}</h2> -->\n <button mat-icon-button (click)=\"isCardFlipped = false\">\n <mat-icon>close</mat-icon>\n </button>\n </div>\n <p class=\"text-justify mat-body-1\">\n {{ widgetData.content.reason }}\n </p>\n </ng-container>\n </a>\n </ng-container>\n </div>\n</mat-card>\n</ng-container>\n\n<ng-container *ngIf=\"isCardLoading\">\n <mat-card class=\"card-standard-container mr-5 padding-remove\" >\n <div class=\"display-contents\" >\n <ng-container *ngIf=\"!isCardFlipped\">\n <mat-card-content class=\"min-top\">\n <div style=\"position: relative; z-index: 1;\">\n <ng-container>\n <sb-uic-skeleton-loader [width]=\"'100%'\" [height]=\"'140px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </ng-container>\n </div>\n <div class=\"padding-m\">\n <div class=\"course_widget flex margin-remove\">\n <div class=\"flex flex-end\">\n <sb-uic-skeleton-loader [width]=\"'65px'\" [height]=\"'16px'\" [bindingClass]=\"'flex rounded br-8'\"></sb-uic-skeleton-loader>\n </div>\n </div>\n <div class=\"mat-subheading-1 title-text ws-mat-text-block-fade-gradient\">\n <sb-uic-skeleton-loader [width]=\"'100%'\" [height]=\"'16px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n <sb-uic-skeleton-loader [width]=\"'111px'\" [height]=\"'16px'\" [bindingClass]=\"'flex rounded margin-top-s'\"></sb-uic-skeleton-loader>\n </div>\n <div class=\"flex w-full flex-wrap flex-middle margin-top-m\">\n <div class=\"\">\n <sb-uic-skeleton-loader [width]=\"'28px'\" [height]=\"'28px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </div>\n <span class=\"org-text\"> <sb-uic-skeleton-loader [width]=\"'111px'\" [height]=\"'16px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader></span>\n </div>\n <div class=\"flex flex-middle rating-session margin-top-m\">\n <div class=\"flex flex-middle\">\n <sb-uic-skeleton-loader [width]=\"'45px'\" [height]=\"'12px'\" [bindingClass]=\"'flex rounded margin-top-m'\"></sb-uic-skeleton-loader>\n </div>\n </div>\n </div>\n </mat-card-content>\n </ng-container>\n </div>\n </mat-card>\n</ng-container>\n\n<ng-template #cbpPlan let-data=\"data\">\n <div class=\"cbp-mark left-0 border-top-radius\">\n <p *ngIf=\"data.cbpData.planDuration === acbpConstants?.UPCOMING\" class=\"cbp-warning\">{{data.cbpData.endDate | date: 'd MMM, y'}}</p>\n <p *ngIf=\"data.cbpData.planDuration === acbpConstants?.SUCCESS\" class=\"cbp-success\">{{data.cbpData.endDate | date: 'd MMM, y'}}</p>\n <p *ngIf=\"data.cbpData.planDuration === acbpConstants?.OVERDUE\" class=\"cbp-danger\">{{'OverDue' }}</p>\n </div>\n</ng-template>",
|
|
9176
9176
|
styles: [".course_widget{margin-top:10px}.course_widget .mat-icon{vertical-align:middle;color:#ef951e!important}.course_widget .course_v2{border:1px solid #ef951e;padding:4px 8px;align-items:end;border-radius:16px}.course_widget .main_icon{font-size:16px;width:16px;height:16px}.rating-session mat-icon{font-size:16px;height:16px;width:12px;padding-right:3px;color:#ef951e}.rating-session span{font-size:11px}.rating-session .most-enrolled-text{padding:0 8px;background:#ffea9e;border-radius:4px}.card-standard-container{position:relative;width:245px;min-height:346px;border-radius:8px;box-sizing:border-box;box-shadow:0 10px 30px rgba(153,153,153,.2);overflow:hidden;height:346px;margin:20px 8px}.card-standard-container .progress-bar{width:101%;margin-left:-15px;display:flex;margin-top:0;background:bisque;position:absolute;bottom:0}.card-standard-container ::ng-deep .mat-progress-bar{height:8px!important}.card-standard-container .icon_text{font-size:12px;line-height:16px;text-transform:uppercase}.card-standard-container .course_logo_box{width:38px;height:38px;background:#fff;border-radius:8px;box-sizing:border-box;box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12)}.card-standard-container .course_logo_box img{height:28px;width:28px;padding:5px;display:inline-block}.card-standard-container .course_logo_box p{display:inline-block;vertical-align:top}.card-standard-container .org-text{font-size:12px;font-weight:400;width:75%;padding-left:10px;word-break:break-all;white-space:initial;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical}.card-standard-container .source-div{position:relative;top:100px;background:#fff;z-index:3;border:1px solid #dedfe0;min-width:72px;min-height:72px;max-width:72px;max-height:72px;display:flex;border-radius:8px}.card-standard-container .source-div .source-icon{border-radius:8px;display:block;margin:auto;max-width:58px;max-height:-webkit-fill-available}.card-standard-container mat-card-content{background:#fff}.card-standard-container .card-img{min-width:245px;max-height:140px;min-height:140px;display:block;-o-object-fit:fill;object-fit:fill;border-top-left-radius:8px;border-top-right-radius:8px;width:100%}.card-standard-container .mat-subheading-1{font:600 14px/24px Montserrat}.card-standard-container .complexity{padding-top:70px;display:flex;font-size:14px;line-height:21px;padding-bottom:10px}.card-standard-container .complexity .mode-tag{border-radius:5px;order:2;margin-left:auto;color:#fff;font-size:10px}.card-standard-container .complexity .duration{display:flex;margin-left:auto;order:3;font-weight:700}.card-standard-container .complexity .time-text{margin:0 5px 0 6px;font-weight:700}.card-standard-container .basic{margin:auto 0}.card-standard-container .title-text{word-break:break-all;white-space:initial;margin:8px 0;position:relative;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;min-height:48px}.card-standard-container .description-text{position:relative;overflow:hidden;height:42px;white-space:normal;text-overflow:ellipsis}.duration-box{background:#000;position:absolute;border:none;display:flex;align-items:center;padding:4px;border-radius:4px}.duration-box.right-corner{right:4px;bottom:4px}.duration-box .mat-icon{vertical-align:middle;color:#fff!important;height:14px!important;width:14px!important;font-size:14px}.duration-box .duration{font:700 12px/16px Lato;display:inline-block;margin:0;padding:0}.width-238{width:238px!important}.cbp-mark{border-radius:12px 0;opacity:1;background-image:linear-gradient(90deg,rgba(0,0,0,.6) 0,rgba(0,0,0,0) 100%);position:absolute;top:0;padding:8px}.cbp-mark p{opacity:1;background-color:#fff;padding:4px;opacity:1;color:#1b2133;font-family:Lato-Regular;font-size:10px;font-weight:400;font-style:Regular;letter-spacing:.5px;text-align:left;line-height:12px;margin-bottom:0}.cbpwidth{width:340px}.cbp-plan{border-radius:4px;opacity:1;background-color:#1b4ca1;top:4px;left:4px;opacity:1;color:rgba(255,255,255,.95);font-family:Lato-Bold;font-size:12px;font-weight:700;font-style:normal;letter-spacing:.25px;text-align:center;line-height:16px;padding:4px}.cbp-info{opacity:1;color:#fff;font-family:Lato-Regular;font-size:10px;font-weight:400;font-style:normal;letter-spacing:.5px;text-align:left;line-height:12px;padding:2px}.cbp-danger{border-radius:2px;border:1px solid rgba(0,0,0,.08);background-color:#d13924!important;color:#fff!important;opacity:1}.cbp-success{border-radius:2px;border:1px solid #1d8922;background-color:#1d8922!important;color:#fff!important;opacity:1}.cbp-warning{border-radius:2px;border:1px solid #ef951e;background-color:#ef951e!important;color:#fff!important;opacity:1}"]
|
|
9177
9177
|
}] }
|
|
9178
9178
|
];
|
|
@@ -9964,7 +9964,7 @@
|
|
|
9964
9964
|
CardLandscapeComponent.decorators = [
|
|
9965
9965
|
{ type: core.Component, args: [{
|
|
9966
9966
|
selector: 'sb-uic-card-landscape',
|
|
9967
|
-
template: "<ng-container *ngIf=\"!isCardLoading\">\n <a class=\"cursor-pointer\" (click)=\"raiseTelemetry(widgetData?.content);getRedirectUrlData(widgetData?.content); $event.stopPropagation()\" \n role=\"link\" i18n-aria-label>\n <mat-card class=\"card-portrait mr-2 card-portrait-clickable min-height-remove\" [ngClass]=\"widgetData.cardCustomeClass ? widgetData.cardCustomeClass : ''\">\n <div class=\"course_widget portrait_widget flex margin-bottom-xs\">\n <div class=\"flex flex-end flex-middle course_port\">\n <mat-icon class=\"mat-icon main_icon ws-mat-default-text margin-right-xs\">video_library</mat-icon>\n <sb-uic-display-content-type i18n-title title=\"Content Type\" *ngIf=\"widgetData.content?.primaryCategory\"\n class=\"ws-mat-black60-text font-normal mat-caption \" [useTranslation]=\"false\" [displayContentType]=\"widgetData.content?.primaryCategory==='Course Unit'\n ?'Module'\n :widgetData.content?.primaryCategory\">\n </sb-uic-display-content-type>\n </div>\n </div>\n <div class=\"flex\">\n <div class=\"margin-right-s\">\n <ng-container *ngIf=\"widgetData?.content?.posterImage\">\n <div class=\" img-block-portrait position-relative\">\n <img mat-card-image [src]=\"widgetData?.content?.posterImage | pipePublicURL\" loading=\"lazy\"\n class=\"card-image ws-mat-primary-lite-background margin-remove\" [wsUtilsDefaultThumbnail]=\"defaultThumbnail\"\n [alt]=\"widgetData.content.name\" />\n <div class=\"duration-box right-corner-portrait\" *ngIf=\"widgetData?.content?.duration > 0\">\n <mat-icon class=\"mat-icon main_icon mr-1\">access_time</mat-icon>\n <span class=\" ws-mat-white-text duration\">\n {{ (widgetData?.content?.duration || 120)| pipeDurationTransform: 'hms' }}\n </span>\n </div>\n <div class=\"duration-box right-corner-portrait\" *ngIf=\"widgetData?.content?.programDuration > 0\">\n <mat-icon class=\"mat-icon main_icon mr-1\">access_time</mat-icon>\n <span class=\" ws-mat-white-text duration\">\n {{widgetData?.content?.programDuration}} {{widgetData?.content?.programDuration === 1 ? 'day' : 'days'}}\n </span>\n </div>\n <ng-container *ngIf=\"cbPlanMapData && cbPlanMapData[widgetData?.content?.identifier]\">\n <ng-container [ngTemplateOutlet]=\"cbpPlan\" [ngTemplateOutletContext]=\"{data: {\n cbpData: cbPlanMapData[widgetData?.content?.identifier]\n }}\"></ng-container>\n </ng-container>\n </div>\n </ng-container>\n <ng-container *ngIf=\"!widgetData?.content?.posterImage\">\n <ng-container *ngIf=\"widgetData?.content?.appIcon; else defaultImg\">\n <img mat-card-image [src]=\"widgetData.content.appIcon | pipePublicURL\" loading=\"lazy\"\n class=\"card-image ws-mat-primary-lite-background margin-remove\" [wsUtilsDefaultThumbnail]=\"defaultThumbnail\"\n [alt]=\"widgetData.content.name\" />\n </ng-container>\n <ng-template #defaultImg>\n <img mat-card-image [src]=\"defaultThumbnail\" loading=\"lazy\"\n class=\"card-image ws-mat-primary-lite-background margin-remove\"\n [alt]=\"widgetData?.content?.name\" />\n </ng-template>\n </ng-container>\n </div>\n <div class=\"width-1-1\">\n <div [id]=\"'m-c-'+ widgetData?.content?.identifier\"\n class=\"portrait-subheading mat-subheading-2 title-text\">\n {{ widgetData?.content?.name }}\n </div>\n <div class=\"flex w-full flex-middle\">\n <div class=\"portrait_course_logo_box margin-right-xs\">\n <img [src]=\"widgetData?.content?.creatorLogo | pipePublicURL \" class=\"source-icon\" loading=\"lazy\" [wsUtilsDefaultThumbnail]=\"defaultSLogo\"\n [alt]=\"(widgetData?.content?.sourceName + '_' + widgetData?.content?.identifier)\" />\n </div>\n <span class=\"portrait-org-name font-normal mat-caption\">By {{ (widgetData.content.organisation && widgetData.content.organisation[0]) ? widgetData.content.organisation[0] : 'Karmayogi Bharat' }}</span>\n <!-- <span class=\"portrait-org-name font-normal mat-caption\">{{'cardcontentv2.by' | translate}} {{ (widgetData.content.organisation && widgetData.content.organisation[0]) ? widgetData.content.organisation[0] : 'Karmayogi Bharat' }}</span> -->\n </div>\n\n <div class=\"flex flex-middle rating-session margin-top-xs\">\n <div class=\"flex flex-middle\" *ngIf=\"widgetData?.content?.avgRating\">\n <mat-icon class=\"mr-1\">star</mat-icon>\n <span>{{widgetData.content.avgRating}}</span>\n </div>\n <!-- <ng-container *ngIf=\"widgetData?.content?.additionalTags && widgetData?.content?.additionalTags.includes('mostEnrolled')\">\n <span class=\"most-enrolled-text margin-left-xs\">{{ 'cardcontentv2.mostEnrolled' | translate }}</span>\n </ng-container>\n <ng-container *ngIf=\"widgetData?.content?.additionalTags && widgetData?.content?.additionalTags.includes('mostTrending')\">\n <span class=\"most-enrolled-text margin-left-xs\">{{ 'cardcontentv2.mostTrending' | translate }}</span>\n </ng-container> -->\n </div>\n </div>\n </div>\n </mat-card>\n </a>\n</ng-container>\n\n<ng-template #cbpPlan let-data=\"data\">\n <div class=\"cbp-mark left-0 border-top-radius\">\n <p *ngIf=\"data.cbpData.planDuration === acbpConstants?.UPCOMING\" class=\"cbp-warning\">{{data.cbpData.endDate | date: 'd MMM, y'}}</p>\n <p *ngIf=\"data.cbpData.planDuration === acbpConstants?.SUCCESS\" class=\"cbp-success\">{{data.cbpData.endDate | date: 'd MMM, y'}}</p>\n <p *ngIf=\"data.cbpData.planDuration === acbpConstants?.OVERDUE\" class=\"cbp-danger\">{{'OverDue' }}</p>\n </div>\n </ng-template>\n\n<ng-container *ngIf=\"isCardLoading\">\n <mat-card class=\"card-portrait mr-2 card-portrait-clickable\" [ngClass]=\"widgetData.cardCustomeClass ? widgetData.cardCustomeClass : ''\">\n <div class=\"flex\">\n <div class=\"margin-right-s\">\n <ng-container>\n <sb-uic-skeleton-loader [width]=\"'147px'\" [height]=\"'100px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </ng-container>\n </div>\n <div class=\"width-1-1\">\n <div class=\"portrait-subheading title-text\">\n <sb-uic-skeleton-loader [bindingClass]=\"'flex rounded width-1-1'\"></sb-uic-skeleton-loader>\n </div>\n <div class=\"flex w-full flex-wrap flex-middle\">\n <sb-uic-skeleton-loader [width]=\"'24px'\" [height]=\"'24px'\" [bindingClass]=\"'flex rounded margin-right-xs'\"></sb-uic-skeleton-loader>\n <sb-uic-skeleton-loader [width]=\"'100px'\" [height]=\"'12px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </div>\n <div class=\"portrait_widget flex margin-top-xs\">\n <div class=\"flex flex-end flex-middle\">\n <sb-uic-skeleton-loader [width]=\"'65px'\" [height]=\"'12px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </div>\n </div>\n </div>\n </div>\n </mat-card>\n</ng-container>",
|
|
9967
|
+
template: "<ng-container *ngIf=\"!isCardLoading\">\n <a class=\"cursor-pointer\" (click)=\"raiseTelemetry(widgetData?.content);getRedirectUrlData(widgetData?.content); $event.stopPropagation()\" \n role=\"link\" i18n-aria-label>\n <mat-card class=\"card-portrait mr-2 card-portrait-clickable min-height-remove\" [ngClass]=\"widgetData.cardCustomeClass ? widgetData.cardCustomeClass : ''\">\n <div class=\"course_widget portrait_widget flex margin-bottom-xs\">\n <div class=\"flex flex-end flex-middle course_port\">\n <mat-icon class=\"mat-icon main_icon ws-mat-default-text margin-right-xs\">video_library</mat-icon>\n <sb-uic-display-content-type i18n-title title=\"Content Type\" *ngIf=\"widgetData.content?.primaryCategory\"\n class=\"ws-mat-black60-text font-normal mat-caption \" [useTranslation]=\"false\" [displayContentType]=\"widgetData.content?.primaryCategory==='Course Unit'\n ?'Module'\n :widgetData.content?.primaryCategory\">\n </sb-uic-display-content-type>\n </div>\n </div>\n <div class=\"flex\">\n <div class=\"margin-right-s\">\n <ng-container *ngIf=\"widgetData?.content?.posterImage\">\n <div class=\" img-block-portrait position-relative\">\n <img mat-card-image [src]=\"widgetData?.content?.posterImage | pipePublicURL\" loading=\"lazy\"\n class=\"card-image ws-mat-primary-lite-background margin-remove\" [wsUtilsDefaultThumbnail]=\"defaultThumbnail\"\n [alt]=\"widgetData.content.name\" />\n <div class=\"duration-box right-corner-portrait\" *ngIf=\"widgetData?.content?.duration > 0\">\n <mat-icon class=\"mat-icon main_icon mr-1\">access_time</mat-icon>\n <span class=\" ws-mat-white-text duration\">\n {{ (widgetData?.content?.duration || 120)| pipeDurationTransform: 'hms' }}\n </span>\n </div>\n <div class=\"duration-box right-corner-portrait\" *ngIf=\"widgetData?.content?.programDuration > 0\">\n <mat-icon class=\"mat-icon main_icon mr-1\">access_time</mat-icon>\n <span class=\" ws-mat-white-text duration\">\n {{widgetData?.content?.programDuration}} {{widgetData?.content?.programDuration === 1 ? 'day' : 'days'}}\n </span>\n </div>\n <ng-container *ngIf=\"cbPlanMapData && cbPlanMapData[widgetData?.content?.identifier] && cbPlanMapData[widgetData?.content?.identifier]?.contentStatus < 2\">\n <ng-container [ngTemplateOutlet]=\"cbpPlan\" [ngTemplateOutletContext]=\"{data: {\n cbpData: cbPlanMapData[widgetData?.content?.identifier]\n }}\"></ng-container>\n </ng-container>\n </div>\n </ng-container>\n <ng-container *ngIf=\"!widgetData?.content?.posterImage\">\n <ng-container *ngIf=\"widgetData?.content?.appIcon; else defaultImg\">\n <img mat-card-image [src]=\"widgetData.content.appIcon | pipePublicURL\" loading=\"lazy\"\n class=\"card-image ws-mat-primary-lite-background margin-remove\" [wsUtilsDefaultThumbnail]=\"defaultThumbnail\"\n [alt]=\"widgetData.content.name\" />\n </ng-container>\n <ng-template #defaultImg>\n <img mat-card-image [src]=\"defaultThumbnail\" loading=\"lazy\"\n class=\"card-image ws-mat-primary-lite-background margin-remove\"\n [alt]=\"widgetData?.content?.name\" />\n </ng-template>\n </ng-container>\n </div>\n <div class=\"width-1-1\">\n <div [id]=\"'m-c-'+ widgetData?.content?.identifier\"\n class=\"portrait-subheading mat-subheading-2 title-text\">\n {{ widgetData?.content?.name }}\n </div>\n <div class=\"flex w-full flex-middle\">\n <div class=\"portrait_course_logo_box margin-right-xs\">\n <img [src]=\"widgetData?.content?.creatorLogo | pipePublicURL \" class=\"source-icon\" loading=\"lazy\" [wsUtilsDefaultThumbnail]=\"defaultSLogo\"\n [alt]=\"(widgetData?.content?.sourceName + '_' + widgetData?.content?.identifier)\" />\n </div>\n <span class=\"portrait-org-name font-normal mat-caption\">By {{ (widgetData.content.organisation && widgetData.content.organisation[0]) ? widgetData.content.organisation[0] : 'Karmayogi Bharat' }}</span>\n <!-- <span class=\"portrait-org-name font-normal mat-caption\">{{'cardcontentv2.by' | translate}} {{ (widgetData.content.organisation && widgetData.content.organisation[0]) ? widgetData.content.organisation[0] : 'Karmayogi Bharat' }}</span> -->\n </div>\n\n <div class=\"flex flex-middle rating-session margin-top-xs\">\n <div class=\"flex flex-middle\" *ngIf=\"widgetData?.content?.avgRating\">\n <mat-icon class=\"mr-1\">star</mat-icon>\n <span>{{widgetData.content.avgRating}}</span>\n </div>\n <!-- <ng-container *ngIf=\"widgetData?.content?.additionalTags && widgetData?.content?.additionalTags.includes('mostEnrolled')\">\n <span class=\"most-enrolled-text margin-left-xs\">{{ 'cardcontentv2.mostEnrolled' | translate }}</span>\n </ng-container>\n <ng-container *ngIf=\"widgetData?.content?.additionalTags && widgetData?.content?.additionalTags.includes('mostTrending')\">\n <span class=\"most-enrolled-text margin-left-xs\">{{ 'cardcontentv2.mostTrending' | translate }}</span>\n </ng-container> -->\n </div>\n </div>\n </div>\n </mat-card>\n </a>\n</ng-container>\n\n<ng-template #cbpPlan let-data=\"data\">\n <div class=\"cbp-mark left-0 border-top-radius\">\n <p *ngIf=\"data.cbpData.planDuration === acbpConstants?.UPCOMING\" class=\"cbp-warning\">{{data.cbpData.endDate | date: 'd MMM, y'}}</p>\n <p *ngIf=\"data.cbpData.planDuration === acbpConstants?.SUCCESS\" class=\"cbp-success\">{{data.cbpData.endDate | date: 'd MMM, y'}}</p>\n <p *ngIf=\"data.cbpData.planDuration === acbpConstants?.OVERDUE\" class=\"cbp-danger\">{{'OverDue' }}</p>\n </div>\n </ng-template>\n\n<ng-container *ngIf=\"isCardLoading\">\n <mat-card class=\"card-portrait mr-2 card-portrait-clickable\" [ngClass]=\"widgetData.cardCustomeClass ? widgetData.cardCustomeClass : ''\">\n <div class=\"flex\">\n <div class=\"margin-right-s\">\n <ng-container>\n <sb-uic-skeleton-loader [width]=\"'147px'\" [height]=\"'100px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </ng-container>\n </div>\n <div class=\"width-1-1\">\n <div class=\"portrait-subheading title-text\">\n <sb-uic-skeleton-loader [bindingClass]=\"'flex rounded width-1-1'\"></sb-uic-skeleton-loader>\n </div>\n <div class=\"flex w-full flex-wrap flex-middle\">\n <sb-uic-skeleton-loader [width]=\"'24px'\" [height]=\"'24px'\" [bindingClass]=\"'flex rounded margin-right-xs'\"></sb-uic-skeleton-loader>\n <sb-uic-skeleton-loader [width]=\"'100px'\" [height]=\"'12px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </div>\n <div class=\"portrait_widget flex margin-top-xs\">\n <div class=\"flex flex-end flex-middle\">\n <sb-uic-skeleton-loader [width]=\"'65px'\" [height]=\"'12px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </div>\n </div>\n </div>\n </div>\n </mat-card>\n</ng-container>",
|
|
9968
9968
|
styles: [".card-portrait{border-radius:12px;border:1px solid rgba(0,0,0,.08);opacity:1;width:350px;min-height:154px;padding:16px}.card-portrait .img-block-portrait{line-height:10px}.card-portrait .card-image{border-radius:8px;opacity:1;background-size:100%;width:147px;height:100px}.card-portrait .portrait-subheading{opacity:1;color:rgba(0,0,0,.87);font-weight:700;font-style:normal;letter-spacing:.25px;text-align:left;word-break:break-word;white-space:initial;margin:0 0 8px;position:relative;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;min-height:40px}.card-portrait .portrait_course_logo_box img{padding:3px;display:inline-block;width:24px;height:24px;border:1px solid #d6d6d6;border-radius:4px;box-sizing:border-box}.card-portrait span.portrait-org-name{width:75%;word-break:break-all;white-space:initial;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical}.card-portrait .portrait_widget{align-items:center;margin-top:0}.card-portrait .portrait_widget .course_port{border:1px solid #ef951e;padding:4px 8px;align-items:center;border-radius:16px}.card-portrait .portrait_widget .video-icon{opacity:1;color:#ef951e;width:15px;height:15px;font-size:15px}.card-portrait .portrait_widget .portrait-category{color:rgba(0,0,0,.6)!important;font-size:.75rem;opacity:1;font-family:Lato-Regular;font-weight:400;font-style:normal;letter-spacing:.25px;text-align:left;line-height:20px}.card-portrait .progress-wrapper .progress-block{width:60%}.card-portrait .progress-wrapper .progress-block .completed-time{color:#ef951e;display:flex;padding:8px 0}.card-portrait .progress-wrapper .progress-block .completed-time mat-icon{width:1rem;height:1rem;font-size:1rem}.card-portrait .progress-wrapper .progress-block .completed-time span{opacity:1;color:rgba(0,0,0,.87);font-family:Lato-Regular;font-size:.75rem;font-weight:400;font-style:normal;letter-spacing:.25px;text-align:left;line-height:16px}.card-portrait .progress-wrapper .progress-btn .resume-btn{opacity:1;color:#fff;font-family:Lato-Bold;font-size:14px;font-weight:700;font-style:normal;letter-spacing:.5px;text-align:left;line-height:20px;background:#1a4ca1;border-radius:63px;padding:6px 16px;border:none;width:100%;cursor:pointer}.card-portrait .progress-wrapper .progress-btn .resume-btn .textwrap{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:82px}.card-portrait .progress-wrapper .progress-btn .resume-btn:hover{background-color:#253379}.card-portrait .progress-bar-new{color:#ef951e!important;height:10px;border-radius:5px}.card-portrait .rating-session mat-icon{font-size:20px;height:20px;width:20px;color:#ef951e}.card-portrait .rating-session .rating-number{font-size:14px}.card-portrait .rating-session .most-enrolled-text{font-size:10px;font-weight:400;padding:4px;background:#ffea9e;border-radius:4px;line-height:12px}.card-portrait .right-corner-portrait{right:8px;bottom:8px}.card-portrait-clickable{min-height:146px!important}.card-portrait-clickable .right-corner-portrait{right:8px;bottom:8px}.card-portrait-clickable:hover{transform:scale(1.02)}.course_widget{margin-top:10px}.course_widget .mat-icon{vertical-align:middle;color:#ef951e!important}.course_widget .course_v2{border:1px solid #ef951e;padding:4px 8px;align-items:end;border-radius:16px}.course_widget .main_icon{font-size:16px;width:16px;height:16px}.rating-session mat-icon{font-size:16px;height:16px;width:12px;padding-right:3px;color:#ef951e}.rating-session span{font-size:11px}.rating-session .most-enrolled-text{padding:0 8px;background:#ffea9e;border-radius:4px}.duration-box{background:#000;position:absolute;border:none;display:flex;align-items:center;padding:4px;border-radius:4px}.duration-box.right-corner{right:4px;bottom:4px}.duration-box .mat-icon{vertical-align:middle;color:#fff!important;height:14px!important;width:14px!important;font-size:14px}.duration-box .duration{font:700 12px/16px Lato;display:inline-block;margin:0;padding:0}@media only screen and (max-width:768px){.card-portrait{width:calc(100vw - 66px)}.card-wide-v2{min-height:356px}.card-wide-v2 .imageholder img{border-radius:12px 12px 0 0!important}.cbpwidth{width:calc(100vw - 100px)}}.cbp-mark{border-radius:12px 0;opacity:1;background-image:linear-gradient(90deg,rgba(0,0,0,.6) 0,rgba(0,0,0,0) 100%);position:absolute;top:0;padding:8px}.cbp-mark p{opacity:1;background-color:#fff;padding:4px;opacity:1;color:#1b2133;font-family:Lato-Regular;font-size:10px;font-weight:400;font-style:Regular;letter-spacing:.5px;text-align:left;line-height:12px;margin-bottom:0}.cbpwidth{width:340px}.cbp-plan{border-radius:4px;opacity:1;background-color:#1b4ca1;top:4px;left:4px;opacity:1;color:rgba(255,255,255,.95);font-family:Lato-Bold;font-size:12px;font-weight:700;font-style:normal;letter-spacing:.25px;text-align:center;line-height:16px;padding:4px}.cbp-info{opacity:1;color:#fff;font-family:Lato-Regular;font-size:10px;font-weight:400;font-style:normal;letter-spacing:.5px;text-align:left;line-height:12px;padding:2px}.cbp-danger{border-radius:2px;border:1px solid rgba(0,0,0,.08);background-color:#d13924!important;color:#fff!important;opacity:1}.cbp-success{border-radius:2px;border:1px solid #1d8922;background-color:#1d8922!important;color:#fff!important;opacity:1}.cbp-warning{border-radius:2px;border:1px solid #ef951e;background-color:#ef951e!important;color:#fff!important;opacity:1}"]
|
|
9969
9969
|
}] }
|
|
9970
9970
|
];
|
|
@@ -11153,7 +11153,7 @@
|
|
|
11153
11153
|
CardPortraitExtComponent.decorators = [
|
|
11154
11154
|
{ type: core.Component, args: [{
|
|
11155
11155
|
selector: 'sb-uic-card-portrait-ext',
|
|
11156
|
-
template: "<ng-container *ngIf=\"!isCardLoading\">\n <mat-card class=\"card-standard-container mr-5 padding-remove cursor-pointer {{widgetData?.cardCustomeClass}}\" [ngClass]=\"{\n greyOut:\n widgetData?.deletedMode === 'greyOut' && !isLiveOrMarkForDeletion\n ? true\n : widgetData?.intranetMode === 'greyOut' && showIntranetContent\n }\" (click)=\"(showIntranetContent || !isLiveOrMarkForDeletion) && showSnackbar()\">\n <div class=\"display-contents\" [ngClass]=\"{\n disableClick:\n widgetData?.deletedMode === 'greyOut' && !isLiveOrMarkForDeletion\n ? true\n : widgetData?.intranetMode === 'greyOut' && showIntranetContent\n }\">\n <ng-container *ngIf=\"widgetData?.content\">\n <a (click)=\"getRedirectUrlData(widgetData?.content); $event.stopPropagation()\"\n role=\"link\" i18n-aria-label>\n <ng-container *ngIf=\"!isCardFlipped\">\n <div class=\"status-danger\" role=\"note\" i18n-aria-label aria-label=\"Content expired or deleted\" i18n-matTooltip\n matTooltip=\"Content may be expired or deleted\" *ngIf=\"!isLiveOrMarkForDeletion\"></div>\n <div class=\"status-danger\" role=\"note\" i18n-aria-label aria-label=\"Intranet content\" i18n-matTooltip\n matTooltip=\"Available only in Company's network\"\n *ngIf=\"widgetData?.intranetMode === 'greyOut' && showIntranetContent\"></div>\n <button *ngIf=\"showFlip\" class=\"detail-button ws-mat-primary-lite-background-op30\" mat-icon-button\n (click)=\"isCardFlipped = true\" aria-label=\"Details\" i18n-aria-label=\"Details | Click to see details\">\n <mat-icon>flip_to_back</mat-icon>\n </button>\n <mat-card-content class=\"min-top\">\n <div style=\"position: relative; z-index: 1;\">\n <ng-container *ngIf=\"widgetData?.content?.posterImage\">\n <img mat-card-image [src]=\"widgetData.content.posterImage | pipePublicURL\" loading=\"lazy\"\n class=\"card-img ws-mat-primary-lite-background margin-remove\" [wsUtilsDefaultThumbnail]=\"defaultThumbnail\"\n [alt]=\"widgetData.content.name\" />\n </ng-container>\n <ng-container *ngIf=\"!widgetData.content.posterImage\">\n <ng-container *ngIf=\"widgetData.content.appIcon; else defaultImg\">\n <img mat-card-image [src]=\"widgetData.content.appIcon \" loading=\"lazy\"\n class=\"card-img ws-mat-primary-lite-background margin-remove\" [wsUtilsDefaultThumbnail]=\"defaultThumbnail\"\n [alt]=\"widgetData?.content?.name\" />\n </ng-container>\n <ng-template #defaultImg>\n <img mat-card-image [src]=\"defaultThumbnail\" loading=\"lazy\"\n class=\"card-img ws-mat-primary-lite-background margin-remove\"\n [alt]=\"widgetData?.content?.name\" />\n </ng-template>\n </ng-container>\n <div class=\"source-div\" style=\"display: none;\">\n <img [src]=\"widgetData?.content.creatorLogo\" class=\"source-icon\" [wsUtilsDefaultThumbnail]=\"defaultSLogo\"\n [alt]=\"(widgetData?.content?.sourceName + '_' + widgetData.content?.contentId)\" />\n </div>\n <ng-container *ngIf=\"widgetData?.content?.cbPlanEndDate\">\n <div class=\"cbp-mark\">\n <span>{{widgetData?.content?.cbPlanEndDate | date: 'd MMM, y'}}</span>\n </div>\n </ng-container>\n <ng-container *ngIf=\"cbPlanMapData && cbPlanMapData[widgetData?.content?.contentId]\">\n <ng-container [ngTemplateOutlet]=\"cbpPlan\" [ngTemplateOutletContext]=\"{data: {\n cbpData: cbPlanMapData[widgetData?.content?.contentId]\n }}\"></ng-container>\n </ng-container>\n <div class=\"duration-box right-corner\" *ngIf=\"widgetData?.content?.duration > 0\">\n <mat-icon class=\"mat-icon main_icon mr-1\">access_time</mat-icon>\n <span class=\" ws-mat-white-text duration\">\n {{ (widgetData?.content?.duration || 120)| pipeDurationTransform: 'hms' }}\n </span>\n </div>\n <div class=\"duration-box right-corner\" *ngIf=\"widgetData?.content?.programDuration > 0\">\n <mat-icon class=\"mat-icon main_icon mr-1\">access_time</mat-icon>\n <span class=\" ws-mat-white-text duration\">\n {{widgetData?.content?.programDuration}} {{widgetData?.content?.programDuration === 1 ? 'day' : 'days'}}\n </span>\n </div>\n </div>\n <div class=\"padding-m\">\n <div class=\"course_widget flex margin-remove\">\n <div class=\"flex flex-end course_v2\">\n <mat-icon class=\"mat-icon main_icon ws-mat-default-text margin-right-xs\">video_library</mat-icon>\n <sb-uic-display-content-type [useTranslation]=\"false\" i18n-title title=\"Content Type\" *ngIf=\"widgetData.content?.topic\"\n class=\"ws-mat-black60-text font-normal mat-caption \" [displayContentType]=\"widgetData?.content?.primaryCategory==='Course Unit'\n ?'Module'\n :widgetData?.content?.primaryCategory? widgetData?.content?.primaryCategory : 'Course'\">\n \n </sb-uic-display-content-type>\n </div>\n </div>\n <div [id]=\"'m-c-'+ widgetData.content?.contentId\"\n class=\"mat-subheading-1 title-text ws-mat-text-block-fade-gradient\">\n {{ widgetData.content.name }}\n </div>\n <div class=\"flex w-full flex-wrap flex-middle\">\n <div class=\"course_logo_box\">\n <img [src]=\"widgetData.content.creatorLogo | pipePublicURL \" class=\"source-icon\" [wsUtilsDefaultThumbnail]=\"defaultSLogo\"\n [alt]=\"(widgetData.content.sourceName + '_' + widgetData.content.contentId)\" />\n </div>\n <!-- <span class=\"org-text\">{{'cardcontentv2.by' | translate}} -->\n <span class=\"org-text\">By {{ (widgetData?.content?.organisation && widgetData?.content?.organisation[0]) ? widgetData?.content?.organisation[0] : 'Karmayogi Bharat' }}</span>\n </div>\n <div class=\"flex flex-middle rating-session margin-top-m\">\n <div class=\"flex flex-middle\" *ngIf=\"widgetData?.content?.avgRating\">\n <mat-icon class=\"mr-1\">star</mat-icon>\n <span>{{widgetData.content.avgRating}}</span>\n </div>\n <!-- <span class=\"most-enrolled-text margin-left-m\">{{ 'cardcontentv2.mostEnrolled' | translate }}</span> -->\n <ng-container *ngIf=\"widgetData?.content?.additionalTags && widgetData?.content?.additionalTags.includes('mostEnrolled')\">\n <span class=\"most-enrolled-text margin-left-xs\">\n <!-- {{ 'cardcontentv2.mostEnrolled' | translate }} -->\n </span>\n </ng-container>\n <ng-container *ngIf=\"widgetData?.content?.additionalTags && widgetData?.content?.additionalTags.includes('mostTrending')\">\n <span class=\"most-enrolled-text margin-left-xs\">\n <!-- {{ 'cardcontentv2.mostTrending' | translate }} -->\n </span>\n </ng-container>\n </div>\n </div>\n </mat-card-content>\n </ng-container>\n <ng-container *ngIf=\"isCardFlipped\">\n <div class=\"flex items-center\">\n <!-- <h2 class=\"mat-subheading-2 flex-1 min-w-0 margin-remove-bottom\" i18n>{{'cardcontentv2.reason' | translate}}</h2> -->\n <button mat-icon-button (click)=\"isCardFlipped = false\">\n <mat-icon>close</mat-icon>\n </button>\n </div>\n <p class=\"text-justify mat-body-1\">\n {{ widgetData.content.reason }}\n </p>\n </ng-container>\n </a>\n </ng-container>\n </div>\n </mat-card>\n </ng-container>\n \n <ng-container *ngIf=\"isCardLoading\">\n <mat-card class=\"card-standard-container mr-5 padding-remove\" >\n <div class=\"display-contents\" >\n <ng-container *ngIf=\"!isCardFlipped\">\n <mat-card-content class=\"min-top\">\n <div style=\"position: relative; z-index: 1;\">\n <ng-container>\n <sb-uic-skeleton-loader [width]=\"'100%'\" [height]=\"'140px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </ng-container>\n </div>\n <div class=\"padding-m\">\n <div class=\"course_widget flex margin-remove\">\n <div class=\"flex flex-end\">\n <sb-uic-skeleton-loader [width]=\"'65px'\" [height]=\"'16px'\" [bindingClass]=\"'flex rounded br-8'\"></sb-uic-skeleton-loader>\n </div>\n </div>\n <div class=\"mat-subheading-1 title-text ws-mat-text-block-fade-gradient\">\n <sb-uic-skeleton-loader [width]=\"'100%'\" [height]=\"'16px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n <sb-uic-skeleton-loader [width]=\"'111px'\" [height]=\"'16px'\" [bindingClass]=\"'flex rounded margin-top-s'\"></sb-uic-skeleton-loader>\n </div>\n <div class=\"flex w-full flex-wrap flex-middle margin-top-m\">\n <div class=\"\">\n <sb-uic-skeleton-loader [width]=\"'28px'\" [height]=\"'28px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </div>\n <span class=\"org-text\"> <sb-uic-skeleton-loader [width]=\"'111px'\" [height]=\"'16px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader></span>\n </div>\n <div class=\"flex flex-middle rating-session margin-top-m\">\n <div class=\"flex flex-middle\">\n <sb-uic-skeleton-loader [width]=\"'45px'\" [height]=\"'12px'\" [bindingClass]=\"'flex rounded margin-top-m'\"></sb-uic-skeleton-loader>\n </div>\n </div>\n </div>\n </mat-card-content>\n </ng-container>\n </div>\n </mat-card>\n </ng-container>\n \n <ng-template #cbpPlan let-data=\"data\">\n <div class=\"cbp-mark left-0 border-top-radius\">\n <p *ngIf=\"data.cbpData.planDuration === acbpConstants?.UPCOMING\" class=\"cbp-warning\">{{data.cbpData.endDate | date: 'd MMM, y'}}</p>\n <p *ngIf=\"data.cbpData.planDuration === acbpConstants?.SUCCESS\" class=\"cbp-success\">{{data.cbpData.endDate | date: 'd MMM, y'}}</p>\n <p *ngIf=\"data.cbpData.planDuration === acbpConstants?.OVERDUE\" class=\"cbp-danger\">{{'OverDue' }}</p>\n </div>\n </ng-template>",
|
|
11156
|
+
template: "<ng-container *ngIf=\"!isCardLoading\">\n <mat-card class=\"card-standard-container mr-5 padding-remove cursor-pointer {{widgetData?.cardCustomeClass}}\" [ngClass]=\"{\n greyOut:\n widgetData?.deletedMode === 'greyOut' && !isLiveOrMarkForDeletion\n ? true\n : widgetData?.intranetMode === 'greyOut' && showIntranetContent\n }\" (click)=\"(showIntranetContent || !isLiveOrMarkForDeletion) && showSnackbar()\">\n <div class=\"display-contents\" [ngClass]=\"{\n disableClick:\n widgetData?.deletedMode === 'greyOut' && !isLiveOrMarkForDeletion\n ? true\n : widgetData?.intranetMode === 'greyOut' && showIntranetContent\n }\">\n <ng-container *ngIf=\"widgetData?.content\">\n <a (click)=\"getRedirectUrlData(widgetData?.content); $event.stopPropagation()\"\n role=\"link\" i18n-aria-label>\n <ng-container *ngIf=\"!isCardFlipped\">\n <div class=\"status-danger\" role=\"note\" i18n-aria-label aria-label=\"Content expired or deleted\" i18n-matTooltip\n matTooltip=\"Content may be expired or deleted\" *ngIf=\"!isLiveOrMarkForDeletion\"></div>\n <div class=\"status-danger\" role=\"note\" i18n-aria-label aria-label=\"Intranet content\" i18n-matTooltip\n matTooltip=\"Available only in Company's network\"\n *ngIf=\"widgetData?.intranetMode === 'greyOut' && showIntranetContent\"></div>\n <button *ngIf=\"showFlip\" class=\"detail-button ws-mat-primary-lite-background-op30\" mat-icon-button\n (click)=\"isCardFlipped = true\" aria-label=\"Details\" i18n-aria-label=\"Details | Click to see details\">\n <mat-icon>flip_to_back</mat-icon>\n </button>\n <mat-card-content class=\"min-top\">\n <div style=\"position: relative; z-index: 1;\">\n <ng-container *ngIf=\"widgetData?.content?.posterImage\">\n <img mat-card-image [src]=\"widgetData.content.posterImage | pipePublicURL\" loading=\"lazy\"\n class=\"card-img ws-mat-primary-lite-background margin-remove\" [wsUtilsDefaultThumbnail]=\"defaultThumbnail\"\n [alt]=\"widgetData.content.name\" />\n </ng-container>\n <ng-container *ngIf=\"!widgetData.content.posterImage\">\n <ng-container *ngIf=\"widgetData.content.appIcon; else defaultImg\">\n <img mat-card-image [src]=\"widgetData.content.appIcon \" loading=\"lazy\"\n class=\"card-img ws-mat-primary-lite-background margin-remove\" [wsUtilsDefaultThumbnail]=\"defaultThumbnail\"\n [alt]=\"widgetData?.content?.name\" />\n </ng-container>\n <ng-template #defaultImg>\n <img mat-card-image [src]=\"defaultThumbnail\" loading=\"lazy\"\n class=\"card-img ws-mat-primary-lite-background margin-remove\"\n [alt]=\"widgetData?.content?.name\" />\n </ng-template>\n </ng-container>\n <div class=\"source-div\" style=\"display: none;\">\n <img [src]=\"widgetData?.content.creatorLogo\" class=\"source-icon\" [wsUtilsDefaultThumbnail]=\"defaultSLogo\"\n [alt]=\"(widgetData?.content?.sourceName + '_' + widgetData.content?.contentId)\" />\n </div>\n <ng-container *ngIf=\"widgetData?.content?.cbPlanEndDate\">\n <div class=\"cbp-mark\">\n <span>{{widgetData?.content?.cbPlanEndDate | date: 'd MMM, y'}}</span>\n </div>\n </ng-container>\n <ng-container *ngIf=\"cbPlanMapData && cbPlanMapData[widgetData?.content?.contentId] && cbPlanMapData[widgetData?.content?.identifier]?.contentStatus < 2 \">\n <ng-container [ngTemplateOutlet]=\"cbpPlan\" [ngTemplateOutletContext]=\"{data: {\n cbpData: cbPlanMapData[widgetData?.content?.contentId]\n }}\"></ng-container>\n </ng-container>\n <div class=\"duration-box right-corner\" *ngIf=\"widgetData?.content?.duration > 0\">\n <mat-icon class=\"mat-icon main_icon mr-1\">access_time</mat-icon>\n <span class=\" ws-mat-white-text duration\">\n {{ (widgetData?.content?.duration || 120)| pipeDurationTransform: 'hms' }}\n </span>\n </div>\n <div class=\"duration-box right-corner\" *ngIf=\"widgetData?.content?.programDuration > 0\">\n <mat-icon class=\"mat-icon main_icon mr-1\">access_time</mat-icon>\n <span class=\" ws-mat-white-text duration\">\n {{widgetData?.content?.programDuration}} {{widgetData?.content?.programDuration === 1 ? 'day' : 'days'}}\n </span>\n </div>\n </div>\n <div class=\"padding-m\">\n <div class=\"course_widget flex margin-remove\">\n <div class=\"flex flex-end course_v2\">\n <mat-icon class=\"mat-icon main_icon ws-mat-default-text margin-right-xs\">video_library</mat-icon>\n <sb-uic-display-content-type [useTranslation]=\"false\" i18n-title title=\"Content Type\" *ngIf=\"widgetData.content?.topic\"\n class=\"ws-mat-black60-text font-normal mat-caption \" [displayContentType]=\"widgetData?.content?.primaryCategory==='Course Unit'\n ?'Module'\n :widgetData?.content?.primaryCategory? widgetData?.content?.primaryCategory : 'Course'\">\n \n </sb-uic-display-content-type>\n </div>\n </div>\n <div [id]=\"'m-c-'+ widgetData.content?.contentId\"\n class=\"mat-subheading-1 title-text ws-mat-text-block-fade-gradient\">\n {{ widgetData.content.name }}\n </div>\n <div class=\"flex w-full flex-wrap flex-middle\">\n <div class=\"course_logo_box\">\n <img [src]=\"widgetData.content.creatorLogo | pipePublicURL \" class=\"source-icon\" [wsUtilsDefaultThumbnail]=\"defaultSLogo\"\n [alt]=\"(widgetData.content.sourceName + '_' + widgetData.content.contentId)\" />\n </div>\n <!-- <span class=\"org-text\">{{'cardcontentv2.by' | translate}} -->\n <span class=\"org-text\">By {{ (widgetData?.content?.organisation && widgetData?.content?.organisation[0]) ? widgetData?.content?.organisation[0] : 'Karmayogi Bharat' }}</span>\n </div>\n <div class=\"flex flex-middle rating-session margin-top-m\">\n <div class=\"flex flex-middle\" *ngIf=\"widgetData?.content?.avgRating\">\n <mat-icon class=\"mr-1\">star</mat-icon>\n <span>{{widgetData.content.avgRating}}</span>\n </div>\n <!-- <span class=\"most-enrolled-text margin-left-m\">{{ 'cardcontentv2.mostEnrolled' | translate }}</span> -->\n <ng-container *ngIf=\"widgetData?.content?.additionalTags && widgetData?.content?.additionalTags.includes('mostEnrolled')\">\n <span class=\"most-enrolled-text margin-left-xs\">\n <!-- {{ 'cardcontentv2.mostEnrolled' | translate }} -->\n </span>\n </ng-container>\n <ng-container *ngIf=\"widgetData?.content?.additionalTags && widgetData?.content?.additionalTags.includes('mostTrending')\">\n <span class=\"most-enrolled-text margin-left-xs\">\n <!-- {{ 'cardcontentv2.mostTrending' | translate }} -->\n </span>\n </ng-container>\n </div>\n </div>\n </mat-card-content>\n </ng-container>\n <ng-container *ngIf=\"isCardFlipped\">\n <div class=\"flex items-center\">\n <!-- <h2 class=\"mat-subheading-2 flex-1 min-w-0 margin-remove-bottom\" i18n>{{'cardcontentv2.reason' | translate}}</h2> -->\n <button mat-icon-button (click)=\"isCardFlipped = false\">\n <mat-icon>close</mat-icon>\n </button>\n </div>\n <p class=\"text-justify mat-body-1\">\n {{ widgetData.content.reason }}\n </p>\n </ng-container>\n </a>\n </ng-container>\n </div>\n </mat-card>\n </ng-container>\n \n <ng-container *ngIf=\"isCardLoading\">\n <mat-card class=\"card-standard-container mr-5 padding-remove\" >\n <div class=\"display-contents\" >\n <ng-container *ngIf=\"!isCardFlipped\">\n <mat-card-content class=\"min-top\">\n <div style=\"position: relative; z-index: 1;\">\n <ng-container>\n <sb-uic-skeleton-loader [width]=\"'100%'\" [height]=\"'140px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </ng-container>\n </div>\n <div class=\"padding-m\">\n <div class=\"course_widget flex margin-remove\">\n <div class=\"flex flex-end\">\n <sb-uic-skeleton-loader [width]=\"'65px'\" [height]=\"'16px'\" [bindingClass]=\"'flex rounded br-8'\"></sb-uic-skeleton-loader>\n </div>\n </div>\n <div class=\"mat-subheading-1 title-text ws-mat-text-block-fade-gradient\">\n <sb-uic-skeleton-loader [width]=\"'100%'\" [height]=\"'16px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n <sb-uic-skeleton-loader [width]=\"'111px'\" [height]=\"'16px'\" [bindingClass]=\"'flex rounded margin-top-s'\"></sb-uic-skeleton-loader>\n </div>\n <div class=\"flex w-full flex-wrap flex-middle margin-top-m\">\n <div class=\"\">\n <sb-uic-skeleton-loader [width]=\"'28px'\" [height]=\"'28px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </div>\n <span class=\"org-text\"> <sb-uic-skeleton-loader [width]=\"'111px'\" [height]=\"'16px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader></span>\n </div>\n <div class=\"flex flex-middle rating-session margin-top-m\">\n <div class=\"flex flex-middle\">\n <sb-uic-skeleton-loader [width]=\"'45px'\" [height]=\"'12px'\" [bindingClass]=\"'flex rounded margin-top-m'\"></sb-uic-skeleton-loader>\n </div>\n </div>\n </div>\n </mat-card-content>\n </ng-container>\n </div>\n </mat-card>\n </ng-container>\n \n <ng-template #cbpPlan let-data=\"data\">\n <div class=\"cbp-mark left-0 border-top-radius\">\n <p *ngIf=\"data.cbpData.planDuration === acbpConstants?.UPCOMING\" class=\"cbp-warning\">{{data.cbpData.endDate | date: 'd MMM, y'}}</p>\n <p *ngIf=\"data.cbpData.planDuration === acbpConstants?.SUCCESS\" class=\"cbp-success\">{{data.cbpData.endDate | date: 'd MMM, y'}}</p>\n <p *ngIf=\"data.cbpData.planDuration === acbpConstants?.OVERDUE\" class=\"cbp-danger\">{{'OverDue' }}</p>\n </div>\n </ng-template>",
|
|
11157
11157
|
styles: [".course_widget{margin-top:10px}.course_widget .mat-icon{vertical-align:middle;color:#ef951e!important}.course_widget .course_v2{border:1px solid #ef951e;padding:4px 8px;align-items:end;border-radius:16px}.course_widget .main_icon{font-size:16px;width:16px;height:16px}.rating-session mat-icon{font-size:16px;height:16px;width:12px;padding-right:3px;color:#ef951e}.rating-session span{font-size:11px}.rating-session .most-enrolled-text{padding:0 8px;background:#ffea9e;border-radius:4px}.card-standard-container{position:relative;width:245px;min-height:346px;border-radius:8px;box-sizing:border-box;box-shadow:0 10px 30px rgba(153,153,153,.2);overflow:hidden;height:346px;margin:20px 8px}.card-standard-container .progress-bar{width:101%;margin-left:-15px;display:flex;margin-top:0;background:bisque;position:absolute;bottom:0}.card-standard-container ::ng-deep .mat-progress-bar{height:8px!important}.card-standard-container .icon_text{font-size:12px;line-height:16px;text-transform:uppercase}.card-standard-container .course_logo_box{width:38px;height:38px;background:#fff;border-radius:8px;box-sizing:border-box;box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12)}.card-standard-container .course_logo_box img{height:28px;width:28px;padding:5px;display:inline-block}.card-standard-container .course_logo_box p{display:inline-block;vertical-align:top}.card-standard-container .org-text{font-size:12px;font-weight:400;width:75%;padding-left:10px;word-break:break-all;white-space:initial;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical}.card-standard-container .source-div{position:relative;top:100px;background:#fff;z-index:3;border:1px solid #dedfe0;min-width:72px;min-height:72px;max-width:72px;max-height:72px;display:flex;border-radius:8px}.card-standard-container .source-div .source-icon{border-radius:8px;display:block;margin:auto;max-width:58px;max-height:-webkit-fill-available}.card-standard-container mat-card-content{background:#fff}.card-standard-container .card-img{min-width:245px;max-height:140px;min-height:140px;display:block;-o-object-fit:fill;object-fit:fill;border-top-left-radius:8px;border-top-right-radius:8px;width:100%}.card-standard-container .mat-subheading-1{font:600 14px/24px Montserrat}.card-standard-container .complexity{padding-top:70px;display:flex;font-size:14px;line-height:21px;padding-bottom:10px}.card-standard-container .complexity .mode-tag{border-radius:5px;order:2;margin-left:auto;color:#fff;font-size:10px}.card-standard-container .complexity .duration{display:flex;margin-left:auto;order:3;font-weight:700}.card-standard-container .complexity .time-text{margin:0 5px 0 6px;font-weight:700}.card-standard-container .basic{margin:auto 0}.card-standard-container .title-text{word-break:break-all;white-space:initial;margin:8px 0;position:relative;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;min-height:48px}.card-standard-container .description-text{position:relative;overflow:hidden;height:42px;white-space:normal;text-overflow:ellipsis}.duration-box{background:#000;position:absolute;border:none;display:flex;align-items:center;padding:4px;border-radius:4px}.duration-box.right-corner{right:4px;bottom:4px}.duration-box .mat-icon{vertical-align:middle;color:#fff!important;height:14px!important;width:14px!important;font-size:14px}.duration-box .duration{font:700 12px/16px Lato;display:inline-block;margin:0;padding:0}.width-238{width:238px!important}.cbp-mark{border-radius:12px 0;opacity:1;background-image:linear-gradient(90deg,rgba(0,0,0,.6) 0,rgba(0,0,0,0) 100%);position:absolute;top:0;padding:8px}.cbp-mark p{opacity:1;background-color:#fff;padding:4px;opacity:1;color:#1b2133;font-family:Lato-Regular;font-size:10px;font-weight:400;font-style:Regular;letter-spacing:.5px;text-align:left;line-height:12px;margin-bottom:0}.cbpwidth{width:340px}.cbp-plan{border-radius:4px;opacity:1;background-color:#1b4ca1;top:4px;left:4px;opacity:1;color:rgba(255,255,255,.95);font-family:Lato-Bold;font-size:12px;font-weight:700;font-style:normal;letter-spacing:.25px;text-align:center;line-height:16px;padding:4px}.cbp-info{opacity:1;color:#fff;font-family:Lato-Regular;font-size:10px;font-weight:400;font-style:normal;letter-spacing:.5px;text-align:left;line-height:12px;padding:2px}.cbp-danger{border-radius:2px;border:1px solid rgba(0,0,0,.08);background-color:#d13924!important;color:#fff!important;opacity:1}.cbp-success{border-radius:2px;border:1px solid #1d8922;background-color:#1d8922!important;color:#fff!important;opacity:1}.cbp-warning{border-radius:2px;border:1px solid #ef951e;background-color:#ef951e!important;color:#fff!important;opacity:1}"]
|
|
11158
11158
|
}] }
|
|
11159
11159
|
];
|
|
@@ -11918,7 +11918,7 @@
|
|
|
11918
11918
|
CardProgressPortraitLibComponent.decorators = [
|
|
11919
11919
|
{ type: core.Component, args: [{
|
|
11920
11920
|
selector: 'sb-uic-card-progress-portrait-lib',
|
|
11921
|
-
template: "<ng-container *ngIf=\"!isCardLoading\">\n <mat-card class=\"card-portrait card-progress-portrait-lib cursor-pointer\" [ngClass]=\"widgetData?.cardCustomeClass ? widgetData?.cardCustomeClass : ''\" (click)=\"raiseTelemetry();getRedirectUrlData(widgetData?.content); $event.stopPropagation()\" >\n <div class=\"course_widget portrait_widget flex margin-bottom-xs\">\n <div class=\"flex flex-end flex-middle course_port\">\n <mat-icon class=\"mat-icon main_icon ws-mat-default-text margin-right-xs\">video_library</mat-icon>\n <sb-uic-display-content-type i18n-title title=\"Content Type\" *ngIf=\"widgetData?.content?.primaryCategory\"\n class=\"ws-mat-black60-text font-normal mat-caption \" [displayContentType]=\"widgetData?.content?.primaryCategory==='Course Unit'\n ?'Module'\n :widgetData?.content?.primaryCategory\">\n </sb-uic-display-content-type>\n </div>\n </div>\n <div class=\"flex\">\n <div class=\"margin-right-s\">\n <ng-container *ngIf=\"widgetData?.content?.posterImage\">\n <div class=\" img-block-portrait position-relative\">\n <img mat-card-image [src]=\"widgetData?.content?.posterImage | pipePublicURL\" loading=\"lazy\"\n class=\"card-image ws-mat-primary-lite-background margin-remove\" [wsUtilsDefaultThumbnail]=\"defaultThumbnail\"\n [alt]=\"widgetData?.content?.name\" />\n <div class=\"duration-box right-corner-portrait\" *ngIf=\"widgetData?.content?.duration > 0\">\n <mat-icon class=\"mat-icon main_icon mr-1\">access_time</mat-icon>\n <span class=\" ws-mat-white-text duration\">\n {{ (widgetData?.content?.duration || 120)| pipeDurationTransform: 'hms' }}\n </span>\n </div>\n <div class=\"duration-box right-corner-portrait\" *ngIf=\"widgetData?.content?.programDuration > 0\">\n <mat-icon class=\"mat-icon main_icon mr-1\">access_time</mat-icon>\n <span class=\" ws-mat-white-text duration\">\n {{widgetData?.content?.programDuration}} {{widgetData?.content?.programDuration === 1 ? 'day' : 'days'}}\n </span>\n </div>\n <ng-container *ngIf=\"cbPlanMapData && cbPlanMapData[widgetData?.content?.identifier]\">\n <ng-container [ngTemplateOutlet]=\"cbpPlan\" [ngTemplateOutletContext]=\"{data: {\n cbpData: cbPlanMapData[widgetData?.content?.identifier]\n }}\"></ng-container>\n </ng-container>\n </div>\n </ng-container>\n <ng-container *ngIf=\"!widgetData?.content?.posterImage\">\n <ng-container *ngIf=\"widgetData?.content?.appIcon; else defaultImg\">\n <img mat-card-image [src]=\"widgetData?.content?.appIcon | pipePublicURL\" loading=\"lazy\"\n class=\"card-image ws-mat-primary-lite-background margin-remove\" [wsUtilsDefaultThumbnail]=\"defaultThumbnail\"\n [alt]=\"widgetData?.content?.name\" />\n </ng-container>\n <ng-template #defaultImg>\n <img mat-card-image [src]=\"defaultThumbnail\" loading=\"lazy\"\n class=\"card-image ws-mat-primary-lite-background margin-remove\"\n [alt]=\"widgetData?.content?.name\" />\n </ng-template>\n </ng-container>\n </div>\n <div class=\"width-1-1\">\n <div [id]=\"'m-c-'+ widgetData?.content?.identifier\"\n class=\"portrait-subheading mat-subheading-2 title-text\">\n {{ widgetData?.content?.name }}\n </div>\n <div class=\"flex w-full flex-middle\">\n <div class=\"portrait_course_logo_box margin-right-xs\">\n <img [src]=\"widgetData?.content?.creatorLogo | pipePublicURL \" class=\"source-icon\" loading=\"lazy\" [wsUtilsDefaultThumbnail]=\"defaultSLogo\"\n [alt]=\"(widgetData?.content?.sourceName + '_' + widgetData?.content?.identifier)\" />\n </div>\n <span class=\"portrait-org-name font-normal mat-caption\">{{'cardcontentv2.by' | translate}} {{ (widgetData?.content?.organisation && widgetData?.content?.organisation[0]) ? widgetData?.content?.organisation[0] : 'Karmayogi Bharat' }}</span>\n </div>\n\n </div>\n </div>\n <ng-container *ngIf=\"widgetData?.content?.completionPercentage < 100\">\n <div class=\"flex flex-align-end progress-wrapper flex-between\" >\n <div class=\"progress-block\" >\n <div class=\"completed-time\">\n <mat-icon class=\"mat-icon schedule margin-right-xs\">schedule</mat-icon>\n <span>{{widgetData?.content?.completionPercentage}}%</span>\n </div>\n <div>\n <ng-container *ngIf=\"widgetData?.content?.completionStatus < 2\">\n <sb-uic-content-progress class=\"progress-bar-new\" [customClassName]=\"'course-progress-bar'\" *ngIf=\"widgetData?.content?.identifier\"\n [contentId]=\"widgetData?.content?.identifier\" [progress]=\"widgetData?.content?.completionPercentage\"\n [progressType]=\"'percentage'\">\n </sb-uic-content-progress>\n </ng-container>\n </div>\n </div>\n <div class=\"progress-btn\">\n <button class=\"resume-btn flex flex-middle flex-between\" [routerLink]=\"['/app/toc/',widgetData?.content?.identifier,'overview']\"\n [queryParams]=\"{primaryCategory: widgetData?.content?.primaryCategory}\" [state]=\"widgetData?.stateData\" \n [matTooltipPosition]=\"'below'\"\n [matTooltipDisabled]=\"(!widgetData?.content?.completionPercentage ? translateLabels('start', 'cardcontentv2') : translateLabels('resume', 'cardcontentv2')).length < 11\"\n matTooltip=\"{{!widgetData?.content?.completionPercentage ? translateLabels('start', 'cardcontentv2') : translateLabels('resume', 'cardcontentv2')}}\">\n <span class=\"textwrap margin-right-xs\">\n {{!widgetData?.content?.completionPercentage ? translateLabels('start', 'cardcontentv2') : translateLabels('resume', 'cardcontentv2')}}</span>\n <img class=\"stats-icon\" height=\"20\" width=\"20\" src=\"/assets/icons/home/play.svg\">\n </button>\n </div>\n </div>\n </ng-container>\n <ng-container *ngIf=\"widgetData?.content?.completionPercentage === 100\">\n <div class=\"flex flex-align-end progress-wrapper flex-end mt-1\">\n <div class=\"progress-btn\">\n <button class=\"resume-btn flex flex-middle flex-between view-btn\" [ngClass]=\"{'disable-btn': downloadCertificateLoading || widgetData?.content?.issuedCertificates?.length === 0}\" (click)=\"!downloadCertificateLoading && downloadCertificate(widgetData?.content);$event.stopPropagation()\" \n [matTooltipPosition]=\"'below'\"\n [matTooltipDisabled]=\"(translateLabels('viewCertificate', 'cardcontentv2')).length < 11\"\n matTooltip=\"{{'cardcontentv2.viewCertificate' | translate }}\">\n <span class=\"margin-right-xs textwrap\">{{'cardcontentv2.viewCertificate' | translate }}</span>\n <img class=\"stats-icon\" *ngIf=\"!downloadCertificateLoading\" height=\"20\" width=\"20\" src=\"/assets/icons/home/eye-white.svg\">\n <div class=\"center flex flex-middle\" *ngIf=\"downloadCertificateLoading\">\n <mat-spinner strokeWidth=\"2\" stroke=\"'red'\" class=\"white-spinner\" [diameter]=\"16\"></mat-spinner>\n </div>\n </button>\n </div>\n </div>\n </ng-container>\n </mat-card>\n</ng-container>\n\n\n<ng-template #cbpPlan let-data=\"data\">\n <div class=\"cbp-mark left-0 border-top-radius\">\n <p *ngIf=\"data.cbpData.planDuration === acbpConstants?.UPCOMING\" class=\"cbp-warning\">{{data.cbpData.endDate | date: 'd MMM, y'}}</p>\n <p *ngIf=\"data.cbpData.planDuration === acbpConstants?.SUCCESS\" class=\"cbp-success\">{{data.cbpData.endDate | date: 'd MMM, y'}}</p>\n <p *ngIf=\"data.cbpData.planDuration === acbpConstants?.OVERDUE\" class=\"cbp-danger\">{{'OverDue' }}</p>\n </div>\n</ng-template>\n\n<ng-container *ngIf=\"isCardLoading\">\n <mat-card class=\"card-portrait\" [ngClass]=\"widgetData.cardCustomeClass ? widgetData.cardCustomeClass : ''\">\n <div class=\"margin-bottom-xs\">\n <ng-container>\n <sb-uic-skeleton-loader [width]=\"'147px'\" [height]=\"'26px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </ng-container>\n </div>\n <div class=\"flex\">\n <div class=\"margin-right-s\">\n <ng-container>\n <sb-uic-skeleton-loader [width]=\"'147px'\" [height]=\"'98px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </ng-container>\n </div>\n <div class=\"width-1-1\">\n <div class=\"portrait-subheading title-text\">\n <sb-uic-skeleton-loader [bindingClass]=\"'flex rounded width-1-1'\"></sb-uic-skeleton-loader>\n </div>\n <div class=\"flex w-full flex-wrap flex-middle\">\n <div class=\" margin-right-xs\">\n <sb-uic-skeleton-loader [width]=\"'24px'\" [height]=\"'24px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </div>\n <span class=\"\"><sb-uic-skeleton-loader [width]=\"'133px'\" [height]=\"'12px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader></span>\n </div>\n <div class=\"portrait_widget flex margin-top-xs\">\n <div class=\"flex flex-end flex-middle\">\n <sb-uic-skeleton-loader [width]=\"'65px'\" [height]=\"'12px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </div>\n </div>\n </div>\n </div>\n <div class=\"flex flex-align-end progress-wrapper flex-between\">\n <div class=\"progress-block\">\n <div class=\"completed-time\">\n <sb-uic-skeleton-loader [width]=\"'211px'\" [height]=\"'16px'\" [bindingClass]=\"'flex rounded margin-top-xs md:w-211'\"></sb-uic-skeleton-loader>\n </div>\n </div>\n <div class=\"progress-btn\">\n <sb-uic-skeleton-loader [width]=\"'117px'\" [height]=\"'32px'\" [bindingClass]=\"'flex rounded margin-top-xs'\"></sb-uic-skeleton-loader>\n </div>\n </div>\n </mat-card>\n</ng-container>",
|
|
11921
|
+
template: "<ng-container *ngIf=\"!isCardLoading\">\n <mat-card class=\"card-portrait card-progress-portrait-lib cursor-pointer\" [ngClass]=\"widgetData?.cardCustomeClass ? widgetData?.cardCustomeClass : ''\" (click)=\"raiseTelemetry();getRedirectUrlData(widgetData?.content); $event.stopPropagation()\" >\n <div class=\"course_widget portrait_widget flex margin-bottom-xs\">\n <div class=\"flex flex-end flex-middle course_port\">\n <mat-icon class=\"mat-icon main_icon ws-mat-default-text margin-right-xs\">video_library</mat-icon>\n <sb-uic-display-content-type i18n-title title=\"Content Type\" *ngIf=\"widgetData?.content?.primaryCategory\"\n class=\"ws-mat-black60-text font-normal mat-caption \" [displayContentType]=\"widgetData?.content?.primaryCategory==='Course Unit'\n ?'Module'\n :widgetData?.content?.primaryCategory\">\n </sb-uic-display-content-type>\n </div>\n </div>\n <div class=\"flex\">\n <div class=\"margin-right-s\">\n <ng-container *ngIf=\"widgetData?.content?.posterImage\">\n <div class=\" img-block-portrait position-relative\">\n <img mat-card-image [src]=\"widgetData?.content?.posterImage | pipePublicURL\" loading=\"lazy\"\n class=\"card-image ws-mat-primary-lite-background margin-remove\" [wsUtilsDefaultThumbnail]=\"defaultThumbnail\"\n [alt]=\"widgetData?.content?.name\" />\n <div class=\"duration-box right-corner-portrait\" *ngIf=\"widgetData?.content?.duration > 0\">\n <mat-icon class=\"mat-icon main_icon mr-1\">access_time</mat-icon>\n <span class=\" ws-mat-white-text duration\">\n {{ (widgetData?.content?.duration || 120)| pipeDurationTransform: 'hms' }}\n </span>\n </div>\n <div class=\"duration-box right-corner-portrait\" *ngIf=\"widgetData?.content?.programDuration > 0\">\n <mat-icon class=\"mat-icon main_icon mr-1\">access_time</mat-icon>\n <span class=\" ws-mat-white-text duration\">\n {{widgetData?.content?.programDuration}} {{widgetData?.content?.programDuration === 1 ? 'day' : 'days'}}\n </span>\n </div>\n <ng-container *ngIf=\"cbPlanMapData && cbPlanMapData[widgetData?.content?.identifier] && cbPlanMapData[widgetData?.content?.identifier]?.contentStatus < 2\">\n <ng-container [ngTemplateOutlet]=\"cbpPlan\" [ngTemplateOutletContext]=\"{data: {\n cbpData: cbPlanMapData[widgetData?.content?.identifier]\n }}\"></ng-container>\n </ng-container>\n </div>\n </ng-container>\n <ng-container *ngIf=\"!widgetData?.content?.posterImage\">\n <ng-container *ngIf=\"widgetData?.content?.appIcon; else defaultImg\">\n <img mat-card-image [src]=\"widgetData?.content?.appIcon | pipePublicURL\" loading=\"lazy\"\n class=\"card-image ws-mat-primary-lite-background margin-remove\" [wsUtilsDefaultThumbnail]=\"defaultThumbnail\"\n [alt]=\"widgetData?.content?.name\" />\n </ng-container>\n <ng-template #defaultImg>\n <img mat-card-image [src]=\"defaultThumbnail\" loading=\"lazy\"\n class=\"card-image ws-mat-primary-lite-background margin-remove\"\n [alt]=\"widgetData?.content?.name\" />\n </ng-template>\n </ng-container>\n </div>\n <div class=\"width-1-1\">\n <div [id]=\"'m-c-'+ widgetData?.content?.identifier\"\n class=\"portrait-subheading mat-subheading-2 title-text\">\n {{ widgetData?.content?.name }}\n </div>\n <div class=\"flex w-full flex-middle\">\n <div class=\"portrait_course_logo_box margin-right-xs\">\n <img [src]=\"widgetData?.content?.creatorLogo | pipePublicURL \" class=\"source-icon\" loading=\"lazy\" [wsUtilsDefaultThumbnail]=\"defaultSLogo\"\n [alt]=\"(widgetData?.content?.sourceName + '_' + widgetData?.content?.identifier)\" />\n </div>\n <span class=\"portrait-org-name font-normal mat-caption\">{{'cardcontentv2.by' | translate}} {{ (widgetData?.content?.organisation && widgetData?.content?.organisation[0]) ? widgetData?.content?.organisation[0] : 'Karmayogi Bharat' }}</span>\n </div>\n\n </div>\n </div>\n <ng-container *ngIf=\"widgetData?.content?.completionPercentage < 100\">\n <div class=\"flex flex-align-end progress-wrapper flex-between\" >\n <div class=\"progress-block\" >\n <div class=\"completed-time\">\n <mat-icon class=\"mat-icon schedule margin-right-xs\">schedule</mat-icon>\n <span>{{widgetData?.content?.completionPercentage}}%</span>\n </div>\n <div>\n <ng-container *ngIf=\"widgetData?.content?.completionStatus < 2\">\n <sb-uic-content-progress class=\"progress-bar-new\" [customClassName]=\"'course-progress-bar'\" *ngIf=\"widgetData?.content?.identifier\"\n [contentId]=\"widgetData?.content?.identifier\" [progress]=\"widgetData?.content?.completionPercentage\"\n [progressType]=\"'percentage'\">\n </sb-uic-content-progress>\n </ng-container>\n </div>\n </div>\n <div class=\"progress-btn\">\n <button class=\"resume-btn flex flex-middle flex-between\" [routerLink]=\"['/app/toc/',widgetData?.content?.identifier,'overview']\"\n [queryParams]=\"{primaryCategory: widgetData?.content?.primaryCategory}\" [state]=\"widgetData?.stateData\" \n [matTooltipPosition]=\"'below'\"\n [matTooltipDisabled]=\"(!widgetData?.content?.completionPercentage ? translateLabels('start', 'cardcontentv2') : translateLabels('resume', 'cardcontentv2')).length < 11\"\n matTooltip=\"{{!widgetData?.content?.completionPercentage ? translateLabels('start', 'cardcontentv2') : translateLabels('resume', 'cardcontentv2')}}\">\n <span class=\"textwrap margin-right-xs\">\n {{!widgetData?.content?.completionPercentage ? translateLabels('start', 'cardcontentv2') : translateLabels('resume', 'cardcontentv2')}}</span>\n <img class=\"stats-icon\" height=\"20\" width=\"20\" src=\"/assets/icons/home/play.svg\">\n </button>\n </div>\n </div>\n </ng-container>\n <ng-container *ngIf=\"widgetData?.content?.completionPercentage === 100\">\n <div class=\"flex flex-align-end progress-wrapper flex-end mt-1\">\n <div class=\"progress-btn\">\n <button class=\"resume-btn flex flex-middle flex-between view-btn\" [ngClass]=\"{'disable-btn': downloadCertificateLoading || widgetData?.content?.issuedCertificates?.length === 0}\" (click)=\"!downloadCertificateLoading && downloadCertificate(widgetData?.content);$event.stopPropagation()\" \n [matTooltipPosition]=\"'below'\"\n [matTooltipDisabled]=\"(translateLabels('viewCertificate', 'cardcontentv2')).length < 11\"\n matTooltip=\"{{'cardcontentv2.viewCertificate' | translate }}\">\n <span class=\"margin-right-xs textwrap\">{{'cardcontentv2.viewCertificate' | translate }}</span>\n <img class=\"stats-icon\" *ngIf=\"!downloadCertificateLoading\" height=\"20\" width=\"20\" src=\"/assets/icons/home/eye-white.svg\">\n <div class=\"center flex flex-middle\" *ngIf=\"downloadCertificateLoading\">\n <mat-spinner strokeWidth=\"2\" stroke=\"'red'\" class=\"white-spinner\" [diameter]=\"16\"></mat-spinner>\n </div>\n </button>\n </div>\n </div>\n </ng-container>\n </mat-card>\n</ng-container>\n\n\n<ng-template #cbpPlan let-data=\"data\">\n <div class=\"cbp-mark left-0 border-top-radius\">\n <p *ngIf=\"data.cbpData.planDuration === acbpConstants?.UPCOMING\" class=\"cbp-warning\">{{data.cbpData.endDate | date: 'd MMM, y'}}</p>\n <p *ngIf=\"data.cbpData.planDuration === acbpConstants?.SUCCESS\" class=\"cbp-success\">{{data.cbpData.endDate | date: 'd MMM, y'}}</p>\n <p *ngIf=\"data.cbpData.planDuration === acbpConstants?.OVERDUE\" class=\"cbp-danger\">{{'OverDue' }}</p>\n </div>\n</ng-template>\n\n<ng-container *ngIf=\"isCardLoading\">\n <mat-card class=\"card-portrait\" [ngClass]=\"widgetData.cardCustomeClass ? widgetData.cardCustomeClass : ''\">\n <div class=\"margin-bottom-xs\">\n <ng-container>\n <sb-uic-skeleton-loader [width]=\"'147px'\" [height]=\"'26px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </ng-container>\n </div>\n <div class=\"flex\">\n <div class=\"margin-right-s\">\n <ng-container>\n <sb-uic-skeleton-loader [width]=\"'147px'\" [height]=\"'98px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </ng-container>\n </div>\n <div class=\"width-1-1\">\n <div class=\"portrait-subheading title-text\">\n <sb-uic-skeleton-loader [bindingClass]=\"'flex rounded width-1-1'\"></sb-uic-skeleton-loader>\n </div>\n <div class=\"flex w-full flex-wrap flex-middle\">\n <div class=\" margin-right-xs\">\n <sb-uic-skeleton-loader [width]=\"'24px'\" [height]=\"'24px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </div>\n <span class=\"\"><sb-uic-skeleton-loader [width]=\"'133px'\" [height]=\"'12px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader></span>\n </div>\n <div class=\"portrait_widget flex margin-top-xs\">\n <div class=\"flex flex-end flex-middle\">\n <sb-uic-skeleton-loader [width]=\"'65px'\" [height]=\"'12px'\" [bindingClass]=\"'flex rounded'\"></sb-uic-skeleton-loader>\n </div>\n </div>\n </div>\n </div>\n <div class=\"flex flex-align-end progress-wrapper flex-between\">\n <div class=\"progress-block\">\n <div class=\"completed-time\">\n <sb-uic-skeleton-loader [width]=\"'211px'\" [height]=\"'16px'\" [bindingClass]=\"'flex rounded margin-top-xs md:w-211'\"></sb-uic-skeleton-loader>\n </div>\n </div>\n <div class=\"progress-btn\">\n <sb-uic-skeleton-loader [width]=\"'117px'\" [height]=\"'32px'\" [bindingClass]=\"'flex rounded margin-top-xs'\"></sb-uic-skeleton-loader>\n </div>\n </div>\n </mat-card>\n</ng-container>",
|
|
11922
11922
|
styles: [".card-portrait{border-radius:12px;border:1px solid rgba(0,0,0,.08);opacity:1;width:318px;min-height:154px;padding:16px}.card-portrait .img-block-portrait{line-height:10px}.card-portrait .card-image{border-radius:8px;opacity:1;background-size:100%;width:147px;height:100px}.card-portrait .portrait-subheading{opacity:1;color:rgba(0,0,0,.87);font-weight:700;font-style:normal;letter-spacing:.25px;text-align:left;word-break:break-word;white-space:initial;margin:0 0 8px;position:relative;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;min-height:40px}.card-portrait .portrait_course_logo_box img{padding:3px;display:inline-block;width:24px;height:24px;border:1px solid #d6d6d6;border-radius:4px;box-sizing:border-box}.card-portrait span.portrait-org-name{width:75%;word-break:break-all;white-space:initial;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical}.card-portrait .portrait_widget{align-items:center;margin-top:0}.card-portrait .portrait_widget .course_port{border:1px solid #ef951e;padding:4px 8px;align-items:center;border-radius:16px}.card-portrait .portrait_widget .video-icon{opacity:1;color:#ef951e;width:15px;height:15px;font-size:15px}.card-portrait .portrait_widget .portrait-category{color:rgba(0,0,0,.6)!important;font-size:.75rem;opacity:1;font-family:Lato-Regular;font-weight:400;font-style:normal;letter-spacing:.25px;text-align:left;line-height:20px}.card-portrait .progress-wrapper .progress-block{width:60%}.card-portrait .progress-wrapper .progress-block .completed-time{color:#ef951e;display:flex;padding:8px 0}.card-portrait .progress-wrapper .progress-block .completed-time mat-icon{width:1rem;height:1rem;font-size:1rem}.card-portrait .progress-wrapper .progress-block .completed-time span{opacity:1;color:rgba(0,0,0,.87);font-family:Lato-Regular;font-size:.75rem;font-weight:400;font-style:normal;letter-spacing:.25px;text-align:left;line-height:16px}.card-portrait .progress-wrapper .progress-btn .resume-btn{opacity:1;color:#fff;font-family:Lato-Bold;font-size:14px;font-weight:700;font-style:normal;letter-spacing:.5px;text-align:left;line-height:20px;background:#1a4ca1;border-radius:63px;padding:6px 16px;border:none;width:100%;cursor:pointer}.card-portrait .progress-wrapper .progress-btn .resume-btn .textwrap{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:82px}.card-portrait .progress-wrapper .progress-btn .resume-btn:hover{background-color:#253379}.card-portrait .progress-bar-new{color:#ef951e!important;height:10px;border-radius:5px}.card-portrait .rating-session mat-icon{font-size:20px;height:20px;width:20px;color:#ef951e}.card-portrait .rating-session .rating-number{font-size:14px}.card-portrait .rating-session .most-enrolled-text{font-size:10px;font-weight:400;padding:4px;background:#ffea9e;border-radius:4px;line-height:12px}.card-portrait .right-corner-portrait{right:8px;bottom:8px}.course_widget{margin-top:10px}.course_widget .mat-icon{vertical-align:middle;color:#ef951e!important}.course_widget .course_v2{border:1px solid #ef951e;padding:4px 8px;align-items:end;border-radius:16px}.course_widget .main_icon{font-size:16px;width:16px;height:16px}.rating-session mat-icon{font-size:16px;height:16px;width:12px;padding-right:3px;color:#ef951e}.rating-session span{font-size:11px}.rating-session .most-enrolled-text{padding:0 8px;background:#ffea9e;border-radius:4px}.duration-box{background:#000;position:absolute;border:none;display:flex;align-items:center;padding:4px;border-radius:4px}.duration-box.right-corner{right:4px;bottom:4px}.duration-box .mat-icon{vertical-align:middle;color:#fff!important;height:14px!important;width:14px!important;font-size:14px}.duration-box .duration{font:700 12px/16px Lato;display:inline-block;margin:0;padding:0}"]
|
|
11923
11923
|
}] }
|
|
11924
11924
|
];
|
|
@@ -13164,15 +13164,7 @@
|
|
|
13164
13164
|
// setting initial values
|
|
13165
13165
|
strip.loaderWidgets = this.transformSkeletonToWidgets(strip);
|
|
13166
13166
|
this.processStrip(strip, [], 'fetching', false, null);
|
|
13167
|
-
this.fetchFromEnrollmentList(strip, calculateParentStatus);
|
|
13168
13167
|
this.fetchFromSearchV6(strip, calculateParentStatus);
|
|
13169
|
-
this.fetchFromTrendingContent(strip, calculateParentStatus);
|
|
13170
|
-
this.fetchAllTopContent(strip, calculateParentStatus);
|
|
13171
|
-
this.fetchAllFeaturedContent(strip, calculateParentStatus);
|
|
13172
|
-
this.fetchAllBookMarkData(strip, calculateParentStatus);
|
|
13173
|
-
this.fetchAllPlaylistSearch(strip, calculateParentStatus);
|
|
13174
|
-
this.fetchPlaylistReadData(strip, calculateParentStatus);
|
|
13175
|
-
this.fetchCiosContentData(strip, calculateParentStatus);
|
|
13176
13168
|
this.fetchForYouData(strip, calculateParentStatus);
|
|
13177
13169
|
this.fetchAllCbpPlans(strip, calculateParentStatus);
|
|
13178
13170
|
// this.enrollInterval = setInterval(() => {
|
|
@@ -13180,970 +13172,128 @@
|
|
|
13180
13172
|
// }, 1000)
|
|
13181
13173
|
};
|
|
13182
13174
|
/**
|
|
13183
|
-
* @param {?}
|
|
13184
|
-
* @param {?=} calculateParentStatus
|
|
13175
|
+
* @param {?} data
|
|
13185
13176
|
* @return {?}
|
|
13186
13177
|
*/
|
|
13187
|
-
ContentStripWithTabsPillsComponent.prototype.
|
|
13188
|
-
* @param {?}
|
|
13189
|
-
* @param {?=} calculateParentStatus
|
|
13178
|
+
ContentStripWithTabsPillsComponent.prototype.toggleInfo = /**
|
|
13179
|
+
* @param {?} data
|
|
13190
13180
|
* @return {?}
|
|
13191
13181
|
*/
|
|
13192
|
-
function (
|
|
13193
|
-
|
|
13194
|
-
|
|
13195
|
-
if (
|
|
13196
|
-
|
|
13197
|
-
|
|
13198
|
-
|
|
13199
|
-
|
|
13200
|
-
|
|
13201
|
-
|
|
13202
|
-
/** @type {?} */
|
|
13203
|
-
var tabResults_1 = [];
|
|
13204
|
-
/** @type {?} */
|
|
13205
|
-
var queryParams = lodash.get(strip.request.enrollmentList, 'queryParams');
|
|
13206
|
-
if (this.configSvc.userProfile) {
|
|
13207
|
-
userId = this.configSvc.userProfile.userId;
|
|
13182
|
+
function (data) {
|
|
13183
|
+
/** @type {?} */
|
|
13184
|
+
var stripInfo = this.stripsResultDataMap[data.key].stripInfo;
|
|
13185
|
+
if (stripInfo) {
|
|
13186
|
+
if (stripInfo.mode !== 'below') {
|
|
13187
|
+
this.loggerSvc.warn("strip info mode: " + stripInfo.mode + " not implemented yet");
|
|
13188
|
+
stripInfo.mode = 'below';
|
|
13189
|
+
}
|
|
13190
|
+
if (stripInfo.mode === 'below') {
|
|
13191
|
+
this.stripsResultDataMap[data.key].stripInfo = __assign({}, stripInfo, { visibilityMode: stripInfo.visibilityMode === 'hidden' ? 'visible' : 'hidden' });
|
|
13208
13192
|
}
|
|
13209
|
-
// tslint:disable-next-line: deprecation
|
|
13210
|
-
this.userSvc.fetchUserBatchList(userId, queryParams).subscribe((/**
|
|
13211
|
-
* @param {?} result
|
|
13212
|
-
* @return {?}
|
|
13213
|
-
*/
|
|
13214
|
-
function (result) {
|
|
13215
|
-
/** @type {?} */
|
|
13216
|
-
var courses = result && result.courses;
|
|
13217
|
-
/** @type {?} */
|
|
13218
|
-
var showViewMore = Boolean(courses.length > 5 && strip.stripConfig && strip.stripConfig.postCardForSearch);
|
|
13219
|
-
/** @type {?} */
|
|
13220
|
-
var viewMoreUrl = showViewMore
|
|
13221
|
-
? {
|
|
13222
|
-
path: (strip.viewMoreUrl && strip.viewMoreUrl.path) || '',
|
|
13223
|
-
queryParams: {
|
|
13224
|
-
q: strip.viewMoreUrl && strip.viewMoreUrl.queryParams,
|
|
13225
|
-
f: strip.request && strip.request.searchV6 && strip.request.searchV6.filters
|
|
13226
|
-
? JSON.stringify(
|
|
13227
|
-
// this.searchServSvc.transformSearchV6Filters(
|
|
13228
|
-
strip.request.searchV6.filters
|
|
13229
|
-
// ),
|
|
13230
|
-
)
|
|
13231
|
-
: {},
|
|
13232
|
-
},
|
|
13233
|
-
}
|
|
13234
|
-
: null;
|
|
13235
|
-
if (courses && courses.length) {
|
|
13236
|
-
content_1 = courses.map((/**
|
|
13237
|
-
* @param {?} c
|
|
13238
|
-
* @return {?}
|
|
13239
|
-
*/
|
|
13240
|
-
function (c) {
|
|
13241
|
-
/** @type {?} */
|
|
13242
|
-
var contentTemp = c.content;
|
|
13243
|
-
contentTemp.completionPercentage = c.completionPercentage || c.progress || 0;
|
|
13244
|
-
contentTemp.completionStatus = c.completionStatus || c.status || 0;
|
|
13245
|
-
contentTemp.enrolledDate = c.enrolledDate || '';
|
|
13246
|
-
contentTemp.lastContentAccessTime = c.lastContentAccessTime || '';
|
|
13247
|
-
contentTemp.lastReadContentStatus = c.lastReadContentStatus || '';
|
|
13248
|
-
contentTemp.lastReadContentId = c.lastReadContentId || '';
|
|
13249
|
-
contentTemp.lrcProgressDetails = c.lrcProgressDetails || '';
|
|
13250
|
-
contentTemp.issuedCertificates = c.issuedCertificates || [];
|
|
13251
|
-
contentTemp.batchId = c.batchId || '';
|
|
13252
|
-
return contentTemp;
|
|
13253
|
-
}));
|
|
13254
|
-
}
|
|
13255
|
-
// To filter content with completionPercentage > 0,
|
|
13256
|
-
// so that only those content will show in home page
|
|
13257
|
-
// continue learing strip
|
|
13258
|
-
// if (content && content.length) {
|
|
13259
|
-
// contentNew = content.filter((c: any) => {
|
|
13260
|
-
// /** commented as both are 0 after enrolll */
|
|
13261
|
-
// if (c.completionPercentage && c.completionPercentage > 0) {
|
|
13262
|
-
// return c
|
|
13263
|
-
// }
|
|
13264
|
-
// })
|
|
13265
|
-
// }
|
|
13266
|
-
// To sort in descending order of the enrolled date
|
|
13267
|
-
contentNew_1 = (content_1 || []).sort((/**
|
|
13268
|
-
* @param {?} a
|
|
13269
|
-
* @param {?} b
|
|
13270
|
-
* @return {?}
|
|
13271
|
-
*/
|
|
13272
|
-
function (a, b) {
|
|
13273
|
-
/** @type {?} */
|
|
13274
|
-
var dateA = new Date(a.lastContentAccessTime || 0);
|
|
13275
|
-
/** @type {?} */
|
|
13276
|
-
var dateB = new Date(b.lastContentAccessTime || 0);
|
|
13277
|
-
return dateB - dateA;
|
|
13278
|
-
}));
|
|
13279
|
-
if (strip.tabs && strip.tabs.length) {
|
|
13280
|
-
tabResults_1 = _this.splitEnrollmentTabsData(contentNew_1, strip);
|
|
13281
|
-
_this.processStrip(strip, _this.transformContentsToWidgets(contentNew_1, strip), 'done', calculateParentStatus, viewMoreUrl, tabResults_1);
|
|
13282
|
-
}
|
|
13283
|
-
else {
|
|
13284
|
-
_this.processStrip(strip, _this.transformContentsToWidgets(contentNew_1, strip), 'done', calculateParentStatus, viewMoreUrl);
|
|
13285
|
-
}
|
|
13286
|
-
}), (/**
|
|
13287
|
-
* @return {?}
|
|
13288
|
-
*/
|
|
13289
|
-
function () {
|
|
13290
|
-
_this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
13291
|
-
}));
|
|
13292
13193
|
}
|
|
13293
13194
|
};
|
|
13294
13195
|
/**
|
|
13295
|
-
* @
|
|
13196
|
+
* @private
|
|
13197
|
+
* @param {?} contents
|
|
13296
13198
|
* @param {?} strip
|
|
13297
13199
|
* @return {?}
|
|
13298
13200
|
*/
|
|
13299
|
-
ContentStripWithTabsPillsComponent.prototype.
|
|
13300
|
-
* @
|
|
13201
|
+
ContentStripWithTabsPillsComponent.prototype.transformContentsToWidgets = /**
|
|
13202
|
+
* @private
|
|
13203
|
+
* @param {?} contents
|
|
13301
13204
|
* @param {?} strip
|
|
13302
13205
|
* @return {?}
|
|
13303
13206
|
*/
|
|
13304
|
-
function (
|
|
13305
|
-
|
|
13306
|
-
|
|
13307
|
-
|
|
13308
|
-
var splitData = this.getInprogressAndCompleted(contentNew, (/**
|
|
13309
|
-
* @param {?} e
|
|
13207
|
+
function (contents, strip) {
|
|
13208
|
+
return (contents || []).map((/**
|
|
13209
|
+
* @param {?} content
|
|
13210
|
+
* @param {?} idx
|
|
13310
13211
|
* @return {?}
|
|
13311
13212
|
*/
|
|
13312
|
-
function (
|
|
13313
|
-
|
|
13314
|
-
|
|
13315
|
-
|
|
13316
|
-
|
|
13317
|
-
|
|
13318
|
-
|
|
13319
|
-
|
|
13320
|
-
|
|
13321
|
-
|
|
13322
|
-
|
|
13323
|
-
}
|
|
13324
|
-
return undefined;
|
|
13325
|
-
})))));
|
|
13326
|
-
}
|
|
13327
|
-
};
|
|
13328
|
-
for (var i = 0; i < strip.tabs.length; i += 1) {
|
|
13329
|
-
_loop_1(i);
|
|
13330
|
-
}
|
|
13331
|
-
}
|
|
13332
|
-
return tabResults;
|
|
13213
|
+
function (content, idx) { return (content ? {
|
|
13214
|
+
widgetType: 'cardLib',
|
|
13215
|
+
widgetSubType: 'cardContentLib',
|
|
13216
|
+
widgetHostClass: 'mb-2',
|
|
13217
|
+
widgetData: __assign({ content: content }, (content.batch && { batch: content.batch }), { cardSubType: strip.stripConfig && strip.stripConfig.cardSubType, cardCustomeClass: strip.customeClass ? strip.customeClass : '', context: { pageSection: strip.key, position: idx }, intranetMode: strip.stripConfig && strip.stripConfig.intranetMode, deletedMode: strip.stripConfig && strip.stripConfig.deletedMode, contentTags: strip.stripConfig && strip.stripConfig.contentTags }),
|
|
13218
|
+
} : {
|
|
13219
|
+
widgetType: 'card',
|
|
13220
|
+
widgetSubType: 'cardContent',
|
|
13221
|
+
widgetHostClass: 'mb-2',
|
|
13222
|
+
widgetData: {},
|
|
13223
|
+
}); }));
|
|
13333
13224
|
};
|
|
13334
13225
|
/**
|
|
13335
|
-
* @
|
|
13336
|
-
* @param {?}
|
|
13226
|
+
* @private
|
|
13227
|
+
* @param {?} contents
|
|
13337
13228
|
* @param {?} strip
|
|
13338
13229
|
* @return {?}
|
|
13339
13230
|
*/
|
|
13340
|
-
ContentStripWithTabsPillsComponent.prototype.
|
|
13341
|
-
* @
|
|
13342
|
-
* @param {?}
|
|
13231
|
+
ContentStripWithTabsPillsComponent.prototype.transformEventsToWidgets = /**
|
|
13232
|
+
* @private
|
|
13233
|
+
* @param {?} contents
|
|
13343
13234
|
* @param {?} strip
|
|
13344
13235
|
* @return {?}
|
|
13345
13236
|
*/
|
|
13346
|
-
function (
|
|
13347
|
-
|
|
13348
|
-
|
|
13349
|
-
|
|
13350
|
-
var completed = [];
|
|
13351
|
-
array.forEach((/**
|
|
13352
|
-
* @param {?} e
|
|
13237
|
+
function (contents, strip) {
|
|
13238
|
+
this.eventSvc.setEventListData(contents);
|
|
13239
|
+
return (this.eventSvc.todaysEvents || []).map((/**
|
|
13240
|
+
* @param {?} content
|
|
13353
13241
|
* @param {?} idx
|
|
13354
|
-
* @param {?} arr
|
|
13355
13242
|
* @return {?}
|
|
13356
13243
|
*/
|
|
13357
|
-
function (
|
|
13358
|
-
|
|
13359
|
-
|
|
13360
|
-
|
|
13361
|
-
|
|
13244
|
+
function (content, idx) { return (content ? {
|
|
13245
|
+
widgetType: 'card',
|
|
13246
|
+
widgetSubType: 'eventHubCard',
|
|
13247
|
+
widgetHostClass: 'mb-2',
|
|
13248
|
+
widgetData: {
|
|
13249
|
+
content: content,
|
|
13250
|
+
cardSubType: strip.stripConfig && strip.stripConfig.cardSubType,
|
|
13251
|
+
cardCustomeClass: strip.customeClass ? strip.customeClass : '',
|
|
13252
|
+
context: { pageSection: strip.key, position: idx },
|
|
13253
|
+
intranetMode: strip.stripConfig && strip.stripConfig.intranetMode,
|
|
13254
|
+
deletedMode: strip.stripConfig && strip.stripConfig.deletedMode,
|
|
13255
|
+
contentTags: strip.stripConfig && strip.stripConfig.contentTags,
|
|
13256
|
+
},
|
|
13257
|
+
} : {
|
|
13258
|
+
widgetType: 'card',
|
|
13259
|
+
widgetSubType: 'eventHubCard',
|
|
13260
|
+
widgetHostClass: 'mb-2',
|
|
13261
|
+
widgetData: {},
|
|
13262
|
+
}); }));
|
|
13362
13263
|
};
|
|
13363
|
-
// async fetchFromSearchV6(strip: NsContentStripWithTabs.IContentStripUnit, calculateParentStatus = true) {
|
|
13364
|
-
// if (strip.request && strip.request.searchV6 && Object.keys(strip.request.searchV6).length) {
|
|
13365
|
-
// // if (!(strip.request.searchV6.locale && strip.request.searchV6.locale.length > 0)) {
|
|
13366
|
-
// // if (this.configSvc.activeLocale) {
|
|
13367
|
-
// // strip.request.searchV6.locale = [this.configSvc.activeLocale.locals[0]]
|
|
13368
|
-
// // } else {
|
|
13369
|
-
// // strip.request.searchV6.locale = ['en']
|
|
13370
|
-
// // }
|
|
13371
|
-
// // }
|
|
13372
|
-
// let originalFilters: any = [];
|
|
13373
|
-
// // tslint:disable:no-console
|
|
13374
|
-
// console.log(originalFilters);
|
|
13375
|
-
// if (strip.request &&
|
|
13376
|
-
// strip.request.searchV6 &&
|
|
13377
|
-
// strip.request.searchV6.request &&
|
|
13378
|
-
// strip.request.searchV6.request.filters) {
|
|
13379
|
-
// originalFilters = strip.request.searchV6.request.filters;
|
|
13380
|
-
// strip.request.searchV6.request.filters = this.checkForDateFilters(strip.request.searchV6.request.filters);
|
|
13381
|
-
// strip.request.searchV6.request.filters = this.getFiltersFromArray(
|
|
13382
|
-
// strip.request.searchV6.request.filters,
|
|
13383
|
-
// );
|
|
13384
|
-
// }
|
|
13385
|
-
// if (strip.tabs && strip.tabs.length) {
|
|
13386
|
-
// // TODO: Have to extract requestRequired to outer level of tabs config
|
|
13387
|
-
// const firstTab = strip.tabs[0];
|
|
13388
|
-
// if (firstTab.requestRequired) {
|
|
13389
|
-
// if (this.stripsResultDataMap[strip.key] && this.stripsResultDataMap[strip.key].tabs) {
|
|
13390
|
-
// const allTabs = this.stripsResultDataMap[strip.key].tabs;
|
|
13391
|
-
// const currentTabFromMap = (allTabs && allTabs.length && allTabs[0]) as NsContentStripWithTabs.IContentStripTab;
|
|
13392
|
-
// this.getTabDataByNewReqSearchV6(strip, 0, currentTabFromMap, calculateParentStatus);
|
|
13393
|
-
// }
|
|
13394
|
-
// }
|
|
13395
|
-
// } else {
|
|
13396
|
-
// try {
|
|
13397
|
-
// const response = await this.searchV6Request(strip, strip.request, calculateParentStatus);
|
|
13398
|
-
// // console.log('calling after - response, ', response)
|
|
13399
|
-
// if (response && response.results) {
|
|
13400
|
-
// // console.log('calling after-- ')
|
|
13401
|
-
// if (response.results.result.content) {
|
|
13402
|
-
// if(strip.key === 'scheduledAssessment') {
|
|
13403
|
-
// this.enrollInterval = setInterval(() => {
|
|
13404
|
-
// this.checkInvitOnlyAssessments(response.results.result.content, strip, calculateParentStatus, response.viewMoreUrl)
|
|
13405
|
-
// // tslint:disable-next-line
|
|
13406
|
-
// }, 1000)
|
|
13407
|
-
// } else {
|
|
13408
|
-
// this.processStrip(
|
|
13409
|
-
// strip,
|
|
13410
|
-
// this.transformContentsToWidgets(response.results.result.content, strip),
|
|
13411
|
-
// 'done',
|
|
13412
|
-
// calculateParentStatus,
|
|
13413
|
-
// response.viewMoreUrl,
|
|
13414
|
-
// );
|
|
13415
|
-
// }
|
|
13416
|
-
// } else if (response.results.result.Event) {
|
|
13417
|
-
// this.processStrip(
|
|
13418
|
-
// strip,
|
|
13419
|
-
// this.transformEventsToWidgets(response.results.result.Event, strip),
|
|
13420
|
-
// 'done',
|
|
13421
|
-
// calculateParentStatus,
|
|
13422
|
-
// response.viewMoreUrl,
|
|
13423
|
-
// );
|
|
13424
|
-
// } else {
|
|
13425
|
-
// this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
13426
|
-
// }
|
|
13427
|
-
// } else {
|
|
13428
|
-
// this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
13429
|
-
// }
|
|
13430
|
-
// } catch (error) {
|
|
13431
|
-
// // Handle errors
|
|
13432
|
-
// // console.error('Error:', error);
|
|
13433
|
-
// }
|
|
13434
|
-
// }
|
|
13435
|
-
// }
|
|
13436
|
-
// }
|
|
13437
|
-
// async fetchFromSearchV6(strip: NsContentStripWithTabs.IContentStripUnit, calculateParentStatus = true) {
|
|
13438
|
-
// if (strip.request && strip.request.searchV6 && Object.keys(strip.request.searchV6).length) {
|
|
13439
|
-
// // if (!(strip.request.searchV6.locale && strip.request.searchV6.locale.length > 0)) {
|
|
13440
|
-
// // if (this.configSvc.activeLocale) {
|
|
13441
|
-
// // strip.request.searchV6.locale = [this.configSvc.activeLocale.locals[0]]
|
|
13442
|
-
// // } else {
|
|
13443
|
-
// // strip.request.searchV6.locale = ['en']
|
|
13444
|
-
// // }
|
|
13445
|
-
// // }
|
|
13446
|
-
// let originalFilters: any = [];
|
|
13447
|
-
// // tslint:disable:no-console
|
|
13448
|
-
// console.log(originalFilters);
|
|
13449
|
-
// if (strip.request &&
|
|
13450
|
-
// strip.request.searchV6 &&
|
|
13451
|
-
// strip.request.searchV6.request &&
|
|
13452
|
-
// strip.request.searchV6.request.filters) {
|
|
13453
|
-
// originalFilters = strip.request.searchV6.request.filters;
|
|
13454
|
-
// strip.request.searchV6.request.filters = this.checkForDateFilters(strip.request.searchV6.request.filters);
|
|
13455
|
-
// strip.request.searchV6.request.filters = this.getFiltersFromArray(
|
|
13456
|
-
// strip.request.searchV6.request.filters,
|
|
13457
|
-
// );
|
|
13458
|
-
// }
|
|
13459
|
-
// if (strip.tabs && strip.tabs.length) {
|
|
13460
|
-
// // TODO: Have to extract requestRequired to outer level of tabs config
|
|
13461
|
-
// const firstTab = strip.tabs[0];
|
|
13462
|
-
// if (firstTab.requestRequired) {
|
|
13463
|
-
// if (this.stripsResultDataMap[strip.key] && this.stripsResultDataMap[strip.key].tabs) {
|
|
13464
|
-
// const allTabs = this.stripsResultDataMap[strip.key].tabs;
|
|
13465
|
-
// const currentTabFromMap = (allTabs && allTabs.length && allTabs[0]) as NsContentStripWithTabs.IContentStripTab;
|
|
13466
|
-
// this.getTabDataByNewReqSearchV6(strip, 0, currentTabFromMap, calculateParentStatus);
|
|
13467
|
-
// }
|
|
13468
|
-
// }
|
|
13469
|
-
// } else {
|
|
13470
|
-
// try {
|
|
13471
|
-
// const response = await this.searchV6Request(strip, strip.request, calculateParentStatus);
|
|
13472
|
-
// // console.log('calling after - response, ', response)
|
|
13473
|
-
// if (response && response.results) {
|
|
13474
|
-
// // console.log('calling after-- ')
|
|
13475
|
-
// if (response.results.result.content) {
|
|
13476
|
-
// if(strip.key === 'scheduledAssessment') {
|
|
13477
|
-
// this.enrollInterval = setInterval(() => {
|
|
13478
|
-
// this.checkInvitOnlyAssessments(response.results.result.content, strip, calculateParentStatus, response.viewMoreUrl)
|
|
13479
|
-
// // tslint:disable-next-line
|
|
13480
|
-
// }, 1000)
|
|
13481
|
-
// } else {
|
|
13482
|
-
// this.processStrip(
|
|
13483
|
-
// strip,
|
|
13484
|
-
// this.transformContentsToWidgets(response.results.result.content, strip),
|
|
13485
|
-
// 'done',
|
|
13486
|
-
// calculateParentStatus,
|
|
13487
|
-
// response.viewMoreUrl,
|
|
13488
|
-
// );
|
|
13489
|
-
// }
|
|
13490
|
-
// } else if (response.results.result.Event) {
|
|
13491
|
-
// this.processStrip(
|
|
13492
|
-
// strip,
|
|
13493
|
-
// this.transformEventsToWidgets(response.results.result.Event, strip),
|
|
13494
|
-
// 'done',
|
|
13495
|
-
// calculateParentStatus,
|
|
13496
|
-
// response.viewMoreUrl,
|
|
13497
|
-
// );
|
|
13498
|
-
// } else {
|
|
13499
|
-
// this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
13500
|
-
// }
|
|
13501
|
-
// } else {
|
|
13502
|
-
// this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
13503
|
-
// }
|
|
13504
|
-
// } catch (error) {
|
|
13505
|
-
// // Handle errors
|
|
13506
|
-
// // console.error('Error:', error);
|
|
13507
|
-
// }
|
|
13508
|
-
// }
|
|
13509
|
-
// }
|
|
13510
|
-
// }
|
|
13511
13264
|
/**
|
|
13512
|
-
* @
|
|
13265
|
+
* @private
|
|
13513
13266
|
* @param {?} strip
|
|
13514
|
-
* @param {?} calculateParentStatus
|
|
13515
|
-
* @param {?} viewMoreUrl
|
|
13516
13267
|
* @return {?}
|
|
13517
13268
|
*/
|
|
13518
|
-
ContentStripWithTabsPillsComponent.prototype.
|
|
13519
|
-
|
|
13520
|
-
|
|
13521
|
-
|
|
13522
|
-
|
|
13523
|
-
|
|
13524
|
-
|
|
13525
|
-
|
|
13526
|
-
|
|
13527
|
-
|
|
13528
|
-
|
|
13529
|
-
|
|
13530
|
-
|
|
13531
|
-
|
|
13532
|
-
|
|
13533
|
-
|
|
13534
|
-
|
|
13535
|
-
|
|
13536
|
-
|
|
13537
|
-
|
|
13538
|
-
// strip.request.searchV6.request.filters,
|
|
13539
|
-
// );
|
|
13540
|
-
// }
|
|
13541
|
-
// if (strip.tabs && strip.tabs.length) {
|
|
13542
|
-
// // TODO: Have to extract requestRequired to outer level of tabs config
|
|
13543
|
-
// const firstTab = strip.tabs[0];
|
|
13544
|
-
// if (firstTab.requestRequired) {
|
|
13545
|
-
// if (this.stripsResultDataMap[strip.key] && this.stripsResultDataMap[strip.key].tabs) {
|
|
13546
|
-
// const allTabs = this.stripsResultDataMap[strip.key].tabs;
|
|
13547
|
-
// const currentTabFromMap = (allTabs && allTabs.length && allTabs[0]) as NsContentStripWithTabs.IContentStripTab;
|
|
13548
|
-
// this.getTabDataByNewReqSearchV6(strip, 0, currentTabFromMap, calculateParentStatus);
|
|
13549
|
-
// }
|
|
13550
|
-
// }
|
|
13551
|
-
// } else {
|
|
13552
|
-
// try {
|
|
13553
|
-
// const response = await this.searchV6Request(strip, strip.request, calculateParentStatus);
|
|
13554
|
-
// // console.log('calling after - response, ', response)
|
|
13555
|
-
// if (response && response.results) {
|
|
13556
|
-
// // console.log('calling after-- ')
|
|
13557
|
-
// if (response.results.result.content) {
|
|
13558
|
-
// if(strip.key === 'scheduledAssessment') {
|
|
13559
|
-
// this.enrollInterval = setInterval(() => {
|
|
13560
|
-
// this.checkInvitOnlyAssessments(response.results.result.content, strip, calculateParentStatus, response.viewMoreUrl)
|
|
13561
|
-
// // tslint:disable-next-line
|
|
13562
|
-
// }, 1000)
|
|
13563
|
-
// } else {
|
|
13564
|
-
// this.processStrip(
|
|
13565
|
-
// strip,
|
|
13566
|
-
// this.transformContentsToWidgets(response.results.result.content, strip),
|
|
13567
|
-
// 'done',
|
|
13568
|
-
// calculateParentStatus,
|
|
13569
|
-
// response.viewMoreUrl,
|
|
13570
|
-
// );
|
|
13571
|
-
// }
|
|
13572
|
-
// } else if (response.results.result.Event) {
|
|
13573
|
-
// this.processStrip(
|
|
13574
|
-
// strip,
|
|
13575
|
-
// this.transformEventsToWidgets(response.results.result.Event, strip),
|
|
13576
|
-
// 'done',
|
|
13577
|
-
// calculateParentStatus,
|
|
13578
|
-
// response.viewMoreUrl,
|
|
13579
|
-
// );
|
|
13580
|
-
// } else {
|
|
13581
|
-
// this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
13582
|
-
// }
|
|
13583
|
-
// } else {
|
|
13584
|
-
// this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
13585
|
-
// }
|
|
13586
|
-
// } catch (error) {
|
|
13587
|
-
// // Handle errors
|
|
13588
|
-
// // console.error('Error:', error);
|
|
13589
|
-
// }
|
|
13590
|
-
// }
|
|
13591
|
-
// }
|
|
13592
|
-
// }
|
|
13269
|
+
ContentStripWithTabsPillsComponent.prototype.transformSkeletonToWidgets = /**
|
|
13270
|
+
* @private
|
|
13271
|
+
* @param {?} strip
|
|
13272
|
+
* @return {?}
|
|
13273
|
+
*/
|
|
13274
|
+
function (strip) {
|
|
13275
|
+
return [1, 2, 3, 4, 5, 6, 7, 7, 8, 9, 10].map((/**
|
|
13276
|
+
* @param {?} _content
|
|
13277
|
+
* @return {?}
|
|
13278
|
+
*/
|
|
13279
|
+
function (_content) { return ({
|
|
13280
|
+
widgetType: 'cardLib',
|
|
13281
|
+
widgetSubType: 'cardContentLib',
|
|
13282
|
+
widgetHostClass: 'mb-2',
|
|
13283
|
+
widgetData: {
|
|
13284
|
+
cardSubType: strip.loaderConfig && strip.loaderConfig.cardSubType || 'card-standard-skeleton',
|
|
13285
|
+
cardCustomeClass: strip.customeClass ? strip.customeClass : '',
|
|
13286
|
+
},
|
|
13287
|
+
}); }));
|
|
13288
|
+
};
|
|
13593
13289
|
/**
|
|
13594
|
-
* @
|
|
13290
|
+
* @private
|
|
13595
13291
|
* @param {?} strip
|
|
13596
|
-
* @param {
|
|
13597
|
-
* @param {
|
|
13598
|
-
* @
|
|
13599
|
-
|
|
13600
|
-
|
|
13601
|
-
var _this = this;
|
|
13602
|
-
if (localStorage.getItem('enrollmentMapData')) {
|
|
13603
|
-
this.enrollmentMapData = JSON.parse(localStorage.getItem('enrollmentMapData') || '{}');
|
|
13604
|
-
/** @type {?} */
|
|
13605
|
-
var filteredArray_1 = [];
|
|
13606
|
-
content.forEach((/**
|
|
13607
|
-
* @param {?} data
|
|
13608
|
-
* @return {?}
|
|
13609
|
-
*/
|
|
13610
|
-
function (data) {
|
|
13611
|
-
if (_this.enrollmentMapData[data.identifier]) {
|
|
13612
|
-
data['batch'] = _this.enrollmentMapData[data.identifier].batch;
|
|
13613
|
-
data['completionPercentage'] = _this.enrollmentMapData[data.identifier].completionPercentage;
|
|
13614
|
-
filteredArray_1.push(data);
|
|
13615
|
-
}
|
|
13616
|
-
}));
|
|
13617
|
-
this.processStrip(strip, this.transformContentsToWidgets(filteredArray_1, strip), 'done', calculateParentStatus, viewMoreUrl);
|
|
13618
|
-
clearInterval(this.enrollInterval);
|
|
13619
|
-
}
|
|
13620
|
-
};
|
|
13621
|
-
// async searchV6Request(strip: NsContentStripWithTabs.IContentStripUnit,
|
|
13622
|
-
// request: NsContentStripWithTabs.IContentStripUnit['request'],
|
|
13623
|
-
// calculateParentStatus: boolean
|
|
13624
|
-
// ): Promise<any> {
|
|
13625
|
-
// const originalFilters: any = [];
|
|
13626
|
-
// return new Promise<any>((resolve, reject) => {
|
|
13627
|
-
// if (request && request.searchV6) {
|
|
13628
|
-
// this.contentSvc.searchV6(request.searchV6).subscribe(results => {
|
|
13629
|
-
// const showViewMore = Boolean(
|
|
13630
|
-
// results.result.content && results.result.content.length > 5 && strip.stripConfig && strip.stripConfig.postCardForSearch,
|
|
13631
|
-
// );
|
|
13632
|
-
// const viewMoreUrl = showViewMore
|
|
13633
|
-
// ? {
|
|
13634
|
-
// path: strip.viewMoreUrl && strip.viewMoreUrl.path || '',
|
|
13635
|
-
// queryParams: {
|
|
13636
|
-
// tab: 'Learn',
|
|
13637
|
-
// q: strip.viewMoreUrl && strip.viewMoreUrl.queryParams,
|
|
13638
|
-
// f:
|
|
13639
|
-
// request &&
|
|
13640
|
-
// request.searchV6 &&
|
|
13641
|
-
// request.searchV6.request &&
|
|
13642
|
-
// request.searchV6.request.filters
|
|
13643
|
-
// ? JSON.stringify(
|
|
13644
|
-
// this.transformSearchV6FiltersV2(
|
|
13645
|
-
// originalFilters,
|
|
13646
|
-
// )
|
|
13647
|
-
// )
|
|
13648
|
-
// : {},
|
|
13649
|
-
// },
|
|
13650
|
-
// }
|
|
13651
|
-
// : null;
|
|
13652
|
-
// // if (viewMoreUrl && viewMoreUrl.queryParams) {
|
|
13653
|
-
// // viewMoreUrl.queryParams = viewMoreUrl.queryParams
|
|
13654
|
-
// // }
|
|
13655
|
-
// resolve({ results, viewMoreUrl });
|
|
13656
|
-
// }, (error: any) => {
|
|
13657
|
-
// this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
13658
|
-
// reject(error);
|
|
13659
|
-
// },
|
|
13660
|
-
// );
|
|
13661
|
-
// }
|
|
13662
|
-
// });
|
|
13663
|
-
// }
|
|
13664
|
-
// async searchV6Request(strip: NsContentStripWithTabs.IContentStripUnit,
|
|
13665
|
-
// request: NsContentStripWithTabs.IContentStripUnit['request'],
|
|
13666
|
-
// calculateParentStatus: boolean
|
|
13667
|
-
// ): Promise<any> {
|
|
13668
|
-
// const originalFilters: any = [];
|
|
13669
|
-
// return new Promise<any>((resolve, reject) => {
|
|
13670
|
-
// if (request && request.searchV6) {
|
|
13671
|
-
// this.contentSvc.searchV6(request.searchV6).subscribe(results => {
|
|
13672
|
-
// const showViewMore = Boolean(
|
|
13673
|
-
// results.result.content && results.result.content.length > 5 && strip.stripConfig && strip.stripConfig.postCardForSearch,
|
|
13674
|
-
// );
|
|
13675
|
-
// const viewMoreUrl = showViewMore
|
|
13676
|
-
// ? {
|
|
13677
|
-
// path: strip.viewMoreUrl && strip.viewMoreUrl.path || '',
|
|
13678
|
-
// queryParams: {
|
|
13679
|
-
// tab: 'Learn',
|
|
13680
|
-
// q: strip.viewMoreUrl && strip.viewMoreUrl.queryParams,
|
|
13681
|
-
// f:
|
|
13682
|
-
// request &&
|
|
13683
|
-
// request.searchV6 &&
|
|
13684
|
-
// request.searchV6.request &&
|
|
13685
|
-
// request.searchV6.request.filters
|
|
13686
|
-
// ? JSON.stringify(
|
|
13687
|
-
// this.transformSearchV6FiltersV2(
|
|
13688
|
-
// originalFilters,
|
|
13689
|
-
// )
|
|
13690
|
-
// )
|
|
13691
|
-
// : {},
|
|
13692
|
-
// },
|
|
13693
|
-
// }
|
|
13694
|
-
// : null;
|
|
13695
|
-
// // if (viewMoreUrl && viewMoreUrl.queryParams) {
|
|
13696
|
-
// // viewMoreUrl.queryParams = viewMoreUrl.queryParams
|
|
13697
|
-
// // }
|
|
13698
|
-
// resolve({ results, viewMoreUrl });
|
|
13699
|
-
// }, (error: any) => {
|
|
13700
|
-
// this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
13701
|
-
// reject(error);
|
|
13702
|
-
// },
|
|
13703
|
-
// );
|
|
13704
|
-
// }
|
|
13705
|
-
// });
|
|
13706
|
-
// }
|
|
13707
|
-
/**
|
|
13708
|
-
* @param {?} strip
|
|
13709
|
-
* @param {?=} calculateParentStatus
|
|
13710
|
-
* @return {?}
|
|
13711
|
-
*/
|
|
13712
|
-
ContentStripWithTabsPillsComponent.prototype.fetchFromTrendingContent =
|
|
13713
|
-
// async searchV6Request(strip: NsContentStripWithTabs.IContentStripUnit,
|
|
13714
|
-
// request: NsContentStripWithTabs.IContentStripUnit['request'],
|
|
13715
|
-
// calculateParentStatus: boolean
|
|
13716
|
-
// ): Promise<any> {
|
|
13717
|
-
// const originalFilters: any = [];
|
|
13718
|
-
// return new Promise<any>((resolve, reject) => {
|
|
13719
|
-
// if (request && request.searchV6) {
|
|
13720
|
-
// this.contentSvc.searchV6(request.searchV6).subscribe(results => {
|
|
13721
|
-
// const showViewMore = Boolean(
|
|
13722
|
-
// results.result.content && results.result.content.length > 5 && strip.stripConfig && strip.stripConfig.postCardForSearch,
|
|
13723
|
-
// );
|
|
13724
|
-
// const viewMoreUrl = showViewMore
|
|
13725
|
-
// ? {
|
|
13726
|
-
// path: strip.viewMoreUrl && strip.viewMoreUrl.path || '',
|
|
13727
|
-
// queryParams: {
|
|
13728
|
-
// tab: 'Learn',
|
|
13729
|
-
// q: strip.viewMoreUrl && strip.viewMoreUrl.queryParams,
|
|
13730
|
-
// f:
|
|
13731
|
-
// request &&
|
|
13732
|
-
// request.searchV6 &&
|
|
13733
|
-
// request.searchV6.request &&
|
|
13734
|
-
// request.searchV6.request.filters
|
|
13735
|
-
// ? JSON.stringify(
|
|
13736
|
-
// this.transformSearchV6FiltersV2(
|
|
13737
|
-
// originalFilters,
|
|
13738
|
-
// )
|
|
13739
|
-
// )
|
|
13740
|
-
// : {},
|
|
13741
|
-
// },
|
|
13742
|
-
// }
|
|
13743
|
-
// : null;
|
|
13744
|
-
// // if (viewMoreUrl && viewMoreUrl.queryParams) {
|
|
13745
|
-
// // viewMoreUrl.queryParams = viewMoreUrl.queryParams
|
|
13746
|
-
// // }
|
|
13747
|
-
// resolve({ results, viewMoreUrl });
|
|
13748
|
-
// }, (error: any) => {
|
|
13749
|
-
// this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
13750
|
-
// reject(error);
|
|
13751
|
-
// },
|
|
13752
|
-
// );
|
|
13753
|
-
// }
|
|
13754
|
-
// });
|
|
13755
|
-
// }
|
|
13756
|
-
/**
|
|
13757
|
-
* @param {?} strip
|
|
13758
|
-
* @param {?=} calculateParentStatus
|
|
13759
|
-
* @return {?}
|
|
13760
|
-
*/
|
|
13761
|
-
function (strip, calculateParentStatus) {
|
|
13762
|
-
if (calculateParentStatus === void 0) { calculateParentStatus = true; }
|
|
13763
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
13764
|
-
var originalFilters, firstTab, allTabs, currentTabFromMap, response, content, error_1;
|
|
13765
|
-
return __generator(this, function (_a) {
|
|
13766
|
-
switch (_a.label) {
|
|
13767
|
-
case 0:
|
|
13768
|
-
if (!(strip.request && strip.request.trendingSearch && Object.keys(strip.request.trendingSearch).length)) return [3 /*break*/, 4];
|
|
13769
|
-
// if (!(strip.request.searchV6.locale && strip.request.searchV6.locale.length > 0)) {
|
|
13770
|
-
// if (this.configSvc.activeLocale) {
|
|
13771
|
-
// strip.request.searchV6.locale = [this.configSvc.activeLocale.locals[0]]
|
|
13772
|
-
// } else {
|
|
13773
|
-
// strip.request.searchV6.locale = ['en']
|
|
13774
|
-
// }
|
|
13775
|
-
// }
|
|
13776
|
-
originalFilters = [];
|
|
13777
|
-
// tslint:disable:no-console
|
|
13778
|
-
if (strip.request &&
|
|
13779
|
-
strip.request.trendingSearch &&
|
|
13780
|
-
strip.request.trendingSearch.request &&
|
|
13781
|
-
strip.request.trendingSearch.request.filters) {
|
|
13782
|
-
originalFilters = strip.request.trendingSearch.request.filters;
|
|
13783
|
-
strip.request.trendingSearch.request.filters = this.checkForDateFilters(strip.request.trendingSearch.request.filters);
|
|
13784
|
-
strip.request.trendingSearch.request.filters = this.getFiltersFromArray(strip.request.trendingSearch.request.filters);
|
|
13785
|
-
}
|
|
13786
|
-
if (!(strip.tabs && strip.tabs.length)) return [3 /*break*/, 1];
|
|
13787
|
-
// TODO: Have to extract requestRequired to outer level of tabs config
|
|
13788
|
-
firstTab = strip.tabs[0];
|
|
13789
|
-
if (firstTab.requestRequired) {
|
|
13790
|
-
if (this.stripsResultDataMap[strip.key] && this.stripsResultDataMap[strip.key].tabs) {
|
|
13791
|
-
allTabs = this.stripsResultDataMap[strip.key].tabs;
|
|
13792
|
-
currentTabFromMap = (/** @type {?} */ ((allTabs && allTabs.length && allTabs[0])));
|
|
13793
|
-
this.getTabDataByNewReqTrending(strip, 0, 0, currentTabFromMap, calculateParentStatus);
|
|
13794
|
-
}
|
|
13795
|
-
}
|
|
13796
|
-
return [3 /*break*/, 4];
|
|
13797
|
-
case 1:
|
|
13798
|
-
_a.trys.push([1, 3, , 4]);
|
|
13799
|
-
return [4 /*yield*/, this.trendingSearchRequest(strip, strip.request, calculateParentStatus)];
|
|
13800
|
-
case 2:
|
|
13801
|
-
response = _a.sent();
|
|
13802
|
-
if (response && response.results && response.results.response) {
|
|
13803
|
-
content = response.results.response[strip.request.trendingSearch.responseKey] || [];
|
|
13804
|
-
this.processStrip(strip, this.transformContentsToWidgets(content, strip), 'done', calculateParentStatus, response.viewMoreUrl || '');
|
|
13805
|
-
if (!content.length) {
|
|
13806
|
-
this.emptyResponse.emit(true);
|
|
13807
|
-
}
|
|
13808
|
-
}
|
|
13809
|
-
else {
|
|
13810
|
-
this.emptyResponse.emit(true);
|
|
13811
|
-
this.processStrip(strip, [], 'done', calculateParentStatus, null);
|
|
13812
|
-
}
|
|
13813
|
-
return [3 /*break*/, 4];
|
|
13814
|
-
case 3:
|
|
13815
|
-
error_1 = _a.sent();
|
|
13816
|
-
// Handle errors
|
|
13817
|
-
this.emptyResponse.emit(true);
|
|
13818
|
-
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
13819
|
-
return [3 /*break*/, 4];
|
|
13820
|
-
case 4: return [2 /*return*/];
|
|
13821
|
-
}
|
|
13822
|
-
});
|
|
13823
|
-
});
|
|
13824
|
-
};
|
|
13825
|
-
// async trendingSearchRequest(strip: NsContentStripWithTabs.IContentStripUnit,
|
|
13826
|
-
// request: NsContentStripWithTabs.IContentStripUnit['request'],
|
|
13827
|
-
// calculateParentStatus: boolean
|
|
13828
|
-
// ): Promise<any> {
|
|
13829
|
-
// const originalFilters: any = [];
|
|
13830
|
-
// return new Promise<any>((resolve, reject) => {
|
|
13831
|
-
// if (request && request.trendingSearch) {
|
|
13832
|
-
// // check for the request if it has dynamic values]
|
|
13833
|
-
// if (request.trendingSearch.request.filters.organisation &&
|
|
13834
|
-
// request.trendingSearch.request.filters.organisation.indexOf('<orgID>') >= 0
|
|
13835
|
-
// ) {
|
|
13836
|
-
// let userRootOrgId;
|
|
13837
|
-
// if (this.configSvc.userProfile) {
|
|
13838
|
-
// userRootOrgId = this.configSvc.userProfile.rootOrgId;
|
|
13839
|
-
// }
|
|
13840
|
-
// request.trendingSearch.request.filters.organisation = userRootOrgId;
|
|
13841
|
-
// }
|
|
13842
|
-
// this.contentSvc.trendingContentSearch(request.trendingSearch).subscribe(results => {
|
|
13843
|
-
// const showViewMore = Boolean(
|
|
13844
|
-
// results.result &&
|
|
13845
|
-
// strip.request &&
|
|
13846
|
-
// results.result[strip.request.trendingSearch.responseKey] &&
|
|
13847
|
-
// results.result[strip.request.trendingSearch.responseKey].length > 5 &&
|
|
13848
|
-
// strip.stripConfig && strip.stripConfig.postCardForSearch,
|
|
13849
|
-
// );
|
|
13850
|
-
// const viewMoreUrl = showViewMore
|
|
13851
|
-
// ? {
|
|
13852
|
-
// path: strip.viewMoreUrl && strip.viewMoreUrl.path || '',
|
|
13853
|
-
// queryParams: {
|
|
13854
|
-
// tab: 'Learn',
|
|
13855
|
-
// q: strip.viewMoreUrl && strip.viewMoreUrl.queryParams,
|
|
13856
|
-
// f:
|
|
13857
|
-
// request &&
|
|
13858
|
-
// request.trendingSearch &&
|
|
13859
|
-
// request.trendingSearch.request &&
|
|
13860
|
-
// request.trendingSearch.request.filters
|
|
13861
|
-
// ? JSON.stringify(
|
|
13862
|
-
// this.transformSearchV6FiltersV2(
|
|
13863
|
-
// originalFilters,
|
|
13864
|
-
// )
|
|
13865
|
-
// )
|
|
13866
|
-
// : {},
|
|
13867
|
-
// },
|
|
13868
|
-
// }
|
|
13869
|
-
// : null;
|
|
13870
|
-
// let proccesedResult: any = []
|
|
13871
|
-
// if (results && results.response && results.response.certifications) {
|
|
13872
|
-
// results.response.certifications.map((result: any) => {
|
|
13873
|
-
// if (result.source === this.channnelName) {
|
|
13874
|
-
// proccesedResult.push(result)
|
|
13875
|
-
// }
|
|
13876
|
-
// })
|
|
13877
|
-
// }
|
|
13878
|
-
// results = {response: {certifications: proccesedResult}}
|
|
13879
|
-
// resolve({ results, viewMoreUrl });
|
|
13880
|
-
// }, (error: any) => {
|
|
13881
|
-
// if (error.error && error.error.status === 400) {
|
|
13882
|
-
// this.processStrip(strip, [], 'done', calculateParentStatus, null);
|
|
13883
|
-
// }
|
|
13884
|
-
// // this.processStrip(strip, [], 'done', calculateParentStatus, null)
|
|
13885
|
-
// reject(error);
|
|
13886
|
-
// },
|
|
13887
|
-
// );
|
|
13888
|
-
// }
|
|
13889
|
-
// });
|
|
13890
|
-
// }
|
|
13891
|
-
// async trendingSearchRequest(strip: NsContentStripWithTabs.IContentStripUnit,
|
|
13892
|
-
// request: NsContentStripWithTabs.IContentStripUnit['request'],
|
|
13893
|
-
// calculateParentStatus: boolean
|
|
13894
|
-
// ): Promise<any> {
|
|
13895
|
-
// const originalFilters: any = [];
|
|
13896
|
-
// return new Promise<any>((resolve, reject) => {
|
|
13897
|
-
// if (request && request.trendingSearch) {
|
|
13898
|
-
// // check for the request if it has dynamic values]
|
|
13899
|
-
// if (request.trendingSearch.request.filters.organisation &&
|
|
13900
|
-
// request.trendingSearch.request.filters.organisation.indexOf('<orgID>') >= 0
|
|
13901
|
-
// ) {
|
|
13902
|
-
// let userRootOrgId;
|
|
13903
|
-
// if (this.configSvc.userProfile) {
|
|
13904
|
-
// userRootOrgId = this.configSvc.userProfile.rootOrgId;
|
|
13905
|
-
// }
|
|
13906
|
-
// request.trendingSearch.request.filters.organisation = userRootOrgId;
|
|
13907
|
-
// }
|
|
13908
|
-
// this.contentSvc.trendingContentSearch(request.trendingSearch).subscribe(results => {
|
|
13909
|
-
// const showViewMore = Boolean(
|
|
13910
|
-
// results.result &&
|
|
13911
|
-
// strip.request &&
|
|
13912
|
-
// results.result[strip.request.trendingSearch.responseKey] &&
|
|
13913
|
-
// results.result[strip.request.trendingSearch.responseKey].length > 5 &&
|
|
13914
|
-
// strip.stripConfig && strip.stripConfig.postCardForSearch,
|
|
13915
|
-
// );
|
|
13916
|
-
// const viewMoreUrl = showViewMore
|
|
13917
|
-
// ? {
|
|
13918
|
-
// path: strip.viewMoreUrl && strip.viewMoreUrl.path || '',
|
|
13919
|
-
// queryParams: {
|
|
13920
|
-
// tab: 'Learn',
|
|
13921
|
-
// q: strip.viewMoreUrl && strip.viewMoreUrl.queryParams,
|
|
13922
|
-
// f:
|
|
13923
|
-
// request &&
|
|
13924
|
-
// request.trendingSearch &&
|
|
13925
|
-
// request.trendingSearch.request &&
|
|
13926
|
-
// request.trendingSearch.request.filters
|
|
13927
|
-
// ? JSON.stringify(
|
|
13928
|
-
// this.transformSearchV6FiltersV2(
|
|
13929
|
-
// originalFilters,
|
|
13930
|
-
// )
|
|
13931
|
-
// )
|
|
13932
|
-
// : {},
|
|
13933
|
-
// },
|
|
13934
|
-
// }
|
|
13935
|
-
// : null;
|
|
13936
|
-
// let proccesedResult: any = []
|
|
13937
|
-
// if (results && results.response && results.response.certifications) {
|
|
13938
|
-
// results.response.certifications.map((result: any) => {
|
|
13939
|
-
// if (result.source === this.channnelName) {
|
|
13940
|
-
// proccesedResult.push(result)
|
|
13941
|
-
// }
|
|
13942
|
-
// })
|
|
13943
|
-
// }
|
|
13944
|
-
// results = {response: {certifications: proccesedResult}}
|
|
13945
|
-
// resolve({ results, viewMoreUrl });
|
|
13946
|
-
// }, (error: any) => {
|
|
13947
|
-
// if (error.error && error.error.status === 400) {
|
|
13948
|
-
// this.processStrip(strip, [], 'done', calculateParentStatus, null);
|
|
13949
|
-
// }
|
|
13950
|
-
// // this.processStrip(strip, [], 'done', calculateParentStatus, null)
|
|
13951
|
-
// reject(error);
|
|
13952
|
-
// },
|
|
13953
|
-
// );
|
|
13954
|
-
// }
|
|
13955
|
-
// });
|
|
13956
|
-
// }
|
|
13957
|
-
/**
|
|
13958
|
-
* @param {?} data
|
|
13959
|
-
* @return {?}
|
|
13960
|
-
*/
|
|
13961
|
-
ContentStripWithTabsPillsComponent.prototype.toggleInfo =
|
|
13962
|
-
// async trendingSearchRequest(strip: NsContentStripWithTabs.IContentStripUnit,
|
|
13963
|
-
// request: NsContentStripWithTabs.IContentStripUnit['request'],
|
|
13964
|
-
// calculateParentStatus: boolean
|
|
13965
|
-
// ): Promise<any> {
|
|
13966
|
-
// const originalFilters: any = [];
|
|
13967
|
-
// return new Promise<any>((resolve, reject) => {
|
|
13968
|
-
// if (request && request.trendingSearch) {
|
|
13969
|
-
// // check for the request if it has dynamic values]
|
|
13970
|
-
// if (request.trendingSearch.request.filters.organisation &&
|
|
13971
|
-
// request.trendingSearch.request.filters.organisation.indexOf('<orgID>') >= 0
|
|
13972
|
-
// ) {
|
|
13973
|
-
// let userRootOrgId;
|
|
13974
|
-
// if (this.configSvc.userProfile) {
|
|
13975
|
-
// userRootOrgId = this.configSvc.userProfile.rootOrgId;
|
|
13976
|
-
// }
|
|
13977
|
-
// request.trendingSearch.request.filters.organisation = userRootOrgId;
|
|
13978
|
-
// }
|
|
13979
|
-
// this.contentSvc.trendingContentSearch(request.trendingSearch).subscribe(results => {
|
|
13980
|
-
// const showViewMore = Boolean(
|
|
13981
|
-
// results.result &&
|
|
13982
|
-
// strip.request &&
|
|
13983
|
-
// results.result[strip.request.trendingSearch.responseKey] &&
|
|
13984
|
-
// results.result[strip.request.trendingSearch.responseKey].length > 5 &&
|
|
13985
|
-
// strip.stripConfig && strip.stripConfig.postCardForSearch,
|
|
13986
|
-
// );
|
|
13987
|
-
// const viewMoreUrl = showViewMore
|
|
13988
|
-
// ? {
|
|
13989
|
-
// path: strip.viewMoreUrl && strip.viewMoreUrl.path || '',
|
|
13990
|
-
// queryParams: {
|
|
13991
|
-
// tab: 'Learn',
|
|
13992
|
-
// q: strip.viewMoreUrl && strip.viewMoreUrl.queryParams,
|
|
13993
|
-
// f:
|
|
13994
|
-
// request &&
|
|
13995
|
-
// request.trendingSearch &&
|
|
13996
|
-
// request.trendingSearch.request &&
|
|
13997
|
-
// request.trendingSearch.request.filters
|
|
13998
|
-
// ? JSON.stringify(
|
|
13999
|
-
// this.transformSearchV6FiltersV2(
|
|
14000
|
-
// originalFilters,
|
|
14001
|
-
// )
|
|
14002
|
-
// )
|
|
14003
|
-
// : {},
|
|
14004
|
-
// },
|
|
14005
|
-
// }
|
|
14006
|
-
// : null;
|
|
14007
|
-
// let proccesedResult: any = []
|
|
14008
|
-
// if (results && results.response && results.response.certifications) {
|
|
14009
|
-
// results.response.certifications.map((result: any) => {
|
|
14010
|
-
// if (result.source === this.channnelName) {
|
|
14011
|
-
// proccesedResult.push(result)
|
|
14012
|
-
// }
|
|
14013
|
-
// })
|
|
14014
|
-
// }
|
|
14015
|
-
// results = {response: {certifications: proccesedResult}}
|
|
14016
|
-
// resolve({ results, viewMoreUrl });
|
|
14017
|
-
// }, (error: any) => {
|
|
14018
|
-
// if (error.error && error.error.status === 400) {
|
|
14019
|
-
// this.processStrip(strip, [], 'done', calculateParentStatus, null);
|
|
14020
|
-
// }
|
|
14021
|
-
// // this.processStrip(strip, [], 'done', calculateParentStatus, null)
|
|
14022
|
-
// reject(error);
|
|
14023
|
-
// },
|
|
14024
|
-
// );
|
|
14025
|
-
// }
|
|
14026
|
-
// });
|
|
14027
|
-
// }
|
|
14028
|
-
/**
|
|
14029
|
-
* @param {?} data
|
|
14030
|
-
* @return {?}
|
|
14031
|
-
*/
|
|
14032
|
-
function (data) {
|
|
14033
|
-
/** @type {?} */
|
|
14034
|
-
var stripInfo = this.stripsResultDataMap[data.key].stripInfo;
|
|
14035
|
-
if (stripInfo) {
|
|
14036
|
-
if (stripInfo.mode !== 'below') {
|
|
14037
|
-
this.loggerSvc.warn("strip info mode: " + stripInfo.mode + " not implemented yet");
|
|
14038
|
-
stripInfo.mode = 'below';
|
|
14039
|
-
}
|
|
14040
|
-
if (stripInfo.mode === 'below') {
|
|
14041
|
-
this.stripsResultDataMap[data.key].stripInfo = __assign({}, stripInfo, { visibilityMode: stripInfo.visibilityMode === 'hidden' ? 'visible' : 'hidden' });
|
|
14042
|
-
}
|
|
14043
|
-
}
|
|
14044
|
-
};
|
|
14045
|
-
/**
|
|
14046
|
-
* @private
|
|
14047
|
-
* @param {?} contents
|
|
14048
|
-
* @param {?} strip
|
|
14049
|
-
* @return {?}
|
|
14050
|
-
*/
|
|
14051
|
-
ContentStripWithTabsPillsComponent.prototype.transformContentsToWidgets = /**
|
|
14052
|
-
* @private
|
|
14053
|
-
* @param {?} contents
|
|
14054
|
-
* @param {?} strip
|
|
14055
|
-
* @return {?}
|
|
14056
|
-
*/
|
|
14057
|
-
function (contents, strip) {
|
|
14058
|
-
return (contents || []).map((/**
|
|
14059
|
-
* @param {?} content
|
|
14060
|
-
* @param {?} idx
|
|
14061
|
-
* @return {?}
|
|
14062
|
-
*/
|
|
14063
|
-
function (content, idx) { return (content ? {
|
|
14064
|
-
widgetType: 'cardLib',
|
|
14065
|
-
widgetSubType: 'cardContentLib',
|
|
14066
|
-
widgetHostClass: 'mb-2',
|
|
14067
|
-
widgetData: __assign({ content: content }, (content.batch && { batch: content.batch }), { cardSubType: strip.stripConfig && strip.stripConfig.cardSubType, cardCustomeClass: strip.customeClass ? strip.customeClass : '', context: { pageSection: strip.key, position: idx }, intranetMode: strip.stripConfig && strip.stripConfig.intranetMode, deletedMode: strip.stripConfig && strip.stripConfig.deletedMode, contentTags: strip.stripConfig && strip.stripConfig.contentTags }),
|
|
14068
|
-
} : {
|
|
14069
|
-
widgetType: 'card',
|
|
14070
|
-
widgetSubType: 'cardContent',
|
|
14071
|
-
widgetHostClass: 'mb-2',
|
|
14072
|
-
widgetData: {},
|
|
14073
|
-
}); }));
|
|
14074
|
-
};
|
|
14075
|
-
/**
|
|
14076
|
-
* @private
|
|
14077
|
-
* @param {?} contents
|
|
14078
|
-
* @param {?} strip
|
|
14079
|
-
* @return {?}
|
|
14080
|
-
*/
|
|
14081
|
-
ContentStripWithTabsPillsComponent.prototype.transformEventsToWidgets = /**
|
|
14082
|
-
* @private
|
|
14083
|
-
* @param {?} contents
|
|
14084
|
-
* @param {?} strip
|
|
14085
|
-
* @return {?}
|
|
14086
|
-
*/
|
|
14087
|
-
function (contents, strip) {
|
|
14088
|
-
this.eventSvc.setEventListData(contents);
|
|
14089
|
-
return (this.eventSvc.todaysEvents || []).map((/**
|
|
14090
|
-
* @param {?} content
|
|
14091
|
-
* @param {?} idx
|
|
14092
|
-
* @return {?}
|
|
14093
|
-
*/
|
|
14094
|
-
function (content, idx) { return (content ? {
|
|
14095
|
-
widgetType: 'card',
|
|
14096
|
-
widgetSubType: 'eventHubCard',
|
|
14097
|
-
widgetHostClass: 'mb-2',
|
|
14098
|
-
widgetData: {
|
|
14099
|
-
content: content,
|
|
14100
|
-
cardSubType: strip.stripConfig && strip.stripConfig.cardSubType,
|
|
14101
|
-
cardCustomeClass: strip.customeClass ? strip.customeClass : '',
|
|
14102
|
-
context: { pageSection: strip.key, position: idx },
|
|
14103
|
-
intranetMode: strip.stripConfig && strip.stripConfig.intranetMode,
|
|
14104
|
-
deletedMode: strip.stripConfig && strip.stripConfig.deletedMode,
|
|
14105
|
-
contentTags: strip.stripConfig && strip.stripConfig.contentTags,
|
|
14106
|
-
},
|
|
14107
|
-
} : {
|
|
14108
|
-
widgetType: 'card',
|
|
14109
|
-
widgetSubType: 'eventHubCard',
|
|
14110
|
-
widgetHostClass: 'mb-2',
|
|
14111
|
-
widgetData: {},
|
|
14112
|
-
}); }));
|
|
14113
|
-
};
|
|
14114
|
-
/**
|
|
14115
|
-
* @private
|
|
14116
|
-
* @param {?} strip
|
|
14117
|
-
* @return {?}
|
|
14118
|
-
*/
|
|
14119
|
-
ContentStripWithTabsPillsComponent.prototype.transformSkeletonToWidgets = /**
|
|
14120
|
-
* @private
|
|
14121
|
-
* @param {?} strip
|
|
14122
|
-
* @return {?}
|
|
14123
|
-
*/
|
|
14124
|
-
function (strip) {
|
|
14125
|
-
return [1, 2, 3, 4, 5, 6, 7, 7, 8, 9, 10].map((/**
|
|
14126
|
-
* @param {?} _content
|
|
14127
|
-
* @return {?}
|
|
14128
|
-
*/
|
|
14129
|
-
function (_content) { return ({
|
|
14130
|
-
widgetType: 'cardLib',
|
|
14131
|
-
widgetSubType: 'cardContentLib',
|
|
14132
|
-
widgetHostClass: 'mb-2',
|
|
14133
|
-
widgetData: {
|
|
14134
|
-
cardSubType: strip.loaderConfig && strip.loaderConfig.cardSubType || 'card-standard-skeleton',
|
|
14135
|
-
cardCustomeClass: strip.customeClass ? strip.customeClass : '',
|
|
14136
|
-
},
|
|
14137
|
-
}); }));
|
|
14138
|
-
};
|
|
14139
|
-
/**
|
|
14140
|
-
* @private
|
|
14141
|
-
* @param {?} strip
|
|
14142
|
-
* @param {?=} results
|
|
14143
|
-
* @param {?=} fetchStatus
|
|
14144
|
-
* @param {?=} calculateParentStatus
|
|
14145
|
-
* @param {?=} _viewMoreUrl
|
|
14146
|
-
* @param {?=} tabsResults
|
|
13292
|
+
* @param {?=} results
|
|
13293
|
+
* @param {?=} fetchStatus
|
|
13294
|
+
* @param {?=} calculateParentStatus
|
|
13295
|
+
* @param {?=} _viewMoreUrl
|
|
13296
|
+
* @param {?=} tabsResults
|
|
14147
13297
|
* @return {?}
|
|
14148
13298
|
*/
|
|
14149
13299
|
ContentStripWithTabsPillsComponent.prototype.processStrip = /**
|
|
@@ -14268,428 +13418,19 @@
|
|
|
14268
13418
|
(strip.request.search && Object.keys(strip.request.search).length) ||
|
|
14269
13419
|
(strip.request.searchRegionRecommendation &&
|
|
14270
13420
|
Object.keys(strip.request.searchRegionRecommendation).length) ||
|
|
14271
|
-
(strip.request.searchV6 && Object.keys(strip.request.searchV6).length) ||
|
|
14272
|
-
(strip.request.enrollmentList && Object.keys(strip.request.enrollmentList).length) ||
|
|
14273
13421
|
(strip.request.cbpList && Object.keys(strip.request.cbpList).length) ||
|
|
14274
|
-
(strip.request.trendingSearch && Object.keys(strip.request.trendingSearch).length) ||
|
|
14275
|
-
(strip.request.topContent && Object.keys(strip.request.topContent).length) ||
|
|
14276
|
-
(strip.request.featureContent && Object.keys(strip.request.featureContent).length) ||
|
|
14277
|
-
(strip.request.bookmarkRead && Object.keys(strip.request.bookmarkRead).length) ||
|
|
14278
|
-
(strip.request.playlistSearch && Object.keys(strip.request.playlistSearch).length) ||
|
|
14279
|
-
(strip.request.playlistRead && Object.keys(strip.request.playlistRead).length) ||
|
|
14280
|
-
(strip.request.ciosContent && Object.keys(strip.request.ciosContent).length) ||
|
|
14281
13422
|
(strip && strip.tabs.length))) {
|
|
14282
13423
|
return true;
|
|
14283
13424
|
}
|
|
14284
13425
|
return false;
|
|
14285
13426
|
};
|
|
14286
|
-
// public tabClicked(tabEvent: MatTabChangeEvent, stripMap: IStripUnitContentData, stripKey: string) {
|
|
14287
|
-
// if (stripMap && stripMap.tabs && stripMap.tabs[tabEvent.index]) {
|
|
14288
|
-
// stripMap.tabs[tabEvent.index].fetchTabStatus = 'inprogress';
|
|
14289
|
-
// stripMap.tabs[tabEvent.index].tabLoading = true;
|
|
14290
|
-
// stripMap.showOnLoader = true;
|
|
14291
|
-
// }
|
|
14292
|
-
// const data: WsEvents.ITelemetryTabData = {
|
|
14293
|
-
// label: `${tabEvent.tab.textLabel}`,
|
|
14294
|
-
// index: tabEvent.index,
|
|
14295
|
-
// };
|
|
14296
|
-
// this.eventSvc.raiseInteractTelemetry(
|
|
14297
|
-
// {
|
|
14298
|
-
// type: WsEvents.EnumInteractTypes.CLICK,
|
|
14299
|
-
// subType: WsEvents.EnumInteractSubTypes.HOME_PAGE_STRIP_TABS,
|
|
14300
|
-
// id: `${_.camelCase(data.label)}-tab`,
|
|
14301
|
-
// },
|
|
14302
|
-
// {},
|
|
14303
|
-
// {
|
|
14304
|
-
// module: WsEvents.EnumTelemetrymodules.HOME,
|
|
14305
|
-
// }
|
|
14306
|
-
// );
|
|
14307
|
-
// const currentTabFromMap: any = stripMap.tabs && stripMap.tabs[tabEvent.index];
|
|
14308
|
-
// const currentStrip = this.widgetData.strips.find(s => s.key === stripKey);
|
|
14309
|
-
// if (this.stripsResultDataMap[stripKey] && currentTabFromMap) {
|
|
14310
|
-
// this.stripsResultDataMap[stripKey].viewMoreUrl.queryParams = {
|
|
14311
|
-
// ...this.stripsResultDataMap[stripKey].viewMoreUrl.queryParams,
|
|
14312
|
-
// tabSelected: currentTabFromMap.label,
|
|
14313
|
-
// };
|
|
14314
|
-
// }
|
|
14315
|
-
// if (currentStrip && currentTabFromMap && !currentTabFromMap.computeDataOnClick) {
|
|
14316
|
-
// if (currentTabFromMap.requestRequired && currentTabFromMap.request) {
|
|
14317
|
-
// // call API to get tab data and process
|
|
14318
|
-
// // this.processStrip(currentStrip, [], 'fetching', true, null)
|
|
14319
|
-
// if (currentTabFromMap.request.searchV6) {
|
|
14320
|
-
// this.getTabDataByNewReqSearchV6(currentStrip, tabEvent.index, currentTabFromMap, true);
|
|
14321
|
-
// } else if (currentTabFromMap.request.trendingSearch) {
|
|
14322
|
-
// this.getTabDataByNewReqTrending(currentStrip, tabEvent.index, 0, currentTabFromMap, true);
|
|
14323
|
-
// }
|
|
14324
|
-
// if (stripMap && stripMap.tabs && stripMap.tabs[tabEvent.index]) {
|
|
14325
|
-
// stripMap.tabs[tabEvent.index].tabLoading = false;
|
|
14326
|
-
// }
|
|
14327
|
-
// } else {
|
|
14328
|
-
// this.getTabDataByfilter(currentStrip, currentTabFromMap, true);
|
|
14329
|
-
// setTimeout(() => {
|
|
14330
|
-
// if (stripMap && stripMap.tabs && stripMap.tabs[tabEvent.index]) {
|
|
14331
|
-
// stripMap.tabs[tabEvent.index].tabLoading = false;
|
|
14332
|
-
// stripMap.tabs[tabEvent.index].fetchTabStatus = 'done';
|
|
14333
|
-
// stripMap.showOnLoader = false;
|
|
14334
|
-
// }
|
|
14335
|
-
// }, 200);
|
|
14336
|
-
// }
|
|
14337
|
-
// }
|
|
14338
|
-
// }
|
|
14339
|
-
// async getTabDataByNewReqSearchV6(
|
|
14340
|
-
// strip: NsContentStripWithTabs.IContentStripUnit,
|
|
14341
|
-
// tabIndex: number,
|
|
14342
|
-
// currentTab: NsContentStripWithTabs.IContentStripTab,
|
|
14343
|
-
// calculateParentStatus: boolean
|
|
14344
|
-
// ) {
|
|
14345
|
-
// try {
|
|
14346
|
-
// const response = await this.searchV6Request(strip, currentTab.request, calculateParentStatus);
|
|
14347
|
-
// if (response && response.results) {
|
|
14348
|
-
// const widgets = this.transformContentsToWidgets(response.results.result.content, strip);
|
|
14349
|
-
// let tabResults: any[] = [];
|
|
14350
|
-
// if (this.stripsResultDataMap[strip.key] && this.stripsResultDataMap[strip.key].tabs) {
|
|
14351
|
-
// const allTabs = this.stripsResultDataMap[strip.key].tabs;
|
|
14352
|
-
// if (allTabs && allTabs.length && allTabs[tabIndex]) {
|
|
14353
|
-
// allTabs[tabIndex] = {
|
|
14354
|
-
// ...allTabs[tabIndex],
|
|
14355
|
-
// widgets,
|
|
14356
|
-
// fetchTabStatus: 'done',
|
|
14357
|
-
// };
|
|
14358
|
-
// tabResults = allTabs;
|
|
14359
|
-
// }
|
|
14360
|
-
// }
|
|
14361
|
-
// this.processStrip(
|
|
14362
|
-
// strip,
|
|
14363
|
-
// widgets,
|
|
14364
|
-
// 'done',
|
|
14365
|
-
// calculateParentStatus,
|
|
14366
|
-
// response.viewMoreUrl,
|
|
14367
|
-
// tabResults // tabResults as widgets
|
|
14368
|
-
// );
|
|
14369
|
-
// } else {
|
|
14370
|
-
// this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
14371
|
-
// }
|
|
14372
|
-
// } catch (error) {
|
|
14373
|
-
// // Handle errors
|
|
14374
|
-
// // console.error('Error:', error);
|
|
14375
|
-
// }
|
|
14376
|
-
// }
|
|
14377
|
-
// async getTabDataByNewReqTrending(
|
|
14378
|
-
// strip: NsContentStripWithTabs.IContentStripUnit,
|
|
14379
|
-
// tabIndex: number,
|
|
14380
|
-
// currentTab: NsContentStripWithTabs.IContentStripTab,
|
|
14381
|
-
// calculateParentStatus: boolean
|
|
14382
|
-
// ) {
|
|
14383
|
-
// try {
|
|
14384
|
-
// const response = await this.trendingSearchRequest(strip, currentTab.request, calculateParentStatus);
|
|
14385
|
-
// if (response && response.results && response.results.response) {
|
|
14386
|
-
// const content = response.results.response[currentTab.value] || [];
|
|
14387
|
-
// const widgets = this.transformContentsToWidgets(content, strip);
|
|
14388
|
-
// // console.log('currentTab --- widgets', widgets)
|
|
14389
|
-
// let tabResults: any[] = [];
|
|
14390
|
-
// if (this.stripsResultDataMap[strip.key] && this.stripsResultDataMap[strip.key].tabs) {
|
|
14391
|
-
// const allTabs = this.stripsResultDataMap[strip.key].tabs;
|
|
14392
|
-
// if (allTabs && allTabs.length && allTabs[tabIndex]) {
|
|
14393
|
-
// allTabs[tabIndex] = {
|
|
14394
|
-
// ...allTabs[tabIndex],
|
|
14395
|
-
// widgets,
|
|
14396
|
-
// fetchTabStatus: 'done',
|
|
14397
|
-
// };
|
|
14398
|
-
// tabResults = allTabs;
|
|
14399
|
-
// }
|
|
14400
|
-
// }
|
|
14401
|
-
// // console.log('tabResults -++++***--', tabResults)
|
|
14402
|
-
// // console.log('calling after-- ')
|
|
14403
|
-
// this.processStrip(
|
|
14404
|
-
// strip,
|
|
14405
|
-
// widgets,
|
|
14406
|
-
// 'done',
|
|
14407
|
-
// calculateParentStatus,
|
|
14408
|
-
// response.viewMoreUrl,
|
|
14409
|
-
// tabResults // tabResults as widgets
|
|
14410
|
-
// );
|
|
14411
|
-
// } else {
|
|
14412
|
-
// this.processStrip(strip, [], 'done', calculateParentStatus, null);
|
|
14413
|
-
// }
|
|
14414
|
-
// } catch (error) {
|
|
14415
|
-
// // Handle errors
|
|
14416
|
-
// this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
14417
|
-
// }
|
|
14418
|
-
// }
|
|
14419
|
-
// public tabClicked(tabEvent: MatTabChangeEvent, stripMap: IStripUnitContentData, stripKey: string) {
|
|
14420
|
-
// if (stripMap && stripMap.tabs && stripMap.tabs[tabEvent.index]) {
|
|
14421
|
-
// stripMap.tabs[tabEvent.index].fetchTabStatus = 'inprogress';
|
|
14422
|
-
// stripMap.tabs[tabEvent.index].tabLoading = true;
|
|
14423
|
-
// stripMap.showOnLoader = true;
|
|
14424
|
-
// }
|
|
14425
|
-
// const data: WsEvents.ITelemetryTabData = {
|
|
14426
|
-
// label: `${tabEvent.tab.textLabel}`,
|
|
14427
|
-
// index: tabEvent.index,
|
|
14428
|
-
// };
|
|
14429
|
-
// this.eventSvc.raiseInteractTelemetry(
|
|
14430
|
-
// {
|
|
14431
|
-
// type: WsEvents.EnumInteractTypes.CLICK,
|
|
14432
|
-
// subType: WsEvents.EnumInteractSubTypes.HOME_PAGE_STRIP_TABS,
|
|
14433
|
-
// id: `${_.camelCase(data.label)}-tab`,
|
|
14434
|
-
// },
|
|
14435
|
-
// {},
|
|
14436
|
-
// {
|
|
14437
|
-
// module: WsEvents.EnumTelemetrymodules.HOME,
|
|
14438
|
-
// }
|
|
14439
|
-
// );
|
|
14440
|
-
// const currentTabFromMap: any = stripMap.tabs && stripMap.tabs[tabEvent.index];
|
|
14441
|
-
// const currentStrip = this.widgetData.strips.find(s => s.key === stripKey);
|
|
14442
|
-
// if (this.stripsResultDataMap[stripKey] && currentTabFromMap) {
|
|
14443
|
-
// this.stripsResultDataMap[stripKey].viewMoreUrl.queryParams = {
|
|
14444
|
-
// ...this.stripsResultDataMap[stripKey].viewMoreUrl.queryParams,
|
|
14445
|
-
// tabSelected: currentTabFromMap.label,
|
|
14446
|
-
// };
|
|
14447
|
-
// }
|
|
14448
|
-
// if (currentStrip && currentTabFromMap && !currentTabFromMap.computeDataOnClick) {
|
|
14449
|
-
// if (currentTabFromMap.requestRequired && currentTabFromMap.request) {
|
|
14450
|
-
// // call API to get tab data and process
|
|
14451
|
-
// // this.processStrip(currentStrip, [], 'fetching', true, null)
|
|
14452
|
-
// if (currentTabFromMap.request.searchV6) {
|
|
14453
|
-
// this.getTabDataByNewReqSearchV6(currentStrip, tabEvent.index, currentTabFromMap, true);
|
|
14454
|
-
// } else if (currentTabFromMap.request.trendingSearch) {
|
|
14455
|
-
// this.getTabDataByNewReqTrending(currentStrip, tabEvent.index, 0, currentTabFromMap, true);
|
|
14456
|
-
// }
|
|
14457
|
-
// if (stripMap && stripMap.tabs && stripMap.tabs[tabEvent.index]) {
|
|
14458
|
-
// stripMap.tabs[tabEvent.index].tabLoading = false;
|
|
14459
|
-
// }
|
|
14460
|
-
// } else {
|
|
14461
|
-
// this.getTabDataByfilter(currentStrip, currentTabFromMap, true);
|
|
14462
|
-
// setTimeout(() => {
|
|
14463
|
-
// if (stripMap && stripMap.tabs && stripMap.tabs[tabEvent.index]) {
|
|
14464
|
-
// stripMap.tabs[tabEvent.index].tabLoading = false;
|
|
14465
|
-
// stripMap.tabs[tabEvent.index].fetchTabStatus = 'done';
|
|
14466
|
-
// stripMap.showOnLoader = false;
|
|
14467
|
-
// }
|
|
14468
|
-
// }, 200);
|
|
14469
|
-
// }
|
|
14470
|
-
// }
|
|
14471
|
-
// }
|
|
14472
|
-
// async getTabDataByNewReqSearchV6(
|
|
14473
|
-
// strip: NsContentStripWithTabs.IContentStripUnit,
|
|
14474
|
-
// tabIndex: number,
|
|
14475
|
-
// currentTab: NsContentStripWithTabs.IContentStripTab,
|
|
14476
|
-
// calculateParentStatus: boolean
|
|
14477
|
-
// ) {
|
|
14478
|
-
// try {
|
|
14479
|
-
// const response = await this.searchV6Request(strip, currentTab.request, calculateParentStatus);
|
|
14480
|
-
// if (response && response.results) {
|
|
14481
|
-
// const widgets = this.transformContentsToWidgets(response.results.result.content, strip);
|
|
14482
|
-
// let tabResults: any[] = [];
|
|
14483
|
-
// if (this.stripsResultDataMap[strip.key] && this.stripsResultDataMap[strip.key].tabs) {
|
|
14484
|
-
// const allTabs = this.stripsResultDataMap[strip.key].tabs;
|
|
14485
|
-
// if (allTabs && allTabs.length && allTabs[tabIndex]) {
|
|
14486
|
-
// allTabs[tabIndex] = {
|
|
14487
|
-
// ...allTabs[tabIndex],
|
|
14488
|
-
// widgets,
|
|
14489
|
-
// fetchTabStatus: 'done',
|
|
14490
|
-
// };
|
|
14491
|
-
// tabResults = allTabs;
|
|
14492
|
-
// }
|
|
14493
|
-
// }
|
|
14494
|
-
// this.processStrip(
|
|
14495
|
-
// strip,
|
|
14496
|
-
// widgets,
|
|
14497
|
-
// 'done',
|
|
14498
|
-
// calculateParentStatus,
|
|
14499
|
-
// response.viewMoreUrl,
|
|
14500
|
-
// tabResults // tabResults as widgets
|
|
14501
|
-
// );
|
|
14502
|
-
// } else {
|
|
14503
|
-
// this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
14504
|
-
// }
|
|
14505
|
-
// } catch (error) {
|
|
14506
|
-
// // Handle errors
|
|
14507
|
-
// // console.error('Error:', error);
|
|
14508
|
-
// }
|
|
14509
|
-
// }
|
|
14510
|
-
// async getTabDataByNewReqTrending(
|
|
14511
|
-
// strip: NsContentStripWithTabs.IContentStripUnit,
|
|
14512
|
-
// tabIndex: number,
|
|
14513
|
-
// currentTab: NsContentStripWithTabs.IContentStripTab,
|
|
14514
|
-
// calculateParentStatus: boolean
|
|
14515
|
-
// ) {
|
|
14516
|
-
// try {
|
|
14517
|
-
// const response = await this.trendingSearchRequest(strip, currentTab.request, calculateParentStatus);
|
|
14518
|
-
// if (response && response.results && response.results.response) {
|
|
14519
|
-
// const content = response.results.response[currentTab.value] || [];
|
|
14520
|
-
// const widgets = this.transformContentsToWidgets(content, strip);
|
|
14521
|
-
// // console.log('currentTab --- widgets', widgets)
|
|
14522
|
-
// let tabResults: any[] = [];
|
|
14523
|
-
// if (this.stripsResultDataMap[strip.key] && this.stripsResultDataMap[strip.key].tabs) {
|
|
14524
|
-
// const allTabs = this.stripsResultDataMap[strip.key].tabs;
|
|
14525
|
-
// if (allTabs && allTabs.length && allTabs[tabIndex]) {
|
|
14526
|
-
// allTabs[tabIndex] = {
|
|
14527
|
-
// ...allTabs[tabIndex],
|
|
14528
|
-
// widgets,
|
|
14529
|
-
// fetchTabStatus: 'done',
|
|
14530
|
-
// };
|
|
14531
|
-
// tabResults = allTabs;
|
|
14532
|
-
// }
|
|
14533
|
-
// }
|
|
14534
|
-
// // console.log('tabResults -++++***--', tabResults)
|
|
14535
|
-
// // console.log('calling after-- ')
|
|
14536
|
-
// this.processStrip(
|
|
14537
|
-
// strip,
|
|
14538
|
-
// widgets,
|
|
14539
|
-
// 'done',
|
|
14540
|
-
// calculateParentStatus,
|
|
14541
|
-
// response.viewMoreUrl,
|
|
14542
|
-
// tabResults // tabResults as widgets
|
|
14543
|
-
// );
|
|
14544
|
-
// } else {
|
|
14545
|
-
// this.processStrip(strip, [], 'done', calculateParentStatus, null);
|
|
14546
|
-
// }
|
|
14547
|
-
// } catch (error) {
|
|
14548
|
-
// // Handle errors
|
|
14549
|
-
// this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
14550
|
-
// }
|
|
14551
|
-
// }
|
|
14552
13427
|
/**
|
|
14553
13428
|
* @param {?} strip
|
|
14554
13429
|
* @param {?} currentTab
|
|
14555
13430
|
* @param {?} calculateParentStatus
|
|
14556
13431
|
* @return {?}
|
|
14557
13432
|
*/
|
|
14558
|
-
ContentStripWithTabsPillsComponent.prototype.getTabDataByfilter =
|
|
14559
|
-
// public tabClicked(tabEvent: MatTabChangeEvent, stripMap: IStripUnitContentData, stripKey: string) {
|
|
14560
|
-
// if (stripMap && stripMap.tabs && stripMap.tabs[tabEvent.index]) {
|
|
14561
|
-
// stripMap.tabs[tabEvent.index].fetchTabStatus = 'inprogress';
|
|
14562
|
-
// stripMap.tabs[tabEvent.index].tabLoading = true;
|
|
14563
|
-
// stripMap.showOnLoader = true;
|
|
14564
|
-
// }
|
|
14565
|
-
// const data: WsEvents.ITelemetryTabData = {
|
|
14566
|
-
// label: `${tabEvent.tab.textLabel}`,
|
|
14567
|
-
// index: tabEvent.index,
|
|
14568
|
-
// };
|
|
14569
|
-
// this.eventSvc.raiseInteractTelemetry(
|
|
14570
|
-
// {
|
|
14571
|
-
// type: WsEvents.EnumInteractTypes.CLICK,
|
|
14572
|
-
// subType: WsEvents.EnumInteractSubTypes.HOME_PAGE_STRIP_TABS,
|
|
14573
|
-
// id: `${_.camelCase(data.label)}-tab`,
|
|
14574
|
-
// },
|
|
14575
|
-
// {},
|
|
14576
|
-
// {
|
|
14577
|
-
// module: WsEvents.EnumTelemetrymodules.HOME,
|
|
14578
|
-
// }
|
|
14579
|
-
// );
|
|
14580
|
-
// const currentTabFromMap: any = stripMap.tabs && stripMap.tabs[tabEvent.index];
|
|
14581
|
-
// const currentStrip = this.widgetData.strips.find(s => s.key === stripKey);
|
|
14582
|
-
// if (this.stripsResultDataMap[stripKey] && currentTabFromMap) {
|
|
14583
|
-
// this.stripsResultDataMap[stripKey].viewMoreUrl.queryParams = {
|
|
14584
|
-
// ...this.stripsResultDataMap[stripKey].viewMoreUrl.queryParams,
|
|
14585
|
-
// tabSelected: currentTabFromMap.label,
|
|
14586
|
-
// };
|
|
14587
|
-
// }
|
|
14588
|
-
// if (currentStrip && currentTabFromMap && !currentTabFromMap.computeDataOnClick) {
|
|
14589
|
-
// if (currentTabFromMap.requestRequired && currentTabFromMap.request) {
|
|
14590
|
-
// // call API to get tab data and process
|
|
14591
|
-
// // this.processStrip(currentStrip, [], 'fetching', true, null)
|
|
14592
|
-
// if (currentTabFromMap.request.searchV6) {
|
|
14593
|
-
// this.getTabDataByNewReqSearchV6(currentStrip, tabEvent.index, currentTabFromMap, true);
|
|
14594
|
-
// } else if (currentTabFromMap.request.trendingSearch) {
|
|
14595
|
-
// this.getTabDataByNewReqTrending(currentStrip, tabEvent.index, 0, currentTabFromMap, true);
|
|
14596
|
-
// }
|
|
14597
|
-
// if (stripMap && stripMap.tabs && stripMap.tabs[tabEvent.index]) {
|
|
14598
|
-
// stripMap.tabs[tabEvent.index].tabLoading = false;
|
|
14599
|
-
// }
|
|
14600
|
-
// } else {
|
|
14601
|
-
// this.getTabDataByfilter(currentStrip, currentTabFromMap, true);
|
|
14602
|
-
// setTimeout(() => {
|
|
14603
|
-
// if (stripMap && stripMap.tabs && stripMap.tabs[tabEvent.index]) {
|
|
14604
|
-
// stripMap.tabs[tabEvent.index].tabLoading = false;
|
|
14605
|
-
// stripMap.tabs[tabEvent.index].fetchTabStatus = 'done';
|
|
14606
|
-
// stripMap.showOnLoader = false;
|
|
14607
|
-
// }
|
|
14608
|
-
// }, 200);
|
|
14609
|
-
// }
|
|
14610
|
-
// }
|
|
14611
|
-
// }
|
|
14612
|
-
// async getTabDataByNewReqSearchV6(
|
|
14613
|
-
// strip: NsContentStripWithTabs.IContentStripUnit,
|
|
14614
|
-
// tabIndex: number,
|
|
14615
|
-
// currentTab: NsContentStripWithTabs.IContentStripTab,
|
|
14616
|
-
// calculateParentStatus: boolean
|
|
14617
|
-
// ) {
|
|
14618
|
-
// try {
|
|
14619
|
-
// const response = await this.searchV6Request(strip, currentTab.request, calculateParentStatus);
|
|
14620
|
-
// if (response && response.results) {
|
|
14621
|
-
// const widgets = this.transformContentsToWidgets(response.results.result.content, strip);
|
|
14622
|
-
// let tabResults: any[] = [];
|
|
14623
|
-
// if (this.stripsResultDataMap[strip.key] && this.stripsResultDataMap[strip.key].tabs) {
|
|
14624
|
-
// const allTabs = this.stripsResultDataMap[strip.key].tabs;
|
|
14625
|
-
// if (allTabs && allTabs.length && allTabs[tabIndex]) {
|
|
14626
|
-
// allTabs[tabIndex] = {
|
|
14627
|
-
// ...allTabs[tabIndex],
|
|
14628
|
-
// widgets,
|
|
14629
|
-
// fetchTabStatus: 'done',
|
|
14630
|
-
// };
|
|
14631
|
-
// tabResults = allTabs;
|
|
14632
|
-
// }
|
|
14633
|
-
// }
|
|
14634
|
-
// this.processStrip(
|
|
14635
|
-
// strip,
|
|
14636
|
-
// widgets,
|
|
14637
|
-
// 'done',
|
|
14638
|
-
// calculateParentStatus,
|
|
14639
|
-
// response.viewMoreUrl,
|
|
14640
|
-
// tabResults // tabResults as widgets
|
|
14641
|
-
// );
|
|
14642
|
-
// } else {
|
|
14643
|
-
// this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
14644
|
-
// }
|
|
14645
|
-
// } catch (error) {
|
|
14646
|
-
// // Handle errors
|
|
14647
|
-
// // console.error('Error:', error);
|
|
14648
|
-
// }
|
|
14649
|
-
// }
|
|
14650
|
-
// async getTabDataByNewReqTrending(
|
|
14651
|
-
// strip: NsContentStripWithTabs.IContentStripUnit,
|
|
14652
|
-
// tabIndex: number,
|
|
14653
|
-
// currentTab: NsContentStripWithTabs.IContentStripTab,
|
|
14654
|
-
// calculateParentStatus: boolean
|
|
14655
|
-
// ) {
|
|
14656
|
-
// try {
|
|
14657
|
-
// const response = await this.trendingSearchRequest(strip, currentTab.request, calculateParentStatus);
|
|
14658
|
-
// if (response && response.results && response.results.response) {
|
|
14659
|
-
// const content = response.results.response[currentTab.value] || [];
|
|
14660
|
-
// const widgets = this.transformContentsToWidgets(content, strip);
|
|
14661
|
-
// // console.log('currentTab --- widgets', widgets)
|
|
14662
|
-
// let tabResults: any[] = [];
|
|
14663
|
-
// if (this.stripsResultDataMap[strip.key] && this.stripsResultDataMap[strip.key].tabs) {
|
|
14664
|
-
// const allTabs = this.stripsResultDataMap[strip.key].tabs;
|
|
14665
|
-
// if (allTabs && allTabs.length && allTabs[tabIndex]) {
|
|
14666
|
-
// allTabs[tabIndex] = {
|
|
14667
|
-
// ...allTabs[tabIndex],
|
|
14668
|
-
// widgets,
|
|
14669
|
-
// fetchTabStatus: 'done',
|
|
14670
|
-
// };
|
|
14671
|
-
// tabResults = allTabs;
|
|
14672
|
-
// }
|
|
14673
|
-
// }
|
|
14674
|
-
// // console.log('tabResults -++++***--', tabResults)
|
|
14675
|
-
// // console.log('calling after-- ')
|
|
14676
|
-
// this.processStrip(
|
|
14677
|
-
// strip,
|
|
14678
|
-
// widgets,
|
|
14679
|
-
// 'done',
|
|
14680
|
-
// calculateParentStatus,
|
|
14681
|
-
// response.viewMoreUrl,
|
|
14682
|
-
// tabResults // tabResults as widgets
|
|
14683
|
-
// );
|
|
14684
|
-
// } else {
|
|
14685
|
-
// this.processStrip(strip, [], 'done', calculateParentStatus, null);
|
|
14686
|
-
// }
|
|
14687
|
-
// } catch (error) {
|
|
14688
|
-
// // Handle errors
|
|
14689
|
-
// this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
14690
|
-
// }
|
|
14691
|
-
// }
|
|
14692
|
-
/**
|
|
13433
|
+
ContentStripWithTabsPillsComponent.prototype.getTabDataByfilter = /**
|
|
14693
13434
|
* @param {?} strip
|
|
14694
13435
|
* @param {?} currentTab
|
|
14695
13436
|
* @param {?} calculateParentStatus
|
|
@@ -14705,406 +13446,12 @@
|
|
|
14705
13446
|
// TODO: Write logic for individual filter if passed in config
|
|
14706
13447
|
// add switch case based on config key passed
|
|
14707
13448
|
};
|
|
14708
|
-
// async fetchAllCbpPlans(strip: any, calculateParentStatus = true) {
|
|
14709
|
-
// if (strip.request && strip.request.cbpList && Object.keys(strip.request.cbpList).length) {
|
|
14710
|
-
// let courses: NsContent.IContent[];
|
|
14711
|
-
// let tabResults: any[] = [];
|
|
14712
|
-
// const response = await this.userSvc.fetchCbpPlanList().toPromise();
|
|
14713
|
-
// if (response) {
|
|
14714
|
-
// courses = response;
|
|
14715
|
-
// if (strip.tabs && strip.tabs.length) {
|
|
14716
|
-
// tabResults = this.splitCbpTabsData(courses, strip);
|
|
14717
|
-
// await this.processStrip(
|
|
14718
|
-
// strip,
|
|
14719
|
-
// this.transformContentsToWidgets(courses, strip),
|
|
14720
|
-
// 'done',
|
|
14721
|
-
// calculateParentStatus,
|
|
14722
|
-
// '',
|
|
14723
|
-
// tabResults
|
|
14724
|
-
// );
|
|
14725
|
-
// } else {
|
|
14726
|
-
// this.processStrip(
|
|
14727
|
-
// strip,
|
|
14728
|
-
// this.transformContentsToWidgets(courses, strip),
|
|
14729
|
-
// 'done',
|
|
14730
|
-
// calculateParentStatus,
|
|
14731
|
-
// 'viewMoreUrl',
|
|
14732
|
-
// );
|
|
14733
|
-
// }
|
|
14734
|
-
// }
|
|
14735
|
-
// // this.userSvc.fetchCbpPlanList().subscribe( async (res: any) => {
|
|
14736
|
-
// // if (res) {
|
|
14737
|
-
// // console.log(res,'===============================>')
|
|
14738
|
-
// // courses = res
|
|
14739
|
-
// // if (strip.tabs && strip.tabs.length) {
|
|
14740
|
-
// // tabResults = this.splitCbpTabsData(courses, strip)
|
|
14741
|
-
// // await this.processStrip(
|
|
14742
|
-
// // strip,
|
|
14743
|
-
// // this.transformContentsToWidgets(courses, strip),
|
|
14744
|
-
// // 'done',
|
|
14745
|
-
// // calculateParentStatus,
|
|
14746
|
-
// // '',
|
|
14747
|
-
// // tabResults
|
|
14748
|
-
// // )
|
|
14749
|
-
// // } else {
|
|
14750
|
-
// // this.processStrip(
|
|
14751
|
-
// // strip,
|
|
14752
|
-
// // this.transformContentsToWidgets(courses, strip),
|
|
14753
|
-
// // 'done',
|
|
14754
|
-
// // calculateParentStatus,
|
|
14755
|
-
// // 'viewMoreUrl',
|
|
14756
|
-
// // )
|
|
14757
|
-
// // }
|
|
14758
|
-
// // }
|
|
14759
|
-
// // }, (_err: any) => {
|
|
14760
|
-
// // })
|
|
14761
|
-
// clearInterval(this.enrollInterval);
|
|
14762
|
-
// }
|
|
14763
|
-
// }
|
|
14764
|
-
// splitCbpTabsData(contentNew: NsContent.IContent[], strip: NsContentStripWithTabs.IContentStripUnit) {
|
|
14765
|
-
// const tabResults: any[] = [];
|
|
14766
|
-
// const splitData = this.getTabsList(
|
|
14767
|
-
// contentNew,
|
|
14768
|
-
// strip,
|
|
14769
|
-
// );
|
|
14770
|
-
// if (strip.tabs && strip.tabs.length) {
|
|
14771
|
-
// for (let i = 0; i < strip.tabs.length; i += 1) {
|
|
14772
|
-
// if (strip.tabs[i]) {
|
|
14773
|
-
// tabResults.push(
|
|
14774
|
-
// {
|
|
14775
|
-
// ...strip.tabs[i],
|
|
14776
|
-
// fetchTabStatus: 'done',
|
|
14777
|
-
// ...(splitData.find(itmInner => {
|
|
14778
|
-
// if (strip.tabs && strip.tabs[i] && itmInner.value === strip.tabs[i].value) {
|
|
14779
|
-
// return itmInner;
|
|
14780
|
-
// }
|
|
14781
|
-
// return undefined;
|
|
14782
|
-
// })),
|
|
14783
|
-
// }
|
|
14784
|
-
// );
|
|
14785
|
-
// }
|
|
14786
|
-
// }
|
|
14787
|
-
// }
|
|
14788
|
-
// return tabResults;
|
|
14789
|
-
// }
|
|
14790
|
-
// getTabsList(array: NsContent.IContent[],
|
|
14791
|
-
// strip: NsContentStripWithTabs.IContentStripUnit) {
|
|
14792
|
-
// let all: any[] = [];
|
|
14793
|
-
// let upcoming: any[] = [];
|
|
14794
|
-
// let overdue: any[] = [];
|
|
14795
|
-
// array.forEach((e: any) => {
|
|
14796
|
-
// all.push(e);
|
|
14797
|
-
// if (e.planDuration === NsCardContent.ACBPConst.OVERDUE) {
|
|
14798
|
-
// overdue.push(e);
|
|
14799
|
-
// } else if (e.planDuration === NsCardContent.ACBPConst.UPCOMING) {
|
|
14800
|
-
// upcoming.push(e);
|
|
14801
|
-
// }
|
|
14802
|
-
// });
|
|
14803
|
-
// const allCompleted = all.filter((allData: any) => allData.contentStatus === 2);
|
|
14804
|
-
// let allInCompleted = all.filter((allData: any) => allData.contentStatus < 2);
|
|
14805
|
-
// let allCompletedOverDue = allCompleted.filter((allData: any) => allData.planDuration === NsCardContent.ACBPConst.OVERDUE);
|
|
14806
|
-
// const allCompletedAll = allCompleted.filter((allData: any) => allData.planDuration !== NsCardContent.ACBPConst.OVERDUE);
|
|
14807
|
-
// allCompletedOverDue = allCompletedOverDue.sort((a: any, b: any): any => {
|
|
14808
|
-
// if (a.planDuration === NsCardContent.ACBPConst.OVERDUE && b.planDuration === NsCardContent.ACBPConst.OVERDUE) {
|
|
14809
|
-
// const firstDate: any = new Date(a.endDate);
|
|
14810
|
-
// const secondDate: any = new Date(b.endDate);
|
|
14811
|
-
// return firstDate > secondDate ? -1 : 1;
|
|
14812
|
-
// }
|
|
14813
|
-
// });
|
|
14814
|
-
// allInCompleted = allInCompleted.sort((a: any, b: any): any => {
|
|
14815
|
-
// if (a.planDuration === NsCardContent.ACBPConst.OVERDUE && b.planDuration === NsCardContent.ACBPConst.OVERDUE) {
|
|
14816
|
-
// const firstDate: any = new Date(a.endDate);
|
|
14817
|
-
// const secondDate: any = new Date(b.endDate);
|
|
14818
|
-
// return firstDate > secondDate ? -1 : 1;
|
|
14819
|
-
// }
|
|
14820
|
-
// });
|
|
14821
|
-
// all = [...allInCompleted, ...allCompletedAll, ...allCompletedOverDue];
|
|
14822
|
-
// overdue = overdue.filter((data: any): any => {
|
|
14823
|
-
// return data.contentStatus < 2;
|
|
14824
|
-
// });
|
|
14825
|
-
// overdue = overdue.sort((a: any, b: any): any => {
|
|
14826
|
-
// const firstDate: any = new Date(a.endDate);
|
|
14827
|
-
// const secondDate: any = new Date(b.endDate);
|
|
14828
|
-
// return firstDate > secondDate ? -1 : 1;
|
|
14829
|
-
// });
|
|
14830
|
-
// upcoming = upcoming.filter((data: any): any => {
|
|
14831
|
-
// return data.contentStatus < 2;
|
|
14832
|
-
// });
|
|
14833
|
-
// // this.getSelectedIndex(1)
|
|
14834
|
-
// return [
|
|
14835
|
-
// { value: 'all', widgets: this.transformContentsToWidgets(all, strip) },
|
|
14836
|
-
// { value: 'upcoming', widgets: this.transformContentsToWidgets(upcoming, strip) },
|
|
14837
|
-
// { value: 'overdue', widgets: this.transformContentsToWidgets(overdue, strip) }];
|
|
14838
|
-
// }
|
|
14839
|
-
// async fetchAllCbpPlans(strip: any, calculateParentStatus = true) {
|
|
14840
|
-
// if (strip.request && strip.request.cbpList && Object.keys(strip.request.cbpList).length) {
|
|
14841
|
-
// let courses: NsContent.IContent[];
|
|
14842
|
-
// let tabResults: any[] = [];
|
|
14843
|
-
// const response = await this.userSvc.fetchCbpPlanList().toPromise();
|
|
14844
|
-
// if (response) {
|
|
14845
|
-
// courses = response;
|
|
14846
|
-
// if (strip.tabs && strip.tabs.length) {
|
|
14847
|
-
// tabResults = this.splitCbpTabsData(courses, strip);
|
|
14848
|
-
// await this.processStrip(
|
|
14849
|
-
// strip,
|
|
14850
|
-
// this.transformContentsToWidgets(courses, strip),
|
|
14851
|
-
// 'done',
|
|
14852
|
-
// calculateParentStatus,
|
|
14853
|
-
// '',
|
|
14854
|
-
// tabResults
|
|
14855
|
-
// );
|
|
14856
|
-
// } else {
|
|
14857
|
-
// this.processStrip(
|
|
14858
|
-
// strip,
|
|
14859
|
-
// this.transformContentsToWidgets(courses, strip),
|
|
14860
|
-
// 'done',
|
|
14861
|
-
// calculateParentStatus,
|
|
14862
|
-
// 'viewMoreUrl',
|
|
14863
|
-
// );
|
|
14864
|
-
// }
|
|
14865
|
-
// }
|
|
14866
|
-
// // this.userSvc.fetchCbpPlanList().subscribe( async (res: any) => {
|
|
14867
|
-
// // if (res) {
|
|
14868
|
-
// // console.log(res,'===============================>')
|
|
14869
|
-
// // courses = res
|
|
14870
|
-
// // if (strip.tabs && strip.tabs.length) {
|
|
14871
|
-
// // tabResults = this.splitCbpTabsData(courses, strip)
|
|
14872
|
-
// // await this.processStrip(
|
|
14873
|
-
// // strip,
|
|
14874
|
-
// // this.transformContentsToWidgets(courses, strip),
|
|
14875
|
-
// // 'done',
|
|
14876
|
-
// // calculateParentStatus,
|
|
14877
|
-
// // '',
|
|
14878
|
-
// // tabResults
|
|
14879
|
-
// // )
|
|
14880
|
-
// // } else {
|
|
14881
|
-
// // this.processStrip(
|
|
14882
|
-
// // strip,
|
|
14883
|
-
// // this.transformContentsToWidgets(courses, strip),
|
|
14884
|
-
// // 'done',
|
|
14885
|
-
// // calculateParentStatus,
|
|
14886
|
-
// // 'viewMoreUrl',
|
|
14887
|
-
// // )
|
|
14888
|
-
// // }
|
|
14889
|
-
// // }
|
|
14890
|
-
// // }, (_err: any) => {
|
|
14891
|
-
// // })
|
|
14892
|
-
// clearInterval(this.enrollInterval);
|
|
14893
|
-
// }
|
|
14894
|
-
// }
|
|
14895
|
-
// splitCbpTabsData(contentNew: NsContent.IContent[], strip: NsContentStripWithTabs.IContentStripUnit) {
|
|
14896
|
-
// const tabResults: any[] = [];
|
|
14897
|
-
// const splitData = this.getTabsList(
|
|
14898
|
-
// contentNew,
|
|
14899
|
-
// strip,
|
|
14900
|
-
// );
|
|
14901
|
-
// if (strip.tabs && strip.tabs.length) {
|
|
14902
|
-
// for (let i = 0; i < strip.tabs.length; i += 1) {
|
|
14903
|
-
// if (strip.tabs[i]) {
|
|
14904
|
-
// tabResults.push(
|
|
14905
|
-
// {
|
|
14906
|
-
// ...strip.tabs[i],
|
|
14907
|
-
// fetchTabStatus: 'done',
|
|
14908
|
-
// ...(splitData.find(itmInner => {
|
|
14909
|
-
// if (strip.tabs && strip.tabs[i] && itmInner.value === strip.tabs[i].value) {
|
|
14910
|
-
// return itmInner;
|
|
14911
|
-
// }
|
|
14912
|
-
// return undefined;
|
|
14913
|
-
// })),
|
|
14914
|
-
// }
|
|
14915
|
-
// );
|
|
14916
|
-
// }
|
|
14917
|
-
// }
|
|
14918
|
-
// }
|
|
14919
|
-
// return tabResults;
|
|
14920
|
-
// }
|
|
14921
|
-
// getTabsList(array: NsContent.IContent[],
|
|
14922
|
-
// strip: NsContentStripWithTabs.IContentStripUnit) {
|
|
14923
|
-
// let all: any[] = [];
|
|
14924
|
-
// let upcoming: any[] = [];
|
|
14925
|
-
// let overdue: any[] = [];
|
|
14926
|
-
// array.forEach((e: any) => {
|
|
14927
|
-
// all.push(e);
|
|
14928
|
-
// if (e.planDuration === NsCardContent.ACBPConst.OVERDUE) {
|
|
14929
|
-
// overdue.push(e);
|
|
14930
|
-
// } else if (e.planDuration === NsCardContent.ACBPConst.UPCOMING) {
|
|
14931
|
-
// upcoming.push(e);
|
|
14932
|
-
// }
|
|
14933
|
-
// });
|
|
14934
|
-
// const allCompleted = all.filter((allData: any) => allData.contentStatus === 2);
|
|
14935
|
-
// let allInCompleted = all.filter((allData: any) => allData.contentStatus < 2);
|
|
14936
|
-
// let allCompletedOverDue = allCompleted.filter((allData: any) => allData.planDuration === NsCardContent.ACBPConst.OVERDUE);
|
|
14937
|
-
// const allCompletedAll = allCompleted.filter((allData: any) => allData.planDuration !== NsCardContent.ACBPConst.OVERDUE);
|
|
14938
|
-
// allCompletedOverDue = allCompletedOverDue.sort((a: any, b: any): any => {
|
|
14939
|
-
// if (a.planDuration === NsCardContent.ACBPConst.OVERDUE && b.planDuration === NsCardContent.ACBPConst.OVERDUE) {
|
|
14940
|
-
// const firstDate: any = new Date(a.endDate);
|
|
14941
|
-
// const secondDate: any = new Date(b.endDate);
|
|
14942
|
-
// return firstDate > secondDate ? -1 : 1;
|
|
14943
|
-
// }
|
|
14944
|
-
// });
|
|
14945
|
-
// allInCompleted = allInCompleted.sort((a: any, b: any): any => {
|
|
14946
|
-
// if (a.planDuration === NsCardContent.ACBPConst.OVERDUE && b.planDuration === NsCardContent.ACBPConst.OVERDUE) {
|
|
14947
|
-
// const firstDate: any = new Date(a.endDate);
|
|
14948
|
-
// const secondDate: any = new Date(b.endDate);
|
|
14949
|
-
// return firstDate > secondDate ? -1 : 1;
|
|
14950
|
-
// }
|
|
14951
|
-
// });
|
|
14952
|
-
// all = [...allInCompleted, ...allCompletedAll, ...allCompletedOverDue];
|
|
14953
|
-
// overdue = overdue.filter((data: any): any => {
|
|
14954
|
-
// return data.contentStatus < 2;
|
|
14955
|
-
// });
|
|
14956
|
-
// overdue = overdue.sort((a: any, b: any): any => {
|
|
14957
|
-
// const firstDate: any = new Date(a.endDate);
|
|
14958
|
-
// const secondDate: any = new Date(b.endDate);
|
|
14959
|
-
// return firstDate > secondDate ? -1 : 1;
|
|
14960
|
-
// });
|
|
14961
|
-
// upcoming = upcoming.filter((data: any): any => {
|
|
14962
|
-
// return data.contentStatus < 2;
|
|
14963
|
-
// });
|
|
14964
|
-
// // this.getSelectedIndex(1)
|
|
14965
|
-
// return [
|
|
14966
|
-
// { value: 'all', widgets: this.transformContentsToWidgets(all, strip) },
|
|
14967
|
-
// { value: 'upcoming', widgets: this.transformContentsToWidgets(upcoming, strip) },
|
|
14968
|
-
// { value: 'overdue', widgets: this.transformContentsToWidgets(overdue, strip) }];
|
|
14969
|
-
// }
|
|
14970
13449
|
/**
|
|
14971
13450
|
* @param {?} stripsResultDataMap
|
|
14972
13451
|
* @param {?} key
|
|
14973
13452
|
* @return {?}
|
|
14974
13453
|
*/
|
|
14975
|
-
ContentStripWithTabsPillsComponent.prototype.getSelectedIndex =
|
|
14976
|
-
// async fetchAllCbpPlans(strip: any, calculateParentStatus = true) {
|
|
14977
|
-
// if (strip.request && strip.request.cbpList && Object.keys(strip.request.cbpList).length) {
|
|
14978
|
-
// let courses: NsContent.IContent[];
|
|
14979
|
-
// let tabResults: any[] = [];
|
|
14980
|
-
// const response = await this.userSvc.fetchCbpPlanList().toPromise();
|
|
14981
|
-
// if (response) {
|
|
14982
|
-
// courses = response;
|
|
14983
|
-
// if (strip.tabs && strip.tabs.length) {
|
|
14984
|
-
// tabResults = this.splitCbpTabsData(courses, strip);
|
|
14985
|
-
// await this.processStrip(
|
|
14986
|
-
// strip,
|
|
14987
|
-
// this.transformContentsToWidgets(courses, strip),
|
|
14988
|
-
// 'done',
|
|
14989
|
-
// calculateParentStatus,
|
|
14990
|
-
// '',
|
|
14991
|
-
// tabResults
|
|
14992
|
-
// );
|
|
14993
|
-
// } else {
|
|
14994
|
-
// this.processStrip(
|
|
14995
|
-
// strip,
|
|
14996
|
-
// this.transformContentsToWidgets(courses, strip),
|
|
14997
|
-
// 'done',
|
|
14998
|
-
// calculateParentStatus,
|
|
14999
|
-
// 'viewMoreUrl',
|
|
15000
|
-
// );
|
|
15001
|
-
// }
|
|
15002
|
-
// }
|
|
15003
|
-
// // this.userSvc.fetchCbpPlanList().subscribe( async (res: any) => {
|
|
15004
|
-
// // if (res) {
|
|
15005
|
-
// // console.log(res,'===============================>')
|
|
15006
|
-
// // courses = res
|
|
15007
|
-
// // if (strip.tabs && strip.tabs.length) {
|
|
15008
|
-
// // tabResults = this.splitCbpTabsData(courses, strip)
|
|
15009
|
-
// // await this.processStrip(
|
|
15010
|
-
// // strip,
|
|
15011
|
-
// // this.transformContentsToWidgets(courses, strip),
|
|
15012
|
-
// // 'done',
|
|
15013
|
-
// // calculateParentStatus,
|
|
15014
|
-
// // '',
|
|
15015
|
-
// // tabResults
|
|
15016
|
-
// // )
|
|
15017
|
-
// // } else {
|
|
15018
|
-
// // this.processStrip(
|
|
15019
|
-
// // strip,
|
|
15020
|
-
// // this.transformContentsToWidgets(courses, strip),
|
|
15021
|
-
// // 'done',
|
|
15022
|
-
// // calculateParentStatus,
|
|
15023
|
-
// // 'viewMoreUrl',
|
|
15024
|
-
// // )
|
|
15025
|
-
// // }
|
|
15026
|
-
// // }
|
|
15027
|
-
// // }, (_err: any) => {
|
|
15028
|
-
// // })
|
|
15029
|
-
// clearInterval(this.enrollInterval);
|
|
15030
|
-
// }
|
|
15031
|
-
// }
|
|
15032
|
-
// splitCbpTabsData(contentNew: NsContent.IContent[], strip: NsContentStripWithTabs.IContentStripUnit) {
|
|
15033
|
-
// const tabResults: any[] = [];
|
|
15034
|
-
// const splitData = this.getTabsList(
|
|
15035
|
-
// contentNew,
|
|
15036
|
-
// strip,
|
|
15037
|
-
// );
|
|
15038
|
-
// if (strip.tabs && strip.tabs.length) {
|
|
15039
|
-
// for (let i = 0; i < strip.tabs.length; i += 1) {
|
|
15040
|
-
// if (strip.tabs[i]) {
|
|
15041
|
-
// tabResults.push(
|
|
15042
|
-
// {
|
|
15043
|
-
// ...strip.tabs[i],
|
|
15044
|
-
// fetchTabStatus: 'done',
|
|
15045
|
-
// ...(splitData.find(itmInner => {
|
|
15046
|
-
// if (strip.tabs && strip.tabs[i] && itmInner.value === strip.tabs[i].value) {
|
|
15047
|
-
// return itmInner;
|
|
15048
|
-
// }
|
|
15049
|
-
// return undefined;
|
|
15050
|
-
// })),
|
|
15051
|
-
// }
|
|
15052
|
-
// );
|
|
15053
|
-
// }
|
|
15054
|
-
// }
|
|
15055
|
-
// }
|
|
15056
|
-
// return tabResults;
|
|
15057
|
-
// }
|
|
15058
|
-
// getTabsList(array: NsContent.IContent[],
|
|
15059
|
-
// strip: NsContentStripWithTabs.IContentStripUnit) {
|
|
15060
|
-
// let all: any[] = [];
|
|
15061
|
-
// let upcoming: any[] = [];
|
|
15062
|
-
// let overdue: any[] = [];
|
|
15063
|
-
// array.forEach((e: any) => {
|
|
15064
|
-
// all.push(e);
|
|
15065
|
-
// if (e.planDuration === NsCardContent.ACBPConst.OVERDUE) {
|
|
15066
|
-
// overdue.push(e);
|
|
15067
|
-
// } else if (e.planDuration === NsCardContent.ACBPConst.UPCOMING) {
|
|
15068
|
-
// upcoming.push(e);
|
|
15069
|
-
// }
|
|
15070
|
-
// });
|
|
15071
|
-
// const allCompleted = all.filter((allData: any) => allData.contentStatus === 2);
|
|
15072
|
-
// let allInCompleted = all.filter((allData: any) => allData.contentStatus < 2);
|
|
15073
|
-
// let allCompletedOverDue = allCompleted.filter((allData: any) => allData.planDuration === NsCardContent.ACBPConst.OVERDUE);
|
|
15074
|
-
// const allCompletedAll = allCompleted.filter((allData: any) => allData.planDuration !== NsCardContent.ACBPConst.OVERDUE);
|
|
15075
|
-
// allCompletedOverDue = allCompletedOverDue.sort((a: any, b: any): any => {
|
|
15076
|
-
// if (a.planDuration === NsCardContent.ACBPConst.OVERDUE && b.planDuration === NsCardContent.ACBPConst.OVERDUE) {
|
|
15077
|
-
// const firstDate: any = new Date(a.endDate);
|
|
15078
|
-
// const secondDate: any = new Date(b.endDate);
|
|
15079
|
-
// return firstDate > secondDate ? -1 : 1;
|
|
15080
|
-
// }
|
|
15081
|
-
// });
|
|
15082
|
-
// allInCompleted = allInCompleted.sort((a: any, b: any): any => {
|
|
15083
|
-
// if (a.planDuration === NsCardContent.ACBPConst.OVERDUE && b.planDuration === NsCardContent.ACBPConst.OVERDUE) {
|
|
15084
|
-
// const firstDate: any = new Date(a.endDate);
|
|
15085
|
-
// const secondDate: any = new Date(b.endDate);
|
|
15086
|
-
// return firstDate > secondDate ? -1 : 1;
|
|
15087
|
-
// }
|
|
15088
|
-
// });
|
|
15089
|
-
// all = [...allInCompleted, ...allCompletedAll, ...allCompletedOverDue];
|
|
15090
|
-
// overdue = overdue.filter((data: any): any => {
|
|
15091
|
-
// return data.contentStatus < 2;
|
|
15092
|
-
// });
|
|
15093
|
-
// overdue = overdue.sort((a: any, b: any): any => {
|
|
15094
|
-
// const firstDate: any = new Date(a.endDate);
|
|
15095
|
-
// const secondDate: any = new Date(b.endDate);
|
|
15096
|
-
// return firstDate > secondDate ? -1 : 1;
|
|
15097
|
-
// });
|
|
15098
|
-
// upcoming = upcoming.filter((data: any): any => {
|
|
15099
|
-
// return data.contentStatus < 2;
|
|
15100
|
-
// });
|
|
15101
|
-
// // this.getSelectedIndex(1)
|
|
15102
|
-
// return [
|
|
15103
|
-
// { value: 'all', widgets: this.transformContentsToWidgets(all, strip) },
|
|
15104
|
-
// { value: 'upcoming', widgets: this.transformContentsToWidgets(upcoming, strip) },
|
|
15105
|
-
// { value: 'overdue', widgets: this.transformContentsToWidgets(overdue, strip) }];
|
|
15106
|
-
// }
|
|
15107
|
-
/**
|
|
13454
|
+
ContentStripWithTabsPillsComponent.prototype.getSelectedIndex = /**
|
|
15108
13455
|
* @param {?} stripsResultDataMap
|
|
15109
13456
|
* @param {?} key
|
|
15110
13457
|
* @return {?}
|
|
@@ -15112,12 +13459,6 @@
|
|
|
15112
13459
|
function (stripsResultDataMap, key) {
|
|
15113
13460
|
/** @type {?} */
|
|
15114
13461
|
var returnValue = 0;
|
|
15115
|
-
// if (key === 'cbpPlan') {
|
|
15116
|
-
// if (stripsResultDataMap.tabs.length) {
|
|
15117
|
-
// const data = stripsResultDataMap.tabs.filter((ele: any) => ele.value === 'upcoming');
|
|
15118
|
-
// returnValue = data[0].widgets && data[0].widgets.length > 0 ? 1 : 0;
|
|
15119
|
-
// }
|
|
15120
|
-
// }
|
|
15121
13462
|
return returnValue;
|
|
15122
13463
|
};
|
|
15123
13464
|
/**
|
|
@@ -15149,602 +13490,48 @@
|
|
|
15149
13490
|
};
|
|
15150
13491
|
/**
|
|
15151
13492
|
* @param {?} index
|
|
15152
|
-
* @param {?} item
|
|
15153
|
-
* @return {?}
|
|
15154
|
-
*/
|
|
15155
|
-
ContentStripWithTabsPillsComponent.prototype.tracker = /**
|
|
15156
|
-
* @param {?} index
|
|
15157
|
-
* @param {?} item
|
|
15158
|
-
* @return {?}
|
|
15159
|
-
*/
|
|
15160
|
-
function (index, item) {
|
|
15161
|
-
if (index >= 0) { }
|
|
15162
|
-
return lodash.get(item, 'widgetData.content.identifier');
|
|
15163
|
-
};
|
|
15164
|
-
/**
|
|
15165
|
-
* @param {?} strip
|
|
15166
|
-
* @param {?=} calculateParentStatus
|
|
15167
|
-
* @return {?}
|
|
15168
|
-
*/
|
|
15169
|
-
ContentStripWithTabsPillsComponent.prototype.fetchAllTopContent = /**
|
|
15170
|
-
* @param {?} strip
|
|
15171
|
-
* @param {?=} calculateParentStatus
|
|
15172
|
-
* @return {?}
|
|
15173
|
-
*/
|
|
15174
|
-
function (strip, calculateParentStatus) {
|
|
15175
|
-
if (calculateParentStatus === void 0) { calculateParentStatus = true; }
|
|
15176
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
15177
|
-
var originalFilters, response, error_2;
|
|
15178
|
-
return __generator(this, function (_a) {
|
|
15179
|
-
switch (_a.label) {
|
|
15180
|
-
case 0:
|
|
15181
|
-
if (!(strip.request && strip.request.topContent && Object.keys(strip.request.topContent).length)) return [3 /*break*/, 4];
|
|
15182
|
-
originalFilters = [];
|
|
15183
|
-
if (strip.request &&
|
|
15184
|
-
strip.request.topContent &&
|
|
15185
|
-
strip.request.topContent.request &&
|
|
15186
|
-
strip.request.topContent.request.filters) {
|
|
15187
|
-
originalFilters = strip.request.topContent.request.filters;
|
|
15188
|
-
strip.request.topContent.request.filters = this.postMethodFilters(strip.request.topContent.request.filters);
|
|
15189
|
-
}
|
|
15190
|
-
_a.label = 1;
|
|
15191
|
-
case 1:
|
|
15192
|
-
_a.trys.push([1, 3, , 4]);
|
|
15193
|
-
return [4 /*yield*/, this.postRequestMethod(strip, strip.request.topContent, strip.request.apiUrl, calculateParentStatus)];
|
|
15194
|
-
case 2:
|
|
15195
|
-
response = _a.sent();
|
|
15196
|
-
// console.log('calling after - response, ', response)
|
|
15197
|
-
if (response && response.results) {
|
|
15198
|
-
// console.log('calling after-- ')
|
|
15199
|
-
if (response.results.result.content && response.results.result.content.length) {
|
|
15200
|
-
this.processStrip(strip, this.transformContentsToWidgets(response.results.result.content, strip), 'done', calculateParentStatus, response.viewMoreUrl);
|
|
15201
|
-
}
|
|
15202
|
-
else {
|
|
15203
|
-
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
15204
|
-
this.emptyResponse.emit(true);
|
|
15205
|
-
}
|
|
15206
|
-
}
|
|
15207
|
-
else {
|
|
15208
|
-
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
15209
|
-
this.emptyResponse.emit(true);
|
|
15210
|
-
}
|
|
15211
|
-
return [3 /*break*/, 4];
|
|
15212
|
-
case 3:
|
|
15213
|
-
error_2 = _a.sent();
|
|
15214
|
-
return [3 /*break*/, 4];
|
|
15215
|
-
case 4: return [2 /*return*/];
|
|
15216
|
-
}
|
|
15217
|
-
});
|
|
15218
|
-
});
|
|
15219
|
-
};
|
|
15220
|
-
/**
|
|
15221
|
-
* @param {?} strip
|
|
15222
|
-
* @param {?=} calculateParentStatus
|
|
15223
|
-
* @return {?}
|
|
15224
|
-
*/
|
|
15225
|
-
ContentStripWithTabsPillsComponent.prototype.fetchAllFeaturedContent = /**
|
|
15226
|
-
* @param {?} strip
|
|
15227
|
-
* @param {?=} calculateParentStatus
|
|
15228
|
-
* @return {?}
|
|
15229
|
-
*/
|
|
15230
|
-
function (strip, calculateParentStatus) {
|
|
15231
|
-
if (calculateParentStatus === void 0) { calculateParentStatus = true; }
|
|
15232
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
15233
|
-
var originalFilters, response, error_3;
|
|
15234
|
-
return __generator(this, function (_a) {
|
|
15235
|
-
switch (_a.label) {
|
|
15236
|
-
case 0:
|
|
15237
|
-
if (!(strip.request && strip.request.featureContent && Object.keys(strip.request.featureContent).length)) return [3 /*break*/, 4];
|
|
15238
|
-
originalFilters = [];
|
|
15239
|
-
if (strip.request &&
|
|
15240
|
-
strip.request.featureContent &&
|
|
15241
|
-
strip.request.featureContent.request &&
|
|
15242
|
-
strip.request.featureContent.request.filters) {
|
|
15243
|
-
originalFilters = strip.request.featureContent.request.filters;
|
|
15244
|
-
strip.request.featureContent.request.filters = this.postMethodFilters(strip.request.featureContent.request.filters);
|
|
15245
|
-
}
|
|
15246
|
-
_a.label = 1;
|
|
15247
|
-
case 1:
|
|
15248
|
-
_a.trys.push([1, 3, , 4]);
|
|
15249
|
-
return [4 /*yield*/, this.postRequestMethod(strip, strip.request.featureContent, strip.request.apiUrl, calculateParentStatus)];
|
|
15250
|
-
case 2:
|
|
15251
|
-
response = _a.sent();
|
|
15252
|
-
// console.log('calling after - response, ', response)
|
|
15253
|
-
if (response && response.results) {
|
|
15254
|
-
// console.log('calling after-- ')
|
|
15255
|
-
if (response.results.result.content && response.results.result.content.length) {
|
|
15256
|
-
this.processStrip(strip, this.transformContentsToWidgets(response.results.result.content, strip), 'done', calculateParentStatus, response.viewMoreUrl);
|
|
15257
|
-
}
|
|
15258
|
-
else {
|
|
15259
|
-
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
15260
|
-
this.emptyResponse.emit(true);
|
|
15261
|
-
}
|
|
15262
|
-
}
|
|
15263
|
-
else {
|
|
15264
|
-
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
15265
|
-
this.emptyResponse.emit(true);
|
|
15266
|
-
}
|
|
15267
|
-
return [3 /*break*/, 4];
|
|
15268
|
-
case 3:
|
|
15269
|
-
error_3 = _a.sent();
|
|
15270
|
-
this.emptyResponse.emit(true);
|
|
15271
|
-
return [3 /*break*/, 4];
|
|
15272
|
-
case 4: return [2 /*return*/];
|
|
15273
|
-
}
|
|
15274
|
-
});
|
|
15275
|
-
});
|
|
15276
|
-
};
|
|
15277
|
-
/**
|
|
15278
|
-
* @param {?} stripData
|
|
15279
|
-
* @return {?}
|
|
15280
|
-
*/
|
|
15281
|
-
ContentStripWithTabsPillsComponent.prototype.raiseTelemetry = /**
|
|
15282
|
-
* @param {?} stripData
|
|
15283
|
-
* @return {?}
|
|
15284
|
-
*/
|
|
15285
|
-
function (stripData) {
|
|
15286
|
-
this.telemtryResponse.emit(stripData);
|
|
15287
|
-
};
|
|
15288
|
-
/**
|
|
15289
|
-
* @param {?} strip
|
|
15290
|
-
* @param {?} request
|
|
15291
|
-
* @param {?} apiUrl
|
|
15292
|
-
* @param {?} calculateParentStatus
|
|
15293
|
-
* @return {?}
|
|
15294
|
-
*/
|
|
15295
|
-
ContentStripWithTabsPillsComponent.prototype.postRequestMethod = /**
|
|
15296
|
-
* @param {?} strip
|
|
15297
|
-
* @param {?} request
|
|
15298
|
-
* @param {?} apiUrl
|
|
15299
|
-
* @param {?} calculateParentStatus
|
|
15300
|
-
* @return {?}
|
|
15301
|
-
*/
|
|
15302
|
-
function (strip, request, apiUrl, calculateParentStatus) {
|
|
15303
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
15304
|
-
var _this = this;
|
|
15305
|
-
return __generator(this, function (_a) {
|
|
15306
|
-
return [2 /*return*/, new Promise((/**
|
|
15307
|
-
* @param {?} resolve
|
|
15308
|
-
* @param {?} reject
|
|
15309
|
-
* @return {?}
|
|
15310
|
-
*/
|
|
15311
|
-
function (resolve, reject) {
|
|
15312
|
-
if (request && request) {
|
|
15313
|
-
_this.contentSvc.postApiMethod(apiUrl, request).subscribe((/**
|
|
15314
|
-
* @param {?} results
|
|
15315
|
-
* @return {?}
|
|
15316
|
-
*/
|
|
15317
|
-
function (results) {
|
|
15318
|
-
if (results.result && results.result.content) {
|
|
15319
|
-
/** @type {?} */
|
|
15320
|
-
var showViewMore = Boolean(results.result.content && results.result.content.length > 5 && strip.stripConfig && strip.stripConfig.postCardForSearch);
|
|
15321
|
-
/** @type {?} */
|
|
15322
|
-
var viewMoreUrl = showViewMore
|
|
15323
|
-
? {
|
|
15324
|
-
path: strip.viewMoreUrl && strip.viewMoreUrl.path || '',
|
|
15325
|
-
queryParams: {
|
|
15326
|
-
tab: 'Learn',
|
|
15327
|
-
q: strip.viewMoreUrl && strip.viewMoreUrl.queryParams,
|
|
15328
|
-
f: {},
|
|
15329
|
-
},
|
|
15330
|
-
}
|
|
15331
|
-
: null;
|
|
15332
|
-
resolve({ results: results, viewMoreUrl: viewMoreUrl });
|
|
15333
|
-
}
|
|
15334
|
-
else if (results && results.data) {
|
|
15335
|
-
/** @type {?} */
|
|
15336
|
-
var showViewMore = Boolean(results.data && results.data.length > 5 && strip.stripConfig && strip.stripConfig.postCardForSearch);
|
|
15337
|
-
/** @type {?} */
|
|
15338
|
-
var viewMoreUrl = showViewMore ? {
|
|
15339
|
-
path: strip.viewMoreUrl && strip.viewMoreUrl.path || '',
|
|
15340
|
-
queryParams: {
|
|
15341
|
-
tab: 'Learn',
|
|
15342
|
-
q: strip.viewMoreUrl && strip.viewMoreUrl.queryParams,
|
|
15343
|
-
f: {},
|
|
15344
|
-
},
|
|
15345
|
-
}
|
|
15346
|
-
: null;
|
|
15347
|
-
resolve({ results: results, viewMoreUrl: viewMoreUrl });
|
|
15348
|
-
}
|
|
15349
|
-
else if (results.result && results.result.data) {
|
|
15350
|
-
/** @type {?} */
|
|
15351
|
-
var showViewMore = Boolean(results.data && results.result.data && results.result.data.length > 5 && strip.stripConfig && strip.stripConfig.postCardForSearch);
|
|
15352
|
-
/** @type {?} */
|
|
15353
|
-
var viewMoreUrl = showViewMore ? {
|
|
15354
|
-
path: strip.viewMoreUrl && strip.viewMoreUrl.path || '',
|
|
15355
|
-
queryParams: {
|
|
15356
|
-
tab: 'Learn',
|
|
15357
|
-
q: strip.viewMoreUrl && strip.viewMoreUrl.queryParams,
|
|
15358
|
-
f: {},
|
|
15359
|
-
},
|
|
15360
|
-
}
|
|
15361
|
-
: null;
|
|
15362
|
-
resolve({ results: results, viewMoreUrl: viewMoreUrl });
|
|
15363
|
-
}
|
|
15364
|
-
}), (/**
|
|
15365
|
-
* @param {?} error
|
|
15366
|
-
* @return {?}
|
|
15367
|
-
*/
|
|
15368
|
-
function (error) {
|
|
15369
|
-
_this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
15370
|
-
reject(error);
|
|
15371
|
-
}));
|
|
15372
|
-
}
|
|
15373
|
-
}))];
|
|
15374
|
-
});
|
|
15375
|
-
});
|
|
15376
|
-
};
|
|
15377
|
-
/**
|
|
15378
|
-
* @param {?} strip
|
|
15379
|
-
* @param {?} request
|
|
15380
|
-
* @param {?} apiUrl
|
|
15381
|
-
* @param {?} calculateParentStatus
|
|
15382
|
-
* @return {?}
|
|
15383
|
-
*/
|
|
15384
|
-
ContentStripWithTabsPillsComponent.prototype.getRequestMethod = /**
|
|
15385
|
-
* @param {?} strip
|
|
15386
|
-
* @param {?} request
|
|
15387
|
-
* @param {?} apiUrl
|
|
15388
|
-
* @param {?} calculateParentStatus
|
|
15389
|
-
* @return {?}
|
|
15390
|
-
*/
|
|
15391
|
-
function (strip, request, apiUrl, calculateParentStatus) {
|
|
15392
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
15393
|
-
var originalFilters;
|
|
15394
|
-
var _this = this;
|
|
15395
|
-
return __generator(this, function (_a) {
|
|
15396
|
-
originalFilters = [];
|
|
15397
|
-
return [2 /*return*/, new Promise((/**
|
|
15398
|
-
* @param {?} resolve
|
|
15399
|
-
* @param {?} reject
|
|
15400
|
-
* @return {?}
|
|
15401
|
-
*/
|
|
15402
|
-
function (resolve, reject) {
|
|
15403
|
-
if (request && request) {
|
|
15404
|
-
_this.contentSvc.getApiMethod(apiUrl).subscribe((/**
|
|
15405
|
-
* @param {?} results
|
|
15406
|
-
* @return {?}
|
|
15407
|
-
*/
|
|
15408
|
-
function (results) {
|
|
15409
|
-
/** @type {?} */
|
|
15410
|
-
var showViewMore = Boolean(results.result.data && results.result.data.orgList.length > 5 && strip.stripConfig && strip.stripConfig.postCardForSearch);
|
|
15411
|
-
/** @type {?} */
|
|
15412
|
-
var viewMoreUrl = showViewMore
|
|
15413
|
-
? {
|
|
15414
|
-
path: strip.viewMoreUrl && strip.viewMoreUrl.path || '',
|
|
15415
|
-
}
|
|
15416
|
-
: null;
|
|
15417
|
-
resolve({ results: results, viewMoreUrl: viewMoreUrl });
|
|
15418
|
-
}), (/**
|
|
15419
|
-
* @param {?} error
|
|
15420
|
-
* @return {?}
|
|
15421
|
-
*/
|
|
15422
|
-
function (error) {
|
|
15423
|
-
_this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
15424
|
-
reject(error);
|
|
15425
|
-
}));
|
|
15426
|
-
}
|
|
15427
|
-
}))];
|
|
15428
|
-
});
|
|
15429
|
-
});
|
|
15430
|
-
};
|
|
15431
|
-
/**
|
|
15432
|
-
* @param {?} filters
|
|
15433
|
-
* @return {?}
|
|
15434
|
-
*/
|
|
15435
|
-
ContentStripWithTabsPillsComponent.prototype.postMethodFilters = /**
|
|
15436
|
-
* @param {?} filters
|
|
15437
|
-
* @return {?}
|
|
15438
|
-
*/
|
|
15439
|
-
function (filters) {
|
|
15440
|
-
if (filters.organisation &&
|
|
15441
|
-
filters.organisation.indexOf('<orgID>') >= 0) {
|
|
15442
|
-
filters.organisation = this.providerId;
|
|
15443
|
-
}
|
|
15444
|
-
return filters;
|
|
15445
|
-
};
|
|
15446
|
-
/**
|
|
15447
|
-
* @param {?} apiUrl
|
|
15448
|
-
* @param {?} id
|
|
15449
|
-
* @return {?}
|
|
15450
|
-
*/
|
|
15451
|
-
ContentStripWithTabsPillsComponent.prototype.getFullUrl = /**
|
|
15452
|
-
* @param {?} apiUrl
|
|
15453
|
-
* @param {?} id
|
|
15454
|
-
* @return {?}
|
|
15455
|
-
*/
|
|
15456
|
-
function (apiUrl, id) {
|
|
15457
|
-
/** @type {?} */
|
|
15458
|
-
var formedUrl = '';
|
|
15459
|
-
if (apiUrl.indexOf('<bookmarkId>') >= 0) {
|
|
15460
|
-
formedUrl = apiUrl.replace('<bookmarkId>', this.environment.mdoChannelsBookmarkId);
|
|
15461
|
-
}
|
|
15462
|
-
else if (apiUrl.indexOf('<playlistKey>') >= 0 && apiUrl.indexOf('<orgID>') >= 0) {
|
|
15463
|
-
formedUrl = apiUrl.replace('<playlistKey>', this.providerId + id);
|
|
15464
|
-
formedUrl = formedUrl.replace('<orgID>', this.providerId);
|
|
15465
|
-
}
|
|
15466
|
-
return formedUrl;
|
|
15467
|
-
};
|
|
15468
|
-
/**
|
|
15469
|
-
* @param {?} stripData
|
|
15470
|
-
* @param {?} path
|
|
15471
|
-
* @param {?} queryParamsData
|
|
15472
|
-
* @return {?}
|
|
15473
|
-
*/
|
|
15474
|
-
ContentStripWithTabsPillsComponent.prototype.redirectViewAll = /**
|
|
15475
|
-
* @param {?} stripData
|
|
15476
|
-
* @param {?} path
|
|
15477
|
-
* @param {?} queryParamsData
|
|
15478
|
-
* @return {?}
|
|
15479
|
-
*/
|
|
15480
|
-
function (stripData, path, queryParamsData) {
|
|
15481
|
-
if (this.emitViewAll) {
|
|
15482
|
-
this.viewAllResponse.emit(stripData);
|
|
15483
|
-
}
|
|
15484
|
-
else {
|
|
15485
|
-
this.router.navigate([path], { queryParams: queryParamsData });
|
|
15486
|
-
}
|
|
15487
|
-
};
|
|
15488
|
-
/**
|
|
15489
|
-
* @param {?} strip
|
|
15490
|
-
* @param {?=} calculateParentStatus
|
|
15491
|
-
* @return {?}
|
|
15492
|
-
*/
|
|
15493
|
-
ContentStripWithTabsPillsComponent.prototype.fetchAllBookMarkData = /**
|
|
15494
|
-
* @param {?} strip
|
|
15495
|
-
* @param {?=} calculateParentStatus
|
|
15496
|
-
* @return {?}
|
|
15497
|
-
*/
|
|
15498
|
-
function (strip, calculateParentStatus) {
|
|
15499
|
-
if (calculateParentStatus === void 0) { calculateParentStatus = true; }
|
|
15500
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
15501
|
-
var originalFilters, response, content, error_4;
|
|
15502
|
-
return __generator(this, function (_a) {
|
|
15503
|
-
switch (_a.label) {
|
|
15504
|
-
case 0:
|
|
15505
|
-
if (!(strip.request && strip.request.bookmarkRead && Object.keys(strip.request.bookmarkRead).length)) return [3 /*break*/, 4];
|
|
15506
|
-
originalFilters = [];
|
|
15507
|
-
if (strip.request &&
|
|
15508
|
-
strip.request.bookmarkRead &&
|
|
15509
|
-
strip.request.bookmarkRead.bookmarkId) {
|
|
15510
|
-
strip.request.apiUrl = this.getFullUrl(strip.request.apiUrl, strip.request.bookmarkRead.bookmarkId);
|
|
15511
|
-
}
|
|
15512
|
-
_a.label = 1;
|
|
15513
|
-
case 1:
|
|
15514
|
-
_a.trys.push([1, 3, , 4]);
|
|
15515
|
-
return [4 /*yield*/, this.getRequestMethod(strip, strip.request.bookmarkRead, strip.request.apiUrl, calculateParentStatus)];
|
|
15516
|
-
case 2:
|
|
15517
|
-
response = _a.sent();
|
|
15518
|
-
content = response.results.result.data.orgList;
|
|
15519
|
-
if (response) {
|
|
15520
|
-
this.processStrip(strip, this.transformAllContentsToWidgets(content, strip), 'done', calculateParentStatus, response);
|
|
15521
|
-
}
|
|
15522
|
-
else {
|
|
15523
|
-
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
15524
|
-
this.emptyResponse.emit(true);
|
|
15525
|
-
}
|
|
15526
|
-
return [3 /*break*/, 4];
|
|
15527
|
-
case 3:
|
|
15528
|
-
error_4 = _a.sent();
|
|
15529
|
-
this.emptyResponse.emit(true);
|
|
15530
|
-
return [3 /*break*/, 4];
|
|
15531
|
-
case 4: return [2 /*return*/];
|
|
15532
|
-
}
|
|
15533
|
-
});
|
|
15534
|
-
});
|
|
15535
|
-
};
|
|
15536
|
-
/**
|
|
15537
|
-
* @private
|
|
15538
|
-
* @param {?} contents
|
|
15539
|
-
* @param {?} strip
|
|
15540
|
-
* @return {?}
|
|
15541
|
-
*/
|
|
15542
|
-
ContentStripWithTabsPillsComponent.prototype.transformAllContentsToWidgets = /**
|
|
15543
|
-
* @private
|
|
15544
|
-
* @param {?} contents
|
|
15545
|
-
* @param {?} strip
|
|
15546
|
-
* @return {?}
|
|
15547
|
-
*/
|
|
15548
|
-
function (contents, strip) {
|
|
15549
|
-
return (contents || []).map((/**
|
|
15550
|
-
* @param {?} content
|
|
15551
|
-
* @param {?} idx
|
|
15552
|
-
* @return {?}
|
|
15553
|
-
*/
|
|
15554
|
-
function (content, idx) { return (content ? {
|
|
15555
|
-
widgetType: 'cardLib',
|
|
15556
|
-
widgetSubType: 'cardContentLib',
|
|
15557
|
-
widgetHostClass: 'mb-2',
|
|
15558
|
-
widgetData: __assign({ content: content }, (content.batch && { batch: content.batch }), { cardSubType: strip.stripConfig && strip.stripConfig.cardSubType, cardCustomeClass: strip.customeClass ? strip.customeClass : '', context: { pageSection: strip.key, position: idx }, intranetMode: strip.stripConfig && strip.stripConfig.intranetMode, deletedMode: strip.stripConfig && strip.stripConfig.deletedMode, contentTags: strip.stripConfig && strip.stripConfig.contentTags }),
|
|
15559
|
-
} : {
|
|
15560
|
-
widgetType: 'card',
|
|
15561
|
-
widgetSubType: 'cardContent',
|
|
15562
|
-
widgetHostClass: 'mb-2',
|
|
15563
|
-
widgetData: {},
|
|
15564
|
-
}); }));
|
|
15565
|
-
};
|
|
15566
|
-
/**
|
|
15567
|
-
* @param {?} strip
|
|
15568
|
-
* @param {?=} calculateParentStatus
|
|
13493
|
+
* @param {?} item
|
|
15569
13494
|
* @return {?}
|
|
15570
13495
|
*/
|
|
15571
|
-
ContentStripWithTabsPillsComponent.prototype.
|
|
15572
|
-
* @param {?}
|
|
15573
|
-
* @param {
|
|
13496
|
+
ContentStripWithTabsPillsComponent.prototype.tracker = /**
|
|
13497
|
+
* @param {?} index
|
|
13498
|
+
* @param {?} item
|
|
15574
13499
|
* @return {?}
|
|
15575
13500
|
*/
|
|
15576
|
-
function (
|
|
15577
|
-
if (
|
|
15578
|
-
return
|
|
15579
|
-
var originalFilters, response, finalPlaylistData_1, programData, error_5;
|
|
15580
|
-
return __generator(this, function (_a) {
|
|
15581
|
-
switch (_a.label) {
|
|
15582
|
-
case 0:
|
|
15583
|
-
if (!(strip.request && strip.request.playlistSearch && Object.keys(strip.request.playlistSearch).length)) return [3 /*break*/, 4];
|
|
15584
|
-
originalFilters = [];
|
|
15585
|
-
if (strip.request &&
|
|
15586
|
-
strip.request.playlistSearch &&
|
|
15587
|
-
strip.request.playlistSearch.request &&
|
|
15588
|
-
strip.request.playlistSearch.request.filters) {
|
|
15589
|
-
originalFilters = strip.request.playlistSearch.request.filters;
|
|
15590
|
-
strip.request.playlistSearch.request.filters = this.postMethodFilters(strip.request.playlistSearch.request.filters);
|
|
15591
|
-
}
|
|
15592
|
-
_a.label = 1;
|
|
15593
|
-
case 1:
|
|
15594
|
-
_a.trys.push([1, 3, , 4]);
|
|
15595
|
-
return [4 /*yield*/, this.postRequestMethod(strip, strip.request.playlistSearch.request, strip.request.apiUrl, calculateParentStatus)];
|
|
15596
|
-
case 2:
|
|
15597
|
-
response = _a.sent();
|
|
15598
|
-
// console.log('calling after - response, ', response)
|
|
15599
|
-
if (response && response.results) {
|
|
15600
|
-
// console.log('calling after-- ')
|
|
15601
|
-
if (response.results.result.data && response.results.result.data.length) {
|
|
15602
|
-
finalPlaylistData_1 = [];
|
|
15603
|
-
programData = response.results.result.data;
|
|
15604
|
-
programData.forEach((/**
|
|
15605
|
-
* @param {?} prgData
|
|
15606
|
-
* @return {?}
|
|
15607
|
-
*/
|
|
15608
|
-
function (prgData) {
|
|
15609
|
-
if (prgData.children && prgData.children.length) {
|
|
15610
|
-
finalPlaylistData_1.push(prgData);
|
|
15611
|
-
}
|
|
15612
|
-
}));
|
|
15613
|
-
if (finalPlaylistData_1.length) {
|
|
15614
|
-
this.processStrip(strip, this.transformContentsToWidgets(finalPlaylistData_1, strip), 'done', calculateParentStatus, response.viewMoreUrl);
|
|
15615
|
-
}
|
|
15616
|
-
else {
|
|
15617
|
-
this.emptyResponse.emit(true);
|
|
15618
|
-
}
|
|
15619
|
-
}
|
|
15620
|
-
else {
|
|
15621
|
-
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
15622
|
-
this.emptyResponse.emit(true);
|
|
15623
|
-
}
|
|
15624
|
-
}
|
|
15625
|
-
else {
|
|
15626
|
-
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
15627
|
-
this.emptyResponse.emit(true);
|
|
15628
|
-
}
|
|
15629
|
-
return [3 /*break*/, 4];
|
|
15630
|
-
case 3:
|
|
15631
|
-
error_5 = _a.sent();
|
|
15632
|
-
this.emptyResponse.emit(true);
|
|
15633
|
-
return [3 /*break*/, 4];
|
|
15634
|
-
case 4: return [2 /*return*/];
|
|
15635
|
-
}
|
|
15636
|
-
});
|
|
15637
|
-
});
|
|
13501
|
+
function (index, item) {
|
|
13502
|
+
if (index >= 0) { }
|
|
13503
|
+
return lodash.get(item, 'widgetData.content.identifier');
|
|
15638
13504
|
};
|
|
15639
13505
|
/**
|
|
15640
|
-
* @param {?}
|
|
15641
|
-
* @param {?=} calculateParentStatus
|
|
13506
|
+
* @param {?} stripData
|
|
15642
13507
|
* @return {?}
|
|
15643
13508
|
*/
|
|
15644
|
-
ContentStripWithTabsPillsComponent.prototype.
|
|
15645
|
-
* @param {?}
|
|
15646
|
-
* @param {?=} calculateParentStatus
|
|
13509
|
+
ContentStripWithTabsPillsComponent.prototype.raiseTelemetry = /**
|
|
13510
|
+
* @param {?} stripData
|
|
15647
13511
|
* @return {?}
|
|
15648
13512
|
*/
|
|
15649
|
-
function (
|
|
15650
|
-
|
|
15651
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
15652
|
-
var originalFilters, response, content, error_6;
|
|
15653
|
-
return __generator(this, function (_a) {
|
|
15654
|
-
switch (_a.label) {
|
|
15655
|
-
case 0:
|
|
15656
|
-
if (!(strip.request && strip.request.playlistRead && Object.keys(strip.request.playlistRead).length)) return [3 /*break*/, 4];
|
|
15657
|
-
originalFilters = [];
|
|
15658
|
-
if (strip.request &&
|
|
15659
|
-
strip.request.playlistRead &&
|
|
15660
|
-
strip.request.playlistRead.type) {
|
|
15661
|
-
strip.request.apiUrl = this.getFullUrl(strip.request.apiUrl, strip.request.playlistRead.type);
|
|
15662
|
-
}
|
|
15663
|
-
_a.label = 1;
|
|
15664
|
-
case 1:
|
|
15665
|
-
_a.trys.push([1, 3, , 4]);
|
|
15666
|
-
return [4 /*yield*/, this.getRequestMethod(strip, strip.request.playlistRead, strip.request.apiUrl, calculateParentStatus)];
|
|
15667
|
-
case 2:
|
|
15668
|
-
response = _a.sent();
|
|
15669
|
-
if (response && response.results.result.content) {
|
|
15670
|
-
content = response.results.result.content;
|
|
15671
|
-
this.processStrip(strip, this.transformAllContentsToWidgets(content, strip), 'done', calculateParentStatus, response);
|
|
15672
|
-
}
|
|
15673
|
-
else {
|
|
15674
|
-
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
15675
|
-
this.emptyResponse.emit(true);
|
|
15676
|
-
}
|
|
15677
|
-
return [3 /*break*/, 4];
|
|
15678
|
-
case 3:
|
|
15679
|
-
error_6 = _a.sent();
|
|
15680
|
-
this.emptyResponse.emit(true);
|
|
15681
|
-
return [3 /*break*/, 4];
|
|
15682
|
-
case 4: return [2 /*return*/];
|
|
15683
|
-
}
|
|
15684
|
-
});
|
|
15685
|
-
});
|
|
13513
|
+
function (stripData) {
|
|
13514
|
+
this.telemtryResponse.emit(stripData);
|
|
15686
13515
|
};
|
|
15687
13516
|
/**
|
|
15688
|
-
* @param {?}
|
|
15689
|
-
* @param {
|
|
13517
|
+
* @param {?} stripData
|
|
13518
|
+
* @param {?} path
|
|
13519
|
+
* @param {?} queryParamsData
|
|
15690
13520
|
* @return {?}
|
|
15691
13521
|
*/
|
|
15692
|
-
ContentStripWithTabsPillsComponent.prototype.
|
|
15693
|
-
* @param {?}
|
|
15694
|
-
* @param {
|
|
13522
|
+
ContentStripWithTabsPillsComponent.prototype.redirectViewAll = /**
|
|
13523
|
+
* @param {?} stripData
|
|
13524
|
+
* @param {?} path
|
|
13525
|
+
* @param {?} queryParamsData
|
|
15695
13526
|
* @return {?}
|
|
15696
13527
|
*/
|
|
15697
|
-
function (
|
|
15698
|
-
if (
|
|
15699
|
-
|
|
15700
|
-
|
|
15701
|
-
|
|
15702
|
-
|
|
15703
|
-
|
|
15704
|
-
if (!(strip.request && strip.request.ciosContent && Object.keys(strip.request.ciosContent).length)) return [3 /*break*/, 4];
|
|
15705
|
-
originalFilters = [];
|
|
15706
|
-
if (strip.request &&
|
|
15707
|
-
strip.request.ciosContent &&
|
|
15708
|
-
strip.request.ciosContent.filterCriteriaMap) {
|
|
15709
|
-
originalFilters = strip.request.ciosContent.filterCriteriaMap;
|
|
15710
|
-
strip.request.ciosContent.filterCriteriaMap = this.postMethodFilters(strip.request.ciosContent.filterCriteriaMap);
|
|
15711
|
-
}
|
|
15712
|
-
_a.label = 1;
|
|
15713
|
-
case 1:
|
|
15714
|
-
_a.trys.push([1, 3, , 4]);
|
|
15715
|
-
return [4 /*yield*/, this.postRequestMethod(strip, strip.request.ciosContent, strip.request.apiUrl, calculateParentStatus)];
|
|
15716
|
-
case 2:
|
|
15717
|
-
response = _a.sent();
|
|
15718
|
-
// console.log('calling after - response, ', response)
|
|
15719
|
-
if (response && response.results) {
|
|
15720
|
-
// console.log('calling after-- ')
|
|
15721
|
-
if (response.results.data && response.results.data.length) {
|
|
15722
|
-
extContentData = response.results.data;
|
|
15723
|
-
if (extContentData.length) {
|
|
15724
|
-
this.processStrip(strip, this.transformContentsToWidgets(extContentData, strip), 'done', calculateParentStatus, response.viewMoreUrl);
|
|
15725
|
-
}
|
|
15726
|
-
else {
|
|
15727
|
-
this.emptyResponse.emit(true);
|
|
15728
|
-
}
|
|
15729
|
-
}
|
|
15730
|
-
else {
|
|
15731
|
-
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
15732
|
-
this.emptyResponse.emit(true);
|
|
15733
|
-
}
|
|
15734
|
-
}
|
|
15735
|
-
else {
|
|
15736
|
-
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
15737
|
-
this.emptyResponse.emit(true);
|
|
15738
|
-
}
|
|
15739
|
-
return [3 /*break*/, 4];
|
|
15740
|
-
case 3:
|
|
15741
|
-
error_7 = _a.sent();
|
|
15742
|
-
this.emptyResponse.emit(true);
|
|
15743
|
-
return [3 /*break*/, 4];
|
|
15744
|
-
case 4: return [2 /*return*/];
|
|
15745
|
-
}
|
|
15746
|
-
});
|
|
15747
|
-
});
|
|
13528
|
+
function (stripData, path, queryParamsData) {
|
|
13529
|
+
if (this.emitViewAll) {
|
|
13530
|
+
this.viewAllResponse.emit(stripData);
|
|
13531
|
+
}
|
|
13532
|
+
else {
|
|
13533
|
+
this.router.navigate([path], { queryParams: queryParamsData });
|
|
13534
|
+
}
|
|
15748
13535
|
};
|
|
15749
13536
|
// new code writting from here====new====
|
|
15750
13537
|
// new code writting from here====new====
|
|
@@ -15796,8 +13583,7 @@
|
|
|
15796
13583
|
function (strip, calculateParentStatus) {
|
|
15797
13584
|
if (calculateParentStatus === void 0) { calculateParentStatus = true; }
|
|
15798
13585
|
return __awaiter(this, void 0, void 0, function () {
|
|
15799
|
-
var originalFilters, firstTab, allTabs, currentTabFromMap,
|
|
15800
|
-
var _this = this;
|
|
13586
|
+
var originalFilters, firstTab, allTabs, currentTabFromMap, response, error_1;
|
|
15801
13587
|
return __generator(this, function (_a) {
|
|
15802
13588
|
switch (_a.label) {
|
|
15803
13589
|
case 0:
|
|
@@ -15834,26 +13620,15 @@
|
|
|
15834
13620
|
_a.trys.push([1, 3, , 4]);
|
|
15835
13621
|
return [4 /*yield*/, this.searchV6Request(strip, strip.request, calculateParentStatus)];
|
|
15836
13622
|
case 2:
|
|
15837
|
-
|
|
13623
|
+
response = _a.sent();
|
|
15838
13624
|
// console.log('calling after - response, ', response)
|
|
15839
|
-
if (
|
|
13625
|
+
if (response && response.results) {
|
|
15840
13626
|
// console.log('calling after-- ')
|
|
15841
|
-
if (
|
|
15842
|
-
|
|
15843
|
-
this.enrollInterval = setInterval((/**
|
|
15844
|
-
* @return {?}
|
|
15845
|
-
*/
|
|
15846
|
-
function () {
|
|
15847
|
-
_this.checkInvitOnlyAssessments(response_1.results.result.content, strip, calculateParentStatus, response_1.viewMoreUrl);
|
|
15848
|
-
// tslint:disable-next-line
|
|
15849
|
-
}), 1000);
|
|
15850
|
-
}
|
|
15851
|
-
else {
|
|
15852
|
-
this.processStrip(strip, this.transformContentsToWidgets(response_1.results.result.content, strip), 'done', calculateParentStatus, response_1.viewMoreUrl);
|
|
15853
|
-
}
|
|
13627
|
+
if (response.results.result.content) {
|
|
13628
|
+
this.processStrip(strip, this.transformContentsToWidgets(response.results.result.content, strip), 'done', calculateParentStatus, response.viewMoreUrl);
|
|
15854
13629
|
}
|
|
15855
|
-
else if (
|
|
15856
|
-
this.processStrip(strip, this.transformEventsToWidgets(
|
|
13630
|
+
else if (response.results.result.Event) {
|
|
13631
|
+
this.processStrip(strip, this.transformEventsToWidgets(response.results.result.Event, strip), 'done', calculateParentStatus, response.viewMoreUrl);
|
|
15857
13632
|
}
|
|
15858
13633
|
else {
|
|
15859
13634
|
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
@@ -15864,7 +13639,7 @@
|
|
|
15864
13639
|
}
|
|
15865
13640
|
return [3 /*break*/, 4];
|
|
15866
13641
|
case 3:
|
|
15867
|
-
|
|
13642
|
+
error_1 = _a.sent();
|
|
15868
13643
|
return [3 /*break*/, 4];
|
|
15869
13644
|
case 4: return [2 /*return*/];
|
|
15870
13645
|
}
|
|
@@ -15889,7 +13664,7 @@
|
|
|
15889
13664
|
*/
|
|
15890
13665
|
function (strip, tabIndex, pillIndex, currentTab, calculateParentStatus) {
|
|
15891
13666
|
return __awaiter(this, void 0, void 0, function () {
|
|
15892
|
-
var response, tabResults, content, widgets, allTabs, allPills, allTabs, allPills,
|
|
13667
|
+
var response, tabResults, content, widgets, allTabs, allPills, allTabs, allPills, error_2;
|
|
15893
13668
|
return __generator(this, function (_a) {
|
|
15894
13669
|
switch (_a.label) {
|
|
15895
13670
|
case 0:
|
|
@@ -15933,7 +13708,7 @@
|
|
|
15933
13708
|
}
|
|
15934
13709
|
return [3 /*break*/, 3];
|
|
15935
13710
|
case 2:
|
|
15936
|
-
|
|
13711
|
+
error_2 = _a.sent();
|
|
15937
13712
|
// Handle errors
|
|
15938
13713
|
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
15939
13714
|
return [3 /*break*/, 3];
|
|
@@ -15960,7 +13735,7 @@
|
|
|
15960
13735
|
*/
|
|
15961
13736
|
function (strip, tabIndex, pillIndex, currentTab, calculateParentStatus) {
|
|
15962
13737
|
return __awaiter(this, void 0, void 0, function () {
|
|
15963
|
-
var response, widgets, tabResults, allTabs, allPills,
|
|
13738
|
+
var response, widgets, tabResults, allTabs, allPills, error_3;
|
|
15964
13739
|
return __generator(this, function (_a) {
|
|
15965
13740
|
switch (_a.label) {
|
|
15966
13741
|
case 0:
|
|
@@ -15991,7 +13766,7 @@
|
|
|
15991
13766
|
}
|
|
15992
13767
|
return [3 /*break*/, 3];
|
|
15993
13768
|
case 2:
|
|
15994
|
-
|
|
13769
|
+
error_3 = _a.sent();
|
|
15995
13770
|
return [3 /*break*/, 3];
|
|
15996
13771
|
case 3: return [2 /*return*/];
|
|
15997
13772
|
}
|
|
@@ -16216,12 +13991,17 @@
|
|
|
16216
13991
|
}
|
|
16217
13992
|
else {
|
|
16218
13993
|
this.getTabDataByfilter(currentStrip, currentTabFromMap, true);
|
|
13994
|
+
if (stripMap && stripMap.tabs && stripMap.tabs[tabIndex]) {
|
|
13995
|
+
stripMap.tabs[tabIndex].pillsData[pillIndex].fetchTabStatus = 'inprogress';
|
|
13996
|
+
stripMap.tabs[tabIndex].pillsData[pillIndex].tabLoading = false;
|
|
13997
|
+
stripMap.showOnLoader = true;
|
|
13998
|
+
}
|
|
16219
13999
|
setTimeout((/**
|
|
16220
14000
|
* @return {?}
|
|
16221
14001
|
*/
|
|
16222
14002
|
function () {
|
|
16223
14003
|
if (stripMap && stripMap.tabs && stripMap.tabs[tabIndex]) {
|
|
16224
|
-
stripMap.tabs[tabIndex].pillsData[pillIndex].fetchTabStatus = '
|
|
14004
|
+
stripMap.tabs[tabIndex].pillsData[pillIndex].fetchTabStatus = 'done';
|
|
16225
14005
|
stripMap.tabs[tabIndex].pillsData[pillIndex].tabLoading = false;
|
|
16226
14006
|
stripMap.showOnLoader = false;
|
|
16227
14007
|
_this.resetSelectedPill(stripMap.tabs[tabIndex].pillsData);
|
|
@@ -16308,22 +14088,13 @@
|
|
|
16308
14088
|
*/
|
|
16309
14089
|
function (tabdata, tabIndex) {
|
|
16310
14090
|
if (tabdata.pillsData && tabdata.pillsData.length) {
|
|
16311
|
-
// tabdata.pillsData.forEach((ele: any, index: any) => {
|
|
16312
|
-
// if(ele.selected) {
|
|
16313
|
-
// console.log(ele,'---------')
|
|
16314
|
-
// return index
|
|
16315
|
-
// }
|
|
16316
|
-
// // })
|
|
16317
|
-
// console.log(tabdata,'==========123')
|
|
16318
14091
|
/** @type {?} */
|
|
16319
14092
|
var index = tabdata.pillsData.findIndex((/**
|
|
16320
14093
|
* @param {?} pill
|
|
16321
14094
|
* @return {?}
|
|
16322
14095
|
*/
|
|
16323
14096
|
function (pill) {
|
|
16324
|
-
// if(pill.selected){
|
|
16325
14097
|
return pill.selected;
|
|
16326
|
-
// }
|
|
16327
14098
|
}));
|
|
16328
14099
|
return index;
|
|
16329
14100
|
}
|
|
@@ -16346,7 +14117,7 @@
|
|
|
16346
14117
|
function (strip, calculateParentStatus) {
|
|
16347
14118
|
if (calculateParentStatus === void 0) { calculateParentStatus = true; }
|
|
16348
14119
|
return __awaiter(this, void 0, void 0, function () {
|
|
16349
|
-
var courses, tabResults, response;
|
|
14120
|
+
var courses, tabResults, response, countOfWidget_1;
|
|
16350
14121
|
return __generator(this, function (_a) {
|
|
16351
14122
|
switch (_a.label) {
|
|
16352
14123
|
case 0:
|
|
@@ -16360,6 +14131,29 @@
|
|
|
16360
14131
|
courses = response;
|
|
16361
14132
|
if (!(strip.tabs && strip.tabs.length)) return [3 /*break*/, 3];
|
|
16362
14133
|
tabResults = this.splitCbpTabsData(courses, strip);
|
|
14134
|
+
countOfWidget_1 = true;
|
|
14135
|
+
if (strip && strip.tabs && strip.tabs.length) {
|
|
14136
|
+
strip.tabs.forEach((/**
|
|
14137
|
+
* @param {?} tab
|
|
14138
|
+
* @return {?}
|
|
14139
|
+
*/
|
|
14140
|
+
function (tab) {
|
|
14141
|
+
if (tab.pillsData && tab.pillsData.length) {
|
|
14142
|
+
tab.pillsData.forEach((/**
|
|
14143
|
+
* @param {?} pill
|
|
14144
|
+
* @return {?}
|
|
14145
|
+
*/
|
|
14146
|
+
function (pill) {
|
|
14147
|
+
if (pill && pill.widgets && pill.widgets.length) {
|
|
14148
|
+
if (countOfWidget_1) {
|
|
14149
|
+
pill.selected = true;
|
|
14150
|
+
countOfWidget_1 = false;
|
|
14151
|
+
}
|
|
14152
|
+
}
|
|
14153
|
+
}));
|
|
14154
|
+
}
|
|
14155
|
+
}));
|
|
14156
|
+
}
|
|
16363
14157
|
return [4 /*yield*/, this.processStrip(strip, this.transformContentsToWidgets(courses, strip), 'done', calculateParentStatus, '', tabResults)];
|
|
16364
14158
|
case 2:
|
|
16365
14159
|
_a.sent();
|
|
@@ -16368,32 +14162,6 @@
|
|
|
16368
14162
|
this.processStrip(strip, this.transformContentsToWidgets(courses, strip), 'done', calculateParentStatus, 'viewMoreUrl');
|
|
16369
14163
|
_a.label = 4;
|
|
16370
14164
|
case 4:
|
|
16371
|
-
// this.userSvc.fetchCbpPlanList().subscribe( async (res: any) => {
|
|
16372
|
-
// if (res) {
|
|
16373
|
-
// console.log(res,'===============================>')
|
|
16374
|
-
// courses = res
|
|
16375
|
-
// if (strip.tabs && strip.tabs.length) {
|
|
16376
|
-
// tabResults = this.splitCbpTabsData(courses, strip)
|
|
16377
|
-
// await this.processStrip(
|
|
16378
|
-
// strip,
|
|
16379
|
-
// this.transformContentsToWidgets(courses, strip),
|
|
16380
|
-
// 'done',
|
|
16381
|
-
// calculateParentStatus,
|
|
16382
|
-
// '',
|
|
16383
|
-
// tabResults
|
|
16384
|
-
// )
|
|
16385
|
-
// } else {
|
|
16386
|
-
// this.processStrip(
|
|
16387
|
-
// strip,
|
|
16388
|
-
// this.transformContentsToWidgets(courses, strip),
|
|
16389
|
-
// 'done',
|
|
16390
|
-
// calculateParentStatus,
|
|
16391
|
-
// 'viewMoreUrl',
|
|
16392
|
-
// )
|
|
16393
|
-
// }
|
|
16394
|
-
// }
|
|
16395
|
-
// }, (_err: any) => {
|
|
16396
|
-
// })
|
|
16397
14165
|
clearInterval(this.enrollInterval);
|
|
16398
14166
|
_a.label = 5;
|
|
16399
14167
|
case 5: return [2 /*return*/];
|
|
@@ -16417,13 +14185,19 @@
|
|
|
16417
14185
|
/** @type {?} */
|
|
16418
14186
|
var splitData = this.getTabsList(contentNew, strip);
|
|
16419
14187
|
if (strip.tabs && strip.tabs.length) {
|
|
16420
|
-
var
|
|
14188
|
+
var _loop_1 = function (i) {
|
|
16421
14189
|
if (strip.tabs[i].value === "myIgotPlans") {
|
|
14190
|
+
/** @type {?} */
|
|
14191
|
+
var checkWidgetAndActivePill = true;
|
|
16422
14192
|
if (strip.tabs[i].pillsData && strip.tabs[i].pillsData.length) {
|
|
16423
|
-
var
|
|
16424
|
-
if
|
|
16425
|
-
|
|
16426
|
-
|
|
14193
|
+
var _loop_2 = function (j) {
|
|
14194
|
+
// if(j === 0 ){
|
|
14195
|
+
// if(strip.tabs[i].pillsData[j].widgets && strip.tabs[i].pillsData[j].widgets.length ) {
|
|
14196
|
+
// strip.tabs[i].pillsData[j].selected = true
|
|
14197
|
+
// checkWidgetAndActivePill = false
|
|
14198
|
+
// }
|
|
14199
|
+
// strip.tabs[i].pillsData[j].selected = true
|
|
14200
|
+
// }
|
|
16427
14201
|
if (strip.tabs[i].pillsData[j]) {
|
|
16428
14202
|
tabResults.push(__assign({}, strip.tabs[i].pillsData[j], { fetchTabStatus: 'done' }, (splitData.find((/**
|
|
16429
14203
|
* @param {?} itmInner
|
|
@@ -16438,14 +14212,14 @@
|
|
|
16438
14212
|
}
|
|
16439
14213
|
};
|
|
16440
14214
|
for (var j = 0; j < strip.tabs[i].pillsData.length; j += 1) {
|
|
16441
|
-
|
|
14215
|
+
_loop_2(j);
|
|
16442
14216
|
}
|
|
16443
14217
|
strip.tabs[i].pillsData = tabResults;
|
|
16444
14218
|
}
|
|
16445
14219
|
}
|
|
16446
14220
|
};
|
|
16447
14221
|
for (var i = 0; i < strip.tabs.length; i += 1) {
|
|
16448
|
-
|
|
14222
|
+
_loop_1(i);
|
|
16449
14223
|
}
|
|
16450
14224
|
}
|
|
16451
14225
|
return strip.tabs;
|
|
@@ -16559,7 +14333,6 @@
|
|
|
16559
14333
|
function (data) {
|
|
16560
14334
|
return data.contentStatus < 2;
|
|
16561
14335
|
}));
|
|
16562
|
-
// this.getSelectedIndex(1)
|
|
16563
14336
|
return [
|
|
16564
14337
|
{ value: 'all', widgets: this.transformContentsToWidgets(all, strip) },
|
|
16565
14338
|
{ value: 'upcoming', widgets: this.transformContentsToWidgets(upcoming, strip) },
|
|
@@ -16589,7 +14362,7 @@
|
|
|
16589
14362
|
ContentStripWithTabsPillsComponent.decorators = [
|
|
16590
14363
|
{ type: core.Component, args: [{
|
|
16591
14364
|
selector: 'sb-uic-content-strip-with-tabs-pills',
|
|
16592
|
-
template: "<ng-container *ngIf=\"!contentAvailable; else otherTemplate\"></ng-container>\n<ng-template #otherTemplate>\n <!-- <div *ngIf=\"showParentLoader\" class=\"text-center my-2\">\n <mat-spinner class=\"inline-block\"></mat-spinner>\n </div> -->\n <ng-container *ngIf=\"showParentError\" [sbUiResolverWidget]=\"widgetData.errorWidget\"></ng-container>\n <ng-container *ngIf=\"showParentNoData\" [sbUiResolverWidget]=\"widgetData.noDataWidget\"></ng-container>\n <ng-container *ngFor=\"let key of stripsKeyOrder; let i = index; trackBy: identify\">\n <ng-container *ngIf=\"isStripShowing(stripsResultDataMap[key])\">\n <a name=\"{{stripsResultDataMap[key]?.stripTitle}}\" [class]=\"key\">\n <div *ngIf=\"stripsResultDataMap && (getLength(stripsResultDataMap[key]) ||\n stripsResultDataMap[key]?.showOnNoData ||\n stripsResultDataMap[key]?.showOnLoader ||\n stripsResultDataMap[key]?.showOnError)\n \" [ngClass]=\"\n !widgetData?.isChannelStrip ? 'xs:px-8 sx:px-10ss' : i > 0 ? 'mt-12' : ''\n \" [id]=\"key\" [ngClass]=\"!widgetData?.isChannelStrip ? margin-bottom-custom : margin-bottom-xs\">\n <div [ngClass]=\"{ pad: stripsResultDataMap[key]?.stripBackground }\"\n [ngStyle]=\"{ 'background-color': stripsResultDataMap[key]?.stripBackground }\">\n <div class=\"flex flex-col pl-4 pr-4 md:pr-0 md:pl-0 \" [ngClass]=\"\n !widgetData?.isChannelStrip\n ? ''\n : stripsResultDataMap[key]?.stripTitle\n ? 'mb-8'\n : ''\n \">\n <div class=\"flex flex-1 items-center\">\n <p class=\"mat-subheading-1 margin-remove inline-block \" *ngIf=\"stripsResultDataMap[key]?.stripTitle\">\n <span class=\"capitalize\" *ngIf=\"stripsResultDataMap[key]?.disableTranslate\">\n {{stripsResultDataMap[key]?.stripTitle}}\n </span>\n <span *ngIf=\"!stripsResultDataMap[key]?.disableTranslate\">\n {{ translateLabels(stripsResultDataMap[key]?.stripTitle, 'home') }}\n </span>\n </p>\n\n <button *ngIf=\"stripsResultDataMap[key]?.stripInfo?.icon\" type=\"button\" mat-icon-button\n (click)=\"toggleInfo(stripsResultDataMap[key])\" i18n-matTooltip matTooltip=\"info\"\n class=\"margin-left-xs\">\n <mat-icon>{{ stripsResultDataMap[key]?.stripInfo?.icon.icon }}</mat-icon>\n </button>\n <a *ngIf=\"stripsResultDataMap[key]?.stripTitleLink?.link\"\n [routerLink]=\"stripsResultDataMap[key]?.stripTitleLink?.link\"\n [queryParams]=\"stripsResultDataMap[key]?.stripTitleLink?.link?.queryParams\">\n <mat-icon class=\"ws-mat-primary-primary-text ws-mat-default-text\" [color]=\"'accent'\">{{\n stripsResultDataMap[key]?.stripTitleLink?.icon }}</mat-icon>\n </a>\n <span class=\"spacer\"></span>\n <!-- viewAll start-->\n <!-- <div *ngIf=\"checkCondition(widgetData , stripsResultDataMap[key])\"\n class=\"ml-4 pl-2 view-more ws-mat-default-text\">\n <a class=\"flex ws-mat-default-text items-center justify-center mat-body-1 cursor-pointer\" \n (click)=\"raiseTelemetry(stripsResultDataMap[key]);redirectViewAll(stripsResultDataMap[key], stripsResultDataMap[key]?.viewMoreUrl?.path, stripsResultDataMap[key]?.viewMoreUrl?.queryParams )\">\n <span i18n class=\"ws-mat-default-text\">{{translateLabels(widgetData.strips[0].viewMoreUrl.viewMoreText,'home') || 'See all'}}</span>\n <mat-icon class=\"ws-mat-default-text mat-icon notranslate material-icons mat-icon-no-color\" color=\"accent\">navigate_next</mat-icon>\n </a>\n </div> -->\n <!-- viewAll end-->\n </div>\n <button mat-icon-button (click)=\"setHiddenForStrip(key)\" *ngIf=\"stripsResultDataMap[key]?.canHideStrip\">\n <mat-icon>close</mat-icon>\n </button>\n <mat-icon class=\"cursor-pointer\" *ngIf=\"stripsResultDataMap[key]?.mode === 'accordion' && isMobile\"\n (click)=\"showAccordionData = !showAccordionData\">{{ showAccordionData ? 'expand_less' : 'expand_more' }}\n </mat-icon>\n </div>\n\n <div class=\"mb-4\" *ngIf=\"checkVisible(stripsResultDataMap[key])\">\n <ng-container [sbUiResolverWidget]=\"getdata(stripsResultDataMap[key])\">\n </ng-container>\n </div>\n <ng-container *ngIf=\"stripsResultDataMap[key]?.showOnNoData\"\n [sbUiResolverWidget]=\"stripsResultDataMap[key]?.noDataWidget\"></ng-container>\n <ng-container *ngIf=\"stripsResultDataMap[key]?.showOnError\"\n [sbUiResolverWidget]=\"stripsResultDataMap[key]?.errorWidget\"></ng-container>\n <!-- IF no errors then proceed to show tabs or non tabs strip -->\n <ng-container *ngIf=\"!stripsResultDataMap[key]?.showOnNoData && !stripsResultDataMap[key]?.showOnError\">\n <ng-container *ngIf=\"stripsResultDataMap[key].tabs && stripsResultDataMap[key].tabs.length\">\n <mat-tab-group animationDuration=\"0ms\" [selectedIndex]=\"getSelectedIndex(stripsResultDataMap[key], key)\"\n class=\"mat-tab-labels w-full strips-tabgroup\" dynamicHeight\n (selectedTabChange)=\"tabClicked($event, 0, stripsResultDataMap[key], key)\">\n <mat-tab label=\"{{tab?.label}}\" *ngFor=\"let tab of stripsResultDataMap[key].tabs; let last = last;let tabIndex = index\">\n <ng-template mat-tab-label>\n <span>{{ translateLabels(tab?.label, 'home') }} </span>\n <span *ngIf=\"tab?.showTabDataCount && tab?.widgets?.length\">({{tab?.widgets?.length}})</span>\n </ng-template>\n\n <div class=\"wfull\" *ngIf=\"tab?.pillsData && tab?.pillsData?.length\">\n <div class=\"flex justify-between\">\n <div>\n <ng-container >\n <mat-chip-list class=\"content-pill\" aria-label=\"Fish selection\">\n <ng-container *ngFor=\"let pill of tab?.pillsData;let p = index\">\n <mat-chip [selected]=\"pill?.selected\" (click)=\"pillClicked($event, stripsResultDataMap[key], key, p, tabIndex)\">\n <span class=\"pill-name\">{{pill?.label}}</span></mat-chip>\n </ng-container>\n </mat-chip-list>\n </ng-container>\n </div>\n <!-- viewAll start-->\n <!-- <div *ngIf=\"checkCondition(widgetData , stripsResultDataMap[key])\"\n class=\"ml-4 pl-2 view-more ws-mat-default-text\">\n <a class=\"flex ws-mat-default-text items-center justify-center mat-body-1 cursor-pointer\" \n (click)=\"raiseTelemetry(stripsResultDataMap[key]);redirectViewAll(stripsResultDataMap[key], stripsResultDataMap[key]?.viewMoreUrl?.path, stripsResultDataMap[key]?.viewMoreUrl?.queryParams )\">\n <span i18n class=\"ws-mat-default-text\">{{translateLabels(widgetData.strips[0].viewMoreUrl.viewMoreText,'home') || 'See all'}}</span>\n <mat-icon class=\"ws-mat-default-text mat-icon notranslate material-icons mat-icon-no-color\" color=\"accent\">navigate_next</mat-icon>\n </a>\n </div> -->\n <!-- viewAll end-->\n </div>\n <div *ngIf=\"stripsResultDataMap && stripsResultDataMap[key]?.showOnLoader ||\n !tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.fetchTabStatus\"\n class=\"text-center my-2\">\n <sb-uic-horizontal-scroller-v2 [sliderConfig]=\"stripsResultDataMap[key]?.sliderConfig\" [id]=\"key+'-scroller'\"\n [loadStatus]=\"'fetching'\" [stripConfig]=\"stripsResultDataMap[key]?.stripConfig\">\n <ng-container *ngFor=\"let widget of stripsResultDataMap[key]?.loaderWidgets; trackBy: tracker\">\n <ng-container [sbUiResolverWidget]=\"widget\"></ng-container>\n </ng-container>\n </sb-uic-horizontal-scroller-v2>\n </div>\n <ng-container *ngIf=\"tab?.pillsData && tab?.pillsData.length && tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]\">\n <div *ngIf=\"((tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.fetchTabStatus && tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.fetchTabStatus === 'done') &&\n (!tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.widgets || !tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.widgets?.length))\">\n <ng-container *ngIf=\"tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.value === 'inprogress'; else msgTemp\">\n <div class=\"w-full flex flex-col items-center justify-center\">\n <img alt=\"\" class=\"mt-4 mb-4\" src=\"assets/icons/home/nodataDefault.svg\">\n <div class=\"mat-subheading-1 text-center info-content\">{{ 'contentstripmultiple.getReadyForLearningAdventure' | translate }} -\n <a class=\"click-here\" [routerLink]=\"'/page/learn'\">{{ 'contentstripmultiple.clickHere' | translate }}</a> {{ 'contentstripmultiple.toEnrollNextCourse' | translate }}</div>\n </div>\n </ng-container>\n <ng-template #msgTemp>\n <div class=\"w-full flex flex-col items-center justify-center\">\n <img alt=\"\" class=\"mt-4 mb-4\" src=\"assets/icons/home/nodataDefault.png\">\n <div class=\"mat-subheading-1 text-center\">{{ translateLabels(tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.nodataMsg, 'home') }}</div>\n </div>\n </ng-template>\n </div>\n </ng-container>\n <ng-container *ngIf=\"(tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.fetchTabStatus === 'done' || tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.widgets?.length)\">\n <ng-container *ngIf=\"!tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.tabLoading\">\n <sb-uic-horizontal-scroller-v2 [id]=\"key+'-scroller'\" [sliderConfig]=\"stripsResultDataMap[key]?.sliderConfig\" [widgetsLength]=\"tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.widgets?.length\"\n *ngIf=\"getContineuLearningLenth(stripsResultDataMap[key]) && showAccordion(key)\"\n [loadStatus]=\"'done'\" [defaultMaxWidgets]=\"tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.maxWidgets ||\n stripsResultDataMap[key]?.sliderConfig?.maxWidgets || defaultMaxWidgets\" [stripConfig]=\"stripsResultDataMap[key]?.stripConfig\">\n <ng-container *ngFor=\"let widget of tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.widgets| slice:0:(tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.maxWidgets ||\n stripsResultDataMap[key]?.sliderConfig?.maxWidgets || defaultMaxWidgets); trackBy: tracker\">\n <ng-container [sbUiResolverWidget]=\"widget\"></ng-container>\n </ng-container>\n </sb-uic-horizontal-scroller-v2>\n </ng-container>\n </ng-container>\n </div>\n </mat-tab>\n </mat-tab-group>\n </ng-container>\n </ng-container>\n </div>\n </div>\n </a>\n\n </ng-container>\n </ng-container>\n</ng-template>",
|
|
14365
|
+
template: "<ng-container *ngIf=\"!contentAvailable; else otherTemplate\"></ng-container>\n<ng-template #otherTemplate>\n <!-- <div *ngIf=\"showParentLoader\" class=\"text-center my-2\">\n <mat-spinner class=\"inline-block\"></mat-spinner>\n </div> -->\n <ng-container *ngIf=\"showParentError\" [sbUiResolverWidget]=\"widgetData.errorWidget\"></ng-container>\n <ng-container *ngIf=\"showParentNoData\" [sbUiResolverWidget]=\"widgetData.noDataWidget\"></ng-container>\n <ng-container *ngFor=\"let key of stripsKeyOrder; let i = index; trackBy: identify\">\n <ng-container *ngIf=\"isStripShowing(stripsResultDataMap[key])\">\n <a name=\"{{stripsResultDataMap[key]?.stripTitle}}\" [class]=\"key\">\n <div *ngIf=\"stripsResultDataMap && (getLength(stripsResultDataMap[key]) ||\n stripsResultDataMap[key]?.showOnNoData ||\n stripsResultDataMap[key]?.showOnLoader ||\n stripsResultDataMap[key]?.showOnError)\n \" [ngClass]=\"\n !widgetData?.isChannelStrip ? 'xs:px-8 sx:px-10ss' : i > 0 ? 'mt-12' : ''\n \" [id]=\"key\" [ngClass]=\"!widgetData?.isChannelStrip ? margin-bottom-custom : margin-bottom-xs\">\n <div [ngClass]=\"{ pad: stripsResultDataMap[key]?.stripBackground }\"\n [ngStyle]=\"{ 'background-color': stripsResultDataMap[key]?.stripBackground }\">\n <div class=\"flex flex-col pl-4 pr-4 md:pr-0 md:pl-0 \" [ngClass]=\"\n !widgetData?.isChannelStrip\n ? ''\n : stripsResultDataMap[key]?.stripTitle\n ? 'mb-8'\n : ''\n \">\n <div class=\"flex flex-1 items-center\">\n <p class=\"mat-subheading-1 margin-remove inline-block \" *ngIf=\"stripsResultDataMap[key]?.stripTitle\">\n <span class=\"capitalize\" *ngIf=\"stripsResultDataMap[key]?.disableTranslate\">\n {{stripsResultDataMap[key]?.stripTitle}}\n </span>\n <span *ngIf=\"!stripsResultDataMap[key]?.disableTranslate\">\n {{ translateLabels(stripsResultDataMap[key]?.stripTitle, 'home') }}\n </span>\n </p>\n\n <button *ngIf=\"stripsResultDataMap[key]?.stripInfo?.icon\" type=\"button\" mat-icon-button\n (click)=\"toggleInfo(stripsResultDataMap[key])\" i18n-matTooltip matTooltip=\"info\"\n class=\"margin-left-xs\">\n <mat-icon>{{ stripsResultDataMap[key]?.stripInfo?.icon.icon }}</mat-icon>\n </button>\n <a *ngIf=\"stripsResultDataMap[key]?.stripTitleLink?.link\"\n [routerLink]=\"stripsResultDataMap[key]?.stripTitleLink?.link\"\n [queryParams]=\"stripsResultDataMap[key]?.stripTitleLink?.link?.queryParams\">\n <mat-icon class=\"ws-mat-primary-primary-text ws-mat-default-text\" [color]=\"'accent'\">{{\n stripsResultDataMap[key]?.stripTitleLink?.icon }}</mat-icon>\n </a>\n <span class=\"spacer\"></span>\n <!-- viewAll start-->\n <!-- <div *ngIf=\"checkCondition(widgetData , stripsResultDataMap[key])\"\n class=\"ml-4 pl-2 view-more ws-mat-default-text\">\n <a class=\"flex ws-mat-default-text items-center justify-center mat-body-1 cursor-pointer\" \n (click)=\"raiseTelemetry(stripsResultDataMap[key]);redirectViewAll(stripsResultDataMap[key], stripsResultDataMap[key]?.viewMoreUrl?.path, stripsResultDataMap[key]?.viewMoreUrl?.queryParams )\">\n <span i18n class=\"ws-mat-default-text\">{{translateLabels(widgetData.strips[0].viewMoreUrl.viewMoreText,'home') || 'See all'}}</span>\n <mat-icon class=\"ws-mat-default-text mat-icon notranslate material-icons mat-icon-no-color\" color=\"accent\">navigate_next</mat-icon>\n </a>\n </div> -->\n <!-- viewAll end-->\n </div>\n <button mat-icon-button (click)=\"setHiddenForStrip(key)\" *ngIf=\"stripsResultDataMap[key]?.canHideStrip\">\n <mat-icon>close</mat-icon>\n </button>\n <mat-icon class=\"cursor-pointer\" *ngIf=\"stripsResultDataMap[key]?.mode === 'accordion' && isMobile\"\n (click)=\"showAccordionData = !showAccordionData\">{{ showAccordionData ? 'expand_less' : 'expand_more' }}\n </mat-icon>\n </div>\n\n <div class=\"mb-4\" *ngIf=\"checkVisible(stripsResultDataMap[key])\">\n <ng-container [sbUiResolverWidget]=\"getdata(stripsResultDataMap[key])\">\n </ng-container>\n </div>\n <ng-container *ngIf=\"stripsResultDataMap[key]?.showOnNoData\"\n [sbUiResolverWidget]=\"stripsResultDataMap[key]?.noDataWidget\"></ng-container>\n <ng-container *ngIf=\"stripsResultDataMap[key]?.showOnError\"\n [sbUiResolverWidget]=\"stripsResultDataMap[key]?.errorWidget\"></ng-container>\n <!-- IF no errors then proceed to show tabs or non tabs strip -->\n <ng-container *ngIf=\"!stripsResultDataMap[key]?.showOnNoData && !stripsResultDataMap[key]?.showOnError\">\n <ng-container *ngIf=\"stripsResultDataMap[key].tabs && stripsResultDataMap[key].tabs.length\">\n <mat-tab-group animationDuration=\"0ms\" [selectedIndex]=\"getSelectedIndex(stripsResultDataMap[key], key)\"\n class=\"mat-tab-labels w-full strips-tabgroup\" dynamicHeight\n (selectedTabChange)=\"tabClicked($event, 0, stripsResultDataMap[key], key)\">\n <mat-tab label=\"{{tab?.label}}\" *ngFor=\"let tab of stripsResultDataMap[key].tabs; let last = last;let tabIndex = index\">\n <ng-template mat-tab-label>\n <span>{{ translateLabels(tab?.label, 'home') }} </span>\n <span *ngIf=\"tab?.showTabDataCount && tab?.widgets?.length\">({{tab?.widgets?.length}})</span>\n </ng-template>\n\n <div class=\"wfull\" *ngIf=\"tab?.pillsData && tab?.pillsData?.length\">\n <div class=\"flex justify-between\">\n <div>\n <ng-container >\n <mat-chip-list class=\"content-pill\" aria-label=\"Fish selection\">\n <ng-container *ngFor=\"let pill of tab?.pillsData;let p = index\">\n <mat-chip [selected]=\"pill?.selected\" (click)=\"pillClicked($event, stripsResultDataMap[key], key, p, tabIndex)\">\n <span class=\"pill-name\">{{pill?.label}}</span></mat-chip>\n </ng-container>\n </mat-chip-list>\n </ng-container>\n </div>\n <!-- viewAll start-->\n <div *ngIf=\"checkCondition(widgetData , stripsResultDataMap[key])\"\n class=\"ml-4 pl-2 view-more ws-mat-default-text\">\n <a class=\"flex ws-mat-default-text items-center justify-center mat-body-1 cursor-pointer\" \n (click)=\"raiseTelemetry(stripsResultDataMap[key]);redirectViewAll(stripsResultDataMap[key], stripsResultDataMap[key]?.viewMoreUrl?.path, stripsResultDataMap[key]?.viewMoreUrl?.queryParams )\">\n <span i18n class=\"ws-mat-default-text\">{{translateLabels(widgetData.strips[0].viewMoreUrl.viewMoreText,'home') || 'See all'}}</span>\n <mat-icon class=\"ws-mat-default-text mat-icon notranslate material-icons mat-icon-no-color\" color=\"accent\">navigate_next</mat-icon>\n </a>\n </div>\n <!-- viewAll end-->\n </div>\n <div *ngIf=\"stripsResultDataMap && stripsResultDataMap[key]?.showOnLoader ||\n !tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.fetchTabStatus\"\n class=\"text-center my-2\">\n <sb-uic-horizontal-scroller-v2 [sliderConfig]=\"stripsResultDataMap[key]?.sliderConfig\" [id]=\"key+'-scroller'\"\n [loadStatus]=\"'fetching'\" [stripConfig]=\"stripsResultDataMap[key]?.stripConfig\">\n <ng-container *ngFor=\"let widget of stripsResultDataMap[key]?.loaderWidgets; trackBy: tracker\">\n <ng-container [sbUiResolverWidget]=\"widget\"></ng-container>\n </ng-container>\n </sb-uic-horizontal-scroller-v2>\n </div>\n <ng-container *ngIf=\"tab?.pillsData && tab?.pillsData.length && tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]\">\n <div *ngIf=\"((tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.fetchTabStatus && tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.fetchTabStatus === 'done') &&\n (!tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.widgets || !tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.widgets?.length))\">\n <ng-container *ngIf=\"tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.value === 'inprogress'; else msgTemp\">\n <div class=\"w-full flex flex-col items-center justify-center\">\n <img alt=\"\" class=\"mt-4 mb-4\" src=\"assets/icons/home/nodataDefault.svg\">\n <div class=\"mat-subheading-1 text-center info-content\">{{ 'contentstripmultiple.getReadyForLearningAdventure' | translate }} -\n <a class=\"click-here\" [routerLink]=\"'/page/learn'\">{{ 'contentstripmultiple.clickHere' | translate }}</a> {{ 'contentstripmultiple.toEnrollNextCourse' | translate }}</div>\n </div>\n </ng-container>\n <ng-template #msgTemp>\n <div class=\"w-full flex flex-col items-center justify-center\">\n <img alt=\"\" class=\"mt-4 mb-4\" src=\"assets/icons/home/nodataDefault.png\">\n <div class=\"mat-subheading-1 text-center\">{{ translateLabels(tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.nodataMsg, 'home') }}</div>\n </div>\n </ng-template>\n </div>\n </ng-container>\n <ng-container *ngIf=\"(tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.fetchTabStatus === 'done' || tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.widgets?.length)\">\n <ng-container *ngIf=\"!tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.tabLoading\">\n <sb-uic-horizontal-scroller-v2 [id]=\"key+'-scroller'\" [sliderConfig]=\"stripsResultDataMap[key]?.sliderConfig\" [widgetsLength]=\"tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.widgets?.length\"\n *ngIf=\"getContineuLearningLenth(stripsResultDataMap[key]) && showAccordion(key)\"\n [loadStatus]=\"'done'\" [defaultMaxWidgets]=\"tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.maxWidgets ||\n stripsResultDataMap[key]?.sliderConfig?.maxWidgets || defaultMaxWidgets\" [stripConfig]=\"stripsResultDataMap[key]?.stripConfig\">\n <ng-container *ngFor=\"let widget of tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.widgets| slice:0:(tab?.pillsData[getSelectedPillIndex(tab ,tabIndex)]?.maxWidgets ||\n stripsResultDataMap[key]?.sliderConfig?.maxWidgets || defaultMaxWidgets); trackBy: tracker\">\n <ng-container [sbUiResolverWidget]=\"widget\"></ng-container>\n </ng-container>\n </sb-uic-horizontal-scroller-v2>\n </ng-container>\n </ng-container>\n </div>\n </mat-tab>\n </mat-tab-group>\n </ng-container>\n </ng-container>\n </div>\n </div>\n </a>\n\n </ng-container>\n </ng-container>\n</ng-template>",
|
|
16593
14366
|
styles: [".view-more{display:flex;align-items:center;text-align:center;height:40px;justify-content:center}.view-more .icon{font-size:24px;width:24px;height:24px;border:1px solid;border-radius:50%;padding:8px;margin-bottom:8px}.margin-bottom-custom{margin-bottom:60px}.view-more:hover{background-color:#dcdfe5}::ng-deep.strips-tabgroup .mat-tab-header{border-bottom:2px solid rgba(0,0,0,.12)}::ng-deep.strips-tabgroup .mat-tab-body{padding:20px 0!important;box-sizing:border-box;overflow-y:initial!important}::ng-deep.strips-tabgroup .mat-tab-body-wrapper{overflow:inherit!important}::ng-deep.strips-tabgroup .mat-tab-label{border-bottom:0 solid rgba(0,0,0,.1);margin-right:0;opacity:1}::ng-deep.strips-tabgroup .mat-tab-label .mat-tab-label-content{text-transform:inherit;font:400 14px/20px Lato}::ng-deep.strips-tabgroup .mat-tab-label-active .mat-tab-label-content{font-weight:700!important}.click-here{color:#1b4ca1}.info-content{opacity:1;color:rgba(0,0,0,.87);font:700 14px/20px Lato-Bold;text-align:center}.active{background:#1b4ca1!important}.active .pill-name{color:#fff!important}::ng-deep .content-pill .mat-chip-selected{background-color:#1b4ca1!important}::ng-deep .content-pill .mat-chip-selected .pill-name{color:#fff!important}"]
|
|
16594
14367
|
}] }
|
|
16595
14368
|
];
|