@everymatrix/general-preview-social-posts 1.43.4 → 1.45.0
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/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/general-preview-social-posts.cjs.entry.js +271 -312
- package/dist/cjs/general-preview-social-posts.cjs.js +17 -11
- package/dist/cjs/index-3a1dd540.js +1200 -0
- package/dist/cjs/loader.cjs.js +7 -13
- package/dist/collection/collection-manifest.json +3 -3
- package/dist/collection/components/general-preview-social-posts/general-preview-social-posts.css +4 -6
- package/dist/collection/components/general-preview-social-posts/general-preview-social-posts.js +516 -563
- package/dist/collection/components/general-preview-social-posts/index.js +1 -0
- package/dist/collection/utils/locale.utils.js +52 -52
- package/dist/collection/utils/utils.js +31 -31
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/general-preview-social-posts.entry.js +271 -312
- package/dist/esm/general-preview-social-posts.js +14 -11
- package/dist/esm/index-16f33f52.js +1173 -0
- package/dist/esm/loader.js +7 -13
- package/dist/general-preview-social-posts/general-preview-social-posts.esm.js +1 -1
- package/dist/general-preview-social-posts/p-1f296318.js +2 -0
- package/dist/general-preview-social-posts/{p-6826d836.entry.js → p-2080a6e8.entry.js} +1 -1
- package/dist/general-preview-social-posts/p-e1255160.js +1 -0
- package/dist/stencil.config.dev.js +17 -0
- package/dist/stencil.config.js +14 -19
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-preview-social-posts/.stencil/packages/stencil/general-preview-social-posts/stencil.config.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-preview-social-posts/.stencil/packages/stencil/general-preview-social-posts/stencil.config.dev.d.ts +2 -0
- package/dist/types/components/general-preview-social-posts/general-preview-social-posts.d.ts +80 -80
- package/dist/types/components/general-preview-social-posts/index.d.ts +1 -0
- package/dist/types/components.d.ts +20 -3
- package/dist/types/stencil-public-runtime.d.ts +142 -33
- package/loader/cdn.js +1 -3
- package/loader/index.cjs.js +1 -3
- package/loader/index.d.ts +13 -1
- package/loader/index.es2017.js +1 -3
- package/loader/index.js +1 -3
- package/loader/package.json +1 -0
- package/package.json +8 -1
- package/dist/cjs/index-e178764e.js +0 -1223
- package/dist/components/general-preview-social-posts.d.ts +0 -11
- package/dist/components/general-preview-social-posts.js +0 -392
- package/dist/components/index.d.ts +0 -26
- package/dist/components/index.js +0 -1
- package/dist/esm/index-8a671ab9.js +0 -1197
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/general-preview-social-posts/p-c682801c.js +0 -1
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/general-preview-social-posts/.stencil/packages/general-preview-social-posts/stencil.config.d.ts +0 -2
package/dist/esm/loader.js
CHANGED
|
@@ -1,17 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { b as bootstrapLazy } from './index-16f33f52.js';
|
|
2
|
+
export { s as setNonce } from './index-16f33f52.js';
|
|
3
|
+
import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
2
4
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
return promiseResolve();
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
const defineCustomElements = (win, options) => {
|
|
11
|
-
if (typeof window === 'undefined') return Promise.resolve();
|
|
12
|
-
return patchEsm().then(() => {
|
|
13
|
-
return bootstrapLazy([["general-preview-social-posts",[[1,"general-preview-social-posts",{"userId":[513,"user-id"],"session":[513],"postsTitle":[513,"posts-title"],"maxCards":[513,"max-cards"],"language":[513],"datasource":[513],"endpoint":[513],"cmsEndpoint":[513,"cms-endpoint"],"userRoles":[513,"user-roles"],"translationUrl":[513,"translation-url"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"cmsEnv":[513,"cms-env"],"pageName":[513,"page-name"],"posts":[32],"stylingAppends":[32],"isLoading":[32],"isLoggedIn":[32],"dataImages":[32],"gameIds":[32]}]]]], options);
|
|
14
|
-
});
|
|
5
|
+
const defineCustomElements = async (win, options) => {
|
|
6
|
+
if (typeof window === 'undefined') return undefined;
|
|
7
|
+
await globalScripts();
|
|
8
|
+
return bootstrapLazy([["general-preview-social-posts",[[1,"general-preview-social-posts",{"userId":[513,"user-id"],"session":[513],"postsTitle":[513,"posts-title"],"maxCards":[513,"max-cards"],"language":[513],"datasource":[513],"endpoint":[513],"cmsEndpoint":[513,"cms-endpoint"],"userRoles":[513,"user-roles"],"translationUrl":[513,"translation-url"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"cmsEnv":[513,"cms-env"],"pageName":[513,"page-name"],"posts":[32],"stylingAppends":[32],"isLoading":[32],"isLoggedIn":[32],"dataImages":[32],"gameIds":[32]},null,{"translationUrl":["handleNewTranslations"],"session":["watchSession"]}]]]], options);
|
|
15
9
|
};
|
|
16
10
|
|
|
17
11
|
export { defineCustomElements };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as
|
|
1
|
+
import{p as e,b as n}from"./p-1f296318.js";export{s as setNonce}from"./p-1f296318.js";import{g as a}from"./p-e1255160.js";(()=>{const s=import.meta.url,n={};return""!==s&&(n.resourcesUrl=new URL(".",s).href),e(n)})().then((async s=>(await a(),n([["p-2080a6e8",[[1,"general-preview-social-posts",{userId:[513,"user-id"],session:[513],postsTitle:[513,"posts-title"],maxCards:[513,"max-cards"],language:[513],datasource:[513],endpoint:[513],cmsEndpoint:[513,"cms-endpoint"],userRoles:[513,"user-roles"],translationUrl:[513,"translation-url"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],cmsEnv:[513,"cms-env"],pageName:[513,"page-name"],posts:[32],stylingAppends:[32],isLoading:[32],isLoggedIn:[32],dataImages:[32],gameIds:[32]},null,{translationUrl:["handleNewTranslations"],session:["watchSession"]}]]]],s))));
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var e=Object.defineProperty,t=new WeakMap,n=e=>t.get(e),o=(e,n)=>t.set(n.t=e,n),l=(e,t)=>t in e,r=(e,t)=>(0,console.error)(e,t),s=new Map,i=new Map,c="slot-fb{display:contents}slot-fb[hidden]{display:none}",u="undefined"!=typeof window?window:{},a=u.document||{head:{}},f={o:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,o)=>e.addEventListener(t,n,o),rel:(e,t,n,o)=>e.removeEventListener(t,n,o),ce:(e,t)=>new CustomEvent(e,t)},h=e=>Promise.resolve(e),p=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),d=!1,m=[],y=[],$=(e,t)=>n=>{e.push(n),d||(d=!0,t&&4&f.o?v(w):f.raf(w))},b=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){r(e)}e.length=0},w=()=>{b(m),b(y),(d=m.length>0)&&f.raf(w)},v=e=>h().then(e),g=$(y,!0),S={},j=e=>"object"==(e=typeof e)||"function"===e;function k(e){var t,n,o;return null!=(o=null==(n=null==(t=e.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}((t,n)=>{for(var o in n)e(t,o,{get:n[o],enumerable:!0})})({},{err:()=>O,map:()=>C,ok:()=>E,unwrap:()=>x,unwrapErr:()=>P});var E=e=>({isOk:!0,isErr:!1,value:e}),O=e=>({isOk:!1,isErr:!0,value:e});function C(e,t){if(e.isOk){const n=t(e.value);return n instanceof Promise?n.then((e=>E(e))):E(n)}if(e.isErr)return O(e.value);throw"should never get here"}var M,x=e=>{if(e.isOk)return e.value;throw e.value},P=e=>{if(e.isErr)return e.value;throw e.value},R=(e,t,...n)=>{let o=null,l=!1,r=!1;const s=[],i=t=>{for(let n=0;n<t.length;n++)o=t[n],Array.isArray(o)?i(o):null!=o&&"boolean"!=typeof o&&((l="function"!=typeof e&&!j(o))&&(o+=""),l&&r?s[s.length-1].i+=o:s.push(l?A(null,o):o),r=l)};if(i(n),t){const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}const c=A(e,null);return c.u=t,s.length>0&&(c.h=s),c},A=(e,t)=>({o:0,p:e,i:t,m:null,h:null,u:null}),D={},L=(e,t,o)=>{const l=(e=>n(e).$hostElement$)(e);return{emit:e=>T(l,t,{bubbles:!!(4&o),composed:!!(2&o),cancelable:!!(1&o),detail:e})}},T=(e,t,n)=>{const o=f.ce(t,n);return e.dispatchEvent(o),o},H=new WeakMap,N=e=>"sc-"+e.$,U=(e,t,n,o,r,s)=>{if(n!==o){let i=l(e,t),c=t.toLowerCase();if("class"===t){const t=e.classList,l=F(n),r=F(o);t.remove(...l.filter((e=>e&&!r.includes(e)))),t.add(...r.filter((e=>e&&!l.includes(e))))}else if("ref"===t)o&&o(e);else if(i||"o"!==t[0]||"n"!==t[1]){const l=j(o);if((i||l&&null!==o)&&!r)try{if(e.tagName.includes("-"))e[t]=o;else{const l=null==o?"":o;"list"===t?i=!1:null!=n&&e[t]==l||(e[t]=l)}}catch(e){}null==o||!1===o?!1===o&&""!==e.getAttribute(t)||e.removeAttribute(t):(!i||4&s||r)&&!l&&e.setAttribute(t,o=!0===o?"":o)}else if(t="-"===t[2]?t.slice(3):l(u,c)?c.slice(2):c[2]+t.slice(3),n||o){const l=t.endsWith(q);t=t.replace(G,""),n&&f.rel(e,t,n,l),o&&f.ael(e,t,o,l)}}},W=/\s/,F=e=>e?e.split(W):[],q="Capture",G=RegExp(q+"$"),V=(e,t,n)=>{const o=11===t.m.nodeType&&t.m.host?t.m.host:t.m,l=e&&e.u||S,r=t.u||S;for(const e of _(Object.keys(l)))e in r||U(o,e,l[e],void 0,n,t.o);for(const e of _(Object.keys(r)))U(o,e,l[e],r[e],n,t.o)};function _(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var z=!1,B=(e,t,n)=>{const o=t.h[n];let l,r,s=0;if(null!==o.i)l=o.m=a.createTextNode(o.i);else if(l=o.m=a.createElement(o.p),V(null,o,z),l.getRootNode().querySelector("body"),o.h)for(s=0;s<o.h.length;++s)r=B(e,o,s),r&&l.appendChild(r);return l["s-hn"]=M,l},I=(e,t,n,o,l,r)=>{let s,i=e;for(i.shadowRoot&&i.tagName===M&&(i=i.shadowRoot);l<=r;++l)o[l]&&(s=B(null,n,l),s&&(o[l].m=s,Y(i,s,t)))},J=(e,t,n)=>{for(let o=t;o<=n;++o){const t=e[o];if(t){const e=t.m;X(t),e&&e.remove()}}},K=(e,t)=>e.p===t.p,Q=(e,t,n=!1)=>{const o=t.m=e.m,l=e.h,r=t.h,s=t.i;null===s?(V(e,t,z),null!==l&&null!==r?((e,t,n,o,l=!1)=>{let r,s=0,i=0,c=t.length-1,u=t[0],a=t[c],f=o.length-1,h=o[0],p=o[f];for(;s<=c&&i<=f;)null==u?u=t[++s]:null==a?a=t[--c]:null==h?h=o[++i]:null==p?p=o[--f]:K(u,h)?(Q(u,h,l),u=t[++s],h=o[++i]):K(a,p)?(Q(a,p,l),a=t[--c],p=o[--f]):K(u,p)?(Q(u,p,l),Y(e,u.m,a.m.nextSibling),u=t[++s],p=o[--f]):K(a,h)?(Q(a,h,l),Y(e,a.m,u.m),a=t[--c],h=o[++i]):(r=B(t&&t[i],n,i),h=o[++i],r&&Y(u.m.parentNode,r,u.m));s>c?I(e,null==o[f+1]?null:o[f+1].m,n,o,i,f):i>f&&J(t,s,c)})(o,l,t,r,n):null!==r?(null!==e.i&&(o.textContent=""),I(o,null,t,r,0,r.length-1)):!n&&null!==l&&J(l,0,l.length-1)):e.i!==s&&(o.data=s)},X=e=>{e.u&&e.u.ref&&e.u.ref(null),e.h&&e.h.map(X)},Y=(e,t,n)=>null==e?void 0:e.insertBefore(t,n),Z=(e,t)=>{t&&!e.v&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.v=t)))},ee=(e,t)=>{if(e.o|=16,!(4&e.o))return Z(e,e.S),g((()=>te(e,t)));e.o|=512},te=(e,t)=>{const n=e.t;if(!n)throw Error(`Can't render component <${e.$hostElement$.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let o;return t&&(o=ce(n,"componentWillLoad")),ne(o,(()=>le(e,n,t)))},ne=(e,t)=>oe(e)?e.then(t).catch((e=>{console.error(e),t()})):t(),oe=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,le=async(e,t,n)=>{var o;const l=e.$hostElement$,r=l["s-rc"];n&&(e=>{const t=e.j,n=e.$hostElement$,o=t.o,l=((e,t)=>{var n;const o=N(t),l=i.get(o);if(e=11===e.nodeType?e:a,l)if("string"==typeof l){let r,s=H.get(e=e.head||e);if(s||H.set(e,s=new Set),!s.has(o)){{r=a.createElement("style"),r.innerHTML=l;const o=null!=(n=f.k)?n:k(a);null!=o&&r.setAttribute("nonce",o),(!(1&t.o)||1&t.o&&"HEAD"!==e.nodeName)&&e.insertBefore(r,e.querySelector("link"))}4&t.o&&(r.innerHTML+=c),s&&s.add(o)}}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return o})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&o&&2&o&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(e);re(e,t,l,n),r&&(r.map((e=>e())),l["s-rc"]=void 0);{const t=null!=(o=l["s-p"])?o:[],n=()=>se(e);0===t.length?n():(Promise.all(t).then(n),e.o|=4,t.length=0)}},re=(e,t,n,o)=>{try{t=t.render(),e.o&=-17,e.o|=2,((e,t,n=!1)=>{const o=e.$hostElement$,l=e.j,r=e.O||A(null,null),s=(e=>e&&e.p===D)(t)?t:R(null,null,t);if(M=o.tagName,l.C&&(s.u=s.u||{},l.C.map((([e,t])=>s.u[t]=o[e]))),n&&s.u)for(const e of Object.keys(s.u))o.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(s.u[e]=o[e]);s.p=null,s.o|=4,e.O=s,s.m=r.m=o.shadowRoot||o,Q(r,s,n)})(e,t,o)}catch(t){r(t,e.$hostElement$)}return null},se=e=>{const t=e.$hostElement$,n=e.t,o=e.S;ce(n,"componentDidRender"),64&e.o||(e.o|=64,ue(t),ce(n,"componentDidLoad"),e.M(t),o||ie()),e.v&&(e.v(),e.v=void 0),512&e.o&&v((()=>ee(e,!1))),e.o&=-517},ie=()=>{ue(a.documentElement),v((()=>T(u,"appload",{detail:{namespace:"general-preview-social-posts"}})))},ce=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){r(e)}},ue=e=>e.classList.add("hydrated"),ae=(e,t,o)=>{var l,s;const i=e.prototype;if(t.P||t.R||e.watchers){e.watchers&&!t.R&&(t.R=e.watchers);const c=Object.entries(null!=(l=t.P)?l:{});if(c.map((([e,[l]])=>{(31&l||2&o&&32&l)&&Object.defineProperty(i,e,{get(){return((e,t)=>n(this).A.get(t))(0,e)},set(o){((e,t,o,l)=>{const s=n(e);if(!s)throw Error(`Couldn't find host element for "${l.$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`);const i=s.$hostElement$,c=s.A.get(t),u=s.o,a=s.t;if(o=((e,t)=>null==e||j(e)?e:1&t?e+"":e)(o,l.P[t][0]),(!(8&u)||void 0===c)&&o!==c&&(!Number.isNaN(c)||!Number.isNaN(o))&&(s.A.set(t,o),a)){if(l.R&&128&u){const e=l.R[t];e&&e.map((e=>{try{a[e](o,c,t)}catch(e){r(e,i)}}))}2==(18&u)&&ee(s,!1)}})(this,e,o,t)},configurable:!0,enumerable:!0})})),1&o){const o=new Map;i.attributeChangedCallback=function(e,l,r){f.jmp((()=>{var s;const c=o.get(e);if(this.hasOwnProperty(c))r=this[c],delete this[c];else{if(i.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==r)return;if(null==c){const o=n(this),i=null==o?void 0:o.o;if(i&&!(8&i)&&128&i&&r!==l){const n=o.t,i=null==(s=t.R)?void 0:s[e];null==i||i.forEach((t=>{null!=n[t]&&n[t].call(n,r,l,e)}))}return}}this[c]=(null!==r||"boolean"!=typeof this[c])&&r}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=t.R)?s:{}),...c.filter((([e,t])=>15&t[0])).map((([e,n])=>{var l;const r=n[1]||e;return o.set(r,e),512&n[0]&&(null==(l=t.C)||l.push([e,r])),r}))]))}}return e},fe=e=>{ce(e,"connectedCallback")},he=(e,o={})=>{var l;const h=[],d=o.exclude||[],m=u.customElements,y=a.head,$=y.querySelector("meta[charset]"),b=a.createElement("style"),w=[];let v,g=!0;Object.assign(f,o),f.l=new URL(o.resourcesUrl||"./",a.baseURI).href;let S=!1;if(e.map((e=>{e[1].map((o=>{var l;const c={o:o[0],$:o[1],P:o[2],D:o[3]};4&c.o&&(S=!0),c.P=o[2],c.C=[],c.R=null!=(l=o[4])?l:{};const u=c.$,a=class extends HTMLElement{constructor(e){if(super(e),this.hasRegisteredEventListeners=!1,((e,n)=>{const o={o:0,$hostElement$:e,j:n,A:new Map};o.L=new Promise((e=>o.M=e)),e["s-p"]=[],e["s-rc"]=[],t.set(e,o)})(e=this,c),1&c.o)if(e.shadowRoot){if("open"!==e.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.$}! Mode is set to ${e.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else e.attachShadow({mode:"open"})}connectedCallback(){this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),v&&(clearTimeout(v),v=null),g?w.push(this):f.jmp((()=>(e=>{if(!(1&f.o)){const t=n(e),o=t.j,l=()=>{};if(1&t.o)(null==t?void 0:t.t)?fe(t.t):(null==t?void 0:t.L)&&t.L.then((()=>fe(t.t)));else{t.o|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){Z(t,t.S=n);break}}o.P&&Object.entries(o.P).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n)=>{let o;if(!(32&t.o)){if(t.o|=32,n.T){const e=(e=>{const t=e.$.replace(/-/g,"_"),n=e.T;if(!n)return;const o=s.get(n);return o?o[t]:import(`./${n}.entry.js`).then((e=>(s.set(n,e),e[t])),r)
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n);if(e&&"then"in e){const t=()=>{};o=await e,t()}else o=e;if(!o)throw Error(`Constructor for "${n.$}#${t.H}" was not found`);o.isProxied||(n.R=o.watchers,ae(o,n,2),o.isProxied=!0);const l=()=>{};t.o|=8;try{new o(t)}catch(e){r(e)}t.o&=-9,t.o|=128,l(),fe(t.t)}else o=e.constructor,customElements.whenDefined(e.localName).then((()=>t.o|=128));if(o&&o.style){let e;"string"==typeof o.style&&(e=o.style);const t=N(n);if(!i.has(t)){const o=()=>{};((e,t,n)=>{let o=i.get(e);p&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=t:o.replaceSync(t)):o=t,i.set(e,o)})(t,e,!!(1&n.o)),o()}}}const l=t.S,c=()=>ee(t,!0);l&&l["s-rc"]?l["s-rc"].push(c):c()})(e,t,o)}l()}})(this)))}disconnectedCallback(){f.jmp((()=>(async()=>{if(!(1&f.o)){const e=n(this);(null==e?void 0:e.t)||(null==e?void 0:e.L)&&e.L.then((()=>{}))}})()))}componentOnReady(){return n(this).L}};c.T=e[0],d.includes(u)||m.get(u)||(h.push(u),m.define(u,ae(a,c,1)))}))})),h.length>0&&(S&&(b.textContent+=c),b.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",b.innerHTML.length)){b.setAttribute("data-styles","");const e=null!=(l=f.k)?l:k(a);null!=e&&b.setAttribute("nonce",e),y.insertBefore(b,$?$.nextSibling:y.firstChild)}g=!1,w.length?w.map((e=>e.connectedCallback())):f.jmp((()=>v=setTimeout(ie,30)))},pe=e=>f.k=e;export{he as b,L as c,R as h,h as p,o as r,pe as s}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,c as t,h as n}from"./p-
|
|
1
|
+
import{r as i,c as t,h as n}from"./p-1f296318.js";let e={en:{loading:"loading...",viewAll:"View All ...",moreInfo:"MORE INFO",playNow:"PLAY NOW"},de:{loading:"loading...",viewAll:"View All ...",moreInfo:"MORE INFO",playNow:"PLAY NOW"},ro:{loading:"loading...",viewAll:"View All ...",moreInfo:"MORE INFO",playNow:"PLAY NOW"},fr:{loading:"loading...",viewAll:"View All ...",moreInfo:"MORE INFO",playNow:"PLAY NOW"},ar:{loading:"loading...",viewAll:"View All ...",moreInfo:"MORE INFO",playNow:"PLAY NOW"},hr:{loading:"Učitavanje…",viewAll:"Pogledaj sve …",moreInfo:"VIŠE INFORMACIJA",playNow:"IGRAJ SADA"}};const s=i=>new Promise((t=>{fetch(i).then((i=>i.json())).then((i=>{Object.keys(i).forEach((t=>{e[t]||(e[t]={});for(let n in i[t])e[t][n]=i[t][n]})),t(!0)}))})),o=(i,t)=>e[void 0!==t&&t in e?t:"en"][i],l=class{constructor(n){i(this,n),this.moreInfo=t(this,"moreInfo",7),this.playNow=t(this,"playNow",7),this.viewAll=t(this,"viewAll",7),this.platform=(()=>{const i=(()=>{let i=window.navigator.userAgent;return i.toLowerCase().match(/android/i)?"Android":i.toLocaleLowerCase().match(/customnative:ios/)?"nativeIOS":i.toLowerCase().match(/iphone/i)?"iPhone":i.toLowerCase().match(/ipad|ipod/i)?"iPad":"PC"})();if(i)return"PC"===i?"dk":"nativeIOS"==i?"ios":"mtWeb"})(),this.setClientStyling=()=>{let i=document.createElement("style");i.innerHTML=this.clientStyling,this.stylingContainer.prepend(i)},this.setClientStylingURL=()=>{let i=new URL(this.clientStylingUrl),t=document.createElement("style");fetch(i.href).then((i=>i.text())).then((i=>{t.innerHTML=i,setTimeout((()=>{this.stylingContainer.prepend(t)}),1)})).catch((i=>{console.log("error ",i)}))},this.userId="",this.session="",this.postsTitle="",this.maxCards="",this.language="en",this.datasource="",this.endpoint="",this.cmsEndpoint="",this.userRoles="",this.translationUrl="",this.clientStyling="",this.clientStylingUrl="",this.cmsEnv="stage",this.pageName="casino",this.posts=[],this.stylingAppends=!1,this.isLoading=!1,this.isLoggedIn=!1,this.dataImages=[],this.gameIds=""}handleNewTranslations(){this.isLoading=!0,s(this.translationUrl).then((()=>{this.isLoading=!1}))}async componentWillLoad(){this.translationUrl.length>2&&await s(this.translationUrl)}watchSession(i,t){i!==t&&(this.isLoggedIn=""!==i)}connectedCallback(){this.session&&(this.isLoggedIn=!0)}componentDidRender(){!this.stylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.stylingAppends=!0)}getDataImage(i){try{let t=new URL(`${this.endpoint}/v2/casino/groups/${this.datasource}`);t.searchParams.append("language",this.language),t.searchParams.append("expand","games"),t.searchParams.append("fields","games(id,thumbnail,launchUrl)"),t.searchParams.append("filter",i),t.searchParams.append("device",this.platform),fetch(t.href,{method:"GET","Content-Type":"application/json"}).then((i=>{if(200===i.status)return i.json();throw new Error("HTTP status "+i.status)})).then((i=>{i.items.forEach((i=>{i.games.items.forEach((i=>{let{id:t,launchUrl:n,thumbnail:e}=i;this.dataImages=[{id:t,launchUrl:n,thumbnail:e}];let s=this.posts.findIndex((i=>i.gameId===t));-1!==s&&(this.posts[s].images=this.dataImages)}))}))})).catch((i=>{console.error(i)}))}catch(i){console.error("Error fetching verification types:",i)}}async componentDidLoad(){try{let i=new URL(`${this.cmsEndpoint}/${this.language}/content/social-posts`);i.searchParams.append("device",this.platform),i.searchParams.append("page",this.pageName),i.searchParams.append("language",this.language),i.searchParams.append("userRoles",this.userRoles),i.searchParams.append("env",this.cmsEnv),fetch(i.href,{method:"GET","Content-Type":"application/json"}).then((i=>{if(200===i.status)return i.json();throw new Error("HTTP status "+i.status)})).then((i=>{i.forEach((i=>{var t;const n=i.slug,e=i.id,{gameId:s,title:o,description:l,subtitle:r}=null!==(t=i.previewCard)&&void 0!==t?t:{};s&&(this.gameIds+=`games(id=${s}),`),this.posts.push({postId:e,gameId:s,title:o,description:l,subtitle:r,slug:n})})),this.gameIds.length>0&&(this.gameIds=this.gameIds.slice(0,-1),this.gameIds="$or("+this.gameIds+")"),this.getDataImage(this.gameIds)})).catch((i=>{console.error(i)}))}catch(i){console.error("Error fetching verification types:",i)}}hasUndefinedValues(i){return Object.values(i).some((i=>void 0===i))}render(){return this.isLoading?n("div",null,n("p",null,o("loading",this.language))):n("div",{class:"ModalContainer",ref:i=>this.stylingContainer=i},n("div",{class:"sliderWidget"},n("div",{class:"headerHontainer"},this.postsTitle&&n("h2",null,this.postsTitle),n("div",{class:"viewAllButton",onClick:()=>this.onViewAllClick()},o("viewAll",this.language))),n("div",{class:"postSlider"},this.posts.filter((i=>!this.hasUndefinedValues(i))).slice(0,+(this.maxCards||this.posts.length)).map((i=>{var t,e,s,l;return n("div",{class:"postCard"},n("div",{class:"imageTitle"},(null==i?void 0:i.images)?n("a",{href:(null===(e=null===(t=i.images)||void 0===t?void 0:t[0])||void 0===e?void 0:e.launchUrl)||"",target:"_blank",rel:"noopener noreferrer"},n("img",{src:(null===(l=null===(s=i.images)||void 0===s?void 0:s[0])||void 0===l?void 0:l.thumbnail)||"",alt:"Game Image"})):null,n("div",{class:"titleSubtitle"},i.title&&n("h3",null,i.title),i.subtitle&&n("p",{innerHTML:i.subtitle}))),i.description&&n("div",{class:"Description"},n("p",{innerHTML:i.description})),n("div",{class:"buttons"},n("button",{class:"moreInfoButton",onClick:()=>this.onMoreInfoClick(i.gameId,i.postId,i.title,i.slug)},o("moreInfo",this.language)),this.isLoggedIn&&i.gameId&&n("button",{class:"playNowButton",onClick:()=>this.onPlayNowClick(i.gameId)},o("playNow",this.language))))})))))}onViewAllClick(){this.viewAll.emit(),window.postMessage({type:"viewAllSocialPosts"},window.location.href)}onMoreInfoClick(i,t,n,e){this.moreInfo.emit(),window.postMessage({type:"moreInfoSocialPost",gameId:i,postId:t,postTitle:n,slug:e},window.location.href)}onPlayNowClick(i){this.playNow.emit(i),window.postMessage({type:"playNowSocialPost",gameId:i},window.location.href)}static get watchers(){return{translationUrl:["handleNewTranslations"],session:["watchSession"]}}};l.style=':host {\n font-family: "Roboto", sans-serif;\n display: block;\n}\n\n.ModalContainer {\n container-type: inline-size;\n}\n\n.sliderWidget {\n display: block;\n max-width: 780px;\n margin: 0 auto;\n padding: 16px;\n max-height: 500px;\n}\n.sliderWidget h2 {\n font-size: 20px;\n}\n.sliderWidget .headerHontainer {\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n.sliderWidget .headerHontainer .viewAllButton {\n cursor: pointer;\n font-weight: bold;\n color: rgb(142, 142, 142);\n}\n.sliderWidget .postSlider {\n display: flex;\n overflow-x: auto;\n scroll-snap-type: x mandatory;\n gap: 24px;\n}\n.sliderWidget .postSlider .postCard {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n scroll-snap-align: start;\n padding: 20px;\n border-radius: 6px;\n min-width: 360px;\n background-color: rgb(244, 244, 244);\n}\n.sliderWidget .postSlider .postCard .Description {\n display: -webkit-box;\n -webkit-line-clamp: 5;\n -webkit-box-orient: vertical;\n overflow: hidden;\n margin-bottom: 14px;\n}\n.sliderWidget .postSlider .postCard .imageTitle {\n display: flex;\n justify-content: flex-start;\n gap: 20px;\n}\n.sliderWidget .postSlider .postCard .imageTitle img {\n height: 120px;\n width: 120px;\n border-radius: 6px;\n}\n.sliderWidget .postSlider .postCard .imageTitle .titleSubtitle {\n display: flex;\n flex-direction: column;\n}\n.sliderWidget .postSlider .postCard .buttons {\n display: flex;\n justify-content: center;\n gap: 12px;\n}\n.sliderWidget .postSlider .postCard .buttons .moreInfoButton, .sliderWidget .postSlider .postCard .buttons .playNowButton {\n width: 172px;\n display: block;\n padding: 8px 16px;\n border: 3px solid #63B250;\n border-radius: 6px;\n cursor: pointer;\n font-weight: bold;\n}\n.sliderWidget .postSlider .postCard .buttons .moreInfoButton {\n background-color: rgb(244, 244, 244);\n color: #63B250;\n}\n.sliderWidget .postSlider .postCard .buttons .playNowButton {\n background-color: #63B250;\n color: #fff;\n}\n\nh3, h4 {\n font-size: 18px;\n}\n\np {\n font-size: 14px;\n color: rgb(91, 91, 91);\n}\n\n@container (max-width: 480px) {\n .sliderWidget h2 {\n font-size: 18px;\n }\n .sliderWidget .postSlider .postCard {\n min-width: 250px;\n }\n h3, h4 {\n font-size: 16px;\n }\n p {\n font-size: 12px;\n }\n}';export{l as general_preview_social_posts}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const o=()=>{};export{o as g}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { sass } from "@stencil/sass";
|
|
2
|
+
export const config = {
|
|
3
|
+
namespace: 'general-preview-social-posts',
|
|
4
|
+
taskQueue: 'async',
|
|
5
|
+
sourceMap: true,
|
|
6
|
+
minifyJs: false,
|
|
7
|
+
extras: {
|
|
8
|
+
experimentalImportInjection: true
|
|
9
|
+
},
|
|
10
|
+
plugins: [sass()],
|
|
11
|
+
outputTargets: [
|
|
12
|
+
{
|
|
13
|
+
type: 'www',
|
|
14
|
+
serviceWorker: null // disable service workers
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
};
|
package/dist/stencil.config.js
CHANGED
|
@@ -1,22 +1,17 @@
|
|
|
1
|
-
import { sass } from
|
|
1
|
+
import { sass } from "@stencil/sass";
|
|
2
2
|
export const config = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
{
|
|
8
|
-
|
|
9
|
-
esmLoaderPath: '../loader',
|
|
3
|
+
namespace: 'general-preview-social-posts',
|
|
4
|
+
taskQueue: 'async',
|
|
5
|
+
sourceMap: false,
|
|
6
|
+
minifyJs: true,
|
|
7
|
+
extras: {
|
|
8
|
+
experimentalImportInjection: true
|
|
10
9
|
},
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
type: 'www',
|
|
19
|
-
serviceWorker: null, // disable service workers
|
|
20
|
-
},
|
|
21
|
-
],
|
|
10
|
+
plugins: [sass()],
|
|
11
|
+
outputTargets: [
|
|
12
|
+
{
|
|
13
|
+
type: 'dist',
|
|
14
|
+
esmLoaderPath: '../loader'
|
|
15
|
+
}
|
|
16
|
+
]
|
|
22
17
|
};
|
package/dist/types/components/general-preview-social-posts/general-preview-social-posts.d.ts
CHANGED
|
@@ -1,84 +1,84 @@
|
|
|
1
1
|
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
-
export declare class
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
export declare class GeneralPreviewSocialPosts {
|
|
3
|
+
/**
|
|
4
|
+
* The userId
|
|
5
|
+
*/
|
|
6
|
+
userId: string;
|
|
7
|
+
/**
|
|
8
|
+
* The session
|
|
5
9
|
*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
*
|
|
41
|
-
*/
|
|
42
|
-
translationUrl: string;
|
|
43
|
-
/**
|
|
44
|
-
* Client custom styling via string
|
|
45
|
-
*/
|
|
46
|
-
clientStyling: string;
|
|
47
|
-
/**
|
|
48
|
-
* Client custom styling via url content
|
|
49
|
-
*/
|
|
50
|
-
clientStylingUrl: string;
|
|
51
|
-
/**
|
|
52
|
-
* CMS Endpoint stage
|
|
53
|
-
*/
|
|
54
|
-
cmsEnv: string;
|
|
55
|
-
/**
|
|
56
|
-
* The page parameter for the cms call
|
|
10
|
+
session: string;
|
|
11
|
+
/**
|
|
12
|
+
* The Posts Title
|
|
13
|
+
*/
|
|
14
|
+
postsTitle: string;
|
|
15
|
+
/**
|
|
16
|
+
* The max cards displayed
|
|
17
|
+
*/
|
|
18
|
+
maxCards: string;
|
|
19
|
+
/**
|
|
20
|
+
* The language
|
|
21
|
+
*/
|
|
22
|
+
language: string;
|
|
23
|
+
/**
|
|
24
|
+
* The datasource
|
|
25
|
+
*/
|
|
26
|
+
datasource: string;
|
|
27
|
+
/**
|
|
28
|
+
* The NorWAy endpoint
|
|
29
|
+
*/
|
|
30
|
+
endpoint: string;
|
|
31
|
+
/**
|
|
32
|
+
* The NorWAy endpoint
|
|
33
|
+
*/
|
|
34
|
+
cmsEndpoint: string;
|
|
35
|
+
/**
|
|
36
|
+
* The userRoles
|
|
37
|
+
*/
|
|
38
|
+
userRoles: string;
|
|
39
|
+
/**
|
|
40
|
+
* The translationurl
|
|
41
|
+
*/
|
|
42
|
+
translationUrl: string;
|
|
43
|
+
/**
|
|
44
|
+
* Client custom styling via string
|
|
57
45
|
*/
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
46
|
+
clientStyling: string;
|
|
47
|
+
/**
|
|
48
|
+
* Client custom styling via url content
|
|
49
|
+
*/
|
|
50
|
+
clientStylingUrl: string;
|
|
51
|
+
/**
|
|
52
|
+
* CMS Endpoint stage
|
|
53
|
+
*/
|
|
54
|
+
cmsEnv: string;
|
|
55
|
+
/**
|
|
56
|
+
* The page parameter for the cms call
|
|
57
|
+
*/
|
|
58
|
+
pageName: string;
|
|
59
|
+
posts: Array<any>;
|
|
60
|
+
private stylingAppends;
|
|
61
|
+
private isLoading;
|
|
62
|
+
private isLoggedIn;
|
|
63
|
+
dataImages: Array<any>;
|
|
64
|
+
gameIds: string;
|
|
65
|
+
private platform;
|
|
66
|
+
private stylingContainer;
|
|
67
|
+
moreInfo: EventEmitter;
|
|
68
|
+
playNow: EventEmitter;
|
|
69
|
+
viewAll: EventEmitter;
|
|
70
|
+
handleNewTranslations(): void;
|
|
71
|
+
componentWillLoad(): Promise<void>;
|
|
72
|
+
watchSession(newValue: string, oldValue: string): void;
|
|
73
|
+
connectedCallback(): void;
|
|
74
|
+
componentDidRender(): void;
|
|
75
|
+
setClientStyling: () => void;
|
|
76
|
+
setClientStylingURL: () => void;
|
|
77
|
+
getDataImage(ids: string): void;
|
|
78
|
+
componentDidLoad(): Promise<void>;
|
|
79
|
+
hasUndefinedValues(obj: object): boolean;
|
|
80
|
+
render(): any;
|
|
81
|
+
onViewAllClick(): void;
|
|
82
|
+
onMoreInfoClick(gameId: string, postId: number, postTitle: string, slug: string): void;
|
|
83
|
+
onPlayNowClick(gameId: any): void;
|
|
84
84
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { GeneralPreviewSocialPosts } from './general-preview-social-posts';
|
|
@@ -65,8 +65,25 @@ export namespace Components {
|
|
|
65
65
|
"userRoles": string;
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
+
export interface GeneralPreviewSocialPostsCustomEvent<T> extends CustomEvent<T> {
|
|
69
|
+
detail: T;
|
|
70
|
+
target: HTMLGeneralPreviewSocialPostsElement;
|
|
71
|
+
}
|
|
68
72
|
declare global {
|
|
73
|
+
interface HTMLGeneralPreviewSocialPostsElementEventMap {
|
|
74
|
+
"moreInfo": any;
|
|
75
|
+
"playNow": any;
|
|
76
|
+
"viewAll": any;
|
|
77
|
+
}
|
|
69
78
|
interface HTMLGeneralPreviewSocialPostsElement extends Components.GeneralPreviewSocialPosts, HTMLStencilElement {
|
|
79
|
+
addEventListener<K extends keyof HTMLGeneralPreviewSocialPostsElementEventMap>(type: K, listener: (this: HTMLGeneralPreviewSocialPostsElement, ev: GeneralPreviewSocialPostsCustomEvent<HTMLGeneralPreviewSocialPostsElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
80
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
81
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
82
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
83
|
+
removeEventListener<K extends keyof HTMLGeneralPreviewSocialPostsElementEventMap>(type: K, listener: (this: HTMLGeneralPreviewSocialPostsElement, ev: GeneralPreviewSocialPostsCustomEvent<HTMLGeneralPreviewSocialPostsElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
84
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
85
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
86
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
70
87
|
}
|
|
71
88
|
var HTMLGeneralPreviewSocialPostsElement: {
|
|
72
89
|
prototype: HTMLGeneralPreviewSocialPostsElement;
|
|
@@ -110,9 +127,9 @@ declare namespace LocalJSX {
|
|
|
110
127
|
* The max cards displayed
|
|
111
128
|
*/
|
|
112
129
|
"maxCards"?: string;
|
|
113
|
-
"onMoreInfo"?: (event:
|
|
114
|
-
"onPlayNow"?: (event:
|
|
115
|
-
"onViewAll"?: (event:
|
|
130
|
+
"onMoreInfo"?: (event: GeneralPreviewSocialPostsCustomEvent<any>) => void;
|
|
131
|
+
"onPlayNow"?: (event: GeneralPreviewSocialPostsCustomEvent<any>) => void;
|
|
132
|
+
"onViewAll"?: (event: GeneralPreviewSocialPostsCustomEvent<any>) => void;
|
|
116
133
|
/**
|
|
117
134
|
* The page parameter for the cms call
|
|
118
135
|
*/
|