igniteui-angular
Version:
Ignite UI for Angular is a dependency-free Angular toolkit for building modern web apps
262 lines (261 loc) • 8.9 kB
TypeScript
import { ChangeDetectorRef, ElementRef, QueryList } from '@angular/core';
import { IInputResourceStrings } from '../core/i18n/input-resources';
import { PlatformUtil } from '../core/utils';
import { IgxHintDirective } from '../directives/hint/hint.directive';
import { IgxInputDirective } from '../directives/input/input.directive';
import { IgxPrefixDirective } from '../directives/prefix/prefix.directive';
import { IgxSuffixDirective } from '../directives/suffix/suffix.directive';
import { IgxInputGroupBase } from './input-group.common';
import { IgxInputGroupType } from './inputGroupType';
import { IgxTheme, ThemeToken } from '../services/theme/theme.token';
import * as i0 from "@angular/core";
export declare class IgxInputGroupComponent implements IgxInputGroupBase {
element: ElementRef<HTMLElement>;
private _inputGroupType;
private document;
private platform;
private cdr;
private themeToken;
/**
* Sets the resource strings.
* By default it uses EN resources.
*/
set resourceStrings(value: IInputResourceStrings);
/**
* Returns the resource strings.
*/
get resourceStrings(): IInputResourceStrings;
/**
* Property that enables/disables the auto-generated class of the `IgxInputGroupComponent`.
* By default applied the class is applied.
* ```typescript
* @ViewChild("MyInputGroup")
* public inputGroup: IgxInputGroupComponent;
* ngAfterViewInit(){
* this.inputGroup.defaultClass = false;
* ```
* }
*/
defaultClass: boolean;
/** @hidden */
hasPlaceholder: boolean;
/** @hidden */
isRequired: boolean;
/** @hidden */
isFocused: boolean;
/**
* @hidden @internal
* When truthy, disables the `IgxInputGroupComponent`.
* Controlled by the underlying `IgxInputDirective`.
* ```html
* <igx-input-group [disabled]="true"></igx-input-group>
* ```
*/
disabled: boolean;
/**
* Prevents automatically focusing the input when clicking on other elements in the input group (e.g. prefix or suffix).
*
* @remarks Automatic focus causes software keyboard to show on mobile devices.
*
* @example
* ```html
* <igx-input-group [suppressInputAutofocus]="true"></igx-input-group>
* ```
*/
suppressInputAutofocus: boolean;
/** @hidden */
hasWarning: boolean;
/** @hidden */
protected hints: QueryList<IgxHintDirective>;
protected _prefixes: QueryList<IgxPrefixDirective>;
protected _suffixes: QueryList<IgxSuffixDirective>;
/** @hidden */
protected input: IgxInputDirective;
private _destroyRef;
private _type;
private _filled;
private _theme;
private _resourceStrings;
/** @hidden */
get validClass(): boolean;
/** @hidden */
get invalidClass(): boolean;
/** @hidden */
get isFilled(): any;
/** @hidden */
get textAreaClass(): boolean;
/**
* Sets how the input will be styled.
* Allowed values of type IgxInputGroupType.
* ```html
* <igx-input-group [type]="'search'">
* ```
*/
set type(value: IgxInputGroupType);
/**
* Returns the type of the `IgxInputGroupComponent`. How the input is styled.
* The default is `line`.
* ```typescript
* @ViewChild("MyInputGroup")
* public inputGroup: IgxInputGroupComponent;
* ngAfterViewInit(){
* let inputType = this.inputGroup.type;
* }
* ```
*/
get type(): IgxInputGroupType;
/**
* Sets the theme of the input.
* Allowed values of type IgxInputGroupTheme.
* ```typescript
* @ViewChild("MyInputGroup")
* public inputGroup: IgxInputGroupComponent;
* ngAfterViewInit() {
* let inputTheme = 'fluent';
* }
*/
set theme(value: IgxTheme);
/**
* Returns the theme of the input.
* The returned value is of type IgxInputGroupType.
* ```typescript
* @ViewChild("MyInputGroup")
* public inputGroup: IgxInputGroupComponent;
* ngAfterViewInit() {
* let inputTheme = this.inputGroup.theme;
* }
*/
get theme(): IgxTheme;
constructor(element: ElementRef<HTMLElement>, _inputGroupType: IgxInputGroupType, document: any, platform: PlatformUtil, cdr: ChangeDetectorRef, themeToken: ThemeToken);
/** @hidden */
onClick(event: MouseEvent): void;
/** @hidden */
onPointerDown(event: PointerEvent): void;
/** @hidden @internal */
hintClickHandler(event: MouseEvent): void;
/**
* Returns whether the `IgxInputGroupComponent` has hints.
* ```typescript
* @ViewChild("MyInputGroup")
* public inputGroup: IgxInputGroupComponent;
* ngAfterViewInit(){
* let inputHints = this.inputGroup.hasHints;
* }
* ```
*/
get hasHints(): boolean;
/** @hidden @internal */
get hasPrefixes(): boolean;
/** @hidden @internal */
set prefixes(items: QueryList<IgxPrefixDirective>);
/** @hidden @internal */
get hasSuffixes(): any;
/** @hidden @internal */
set suffixes(items: QueryList<IgxPrefixDirective>);
/**
* Returns whether the `IgxInputGroupComponent` has border.
* ```typescript
* @ViewChild("MyInputGroup")
* public inputGroup: IgxInputGroupComponent;
* ngAfterViewInit(){
* let inputBorder = this.inputGroup.hasBorder;
* }
* ```
*/
get hasBorder(): boolean;
/**
* Returns whether the `IgxInputGroupComponent` type is line.
* ```typescript
* @ViewChild("MyInputGroup1")
* public inputGroup: IgxInputGroupComponent;
* ngAfterViewInit(){
* let isTypeLine = this.inputGroup.isTypeLine;
* }
* ```
*/
get isTypeLine(): boolean;
/**
* Returns whether the `IgxInputGroupComponent` type is box.
* ```typescript
* @ViewChild("MyInputGroup1")
* public inputGroup: IgxInputGroupComponent;
* ngAfterViewInit(){
* let isTypeBox = this.inputGroup.isTypeBox;
* }
* ```
*/
get isTypeBox(): boolean;
/** @hidden @internal */
uploadButtonHandler(): void;
/** @hidden @internal */
clearValueHandler(): void;
/** @hidden @internal */
get isFileType(): boolean;
/** @hidden @internal */
get fileNames(): string;
/**
* Returns whether the `IgxInputGroupComponent` type is border.
* ```typescript
* @ViewChild("MyInputGroup1")
* public inputGroup: IgxInputGroupComponent;
* ngAfterViewInit(){
* let isTypeBorder = this.inputGroup.isTypeBorder;
* }
* ```
*/
get isTypeBorder(): boolean;
/**
* Returns true if the `IgxInputGroupComponent` theme is Fluent.
* ```typescript
* @ViewChild("MyInputGroup1")
* public inputGroup: IgxInputGroupComponent;
* ngAfterViewInit(){
* let isTypeFluent = this.inputGroup.isTypeFluent;
* }
* ```
*/
get isTypeFluent(): boolean;
/**
* Returns true if the `IgxInputGroupComponent` theme is Bootstrap.
* ```typescript
* @ViewChild("MyInputGroup1")
* public inputGroup: IgxInputGroupComponent;
* ngAfterViewInit(){
* let isTypeBootstrap = this.inputGroup.isTypeBootstrap;
* }
* ```
*/
get isTypeBootstrap(): boolean;
/**
* Returns true if the `IgxInputGroupComponent` theme is Indigo.
* ```typescript
* @ViewChild("MyInputGroup1")
* public inputGroup: IgxInputGroupComponent;
* ngAfterViewInit(){
* let isTypeIndigo = this.inputGroup.isTypeIndigo;
* }
* ```
*/
get isTypeIndigo(): boolean;
/**
* Returns whether the `IgxInputGroupComponent` type is search.
* ```typescript
* @ViewChild("MyInputGroup1")
* public inputGroup: IgxInputGroupComponent;
* ngAfterViewInit(){
* let isTypeSearch = this.inputGroup.isTypeSearch;
* }
* ```
*/
get isTypeSearch(): boolean;
/** @hidden */
get filled(): boolean;
/** @hidden */
set filled(val: boolean);
private setComponentTheme;
/** @hidden @internal */
ngAfterContentChecked(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<IgxInputGroupComponent, [null, { optional: true; }, null, null, null, null]>;
static ɵcmp: i0.ɵɵComponentDeclaration<IgxInputGroupComponent, "igx-input-group", never, { "resourceStrings": { "alias": "resourceStrings"; "required": false; }; "suppressInputAutofocus": { "alias": "suppressInputAutofocus"; "required": false; }; "type": { "alias": "type"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; }, {}, ["input", "hints", "_prefixes", "_suffixes"], ["igx-hint, [igxHint]", "[igxLabel]", "[igxInput]", "igx-prefix, [igxPrefix]", "igx-suffix, [igxSuffix]"], true, never>;
static ngAcceptInputType_suppressInputAutofocus: unknown;
}