remove unused codes and update
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
import {
|
||||
Component,
|
||||
EventEmitter,
|
||||
HostListener,
|
||||
Input,
|
||||
OnInit,
|
||||
Output,
|
||||
signal,
|
||||
} from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'abstract-isMobile',
|
||||
template: '',
|
||||
})
|
||||
export class AbstractIsMobileComponent implements OnInit {
|
||||
@Input() mobileBreakpoint = 768;
|
||||
|
||||
@Output() onHide = new EventEmitter<any>();
|
||||
|
||||
isMobile = signal(false);
|
||||
|
||||
ngOnInit() {
|
||||
this.updateViewportMode();
|
||||
}
|
||||
|
||||
@HostListener('window:resize')
|
||||
onResize() {
|
||||
this.updateViewportMode();
|
||||
}
|
||||
|
||||
private updateViewportMode() {
|
||||
this.isMobile.set(typeof window !== 'undefined' && window.innerWidth <= this.mobileBreakpoint);
|
||||
}
|
||||
}
|
||||
@@ -68,6 +68,7 @@ export class InputComponent {
|
||||
@Input() min?: number;
|
||||
@Input() max?: number;
|
||||
@Input() fixed?: number;
|
||||
@Input() numericValue?: number;
|
||||
@Output() valueChange = new EventEmitter<string | number>();
|
||||
@Output() blur = new EventEmitter<void>();
|
||||
|
||||
@@ -263,15 +264,7 @@ export class InputComponent {
|
||||
numericValue = Number.isNaN(parseFloat(value)) ? 0 : parseFloat(value);
|
||||
}
|
||||
|
||||
const isIdentifierField = [
|
||||
'nationalId',
|
||||
'phone',
|
||||
'postalCode',
|
||||
'mobile',
|
||||
'email',
|
||||
'password',
|
||||
'simple',
|
||||
].includes(this.type);
|
||||
const isIdentifierField = !this.numericValue;
|
||||
this.control.setValue(isIdentifierField ? value : value === '' ? '' : numericValue);
|
||||
|
||||
const viewValue = isPriceFormat && value !== '' ? numericValue.toLocaleString('en-US') : value;
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<div class="flex items-center justify-center h-[100cqmin] w-full">
|
||||
<div class="flex items-center justify-center h-svh w-full">
|
||||
<p-progressSpinner />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user