Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
:host {
display: block;
width: 100%;
min-width: 0;
max-width: 100vw;
overflow: hidden;
contain: content;
}

.carousel-host-container {
width: 100%;
position: relative;
Expand Down Expand Up @@ -34,13 +25,13 @@
align-items: center;
width: 100%;
max-width: 100%;
height: 400px;
padding: 0;
overflow-x: auto;
overflow-y: hidden;
scroll-behavior: auto;
box-sizing: border-box;
box-sizing: border-box;
border-radius: 12px;

&::-webkit-scrollbar {
display: none;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import { MatButtonModule } from '@angular/material/button';
import { MatCardModule } from '@angular/material/card';
import { MatDialog } from '@angular/material/dialog';
import { MatIconModule } from '@angular/material/icon';
// import { GalleryGridComponent } from '../gallery-grid/gallery-grid.component';

@Component({
selector: 'app-carousel',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,49 +1,46 @@
<div class="header-container">
<div class="section-header">
<div class="title-group">
<h3>{{ title }}</h3>
<div class="active-line"></div>
<app-list-view *ngIf="isFromCaseView; else mediacoListView" [pConn$]="pConn$" [bInForm$]="bInForm$"></app-list-view>
<ng-template #mediacoListView>
<div class="header-container">
<div class="section-header">
<div class="title-group">
<h3>{{ title }}</h3>
<div class="active-line"></div>
</div>
</div>
</div>
</div>
<div *ngIf="template === 'Table'">
<div class="info-container">
<div class="info-item" *ngFor="let item of sourceList; index as i">
<div class="icon-wrapper" [ngClass]="'bg-' + i">
<img *ngIf="item.icon" [src]="item.icon" class="icon-img" [ngClass]="'color-' + i" />
<span *ngIf="!item.icon" class="icon-num" [ngClass]="'color-' + i">{{ item.number }}</span>
</div>
<div *ngIf="template === 'Table'">
<div class="info-container">
<div class="info-item" *ngFor="let item of sourceList; index as i">
<div class="icon-wrapper" [ngClass]="'bg-' + i">
<img *ngIf="item.icon" [src]="item.icon" class="icon-img" [ngClass]="'color-' + i" />
<span *ngIf="!item.icon" class="icon-num" [ngClass]="'color-' + i">{{ item.number }}</span>
</div>

<div class="content">
<div class="title-row">
<span class="title">{{ item.title }}</span>
<span class="dot" *ngIf="item.title_subtext"></span>
<span *ngIf="item.title_subtext" class="sub-text">{{ item.title_subtext }}</span>
<div class="content">
<div class="title-row">
<span class="title">{{ item.title }}</span>
<span class="dot" *ngIf="item.title_subtext"></span>
<span *ngIf="item.title_subtext" class="sub-text">{{ item.title_subtext }}</span>
</div>
<div class="description">
<span>{{ item.description }}</span>
<span class="dot" *ngIf="item.description_subtext"></span>
<span *ngIf="item.description_subtext" class="sub-text">{{ item.description_subtext }}</span>
</div>
</div>
<div class="description">
<span>{{ item.description }}</span>
<span class="dot" *ngIf="item.description_subtext"></span>
<span *ngIf="item.description_subtext" class="sub-text">{{ item.description_subtext }}</span>
<div class="extra-content" *ngIf="item.rating" style="margin-left: auto">
<img [src]="utils.getImageSrc('star-solid', utils.getSDKStaticContentUrl())" class="star" />&nbsp;
{{ item.rating }}
</div>
</div>
<div class="extra-content" *ngIf="item.rating" style="margin-left: auto">
<img [src]="utils.getImageSrc('star-solid', utils.getSDKStaticContentUrl())" class="star" />&nbsp;
{{ item.rating }}
</div>
</div>
</div>

<div class="text-right">
<button mat-button color="primary" *ngIf="referenceDataPage !== 'D_TrendingItemsList' && template === 'Table'" (click)="openShowAll()">
Show All
</button>
</div>
</div>
<div *ngIf="template === 'Gallery'">
<div class="carousel-constraint-wrapper">
<app-carousel *ngIf="sourceList" [data]="sourceList"></app-carousel>
<div *ngIf="template === 'Gallery'">
<div class="carousel-constraint-wrapper">
<app-carousel *ngIf="sourceList" [data]="sourceList"></app-carousel>
</div>
</div>
<div class="carousel-footer">
<button mat-button color="primary" (click)="openShowAll()">Show All</button>
<a mat-button color="primary" *ngIf="referenceDataPage !== 'D_TrendingItemsList'" (click)="openShowAll()">Show All</a>
</div>
</div>
</ng-template>
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,14 @@ $primary-purple: #9c27b0;
display: flex;
width: 100%;
justify-content: flex-end;
padding: 0 16px 10px 16px;
padding: 10px 0 10px 16px; /* Right padding removed */
box-sizing: border-box;
text-decoration: none;
color: rgb(103, 80, 164); /* Color updated */
}

/* This applies when you hover your mouse over the link */
.carousel-footer:hover {
cursor: pointer;
text-decoration: underline;
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import { Component, OnInit, Input } from '@angular/core';
import { CommonModule } from '@angular/common';
// import { Utils } from '@pega/angular-sdk-components/src/public-api';
import { Utils } from '@pega/angular-sdk-components';
import { Utils, ListViewComponent as OOTBListViewComponent } from '@pega/angular-sdk-components';
import { CarouselComponent } from '../carousel/carousel.component';
import { GalleryGridComponent } from '../gallery-grid/gallery-grid.component';
import { MatDialog } from '@angular/material/dialog';
import { MatButton } from '@angular/material/button';

interface ListViewProps {
inheritedProps: any;
Expand All @@ -30,16 +28,16 @@ interface ListViewProps {
}

@Component({
selector: 'app-list-view',
imports: [CommonModule, CarouselComponent, MatButton],
selector: 'mediaco-list-view',
imports: [CommonModule, CarouselComponent, OOTBListViewComponent],
templateUrl: './list-view.component.html',
styleUrl: './list-view.component.scss',
providers: [Utils]
})
export class ListViewComponent implements OnInit {
@Input() pConn$: typeof PConnect;
@Input() bInForm$ = true;
@Input() payload;

configProps$: ListViewProps;
template: string;
sourceList: any[];
Expand Down Expand Up @@ -114,6 +112,10 @@ export class ListViewComponent implements OnInit {
}
}

get isFromCaseView() {
return !['D_AccountHistoryList', 'D_TrendingItemsList', 'D_CarouselitemList'].includes(this.referenceDataPage);
}

getIcon(activityType: string): string {
switch (activityType) {
case 'Plan Upgrade':
Expand Down
Loading