google-recaptcha-angular
Version:
Google functionality reCaptcha for Angular
72 lines • 3.25 kB
JavaScript
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
import { Component, EventEmitter, Input, Output, ViewChild } from '@angular/core';
import { ReCaptchaRenderDirective } from "../re-captcha-render.directive";
var ReCaptchaGoogleCrearComponent = (function () {
function ReCaptchaGoogleCrearComponent() {
}
ReCaptchaGoogleCrearComponent.prototype.ngOnInit = function () {
this.onCaptchaSubmit = new EventEmitter();
this.render = 2500;
this.recaptchaId = 'grepcatcha';
};
ReCaptchaGoogleCrearComponent.prototype.recaptchaRestar = function () {
if (this.recaptchaInst != null) {
this.recaptchaInst.recaptchaRestar();
}
};
ReCaptchaGoogleCrearComponent.prototype.onCaptchaSubmited = function (data) {
if (data != null) {
this.onCaptchaSubmit.emit({
success: true,
token: data,
recaptcha: this
});
}
else {
this.onCaptchaSubmit.emit({
success: false,
token: null,
recaptcha: this
});
}
};
__decorate([
Output('onCaptchaSubmit'),
__metadata("design:type", EventEmitter)
], ReCaptchaGoogleCrearComponent.prototype, "onCaptchaSubmit", void 0);
__decorate([
Input('key'),
__metadata("design:type", String)
], ReCaptchaGoogleCrearComponent.prototype, "key", void 0);
__decorate([
Input('render'),
__metadata("design:type", Number)
], ReCaptchaGoogleCrearComponent.prototype, "render", void 0);
__decorate([
Input('recaptchaId'),
__metadata("design:type", String)
], ReCaptchaGoogleCrearComponent.prototype, "recaptchaId", void 0);
__decorate([
ViewChild(ReCaptchaRenderDirective),
__metadata("design:type", ReCaptchaRenderDirective)
], ReCaptchaGoogleCrearComponent.prototype, "recaptchaInst", void 0);
ReCaptchaGoogleCrearComponent = __decorate([
Component({
selector: 'app-re-captcha-google-crear',
templateUrl: './re-captcha-google-crear.component.html',
styleUrls: ['./re-captcha-google-crear.component.css']
}),
__metadata("design:paramtypes", [])
], ReCaptchaGoogleCrearComponent);
return ReCaptchaGoogleCrearComponent;
}());
export { ReCaptchaGoogleCrearComponent };
//# sourceMappingURL=re-captcha-google-crear.component.js.map