ng-recaptcha-2 14.0.0 → 15.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -22
- package/fesm2022/ng-recaptcha-2.mjs +30 -28
- package/fesm2022/ng-recaptcha-2.mjs.map +1 -1
- package/lib/load-script.d.ts +0 -1
- package/lib/recaptcha-loader.service.d.ts +0 -1
- package/lib/recaptcha-settings.d.ts +0 -1
- package/lib/recaptcha.component.d.ts +0 -1
- package/lib/tokens.d.ts +0 -1
- package/package.json +5 -6
- package/esm2022/index.mjs +0 -15
- package/esm2022/lib/load-script.mjs +0 -28
- package/esm2022/lib/recaptcha-common.module.mjs +0 -16
- package/esm2022/lib/recaptcha-forms.module.mjs +0 -19
- package/esm2022/lib/recaptcha-loader.service.mjs +0 -104
- package/esm2022/lib/recaptcha-settings.mjs +0 -2
- package/esm2022/lib/recaptcha-v3.module.mjs +0 -16
- package/esm2022/lib/recaptcha-v3.service.mjs +0 -106
- package/esm2022/lib/recaptcha-value-accessor.directive.mjs +0 -68
- package/esm2022/lib/recaptcha.component.mjs +0 -171
- package/esm2022/lib/recaptcha.module.mjs +0 -19
- package/esm2022/lib/tokens.mjs +0 -14
- package/esm2022/ng-recaptcha-2.mjs +0 -5
package/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# Angular component for Google reCAPTCHA
|
|
2
2
|
|
|
3
|
-
## ng-recaptcha [](https://www.npmjs.com/package/ng-recaptcha)
|
|
3
|
+
## ng-recaptcha-2 [](https://www.npmjs.com/package/ng-recaptcha-2)
|
|
4
|
+
|
|
5
|
+
Parent project [(ng-recaptcha)](https://dethariel.github.io/ng-recaptcha/)
|
|
4
6
|
|
|
5
7
|
[](https://raw.githubusercontent.com/dethariel/ng-recaptcha/master/LICENSE)
|
|
6
8
|
[](https://app.travis-ci.com/DethAriel/ng-recaptcha)
|
|
@@ -41,11 +43,11 @@ A simple, configurable, easy-to-start component for handling reCAPTCHA v2 and v3
|
|
|
41
43
|
The easiest way is to install through [yarn](https://yarnpkg.com/package/ng-recaptcha) or [npm](https://www.npmjs.com/package/ng-recaptcha):
|
|
42
44
|
|
|
43
45
|
```sh
|
|
44
|
-
yarn add ng-recaptcha
|
|
45
|
-
npm i ng-recaptcha --save
|
|
46
|
+
yarn add ng-recaptcha-2
|
|
47
|
+
npm i ng-recaptcha-2 --save
|
|
46
48
|
```
|
|
47
49
|
|
|
48
|
-
## <a name="example-basic"></a>Basic Usage [(see in action)](https://dethariel.github.io/ng-recaptcha/)
|
|
50
|
+
## <a name="example-basic"></a>Basic Usage [(see in action)](https://dethariel.github.io/ng-recaptcha-2/)
|
|
49
51
|
|
|
50
52
|
The below applies to reCAPTCHA v2, for basic usage with reCAPTCHA v3 scroll down to [here](#example-basic-v3).
|
|
51
53
|
|
|
@@ -53,9 +55,9 @@ To start with, you need to import the `RecaptchaModule` (more on that [later](#m
|
|
|
53
55
|
|
|
54
56
|
```typescript
|
|
55
57
|
// app.module.ts
|
|
56
|
-
import { RecaptchaModule } from "ng-recaptcha";
|
|
58
|
+
import { RecaptchaModule } from "ng-recaptcha-2";
|
|
57
59
|
// if you need forms support:
|
|
58
|
-
// import { RecaptchaModule, RecaptchaFormsModule } from 'ng-recaptcha';
|
|
60
|
+
// import { RecaptchaModule, RecaptchaFormsModule } from 'ng-recaptcha-2';
|
|
59
61
|
import { BrowserModule } from "@angular/platform-browser";
|
|
60
62
|
import { MyApp } from "./app.component.ts";
|
|
61
63
|
|
|
@@ -102,7 +104,7 @@ platformBrowserDynamic().bootstrapModule(MyAppModule);
|
|
|
102
104
|
|
|
103
105
|
```ts
|
|
104
106
|
import { BrowserModule } from "@angular/platform-browser";
|
|
105
|
-
import { RECAPTCHA_V3_SITE_KEY, RecaptchaV3Module } from "ng-recaptcha";
|
|
107
|
+
import { RECAPTCHA_V3_SITE_KEY, RecaptchaV3Module } from "ng-recaptcha-2";
|
|
106
108
|
|
|
107
109
|
import { MyApp } from "./app.component.ts";
|
|
108
110
|
|
|
@@ -118,7 +120,7 @@ export class MyAppModule {}
|
|
|
118
120
|
In order to execute a reCAPTCHA v3 action, import the `ReCaptchaV3Service` into your desired component:
|
|
119
121
|
|
|
120
122
|
```ts
|
|
121
|
-
import { ReCaptchaV3Service } from 'ng-recaptcha';
|
|
123
|
+
import { ReCaptchaV3Service } from 'ng-recaptcha-2';
|
|
122
124
|
|
|
123
125
|
@Component({
|
|
124
126
|
selector: 'recaptcha-demo',
|
|
@@ -153,7 +155,7 @@ You can also play with [this Stackblitz demo](https://stackblitz.com/edit/ng-rec
|
|
|
153
155
|
There are two modules available for you:
|
|
154
156
|
|
|
155
157
|
```typescript
|
|
156
|
-
import { RecaptchaModule, RecaptchaFormsModule } from "ng-recaptcha";
|
|
158
|
+
import { RecaptchaModule, RecaptchaFormsModule } from "ng-recaptcha-2";
|
|
157
159
|
```
|
|
158
160
|
|
|
159
161
|
If you want your `<re-captcha>` element to work correctly with `[(ngModel)]` directive,
|
|
@@ -200,6 +202,10 @@ Besides specifying these options on the component itself, you can provide a glob
|
|
|
200
202
|
|
|
201
203
|
## <a name="angular-versions"></a>Angular version compatibility
|
|
202
204
|
|
|
205
|
+
| `ng-recaptcha-2` version | Supported Angular versions |
|
|
206
|
+
| -------------------------------------------------------------------------------- | ---------------------------------------------------- |
|
|
207
|
+
| `14.x.x` | `18.x.x` |
|
|
208
|
+
|
|
203
209
|
| `ng-recaptcha` version | Supported Angular versions |
|
|
204
210
|
| -------------------------------------------------------------------------------- | ---------------------------------------------------- |
|
|
205
211
|
| `13.x.x` | `17.x.x` |
|
|
@@ -224,7 +230,7 @@ Besides specifying these options on the component itself, you can provide a glob
|
|
|
224
230
|
Some properties are global - including `siteKey`, `size`, and others. You can provide them at the module-level using the `RECAPTCHA_SETTINGS` provider:
|
|
225
231
|
|
|
226
232
|
```typescript
|
|
227
|
-
import { RECAPTCHA_SETTINGS, RecaptchaSettings } from "ng-recaptcha";
|
|
233
|
+
import { RECAPTCHA_SETTINGS, RecaptchaSettings } from "ng-recaptcha-2";
|
|
228
234
|
|
|
229
235
|
@NgModule({
|
|
230
236
|
providers: [
|
|
@@ -250,7 +256,7 @@ A good way to synchronize reCAPTCHA language with the rest of your application i
|
|
|
250
256
|
|
|
251
257
|
```typescript
|
|
252
258
|
import { LOCALE_ID } from "@angular/core";
|
|
253
|
-
import { RECAPTCHA_LOADER_OPTIONS } from "ng-recaptcha";
|
|
259
|
+
import { RECAPTCHA_LOADER_OPTIONS } from "ng-recaptcha-2";
|
|
254
260
|
|
|
255
261
|
@NgModule({
|
|
256
262
|
providers: [
|
|
@@ -273,7 +279,7 @@ export class MyModule {}
|
|
|
273
279
|
Alternatively, a specific language can be provided like so:
|
|
274
280
|
|
|
275
281
|
```typescript
|
|
276
|
-
import { RECAPTCHA_LOADER_OPTIONS } from "ng-recaptcha";
|
|
282
|
+
import { RECAPTCHA_LOADER_OPTIONS } from "ng-recaptcha-2";
|
|
277
283
|
|
|
278
284
|
@NgModule({
|
|
279
285
|
providers: [
|
|
@@ -347,7 +353,7 @@ The below code snippet is an example of how such a provider can be implemented.
|
|
|
347
353
|
```
|
|
348
354
|
|
|
349
355
|
```typescript
|
|
350
|
-
import { RecaptchaLoaderService } from "ng-recaptcha";
|
|
356
|
+
import { RecaptchaLoaderService } from "ng-recaptcha-2";
|
|
351
357
|
|
|
352
358
|
@Injectable()
|
|
353
359
|
export class PreloadedRecaptchaAPIService {
|
|
@@ -373,7 +379,7 @@ export class MyModule {}
|
|
|
373
379
|
### <a name="example-forms"></a>Usage with `required` in forms [(see in action)](https://dethariel.github.io/ng-recaptcha/forms)
|
|
374
380
|
|
|
375
381
|
It's very easy to put `<re-captcha>` in an Angular form and have it `require`d - just
|
|
376
|
-
add the `required` attribute to the `<re-captcha>` element. Do not forget to import `RecaptchaFormsModule` from `'ng-recaptcha'`!
|
|
382
|
+
add the `required` attribute to the `<re-captcha>` element. Do not forget to import `RecaptchaFormsModule` from `'ng-recaptcha-2'`!
|
|
377
383
|
|
|
378
384
|
```typescript
|
|
379
385
|
@Component({
|
|
@@ -464,7 +470,7 @@ Making reCAPTCHA responsive is sometimes necessary, especially when working with
|
|
|
464
470
|
|
|
465
471
|
### <a name="example-systemjs"></a>SystemJS configuration
|
|
466
472
|
|
|
467
|
-
To configure the package to work with SystemJS, you would configure it approximately like that (assuming you've installed `ng-recaptcha` using `npm`):
|
|
473
|
+
To configure the package to work with SystemJS, you would configure it approximately like that (assuming you've installed `ng-recaptcha-2` using `npm`):
|
|
468
474
|
|
|
469
475
|
```javascript
|
|
470
476
|
// SystemJS config file
|
|
@@ -474,10 +480,10 @@ To configure the package to work with SystemJS, you would configure it approxima
|
|
|
474
480
|
"npm:": "/node_modules/",
|
|
475
481
|
},
|
|
476
482
|
map: {
|
|
477
|
-
"ng-recaptcha": "npm:ng-recaptcha",
|
|
483
|
+
"ng-recaptcha-2": "npm:ng-recaptcha-2",
|
|
478
484
|
},
|
|
479
485
|
packages: {
|
|
480
|
-
"ng-recaptcha": { main: "./index.js" },
|
|
486
|
+
"ng-recaptcha-2": { main: "./index.js" },
|
|
481
487
|
},
|
|
482
488
|
});
|
|
483
489
|
})();
|
|
@@ -488,7 +494,7 @@ To configure the package to work with SystemJS, you would configure it approxima
|
|
|
488
494
|
Since `"google.com"` domain might be unavailable in some countries, reCAPTCHA core team has a solution for that - using `"recaptcha.net"` domain. You can configure the component to use that by using the `onBeforeLoad` hook of `RECAPTCHA_LOADER_OPTIONS`, for example:
|
|
489
495
|
|
|
490
496
|
```javascript
|
|
491
|
-
import { RECAPTCHA_LOADER_OPTIONS } from "ng-recaptcha";
|
|
497
|
+
import { RECAPTCHA_LOADER_OPTIONS } from "ng-recaptcha-2";
|
|
492
498
|
|
|
493
499
|
@NgModule({
|
|
494
500
|
providers: [
|
|
@@ -512,7 +518,7 @@ export class MyModule {}
|
|
|
512
518
|
Per [reCAPTCHA FAQ on CSP](https://developers.google.com/recaptcha/docs/faq#im-using-content-security-policy-csp-on-my-website-how-can-i-configure-it-to-work-with-recaptcha), the recommended approach for that is to supply nonce to the script tag. This is possible by providing the nonce as part of the `onBeforeLoad` hook of `RECAPTCHA_LOADER_OPTIONS`, for example
|
|
513
519
|
|
|
514
520
|
```javascript
|
|
515
|
-
import { RECAPTCHA_LOADER_OPTIONS } from "ng-recaptcha";
|
|
521
|
+
import { RECAPTCHA_LOADER_OPTIONS } from "ng-recaptcha-2";
|
|
516
522
|
|
|
517
523
|
@NgModule({
|
|
518
524
|
providers: [
|
|
@@ -550,7 +556,7 @@ where `action` is the name of the action that has been executed, and `token` is
|
|
|
550
556
|
Here's how you would potentially set this up:
|
|
551
557
|
|
|
552
558
|
```ts
|
|
553
|
-
import { OnExecuteData, ReCaptchaV3Service } from "ng-recaptcha";
|
|
559
|
+
import { OnExecuteData, ReCaptchaV3Service } from "ng-recaptcha-2";
|
|
554
560
|
|
|
555
561
|
@Component({
|
|
556
562
|
selector: "my-component",
|
|
@@ -605,7 +611,7 @@ export class ConfigService {
|
|
|
605
611
|
|
|
606
612
|
// app.module.ts
|
|
607
613
|
import { APP_INITIALIZER, NgModule } from "@angular/core";
|
|
608
|
-
import { RECAPTCHA_SETTINGS, RecaptchaSettings, RECAPTCHA_V3_SITE_KEY } from "ng-recaptcha";
|
|
614
|
+
import { RECAPTCHA_SETTINGS, RecaptchaSettings, RECAPTCHA_V3_SITE_KEY } from "ng-recaptcha-2";
|
|
609
615
|
|
|
610
616
|
import { ConfigService } from "./config.service";
|
|
611
617
|
|
|
@@ -642,6 +648,6 @@ export class AppModule {}
|
|
|
642
648
|
|
|
643
649
|
### <a name="hide-recaptcha-badge"></a>Hiding reCAPTCHA badge
|
|
644
650
|
|
|
645
|
-
To start with, this is not strictly under `ng-recaptcha` library control.
|
|
651
|
+
To start with, this is not strictly under `ng-recaptcha-2` library control.
|
|
646
652
|
However, there is a way of doing so (albeit subject to certain conditions).
|
|
647
653
|
Please refer to the [FAQ section of reCAPTCHA documentation](https://developers.google.com/recaptcha/docs/faq#id-like-to-hide-the-recaptcha-badge.-what-is-allowed) to get an idea of what you're required to do.
|
|
@@ -108,10 +108,10 @@ class RecaptchaLoaderService {
|
|
|
108
108
|
});
|
|
109
109
|
return subject;
|
|
110
110
|
}
|
|
111
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
112
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
111
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: RecaptchaLoaderService, deps: [{ token: PLATFORM_ID }, { token: RECAPTCHA_LANGUAGE, optional: true }, { token: RECAPTCHA_BASE_URL, optional: true }, { token: RECAPTCHA_NONCE, optional: true }, { token: RECAPTCHA_V3_SITE_KEY, optional: true }, { token: RECAPTCHA_LOADER_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
112
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: RecaptchaLoaderService }); }
|
|
113
113
|
}
|
|
114
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
114
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: RecaptchaLoaderService, decorators: [{
|
|
115
115
|
type: Injectable
|
|
116
116
|
}], ctorParameters: () => [{ type: Object, decorators: [{
|
|
117
117
|
type: Inject,
|
|
@@ -268,15 +268,16 @@ class RecaptchaComponent {
|
|
|
268
268
|
this.execute();
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
272
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
271
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: RecaptchaComponent, deps: [{ token: i0.ElementRef }, { token: RecaptchaLoaderService }, { token: i0.NgZone }, { token: RECAPTCHA_SETTINGS, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
272
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.0", type: RecaptchaComponent, isStandalone: false, selector: "re-captcha", inputs: { id: "id", siteKey: "siteKey", theme: "theme", type: "type", size: "size", tabIndex: "tabIndex", badge: "badge", errorMode: "errorMode" }, outputs: { resolved: "resolved", error: "error", errored: "errored" }, host: { properties: { "attr.id": "this.id" } }, exportAs: ["reCaptcha"], ngImport: i0, template: ``, isInline: true }); }
|
|
273
273
|
}
|
|
274
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
274
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: RecaptchaComponent, decorators: [{
|
|
275
275
|
type: Component,
|
|
276
276
|
args: [{
|
|
277
277
|
exportAs: "reCaptcha",
|
|
278
278
|
selector: "re-captcha",
|
|
279
279
|
template: ``,
|
|
280
|
+
standalone: false,
|
|
280
281
|
}]
|
|
281
282
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: RecaptchaLoaderService }, { type: i0.NgZone }, { type: undefined, decorators: [{
|
|
282
283
|
type: Optional
|
|
@@ -311,11 +312,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImpor
|
|
|
311
312
|
}] } });
|
|
312
313
|
|
|
313
314
|
class RecaptchaCommonModule {
|
|
314
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
315
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
316
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
315
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: RecaptchaCommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
316
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.0", ngImport: i0, type: RecaptchaCommonModule, declarations: [RecaptchaComponent], exports: [RecaptchaComponent] }); }
|
|
317
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: RecaptchaCommonModule }); }
|
|
317
318
|
}
|
|
318
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
319
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: RecaptchaCommonModule, decorators: [{
|
|
319
320
|
type: NgModule,
|
|
320
321
|
args: [{
|
|
321
322
|
declarations: [RecaptchaComponent],
|
|
@@ -324,11 +325,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImpor
|
|
|
324
325
|
}] });
|
|
325
326
|
|
|
326
327
|
class RecaptchaModule {
|
|
327
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
328
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
329
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
328
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: RecaptchaModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
329
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.0", ngImport: i0, type: RecaptchaModule, imports: [RecaptchaCommonModule], exports: [RecaptchaComponent] }); }
|
|
330
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: RecaptchaModule, providers: [RecaptchaLoaderService], imports: [RecaptchaCommonModule] }); }
|
|
330
331
|
}
|
|
331
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
332
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: RecaptchaModule, decorators: [{
|
|
332
333
|
type: NgModule,
|
|
333
334
|
args: [{
|
|
334
335
|
exports: [RecaptchaComponent],
|
|
@@ -428,10 +429,10 @@ class ReCaptchaV3Service {
|
|
|
428
429
|
}
|
|
429
430
|
});
|
|
430
431
|
}
|
|
431
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
432
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
432
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: ReCaptchaV3Service, deps: [{ token: i0.NgZone }, { token: RecaptchaLoaderService }, { token: RECAPTCHA_V3_SITE_KEY }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
433
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: ReCaptchaV3Service }); }
|
|
433
434
|
}
|
|
434
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
435
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: ReCaptchaV3Service, decorators: [{
|
|
435
436
|
type: Injectable
|
|
436
437
|
}], ctorParameters: () => [{ type: i0.NgZone }, { type: RecaptchaLoaderService }, { type: undefined, decorators: [{
|
|
437
438
|
type: Inject,
|
|
@@ -439,11 +440,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImpor
|
|
|
439
440
|
}] }] });
|
|
440
441
|
|
|
441
442
|
class RecaptchaV3Module {
|
|
442
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
443
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
444
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
443
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: RecaptchaV3Module, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
444
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.0", ngImport: i0, type: RecaptchaV3Module }); }
|
|
445
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: RecaptchaV3Module, providers: [ReCaptchaV3Service, RecaptchaLoaderService] }); }
|
|
445
446
|
}
|
|
446
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
447
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: RecaptchaV3Module, decorators: [{
|
|
447
448
|
type: NgModule,
|
|
448
449
|
args: [{
|
|
449
450
|
providers: [ReCaptchaV3Service, RecaptchaLoaderService],
|
|
@@ -488,8 +489,8 @@ class RecaptchaValueAccessorDirective {
|
|
|
488
489
|
this.onTouched();
|
|
489
490
|
}
|
|
490
491
|
}
|
|
491
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
492
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
492
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: RecaptchaValueAccessorDirective, deps: [{ token: RecaptchaComponent }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
493
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0", type: RecaptchaValueAccessorDirective, isStandalone: false, selector: "re-captcha[formControlName],re-captcha[formControl],re-captcha[ngModel]", host: { listeners: { "resolved": "onResolve($event)" } }, providers: [
|
|
493
494
|
{
|
|
494
495
|
multi: true,
|
|
495
496
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -497,7 +498,7 @@ class RecaptchaValueAccessorDirective {
|
|
|
497
498
|
},
|
|
498
499
|
], ngImport: i0 }); }
|
|
499
500
|
}
|
|
500
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
501
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: RecaptchaValueAccessorDirective, decorators: [{
|
|
501
502
|
type: Directive,
|
|
502
503
|
args: [{
|
|
503
504
|
providers: [
|
|
@@ -508,6 +509,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImpor
|
|
|
508
509
|
},
|
|
509
510
|
],
|
|
510
511
|
selector: "re-captcha[formControlName],re-captcha[formControl],re-captcha[ngModel]",
|
|
512
|
+
standalone: false,
|
|
511
513
|
}]
|
|
512
514
|
}], ctorParameters: () => [{ type: RecaptchaComponent }], propDecorators: { onResolve: [{
|
|
513
515
|
type: HostListener,
|
|
@@ -515,11 +517,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImpor
|
|
|
515
517
|
}] } });
|
|
516
518
|
|
|
517
519
|
class RecaptchaFormsModule {
|
|
518
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
519
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
520
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
520
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: RecaptchaFormsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
521
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.0", ngImport: i0, type: RecaptchaFormsModule, declarations: [RecaptchaValueAccessorDirective], imports: [FormsModule, RecaptchaCommonModule], exports: [RecaptchaValueAccessorDirective] }); }
|
|
522
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: RecaptchaFormsModule, imports: [FormsModule, RecaptchaCommonModule] }); }
|
|
521
523
|
}
|
|
522
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
524
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: RecaptchaFormsModule, decorators: [{
|
|
523
525
|
type: NgModule,
|
|
524
526
|
args: [{
|
|
525
527
|
declarations: [RecaptchaValueAccessorDirective],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-recaptcha-2.mjs","sources":["../../../projects/ng-recaptcha/src/lib/tokens.ts","../../../projects/ng-recaptcha/src/lib/load-script.ts","../../../projects/ng-recaptcha/src/lib/recaptcha-loader.service.ts","../../../projects/ng-recaptcha/src/lib/recaptcha.component.ts","../../../projects/ng-recaptcha/src/lib/recaptcha-common.module.ts","../../../projects/ng-recaptcha/src/lib/recaptcha.module.ts","../../../projects/ng-recaptcha/src/lib/recaptcha-v3.service.ts","../../../projects/ng-recaptcha/src/lib/recaptcha-v3.module.ts","../../../projects/ng-recaptcha/src/lib/recaptcha-value-accessor.directive.ts","../../../projects/ng-recaptcha/src/lib/recaptcha-forms.module.ts","../../../projects/ng-recaptcha/src/ng-recaptcha-2.ts"],"sourcesContent":["import { InjectionToken } from \"@angular/core\";\n\nimport { RecaptchaSettings } from \"./recaptcha-settings\";\n\n/** @deprecated Use `LOADER_OPTIONS` instead. See `RecaptchaLoaderOptions.onBeforeLoad` */\nexport const RECAPTCHA_LANGUAGE = new InjectionToken<string>(\"recaptcha-language\");\n/** @deprecated Use `LOADER_OPTIONS` instead. See `RecaptchaLoaderOptions.onBeforeLoad` */\nexport const RECAPTCHA_BASE_URL = new InjectionToken<string>(\"recaptcha-base-url\");\n/** @deprecated Use `LOADER_OPTIONS` instead. See `RecaptchaLoaderOptions.onBeforeLoad` */\nexport const RECAPTCHA_NONCE = new InjectionToken<string>(\"recaptcha-nonce-tag\");\nexport const RECAPTCHA_SETTINGS = new InjectionToken<RecaptchaSettings>(\"recaptcha-settings\");\nexport const RECAPTCHA_V3_SITE_KEY = new InjectionToken<string>(\"recaptcha-v3-site-key\");\n\n/**\n * Specifies the options for loading the reCAPTCHA script tag.\n */\nexport type RecaptchaLoaderOptions = {\n /**\n * Invoked before the `<script>` tag is appended to the DOM.\n * Use this function as an opportunity to set `nonce`, as well as modify the URL of the tag.\n *\n * Use the `url.searchParams` to set additional query string attributes (including reCAPTCHA language),\n * or use an entirely different base URL altogether.\n *\n * The URL that you provide will then properly set the `\"render\"` and `\"onload\"` attributes which are required for proper `ng-recaptcha` wire-up.\n *\n * @param url the current URL that was composed. Either modify it in-place, or return a completely new URL.\n * @returns the final URL that is going to be used as the `src` for the `<script>` tag, along with (optionally) a nonce.\n *\n * @example\n * Provide nonce:\n * ```ts\n * {\n * provide: RECAPTCHA_LOADER_OPTIONS,\n * useValue: {\n * onBeforeLoad(url) {\n * return {\n * url,\n * nonce: \"YOUR_NONCE\"\n * };\n * }\n * }\n * }\n * ```\n *\n * Set the reCAPTCHA language:\n * ```ts\n * {\n * provide: RECAPTCHA_LOADER_OPTIONS,\n * useValue: {\n * onBeforeLoad(url) {\n * url.searchParams.set(\"hl\", \"en-GB\")\n *\n * return { url };\n * }\n * }\n * }\n * ```\n *\n * Use a different base URL for loading reCAPTCHA\n * ```ts\n * {\n * provide: RECAPTCHA_LOADER_OPTIONS,\n * useValue: {\n * onBeforeLoad(_url) {\n * const chinaCompatibleUrl = new URL(\"https://www.recaptcha.net/recaptcha/api.js\");\n * // optionally, set the locale:\n * // chinaCompatibleUrl.searchParams.set(\"hl\", \"zh-CN\");\n *\n * return {\n * url: chinaCompatibleUrl\n * };\n * }\n * }\n * }\n * ```\n */\n onBeforeLoad?(url: URL): { url: URL; nonce?: string };\n\n /**\n * Allows you to change the `grecaptcha` that the `ng-recaptcha` will be relying on.\n * This method is useful when you need to use `grecaptcha.enterprise` instead of the base `grecaptcha`\n *\n * @param recaptcha the value of `window.grecaptcha` upon script load.\n * @returns the {ReCaptchaV2.ReCaptcha} instance that the `ng-recaptcha` lib will use.\n *\n * @example\n * Using the Enterprise version of `grecaptcha`:\n *\n * ```ts\n * {\n * provide: RECAPTCHA_LOADER_OPTIONS,\n * useValue: {\n * onBeforeLoad() {\n * const recaptchaEnterpriseUrl = new URL(\"https://www.google.com/recaptcha/enterprise.js\");\n * // optionally, if you're using the reCAPTCHA session-tokens, set the `&waf=session` param,\n * // see https://cloud.google.com/recaptcha-enterprise/docs/implement-waf-ca#session-token\n * // recaptchaEnterpriseUrl.searchParams.set(\"waf\", \"session\");\n *\n * return {\n * url: recaptchaEnterpriseUrl,\n * }\n * },\n * onLoaded(recaptcha) {\n * return recaptcha.enterprise;\n * }\n * }\n * }\n * ```\n */\n onLoaded?(recaptcha: ReCaptchaV2.ReCaptcha): ReCaptchaV2.ReCaptcha;\n};\n\n/**\n * See the documentation for `RecaptchaLoaderOptions`.\n */\nexport const RECAPTCHA_LOADER_OPTIONS = new InjectionToken<RecaptchaLoaderOptions>(\"recaptcha-loader-options\");\n","import { RecaptchaLoaderOptions } from \"./tokens\";\n\ndeclare global {\n interface Window {\n ng2recaptchaloaded?(): void;\n }\n}\n\nexport type RenderMode = \"explicit\" | { key: string };\n\nfunction loadScript(\n renderMode: RenderMode,\n onBeforeLoad: (url: URL) => { url: URL; nonce?: string },\n onLoaded: (grecaptcha: ReCaptchaV2.ReCaptcha) => void,\n { url, lang, nonce }: { url?: string; lang?: string; nonce?: string } = {},\n): void {\n window.ng2recaptchaloaded = () => {\n onLoaded(grecaptcha);\n };\n const script = document.createElement(\"script\");\n script.innerHTML = \"\";\n\n const { url: baseUrl, nonce: onBeforeLoadNonce } = onBeforeLoad(\n new URL(url || \"https://www.google.com/recaptcha/api.js\"),\n );\n baseUrl.searchParams.set(\"render\", renderMode === \"explicit\" ? renderMode : renderMode.key);\n baseUrl.searchParams.set(\"onload\", \"ng2recaptchaloaded\");\n baseUrl.searchParams.set(\"trustedtypes\", \"true\");\n if (lang) {\n baseUrl.searchParams.set(\"hl\", lang);\n }\n\n script.src = baseUrl.href;\n\n const nonceValue = onBeforeLoadNonce || nonce;\n\n if (nonceValue) {\n script.setAttribute(\"nonce\", nonceValue);\n }\n script.async = true;\n script.defer = true;\n document.head.appendChild(script);\n}\n\nfunction newLoadScript({\n v3SiteKey,\n onBeforeLoad,\n onLoaded,\n}: { v3SiteKey: string | undefined; onLoaded(recaptcha: ReCaptchaV2.ReCaptcha): void } & Pick<\n Required<RecaptchaLoaderOptions>,\n \"onBeforeLoad\"\n>) {\n const renderMode: RenderMode = v3SiteKey ? { key: v3SiteKey } : \"explicit\";\n\n loader.loadScript(renderMode, onBeforeLoad, onLoaded);\n}\n\nexport const loader = { loadScript, newLoadScript };\n","import { isPlatformBrowser } from \"@angular/common\";\nimport { Inject, Injectable, Optional, PLATFORM_ID } from \"@angular/core\";\nimport { BehaviorSubject, Observable, of } from \"rxjs\";\nimport { filter } from \"rxjs/operators\";\n\nimport { loader } from \"./load-script\";\nimport {\n RECAPTCHA_LOADER_OPTIONS,\n RECAPTCHA_BASE_URL,\n RECAPTCHA_LANGUAGE,\n RECAPTCHA_NONCE,\n RECAPTCHA_V3_SITE_KEY,\n RecaptchaLoaderOptions,\n} from \"./tokens\";\n\nfunction toNonNullObservable<T>(subject: BehaviorSubject<T | null>): Observable<T> {\n return subject.asObservable().pipe(filter<T>((value) => value !== null));\n}\n\n@Injectable()\nexport class RecaptchaLoaderService {\n /**\n * @internal\n * @nocollapse\n */\n private static ready: BehaviorSubject<ReCaptchaV2.ReCaptcha | null> | null = null;\n\n public ready: Observable<ReCaptchaV2.ReCaptcha>;\n\n /** @internal */\n private language?: string;\n /** @internal */\n private baseUrl?: string;\n /** @internal */\n private nonce?: string;\n /** @internal */\n private v3SiteKey?: string;\n /** @internal */\n private options?: RecaptchaLoaderOptions;\n\n constructor(\n // eslint-disable-next-line @typescript-eslint/ban-types\n @Inject(PLATFORM_ID) private readonly platformId: Object,\n // eslint-disable-next-line deprecation/deprecation\n @Optional() @Inject(RECAPTCHA_LANGUAGE) language?: string,\n // eslint-disable-next-line deprecation/deprecation\n @Optional() @Inject(RECAPTCHA_BASE_URL) baseUrl?: string,\n // eslint-disable-next-line deprecation/deprecation\n @Optional() @Inject(RECAPTCHA_NONCE) nonce?: string,\n @Optional() @Inject(RECAPTCHA_V3_SITE_KEY) v3SiteKey?: string,\n @Optional() @Inject(RECAPTCHA_LOADER_OPTIONS) options?: RecaptchaLoaderOptions,\n ) {\n this.language = language;\n this.baseUrl = baseUrl;\n this.nonce = nonce;\n this.v3SiteKey = v3SiteKey;\n this.options = options;\n const subject = this.init();\n this.ready = subject ? toNonNullObservable(subject) : of();\n }\n\n /** @internal */\n private init(): BehaviorSubject<ReCaptchaV2.ReCaptcha | null> | undefined {\n if (RecaptchaLoaderService.ready) {\n return RecaptchaLoaderService.ready;\n }\n\n if (!isPlatformBrowser(this.platformId)) {\n return undefined;\n }\n\n const subject = new BehaviorSubject<ReCaptchaV2.ReCaptcha | null>(null);\n RecaptchaLoaderService.ready = subject;\n\n loader.newLoadScript({\n v3SiteKey: this.v3SiteKey,\n onBeforeLoad: (url) => {\n if (this.options?.onBeforeLoad) {\n return this.options.onBeforeLoad(url);\n }\n\n const newUrl = new URL(this.baseUrl ?? url);\n\n if (this.language) {\n newUrl.searchParams.set(\"hl\", this.language);\n }\n\n return {\n url: newUrl,\n nonce: this.nonce,\n };\n },\n onLoaded: (recaptcha) => {\n let value = recaptcha;\n if (this.options?.onLoaded) {\n value = this.options.onLoaded(recaptcha);\n }\n\n subject.next(value);\n },\n });\n\n return subject;\n }\n}\n","import {\n AfterViewInit,\n Component,\n ElementRef,\n EventEmitter,\n HostBinding,\n Inject,\n Input,\n NgZone,\n OnDestroy,\n Optional,\n Output,\n} from \"@angular/core\";\nimport { Subscription } from \"rxjs\";\n\nimport { RecaptchaLoaderService } from \"./recaptcha-loader.service\";\nimport { RecaptchaSettings } from \"./recaptcha-settings\";\nimport { RECAPTCHA_SETTINGS } from \"./tokens\";\n\nlet nextId = 0;\n\nexport type NeverUndefined<T> = T extends undefined ? never : T;\n\nexport type RecaptchaErrorParameters = Parameters<NeverUndefined<ReCaptchaV2.Parameters[\"error-callback\"]>>;\n\n@Component({\n exportAs: \"reCaptcha\",\n selector: \"re-captcha\",\n template: ``,\n})\nexport class RecaptchaComponent implements AfterViewInit, OnDestroy {\n @Input()\n @HostBinding(\"attr.id\")\n public id = `ngrecaptcha-${nextId++}`;\n\n @Input() public siteKey?: string;\n @Input() public theme?: ReCaptchaV2.Theme;\n @Input() public type?: ReCaptchaV2.Type;\n @Input() public size?: ReCaptchaV2.Size;\n @Input() public tabIndex?: number;\n @Input() public badge?: ReCaptchaV2.Badge;\n @Input() public errorMode: \"handled\" | \"default\" = \"default\";\n\n @Output() public resolved = new EventEmitter<string | null>();\n /**\n * @deprecated `(error) output will be removed in the next major version. Use (errored) instead\n */\n // eslint-disable-next-line @angular-eslint/no-output-native\n @Output() public error = new EventEmitter<RecaptchaErrorParameters>();\n @Output() public errored = new EventEmitter<RecaptchaErrorParameters>();\n\n /** @internal */\n private subscription: Subscription;\n /** @internal */\n private widget: number;\n /** @internal */\n private grecaptcha: ReCaptchaV2.ReCaptcha;\n /** @internal */\n private executeRequested: boolean;\n\n constructor(\n private elementRef: ElementRef<HTMLElement>,\n private loader: RecaptchaLoaderService,\n private zone: NgZone,\n @Optional() @Inject(RECAPTCHA_SETTINGS) settings?: RecaptchaSettings,\n ) {\n if (settings) {\n this.siteKey = settings.siteKey;\n this.theme = settings.theme;\n this.type = settings.type;\n this.size = settings.size;\n this.badge = settings.badge;\n }\n }\n\n public ngAfterViewInit(): void {\n this.subscription = this.loader.ready.subscribe((grecaptcha: ReCaptchaV2.ReCaptcha) => {\n if (grecaptcha != null && grecaptcha.render instanceof Function) {\n this.grecaptcha = grecaptcha;\n this.renderRecaptcha();\n }\n });\n }\n\n public ngOnDestroy(): void {\n // reset the captcha to ensure it does not leave anything behind\n // after the component is no longer needed\n this.grecaptchaReset();\n if (this.subscription) {\n this.subscription.unsubscribe();\n }\n }\n\n /**\n * Executes the invisible recaptcha.\n * Does nothing if component's size is not set to \"invisible\".\n */\n public execute(): void {\n if (this.size !== \"invisible\") {\n return;\n }\n\n if (this.widget != null) {\n void this.grecaptcha.execute(this.widget);\n } else {\n // delay execution of recaptcha until it actually renders\n this.executeRequested = true;\n }\n }\n\n public reset(): void {\n if (this.widget != null) {\n if (this.grecaptcha.getResponse(this.widget)) {\n // Only emit an event in case if something would actually change.\n // That way we do not trigger \"touching\" of the control if someone does a \"reset\"\n // on a non-resolved captcha.\n this.resolved.emit(null);\n }\n\n this.grecaptchaReset();\n }\n }\n\n /**\n * ⚠️ Warning! Use this property at your own risk!\n *\n * While this member is `public`, it is not a part of the component's public API.\n * 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.\n * You are **strongly advised** against using this property.\n * Instead, use more idiomatic ways to get reCAPTCHA value, such as `resolved` EventEmitter, or form-bound methods (ngModel, formControl, and the likes).å\n */\n public get __unsafe_widgetValue(): string | null {\n return this.widget != null ? this.grecaptcha.getResponse(this.widget) : null;\n }\n\n /** @internal */\n private expired() {\n this.resolved.emit(null);\n }\n\n /** @internal */\n private onError(args: RecaptchaErrorParameters) {\n // eslint-disable-next-line deprecation/deprecation\n this.error.emit(args);\n this.errored.emit(args);\n }\n\n /** @internal */\n private captchaResponseCallback(response: string) {\n this.resolved.emit(response);\n }\n\n /** @internal */\n private grecaptchaReset() {\n if (this.widget != null) {\n this.zone.runOutsideAngular(() => this.grecaptcha.reset(this.widget));\n }\n }\n\n /** @internal */\n private renderRecaptcha() {\n // This `any` can be removed after @types/grecaptcha get updated\n const renderOptions: ReCaptchaV2.Parameters = {\n badge: this.badge,\n callback: (response: string) => {\n this.zone.run(() => this.captchaResponseCallback(response));\n },\n \"expired-callback\": () => {\n this.zone.run(() => this.expired());\n },\n sitekey: this.siteKey,\n size: this.size,\n tabindex: this.tabIndex,\n theme: this.theme,\n type: this.type,\n };\n\n if (this.errorMode === \"handled\") {\n renderOptions[\"error-callback\"] = (...args: RecaptchaErrorParameters) => {\n this.zone.run(() => this.onError(args));\n };\n }\n\n this.widget = this.grecaptcha.render(this.elementRef.nativeElement, renderOptions);\n\n if (this.executeRequested === true) {\n this.executeRequested = false;\n this.execute();\n }\n }\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { RecaptchaComponent } from \"./recaptcha.component\";\n\n@NgModule({\n declarations: [RecaptchaComponent],\n exports: [RecaptchaComponent],\n})\nexport class RecaptchaCommonModule {}\n","import { NgModule } from \"@angular/core\";\n\nimport { RecaptchaCommonModule } from \"./recaptcha-common.module\";\nimport { RecaptchaLoaderService } from \"./recaptcha-loader.service\";\nimport { RecaptchaComponent } from \"./recaptcha.component\";\n\n@NgModule({\n exports: [RecaptchaComponent],\n imports: [RecaptchaCommonModule],\n providers: [RecaptchaLoaderService],\n})\nexport class RecaptchaModule {}\n","import { Inject, Injectable, NgZone } from \"@angular/core\";\nimport { Observable, Subject } from \"rxjs\";\n\nimport { RECAPTCHA_V3_SITE_KEY } from \"./tokens\";\nimport { RecaptchaLoaderService } from \"./recaptcha-loader.service\";\n\nexport interface OnExecuteData {\n /**\n * The name of the action that has been executed.\n */\n action: string;\n /**\n * The token that reCAPTCHA v3 provided when executing the action.\n */\n token: string;\n}\n\nexport interface OnExecuteErrorData {\n /**\n * The name of the action that has been executed.\n */\n action: string;\n /**\n * The error which was encountered\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n error: any;\n}\n\ntype ActionBacklogEntry = [string, Subject<string>];\n\n/**\n * The main service for working with reCAPTCHA v3 APIs.\n *\n * Use the `execute` method for executing a single action, and\n * `onExecute` observable for listening to all actions at once.\n */\n@Injectable()\nexport class ReCaptchaV3Service {\n /** @internal */\n private readonly siteKey: string;\n /** @internal */\n private readonly zone: NgZone;\n /** @internal */\n private actionBacklog: ActionBacklogEntry[] | undefined;\n /** @internal */\n private grecaptcha: ReCaptchaV2.ReCaptcha;\n\n /** @internal */\n private onExecuteSubject: Subject<OnExecuteData>;\n /** @internal */\n private onExecuteErrorSubject: Subject<OnExecuteErrorData>;\n /** @internal */\n private onExecuteObservable: Observable<OnExecuteData>;\n /** @internal */\n private onExecuteErrorObservable: Observable<OnExecuteErrorData>;\n\n constructor(\n zone: NgZone,\n public recaptchaLoader: RecaptchaLoaderService,\n @Inject(RECAPTCHA_V3_SITE_KEY) siteKey: string,\n ) {\n this.zone = zone;\n this.siteKey = siteKey;\n\n this.init();\n }\n\n public get onExecute(): Observable<OnExecuteData> {\n if (!this.onExecuteSubject) {\n this.onExecuteSubject = new Subject<OnExecuteData>();\n this.onExecuteObservable = this.onExecuteSubject.asObservable();\n }\n\n return this.onExecuteObservable;\n }\n\n public get onExecuteError(): Observable<OnExecuteErrorData> {\n if (!this.onExecuteErrorSubject) {\n this.onExecuteErrorSubject = new Subject<OnExecuteErrorData>();\n this.onExecuteErrorObservable = this.onExecuteErrorSubject.asObservable();\n }\n\n return this.onExecuteErrorObservable;\n }\n\n /**\n * Executes the provided `action` with reCAPTCHA v3 API.\n * Use the emitted token value for verification purposes on the backend.\n *\n * For more information about reCAPTCHA v3 actions and tokens refer to the official documentation at\n * https://developers.google.com/recaptcha/docs/v3.\n *\n * @param {string} action the action to execute\n * @returns {Observable<string>} an `Observable` that will emit the reCAPTCHA v3 string `token` value whenever ready.\n * The returned `Observable` completes immediately after emitting a value.\n */\n public execute(action: string): Observable<string> {\n const subject = new Subject<string>();\n if (!this.grecaptcha) {\n if (!this.actionBacklog) {\n this.actionBacklog = [];\n }\n\n this.actionBacklog.push([action, subject]);\n } else {\n this.executeActionWithSubject(action, subject);\n }\n\n return subject.asObservable();\n }\n\n /** @internal */\n private executeActionWithSubject(action: string, subject: Subject<string>): void {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const onError = (error: any) => {\n this.zone.run(() => {\n subject.error(error);\n if (this.onExecuteErrorSubject) {\n // We don't know any better at this point, unfortunately, so have to resort to `any`\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n this.onExecuteErrorSubject.next({ action, error });\n }\n });\n };\n\n this.zone.runOutsideAngular(() => {\n try {\n this.grecaptcha.execute(this.siteKey, { action }).then((token: string) => {\n this.zone.run(() => {\n subject.next(token);\n subject.complete();\n if (this.onExecuteSubject) {\n this.onExecuteSubject.next({ action, token });\n }\n });\n }, onError);\n } catch (e) {\n onError(e);\n }\n });\n }\n\n /** @internal */\n private init() {\n this.recaptchaLoader.ready.subscribe((value) => {\n this.grecaptcha = value;\n if (this.actionBacklog && this.actionBacklog.length > 0) {\n this.actionBacklog.forEach(([action, subject]) => this.executeActionWithSubject(action, subject));\n this.actionBacklog = undefined;\n }\n });\n }\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { ReCaptchaV3Service } from \"./recaptcha-v3.service\";\nimport { RecaptchaLoaderService } from \"./recaptcha-loader.service\";\n\n@NgModule({\n providers: [ReCaptchaV3Service, RecaptchaLoaderService],\n})\nexport class RecaptchaV3Module {}\n","import { Directive, forwardRef, HostListener } from \"@angular/core\";\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from \"@angular/forms\";\n\nimport { RecaptchaComponent } from \"./recaptcha.component\";\n\n@Directive({\n providers: [\n {\n multi: true,\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => RecaptchaValueAccessorDirective),\n },\n ],\n selector: \"re-captcha[formControlName],re-captcha[formControl],re-captcha[ngModel]\",\n})\nexport class RecaptchaValueAccessorDirective implements ControlValueAccessor {\n /** @internal */\n private onChange: (value: string | null) => void;\n\n /** @internal */\n private onTouched: () => void;\n\n private requiresControllerReset = false;\n\n constructor(private host: RecaptchaComponent) {}\n\n public writeValue(value: string): void {\n if (!value) {\n this.host.reset();\n } else {\n // In this case, it is most likely that a form controller has requested to write a specific value into the component.\n // This isn't really a supported case - reCAPTCHA values are single-use, and, in a sense, readonly.\n // What this means is that the form controller has recaptcha control state of X, while reCAPTCHA itself can't \"restore\"\n // to that state. In order to make form controller aware of this discrepancy, and to fix the said misalignment,\n // we'll be telling the controller to \"reset\" the value back to null.\n if (this.host.__unsafe_widgetValue !== value && Boolean(this.host.__unsafe_widgetValue) === false) {\n this.requiresControllerReset = true;\n }\n }\n }\n\n public registerOnChange(fn: (value: string) => void): void {\n this.onChange = fn;\n if (this.requiresControllerReset) {\n this.requiresControllerReset = false;\n this.onChange(null);\n }\n }\n public registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n @HostListener(\"resolved\", [\"$event\"]) public onResolve($event: string): void {\n if (this.onChange) {\n this.onChange($event);\n }\n if (this.onTouched) {\n this.onTouched();\n }\n }\n}\n","import { NgModule } from \"@angular/core\";\nimport { FormsModule } from \"@angular/forms\";\n\nimport { RecaptchaCommonModule } from \"./recaptcha-common.module\";\nimport { RecaptchaValueAccessorDirective } from \"./recaptcha-value-accessor.directive\";\n\n@NgModule({\n declarations: [RecaptchaValueAccessorDirective],\n exports: [RecaptchaValueAccessorDirective],\n imports: [FormsModule, RecaptchaCommonModule],\n})\nexport class RecaptchaFormsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.RecaptchaComponent"],"mappings":";;;;;;;AAIA;MACa,kBAAkB,GAAG,IAAI,cAAc,CAAS,oBAAoB,EAAE;AACnF;MACa,kBAAkB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AAoB,iBAJhB,+BAA+B,CAAA,EAAA,OAAA,EAAA,CAEpC,WAAW,EAAE,qBAAqB,aADlC,+BAA+B,CAAA,EAAA,CAAA,CAAA,EAAA;+GAG9B,oBAAoB,EAAA,OAAA,EAAA,CAFrB,WAAW,EAAE,qBAAqB,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAEjC,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBALhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,+BAA+B,CAAC;oBAC/C,OAAO,EAAE,CAAC,+BAA+B,CAAC;AAC1C,oBAAA,OAAO,EAAE,CAAC,WAAW,EAAE,qBAAqB,CAAC;AAC9C,iBAAA,CAAA;;;ACVD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ng-recaptcha-2.mjs","sources":["../../../projects/ng-recaptcha/src/lib/tokens.ts","../../../projects/ng-recaptcha/src/lib/load-script.ts","../../../projects/ng-recaptcha/src/lib/recaptcha-loader.service.ts","../../../projects/ng-recaptcha/src/lib/recaptcha.component.ts","../../../projects/ng-recaptcha/src/lib/recaptcha-common.module.ts","../../../projects/ng-recaptcha/src/lib/recaptcha.module.ts","../../../projects/ng-recaptcha/src/lib/recaptcha-v3.service.ts","../../../projects/ng-recaptcha/src/lib/recaptcha-v3.module.ts","../../../projects/ng-recaptcha/src/lib/recaptcha-value-accessor.directive.ts","../../../projects/ng-recaptcha/src/lib/recaptcha-forms.module.ts","../../../projects/ng-recaptcha/src/ng-recaptcha-2.ts"],"sourcesContent":["import { InjectionToken } from \"@angular/core\";\n\nimport { RecaptchaSettings } from \"./recaptcha-settings\";\n\n/** @deprecated Use `LOADER_OPTIONS` instead. See `RecaptchaLoaderOptions.onBeforeLoad` */\nexport const RECAPTCHA_LANGUAGE = new InjectionToken<string>(\"recaptcha-language\");\n/** @deprecated Use `LOADER_OPTIONS` instead. See `RecaptchaLoaderOptions.onBeforeLoad` */\nexport const RECAPTCHA_BASE_URL = new InjectionToken<string>(\"recaptcha-base-url\");\n/** @deprecated Use `LOADER_OPTIONS` instead. See `RecaptchaLoaderOptions.onBeforeLoad` */\nexport const RECAPTCHA_NONCE = new InjectionToken<string>(\"recaptcha-nonce-tag\");\nexport const RECAPTCHA_SETTINGS = new InjectionToken<RecaptchaSettings>(\"recaptcha-settings\");\nexport const RECAPTCHA_V3_SITE_KEY = new InjectionToken<string>(\"recaptcha-v3-site-key\");\n\n/**\n * Specifies the options for loading the reCAPTCHA script tag.\n */\nexport type RecaptchaLoaderOptions = {\n /**\n * Invoked before the `<script>` tag is appended to the DOM.\n * Use this function as an opportunity to set `nonce`, as well as modify the URL of the tag.\n *\n * Use the `url.searchParams` to set additional query string attributes (including reCAPTCHA language),\n * or use an entirely different base URL altogether.\n *\n * The URL that you provide will then properly set the `\"render\"` and `\"onload\"` attributes which are required for proper `ng-recaptcha` wire-up.\n *\n * @param url the current URL that was composed. Either modify it in-place, or return a completely new URL.\n * @returns the final URL that is going to be used as the `src` for the `<script>` tag, along with (optionally) a nonce.\n *\n * @example\n * Provide nonce:\n * ```ts\n * {\n * provide: RECAPTCHA_LOADER_OPTIONS,\n * useValue: {\n * onBeforeLoad(url) {\n * return {\n * url,\n * nonce: \"YOUR_NONCE\"\n * };\n * }\n * }\n * }\n * ```\n *\n * Set the reCAPTCHA language:\n * ```ts\n * {\n * provide: RECAPTCHA_LOADER_OPTIONS,\n * useValue: {\n * onBeforeLoad(url) {\n * url.searchParams.set(\"hl\", \"en-GB\")\n *\n * return { url };\n * }\n * }\n * }\n * ```\n *\n * Use a different base URL for loading reCAPTCHA\n * ```ts\n * {\n * provide: RECAPTCHA_LOADER_OPTIONS,\n * useValue: {\n * onBeforeLoad(_url) {\n * const chinaCompatibleUrl = new URL(\"https://www.recaptcha.net/recaptcha/api.js\");\n * // optionally, set the locale:\n * // chinaCompatibleUrl.searchParams.set(\"hl\", \"zh-CN\");\n *\n * return {\n * url: chinaCompatibleUrl\n * };\n * }\n * }\n * }\n * ```\n */\n onBeforeLoad?(url: URL): { url: URL; nonce?: string };\n\n /**\n * Allows you to change the `grecaptcha` that the `ng-recaptcha` will be relying on.\n * This method is useful when you need to use `grecaptcha.enterprise` instead of the base `grecaptcha`\n *\n * @param recaptcha the value of `window.grecaptcha` upon script load.\n * @returns the {ReCaptchaV2.ReCaptcha} instance that the `ng-recaptcha` lib will use.\n *\n * @example\n * Using the Enterprise version of `grecaptcha`:\n *\n * ```ts\n * {\n * provide: RECAPTCHA_LOADER_OPTIONS,\n * useValue: {\n * onBeforeLoad() {\n * const recaptchaEnterpriseUrl = new URL(\"https://www.google.com/recaptcha/enterprise.js\");\n * // optionally, if you're using the reCAPTCHA session-tokens, set the `&waf=session` param,\n * // see https://cloud.google.com/recaptcha-enterprise/docs/implement-waf-ca#session-token\n * // recaptchaEnterpriseUrl.searchParams.set(\"waf\", \"session\");\n *\n * return {\n * url: recaptchaEnterpriseUrl,\n * }\n * },\n * onLoaded(recaptcha) {\n * return recaptcha.enterprise;\n * }\n * }\n * }\n * ```\n */\n onLoaded?(recaptcha: ReCaptchaV2.ReCaptcha): ReCaptchaV2.ReCaptcha;\n};\n\n/**\n * See the documentation for `RecaptchaLoaderOptions`.\n */\nexport const RECAPTCHA_LOADER_OPTIONS = new InjectionToken<RecaptchaLoaderOptions>(\"recaptcha-loader-options\");\n","import { RecaptchaLoaderOptions } from \"./tokens\";\n\ndeclare global {\n interface Window {\n ng2recaptchaloaded?(): void;\n }\n}\n\nexport type RenderMode = \"explicit\" | { key: string };\n\nfunction loadScript(\n renderMode: RenderMode,\n onBeforeLoad: (url: URL) => { url: URL; nonce?: string },\n onLoaded: (grecaptcha: ReCaptchaV2.ReCaptcha) => void,\n { url, lang, nonce }: { url?: string; lang?: string; nonce?: string } = {},\n): void {\n window.ng2recaptchaloaded = () => {\n onLoaded(grecaptcha);\n };\n const script = document.createElement(\"script\");\n script.innerHTML = \"\";\n\n const { url: baseUrl, nonce: onBeforeLoadNonce } = onBeforeLoad(\n new URL(url || \"https://www.google.com/recaptcha/api.js\"),\n );\n baseUrl.searchParams.set(\"render\", renderMode === \"explicit\" ? renderMode : renderMode.key);\n baseUrl.searchParams.set(\"onload\", \"ng2recaptchaloaded\");\n baseUrl.searchParams.set(\"trustedtypes\", \"true\");\n if (lang) {\n baseUrl.searchParams.set(\"hl\", lang);\n }\n\n script.src = baseUrl.href;\n\n const nonceValue = onBeforeLoadNonce || nonce;\n\n if (nonceValue) {\n script.setAttribute(\"nonce\", nonceValue);\n }\n script.async = true;\n script.defer = true;\n document.head.appendChild(script);\n}\n\nfunction newLoadScript({\n v3SiteKey,\n onBeforeLoad,\n onLoaded,\n}: { v3SiteKey: string | undefined; onLoaded(recaptcha: ReCaptchaV2.ReCaptcha): void } & Pick<\n Required<RecaptchaLoaderOptions>,\n \"onBeforeLoad\"\n>) {\n const renderMode: RenderMode = v3SiteKey ? { key: v3SiteKey } : \"explicit\";\n\n loader.loadScript(renderMode, onBeforeLoad, onLoaded);\n}\n\nexport const loader = { loadScript, newLoadScript };\n","import { isPlatformBrowser } from \"@angular/common\";\nimport { Inject, Injectable, Optional, PLATFORM_ID } from \"@angular/core\";\nimport { BehaviorSubject, Observable, of } from \"rxjs\";\nimport { filter } from \"rxjs/operators\";\n\nimport { loader } from \"./load-script\";\nimport {\n RECAPTCHA_LOADER_OPTIONS,\n RECAPTCHA_BASE_URL,\n RECAPTCHA_LANGUAGE,\n RECAPTCHA_NONCE,\n RECAPTCHA_V3_SITE_KEY,\n RecaptchaLoaderOptions,\n} from \"./tokens\";\n\nfunction toNonNullObservable<T>(subject: BehaviorSubject<T | null>): Observable<T> {\n return subject.asObservable().pipe(filter<T>((value) => value !== null));\n}\n\n@Injectable()\nexport class RecaptchaLoaderService {\n /**\n * @internal\n * @nocollapse\n */\n private static ready: BehaviorSubject<ReCaptchaV2.ReCaptcha | null> | null = null;\n\n public ready: Observable<ReCaptchaV2.ReCaptcha>;\n\n /** @internal */\n private language?: string;\n /** @internal */\n private baseUrl?: string;\n /** @internal */\n private nonce?: string;\n /** @internal */\n private v3SiteKey?: string;\n /** @internal */\n private options?: RecaptchaLoaderOptions;\n\n constructor(\n // eslint-disable-next-line @typescript-eslint/ban-types\n @Inject(PLATFORM_ID) private readonly platformId: Object,\n // eslint-disable-next-line deprecation/deprecation\n @Optional() @Inject(RECAPTCHA_LANGUAGE) language?: string,\n // eslint-disable-next-line deprecation/deprecation\n @Optional() @Inject(RECAPTCHA_BASE_URL) baseUrl?: string,\n // eslint-disable-next-line deprecation/deprecation\n @Optional() @Inject(RECAPTCHA_NONCE) nonce?: string,\n @Optional() @Inject(RECAPTCHA_V3_SITE_KEY) v3SiteKey?: string,\n @Optional() @Inject(RECAPTCHA_LOADER_OPTIONS) options?: RecaptchaLoaderOptions,\n ) {\n this.language = language;\n this.baseUrl = baseUrl;\n this.nonce = nonce;\n this.v3SiteKey = v3SiteKey;\n this.options = options;\n const subject = this.init();\n this.ready = subject ? toNonNullObservable(subject) : of();\n }\n\n /** @internal */\n private init(): BehaviorSubject<ReCaptchaV2.ReCaptcha | null> | undefined {\n if (RecaptchaLoaderService.ready) {\n return RecaptchaLoaderService.ready;\n }\n\n if (!isPlatformBrowser(this.platformId)) {\n return undefined;\n }\n\n const subject = new BehaviorSubject<ReCaptchaV2.ReCaptcha | null>(null);\n RecaptchaLoaderService.ready = subject;\n\n loader.newLoadScript({\n v3SiteKey: this.v3SiteKey,\n onBeforeLoad: (url) => {\n if (this.options?.onBeforeLoad) {\n return this.options.onBeforeLoad(url);\n }\n\n const newUrl = new URL(this.baseUrl ?? url);\n\n if (this.language) {\n newUrl.searchParams.set(\"hl\", this.language);\n }\n\n return {\n url: newUrl,\n nonce: this.nonce,\n };\n },\n onLoaded: (recaptcha) => {\n let value = recaptcha;\n if (this.options?.onLoaded) {\n value = this.options.onLoaded(recaptcha);\n }\n\n subject.next(value);\n },\n });\n\n return subject;\n }\n}\n","import {\n AfterViewInit,\n Component,\n ElementRef,\n EventEmitter,\n HostBinding,\n Inject,\n Input,\n NgZone,\n OnDestroy,\n Optional,\n Output,\n} from \"@angular/core\";\nimport { Subscription } from \"rxjs\";\n\nimport { RecaptchaLoaderService } from \"./recaptcha-loader.service\";\nimport { RecaptchaSettings } from \"./recaptcha-settings\";\nimport { RECAPTCHA_SETTINGS } from \"./tokens\";\n\nlet nextId = 0;\n\nexport type NeverUndefined<T> = T extends undefined ? never : T;\n\nexport type RecaptchaErrorParameters = Parameters<NeverUndefined<ReCaptchaV2.Parameters[\"error-callback\"]>>;\n\n@Component({\n exportAs: \"reCaptcha\",\n selector: \"re-captcha\",\n template: ``,\n standalone: false,\n})\nexport class RecaptchaComponent implements AfterViewInit, OnDestroy {\n @Input()\n @HostBinding(\"attr.id\")\n public id = `ngrecaptcha-${nextId++}`;\n\n @Input() public siteKey?: string;\n @Input() public theme?: ReCaptchaV2.Theme;\n @Input() public type?: ReCaptchaV2.Type;\n @Input() public size?: ReCaptchaV2.Size;\n @Input() public tabIndex?: number;\n @Input() public badge?: ReCaptchaV2.Badge;\n @Input() public errorMode: \"handled\" | \"default\" = \"default\";\n\n @Output() public resolved = new EventEmitter<string | null>();\n /**\n * @deprecated `(error) output will be removed in the next major version. Use (errored) instead\n */\n // eslint-disable-next-line @angular-eslint/no-output-native\n @Output() public error = new EventEmitter<RecaptchaErrorParameters>();\n @Output() public errored = new EventEmitter<RecaptchaErrorParameters>();\n\n /** @internal */\n private subscription: Subscription;\n /** @internal */\n private widget: number;\n /** @internal */\n private grecaptcha: ReCaptchaV2.ReCaptcha;\n /** @internal */\n private executeRequested: boolean;\n\n constructor(\n private elementRef: ElementRef<HTMLElement>,\n private loader: RecaptchaLoaderService,\n private zone: NgZone,\n @Optional() @Inject(RECAPTCHA_SETTINGS) settings?: RecaptchaSettings,\n ) {\n if (settings) {\n this.siteKey = settings.siteKey;\n this.theme = settings.theme;\n this.type = settings.type;\n this.size = settings.size;\n this.badge = settings.badge;\n }\n }\n\n public ngAfterViewInit(): void {\n this.subscription = this.loader.ready.subscribe((grecaptcha: ReCaptchaV2.ReCaptcha) => {\n if (grecaptcha != null && grecaptcha.render instanceof Function) {\n this.grecaptcha = grecaptcha;\n this.renderRecaptcha();\n }\n });\n }\n\n public ngOnDestroy(): void {\n // reset the captcha to ensure it does not leave anything behind\n // after the component is no longer needed\n this.grecaptchaReset();\n if (this.subscription) {\n this.subscription.unsubscribe();\n }\n }\n\n /**\n * Executes the invisible recaptcha.\n * Does nothing if component's size is not set to \"invisible\".\n */\n public execute(): void {\n if (this.size !== \"invisible\") {\n return;\n }\n\n if (this.widget != null) {\n void this.grecaptcha.execute(this.widget);\n } else {\n // delay execution of recaptcha until it actually renders\n this.executeRequested = true;\n }\n }\n\n public reset(): void {\n if (this.widget != null) {\n if (this.grecaptcha.getResponse(this.widget)) {\n // Only emit an event in case if something would actually change.\n // That way we do not trigger \"touching\" of the control if someone does a \"reset\"\n // on a non-resolved captcha.\n this.resolved.emit(null);\n }\n\n this.grecaptchaReset();\n }\n }\n\n /**\n * ⚠️ Warning! Use this property at your own risk!\n *\n * While this member is `public`, it is not a part of the component's public API.\n * 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.\n * You are **strongly advised** against using this property.\n * Instead, use more idiomatic ways to get reCAPTCHA value, such as `resolved` EventEmitter, or form-bound methods (ngModel, formControl, and the likes).å\n */\n public get __unsafe_widgetValue(): string | null {\n return this.widget != null ? this.grecaptcha.getResponse(this.widget) : null;\n }\n\n /** @internal */\n private expired() {\n this.resolved.emit(null);\n }\n\n /** @internal */\n private onError(args: RecaptchaErrorParameters) {\n // eslint-disable-next-line deprecation/deprecation\n this.error.emit(args);\n this.errored.emit(args);\n }\n\n /** @internal */\n private captchaResponseCallback(response: string) {\n this.resolved.emit(response);\n }\n\n /** @internal */\n private grecaptchaReset() {\n if (this.widget != null) {\n this.zone.runOutsideAngular(() => this.grecaptcha.reset(this.widget));\n }\n }\n\n /** @internal */\n private renderRecaptcha() {\n // This `any` can be removed after @types/grecaptcha get updated\n const renderOptions: ReCaptchaV2.Parameters = {\n badge: this.badge,\n callback: (response: string) => {\n this.zone.run(() => this.captchaResponseCallback(response));\n },\n \"expired-callback\": () => {\n this.zone.run(() => this.expired());\n },\n sitekey: this.siteKey,\n size: this.size,\n tabindex: this.tabIndex,\n theme: this.theme,\n type: this.type,\n };\n\n if (this.errorMode === \"handled\") {\n renderOptions[\"error-callback\"] = (...args: RecaptchaErrorParameters) => {\n this.zone.run(() => this.onError(args));\n };\n }\n\n this.widget = this.grecaptcha.render(this.elementRef.nativeElement, renderOptions);\n\n if (this.executeRequested === true) {\n this.executeRequested = false;\n this.execute();\n }\n }\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { RecaptchaComponent } from \"./recaptcha.component\";\n\n@NgModule({\n declarations: [RecaptchaComponent],\n exports: [RecaptchaComponent],\n})\nexport class RecaptchaCommonModule {}\n","import { NgModule } from \"@angular/core\";\n\nimport { RecaptchaCommonModule } from \"./recaptcha-common.module\";\nimport { RecaptchaLoaderService } from \"./recaptcha-loader.service\";\nimport { RecaptchaComponent } from \"./recaptcha.component\";\n\n@NgModule({\n exports: [RecaptchaComponent],\n imports: [RecaptchaCommonModule],\n providers: [RecaptchaLoaderService],\n})\nexport class RecaptchaModule {}\n","import { Inject, Injectable, NgZone } from \"@angular/core\";\nimport { Observable, Subject } from \"rxjs\";\n\nimport { RECAPTCHA_V3_SITE_KEY } from \"./tokens\";\nimport { RecaptchaLoaderService } from \"./recaptcha-loader.service\";\n\nexport interface OnExecuteData {\n /**\n * The name of the action that has been executed.\n */\n action: string;\n /**\n * The token that reCAPTCHA v3 provided when executing the action.\n */\n token: string;\n}\n\nexport interface OnExecuteErrorData {\n /**\n * The name of the action that has been executed.\n */\n action: string;\n /**\n * The error which was encountered\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n error: any;\n}\n\ntype ActionBacklogEntry = [string, Subject<string>];\n\n/**\n * The main service for working with reCAPTCHA v3 APIs.\n *\n * Use the `execute` method for executing a single action, and\n * `onExecute` observable for listening to all actions at once.\n */\n@Injectable()\nexport class ReCaptchaV3Service {\n /** @internal */\n private readonly siteKey: string;\n /** @internal */\n private readonly zone: NgZone;\n /** @internal */\n private actionBacklog: ActionBacklogEntry[] | undefined;\n /** @internal */\n private grecaptcha: ReCaptchaV2.ReCaptcha;\n\n /** @internal */\n private onExecuteSubject: Subject<OnExecuteData>;\n /** @internal */\n private onExecuteErrorSubject: Subject<OnExecuteErrorData>;\n /** @internal */\n private onExecuteObservable: Observable<OnExecuteData>;\n /** @internal */\n private onExecuteErrorObservable: Observable<OnExecuteErrorData>;\n\n constructor(\n zone: NgZone,\n public recaptchaLoader: RecaptchaLoaderService,\n @Inject(RECAPTCHA_V3_SITE_KEY) siteKey: string,\n ) {\n this.zone = zone;\n this.siteKey = siteKey;\n\n this.init();\n }\n\n public get onExecute(): Observable<OnExecuteData> {\n if (!this.onExecuteSubject) {\n this.onExecuteSubject = new Subject<OnExecuteData>();\n this.onExecuteObservable = this.onExecuteSubject.asObservable();\n }\n\n return this.onExecuteObservable;\n }\n\n public get onExecuteError(): Observable<OnExecuteErrorData> {\n if (!this.onExecuteErrorSubject) {\n this.onExecuteErrorSubject = new Subject<OnExecuteErrorData>();\n this.onExecuteErrorObservable = this.onExecuteErrorSubject.asObservable();\n }\n\n return this.onExecuteErrorObservable;\n }\n\n /**\n * Executes the provided `action` with reCAPTCHA v3 API.\n * Use the emitted token value for verification purposes on the backend.\n *\n * For more information about reCAPTCHA v3 actions and tokens refer to the official documentation at\n * https://developers.google.com/recaptcha/docs/v3.\n *\n * @param {string} action the action to execute\n * @returns {Observable<string>} an `Observable` that will emit the reCAPTCHA v3 string `token` value whenever ready.\n * The returned `Observable` completes immediately after emitting a value.\n */\n public execute(action: string): Observable<string> {\n const subject = new Subject<string>();\n if (!this.grecaptcha) {\n if (!this.actionBacklog) {\n this.actionBacklog = [];\n }\n\n this.actionBacklog.push([action, subject]);\n } else {\n this.executeActionWithSubject(action, subject);\n }\n\n return subject.asObservable();\n }\n\n /** @internal */\n private executeActionWithSubject(action: string, subject: Subject<string>): void {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const onError = (error: any) => {\n this.zone.run(() => {\n subject.error(error);\n if (this.onExecuteErrorSubject) {\n // We don't know any better at this point, unfortunately, so have to resort to `any`\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n this.onExecuteErrorSubject.next({ action, error });\n }\n });\n };\n\n this.zone.runOutsideAngular(() => {\n try {\n this.grecaptcha.execute(this.siteKey, { action }).then((token: string) => {\n this.zone.run(() => {\n subject.next(token);\n subject.complete();\n if (this.onExecuteSubject) {\n this.onExecuteSubject.next({ action, token });\n }\n });\n }, onError);\n } catch (e) {\n onError(e);\n }\n });\n }\n\n /** @internal */\n private init() {\n this.recaptchaLoader.ready.subscribe((value) => {\n this.grecaptcha = value;\n if (this.actionBacklog && this.actionBacklog.length > 0) {\n this.actionBacklog.forEach(([action, subject]) => this.executeActionWithSubject(action, subject));\n this.actionBacklog = undefined;\n }\n });\n }\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { ReCaptchaV3Service } from \"./recaptcha-v3.service\";\nimport { RecaptchaLoaderService } from \"./recaptcha-loader.service\";\n\n@NgModule({\n providers: [ReCaptchaV3Service, RecaptchaLoaderService],\n})\nexport class RecaptchaV3Module {}\n","import { Directive, forwardRef, HostListener } from \"@angular/core\";\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from \"@angular/forms\";\n\nimport { RecaptchaComponent } from \"./recaptcha.component\";\n\n@Directive({\n providers: [\n {\n multi: true,\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => RecaptchaValueAccessorDirective),\n },\n ],\n selector: \"re-captcha[formControlName],re-captcha[formControl],re-captcha[ngModel]\",\n standalone: false,\n})\nexport class RecaptchaValueAccessorDirective implements ControlValueAccessor {\n /** @internal */\n private onChange: (value: string | null) => void;\n\n /** @internal */\n private onTouched: () => void;\n\n private requiresControllerReset = false;\n\n constructor(private host: RecaptchaComponent) {}\n\n public writeValue(value: string): void {\n if (!value) {\n this.host.reset();\n } else {\n // In this case, it is most likely that a form controller has requested to write a specific value into the component.\n // This isn't really a supported case - reCAPTCHA values are single-use, and, in a sense, readonly.\n // What this means is that the form controller has recaptcha control state of X, while reCAPTCHA itself can't \"restore\"\n // to that state. In order to make form controller aware of this discrepancy, and to fix the said misalignment,\n // we'll be telling the controller to \"reset\" the value back to null.\n if (this.host.__unsafe_widgetValue !== value && Boolean(this.host.__unsafe_widgetValue) === false) {\n this.requiresControllerReset = true;\n }\n }\n }\n\n public registerOnChange(fn: (value: string) => void): void {\n this.onChange = fn;\n if (this.requiresControllerReset) {\n this.requiresControllerReset = false;\n this.onChange(null);\n }\n }\n public registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n @HostListener(\"resolved\", [\"$event\"]) public onResolve($event: string): void {\n if (this.onChange) {\n this.onChange($event);\n }\n if (this.onTouched) {\n this.onTouched();\n }\n }\n}\n","import { NgModule } from \"@angular/core\";\nimport { FormsModule } from \"@angular/forms\";\n\nimport { RecaptchaCommonModule } from \"./recaptcha-common.module\";\nimport { RecaptchaValueAccessorDirective } from \"./recaptcha-value-accessor.directive\";\n\n@NgModule({\n declarations: [RecaptchaValueAccessorDirective],\n exports: [RecaptchaValueAccessorDirective],\n imports: [FormsModule, RecaptchaCommonModule],\n})\nexport class RecaptchaFormsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.RecaptchaComponent"],"mappings":";;;;;;;AAIA;MACa,kBAAkB,GAAG,IAAI,cAAc,CAAS,oBAAoB;AACjF;MACa,kBAAkB,GAAG,IAAI,cAAc,CAAS,oBAAoB;AACjF;MACa,eAAe,GAAG,IAAI,cAAc,CAAS,qBAAqB;MAClE,kBAAkB,GAAG,IAAI,cAAc,CAAoB,oBAAoB;MAC/E,qBAAqB,GAAG,IAAI,cAAc,CAAS,uBAAuB;AAsGvF;;AAEG;MACU,wB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AA,CAAA;;2FAEjC,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBALhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,+BAA+B,CAAC;oBAC/C,OAAO,EAAE,CAAC,+BAA+B,CAAC;AAC1C,oBAAA,OAAO,EAAE,CAAC,WAAW,EAAE,qBAAqB,CAAC;AAC9C,iBAAA;;;ACVD;;AAEG;;;;"}
|
package/lib/load-script.d.ts
CHANGED
package/lib/tokens.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ng-recaptcha-2",
|
|
3
3
|
"description": "Angular component for Google reCAPTCHA for Angular v18 and onwards",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "15.0.0",
|
|
5
5
|
"author": "Ruslan Arkhipau <dethariel@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -14,13 +14,14 @@
|
|
|
14
14
|
"recaptcha",
|
|
15
15
|
"angular-recaptcha",
|
|
16
16
|
"ng-recaptcha",
|
|
17
|
-
"
|
|
17
|
+
"ng-recaptcha-2",
|
|
18
|
+
"angular-19"
|
|
18
19
|
],
|
|
19
20
|
"peerDependencies": {
|
|
20
|
-
"@angular/core": "^
|
|
21
|
+
"@angular/core": "^19.0.0"
|
|
21
22
|
},
|
|
22
23
|
"dependencies": {
|
|
23
|
-
"@types/grecaptcha": "^3.0.
|
|
24
|
+
"@types/grecaptcha": "^3.0.9",
|
|
24
25
|
"tslib": "^2.2.0"
|
|
25
26
|
},
|
|
26
27
|
"module": "fesm2022/ng-recaptcha-2.mjs",
|
|
@@ -31,8 +32,6 @@
|
|
|
31
32
|
},
|
|
32
33
|
".": {
|
|
33
34
|
"types": "./index.d.ts",
|
|
34
|
-
"esm2022": "./esm2022/ng-recaptcha-2.mjs",
|
|
35
|
-
"esm": "./esm2022/ng-recaptcha-2.mjs",
|
|
36
35
|
"default": "./fesm2022/ng-recaptcha-2.mjs"
|
|
37
36
|
}
|
|
38
37
|
},
|
package/esm2022/index.mjs
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export { RecaptchaComponent } from "./lib/recaptcha.component";
|
|
2
|
-
export { RecaptchaLoaderService } from "./lib/recaptcha-loader.service";
|
|
3
|
-
export { RecaptchaModule } from "./lib/recaptcha.module";
|
|
4
|
-
export { RecaptchaV3Module } from "./lib/recaptcha-v3.module";
|
|
5
|
-
export { ReCaptchaV3Service } from "./lib/recaptcha-v3.service";
|
|
6
|
-
export { RecaptchaFormsModule } from "./lib/recaptcha-forms.module";
|
|
7
|
-
export { RecaptchaValueAccessorDirective } from "./lib/recaptcha-value-accessor.directive";
|
|
8
|
-
export {
|
|
9
|
-
// eslint-disable-next-line deprecation/deprecation
|
|
10
|
-
RECAPTCHA_LANGUAGE,
|
|
11
|
-
// eslint-disable-next-line deprecation/deprecation
|
|
12
|
-
RECAPTCHA_BASE_URL,
|
|
13
|
-
// eslint-disable-next-line deprecation/deprecation
|
|
14
|
-
RECAPTCHA_NONCE, RECAPTCHA_SETTINGS, RECAPTCHA_V3_SITE_KEY, RECAPTCHA_LOADER_OPTIONS, } from "./lib/tokens";
|
|
15
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9wcm9qZWN0cy9uZy1yZWNhcHRjaGEvc3JjL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxrQkFBa0IsRUFBNEIsTUFBTSwyQkFBMkIsQ0FBQztBQUN6RixPQUFPLEVBQUUsc0JBQXNCLEVBQUUsTUFBTSxnQ0FBZ0MsQ0FBQztBQUN4RSxPQUFPLEVBQUUsZUFBZSxFQUFFLE1BQU0sd0JBQXdCLENBQUM7QUFHekQsT0FBTyxFQUFFLGlCQ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