From 6c6c29e6a98fe38cae4d95d1340abc00f6bc6d23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Can=20Y=C4=B1lmaz?= <30300440+bariscanyilmaz@users.noreply.github.com> Date: Fri, 10 Mar 2023 10:52:10 +0300 Subject: [PATCH] rename component output --- .../components/checkbox/checkbox.component.ts | 24 ++++++------ .../form-input/form-input.component.ts | 38 ++++++++++--------- 2 files changed, 32 insertions(+), 30 deletions(-) diff --git a/npm/ng-packs/packages/theme-shared/src/lib/components/checkbox/checkbox.component.ts b/npm/ng-packs/packages/theme-shared/src/lib/components/checkbox/checkbox.component.ts index 3ead2f929d..db208354ba 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/components/checkbox/checkbox.component.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/components/checkbox/checkbox.component.ts @@ -9,14 +9,16 @@ import { NG_VALUE_ACCESSOR } from '@angular/forms'; - + [ngClass]="checkboxClass" + [ngStyle]="checkboxStyle" + (blur)="checkboxBlur.next()" + (focus)="checkboxFocus.next()" + /> + `, providers: [ @@ -25,21 +27,19 @@ import { NG_VALUE_ACCESSOR } from '@angular/forms'; useExisting: forwardRef(() => FormCheckboxComponent), multi: true, }, - ] + ], }) export class FormCheckboxComponent extends AbstractNgModelComponent { - @Input() label?: string; @Input() labelClass = 'form-check-label'; @Input() checkboxId!: string; @Input() checkboxStyle = ''; @Input() checkboxClass = 'form-check-input'; @Input() checkboxReadonly = false; - @Output() onBlur = new EventEmitter(); - @Output() onFocus = new EventEmitter(); + @Output() checkboxBlur = new EventEmitter(); + @Output() checkboxFocus = new EventEmitter(); constructor(injector: Injector) { super(injector); } - } diff --git a/npm/ng-packs/packages/theme-shared/src/lib/components/form-input/form-input.component.ts b/npm/ng-packs/packages/theme-shared/src/lib/components/form-input/form-input.component.ts index d7f1f48c9d..a901cc2f4e 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/components/form-input/form-input.component.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/components/form-input/form-input.component.ts @@ -6,17 +6,20 @@ import { NG_VALUE_ACCESSOR } from '@angular/forms'; selector: 'abp-form-input', template: `
- + + [ngClass]="inputClass" + [ngStyle]="inputStyle" + (blur)="formBlur.next()" + (focus)="formFocus.next()" + [(ngModel)]="value" + />
`, providers: [ @@ -25,22 +28,21 @@ import { NG_VALUE_ACCESSOR } from '@angular/forms'; useExisting: forwardRef(() => FormInputComponent), multi: true, }, - ] + ], }) export class FormInputComponent extends AbstractNgModelComponent { @Input() inputId!: string; - @Input() inputReadonly: boolean = false; - @Input() label: string = ''; + @Input() inputReadonly = false; + @Input() label = ''; @Input() labelClass = 'form-label'; - @Input() inputPlaceholder: string = ''; - @Input() inputType: string = 'text'; - @Input() inputStyle: string = ''; - @Input() inputClass: string = 'form-control'; - @Output() onBlur = new EventEmitter(); - @Output() onFocus = new EventEmitter(); + @Input() inputPlaceholder = ''; + @Input() inputType = 'text'; + @Input() inputStyle = ''; + @Input() inputClass = 'form-control'; + @Output() formBlur = new EventEmitter(); + @Output() formFocus = new EventEmitter(); constructor(injector: Injector) { super(injector); } - }