Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ngx-captcha

Package Overview
Dependencies
Maintainers
1
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngx-captcha - npm Package Compare versions

Comparing version 11.0.0 to 12.0.0

dist/dist/README.md

6

lib/components/invisible-recaptcha.component.d.ts
import { ElementRef, Injector, NgZone, OnChanges, Renderer2, SimpleChanges } from '@angular/core';
import { ReCaptchaType } from '../models/recaptcha-type.enum';
import { ScriptService } from '../services/script.service';
import { BaseReCaptchaComponent } from './base-recaptcha.component';
import { BaseReCaptchaComponentDirective } from './base-re-captcha-component.directive';
import * as i0 from "@angular/core";
export declare class InvisibleReCaptchaComponent extends BaseReCaptchaComponent implements OnChanges {
export declare class InvisibleReCaptchaComponent extends BaseReCaptchaComponentDirective implements OnChanges {
protected renderer: Renderer2;

@@ -41,4 +41,4 @@ protected zone: NgZone;

static ɵfac: i0.ɵɵFactoryDeclaration<InvisibleReCaptchaComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<InvisibleReCaptchaComponent, "ngx-invisible-recaptcha", never, { "theme": "theme"; "badge": "badge"; "hl": "hl"; }, {}, never, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<InvisibleReCaptchaComponent, "ngx-invisible-recaptcha", never, { "theme": "theme"; "badge": "badge"; "hl": "hl"; }, {}, never, never, false>;
}
//# sourceMappingURL=invisible-recaptcha.component.d.ts.map
import { ElementRef, Injector, NgZone, OnChanges, OnDestroy, Renderer2, SimpleChanges } from '@angular/core';
import { ReCaptchaType } from '../models/recaptcha-type.enum';
import { ScriptService } from '../services/script.service';
import { BaseReCaptchaComponent } from './base-recaptcha.component';
import { BaseReCaptchaComponentDirective } from './base-re-captcha-component.directive';
import * as i0 from "@angular/core";
export declare class ReCaptcha2Component extends BaseReCaptchaComponent implements OnChanges, OnDestroy {
export declare class ReCaptcha2Component extends BaseReCaptchaComponentDirective implements OnChanges, OnDestroy {
protected renderer: Renderer2;

@@ -46,4 +46,4 @@ protected zone: NgZone;

static ɵfac: i0.ɵɵFactoryDeclaration<ReCaptcha2Component, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<ReCaptcha2Component, "ngx-recaptcha2", never, { "theme": "theme"; "size": "size"; "hl": "hl"; }, {}, never, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<ReCaptcha2Component, "ngx-recaptcha2", never, { "theme": "theme"; "size": "size"; "hl": "hl"; }, {}, never, never, false>;
}
//# sourceMappingURL=recaptcha-2.component.d.ts.map

@@ -1,2 +0,2 @@

export * from './components/base-recaptcha.component';
export * from './components/base-re-captcha-component.directive';
export * from './components/invisible-recaptcha.component';

@@ -3,0 +3,0 @@ export * from './components/recaptcha-2.component';

import { NgZone } from '@angular/core';
import { ScriptService } from './script.service';
import { RecaptchaConfiguration } from '../models/recaptcha-configuration';
import * as i0 from "@angular/core";

@@ -9,6 +10,7 @@ export declare class ReCaptchaV3Service {

/**
* Executes reCaptcha v3 with given action and passes token via callback. You need to verify
* Executes reCaptcha v3/Enterprise with given action and passes token via callback. You need to verify
* this callback in your backend to get meaningful results.
*
* For more information see https://developers.google.com/recaptcha/docs/v3
* For enterprise see https://cloud.google.com/recaptcha-enterprise/docs
*

@@ -21,17 +23,15 @@ * @param siteKey Site key found in your google admin panel

*/
execute(siteKey: string, action: string, callback: (token: string) => void, config?: {
useGlobalDomain: boolean;
}, errorCallback?: (error: any) => void): void;
execute(siteKey: string, action: string, callback: (token: string) => void, config?: RecaptchaConfiguration, errorCallback?: (error: any) => void): void;
/**
* Executes reCaptcha v3 with given action and returns token via Promise. You need to verify
* Executes reCaptcha v3/Enterprise with given action and returns token via Promise. You need to verify
* this token in your backend to get meaningful results.
*
* For more information see https://developers.google.com/recaptcha/docs/v3
* For enterprise see https://cloud.google.com/recaptcha-enterprise/docs
*
* @param siteKey Site key found in your google admin panel
* @param action Action to log
* @param config Optional configuration like useGlobalDomain to be provided
*/
executeAsPromise(siteKey: string, action: string, config?: {
useGlobalDomain: boolean;
}): Promise<string>;
executeAsPromise(siteKey: string, action: string, config?: RecaptchaConfiguration): Promise<string>;
static ɵfac: i0.ɵɵFactoryDeclaration<ReCaptchaV3Service, never>;

@@ -38,0 +38,0 @@ static ɵprov: i0.ɵɵInjectableDeclaration<ReCaptchaV3Service>;

@@ -1,5 +0,7 @@

import { NgZone } from '@angular/core';
import { NgZone } from "@angular/core";
import { RecaptchaConfiguration } from "../models/recaptcha-configuration";
import * as i0 from "@angular/core";
export declare class ScriptService {
protected zone: NgZone;
private readonly scriptElemId;
/**

@@ -10,9 +12,19 @@ * Name of the global google recaptcha script

/**
* Name of the global callback
*/
* Name of enterpise property in the global google recaptcha script
*/
protected readonly windowGrecaptchaEnterprise = "enterprise";
/**
* Name of the global callback
*/
protected readonly windowOnLoadCallbackProperty = "ngx_captcha_onload_callback";
/**
* Name of the global callback for enterprise
*/
protected readonly windowOnLoadEnterpriseCallbackProperty = "ngx_captcha_onload_enterprise_callback";
protected readonly globalDomain: string;
protected readonly defaultDomain: string;
protected readonly enterpriseApi: string;
protected readonly defaultApi: string;
constructor(zone: NgZone);
registerCaptchaScript(useGlobalDomain: boolean, render: string, onLoad: (grecaptcha: any) => void, language?: string): void;
registerCaptchaScript(config: RecaptchaConfiguration, render: string, onLoad: (grecaptcha: any) => void, language?: string): void;
cleanup(): void;

@@ -24,2 +36,8 @@ /**

/**
* Gets global callback name
* @param useEnterprise Optional flag for enterprise script
* @private
*/
private getCallbackName;
/**
* Gets language param used in script url

@@ -29,4 +47,4 @@ */

/**
* Url to google api script
*/
* Url to google api script
*/
private getCaptchaScriptUrl;

@@ -33,0 +51,0 @@ static ɵfac: i0.ɵɵFactoryDeclaration<ScriptService, never>;

{
"name": "ngx-captcha",
"version": "11.0.0",
"version": "12.0.0",
"license": "MIT",

@@ -24,4 +24,4 @@ "repository": {

"peerDependencies": {
"@angular/common": "^13.0.0",
"@angular/core": "^13.0.0"
"@angular/common": "^13.0.0 | ^14.0.0",
"@angular/core": "^13.0.0 | ^14.0.0"
},

@@ -33,3 +33,3 @@ "module": "fesm2015/ngx-captcha.mjs",

"fesm2015": "fesm2015/ngx-captcha.mjs",
"typings": "ngx-captcha.d.ts",
"typings": "index.d.ts",
"exports": {

@@ -40,3 +40,3 @@ "./package.json": {

".": {
"types": "./ngx-captcha.d.ts",
"types": "./index.d.ts",
"esm2020": "./esm2020/ngx-captcha.mjs",

@@ -43,0 +43,0 @@ "es2020": "./fesm2020/ngx-captcha.mjs",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc