Merge Angular 16 Irish Monitor to develop #33

Merged
k.triantafyllou merged 151 commits from angular-16-irish-monitor into develop 2024-02-13 09:32:41 +01:00
2 changed files with 31 additions and 6 deletions
Showing only changes of commit 31220578cf - Show all commits

View File

@ -170,7 +170,7 @@ export class Indicator {
visibility: Visibility;
defaultId: string;
indicatorPaths: IndicatorPath[];
descriptionOverlay: boolean = false;
overlay: boolean = false;
constructor(name: string, description: string, additionalDescription:string, type: IndicatorType, width: IndicatorSize,height: IndicatorSize, visibility: Visibility, indicatorPaths: IndicatorPath[], defaultId: string = null) {
this._id = null;

View File

@ -54,6 +54,9 @@ export abstract class MonitorIndicatorStakeholderBaseComponent extends Indicator
public numberResults: Map<string, number> = new Map<string, number>();
public chartsActiveType: Map<string, IndicatorPath> = new Map<string, IndicatorPath>();
public currentYear = new Date().getFullYear();
public clipboard;
public embedOverlay: boolean = false;
public descriptionOverlay: boolean = false;
/** Services */
protected sanitizer: DomSanitizer;
@ -76,6 +79,7 @@ export abstract class MonitorIndicatorStakeholderBaseComponent extends Indicator
this.isMobile = isMobile;
this.cdr.detectChanges();
});
this.createClipboard();
}
protected setView(params: Params) {
@ -404,14 +408,35 @@ export abstract class MonitorIndicatorStakeholderBaseComponent extends Indicator
window.print();
}
toggleDescriptionOverlay(event, indicator: Indicator) {
toggleOverlay(event, indicator: Indicator, overlayType: string) {
event.stopPropagation();
indicator.descriptionOverlay = !indicator.descriptionOverlay;
indicator.overlay = !indicator.overlay;
if (overlayType == 'embed') {
this.embedOverlay = !this.embedOverlay;
}
if (overlayType == 'desc') {
this.descriptionOverlay = !this.descriptionOverlay;
}
}
closeDescriptionOverlay(event: ClickEvent, indicator: Indicator) {
if(event.clicked && indicator.descriptionOverlay) {
indicator.descriptionOverlay = false;
closeOverlay(event: ClickEvent, indicator: Indicator, overlayType: string) {
if(event.clicked && indicator.overlay) {
indicator.overlay = false;
if (overlayType == 'embed') {
this.embedOverlay = false;
}
if (overlayType == 'desc') {
this.descriptionOverlay = false;
}
}
}
private createClipboard() {
if (typeof window !== 'undefined') {
delete this.clipboard;
let Clipboard;
Clipboard = require('clipboard');
this.clipboard = new Clipboard('.clipboard_btn');
}
}