@everymatrix/general-footer-template 1.27.10 → 1.27.11
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/cjs/general-footer-template.cjs.entry.js +7 -6
- package/dist/collection/utils/utils.js +7 -6
- package/dist/components/general-footer-template.js +7 -6
- package/dist/esm/general-footer-template.entry.js +7 -6
- package/dist/general-footer-template/general-footer-template.esm.js +1 -1
- package/dist/general-footer-template/p-c98ba922.entry.js +1 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/general-footer-template/.stencil/packages/general-footer-template/stencil.config.d.ts +2 -0
- package/package.json +1 -1
- package/dist/general-footer-template/p-1a4f0325.entry.js +0 -1
- package/dist/types/Users/dragos.bodea/Documents/everymatrix-prjs/emfe-widgets/widgets-stencil/packages/general-footer-template/.stencil/packages/general-footer-template/stencil.config.d.ts +0 -2
|
@@ -190,14 +190,15 @@ const normalizeRepeaterContent = (data) => {
|
|
|
190
190
|
var _a, _b, _c;
|
|
191
191
|
if (propertyNamesMap[repeater[0]] && data[(_a = propertyNamesMap[repeater[0]]) === null || _a === void 0 ? void 0 : _a.repeaterName]) {
|
|
192
192
|
repeater[1].content = (_c = data[(_b = propertyNamesMap[repeater[0]]) === null || _b === void 0 ? void 0 : _b.repeaterName]) === null || _c === void 0 ? void 0 : _c.map(content => {
|
|
193
|
+
var _a, _b, _c, _d, _e, _f;
|
|
193
194
|
return {
|
|
194
195
|
// all properties have a null fallback - avoid undefined propagation
|
|
195
|
-
isExternalLink: content[propertyNamesMap[repeater[0]].isExternalLink]
|
|
196
|
-
linkCategory: content[propertyNamesMap[repeater[0]].linkCategory]
|
|
197
|
-
image: content[propertyNamesMap[repeater[0]].image]
|
|
198
|
-
title: content[propertyNamesMap[repeater[0]].title]
|
|
199
|
-
url: content[propertyNamesMap[repeater[0]].url]
|
|
200
|
-
target: content[propertyNamesMap[repeater[0]].target]
|
|
196
|
+
isExternalLink: (_a = content[propertyNamesMap[repeater[0]].isExternalLink]) !== null && _a !== void 0 ? _a : null,
|
|
197
|
+
linkCategory: (_b = content[propertyNamesMap[repeater[0]].linkCategory]) !== null && _b !== void 0 ? _b : null,
|
|
198
|
+
image: (_c = content[propertyNamesMap[repeater[0]].image]) !== null && _c !== void 0 ? _c : null,
|
|
199
|
+
title: (_d = content[propertyNamesMap[repeater[0]].title]) !== null && _d !== void 0 ? _d : null,
|
|
200
|
+
url: (_e = content[propertyNamesMap[repeater[0]].url]) !== null && _e !== void 0 ? _e : null,
|
|
201
|
+
target: (_f = content[propertyNamesMap[repeater[0]].target]) !== null && _f !== void 0 ? _f : null,
|
|
201
202
|
};
|
|
202
203
|
});
|
|
203
204
|
}
|
|
@@ -191,14 +191,15 @@ export const normalizeRepeaterContent = (data) => {
|
|
|
191
191
|
var _a, _b, _c;
|
|
192
192
|
if (propertyNamesMap[repeater[0]] && data[(_a = propertyNamesMap[repeater[0]]) === null || _a === void 0 ? void 0 : _a.repeaterName]) {
|
|
193
193
|
repeater[1].content = (_c = data[(_b = propertyNamesMap[repeater[0]]) === null || _b === void 0 ? void 0 : _b.repeaterName]) === null || _c === void 0 ? void 0 : _c.map(content => {
|
|
194
|
+
var _a, _b, _c, _d, _e, _f;
|
|
194
195
|
return {
|
|
195
196
|
// all properties have a null fallback - avoid undefined propagation
|
|
196
|
-
isExternalLink: content[propertyNamesMap[repeater[0]].isExternalLink]
|
|
197
|
-
linkCategory: content[propertyNamesMap[repeater[0]].linkCategory]
|
|
198
|
-
image: content[propertyNamesMap[repeater[0]].image]
|
|
199
|
-
title: content[propertyNamesMap[repeater[0]].title]
|
|
200
|
-
url: content[propertyNamesMap[repeater[0]].url]
|
|
201
|
-
target: content[propertyNamesMap[repeater[0]].target]
|
|
197
|
+
isExternalLink: (_a = content[propertyNamesMap[repeater[0]].isExternalLink]) !== null && _a !== void 0 ? _a : null,
|
|
198
|
+
linkCategory: (_b = content[propertyNamesMap[repeater[0]].linkCategory]) !== null && _b !== void 0 ? _b : null,
|
|
199
|
+
image: (_c = content[propertyNamesMap[repeater[0]].image]) !== null && _c !== void 0 ? _c : null,
|
|
200
|
+
title: (_d = content[propertyNamesMap[repeater[0]].title]) !== null && _d !== void 0 ? _d : null,
|
|
201
|
+
url: (_e = content[propertyNamesMap[repeater[0]].url]) !== null && _e !== void 0 ? _e : null,
|
|
202
|
+
target: (_f = content[propertyNamesMap[repeater[0]].target]) !== null && _f !== void 0 ? _f : null,
|
|
202
203
|
};
|
|
203
204
|
});
|
|
204
205
|
}
|
|
@@ -186,14 +186,15 @@ const normalizeRepeaterContent = (data) => {
|
|
|
186
186
|
var _a, _b, _c;
|
|
187
187
|
if (propertyNamesMap[repeater[0]] && data[(_a = propertyNamesMap[repeater[0]]) === null || _a === void 0 ? void 0 : _a.repeaterName]) {
|
|
188
188
|
repeater[1].content = (_c = data[(_b = propertyNamesMap[repeater[0]]) === null || _b === void 0 ? void 0 : _b.repeaterName]) === null || _c === void 0 ? void 0 : _c.map(content => {
|
|
189
|
+
var _a, _b, _c, _d, _e, _f;
|
|
189
190
|
return {
|
|
190
191
|
// all properties have a null fallback - avoid undefined propagation
|
|
191
|
-
isExternalLink: content[propertyNamesMap[repeater[0]].isExternalLink]
|
|
192
|
-
linkCategory: content[propertyNamesMap[repeater[0]].linkCategory]
|
|
193
|
-
image: content[propertyNamesMap[repeater[0]].image]
|
|
194
|
-
title: content[propertyNamesMap[repeater[0]].title]
|
|
195
|
-
url: content[propertyNamesMap[repeater[0]].url]
|
|
196
|
-
target: content[propertyNamesMap[repeater[0]].target]
|
|
192
|
+
isExternalLink: (_a = content[propertyNamesMap[repeater[0]].isExternalLink]) !== null && _a !== void 0 ? _a : null,
|
|
193
|
+
linkCategory: (_b = content[propertyNamesMap[repeater[0]].linkCategory]) !== null && _b !== void 0 ? _b : null,
|
|
194
|
+
image: (_c = content[propertyNamesMap[repeater[0]].image]) !== null && _c !== void 0 ? _c : null,
|
|
195
|
+
title: (_d = content[propertyNamesMap[repeater[0]].title]) !== null && _d !== void 0 ? _d : null,
|
|
196
|
+
url: (_e = content[propertyNamesMap[repeater[0]].url]) !== null && _e !== void 0 ? _e : null,
|
|
197
|
+
target: (_f = content[propertyNamesMap[repeater[0]].target]) !== null && _f !== void 0 ? _f : null,
|
|
197
198
|
};
|
|
198
199
|
});
|
|
199
200
|
}
|
|
@@ -186,14 +186,15 @@ const normalizeRepeaterContent = (data) => {
|
|
|
186
186
|
var _a, _b, _c;
|
|
187
187
|
if (propertyNamesMap[repeater[0]] && data[(_a = propertyNamesMap[repeater[0]]) === null || _a === void 0 ? void 0 : _a.repeaterName]) {
|
|
188
188
|
repeater[1].content = (_c = data[(_b = propertyNamesMap[repeater[0]]) === null || _b === void 0 ? void 0 : _b.repeaterName]) === null || _c === void 0 ? void 0 : _c.map(content => {
|
|
189
|
+
var _a, _b, _c, _d, _e, _f;
|
|
189
190
|
return {
|
|
190
191
|
// all properties have a null fallback - avoid undefined propagation
|
|
191
|
-
isExternalLink: content[propertyNamesMap[repeater[0]].isExternalLink]
|
|
192
|
-
linkCategory: content[propertyNamesMap[repeater[0]].linkCategory]
|
|
193
|
-
image: content[propertyNamesMap[repeater[0]].image]
|
|
194
|
-
title: content[propertyNamesMap[repeater[0]].title]
|
|
195
|
-
url: content[propertyNamesMap[repeater[0]].url]
|
|
196
|
-
target: content[propertyNamesMap[repeater[0]].target]
|
|
192
|
+
isExternalLink: (_a = content[propertyNamesMap[repeater[0]].isExternalLink]) !== null && _a !== void 0 ? _a : null,
|
|
193
|
+
linkCategory: (_b = content[propertyNamesMap[repeater[0]].linkCategory]) !== null && _b !== void 0 ? _b : null,
|
|
194
|
+
image: (_c = content[propertyNamesMap[repeater[0]].image]) !== null && _c !== void 0 ? _c : null,
|
|
195
|
+
title: (_d = content[propertyNamesMap[repeater[0]].title]) !== null && _d !== void 0 ? _d : null,
|
|
196
|
+
url: (_e = content[propertyNamesMap[repeater[0]].url]) !== null && _e !== void 0 ? _e : null,
|
|
197
|
+
target: (_f = content[propertyNamesMap[repeater[0]].target]) !== null && _f !== void 0 ? _f : null,
|
|
197
198
|
};
|
|
198
199
|
});
|
|
199
200
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as t}from"./p-f38f30ba.js";(()=>{const t=import.meta.url,n={};return""!==t&&(n.resourcesUrl=new URL(".",t).href),e(n)})().then((e=>t([["p-7f87f2a4",[[2,"custom-content-section",{customContent:[1,"custom-content"],repeaterContent:[8,"repeater-content"],navigateViaEvent:[516,"navigate-via-event"],postMessageEvent:[513,"post-message-event"]}]]],["p-
|
|
1
|
+
import{p as e,b as t}from"./p-f38f30ba.js";(()=>{const t=import.meta.url,n={};return""!==t&&(n.resourcesUrl=new URL(".",t).href),e(n)})().then((e=>t([["p-7f87f2a4",[[2,"custom-content-section",{customContent:[1,"custom-content"],repeaterContent:[8,"repeater-content"],navigateViaEvent:[516,"navigate-via-event"],postMessageEvent:[513,"post-message-event"]}]]],["p-c98ba922",[[1,"general-footer-template",{language:[513],sections:[513],endpoint:[513],env:[513],userRoles:[513,"user-roles"],userid:[513],session:[513],baseUrl:[513,"base-url"],navigateViaEvent:[513,"navigate-via-event"],postMessageEvent:[513,"post-message-event"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],limitStylingAppends:[32],hasErrors:[32]}]]],["p-a1bb80ad",[[0,"link-section-list",{repeaterContent:[8,"repeater-content"],baseUrl:[513,"base-url"],language:[513],navigateViaEvent:[4,"navigate-via-event"],postMessageEvent:[513,"post-message-event"]}]]],["p-7a9d540d",[[2,"image-list",{repeaterContent:[8,"repeater-content"],navigateViaEvent:[4,"navigate-via-event"],postMessageEvent:[513,"post-message-event"]}]]]],e)));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as n,h as e,g as t}from"./p-f38f30ba.js";const o={downloadApp:{component:"custom-content-section"},"link-section":{component:"link-section-list"},copyright:{component:"custom-content-section"},download:{component:"custom-content-section"},helpLinks:{component:"image-list"},"license-description":{component:"custom-content-section"},licenses:{component:"image-list"},payment:{component:"image-list"},social:{component:"image-list"},sponsors:{component:"image-list"},vendors:{component:"image-list"}},i=class{constructor(e){n(this,e),this.env="stage",this.userRoles="everyone",this.navigateViaEvent="false",this.postMessageEvent="NavigateTo",this.clientStyling="",this.clientStylingUrl="",this.limitStylingAppends=!1,this.hasErrors=!1,this.platform=(()=>{const n=(()=>{let n=window.navigator.userAgent;return n.toLowerCase().match(/android/i)?"Android":n.toLowerCase().match(/iphone/i)?"iPhone":n.toLowerCase().match(/ipad|ipod/i)?"iPad":"PC"})();if(n)return"PC"===n?"dk":"iPad"===n||"iPhone"===n?"ios":"mtWeb"})(),this.MANDATORY_FIELDS=["endpoint","language","sections"],this.setClientStyling=()=>{let n=document.createElement("style");n.innerHTML=this.clientStyling,this.host.shadowRoot.prepend(n)},this.setClientStylingURL=()=>{let n=new URL(this.clientStylingUrl),e=document.createElement("style");fetch(n.href).then((n=>n.text())).then((n=>{this.clientStylingUrl=n,e.innerHTML=n,setTimeout((()=>{this.host.shadowRoot.prepend(e)}),1)})).catch((n=>{console.log("error ",n)}))}}validateMandatoryFields(){this.MANDATORY_FIELDS.forEach((n=>{this[n]||(console.error(`Mandatory parameter ${n} not received`),this.hasErrors=!0)}))}componentWillLoad(){this.sectionsList=this.sections.split(",").map((n=>n.trim()));const n=new URL(`${this.endpoint}/${this.language}/footer-raw-data`);return n.searchParams.append("env",this.env),n.searchParams.append("device",this.platform),n.searchParams.append("userroles",this.userRoles),this.validateMandatoryFields(),fetch(n.href).then((n=>n.json())).then((n=>{this.footerContent=(n=>{const e={repeaters:{vendors:{categoryTitle:n.gameVendorsLinksTitle,content:[]},"link-section":{categoryTitle:n.helpLinksTitle,content:[]},helpLinks:{categoryTitle:n.helpLinksTitle,content:[]},licenses:{categoryTitle:n.licensesLinksTitle,content:[]},sponsors:{categoryTitle:n.sponsorsLinksTitle,content:[]},payment:{categoryTitle:n.paymentLinksTitle,content:[]},social:{categoryTitle:n.socialLinksTitle,content:[]},downloadApp:{categoryTitle:n.downloadAppLinksTitle,content:[]}},wysiwyg:{copyright:{categoryTitle:"test",content:"test"},download:{categoryTitle:"test",content:"test"},downloadApp:{categoryTitle:"test",content:"test"},"license-description":{categoryTitle:"test",content:"test"}}},t={helpLinks:{repeaterName:"helpLinksRepeater",isExternalLink:"helpLinkType",image:"helpLinkImage",title:"helpLinkTitle",url:"helpLinkUrl",target:"target"},"link-section":{repeaterName:"helpLinksRepeater",isExternalLink:"helpLinkType",linkCategory:"helpLinkCategory",image:"helpLinkImage",title:"helpLinkTitle",url:"helpLinkUrl",target:"target"},social:{repeaterName:"socialLinksRepeater",isExternalLink:"isExternalLink",image:"socialLinkImage",title:"socialLinkTitle",url:"socialLinkUrl",target:"target"},vendors:{repeaterName:"gameVendorsRepeater",isExternalLink:"isExternalLink",image:"gameVendorImage",title:"gameVendorTitle",url:"gameVendorUrl",target:"target"},licenses:{repeaterName:"licensesRepeater",isExternalLink:"isExternalLink",image:"licenseImage",title:"licenseTitle",url:"licenseUrl",target:"target"},payment:{repeaterName:"paymentMethodsRepeater",isExternalLink:"isExternalLink",image:"paymentMethodImage",title:"paymentTitle",url:"paymentUrl",target:"target"},sponsors:{repeaterName:"sponsorsRepeater",isExternalLink:"isExternalLink",image:"sponsorImage",title:"sponsorTitle",url:"sponsorUrl",target:"target"}};return Object.entries(e.repeaters).forEach((e=>{var o,i,r;t[e[0]]&&n[null===(o=t[e[0]])||void 0===o?void 0:o.repeaterName]&&(e[1].content=null===(r=n[null===(i=t[e[0]])||void 0===i?void 0:i.repeaterName])||void 0===r?void 0:r.map((n=>{var o,i,r,a,s,l;return{isExternalLink:null!==(o=n[t[e[0]].isExternalLink])&&void 0!==o?o:null,linkCategory:null!==(i=n[t[e[0]].linkCategory])&&void 0!==i?i:null,image:null!==(r=n[t[e[0]].image])&&void 0!==r?r:null,title:null!==(a=n[t[e[0]].title])&&void 0!==a?a:null,url:null!==(s=n[t[e[0]].url])&&void 0!==s?s:null,target:null!==(l=n[t[e[0]].target])&&void 0!==l?l:null}})))})),e.repeaters.downloadApp.content=n.downloadInfos.imageArea,e.wysiwyg.downloadApp.content=n.downloadInfos.downloadDescription,e.wysiwyg.copyright.content=n.copyright,e.wysiwyg["license-description"].content=n.licenseDesc,e})(n)}))}componentDidRender(){!this.limitStylingAppends&&this.host.shadowRoot&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){const n=this.sectionsList.map(((n,t)=>{const i=o[n].component,r=this.footerContent.repeaters.hasOwnProperty(n),a=this.footerContent.wysiwyg.hasOwnProperty(n);return e(i,{class:`${n} FooterSectionContainer FooterSectionContainer${t+1}`,userid:this.userid,session:this.session,"base-url":this.baseUrl,language:this.language,"navigate-via-event":this.navigateViaEvent,"post-message-event":this.postMessageEvent,ruleset:o[n],repeaterContent:r?this.footerContent.repeaters[n]:null,customContent:a?this.footerContent.wysiwyg[n].content:null})}));return this.hasErrors?e("div",null,"There was an error while bootstraping the widget"):e("footer",{class:"FooterContainer"},e("div",{class:"FooterGrid customStyle"},n))}get host(){return t(this)}};i.style=':host {\n display: block;\n}\n\n/* $-background-primary: #14202d; */\n\n* {\n font-family: sans-serif;\n}\n\nhtml,\nbody {\n margin: 0;\n padding: 0;\n font-family: inherit;\n}\n\n.FooterSectionContainer {\n color: #fff;\n padding: 12px;\n}\n\n/* // FOOTER CONTAINER - only serves to be read as a container */\n.FooterContainer {\n container-type: inline-size;\n container-name: footerContainer;\n}\n\n\n.FooterGrid {\n background-color: #14202D;\n display: grid;\n padding: 8px 24px 0 24px;\n grid-template-rows: repeat(9, auto);\n grid-template-areas: "one"\n "two"\n "three"\n "four"\n "five"\n "six"\n "seven";\n}\n\n \n\n.FooterSectionContainer1 {\n position: relative;\n grid-area: one;\n \n}\n.FooterSectionContainer2 {\n position: relative;\n grid-area: two;\n border-bottom: 1px solid rgba(254, 254, 254, 0.2);\n}\n.FooterSectionContainer3 {\n position: relative;\n grid-area: three;\n \n}\n.FooterSectionContainer4 {\n position: relative;\n grid-area: four;\n border-bottom: 1px solid rgba(254, 254, 254, 0.2);\n}\n.FooterSectionContainer5 {\n grid-area: five;\n /* border-bottom: 1px solid #444; */\n}\n.FooterSectionContainer6 {\n padding-top: 22px;\n grid-area: six;\n}\n.FooterSectionContainer7 {\n grid-area: seven;\n}\n\n/* // remove paddings */\n.FooterSectionContainer7 div{\n padding: 0;\n}\n\n.FooterSectionContainer3:after {\n position: absolute;\n content: "";\n left: 30%;\n bottom: -20px;\n height: 1px;\n width: 40%;\n background-color: #444;\n}\n\n\n\n/* // STYLES FOR TABLET / DESKTOP */\n@container (min-width: 750px) {\n .FooterGrid {\n background: $-background-primary;\n display: grid;\n grid-template-rows: repeat(5, auto);\n grid-template-columns: 2fr 1fr;\n grid-template-areas: "one two"\n "three four"\n "five five"\n "six six"\n "seven seven";\n }\n \n \n .FooterSectionContainer1 {\n grid-area: one;\n border-bottom: 1px solid rgba(254, 254, 254, 0.2);\n }\n .FooterSectionContainer2 {\n grid-area: two;\n\n }\n .FooterSectionContainer3 {\n grid-area: three;\n border-bottom: 1px solid rgba(254, 254, 254, 0.2);\n }\n .FooterSectionContainer4 {\n grid-area: four;\n }\n .FooterSectionContainer5 {\n grid-area: five;\n }\n .FooterSectionContainer6 {\n grid-area: six;\n padding: 0;\n }\n .FooterSectionContainer7 {\n grid-area: seven;\n padding: 0;\n }\n\n /* VERTICAL BARS */\n .FooterSectionContainer3:after {\n position: absolute;\n content: "";\n left: initial;\n bottom:initial;\n top: 30%;\n right: 20px;\n width: 1px;\n height: 40%;\n background-color: #444;\n }\n\n /* // remove paddings */\n .FooterSectionContainer5 .CustomContentSectionWrapper {\n padding: 0;\n }\n\n .FooterSectionContainer5 .CustomContentSectionWrapper div {\n display: flex;\n flex-direction: column;\n align-items: center;\n }\n\n .FooterSectionContainer5 .CustomContentSectionWrapper div p {\n margin: 5px;\n text-align: center;\n }\n\n .FooterSectionContainer6 .CustomContentSectionWrapper div p {\n text-align: center;\n }\n\n .FooterSectionContainer6 .ImageListWrapper {\n padding: 0;\n }\n\n .FooterSectionContainer6 .ImageListWrapper {\n padding: 0;\n /* padding-bottom: 22px; */\n /* font-size: 14px; */\n }\n\n .FooterSectionContainer7 .CustomContentSectionWrapper {\n padding: 0;\n padding-bottom: 22px;\n font-size: 14px;\n }\n}';export{i as general_footer_template}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as n,h as e,g as t}from"./p-f38f30ba.js";const o={downloadApp:{component:"custom-content-section"},"link-section":{component:"link-section-list"},copyright:{component:"custom-content-section"},download:{component:"custom-content-section"},helpLinks:{component:"image-list"},"license-description":{component:"custom-content-section"},licenses:{component:"image-list"},payment:{component:"image-list"},social:{component:"image-list"},sponsors:{component:"image-list"},vendors:{component:"image-list"}},i=class{constructor(e){n(this,e),this.env="stage",this.userRoles="everyone",this.navigateViaEvent="false",this.postMessageEvent="NavigateTo",this.clientStyling="",this.clientStylingUrl="",this.limitStylingAppends=!1,this.hasErrors=!1,this.platform=(()=>{const n=(()=>{let n=window.navigator.userAgent;return n.toLowerCase().match(/android/i)?"Android":n.toLowerCase().match(/iphone/i)?"iPhone":n.toLowerCase().match(/ipad|ipod/i)?"iPad":"PC"})();if(n)return"PC"===n?"dk":"iPad"===n||"iPhone"===n?"ios":"mtWeb"})(),this.MANDATORY_FIELDS=["endpoint","language","sections"],this.setClientStyling=()=>{let n=document.createElement("style");n.innerHTML=this.clientStyling,this.host.shadowRoot.prepend(n)},this.setClientStylingURL=()=>{let n=new URL(this.clientStylingUrl),e=document.createElement("style");fetch(n.href).then((n=>n.text())).then((n=>{this.clientStylingUrl=n,e.innerHTML=n,setTimeout((()=>{this.host.shadowRoot.prepend(e)}),1)})).catch((n=>{console.log("error ",n)}))}}validateMandatoryFields(){this.MANDATORY_FIELDS.forEach((n=>{this[n]||(console.error(`Mandatory parameter ${n} not received`),this.hasErrors=!0)}))}componentWillLoad(){this.sectionsList=this.sections.split(",").map((n=>n.trim()));const n=new URL(`${this.endpoint}/${this.language}/footer-raw-data`);return n.searchParams.append("env",this.env),n.searchParams.append("device",this.platform),n.searchParams.append("userroles",this.userRoles),this.validateMandatoryFields(),fetch(n.href).then((n=>n.json())).then((n=>{this.footerContent=(n=>{const e={repeaters:{vendors:{categoryTitle:n.gameVendorsLinksTitle,content:[]},"link-section":{categoryTitle:n.helpLinksTitle,content:[]},helpLinks:{categoryTitle:n.helpLinksTitle,content:[]},licenses:{categoryTitle:n.licensesLinksTitle,content:[]},sponsors:{categoryTitle:n.sponsorsLinksTitle,content:[]},payment:{categoryTitle:n.paymentLinksTitle,content:[]},social:{categoryTitle:n.socialLinksTitle,content:[]},downloadApp:{categoryTitle:n.downloadAppLinksTitle,content:[]}},wysiwyg:{copyright:{categoryTitle:"test",content:"test"},download:{categoryTitle:"test",content:"test"},downloadApp:{categoryTitle:"test",content:"test"},"license-description":{categoryTitle:"test",content:"test"}}},t={helpLinks:{repeaterName:"helpLinksRepeater",isExternalLink:"helpLinkType",image:"helpLinkImage",title:"helpLinkTitle",url:"helpLinkUrl",target:"target"},"link-section":{repeaterName:"helpLinksRepeater",isExternalLink:"helpLinkType",linkCategory:"helpLinkCategory",image:"helpLinkImage",title:"helpLinkTitle",url:"helpLinkUrl",target:"target"},social:{repeaterName:"socialLinksRepeater",isExternalLink:"isExternalLink",image:"socialLinkImage",title:"socialLinkTitle",url:"socialLinkUrl",target:"target"},vendors:{repeaterName:"gameVendorsRepeater",isExternalLink:"isExternalLink",image:"gameVendorImage",title:"gameVendorTitle",url:"gameVendorUrl",target:"target"},licenses:{repeaterName:"licensesRepeater",isExternalLink:"isExternalLink",image:"licenseImage",title:"licenseTitle",url:"licenseUrl",target:"target"},payment:{repeaterName:"paymentMethodsRepeater",isExternalLink:"isExternalLink",image:"paymentMethodImage",title:"paymentTitle",url:"paymentUrl",target:"target"},sponsors:{repeaterName:"sponsorsRepeater",isExternalLink:"isExternalLink",image:"sponsorImage",title:"sponsorTitle",url:"sponsorUrl",target:"target"}};return Object.entries(e.repeaters).forEach((e=>{var o,i,r;t[e[0]]&&n[null===(o=t[e[0]])||void 0===o?void 0:o.repeaterName]&&(e[1].content=null===(r=n[null===(i=t[e[0]])||void 0===i?void 0:i.repeaterName])||void 0===r?void 0:r.map((n=>({isExternalLink:n[t[e[0]].isExternalLink]||null,linkCategory:n[t[e[0]].linkCategory]||null,image:n[t[e[0]].image]||null,title:n[t[e[0]].title]||null,url:n[t[e[0]].url]||null,target:n[t[e[0]].target]||null}))))})),e.repeaters.downloadApp.content=n.downloadInfos.imageArea,e.wysiwyg.downloadApp.content=n.downloadInfos.downloadDescription,e.wysiwyg.copyright.content=n.copyright,e.wysiwyg["license-description"].content=n.licenseDesc,e})(n)}))}componentDidRender(){!this.limitStylingAppends&&this.host.shadowRoot&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){const n=this.sectionsList.map(((n,t)=>{const i=o[n].component,r=this.footerContent.repeaters.hasOwnProperty(n),a=this.footerContent.wysiwyg.hasOwnProperty(n);return e(i,{class:`${n} FooterSectionContainer FooterSectionContainer${t+1}`,userid:this.userid,session:this.session,"base-url":this.baseUrl,language:this.language,"navigate-via-event":this.navigateViaEvent,"post-message-event":this.postMessageEvent,ruleset:o[n],repeaterContent:r?this.footerContent.repeaters[n]:null,customContent:a?this.footerContent.wysiwyg[n].content:null})}));return this.hasErrors?e("div",null,"There was an error while bootstraping the widget"):e("footer",{class:"FooterContainer"},e("div",{class:"FooterGrid customStyle"},n))}get host(){return t(this)}};i.style=':host {\n display: block;\n}\n\n/* $-background-primary: #14202d; */\n\n* {\n font-family: sans-serif;\n}\n\nhtml,\nbody {\n margin: 0;\n padding: 0;\n font-family: inherit;\n}\n\n.FooterSectionContainer {\n color: #fff;\n padding: 12px;\n}\n\n/* // FOOTER CONTAINER - only serves to be read as a container */\n.FooterContainer {\n container-type: inline-size;\n container-name: footerContainer;\n}\n\n\n.FooterGrid {\n background-color: #14202D;\n display: grid;\n padding: 8px 24px 0 24px;\n grid-template-rows: repeat(9, auto);\n grid-template-areas: "one"\n "two"\n "three"\n "four"\n "five"\n "six"\n "seven";\n}\n\n \n\n.FooterSectionContainer1 {\n position: relative;\n grid-area: one;\n \n}\n.FooterSectionContainer2 {\n position: relative;\n grid-area: two;\n border-bottom: 1px solid rgba(254, 254, 254, 0.2);\n}\n.FooterSectionContainer3 {\n position: relative;\n grid-area: three;\n \n}\n.FooterSectionContainer4 {\n position: relative;\n grid-area: four;\n border-bottom: 1px solid rgba(254, 254, 254, 0.2);\n}\n.FooterSectionContainer5 {\n grid-area: five;\n /* border-bottom: 1px solid #444; */\n}\n.FooterSectionContainer6 {\n padding-top: 22px;\n grid-area: six;\n}\n.FooterSectionContainer7 {\n grid-area: seven;\n}\n\n/* // remove paddings */\n.FooterSectionContainer7 div{\n padding: 0;\n}\n\n.FooterSectionContainer3:after {\n position: absolute;\n content: "";\n left: 30%;\n bottom: -20px;\n height: 1px;\n width: 40%;\n background-color: #444;\n}\n\n\n\n/* // STYLES FOR TABLET / DESKTOP */\n@container (min-width: 750px) {\n .FooterGrid {\n background: $-background-primary;\n display: grid;\n grid-template-rows: repeat(5, auto);\n grid-template-columns: 2fr 1fr;\n grid-template-areas: "one two"\n "three four"\n "five five"\n "six six"\n "seven seven";\n }\n \n \n .FooterSectionContainer1 {\n grid-area: one;\n border-bottom: 1px solid rgba(254, 254, 254, 0.2);\n }\n .FooterSectionContainer2 {\n grid-area: two;\n\n }\n .FooterSectionContainer3 {\n grid-area: three;\n border-bottom: 1px solid rgba(254, 254, 254, 0.2);\n }\n .FooterSectionContainer4 {\n grid-area: four;\n }\n .FooterSectionContainer5 {\n grid-area: five;\n }\n .FooterSectionContainer6 {\n grid-area: six;\n padding: 0;\n }\n .FooterSectionContainer7 {\n grid-area: seven;\n padding: 0;\n }\n\n /* VERTICAL BARS */\n .FooterSectionContainer3:after {\n position: absolute;\n content: "";\n left: initial;\n bottom:initial;\n top: 30%;\n right: 20px;\n width: 1px;\n height: 40%;\n background-color: #444;\n }\n\n /* // remove paddings */\n .FooterSectionContainer5 .CustomContentSectionWrapper {\n padding: 0;\n }\n\n .FooterSectionContainer5 .CustomContentSectionWrapper div {\n display: flex;\n flex-direction: column;\n align-items: center;\n }\n\n .FooterSectionContainer5 .CustomContentSectionWrapper div p {\n margin: 5px;\n text-align: center;\n }\n\n .FooterSectionContainer6 .CustomContentSectionWrapper div p {\n text-align: center;\n }\n\n .FooterSectionContainer6 .ImageListWrapper {\n padding: 0;\n }\n\n .FooterSectionContainer6 .ImageListWrapper {\n padding: 0;\n /* padding-bottom: 22px; */\n /* font-size: 14px; */\n }\n\n .FooterSectionContainer7 .CustomContentSectionWrapper {\n padding: 0;\n padding-bottom: 22px;\n font-size: 14px;\n }\n}';export{i as general_footer_template}
|