@sunbird-cb/consumption 0.0.33 → 0.0.35
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 +25 -4
- 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-wide/card-wide.component.js +3 -3
- package/esm2015/lib/_common/content-strip-with-tabs-lib/content-strip-with-tabs-lib.component.js +25 -2
- package/esm5/lib/_common/cards/card-wide/card-wide.component.js +3 -3
- package/esm5/lib/_common/content-strip-with-tabs-lib/content-strip-with-tabs-lib.component.js +24 -3
- package/fesm2015/sunbird-cb-consumption.js +26 -3
- package/fesm2015/sunbird-cb-consumption.js.map +1 -1
- package/fesm5/sunbird-cb-consumption.js +25 -4
- package/fesm5/sunbird-cb-consumption.js.map +1 -1
- package/package.json +1 -1
- package/sunbird-cb-consumption.metadata.json +1 -1
|
@@ -4773,14 +4773,19 @@
|
|
|
4773
4773
|
if (response && response.results && response.results.response) {
|
|
4774
4774
|
content = response.results.response[strip.request.trendingSearch.responseKey] || [];
|
|
4775
4775
|
this.processStrip(strip, this.transformContentsToWidgets(content, strip), 'done', calculateParentStatus, response.viewMoreUrl || '');
|
|
4776
|
+
if (!content.length) {
|
|
4777
|
+
this.emptyResponse.emit(true);
|
|
4778
|
+
}
|
|
4776
4779
|
}
|
|
4777
4780
|
else {
|
|
4781
|
+
this.emptyResponse.emit(true);
|
|
4778
4782
|
this.processStrip(strip, [], 'done', calculateParentStatus, null);
|
|
4779
4783
|
}
|
|
4780
4784
|
return [3 /*break*/, 4];
|
|
4781
4785
|
case 3:
|
|
4782
4786
|
error_2 = _a.sent();
|
|
4783
4787
|
// Handle errors
|
|
4788
|
+
this.emptyResponse.emit(true);
|
|
4784
4789
|
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
4785
4790
|
return [3 /*break*/, 4];
|
|
4786
4791
|
case 4: return [2 /*return*/];
|
|
@@ -6002,7 +6007,7 @@
|
|
|
6002
6007
|
function (strip, calculateParentStatus) {
|
|
6003
6008
|
if (calculateParentStatus === void 0) { calculateParentStatus = true; }
|
|
6004
6009
|
return __awaiter(this, void 0, void 0, function () {
|
|
6005
|
-
var originalFilters, response, error_8;
|
|
6010
|
+
var originalFilters, response, finalPlaylistData_1, programData, error_8;
|
|
6006
6011
|
return __generator(this, function (_a) {
|
|
6007
6012
|
switch (_a.label) {
|
|
6008
6013
|
case 0:
|
|
@@ -6025,7 +6030,23 @@
|
|
|
6025
6030
|
if (response && response.results) {
|
|
6026
6031
|
// console.log('calling after-- ')
|
|
6027
6032
|
if (response.results.result.data && response.results.result.data.length) {
|
|
6028
|
-
|
|
6033
|
+
finalPlaylistData_1 = [];
|
|
6034
|
+
programData = response.results.result.data;
|
|
6035
|
+
programData.forEach((/**
|
|
6036
|
+
* @param {?} prgData
|
|
6037
|
+
* @return {?}
|
|
6038
|
+
*/
|
|
6039
|
+
function (prgData) {
|
|
6040
|
+
if (prgData.children && prgData.children.length) {
|
|
6041
|
+
finalPlaylistData_1.push(prgData);
|
|
6042
|
+
}
|
|
6043
|
+
}));
|
|
6044
|
+
if (finalPlaylistData_1.length) {
|
|
6045
|
+
this.processStrip(strip, this.transformContentsToWidgets(finalPlaylistData_1, strip), 'done', calculateParentStatus, response.viewMoreUrl);
|
|
6046
|
+
}
|
|
6047
|
+
else {
|
|
6048
|
+
this.emptyResponse.emit(true);
|
|
6049
|
+
}
|
|
6029
6050
|
}
|
|
6030
6051
|
else {
|
|
6031
6052
|
this.processStrip(strip, [], 'error', calculateParentStatus, null);
|
|
@@ -9838,8 +9859,8 @@
|
|
|
9838
9859
|
CardWideComponent.decorators = [
|
|
9839
9860
|
{ type: core.Component, args: [{
|
|
9840
9861
|
selector: 'sb-uic-card-wide',
|
|
9841
|
-
template: "<mat-card class=\"card-wide-lib\">\n <a (click)=\"raiseTelemetry();getRedirectUrlData(widgetData?.content); $event.stopPropagation()\" \n role=\"link\" i18n-aria-label>\n <div class=\"flex\">\n <div>\n <ng-container *ngIf=\"widgetData?.content?.posterImage\">\n <img mat-card-image [src]=\"widgetData?.content?.posterImage | pipePublicURL\" loading=\"lazy\"\n class=\"card-wide-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-wide-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-wide-img ws-mat-primary-lite-background margin-remove\"\n [alt]=\"widgetData?.content?.name\" />\n </ng-template>\n </ng-container>\n </div>\n <div>\n <div class=\"pl-4 pr-4 w-full\">\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 </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\n <div class=\"flex w-full
|
|
9842
|
-
styles: [".card-wide-lib{width:inherit;padding:16px;border-radius:12px;background:#fff;border:1px solid rgba(0,0,0,.16)}.card-wide-lib .card-wide-img{width:190px;height:107px;border-radius:12px}.card-wide-lib .course_widget{margin-top:10px}.card-wide-lib .course_widget .mat-icon{vertical-align:middle;color:#ef951e!important}.card-wide-lib .course_widget .course_v2{border:1px solid #ef951e;padding:4px 8px;align-items:end;border-radius:16px}.card-wide-lib .course_widget .main_icon{font-size:16px;width:16px;height:16px}.card-wide-lib .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-wide-lib .course_logo_box img{height:28px;width:28px;padding:5px;display:inline-block}.card-wide-lib .course_logo_box p{display:inline-block;vertical-align:top}.card-wide-lib .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}@media screen and (max-width:768px){.card-wide-img{width:147px;height:117px;border-radius:12px}}"]
|
|
9862
|
+
template: "<mat-card class=\"card-wide-lib\">\n <a (click)=\"raiseTelemetry();getRedirectUrlData(widgetData?.content); $event.stopPropagation()\" \n role=\"link\" i18n-aria-label>\n <div class=\"flex\">\n <div>\n <ng-container *ngIf=\"widgetData?.content?.posterImage\">\n <img mat-card-image [src]=\"widgetData?.content?.posterImage | pipePublicURL\" loading=\"lazy\"\n class=\"card-wide-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-wide-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-wide-img ws-mat-primary-lite-background margin-remove\"\n [alt]=\"widgetData?.content?.name\" />\n </ng-template>\n </ng-container>\n </div>\n <div>\n <div class=\"pl-4 pr-4 w-full\">\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 </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\n <div class=\"flex w-full 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>\n </div>\n </div>\n </a>\n</mat-card>\n",
|
|
9863
|
+
styles: [".card-wide-lib{width:inherit;padding:16px;border-radius:12px;background:#fff;border:1px solid rgba(0,0,0,.16)}.card-wide-lib .card-wide-img{width:190px;height:107px;border-radius:12px}.card-wide-lib .course_widget{margin-top:10px}.card-wide-lib .course_widget .mat-icon{vertical-align:middle;color:#ef951e!important}.card-wide-lib .course_widget .course_v2{border:1px solid #ef951e;padding:4px 8px;align-items:end;border-radius:16px}.card-wide-lib .course_widget .main_icon{font-size:16px;width:16px;height:16px}.card-wide-lib .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-wide-lib .course_logo_box img{height:28px;width:28px;padding:5px;display:inline-block}.card-wide-lib .course_logo_box p{display:inline-block;vertical-align:top}.card-wide-lib .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}@media screen and (max-width:768px){.card-wide-img{width:147px!important;height:117px!important;border-radius:12px!important}}"]
|
|
9843
9864
|
}] }
|
|
9844
9865
|
];
|
|
9845
9866
|
/** @nocollapse */
|