- {{ content?.name | truncate:8 }}
+ {{ content?.name | truncate:40 }}
- {{index}}. {{ content?.name | truncate:8 }}
+ {{index}}. {{ content?.name | truncate:40 }}
call_to_action
diff --git a/library/ws-widget/collection/src/lib/_common/content-toc/app-toc-content-card-v2/app-toc-content-card-v2.component.ts b/library/ws-widget/collection/src/lib/_common/content-toc/app-toc-content-card-v2/app-toc-content-card-v2.component.ts
index f7e50e4d11..3cd099a184 100644
--- a/library/ws-widget/collection/src/lib/_common/content-toc/app-toc-content-card-v2/app-toc-content-card-v2.component.ts
+++ b/library/ws-widget/collection/src/lib/_common/content-toc/app-toc-content-card-v2/app-toc-content-card-v2.component.ts
@@ -374,11 +374,14 @@ export class AppTocContentCardV2Component implements OnInit {
if(localContentData.primaryCategory === NsContent.EPrimaryCategory.MODULE) {
this.hierarchyMapData[identifier]['duration'] = this.hierarchyMapData[identifier].leafNodes.reduce(
(sum: any, childID: any) => {
- return sum + Number(this.hierarchyMapData[childID].duration || this.hierarchyMapData[childID].expectedDuration || 0)
+ if(this.hierarchyMapData && this.hierarchyMapData[childID]) {
+ return sum + Number(this.hierarchyMapData[childID].duration || this.hierarchyMapData[childID].expectedDuration || 0)
+ }
+
}, 0)
}
// tslint:disable
- const completedItems = _.filter(this.hierarchyMapData[identifier].leafNodes, r => this.hierarchyMapData[r].completionStatus === 2 || this.hierarchyMapData[r].completionPercentage === 100)
+ const completedItems = _.filter(this.hierarchyMapData[identifier].leafNodes, r => (this.hierarchyMapData[r] && (this.hierarchyMapData[r].completionStatus === 2 || this.hierarchyMapData[r].completionPercentage === 100)))
const totalCount = _.toInteger(_.get(this.hierarchyMapData[identifier], 'leafNodesCount')) || 1
this.hierarchyMapData[identifier]['completionPercentage'] = Number(((completedItems.length / totalCount) * 100).toFixed())
this.hierarchyMapData[identifier]['completionStatus'] = (this.hierarchyMapData[identifier].completionPercentage >= 100) ? 2 : 1
diff --git a/library/ws-widget/collection/src/lib/_common/content-toc/content-toc.component.html b/library/ws-widget/collection/src/lib/_common/content-toc/content-toc.component.html
index 263d95bedb..743690ee16 100644
--- a/library/ws-widget/collection/src/lib/_common/content-toc/content-toc.component.html
+++ b/library/ws-widget/collection/src/lib/_common/content-toc/content-toc.component.html
@@ -1,4 +1,4 @@
-
+
@@ -9,4 +9,4 @@
[resumeData]="resumeData" [batchData]="batchData" [skeletonLoader]="skeletonLoader" [hierarchyMapData]="hierarchyMapData">
-
\ No newline at end of file
+
diff --git a/library/ws-widget/collection/src/lib/_common/content-toc/content-toc.component.scss b/library/ws-widget/collection/src/lib/_common/content-toc/content-toc.component.scss
index 955a349738..799a343e24 100644
--- a/library/ws-widget/collection/src/lib/_common/content-toc/content-toc.component.scss
+++ b/library/ws-widget/collection/src/lib/_common/content-toc/content-toc.component.scss
@@ -33,4 +33,11 @@
box-shadow: 0px -2px 9px rgba(0, 0, 0, 0.08);
background-color: rgba(255, 255, 255, 1);
}
+}
+
+
+::ng-deep .contentSticky {
+ .mat-tab-header {
+ top: 0px !important;
+ }
}
\ No newline at end of file
diff --git a/library/ws-widget/collection/src/lib/_common/content-toc/content-toc.module.ts b/library/ws-widget/collection/src/lib/_common/content-toc/content-toc.module.ts
index fd801b30e8..e8d72ef3f8 100644
--- a/library/ws-widget/collection/src/lib/_common/content-toc/content-toc.module.ts
+++ b/library/ws-widget/collection/src/lib/_common/content-toc/content-toc.module.ts
@@ -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: [
@@ -51,6 +52,7 @@ import { TruncatePipe } from './pipes/truncate.pipe'
AppTocSessionsNewComponent,
AppTocContentCardV2SkeletonComponent,
TruncatePipe,
+ ReplaceNbspPipe,
],
imports: [
CommonModule,
diff --git a/library/ws-widget/collection/src/lib/_common/content-toc/karma-points/karma-points.component.ts b/library/ws-widget/collection/src/lib/_common/content-toc/karma-points/karma-points.component.ts
index 9540b57028..9b33b9130a 100644
--- a/library/ws-widget/collection/src/lib/_common/content-toc/karma-points/karma-points.component.ts
+++ b/library/ws-widget/collection/src/lib/_common/content-toc/karma-points/karma-points.component.ts
@@ -36,7 +36,7 @@ export class KarmaPointsComponent implements OnInit, OnChanges {
}
ngOnChanges(changes: SimpleChanges): void {
- this.condition = changes.condition.currentValue
+ this.condition = changes.condition && changes.condition.currentValue || null
if (!this.condition) { return }
if (!this.condition.isPostAssessment && (this.condition.content && this.condition.content.hasOwnProperty('completionPercentage')
diff --git a/library/ws-widget/collection/src/lib/_common/content-toc/pipes/replace-nbsp.pipe.spec.ts b/library/ws-widget/collection/src/lib/_common/content-toc/pipes/replace-nbsp.pipe.spec.ts
new file mode 100644
index 0000000000..37634c1a3f
--- /dev/null
+++ b/library/ws-widget/collection/src/lib/_common/content-toc/pipes/replace-nbsp.pipe.spec.ts
@@ -0,0 +1,8 @@
+import { ReplaceNbspPipe } from './replace-nbsp.pipe';
+
+describe('ReplaceNbspPipe', () => {
+ it('create an instance', () => {
+ const pipe = new ReplaceNbspPipe();
+ expect(pipe).toBeTruthy();
+ });
+});
diff --git a/library/ws-widget/collection/src/lib/_common/content-toc/pipes/replace-nbsp.pipe.ts b/library/ws-widget/collection/src/lib/_common/content-toc/pipes/replace-nbsp.pipe.ts
new file mode 100644
index 0000000000..2c2dc301e1
--- /dev/null
+++ b/library/ws-widget/collection/src/lib/_common/content-toc/pipes/replace-nbsp.pipe.ts
@@ -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(' ')) {
+ return value.replace(/ /g, ' ')
+ }
+ return value
+ }
+}
diff --git a/library/ws-widget/collection/src/lib/_common/content-toc/pipes/truncate.pipe.ts b/library/ws-widget/collection/src/lib/_common/content-toc/pipes/truncate.pipe.ts
index c91ff9eae4..39063f54f8 100644
--- a/library/ws-widget/collection/src/lib/_common/content-toc/pipes/truncate.pipe.ts
+++ b/library/ws-widget/collection/src/lib/_common/content-toc/pipes/truncate.pipe.ts
@@ -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
}
}
diff --git a/library/ws-widget/collection/src/lib/_common/profile-card-stats/profile-card-stats.component.html b/library/ws-widget/collection/src/lib/_common/profile-card-stats/profile-card-stats.component.html
index 19d2c1f05b..6d0c77d090 100644
--- a/library/ws-widget/collection/src/lib/_common/profile-card-stats/profile-card-stats.component.html
+++ b/library/ws-widget/collection/src/lib/_common/profile-card-stats/profile-card-stats.component.html
@@ -1,7 +1,7 @@
-
-
{{ collapsed ?'expand_more': 'expand_less'}}
+
+ {{ collapsed ?'expand_more': 'expand_less'}}
@@ -117,7 +117,7 @@
-
+
diff --git a/library/ws-widget/collection/src/lib/_common/profile-card-stats/profile-card-stats.component.scss b/library/ws-widget/collection/src/lib/_common/profile-card-stats/profile-card-stats.component.scss
index 7bbb5a822b..d5c9442f01 100644
--- a/library/ws-widget/collection/src/lib/_common/profile-card-stats/profile-card-stats.component.scss
+++ b/library/ws-widget/collection/src/lib/_common/profile-card-stats/profile-card-stats.component.scss
@@ -94,6 +94,7 @@
}
.profile-wrapper {
margin-top: 32px;
+ position: relative;
z-index: 10;
@include breakpoint-xs {
@@ -104,6 +105,11 @@
}
}
+.profile-loading-wrapper {
+ background-color: #fff;
+ box-shadow: 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12);
+ border-radius: 12px 12px;
+}
.stats-container {
border-radius: 12px;
border: 1px solid rgba(0,0,0, 0.08);
@@ -251,17 +257,19 @@
.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;
+ margin-left: -16px;
}
.republic-wrapper .collapse-expand-icon {
diff --git a/library/ws-widget/collection/src/lib/_common/recent-requests/recent-requests.component.html b/library/ws-widget/collection/src/lib/_common/recent-requests/recent-requests.component.html
index 6593168f21..699ef582c2 100644
--- a/library/ws-widget/collection/src/lib/_common/recent-requests/recent-requests.component.html
+++ b/library/ws-widget/collection/src/lib/_common/recent-requests/recent-requests.component.html
@@ -32,7 +32,7 @@
{{ 'home.networkBuildConn' | translate }}
-
diff --git a/library/ws-widget/collection/src/lib/_common/recent-requests/recent-requests.component.scss b/library/ws-widget/collection/src/lib/_common/recent-requests/recent-requests.component.scss
index ff9758d8af..5e09acfab1 100644
--- a/library/ws-widget/collection/src/lib/_common/recent-requests/recent-requests.component.scss
+++ b/library/ws-widget/collection/src/lib/_common/recent-requests/recent-requests.component.scss
@@ -3,6 +3,9 @@
width: 100%;
height: 100%;
}
+.network-btn {
+ background-color: #1b4ca1;
+}
.recent-div {
border-bottom: 1px solid rgba(0, 0, 0, 0.16);
diff --git a/library/ws-widget/collection/src/lib/_common/survey-form-left-section/survey-form/survey-form-section/survey-form-section.component.html b/library/ws-widget/collection/src/lib/_common/survey-form-left-section/survey-form/survey-form-section/survey-form-section.component.html
new file mode 100644
index 0000000000..6644ba46e4
--- /dev/null
+++ b/library/ws-widget/collection/src/lib/_common/survey-form-left-section/survey-form/survey-form-section/survey-form-section.component.html
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+

+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/library/ws-widget/collection/src/lib/_common/survey-form-left-section/survey-form/survey-form-section/survey-form-section.component.scss b/library/ws-widget/collection/src/lib/_common/survey-form-left-section/survey-form/survey-form-section/survey-form-section.component.scss
new file mode 100644
index 0000000000..54c4be067b
--- /dev/null
+++ b/library/ws-widget/collection/src/lib/_common/survey-form-left-section/survey-form/survey-form-section/survey-form-section.component.scss
@@ -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;
+
+ }
\ No newline at end of file
diff --git a/library/ws-widget/collection/src/lib/_common/survey-form-left-section/survey-form/survey-form-section/survey-form-section.component.spec.ts b/library/ws-widget/collection/src/lib/_common/survey-form-left-section/survey-form/survey-form-section/survey-form-section.component.spec.ts
new file mode 100644
index 0000000000..0c1f203f07
--- /dev/null
+++ b/library/ws-widget/collection/src/lib/_common/survey-form-left-section/survey-form/survey-form-section/survey-form-section.component.spec.ts
@@ -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
;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ SurveyFormSectionComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(SurveyFormSectionComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/library/ws-widget/collection/src/lib/_common/survey-form-left-section/survey-form/survey-form-section/survey-form-section.component.ts b/library/ws-widget/collection/src/lib/_common/survey-form-left-section/survey-form/survey-form-section/survey-form-section.component.ts
new file mode 100644
index 0000000000..1393771b8e
--- /dev/null
+++ b/library/ws-widget/collection/src/lib/_common/survey-form-left-section/survey-form/survey-form-section/survey-form-section.component.ts
@@ -0,0 +1,22 @@
+import { Component, Input, OnInit } from '@angular/core'
+
+@Component({
+ selector: 'ws-widget-survey-form-section',
+ templateUrl: './survey-form-section.component.html',
+ styleUrls: ['./survey-form-section.component.scss'],
+})
+export class SurveyFormSectionComponent implements OnInit {
+ isVisible = true
+ @Input() surveyFormData: any
+ surveyData: any
+
+ constructor() { }
+
+ ngOnInit() {
+ // this.surveyData = this.surveyFormData
+ }
+
+ closeCard() {
+ this.isVisible = false
+ }
+}
diff --git a/library/ws-widget/collection/src/lib/_common/survey-form-left-section/survey-form/survey-form.module.ts b/library/ws-widget/collection/src/lib/_common/survey-form-left-section/survey-form/survey-form.module.ts
new file mode 100644
index 0000000000..a656d8a494
--- /dev/null
+++ b/library/ws-widget/collection/src/lib/_common/survey-form-left-section/survey-form/survey-form.module.ts
@@ -0,0 +1,16 @@
+import { NgModule } from '@angular/core'
+import { CommonModule } from '@angular/common'
+import { SurveyFormSectionComponent } from './survey-form-section/survey-form-section.component'
+import { MatIconModule } from '@angular/material'
+import { TranslateModule } from '@ngx-translate/core'
+
+@NgModule({
+ declarations: [SurveyFormSectionComponent],
+ imports: [
+ CommonModule,
+ MatIconModule,
+ TranslateModule,
+ ],
+ exports: [SurveyFormSectionComponent],
+})
+export class SurveyFormModule { }
diff --git a/library/ws-widget/collection/src/lib/_common/tips-for-learner/tips-for-learner-card/tips-for-learner-card.component.html b/library/ws-widget/collection/src/lib/_common/tips-for-learner/tips-for-learner-card/tips-for-learner-card.component.html
index 0aa38d7eca..2c267339fe 100644
--- a/library/ws-widget/collection/src/lib/_common/tips-for-learner/tips-for-learner-card/tips-for-learner-card.component.html
+++ b/library/ws-widget/collection/src/lib/_common/tips-for-learner/tips-for-learner-card/tips-for-learner-card.component.html
@@ -1,11 +1,12 @@
-
+
-
+
diff --git a/library/ws-widget/collection/src/lib/card-content-v2/card-content-v2.component.ts b/library/ws-widget/collection/src/lib/card-content-v2/card-content-v2.component.ts
index 366730f4d6..258604d6a8 100644
--- a/library/ws-widget/collection/src/lib/card-content-v2/card-content-v2.component.ts
+++ b/library/ws-widget/collection/src/lib/card-content-v2/card-content-v2.component.ts
@@ -436,10 +436,10 @@ export class CardContentV2Component extends WidgetBaseComponent
{
queryParams: urlData.queryParams
})
- } else {
- // const contentType = urlData;
- this.snackBar.open(`This ${contentCategory} has been archived and is no longer available.`, 'X', { duration: 2000 });
- }
+ } else {
+ // const contentType = urlData;
+ this.snackBar.open(`This ${contentCategory} has been archived and is no longer available.`, 'X', { duration: 2000 });
+ }
}
}
diff --git a/library/ws-widget/collection/src/lib/card-content/card-content.component.html b/library/ws-widget/collection/src/lib/card-content/card-content.component.html
index c0d5e2f6a6..3dcb1c9868 100644
--- a/library/ws-widget/collection/src/lib/card-content/card-content.component.html
+++ b/library/ws-widget/collection/src/lib/card-content/card-content.component.html
@@ -737,19 +737,7 @@
{{ widgetData.content.name
-
+
+
+
-