@esri/solutions-components 5.0.2 → 5.0.3
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/{PNBTKFO6.js → 254AARKL.js} +1 -1
- package/dist/cdn/{VYTGCKEU.js → 2OL2CMZE.js} +1 -1
- package/dist/cdn/{5UEEUPL5.js → 3H5S6KGV.js} +1 -1
- package/dist/cdn/{XFEOA56B.js → 3NTCGBPK.js} +1 -1
- package/dist/cdn/{ASSNR5JI.js → 3QMNW3AL.js} +1 -1
- package/dist/cdn/{4CMHNL7Z.js → 3X5E5PEB.js} +1 -1
- package/dist/cdn/{TUGGGATS.js → 46N6WE5W.js} +1 -1
- package/dist/cdn/{W53A2CNH.js → 47EMI5L2.js} +1 -1
- package/dist/cdn/{RDWJHF5P.js → 4H3LGV2O.js} +1 -1
- package/dist/cdn/{2642PFUF.js → 4TZGWL7D.js} +1 -1
- package/dist/cdn/{FL74XITX.js → 5H3T3ZTG.js} +1 -1
- package/dist/cdn/{MMZXFDQZ.js → 632Z67I5.js} +1 -1
- package/dist/cdn/{BGO3JXY3.js → 65I7NFWN.js} +1 -1
- package/dist/cdn/{WZZG5H7Q.js → 6GMSPYN2.js} +1 -1
- package/dist/cdn/{LFIJXE3U.js → 6LLQFZGG.js} +1 -1
- package/dist/cdn/{Y4YYE2LG.js → 7G7GTCD2.js} +1 -1
- package/dist/cdn/{HAAFUV3J.js → 7QOFBIFO.js} +1 -1
- package/dist/cdn/{54WM76XB.js → A25PBMLE.js} +1 -1
- package/dist/cdn/{FUUWSZIZ.js → B5ARN6DC.js} +1 -1
- package/dist/cdn/{ZQJ2QLO5.js → B7LNGJY2.js} +1 -1
- package/dist/cdn/{CK7LURBK.js → BAVJY3AH.js} +1 -1
- package/dist/cdn/{YQECYE4M.js → BVBWBQGA.js} +1 -1
- package/dist/cdn/{FZ4NFB5R.js → DIG42YV7.js} +1 -1
- package/dist/cdn/{D2QNPQWY.js → E5GLDSJZ.js} +1 -1
- package/dist/cdn/{E4L5GTBZ.js → EG4OLFS7.js} +1 -1
- package/dist/cdn/F7CBQCHQ.js +2 -0
- package/dist/cdn/{LGUC7DRT.js → F7KPKXY6.js} +1 -1
- package/dist/cdn/{GJJOB4RR.js → FRM6WUOB.js} +1 -1
- package/dist/cdn/{USIESVTZ.js → GHL7S2IO.js} +1 -1
- package/dist/cdn/{M7OEPT52.js → GVHIJ3IB.js} +1 -1
- package/dist/cdn/{QXLM22NS.js → H2ZDTZJM.js} +1 -1
- package/dist/cdn/{HNRZHAOD.js → HLTPPQD5.js} +1 -1
- package/dist/cdn/{3M6AYSM7.js → IJBEMLYV.js} +1 -1
- package/dist/cdn/{VCH6XDEH.js → IKK4EKF4.js} +1 -1
- package/dist/cdn/{U75PDOJF.js → JMOT5FWT.js} +1 -1
- package/dist/cdn/{JHOXJY5O.js → JO4WX767.js} +1 -1
- package/dist/cdn/{C43NWBRR.js → KB2TRJ24.js} +1 -1
- package/dist/cdn/LI7AOAAS.js +2 -0
- package/dist/cdn/{4OZQG5MW.js → LT26PSOA.js} +1 -1
- package/dist/cdn/{OLDYKR5E.js → LYVD54Z4.js} +1 -1
- package/dist/cdn/{WDFQGUHD.js → MJM54ITG.js} +1 -1
- package/dist/cdn/{2J6ZHQEF.js → MKJGHHQA.js} +1 -1
- package/dist/cdn/{BHHQFUCH.js → MOQP5E5H.js} +1 -1
- package/dist/cdn/{N5YBX6NM.js → MQ3VVC37.js} +1 -1
- package/dist/cdn/{BFHVGXZN.js → O5B2N6WR.js} +1 -1
- package/dist/cdn/{DZUVI4S3.js → OELPVFFA.js} +1 -1
- package/dist/cdn/OWIJJGEY.js +2 -0
- package/dist/cdn/{B5SYTUTT.js → PHNGM56J.js} +1 -1
- package/dist/cdn/{ZYTKA3NP.js → PTCD4PWF.js} +1 -1
- package/dist/cdn/{5VP4DXWE.js → PUFV6POH.js} +1 -1
- package/dist/cdn/{KVR3XE7B.js → PXZF4QLN.js} +1 -1
- package/dist/cdn/{LQ3CLDU5.js → Q364IAYO.js} +1 -1
- package/dist/cdn/{ZRCMN3AQ.js → Q5CDQ25L.js} +1 -1
- package/dist/cdn/{UDTF5SYU.js → QDQVOSEM.js} +1 -1
- package/dist/cdn/{VDDTJAF2.js → QFQS5CRA.js} +1 -1
- package/dist/cdn/{N7RLYKQG.js → QKSDEEHH.js} +1 -1
- package/dist/cdn/{UR6OMPID.js → QO5AMX4U.js} +1 -1
- package/dist/cdn/{RTSKNY33.js → QRPBAR4V.js} +1 -1
- package/dist/cdn/{LTBO6VJF.js → RNEXKDUX.js} +1 -1
- package/dist/cdn/{BVWFZPY7.js → S23N6TCC.js} +1 -1
- package/dist/cdn/{6E6CKB2R.js → SHZO2XLE.js} +1 -1
- package/dist/cdn/{TAXUQXTN.js → SJEXGZK4.js} +1 -1
- package/dist/cdn/{5Z32YRHM.js → SVAPYMHV.js} +1 -1
- package/dist/cdn/{HLPUNGB5.js → TH6ZKLKN.js} +1 -1
- package/dist/cdn/{KKI72ISR.js → TZR3I4ZP.js} +1 -1
- package/dist/cdn/{AJRYDDC7.js → U2XTDZYY.js} +1 -1
- package/dist/cdn/{XUFPQNGT.js → UDOITPWM.js} +1 -1
- package/dist/cdn/{QKGOQ7EC.js → URNDQQPI.js} +1 -1
- package/dist/cdn/{UDPPJCXC.js → UW42HUTN.js} +1 -1
- package/dist/cdn/{JN4HYWSX.js → VNMG3E5D.js} +1 -1
- package/dist/cdn/{QJ4MQK3Y.js → VPNO4RA7.js} +1 -1
- package/dist/cdn/{Y3FTYVXY.js → WEWRDXGB.js} +1 -1
- package/dist/cdn/{NQF577F4.js → WUNWHJR5.js} +1 -1
- package/dist/cdn/{6EFUV7CH.js → WZGZCVBE.js} +1 -1
- package/dist/cdn/{6LPOLFT7.js → XWZ2LVEA.js} +1 -1
- package/dist/cdn/{V65IKENN.js → Y3CSVJBO.js} +1 -1
- package/dist/cdn/{KSKNVJAL.js → Y7H6OFT6.js} +1 -1
- package/dist/cdn/{55CA3AGN.js → YCKE3G3V.js} +1 -1
- package/dist/cdn/Z6D47FMI.js +2 -0
- package/dist/cdn/{NQXUGAR7.js → ZEFTAU6G.js} +1 -1
- package/dist/cdn/{BNQ63VOG.js → ZTRDNR6L.js} +1 -1
- package/dist/cdn/{JIPE2UQ3.js → ZV6LDJIX.js} +1 -1
- package/dist/cdn/{TBJLV2A3.js → ZWFXFJN5.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/runtime.js +2 -2
- package/dist/components/solution-details-panel/customElement.js +15 -14
- 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 +8 -5
- package/package.json +1 -1
- package/dist/cdn/C2MDLUTX.js +0 -2
- package/dist/cdn/NXG2TZQJ.js +0 -2
- package/dist/cdn/NZYAEBC7.js +0 -2
- package/dist/cdn/VU3OQQKP.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
|
|
2
|
-
import b from"./
|
|
2
|
+
import b from"./SVAPYMHV.js";import"./SHZO2XLE.js";import a from"./QRPBAR4V.js";import{b as D}from"./PZ4L77M5.js";import{Zb as I}from"./JE7L7M3J.js";import{a as f}from"./6LLQFZGG.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 _}from"./LI7AOAAS.js";import{F as u,G as d,H as g,J as r,h as m,i as l,l as p,r as c}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([{K:w,b:b,y:y},{a:$,b:v}])=>{var C=m`*[tabindex]:focus-visible{outline-style:solid!important;outline-width:2px!important;outline-color:var(--calcite-color-brand)!important;outline-offset:2px!important}.deletion-note-text{display:inline-block}.deletion-note-container{display:flex;align-items:center;gap:var(--calcite-spacing-sm);font-size:var(--calcite-font-size-0);margin-bottom:var(--calcite-spacing-md)}.panel-bg-color{--calcite-panel-header-background-color: var(--calcite-color-foreground-1);--calcite-panel-background-color: var(--calcite-color-foreground-1)}.display-none{display:none}calcite-loader{--calcite-loader-spacing: var(--calcite-spacing-md)}.loader-text{margin-top:var(--calcite-spacing-md);margin-bottom:var(--calcite-spacing-xl);text-align:center;font-size:var(--calcite-font-size-relative-base);color:var(--calcite-color-text-1)}.padding-around{padding:12px 2rem 2rem}`,h=class extends g{constructor(){super(),this.open=!1,this.source="Card Dropdown",this._deletePercentage=0,this._fetchingTemplates=!1,this._isDeleteInProgress=!1,this._nonSolutionDependencyItems=[],this._showDeleteError=!1,this._showUndeletableItems=!1,this._templateInfos=[],this._translations=f({name:"solution-delete-dialog",blocking:!0}),this._accordion=u(),this._configContextConsumer=D({context:b,subscribe:!0}),this.solutionDeleteDialogOpen=c(),this.solutionDeleted=c(),this.solutionDeleteDialogBeforeClose=c(),this.listenOn(window,"beforeunload",t=>{this._isDeleteInProgress&&(t.preventDefault(),t.returnValue=!0)})}static{this.properties={card:0,open:5,source:1,_deletePercentage:16,_fetchingTemplates:16,_isDeleteInProgress:16,_nonSolutionDependencyItems:16,_showDeleteError:16,_showUndeletableItems:16,_templateInfos:16,_translations:16}}static{this.styles=C}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}close(){this._showUndeletableItems&&this.solutionDeleted.emit({showAlert:!1,refreshSolutionsTimeout:!0,solutionTitle:this.card?.title}),this._showDeleteError=!1,this._showUndeletableItems=!1,this._isDeleteInProgress=!1,this.open=!1,this.solutionDeleteDialogOpen.emit(!1)}delete(){if(this._telemetry?.logEvent({category:w.DEPLOYMENTS,action:"Delete Solution",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||"",this.source]}),this._isDeleteInProgress=!0,this.card){let t=[{itemName:this.card.title,itemType:"Solution",owner:this.card.owner,modified:this.card.modified}],i={progressCallback:s=>{this._deletePercentage=Math.round(s)},solutionOwner:this.card.owner};I(this.card.id,this._configContextConsumer.value.userSession,i).then(s=>{let a=s[1],o;if(a?o=a.items.map(e=>({itemName:e.title,itemType:e.type,owner:e.owner,modified:e.modified})):o=t,o.length===0)this.solutionDeleted.emit({showAlert:!0,refreshSolutionsTimeout:!0,solutionTitle:this.card?.title}),this._isDeleteInProgress=!1,this.open=!1;else if(o.some(e=>e.itemType==="Solution"))this.card?v(this.card,this._configContextConsumer.value.userSession).then(e=>{this._templateInfos=e,this._showDeleteError=!0,this._showUndeletableItems=!0,this._isDeleteInProgress=!1}):(this._showDeleteError=!0,this._isDeleteInProgress=!1);else if(this.card){let e=[];e=a.items.map(n=>({id:n.id,title:n.title,type:n.type,owner:n.owner,modified:n.modified,typeKeywords:[],snippet:"",dependencies:[],url:y(n.id,this._configContextConsumer.value.authentication)})),this._templateInfos=e,this._showDeleteError=!1,this._showUndeletableItems=!0,this._isDeleteInProgress=!1}else this.solutionDeleted.emit({showAlert:!0,refreshSolutionsTimeout:!0}),this._isDeleteInProgress=!1,this.open=!1})}}willUpdate(t){if(t.has("open")){let i=t.get("open");this.open&&!i&&(this._fetchingTemplates=!0,$(this._configContextConsumer.value.userSession,this.card).then(s=>{this._templateInfos=s.templateInfos,this._nonSolutionDependencyItems=s._nonSolutionDependencyItems,this._fetchingTemplates=!1}))}}render(){let t=this._fetchingTemplates?"":"display-none",i=this._fetchingTemplates?"display-none":"",s=[...new Set(this._nonSolutionDependencyItems.map(e=>e.controlItemId))],a=this._templateInfos.length-this._getDependencyCount(),o=this._translations.deletionCount.replace("{{deleteableCount}}",a.toString()).replace("{{totalCount}}",this._templateInfos.length.toString());return l`<calcite-dialog class="panel-bg-color" .closeDisabled=${this._isDeleteInProgress} .escapeDisabled=${this._isDeleteInProgress} .heading=${this._translations.title.replace("{{solution}}",this.card?.title??"")} id=${this._translations.title.replace("{{solution}}",this.card?.title??"")??p} modal kind=danger .open=${this.open} width=l outside-close-disabled @calciteDialogBeforeClose=${()=>{this.solutionDeleteDialogBeforeClose.emit()}} @calciteDialogClose=${()=>{this.open=!1,this.solutionDeleteDialogOpen.emit(!1)}}>${this._isDeleteInProgress?l`<calcite-loader .label=${this._translations.deleteInProgress} scale=l type=determinate-value .value=${this._deletePercentage}></calcite-loader><div class="loader-text" tabindex=0>${this._translations.deleteInProgress}</div>`:this._showUndeletableItems?l`<calcite-label class=${r(i)} layout=inline><span tabindex=0>${this._translations.failedToDeleteItems}</span></calcite-label><solution-item-accordion class=${r(i)} .itemRelationshipDependencies=${[]} link-type=item list-selection-mode=multiple .reuseWarning=${this._translations.itemDependencyReusewarning} .templateInfos=${this._templateInfos} .typeKeywords=${this.card?.typeKeywords} ${d(this._accordion)}></solution-item-accordion><calcite-button appearance=outline @click=${this.close} slot=footer-end>${this._translations.buttonClose}</calcite-button>`:l`<div class="padding-around"><div class=${`deletion-note-container ${i}`}><span class="deletion-note-text" tabindex=0>${this._translations.deletionNote}</span><calcite-chip .label=${o} scale=m icon=information>${o}</calcite-chip></div><calcite-loader class=${r(t)} label></calcite-loader><solution-item-accordion class=${r(i)} .itemRelationshipDependencies=${s} link-type=item list-selection-mode=multiple .reuseWarning=${this._translations.itemDependencyReusewarning} .templateInfos=${this._templateInfos} .typeKeywords=${this.card?.typeKeywords} ${d(this._accordion)}></solution-item-accordion></div><calcite-button appearance=outline @click=${this.close} slot=footer-end>${this._translations.buttonCancel}</calcite-button><calcite-button @click=${()=>{this.delete()}} slot=footer-end kind=danger>${this._translations.buttonDelete}</calcite-button>${this._showDeleteError&&l`<calcite-alert icon=exclamation-mark-triangle kind=danger .label=${this._translations.failedToDelete} @calciteAlertClose=${()=>{this._showDeleteError=!1}} open><div slot=message>${this._translations.failedToDelete}</div></calcite-alert>`||""}`}</calcite-dialog>`}_getDependencyCount(){let t=this._nonSolutionDependencyItems.map(i=>i.controlItemId);return[...new Set(t)].length}};_("solution-delete-dialog",h);return h},a,b)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
|
|
2
|
-
import"./
|
|
2
|
+
import"./Y7H6OFT6.js";import b from"./S23N6TCC.js";import a from"./QRPBAR4V.js";import"./PZ4L77M5.js";import"./JE7L7M3J.js";import{a as p}from"./6LLQFZGG.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 g}from"./LI7AOAAS.js";import{F as c,G as l,H as h,h as r,i as s,r as d}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([])=>{var u={heading:"Get Started",card1:{heading:"What's new in the app"},card2:{heading:"Deploy a solution"},card3:{heading:"Manage a deployment"},card4:{heading:"AI Assistant"}},m={heading:"Documentation",card1:{heading:"Help"},card2:{heading:"What's new"},card3:{heading:"FAQ"},card4:{heading:"ArcGIS Blog"}},b={heading:"Support",card1:{heading:"Esri Community"},card2:{heading:"ArcGIS Ideas"},card3:{heading:"Esri Video"},card4:{heading:"Technical support"}},i={getStarted:u,documentation:m,support:b},v=r`*[tabindex]:focus-visible{outline:2px solid var(--calcite-color-brand);outline-offset:2px}.position-relative{position:relative}.background-override{--calcite-shell-panel-background-color: var(--calcite-color-foreground-2);--calcite-panel-background-color: var(--calcite-color-foreground-2)}.width-350{--calcite-shell-panel-width: 350px}.height-full{height:100%}.padding-end-1-2{padding-inline-end:var(--calcite-spacing-sm)}calcite-panel{--calcite-panel-background-color: var(--calcite-color-foreground-1)}calcite-shell{background-color:unset}.padding-end-1{padding-inline-end:var(--calcite-spacing-lg)}.padding-start-1{padding-inline-start:var(--calcite-spacing-lg)}.margin-end-md{margin-inline-end:var(--calcite-spacing-md)}.resources-container{width:100%;box-sizing:border-box}.hero-banner{background-color:var(--calcite-color-foreground-2);padding:4.25rem var(--calcite-spacing-md);text-align:center;width:100%;box-sizing:border-box;margin-bottom:3rem}.hero-heading{font-size:var(--calcite-font-size-5);font-weight:var(--calcite-font-weight-medium);margin:0 0 var(--calcite-spacing-xxl) 0;color:var(--calcite-color-text-1)}.hero-subheading{font-size:var(--calcite-font-size-0);color:var(--calcite-color-text-2);max-width:600px;margin:0 auto}`,o=class extends h{constructor(){super(),this._translations=p({name:"solutions-resources-shell",blocking:!0}),this._mainPanelRef=c(),this._panelFixed=!1,this.sortTypeChanged=d(),this.listenOn(window,"deployAppTabSelected",this._handleDeployAppTabSelected)}static{this.properties={_translations:16}}static{this.styles=v}updated(){this._fixPanelContentWrapperFocus()}_fixPanelContentWrapperFocus(){if(!this._panelFixed&&this._mainPanelRef.value){let e=this._mainPanelRef.value;e.componentOnReady?.().then(()=>{if(e.shadowRoot){let n=e.shadowRoot.querySelector(".content-wrapper");n&&(n.tabIndex=-1,this._panelFixed=!0,this._setupPanelObserver())}}).catch(()=>{this._panelFixed=!0})}}_setupPanelObserver(){if(this._panelObserver)return;this._panelObserver=new MutationObserver(n=>{n.forEach(a=>{if(a.type==="attributes"&&a.attributeName==="tabindex"){let t=a.target;t.classList.contains("content-wrapper")&&t.tabIndex===0&&(t.tabIndex=-1)}})});let e=this._mainPanelRef.value;if(e?.shadowRoot){let n=e.shadowRoot.querySelector(".content-wrapper");n&&this._panelObserver.observe(n,{attributes:!0,attributeFilter:["tabindex"]})}}disconnectedCallback(){super.disconnectedCallback(),this._panelObserver?.disconnect()}render(){let e=this._translations;return s`<calcite-shell><calcite-panel ${l(this._mainPanelRef)}><div class="resources-container"><div class="hero-banner"><h1 class="hero-heading" tabindex=0>${e.hero.heading}</h1><p class="hero-subheading" tabindex=0>${e.hero.subheading}</p></div><solutions-resources-section .heading=${e.getStarted.heading} .subheading=${e.getStarted.subheading} .cards=${[{meridianIcon:"value",heading:e.getStarted.card1.heading,description:e.getStarted.card1.description,url:"https://links.esri.com/solutions/whats-new-in-the-app",headingEn:i.getStarted.card1.heading,sectionHeadingEn:i.getStarted.heading},{meridianIcon:"install",heading:e.getStarted.card2.heading,description:e.getStarted.card2.description,url:"https://links.esri.com/solutions/deploy-a-solution",headingEn:i.getStarted.card2.heading,sectionHeadingEn:i.getStarted.heading},{meridianIcon:"keys",heading:e.getStarted.card3.heading,description:e.getStarted.card3.description,url:"https://links.esri.com/solutions/manage-a-deployment",headingEn:i.getStarted.card3.heading,sectionHeadingEn:i.getStarted.heading},{meridianIcon:"speech-bubbles",heading:e.getStarted.card4.heading,description:e.getStarted.card4.description,url:"https://links.esri.com/solutions/ai-assistant",headingEn:i.getStarted.card4.heading,sectionHeadingEn:i.getStarted.heading}]}></solutions-resources-section><solutions-resources-section .heading=${e.documentation.heading} .subheading=${e.documentation.subheading} .cards=${[{meridianIcon:"search-files",heading:e.documentation.card1.heading,description:e.documentation.card1.description,url:"https://links.esri.com/solutions/help",headingEn:i.documentation.card1.heading,sectionHeadingEn:i.documentation.heading},{meridianIcon:"value",heading:e.documentation.card2.heading,description:e.documentation.card2.description,url:"https://links.esri.com/solutions/whats-new",headingEn:i.documentation.card2.heading,sectionHeadingEn:i.documentation.heading},{meridianIcon:"faq",heading:e.documentation.card3.heading,description:e.documentation.card3.description,url:"https://links.esri.com/solutions/faq",headingEn:i.documentation.card3.heading,sectionHeadingEn:i.documentation.heading},{meridianIcon:"arcmap-blog",heading:e.documentation.card4.heading,description:e.documentation.card4.description,url:"https://links.esri.com/solutions/arcgis-blogs",headingEn:i.documentation.card4.heading,sectionHeadingEn:i.documentation.heading}]}></solutions-resources-section><solutions-resources-section .heading=${e.support.heading} .subheading=${e.support.subheading} .cards=${[{meridianIcon:"esri-community",heading:e.support.card1.heading,description:e.support.card1.description,url:"https://links.esri.com/solutions/esri-community",headingEn:i.support.card1.heading,sectionHeadingEn:i.support.heading},{meridianIcon:"idea",heading:e.support.card2.heading,description:e.support.card2.description,url:"https://links.esri.com/solutions/arcgis-ideas",headingEn:i.support.card2.heading,sectionHeadingEn:i.support.heading},{meridianIcon:"video",heading:e.support.card3.heading,description:e.support.card3.description,url:"https://links.esri.com/solutions/esri-video",headingEn:i.support.card3.heading,sectionHeadingEn:i.support.heading},{meridianIcon:"support",heading:e.support.card4.heading,description:e.support.card4.description,url:"https://links.esri.com/solutions/technical-support",headingEn:i.support.card4.heading,sectionHeadingEn:i.support.heading}]}></solutions-resources-section></div></calcite-panel></calcite-shell>`}_handleDeployAppTabSelected(e){e.detail==="resources"&&this.sortTypeChanged.emit("")}};g("solutions-resources-shell",o);return o},a,b)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
|
|
2
|
-
import{a as n}from"./
|
|
2
|
+
import{a as n}from"./GVHIJ3IB.js";import{b as r}from"./LI7AOAAS.js";import{H as o,L as t,h as i,i as s}from"./46DQNAMV.js";import"./OR4HXHSY.js";var p=i`.item-type-icon{@apply block h-4 pointer-events-none;margin-top:.15em!important;min-width:16px;fill:currentColor;transform:rotate(360deg)}.item-type-icon-margin{@apply m-inline-end-1.5;}`,e=class extends o{constructor(){super(...arguments),this.isPortal=!1,this.type="",this.typeKeywords=[]}static{this.properties={isPortal:5,type:1,typeKeywords:0}}static{this.styles=p}render(){return s`<div title=${this.type??t}><img class="item-type-icon item-type-icon-margin" height=16 role=presentation src=${n(this.type,this.typeKeywords)??t} width=16></div>`}};r("solution-item-icon",e);export{e as SolutionItemIcon};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
|
|
2
|
-
import a from"./
|
|
2
|
+
import a from"./QRPBAR4V.js";import"./PZ4L77M5.js";import"./JE7L7M3J.js";import"./6LLQFZGG.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"./LI7AOAAS.js";import"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([{B:o}])=>{return o},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"./LFIJXE3U.js";import{b as k}from"./VU3OQQKP.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"./6LLQFZGG.js";import{b as k}from"./LI7AOAAS.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 e from"./CK7LURBK.js";import d from"./PNBTKFO6.js";import b from"./RTSKNY33.js";import{b as f}from"./PZ4L77M5.js";import"./JE7L7M3J.js";import{a as v}from"./LFIJXE3U.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 S}from"./VU3OQQKP.js";import{H as C,h as m,i as a,j as y,r as c}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([{D:b,E:A,H:D,I:h,K:u,b:w,q:x,t:T},{c:I},{a:g,b:L}])=>{var O=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-md) var(--calcite-spacing-md)}solution-details-card{width:calc(25% - .6rem)}@media(max-width:1234px){solution-details-card{width:calc(33.333% - .6rem)}}@media(max-width:1010px){solution-details-card{width:calc(50% - .6rem)}}@media(max-width:800px){.card-group{padding-left:0;padding-right:0}solution-details-card{width:calc(33.33% - .6rem)}}@media(max-width:680px){solution-details-card{width:calc(50% - .6rem)}}@media(max-width:440px){solution-details-card{width:calc(100% - .75rem)}}.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)}.margin-top-half{margin-top:.5rem}.margin-top-1{margin-top:1rem}.no-solutions-prompt{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%}`,E=5,_=class extends C{constructor(){super(),this.sortType="relevance",this._cards=[],this._isLoading=!0,this._modifiedCheckTry=0,this._translations=v({name:"solutions-all-panel",blocking:!0}),this._agoTerms=`${h}`,this._allCards=[],this._baseAgoTerms=h,this._categories=[],this._configContextConsumer=f({context:w,subscribe:!0,callback:async t=>{t&&(this._isDisconnectedEnvironment?this._isLoading=!1:await this._loadUpdateProcedures())}}),this._delay=!1,this._getSuggested=!1,this._relatedSolutions=new Set,this._sortField="relevance",this._sortOrder="desc",this.cardsFetched=c(),this.allCardsFetched=c(),this.searchTermSet=c(),this.sortTypeSet=c(),this.detailsCardSelected=c(),this._handleOpenAssistant=()=>{this._telemetry?.logEvent({category:u.ASSISTANT,action:"Open"}),window.dispatchEvent(new CustomEvent("openAssistant"))},this.listenOn(window,"deployProgressEnd",()=>{this._modifiedCheckTry=E,this._loadUpdateProcedures()}),this.listenOn(window,"solutionDeleted",()=>{this._modifiedCheckTry=E,this._loadUpdateProcedures()}),this.listenOn(window,"sortTypeChanged",t=>{t.detail&&t.detail.scope==="all-solutions"&&(this.sortType=t.detail.sortType,this._telemetry?.logEvent({category:u.ALL_SOLUTIONS,action:"Sort",dimensions:[x(t.detail.sortType)]}),this.sortType==="suggested"&&this._deployedSolutions?.cards.length===0?this._getDeployedSolutions().then(()=>{this.searchSolutions(t.detail)}):this.searchSolutions(t.detail))}),this.listenOn(window,"solutionIDFromAssistant",t=>{this._lookupSolutionById(t.detail)})}static{this.properties={sortType:1,_cards:16,_isLoading:16,_modifiedCheckTry:16,_translations:16}}static{this.styles=O}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}get _isDisconnectedEnvironment(){return this._configContextConsumer.value?.isEnterprise===!0&&this._configContextConsumer.value?.authentication?.CanSearchArcGISOnline===!1}async searchSolutions(t){this._isDisconnectedEnvironment||(t?"searchTerm"in t?this._textSearch(t.searchTerm):"sortType"in t?this._sortCards(t):Array.isArray(t)&&this._filterCards(t):(this._agoTerms=this._baseAgoTerms,this._clearFilterCategories()),this._cards=await this._getSolutions())}async setSearchOptions(t){t&&("searchTerm"in t&&(this._textSearch(t.searchTerm),this.searchTermSet.emit({searchTerm:t.searchTerm,scope:"all-solutions"})),"sortType"in t&&(this._sortCards(t),this.sortTypeSet.emit({sortType:t.sortType,scope:"all-solutions"})))}render(){let t=this._configContextConsumer.value?.authentication?.IsSignedIn&&this._configContextConsumer.value?.authentication?.CanUseAI;return this._isDisconnectedEnvironment?a`<div class="no-solutions">${this._getMeridianSearch()}<div class="no-solutions-prompt"><div class="text-center leader-1 warning-text trailer-1"><div>${this._translations.disconnectedEnvironment}</div></div></div></div>`:this._isLoading||this._cards.length?a`<calcite-panel>${this._isLoading?a`<calcite-loader id=solutions-all-panel-loader .label=${this._translations.fetchingSolutions}></calcite-loader>`:a`<calcite-card-group class="card-group" .label=${this._translations.allSolutionCards}>${this._renderCards()}</calcite-card-group>`}</calcite-panel>`:a`<div class="no-solutions">${this._getMeridianSearch()}<div class="no-solutions-prompt"><div class="text-center leader-1 warning-text trailer-1"><div>${this._translations.noSolutionsFound}</div><div class="margin-top-half">${t?this._translations.assistantHelp:this._translations.changeSearchTerm}</div></div>${t&&a`<calcite-button appearance=outline icon-start=speech-bubbles @click=${this._handleOpenAssistant} @keydown=${e=>T(e,()=>this._handleOpenAssistant())} scale=l>${this._translations.askAssistant}</calcite-button>`||""}</div></div>`}_renderCards(){return this._cards.map(t=>a`<solution-details-card .card=${t}></solution-details-card>`)}async _getSolutions(){if(this._isDisconnectedEnvironment)return this._isLoading=!1,[];if(this._configContextConsumer.value){this._isLoading=!0,this._abortController?(this._abortController.abort(),this._abortController=new AbortController):this._abortController=new AbortController;let t=await this._cardsFetcher?.requestAvailableSolutionCards({q:this._agoTerms,filter:"type:Solution",sortField:this._sortField,sortOrder:this._sortOrder,nextStart:-1,categories:this._categories,delay:this._delay,getSuggested:this._getSuggested,num:100},this._configContextConsumer.value?.primarySolutionsGroupId,this._configContextConsumer.value?.agoBasedEnterpriseSolutionsGroupId,this._configContextConsumer.value?.userSession,this._configContextConsumer.value?.isEnterprise,this._abortController.signal,{num:1e3});this._abortController=void 0;let e=t?.cards.length?t.cards:[];if(this.sortType==="new"||this.sortType==="updated"){let s="/Categories/New Release";this.sortType==="updated"&&(s="/Categories/Updated"),e.sort((l,d)=>l.categories.includes(s)&&!d.categories.includes(s)?-1:!l.categories.includes(s)&&d.categories.includes(s)?1:l.categories.includes(s)&&d.categories.includes(s)?l.categories.length-d.categories.length:0)}else if(this.sortType==="suggested"&&this._relatedSolutions.size>0&&this._deployedSolutions?.cards?.length){let s=new Map;for(let i of e){let r=s.get(i.deployCommonId),n=Number(i.deployVersion);(!r||n>r)&&s.set(i.deployCommonId,n)}let l=this._deployedSolutions.cards.filter(i=>{let r=s.get(i.deployCommonId);return r!==void 0&&Number(i.deployVersion)>=r}),d=new Set(l.map(i=>i.deployCommonId));this._relatedSolutions=new Set([...this._relatedSolutions].filter(i=>!d.has(i))),e.sort((i,r)=>{let n=this._relatedSolutions.has(i.deployCommonId),p=this._relatedSolutions.has(r.deployCommonId);return n&&!p?-1:!n&&p?1:0})}let o=e.map(s=>{let l=s.categories.indexOf("/Categories/New Release")>-1,d=s.categories.indexOf("/Categories/Updated")>-1,i=!1,r=!0;this._deployedSolutions&&(i=this._isSolutionDeployed(s.deployCommonId),r=this._isLatestVersion(s));let n=[];return l?n.push("new"):d&&n.push("updated"),i&&r&&n.push("deployed"),s.chips=n.length>0?n:void 0,s.supportReuse=i?!!(i&&!r):!0,s});return this._allCards.length===0&&t?.cards&&(this._allCards=t?.cards,this._deployedSolutions&&(this._relatedSolutions=I(this._deployedSolutions.cards,this._allCards))),this.cardsFetched.emit(o.length),this._isLoading=!1,o}else return this._isLoading=!1,[]}async _loadUpdateProcedures(){if(this._isDisconnectedEnvironment){this._isLoading=!1;return}this._isLoading=!0;let t=this._configContextConsumer.value;this._cardsFetcher=new g(t.locale,t.orgUrl,t.portalURL),this._cardsFetcherDeployed=new g(t.locale,t.orgUrl,t.portalURL),await this._getDeployedSolutions(),this._cards=await this._getSolutions(),this.allCardsFetched.emit(this._cards),this._isLoading=!1}async _getDeployedSolutions(){let t=this._configContextConsumer.value.authentication,e=this._configContextConsumer.value.userSession;if(t&&e&&t.IsSignedIn){this._abortControllerDeployed?(this._abortControllerDeployed.abort(),this._abortControllerDeployed=new AbortController):this._abortControllerDeployed=new AbortController;let o=await L(t,e,this._cardsFetcher,this._cardsFetcherDeployed,D,"created",this._sortOrder,void 0,this._categories,void 0,this._abortControllerDeployed.signal);if(this._abortControllerDeployed=void 0,o){if(this._modifiedCheckTry>0){if(this._deployedSolutions?.cards.length===o?.cards.length)return this._modifiedCheckTry--,await this._getDeployedSolutions();this._modifiedCheckTry=0}this._deployedSolutions=o}}}_getMeridianSearch(){return a`<div><svg viewBox="0 0 64 64" width=140 height=140 xmlns=http://www.w3.org/2000/svg fill=var(--calcite-color-text-3)>${y`<path d="M60.217 54.937l-15.77-15.77-1.414 1.415-3.801-3.8a19.94 19.94 0 1 0-2.451 2.45l3.802 3.802-1.413 1.415 15.767 15.767a1.739 1.739 0 0 0 2.459 0l2.82-2.821a1.742 1.742 0 0 0 0-2.458zM4.9 24A19.1 19.1 0 1 1 24 43.1 19.121 19.121 0 0 1 4.9 24zm32.474 14.693q.69-.63 1.32-1.32l3.774 3.775-1.32 1.32zM59.65 56.83l-2.82 2.82a.97.97 0 0 1-1.327 0L40.3 44.45l4.145-4.15L59.65 55.501a.939.939 0 0 1 0 1.328zM22.343 9.62l.097.795q-.31.038-.619.086a13.635 13.635 0 0 0-11.353 11.775l-.026.217-.795-.084.026-.228a14.44 14.44 0 0 1 12.022-12.47c.215-.034.431-.064.648-.09z" />`}</svg></div>`}_textSearch(t){this._agoTerms=this._baseAgoTerms+` ${t}`}_sortCards(t){let e=t.sortType;this._getSuggested=!1,this._sortOrder="desc",e==="suggested"?this._getSuggested=!0:e==="new"?this._sortField="relevance":e==="relevance"||e==="title"?(e==="title"&&(this._sortOrder="asc"),this._sortField=e):e==="updated"&&(this._sortField="relevance"),this.sortType=e}_filterCards(t){this._categories=[],t.forEach(e=>{if(e.industry){let o=this._getIndustryValue(e.industry);if(e.domain){let s=this._getDomainValue(e.domain);this._categories.push(`/Categories/${o}/${s}`)}else this._categories.push(`/Categories/${o}`)}})}_getDomainValue(t){return A[t]}_getIndustryValue(t){return t==="AEC"?"AEC":b[t]}_clearFilterCategories(){this._categories=[]}_isSolutionDeployed(t){return!!this._deployedSolutions?.cards?.some(e=>e?.typeKeywords?.some(o=>o.includes("solutionid")&&o.includes(t)))}_isLatestVersion(t){let e=this._deployedSolutions?.cards?.filter(o=>o?.typeKeywords?.some(s=>s.includes("solutionid")&&s.includes(t.deployCommonId)));return!(e&&e.length>0&&e[0].deployVersion!==t.deployVersion)}_lookupSolutionById(t){let e=this._allCards.filter(o=>o.deployCommonId===t);e.length>0&&this.detailsCardSelected.emit(e[0])}};S("solutions-all-panel",_);return _},b,d,e)
|
|
2
|
+
import e from"./BAVJY3AH.js";import d from"./254AARKL.js";import b from"./QRPBAR4V.js";import{b as f}from"./PZ4L77M5.js";import"./JE7L7M3J.js";import{a as v}from"./6LLQFZGG.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 S}from"./LI7AOAAS.js";import{H as C,h as m,i as a,j as y,r as c}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([{D:b,E:A,H:D,I:h,K:u,b:w,q:x,t:T},{c:I},{a:g,b:L}])=>{var O=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-md) var(--calcite-spacing-md)}solution-details-card{width:calc(25% - .6rem)}@media(max-width:1234px){solution-details-card{width:calc(33.333% - .6rem)}}@media(max-width:1010px){solution-details-card{width:calc(50% - .6rem)}}@media(max-width:800px){.card-group{padding-left:0;padding-right:0}solution-details-card{width:calc(33.33% - .6rem)}}@media(max-width:680px){solution-details-card{width:calc(50% - .6rem)}}@media(max-width:440px){solution-details-card{width:calc(100% - .75rem)}}.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)}.margin-top-half{margin-top:.5rem}.margin-top-1{margin-top:1rem}.no-solutions-prompt{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%}`,E=5,_=class extends C{constructor(){super(),this.sortType="relevance",this._cards=[],this._isLoading=!0,this._modifiedCheckTry=0,this._translations=v({name:"solutions-all-panel",blocking:!0}),this._agoTerms=`${h}`,this._allCards=[],this._baseAgoTerms=h,this._categories=[],this._configContextConsumer=f({context:w,subscribe:!0,callback:async t=>{t&&(this._isDisconnectedEnvironment?this._isLoading=!1:await this._loadUpdateProcedures())}}),this._delay=!1,this._getSuggested=!1,this._relatedSolutions=new Set,this._sortField="relevance",this._sortOrder="desc",this.cardsFetched=c(),this.allCardsFetched=c(),this.searchTermSet=c(),this.sortTypeSet=c(),this.detailsCardSelected=c(),this._handleOpenAssistant=()=>{this._telemetry?.logEvent({category:u.ASSISTANT,action:"Open"}),window.dispatchEvent(new CustomEvent("openAssistant"))},this.listenOn(window,"deployProgressEnd",()=>{this._modifiedCheckTry=E,this._loadUpdateProcedures()}),this.listenOn(window,"solutionDeleted",()=>{this._modifiedCheckTry=E,this._loadUpdateProcedures()}),this.listenOn(window,"sortTypeChanged",t=>{t.detail&&t.detail.scope==="all-solutions"&&(this.sortType=t.detail.sortType,this._telemetry?.logEvent({category:u.ALL_SOLUTIONS,action:"Sort",dimensions:[x(t.detail.sortType)]}),this.sortType==="suggested"&&this._deployedSolutions?.cards.length===0?this._getDeployedSolutions().then(()=>{this.searchSolutions(t.detail)}):this.searchSolutions(t.detail))}),this.listenOn(window,"solutionIDFromAssistant",t=>{this._lookupSolutionById(t.detail)})}static{this.properties={sortType:1,_cards:16,_isLoading:16,_modifiedCheckTry:16,_translations:16}}static{this.styles=O}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}get _isDisconnectedEnvironment(){return this._configContextConsumer.value?.isEnterprise===!0&&this._configContextConsumer.value?.authentication?.CanSearchArcGISOnline===!1}async searchSolutions(t){this._isDisconnectedEnvironment||(t?"searchTerm"in t?this._textSearch(t.searchTerm):"sortType"in t?this._sortCards(t):Array.isArray(t)&&this._filterCards(t):(this._agoTerms=this._baseAgoTerms,this._clearFilterCategories()),this._cards=await this._getSolutions())}async setSearchOptions(t){t&&("searchTerm"in t&&(this._textSearch(t.searchTerm),this.searchTermSet.emit({searchTerm:t.searchTerm,scope:"all-solutions"})),"sortType"in t&&(this._sortCards(t),this.sortTypeSet.emit({sortType:t.sortType,scope:"all-solutions"})))}render(){let t=this._configContextConsumer.value?.authentication?.IsSignedIn&&this._configContextConsumer.value?.authentication?.CanUseAI;return this._isDisconnectedEnvironment?a`<div class="no-solutions">${this._getMeridianSearch()}<div class="no-solutions-prompt"><div class="text-center leader-1 warning-text trailer-1"><div>${this._translations.disconnectedEnvironment}</div></div></div></div>`:this._isLoading||this._cards.length?a`<calcite-panel>${this._isLoading?a`<calcite-loader id=solutions-all-panel-loader .label=${this._translations.fetchingSolutions}></calcite-loader>`:a`<calcite-card-group class="card-group" .label=${this._translations.allSolutionCards}>${this._renderCards()}</calcite-card-group>`}</calcite-panel>`:a`<div class="no-solutions">${this._getMeridianSearch()}<div class="no-solutions-prompt"><div class="text-center leader-1 warning-text trailer-1"><div>${this._translations.noSolutionsFound}</div><div class="margin-top-half">${t?this._translations.assistantHelp:this._translations.changeSearchTerm}</div></div>${t&&a`<calcite-button appearance=outline icon-start=speech-bubbles @click=${this._handleOpenAssistant} @keydown=${e=>T(e,()=>this._handleOpenAssistant())} scale=l>${this._translations.askAssistant}</calcite-button>`||""}</div></div>`}_renderCards(){return this._cards.map(t=>a`<solution-details-card .card=${t}></solution-details-card>`)}async _getSolutions(){if(this._isDisconnectedEnvironment)return this._isLoading=!1,[];if(this._configContextConsumer.value){this._isLoading=!0,this._abortController?(this._abortController.abort(),this._abortController=new AbortController):this._abortController=new AbortController;let t=await this._cardsFetcher?.requestAvailableSolutionCards({q:this._agoTerms,filter:"type:Solution",sortField:this._sortField,sortOrder:this._sortOrder,nextStart:-1,categories:this._categories,delay:this._delay,getSuggested:this._getSuggested,num:100},this._configContextConsumer.value?.primarySolutionsGroupId,this._configContextConsumer.value?.agoBasedEnterpriseSolutionsGroupId,this._configContextConsumer.value?.userSession,this._configContextConsumer.value?.isEnterprise,this._abortController.signal,{num:1e3});this._abortController=void 0;let e=t?.cards.length?t.cards:[];if(this.sortType==="new"||this.sortType==="updated"){let s="/Categories/New Release";this.sortType==="updated"&&(s="/Categories/Updated"),e.sort((l,d)=>l.categories.includes(s)&&!d.categories.includes(s)?-1:!l.categories.includes(s)&&d.categories.includes(s)?1:l.categories.includes(s)&&d.categories.includes(s)?l.categories.length-d.categories.length:0)}else if(this.sortType==="suggested"&&this._relatedSolutions.size>0&&this._deployedSolutions?.cards?.length){let s=new Map;for(let i of e){let r=s.get(i.deployCommonId),n=Number(i.deployVersion);(!r||n>r)&&s.set(i.deployCommonId,n)}let l=this._deployedSolutions.cards.filter(i=>{let r=s.get(i.deployCommonId);return r!==void 0&&Number(i.deployVersion)>=r}),d=new Set(l.map(i=>i.deployCommonId));this._relatedSolutions=new Set([...this._relatedSolutions].filter(i=>!d.has(i))),e.sort((i,r)=>{let n=this._relatedSolutions.has(i.deployCommonId),p=this._relatedSolutions.has(r.deployCommonId);return n&&!p?-1:!n&&p?1:0})}let o=e.map(s=>{let l=s.categories.indexOf("/Categories/New Release")>-1,d=s.categories.indexOf("/Categories/Updated")>-1,i=!1,r=!0;this._deployedSolutions&&(i=this._isSolutionDeployed(s.deployCommonId),r=this._isLatestVersion(s));let n=[];return l?n.push("new"):d&&n.push("updated"),i&&r&&n.push("deployed"),s.chips=n.length>0?n:void 0,s.supportReuse=i?!!(i&&!r):!0,s});return this._allCards.length===0&&t?.cards&&(this._allCards=t?.cards,this._deployedSolutions&&(this._relatedSolutions=I(this._deployedSolutions.cards,this._allCards))),this.cardsFetched.emit(o.length),this._isLoading=!1,o}else return this._isLoading=!1,[]}async _loadUpdateProcedures(){if(this._isDisconnectedEnvironment){this._isLoading=!1;return}this._isLoading=!0;let t=this._configContextConsumer.value;this._cardsFetcher=new g(t.locale,t.orgUrl,t.portalURL),this._cardsFetcherDeployed=new g(t.locale,t.orgUrl,t.portalURL),await this._getDeployedSolutions(),this._cards=await this._getSolutions(),this.allCardsFetched.emit(this._cards),this._isLoading=!1}async _getDeployedSolutions(){let t=this._configContextConsumer.value.authentication,e=this._configContextConsumer.value.userSession;if(t&&e&&t.IsSignedIn){this._abortControllerDeployed?(this._abortControllerDeployed.abort(),this._abortControllerDeployed=new AbortController):this._abortControllerDeployed=new AbortController;let o=await L(t,e,this._cardsFetcher,this._cardsFetcherDeployed,D,"created",this._sortOrder,void 0,this._categories,void 0,this._abortControllerDeployed.signal);if(this._abortControllerDeployed=void 0,o){if(this._modifiedCheckTry>0){if(this._deployedSolutions?.cards.length===o?.cards.length)return this._modifiedCheckTry--,await this._getDeployedSolutions();this._modifiedCheckTry=0}this._deployedSolutions=o}}}_getMeridianSearch(){return a`<div><svg viewBox="0 0 64 64" width=140 height=140 xmlns=http://www.w3.org/2000/svg fill=var(--calcite-color-text-3)>${y`<path d="M60.217 54.937l-15.77-15.77-1.414 1.415-3.801-3.8a19.94 19.94 0 1 0-2.451 2.45l3.802 3.802-1.413 1.415 15.767 15.767a1.739 1.739 0 0 0 2.459 0l2.82-2.821a1.742 1.742 0 0 0 0-2.458zM4.9 24A19.1 19.1 0 1 1 24 43.1 19.121 19.121 0 0 1 4.9 24zm32.474 14.693q.69-.63 1.32-1.32l3.774 3.775-1.32 1.32zM59.65 56.83l-2.82 2.82a.97.97 0 0 1-1.327 0L40.3 44.45l4.145-4.15L59.65 55.501a.939.939 0 0 1 0 1.328zM22.343 9.62l.097.795q-.31.038-.619.086a13.635 13.635 0 0 0-11.353 11.775l-.026.217-.795-.084.026-.228a14.44 14.44 0 0 1 12.022-12.47c.215-.034.431-.064.648-.09z" />`}</svg></div>`}_textSearch(t){this._agoTerms=this._baseAgoTerms+` ${t}`}_sortCards(t){let e=t.sortType;this._getSuggested=!1,this._sortOrder="desc",e==="suggested"?this._getSuggested=!0:e==="new"?this._sortField="relevance":e==="relevance"||e==="title"?(e==="title"&&(this._sortOrder="asc"),this._sortField=e):e==="updated"&&(this._sortField="relevance"),this.sortType=e}_filterCards(t){this._categories=[],t.forEach(e=>{if(e.industry){let o=this._getIndustryValue(e.industry);if(e.domain){let s=this._getDomainValue(e.domain);this._categories.push(`/Categories/${o}/${s}`)}else this._categories.push(`/Categories/${o}`)}})}_getDomainValue(t){return A[t]}_getIndustryValue(t){return t==="AEC"?"AEC":b[t]}_clearFilterCategories(){this._categories=[]}_isSolutionDeployed(t){return!!this._deployedSolutions?.cards?.some(e=>e?.typeKeywords?.some(o=>o.includes("solutionid")&&o.includes(t)))}_isLatestVersion(t){let e=this._deployedSolutions?.cards?.filter(o=>o?.typeKeywords?.some(s=>s.includes("solutionid")&&s.includes(t.deployCommonId)));return!(e&&e.length>0&&e[0].deployVersion!==t.deployVersion)}_lookupSolutionById(t){let e=this._allCards.filter(o=>o.deployCommonId===t);e.length>0&&this.detailsCardSelected.emit(e[0])}};S("solutions-all-panel",_);return _},b,d,e)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
|
|
2
|
-
import{d as u}from"./CKD45FGQ.js";import{b as n}from"./
|
|
2
|
+
import{d as u}from"./CKD45FGQ.js";import{b as n}from"./LI7AOAAS.js";import{F as d,G as c,H as o,J as l,h as s,i as a}from"./46DQNAMV.js";import"./OR4HXHSY.js";var p=s`:host{display:block;--calcite-label-margin-bottom: 0}.label-display{display:block;padding-bottom:1rem}.display-flex{display:flex}.display-grid{display:grid}.display-none{display:none}.padding-top-1{padding-top:1rem}.main-input{width:300px;padding-inline-end:1rem}.float-end{float:inline-end}.position-relative{position:relative}.position-right{position:absolute;right:0}`,i=class extends o{constructor(){super(...arguments),this.showAddDeduct=!1,this._deductValuesElement=d()}static{this.properties={showAddDeduct:16}}static{this.styles=p}render(){let e=this.showAddDeduct?"display-none":"display-grid",t=this.showAddDeduct?"position-relative":"display-none";return a`<div class=${l(e)}><div class="label-display"><calcite-label class="label-display">\r\n Enter comma delimited deduct values${this._getDeductValuesInput()}</calcite-label></div><div>${this._getCalculateButton()}</div></div><div class=${l(t)}><div class="position-right"><calcite-action appearance=transparent class="float-end" icon=x @click=${()=>this._toggleShowAddDeduct()} scale=s text></calcite-action></div><deduct-calculator class="display-grid padding-top-1" @deductValueComplete=${this._addDeductValue}></deduct-calculator></div>`}_getDeductValuesInput(){return a`<div class="display-flex"><calcite-input class="main-input" ${c(this._deductValuesElement)}></calcite-input><calcite-action appearance=transparent icon=plus-circle @click=${()=>this._toggleShowAddDeduct()} scale=s text></calcite-action></div>`}_getCalculateButton(){return this._deductValuesElement.value?a`<calcite-button @click=${()=>this._calculatePCI(this._deductValuesElement?.value?.value||"")}>\r\n Calculate PCI</calcite-button>`:void 0}_toggleShowAddDeduct(){this.showAddDeduct=!this.showAddDeduct}_addDeductValue(e){this._toggleShowAddDeduct(),this._deductValuesElement.value&&(this._deductValuesElement.value.value+=Math.abs(Number.parseFloat(this._deductValuesElement.value.value))>0?`,${e.detail}`:e.detail)}_calculatePCI(e){let t=u(e,!0),r=t<=10?"Failed":t<=25?"Serious":t<=40?"Very Poor":t<=55?"Poor":t<=70?"Fair":t<=85?"Satisfactory":"Good";console.log(`PCI: ${t}`),console.log(`Rating: ${r}`),alert("See debug console for results")}};n("pci-calculator",i);export{i as PciCalculator};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
|
|
2
|
-
import b from"./RTSKNY33.js";import{b as U}from"./PZ4L77M5.js";import{Eb as A,c as M,ya as k}from"./JE7L7M3J.js";import{a as C}from"./LFIJXE3U.js";import{g as m}from"./CGLFPVBM.js";import{b as S}from"./VU3OQQKP.js";import{F as a,G as r,H as f,L as d,h as y,i as l,j as w,r as u}from"./46DQNAMV.js";export default $arcgis.t(([p,P,z,{A:T,K:_,a:R,l:$,t:c}])=>{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._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 P({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 z({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}get RestUserSession(){let t=p.findServerInfo(this._portalRestUrl),e=this._credential?m.fromCredential(this._credential,t):this._isEnterprise?new m({}):new m({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(){try{await this._init()}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="",h=new URLSearchParams(s[1]||"");h.append("signInParam",t),o="?"+h.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(){try{this._credential=await p.checkSignInStatus(this._portalUrl+"/sharing")}catch{}try{let e=await p.checkAppAccess(this._portalUrl+"/sharing",this._clientId);(typeof e.valid<"u"&&!e.valid||e.viewOnlyUserTypeApp)&&window.location.replace(`error.html?error=blocked&locale=${this._locale}`),this._credential=e.credential}catch(e){e.name}this._portal.authMode="auto",await this._portal.load();let t=this._credential?await k(this.RestUserSession):{};if(this._isEnterprise=this._portal.isPortal,this._isEnterprise)try{let e=`${this._portal.restUrl}/portals/self/settings`,i=await M(e,{authentication:this._credential?this.RestUserSession:void 0});i?.portalConfigProperties?.searchArcGISOnlineEnabled!==void 0?this._searchArcGISOnlineEnabled=i.portalConfigProperties.searchArcGISOnlineEnabled:this._searchArcGISOnlineEnabled=!1}catch(e){console.warn("Failed to fetch portal settings:",e),this._searchArcGISOnlineEnabled=!1}else this._searchArcGISOnlineEnabled=!0;return 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:t},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 A(this._portal.restUrl,this.RestUserSession||new m({}))),this._portal?.user?.roleId&&this._portalUserSubset&&(this._portalUserSubset.roleId=this._portal.user.roleId),this}_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(h=>this._isSerializable(h)?n+encodeURIComponent(JSON.stringify(h)):n+encodeURIComponent(h)).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:h=""}=t,E=this._mapDimensions(s),x=this._mapMetrics(n);this._telemetryInstance.logEvent({category:e,action:i,label:o,details:h,...E,...x})}}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||$(document.location.hostname,e?.Portal?.portalHostname||"");return i&&Object.keys(t.telemetry).includes(i)?t.telemetry[i]:void 0}},O=y`.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}`,v=class extends f{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=a(),this._dropdownItemAll=a(),this._dropdownItemMy=a(),this._dropdownItemMyContent=a(),this._dropdownItemResources=a(),this._isMobileContextConsumer=U({context:R,subscribe:!0,callback:t=>this._isMobile=t}),this._menuRef=a(),this._menuItemAll=a(),this._menuItemMy=a(),this._menuItemResources=a(),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=O}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 m({username:"",password:""});this._userSession=t}async load(){let t=window.matchMedia("(prefers-color-scheme: dark)");t.addEventListener("change",o=>this._logoFill=this._getLogoFill(o.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;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._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 l`<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?l`<div slot=user>${this._getUserAvatar()}</div>`:l`<calcite-menu label slot=content-end><calcite-menu-item label @click=${this._handleSignIn} @keydown=${t=>c(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 l`<calcite-dropdown overlay-positioning=fixed slot=content-end width=m ${r(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=>c(e,()=>this._handleMenuClick("all-solutions",this._dropdownItemAll,[this._dropdownItemMy,this._dropdownItemResources,this._dropdownItemMyContent],!0))} ${r(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=>c(e,()=>this._handleMenuClick("deployments",this._dropdownItemMy,[this._dropdownItemAll,this._dropdownItemResources,this._dropdownItemMyContent],!0))} ${r(this._dropdownItemMy)}>${this._translations.myDeployments}</calcite-dropdown-item><calcite-dropdown-item @click=${()=>this._handleMenuClick("resources",this._dropdownItemResources,[this._dropdownItemAll,this._dropdownItemMy,this._dropdownItemMyContent],!0)} @keydown=${e=>c(e,()=>this._handleMenuClick("resources",this._dropdownItemResources,[this._dropdownItemAll,this._dropdownItemMy,this._dropdownItemMyContent],!0))} ${r(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)}} ${r(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 l`<calcite-menu label slot=content-start ${r(this._menuRef)}><calcite-menu-item label @click=${()=>this._handleMenuClick("all-solutions",this._menuItemAll,[this._menuItemMy,this._menuItemResources],!0)} @keydown=${t=>c(t,()=>this._handleMenuClick("all-solutions",this._menuItemAll,[this._menuItemMy,this._menuItemResources],!0))} .text=${this._translations.allSolutions} ${r(this._menuItemAll)}></calcite-menu-item><calcite-menu-item label @click=${()=>this._handleMenuClick("deployments",this._menuItemMy,[this._menuItemAll,this._menuItemResources],!0)} @keydown=${t=>c(t,()=>this._handleMenuClick("deployments",this._menuItemMy,[this._menuItemAll,this._menuItemResources],!0))} .text=${this._translations.myDeployments} ${r(this._menuItemMy)}></calcite-menu-item><calcite-menu-item label @click=${()=>this._handleMenuClick("resources",this._menuItemResources,[this._menuItemAll,this._menuItemMy],!0)} @keydown=${t=>c(t,()=>this._handleMenuClick("resources",this._menuItemResources,[this._menuItemAll,this._menuItemMy],!0))} .text=${this._translations.solutionResources} ${r(this._menuItemResources)}></calcite-menu-item></calcite-menu>`}_getHeading(){return l`<div class="align-self-center display-flex cursor-pointer logo-padding" slot=logo><a aria-label=${this._translations.linkToEsriHomePage??d} class="esri-global-nav__logo-link" href=https://www.esri.com @click=${()=>this._logLinkClickTelemetry("Esri")} rel=noopener target=_blank title=${this._translations.linkToEsriHomePage??d}><svg height=30 viewBox="0 0 84 30" width=84 xmlns=http://www.w3.org/2000/svg>${w`<path fill=${this._logoFill??d} 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??d} 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??d}>${this._translations.arcgisSolutions}</a></div></div>`}_getSubHeading(){let t=this._cardType==="deployed"?this._translations.myDeployments:this._translations.allSolutions;return this._subNavigationCard?l`<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=>c(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??""),l`<div class="height-full display-flex cursor-pointer signin-padding"><calcite-navigation-user class="height-full" full-name=${t?.fullName??d} 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=T(this._thumbnailUrl,t))}};S("solutions-deploy-app-nav",v);return{a:I,b:v}},"identity/IdentityManager","identity/OAuthInfo","portal/Portal",b)
|
|
2
|
+
import b from"./QRPBAR4V.js";import{b as U}from"./PZ4L77M5.js";import{Eb as A,c as M,ya as k}from"./JE7L7M3J.js";import{a as C}from"./6LLQFZGG.js";import{g as m}from"./CGLFPVBM.js";import{b as S}from"./LI7AOAAS.js";import{F as a,G as r,H as f,L as d,h as y,i as l,j as w,r as u}from"./46DQNAMV.js";export default $arcgis.t(([p,P,z,{A:T,K:_,a:R,l:$,t:c}])=>{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._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 P({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 z({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}get RestUserSession(){let t=p.findServerInfo(this._portalRestUrl),e=this._credential?m.fromCredential(this._credential,t):this._isEnterprise?new m({}):new m({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(){try{await this._init()}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="",h=new URLSearchParams(s[1]||"");h.append("signInParam",t),o="?"+h.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(){try{this._credential=await p.checkSignInStatus(this._portalUrl+"/sharing")}catch{}try{let e=await p.checkAppAccess(this._portalUrl+"/sharing",this._clientId);(typeof e.valid<"u"&&!e.valid||e.viewOnlyUserTypeApp)&&window.location.replace(`error.html?error=blocked&locale=${this._locale}`),this._credential=e.credential}catch(e){e.name}this._portal.authMode="auto",await this._portal.load();let t=this._credential?await k(this.RestUserSession):{};if(this._isEnterprise=this._portal.isPortal,this._isEnterprise)try{let e=`${this._portal.restUrl}/portals/self/settings`,i=await M(e,{authentication:this._credential?this.RestUserSession:void 0});i?.portalConfigProperties?.searchArcGISOnlineEnabled!==void 0?this._searchArcGISOnlineEnabled=i.portalConfigProperties.searchArcGISOnlineEnabled:this._searchArcGISOnlineEnabled=!1}catch(e){console.warn("Failed to fetch portal settings:",e),this._searchArcGISOnlineEnabled=!1}else this._searchArcGISOnlineEnabled=!0;return 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:t},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 A(this._portal.restUrl,this.RestUserSession||new m({}))),this._portal?.user?.roleId&&this._portalUserSubset&&(this._portalUserSubset.roleId=this._portal.user.roleId),this}_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(h=>this._isSerializable(h)?n+encodeURIComponent(JSON.stringify(h)):n+encodeURIComponent(h)).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:h=""}=t,E=this._mapDimensions(s),x=this._mapMetrics(n);this._telemetryInstance.logEvent({category:e,action:i,label:o,details:h,...E,...x})}}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||$(document.location.hostname,e?.Portal?.portalHostname||"");return i&&Object.keys(t.telemetry).includes(i)?t.telemetry[i]:void 0}},O=y`.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}`,v=class extends f{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=a(),this._dropdownItemAll=a(),this._dropdownItemMy=a(),this._dropdownItemMyContent=a(),this._dropdownItemResources=a(),this._isMobileContextConsumer=U({context:R,subscribe:!0,callback:t=>this._isMobile=t}),this._menuRef=a(),this._menuItemAll=a(),this._menuItemMy=a(),this._menuItemResources=a(),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=O}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 m({username:"",password:""});this._userSession=t}async load(){let t=window.matchMedia("(prefers-color-scheme: dark)");t.addEventListener("change",o=>this._logoFill=this._getLogoFill(o.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;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._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 l`<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?l`<div slot=user>${this._getUserAvatar()}</div>`:l`<calcite-menu label slot=content-end><calcite-menu-item label @click=${this._handleSignIn} @keydown=${t=>c(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 l`<calcite-dropdown overlay-positioning=fixed slot=content-end width=m ${r(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=>c(e,()=>this._handleMenuClick("all-solutions",this._dropdownItemAll,[this._dropdownItemMy,this._dropdownItemResources,this._dropdownItemMyContent],!0))} ${r(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=>c(e,()=>this._handleMenuClick("deployments",this._dropdownItemMy,[this._dropdownItemAll,this._dropdownItemResources,this._dropdownItemMyContent],!0))} ${r(this._dropdownItemMy)}>${this._translations.myDeployments}</calcite-dropdown-item><calcite-dropdown-item @click=${()=>this._handleMenuClick("resources",this._dropdownItemResources,[this._dropdownItemAll,this._dropdownItemMy,this._dropdownItemMyContent],!0)} @keydown=${e=>c(e,()=>this._handleMenuClick("resources",this._dropdownItemResources,[this._dropdownItemAll,this._dropdownItemMy,this._dropdownItemMyContent],!0))} ${r(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)}} ${r(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 l`<calcite-menu label slot=content-start ${r(this._menuRef)}><calcite-menu-item label @click=${()=>this._handleMenuClick("all-solutions",this._menuItemAll,[this._menuItemMy,this._menuItemResources],!0)} @keydown=${t=>c(t,()=>this._handleMenuClick("all-solutions",this._menuItemAll,[this._menuItemMy,this._menuItemResources],!0))} .text=${this._translations.allSolutions} ${r(this._menuItemAll)}></calcite-menu-item><calcite-menu-item label @click=${()=>this._handleMenuClick("deployments",this._menuItemMy,[this._menuItemAll,this._menuItemResources],!0)} @keydown=${t=>c(t,()=>this._handleMenuClick("deployments",this._menuItemMy,[this._menuItemAll,this._menuItemResources],!0))} .text=${this._translations.myDeployments} ${r(this._menuItemMy)}></calcite-menu-item><calcite-menu-item label @click=${()=>this._handleMenuClick("resources",this._menuItemResources,[this._menuItemAll,this._menuItemMy],!0)} @keydown=${t=>c(t,()=>this._handleMenuClick("resources",this._menuItemResources,[this._menuItemAll,this._menuItemMy],!0))} .text=${this._translations.solutionResources} ${r(this._menuItemResources)}></calcite-menu-item></calcite-menu>`}_getHeading(){return l`<div class="align-self-center display-flex cursor-pointer logo-padding" slot=logo><a aria-label=${this._translations.linkToEsriHomePage??d} class="esri-global-nav__logo-link" href=https://www.esri.com @click=${()=>this._logLinkClickTelemetry("Esri")} rel=noopener target=_blank title=${this._translations.linkToEsriHomePage??d}><svg height=30 viewBox="0 0 84 30" width=84 xmlns=http://www.w3.org/2000/svg>${w`<path fill=${this._logoFill??d} 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??d} 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??d}>${this._translations.arcgisSolutions}</a></div></div>`}_getSubHeading(){let t=this._cardType==="deployed"?this._translations.myDeployments:this._translations.allSolutions;return this._subNavigationCard?l`<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=>c(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??""),l`<div class="height-full display-flex cursor-pointer signin-padding"><calcite-navigation-user class="height-full" full-name=${t?.fullName??d} 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=T(this._thumbnailUrl,t))}};S("solutions-deploy-app-nav",v);return{a:I,b:v}},"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"./
|
|
2
|
+
import g from"./JO4WX767.js";import e from"./3H5S6KGV.js";import"./MQF26HKA.js";import"./UGKLBL7D.js";import"./G4VIPBRX.js";import"./3LEJ44U2.js";import d from"./QRPBAR4V.js";import"./PZ4L77M5.js";import"./JE7L7M3J.js";import c from"./KDIUYXBA.js";import a from"./UUYUTETH.js";import{a as y}from"./6LLQFZGG.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 u}from"./LI7AOAAS.js";import{G as f,H as b,h as p,i as m}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([])=>{var v=p`.height-51{height:51px}.width-51{width:51px}`,h=class extends b{constructor(){super(),this._translations=y({name:"field-selection",blocking:!0}),this._fieldSortOrder="default",this._selectedFields=[],this._fieldVisibilityPopoverClickHandler=i=>{this._fieldVisibilityPopoverNode?this._isInNode(i.target,"arcgis-field-pick-list")||(document.body.removeChild(this._fieldVisibilityPopoverNode),this._fieldVisibilityPopoverNode=void 0,document.removeEventListener("click",this._fieldVisibilityPopoverClickHandler)):document.removeEventListener("click",this._fieldVisibilityPopoverClickHandler)},this.listenOn(window,"columnReorder",this.handleColumnReorder,{capture:!0})}static{this.properties={configExtraFields:1,layer:0,mapView:0,table:0,tableRef:0,_translations:16}}static{this.styles=v}render(){return m`<calcite-action alignment=center appearance=solid class="height-51 width-51" id=solutions-field-selection .text=${this._translations.fieldVisibility} scale=m @click=${()=>this._handleFieldVisibilityClick()} @mouseover=${()=>this._addTableTooltip(this._fieldVisibilityActionNode,this._translations.fieldVisibility)} @mouseout=${()=>this._removeTableTooltip()} @focus=${()=>this._addTableTooltip(this._fieldVisibilityActionNode,this._translations.fieldVisibility)} ${f(i=>this._fieldVisibilityActionNode=i)}><calcite-icon scale=s icon=gear></calcite-icon></calcite-action>`}handleColumnReorder(){this._fieldSortOrder="default",this._fieldVisibilityPopoverNode&&(this.removeFieldsPickList(),this._handleFieldVisibilityClick())}_handleFieldVisibilityClick(){if(this._fieldVisibilityPopoverNode)return;let i=this.table?.tableTemplate?.columnTemplates;if(this.layer&&this.mapView&&i&&this._fieldVisibilityActionNode){document.removeEventListener("click",this._fieldVisibilityPopoverClickHandler);let t=this.table.fieldColumns.map(l=>({alias:l.field.alias,description:l.field.description,name:l.field.name,type:l.field.type}));if(this._hasAttachmentsEnabled(this.layer)){let l="Attachments";if(this._shouldShowField(l.toUpperCase(),!1)){if(!i.some(s=>s.fieldName.toUpperCase()===l.toUpperCase())){let s={fieldName:l,type:"attachment",visible:!0};i.push(s)}t.push({name:l,alias:"Photos and files",type:"none",description:l})}}if(this.table.relatedRecordsEnabled&&this.layer.relationships&&this.layer.relationships.length>0){let l=this.layer.parent;this.layer.relationships.forEach(s=>{let o,d=this._shouldShowField(s.name||"",!0);if(!i.some(a=>a.fieldName.toLowerCase()===s.name?.toLowerCase()?(o=s.name,!0):!1))if(s.name){o=s.name;let a={fieldName:o,type:"relationship",visible:!0};d=this._shouldShowField(o,!0),i.push(a)}else{let a=[...l?.layers||[],...l?.tables],c;if(a.some(n=>n.layerId===s.relatedTableId?(c=n,!0):!1),c){o=c.title,s.name=o;let n={fieldName:o,type:"relationship",visible:!0};d=this._shouldShowField(o,!0),i.push(n)}}o&&d&&t.push({name:o,alias:`Related ${o}`,type:"none",description:`related:${o}`})})}let e=this._fieldVisibilityPopoverNode?this._fieldVisibilityPopoverNode:document.createElement("arcgis-field-pick-list");e.layer=this.layer,e.fields=t,e.showFieldInfo=!0,e.showFieldName=!0,e.showDescription=!1,e.showSelectionAll=!0,e.hideCancel=!0,e.hideSort=!1,e.showFilterLength=5,e.multiple=!0,e.heading=this._translations.fieldVisibility,e.okBtnText=this._translations.doneWithFieldChanges,e.filterPlaceholderText=this._translations.filterFields,e.sortBy=this._fieldSortOrder??"default";let r=this.table?.visibleColumns.map(l=>l.fieldName.startsWith("EsriFeatureTableRelationshipColumn")||l.fieldName.startsWith("EsriFeatureTableAttachmentsColumn")?l.effectiveLabel:l.fieldName);e.selectedFields=i.reduce((l,s)=>((r?r.indexOf(s.fieldName)>-1:s.visible)&&l.push(s.fieldName),l),[]),this._selectedFields=e.selectedFields,e.style.minHeight="340px",e.popoverProps={refElement:this._fieldVisibilityActionNode,popoverWidth:300,placement:"bottom-end",offsetDistance:-20,triggerDisabled:!1,autoClose:!1},e.addEventListener("arcgisChange",l=>{l.stopPropagation();let s=l.detail.selectedFields,o=this._getDifference(s,this._selectedFields),d=this._getDifference(this._selectedFields,s);o.concat(d).forEach(a=>{let c=this.layer?.relationships?.map(n=>n.name)||[];if(a==="Attachments"){let n=this.table.columns.find(_=>"onShowAttachments"in _);n.hidden=d.indexOf(a)>-1}else c.indexOf(a)>-1?this.table.columns.filter(n=>"relationshipId"in n).forEach(n=>{d.indexOf(a)>-1,a==n.effectiveLabel&&(n.hidden=d.indexOf(a)>-1)}):this.table.toggleColumnVisibility(a)}),this._selectedFields=s,this._updateTable(this.table.tableTemplate)}),e.addEventListener("arcgisSortByChange",l=>{l.stopPropagation(),this._fieldSortOrder=l.detail,this._sortFields(l.detail)}),e.addEventListener("arcgisClose",()=>{this._closePopovers(),setTimeout(()=>this._fieldVisibilityActionNode.setFocus(),200)}),document.body.appendChild(e),this._fieldVisibilityPopoverNode=e,setTimeout(()=>document.addEventListener("click",this._fieldVisibilityPopoverClickHandler),200)}}_shouldShowField(i,t){return(this.configExtraFields||[]).some(e=>t?e.replace("related:","").toUpperCase()===i.toUpperCase():e.toUpperCase()===i.toUpperCase())}removeFieldsPickList(){this._fieldVisibilityPopoverNode&&(document.body.removeChild(this._fieldVisibilityPopoverNode),this._fieldVisibilityPopoverNode=void 0)}_sortFields(i){let t=this.table.tableTemplate.columnTemplates,e=this._getSortOrder(i),r=t.filter(s=>s.type!=="attachment"&&s.type!=="relationship").sort((s,o)=>{let d=e.indexOf(s.fieldName),a=e.indexOf(o.fieldName);return d===-1&&a!==-1?1:d!==-1&&a===-1?-1:d===-1&&a===-1?0:d-a}),l=t.filter(s=>s.type==="attachment"||s.type==="relationship");this.tableRef.setColumnOrder([...r,...l]),this._updateTable(this.table.tableTemplate)}_getSortOrder(i){let t=[...this.layer.fields];return i==="display"?t.sort((e,r)=>e.alias.localeCompare(r.alias)):i==="field"?t.sort((e,r)=>e.name.localeCompare(r.name)):i==="type"&&t.sort((e,r)=>e.type.localeCompare(r.type)),t.map(e=>e.name)}_getDifference(i,t){return i.filter(e=>!t.includes(e))}_updateTable(i){this.table.tableTemplate=i,this._isStandardView()&&this._syncAttributeTableTemplate()}async _syncAttributeTableTemplate(){let i=this.table.layer;if(i.attributeTableTemplate){let{_modules:t}=this,e=i.attributeTableTemplate.clone();t?.attributeTableTemplateUtils.syncAttributeTableTemplate(this.table,e),JSON.stringify(e)!==JSON.stringify(i.attributeTableTemplate)&&(i.attributeTableTemplate=e)}if(i.attributeTableTemplate?.orderByFields?.length>1){let t=i.attributeTableTemplate.clone(),e=this.table.activeSortOrders[0];t.orderByFields=[{field:e.fieldName,order:e.direction}],i.attributeTableTemplate=t,this._syncColumnDirectionsWithOrderByFields()}}_syncColumnDirectionsWithOrderByFields(){let i=this.table.activeSortOrders[0]?.fieldName;this.table.columns.forEach(t=>{"fieldName"in t&&t.fieldName!==i&&(t.direction=void 0)}),this.table.tableTemplate?.columnTemplates.forEach(t=>{"fieldName"in t&&t.fieldName!==i&&(t.direction=void 0)})}_isStandardView(){return!this.table.relatedTable&&!this.table.attachmentsViewOptions.objectId}_closePopovers(){document.removeEventListener("click",this._fieldVisibilityPopoverClickHandler),this._fieldVisibilityPopoverNode&&(document.body.removeChild(this._fieldVisibilityPopoverNode),this._fieldVisibilityPopoverNode=void 0)}_addTableTooltip(i,t){let e=document.createElement("calcite-tooltip");e.className="table-tooltip",e.referenceElement=i,e.placement="trailing-start",e.open=!0;let r=document.createElement("div");r.className="tooltip",r.innerHTML=t,e.append(r),document.body.append(e)}_removeTableTooltip(){document.querySelectorAll(".table-tooltip").forEach(i=>i.parentNode?.removeChild(i))}_isInNode(i,t){for(;i;){if(i.nodeName===t.toUpperCase())return!0;i=i.parentElement}return!1}_hasAttachmentsEnabled(i){if(!i?.capabilities)return!1;let{capabilities:{data:{supportsAttachment:t},operations:{supportsQueryAttachments:e}}}=i;return t&&e}};u("field-selection",h);return h},a,c,d,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"./Y7H6OFT6.js";import c from"./S23N6TCC.js";import b from"./QRPBAR4V.js";import"./PZ4L77M5.js";import"./JE7L7M3J.js";import"./6LLQFZGG.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"./LI7AOAAS.js";import"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([])=>{return a},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"./LI7AOAAS.js";import{H as a,h as t,i}from"./46DQNAMV.js";var r=t`*[tabindex]:focus-visible{outline:2px solid var(--calcite-color-brand);outline-offset:2px}.resources-section{padding:3rem var(--calcite-spacing-md);max-width:1440px;margin:0 auto;box-sizing:border-box}.section-header{margin-bottom:3rem;text-align:center}.section-heading{font-size:var(--calcite-font-size-3);font-weight:var(--calcite-font-weight-small);margin:0 0 var(--calcite-spacing-lg) 0;color:var(--calcite-color-text-1)}.section-subheading{font-size:var(--calcite-font-size-0);color:var(--calcite-color-text-2);margin:0}.cards-container{display:flex;gap:var(--calcite-spacing-md);flex-wrap:wrap}.cards-container solution-resource-card{flex:1 1 200px}`,s=class extends a{constructor(){super(...arguments),this.heading="",this.subheading="",this.cards=[]}static{this.properties={heading:[1,{type:String}],subheading:[1,{type:String}],cards:[1,{type:Array}]}}static{this.styles=r}render(){return i`<div class="resources-section"><div class="section-header"><h2 class="section-heading" tabindex=0>${this.heading}</h2><p class="section-subheading" tabindex=0>${this.subheading}</p></div><div class="cards-container">${this.cards.map(e=>i`<solution-resource-card .icon=${e.icon} .meridianIcon=${e.meridianIcon} .heading=${e.heading} .description=${e.description} .url=${e.url} .headingEn=${e.headingEn} .sectionHeadingEn=${e.sectionHeadingEn}></solution-resource-card>`)}</div></div>`}};n("solutions-resources-section",s);export{s as a};
|