{"_rev":"3-d85eff935fff604bc99757974a6fd2c4","time":{"created":"2022-12-01T05:54:15.659Z","1.0.0":"2022-12-01T05:46:37.872Z","modified":"2022-12-01T05:54:16.142Z","2.0.0":"2022-12-01T05:54:15.975Z"},"_id":"@1artifactware/hcaptcha","name":"@1artifactware/hcaptcha","dist-tags":{"latest":"2.0.0"},"versions":{"2.0.0":{"name":"@1artifactware/hcaptcha","version":"2.0.0","license":"MIT","peerDependencies":{"@angular/common":"^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0","@angular/core":"^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0","@angular/forms":"^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0"},"dependencies":{"tslib":"^2.0.0"},"module":"fesm2015/1artifactware-hcaptcha.mjs","es2020":"fesm2020/1artifactware-hcaptcha.mjs","esm2020":"esm2020/1artifactware-hcaptcha.mjs","fesm2020":"fesm2020/1artifactware-hcaptcha.mjs","fesm2015":"fesm2015/1artifactware-hcaptcha.mjs","typings":"index.d.ts","exports":{"./package.json":{"default":"./package.json"},".":{"types":"./index.d.ts","esm2020":"./esm2020/1artifactware-hcaptcha.mjs","es2020":"./fesm2020/1artifactware-hcaptcha.mjs","es2015":"./fesm2015/1artifactware-hcaptcha.mjs","node":"./fesm2015/1artifactware-hcaptcha.mjs","default":"./fesm2020/1artifactware-hcaptcha.mjs"}},"sideEffects":false,"gitHead":"fec2a3b959f48fedb0b395bf69bc41c14273e473","description":"[![GitHub license](https://img.shields.io/github/license/leNicDev/ng-hcaptcha.svg)](https://github.com/leNicDev/ng-hcaptcha/blob/master/LICENSE)&nbsp; [![GitHub issues](https://img.shields.io/github/issues/leNicDev/ng-hcaptcha.svg)](https://GitHub.com/leN","_id":"@1artifactware/hcaptcha@2.0.0","_nodeVersion":"18.12.1","_npmVersion":"9.1.2","dist":{"integrity":"sha512-vzlQtDl/MqZf79nnuAkmL+RaHcLwetwnezgbNIVN3c/r7bf70Q459/s/okqWLiFoOC+6dEET79OzTxKYFnIVAg==","shasum":"b3d05a7864235937f38975ce5459f7b90780ff4a","tarball":"https://registry.npmjs.org/@1artifactware/hcaptcha/-/hcaptcha-2.0.0.tgz","fileCount":22,"unpackedSize":147037,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCEvj//85eixAhco8iq0wUnt73EsyUGaOkkJW8zRhYpfAIgTqWNLAnfkwXSmY52DGPvHGIMzm7NqEZrLNJ70QIE0Sg="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjiEGIACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpSTw/+PBMCXtDVpVXDtDmg+8KpU+AA27CHnnJFppjuUkLwYniTBuGc\r\nClCLknLbjc1JNjT9MbZg0x5XtAmaAG2Ov+PtwACkDfT9dEs0TQ3effr2/EkV\r\n25XUeF2FaMWuNTu1v7r6yFiTE3tS5gAlO3Oj/c9ntI32DBmzMWLp9nPXIHD5\r\niTWU32Fn02rdZzkfqqQGWOAEl1SqcvvbIpergLSGkTkUW1fDXZZUsd7/8F2e\r\nuSbdd9S5UCFSdMn50VIEAbfOjljhjdw5+VWQNn9nqXpr3pRukupOHZkMJQTd\r\nC4vStzSRJMQYtQk11v7WjkekOVM7BkgYz3RKdKPx4UewUFqpBMXELD3PNTE7\r\nbnx6BBtsVeqkV71IFvPijevOnSmGqugi5HLIve0CKs56k426SuvTgSVXYe/P\r\ncaB6KkKYlwGfqEMkW8/IDi7Dim7yLbOLwX9sa4oZKuL8ZwrA4e3kyA+fDPkG\r\nXubsDD2OCNXmQsDJVMBSf0THPwS35RAeoBQ8cdWz5Rm0OiRWXD5u7vIMbudk\r\nbH4N9uNLLpAf5zyL3jDwiMHMn//2wNVb4Xu3XaW4afNBXjLZQXmTCJB9y+UL\r\nGMY930GBxuc5CFtCZphOKBb8JwP6V6qonjESCAWD7Kk86W73WcejUAuk8Y77\r\naqSVpX0L8MLq/dDJ9SfArypjTCWUIVT5ffA=\r\n=cXbo\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"1artifactware","email":"adam@1artifactware.com"},"directories":{},"maintainers":[{"name":"1artifactware","email":"adam@1artifactware.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hcaptcha_2.0.0_1669874055714_0.8053574326828805"},"_hasShrinkwrap":false}},"maintainers":[{"name":"1artifactware","email":"adam@1artifactware.com"}],"description":"[![GitHub license](https://img.shields.io/github/license/leNicDev/ng-hcaptcha.svg)](https://github.com/leNicDev/ng-hcaptcha/blob/master/LICENSE)&nbsp; [![GitHub issues](https://img.shields.io/github/issues/leNicDev/ng-hcaptcha.svg)](https://GitHub.com/leN","license":"MIT","readme":"[![GitHub license](https://img.shields.io/github/license/leNicDev/ng-hcaptcha.svg)](https://github.com/leNicDev/ng-hcaptcha/blob/master/LICENSE)&nbsp;\n[![GitHub issues](https://img.shields.io/github/issues/leNicDev/ng-hcaptcha.svg)](https://GitHub.com/leNicDev/ng-hcaptcha/issues/)&nbsp;\n[![GitHub pull-requests](https://img.shields.io/github/issues-pr/leNicDev/ng-hcaptcha.svg)](https://GitHub.com/leNicDev/ng-hcaptcha/pull/)\n\n# ng-hcaptcha - hCaptcha Component for Angular\n\nng-hcaptcha provides an easy to use component for [hCaptcha](https://hcaptcha.com).\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [Execute hCaptcha programmatically](#execute-hcaptcha-programmatically)\n- [Bugs? Ideas?](#bugs-ideas)\n- [Support me](#support-me)\n\n## Installation\n\n### Step 1 - Install the ng-hcaptcha dependency\n\n```shell\n# NPM\nnpm install --save ng-hcaptcha\n\n# Yarn\nyarn add ng-hcaptcha\n```\n\n> You can use the tag 'next' to get the latest beta version.\n\n### Step 2 - Import  the NgHcaptchaModule\n```ts\nimport { NgHcaptchaModule } from 'ng-hcaptcha';\n\n@NgModule({\n    imports: [\n        // Option #1\n        // Set the sitekey globally for every hCaptcha component\n        NgHcaptchaModule.forRoot({\n            siteKey: 'YOUR_SITEKEY',\n            languageCode: 'de' // optional, will default to browser language\n        }),\n\n        // Option #2\n        // This option requires you to set the [siteKey] property for every hCaptcha component\n        NgHcaptchaModule.forRoot()\n    ]\n})\n```\n\n## Usage\n\nTemplate:\n```html\n<!-- Regular usage -->\n<ng-hcaptcha (verify)=\"onVerify($event)\"\n              (expired)=\"onExpired($event)\"\n              (error)=\"onError($event)\">\n</ng-hcaptcha>\n\n<!-- Usage in forms -->\n<!-- The value of the form control will be the verification token -->\n<form [formGroup]=\"formGroup\" (submit)=\"onSubmit()\">\n    <ng-hcaptcha formControlName=\"captcha\"></ng-hcaptcha>\n</form>\n\n<!-- Invisible captcha -->\n<button ngHcaptchaInvisibleButton\n        (verify)=\"onVerify($event)\"\n        (expired)=\"onExpired($event)\"\n        (error)=\"onError($event)\">Click me</button>\n```\n\nTS:\n```ts\nonVerify(token: string) {\n    // The verification process was successful.\n    // You can verify the token on your server now.\n}\n\nonExpired(response: any) {\n    // The verification expired.\n}\n\nonError(error: any) {\n    // An error occured during the verification process.\n}\n```\n\n## Execute hCaptcha programmatically\n\nThe hCaptcha verification process can also be executed programmatically:\n```ts\n@Component({\n  selector: 'hc-programmatically',\n  templateUrl: './programmatically.component.html',\n  styleUrls: ['./programmatically.component.scss']\n})\nexport class ProgrammaticallyComponent {\n\n  constructor(private hcaptchaService: NgHcaptchaService) { }\n\n  verify() {\n    this.hcaptchaService.verify().subscribe(\n      (result) => {\n        console.log('SUCCESS', result);\n      },\n      (err) => {\n        console.log('FAILED', err);\n      },\n      () => {\n        console.log('COMPLETE');\n      }\n    );\n  }\n\n}\n```\n\n## Properties\nThe properties below exist for all captcha components.\n\n`siteKey` Allows you to set the site key per captcha instance.\n\n`languageCode` Allows you to force a specific language. See https://docs.hcaptcha.com/languages\n\n## Bugs? Ideas?\n\nIf you found a bug or something you don't like, feel free to [open an issue](https://github.com/leNicDev/ng-hcaptcha/issues/new). If you have any ideas for new features or improvements, feel free to contribute or [open an issue](https://github.com/leNicDev/ng-hcaptcha/issues/new) :wink:\n\n## Support me\n\nIf you would like to support me for free, just create your hCaptcha account using my referral link :relaxed:\n[https://hCaptcha.com/?r=4afcb2d42338](https://hCaptcha.com/?r=4afcb2d42338)\n","readmeFilename":"README.md"}