Skip to content

Expire and use globally 2.6.2 #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions dist/amd/aurelia-plugins-google-recaptcha-element.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export declare class Recaptcha {
_scriptPromise: any;
badge: string;
callback: any;
expire: any;
size: string;
theme: string;
type: string;
Expand Down
27 changes: 16 additions & 11 deletions dist/amd/aurelia-plugins-google-recaptcha-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ define(['exports', 'aurelia-binding', 'aurelia-dependency-injection', 'aurelia-t
throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
}

var _dec, _dec2, _dec3, _dec4, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6;
var _dec, _dec2, _dec3, _dec4, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7;

var Recaptcha = exports.Recaptcha = (_dec = (0, _aureliaTemplating.customElement)('aup-google-recaptcha'), _dec2 = (0, _aureliaTemplating.noView)(), _dec3 = (0, _aureliaDependencyInjection.inject)(Element, _aureliaPluginsGoogleRecaptchaConfig.Config), _dec4 = (0, _aureliaTemplating.bindable)({ defaultBindingMode: _aureliaBinding.bindingMode.twoWay }), _dec(_class = _dec2(_class = _dec3(_class = (_class2 = function () {
function Recaptcha(element, config) {
Expand All @@ -96,13 +96,15 @@ define(['exports', 'aurelia-binding', 'aurelia-dependency-injection', 'aurelia-t

_initDefineProp(this, 'callback', _descriptor2, this);

_initDefineProp(this, 'size', _descriptor3, this);
_initDefineProp(this, 'expire', _descriptor3, this);

_initDefineProp(this, 'theme', _descriptor4, this);
_initDefineProp(this, 'size', _descriptor4, this);

_initDefineProp(this, 'type', _descriptor5, this);
_initDefineProp(this, 'theme', _descriptor5, this);

_initDefineProp(this, 'widgetId', _descriptor6, this);
_initDefineProp(this, 'type', _descriptor6, this);

_initDefineProp(this, 'widgetId', _descriptor7, this);

this._config = config;
this._element = element;
Expand All @@ -124,7 +126,7 @@ define(['exports', 'aurelia-binding', 'aurelia-dependency-injection', 'aurelia-t
return this._scriptPromise;

case 2:
this.widgetId = window.grecaptcha.render(this._element, { badge: this.badge, callback: this.callback, sitekey: this._config.get('siteKey'), size: this.size, theme: this.theme, type: this.type });
this.widgetId = window.grecaptcha.render(this._element, { badge: this.badge, callback: this.callback, 'expired-callback': this.expire, sitekey: this._config.get('siteKey'), size: this.size, theme: this.theme, type: this.type });

case 3:
case 'end':
Expand All @@ -147,7 +149,7 @@ define(['exports', 'aurelia-binding', 'aurelia-dependency-injection', 'aurelia-t
var script = document.createElement('script');
script.async = true;
script.defer = true;
script.src = 'https://www.google.com/recaptcha/api.js?hl=' + this._config.get('hl') + '&onload=aureliaPluginsGoogleRecaptchaOnLoad&render=explicit';
script.src = 'https://www.recaptcha.net/recaptcha/api.js?hl=' + this._config.get('hl') + '&onload=aureliaPluginsGoogleRecaptchaOnLoad&render=explicit';
script.type = 'text/javascript';
document.head.appendChild(script);
this._scriptPromise = new Promise(function (resolve, reject) {
Expand All @@ -174,22 +176,25 @@ define(['exports', 'aurelia-binding', 'aurelia-dependency-injection', 'aurelia-t
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'callback', [_aureliaTemplating.bindable], {
enumerable: true,
initializer: null
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, 'size', [_aureliaTemplating.bindable], {
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, 'expire', [_aureliaTemplating.bindable], {
enumerable: true,
initializer: null
}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, 'size', [_aureliaTemplating.bindable], {
enumerable: true,
initializer: function initializer() {
return 'normal';
}
}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, 'theme', [_aureliaTemplating.bindable], {
}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, 'theme', [_aureliaTemplating.bindable], {
enumerable: true,
initializer: function initializer() {
return 'light';
}
}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, 'type', [_aureliaTemplating.bindable], {
}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, 'type', [_aureliaTemplating.bindable], {
enumerable: true,
initializer: function initializer() {
return 'image';
}
}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, 'widgetId', [_dec4], {
}), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, 'widgetId', [_dec4], {
enumerable: true,
initializer: null
})), _class2)) || _class) || _class) || _class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export declare class Recaptcha {
_scriptPromise: any;
badge: string;
callback: any;
expire: any;
size: string;
theme: string;
type: string;
Expand Down
27 changes: 16 additions & 11 deletions dist/commonjs/aurelia-plugins-google-recaptcha-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
});
exports.Recaptcha = undefined;

var _dec, _dec2, _dec3, _dec4, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6;
var _dec, _dec2, _dec3, _dec4, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7;

var _aureliaBinding = require('aurelia-binding');

Expand Down Expand Up @@ -72,13 +72,15 @@ var Recaptcha = exports.Recaptcha = (_dec = (0, _aureliaTemplating.customElement

_initDefineProp(this, 'callback', _descriptor2, this);

_initDefineProp(this, 'size', _descriptor3, this);
_initDefineProp(this, 'expire', _descriptor3, this);

_initDefineProp(this, 'theme', _descriptor4, this);
_initDefineProp(this, 'size', _descriptor4, this);

_initDefineProp(this, 'type', _descriptor5, this);
_initDefineProp(this, 'theme', _descriptor5, this);

_initDefineProp(this, 'widgetId', _descriptor6, this);
_initDefineProp(this, 'type', _descriptor6, this);

_initDefineProp(this, 'widgetId', _descriptor7, this);

this._config = config;
this._element = element;
Expand All @@ -100,7 +102,7 @@ var Recaptcha = exports.Recaptcha = (_dec = (0, _aureliaTemplating.customElement
return this._scriptPromise;

case 2:
this.widgetId = window.grecaptcha.render(this._element, { badge: this.badge, callback: this.callback, sitekey: this._config.get('siteKey'), size: this.size, theme: this.theme, type: this.type });
this.widgetId = window.grecaptcha.render(this._element, { badge: this.badge, callback: this.callback, 'expired-callback': this.expire, sitekey: this._config.get('siteKey'), size: this.size, theme: this.theme, type: this.type });

case 3:
case 'end':
Expand All @@ -123,7 +125,7 @@ var Recaptcha = exports.Recaptcha = (_dec = (0, _aureliaTemplating.customElement
var script = document.createElement('script');
script.async = true;
script.defer = true;
script.src = 'https://www.google.com/recaptcha/api.js?hl=' + this._config.get('hl') + '&onload=aureliaPluginsGoogleRecaptchaOnLoad&render=explicit';
script.src = 'https://www.recaptcha.net/recaptcha/api.js?hl=' + this._config.get('hl') + '&onload=aureliaPluginsGoogleRecaptchaOnLoad&render=explicit';
script.type = 'text/javascript';
document.head.appendChild(script);
this._scriptPromise = new Promise(function (resolve, reject) {
Expand All @@ -150,22 +152,25 @@ var Recaptcha = exports.Recaptcha = (_dec = (0, _aureliaTemplating.customElement
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'callback', [_aureliaTemplating.bindable], {
enumerable: true,
initializer: null
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, 'size', [_aureliaTemplating.bindable], {
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, 'expire', [_aureliaTemplating.bindable], {
enumerable: true,
initializer: null
}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, 'size', [_aureliaTemplating.bindable], {
enumerable: true,
initializer: function initializer() {
return 'normal';
}
}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, 'theme', [_aureliaTemplating.bindable], {
}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, 'theme', [_aureliaTemplating.bindable], {
enumerable: true,
initializer: function initializer() {
return 'light';
}
}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, 'type', [_aureliaTemplating.bindable], {
}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, 'type', [_aureliaTemplating.bindable], {
enumerable: true,
initializer: function initializer() {
return 'image';
}
}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, 'widgetId', [_dec4], {
}), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, 'widgetId', [_dec4], {
enumerable: true,
initializer: null
})), _class2)) || _class) || _class) || _class);
1 change: 1 addition & 0 deletions dist/es2015/aurelia-plugins-google-recaptcha-element.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export declare class Recaptcha {
_scriptPromise: any;
badge: string;
callback: any;
expire: any;
size: string;
theme: string;
type: string;
Expand Down
29 changes: 17 additions & 12 deletions dist/es2015/aurelia-plugins-google-recaptcha-element.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var _dec, _dec2, _dec3, _dec4, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6;
var _dec, _dec2, _dec3, _dec4, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7;

function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }

Expand Down Expand Up @@ -48,9 +48,9 @@ function _initializerWarningHelper(descriptor, context) {
import { bindingMode } from 'aurelia-binding';
import { inject } from 'aurelia-dependency-injection';
import { bindable, customElement, noView } from 'aurelia-templating';

import { Config } from './aurelia-plugins-google-recaptcha-config';


export let Recaptcha = (_dec = customElement('aup-google-recaptcha'), _dec2 = noView(), _dec3 = inject(Element, Config), _dec4 = bindable({ defaultBindingMode: bindingMode.twoWay }), _dec(_class = _dec2(_class = _dec3(_class = (_class2 = class Recaptcha {
constructor(element, config) {
this._scriptPromise = null;
Expand All @@ -59,13 +59,15 @@ export let Recaptcha = (_dec = customElement('aup-google-recaptcha'), _dec2 = no

_initDefineProp(this, 'callback', _descriptor2, this);

_initDefineProp(this, 'size', _descriptor3, this);
_initDefineProp(this, 'expire', _descriptor3, this);

_initDefineProp(this, 'size', _descriptor4, this);

_initDefineProp(this, 'theme', _descriptor4, this);
_initDefineProp(this, 'theme', _descriptor5, this);

_initDefineProp(this, 'type', _descriptor5, this);
_initDefineProp(this, 'type', _descriptor6, this);

_initDefineProp(this, 'widgetId', _descriptor6, this);
_initDefineProp(this, 'widgetId', _descriptor7, this);

this._config = config;
this._element = element;
Expand All @@ -82,7 +84,7 @@ export let Recaptcha = (_dec = customElement('aup-google-recaptcha'), _dec2 = no

return _asyncToGenerator(function* () {
yield _this._scriptPromise;
_this.widgetId = window.grecaptcha.render(_this._element, { badge: _this.badge, callback: _this.callback, sitekey: _this._config.get('siteKey'), size: _this.size, theme: _this.theme, type: _this.type });
_this.widgetId = window.grecaptcha.render(_this._element, { badge: _this.badge, callback: _this.callback, 'expired-callback': _this.expire, sitekey: _this._config.get('siteKey'), size: _this.size, theme: _this.theme, type: _this.type });
})();
}

Expand All @@ -92,7 +94,7 @@ export let Recaptcha = (_dec = customElement('aup-google-recaptcha'), _dec2 = no
const script = document.createElement('script');
script.async = true;
script.defer = true;
script.src = `https://www.google.com/recaptcha/api.js?hl=${this._config.get('hl')}&onload=aureliaPluginsGoogleRecaptchaOnLoad&render=explicit`;
script.src = `https://www.recaptcha.net/recaptcha/api.js?hl=${this._config.get('hl')}&onload=aureliaPluginsGoogleRecaptchaOnLoad&render=explicit`;
script.type = 'text/javascript';
document.head.appendChild(script);
this._scriptPromise = new Promise((resolve, reject) => {
Expand All @@ -111,22 +113,25 @@ export let Recaptcha = (_dec = customElement('aup-google-recaptcha'), _dec2 = no
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'callback', [bindable], {
enumerable: true,
initializer: null
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, 'size', [bindable], {
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, 'expire', [bindable], {
enumerable: true,
initializer: null
}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, 'size', [bindable], {
enumerable: true,
initializer: function () {
return 'normal';
}
}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, 'theme', [bindable], {
}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, 'theme', [bindable], {
enumerable: true,
initializer: function () {
return 'light';
}
}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, 'type', [bindable], {
}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, 'type', [bindable], {
enumerable: true,
initializer: function () {
return 'image';
}
}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, 'widgetId', [_dec4], {
}), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, 'widgetId', [_dec4], {
enumerable: true,
initializer: null
})), _class2)) || _class) || _class) || _class);
1 change: 1 addition & 0 deletions dist/system/aurelia-plugins-google-recaptcha-element.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export declare class Recaptcha {
_scriptPromise: any;
badge: string;
callback: any;
expire: any;
size: string;
theme: string;
type: string;
Expand Down
27 changes: 16 additions & 11 deletions dist/system/aurelia-plugins-google-recaptcha-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
System.register(['aurelia-binding', 'aurelia-dependency-injection', 'aurelia-templating', './aurelia-plugins-google-recaptcha-config'], function (_export, _context) {
"use strict";

var bindingMode, inject, bindable, customElement, noView, Config, _dec, _dec2, _dec3, _dec4, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, Recaptcha;
var bindingMode, inject, bindable, customElement, noView, Config, _dec, _dec2, _dec3, _dec4, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, Recaptcha;

function _asyncToGenerator(fn) {
return function () {
Expand Down Expand Up @@ -106,13 +106,15 @@ System.register(['aurelia-binding', 'aurelia-dependency-injection', 'aurelia-tem

_initDefineProp(this, 'callback', _descriptor2, this);

_initDefineProp(this, 'size', _descriptor3, this);
_initDefineProp(this, 'expire', _descriptor3, this);

_initDefineProp(this, 'theme', _descriptor4, this);
_initDefineProp(this, 'size', _descriptor4, this);

_initDefineProp(this, 'type', _descriptor5, this);
_initDefineProp(this, 'theme', _descriptor5, this);

_initDefineProp(this, 'widgetId', _descriptor6, this);
_initDefineProp(this, 'type', _descriptor6, this);

_initDefineProp(this, 'widgetId', _descriptor7, this);

this._config = config;
this._element = element;
Expand All @@ -134,7 +136,7 @@ System.register(['aurelia-binding', 'aurelia-dependency-injection', 'aurelia-tem
return this._scriptPromise;

case 2:
this.widgetId = window.grecaptcha.render(this._element, { badge: this.badge, callback: this.callback, sitekey: this._config.get('siteKey'), size: this.size, theme: this.theme, type: this.type });
this.widgetId = window.grecaptcha.render(this._element, { badge: this.badge, callback: this.callback, 'expired-callback': this.expire, sitekey: this._config.get('siteKey'), size: this.size, theme: this.theme, type: this.type });

case 3:
case 'end':
Expand All @@ -157,7 +159,7 @@ System.register(['aurelia-binding', 'aurelia-dependency-injection', 'aurelia-tem
var script = document.createElement('script');
script.async = true;
script.defer = true;
script.src = 'https://www.google.com/recaptcha/api.js?hl=' + this._config.get('hl') + '&onload=aureliaPluginsGoogleRecaptchaOnLoad&render=explicit';
script.src = 'https://www.recaptcha.net/recaptcha/api.js?hl=' + this._config.get('hl') + '&onload=aureliaPluginsGoogleRecaptchaOnLoad&render=explicit';
script.type = 'text/javascript';
document.head.appendChild(script);
this._scriptPromise = new Promise(function (resolve, reject) {
Expand All @@ -184,22 +186,25 @@ System.register(['aurelia-binding', 'aurelia-dependency-injection', 'aurelia-tem
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'callback', [bindable], {
enumerable: true,
initializer: null
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, 'size', [bindable], {
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, 'expire', [bindable], {
enumerable: true,
initializer: null
}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, 'size', [bindable], {
enumerable: true,
initializer: function initializer() {
return 'normal';
}
}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, 'theme', [bindable], {
}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, 'theme', [bindable], {
enumerable: true,
initializer: function initializer() {
return 'light';
}
}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, 'type', [bindable], {
}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, 'type', [bindable], {
enumerable: true,
initializer: function initializer() {
return 'image';
}
}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, 'widgetId', [_dec4], {
}), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, 'widgetId', [_dec4], {
enumerable: true,
initializer: null
})), _class2)) || _class) || _class) || _class));
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@
]
}
}
}
}
Loading