@everymatrix/pam-logout 1.88.6 → 1.88.7
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/index.cjs.js +1 -1
- package/dist/cjs/{pam-logout-ae1d3392.js → pam-logout-165633d8.js} +1 -1
- package/dist/cjs/pam-logout.cjs.entry.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/{pam-logout-539ff4bc.js → pam-logout-d1d88a9e.js} +1 -1
- package/dist/esm/pam-logout.entry.js +1 -1
- package/dist/pam-logout/index.esm.js +1 -1
- package/dist/pam-logout/pam-logout-d1d88a9e.js +1 -0
- package/dist/pam-logout/pam-logout.entry.js +1 -1
- package/package.json +1 -1
- package/dist/pam-logout/pam-logout-539ff4bc.js +0 -1
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -100,7 +100,7 @@ function getAdoptStyleSubscription(stylingContainer, domain) {
|
|
|
100
100
|
|
|
101
101
|
const shadowRoot = stylingContainer.getRootNode();
|
|
102
102
|
const cacheStyleObject = window[StyleCacheKey];
|
|
103
|
-
let cachedStyle = cacheStyleObject[domain]
|
|
103
|
+
let cachedStyle = cacheStyleObject[domain] && cacheStyleObject[domain].sheet;
|
|
104
104
|
|
|
105
105
|
if (!cachedStyle) {
|
|
106
106
|
cachedStyle = new CSSStyleSheet();
|
package/dist/esm/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { P as PamLogout } from './pam-logout-
|
|
1
|
+
export { P as PamLogout } from './pam-logout-d1d88a9e.js';
|
|
2
2
|
import './index-1abc369e.js';
|
|
@@ -98,7 +98,7 @@ function getAdoptStyleSubscription(stylingContainer, domain) {
|
|
|
98
98
|
|
|
99
99
|
const shadowRoot = stylingContainer.getRootNode();
|
|
100
100
|
const cacheStyleObject = window[StyleCacheKey];
|
|
101
|
-
let cachedStyle = cacheStyleObject[domain]
|
|
101
|
+
let cachedStyle = cacheStyleObject[domain] && cacheStyleObject[domain].sheet;
|
|
102
102
|
|
|
103
103
|
if (!cachedStyle) {
|
|
104
104
|
cachedStyle = new CSSStyleSheet();
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { P as pam_logout } from './pam-logout-
|
|
1
|
+
export { P as pam_logout } from './pam-logout-d1d88a9e.js';
|
|
2
2
|
import './index-1abc369e.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{P as PamLogout}from"./pam-logout-
|
|
1
|
+
export{P as PamLogout}from"./pam-logout-d1d88a9e.js";import"./index-1abc369e.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as e}from"./index-1abc369e.js";const o="__WIDGET_GLOBAL_STYLE_CACHE__";function n(t,e){if(t){const o=document.createElement("style");o.innerHTML=e,t.appendChild(o)}}function i(t,e){if(!t||!e)return;const o=new URL(e);fetch(o.href).then((t=>t.text())).then((e=>{const o=document.createElement("style");o.innerHTML=e,t&&t.appendChild(o)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}function a(t,e,n,i=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!i)return n=function(t,e){const o=document.createElement("style");return window.emMessageBus.subscribe(e,(e=>{t&&(o.innerHTML=e,t.appendChild(o))}))}(t,e),n;window[o]||(window[o]={}),n=function(t,e){return window.emMessageBus.subscribe(e,(n=>{if(!t)return;const i=t.getRootNode(),a=window[o];let s=a[e]&&a[e].sheet;s?a[e].refCount=a[e].refCount+1:(s=new CSSStyleSheet,s.replaceSync(n),a[e]={sheet:s,refCount:1});const l=i.adoptedStyleSheets||[];l.includes(s)||(i.adoptedStyleSheets=[...l,s])}))}(t,e);const a=n.unsubscribe.bind(n);return n.unsubscribe=()=>{if(window[o][e]){const t=window[o][e];t.refCount>1?t.refCount=t.refCount-1:delete window[o][e]}a()},n}const s={en:{logoutButton:"Logout"},hu:{logoutButton:"Logout"},ro:{logoutButton:"Logout"},fr:{logoutButton:"Déconnexion"},tr:{logoutButton:"Çıkış Yap"},hr:{logoutButton:"Logout"},"pt-br":{logoutButton:"Logout"},"es-mx":{logoutButton:"Logout"}},l=class{constructor(e){t(this,e),this.device=function(){const t=navigator.userAgent.toLowerCase(),e=screen.availWidth,o=screen.availHeight;if(t.includes("iphone"))return"mobile";if(t.includes("android")){if(o>e&&e<800)return"mobile";if(e>o&&o<800)return"tablet"}return"desktop"}(),this.handleLogout=async()=>{var t,e;try{const o=new Headers;o.append("accept","text/plain"),o.append("X-SessionId",this.session);const n={method:"POST",headers:o},i=await fetch(`${this.endpoint}/api/pam/v1/logout`,n);if(!i.ok)throw new Error(`Logout failed with status: ${i.status}`);{let o=await i.json();"LOGGEDOFF"===(null===(e=null===(t=null==o?void 0:o.session)||void 0===t?void 0:t.details)||void 0===e?void 0:e.exitReason)&&(window.postMessage({type:"LogoutSuccessfull"},window.location.href),((t,e={})=>{const o=new CustomEvent("track-custom-event",{detail:{type:"logged_out",data:e},bubbles:!0,composed:!0});document.dispatchEvent(o)})(0,{}))}}catch(t){console.error("Logout error:",t),window.postMessage({type:"LogoutFailed"},window.location.href)}},this.endpoint=void 0,this.session=void 0,this.language="en",this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.translationUrl=""}handleClientStylingChange(t,e){t!==e&&this.stylingContainer&&n(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!==e&&this.stylingContainer&&i(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!==e&&this.stylingContainer&&a(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}async componentWillLoad(){if(!this.endpoint||!this.session)throw new Error("endpoint and session props are required");var t;this.translationUrl&&this.translationUrl.length>2&&await(t=this.translationUrl,new Promise((e=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{for(let o in t[e])s[e][o]=t[e][o]})),e(!0)}))})))}componentDidLoad(){this.stylingContainer&&(this.mbSource&&a(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&n(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&i(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}render(){return e("div",{key:"ebbb1f2c1c2950f00444fb899235a42c1fbcb10e",class:"LogoutContainer",ref:t=>this.stylingContainer=t},e("p",{key:"891bd35bc62a23c4b3668faacd1015364a252fb5",class:{PlayerAccountMenuItemBox:!0,PlayerAccountMenuItemBoxMobile:"mobile"===this.device,PlayerAccountMenuItemBoxTablet:"tablet"===this.device},onClick:this.handleLogout},e("span",{key:"93e18c0751156d5f4e5085229dc9b68a946ec35a",style:{width:"tablet"===this.device?"24px":"20px"}},e("svg",{key:"d77c42b64be06052f72da3867f84dd8408fc8f3b",id:"bbfaf345-72af-4296-bf4b-2fd41fc03d5d","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 150 150",width:"100%",height:"100%"},e("path",{key:"771a1db24255b9817c462a034550f04bb0754e57",class:"icon-path",d:"M147.16,67.69,115.42,36a9.6,9.6,0,1,0-13.58,13.58l15.32,15.31H49.58a9.63,9.63,0,1,0,0,19.26h67.58L101.84,99.42a9.64,9.64,0,0,0,6.79,16.43,9.41,9.41,0,0,0,6.79-2.85l31.74-31.73a9.53,9.53,0,0,0,0-13.58Z"}),e("path",{key:"5e0592b92da57312febec43af1b8360f5f76abdb",class:"icon-path",d:"M45.16,122.16H19.26V26.79H45.32a9.63,9.63,0,1,0,0-19.26H9.63A9.56,9.56,0,0,0,0,17.16V131.63a9.57,9.57,0,0,0,9.63,9.64H45.32A9.57,9.57,0,0,0,55,131.63a9.78,9.78,0,0,0-9.79-9.47Z"}))),"mobile"!==this.device&&e("span",{key:"eb1d8a4430b07418db8de665f98b3e8a9d9def75",class:"PlayerLogoutText"},((t,e)=>{let o=s[void 0!==e?e:"en"].logoutButton;return o})(0,this.language))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};l.style=":host{display:block}:host *,:host *::before,:host *::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.PlayerAccountMenuItemBox{padding:20px;font-size:16px;display:inline-flex;width:100%;box-sizing:border-box;align-items:center;cursor:pointer}.PlayerAccountMenuItemBox .PlayerLogoutText{margin-left:20px}.PlayerAccountMenuItemBox svg{display:block;width:100%;height:100%}.PlayerAccountMenuItemBox svg .logout-icon-path{fill:var(--emw--pam-typography-color-nav-bg, var(--emw--color-white, #FFFFFF))}.PlayerAccountMenuItemBoxMobile.PlayerAccountMenuItemBox{height:auto;justify-content:center;position:relative;display:flex;width:unset;padding:0}.PlayerAccountMenuItemBoxMobile.PlayerAccountMenuItemBox svg .logout-icon-path{fill:var(--emw--pam-typography-color-nav-bg, var(--emw--color-white, #FFFFFF))}";export{l as P}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{P as pam_logout}from"./pam-logout-
|
|
1
|
+
export{P as pam_logout}from"./pam-logout-d1d88a9e.js";import"./index-1abc369e.js";
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as e}from"./index-1abc369e.js";const o="__WIDGET_GLOBAL_STYLE_CACHE__";function n(t,e){if(t){const o=document.createElement("style");o.innerHTML=e,t.appendChild(o)}}function i(t,e){if(!t||!e)return;const o=new URL(e);fetch(o.href).then((t=>t.text())).then((e=>{const o=document.createElement("style");o.innerHTML=e,t&&t.appendChild(o)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}function a(t,e,n,i=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!i)return n=function(t,e){const o=document.createElement("style");return window.emMessageBus.subscribe(e,(e=>{t&&(o.innerHTML=e,t.appendChild(o))}))}(t,e),n;window[o]||(window[o]={}),n=function(t,e){return window.emMessageBus.subscribe(e,(n=>{if(!t)return;const i=t.getRootNode(),a=window[o];let s=a[e]?.sheet;s?a[e].refCount=a[e].refCount+1:(s=new CSSStyleSheet,s.replaceSync(n),a[e]={sheet:s,refCount:1});const l=i.adoptedStyleSheets||[];l.includes(s)||(i.adoptedStyleSheets=[...l,s])}))}(t,e);const a=n.unsubscribe.bind(n);return n.unsubscribe=()=>{if(window[o][e]){const t=window[o][e];t.refCount>1?t.refCount=t.refCount-1:delete window[o][e]}a()},n}const s={en:{logoutButton:"Logout"},hu:{logoutButton:"Logout"},ro:{logoutButton:"Logout"},fr:{logoutButton:"Déconnexion"},tr:{logoutButton:"Çıkış Yap"},hr:{logoutButton:"Logout"},"pt-br":{logoutButton:"Logout"},"es-mx":{logoutButton:"Logout"}},l=class{constructor(e){t(this,e),this.device=function(){const t=navigator.userAgent.toLowerCase(),e=screen.availWidth,o=screen.availHeight;if(t.includes("iphone"))return"mobile";if(t.includes("android")){if(o>e&&e<800)return"mobile";if(e>o&&o<800)return"tablet"}return"desktop"}(),this.handleLogout=async()=>{var t,e;try{const o=new Headers;o.append("accept","text/plain"),o.append("X-SessionId",this.session);const n={method:"POST",headers:o},i=await fetch(`${this.endpoint}/api/pam/v1/logout`,n);if(!i.ok)throw new Error(`Logout failed with status: ${i.status}`);{let o=await i.json();"LOGGEDOFF"===(null===(e=null===(t=null==o?void 0:o.session)||void 0===t?void 0:t.details)||void 0===e?void 0:e.exitReason)&&(window.postMessage({type:"LogoutSuccessfull"},window.location.href),((t,e={})=>{const o=new CustomEvent("track-custom-event",{detail:{type:"logged_out",data:e},bubbles:!0,composed:!0});document.dispatchEvent(o)})(0,{}))}}catch(t){console.error("Logout error:",t),window.postMessage({type:"LogoutFailed"},window.location.href)}},this.endpoint=void 0,this.session=void 0,this.language="en",this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.translationUrl=""}handleClientStylingChange(t,e){t!==e&&this.stylingContainer&&n(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!==e&&this.stylingContainer&&i(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!==e&&this.stylingContainer&&a(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}async componentWillLoad(){if(!this.endpoint||!this.session)throw new Error("endpoint and session props are required");var t;this.translationUrl&&this.translationUrl.length>2&&await(t=this.translationUrl,new Promise((e=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{for(let o in t[e])s[e][o]=t[e][o]})),e(!0)}))})))}componentDidLoad(){this.stylingContainer&&(this.mbSource&&a(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&n(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&i(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}render(){return e("div",{key:"ebbb1f2c1c2950f00444fb899235a42c1fbcb10e",class:"LogoutContainer",ref:t=>this.stylingContainer=t},e("p",{key:"891bd35bc62a23c4b3668faacd1015364a252fb5",class:{PlayerAccountMenuItemBox:!0,PlayerAccountMenuItemBoxMobile:"mobile"===this.device,PlayerAccountMenuItemBoxTablet:"tablet"===this.device},onClick:this.handleLogout},e("span",{key:"93e18c0751156d5f4e5085229dc9b68a946ec35a",style:{width:"tablet"===this.device?"24px":"20px"}},e("svg",{key:"d77c42b64be06052f72da3867f84dd8408fc8f3b",id:"bbfaf345-72af-4296-bf4b-2fd41fc03d5d","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 150 150",width:"100%",height:"100%"},e("path",{key:"771a1db24255b9817c462a034550f04bb0754e57",class:"icon-path",d:"M147.16,67.69,115.42,36a9.6,9.6,0,1,0-13.58,13.58l15.32,15.31H49.58a9.63,9.63,0,1,0,0,19.26h67.58L101.84,99.42a9.64,9.64,0,0,0,6.79,16.43,9.41,9.41,0,0,0,6.79-2.85l31.74-31.73a9.53,9.53,0,0,0,0-13.58Z"}),e("path",{key:"5e0592b92da57312febec43af1b8360f5f76abdb",class:"icon-path",d:"M45.16,122.16H19.26V26.79H45.32a9.63,9.63,0,1,0,0-19.26H9.63A9.56,9.56,0,0,0,0,17.16V131.63a9.57,9.57,0,0,0,9.63,9.64H45.32A9.57,9.57,0,0,0,55,131.63a9.78,9.78,0,0,0-9.79-9.47Z"}))),"mobile"!==this.device&&e("span",{key:"eb1d8a4430b07418db8de665f98b3e8a9d9def75",class:"PlayerLogoutText"},((t,e)=>{let o=s[void 0!==e?e:"en"].logoutButton;return o})(0,this.language))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};l.style=":host{display:block}:host *,:host *::before,:host *::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.PlayerAccountMenuItemBox{padding:20px;font-size:16px;display:inline-flex;width:100%;box-sizing:border-box;align-items:center;cursor:pointer}.PlayerAccountMenuItemBox .PlayerLogoutText{margin-left:20px}.PlayerAccountMenuItemBox svg{display:block;width:100%;height:100%}.PlayerAccountMenuItemBox svg .logout-icon-path{fill:var(--emw--pam-typography-color-nav-bg, var(--emw--color-white, #FFFFFF))}.PlayerAccountMenuItemBoxMobile.PlayerAccountMenuItemBox{height:auto;justify-content:center;position:relative;display:flex;width:unset;padding:0}.PlayerAccountMenuItemBoxMobile.PlayerAccountMenuItemBox svg .logout-icon-path{fill:var(--emw--pam-typography-color-nav-bg, var(--emw--color-white, #FFFFFF))}";export{l as P}
|