ngx-stripe
Version:
Collect Payments with Stripe: The Angular Way
41 lines (40 loc) • 2.53 kB
TypeScript
import { ElementRef, EventEmitter, OnInit, OnChanges, SimpleChanges, OnDestroy, TemplateRef, ChangeDetectorRef } from '@angular/core';
import { StripeElementsOptions, StripeCardElementOptions, StripeCardElement, StripeElements, StripeCardElementChangeEvent, StripeCardElementUpdateOptions } from '@stripe/stripe-js';
import { NgxStripeElementLoadingTemplateDirective } from '../directives/stripe-element-loading-template.directive';
import { StripeElementsDirective } from '../directives/elements.directive';
import { StripeServiceInterface } from '../interfaces/stripe-instance.interface';
import { StripeElementsService } from '../services/stripe-elements.service';
import * as i0 from "@angular/core";
export declare class StripeCardComponent implements OnInit, OnChanges, OnDestroy {
private cdr;
stripeElementsService: StripeElementsService;
private elementsProvider;
loadingTemplate?: TemplateRef<NgxStripeElementLoadingTemplateDirective>;
stripeElementRef: ElementRef;
element: StripeCardElement;
containerClass: string;
options: Partial<StripeCardElementOptions>;
elementsOptions: Partial<StripeElementsOptions>;
stripe: StripeServiceInterface;
load: EventEmitter<StripeCardElement>;
blur: EventEmitter<void>;
change: EventEmitter<StripeCardElementChangeEvent>;
focus: EventEmitter<void>;
ready: EventEmitter<void>;
escape: EventEmitter<void>;
elements: StripeElements;
state: 'notready' | 'starting' | 'ready';
private elementsSubscription;
constructor(cdr: ChangeDetectorRef, stripeElementsService: StripeElementsService, elementsProvider: StripeElementsDirective);
ngOnChanges(changes: SimpleChanges): Promise<void>;
ngOnInit(): Promise<void>;
ngOnDestroy(): void;
update(options: StripeCardElementUpdateOptions): void;
/**
* @deprecated
*/
getCard(): StripeCardElement;
private createElement;
static ɵfac: i0.ɵɵFactoryDeclaration<StripeCardComponent, [null, null, { optional: true; }]>;
static ɵcmp: i0.ɵɵComponentDeclaration<StripeCardComponent, "ngx-stripe-card", never, { "containerClass": { "alias": "containerClass"; "required": false; }; "options": { "alias": "options"; "required": false; }; "elementsOptions": { "alias": "elementsOptions"; "required": false; }; "stripe": { "alias": "stripe"; "required": false; }; }, { "load": "load"; "blur": "blur"; "change": "change"; "focus": "focus"; "ready": "ready"; "escape": "escape"; }, ["loadingTemplate"], never, true, never>;
}