UNPKG

@visa/nova-angular

Version:

Visa Product Design System Nova Angular library

89 lines (88 loc) 3.36 kB
/** * Copyright (c) 2025 Visa, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * **/ import { BooleanInput } from '@angular/cdk/coercion'; import { ElementRef, EventEmitter, OnInit } from '@angular/core'; import { ControlValueAccessor, NgControl } from '@angular/forms'; import { AppReadyService } from '../_utilities/services/app-stable-check.service'; import * as i0 from "@angular/core"; export declare class SelectDirective implements ControlValueAccessor, OnInit { el: ElementRef; private appReadyService; control: NgControl; /** * Sets custom id. */ id: string; get hostId(): string; /** * Provides custom class&#40;es&#41; for custom styling. * @default .v-input */ class: string; get hostClasses(): string; /** * Sets select as disabled when true. * @default false */ get disabled(): boolean; set disabled(value: BooleanInput); _disabled: boolean; get hostDisabled(): "disabled" | null; /** Fires when a formControl's disabled state updates. */ setDisabledState(isDisabled: boolean): void; setDisabledStateInit(isDisabled: boolean): void; /** * Marks select as invalid when true. * @default false */ get invalid(): boolean; set invalid(value: BooleanInput); _invalid: boolean; get ariaInvalid(): boolean; /** * Marks select as required when true. * @default false */ get required(): boolean; set required(value: BooleanInput); _required: boolean; /** * Emits disabled, invalid, and required state of select when changed. */ communicateState: EventEmitter<any>; /** * Value of select. */ get value(): any; set value(value: any); get val(): any; set val(value: any); _value: any; handleChange(event: Event): void; handleFocus(event: Event): void; handleBlur(event: Event): void; constructor(el: ElementRef, appReadyService: AppReadyService, control: NgControl); onChange: (_: any) => void; onTouched: (_: any) => void; registerOnChange(fn: any): void; registerOnTouched(fn: any): void; writeValue(value: any): void; informState(): void; ngOnInit(): void; static ɵfac: i0.ɵɵFactoryDeclaration<SelectDirective, [null, null, { optional: true; host: true; }]>; static ɵdir: i0.ɵɵDirectiveDeclaration<SelectDirective, "[v-select]", never, { "id": { "alias": "id"; "required": false; }; "class": { "alias": "class"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "invalid": { "alias": "invalid"; "required": false; }; "required": { "alias": "required"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "communicateState": "communicateState"; }, never, never, true, never>; }