diff --git a/libs/client-dashboards/src/lib/components/table/table.component.html b/libs/client-dashboards/src/lib/components/table/table.component.html index 7e655e87..71fb10a5 100644 --- a/libs/client-dashboards/src/lib/components/table/table.component.html +++ b/libs/client-dashboards/src/lib/components/table/table.component.html @@ -8,7 +8,11 @@ (null); + /** Full screen state. */ + public readonly enabled$ = signal(false); + + /** + * @param el Element reference. + */ constructor(private readonly el: ElementRef) {} + /** + * Create a copy of the original styles. + * @param el HTML element. + */ private backUpStyles(el: HTMLElement) { const styles: IStyleConfiguration = { width: el.style.width, @@ -31,6 +40,10 @@ export class AppFullScreenDirective { this.originalStyles.set(styles); } + /** + * Restore original styles from a copy. + * @param el HTML element. + */ private restoreStyles(el: HTMLElement) { const styles = this.originalStyles(); if (styles !== null) { @@ -43,6 +56,10 @@ export class AppFullScreenDirective { } } + /** + * Set element styles. + * @param el HTML element. + */ private setStyles(el: HTMLElement) { el.style.width = '100vw'; el.style.height = '100vw'; @@ -51,6 +68,7 @@ export class AppFullScreenDirective { el.style.bottom = '0'; } + /** Toggle full screen. */ public toggle(): void { const fullScreen = this.originalStyles(); switch (fullScreen) { @@ -63,18 +81,22 @@ export class AppFullScreenDirective { } } + /** Enable full screen mode. */ public maximize(): void { const el = this.el.nativeElement; if (typeof el !== 'undefined') { this.backUpStyles(el); this.setStyles(el); + this.enabled$.set(true); } } + /** Disable full screen mode. */ public minimize(): void { const el = this.el.nativeElement; if (typeof el !== 'undefined') { this.restoreStyles(el); + this.enabled$.set(false); } } } diff --git a/package.json b/package.json index a4773a12..63f9659a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@app/nx-ng-starter", - "version": "7.6.6", + "version": "7.6.7", "private": true, "description": "Monorepo starter: Nx, Angular, Angular Elements, Electron, NodeJS, NestJS, Firebase.", "license": "MIT",