(this.visible = value), 0);
+ setTimeout(() => {
+ this.showModal = value;
+ this.visible = value;
+ }, 0);
return;
}
@@ -40,7 +45,7 @@ export class ModalComponent implements OnDestroy {
this.renderer.addClass(this.modalContent.nativeElement, 'fade-out-top');
setTimeout(() => {
this.setVisible(value);
- this.renderer.removeClass(this.modalContent.nativeElement, 'fade-out-top');
+ // this.renderer.removeClass(this.modalContent.nativeElement, 'fade-out-top');
this.ngOnDestroy();
}, 350);
}
@@ -66,10 +71,12 @@ export class ModalComponent implements OnDestroy {
_visible: boolean = false;
- closable: boolean = false;
+ showModal: boolean = false;
isOpenConfirmation: boolean = false;
+ closable: boolean = false;
+
destroy$ = new Subject();
constructor(private renderer: Renderer2, private confirmationService: ConfirmationService) {}
@@ -81,6 +88,8 @@ export class ModalComponent implements OnDestroy {
setVisible(value: boolean) {
this._visible = value;
this.visibleChange.emit(value);
+ this.showModal = value;
+
value
? timer(500)
.pipe(take(1))
@@ -93,14 +102,16 @@ export class ModalComponent implements OnDestroy {
.pipe(
debounceTime(350),
takeUntil(this.destroy$),
- filter(
- (event: MouseEvent) =>
+ filter((event: MouseEvent) => {
+ const isOpenConfirmation = this.isOpenConfirmation || document.querySelector('p-toastitem');
+ return (
event &&
this.closable &&
this.modalContent &&
- !this.isOpenConfirmation &&
- !this.modalContent.nativeElement.contains(event.target),
- ),
+ !isOpenConfirmation &&
+ !this.modalContent.nativeElement.contains(event.target)
+ );
+ }),
)
.subscribe(_ => {
this.close();
diff --git a/npm/ng-packs/packages/theme-shared/src/lib/services/confirmation.service.ts b/npm/ng-packs/packages/theme-shared/src/lib/services/confirmation.service.ts
index dd70e696e2..f0376dc038 100644
--- a/npm/ng-packs/packages/theme-shared/src/lib/services/confirmation.service.ts
+++ b/npm/ng-packs/packages/theme-shared/src/lib/services/confirmation.service.ts
@@ -1,10 +1,10 @@
import { Injectable } from '@angular/core';
-import { AbstractToasterClass } from '../abstracts/toaster';
+import { AbstractToaster } from '../abstracts/toaster';
import { Confirmation } from '../models/confirmation';
@Injectable({ providedIn: 'root' })
-export class ConfirmationService extends AbstractToasterClass {
- protected key: string = 'abpConfirmation';
+export class ConfirmationService extends AbstractToaster {
+ key: string = 'abpConfirmation';
- protected sticky: boolean = true;
+ sticky: boolean = true;
}
diff --git a/npm/ng-packs/packages/theme-shared/src/lib/services/toaster.service.ts b/npm/ng-packs/packages/theme-shared/src/lib/services/toaster.service.ts
index 74845b9e9c..00cf9c725f 100644
--- a/npm/ng-packs/packages/theme-shared/src/lib/services/toaster.service.ts
+++ b/npm/ng-packs/packages/theme-shared/src/lib/services/toaster.service.ts
@@ -1,9 +1,9 @@
import { Injectable } from '@angular/core';
-import { AbstractToasterClass } from '../abstracts/toaster';
+import { AbstractToaster } from '../abstracts/toaster';
import { Message } from 'primeng/components/common/message';
@Injectable({ providedIn: 'root' })
-export class ToasterService extends AbstractToasterClass {
+export class ToasterService extends AbstractToaster {
addAll(messages: Message[]): void {
this.messageService.addAll(messages.map(message => ({ key: this.key, ...message })));
}
diff --git a/npm/ng-packs/packages/theme-shared/src/public-api.ts b/npm/ng-packs/packages/theme-shared/src/public-api.ts
index b7f52bc3f0..6a9eae0f64 100644
--- a/npm/ng-packs/packages/theme-shared/src/public-api.ts
+++ b/npm/ng-packs/packages/theme-shared/src/public-api.ts
@@ -3,6 +3,7 @@
*/
export * from './lib/theme-shared.module';
+export * from './lib/animations';
export * from './lib/components';
export * from './lib/models';
export * from './lib/services';
diff --git a/npm/ng-packs/scripts/build.js b/npm/ng-packs/scripts/build.js
index 6b21c48e0f..ddd5de2663 100644
--- a/npm/ng-packs/scripts/build.js
+++ b/npm/ng-packs/scripts/build.js
@@ -35,4 +35,6 @@ import fse from 'fs-extra';
cwd: '../',
});
});
+
+ process.exit(0);
})();
diff --git a/npm/ng-packs/scripts/sync.js b/npm/ng-packs/scripts/sync.js
index 366057bf8e..a212995cb3 100644
--- a/npm/ng-packs/scripts/sync.js
+++ b/npm/ng-packs/scripts/sync.js
@@ -1,5 +1,4 @@
// ESM syntax is supported.
-import execa from 'execa';
import fse from 'fs-extra';
(async () => {
@@ -21,4 +20,6 @@ import fse from 'fs-extra';
await fse.writeJSON(srcPackagePath, { ...srcPackage, version }, { spaces: 2 });
});
+
+ process.exit(0);
})();
diff --git a/templates/app/angular/src/app/app.component.ts b/templates/app/angular/src/app/app.component.ts
index 6e89cd41a5..bf2a27962a 100644
--- a/templates/app/angular/src/app/app.component.ts
+++ b/templates/app/angular/src/app/app.component.ts
@@ -7,6 +7,4 @@ import { Component } from '@angular/core';
`,
})
-export class AppComponent {
- title = 'myProjectName';
-}
+export class AppComponent {}