@digital-realty/app-shell 11.0.11 → 11.0.12
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/app-DOZ88gJn.js +1512 -0
- package/dist/bootstrap.js +1 -1
- package/dist/logout-CEMELcLl.js +1 -0
- package/package.json +2 -12
- package/dist/app-BDxFz3m9.js +0 -1512
- package/dist/logout-DwQJmwiJ.js +0 -1
package/dist/logout-DwQJmwiJ.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{LitElement as m,html as g}from"lit";import{appState as i}from"@digital-realty/ix-app-logic/state/app-state.js";import{g as h,P as d,a as u,u as a,c as S}from"./bootstrap.js";import"tslib";import"lit/decorators.js";import"@microsoft/applicationinsights-web";import"@digital-realty/ix-account-switcher";import"oidc-client-ts";import"@digital-realty/ix-app-logic/views/splash-screen.js";import"mobx";var p=Object.defineProperty,f=(r,e,t)=>e in r?p(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,s=(r,e,t)=>f(r,typeof e!="symbol"?e+"":e,t);class c extends m{constructor(){super(...arguments),s(this,"isIdle",!1),s(this,"clearLocalStorageExcept",e=>{const t=new Set((typeof e=="string"?e.split(","):[]).map(o=>o.trim().toLowerCase())),n=[];Object.keys(window.localStorage).forEach(o=>{Array.from(t).some(l=>o.toLowerCase().includes(l))||n.push(o)}),n.forEach(o=>window.localStorage.removeItem(o))}),s(this,"clearGridSessionStorage",()=>{Object.keys(sessionStorage).filter(e=>e.startsWith("grid-")).forEach(e=>sessionStorage.removeItem(e))}),s(this,"logout",async()=>{i.lastActive=-1,await i.hydrateStore(),await i.getStoredData();const e=h();this.clearState(),this.clearLocalStorageExcept(d),this.clearGridSessionStorage(),sessionStorage.removeItem("accountSelection:lastAll"),sessionStorage.removeItem("accountSelection:lastFiltered"),this.unregisterServiceWorkers().then(async()=>{if(this.isIdle)try{u||await a.signoutSilent(e),window.location.href="/session-expired"}catch(t){window.location.href="/session-expired"}else{if(!e){await a.clearStaleState(),window.location.href="/authenticate";return}a.signoutRedirect(e)}})}),s(this,"unregisterServiceWorkers",async()=>{const e=await navigator.serviceWorker.getRegistrations();for(const t of e)t.unregister()}),s(this,"clearState",()=>{S()})}firstUpdated(){const{searchParams:e}=new URL(document.location.toString());this.isIdle=e.has("isIdle"),this.logout()}render(){return g` <splash-screen></splash-screen> `}}window.customElements.define("ixp-logout",c);export{c as Logout};
|