Skip to content

Commit

Permalink
Merge pull request #2273 from bharathravi-in/cbrelease-4.8.16
Browse files Browse the repository at this point in the history
Cbrelease 4.8.16
  • Loading branch information
bharathravi-in authored Jul 6, 2024
2 parents 7621d36 + 3955e6b commit f0774ba
Show file tree
Hide file tree
Showing 9 changed files with 112 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
</mat-card-content>
<mat-card-actions class="flex flex-row-reverse">
<!-- <ws-widget-svg-to-pdf></ws-widget-svg-to-pdf> -->
<a mat-button (click)="shareCert()" class="ws-mat-accent-border-active mat-accent">
<a mat-button (click)="shareCert()" class="ws-mat-accent-border-active mat-accent btn-custom">
<mat-icon class="mat-icon material-icons-outlined download_icon margin-right-xs">share</mat-icon>
Share
</a>
<a mat-button [matMenuTriggerFor]="menu" class="ws-mat-accent-border-active mat-accent" (click)="raiseIntreactTelemetry()">
<a mat-button [matMenuTriggerFor]="menu" class="ws-mat-accent-border-active mat-accent btn-custom" (click)="raiseIntreactTelemetry()">
<mat-icon class="mat-icon material-icons-outlined download_icon margin-right-xs">cloud_download</mat-icon>
{{'certificatedialog.download' | translate}}
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ a.download_btn {
float: right;
top: -52px;
right: -52px;
position: absolute;
top: 19px;
right: 18px;
}
::ng-deep .icon-outside .mat-dialog-container {
overflow: unset;
Expand Down Expand Up @@ -95,3 +98,33 @@ a.download_btn {
}
}
}
.btn-custom{
box-sizing: border-box;
position: relative;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
cursor: pointer;
outline: 0;
border: none;
-webkit-tap-highlight-color: transparent;
display: inline-block;
white-space: nowrap;
text-decoration: none;
vertical-align: baseline;
text-align: center;
margin: 0;
min-width: 64px;
line-height: 36px;
padding: 0 16px;
border-radius: 4px;
overflow: visible;
}


.close-button {
position: absolute !important;
top: 19px !important;
right: 18px !important;
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"@project-sunbird/sb-styles": "0.0.7",
"@project-sunbird/sunbird-quml-player": "0.0.6",
"@project-sunbird/telemetry-sdk": "0.0.26",
"@sunbird-cb/consumption": "0.0.45",
"@sunbird-cb/consumption": "0.0.46",
"@sunbird-cb/design-system": "0.0.2",
"@sunbird-cb/discussions-ui-v8": "2.1.3",
"@sunbird-cb/micro-surveys": "^2.0.17",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ export class SeeAllHomeComponent implements OnInit, OnDestroy {
}
})
}

}
if (
this.tabSelected &&
Expand Down Expand Up @@ -304,9 +303,10 @@ export class SeeAllHomeComponent implements OnInit, OnDestroy {
if (firstTab.requestRequired) {
if (this.seeAllPageConfig.tabs) {
const allTabs = this.seeAllPageConfig.tabs
// tslint:disable-next-line
const currentTabFromMap = (allTabs && allTabs.length && allTabs[this.dynamicTabIndex]) as NsContentStripWithTabs.IContentStripTab
this.getTabDataByNewReqSearchV6(strip, this.dynamicTabIndex, currentTabFromMap, calculateParentStatus)
const currentTabFromMap = (allTabs && allTabs.length &&
allTabs[this.dynamicTabIndex]) as NsContentStripWithTabs.IContentStripTab
this.getTabDataByNewReqSearchV6(strip, this.dynamicTabIndex,
currentTabFromMap, calculateParentStatus)
}
}

Expand Down Expand Up @@ -389,9 +389,10 @@ export class SeeAllHomeComponent implements OnInit, OnDestroy {
if (firstTab.requestRequired) {
if (this.seeAllPageConfig.tabs) {
const allTabs = this.seeAllPageConfig.tabs
// tslint:disable-next-line
const currentTabFromMap = (allTabs && allTabs.length && allTabs[this.dynamicTabIndex]) as NsContentStripWithTabs.IContentStripTab
this.getTabDataByNewReqTrending(strip, this.dynamicTabIndex, currentTabFromMap, calculateParentStatus)
const currentTabFromMap = (allTabs && allTabs.length &&
allTabs[this.dynamicTabIndex]) as NsContentStripWithTabs.IContentStripTab
this.getTabDataByNewReqTrending(strip, this.dynamicTabIndex, currentTabFromMap,
calculateParentStatus)
}
}

Expand Down
3 changes: 2 additions & 1 deletion src/app/home/home.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import { HttpLoaderFactory } from '../app.module'
import { HttpClient } from '@angular/common/http'
import { UserLeaderboardModule } from '@sunbird-cb/collection/src/lib/_common/user-leaderboard/user-leaderboard.module'
import { MatTooltipModule } from '@angular/material'
import { ContentStripWithTabsLibModule } from '@sunbird-cb/consumption'
import { ContentStripWithTabsLibModule, ContentStripWithTabsPillsModule } from '@sunbird-cb/consumption'

@NgModule({
declarations: [
Expand Down Expand Up @@ -71,6 +71,7 @@ import { ContentStripWithTabsLibModule } from '@sunbird-cb/consumption'
AvatarPhotoModule,
PendingRequestModule,
ContentStripWithTabsLibModule,
ContentStripWithTabsPillsModule,
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
Expand Down
18 changes: 16 additions & 2 deletions src/app/home/home/feed-list/feed-list.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,19 @@
</div>
<ws-widget-content-strip-with-tabs [widgetData]="widgetData"></ws-widget-content-strip-with-tabs>
</div> -->
<ws-widget-content-strip-with-tabs [widgetData]="widgetData"></ws-widget-content-strip-with-tabs>

<!-- <ws-widget-content-strip-with-tabs [widgetData]="widgetData"></ws-widget-content-strip-with-tabs> -->
<ng-container *ngIf="widgetData?.stripType === 'withOutPils' && (widgetData?.stripVisable === 'mobile' && isMobile)">
<sb-uic-content-strip-with-tabs
(telemtryResponse)="raiseTelemetryInteratEvent($event)"
[widgetData]="widgetData">
</sb-uic-content-strip-with-tabs>
</ng-container>
<ng-container *ngIf="widgetData?.stripType === 'withOutPils' && widgetData?.stripVisable === 'responsive'">
<sb-uic-content-strip-with-tabs
(telemtryResponse)="raiseTelemetryInteratEvent($event)"
[widgetData]="widgetData">
</sb-uic-content-strip-with-tabs>
</ng-container>
<ng-container *ngIf="widgetData?.stripType === 'withPils' && widgetData?.stripVisable === 'responsive'">
<sb-uic-content-strip-with-tabs-pills [widgetData]="widgetData"></sb-uic-content-strip-with-tabs-pills>
</ng-container>
49 changes: 48 additions & 1 deletion src/app/home/home/feed-list/feed-list.component.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,66 @@
import { Component, Input, OnInit } from '@angular/core'
import { ActivatedRoute } from '@angular/router'
import { UtilityService, EventService, WsEvents } from '@sunbird-cb/utils-v2'

/* tslint:disable */
import _ from 'lodash'
/* tslint:enable */
@Component({
selector: 'ws-feed-list',
templateUrl: './feed-list.component.html',
styleUrls: ['./feed-list.component.scss'],
})
export class FeedListComponent implements OnInit {
contentStripData = {}
isMobile = false
@Input() widgetData: any
constructor(private activatedRoute: ActivatedRoute) { }
isTelemetryRaised = false
constructor(private activatedRoute: ActivatedRoute,
private events: EventService, private utilitySvc: UtilityService) { }

ngOnInit() {
if (this.activatedRoute.snapshot.data.pageData && this.activatedRoute.snapshot.data.pageData.data) {
this.contentStripData = this.activatedRoute.snapshot.data.pageData.data || []
}
this.isMobile = this.utilitySvc.isMobile
}

raiseTelemetryInteratEvent(event: any) {
if (event && event.viewMoreUrl) {
this.raiseTelemetry(`${event.stripTitle} ${event.viewMoreUrl.viewMoreText}`, event.typeOfTelemetry)
}
if (!this.isTelemetryRaised && event && !event.viewMoreUrl) {
const id = event.typeOfTelemetry === 'mdo-channel' ? event.identifier : event.orgId
const type = event.typeOfTelemetry === 'mdo-channel' ? event.orgName : event.title
this.events.raiseInteractTelemetry(
{
type: 'click',
subType: event.typeOfTelemetry,
id: 'content-card',
},
{
id,
type,
},
{
module: WsEvents.EnumTelemetrymodules.HOME,
}
)
}
this.isTelemetryRaised = true
}

raiseTelemetry(name: string, subtype: string) {
this.events.raiseInteractTelemetry(
{
type: 'click',
subType: subtype,
id: `${_.kebabCase(name).toLocaleLowerCase()}`,
},
{},
{
module: WsEvents.EnumTelemetrymodules.HOME,
}
)
}
}
2 changes: 1 addition & 1 deletion src/app/home/home/home.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
</span>
</ng-container>
</ng-container>
<ng-container [ngTemplateOutlet]="loadNewStrips" ></ng-container>
<!-- <ng-container [ngTemplateOutlet]="loadNewStrips" ></ng-container> -->

<div class="slider" *ngIf="sliderData && sliderData[0]?.active">
<ng-container *ngFor="let vitem of sectionList">
Expand Down
2 changes: 1 addition & 1 deletion src/app/home/home/home.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export class HomeComponent implements OnInit, AfterViewInit {
if (this.activatedRoute.snapshot.data.pageData && this.activatedRoute.snapshot.data.pageData.data) {
this.contentStripData = this.activatedRoute.snapshot.data.pageData.data || []
// tslint:disable-next-line: prefer-template
this.contentStripData = (this.contentStripData.homeStrips || []).sort((a: any, b: any) => a.order - b.order)
this.contentStripData = (this.contentStripData.newHomeStrip || []).sort((a: any, b: any) => a.order - b.order)
// tslint:disable-next-line
for (let i = 0; i < this.contentStripData.length; i++) {
if (this.contentStripData[i] &&
Expand Down

0 comments on commit f0774ba

Please sign in to comment.