From 3fba042c959feefb34fe8085f2bdb034369a3806 Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Tue, 25 Apr 2023 17:10:09 +0300 Subject: [PATCH 1/4] Update UIKit to version 3.13.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3f44cd5..17cd910 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "rxjs": "^6.5.1", "ts-md5": "^1.2.0", "tslib": "^2.0.0", - "uikit": "3.12.2", + "uikit": "3.13.0", "zone.js": "~0.11.4" }, "devDependencies": { From 2db3855cbb3392a1cae5f3ffae03825d805b2dce Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Tue, 2 May 2023 18:10:40 +0300 Subject: [PATCH 2/4] Update Uikit to version 3.13.10. Update library --- package.json | 2 +- src/app/openaireLibrary | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 17cd910..fb63651 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "rxjs": "^6.5.1", "ts-md5": "^1.2.0", "tslib": "^2.0.0", - "uikit": "3.13.0", + "uikit": "3.13.10", "zone.js": "~0.11.4" }, "devDependencies": { diff --git a/src/app/openaireLibrary b/src/app/openaireLibrary index c547dfa..bd87a47 160000 --- a/src/app/openaireLibrary +++ b/src/app/openaireLibrary @@ -1 +1 @@ -Subproject commit c547dfa9453b9a68befb41f447d8c410eb7aea2c +Subproject commit bd87a47795f8f9243e0a1129d715fcb96cf9b714 From 23131ac2fd935f1ed78db8cb43011a94971ec52e Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Mon, 8 May 2023 17:50:39 +0300 Subject: [PATCH 3/4] [Monitor & Library | develop]: [Bug fix] Show quick contact button when not in contacts us and not intersecting either with contact us section (home page), nor with bottom. 1. layout.service.ts: Initialize hasQuickContactSubject to false (Don't ever show it unless it should be there). 2. quick-contact.service.ts: Initialize display to false (Assume it is intersecting, until it is proved it is not). 3. app.component.ts: Updated checks for and added public bottomNotIntersecting: boolean; and public displayQuickContact: boolean; --- src/app/app.component.ts | 32 ++++++++++++++++---------------- src/app/openaireLibrary | 2 +- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 258f369..eb0ec11 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -60,7 +60,8 @@ import {ResourcesService} from "./openaireLibrary/monitor/services/resources.ser - @@ -79,7 +80,8 @@ export class AppComponent { header: Header; logoPath: string = 'assets/common-assets/logo-services/monitor/'; /* Contact */ - public showQuickContact: boolean; + public bottomNotIntersecting: boolean; + public displayQuickContact: boolean; // intersecting with specific section in home page public showGetStarted: boolean = true; public contactForm: UntypedFormGroup; public organizationTypes: string[] = [ @@ -107,7 +109,7 @@ export class AppComponent { if (event instanceof NavigationEnd) { if (event.url === '/contact-us') { this.quickContactService.setDisplay(false); - } else if (event.url !== '/contact-us' && !this.showQuickContact) { + } else if (event.url !== '/contact-us' && (!this.bottomNotIntersecting || !this.displayQuickContact)) { this.quickContactService.setDisplay(true); } this.showGetStarted = event.url !== '/get-started'; @@ -135,7 +137,7 @@ export class AppComponent { this.reset(); })); this.subscriptions.push(this.quickContactService.isDisplayed.subscribe(display => { - this.showQuickContact = display; + this.displayQuickContact = display; })); } @@ -145,25 +147,23 @@ export class AppComponent { rootMargin: '0px', threshold: 0.1 }; - let intersectionObserver = new IntersectionObserver(entries => { - entries.forEach(entry => { - if (entry.isIntersecting && this.showQuickContact) { - this.showQuickContact = false; - this.quickContactService.setDisplay(this.showQuickContact); - } else if (!entry.isIntersecting && !this.showQuickContact) { - this.showQuickContact = true; - this.quickContactService.setDisplay(this.showQuickContact); - } + + let intersectionObserver = new IntersectionObserver(entries => { + entries.forEach(entry => { + // if (entry.isIntersecting && this.showQuickContact) { + this.bottomNotIntersecting = !entry.isIntersecting; }); - }, options); - intersectionObserver.observe(this.bottom.nativeElement); - this.subscriptions.push(intersectionObserver); + }, options); + intersectionObserver.observe(this.bottom.nativeElement); + this.subscriptions.push(intersectionObserver); } public ngOnDestroy() { this.subscriptions.forEach(value => { if (value instanceof Subscriber) { value.unsubscribe(); + } else if (value instanceof IntersectionObserver) { + value.disconnect(); } }); this.userManagementService.clearSubscriptions(); diff --git a/src/app/openaireLibrary b/src/app/openaireLibrary index bd87a47..d6ec928 160000 --- a/src/app/openaireLibrary +++ b/src/app/openaireLibrary @@ -1 +1 @@ -Subproject commit bd87a47795f8f9243e0a1129d715fcb96cf9b714 +Subproject commit d6ec928237238cf1d0bebbf2a83e915348b8e38a From 32ea650c6ff9384e7e1efc34dde881562dd04123 Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Tue, 9 May 2023 12:26:15 +0300 Subject: [PATCH 4/4] Fix IntersectionObserver error for server --- src/app/app.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/app.component.ts b/src/app/app.component.ts index eb0ec11..0f677b6 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -162,7 +162,7 @@ export class AppComponent { this.subscriptions.forEach(value => { if (value instanceof Subscriber) { value.unsubscribe(); - } else if (value instanceof IntersectionObserver) { + } else if (typeof IntersectionObserver !== "undefined" && value instanceof IntersectionObserver) { value.disconnect(); } });