From 6ffb4a9f6a3cef46eee35c5f8e9bc0f2d1c01281 Mon Sep 17 00:00:00 2001 From: lucasferreiralimax Date: Mon, 14 Oct 2024 17:08:38 -0300 Subject: [PATCH 1/5] adjustment template for mode restricted --- .../src/lib/up-window-angular.component.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/projects/up-window-angular/src/lib/up-window-angular.component.html b/projects/up-window-angular/src/lib/up-window-angular.component.html index 65400ec..561e017 100644 --- a/projects/up-window-angular/src/lib/up-window-angular.component.html +++ b/projects/up-window-angular/src/lib/up-window-angular.component.html @@ -7,9 +7,15 @@ aria-describedby="dialog-description" aria-modal="true" [attr.aria-hidden]="!isOpen()" + (click)="!restrictMode && closeWindow()" > -
+
+ + Mode Restrict Example content! +
diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 956662a..39f6976 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -34,16 +34,18 @@ export class AppComponent { isWindowOpenSlideUp: WritableSignal = signal(false); isWindowOpenSlideDown: WritableSignal = signal(false); isWindowOpenScale: WritableSignal = signal(false); + isWindowOpenRestrict: WritableSignal = signal(false); - openWindowExample(animation: string) { + openWindowExample(type: string) { this.isWindowOpenFade.set(false); this.isWindowOpenSlideLeft.set(false); this.isWindowOpenSlideRight.set(false); this.isWindowOpenSlideUp.set(false); this.isWindowOpenSlideDown.set(false); this.isWindowOpenScale.set(false); + this.isWindowOpenRestrict.set(false); - switch (animation) { + switch (type) { case 'fade': this.isWindowOpenFade.set(true); break; @@ -62,6 +64,9 @@ export class AppComponent { case 'scale': this.isWindowOpenScale.set(true); break; + case 'restrict': + this.isWindowOpenRestrict.set(true); + break; } } From 7fb97f90895d52b270d7ac4b19de3c3149b5bda1 Mon Sep 17 00:00:00 2001 From: lucasferreiralimax Date: Mon, 14 Oct 2024 17:32:50 -0300 Subject: [PATCH 4/5] test(unit): update spec of up-window --- .../src/lib/up-window-angular.component.html | 4 +- .../lib/up-window-angular.component.spec.ts | 91 +++++++++++++++---- 2 files changed, 73 insertions(+), 22 deletions(-) diff --git a/projects/up-window-angular/src/lib/up-window-angular.component.html b/projects/up-window-angular/src/lib/up-window-angular.component.html index 561e017..05d8f2d 100644 --- a/projects/up-window-angular/src/lib/up-window-angular.component.html +++ b/projects/up-window-angular/src/lib/up-window-angular.component.html @@ -33,7 +33,7 @@