@esri/solutions-components 5.0.6 → 5.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/{GARIVREH.js → 22U34PQB.js} +1 -1
- package/dist/cdn/{NGJIRF7M.js → 3RZXRWAP.js} +1 -1
- package/dist/cdn/{2DPJZTGZ.js → 3YFIPADZ.js} +1 -1
- package/dist/cdn/{3UZ6LMZQ.js → 43CYPIMQ.js} +1 -1
- package/dist/cdn/{T3XWY77W.js → 43IA3DL4.js} +1 -1
- package/dist/cdn/{N2WO3YVL.js → 4EPDGSS3.js} +1 -1
- package/dist/cdn/{LWBJ45OR.js → 4MCRCBXP.js} +1 -1
- package/dist/cdn/{CBXXTXHF.js → 4S6JHZXI.js} +1 -1
- package/dist/cdn/{52LTQZ5L.js → 5D5V3CBT.js} +1 -1
- package/dist/cdn/{NHPGVRRO.js → 5KFPWHQK.js} +1 -1
- package/dist/cdn/{NC6JL2EV.js → 5U76VYOV.js} +1 -1
- package/dist/cdn/{AOU46BFO.js → 5Z4JZB7T.js} +1 -1
- package/dist/cdn/{7UQHQGGR.js → 675G5KQQ.js} +1 -1
- package/dist/cdn/{D3Q2BMGC.js → 6ERK6VPZ.js} +1 -1
- package/dist/cdn/{YQSES45Q.js → 6XUVGEDV.js} +1 -1
- package/dist/cdn/{QKSAGMHC.js → 73QBDSXH.js} +1 -1
- package/dist/cdn/{N2JDDZHC.js → 74ZSZVS6.js} +1 -1
- package/dist/cdn/{5KUZRJBN.js → 7JYPKH72.js} +2 -2
- package/dist/cdn/{KS76NDW7.js → 7REPJ4XS.js} +1 -1
- package/dist/cdn/{UYIFEFZO.js → 7ZBCFESJ.js} +1 -1
- package/dist/cdn/{VMF3426Z.js → A26I5EAX.js} +1 -1
- package/dist/cdn/B2DK4LWH.js +2 -0
- package/dist/cdn/{LIARPICS.js → BNNZ2ZGX.js} +1 -1
- package/dist/cdn/{UZTK5BFT.js → BRG4WNOI.js} +1 -1
- package/dist/cdn/{BXXSHO4P.js → C3QDGTJR.js} +1 -1
- package/dist/cdn/{UIJUUMOH.js → CEYUKUGR.js} +1 -1
- package/dist/cdn/DKFXHHUI.js +2 -0
- package/dist/cdn/{OOSW7Q2C.js → DTI2O2YX.js} +1 -1
- package/dist/cdn/{ALXBMM22.js → EBQJE5IR.js} +1 -1
- package/dist/cdn/EEGVKRAE.js +2 -0
- package/dist/cdn/{4E2QV2RF.js → ENQQNV7P.js} +1 -1
- package/dist/cdn/{L6L2P3QS.js → ERCXFIQA.js} +1 -1
- package/dist/cdn/{KT2ORA3Q.js → EYM3QUBY.js} +1 -1
- package/dist/cdn/{JHAGL5UZ.js → FJ6NF35F.js} +1 -1
- package/dist/cdn/{IEY5UTNT.js → G7HBG2UF.js} +1 -1
- package/dist/cdn/{4KYIM4XN.js → HNRSOVZ3.js} +1 -1
- package/dist/cdn/{Z73DPA3J.js → HYX7BODW.js} +1 -1
- package/dist/cdn/{QD2Q6HPQ.js → ICP6A2TW.js} +1 -1
- package/dist/cdn/{6HDTGG3L.js → IRTMH4CU.js} +1 -1
- package/dist/cdn/{MS6GCUUL.js → JAP5VDRT.js} +1 -1
- package/dist/cdn/{654SAJ5M.js → JVBVZ7SO.js} +1 -1
- package/dist/cdn/{DXYCRHKW.js → KMVYKYBM.js} +1 -1
- package/dist/cdn/{3GLO7PZY.js → KZHT2SRK.js} +1 -1
- package/dist/cdn/{62H3JCSO.js → LFAWVGKM.js} +1 -1
- package/dist/cdn/{X43QJBP2.js → MDAQ5K75.js} +1 -1
- package/dist/cdn/{5J4YGZZD.js → NFXWBAXX.js} +1 -1
- package/dist/cdn/{MJ4LI4IV.js → NG4ZFNHE.js} +1 -1
- package/dist/cdn/{3ZEFAZQJ.js → NPR6G5AX.js} +1 -1
- package/dist/cdn/{5CJ5TY42.js → NWSKMX7S.js} +1 -1
- package/dist/cdn/{OI3ISQWM.js → OM6BG2BU.js} +1 -1
- package/dist/cdn/{I5KQH3I2.js → OX5ZGUUP.js} +1 -1
- package/dist/cdn/{XCS33CLJ.js → PGDVHQVF.js} +1 -1
- package/dist/cdn/{HSSQBD3H.js → PNJZAUGF.js} +1 -1
- package/dist/cdn/{W4AUM6QU.js → PTKWOS3W.js} +1 -1
- package/dist/cdn/{HHBYWWW3.js → QHBHKUDJ.js} +1 -1
- package/dist/cdn/{QPBV4Y7M.js → QJFN3RCP.js} +1 -1
- package/dist/cdn/{3MHFKNRH.js → QLZRRDLM.js} +1 -1
- package/dist/cdn/{RJVZG4T4.js → QMZKZWSS.js} +1 -1
- package/dist/cdn/{CYEOUBT7.js → RBNSS2LC.js} +1 -1
- package/dist/cdn/{EUJEN75Q.js → RJEWER4Y.js} +1 -1
- package/dist/cdn/{AC6MJOAB.js → RJJJCTWH.js} +1 -1
- package/dist/cdn/{L7WRG2G5.js → RVY7I3GY.js} +1 -1
- package/dist/cdn/{KD2OVMZO.js → S2O7THHA.js} +1 -1
- package/dist/cdn/{E3FUDTEG.js → S36FP6V3.js} +1 -1
- package/dist/cdn/{2ZHFKBQO.js → SA6VZSQH.js} +1 -1
- package/dist/cdn/{SRAAWOU6.js → SKRTPLGN.js} +1 -1
- package/dist/cdn/{QP3QUOVI.js → SL4JGIFV.js} +1 -1
- package/dist/cdn/{H7MJ7IGV.js → SZGK2TKC.js} +1 -1
- package/dist/cdn/{BR4TZZCB.js → THFNJ23N.js} +1 -1
- package/dist/cdn/{WCF7EVUQ.js → UHIWQ5QU.js} +1 -1
- package/dist/cdn/{F2JNLC5K.js → UKPIHN6B.js} +1 -1
- package/dist/cdn/{HTXFCOPI.js → UQ7NCQ5J.js} +1 -1
- package/dist/cdn/{OLFZ5ET5.js → UZR3P2OU.js} +1 -1
- package/dist/cdn/{EUODHGXF.js → WFL6AMNM.js} +1 -1
- package/dist/cdn/{PEBFXPSL.js → XBVKGREH.js} +1 -1
- package/dist/cdn/{SEH4C4BM.js → XFYS4DBD.js} +1 -1
- package/dist/cdn/{7WBAW4FI.js → XXUIQTGS.js} +1 -1
- package/dist/cdn/{WJK27OTO.js → Y4ZKMRDR.js} +1 -1
- package/dist/cdn/{XJTGQUMI.js → Y6MSFH7B.js} +1 -1
- package/dist/cdn/{GSTBH4J5.js → YKT6FAYV.js} +1 -1
- package/dist/cdn/{6PZREC7X.js → YTSRCWM5.js} +1 -1
- package/dist/cdn/{V3B323D4.js → ZW6PR32J.js} +1 -1
- package/dist/cdn/{ZSYY5MLI.js → ZWZFY2XW.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/runtime.js +2 -2
- package/dist/components/create-feature/customElement.js +1 -1
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/solutions-components_commit.txt +6 -6
- package/package.json +1 -1
- package/dist/cdn/6PZ6PVTG.js +0 -2
- package/dist/cdn/6RFIB2J7.js +0 -2
- package/dist/cdn/7JVIFSRF.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
|
|
2
|
-
import b from"./PEBFXPSL.js";import{b as U}from"./PZ4L77M5.js";import{Eb as R,c as M,mb as A,ya as k}from"./JE7L7M3J.js";import{a as C}from"./Z73DPA3J.js";import{g as d}from"./CGLFPVBM.js";import{b as f}from"./7JVIFSRF.js";import{F as l,G as c,H as S,L as m,h as v,i as a,j as w,r as u}from"./46DQNAMV.js";export default $arcgis.t(([p,z,G,{B:T,D:O,L:h,a:$,i:E,s:_}])=>{var b=class{constructor(t,e,i,s){this._credential=void 0,this._isEnterprise=!1,this._locale="en",this._portalSubset=void 0,this._portalUserSubset=void 0,this._arcGISOnlineReachable=!0,this._searchArcGISOnlineEnabled=!0,this._signInParam=void 0,this._clientId=t??"",this._locale=i??"en",this._portalUrl=e??"https://www.arcgis.com",this._portalRestUrl=this._portalUrl+"/sharing/rest",this._portalUrl=location.origin.endsWith(".arcgis.com")?window.location.origin:this._portalUrl,this._signInParam=s;let n=new z({appId:this._clientId,locale:this._locale,popup:!1,portalUrl:this._portalUrl,preserveUrlHash:!0});try{p.registerOAuthInfos([n])}catch(o){console.log(o)}this._portal=new G({url:this._portalUrl})}get Credential(){return this._credential}get IsEnterprisePortal(){return this._isEnterprise}get IsSignedIn(){return!!this._credential}get Portal(){return this._portal}get PortalSubset(){return this._portalSubset}get PortalUrl(){return this._portalUrl}get PortalUserOrg(){return this._portalSubset&&this._portalSubset.id}get PortalUserName(){return this._portalUserSubset&&this._portalUserSubset.username||""}get PortalUserSubset(){return this._portalUserSubset}get PortalUserPrivileges(){let t=[];return this._portalUserSubset?.privileges&&(t=this._portalUserSubset.privileges),t}get SignInParam(){return this._signInParam}get CanDeleteSolution(){return this.PortalUserPrivileges.includes("portal:admin:deleteItems")}get CanUpdateSolution(){return this.PortalUserPrivileges.includes("portal:admin:updateItems")}get CanUseAI(){let t=this._portalSubset?.orgSettings,e=this.PortalUserPrivileges.includes("portal:user:useAIAssistants");return t?.aiAssistantsEnabled?t.aiAssistantsEnabled&&!t.blockBetaApps&&e:!1}get CanViewOrg(){return this.PortalUserPrivileges.includes("portal:admin:viewItems")}get CanSearchArcGISOnline(){return this._searchArcGISOnlineEnabled&&this._arcGISOnlineReachable}async checkArcGISOnlineReachability(t){if(this._isEnterprise&&this._searchArcGISOnlineEnabled&&t){let e=`${T(this._portalUrl)}/sharing/rest`,i=new d({});try{await A({q:`group:${t} type:Solution`,num:1,start:1,authentication:i,portal:e}),this._arcGISOnlineReachable=!0}catch(s){this._arcGISOnlineReachable=!1,console.warn("ArcGIS Online solutions group not reachable:",s)}}}get RestUserSession(){let t=p.findServerInfo(this._portalRestUrl),e=this._credential?d.fromCredential(this._credential,t):this._isEnterprise?new d({}):new d({portal:this._portalRestUrl});return e.portal=this.PortalSubset?.restUrl?this.PortalSubset?.restUrl:e.portal,e.clientId=this._credential?._oAuthCred?.appId,e._refreshToken=this._credential?._oAuthCred?.refreshToken,e}async initialize(t=!1,e){try{await this._init(t,e)}catch{this.destroy()}return this}destroy(){this._credential=void 0,this._portalSubset=void 0,this._portalUserSubset=void 0,p.destroyCredentials()}async signIn(t=""){p.setOAuthRedirectionHandler(e=>{let i=e.authorizeParams.redirect_uri;if(t.length>0){let s=i.split("?"),n=s[0],o="",r=new URLSearchParams(s[1]||"");r.append("signInParam",t),o="?"+r.toString(),e.authorizeParams.redirect_uri=n+o}window.location.href=e.authorizeUrl+"?"+this._objectToQuery(e.authorizeParams)}),await p.getCredential((this._portalSubset?.portalUrl??this._portalUrl)+"/sharing").then(e=>{e&&window.location.reload()})}signOut(){let t=window.location.href,e=/[\/]\b([0-9A-Fa-f]){32}\b/g,i=t.match(e)?t.replace(e,""):t,s=`${this._portal?.restUrl??this._portalUrl+"/sharing/rest"}/oauth2/signout?client_id=${this._clientId}&redirect_uri=${encodeURIComponent(i)}`;this.destroy(),window.location.replace(s)}refreshSession(){let t=this.RestUserSession;if(!(!t||!this.IsSignedIn))return t.exchangeRefreshToken()}_getOrgUrl(t,e,i){return e&&i?window.location.protocol+"//"+e.toLowerCase()+"."+i:t}async _init(t=!1,e){try{this._credential=await p.checkSignInStatus(this._portalUrl+"/sharing")}catch(s){console.log(s)}try{let s=await p.checkAppAccess(this._portalUrl+"/sharing",this._clientId);(typeof s.valid<"u"&&!s.valid||s.viewOnlyUserTypeApp)&&window.location.replace(`error.html?error=blocked&locale=${this._locale}`),this._credential=s.credential}catch(s){s.name}this._searchArcGISOnlineEnabled=await this._checkSearchArcGISOnlineEnabled(t,this._portal.restUrl),this._portal.authMode=t?"immediate":"auto",await this._portal.load();let i=this._credential?await k(this.RestUserSession):{};return this._isEnterprise=this._portal.isPortal,await this.checkArcGISOnlineReachability(e),this._portalSubset={name:this._portal.name??"",id:this._portal.id??"",restUrl:this._portal.restUrl??"",portalUrl:this._portal.url??"",urlKey:this._portal.urlKey??"",hostName:this._portal.portalHostname??"",orgUrl:this._getOrgUrl(this._portal.url,this._portal.urlKey??"",this._portal.customBaseUrl??""),locationTrackingEnabled:this._portal.helperServices.hasOwnProperty("locationTracking"),hubPremiumEnabled:this._portal.portalProperties?.hub?.enabled||!1,workflowURL:this._portal.helperServices?.workflowManager?.url??this._portal.url,isReadOnly:this._portal.isReadOnly,orgSettings:i},this._portalUserSubset={fullName:this._portal.user?.fullName??"",username:this._portal.user?.username??"",culture:this._portal.user?.culture?.toLowerCase()||"en",thumbnailUrl:this._portal.user?.thumbnailUrl||this._portal.url+"/home/js/arcgisonline/css/images/no-user-thumb.jpg",orgId:this._portal.user?.orgId??"",privileges:this._portal.user.privileges,role:this._portal.user?.role??"",roleId:this._portal.user?.roleId??void 0},this._isEnterprise&&this._portalSubset&&(this._portalSubset.workflowURL=await R(this._portal.restUrl,this.RestUserSession||new d({}))),this._portal?.user?.roleId&&this._portalUserSubset&&(this._portalUserSubset.roleId=this._portal.user.roleId),this}async _checkSearchArcGISOnlineEnabled(t,e){if(t)try{let i=`${e}/portals/self/settings`,s=await M(i,{authentication:this._credential?this.RestUserSession:void 0});return s?.portalConfigProperties?.searchArcGISOnlineEnabled!==void 0?s.portalConfigProperties.searchArcGISOnlineEnabled:!1}catch(i){return console.warn("Failed to fetch portal settings:",i),!1}else return!0}_isSerializable(t){return t&&typeof t=="object"&&"toJSON"in t&&typeof t.toJSON=="function"}_objectToQuery(t,e){return t?e&&typeof e=="function"?Object.keys(t).map(i=>encodeURIComponent(i)+"="+encodeURIComponent(e(i,t[i]))).join("&"):Object.keys(t).map(i=>{let s=t[i];if(s==null)return"";let n=encodeURIComponent(i)+"=",o=e&&e[i];return o?n+encodeURIComponent(o(s)):Array.isArray(s)?s.map(r=>this._isSerializable(r)?n+encodeURIComponent(JSON.stringify(r)):n+encodeURIComponent(r)).join("&"):this._isSerializable(s)?n+encodeURIComponent(JSON.stringify(s)):n+encodeURIComponent(s)}).filter(i=>i).join("&"):""}};var I=class g{constructor(){this._telemetryInstance=void 0,this._logTelemetryEvents=!1}getInstance(){return this._telemetryInstance}isEnabled(){return this._logTelemetryEvents}setInstance(t){this._telemetryInstance=t}setEnabled(t){this._logTelemetryEvents=t}_mapDimensions(t){let e={};return t&&t.slice(0,20).forEach((i,s)=>{let n=`dimension${s+1}`;e[n]=i}),e}_mapMetrics(t){let e={};return t&&t.slice(0,20).forEach((i,s)=>{let n=`metric${s+1}`;e[n]=i}),e}logEvent(t){if(this._logTelemetryEvents&&this._telemetryInstance){let{category:e,action:i,dimensions:s,metrics:n,label:o="",details:r=""}=t,x=this._mapDimensions(s),P=this._mapMetrics(n);this._telemetryInstance.logEvent({category:e,action:i,label:o,details:r,...x,...P})}}getTelemetrySession(){return{instance:this._telemetryInstance,logEvent:t=>this.logEvent(t),enabled:this._logTelemetryEvents}}static getDisabledSession(){return{instance:void 0,logEvent:()=>{},enabled:!1}}async initializeTelemetry(t,e){if(!g.shouldEnableTelemetry(t,e))return this.getTelemetrySession();let i=document.querySelector("consent-manager");if(!i){if(!customElements.get("consent-manager"))return this.getTelemetrySession();i=document.createElement("consent-manager"),i.portal=t.Portal,i.measurementIds=e.measurementIds||[],i.firstUseVar=e.cookiesFirstUseVar;let s=g.getEnvironmentConfig(e,t);s&&(i.amazonUserPoolID=s?.amazon?.userPoolID,i.amazonAppId=s?.amazon?.app?.id,i.amazonAppName=e.telemetry?.name,i.amazonVersion=e.telemetry?.version);let n=t.Portal?.eueiEnabled;(localStorage.getItem(i.firstUseVar)==="true"||n)&&(this.setEnabled(!0),i.classList.add("display-none")),document.body.appendChild(i),n?(await new Promise(o=>setTimeout(o,100)),await this._setInstanceFromConsentManager(i)):window.addEventListener("consentGranted",o=>{o.detail?.granted&&(this.setEnabled(!0),this._setInstanceFromConsentManager(i))})}return this.getTelemetrySession()}async _setInstanceFromConsentManager(t){try{let e=new Promise((s,n)=>setTimeout(()=>n(new Error("Timeout waiting for consent-manager instance")),1e4)),i=await Promise.race([t.getInstance(),e]);this.setInstance(i)}catch{}}static shouldEnableTelemetry(t,e){let i=t?.IsEnterprisePortal,s=t?.Portal?.eueiEnabled;return s===!1||i?!1:!!((e.measurementIds||e.telemetry)&&(e.cookiesFirstUseVar||s))}static getEnvironmentConfig(t,e){if(!t.telemetry)return;let i=t.forceTrackingEnv||O(document.location.hostname,e?.Portal?.portalHostname||"");return i&&Object.keys(t.telemetry).includes(i)?t.telemetry[i]:void 0}},N=v`.esri-global-nav__title{margin-block-start:0;position:relative;margin-bottom:0;font-size:var(--calcite-font-size-xl);font-weight:var(--calcite-font-weight-medium);padding-inline-end:var(--calcite-spacing-xxl);align-self:center;height:100%;display:flex;align-items:center}.esri-global-nav__logo-link{color:var(--calcite-color-text-1);text-decoration:unset;margin-block-start:0px;position:relative;margin-bottom:0;align-self:center;height:100%;display:flex;align-items:center}.esri-global-nav__logo-link:focus{outline:2px solid var(--calcite-color-brand);outline-offset:-2px}.cursor-pointer{cursor:pointer}.side{border-right:solid 1px;color:var(--calcite-color-text-1);height:34px;align-self:center}.display-flex{display:flex}.align-self-center{align-self:center}.padding-top-1{padding-top:var(--calcite-spacing-lg)}.padding-end-1{padding-inline-end:var(--calcite-spacing-lg)}.padding-start-1{padding-inline-start:var(--calcite-spacing-lg)}.padding-bottom-1{padding-bottom:var(--calcite-spacing-lg)}.margin-start-end-1{margin-inline-start:var(--calcite-spacing-lg);margin-inline-end:var(--calcite-spacing-lg)}.margin-start-end-1-5{margin-inline-start:var(--calcite-spacing-xxl);margin-inline-end:var(--calcite-spacing-xxl)}.height-full{height:100%}.user-label{--calcite-label-margin-bottom: 0px}.font-bold{font-weight:var(--calcite-font-weight-bold)}.font-normal{font-weight:var(--calcite-font-weight-normal)}.logo-padding{padding-inline-start:var(--calcite-spacing-none);height:100%}@media(max-width:800px){.logo-padding{padding-inline-start:var(--calcite-spacing-lg)}}.signin-padding{padding-inline-end:var(--calcite-spacing-none)}@media(max-width:800px){.signin-padding{padding-inline-end:var(--calcite-spacing-lg)}}calcite-action{--calcite-font-size-0: var(--calcite-font-size--1);--calcite-internal-action-padding-inline: var(--calcite-spacing-lg)}calcite-navigation{--calcite-color-border-3: transparent}.border-bottom{border-bottom-color:var(--calcite-color-border-1);border-bottom-width:var(--calcite-spacing-px);border-bottom-style:solid}.border{height:var(--calcite-spacing-px);border-bottom-color:var(--calcite-color-border-3);border-bottom-style:solid;border-bottom-width:var(--calcite-border-width-sm);box-sizing:border-box;position:absolute;top:65px;left:0;width:100%;z-index:1}.height-65{height:65px}`,y=class extends S{constructor(){super(),this._isMobile=!1,this._logoFill="",this._thumbnailUrl="",this._translations=C({name:"solutions-deploy-app-nav",blocking:!0}),this._activeTab="all-solutions",this._authentication=void 0,this._cardType="details",this._dropdownRef=l(),this._dropdownItemAll=l(),this._dropdownItemMy=l(),this._dropdownItemMyContent=l(),this._dropdownItemResources=l(),this._isMobileContextConsumer=U({context:$,subscribe:!0,callback:t=>this._isMobile=t}),this._menuRef=l(),this._menuItemAll=l(),this._menuItemMy=l(),this._menuItemResources=l(),this.authInit=u(),this.navTabSelected=u(),this.tabChanged=u(),this.tokenRefreshed=u(),this.listenOn(window,"deployedCardSelected",this._deployedCardSelected),this.listenOn(window,"detailsCardSelected",this._detailsCardSelected),this.listenOn(window,"deployAppTabSelected",this._deployAppTabSelected),this.listenOn(window,"popstate",this._handleUrlChange),this.listenOn(window,"sessionRefreshed",t=>{this._updateThumbnailToken(t.detail)})}static{this.properties={appConfig:1,initTab:1,_subNavigationCard:16,_isMobile:16,_logoFill:16,_thumbnailUrl:16,_translations:16}}static{this.styles=N}get _telemetry(){return this._config?.telemetrySession}clearMenuItems(){this._isMobile?(this._dropdownItemAll.value.selected=!1,this._authentication?.IsSignedIn&&(this._dropdownItemMy.value.selected=!1),this._dropdownItemResources.value.selected=!1):(this._menuItemAll.value.active=!1,this._authentication?.IsSignedIn&&(this._menuItemMy.value.active=!1),this._menuItemResources.value.active=!1)}activateMenuItem(t,e=!1){let i,s;switch(t){case"all-solutions":i=this._isMobile?this._dropdownItemAll:this._menuItemAll,s=this._isMobile?[this._dropdownItemMy,this._dropdownItemResources]:[this._menuItemMy,this._menuItemResources];break;case"deployments":i=this._isMobile?this._dropdownItemMy:this._menuItemMy,s=this._isMobile?[this._dropdownItemAll,this._dropdownItemResources]:[this._menuItemAll,this._menuItemResources];break;case"resources":i=this._isMobile?this._dropdownItemResources:this._menuItemResources,s=this._isMobile?[this._dropdownItemAll,this._dropdownItemMy]:[this._menuItemAll,this._menuItemMy];break;case"my-content":this._isMobile&&(i=this._dropdownItemMyContent,s=[this._dropdownItemAll,this._dropdownItemMy,this._dropdownItemResources]);break}i&&s&&this._handleMenuClick(t,i,s,e)}async connectedCallback(){super.connectedCallback();let t=new d({username:"",password:""});this._userSession=t}async load(){let t=window.matchMedia("(prefers-color-scheme: dark)");t.addEventListener("change",r=>this._logoFill=this._getLogoFill(r.matches)),this._logoFill=this._getLogoFill(t.matches),this._isMobileContextConsumer.value&&(this._isMobile=this._isMobileContextConsumer.value);let e=this.appConfig.locale||"en",i=this.appConfig.authentication?.PortalSubset?.orgUrl||this.appConfig.orgURL||this.appConfig.portalURL,s=this.appConfig.authentication?.PortalUrl||this.appConfig.portalURL,n=this.appConfig.primarySolutionsGroupId,o=!1;this._authentication||(this.appConfig.authentication?this._authentication=this.appConfig.authentication:(this._authentication=new b(this.appConfig.appId,this.appConfig.portalURL,this.appConfig.locale),await this._authentication.initialize(this.appConfig.isEnterprise,this.appConfig.agoBasedEnterpriseSolutionsGroupId),o=!0)),o||await this._authentication?.checkArcGISOnlineReachability(this.appConfig.agoBasedEnterpriseSolutionsGroupId),this._authentication.RestUserSession&&(this._userSession=this._authentication.RestUserSession),this.initTab&&(this._activeTab=this.initTab,this.initTab=void 0),this._config={anonAgolSession:void 0,agolPortalUrl:"",allCards:[],appId:this.appConfig.appId,authentication:this._authentication,agoBasedEnterpriseSolutionsGroupId:this.appConfig.agoBasedEnterpriseSolutionsGroupId,diagramKey:this.appConfig.diagramKey,isEnterprise:this.appConfig.isEnterprise,locale:e,orgUrl:i,portalURL:s,primarySolutionsGroupId:n,userSession:this._userSession,telemetrySession:I.getDisabledSession(),cookiesFirstUseVar:this.appConfig.cookiesFirstUseVar,trackingEnabled:this.appConfig.trackingEnabled,forceTrackingEnv:this.appConfig.forceTrackingEnv,telemetry:this.appConfig.telemetry,measurementIds:this.appConfig.measurementIds},this.authInit.emit(this._config),this._portal=await this._userSession?.getPortal()}render(){return a`<div><calcite-navigation>${this._getHeading()}${this._isMobile?this._getDropdown():this._getMenu()}${this._isMobile?"":this._getSignInOut()}</calcite-navigation><div class="border" slot=header></div>${!this._isMobile&&this._getSubHeading()||""}</div>`}updated(t){t.has("_isMobile")&&t.get("_isMobile")!==void 0&&this.activateMenuItem(this._activeTab,!0)}_getSignInOut(){return this._authentication?.IsSignedIn?a`<div slot=user>${this._getUserAvatar()}</div>`:a`<calcite-menu label slot=content-end><calcite-menu-item label @click=${this._handleSignIn} @keydown=${t=>h(t,()=>this._handleSignIn(t))} .text=${this._translations.signIn}></calcite-menu-item></calcite-menu>`}_getDropdown(){let t=this._authentication?.IsSignedIn?this._translations.signOut:this._translations.signIn;return a`<calcite-dropdown overlay-positioning=fixed slot=content-end width=m ${c(this._dropdownRef)}><calcite-button appearance=transparent icon-start=hamburger kind=neutral slot=trigger scale=l></calcite-button><calcite-dropdown-group><calcite-dropdown-item @click=${()=>this._handleMenuClick("all-solutions",this._dropdownItemAll,[this._dropdownItemMy,this._dropdownItemResources,this._dropdownItemMyContent],!0)} @keydown=${e=>h(e,()=>this._handleMenuClick("all-solutions",this._dropdownItemAll,[this._dropdownItemMy,this._dropdownItemResources,this._dropdownItemMyContent],!0))} ${c(this._dropdownItemAll)}>${this._translations.allSolutions}</calcite-dropdown-item><calcite-dropdown-item @click=${()=>this._handleMenuClick("deployments",this._dropdownItemMy,[this._dropdownItemAll,this._dropdownItemResources,this._dropdownItemMyContent],!0)} @keydown=${e=>h(e,()=>this._handleMenuClick("deployments",this._dropdownItemMy,[this._dropdownItemAll,this._dropdownItemResources,this._dropdownItemMyContent],!0))} ${c(this._dropdownItemMy)}>${this._translations.myDeployments}</calcite-dropdown-item>${this._authentication?.CanSearchArcGISOnline&&a`<calcite-dropdown-item @click=${()=>this._handleMenuClick("resources",this._dropdownItemResources,[this._dropdownItemAll,this._dropdownItemMy,this._dropdownItemMyContent],!0)} @keydown=${e=>h(e,()=>this._handleMenuClick("resources",this._dropdownItemResources,[this._dropdownItemAll,this._dropdownItemMy,this._dropdownItemMyContent],!0))} ${c(this._dropdownItemResources)}>${this._translations.solutionResources}</calcite-dropdown-item>`||""}<calcite-dropdown-item @click=${()=>{let e=this._activeTab==="all-solutions"?this._dropdownItemAll:this._activeTab==="deployments"?this._dropdownItemMy:this._activeTab==="resources"?this._dropdownItemResources:void 0;setTimeout(()=>this._handleMenuClick("my-content",e,[this._dropdownItemAll,this._dropdownItemMy,this._dropdownItemResources,this._dropdownItemMyContent],!1),10)}} ${c(this._dropdownItemMyContent)}>${this._translations.myContent}</calcite-dropdown-item><calcite-dropdown-item @click=${e=>{this._authentication?.IsSignedIn?this._signOut():this._handleSignIn(e)}}>${t}</calcite-dropdown-item></calcite-dropdown-group></calcite-dropdown>`}_getMenu(){return a`<calcite-menu label slot=content-start ${c(this._menuRef)}><calcite-menu-item label @click=${()=>this._handleMenuClick("all-solutions",this._menuItemAll,[this._menuItemMy,this._menuItemResources],!0)} @keydown=${t=>h(t,()=>this._handleMenuClick("all-solutions",this._menuItemAll,[this._menuItemMy,this._menuItemResources],!0))} .text=${this._translations.allSolutions} ${c(this._menuItemAll)}></calcite-menu-item><calcite-menu-item label @click=${()=>this._handleMenuClick("deployments",this._menuItemMy,[this._menuItemAll,this._menuItemResources],!0)} @keydown=${t=>h(t,()=>this._handleMenuClick("deployments",this._menuItemMy,[this._menuItemAll,this._menuItemResources],!0))} .text=${this._translations.myDeployments} ${c(this._menuItemMy)}></calcite-menu-item>${this._authentication?.CanSearchArcGISOnline&&a`<calcite-menu-item label @click=${()=>this._handleMenuClick("resources",this._menuItemResources,[this._menuItemAll,this._menuItemMy],!0)} @keydown=${t=>h(t,()=>this._handleMenuClick("resources",this._menuItemResources,[this._menuItemAll,this._menuItemMy],!0))} .text=${this._translations.solutionResources} ${c(this._menuItemResources)}></calcite-menu-item>`||""}</calcite-menu>`}_getHeading(){return a`<div class="align-self-center display-flex cursor-pointer logo-padding" slot=logo><a aria-label=${this._translations.linkToEsriHomePage??m} class="esri-global-nav__logo-link" href=https://www.esri.com @click=${()=>this._logLinkClickTelemetry("Esri")} rel=noopener target=_blank title=${this._translations.linkToEsriHomePage??m}><svg height=30 viewBox="0 0 84 30" width=84 xmlns=http://www.w3.org/2000/svg>${w`<path fill=${this._logoFill??m} d="M77.277.5c-1.48 0-2.554 1.175-2.554 2.488 0 1.314 1.074 2.49 2.554 2.49 1.48 0 2.622-1.071 2.622-2.49C79.899 1.572 78.756.5 77.277.5zm-1.913 23.426h3.891V8.353h-3.891v15.573zM40.515 7.965c-4.702 0-8.465 3.275-8.465 8.174 0 4.898 3.763 8.177 8.465 8.177 2.146 0 4.165-.667 5.852-2.31l-2.457-2.457c-.916.964-2.093 1.651-3.78 1.651-2.175 0-3.927-1.397-4.188-3.698h11.875v-1.07c0-5.42-2.95-8.467-7.302-8.467zm-4.573 6.617c.293-2.24 1.721-3.7 4.023-3.7 2.434 0 3.926 1.43 3.96 3.7h-7.983zm17.305-1.849c0-1.169 1.233-1.655 2.273-1.655 1.32 0 2.292.547 3.037 1.577l2.476-2.474c-1.282-1.6-3.407-2.216-5.418-2.216-3.147 0-6.262 1.555-6.262 5.028 0 5.938 8.403 3.406 8.403 6.617 0 1.233-1.46 1.784-2.595 1.784-1.65 0-2.687-.806-3.69-1.905l-2.515 2.514c1.58 1.711 3.62 2.313 5.978 2.313 3.179 0 6.717-1.299 6.717-4.998 0-6.067-8.404-3.795-8.404-6.585zm14.15-1.916h-.062V8.353h-3.892v15.573h3.892v-8.34c0-.842.518-3.925 4.185-3.925.564 0 1.127.112 1.718.253l.152-3.726c-.45-.127-.901-.223-1.382-.223-2.046 0-3.766 1.07-4.61 2.852zM14.683 2.766c-1.217-.037-1.932.12-2.651.26-.216-.056-.62.003-.643.472 0 .252.08.447.24.562.159.114 1.493 1.1 2.473 2.142-.47.052-.98.138-1.504.246-.585-1.264-2.465-.114-3.714-.064-.146.006-.286.025-.431.035-.137-1.056-.235-2.15-.21-2.92 1.618-.917 4.748-1.593 6.874-1.626l.373-.01c.312-.003.337-.251.043-.291-2.641-.361-4.929.173-7.279 1.145C5.808 3.748 2.696 6.12.8 10.596c-.444 1.247-2.219 7.195.935 12.3 2.56 4.142 5.855 6.113 9.887 6.676 4.024.561 6.207.075 8.752-1.055 5.951-2.642 10.496-12.559 5.95-19.747-1.794-3.319-6.495-6.229-11.641-6.004zm-2.259 4.647a17.754 17.754 0 0 1 2.362-.368 15.741 15.741 0 0 1 1.748 2.54c-.805.39-1.878.688-2.315 1.312-.181.26-.226.613-.232.995a23.59 23.59 0 0 0-3.877 1.286c-.453-1.332-.85-2.66-1.124-3.842 1.296-1.237 2.813-1.438 3.438-1.923zm6.61 15.88c-.354.038-.706.083-1.016.13-.77.121-1.762.379-2.685.723-.53-.843-1.95-2.891-2.667-4.437 1.442-.709 3.457-1.303 5.775-1.444.19.33.4.66.69.956.757.774-.44 1.883-.096 4.072zm-8.603-9.14c1.12-.53 2.3-.968 3.56-1.286-.008.333-.045.649-.182.903-.196.366-.106 1.428.134 1.775.755 1.099 2.008.488 2.951.883.433.181.721.482.964.84-1.974.124-3.91.584-5.706 1.41-.923-1.96-1.72-4.524-1.72-4.524zm.832 4.938c-.07.033-.145.074-.217.11a40.803 40.803 0 0 0-3.256-.78c-.995-.204-1.031-.15-2.151.175-.16.046-.313.088-.462.133a36.17 36.17 0 0 1-.445-1.202c1.436-1.106 2.884-2.034 4.821-2.985.5 1.491 1.215 3.483 1.71 4.549zm.768 4.528c.293-.765.521-1.331.605-1.89.569.958 1.248 2 1.774 2.815-.819.397-1.772 1.01-2.672 1.685.062-1.037.083-2.064.293-2.61zm5.334-14.636c-.01.014-.028.026-.04.04a23.057 23.057 0 0 0-1.376-2.111c1.007-.061 2.246-.008 3.374.108-1.014.363-1.461 1.254-1.958 1.963zm-9.028 1.094c.019-.026.039-.047.057-.072.234 1.182.513 2.16.886 3.518-1.402.618-3.881 2.148-4.976 2.972-.198-.502-.404-1.214-.589-1.946.249-.737.758-1.254 1.476-1.325 1.228-.123 2.28-1.95 3.146-3.147zm-5.41-1.784C4.24 6.455 6.023 4.666 7.65 3.773c-.016.4.086 1.567.218 2.693-.57.057-1.134.128-1.692.211a12.084 12.084 0 0 0-3.115 4.088c-.117-1.054-.178-1.933-.133-2.472zM2.07 9.731s.062 1.06.113 1.833c0 0-.781.886-1.18 1.59.159-1.443.498-2.187 1.067-3.423zm7.664 18.356C5.688 26.82 2.69 23.41 1.62 19.834a17.475 17.475 0 0 1-.651-6.473c.056.01.186.072.38.017.135-.093.616-.43.957-.728l.018.131c-.23.87-.371 1.775-.4 2.71.37.39.804 1.038 1.286 1.707-.31.23-.905.641-1.045.741-.41.292-.406.753-.114 1.015.161.144.492.084.613-.01.358-.285.656-.513 1.066-.77.15.393.292.748.43 1.086-.175.188-.3.436-.342.798-.135 1.172.979 2.092 1.918 2.36.035.01.06.014.094.023.05.076.095.147.148.224-.487.378-.82.765-1.049 1.063-.132.172-.28.43-.16.481.123.05.535 0 .719-.034.466-.09.826-.606 1.148-.796.387.534 1.017 1.22 1.672 1.88.029.12.055.246.088.351.125.403.293.804.495 1.196.471.22.962.402 1.464.561a8.344 8.344 0 0 0-.622.72zm.989.313c.155-.203.312-.454.505-.626.468.31.969.665 1.368.894-.615-.07-1.337-.085-1.873-.268zm3.113.31s-1.604-1.062-2.009-1.471c.803-.667 2.102-1.459 3.128-1.889.402.63 1.727 2.507 2.258 3.112-.963.168-2.31.294-3.377.248zM20.54 27.2c-.286.189-1.664.814-2.204.988a23.43 23.43 0 0 1-2.44-3.202c.844-.354 2.143-.67 3.346-.82.109.342.25.704.444 1.094.19.382.411.662.649.853.085-.053.164-.115.248-.17-.006.42-.018.846-.043 1.257zm-.33-21.477c-.27-.172-.607-.108-.467.193.053.117.259.314.427.512-.986-.272-3.608-.479-4.856-.364-.815-.916-1.744-2.028-2.861-2.765 4.999-.311 9.49 1.756 11.473 4.186-.661-.344-2.087-.834-2.667-.963-.313-.319-.708-.58-1.05-.8zm1.094 21.065c.023-.407.04-.922.053-1.396.487-.378.946-.79 1.37-1.238.547.063 1.094.156 1.427.24-.74.936-1.762 1.716-2.85 2.394zm3.825-3.724c-.12.253-.428.688-.633.894-.312-.126-.781-.258-1.272-.375.078-.094.163-.182.24-.279.268-1.796-.338-2.37.42-4.014l.172-.371c.418.118.812.247 1.153.386.043.616.04 2.728-.08 3.759zm-.708-4.917c.196-.407.412-.84.645-1.27.061.547.105 1.08.131 1.563a9.256 9.256 0 0 0-.776-.293zm2.218 1.126l-.194.756c-.137.515-.593 1.732-.832 2.223.091-.663.171-2.384.148-2.73.16.049.502-.147.559-.341.057-.195-.564-.495-.564-.495a20.742 20.742 0 0 0-.172-2.7c.142-.23.286-.452.434-.655a12.082 12.082 0 0 0-.186-1.575c.125.041.24.074.323.075.283.004.282-.19.192-.298-.058-.07-.328-.238-.643-.42a12.02 12.02 0 0 0-2.78-5.32c.533.202 1.214.48 1.754.774.41.516 1.585 1.675 2.212 4.92.564 2.922-.06 5.143-.251 5.786zM80.886 8.597v-.24h1.218v.24h-.468v1.191h-.283V8.597h-.467zm1.87-.24l.365 1.025.368-1.024h.406v1.43h-.262V8.634l-.396 1.154h-.229l-.4-1.154v1.154h-.261v-1.43h.409z" />`}</svg></a><div class="side margin-start-end-1-5" slot=logo></div><div class="esri-global-nav__title"><a aria-label=${this._translations.linkToArcGISSolutionsHomePage??m} class="esri-global-nav__logo-link" href=https://www.esri.com/en-us/arcgis/products/arcgis-solutions/overview @click=${()=>this._logLinkClickTelemetry("ArcGIS Solutions")} rel=noopener target=_blank title=${this._translations.linkToArcGISSolutionsHomePage??m}>${this._translations.arcgisSolutions}</a></div></div>`}_getSubHeading(){let t=this._cardType==="deployed"?this._translations.myDeployments:this._translations.allSolutions;return this._subNavigationCard?a`<calcite-navigation class="height-65" slot=navigation-secondary><calcite-menu class="height-65" label slot=content-start><calcite-menu-item breadcrumb .label=${t} @click=${this._navigateFromSubMenu} @keydown=${e=>h(e,()=>this._navigateFromSubMenu())} .text=${t} text-enabled></calcite-menu-item><calcite-menu-item label active .text=${this._subNavigationCard?.title} text-enabled></calcite-menu-item></calcite-menu></calcite-navigation>`:""}_getLogoFill(t){return t?"#FFFFFF":"#141414"}_handleMenuClick(t,e,i,s){i.forEach(n=>{n.value&&(this._isMobile?n.value.selected=!1:n.value.active=!1)}),e?.value&&(this._isMobile?e.value.selected=!0:e.value.active=!0),t!=="my-content"?this._activeTab=t:this._viewMyContent(),s&&this._logNavClickTelemetry(t),s&&this.navTabSelected.emit({tabType:t})}_logNavClickTelemetry(t){let e={"all-solutions":"Solutions",deployments:"Deployments","my-content":"My Content",resources:"Resources",details:void 0,"deployed-card":void 0}[t];e&&this._telemetry?.logEvent({category:_.GLOBAL_NAVIGATION,action:"Navigate",dimensions:[e]})}_logLinkClickTelemetry(t){this._telemetry?.logEvent({category:_.GLOBAL_NAVIGATION,action:"Navigate",dimensions:[t]})}_getUserAvatar(){let t=this._portal.user,e=this._authentication?.PortalUserSubset,i=t?.id??t?.sourceJSON?.id;return this._thumbnailUrl===""&&(this._thumbnailUrl=t?.thumbnailUrl??e?.thumbnailUrl??""),a`<div class="height-full display-flex cursor-pointer signin-padding"><calcite-navigation-user class="height-full" full-name=${t?.fullName??m} id=instant-apps-sign-in-user-button slot=user .thumbnail=${this._thumbnailUrl} .userId=${i} .username=${t?.username}></calcite-navigation-user></div><calcite-popover placement=bottom-end scale=s reference-element=instant-apps-sign-in-user-button offset-distance=0 pointer-disabled focus-trap-disabled auto-close .label=${this._translations.userSettings}><calcite-action scale=l @click=${this._viewMyContent} .text=${this._translations.myContent} text-enabled></calcite-action><calcite-action scale=l @click=${this._signOut} .text=${this._translations.signOut} text-enabled></calcite-action></calcite-popover>`}_viewMyContent(){let t=`${this._config?.portalURL}/home/content.html#my`;window.open(t,"_blank")}_signOut(){this._telemetry?.logEvent({category:_.GLOBAL_NAVIGATION,action:"Navigate",dimensions:["Sign out"]}),this._authentication?.signOut()}_handleSignIn(t){t.preventDefault(),this._telemetry?.logEvent({category:_.GLOBAL_NAVIGATION,action:"Navigate",dimensions:["Sign in"]}),this._authentication?.signIn().then(()=>{}).catch(e=>{console.error("Error creating global nav header:",e)})}_deployedCardSelected(t){this._cardType="deployed",this._subNavigationCard=t.detail.card}_detailsCardSelected(t){this._cardType="details",this._subNavigationCard=t.detail}_deployAppTabSelected(){this._subNavigationCard=void 0}_handleUrlChange(){this._subNavigationCard=void 0}_navigateFromSubMenu(){this._cardType==="details"?this._handleMenuClick("all-solutions",this._menuItemAll,[this._menuItemMy,this._menuItemResources],!0):this._cardType==="deployed"&&this._handleMenuClick("deployments",this._menuItemMy,[this._menuItemAll,this._menuItemResources],!0)}_updateThumbnailToken(t){this._thumbnailUrl!==""&&(this._thumbnailUrl=E(this._thumbnailUrl,t))}};f("solutions-deploy-app-nav",y);return{a:I,b:y}},"identity/IdentityManager","identity/OAuthInfo","portal/Portal",b)
|
|
2
|
+
import b from"./XBVKGREH.js";import{b as U}from"./PZ4L77M5.js";import{Eb as R,c as M,mb as A,ya as k}from"./JE7L7M3J.js";import{a as C}from"./HYX7BODW.js";import{g as d}from"./CGLFPVBM.js";import{b as f}from"./B2DK4LWH.js";import{F as l,G as c,H as S,L as m,h as v,i as a,j as w,r as u}from"./46DQNAMV.js";export default $arcgis.t(([p,z,G,{B:T,D:O,L:h,a:$,i:E,s:_}])=>{var b=class{constructor(t,e,i,s){this._credential=void 0,this._isEnterprise=!1,this._locale="en",this._portalSubset=void 0,this._portalUserSubset=void 0,this._arcGISOnlineReachable=!0,this._searchArcGISOnlineEnabled=!0,this._signInParam=void 0,this._clientId=t??"",this._locale=i??"en",this._portalUrl=e??"https://www.arcgis.com",this._portalRestUrl=this._portalUrl+"/sharing/rest",this._portalUrl=location.origin.endsWith(".arcgis.com")?window.location.origin:this._portalUrl,this._signInParam=s;let n=new z({appId:this._clientId,locale:this._locale,popup:!1,portalUrl:this._portalUrl,preserveUrlHash:!0});try{p.registerOAuthInfos([n])}catch(o){console.log(o)}this._portal=new G({url:this._portalUrl})}get Credential(){return this._credential}get IsEnterprisePortal(){return this._isEnterprise}get IsSignedIn(){return!!this._credential}get Portal(){return this._portal}get PortalSubset(){return this._portalSubset}get PortalUrl(){return this._portalUrl}get PortalUserOrg(){return this._portalSubset&&this._portalSubset.id}get PortalUserName(){return this._portalUserSubset&&this._portalUserSubset.username||""}get PortalUserSubset(){return this._portalUserSubset}get PortalUserPrivileges(){let t=[];return this._portalUserSubset?.privileges&&(t=this._portalUserSubset.privileges),t}get SignInParam(){return this._signInParam}get CanDeleteSolution(){return this.PortalUserPrivileges.includes("portal:admin:deleteItems")}get CanUpdateSolution(){return this.PortalUserPrivileges.includes("portal:admin:updateItems")}get CanUseAI(){let t=this._portalSubset?.orgSettings,e=this.PortalUserPrivileges.includes("portal:user:useAIAssistants");return t?.aiAssistantsEnabled?t.aiAssistantsEnabled&&!t.blockBetaApps&&e:!1}get CanViewOrg(){return this.PortalUserPrivileges.includes("portal:admin:viewItems")}get CanSearchArcGISOnline(){return this._searchArcGISOnlineEnabled&&this._arcGISOnlineReachable}async checkArcGISOnlineReachability(t){if(this._isEnterprise&&this._searchArcGISOnlineEnabled&&t){let e=`${T(this._portalUrl)}/sharing/rest`,i=new d({});try{await A({q:`group:${t} type:Solution`,num:1,start:1,authentication:i,portal:e}),this._arcGISOnlineReachable=!0}catch(s){this._arcGISOnlineReachable=!1,console.warn("ArcGIS Online solutions group not reachable:",s)}}}get RestUserSession(){let t=p.findServerInfo(this._portalRestUrl),e=this._credential?d.fromCredential(this._credential,t):this._isEnterprise?new d({}):new d({portal:this._portalRestUrl});return e.portal=this.PortalSubset?.restUrl?this.PortalSubset?.restUrl:e.portal,e.clientId=this._credential?._oAuthCred?.appId,e._refreshToken=this._credential?._oAuthCred?.refreshToken,e}async initialize(t=!1,e){try{await this._init(t,e)}catch{this.destroy()}return this}destroy(){this._credential=void 0,this._portalSubset=void 0,this._portalUserSubset=void 0,p.destroyCredentials()}async signIn(t=""){p.setOAuthRedirectionHandler(e=>{let i=e.authorizeParams.redirect_uri;if(t.length>0){let s=i.split("?"),n=s[0],o="",r=new URLSearchParams(s[1]||"");r.append("signInParam",t),o="?"+r.toString(),e.authorizeParams.redirect_uri=n+o}window.location.href=e.authorizeUrl+"?"+this._objectToQuery(e.authorizeParams)}),await p.getCredential((this._portalSubset?.portalUrl??this._portalUrl)+"/sharing").then(e=>{e&&window.location.reload()})}signOut(){let t=window.location.href,e=/[\/]\b([0-9A-Fa-f]){32}\b/g,i=t.match(e)?t.replace(e,""):t,s=`${this._portal?.restUrl??this._portalUrl+"/sharing/rest"}/oauth2/signout?client_id=${this._clientId}&redirect_uri=${encodeURIComponent(i)}`;this.destroy(),window.location.replace(s)}refreshSession(){let t=this.RestUserSession;if(!(!t||!this.IsSignedIn))return t.exchangeRefreshToken()}_getOrgUrl(t,e,i){return e&&i?window.location.protocol+"//"+e.toLowerCase()+"."+i:t}async _init(t=!1,e){try{this._credential=await p.checkSignInStatus(this._portalUrl+"/sharing")}catch(s){console.log(s)}try{let s=await p.checkAppAccess(this._portalUrl+"/sharing",this._clientId);(typeof s.valid<"u"&&!s.valid||s.viewOnlyUserTypeApp)&&window.location.replace(`error.html?error=blocked&locale=${this._locale}`),this._credential=s.credential}catch(s){s.name}this._searchArcGISOnlineEnabled=await this._checkSearchArcGISOnlineEnabled(t,this._portal.restUrl),this._portal.authMode=t?"immediate":"auto",await this._portal.load();let i=this._credential?await k(this.RestUserSession):{};return this._isEnterprise=this._portal.isPortal,await this.checkArcGISOnlineReachability(e),this._portalSubset={name:this._portal.name??"",id:this._portal.id??"",restUrl:this._portal.restUrl??"",portalUrl:this._portal.url??"",urlKey:this._portal.urlKey??"",hostName:this._portal.portalHostname??"",orgUrl:this._getOrgUrl(this._portal.url,this._portal.urlKey??"",this._portal.customBaseUrl??""),locationTrackingEnabled:this._portal.helperServices.hasOwnProperty("locationTracking"),hubPremiumEnabled:this._portal.portalProperties?.hub?.enabled||!1,workflowURL:this._portal.helperServices?.workflowManager?.url??this._portal.url,isReadOnly:this._portal.isReadOnly,orgSettings:i},this._portalUserSubset={fullName:this._portal.user?.fullName??"",username:this._portal.user?.username??"",culture:this._portal.user?.culture?.toLowerCase()||"en",thumbnailUrl:this._portal.user?.thumbnailUrl||this._portal.url+"/home/js/arcgisonline/css/images/no-user-thumb.jpg",orgId:this._portal.user?.orgId??"",privileges:this._portal.user.privileges,role:this._portal.user?.role??"",roleId:this._portal.user?.roleId??void 0},this._isEnterprise&&this._portalSubset&&(this._portalSubset.workflowURL=await R(this._portal.restUrl,this.RestUserSession||new d({}))),this._portal?.user?.roleId&&this._portalUserSubset&&(this._portalUserSubset.roleId=this._portal.user.roleId),this}async _checkSearchArcGISOnlineEnabled(t,e){if(t)try{let i=`${e}/portals/self/settings`,s=await M(i,{authentication:this._credential?this.RestUserSession:void 0});return s?.portalConfigProperties?.searchArcGISOnlineEnabled!==void 0?s.portalConfigProperties.searchArcGISOnlineEnabled:!1}catch(i){return console.warn("Failed to fetch portal settings:",i),!1}else return!0}_isSerializable(t){return t&&typeof t=="object"&&"toJSON"in t&&typeof t.toJSON=="function"}_objectToQuery(t,e){return t?e&&typeof e=="function"?Object.keys(t).map(i=>encodeURIComponent(i)+"="+encodeURIComponent(e(i,t[i]))).join("&"):Object.keys(t).map(i=>{let s=t[i];if(s==null)return"";let n=encodeURIComponent(i)+"=",o=e&&e[i];return o?n+encodeURIComponent(o(s)):Array.isArray(s)?s.map(r=>this._isSerializable(r)?n+encodeURIComponent(JSON.stringify(r)):n+encodeURIComponent(r)).join("&"):this._isSerializable(s)?n+encodeURIComponent(JSON.stringify(s)):n+encodeURIComponent(s)}).filter(i=>i).join("&"):""}};var I=class g{constructor(){this._telemetryInstance=void 0,this._logTelemetryEvents=!1}getInstance(){return this._telemetryInstance}isEnabled(){return this._logTelemetryEvents}setInstance(t){this._telemetryInstance=t}setEnabled(t){this._logTelemetryEvents=t}_mapDimensions(t){let e={};return t&&t.slice(0,20).forEach((i,s)=>{let n=`dimension${s+1}`;e[n]=i}),e}_mapMetrics(t){let e={};return t&&t.slice(0,20).forEach((i,s)=>{let n=`metric${s+1}`;e[n]=i}),e}logEvent(t){if(this._logTelemetryEvents&&this._telemetryInstance){let{category:e,action:i,dimensions:s,metrics:n,label:o="",details:r=""}=t,x=this._mapDimensions(s),P=this._mapMetrics(n);this._telemetryInstance.logEvent({category:e,action:i,label:o,details:r,...x,...P})}}getTelemetrySession(){return{instance:this._telemetryInstance,logEvent:t=>this.logEvent(t),enabled:this._logTelemetryEvents}}static getDisabledSession(){return{instance:void 0,logEvent:()=>{},enabled:!1}}async initializeTelemetry(t,e){if(!g.shouldEnableTelemetry(t,e))return this.getTelemetrySession();let i=document.querySelector("consent-manager");if(!i){if(!customElements.get("consent-manager"))return this.getTelemetrySession();i=document.createElement("consent-manager"),i.portal=t.Portal,i.measurementIds=e.measurementIds||[],i.firstUseVar=e.cookiesFirstUseVar;let s=g.getEnvironmentConfig(e,t);s&&(i.amazonUserPoolID=s?.amazon?.userPoolID,i.amazonAppId=s?.amazon?.app?.id,i.amazonAppName=e.telemetry?.name,i.amazonVersion=e.telemetry?.version);let n=t.Portal?.eueiEnabled;(localStorage.getItem(i.firstUseVar)==="true"||n)&&(this.setEnabled(!0),i.classList.add("display-none")),document.body.appendChild(i),n?(await new Promise(o=>setTimeout(o,100)),await this._setInstanceFromConsentManager(i)):window.addEventListener("consentGranted",o=>{o.detail?.granted&&(this.setEnabled(!0),this._setInstanceFromConsentManager(i))})}return this.getTelemetrySession()}async _setInstanceFromConsentManager(t){try{let e=new Promise((s,n)=>setTimeout(()=>n(new Error("Timeout waiting for consent-manager instance")),1e4)),i=await Promise.race([t.getInstance(),e]);this.setInstance(i)}catch{}}static shouldEnableTelemetry(t,e){let i=t?.IsEnterprisePortal,s=t?.Portal?.eueiEnabled;return s===!1||i?!1:!!((e.measurementIds||e.telemetry)&&(e.cookiesFirstUseVar||s))}static getEnvironmentConfig(t,e){if(!t.telemetry)return;let i=t.forceTrackingEnv||O(document.location.hostname,e?.Portal?.portalHostname||"");return i&&Object.keys(t.telemetry).includes(i)?t.telemetry[i]:void 0}},N=v`.esri-global-nav__title{margin-block-start:0;position:relative;margin-bottom:0;font-size:var(--calcite-font-size-xl);font-weight:var(--calcite-font-weight-medium);padding-inline-end:var(--calcite-spacing-xxl);align-self:center;height:100%;display:flex;align-items:center}.esri-global-nav__logo-link{color:var(--calcite-color-text-1);text-decoration:unset;margin-block-start:0px;position:relative;margin-bottom:0;align-self:center;height:100%;display:flex;align-items:center}.esri-global-nav__logo-link:focus{outline:2px solid var(--calcite-color-brand);outline-offset:-2px}.cursor-pointer{cursor:pointer}.side{border-right:solid 1px;color:var(--calcite-color-text-1);height:34px;align-self:center}.display-flex{display:flex}.align-self-center{align-self:center}.padding-top-1{padding-top:var(--calcite-spacing-lg)}.padding-end-1{padding-inline-end:var(--calcite-spacing-lg)}.padding-start-1{padding-inline-start:var(--calcite-spacing-lg)}.padding-bottom-1{padding-bottom:var(--calcite-spacing-lg)}.margin-start-end-1{margin-inline-start:var(--calcite-spacing-lg);margin-inline-end:var(--calcite-spacing-lg)}.margin-start-end-1-5{margin-inline-start:var(--calcite-spacing-xxl);margin-inline-end:var(--calcite-spacing-xxl)}.height-full{height:100%}.user-label{--calcite-label-margin-bottom: 0px}.font-bold{font-weight:var(--calcite-font-weight-bold)}.font-normal{font-weight:var(--calcite-font-weight-normal)}.logo-padding{padding-inline-start:var(--calcite-spacing-none);height:100%}@media(max-width:800px){.logo-padding{padding-inline-start:var(--calcite-spacing-lg)}}.signin-padding{padding-inline-end:var(--calcite-spacing-none)}@media(max-width:800px){.signin-padding{padding-inline-end:var(--calcite-spacing-lg)}}calcite-action{--calcite-font-size-0: var(--calcite-font-size--1);--calcite-internal-action-padding-inline: var(--calcite-spacing-lg)}calcite-navigation{--calcite-color-border-3: transparent}.border-bottom{border-bottom-color:var(--calcite-color-border-1);border-bottom-width:var(--calcite-spacing-px);border-bottom-style:solid}.border{height:var(--calcite-spacing-px);border-bottom-color:var(--calcite-color-border-3);border-bottom-style:solid;border-bottom-width:var(--calcite-border-width-sm);box-sizing:border-box;position:absolute;top:65px;left:0;width:100%;z-index:1}.height-65{height:65px}`,y=class extends S{constructor(){super(),this._isMobile=!1,this._logoFill="",this._thumbnailUrl="",this._translations=C({name:"solutions-deploy-app-nav",blocking:!0}),this._activeTab="all-solutions",this._authentication=void 0,this._cardType="details",this._dropdownRef=l(),this._dropdownItemAll=l(),this._dropdownItemMy=l(),this._dropdownItemMyContent=l(),this._dropdownItemResources=l(),this._isMobileContextConsumer=U({context:$,subscribe:!0,callback:t=>this._isMobile=t}),this._menuRef=l(),this._menuItemAll=l(),this._menuItemMy=l(),this._menuItemResources=l(),this.authInit=u(),this.navTabSelected=u(),this.tabChanged=u(),this.tokenRefreshed=u(),this.listenOn(window,"deployedCardSelected",this._deployedCardSelected),this.listenOn(window,"detailsCardSelected",this._detailsCardSelected),this.listenOn(window,"deployAppTabSelected",this._deployAppTabSelected),this.listenOn(window,"popstate",this._handleUrlChange),this.listenOn(window,"sessionRefreshed",t=>{this._updateThumbnailToken(t.detail)})}static{this.properties={appConfig:1,initTab:1,_subNavigationCard:16,_isMobile:16,_logoFill:16,_thumbnailUrl:16,_translations:16}}static{this.styles=N}get _telemetry(){return this._config?.telemetrySession}clearMenuItems(){this._isMobile?(this._dropdownItemAll.value.selected=!1,this._authentication?.IsSignedIn&&(this._dropdownItemMy.value.selected=!1),this._dropdownItemResources.value.selected=!1):(this._menuItemAll.value.active=!1,this._authentication?.IsSignedIn&&(this._menuItemMy.value.active=!1),this._menuItemResources.value.active=!1)}activateMenuItem(t,e=!1){let i,s;switch(t){case"all-solutions":i=this._isMobile?this._dropdownItemAll:this._menuItemAll,s=this._isMobile?[this._dropdownItemMy,this._dropdownItemResources]:[this._menuItemMy,this._menuItemResources];break;case"deployments":i=this._isMobile?this._dropdownItemMy:this._menuItemMy,s=this._isMobile?[this._dropdownItemAll,this._dropdownItemResources]:[this._menuItemAll,this._menuItemResources];break;case"resources":i=this._isMobile?this._dropdownItemResources:this._menuItemResources,s=this._isMobile?[this._dropdownItemAll,this._dropdownItemMy]:[this._menuItemAll,this._menuItemMy];break;case"my-content":this._isMobile&&(i=this._dropdownItemMyContent,s=[this._dropdownItemAll,this._dropdownItemMy,this._dropdownItemResources]);break}i&&s&&this._handleMenuClick(t,i,s,e)}async connectedCallback(){super.connectedCallback();let t=new d({username:"",password:""});this._userSession=t}async load(){let t=window.matchMedia("(prefers-color-scheme: dark)");t.addEventListener("change",r=>this._logoFill=this._getLogoFill(r.matches)),this._logoFill=this._getLogoFill(t.matches),this._isMobileContextConsumer.value&&(this._isMobile=this._isMobileContextConsumer.value);let e=this.appConfig.locale||"en",i=this.appConfig.authentication?.PortalSubset?.orgUrl||this.appConfig.orgURL||this.appConfig.portalURL,s=this.appConfig.authentication?.PortalUrl||this.appConfig.portalURL,n=this.appConfig.primarySolutionsGroupId,o=!1;this._authentication||(this.appConfig.authentication?this._authentication=this.appConfig.authentication:(this._authentication=new b(this.appConfig.appId,this.appConfig.portalURL,this.appConfig.locale),await this._authentication.initialize(this.appConfig.isEnterprise,this.appConfig.agoBasedEnterpriseSolutionsGroupId),o=!0)),o||await this._authentication?.checkArcGISOnlineReachability(this.appConfig.agoBasedEnterpriseSolutionsGroupId),this._authentication.RestUserSession&&(this._userSession=this._authentication.RestUserSession),this.initTab&&(this._activeTab=this.initTab,this.initTab=void 0),this._config={anonAgolSession:void 0,agolPortalUrl:"",allCards:[],appId:this.appConfig.appId,authentication:this._authentication,agoBasedEnterpriseSolutionsGroupId:this.appConfig.agoBasedEnterpriseSolutionsGroupId,diagramKey:this.appConfig.diagramKey,isEnterprise:this.appConfig.isEnterprise,locale:e,orgUrl:i,portalURL:s,primarySolutionsGroupId:n,userSession:this._userSession,telemetrySession:I.getDisabledSession(),cookiesFirstUseVar:this.appConfig.cookiesFirstUseVar,trackingEnabled:this.appConfig.trackingEnabled,forceTrackingEnv:this.appConfig.forceTrackingEnv,telemetry:this.appConfig.telemetry,measurementIds:this.appConfig.measurementIds},this.authInit.emit(this._config),this._portal=await this._userSession?.getPortal()}render(){return a`<div><calcite-navigation>${this._getHeading()}${this._isMobile?this._getDropdown():this._getMenu()}${this._isMobile?"":this._getSignInOut()}</calcite-navigation><div class="border" slot=header></div>${!this._isMobile&&this._getSubHeading()||""}</div>`}updated(t){t.has("_isMobile")&&t.get("_isMobile")!==void 0&&this.activateMenuItem(this._activeTab,!0)}_getSignInOut(){return this._authentication?.IsSignedIn?a`<div slot=user>${this._getUserAvatar()}</div>`:a`<calcite-menu label slot=content-end><calcite-menu-item label @click=${this._handleSignIn} @keydown=${t=>h(t,()=>this._handleSignIn(t))} .text=${this._translations.signIn}></calcite-menu-item></calcite-menu>`}_getDropdown(){let t=this._authentication?.IsSignedIn?this._translations.signOut:this._translations.signIn;return a`<calcite-dropdown overlay-positioning=fixed slot=content-end width=m ${c(this._dropdownRef)}><calcite-button appearance=transparent icon-start=hamburger kind=neutral slot=trigger scale=l></calcite-button><calcite-dropdown-group><calcite-dropdown-item @click=${()=>this._handleMenuClick("all-solutions",this._dropdownItemAll,[this._dropdownItemMy,this._dropdownItemResources,this._dropdownItemMyContent],!0)} @keydown=${e=>h(e,()=>this._handleMenuClick("all-solutions",this._dropdownItemAll,[this._dropdownItemMy,this._dropdownItemResources,this._dropdownItemMyContent],!0))} ${c(this._dropdownItemAll)}>${this._translations.allSolutions}</calcite-dropdown-item><calcite-dropdown-item @click=${()=>this._handleMenuClick("deployments",this._dropdownItemMy,[this._dropdownItemAll,this._dropdownItemResources,this._dropdownItemMyContent],!0)} @keydown=${e=>h(e,()=>this._handleMenuClick("deployments",this._dropdownItemMy,[this._dropdownItemAll,this._dropdownItemResources,this._dropdownItemMyContent],!0))} ${c(this._dropdownItemMy)}>${this._translations.myDeployments}</calcite-dropdown-item>${this._authentication?.CanSearchArcGISOnline&&a`<calcite-dropdown-item @click=${()=>this._handleMenuClick("resources",this._dropdownItemResources,[this._dropdownItemAll,this._dropdownItemMy,this._dropdownItemMyContent],!0)} @keydown=${e=>h(e,()=>this._handleMenuClick("resources",this._dropdownItemResources,[this._dropdownItemAll,this._dropdownItemMy,this._dropdownItemMyContent],!0))} ${c(this._dropdownItemResources)}>${this._translations.solutionResources}</calcite-dropdown-item>`||""}<calcite-dropdown-item @click=${()=>{let e=this._activeTab==="all-solutions"?this._dropdownItemAll:this._activeTab==="deployments"?this._dropdownItemMy:this._activeTab==="resources"?this._dropdownItemResources:void 0;setTimeout(()=>this._handleMenuClick("my-content",e,[this._dropdownItemAll,this._dropdownItemMy,this._dropdownItemResources,this._dropdownItemMyContent],!1),10)}} ${c(this._dropdownItemMyContent)}>${this._translations.myContent}</calcite-dropdown-item><calcite-dropdown-item @click=${e=>{this._authentication?.IsSignedIn?this._signOut():this._handleSignIn(e)}}>${t}</calcite-dropdown-item></calcite-dropdown-group></calcite-dropdown>`}_getMenu(){return a`<calcite-menu label slot=content-start ${c(this._menuRef)}><calcite-menu-item label @click=${()=>this._handleMenuClick("all-solutions",this._menuItemAll,[this._menuItemMy,this._menuItemResources],!0)} @keydown=${t=>h(t,()=>this._handleMenuClick("all-solutions",this._menuItemAll,[this._menuItemMy,this._menuItemResources],!0))} .text=${this._translations.allSolutions} ${c(this._menuItemAll)}></calcite-menu-item><calcite-menu-item label @click=${()=>this._handleMenuClick("deployments",this._menuItemMy,[this._menuItemAll,this._menuItemResources],!0)} @keydown=${t=>h(t,()=>this._handleMenuClick("deployments",this._menuItemMy,[this._menuItemAll,this._menuItemResources],!0))} .text=${this._translations.myDeployments} ${c(this._menuItemMy)}></calcite-menu-item>${this._authentication?.CanSearchArcGISOnline&&a`<calcite-menu-item label @click=${()=>this._handleMenuClick("resources",this._menuItemResources,[this._menuItemAll,this._menuItemMy],!0)} @keydown=${t=>h(t,()=>this._handleMenuClick("resources",this._menuItemResources,[this._menuItemAll,this._menuItemMy],!0))} .text=${this._translations.solutionResources} ${c(this._menuItemResources)}></calcite-menu-item>`||""}</calcite-menu>`}_getHeading(){return a`<div class="align-self-center display-flex cursor-pointer logo-padding" slot=logo><a aria-label=${this._translations.linkToEsriHomePage??m} class="esri-global-nav__logo-link" href=https://www.esri.com @click=${()=>this._logLinkClickTelemetry("Esri")} rel=noopener target=_blank title=${this._translations.linkToEsriHomePage??m}><svg height=30 viewBox="0 0 84 30" width=84 xmlns=http://www.w3.org/2000/svg>${w`<path fill=${this._logoFill??m} d="M77.277.5c-1.48 0-2.554 1.175-2.554 2.488 0 1.314 1.074 2.49 2.554 2.49 1.48 0 2.622-1.071 2.622-2.49C79.899 1.572 78.756.5 77.277.5zm-1.913 23.426h3.891V8.353h-3.891v15.573zM40.515 7.965c-4.702 0-8.465 3.275-8.465 8.174 0 4.898 3.763 8.177 8.465 8.177 2.146 0 4.165-.667 5.852-2.31l-2.457-2.457c-.916.964-2.093 1.651-3.78 1.651-2.175 0-3.927-1.397-4.188-3.698h11.875v-1.07c0-5.42-2.95-8.467-7.302-8.467zm-4.573 6.617c.293-2.24 1.721-3.7 4.023-3.7 2.434 0 3.926 1.43 3.96 3.7h-7.983zm17.305-1.849c0-1.169 1.233-1.655 2.273-1.655 1.32 0 2.292.547 3.037 1.577l2.476-2.474c-1.282-1.6-3.407-2.216-5.418-2.216-3.147 0-6.262 1.555-6.262 5.028 0 5.938 8.403 3.406 8.403 6.617 0 1.233-1.46 1.784-2.595 1.784-1.65 0-2.687-.806-3.69-1.905l-2.515 2.514c1.58 1.711 3.62 2.313 5.978 2.313 3.179 0 6.717-1.299 6.717-4.998 0-6.067-8.404-3.795-8.404-6.585zm14.15-1.916h-.062V8.353h-3.892v15.573h3.892v-8.34c0-.842.518-3.925 4.185-3.925.564 0 1.127.112 1.718.253l.152-3.726c-.45-.127-.901-.223-1.382-.223-2.046 0-3.766 1.07-4.61 2.852zM14.683 2.766c-1.217-.037-1.932.12-2.651.26-.216-.056-.62.003-.643.472 0 .252.08.447.24.562.159.114 1.493 1.1 2.473 2.142-.47.052-.98.138-1.504.246-.585-1.264-2.465-.114-3.714-.064-.146.006-.286.025-.431.035-.137-1.056-.235-2.15-.21-2.92 1.618-.917 4.748-1.593 6.874-1.626l.373-.01c.312-.003.337-.251.043-.291-2.641-.361-4.929.173-7.279 1.145C5.808 3.748 2.696 6.12.8 10.596c-.444 1.247-2.219 7.195.935 12.3 2.56 4.142 5.855 6.113 9.887 6.676 4.024.561 6.207.075 8.752-1.055 5.951-2.642 10.496-12.559 5.95-19.747-1.794-3.319-6.495-6.229-11.641-6.004zm-2.259 4.647a17.754 17.754 0 0 1 2.362-.368 15.741 15.741 0 0 1 1.748 2.54c-.805.39-1.878.688-2.315 1.312-.181.26-.226.613-.232.995a23.59 23.59 0 0 0-3.877 1.286c-.453-1.332-.85-2.66-1.124-3.842 1.296-1.237 2.813-1.438 3.438-1.923zm6.61 15.88c-.354.038-.706.083-1.016.13-.77.121-1.762.379-2.685.723-.53-.843-1.95-2.891-2.667-4.437 1.442-.709 3.457-1.303 5.775-1.444.19.33.4.66.69.956.757.774-.44 1.883-.096 4.072zm-8.603-9.14c1.12-.53 2.3-.968 3.56-1.286-.008.333-.045.649-.182.903-.196.366-.106 1.428.134 1.775.755 1.099 2.008.488 2.951.883.433.181.721.482.964.84-1.974.124-3.91.584-5.706 1.41-.923-1.96-1.72-4.524-1.72-4.524zm.832 4.938c-.07.033-.145.074-.217.11a40.803 40.803 0 0 0-3.256-.78c-.995-.204-1.031-.15-2.151.175-.16.046-.313.088-.462.133a36.17 36.17 0 0 1-.445-1.202c1.436-1.106 2.884-2.034 4.821-2.985.5 1.491 1.215 3.483 1.71 4.549zm.768 4.528c.293-.765.521-1.331.605-1.89.569.958 1.248 2 1.774 2.815-.819.397-1.772 1.01-2.672 1.685.062-1.037.083-2.064.293-2.61zm5.334-14.636c-.01.014-.028.026-.04.04a23.057 23.057 0 0 0-1.376-2.111c1.007-.061 2.246-.008 3.374.108-1.014.363-1.461 1.254-1.958 1.963zm-9.028 1.094c.019-.026.039-.047.057-.072.234 1.182.513 2.16.886 3.518-1.402.618-3.881 2.148-4.976 2.972-.198-.502-.404-1.214-.589-1.946.249-.737.758-1.254 1.476-1.325 1.228-.123 2.28-1.95 3.146-3.147zm-5.41-1.784C4.24 6.455 6.023 4.666 7.65 3.773c-.016.4.086 1.567.218 2.693-.57.057-1.134.128-1.692.211a12.084 12.084 0 0 0-3.115 4.088c-.117-1.054-.178-1.933-.133-2.472zM2.07 9.731s.062 1.06.113 1.833c0 0-.781.886-1.18 1.59.159-1.443.498-2.187 1.067-3.423zm7.664 18.356C5.688 26.82 2.69 23.41 1.62 19.834a17.475 17.475 0 0 1-.651-6.473c.056.01.186.072.38.017.135-.093.616-.43.957-.728l.018.131c-.23.87-.371 1.775-.4 2.71.37.39.804 1.038 1.286 1.707-.31.23-.905.641-1.045.741-.41.292-.406.753-.114 1.015.161.144.492.084.613-.01.358-.285.656-.513 1.066-.77.15.393.292.748.43 1.086-.175.188-.3.436-.342.798-.135 1.172.979 2.092 1.918 2.36.035.01.06.014.094.023.05.076.095.147.148.224-.487.378-.82.765-1.049 1.063-.132.172-.28.43-.16.481.123.05.535 0 .719-.034.466-.09.826-.606 1.148-.796.387.534 1.017 1.22 1.672 1.88.029.12.055.246.088.351.125.403.293.804.495 1.196.471.22.962.402 1.464.561a8.344 8.344 0 0 0-.622.72zm.989.313c.155-.203.312-.454.505-.626.468.31.969.665 1.368.894-.615-.07-1.337-.085-1.873-.268zm3.113.31s-1.604-1.062-2.009-1.471c.803-.667 2.102-1.459 3.128-1.889.402.63 1.727 2.507 2.258 3.112-.963.168-2.31.294-3.377.248zM20.54 27.2c-.286.189-1.664.814-2.204.988a23.43 23.43 0 0 1-2.44-3.202c.844-.354 2.143-.67 3.346-.82.109.342.25.704.444 1.094.19.382.411.662.649.853.085-.053.164-.115.248-.17-.006.42-.018.846-.043 1.257zm-.33-21.477c-.27-.172-.607-.108-.467.193.053.117.259.314.427.512-.986-.272-3.608-.479-4.856-.364-.815-.916-1.744-2.028-2.861-2.765 4.999-.311 9.49 1.756 11.473 4.186-.661-.344-2.087-.834-2.667-.963-.313-.319-.708-.58-1.05-.8zm1.094 21.065c.023-.407.04-.922.053-1.396.487-.378.946-.79 1.37-1.238.547.063 1.094.156 1.427.24-.74.936-1.762 1.716-2.85 2.394zm3.825-3.724c-.12.253-.428.688-.633.894-.312-.126-.781-.258-1.272-.375.078-.094.163-.182.24-.279.268-1.796-.338-2.37.42-4.014l.172-.371c.418.118.812.247 1.153.386.043.616.04 2.728-.08 3.759zm-.708-4.917c.196-.407.412-.84.645-1.27.061.547.105 1.08.131 1.563a9.256 9.256 0 0 0-.776-.293zm2.218 1.126l-.194.756c-.137.515-.593 1.732-.832 2.223.091-.663.171-2.384.148-2.73.16.049.502-.147.559-.341.057-.195-.564-.495-.564-.495a20.742 20.742 0 0 0-.172-2.7c.142-.23.286-.452.434-.655a12.082 12.082 0 0 0-.186-1.575c.125.041.24.074.323.075.283.004.282-.19.192-.298-.058-.07-.328-.238-.643-.42a12.02 12.02 0 0 0-2.78-5.32c.533.202 1.214.48 1.754.774.41.516 1.585 1.675 2.212 4.92.564 2.922-.06 5.143-.251 5.786zM80.886 8.597v-.24h1.218v.24h-.468v1.191h-.283V8.597h-.467zm1.87-.24l.365 1.025.368-1.024h.406v1.43h-.262V8.634l-.396 1.154h-.229l-.4-1.154v1.154h-.261v-1.43h.409z" />`}</svg></a><div class="side margin-start-end-1-5" slot=logo></div><div class="esri-global-nav__title"><a aria-label=${this._translations.linkToArcGISSolutionsHomePage??m} class="esri-global-nav__logo-link" href=https://www.esri.com/en-us/arcgis/products/arcgis-solutions/overview @click=${()=>this._logLinkClickTelemetry("ArcGIS Solutions")} rel=noopener target=_blank title=${this._translations.linkToArcGISSolutionsHomePage??m}>${this._translations.arcgisSolutions}</a></div></div>`}_getSubHeading(){let t=this._cardType==="deployed"?this._translations.myDeployments:this._translations.allSolutions;return this._subNavigationCard?a`<calcite-navigation class="height-65" slot=navigation-secondary><calcite-menu class="height-65" label slot=content-start><calcite-menu-item breadcrumb .label=${t} @click=${this._navigateFromSubMenu} @keydown=${e=>h(e,()=>this._navigateFromSubMenu())} .text=${t} text-enabled></calcite-menu-item><calcite-menu-item label active .text=${this._subNavigationCard?.title} text-enabled></calcite-menu-item></calcite-menu></calcite-navigation>`:""}_getLogoFill(t){return t?"#FFFFFF":"#141414"}_handleMenuClick(t,e,i,s){i.forEach(n=>{n.value&&(this._isMobile?n.value.selected=!1:n.value.active=!1)}),e?.value&&(this._isMobile?e.value.selected=!0:e.value.active=!0),t!=="my-content"?this._activeTab=t:this._viewMyContent(),s&&this._logNavClickTelemetry(t),s&&this.navTabSelected.emit({tabType:t})}_logNavClickTelemetry(t){let e={"all-solutions":"Solutions",deployments:"Deployments","my-content":"My Content",resources:"Resources",details:void 0,"deployed-card":void 0}[t];e&&this._telemetry?.logEvent({category:_.GLOBAL_NAVIGATION,action:"Navigate",dimensions:[e]})}_logLinkClickTelemetry(t){this._telemetry?.logEvent({category:_.GLOBAL_NAVIGATION,action:"Navigate",dimensions:[t]})}_getUserAvatar(){let t=this._portal.user,e=this._authentication?.PortalUserSubset,i=t?.id??t?.sourceJSON?.id;return this._thumbnailUrl===""&&(this._thumbnailUrl=t?.thumbnailUrl??e?.thumbnailUrl??""),a`<div class="height-full display-flex cursor-pointer signin-padding"><calcite-navigation-user class="height-full" full-name=${t?.fullName??m} id=instant-apps-sign-in-user-button slot=user .thumbnail=${this._thumbnailUrl} .userId=${i} .username=${t?.username}></calcite-navigation-user></div><calcite-popover placement=bottom-end scale=s reference-element=instant-apps-sign-in-user-button offset-distance=0 pointer-disabled focus-trap-disabled auto-close .label=${this._translations.userSettings}><calcite-action scale=l @click=${this._viewMyContent} .text=${this._translations.myContent} text-enabled></calcite-action><calcite-action scale=l @click=${this._signOut} .text=${this._translations.signOut} text-enabled></calcite-action></calcite-popover>`}_viewMyContent(){let t=`${this._config?.portalURL}/home/content.html#my`;window.open(t,"_blank")}_signOut(){this._telemetry?.logEvent({category:_.GLOBAL_NAVIGATION,action:"Navigate",dimensions:["Sign out"]}),this._authentication?.signOut()}_handleSignIn(t){t.preventDefault(),this._telemetry?.logEvent({category:_.GLOBAL_NAVIGATION,action:"Navigate",dimensions:["Sign in"]}),this._authentication?.signIn().then(()=>{}).catch(e=>{console.error("Error creating global nav header:",e)})}_deployedCardSelected(t){this._cardType="deployed",this._subNavigationCard=t.detail.card}_detailsCardSelected(t){this._cardType="details",this._subNavigationCard=t.detail}_deployAppTabSelected(){this._subNavigationCard=void 0}_handleUrlChange(){this._subNavigationCard=void 0}_navigateFromSubMenu(){this._cardType==="details"?this._handleMenuClick("all-solutions",this._menuItemAll,[this._menuItemMy,this._menuItemResources],!0):this._cardType==="deployed"&&this._handleMenuClick("deployments",this._menuItemMy,[this._menuItemAll,this._menuItemResources],!0)}_updateThumbnailToken(t){this._thumbnailUrl!==""&&(this._thumbnailUrl=E(this._thumbnailUrl,t))}};f("solutions-deploy-app-nav",y);return{a:I,b:y}},"identity/IdentityManager","identity/OAuthInfo","portal/Portal",b)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
|
|
2
|
-
import g from"./BXXSHO4P.js";import e from"./OI3ISQWM.js";import a from"./PEBFXPSL.js";import{b as d}from"./PZ4L77M5.js";import{a as b}from"./Z73DPA3J.js";import{b as f}from"./7JVIFSRF.js";import{H as m,J as u,L as c,h,i,r as o}from"./46DQNAMV.js";export default $arcgis.t(([{a:x,b:v,c:_,e:w,i:y,s:n},{a:$},{d:g,h:C,i:D}])=>{var k=h`.negative-tabbing-offset[tabindex]:focus-visible{outline:2px solid var(--calcite-color-brand);outline-offset:-2px}.tabbing-offset[tabindex]:focus-visible{outline:2px solid var(--calcite-color-brand);outline-offset:2px}.font-weight-med{font-weight:var(--calcite-font-weight-medium)}.font-weight-bold{font-weight:var(--calcite-font-weight-bold)}.heading-font{font-size:var(--calcite-font-size-0);font-weight:var(--calcite-font-weight-medium)}.title-font{font-size:1.8rem;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-1)}.font-1{font-size:var(--calcite-spacing-lg)}.display-flex{display:flex}.display-none{display:none}.flex-direction-column{flex-direction:column}.flex-direction-row{flex-direction:row}@media(min-width:801px){.font-size-override .display-flex.flex-direction-row>.image-width+.display-flex{flex:1;min-width:0}}.icon-color{color:var(--calcite-color-text-3)}.padding-bottom-lg{padding-bottom:var(--calcite-spacing-lg)}.item-padding{--calcite-internal-accordion-item-padding: var(--calcite-spacing-xl)}.align-items-center{align-items:center}.align-items-start{align-items:start}.font-size-override{--calcite-font-size--2: var(--calcite-font-size--1)}.background-color-1{background-color:var(--calcite-color-foreground-1)}.background-color-2{background-color:var(--calcite-color-foreground-2)}.label-override{--calcite-label-margin-bottom: var(--calcite-spacing-none)}.position-relative{position:relative}.overflow-hidden{overflow:hidden}.overflow-auto{overflow:auto}.margin-block-start-end-0{margin-block-start:var(--calcite-spacing-none);margin-block-end:var(--calcite-spacing-none)}.panel-background-2{--calcite-panel-background-color: var(--calcite-color-foreground-2);background-color:var(--calcite-color-foreground-2)}.panel-background-1{--calcite-panel-background-color: var(--calcite-color-foreground-1);--calcite-shell-panel-background-color: var(--calcite-color-foreground-1)}.border-none{border:none}.font-color-1{color:var(--calcite-color-text-1)}.panel-bg-color{--calcite-panel-header-background-color: var(--calcite-color-foreground-1);--calcite-panel-background-color: var(--calcite-color-foreground-1)}.dialog-y-size{--calcite-dialog-size-y: 90% }.dialog-x-size{--calcite-dialog-size-x: 90% }.bottom-border{border-bottom:solid var(--calcite-spacing-px);color:var(--calcite-color-border-1)}.margin-start-end-xxl{margin-inline-start:var(--calcite-spacing-xxl);margin-inline-end:var(--calcite-spacing-xxl)}.margin-start-end-lg{margin-inline-start:var(--calcite-spacing-lg);margin-inline-end:var(--calcite-spacing-lg)}.margin-top-xxl{margin-top:var(--calcite-spacing-xxl)}.justify-between{justify-content:space-between}.items-baseline{align-items:baseline}.padding-xxl{padding:var(--calcite-spacing-xxl)}.padding-lg{padding:var(--calcite-spacing-lg)}.padding-top-xxl{padding-top:var(--calcite-spacing-xxl)}.padding-top-lg{padding-top:var(--calcite-spacing-lg)}.padding-bottom-xxl{padding-bottom:var(--calcite-spacing-xxl)}.padding-end-1{padding-inline-end:var(--calcite-spacing-lg)}.padding-end-xxl{padding-inline-end:var(--calcite-spacing-xxl)}.padding-start-sm{padding-inline-start:var(--calcite-spacing-sm)}.padding-start-xxl{padding-inline-start:var(--calcite-spacing-xxl)}.image-width{width:300px;flex-grow:0;flex-shrink:0}@media(max-width:1280px){.image-width{flex-grow:0;flex-shrink:1}}img{max-width:100%;height:auto;overflow-clip-margin:content-box;overflow:clip;display:block}.margin-xl{margin:var(--calcite-spacing-xl)}.line-height-1{line-height:1.1}.line-height-xxl{line-height:var(--calcite-line-height-xxl)}@media(max-width:800px){.font-size-override .display-flex.flex-direction-row{flex-direction:column!important}.image-width{width:100%!important;max-width:100%!important;margin:0!important;padding:var(--calcite-spacing-lg)!important;padding-bottom:0!important;box-sizing:border-box}.image-width img{width:100%;max-width:100%}.margin-xl{margin:0!important}.image-width+.display-flex{padding-inline-start:var(--calcite-spacing-lg)!important;padding-inline-end:var(--calcite-spacing-lg)!important}.padding-start-sm{padding-inline-start:0!important}.title-font{padding-inline-start:0!important;padding-top:var(--calcite-spacing-lg)!important;padding-bottom:var(--calcite-spacing-lg)!important}.align-items-start.padding-bottom-xxl,.padding-bottom-xxl.padding-start-sm{padding-bottom:var(--calcite-spacing-lg)!important}}calcite-shell-panel{--calcite-shell-panel-max-width: 20rem;--calcite-shell-panel-width: 24vw}calcite-shell{block-size:unset}.solution-deployed-action{--calcite-color-focus: initial}`,p=class extends m{constructor(){super(),this.diagramKey="",this.open=!1,this.templateInfos=[],this._accordionLoading=!1,this._configureTitlesOpen=!1,this._deleteDialogOpen=!1,this._hasNewVersion=!1,this._isDiagramOpen=!1,this._isNameConflict=!1,this._invalidNameMessage="",this._showSuccessAlert=!1,this._showFailedAlert=!1,this._showItemUpdateLoading=!1,this.isMobile=!1,this._templateInfoGraph=[],this._thumbnailUrl="",this._translations=b({name:"solution-deployed-card-panel",blocking:!0}),this._configContextConsumer=d({context:v,subscribe:!0,callback:async e=>{e&&(this._isOrgAdmin=w(e.authentication),this._user=e.authentication?.Portal?.user)}}),this._isOrgAdmin=!1,this._isMobileContextConsumer=d({context:x,subscribe:!0,callback:e=>this.isMobile=e}),this.navTabSelected=o(),this.forceSelectTab=o(),this.sortTypeChanged=o(),this.solutionConfigureDialogClose=o(),this._nonSolutionDependencyItems=[],this.listenOn(window,"deployedCardSelected",this._deployedCardSelected),this.listenOn(window,"deployAppTabSelected",this._handleDeployAppTabSelected),this.listenOn(window,"displayDeployedCard",()=>{this._showSuccessAlert=!0}),this.listenOn(window,"sessionRefreshed",e=>{this._updateThumbnailToken(e.detail)})}static{this.properties={card:0,cardRef:1,diagramKey:1,open:5,templateInfos:0,_accordionLoading:16,_configureTitlesOpen:16,_deleteDialogOpen:16,_hasNewVersion:16,_isDiagramOpen:16,_isNameConflict:16,_invalidNameMessage:16,_showSuccessAlert:16,_showFailedAlert:16,_showItemUpdateLoading:16,isMobile:16,_templateInfoGraph:16,_thumbnailUrl:16,_translations:16,_nonSolutionDependencyItems:16}}static{this.styles=k}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}async load(){if(this._isMobileContextConsumer.value&&(this.isMobile=this._isMobileContextConsumer.value),this.card?.thumbnailUrl){let e=this._configContextConsumer.value?.userSession,t=this.card?.thumbnailUrl.replace(/w=\d+/,"w=400");this._thumbnailUrl=`${t}&token=${e?.token}`}}willUpdate(e){if(e.has("card")){let t=this._configContextConsumer.value?.userSession,a=this.card?.thumbnailUrl.replace(/w=\d+/,"w=400");this._thumbnailUrl=`${a}&token=${t?.token}`}}render(){return this.isMobile?i`<calcite-shell class="position-relative background-color-2"><calcite-panel class="panel-background-2 border-none" slot=panel-bottom><div class="background-color-2 padding-top-lg">${this._getSolutionPanel()}</div><div class="background-color-1 margin-top-xxl">${this._getButtons()}${this._getOwnerSection()}<div class="bottom-border margin-start-end-xxl"></div>${this._getSolutionVersionCard()}</div>${this._getSolutionContents()}</calcite-panel></calcite-shell>`:i`<calcite-shell class="position-relative background-color-2"><calcite-panel class="padding-end-xxl panel-background-2 border-none" slot=panel-bottom><div class="display-flex flex-direction-column overflow-hidden"><div class="background-color-2 padding-top-xxl">${this._getSolutionPanel()}</div>${this._getSolutionContents()}</div></calcite-panel><calcite-shell-panel class="panel-background-1" slot=panel-end>${this._getButtons()}${this._getOwnerSection()}<div class="bottom-border margin-start-end-xxl"></div>${this._getSolutionVersionCard()}</calcite-shell-panel>${this._renderDiagramDialog()}${this._getConfigureTitlesDialog()}${this._getDeleteDialog()}${this._getSuccessDeployAlert()}</calcite-shell>`}async _deployedCardSelected(e){let t=e.detail;this.card=t.card,this.cardRef=t.cardRef,this.templateInfos=[],this._accordionLoading=!0,this.templateInfos=await this._getTemplates(),this._accordionLoading=!1;let a=await $(this._configContextConsumer.value.userSession,this.card);this._nonSolutionDependencyItems=a._nonSolutionDependencyItems;let l=C(this._configContextConsumer.value?.allCards||[],this.card.deployCommonId),s=!1;if(l){let r=g(l),S=g(this.card);s=r>S}this._hasNewVersion=s}_handleDeployAppTabSelected(e){e.detail==="deployed-card"&&this.sortTypeChanged.emit("")}_getButtons(){let e=this._configContextConsumer.value?.userSession?.username,t=this._configContextConsumer.value?.authentication?.CanUpdateSolution,a=this.card?.owner===e||this._isOrgAdmin||t,l=this.card?.owner===e||this._isOrgAdmin,s=a?"display-none":"",r=this.isMobile?"padding-lg":"padding-xxl";return i`<div class=${`display-flex flex-direction-column ${r}`}>${!this.isMobile&&i`<calcite-button appearance=outline class="padding-bottom-lg solution-deployed-action" kind=neutral @click=${this._openDiagram}>${this._translations.viewTheDiagram}</calcite-button>`||""}<calcite-button appearance=outline class="padding-bottom-lg solution-deployed-action" kind=neutral @click=${this._viewDocumentation}>${this._translations.solutionDocumentation}</calcite-button><calcite-button appearance=outline class="padding-bottom-lg solution-deployed-action" kind=neutral @click=${this._openItemDetails}>${this._translations.itemDetails}</calcite-button>${a&&!this.isMobile&&i`<calcite-button appearance=outline class="padding-bottom-lg solution-deployed-action" id=solution-configure-titles-button kind=neutral @click=${this._openConfigureTitlesDialog}>${this._translations.updateTitles}</calcite-button><calcite-tooltip class=${u(s)} overlay-positioning=fixed reference-element=solution-configure-titles-button><span>${this._translations.mustOwnSolution}</span></calcite-tooltip>`||""}${l&&!this.isMobile&&i`<calcite-button appearance=outline class="padding-bottom-lg solution-deployed-action" kind=neutral @click=${this._deleteSolution}>${this._translations.deleteSolution}</calcite-button>`||""}</div>`}_openConfigureTitlesDialog(){this._configureTitlesOpen=!0}_getConfigureTitlesDialog(){return this._configureTitlesOpen?i`<solution-configure-titles .card=${this.card} @solutionConfigureTitlesBeforeClose=${async()=>{this.templateInfos=await this._getTemplates(),this._configureTitlesOpen=!1}} @solutionItemsTitlesChanged=${async()=>{this.templateInfos=await this._getTemplates()}} .open=${this._configureTitlesOpen} source="Details Page" .templateInfos=${this.templateInfos}></solution-configure-titles>`:""}_viewDocumentation(e){e.stopPropagation(),this._telemetry?.logEvent({category:n.DEPLOYMENTS,action:"Open Help",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||"","Details Page"]}),window.open(this.card.learnMoreUrl,"_blank")}_openItemDetails(e){e.stopPropagation(),this._telemetry?.logEvent({category:n.DEPLOYMENTS,action:"Open Item Details",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||"","Details Page"]}),window.open(this.card.itemUrl,"_blank")}_getOwnerSection(){if(!this._configContextConsumer?.value)return;let e=this.isMobile?"margin-start-end-lg":"margin-start-end-xxl";return i`<div class=${`display-flex padding-bottom-xxl ${e} flex-direction-column`}><div class="display-flex justify-between items-baseline"><calcite-label class="font-weight-med label-override tabbing-offset" layout=inline scale=l tabindex=0>${this._translations.aboutYourSolutionOwner}</calcite-label></div><solution-user-avatar .fullname=${this._user?.username===this.card?.owner?this._user?.fullName:void 0} .lookupProfile=${this._user?.username!==this.card?.owner} .thumbnailUrl=${this._user?.username===this.card?.owner?this._user?.thumbnailUrl:void 0} .username=${this.card?.owner}></solution-user-avatar></div>`}async _openDiagram(e){e.stopPropagation();let t=await this._getTemplates();t&&(this._telemetry?.logEvent({category:n.DEPLOYMENTS,action:"View Diagram",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||"","Details Page"]}),this._templateInfoGraph=t,this._isDiagramOpen=!0)}async _getTemplates(){return this.cardRef?await this.cardRef.getTemplates():this.card?await _(this.card.id,this._configContextConsumer.value.userSession):void 0}_getSolutionVersionCard(){let e=this._hasNewVersion?this._translations.newVersionAvailable:this._translations.youHaveTheLatestVersion,t=this.isMobile?"padding-lg":"padding-xxl";return i`<div class=${`${t} display-flex flex-direction-column`}><calcite-label class="font-weight-med label-override tabbing-offset" layout=inline scale=l slot=heading tabindex=0>${this._translations.solutionVersion.replace("{{version}}",this.card?.deployVersion||"")}</calcite-label><div class="display-flex"><div class="display-flex flex-direction-row padding-top-lg align-items-center"><calcite-icon class="icon-color" icon=clock-forward scale=m></calcite-icon><div class="display-flex flex-direction-column padding-start-xxl"><span class="tabbing-offset" tabindex=0>${e}</span></div></div></div>${this._hasNewVersion?i`<calcite-button appearance=outline class="padding-top-lg solution-deployed-action" kind=neutral @click=${this._openNewVersionSolution} width=full>${this._translations.learnMoreNewVersion}</calcite-button>`:""}</div>`}async _openNewVersionSolution(e){e.stopPropagation(),this._telemetry?.logEvent({category:n.DEPLOYMENTS,action:"View Latest Version",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||""]}),await new Promise(a=>setTimeout(a,100));let t=D(this._configContextConsumer.value.allCards,this.card.deployCommonId);t&&this.forceSelectTab.emit({tabType:"details",tabTitleOrId:t})}_getSolutionPanel(){return i`<calcite-panel class="font-size-override panel-background-1"><div class="display-flex flex-direction-row"><div class="image-width margin-xl"><img alt=${this.card?.title??c} src=${this._thumbnailUrl??c}></div><div class="display-flex flex-direction-column"><h1 class="title-font margin-block-start-end-0 padding-end-xxl padding-start-sm padding-top-xxl padding-bottom-xxl line-height-1 negative-tabbing-offset" tabindex=0>${this.card?.title}</h1><div class="display-flex flex-direction-column padding-bottom-xxl padding-start-sm"><div class="display-flex align-items-start padding-bottom-xxl"><div class="font-1 padding-end-1 line-height-xxl negative-tabbing-offset" tabindex=0>${this.card?.snippet}</div></div><div class="display-flex"><div class="display-flex"><calcite-label class="label-override icon-color tabbing-offset" layout=inline tabindex=0><calcite-icon class="icon-color" icon=projects scale=s></calcite-icon>${this._translations.aboutYourSolutionDeployedDate.replace("{{deployedDate}}",this.card?.created||"")}</calcite-label></div></div></div></div></div></calcite-panel>`}_getSolutionContents(){let e=[...new Set(this._nonSolutionDependencyItems.map(t=>t.controlItemId))];return i`<calcite-panel class="panel-background-1 padding-top-xxl"><calcite-accordion class="accordion-bg " icon-position=start scale=l appearance=transparent><calcite-accordion-item class="item-padding" expanded><div class="margin-block-start-end-0 heading-font " slot=content-start>${this._translations.solutionsContentsAndCount.replace("{{numberOfSolutions}}",this.templateInfos.length.toString())}</div><div class="overflow-auto">${this._accordionLoading?i`<calcite-loader .label=${this._translations.loadingText} scale=m></calcite-loader>`:i`<solution-item-accordion .itemRelationshipDependencies=${e} .listSelectionMode=${e.length>0?"multiple":"single"} .reuseWarning=${this._translations.itemUsedInOtherSolutions} .templateInfos=${this.templateInfos} .typeKeywords=${this.card?.typeKeywords}></solution-item-accordion>`}</div></calcite-accordion-item></calcite-accordion></calcite-panel>`}_getDeleteDialog(){return this._deleteDialogOpen?i`<solution-delete-dialog .card=${this.card} @solutionDeleted=${()=>setTimeout(()=>this.navTabSelected.emit({tabType:"deployments"}),100)} @solutionDeleteDialogBeforeClose=${()=>{this._deleteDialogOpen=!1}} .open=${this._deleteDialogOpen} source="Details Page"></solution-delete-dialog>`:""}_getSuccessDeployAlert(){return i`<calcite-alert auto-close auto-close-duration=medium icon=check-circle kind=success .label=${this._translations.deploySuccessAlert.replace("{{solutionTitle}}",this.card?.title??"")} .open=${this._showSuccessAlert} @calciteAlertClose=${()=>{this._showSuccessAlert=!1}}><div slot=title>${this._translations.deploySuccessAlert.replace("{{solutionTitle}}",this.card?.title??"")}</div></calcite-alert>`}_renderDiagramDialog(){return this._isDiagramOpen?i`<calcite-dialog class="dialog-y-size dialog-x-size panel-bg-color" .heading=${this._translations.diagramOfTheSolution.replace("{{solution}}",this.card?.title??"")} id=${this._translations.diagramOfTheSolution.replace("{{solution}}",this.card?.title??"")??c} modal .open=${this._isDiagramOpen} @calciteDialogClose=${()=>{this._isDiagramOpen=!1}} outside-close-disabled scale=m width=l><solution-item-diagram .diagramKey=${this.diagramKey!==""?this.diagramKey:this._configContextConsumer.value?.diagramKey??""} .templateInfoGraph=${this._templateInfoGraph} .typeKeywords=${this.card?.typeKeywords}></solution-item-diagram></calcite-dialog>`:""}async _deleteSolution(){this._deleteDialogOpen=!0}_updateThumbnailToken(e){this._thumbnailUrl!==""&&(this._thumbnailUrl=y(this._thumbnailUrl,e))}};f("solution-deployed-card-panel",p);return p},a,e,g)
|
|
2
|
+
import g from"./C3QDGTJR.js";import e from"./OM6BG2BU.js";import a from"./XBVKGREH.js";import{b as d}from"./PZ4L77M5.js";import{a as b}from"./HYX7BODW.js";import{b as f}from"./B2DK4LWH.js";import{H as m,J as u,L as c,h,i,r as o}from"./46DQNAMV.js";export default $arcgis.t(([{a:x,b:v,c:_,e:w,i:y,s:n},{a:$},{d:g,h:C,i:D}])=>{var k=h`.negative-tabbing-offset[tabindex]:focus-visible{outline:2px solid var(--calcite-color-brand);outline-offset:-2px}.tabbing-offset[tabindex]:focus-visible{outline:2px solid var(--calcite-color-brand);outline-offset:2px}.font-weight-med{font-weight:var(--calcite-font-weight-medium)}.font-weight-bold{font-weight:var(--calcite-font-weight-bold)}.heading-font{font-size:var(--calcite-font-size-0);font-weight:var(--calcite-font-weight-medium)}.title-font{font-size:1.8rem;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-1)}.font-1{font-size:var(--calcite-spacing-lg)}.display-flex{display:flex}.display-none{display:none}.flex-direction-column{flex-direction:column}.flex-direction-row{flex-direction:row}@media(min-width:801px){.font-size-override .display-flex.flex-direction-row>.image-width+.display-flex{flex:1;min-width:0}}.icon-color{color:var(--calcite-color-text-3)}.padding-bottom-lg{padding-bottom:var(--calcite-spacing-lg)}.item-padding{--calcite-internal-accordion-item-padding: var(--calcite-spacing-xl)}.align-items-center{align-items:center}.align-items-start{align-items:start}.font-size-override{--calcite-font-size--2: var(--calcite-font-size--1)}.background-color-1{background-color:var(--calcite-color-foreground-1)}.background-color-2{background-color:var(--calcite-color-foreground-2)}.label-override{--calcite-label-margin-bottom: var(--calcite-spacing-none)}.position-relative{position:relative}.overflow-hidden{overflow:hidden}.overflow-auto{overflow:auto}.margin-block-start-end-0{margin-block-start:var(--calcite-spacing-none);margin-block-end:var(--calcite-spacing-none)}.panel-background-2{--calcite-panel-background-color: var(--calcite-color-foreground-2);background-color:var(--calcite-color-foreground-2)}.panel-background-1{--calcite-panel-background-color: var(--calcite-color-foreground-1);--calcite-shell-panel-background-color: var(--calcite-color-foreground-1)}.border-none{border:none}.font-color-1{color:var(--calcite-color-text-1)}.panel-bg-color{--calcite-panel-header-background-color: var(--calcite-color-foreground-1);--calcite-panel-background-color: var(--calcite-color-foreground-1)}.dialog-y-size{--calcite-dialog-size-y: 90% }.dialog-x-size{--calcite-dialog-size-x: 90% }.bottom-border{border-bottom:solid var(--calcite-spacing-px);color:var(--calcite-color-border-1)}.margin-start-end-xxl{margin-inline-start:var(--calcite-spacing-xxl);margin-inline-end:var(--calcite-spacing-xxl)}.margin-start-end-lg{margin-inline-start:var(--calcite-spacing-lg);margin-inline-end:var(--calcite-spacing-lg)}.margin-top-xxl{margin-top:var(--calcite-spacing-xxl)}.justify-between{justify-content:space-between}.items-baseline{align-items:baseline}.padding-xxl{padding:var(--calcite-spacing-xxl)}.padding-lg{padding:var(--calcite-spacing-lg)}.padding-top-xxl{padding-top:var(--calcite-spacing-xxl)}.padding-top-lg{padding-top:var(--calcite-spacing-lg)}.padding-bottom-xxl{padding-bottom:var(--calcite-spacing-xxl)}.padding-end-1{padding-inline-end:var(--calcite-spacing-lg)}.padding-end-xxl{padding-inline-end:var(--calcite-spacing-xxl)}.padding-start-sm{padding-inline-start:var(--calcite-spacing-sm)}.padding-start-xxl{padding-inline-start:var(--calcite-spacing-xxl)}.image-width{width:300px;flex-grow:0;flex-shrink:0}@media(max-width:1280px){.image-width{flex-grow:0;flex-shrink:1}}img{max-width:100%;height:auto;overflow-clip-margin:content-box;overflow:clip;display:block}.margin-xl{margin:var(--calcite-spacing-xl)}.line-height-1{line-height:1.1}.line-height-xxl{line-height:var(--calcite-line-height-xxl)}@media(max-width:800px){.font-size-override .display-flex.flex-direction-row{flex-direction:column!important}.image-width{width:100%!important;max-width:100%!important;margin:0!important;padding:var(--calcite-spacing-lg)!important;padding-bottom:0!important;box-sizing:border-box}.image-width img{width:100%;max-width:100%}.margin-xl{margin:0!important}.image-width+.display-flex{padding-inline-start:var(--calcite-spacing-lg)!important;padding-inline-end:var(--calcite-spacing-lg)!important}.padding-start-sm{padding-inline-start:0!important}.title-font{padding-inline-start:0!important;padding-top:var(--calcite-spacing-lg)!important;padding-bottom:var(--calcite-spacing-lg)!important}.align-items-start.padding-bottom-xxl,.padding-bottom-xxl.padding-start-sm{padding-bottom:var(--calcite-spacing-lg)!important}}calcite-shell-panel{--calcite-shell-panel-max-width: 20rem;--calcite-shell-panel-width: 24vw}calcite-shell{block-size:unset}.solution-deployed-action{--calcite-color-focus: initial}`,p=class extends m{constructor(){super(),this.diagramKey="",this.open=!1,this.templateInfos=[],this._accordionLoading=!1,this._configureTitlesOpen=!1,this._deleteDialogOpen=!1,this._hasNewVersion=!1,this._isDiagramOpen=!1,this._isNameConflict=!1,this._invalidNameMessage="",this._showSuccessAlert=!1,this._showFailedAlert=!1,this._showItemUpdateLoading=!1,this.isMobile=!1,this._templateInfoGraph=[],this._thumbnailUrl="",this._translations=b({name:"solution-deployed-card-panel",blocking:!0}),this._configContextConsumer=d({context:v,subscribe:!0,callback:async e=>{e&&(this._isOrgAdmin=w(e.authentication),this._user=e.authentication?.Portal?.user)}}),this._isOrgAdmin=!1,this._isMobileContextConsumer=d({context:x,subscribe:!0,callback:e=>this.isMobile=e}),this.navTabSelected=o(),this.forceSelectTab=o(),this.sortTypeChanged=o(),this.solutionConfigureDialogClose=o(),this._nonSolutionDependencyItems=[],this.listenOn(window,"deployedCardSelected",this._deployedCardSelected),this.listenOn(window,"deployAppTabSelected",this._handleDeployAppTabSelected),this.listenOn(window,"displayDeployedCard",()=>{this._showSuccessAlert=!0}),this.listenOn(window,"sessionRefreshed",e=>{this._updateThumbnailToken(e.detail)})}static{this.properties={card:0,cardRef:1,diagramKey:1,open:5,templateInfos:0,_accordionLoading:16,_configureTitlesOpen:16,_deleteDialogOpen:16,_hasNewVersion:16,_isDiagramOpen:16,_isNameConflict:16,_invalidNameMessage:16,_showSuccessAlert:16,_showFailedAlert:16,_showItemUpdateLoading:16,isMobile:16,_templateInfoGraph:16,_thumbnailUrl:16,_translations:16,_nonSolutionDependencyItems:16}}static{this.styles=k}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}async load(){if(this._isMobileContextConsumer.value&&(this.isMobile=this._isMobileContextConsumer.value),this.card?.thumbnailUrl){let e=this._configContextConsumer.value?.userSession,t=this.card?.thumbnailUrl.replace(/w=\d+/,"w=400");this._thumbnailUrl=`${t}&token=${e?.token}`}}willUpdate(e){if(e.has("card")){let t=this._configContextConsumer.value?.userSession,a=this.card?.thumbnailUrl.replace(/w=\d+/,"w=400");this._thumbnailUrl=`${a}&token=${t?.token}`}}render(){return this.isMobile?i`<calcite-shell class="position-relative background-color-2"><calcite-panel class="panel-background-2 border-none" slot=panel-bottom><div class="background-color-2 padding-top-lg">${this._getSolutionPanel()}</div><div class="background-color-1 margin-top-xxl">${this._getButtons()}${this._getOwnerSection()}<div class="bottom-border margin-start-end-xxl"></div>${this._getSolutionVersionCard()}</div>${this._getSolutionContents()}</calcite-panel></calcite-shell>`:i`<calcite-shell class="position-relative background-color-2"><calcite-panel class="padding-end-xxl panel-background-2 border-none" slot=panel-bottom><div class="display-flex flex-direction-column overflow-hidden"><div class="background-color-2 padding-top-xxl">${this._getSolutionPanel()}</div>${this._getSolutionContents()}</div></calcite-panel><calcite-shell-panel class="panel-background-1" slot=panel-end>${this._getButtons()}${this._getOwnerSection()}<div class="bottom-border margin-start-end-xxl"></div>${this._getSolutionVersionCard()}</calcite-shell-panel>${this._renderDiagramDialog()}${this._getConfigureTitlesDialog()}${this._getDeleteDialog()}${this._getSuccessDeployAlert()}</calcite-shell>`}async _deployedCardSelected(e){let t=e.detail;this.card=t.card,this.cardRef=t.cardRef,this.templateInfos=[],this._accordionLoading=!0,this.templateInfos=await this._getTemplates(),this._accordionLoading=!1;let a=await $(this._configContextConsumer.value.userSession,this.card);this._nonSolutionDependencyItems=a._nonSolutionDependencyItems;let l=C(this._configContextConsumer.value?.allCards||[],this.card.deployCommonId),s=!1;if(l){let r=g(l),S=g(this.card);s=r>S}this._hasNewVersion=s}_handleDeployAppTabSelected(e){e.detail==="deployed-card"&&this.sortTypeChanged.emit("")}_getButtons(){let e=this._configContextConsumer.value?.userSession?.username,t=this._configContextConsumer.value?.authentication?.CanUpdateSolution,a=this.card?.owner===e||this._isOrgAdmin||t,l=this.card?.owner===e||this._isOrgAdmin,s=a?"display-none":"",r=this.isMobile?"padding-lg":"padding-xxl";return i`<div class=${`display-flex flex-direction-column ${r}`}>${!this.isMobile&&i`<calcite-button appearance=outline class="padding-bottom-lg solution-deployed-action" kind=neutral @click=${this._openDiagram}>${this._translations.viewTheDiagram}</calcite-button>`||""}<calcite-button appearance=outline class="padding-bottom-lg solution-deployed-action" kind=neutral @click=${this._viewDocumentation}>${this._translations.solutionDocumentation}</calcite-button><calcite-button appearance=outline class="padding-bottom-lg solution-deployed-action" kind=neutral @click=${this._openItemDetails}>${this._translations.itemDetails}</calcite-button>${a&&!this.isMobile&&i`<calcite-button appearance=outline class="padding-bottom-lg solution-deployed-action" id=solution-configure-titles-button kind=neutral @click=${this._openConfigureTitlesDialog}>${this._translations.updateTitles}</calcite-button><calcite-tooltip class=${u(s)} overlay-positioning=fixed reference-element=solution-configure-titles-button><span>${this._translations.mustOwnSolution}</span></calcite-tooltip>`||""}${l&&!this.isMobile&&i`<calcite-button appearance=outline class="padding-bottom-lg solution-deployed-action" kind=neutral @click=${this._deleteSolution}>${this._translations.deleteSolution}</calcite-button>`||""}</div>`}_openConfigureTitlesDialog(){this._configureTitlesOpen=!0}_getConfigureTitlesDialog(){return this._configureTitlesOpen?i`<solution-configure-titles .card=${this.card} @solutionConfigureTitlesBeforeClose=${async()=>{this.templateInfos=await this._getTemplates(),this._configureTitlesOpen=!1}} @solutionItemsTitlesChanged=${async()=>{this.templateInfos=await this._getTemplates()}} .open=${this._configureTitlesOpen} source="Details Page" .templateInfos=${this.templateInfos}></solution-configure-titles>`:""}_viewDocumentation(e){e.stopPropagation(),this._telemetry?.logEvent({category:n.DEPLOYMENTS,action:"Open Help",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||"","Details Page"]}),window.open(this.card.learnMoreUrl,"_blank")}_openItemDetails(e){e.stopPropagation(),this._telemetry?.logEvent({category:n.DEPLOYMENTS,action:"Open Item Details",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||"","Details Page"]}),window.open(this.card.itemUrl,"_blank")}_getOwnerSection(){if(!this._configContextConsumer?.value)return;let e=this.isMobile?"margin-start-end-lg":"margin-start-end-xxl";return i`<div class=${`display-flex padding-bottom-xxl ${e} flex-direction-column`}><div class="display-flex justify-between items-baseline"><calcite-label class="font-weight-med label-override tabbing-offset" layout=inline scale=l tabindex=0>${this._translations.aboutYourSolutionOwner}</calcite-label></div><solution-user-avatar .fullname=${this._user?.username===this.card?.owner?this._user?.fullName:void 0} .lookupProfile=${this._user?.username!==this.card?.owner} .thumbnailUrl=${this._user?.username===this.card?.owner?this._user?.thumbnailUrl:void 0} .username=${this.card?.owner}></solution-user-avatar></div>`}async _openDiagram(e){e.stopPropagation();let t=await this._getTemplates();t&&(this._telemetry?.logEvent({category:n.DEPLOYMENTS,action:"View Diagram",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||"","Details Page"]}),this._templateInfoGraph=t,this._isDiagramOpen=!0)}async _getTemplates(){return this.cardRef?await this.cardRef.getTemplates():this.card?await _(this.card.id,this._configContextConsumer.value.userSession):void 0}_getSolutionVersionCard(){let e=this._hasNewVersion?this._translations.newVersionAvailable:this._translations.youHaveTheLatestVersion,t=this.isMobile?"padding-lg":"padding-xxl";return i`<div class=${`${t} display-flex flex-direction-column`}><calcite-label class="font-weight-med label-override tabbing-offset" layout=inline scale=l slot=heading tabindex=0>${this._translations.solutionVersion.replace("{{version}}",this.card?.deployVersion||"")}</calcite-label><div class="display-flex"><div class="display-flex flex-direction-row padding-top-lg align-items-center"><calcite-icon class="icon-color" icon=clock-forward scale=m></calcite-icon><div class="display-flex flex-direction-column padding-start-xxl"><span class="tabbing-offset" tabindex=0>${e}</span></div></div></div>${this._hasNewVersion?i`<calcite-button appearance=outline class="padding-top-lg solution-deployed-action" kind=neutral @click=${this._openNewVersionSolution} width=full>${this._translations.learnMoreNewVersion}</calcite-button>`:""}</div>`}async _openNewVersionSolution(e){e.stopPropagation(),this._telemetry?.logEvent({category:n.DEPLOYMENTS,action:"View Latest Version",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||""]}),await new Promise(a=>setTimeout(a,100));let t=D(this._configContextConsumer.value.allCards,this.card.deployCommonId);t&&this.forceSelectTab.emit({tabType:"details",tabTitleOrId:t})}_getSolutionPanel(){return i`<calcite-panel class="font-size-override panel-background-1"><div class="display-flex flex-direction-row"><div class="image-width margin-xl"><img alt=${this.card?.title??c} src=${this._thumbnailUrl??c}></div><div class="display-flex flex-direction-column"><h1 class="title-font margin-block-start-end-0 padding-end-xxl padding-start-sm padding-top-xxl padding-bottom-xxl line-height-1 negative-tabbing-offset" tabindex=0>${this.card?.title}</h1><div class="display-flex flex-direction-column padding-bottom-xxl padding-start-sm"><div class="display-flex align-items-start padding-bottom-xxl"><div class="font-1 padding-end-1 line-height-xxl negative-tabbing-offset" tabindex=0>${this.card?.snippet}</div></div><div class="display-flex"><div class="display-flex"><calcite-label class="label-override icon-color tabbing-offset" layout=inline tabindex=0><calcite-icon class="icon-color" icon=projects scale=s></calcite-icon>${this._translations.aboutYourSolutionDeployedDate.replace("{{deployedDate}}",this.card?.created||"")}</calcite-label></div></div></div></div></div></calcite-panel>`}_getSolutionContents(){let e=[...new Set(this._nonSolutionDependencyItems.map(t=>t.controlItemId))];return i`<calcite-panel class="panel-background-1 padding-top-xxl"><calcite-accordion class="accordion-bg " icon-position=start scale=l appearance=transparent><calcite-accordion-item class="item-padding" expanded><div class="margin-block-start-end-0 heading-font " slot=content-start>${this._translations.solutionsContentsAndCount.replace("{{numberOfSolutions}}",this.templateInfos.length.toString())}</div><div class="overflow-auto">${this._accordionLoading?i`<calcite-loader .label=${this._translations.loadingText} scale=m></calcite-loader>`:i`<solution-item-accordion .itemRelationshipDependencies=${e} .listSelectionMode=${e.length>0?"multiple":"single"} .reuseWarning=${this._translations.itemUsedInOtherSolutions} .templateInfos=${this.templateInfos} .typeKeywords=${this.card?.typeKeywords}></solution-item-accordion>`}</div></calcite-accordion-item></calcite-accordion></calcite-panel>`}_getDeleteDialog(){return this._deleteDialogOpen?i`<solution-delete-dialog .card=${this.card} @solutionDeleted=${()=>setTimeout(()=>this.navTabSelected.emit({tabType:"deployments"}),100)} @solutionDeleteDialogBeforeClose=${()=>{this._deleteDialogOpen=!1}} .open=${this._deleteDialogOpen} source="Details Page"></solution-delete-dialog>`:""}_getSuccessDeployAlert(){return i`<calcite-alert auto-close auto-close-duration=medium icon=check-circle kind=success .label=${this._translations.deploySuccessAlert.replace("{{solutionTitle}}",this.card?.title??"")} .open=${this._showSuccessAlert} @calciteAlertClose=${()=>{this._showSuccessAlert=!1}}><div slot=title>${this._translations.deploySuccessAlert.replace("{{solutionTitle}}",this.card?.title??"")}</div></calcite-alert>`}_renderDiagramDialog(){return this._isDiagramOpen?i`<calcite-dialog class="dialog-y-size dialog-x-size panel-bg-color" .heading=${this._translations.diagramOfTheSolution.replace("{{solution}}",this.card?.title??"")} id=${this._translations.diagramOfTheSolution.replace("{{solution}}",this.card?.title??"")??c} modal .open=${this._isDiagramOpen} @calciteDialogClose=${()=>{this._isDiagramOpen=!1}} outside-close-disabled scale=m width=l><solution-item-diagram .diagramKey=${this.diagramKey!==""?this.diagramKey:this._configContextConsumer.value?.diagramKey??""} .templateInfoGraph=${this._templateInfoGraph} .typeKeywords=${this.card?.typeKeywords}></solution-item-diagram></calcite-dialog>`:""}async _deleteSolution(){this._deleteDialogOpen=!0}_updateThumbnailToken(e){this._thumbnailUrl!==""&&(this._thumbnailUrl=y(this._thumbnailUrl,e))}};f("solution-deployed-card-panel",p);return p},a,e,g)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
|
|
2
|
-
import a from"./
|
|
2
|
+
import a from"./XBVKGREH.js";import{b as r}from"./PZ4L77M5.js";import{a as b}from"./HYX7BODW.js";import{b as g}from"./B2DK4LWH.js";import{F as o,G as s,H as p,K as u,h as d,i,j as h,r as l}from"./46DQNAMV.js";export default $arcgis.t(([{L:m,a:v,b:f}])=>{var x=d`calcite-shell-panel{z-index:var(--calcite-z-index-1)}.display-flex{display:flex}.flex-1,.flex-grow{flex:1}.flex-shrink-0{flex:0 0 auto}.leader-1{margin-top:var(--calcite-spacing-xxl)}.trailer-1{margin-bottom:var(--calcite-spacing-xxl)}.warning-text{max-width:35em;margin-left:auto;margin-right:auto;font-size:var(--calcite-font-size-md)}.text-center{text-align:center}.border-override{border-top-width:var(--calcite-border-width-none);border-bottom-width:var(--calcite-border-width-none)}.header-override{--calcite-panel-header-content-space: var(--calcite-spacing-none);--calcite-panel-header-background-color: var(--calcite-color-foreground-2)}.panel-override{--calcite-panel-background-color: var(--calcite-color-foreground-2);--calcite-panel-border-color: none}.label-override{--calcite-label-margin-bottom: var(--calcite-spacing-none);font-weight:var(--calcite-font-weight-medium)}.header-content-wrapper{padding-inline-start:var(--calcite-spacing-xxs)}.header-button-padding{padding-top:var(--calcite-spacing-sm);padding-bottom:var(--calcite-spacing-sm);padding-inline-start:var(--calcite-spacing-lg);padding-inline-end:var(--calcite-spacing-lg)}.padding-start{padding-inline-start:var(--calcite-spacing-lg)}.align-items-center{align-items:center}.justify-content-end{justify-content:end}.justify-content-start{justify-content:start}.filter-width-350{--calcite-shell-panel-width: 350px}.z-index-2{z-index:2}.mock-fab{--calcite-fab-shadow-internal: 0 6px 20px -4px rgba(0, 0, 0, .1), 0 4px 12px -2px rgba(0, 0, 0, .08);box-shadow:var(--calcite-fab-shadow, var(--calcite-fab-shadow-internal));--calcite-button-background-color: var(--calcite-fab-background-color);--calcite-button-border-color: var(--calcite-fab-border-color);--calcite-button-text-color: var(--calcite-fab-text-color);--calcite-button-loader-color: var(--calcite-fab-loader-color)}.position-relative{position:relative}.height-100{height:100%}.height-50{height:50px}.sign-in-prompt{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;height:100%}.sign-in-icon{transform:translate(-20px)}.height-150{height:150px}.width-150{width:150px}.padding-top-8{padding-top:8px}`,c=class extends p{constructor(){super(),this.solutionsCount=0,this.filterOpen=!0,this.isMobile=!1,this._showAlertFailed=!1,this._translations=b({name:"solutions-deployed-shell",blocking:!0}),this._configContextConsumer=r({context:f,subscribe:!0}),this._deployedCardFetchFailedMessage="",this._deployedCardFetchFailedTitle="",this._isMobileContextConsumer=r({context:v,subscribe:!0,callback:e=>this.isMobile=e}),this._solutionsDeployedPanelRef=o(),this._mainPanelRef=o(),this._panelFixed=!1,this.filterRemoved=l(),this.tokenRefreshed=l(),this._handleSignIn=()=>{let e=window.location.pathname.endsWith("deployments")?"":"deployments";this._configContextConsumer.value?.authentication?.signIn(e)},this.listenOn(window,"deployedCardFetchFailed",e=>{let t=e.detail;this._deployedCardFetchFailedTitle=t.title,this._deployedCardFetchFailedMessage=t.message,this._showAlertFailed=!0})}static{this.properties={solutionsCount:9,filterOpen:16,isMobile:16,_showAlertFailed:16,_translations:16}}static{this.styles=x}willUpdate(e){e.has("isMobile")&&(this.filterOpen=!this.isMobile)}async searchSolutions(e){this._solutionsDeployedPanelRef.value?.setSearchOptions(e),("sortType"in e||"searchTerm"in e)&&this._solutionsDeployedPanelRef.value?.searchSolutions(e)}async load(){this._isMobileContextConsumer.value&&(this.isMobile=this._isMobileContextConsumer.value)}updated(){this._fixPanelContentWrapperFocus()}_fixPanelContentWrapperFocus(){if(!this._panelFixed&&this._mainPanelRef.value){let e=this._mainPanelRef.value;e.componentOnReady?.().then(()=>{if(e.shadowRoot){let t=e.shadowRoot.querySelector(".content-wrapper");t&&(t.tabIndex=-1,this._panelFixed=!0,this._setupPanelObserver())}}).catch(()=>{this._panelFixed=!0})}}_setupPanelObserver(){if(this._panelObserver)return;this._panelObserver=new MutationObserver(t=>{t.forEach(a=>{if(a.type==="attributes"&&a.attributeName==="tabindex"){let n=a.target;n.classList.contains("content-wrapper")&&n.tabIndex===0&&(n.tabIndex=-1)}})});let e=this._mainPanelRef.value;if(e?.shadowRoot){let t=e.shadowRoot.querySelector(".content-wrapper");t&&this._panelObserver.observe(t,{attributes:!0,attributeFilter:["tabindex"]})}}disconnectedCallback(){super.disconnectedCallback(),this._panelObserver?.disconnect()}render(){if(!this._configContextConsumer.value?.authentication?.IsSignedIn)return this._getSignInPrompt();let e=this.isMobile?"justify-content-start":"";return i`<calcite-shell class="position-relative"><calcite-panel class="border-override header-override panel-override z-index-1" ${s(this._mainPanelRef)}><div class=${`display-flex align-items-center height-50 header-content-wrapper ${e}`} slot=header-content><calcite-label class="label-override flex-shrink-0 padding-top-8" layout=inline>${this._translations.numberOfDeployments?.replace("{{count}}",this.solutionsCount.toString())}</calcite-label></div>${this._getSolutionsDeployedPanel()}</calcite-panel></calcite-shell>`}_getSignInPrompt(){return i`<div class="sign-in-prompt">${this._getSignInIcon()}<div class="text-center leader-1 warning-text trailer-1">${this._translations.signInMessage}</div><calcite-button appearance=outline @click=${this._handleSignIn} @keydown=${e=>m(e,()=>this._handleSignIn())} scale=l>${this._translations.signIn}</calcite-button></div>`}_getSolutionsDeployedPanel(){let e=this.isMobile&&this.filterOpen?{display:"none"}:"";return i`<div><solutions-deployed-panel @deployedCardsFetched=${this._updateSolutionCount} style=${u(e)} ${s(this._solutionsDeployedPanelRef)}></solutions-deployed-panel><calcite-alert icon=exclamation-mark-triangle kind=danger .label=${this._deployedCardFetchFailedTitle} @calciteAlertClose=${()=>{this._showAlertFailed=!1}} .open=${this._showAlertFailed}><div slot=title>${this._deployedCardFetchFailedTitle}</div><div slot=message>${this._deployedCardFetchFailedMessage}</div></calcite-alert></div>`}_updateSolutionCount(e){this.solutionsCount=e.detail}_getSignInIcon(){return i`<div class="sign-in-icon"><svg viewBox="0 0 64 64" width=200 height=200 xmlns=http://www.w3.org/2000/svg>${h`<path d="M56.9 4.1V60h-.8V4.9H23.3l25.6 7.47v39.26l-28.8 8.4V35h.8v23.97l27.2-7.94V12.97L20.9 5.03V30h-.8V4.1h36.8zM30.735 41.7l.565.566 9.766-9.766-9.766-9.766-.565.567 8.799 8.799H5v.8h34.534l-8.8 8.8z" fill=var(--calcite-color-text-3) />`}</svg></div>`}};g("solutions-deployed-shell",c);return c},a)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
|
|
2
|
-
import{b as d}from"./
|
|
2
|
+
import{b as d}from"./B2DK4LWH.js";import{F as a,G as n,H as r,h as i,i as s}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([m])=>{var p=i`:host{display:block}`,t=class extends r{constructor(){super(...arguments),this._legendElement=a()}static{this.properties={mapView:0,legendWidget:0}}static{this.styles=p}willUpdate(e){e.has("mapView")&&this.mapViewWatchHandler()}async mapViewWatchHandler(){await this.mapView?.when(()=>{this.mapView&&this._initLegend(this.mapView)})}render(){return s`<div ${n(this._legendElement)}></div>`}async loaded(){this.mapView&&await this.mapViewWatchHandler()}_initLegend(e){e&&(this.legendWidget?this.legendWidget.view=e:this.legendWidget=new m({container:this._legendElement.value,respectLayerDefinitionExpression:!0,view:e}))}};d("map-legend",t);return t},"widgets/Legend")
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
|
|
2
|
-
import c from"./KDIUYXBA.js";import b from"./UUYUTETH.js";import{a as L}from"./
|
|
2
|
+
import c from"./KDIUYXBA.js";import b from"./UUYUTETH.js";import{a as L}from"./HYX7BODW.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import{b as m}from"./B2DK4LWH.js";import{H as p,h as y,i as a,r as l,u as d}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([n,_,,{a:w,c:u,e:f}])=>{async function I(h,t){let{style:i="decimal",places:e=2}=t||{},s=n.convertNumberFormatToIntlOptions({places:e,digitSeparator:!0});return s.style=i,n.formatNumber(h,s)}var x=y`@layer{:host{display:block}.notice-msg{width:calc(100% - 20px);padding:10px}.layer-name{font-weight:500;word-break:break-word}.feature-count{padding:0 10px}}`,o=class extends p{constructor(){super(),this.layers=[],this.showFeatureCount=!0,this.showNextIcon=!1,this.applyLayerViewFilter=!1,this.filterByMapExtent=!1,this._noLayersToDisplay=!1,this._mapLayerIds=[],this._isLoading=!1,this._translations=L({name:"layer-list",blocking:!0}),this.layerSelect=l(),this.layersListLoaded=l(),this.listenOn(window,"selectedLanguageUpdated",this.selectedLanguageUpdated)}static{this.properties={mapView:0,layers:0,showFeatureCount:5,showNextIcon:5,applyLayerViewFilter:5,filterByMapExtent:5,_noLayersToDisplay:16,_mapLayerIds:16,_isLoading:16,_translations:16}}static{this.styles=x}static{this.shadowRootOptions=d}willUpdate(t){t.has("filterByMapExtent")&&this.hasUpdated&&this.filterByMapExtentWatchHandler(this.filterByMapExtent)}filterByMapExtentWatchHandler(t){t?this.initializeMapExtentFilter():this._filterByMapExtentHandle&&this._filterByMapExtentHandle.remove()}async refresh(){await this.setLayers()}async selectedLanguageUpdated(t){await this.setLayers()}async load(){this.filterByMapExtent&&this.initializeMapExtentFilter()}async loaded(){await this.setLayers()}render(){return a`${this._isLoading&&a`<calcite-loader label scale=m></calcite-loader>`||""}${!this._isLoading&&this.mapView&&this._noLayersToDisplay&&a`<calcite-notice class="notice-msg" icon=layers-reference kind=danger open><div slot=title>${this._translations.error}</div><div slot=message>${this._translations.noLayerToDisplayErrorMsg}</div></calcite-notice>`||""}${!this._isLoading&&this.mapView&&a`<calcite-list label selection-appearance=border selection-mode=none>${this.filterByMapExtent&&this._mapLayerIds.length>0&&this.getExtentNotice()||""}${this.renderLayerList()}</calcite-list>`||""}`}initializeMapExtentFilter(){this._filterByMapExtentHandle=_.when(()=>this.mapView?.stationary,()=>{this.setLayers()},{initial:!0})}async setLayers(){this.mapView&&(this._isLoading=!0,await this.initLayerHash(),this._isLoading=!1)}async initLayerHash(){let t=[];if(this.mapView){this._layerItemsHash=await w(this.mapView,!1);let i=await f(this.mapView);for(let e of i)if(e?.type==="feature"&&this.showFeatureCount){let s=e.createQuery();if(e?.definitionExpression&&(s.where=s.where+" AND "+e.definitionExpression),this.applyLayerViewFilter){let r=await u(this.mapView,e.id);r?.filter?.where&&(s.where=s.where?s.where+" AND "+r.filter.where:r.filter.where)}s.geometry=this.filterByMapExtent?this.mapView.extent:null;let c=e.queryFeatureCount(s);t.push(c),c.then(async r=>{let g=Number.isNaN(r)?"":await I(r,{places:0,style:"decimal"});this._layerItemsHash?.[e.id]&&(this._layerItemsHash[e.id].formattedFeatureCount=g)})}await Promise.all(t).then(()=>{let e=this._layerItemsHash&&this.getLayersToBeShownInList(this._layerItemsHash);this._mapLayerIds=e?.reverse()||[],this.handleNoLayersToDisplay()},()=>{this._mapLayerIds=[],this.handleNoLayersToDisplay()})}}handleNoLayersToDisplay(){this._noLayersToDisplay=!(this._mapLayerIds.length>0),this.layersListLoaded.emit(this._mapLayerIds)}getLayersToBeShownInList(t){let i=this.layers?.length>0?this.layers:[];return Object.keys(t).reduce((e,s)=>(i.indexOf(s)>-1&&e.push(s),e),[])}renderLayerList(){return this._mapLayerIds.length>0?this._mapLayerIds.reduce((t,i)=>{if(this._layerItemsHash&&this._layerItemsHash[i]){let e=this.getLayerListItem(i);e&&t.push(e)}return t},[]):void 0}getLayerListItem(t){let i=this._layerItemsHash&&this._layerItemsHash[t].name,e=this._layerItemsHash&&this._layerItemsHash[t].formattedFeatureCount;return a`<calcite-list-item @calciteListItemSelect=${()=>{this.onLayerItemSelected(t)}}><div class="layer-name" slot=content-start>${i}</div>${this.showFeatureCount&&e!==void 0&&e!==""&&a`<div class="feature-count" slot=content-end>${`(${e})`}</div>`||""}${this.showNextIcon&&a`<calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon>`||""}</calcite-list-item>`}getExtentNotice(){return a`<calcite-notice class="notice-msg" icon=extent-filter kind=brand open scale=s><div slot=message>${this._translations.extentFilterMsg}</div></calcite-notice>`}onLayerItemSelected(t){this._layerItemsHash&&this.layerSelect.emit({layerId:t,layerName:this._layerItemsHash[t]?.name})}};m("layer-list",o);return o},"intl","core/reactiveUtils",b,c)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
|
|
2
|
-
import{b as n}from"./
|
|
2
|
+
import{b as n}from"./B2DK4LWH.js";import{F as m,G as r,H as o,h as t,i as p}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([l,h])=>{var d=t`.display-block{display:block}`,s=class extends o{constructor(){super(...arguments),this._basemapElement=m()}static{this.properties={mapView:0,basemapConfig:0,basemapWidget:0}}static{this.styles=d}willUpdate(a){a.has("basemapConfig")&&this.basemapConfigWatchHandler(),a.has("mapView")&&this.mapViewWatchHandler()}async basemapConfigWatchHandler(){if(this.basemapWidget?.source){let a=this.basemapWidget?.source;a.query=this.basemapConfig?.basemapGroupId?`id:${this.basemapConfig.basemapGroupId}`:null,await a.refresh()}}async mapViewWatchHandler(){this.mapView!==void 0&&await this.mapView.when(()=>{this._initBaseMapGallery(this.mapView)})}render(){return p`<div class="display-block" ${r(this._basemapElement)}></div>`}loaded(){this.mapView&&this.mapViewWatchHandler()}async _initBaseMapGallery(a){if(a){let e=new h({query:this.basemapConfig?.basemapGroupId?`id:${this.basemapConfig.basemapGroupId}`:null,filterFunction:this.basemapConfig?i=>i?.portalItem?.id&&this.basemapConfig?!this.basemapConfig.basemapIdsToFilter.includes(i?.portalItem?.id):!0:()=>!0});await e.refresh(),this.basemapWidget?(this.basemapWidget.view=a,this.basemapWidget.source=e):this.basemapWidget=new l({container:this._basemapElement.value,view:a,source:e})}}};n("map-basemap-gallery",s);return s},"widgets/BasemapGallery","widgets/BasemapGallery/support/PortalBasemapsSource")
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
|
|
2
|
-
import{b as r}from"./36I27Q5R.js";import{c as o}from"./
|
|
2
|
+
import{b as r}from"./36I27Q5R.js";import{c as o}from"./B2DK4LWH.js";var s=r(o);export{s as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
|
|
2
|
-
import{a as D}from"./LLYTIOG4.js";import{b as E}from"./PZ4L77M5.js";import c from"./KDIUYXBA.js";import a from"./UUYUTETH.js";import{a as L}from"./Z73DPA3J.js";import{b as k}from"./7JVIFSRF.js";import{F as S,G as u,H as v,J as I,h as b,i as h,r as _,u as g}from"./46DQNAMV.js";export default $arcgis.t(([V,A,{d:x},{c:m,h:G,i:$}])=>{var O=b`@layer{:host{display:block}.div-not-visible{display:none!important}.border{outline:1px solid var(--calcite-color-border-input)}.esri-sketch{display:flex;flex-flow:column wrap}.esri-widget{box-sizing:border-box;color:#323232;font-size:14px;font-family:Avenir Next,Helvetica Neue,Helvetica,Arial,sans-serif;line-height:1.3em;background-color:var(--calcite-color-foreground-1)}.esri-sketch__panel{align-items:center;display:flex;flex-flow:row nowrap;padding:0}.esri-sketch__tool-section{border-right:1px solid rgba(110,110,110,.3)}.esri-sketch__section{align-items:center;display:flex;flex-flow:row nowrap;padding:0 7px;margin:6px 0;border-right:1px solid rgba(110,110,110,.3)}.display-flex{display:flex}.font-bold{font-weight:700}.width-full{width:100%}.label-margin-0{--calcite-label-margin-bottom: 0}.padding-start-1-2{padding-inline-start:.5rem}.font-weight-500{font-weight:500}.word-wrap-anywhere{word-wrap:anywhere}.tooltip-message{padding:5px 8px;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-color-text-2);max-width:400px}}`,y=class extends v{constructor(){super(),this.enabledLayerIds=[],this.enableSearchDistance=!0,this.enableSearchDistanceOnLoad=!1,this.searchDistanceEnabled=!1,this.selectionSets=[],this.bufferColor=[227,139,79,.8],this.bufferOutlineColor=[255,255,255],this.geometries=[],this.drawnGraphicsArr=[],this._translations=L({name:"refine-selection",blocking:!0}),this._selectionMode="ADD",this._addEnabled=!0,this._drawTools=S(),this._enabledLayerIds=[],this._layerPicker=S(),this._featuresCollection={},this._pnContextConsumer=E({context:D,subscribe:!0}),this._bufferTools=S(),this._undoGraphicsArr=[],this.selectionLoadingChange=_(),this.selectionSetsChanged=_(),this.listenOn(window,"distanceChanged",this.distanceChanged),this.listenOn(window,"unitChanged",this.unitChanged)}static{this.properties={addresseeLayer:0,enabledLayerIds:0,enableSearchDistance:5,enableSearchDistanceOnLoad:5,mapView:0,searchDistanceEnabled:5,selectionSets:0,sketchLineSymbol:0,sketchPointSymbol:0,sketchPolygonSymbol:0,defaultBufferUnit:1,bufferColor:1,bufferOutlineColor:1,defaultBufferDistance:9,geometries:0,drawnGraphicsArr:0,_translations:16,_selectionMode:16,_refineLayer:16}}static{this.styles=O}static{this.shadowRootOptions=g}willUpdate(e){e.has("defaultBufferUnit")&&this.hasUpdated&&this._refineSelectionSet&&(this._refineSelectionSet.unit=this.defaultBufferUnit),e.has("defaultBufferDistance")&&this.hasUpdated&&this._refineSelectionSet&&(this._refineSelectionSet.distance=this.defaultBufferDistance)}async distanceChanged(e){e.detail.newValue!==e.detail.oldValue&&this._refineSelectionSet&&(this._refineSelectionSet.distance=e.detail.newValue)}async unitChanged(e){e.detail.newValue!==e.detail.oldValue&&this._refineSelectionSet&&(this._refineSelectionSet.unit=e.detail.newValue)}async load(){this._enabledLayerIds=this._getEnabledLayerIds(),await this._setRefineSet(this._enabledLayerIds[0]),this._undoGraphicsArr=this._refineSelectionSet?.undoGraphicsArr}async loaded(){await this._init()}render(){let e=this._enabledLayerIds.length>1?"display-block":"display-none";return h`<div class=${`${e} padding-top-sides-1`}><div class="display-flex"><calcite-label class="font-bold width-full label-margin-0"><div class="display-flex">${this._translations.inputLayer}<calcite-icon class="padding-start-1-2 icon" .flipRtl=${this._translations._lang?.toLowerCase()!=="he"} icon=question id=refine-input-layer scale=s></calcite-icon></div><map-layer-picker .enabledLayerIds=${this._enabledLayerIds} .mapView=${this.mapView} @layerSelectionChange=${t=>{this._layerSelectionChange(t)}} .selectedIds=${this._refineLayer?[this._refineLayer.layer.id]:[]} ${u(this._layerPicker)}></map-layer-picker></calcite-label><calcite-popover closable label overlay-positioning=fixed reference-element=refine-input-layer><span class="tooltip-message">${this._translations.inputLayerTip}</span></calcite-popover></div></div><div class="padding-1"><div class="padding-bottom-1"><calcite-segmented-control class="w-100" width=full><calcite-segmented-control-item .checked=${this._addEnabled} class="w-50 word-wrap-anywhere" @click=${()=>this._setSelectionMode("ADD")} value=ADD><span class="font-weight-500">${this._translations.add}</span></calcite-segmented-control-item><calcite-segmented-control-item .checked=${!this._addEnabled} class="w-50 word-wrap-anywhere" @click=${()=>this._setSelectionMode("REMOVE")} value=REMOVE><span class="font-weight-500">${this._translations.remove}</span></calcite-segmented-control-item></calcite-segmented-control></div><div><map-draw-tools active draw-mode=REFINE .mapView=${this.mapView} @drawRedo=${()=>this._redo()} @drawUndo=${()=>this._undo()} @sketchGraphicsChange=${this._sketchGraphicsChanged} .pointSymbol=${this.sketchPointSymbol} .polygonSymbol=${this.sketchPolygonSymbol} .polylineSymbol=${this.sketchLineSymbol} .redoEnabled=${this._refineSelectionSet?.redoStack&&this._refineSelectionSet.redoStack.length>0} .undoEnabled=${this._refineSelectionSet?.undoStack&&this._refineSelectionSet.undoStack.length>0} ${u(this._drawTools)}></map-draw-tools></div>${this.enableSearchDistance?this._getBufferOptions():void 0}<br>${h`<calcite-list class="list-border" label>${this._getRefineSelectionSetList()}</calcite-list>`}</div>`}async _init(){this._initGraphicsLayer()}_initGraphicsLayer(){let e=this._translations.bufferLayer;if(this.mapView){let t=this.mapView.map.layers.findIndex(i=>i.title===e);if(t>-1)this._bufferGraphicsLayer=this.mapView.map.layers.getItemAt(t);else if(this._bufferGraphicsLayer=new A({title:e,listMode:"hide"}),this._bufferGraphicsLayer){let i=this.mapView.map.layers.findIndex(s=>s.title===this._translations.sketchLayer);i>-1?this.mapView.map.layers.add(this._bufferGraphicsLayer,i):this.mapView.map.layers.add(this._bufferGraphicsLayer)}}}_layerSelectionChange(e){let t=e.detail[0];this._setRefineSet(t)}_setSelectionMode(e){this._selectionMode=e}async _sketchGraphicsChanged(e){let t=e.detail?.graphics[0],i=t.geometry;this.geometries=[i];let s=await this._selectFeatures(i);if(this._sketchGraphic=t,this._refineSelectionSet?.distance===0&&s.length>0){let a={drawnGraphic:t,bufferGraphic:void 0};this.drawnGraphicsArr.push(a)}}_getEnabledLayerIds(){return this.selectionSets.reduce((e,t)=>{let i=t?.layerView?.layer.id;return i&&e.indexOf(i)<0?e.push(i):t.workflowType==="REFINE"&&Object.keys(t.refineInfos).forEach(s=>{e.indexOf(s)<0&&e.push(s)}),e},[])}async _setRefineSet(e){this.selectionSets.some(t=>t.workflowType==="REFINE"?(this._refineSelectionSet=t,Object.keys(t.refineInfos).indexOf(e)>-1):!1)||await this._initRefineSet(e,this._refineSelectionSet),this._refineSelectionSet&&(this._refineLayer=this._refineSelectionSet.refineInfos[e].layerView)}async _initRefineSet(e,t){let i={};i[e]={addIds:[],removeIds:[],layerView:this.mapView&&await m(this.mapView,e)},t?t.refineInfos={...t.refineInfos,...i}:(this._refineSelectionSet={id:Date.now(),searchResult:void 0,buffer:void 0,distance:this.defaultBufferDistance||0,download:!0,unit:this.defaultBufferUnit||"feet",label:"Refine",selectedIds:[],layerView:this.mapView&&await m(this.mapView,e),geometries:[],graphics:[],selectLayers:[],workflowType:"REFINE",searchDistanceEnabled:!1,useLayerFeaturesEnabled:!1,refineInfos:i,redoStack:[],undoStack:[],sketchGraphic:void 0,undoGraphicsArr:[]},this.selectionSets.push(this._refineSelectionSet))}_undo(){if(this._refineSelectionSet){let e=this._refineSelectionSet.undoStack&&this._refineSelectionSet.undoStack.pop();if(e){if(this.drawnGraphicsArr.length>0){let t=this.drawnGraphicsArr.pop();t&&this._refineSelectionSet.undoGraphicsArr?.push(t),this._undoGraphicsArr.push(t)}this._refineSelectionSet.redoStack&&this._updateIds(e.ids,e.mode==="ADD"?"REMOVE":"ADD",this._refineSelectionSet.redoStack,e.layerView)}}}_redo(){if(this._refineSelectionSet){let e=this._refineSelectionSet.redoStack&&this._refineSelectionSet.redoStack.pop();if(e){if(this._undoGraphicsArr.length>0){let t=this._undoGraphicsArr.pop();this._refineSelectionSet.undoGraphicsArr?.pop(),t&&this.drawnGraphicsArr.push(t)}this._refineSelectionSet.undoStack&&this._updateIds(e.ids,e.mode==="ADD"?"REMOVE":"ADD",this._refineSelectionSet.undoStack,e.layerView)}}}_getBufferOptions(){this.enableSearchDistanceOnLoad&&this._refineSelectionSet&&(this._refineSelectionSet.searchDistanceEnabled=!0,this.searchDistanceEnabled=!0,this.enableSearchDistanceOnLoad=!1);let e=this._refineSelectionSet?.searchDistanceEnabled?"search-distance":"div-not-visible";return h`<div><div class="padding-top-1 display-flex"><calcite-label class="label-margin-0 w-100" layout=inline-space-between><div class="tooltip-container">${this._translations.searchDistance}<calcite-icon class="padding-start-1-2 icon" .flipRtl=${this._translations._lang?.toLowerCase()!=="he"} icon=question id=search-distance-icon scale=s></calcite-icon></div></calcite-label><calcite-popover closable label overlay-positioning=fixed reference-element=search-distance-icon><span class="tooltip-message">${this._translations.useSearchDistanceTootip}</span></calcite-popover><calcite-switch .checked=${this._refineSelectionSet?.searchDistanceEnabled} @calciteSwitchChange=${()=>{this.searchDistanceEnabled=!this.searchDistanceEnabled,this._refineSelectionSet&&(this._refineSelectionSet.searchDistanceEnabled=this.searchDistanceEnabled)}}></calcite-switch></div><div class=${I(e)}><buffer-tools .disabled=${!this.searchDistanceEnabled} .distance=${this._refineSelectionSet?.distance} .geometries=${this.geometries} @bufferComplete=${t=>{this._bufferComplete(t)}} .unit=${this._refineSelectionSet?.unit} ${u(this._bufferTools)}></buffer-tools></div></div>`}async _bufferComplete(e){if(this._bufferGeometry=Array.isArray(e.detail)?e.detail[0]:e.detail,this._bufferGeometry){let t={type:"simple-fill",color:this.bufferColor,outline:{color:this.bufferOutlineColor,width:1}},i=new V({geometry:this._bufferGeometry,symbol:t});if(this._bufferGraphicsLayer&&i&&this.mapView&&(this._bufferGraphicsLayer.removeAll(),this._bufferGraphicsLayer.add(i),(await this._selectFeatures(this._bufferGeometry)).length>0)){let s={drawnGraphic:this._sketchGraphic,bufferGraphic:i};this.drawnGraphicsArr.push(s)}}else this._bufferGraphicsLayer&&this._bufferGraphicsLayer.removeAll()}_getRefineSelectionSetList(){let e=this._getTotal(this.selectionSets),t;this.selectionSets.some(o=>o.workflowType==="REFINE"?(t=o,!0):!1);let i=0,s=0;t?.refineInfos&&Object.keys(t.refineInfos).forEach(o=>{i+=t.refineInfos[o].addIds.length,s+=t.refineInfos[o].removeIds.length});let a=this._translations.featuresAdded,f=this._translations.featuresRemoved,c=this._translations.totalSelected;return[h`<calcite-list-item .label=${a.replace("{{n}}",i.toString())}></calcite-list-item>`,h`<calcite-list-item .label=${f.replace("{{n}}",s.toString())}></calcite-list-item>`,h`<calcite-list-item .label=${c.replace("{{n}}",e.toString())}></calcite-list-item>`]}_getTotal(e){let t=$(e);return Object.keys(t).reduce((i,s)=>{let a=t[s];return i+=a.ids.length,i},0)}async _selectFeatures(e){this.selectionLoadingChange.emit(!0);let t=[];if(this._refineLayer){this._featuresCollection[this._refineLayer?.layer.id]=[];let i=await x(0,this._refineLayer?.layer,e,this._featuresCollection);this.selectionLoadingChange.emit(!1);let s=[];Object.keys(i).forEach(a=>{a===this._refineLayer?.layer.id&&(s=s.concat(i[a]))}),t=Array.isArray(s)?s.map(a=>a.attributes[a?.layer?.objectIdField]):[],this._refineSelectionSet?.undoStack&&await this._updateIds(t,this._selectionMode,this._refineSelectionSet.undoStack,this._refineLayer),this._bufferGraphicsLayer&&this._refineSelectionSet&&this._refineSelectionSet.distance>0&&(await new Promise(a=>setTimeout(a,1e3)),this._bufferGraphicsLayer.removeAll()),this.geometries=[],this._drawTools.value&&this._drawTools.value.clear()}return t}async _highlightFeatures(){let e=this._pnContextConsumer.value;e.removeHandles(),e.highlightHandles=await G(this.selectionSets)}async _updateIds(e,t,i,s){let a=!1,f=this._refineSelectionSet?.refineInfos,c=s.layer.id,o={};o[c]={addIds:[],removeIds:[],layerView:s};let n=f&&Object.keys(f).indexOf(c)>-1?f[c]:o[c];if(t==="ADD")n.addIds=[...new Set([...e,...n.addIds])],n.addIds.length>0&&i.push({ids:e,mode:t,layerView:s}),n.removeIds.length>0&&(n.removeIds=n.removeIds.filter(p=>e.indexOf(p)<0));else{let p=this.selectionSets.reduce((l,r)=>(e.forEach(d=>{r.workflowType!=="REFINE"?r.selectedIds.indexOf(d)>-1&&l.push(d):Object.keys(r.refineInfos).some(C=>{let w=r.refineInfos[C];return w.layerView.layer.id===s.layer.id&&w.addIds.indexOf(d)>-1?(l.push(d),!0):!1})}),l),[]);n.removeIds=[...new Set([...p,...n.removeIds])],n.addIds=n.addIds.filter(l=>p.indexOf(l)<0),n.removeIds.length>0&&i.push({ids:p,mode:t,layerView:s}),this.selectionSets=this.selectionSets.reduce((l,r)=>(r.workflowType!=="REFINE"&&r.layerView.layer.id===s.layer.id?(r.selectedIds=r.selectedIds.filter(d=>n.removeIds.indexOf(d)<0),r.selectedIds.length>0?l.push(r):a=!0):l.push(r),l),[])}this._refineSelectionSet&&(this._refineSelectionSet.refineInfos[c]=n),this.selectionSets=[...this.selectionSets],a&&this.selectionSetsChanged.emit(this.selectionSets),await this._highlightFeatures()}};k("refine-selection",y);return y},"Graphic","layers/GraphicsLayer",a,c)
|
|
2
|
+
import{a as D}from"./LLYTIOG4.js";import{b as E}from"./PZ4L77M5.js";import c from"./KDIUYXBA.js";import a from"./UUYUTETH.js";import{a as L}from"./HYX7BODW.js";import{b as k}from"./B2DK4LWH.js";import{F as S,G as u,H as v,J as I,h as b,i as h,r as _,u as g}from"./46DQNAMV.js";export default $arcgis.t(([V,A,{d:x},{c:m,h:G,i:$}])=>{var O=b`@layer{:host{display:block}.div-not-visible{display:none!important}.border{outline:1px solid var(--calcite-color-border-input)}.esri-sketch{display:flex;flex-flow:column wrap}.esri-widget{box-sizing:border-box;color:#323232;font-size:14px;font-family:Avenir Next,Helvetica Neue,Helvetica,Arial,sans-serif;line-height:1.3em;background-color:var(--calcite-color-foreground-1)}.esri-sketch__panel{align-items:center;display:flex;flex-flow:row nowrap;padding:0}.esri-sketch__tool-section{border-right:1px solid rgba(110,110,110,.3)}.esri-sketch__section{align-items:center;display:flex;flex-flow:row nowrap;padding:0 7px;margin:6px 0;border-right:1px solid rgba(110,110,110,.3)}.display-flex{display:flex}.font-bold{font-weight:700}.width-full{width:100%}.label-margin-0{--calcite-label-margin-bottom: 0}.padding-start-1-2{padding-inline-start:.5rem}.font-weight-500{font-weight:500}.word-wrap-anywhere{word-wrap:anywhere}.tooltip-message{padding:5px 8px;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-color-text-2);max-width:400px}}`,y=class extends v{constructor(){super(),this.enabledLayerIds=[],this.enableSearchDistance=!0,this.enableSearchDistanceOnLoad=!1,this.searchDistanceEnabled=!1,this.selectionSets=[],this.bufferColor=[227,139,79,.8],this.bufferOutlineColor=[255,255,255],this.geometries=[],this.drawnGraphicsArr=[],this._translations=L({name:"refine-selection",blocking:!0}),this._selectionMode="ADD",this._addEnabled=!0,this._drawTools=S(),this._enabledLayerIds=[],this._layerPicker=S(),this._featuresCollection={},this._pnContextConsumer=E({context:D,subscribe:!0}),this._bufferTools=S(),this._undoGraphicsArr=[],this.selectionLoadingChange=_(),this.selectionSetsChanged=_(),this.listenOn(window,"distanceChanged",this.distanceChanged),this.listenOn(window,"unitChanged",this.unitChanged)}static{this.properties={addresseeLayer:0,enabledLayerIds:0,enableSearchDistance:5,enableSearchDistanceOnLoad:5,mapView:0,searchDistanceEnabled:5,selectionSets:0,sketchLineSymbol:0,sketchPointSymbol:0,sketchPolygonSymbol:0,defaultBufferUnit:1,bufferColor:1,bufferOutlineColor:1,defaultBufferDistance:9,geometries:0,drawnGraphicsArr:0,_translations:16,_selectionMode:16,_refineLayer:16}}static{this.styles=O}static{this.shadowRootOptions=g}willUpdate(e){e.has("defaultBufferUnit")&&this.hasUpdated&&this._refineSelectionSet&&(this._refineSelectionSet.unit=this.defaultBufferUnit),e.has("defaultBufferDistance")&&this.hasUpdated&&this._refineSelectionSet&&(this._refineSelectionSet.distance=this.defaultBufferDistance)}async distanceChanged(e){e.detail.newValue!==e.detail.oldValue&&this._refineSelectionSet&&(this._refineSelectionSet.distance=e.detail.newValue)}async unitChanged(e){e.detail.newValue!==e.detail.oldValue&&this._refineSelectionSet&&(this._refineSelectionSet.unit=e.detail.newValue)}async load(){this._enabledLayerIds=this._getEnabledLayerIds(),await this._setRefineSet(this._enabledLayerIds[0]),this._undoGraphicsArr=this._refineSelectionSet?.undoGraphicsArr}async loaded(){await this._init()}render(){let e=this._enabledLayerIds.length>1?"display-block":"display-none";return h`<div class=${`${e} padding-top-sides-1`}><div class="display-flex"><calcite-label class="font-bold width-full label-margin-0"><div class="display-flex">${this._translations.inputLayer}<calcite-icon class="padding-start-1-2 icon" .flipRtl=${this._translations._lang?.toLowerCase()!=="he"} icon=question id=refine-input-layer scale=s></calcite-icon></div><map-layer-picker .enabledLayerIds=${this._enabledLayerIds} .mapView=${this.mapView} @layerSelectionChange=${t=>{this._layerSelectionChange(t)}} .selectedIds=${this._refineLayer?[this._refineLayer.layer.id]:[]} ${u(this._layerPicker)}></map-layer-picker></calcite-label><calcite-popover closable label overlay-positioning=fixed reference-element=refine-input-layer><span class="tooltip-message">${this._translations.inputLayerTip}</span></calcite-popover></div></div><div class="padding-1"><div class="padding-bottom-1"><calcite-segmented-control class="w-100" width=full><calcite-segmented-control-item .checked=${this._addEnabled} class="w-50 word-wrap-anywhere" @click=${()=>this._setSelectionMode("ADD")} value=ADD><span class="font-weight-500">${this._translations.add}</span></calcite-segmented-control-item><calcite-segmented-control-item .checked=${!this._addEnabled} class="w-50 word-wrap-anywhere" @click=${()=>this._setSelectionMode("REMOVE")} value=REMOVE><span class="font-weight-500">${this._translations.remove}</span></calcite-segmented-control-item></calcite-segmented-control></div><div><map-draw-tools active draw-mode=REFINE .mapView=${this.mapView} @drawRedo=${()=>this._redo()} @drawUndo=${()=>this._undo()} @sketchGraphicsChange=${this._sketchGraphicsChanged} .pointSymbol=${this.sketchPointSymbol} .polygonSymbol=${this.sketchPolygonSymbol} .polylineSymbol=${this.sketchLineSymbol} .redoEnabled=${this._refineSelectionSet?.redoStack&&this._refineSelectionSet.redoStack.length>0} .undoEnabled=${this._refineSelectionSet?.undoStack&&this._refineSelectionSet.undoStack.length>0} ${u(this._drawTools)}></map-draw-tools></div>${this.enableSearchDistance?this._getBufferOptions():void 0}<br>${h`<calcite-list class="list-border" label>${this._getRefineSelectionSetList()}</calcite-list>`}</div>`}async _init(){this._initGraphicsLayer()}_initGraphicsLayer(){let e=this._translations.bufferLayer;if(this.mapView){let t=this.mapView.map.layers.findIndex(i=>i.title===e);if(t>-1)this._bufferGraphicsLayer=this.mapView.map.layers.getItemAt(t);else if(this._bufferGraphicsLayer=new A({title:e,listMode:"hide"}),this._bufferGraphicsLayer){let i=this.mapView.map.layers.findIndex(s=>s.title===this._translations.sketchLayer);i>-1?this.mapView.map.layers.add(this._bufferGraphicsLayer,i):this.mapView.map.layers.add(this._bufferGraphicsLayer)}}}_layerSelectionChange(e){let t=e.detail[0];this._setRefineSet(t)}_setSelectionMode(e){this._selectionMode=e}async _sketchGraphicsChanged(e){let t=e.detail?.graphics[0],i=t.geometry;this.geometries=[i];let s=await this._selectFeatures(i);if(this._sketchGraphic=t,this._refineSelectionSet?.distance===0&&s.length>0){let a={drawnGraphic:t,bufferGraphic:void 0};this.drawnGraphicsArr.push(a)}}_getEnabledLayerIds(){return this.selectionSets.reduce((e,t)=>{let i=t?.layerView?.layer.id;return i&&e.indexOf(i)<0?e.push(i):t.workflowType==="REFINE"&&Object.keys(t.refineInfos).forEach(s=>{e.indexOf(s)<0&&e.push(s)}),e},[])}async _setRefineSet(e){this.selectionSets.some(t=>t.workflowType==="REFINE"?(this._refineSelectionSet=t,Object.keys(t.refineInfos).indexOf(e)>-1):!1)||await this._initRefineSet(e,this._refineSelectionSet),this._refineSelectionSet&&(this._refineLayer=this._refineSelectionSet.refineInfos[e].layerView)}async _initRefineSet(e,t){let i={};i[e]={addIds:[],removeIds:[],layerView:this.mapView&&await m(this.mapView,e)},t?t.refineInfos={...t.refineInfos,...i}:(this._refineSelectionSet={id:Date.now(),searchResult:void 0,buffer:void 0,distance:this.defaultBufferDistance||0,download:!0,unit:this.defaultBufferUnit||"feet",label:"Refine",selectedIds:[],layerView:this.mapView&&await m(this.mapView,e),geometries:[],graphics:[],selectLayers:[],workflowType:"REFINE",searchDistanceEnabled:!1,useLayerFeaturesEnabled:!1,refineInfos:i,redoStack:[],undoStack:[],sketchGraphic:void 0,undoGraphicsArr:[]},this.selectionSets.push(this._refineSelectionSet))}_undo(){if(this._refineSelectionSet){let e=this._refineSelectionSet.undoStack&&this._refineSelectionSet.undoStack.pop();if(e){if(this.drawnGraphicsArr.length>0){let t=this.drawnGraphicsArr.pop();t&&this._refineSelectionSet.undoGraphicsArr?.push(t),this._undoGraphicsArr.push(t)}this._refineSelectionSet.redoStack&&this._updateIds(e.ids,e.mode==="ADD"?"REMOVE":"ADD",this._refineSelectionSet.redoStack,e.layerView)}}}_redo(){if(this._refineSelectionSet){let e=this._refineSelectionSet.redoStack&&this._refineSelectionSet.redoStack.pop();if(e){if(this._undoGraphicsArr.length>0){let t=this._undoGraphicsArr.pop();this._refineSelectionSet.undoGraphicsArr?.pop(),t&&this.drawnGraphicsArr.push(t)}this._refineSelectionSet.undoStack&&this._updateIds(e.ids,e.mode==="ADD"?"REMOVE":"ADD",this._refineSelectionSet.undoStack,e.layerView)}}}_getBufferOptions(){this.enableSearchDistanceOnLoad&&this._refineSelectionSet&&(this._refineSelectionSet.searchDistanceEnabled=!0,this.searchDistanceEnabled=!0,this.enableSearchDistanceOnLoad=!1);let e=this._refineSelectionSet?.searchDistanceEnabled?"search-distance":"div-not-visible";return h`<div><div class="padding-top-1 display-flex"><calcite-label class="label-margin-0 w-100" layout=inline-space-between><div class="tooltip-container">${this._translations.searchDistance}<calcite-icon class="padding-start-1-2 icon" .flipRtl=${this._translations._lang?.toLowerCase()!=="he"} icon=question id=search-distance-icon scale=s></calcite-icon></div></calcite-label><calcite-popover closable label overlay-positioning=fixed reference-element=search-distance-icon><span class="tooltip-message">${this._translations.useSearchDistanceTootip}</span></calcite-popover><calcite-switch .checked=${this._refineSelectionSet?.searchDistanceEnabled} @calciteSwitchChange=${()=>{this.searchDistanceEnabled=!this.searchDistanceEnabled,this._refineSelectionSet&&(this._refineSelectionSet.searchDistanceEnabled=this.searchDistanceEnabled)}}></calcite-switch></div><div class=${I(e)}><buffer-tools .disabled=${!this.searchDistanceEnabled} .distance=${this._refineSelectionSet?.distance} .geometries=${this.geometries} @bufferComplete=${t=>{this._bufferComplete(t)}} .unit=${this._refineSelectionSet?.unit} ${u(this._bufferTools)}></buffer-tools></div></div>`}async _bufferComplete(e){if(this._bufferGeometry=Array.isArray(e.detail)?e.detail[0]:e.detail,this._bufferGeometry){let t={type:"simple-fill",color:this.bufferColor,outline:{color:this.bufferOutlineColor,width:1}},i=new V({geometry:this._bufferGeometry,symbol:t});if(this._bufferGraphicsLayer&&i&&this.mapView&&(this._bufferGraphicsLayer.removeAll(),this._bufferGraphicsLayer.add(i),(await this._selectFeatures(this._bufferGeometry)).length>0)){let s={drawnGraphic:this._sketchGraphic,bufferGraphic:i};this.drawnGraphicsArr.push(s)}}else this._bufferGraphicsLayer&&this._bufferGraphicsLayer.removeAll()}_getRefineSelectionSetList(){let e=this._getTotal(this.selectionSets),t;this.selectionSets.some(o=>o.workflowType==="REFINE"?(t=o,!0):!1);let i=0,s=0;t?.refineInfos&&Object.keys(t.refineInfos).forEach(o=>{i+=t.refineInfos[o].addIds.length,s+=t.refineInfos[o].removeIds.length});let a=this._translations.featuresAdded,f=this._translations.featuresRemoved,c=this._translations.totalSelected;return[h`<calcite-list-item .label=${a.replace("{{n}}",i.toString())}></calcite-list-item>`,h`<calcite-list-item .label=${f.replace("{{n}}",s.toString())}></calcite-list-item>`,h`<calcite-list-item .label=${c.replace("{{n}}",e.toString())}></calcite-list-item>`]}_getTotal(e){let t=$(e);return Object.keys(t).reduce((i,s)=>{let a=t[s];return i+=a.ids.length,i},0)}async _selectFeatures(e){this.selectionLoadingChange.emit(!0);let t=[];if(this._refineLayer){this._featuresCollection[this._refineLayer?.layer.id]=[];let i=await x(0,this._refineLayer?.layer,e,this._featuresCollection);this.selectionLoadingChange.emit(!1);let s=[];Object.keys(i).forEach(a=>{a===this._refineLayer?.layer.id&&(s=s.concat(i[a]))}),t=Array.isArray(s)?s.map(a=>a.attributes[a?.layer?.objectIdField]):[],this._refineSelectionSet?.undoStack&&await this._updateIds(t,this._selectionMode,this._refineSelectionSet.undoStack,this._refineLayer),this._bufferGraphicsLayer&&this._refineSelectionSet&&this._refineSelectionSet.distance>0&&(await new Promise(a=>setTimeout(a,1e3)),this._bufferGraphicsLayer.removeAll()),this.geometries=[],this._drawTools.value&&this._drawTools.value.clear()}return t}async _highlightFeatures(){let e=this._pnContextConsumer.value;e.removeHandles(),e.highlightHandles=await G(this.selectionSets)}async _updateIds(e,t,i,s){let a=!1,f=this._refineSelectionSet?.refineInfos,c=s.layer.id,o={};o[c]={addIds:[],removeIds:[],layerView:s};let n=f&&Object.keys(f).indexOf(c)>-1?f[c]:o[c];if(t==="ADD")n.addIds=[...new Set([...e,...n.addIds])],n.addIds.length>0&&i.push({ids:e,mode:t,layerView:s}),n.removeIds.length>0&&(n.removeIds=n.removeIds.filter(p=>e.indexOf(p)<0));else{let p=this.selectionSets.reduce((l,r)=>(e.forEach(d=>{r.workflowType!=="REFINE"?r.selectedIds.indexOf(d)>-1&&l.push(d):Object.keys(r.refineInfos).some(C=>{let w=r.refineInfos[C];return w.layerView.layer.id===s.layer.id&&w.addIds.indexOf(d)>-1?(l.push(d),!0):!1})}),l),[]);n.removeIds=[...new Set([...p,...n.removeIds])],n.addIds=n.addIds.filter(l=>p.indexOf(l)<0),n.removeIds.length>0&&i.push({ids:p,mode:t,layerView:s}),this.selectionSets=this.selectionSets.reduce((l,r)=>(r.workflowType!=="REFINE"&&r.layerView.layer.id===s.layer.id?(r.selectedIds=r.selectedIds.filter(d=>n.removeIds.indexOf(d)<0),r.selectedIds.length>0?l.push(r):a=!0):l.push(r),l),[])}this._refineSelectionSet&&(this._refineSelectionSet.refineInfos[c]=n),this.selectionSets=[...this.selectionSets],a&&this.selectionSetsChanged.emit(this.selectionSets),await this._highlightFeatures()}};k("refine-selection",y);return y},"Graphic","layers/GraphicsLayer",a,c)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
|
|
2
|
-
import{a as s,b as n,c as d}from"./CKD45FGQ.js";import{b as y}from"./
|
|
2
|
+
import{a as s,b as n,c as d}from"./CKD45FGQ.js";import{b as y}from"./B2DK4LWH.js";import{F as i,G as c,H as m,h as o,i as t,r as p}from"./46DQNAMV.js";import"./OR4HXHSY.js";var b=o`:host{display:block;--calcite-label-margin-bottom: 0}.label-display{display:block;padding-bottom:1rem}`,r=class extends m{constructor(){super(...arguments),this._densityElement=i(),this._typeElement=i(),this._severityElement=i(),this._types=Object.keys(n).filter(e=>!Number.isNaN(Number(n[e]))),this.deductValueComplete=p()}static{this.styles=b}render(){return t`<div class="label-display"><calcite-label class="label-display">\r\n Density %${this._getDensityInput()}</calcite-label><calcite-label class="label-display">\r\n Type${this._getTypeInput()}</calcite-label><calcite-label class="label-display">\r\n Severity${this._getSeverityInput()}</calcite-label></div><div>${this._getCalculateInput()}</div>`}_getDensityInput(){return t`<calcite-input max=100 min=0 type=number ${c(this._densityElement)}></calcite-input>`}_getTypeInput(){return t`<calcite-select label ${c(this._typeElement)}>${this._types.map((e,l)=>t`<calcite-option .value=${n[e].toString()}>${`${e} (${l+1})`}</calcite-option>`)}</calcite-select>`}_getSeverityInput(){return t`<calcite-select label ${c(this._severityElement)}><calcite-option .value=${s.H}>\r\n High</calcite-option><calcite-option .value=${s.M}>\r\n Medium</calcite-option><calcite-option .value=${s.L}>\r\n Low</calcite-option></calcite-select>`}_getCalculateInput(){let e=this._typeElement.value&&Number.parseFloat(this._typeElement.value.value),l=this._severityElement.value&&this._severityElement.value.value,a=this._densityElement.value&&Number.parseFloat(this._densityElement.value.value);return t`<calcite-button @click=${()=>this._calculateDeduct(e,l,a)}>\r\n Calculate Deduct Value</calcite-button>`}_calculateDeduct(e,l,a){if(e&&l&&!Number.isNaN(a)){let u=d(e.toString(),l.toString(),a.toString(),!0);this.deductValueComplete.emit(u),alert(u)}else alert("Type, severity, and a density number are required")}};y("deduct-calculator",r);export{r as DeductCalculator};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
|
|
2
|
-
import c from"./UIJUUMOH.js";import b from"./BXXSHO4P.js";import a from"./PEBFXPSL.js";import{b as C}from"./PZ4L77M5.js";import"./JE7L7M3J.js";import{a as w}from"./Z73DPA3J.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import"./AOBFPJ2R.js";import"./JK6XUSIM.js";import"./UPHYUDLT.js";import"./QJJXVRMV.js";import"./7FMLZNDR.js";import"./LL5C4DHP.js";import"./WPAMUSBR.js";import"./XJPOVJV7.js";import"./LDNQ56OK.js";import"./3HUY3T5F.js";import"./Z6G5PBUQ.js";import"./J3QMHA2M.js";import"./TKZAMPEI.js";import"./2IHQU2FX.js";import"./CGLFPVBM.js";import"./OEJAW72H.js";import"./5JJMGPOW.js";import"./TYX345MZ.js";import"./5UWT66A7.js";import{b as f}from"./7JVIFSRF.js";import{F as u,G as d,H as g,L as y,h as m,i as r,j as _,r as l}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([{I:T,b:v,p:c,s:n,t:x},,{a:h,b:b}])=>{var D=m`calcite-panel{width:100%;height:100%;--calcite-panel-background-color: var(--calcite-color-foreground-2)}.card-group{overflow:hidden;padding:.25rem var(--calcite-spacing-xxs) var(--calcite-spacing-md)}.text-center{text-align:center}.leader-1{margin-top:var(--calcite-spacing-xxl)}.trailer-1{margin-bottom:var(--calcite-spacing-xxl)}.warning-text{max-width:35em;margin-left:auto;margin-right:auto;font-size:var(--calcite-font-size-md)}.no-solutions{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;min-height:calc(100vh - 190px)}.display-flex{display:flex}.display-none{display:none}.flex-direction-column{flex-direction:column}h1{font-weight:unset;margin:0;padding:0}solution-deployed-card{width:calc(20% - .75rem)}@media(max-width:1280px){solution-deployed-card{width:calc(25% - .75rem)}}@media(max-width:1010px){solution-deployed-card{width:calc(33.333% - .75rem)}}@media(max-width:740px){solution-deployed-card{width:calc(50% - .75rem)}}@media(max-width:440px){solution-deployed-card{width:calc(100% - .75rem)}}.margin-top-half{margin-top:.5rem}`,S=5,p=class extends g{constructor(){super(),this.sortType="created",this._cards=[],this._cardsFetching=!1,this._modifiedCheckTry=0,this._newId="",this._refs={},this._showDeleteCompleteAlert=!1,this._deletedSolutionName="",this._translations=w({name:"solutions-deployed-panel",blocking:!0}),this._agoTerms=c,this._allCards=[],this._baseAgoTerms=c,this._categories=[],this._mainPanelRef=u(),this._panelFixed=!1,this._configContextConsumer=C({context:v,subscribe:!0,callback:async e=>{e&&(this._initCardsFetchers(),await this._getDeployedSolutions())}}),this._delay=!1,this._owner="My solutions",this._sortField="created",this._sortOrder="desc",this.deployedCardsFetched=l(),this.searchTermSet=l(),this.sortTypeSet=l(),this.listenOn(window,"solutionDeleted",e=>{this._modifiedCheckTry=S,this.reload(e.detail.showAlert,e.detail.refreshSolutionsTimeout,e.detail.solutionTitle)}),this.listenOn(window,"solutionConfigureDialogClose",e=>{e.detail&&this.reload(!1,!1)}),this.listenOn(window,"deployProgressEnd",e=>{this._modifiedCheckTry=S,this._refreshAfterDeploy(e.detail)}),this.listenOn(window,"sortTypeChanged",e=>{e.detail&&e.detail.scope==="deployments"&&(this.sortType=e.detail.sortType,this._telemetry?.logEvent({category:n.DEPLOYMENTS,action:"Sort",dimensions:[T(e.detail.sortType)]}),this.searchSolutions(e.detail))}),this.listenOn(window,"searchChanged",e=>{e.detail&&e.detail.scope==="deployments"&&(e.detail.logSearchTelemetry&&e.detail.option?.searchTerm?this._telemetry?.logEvent({category:n.DEPLOYMENTS,action:"Search",dimensions:[e.detail.option.searchTerm]}):this.searchSolutions(e.detail.option))})}static{this.properties={sortType:1,_cards:16,_cardsFetching:16,_modifiedCheckTry:16,_newId:16,_refs:16,_showDeleteCompleteAlert:16,_deletedSolutionName:16,_translations:16}}static{this.styles=D}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}async reload(e=!0,t=!0,s){this._initCardsFetchers(),e&&(this._showDeleteCompleteAlert=!0,this._deletedSolutionName=s||this._translations.solution),t?setTimeout(()=>{(async()=>{try{await this._getDeployedSolutions()}catch(i){console.error("Error getting deployed solutions:",i)}})()},500):await this._getDeployedSolutions()}async searchSolutions(e){if(e){if("searchTerm"in e&&this._setSearchTerm(e.searchTerm||""),"sortType"in e&&this._setSortOptions(e),Object.keys(e).indexOf("type")>-1){let t=e;this._owner=t.value,this._telemetry?.logEvent({category:n.DEPLOYMENTS,action:"Filter",dimensions:[t.value==="My solutions"?"My content":"Organization"]})}if(Object.keys(e).indexOf("filter")>-1){let t=e;this._owner=t.filter===x.ORG?"My organization's solutions":"My solutions"}}else this._agoTerms=this._baseAgoTerms,this._clearFilterCategories();await this._getDeployedSolutions()}async setSearchOptions(e){e&&("searchTerm"in e&&(this._setSearchTerm(e.searchTerm),this.searchTermSet.emit({searchTerm:e.searchTerm,scope:"deployments"})),"sortType"in e&&(this._setSortOptions(e),this.sortTypeSet.emit({sortType:e.sortType,scope:"deployments"})))}updated(){this._fixPanelContentWrapperFocus()}_fixPanelContentWrapperFocus(){if(!this._panelFixed&&this._mainPanelRef.value){let e=this._mainPanelRef.value;e.componentOnReady?.().then(()=>{if(e.shadowRoot){let t=e.shadowRoot.querySelector(".content-wrapper");t&&(t.tabIndex=-1,this._panelFixed=!0,this._setupPanelObserver())}}).catch(()=>{this._panelFixed=!0})}}_setupPanelObserver(){if(this._panelObserver)return;this._panelObserver=new MutationObserver(t=>{t.forEach(s=>{if(s.type==="attributes"&&s.attributeName==="tabindex"){let i=s.target;i.classList.contains("content-wrapper")&&i.tabIndex===0&&(i.tabIndex=-1)}})});let e=this._mainPanelRef.value;if(e?.shadowRoot){let t=e.shadowRoot.querySelector(".content-wrapper");t&&this._panelObserver.observe(t,{attributes:!0,attributeFilter:["tabindex"]})}}disconnectedCallback(){super.disconnectedCallback(),this._panelObserver?.disconnect()}render(){return this._cardsFetching?r`<calcite-loader .label=${this._translations.fetchingDeployedSolutions}></calcite-loader>`:this._cards.length?r`<calcite-panel ${d(this._mainPanelRef)}><calcite-card-group class="card-group" .label=${this._translations.allDeployed}>${this._renderCards()}</calcite-card-group><calcite-alert auto-close auto-close-duration=fast icon=check-circle kind=success .label=${this._translations.deleteComplete.replace("{{solutionName}}",this._deletedSolutionName)} .open=${this._showDeleteCompleteAlert} @calciteAlertClose=${()=>{this._showDeleteCompleteAlert=!1}}><div slot=title>${this._translations.deleteComplete.replace("{{solutionName}}",this._deletedSolutionName)}</div></calcite-alert></calcite-panel>`:r`<div class="no-solutions">${this._getSolutionsBriefcase()}<div class="text-center leader-1 warning-text trailer-1 display-flex flex-direction-column"><div>${this._translations.noSolutionsFound}</div><div class="margin-top-half">${this._translations.noSolutionsInstruction}</div></div></div>`}_initCardsFetchers(){if(this._configContextConsumer.value){let e=this._configContextConsumer.value;this._cardsFetcher=new h(e.locale,e.orgUrl,e.portalURL),this._cardsFetcherDeployed=new h(e.locale,e.orgUrl,e.portalURL)}}_renderCards(){return this._refs={},this._cards.map(e=>r`<solution-deployed-card .card=${e} .deployedDate=${e.created} .description=${e.snippet} .diagramKey=${this._configContextConsumer.value?.diagramKey} .heading=${e.title} id=${e.id??y} .itemId=${e.id} .owner=${this._owner==="My solutions"?"":e.owner} .thumbnail=${e.thumbnailUrl} ${d(this._handleRefs)}></solution-deployed-card>`)}_handleRefs(e){e&&(this._refs[e.id]=e)}async _getDeployedSolutions(){let e=this._configContextConsumer.value.authentication;if(e.IsSignedIn){this._abortController?(this._abortController.abort("redundant request"),this._abortController=new AbortController):this._abortController=new AbortController,this._cardsFetching=!0;try{let t=await b(e,this._configContextConsumer.value.userSession,this._cardsFetcher,this._cardsFetcherDeployed,this._agoTerms,this._sortField,this._sortOrder,this._delay,this._categories,this._allCards,this._abortController.signal,this._owner);this._abortController=void 0,this._modifiedCheckTry>0&&(this._cards?.length===t?.cards?.length?(this._modifiedCheckTry--,this._getDeployedSolutions()):this._modifiedCheckTry=0),this._cards=t?.cards??[],this.deployedCardsFetched.emit(this._cards.length),this._cardsFetching=!1}catch(t){t.message!=="redundant request"&&console.warn(t)}}}_getSolutionsBriefcase(){return r`<div><svg viewBox="0 0 64 64" width=200 height=200 xmlns=http://www.w3.org/2000/svg fill=var(--calcite-color-text-3)>${_`<path d="M10.723 54.9h6.409a7.896 7.896 0 0 0 13.736 0h23.896a4.137 4.137 0 0 0 4.136-4.136l-.004-32.446a3.222 3.222 0 0 0-3.217-3.219l-10.779.064V9.836A3.741 3.741 0 0 0 41.163 6.1H23.837A3.741 3.741 0 0 0 20.1 9.836l.067 5.264-10.8.004A3.275 3.275 0 0 0 6.1 18.37L6.096 26a.893.893 0 0 0 .263.636.907.907 0 0 0 .638.263l5.902-.014.013-5.985 38.781.01a.407.407 0 0 1 .407.407l.008 22.925a2.858 2.858 0 0 1-2.857 2.858H30.868a7.896 7.896 0 0 0-13.736 0H12.9v-5.2a.801.801 0 0 0-.8-.8H6.9a.801.801 0 0 0-.8.8l-.001 8.375a4.59 4.59 0 0 0 1.353 3.27 4.658 4.658 0 0 0 3.27 1.355zM6.9 41.9h5.2v6h5.51l.112-.213a7.098 7.098 0 0 1 12.556 0l.113.213h18.86a3.683 3.683 0 0 0 2.587-1.071 3.635 3.635 0 0 0 1.071-2.587L52.9 21.317a1.208 1.208 0 0 0-1.207-1.207l-38.867-.01a.714.714 0 0 0-.714.712l-.011 5.275-5.106.012.001.4-.1-.499.003-7.628a2.471 2.471 0 0 1 2.468-2.469l10.8-.003a.734.734 0 0 0 .733-.733v-5.33A2.94 2.94 0 0 1 23.837 6.9h17.326A2.94 2.94 0 0 1 44.1 9.836v5.327a.734.734 0 0 0 .733.733l10.846.003a2.421 2.421 0 0 1 2.417 2.419l.004 32.446a3.337 3.337 0 0 1-3.336 3.336H30.39l-.113.213a7.098 7.098 0 0 1-12.556 0l-.113-.213h-6.886a3.85 3.85 0 0 1-2.704-1.12 3.796 3.796 0 0 1-1.12-2.705zm17.1 13a3.9 3.9 0 1 0-3.9-3.9 3.905 3.905 0 0 0 3.9 3.9zm0-7a3.1 3.1 0 1 1-3.1 3.1 3.103 3.103 0 0 1 3.1-3.1zm10-6a7.918 7.918 0 0 0 7.349-5h4.818a.734.734 0 0 0 .733-.733v-4.334a.734.734 0 0 0-.733-.733h-4.818a7.9 7.9 0 0 0-14.698 0H5.833a.734.734 0 0 0-.733.733v4.334a.734.734 0 0 0 .733.733h20.818a7.918 7.918 0 0 0 7.349 5zm-28.167-10h21.378l.095-.266a7.1 7.1 0 0 1 13.388 0l.095.266 5.31-.066.068 4.266h-5.378l-.095.266a7.1 7.1 0 0 1-13.388 0l-.095-.266-21.31.066zM34 37.9a3.9 3.9 0 1 0-3.9-3.9 3.905 3.905 0 0 0 3.9 3.9zm0-7a3.1 3.1 0 1 1-3.1 3.1 3.103 3.103 0 0 1 3.1-3.1zm5.658-20.8H25.342a1.244 1.244 0 0 0-1.242 1.242V15.9h16.8v-4.558a1.244 1.244 0 0 0-1.242-1.242zm.442 5H24.9v-3.758a.443.443 0 0 1 .442-.442h14.316a.443.443 0 0 1 .442.442z" />`}</svg></div>`}_setSearchTerm(e){this._agoTerms=this._baseAgoTerms+` ${e}`}_setSortOptions(e){let t=e.sortType;t==="relevance"||t==="title"?(t==="title"&&(this._sortOrder="asc"),this._sortField=t):(t==="updated"||t==="created")&&(this._sortOrder="desc",this._sortField=t),this.sortType=t}_clearFilterCategories(){this._categories=[]}async _refreshAfterDeploy(e){if(e){this._newId=e;let t=10,s=500;for(let a=0;a<t&&(await this._getDeployedSolutions(),!this._cards.some(o=>o.id===e));a++)a<t-1&&await new Promise(o=>setTimeout(o,s));await this.updateComplete;let i=10,F=100;for(let a=0;a<i;a++){if(this._refs[e]){let o=this._cards.find(O=>O.id===e);window.dispatchEvent(new CustomEvent("deployedCardReady",{detail:{card:o,cardRef:this._refs[e]}})),this._newId="";return}await new Promise(o=>setTimeout(o,F)),await this.updateComplete}console.warn(`Failed to find ref for newly deployed solution after all retries: ${e}`),window.dispatchEvent(new CustomEvent("deploymentCompletedWithoutNav",{detail:{solutionId:e}})),this._newId=""}}};f("solutions-deployed-panel",p);return p},a,b,c)
|
|
2
|
+
import c from"./CEYUKUGR.js";import b from"./C3QDGTJR.js";import a from"./XBVKGREH.js";import{b as C}from"./PZ4L77M5.js";import"./JE7L7M3J.js";import{a as w}from"./HYX7BODW.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import"./AOBFPJ2R.js";import"./JK6XUSIM.js";import"./UPHYUDLT.js";import"./QJJXVRMV.js";import"./7FMLZNDR.js";import"./LL5C4DHP.js";import"./WPAMUSBR.js";import"./XJPOVJV7.js";import"./LDNQ56OK.js";import"./3HUY3T5F.js";import"./Z6G5PBUQ.js";import"./J3QMHA2M.js";import"./TKZAMPEI.js";import"./2IHQU2FX.js";import"./CGLFPVBM.js";import"./OEJAW72H.js";import"./5JJMGPOW.js";import"./TYX345MZ.js";import"./5UWT66A7.js";import{b as f}from"./B2DK4LWH.js";import{F as u,G as d,H as g,L as y,h as m,i as r,j as _,r as l}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([{I:T,b:v,p:c,s:n,t:x},,{a:h,b:b}])=>{var D=m`calcite-panel{width:100%;height:100%;--calcite-panel-background-color: var(--calcite-color-foreground-2)}.card-group{overflow:hidden;padding:.25rem var(--calcite-spacing-xxs) var(--calcite-spacing-md)}.text-center{text-align:center}.leader-1{margin-top:var(--calcite-spacing-xxl)}.trailer-1{margin-bottom:var(--calcite-spacing-xxl)}.warning-text{max-width:35em;margin-left:auto;margin-right:auto;font-size:var(--calcite-font-size-md)}.no-solutions{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;min-height:calc(100vh - 190px)}.display-flex{display:flex}.display-none{display:none}.flex-direction-column{flex-direction:column}h1{font-weight:unset;margin:0;padding:0}solution-deployed-card{width:calc(20% - .75rem)}@media(max-width:1280px){solution-deployed-card{width:calc(25% - .75rem)}}@media(max-width:1010px){solution-deployed-card{width:calc(33.333% - .75rem)}}@media(max-width:740px){solution-deployed-card{width:calc(50% - .75rem)}}@media(max-width:440px){solution-deployed-card{width:calc(100% - .75rem)}}.margin-top-half{margin-top:.5rem}`,S=5,p=class extends g{constructor(){super(),this.sortType="created",this._cards=[],this._cardsFetching=!1,this._modifiedCheckTry=0,this._newId="",this._refs={},this._showDeleteCompleteAlert=!1,this._deletedSolutionName="",this._translations=w({name:"solutions-deployed-panel",blocking:!0}),this._agoTerms=c,this._allCards=[],this._baseAgoTerms=c,this._categories=[],this._mainPanelRef=u(),this._panelFixed=!1,this._configContextConsumer=C({context:v,subscribe:!0,callback:async e=>{e&&(this._initCardsFetchers(),await this._getDeployedSolutions())}}),this._delay=!1,this._owner="My solutions",this._sortField="created",this._sortOrder="desc",this.deployedCardsFetched=l(),this.searchTermSet=l(),this.sortTypeSet=l(),this.listenOn(window,"solutionDeleted",e=>{this._modifiedCheckTry=S,this.reload(e.detail.showAlert,e.detail.refreshSolutionsTimeout,e.detail.solutionTitle)}),this.listenOn(window,"solutionConfigureDialogClose",e=>{e.detail&&this.reload(!1,!1)}),this.listenOn(window,"deployProgressEnd",e=>{this._modifiedCheckTry=S,this._refreshAfterDeploy(e.detail)}),this.listenOn(window,"sortTypeChanged",e=>{e.detail&&e.detail.scope==="deployments"&&(this.sortType=e.detail.sortType,this._telemetry?.logEvent({category:n.DEPLOYMENTS,action:"Sort",dimensions:[T(e.detail.sortType)]}),this.searchSolutions(e.detail))}),this.listenOn(window,"searchChanged",e=>{e.detail&&e.detail.scope==="deployments"&&(e.detail.logSearchTelemetry&&e.detail.option?.searchTerm?this._telemetry?.logEvent({category:n.DEPLOYMENTS,action:"Search",dimensions:[e.detail.option.searchTerm]}):this.searchSolutions(e.detail.option))})}static{this.properties={sortType:1,_cards:16,_cardsFetching:16,_modifiedCheckTry:16,_newId:16,_refs:16,_showDeleteCompleteAlert:16,_deletedSolutionName:16,_translations:16}}static{this.styles=D}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}async reload(e=!0,t=!0,s){this._initCardsFetchers(),e&&(this._showDeleteCompleteAlert=!0,this._deletedSolutionName=s||this._translations.solution),t?setTimeout(()=>{(async()=>{try{await this._getDeployedSolutions()}catch(i){console.error("Error getting deployed solutions:",i)}})()},500):await this._getDeployedSolutions()}async searchSolutions(e){if(e){if("searchTerm"in e&&this._setSearchTerm(e.searchTerm||""),"sortType"in e&&this._setSortOptions(e),Object.keys(e).indexOf("type")>-1){let t=e;this._owner=t.value,this._telemetry?.logEvent({category:n.DEPLOYMENTS,action:"Filter",dimensions:[t.value==="My solutions"?"My content":"Organization"]})}if(Object.keys(e).indexOf("filter")>-1){let t=e;this._owner=t.filter===x.ORG?"My organization's solutions":"My solutions"}}else this._agoTerms=this._baseAgoTerms,this._clearFilterCategories();await this._getDeployedSolutions()}async setSearchOptions(e){e&&("searchTerm"in e&&(this._setSearchTerm(e.searchTerm),this.searchTermSet.emit({searchTerm:e.searchTerm,scope:"deployments"})),"sortType"in e&&(this._setSortOptions(e),this.sortTypeSet.emit({sortType:e.sortType,scope:"deployments"})))}updated(){this._fixPanelContentWrapperFocus()}_fixPanelContentWrapperFocus(){if(!this._panelFixed&&this._mainPanelRef.value){let e=this._mainPanelRef.value;e.componentOnReady?.().then(()=>{if(e.shadowRoot){let t=e.shadowRoot.querySelector(".content-wrapper");t&&(t.tabIndex=-1,this._panelFixed=!0,this._setupPanelObserver())}}).catch(()=>{this._panelFixed=!0})}}_setupPanelObserver(){if(this._panelObserver)return;this._panelObserver=new MutationObserver(t=>{t.forEach(s=>{if(s.type==="attributes"&&s.attributeName==="tabindex"){let i=s.target;i.classList.contains("content-wrapper")&&i.tabIndex===0&&(i.tabIndex=-1)}})});let e=this._mainPanelRef.value;if(e?.shadowRoot){let t=e.shadowRoot.querySelector(".content-wrapper");t&&this._panelObserver.observe(t,{attributes:!0,attributeFilter:["tabindex"]})}}disconnectedCallback(){super.disconnectedCallback(),this._panelObserver?.disconnect()}render(){return this._cardsFetching?r`<calcite-loader .label=${this._translations.fetchingDeployedSolutions}></calcite-loader>`:this._cards.length?r`<calcite-panel ${d(this._mainPanelRef)}><calcite-card-group class="card-group" .label=${this._translations.allDeployed}>${this._renderCards()}</calcite-card-group><calcite-alert auto-close auto-close-duration=fast icon=check-circle kind=success .label=${this._translations.deleteComplete.replace("{{solutionName}}",this._deletedSolutionName)} .open=${this._showDeleteCompleteAlert} @calciteAlertClose=${()=>{this._showDeleteCompleteAlert=!1}}><div slot=title>${this._translations.deleteComplete.replace("{{solutionName}}",this._deletedSolutionName)}</div></calcite-alert></calcite-panel>`:r`<div class="no-solutions">${this._getSolutionsBriefcase()}<div class="text-center leader-1 warning-text trailer-1 display-flex flex-direction-column"><div>${this._translations.noSolutionsFound}</div><div class="margin-top-half">${this._translations.noSolutionsInstruction}</div></div></div>`}_initCardsFetchers(){if(this._configContextConsumer.value){let e=this._configContextConsumer.value;this._cardsFetcher=new h(e.locale,e.orgUrl,e.portalURL),this._cardsFetcherDeployed=new h(e.locale,e.orgUrl,e.portalURL)}}_renderCards(){return this._refs={},this._cards.map(e=>r`<solution-deployed-card .card=${e} .deployedDate=${e.created} .description=${e.snippet} .diagramKey=${this._configContextConsumer.value?.diagramKey} .heading=${e.title} id=${e.id??y} .itemId=${e.id} .owner=${this._owner==="My solutions"?"":e.owner} .thumbnail=${e.thumbnailUrl} ${d(this._handleRefs)}></solution-deployed-card>`)}_handleRefs(e){e&&(this._refs[e.id]=e)}async _getDeployedSolutions(){let e=this._configContextConsumer.value.authentication;if(e.IsSignedIn){this._abortController?(this._abortController.abort("redundant request"),this._abortController=new AbortController):this._abortController=new AbortController,this._cardsFetching=!0;try{let t=await b(e,this._configContextConsumer.value.userSession,this._cardsFetcher,this._cardsFetcherDeployed,this._agoTerms,this._sortField,this._sortOrder,this._delay,this._categories,this._allCards,this._abortController.signal,this._owner);this._abortController=void 0,this._modifiedCheckTry>0&&(this._cards?.length===t?.cards?.length?(this._modifiedCheckTry--,this._getDeployedSolutions()):this._modifiedCheckTry=0),this._cards=t?.cards??[],this.deployedCardsFetched.emit(this._cards.length),this._cardsFetching=!1}catch(t){t.message!=="redundant request"&&console.warn(t)}}}_getSolutionsBriefcase(){return r`<div><svg viewBox="0 0 64 64" width=200 height=200 xmlns=http://www.w3.org/2000/svg fill=var(--calcite-color-text-3)>${_`<path d="M10.723 54.9h6.409a7.896 7.896 0 0 0 13.736 0h23.896a4.137 4.137 0 0 0 4.136-4.136l-.004-32.446a3.222 3.222 0 0 0-3.217-3.219l-10.779.064V9.836A3.741 3.741 0 0 0 41.163 6.1H23.837A3.741 3.741 0 0 0 20.1 9.836l.067 5.264-10.8.004A3.275 3.275 0 0 0 6.1 18.37L6.096 26a.893.893 0 0 0 .263.636.907.907 0 0 0 .638.263l5.902-.014.013-5.985 38.781.01a.407.407 0 0 1 .407.407l.008 22.925a2.858 2.858 0 0 1-2.857 2.858H30.868a7.896 7.896 0 0 0-13.736 0H12.9v-5.2a.801.801 0 0 0-.8-.8H6.9a.801.801 0 0 0-.8.8l-.001 8.375a4.59 4.59 0 0 0 1.353 3.27 4.658 4.658 0 0 0 3.27 1.355zM6.9 41.9h5.2v6h5.51l.112-.213a7.098 7.098 0 0 1 12.556 0l.113.213h18.86a3.683 3.683 0 0 0 2.587-1.071 3.635 3.635 0 0 0 1.071-2.587L52.9 21.317a1.208 1.208 0 0 0-1.207-1.207l-38.867-.01a.714.714 0 0 0-.714.712l-.011 5.275-5.106.012.001.4-.1-.499.003-7.628a2.471 2.471 0 0 1 2.468-2.469l10.8-.003a.734.734 0 0 0 .733-.733v-5.33A2.94 2.94 0 0 1 23.837 6.9h17.326A2.94 2.94 0 0 1 44.1 9.836v5.327a.734.734 0 0 0 .733.733l10.846.003a2.421 2.421 0 0 1 2.417 2.419l.004 32.446a3.337 3.337 0 0 1-3.336 3.336H30.39l-.113.213a7.098 7.098 0 0 1-12.556 0l-.113-.213h-6.886a3.85 3.85 0 0 1-2.704-1.12 3.796 3.796 0 0 1-1.12-2.705zm17.1 13a3.9 3.9 0 1 0-3.9-3.9 3.905 3.905 0 0 0 3.9 3.9zm0-7a3.1 3.1 0 1 1-3.1 3.1 3.103 3.103 0 0 1 3.1-3.1zm10-6a7.918 7.918 0 0 0 7.349-5h4.818a.734.734 0 0 0 .733-.733v-4.334a.734.734 0 0 0-.733-.733h-4.818a7.9 7.9 0 0 0-14.698 0H5.833a.734.734 0 0 0-.733.733v4.334a.734.734 0 0 0 .733.733h20.818a7.918 7.918 0 0 0 7.349 5zm-28.167-10h21.378l.095-.266a7.1 7.1 0 0 1 13.388 0l.095.266 5.31-.066.068 4.266h-5.378l-.095.266a7.1 7.1 0 0 1-13.388 0l-.095-.266-21.31.066zM34 37.9a3.9 3.9 0 1 0-3.9-3.9 3.905 3.905 0 0 0 3.9 3.9zm0-7a3.1 3.1 0 1 1-3.1 3.1 3.103 3.103 0 0 1 3.1-3.1zm5.658-20.8H25.342a1.244 1.244 0 0 0-1.242 1.242V15.9h16.8v-4.558a1.244 1.244 0 0 0-1.242-1.242zm.442 5H24.9v-3.758a.443.443 0 0 1 .442-.442h14.316a.443.443 0 0 1 .442.442z" />`}</svg></div>`}_setSearchTerm(e){this._agoTerms=this._baseAgoTerms+` ${e}`}_setSortOptions(e){let t=e.sortType;t==="relevance"||t==="title"?(t==="title"&&(this._sortOrder="asc"),this._sortField=t):(t==="updated"||t==="created")&&(this._sortOrder="desc",this._sortField=t),this.sortType=t}_clearFilterCategories(){this._categories=[]}async _refreshAfterDeploy(e){if(e){this._newId=e;let t=10,s=500;for(let a=0;a<t&&(await this._getDeployedSolutions(),!this._cards.some(o=>o.id===e));a++)a<t-1&&await new Promise(o=>setTimeout(o,s));await this.updateComplete;let i=10,F=100;for(let a=0;a<i;a++){if(this._refs[e]){let o=this._cards.find(O=>O.id===e);window.dispatchEvent(new CustomEvent("deployedCardReady",{detail:{card:o,cardRef:this._refs[e]}})),this._newId="";return}await new Promise(o=>setTimeout(o,F)),await this.updateComplete}console.warn(`Failed to find ref for newly deployed solution after all retries: ${e}`),window.dispatchEvent(new CustomEvent("deploymentCompletedWithoutNav",{detail:{solutionId:e}})),this._newId=""}}};f("solutions-deployed-panel",p);return p},a,b,c)
|