ng-recaptcha
Advanced tools
Comparing version 10.0.0 to 11.0.0
@@ -0,1 +1,9 @@ | ||
<a name="10.0.0"></a> | ||
# [10.0.0](https://github.com/DethAriel/ng-recaptcha/compare/v9.0.0...v10.0.0) (2022-06-25) | ||
### Features | ||
- **package:** add Angular 14 support ([eac6858](https://github.com/DethAriel/ng-recaptcha/commit/eac6858)) | ||
<a name="9.0.0"></a> | ||
@@ -2,0 +10,0 @@ |
@@ -17,3 +17,3 @@ import { ControlValueAccessor } from "@angular/forms"; | ||
static ɵfac: i0.ɵɵFactoryDeclaration<RecaptchaValueAccessorDirective, never>; | ||
static ɵdir: i0.ɵɵDirectiveDeclaration<RecaptchaValueAccessorDirective, "re-captcha[formControlName],re-captcha[formControl],re-captcha[ngModel]", never, {}, {}, never, never, false>; | ||
static ɵdir: i0.ɵɵDirectiveDeclaration<RecaptchaValueAccessorDirective, "re-captcha[formControlName],re-captcha[formControl],re-captcha[ngModel]", never, {}, {}, never, never, false, never>; | ||
} |
@@ -21,3 +21,7 @@ /// <reference types="grecaptcha" /> | ||
resolved: EventEmitter<string>; | ||
/** | ||
* @deprecated `(error) output will be removed in the next major version. Use (errored) instead | ||
*/ | ||
error: EventEmitter<[]>; | ||
errored: EventEmitter<[]>; | ||
/** @internal */ | ||
@@ -52,3 +56,3 @@ private subscription; | ||
/** @internal */ | ||
private errored; | ||
private onError; | ||
/** @internal */ | ||
@@ -61,3 +65,3 @@ private captchaResponseCallback; | ||
static ɵfac: i0.ɵɵFactoryDeclaration<RecaptchaComponent, [null, null, null, { optional: true; }]>; | ||
static ɵcmp: i0.ɵɵComponentDeclaration<RecaptchaComponent, "re-captcha", ["reCaptcha"], { "id": "id"; "siteKey": "siteKey"; "theme": "theme"; "type": "type"; "size": "size"; "tabIndex": "tabIndex"; "badge": "badge"; "errorMode": "errorMode"; }, { "resolved": "resolved"; "error": "error"; }, never, never, false>; | ||
static ɵcmp: i0.ɵɵComponentDeclaration<RecaptchaComponent, "re-captcha", ["reCaptcha"], { "id": "id"; "siteKey": "siteKey"; "theme": "theme"; "type": "type"; "size": "size"; "tabIndex": "tabIndex"; "badge": "badge"; "errorMode": "errorMode"; }, { "resolved": "resolved"; "error": "error"; "errored": "errored"; }, never, never, false, never>; | ||
} |
{ | ||
"name": "ng-recaptcha", | ||
"description": "Angular component for Google reCAPTCHA", | ||
"version": "10.0.0", | ||
"version": "11.0.0", | ||
"author": "Ruslan Arkhipau <dethariel@gmail.com>", | ||
@@ -19,3 +19,3 @@ "license": "MIT", | ||
"peerDependencies": { | ||
"@angular/core": "^14.0.0" | ||
"@angular/core": "^15.0.0" | ||
}, | ||
@@ -22,0 +22,0 @@ "dependencies": { |
@@ -23,2 +23,3 @@ # Angular component for Google reCAPTCHA | ||
- [Methods](#api-methods) | ||
1. [Angular version compatibility](#angular-versions) | ||
1. [Examples](#examples) | ||
@@ -91,3 +92,3 @@ - [Configuring the component globally](#example-global-config) | ||
```typescript | ||
// boot.ts | ||
// main.ts | ||
import { platformBrowserDynamic } from "@angular/platform-browser-dynamic"; | ||
@@ -192,3 +193,3 @@ import { MyAppModule } from "./app.module.ts"; | ||
- `error(errorDetails: RecaptchaErrorParameters)`. Occurs when reCAPTCHA encounters an error (usually a connectivity problem) **if and only if** `errorMode` input has been set to `"handled"`. | ||
- `errored(errorDetails: RecaptchaErrorParameters)`. Occurs when reCAPTCHA encounters an error (usually a connectivity problem) **if and only if** `errorMode` input has been set to `"handled"`. | ||
`errorDetails` is a simple propagation of any arguments that the original `error-callback` has provided, and is documented here for the purposes of completeness and future-proofing. This array will most often (if not always) be empty. A good strategy would be to rely on just the fact that this event got triggered, and show a message to your app's user telling them to retry. | ||
@@ -202,2 +203,19 @@ | ||
## <a name="angular-versions"></a>Angular version compatibility | ||
| `ng-recaptcha` version | Supported Angular versions | | ||
| -------------------------------------------------------------------------------- | ---------------------------------------------------- | | ||
| `11.x.x` | `15.x.x` | | ||
| `10.x.x` | `14.x.x` | | ||
| `9.x.x` | `13.x.x` | | ||
| `8.x.x` | `12.x.x` | | ||
| `7.x.x` | `11.x.x` | | ||
| ⬆️ Starting with `ng-recaptcha@7`, only one version of Angular will be supported | | ||
| `6.x.x` | `6.x.x \|\| 7.x.x \|\| 8.x.x \|\| 9.x.x \|\| 10.x.x` | | ||
| `5.x.x` | `6.x.x \|\| 7.x.x \|\| 8.x.x` | | ||
| `4.x.x` | `6.x.x \|\| 7.x.x` | | ||
| `3.x.x` | `4.x.x \|\| 5.x.x` | | ||
| `2.x.x` | `2.x.x \|\| 4.x.x` | | ||
| `1.x.x` | `2.x.x` | | ||
## <a name="examples"></a>Examples | ||
@@ -277,3 +295,3 @@ | ||
selector: "my-app", | ||
template: `<re-captcha (resolved)="resolved($event)" (error)="errored($event)" errorMode="handled"></re-captcha>`, | ||
template: `<re-captcha (resolved)="resolved($event)" (errored)="errored($event)" errorMode="handled"></re-captcha>`, | ||
}) | ||
@@ -293,5 +311,5 @@ export class MyApp { | ||
The `errorMode` input has two possible values -- `"handled"` and `"default"`, with latter being the default as the name suggests. Not specifying `errorMode`, or setting it to anything other than `"handled"` will not invoke your `(error)` callback, and will instead result in default reCAPTCHA functionality. | ||
The `errorMode` input has two possible values -- `"handled"` and `"default"`, with latter being the default as the name suggests. Not specifying `errorMode`, or setting it to anything other than `"handled"` will not invoke your `(errored)` callback, and will instead result in default reCAPTCHA functionality. | ||
The `(error)` callback will propagate all of the parameters that it receives from `grecaptcha['error-callback']` (which might be none) as an array. | ||
The `(errored)` callback will propagate all of the parameters that it receives from `grecaptcha['error-callback']` (which might be none) as an array. | ||
@@ -298,0 +316,0 @@ ### <a name="example-preload-api"></a>Loading the reCAPTCHA API by yourself [(see in action)](https://dethariel.github.io/ng-recaptcha/v8/preload-api) |
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
239693
1823
561