Skip to content

Commit

Permalink
conflicts resolved
Browse files Browse the repository at this point in the history
  • Loading branch information
Bharath Kumar authored and Bharath Kumar committed Aug 6, 2024
2 parents caba832 + d1aba42 commit daacd51
Show file tree
Hide file tree
Showing 19 changed files with 330 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@
<ng-container *ngIf="!skeletonLoader">
<div class="mat-subheading-1 font-bold">{{ 'apptocsinglepage.summary' | translate }}</div>
<div [ngClass]="{'mob-desc-ellipsis': summary.ellipsis && isMobile, 'desc-ellipsis': summary.ellipsis && !isMobile}" #summaryElem>
<span class="mob-text" [innerHtml]="handleCapitalize(content?.description)"></span>
<div class="mob-text" [innerHtml]="handleCapitalize(content?.description | replaceNbsp)"></div>
<div class="ws-mat-default-text font-bold cursor-pointer text-sm" *ngIf="summary.viewLess" (click)="summary.ellipsis = !summary.ellipsis; summary.viewLess = !summary.viewLess">&nbsp;{{ 'apptocsinglepage.viewLess' | translate }}</div>
</div>
<div class="ws-mat-default-text font-bold text-sm" *ngIf="summary.ellipsis">
Expand All @@ -271,7 +271,8 @@
<ng-container *ngIf="!skeletonLoader">
<div class="mat-subheading-1">{{ 'apptocsinglepage.description' | translate }}</div>
<div class="desc" [ngClass]="{'mob-desc-ellipsis': description.ellipsis && isMobile, 'desc-ellipsis': description.ellipsis && !isMobile}" #descElem>
<span [innerHTML]="content?.instructions" class="mob-text"></span>

<div [innerHTML]="this.content?.instructions | replaceNbsp" class="mob-text break-words"></div>
<div class="ws-mat-default-text font-bold cursor-pointer text-sm" *ngIf="description.viewLess"
(click)="description.ellipsis = !description.ellipsis; description.viewLess = !description.viewLess">&nbsp;{{ 'apptocsinglepage.viewLess' | translate }}</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
font-size: 16px;
}

.desc {
::ng-deep span {
p {
margin: 0px !important;
}
}
}
// .desc {

// ::ng-deep .mob-text p {
// margin: 0px !important;

// }
// }

.themes-button {
border-radius: 20px;
Expand Down Expand Up @@ -78,12 +78,20 @@
}
}

.mob-text {
.mob-text{
word-break: break-word;
white-space: normal;
// word-wrap: break-word;
overflow-wrap: break-word;
text-align: left;
}
::ng-deep .mob-text p {
word-break: break-word!important;
white-space: normal!important;
word-wrap: break-word!important;
overflow-wrap: break-word!important;
text-align: left;
// margin: 0px !important;
// hyphens: auto;
}

Expand Down Expand Up @@ -170,6 +178,14 @@ $title-line-count: 3;
word-break: break-word;
}

.desc {
word-break: break-word;
white-space: normal;
// word-wrap: break-word;
overflow-wrap: break-word;
text-align: left;
}

.desc-ellipsis {
@extend .text-ellipsis;
min-height: $title-line-count * 24px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
<p class="margin-remove text-truncate mat-body-2 flex-auto font-bold"
[ngClass]="{'text-active': pathSet?.has(content?.identifier) && isEnrolled}">
<!-- <mat-icon class="margin-right-xs radiobtn time-icon">radio_button_unchecked </mat-icon> -->
{{ content?.name | truncate:8 }}
{{ content?.name | truncate:40 }}

</p>
<span class="content-type optional-span" *ngIf="content?.optionalReading">{{ 'playerbrief.optional' | translate | titlecase}} </span>
Expand Down Expand Up @@ -234,7 +234,7 @@ <h3 class="margin-remove" i18n>
<div [ngClass]="{'collection-active-class': pathSet?.has(content?.identifier) && isEnrolled}"></div>
<p class="margin-remove text-truncate mat-subheading-1 flex-auto font-bold"
[ngClass]="{'text-active': pathSet?.has(content.identifier) && isEnrolled}">
{{index}}. {{ content?.name | truncate:8 }}
{{index}}. {{ content?.name | truncate:40 }}
</p>
<div class="type-container resource mt-2 sm:mt-0" *ngIf="content?.category === 'Resource'">
<mat-icon class="mr-1 custom-icon rotate-90">call_to_action</mat-icon>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import { AppTocSessionCardNewComponent } from './app-toc-session-card-new/app-to
import { AppTocSessionsNewComponent } from './app-toc-sessions-new/app-toc-sessions-new.component'
import { AppTocContentCardV2SkeletonComponent } from './app-toc-content-card-v2-skeleton/app-toc-content-card-v2-skeleton.component'
import { TruncatePipe } from './pipes/truncate.pipe'
import { ReplaceNbspPipe } from './pipes/replace-nbsp.pipe'

@NgModule({
declarations: [
Expand All @@ -51,6 +52,7 @@ import { TruncatePipe } from './pipes/truncate.pipe'
AppTocSessionsNewComponent,
AppTocContentCardV2SkeletonComponent,
TruncatePipe,
ReplaceNbspPipe,
],
imports: [
CommonModule,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { ReplaceNbspPipe } from './replace-nbsp.pipe';

describe('ReplaceNbspPipe', () => {
it('create an instance', () => {
const pipe = new ReplaceNbspPipe();
expect(pipe).toBeTruthy();
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Pipe, PipeTransform } from '@angular/core'

@Pipe({
name: 'replaceNbsp',
})
export class ReplaceNbspPipe implements PipeTransform {

transform(value: any): any {
if (value.includes('&nbsp;')) {
return value.replace(/&nbsp;/g, ' ')
}
return value
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ export class TruncatePipe implements PipeTransform {
if (!value) {
return ''
}
const words = value.split(' ')
const newWord = words.slice(0, limit).join(' ')
return words.length > limit ? (`${newWord}...`) : value
// const words = value.split(' ')
// const newWord = words.slice(0, limit).join(' ')
const charLen = value.trim()
const newWord = value.substring(0, limit)
return charLen.length > limit ? (`${newWord}...`) : value
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
}
.profile-wrapper {
margin-top: 32px;
position: relative;
z-index: 10;

@include breakpoint-xs {
Expand Down Expand Up @@ -256,17 +257,18 @@
.expand-icon {
width: 32px;
height: 32px;
position: absolute;
background: black;
color: white;
position: relative;
background: #000;
color: #fff;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
left: 50%;
right: 50%;
top: -16px;
top: 13px;
cursor: pointer;
z-index: 9999;
}

.republic-wrapper .collapse-expand-icon {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<div class="tips-container" *ngIf="isVisible">
<ng-container *ngFor="let data of surveyFormData">
<div class="card-header flex items-start justify-between">
<span class="card-title flex mat-subheading-1">{{data.title}}</span>
<a mat-icon-button class="close-button flex" (click)="closeCard()">
<mat-icon>close</mat-icon>
</a>
</div>
<div class="circle-box">
<div class="background-circle">
</div>
</div>

<div class="tip-content flex flex-col">
<div class="tip-content-top flex flex-row">
<div class="background flex items-center">
<img class="book-icon" src="{{data?.ImageUrl}}"
alt="{{data?.ImageUrl}}">
</div>
<div class="tip-data flex">
<p>{{data?.content}}</p>
</div>
</div>

<div class="tip-count">
<a href="https://portal.igotkarmayogi.gov.in/surveyml/668e250da8bfb500083136b1" class="btn-title">{{data.btnTitle}}</a>
</div>
</div>
</ng-container>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
.tips-container {
background-color: #F9CB97;
padding: 16px;
padding-bottom: 0px;
border-radius: 8px;
display: flex;
flex-direction: column;
justify-content: space-between;
margin-bottom: 1rem;
overflow: hidden;
width: 385px;
box-sizing: border-box;


}

@media screen and (max-width: 1000px) {
.tips-container {
width: 100%;

}
}

.tips-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 8px;
z-index: 10;
}

.tips-header h3 {
margin: 0;
font-size: 1.2em;
color: #000000;
font-family: Montserrat;
font-size: 16px;
z-index: 10;
}

.tips-header button {
background: none;
border: none;
color: #01468f;
cursor: pointer;
font-family: Lato;
font-size: 14px;
z-index: 10;
}

.tip-content {
display: flex;
// justify-content: space-between;
z-index: 10;
padding-top: 6px;
margin-bottom: 8px;
}

.tip-content p {
margin-left: 12px;
margin-bottom: 4px;
color: #000000;
font-family: Lato;
font-size: 14px;
z-index: 10;
line-height: 16.8px;
}

.tip-count {
display: flex;
justify-content: end;
align-items: center;
font-family: Lato !important;
font-size: 14px !important;
z-index: 10;
font-weight: 600;
line-height: 19.5px;
}

// .tip-data {
// width: calc(100% - 110px);
// }


.background-circle {
position: absolute;
z-index: 1;
right: -6.5em;
top: 2.8em;
width: 178px;
height: 178px;
border-radius: 100%;
background-color: #fcd2a3;
}

.circle-box {
position: relative;
width: 100%;
height: 0px;
}

.book-icon {
width: 50px;
height: 50px;
padding: 6px;
box-sizing: border-box;
}

.background {
background-color: white;
justify-content: center;
width: 100px;
height: 51px;
border-radius: 5px;
text-align: center;
}
.view-more {
display: flex;
align-items: center;
text-align: center;
height: 40px;
justify-content: center;
}

.view-more:hover {
background-color: #DCDFE5;
}
.card-header {
display: flex;
justify-content: space-between;
}

.card-title {
font-weight: 600;
width: 85%;
font-family: 'Montserrat';
font-size: 16px;
line-height: 19.5px;
}

.close-button {
cursor: pointer;
vertical-align: top;
color: #1b4ca1;
}
.btn-title {
color: #fff !important;
background-color: #1b4ca1;
border-radius: 16px;
padding: 8px 16px;
font-weight: 700;
font-size: 14px;
width: 102px;
text-align: center;
margin-bottom: 7px;

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { SurveyFormSectionComponent } from './survey-form-section.component';

describe('SurveyFormSectionComponent', () => {
let component: SurveyFormSectionComponent;
let fixture: ComponentFixture<SurveyFormSectionComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ SurveyFormSectionComponent ]
})
.compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(SurveyFormSectionComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
Loading

0 comments on commit daacd51

Please sign in to comment.