@digital-realty/ui-launchpad 18.0.3 → 18.0.4-IXUAT-11352.572165

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/sw.js CHANGED
@@ -1,2 +1,2 @@
1
- if(!self.define){let e,i={};const n=(n,t)=>(n=new URL(n+".js",t).href,i[n]||new Promise(i=>{if("document"in self){const e=document.createElement("script");e.src=n,e.onload=i,document.head.appendChild(e)}else e=n,importScripts(n),i()}).then(()=>{let e=i[n];if(!e)throw new Error(`Module ${n} didn’t register its module`);return e}));self.define=(t,o)=>{const r=e||("document"in self?document.currentScript.src:"")||location.href;if(i[r])return;let s={};const l=e=>n(e,r),c={module:{uri:r},exports:s,require:l};i[r]=Promise.all(t.map(e=>c[e]||l(e))).then(e=>(o(...e),s))}}define(["./workbox-b865b753"],function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"index.html",revision:"2c69eb2da85c9b2ee93b0c537cf41d78"},{url:"ui-launchpad.js",revision:"78b9f51460697d6808220422f0d996b1"}],{}),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("/index.html"))),e.registerRoute("polyfills/*.js",new e.CacheFirst,"GET")});
1
+ if(!self.define){let e,i={};const n=(n,t)=>(n=new URL(n+".js",t).href,i[n]||new Promise(i=>{if("document"in self){const e=document.createElement("script");e.src=n,e.onload=i,document.head.appendChild(e)}else e=n,importScripts(n),i()}).then(()=>{let e=i[n];if(!e)throw new Error(`Module ${n} didn’t register its module`);return e}));self.define=(t,o)=>{const r=e||("document"in self?document.currentScript.src:"")||location.href;if(i[r])return;let s={};const c=e=>n(e,r),l={module:{uri:r},exports:s,require:c};i[r]=Promise.all(t.map(e=>l[e]||c(e))).then(e=>(o(...e),s))}}define(["./workbox-b865b753"],function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"index.html",revision:"2c69eb2da85c9b2ee93b0c537cf41d78"},{url:"ui-launchpad.js",revision:"99ebcd458283e0ea2b64b7888a4f1c2e"}],{}),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("/index.html"))),e.registerRoute("polyfills/*.js",new e.CacheFirst,"GET")});
2
2
  //# sourceMappingURL=sw.js.map
package/dist/sw.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"sw.js","sources":["../../../../../../private/var/folders/fq/bhsbs5bd52791c8x2z6s3dh40000gn/T/216ca8a070ca856cbcd3d9639bc2faa8/sw.js"],"sourcesContent":["import {registerRoute as workbox_routing_registerRoute} from '/Users/runner/work/1/s/ui-launchpad/node_modules/.pnpm/workbox-routing@6.6.0/node_modules/workbox-routing/registerRoute.mjs';\nimport {CacheFirst as workbox_strategies_CacheFirst} from '/Users/runner/work/1/s/ui-launchpad/node_modules/.pnpm/workbox-strategies@6.6.0/node_modules/workbox-strategies/CacheFirst.mjs';\nimport {clientsClaim as workbox_core_clientsClaim} from '/Users/runner/work/1/s/ui-launchpad/node_modules/.pnpm/workbox-core@6.6.0/node_modules/workbox-core/clientsClaim.mjs';\nimport {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/Users/runner/work/1/s/ui-launchpad/node_modules/.pnpm/workbox-precaching@6.6.0/node_modules/workbox-precaching/precacheAndRoute.mjs';\nimport {NavigationRoute as workbox_routing_NavigationRoute} from '/Users/runner/work/1/s/ui-launchpad/node_modules/.pnpm/workbox-routing@6.6.0/node_modules/workbox-routing/NavigationRoute.mjs';\nimport {createHandlerBoundToURL as workbox_precaching_createHandlerBoundToURL} from '/Users/runner/work/1/s/ui-launchpad/node_modules/.pnpm/workbox-precaching@6.6.0/node_modules/workbox-precaching/createHandlerBoundToURL.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.skipWaiting();\n\nworkbox_core_clientsClaim();\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"index.html\",\n \"revision\": \"2c69eb2da85c9b2ee93b0c537cf41d78\"\n },\n {\n \"url\": \"ui-launchpad.js\",\n \"revision\": \"78b9f51460697d6808220422f0d996b1\"\n }\n], {});\n\nworkbox_routing_registerRoute(new workbox_routing_NavigationRoute(workbox_precaching_createHandlerBoundToURL(\"/index.html\")));\n\n\nworkbox_routing_registerRoute(\"polyfills/*.js\", new workbox_strategies_CacheFirst(), 'GET');\n\n\n\n\n"],"names":["self","skipWaiting","workbox_core_clientsClaim","workbox_precaching_precacheAndRoute","url","revision","workbox","registerRoute","workbox_routing_NavigationRoute","workbox_precaching_createHandlerBoundToURL","workbox_strategies_CacheFirst"],"mappings":"inBAwBAA,KAAKC,cAELC,EAAAA,eAQAC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,aACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,qCAEb,CAAE,GAEwBC,EAAAC,cAAC,IAAIC,EAAAA,gBAAgCC,EAAAA,wBAA2C,iBAGhFH,EAAAC,cAAC,iBAAkB,IAAIG,aAAiC"}
1
+ {"version":3,"file":"sw.js","sources":["../../../../../../private/var/folders/20/jp1_0n3n7kndh6rnbqb5344m0000gn/T/b297d1013cbf5e15a273765e773c0117/sw.js"],"sourcesContent":["import {registerRoute as workbox_routing_registerRoute} from '/Users/runner/work/1/s/ui-launchpad/node_modules/.pnpm/workbox-routing@6.6.0/node_modules/workbox-routing/registerRoute.mjs';\nimport {CacheFirst as workbox_strategies_CacheFirst} from '/Users/runner/work/1/s/ui-launchpad/node_modules/.pnpm/workbox-strategies@6.6.0/node_modules/workbox-strategies/CacheFirst.mjs';\nimport {clientsClaim as workbox_core_clientsClaim} from '/Users/runner/work/1/s/ui-launchpad/node_modules/.pnpm/workbox-core@6.6.0/node_modules/workbox-core/clientsClaim.mjs';\nimport {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/Users/runner/work/1/s/ui-launchpad/node_modules/.pnpm/workbox-precaching@6.6.0/node_modules/workbox-precaching/precacheAndRoute.mjs';\nimport {NavigationRoute as workbox_routing_NavigationRoute} from '/Users/runner/work/1/s/ui-launchpad/node_modules/.pnpm/workbox-routing@6.6.0/node_modules/workbox-routing/NavigationRoute.mjs';\nimport {createHandlerBoundToURL as workbox_precaching_createHandlerBoundToURL} from '/Users/runner/work/1/s/ui-launchpad/node_modules/.pnpm/workbox-precaching@6.6.0/node_modules/workbox-precaching/createHandlerBoundToURL.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.skipWaiting();\n\nworkbox_core_clientsClaim();\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"index.html\",\n \"revision\": \"2c69eb2da85c9b2ee93b0c537cf41d78\"\n },\n {\n \"url\": \"ui-launchpad.js\",\n \"revision\": \"99ebcd458283e0ea2b64b7888a4f1c2e\"\n }\n], {});\n\nworkbox_routing_registerRoute(new workbox_routing_NavigationRoute(workbox_precaching_createHandlerBoundToURL(\"/index.html\")));\n\n\nworkbox_routing_registerRoute(\"polyfills/*.js\", new workbox_strategies_CacheFirst(), 'GET');\n\n\n\n\n"],"names":["self","skipWaiting","workbox_core_clientsClaim","workbox_precaching_precacheAndRoute","url","revision","workbox","registerRoute","workbox_routing_NavigationRoute","workbox_precaching_createHandlerBoundToURL","workbox_strategies_CacheFirst"],"mappings":"inBAwBAA,KAAKC,cAELC,EAAAA,eAQAC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,aACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,qCAEb,CAAE,GAEwBC,EAAAC,cAAC,IAAIC,EAAAA,gBAAgCC,EAAAA,wBAA2C,iBAGhFH,EAAAC,cAAC,iBAAkB,IAAIG,aAAiC"}
@@ -860,7 +860,7 @@ video {
860
860
  .lg\\:grid-cols-\\[minmax\\(660px\\2c 1176px\\)_minmax\\(310px\\2c 584px\\)\\] {
861
861
  grid-template-columns: minmax(660px,1176px) minmax(310px,584px);
862
862
  }
863
- } `,j=te`ix-dialog{--md-focus-ring-color:transparent;--md-dialog-container-shape:0.375rem;--md-text-button-label-text-color:#1D48A4;--md-text-button-trailing-space:0.75rem;--md-text-button-leading-space:0.75rem}ix-dialog p{color:var(--cp-neutral-blue-60p,#09224199)}h2{margin:0;font-family:var(--text-heading-font,sans-serif);font-size:24px;letter-spacing:var(--text-heading-letter-spacing,.0075em);line-height:var(--text-heading-line-height,1.2em);font-weight:400;text-decoration:var(--text-heading-decoration,none);text-transform:var(--text-heading-transform,none);margin-bottom:24px}.resources{margin-bottom:44px;cursor:pointer}.resources ix-button{pointer-events:none}.news-info .newsAndPromotions,.news-info .resources{display:flex;gap:44px;flex-wrap:wrap}.news-info a{text-decoration:none;color:inherit}.news-item-description{margin:10px 0 0;font-family:var(--root-primary-font);font-style:normal;font-weight:400;font-size:16px;line-height:28px;letter-spacing:.44px;position:relative;color:#fff}#videoPlayer.headline{justify-content:space-between}video{max-width:100%;height:calc(100vh - 10rem)}.knowledge-base{border:none;height:1700px;margin:-2rem}@media (max-width:600px){.news-info{display:none}}@media (min-width:1200px){.launchpad-bg-image{background-image:url(https://cdn.globalportal.online/gpv2/launchpad-background-v1.png);background-repeat:no-repeat;background-position:right bottom;position:fixed;bottom:0;height:478px;width:522px;z-index:0;max-height:calc(100vh - 8rem);left:calc(100vw - 522px)}}`;var u;(function(t){t[t.APPROVE=5]="APPROVE",t[t.CREATE=4]="CREATE",t[t.DELETE=3]="DELETE",t[t.UPDATE=2]="UPDATE",t[t.READ=1]="READ"})(u||(u={}));const b=(t,e,i)=>{if(!t||!Object.keys(e).length)return!1;if(!Array.isArray(e))throw new Error("Permission keys must be an array");if(typeof i!="number")throw new Error("Required permission must be a number");return e.some(s=>{const r=t[s];return u[r]>=i})},Pe=t=>t.toLowerCase().replace(/[^a-zA-Z0-9]+(.)/g,(e,i)=>i.toUpperCase()),R={NOTIFICATIONS:"notifications",SITES:"/inventory/sites",LOCATIONS:"/inventory/locations",USERS:"/usermanagement/users",TICKETS:"/sm-service-tickets/service-tickets",ORDERS:"/gom/orders/search",PERMISSIONS:"/usermanagement/my-permissions"},C={RemoteHands:"Remote Hands",TroubleTickets:"Trouble Ticket",DeliveriesRemovals:"Shipping & Receiving",VisitorAccess:"Visitor Access",CustomerCare:"Customer Support",PermanentBadge:"Permanent Badge",OSPAccess:"OSP Access",POPPOERoomAccess:"PoP/POE Room Access"},q={Site:"Site",Floor:"Floor",Room:"Room",Cabinet:"Cabinet",Cage:"Cage"},ve=["CREATE","APPROVE","UPDATE","READ"];function H(){var t;const e=(t=window.gpConfig)===null||t===void 0?void 0:t["ui-launchpad"];if(!e)throw new Error("ui-launchpad config not loaded. Ensure config.json is fetched before app bootstrap.");return e}function Oe(){var t;const e=(t=window.registeredApps)===null||t===void 0?void 0:t["ui-knowledgebase"];return e!=null&&e.enabled?2:1}const we=()=>{const t=localStorage.getItem("user-authentication");return t?JSON.parse(t):null},ie=()=>{const t=localStorage.getItem("x-auth");return t?JSON.parse(t):null},n={get access_token(){var t;return(t=we())===null||t===void 0?void 0:t.access_token},get account_number(){var t,e;return(e=(t=we())===null||t===void 0?void 0:t.profile)===null||e===void 0?void 0:e.account_number},get email(){var t;return((t=ie())===null||t===void 0?void 0:t.email)||"Global User"},get userProfileName(){const t=ie();return t?t==null?void 0:t.name:"Global User"},get userCompany(){var t;const e=ie();return(t=e==null?void 0:e.account_hierarchy)===null||t===void 0?void 0:t.name}},Ne="ui-knowledge-base",Ue={"ui-knowledge-base":{path:"/knowledge-base",enabled:!0,copyNS:"kb"}},[De,qe,Me,Ve,Le,ze,Be,Fe,je,Z,Q,He]=["External User","Internal User","Remote Hands","Customer Support","Trouble Ticket","Shipping & Receiving","PoP/POE Room Access","OSP Access","DCIM-enabled location data","Visitor Access","Permanent Badge","User"],Ke=["Product & Service Requests"],Ge=["Product & Service Terminations"],be=[Me,Ve,ze,Le,Be,Fe,Z,Q],[se,We,Ye,Je,Ze,Qe,Xe,et,tt,it]=["Cross Connect","Space & Power","Customer Equipment Connection (CEC)","Internet Exchange","Intra-Customer Connectivity (ICC)","IP Bandwidth","Remote Hands Package","Service Exchange Cloud Router","Service Exchange Port","Cloud Connect"],B=[se,We,Ye,Je,Ze,Qe,Xe,et,tt,it],oe=[De,qe,He];var S;(function(t){t[t.NotSet=0]="NotSet",t[t.ServiceManagement=1]="ServiceManagement",t[t.OrderManagement=2]="OrderManagement"})(S||(S={}));const{ApiBaseUrl:$,GomApiBaseUrl:st,KnowledgeBaseLaunchpadApiUrl:ot,KnowledgeBaseLaunchpadApiToken:rt,"KB:strapiBaseUrl":at,"SM:ShowPopPoeAccess":nt,"SM:ShowOspAccess":dt}=H(),lt=Oe()===2,c={rows:[],totalCount:0},A=t=>{const e={headers:{Authorization:`Bearer ${n==null?void 0:n.access_token}`}};return t&&(e.signal=t),e},ct=async()=>{try{const t=await fetch(`${$}${R.SITES}?show_my_sites=true`,A());if(t.ok)return t.headers.get("x-total-count")||0}catch(t){return null}return null},ut=async()=>{try{const t=await fetch(`${$}${R.LOCATIONS}?dcim_enabled=true&page_size=1`,A());if(t.ok)return t.headers.get("x-total-count")||0}catch(t){return null}return null},pt=async()=>{var t;try{const e=await fetch(`${$}${R.USERS}?account_number=${n==null?void 0:n.account_number}&include_child_accounts=true`,A());if(e.ok)return((t=(await e.json()).pageable)===null||t===void 0?void 0:t.total_elements)||0}catch(e){return null}return null},ht=async()=>{try{if(lt){const t=new URLSearchParams({"filters[category][uid][$eq]":"whats-new","sort[0]":"dateAdded:desc","pagination[pageSize]":"3",status:"published",locale:"en"}),e=await fetch(`${at}/api/posts?${t}`);if(e.ok)return{whatsNews:(await e.json()).data}}else{const t=await fetch(ot,{headers:{Authorization:`Bearer ${rt}`,"Content-Type":"application/json"}});if(t.ok)return await t.json()}}catch(t){return{}}return{}},mt=async()=>{var t;try{const e=await fetch(`${$}${R.TICKETS}?$filter=(status eq 'New' or status eq 'In Progress' or status eq 'Approved' or status eq 'Cancellation requested' or status eq 'Announced' or status eq 'Pending Pick-up')&$top=1`,A());if(e.ok){const i=await e.json();return i.total_count||((t=i.items)===null||t===void 0?void 0:t.length)||0}}catch(e){return null}return null},fe=async t=>{var e;if(t.ok){const i=await t.json();return{rows:((i==null?void 0:i.items)||[]).map(s=>({...s,source:S.ServiceManagement})),totalCount:i.total_count||((e=i.items)===null||e===void 0?void 0:e.length)||0}}return c},ye=async(t=5,e=1)=>{const i=e>1?(e-1)*t:0,s=`${$}${R.TICKETS}`,r=encodeURIComponent(n==null?void 0:n.email),d=encodeURIComponent(n==null?void 0:n.userProfileName),l=`?$skip=${i}&$top=${t}&$filter=(created_by eq '${r}' or created_by eq '${d}')&$orderby=updated_at desc`;try{const h=await fetch(`${s}${l}`,A());return h&&h.ok?fe(h):c}catch(h){return c}},re=async t=>{const e=`${st}${R.ORDERS}`;try{return await fetch(`${e}`,{method:"POST",headers:{Authorization:`Bearer ${n==null?void 0:n.access_token}`,"Content-Type":"application/json","X-Correlation-Id":crypto.randomUUID()},body:JSON.stringify(t)})}catch(i){return}},xe=t=>t.map(e=>({ticket_id:e.id,ticket_type:e.orderTypeDescription,request_type:e.requestTypeDescription,created_by:e.requesterName,created_at:e.dateCreated,updated_at:e.dateUpdated,status:e.orderStatusDescription,source:S.OrderManagement})),ae=t=>B.filter(e=>(t==null?void 0:t[e])&&ve.includes(t[e])),gt=async()=>{const t=await re({filter:{operator:"AND",conditions:[{operator:"EQ",property:"gomOrderStatusCode",values:["OPEN"]}]},sort:[{property:"dateCreated",direction:"DESC"}],page:{page:1,size:1}});if(t&&t.ok){const e=await t.json();return(e==null?void 0:e.totalElements)||0}return null},ke=async(t,e=5,i=1)=>{const s={filter:{operator:"AND",conditions:[{operator:"EQ",property:"requesterName",values:[n==null?void 0:n.userProfileName]},{operator:"OR",conditions:[{operator:"EQ",property:"orderTypeDescription",values:t}]}]},sort:[{property:"dateUpdated",direction:"DESC"}],page:{page:i,size:e}},r=await re(s);if(r&&r.ok){const d=await r.json();return{rows:xe((d==null?void 0:d.results)||[]),totalCount:d.totalElements}}return c},Te=async(t=5,e=1)=>{const i=e>1?(e-1)*t:0;try{const s=await fetch(`${$}${R.TICKETS}?permission_privilege=Approve&$skip=${i}&$top=${t}&$filter=(status eq 'Pending Approval') and (ticket_type eq 'Facility Access')&$orderby=updated_at desc`,A());return s&&s.ok?fe(s):c}catch(s){return c}},Ce=async(t,e=5,i=1)=>{const s=await re({filter:{operator:"AND",conditions:[{operator:"EQ",property:"orderStatusCode",values:["AWAITING_INFORMATION","AWAITING_APPROVAL"]},{operator:"OR",conditions:[{operator:"EQ",property:"orderTypeDescription",values:t}]}]},sort:[{property:"dateUpdated",direction:"DESC"}],page:{page:i,size:e}});if(s&&s.ok){const r=await s.json(),d=(r==null?void 0:r.results)||[];return{rows:xe(d),totalCount:r.totalElements}}return c},vt=(t,e,i)=>{var s;const r=u[(s=t[e])===null||s===void 0?void 0:s.toUpperCase()]||0;return u[i.toUpperCase()]>r&&(t[e]=i),t},wt=async()=>{const t=await fetch(`${$}${R.PERMISSIONS}?exclude_parents=false&exclude_siblings=true`,A());return t.ok?(await t.json()).reduce((e,i)=>i.permission_name===Z||i.permission_name===Q?vt(e,i.permission_name,i.privilege):(e[i.permission_name]=i.privilege,e),{}):{}},bt=async(t,e,i)=>{const s=await fetch(`${$}/${t}/${e}`,A(i));return s.ok?(await s.json()).comments:{}},D=async(t,e,i)=>{if(t===C.POPPOERoomAccess&&!nt||t===C.OSPAccess&&!dt)return!1;const s=new URL(R.LOCATIONS,$);s.searchParams.set("page_size",1),s.searchParams.set("permission_type",t),s.searchParams.set("assignable_process",e),s.searchParams.set("permission_privilege","Create"),i&&s.searchParams.set("location_type",i);const r=await fetch(s,A());return r.ok?(await r.json()).items.length>0:!1},ft=async()=>{const t=await Promise.allSettled([D(C.DeliveriesRemovals,"",null),D(C.CustomerCare,"",q.Site),D(C.TroubleTickets,"",q.Site),D(C.RemoteHands,"",q.Site),D(C.VisitorAccess,"",q.Site),D(C.PermanentBadge,"",q.Site),D(C.OSPAccess,"",q.Site),D(C.POPPOERoomAccess,"",q.Site)]),[e,i,s,r,d,l,h,x]=t.map(k=>k.status==="fulfilled"?k.value:!1);return{DeliveriesRemovals:e,CustomerCare:i,TroubleTickets:s,RemoteHands:r,VisitorAccess:d,PermanentBadge:l,OSPAccess:h,POPPOEAccess:x}},{IsInventoryManagementEnabled:Se,IsGOMWebToLeadEnabled:yt,IsGOMTerminationsEnabled:xt,PhaseTwo:kt}=H(),T=window.innerWidth,Ee=t=>o`<ix-date type="static" .value="${t}"></ix-date>`,ne=t=>[{name:"ticketType",header:"Ticket Type",bodyRenderer:e=>o` <div @click="${()=>t(e)}"> <span>${e.ticket_type}</span> </div> `,width:T>600?"18%":"200px"},{name:"requestType",header:"Request Type",bodyRenderer:e=>o` <div @click="${()=>t(e)}"> <span>${e.request_type}</span> </div> `,width:T>600?"18%":"200px"},{name:"requester",header:"Requester",bodyRenderer:e=>o` <div @click="${()=>t(e)}"> <span>${e.created_by}</span> </div> `,width:T>600?"18%":"200px"},{name:"requestDate",header:"Request Date",bodyRenderer:e=>o` <div @click="${()=>t(e)}"> <span>${Ee(new Date(e.updated_at))}</span> </div> `,width:T>600?"18%":"200px"},{name:"status",header:"Status",width:T>600?"18%":"200px",bodyRenderer:e=>o` <div @click="${()=>t(e)}">${e.status}</div> `},{name:"comment",header:"",width:T>600?"10%":"50px",bodyRenderer:e=>{var i,s;return o` <comments-tooltip .ticketId="${e.ticket_id}" .ticketType="${(i=e.ticket_type)!==null&&i!==void 0?i:""}" .requestType="${(s=e.request_type)!==null&&s!==void 0?s:""}"></comments-tooltip> `}}],de=t=>[{name:"ticketType",header:"Ticket Type",bodyRenderer:e=>o` <div @click="${()=>t(e)}"> <span>${e.ticket_type}</span> </div> `,width:T>600?"20%":"200px"},{name:"requestType",header:"Request Type",bodyRenderer:e=>o` <div @click="${()=>t(e)}"> <span>${e.request_type}</span> </div> `,width:T>600?"20%":"200px"},{name:"requester",header:"Requester",bodyRenderer:e=>o` <div @click="${()=>t(e)}"> <span>${e.created_by}</span> </div> `,width:T>600?"20%":"200px"},{name:"requestDate",header:"Request Date",bodyRenderer:e=>o` <div @click="${()=>t(e)}"> <span>${Ee(new Date(e.updated_at))}</span> </div> `,width:T>600?"20%":"200px"},{name:"status",header:"Status",width:T>600?"20%":"200px",bodyRenderer:e=>o` <div @click="${()=>t(e)}">${e.status}</div> `}],y={base:"service-management/service-tickets","Customer Care":"customer-care",Delivery:"deliveries","Facility Access":"facility-access","Permanent Badge":"permanent-badge","Remote Hands":"remote-hands",Removal:"removals","Trouble Ticket":"trouble-tickets","Visitor Access":"visitor-access"},X={"Visitor Access":!0,"Permanent Badge":!0},K={ACTIVE_TICKETS:{header:"Active Tickets",icon:"laptop",target:"/service-management/"},USERS:{header:"Active Users",icon:"users",target:"/user-management/user-management"},MY_SITES:{header:"My Sites",icon:"mySites",target:"/sites/sites"},DCIM:{header:"DCIM-Enabled Locations",icon:"dcim",target:"/sites/locations?dcim_enabled=true"},ACTIVE_ORDERS:{header:"Active Orders",icon:"orders",target:"/order-management/open-orders"}},M=(t,e)=>{var i;const s=b(t,oe,u.READ),r=b(t,[je],u.READ),d=Se&&((i=window.registeredApps["ui-gom"])===null||i===void 0?void 0:i.enabled)&&ve.some(l=>b(t,B,u[l]));return[{...K.ACTIVE_TICKETS,...(e==null?void 0:e.ACTIVE_TICKETS)!==void 0&&{value:e==null?void 0:e.ACTIVE_TICKETS},error:(e==null?void 0:e.ACTIVE_TICKETS)===null},...s?[{...K.USERS,...(e==null?void 0:e.USERS)!==void 0&&{value:e==null?void 0:e.USERS},error:(e==null?void 0:e.USERS)===null}]:[],{...K.MY_SITES,...(e==null?void 0:e.MY_SITES)!==void 0&&{value:e==null?void 0:e.MY_SITES},error:(e==null?void 0:e.MY_SITES)===null},...r?[{...K.DCIM,...(e==null?void 0:e.DCIM)!==void 0&&{value:e==null?void 0:e.DCIM},error:(e==null?void 0:e.DCIM)===null}]:[],...d&&(e==null?void 0:e.ACTIVE_ORDERS)!==void 0?[{...K.ACTIVE_ORDERS,...(e==null?void 0:e.ACTIVE_ORDERS)!==void 0&&{value:e==null?void 0:e.ACTIVE_ORDERS},error:(e==null?void 0:e.ACTIVE_ORDERS)===null}]:[]]},Re=(t,e)=>{var i,s,r;const d=b(t,oe,u.READ),l=b(t,oe,u.CREATE),h=yt&&((i=window.registeredApps["ui-gom"])===null||i===void 0?void 0:i.enabled)&&b(t,Ke,u.CREATE),x=xt&&((s=window.registeredApps["ui-gom"])===null||s===void 0?void 0:s.enabled)&&b(t,Ge,u.CREATE),k=Se&&((r=window.registeredApps["ui-gom"])===null||r===void 0?void 0:r.enabled)&&(b(t,[se],u.CREATE)||b(t,[se],u.APPROVE)),N=e.DeliveriesRemovals,V=e.TroubleTickets,Y=e.CustomerCare,F=e.RemoteHands,J=e.VisitorAccess||e.PermanentBadge||e.OSPAccess||e.POPPOEAccess,ee=Y||J||F||N||V||h||x,me={header:"ORDER MANAGEMENT",items:[{name:"Connectivity",icon:"crossConnect",target:"launch-physical-connectivity"}]};return kt&&me.items.push({name:"Space & Power",icon:"crossConnect",target:"launch-space-and-power"}),[...ee?[{header:"Service Requests",items:[...Y?[{name:"Customer Care",icon:"cutomerSupport",target:"launch-customer-support"}]:[],...J?[{name:"Facility Access",icon:"lock",target:"launch-facility-access"}]:[],...F?[{name:"Remote Hands",icon:"remoteHands",target:"launch-remote-hands"}]:[],...N?[{name:"Deliveries & Removals",icon:"shipping",target:"launch-deliveries-removals"}]:[],...V?[{name:"Trouble Tickets",icon:"troubleTickets",target:"launch-trouble-tickets"}]:[],...h?[{name:"Request Service or Product",icon:"circleAdd",target:"open-service-request"}]:[],...x?[{name:"Terminate Service or Product",icon:"circleMinus",target:"open-termination-request"}]:[]]}]:[],...k?[me]:[],...d?[{header:"USER MANAGEMENT",items:[...l?[{name:"Add user",icon:"addUser",target:"create-user-clicked"}]:[],{name:"Manage users",icon:"manageUsers",target:"/user-management/user-management"}]}]:[]]};var f;(function(t){t.SERVICE_TICKETS="SERVICE_TICKETS",t.ORDERS="ORDERS"})(f||(f={}));let I=class extends E{constructor(){super(...arguments),this.serviceTickets=c,this.orders=c,this.isLoading=!0,this.isFetching=!1,this.activeTab=f.SERVICE_TICKETS,this.tabs=[{id:f.SERVICE_TICKETS,text:"Service Tickets",selected:()=>this.activeTab===f.SERVICE_TICKETS,onClick:()=>{this.activeTab=f.SERVICE_TICKETS},rowCount:this.serviceTickets.totalCount,shouldRender:()=>this.permissions.serviceTickets,grid:()=>o`<ix-table-data .columns="${ne(this.ticketSelect)}" .rows="${this.serviceTickets.rows}" header="Recent Updates" total-count="${this.serviceTickets.totalCount}" ?disabled="${this.serviceTickets.totalCount===0}" ?hidden="${!this.tabs[0].selected()}" emptyDescription="No Recent Service Tickets Updates" ?isLoading="${this.isFetching}" data-testid="lp-serviceTickets" showViewAllButtonOnEmpty href="${`/service-management/?createdBy_equals=${n==null?void 0:n.userProfileName}&sort=updatedAt&order=desc`}" view-all-text="View all service tickets" footer-view-all @change="${async t=>{const{page:e,pageSize:i}=t.detail;this.isFetching=!0,this.serviceTickets=await this.getServiceTickets(i,e),this.isFetching=!1}}" @show-view-more="${async()=>{this.isFetching=!0,this.serviceTickets=await this.getServiceTickets(10),this.isFetching=!1}}"> ${this.renderTableNav()} </ix-table-data>`},{id:f.ORDERS,text:"Orders",selected:()=>this.activeTab===f.ORDERS,onClick:()=>{this.activeTab=f.ORDERS},rowCount:this.orders.totalCount,shouldRender:()=>this.permissions.orders,grid:()=>o`<ix-table-data .columns="${ne(this.ticketSelect)}" .rows="${this.orders.rows}" header="Ticket Updates" ?disabled="${this.orders.totalCount===0}" ?hidden="${!this.tabs[1].selected()}" total-count="${this.orders.totalCount}" emptyDescription="No Recent Order Ticket Updates" showViewAllButtonOnEmpty href="/order-management/open-orders" @change="${async t=>{const{page:e,pageSize:i}=t.detail;this.isFetching=!0,this.orders=await this.getOrders(i,e),this.isFetching=!1}}" view-all-text="View all orders" data-testid="lp-orders" ?isLoading="${this.isFetching}" @show-view-more="${async()=>{this.isFetching=!0,this.orders=await this.getOrders(10),this.isFetching=!1}}" footer-view-all> ${this.renderTableNav()} </ix-table-data>`}],this.permissions={orders:!1,serviceTickets:!1},this.getServiceTickets=(t=5,e=1)=>this.permissions.serviceTickets?ye(t,e):c,this.getOrders=(t=5,e=1)=>this.permissions.orders?ke(this.permissions.gomTicketTypes,t,e):c,this.renderTableNav=()=>{const t=this.tabs.filter(e=>e.shouldRender());return t.length<=1?w:o` <div slot="tabs"> <ix-grid-nav class="action-required-grid-nav" .buttons="${t.map(e=>({text:e.text,selected:e.selected(),onClick:e.onClick}))}"></ix-grid-nav> </div> `}}renderTables(){const t=this.tabs.filter(e=>e.shouldRender());return t.length===0?w:t.map(e=>e.grid())}ticketSelect(t){let e="";switch(t.source){case S.ServiceManagement:const{ticket_id:i,ticket_type:s,request_type:r}=t,d=X[r]?`/${y[r]}`:"";e=`/${y.base}/${y[s]}${d}/${i}`;break;case S.OrderManagement:e=`/order-management/order-details/${t.ticket_id}`;break;default:e="/order-management/order-details"}z.go(e)}async firstUpdated(){this.serviceTickets=await this.getServiceTickets();let t=this.tabs.findIndex(e=>e.shouldRender()&&e.rowCount>0);t===-1&&(t=this.tabs.findIndex(e=>e.shouldRender())),this.activeTab=this.tabs[t>-1?t:0].id,this.isLoading=!1}render(){return o` ${this.isLoading?w:o` ${this.renderTables()} `} `}};I.styles=[U],a([m()],I.prototype,"serviceTickets",void 0),a([g({type:Object})],I.prototype,"orders",void 0),a([m()],I.prototype,"isLoading",void 0),a([m()],I.prototype,"isFetching",void 0),a([m()],I.prototype,"activeTab",void 0),a([g({type:Object})],I.prototype,"permissions",void 0),I=a([L("lp-ticket-updates")],I);let _=class extends E{constructor(){super(...arguments),this.serviceTickets=c,this.orders=c,this.isLoading=!0,this.isFetching=!1,this.activeTab=f.SERVICE_TICKETS,this.tabs=[{id:f.SERVICE_TICKETS,text:"Service Tickets",selected:()=>this.activeTab===f.SERVICE_TICKETS,onClick:()=>{this.activeTab=f.SERVICE_TICKETS},rowCount:this.serviceTickets.totalCount,shouldRender:()=>this.permissions.serviceTickets,grid:()=>o`<ix-table-data .columns="${de(this.ticketSelect)}" .rows="${this.serviceTickets.rows}" header="Your Action Required" total-count="${this.serviceTickets.totalCount}" ?disabled="${this.serviceTickets.totalCount===0}" ?hidden="${!this.tabs[0].selected()}" emptyDescription="No Pending Actions for Service Tickets" ?isLoading="${this.isFetching}" data-testid="lp-serviceTickets" showViewAllButtonOnEmpty href="${"/service-management/?status_equals=Pending+Approval&permission_privilege=Approve"}" view-all-text="View all service tickets" footer-view-all @change="${async t=>{const{page:e,pageSize:i}=t.detail;this.isFetching=!0,this.serviceTickets=await this.getServiceTickets(i,e),this.isFetching=!1}}" @show-view-more="${async()=>{this.isFetching=!0,this.serviceTickets=await this.getServiceTickets(10),this.isFetching=!1}}"> ${this.renderTableNav()} </ix-table-data>`},{id:f.ORDERS,text:"Orders",selected:()=>this.activeTab===f.ORDERS,onClick:()=>{this.activeTab=f.ORDERS},rowCount:this.orders.totalCount,shouldRender:()=>this.permissions.orders,grid:()=>o`<ix-table-data .columns="${de(this.ticketSelect)}" .rows="${this.orders.rows}" header="Your Action Required" ?disabled="${this.orders.totalCount===0}" ?hidden="${!this.tabs[1].selected()}" total-count="${this.orders.totalCount}" emptyDescription="No Pending Actions for Orders" showViewAllButtonOnEmpty href="/order-management/open-orders" @change="${async t=>{const{page:e,pageSize:i}=t.detail;this.isFetching=!0,this.orders=await this.getOrders(i,e),this.isFetching=!1}}" view-all-text="View all orders" data-testid="lp-orders" ?isLoading="${this.isFetching}" @show-view-more="${async()=>{this.isFetching=!0,this.orders=await this.getOrders(10),this.isFetching=!1}}" footer-view-all> ${this.renderTableNav()} </ix-table-data>`}],this.permissions={orders:!1,serviceTickets:!1},this.getServiceTickets=(t=5,e=1)=>this.permissions.serviceTickets?Te(t,e):c,this.getOrders=(t=5,e=1)=>this.permissions.orders?Ce(this.permissions.gomTicketTypes,t,e):c,this.renderTableNav=()=>{const t=this.tabs.filter(e=>e.shouldRender());return t.length<=1?w:o` <div slot="tabs"> <ix-grid-nav class="action-required-grid-nav" .buttons="${t.map(e=>({text:e.text,selected:e.selected(),onClick:e.onClick}))}"></ix-grid-nav> </div> `}}renderTables(){const t=this.tabs.filter(e=>e.shouldRender());return t.length===0?w:t.map(e=>e.grid())}ticketSelect(t){let e="";switch(t.source){case S.ServiceManagement:const{ticket_id:i,ticket_type:s,request_type:r}=t,d=X[r]?`/${y[r]}`:"";e=`/${y.base}/${y[s]}${d}/${i}`;break;case S.OrderManagement:e=`/order-management/order-details/${t.ticket_id}`;break;default:e="/order-management/order-details"}z.go(e)}async firstUpdated(){this.serviceTickets=await this.getServiceTickets();let t=this.tabs.findIndex(e=>e.shouldRender()&&e.rowCount>0);t===-1&&(t=this.tabs.findIndex(e=>e.shouldRender())),this.activeTab=this.tabs[t>-1?t:0].id,this.isLoading=!1}render(){return o` ${this.isLoading?w:o` ${this.renderTables()} `} `}};_.styles=[U],a([m()],_.prototype,"serviceTickets",void 0),a([g({type:Object})],_.prototype,"orders",void 0),a([m()],_.prototype,"isLoading",void 0),a([m()],_.prototype,"isFetching",void 0),a([m()],_.prototype,"activeTab",void 0),a([g({type:Object})],_.prototype,"permissions",void 0),_=a([L("lp-action-required")],_);const{KnowledgeBaseLaunchpadImgBase:$e,KnowledgeBaseLaunchpadVideoBase:Tt,KnowledgeBaseLaunchpadLinkBase:le,KnowledgeBaseLaunchpadViewAllUrl:Ct,IsInventoryManagementEnabled:St}=H();let p=class extends E{constructor(){super(...arguments),this.data={},this.status=[],this.nav=[],this.news=[],this.contacts={},this.apiPermissions="{}",this.resources=[],this.promotions=[],this.knowledgebase="",this.ticketUpdateOrders=c,this.actionRequiredOrders=c,this.updates={columns:[],rows:[],header:"",href:"",totalCount:0},this.actions={columns:[],rows:[],header:"",href:"",disabled:!0,totalCount:0},this.isLoading=!0,this.showVideoModal=!1,this.videoUrl="",this.videoTitle="",this.actionRequiredPermissions={serviceTickets:!1,orders:!1,gomTicketTypes:[]},this.ticketUpdatePermissions={serviceTickets:!1,orders:!1,gomTicketTypes:[]},this.handleResourceOpen=(t,e="")=>i=>{t&&(i.preventDefault(),this.videoUrl=`${Tt}${encodeURIComponent(t)}`,this.videoTitle=e,this.showVideoModal=!0)},this.handleResourceClosed=()=>{this.showVideoModal=!1},this.renderNavigation=()=>o` ${this.nav.map(t=>o` <ix-nav-list .header="${t.header}" data-testid="${`lp-navigation-${Pe(t.header)}`}"> ${t.items.map(e=>o`<ix-nav-item .icon="${e==null?void 0:e.icon}" .target="${e==null?void 0:e.target}">${e.name}</ix-nav-item>`)} </ix-nav-list>`)} `,this.renderTicketUpdatesGrid=()=>o`<ix-table-data .columns="${this.updates.columns}" .rows="${this.updates.rows}" .header="${this.updates.header}" .href="${this.updates.href}" ?disabled="${this.updates.disabled}" emptyDescription="No Recent Service Ticket Updates" showViewAllButtonOnEmpty showViewAllOnFooter header-view-all data-testid="lp-ticketUpdates"> </ix-table-data>`,this.renderActionsRequiredGrid=()=>o`<ix-table-data .columns="${this.actions.columns}" .rows="${this.actions.rows}" .header="${this.actions.header}" .href="${this.actions.href}" ?disabled="${this.actions.disabled}" emptyDescription="No Pending Actions" data-testid="lp-yourActionRequired" showViewAllOnFooter header-view-all> </ix-table-data>`,this.renderActionRequired=()=>St?o` ${this.isLoading?w:o` <lp-action-required .orders="${this.actionRequiredOrders}" permissions="${JSON.stringify(this.actionRequiredPermissions)}"></lp-action-required> <lp-ticket-updates .orders="${this.ticketUpdateOrders}" permissions="${JSON.stringify(this.ticketUpdatePermissions)}"></lp-ticket-updates> `} `:o` ${this.actions.isAuthorizedToView?this.renderActionsRequiredGrid():w} ${this.updates.isAuthorizedToView?this.renderTicketUpdatesGrid():w}`}async firstUpdated(){const t=ae(this.apiPermissions);this.actionRequiredPermissions={serviceTickets:b(this.apiPermissions,[Z,Q],u.APPROVE),orders:b(this.apiPermissions,B,u.CREATE),gomTicketTypes:t},this.ticketUpdatePermissions={serviceTickets:b(this.apiPermissions,be,u.UPDATE),orders:b(this.apiPermissions,B,u.READ),gomTicketTypes:t},this.isLoading=!1}render(){var t,e,i;return o` ${this.showVideoModal?o`<ix-dialog open @close="${this.handleResourceClosed}"> <div id="videoPlayer" class="headline" slot="headline"> <span class="title">${this.videoTitle}</span> <ix-icon-button @click="${this.handleResourceClosed}" icon="close"> </ix-icon-button> </div> <div slot="content"> <video src="${this.videoUrl}" controls="" autoplay="" controlslist="nodownload"></video> </div> </ix-dialog>`:w} <main class="wrapper"> <section class="grid grid-cols-1 gap-8 lg:grid-cols-[minmax(660px,1176px)_minmax(310px,584px)]"> <div class="flex flex-col gap-8"> <ix-status-counter-group class="mx-4 lg:mx-0" .data="${this.status}"></ix-status-counter-group> <nav data-testid="lp-tablet-nav-widget" class="grid grid-cols-1 gap-8 md:grid-cols-2 lg:hidden mx-4 lg:mx-0"> ${this.renderNavigation()} </nav> ${this.renderActionRequired()} ${this.knowledgebase!==""?o` <iframe class="knowledge-base" title="knowledge base" .src="${this.knowledgebase}"></iframe>`:w} ${!((t=this.news)===null||t===void 0)&&t.length?o`<ix-news-feed header="What's New" .data="${this.news.map(s=>({...s,uid:`${le}${s.uid}`}))}" .href="${Ct}" data-testid="lp-newsFeed" class="mx-4 lg:mx-0"></ix-news-feed>`:w} ${!((e=this.resources)===null||e===void 0)&&e.length?o`<div class="news-info mx-4 lg:mx-0"> <h2>Resources</h2> <div class="resources"> ${this.resources.map(s=>{var r,d,l,h;return o` <a href="${`${le}${s.uid}`}" data-testid="lp-resourceItem" @click="${this.handleResourceOpen((r=s.video)===null||r===void 0?void 0:r.url,s.title)}"><ix-info-card class="w-[348px]" type="info-card-resources"><img slot="image" name="image" alt="${((d=s==null?void 0:s.thumbnail)===null||d===void 0?void 0:d.alternativeText)||""}" src="${`${$e}${encodeURIComponent(s.thumbnail.url)}&w=3840&q=75`}"> ${!((h=(l=s.topics)===null||l===void 0?void 0:l[0])===null||h===void 0)&&h.name?o`<div slot="label"> ${s.topics[0].name} </div>`:w} <div slot="title">${s.title}</div> ${s.abstract?o`<div slot="description" class="news-item-description"> ${s.abstract} </div>`:w} <ix-button slot="cta" type="button" has-icon trailing-icon appearance="text"> <ix-icon slot="icon">chevron_right</ix-icon> Learn more </ix-button> </ix-info-card></a>`})} </div> <h2>News &amp; Promotions</h2> <div class="newsAndPromotions"> ${this.promotions.map(s=>o` <a href="${`${le}${s.uid}`}" data-testid="lp-newsPromotionsItem"><ix-info-card type="info-card"> <img slot="image" name="image" alt="${s.thumbnail.alternativeText}" src="${`${$e}${encodeURIComponent(s.thumbnail.url)}&w=3840&q=75`}"> <div slot="title">${s.title}</div> <div slot="description">${s.abstract}</div> <ix-button slot="cta" type="button" has-icon trailing-icon appearance="text"> <ix-icon slot="icon">chevron_right</ix-icon> Learn more </ix-button> </ix-info-card></a>`)} </div> </div>`:w} ${!((i=this.contacts)===null||i===void 0)&&i.email?o`<ix-contacts class="mx-4 lg:mx-0" .contacts="${this.contacts}" data-testid="lp-contacts"></ix-contacts>`:w} </div> <nav class="hidden lg:block" data-testid="lp-lg-navigation"> <div class="gap-8 sticky top-[--top-height] flex-col lg:flex"> ${this.renderNavigation()} </div> </nav> </section> </main> `}};p.styles=[U,j],a([g({type:Object})],p.prototype,"data",void 0),a([g({type:Array})],p.prototype,"status",void 0),a([g({type:Array})],p.prototype,"nav",void 0),a([g({type:Array})],p.prototype,"news",void 0),a([g({type:Object})],p.prototype,"contacts",void 0),a([g({type:Object,attribute:"api-permissions"})],p.prototype,"apiPermissions",void 0),a([g({type:Array})],p.prototype,"resources",void 0),a([g({type:Array})],p.prototype,"promotions",void 0),a([g({type:String})],p.prototype,"knowledgebase",void 0),a([g({type:Object})],p.prototype,"ticketUpdateOrders",void 0),a([g({type:Object})],p.prototype,"actionRequiredOrders",void 0),a([g({type:Object})],p.prototype,"updates",void 0),a([g({type:Object})],p.prototype,"actions",void 0),a([m()],p.prototype,"isLoading",void 0),a([m()],p.prototype,"showVideoModal",void 0),a([m()],p.prototype,"videoUrl",void 0),a([m()],p.prototype,"videoTitle",void 0),a([m()],p.prototype,"actionRequiredPermissions",void 0),a([m()],p.prototype,"ticketUpdatePermissions",void 0),p=a([L("ix-launchpad")],p);const ce={whatsNews:[{id:21,abstract:null,behavior:"accordion",topics:[{code:"news",icon:"newspaper",id:7,name:"News"}],thumbnail:{url:"",alternativeText:""},video:null,category:{icon:"local_offer",image:{url:"",alternativeText:""},showSortBy:!0,showFilterByTopic:!0,subtitle:"See what's new in the Global Portal and what we're gradually rolling out. ",title:"What's New",uid:"whats-new"},dateAdded:"2023-05-08",documents:[{id:109,url:"/uploads/2023_may_release_9b139ef760.pdf",name:"2023-may-release.pdf"}],duration:null,featured:!1,text:null,title:"May 2023",uid:"may-2023"}],resources:[{id:28,abstract:null,behavior:"video_card",topics:[],thumbnail:{url:"/uploads/blue_muffin_4f03cd693d.png",alternativeText:null},video:null,category:{icon:"web_asset",image:{url:"",alternativeText:""},showSortBy:!0,showFilterByTopic:!0,subtitle:"The answers to all of your most frequently asked questions.",title:"Media Resources",uid:"resources"},dateAdded:"2024-05-08",documents:null,duration:null,featured:!0,text:`<pre data-pm-slice="1 1 []"><code class="language-plaintext">Cupcake ipsum dolor sit amet bonbon powder gummi bears. Pie gingerbread powder icing chocolate cake. Jelly beans carrot cake chocolate fruitcake icing chocolate bar.
863
+ } `,j=te`ix-dialog{--md-focus-ring-color:transparent;--md-dialog-container-shape:0.375rem;--md-text-button-label-text-color:#1D48A4;--md-text-button-trailing-space:0.75rem;--md-text-button-leading-space:0.75rem}ix-dialog p{color:var(--cp-neutral-blue-60p,#09224199)}h2{margin:0;font-family:var(--text-heading-font,sans-serif);font-size:24px;letter-spacing:var(--text-heading-letter-spacing,.0075em);line-height:var(--text-heading-line-height,1.2em);font-weight:400;text-decoration:var(--text-heading-decoration,none);text-transform:var(--text-heading-transform,none);margin-bottom:24px}.resources{margin-bottom:44px;cursor:pointer}.resources ix-button{pointer-events:none}.news-info .newsAndPromotions,.news-info .resources{display:flex;gap:44px;flex-wrap:wrap}.news-info a{text-decoration:none;color:inherit}.news-item-description{margin:10px 0 0;font-family:var(--root-primary-font);font-style:normal;font-weight:400;font-size:16px;line-height:28px;letter-spacing:.44px;position:relative;color:#fff}#videoPlayer.headline{justify-content:space-between}video{max-width:100%;height:calc(100vh - 10rem)}.knowledge-base{border:none;height:1700px;margin:-2rem}@media (max-width:600px){.news-info{display:none}}@media (min-width:1200px){.launchpad-bg-image{background-image:url(https://cdn.globalportal.online/gpv2/launchpad-background-v1.png);background-repeat:no-repeat;background-position:right bottom;position:fixed;bottom:0;height:478px;width:522px;z-index:0;max-height:calc(100vh - 8rem);left:calc(100vw - 522px)}}`;var u;(function(t){t[t.APPROVE=5]="APPROVE",t[t.CREATE=4]="CREATE",t[t.DELETE=3]="DELETE",t[t.UPDATE=2]="UPDATE",t[t.READ=1]="READ"})(u||(u={}));const b=(t,e,i)=>{if(!t||!Object.keys(e).length)return!1;if(!Array.isArray(e))throw new Error("Permission keys must be an array");if(typeof i!="number")throw new Error("Required permission must be a number");return e.some(s=>{const r=t[s];return u[r]>=i})},Pe=t=>t.toLowerCase().replace(/[^a-zA-Z0-9]+(.)/g,(e,i)=>i.toUpperCase()),R={NOTIFICATIONS:"notifications",SITES:"/inventory/sites",LOCATIONS:"/inventory/locations",USERS:"/usermanagement/users",TICKETS:"/sm-service-tickets/service-tickets",ORDERS:"/gom/orders/search",PERMISSIONS:"/usermanagement/my-permissions"},C={RemoteHands:"Remote Hands",TroubleTickets:"Trouble Ticket",DeliveriesRemovals:"Shipping & Receiving",VisitorAccess:"Visitor Access",CustomerCare:"Customer Support",PermanentBadge:"Permanent Badge",OSPAccess:"OSP Access",POPPOERoomAccess:"PoP/POE Room Access"},q={Site:"Site",Floor:"Floor",Room:"Room",Cabinet:"Cabinet",Cage:"Cage"},ve=["CREATE","APPROVE","UPDATE","READ"];function H(){var t;const e=(t=window.gpConfig)===null||t===void 0?void 0:t["ui-launchpad"];if(!e)throw new Error("ui-launchpad config not loaded. Ensure config.json is fetched before app bootstrap.");return e}function Oe(){var t;const e=(t=window.registeredApps)===null||t===void 0?void 0:t["ui-knowledgebase"];return e!=null&&e.enabled?2:1}const we=()=>{const t=localStorage.getItem("user-authentication");return t?JSON.parse(t):null},ie=()=>{const t=localStorage.getItem("x-auth");return t?JSON.parse(t):null},n={get access_token(){var t;return(t=we())===null||t===void 0?void 0:t.access_token},get account_number(){var t,e;return(e=(t=we())===null||t===void 0?void 0:t.profile)===null||e===void 0?void 0:e.account_number},get email(){var t;return((t=ie())===null||t===void 0?void 0:t.email)||"Global User"},get userProfileName(){const t=ie();return t?t==null?void 0:t.name:"Global User"},get userCompany(){var t;const e=ie();return(t=e==null?void 0:e.account_hierarchy)===null||t===void 0?void 0:t.name}},Ne="ui-knowledge-base",Ue={"ui-knowledge-base":{path:"/knowledge-base",enabled:!0,copyNS:"kb"}},[De,qe,Me,Ve,Le,ze,Be,Fe,je,Z,Q,He]=["External User","Internal User","Remote Hands","Customer Support","Trouble Ticket","Shipping & Receiving","PoP/POE Room Access","OSP Access","DCIM-enabled location data","Visitor Access","Permanent Badge","User"],Ke=["Product & Service Requests"],Ge=["Product & Service Terminations"],be=[Me,Ve,ze,Le,Be,Fe,Z,Q],[se,We,Ye,Je,Ze,Qe,Xe,et,tt,it]=["Cross Connect","Space & Power","Customer Equipment Connection (CEC)","Internet Exchange","Intra-Customer Connectivity (ICC)","IP Bandwidth","Remote Hands Package","Service Exchange Cloud Router","Service Exchange Port","Cloud Connect"],B=[se,We,Ye,Je,Ze,Qe,Xe,et,tt,it],oe=[De,qe,He];var S;(function(t){t[t.NotSet=0]="NotSet",t[t.ServiceManagement=1]="ServiceManagement",t[t.OrderManagement=2]="OrderManagement"})(S||(S={}));const{ApiBaseUrl:$,GomApiBaseUrl:st,KnowledgeBaseLaunchpadApiUrl:ot,KnowledgeBaseLaunchpadApiToken:rt,"KB:strapiBaseUrl":at,"SM:ShowPopPoeAccess":nt,"SM:ShowOspAccess":dt}=H(),lt=Oe()===2,c={rows:[],totalCount:0},A=t=>{const e={headers:{Authorization:`Bearer ${n==null?void 0:n.access_token}`}};return t&&(e.signal=t),e},ct=async()=>{try{const t=await fetch(`${$}${R.SITES}?show_my_sites=true`,A());if(t.ok)return t.headers.get("x-total-count")||0}catch(t){return null}return null},ut=async()=>{try{const t=await fetch(`${$}${R.LOCATIONS}?dcim_enabled=true&page_size=1`,A());if(t.ok)return t.headers.get("x-total-count")||0}catch(t){return null}return null},pt=async()=>{var t;try{const e=await fetch(`${$}${R.USERS}?account_number=${n==null?void 0:n.account_number}&include_child_accounts=true`,A());if(e.ok)return((t=(await e.json()).pageable)===null||t===void 0?void 0:t.total_elements)||0}catch(e){return null}return null},ht=async()=>{try{if(lt){const t=new URLSearchParams({"filters[category][uid][$eq]":"whats-new","sort[0]":"dateAdded:desc","pagination[pageSize]":"3",status:"published",locale:"en"}),e=await fetch(`${at}/api/posts?${t}`);if(e.ok)return{whatsNews:(await e.json()).data}}else{const t=await fetch(ot,{headers:{Authorization:`Bearer ${rt}`,"Content-Type":"application/json"}});if(t.ok)return await t.json()}}catch(t){return{}}return{}},mt=async()=>{var t;try{const e=await fetch(`${$}${R.TICKETS}?$filter=(status eq 'New' or status eq 'In Progress' or status eq 'Approved' or status eq 'Cancellation requested' or status eq 'Announced' or status eq 'Pending Pick-up')&$top=1`,A());if(e.ok){const i=await e.json();return i.total_count||((t=i.items)===null||t===void 0?void 0:t.length)||0}}catch(e){return null}return null},fe=async t=>{var e;if(t.ok){const i=await t.json();return{rows:((i==null?void 0:i.items)||[]).map(s=>({...s,source:S.ServiceManagement})),totalCount:i.total_count||((e=i.items)===null||e===void 0?void 0:e.length)||0}}return c},ye=async(t=5,e=1)=>{const i=e>1?(e-1)*t:0,s=`${$}${R.TICKETS}`,r=encodeURIComponent(n==null?void 0:n.email),d=encodeURIComponent(n==null?void 0:n.userProfileName),l=`?$skip=${i}&$top=${t}&$filter=(created_by eq '${r}' or created_by eq '${d}')&$orderby=updated_at desc`;try{const h=await fetch(`${s}${l}`,A());return h&&h.ok?fe(h):c}catch(h){return c}},re=async t=>{const e=`${st}${R.ORDERS}`;try{return await fetch(`${e}`,{method:"POST",headers:{Authorization:`Bearer ${n==null?void 0:n.access_token}`,"Content-Type":"application/json","X-Correlation-Id":crypto.randomUUID()},body:JSON.stringify(t)})}catch(i){return}},xe=t=>t.map(e=>({ticket_id:e.id,ticket_type:e.orderTypeDescription,request_type:e.requestTypeDescription,created_by:e.requesterName,created_at:e.dateCreated,updated_at:e.dateUpdated,status:e.orderStatusDescription,source:S.OrderManagement})),ae=t=>B.filter(e=>(t==null?void 0:t[e])&&ve.includes(t[e])),gt=async()=>{const t=await re({filter:{operator:"AND",conditions:[{operator:"EQ",property:"gomOrderStatusCode",values:["OPEN"]}]},sort:[{property:"dateCreated",direction:"DESC"}],page:{page:1,size:1}});if(t&&t.ok){const e=await t.json();return(e==null?void 0:e.totalElements)||0}return null},ke=async(t,e=5,i=1)=>{const s={filter:{operator:"AND",conditions:[{operator:"EQ",property:"requesterName",values:[n==null?void 0:n.userProfileName]},{operator:"OR",conditions:[{operator:"EQ",property:"orderTypeDescription",values:t}]}]},sort:[{property:"dateUpdated",direction:"DESC"}],page:{page:i,size:e}},r=await re(s);if(r&&r.ok){const d=await r.json();return{rows:xe((d==null?void 0:d.results)||[]),totalCount:d.totalElements}}return c},Te=async(t=5,e=1)=>{const i=e>1?(e-1)*t:0;try{const s=await fetch(`${$}${R.TICKETS}?permission_privilege=Approve&$skip=${i}&$top=${t}&$filter=(status eq 'Pending Approval') and (ticket_type eq 'Facility Access')&$orderby=updated_at desc`,A());return s&&s.ok?fe(s):c}catch(s){return c}},Ce=async(t,e=5,i=1)=>{const s=await re({filter:{operator:"AND",conditions:[{operator:"EQ",property:"orderStatusCode",values:["AWAITING_INFORMATION","AWAITING_APPROVAL"]},{operator:"OR",conditions:[{operator:"EQ",property:"orderTypeDescription",values:t}]}]},sort:[{property:"dateUpdated",direction:"DESC"}],page:{page:i,size:e}});if(s&&s.ok){const r=await s.json(),d=(r==null?void 0:r.results)||[];return{rows:xe(d),totalCount:r.totalElements}}return c},vt=(t,e,i)=>{var s;const r=u[(s=t[e])===null||s===void 0?void 0:s.toUpperCase()]||0;return u[i.toUpperCase()]>r&&(t[e]=i),t},wt=async()=>{const t=await fetch(`${$}${R.PERMISSIONS}?exclude_parents=false&exclude_siblings=true`,A());return t.ok?(await t.json()).reduce((e,i)=>i.permission_name===Z||i.permission_name===Q?vt(e,i.permission_name,i.privilege):(e[i.permission_name]=i.privilege,e),{}):{}},bt=async(t,e,i)=>{const s=await fetch(`${$}/${t}/${e}`,A(i));return s.ok?(await s.json()).comments:{}},D=async(t,e,i)=>{if(t===C.POPPOERoomAccess&&!nt||t===C.OSPAccess&&!dt)return!1;const s=new URL(R.LOCATIONS,$);s.searchParams.set("page_size",1),s.searchParams.set("permission_type",t),s.searchParams.set("assignable_process",e),s.searchParams.set("permission_privilege","Create"),i&&s.searchParams.set("location_type",i);const r=await fetch(s,A());return r.ok?(await r.json()).items.length>0:!1},ft=async()=>{const t=await Promise.allSettled([D(C.DeliveriesRemovals,"",null),D(C.CustomerCare,"",q.Site),D(C.TroubleTickets,"",q.Site),D(C.RemoteHands,"",q.Site),D(C.VisitorAccess,"",q.Site),D(C.PermanentBadge,"",q.Site),D(C.OSPAccess,"",q.Site),D(C.POPPOERoomAccess,"",q.Site)]),[e,i,s,r,d,l,h,x]=t.map(k=>k.status==="fulfilled"?k.value:!1);return{DeliveriesRemovals:e,CustomerCare:i,TroubleTickets:s,RemoteHands:r,VisitorAccess:d,PermanentBadge:l,OSPAccess:h,POPPOEAccess:x}},{IsInventoryManagementEnabled:Se,IsGOMWebToLeadEnabled:yt,IsGOMTerminationsEnabled:xt,PhaseTwo:kt}=H(),T=window.innerWidth,Ee=t=>o`<ix-date type="static" .value="${t}"></ix-date>`,ne=t=>[{name:"ticketType",header:"Ticket Type",bodyRenderer:e=>o` <div @click="${()=>t(e)}"> <span>${e.ticket_type}</span> </div> `,width:T>600?"18%":"200px"},{name:"requestType",header:"Request Type",bodyRenderer:e=>o` <div @click="${()=>t(e)}"> <span>${e.request_type}</span> </div> `,width:T>600?"18%":"200px"},{name:"requester",header:"Requester",bodyRenderer:e=>o` <div @click="${()=>t(e)}"> <span>${e.created_by}</span> </div> `,width:T>600?"18%":"200px"},{name:"requestDate",header:"Request Date",bodyRenderer:e=>o` <div @click="${()=>t(e)}"> <span>${Ee(new Date(e.updated_at))}</span> </div> `,width:T>600?"18%":"200px"},{name:"status",header:"Status",width:T>600?"18%":"200px",bodyRenderer:e=>o` <div @click="${()=>t(e)}">${e.status}</div> `},{name:"comment",header:"",width:T>600?"10%":"50px",bodyRenderer:e=>{var i,s;return o` <comments-tooltip .ticketId="${e.ticket_id}" .ticketType="${(i=e.ticket_type)!==null&&i!==void 0?i:""}" .requestType="${(s=e.request_type)!==null&&s!==void 0?s:""}"></comments-tooltip> `}}],de=t=>[{name:"ticketType",header:"Ticket Type",bodyRenderer:e=>o` <div @click="${()=>t(e)}"> <span>${e.ticket_type}</span> </div> `,width:T>600?"20%":"200px"},{name:"requestType",header:"Request Type",bodyRenderer:e=>o` <div @click="${()=>t(e)}"> <span>${e.request_type}</span> </div> `,width:T>600?"20%":"200px"},{name:"requester",header:"Requester",bodyRenderer:e=>o` <div @click="${()=>t(e)}"> <span>${e.created_by}</span> </div> `,width:T>600?"20%":"200px"},{name:"requestDate",header:"Request Date",bodyRenderer:e=>o` <div @click="${()=>t(e)}"> <span>${Ee(new Date(e.updated_at))}</span> </div> `,width:T>600?"20%":"200px"},{name:"status",header:"Status",width:T>600?"20%":"200px",bodyRenderer:e=>o` <div @click="${()=>t(e)}">${e.status}</div> `}],y={base:"service-management/service-tickets","Customer Care":"customer-care",Delivery:"deliveries","Facility Access":"facility-access","Permanent Badge":"permanent-badge","Remote Hands":"remote-hands",Removal:"removals","Trouble Ticket":"trouble-tickets","Visitor Access":"visitor-access"},X={"Visitor Access":!0,"Permanent Badge":!0},K={ACTIVE_TICKETS:{header:"Active Tickets",icon:"laptop",target:"/service-management/"},USERS:{header:"Active Users",icon:"users",target:"/user-management/user-management"},MY_SITES:{header:"My Sites",icon:"mySites",target:"/sites/sites"},DCIM:{header:"DCIM-Enabled Locations",icon:"dcim",target:"/sites/locations?dcim_enabled=true"},ACTIVE_ORDERS:{header:"Active Orders",icon:"orders",target:"/order-management/open-orders"}},M=(t,e)=>{var i;const s=b(t,oe,u.READ),r=b(t,[je],u.READ),d=Se&&((i=window.registeredApps["ui-gom"])===null||i===void 0?void 0:i.enabled)&&ve.some(l=>b(t,B,u[l]));return[{...K.ACTIVE_TICKETS,...(e==null?void 0:e.ACTIVE_TICKETS)!==void 0&&{value:e==null?void 0:e.ACTIVE_TICKETS},error:(e==null?void 0:e.ACTIVE_TICKETS)===null},...s?[{...K.USERS,...(e==null?void 0:e.USERS)!==void 0&&{value:e==null?void 0:e.USERS},error:(e==null?void 0:e.USERS)===null}]:[],{...K.MY_SITES,...(e==null?void 0:e.MY_SITES)!==void 0&&{value:e==null?void 0:e.MY_SITES},error:(e==null?void 0:e.MY_SITES)===null},...r?[{...K.DCIM,...(e==null?void 0:e.DCIM)!==void 0&&{value:e==null?void 0:e.DCIM},error:(e==null?void 0:e.DCIM)===null}]:[],...d&&(e==null?void 0:e.ACTIVE_ORDERS)!==void 0?[{...K.ACTIVE_ORDERS,...(e==null?void 0:e.ACTIVE_ORDERS)!==void 0&&{value:e==null?void 0:e.ACTIVE_ORDERS},error:(e==null?void 0:e.ACTIVE_ORDERS)===null}]:[]]},Re=(t,e)=>{var i,s,r;const d=b(t,oe,u.READ),l=b(t,oe,u.CREATE),h=yt&&((i=window.registeredApps["ui-gom"])===null||i===void 0?void 0:i.enabled)&&b(t,Ke,u.CREATE),x=xt&&((s=window.registeredApps["ui-gom"])===null||s===void 0?void 0:s.enabled)&&b(t,Ge,u.CREATE),k=Se&&((r=window.registeredApps["ui-gom"])===null||r===void 0?void 0:r.enabled)&&(b(t,[se],u.CREATE)||b(t,[se],u.APPROVE)),N=e.DeliveriesRemovals,V=e.TroubleTickets,Y=e.CustomerCare,F=e.RemoteHands,J=e.VisitorAccess||e.PermanentBadge||e.OSPAccess||e.POPPOEAccess,ee=Y||J||F||N||V||h||x,me={header:"ORDER MANAGEMENT",items:[{name:"Connectivity",icon:"crossConnect",target:"launch-physical-connectivity"}]};return kt&&me.items.push({name:"Space & Power",icon:"crossConnect",target:"launch-space-and-power"}),[...ee?[{header:"Service Requests",items:[...Y?[{name:"Customer Care",icon:"cutomerSupport",target:"launch-customer-support"}]:[],...J?[{name:"Facility Access",icon:"lock",target:"launch-facility-access"}]:[],...F?[{name:"Remote Hands",icon:"remoteHands",target:"launch-remote-hands"}]:[],...N?[{name:"Deliveries & Removals",icon:"shipping",target:"launch-deliveries-removals"}]:[],...V?[{name:"Trouble Tickets",icon:"troubleTickets",target:"launch-trouble-tickets"}]:[],...h?[{name:"Request Service or Product",icon:"circleAdd",target:"open-service-request"}]:[],...x?[{name:"Terminate Service or Product",icon:"circleMinus",target:"open-termination-request"}]:[]]}]:[],...k?[me]:[],...d?[{header:"USER MANAGEMENT",items:[...l?[{name:"Add user",icon:"addUser",target:"create-user-clicked"}]:[],{name:"Manage users",icon:"manageUsers",target:"/user-management/user-management"}]}]:[]]};var f;(function(t){t.SERVICE_TICKETS="SERVICE_TICKETS",t.ORDERS="ORDERS"})(f||(f={}));let I=class extends E{constructor(){super(...arguments),this.serviceTickets=c,this.orders=c,this.isLoading=!0,this.isFetching=!1,this.activeTab=f.SERVICE_TICKETS,this.tabs=[{id:f.SERVICE_TICKETS,text:"Service Tickets",selected:()=>this.activeTab===f.SERVICE_TICKETS,onClick:()=>{this.activeTab=f.SERVICE_TICKETS},rowCount:this.serviceTickets.totalCount,shouldRender:()=>this.permissions.serviceTickets,grid:()=>o`<ix-table-data .columns="${ne(this.ticketSelect)}" .rows="${this.serviceTickets.rows}" header="Recent Updates" total-count="${this.serviceTickets.totalCount}" ?disabled="${this.serviceTickets.totalCount===0}" ?hidden="${!this.tabs[0].selected()}" emptyDescription="No Recent Service Tickets Updates" ?isLoading="${this.isFetching}" data-testid="lp-serviceTickets" showViewAllButtonOnEmpty href="${`/service-management/?createdBy_equals=${n==null?void 0:n.userProfileName}&sort=updatedAt&order=desc`}" footer-view-all @change="${async t=>{const{page:e,pageSize:i}=t.detail;this.isFetching=!0,this.serviceTickets=await this.getServiceTickets(i,e),this.isFetching=!1}}" @show-view-more="${async()=>{this.isFetching=!0,this.serviceTickets=await this.getServiceTickets(10),this.isFetching=!1}}"> ${this.renderTableNav()} </ix-table-data>`},{id:f.ORDERS,text:"Orders",selected:()=>this.activeTab===f.ORDERS,onClick:()=>{this.activeTab=f.ORDERS},rowCount:this.orders.totalCount,shouldRender:()=>this.permissions.orders,grid:()=>o`<ix-table-data .columns="${ne(this.ticketSelect)}" .rows="${this.orders.rows}" header="Ticket Updates" ?disabled="${this.orders.totalCount===0}" ?hidden="${!this.tabs[1].selected()}" total-count="${this.orders.totalCount}" emptyDescription="No Recent Order Ticket Updates" showViewAllButtonOnEmpty href="/order-management/open-orders" @change="${async t=>{const{page:e,pageSize:i}=t.detail;this.isFetching=!0,this.orders=await this.getOrders(i,e),this.isFetching=!1}}" data-testid="lp-orders" ?isLoading="${this.isFetching}" @show-view-more="${async()=>{this.isFetching=!0,this.orders=await this.getOrders(10),this.isFetching=!1}}" footer-view-all> ${this.renderTableNav()} </ix-table-data>`}],this.permissions={orders:!1,serviceTickets:!1},this.getServiceTickets=(t=5,e=1)=>this.permissions.serviceTickets?ye(t,e):c,this.getOrders=(t=5,e=1)=>this.permissions.orders?ke(this.permissions.gomTicketTypes,t,e):c,this.renderTableNav=()=>{const t=this.tabs.filter(e=>e.shouldRender());return t.length<=1?w:o` <div slot="tabs"> <ix-grid-nav class="action-required-grid-nav" .buttons="${t.map(e=>({text:e.text,selected:e.selected(),onClick:e.onClick}))}"></ix-grid-nav> </div> `}}renderTables(){const t=this.tabs.filter(e=>e.shouldRender());return t.length===0?w:t.map(e=>e.grid())}ticketSelect(t){let e="";switch(t.source){case S.ServiceManagement:const{ticket_id:i,ticket_type:s,request_type:r}=t,d=X[r]?`/${y[r]}`:"";e=`/${y.base}/${y[s]}${d}/${i}`;break;case S.OrderManagement:e=`/order-management/order-details/${t.ticket_id}`;break;default:e="/order-management/order-details"}z.go(e)}async firstUpdated(){this.serviceTickets=await this.getServiceTickets();let t=this.tabs.findIndex(e=>e.shouldRender()&&e.rowCount>0);t===-1&&(t=this.tabs.findIndex(e=>e.shouldRender())),this.activeTab=this.tabs[t>-1?t:0].id,this.isLoading=!1}render(){return o` ${this.isLoading?w:o` ${this.renderTables()} `} `}};I.styles=[U],a([m()],I.prototype,"serviceTickets",void 0),a([g({type:Object})],I.prototype,"orders",void 0),a([m()],I.prototype,"isLoading",void 0),a([m()],I.prototype,"isFetching",void 0),a([m()],I.prototype,"activeTab",void 0),a([g({type:Object})],I.prototype,"permissions",void 0),I=a([L("lp-ticket-updates")],I);let _=class extends E{constructor(){super(...arguments),this.serviceTickets=c,this.orders=c,this.isLoading=!0,this.isFetching=!1,this.activeTab=f.SERVICE_TICKETS,this.tabs=[{id:f.SERVICE_TICKETS,text:"Service Tickets",selected:()=>this.activeTab===f.SERVICE_TICKETS,onClick:()=>{this.activeTab=f.SERVICE_TICKETS},rowCount:this.serviceTickets.totalCount,shouldRender:()=>this.permissions.serviceTickets,grid:()=>o`<ix-table-data .columns="${de(this.ticketSelect)}" .rows="${this.serviceTickets.rows}" header="Your Action Required" total-count="${this.serviceTickets.totalCount}" ?disabled="${this.serviceTickets.totalCount===0}" ?hidden="${!this.tabs[0].selected()}" emptyDescription="No Pending Actions for Service Tickets" ?isLoading="${this.isFetching}" data-testid="lp-serviceTickets" showViewAllButtonOnEmpty href="${"/service-management/?status_equals=Pending+Approval&permission_privilege=Approve"}" footer-view-all @change="${async t=>{const{page:e,pageSize:i}=t.detail;this.isFetching=!0,this.serviceTickets=await this.getServiceTickets(i,e),this.isFetching=!1}}" @show-view-more="${async()=>{this.isFetching=!0,this.serviceTickets=await this.getServiceTickets(10),this.isFetching=!1}}"> ${this.renderTableNav()} </ix-table-data>`},{id:f.ORDERS,text:"Orders",selected:()=>this.activeTab===f.ORDERS,onClick:()=>{this.activeTab=f.ORDERS},rowCount:this.orders.totalCount,shouldRender:()=>this.permissions.orders,grid:()=>o`<ix-table-data .columns="${de(this.ticketSelect)}" .rows="${this.orders.rows}" header="Your Action Required" ?disabled="${this.orders.totalCount===0}" ?hidden="${!this.tabs[1].selected()}" total-count="${this.orders.totalCount}" emptyDescription="No Pending Actions for Orders" showViewAllButtonOnEmpty href="/order-management/open-orders" @change="${async t=>{const{page:e,pageSize:i}=t.detail;this.isFetching=!0,this.orders=await this.getOrders(i,e),this.isFetching=!1}}" data-testid="lp-orders" ?isLoading="${this.isFetching}" @show-view-more="${async()=>{this.isFetching=!0,this.orders=await this.getOrders(10),this.isFetching=!1}}" footer-view-all> ${this.renderTableNav()} </ix-table-data>`}],this.permissions={orders:!1,serviceTickets:!1},this.getServiceTickets=(t=5,e=1)=>this.permissions.serviceTickets?Te(t,e):c,this.getOrders=(t=5,e=1)=>this.permissions.orders?Ce(this.permissions.gomTicketTypes,t,e):c,this.renderTableNav=()=>{const t=this.tabs.filter(e=>e.shouldRender());return t.length<=1?w:o` <div slot="tabs"> <ix-grid-nav class="action-required-grid-nav" .buttons="${t.map(e=>({text:e.text,selected:e.selected(),onClick:e.onClick}))}"></ix-grid-nav> </div> `}}renderTables(){const t=this.tabs.filter(e=>e.shouldRender());return t.length===0?w:t.map(e=>e.grid())}ticketSelect(t){let e="";switch(t.source){case S.ServiceManagement:const{ticket_id:i,ticket_type:s,request_type:r}=t,d=X[r]?`/${y[r]}`:"";e=`/${y.base}/${y[s]}${d}/${i}`;break;case S.OrderManagement:e=`/order-management/order-details/${t.ticket_id}`;break;default:e="/order-management/order-details"}z.go(e)}async firstUpdated(){this.serviceTickets=await this.getServiceTickets();let t=this.tabs.findIndex(e=>e.shouldRender()&&e.rowCount>0);t===-1&&(t=this.tabs.findIndex(e=>e.shouldRender())),this.activeTab=this.tabs[t>-1?t:0].id,this.isLoading=!1}render(){return o` ${this.isLoading?w:o` ${this.renderTables()} `} `}};_.styles=[U],a([m()],_.prototype,"serviceTickets",void 0),a([g({type:Object})],_.prototype,"orders",void 0),a([m()],_.prototype,"isLoading",void 0),a([m()],_.prototype,"isFetching",void 0),a([m()],_.prototype,"activeTab",void 0),a([g({type:Object})],_.prototype,"permissions",void 0),_=a([L("lp-action-required")],_);const{KnowledgeBaseLaunchpadImgBase:$e,KnowledgeBaseLaunchpadVideoBase:Tt,KnowledgeBaseLaunchpadLinkBase:le,KnowledgeBaseLaunchpadViewAllUrl:Ct,IsInventoryManagementEnabled:St}=H();let p=class extends E{constructor(){super(...arguments),this.data={},this.status=[],this.nav=[],this.news=[],this.contacts={},this.apiPermissions="{}",this.resources=[],this.promotions=[],this.knowledgebase="",this.ticketUpdateOrders=c,this.actionRequiredOrders=c,this.updates={columns:[],rows:[],header:"",href:"",totalCount:0},this.actions={columns:[],rows:[],header:"",href:"",disabled:!0,totalCount:0},this.isLoading=!0,this.showVideoModal=!1,this.videoUrl="",this.videoTitle="",this.actionRequiredPermissions={serviceTickets:!1,orders:!1,gomTicketTypes:[]},this.ticketUpdatePermissions={serviceTickets:!1,orders:!1,gomTicketTypes:[]},this.handleResourceOpen=(t,e="")=>i=>{t&&(i.preventDefault(),this.videoUrl=`${Tt}${encodeURIComponent(t)}`,this.videoTitle=e,this.showVideoModal=!0)},this.handleResourceClosed=()=>{this.showVideoModal=!1},this.renderNavigation=()=>o` ${this.nav.map(t=>o` <ix-nav-list .header="${t.header}" data-testid="${`lp-navigation-${Pe(t.header)}`}"> ${t.items.map(e=>o`<ix-nav-item .icon="${e==null?void 0:e.icon}" .target="${e==null?void 0:e.target}">${e.name}</ix-nav-item>`)} </ix-nav-list>`)} `,this.renderTicketUpdatesGrid=()=>o`<ix-table-data .columns="${this.updates.columns}" .rows="${this.updates.rows}" .header="${this.updates.header}" .href="${this.updates.href}" ?disabled="${this.updates.disabled}" emptyDescription="No Recent Service Ticket Updates" showViewAllButtonOnEmpty showViewAllOnFooter footer-view-all data-testid="lp-ticketUpdates"> </ix-table-data>`,this.renderActionsRequiredGrid=()=>o`<ix-table-data .columns="${this.actions.columns}" .rows="${this.actions.rows}" .header="${this.actions.header}" .href="${this.actions.href}" ?disabled="${this.actions.disabled}" emptyDescription="No Pending Actions" data-testid="lp-yourActionRequired" showViewAllOnFooter footer-view-all> </ix-table-data>`,this.renderActionRequired=()=>St?o` ${this.isLoading?w:o` <lp-action-required .orders="${this.actionRequiredOrders}" permissions="${JSON.stringify(this.actionRequiredPermissions)}"></lp-action-required> <lp-ticket-updates .orders="${this.ticketUpdateOrders}" permissions="${JSON.stringify(this.ticketUpdatePermissions)}"></lp-ticket-updates> `} `:o` ${this.actions.isAuthorizedToView?this.renderActionsRequiredGrid():w} ${this.updates.isAuthorizedToView?this.renderTicketUpdatesGrid():w}`}async firstUpdated(){const t=ae(this.apiPermissions);this.actionRequiredPermissions={serviceTickets:b(this.apiPermissions,[Z,Q],u.APPROVE),orders:b(this.apiPermissions,B,u.CREATE),gomTicketTypes:t},this.ticketUpdatePermissions={serviceTickets:b(this.apiPermissions,be,u.UPDATE),orders:b(this.apiPermissions,B,u.READ),gomTicketTypes:t},this.isLoading=!1}render(){var t,e,i;return o` ${this.showVideoModal?o`<ix-dialog open @close="${this.handleResourceClosed}"> <div id="videoPlayer" class="headline" slot="headline"> <span class="title">${this.videoTitle}</span> <ix-icon-button @click="${this.handleResourceClosed}" icon="close"> </ix-icon-button> </div> <div slot="content"> <video src="${this.videoUrl}" controls="" autoplay="" controlslist="nodownload"></video> </div> </ix-dialog>`:w} <main class="wrapper"> <section class="grid grid-cols-1 gap-8 lg:grid-cols-[minmax(660px,1176px)_minmax(310px,584px)]"> <div class="flex flex-col gap-8"> <ix-status-counter-group class="mx-4 lg:mx-0" .data="${this.status}"></ix-status-counter-group> <nav data-testid="lp-tablet-nav-widget" class="grid grid-cols-1 gap-8 md:grid-cols-2 lg:hidden mx-4 lg:mx-0"> ${this.renderNavigation()} </nav> ${this.renderActionRequired()} ${this.knowledgebase!==""?o` <iframe class="knowledge-base" title="knowledge base" .src="${this.knowledgebase}"></iframe>`:w} ${!((t=this.news)===null||t===void 0)&&t.length?o`<ix-news-feed header="What's New" .data="${this.news.map(s=>({...s,uid:`${le}${s.uid}`}))}" .href="${Ct}" data-testid="lp-newsFeed" class="mx-4 lg:mx-0"></ix-news-feed>`:w} ${!((e=this.resources)===null||e===void 0)&&e.length?o`<div class="news-info mx-4 lg:mx-0"> <h2>Resources</h2> <div class="resources"> ${this.resources.map(s=>{var r,d,l,h;return o` <a href="${`${le}${s.uid}`}" data-testid="lp-resourceItem" @click="${this.handleResourceOpen((r=s.video)===null||r===void 0?void 0:r.url,s.title)}"><ix-info-card class="w-[348px]" type="info-card-resources"><img slot="image" name="image" alt="${((d=s==null?void 0:s.thumbnail)===null||d===void 0?void 0:d.alternativeText)||""}" src="${`${$e}${encodeURIComponent(s.thumbnail.url)}&w=3840&q=75`}"> ${!((h=(l=s.topics)===null||l===void 0?void 0:l[0])===null||h===void 0)&&h.name?o`<div slot="label"> ${s.topics[0].name} </div>`:w} <div slot="title">${s.title}</div> ${s.abstract?o`<div slot="description" class="news-item-description"> ${s.abstract} </div>`:w} <ix-button slot="cta" type="button" has-icon trailing-icon appearance="text"> <ix-icon slot="icon">chevron_right</ix-icon> Learn more </ix-button> </ix-info-card></a>`})} </div> <h2>News &amp; Promotions</h2> <div class="newsAndPromotions"> ${this.promotions.map(s=>o` <a href="${`${le}${s.uid}`}" data-testid="lp-newsPromotionsItem"><ix-info-card type="info-card"> <img slot="image" name="image" alt="${s.thumbnail.alternativeText}" src="${`${$e}${encodeURIComponent(s.thumbnail.url)}&w=3840&q=75`}"> <div slot="title">${s.title}</div> <div slot="description">${s.abstract}</div> <ix-button slot="cta" type="button" has-icon trailing-icon appearance="text"> <ix-icon slot="icon">chevron_right</ix-icon> Learn more </ix-button> </ix-info-card></a>`)} </div> </div>`:w} ${!((i=this.contacts)===null||i===void 0)&&i.email?o`<ix-contacts class="mx-4 lg:mx-0" .contacts="${this.contacts}" data-testid="lp-contacts"></ix-contacts>`:w} </div> <nav class="hidden lg:block" data-testid="lp-lg-navigation"> <div class="gap-8 sticky top-[--top-height] flex-col lg:flex"> ${this.renderNavigation()} </div> </nav> </section> </main> `}};p.styles=[U,j],a([g({type:Object})],p.prototype,"data",void 0),a([g({type:Array})],p.prototype,"status",void 0),a([g({type:Array})],p.prototype,"nav",void 0),a([g({type:Array})],p.prototype,"news",void 0),a([g({type:Object})],p.prototype,"contacts",void 0),a([g({type:Object,attribute:"api-permissions"})],p.prototype,"apiPermissions",void 0),a([g({type:Array})],p.prototype,"resources",void 0),a([g({type:Array})],p.prototype,"promotions",void 0),a([g({type:String})],p.prototype,"knowledgebase",void 0),a([g({type:Object})],p.prototype,"ticketUpdateOrders",void 0),a([g({type:Object})],p.prototype,"actionRequiredOrders",void 0),a([g({type:Object})],p.prototype,"updates",void 0),a([g({type:Object})],p.prototype,"actions",void 0),a([m()],p.prototype,"isLoading",void 0),a([m()],p.prototype,"showVideoModal",void 0),a([m()],p.prototype,"videoUrl",void 0),a([m()],p.prototype,"videoTitle",void 0),a([m()],p.prototype,"actionRequiredPermissions",void 0),a([m()],p.prototype,"ticketUpdatePermissions",void 0),p=a([L("ix-launchpad")],p);const ce={whatsNews:[{id:21,abstract:null,behavior:"accordion",topics:[{code:"news",icon:"newspaper",id:7,name:"News"}],thumbnail:{url:"",alternativeText:""},video:null,category:{icon:"local_offer",image:{url:"",alternativeText:""},showSortBy:!0,showFilterByTopic:!0,subtitle:"See what's new in the Global Portal and what we're gradually rolling out. ",title:"What's New",uid:"whats-new"},dateAdded:"2023-05-08",documents:[{id:109,url:"/uploads/2023_may_release_9b139ef760.pdf",name:"2023-may-release.pdf"}],duration:null,featured:!1,text:null,title:"May 2023",uid:"may-2023"}],resources:[{id:28,abstract:null,behavior:"video_card",topics:[],thumbnail:{url:"/uploads/blue_muffin_4f03cd693d.png",alternativeText:null},video:null,category:{icon:"web_asset",image:{url:"",alternativeText:""},showSortBy:!0,showFilterByTopic:!0,subtitle:"The answers to all of your most frequently asked questions.",title:"Media Resources",uid:"resources"},dateAdded:"2024-05-08",documents:null,duration:null,featured:!0,text:`<pre data-pm-slice="1 1 []"><code class="language-plaintext">Cupcake ipsum dolor sit amet bonbon powder gummi bears. Pie gingerbread powder icing chocolate cake. Jelly beans carrot cake chocolate fruitcake icing chocolate bar.
864
864
 
865
865
  Souffl\xE9 macaroon drag\xE9e chocolate bar I love. Cake toffee sweet I love danish topping dessert jelly beans. Apple pie marshmallow powder marshmallow gingerbread chocolate bar fruitcake. I love I love pastry tootsie roll sesame snaps oat cake halvah.</code></pre>`,title:"The Mighty Blue Muffin ",uid:"blue-muffin"}],newsAndPromotions:[{id:18,abstract:"Achieve your digital vision by integrating our APIs with your applications. Realize how our API capabilities can enhance your digital transformation. Please click here for more information about the Developer Portal.",behavior:"text",topics:[{code:"news",icon:"newspaper",id:7,name:"News"}],thumbnail:{url:"/uploads/server_racks_31634cc4b0_3658c6c3e2.png",alternativeText:null},video:null,category:{icon:"feed",image:{url:"",alternativeText:""},showSortBy:!0,showFilterByTopic:!0,subtitle:"Click here to see what is new and exciting in the world of Digital Realty!",title:"News & Promotions",uid:"news-and-promotions"},dateAdded:"2022-12-16",documents:null,duration:null,featured:!1,text:'<p>Achieve your digital vision by integrating our APIs with your applications. Realize how our API capabilities can enhance your digital transformation. Please visit <a target="_blank" rel="noopener noreferrer" href="https://developer.digitalrealty.com">https://developer.digitalrealty.com</a> for more information about the Developer Portal.</p><p>Adding an <a href="/uploads/2023_april_release_a1db878034.pdf" download="2023-april-release.pdf">2023-april-release.pdf</a> as well to a document for development purposes.</p><p>&nbsp;</p>',title:"Join our API Revolution!",uid:"join-our-api-revolution"}],welcomeVideo:{id:2,abstract:null,behavior:null,topics:null,thumbnail:{url:"",alternativeText:""},video:{url:"/uploads/Global_Portal_Welcome_video_b080e2b76e_b63f553823.mp4"},category:null,dateAdded:"2022-12-16",documents:null,duration:229,featured:!0,text:"<p>Welcome to the Global Portal!</p>",title:"Global Portal Welcome Video",uid:"global-portal-welcome-video"},release:null},Et={phoneNumbers:`**Australia:** +61 383611501
866
866
  **Europe:** +44 8000 183 909, +44 (0) 20 3750 6073
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Webcomponent ui-launchpad following open-wc recommendations",
4
4
  "license": "MIT",
5
5
  "author": "ui-launchpad",
6
- "version": "18.0.3",
6
+ "version": "18.0.4-IXUAT-11352.572165",
7
7
  "type": "module",
8
8
  "exports": {
9
9
  "./ui-launchpad.js": "./dist/ui-launchpad.js",