1 |
|
2 | import { AfterViewInit, ElementRef, EventEmitter, NgZone, OnDestroy } from "@angular/core";
|
3 | import { RecaptchaLoaderService } from "./recaptcha-loader.service";
|
4 | import { RecaptchaSettings } from "./recaptcha-settings";
|
5 | import * as i0 from "@angular/core";
|
6 | export type NeverUndefined<T> = T extends undefined ? never : T;
|
7 | export type RecaptchaErrorParameters = Parameters<NeverUndefined<ReCaptchaV2.Parameters["error-callback"]>>;
|
8 | export declare class RecaptchaComponent implements AfterViewInit, OnDestroy {
|
9 | private elementRef;
|
10 | private loader;
|
11 | private zone;
|
12 | id: string;
|
13 | siteKey?: string;
|
14 | theme?: ReCaptchaV2.Theme;
|
15 | type?: ReCaptchaV2.Type;
|
16 | size?: ReCaptchaV2.Size;
|
17 | tabIndex?: number;
|
18 | badge?: ReCaptchaV2.Badge;
|
19 | errorMode: "handled" | "default";
|
20 | resolved: EventEmitter<string | null>;
|
21 | |
22 |
|
23 |
|
24 | error: EventEmitter<[]>;
|
25 | errored: EventEmitter<[]>;
|
26 |
|
27 | private subscription;
|
28 |
|
29 | private widget;
|
30 |
|
31 | private grecaptcha;
|
32 |
|
33 | private executeRequested;
|
34 | constructor(elementRef: ElementRef<HTMLElement>, loader: RecaptchaLoaderService, zone: NgZone, settings?: RecaptchaSettings);
|
35 | ngAfterViewInit(): void;
|
36 | ngOnDestroy(): void;
|
37 | /**
|
38 | * Executes the invisible recaptcha.
|
39 | * Does nothing if component's size is not set to "invisible".
|
40 | */
|
41 | execute(): void;
|
42 | reset(): void;
|
43 | /**
|
44 | * ⚠️ Warning! Use this property at your own risk!
|
45 | *
|
46 | * While this member is `public`, it is not a part of the component's public API.
|
47 | * The semantic versioning guarantees _will not be honored_! Thus, you might find that this property behavior changes in incompatible ways in minor or even patch releases.
|
48 | * You are **strongly advised** against using this property.
|
49 | * Instead, use more idiomatic ways to get reCAPTCHA value, such as `resolved` EventEmitter, or form-bound methods (ngModel, formControl, and the likes).å
|
50 | */
|
51 | get __unsafe_widgetValue(): string | null;
|
52 | /** @internal */
|
53 | private expired;
|
54 | /** @internal */
|
55 | private onError;
|
56 | /** @internal */
|
57 | private captchaResponseCallback;
|
58 | /** @internal */
|
59 | private grecaptchaReset;
|
60 | /** @internal */
|
61 | private renderRecaptcha;
|
62 | static ɵfac: i0.ɵɵFactoryDeclaration<RecaptchaComponent, [null, null, null, { optional: true; }]>;
|
63 | static ɵcmp: i0.ɵɵComponentDeclaration<RecaptchaComponent, "re-captcha", ["reCaptcha"], { "id": { "alias": "id"; "required": false; }; "siteKey": { "alias": "siteKey"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; "type": { "alias": "type"; "required": false; }; "size": { "alias": "size"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "badge": { "alias": "badge"; "required": false; }; "errorMode": { "alias": "errorMode"; "required": false; }; }, { "resolved": "resolved"; "error": "error"; "errored": "errored"; }, never, never, false, never>;
|
64 | }
|