@ibragim-dev-org/ui-forge-library 1.2.3 → 1.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2922,48 +2922,57 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
|
|
|
2922
2922
|
}]
|
|
2923
2923
|
}], propDecorators: { checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }, { type: i0.Output, args: ["invalidChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], $style: [{ type: i0.Input, args: [{ isSignal: true, alias: "$style", required: false }] }], $label: [{ type: i0.Input, args: [{ isSignal: true, alias: "$label", required: false }] }], $hideValidatorErrors: [{ type: i0.Input, args: [{ isSignal: true, alias: "$hideValidatorErrors", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }, { type: i0.Output, args: ["touchedChange"] }], dirty: [{ type: i0.Input, args: [{ isSignal: true, alias: "dirty", required: false }] }, { type: i0.Output, args: ["dirtyChange"] }] } });
|
|
2924
2924
|
|
|
2925
|
-
const sizes =
|
|
2926
|
-
small: {
|
|
2927
|
-
padding: 'padding-xs',
|
|
2928
|
-
font: 'paragraph-sm',
|
|
2929
|
-
borderRadius: 'border-radius-m',
|
|
2930
|
-
},
|
|
2931
|
-
medium: {
|
|
2932
|
-
padding: 'padding-sm',
|
|
2933
|
-
font: 'paragraph-l',
|
|
2934
|
-
borderRadius: 'border-radius-m',
|
|
2935
|
-
},
|
|
2936
|
-
};
|
|
2925
|
+
const sizes = ['small', 'medium', 'large'];
|
|
2937
2926
|
class UiInputDirective extends UiFieldBaseDirective {
|
|
2927
|
+
elementRef;
|
|
2928
|
+
renderer;
|
|
2938
2929
|
$size = input('medium', ...(ngDevMode ? [{ debugName: "$size" }] : []));
|
|
2939
2930
|
$placeholder = input('', ...(ngDevMode ? [{ debugName: "$placeholder" }] : []));
|
|
2940
2931
|
$label = input('', ...(ngDevMode ? [{ debugName: "$label" }] : []));
|
|
2941
2932
|
$shouldFocusedAfterViewInit = input(false, ...(ngDevMode ? [{ debugName: "$shouldFocusedAfterViewInit" }] : []));
|
|
2933
|
+
$isRounded = input(false, ...(ngDevMode ? [{ debugName: "$isRounded" }] : []));
|
|
2942
2934
|
$hideValidatorErrors = input(false, ...(ngDevMode ? [{ debugName: "$hideValidatorErrors" }] : []));
|
|
2943
2935
|
$icon = input(null, ...(ngDevMode ? [{ debugName: "$icon" }] : []));
|
|
2944
|
-
$layoutSize = computed(() => {
|
|
2945
|
-
const size = this.$size();
|
|
2946
|
-
return sizes[size];
|
|
2947
|
-
}, ...(ngDevMode ? [{ debugName: "$layoutSize" }] : []));
|
|
2948
2936
|
$isError = computed(() => {
|
|
2949
2937
|
return (this.touched() || (this.dirty() && this.touched())) && this.invalid();
|
|
2950
2938
|
}, ...(ngDevMode ? [{ debugName: "$isError" }] : []));
|
|
2951
|
-
|
|
2952
|
-
|
|
2939
|
+
constructor(elementRef, renderer) {
|
|
2940
|
+
super();
|
|
2941
|
+
this.elementRef = elementRef;
|
|
2942
|
+
this.renderer = renderer;
|
|
2943
|
+
effect(() => {
|
|
2944
|
+
sizes.forEach((size) => {
|
|
2945
|
+
this.renderer.removeClass(this.elementRef.nativeElement, size);
|
|
2946
|
+
});
|
|
2947
|
+
const size = this.$size();
|
|
2948
|
+
this.renderer.addClass(this.elementRef.nativeElement, size);
|
|
2949
|
+
});
|
|
2950
|
+
effect(() => {
|
|
2951
|
+
const isRounded = this.$isRounded();
|
|
2952
|
+
if (isRounded) {
|
|
2953
|
+
this.renderer.addClass(this.elementRef.nativeElement, 'rounded');
|
|
2954
|
+
}
|
|
2955
|
+
else {
|
|
2956
|
+
this.renderer.removeClass(this.elementRef.nativeElement, 'rounded');
|
|
2957
|
+
}
|
|
2958
|
+
});
|
|
2959
|
+
}
|
|
2960
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: UiInputDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2961
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.1", type: UiInputDirective, isStandalone: true, selector: "app-ui-input", inputs: { $size: { classPropertyName: "$size", publicName: "$size", isSignal: true, isRequired: false, transformFunction: null }, $placeholder: { classPropertyName: "$placeholder", publicName: "$placeholder", isSignal: true, isRequired: false, transformFunction: null }, $label: { classPropertyName: "$label", publicName: "$label", isSignal: true, isRequired: false, transformFunction: null }, $shouldFocusedAfterViewInit: { classPropertyName: "$shouldFocusedAfterViewInit", publicName: "$shouldFocusedAfterViewInit", isSignal: true, isRequired: false, transformFunction: null }, $isRounded: { classPropertyName: "$isRounded", publicName: "$isRounded", isSignal: true, isRequired: false, transformFunction: null }, $hideValidatorErrors: { classPropertyName: "$hideValidatorErrors", publicName: "$hideValidatorErrors", isSignal: true, isRequired: false, transformFunction: null }, $icon: { classPropertyName: "$icon", publicName: "$icon", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0 });
|
|
2953
2962
|
}
|
|
2954
2963
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: UiInputDirective, decorators: [{
|
|
2955
2964
|
type: Directive,
|
|
2956
2965
|
args: [{
|
|
2957
2966
|
selector: 'app-ui-input',
|
|
2958
2967
|
}]
|
|
2959
|
-
}], propDecorators: { $size: [{ type: i0.Input, args: [{ isSignal: true, alias: "$size", required: false }] }], $placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "$placeholder", required: false }] }], $label: [{ type: i0.Input, args: [{ isSignal: true, alias: "$label", required: false }] }], $shouldFocusedAfterViewInit: [{ type: i0.Input, args: [{ isSignal: true, alias: "$shouldFocusedAfterViewInit", required: false }] }], $hideValidatorErrors: [{ type: i0.Input, args: [{ isSignal: true, alias: "$hideValidatorErrors", required: false }] }], $icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "$icon", required: false }] }] } });
|
|
2968
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { $size: [{ type: i0.Input, args: [{ isSignal: true, alias: "$size", required: false }] }], $placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "$placeholder", required: false }] }], $label: [{ type: i0.Input, args: [{ isSignal: true, alias: "$label", required: false }] }], $shouldFocusedAfterViewInit: [{ type: i0.Input, args: [{ isSignal: true, alias: "$shouldFocusedAfterViewInit", required: false }] }], $isRounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "$isRounded", required: false }] }], $hideValidatorErrors: [{ type: i0.Input, args: [{ isSignal: true, alias: "$hideValidatorErrors", required: false }] }], $icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "$icon", required: false }] }] } });
|
|
2960
2969
|
|
|
2961
2970
|
class UiInputCountryDirective extends UiInputDirective {
|
|
2962
2971
|
$selectedCountry = signal(emptyCountry, ...(ngDevMode ? [{ debugName: "$selectedCountry" }] : []));
|
|
2963
2972
|
$isOpen = signal(false, ...(ngDevMode ? [{ debugName: "$isOpen" }] : []));
|
|
2964
2973
|
$inputElement = viewChild('input', ...(ngDevMode ? [{ debugName: "$inputElement" }] : []));
|
|
2965
|
-
constructor() {
|
|
2966
|
-
super();
|
|
2974
|
+
constructor(elementRef, renderer) {
|
|
2975
|
+
super(elementRef, renderer);
|
|
2967
2976
|
}
|
|
2968
2977
|
ngAfterViewInit() {
|
|
2969
2978
|
this.autoSetCountry();
|
|
@@ -3006,7 +3015,7 @@ class UiInputCountryDirective extends UiInputDirective {
|
|
|
3006
3015
|
this.$selectedCountry.set(country);
|
|
3007
3016
|
}
|
|
3008
3017
|
}
|
|
3009
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: UiInputCountryDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3018
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: UiInputCountryDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
|
|
3010
3019
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "21.1.1", type: UiInputCountryDirective, isStandalone: true, selector: "app-ui-input-country", viewQueries: [{ propertyName: "$inputElement", first: true, predicate: ["input"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0 });
|
|
3011
3020
|
}
|
|
3012
3021
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: UiInputCountryDirective, decorators: [{
|
|
@@ -3014,7 +3023,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
|
|
|
3014
3023
|
args: [{
|
|
3015
3024
|
selector: 'app-ui-input-country',
|
|
3016
3025
|
}]
|
|
3017
|
-
}], ctorParameters: () => [], propDecorators: { $inputElement: [{ type: i0.ViewChild, args: ['input', { isSignal: true }] }] } });
|
|
3026
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { $inputElement: [{ type: i0.ViewChild, args: ['input', { isSignal: true }] }] } });
|
|
3018
3027
|
|
|
3019
3028
|
class UIInputDateDirective extends UiInputDirective {
|
|
3020
3029
|
$isOpen = signal(false, ...(ngDevMode ? [{ debugName: "$isOpen" }] : []));
|
|
@@ -3112,8 +3121,8 @@ class UIPhoneNumberDirective extends UiInputDirective {
|
|
|
3112
3121
|
$isOpen = signal(false, ...(ngDevMode ? [{ debugName: "$isOpen" }] : []));
|
|
3113
3122
|
$countryCode = signal('', ...(ngDevMode ? [{ debugName: "$countryCode" }] : []));
|
|
3114
3123
|
$inputElement = viewChild('input', ...(ngDevMode ? [{ debugName: "$inputElement" }] : []));
|
|
3115
|
-
constructor() {
|
|
3116
|
-
super();
|
|
3124
|
+
constructor(elementRef, renderer) {
|
|
3125
|
+
super(elementRef, renderer);
|
|
3117
3126
|
}
|
|
3118
3127
|
ngAfterViewInit() {
|
|
3119
3128
|
const selectedCountry = CountryService.getCountryByCode('US') ?? emptyCountry;
|
|
@@ -3150,7 +3159,7 @@ class UIPhoneNumberDirective extends UiInputDirective {
|
|
|
3150
3159
|
inputElement.focus();
|
|
3151
3160
|
}
|
|
3152
3161
|
}
|
|
3153
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: UIPhoneNumberDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3162
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: UIPhoneNumberDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
|
|
3154
3163
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "21.1.1", type: UIPhoneNumberDirective, isStandalone: true, selector: "app-ui-input-phone-number", viewQueries: [{ propertyName: "$inputElement", first: true, predicate: ["input"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0 });
|
|
3155
3164
|
}
|
|
3156
3165
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: UIPhoneNumberDirective, decorators: [{
|
|
@@ -3158,7 +3167,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
|
|
|
3158
3167
|
args: [{
|
|
3159
3168
|
selector: 'app-ui-input-phone-number',
|
|
3160
3169
|
}]
|
|
3161
|
-
}], ctorParameters: () => [], propDecorators: { $inputElement: [{ type: i0.ViewChild, args: ['input', { isSignal: true }] }] } });
|
|
3170
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { $inputElement: [{ type: i0.ViewChild, args: ['input', { isSignal: true }] }] } });
|
|
3162
3171
|
|
|
3163
3172
|
class UiInputSelectDirective extends UiInputDirective {
|
|
3164
3173
|
$items = input.required(...(ngDevMode ? [{ debugName: "$items" }] : []));
|