@esri/solutions-components 5.0.4 → 5.0.5
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/{UB33RJV2.js → 23DKMPGJ.js} +1 -1
- package/dist/cdn/{4WNB4SNS.js → 2ECRQJCU.js} +1 -1
- package/dist/cdn/{NGBSDZLF.js → 2JBJVGPJ.js} +1 -1
- package/dist/cdn/{3ZOEAKII.js → 2YCDW2EI.js} +1 -1
- package/dist/cdn/{36QZL2SP.js → 33HIGVEX.js} +1 -1
- package/dist/cdn/{HVZTHZYK.js → 4O4QS3DG.js} +1 -1
- package/dist/cdn/{F7DGHROD.js → 57INLFON.js} +1 -1
- package/dist/cdn/{44QGF64X.js → 5BEMMNL7.js} +1 -1
- package/dist/cdn/{RVR6SP4R.js → 5G3AHODR.js} +1 -1
- package/dist/cdn/{QOM6K67N.js → 5QP3RIEO.js} +1 -1
- package/dist/cdn/{O24ZIQLV.js → 5QSIKX2L.js} +1 -1
- package/dist/cdn/{5IWB7DXV.js → 5YORDAVH.js} +1 -1
- package/dist/cdn/{KAOZIOH3.js → 67TUHEUB.js} +1 -1
- package/dist/cdn/{TTKCR26F.js → 6HNQQRYK.js} +1 -1
- package/dist/cdn/{575KOORD.js → 6LSHZOMB.js} +1 -1
- package/dist/cdn/{32ZJRLO4.js → 6QODI424.js} +1 -1
- package/dist/cdn/{AXGMN3DZ.js → 7DOH2ZMP.js} +1 -1
- package/dist/cdn/{CPLUG3BV.js → ADJCIRZS.js} +1 -1
- package/dist/cdn/{ZB4IUY3Y.js → BA4FCDQY.js} +1 -1
- package/dist/cdn/{IWBYP44R.js → BADKNCL4.js} +1 -1
- package/dist/cdn/{5ISRU637.js → BCTFO27G.js} +1 -1
- package/dist/cdn/{N3WEX2WW.js → BGBLGDVO.js} +1 -1
- package/dist/cdn/BXKV2QC3.js +2 -0
- package/dist/cdn/{M5MQY5WC.js → DV233ITZ.js} +1 -1
- package/dist/cdn/{L65LKW2L.js → DY3BUOEI.js} +1 -1
- package/dist/cdn/EIQZRLWQ.js +2 -0
- package/dist/cdn/{CKHU23WZ.js → EKZZ7R2V.js} +1 -1
- package/dist/cdn/{PO4PTHS6.js → EPMMVHPO.js} +1 -1
- package/dist/cdn/{OZIXJ6HO.js → EQXQ6YNY.js} +1 -1
- package/dist/cdn/{L26O3GTC.js → HNPTTIXC.js} +1 -1
- package/dist/cdn/{OBMP2HIH.js → IHDRZQU4.js} +1 -1
- package/dist/cdn/{G3KEPG5G.js → IQ6XED24.js} +1 -1
- package/dist/cdn/{AFNUHTXR.js → JSX7H42C.js} +1 -1
- package/dist/cdn/{IGM6M6VG.js → K2BF5736.js} +1 -1
- package/dist/cdn/{3L4JPZ3K.js → K7O46PDI.js} +1 -1
- package/dist/cdn/{IB4U627P.js → KUZQPBVI.js} +1 -1
- package/dist/cdn/{ZRDBHNKL.js → LLIZZGSY.js} +1 -1
- package/dist/cdn/{G235DVXM.js → M2MN2QB7.js} +1 -1
- package/dist/cdn/{P3DGGTC5.js → M6DR7QBF.js} +1 -1
- package/dist/cdn/{SXF342EH.js → MDHKDE77.js} +1 -1
- package/dist/cdn/{Q5LUK5CM.js → MJDNGEFJ.js} +1 -1
- package/dist/cdn/{GKBTOBYA.js → MP5X6HGT.js} +1 -1
- package/dist/cdn/{YA5DNYPF.js → MSGOASUF.js} +1 -1
- package/dist/cdn/{G2FGKUNI.js → MWCQXZOT.js} +1 -1
- package/dist/cdn/{VPSUD6VW.js → N6EQBPC2.js} +1 -1
- package/dist/cdn/{ZZQ73LQE.js → NARQQKRW.js} +1 -1
- package/dist/cdn/{R7OZWCO2.js → NJJEOZ2G.js} +1 -1
- package/dist/cdn/{FZ5LAVZL.js → NORNRIIE.js} +1 -1
- package/dist/cdn/{3UVV2MNJ.js → QPRIL54J.js} +1 -1
- package/dist/cdn/{R2KIT5QB.js → QZZ2CQWS.js} +1 -1
- package/dist/cdn/{DCOGVHCK.js → R47OTDC2.js} +1 -1
- package/dist/cdn/{DQY6HKSD.js → RBCOT3CJ.js} +1 -1
- package/dist/cdn/{4WIRUOFC.js → RGFLXW4Q.js} +1 -1
- package/dist/cdn/{5QZHZP3H.js → RQEYXUDW.js} +1 -1
- package/dist/cdn/{OXUKEA5J.js → RTVWZSKJ.js} +1 -1
- package/dist/cdn/{MPJ5N4H3.js → RYRVUHB7.js} +1 -1
- package/dist/cdn/{RTZ7K25B.js → S42I3DOW.js} +1 -1
- package/dist/cdn/SFZEAERJ.js +2 -0
- package/dist/cdn/{643OMX6D.js → SIUK7OO4.js} +1 -1
- package/dist/cdn/{VW2776MR.js → SQYHEYVJ.js} +1 -1
- package/dist/cdn/{SIUGRN4Q.js → TAZIMIFF.js} +1 -1
- package/dist/cdn/{25XM6BTJ.js → TF3C523O.js} +1 -1
- package/dist/cdn/{YPV5332T.js → TGH6D5IY.js} +1 -1
- package/dist/cdn/{CS224C6F.js → TZPSZTAH.js} +1 -1
- package/dist/cdn/{UV3U3JVV.js → UV4D2QFA.js} +1 -1
- package/dist/cdn/{SVY3DB6Z.js → VEUUNFWR.js} +1 -1
- package/dist/cdn/{2ZUQERRA.js → VGIXK3YM.js} +1 -1
- package/dist/cdn/{BE7WFZ3U.js → VPMYUEFF.js} +1 -1
- package/dist/cdn/{NRATHJBP.js → VVURRW2F.js} +1 -1
- package/dist/cdn/{IHGHHRTQ.js → VW52F2EM.js} +1 -1
- package/dist/cdn/{LLCJDTO5.js → W33YWBF5.js} +1 -1
- package/dist/cdn/{QCX5HMBY.js → WXE6AACQ.js} +1 -1
- package/dist/cdn/{H4AJJYCF.js → X5T6TZW3.js} +1 -1
- package/dist/cdn/{UGC66GAG.js → XLBMKYPQ.js} +1 -1
- package/dist/cdn/{V7HBTLA3.js → XWJFP7BZ.js} +1 -1
- package/dist/cdn/{TWDX3YCN.js → Y3CBLTF5.js} +1 -1
- package/dist/cdn/{FYYI54CE.js → YE7JMYIB.js} +1 -1
- package/dist/cdn/{ETSHZHZS.js → YT2I5RUD.js} +1 -1
- package/dist/cdn/{NNF53M5N.js → YUWQWOOF.js} +1 -1
- package/dist/cdn/{5SWGGS6Z.js → Z6NMQGEQ.js} +1 -1
- package/dist/cdn/{HV4LZMLU.js → ZD3OZO6O.js} +1 -1
- package/dist/cdn/{N2D6RJ3H.js → ZFSMRICA.js} +1 -1
- package/dist/cdn/{WDDMJBPJ.js → ZNG42S47.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/runtime.js +2 -2
- package/dist/components/layer-list/customElement.js +1 -1
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/solutions-components_commit.txt +7 -4
- package/package.json +1 -1
- package/dist/cdn/2GBXQUSA.js +0 -2
- package/dist/cdn/HW7HHHMK.js +0 -2
- package/dist/cdn/RORBHQJC.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
|
|
2
|
-
import{b as r}from"./
|
|
2
|
+
import{b as r}from"./EIQZRLWQ.js";import{H as c,h as e,i as s,r as a}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([l])=>{var n=e`:host{display:block}`,i=class extends c{constructor(){super(...arguments),this.visibilityIcon="eyeball",this.fullscreenStateChange=a()}static{this.properties={mapView:0,layerListWidget:0,visibilityIcon:1}}static{this.styles=n}willUpdate(t){t.has("mapView")&&this.mapViewWatchHandler(),t.has("visibilityIcon")&&this.visibilityIconWatchHandler()}async mapViewWatchHandler(){await this.mapView?.when(async()=>{await this._initLayerListWidget()})}async visibilityIconWatchHandler(){this.layerListWidget&&(this.layerListWidget.visibilityAppearance=this.visibilityIcon==="checkbox"?"checkbox":"default")}render(){return s`<div class="layer-list-widget"></div>`}async updated(){this.hasUpdated||await this._initLayerListWidget()}async loaded(){await this._initLayerListWidget()}async _initLayerListWidget(){this.mapView&&(this.layerListWidget=new l({view:this.mapView,visibilityAppearance:this.visibilityIcon==="checkbox"?"checkbox":"default"}))}};r("layer-list-widget",i);return i},"widgets/LayerList")
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
|
|
2
|
-
import b from"./
|
|
2
|
+
import b from"./6QODI424.js";import a from"./5QSIKX2L.js";import"./PZ4L77M5.js";import"./JE7L7M3J.js";import"./DV233ITZ.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"./EIQZRLWQ.js";import"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([,a])=>{return a},a,b)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
|
|
2
|
-
import{a as M}from"./JOQDD4HN.js";import"./JM5FJEHU.js";import b from"./KDIUYXBA.js";import a from"./UUYUTETH.js";import{a as L}from"./M5MQY5WC.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import{b as I}from"./HW7HHHMK.js";import{F as h,G as r,H as $,J as d,K as v,h as g,i as l,l as w,r as _,u as y}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([,{d:C}])=>{var F=g`@layer{:host{display:block;--calcite-label-margin-bottom: 0px;--solutions-theme-foreground-color: var(--calcite-color-foreground-1)}.padding-1-2{padding:.5rem}.display-flex{display:flex}.width-full{width:100%}.width-1-2{position:relative;width:50%}.width-1-3{position:relative;width:33.33%}.width-2-3{position:relative;width:66.66%}.width-0{width:0}.z-index-2{z-index:2!important}.height-full{height:100%}.height-1-2{position:relative;height:50%}.height-0{height:0}.toggle-node{width:51px;height:51px}.overflow-hidden{overflow:hidden}.flex-column{flex-direction:column}.border{border:1px solid var(--calcite-color-border-3)}.border-top{border-top:1px solid var(--calcite-color-border-3)}.border-bottom{border-bottom:1px solid var(--calcite-color-border-3)}.border-sides{border-left:1px solid var(--calcite-color-border-3);border-right:1px solid var(--calcite-color-border-3)}.position-relative{position:relative}.position-absolute{position:absolute}.position-sticky{position:sticky}.height-50{height:50%}.top-51{top:51px}.adjusted-height-50{height:calc(50% - 25px)}.adjusted-height-100{height:calc(100% - 50px)}.adjusted-height-100-51{height:calc(100% - 51px)}.display-none{display:none!important}.adjusted-height-50_25{height:calc(50% + 25px)}.display-grid{display:grid}.padding-inline-start-75{padding-inline-start:.75rem}.align-items-center{align-items:center}.esri-floor-filter__close-levels-button,.esri-floor-filter__level-button,.esri-floor-filter__browse-button{width:40px!important;height:40px!important}.position-absolute-0{position:absolute;inset:0}.visibility-hidden{visibility:hidden;height:0px}.border-width-0{border-width:0px}.floating-container{position:fixed;width:100px;height:10px;bottom:0;margin:100px 0;z-index:1}.left-0{left:0}.right-0{right:0}.floating-container .floating-button{box-shadow:0 10px 25px #5c5d5e99;-webkit-transform:translatey(5px);transform:translatey(5px);-webkit-transition:all .3s;transition:all .3s}.z-index-0{z-index:0!important}.z-index-1{z-index:1!important}.filter-content-space{--calcite-dialog-content-space: 0px}.background-dark{background:var(--calcite-color-background)}.filter-extent-container{display:flex;justify-content:space-between;align-items:center;padding:10px 0}.filter-modal-buttons{display:flex;padding:12px;gap:10px}.filter-extent-message{align-items:center;display:flex;gap:5px}calcite-action-bar{--calcite-internal-action-bar-gap: 0px;--calcite-internal-action-bar-padding: 0px}}`,m=class extends ${constructor(){super(),this.coverPageEnabled=!1,this.customInfoText="",this.defaultCenter="",this.defaultGlobalId="",this.defaultLayer="",this.defaultLevel="",this.defaultOid="",this.defaultWebmap="",this.honorMapFieldSettings=!1,this.introductionWindowEnabled=!1,this.enableAutoRefresh=!1,this.enableBasemap=!0,this.enableColumnReorder=!0,this.enableCSV=!0,this.enableFloorFilter=!0,this.enableFullscreen=!0,this.enableHome=!0,this.enableLegend=!0,this.enableLayerList=!0,this.enableMapList=!0,this.visibilityIcon="eyeball",this.enableSearch=!0,this.enableShare=!1,this.enableSnapping=!0,this.enableZoom=!0,this.mapInfos=[],this.onlyShowUpdatableLayers=!1,this.popupHeaderColor="",this.popupHeaderHoverColor="",this.popupHeaderHoverTextColor="",this.popupHeaderTextColor="",this.shareIncludeEmbed=!1,this.shareIncludeSocial=!1,this.showNewestFirst=!0,this.theme="light",this.zoomAndScrollToSelected=!1,this.enableSelectionTool=!0,this.featureSelectionMode="multiple",this._deleteDialogOpen=!1,this._enableCreateFeatures=!0,this._hideFooter=!1,this._hideTable=!1,this._isMobile=!1,this._translations=L({name:"crowdsource-manager",blocking:!0}),this._layoutMode="GRID",this._panelOpen=!0,this._numSelected=0,this._filterOpen=!1,this._showInformationHeader=!0,this._layerExpressions=[],this._layerIds=[],this._isLoading=!0,this._mapExtentFilterChecked=!1,this._deleteIds=[],this._showInvalidMapAlert=!1,this._currentMapInfos=[],this._defaultAppLayoutHonored=!1,this._defaultCenterHonored=!1,this._defaultLevelHonored=!1,this._layerTable=h(),this._shouldSetMapView=!1,this._filterList=h(),this._mapCard=h(),this._isMapViewOnLoad=!1,this.showIntroductionWindow=_(),this.showCoverPage=_(),this.listenOn(window,"featureSelectionChange",this.featureSelectionChange),this.listenOn(window,"popupClosed",this.popupClosed),this.listenOn(window,"layoutChanged",this.layoutChanged),this.listenOn(window,"mapChanged",this.mapChanged),this.listenOn(window,"layerSelectionChange",this.layerSelectionChange),this.listenOn(window,"showDelete",this.showDelete),this.listenOn(window,"noLayersFound",this.noLayersFound),this.listenOn(window,"clearSelection",this.clearSelection),this.listenOn(window,"relatedRecordToggled",this.relatedRecordToggled),this.listenOn(window,"creatingFeature",this.creatingFeature),M(window)}static{this.properties={appLayout:1,appProxies:1,basemapConfig:0,coverPageEnabled:5,customInfoText:1,defaultAppLayout:1,defaultCenter:1,defaultGlobalId:1,defaultLayer:1,defaultLevel:1,defaultOid:1,defaultWebmap:1,honorMapFieldSettings:5,introductionWindowEnabled:5,enableAutoRefresh:5,enableBasemap:5,enableColumnReorder:5,enableCSV:5,enableFloorFilter:5,enableFullscreen:5,enableHome:5,enableLegend:5,enableLayerList:5,enableMapList:5,visibilityIcon:1,enableSearch:5,enableShare:5,enableSnapping:5,enableZoom:5,mapInfos:0,onlyShowUpdatableLayers:5,popupHeaderColor:1,popupHeaderHoverColor:1,popupHeaderHoverTextColor:1,popupHeaderTextColor:1,searchConfiguration:0,shareIncludeEmbed:5,shareIncludeSocial:5,showNewestFirst:5,theme:1,zoomAndScrollToSelected:5,zoomToScale:9,enableSelectionTool:5,featureSelectionMode:1,_deleteDialogOpen:16,_enableCreateFeatures:16,_hideFooter:16,_hideTable:16,_isMobile:16,_translations:16,_layer:16,_layoutMode:16,_mapInfo:16,_mapView:16,_panelOpen:16,_numSelected:16,_filterOpen:16,_showInformationHeader:16,_layerExpressions:16,_layerIds:16,_isLoading:16,_mapExtentFilterChecked:16,_deleteIds:16,_showInvalidMapAlert:16,_currentMapInfos:16}}static{this.styles=F}static{this.shadowRootOptions=y}willUpdate(e){e.has("appLayout")&&this.appLayout&&this.appLayoutWatchHandler(this.appLayout,e.get("appLayout")),e.has("enableZoom")&&(this.hasUpdated||this.enableZoom!==!0)&&this.enableZoomWatchHandler(),e.has("mapInfos")&&this.hasUpdated&&this.mapInfosWatchHandler()}appLayoutWatchHandler(e,t){e!==t&&(this._layerTable.value?.validateTableUpdate(e==="splitView"),this._setActiveLayout(e),this.appLayout==="mapView"&&this._layer?.isTable&&this._mapCard.value&&this._mapCard.value.updateLayer(),this._isMapViewOnLoad&&this._layerTable.value&&this._layerTable.value.refresh())}enableZoomWatchHandler(){this._initMapZoom()}mapInfosWatchHandler(){this.updateCurrentMapInfos()}async featureSelectionChange(e){this._numSelected=e.detail?.length}async popupClosed(){this._isMobile&&this.showHideMapPopupAndTable(!1)}async layoutChanged(e){this._layoutMode=e.detail}async mapChanged(e){this._isMapViewOnLoad&&(this._showMapInFullView(),this._isMapViewOnLoad=!1),this._mapChange=e.detail,this.showHideMapPopupAndTable(!1),this._mapChange?.isValid?await this._mapChange.mapView?.when(async()=>{await this._setMapView()}):(this._mapInfo=this._mapChange&&this._getMapInfo(this._mapChange.id),this._showInvalidMapAlert=!0)}async layerSelectionChange(e){let t=e.detail[0],i=this._mapView&&await C(this._mapView,t);i&&await i.when(()=>{i.isTable&&!this._isMobile&&(this.appLayout="tableView"),this._layer=i,this._initLayerExpressions(),this._handleFilterListReset(),this._isLoading=!1})}async showDelete(e){this._deleteIds=e.detail.ids,this._deleteDialogOpen=!0}async noLayersFound(){this._layer=void 0,this._isLoading=!1}async clearSelection(){this.showHideMapPopupAndTable(!1)}async relatedRecordToggled(e){let t=e.detail;this._relatedTableLayer=t}async creatingFeature(){this.appLayout="splitView"}load(){this.updateCurrentMapInfos(),this._resizeObserver=new ResizeObserver(()=>this._onResize())}render(){let e=this.popupHeaderColor&&this.popupHeaderColor!=="#FFFFFF"?"border-width-0":"",t=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light",i=this._translations.invalidWebMapMsg?.replace("{{web_map}}",this._mapInfo?.name||"");return l`${this._showInvalidMapAlert&&l`<calcite-alert auto-close class=${d(t)} icon=check-circle kind=danger label @calciteAlertClose=${()=>{this._showInvalidMapAlert=!1}} open placement=top><div slot=message>${i}</div></calcite-alert>`||""}<calcite-shell class="position-relative"><calcite-panel class=${`width-full height-full ${e}`} .loading=${this._isLoading}>${this._getBody(this._layoutMode,this._panelOpen,this._hideTable)}</calcite-panel>${this._getFooter()}</calcite-shell>${this._filterModal()}${!this._isMobile&&this._deleteModal()||""}`}async updated(){this._shouldSetMapView&&(this._shouldSetMapView=!1,this._mapChange&&await this._setMapView())}loaded(){this._resizeObserver?.observe(this.el),!this._defaultAppLayoutHonored&&this.defaultAppLayout?(this._defaultAppLayoutHonored=!0,this.appLayout=this.defaultAppLayout):this.appLayout||(this.appLayout="splitView"),this._isMapViewOnLoad=this.appLayout==="mapView",this._setActiveLayout(this.appLayout)}_getFooter(){let e=this._numSelected>0,t=this._layerTable.value&&this._layerTable.value.selectedRelatedIds?.length>0?this._relatedTableLayer:this._layer,i=this._layer?.editingEnabled&&this._layer.capabilities?.operations.supportsDelete;return this._isMobile&&e&&!this._hideFooter?l`<div class=${"width-100"} slot=footer><div class="display-flex padding-1-2"><calcite-button appearance=solid id=solutions-show @click=${()=>this.showHideMapPopupAndTable(!0)} width=full>${this._translations.view.replace("{{n}}",this._numSelected.toString())}</calcite-button>${i?l`<delete-button class="padding-inline-start-1 width-full" id=solutions-delete .ids=${this.updateIdsToBeDeleted()} @deleteClicked=${this.updateIdsToBeDeleted} .layer=${t}></delete-button>`:void 0}</div></div>`:void 0}updateIdsToBeDeleted(){return this._deleteIds=this._layerTable.value&&this._layerTable.value.selectedRelatedIds?.length>0?this._layerTable.value.selectedRelatedIds:this._layerTable.value?.selectedIds,this._deleteIds}_setActiveLayout(e){e==="splitView"&&!this._panelOpen&&this._toggleLayout(),e==="mapView"?this._showMapInFullView():this._showMapInCardView()}_getDividerIcon(e,t){return e==="HORIZONTAL"?t?"chevrons-up":"chevrons-down":e==="VERTICAL"||e==="GRID"?t?"chevrons-left":"chevrons-right":void 0}_getMapSizeClass(e,t,i){let a="";switch(e){case"HORIZONTAL":a=`${t&&!i?"height-1-2 display-grid":t&&i?"height-full":"height-0"} width-full position-relative`;break;case"GRID":a=`height-full position-relative ${t?"width-1-3":"width-0"}`;break;case"VERTICAL":a=`height-full position-relative ${t?"width-1-2":"width-0"}`;break}return a}_getTableSizeClass(e,t){let i="";switch(e){case"HORIZONTAL":i=`${t?"height-1-2":"height-full"} width-full display-flex flex-column`;break;case"GRID":i=`${t?"width-2-3":"width-full"} height-full display-flex`;break;case"VERTICAL":i=`${t?"width-1-2":"width-full"} height-full display-flex`;break}return i}_getBody(e,t,i){let a=e==="HORIZONTAL"?"":"display-flex",s=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light",o=document.dir==="rtl"?"left-0":"right-0";return l`<calcite-panel class="width-full height-full position-absolute"><div class=${`width-full height-full overflow-hidden ${a}`}>${this._getMapAndCard(e,t,i)}${this._getTable(e,t,i)}</div>${this.coverPageEnabled&&l`<div class=${`floating-container ${o}`} @click=${this.coverPageButtonClick}><calcite-button appearance=solid class=${`floating-button ${s}`} icon-start=content-minimal kind=neutral label round scale=l split-child=primary width=auto></calcite-button></div>`||""}${this.introductionWindowEnabled&&l`<div class=${`floating-container ${o}`} @click=${this.infoButtonClick}><calcite-button appearance=solid class=${`floating-button ${s}`} icon-start=information-letter kind=neutral label round scale=l split-child=primary width=auto></calcite-button></div>`||""}</calcite-panel>`}infoButtonClick(){this.showIntroductionWindow.emit()}coverPageButtonClick(){this.showCoverPage.emit()}_getMapAndCard(e,t,i){let a=this._getMapSizeClass(e,t,i);return l`<div class=${`${a} overflow-hidden z-index-2`}>${this._getMapNode(t)}${this._getPopupExpandNode()}</div>`}_getMapNode(e){let t=this.appLayout==="mapView",i=this.appLayout==="tableView",a=this._isMobile?"height-full":t||i?"position-absolute-0":this._layoutMode==="HORIZONTAL"&&(!this._isMobile||e)?"":"adjusted-height-50",s=this.defaultWebmap&&this.defaultLayer,o=this.enableSelectionTool&&this.featureSelectionMode==="multiple"&&!this._layer?.isTable,p=["home","legend","search","fullscreen","basemap","floorfilter","layers-list","selectiontool"],c=["map-picker","map-layer-picker"],n=document.dir||"ltr";return l`<div class=${`${a} overflow-hidden`} id=card-mapView><map-card .appLayout=${this.appLayout} .appProxies=${this.appProxies} .basemapConfig=${this.basemapConfig} class="width-full" .defaultLayerId=${s?this.defaultLayer:""} .defaultWebmapId=${this.defaultWebmap} .enableBasemap=${this.enableBasemap} .enableFloorFilter=${this.enableFloorFilter} .enableFullscreen=${this.enableFullscreen} .enableHome=${this.enableHome} .enableLegend=${this.enableLegend} .enableLayerList=${this.enableLayerList} .enableSearch=${this.enableSearch} .enableSelectionTool=${o} .enableShare=${this.enableShare} enable-single-expand enable-map-layer-picker enable-map-picker .featureSelectionMode=${this.featureSelectionMode} .hide=${!this._isMobile&&i} zoom-tools-size=s .isMapLayout=${t} .isMobile=${this._isMobile} .mapInfo=${this._mapInfo} .mapInfos=${this._currentMapInfos.filter(u=>u.visible!==!1)} map-widgets-index=0 .mapWidgetsPosition=${n==="rtl"?"top-right":"top-left"} .mobileMapWidgetsPosition=${n==="rtl"?"top-left":"top-right"} map-widgets-size=m .showOnlyUpdatableLayers=${this.onlyShowUpdatableLayers} @toggleFilter=${this._toggleFilter} .selectedFeaturesIds=${this._layerTable.value?.selectedIds??[]} .selectedLayer=${this._layer} .shareIncludeEmbed=${this.shareIncludeEmbed} .shareIncludeSocial=${this.shareIncludeSocial} stack-tools .theme=${this.theme} .visibilityIcon=${this.visibilityIcon} .mapToolsOrder=${p} .mobileToolsOrder=${c} .zoomToScale=${this.zoomToScale} ${r(this._mapCard)}></map-card></div>`}_getPopupExpandNode(){let e=this._isMobile?"height-full":"height-full position-relative",t=this._isMobile&&this._showInformationHeader?"display-none height-0":"",i=this.popupHeaderColor?"":this._isMobile?"calcite-mode-light":"calcite-mode-dark",a=this._isMobile&&this._hideTable?"position-absolute-0 width-full height-full":this._isMobile?"display-none height-0":"",s=this._currentMapInfos?.length>1&&this.appLayout==="tableView"?"position-relative top-51":"",o=this.appLayout!=="tableView"?"position-sticky":"";return l`<div class=${`${i} ${e} ${a} ${s} ${o}`} style=${v({"--calcite-color-foreground-1":this.popupHeaderColor,"--calcite-color-foreground-2":this.popupHeaderHoverColor,"--calcite-color-text-3":this.popupHeaderTextColor,"--calcite-color-text-2":this.popupHeaderTextColor})}><calcite-panel>${!this._isMobile&&this._showInformationHeader||this._numSelected>0&&!this._isMobile?l`<div class=${`display-flex align-items-center ${t}`} slot=header-content><calcite-icon icon=information scale=s></calcite-icon><div class="padding-inline-start-75">${this._translations.information}</div></div>`:l`<div></div>`}${this._getCardNode()}</calcite-panel></div>`}_getCardNode(){let e=this.appLayout==="mapView",t=this.appLayout==="tableView",i=this._isMobile?"height-full":t&&this._currentMapInfos?.length>1?"adjusted-height-100-51":e||t?"height-full":this._numSelected>0&&!this._isMobile?"height-50":this._showInformationHeader?this._isMobile?"height-full":"height-50":"adjusted-height-50_25",a=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light",s=this._layerTable.value&&this._layerTable.value.selectedRelatedIds?.length>0?this._relatedTableLayer:this._layer;return l`<div class=${`width-50 height-full ${a}`}><card-manager class=${`${i} width-full`} .customInfoText=${this.customInfoText} .enableCreateFeatures=${this._enableCreateFeatures&&!this._isMobile} .createBtnLabel=${this._mapInfo?.createFeatureButtonLabel} .enableEditGeometry=${this._mapInfo?.enableEditGeometry} .enableSnapping=${this.enableSnapping} .isMobile=${this._isMobile} .layerOrTable=${s} .mapView=${this?._mapView} @backFromCreateWorkFlow=${()=>{this._showInformationHeader=!0}} @createWorkFlowStarted=${()=>{this.appLayout=s?.isTable?"tableView":"mapView",this._showInformationHeader=!1}} @featureOrRecordSubmitted=${()=>this._layerTable.value&&void this._layerTable.value.refresh()} .selectedFeaturesIds=${this._layerTable.value?.selectedIds} .selectingFeatureFromMap=${this.appLayout==="mapView"} .showSketchWidgets=${s?.geometryType!=="point"} .zoomAndScrollToSelected=${this.zoomAndScrollToSelected}></card-manager></div>`}_getTable(e,t,i){let a=this.appLayout==="mapView",s=this.appLayout==="tableView",o=i&&this._isMobile?"visibility-hidden":a?"display-none":"",p=a?"height-full width-full z-index-0":"display-none",c=this._getTableSizeClass(e,t),n=e==="HORIZONTAL"?"horizontal":"vertical",u=e==="HORIZONTAL"?"header":"panel-start",b=this.defaultWebmap&&this.defaultLayer,x=this._isMobile?"border-top":"",f=this.defaultGlobalId?this.defaultGlobalId?.indexOf(",")>-1?this.defaultGlobalId.split(","):[this.defaultGlobalId]:void 0,T=this.defaultOid?this.defaultOid?.indexOf(",")>-1?this.defaultOid.split(",").map(S=>Number.parseInt(S,10)):[Number.parseInt(this.defaultOid,10)]:void 0;return l`<calcite-shell class=${`${c} ${x} border-bottom z-index-1`}>${this._isMobile?void 0:l`<calcite-action-bar class="border-sides" expand-disabled .layout=${n} slot=${u??w}>${this.getActions(e,t)}</calcite-action-bar>`}<div class=${`width-full height-full position-relative z-index-0 ${o}`}><layer-table .appLayout=${this.appLayout} .defaultGlobalId=${b?f:void 0} .defaultLayerId=${b?this.defaultLayer:""} .defaultOid=${b&&!f?T:void 0} .enableAutoRefresh=${this.enableAutoRefresh} .enableCSV=${this.enableCSV} .enableColumnReorder=${this.enableColumnReorder} .enableInlineEdit=${this?._mapInfo?.enableInlineEdit} .enableTableAutosave=${this._mapInfo?.enableTableAutosave!==void 0?this._mapInfo?.enableTableAutosave:!0} .enableShare=${this.enableShare} .featureSelectionMode=${this.featureSelectionMode} .honorMapFieldSettings=${this.honorMapFieldSettings} .isMobile=${this._isMobile} .mapHidden=${s} .mapInfo=${this._mapInfo} .mapView=${this?._mapView} .showOnlyUpdatableLayers=${this.onlyShowUpdatableLayers} @toggleFilter=${this._toggleFilter} .shareIncludeEmbed=${this.shareIncludeEmbed} .shareIncludeSocial=${this.shareIncludeSocial} .showNewestFirst=${this.showNewestFirst} .zoomAndScrollToSelected=${this.zoomAndScrollToSelected} .zoomToScale=${this.zoomToScale} ${r(this._layerTable)}></layer-table></div><div class=${d(p)} id=full-map-view></div></calcite-shell>`}getActions(e,t){let i=this._getDividerIcon(e,t),a=t?this._translations.close:this._translations.open,s="toggle-layout";return l`<calcite-action .active=${this.appLayout==="splitView"} alignment=center appearance=solid class="toggle-node" icon=browser id=browser-action @click=${()=>{this.appLayout="splitView"}} text></calcite-action><calcite-tooltip placement=right reference-element=browser-action><span>${this._translations.splitView}</span></calcite-tooltip><calcite-action .active=${this.appLayout==="tableView"} alignment=center appearance=solid class="toggle-node" icon=dock-left id=dock-left-action @click=${()=>{this.appLayout="tableView"}} text></calcite-action><calcite-tooltip placement=right reference-element=dock-left-action><span>${this._translations.tableView}</span></calcite-tooltip><calcite-action .active=${this.appLayout==="mapView"} alignment=center appearance=solid class="toggle-node" .disabled=${this._layer?.isTable} icon=browser-map id=browser-map-action @click=${()=>{this.appLayout="mapView"}} text></calcite-action><calcite-tooltip placement=right reference-element=browser-map-action><span>${this._translations.mapView}</span></calcite-tooltip><calcite-action alignment=center appearance=solid class="toggle-node" .icon=${i} id=${s} @click=${()=>this._toggleLayout()} slot=actions-end text></calcite-action><calcite-tooltip placement=bottom .referenceElement=${s}><span>${a}</span></calcite-tooltip>`}_deleteModal(){let e=(this._layerTable.value?.selectedRelatedIds?.length??0)>0?this._relatedTableLayer:this._layer;return l`<delete-dialog id=deleteDialogId .ids=${this._deleteIds} .layer=${e} @deleteDialogClose=${()=>this._deleteDialogOpen=!1} .open=${this._deleteDialogOpen}></delete-dialog>`}_mapExtentFilter(){let e=this._layerExpressions?.length===0;return l`<calcite-panel><div><calcite-block class=${d(this.theme==="dark"?"background-dark":"")} heading menu-placement=bottom-end open><div class="filter-extent-container"><div class="filter-extent-message"><span>${this._translations.filterByExtentMsg}</span><calcite-icon icon=information id=filter-message-info scale=s></calcite-icon><calcite-tooltip overlay-positioning=fixed placement=top reference-element=filter-message-info>${this._translations.filterByExtentTooltipMsg}</calcite-tooltip></div><calcite-switch .checked=${this._mapExtentFilterChecked} @calciteSwitchChange=${t=>{let i=!!(t.target.checked||this._filterList.value?.filterCount&&this._filterList.value?.filterCount>0);this._layerTable.value&&this._layerTable.value?.filterUpdate(i,t.target.checked),this._mapCard.value&&this._mapCard.value?.updateFilterState(i),this._mapExtentFilterChecked=t.target.checked}} scale=m></calcite-switch></div></calcite-block>${e&&l`<div class="filter-modal-buttons" slot=footer><calcite-button appearance=outline @click=${this._handleFilterListReset} width=full>${this._translations.Resetfilter}</calcite-button><calcite-button @click=${this._closeFilter} width=full>${this._translations.close}</calcite-button></div>`||""}</div></calcite-panel>`}_filterModal(){let e=this._layerExpressions?.length>0,t=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light";return l`<calcite-dialog class=${`filter-content-space ${t}`} .heading=${this._translations.filter.replace("{{title}}",this._layer?.title||"")} id=solutions-filter-dialog-manager kind=brand modal @calciteDialogClose=${()=>{this._closeFilter()}} .open=${this._filterOpen} width=s>${!this._layer?.isTable&&this._mapExtentFilter()||""}${e&&this._mapView&&l`<instant-apps-filter-list close-btn .closeBtnOnClick=${()=>{this._closeFilter()}} combobox-overlay-positioning=fixed .layerExpressions=${this._layerExpressions} @filterListReset=${this._handleFilterListReset} @filterUpdate=${()=>{this._updateFilter()}} .view=${this._mapView} ${r(this._filterList)}></instant-apps-filter-list>`||""}</calcite-dialog>`}_updateFilter(){let e=this._filterList?.value?.filterCount&&this._filterList.value.filterCount>0||this._mapExtentFilterChecked;this._layerTable.value&&this._layerTable.value?.filterUpdate(e),this._mapCard.value&&this._mapCard.value.updateFilterState(e)}_initLayerExpressions(){let e=this._mapInfo?.filterConfig?.layerExpressions;this._layerExpressions=e?e.filter(t=>t.id===this._layer?.id):[]}_toggleFilter(){this._filterOpen=!this._filterOpen}_handleFilterListReset(){this._mapExtentFilterChecked=!1,this._mapCard.value&&this._mapCard.value.resetFilter(),this._layerTable.value&&this._layerTable.value.filterReset()}async _closeFilter(){this._filterOpen&&(this._filterOpen=!1,this._layerTable.value&&this._layerTable.value.closeFilter())}_onResize(){let e=this.el.offsetWidth<=1024,t=!this._isMobile&&e;this._isMobile=e,t&&(this._panelOpen=!0),this._isMobile?(this.showHideMapPopupAndTable(!this._isMobile),this.appLayout="splitView"):(this._layer?.isTable&&(this.appLayout="tableView"),this._isMobile=!1),this._layoutMode=this._isMobile?"HORIZONTAL":"GRID"}updateCurrentMapInfos(){this._currentMapInfos=this.mapInfos,!this.enableMapList&&this.defaultWebmap&&(this._currentMapInfos=this.mapInfos.filter(e=>e.id===this.defaultWebmap))}_toggleLayout(){this._panelOpen=!this._panelOpen}_showMapInCardView(){if(this.appLayout!=="mapView"){let e=document.getElementById("full-map-view")?.childNodes[0],t=document.getElementById("card-mapView");e&&t&&t.appendChild(e)}}_showMapInFullView(){let e=document.getElementById("card-mapView")?.childNodes,t;e?.forEach(a=>{!t&&a.mapView&&(t=a)});let i=document.getElementById("full-map-view");t&&i&&i.appendChild(t)}showHideMapPopupAndTable(e){this._hideTable=e,this._hideFooter=e}_getMapInfo(e){let t;return this._currentMapInfos.some(i=>i.id===e?(t={...i},!0):!1),t}async _setMapView(){let e=this._mapChange&&this._getMapInfo(this._mapChange.id);if(e&&this._mapChange){this._mapInfo=e,this._initLayerExpressions(),this._enableCreateFeatures=this._mapInfo.enableCreateFeatures,this._mapView=this._mapChange.mapView,this._initMapZoom(),this._mapView&&(this._mapView.popupEnabled=!1);let t=!this.defaultCenter||this._defaultCenterHonored?void 0:this.defaultCenter?.split(";").map(a=>Number.parseFloat(a)),i=!this.defaultLevel||this._defaultLevelHonored?void 0:Number.parseInt(this.defaultLevel,10);t&&i&&(await this._mapView?.goTo({center:t,zoom:i}),this._defaultCenterHonored=!0,this._defaultLevelHonored=!0)}}_initMapZoom(){this.enableZoom?this.enableZoom&&this._mapView?.ui.add({component:"zoom",position:"top-left",index:0}):this._mapView?.ui.remove("zoom")}};I("crowdsource-manager",m);return m},a,b)
|
|
2
|
+
import{a as M}from"./JOQDD4HN.js";import"./JM5FJEHU.js";import b from"./KDIUYXBA.js";import a from"./UUYUTETH.js";import{a as L}from"./DV233ITZ.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import{b as I}from"./EIQZRLWQ.js";import{F as h,G as r,H as $,J as d,K as v,h as g,i as l,l as w,r as _,u as y}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([,{d:C}])=>{var F=g`@layer{:host{display:block;--calcite-label-margin-bottom: 0px;--solutions-theme-foreground-color: var(--calcite-color-foreground-1)}.padding-1-2{padding:.5rem}.display-flex{display:flex}.width-full{width:100%}.width-1-2{position:relative;width:50%}.width-1-3{position:relative;width:33.33%}.width-2-3{position:relative;width:66.66%}.width-0{width:0}.z-index-2{z-index:2!important}.height-full{height:100%}.height-1-2{position:relative;height:50%}.height-0{height:0}.toggle-node{width:51px;height:51px}.overflow-hidden{overflow:hidden}.flex-column{flex-direction:column}.border{border:1px solid var(--calcite-color-border-3)}.border-top{border-top:1px solid var(--calcite-color-border-3)}.border-bottom{border-bottom:1px solid var(--calcite-color-border-3)}.border-sides{border-left:1px solid var(--calcite-color-border-3);border-right:1px solid var(--calcite-color-border-3)}.position-relative{position:relative}.position-absolute{position:absolute}.position-sticky{position:sticky}.height-50{height:50%}.top-51{top:51px}.adjusted-height-50{height:calc(50% - 25px)}.adjusted-height-100{height:calc(100% - 50px)}.adjusted-height-100-51{height:calc(100% - 51px)}.display-none{display:none!important}.adjusted-height-50_25{height:calc(50% + 25px)}.display-grid{display:grid}.padding-inline-start-75{padding-inline-start:.75rem}.align-items-center{align-items:center}.esri-floor-filter__close-levels-button,.esri-floor-filter__level-button,.esri-floor-filter__browse-button{width:40px!important;height:40px!important}.position-absolute-0{position:absolute;inset:0}.visibility-hidden{visibility:hidden;height:0px}.border-width-0{border-width:0px}.floating-container{position:fixed;width:100px;height:10px;bottom:0;margin:100px 0;z-index:1}.left-0{left:0}.right-0{right:0}.floating-container .floating-button{box-shadow:0 10px 25px #5c5d5e99;-webkit-transform:translatey(5px);transform:translatey(5px);-webkit-transition:all .3s;transition:all .3s}.z-index-0{z-index:0!important}.z-index-1{z-index:1!important}.filter-content-space{--calcite-dialog-content-space: 0px}.background-dark{background:var(--calcite-color-background)}.filter-extent-container{display:flex;justify-content:space-between;align-items:center;padding:10px 0}.filter-modal-buttons{display:flex;padding:12px;gap:10px}.filter-extent-message{align-items:center;display:flex;gap:5px}calcite-action-bar{--calcite-internal-action-bar-gap: 0px;--calcite-internal-action-bar-padding: 0px}}`,m=class extends ${constructor(){super(),this.coverPageEnabled=!1,this.customInfoText="",this.defaultCenter="",this.defaultGlobalId="",this.defaultLayer="",this.defaultLevel="",this.defaultOid="",this.defaultWebmap="",this.honorMapFieldSettings=!1,this.introductionWindowEnabled=!1,this.enableAutoRefresh=!1,this.enableBasemap=!0,this.enableColumnReorder=!0,this.enableCSV=!0,this.enableFloorFilter=!0,this.enableFullscreen=!0,this.enableHome=!0,this.enableLegend=!0,this.enableLayerList=!0,this.enableMapList=!0,this.visibilityIcon="eyeball",this.enableSearch=!0,this.enableShare=!1,this.enableSnapping=!0,this.enableZoom=!0,this.mapInfos=[],this.onlyShowUpdatableLayers=!1,this.popupHeaderColor="",this.popupHeaderHoverColor="",this.popupHeaderHoverTextColor="",this.popupHeaderTextColor="",this.shareIncludeEmbed=!1,this.shareIncludeSocial=!1,this.showNewestFirst=!0,this.theme="light",this.zoomAndScrollToSelected=!1,this.enableSelectionTool=!0,this.featureSelectionMode="multiple",this._deleteDialogOpen=!1,this._enableCreateFeatures=!0,this._hideFooter=!1,this._hideTable=!1,this._isMobile=!1,this._translations=L({name:"crowdsource-manager",blocking:!0}),this._layoutMode="GRID",this._panelOpen=!0,this._numSelected=0,this._filterOpen=!1,this._showInformationHeader=!0,this._layerExpressions=[],this._layerIds=[],this._isLoading=!0,this._mapExtentFilterChecked=!1,this._deleteIds=[],this._showInvalidMapAlert=!1,this._currentMapInfos=[],this._defaultAppLayoutHonored=!1,this._defaultCenterHonored=!1,this._defaultLevelHonored=!1,this._layerTable=h(),this._shouldSetMapView=!1,this._filterList=h(),this._mapCard=h(),this._isMapViewOnLoad=!1,this.showIntroductionWindow=_(),this.showCoverPage=_(),this.listenOn(window,"featureSelectionChange",this.featureSelectionChange),this.listenOn(window,"popupClosed",this.popupClosed),this.listenOn(window,"layoutChanged",this.layoutChanged),this.listenOn(window,"mapChanged",this.mapChanged),this.listenOn(window,"layerSelectionChange",this.layerSelectionChange),this.listenOn(window,"showDelete",this.showDelete),this.listenOn(window,"noLayersFound",this.noLayersFound),this.listenOn(window,"clearSelection",this.clearSelection),this.listenOn(window,"relatedRecordToggled",this.relatedRecordToggled),this.listenOn(window,"creatingFeature",this.creatingFeature),M(window)}static{this.properties={appLayout:1,appProxies:1,basemapConfig:0,coverPageEnabled:5,customInfoText:1,defaultAppLayout:1,defaultCenter:1,defaultGlobalId:1,defaultLayer:1,defaultLevel:1,defaultOid:1,defaultWebmap:1,honorMapFieldSettings:5,introductionWindowEnabled:5,enableAutoRefresh:5,enableBasemap:5,enableColumnReorder:5,enableCSV:5,enableFloorFilter:5,enableFullscreen:5,enableHome:5,enableLegend:5,enableLayerList:5,enableMapList:5,visibilityIcon:1,enableSearch:5,enableShare:5,enableSnapping:5,enableZoom:5,mapInfos:0,onlyShowUpdatableLayers:5,popupHeaderColor:1,popupHeaderHoverColor:1,popupHeaderHoverTextColor:1,popupHeaderTextColor:1,searchConfiguration:0,shareIncludeEmbed:5,shareIncludeSocial:5,showNewestFirst:5,theme:1,zoomAndScrollToSelected:5,zoomToScale:9,enableSelectionTool:5,featureSelectionMode:1,_deleteDialogOpen:16,_enableCreateFeatures:16,_hideFooter:16,_hideTable:16,_isMobile:16,_translations:16,_layer:16,_layoutMode:16,_mapInfo:16,_mapView:16,_panelOpen:16,_numSelected:16,_filterOpen:16,_showInformationHeader:16,_layerExpressions:16,_layerIds:16,_isLoading:16,_mapExtentFilterChecked:16,_deleteIds:16,_showInvalidMapAlert:16,_currentMapInfos:16}}static{this.styles=F}static{this.shadowRootOptions=y}willUpdate(e){e.has("appLayout")&&this.appLayout&&this.appLayoutWatchHandler(this.appLayout,e.get("appLayout")),e.has("enableZoom")&&(this.hasUpdated||this.enableZoom!==!0)&&this.enableZoomWatchHandler(),e.has("mapInfos")&&this.hasUpdated&&this.mapInfosWatchHandler()}appLayoutWatchHandler(e,t){e!==t&&(this._layerTable.value?.validateTableUpdate(e==="splitView"),this._setActiveLayout(e),this.appLayout==="mapView"&&this._layer?.isTable&&this._mapCard.value&&this._mapCard.value.updateLayer(),this._isMapViewOnLoad&&this._layerTable.value&&this._layerTable.value.refresh())}enableZoomWatchHandler(){this._initMapZoom()}mapInfosWatchHandler(){this.updateCurrentMapInfos()}async featureSelectionChange(e){this._numSelected=e.detail?.length}async popupClosed(){this._isMobile&&this.showHideMapPopupAndTable(!1)}async layoutChanged(e){this._layoutMode=e.detail}async mapChanged(e){this._isMapViewOnLoad&&(this._showMapInFullView(),this._isMapViewOnLoad=!1),this._mapChange=e.detail,this.showHideMapPopupAndTable(!1),this._mapChange?.isValid?await this._mapChange.mapView?.when(async()=>{await this._setMapView()}):(this._mapInfo=this._mapChange&&this._getMapInfo(this._mapChange.id),this._showInvalidMapAlert=!0)}async layerSelectionChange(e){let t=e.detail[0],i=this._mapView&&await C(this._mapView,t);i&&await i.when(()=>{i.isTable&&!this._isMobile&&(this.appLayout="tableView"),this._layer=i,this._initLayerExpressions(),this._handleFilterListReset(),this._isLoading=!1})}async showDelete(e){this._deleteIds=e.detail.ids,this._deleteDialogOpen=!0}async noLayersFound(){this._layer=void 0,this._isLoading=!1}async clearSelection(){this.showHideMapPopupAndTable(!1)}async relatedRecordToggled(e){let t=e.detail;this._relatedTableLayer=t}async creatingFeature(){this.appLayout="splitView"}load(){this.updateCurrentMapInfos(),this._resizeObserver=new ResizeObserver(()=>this._onResize())}render(){let e=this.popupHeaderColor&&this.popupHeaderColor!=="#FFFFFF"?"border-width-0":"",t=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light",i=this._translations.invalidWebMapMsg?.replace("{{web_map}}",this._mapInfo?.name||"");return l`${this._showInvalidMapAlert&&l`<calcite-alert auto-close class=${d(t)} icon=check-circle kind=danger label @calciteAlertClose=${()=>{this._showInvalidMapAlert=!1}} open placement=top><div slot=message>${i}</div></calcite-alert>`||""}<calcite-shell class="position-relative"><calcite-panel class=${`width-full height-full ${e}`} .loading=${this._isLoading}>${this._getBody(this._layoutMode,this._panelOpen,this._hideTable)}</calcite-panel>${this._getFooter()}</calcite-shell>${this._filterModal()}${!this._isMobile&&this._deleteModal()||""}`}async updated(){this._shouldSetMapView&&(this._shouldSetMapView=!1,this._mapChange&&await this._setMapView())}loaded(){this._resizeObserver?.observe(this.el),!this._defaultAppLayoutHonored&&this.defaultAppLayout?(this._defaultAppLayoutHonored=!0,this.appLayout=this.defaultAppLayout):this.appLayout||(this.appLayout="splitView"),this._isMapViewOnLoad=this.appLayout==="mapView",this._setActiveLayout(this.appLayout)}_getFooter(){let e=this._numSelected>0,t=this._layerTable.value&&this._layerTable.value.selectedRelatedIds?.length>0?this._relatedTableLayer:this._layer,i=this._layer?.editingEnabled&&this._layer.capabilities?.operations.supportsDelete;return this._isMobile&&e&&!this._hideFooter?l`<div class=${"width-100"} slot=footer><div class="display-flex padding-1-2"><calcite-button appearance=solid id=solutions-show @click=${()=>this.showHideMapPopupAndTable(!0)} width=full>${this._translations.view.replace("{{n}}",this._numSelected.toString())}</calcite-button>${i?l`<delete-button class="padding-inline-start-1 width-full" id=solutions-delete .ids=${this.updateIdsToBeDeleted()} @deleteClicked=${this.updateIdsToBeDeleted} .layer=${t}></delete-button>`:void 0}</div></div>`:void 0}updateIdsToBeDeleted(){return this._deleteIds=this._layerTable.value&&this._layerTable.value.selectedRelatedIds?.length>0?this._layerTable.value.selectedRelatedIds:this._layerTable.value?.selectedIds,this._deleteIds}_setActiveLayout(e){e==="splitView"&&!this._panelOpen&&this._toggleLayout(),e==="mapView"?this._showMapInFullView():this._showMapInCardView()}_getDividerIcon(e,t){return e==="HORIZONTAL"?t?"chevrons-up":"chevrons-down":e==="VERTICAL"||e==="GRID"?t?"chevrons-left":"chevrons-right":void 0}_getMapSizeClass(e,t,i){let a="";switch(e){case"HORIZONTAL":a=`${t&&!i?"height-1-2 display-grid":t&&i?"height-full":"height-0"} width-full position-relative`;break;case"GRID":a=`height-full position-relative ${t?"width-1-3":"width-0"}`;break;case"VERTICAL":a=`height-full position-relative ${t?"width-1-2":"width-0"}`;break}return a}_getTableSizeClass(e,t){let i="";switch(e){case"HORIZONTAL":i=`${t?"height-1-2":"height-full"} width-full display-flex flex-column`;break;case"GRID":i=`${t?"width-2-3":"width-full"} height-full display-flex`;break;case"VERTICAL":i=`${t?"width-1-2":"width-full"} height-full display-flex`;break}return i}_getBody(e,t,i){let a=e==="HORIZONTAL"?"":"display-flex",s=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light",o=document.dir==="rtl"?"left-0":"right-0";return l`<calcite-panel class="width-full height-full position-absolute"><div class=${`width-full height-full overflow-hidden ${a}`}>${this._getMapAndCard(e,t,i)}${this._getTable(e,t,i)}</div>${this.coverPageEnabled&&l`<div class=${`floating-container ${o}`} @click=${this.coverPageButtonClick}><calcite-button appearance=solid class=${`floating-button ${s}`} icon-start=content-minimal kind=neutral label round scale=l split-child=primary width=auto></calcite-button></div>`||""}${this.introductionWindowEnabled&&l`<div class=${`floating-container ${o}`} @click=${this.infoButtonClick}><calcite-button appearance=solid class=${`floating-button ${s}`} icon-start=information-letter kind=neutral label round scale=l split-child=primary width=auto></calcite-button></div>`||""}</calcite-panel>`}infoButtonClick(){this.showIntroductionWindow.emit()}coverPageButtonClick(){this.showCoverPage.emit()}_getMapAndCard(e,t,i){let a=this._getMapSizeClass(e,t,i);return l`<div class=${`${a} overflow-hidden z-index-2`}>${this._getMapNode(t)}${this._getPopupExpandNode()}</div>`}_getMapNode(e){let t=this.appLayout==="mapView",i=this.appLayout==="tableView",a=this._isMobile?"height-full":t||i?"position-absolute-0":this._layoutMode==="HORIZONTAL"&&(!this._isMobile||e)?"":"adjusted-height-50",s=this.defaultWebmap&&this.defaultLayer,o=this.enableSelectionTool&&this.featureSelectionMode==="multiple"&&!this._layer?.isTable,p=["home","legend","search","fullscreen","basemap","floorfilter","layers-list","selectiontool"],c=["map-picker","map-layer-picker"],n=document.dir||"ltr";return l`<div class=${`${a} overflow-hidden`} id=card-mapView><map-card .appLayout=${this.appLayout} .appProxies=${this.appProxies} .basemapConfig=${this.basemapConfig} class="width-full" .defaultLayerId=${s?this.defaultLayer:""} .defaultWebmapId=${this.defaultWebmap} .enableBasemap=${this.enableBasemap} .enableFloorFilter=${this.enableFloorFilter} .enableFullscreen=${this.enableFullscreen} .enableHome=${this.enableHome} .enableLegend=${this.enableLegend} .enableLayerList=${this.enableLayerList} .enableSearch=${this.enableSearch} .enableSelectionTool=${o} .enableShare=${this.enableShare} enable-single-expand enable-map-layer-picker enable-map-picker .featureSelectionMode=${this.featureSelectionMode} .hide=${!this._isMobile&&i} zoom-tools-size=s .isMapLayout=${t} .isMobile=${this._isMobile} .mapInfo=${this._mapInfo} .mapInfos=${this._currentMapInfos.filter(u=>u.visible!==!1)} map-widgets-index=0 .mapWidgetsPosition=${n==="rtl"?"top-right":"top-left"} .mobileMapWidgetsPosition=${n==="rtl"?"top-left":"top-right"} map-widgets-size=m .showOnlyUpdatableLayers=${this.onlyShowUpdatableLayers} @toggleFilter=${this._toggleFilter} .selectedFeaturesIds=${this._layerTable.value?.selectedIds??[]} .selectedLayer=${this._layer} .shareIncludeEmbed=${this.shareIncludeEmbed} .shareIncludeSocial=${this.shareIncludeSocial} stack-tools .theme=${this.theme} .visibilityIcon=${this.visibilityIcon} .mapToolsOrder=${p} .mobileToolsOrder=${c} .zoomToScale=${this.zoomToScale} ${r(this._mapCard)}></map-card></div>`}_getPopupExpandNode(){let e=this._isMobile?"height-full":"height-full position-relative",t=this._isMobile&&this._showInformationHeader?"display-none height-0":"",i=this.popupHeaderColor?"":this._isMobile?"calcite-mode-light":"calcite-mode-dark",a=this._isMobile&&this._hideTable?"position-absolute-0 width-full height-full":this._isMobile?"display-none height-0":"",s=this._currentMapInfos?.length>1&&this.appLayout==="tableView"?"position-relative top-51":"",o=this.appLayout!=="tableView"?"position-sticky":"";return l`<div class=${`${i} ${e} ${a} ${s} ${o}`} style=${v({"--calcite-color-foreground-1":this.popupHeaderColor,"--calcite-color-foreground-2":this.popupHeaderHoverColor,"--calcite-color-text-3":this.popupHeaderTextColor,"--calcite-color-text-2":this.popupHeaderTextColor})}><calcite-panel>${!this._isMobile&&this._showInformationHeader||this._numSelected>0&&!this._isMobile?l`<div class=${`display-flex align-items-center ${t}`} slot=header-content><calcite-icon icon=information scale=s></calcite-icon><div class="padding-inline-start-75">${this._translations.information}</div></div>`:l`<div></div>`}${this._getCardNode()}</calcite-panel></div>`}_getCardNode(){let e=this.appLayout==="mapView",t=this.appLayout==="tableView",i=this._isMobile?"height-full":t&&this._currentMapInfos?.length>1?"adjusted-height-100-51":e||t?"height-full":this._numSelected>0&&!this._isMobile?"height-50":this._showInformationHeader?this._isMobile?"height-full":"height-50":"adjusted-height-50_25",a=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light",s=this._layerTable.value&&this._layerTable.value.selectedRelatedIds?.length>0?this._relatedTableLayer:this._layer;return l`<div class=${`width-50 height-full ${a}`}><card-manager class=${`${i} width-full`} .customInfoText=${this.customInfoText} .enableCreateFeatures=${this._enableCreateFeatures&&!this._isMobile} .createBtnLabel=${this._mapInfo?.createFeatureButtonLabel} .enableEditGeometry=${this._mapInfo?.enableEditGeometry} .enableSnapping=${this.enableSnapping} .isMobile=${this._isMobile} .layerOrTable=${s} .mapView=${this?._mapView} @backFromCreateWorkFlow=${()=>{this._showInformationHeader=!0}} @createWorkFlowStarted=${()=>{this.appLayout=s?.isTable?"tableView":"mapView",this._showInformationHeader=!1}} @featureOrRecordSubmitted=${()=>this._layerTable.value&&void this._layerTable.value.refresh()} .selectedFeaturesIds=${this._layerTable.value?.selectedIds} .selectingFeatureFromMap=${this.appLayout==="mapView"} .showSketchWidgets=${s?.geometryType!=="point"} .zoomAndScrollToSelected=${this.zoomAndScrollToSelected}></card-manager></div>`}_getTable(e,t,i){let a=this.appLayout==="mapView",s=this.appLayout==="tableView",o=i&&this._isMobile?"visibility-hidden":a?"display-none":"",p=a?"height-full width-full z-index-0":"display-none",c=this._getTableSizeClass(e,t),n=e==="HORIZONTAL"?"horizontal":"vertical",u=e==="HORIZONTAL"?"header":"panel-start",b=this.defaultWebmap&&this.defaultLayer,x=this._isMobile?"border-top":"",f=this.defaultGlobalId?this.defaultGlobalId?.indexOf(",")>-1?this.defaultGlobalId.split(","):[this.defaultGlobalId]:void 0,T=this.defaultOid?this.defaultOid?.indexOf(",")>-1?this.defaultOid.split(",").map(S=>Number.parseInt(S,10)):[Number.parseInt(this.defaultOid,10)]:void 0;return l`<calcite-shell class=${`${c} ${x} border-bottom z-index-1`}>${this._isMobile?void 0:l`<calcite-action-bar class="border-sides" expand-disabled .layout=${n} slot=${u??w}>${this.getActions(e,t)}</calcite-action-bar>`}<div class=${`width-full height-full position-relative z-index-0 ${o}`}><layer-table .appLayout=${this.appLayout} .defaultGlobalId=${b?f:void 0} .defaultLayerId=${b?this.defaultLayer:""} .defaultOid=${b&&!f?T:void 0} .enableAutoRefresh=${this.enableAutoRefresh} .enableCSV=${this.enableCSV} .enableColumnReorder=${this.enableColumnReorder} .enableInlineEdit=${this?._mapInfo?.enableInlineEdit} .enableTableAutosave=${this._mapInfo?.enableTableAutosave!==void 0?this._mapInfo?.enableTableAutosave:!0} .enableShare=${this.enableShare} .featureSelectionMode=${this.featureSelectionMode} .honorMapFieldSettings=${this.honorMapFieldSettings} .isMobile=${this._isMobile} .mapHidden=${s} .mapInfo=${this._mapInfo} .mapView=${this?._mapView} .showOnlyUpdatableLayers=${this.onlyShowUpdatableLayers} @toggleFilter=${this._toggleFilter} .shareIncludeEmbed=${this.shareIncludeEmbed} .shareIncludeSocial=${this.shareIncludeSocial} .showNewestFirst=${this.showNewestFirst} .zoomAndScrollToSelected=${this.zoomAndScrollToSelected} .zoomToScale=${this.zoomToScale} ${r(this._layerTable)}></layer-table></div><div class=${d(p)} id=full-map-view></div></calcite-shell>`}getActions(e,t){let i=this._getDividerIcon(e,t),a=t?this._translations.close:this._translations.open,s="toggle-layout";return l`<calcite-action .active=${this.appLayout==="splitView"} alignment=center appearance=solid class="toggle-node" icon=browser id=browser-action @click=${()=>{this.appLayout="splitView"}} text></calcite-action><calcite-tooltip placement=right reference-element=browser-action><span>${this._translations.splitView}</span></calcite-tooltip><calcite-action .active=${this.appLayout==="tableView"} alignment=center appearance=solid class="toggle-node" icon=dock-left id=dock-left-action @click=${()=>{this.appLayout="tableView"}} text></calcite-action><calcite-tooltip placement=right reference-element=dock-left-action><span>${this._translations.tableView}</span></calcite-tooltip><calcite-action .active=${this.appLayout==="mapView"} alignment=center appearance=solid class="toggle-node" .disabled=${this._layer?.isTable} icon=browser-map id=browser-map-action @click=${()=>{this.appLayout="mapView"}} text></calcite-action><calcite-tooltip placement=right reference-element=browser-map-action><span>${this._translations.mapView}</span></calcite-tooltip><calcite-action alignment=center appearance=solid class="toggle-node" .icon=${i} id=${s} @click=${()=>this._toggleLayout()} slot=actions-end text></calcite-action><calcite-tooltip placement=bottom .referenceElement=${s}><span>${a}</span></calcite-tooltip>`}_deleteModal(){let e=(this._layerTable.value?.selectedRelatedIds?.length??0)>0?this._relatedTableLayer:this._layer;return l`<delete-dialog id=deleteDialogId .ids=${this._deleteIds} .layer=${e} @deleteDialogClose=${()=>this._deleteDialogOpen=!1} .open=${this._deleteDialogOpen}></delete-dialog>`}_mapExtentFilter(){let e=this._layerExpressions?.length===0;return l`<calcite-panel><div><calcite-block class=${d(this.theme==="dark"?"background-dark":"")} heading menu-placement=bottom-end open><div class="filter-extent-container"><div class="filter-extent-message"><span>${this._translations.filterByExtentMsg}</span><calcite-icon icon=information id=filter-message-info scale=s></calcite-icon><calcite-tooltip overlay-positioning=fixed placement=top reference-element=filter-message-info>${this._translations.filterByExtentTooltipMsg}</calcite-tooltip></div><calcite-switch .checked=${this._mapExtentFilterChecked} @calciteSwitchChange=${t=>{let i=!!(t.target.checked||this._filterList.value?.filterCount&&this._filterList.value?.filterCount>0);this._layerTable.value&&this._layerTable.value?.filterUpdate(i,t.target.checked),this._mapCard.value&&this._mapCard.value?.updateFilterState(i),this._mapExtentFilterChecked=t.target.checked}} scale=m></calcite-switch></div></calcite-block>${e&&l`<div class="filter-modal-buttons" slot=footer><calcite-button appearance=outline @click=${this._handleFilterListReset} width=full>${this._translations.Resetfilter}</calcite-button><calcite-button @click=${this._closeFilter} width=full>${this._translations.close}</calcite-button></div>`||""}</div></calcite-panel>`}_filterModal(){let e=this._layerExpressions?.length>0,t=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light";return l`<calcite-dialog class=${`filter-content-space ${t}`} .heading=${this._translations.filter.replace("{{title}}",this._layer?.title||"")} id=solutions-filter-dialog-manager kind=brand modal @calciteDialogClose=${()=>{this._closeFilter()}} .open=${this._filterOpen} width=s>${!this._layer?.isTable&&this._mapExtentFilter()||""}${e&&this._mapView&&l`<instant-apps-filter-list close-btn .closeBtnOnClick=${()=>{this._closeFilter()}} combobox-overlay-positioning=fixed .layerExpressions=${this._layerExpressions} @filterListReset=${this._handleFilterListReset} @filterUpdate=${()=>{this._updateFilter()}} .view=${this._mapView} ${r(this._filterList)}></instant-apps-filter-list>`||""}</calcite-dialog>`}_updateFilter(){let e=this._filterList?.value?.filterCount&&this._filterList.value.filterCount>0||this._mapExtentFilterChecked;this._layerTable.value&&this._layerTable.value?.filterUpdate(e),this._mapCard.value&&this._mapCard.value.updateFilterState(e)}_initLayerExpressions(){let e=this._mapInfo?.filterConfig?.layerExpressions;this._layerExpressions=e?e.filter(t=>t.id===this._layer?.id):[]}_toggleFilter(){this._filterOpen=!this._filterOpen}_handleFilterListReset(){this._mapExtentFilterChecked=!1,this._mapCard.value&&this._mapCard.value.resetFilter(),this._layerTable.value&&this._layerTable.value.filterReset()}async _closeFilter(){this._filterOpen&&(this._filterOpen=!1,this._layerTable.value&&this._layerTable.value.closeFilter())}_onResize(){let e=this.el.offsetWidth<=1024,t=!this._isMobile&&e;this._isMobile=e,t&&(this._panelOpen=!0),this._isMobile?(this.showHideMapPopupAndTable(!this._isMobile),this.appLayout="splitView"):(this._layer?.isTable&&(this.appLayout="tableView"),this._isMobile=!1),this._layoutMode=this._isMobile?"HORIZONTAL":"GRID"}updateCurrentMapInfos(){this._currentMapInfos=this.mapInfos,!this.enableMapList&&this.defaultWebmap&&(this._currentMapInfos=this.mapInfos.filter(e=>e.id===this.defaultWebmap))}_toggleLayout(){this._panelOpen=!this._panelOpen}_showMapInCardView(){if(this.appLayout!=="mapView"){let e=document.getElementById("full-map-view")?.childNodes[0],t=document.getElementById("card-mapView");e&&t&&t.appendChild(e)}}_showMapInFullView(){let e=document.getElementById("card-mapView")?.childNodes,t;e?.forEach(a=>{!t&&a.mapView&&(t=a)});let i=document.getElementById("full-map-view");t&&i&&i.appendChild(t)}showHideMapPopupAndTable(e){this._hideTable=e,this._hideFooter=e}_getMapInfo(e){let t;return this._currentMapInfos.some(i=>i.id===e?(t={...i},!0):!1),t}async _setMapView(){let e=this._mapChange&&this._getMapInfo(this._mapChange.id);if(e&&this._mapChange){this._mapInfo=e,this._initLayerExpressions(),this._enableCreateFeatures=this._mapInfo.enableCreateFeatures,this._mapView=this._mapChange.mapView,this._initMapZoom(),this._mapView&&(this._mapView.popupEnabled=!1);let t=!this.defaultCenter||this._defaultCenterHonored?void 0:this.defaultCenter?.split(";").map(a=>Number.parseFloat(a)),i=!this.defaultLevel||this._defaultLevelHonored?void 0:Number.parseInt(this.defaultLevel,10);t&&i&&(await this._mapView?.goTo({center:t,zoom:i}),this._defaultCenterHonored=!0,this._defaultLevelHonored=!0)}}_initMapZoom(){this.enableZoom?this.enableZoom&&this._mapView?.ui.add({component:"zoom",position:"top-left",index:0}):this._mapView?.ui.remove("zoom")}};I("crowdsource-manager",m);return m},a,b)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
|
|
2
|
-
import b from"./
|
|
2
|
+
import b from"./5QSIKX2L.js";import{b as h}from"./PZ4L77M5.js";import"./JE7L7M3J.js";import{a as S}from"./DV233ITZ.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 m}from"./EIQZRLWQ.js";import{H as u,L as c,h as g,i as a,r as n}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([{L:p,a:y,b:_,t:l}])=>{var w=g`.toolbar-sizing{display:flex;align-items:center;padding-right:0;padding-left:0;margin-left:auto;margin-right:auto;box-sizing:border-box;height:65px}.flex-row{display:flex;flex-direction:row}.flex-grow-1{flex-grow:1}calcite-input-text{--calcite-color-focus: transparent;--calcite-input-text-border-color: transparent;--calcite-color-border-input: transparent;--calcite-color-brand: transparent;display:grid;block-size:65px;box-sizing:border-box;border-bottom:2px solid transparent}@media(prefers-color-scheme:dark){calcite-input-text:focus{border-bottom:2px solid #009AF2}}@media(prefers-color-scheme:light){calcite-input-text:focus{border-bottom:2px solid #007AC2}}.padding-end-1-2{padding-inline-end:.5rem}`,d=class extends u{constructor(){super(),this.defaultSortType="relevance",this.isOrgSolutions=!1,this._activeSearchSortSettings=[{scope:"all-solutions",settings:{enabled:!0,isOrgSolutions:!1,searchTerm:"",sortType:"relevance"}},{scope:"deployments",settings:{enabled:!0,isOrgSolutions:!1,searchTerm:"",sortType:"created"}}],this._isMobile=!1,this._canViewOrg=!1,this._translations=S({name:"solutions-searchsort-toolbar",blocking:!0}),this._configContextConsumer=h({context:_,subscribe:!0,callback:async t=>{t&&t.authentication&&(this._canViewOrg=t.authentication.CanViewOrg)}}),this._isMobileContextConsumer=h({context:y,subscribe:!0,callback:t=>this._isMobile=t}),this.searchChanged=n(),this.sortTypeChanged=n(),this.toggleFilter=n(),this.updateUrlParams=n(),this.listenOn(window,"detailsCardSelected",()=>{this.scope=void 0}),this.listenOn(window,"deployedCardSelected",()=>{this.scope=void 0}),this.listenOn(window,"searchTermSet",t=>{let e=t.detail;this.scope=e.scope,this.changeSearchFilter(e.searchTerm,!1)}),this.listenOn(window,"sortTypeSet",t=>{let e=t.detail;this.scope=e.scope,this.sortChanged(e.sortType,!1)}),this.listenOn(window,"tabChanged",t=>{this.scope=t.detail;let e=this._getCurrentScopeSetting();(this.scope==="all-solutions"||this.scope==="deployments")&&(this.changeSearchFilter(e?.searchTerm||"",!1),this.sortChanged(e?.sortType||this.defaultSortType,!1),this._updateUrlParams(t))})}static{this.properties={defaultSortType:[0,{type:String,attribute:"default-sort-type"}],isOrgSolutions:5,scope:1,_activeSearchSortSettings:16,_isMobile:16,_canViewOrg:16,_translations:16}}static{this.styles=w}changeOwnerFilter(t){this.isOrgSolutions=!t,this._activeSearchSortSettings=this._activeSearchSortSettings.map(s=>s.scope===this.scope?{...s,settings:{...s.settings,isOrgSolutions:this.isOrgSolutions}}:s);let e={displayValue:this.isOrgSolutions?p.ORG:p.MINE,type:"owner",value:this.isOrgSolutions?"My organization's solutions":"My solutions"};this.searchChanged.emit({option:e,scope:this.scope})}changeSearchFilter(t,e,s){let i=this._activeSearchSortSettings.map(o=>o.scope===this.scope?{...o,settings:{...o.settings,searchTerm:t}}:o),r=JSON.stringify(this._activeSearchSortSettings)!==JSON.stringify(i);this._activeSearchSortSettings=i,e&&r&&this.searchChanged.emit({option:{searchTerm:t},scope:this.scope}),s&&(this._searchTelemetryTimer&&window.clearTimeout(this._searchTelemetryTimer),this._searchTelemetryTimer=window.setTimeout(()=>{this.searchChanged.emit({option:{searchTerm:t},scope:this.scope,logSearchTelemetry:!0})},1e3))}sortChanged(t,e){this._activeSearchSortSettings=this._activeSearchSortSettings.map(s=>s.scope===this.scope?{...s,settings:{...s.settings,sortType:t}}:s),e&&this.sortTypeChanged.emit({sortType:t,scope:this.scope})}async load(){this._isMobileContextConsumer.value&&(this._isMobile=this._isMobileContextConsumer.value)}render(){let t=this.scope==="all-solutions"||this.scope==="deployments"&&this._configContextConsumer.value?.authentication?.IsSignedIn,e=t?this._getCurrentScopeSetting():void 0,s=this.scope==="deployments"?this._translations.search.deployments:this._translations.search.solutions,i=this._isMobile?"padding-end-1-2":"";return t?a`<div class="flex-row toolbar-sizing"><calcite-input-text class="flex-grow-1" clearable icon=search @calciteInputTextChange=${r=>{let o=r.target;this.changeSearchFilter(o.value,!0,!1)}} @keyup=${r=>{let o=r.target;["Tab","Shift","Alt","Control","Meta","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Escape"].includes(r.key)||(r.key==="Enter"?this.changeSearchFilter(o.value,!0,!1):(o.value.length>=3||o.value.length===0)&&this.changeSearchFilter(o.value,o.value.length>=3||o.value.length===0,!0))}} .placeholder=${s} scale=l slot=content-top .value=${e?.searchTerm}></calcite-input-text>${this._isMobile&&this.scope==="all-solutions"?a`<calcite-button appearance=transparent class=${`focus-color ${i}`} icon-start=filter kind=neutral .label=${this._translations.showFilters} @click=${this._toggleFilter}></calcite-button>`:""}${this.scope==="deployments"&&this._canViewOrg&&this._renderOwnerBlock()||""}${this._renderDropdown()}</div>`:""}_renderOwnerBlock(){return a`<calcite-dropdown width=m overlay-positioning=fixed><calcite-button appearance=transparent class="header-button-padding" .iconStart=${this.isOrgSolutions?"organization":"user"} kind=neutral slot=trigger>${this._isMobile?"":this.isOrgSolutions?this._translations.myOrgSolutions:this._translations.mySolutions}</calcite-button><calcite-dropdown-group group-title=${this._translations.filterBy??c}><calcite-dropdown-item icon-start=user @click=${t=>{t.detail!==0&&this.changeOwnerFilter(!0)}} @keydown=${t=>l(t,()=>this.changeOwnerFilter(!0))} .selected=${!this.isOrgSolutions}>${this._translations.mySolutions}</calcite-dropdown-item><calcite-dropdown-item icon-start=organization @click=${t=>{t.detail!==0&&this.changeOwnerFilter(!1)}} @keydown=${t=>l(t,()=>this.changeOwnerFilter(!1))} .selected=${this.isOrgSolutions}>${this._translations.myOrgSolutions}</calcite-dropdown-item></calcite-dropdown-group></calcite-dropdown>`}_renderDropdown(){let t=[];t=[{displayValue:this._translations.sortByRelevance,sortType:"relevance"},{displayValue:this._translations.sortByTitle,sortType:"title"}],this.scope==="deployments"?t.push({displayValue:this._translations.sortByDateDeployed,sortType:"created"}):(t.push({displayValue:this._translations.sortByNew,sortType:"new"}),t.push({displayValue:this._translations.sortByUpdated,sortType:"updated"}),this._configContextConsumer.value?.authentication?.IsSignedIn&&t.push({displayValue:this._translations.sortBySuggestedForYou,sortType:"suggested"}));let e=this._getCurrentScopeSetting();return a`<calcite-dropdown width=m><calcite-button appearance=transparent class="header-button-padding" icon-start=sort-descending kind=neutral slot=trigger>${this._isMobile?"":e?.sortType?this._getString(e.sortType):""}</calcite-button><calcite-dropdown-group group-title=${this._translations.chooseSortType??c}>${t.map(s=>this._getDropdownItem(s.displayValue,s.sortType))}</calcite-dropdown-group></calcite-dropdown>`}_getDropdownItem(t,e){let s=this._getCurrentScopeSetting();return s?.sortType&&s.sortType!==e?a`<calcite-dropdown-item @click=${i=>{i.detail!==0&&this.sortChanged(e,!0)}} @keydown=${i=>l(i,()=>this.sortChanged(e,!0))}>${t}</calcite-dropdown-item>`:a`<calcite-dropdown-item @click=${i=>{i.detail!==0&&this.sortChanged(e,!0)}} @keydown=${i=>l(i,()=>this.sortChanged(e,!0))} selected>${t}</calcite-dropdown-item>`}_getString(t){let e="";switch(t){case"new":e=this._translations.sortByNew;break;case"relevance":e=this._translations.sortByRelevance;break;case"suggested":e=this._translations.sortBySuggestedForYou;break;case"title":e=this._translations.sortByTitle;break;case"updated":e=this._translations.sortByUpdated;break;case"created":e=this._translations.sortByDateDeployed;break}return e}_getCurrentScopeSetting(){return this._activeSearchSortSettings?.filter(t=>t.scope===this.scope)?.[0]?.settings}_toggleFilter(){this.toggleFilter.emit()}_updateUrlParams(t){let e=t.detail,s;this._activeSearchSortSettings.some(i=>i.scope===e?(s=i,!0):!1),s&&this.updateUrlParams.emit(s)}};m("solutions-searchsort-toolbar",d);return d},b)
|
|
@@ -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"./EIQZRLWQ.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"./O24ZIQLV.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"./M5MQY5WC.js";import{g as m}from"./CGLFPVBM.js";import{b as S}from"./HW7HHHMK.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 p}from"./46DQNAMV.js";export default $arcgis.t(([u,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{u.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=u.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(t=!1){try{await this._init(t)}catch{this.destroy()}return this}destroy(){this._credential=void 0,this._portalSubset=void 0,this._portalUserSubset=void 0,u.destroyCredentials()}async signIn(t=""){u.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 u.getCredential((this._portalSubset?.portalUrl??this._portalUrl)+"/sharing").then(e=>{e&&window.location.reload()})}signOut(){let t=window.location.href,e=/[\/]\b([0-9A-Fa-f]){32}\b/g,i=t.match(e)?t.replace(e,""):t,s=`${this._portal?.restUrl??this._portalUrl+"/sharing/rest"}/oauth2/signout?client_id=${this._clientId}&redirect_uri=${encodeURIComponent(i)}`;this.destroy(),window.location.replace(s)}refreshSession(){let t=this.RestUserSession;if(!(!t||!this.IsSignedIn))return t.exchangeRefreshToken()}_getOrgUrl(t,e,i){return e&&i?window.location.protocol+"//"+e.toLowerCase()+"."+i:t}async _init(t=!1){try{this._credential=await u.checkSignInStatus(this._portalUrl+"/sharing")}catch(i){console.log(i)}try{let i=await u.checkAppAccess(this._portalUrl+"/sharing",this._clientId);(typeof i.valid<"u"&&!i.valid||i.viewOnlyUserTypeApp)&&window.location.replace(`error.html?error=blocked&locale=${this._locale}`),this._credential=i.credential}catch(i){i.name}this._searchArcGISOnlineEnabled=await this._checkSearchArcGISOnlineEnabled(t,this._portal.restUrl),this._portal.authMode=t?"immediate":"auto",await this._portal.load();let e=this._credential?await k(this.RestUserSession):{};return this._isEnterprise=this._portal.isPortal,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:e},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}async _checkSearchArcGISOnlineEnabled(t,e){if(t)try{let i=`${e}/portals/self/settings`,s=await M(i,{authentication:this._credential?this.RestUserSession:void 0});return s?.portalConfigProperties?.searchArcGISOnlineEnabled!==void 0?s.portalConfigProperties.searchArcGISOnlineEnabled:!1}catch(i){return console.warn("Failed to fetch portal settings:",i),!1}else return!0}_isSerializable(t){return t&&typeof t=="object"&&"toJSON"in t&&typeof t.toJSON=="function"}_objectToQuery(t,e){return t?e&&typeof e=="function"?Object.keys(t).map(i=>encodeURIComponent(i)+"="+encodeURIComponent(e(i,t[i]))).join("&"):Object.keys(t).map(i=>{let s=t[i];if(s==null)return"";let n=encodeURIComponent(i)+"=",o=e&&e[i];return o?n+encodeURIComponent(o(s)):Array.isArray(s)?s.map(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=p(),this.navTabSelected=p(),this.tabChanged=p(),this.tokenRefreshed=p(),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"./5QSIKX2L.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"./DV233ITZ.js";import{g as m}from"./CGLFPVBM.js";import{b as S}from"./EIQZRLWQ.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 p}from"./46DQNAMV.js";export default $arcgis.t(([u,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{u.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=u.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(t=!1){try{await this._init(t)}catch{this.destroy()}return this}destroy(){this._credential=void 0,this._portalSubset=void 0,this._portalUserSubset=void 0,u.destroyCredentials()}async signIn(t=""){u.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 u.getCredential((this._portalSubset?.portalUrl??this._portalUrl)+"/sharing").then(e=>{e&&window.location.reload()})}signOut(){let t=window.location.href,e=/[\/]\b([0-9A-Fa-f]){32}\b/g,i=t.match(e)?t.replace(e,""):t,s=`${this._portal?.restUrl??this._portalUrl+"/sharing/rest"}/oauth2/signout?client_id=${this._clientId}&redirect_uri=${encodeURIComponent(i)}`;this.destroy(),window.location.replace(s)}refreshSession(){let t=this.RestUserSession;if(!(!t||!this.IsSignedIn))return t.exchangeRefreshToken()}_getOrgUrl(t,e,i){return e&&i?window.location.protocol+"//"+e.toLowerCase()+"."+i:t}async _init(t=!1){try{this._credential=await u.checkSignInStatus(this._portalUrl+"/sharing")}catch(i){console.log(i)}try{let i=await u.checkAppAccess(this._portalUrl+"/sharing",this._clientId);(typeof i.valid<"u"&&!i.valid||i.viewOnlyUserTypeApp)&&window.location.replace(`error.html?error=blocked&locale=${this._locale}`),this._credential=i.credential}catch(i){i.name}this._searchArcGISOnlineEnabled=await this._checkSearchArcGISOnlineEnabled(t,this._portal.restUrl),this._portal.authMode=t?"immediate":"auto",await this._portal.load();let e=this._credential?await k(this.RestUserSession):{};return this._isEnterprise=this._portal.isPortal,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:e},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}async _checkSearchArcGISOnlineEnabled(t,e){if(t)try{let i=`${e}/portals/self/settings`,s=await M(i,{authentication:this._credential?this.RestUserSession:void 0});return s?.portalConfigProperties?.searchArcGISOnlineEnabled!==void 0?s.portalConfigProperties.searchArcGISOnlineEnabled:!1}catch(i){return console.warn("Failed to fetch portal settings:",i),!1}else return!0}_isSerializable(t){return t&&typeof t=="object"&&"toJSON"in t&&typeof t.toJSON=="function"}_objectToQuery(t,e){return t?e&&typeof e=="function"?Object.keys(t).map(i=>encodeURIComponent(i)+"="+encodeURIComponent(e(i,t[i]))).join("&"):Object.keys(t).map(i=>{let s=t[i];if(s==null)return"";let n=encodeURIComponent(i)+"=",o=e&&e[i];return o?n+encodeURIComponent(o(s)):Array.isArray(s)?s.map(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=p(),this.navTabSelected=p(),this.tabChanged=p(),this.tokenRefreshed=p(),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 d from"./
|
|
2
|
+
import d from"./K2BF5736.js";import"./WXE6AACQ.js";import c from"./JSX7H42C.js";import b from"./Y3CBLTF5.js";import"./4T7P5RXF.js";import a from"./5QSIKX2L.js";import"./PZ4L77M5.js";import"./JE7L7M3J.js";import"./DV233ITZ.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"./EIQZRLWQ.js";import"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([,,,a])=>{return a},a,b,c,d)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
|
|
2
|
-
import c from"./4WIRUOFC.js";import b from"./SIUGRN4Q.js";import a from"./O24ZIQLV.js";import{b as C}from"./PZ4L77M5.js";import"./JE7L7M3J.js";import{a as w}from"./M5MQY5WC.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import"./AOBFPJ2R.js";import"./JK6XUSIM.js";import"./UPHYUDLT.js";import"./QJJXVRMV.js";import"./7FMLZNDR.js";import"./LL5C4DHP.js";import"./WPAMUSBR.js";import"./XJPOVJV7.js";import"./LDNQ56OK.js";import"./3HUY3T5F.js";import"./Z6G5PBUQ.js";import"./J3QMHA2M.js";import"./TKZAMPEI.js";import"./2IHQU2FX.js";import"./CGLFPVBM.js";import"./OEJAW72H.js";import"./5JJMGPOW.js";import"./TYX345MZ.js";import"./5UWT66A7.js";import{b as f}from"./HW7HHHMK.js";import{F as u,G as d,H as g,L as y,h as m,i as r,j as _,r as l}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([{H:c,K:n,L:T,b:v,q:x},,{a:h,b:b}])=>{var D=m`calcite-panel{width:100%;height:100%;--calcite-panel-background-color: var(--calcite-color-foreground-2)}.card-group{overflow:hidden;padding:.25rem var(--calcite-spacing-xxs) var(--calcite-spacing-md)}.text-center{text-align:center}.leader-1{margin-top:var(--calcite-spacing-xxl)}.trailer-1{margin-bottom:var(--calcite-spacing-xxl)}.warning-text{max-width:35em;margin-left:auto;margin-right:auto;font-size:var(--calcite-font-size-md)}.no-solutions{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;min-height:calc(100vh - 190px)}.display-flex{display:flex}.display-none{display:none}.flex-direction-column{flex-direction:column}h1{font-weight:unset;margin:0;padding:0}solution-deployed-card{width:calc(20% - .75rem)}@media(max-width:1280px){solution-deployed-card{width:calc(25% - .75rem)}}@media(max-width:1010px){solution-deployed-card{width:calc(33.333% - .75rem)}}@media(max-width:740px){solution-deployed-card{width:calc(50% - .75rem)}}@media(max-width:440px){solution-deployed-card{width:calc(100% - .75rem)}}.margin-top-half{margin-top:.5rem}`,S=5,p=class extends g{constructor(){super(),this.sortType="created",this._cards=[],this._cardsFetching=!1,this._modifiedCheckTry=0,this._newId="",this._refs={},this._showDeleteCompleteAlert=!1,this._deletedSolutionName="",this._translations=w({name:"solutions-deployed-panel",blocking:!0}),this._agoTerms=c,this._allCards=[],this._baseAgoTerms=c,this._categories=[],this._mainPanelRef=u(),this._panelFixed=!1,this._configContextConsumer=C({context:v,subscribe:!0,callback:async e=>{e&&(this._initCardsFetchers(),await this._getDeployedSolutions())}}),this._delay=!1,this._owner="My solutions",this._sortField="created",this._sortOrder="desc",this.deployedCardsFetched=l(),this.searchTermSet=l(),this.sortTypeSet=l(),this.listenOn(window,"solutionDeleted",e=>{this._modifiedCheckTry=S,this.reload(e.detail.showAlert,e.detail.refreshSolutionsTimeout,e.detail.solutionTitle)}),this.listenOn(window,"solutionConfigureDialogClose",e=>{e.detail&&this.reload(!1,!1)}),this.listenOn(window,"deployProgressEnd",e=>{this._modifiedCheckTry=S,this._refreshAfterDeploy(e.detail)}),this.listenOn(window,"sortTypeChanged",e=>{e.detail&&e.detail.scope==="deployments"&&(this.sortType=e.detail.sortType,this._telemetry?.logEvent({category:n.DEPLOYMENTS,action:"Sort",dimensions:[x(e.detail.sortType)]}),this.searchSolutions(e.detail))}),this.listenOn(window,"searchChanged",e=>{e.detail&&e.detail.scope==="deployments"&&(e.detail.logSearchTelemetry&&e.detail.option?.searchTerm?this._telemetry?.logEvent({category:n.DEPLOYMENTS,action:"Search",dimensions:[e.detail.option.searchTerm]}):this.searchSolutions(e.detail.option))})}static{this.properties={sortType:1,_cards:16,_cardsFetching:16,_modifiedCheckTry:16,_newId:16,_refs:16,_showDeleteCompleteAlert:16,_deletedSolutionName:16,_translations:16}}static{this.styles=D}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}async reload(e=!0,t=!0,s){this._initCardsFetchers(),e&&(this._showDeleteCompleteAlert=!0,this._deletedSolutionName=s||this._translations.solution),t?setTimeout(()=>{(async()=>{try{await this._getDeployedSolutions()}catch(i){console.error("Error getting deployed solutions:",i)}})()},500):await this._getDeployedSolutions()}async searchSolutions(e){if(e){if("searchTerm"in e&&this._setSearchTerm(e.searchTerm||""),"sortType"in e&&this._setSortOptions(e),Object.keys(e).indexOf("type")>-1){let t=e;this._owner=t.value,this._telemetry?.logEvent({category:n.DEPLOYMENTS,action:"Filter",dimensions:[t.value==="My solutions"?"My content":"Organization"]})}if(Object.keys(e).indexOf("filter")>-1){let t=e;this._owner=t.filter===T.ORG?"My organization's solutions":"My solutions"}}else this._agoTerms=this._baseAgoTerms,this._clearFilterCategories();await this._getDeployedSolutions()}async setSearchOptions(e){e&&("searchTerm"in e&&(this._setSearchTerm(e.searchTerm),this.searchTermSet.emit({searchTerm:e.searchTerm,scope:"deployments"})),"sortType"in e&&(this._setSortOptions(e),this.sortTypeSet.emit({sortType:e.sortType,scope:"deployments"})))}updated(){this._fixPanelContentWrapperFocus()}_fixPanelContentWrapperFocus(){if(!this._panelFixed&&this._mainPanelRef.value){let e=this._mainPanelRef.value;e.componentOnReady?.().then(()=>{if(e.shadowRoot){let t=e.shadowRoot.querySelector(".content-wrapper");t&&(t.tabIndex=-1,this._panelFixed=!0,this._setupPanelObserver())}}).catch(()=>{this._panelFixed=!0})}}_setupPanelObserver(){if(this._panelObserver)return;this._panelObserver=new MutationObserver(t=>{t.forEach(s=>{if(s.type==="attributes"&&s.attributeName==="tabindex"){let i=s.target;i.classList.contains("content-wrapper")&&i.tabIndex===0&&(i.tabIndex=-1)}})});let e=this._mainPanelRef.value;if(e?.shadowRoot){let t=e.shadowRoot.querySelector(".content-wrapper");t&&this._panelObserver.observe(t,{attributes:!0,attributeFilter:["tabindex"]})}}disconnectedCallback(){super.disconnectedCallback(),this._panelObserver?.disconnect()}render(){return this._cardsFetching?r`<calcite-loader .label=${this._translations.fetchingDeployedSolutions}></calcite-loader>`:this._cards.length?r`<calcite-panel ${d(this._mainPanelRef)}><calcite-card-group class="card-group" .label=${this._translations.allDeployed}>${this._renderCards()}</calcite-card-group><calcite-alert auto-close auto-close-duration=fast icon=check-circle kind=success .label=${this._translations.deleteComplete.replace("{{solutionName}}",this._deletedSolutionName)} .open=${this._showDeleteCompleteAlert} @calciteAlertClose=${()=>{this._showDeleteCompleteAlert=!1}}><div slot=title>${this._translations.deleteComplete.replace("{{solutionName}}",this._deletedSolutionName)}</div></calcite-alert></calcite-panel>`:r`<div class="no-solutions">${this._getSolutionsBriefcase()}<div class="text-center leader-1 warning-text trailer-1 display-flex flex-direction-column"><div>${this._translations.noSolutionsFound}</div><div class="margin-top-half">${this._translations.noSolutionsInstruction}</div></div></div>`}_initCardsFetchers(){if(this._configContextConsumer.value){let e=this._configContextConsumer.value;this._cardsFetcher=new h(e.locale,e.orgUrl,e.portalURL),this._cardsFetcherDeployed=new h(e.locale,e.orgUrl,e.portalURL)}}_renderCards(){return this._refs={},this._cards.map(e=>r`<solution-deployed-card .card=${e} .deployedDate=${e.created} .description=${e.snippet} .diagramKey=${this._configContextConsumer.value?.diagramKey} .heading=${e.title} id=${e.id??y} .itemId=${e.id} .owner=${this._owner==="My solutions"?"":e.owner} .thumbnail=${e.thumbnailUrl} ${d(this._handleRefs)}></solution-deployed-card>`)}_handleRefs(e){e&&(this._refs[e.id]=e)}async _getDeployedSolutions(){let e=this._configContextConsumer.value.authentication;if(e.IsSignedIn){this._abortController?(this._abortController.abort("redundant request"),this._abortController=new AbortController):this._abortController=new AbortController,this._cardsFetching=!0;try{let t=await b(e,this._configContextConsumer.value.userSession,this._cardsFetcher,this._cardsFetcherDeployed,this._agoTerms,this._sortField,this._sortOrder,this._delay,this._categories,this._allCards,this._abortController.signal,this._owner);this._abortController=void 0,this._modifiedCheckTry>0&&(this._cards?.length===t?.cards?.length?(this._modifiedCheckTry--,this._getDeployedSolutions()):this._modifiedCheckTry=0),this._cards=t?.cards??[],this.deployedCardsFetched.emit(this._cards.length),this._cardsFetching=!1}catch(t){t.message!=="redundant request"&&console.warn(t)}}}_getSolutionsBriefcase(){return r`<div><svg viewBox="0 0 64 64" width=200 height=200 xmlns=http://www.w3.org/2000/svg fill=var(--calcite-color-text-3)>${_`<path d="M10.723 54.9h6.409a7.896 7.896 0 0 0 13.736 0h23.896a4.137 4.137 0 0 0 4.136-4.136l-.004-32.446a3.222 3.222 0 0 0-3.217-3.219l-10.779.064V9.836A3.741 3.741 0 0 0 41.163 6.1H23.837A3.741 3.741 0 0 0 20.1 9.836l.067 5.264-10.8.004A3.275 3.275 0 0 0 6.1 18.37L6.096 26a.893.893 0 0 0 .263.636.907.907 0 0 0 .638.263l5.902-.014.013-5.985 38.781.01a.407.407 0 0 1 .407.407l.008 22.925a2.858 2.858 0 0 1-2.857 2.858H30.868a7.896 7.896 0 0 0-13.736 0H12.9v-5.2a.801.801 0 0 0-.8-.8H6.9a.801.801 0 0 0-.8.8l-.001 8.375a4.59 4.59 0 0 0 1.353 3.27 4.658 4.658 0 0 0 3.27 1.355zM6.9 41.9h5.2v6h5.51l.112-.213a7.098 7.098 0 0 1 12.556 0l.113.213h18.86a3.683 3.683 0 0 0 2.587-1.071 3.635 3.635 0 0 0 1.071-2.587L52.9 21.317a1.208 1.208 0 0 0-1.207-1.207l-38.867-.01a.714.714 0 0 0-.714.712l-.011 5.275-5.106.012.001.4-.1-.499.003-7.628a2.471 2.471 0 0 1 2.468-2.469l10.8-.003a.734.734 0 0 0 .733-.733v-5.33A2.94 2.94 0 0 1 23.837 6.9h17.326A2.94 2.94 0 0 1 44.1 9.836v5.327a.734.734 0 0 0 .733.733l10.846.003a2.421 2.421 0 0 1 2.417 2.419l.004 32.446a3.337 3.337 0 0 1-3.336 3.336H30.39l-.113.213a7.098 7.098 0 0 1-12.556 0l-.113-.213h-6.886a3.85 3.85 0 0 1-2.704-1.12 3.796 3.796 0 0 1-1.12-2.705zm17.1 13a3.9 3.9 0 1 0-3.9-3.9 3.905 3.905 0 0 0 3.9 3.9zm0-7a3.1 3.1 0 1 1-3.1 3.1 3.103 3.103 0 0 1 3.1-3.1zm10-6a7.918 7.918 0 0 0 7.349-5h4.818a.734.734 0 0 0 .733-.733v-4.334a.734.734 0 0 0-.733-.733h-4.818a7.9 7.9 0 0 0-14.698 0H5.833a.734.734 0 0 0-.733.733v4.334a.734.734 0 0 0 .733.733h20.818a7.918 7.918 0 0 0 7.349 5zm-28.167-10h21.378l.095-.266a7.1 7.1 0 0 1 13.388 0l.095.266 5.31-.066.068 4.266h-5.378l-.095.266a7.1 7.1 0 0 1-13.388 0l-.095-.266-21.31.066zM34 37.9a3.9 3.9 0 1 0-3.9-3.9 3.905 3.905 0 0 0 3.9 3.9zm0-7a3.1 3.1 0 1 1-3.1 3.1 3.103 3.103 0 0 1 3.1-3.1zm5.658-20.8H25.342a1.244 1.244 0 0 0-1.242 1.242V15.9h16.8v-4.558a1.244 1.244 0 0 0-1.242-1.242zm.442 5H24.9v-3.758a.443.443 0 0 1 .442-.442h14.316a.443.443 0 0 1 .442.442z" />`}</svg></div>`}_setSearchTerm(e){this._agoTerms=this._baseAgoTerms+` ${e}`}_setSortOptions(e){let t=e.sortType;t==="relevance"||t==="title"?(t==="title"&&(this._sortOrder="asc"),this._sortField=t):(t==="updated"||t==="created")&&(this._sortOrder="desc",this._sortField=t),this.sortType=t}_clearFilterCategories(){this._categories=[]}async _refreshAfterDeploy(e){if(e){this._newId=e;let t=10,s=500;for(let a=0;a<t&&(await this._getDeployedSolutions(),!this._cards.some(o=>o.id===e));a++)a<t-1&&await new Promise(o=>setTimeout(o,s));await this.updateComplete;let i=10,F=100;for(let a=0;a<i;a++){if(this._refs[e]){let o=this._cards.find(O=>O.id===e);window.dispatchEvent(new CustomEvent("deployedCardReady",{detail:{card:o,cardRef:this._refs[e]}})),this._newId="";return}await new Promise(o=>setTimeout(o,F)),await this.updateComplete}console.warn(`Failed to find ref for newly deployed solution after all retries: ${e}`),window.dispatchEvent(new CustomEvent("deploymentCompletedWithoutNav",{detail:{solutionId:e}})),this._newId=""}}};f("solutions-deployed-panel",p);return p},a,b,c)
|
|
2
|
+
import c from"./RGFLXW4Q.js";import b from"./TAZIMIFF.js";import a from"./5QSIKX2L.js";import{b as C}from"./PZ4L77M5.js";import"./JE7L7M3J.js";import{a as w}from"./DV233ITZ.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import"./AOBFPJ2R.js";import"./JK6XUSIM.js";import"./UPHYUDLT.js";import"./QJJXVRMV.js";import"./7FMLZNDR.js";import"./LL5C4DHP.js";import"./WPAMUSBR.js";import"./XJPOVJV7.js";import"./LDNQ56OK.js";import"./3HUY3T5F.js";import"./Z6G5PBUQ.js";import"./J3QMHA2M.js";import"./TKZAMPEI.js";import"./2IHQU2FX.js";import"./CGLFPVBM.js";import"./OEJAW72H.js";import"./5JJMGPOW.js";import"./TYX345MZ.js";import"./5UWT66A7.js";import{b as f}from"./EIQZRLWQ.js";import{F as u,G as d,H as g,L as y,h as m,i as r,j as _,r as l}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([{H:c,K:n,L:T,b:v,q:x},,{a:h,b:b}])=>{var D=m`calcite-panel{width:100%;height:100%;--calcite-panel-background-color: var(--calcite-color-foreground-2)}.card-group{overflow:hidden;padding:.25rem var(--calcite-spacing-xxs) var(--calcite-spacing-md)}.text-center{text-align:center}.leader-1{margin-top:var(--calcite-spacing-xxl)}.trailer-1{margin-bottom:var(--calcite-spacing-xxl)}.warning-text{max-width:35em;margin-left:auto;margin-right:auto;font-size:var(--calcite-font-size-md)}.no-solutions{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;min-height:calc(100vh - 190px)}.display-flex{display:flex}.display-none{display:none}.flex-direction-column{flex-direction:column}h1{font-weight:unset;margin:0;padding:0}solution-deployed-card{width:calc(20% - .75rem)}@media(max-width:1280px){solution-deployed-card{width:calc(25% - .75rem)}}@media(max-width:1010px){solution-deployed-card{width:calc(33.333% - .75rem)}}@media(max-width:740px){solution-deployed-card{width:calc(50% - .75rem)}}@media(max-width:440px){solution-deployed-card{width:calc(100% - .75rem)}}.margin-top-half{margin-top:.5rem}`,S=5,p=class extends g{constructor(){super(),this.sortType="created",this._cards=[],this._cardsFetching=!1,this._modifiedCheckTry=0,this._newId="",this._refs={},this._showDeleteCompleteAlert=!1,this._deletedSolutionName="",this._translations=w({name:"solutions-deployed-panel",blocking:!0}),this._agoTerms=c,this._allCards=[],this._baseAgoTerms=c,this._categories=[],this._mainPanelRef=u(),this._panelFixed=!1,this._configContextConsumer=C({context:v,subscribe:!0,callback:async e=>{e&&(this._initCardsFetchers(),await this._getDeployedSolutions())}}),this._delay=!1,this._owner="My solutions",this._sortField="created",this._sortOrder="desc",this.deployedCardsFetched=l(),this.searchTermSet=l(),this.sortTypeSet=l(),this.listenOn(window,"solutionDeleted",e=>{this._modifiedCheckTry=S,this.reload(e.detail.showAlert,e.detail.refreshSolutionsTimeout,e.detail.solutionTitle)}),this.listenOn(window,"solutionConfigureDialogClose",e=>{e.detail&&this.reload(!1,!1)}),this.listenOn(window,"deployProgressEnd",e=>{this._modifiedCheckTry=S,this._refreshAfterDeploy(e.detail)}),this.listenOn(window,"sortTypeChanged",e=>{e.detail&&e.detail.scope==="deployments"&&(this.sortType=e.detail.sortType,this._telemetry?.logEvent({category:n.DEPLOYMENTS,action:"Sort",dimensions:[x(e.detail.sortType)]}),this.searchSolutions(e.detail))}),this.listenOn(window,"searchChanged",e=>{e.detail&&e.detail.scope==="deployments"&&(e.detail.logSearchTelemetry&&e.detail.option?.searchTerm?this._telemetry?.logEvent({category:n.DEPLOYMENTS,action:"Search",dimensions:[e.detail.option.searchTerm]}):this.searchSolutions(e.detail.option))})}static{this.properties={sortType:1,_cards:16,_cardsFetching:16,_modifiedCheckTry:16,_newId:16,_refs:16,_showDeleteCompleteAlert:16,_deletedSolutionName:16,_translations:16}}static{this.styles=D}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}async reload(e=!0,t=!0,s){this._initCardsFetchers(),e&&(this._showDeleteCompleteAlert=!0,this._deletedSolutionName=s||this._translations.solution),t?setTimeout(()=>{(async()=>{try{await this._getDeployedSolutions()}catch(i){console.error("Error getting deployed solutions:",i)}})()},500):await this._getDeployedSolutions()}async searchSolutions(e){if(e){if("searchTerm"in e&&this._setSearchTerm(e.searchTerm||""),"sortType"in e&&this._setSortOptions(e),Object.keys(e).indexOf("type")>-1){let t=e;this._owner=t.value,this._telemetry?.logEvent({category:n.DEPLOYMENTS,action:"Filter",dimensions:[t.value==="My solutions"?"My content":"Organization"]})}if(Object.keys(e).indexOf("filter")>-1){let t=e;this._owner=t.filter===T.ORG?"My organization's solutions":"My solutions"}}else this._agoTerms=this._baseAgoTerms,this._clearFilterCategories();await this._getDeployedSolutions()}async setSearchOptions(e){e&&("searchTerm"in e&&(this._setSearchTerm(e.searchTerm),this.searchTermSet.emit({searchTerm:e.searchTerm,scope:"deployments"})),"sortType"in e&&(this._setSortOptions(e),this.sortTypeSet.emit({sortType:e.sortType,scope:"deployments"})))}updated(){this._fixPanelContentWrapperFocus()}_fixPanelContentWrapperFocus(){if(!this._panelFixed&&this._mainPanelRef.value){let e=this._mainPanelRef.value;e.componentOnReady?.().then(()=>{if(e.shadowRoot){let t=e.shadowRoot.querySelector(".content-wrapper");t&&(t.tabIndex=-1,this._panelFixed=!0,this._setupPanelObserver())}}).catch(()=>{this._panelFixed=!0})}}_setupPanelObserver(){if(this._panelObserver)return;this._panelObserver=new MutationObserver(t=>{t.forEach(s=>{if(s.type==="attributes"&&s.attributeName==="tabindex"){let i=s.target;i.classList.contains("content-wrapper")&&i.tabIndex===0&&(i.tabIndex=-1)}})});let e=this._mainPanelRef.value;if(e?.shadowRoot){let t=e.shadowRoot.querySelector(".content-wrapper");t&&this._panelObserver.observe(t,{attributes:!0,attributeFilter:["tabindex"]})}}disconnectedCallback(){super.disconnectedCallback(),this._panelObserver?.disconnect()}render(){return this._cardsFetching?r`<calcite-loader .label=${this._translations.fetchingDeployedSolutions}></calcite-loader>`:this._cards.length?r`<calcite-panel ${d(this._mainPanelRef)}><calcite-card-group class="card-group" .label=${this._translations.allDeployed}>${this._renderCards()}</calcite-card-group><calcite-alert auto-close auto-close-duration=fast icon=check-circle kind=success .label=${this._translations.deleteComplete.replace("{{solutionName}}",this._deletedSolutionName)} .open=${this._showDeleteCompleteAlert} @calciteAlertClose=${()=>{this._showDeleteCompleteAlert=!1}}><div slot=title>${this._translations.deleteComplete.replace("{{solutionName}}",this._deletedSolutionName)}</div></calcite-alert></calcite-panel>`:r`<div class="no-solutions">${this._getSolutionsBriefcase()}<div class="text-center leader-1 warning-text trailer-1 display-flex flex-direction-column"><div>${this._translations.noSolutionsFound}</div><div class="margin-top-half">${this._translations.noSolutionsInstruction}</div></div></div>`}_initCardsFetchers(){if(this._configContextConsumer.value){let e=this._configContextConsumer.value;this._cardsFetcher=new h(e.locale,e.orgUrl,e.portalURL),this._cardsFetcherDeployed=new h(e.locale,e.orgUrl,e.portalURL)}}_renderCards(){return this._refs={},this._cards.map(e=>r`<solution-deployed-card .card=${e} .deployedDate=${e.created} .description=${e.snippet} .diagramKey=${this._configContextConsumer.value?.diagramKey} .heading=${e.title} id=${e.id??y} .itemId=${e.id} .owner=${this._owner==="My solutions"?"":e.owner} .thumbnail=${e.thumbnailUrl} ${d(this._handleRefs)}></solution-deployed-card>`)}_handleRefs(e){e&&(this._refs[e.id]=e)}async _getDeployedSolutions(){let e=this._configContextConsumer.value.authentication;if(e.IsSignedIn){this._abortController?(this._abortController.abort("redundant request"),this._abortController=new AbortController):this._abortController=new AbortController,this._cardsFetching=!0;try{let t=await b(e,this._configContextConsumer.value.userSession,this._cardsFetcher,this._cardsFetcherDeployed,this._agoTerms,this._sortField,this._sortOrder,this._delay,this._categories,this._allCards,this._abortController.signal,this._owner);this._abortController=void 0,this._modifiedCheckTry>0&&(this._cards?.length===t?.cards?.length?(this._modifiedCheckTry--,this._getDeployedSolutions()):this._modifiedCheckTry=0),this._cards=t?.cards??[],this.deployedCardsFetched.emit(this._cards.length),this._cardsFetching=!1}catch(t){t.message!=="redundant request"&&console.warn(t)}}}_getSolutionsBriefcase(){return r`<div><svg viewBox="0 0 64 64" width=200 height=200 xmlns=http://www.w3.org/2000/svg fill=var(--calcite-color-text-3)>${_`<path d="M10.723 54.9h6.409a7.896 7.896 0 0 0 13.736 0h23.896a4.137 4.137 0 0 0 4.136-4.136l-.004-32.446a3.222 3.222 0 0 0-3.217-3.219l-10.779.064V9.836A3.741 3.741 0 0 0 41.163 6.1H23.837A3.741 3.741 0 0 0 20.1 9.836l.067 5.264-10.8.004A3.275 3.275 0 0 0 6.1 18.37L6.096 26a.893.893 0 0 0 .263.636.907.907 0 0 0 .638.263l5.902-.014.013-5.985 38.781.01a.407.407 0 0 1 .407.407l.008 22.925a2.858 2.858 0 0 1-2.857 2.858H30.868a7.896 7.896 0 0 0-13.736 0H12.9v-5.2a.801.801 0 0 0-.8-.8H6.9a.801.801 0 0 0-.8.8l-.001 8.375a4.59 4.59 0 0 0 1.353 3.27 4.658 4.658 0 0 0 3.27 1.355zM6.9 41.9h5.2v6h5.51l.112-.213a7.098 7.098 0 0 1 12.556 0l.113.213h18.86a3.683 3.683 0 0 0 2.587-1.071 3.635 3.635 0 0 0 1.071-2.587L52.9 21.317a1.208 1.208 0 0 0-1.207-1.207l-38.867-.01a.714.714 0 0 0-.714.712l-.011 5.275-5.106.012.001.4-.1-.499.003-7.628a2.471 2.471 0 0 1 2.468-2.469l10.8-.003a.734.734 0 0 0 .733-.733v-5.33A2.94 2.94 0 0 1 23.837 6.9h17.326A2.94 2.94 0 0 1 44.1 9.836v5.327a.734.734 0 0 0 .733.733l10.846.003a2.421 2.421 0 0 1 2.417 2.419l.004 32.446a3.337 3.337 0 0 1-3.336 3.336H30.39l-.113.213a7.098 7.098 0 0 1-12.556 0l-.113-.213h-6.886a3.85 3.85 0 0 1-2.704-1.12 3.796 3.796 0 0 1-1.12-2.705zm17.1 13a3.9 3.9 0 1 0-3.9-3.9 3.905 3.905 0 0 0 3.9 3.9zm0-7a3.1 3.1 0 1 1-3.1 3.1 3.103 3.103 0 0 1 3.1-3.1zm10-6a7.918 7.918 0 0 0 7.349-5h4.818a.734.734 0 0 0 .733-.733v-4.334a.734.734 0 0 0-.733-.733h-4.818a7.9 7.9 0 0 0-14.698 0H5.833a.734.734 0 0 0-.733.733v4.334a.734.734 0 0 0 .733.733h20.818a7.918 7.918 0 0 0 7.349 5zm-28.167-10h21.378l.095-.266a7.1 7.1 0 0 1 13.388 0l.095.266 5.31-.066.068 4.266h-5.378l-.095.266a7.1 7.1 0 0 1-13.388 0l-.095-.266-21.31.066zM34 37.9a3.9 3.9 0 1 0-3.9-3.9 3.905 3.905 0 0 0 3.9 3.9zm0-7a3.1 3.1 0 1 1-3.1 3.1 3.103 3.103 0 0 1 3.1-3.1zm5.658-20.8H25.342a1.244 1.244 0 0 0-1.242 1.242V15.9h16.8v-4.558a1.244 1.244 0 0 0-1.242-1.242zm.442 5H24.9v-3.758a.443.443 0 0 1 .442-.442h14.316a.443.443 0 0 1 .442.442z" />`}</svg></div>`}_setSearchTerm(e){this._agoTerms=this._baseAgoTerms+` ${e}`}_setSortOptions(e){let t=e.sortType;t==="relevance"||t==="title"?(t==="title"&&(this._sortOrder="asc"),this._sortField=t):(t==="updated"||t==="created")&&(this._sortOrder="desc",this._sortField=t),this.sortType=t}_clearFilterCategories(){this._categories=[]}async _refreshAfterDeploy(e){if(e){this._newId=e;let t=10,s=500;for(let a=0;a<t&&(await this._getDeployedSolutions(),!this._cards.some(o=>o.id===e));a++)a<t-1&&await new Promise(o=>setTimeout(o,s));await this.updateComplete;let i=10,F=100;for(let a=0;a<i;a++){if(this._refs[e]){let o=this._cards.find(O=>O.id===e);window.dispatchEvent(new CustomEvent("deployedCardReady",{detail:{card:o,cardRef:this._refs[e]}})),this._newId="";return}await new Promise(o=>setTimeout(o,F)),await this.updateComplete}console.warn(`Failed to find ref for newly deployed solution after all retries: ${e}`),window.dispatchEvent(new CustomEvent("deploymentCompletedWithoutNav",{detail:{solutionId:e}})),this._newId=""}}};f("solutions-deployed-panel",p);return p},a,b,c)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
|
|
2
|
-
import{a as o}from"./
|
|
2
|
+
import{a as o}from"./DV233ITZ.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import{b as d}from"./EIQZRLWQ.js";import{H as n,h as l,i as e,l as a,r as t}from"./46DQNAMV.js";import"./OR4HXHSY.js";var h=l`:host{display:block}`,s=class extends n{constructor(){super(...arguments),this.buttonType="button",this.disabled=!1,this.ids=[],this.showDeleteCount=!0,this._confirmDelete=!1,this._deleteEndabled=!1,this._supportsDelete=!1,this._translations=o({name:"delete-button",blocking:!0}),this.editsComplete=t(),this.deleteClicked=t()}static{this.properties={deleteDialog:1,buttonType:1,disabled:5,icon:1,ids:0,layer:0,showDeleteCount:5,_confirmDelete:16,_deleteEndabled:16,_supportsDelete:16,_translations:16}}static{this.styles=h}willUpdate(i){i.has("ids")&&(this.hasUpdated||this.ids?.length>0)&&this.idsWatchHandler(),i.has("layer")&&this.layerWatchHandler()}async idsWatchHandler(){this._setDeleteEnabled()}async layerWatchHandler(){this._setDeleteEnabled()}render(){return e`${this.buttonType==="button"?e`<calcite-button appearance=outline .disabled=${!this._deleteEndabled} id=solutions-delete kind=danger @click=${()=>this._delete()} width=full>${this.showDeleteCount?this._translations.deleteCount?.replace("{{n}}",this.ids?.length.toString()):this._translations.delete}</calcite-button>`:e`<calcite-action appearance=solid .disabled=${!this._deleteEndabled} id=${this.icon??a} @click=${()=>this._delete()} scale=s .text=${this._translations.delete}><calcite-button appearance=transparent .iconStart=${this.icon} kind=danger>${this._translations.delete}</calcite-button></calcite-action>`}${this._deleteMessage()}<calcite-tooltip placement=bottom .referenceElement=${this.buttonType==="button"?"solutions-delete":this.icon}><span>${this._translations.delete}</span></calcite-tooltip>`}loaded(){this._setDeleteEnabled()}_setDeleteEnabled(){this._supportsDelete=!!(this.layer?.editingEnabled&&this.layer?.capabilities?.operations?.supportsDelete),this._deleteEndabled=!this.disabled||this._supportsDelete&&this.ids?.length>0}_delete(){this.deleteClicked.emit(),this._confirmDelete=!0}_deleteMessage(){return this.deleteDialog?this.deleteDialog:e`<delete-dialog id=solution-delete-dialog .ids=${this.ids} .layer=${this.layer} @deleteDialogClose=${()=>this._confirmDelete=!1} .open=${this._confirmDelete}></delete-dialog>`}};d("delete-button",s);export{s as DeleteButton};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
|
|
2
|
-
import{a}from"./
|
|
2
|
+
import{a}from"./MDHKDE77.js";import"./DV233ITZ.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import"./EIQZRLWQ.js";import"./46DQNAMV.js";import"./OR4HXHSY.js";export{a as SolutionItemAccordion};
|