@sunbird-cb/consumption 0.0.12 → 0.0.14
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 +1699 -71
- 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/avatar-photo-lib/avatar-photo-lib.component.js +158 -0
- package/esm2015/lib/_common/avatar-photo-lib/avatar-photo-lib.module.js +29 -0
- package/esm2015/lib/_common/calender/calender-day/calender-day.component.js +90 -0
- package/esm2015/lib/_common/calender/calender.component.js +275 -9
- package/esm2015/lib/_common/calender/calender.module.js +15 -5
- package/esm2015/lib/_common/cards/card-portrait/card-portrait.component.js +5 -1
- package/esm2015/lib/_common/cards/card-wide/card-wide.component.js +166 -0
- package/esm2015/lib/_common/cards/cards.component.js +2 -2
- package/esm2015/lib/_common/cards/cards.module.js +5 -3
- package/esm2015/lib/_common/common-strip/common-strip.component.js +14 -11
- package/esm2015/lib/_common/competency-passbook/competency-passbook.component.js +22 -2
- package/esm2015/lib/_common/content-strip-with-tabs-lib/content-strip-with-tabs-lib.component.js +31 -3
- package/esm2015/lib/_common/data-points/data-points.component.js +2 -2
- package/esm2015/lib/_common/sliders-ng-content/sliders-ng-content.component.js +206 -0
- package/esm2015/lib/_common/sliders-ng-content/sliders-ng-content.model.js +61 -0
- package/esm2015/lib/_common/sliders-ng-content/sliders-ng-content.module.js +50 -0
- package/esm2015/lib/_common/user-content-rating/user-content-rating-lib.component.js +139 -0
- package/esm2015/lib/_common/user-content-rating/user-content-rating-lib.module.js +38 -0
- package/esm2015/lib/_common/user-content-rating/user-content-rating-lib.service.js +45 -0
- package/esm2015/lib/_directives/scrollable-item/scrollable-item.directive.js +42 -0
- package/esm2015/lib/_directives/scrollable-item/scrollable-item.module.js +19 -0
- package/esm2015/lib/_models/rating.model.js +44 -0
- package/esm2015/lib/_services/insite-data.service.js +10 -2
- package/esm2015/lib/_services/rating.service.js +171 -0
- package/esm2015/public-api.js +2 -1
- package/esm2015/sunbird-cb-consumption.js +31 -20
- package/esm5/lib/_common/avatar-photo-lib/avatar-photo-lib.component.js +175 -0
- package/esm5/lib/_common/avatar-photo-lib/avatar-photo-lib.module.js +33 -0
- package/esm5/lib/_common/calender/calender-day/calender-day.component.js +101 -0
- package/esm5/lib/_common/calender/calender.component.js +305 -9
- package/esm5/lib/_common/calender/calender.module.js +15 -5
- package/esm5/lib/_common/cards/card-portrait/card-portrait.component.js +5 -1
- package/esm5/lib/_common/cards/card-wide/card-wide.component.js +172 -0
- package/esm5/lib/_common/cards/cards.component.js +2 -2
- package/esm5/lib/_common/cards/cards.module.js +5 -3
- package/esm5/lib/_common/common-strip/common-strip.component.js +22 -19
- package/esm5/lib/_common/competency-passbook/competency-passbook.component.js +26 -3
- package/esm5/lib/_common/content-strip-with-tabs-lib/content-strip-with-tabs-lib.component.js +36 -3
- package/esm5/lib/_common/data-points/data-points.component.js +2 -2
- package/esm5/lib/_common/sliders-ng-content/sliders-ng-content.component.js +233 -0
- package/esm5/lib/_common/sliders-ng-content/sliders-ng-content.model.js +61 -0
- package/esm5/lib/_common/sliders-ng-content/sliders-ng-content.module.js +67 -0
- package/esm5/lib/_common/user-content-rating/user-content-rating-lib.component.js +162 -0
- package/esm5/lib/_common/user-content-rating/user-content-rating-lib.module.js +42 -0
- package/esm5/lib/_common/user-content-rating/user-content-rating-lib.service.js +48 -0
- package/esm5/lib/_directives/scrollable-item/scrollable-item.directive.js +45 -0
- package/esm5/lib/_directives/scrollable-item/scrollable-item.module.js +23 -0
- package/esm5/lib/_models/rating.model.js +44 -0
- package/esm5/lib/_services/insite-data.service.js +14 -2
- package/esm5/lib/_services/rating.service.js +214 -0
- package/esm5/public-api.js +2 -1
- package/esm5/sunbird-cb-consumption.js +31 -20
- package/fesm2015/sunbird-cb-consumption.js +1515 -88
- package/fesm2015/sunbird-cb-consumption.js.map +1 -1
- package/fesm5/sunbird-cb-consumption.js +1673 -58
- package/fesm5/sunbird-cb-consumption.js.map +1 -1
- package/lib/_common/avatar-photo-lib/avatar-photo-lib.component.d.ts +20 -0
- package/lib/_common/avatar-photo-lib/avatar-photo-lib.module.d.ts +2 -0
- package/lib/_common/calender/calender-day/calender-day.component.d.ts +18 -0
- package/lib/_common/calender/calender.component.d.ts +29 -1
- package/lib/_common/cards/card-wide/card-wide.component.d.ts +30 -0
- package/lib/_common/competency-passbook/competency-passbook.component.d.ts +1 -0
- package/lib/_common/content-strip-with-tabs-lib/content-strip-with-tabs-lib.component.d.ts +6 -1
- package/lib/_common/sliders-ng-content/sliders-ng-content.component.d.ts +29 -0
- package/lib/_common/sliders-ng-content/sliders-ng-content.model.d.ts +34 -0
- package/lib/_common/sliders-ng-content/sliders-ng-content.module.d.ts +6 -0
- package/lib/_common/user-content-rating/user-content-rating-lib.component.d.ts +22 -0
- package/lib/_common/user-content-rating/user-content-rating-lib.module.d.ts +2 -0
- package/lib/_common/user-content-rating/user-content-rating-lib.service.d.ts +7 -0
- package/lib/_directives/scrollable-item/scrollable-item.directive.d.ts +7 -0
- package/lib/_directives/scrollable-item/scrollable-item.module.d.ts +2 -0
- package/lib/_models/rating.model.d.ts +17 -0
- package/lib/_services/insite-data.service.d.ts +1 -0
- package/lib/_services/rating.service.d.ts +15 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/sunbird-cb-consumption.d.ts +29 -18
- package/sunbird-cb-consumption.metadata.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Injectable, ɵɵdefineInjectable, Component, EventEmitter, Input, Output, ViewChild, NgModule, ɵɵinject, Inject, HostBinding, Directive, HostListener, Pipe } from '@angular/core';
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
|
-
import {
|
|
1
|
+
import { Injectable, ɵɵdefineInjectable, Component, EventEmitter, Input, Output, ViewChild, NgModule, ɵɵinject, Inject, HostBinding, Directive, HostListener, CUSTOM_ELEMENTS_SCHEMA, Pipe, ElementRef, ViewChildren } from '@angular/core';
|
|
2
|
+
import { CommonModule, DatePipe } from '@angular/common';
|
|
3
|
+
import { Router, RouterModule } from '@angular/router';
|
|
4
4
|
import { fromEvent, timer, BehaviorSubject, of, EMPTY, ReplaySubject, Subject, throwError, interval } from 'rxjs';
|
|
5
5
|
import { debounceTime, throttleTime, shareReplay, retry, map, catchError, filter, distinctUntilChanged } from 'rxjs/operators';
|
|
6
6
|
import { ValueService, ConfigurationsService as ConfigurationsService$1, WsEvents, LoggerService, EventService, UtilityService } from '@sunbird-cb/utils-v2';
|
|
7
|
-
import { MatButtonModule, MatIconModule, MatProgressSpinnerModule, MatToolbarModule, MatTooltipModule, MatListModule, MatSidenavModule, MatCardModule, MatExpansionModule, MatRadioModule, MatChipsModule, MatInputModule, MatFormFieldModule, MatDialogModule, MatSnackBarModule, MatSelectModule, MatDatepickerModule, MatNativeDateModule, MatTableModule, MatCheckboxModule, MatButtonToggleModule, MatTabsModule, MatAutocompleteModule, MatSnackBar } from '@angular/material';
|
|
7
|
+
import { MatButtonModule, MatIconModule, MatProgressSpinnerModule, MatToolbarModule, MatTooltipModule, MatListModule, MatSidenavModule, MatCardModule, MatExpansionModule, MatRadioModule, MatChipsModule, MatInputModule, MatFormFieldModule, MatDialogModule, MatSnackBarModule, MatSelectModule, MatDatepickerModule, MatNativeDateModule, MatTableModule, MatCheckboxModule, MatButtonToggleModule, MatTabsModule, MatAutocompleteModule, MatSnackBar, MatMenuModule, MatRippleModule } from '@angular/material';
|
|
8
8
|
import { __assign, __awaiter, __generator, __extends, __values, __spread } from 'tslib';
|
|
9
9
|
import { WidgetBaseComponent, SbUiResolverModule } from '@sunbird-cb/resolver-v2';
|
|
10
10
|
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
|
@@ -3616,18 +3616,21 @@ var ContentStripWithTabsLibComponent = /** @class */ (function (_super) {
|
|
|
3616
3616
|
__extends(ContentStripWithTabsLibComponent, _super);
|
|
3617
3617
|
function ContentStripWithTabsLibComponent(
|
|
3618
3618
|
// private contentStripSvc: ContentStripNewMultipleService,
|
|
3619
|
-
environment, contentSvc, loggerSvc, eventSvc, configSvc, utilitySvc, userSvc, translate, langtranslations) {
|
|
3619
|
+
environment, contentSvc, loggerSvc, eventSvc, configSvc, utilitySvc, router, userSvc, translate, langtranslations) {
|
|
3620
3620
|
var _this = _super.call(this) || this;
|
|
3621
3621
|
_this.contentSvc = contentSvc;
|
|
3622
3622
|
_this.loggerSvc = loggerSvc;
|
|
3623
3623
|
_this.eventSvc = eventSvc;
|
|
3624
3624
|
_this.configSvc = configSvc;
|
|
3625
3625
|
_this.utilitySvc = utilitySvc;
|
|
3626
|
+
_this.router = router;
|
|
3626
3627
|
_this.userSvc = userSvc;
|
|
3627
3628
|
_this.translate = translate;
|
|
3628
3629
|
_this.langtranslations = langtranslations;
|
|
3629
3630
|
_this.emptyResponse = new EventEmitter();
|
|
3631
|
+
_this.viewAllResponse = new EventEmitter();
|
|
3630
3632
|
_this.providerId = '';
|
|
3633
|
+
_this.emitViewAll = false;
|
|
3631
3634
|
_this.id = "ws-strip-miltiple_" + Math.random();
|
|
3632
3635
|
_this.stripsResultDataMap = {};
|
|
3633
3636
|
_this.stripsKeyOrder = [];
|
|
@@ -5495,10 +5498,30 @@ var ContentStripWithTabsLibComponent = /** @class */ (function (_super) {
|
|
|
5495
5498
|
}
|
|
5496
5499
|
return filters;
|
|
5497
5500
|
};
|
|
5501
|
+
/**
|
|
5502
|
+
* @param {?} stripData
|
|
5503
|
+
* @param {?} path
|
|
5504
|
+
* @param {?} queryParamsData
|
|
5505
|
+
* @return {?}
|
|
5506
|
+
*/
|
|
5507
|
+
ContentStripWithTabsLibComponent.prototype.redirectViewAll = /**
|
|
5508
|
+
* @param {?} stripData
|
|
5509
|
+
* @param {?} path
|
|
5510
|
+
* @param {?} queryParamsData
|
|
5511
|
+
* @return {?}
|
|
5512
|
+
*/
|
|
5513
|
+
function (stripData, path, queryParamsData) {
|
|
5514
|
+
if (this.emitViewAll) {
|
|
5515
|
+
this.viewAllResponse.emit(stripData);
|
|
5516
|
+
}
|
|
5517
|
+
else {
|
|
5518
|
+
this.router.navigate([path], { queryParams: queryParamsData });
|
|
5519
|
+
}
|
|
5520
|
+
};
|
|
5498
5521
|
ContentStripWithTabsLibComponent.decorators = [
|
|
5499
5522
|
{ type: Component, args: [{
|
|
5500
5523
|
selector: 'sb-uic-content-strip-with-tabs',
|
|
5501
|
-
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 view-more ws-mat-default-text\">\n <a class=\"flex ws-mat-default-text items-center justify-center mat-body-1\" [routerLink]=\"stripsResultDataMap[key]?.viewMoreUrl?.path\"\n [queryParams]=\"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\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, stripsResultDataMap[key], key)\">\n <mat-tab label=\"{{tab?.label}}\" *ngFor=\"let tab of stripsResultDataMap[key].tabs; let last = last;\">\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 <div>\n <!-- <ng-container [ngTemplateOutlet]=\"loader\" *ngIf=\"stripsResultDataMap[key]?.showOnLoader\">\n </ng-container> -->\n <div *ngIf=\"stripsResultDataMap && stripsResultDataMap[key]?.showOnLoader ||\n !tab.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 <div *ngIf=\"((tab?.fetchTabStatus && tab?.fetchTabStatus === 'done') &&\n (!tab?.widgets || !tab?.widgets?.length))\">\n <ng-container *ngIf=\"tab?.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.nodataMsg, 'home') }}</div>\n </div>\n </ng-template>\n </div>\n <ng-container *ngIf=\"(tab?.fetchTabStatus === 'done' || tab?.widgets?.length)\">\n <ng-container *ngIf=\"!tab?.tabLoading\">\n\n <sb-uic-horizontal-scroller-v2 [id]=\"key+'-scroller'\" [sliderConfig]=\"stripsResultDataMap[key]?.sliderConfig\" [widgetsLength]=\"tab?.widgets?.length\"\n *ngIf=\"getContineuLearningLenth(stripsResultDataMap[key]) && showAccordion(key)\"\n [loadStatus]=\"'done'\" [defaultMaxWidgets]=\"tab?.maxWidgets ||\n stripsResultDataMap[key]?.sliderConfig?.maxWidgets || defaultMaxWidgets\" [stripConfig]=\"stripsResultDataMap[key]?.stripConfig\">\n <ng-container *ngFor=\"let widget of tab?.widgets| slice:0:(tab?.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 *ngIf=\"!stripsResultDataMap[key].tabs || !stripsResultDataMap[key].tabs.length\">\n <div *ngIf=\"stripsResultDataMap && stripsResultDataMap[key]?.showOnLoader\" class=\"text-center my-2\">\n <sb-uic-horizontal-scroller-v2 [id]=\"key+'-scroller'\" [sliderConfig]=\"stripsResultDataMap[key]?.sliderConfig\"\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 <div class=\"\">\n <sb-uic-horizontal-scroller-v2 [id]=\"key+'-scroller'\" [sliderConfig]=\"stripsResultDataMap[key]?.sliderConfig\"\n *ngIf=\"getContineuLearningLenth(stripsResultDataMap[key]) && showAccordion(key)\" [widgetsLength]=\"stripsResultDataMap[key]?.widgets?.length\" [loadStatus]=\"'done'\" [defaultMaxWidgets]=\"stripsResultDataMap[key].sliderConfig?.maxWidgets || defaultMaxWidgets\" [stripConfig]=\"stripsResultDataMap[key]?.stripConfig\">\n <ng-container *ngFor=\"let widget of stripsResultDataMap[key]?.widgets| slice:0:(stripsResultDataMap[key].sliderConfig?.maxWidgets || defaultMaxWidgets); trackBy: tracker\">\n <!-- <ng-container *ngIf=\"widget.widgetData.context.pageSection === 'continueLearning' \"> -->\n <!-- <ng-container *ngIf=\"widget.widgetData.content.completionPercentage !== 100\"\n [sbUiResolverWidget]=\"widget\"></ng-container> -->\n <ng-container [sbUiResolverWidget]=\"widget\"></ng-container>\n <!-- </ng-container> -->\n </ng-container>\n </sb-uic-horizontal-scroller-v2>\n </div>\n </ng-container>\n </ng-container>\n </div>\n </div>\n </a>\n\n </ng-container>\n </ng-container>\n</ng-template>",
|
|
5524
|
+
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 view-more ws-mat-default-text\">\n <a class=\"flex ws-mat-default-text items-center justify-center mat-body-1\" (click)=\"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\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, stripsResultDataMap[key], key)\">\n <mat-tab label=\"{{tab?.label}}\" *ngFor=\"let tab of stripsResultDataMap[key].tabs; let last = last;\">\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 <div>\n <!-- <ng-container [ngTemplateOutlet]=\"loader\" *ngIf=\"stripsResultDataMap[key]?.showOnLoader\">\n </ng-container> -->\n <div *ngIf=\"stripsResultDataMap && stripsResultDataMap[key]?.showOnLoader ||\n !tab.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 <div *ngIf=\"((tab?.fetchTabStatus && tab?.fetchTabStatus === 'done') &&\n (!tab?.widgets || !tab?.widgets?.length))\">\n <ng-container *ngIf=\"tab?.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.nodataMsg, 'home') }}</div>\n </div>\n </ng-template>\n </div>\n <ng-container *ngIf=\"(tab?.fetchTabStatus === 'done' || tab?.widgets?.length)\">\n <ng-container *ngIf=\"!tab?.tabLoading\">\n\n <sb-uic-horizontal-scroller-v2 [id]=\"key+'-scroller'\" [sliderConfig]=\"stripsResultDataMap[key]?.sliderConfig\" [widgetsLength]=\"tab?.widgets?.length\"\n *ngIf=\"getContineuLearningLenth(stripsResultDataMap[key]) && showAccordion(key)\"\n [loadStatus]=\"'done'\" [defaultMaxWidgets]=\"tab?.maxWidgets ||\n stripsResultDataMap[key]?.sliderConfig?.maxWidgets || defaultMaxWidgets\" [stripConfig]=\"stripsResultDataMap[key]?.stripConfig\">\n <ng-container *ngFor=\"let widget of tab?.widgets| slice:0:(tab?.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 *ngIf=\"!stripsResultDataMap[key].tabs || !stripsResultDataMap[key].tabs.length\">\n <div *ngIf=\"stripsResultDataMap && stripsResultDataMap[key]?.showOnLoader\" class=\"text-center my-2\">\n <sb-uic-horizontal-scroller-v2 [id]=\"key+'-scroller'\" [sliderConfig]=\"stripsResultDataMap[key]?.sliderConfig\"\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 <div class=\"\">\n <sb-uic-horizontal-scroller-v2 [id]=\"key+'-scroller'\" [sliderConfig]=\"stripsResultDataMap[key]?.sliderConfig\"\n *ngIf=\"getContineuLearningLenth(stripsResultDataMap[key]) && showAccordion(key)\" [widgetsLength]=\"stripsResultDataMap[key]?.widgets?.length\" [loadStatus]=\"'done'\" [defaultMaxWidgets]=\"stripsResultDataMap[key].sliderConfig?.maxWidgets || defaultMaxWidgets\" [stripConfig]=\"stripsResultDataMap[key]?.stripConfig\">\n <ng-container *ngFor=\"let widget of stripsResultDataMap[key]?.widgets| slice:0:(stripsResultDataMap[key].sliderConfig?.maxWidgets || defaultMaxWidgets); trackBy: tracker\">\n <!-- <ng-container *ngIf=\"widget.widgetData.context.pageSection === 'continueLearning' \"> -->\n <!-- <ng-container *ngIf=\"widget.widgetData.content.completionPercentage !== 100\"\n [sbUiResolverWidget]=\"widget\"></ng-container> -->\n <ng-container [sbUiResolverWidget]=\"widget\"></ng-container>\n <!-- </ng-container> -->\n </ng-container>\n </sb-uic-horizontal-scroller-v2>\n </div>\n </ng-container>\n </ng-container>\n </div>\n </div>\n </a>\n\n </ng-container>\n </ng-container>\n</ng-template>",
|
|
5502
5525
|
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}"]
|
|
5503
5526
|
}] }
|
|
5504
5527
|
];
|
|
@@ -5510,6 +5533,7 @@ var ContentStripWithTabsLibComponent = /** @class */ (function (_super) {
|
|
|
5510
5533
|
{ type: EventService },
|
|
5511
5534
|
{ type: ConfigurationsService$1 },
|
|
5512
5535
|
{ type: UtilityService },
|
|
5536
|
+
{ type: Router },
|
|
5513
5537
|
{ type: WidgetUserService },
|
|
5514
5538
|
{ type: TranslateService },
|
|
5515
5539
|
{ type: MultilingualTranslationsService }
|
|
@@ -5517,7 +5541,9 @@ var ContentStripWithTabsLibComponent = /** @class */ (function (_super) {
|
|
|
5517
5541
|
ContentStripWithTabsLibComponent.propDecorators = {
|
|
5518
5542
|
widgetData: [{ type: Input }],
|
|
5519
5543
|
emptyResponse: [{ type: Output }],
|
|
5544
|
+
viewAllResponse: [{ type: Output }],
|
|
5520
5545
|
providerId: [{ type: Input }],
|
|
5546
|
+
emitViewAll: [{ type: Input }],
|
|
5521
5547
|
id: [{ type: HostBinding, args: ['id',] }]
|
|
5522
5548
|
};
|
|
5523
5549
|
return ContentStripWithTabsLibComponent;
|
|
@@ -5528,8 +5554,12 @@ if (false) {
|
|
|
5528
5554
|
/** @type {?} */
|
|
5529
5555
|
ContentStripWithTabsLibComponent.prototype.emptyResponse;
|
|
5530
5556
|
/** @type {?} */
|
|
5557
|
+
ContentStripWithTabsLibComponent.prototype.viewAllResponse;
|
|
5558
|
+
/** @type {?} */
|
|
5531
5559
|
ContentStripWithTabsLibComponent.prototype.providerId;
|
|
5532
5560
|
/** @type {?} */
|
|
5561
|
+
ContentStripWithTabsLibComponent.prototype.emitViewAll;
|
|
5562
|
+
/** @type {?} */
|
|
5533
5563
|
ContentStripWithTabsLibComponent.prototype.id;
|
|
5534
5564
|
/** @type {?} */
|
|
5535
5565
|
ContentStripWithTabsLibComponent.prototype.stripsResultDataMap;
|
|
@@ -5587,6 +5617,8 @@ if (false) {
|
|
|
5587
5617
|
ContentStripWithTabsLibComponent.prototype.configSvc;
|
|
5588
5618
|
/** @type {?} */
|
|
5589
5619
|
ContentStripWithTabsLibComponent.prototype.utilitySvc;
|
|
5620
|
+
/** @type {?} */
|
|
5621
|
+
ContentStripWithTabsLibComponent.prototype.router;
|
|
5590
5622
|
/**
|
|
5591
5623
|
* @type {?}
|
|
5592
5624
|
* @private
|
|
@@ -6163,7 +6195,8 @@ var SlidersLibModule = /** @class */ (function () {
|
|
|
6163
6195
|
*/
|
|
6164
6196
|
/** @type {?} */
|
|
6165
6197
|
var API_END_POINTS$2 = {
|
|
6166
|
-
PROVIDER_INSIGHTS: "/apis/proxies/v8/microsite/read/insights"
|
|
6198
|
+
PROVIDER_INSIGHTS: "/apis/proxies/v8/microsite/read/insights",
|
|
6199
|
+
TRAINING_DETAILS: "apis/proxies/v8/sunbirdigot/search"
|
|
6167
6200
|
};
|
|
6168
6201
|
var InsiteDataService = /** @class */ (function () {
|
|
6169
6202
|
function InsiteDataService(http) {
|
|
@@ -6180,6 +6213,17 @@ var InsiteDataService = /** @class */ (function () {
|
|
|
6180
6213
|
function (request) {
|
|
6181
6214
|
return this.http.post(API_END_POINTS$2.PROVIDER_INSIGHTS, request);
|
|
6182
6215
|
};
|
|
6216
|
+
/**
|
|
6217
|
+
* @param {?} request
|
|
6218
|
+
* @return {?}
|
|
6219
|
+
*/
|
|
6220
|
+
InsiteDataService.prototype.fetchTrainingDetails = /**
|
|
6221
|
+
* @param {?} request
|
|
6222
|
+
* @return {?}
|
|
6223
|
+
*/
|
|
6224
|
+
function (request) {
|
|
6225
|
+
return this.http.post(API_END_POINTS$2.TRAINING_DETAILS, request);
|
|
6226
|
+
};
|
|
6183
6227
|
InsiteDataService.decorators = [
|
|
6184
6228
|
{ type: Injectable, args: [{
|
|
6185
6229
|
providedIn: 'root'
|
|
@@ -6284,7 +6328,7 @@ var DataPointsComponent = /** @class */ (function () {
|
|
|
6284
6328
|
DataPointsComponent.decorators = [
|
|
6285
6329
|
{ type: Component, args: [{
|
|
6286
6330
|
selector: 'sb-uic-data-points',
|
|
6287
|
-
template: "<div class=\"w-full metrics-web\" *ngIf=\"layoutType === 'multipleRows' && !isDataLoading\">\n <div *ngFor=\"let obj of objectData\" class=\"\">\n <div class=\"element-div\" [ngClass]=\"{'linebreak': obj?.linebreak}\">\n <div class=\"flex flex-row gap-3 items-top\">\n <div>\n <img class=\"objIcon\" [src]=\"obj.icon\" [style.color]=\"obj?.iconColor\">\n </div>\n <div>\n <div [style.color]=\"obj?.valueColor\" class=\"objHeader pb-1\" >{{obj?.value | number: obj.value % 1 === 0 ? '1.0-0' : '1.1-2'}}\n </div>\n <div [style.color]=\"obj?.labelColor\" class=\"objDescription\">{{obj?.label}}</div>\n </div>\n </div>\n </div>\n </div>\n</div>\n\n<div class=\"w-full\" *ngIf=\"layoutType === 'singleRow'\">\n <div class=\"flex gap-4\">\n <div *ngFor=\"let obj of objectData\" class=\"flex-container\">\n <div class=\"melement-div {{obj?.background}} flex-item\">\n <div class=\"flex flex-row gap-3\">\n <div>\n <img [style.color]=\"obj?.iconColor\" class=\"mobjIcon\" [src]=\"obj.icon\">\n </div>\n <div>\n <div [style.color]=\"obj?.valueColor\" class=\"mobjHeader pb-1\">{{obj?.value | number: '1.1-2'}}</div>\n <div [style.color]=\"obj?.labelColor\" class=\"mobjDescription\">{{obj?.label}}</div>\n </div>\n </div>\n </div>\n </div>\n </div> \n</div>\n\n<div class=\"w-full\" *ngIf=\"layoutType === 'gridLayout'\">\n <div class=\"w-full\" *ngIf=\"layoutType === 'gridLayout'\">\n <div class=\"top-container\">\n <div class=\"flex-container\" *ngFor=\"let chunk of customArray\">\n <div *ngFor=\"let item of chunk\">\n <div class=\"flex-item\">\n <div class=\"flex flex-row gap-5 infra-element-div\">\n <div>\n <div [style.color]=\"item?.valueColor\" class=\"infra-objHeader\">{{item?.value}}</div>\n <div [style.color]=\"item?.labelColor\" class=\"custom-opacity infra-objDescription padding-top-s\">{{item?.label}}</div>\n </div>\n </div>\n </div>\n </div>\n\n </div>\n </div>\n </div> \n</div>\n\n\n<!-- skeleton loaders -->\n\n<ng-container>\n <div class=\"w-full metrics-web\" *ngIf=\"layoutType === 'multipleRows' && isDataLoading\">\n <div *ngFor=\"let obj of [0,1,2,3]\" class=\"\">\n <div class=\"element-div linebreak\" >\n <div class=\"flex flex-row gap-3 items-top\">\n <div>\n <sb-uic-skeleton-loader [bindingClass]=\"'flex rounded objIcon'\" [width]=\"'32px'\"\n [height]=\"'32px'\"></sb-uic-skeleton-loader>\n </div>\n <div>\n <sb-uic-skeleton-loader [bindingClass]=\"'flex rounded mb-1'\" [width]=\"'100px'\"\n [height]=\"'24px'\"></sb-uic-skeleton-loader>\n <sb-uic-skeleton-loader [bindingClass]=\"'flex rounded mb-1'\" [width]=\"'150px'\"\n [height]=\"'24px'\"></sb-uic-skeleton-loader>\n </div>\n </div>\n </div>\n </div>\n </div>\n</ng-container>",
|
|
6331
|
+
template: "<div class=\"w-full metrics-web\" *ngIf=\"layoutType === 'multipleRows' && !isDataLoading\">\n <div *ngFor=\"let obj of objectData; let last = last\" class=\"\">\n <div class=\"element-div\" [ngClass]=\"{'linebreak': obj?.linebreak }\">\n <div class=\"flex flex-row gap-3 items-top\">\n <div>\n <img class=\"objIcon\" [src]=\"obj.icon\" [style.color]=\"obj?.iconColor\">\n </div>\n <div>\n <div [style.color]=\"obj?.valueColor\" class=\"objHeader pb-1\" >{{obj?.value | number: obj.value % 1 === 0 ? '1.0-0' : '1.1-2'}}\n </div>\n <div [style.color]=\"obj?.labelColor\" class=\"objDescription\">{{obj?.label}}</div>\n </div>\n </div>\n </div>\n </div>\n</div>\n\n<div class=\"w-full\" *ngIf=\"layoutType === 'singleRow'\">\n <div class=\"flex gap-4\">\n <div *ngFor=\"let obj of objectData\" class=\"flex-container\">\n <div class=\"melement-div {{obj?.background}} flex-item\">\n <div class=\"flex flex-row gap-3\">\n <div>\n <img [style.color]=\"obj?.iconColor\" class=\"mobjIcon\" [src]=\"obj.icon\">\n </div>\n <div>\n <div [style.color]=\"obj?.valueColor\" class=\"mobjHeader pb-1\">{{obj?.value | number: '1.1-2'}}</div>\n <div [style.color]=\"obj?.labelColor\" class=\"mobjDescription\">{{obj?.label}}</div>\n </div>\n </div>\n </div>\n </div>\n </div> \n</div>\n\n<div class=\"w-full\" *ngIf=\"layoutType === 'gridLayout'\">\n <div class=\"w-full\" *ngIf=\"layoutType === 'gridLayout'\">\n <div class=\"top-container\">\n <div class=\"flex-container\" *ngFor=\"let chunk of customArray\">\n <div *ngFor=\"let item of chunk\">\n <div class=\"flex-item\">\n <div class=\"flex flex-row gap-5 infra-element-div\">\n <div>\n <div [style.color]=\"item?.valueColor\" class=\"infra-objHeader\">{{item?.value}}</div>\n <div [style.color]=\"item?.labelColor\" class=\"custom-opacity infra-objDescription padding-top-s\">{{item?.label}}</div>\n </div>\n </div>\n </div>\n </div>\n\n </div>\n </div>\n </div> \n</div>\n\n\n<!-- skeleton loaders -->\n\n<ng-container>\n <div class=\"w-full metrics-web\" *ngIf=\"layoutType === 'multipleRows' && isDataLoading\">\n <div *ngFor=\"let obj of [0,1,2,3]\" class=\"\">\n <div class=\"element-div linebreak\" >\n <div class=\"flex flex-row gap-3 items-top\">\n <div>\n <sb-uic-skeleton-loader [bindingClass]=\"'flex rounded objIcon'\" [width]=\"'32px'\"\n [height]=\"'32px'\"></sb-uic-skeleton-loader>\n </div>\n <div>\n <sb-uic-skeleton-loader [bindingClass]=\"'flex rounded mb-1'\" [width]=\"'100px'\"\n [height]=\"'24px'\"></sb-uic-skeleton-loader>\n <sb-uic-skeleton-loader [bindingClass]=\"'flex rounded mb-1'\" [width]=\"'150px'\"\n [height]=\"'24px'\"></sb-uic-skeleton-loader>\n </div>\n </div>\n </div>\n </div>\n </div>\n</ng-container>",
|
|
6288
6332
|
styles: [".white{color:#fff}.custom-opacity{opacity:.7}.black{color:#000}.objIcon{width:32px;height:32px}.mobjIcon{width:24px;height:24px}.objHeader{font-family:Montserrat;font-size:24px;font-weight:600;line-height:29.26px;text-align:left}.mobjHeader{font-family:Montserrat;font-size:16px;font-weight:600;line-height:19.5px;text-align:left}.objDescription{font-family:Lato;font-size:16px;font-weight:400;line-height:19.2px;text-align:left}.mobjDescription{font-family:Lato;font-size:14px;font-weight:400;line-height:16.8px;text-align:left}.metrics-web{height:inherit;overflow-y:auto}.element-div{padding:25px 0;margin:0 25px}.linebreak{border-bottom:1px solid rgba(0,0,0,.16)}.melement-div{padding:16px;border-radius:15px;width:249px}.banner-metrics{background:linear-gradient(180deg,#f9cb97 -107.59%,#ef951e 110.74%)}.infra-element-div{min-width:325px;padding:25px 0;align-items:baseline}.infra-objIcon{width:32px;height:32px}.infra-objHeader{font-family:Montserrat;font-size:36px;font-weight:600;line-height:29.26px;text-align:left}.infra-objDescription{font-family:Lato;font-size:16px;font-weight:400;line-height:19.2px;text-align:left}.flex-container{display:flex}.top-container{overflow-x:auto;width:100%}.flex-item{flex:0 0 auto;white-space:nowrap;min-width:200px}@media screen and (max-width:768px){.infra-objIcon{width:24px;height:24px}.infra-objHeader{font-size:24px}.infra-element-div{min-width:250px;padding:15px 0 25px}}"]
|
|
6289
6333
|
}] }
|
|
6290
6334
|
];
|
|
@@ -6412,8 +6456,23 @@ var DataPointsModule = /** @class */ (function () {
|
|
|
6412
6456
|
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
6413
6457
|
*/
|
|
6414
6458
|
var CalenderComponent = /** @class */ (function () {
|
|
6415
|
-
function CalenderComponent() {
|
|
6416
|
-
this.
|
|
6459
|
+
function CalenderComponent(datePipe, insightSvc) {
|
|
6460
|
+
this.datePipe = datePipe;
|
|
6461
|
+
this.insightSvc = insightSvc;
|
|
6462
|
+
this.fetchDataFromApi = false;
|
|
6463
|
+
this.showHeader = false;
|
|
6464
|
+
this.defaultDays = 3;
|
|
6465
|
+
this.fullCalendor = false;
|
|
6466
|
+
this.days = [];
|
|
6467
|
+
this.trainings = {};
|
|
6468
|
+
this.isDataLoading = false;
|
|
6469
|
+
this.currentDate = new Date();
|
|
6470
|
+
this.allMonths = ["January", "February", "March",
|
|
6471
|
+
"April", "May", "June", "July",
|
|
6472
|
+
"August", "September", "October",
|
|
6473
|
+
"November", "December"
|
|
6474
|
+
];
|
|
6475
|
+
this.monthsDropdown = [];
|
|
6417
6476
|
}
|
|
6418
6477
|
/**
|
|
6419
6478
|
* @return {?}
|
|
@@ -6422,18 +6481,260 @@ var CalenderComponent = /** @class */ (function () {
|
|
|
6422
6481
|
* @return {?}
|
|
6423
6482
|
*/
|
|
6424
6483
|
function () {
|
|
6425
|
-
|
|
6426
|
-
|
|
6484
|
+
this.currentMonthAndYear = this.datePipe.transform(this.currentDate, 'MMMM y');
|
|
6485
|
+
this.selectedMonth = this.datePipe.transform(this.currentDate, 'LLLL yyyy');
|
|
6486
|
+
if (this.fullCalendor) {
|
|
6487
|
+
console.log("this.currentDate ", this.currentDate);
|
|
6488
|
+
this.days = this.getDaysInMonth(this.currentDate.getFullYear(), this.currentDate.getMonth());
|
|
6489
|
+
this.getMonthsDropdownData();
|
|
6490
|
+
}
|
|
6491
|
+
if (!this.fullCalendor) {
|
|
6492
|
+
this.days = this.getDays(this.currentDate, +this.defaultDays);
|
|
6493
|
+
}
|
|
6494
|
+
this.startDate = this.days[0];
|
|
6495
|
+
this.endDate = this.days[this.days.length - 1];
|
|
6496
|
+
if (this.fetchDataFromApi) {
|
|
6497
|
+
this.isDataLoading = true;
|
|
6498
|
+
this.getInsiteData();
|
|
6499
|
+
}
|
|
6500
|
+
};
|
|
6501
|
+
/**
|
|
6502
|
+
* @return {?}
|
|
6503
|
+
*/
|
|
6504
|
+
CalenderComponent.prototype.getInsiteData = /**
|
|
6505
|
+
* @return {?}
|
|
6506
|
+
*/
|
|
6507
|
+
function () {
|
|
6508
|
+
var _this = this;
|
|
6509
|
+
/** @type {?} */
|
|
6510
|
+
var request = {
|
|
6511
|
+
"locale": [
|
|
6512
|
+
"en"
|
|
6513
|
+
],
|
|
6514
|
+
"query": "",
|
|
6515
|
+
"request": {
|
|
6516
|
+
"query": "",
|
|
6517
|
+
"filters": {
|
|
6518
|
+
"category": [
|
|
6519
|
+
"Calendar"
|
|
6520
|
+
],
|
|
6521
|
+
"status": [
|
|
6522
|
+
"Live",
|
|
6523
|
+
"Retired"
|
|
6524
|
+
],
|
|
6525
|
+
"contentType": "Event",
|
|
6526
|
+
"startDate": {
|
|
6527
|
+
">=": this.startDate,
|
|
6528
|
+
"<=": this.endDate
|
|
6529
|
+
// ">=": "2024-01-15",
|
|
6530
|
+
// "<": "2024-05-31"
|
|
6531
|
+
},
|
|
6532
|
+
"channel": [this.providerId]
|
|
6533
|
+
},
|
|
6534
|
+
"sort_by": {
|
|
6535
|
+
"lastUpdatedOn": "desc"
|
|
6536
|
+
}
|
|
6537
|
+
}
|
|
6538
|
+
};
|
|
6539
|
+
this.insightSvc.fetchTrainingDetails(request).subscribe((/**
|
|
6540
|
+
* @param {?} res
|
|
6541
|
+
* @return {?}
|
|
6542
|
+
*/
|
|
6543
|
+
function (res) {
|
|
6544
|
+
if (res && res.result && res.result.Event) {
|
|
6545
|
+
res.result.Event.forEach((/**
|
|
6546
|
+
* @param {?} resp
|
|
6547
|
+
* @return {?}
|
|
6548
|
+
*/
|
|
6549
|
+
function (resp) {
|
|
6550
|
+
if (_this.trainings[resp.startDate]) {
|
|
6551
|
+
/** @type {?} */
|
|
6552
|
+
var prevData = _this.trainings[resp.startDate];
|
|
6553
|
+
/** @type {?} */
|
|
6554
|
+
var location_1 = resp.eventType;
|
|
6555
|
+
if (resp.venue && location_1 !== "Online") {
|
|
6556
|
+
/** @type {?} */
|
|
6557
|
+
var jsonResp = JSON.parse(resp.venue);
|
|
6558
|
+
location_1 = jsonResp['address'];
|
|
6559
|
+
}
|
|
6560
|
+
/** @type {?} */
|
|
6561
|
+
var formatObject = {
|
|
6562
|
+
location: location_1,
|
|
6563
|
+
startTime: _this.convertTo12HourFormat(resp.startTime),
|
|
6564
|
+
endTime: _this.convertTo12HourFormat(resp.endTime),
|
|
6565
|
+
title: resp.name,
|
|
6566
|
+
startDate: _this.formatDate(resp.startDate),
|
|
6567
|
+
endDate: _this.formatDate(resp.endDate),
|
|
6568
|
+
registrationLink: resp.registrationLink,
|
|
6569
|
+
};
|
|
6570
|
+
prevData.push(formatObject);
|
|
6571
|
+
_this.trainings[resp.startDate] = prevData;
|
|
6572
|
+
}
|
|
6573
|
+
}));
|
|
6574
|
+
}
|
|
6575
|
+
_this.isDataLoading = false;
|
|
6576
|
+
}));
|
|
6577
|
+
};
|
|
6578
|
+
/**
|
|
6579
|
+
* @param {?} obj
|
|
6580
|
+
* @return {?}
|
|
6581
|
+
*/
|
|
6582
|
+
CalenderComponent.prototype.getKeys = /**
|
|
6583
|
+
* @param {?} obj
|
|
6584
|
+
* @return {?}
|
|
6585
|
+
*/
|
|
6586
|
+
function (obj) {
|
|
6587
|
+
return Object.keys(obj);
|
|
6588
|
+
};
|
|
6589
|
+
/**
|
|
6590
|
+
* @param {?} date
|
|
6591
|
+
* @return {?}
|
|
6592
|
+
*/
|
|
6593
|
+
CalenderComponent.prototype.formatDate = /**
|
|
6594
|
+
* @param {?} date
|
|
6595
|
+
* @return {?}
|
|
6596
|
+
*/
|
|
6597
|
+
function (date) {
|
|
6598
|
+
/** @type {?} */
|
|
6599
|
+
var formatDate = new Date(date);
|
|
6600
|
+
return this.datePipe.transform(formatDate, 'E, dd LLL');
|
|
6601
|
+
};
|
|
6602
|
+
/**
|
|
6603
|
+
* @param {?} timeString
|
|
6604
|
+
* @return {?}
|
|
6605
|
+
*/
|
|
6606
|
+
CalenderComponent.prototype.convertTo12HourFormat = /**
|
|
6607
|
+
* @param {?} timeString
|
|
6608
|
+
* @return {?}
|
|
6609
|
+
*/
|
|
6610
|
+
function (timeString) {
|
|
6611
|
+
/** @type {?} */
|
|
6612
|
+
var time = timeString.split(":");
|
|
6613
|
+
/** @type {?} */
|
|
6614
|
+
var hours = +time[0];
|
|
6615
|
+
/** @type {?} */
|
|
6616
|
+
var minutes = +time[1];
|
|
6617
|
+
/** @type {?} */
|
|
6618
|
+
var ampm = hours >= 12 ? 'PM' : 'AM';
|
|
6619
|
+
hours = hours % 12;
|
|
6620
|
+
hours = hours ? hours : 12;
|
|
6621
|
+
/** @type {?} */
|
|
6622
|
+
var strHours = hours < 10 ? '0' + hours : hours.toString();
|
|
6623
|
+
/** @type {?} */
|
|
6624
|
+
var strMinutes = minutes < 10 ? '0' + minutes : minutes.toString();
|
|
6625
|
+
return strHours + ":" + strMinutes + ": " + ampm;
|
|
6626
|
+
};
|
|
6627
|
+
/**
|
|
6628
|
+
* @param {?} cDate
|
|
6629
|
+
* @param {?} counter
|
|
6630
|
+
* @return {?}
|
|
6631
|
+
*/
|
|
6632
|
+
CalenderComponent.prototype.getDays = /**
|
|
6633
|
+
* @param {?} cDate
|
|
6634
|
+
* @param {?} counter
|
|
6635
|
+
* @return {?}
|
|
6636
|
+
*/
|
|
6637
|
+
function (cDate, counter) {
|
|
6638
|
+
/** @type {?} */
|
|
6639
|
+
var days = [];
|
|
6640
|
+
/** @type {?} */
|
|
6641
|
+
var initDate = new Date(cDate);
|
|
6642
|
+
initDate = this.datePipe.transform(initDate, 'y-MM-dd');
|
|
6643
|
+
days.push(initDate);
|
|
6644
|
+
this.trainings[initDate] = [];
|
|
6645
|
+
while (counter > 0) {
|
|
6646
|
+
/** @type {?} */
|
|
6647
|
+
var myDate = new Date(cDate);
|
|
6648
|
+
myDate = myDate.setDate(myDate.getDate() + 1);
|
|
6649
|
+
cDate = myDate;
|
|
6650
|
+
myDate = this.datePipe.transform(myDate, 'y-MM-dd');
|
|
6651
|
+
days.push(myDate);
|
|
6652
|
+
this.trainings[myDate] = [];
|
|
6653
|
+
counter = counter - 1;
|
|
6654
|
+
}
|
|
6655
|
+
return days;
|
|
6656
|
+
};
|
|
6657
|
+
/**
|
|
6658
|
+
* @param {?} year
|
|
6659
|
+
* @param {?} month
|
|
6660
|
+
* @return {?}
|
|
6661
|
+
*/
|
|
6662
|
+
CalenderComponent.prototype.getDaysInMonth = /**
|
|
6663
|
+
* @param {?} year
|
|
6664
|
+
* @param {?} month
|
|
6665
|
+
* @return {?}
|
|
6666
|
+
*/
|
|
6667
|
+
function (year, month) {
|
|
6668
|
+
/** @type {?} */
|
|
6669
|
+
var date = new Date(year, month, 1);
|
|
6670
|
+
/** @type {?} */
|
|
6671
|
+
var days = [];
|
|
6672
|
+
this.trainings = {};
|
|
6673
|
+
while (date.getMonth() === month) {
|
|
6674
|
+
/** @type {?} */
|
|
6675
|
+
var myDate = new Date(date);
|
|
6676
|
+
myDate = this.datePipe.transform(myDate, 'y-MM-dd');
|
|
6677
|
+
days.push(myDate);
|
|
6678
|
+
this.trainings[myDate] = [];
|
|
6679
|
+
date.setDate(date.getDate() + 1);
|
|
6680
|
+
}
|
|
6681
|
+
return days;
|
|
6682
|
+
};
|
|
6683
|
+
/**
|
|
6684
|
+
* @return {?}
|
|
6685
|
+
*/
|
|
6686
|
+
CalenderComponent.prototype.getMonthsDropdownData = /**
|
|
6687
|
+
* @return {?}
|
|
6688
|
+
*/
|
|
6689
|
+
function () {
|
|
6690
|
+
var _this = this;
|
|
6691
|
+
this.allMonths.forEach((/**
|
|
6692
|
+
* @param {?} month
|
|
6693
|
+
* @return {?}
|
|
6694
|
+
*/
|
|
6695
|
+
function (month) {
|
|
6696
|
+
_this.monthsDropdown.push(month + " " + _this.currentDate.getFullYear());
|
|
6697
|
+
}));
|
|
6698
|
+
};
|
|
6699
|
+
/**
|
|
6700
|
+
* @param {?} event
|
|
6701
|
+
* @return {?}
|
|
6702
|
+
*/
|
|
6703
|
+
CalenderComponent.prototype.selectMonth = /**
|
|
6704
|
+
* @param {?} event
|
|
6705
|
+
* @return {?}
|
|
6706
|
+
*/
|
|
6707
|
+
function (event) {
|
|
6708
|
+
/** @type {?} */
|
|
6709
|
+
var selectedMonth = new Date(event);
|
|
6710
|
+
this.currentDate = selectedMonth;
|
|
6711
|
+
this.days = [];
|
|
6712
|
+
this.days = this.getDaysInMonth(this.currentDate.getFullYear(), this.currentDate.getMonth());
|
|
6713
|
+
this.startDate = this.days[0];
|
|
6714
|
+
this.endDate = this.days[this.days.length - 1];
|
|
6715
|
+
this.isDataLoading = true;
|
|
6716
|
+
this.getInsiteData();
|
|
6427
6717
|
};
|
|
6428
6718
|
CalenderComponent.decorators = [
|
|
6429
6719
|
{ type: Component, args: [{
|
|
6430
6720
|
selector: 'sb-uic-calender',
|
|
6431
|
-
template: "<div class=\"
|
|
6432
|
-
styles: [".
|
|
6721
|
+
template: "<div class=\"calendar-header flex flex-row c-padding center gap-2\" *ngIf=\"showHeader\">\n <div class=\"pt-3\">{{ objectData?.title }}:</div>\n <div class=\"choose-month\">\n <mat-form-field class=\"custom-month\">\n <mat-select matNativeControl panelClass=\"custom-select\" [ngModel]=\"selectedMonth\" (ngModelChange)=\"selectMonth($event)\" class=\"month-select\">\n <span *ngFor=\"let month of monthsDropdown\">\n <mat-option [value]=\"month\">{{month}}</mat-option>\n </span>\n </mat-select>\n </mat-form-field>\n </div>\n</div>\n<div *ngIf=\"layoutType==='grid'\">\n <div *ngFor=\"let obj of getKeys(trainings); let i = index\">\n <sb-uic-calender-day [day]=\"trainings[obj]\"\n [layoutType]=\"layoutType\"\n [objectData]=\"objectData\"\n [dataLoading]=\"isDataLoading\"\n [eventDate]=\"obj\"\n [rowId]=\"i\">\n </sb-uic-calender-day>\n </div> \n</div>\n<div *ngIf=\"layoutType==='row'\">\n <div *ngFor=\"let obj of getKeys(trainings); let j = index\">\n <sb-uic-calender-day [day]=\"trainings[obj]\"\n [layoutType]=\"layoutType\"\n [objectData]=\"objectData\"\n [dataLoading]=\"isDataLoading\"\n [eventDate]=\"obj\"\n [rowId]=\"j\">\n </sb-uic-calender-day>\n </div>\n</div>",
|
|
6722
|
+
styles: [".calendar-header{font-family:Montserrat;font-size:16px;font-weight:600;line-height:19.5px;text-align:left}.c-padding{padding:0}.center{align-items:center}::ng-deep .custom-month .mat-form-field-wrapper{padding-bottom:0!important;width:110px}::ng-deep .custom-month .mat-form-field.mat-focused.mat-primary .mat-select-arrow{color:#000!important}::ng-deep .custom-month .mat-select-value{width:89%}::ng-deep .custom-month .mat-select-value-text{font-weight:600}@media screen and (max-width:768px){.c-padding{padding:0 1.25rem 1rem}.calendar-header{font-size:15px}}"]
|
|
6433
6723
|
}] }
|
|
6434
6724
|
];
|
|
6725
|
+
/** @nocollapse */
|
|
6726
|
+
CalenderComponent.ctorParameters = function () { return [
|
|
6727
|
+
{ type: DatePipe },
|
|
6728
|
+
{ type: InsiteDataService }
|
|
6729
|
+
]; };
|
|
6435
6730
|
CalenderComponent.propDecorators = {
|
|
6436
|
-
objectData: [{ type: Input }]
|
|
6731
|
+
objectData: [{ type: Input }],
|
|
6732
|
+
layoutType: [{ type: Input }],
|
|
6733
|
+
fetchDataFromApi: [{ type: Input }],
|
|
6734
|
+
showHeader: [{ type: Input }],
|
|
6735
|
+
defaultDays: [{ type: Input }],
|
|
6736
|
+
providerId: [{ type: Input }],
|
|
6737
|
+
fullCalendor: [{ type: Input }]
|
|
6437
6738
|
};
|
|
6438
6739
|
return CalenderComponent;
|
|
6439
6740
|
}());
|
|
@@ -6441,7 +6742,142 @@ if (false) {
|
|
|
6441
6742
|
/** @type {?} */
|
|
6442
6743
|
CalenderComponent.prototype.objectData;
|
|
6443
6744
|
/** @type {?} */
|
|
6444
|
-
CalenderComponent.prototype.
|
|
6745
|
+
CalenderComponent.prototype.layoutType;
|
|
6746
|
+
/** @type {?} */
|
|
6747
|
+
CalenderComponent.prototype.fetchDataFromApi;
|
|
6748
|
+
/** @type {?} */
|
|
6749
|
+
CalenderComponent.prototype.showHeader;
|
|
6750
|
+
/** @type {?} */
|
|
6751
|
+
CalenderComponent.prototype.defaultDays;
|
|
6752
|
+
/** @type {?} */
|
|
6753
|
+
CalenderComponent.prototype.providerId;
|
|
6754
|
+
/** @type {?} */
|
|
6755
|
+
CalenderComponent.prototype.fullCalendor;
|
|
6756
|
+
/** @type {?} */
|
|
6757
|
+
CalenderComponent.prototype.days;
|
|
6758
|
+
/** @type {?} */
|
|
6759
|
+
CalenderComponent.prototype.trainings;
|
|
6760
|
+
/** @type {?} */
|
|
6761
|
+
CalenderComponent.prototype.currentMonthAndYear;
|
|
6762
|
+
/** @type {?} */
|
|
6763
|
+
CalenderComponent.prototype.isDataLoading;
|
|
6764
|
+
/** @type {?} */
|
|
6765
|
+
CalenderComponent.prototype.currentDate;
|
|
6766
|
+
/** @type {?} */
|
|
6767
|
+
CalenderComponent.prototype.endDate;
|
|
6768
|
+
/** @type {?} */
|
|
6769
|
+
CalenderComponent.prototype.startDate;
|
|
6770
|
+
/** @type {?} */
|
|
6771
|
+
CalenderComponent.prototype.allMonths;
|
|
6772
|
+
/** @type {?} */
|
|
6773
|
+
CalenderComponent.prototype.monthsDropdown;
|
|
6774
|
+
/** @type {?} */
|
|
6775
|
+
CalenderComponent.prototype.selectedMonth;
|
|
6776
|
+
/**
|
|
6777
|
+
* @type {?}
|
|
6778
|
+
* @private
|
|
6779
|
+
*/
|
|
6780
|
+
CalenderComponent.prototype.datePipe;
|
|
6781
|
+
/** @type {?} */
|
|
6782
|
+
CalenderComponent.prototype.insightSvc;
|
|
6783
|
+
}
|
|
6784
|
+
|
|
6785
|
+
/**
|
|
6786
|
+
* @fileoverview added by tsickle
|
|
6787
|
+
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
6788
|
+
*/
|
|
6789
|
+
var CalenderDayComponent = /** @class */ (function () {
|
|
6790
|
+
function CalenderDayComponent(datePipe) {
|
|
6791
|
+
this.datePipe = datePipe;
|
|
6792
|
+
this.webDisplayDate = "";
|
|
6793
|
+
this.mobileDisplayDate = "";
|
|
6794
|
+
this.currentDate = new Date();
|
|
6795
|
+
}
|
|
6796
|
+
/**
|
|
6797
|
+
* @return {?}
|
|
6798
|
+
*/
|
|
6799
|
+
CalenderDayComponent.prototype.ngOnInit = /**
|
|
6800
|
+
* @return {?}
|
|
6801
|
+
*/
|
|
6802
|
+
function () {
|
|
6803
|
+
this.currentDate = this.datePipe.transform(this.currentDate, 'y-MM-dd');
|
|
6804
|
+
};
|
|
6805
|
+
/**
|
|
6806
|
+
* @param {?} link
|
|
6807
|
+
* @return {?}
|
|
6808
|
+
*/
|
|
6809
|
+
CalenderDayComponent.prototype.openLink = /**
|
|
6810
|
+
* @param {?} link
|
|
6811
|
+
* @return {?}
|
|
6812
|
+
*/
|
|
6813
|
+
function (link) {
|
|
6814
|
+
window.open(link, "_blank");
|
|
6815
|
+
};
|
|
6816
|
+
/**
|
|
6817
|
+
* @param {?} date
|
|
6818
|
+
* @param {?} type
|
|
6819
|
+
* @return {?}
|
|
6820
|
+
*/
|
|
6821
|
+
CalenderDayComponent.prototype.formatDate = /**
|
|
6822
|
+
* @param {?} date
|
|
6823
|
+
* @param {?} type
|
|
6824
|
+
* @return {?}
|
|
6825
|
+
*/
|
|
6826
|
+
function (date, type) {
|
|
6827
|
+
/** @type {?} */
|
|
6828
|
+
var fDate = new Date(date);
|
|
6829
|
+
if (type === 'web') {
|
|
6830
|
+
return this.datePipe.transform(fDate, 'E, dd LLL');
|
|
6831
|
+
}
|
|
6832
|
+
if (type === 'mob') {
|
|
6833
|
+
return this.datePipe.transform(fDate, 'E dd LLL');
|
|
6834
|
+
}
|
|
6835
|
+
};
|
|
6836
|
+
CalenderDayComponent.decorators = [
|
|
6837
|
+
{ type: Component, args: [{
|
|
6838
|
+
selector: 'sb-uic-calender-day',
|
|
6839
|
+
template: "<div *ngIf=\"layoutType==='grid' && !dataLoading\">\n <div class=\"p-3 event-day my-3\"\n [style.backgroundColor]=\"objectData?.webBackgroundColor\"\n [style.borderColor]=\"currentDate === eventDate ? objectData?.activeBackgroudColor: ''\">\n \n <div class=\"flex item-top gap-8 {{ day.length ? '' : 'aliginCenter'}}\">\n <div class=\"event-date\">\n <div class=\"currentDay\"\n [style.backgroundColor]=\"currentDate === eventDate ? objectData?.activeBackgroudColor: ''\"\n [style.color]=\"currentDate === eventDate ? objectData?.activeColor: ''\">\n {{formatDate(eventDate, 'web')}}\n </div>\n </div>\n <div class=\"details w-full\" *ngIf=\"day.length\">\n <div class=\"flex p-4 item-center events-list mb-{{day.length === (i+1) ? '0' : '2'}} gap-20\" [style.backgroundColor]=\"objectData?.eventBackgroundColor\"\n *ngFor=\"let event of day; let i = index\" >\n <div>\n <div class=\"flex flex-row item-center gap-10 pb-2\">\n <div class=\"flex item-center gap-1 row1 col1\">\n <div><mat-icon class=\"icon-web\">schedule</mat-icon> </div>\n <div>{{event.startTime}} to {{event.endTime}}</div>\n </div>\n <div class=\"flex item-center col1\">{{event.title}}</div>\n </div>\n <div class=\"flex flex-row item-center gap-10\">\n <div class=\"flex item-center gap-1 row1 col1\" *ngIf=\"event.startDate && event.endDate && event.startDate !== event.endDate\">\n <div><mat-icon class=\"icon-web\">date_range</mat-icon> </div>\n <div class=\"upcase\">{{event.startDate}} - {{event.endDate}}</div>\n </div>\n <div class=\"flex item-center col1\">\n <div><mat-icon class=\"icon-web\">location_on</mat-icon> </div>\n <div class=\"flex item-center\">{{event.location}}</div>\n </div>\n </div>\n </div>\n <div class=\"visit-link flex gap-2\"\n *ngIf=\"event?.registrationLink\">\n <div (click)=\"openLink(event?.registrationLink)\">Visit</div>\n <div (click)=\"openLink(event?.registrationLink)\"><mat-icon class=\"visit-icon\">open_in_new</mat-icon> </div>\n </div>\n </div>\n </div>\n <div class=\"details w-full\" *ngIf=\"!day.length\">\n No trainings.\n </div>\n </div>\n </div>\n</div>\n\n<div *ngIf=\"layoutType==='row' && !dataLoading\">\n <div class=\"p-5 mb-{{day?.length === (rowId+1) ? '0' : '3'}}\"\n [style.backgroundColor]=\"objectData?.mobileBackground\">\n <div class=\"flex item-center gap-4\">\n <div class=\"event-date\">\n <div class=\"flex flex-col\">\n <div> {{formatDate(eventDate, 'mob').split(' ')[0]}}</div>\n <div class=\"mob-currentDay\"\n [style.backgroundColor]=\"currentDate === eventDate ? objectData?.activeBackgroudColor: ''\"\n [style.color]=\"currentDate === eventDate ? objectData?.activeColor: ''\">\n {{formatDate(eventDate, 'mob').split(' ')[1]}}\n </div>\n <div> {{formatDate(eventDate, 'mob').split(' ')[2]}}</div>\n </div>\n </div>\n <div class=\"details w-full\" *ngIf=\"day.length\">\n <div class=\"flex flex-col mob-events-list p-3 mb-{{day.length === (i+1) ? '0' : '2'}}\"\n *ngFor=\"let event of day; let i = index\" [style.backgroundColor]=\"objectData?.eventBackgroundColor\">\n <div>\n <div class=\"flex pb-2\">{{event.title}}</div>\n <div class=\"flex pb-1\">\n <div><mat-icon class=\"mob-icon\">schedule</mat-icon> </div>\n <div>{{event.startTime}} to {{event.endTime}}</div>\n </div>\n <div class=\"flex pb-1\" *ngIf=\"event.startDate && event.endDate && event.startDate !== event.endDate\">\n <div><mat-icon class=\"mob-icon\">date_range</mat-icon> </div>\n <div class=\"upcase\">{{event.startDate}} - {{event.endDate}}</div>\n </div>\n <div class=\"flex\">\n <div><mat-icon class=\"mob-icon\">location_on</mat-icon> </div>\n <div class=\"flex item-center\">{{event.location}}</div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"details w-full flex no-data\" *ngIf=\"!day.length\">\n No trainings.\n </div>\n </div> \n </div> \n</div>\n\n<!-- skeleton loaders -->\n<div *ngIf=\"dataLoading\">\n <div *ngIf=\"layoutType==='grid'\">\n <div class=\"hidden md:block\">\n <div class=\"p-3 event-day my-3\"\n [style.backgroundColor]=\"'#FFF'\">\n <div class=\"flex item-top gap-8\">\n <div class=\"event-date\">\n <div class=\"currentDay\">\n <sb-uic-skeleton-loader [bindingClass]=\"'flex rounded objIcon'\" [width]=\"'90px'\"\n [height]=\"'32px'\"></sb-uic-skeleton-loader> \n </div>\n </div>\n <div class=\"details w-full\">\n <div class=\"flex p-4 item-center events-list mb-2 gap-20\">\n <div>\n <div class=\"flex flex-row item-center gap-20 pb-2\">\n <div class=\"flex item-center gap-2 row1 col1\">\n <div>\n <sb-uic-skeleton-loader [bindingClass]=\"'flex rounded objIcon'\" [width]=\"'50px'\"\n [height]=\"'32px'\"></sb-uic-skeleton-loader>\n </div>\n <div>\n <sb-uic-skeleton-loader [bindingClass]=\"'flex rounded objIcon'\" [width]=\"'250px'\"\n [height]=\"'32px'\"></sb-uic-skeleton-loader>\n </div>\n </div>\n <div class=\"flex item-center col1\">\n <sb-uic-skeleton-loader [bindingClass]=\"'flex rounded objIcon'\" [width]=\"'250px'\"\n [height]=\"'32px'\"></sb-uic-skeleton-loader> </div>\n </div>\n <div class=\"flex flex-row item-center gap-20 pb-2\">\n <div class=\"flex item-center gap-2 row1 col1\">\n <div>\n <sb-uic-skeleton-loader [bindingClass]=\"'flex rounded objIcon'\" [width]=\"'50px'\"\n [height]=\"'32px'\"></sb-uic-skeleton-loader>\n </div>\n <div>\n <sb-uic-skeleton-loader [bindingClass]=\"'flex rounded objIcon'\" [width]=\"'250px'\"\n [height]=\"'32px'\"></sb-uic-skeleton-loader>\n </div>\n </div>\n <div class=\"flex item-center col1\">\n <sb-uic-skeleton-loader [bindingClass]=\"'flex rounded objIcon'\" [width]=\"'250px'\"\n [height]=\"'32px'\"></sb-uic-skeleton-loader> </div>\n </div>\n </div>\n <div class=\"visit-link flex gap-2\">\n <div><sb-uic-skeleton-loader [bindingClass]=\"'flex rounded objIcon'\" [width]=\"'200px'\"\n [height]=\"'32px'\"></sb-uic-skeleton-loader> </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div *ngIf=\"layoutType==='row'\">\n <div class=\"block md:hidden\">\n <div class=\"p-5\" \n [style.backgroundColor]=\"'#FFFFFF'\">\n <div class=\"flex item-center gap-4\">\n <div class=\"event-date\">\n <div class=\"flex flex-col\">\n <sb-uic-skeleton-loader [bindingClass]=\"'flex rounded objIcon'\" [width]=\"'30px'\"\n [height]=\"'90px'\"></sb-uic-skeleton-loader> \n </div>\n </div>\n <div class=\"details w-full\">\n <div class=\"flex flex-col mob-events-list p-3 mb-2\">\n <div>\n <div class=\"flex pb-2\">\n <sb-uic-skeleton-loader [bindingClass]=\"'flex rounded objIcon'\" [width]=\"'265px'\"\n [height]=\"'32px'\"></sb-uic-skeleton-loader> \n </div>\n <div class=\"flex pb-1 gap-2\">\n <div>\n <sb-uic-skeleton-loader [bindingClass]=\"'flex rounded objIcon'\" [width]=\"'30px'\"\n [height]=\"'32px'\"></sb-uic-skeleton-loader>\n </div>\n <div><sb-uic-skeleton-loader [bindingClass]=\"'flex rounded objIcon'\" [width]=\"'230px'\"\n [height]=\"'32px'\"></sb-uic-skeleton-loader>\n </div>\n </div>\n <div class=\"flex pb-1 gap-2\">\n <div>\n <sb-uic-skeleton-loader [bindingClass]=\"'flex rounded objIcon'\" [width]=\"'30px'\"\n [height]=\"'32px'\"></sb-uic-skeleton-loader>\n </div>\n <div>\n <sb-uic-skeleton-loader [bindingClass]=\"'flex rounded objIcon'\" [width]=\"'230px'\"\n [height]=\"'32px'\"></sb-uic-skeleton-loader>\n </div>\n </div>\n <div class=\"flex gap-2\">\n <div><sb-uic-skeleton-loader [bindingClass]=\"'flex rounded objIcon'\" [width]=\"'30px'\"\n [height]=\"'32px'\"></sb-uic-skeleton-loader>\n </div>\n <div class=\"flex item-center\">\n <sb-uic-skeleton-loader [bindingClass]=\"'flex rounded objIcon'\" [width]=\"'230px'\"\n [height]=\"'32px'\"></sb-uic-skeleton-loader> \n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div> \n</div>",
|
|
6840
|
+
styles: [".event-day{border:1px solid #c3c3c3;border-radius:15px}.event-date{font-family:Lato;font-size:14px;font-weight:700;line-height:16.8px;text-align:center;width:10%;text-transform:uppercase}.events-list{border:1px solid #c3c3c3;border-radius:15px;justify-content:space-between;align-items:center;font-family:Lato;font-size:14px;font-weight:400;line-height:16.8px}.row1{width:235px}.icon-web{font-size:17px;height:17px}.upcase{text-transform:uppercase}.aliginCenter,.col1{align-items:center}.visit-link{cursor:pointer;align-items:center;justify-content:center}.visit-icon{font-size:17px;height:17px;color:#1b4ca1}.currentDay{padding:5px;border-radius:20px}.mob-currentDay{padding:8px;border-radius:20px}.mob-events-list{border:1px solid #e8e6e5;border-radius:10px;justify-content:space-between;font-family:Lato;font-size:14px;font-weight:400;line-height:16.8px}.mob-icon{font-size:17px;height:17px}.no-data{display:flex;align-items:center}"]
|
|
6841
|
+
}] }
|
|
6842
|
+
];
|
|
6843
|
+
/** @nocollapse */
|
|
6844
|
+
CalenderDayComponent.ctorParameters = function () { return [
|
|
6845
|
+
{ type: DatePipe }
|
|
6846
|
+
]; };
|
|
6847
|
+
CalenderDayComponent.propDecorators = {
|
|
6848
|
+
objectData: [{ type: Input }],
|
|
6849
|
+
layoutType: [{ type: Input }],
|
|
6850
|
+
day: [{ type: Input }],
|
|
6851
|
+
dataLoading: [{ type: Input }],
|
|
6852
|
+
rowId: [{ type: Input }],
|
|
6853
|
+
eventDate: [{ type: Input }]
|
|
6854
|
+
};
|
|
6855
|
+
return CalenderDayComponent;
|
|
6856
|
+
}());
|
|
6857
|
+
if (false) {
|
|
6858
|
+
/** @type {?} */
|
|
6859
|
+
CalenderDayComponent.prototype.objectData;
|
|
6860
|
+
/** @type {?} */
|
|
6861
|
+
CalenderDayComponent.prototype.layoutType;
|
|
6862
|
+
/** @type {?} */
|
|
6863
|
+
CalenderDayComponent.prototype.day;
|
|
6864
|
+
/** @type {?} */
|
|
6865
|
+
CalenderDayComponent.prototype.dataLoading;
|
|
6866
|
+
/** @type {?} */
|
|
6867
|
+
CalenderDayComponent.prototype.rowId;
|
|
6868
|
+
/** @type {?} */
|
|
6869
|
+
CalenderDayComponent.prototype.eventDate;
|
|
6870
|
+
/** @type {?} */
|
|
6871
|
+
CalenderDayComponent.prototype.webDisplayDate;
|
|
6872
|
+
/** @type {?} */
|
|
6873
|
+
CalenderDayComponent.prototype.mobileDisplayDate;
|
|
6874
|
+
/** @type {?} */
|
|
6875
|
+
CalenderDayComponent.prototype.currentDate;
|
|
6876
|
+
/**
|
|
6877
|
+
* @type {?}
|
|
6878
|
+
* @private
|
|
6879
|
+
*/
|
|
6880
|
+
CalenderDayComponent.prototype.datePipe;
|
|
6445
6881
|
}
|
|
6446
6882
|
|
|
6447
6883
|
/**
|
|
@@ -6456,9 +6892,15 @@ var CalenderModule = /** @class */ (function () {
|
|
|
6456
6892
|
imports: [
|
|
6457
6893
|
CommonModule,
|
|
6458
6894
|
MatIconModule,
|
|
6895
|
+
FormsModule,
|
|
6896
|
+
ReactiveFormsModule,
|
|
6897
|
+
MatSelectModule,
|
|
6898
|
+
SkeletonLoaderLibModule
|
|
6459
6899
|
],
|
|
6460
|
-
declarations: [CalenderComponent],
|
|
6900
|
+
declarations: [CalenderComponent, CalenderDayComponent],
|
|
6461
6901
|
exports: [CalenderComponent],
|
|
6902
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
6903
|
+
providers: [DatePipe, InsiteDataService],
|
|
6462
6904
|
},] }
|
|
6463
6905
|
];
|
|
6464
6906
|
return CalenderModule;
|
|
@@ -6704,30 +7146,33 @@ var CommonStripComponent = /** @class */ (function (_super) {
|
|
|
6704
7146
|
if (this.widgetData.loader && this.widgetData.strips.length) {
|
|
6705
7147
|
this.showParentLoader = true;
|
|
6706
7148
|
}
|
|
6707
|
-
|
|
6708
|
-
|
|
6709
|
-
|
|
6710
|
-
|
|
6711
|
-
this.
|
|
6712
|
-
|
|
6713
|
-
this.processStrip(strip,
|
|
6714
|
-
|
|
6715
|
-
|
|
6716
|
-
if (this.checkForEmptyWidget(strip)) {
|
|
6717
|
-
// this.fetchStripFromRequestData(strip, false);
|
|
7149
|
+
// null check if in case no strips key in config
|
|
7150
|
+
if (this.widgetData && this.widgetData.strips) {
|
|
7151
|
+
try {
|
|
7152
|
+
// Fetch the data
|
|
7153
|
+
for (var _b = __values(this.widgetData.strips), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
7154
|
+
var strip = _c.value;
|
|
7155
|
+
this.processStrip(strip, [], 'fetching', false, null);
|
|
7156
|
+
if (strip.dataType === 'in-hand' && this.widgetData[strip.dataKey]) {
|
|
7157
|
+
this.processStrip(strip, this.commonMethodsSvc.transformContentsToWidgets(this.widgetData[strip.dataKey], strip), 'done', true, strip.viewMoreUrl || '');
|
|
6718
7158
|
}
|
|
6719
7159
|
else {
|
|
6720
|
-
this.
|
|
7160
|
+
if (this.checkForEmptyWidget(strip)) {
|
|
7161
|
+
// this.fetchStripFromRequestData(strip, false);
|
|
7162
|
+
}
|
|
7163
|
+
else {
|
|
7164
|
+
this.processStrip(strip, [], 'done', true, null);
|
|
7165
|
+
}
|
|
6721
7166
|
}
|
|
6722
7167
|
}
|
|
6723
7168
|
}
|
|
6724
|
-
|
|
6725
|
-
|
|
6726
|
-
|
|
6727
|
-
|
|
6728
|
-
|
|
7169
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
7170
|
+
finally {
|
|
7171
|
+
try {
|
|
7172
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
7173
|
+
}
|
|
7174
|
+
finally { if (e_1) throw e_1.error; }
|
|
6729
7175
|
}
|
|
6730
|
-
finally { if (e_1) throw e_1.error; }
|
|
6731
7176
|
}
|
|
6732
7177
|
// Subscription for changes
|
|
6733
7178
|
/** @type {?} */
|
|
@@ -7514,7 +7959,7 @@ var CardsComponent = /** @class */ (function (_super) {
|
|
|
7514
7959
|
CardsComponent.decorators = [
|
|
7515
7960
|
{ type: Component, args: [{
|
|
7516
7961
|
selector: 'sb-uic-cards',
|
|
7517
|
-
template: "<div class=\"widget-card-content-new\">\n <ng-container *ngIf=\"widgetData && (((widgetData?.deletedMode || 'none') === 'hide' && !!!isLiveOrMarkForDeletion)\n ? false\n : !((widgetData?.intranetMode || 'none') === 'hide' && !!showIntranetContent))\"\n [ngSwitch]=\"( (widgetData && widgetData?.cardSubType) || 'cardPortraitLib')\">\n <ng-container *ngSwitchDefault [ngTemplateOutlet]=\"cardPortraitLib\"></ng-container>\n <ng-container *ngSwitchCase=\"'user-card'\" [ngTemplateOutlet]=\"cardUser\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-portrait-lib-skeleton'\" [ngTemplateOutlet]=\"cardPortraitLibSkeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-portrait-lib'\" [ngTemplateOutlet]=\"cardPortraitLib\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-landscape-lib-skeleton'\" [ngTemplateOutlet]=\"cardLandscapeLibSkeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-landscape-lib'\" [ngTemplateOutlet]=\"cardLandscapeLib\"></ng-container>\n </ng-container>\n</div>\n\n<ng-template #cardPortraitLibSkeleton>\n <sb-uic-card-portrait [widgetData]=\"widgetData\" [isCardLoading]=\"true\"></sb-uic-card-portrait>\n</ng-template>\n<ng-template #cardPortraitLib>\n <sb-uic-card-portrait [widgetData]=\"widgetData\" [isCardLoading]=\"false\"></sb-uic-card-portrait>\n</ng-template>\n<ng-template #cardLandscapeLibSkeleton>\n <sb-uic-card-landscape [widgetData]=\"widgetData\" [isCardLoading]=\"true\"></sb-uic-card-landscape>\n</ng-template>\n<ng-template #cardLandscapeLib>\n <sb-uic-card-landscape [widgetData]=\"widgetData\" [isCardLoading]=\"false\"></sb-uic-card-landscape>\n</ng-template>\n\n\n <ng-template #cardUser>\n <sb-uic-card-user [widgetData]=\"widgetData\"></sb-uic-card-user>\n </ng-template>\n",
|
|
7962
|
+
template: "<div class=\"widget-card-content-new\">\n <ng-container *ngIf=\"widgetData && (((widgetData?.deletedMode || 'none') === 'hide' && !!!isLiveOrMarkForDeletion)\n ? false\n : !((widgetData?.intranetMode || 'none') === 'hide' && !!showIntranetContent))\"\n [ngSwitch]=\"( (widgetData && widgetData?.cardSubType) || 'cardPortraitLib')\">\n <ng-container *ngSwitchDefault [ngTemplateOutlet]=\"cardPortraitLib\"></ng-container>\n <ng-container *ngSwitchCase=\"'user-card'\" [ngTemplateOutlet]=\"cardUser\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-portrait-lib-skeleton'\" [ngTemplateOutlet]=\"cardPortraitLibSkeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-portrait-lib'\" [ngTemplateOutlet]=\"cardPortraitLib\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-landscape-lib-skeleton'\" [ngTemplateOutlet]=\"cardLandscapeLibSkeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-landscape-lib'\" [ngTemplateOutlet]=\"cardLandscapeLib\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-wide-lib-skeleton'\" [ngTemplateOutlet]=\"cardWideLibSkeleton\"></ng-container>\n <ng-container *ngSwitchCase=\"'card-wide-lib'\" [ngTemplateOutlet]=\"cardWideLib\"></ng-container>\n </ng-container>\n</div>\n\n<ng-template #cardPortraitLibSkeleton>\n <sb-uic-card-portrait [widgetData]=\"widgetData\" [isCardLoading]=\"true\"></sb-uic-card-portrait>\n</ng-template>\n<ng-template #cardPortraitLib>\n <sb-uic-card-portrait (contentData)=\"getRedirectUrlData($event)\" [widgetData]=\"widgetData\" [isCardLoading]=\"false\"></sb-uic-card-portrait>\n</ng-template>\n<ng-template #cardLandscapeLibSkeleton>\n <sb-uic-card-landscape [widgetData]=\"widgetData\" [isCardLoading]=\"true\"></sb-uic-card-landscape>\n</ng-template>\n<ng-template #cardLandscapeLib>\n <sb-uic-card-landscape [widgetData]=\"widgetData\" [isCardLoading]=\"false\"></sb-uic-card-landscape>\n</ng-template>\n\n<ng-template #cardWideLib>\n <sb-uic-card-wide (contentData)=\"getRedirectUrlData($event)\" [widgetData]=\"widgetData\"></sb-uic-card-wide>\n</ng-template>\n<ng-template #cardWideLibSkeleton>\n <sb-uic-card-wide [widgetData]=\"widgetData\"></sb-uic-card-wide>\n</ng-template>\n\n <ng-template #cardUser>\n <sb-uic-card-user [widgetData]=\"widgetData\"></sb-uic-card-user>\n </ng-template>\n",
|
|
7518
7963
|
styles: [""]
|
|
7519
7964
|
}] }
|
|
7520
7965
|
];
|
|
@@ -7634,6 +8079,10 @@ var CardPortraitComponent = /** @class */ (function () {
|
|
|
7634
8079
|
this.sourceLogos = instanceConfig.sources;
|
|
7635
8080
|
this.defaultSLogo = instanceConfig.logos.defaultSourceLogo || '';
|
|
7636
8081
|
}
|
|
8082
|
+
else {
|
|
8083
|
+
this.defaultThumbnail = '/assets/instances/eagle/app_logos/default.png';
|
|
8084
|
+
this.defaultSLogo = '/assets/instances/eagle/app_logos/KarmayogiBharat_Logo.svg';
|
|
8085
|
+
}
|
|
7637
8086
|
};
|
|
7638
8087
|
/**
|
|
7639
8088
|
* @return {?}
|
|
@@ -8492,24 +8941,188 @@ if (false) {
|
|
|
8492
8941
|
* @fileoverview added by tsickle
|
|
8493
8942
|
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
8494
8943
|
*/
|
|
8495
|
-
var
|
|
8496
|
-
function
|
|
8497
|
-
|
|
8498
|
-
|
|
8499
|
-
|
|
8500
|
-
|
|
8501
|
-
|
|
8502
|
-
|
|
8503
|
-
|
|
8504
|
-
|
|
8505
|
-
|
|
8506
|
-
|
|
8507
|
-
|
|
8508
|
-
|
|
8509
|
-
|
|
8510
|
-
|
|
8511
|
-
|
|
8512
|
-
|
|
8944
|
+
var CardWideComponent = /** @class */ (function () {
|
|
8945
|
+
function CardWideComponent(snackBar, events, translate, langtranslations, configSvc) {
|
|
8946
|
+
var _this = this;
|
|
8947
|
+
this.snackBar = snackBar;
|
|
8948
|
+
this.events = events;
|
|
8949
|
+
this.translate = translate;
|
|
8950
|
+
this.langtranslations = langtranslations;
|
|
8951
|
+
this.configSvc = configSvc;
|
|
8952
|
+
this.isCardLoading = false;
|
|
8953
|
+
this.contentData = new EventEmitter();
|
|
8954
|
+
this.isCardFlipped = false;
|
|
8955
|
+
this.showFlip = false;
|
|
8956
|
+
this.widgetType = 'df';
|
|
8957
|
+
this.widgetSubType = 'sdf';
|
|
8958
|
+
this.langtranslations.languageSelectedObservable.subscribe((/**
|
|
8959
|
+
* @return {?}
|
|
8960
|
+
*/
|
|
8961
|
+
function () {
|
|
8962
|
+
if (localStorage.getItem('websiteLanguage')) {
|
|
8963
|
+
_this.translate.setDefaultLang('en');
|
|
8964
|
+
/** @type {?} */
|
|
8965
|
+
var lang = (/** @type {?} */ (localStorage.getItem('websiteLanguage')));
|
|
8966
|
+
_this.translate.use(lang);
|
|
8967
|
+
}
|
|
8968
|
+
}));
|
|
8969
|
+
}
|
|
8970
|
+
/**
|
|
8971
|
+
* @return {?}
|
|
8972
|
+
*/
|
|
8973
|
+
CardWideComponent.prototype.ngOnInit = /**
|
|
8974
|
+
* @return {?}
|
|
8975
|
+
*/
|
|
8976
|
+
function () {
|
|
8977
|
+
/** @type {?} */
|
|
8978
|
+
var instanceConfig = this.configSvc.instanceConfig;
|
|
8979
|
+
if (instanceConfig) {
|
|
8980
|
+
this.defaultThumbnail = instanceConfig.logos.defaultContent || '';
|
|
8981
|
+
this.sourceLogos = instanceConfig.sources;
|
|
8982
|
+
this.defaultSLogo = instanceConfig.logos.defaultSourceLogo || '/assets/instances/eagle/app_logos/KarmayogiBharat_Logo.svg';
|
|
8983
|
+
}
|
|
8984
|
+
else {
|
|
8985
|
+
this.defaultThumbnail = '/assets/instances/eagle/app_logos/default.png';
|
|
8986
|
+
this.defaultSLogo = '/assets/instances/eagle/app_logos/KarmayogiBharat_Logo.svg';
|
|
8987
|
+
}
|
|
8988
|
+
};
|
|
8989
|
+
/**
|
|
8990
|
+
* @param {?} contentData
|
|
8991
|
+
* @return {?}
|
|
8992
|
+
*/
|
|
8993
|
+
CardWideComponent.prototype.getRedirectUrlData = /**
|
|
8994
|
+
* @param {?} contentData
|
|
8995
|
+
* @return {?}
|
|
8996
|
+
*/
|
|
8997
|
+
function (contentData) {
|
|
8998
|
+
this.contentData.emit(contentData);
|
|
8999
|
+
};
|
|
9000
|
+
/**
|
|
9001
|
+
* @return {?}
|
|
9002
|
+
*/
|
|
9003
|
+
CardWideComponent.prototype.raiseTelemetry = /**
|
|
9004
|
+
* @return {?}
|
|
9005
|
+
*/
|
|
9006
|
+
function () {
|
|
9007
|
+
// if(this.forPreview){
|
|
9008
|
+
// return
|
|
9009
|
+
// }
|
|
9010
|
+
this.events.raiseInteractTelemetry({
|
|
9011
|
+
type: 'click',
|
|
9012
|
+
subType: this.widgetType + "-" + this.widgetSubType,
|
|
9013
|
+
id: camelCase(this.widgetData.content.primaryCategory) + "-card",
|
|
9014
|
+
}, {
|
|
9015
|
+
id: this.widgetData.content.identifier,
|
|
9016
|
+
type: this.widgetData.content.primaryCategory,
|
|
9017
|
+
//context: this.widgetData.context,
|
|
9018
|
+
rollup: {},
|
|
9019
|
+
ver: "" + this.widgetData.content.version + '',
|
|
9020
|
+
}, {
|
|
9021
|
+
pageIdExt: camelCase(this.widgetData.content.primaryCategory) + "-card",
|
|
9022
|
+
module: camelCase(this.widgetData.content.primaryCategory),
|
|
9023
|
+
});
|
|
9024
|
+
};
|
|
9025
|
+
CardWideComponent.decorators = [
|
|
9026
|
+
{ type: Component, args: [{
|
|
9027
|
+
selector: 'sb-uic-card-wide',
|
|
9028
|
+
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-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>\n </div>\n </div>\n </a>\n</mat-card>\n",
|
|
9029
|
+
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:167px;height:117px;border-radius:12px}}"]
|
|
9030
|
+
}] }
|
|
9031
|
+
];
|
|
9032
|
+
/** @nocollapse */
|
|
9033
|
+
CardWideComponent.ctorParameters = function () { return [
|
|
9034
|
+
{ type: MatSnackBar },
|
|
9035
|
+
{ type: EventService },
|
|
9036
|
+
{ type: TranslateService },
|
|
9037
|
+
{ type: MultilingualTranslationsService },
|
|
9038
|
+
{ type: ConfigurationsService$1 }
|
|
9039
|
+
]; };
|
|
9040
|
+
CardWideComponent.propDecorators = {
|
|
9041
|
+
widgetData: [{ type: Input }],
|
|
9042
|
+
isLiveOrMarkForDeletion: [{ type: Input }],
|
|
9043
|
+
showIntranetContent: [{ type: Input }],
|
|
9044
|
+
isIntranetAllowedSettings: [{ type: Input }],
|
|
9045
|
+
isCardLoading: [{ type: Input }],
|
|
9046
|
+
contentData: [{ type: Output }]
|
|
9047
|
+
};
|
|
9048
|
+
return CardWideComponent;
|
|
9049
|
+
}());
|
|
9050
|
+
if (false) {
|
|
9051
|
+
/** @type {?} */
|
|
9052
|
+
CardWideComponent.prototype.widgetData;
|
|
9053
|
+
/** @type {?} */
|
|
9054
|
+
CardWideComponent.prototype.isLiveOrMarkForDeletion;
|
|
9055
|
+
/** @type {?} */
|
|
9056
|
+
CardWideComponent.prototype.showIntranetContent;
|
|
9057
|
+
/** @type {?} */
|
|
9058
|
+
CardWideComponent.prototype.isIntranetAllowedSettings;
|
|
9059
|
+
/** @type {?} */
|
|
9060
|
+
CardWideComponent.prototype.isCardLoading;
|
|
9061
|
+
/** @type {?} */
|
|
9062
|
+
CardWideComponent.prototype.contentData;
|
|
9063
|
+
/** @type {?} */
|
|
9064
|
+
CardWideComponent.prototype.isCardFlipped;
|
|
9065
|
+
/** @type {?} */
|
|
9066
|
+
CardWideComponent.prototype.defaultThumbnail;
|
|
9067
|
+
/** @type {?} */
|
|
9068
|
+
CardWideComponent.prototype.sourceLogos;
|
|
9069
|
+
/** @type {?} */
|
|
9070
|
+
CardWideComponent.prototype.defaultSLogo;
|
|
9071
|
+
/** @type {?} */
|
|
9072
|
+
CardWideComponent.prototype.showFlip;
|
|
9073
|
+
/** @type {?} */
|
|
9074
|
+
CardWideComponent.prototype.widgetType;
|
|
9075
|
+
/** @type {?} */
|
|
9076
|
+
CardWideComponent.prototype.widgetSubType;
|
|
9077
|
+
/**
|
|
9078
|
+
* @type {?}
|
|
9079
|
+
* @private
|
|
9080
|
+
*/
|
|
9081
|
+
CardWideComponent.prototype.snackBar;
|
|
9082
|
+
/**
|
|
9083
|
+
* @type {?}
|
|
9084
|
+
* @private
|
|
9085
|
+
*/
|
|
9086
|
+
CardWideComponent.prototype.events;
|
|
9087
|
+
/**
|
|
9088
|
+
* @type {?}
|
|
9089
|
+
* @private
|
|
9090
|
+
*/
|
|
9091
|
+
CardWideComponent.prototype.translate;
|
|
9092
|
+
/**
|
|
9093
|
+
* @type {?}
|
|
9094
|
+
* @private
|
|
9095
|
+
*/
|
|
9096
|
+
CardWideComponent.prototype.langtranslations;
|
|
9097
|
+
/**
|
|
9098
|
+
* @type {?}
|
|
9099
|
+
* @private
|
|
9100
|
+
*/
|
|
9101
|
+
CardWideComponent.prototype.configSvc;
|
|
9102
|
+
}
|
|
9103
|
+
|
|
9104
|
+
/**
|
|
9105
|
+
* @fileoverview added by tsickle
|
|
9106
|
+
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
9107
|
+
*/
|
|
9108
|
+
var CardsModule = /** @class */ (function () {
|
|
9109
|
+
function CardsModule() {
|
|
9110
|
+
}
|
|
9111
|
+
CardsModule.decorators = [
|
|
9112
|
+
{ type: NgModule, args: [{
|
|
9113
|
+
declarations: [CardResourceComponent, CardsComponent, CardPortraitComponent, CardUserComponent, CardLandscapeComponent, CardWideComponent],
|
|
9114
|
+
imports: [
|
|
9115
|
+
CommonModule,
|
|
9116
|
+
MatCardModule,
|
|
9117
|
+
MatButtonModule,
|
|
9118
|
+
MatIconModule,
|
|
9119
|
+
MatTooltipModule,
|
|
9120
|
+
RouterModule,
|
|
9121
|
+
PipePublicURLModule,
|
|
9122
|
+
DisplayContentTypeLibModule,
|
|
9123
|
+
DefaultThumbnailModule,
|
|
9124
|
+
PipeDurationTransformModule,
|
|
9125
|
+
SkeletonLoaderLibModule
|
|
8513
9126
|
],
|
|
8514
9127
|
entryComponents: [CardsComponent],
|
|
8515
9128
|
exports: [
|
|
@@ -8517,7 +9130,8 @@ var CardsModule = /** @class */ (function () {
|
|
|
8517
9130
|
CardResourceComponent,
|
|
8518
9131
|
CardPortraitComponent,
|
|
8519
9132
|
CardLandscapeComponent,
|
|
8520
|
-
CardUserComponent
|
|
9133
|
+
CardUserComponent,
|
|
9134
|
+
CardWideComponent
|
|
8521
9135
|
],
|
|
8522
9136
|
},] }
|
|
8523
9137
|
];
|
|
@@ -8665,7 +9279,7 @@ var CompetencyPassbookComponent = /** @class */ (function () {
|
|
|
8665
9279
|
*/
|
|
8666
9280
|
function () {
|
|
8667
9281
|
return __awaiter(this, void 0, void 0, function () {
|
|
8668
|
-
var addfilter, request, response, error_1;
|
|
9282
|
+
var addfilter, request, response, addFilter, error_1;
|
|
8669
9283
|
return __generator(this, function (_a) {
|
|
8670
9284
|
switch (_a.label) {
|
|
8671
9285
|
case 0:
|
|
@@ -8711,7 +9325,12 @@ var CompetencyPassbookComponent = /** @class */ (function () {
|
|
|
8711
9325
|
*/
|
|
8712
9326
|
function (partialSum, data) { return partialSum + data.count; }), 0);
|
|
8713
9327
|
this.selectedValue = this.competencyArea[0].name.toLowerCase();
|
|
8714
|
-
|
|
9328
|
+
addFilter = {
|
|
9329
|
+
"channel": [
|
|
9330
|
+
this.providerId
|
|
9331
|
+
]
|
|
9332
|
+
};
|
|
9333
|
+
this.getcompetencyTheme(this.competencyArea[0].name, addFilter);
|
|
8715
9334
|
this.loadCompetencyArea = false;
|
|
8716
9335
|
}
|
|
8717
9336
|
}
|
|
@@ -8869,6 +9488,7 @@ var CompetencyPassbookComponent = /** @class */ (function () {
|
|
|
8869
9488
|
if (response && response.results) {
|
|
8870
9489
|
if (response.results.result.facets) {
|
|
8871
9490
|
this.competencyTheme = response.results.result.facets[0].values;
|
|
9491
|
+
this.resetViewMore();
|
|
8872
9492
|
}
|
|
8873
9493
|
this.loadCometency = false;
|
|
8874
9494
|
}
|
|
@@ -8881,6 +9501,22 @@ var CompetencyPassbookComponent = /** @class */ (function () {
|
|
|
8881
9501
|
});
|
|
8882
9502
|
});
|
|
8883
9503
|
};
|
|
9504
|
+
/**
|
|
9505
|
+
* @return {?}
|
|
9506
|
+
*/
|
|
9507
|
+
CompetencyPassbookComponent.prototype.resetViewMore = /**
|
|
9508
|
+
* @return {?}
|
|
9509
|
+
*/
|
|
9510
|
+
function () {
|
|
9511
|
+
var _this = this;
|
|
9512
|
+
Object.keys(this.allcompetencyTheme).forEach((/**
|
|
9513
|
+
* @param {?} comp
|
|
9514
|
+
* @return {?}
|
|
9515
|
+
*/
|
|
9516
|
+
function (comp) {
|
|
9517
|
+
_this.allcompetencyTheme[comp]['viewMore'] = false;
|
|
9518
|
+
}));
|
|
9519
|
+
};
|
|
8884
9520
|
/**
|
|
8885
9521
|
* @param {?} data
|
|
8886
9522
|
* @return {?}
|
|
@@ -8891,6 +9527,7 @@ var CompetencyPassbookComponent = /** @class */ (function () {
|
|
|
8891
9527
|
*/
|
|
8892
9528
|
function (data) {
|
|
8893
9529
|
data.viewMore = !data.viewMore;
|
|
9530
|
+
this.allcompetencyTheme[data.name.toLowerCase()].viewMore = data.viewMore;
|
|
8894
9531
|
};
|
|
8895
9532
|
/**
|
|
8896
9533
|
* @param {?} event
|
|
@@ -9075,6 +9712,984 @@ var CompetencyPassbookModule = /** @class */ (function () {
|
|
|
9075
9712
|
return CompetencyPassbookModule;
|
|
9076
9713
|
}());
|
|
9077
9714
|
|
|
9715
|
+
/**
|
|
9716
|
+
* @fileoverview added by tsickle
|
|
9717
|
+
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
9718
|
+
*/
|
|
9719
|
+
/** @type {?} */
|
|
9720
|
+
var PROXY_SLAG_V8 = '/apis/proxies/v8';
|
|
9721
|
+
var ɵ0$3 = /**
|
|
9722
|
+
* @param {?} contentId
|
|
9723
|
+
* @param {?} contentType
|
|
9724
|
+
* @param {?} userId
|
|
9725
|
+
* @return {?}
|
|
9726
|
+
*/
|
|
9727
|
+
function (contentId, contentType, userId) {
|
|
9728
|
+
return PROXY_SLAG_V8 + "/ratings/v1/read/" + contentId + "/" + contentType + "/" + userId;
|
|
9729
|
+
}, ɵ1$2 = /**
|
|
9730
|
+
* @param {?} contentId
|
|
9731
|
+
* @param {?} contentType
|
|
9732
|
+
* @return {?}
|
|
9733
|
+
*/
|
|
9734
|
+
function (contentId, contentType) {
|
|
9735
|
+
return PROXY_SLAG_V8 + "/ratings/v1/summary/" + contentId + "/" + contentType;
|
|
9736
|
+
}, ɵ2$2 = /**
|
|
9737
|
+
* @param {?} contentId
|
|
9738
|
+
* @param {?} userID
|
|
9739
|
+
* @return {?}
|
|
9740
|
+
*/
|
|
9741
|
+
function (contentId, userID) {
|
|
9742
|
+
return PROXY_SLAG_V8 + "/ratings/v1/read/" + contentId + "/Course/" + userID;
|
|
9743
|
+
};
|
|
9744
|
+
/** @type {?} */
|
|
9745
|
+
var API_END_POINTS$3 = {
|
|
9746
|
+
GET_RATING: (ɵ0$3),
|
|
9747
|
+
ADD_OR_UPDATE: PROXY_SLAG_V8 + "/ratings/v1/upsert",
|
|
9748
|
+
GET_RATING_SUMMARY: (ɵ1$2),
|
|
9749
|
+
GET_RATING_LOOKUP: PROXY_SLAG_V8 + "/ratings/v1/ratingLookUp",
|
|
9750
|
+
GET_AUTHOR_REPLY: (ɵ2$2),
|
|
9751
|
+
POST_AUTHOR_REPLY: PROXY_SLAG_V8 + "/ratings/v2/read",
|
|
9752
|
+
};
|
|
9753
|
+
var RatingService = /** @class */ (function () {
|
|
9754
|
+
function RatingService(http) {
|
|
9755
|
+
this.http = http;
|
|
9756
|
+
}
|
|
9757
|
+
/**
|
|
9758
|
+
* @param {?} contentId
|
|
9759
|
+
* @param {?} contentType
|
|
9760
|
+
* @param {?} userId
|
|
9761
|
+
* @return {?}
|
|
9762
|
+
*/
|
|
9763
|
+
RatingService.prototype.getRating = /**
|
|
9764
|
+
* @param {?} contentId
|
|
9765
|
+
* @param {?} contentType
|
|
9766
|
+
* @param {?} userId
|
|
9767
|
+
* @return {?}
|
|
9768
|
+
*/
|
|
9769
|
+
function (contentId, contentType, userId) {
|
|
9770
|
+
/** @type {?} */
|
|
9771
|
+
var forPreview = window.location.href.includes('/public/') || window.location.href.includes('&preview=true');
|
|
9772
|
+
if (!forPreview) {
|
|
9773
|
+
return this.http.get(API_END_POINTS$3.GET_RATING(contentId, contentType, userId));
|
|
9774
|
+
}
|
|
9775
|
+
return of({});
|
|
9776
|
+
};
|
|
9777
|
+
/**
|
|
9778
|
+
* @param {?} req
|
|
9779
|
+
* @return {?}
|
|
9780
|
+
*/
|
|
9781
|
+
RatingService.prototype.addOrUpdateRating = /**
|
|
9782
|
+
* @param {?} req
|
|
9783
|
+
* @return {?}
|
|
9784
|
+
*/
|
|
9785
|
+
function (req) {
|
|
9786
|
+
return this.http.post(API_END_POINTS$3.ADD_OR_UPDATE, req);
|
|
9787
|
+
};
|
|
9788
|
+
/**
|
|
9789
|
+
* @param {?} contentId
|
|
9790
|
+
* @param {?} contentType
|
|
9791
|
+
* @return {?}
|
|
9792
|
+
*/
|
|
9793
|
+
RatingService.prototype.getRatingSummary = /**
|
|
9794
|
+
* @param {?} contentId
|
|
9795
|
+
* @param {?} contentType
|
|
9796
|
+
* @return {?}
|
|
9797
|
+
*/
|
|
9798
|
+
function (contentId, contentType) {
|
|
9799
|
+
/** @type {?} */
|
|
9800
|
+
var forPreview = window.location.href.includes('/public/') || window.location.href.includes('&preview=true');
|
|
9801
|
+
if (!forPreview) {
|
|
9802
|
+
return this.http.get(API_END_POINTS$3.GET_RATING_SUMMARY(contentId, contentType));
|
|
9803
|
+
}
|
|
9804
|
+
return of({});
|
|
9805
|
+
};
|
|
9806
|
+
/**
|
|
9807
|
+
* @param {?} req
|
|
9808
|
+
* @return {?}
|
|
9809
|
+
*/
|
|
9810
|
+
RatingService.prototype.getRatingLookup = /**
|
|
9811
|
+
* @param {?} req
|
|
9812
|
+
* @return {?}
|
|
9813
|
+
*/
|
|
9814
|
+
function (req) {
|
|
9815
|
+
return this.http.post(API_END_POINTS$3.GET_RATING_LOOKUP, req);
|
|
9816
|
+
};
|
|
9817
|
+
/**
|
|
9818
|
+
* @param {?} req
|
|
9819
|
+
* @return {?}
|
|
9820
|
+
*/
|
|
9821
|
+
RatingService.prototype.getRatingReply = /**
|
|
9822
|
+
* @param {?} req
|
|
9823
|
+
* @return {?}
|
|
9824
|
+
*/
|
|
9825
|
+
function (req) {
|
|
9826
|
+
/** @type {?} */
|
|
9827
|
+
var forPreview = window.location.href.includes('/public/') || window.location.href.includes('&preview=true');
|
|
9828
|
+
if (!forPreview) {
|
|
9829
|
+
return this.http.post(API_END_POINTS$3.POST_AUTHOR_REPLY, req);
|
|
9830
|
+
}
|
|
9831
|
+
return of({});
|
|
9832
|
+
};
|
|
9833
|
+
/**
|
|
9834
|
+
* @param {?} ratingIndex
|
|
9835
|
+
* @param {?} avg
|
|
9836
|
+
* @return {?}
|
|
9837
|
+
*/
|
|
9838
|
+
RatingService.prototype.getRatingIcon = /**
|
|
9839
|
+
* @param {?} ratingIndex
|
|
9840
|
+
* @param {?} avg
|
|
9841
|
+
* @return {?}
|
|
9842
|
+
*/
|
|
9843
|
+
function (ratingIndex, avg) {
|
|
9844
|
+
if (avg) {
|
|
9845
|
+
/** @type {?} */
|
|
9846
|
+
var avgRating = avg;
|
|
9847
|
+
/** @type {?} */
|
|
9848
|
+
var ratingFloor = Math.floor(avgRating)
|
|
9849
|
+
// const difference = avgRating - ratingIndex
|
|
9850
|
+
;
|
|
9851
|
+
// const difference = avgRating - ratingIndex
|
|
9852
|
+
if (ratingIndex <= ratingFloor) {
|
|
9853
|
+
return 'star';
|
|
9854
|
+
}
|
|
9855
|
+
if (ratingFloor === ratingIndex - 1 && avgRating % 1 >= 0.29 && avgRating % 1 < 0.71) {
|
|
9856
|
+
return 'star_half';
|
|
9857
|
+
}
|
|
9858
|
+
}
|
|
9859
|
+
return 'star';
|
|
9860
|
+
};
|
|
9861
|
+
/**
|
|
9862
|
+
* @param {?} ratingIndex
|
|
9863
|
+
* @param {?} avg
|
|
9864
|
+
* @return {?}
|
|
9865
|
+
*/
|
|
9866
|
+
RatingService.prototype.getRatingIconClass = /**
|
|
9867
|
+
* @param {?} ratingIndex
|
|
9868
|
+
* @param {?} avg
|
|
9869
|
+
* @return {?}
|
|
9870
|
+
*/
|
|
9871
|
+
function (ratingIndex, avg) {
|
|
9872
|
+
if (avg) {
|
|
9873
|
+
/** @type {?} */
|
|
9874
|
+
var avgRating = avg;
|
|
9875
|
+
/** @type {?} */
|
|
9876
|
+
var ratingFloor = Math.floor(avgRating);
|
|
9877
|
+
if (ratingIndex <= ratingFloor) {
|
|
9878
|
+
return true;
|
|
9879
|
+
}
|
|
9880
|
+
if (ratingFloor === ratingIndex - 1 && avgRating % 1 >= 0.29 && avgRating % 1 < 0.71) {
|
|
9881
|
+
return true;
|
|
9882
|
+
}
|
|
9883
|
+
if (ratingFloor === ratingIndex - 1 && avgRating % 1 > 0.71) {
|
|
9884
|
+
return true;
|
|
9885
|
+
}
|
|
9886
|
+
if (ratingFloor === ratingIndex - 1 && avgRating % 1 < 0.29) {
|
|
9887
|
+
return false;
|
|
9888
|
+
}
|
|
9889
|
+
}
|
|
9890
|
+
return false;
|
|
9891
|
+
};
|
|
9892
|
+
/**
|
|
9893
|
+
* @param {?} contentId
|
|
9894
|
+
* @param {?} userID
|
|
9895
|
+
* @return {?}
|
|
9896
|
+
*/
|
|
9897
|
+
RatingService.prototype.getAuthorReply = /**
|
|
9898
|
+
* @param {?} contentId
|
|
9899
|
+
* @param {?} userID
|
|
9900
|
+
* @return {?}
|
|
9901
|
+
*/
|
|
9902
|
+
function (contentId, userID) {
|
|
9903
|
+
return this.http.get(API_END_POINTS$3.GET_AUTHOR_REPLY(contentId, userID));
|
|
9904
|
+
};
|
|
9905
|
+
RatingService.decorators = [
|
|
9906
|
+
{ type: Injectable, args: [{
|
|
9907
|
+
providedIn: 'root',
|
|
9908
|
+
},] }
|
|
9909
|
+
];
|
|
9910
|
+
/** @nocollapse */
|
|
9911
|
+
RatingService.ctorParameters = function () { return [
|
|
9912
|
+
{ type: HttpClient }
|
|
9913
|
+
]; };
|
|
9914
|
+
/** @nocollapse */ RatingService.ngInjectableDef = ɵɵdefineInjectable({ factory: function RatingService_Factory() { return new RatingService(ɵɵinject(HttpClient)); }, token: RatingService, providedIn: "root" });
|
|
9915
|
+
return RatingService;
|
|
9916
|
+
}());
|
|
9917
|
+
if (false) {
|
|
9918
|
+
/** @type {?} */
|
|
9919
|
+
RatingService.prototype.http;
|
|
9920
|
+
}
|
|
9921
|
+
|
|
9922
|
+
/**
|
|
9923
|
+
* @fileoverview added by tsickle
|
|
9924
|
+
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
9925
|
+
*/
|
|
9926
|
+
var ScrollableItemDirective = /** @class */ (function () {
|
|
9927
|
+
function ScrollableItemDirective(el) {
|
|
9928
|
+
this.el = el;
|
|
9929
|
+
}
|
|
9930
|
+
/**
|
|
9931
|
+
* @param {?} blockValue
|
|
9932
|
+
* @return {?}
|
|
9933
|
+
*/
|
|
9934
|
+
ScrollableItemDirective.prototype.scrollIntoView = /**
|
|
9935
|
+
* @param {?} blockValue
|
|
9936
|
+
* @return {?}
|
|
9937
|
+
*/
|
|
9938
|
+
function (blockValue) {
|
|
9939
|
+
this.el.nativeElement.scrollIntoView({ behavior: 'smooth', block: blockValue });
|
|
9940
|
+
};
|
|
9941
|
+
ScrollableItemDirective.decorators = [
|
|
9942
|
+
{ type: Directive, args: [{
|
|
9943
|
+
selector: '[sbUicScrollableItem]'
|
|
9944
|
+
},] }
|
|
9945
|
+
];
|
|
9946
|
+
/** @nocollapse */
|
|
9947
|
+
ScrollableItemDirective.ctorParameters = function () { return [
|
|
9948
|
+
{ type: ElementRef }
|
|
9949
|
+
]; };
|
|
9950
|
+
ScrollableItemDirective.propDecorators = {
|
|
9951
|
+
key: [{ type: Input, args: ['sbUicScrollableItem',] }]
|
|
9952
|
+
};
|
|
9953
|
+
return ScrollableItemDirective;
|
|
9954
|
+
}());
|
|
9955
|
+
if (false) {
|
|
9956
|
+
/** @type {?} */
|
|
9957
|
+
ScrollableItemDirective.prototype.key;
|
|
9958
|
+
/**
|
|
9959
|
+
* @type {?}
|
|
9960
|
+
* @private
|
|
9961
|
+
*/
|
|
9962
|
+
ScrollableItemDirective.prototype.el;
|
|
9963
|
+
}
|
|
9964
|
+
|
|
9965
|
+
/**
|
|
9966
|
+
* @fileoverview added by tsickle
|
|
9967
|
+
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
9968
|
+
*/
|
|
9969
|
+
/** @type {?} */
|
|
9970
|
+
var API_END_POINTS$4 = {
|
|
9971
|
+
TOP_REVIEWS: "/apis/proxies/v8/ratings/v1/topReviews"
|
|
9972
|
+
};
|
|
9973
|
+
var UserContentRatingLibService = /** @class */ (function () {
|
|
9974
|
+
function UserContentRatingLibService(http) {
|
|
9975
|
+
this.http = http;
|
|
9976
|
+
}
|
|
9977
|
+
/**
|
|
9978
|
+
* @param {?} doId
|
|
9979
|
+
* @return {?}
|
|
9980
|
+
*/
|
|
9981
|
+
UserContentRatingLibService.prototype.fetchTopReviews = /**
|
|
9982
|
+
* @param {?} doId
|
|
9983
|
+
* @return {?}
|
|
9984
|
+
*/
|
|
9985
|
+
function (doId) {
|
|
9986
|
+
return this.http.get(API_END_POINTS$4.TOP_REVIEWS + "/" + doId);
|
|
9987
|
+
};
|
|
9988
|
+
UserContentRatingLibService.decorators = [
|
|
9989
|
+
{ type: Injectable, args: [{
|
|
9990
|
+
providedIn: 'root'
|
|
9991
|
+
},] }
|
|
9992
|
+
];
|
|
9993
|
+
/** @nocollapse */
|
|
9994
|
+
UserContentRatingLibService.ctorParameters = function () { return [
|
|
9995
|
+
{ type: HttpClient }
|
|
9996
|
+
]; };
|
|
9997
|
+
/** @nocollapse */ UserContentRatingLibService.ngInjectableDef = ɵɵdefineInjectable({ factory: function UserContentRatingLibService_Factory() { return new UserContentRatingLibService(ɵɵinject(HttpClient)); }, token: UserContentRatingLibService, providedIn: "root" });
|
|
9998
|
+
return UserContentRatingLibService;
|
|
9999
|
+
}());
|
|
10000
|
+
if (false) {
|
|
10001
|
+
/**
|
|
10002
|
+
* @type {?}
|
|
10003
|
+
* @private
|
|
10004
|
+
*/
|
|
10005
|
+
UserContentRatingLibService.prototype.http;
|
|
10006
|
+
}
|
|
10007
|
+
|
|
10008
|
+
/**
|
|
10009
|
+
* @fileoverview added by tsickle
|
|
10010
|
+
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
10011
|
+
*/
|
|
10012
|
+
var UserContentRatingLibComponent = /** @class */ (function () {
|
|
10013
|
+
function UserContentRatingLibComponent(ratingService, userRatingSvc) {
|
|
10014
|
+
this.ratingService = ratingService;
|
|
10015
|
+
this.userRatingSvc = userRatingSvc;
|
|
10016
|
+
this.currentIndex = 0;
|
|
10017
|
+
this.providerId = '';
|
|
10018
|
+
this.formData = '';
|
|
10019
|
+
this.emptyResponse = new EventEmitter();
|
|
10020
|
+
this.styleData = {};
|
|
10021
|
+
this.contentdata = [];
|
|
10022
|
+
}
|
|
10023
|
+
/**
|
|
10024
|
+
* @return {?}
|
|
10025
|
+
*/
|
|
10026
|
+
UserContentRatingLibComponent.prototype.ngOnInit = /**
|
|
10027
|
+
* @return {?}
|
|
10028
|
+
*/
|
|
10029
|
+
function () {
|
|
10030
|
+
this.styleData = this.formData && this.formData.sliderData && this.formData.sliderData.styleData;
|
|
10031
|
+
this.getTopReviews();
|
|
10032
|
+
};
|
|
10033
|
+
/**
|
|
10034
|
+
* @return {?}
|
|
10035
|
+
*/
|
|
10036
|
+
UserContentRatingLibComponent.prototype.getTopReviews = /**
|
|
10037
|
+
* @return {?}
|
|
10038
|
+
*/
|
|
10039
|
+
function () {
|
|
10040
|
+
var _this = this;
|
|
10041
|
+
this.contentdata = [];
|
|
10042
|
+
this.userRatingSvc.fetchTopReviews(this.providerId).subscribe((/**
|
|
10043
|
+
* @param {?} response
|
|
10044
|
+
* @return {?}
|
|
10045
|
+
*/
|
|
10046
|
+
function (response) {
|
|
10047
|
+
if (response && response.result && response.result.content.length) {
|
|
10048
|
+
response.result.content.forEach((/**
|
|
10049
|
+
* @param {?} contentEle
|
|
10050
|
+
* @return {?}
|
|
10051
|
+
*/
|
|
10052
|
+
function (contentEle) {
|
|
10053
|
+
/** @type {?} */
|
|
10054
|
+
var localData = {};
|
|
10055
|
+
localData['content'] = contentEle.contentInfo;
|
|
10056
|
+
localData['rating'] = contentEle.rating;
|
|
10057
|
+
localData['review'] = contentEle.review;
|
|
10058
|
+
localData['userDetails'] = contentEle.userDetails;
|
|
10059
|
+
localData['cardSubType'] = "card-wide-lib";
|
|
10060
|
+
localData['cardCustomeClass'] = "";
|
|
10061
|
+
_this.contentdata.push(localData);
|
|
10062
|
+
}));
|
|
10063
|
+
}
|
|
10064
|
+
else {
|
|
10065
|
+
_this.emptyResponse.emit(true);
|
|
10066
|
+
}
|
|
10067
|
+
}));
|
|
10068
|
+
};
|
|
10069
|
+
/**
|
|
10070
|
+
* @param {?} ratingIndex
|
|
10071
|
+
* @param {?} avg
|
|
10072
|
+
* @return {?}
|
|
10073
|
+
*/
|
|
10074
|
+
UserContentRatingLibComponent.prototype.getRatingIcon = /**
|
|
10075
|
+
* @param {?} ratingIndex
|
|
10076
|
+
* @param {?} avg
|
|
10077
|
+
* @return {?}
|
|
10078
|
+
*/
|
|
10079
|
+
function (ratingIndex, avg) {
|
|
10080
|
+
return this.ratingService.getRatingIcon(ratingIndex, avg);
|
|
10081
|
+
};
|
|
10082
|
+
/**
|
|
10083
|
+
* @param {?} ratingIndex
|
|
10084
|
+
* @param {?} avg
|
|
10085
|
+
* @return {?}
|
|
10086
|
+
*/
|
|
10087
|
+
UserContentRatingLibComponent.prototype.getRatingIconClass = /**
|
|
10088
|
+
* @param {?} ratingIndex
|
|
10089
|
+
* @param {?} avg
|
|
10090
|
+
* @return {?}
|
|
10091
|
+
*/
|
|
10092
|
+
function (ratingIndex, avg) {
|
|
10093
|
+
return this.ratingService.getRatingIconClass(ratingIndex, avg);
|
|
10094
|
+
};
|
|
10095
|
+
/**
|
|
10096
|
+
* @param {?} indexValue
|
|
10097
|
+
* @return {?}
|
|
10098
|
+
*/
|
|
10099
|
+
UserContentRatingLibComponent.prototype.getCurrentIndex = /**
|
|
10100
|
+
* @param {?} indexValue
|
|
10101
|
+
* @return {?}
|
|
10102
|
+
*/
|
|
10103
|
+
function (indexValue) {
|
|
10104
|
+
this.currentIndex = indexValue;
|
|
10105
|
+
this.handleScrollClick(indexValue);
|
|
10106
|
+
};
|
|
10107
|
+
/**
|
|
10108
|
+
* @param {?} dataValue
|
|
10109
|
+
* @return {?}
|
|
10110
|
+
*/
|
|
10111
|
+
UserContentRatingLibComponent.prototype.handleScrollClick = /**
|
|
10112
|
+
* @param {?} dataValue
|
|
10113
|
+
* @return {?}
|
|
10114
|
+
*/
|
|
10115
|
+
function (dataValue) {
|
|
10116
|
+
/** @type {?} */
|
|
10117
|
+
var item = this.scrollableItems.find((/**
|
|
10118
|
+
* @param {?} x
|
|
10119
|
+
* @return {?}
|
|
10120
|
+
*/
|
|
10121
|
+
function (x) { return x.key === dataValue; }));
|
|
10122
|
+
item.scrollIntoView("nearest");
|
|
10123
|
+
};
|
|
10124
|
+
UserContentRatingLibComponent.decorators = [
|
|
10125
|
+
{ type: Component, args: [{
|
|
10126
|
+
selector: 'sb-uic-user-content-rating',
|
|
10127
|
+
template: "<ng-container *ngIf=\"contentdata.length\">\n <sb-uic-sliders-ng-content [title]=\"'providerName'\" [currentIndex]=\"currentIndex\" (currentIndexValue)=\"getCurrentIndex($event)\" [loadNgContentData]=\"true\" [widgetData]=\"contentdata\" [styleData]=\"styleData\">\n <div sliderbody>\n <div class=\"flex justify-start md:justify-center users-block mb-4 \">\n <ng-container *ngFor=\"let userData of contentdata; let j = index\">\n <div class=\"avatar-block mr-1\" [sbUicScrollableItem]=\"j\"\n [ngClass]=\"{'user-active': j === currentIndex}\" (click)=\"handleScrollClick(currentIndex);currentIndex = j\">\n <sb-uic-avatar-photo [defaulfColor]=\"'#1B2133'\" [datalen]=\"1\" [randomColor]=\"true\" [name]=\"userData?.userDetails?.firstName\" [photoUrl]=\"userData?.userDetails?.profileImageUrl\" size=\"m-side-rating\">\n </sb-uic-avatar-photo>\n </div>\n </ng-container>\n </div>\n <div *ngFor=\"let ratingData of contentdata; let i = index\" [hidden]=\"i !== currentIndex\">\n <div class=\"user-ratting-wrapper flex flex-wrap justify-center\">\n <p class=\"userName w-full mb-4\">{{ratingData?.userDetails?.firstName}}</p>\n \n <div class=\"flex w-full flex-row justify-center gap-2 mb-4\">\n <mat-icon class=\"mat-icon material-icons rating-icon ws-mat-black16-text\"\n [ngClass]=\"{'ws-mat-orange-text': getRatingIconClass(rating, ratingData?.rating)}\"\n *ngFor=\"let rating of [1, 2, 3, 4, 5]\">\n {{ getRatingIcon(rating, ratingData?.rating) }}\n </mat-icon>\n </div>\n <p class=\"content-feedback w-full mb-4 pl-0 pr-0 md:pl-12 md:pr-12 \">{{ratingData?.review}}</p>\n \n <hr class=\"divider mb-4\">\n <p class=\"content-info w-full mb-4\">For The Content</p>\n <div class=\"w-full mr-0 md:mr-8 ml-0 md:ml-8\">\n <sb-uic-cards [widgetData]=\"ratingData\"></sb-uic-cards>\n </div>\n </div>\n </div>\n </div>\n </sb-uic-sliders-ng-content>\n</ng-container>\n\n",
|
|
10128
|
+
styles: [".user-ratting-wrapper .userName{font-family:Montserrat;font-size:20px;font-weight:600;line-height:24.38px;text-align:center}.user-ratting-wrapper .content-feedback{font-family:Lato;font-size:16px;font-weight:400;line-height:19.2px;text-align:center;color:rgba(0,0,0,.87)}.user-ratting-wrapper .content-info{font-family:Lato;font-size:14px;font-weight:700;line-height:16.8px;text-align:center;color:#666}.avatar-block{border:8px solid transparent;position:relative;cursor:pointer;width:48px;height:48px}.user-active{content:\"\";border:5px solid #f3972e;border-radius:50%;display:flex;justify-content:center;align-items:center;margin-bottom:0;width:48px;height:48px}.user-active::after{content:\" \";position:absolute;top:106%;left:50%;margin-left:-10px;border-left:10px solid transparent;border-right:10px solid transparent;border-top:18px solid #f3972e}.users-block{overflow-x:auto;padding:16px;padding-bottom:24px!important;width:100%}hr.divider{border:1px solid #f3972e;width:185px}"]
|
|
10129
|
+
}] }
|
|
10130
|
+
];
|
|
10131
|
+
/** @nocollapse */
|
|
10132
|
+
UserContentRatingLibComponent.ctorParameters = function () { return [
|
|
10133
|
+
{ type: RatingService },
|
|
10134
|
+
{ type: UserContentRatingLibService }
|
|
10135
|
+
]; };
|
|
10136
|
+
UserContentRatingLibComponent.propDecorators = {
|
|
10137
|
+
providerId: [{ type: Input }],
|
|
10138
|
+
formData: [{ type: Input }],
|
|
10139
|
+
emptyResponse: [{ type: Output }],
|
|
10140
|
+
scrollableItems: [{ type: ViewChildren, args: [ScrollableItemDirective,] }]
|
|
10141
|
+
};
|
|
10142
|
+
return UserContentRatingLibComponent;
|
|
10143
|
+
}());
|
|
10144
|
+
if (false) {
|
|
10145
|
+
/** @type {?} */
|
|
10146
|
+
UserContentRatingLibComponent.prototype.currentIndex;
|
|
10147
|
+
/** @type {?} */
|
|
10148
|
+
UserContentRatingLibComponent.prototype.providerId;
|
|
10149
|
+
/** @type {?} */
|
|
10150
|
+
UserContentRatingLibComponent.prototype.formData;
|
|
10151
|
+
/** @type {?} */
|
|
10152
|
+
UserContentRatingLibComponent.prototype.emptyResponse;
|
|
10153
|
+
/** @type {?} */
|
|
10154
|
+
UserContentRatingLibComponent.prototype.styleData;
|
|
10155
|
+
/** @type {?} */
|
|
10156
|
+
UserContentRatingLibComponent.prototype.contentdata;
|
|
10157
|
+
/** @type {?} */
|
|
10158
|
+
UserContentRatingLibComponent.prototype.scrollableItems;
|
|
10159
|
+
/** @type {?} */
|
|
10160
|
+
UserContentRatingLibComponent.prototype.ratingService;
|
|
10161
|
+
/** @type {?} */
|
|
10162
|
+
UserContentRatingLibComponent.prototype.userRatingSvc;
|
|
10163
|
+
}
|
|
10164
|
+
|
|
10165
|
+
/**
|
|
10166
|
+
* @fileoverview added by tsickle
|
|
10167
|
+
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
10168
|
+
*/
|
|
10169
|
+
var AvatarPhotoLibComponent = /** @class */ (function () {
|
|
10170
|
+
function AvatarPhotoLibComponent() {
|
|
10171
|
+
this.size = '';
|
|
10172
|
+
this.defaulfColor = '';
|
|
10173
|
+
this.randomColor = false;
|
|
10174
|
+
this.showBadge = false;
|
|
10175
|
+
this.showInitials = false;
|
|
10176
|
+
this.random = Math.random().toString(36).slice(2);
|
|
10177
|
+
// public initials!: string
|
|
10178
|
+
this.colors = [
|
|
10179
|
+
'#EB7181',
|
|
10180
|
+
'#306933',
|
|
10181
|
+
'#000000',
|
|
10182
|
+
'#3670B2',
|
|
10183
|
+
'#4E9E87',
|
|
10184
|
+
'#7E4C8D',
|
|
10185
|
+
];
|
|
10186
|
+
this.randomcolors = [
|
|
10187
|
+
'#EB7181',
|
|
10188
|
+
'#006400',
|
|
10189
|
+
'#000000',
|
|
10190
|
+
'#3670B2',
|
|
10191
|
+
'#4E9E87',
|
|
10192
|
+
'#7E4C8D',
|
|
10193
|
+
];
|
|
10194
|
+
}
|
|
10195
|
+
/**
|
|
10196
|
+
* @return {?}
|
|
10197
|
+
*/
|
|
10198
|
+
AvatarPhotoLibComponent.prototype.ngOnInit = /**
|
|
10199
|
+
* @return {?}
|
|
10200
|
+
*/
|
|
10201
|
+
function () {
|
|
10202
|
+
if (!this.photoUrl) {
|
|
10203
|
+
this.showInitials = true;
|
|
10204
|
+
if (!this.initials) {
|
|
10205
|
+
this.createInititals();
|
|
10206
|
+
}
|
|
10207
|
+
if (this.datalen === 1) {
|
|
10208
|
+
if (this.defaulfColor) {
|
|
10209
|
+
this.randomcolors = [
|
|
10210
|
+
this.defaulfColor
|
|
10211
|
+
];
|
|
10212
|
+
}
|
|
10213
|
+
else {
|
|
10214
|
+
this.randomcolors = [
|
|
10215
|
+
'#006400',
|
|
10216
|
+
];
|
|
10217
|
+
}
|
|
10218
|
+
}
|
|
10219
|
+
/** @type {?} */
|
|
10220
|
+
var randomIndex = Math.floor(Math.random() * Math.floor(this.colors.length));
|
|
10221
|
+
this.circleColor = this.colors[randomIndex];
|
|
10222
|
+
if (this.randomColor) {
|
|
10223
|
+
/** @type {?} */
|
|
10224
|
+
var randomIndex1 = Math.floor(Math.random() * Math.floor(this.randomcolors.length));
|
|
10225
|
+
this.circleColor = this.randomcolors[randomIndex1];
|
|
10226
|
+
}
|
|
10227
|
+
}
|
|
10228
|
+
};
|
|
10229
|
+
/**
|
|
10230
|
+
* @param {?} change
|
|
10231
|
+
* @return {?}
|
|
10232
|
+
*/
|
|
10233
|
+
AvatarPhotoLibComponent.prototype.ngOnChanges = /**
|
|
10234
|
+
* @param {?} change
|
|
10235
|
+
* @return {?}
|
|
10236
|
+
*/
|
|
10237
|
+
function (change) {
|
|
10238
|
+
if (change.name.currentValue !== change.name.previousValue && !change.name.firstChange) {
|
|
10239
|
+
this.createInititals();
|
|
10240
|
+
}
|
|
10241
|
+
};
|
|
10242
|
+
Object.defineProperty(AvatarPhotoLibComponent.prototype, "userInitials", {
|
|
10243
|
+
get: /**
|
|
10244
|
+
* @return {?}
|
|
10245
|
+
*/
|
|
10246
|
+
function () {
|
|
10247
|
+
return this.initials;
|
|
10248
|
+
},
|
|
10249
|
+
enumerable: true,
|
|
10250
|
+
configurable: true
|
|
10251
|
+
});
|
|
10252
|
+
/**
|
|
10253
|
+
* @private
|
|
10254
|
+
* @return {?}
|
|
10255
|
+
*/
|
|
10256
|
+
AvatarPhotoLibComponent.prototype.createInititals = /**
|
|
10257
|
+
* @private
|
|
10258
|
+
* @return {?}
|
|
10259
|
+
*/
|
|
10260
|
+
function () {
|
|
10261
|
+
/** @type {?} */
|
|
10262
|
+
var initials = '';
|
|
10263
|
+
/** @type {?} */
|
|
10264
|
+
var array = (this.name + " ").toString().split(' ');
|
|
10265
|
+
if (array[0] !== 'undefined' && typeof array[1] !== 'undefined') {
|
|
10266
|
+
initials += array[0].charAt(0);
|
|
10267
|
+
initials += array[1].charAt(0);
|
|
10268
|
+
}
|
|
10269
|
+
else {
|
|
10270
|
+
for (var i = 0; i < this.name.length; i += 1) {
|
|
10271
|
+
if (this.name.charAt(i) === ' ') {
|
|
10272
|
+
continue;
|
|
10273
|
+
}
|
|
10274
|
+
if (this.name.charAt(i) === this.name.charAt(i)) {
|
|
10275
|
+
initials += this.name.charAt(i);
|
|
10276
|
+
if (initials.length === 2) {
|
|
10277
|
+
break;
|
|
10278
|
+
}
|
|
10279
|
+
}
|
|
10280
|
+
}
|
|
10281
|
+
}
|
|
10282
|
+
this.initials = initials.toUpperCase();
|
|
10283
|
+
};
|
|
10284
|
+
AvatarPhotoLibComponent.decorators = [
|
|
10285
|
+
{ type: Component, args: [{
|
|
10286
|
+
selector: 'sb-uic-avatar-photo',
|
|
10287
|
+
template: "<div id=\"user_icon\" [ngClass]=\"{'circle-s' : size=== 's',\n'circle-m' : size=== 'm',\n'circle-l' : size=== 'l',\n'circle-xl' : size=== 'xl',\n'circle-xxl' : size=== 'xxl',\n'circle-l-xs' : size=== 'l-xs',\n'circle-l-s' : size=== 'l-s',\n'circle-xl-s' : size=== 'xl-s',\n'circle-r-m': size=== 'round-m',\n'circle-r-p-m': size=== 'profile-round-m',\n'circle-m-side': size=== 'm-side',\n'circle-r-m-48': size=== 'm-side-rating',\n'circle-m-recommended': size==='m-recommended',\n'circle-xxl-s': size=== 'xxl-s'}\" [ngStyle]=\"{'background-color': circleColor }\">\n <img *ngIf=\"!showInitials\" loading=\"lazy\" src=\"{{photoUrl}}\" [alt]=\"photoUrl? '' :(name || userInitials || size || random)\">\n\n <div *ngIf=\"showInitials\" class=\"initials\" i18n-aria-label>\n {{ userInitials }} \n </div>\n <div *ngIf=\"showBadge\"><span class=\"profile-badge\"> \n <img src=\"fusion-assets/images/profile-badge.png\">\n </span></div>\n\n <!-- <div *ngIf=\"imageType === 'user-photo'\">\n <img *ngIf=\"imageUrl\" [src]=\"imageUrl\" alt=\"user-image\" class=\"user-image\" [ngClass]=\"{'user-image-small': imageSize === 'small'}\">\n <div class=\"user-image\" [ngClass]=\"{'user-image-small': imageSize === 'small'}\">\n <span class=\"name-initials-image font-normal ws-mat-primary-default-text ws-mat-accent-background\"\n *ngIf=\"!imageUrl\">{{ shortName }}</span>\n </div>\n </div> -->\n</div>",
|
|
10288
|
+
styles: ["@charset \"UTF-8\";.success-checkmark::after{content:\"\u2714\";position:absolute;left:25px;top:20px;width:11px;height:11px;border:1px solid #1d8923;background:#1d8923;border-radius:50%;color:#fff;line-height:11px;text-align:center;font-size:9px}.profile-badge{position:absolute;top:10px;right:0}.profile-badge img{height:15px!important;width:15px!important}.circle-s{border-radius:50%;width:24px;height:24px;display:flex;justify-content:center;align-items:center}.circle-s img{border-radius:50%;width:100%;height:100%}.circle-s .initials{color:#fff;font-size:10px;line-height:12px;letter-spacing:.2625px}.circle-m{border-radius:50%;width:72px!important;height:72px!important;display:flex;justify-content:center;align-items:center;margin-top:-36px}.circle-m img{border-radius:10%;width:40px;height:40px}.circle-m .initials{color:#fff;font-size:14px;line-height:19px;letter-spacing:.2625px}.circle-l{border-radius:50%;width:80px;height:80px;display:flex;justify-content:center;align-items:center}.circle-l img{border-radius:10%;width:80px;height:80px}.circle-l .initials{color:#fff;font-size:20px;line-height:19px;letter-spacing:.2625px}.circle-xl{border-radius:50%;width:105px;height:105px;display:flex;justify-content:center;align-items:center}.circle-xl img{border-radius:10%;width:105px;height:105px}.circle-xl .initials{color:#fff;font-size:20px;line-height:19px;letter-spacing:.2625px}.circle-xxl{border-radius:50%;width:145px;height:145px;display:flex;justify-content:center;align-items:center}.circle-xxl img{border-radius:10%;width:145px;height:145px}.circle-xxl .initials{color:#fff;font-size:20px;line-height:19px;letter-spacing:.2625px}.circle-l-xs{border-radius:50%;width:29px;height:29px;display:flex;justify-content:center;align-items:center}.circle-l-xs img{border-radius:50%;width:100%;height:100%}.circle-l-xs .initials{color:#fff;font-size:12px;line-height:12px;letter-spacing:.2625px}.circle-l-s{border-radius:50%;width:80px;height:80px;display:flex;justify-content:center;align-items:center}.circle-l-s img{border-radius:4px;width:80px;height:80px}.circle-l-s .initials{color:#fff;font-size:24px;line-height:24px;letter-spacing:.2625px}.circle-xl-s{border-radius:50%;width:125px;height:125px;display:flex;justify-content:center;align-items:center}.circle-xl-s img{border-radius:4px;width:152px;height:125px}.circle-xl-s .initials{color:#fff;font-size:32px;line-height:32px;letter-spacing:.2625px}.circle-xxl-s{border-radius:50%;width:208px;height:208px;display:flex;justify-content:center;align-items:center}.circle-xxl-s img{border-radius:50%;width:100%;height:100%}.circle-xxl-s .initials{color:#fff;font-size:40px;line-height:40px;letter-spacing:.2625px}.circle-r-m{border-radius:50%;width:50px;height:50px;display:flex;justify-content:center;align-items:center}.circle-r-m img{border-radius:50%;width:100%;height:100%}.circle-r-m .initials{color:#fff;font-size:16px;line-height:40px;letter-spacing:.2625px}.circle-r-m-48{border-radius:50%;width:48px;height:48px;display:flex;justify-content:center;align-items:center}.circle-r-m-48 img{border-radius:50%;width:100%;height:100%}.circle-r-m-48 .initials{color:#fff;font-size:16px;line-height:40px;letter-spacing:.2625px}.circle-r-p-m{border-radius:50%;width:40px;height:40px;display:flex;justify-content:center;align-items:center}.circle-r-p-m img{border-radius:50%;width:100%;height:100%}.circle-r-p-m .initials{color:#fff;font-size:16px;line-height:40px;letter-spacing:.2625px}.circle-m-side{border-radius:50%;width:72px!important;height:72px!important;display:flex;justify-content:center;align-items:center}.circle-m-side img{border-radius:10%;width:40px;height:40px}.circle-m-side .initials{color:#fff;font-size:14px;line-height:19px;letter-spacing:.2625px}@media only screen and (max-width:960px){.circle-xxl-s{width:100px;height:100px}.circle-xxl-s .initials{font-size:24px;line-height:24px}}.circle-m-recommended{border-radius:50%;width:72px!important;height:72px!important;display:flex;justify-content:center;align-items:center;margin-top:-49px}.circle-m-recommended img{border-radius:10%;width:40px;height:40px}.circle-m-recommended .initials{color:#fff;font-size:14px;line-height:19px;letter-spacing:.2625px}.circle-l-s::before{content:\"\";border:1px solid red}"]
|
|
10289
|
+
}] }
|
|
10290
|
+
];
|
|
10291
|
+
AvatarPhotoLibComponent.propDecorators = {
|
|
10292
|
+
datalen: [{ type: Input }],
|
|
10293
|
+
photoUrl: [{ type: Input }],
|
|
10294
|
+
name: [{ type: Input }],
|
|
10295
|
+
size: [{ type: Input }],
|
|
10296
|
+
defaulfColor: [{ type: Input }],
|
|
10297
|
+
randomColor: [{ type: Input }],
|
|
10298
|
+
initials: [{ type: Input }],
|
|
10299
|
+
showBadge: [{ type: Input }]
|
|
10300
|
+
};
|
|
10301
|
+
return AvatarPhotoLibComponent;
|
|
10302
|
+
}());
|
|
10303
|
+
if (false) {
|
|
10304
|
+
/** @type {?} */
|
|
10305
|
+
AvatarPhotoLibComponent.prototype.datalen;
|
|
10306
|
+
/** @type {?} */
|
|
10307
|
+
AvatarPhotoLibComponent.prototype.photoUrl;
|
|
10308
|
+
/** @type {?} */
|
|
10309
|
+
AvatarPhotoLibComponent.prototype.name;
|
|
10310
|
+
/** @type {?} */
|
|
10311
|
+
AvatarPhotoLibComponent.prototype.size;
|
|
10312
|
+
/** @type {?} */
|
|
10313
|
+
AvatarPhotoLibComponent.prototype.defaulfColor;
|
|
10314
|
+
/** @type {?} */
|
|
10315
|
+
AvatarPhotoLibComponent.prototype.randomColor;
|
|
10316
|
+
/** @type {?} */
|
|
10317
|
+
AvatarPhotoLibComponent.prototype.initials;
|
|
10318
|
+
/** @type {?} */
|
|
10319
|
+
AvatarPhotoLibComponent.prototype.showBadge;
|
|
10320
|
+
/** @type {?} */
|
|
10321
|
+
AvatarPhotoLibComponent.prototype.showInitials;
|
|
10322
|
+
/** @type {?} */
|
|
10323
|
+
AvatarPhotoLibComponent.prototype.circleColor;
|
|
10324
|
+
/** @type {?} */
|
|
10325
|
+
AvatarPhotoLibComponent.prototype.random;
|
|
10326
|
+
/**
|
|
10327
|
+
* @type {?}
|
|
10328
|
+
* @private
|
|
10329
|
+
*/
|
|
10330
|
+
AvatarPhotoLibComponent.prototype.colors;
|
|
10331
|
+
/**
|
|
10332
|
+
* @type {?}
|
|
10333
|
+
* @private
|
|
10334
|
+
*/
|
|
10335
|
+
AvatarPhotoLibComponent.prototype.randomcolors;
|
|
10336
|
+
}
|
|
10337
|
+
|
|
10338
|
+
/**
|
|
10339
|
+
* @fileoverview added by tsickle
|
|
10340
|
+
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
10341
|
+
*/
|
|
10342
|
+
var AvatarPhotoLibModule = /** @class */ (function () {
|
|
10343
|
+
function AvatarPhotoLibModule() {
|
|
10344
|
+
}
|
|
10345
|
+
AvatarPhotoLibModule.decorators = [
|
|
10346
|
+
{ type: NgModule, args: [{
|
|
10347
|
+
declarations: [AvatarPhotoLibComponent],
|
|
10348
|
+
imports: [
|
|
10349
|
+
CommonModule,
|
|
10350
|
+
RouterModule,
|
|
10351
|
+
MatButtonModule,
|
|
10352
|
+
MatIconModule,
|
|
10353
|
+
MatMenuModule,
|
|
10354
|
+
MatRippleModule,
|
|
10355
|
+
SbUiResolverModule,
|
|
10356
|
+
],
|
|
10357
|
+
exports: [AvatarPhotoLibComponent],
|
|
10358
|
+
entryComponents: [AvatarPhotoLibComponent],
|
|
10359
|
+
},] }
|
|
10360
|
+
];
|
|
10361
|
+
return AvatarPhotoLibModule;
|
|
10362
|
+
}());
|
|
10363
|
+
|
|
10364
|
+
/**
|
|
10365
|
+
* @fileoverview added by tsickle
|
|
10366
|
+
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
10367
|
+
*/
|
|
10368
|
+
var SlidersNgContentLibComponent = /** @class */ (function (_super) {
|
|
10369
|
+
__extends(SlidersNgContentLibComponent, _super);
|
|
10370
|
+
function SlidersNgContentLibComponent(events, valueSvc) {
|
|
10371
|
+
var _this = _super.call(this) || this;
|
|
10372
|
+
_this.events = events;
|
|
10373
|
+
_this.valueSvc = valueSvc;
|
|
10374
|
+
_this.title = '';
|
|
10375
|
+
_this.loadNgContentData = false;
|
|
10376
|
+
_this.autoScroll = false;
|
|
10377
|
+
_this.currentIndexValue = new EventEmitter();
|
|
10378
|
+
_this.id = "banner_" + Math.random();
|
|
10379
|
+
_this.defaultMenuSubscribe = null;
|
|
10380
|
+
_this.isLtMedium$ = _this.valueSvc.isLtMedium$;
|
|
10381
|
+
_this.currentIndex = 0;
|
|
10382
|
+
_this.slideInterval = null;
|
|
10383
|
+
_this.isMobile = false;
|
|
10384
|
+
return _this;
|
|
10385
|
+
}
|
|
10386
|
+
/**
|
|
10387
|
+
* @return {?}
|
|
10388
|
+
*/
|
|
10389
|
+
SlidersNgContentLibComponent.prototype.ngOnInit = /**
|
|
10390
|
+
* @return {?}
|
|
10391
|
+
*/
|
|
10392
|
+
function () {
|
|
10393
|
+
var _this = this;
|
|
10394
|
+
if (this.autoScroll) {
|
|
10395
|
+
this.reInitiateSlideInterval();
|
|
10396
|
+
}
|
|
10397
|
+
this.defaultMenuSubscribe = this.isLtMedium$.subscribe((/**
|
|
10398
|
+
* @param {?} isLtMedium
|
|
10399
|
+
* @return {?}
|
|
10400
|
+
*/
|
|
10401
|
+
function (isLtMedium) {
|
|
10402
|
+
_this.isMobile = isLtMedium;
|
|
10403
|
+
}));
|
|
10404
|
+
};
|
|
10405
|
+
/**
|
|
10406
|
+
* @return {?}
|
|
10407
|
+
*/
|
|
10408
|
+
SlidersNgContentLibComponent.prototype.reInitiateSlideInterval = /**
|
|
10409
|
+
* @return {?}
|
|
10410
|
+
*/
|
|
10411
|
+
function () {
|
|
10412
|
+
var _this = this;
|
|
10413
|
+
if (this.widgetData && this.widgetData.length > 1) {
|
|
10414
|
+
try {
|
|
10415
|
+
if (this.slideInterval) {
|
|
10416
|
+
this.slideInterval.unsubscribe();
|
|
10417
|
+
}
|
|
10418
|
+
}
|
|
10419
|
+
catch (e) {
|
|
10420
|
+
}
|
|
10421
|
+
finally {
|
|
10422
|
+
this.slideInterval = interval(8000).subscribe((/**
|
|
10423
|
+
* @return {?}
|
|
10424
|
+
*/
|
|
10425
|
+
function () {
|
|
10426
|
+
if (_this.currentIndex === _this.widgetData.length - 1) {
|
|
10427
|
+
_this.currentIndex = 0;
|
|
10428
|
+
_this.currentIndexValue.emit(_this.currentIndex);
|
|
10429
|
+
}
|
|
10430
|
+
else {
|
|
10431
|
+
_this.currentIndex += 1;
|
|
10432
|
+
_this.currentIndexValue.emit(_this.currentIndex);
|
|
10433
|
+
}
|
|
10434
|
+
}));
|
|
10435
|
+
}
|
|
10436
|
+
}
|
|
10437
|
+
};
|
|
10438
|
+
/**
|
|
10439
|
+
* @param {?} index
|
|
10440
|
+
* @return {?}
|
|
10441
|
+
*/
|
|
10442
|
+
SlidersNgContentLibComponent.prototype.slideTo = /**
|
|
10443
|
+
* @param {?} index
|
|
10444
|
+
* @return {?}
|
|
10445
|
+
*/
|
|
10446
|
+
function (index) {
|
|
10447
|
+
if (index >= 0 && index < this.widgetData.length) {
|
|
10448
|
+
this.currentIndex = index;
|
|
10449
|
+
this.currentIndexValue.emit(this.currentIndex);
|
|
10450
|
+
}
|
|
10451
|
+
else if (index === this.widgetData.length) {
|
|
10452
|
+
this.currentIndex = 0;
|
|
10453
|
+
this.currentIndexValue.emit(this.currentIndex);
|
|
10454
|
+
}
|
|
10455
|
+
else {
|
|
10456
|
+
this.currentIndex = this.widgetData.length + index;
|
|
10457
|
+
this.currentIndexValue.emit(this.currentIndex);
|
|
10458
|
+
}
|
|
10459
|
+
if (this.autoScroll) {
|
|
10460
|
+
this.reInitiateSlideInterval();
|
|
10461
|
+
}
|
|
10462
|
+
};
|
|
10463
|
+
Object.defineProperty(SlidersNgContentLibComponent.prototype, "isOpenInNewTab", {
|
|
10464
|
+
get: /**
|
|
10465
|
+
* @return {?}
|
|
10466
|
+
*/
|
|
10467
|
+
function () {
|
|
10468
|
+
/** @type {?} */
|
|
10469
|
+
var currentData = this.widgetData[this.currentIndex];
|
|
10470
|
+
if (currentData.redirectUrl && currentData.redirectUrl.includes('mailto') || this.widgetData[this.currentIndex].openInNewTab) {
|
|
10471
|
+
return true;
|
|
10472
|
+
}
|
|
10473
|
+
return false;
|
|
10474
|
+
},
|
|
10475
|
+
enumerable: true,
|
|
10476
|
+
configurable: true
|
|
10477
|
+
});
|
|
10478
|
+
/**
|
|
10479
|
+
* @return {?}
|
|
10480
|
+
*/
|
|
10481
|
+
SlidersNgContentLibComponent.prototype.openInNewTab = /**
|
|
10482
|
+
* @return {?}
|
|
10483
|
+
*/
|
|
10484
|
+
function () {
|
|
10485
|
+
/** @type {?} */
|
|
10486
|
+
var currentData = this.widgetData[this.currentIndex];
|
|
10487
|
+
if (currentData.redirectUrl && currentData.redirectUrl.includes('mailto') || this.widgetData[this.currentIndex].openInNewTab) {
|
|
10488
|
+
window.open(currentData.redirectUrl);
|
|
10489
|
+
}
|
|
10490
|
+
};
|
|
10491
|
+
/**
|
|
10492
|
+
* @param {?} bannerUrl
|
|
10493
|
+
* @return {?}
|
|
10494
|
+
*/
|
|
10495
|
+
SlidersNgContentLibComponent.prototype.raiseTelemetry = /**
|
|
10496
|
+
* @param {?} bannerUrl
|
|
10497
|
+
* @return {?}
|
|
10498
|
+
*/
|
|
10499
|
+
function (bannerUrl) {
|
|
10500
|
+
this.openInNewTab();
|
|
10501
|
+
/** @type {?} */
|
|
10502
|
+
var path = window.location.pathname.replace('/', '');
|
|
10503
|
+
/** @type {?} */
|
|
10504
|
+
var url = path + window.location.search;
|
|
10505
|
+
this.events.raiseInteractTelemetry({
|
|
10506
|
+
type: 'click',
|
|
10507
|
+
subType: 'banner',
|
|
10508
|
+
}, {
|
|
10509
|
+
pageUrl: url,
|
|
10510
|
+
bannerRedirectUrl: bannerUrl,
|
|
10511
|
+
}, {
|
|
10512
|
+
pageIdExt: 'banner',
|
|
10513
|
+
module: WsEvents.EnumTelemetrymodules.CONTENT,
|
|
10514
|
+
});
|
|
10515
|
+
};
|
|
10516
|
+
/**
|
|
10517
|
+
* @return {?}
|
|
10518
|
+
*/
|
|
10519
|
+
SlidersNgContentLibComponent.prototype.ngOnDestroy = /**
|
|
10520
|
+
* @return {?}
|
|
10521
|
+
*/
|
|
10522
|
+
function () {
|
|
10523
|
+
if (this.defaultMenuSubscribe) {
|
|
10524
|
+
this.defaultMenuSubscribe.unsubscribe();
|
|
10525
|
+
}
|
|
10526
|
+
};
|
|
10527
|
+
SlidersNgContentLibComponent.decorators = [
|
|
10528
|
+
{ type: Component, args: [{
|
|
10529
|
+
selector: 'sb-uic-sliders-ng-content',
|
|
10530
|
+
template: "<div class=\"banner-container {{isMobile? styleData?.responsive?.bannerMetaClass : styleData?.bannerMetaClass}}\" (swipeleft)=\"slideTo(currentIndex + 1)\" (swiperight)=\"slideTo(currentIndex - 1)\"\n *ngIf=\"widgetData?.length > 1\" [style.height]=\"isMobile? styleData?.responsive?.customHeight : styleData?.customHeight\"\n [ngStyle]=\"{'border-radius': styleData?.borderRadius || '12px'}\">\n <ng-container *ngIf=\"!loadNgContentData\">\n <a (click)=\"raiseTelemetry(widgetData[currentIndex].redirectUrl)\"\n [routerLink]=\" !isOpenInNewTab && widgetData[currentIndex].redirectUrl? widgetData[currentIndex].redirectUrl : null\" class=\"banner-overlay\"\n [ngClass]=\"{'cursor-auto': !widgetData[currentIndex].redirectUrl}\">\n <div class=\"banner WidgetInstanceId\" *ngFor=\"let slide of widgetData; let i = index\" [hidden]=\"i !== currentIndex\">\n <img i18n-alt alt=\"Page Banner\" [src]=\"slide.banners\" wsUtilsImageResponsive class=\"banner-image\" />\n </div>\n </a>\n <ng-container *ngIf=\"isMobile && styleData?.responsive?.dots !== 'hidden' || !isMobile && styleData?.dots !== 'hidden'\">\n <div class=\"banner-meta {{isMobile? styleData?.responsive?.bannerMetaAlign : styleData?.bannerMetaAlign}}\">\n <a [routerLink]=\" !isOpenInNewTab && widgetData[currentIndex].redirectUrl? widgetData[currentIndex].redirectUrl : null\" class=\"banner-title text-truncate\"\n *ngIf=\"widgetData[currentIndex].title\" [title]=\"widgetData[currentIndex].title\">\n {{ widgetData[currentIndex].title }}\n </a>\n <div class=\"dots-container\" *ngIf=\"widgetData?.length > 1\">\n <span class=\"dot\" [ngClass]=\"{ active: j === currentIndex }\" *ngFor=\"let slide of widgetData; let j = index\"\n (click)=\"slideTo(j)\"></span>\n </div>\n </div>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"loadNgContentData\">\n <!-- <div class=\"banner WidgetInstanceId\" *ngFor=\"let slide of widgetData; let i = index\" [hidden]=\"i !== currentIndex\"> -->\n <ng-content select=\"[sliderbody]\"></ng-content>\n <!-- </div> -->\n <ng-container *ngIf=\"isMobile && styleData?.responsive?.dots !== 'hidden' || !isMobile && styleData?.dots !== 'hidden'\">\n <div class=\"banner-meta {{isMobile? styleData?.responsive?.bannerMetaAlign : styleData?.bannerMetaAlign}}\">\n <a [routerLink]=\" !isOpenInNewTab && widgetData[currentIndex].redirectUrl? widgetData[currentIndex].redirectUrl : null\" class=\"banner-title text-truncate\"\n *ngIf=\"widgetData[currentIndex].title\" [title]=\"widgetData[currentIndex].title\">\n {{ widgetData[currentIndex].title }}\n </a>\n <div class=\"dots-container\" *ngIf=\"widgetData?.length > 1\">\n <span class=\"dot\" [ngClass]=\"{ active: j === currentIndex }\" *ngFor=\"let slide of widgetData; let j = index\"\n (click)=\"slideTo(j)\"></span>\n <ng-content select=\"[sliderMeta]\"></ng-content>\n </div>\n </div>\n </ng-container>\n </ng-container>\n <div class=\"navigation {{isMobile? styleData?.responsive?.arrowsPlacement : styleData?.arrowsPlacement}}\" \n *ngIf=\"isMobile && styleData?.responsive?.navigationArrows !== 'hidden' || !isMobile && styleData?.navigationArrows !== 'hidden'\">\n <a *ngIf=\"widgetData?.length > 1\" role=\"button\" class=\"prev\" (click)=\"slideTo(currentIndex - 1)\">❮</a>\n <a *ngIf=\"widgetData?.length > 1\" role=\"button\" class=\"next\" (click)=\"slideTo(currentIndex + 1)\">❯</a>\n </div>\n</div>\n<div class=\"banner-container-solo margin-top-s\" *ngIf=\"widgetData?.length == 1\">\n <img i18n-alt alt=\"Page Banner\" width=\"100%\" height=\"100%\" [src]=\"widgetData[0].banners\" wsUtilsImageResponsive class=\"banner-image-solo\" />\n</div>\n\n<!-- <ng-container *ngIf=\"!widgetData?.length\">\n <div class=\"slider default-slider h-full\">\n <div class=\"relative h-full\">\n <img class=\"h-full\" src=\"assets/icons/home/default-slider-image.svg\" alt=\"\">\n <div class=\"default-title rounded-full\">\n <p class=\"mat-h1\">{{title}}</p>\n </div>\n </div>\n </div>\n</ng-container> -->\n",
|
|
10531
|
+
styles: [".banner-container{min-height:243px;position:relative;margin:auto;padding-bottom:40px}.banner-container.inline-meta{padding-bottom:0!important}.banner-container.flat .banner .banner-image{border-radius:0!important}.banner-overlay{z-index:1;top:0;left:0;width:100%;height:100%;background:linear-gradient(to left,rgba(0,0,0,.25) 0,rgba(0,0,0,0) 15%,rgba(0,0,0,0) 85%,rgba(0,0,0,.25) 100%);border-radius:inherit}.banner{-webkit-animation-name:fade;-webkit-animation-duration:1.5s;animation-name:fade;animation-duration:1.5s;border-radius:inherit;height:inherit}.banner .banner-image{width:100%;min-height:243px;display:block;border-radius:inherit;height:inherit}.banner-meta{text-align:center;z-index:2;padding:8px 12px;position:absolute;bottom:0;left:50%;border-radius:12px;transform:translateX(-50%);box-sizing:border-box}.banner-meta.left{left:0;transform:translateX(0)}.banner-meta.right{left:100%;transform:translateX(-100%)}.banner-meta.top-center{left:0;bottom:100%;transform:translateX(-100%)}.banner-meta .banner-title{color:#f2f2f2;margin-bottom:8px;font-size:1.1rem}@media only screen and (max-width:599px){.banner-meta .banner-title{display:none}}.banner-meta .dots-container{padding:8px;display:flex;align-items:center;justify-content:center}.banner-meta .dots-container .dot{cursor:pointer;height:6px;width:6px;margin:0 4px;background-color:rgba(0,0,0,.4);border-radius:50%;display:inline-block;transition:background-color .5s!important}@media only screen and (max-width:599px){.banner-meta .dots-container .dot{height:8px;width:8px;margin:0 4px}}.banner-meta .dots-container .dot.active{border-radius:4px;background-color:#f3962f;width:16px}@keyframes fade{from{opacity:.25}to{opacity:1}}.next,.prev{cursor:pointer;position:absolute;top:50%;transform:translateY(-50%);color:#fff;font-weight:700;background-color:#1b2133!important;border-radius:50%;z-index:999;height:32px!important;width:32px!important;display:flex;align-items:center;margin-top:-16px;justify-content:center}.prev{left:0;margin-left:-16px}.next{right:0;margin-right:-16px}.navigation.bottom-right .prev{left:unset;right:45px;bottom:-15px;top:unset}.navigation.bottom-right .next{left:unset;right:15px;bottom:-15px;top:unset}.navigation.bottom-center .prev{left:calc(50% - 20px);right:unset;bottom:-15px;top:unset}.navigation.bottom-center .next{left:calc(50% + 20px);right:unset;bottom:-15px;top:unset}.navigation.bottom-left .prev{left:15px;right:unset;bottom:-15px;top:unset}.navigation.bottom-left .next{left:60px;right:unset;bottom:-15px;top:unset}.navigation.middle-inline .prev{left:30px}.navigation.middle-inline .next{right:30px}.banner-container-solo{overflow:hidden;margin:auto;border-radius:12px}.banner-image-solo{width:100%;display:block;border-radius:12px}.default-slider{height:100%;background:#d4e2fb}.default-slider .default-title{text-align:center;position:absolute;top:50%;left:0;right:0;margin:auto;transform:translateY(-50%);z-index:999;background:#e6efff;padding:32px;width:500px}.default-slider .default-title p{word-break:break-word;margin:0!important;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;text-transform:uppercase}@media screen and (max-width:768px){.default-slider{height:384px;width:100%}.default-slider .default-title{width:unset!important}}"]
|
|
10532
|
+
}] }
|
|
10533
|
+
];
|
|
10534
|
+
/** @nocollapse */
|
|
10535
|
+
SlidersNgContentLibComponent.ctorParameters = function () { return [
|
|
10536
|
+
{ type: EventService },
|
|
10537
|
+
{ type: ValueService }
|
|
10538
|
+
]; };
|
|
10539
|
+
SlidersNgContentLibComponent.propDecorators = {
|
|
10540
|
+
widgetData: [{ type: Input }],
|
|
10541
|
+
styleData: [{ type: Input }],
|
|
10542
|
+
title: [{ type: Input }],
|
|
10543
|
+
loadNgContentData: [{ type: Input }],
|
|
10544
|
+
autoScroll: [{ type: Input }],
|
|
10545
|
+
currentIndexValue: [{ type: Output }],
|
|
10546
|
+
id: [{ type: HostBinding, args: ['id',] }],
|
|
10547
|
+
currentIndex: [{ type: Input }]
|
|
10548
|
+
};
|
|
10549
|
+
return SlidersNgContentLibComponent;
|
|
10550
|
+
}(WidgetBaseComponent));
|
|
10551
|
+
if (false) {
|
|
10552
|
+
/** @type {?} */
|
|
10553
|
+
SlidersNgContentLibComponent.prototype.widgetData;
|
|
10554
|
+
/** @type {?} */
|
|
10555
|
+
SlidersNgContentLibComponent.prototype.styleData;
|
|
10556
|
+
/** @type {?} */
|
|
10557
|
+
SlidersNgContentLibComponent.prototype.title;
|
|
10558
|
+
/** @type {?} */
|
|
10559
|
+
SlidersNgContentLibComponent.prototype.loadNgContentData;
|
|
10560
|
+
/** @type {?} */
|
|
10561
|
+
SlidersNgContentLibComponent.prototype.autoScroll;
|
|
10562
|
+
/** @type {?} */
|
|
10563
|
+
SlidersNgContentLibComponent.prototype.currentIndexValue;
|
|
10564
|
+
/** @type {?} */
|
|
10565
|
+
SlidersNgContentLibComponent.prototype.id;
|
|
10566
|
+
/**
|
|
10567
|
+
* @type {?}
|
|
10568
|
+
* @private
|
|
10569
|
+
*/
|
|
10570
|
+
SlidersNgContentLibComponent.prototype.defaultMenuSubscribe;
|
|
10571
|
+
/** @type {?} */
|
|
10572
|
+
SlidersNgContentLibComponent.prototype.isLtMedium$;
|
|
10573
|
+
/** @type {?} */
|
|
10574
|
+
SlidersNgContentLibComponent.prototype.currentIndex;
|
|
10575
|
+
/** @type {?} */
|
|
10576
|
+
SlidersNgContentLibComponent.prototype.slideInterval;
|
|
10577
|
+
/** @type {?} */
|
|
10578
|
+
SlidersNgContentLibComponent.prototype.isMobile;
|
|
10579
|
+
/**
|
|
10580
|
+
* @type {?}
|
|
10581
|
+
* @private
|
|
10582
|
+
*/
|
|
10583
|
+
SlidersNgContentLibComponent.prototype.events;
|
|
10584
|
+
/**
|
|
10585
|
+
* @type {?}
|
|
10586
|
+
* @private
|
|
10587
|
+
*/
|
|
10588
|
+
SlidersNgContentLibComponent.prototype.valueSvc;
|
|
10589
|
+
}
|
|
10590
|
+
|
|
10591
|
+
/**
|
|
10592
|
+
* @fileoverview added by tsickle
|
|
10593
|
+
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
10594
|
+
*/
|
|
10595
|
+
/* tslint:enable */
|
|
10596
|
+
var /* tslint:enable */
|
|
10597
|
+
MyHammerConfig$1 = /** @class */ (function (_super) {
|
|
10598
|
+
__extends(MyHammerConfig, _super);
|
|
10599
|
+
function MyHammerConfig() {
|
|
10600
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
10601
|
+
}
|
|
10602
|
+
/**
|
|
10603
|
+
* @param {?} element
|
|
10604
|
+
* @return {?}
|
|
10605
|
+
*/
|
|
10606
|
+
MyHammerConfig.prototype.buildHammer = /**
|
|
10607
|
+
* @param {?} element
|
|
10608
|
+
* @return {?}
|
|
10609
|
+
*/
|
|
10610
|
+
function (element) {
|
|
10611
|
+
/** @type {?} */
|
|
10612
|
+
var mc = new Hammer(element, {
|
|
10613
|
+
touchAction: 'pan-y',
|
|
10614
|
+
});
|
|
10615
|
+
return mc;
|
|
10616
|
+
};
|
|
10617
|
+
return MyHammerConfig;
|
|
10618
|
+
}(HammerGestureConfig));
|
|
10619
|
+
// tslint:disable-next-line: max-classes-per-file
|
|
10620
|
+
var SlidersNgContentLibModule = /** @class */ (function () {
|
|
10621
|
+
function SlidersNgContentLibModule() {
|
|
10622
|
+
}
|
|
10623
|
+
SlidersNgContentLibModule.decorators = [
|
|
10624
|
+
{ type: NgModule, args: [{
|
|
10625
|
+
declarations: [SlidersNgContentLibComponent],
|
|
10626
|
+
imports: [
|
|
10627
|
+
CommonModule,
|
|
10628
|
+
RouterModule,
|
|
10629
|
+
NavigationModule,
|
|
10630
|
+
ImageResponsiveModule,
|
|
10631
|
+
],
|
|
10632
|
+
exports: [SlidersNgContentLibComponent],
|
|
10633
|
+
entryComponents: [SlidersNgContentLibComponent],
|
|
10634
|
+
providers: [
|
|
10635
|
+
{
|
|
10636
|
+
provide: HAMMER_GESTURE_CONFIG,
|
|
10637
|
+
useClass: MyHammerConfig$1,
|
|
10638
|
+
},
|
|
10639
|
+
],
|
|
10640
|
+
},] }
|
|
10641
|
+
];
|
|
10642
|
+
return SlidersNgContentLibModule;
|
|
10643
|
+
}());
|
|
10644
|
+
|
|
10645
|
+
/**
|
|
10646
|
+
* @fileoverview added by tsickle
|
|
10647
|
+
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
10648
|
+
*/
|
|
10649
|
+
var ScrollableItemModule = /** @class */ (function () {
|
|
10650
|
+
function ScrollableItemModule() {
|
|
10651
|
+
}
|
|
10652
|
+
ScrollableItemModule.decorators = [
|
|
10653
|
+
{ type: NgModule, args: [{
|
|
10654
|
+
declarations: [ScrollableItemDirective],
|
|
10655
|
+
imports: [
|
|
10656
|
+
CommonModule,
|
|
10657
|
+
],
|
|
10658
|
+
exports: [ScrollableItemDirective],
|
|
10659
|
+
},] }
|
|
10660
|
+
];
|
|
10661
|
+
return ScrollableItemModule;
|
|
10662
|
+
}());
|
|
10663
|
+
|
|
10664
|
+
/**
|
|
10665
|
+
* @fileoverview added by tsickle
|
|
10666
|
+
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
10667
|
+
*/
|
|
10668
|
+
var UserContentRatingLibModule = /** @class */ (function () {
|
|
10669
|
+
function UserContentRatingLibModule() {
|
|
10670
|
+
}
|
|
10671
|
+
UserContentRatingLibModule.decorators = [
|
|
10672
|
+
{ type: NgModule, args: [{
|
|
10673
|
+
declarations: [UserContentRatingLibComponent],
|
|
10674
|
+
imports: [
|
|
10675
|
+
CommonModule,
|
|
10676
|
+
MatIconModule,
|
|
10677
|
+
MatChipsModule,
|
|
10678
|
+
SkeletonLoaderLibModule,
|
|
10679
|
+
SlidersLibModule,
|
|
10680
|
+
CardsModule,
|
|
10681
|
+
AvatarPhotoLibModule,
|
|
10682
|
+
SlidersNgContentLibModule,
|
|
10683
|
+
ScrollableItemModule
|
|
10684
|
+
],
|
|
10685
|
+
exports: [UserContentRatingLibComponent],
|
|
10686
|
+
providers: [RatingService, UserContentRatingLibService],
|
|
10687
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
|
10688
|
+
},] }
|
|
10689
|
+
];
|
|
10690
|
+
return UserContentRatingLibModule;
|
|
10691
|
+
}());
|
|
10692
|
+
|
|
9078
10693
|
/**
|
|
9079
10694
|
* @fileoverview added by tsickle
|
|
9080
10695
|
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
@@ -9085,5 +10700,5 @@ var CompetencyPassbookModule = /** @class */ (function () {
|
|
|
9085
10700
|
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
9086
10701
|
*/
|
|
9087
10702
|
|
|
9088
|
-
export { CalenderModule, CardsModule, CommonMethodsService, CommonStripModule, CompetencyPassbookModule, ConsumptionComponent, ConsumptionModule, ConsumptionService, ContentStripWithTabsLibModule, DataPointsModule, HttpLoaderFactory, MyHammerConfig, ROOT_WIDGET_CONFIG, SlidersLibModule, WIDGET_REGISTERED_LIB_MODULES, WIDGET_REGISTRATION_LIB_CONFIG, ContentStripWithTabsLibComponent as ɵa, WidgetContentService as ɵb,
|
|
10703
|
+
export { CalenderModule, CardsModule, CommonMethodsService, CommonStripModule, CompetencyPassbookModule, ConsumptionComponent, ConsumptionModule, ConsumptionService, ContentStripWithTabsLibModule, DataPointsModule, HttpLoaderFactory, MyHammerConfig, ROOT_WIDGET_CONFIG, SlidersLibModule, UserContentRatingLibModule, WIDGET_REGISTERED_LIB_MODULES, WIDGET_REGISTRATION_LIB_CONFIG, ContentStripWithTabsLibComponent as ɵa, WidgetContentService as ɵb, PipePublicURL as ɵba, DisplayContentTypeLibModule as ɵbb, DisplayContentTypeLibComponent as ɵbc, DefaultThumbnailModule as ɵbd, DefaultThumbnailDirective as ɵbe, PipeDurationTransformModule as ɵbf, PipeDurationTransformPipe as ɵbg, CompetencyPassbookComponent as ɵbh, CompetencyPassbookService as ɵbi, PillsModule as ɵbj, PillsComponent as ɵbk, UserContentRatingLibComponent as ɵbl, ScrollableItemDirective as ɵbm, RatingService as ɵbn, UserContentRatingLibService as ɵbo, AvatarPhotoLibModule as ɵbp, AvatarPhotoLibComponent as ɵbq, MyHammerConfig$1 as ɵbr, SlidersNgContentLibModule as ɵbs, SlidersNgContentLibComponent as ɵbt, ScrollableItemModule as ɵbu, WidgetUserService as ɵc, MultilingualTranslationsService as ɵd, ConfigurationsService as ɵe, HorizontalScrollerV2Module as ɵf, HorizontalScrollerV2Component as ɵg, SlidersLibComponent as ɵh, NavigationModule as ɵi, NavigationDirective as ɵj, ImageResponsiveModule as ɵk, ImageResponsiveDirective as ɵl, DataPointsComponent as ɵm, InsiteDataService as ɵn, SkeletonLoaderLibModule as ɵo, SkeletonLoaderLibComponent as ɵp, CalenderComponent as ɵq, CalenderDayComponent as ɵr, CommonStripComponent as ɵs, CardResourceComponent as ɵt, CardsComponent as ɵu, CardPortraitComponent as ɵv, CardUserComponent as ɵw, CardLandscapeComponent as ɵx, CardWideComponent as ɵy, PipePublicURLModule as ɵz };
|
|
9089
10704
|
//# sourceMappingURL=sunbird-cb-consumption.js.map
|