@everymatrix/player-user-consents 1.33.0 → 1.33.2

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.
@@ -16,13 +16,13 @@ const TRANSLATIONS = {
16
16
  emailmarketing: "I consent to receive marketing communication via Email."
17
17
  },
18
18
  ro: {
19
- termsandconditions1: "I accept the ",
20
- termsandconditions2: ", I have read and understood the ",
21
- termsandconditions3: " as published on this site and confirm that I am over 18 years old.",
22
- tc: "Terms and Conditions",
23
- privacy: "Privacy Policy",
24
- sms: "I consent to receive marketing communication via SMS.",
25
- emailmarketing: "I consent to receive marketing communication via Email."
19
+ termsandconditions1: "Accept ",
20
+ termsandconditions2: " platformei. Am citit şi înţeles ",
21
+ termsandconditions3: " publicată pe acest site şi confirm am vârstă peste 18 ani.",
22
+ tc: "Termeni şi condiţii",
23
+ privacy: "Politica de confidenţialitate",
24
+ sms: "Sunt de acord primesc promoţii de marketing prin SMS.",
25
+ emailmarketing: "Sunt de acord primesc promoţii de marketing pe e-mail."
26
26
  },
27
27
  hr: {
28
28
  termsandconditions1: "I accept the ",
@@ -161,7 +161,7 @@ const PlayerUserConsents = class {
161
161
  determineTextContent() {
162
162
  return this.consentType === 'termsandconditions' ?
163
163
  index.h("p", null, translate('termsandconditions1', this.lang), index.h("span", { class: "ConsentLink", onClick: this.goToTermsAndConditions }, translate('tc', this.lang)), translate('termsandconditions2', this.lang), index.h("span", { class: "ConsentLink", onClick: this.goToPrivacyPolicy }, translate('privacy', this.lang)), translate('termsandconditions3', this.lang))
164
- : index.h("p", null, translate('consentType', this.lang));
164
+ : index.h("p", null, translate(this.consentType, this.lang));
165
165
  }
166
166
  render() {
167
167
  if (this.queried) {
@@ -74,7 +74,7 @@ export class PlayerUserConsents {
74
74
  translate('termsandconditions2', this.lang),
75
75
  h("span", { class: "ConsentLink", onClick: this.goToPrivacyPolicy }, translate('privacy', this.lang)),
76
76
  translate('termsandconditions3', this.lang))
77
- : h("p", null, translate('consentType', this.lang));
77
+ : h("p", null, translate(this.consentType, this.lang));
78
78
  }
79
79
  render() {
80
80
  if (this.queried) {
@@ -10,13 +10,13 @@ const TRANSLATIONS = {
10
10
  emailmarketing: "I consent to receive marketing communication via Email."
11
11
  },
12
12
  ro: {
13
- termsandconditions1: "I accept the ",
14
- termsandconditions2: ", I have read and understood the ",
15
- termsandconditions3: " as published on this site and confirm that I am over 18 years old.",
16
- tc: "Terms and Conditions",
17
- privacy: "Privacy Policy",
18
- sms: "I consent to receive marketing communication via SMS.",
19
- emailmarketing: "I consent to receive marketing communication via Email."
13
+ termsandconditions1: "Accept ",
14
+ termsandconditions2: " platformei. Am citit şi înţeles ",
15
+ termsandconditions3: " publicată pe acest site şi confirm am vârstă peste 18 ani.",
16
+ tc: "Termeni şi condiţii",
17
+ privacy: "Politica de confidenţialitate",
18
+ sms: "Sunt de acord primesc promoţii de marketing prin SMS.",
19
+ emailmarketing: "Sunt de acord primesc promoţii de marketing pe e-mail."
20
20
  },
21
21
  hr: {
22
22
  termsandconditions1: "I accept the ",
@@ -12,13 +12,13 @@ const TRANSLATIONS = {
12
12
  emailmarketing: "I consent to receive marketing communication via Email."
13
13
  },
14
14
  ro: {
15
- termsandconditions1: "I accept the ",
16
- termsandconditions2: ", I have read and understood the ",
17
- termsandconditions3: " as published on this site and confirm that I am over 18 years old.",
18
- tc: "Terms and Conditions",
19
- privacy: "Privacy Policy",
20
- sms: "I consent to receive marketing communication via SMS.",
21
- emailmarketing: "I consent to receive marketing communication via Email."
15
+ termsandconditions1: "Accept ",
16
+ termsandconditions2: " platformei. Am citit şi înţeles ",
17
+ termsandconditions3: " publicată pe acest site şi confirm am vârstă peste 18 ani.",
18
+ tc: "Termeni şi condiţii",
19
+ privacy: "Politica de confidenţialitate",
20
+ sms: "Sunt de acord primesc promoţii de marketing prin SMS.",
21
+ emailmarketing: "Sunt de acord primesc promoţii de marketing pe e-mail."
22
22
  },
23
23
  hr: {
24
24
  termsandconditions1: "I accept the ",
@@ -159,7 +159,7 @@ const PlayerUserConsents$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
159
159
  determineTextContent() {
160
160
  return this.consentType === 'termsandconditions' ?
161
161
  h("p", null, translate('termsandconditions1', this.lang), h("span", { class: "ConsentLink", onClick: this.goToTermsAndConditions }, translate('tc', this.lang)), translate('termsandconditions2', this.lang), h("span", { class: "ConsentLink", onClick: this.goToPrivacyPolicy }, translate('privacy', this.lang)), translate('termsandconditions3', this.lang))
162
- : h("p", null, translate('consentType', this.lang));
162
+ : h("p", null, translate(this.consentType, this.lang));
163
163
  }
164
164
  render() {
165
165
  if (this.queried) {
@@ -12,13 +12,13 @@ const TRANSLATIONS = {
12
12
  emailmarketing: "I consent to receive marketing communication via Email."
13
13
  },
14
14
  ro: {
15
- termsandconditions1: "I accept the ",
16
- termsandconditions2: ", I have read and understood the ",
17
- termsandconditions3: " as published on this site and confirm that I am over 18 years old.",
18
- tc: "Terms and Conditions",
19
- privacy: "Privacy Policy",
20
- sms: "I consent to receive marketing communication via SMS.",
21
- emailmarketing: "I consent to receive marketing communication via Email."
15
+ termsandconditions1: "Accept ",
16
+ termsandconditions2: " platformei. Am citit şi înţeles ",
17
+ termsandconditions3: " publicată pe acest site şi confirm am vârstă peste 18 ani.",
18
+ tc: "Termeni şi condiţii",
19
+ privacy: "Politica de confidenţialitate",
20
+ sms: "Sunt de acord primesc promoţii de marketing prin SMS.",
21
+ emailmarketing: "Sunt de acord primesc promoţii de marketing pe e-mail."
22
22
  },
23
23
  hr: {
24
24
  termsandconditions1: "I accept the ",
@@ -157,7 +157,7 @@ const PlayerUserConsents = class {
157
157
  determineTextContent() {
158
158
  return this.consentType === 'termsandconditions' ?
159
159
  h("p", null, translate('termsandconditions1', this.lang), h("span", { class: "ConsentLink", onClick: this.goToTermsAndConditions }, translate('tc', this.lang)), translate('termsandconditions2', this.lang), h("span", { class: "ConsentLink", onClick: this.goToPrivacyPolicy }, translate('privacy', this.lang)), translate('termsandconditions3', this.lang))
160
- : h("p", null, translate('consentType', this.lang));
160
+ : h("p", null, translate(this.consentType, this.lang));
161
161
  }
162
162
  render() {
163
163
  if (this.queried) {
@@ -0,0 +1 @@
1
+ import{r as i,c as t,h as n}from"./p-b1139724.js";const e={en:{termsandconditions1:"I accept the ",termsandconditions2:", I have read and understood the ",termsandconditions3:" as published on this site and confirm that I am over 18 years old.",tc:"Terms and Conditions",privacy:"Privacy Policy",sms:"I consent to receive marketing communication via SMS.",emailmarketing:"I consent to receive marketing communication via Email."},ro:{termsandconditions1:"Accept ",termsandconditions2:" platformei. Am citit şi înţeles ",termsandconditions3:" publicată pe acest site şi confirm că am vârstă peste 18 ani.",tc:"Termeni şi condiţii",privacy:"Politica de confidenţialitate",sms:"Sunt de acord să primesc promoţii de marketing prin SMS.",emailmarketing:"Sunt de acord să primesc promoţii de marketing pe e-mail."},hr:{termsandconditions1:"I accept the ",termsandconditions2:", I have read and understood the ",termsandconditions3:" as published on this site and confirm that I am over 18 years old.",tc:"Terms and Conditions",privacy:"Privacy Policy",sms:"I consent to receive marketing communication via SMS.",emailmarketing:"I consent to receive marketing communication via Email."},fr:{termsandconditions1:"I accept the ",termsandconditions2:", I have read and understood the ",termsandconditions3:" as published on this site and confirm that I am over 18 years old.",tc:"Terms and Conditions",privacy:"Privacy Policy",sms:"I consent to receive marketing communication via SMS.",emailmarketing:"I consent to receive marketing communication via Email."},cs:{termsandconditions1:"I accept the ",termsandconditions2:", I have read and understood the ",termsandconditions3:" as published on this site and confirm that I am over 18 years old.",tc:"Terms and Conditions",privacy:"Privacy Policy",sms:"I consent to receive marketing communication via SMS.",emailmarketing:"I consent to receive marketing communication via Email."},de:{termsandconditions1:"I accept the ",termsandconditions2:", I have read and understood the ",termsandconditions3:" as published on this site and confirm that I am over 18 years old.",tc:"Terms and Conditions",privacy:"Privacy Policy",sms:"I consent to receive marketing communication via SMS.",emailmarketing:"I consent to receive marketing communication via Email."}},s=i=>new Promise((t=>{fetch(i).then((i=>i.json())).then((i=>{Object.keys(i).forEach((t=>{for(let n in i[t])e[t][n]=i[t][n]})),t(!0)}))})),o=(i,t,n)=>{let s=e[void 0!==t?t:"en"][i];if(void 0!==n)for(const[i,t]of Object.entries(n.values)){const n=new RegExp(`{${i}}`,"g");s=s.replace(n,t)}return s},a=class{constructor(n){i(this,n),this.userLegislationConsent=t(this,"userLegislationConsent",7),this.lang="en",this.queried=!1,this.consentType="",this.mandatory=!1,this.consentTitle="",this.clientStyling="",this.translationUrl="",this.textContent="",this.limitStylingAppends=!1,this.goToTermsAndConditions=()=>window.postMessage({type:"GoToTermsAndConditions"}),this.goToPrivacyPolicy=()=>window.postMessage({type:"GoToPrivacyPolicy"}),this.setClientStyling=()=>{let i=document.createElement("style");i.innerHTML=this.clientStyling,this.stylingContainer.prepend(i)}}handleNewTranslations(){s(this.translationUrl)}async componentWillLoad(){this.translationUrl.length>2&&await s(this.translationUrl)}userLegislationConsentHandler(){this.userLegislationConsent.emit({type:this.consentType,value:this.checkboxInput.checked})}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}determineTextContent(){return"termsandconditions"===this.consentType?n("p",null,o("termsandconditions1",this.lang),n("span",{class:"ConsentLink",onClick:this.goToTermsAndConditions},o("tc",this.lang)),o("termsandconditions2",this.lang),n("span",{class:"ConsentLink",onClick:this.goToPrivacyPolicy},o("privacy",this.lang)),o("termsandconditions3",this.lang)):n("p",null,o(this.consentType,this.lang))}render(){return this.queried&&this.userLegislationConsentHandler(),n("div",{ref:i=>this.stylingContainer=i},n("p",{class:"ConsentTitle"},this.consentTitle),n("label",{class:"UserConsent",htmlFor:"userConsent"},n("input",{ref:i=>this.checkboxInput=i,id:"userConsent",type:"checkbox",onInput:()=>this.userLegislationConsentHandler()}),this.determineTextContent(),this.mandatory&&n("span",{class:"MandatoryItem"},"*")))}static get watchers(){return{translationUrl:["handleNewTranslations"]}}};a.style=":host{display:block}.ConsentTitle{margin-bottom:0.2rem;font-weight:600}.UserConsent:hover{cursor:pointer}.UserConsent{display:flex;align-items:baseline}.MandatoryItem{color:#f00;font-size:1.2rem}.ConsentLink{text-decoration:underline;color:var(--emfe-w-color-primary);font-weight:bold}";export{a as player_user_consents}
@@ -1 +1 @@
1
- import{p as t,b as n}from"./p-b1139724.js";(()=>{const n=import.meta.url,e={};return""!==n&&(e.resourcesUrl=new URL(".",n).href),t(e)})().then((t=>n([["p-6a20deb9",[[1,"player-user-consents",{lang:[1537],queried:[516],consentType:[513,"consent-type"],mandatory:[516],consentTitle:[513,"consent-title"],clientStyling:[1,"client-styling"],translationUrl:[513,"translation-url"],textContent:[32],limitStylingAppends:[32]}]]]],t)));
1
+ import{p as t,b as n}from"./p-b1139724.js";(()=>{const n=import.meta.url,e={};return""!==n&&(e.resourcesUrl=new URL(".",n).href),t(e)})().then((t=>n([["p-99cd32b4",[[1,"player-user-consents",{lang:[1537],queried:[516],consentType:[513,"consent-type"],mandatory:[516],consentTitle:[513,"consent-title"],clientStyling:[1,"client-styling"],translationUrl:[513,"translation-url"],textContent:[32],limitStylingAppends:[32]}]]]],t)));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/player-user-consents",
3
- "version": "1.33.0",
3
+ "version": "1.33.2",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",
@@ -1 +0,0 @@
1
- import{r as t,c as n,h as i}from"./p-b1139724.js";const e={en:{termsandconditions1:"I accept the ",termsandconditions2:", I have read and understood the ",termsandconditions3:" as published on this site and confirm that I am over 18 years old.",tc:"Terms and Conditions",privacy:"Privacy Policy",sms:"I consent to receive marketing communication via SMS.",emailmarketing:"I consent to receive marketing communication via Email."},ro:{termsandconditions1:"I accept the ",termsandconditions2:", I have read and understood the ",termsandconditions3:" as published on this site and confirm that I am over 18 years old.",tc:"Terms and Conditions",privacy:"Privacy Policy",sms:"I consent to receive marketing communication via SMS.",emailmarketing:"I consent to receive marketing communication via Email."},hr:{termsandconditions1:"I accept the ",termsandconditions2:", I have read and understood the ",termsandconditions3:" as published on this site and confirm that I am over 18 years old.",tc:"Terms and Conditions",privacy:"Privacy Policy",sms:"I consent to receive marketing communication via SMS.",emailmarketing:"I consent to receive marketing communication via Email."},fr:{termsandconditions1:"I accept the ",termsandconditions2:", I have read and understood the ",termsandconditions3:" as published on this site and confirm that I am over 18 years old.",tc:"Terms and Conditions",privacy:"Privacy Policy",sms:"I consent to receive marketing communication via SMS.",emailmarketing:"I consent to receive marketing communication via Email."},cs:{termsandconditions1:"I accept the ",termsandconditions2:", I have read and understood the ",termsandconditions3:" as published on this site and confirm that I am over 18 years old.",tc:"Terms and Conditions",privacy:"Privacy Policy",sms:"I consent to receive marketing communication via SMS.",emailmarketing:"I consent to receive marketing communication via Email."},de:{termsandconditions1:"I accept the ",termsandconditions2:", I have read and understood the ",termsandconditions3:" as published on this site and confirm that I am over 18 years old.",tc:"Terms and Conditions",privacy:"Privacy Policy",sms:"I consent to receive marketing communication via SMS.",emailmarketing:"I consent to receive marketing communication via Email."}},s=t=>new Promise((n=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((n=>{for(let i in t[n])e[n][i]=t[n][i]})),n(!0)}))})),o=(t,n,i)=>{let s=e[void 0!==n?n:"en"][t];if(void 0!==i)for(const[t,n]of Object.entries(i.values)){const i=new RegExp(`{${t}}`,"g");s=s.replace(i,n)}return s},a=class{constructor(i){t(this,i),this.userLegislationConsent=n(this,"userLegislationConsent",7),this.lang="en",this.queried=!1,this.consentType="",this.mandatory=!1,this.consentTitle="",this.clientStyling="",this.translationUrl="",this.textContent="",this.limitStylingAppends=!1,this.goToTermsAndConditions=()=>window.postMessage({type:"GoToTermsAndConditions"}),this.goToPrivacyPolicy=()=>window.postMessage({type:"GoToPrivacyPolicy"}),this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}handleNewTranslations(){s(this.translationUrl)}async componentWillLoad(){this.translationUrl.length>2&&await s(this.translationUrl)}userLegislationConsentHandler(){this.userLegislationConsent.emit({type:this.consentType,value:this.checkboxInput.checked})}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}determineTextContent(){return"termsandconditions"===this.consentType?i("p",null,o("termsandconditions1",this.lang),i("span",{class:"ConsentLink",onClick:this.goToTermsAndConditions},o("tc",this.lang)),o("termsandconditions2",this.lang),i("span",{class:"ConsentLink",onClick:this.goToPrivacyPolicy},o("privacy",this.lang)),o("termsandconditions3",this.lang)):i("p",null,o("consentType",this.lang))}render(){return this.queried&&this.userLegislationConsentHandler(),i("div",{ref:t=>this.stylingContainer=t},i("p",{class:"ConsentTitle"},this.consentTitle),i("label",{class:"UserConsent",htmlFor:"userConsent"},i("input",{ref:t=>this.checkboxInput=t,id:"userConsent",type:"checkbox",onInput:()=>this.userLegislationConsentHandler()}),this.determineTextContent(),this.mandatory&&i("span",{class:"MandatoryItem"},"*")))}static get watchers(){return{translationUrl:["handleNewTranslations"]}}};a.style=":host{display:block}.ConsentTitle{margin-bottom:0.2rem;font-weight:600}.UserConsent:hover{cursor:pointer}.UserConsent{display:flex;align-items:baseline}.MandatoryItem{color:#f00;font-size:1.2rem}.ConsentLink{text-decoration:underline;color:var(--emfe-w-color-primary);font-weight:bold}";export{a as player_user_consents}