@prosopo/angular-procaptcha-wrapper 1.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/dist/fesm2022/prosopo-angular-procaptcha-wrapper.mjs +66 -0
- package/dist/fesm2022/prosopo-angular-procaptcha-wrapper.mjs.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/lib/procaptcha.component.d.ts +15 -0
- package/dist/public_api.d.ts +3 -0
- package/ng-package.json +4 -0
- package/package.json +41 -0
- package/readme.md +5 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, ElementRef, Input, Component } from '@angular/core';
|
|
3
|
+
import { renderProcaptcha } from '@prosopo/procaptcha-wrapper';
|
|
4
|
+
|
|
5
|
+
// Copyright 2021-2025 Prosopo (UK) Ltd.
|
|
6
|
+
//
|
|
7
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
// you may not use this file except in compliance with the License.
|
|
9
|
+
// You may obtain a copy of the License at
|
|
10
|
+
//
|
|
11
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
//
|
|
13
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
// See the License for the specific language governing permissions and
|
|
17
|
+
// limitations under the License.
|
|
18
|
+
class ProcaptchaComponent {
|
|
19
|
+
elementRef = inject(ElementRef);
|
|
20
|
+
settings;
|
|
21
|
+
htmlAttributes = {};
|
|
22
|
+
ngOnInit() {
|
|
23
|
+
this.render();
|
|
24
|
+
}
|
|
25
|
+
ngOnChanges() {
|
|
26
|
+
this.render();
|
|
27
|
+
}
|
|
28
|
+
render() {
|
|
29
|
+
for (const attr in this.htmlAttributes) {
|
|
30
|
+
this.elementRef.nativeElement.setAttribute(attr, this.htmlAttributes[attr]);
|
|
31
|
+
}
|
|
32
|
+
renderProcaptcha(this.elementRef.nativeElement, this.settings);
|
|
33
|
+
}
|
|
34
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: ProcaptchaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
35
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.7", type: ProcaptchaComponent, isStandalone: true, selector: "procaptcha-component", inputs: { settings: "settings", htmlAttributes: "htmlAttributes" }, usesOnChanges: true, ngImport: i0, template: "<div></div>", isInline: true, styles: [""] });
|
|
36
|
+
}
|
|
37
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: ProcaptchaComponent, decorators: [{
|
|
38
|
+
type: Component,
|
|
39
|
+
args: [{ selector: "procaptcha-component", imports: [], template: "<div></div>" }]
|
|
40
|
+
}], propDecorators: { settings: [{
|
|
41
|
+
type: Input,
|
|
42
|
+
args: [{ required: true }]
|
|
43
|
+
}], htmlAttributes: [{
|
|
44
|
+
type: Input
|
|
45
|
+
}] } });
|
|
46
|
+
|
|
47
|
+
// Copyright 2021-2025 Prosopo (UK) Ltd.
|
|
48
|
+
//
|
|
49
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
50
|
+
// you may not use this file except in compliance with the License.
|
|
51
|
+
// You may obtain a copy of the License at
|
|
52
|
+
//
|
|
53
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
54
|
+
//
|
|
55
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
56
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
57
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
58
|
+
// See the License for the specific language governing permissions and
|
|
59
|
+
// limitations under the License.
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Generated bundle index. Do not edit.
|
|
63
|
+
*/
|
|
64
|
+
|
|
65
|
+
export { ProcaptchaComponent };
|
|
66
|
+
//# sourceMappingURL=prosopo-angular-procaptcha-wrapper.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prosopo-angular-procaptcha-wrapper.mjs","sources":["../../src/lib/procaptcha.component.ts","../../src/public_api.ts","../../src/prosopo-angular-procaptcha-wrapper.ts"],"sourcesContent":["// Copyright 2021-2025 Prosopo (UK) Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Component, ElementRef, Input, inject } from \"@angular/core\";\nimport {\n\ttype ProcaptchaRenderOptions,\n\trenderProcaptcha,\n} from \"@prosopo/procaptcha-wrapper\";\n\n@Component({\n\tselector: \"procaptcha-component\",\n\timports: [],\n\ttemplate: \"<div></div>\",\n\tstyles: \"\",\n})\nexport class ProcaptchaComponent {\n\telementRef = inject(ElementRef);\n\n\t@Input({ required: true })\n\tsettings!: ProcaptchaRenderOptions;\n\t@Input()\n\thtmlAttributes: { [key: string]: string } = {};\n\n\tpublic ngOnInit(): void {\n\t\tthis.render();\n\t}\n\n\tpublic ngOnChanges(): void {\n\t\tthis.render();\n\t}\n\n\tprivate render(): void {\n\t\tfor (const attr in this.htmlAttributes) {\n\t\t\tthis.elementRef.nativeElement.setAttribute(\n\t\t\t\tattr,\n\t\t\t\tthis.htmlAttributes[attr],\n\t\t\t);\n\t\t}\n\n\t\trenderProcaptcha(this.elementRef.nativeElement, this.settings);\n\t}\n}\n","// Copyright 2021-2025 Prosopo (UK) Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport type {\n\tProcaptchaLanguages,\n\tProcaptchaRenderOptions,\n\tProcaptchaType,\n} from \"@prosopo/procaptcha-wrapper\";\nimport { ProcaptchaComponent } from \"./lib/procaptcha.component\";\n\nexport {\n\tProcaptchaComponent,\n\ttype ProcaptchaRenderOptions,\n\ttype ProcaptchaType,\n\ttype ProcaptchaLanguages,\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;MAca,mBAAmB,CAAA;AAC/B,IAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAG/B,IAAA,QAAQ;IAER,cAAc,GAA8B,EAAE;IAEvC,QAAQ,GAAA;QACd,IAAI,CAAC,MAAM,EAAE;;IAGP,WAAW,GAAA;QACjB,IAAI,CAAC,MAAM,EAAE;;IAGN,MAAM,GAAA;AACb,QAAA,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,cAAc,EAAE;AACvC,YAAA,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,YAAY,CACzC,IAAI,EACJ,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CACzB;;QAGF,gBAAgB,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE,IAAI,CAAC,QAAQ,CAAC;;uGAxBnD,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAnB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,mBAAmB,yKAHrB,aAAa,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAGX,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAN/B,SAAS;+BACC,sBAAsB,EAAA,OAAA,EACvB,EAAE,EAAA,QAAA,EACD,aAAa,EAAA;8BAOvB,QAAQ,EAAA,CAAA;sBADP,KAAK;uBAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAGzB,cAAc,EAAA,CAAA;sBADb;;;AC/BF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACZA;;AAEG;;;;"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ElementRef } from "@angular/core";
|
|
2
|
+
import { type ProcaptchaRenderOptions } from "@prosopo/procaptcha-wrapper";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class ProcaptchaComponent {
|
|
5
|
+
elementRef: ElementRef<any>;
|
|
6
|
+
settings: ProcaptchaRenderOptions;
|
|
7
|
+
htmlAttributes: {
|
|
8
|
+
[key: string]: string;
|
|
9
|
+
};
|
|
10
|
+
ngOnInit(): void;
|
|
11
|
+
ngOnChanges(): void;
|
|
12
|
+
private render;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ProcaptchaComponent, never>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ProcaptchaComponent, "procaptcha-component", never, { "settings": { "alias": "settings"; "required": true; }; "htmlAttributes": { "alias": "htmlAttributes"; "required": false; }; }, {}, never, never, true, never>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ProcaptchaLanguages, ProcaptchaRenderOptions, ProcaptchaType } from "@prosopo/procaptcha-wrapper";
|
|
2
|
+
import { ProcaptchaComponent } from "./lib/procaptcha.component";
|
|
3
|
+
export { ProcaptchaComponent, type ProcaptchaRenderOptions, type ProcaptchaType, type ProcaptchaLanguages, };
|
package/ng-package.json
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@prosopo/angular-procaptcha-wrapper",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"engines": {
|
|
6
|
+
"node": "20",
|
|
7
|
+
"npm": "10.8.2"
|
|
8
|
+
},
|
|
9
|
+
"main": "dist/fesm2022/prosopo-angular-procaptcha-wrapper.mjs",
|
|
10
|
+
"typings": "dist/index.d.ts",
|
|
11
|
+
"module": "dist/fesm2022/prosopo-angular-procaptcha-wrapper.mjs",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"default": "./dist/fesm2022/prosopo-angular-procaptcha-wrapper.mjs"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"scripts": {
|
|
19
|
+
"test": "echo \"No test specified\"",
|
|
20
|
+
"clean": "del-cli ./dist",
|
|
21
|
+
"build": "ng-packagr -p ng-package.json",
|
|
22
|
+
"dev": "npm run build -- --watch"
|
|
23
|
+
},
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"@prosopo/procaptcha-wrapper": ">=2.5.4"
|
|
26
|
+
},
|
|
27
|
+
"peerDependencies": {
|
|
28
|
+
"@angular/core": "^19.2.0"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"del-cli": "6.0.0",
|
|
32
|
+
"ng-packagr": "19.2.0"
|
|
33
|
+
},
|
|
34
|
+
"author": "PROSOPO LIMITED <info@prosopo.io>",
|
|
35
|
+
"license": "Apache-2.0",
|
|
36
|
+
"bugs": {
|
|
37
|
+
"url": "https://github.com/prosopo/captcha/issues"
|
|
38
|
+
},
|
|
39
|
+
"homepage": "https://github.com/prosopo/captcha#readme",
|
|
40
|
+
"sideEffects": false
|
|
41
|
+
}
|