@digital-realty/ui-launchpad 17.0.0-SM-2990.566984 → 17.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/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:"073436819ea55e8e8f2358a61a440e0b"}],{}),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:"6b62521032c65e0be12754eb8254c80a"}],{}),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/20/jp1_0n3n7kndh6rnbqb5344m0000gn/T/6020356e26d1d8dea89ab70747c5d392/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\": \"073436819ea55e8e8f2358a61a440e0b\"\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/561370281e25fcee43121055d46edf52/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\": \"6b62521032c65e0be12754eb8254c80a\"\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,4 +1,4 @@
1
- import{__decorate as a}from"tslib";import{css as te,html as o,LitElement as E,nothing as w,svg as ge}from"lit";import{state as m,property as g,customElement as V,query as Ie}from"lit/decorators.js";import{jwtDecode as _e}from"jwt-decode";import{Router as L}from"@vaadin/router";import"@digital-realty/ix-widget/ix-status-counter-group.js";import"@digital-realty/ix-button/ix-button.js";import"@digital-realty/ix-widget/ix-contacts.js";import"@digital-realty/ix-widget/ix-info-card.js";import"@digital-realty/ix-widget/ix-news-feed.js";import"@digital-realty/ix-widget/ix-table-data.js";import"@digital-realty/ix-widget/ix-nav-item.js";import"@digital-realty/ix-widget/ix-nav-list.js";import"@digital-realty/ix-dialog/ix-dialog.js";import"@digital-realty/ix-date/ix-date.js";import"@digital-realty/ix-drawer/ix-drawer.js";import"@digital-realty/ix-textbox/ix-textbox.js";import"@digital-realty/ix-select/ix-select.js";import"@digital-realty/ix-icon";import"@material/web/icon/icon.js";import"@digital-realty/ix-progress/ix-progress.js";const U=te` *, ::before, ::after {
1
+ import{__decorate as a}from"tslib";import{css as te,html as o,LitElement as E,nothing as v,svg as ge}from"lit";import{state as h,property as m,customElement as V,query as Ie}from"lit/decorators.js";import{jwtDecode as _e}from"jwt-decode";import{Router as L}from"@vaadin/router";import"@digital-realty/ix-widget/ix-status-counter-group.js";import"@digital-realty/ix-button/ix-button.js";import"@digital-realty/ix-widget/ix-contacts.js";import"@digital-realty/ix-widget/ix-info-card.js";import"@digital-realty/ix-widget/ix-news-feed.js";import"@digital-realty/ix-widget/ix-table-data.js";import"@digital-realty/ix-widget/ix-nav-item.js";import"@digital-realty/ix-widget/ix-nav-list.js";import"@digital-realty/ix-dialog/ix-dialog.js";import"@digital-realty/ix-date/ix-date.js";import"@digital-realty/ix-drawer/ix-drawer.js";import"@digital-realty/ix-textbox/ix-textbox.js";import"@digital-realty/ix-select/ix-select.js";import"@digital-realty/ix-icon";import"@material/web/icon/icon.js";import"@digital-realty/ix-progress/ix-progress.js";const U=te` *, ::before, ::after {
2
2
  --tw-border-spacing-x: 0;
3
3
  --tw-border-spacing-y: 0;
4
4
  --tw-translate-x: 0;
@@ -860,18 +860,18 @@ 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 c;(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"})(c||(c={}));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 c[r]>=i})},Pe=t=>t.toLowerCase().replace(/[^a-zA-Z0-9]+(.)/g,(e,i)=>i.toUpperCase()),$={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}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}},Oe="ui-knowledge-base",Ne={"ui-knowledge-base":{path:"/knowledge-base",enabled:!0,copyNS:"kb"}},[Ue,De,qe,Me,Ve,Le,ze,Be,Fe,Z,Q,je]=["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"],He=["Product & Service Requests"],Ke=["Product & Service Terminations"],be=[qe,Me,Le,Ve,ze,Be,Z,Q],[se,Ge,We,Ye,Je,Ze,Qe,Xe,et,tt]=["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"],z=[se,Ge,We,Ye,Je,Ze,Qe,Xe,et,tt],oe=[Ue,De,je];var S;(function(t){t[t.NotSet=0]="NotSet",t[t.ServiceManagement=1]="ServiceManagement",t[t.OrderManagement=2]="OrderManagement"})(S||(S={}));const{ApiBaseUrl:R,GomApiBaseUrl:it,KnowledgeBaseLaunchpadApiUrl:st,KnowledgeBaseLaunchpadApiToken:ot,"SM:ShowPopPoeAccess":rt,"SM:ShowOspAccess":at}=H(),h={rows:[],totalCount:0},A=t=>{const e={headers:{Authorization:`Bearer ${n==null?void 0:n.access_token}`}};return t&&(e.signal=t),e},nt=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},dt=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},lt=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},ct=async()=>{try{const t=await fetch(st,{headers:{Authorization:`Bearer ${ot}`,"Content-Type":"application/json"}});if(t.ok)return await t.json()}catch(t){return{}}return{}},ut=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 h},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 p=await fetch(`${s}${l}`,A());return p&&p.ok?fe(p):h}catch(p){return h}},re=async t=>{const e=`${it}${$.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=>z.filter(e=>(t==null?void 0:t[e])&&ve.includes(t[e])),pt=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 h},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):h}catch(s){return h}},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 h},ht=(t,e,i)=>{var s;const r=c[(s=t[e])===null||s===void 0?void 0:s.toUpperCase()]||0;return c[i.toUpperCase()]>r&&(t[e]=i),t},mt=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?ht(e,i.permission_name,i.privilege):(e[i.permission_name]=i.privilege,e),{}):{}},gt=async(t,e,i)=>{const s=await fetch(`${R}/${t}/${e}`,A(i));return s.ok?(await s.json()).comments:{}},D=async(t,e,i)=>{if(t===C.POPPOERoomAccess&&!rt||t===C.OSPAccess&&!at)return!1;const s=new URL($.LOCATIONS,R);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},vt=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,p,x]=t.map(k=>k.status==="fulfilled"?k.value:!1);return{DeliveriesRemovals:e,CustomerCare:i,TroubleTickets:s,RemoteHands:r,VisitorAccess:d,PermanentBadge:l,OSPAccess:p,POPPOEAccess:x}},{IsInventoryManagementEnabled:Se,IsGOMWebToLeadEnabled:wt,IsGOMTerminationsEnabled:bt,PhaseTwo:ft}=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"}},B=(t,e)=>{var i;const s=b(t,oe,c.READ),r=b(t,[Fe],c.READ),d=Se&&((i=window.registeredApps["ui-gom"])===null||i===void 0?void 0:i.enabled)&&ve.some(l=>b(t,z,c[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}]:[]]},$e=(t,e)=>{var i,s,r;const d=b(t,oe,c.READ),l=b(t,oe,c.CREATE),p=wt&&((i=window.registeredApps["ui-gom"])===null||i===void 0?void 0:i.enabled)&&b(t,He,c.CREATE),x=bt&&((s=window.registeredApps["ui-gom"])===null||s===void 0?void 0:s.enabled)&&b(t,Ke,c.CREATE),k=Se&&((r=window.registeredApps["ui-gom"])===null||r===void 0?void 0:r.enabled)&&(b(t,[se],c.CREATE)||b(t,[se],c.APPROVE)),N=e.DeliveriesRemovals,M=e.TroubleTickets,Y=e.CustomerCare,F=e.RemoteHands,J=e.VisitorAccess||e.PermanentBadge||e.OSPAccess||e.POPPOEAccess,ee=Y||J||F||N||M||p||x,me={header:"ORDER MANAGEMENT",items:[{name:"Connectivity",icon:"crossConnect",target:"launch-physical-connectivity"}]};return ft&&me.items.push({name:"Space & Power",icon:"crossConnect",target:"launch-space-and-power"}),[...ee?[{header:"Service tickets",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"}]:[],...M?[{name:"Trouble Tickets",icon:"troubleTickets",target:"launch-trouble-tickets"}]:[],...p?[{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=h,this.orders=h,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):h,this.getOrders=(t=5,e=1)=>this.permissions.orders?ke(this.permissions.gomTicketTypes,t,e):h,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"}L.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([V("lp-ticket-updates")],I);let _=class extends E{constructor(){super(...arguments),this.serviceTickets=h,this.orders=h,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):h,this.getOrders=(t=5,e=1)=>this.permissions.orders?Ce(this.permissions.gomTicketTypes,t,e):h,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"}L.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([V("lp-action-required")],_);const{KnowledgeBaseLaunchpadImgBase:Re,KnowledgeBaseLaunchpadVideoBase:yt,KnowledgeBaseLaunchpadLinkBase:le,KnowledgeBaseLaunchpadViewAllUrl:xt,IsInventoryManagementEnabled:kt}=H();let u=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=h,this.actionRequiredOrders=h,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=`${yt}${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=()=>kt?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],c.APPROVE),orders:b(this.apiPermissions,z,c.CREATE),gomTicketTypes:t},this.ticketUpdatePermissions={serviceTickets:b(this.apiPermissions,be,c.UPDATE),orders:b(this.apiPermissions,z,c.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="${xt}" 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,p;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="${`${Re}${encodeURIComponent(s.thumbnail.url)}&w=3840&q=75`}"> ${!((p=(l=s.topics)===null||l===void 0?void 0:l[0])===null||p===void 0)&&p.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="${`${Re}${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> `}};u.styles=[U,j],a([g({type:Object})],u.prototype,"data",void 0),a([g({type:Array})],u.prototype,"status",void 0),a([g({type:Array})],u.prototype,"nav",void 0),a([g({type:Array})],u.prototype,"news",void 0),a([g({type:Object})],u.prototype,"contacts",void 0),a([g({type:Object,attribute:"api-permissions"})],u.prototype,"apiPermissions",void 0),a([g({type:Array})],u.prototype,"resources",void 0),a([g({type:Array})],u.prototype,"promotions",void 0),a([g({type:String})],u.prototype,"knowledgebase",void 0),a([g({type:Object})],u.prototype,"ticketUpdateOrders",void 0),a([g({type:Object})],u.prototype,"actionRequiredOrders",void 0),a([g({type:Object})],u.prototype,"updates",void 0),a([g({type:Object})],u.prototype,"actions",void 0),a([m()],u.prototype,"isLoading",void 0),a([m()],u.prototype,"showVideoModal",void 0),a([m()],u.prototype,"videoUrl",void 0),a([m()],u.prototype,"videoTitle",void 0),a([m()],u.prototype,"actionRequiredPermissions",void 0),a([m()],u.prototype,"ticketUpdatePermissions",void 0),u=a([V("ix-launchpad")],u);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 l;(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"})(l||(l={}));const w=(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 l[r]>=i})},Pe=t=>t.toLowerCase().replace(/[^a-zA-Z0-9]+(.)/g,(e,i)=>i.toUpperCase()),$={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"],z=[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:R,GomApiBaseUrl:st,KnowledgeBaseLaunchpadApiUrl:ot,KnowledgeBaseLaunchpadApiToken:rt,"KB:strapiBaseUrl":at,"SM:ShowPopPoeAccess":nt,"SM:ShowOspAccess":dt}=H(),lt=Oe()===2,p={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 p},ye=async(t=5,e=1)=>{const i=e>1?(e-1)*t:0,s=`${R}${$.TICKETS}`,r=`?$skip=${i}&$top=${t}&$filter=(created_by eq '${n==null?void 0:n.email}' or created_by eq '${n==null?void 0:n.userProfileName}')&$orderby=updated_at desc`;try{const d=await fetch(`${s}${r}`,A());return d&&d.ok?fe(d):p}catch(d){return p}},re=async t=>{const e=`${st}${$.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=>z.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 p},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):p}catch(s){return p}},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 p},vt=(t,e,i)=>{var s;const r=l[(s=t[e])===null||s===void 0?void 0:s.toUpperCase()]||0;return l[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(`${R}/${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($.LOCATIONS,R);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,u,b,x]=t.map(k=>k.status==="fulfilled"?k.value:!1);return{DeliveriesRemovals:e,CustomerCare:i,TroubleTickets:s,RemoteHands:r,VisitorAccess:d,PermanentBadge:u,OSPAccess:b,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"}},B=(t,e)=>{var i;const s=w(t,oe,l.READ),r=w(t,[je],l.READ),d=Se&&((i=window.registeredApps["ui-gom"])===null||i===void 0?void 0:i.enabled)&&ve.some(u=>w(t,z,l[u]));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}]:[]]},$e=(t,e)=>{var i,s,r;const d=w(t,oe,l.READ),u=w(t,oe,l.CREATE),b=yt&&((i=window.registeredApps["ui-gom"])===null||i===void 0?void 0:i.enabled)&&w(t,Ke,l.CREATE),x=xt&&((s=window.registeredApps["ui-gom"])===null||s===void 0?void 0:s.enabled)&&w(t,Ge,l.CREATE),k=Se&&((r=window.registeredApps["ui-gom"])===null||r===void 0?void 0:r.enabled)&&(w(t,[se],l.CREATE)||w(t,[se],l.APPROVE)),N=e.DeliveriesRemovals,M=e.TroubleTickets,Y=e.CustomerCare,F=e.RemoteHands,J=e.VisitorAccess||e.PermanentBadge||e.OSPAccess||e.POPPOEAccess,ee=Y||J||F||N||M||b||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 tickets",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"}]:[],...M?[{name:"Trouble Tickets",icon:"troubleTickets",target:"launch-trouble-tickets"}]:[],...b?[{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:[...u?[{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=p,this.orders=p,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):p,this.getOrders=(t=5,e=1)=>this.permissions.orders?ke(this.permissions.gomTicketTypes,t,e):p,this.renderTableNav=()=>{const t=this.tabs.filter(e=>e.shouldRender());return t.length<=1?v: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?v: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"}L.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?v:o` ${this.renderTables()} `} `}};I.styles=[U],a([h()],I.prototype,"serviceTickets",void 0),a([m({type:Object})],I.prototype,"orders",void 0),a([h()],I.prototype,"isLoading",void 0),a([h()],I.prototype,"isFetching",void 0),a([h()],I.prototype,"activeTab",void 0),a([m({type:Object})],I.prototype,"permissions",void 0),I=a([V("lp-ticket-updates")],I);let _=class extends E{constructor(){super(...arguments),this.serviceTickets=p,this.orders=p,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):p,this.getOrders=(t=5,e=1)=>this.permissions.orders?Ce(this.permissions.gomTicketTypes,t,e):p,this.renderTableNav=()=>{const t=this.tabs.filter(e=>e.shouldRender());return t.length<=1?v: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?v: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"}L.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?v:o` ${this.renderTables()} `} `}};_.styles=[U],a([h()],_.prototype,"serviceTickets",void 0),a([m({type:Object})],_.prototype,"orders",void 0),a([h()],_.prototype,"isLoading",void 0),a([h()],_.prototype,"isFetching",void 0),a([h()],_.prototype,"activeTab",void 0),a([m({type:Object})],_.prototype,"permissions",void 0),_=a([V("lp-action-required")],_);const{KnowledgeBaseLaunchpadImgBase:Re,KnowledgeBaseLaunchpadVideoBase:Tt,KnowledgeBaseLaunchpadLinkBase:le,KnowledgeBaseLaunchpadViewAllUrl:Ct,IsInventoryManagementEnabled:St}=H();let c=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=p,this.actionRequiredOrders=p,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?v: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():v} ${this.updates.isAuthorizedToView?this.renderTicketUpdatesGrid():v}`}async firstUpdated(){const t=ae(this.apiPermissions);this.actionRequiredPermissions={serviceTickets:w(this.apiPermissions,[Z,Q],l.APPROVE),orders:w(this.apiPermissions,z,l.CREATE),gomTicketTypes:t},this.ticketUpdatePermissions={serviceTickets:w(this.apiPermissions,be,l.UPDATE),orders:w(this.apiPermissions,z,l.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>`:v} <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>`:v} ${!((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>`:v} ${!((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,u,b;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="${`${Re}${encodeURIComponent(s.thumbnail.url)}&w=3840&q=75`}"> ${!((b=(u=s.topics)===null||u===void 0?void 0:u[0])===null||b===void 0)&&b.name?o`<div slot="label"> ${s.topics[0].name} </div>`:v} <div slot="title">${s.title}</div> ${s.abstract?o`<div slot="description" class="news-item-description"> ${s.abstract} </div>`:v} <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="${`${Re}${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>`:v} ${!((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>`:v} </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> `}};c.styles=[U,j],a([m({type:Object})],c.prototype,"data",void 0),a([m({type:Array})],c.prototype,"status",void 0),a([m({type:Array})],c.prototype,"nav",void 0),a([m({type:Array})],c.prototype,"news",void 0),a([m({type:Object})],c.prototype,"contacts",void 0),a([m({type:Object,attribute:"api-permissions"})],c.prototype,"apiPermissions",void 0),a([m({type:Array})],c.prototype,"resources",void 0),a([m({type:Array})],c.prototype,"promotions",void 0),a([m({type:String})],c.prototype,"knowledgebase",void 0),a([m({type:Object})],c.prototype,"ticketUpdateOrders",void 0),a([m({type:Object})],c.prototype,"actionRequiredOrders",void 0),a([m({type:Object})],c.prototype,"updates",void 0),a([m({type:Object})],c.prototype,"actions",void 0),a([h()],c.prototype,"isLoading",void 0),a([h()],c.prototype,"showVideoModal",void 0),a([h()],c.prototype,"videoUrl",void 0),a([h()],c.prototype,"videoTitle",void 0),a([h()],c.prototype,"actionRequiredPermissions",void 0),a([h()],c.prototype,"ticketUpdatePermissions",void 0),c=a([V("ix-launchpad")],c);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
- 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},Tt={phoneNumbers:`**Australia:** +61 383611501
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
867
867
  **Hong Kong:** +852 22817502
868
868
  **Japan:** +81-726299066 (English), +81-727368473 (Japanese)
869
869
  **North America:** +1-877 357 7782
870
- **Singapore:** +65 65053912`,email:"GlobalPortal@digitalrealty.com"},Ct=ge`
870
+ **Singapore:** +65 65053912`,email:"GlobalPortal@digitalrealty.com"},$t=ge`
871
871
  <path fill-rule="evenodd" clip-rule="evenodd" d="M44 7.33337C23.76 7.33337 7.33337 23.76 7.33337 44C7.33337 64.24 23.76 80.6667 44 80.6667C64.24 80.6667 80.6667 64.24 80.6667 44C80.6667 23.76 64.24 7.33337 44 7.33337ZM44.0002 73.3335C27.8302 73.3335 14.6668 60.1702 14.6668 44.0002C14.6668 27.8302 27.8302 14.6668 44.0002 14.6668C60.1702 14.6668 73.3335 27.8302 73.3335 44.0002C73.3335 60.1702 60.1702 73.3335 44.0002 73.3335ZM36.6667 51.9569L60.83 27.7935L66 33.0002L36.6667 62.3335L22 47.6669L27.17 42.4969L36.6667 51.9569Z" class="fill-success" />
872
- `,St=ge`
872
+ `,Rt=ge`
873
873
  <path fill-rule="evenodd" clip-rule="evenodd" d="M43.9999 7.33337C23.7599 7.33337 7.33325 23.76 7.33325 44C7.33325 64.24 23.7599 80.6667 43.9999 80.6667C64.2399 80.6667 80.6666 64.24 80.6666 44C80.6666 23.76 64.2399 7.33337 43.9999 7.33337ZM47.6665 62.3333H40.3332V55H47.6665V62.3333ZM40.3332 47.6668H47.6665V25.6668H40.3332V47.6668Z" class="fill-critical" />
874
- `;var v;(function(t){t.New="new",t.Submitting="submitting",t.Success="success",t.Error="error",t.Retrying="Retrying"})(v||(v={}));let G=class extends E{constructor(){super(...arguments),this.formStatus=v.Error}async handleOnRetry(){this.onRetryClick&&this.onRetryClick()}handleOnBackClick(){this.dispatchEvent(new CustomEvent("close-drawer",{bubbles:!0,composed:!0}))}renderIcon(){let t=St;return this.formStatus===v.Success&&(t=Ct),o` <div> <svg xmlns="http://www.w3.org/2000/svg" width="88" height="88" viewBox="0 0 88 88" fill="none"> ${t} </svg> </div> `}renderTitle(){const t=this.formStatus===v.Success?"Your request has been successfully submitted":"Request cannot be submitted";return o`<div class="dlr-text-page-title pb-4 pt-2">${t}</div>`}renderBody(){const t=this.formStatus===v.Success?"We will reach out to you shortly.":`
874
+ `;var g;(function(t){t.New="new",t.Submitting="submitting",t.Success="success",t.Error="error",t.Retrying="Retrying"})(g||(g={}));let G=class extends E{constructor(){super(...arguments),this.formStatus=g.Error}async handleOnRetry(){this.onRetryClick&&this.onRetryClick()}handleOnBackClick(){this.dispatchEvent(new CustomEvent("close-drawer",{bubbles:!0,composed:!0}))}renderIcon(){let t=Rt;return this.formStatus===g.Success&&(t=$t),o` <div> <svg xmlns="http://www.w3.org/2000/svg" width="88" height="88" viewBox="0 0 88 88" fill="none"> ${t} </svg> </div> `}renderTitle(){const t=this.formStatus===g.Success?"Your request has been successfully submitted":"Request cannot be submitted";return o`<div class="dlr-text-page-title pb-4 pt-2">${t}</div>`}renderBody(){const t=this.formStatus===g.Success?"We will reach out to you shortly.":`
875
875
  We are unable to process your request. Please, retry or reach out to us
876
- via email for further assistance. We apologize for the inconvenience.`;return o`<div class="dlr-text-default">${t}</div>`}renderFooter(){switch(this.formStatus){case v.Error:return o`<div class="items-start flex gap-8"> <ix-button id="retryBtn" @click="${this.handleOnRetry}">Retry</ix-button> </div>`;case v.Retrying:return o`<div class="items-start flex gap-8"> <ix-button id="retryingBtn" submitting width="w-24">Retry</ix-button> </div>`;case v.Success:return o`<div class="items-start flex gap-8"> <ix-button id="closeBtn" @click="${this.handleOnBackClick}">Close</ix-button> </div>`;default:return w}}render(){return o` <div class="flex flex-col justify-center text-center items-center pt-16"> <div>${this.renderIcon()}</div> <div>${this.renderTitle()}</div> <div class="flex flex-col justify-center text-center items-center max-w-[696px] m-auto pb-6"> ${this.renderBody()} </div> <div>${this.renderFooter()}</div> </div>`}};G.styles=[U,j],a([g({type:String})],G.prototype,"formStatus",void 0),a([g({attribute:!1})],G.prototype,"onRetryClick",void 0),G=a([V("contact-us-result")],G);const Ae=async t=>{const e=new Headers;e.append("Content-Type","application/json"),e.append("Authorization",`Bearer ${n==null?void 0:n.access_token}`);const{ContactUsApiUrl:i}=H();return await fetch(`${i}`,{headers:e,method:"POST",body:JSON.stringify(t)}).then(s=>s.ok).catch(()=>!1)},Et={notesMinLength:3,notesMaxLength:500,notesErrorText:void 0,supportCategoryErrorText:void 0};let P=class extends E{constructor(){var t,e;super(...arguments),this.showDrawer=!1,this.validations=Et,this.formStatus=v.New,this.contactUsRequest={companyName:n==null?void 0:n.userCompany,email:n==null?void 0:n.email,firstName:(t=n==null?void 0:n.userProfileName)===null||t===void 0?void 0:t.split(" ")[0],lastName:(e=n==null?void 0:n.userProfileName)===null||e===void 0?void 0:e.split(" ")[1],notes:"",primaryContactEmail:n==null?void 0:n.email,product:"Global Portal",supportCategory:""},this.isValid=this.isValidForm(),this.toggleDrawer=()=>{this.showDrawer=!this.showDrawer,this.showDrawer||(this.formStatus=v.New,this.contactUsRequest.notes="",this.requestUpdate())}}connectedCallback(){super.connectedCallback(),window.addEventListener("contact-us",this.toggleDrawer)}disconnectedCallback(){window.removeEventListener("contact-us",this.toggleDrawer),super.disconnectedCallback()}async handleSubmitClick(){if(this.isValidForm()){this.formStatus=v.Submitting;const t=await Ae(this.contactUsRequest);this.formStatus=t?v.Success:v.Error,this.requestUpdate()}}async handleRetryClick(){if(this.isValidForm()){this.formStatus=v.Retrying;const t=await Ae(this.contactUsRequest);this.formStatus=t?v.Success:v.Error,this.requestUpdate()}}renderResultView(){return o` <contact-us-result slot="content" .formStatus="${this.formStatus}" .onRetryClick="${()=>this.handleRetryClick()}"></contact-us-result> `}handleNotesChange(t){this.contactUsRequest.notes=t,(this.contactUsRequest.notes!==null||this.contactUsRequest.notes!=="")&&(this.contactUsRequest.notes.length<this.validations.notesMinLength||this.contactUsRequest.notes.length>this.validations.notesMaxLength?this.validations.notesErrorText=`Notes must be between ${this.validations.notesMinLength} to ${this.validations.notesMaxLength} characters`:this.validations.notesErrorText=void 0),this.isValid=this.isValidForm()}isValidForm(){return this.contactUsRequest.notes.trim()!==""&&this.contactUsRequest.supportCategory!==""&&this.validations.notesErrorText===void 0&&this.validations.supportCategoryErrorText===void 0}handleSupportCategoryChange(t){t?(this.validations.supportCategoryErrorText=void 0,this.contactUsRequest.supportCategory=t):this.validations.supportCategoryErrorText="Please select a Support category",this.isValid=this.isValidForm()}renderDefaultView(){return o` <div slot="header"> <h2 class="pt-[60px] pb-[1.5rem] dlr-text-page-title">Contact Us</h2> <div class="flex flex-col grow pb-4 max-w-full"> <div class="dlr-text-heading items-center flex"> <h3 class="grow">Question not answered? We are here to help.</h3> <em class="italic dlr-text-caption">* denotes required field</em> </div> </div> </div> <div slot="content" class="pr-2"> <div class="form-wrapper flex flex-col gap-8 pb-[1rem]"> <ix-textbox label="User Name" name="username" type="text" required .value="${n.userProfileName}" .disabled="${!0}"></ix-textbox> <ix-textbox label="User Email Address" name="email" required .value="${n.email}" .disabled="${!0}"></ix-textbox> <ix-textbox label="Company Name" name="company" required .value="${n.userCompany}" .disabled="${!0}" max="100"></ix-textbox> <ix-select data-testid="cu-form-support-cat" label="Support Category" .wideMenu="${!0}" required .error="${!!this.validations.supportCategoryErrorText}" .errorText="${this.validations.supportCategoryErrorText}" @input="${t=>this.handleSupportCategoryChange(t.target.value)}"> <ix-select-option .value="${"Non-Technical & Functional Issues"}"><div slot="headline">Non-Technical & Functional Issues</div> </ix-select-option> <ix-select-option .value="${"Technical Issues"}"><div slot="headline">Technical Issues</div> </ix-select-option> <ix-select-option .value="${"Data Issues"}"><div slot="headline">Data Issues</div> </ix-select-option> <ix-select-option .value="${"How to & Training"}"><div slot="headline">How to & Training</div> </ix-select-option> </ix-select> <ix-textbox data-testid="cu-notes" label="Notes" name="notes" type="textarea" rows="4" required .value="${this.contactUsRequest.notes}" .minLength="${this.validations.notesMinLength}" .maxLength="${this.validations.notesMaxLength}" .error="${!!this.validations.notesErrorText}" .errorText="${this.validations.notesErrorText}" @input="${t=>this.handleNotesChange(t.target.value)}"></ix-textbox> </div> <div class="flex pt-2 pb-[1rem] justify-end"> <ix-button data-testid="cu-submit-btn" type="submit" name="submitBtn" ?disabled="${!this.isValid}" has-icon trailing-icon @click="${()=>this.handleSubmitClick()}"> <span>SUBMIT</span> <md-icon slot="icon">east</md-icon> </ix-button> </div> </div> `}render(){const t=this.formStatus!==v.New&&this.formStatus!==v.Submitting;return o` <ix-drawer ?isVisible="${this.showDrawer}" .onClosed="${()=>this.toggleDrawer()}" .showConfirmationDialogOnClose="${this.formStatus===v.New}" @close-drawer="${()=>{var e;return(e=this.drawerEl)===null||e===void 0?void 0:e.handleClosing()}}"> ${t?this.renderResultView():this.renderDefaultView()} </ix-drawer> `}};P.styles=[U,j],a([g({type:Boolean,attribute:!0})],P.prototype,"showDrawer",void 0),a([Ie("ix-drawer")],P.prototype,"drawerEl",void 0),a([m()],P.prototype,"validations",void 0),a([m()],P.prototype,"formStatus",void 0),a([m()],P.prototype,"contactUsRequest",void 0),a([m()],P.prototype,"isValid",void 0),P=a([V("contact-us-form")],P);class $t extends E{static get styles(){return[U]}static get properties(){return{ticketId:{type:String},ticketType:{type:String},requestType:{type:String}}}constructor(){super(),this.ticketId="",this.ticketType="",this.requestType=""}handleMouseEnter(e){document.dispatchEvent(new CustomEvent("show-tooltip",{detail:{target:e.target,tooltip:o` <ticket-update-comments ticketId="${this.ticketId}" ticketType="${this.ticketType}" requestType="${this.requestType}"></ticket-update-comments> `}}))}handleMouseLeave(){document.dispatchEvent(new CustomEvent("hide-tooltip",{detail:{force:!0}}))}render(){const e=!this.ticketId||!this.ticketType||!this.requestType;return o` <a aria-describedby="tooltip" href="${e?"javascript:void(0);":"#"}" style="${e?"pointer-events: none; opacity: 0.5; cursor: default;":""}" @click="${e?i=>i.preventDefault():void 0}" @mouseenter="${this.handleMouseEnter}" @mouseleave="${this.handleMouseLeave}"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"> <path fill-rule="evenodd" clip-rule="evenodd" d="M20 2C21.1 2 21.99 2.9 21.99 4L22 22L18 18H4C2.9 18 2 17.1 2 16V4C2 2.9 2.9 2 4 2H20ZM6 14H18V12H6V14ZM18 11H6V9H18V11ZM6 8H18V6H6V8Z" class="fill-primary"/> </svg> </a> `}}window.customElements.get("comments-tooltip")||window.customElements.define("comments-tooltip",$t);const O={CustomerCare:"sm-customer-care",Deliveries:"sm-deliveries",Removals:"sm-deliveries",References:"sm-references",RemoteHands:"sm-remote-hands",TroubleTickets:"sm-trouble-tickets",FacilityAccess:"sm-facility-access",ServiceTickets:"sm-service-tickets",SiteMaintenance:"sm-site-maintenance",Inventory:"inventory",SiteNavigation:"site-navigations"};function Rt(t,e){let i="";switch(t){case"Delivery":i=`${O.Deliveries}/delivery-tickets`;break;case"Removal":i=`${O.Removals}/removal-tickets`;break;case"Remote Hands":i=`${O.RemoteHands}/remote-hands-tickets`;break;case"Customer Care":i=`${O.CustomerCare}/customer-care-tickets`;break;case"Facility Access":switch(e){case"Visitor Access":i=`${O.FacilityAccess}/visitor-access-tickets`;break;case"Permanent Badge":i=`${O.FacilityAccess}/permanent-badge-tickets`;break;case"OSP Access":i=`${O.FacilityAccess}/osp-access-tickets`;break;case"POP and POE Access":i=`${O.FacilityAccess}/pop-access-tickets`;break}break;case"Trouble Ticket":i=`${O.TroubleTickets}/trouble-tickets`;break}return i}const At=t=>new Date(t).toLocaleDateString(void 0,{month:"2-digit",day:"2-digit",year:"numeric"}),It=t=>new Date(t).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",hour12:!0});class ue extends E{constructor(){super(),this.fetchInProgress=!0,this.data=null,this.abortController=new AbortController}viewTicketDetails(){const e=X[this.requestType]?`/${y[this.requestType]}`:"";L.go(`/${y.base}/${y[this.ticketType]}${e}/${this.ticketId}`)}updated(e){(e.has("ticketId")||e.has("ticketType")||e.has("requestType"))&&this.makeApiCall()}makeApiCall(){this.fetchInProgress=!0,gt(Rt(this.ticketType,this.requestType),this.ticketId,this.abortController.signal).then(async e=>{this.data=e?e[0]:null,this.fetchInProgress=!1}).catch(e=>{e.name==="AbortError"?console.log("aborted"):console.error("error:",e),this.fetchInProgress=!1})}disconnectedCallback(){super.disconnectedCallback(),this.fetchInProgress&&(this.abortController.abort(),this.abortController=new AbortController,this.fetchInProgress=!1)}render(){var e,i,s;return this.fetchInProgress?o` <div class="info"> <ix-progress .value="${.3}" .linear="${!1}" .indeterminate="${!0}"></ix-progress> </div> `:this.data?o` <div><i class="italic dlr-text-caption">Last Update</i></div> <div class="font-bold"> ${(e=this.data.created_by)!==null&&e!==void 0?e:this.data.commented_by} Said on ${At((i=this.data.created_at)!==null&&i!==void 0?i:this.data.commented_on)} at ${It((s=this.data.created_at)!==null&&s!==void 0?s:this.data.commented_on)} </div> <div class="comment"><p>${this.data.comment}</p></div> <div> <a href="#" @click="${this.viewTicketDetails}" class="underline text-primary">View Ticket</a> </div> `:o` <div class="info">No Comments</div> `}}ue.styles=te`:host{background:var(--clr-surface-container-lowest,#fff);display:block;padding:10px;min-width:100px;min-height:50px;max-width:400px;max-height:300px;overflow:hidden;text-align:left;border-radius:4px;box-shadow:0 4px 6px rgba(0,0,0,.1);font-family:var(--text-small-font,sans-serif);font-size:var(--text-small-size,.875rem);letter-spacing:var(--text-small-letter-spacing,.0275em);line-height:var(--text-small-line-height,1.42857143em);font-weight:var(--text-small-weight,normal);text-decoration:var(--text-small-decoration,none);text-transform:var(--text-small-transform,none)}p{font-weight:400;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;max-height:150px}.info{display:flex;justify-content:center;align-items:center;font-weight:700;text-align:center}`,ue.properties={data:{type:Object},ticketId:{type:String},ticketType:{type:String},requestType:{type:String},fetchInProgress:{type:Boolean}},window.customElements.get("ticket-update-comments")||window.customElements.define("ticket-update-comments",ue);const{ShowStaticKnowledgeBase:_t,KnowledgeBaseLaunchpadVideoBase:Pt,IsInventoryManagementEnabled:pe,TrustedOrigins:Ot,KnowledgeBaseLaunchpadLinkBase:Nt}=H(),Ut=Ot.split(",").map(t=>new RegExp(t,"i"));class W extends E{constructor(){super(),this.newReleaseNotes=void 0,this.isLoading=!0,this.getUsers=async()=>{const e=await lt();this.statusCounts.USERS=e,this.status=B(this.permissions,this.statusCounts)},this.getMySites=async()=>{const e=await nt();this.statusCounts.MY_SITES=e,this.status=B(this.permissions,this.statusCounts)},this.getServiceTickets=async()=>{const e=await ut();this.statusCounts.ACTIVE_TICKETS=e,this.status=B(this.permissions,this.statusCounts)},this.getDcimEnabledLocations=async()=>{const e=await dt();this.statusCounts.DCIM=e,this.status=B(this.permissions,this.statusCounts)},this.getActiveOrders=async()=>{const e=await pt();this.statusCounts.ACTIVE_ORDERS=e,this.status=B(this.permissions,this.statusCounts)},this.getTicketUpdates=async e=>{var i;const s=b(e,be,c.UPDATE),r=b(e,z,c.READ),{rows:d}=s?await ye():h,l=r&&pe&&!((i=window.registeredApps["ui-gom"])===null||i===void 0)&&i.enabled?await ke(ae(e)):h,p=d.concat(l.rows),x=p.length>0?p.sort((k,N)=>new Date(N.updated_at)-new Date(k.updated_at)).slice(0,5):[];this.ticketUpdates={...this.ticketUpdates,rows:x,disabled:d.length===0&&l.rows.length===0,isAuthorizedToView:s||r},this.ticketUpdateOrders=l},this.getYourActionRequired=async e=>{var i;const s=b(e,[Z,Q],c.APPROVE),r=b(e,z,c.CREATE),{rows:d}=s?await Te():h,l=r&&pe&&!((i=window.registeredApps["ui-gom"])===null||i===void 0)&&i.enabled?await Ce(ae(e)):h,p=d.concat(l.rows),x=p.length>0?p.sort((k,N)=>new Date(N.updated_at)-new Date(k.updated_at)).slice(0,5):[];this.yourActionRequired={...this.yourActionRequired,rows:x,disabled:d.length===0&&l.rows.length===0,isAuthorizedToView:s||r},this.actionRequiredOrders=l},this.getKnowledgeBase=async()=>{var e;if(_t)this.news=ce.whatsNews,this.promotions=ce.newsAndPromotions,this.resources=ce.resources;else{const i=await ct();this.news=i.whatsNews,((e=this.news)===null||e===void 0?void 0:e.length)>0&&this.checkReleaseNotes(this.news[0]),this.promotions=i.newsAndPromotions,this.resources=i.resources}},this.status=B(),this.statusCounts={USERS:void 0,ACTIVE_ORDERS:void 0,ACTIVE_TICKETS:void 0,MY_SITES:void 0,DCIM:void 0},this.ticketUpdates={header:"Ticket Updates",href:`/service-management/?createdBy_equals=${n==null?void 0:n.userProfileName}&sort=updatedAt&order=desc`,columns:ne(this.ticketSelect),isAuthorizedToView:!1},this.yourActionRequired={header:"Your Action Required",href:"/service-management/?permission_privilege=Approve&status_equals=Pending+Approval",columns:de(this.ticketSelect),isAuthorizedToView:!1},this.permissions={},this.navItems=$e(this.permissions,{})}checkReleaseNotes(e){var i,s,r;const d=localStorage.getItem("x-auth"),{access_token:l}=JSON.parse(d),{previous_login_date:p}=_e(l),x=(i=new Date(p))===null||i===void 0?void 0:i.getTime(),{id:k,dateAdded:N,documents:M,uid:Y}=e;if(localStorage.getItem("releaseNotesViewed")===String(k))return;const F=(s=new Date(N))===null||s===void 0?void 0:s.getTime(),J=1440*60*1e3;if(Number.isNaN(x)||Number.isNaN(F)||x>F+J)return;const ee=!((r=M==null?void 0:M[0])===null||r===void 0)&&r.url?`${Pt}${M[0].url}`:`${Nt}${Y}`;this.newReleaseNotes={id:k,title:"New Release Updates!",href:ee,description:`We have introduced new and improved functionality on the Global Portal
877
- with our monthly release. Learn more by clicking on the link below or review it later in our What's New section!`}}dismissReleaseNotes(){localStorage.setItem("releaseNotesViewed",this.newReleaseNotes.id),this.newReleaseNotes=void 0}firstUpdated(){pe&&this.getActiveOrders(),this.getUsers(),this.getMySites(),this.getServiceTickets(),this.getKnowledgeBase(),Promise.all([mt(),vt()]).then(async([e,i])=>{this.permissions=e,this.navItems=$e(this.permissions,i),await this.getDcimEnabledLocations(),await this.getTicketUpdates(this.permissions),await this.getYourActionRequired(this.permissions),this.isLoading=!1})}messageHandler(e){const{origin:i,data:s}=e;if(!Ut.some(r=>r.test(i))){console.warn("Rejected message from untrusted origin:",i);return}s.knowledgeBaseURL&&L.go(`${Ne[Oe].path}${s.knowledgeBaseURL}`)}connectedCallback(){super.connectedCallback(),window.addEventListener("message",this.messageHandler)}disconnectedCallback(){window.removeEventListener("message",this.messageHandler),super.disconnectedCallback()}route(e){const{route:i}=e.detail;if(i.startsWith("/"))L.go(i);else{const s=new CustomEvent(e.detail.route,{bubbles:!0,composed:!0,detail:{fromLaunchpad:!0,originEl:e.detail.originEl}});this.dispatchEvent(s)}}ticketSelect(e){let i="";switch(e.source){case S.ServiceManagement:const{ticket_id:s,ticket_type:r,request_type:d}=e,l=X[d]?`/${y[d]}`:"";i=`/${y.base}/${y[r]}${l}/${s}`;break;case S.OrderManagement:i=`/order-management/order-details/${e.ticket_id}`;break;default:i="/order-management/order-details"}L.go(i)}renderNewReleaseNotes(){return o`<ix-dialog open> <h3 slot="headline" class="dlr-text-heading"> ${this.newReleaseNotes.title} </h3> <p slot="content" class="md:w-[380px]"> ${this.newReleaseNotes.description} </p> <div slot="actions" class="px-2 pb-2 pt-6"> <ix-button @click="${this.dismissReleaseNotes}" appearance="text"> Dismiss </ix-button> <ix-button @click="${this.dismissReleaseNotes}" href="${this.newReleaseNotes.href}" appearance="text"> Read More </ix-button> </div> </ix-dialog>`}render(){return o` <contact-us-form></contact-us-form> ${this.newReleaseNotes?this.renderNewReleaseNotes():w} ${this.isLoading?w:o` <ix-launchpad class="mb-4 block" api-permissions="${JSON.stringify(this.permissions)}" .status="${this.status}" .nav="${this.navItems}" .news="${this.news}" .promotions="${this.promotions}" .resources="${this.resources}" .contacts="${Tt}" .updates="${this.ticketUpdates}" .ticketUpdateOrders="${this.ticketUpdateOrders}" .actionRequiredOrders="${this.actionRequiredOrders}" .actions="${this.yourActionRequired}" @route="${this.route}"></ix-launchpad> `} `}}W.styles=[U,j],W.properties={status:[],ticketUpdates:{},ticketUpdateOrders:{},actionRequiredOrders:{},yourActionRequired:{}},a([m(Object)],W.prototype,"newReleaseNotes",void 0),a([m()],W.prototype,"isLoading",void 0),window.customElements.get("app-widgets")||window.customElements.define("app-widgets",W);let he=class extends E{render(){return o` <div class="launchpad-bg-image"></div> <app-widgets class="relative"> </app-widgets> `}};he.styles=[U,j],he=a([V("ui-launchpad")],he);
876
+ via email for further assistance. We apologize for the inconvenience.`;return o`<div class="dlr-text-default">${t}</div>`}renderFooter(){switch(this.formStatus){case g.Error:return o`<div class="items-start flex gap-8"> <ix-button id="retryBtn" @click="${this.handleOnRetry}">Retry</ix-button> </div>`;case g.Retrying:return o`<div class="items-start flex gap-8"> <ix-button id="retryingBtn" submitting width="w-24">Retry</ix-button> </div>`;case g.Success:return o`<div class="items-start flex gap-8"> <ix-button id="closeBtn" @click="${this.handleOnBackClick}">Close</ix-button> </div>`;default:return v}}render(){return o` <div class="flex flex-col justify-center text-center items-center pt-16"> <div>${this.renderIcon()}</div> <div>${this.renderTitle()}</div> <div class="flex flex-col justify-center text-center items-center max-w-[696px] m-auto pb-6"> ${this.renderBody()} </div> <div>${this.renderFooter()}</div> </div>`}};G.styles=[U,j],a([m({type:String})],G.prototype,"formStatus",void 0),a([m({attribute:!1})],G.prototype,"onRetryClick",void 0),G=a([V("contact-us-result")],G);const Ae=async t=>{const e=new Headers;e.append("Content-Type","application/json"),e.append("Authorization",`Bearer ${n==null?void 0:n.access_token}`);const{ContactUsApiUrl:i}=H();return await fetch(`${i}`,{headers:e,method:"POST",body:JSON.stringify(t)}).then(s=>s.ok).catch(()=>!1)},At={notesMinLength:3,notesMaxLength:500,notesErrorText:void 0,supportCategoryErrorText:void 0};let P=class extends E{constructor(){var t,e;super(...arguments),this.showDrawer=!1,this.validations=At,this.formStatus=g.New,this.contactUsRequest={companyName:n==null?void 0:n.userCompany,email:n==null?void 0:n.email,firstName:(t=n==null?void 0:n.userProfileName)===null||t===void 0?void 0:t.split(" ")[0],lastName:(e=n==null?void 0:n.userProfileName)===null||e===void 0?void 0:e.split(" ")[1],notes:"",primaryContactEmail:n==null?void 0:n.email,product:"Global Portal",supportCategory:""},this.isValid=this.isValidForm(),this.toggleDrawer=()=>{this.showDrawer=!this.showDrawer,this.showDrawer||(this.formStatus=g.New,this.contactUsRequest.notes="",this.requestUpdate())}}connectedCallback(){super.connectedCallback(),window.addEventListener("contact-us",this.toggleDrawer)}disconnectedCallback(){window.removeEventListener("contact-us",this.toggleDrawer),super.disconnectedCallback()}async handleSubmitClick(){if(this.isValidForm()){this.formStatus=g.Submitting;const t=await Ae(this.contactUsRequest);this.formStatus=t?g.Success:g.Error,this.requestUpdate()}}async handleRetryClick(){if(this.isValidForm()){this.formStatus=g.Retrying;const t=await Ae(this.contactUsRequest);this.formStatus=t?g.Success:g.Error,this.requestUpdate()}}renderResultView(){return o` <contact-us-result slot="content" .formStatus="${this.formStatus}" .onRetryClick="${()=>this.handleRetryClick()}"></contact-us-result> `}handleNotesChange(t){this.contactUsRequest.notes=t,(this.contactUsRequest.notes!==null||this.contactUsRequest.notes!=="")&&(this.contactUsRequest.notes.length<this.validations.notesMinLength||this.contactUsRequest.notes.length>this.validations.notesMaxLength?this.validations.notesErrorText=`Notes must be between ${this.validations.notesMinLength} to ${this.validations.notesMaxLength} characters`:this.validations.notesErrorText=void 0),this.isValid=this.isValidForm()}isValidForm(){return this.contactUsRequest.notes.trim()!==""&&this.contactUsRequest.supportCategory!==""&&this.validations.notesErrorText===void 0&&this.validations.supportCategoryErrorText===void 0}handleSupportCategoryChange(t){t?(this.validations.supportCategoryErrorText=void 0,this.contactUsRequest.supportCategory=t):this.validations.supportCategoryErrorText="Please select a Support category",this.isValid=this.isValidForm()}renderDefaultView(){return o` <div slot="header"> <h2 class="pt-[60px] pb-[1.5rem] dlr-text-page-title">Contact Us</h2> <div class="flex flex-col grow pb-4 max-w-full"> <div class="dlr-text-heading items-center flex"> <h3 class="grow">Question not answered? We are here to help.</h3> <em class="italic dlr-text-caption">* denotes required field</em> </div> </div> </div> <div slot="content" class="pr-2"> <div class="form-wrapper flex flex-col gap-8 pb-[1rem]"> <ix-textbox label="User Name" name="username" type="text" required .value="${n.userProfileName}" .disabled="${!0}"></ix-textbox> <ix-textbox label="User Email Address" name="email" required .value="${n.email}" .disabled="${!0}"></ix-textbox> <ix-textbox label="Company Name" name="company" required .value="${n.userCompany}" .disabled="${!0}" max="100"></ix-textbox> <ix-select data-testid="cu-form-support-cat" label="Support Category" .wideMenu="${!0}" required .error="${!!this.validations.supportCategoryErrorText}" .errorText="${this.validations.supportCategoryErrorText}" @input="${t=>this.handleSupportCategoryChange(t.target.value)}"> <ix-select-option .value="${"Non-Technical & Functional Issues"}"><div slot="headline">Non-Technical & Functional Issues</div> </ix-select-option> <ix-select-option .value="${"Technical Issues"}"><div slot="headline">Technical Issues</div> </ix-select-option> <ix-select-option .value="${"Data Issues"}"><div slot="headline">Data Issues</div> </ix-select-option> <ix-select-option .value="${"How to & Training"}"><div slot="headline">How to & Training</div> </ix-select-option> </ix-select> <ix-textbox data-testid="cu-notes" label="Notes" name="notes" type="textarea" rows="4" required .value="${this.contactUsRequest.notes}" .minLength="${this.validations.notesMinLength}" .maxLength="${this.validations.notesMaxLength}" .error="${!!this.validations.notesErrorText}" .errorText="${this.validations.notesErrorText}" @input="${t=>this.handleNotesChange(t.target.value)}"></ix-textbox> </div> <div class="flex pt-2 pb-[1rem] justify-end"> <ix-button data-testid="cu-submit-btn" type="submit" name="submitBtn" ?disabled="${!this.isValid}" has-icon trailing-icon @click="${()=>this.handleSubmitClick()}"> <span>SUBMIT</span> <md-icon slot="icon">east</md-icon> </ix-button> </div> </div> `}render(){const t=this.formStatus!==g.New&&this.formStatus!==g.Submitting;return o` <ix-drawer ?isVisible="${this.showDrawer}" .onClosed="${()=>this.toggleDrawer()}" .showConfirmationDialogOnClose="${this.formStatus===g.New}" @close-drawer="${()=>{var e;return(e=this.drawerEl)===null||e===void 0?void 0:e.handleClosing()}}"> ${t?this.renderResultView():this.renderDefaultView()} </ix-drawer> `}};P.styles=[U,j],a([m({type:Boolean,attribute:!0})],P.prototype,"showDrawer",void 0),a([Ie("ix-drawer")],P.prototype,"drawerEl",void 0),a([h()],P.prototype,"validations",void 0),a([h()],P.prototype,"formStatus",void 0),a([h()],P.prototype,"contactUsRequest",void 0),a([h()],P.prototype,"isValid",void 0),P=a([V("contact-us-form")],P);class It extends E{static get styles(){return[U]}static get properties(){return{ticketId:{type:String},ticketType:{type:String},requestType:{type:String}}}constructor(){super(),this.ticketId="",this.ticketType="",this.requestType=""}handleMouseEnter(e){document.dispatchEvent(new CustomEvent("show-tooltip",{detail:{target:e.target,tooltip:o` <ticket-update-comments ticketId="${this.ticketId}" ticketType="${this.ticketType}" requestType="${this.requestType}"></ticket-update-comments> `}}))}handleMouseLeave(){document.dispatchEvent(new CustomEvent("hide-tooltip",{detail:{force:!0}}))}render(){const e=!this.ticketId||!this.ticketType||!this.requestType;return o` <a aria-describedby="tooltip" href="${e?"javascript:void(0);":"#"}" style="${e?"pointer-events: none; opacity: 0.5; cursor: default;":""}" @click="${e?i=>i.preventDefault():void 0}" @mouseenter="${this.handleMouseEnter}" @mouseleave="${this.handleMouseLeave}"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"> <path fill-rule="evenodd" clip-rule="evenodd" d="M20 2C21.1 2 21.99 2.9 21.99 4L22 22L18 18H4C2.9 18 2 17.1 2 16V4C2 2.9 2.9 2 4 2H20ZM6 14H18V12H6V14ZM18 11H6V9H18V11ZM6 8H18V6H6V8Z" class="fill-primary"/> </svg> </a> `}}window.customElements.get("comments-tooltip")||window.customElements.define("comments-tooltip",It);const O={CustomerCare:"sm-customer-care",Deliveries:"sm-deliveries",Removals:"sm-deliveries",References:"sm-references",RemoteHands:"sm-remote-hands",TroubleTickets:"sm-trouble-tickets",FacilityAccess:"sm-facility-access",ServiceTickets:"sm-service-tickets",SiteMaintenance:"sm-site-maintenance",Inventory:"inventory",SiteNavigation:"site-navigations"};function _t(t,e){let i="";switch(t){case"Delivery":i=`${O.Deliveries}/delivery-tickets`;break;case"Removal":i=`${O.Removals}/removal-tickets`;break;case"Remote Hands":i=`${O.RemoteHands}/remote-hands-tickets`;break;case"Customer Care":i=`${O.CustomerCare}/customer-care-tickets`;break;case"Facility Access":switch(e){case"Visitor Access":i=`${O.FacilityAccess}/visitor-access-tickets`;break;case"Permanent Badge":i=`${O.FacilityAccess}/permanent-badge-tickets`;break;case"OSP Access":i=`${O.FacilityAccess}/osp-access-tickets`;break;case"POP and POE Access":i=`${O.FacilityAccess}/pop-access-tickets`;break}break;case"Trouble Ticket":i=`${O.TroubleTickets}/trouble-tickets`;break}return i}const Pt=t=>new Date(t).toLocaleDateString(void 0,{month:"2-digit",day:"2-digit",year:"numeric"}),Ot=t=>new Date(t).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",hour12:!0});class ue extends E{constructor(){super(),this.fetchInProgress=!0,this.data=null,this.abortController=new AbortController}viewTicketDetails(){const e=X[this.requestType]?`/${y[this.requestType]}`:"";L.go(`/${y.base}/${y[this.ticketType]}${e}/${this.ticketId}`)}updated(e){(e.has("ticketId")||e.has("ticketType")||e.has("requestType"))&&this.makeApiCall()}makeApiCall(){this.fetchInProgress=!0,bt(_t(this.ticketType,this.requestType),this.ticketId,this.abortController.signal).then(async e=>{this.data=e?e[0]:null,this.fetchInProgress=!1}).catch(e=>{e.name==="AbortError"?console.log("aborted"):console.error("error:",e),this.fetchInProgress=!1})}disconnectedCallback(){super.disconnectedCallback(),this.fetchInProgress&&(this.abortController.abort(),this.abortController=new AbortController,this.fetchInProgress=!1)}render(){var e,i,s;return this.fetchInProgress?o` <div class="info"> <ix-progress .value="${.3}" .linear="${!1}" .indeterminate="${!0}"></ix-progress> </div> `:this.data?o` <div><i class="italic dlr-text-caption">Last Update</i></div> <div class="font-bold"> ${(e=this.data.created_by)!==null&&e!==void 0?e:this.data.commented_by} Said on ${Pt((i=this.data.created_at)!==null&&i!==void 0?i:this.data.commented_on)} at ${Ot((s=this.data.created_at)!==null&&s!==void 0?s:this.data.commented_on)} </div> <div class="comment"><p>${this.data.comment}</p></div> <div> <a href="#" @click="${this.viewTicketDetails}" class="underline text-primary">View Ticket</a> </div> `:o` <div class="info">No Comments</div> `}}ue.styles=te`:host{background:var(--clr-surface-container-lowest,#fff);display:block;padding:10px;min-width:100px;min-height:50px;max-width:400px;max-height:300px;overflow:hidden;text-align:left;border-radius:4px;box-shadow:0 4px 6px rgba(0,0,0,.1);font-family:var(--text-small-font,sans-serif);font-size:var(--text-small-size,.875rem);letter-spacing:var(--text-small-letter-spacing,.0275em);line-height:var(--text-small-line-height,1.42857143em);font-weight:var(--text-small-weight,normal);text-decoration:var(--text-small-decoration,none);text-transform:var(--text-small-transform,none)}p{font-weight:400;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;max-height:150px}.info{display:flex;justify-content:center;align-items:center;font-weight:700;text-align:center}`,ue.properties={data:{type:Object},ticketId:{type:String},ticketType:{type:String},requestType:{type:String},fetchInProgress:{type:Boolean}},window.customElements.get("ticket-update-comments")||window.customElements.define("ticket-update-comments",ue);const{ShowStaticKnowledgeBase:Nt,KnowledgeBaseLaunchpadVideoBase:Ut,IsInventoryManagementEnabled:pe,TrustedOrigins:Dt,KnowledgeBaseLaunchpadLinkBase:qt}=H(),Mt=Dt.split(",").map(t=>new RegExp(t,"i"));class W extends E{constructor(){super(),this.newReleaseNotes=void 0,this.isLoading=!0,this.getUsers=async()=>{const e=await pt();this.statusCounts.USERS=e,this.status=B(this.permissions,this.statusCounts)},this.getMySites=async()=>{const e=await ct();this.statusCounts.MY_SITES=e,this.status=B(this.permissions,this.statusCounts)},this.getServiceTickets=async()=>{const e=await mt();this.statusCounts.ACTIVE_TICKETS=e,this.status=B(this.permissions,this.statusCounts)},this.getDcimEnabledLocations=async()=>{const e=await ut();this.statusCounts.DCIM=e,this.status=B(this.permissions,this.statusCounts)},this.getActiveOrders=async()=>{const e=await gt();this.statusCounts.ACTIVE_ORDERS=e,this.status=B(this.permissions,this.statusCounts)},this.getTicketUpdates=async e=>{var i;const s=w(e,be,l.UPDATE),r=w(e,z,l.READ),{rows:d}=s?await ye():p,u=r&&pe&&!((i=window.registeredApps["ui-gom"])===null||i===void 0)&&i.enabled?await ke(ae(e)):p,b=d.concat(u.rows),x=b.length>0?b.sort((k,N)=>new Date(N.updated_at)-new Date(k.updated_at)).slice(0,5):[];this.ticketUpdates={...this.ticketUpdates,rows:x,disabled:d.length===0&&u.rows.length===0,isAuthorizedToView:s||r},this.ticketUpdateOrders=u},this.getYourActionRequired=async e=>{var i;const s=w(e,[Z,Q],l.APPROVE),r=w(e,z,l.CREATE),{rows:d}=s?await Te():p,u=r&&pe&&!((i=window.registeredApps["ui-gom"])===null||i===void 0)&&i.enabled?await Ce(ae(e)):p,b=d.concat(u.rows),x=b.length>0?b.sort((k,N)=>new Date(N.updated_at)-new Date(k.updated_at)).slice(0,5):[];this.yourActionRequired={...this.yourActionRequired,rows:x,disabled:d.length===0&&u.rows.length===0,isAuthorizedToView:s||r},this.actionRequiredOrders=u},this.getKnowledgeBase=async()=>{var e;if(Nt)this.news=ce.whatsNews,this.promotions=ce.newsAndPromotions,this.resources=ce.resources;else{const i=await ht();this.news=i.whatsNews,((e=this.news)===null||e===void 0?void 0:e.length)>0&&this.checkReleaseNotes(this.news[0]),this.promotions=i.newsAndPromotions,this.resources=i.resources}},this.status=B(),this.statusCounts={USERS:void 0,ACTIVE_ORDERS:void 0,ACTIVE_TICKETS:void 0,MY_SITES:void 0,DCIM:void 0},this.ticketUpdates={header:"Ticket Updates",href:`/service-management/?createdBy_equals=${n==null?void 0:n.userProfileName}&sort=updatedAt&order=desc`,columns:ne(this.ticketSelect),isAuthorizedToView:!1},this.yourActionRequired={header:"Your Action Required",href:"/service-management/?permission_privilege=Approve&status_equals=Pending+Approval",columns:de(this.ticketSelect),isAuthorizedToView:!1},this.permissions={},this.navItems=$e(this.permissions,{})}checkReleaseNotes(e){var i,s,r;const d=localStorage.getItem("x-auth"),{access_token:u}=JSON.parse(d),{previous_login_date:b}=_e(u),x=(i=new Date(b))===null||i===void 0?void 0:i.getTime(),{id:k,dateAdded:N,documents:M,uid:Y}=e;if(localStorage.getItem("releaseNotesViewed")===String(k))return;const F=(s=new Date(N))===null||s===void 0?void 0:s.getTime(),J=1440*60*1e3;if(Number.isNaN(x)||Number.isNaN(F)||x>F+J)return;const ee=!((r=M==null?void 0:M[0])===null||r===void 0)&&r.url?`${Ut}${M[0].url}`:`${qt}${Y}`;this.newReleaseNotes={id:k,title:"New Release Updates!",href:ee,description:`We have introduced new and improved functionality on the Global Portal
877
+ with our monthly release. Learn more by clicking on the link below or review it later in our What's New section!`}}dismissReleaseNotes(){localStorage.setItem("releaseNotesViewed",this.newReleaseNotes.id),this.newReleaseNotes=void 0}firstUpdated(){pe&&this.getActiveOrders(),this.getUsers(),this.getMySites(),this.getServiceTickets(),this.getKnowledgeBase(),Promise.all([wt(),ft()]).then(async([e,i])=>{this.permissions=e,this.navItems=$e(this.permissions,i),await this.getDcimEnabledLocations(),await this.getTicketUpdates(this.permissions),await this.getYourActionRequired(this.permissions),this.isLoading=!1})}messageHandler(e){const{origin:i,data:s}=e;if(!Mt.some(r=>r.test(i))){console.warn("Rejected message from untrusted origin:",i);return}s.knowledgeBaseURL&&L.go(`${Ue[Ne].path}${s.knowledgeBaseURL}`)}connectedCallback(){super.connectedCallback(),window.addEventListener("message",this.messageHandler)}disconnectedCallback(){window.removeEventListener("message",this.messageHandler),super.disconnectedCallback()}route(e){const{route:i}=e.detail;if(i.startsWith("/"))L.go(i);else{const s=new CustomEvent(e.detail.route,{bubbles:!0,composed:!0,detail:{fromLaunchpad:!0,originEl:e.detail.originEl}});this.dispatchEvent(s)}}ticketSelect(e){let i="";switch(e.source){case S.ServiceManagement:const{ticket_id:s,ticket_type:r,request_type:d}=e,u=X[d]?`/${y[d]}`:"";i=`/${y.base}/${y[r]}${u}/${s}`;break;case S.OrderManagement:i=`/order-management/order-details/${e.ticket_id}`;break;default:i="/order-management/order-details"}L.go(i)}renderNewReleaseNotes(){return o`<ix-dialog open> <h3 slot="headline" class="dlr-text-heading"> ${this.newReleaseNotes.title} </h3> <p slot="content" class="md:w-[380px]"> ${this.newReleaseNotes.description} </p> <div slot="actions" class="px-2 pb-2 pt-6"> <ix-button @click="${this.dismissReleaseNotes}" appearance="text"> Dismiss </ix-button> <ix-button @click="${this.dismissReleaseNotes}" href="${this.newReleaseNotes.href}" appearance="text"> Read More </ix-button> </div> </ix-dialog>`}render(){return o` <contact-us-form></contact-us-form> ${this.newReleaseNotes?this.renderNewReleaseNotes():v} ${this.isLoading?v:o` <ix-launchpad class="mb-4 block" api-permissions="${JSON.stringify(this.permissions)}" .status="${this.status}" .nav="${this.navItems}" .news="${this.news}" .promotions="${this.promotions}" .resources="${this.resources}" .contacts="${Et}" .updates="${this.ticketUpdates}" .ticketUpdateOrders="${this.ticketUpdateOrders}" .actionRequiredOrders="${this.actionRequiredOrders}" .actions="${this.yourActionRequired}" @route="${this.route}"></ix-launchpad> `} `}}W.styles=[U,j],W.properties={status:[],ticketUpdates:{},ticketUpdateOrders:{},actionRequiredOrders:{},yourActionRequired:{}},a([h(Object)],W.prototype,"newReleaseNotes",void 0),a([h()],W.prototype,"isLoading",void 0),window.customElements.get("app-widgets")||window.customElements.define("app-widgets",W);let he=class extends E{render(){return o` <div class="launchpad-bg-image"></div> <app-widgets class="relative"> </app-widgets> `}};he.styles=[U,j],he=a([V("ui-launchpad")],he);
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": "17.0.0-SM-2990.566984",
6
+ "version": "17.0.0",
7
7
  "type": "module",
8
8
  "exports": {
9
9
  "./ui-launchpad.js": "./dist/ui-launchpad.js",