diff --git a/npm/ng-packs/packages/theme-shared/src/lib/components/button/button.component.ts b/npm/ng-packs/packages/theme-shared/src/lib/components/button/button.component.ts
index 131eea86bd..5c4da3c10e 100644
--- a/npm/ng-packs/packages/theme-shared/src/lib/components/button/button.component.ts
+++ b/npm/ng-packs/packages/theme-shared/src/lib/components/button/button.component.ts
@@ -11,9 +11,9 @@ import { ABP } from '@abp/ng.core';
[attr.type]="buttonType"
[ngClass]="buttonClass"
[disabled]="loading || disabled"
- (click)="onClick($event)"
- (focus)="onFocus($event)"
- (blur)="onBlur($event)"
+ (click.stop)="click.next($event); abpClick.next($event)"
+ (focus)="focus.next($event); abpFocus.next($event)"
+ (blur)="blur.next($event); abpBlur.next($event)"
>
@@ -41,15 +41,39 @@ export class ButtonComponent implements OnInit {
@Input()
attributes: ABP.Dictionary;
+ /*
+ *
+ *
+ * @deprecated use abpClick instead
+ */
// tslint:disable-next-line: no-output-native
@Output() readonly click = new EventEmitter();
+ /*
+ *
+ *
+ * @deprecated use abpFocus instead
+ */
// tslint:disable-next-line: no-output-native
@Output() readonly focus = new EventEmitter();
+ /*
+ *
+ *
+ * @deprecated use abpBlur instead
+ */
// tslint:disable-next-line: no-output-native
@Output() readonly blur = new EventEmitter();
+ // tslint:disable-next-line: no-output-native
+ @Output() readonly abpClick = new EventEmitter();
+
+ // tslint:disable-next-line: no-output-native
+ @Output() readonly abpFocus = new EventEmitter();
+
+ // tslint:disable-next-line: no-output-native
+ @Output() readonly abpBlur = new EventEmitter();
+
@ViewChild('button', { static: true })
buttonRef: ElementRef;
@@ -66,19 +90,4 @@ export class ButtonComponent implements OnInit {
});
}
}
-
- onClick(event: MouseEvent) {
- event.stopPropagation();
- this.click.next(event);
- }
-
- onFocus(event: FocusEvent) {
- event.stopPropagation();
- this.focus.next(event);
- }
-
- onBlur(event: FocusEvent) {
- event.stopPropagation();
- this.blur.next(event);
- }
}