Merge Angular 16 Irish Monitor to develop #33
|
@ -170,7 +170,7 @@ export class Indicator {
|
||||||
visibility: Visibility;
|
visibility: Visibility;
|
||||||
defaultId: string;
|
defaultId: string;
|
||||||
indicatorPaths: IndicatorPath[];
|
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) {
|
constructor(name: string, description: string, additionalDescription:string, type: IndicatorType, width: IndicatorSize,height: IndicatorSize, visibility: Visibility, indicatorPaths: IndicatorPath[], defaultId: string = null) {
|
||||||
this._id = null;
|
this._id = null;
|
||||||
|
|
|
@ -54,6 +54,9 @@ export abstract class MonitorIndicatorStakeholderBaseComponent extends Indicator
|
||||||
public numberResults: Map<string, number> = new Map<string, number>();
|
public numberResults: Map<string, number> = new Map<string, number>();
|
||||||
public chartsActiveType: Map<string, IndicatorPath> = new Map<string, IndicatorPath>();
|
public chartsActiveType: Map<string, IndicatorPath> = new Map<string, IndicatorPath>();
|
||||||
public currentYear = new Date().getFullYear();
|
public currentYear = new Date().getFullYear();
|
||||||
|
public clipboard;
|
||||||
|
public embedOverlay: boolean = false;
|
||||||
|
public descriptionOverlay: boolean = false;
|
||||||
|
|
||||||
/** Services */
|
/** Services */
|
||||||
protected sanitizer: DomSanitizer;
|
protected sanitizer: DomSanitizer;
|
||||||
|
@ -76,6 +79,7 @@ export abstract class MonitorIndicatorStakeholderBaseComponent extends Indicator
|
||||||
this.isMobile = isMobile;
|
this.isMobile = isMobile;
|
||||||
this.cdr.detectChanges();
|
this.cdr.detectChanges();
|
||||||
});
|
});
|
||||||
|
this.createClipboard();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected setView(params: Params) {
|
protected setView(params: Params) {
|
||||||
|
@ -404,14 +408,35 @@ export abstract class MonitorIndicatorStakeholderBaseComponent extends Indicator
|
||||||
window.print();
|
window.print();
|
||||||
}
|
}
|
||||||
|
|
||||||
toggleDescriptionOverlay(event, indicator: Indicator) {
|
toggleOverlay(event, indicator: Indicator, overlayType: string) {
|
||||||
event.stopPropagation();
|
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) {
|
closeOverlay(event: ClickEvent, indicator: Indicator, overlayType: string) {
|
||||||
if(event.clicked && indicator.descriptionOverlay) {
|
if(event.clicked && indicator.overlay) {
|
||||||
indicator.descriptionOverlay = false;
|
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');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue