@taiga-ui/addon-commerce
Version:
Extension package for Taiga UI related to commerce, payment systems, currencies etc.
96 lines (95 loc) • 5.03 kB
TypeScript
import { type AfterViewInit, EventEmitter, type Signal } from '@angular/core';
import { TuiControl } from '@taiga-ui/cdk/classes';
import { type TuiBooleanHandler } from '@taiga-ui/cdk/types';
import { type TuiDataListHost } from '@taiga-ui/core/components/data-list';
import { TuiDropdownDirective } from '@taiga-ui/core/directives/dropdown';
import { type PolymorpheusContent } from '@taiga-ui/polymorpheus';
import * as i0 from "@angular/core";
import * as i1 from "@taiga-ui/core/directives/appearance";
import * as i2 from "@taiga-ui/core/directives/dropdown";
import * as i3 from "@taiga-ui/core/components/textfield";
export interface TuiCard {
card: string;
cvc: string;
expire: string;
}
export declare class TuiInputCardGroup extends TuiControl<TuiCard | null> implements TuiDataListHost<Partial<TuiCard>>, AfterViewInit {
private readonly inputCard?;
private readonly inputExpire?;
private readonly inputCVC?;
private readonly doc;
private readonly isServer;
private readonly focus$;
private expirePrefilled;
private readonly paymentSystems;
private readonly options;
private readonly el;
private readonly hover;
private readonly focusedIn;
protected exampleTextCVC: string;
protected cvcHidden: boolean;
protected maskCVC: import("@maskito/core").MaskitoOptions;
protected readonly isMobile: boolean;
protected readonly isWebkit: boolean;
protected readonly dropdown: TuiDropdownDirective;
protected readonly maskCard: import("@maskito/core").MaskitoOptions;
protected readonly maskExpire: Required<import("@maskito/core").MaskitoOptions>;
protected readonly icons: import("@taiga-ui/core/tokens").TuiCommonIcons;
protected readonly texts: Signal<import("./input-card-group.providers").TuiCardGroupedTexts | undefined>;
protected readonly open: import("@angular/core").WritableSignal<boolean>;
protected readonly $: import("rxjs").Subscription | import("rxjs").Observable<never>;
protected readonly m: Signal<string | readonly string[] | null>;
protected readonly appearance: import("@angular/core").WritableSignal<string>;
protected readonly state: Signal<unknown>;
protected readonly focus: Signal<boolean | null>;
protected readonly labelRaised: Signal<boolean>;
protected readonly hasCleaner: Signal<boolean>;
/**
* @deprecated use 'placeholder' instead
*/
exampleText: string;
placeholder: string;
inputs: import("./input-card-group.options").TuiCardInputs;
cardValidator: TuiBooleanHandler<string>;
icon: PolymorpheusContent;
id: string;
/** @deprecated apparently "off" doesn't disable autocomplete */
autocomplete: boolean;
readonly binChange: EventEmitter<string | null>;
set codeLength(length: 3 | 4);
get bin(): string | null;
ngAfterViewInit(): void;
writeValue(value: TuiCard | null): void;
/** Public API for manual focus management */
focusCard(): void;
focusExpire(): void;
focusCVC(): void;
handleOption(option: Partial<TuiCard> | null): void;
clear(): void;
onResize(): void;
protected get content(): PolymorpheusContent;
protected get card(): string;
protected get expire(): string;
protected get cvc(): string;
protected get cardCollapsed(): boolean;
protected get tailLength(): number;
protected get cardPrefilled(): boolean;
protected get cvcPrefilled(): boolean;
protected get cardFocusable(): boolean;
protected get expireFocusable(): boolean;
protected get cvcFocusable(): boolean;
protected get masked(): string;
protected onCardChange(card: string): void;
protected onExpireChange(expire: string): void;
protected onCVCChange(cvc: string): void;
protected getStyle({ offsetWidth }: HTMLSpanElement): string;
protected onPointerDown(event: MouseEvent): void;
protected toggle(): void;
private isFocusable;
private getPaymentSystem;
private updateBin;
private updateProperty;
private focusInput;
static ɵfac: i0.ɵɵFactoryDeclaration<TuiInputCardGroup, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<TuiInputCardGroup, "tui-input-card-group", never, { "exampleText": { "alias": "exampleText"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "inputs": { "alias": "inputs"; "required": false; }; "cardValidator": { "alias": "cardValidator"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "id": { "alias": "id"; "required": false; }; "autocomplete": { "alias": "autocomplete"; "required": false; }; "codeLength": { "alias": "codeLength"; "required": false; }; }, { "binChange": "binChange"; }, never, ["*"], true, [{ directive: typeof i1.TuiAppearance; inputs: {}; outputs: {}; }, { directive: typeof i2.TuiDropdownDirective; inputs: {}; outputs: {}; }, { directive: typeof i3.TuiWithTextfieldDropdown; inputs: {}; outputs: {}; }, { directive: typeof i2.TuiWithDropdownOpen; inputs: {}; outputs: {}; }]>;
}