@everymatrix/pam-profile-consents 1.90.6
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/index-80e34705.js +1227 -0
- package/dist/cjs/index.cjs.js +10 -0
- package/dist/cjs/loader.cjs.js +15 -0
- package/dist/cjs/pam-profile-consents-e63c25d8.js +399 -0
- package/dist/cjs/pam-profile-consents.cjs.js +25 -0
- package/dist/cjs/pam-profile-consents_2.cjs.entry.js +183 -0
- package/dist/collection/collection-manifest.json +19 -0
- package/dist/collection/components/pam-profile-consents/index.js +1 -0
- package/dist/collection/components/pam-profile-consents/pam-profile-consents.css +202 -0
- package/dist/collection/components/pam-profile-consents/pam-profile-consents.js +328 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/utils/locale.utils.js +98 -0
- package/dist/collection/utils/utils.js +12 -0
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/index-76d86c0b.js +1200 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/loader.js +11 -0
- package/dist/esm/pam-profile-consents-363e3230.js +397 -0
- package/dist/esm/pam-profile-consents.js +20 -0
- package/dist/esm/pam-profile-consents_2.entry.js +178 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/pam-profile-consents/app-globals-0f993ce5.js +1 -0
- package/dist/pam-profile-consents/index-76d86c0b.js +2 -0
- package/dist/pam-profile-consents/index.esm.js +1 -0
- package/dist/pam-profile-consents/pam-profile-consents-363e3230.js +1 -0
- package/dist/pam-profile-consents/pam-profile-consents.esm.js +1 -0
- package/dist/pam-profile-consents/pam-profile-consents_2.entry.js +1 -0
- package/dist/stencil.config.dev.js +17 -0
- package/dist/stencil.config.js +19 -0
- package/dist/storybook/main.js +46 -0
- package/dist/storybook/preview.js +9 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/pam-profile-consents/.stencil/libs/common/src/storybook/storybook-utils.d.ts +39 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/pam-profile-consents/.stencil/packages/stencil/pam-profile-consents/stencil.config.d.ts +2 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/pam-profile-consents/.stencil/packages/stencil/pam-profile-consents/stencil.config.dev.d.ts +2 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/pam-profile-consents/.stencil/packages/stencil/pam-profile-consents/storybook/main.d.ts +3 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/pam-profile-consents/.stencil/packages/stencil/pam-profile-consents/storybook/preview.d.ts +70 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/pam-profile-consents/.stencil/tools/plugins/index.d.ts +4 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/pam-profile-consents/.stencil/tools/plugins/lazy-load-chunk-plugin.d.ts +12 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/pam-profile-consents/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +5 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/pam-profile-consents/.stencil/tools/plugins/vite-chunk-plugin.d.ts +6 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/pam-profile-consents/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +4 -0
- package/dist/types/components/pam-profile-consents/index.d.ts +1 -0
- package/dist/types/components/pam-profile-consents/pam-profile-consents.d.ts +54 -0
- package/dist/types/components.d.ts +93 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +1674 -0
- package/dist/types/utils/locale.utils.d.ts +23 -0
- package/dist/types/utils/utils.d.ts +7 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/loader/package.json +11 -0
- package/package.json +26 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var e=Object.defineProperty,t=new WeakMap,n=e=>t.get(e),l=(e,n)=>t.set(n.t=e,n),o=(e,t)=>t in e,s=(e,t)=>(0,console.error)(e,t),r=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={l:0,o:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),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})(),m=!1,d=[],w=[],y=(e,t)=>n=>{e.push(n),m||(m=!0,t&&4&f.l?b(v):f.raf(v))},$=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){s(e)}e.length=0},v=()=>{$(d),$(w),(m=d.length>0)&&f.raf(v)},b=e=>h().then(e),g=y(w,!0),S={},j=e=>"object"==(e=typeof e)||"function"===e;function k(e){var t,n,l;return null!=(l=null==(n=null==(t=e.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?l:void 0}((t,n)=>{for(var l in n)e(t,l,{get:n[l],enumerable:!0})})({},{err:()=>E,map:()=>C,ok:()=>O,unwrap:()=>P,unwrapErr:()=>L});var O=e=>({isOk:!0,isErr:!1,value:e}),E=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=>O(e))):O(n)}if(e.isErr)return E(e.value);throw"should never get here"}var M,x,P=e=>{if(e.isOk)return e.value;throw e.value},L=e=>{if(e.isErr)return e.value;throw e.value},R=(e,t,...n)=>{let l=null,o=null,s=!1,r=!1;const i=[],c=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!j(l))&&(l+=""),s&&r?i[i.length-1].i+=l:i.push(s?T(null,l):l),r=s)};if(c(n),t){t.key&&(o=t.key);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}const u=T(e,null);return u.u=t,i.length>0&&(u.h=i),u.p=o,u},T=(e,t)=>({l:0,m:e,i:t,$:null,h:null,u:null,p:null}),A={},F=new WeakMap,H=e=>"sc-"+e.v,N=(e,t,n,l,s,r)=>{if(n!==l){let i=o(e,t),c=t.toLowerCase();if("class"===t){const t=e.classList,o=W(n),s=W(l);t.remove(...o.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!o.includes(e))))}else if("key"===t);else if("ref"===t)l&&l(e);else if(i||"o"!==t[0]||"n"!==t[1]){const o=j(l);if((i||o&&null!==l)&&!s)try{if(e.tagName.includes("-"))e[t]=l;else{const o=null==l?"":l;"list"===t?i=!1:null!=n&&e[t]==o||(e[t]=o)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!i||4&r||s)&&!o&&e.setAttribute(t,l=!0===l?"":l)}else if(t="-"===t[2]?t.slice(3):o(u,c)?c.slice(2):c[2]+t.slice(3),n||l){const o=t.endsWith(D);t=t.replace(q,""),n&&f.rel(e,t,n,o),l&&f.ael(e,t,l,o)}}},U=/\s/,W=e=>e?e.split(U):[],D="Capture",q=RegExp(D+"$"),G=(e,t,n)=>{const l=11===t.$.nodeType&&t.$.host?t.$.host:t.$,o=e&&e.u||S,s=t.u||S;for(const e of V(Object.keys(o)))e in s||N(l,e,o[e],void 0,n,t.l);for(const e of V(Object.keys(s)))N(l,e,o[e],s[e],n,t.l)};function V(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var _=!1,z=(e,t,n)=>{const l=t.h[n];let o,s,r=0;if(null!==l.i)o=l.$=a.createTextNode(l.i);else{if(_||(_="svg"===l.m),o=l.$=a.createElementNS(_?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",l.m),_&&"foreignObject"===l.m&&(_=!1),G(null,l,_),null!=M&&o["s-si"]!==M&&o.classList.add(o["s-si"]=M),l.h)for(r=0;r<l.h.length;++r)s=z(e,l,r),s&&o.appendChild(s);"svg"===l.m?_=!1:"foreignObject"===o.tagName&&(_=!0)}return o["s-hn"]=x,o},B=(e,t,n,l,o,s)=>{let r,i=e;for(i.shadowRoot&&i.tagName===x&&(i=i.shadowRoot);o<=s;++o)l[o]&&(r=z(null,n,o),r&&(l[o].$=r,X(i,r,t)))},I=(e,t,n)=>{for(let l=t;l<=n;++l){const t=e[l];if(t){const e=t.$;Q(t),e&&e.remove()}}},J=(e,t,n=!1)=>e.m===t.m&&(!!n||e.p===t.p),K=(e,t,n=!1)=>{const l=t.$=e.$,o=e.h,s=t.h,r=t.m,i=t.i;null===i?(G(e,t,_="svg"===r||"foreignObject"!==r&&_),null!==o&&null!==s?((e,t,n,l,o=!1)=>{let s,r,i=0,c=0,u=0,a=0,f=t.length-1,h=t[0],p=t[f],m=l.length-1,d=l[0],w=l[m];for(;i<=f&&c<=m;)if(null==h)h=t[++i];else if(null==p)p=t[--f];else if(null==d)d=l[++c];else if(null==w)w=l[--m];else if(J(h,d,o))K(h,d,o),h=t[++i],d=l[++c];else if(J(p,w,o))K(p,w,o),p=t[--f],w=l[--m];else if(J(h,w,o))K(h,w,o),X(e,h.$,p.$.nextSibling),h=t[++i],w=l[--m];else if(J(p,d,o))K(p,d,o),X(e,p.$,h.$),p=t[--f],d=l[++c];else{for(u=-1,a=i;a<=f;++a)if(t[a]&&null!==t[a].p&&t[a].p===d.p){u=a;break}u>=0?(r=t[u],r.m!==d.m?s=z(t&&t[c],n,u):(K(r,d,o),t[u]=void 0,s=r.$),d=l[++c]):(s=z(t&&t[c],n,c),d=l[++c]),s&&X(h.$.parentNode,s,h.$)}i>f?B(e,null==l[m+1]?null:l[m+1].$,n,l,c,m):c>m&&I(t,i,f)})(l,o,t,s,n):null!==s?(null!==e.i&&(l.textContent=""),B(l,null,t,s,0,s.length-1)):null!==o&&I(o,0,o.length-1),_&&"svg"===r&&(_=!1)):e.i!==i&&(l.data=i)},Q=e=>{e.u&&e.u.ref&&e.u.ref(null),e.h&&e.h.map(Q)},X=(e,t,n)=>null==e?void 0:e.insertBefore(t,n),Y=(e,t)=>{t&&!e.S&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.S=t)))},Z=(e,t)=>{if(e.l|=16,!(4&e.l))return Y(e,e.j),g((()=>ee(e,t)));e.l|=512},ee=(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 l;return t&&(l=ie(n,"componentWillLoad")),te(l,(()=>le(e,n,t)))},te=(e,t)=>ne(e)?e.then(t).catch((e=>{console.error(e),t()})):t(),ne=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,le=async(e,t,n)=>{var l;const o=e.$hostElement$,s=o["s-rc"];n&&(e=>{const t=e.k,n=e.$hostElement$,l=t.l,o=((e,t)=>{var n;const l=H(t),o=i.get(l);if(e=11===e.nodeType?e:a,o)if("string"==typeof o){let s,r=F.get(e=e.head||e);if(r||F.set(e,r=new Set),!r.has(l)){{s=a.createElement("style"),s.innerHTML=o;const t=null!=(n=f.O)?n:k(a);null!=t&&s.setAttribute("nonce",t),e.insertBefore(s,e.querySelector("link"))}4&t.l&&(s.innerHTML+=c),r&&r.add(l)}}else e.adoptedStyleSheets.includes(o)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]);return l})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);oe(e,t,o,n),s&&(s.map((e=>e())),o["s-rc"]=void 0);{const t=null!=(l=o["s-p"])?l:[],n=()=>se(e);0===t.length?n():(Promise.all(t).then(n),e.l|=4,t.length=0)}},oe=(e,t,n,l)=>{try{t=t.render(),e.l&=-17,e.l|=2,((e,t,n=!1)=>{const l=e.$hostElement$,o=e.k,s=e.C||T(null,null),r=(e=>e&&e.m===A)(t)?t:R(null,null,t);if(x=l.tagName,o.M&&(r.u=r.u||{},o.M.map((([e,t])=>r.u[t]=l[e]))),n&&r.u)for(const e of Object.keys(r.u))l.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(r.u[e]=l[e]);r.m=null,r.l|=4,e.C=r,r.$=s.$=l.shadowRoot||l,M=l["s-sc"],K(s,r,n)})(e,t,l)}catch(t){s(t,e.$hostElement$)}return null},se=e=>{const t=e.$hostElement$,n=e.t,l=e.j;64&e.l||(e.l|=64,ce(t),ie(n,"componentDidLoad"),e.P(t),l||re()),e.S&&(e.S(),e.S=void 0),512&e.l&&b((()=>Z(e,!1))),e.l&=-517},re=()=>{ce(a.documentElement),b((()=>(e=>{const t=f.ce("appload",{detail:{namespace:"pam-profile-consents"}});return e.dispatchEvent(t),t})(u)))},ie=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){s(e)}},ce=e=>e.classList.add("hydrated"),ue=(e,t,l)=>{var o,r;const i=e.prototype;if(t.L||t.R||e.watchers){e.watchers&&!t.R&&(t.R=e.watchers);const c=Object.entries(null!=(o=t.L)?o:{});if(c.map((([e,[o]])=>{(31&o||2&l&&32&o)&&Object.defineProperty(i,e,{get(){return((e,t)=>n(this).T.get(t))(0,e)},set(l){((e,t,l,o)=>{const r=n(e);if(!r)throw Error(`Couldn't find host element for "${o.v}" 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=r.$hostElement$,c=r.T.get(t),u=r.l,a=r.t;if(l=((e,t)=>null==e||j(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(l,o.L[t][0]),(!(8&u)||void 0===c)&&l!==c&&(!Number.isNaN(c)||!Number.isNaN(l))&&(r.T.set(t,l),a)){if(o.R&&128&u){const e=o.R[t];e&&e.map((e=>{try{a[e](l,c,t)}catch(e){s(e,i)}}))}2==(18&u)&&Z(r,!1)}})(this,e,l,t)},configurable:!0,enumerable:!0})})),1&l){const l=new Map;i.attributeChangedCallback=function(e,o,s){f.jmp((()=>{var r;const c=l.get(e);if(this.hasOwnProperty(c))s=this[c],delete this[c];else{if(i.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const l=n(this),i=null==l?void 0:l.l;if(i&&!(8&i)&&128&i&&s!==o){const n=l.t,i=null==(r=t.R)?void 0:r[e];null==i||i.forEach((t=>{null!=n[t]&&n[t].call(n,s,o,e)}))}return}}this[c]=(null!==s||"boolean"!=typeof this[c])&&s}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(r=t.R)?r:{}),...c.filter((([e,t])=>15&t[0])).map((([e,n])=>{var o;const s=n[1]||e;return l.set(s,e),512&n[0]&&(null==(o=t.M)||o.push([e,s])),s}))]))}}return e},ae=e=>{ie(e,"disconnectedCallback")},fe=(e,l={})=>{var o;const h=[],m=l.exclude||[],d=u.customElements,w=a.head,y=w.querySelector("meta[charset]"),$=a.createElement("style"),v=[];let b,g=!0;Object.assign(f,l),f.o=new URL(l.resourcesUrl||"./",a.baseURI).href;let S=!1;if(e.map((e=>{e[1].map((l=>{var o;const c={l:l[0],v:l[1],L:l[2],A:l[3]};4&c.l&&(S=!0),c.L=l[2],c.M=[],c.R=null!=(o=l[4])?o:{};const u=c.v,a=class extends HTMLElement{constructor(e){if(super(e),this.hasRegisteredEventListeners=!1,((e,n)=>{const l={l:0,$hostElement$:e,k:n,T:new Map};l.F=new Promise((e=>l.P=e)),e["s-p"]=[],e["s-rc"]=[],t.set(e,l)})(e=this,c),1&c.l)if(e.shadowRoot){if("open"!==e.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.v}! 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),b&&(clearTimeout(b),b=null),g?v.push(this):f.jmp((()=>(e=>{if(!(1&f.l)){const t=n(e),l=t.k,o=()=>{};if(1&t.l)(null==t?void 0:t.t)||(null==t?void 0:t.F)&&t.F.then((()=>{}));else{t.l|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){Y(t,t.j=n);break}}l.L&&Object.entries(l.L).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n)=>{let l;if(!(32&t.l)){if(t.l|=32,n.H){const e=(e=>{const t=e.v.replace(/-/g,"_"),n=e.H;if(!n)return;const l=r.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(r.set(n,e),e[t])),s)
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n);if(e&&"then"in e){const t=()=>{};l=await e,t()}else l=e;if(!l)throw Error(`Constructor for "${n.v}#${t.N}" was not found`);l.isProxied||(n.R=l.watchers,ue(l,n,2),l.isProxied=!0);const o=()=>{};t.l|=8;try{new l(t)}catch(e){s(e)}t.l&=-9,t.l|=128,o()}else l=e.constructor,customElements.whenDefined(e.localName).then((()=>t.l|=128));if(l&&l.style){let e;"string"==typeof l.style&&(e=l.style);const t=H(n);if(!i.has(t)){const l=()=>{};((e,t,n)=>{let l=i.get(e);p&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,i.set(e,l)})(t,e,!!(1&n.l)),l()}}}const o=t.j,c=()=>Z(t,!0);o&&o["s-rc"]?o["s-rc"].push(c):c()})(e,t,l)}o()}})(this)))}disconnectedCallback(){f.jmp((()=>(async()=>{if(!(1&f.l)){const e=n(this);(null==e?void 0:e.t)?ae(e.t):(null==e?void 0:e.F)&&e.F.then((()=>ae(e.t)))}})()))}componentOnReady(){return n(this).F}};c.H=e[0],m.includes(u)||d.get(u)||(h.push(u),d.define(u,ue(a,c,1)))}))})),h.length>0&&(S&&($.textContent+=c),$.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",$.innerHTML.length)){$.setAttribute("data-styles","");const e=null!=(o=f.O)?o:k(a);null!=e&&$.setAttribute("nonce",e),w.insertBefore($,y?y.nextSibling:w.firstChild)}g=!1,v.length?v.map((e=>e.connectedCallback())):f.jmp((()=>b=setTimeout(re,30)))},he=e=>f.O=e;export{A as H,fe as b,R as h,h as p,l as r,he as s}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{P as PamProfileConsents}from"./pam-profile-consents-363e3230.js";import"./index-76d86c0b.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,h as r}from"./index-76d86c0b.js";const n={en:{title:"Notifications",saveButton:"Save Changes",successMessage:"Your consent preferences have been saved!",errorMessageFetch:"An error has occurred when attempting to fetch consent preferences",errorMessageSave:"An error has occurred when attempting to save consent preferences"},"zh-hk":{title:"通知",saveButton:"保存更改",successMessage:"您的同意偏好已保存!",errorMessageFetch:"嘗試獲取同意偏好時發生錯誤",errorMessageSave:"嘗試保存同意偏好時發生錯誤"},fr:{title:"Notifications",saveButton:"Enregistrer les modifications",successMessage:"Vos préférences de consentement ont été enregistrées !",errorMessageFetch:"Une erreur est survenue lors de la récupération des préférences de consentement",errorMessageSave:"Une erreur est survenue lors de l'enregistrement des préférences de consentement"},ro:{title:"Notificări",saveButton:"Salvează modificările",successMessage:"Preferințele dvs. de consimțământ au fost salvate!",errorMessageFetch:"A apărut o eroare la încercarea de a obține preferințele de consimțământ",errorMessageSave:"A apărut o eroare la încercarea de a salva preferințele de consimțământ"},tr:{title:"Bildirimler",saveButton:"Değişiklikleri Kaydet",successMessage:"Onay tercihleriniz kaydedildi!",errorMessageFetch:"Onay tercihlerini almaya çalışırken bir hata oluştu",errorMessageSave:"Onay tercihlerini kaydetmeye çalışırken bir hata oluştu"},es:{title:"Notificaciones",saveButton:"Guardar cambios",successMessage:"¡Tus preferencias de consentimiento han sido guardadas!",errorMessageFetch:"Se ha producido un error al intentar obtener las preferencias de consentimiento",errorMessageSave:"Se ha producido un error al intentar guardar las preferencias de consentimiento"},pt:{title:"Notificações",saveButton:"Salvar alterações",successMessage:"Suas preferências de consentimento foram salvas!",errorMessageFetch:"Ocorreu um erro ao tentar buscar as preferências de consentimento",errorMessageSave:"Ocorreu um erro ao tentar salvar as preferências de consentimento"},hr:{title:"Obavijesti",saveButton:"Spremi promjene",successMessage:"Vaše postavke privola su spremljene!",errorMessageFetch:"Došlo je do greške prilikom pokušaja dobivanja postavki privola",errorMessageSave:"Došlo je do greške prilikom pokušaja spremanja postavki privola"},"pt-br":{title:"Notificações",saveButton:"Salvar alterações",successMessage:"Suas preferências de consentimento foram salvas!",errorMessageFetch:"Ocorreu um erro ao tentar buscar as preferências de consentimento",errorMessageSave:"Ocorreu um erro ao tentar salvar as preferências de consentimento"},"es-mx":{title:"Notificaciones",saveButton:"Guardar cambios",successMessage:"¡Tus preferencias de consentimiento han sido guardadas!",errorMessageFetch:"Se ha producido un error al intentar obtener las preferencias de consentimiento",errorMessageSave:"Se ha producido un error al intentar guardar las preferencias de consentimiento"}},t=(e,r,t)=>{let o=n[n[r]?r:"en"][e];if(void 0!==t)for(const[e,r]of Object.entries(t.values)){const n=new RegExp(`{${e}}`,"g");o=o.replace(n,r)}return o},o="__WIDGET_GLOBAL_STYLE_CACHE__";function s(e,r){if(e){const n=document.createElement("style");n.innerHTML=r,e.appendChild(n)}}function a(e,r){if(!e||!r)return;const n=new URL(r);fetch(n.href).then((e=>e.text())).then((r=>{const n=document.createElement("style");n.innerHTML=r,e&&e.appendChild(n)})).catch((e=>{console.error("There was an error while trying to load client styling from URL",e)}))}const i=class{constructor(n){e(this,n),this.isMobileDevice=!1,this.allConsents=[],this.categories=[],this.ungroupedConsents=[],this.handleFetchResponse=async e=>{var r;if(e.status>=300){this.isError=!0;const n=null===(r=(await e.json()).thirdPartyResponse)||void 0===r?void 0:r.errorCode;return this.errorMessage=t(n||"errorMessageFetch",this.lang),Promise.reject(this.errorMessage)}if(this.isError=!1,e.headers.get("content-type")){let r=await e.json();return Promise.resolve(r)}return Promise.resolve()},this.getConsentsData=()=>{const e=new URL("/api/pam/v1/player-consents?IncludeUnset=true",this.endpoint),r=new Headers;r.append("X-SessionID",this.session);const n={method:"GET",headers:r};return new Promise(((r,t)=>{fetch(e.href,n).then((e=>this.handleFetchResponse(e))).then((e=>{this.allConsents=e,r()})).catch((e=>{console.error(e),t(e)}))}))},this.processConsents=()=>{const e=this.allConsents.filter((e=>!e.mustAccept)),r={},n=[];e.forEach((e=>{if(e.category){const n=e.category.categoryTagCode;r[n]||(r[n]={categoryTagCode:n,friendlyName:e.category.friendlyName,consents:[]}),r[n].consents.push(e)}else n.push(e)})),this.categories=Object.values(r),this.ungroupedConsents=n;const t={};e.forEach((e=>{t[e.tagCode]="Accepted"===e.status})),this.consentsState=t,this.hasChanges=!1},this.toggleConsent=e=>{this.consentsState=Object.assign(Object.assign({},this.consentsState),{[e]:!this.consentsState[e]}),this.hasChanges=!0},this.saveConsents=()=>{if(!this.hasChanges||this.isSaving)return;this.isSaving=!0;const e=Object.entries(this.consentsState).map((([e,r])=>({tagCode:e,status:r?"Accepted":"Denied"}))),r=new URL("/api/pam/v1/player-consents",this.endpoint),n=new Headers;n.append("X-SessionID",this.session),n.append("Content-Type","application/json"),fetch(r.href,{method:"PATCH",headers:n,body:JSON.stringify({note:"",userConsents:e})}).then((e=>this.handleFetchResponse(e))).then((()=>this.getConsentsData().then((()=>this.processConsents())))).catch((e=>{console.error(e)})).finally((()=>{this.isSaving=!1}))},this.renderCheckbox=e=>{const n=this.consentsState[e.tagCode];return r("div",{class:"ConsentItem",onClick:()=>this.toggleConsent(e.tagCode)},r("div",{class:"Checkbox "+(n?"Checked":"")},n&&r("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"},r("polyline",{points:"20 6 9 17 4 12"}))),r("span",{class:"ConsentLabel"},e.friendlyName))},this.session=void 0,this.endpoint=void 0,this.lang="en",this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl=void 0,this.skeletonLoading=!0,this.isError=!1,this.errorMessage="",this.hasChanges=!1,this.isSaving=!1,this.consentsState={}}handleStylingChange(e,r){e!==r&&s(this.stylingContainer,this.clientStyling)}handleStylingUrlChange(e,r){e!==r&&a(this.stylingContainer,this.clientStylingUrl)}async componentWillLoad(){var e;this.isMobileDevice=!!((e=window.navigator.userAgent).toLowerCase().match(/android/i)||e.toLowerCase().match(/blackberry|bb/i)||e.toLowerCase().match(/iphone|ipad|ipod/i)||e.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),await this.getConsentsData().then((()=>{this.processConsents()})).finally((()=>this.skeletonLoading=!1))}componentDidLoad(){this.stylingContainer&&(null!=window.emMessageBuss?function(e,r,n,t=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!t)return function(e,r){const n=document.createElement("style");return window.emMessageBus.subscribe(r,(r=>{e&&(n.innerHTML=r,e.appendChild(n))}))}(e,r);window[o]||(window[o]={});const s=(n=function(e,r){return window.emMessageBus.subscribe(r,(n=>{if(!e)return;const t=e.getRootNode(),s=window[o];let a=s[r]&&s[r].sheet;a?s[r].refCount=s[r].refCount+1:(a=new CSSStyleSheet,a.replaceSync(n),s[r]={sheet:a,refCount:1});const i=t.adoptedStyleSheets||[];i.includes(a)||(t.adoptedStyleSheets=[...i,a])}))}(e,r)).unsubscribe.bind(n);n.unsubscribe=()=>{if(window[o][r]){const e=window[o][r];e.refCount>1?e.refCount=e.refCount-1:delete window[o][r]}s()}}(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription):(this.clientStyling&&s(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl)))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}render(){return!this.skeletonLoading&&this.isError?r("div",{class:"errorContainer"},r("p",{class:"errorMessage",innerHTML:this.errorMessage})):r("div",{ref:e=>this.stylingContainer=e},this.skeletonLoading?r("div",{class:"PamProfileConsentsWrapper skeleton"},r("div",{class:"HeaderArea"},r("ui-skeleton",{structure:"title",width:"200px",height:"30px"})),r("div",{class:"CategoriesGrid"},[...Array(4).keys()].map((()=>r("div",{class:"CategoryCard"},r("ui-skeleton",{structure:"text",width:"150px",height:"16px","margin-bottom":"10px"}),r("ui-skeleton",{structure:"rectangle",width:"100%",height:"20px","margin-bottom":"8px"}),r("ui-skeleton",{structure:"rectangle",width:"100%",height:"20px","margin-bottom":"8px"}))))),r("div",{class:"ButtonsArea"},r("div",{class:"SaveButton"},r("ui-skeleton",{structure:"rectangle",width:"auto",height:"50px"})))):r("div",{class:"PamProfileConsentsWrapper "+(this.isMobileDevice?"Mobile":"")},r("div",{class:"HeaderArea"},r("h2",{class:"HeaderText"},t("title",this.lang))),r("div",{class:"CategoriesGrid"},this.categories.map((e=>r("div",{class:"CategoryCard"},r("h3",{class:"CategoryTitle"},e.friendlyName),e.consents.map((e=>this.renderCheckbox(e))))))),this.ungroupedConsents.length>0&&r("div",{class:"UngroupedSection"},this.ungroupedConsents.map((e=>this.renderCheckbox(e)))),r("section",{class:"ButtonsArea"},r("button",{class:"SaveButton "+(!this.hasChanges||this.isSaving?"Disabled":""),onClick:this.saveConsents},t("saveButton",this.lang)))))}static get watchers(){return{clientStyling:["handleStylingChange"],clientStylingUrl:["handleStylingUrlChange"]}}};i.style=':host {\n display: block;\n}\n\nbutton {\n font-family: var(--emw--button-typography);\n}\n\n.errorContainer {\n font-family: "Roboto", sans-serif;\n font-style: normal;\n display: flex;\n flex-direction: column;\n gap: 24px;\n width: 100%;\n height: 100%;\n}\n.errorContainer .errorMessage {\n color: var(--emw--color-error, var(--emw--color-red, #ed0909));\n font-size: var(--emw-font-size-small, 13px);\n display: block;\n justify-content: center;\n text-align: center;\n}\n\n.PamProfileConsentsWrapper {\n color: var(--emw--pam-typography, var(--emw-color-contrast, #07072A));\n background: var(--emw-color-pale, var(--emw--color-gray-50, #F1F1F1));\n padding: 50px;\n height: 100%;\n border-radius: var(--emw--border-radius-large, 10px);\n container-type: inline-size;\n opacity: 1;\n animation-name: fadeIn;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n animation-duration: 0.3s;\n}\n.PamProfileConsentsWrapper .HeaderArea {\n margin-bottom: 20px;\n}\n.PamProfileConsentsWrapper .HeaderText {\n font-size: var(--emw--font-size-x-large, 24px);\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n text-transform: capitalize;\n font-weight: var(--emw--font-weight-semibold, 500);\n margin: 0;\n}\n.PamProfileConsentsWrapper .CategoriesGrid {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 20px;\n margin-bottom: 20px;\n}\n.PamProfileConsentsWrapper .CategoryCard {\n background: var(--emw-color-pale, var(--emw--color-gray-100, #E6E6E6));\n border-radius: var(--emw--border-radius-large, 10px);\n padding: 15px;\n}\n.PamProfileConsentsWrapper .CategoryTitle {\n font-size: var(--emw--font-size-large, 20px);\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n font-weight: var(--emw--font-weight-semibold, 500);\n margin: 0 0 15px 0;\n}\n.PamProfileConsentsWrapper .UngroupedSection {\n background: var(--emw-color-pale, var(--emw--color-gray-100, #E6E6E6));\n border-radius: var(--emw--border-radius-large, 10px);\n padding: 15px;\n margin-bottom: 20px;\n}\n.PamProfileConsentsWrapper .ConsentItem {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 8px 0;\n cursor: pointer;\n user-select: none;\n}\n.PamProfileConsentsWrapper .Checkbox {\n width: 22px;\n height: 22px;\n min-width: 22px;\n border: 2px solid var(--emw--color-gray-300, #58586B);\n border-radius: var(--emw--border-radius-small, 4px);\n display: flex;\n align-items: center;\n justify-content: center;\n transition: all var(--emw--transition-medium, 250ms);\n background: transparent;\n}\n.PamProfileConsentsWrapper .Checkbox svg {\n width: 14px;\n height: 14px;\n color: #FFFFFF;\n}\n.PamProfileConsentsWrapper .Checkbox.Checked {\n background: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n border-color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n}\n.PamProfileConsentsWrapper .ConsentLabel {\n font-size: var(--emw--size-small, 14px);\n font-weight: var(--emw--font-weight-normal, 400);\n color: var(--emw--pam-typography, var(--emw-color-contrast, #07072A));\n}\n.PamProfileConsentsWrapper .ButtonsArea {\n margin-top: 20px;\n width: 50%;\n}\n.PamProfileConsentsWrapper .ButtonsArea .SaveButton {\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n cursor: pointer;\n background-image: linear-gradient(to bottom, color-mix(in srgb, var(--emw--color-primary, #22B04E) 80%, black 20%), var(--emw--color-primary, #22B04E), color-mix(in srgb, var(--emw--color-primary, #22B04E) 80%, white 30%));\n border: 2px solid var(--emw--button-border-color, #0E5924);\n color: var(--emw--button-text-color, #FFFFFF);\n border-radius: var(--emw--button-border-radius, 10px);\n font-size: var(--emw--size-standard, 16px);\n text-transform: uppercase;\n transition-duration: var(--emw--transition-medium, 250ms);\n max-width: 400px;\n min-width: 200px;\n padding: 13px 0;\n width: 100%;\n}\n.PamProfileConsentsWrapper .ButtonsArea .SaveButton:active {\n background: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n}\n.PamProfileConsentsWrapper .ButtonsArea .SaveButton.Disabled {\n opacity: 0.3;\n cursor: not-allowed;\n}\n.PamProfileConsentsWrapper.skeleton .HeaderArea {\n margin-bottom: 20px;\n}\n.PamProfileConsentsWrapper.skeleton .CategoriesGrid {\n overflow: hidden;\n}\n.PamProfileConsentsWrapper.skeleton .CategoryCard {\n overflow: hidden;\n}\n.PamProfileConsentsWrapper.skeleton .ButtonsArea .SaveButton {\n width: 500px;\n border-radius: 30px;\n overflow: hidden;\n display: block;\n background-image: none;\n border: none;\n}\n@container (max-width: 425px) {\n .PamProfileConsentsWrapper {\n padding: 20px 15px;\n background: var(--emw-color-gray-50, #F9F8F8);\n max-width: unset;\n border-radius: var(--emw--border-radius-small, 5px);\n }\n .PamProfileConsentsWrapper .HeaderText {\n font-size: var(--emw--font-size-large, 20px);\n }\n .PamProfileConsentsWrapper .CategoriesGrid {\n grid-template-columns: 1fr;\n }\n .PamProfileConsentsWrapper .CategoryTitle {\n font-size: var(--emw--font-size-medium, 16px);\n }\n .PamProfileConsentsWrapper .ConsentLabel {\n font-size: var(--emw--size-x-small, 12px);\n }\n .PamProfileConsentsWrapper .ButtonsArea {\n width: 100%;\n }\n .PamProfileConsentsWrapper .ButtonsArea .SaveButton {\n font-size: var(--emw--size-x-small, 12px);\n height: 40px;\n color: var(--emw-button-typography, var(--emw-color-white, #FFFFFF));\n }\n .PamProfileConsentsWrapper .ButtonsArea .SaveButton.Disabled {\n color: var(--emw-color-gray-300, #58586B);\n }\n .PamProfileConsentsWrapper.skeleton .ButtonsArea .SaveButton {\n width: 100%;\n height: 100%;\n border-radius: 20px;\n }\n}\n\n@keyframes fadeIn {\n 0% {\n opacity: 0.01;\n }\n 1% {\n opacity: 0;\n }\n 50% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}';export{i as P}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as n,b as t}from"./index-76d86c0b.js";export{s as setNonce}from"./index-76d86c0b.js";import{g as e}from"./app-globals-0f993ce5.js";(()=>{const t=import.meta.url,e={};return""!==t&&(e.resourcesUrl=new URL(".",t).href),n(e)})().then((async n=>(await e(),t([["pam-profile-consents_2",[[1,"pam-profile-consents",{session:[513],endpoint:[513],lang:[513],mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],skeletonLoading:[32],isError:[32],errorMessage:[32],hasChanges:[32],isSaving:[32],consentsState:[32]},null,{clientStyling:["handleStylingChange"],clientStylingUrl:["handleStylingUrlChange"]}],[0,"ui-skeleton",{structure:[1],width:[1],height:[1],borderRadius:[8,"border-radius"],marginBottom:[8,"margin-bottom"],marginTop:[8,"margin-top"],marginLeft:[8,"margin-left"],marginRight:[8,"margin-right"],animation:[4],rows:[2],size:[1]},null,{structure:["handleStructureChange"]}]]]],n))));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{P as pam_profile_consents}from"./pam-profile-consents-363e3230.js";import{r as e,h as t,H as n}from"./index-76d86c0b.js";const i=class{constructor(t){e(this,t),this.stylingValue={width:this.handleStylingProps(this.width),height:this.handleStylingProps(this.height),borderRadius:this.handleStylingProps(this.borderRadius),marginBottom:this.handleStylingProps(this.marginBottom),marginTop:this.handleStylingProps(this.marginTop),marginLeft:this.handleStylingProps(this.marginLeft),marginRight:this.handleStylingProps(this.marginRight),size:this.handleStylingProps(this.size)},this.structure=void 0,this.width="unset",this.height="unset",this.borderRadius="unset",this.marginBottom="unset",this.marginTop="unset",this.marginLeft="unset",this.marginRight="unset",this.animation=!0,this.rows=0,this.size="100%"}handleStructureChange(e,t){t!==e&&this.handleStructure(e)}handleStylingProps(e){switch(typeof e){case"number":return 0===e?0:`${e}px`;case"undefined":default:return"unset";case"string":return["auto","unset","none","inherit","initial"].includes(e)||e.endsWith("px")||e.endsWith("%")?e:"unset"}}handleStructure(e){switch(e){case"logo":return this.renderLogo();case"image":return this.renderImage();case"title":return this.renderTitle();case"text":return this.renderText();case"rectangle":return this.renderRectangle();case"circle":return this.renderCircle();default:return null}}renderLogo(){return t("div",{class:"SkeletonContainer"},t("div",{class:"SkeletonLogo "+(this.animation?"Skeleton":"")}))}renderImage(){return t("div",{class:"SkeletonImage "+(this.animation?"Skeleton":"")})}renderTitle(){return t("div",{class:"SkeletonContainer"},t("div",{class:"SkeletonTitle "+(this.animation?"Skeleton":"")}))}renderText(){return t("div",{class:"SkeletonContainer"},Array.from({length:this.rows>0?this.rows:1}).map(((e,n)=>t("div",{key:n,class:"SkeletonText "+(this.animation?"Skeleton":"")}))))}renderRectangle(){return t("div",{class:"SkeletonContainer"},t("div",{class:"SkeletonRectangle "+(this.animation?"Skeleton":"")}))}renderCircle(){return t("div",{class:"SkeletonContainer"},t("div",{class:"SkeletonCircle "+(this.animation?"Skeleton":"")}))}render(){let e="";switch(this.structure){case"logo":e=`\n :host {\n --emw-skeleton-logo-width: ${this.stylingValue.width};\n --emw-skeleton-logo-height: ${this.stylingValue.height};\n --emw-skeleton-logo-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-logo-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-logo-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-logo-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-logo-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"image":e=`\n :host {\n --emw-skeleton-image-width: ${this.stylingValue.width};\n --emw-skeleton-image-height: ${this.stylingValue.height};\n --emw-skeleton-image-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-image-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-image-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-image-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-image-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"title":e=`\n :host {\n --emw-skeleton-title-width: ${this.stylingValue.width};\n --emw-skeleton-title-height: ${this.stylingValue.height};\n --emw-skeleton-title-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-title-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-title-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-title-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-title-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"text":e=`\n :host {\n --emw-skeleton-text-width: ${this.stylingValue.width};\n --emw-skeleton-text-height: ${this.stylingValue.height};\n --emw-skeleton-text-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-text-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-text-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-text-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-text-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"rectangle":e=`\n :host {\n --emw-skeleton-rectangle-width: ${this.stylingValue.width};\n --emw-skeleton-rectangle-height: ${this.stylingValue.height};\n --emw-skeleton-rectangle-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-rectangle-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-rectangle-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-rectangle-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-rectangle-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"circle":e=`\n :host {\n --emw-skeleton-circle-size: ${this.stylingValue.size};\n }\n `;break;default:e=""}return t(n,{key:"c2a2650acd416962a2bc4e1a7ee18bc6d8e2def8"},t("style",{key:"9bd7fc1f9e9ed9f17735a7b72fce6f09696f5e19"},e),this.handleStructure(this.structure))}static get watchers(){return{structure:["handleStructureChange"]}}};i.style=":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.SkeletonRectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.SkeletonCircle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.SkeletonText{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.SkeletonText:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.SkeletonTitle{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.SkeletonImage{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.SkeletonLogo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}";export{i as ui_skeleton}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { sass } from "@stencil/sass";
|
|
2
|
+
export const config = {
|
|
3
|
+
namespace: 'pam-profile-consents',
|
|
4
|
+
taskQueue: 'async',
|
|
5
|
+
sourceMap: false,
|
|
6
|
+
minifyJs: true,
|
|
7
|
+
hashFileNames: false,
|
|
8
|
+
extras: {
|
|
9
|
+
experimentalImportInjection: true
|
|
10
|
+
},
|
|
11
|
+
plugins: [sass()],
|
|
12
|
+
outputTargets: [
|
|
13
|
+
{
|
|
14
|
+
type: 'www'
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { sass } from "@stencil/sass";
|
|
2
|
+
import { cleanPackageJsonStencil } from "../../../tools/plugins";
|
|
3
|
+
export const config = {
|
|
4
|
+
namespace: 'pam-profile-consents',
|
|
5
|
+
taskQueue: 'async',
|
|
6
|
+
sourceMap: false,
|
|
7
|
+
minifyJs: true,
|
|
8
|
+
hashFileNames: false,
|
|
9
|
+
extras: {
|
|
10
|
+
experimentalImportInjection: true
|
|
11
|
+
},
|
|
12
|
+
plugins: [sass(), cleanPackageJsonStencil()],
|
|
13
|
+
outputTargets: [
|
|
14
|
+
{
|
|
15
|
+
type: 'dist',
|
|
16
|
+
esmLoaderPath: '../loader'
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import path from "path";
|
|
2
|
+
import { getStoryFiles, detectUsedPackages, parseTsConfig, exec, filterParsedPathsByUsedPackages } from "../../../../libs/common/src/storybook/storybook-utils";
|
|
3
|
+
const config = {
|
|
4
|
+
stories: ['../**/*.@(mdx|stories.@(js|ts|tsx))'],
|
|
5
|
+
addons: [
|
|
6
|
+
'@storybook/addon-essentials',
|
|
7
|
+
'@storybook/addon-interactions',
|
|
8
|
+
'storybook-dark-mode'
|
|
9
|
+
],
|
|
10
|
+
docs: {
|
|
11
|
+
defaultName: 'Documentation',
|
|
12
|
+
autodocs: 'tag'
|
|
13
|
+
},
|
|
14
|
+
framework: {
|
|
15
|
+
name: '@storybook/web-components-vite',
|
|
16
|
+
options: {}
|
|
17
|
+
},
|
|
18
|
+
viteFinal: async (config) => {
|
|
19
|
+
const storyFiles = getStoryFiles(path.resolve(__dirname, '../'));
|
|
20
|
+
const usedPackages = detectUsedPackages(storyFiles);
|
|
21
|
+
const buildPromises = usedPackages.map(async (pkg) => {
|
|
22
|
+
try {
|
|
23
|
+
console.log(`Building package ${pkg}...`);
|
|
24
|
+
const { stdout, stderr } = await exec(`nx run ${pkg}:build`);
|
|
25
|
+
console.log(`Built package ${pkg}: ${stdout}`);
|
|
26
|
+
if (stderr) {
|
|
27
|
+
console.error(`Build warning/error for package ${pkg}: ${stderr}`);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
console.error(`Error building package ${pkg}:`, error);
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
await Promise.all(buildPromises);
|
|
35
|
+
const parsedPaths = parseTsConfig() || {};
|
|
36
|
+
const filteredParsedPaths = filterParsedPathsByUsedPackages(parsedPaths, usedPackages);
|
|
37
|
+
return Object.assign(Object.assign({}, config), { resolve: {
|
|
38
|
+
alias: Object.assign({}, filteredParsedPaths)
|
|
39
|
+
}, define: {
|
|
40
|
+
process: {
|
|
41
|
+
env: {}
|
|
42
|
+
}
|
|
43
|
+
} });
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
export default config;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { themes } from "@storybook/theming";
|
|
2
|
+
export const parameters = {
|
|
3
|
+
darkMode: {
|
|
4
|
+
dark: Object.assign(Object.assign({}, themes.dark), { appBg: 'black' }),
|
|
5
|
+
light: Object.assign(Object.assign({}, themes.normal), { appBg: 'green' }),
|
|
6
|
+
current: 'light',
|
|
7
|
+
stylePreview: true
|
|
8
|
+
}
|
|
9
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { exec as execCallback } from 'child_process';
|
|
3
|
+
export declare const exec: typeof execCallback.__promisify__;
|
|
4
|
+
/**
|
|
5
|
+
* Recursively retrieves all story files (.stories.ts/.stories.tsx) in a directory.
|
|
6
|
+
* @param dir The directory to search.
|
|
7
|
+
* @returns Array of story file paths.
|
|
8
|
+
*/
|
|
9
|
+
export declare const getStoryFiles: (dir: string) => string[];
|
|
10
|
+
/**
|
|
11
|
+
* Detects which internal packages are used in the provided story files.
|
|
12
|
+
* It looks at every import that starts with the given package alias prefix,
|
|
13
|
+
* then extracts the package name (the segment immediately following the prefix).
|
|
14
|
+
*
|
|
15
|
+
* @param stories Array of story file paths.
|
|
16
|
+
* @returns Array of unique package names (e.g. ['foo', 'bar']).
|
|
17
|
+
*/
|
|
18
|
+
export declare const detectUsedPackages: (stories: string[]) => string[];
|
|
19
|
+
/**
|
|
20
|
+
* Extracts all import paths from a file using the TypeScript compiler API.
|
|
21
|
+
* @param filePath The file path to parse.
|
|
22
|
+
* @returns Array of import strings.
|
|
23
|
+
*/
|
|
24
|
+
export declare const extractImports: (filePath: string) => string[];
|
|
25
|
+
/**
|
|
26
|
+
* Parses the tsconfig paths and resolves them to absolute paths.
|
|
27
|
+
* @param tsconfigPath The path to the tsconfig file.
|
|
28
|
+
* @returns An object mapping alias keys to absolute paths.
|
|
29
|
+
*/
|
|
30
|
+
export declare const parseTsConfig: () => Record<string, string> | null;
|
|
31
|
+
/**
|
|
32
|
+
* Filters the parsed tsconfig alias mapping to only include keys that correspond
|
|
33
|
+
* to the used packages.
|
|
34
|
+
*
|
|
35
|
+
* @param parsedPaths The full alias mapping from tsconfig.
|
|
36
|
+
* @param usedPackages Array of package names that are used (e.g. ['foo', 'bar']).
|
|
37
|
+
* @returns Filtered alias mapping.
|
|
38
|
+
*/
|
|
39
|
+
export declare const filterParsedPathsByUsedPackages: (parsedPaths: Record<string, string>, usedPackages: string[]) => Record<string, string>;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
export declare const parameters: {
|
|
2
|
+
darkMode: {
|
|
3
|
+
dark: {
|
|
4
|
+
appBg: string;
|
|
5
|
+
base: "light" | "dark";
|
|
6
|
+
colorPrimary: string;
|
|
7
|
+
colorSecondary: string;
|
|
8
|
+
appContentBg: string;
|
|
9
|
+
appPreviewBg: string;
|
|
10
|
+
appBorderColor: string;
|
|
11
|
+
appBorderRadius: number;
|
|
12
|
+
fontBase: string;
|
|
13
|
+
fontCode: string;
|
|
14
|
+
textColor: string;
|
|
15
|
+
textInverseColor: string;
|
|
16
|
+
textMutedColor: string;
|
|
17
|
+
barTextColor: string;
|
|
18
|
+
barHoverColor: string;
|
|
19
|
+
barSelectedColor: string;
|
|
20
|
+
barBg: string;
|
|
21
|
+
buttonBg: string;
|
|
22
|
+
buttonBorder: string;
|
|
23
|
+
booleanBg: string;
|
|
24
|
+
booleanSelectedBg: string;
|
|
25
|
+
inputBg: string;
|
|
26
|
+
inputBorder: string;
|
|
27
|
+
inputTextColor: string;
|
|
28
|
+
inputBorderRadius: number;
|
|
29
|
+
brandTitle?: string;
|
|
30
|
+
brandUrl?: string;
|
|
31
|
+
brandImage?: string;
|
|
32
|
+
brandTarget?: string;
|
|
33
|
+
gridCellSize?: number;
|
|
34
|
+
};
|
|
35
|
+
light: {
|
|
36
|
+
appBg: string;
|
|
37
|
+
base: "light" | "dark";
|
|
38
|
+
colorPrimary: string;
|
|
39
|
+
colorSecondary: string;
|
|
40
|
+
appContentBg: string;
|
|
41
|
+
appPreviewBg: string;
|
|
42
|
+
appBorderColor: string;
|
|
43
|
+
appBorderRadius: number;
|
|
44
|
+
fontBase: string;
|
|
45
|
+
fontCode: string;
|
|
46
|
+
textColor: string;
|
|
47
|
+
textInverseColor: string;
|
|
48
|
+
textMutedColor: string;
|
|
49
|
+
barTextColor: string;
|
|
50
|
+
barHoverColor: string;
|
|
51
|
+
barSelectedColor: string;
|
|
52
|
+
barBg: string;
|
|
53
|
+
buttonBg: string;
|
|
54
|
+
buttonBorder: string;
|
|
55
|
+
booleanBg: string;
|
|
56
|
+
booleanSelectedBg: string;
|
|
57
|
+
inputBg: string;
|
|
58
|
+
inputBorder: string;
|
|
59
|
+
inputTextColor: string;
|
|
60
|
+
inputBorderRadius: number;
|
|
61
|
+
brandTitle?: string;
|
|
62
|
+
brandUrl?: string;
|
|
63
|
+
brandImage?: string;
|
|
64
|
+
brandTarget?: string;
|
|
65
|
+
gridCellSize?: number;
|
|
66
|
+
};
|
|
67
|
+
current: string;
|
|
68
|
+
stylePreview: boolean;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PamProfileConsents } from './pam-profile-consents';
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import "../../../../../../dist/packages/stencil/ui-skeleton/dist/types/index";
|
|
2
|
+
interface ConsentItem {
|
|
3
|
+
id: string;
|
|
4
|
+
expirationDateTime: string;
|
|
5
|
+
status: string;
|
|
6
|
+
friendlyName: string;
|
|
7
|
+
tagCode: string;
|
|
8
|
+
mustAccept: boolean;
|
|
9
|
+
category: {
|
|
10
|
+
categoryTagCode: string;
|
|
11
|
+
friendlyName: string;
|
|
12
|
+
} | null;
|
|
13
|
+
}
|
|
14
|
+
export declare class PamProfileConsents {
|
|
15
|
+
/** User session required for the API calls */
|
|
16
|
+
session: string;
|
|
17
|
+
/** Endpoint URL for the source of data */
|
|
18
|
+
endpoint: string;
|
|
19
|
+
/** Language of the widget */
|
|
20
|
+
lang: string;
|
|
21
|
+
/** mbSource */
|
|
22
|
+
mbSource: string;
|
|
23
|
+
/** Client custom styling via inline style */
|
|
24
|
+
clientStyling: string;
|
|
25
|
+
/** Client custom styling via url */
|
|
26
|
+
clientStylingUrl: string;
|
|
27
|
+
/** Translation url */
|
|
28
|
+
translationUrl: string;
|
|
29
|
+
skeletonLoading: boolean;
|
|
30
|
+
isError: boolean;
|
|
31
|
+
errorMessage: string;
|
|
32
|
+
hasChanges: boolean;
|
|
33
|
+
isSaving: boolean;
|
|
34
|
+
consentsState: Record<string, boolean>;
|
|
35
|
+
private stylingContainer;
|
|
36
|
+
private stylingSubscription;
|
|
37
|
+
private isMobileDevice;
|
|
38
|
+
private allConsents;
|
|
39
|
+
private categories;
|
|
40
|
+
private ungroupedConsents;
|
|
41
|
+
handleStylingChange(newValue: string, oldValue: string): void;
|
|
42
|
+
handleStylingUrlChange(newValue: string, oldValue: string): void;
|
|
43
|
+
componentWillLoad(): Promise<void>;
|
|
44
|
+
componentDidLoad(): void;
|
|
45
|
+
disconnectedCallback(): void;
|
|
46
|
+
handleFetchResponse: (res: Response) => Promise<any>;
|
|
47
|
+
getConsentsData: () => Promise<void>;
|
|
48
|
+
processConsents: () => void;
|
|
49
|
+
toggleConsent: (tagCode: string) => void;
|
|
50
|
+
saveConsents: () => void;
|
|
51
|
+
renderCheckbox: (consent: ConsentItem) => any;
|
|
52
|
+
render(): any;
|
|
53
|
+
}
|
|
54
|
+
export {};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/**
|
|
4
|
+
* This is an autogenerated file created by the Stencil compiler.
|
|
5
|
+
* It contains typing information for all components that exist in this project.
|
|
6
|
+
*/
|
|
7
|
+
import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
|
8
|
+
export namespace Components {
|
|
9
|
+
interface PamProfileConsents {
|
|
10
|
+
/**
|
|
11
|
+
* Client custom styling via inline style
|
|
12
|
+
*/
|
|
13
|
+
"clientStyling": string;
|
|
14
|
+
/**
|
|
15
|
+
* Client custom styling via url
|
|
16
|
+
*/
|
|
17
|
+
"clientStylingUrl": string;
|
|
18
|
+
/**
|
|
19
|
+
* Endpoint URL for the source of data
|
|
20
|
+
*/
|
|
21
|
+
"endpoint": string;
|
|
22
|
+
/**
|
|
23
|
+
* Language of the widget
|
|
24
|
+
*/
|
|
25
|
+
"lang": string;
|
|
26
|
+
/**
|
|
27
|
+
* mbSource
|
|
28
|
+
*/
|
|
29
|
+
"mbSource": string;
|
|
30
|
+
/**
|
|
31
|
+
* User session required for the API calls
|
|
32
|
+
*/
|
|
33
|
+
"session": string;
|
|
34
|
+
/**
|
|
35
|
+
* Translation url
|
|
36
|
+
*/
|
|
37
|
+
"translationUrl": string;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
declare global {
|
|
41
|
+
interface HTMLPamProfileConsentsElement extends Components.PamProfileConsents, HTMLStencilElement {
|
|
42
|
+
}
|
|
43
|
+
var HTMLPamProfileConsentsElement: {
|
|
44
|
+
prototype: HTMLPamProfileConsentsElement;
|
|
45
|
+
new (): HTMLPamProfileConsentsElement;
|
|
46
|
+
};
|
|
47
|
+
interface HTMLElementTagNameMap {
|
|
48
|
+
"pam-profile-consents": HTMLPamProfileConsentsElement;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
declare namespace LocalJSX {
|
|
52
|
+
interface PamProfileConsents {
|
|
53
|
+
/**
|
|
54
|
+
* Client custom styling via inline style
|
|
55
|
+
*/
|
|
56
|
+
"clientStyling"?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Client custom styling via url
|
|
59
|
+
*/
|
|
60
|
+
"clientStylingUrl"?: string;
|
|
61
|
+
/**
|
|
62
|
+
* Endpoint URL for the source of data
|
|
63
|
+
*/
|
|
64
|
+
"endpoint"?: string;
|
|
65
|
+
/**
|
|
66
|
+
* Language of the widget
|
|
67
|
+
*/
|
|
68
|
+
"lang"?: string;
|
|
69
|
+
/**
|
|
70
|
+
* mbSource
|
|
71
|
+
*/
|
|
72
|
+
"mbSource"?: string;
|
|
73
|
+
/**
|
|
74
|
+
* User session required for the API calls
|
|
75
|
+
*/
|
|
76
|
+
"session"?: string;
|
|
77
|
+
/**
|
|
78
|
+
* Translation url
|
|
79
|
+
*/
|
|
80
|
+
"translationUrl"?: string;
|
|
81
|
+
}
|
|
82
|
+
interface IntrinsicElements {
|
|
83
|
+
"pam-profile-consents": PamProfileConsents;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
export { LocalJSX as JSX };
|
|
87
|
+
declare module "@stencil/core" {
|
|
88
|
+
export namespace JSX {
|
|
89
|
+
interface IntrinsicElements {
|
|
90
|
+
"pam-profile-consents": LocalJSX.PamProfileConsents & JSXBase.HTMLAttributes<HTMLPamProfileConsentsElement>;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components/pam-profile-consents';
|