@trustcaptcha/trustcaptcha-frontend
Advanced tools
Comparing version 1.0.1 to 1.1.0
@@ -5,6 +5,7 @@ 'use strict'; | ||
const index = require('./index-e76f75d8.js'); | ||
const index = require('./index-f7190aa4.js'); | ||
const appGlobals = require('./app-globals-3a1e7e63.js'); | ||
/* | ||
Stencil Client Patch Browser v4.11.0 | MIT Licensed | https://stenciljs.com | ||
Stencil Client Patch Browser v4.12.4 | MIT Licensed | https://stenciljs.com | ||
*/ | ||
@@ -20,4 +21,5 @@ const patchBrowser = () => { | ||
patchBrowser().then(options => { | ||
return index.bootstrapLazy([["trustcaptcha-component.cjs",[[1,"trustcaptcha-component",{"sitekey":[1],"companyWebsite":[1,"company-website"],"trustcaptchaWebsite":[1,"trustcaptcha-website"],"trustcaptchaApi":[1,"trustcaptcha-api"],"language":[1],"theme":[1],"autostart":[1],"captchaStatus":[32],"translation":[32],"currentTheme":[32],"reset":[64]},null,{"language":["watchLanguageUpdate"],"theme":["watchThemeUpdate"]}]]]], options); | ||
patchBrowser().then(async (options) => { | ||
await appGlobals.globalScripts(); | ||
return index.bootstrapLazy([["trustcaptcha-component.cjs",[[1,"trustcaptcha-component",{"sitekey":[1],"companyWebsite":[1,"company-website"],"trustcaptchaWebsite":[1,"trustcaptcha-website"],"trustcaptchaApi":[1,"trustcaptcha-api"],"language":[1],"theme":[1],"autostart":[1],"tokenFieldName":[1,"token-field-name"],"captchaStatus":[32],"translation":[32],"currentTheme":[32],"reset":[64]},null,{"language":["watchLanguageUpdate"],"theme":["watchThemeUpdate"]}]]]], options); | ||
}); | ||
@@ -24,0 +26,0 @@ |
@@ -5,7 +5,9 @@ 'use strict'; | ||
const index = require('./index-e76f75d8.js'); | ||
const index = require('./index-f7190aa4.js'); | ||
const appGlobals = require('./app-globals-3a1e7e63.js'); | ||
const defineCustomElements = (win, options) => { | ||
const defineCustomElements = async (win, options) => { | ||
if (typeof window === 'undefined') return undefined; | ||
return index.bootstrapLazy([["trustcaptcha-component.cjs",[[1,"trustcaptcha-component",{"sitekey":[1],"companyWebsite":[1,"company-website"],"trustcaptchaWebsite":[1,"trustcaptcha-website"],"trustcaptchaApi":[1,"trustcaptcha-api"],"language":[1],"theme":[1],"autostart":[1],"captchaStatus":[32],"translation":[32],"currentTheme":[32],"reset":[64]},null,{"language":["watchLanguageUpdate"],"theme":["watchThemeUpdate"]}]]]], options); | ||
await appGlobals.globalScripts(); | ||
return index.bootstrapLazy([["trustcaptcha-component.cjs",[[1,"trustcaptcha-component",{"sitekey":[1],"companyWebsite":[1,"company-website"],"trustcaptchaWebsite":[1,"trustcaptcha-website"],"trustcaptchaApi":[1,"trustcaptcha-api"],"language":[1],"theme":[1],"autostart":[1],"tokenFieldName":[1,"token-field-name"],"captchaStatus":[32],"translation":[32],"currentTheme":[32],"reset":[64]},null,{"language":["watchLanguageUpdate"],"theme":["watchThemeUpdate"]}]]]], options); | ||
}; | ||
@@ -12,0 +14,0 @@ |
@@ -7,3 +7,3 @@ { | ||
"name": "@stencil/core", | ||
"version": "4.11.0", | ||
"version": "4.12.4", | ||
"typescriptVersion": "5.3.3" | ||
@@ -10,0 +10,0 @@ }, |
@@ -10,3 +10,3 @@ import { h, Host } from "@stencil/core"; | ||
this.companyWebsite = 'https://about.trustcaptcha.com'; | ||
this.trustcaptchaWebsite = 'https://trustcaptcha.com'; | ||
this.trustcaptchaWebsite = 'https://www.trustcaptcha.com'; | ||
this.trustcaptchaApi = 'https://api.captcha.trustcaptcha.com'; | ||
@@ -16,2 +16,3 @@ this.language = 'en'; | ||
this.autostart = 'active'; | ||
this.tokenFieldName = 'tc-verification-token'; | ||
this.captchaStatus = Status.START; | ||
@@ -22,3 +23,3 @@ this.translation = undefined; | ||
componentWillLoad() { | ||
this.captchaBox = new CaptchaBox(this.sitekey, this.trustcaptchaApi, this.hostElement, this.isAutostartActive()); | ||
this.captchaBox = new CaptchaBox(this.sitekey, this.trustcaptchaApi, this.hostElement, this.isAutostartActive(), this.tokenFieldName); | ||
this.captchaBox.statusChangedEvent.on('statusChanged', value => { this.captchaStatus = value; }); | ||
@@ -65,3 +66,3 @@ this.captchaBox.captchaFinishEvent.on("captchaSolved", verificationToken => { | ||
render() { | ||
return (h(Host, null, h("div", { class: { | ||
return (h(Host, { key: 'f404d5d84fbc764f0d3241d801ab03dfba50d93b' }, h("div", { key: 'b20dd46363961013a853fbae8e1534517afdb741', class: { | ||
'px-2 py-2 border-2 rounded-md': true, | ||
@@ -74,3 +75,3 @@ 'bg-gray-50 border-gray-100': this.currentTheme == 'light' && (this.captchaBox.status === Status.START || this.captchaBox.status === Status.RUNNING), | ||
'bg-red-800 border-red-700': this.currentTheme == 'dark' && this.captchaBox.status === Status.FAILED | ||
} }, h("div", { class: 'flex space-x-2' }, h("div", { class: "flex justify-center items-center w-14 h-14" }, h("div", { class: 'justify-center' }, this.captchaStatus == Status.START && | ||
} }, h("div", { key: '116550b669aeca1e01bbbb16476336fd1fa91c94', class: 'flex space-x-2' }, h("div", { key: '4814eec42d6f4913895fb549cbcb9c8c1d84048f', class: "flex justify-center items-center w-14 h-14" }, h("div", { key: 'ba8cf5d5c3061091ccaa0cd6e1c5e92fc25b5fe6', class: 'justify-center' }, this.captchaStatus == Status.START && | ||
h("div", null, this.currentTheme == 'light' && | ||
@@ -81,7 +82,7 @@ h("div", null, h("svg", { version: "1.1", id: "Capa_1", xmlns: "http://www.w3.org/2000/svg", width: "48", height: "48", viewBox: "0 0 428.2 428.2" }, h("path", { class: "iconLight", d: "M393.8,110.2c-0.5-11.3-0.5-22-0.5-32.7c0-8.5-6.9-15.4-15.4-15.4c-64,0-112.6-18.4-153.1-57.9\n c-6.1-5.6-15.4-5.6-21.5,0c-40.4,39.4-89.1,57.8-153.1,57.9c-8.5,0-15.4,6.9-15.4,15.4c0,10.7,0,21.5-0.5,32.7\n c-2,107.5-5.1,255,174.6,316.9l5.1,1l5.1-1C398.4,365.2,395.8,218.2,393.8,110.2z M202.2,258.9c-0.2,0.2-0.5,0.4-0.7,0.7\n c-3,2.4-6.4,3.8-10.4,3.8h-0.5c-4.1,0-8.2-2-10.8-5.1l-39.5-43.8c-4.4-4.9-4-12.5,0.9-16.9l5.2-4.6c4.9-4.4,12.4-3.9,16.8,0.9\n l21.2,23.5c4.5,5,12.2,5.3,17.1,0.7l65.3-62.1c4.8-4.6,12.4-4.3,17,0.5l4.7,5c4.5,4.8,4.2,12.3-0.6,16.9L202.2,258.9z" }))), this.currentTheme == 'dark' && | ||
h("div", { class: 'text-green-500' }, h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", width: "48", height: "48" }, h("path", { "fill-rule": "evenodd", d: "M19.916 4.626a.75.75 0 01.208 1.04l-9 13.5a.75.75 0 01-1.154.114l-6-6a.75.75 0 011.06-1.06l5.353 5.353 8.493-12.739a.75.75 0 011.04-.208z", "clip-rule": "evenodd" }))), this.captchaStatus == Status.FAILED && | ||
h("div", null, h("svg", { height: "48", version: "1.1", width: "48", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, h("g", { transform: "translate(0 -1028.4)" }, h("path", { d: "m22 12c0 5.523-4.477 10-10 10-5.5228 0-10-4.477-10-10 0-5.5228 4.4772-10 10-10 5.523 0 10 4.4772 10 10z", fill: "#c0392b", transform: "translate(0 1029.4)" }), h("path", { d: "m22 12c0 5.523-4.477 10-10 10-5.5228 0-10-4.477-10-10 0-5.5228 4.4772-10 10-10 5.523 0 10 4.4772 10 10z", fill: "#e74c3c", transform: "translate(0 1028.4)" }), h("path", { d: "m7.0503 1037.8 3.5357 3.6-3.5357 3.5 1.4142 1.4 3.5355-3.5 3.536 3.5 1.414-1.4-3.536-3.5 3.536-3.6-1.414-1.4-3.536 3.5-3.5355-3.5-1.4142 1.4z", fill: "#c0392b" }), h("path", { d: "m7.0503 1036.8 3.5357 3.6-3.5357 3.5 1.4142 1.4 3.5355-3.5 3.536 3.5 1.414-1.4-3.536-3.5 3.536-3.6-1.414-1.4-3.536 3.5-3.5355-3.5-1.4142 1.4z", fill: "#ecf0f1" })))))), h("div", { class: "grow" }, this.captchaStatus == Status.START && | ||
h("div", null, h("svg", { height: "48", version: "1.1", width: "48", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, h("g", { transform: "translate(0 -1028.4)" }, h("path", { d: "m22 12c0 5.523-4.477 10-10 10-5.5228 0-10-4.477-10-10 0-5.5228 4.4772-10 10-10 5.523 0 10 4.4772 10 10z", fill: "#c0392b", transform: "translate(0 1029.4)" }), h("path", { d: "m22 12c0 5.523-4.477 10-10 10-5.5228 0-10-4.477-10-10 0-5.5228 4.4772-10 10-10 5.523 0 10 4.4772 10 10z", fill: "#e74c3c", transform: "translate(0 1028.4)" }), h("path", { d: "m7.0503 1037.8 3.5357 3.6-3.5357 3.5 1.4142 1.4 3.5355-3.5 3.536 3.5 1.414-1.4-3.536-3.5 3.536-3.6-1.414-1.4-3.536 3.5-3.5355-3.5-1.4142 1.4z", fill: "#c0392b" }), h("path", { d: "m7.0503 1036.8 3.5357 3.6-3.5357 3.5 1.4142 1.4 3.5355-3.5 3.536 3.5 1.414-1.4-3.536-3.5 3.536-3.6-1.414-1.4-3.536 3.5-3.5355-3.5-1.4142 1.4z", fill: "#ecf0f1" })))))), h("div", { key: 'ad2e16cbac3974a6b1349ad5e49786f51f88d534', class: "grow" }, this.captchaStatus == Status.START && | ||
h("div", null, h("button", { type: "button", class: "w-full justify-center inline-flex items-center gap-x-1.5 rounded-md px-3 py-2 text-sm font-semibold bg-blue-500 text-white shadow-sm hover:bg-blue-400 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-500 transition duration-150 ease-in-out hover:scale-y-110", onClick: () => this.startVerification() }, h("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", class: "-ml-0.5 h-5 w-5" }, h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M15.042 21.672L13.684 16.6m0 0l-2.51 2.225.569-9.47 5.227 7.917-3.286-.672zM12 2.25V4.5m5.834.166l-1.591 1.591M20.25 10.5H18M7.757 14.743l-1.59 1.59M6 10.5H3.75m4.007-4.243l-1.59-1.59" })), this.translation.button.startVerification)), this.captchaStatus == Status.RUNNING && | ||
h("div", null, h("button", { type: "button", class: { 'w-full justify-center inline-flex items-center gap-x-1.5 rounded-md px-3 py-2 text-sm font-semibold shadow-sm ring-1 ring-inset': true, 'bg-gray-200 text-gray-900 ring-gray-200': this.currentTheme == 'light', 'bg-gray-700 text-gray-100 ring-gray-700': this.currentTheme == 'dark' }, disabled: true }, h("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", class: "-ml-0.5 h-5 w-5" }, h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z" })), this.translation.button.verificationInProgress)), this.captchaStatus == Status.DONE && | ||
h("div", null, h("button", { type: "button", class: { 'w-full justify-center inline-flex items-center gap-x-1.5 rounded-md px-3 py-2 text-sm font-semibold shadow-sm ring-1 ring-inset': true, 'bg-gray-200 text-gray-900 ring-gray-200': this.currentTheme == 'light', 'bg-gray-700 text-gray-100 ring-gray-700': this.currentTheme == 'dark' }, disabled: true }, h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", class: "-ml-0.5 h-5 w-5" }, h("path", { "fill-rule": "evenodd", d: "M7.5 6a4.5 4.5 0 119 0 4.5 4.5 0 01-9 0zM3.751 20.105a8.25 8.25 0 0116.498 0 .75.75 0 01-.437.695A18.683 18.683 0 0112 22.5c-2.786 0-5.433-.608-7.812-1.7a.75.75 0 01-.437-.695z", "clip-rule": "evenodd" })), this.translation.button.verifiedAsHuman)), this.captchaStatus == Status.FAILED && | ||
h("div", null, h("span", { class: "text-red-500 text-sm" }, this.failureText)), h("div", { class: 'flex flex-wrap justify-end space-x-2' }, h("div", null, h("a", { class: { 'text-xs leading-6 hover:text-blue-500 hover:underline': true, 'text-gray-600': this.currentTheme == 'light', 'text-gray-400': this.currentTheme == 'dark' }, href: `${this.companyWebsite}/legal/end-privacy-policy`, target: '_blank' }, this.translation.footer.endPrivacyPolicy)), h("div", null, h("a", { class: 'text-xs leading-6 text-blue-500 hover:text-blue-500 hover:underline font-bold', href: this.trustcaptchaWebsite, target: '_blank' }, "Trustcaptcha")))))))); | ||
h("div", null, h("button", { type: "button", class: { 'w-full justify-center inline-flex items-center gap-x-1.5 rounded-md px-3 py-2 text-sm font-semibold shadow-sm ring-1 ring-inset': true, 'bg-gray-200 text-gray-900 ring-gray-200': this.currentTheme == 'light', 'bg-gray-700 text-gray-100 ring-gray-700': this.currentTheme == 'dark' }, disabled: true }, h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", class: "-ml-0.5 h-5 w-5" }, h("path", { "fill-rule": "evenodd", d: "M7.5 6a4.5 4.5 0 119 0 4.5 4.5 0 01-9 0zM3.751 20.105a8.25 8.25 0 0116.498 0 .75.75 0 01-.437.695A18.683 18.683 0 0112 22.5c-2.786 0-5.433-.608-7.812-1.7a.75.75 0 01-.437-.695z", "clip-rule": "evenodd" })), this.translation.button.verificationCompleted)), this.captchaStatus == Status.FAILED && | ||
h("div", null, h("span", { class: "text-red-500 text-sm" }, this.failureText)), h("div", { key: 'a5797676fe2cca31ebb9af8d26d9d7821bdf62f3', class: 'flex flex-wrap justify-end space-x-2' }, h("div", { key: '51ab7b10c8531ce7507978165ee8d9766af4993c' }, h("a", { key: 'bc82fc01b5b9989734982ddedac4932a000dabdc', class: { 'text-xs leading-6 hover:text-blue-500 hover:underline': true, 'text-gray-600': this.currentTheme == 'light', 'text-gray-400': this.currentTheme == 'dark' }, href: `${this.companyWebsite}/legal/end-privacy-policy`, target: '_blank' }, this.translation.footer.endPrivacyPolicy)), h("div", { key: 'dd7edb717dd9db88743b8c10bc0d2b5c92d57e9c' }, h("a", { key: 'c269731a30853e352d81e086ee3b5552f5e4805c', class: 'text-xs leading-6 text-blue-500 hover:text-blue-500 hover:underline font-bold', href: this.trustcaptchaWebsite, target: '_blank' }, "Trustcaptcha")))))))); | ||
} | ||
@@ -156,3 +157,3 @@ startVerification() { | ||
"reflect": false, | ||
"defaultValue": "'https://trustcaptcha.com'" | ||
"defaultValue": "'https://www.trustcaptcha.com'" | ||
}, | ||
@@ -181,4 +182,4 @@ "trustcaptchaApi": { | ||
"complexType": { | ||
"original": "'en' | 'de'", | ||
"resolved": "\"de\" | \"en\"", | ||
"original": "'be' | 'cs' | 'da' | 'de' | 'el' | 'en' | 'es' | 'fi' | 'fr' | 'hr' | 'hu' | 'it' | 'lb' | 'lt' | 'lv' | 'nl' | 'no' | 'pl' | 'pt' | 'ro' | 'ru' | 'sk' | 'sv' | 'tr'", | ||
"resolved": "\"hr\" | \"tr\" | \"no\" | \"es\" | \"be\" | \"cs\" | \"da\" | \"de\" | \"el\" | \"en\" | \"fi\" | \"fr\" | \"hu\" | \"it\" | \"lb\" | \"lt\" | \"lv\" | \"nl\" | \"pl\" | \"pt\" | \"ro\" | \"ru\" | \"sk\" | \"sv\"", | ||
"references": {} | ||
@@ -231,2 +232,20 @@ }, | ||
"defaultValue": "'active'" | ||
}, | ||
"tokenFieldName": { | ||
"type": "string", | ||
"mutable": false, | ||
"complexType": { | ||
"original": "string", | ||
"resolved": "string", | ||
"references": {} | ||
}, | ||
"required": false, | ||
"optional": false, | ||
"docs": { | ||
"tags": [], | ||
"text": "" | ||
}, | ||
"attribute": "token-field-name", | ||
"reflect": false, | ||
"defaultValue": "'tc-verification-token'" | ||
} | ||
@@ -233,0 +252,0 @@ }; |
@@ -8,3 +8,3 @@ import { CaptchaManager } from "./js/captcha-manager"; | ||
export class CaptchaBox { | ||
constructor(sitekey, trustcaptchaApi, htmlElement, autostart) { | ||
constructor(sitekey, trustcaptchaApi, htmlElement, autostart, tokenFieldName) { | ||
this.statusChangedEvent = new EventEmitter(); | ||
@@ -14,2 +14,3 @@ this.captchaFinishEvent = new EventEmitter(); | ||
this.autostart = true; | ||
this.tokenFieldName = 'tc-verification-token'; | ||
this.boxCreationTimestamp = new Date(); | ||
@@ -21,2 +22,3 @@ this.eventTracker = new EventTracker(); | ||
this.autostart = autostart; | ||
this.tokenFieldName = tokenFieldName; | ||
} | ||
@@ -47,3 +49,3 @@ setup() { | ||
verificationTokenField.setAttribute('type', 'text'); | ||
verificationTokenField.setAttribute('name', 'tc-verification-token'); | ||
verificationTokenField.setAttribute('name', this.tokenFieldName); | ||
verificationTokenField.setAttribute('style', 'display:none'); | ||
@@ -59,3 +61,3 @@ verificationTokenField.setAttribute('tabindex', '-1'); | ||
}); | ||
this.formElement.querySelectorAll('input, select, textarea').forEach(element => { | ||
this.formElement.querySelectorAll('input:not([data-autostart="false"]), select:not([data-autostart="false"]), textarea:not([data-autostart="false"])').forEach(element => { | ||
element.addEventListener('focusin', () => { | ||
@@ -62,0 +64,0 @@ this.autostartVerification(); |
@@ -5,2 +5,36 @@ export function getTranslation(language = 'en') { | ||
const translations = { | ||
// Weißrussisch | ||
be: { | ||
button: { | ||
startVerification: "Пачаць верыфікацыю", | ||
verificationInProgress: "Верыфікацыя ў працэсе ...", | ||
verificationCompleted: "Верыфікацыя завершана" | ||
}, | ||
footer: { | ||
endPrivacyPolicy: "Палітыка прыватнасці" | ||
} | ||
}, | ||
// Tschechisch | ||
cs: { | ||
button: { | ||
startVerification: "Začít ověřování", | ||
verificationInProgress: "Probíhá ověřování ...", | ||
verificationCompleted: "Ověření dokončeno" | ||
}, | ||
footer: { | ||
endPrivacyPolicy: "Soukromí" | ||
} | ||
}, | ||
// Dänisch | ||
da: { | ||
button: { | ||
startVerification: "Start verifikation", | ||
verificationInProgress: "Verifikation i gang ...", | ||
verificationCompleted: "Verifikation afsluttet" | ||
}, | ||
footer: { | ||
endPrivacyPolicy: "Privatliv" | ||
} | ||
}, | ||
// Deutsch | ||
de: { | ||
@@ -10,3 +44,3 @@ button: { | ||
verificationInProgress: "Verifizierung läuft ...", | ||
verifiedAsHuman: "Verifizierung abgeschlossen" | ||
verificationCompleted: "Verifizierung abgeschlossen" | ||
}, | ||
@@ -17,2 +51,14 @@ footer: { | ||
}, | ||
// Griechisch | ||
el: { | ||
button: { | ||
startVerification: "Έναρξη επαλήθευσης", | ||
verificationInProgress: "Η επαλήθευση βρίσκεται σε εξέλιξη ...", | ||
verificationCompleted: "Η επαλήθευση ολοκληρώθηκε" | ||
}, | ||
footer: { | ||
endPrivacyPolicy: "Απόρρητο" | ||
} | ||
}, | ||
// Englisch | ||
en: { | ||
@@ -22,3 +68,3 @@ button: { | ||
verificationInProgress: "Verification in progress ...", | ||
verifiedAsHuman: "Verification completed" | ||
verificationCompleted: "Verification completed" | ||
}, | ||
@@ -28,4 +74,202 @@ footer: { | ||
} | ||
}, | ||
// Spanisch | ||
es: { | ||
button: { | ||
startVerification: "Iniciar verificación", | ||
verificationInProgress: "Verificación en progreso ...", | ||
verificationCompleted: "Verificación completada" | ||
}, | ||
footer: { | ||
endPrivacyPolicy: "Privacidad" | ||
} | ||
}, | ||
// Finnisch | ||
fi: { | ||
button: { | ||
startVerification: "Aloita varmennus", | ||
verificationInProgress: "Varmennus käynnissä ...", | ||
verificationCompleted: "Varmennus valmis" | ||
}, | ||
footer: { | ||
endPrivacyPolicy: "Yksityisyys" | ||
} | ||
}, | ||
// Französisch | ||
fr: { | ||
button: { | ||
startVerification: "Démarrer la vérification", | ||
verificationInProgress: "Vérification en cours ...", | ||
verificationCompleted: "Vérification terminée" | ||
}, | ||
footer: { | ||
endPrivacyPolicy: "Confidentialité" | ||
} | ||
}, | ||
// Kroatisch | ||
hr: { | ||
button: { | ||
startVerification: "Pokreni verifikaciju", | ||
verificationInProgress: "Verifikacija je u tijeku ...", | ||
verificationCompleted: "Verifikacija završena" | ||
}, | ||
footer: { | ||
endPrivacyPolicy: "Privatnost" | ||
} | ||
}, | ||
// Ungarisch | ||
hu: { | ||
button: { | ||
startVerification: "Ellenőrzés indítása", | ||
verificationInProgress: "Ellenőrzés folyamatban ...", | ||
verificationCompleted: "Az ellenőrzés befejeződött" | ||
}, | ||
footer: { | ||
endPrivacyPolicy: "Adatvédelem" | ||
} | ||
}, | ||
// Italenisch | ||
it: { | ||
button: { | ||
startVerification: "Avvia verifica", | ||
verificationInProgress: "Verifica in corso ...", | ||
verificationCompleted: "Verifica completata" | ||
}, | ||
footer: { | ||
endPrivacyPolicy: "Privacy" | ||
} | ||
}, | ||
// Luxemburgisch | ||
lb: { | ||
button: { | ||
startVerification: "Verifikatioun ufänken", | ||
verificationInProgress: "Verifikatioun am Gaang ...", | ||
verificationCompleted: "Verifikatioun ofgeschloss" | ||
}, | ||
footer: { | ||
endPrivacyPolicy: "Dateschutz" | ||
} | ||
}, | ||
// Litauisch | ||
lt: { | ||
button: { | ||
startVerification: "Pradėti patvirtinimą", | ||
verificationInProgress: "Patvirtinimas vyksta ...", | ||
verificationCompleted: "Patvirtinimas baigtas" | ||
}, | ||
footer: { | ||
endPrivacyPolicy: "Privatumas" | ||
} | ||
}, | ||
// Lettisch | ||
lv: { | ||
button: { | ||
startVerification: "Sākt verifikāciju", | ||
verificationInProgress: "Verifikācija notiek ...", | ||
verificationCompleted: "Verifikācija pabeigta" | ||
}, | ||
footer: { | ||
endPrivacyPolicy: "Privātums" | ||
} | ||
}, | ||
// Niederländisch | ||
nl: { | ||
button: { | ||
startVerification: "Verificatie starten", | ||
verificationInProgress: "Verificatie bezig ...", | ||
verificationCompleted: "Verificatie voltooid" | ||
}, | ||
footer: { | ||
endPrivacyPolicy: "Privacybeleid" | ||
} | ||
}, | ||
// Norwegisch | ||
no: { | ||
button: { | ||
startVerification: "Start verifisering", | ||
verificationInProgress: "Verifisering pågår ...", | ||
verificationCompleted: "Verifisering fullført" | ||
}, | ||
footer: { | ||
endPrivacyPolicy: "Personvern" | ||
} | ||
}, | ||
// Polnisch | ||
pl: { | ||
button: { | ||
startVerification: "Rozpocznij weryfikację", | ||
verificationInProgress: "Trwa weryfikacja ...", | ||
verificationCompleted: "Weryfikacja zakończona" | ||
}, | ||
footer: { | ||
endPrivacyPolicy: "Prywatność" | ||
} | ||
}, | ||
// Portugiesisch | ||
pt: { | ||
button: { | ||
startVerification: "Iniciar verificação", | ||
verificationInProgress: "Verificação em progresso ...", | ||
verificationCompleted: "Verificação concluída" | ||
}, | ||
footer: { | ||
endPrivacyPolicy: "Privacidade" | ||
} | ||
}, | ||
// Rumänisch | ||
ro: { | ||
button: { | ||
startVerification: "Începeți verificarea", | ||
verificationInProgress: "Verificarea este în desfășurare ...", | ||
verificationCompleted: "Verificare completată" | ||
}, | ||
footer: { | ||
endPrivacyPolicy: "Intimitate" | ||
} | ||
}, | ||
// Russisch | ||
ru: { | ||
button: { | ||
startVerification: "Начать проверку", | ||
verificationInProgress: "Проверка выполняется ...", | ||
verificationCompleted: "Проверка завершена" | ||
}, | ||
footer: { | ||
endPrivacyPolicy: "Политика конфиденциальности" | ||
} | ||
}, | ||
// Slowakisch | ||
sk: { | ||
button: { | ||
startVerification: "Začať overovanie", | ||
verificationInProgress: "Overovanie prebieha ...", | ||
verificationCompleted: "Overenie dokončené" | ||
}, | ||
footer: { | ||
endPrivacyPolicy: "Súkromie" | ||
} | ||
}, | ||
// Schwedisch | ||
sv: { | ||
button: { | ||
startVerification: "Starta verifiering", | ||
verificationInProgress: "Verifiering pågår ...", | ||
verificationCompleted: "Verifiering slutförd" | ||
}, | ||
footer: { | ||
endPrivacyPolicy: "Integritet" | ||
} | ||
}, | ||
// Türkisch | ||
tr: { | ||
button: { | ||
startVerification: "Doğrulamayı başlat", | ||
verificationInProgress: "Doğrulama devam ediyor ...", | ||
verificationCompleted: "Doğrulama tamamlandı" | ||
}, | ||
footer: { | ||
endPrivacyPolicy: "Gizlilik" | ||
} | ||
} | ||
}; | ||
//# sourceMappingURL=locale.js.map |
@@ -1,2 +0,2 @@ | ||
export const VERSION = '1.0.1'; | ||
export const VERSION = '1.1.0'; | ||
//# sourceMappingURL=version.js.map |
@@ -1,6 +0,7 @@ | ||
import { p as promiseResolve, b as bootstrapLazy } from './index-ea0a6317.js'; | ||
export { s as setNonce } from './index-ea0a6317.js'; | ||
import { p as promiseResolve, b as bootstrapLazy } from './index-59bd269f.js'; | ||
export { s as setNonce } from './index-59bd269f.js'; | ||
import { g as globalScripts } from './app-globals-0f993ce5.js'; | ||
/* | ||
Stencil Client Patch Browser v4.11.0 | MIT Licensed | https://stenciljs.com | ||
Stencil Client Patch Browser v4.12.4 | MIT Licensed | https://stenciljs.com | ||
*/ | ||
@@ -16,6 +17,7 @@ const patchBrowser = () => { | ||
patchBrowser().then(options => { | ||
return bootstrapLazy([["trustcaptcha-component",[[1,"trustcaptcha-component",{"sitekey":[1],"companyWebsite":[1,"company-website"],"trustcaptchaWebsite":[1,"trustcaptcha-website"],"trustcaptchaApi":[1,"trustcaptcha-api"],"language":[1],"theme":[1],"autostart":[1],"captchaStatus":[32],"translation":[32],"currentTheme":[32],"reset":[64]},null,{"language":["watchLanguageUpdate"],"theme":["watchThemeUpdate"]}]]]], options); | ||
patchBrowser().then(async (options) => { | ||
await globalScripts(); | ||
return bootstrapLazy([["trustcaptcha-component",[[1,"trustcaptcha-component",{"sitekey":[1],"companyWebsite":[1,"company-website"],"trustcaptchaWebsite":[1,"trustcaptcha-website"],"trustcaptchaApi":[1,"trustcaptcha-api"],"language":[1],"theme":[1],"autostart":[1],"tokenFieldName":[1,"token-field-name"],"captchaStatus":[32],"translation":[32],"currentTheme":[32],"reset":[64]},null,{"language":["watchLanguageUpdate"],"theme":["watchThemeUpdate"]}]]]], options); | ||
}); | ||
//# sourceMappingURL=frontendlibrary.js.map |
@@ -1,7 +0,9 @@ | ||
import { b as bootstrapLazy } from './index-ea0a6317.js'; | ||
export { s as setNonce } from './index-ea0a6317.js'; | ||
import { b as bootstrapLazy } from './index-59bd269f.js'; | ||
export { s as setNonce } from './index-59bd269f.js'; | ||
import { g as globalScripts } from './app-globals-0f993ce5.js'; | ||
const defineCustomElements = (win, options) => { | ||
const defineCustomElements = async (win, options) => { | ||
if (typeof window === 'undefined') return undefined; | ||
return bootstrapLazy([["trustcaptcha-component",[[1,"trustcaptcha-component",{"sitekey":[1],"companyWebsite":[1,"company-website"],"trustcaptchaWebsite":[1,"trustcaptcha-website"],"trustcaptchaApi":[1,"trustcaptcha-api"],"language":[1],"theme":[1],"autostart":[1],"captchaStatus":[32],"translation":[32],"currentTheme":[32],"reset":[64]},null,{"language":["watchLanguageUpdate"],"theme":["watchThemeUpdate"]}]]]], options); | ||
await globalScripts(); | ||
return bootstrapLazy([["trustcaptcha-component",[[1,"trustcaptcha-component",{"sitekey":[1],"companyWebsite":[1,"company-website"],"trustcaptchaWebsite":[1,"trustcaptcha-website"],"trustcaptchaApi":[1,"trustcaptcha-api"],"language":[1],"theme":[1],"autostart":[1],"tokenFieldName":[1,"token-field-name"],"captchaStatus":[32],"translation":[32],"currentTheme":[32],"reset":[64]},null,{"language":["watchLanguageUpdate"],"theme":["watchThemeUpdate"]}]]]], options); | ||
}; | ||
@@ -8,0 +10,0 @@ |
@@ -1,2 +0,2 @@ | ||
import{p as t,b as a}from"./p-52c13f8f.js";export{s as setNonce}from"./p-52c13f8f.js";const e=()=>{const a=import.meta.url;const e={};if(a!==""){e.resourcesUrl=new URL(".",a).href}return t(e)};e().then((t=>a([["p-b9567c18",[[1,"trustcaptcha-component",{sitekey:[1],companyWebsite:[1,"company-website"],trustcaptchaWebsite:[1,"trustcaptcha-website"],trustcaptchaApi:[1,"trustcaptcha-api"],language:[1],theme:[1],autostart:[1],captchaStatus:[32],translation:[32],currentTheme:[32],reset:[64]},null,{language:["watchLanguageUpdate"],theme:["watchThemeUpdate"]}]]]],t))); | ||
import{p as t,b as e}from"./p-c49ea893.js";export{s as setNonce}from"./p-c49ea893.js";import{g as a}from"./p-e1255160.js";const c=()=>{const e=import.meta.url;const a={};if(e!==""){a.resourcesUrl=new URL(".",e).href}return t(a)};c().then((async t=>{await a();return e([["p-ee77e5a6",[[1,"trustcaptcha-component",{sitekey:[1],companyWebsite:[1,"company-website"],trustcaptchaWebsite:[1,"trustcaptcha-website"],trustcaptchaApi:[1,"trustcaptcha-api"],language:[1],theme:[1],autostart:[1],tokenFieldName:[1,"token-field-name"],captchaStatus:[32],translation:[32],currentTheme:[32],reset:[64]},null,{language:["watchLanguageUpdate"],theme:["watchThemeUpdate"]}]]]],t)})); | ||
//# sourceMappingURL=frontendlibrary.esm.js.map |
@@ -12,6 +12,7 @@ /* eslint-disable */ | ||
"companyWebsite": string; | ||
"language": 'en' | 'de'; | ||
"language": 'be' | 'cs' | 'da' | 'de' | 'el' | 'en' | 'es' | 'fi' | 'fr' | 'hr' | 'hu' | 'it' | 'lb' | 'lt' | 'lv' | 'nl' | 'no' | 'pl' | 'pt' | 'ro' | 'ru' | 'sk' | 'sv' | 'tr'; | ||
"reset": () => Promise<void>; | ||
"sitekey": string; | ||
"theme": 'light' | 'dark' | 'media'; | ||
"tokenFieldName": string; | ||
"trustcaptchaApi": string; | ||
@@ -52,3 +53,3 @@ "trustcaptchaWebsite": string; | ||
"companyWebsite"?: string; | ||
"language"?: 'en' | 'de'; | ||
"language"?: 'be' | 'cs' | 'da' | 'de' | 'el' | 'en' | 'es' | 'fi' | 'fr' | 'hr' | 'hu' | 'it' | 'lb' | 'lt' | 'lv' | 'nl' | 'no' | 'pl' | 'pt' | 'ro' | 'ru' | 'sk' | 'sv' | 'tr'; | ||
"onCaptchaFailed"?: (event: TrustcaptchaComponentCustomEvent<string>) => void; | ||
@@ -58,2 +59,3 @@ "onCaptchaSolved"?: (event: TrustcaptchaComponentCustomEvent<string>) => void; | ||
"theme"?: 'light' | 'dark' | 'media'; | ||
"tokenFieldName"?: string; | ||
"trustcaptchaApi"?: string; | ||
@@ -60,0 +62,0 @@ "trustcaptchaWebsite"?: string; |
@@ -10,5 +10,6 @@ import { EventEmitter } from '../../stencil-public-runtime'; | ||
trustcaptchaApi: string; | ||
language: 'en' | 'de'; | ||
language: 'be' | 'cs' | 'da' | 'de' | 'el' | 'en' | 'es' | 'fi' | 'fr' | 'hr' | 'hu' | 'it' | 'lb' | 'lt' | 'lv' | 'nl' | 'no' | 'pl' | 'pt' | 'ro' | 'ru' | 'sk' | 'sv' | 'tr'; | ||
theme: 'light' | 'dark' | 'media'; | ||
autostart: 'active' | 'disabled'; | ||
tokenFieldName: string; | ||
captchaSolved: EventEmitter<string>; | ||
@@ -15,0 +16,0 @@ captchaFailed: EventEmitter<string>; |
@@ -13,2 +13,3 @@ /// <reference types="node" /> | ||
readonly autostart: boolean; | ||
readonly tokenFieldName: string; | ||
readonly boxCreationTimestamp: Date; | ||
@@ -19,3 +20,3 @@ readonly eventTracker: EventTracker; | ||
verificationTokenField: HTMLInputElement; | ||
constructor(sitekey: string, trustcaptchaApi: string, htmlElement: HTMLElement, autostart: boolean); | ||
constructor(sitekey: string, trustcaptchaApi: string, htmlElement: HTMLElement, autostart: boolean, tokenFieldName: string); | ||
setup(): void; | ||
@@ -22,0 +23,0 @@ private createHoneypotField; |
@@ -1,1 +0,39 @@ | ||
export declare function getTranslation(language?: 'en' | 'de'): {}; | ||
export declare function getTranslation(language?: 'be' | 'cs' | 'da' | 'de' | 'el' | 'en' | 'es' | 'fi' | 'fr' | 'hr' | 'hu' | 'it' | 'lb' | 'lt' | 'lv' | 'nl' | 'no' | 'pl' | 'pt' | 'ro' | 'ru' | 'sk' | 'sv' | 'tr'): {}; | ||
export interface Translations { | ||
be: Translation; | ||
cs: Translation; | ||
da: Translation; | ||
de: Translation; | ||
el: Translation; | ||
en: Translation; | ||
es: Translation; | ||
fi: Translation; | ||
fr: Translation; | ||
hr: Translation; | ||
hu: Translation; | ||
it: Translation; | ||
lb: Translation; | ||
lt: Translation; | ||
lv: Translation; | ||
nl: Translation; | ||
no: Translation; | ||
pl: Translation; | ||
pt: Translation; | ||
ro: Translation; | ||
ru: Translation; | ||
sk: Translation; | ||
sv: Translation; | ||
tr: Translation; | ||
} | ||
export interface Translation { | ||
button: TranslationButton; | ||
footer: TranslationFooter; | ||
} | ||
export interface TranslationButton { | ||
startVerification: string; | ||
verificationInProgress: string; | ||
verificationCompleted: string; | ||
} | ||
export interface TranslationFooter { | ||
endPrivacyPolicy: string; | ||
} |
@@ -1,1 +0,1 @@ | ||
export declare const VERSION = "1.0.1"; | ||
export declare const VERSION = "1.1.0"; |
{ | ||
"name": "@trustcaptcha/trustcaptcha-frontend", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"description": "Frondend library for trustcaptcha", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
2085115
139
13290