@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.
Files changed (94) hide show
  1. package/dist/cdn/{UB33RJV2.js → 23DKMPGJ.js} +1 -1
  2. package/dist/cdn/{4WNB4SNS.js → 2ECRQJCU.js} +1 -1
  3. package/dist/cdn/{NGBSDZLF.js → 2JBJVGPJ.js} +1 -1
  4. package/dist/cdn/{3ZOEAKII.js → 2YCDW2EI.js} +1 -1
  5. package/dist/cdn/{36QZL2SP.js → 33HIGVEX.js} +1 -1
  6. package/dist/cdn/{HVZTHZYK.js → 4O4QS3DG.js} +1 -1
  7. package/dist/cdn/{F7DGHROD.js → 57INLFON.js} +1 -1
  8. package/dist/cdn/{44QGF64X.js → 5BEMMNL7.js} +1 -1
  9. package/dist/cdn/{RVR6SP4R.js → 5G3AHODR.js} +1 -1
  10. package/dist/cdn/{QOM6K67N.js → 5QP3RIEO.js} +1 -1
  11. package/dist/cdn/{O24ZIQLV.js → 5QSIKX2L.js} +1 -1
  12. package/dist/cdn/{5IWB7DXV.js → 5YORDAVH.js} +1 -1
  13. package/dist/cdn/{KAOZIOH3.js → 67TUHEUB.js} +1 -1
  14. package/dist/cdn/{TTKCR26F.js → 6HNQQRYK.js} +1 -1
  15. package/dist/cdn/{575KOORD.js → 6LSHZOMB.js} +1 -1
  16. package/dist/cdn/{32ZJRLO4.js → 6QODI424.js} +1 -1
  17. package/dist/cdn/{AXGMN3DZ.js → 7DOH2ZMP.js} +1 -1
  18. package/dist/cdn/{CPLUG3BV.js → ADJCIRZS.js} +1 -1
  19. package/dist/cdn/{ZB4IUY3Y.js → BA4FCDQY.js} +1 -1
  20. package/dist/cdn/{IWBYP44R.js → BADKNCL4.js} +1 -1
  21. package/dist/cdn/{5ISRU637.js → BCTFO27G.js} +1 -1
  22. package/dist/cdn/{N3WEX2WW.js → BGBLGDVO.js} +1 -1
  23. package/dist/cdn/BXKV2QC3.js +2 -0
  24. package/dist/cdn/{M5MQY5WC.js → DV233ITZ.js} +1 -1
  25. package/dist/cdn/{L65LKW2L.js → DY3BUOEI.js} +1 -1
  26. package/dist/cdn/EIQZRLWQ.js +2 -0
  27. package/dist/cdn/{CKHU23WZ.js → EKZZ7R2V.js} +1 -1
  28. package/dist/cdn/{PO4PTHS6.js → EPMMVHPO.js} +1 -1
  29. package/dist/cdn/{OZIXJ6HO.js → EQXQ6YNY.js} +1 -1
  30. package/dist/cdn/{L26O3GTC.js → HNPTTIXC.js} +1 -1
  31. package/dist/cdn/{OBMP2HIH.js → IHDRZQU4.js} +1 -1
  32. package/dist/cdn/{G3KEPG5G.js → IQ6XED24.js} +1 -1
  33. package/dist/cdn/{AFNUHTXR.js → JSX7H42C.js} +1 -1
  34. package/dist/cdn/{IGM6M6VG.js → K2BF5736.js} +1 -1
  35. package/dist/cdn/{3L4JPZ3K.js → K7O46PDI.js} +1 -1
  36. package/dist/cdn/{IB4U627P.js → KUZQPBVI.js} +1 -1
  37. package/dist/cdn/{ZRDBHNKL.js → LLIZZGSY.js} +1 -1
  38. package/dist/cdn/{G235DVXM.js → M2MN2QB7.js} +1 -1
  39. package/dist/cdn/{P3DGGTC5.js → M6DR7QBF.js} +1 -1
  40. package/dist/cdn/{SXF342EH.js → MDHKDE77.js} +1 -1
  41. package/dist/cdn/{Q5LUK5CM.js → MJDNGEFJ.js} +1 -1
  42. package/dist/cdn/{GKBTOBYA.js → MP5X6HGT.js} +1 -1
  43. package/dist/cdn/{YA5DNYPF.js → MSGOASUF.js} +1 -1
  44. package/dist/cdn/{G2FGKUNI.js → MWCQXZOT.js} +1 -1
  45. package/dist/cdn/{VPSUD6VW.js → N6EQBPC2.js} +1 -1
  46. package/dist/cdn/{ZZQ73LQE.js → NARQQKRW.js} +1 -1
  47. package/dist/cdn/{R7OZWCO2.js → NJJEOZ2G.js} +1 -1
  48. package/dist/cdn/{FZ5LAVZL.js → NORNRIIE.js} +1 -1
  49. package/dist/cdn/{3UVV2MNJ.js → QPRIL54J.js} +1 -1
  50. package/dist/cdn/{R2KIT5QB.js → QZZ2CQWS.js} +1 -1
  51. package/dist/cdn/{DCOGVHCK.js → R47OTDC2.js} +1 -1
  52. package/dist/cdn/{DQY6HKSD.js → RBCOT3CJ.js} +1 -1
  53. package/dist/cdn/{4WIRUOFC.js → RGFLXW4Q.js} +1 -1
  54. package/dist/cdn/{5QZHZP3H.js → RQEYXUDW.js} +1 -1
  55. package/dist/cdn/{OXUKEA5J.js → RTVWZSKJ.js} +1 -1
  56. package/dist/cdn/{MPJ5N4H3.js → RYRVUHB7.js} +1 -1
  57. package/dist/cdn/{RTZ7K25B.js → S42I3DOW.js} +1 -1
  58. package/dist/cdn/SFZEAERJ.js +2 -0
  59. package/dist/cdn/{643OMX6D.js → SIUK7OO4.js} +1 -1
  60. package/dist/cdn/{VW2776MR.js → SQYHEYVJ.js} +1 -1
  61. package/dist/cdn/{SIUGRN4Q.js → TAZIMIFF.js} +1 -1
  62. package/dist/cdn/{25XM6BTJ.js → TF3C523O.js} +1 -1
  63. package/dist/cdn/{YPV5332T.js → TGH6D5IY.js} +1 -1
  64. package/dist/cdn/{CS224C6F.js → TZPSZTAH.js} +1 -1
  65. package/dist/cdn/{UV3U3JVV.js → UV4D2QFA.js} +1 -1
  66. package/dist/cdn/{SVY3DB6Z.js → VEUUNFWR.js} +1 -1
  67. package/dist/cdn/{2ZUQERRA.js → VGIXK3YM.js} +1 -1
  68. package/dist/cdn/{BE7WFZ3U.js → VPMYUEFF.js} +1 -1
  69. package/dist/cdn/{NRATHJBP.js → VVURRW2F.js} +1 -1
  70. package/dist/cdn/{IHGHHRTQ.js → VW52F2EM.js} +1 -1
  71. package/dist/cdn/{LLCJDTO5.js → W33YWBF5.js} +1 -1
  72. package/dist/cdn/{QCX5HMBY.js → WXE6AACQ.js} +1 -1
  73. package/dist/cdn/{H4AJJYCF.js → X5T6TZW3.js} +1 -1
  74. package/dist/cdn/{UGC66GAG.js → XLBMKYPQ.js} +1 -1
  75. package/dist/cdn/{V7HBTLA3.js → XWJFP7BZ.js} +1 -1
  76. package/dist/cdn/{TWDX3YCN.js → Y3CBLTF5.js} +1 -1
  77. package/dist/cdn/{FYYI54CE.js → YE7JMYIB.js} +1 -1
  78. package/dist/cdn/{ETSHZHZS.js → YT2I5RUD.js} +1 -1
  79. package/dist/cdn/{NNF53M5N.js → YUWQWOOF.js} +1 -1
  80. package/dist/cdn/{5SWGGS6Z.js → Z6NMQGEQ.js} +1 -1
  81. package/dist/cdn/{HV4LZMLU.js → ZD3OZO6O.js} +1 -1
  82. package/dist/cdn/{N2D6RJ3H.js → ZFSMRICA.js} +1 -1
  83. package/dist/cdn/{WDDMJBPJ.js → ZNG42S47.js} +1 -1
  84. package/dist/cdn/index.js +1 -1
  85. package/dist/chunks/runtime.js +2 -2
  86. package/dist/components/layer-list/customElement.js +1 -1
  87. package/dist/docs/api.json +1 -1
  88. package/dist/docs/docs.json +1 -1
  89. package/dist/docs/web-types.json +1 -1
  90. package/dist/solutions-components_commit.txt +7 -4
  91. package/package.json +1 -1
  92. package/dist/cdn/2GBXQUSA.js +0 -2
  93. package/dist/cdn/HW7HHHMK.js +0 -2
  94. 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 e from"./LLCJDTO5.js";import d from"./MPJ5N4H3.js";import"./MQF26HKA.js";import"./G4VIPBRX.js";import"./JE7L7M3J.js";import b from"./KDIUYXBA.js";import a from"./UUYUTETH.js";import{a as F}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 L}from"./HW7HHHMK.js";import{F as u,G as c,H as w,J as x,K as I,h as m,i as l,l as _,r as p,u as y}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([E,S,$,,{c:d,d:g,g:b},,v])=>{var T=m`@layer{:host{display:block}.width-full{width:100%}.pagination{display:flex;justify-content:center}.notice-msg{padding:10px;width:calc(100% - 20px)}.feature-list-popup-title{font-weight:500}.feature-list-popup-title-small{font-size:small}.feature-list-popup-title-small-ellipsis{font-size:small;white-space:nowrap!important;text-overflow:ellipsis;overflow:hidden}.popup-title{padding:0 5px;word-break:break-word}.profile-img{margin:0 5px;min-width:32px}.like-container{display:flex;align-items:center;gap:5px;color:gray!important;font-style:italic}.feature-symbol{padding:0 3px;min-width:30px;display:flex;justify-content:center}.search{padding:10px;background-color:var(--calcite-color-foreground-1)!important;border-block-end:1px solid var(--calcite-color-border-3)}}`,f=class extends w{constructor(){super(),this.selectedLayerId="",this.noFeaturesFoundMsg="",this.pageSize=100,this.highlightOnMap=!1,this.highlightOnHover=!1,this.textSize="large",this.showInitialLoading=!0,this.showErrorWhenNoFeatures=!1,this.showUserImageInList=!1,this.showFeatureSymbol=!1,this.applyLayerViewFilter=!1,this.showFullTitle=!0,this.filterByMapExtent=!1,this._featureItems=[],this._featuresCount=0,this._isLoading=!1,this._searchPlaceHolder="",this._fullTextSearchInfo=[],this._translations=F({name:"feature-list",blocking:!0}),this._pagination=u(),this._calciteList=u(),this._validFieldTypes=["small-integer","integer","big-integer","single","long"],this._abbreviatedLikeCount="",this._likeFieldAvailable=!1,this._searchExpression="",this.featureClick=p(),this.featureSelect=p(),this.listenOn(window,"selectedLanguageUpdated",this.selectedLanguageUpdated)}static{this.properties={selectedLayerId:1,mapView:0,noFeaturesFoundMsg:1,pageSize:9,highlightOnMap:5,highlightOnHover:5,sortingInfo:0,whereClause:1,textSize:1,showInitialLoading:5,showErrorWhenNoFeatures:5,showUserImageInList:5,showFeatureSymbol:5,applyLayerViewFilter:5,reportingOptions:0,showFullTitle:5,filterByMapExtent:5,_featureItems:16,_featuresCount:16,_isLoading:16,_searchPlaceHolder:16,_fullTextSearchInfo:16,_translations:16}}static{this.styles=T}static{this.shadowRootOptions=y}willUpdate(e){e.has("selectedLayerId")&&this.selectedLayerWatchHandler(),e.has("sortingInfo")&&this.sortingInfoWatchHandler(),e.has("whereClause")&&this.whereClauseHandler(),e.has("filterByMapExtent")&&this.hasUpdated&&this.filterByMapExtentWatchHandler(this.filterByMapExtent)}async selectedLayerWatchHandler(){this._selectedLayer=this.mapView&&await g(this.mapView,this.selectedLayerId),await this.initializeFeatureItems()}async sortingInfoWatchHandler(){await this.initializeFeatureItems()}async whereClauseHandler(){await this.initializeFeatureItems()}async filterByMapExtentWatchHandler(e){e?this.initializeMapExtentFilter():this._filterByMapExtentHandle&&this._filterByMapExtentHandle.remove()}async refresh(e){if(e&&this._pagination.value){let t={target:{startItem:this._pagination.value.startItem}};await this.pageChanged(t)}else this._searchExpression?await this._searchFullText():await this.initializeFeatureItems()}async selectedLanguageUpdated(e){if(this._pagination.value){let t={target:{startItem:this._pagination.value.startItem}};await this.pageChanged(t)}else await this.initializeFeatureItems()}async load(){this._isLoading=!!this.showInitialLoading,this._popupUtils=new v,this.mapView&&this.selectedLayerId&&(this._selectedLayer=await g(this.mapView,this.selectedLayerId),this._getFullTextSearchInfo()),this.filterByMapExtent&&this.initializeMapExtentFilter()}async loaded(){await this.initializeFeatureItems()}render(){let e=this._canShowFullTextSearch();return l`<calcite-panel>${e&&l`<calcite-input class=search clearable icon=search @calciteInputChange=${this._searchTextChanged} .placeholder=${this._searchPlaceHolder} title type=search></calcite-input>`||""}${this._isLoading&&l`<calcite-loader label scale=m></calcite-loader>`||""}${this.showErrorWhenNoFeatures&&this._featureItems.length===0&&!this._isLoading&&l`<calcite-notice class="notice-msg" icon=feature-details kind=info open><div slot=message>${this.filterByMapExtent?this._translations.featureErrorMsgInCurrentMapView:this.noFeaturesFoundMsg?this.noFeaturesFoundMsg:this._translations.featureErrorMsg}</div></calcite-notice>`||""}<calcite-list class=${x(this.textSize==="small"&&!this.showFullTitle?"overflow-hidden":"")} label selection-appearance=border selection-mode=none ${c(this._calciteList)}>${!this._isLoading&&this._featureItems.length>0&&l`<div>${this.filterByMapExtent&&this.getExtentNotice()||""}${this._featureItems}</div>`||""}</calcite-list>${this.pageSize&&this._featuresCount>this.pageSize&&l`<div class="width-full" slot=footer><calcite-pagination class="pagination" @calcitePaginationChange=${this.pageChanged} .pageSize=${this.pageSize} start-item=1 .totalItems=${this._featuresCount} ${c(this._pagination)}></calcite-pagination></div>`||""}</calcite-panel>`}async getWhereCondition(){let e="1=1";if(this.whereClause&&(e=this.whereClause),this._selectedLayer?.definitionExpression&&(e=e+" AND "+this._selectedLayer.definitionExpression),this.applyLayerViewFilter){let t=this.mapView&&await d(this.mapView,this.selectedLayerId);t?.filter?.where&&(e=e+" AND "+t.filter.where)}return e}async initializeFeatureItems(){if(this._selectedLayer){this._pagination.value?.goTo("start"),this._isLoading=!!this.showInitialLoading,this._featureItems=await this.queryPage(0);let e={where:await this.getWhereCondition(),geometry:this.filterByMapExtent?this.mapView?.extent:null};this._featuresCount=await this._selectedLayer.queryFeatureCount(e),this._isLoading=!1}}initializeMapExtentFilter(){this._filterByMapExtentHandle=$.when(()=>this.mapView?.stationary,()=>{this.initializeFeatureItems()},{initial:!0})}async pageChanged(e){this._isLoading=!0,this._highlightHandle&&(this._highlightHandle.remove(),this._highlightHandle=void 0);let t=e.target.startItem-1;this._featureItems=await this.queryPage(t),this._isLoading=!1}_canShowFullTextSearch(){return this._selectedLayer?.capabilities?.query?.supportsFullTextSearch&&this._selectedLayer.indexes.items.filter(e=>e.indexType=="FullText").length>0}_getFullTextSearchInfo(){if(this._fullTextSearchInfo=[],this._selectedLayer?.capabilities?.query?.supportsFullTextSearch){let e=this._selectedLayer.indexes?.filter(t=>t.indexType=="FullText");if(e?.length){let t=[];e.forEach(i=>{t.push(...i.fields.split(","))});let s=[];t.forEach(i=>{let a=this._selectedLayer?.getField(i.trim());s.push(a?.alias||"")}),this._searchPlaceHolder=this._translations.searchPlaceholder?this._translations.searchPlaceholder.replace("{{field_names}}",s.join(", ")):"",this._fullTextSearchInfo.push({onFields:["*"],searchTerm:"",searchType:"prefix"})}}}async _searchTextChanged(e){this._fullTextSearchInfo.forEach(t=>{t.searchTerm=e.target.value}),await this._searchFullText()}async _searchFullText(){this._searchExpression&&this._clearSearchDefinitionExpression();let e=[];if(this._fullTextSearchInfo&&this._fullTextSearchInfo[0].searchTerm){let t=this._selectedLayer?.createQuery();t&&(t.fullText=this._fullTextSearchInfo,e=await this._selectedLayer?.queryObjectIds(t),await this._updateSearchDefinitionExpression(e?.length?e:[-1]))}await this.initializeFeatureItems()}async _updateSearchDefinitionExpression(e){if(this._selectedLayer){let t=this._selectedLayer.definitionExpression;if(e?.length){let s=`objectId in(${e})`;this._selectedLayer.definitionExpression=this._searchExpression&&t&&t?.indexOf(this._searchExpression)>-1?t.replace(this._searchExpression,s):t?`${t} AND (${s})`:s,this._searchExpression=s}else this._clearSearchDefinitionExpression()}}_clearSearchDefinitionExpression(){if(this._selectedLayer){let e=this._selectedLayer?.definitionExpression;this._searchExpression&&e&&e?.indexOf(this._searchExpression)>-1&&(e?.indexOf(" AND ("+this._searchExpression)>-1?this._selectedLayer.definitionExpression=e.replace(` AND (${this._searchExpression})`,""):this._selectedLayer.definitionExpression=e.replace(this._searchExpression,""))}this._searchExpression=""}async featureClicked(e,t){if(this.featureClick.emit(),this.clearHighlights(),this.highlightOnMap){let s=Number(e.target.value),i=this.mapView&&await d(this.mapView,this.selectedLayerId);this._highlightHandle=i&&this.mapView?await b([s],i,this.mapView,!0):void 0}await this.emitSelectedFeature(t)}async emitSelectedFeature(e){let t=e.layer,s=t.createQuery();s.returnGeometry=!0;let i=Number(e.getObjectId());if(!Number.isNaN(i)&&s){s.objectIds=[i];let a=await t.queryFeatures(s);this.featureSelect.emit(a.features[0])}}async onFeatureHover(e){if(this.clearHighlights(),this.highlightOnHover){let t=Number(e.getObjectId()),s=this.mapView&&await d(this.mapView,this.selectedLayerId);s&&(this._highlightHandle=s.highlight([t],{name:"temporary"}))}}clearHighlights(){this._highlightHandle&&this._highlightHandle.remove()}async queryPage(e){let t=this._selectedLayer;if(t){let s=this.sortingInfo?.field?this.sortingInfo.field:t.objectIdField,i=this.sortingInfo?.order?this.sortingInfo.order:"desc",a=await this.getWhereCondition(),r={start:e,num:this.pageSize,outFields:["*"],returnGeometry:!0,where:a,outSpatialReference:this.mapView?.spatialReference.toJSON(),geometry:this.filterByMapExtent?this.mapView?.extent:null};s&&i&&(r.orderByFields=[s.toString()+" "+i]);let n=await t.queryFeatures(r);return await this.createFeatureItem(n)}else return}async createFeatureItem(e){let t=e?.features,s=this.reportingOptions&&this.reportingOptions[this.selectedLayerId].like,i=t.map(async a=>{let r=this.mapView?.map&&await this._popupUtils?.getPopupTitle(a,this.mapView.map)||"",n,h;return this.showUserImageInList&&this._selectedLayer?.editFieldsInfo?.creatorField&&(n=await this.getUserInformation(a)),this.showFeatureSymbol&&(h=await this.getFeatureSymbol(a)),s&&this.getAbbreviatedLikeCount(a),this.getFeatureItem(a,r,h,n)});return Promise.all(i)}getExtentNotice(){return l`<calcite-notice class="notice-msg" icon=extent-filter kind=brand open scale=s><div slot=message>${this._translations.extentFilterMsg}</div></calcite-notice>`}getAbbreviatedLikeCount(e){let t=this._selectedLayer;if(t){let s=this.reportingOptions&&this.reportingOptions[t.id].likeField;t.fields.forEach(i=>{if(this._validFieldTypes.indexOf(i.type)>-1&&i.name===s&&this.reportingOptions&&this.reportingOptions[t.id].like){this._likeFieldAvailable=!0;let a=e.attributes[s]||0;a>999&&this._translations.millions_value&&this._translations.thousands_value&&(a=a>999999?this._translations.millions_value.replace("{{millions_value}}",Math.floor(a/1e6).toString()):this._translations.thousands_value.replace("{{thousands_value}}",Math.floor(a/1e3).toString())),this._abbreviatedLikeCount=a}})}}getFeatureItem(e,t,s,i){if(this._selectedLayer?.id&&this._calciteList.value){let a=e.attributes[this._selectedLayer.objectIdField].toString();t=t??a;let r=Number(e.attributes[this.reportingOptions?.[this._selectedLayer.id].likeField||""]).toLocaleString(),n=this.textSize==="small"&&!this.showFullTitle?"feature-list-popup-title-small-ellipsis":this.textSize==="small"?"feature-list-popup-title-small":"feature-list-popup-title",h=this.showUserImageInList?115:65,C=this._calciteList.value.offsetWidth-h;return l`<calcite-list-item @mouseleave=${()=>{this.clearHighlights()}} @mouseover=${()=>{this.onFeatureHover(e)}} @calciteListItemSelect=${o=>{this.featureClicked(o,e)}} .value=${a}>${this.showUserImageInList&&l`<calcite-avatar class=profile-img .fullName=${i?.fullName} scale=m slot=content-start .thumbnail=${i?.userProfileUrl} .userId=${i?.id} .username=${i?.fullName?i.username:void 0}></calcite-avatar>`||""}${this.showFeatureSymbol&&s&&l`<div class=feature-symbol slot=content-start ${c(o=>o&&o.replaceChildren(s))}></div>`||""}<div class=${`popup-title ${n}`} slot=content-start style=${I({maxWidth:this.textSize==="large"?"none":`${C}px`})}>${t}</div>${this._likeFieldAvailable&&l`<div class=like-container id=${a.concat("like")??_} slot=content-end><span>${this._abbreviatedLikeCount}</span><calcite-icon icon=thumbs-up scale=s></calcite-icon><calcite-tooltip overlay-positioning=fixed placement=top .referenceElement=${a.concat("like")}>${r}</calcite-tooltip></div>`||""}<calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon></calcite-list-item>`}else return}async getUserInformation(e){let t=this._selectedLayer?.editFieldsInfo?.creatorField;if(t){e.attributes.hasOwnProperty(t.toLowerCase())?t=t.toLowerCase():e.attributes.hasOwnProperty(t.toUpperCase())&&(t=t.toUpperCase());let s=`${E.portalUrl}/sharing/rest/community/users/${e.attributes[t]}?f=json&returnUserLicensedItems=true`,i=this.mapView?.map?.portalItem.portal?.credential?.token;i&&(s+=`&token=${i}`);let a=await(await fetch(s)).json(),r=a?.username??e.attributes[t],n=`${E.portalUrl}/sharing/rest/community/users/${r}/info/blob.png`;return a?.access&&i&&(n+=`?token=${i}`),a.userProfileUrl=n,a}else return}async getFeatureSymbol(e){let t=document.createElement("div");return await S?.getDisplayedSymbol(e).then(async s=>{if(s&&await S?.renderPreviewHTML(s,{node:t}),t.children?.length){let i=t.children[0];if(i){let a=Number(i.getAttribute("height")),r=Number(i.getAttribute("width"));r>30&&(t.setAttribute("width","30"),i.setAttribute("width","30")),a>30&&(t.setAttribute("height","30"),i.setAttribute("height","30")),i.setAttribute("viewBox",`0 0 ${r} ${a}`),t.setAttribute("viewBox",`0 0 ${r} ${a}`)}}}),t}};L("feature-list",f);return f},"config","symbols/support/symbolUtils","core/reactiveUtils",a,b,d,e)
2
+ import e from"./W33YWBF5.js";import d from"./RYRVUHB7.js";import"./MQF26HKA.js";import"./G4VIPBRX.js";import"./JE7L7M3J.js";import b from"./KDIUYXBA.js";import a from"./UUYUTETH.js";import{a as F}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 L}from"./EIQZRLWQ.js";import{F as u,G as c,H as w,J as x,K as I,h as m,i as l,l as _,r as p,u as y}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([E,S,$,,{c:d,d:g,g:b},,v])=>{var T=m`@layer{:host{display:block}.width-full{width:100%}.pagination{display:flex;justify-content:center}.notice-msg{padding:10px;width:calc(100% - 20px)}.feature-list-popup-title{font-weight:500}.feature-list-popup-title-small{font-size:small}.feature-list-popup-title-small-ellipsis{font-size:small;white-space:nowrap!important;text-overflow:ellipsis;overflow:hidden}.popup-title{padding:0 5px;word-break:break-word}.profile-img{margin:0 5px;min-width:32px}.like-container{display:flex;align-items:center;gap:5px;color:gray!important;font-style:italic}.feature-symbol{padding:0 3px;min-width:30px;display:flex;justify-content:center}.search{padding:10px;background-color:var(--calcite-color-foreground-1)!important;border-block-end:1px solid var(--calcite-color-border-3)}}`,f=class extends w{constructor(){super(),this.selectedLayerId="",this.noFeaturesFoundMsg="",this.pageSize=100,this.highlightOnMap=!1,this.highlightOnHover=!1,this.textSize="large",this.showInitialLoading=!0,this.showErrorWhenNoFeatures=!1,this.showUserImageInList=!1,this.showFeatureSymbol=!1,this.applyLayerViewFilter=!1,this.showFullTitle=!0,this.filterByMapExtent=!1,this._featureItems=[],this._featuresCount=0,this._isLoading=!1,this._searchPlaceHolder="",this._fullTextSearchInfo=[],this._translations=F({name:"feature-list",blocking:!0}),this._pagination=u(),this._calciteList=u(),this._validFieldTypes=["small-integer","integer","big-integer","single","long"],this._abbreviatedLikeCount="",this._likeFieldAvailable=!1,this._searchExpression="",this.featureClick=p(),this.featureSelect=p(),this.listenOn(window,"selectedLanguageUpdated",this.selectedLanguageUpdated)}static{this.properties={selectedLayerId:1,mapView:0,noFeaturesFoundMsg:1,pageSize:9,highlightOnMap:5,highlightOnHover:5,sortingInfo:0,whereClause:1,textSize:1,showInitialLoading:5,showErrorWhenNoFeatures:5,showUserImageInList:5,showFeatureSymbol:5,applyLayerViewFilter:5,reportingOptions:0,showFullTitle:5,filterByMapExtent:5,_featureItems:16,_featuresCount:16,_isLoading:16,_searchPlaceHolder:16,_fullTextSearchInfo:16,_translations:16}}static{this.styles=T}static{this.shadowRootOptions=y}willUpdate(e){e.has("selectedLayerId")&&this.selectedLayerWatchHandler(),e.has("sortingInfo")&&this.sortingInfoWatchHandler(),e.has("whereClause")&&this.whereClauseHandler(),e.has("filterByMapExtent")&&this.hasUpdated&&this.filterByMapExtentWatchHandler(this.filterByMapExtent)}async selectedLayerWatchHandler(){this._selectedLayer=this.mapView&&await g(this.mapView,this.selectedLayerId),await this.initializeFeatureItems()}async sortingInfoWatchHandler(){await this.initializeFeatureItems()}async whereClauseHandler(){await this.initializeFeatureItems()}async filterByMapExtentWatchHandler(e){e?this.initializeMapExtentFilter():this._filterByMapExtentHandle&&this._filterByMapExtentHandle.remove()}async refresh(e){if(e&&this._pagination.value){let t={target:{startItem:this._pagination.value.startItem}};await this.pageChanged(t)}else this._searchExpression?await this._searchFullText():await this.initializeFeatureItems()}async selectedLanguageUpdated(e){if(this._pagination.value){let t={target:{startItem:this._pagination.value.startItem}};await this.pageChanged(t)}else await this.initializeFeatureItems()}async load(){this._isLoading=!!this.showInitialLoading,this._popupUtils=new v,this.mapView&&this.selectedLayerId&&(this._selectedLayer=await g(this.mapView,this.selectedLayerId),this._getFullTextSearchInfo()),this.filterByMapExtent&&this.initializeMapExtentFilter()}async loaded(){await this.initializeFeatureItems()}render(){let e=this._canShowFullTextSearch();return l`<calcite-panel>${e&&l`<calcite-input class=search clearable icon=search @calciteInputChange=${this._searchTextChanged} .placeholder=${this._searchPlaceHolder} title type=search></calcite-input>`||""}${this._isLoading&&l`<calcite-loader label scale=m></calcite-loader>`||""}${this.showErrorWhenNoFeatures&&this._featureItems.length===0&&!this._isLoading&&l`<calcite-notice class="notice-msg" icon=feature-details kind=info open><div slot=message>${this.filterByMapExtent?this._translations.featureErrorMsgInCurrentMapView:this.noFeaturesFoundMsg?this.noFeaturesFoundMsg:this._translations.featureErrorMsg}</div></calcite-notice>`||""}<calcite-list class=${x(this.textSize==="small"&&!this.showFullTitle?"overflow-hidden":"")} label selection-appearance=border selection-mode=none ${c(this._calciteList)}>${!this._isLoading&&this._featureItems.length>0&&l`<div>${this.filterByMapExtent&&this.getExtentNotice()||""}${this._featureItems}</div>`||""}</calcite-list>${this.pageSize&&this._featuresCount>this.pageSize&&l`<div class="width-full" slot=footer><calcite-pagination class="pagination" @calcitePaginationChange=${this.pageChanged} .pageSize=${this.pageSize} start-item=1 .totalItems=${this._featuresCount} ${c(this._pagination)}></calcite-pagination></div>`||""}</calcite-panel>`}async getWhereCondition(){let e="1=1";if(this.whereClause&&(e=this.whereClause),this._selectedLayer?.definitionExpression&&(e=e+" AND "+this._selectedLayer.definitionExpression),this.applyLayerViewFilter){let t=this.mapView&&await d(this.mapView,this.selectedLayerId);t?.filter?.where&&(e=e+" AND "+t.filter.where)}return e}async initializeFeatureItems(){if(this._selectedLayer){this._pagination.value?.goTo("start"),this._isLoading=!!this.showInitialLoading,this._featureItems=await this.queryPage(0);let e={where:await this.getWhereCondition(),geometry:this.filterByMapExtent?this.mapView?.extent:null};this._featuresCount=await this._selectedLayer.queryFeatureCount(e),this._isLoading=!1}}initializeMapExtentFilter(){this._filterByMapExtentHandle=$.when(()=>this.mapView?.stationary,()=>{this.initializeFeatureItems()},{initial:!0})}async pageChanged(e){this._isLoading=!0,this._highlightHandle&&(this._highlightHandle.remove(),this._highlightHandle=void 0);let t=e.target.startItem-1;this._featureItems=await this.queryPage(t),this._isLoading=!1}_canShowFullTextSearch(){return this._selectedLayer?.capabilities?.query?.supportsFullTextSearch&&this._selectedLayer.indexes.items.filter(e=>e.indexType=="FullText").length>0}_getFullTextSearchInfo(){if(this._fullTextSearchInfo=[],this._selectedLayer?.capabilities?.query?.supportsFullTextSearch){let e=this._selectedLayer.indexes?.filter(t=>t.indexType=="FullText");if(e?.length){let t=[];e.forEach(i=>{t.push(...i.fields.split(","))});let s=[];t.forEach(i=>{let a=this._selectedLayer?.getField(i.trim());s.push(a?.alias||"")}),this._searchPlaceHolder=this._translations.searchPlaceholder?this._translations.searchPlaceholder.replace("{{field_names}}",s.join(", ")):"",this._fullTextSearchInfo.push({onFields:["*"],searchTerm:"",searchType:"prefix"})}}}async _searchTextChanged(e){this._fullTextSearchInfo.forEach(t=>{t.searchTerm=e.target.value}),await this._searchFullText()}async _searchFullText(){this._searchExpression&&this._clearSearchDefinitionExpression();let e=[];if(this._fullTextSearchInfo&&this._fullTextSearchInfo[0].searchTerm){let t=this._selectedLayer?.createQuery();t&&(t.fullText=this._fullTextSearchInfo,e=await this._selectedLayer?.queryObjectIds(t),await this._updateSearchDefinitionExpression(e?.length?e:[-1]))}await this.initializeFeatureItems()}async _updateSearchDefinitionExpression(e){if(this._selectedLayer){let t=this._selectedLayer.definitionExpression;if(e?.length){let s=`objectId in(${e})`;this._selectedLayer.definitionExpression=this._searchExpression&&t&&t?.indexOf(this._searchExpression)>-1?t.replace(this._searchExpression,s):t?`${t} AND (${s})`:s,this._searchExpression=s}else this._clearSearchDefinitionExpression()}}_clearSearchDefinitionExpression(){if(this._selectedLayer){let e=this._selectedLayer?.definitionExpression;this._searchExpression&&e&&e?.indexOf(this._searchExpression)>-1&&(e?.indexOf(" AND ("+this._searchExpression)>-1?this._selectedLayer.definitionExpression=e.replace(` AND (${this._searchExpression})`,""):this._selectedLayer.definitionExpression=e.replace(this._searchExpression,""))}this._searchExpression=""}async featureClicked(e,t){if(this.featureClick.emit(),this.clearHighlights(),this.highlightOnMap){let s=Number(e.target.value),i=this.mapView&&await d(this.mapView,this.selectedLayerId);this._highlightHandle=i&&this.mapView?await b([s],i,this.mapView,!0):void 0}await this.emitSelectedFeature(t)}async emitSelectedFeature(e){let t=e.layer,s=t.createQuery();s.returnGeometry=!0;let i=Number(e.getObjectId());if(!Number.isNaN(i)&&s){s.objectIds=[i];let a=await t.queryFeatures(s);this.featureSelect.emit(a.features[0])}}async onFeatureHover(e){if(this.clearHighlights(),this.highlightOnHover){let t=Number(e.getObjectId()),s=this.mapView&&await d(this.mapView,this.selectedLayerId);s&&(this._highlightHandle=s.highlight([t],{name:"temporary"}))}}clearHighlights(){this._highlightHandle&&this._highlightHandle.remove()}async queryPage(e){let t=this._selectedLayer;if(t){let s=this.sortingInfo?.field?this.sortingInfo.field:t.objectIdField,i=this.sortingInfo?.order?this.sortingInfo.order:"desc",a=await this.getWhereCondition(),r={start:e,num:this.pageSize,outFields:["*"],returnGeometry:!0,where:a,outSpatialReference:this.mapView?.spatialReference.toJSON(),geometry:this.filterByMapExtent?this.mapView?.extent:null};s&&i&&(r.orderByFields=[s.toString()+" "+i]);let n=await t.queryFeatures(r);return await this.createFeatureItem(n)}else return}async createFeatureItem(e){let t=e?.features,s=this.reportingOptions&&this.reportingOptions[this.selectedLayerId].like,i=t.map(async a=>{let r=this.mapView?.map&&await this._popupUtils?.getPopupTitle(a,this.mapView.map)||"",n,h;return this.showUserImageInList&&this._selectedLayer?.editFieldsInfo?.creatorField&&(n=await this.getUserInformation(a)),this.showFeatureSymbol&&(h=await this.getFeatureSymbol(a)),s&&this.getAbbreviatedLikeCount(a),this.getFeatureItem(a,r,h,n)});return Promise.all(i)}getExtentNotice(){return l`<calcite-notice class="notice-msg" icon=extent-filter kind=brand open scale=s><div slot=message>${this._translations.extentFilterMsg}</div></calcite-notice>`}getAbbreviatedLikeCount(e){let t=this._selectedLayer;if(t){let s=this.reportingOptions&&this.reportingOptions[t.id].likeField;t.fields.forEach(i=>{if(this._validFieldTypes.indexOf(i.type)>-1&&i.name===s&&this.reportingOptions&&this.reportingOptions[t.id].like){this._likeFieldAvailable=!0;let a=e.attributes[s]||0;a>999&&this._translations.millions_value&&this._translations.thousands_value&&(a=a>999999?this._translations.millions_value.replace("{{millions_value}}",Math.floor(a/1e6).toString()):this._translations.thousands_value.replace("{{thousands_value}}",Math.floor(a/1e3).toString())),this._abbreviatedLikeCount=a}})}}getFeatureItem(e,t,s,i){if(this._selectedLayer?.id&&this._calciteList.value){let a=e.attributes[this._selectedLayer.objectIdField].toString();t=t??a;let r=Number(e.attributes[this.reportingOptions?.[this._selectedLayer.id].likeField||""]).toLocaleString(),n=this.textSize==="small"&&!this.showFullTitle?"feature-list-popup-title-small-ellipsis":this.textSize==="small"?"feature-list-popup-title-small":"feature-list-popup-title",h=this.showUserImageInList?115:65,C=this._calciteList.value.offsetWidth-h;return l`<calcite-list-item @mouseleave=${()=>{this.clearHighlights()}} @mouseover=${()=>{this.onFeatureHover(e)}} @calciteListItemSelect=${o=>{this.featureClicked(o,e)}} .value=${a}>${this.showUserImageInList&&l`<calcite-avatar class=profile-img .fullName=${i?.fullName} scale=m slot=content-start .thumbnail=${i?.userProfileUrl} .userId=${i?.id} .username=${i?.fullName?i.username:void 0}></calcite-avatar>`||""}${this.showFeatureSymbol&&s&&l`<div class=feature-symbol slot=content-start ${c(o=>o&&o.replaceChildren(s))}></div>`||""}<div class=${`popup-title ${n}`} slot=content-start style=${I({maxWidth:this.textSize==="large"?"none":`${C}px`})}>${t}</div>${this._likeFieldAvailable&&l`<div class=like-container id=${a.concat("like")??_} slot=content-end><span>${this._abbreviatedLikeCount}</span><calcite-icon icon=thumbs-up scale=s></calcite-icon><calcite-tooltip overlay-positioning=fixed placement=top .referenceElement=${a.concat("like")}>${r}</calcite-tooltip></div>`||""}<calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon></calcite-list-item>`}else return}async getUserInformation(e){let t=this._selectedLayer?.editFieldsInfo?.creatorField;if(t){e.attributes.hasOwnProperty(t.toLowerCase())?t=t.toLowerCase():e.attributes.hasOwnProperty(t.toUpperCase())&&(t=t.toUpperCase());let s=`${E.portalUrl}/sharing/rest/community/users/${e.attributes[t]}?f=json&returnUserLicensedItems=true`,i=this.mapView?.map?.portalItem.portal?.credential?.token;i&&(s+=`&token=${i}`);let a=await(await fetch(s)).json(),r=a?.username??e.attributes[t],n=`${E.portalUrl}/sharing/rest/community/users/${r}/info/blob.png`;return a?.access&&i&&(n+=`?token=${i}`),a.userProfileUrl=n,a}else return}async getFeatureSymbol(e){let t=document.createElement("div");return await S?.getDisplayedSymbol(e).then(async s=>{if(s&&await S?.renderPreviewHTML(s,{node:t}),t.children?.length){let i=t.children[0];if(i){let a=Number(i.getAttribute("height")),r=Number(i.getAttribute("width"));r>30&&(t.setAttribute("width","30"),i.setAttribute("width","30")),a>30&&(t.setAttribute("height","30"),i.setAttribute("height","30")),i.setAttribute("viewBox",`0 0 ${r} ${a}`),t.setAttribute("viewBox",`0 0 ${r} ${a}`)}}}),t}};L("feature-list",f);return f},"config","symbols/support/symbolUtils","core/reactiveUtils",a,b,d,e)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{a as W}from"./M5MQY5WC.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import{b as T}from"./HW7HHHMK.js";import{F as h,G as n,H as b,J as a,h as u,i as r,l as _,r as y}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([x,V])=>{var C=u`:host{display:block}.display-none{display:none}.display-flex{display:flex}.margin-top-1-2{margin-top:.5rem}.margin-left-1-2{margin-left:.5rem}.margin-right-1-2{margin-right:.5rem}.square-32{width:32px;height:32px}.square-40{width:40px;height:40px}.square-48{width:48px;height:48px}.border-bottom{border-bottom:1px solid var(--calcite-color-border-3)}.box-shadow{box-shadow:0 1px 2px #0000004d}.margin-bottom-1-2{margin-bottom:.5rem}.danger-icon-color{--calcite-icon-color: var(--calcite-color-status-danger)}`,m=class extends b{constructor(){super(),this.enabledLayerIds=[],this.enableLegend=!1,this.enableLayerList=!1,this.enableFloorFilter=!1,this.enableFullscreen=!1,this.enableSearch=!1,this.enableBasemap=!1,this.enableHome=!1,this.enableSingleExpand=!1,this.zoomToolsSize="m",this.layout="vertical",this.mapWidgetsSize="m",this.enableMapPicker=!1,this.enableMapLayerPicker=!1,this.position="top-leading",this.stackTools=!0,this.enableSelectionTool=!1,this.toolOrder=["home","legend","search","fullscreen","floorfilter","layers-list","selectiontool","map-picker","map-layer-picker"],this.selectionTools=["rectangle-select","lasso-select","clear-selection"],this.mapInfos=[],this.defaultLayerId="",this.isMobile=!1,this.selectedFeaturesIds=[],this.selectedWebMapId="",this.showOnlyUpdatableLayers=!1,this.visibilityIcon="eyeball",this._hasFloorInfo=!1,this._translations=W({name:"map-tools",blocking:!0}),this._showTools=!0,this._showBasemapWidget=!1,this._showFloorFilter=!1,this._showFullscreen=!1,this._showLegendWidget=!1,this._showSearchWidget=!1,this._showLayersListWidget=!1,this._rectangleSelectionToolActive=!1,this._lassoSelectionToolActive=!1,this._showEllipsisTools=!0,this._ellipsisTools=[],this._isValidWebMap=!0,this._showSelectionTools=!1,this._basemapElement=h(),this._floorFilterElement=h(),this._fullscreenElement=h(),this._layerListWidgetElement=h(),this._legendElement=h(),this._searchElement=h(),this._widgets=[],this._selectionToolElement=h(),this._mapTools=[],this._mapTool=h(),this.clearSelection=y(),this.listenOn(window,"mapChanged",this.mapChanged),this.listenOn(window,"layerSelectionChange",this._layerSelectionChange)}static{this.properties={basemapConfig:0,enabledLayerIds:0,enableLegend:5,enableLayerList:5,enableFloorFilter:5,enableFullscreen:5,enableSearch:5,enableBasemap:5,enableHome:5,enableSingleExpand:5,zoomToolsSize:1,layout:1,mapView:0,mapWidgetsSize:1,enableMapPicker:5,enableMapLayerPicker:5,position:1,searchConfiguration:0,stackTools:5,enableSelectionTool:5,toolOrder:0,selectionTools:0,selectedLayer:0,mapInfos:0,defaultLayerId:1,isMobile:5,parentComponentHeight:9,parentComponentWidth:9,selectedFeaturesIds:0,selectedWebMapId:1,showOnlyUpdatableLayers:5,mapInfo:0,visibilityIcon:1,_hasFloorInfo:16,_translations:16,_showTools:16,_showBasemapWidget:16,_showFloorFilter:16,_showFullscreen:16,_showLegendWidget:16,_showSearchWidget:16,_showLayersListWidget:16,_rectangleSelectionToolActive:16,_lassoSelectionToolActive:16,_showEllipsisTools:16,_ellipsisTools:16,_isValidWebMap:16,_showSelectionTools:16}}static{this.styles=C}willUpdate(t){t.has("mapView")&&this.mapViewWatchHandler(),t.has("parentComponentWidth")&&this.parentComponentWidth&&this.parentComponentWidthWatchHandler(this.parentComponentWidth),t.has("_showBasemapWidget")&&(this.hasUpdated||this._showBasemapWidget!==!1)&&this._showBasemapWidgetWatchHandler(this._showBasemapWidget),t.has("_showLayersListWidget")&&(this.hasUpdated||this._showLayersListWidget!==!1)&&this._showLayersListWidgetWatchHandler(this._showLayersListWidget),t.has("_showFloorFilter")&&(this.hasUpdated||this._showFloorFilter!==!1)&&this._showFloorFilterWatchHandler(this._showFloorFilter),t.has("_showFullscreen")&&(this.hasUpdated||this._showFullscreen!==!1)&&this._showFullscreenWatchHandler(this._showFullscreen),t.has("_showLegendWidget")&&(this.hasUpdated||this._showLegendWidget!==!1)&&this._showLegendWidgetWatchHandler(this._showLegendWidget),t.has("_showSearchWidget")&&(this.hasUpdated||this._showSearchWidget!==!1)&&this._showSearchWidgetWatchHandler(this._showSearchWidget)}async mapViewWatchHandler(){await this.mapView?.when(()=>{this.enableHome&&this._initHome(),this.parentComponentWidth&&this._updateTools(this.parentComponentWidth)})}async parentComponentWidthWatchHandler(t){this._updateTools(t)}async _showBasemapWidgetWatchHandler(t){let e=this._basemapElement.value?this._basemapElement.value.basemapWidget:void 0,s=document.dir==="rtl"?"rtl":"ltr";e&&(t?(this.mapView?.ui.add(e,{position:this.position,index:1}),e.container?.style.setProperty("direction",s)):this.mapView?.ui.remove(e))}async _showLayersListWidgetWatchHandler(t){let e=this._layerListWidgetElement.value?this._layerListWidgetElement.value.layerListWidget:void 0,s=document.dir==="rtl"?"rtl":"ltr";e&&(t?(this.mapView?.ui.add(e,{position:this.position,index:1}),e.container?.style.setProperty("direction",s)):this.mapView?.ui.remove(e))}async _showFloorFilterWatchHandler(t){let e=this._floorFilterElement.value?this._floorFilterElement.value.floorFilterWidget:void 0,s=document.dir==="rtl"?"rtl":"ltr";e&&(t?(this.mapView?.ui.add(e,{position:this.position,index:1}),e.container?.style.setProperty("direction",s)):this.mapView?.ui.remove(e))}async _showFullscreenWatchHandler(t){let e=this._fullscreenElement.value?this._fullscreenElement.value.fullscreenWidget:void 0;e&&(t?e.viewModel.state==="ready"&&e.viewModel.enter():e.viewModel.state==="active"&&e.viewModel.exit())}async _showLegendWidgetWatchHandler(t){let e=this._legendElement.value?this._legendElement.value.legendWidget:void 0,s=document.dir==="rtl"?"rtl":"ltr";e&&(t?(this.mapView?.ui.add(e,{position:this.position,index:1}),e.container?.style.setProperty("direction",s)):this.mapView?.ui.remove(e))}async _showSearchWidgetWatchHandler(t){let e=this._searchElement.value?this._searchElement.value.searchWidget:void 0,s=document.dir==="rtl"?"rtl":"ltr";e&&(t?(this.mapView?.ui.add(e,{position:this.position,index:1}),e.container?.style.setProperty("direction",s)):this.mapView?.ui.remove(e))}async mapChanged(t){let e=t.detail.isValid;this._isValidWebMap=e,this._showTools||this._toggleTools()}async _layerSelectionChange(t){this._showTools||this._toggleTools()}async load(){this._mapTools=[...this.toolOrder]}render(){this._setZoomToolsSize();let t=this.layout==="horizontal"?"display-flex":"",e=this._getToggleIcon(),s=!this._showTools&&!this._showSelectionTools?"display-none":t,o=this._showEllipsisTools?"":"display-none",l=this._showSearchWidget?"":"display-none",i=this._showBasemapWidget?"":"display-none",c=this._showLegendWidget?"":"display-none",d=this._showFloorFilter?"":"display-none",p=this._showFullscreen?"":"display-none",v=this._showLayersListWidget?"":"display-none",f=this._showTools?this._translations.collapse:this._translations.expand,L=!this.enableBasemap&&!this.enableFullscreen&&!this.enableLegend&&!this.enableLayerList&&!this.enableSearch&&!this.enableMapPicker&&!this.enableMapLayerPicker?"display-none":"",S=document.dir==="rtl"?"margin-right-1-2":"margin-left-1-2",F=this.enableSingleExpand?this.layout==="horizontal"?S:"margin-top-1-2":"",$=this._ellipsisTools.length>0&&this._showTools?"":"display-none",w=this.stackTools&&this._ellipsisTools.length===0?"box-shadow":"",E=this._showSelectionTools?this.selectionTools:this._mapTools;return r`<div class=${`${L} ${t}`}>${this.enableSingleExpand?r`<div class=${a(w)}>${this._getActionGroup(e,!1,f||"",()=>this._toggleTools())}</div>`:void 0}<div class=${`${F} ${w} ${s}`}>${this._getMapWidgets(E)}</div><div><div class=${a($)}>${this._getActionGroup("ellipsis",!1,"",()=>this._toggleEllipsisTools())}<div class=${a(o)}>${this._getMapWidgets(this._ellipsisTools)}</div></div></div></div><map-basemap-gallery .basemapConfig=${this.basemapConfig} class=${a(i)} .mapView=${this.mapView} ${n(this._basemapElement)}></map-basemap-gallery><map-search class=${a(l)} .mapView=${this.mapView} result-graphic-enabled .searchConfiguration=${this.searchConfiguration} ${n(this._searchElement)}></map-search><map-legend class=${a(c)} .mapView=${this.mapView} ${n(this._legendElement)}></map-legend><map-fullscreen class=${a(p)} .mapView=${this.mapView} @fullscreenStateChange=${g=>this._fullscreenStateChange(g.detail)} ${n(this._fullscreenElement)}></map-fullscreen><layer-list-widget class=${a(v)} .mapView=${this.mapView} @fullscreenStateChange=${g=>this._fullscreenStateChange(g.detail)} .visibilityIcon=${this.visibilityIcon} ${n(this._layerListWidgetElement)}></layer-list-widget><map-floor-filter class=${a(d)} .enabled=${this.enableFloorFilter} .mapView=${this.mapView} ${n(this._floorFilterElement)}></map-floor-filter><selection-tool .mapView=${this.mapView} @drawingComplete=${()=>{this._rectangleSelectionToolActive=!1,this._lassoSelectionToolActive=!1}} .selectedLayerId=${this.selectedLayer?.id} ${n(this._selectionToolElement)}></selection-tool>${this.enableMapPicker&&r`<map-picker class=mapPickerClass .height=${(this.parentComponentHeight??0)-25} id=map-picker .mapInfos=${this.mapInfos} reference-element=map .selectedWebMapId=${this.selectedWebMapId} show-map-list-in-popover></map-picker>`||""}${this.enableMapLayerPicker&&this.selectedLayer&&r`<map-layer-picker appearance=transparent .defaultLayerId=${this.defaultLayerId} .enabledLayerIds=${this.enabledLayerIds} .height=${(this.parentComponentHeight??0)-25} .isMobile=${this.isMobile} .mapView=${this.mapView} .showOnlyUpdatableLayers=${this.showOnlyUpdatableLayers} reference-element=layers scale=s .selectedIds=${this.selectedLayer?[this.selectedLayer.id]:[]} show-layers-list-in-popover show-tables type=dropdown></map-layer-picker>`||""}`}_initHome(){this.enableHome&&(this._homeWidget=new V({view:this.mapView}))}_setZoomToolsSize(){let t=document.getElementsByClassName("esri-zoom")[0]?.children[0],e=document.getElementsByClassName("esri-zoom")[0]?.children[1];if(t&&e){let s=this.zoomToolsSize==="s"?"32px":this.zoomToolsSize==="m"?"40px":"48px";t.style.width=s,t.style.height=s,e.style.width=s,e.style.height=s}if(this.layout==="horizontal"){let s=document.dir||"ltr",o=s==="ltr"?"esri-ui-top-left":"esri-ui-top-right",l=s==="ltr"?0:this.parentComponentWidth-62,i=s==="ltr"?this._showTools?"ltr":"rtl":this._showTools?"rtl":"ltr";document.getElementsByClassName(o)[0]?.firstElementChild?.tagName==="MAP-TOOLS"&&!this._showTools&&(i=s),document.getElementsByClassName("esri-zoom")[0]?.setAttribute("style",`position: absolute; top: 50px; left: ${l}px`),this._showSelectionTools||document.getElementsByClassName(o)[0]?.setAttribute("style",`flex-direction: row; gap: 5px; align-items: flex-start; direction: ${i} !important; z-index: 1;`)}}_getToggleIcon(){let t=document.dir||"ltr";return this.layout==="horizontal"?t==="ltr"?this._showTools?"chevrons-left":"chevrons-right":this._showTools?"chevrons-right":"chevrons-left":this._showTools?"chevrons-up":"chevrons-down"}_updateTools(t){let e=this._showSelectionTools?JSON.parse(JSON.stringify(this.selectionTools)):JSON.parse(JSON.stringify(this.toolOrder));this._hasFloorInfo=this.mapView?.map?.floorInfo;let s=e.indexOf("floorfilter");s>-1&&!this._hasFloorInfo&&e.splice(s,1);let o=40,l=110;this.isMobile&&(this.enableMapPicker||this.enableMapLayerPicker)&&(l=160);let i=Math.ceil((t-l)/o)-1;i&&i!==e.length-1?(this._mapTools=e.slice(0,i),this._ellipsisTools=e.slice(i,e.length)):(this._mapTools=e,this._ellipsisTools=[])}_getMapWidgets(t){let e=this._showFullscreen?"full-screen-exit":"full-screen",s=this._showFullscreen?this._translations.exitFullscreen:this._translations.enterFullscreen,o=this._isValidWebMap?"map":"exclamation-mark-triangle",l=this.selectedLayer===void 0?"exclamation-mark-triangle":"layers";return t.map(i=>{switch(i){case"legend":return this.enableLegend&&this.enableSingleExpand?this._getActionGroup("legend",!1,this._translations.legend,()=>this._showLegend()):this.enableLegend?this._getWidget(i,this._legendElement.value?.legendWidget,!0):void 0;case"search":return this.enableSearch&&this.enableSingleExpand?this._getActionGroup("magnifying-glass",!1,this._translations.search,()=>this._search()):this.enableSearch?this._getWidget(i,this._searchElement.value?.searchWidget,!0):void 0;case"fullscreen":return this.enableFullscreen&&this.enableSingleExpand?this._getActionGroup(e,!1,s||"",()=>this._expand()):this.enableFullscreen?this._getWidget(i,this._fullscreenElement.value?.fullscreenWidget,!1):void 0;case"basemap":return this.enableBasemap&&this.enableSingleExpand?this._getActionGroup("basemap",!1,this._translations.basemap,()=>this._toggleBasemapPicker()):this.enableBasemap?this._getWidget(i,this._basemapElement.value?.basemapWidget,!0):void 0;case"layers-list":return this.enableLayerList&&this.enableSingleExpand?this._getActionGroup("layers",!1,this._translations.layers||"",()=>this._toggleLayerListWidget()):this.enableLayerList?this._getWidget(i,this._layerListWidgetElement.value?.layerListWidget,!0):void 0;case"floorfilter":return this.enableFloorFilter&&this._hasFloorInfo&&this.enableSingleExpand?this._getActionGroup("urban-model",!1,this._translations.floorFilter,()=>this._toggleFloorFilter()):this.enableFloorFilter&&this._hasFloorInfo?this._getWidget(i,this._floorFilterElement.value?.floorFilterWidget,!0):void 0;case"selectiontool":return this.enableSelectionTool&&this.selectedLayer?this._getActionGroup("cursor-selection",!1,this._translations.selectionTools,this._onSelectionToolClick,!1):void 0;case"rectangle-select":return this.enableSelectionTool&&this.selectedLayer?this._getActionGroup("cursor-marquee",!1,this._translations.selectByRectangle,()=>this._toggleSelectionTool("rectangle"),!1,this._rectangleSelectionToolActive):void 0;case"lasso-select":return this.enableSelectionTool&&this.selectedLayer?this._getActionGroup("lasso-select",!1,this._translations.selectByLasso,()=>this._toggleSelectionTool("freehandPolygon"),!1,this._lassoSelectionToolActive):void 0;case"clear-selection":return this.selectedLayer&&this.selectedFeaturesIds.length>0?this._getActionGroup("erase",!1,this._translations.clearSelection,()=>this.clearSelection.emit()):void 0;case"home":return this.enableHome?this._getActionGroup("home",!1,this._translations.defaultMapView,()=>this._homeWidget?.go()):void 0;case"map-picker":return this.enableMapPicker?this._getActionGroup(o,!1,"",()=>{},!this._isValidWebMap):void 0;case"map-layer-picker":return this.enableMapLayerPicker&&this._isValidWebMap?this._getActionGroup(l,!1,"",()=>{},this.selectedLayer===void 0):void 0;default:return""}})}_fullscreenStateChange(t){t==="ready"&&this._showFullscreen?this._showFullscreen=!1:t==="active"&&!this._showFullscreen&&(this._showFullscreen=!0)}_getActionGroup(t,e,s,o,l,i){let c=this.mapWidgetsSize==="s"?"square-32":this.mapWidgetsSize==="m"?"square-40":"square-48",d=this.stackTools?"":"margin-bottom-1-2",p=this.stackTools?"":"box-shadow";return r`<div><calcite-action alignment=center appearance=solid .indicator=${i} class=${`map-actions ${c} ${d} border-bottom ${p} ${l?"danger-icon-color":""}`} .disabled=${e} .icon=${t} id=${t??_} @click=${o} scale=s text ${n(this._mapTool)}><calcite-icon icon=chevron-up scale=s slot=icon></calcite-icon></calcite-action>${!this.isMobile&&s&&r`<calcite-tooltip .placement=${this.layout==="vertical"?"auto":"bottom"} reference-element=${t??_}><span>${s}</span></calcite-tooltip>`||""}</div>`}_getWidget(t,e,s){if(this._widgets.indexOf(t)<0&&this.mapView&&e){let o=this.toolOrder.indexOf(t),l=new x({view:this.mapView,content:e}),i=this.enableHome?2:1;this.mapView.ui.add(s?l:e,{position:this.position,index:o>-1?o+i:1}),this._widgets.push(t)}}_showLegend(){this._showLegendWidget=!this._showLegendWidget,this._showTools=!1,this._toggleEllipsisTools()}_search(){this._showSearchWidget=!this._showSearchWidget,this._showTools=!1,this._toggleEllipsisTools()}_toggleBasemapPicker(){this._showBasemapWidget=!this._showBasemapWidget,this._showTools=!1,this._toggleEllipsisTools()}_toggleLayerListWidget(){this._showLayersListWidget=!this._showLayersListWidget,this._showTools=!1,this._toggleEllipsisTools()}_toggleFloorFilter(){this._showFloorFilter=!this._showFloorFilter,this._showTools=!1,this._toggleEllipsisTools()}_onSelectionToolClick(){this._showSelectionTools=!this._showSelectionTools,this._showTools=!1,this._toggleEllipsisTools()}_toggleSelectionTool(t){t==="rectangle"?(this._lassoSelectionToolActive=!1,this._rectangleSelectionToolActive=!this._rectangleSelectionToolActive):t==="freehandPolygon"&&(this._rectangleSelectionToolActive=!1,this._lassoSelectionToolActive=!this._lassoSelectionToolActive),this._selectionToolElement.value?.toggleSelectionTool(t,this._rectangleSelectionToolActive||this._lassoSelectionToolActive)}_expand(){this._showFullscreen=!this._showFullscreen}_toggleTools(){this._showTools||(this._showSelectionTools=!1,this._showBasemapWidget=!1,this._showLayersListWidget=!1,this._showSearchWidget=!1,this._showLegendWidget=!1,this._showFloorFilter=!1),this._rectangleSelectionToolActive?this._toggleSelectionTool("rectangle"):this._lassoSelectionToolActive&&this._toggleSelectionTool("freehandPolygon"),this._showTools=!this._showTools,this._toggleEllipsisTools(),this._updateTools(this.parentComponentWidth)}_toggleEllipsisTools(){this._showEllipsisTools=!this._showEllipsisTools}};T("map-tools",m);return m},"widgets/Expand","widgets/Home")
2
+ import{a as W}from"./DV233ITZ.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import{b as T}from"./EIQZRLWQ.js";import{F as h,G as n,H as b,J as a,h as u,i as r,l as _,r as y}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([x,V])=>{var C=u`:host{display:block}.display-none{display:none}.display-flex{display:flex}.margin-top-1-2{margin-top:.5rem}.margin-left-1-2{margin-left:.5rem}.margin-right-1-2{margin-right:.5rem}.square-32{width:32px;height:32px}.square-40{width:40px;height:40px}.square-48{width:48px;height:48px}.border-bottom{border-bottom:1px solid var(--calcite-color-border-3)}.box-shadow{box-shadow:0 1px 2px #0000004d}.margin-bottom-1-2{margin-bottom:.5rem}.danger-icon-color{--calcite-icon-color: var(--calcite-color-status-danger)}`,m=class extends b{constructor(){super(),this.enabledLayerIds=[],this.enableLegend=!1,this.enableLayerList=!1,this.enableFloorFilter=!1,this.enableFullscreen=!1,this.enableSearch=!1,this.enableBasemap=!1,this.enableHome=!1,this.enableSingleExpand=!1,this.zoomToolsSize="m",this.layout="vertical",this.mapWidgetsSize="m",this.enableMapPicker=!1,this.enableMapLayerPicker=!1,this.position="top-leading",this.stackTools=!0,this.enableSelectionTool=!1,this.toolOrder=["home","legend","search","fullscreen","floorfilter","layers-list","selectiontool","map-picker","map-layer-picker"],this.selectionTools=["rectangle-select","lasso-select","clear-selection"],this.mapInfos=[],this.defaultLayerId="",this.isMobile=!1,this.selectedFeaturesIds=[],this.selectedWebMapId="",this.showOnlyUpdatableLayers=!1,this.visibilityIcon="eyeball",this._hasFloorInfo=!1,this._translations=W({name:"map-tools",blocking:!0}),this._showTools=!0,this._showBasemapWidget=!1,this._showFloorFilter=!1,this._showFullscreen=!1,this._showLegendWidget=!1,this._showSearchWidget=!1,this._showLayersListWidget=!1,this._rectangleSelectionToolActive=!1,this._lassoSelectionToolActive=!1,this._showEllipsisTools=!0,this._ellipsisTools=[],this._isValidWebMap=!0,this._showSelectionTools=!1,this._basemapElement=h(),this._floorFilterElement=h(),this._fullscreenElement=h(),this._layerListWidgetElement=h(),this._legendElement=h(),this._searchElement=h(),this._widgets=[],this._selectionToolElement=h(),this._mapTools=[],this._mapTool=h(),this.clearSelection=y(),this.listenOn(window,"mapChanged",this.mapChanged),this.listenOn(window,"layerSelectionChange",this._layerSelectionChange)}static{this.properties={basemapConfig:0,enabledLayerIds:0,enableLegend:5,enableLayerList:5,enableFloorFilter:5,enableFullscreen:5,enableSearch:5,enableBasemap:5,enableHome:5,enableSingleExpand:5,zoomToolsSize:1,layout:1,mapView:0,mapWidgetsSize:1,enableMapPicker:5,enableMapLayerPicker:5,position:1,searchConfiguration:0,stackTools:5,enableSelectionTool:5,toolOrder:0,selectionTools:0,selectedLayer:0,mapInfos:0,defaultLayerId:1,isMobile:5,parentComponentHeight:9,parentComponentWidth:9,selectedFeaturesIds:0,selectedWebMapId:1,showOnlyUpdatableLayers:5,mapInfo:0,visibilityIcon:1,_hasFloorInfo:16,_translations:16,_showTools:16,_showBasemapWidget:16,_showFloorFilter:16,_showFullscreen:16,_showLegendWidget:16,_showSearchWidget:16,_showLayersListWidget:16,_rectangleSelectionToolActive:16,_lassoSelectionToolActive:16,_showEllipsisTools:16,_ellipsisTools:16,_isValidWebMap:16,_showSelectionTools:16}}static{this.styles=C}willUpdate(t){t.has("mapView")&&this.mapViewWatchHandler(),t.has("parentComponentWidth")&&this.parentComponentWidth&&this.parentComponentWidthWatchHandler(this.parentComponentWidth),t.has("_showBasemapWidget")&&(this.hasUpdated||this._showBasemapWidget!==!1)&&this._showBasemapWidgetWatchHandler(this._showBasemapWidget),t.has("_showLayersListWidget")&&(this.hasUpdated||this._showLayersListWidget!==!1)&&this._showLayersListWidgetWatchHandler(this._showLayersListWidget),t.has("_showFloorFilter")&&(this.hasUpdated||this._showFloorFilter!==!1)&&this._showFloorFilterWatchHandler(this._showFloorFilter),t.has("_showFullscreen")&&(this.hasUpdated||this._showFullscreen!==!1)&&this._showFullscreenWatchHandler(this._showFullscreen),t.has("_showLegendWidget")&&(this.hasUpdated||this._showLegendWidget!==!1)&&this._showLegendWidgetWatchHandler(this._showLegendWidget),t.has("_showSearchWidget")&&(this.hasUpdated||this._showSearchWidget!==!1)&&this._showSearchWidgetWatchHandler(this._showSearchWidget)}async mapViewWatchHandler(){await this.mapView?.when(()=>{this.enableHome&&this._initHome(),this.parentComponentWidth&&this._updateTools(this.parentComponentWidth)})}async parentComponentWidthWatchHandler(t){this._updateTools(t)}async _showBasemapWidgetWatchHandler(t){let e=this._basemapElement.value?this._basemapElement.value.basemapWidget:void 0,s=document.dir==="rtl"?"rtl":"ltr";e&&(t?(this.mapView?.ui.add(e,{position:this.position,index:1}),e.container?.style.setProperty("direction",s)):this.mapView?.ui.remove(e))}async _showLayersListWidgetWatchHandler(t){let e=this._layerListWidgetElement.value?this._layerListWidgetElement.value.layerListWidget:void 0,s=document.dir==="rtl"?"rtl":"ltr";e&&(t?(this.mapView?.ui.add(e,{position:this.position,index:1}),e.container?.style.setProperty("direction",s)):this.mapView?.ui.remove(e))}async _showFloorFilterWatchHandler(t){let e=this._floorFilterElement.value?this._floorFilterElement.value.floorFilterWidget:void 0,s=document.dir==="rtl"?"rtl":"ltr";e&&(t?(this.mapView?.ui.add(e,{position:this.position,index:1}),e.container?.style.setProperty("direction",s)):this.mapView?.ui.remove(e))}async _showFullscreenWatchHandler(t){let e=this._fullscreenElement.value?this._fullscreenElement.value.fullscreenWidget:void 0;e&&(t?e.viewModel.state==="ready"&&e.viewModel.enter():e.viewModel.state==="active"&&e.viewModel.exit())}async _showLegendWidgetWatchHandler(t){let e=this._legendElement.value?this._legendElement.value.legendWidget:void 0,s=document.dir==="rtl"?"rtl":"ltr";e&&(t?(this.mapView?.ui.add(e,{position:this.position,index:1}),e.container?.style.setProperty("direction",s)):this.mapView?.ui.remove(e))}async _showSearchWidgetWatchHandler(t){let e=this._searchElement.value?this._searchElement.value.searchWidget:void 0,s=document.dir==="rtl"?"rtl":"ltr";e&&(t?(this.mapView?.ui.add(e,{position:this.position,index:1}),e.container?.style.setProperty("direction",s)):this.mapView?.ui.remove(e))}async mapChanged(t){let e=t.detail.isValid;this._isValidWebMap=e,this._showTools||this._toggleTools()}async _layerSelectionChange(t){this._showTools||this._toggleTools()}async load(){this._mapTools=[...this.toolOrder]}render(){this._setZoomToolsSize();let t=this.layout==="horizontal"?"display-flex":"",e=this._getToggleIcon(),s=!this._showTools&&!this._showSelectionTools?"display-none":t,o=this._showEllipsisTools?"":"display-none",l=this._showSearchWidget?"":"display-none",i=this._showBasemapWidget?"":"display-none",c=this._showLegendWidget?"":"display-none",d=this._showFloorFilter?"":"display-none",p=this._showFullscreen?"":"display-none",v=this._showLayersListWidget?"":"display-none",f=this._showTools?this._translations.collapse:this._translations.expand,L=!this.enableBasemap&&!this.enableFullscreen&&!this.enableLegend&&!this.enableLayerList&&!this.enableSearch&&!this.enableMapPicker&&!this.enableMapLayerPicker?"display-none":"",S=document.dir==="rtl"?"margin-right-1-2":"margin-left-1-2",F=this.enableSingleExpand?this.layout==="horizontal"?S:"margin-top-1-2":"",$=this._ellipsisTools.length>0&&this._showTools?"":"display-none",w=this.stackTools&&this._ellipsisTools.length===0?"box-shadow":"",E=this._showSelectionTools?this.selectionTools:this._mapTools;return r`<div class=${`${L} ${t}`}>${this.enableSingleExpand?r`<div class=${a(w)}>${this._getActionGroup(e,!1,f||"",()=>this._toggleTools())}</div>`:void 0}<div class=${`${F} ${w} ${s}`}>${this._getMapWidgets(E)}</div><div><div class=${a($)}>${this._getActionGroup("ellipsis",!1,"",()=>this._toggleEllipsisTools())}<div class=${a(o)}>${this._getMapWidgets(this._ellipsisTools)}</div></div></div></div><map-basemap-gallery .basemapConfig=${this.basemapConfig} class=${a(i)} .mapView=${this.mapView} ${n(this._basemapElement)}></map-basemap-gallery><map-search class=${a(l)} .mapView=${this.mapView} result-graphic-enabled .searchConfiguration=${this.searchConfiguration} ${n(this._searchElement)}></map-search><map-legend class=${a(c)} .mapView=${this.mapView} ${n(this._legendElement)}></map-legend><map-fullscreen class=${a(p)} .mapView=${this.mapView} @fullscreenStateChange=${g=>this._fullscreenStateChange(g.detail)} ${n(this._fullscreenElement)}></map-fullscreen><layer-list-widget class=${a(v)} .mapView=${this.mapView} @fullscreenStateChange=${g=>this._fullscreenStateChange(g.detail)} .visibilityIcon=${this.visibilityIcon} ${n(this._layerListWidgetElement)}></layer-list-widget><map-floor-filter class=${a(d)} .enabled=${this.enableFloorFilter} .mapView=${this.mapView} ${n(this._floorFilterElement)}></map-floor-filter><selection-tool .mapView=${this.mapView} @drawingComplete=${()=>{this._rectangleSelectionToolActive=!1,this._lassoSelectionToolActive=!1}} .selectedLayerId=${this.selectedLayer?.id} ${n(this._selectionToolElement)}></selection-tool>${this.enableMapPicker&&r`<map-picker class=mapPickerClass .height=${(this.parentComponentHeight??0)-25} id=map-picker .mapInfos=${this.mapInfos} reference-element=map .selectedWebMapId=${this.selectedWebMapId} show-map-list-in-popover></map-picker>`||""}${this.enableMapLayerPicker&&this.selectedLayer&&r`<map-layer-picker appearance=transparent .defaultLayerId=${this.defaultLayerId} .enabledLayerIds=${this.enabledLayerIds} .height=${(this.parentComponentHeight??0)-25} .isMobile=${this.isMobile} .mapView=${this.mapView} .showOnlyUpdatableLayers=${this.showOnlyUpdatableLayers} reference-element=layers scale=s .selectedIds=${this.selectedLayer?[this.selectedLayer.id]:[]} show-layers-list-in-popover show-tables type=dropdown></map-layer-picker>`||""}`}_initHome(){this.enableHome&&(this._homeWidget=new V({view:this.mapView}))}_setZoomToolsSize(){let t=document.getElementsByClassName("esri-zoom")[0]?.children[0],e=document.getElementsByClassName("esri-zoom")[0]?.children[1];if(t&&e){let s=this.zoomToolsSize==="s"?"32px":this.zoomToolsSize==="m"?"40px":"48px";t.style.width=s,t.style.height=s,e.style.width=s,e.style.height=s}if(this.layout==="horizontal"){let s=document.dir||"ltr",o=s==="ltr"?"esri-ui-top-left":"esri-ui-top-right",l=s==="ltr"?0:this.parentComponentWidth-62,i=s==="ltr"?this._showTools?"ltr":"rtl":this._showTools?"rtl":"ltr";document.getElementsByClassName(o)[0]?.firstElementChild?.tagName==="MAP-TOOLS"&&!this._showTools&&(i=s),document.getElementsByClassName("esri-zoom")[0]?.setAttribute("style",`position: absolute; top: 50px; left: ${l}px`),this._showSelectionTools||document.getElementsByClassName(o)[0]?.setAttribute("style",`flex-direction: row; gap: 5px; align-items: flex-start; direction: ${i} !important; z-index: 1;`)}}_getToggleIcon(){let t=document.dir||"ltr";return this.layout==="horizontal"?t==="ltr"?this._showTools?"chevrons-left":"chevrons-right":this._showTools?"chevrons-right":"chevrons-left":this._showTools?"chevrons-up":"chevrons-down"}_updateTools(t){let e=this._showSelectionTools?JSON.parse(JSON.stringify(this.selectionTools)):JSON.parse(JSON.stringify(this.toolOrder));this._hasFloorInfo=this.mapView?.map?.floorInfo;let s=e.indexOf("floorfilter");s>-1&&!this._hasFloorInfo&&e.splice(s,1);let o=40,l=110;this.isMobile&&(this.enableMapPicker||this.enableMapLayerPicker)&&(l=160);let i=Math.ceil((t-l)/o)-1;i&&i!==e.length-1?(this._mapTools=e.slice(0,i),this._ellipsisTools=e.slice(i,e.length)):(this._mapTools=e,this._ellipsisTools=[])}_getMapWidgets(t){let e=this._showFullscreen?"full-screen-exit":"full-screen",s=this._showFullscreen?this._translations.exitFullscreen:this._translations.enterFullscreen,o=this._isValidWebMap?"map":"exclamation-mark-triangle",l=this.selectedLayer===void 0?"exclamation-mark-triangle":"layers";return t.map(i=>{switch(i){case"legend":return this.enableLegend&&this.enableSingleExpand?this._getActionGroup("legend",!1,this._translations.legend,()=>this._showLegend()):this.enableLegend?this._getWidget(i,this._legendElement.value?.legendWidget,!0):void 0;case"search":return this.enableSearch&&this.enableSingleExpand?this._getActionGroup("magnifying-glass",!1,this._translations.search,()=>this._search()):this.enableSearch?this._getWidget(i,this._searchElement.value?.searchWidget,!0):void 0;case"fullscreen":return this.enableFullscreen&&this.enableSingleExpand?this._getActionGroup(e,!1,s||"",()=>this._expand()):this.enableFullscreen?this._getWidget(i,this._fullscreenElement.value?.fullscreenWidget,!1):void 0;case"basemap":return this.enableBasemap&&this.enableSingleExpand?this._getActionGroup("basemap",!1,this._translations.basemap,()=>this._toggleBasemapPicker()):this.enableBasemap?this._getWidget(i,this._basemapElement.value?.basemapWidget,!0):void 0;case"layers-list":return this.enableLayerList&&this.enableSingleExpand?this._getActionGroup("layers",!1,this._translations.layers||"",()=>this._toggleLayerListWidget()):this.enableLayerList?this._getWidget(i,this._layerListWidgetElement.value?.layerListWidget,!0):void 0;case"floorfilter":return this.enableFloorFilter&&this._hasFloorInfo&&this.enableSingleExpand?this._getActionGroup("urban-model",!1,this._translations.floorFilter,()=>this._toggleFloorFilter()):this.enableFloorFilter&&this._hasFloorInfo?this._getWidget(i,this._floorFilterElement.value?.floorFilterWidget,!0):void 0;case"selectiontool":return this.enableSelectionTool&&this.selectedLayer?this._getActionGroup("cursor-selection",!1,this._translations.selectionTools,this._onSelectionToolClick,!1):void 0;case"rectangle-select":return this.enableSelectionTool&&this.selectedLayer?this._getActionGroup("cursor-marquee",!1,this._translations.selectByRectangle,()=>this._toggleSelectionTool("rectangle"),!1,this._rectangleSelectionToolActive):void 0;case"lasso-select":return this.enableSelectionTool&&this.selectedLayer?this._getActionGroup("lasso-select",!1,this._translations.selectByLasso,()=>this._toggleSelectionTool("freehandPolygon"),!1,this._lassoSelectionToolActive):void 0;case"clear-selection":return this.selectedLayer&&this.selectedFeaturesIds.length>0?this._getActionGroup("erase",!1,this._translations.clearSelection,()=>this.clearSelection.emit()):void 0;case"home":return this.enableHome?this._getActionGroup("home",!1,this._translations.defaultMapView,()=>this._homeWidget?.go()):void 0;case"map-picker":return this.enableMapPicker?this._getActionGroup(o,!1,"",()=>{},!this._isValidWebMap):void 0;case"map-layer-picker":return this.enableMapLayerPicker&&this._isValidWebMap?this._getActionGroup(l,!1,"",()=>{},this.selectedLayer===void 0):void 0;default:return""}})}_fullscreenStateChange(t){t==="ready"&&this._showFullscreen?this._showFullscreen=!1:t==="active"&&!this._showFullscreen&&(this._showFullscreen=!0)}_getActionGroup(t,e,s,o,l,i){let c=this.mapWidgetsSize==="s"?"square-32":this.mapWidgetsSize==="m"?"square-40":"square-48",d=this.stackTools?"":"margin-bottom-1-2",p=this.stackTools?"":"box-shadow";return r`<div><calcite-action alignment=center appearance=solid .indicator=${i} class=${`map-actions ${c} ${d} border-bottom ${p} ${l?"danger-icon-color":""}`} .disabled=${e} .icon=${t} id=${t??_} @click=${o} scale=s text ${n(this._mapTool)}><calcite-icon icon=chevron-up scale=s slot=icon></calcite-icon></calcite-action>${!this.isMobile&&s&&r`<calcite-tooltip .placement=${this.layout==="vertical"?"auto":"bottom"} reference-element=${t??_}><span>${s}</span></calcite-tooltip>`||""}</div>`}_getWidget(t,e,s){if(this._widgets.indexOf(t)<0&&this.mapView&&e){let o=this.toolOrder.indexOf(t),l=new x({view:this.mapView,content:e}),i=this.enableHome?2:1;this.mapView.ui.add(s?l:e,{position:this.position,index:o>-1?o+i:1}),this._widgets.push(t)}}_showLegend(){this._showLegendWidget=!this._showLegendWidget,this._showTools=!1,this._toggleEllipsisTools()}_search(){this._showSearchWidget=!this._showSearchWidget,this._showTools=!1,this._toggleEllipsisTools()}_toggleBasemapPicker(){this._showBasemapWidget=!this._showBasemapWidget,this._showTools=!1,this._toggleEllipsisTools()}_toggleLayerListWidget(){this._showLayersListWidget=!this._showLayersListWidget,this._showTools=!1,this._toggleEllipsisTools()}_toggleFloorFilter(){this._showFloorFilter=!this._showFloorFilter,this._showTools=!1,this._toggleEllipsisTools()}_onSelectionToolClick(){this._showSelectionTools=!this._showSelectionTools,this._showTools=!1,this._toggleEllipsisTools()}_toggleSelectionTool(t){t==="rectangle"?(this._lassoSelectionToolActive=!1,this._rectangleSelectionToolActive=!this._rectangleSelectionToolActive):t==="freehandPolygon"&&(this._rectangleSelectionToolActive=!1,this._lassoSelectionToolActive=!this._lassoSelectionToolActive),this._selectionToolElement.value?.toggleSelectionTool(t,this._rectangleSelectionToolActive||this._lassoSelectionToolActive)}_expand(){this._showFullscreen=!this._showFullscreen}_toggleTools(){this._showTools||(this._showSelectionTools=!1,this._showBasemapWidget=!1,this._showLayersListWidget=!1,this._showSearchWidget=!1,this._showLegendWidget=!1,this._showFloorFilter=!1),this._rectangleSelectionToolActive?this._toggleSelectionTool("rectangle"):this._lassoSelectionToolActive&&this._toggleSelectionTool("freehandPolygon"),this._showTools=!this._showTools,this._toggleEllipsisTools(),this._updateTools(this.parentComponentWidth)}_toggleEllipsisTools(){this._showEllipsisTools=!this._showEllipsisTools}};T("map-tools",m);return m},"widgets/Expand","widgets/Home")
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{a as E}from"./6MZ227J7.js";import a from"./O24ZIQLV.js";import{b as g}from"./PZ4L77M5.js";import{a as C}from"./M5MQY5WC.js";import{b as A}from"./HW7HHHMK.js";import{H as S,J as b,h as N,i as c,r as u}from"./46DQNAMV.js";export default $arcgis.t(([{D:y,E:R,K:f,a:I,b:v,t:_}])=>{var T=N`.width-full{width:100%}calcite-panel{--calcite-panel-background-color: var(--calcite-color-foreground-1);--calcite-panel-footer-space: var(--calcite-spacing-sm)}.border-color{--calcite-block-border-color: transparent}calcite-block{margin:0;--calcite-block-content-space: 0}.tree-padding{padding:0 .2rem}.display-none{display:none}`,O={PUBLICSAFETY:["EMERGENCYMANAGEMENT","FIRESERVICE","LAWENFORCEMENT"],STATEANDLOCALGOVERNMENT:["AGRICULTURE","AIRPORT","ASSESSMENTANDTAXATION","ELECTIONS","EMERGENCYMANAGEMENT","FIRESERVICE","FISHANDWILDLIFE","HEALTHANDHUMANSERVICES","LAWENFORCEMENT","NATURALRESOURCES","PARKS","PLANNINGANDDEVELOPMENT","PUBLICWORKS","TRANSPORTATION"],UTILITIES:["DISTRICTENERGY","ELECTRIC","GAS","SEWER","STORMWATER","WATER"]},$=Object.keys(y).reduce((p,t)=>{let e=t;return p[e]=O[e]??[],p},{}),F=class extends S{constructor(){super(),this.hideIndustryFilter=!1,this.isAIDialogOpen=!1,this.showReset=!1,this._activeFilterSettings={categories:[]},this._isMobile=!1,this._translations=C({name:"solutions-filter-panel",blocking:!0}),this._userFirstName="",this._configContextConsumer=g({context:v,subscribe:!0,callback:t=>{t?.userSession&&!this._userFirstName&&this._loadUserFirstName()}}),this._isMobileContextConsumer=g({context:I,subscribe:!0,callback:t=>this._isMobile=t}),this.applyFilter=u(),this.toggleFilter=u(),this.updateUrlParams=u(),this._handleFilterRemoved=t=>{let e=t.detail;Array.isArray(e)&&(this._activeFilterSettings={...this._activeFilterSettings,categories:[...e]})},this._industryMatchName=t=>{let e=Object.keys(this._translations.industries).find(o=>o.toUpperCase()===t.replaceAll(" ","").toUpperCase());return e&&e in this._translations.industries?this._translations.industries[e]:t},this._domainMatchName=t=>{let e=Object.keys(this._translations.industriesDomain).find(o=>o.toUpperCase()===t.replaceAll(" ","").toUpperCase());return e&&e in this._translations.industriesDomain?this._translations.industriesDomain[e]:t},this.listenOn(window,"filterRemoved",this._handleFilterRemoved),this.listenOn(window,"closeAssistant",()=>{this.isAIDialogOpen=!1}),this.listenOn(window,"openAssistant",()=>{this.isAIDialogOpen=!0}),this.listenOn(window,"tabChanged",t=>{t.detail==="all-solutions"?this.updateUrlParams.emit(this._activeFilterSettings):this.updateUrlParams.emit(null)})}static{this.properties={hideIndustryFilter:5,isAIDialogOpen:5,showReset:5,_activeFilterSettings:16,_isMobile:16,_translations:16,_userFirstName:16}}static{this.styles=T}get _isEnterprise(){return this._configContextConsumer.value?.isEnterprise}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}changeIndustryFilter(t,e,o,h){if(t!==""||e!==""){let n=[];if(e!==""){let i=y[t],a=this._industryMatchName(i),s=R[e],r=this._domainMatchName(s);n=[{displayValue:a,type:"industry",value:t,industry:t,domain:""},{displayValue:r,type:"domain",value:e,industry:t,domain:e}]}else n=[{displayValue:o,type:e!==""?"domain":"industry",value:e!==""?e:t,industry:t,domain:e}];this._activeFilterSettings={...this._activeFilterSettings,categories:[...n]},h&&this.applyFilter.emit(n)}else{let n={displayValue:o,type:"industry",value:t,industry:t,domain:e};this._activeFilterSettings={...this._activeFilterSettings,categories:[n]},h&&this.applyFilter.emit(n)}}clearFilters(){this.changeIndustryFilter("","",""),this.applyFilter.emit(null)}async load(){await this._loadUserFirstName(),this._isMobileContextConsumer.value&&(this._isMobile=this._isMobileContextConsumer.value)}render(){return c`<calcite-panel description heading>${this.showReset&&c`<calcite-action appearance=solid icon=reset @click=${()=>{this.clearFilters()}} slot=header-actions-end .text=${this._translations.resetFilters} text-enabled></calcite-action>`||""}<calcite-block-group .label=${this._translations.filters} scale=l>${!this.hideIndustryFilter&&this.renderIndustryBlock()||""}</calcite-block-group>${!this._isEnterprise&&c`<calcite-button id=solutions-assistant-button icon-start=speech-bubbles label="Solutions Assistant" @click=${()=>{this._telemetry?.logEvent({category:f.ASSISTANT,action:"Open"}),this.isAIDialogOpen=!0}} round scale=l slot=footer-start></calcite-button><calcite-tooltip reference-element=solutions-assistant-button placement=right slot=footer-start offset-distance=10 open><span>${this._translations.assistant.welcomeTip}</span></calcite-tooltip><arcgis-solutions-assistant .open=${this.isAIDialogOpen} .userFirstName=${this._userFirstName}></arcgis-solutions-assistant>`||""}</calcite-panel>`}renderIndustryBlock(){let t=(i,a)=>!this._activeFilterSettings||!this._activeFilterSettings.categories?!1:this._activeFilterSettings.categories.some(s=>s.industry===i&&(s.domain??"")===a),e=i=>!this._activeFilterSettings||!this._activeFilterSettings.categories?!1:this._activeFilterSettings.categories.some(a=>a.industry===i&&(a.domain??"")===""),o=(i,a)=>a.length>0&&(e(i)||this._activeFilterSettings.categories?.some(s=>s.industry===i&&!!s.domain&&a.includes(s.domain))===!0),h=(i,a)=>E(a,s=>s,s=>{let r=Object.keys(this._translations.industriesDomain).find(l=>l.toUpperCase()===s.toUpperCase()),d=r&&r in this._translations.industriesDomain?this._translations.industriesDomain[r]:s,m=t(i,s);return c`<calcite-tree-item .label=${d} @click=${l=>{l.detail!==0&&this.changeIndustryFilter(i,s,d,!0)}} @keydown=${l=>{_(l,()=>{this.changeIndustryFilter(i,s,d,!0)})}} .selected=${m||void 0}>${d}</calcite-tree-item>`}),n=E(Object.entries($),([i,a])=>i,([i,a])=>{let s=this._industryMatchName(i),r=a,d=e(i),m=o(i,r);return c`<calcite-tree-item .label=${s} @click=${l=>{l.detail!==0&&this.changeIndustryFilter(i,"",s,!0)}} @keydown=${l=>{_(l,()=>{this.changeIndustryFilter(i,"",s,!0)})}} .selected=${d||void 0} .expanded=${m?!0:void 0}>${s}${r.length>0&&c`<calcite-tree slot=children selection-mode=multiple>${h(i,r)}</calcite-tree>`||""}</calcite-tree-item>`});return c`<calcite-block description expanded class="border-color" .heading=${this._translations.industriesHeader} .label=${this._translations.industriesHeader}><calcite-action class=${b(this._isMobile?"":"display-none")} icon=x @click=${this._toggleFilter} slot=content-end text></calcite-action><calcite-tree selection-mode=single-persist class="tree-padding">${n}</calcite-tree></calcite-block>`}_toggleFilter(){this.toggleFilter.emit()}async _loadUserFirstName(){try{let t=await this._configContextConsumer.value?.userSession?.getUser();if(t?.fullName){let e=t.fullName.split(" ")[0];this._userFirstName=e}}catch{}}};A("solutions-filter-panel",F);return F},a)
2
+ import{a as E}from"./6MZ227J7.js";import a from"./5QSIKX2L.js";import{b as g}from"./PZ4L77M5.js";import{a as C}from"./DV233ITZ.js";import{b as A}from"./EIQZRLWQ.js";import{H as S,J as b,h as N,i as c,r as u}from"./46DQNAMV.js";export default $arcgis.t(([{D:y,E:R,K:f,a:I,b:v,t:_}])=>{var T=N`.width-full{width:100%}calcite-panel{--calcite-panel-background-color: var(--calcite-color-foreground-1);--calcite-panel-footer-space: var(--calcite-spacing-sm)}.border-color{--calcite-block-border-color: transparent}calcite-block{margin:0;--calcite-block-content-space: 0}.tree-padding{padding:0 .2rem}.display-none{display:none}`,O={PUBLICSAFETY:["EMERGENCYMANAGEMENT","FIRESERVICE","LAWENFORCEMENT"],STATEANDLOCALGOVERNMENT:["AGRICULTURE","AIRPORT","ASSESSMENTANDTAXATION","ELECTIONS","EMERGENCYMANAGEMENT","FIRESERVICE","FISHANDWILDLIFE","HEALTHANDHUMANSERVICES","LAWENFORCEMENT","NATURALRESOURCES","PARKS","PLANNINGANDDEVELOPMENT","PUBLICWORKS","TRANSPORTATION"],UTILITIES:["DISTRICTENERGY","ELECTRIC","GAS","SEWER","STORMWATER","WATER"]},$=Object.keys(y).reduce((p,t)=>{let e=t;return p[e]=O[e]??[],p},{}),F=class extends S{constructor(){super(),this.hideIndustryFilter=!1,this.isAIDialogOpen=!1,this.showReset=!1,this._activeFilterSettings={categories:[]},this._isMobile=!1,this._translations=C({name:"solutions-filter-panel",blocking:!0}),this._userFirstName="",this._configContextConsumer=g({context:v,subscribe:!0,callback:t=>{t?.userSession&&!this._userFirstName&&this._loadUserFirstName()}}),this._isMobileContextConsumer=g({context:I,subscribe:!0,callback:t=>this._isMobile=t}),this.applyFilter=u(),this.toggleFilter=u(),this.updateUrlParams=u(),this._handleFilterRemoved=t=>{let e=t.detail;Array.isArray(e)&&(this._activeFilterSettings={...this._activeFilterSettings,categories:[...e]})},this._industryMatchName=t=>{let e=Object.keys(this._translations.industries).find(o=>o.toUpperCase()===t.replaceAll(" ","").toUpperCase());return e&&e in this._translations.industries?this._translations.industries[e]:t},this._domainMatchName=t=>{let e=Object.keys(this._translations.industriesDomain).find(o=>o.toUpperCase()===t.replaceAll(" ","").toUpperCase());return e&&e in this._translations.industriesDomain?this._translations.industriesDomain[e]:t},this.listenOn(window,"filterRemoved",this._handleFilterRemoved),this.listenOn(window,"closeAssistant",()=>{this.isAIDialogOpen=!1}),this.listenOn(window,"openAssistant",()=>{this.isAIDialogOpen=!0}),this.listenOn(window,"tabChanged",t=>{t.detail==="all-solutions"?this.updateUrlParams.emit(this._activeFilterSettings):this.updateUrlParams.emit(null)})}static{this.properties={hideIndustryFilter:5,isAIDialogOpen:5,showReset:5,_activeFilterSettings:16,_isMobile:16,_translations:16,_userFirstName:16}}static{this.styles=T}get _isEnterprise(){return this._configContextConsumer.value?.isEnterprise}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}changeIndustryFilter(t,e,o,h){if(t!==""||e!==""){let n=[];if(e!==""){let i=y[t],a=this._industryMatchName(i),s=R[e],r=this._domainMatchName(s);n=[{displayValue:a,type:"industry",value:t,industry:t,domain:""},{displayValue:r,type:"domain",value:e,industry:t,domain:e}]}else n=[{displayValue:o,type:e!==""?"domain":"industry",value:e!==""?e:t,industry:t,domain:e}];this._activeFilterSettings={...this._activeFilterSettings,categories:[...n]},h&&this.applyFilter.emit(n)}else{let n={displayValue:o,type:"industry",value:t,industry:t,domain:e};this._activeFilterSettings={...this._activeFilterSettings,categories:[n]},h&&this.applyFilter.emit(n)}}clearFilters(){this.changeIndustryFilter("","",""),this.applyFilter.emit(null)}async load(){await this._loadUserFirstName(),this._isMobileContextConsumer.value&&(this._isMobile=this._isMobileContextConsumer.value)}render(){return c`<calcite-panel description heading>${this.showReset&&c`<calcite-action appearance=solid icon=reset @click=${()=>{this.clearFilters()}} slot=header-actions-end .text=${this._translations.resetFilters} text-enabled></calcite-action>`||""}<calcite-block-group .label=${this._translations.filters} scale=l>${!this.hideIndustryFilter&&this.renderIndustryBlock()||""}</calcite-block-group>${!this._isEnterprise&&c`<calcite-button id=solutions-assistant-button icon-start=speech-bubbles label="Solutions Assistant" @click=${()=>{this._telemetry?.logEvent({category:f.ASSISTANT,action:"Open"}),this.isAIDialogOpen=!0}} round scale=l slot=footer-start></calcite-button><calcite-tooltip reference-element=solutions-assistant-button placement=right slot=footer-start offset-distance=10 open><span>${this._translations.assistant.welcomeTip}</span></calcite-tooltip><arcgis-solutions-assistant .open=${this.isAIDialogOpen} .userFirstName=${this._userFirstName}></arcgis-solutions-assistant>`||""}</calcite-panel>`}renderIndustryBlock(){let t=(i,a)=>!this._activeFilterSettings||!this._activeFilterSettings.categories?!1:this._activeFilterSettings.categories.some(s=>s.industry===i&&(s.domain??"")===a),e=i=>!this._activeFilterSettings||!this._activeFilterSettings.categories?!1:this._activeFilterSettings.categories.some(a=>a.industry===i&&(a.domain??"")===""),o=(i,a)=>a.length>0&&(e(i)||this._activeFilterSettings.categories?.some(s=>s.industry===i&&!!s.domain&&a.includes(s.domain))===!0),h=(i,a)=>E(a,s=>s,s=>{let r=Object.keys(this._translations.industriesDomain).find(l=>l.toUpperCase()===s.toUpperCase()),d=r&&r in this._translations.industriesDomain?this._translations.industriesDomain[r]:s,m=t(i,s);return c`<calcite-tree-item .label=${d} @click=${l=>{l.detail!==0&&this.changeIndustryFilter(i,s,d,!0)}} @keydown=${l=>{_(l,()=>{this.changeIndustryFilter(i,s,d,!0)})}} .selected=${m||void 0}>${d}</calcite-tree-item>`}),n=E(Object.entries($),([i,a])=>i,([i,a])=>{let s=this._industryMatchName(i),r=a,d=e(i),m=o(i,r);return c`<calcite-tree-item .label=${s} @click=${l=>{l.detail!==0&&this.changeIndustryFilter(i,"",s,!0)}} @keydown=${l=>{_(l,()=>{this.changeIndustryFilter(i,"",s,!0)})}} .selected=${d||void 0} .expanded=${m?!0:void 0}>${s}${r.length>0&&c`<calcite-tree slot=children selection-mode=multiple>${h(i,r)}</calcite-tree>`||""}</calcite-tree-item>`});return c`<calcite-block description expanded class="border-color" .heading=${this._translations.industriesHeader} .label=${this._translations.industriesHeader}><calcite-action class=${b(this._isMobile?"":"display-none")} icon=x @click=${this._toggleFilter} slot=content-end text></calcite-action><calcite-tree selection-mode=single-persist class="tree-padding">${n}</calcite-tree></calcite-block>`}_toggleFilter(){this.toggleFilter.emit()}async _loadUserFirstName(){try{let t=await this._configContextConsumer.value?.userSession?.getUser();if(t?.fullName){let e=t.fullName.split(" ")[0];this._userFirstName=e}}catch{}}};A("solutions-filter-panel",F);return F},a)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import a from"./MPJ5N4H3.js";export default $arcgis.t(([a,u,{g:i}])=>{var c=class{async getPopupTitle(o,f){let s={};for(let[e,r]of Object.entries(o.attributes))s={...s,[`{${e.toUpperCase()}}`]:r};let p=o.layer,l=this._removeTags(p?.popupTemplate?.title);if(l.includes("{expression/expr")&&p?.popupTemplate?.expressionInfos!=null)for(let e=0;e<p.popupTemplate?.expressionInfos.length;e++){let r=p.popupTemplate.expressionInfos[e],n=a.createArcadeProfile("popup");try{let t=await(await a.createArcadeExecutor(r.expression,n)).executeAsync({$feature:o,$layer:p,$map:f});(t!==null||t!=="")&&(s[`{expression/${r.name}}`.toUpperCase()]=t)}catch(t){console.error(t);continue}}return p.popupTemplate?.fieldInfos&&p.fields.forEach(e=>{let r=o.attributes[e.name],n=(p?.popupTemplate?.fieldInfos||[]).find(m=>m.fieldName.toLowerCase()===e.name.toLowerCase()),t=i(r,e.type,e?.domain,n?.format,u);s[`{${e.name.toUpperCase()}}`]=t??r}),l?.replace(/{.*?}/g,e=>s[e.toUpperCase()]!=null?s[e.toUpperCase()]:"")}_removeTags(o){return o==null||o===""?"":o.toString().replace(/(<([^>]+)>)/gi,"")}};return c},"arcade","intl",a)
2
+ import a from"./RYRVUHB7.js";export default $arcgis.t(([a,u,{g:i}])=>{var c=class{async getPopupTitle(o,f){let s={};for(let[e,r]of Object.entries(o.attributes))s={...s,[`{${e.toUpperCase()}}`]:r};let p=o.layer,l=this._removeTags(p?.popupTemplate?.title);if(l.includes("{expression/expr")&&p?.popupTemplate?.expressionInfos!=null)for(let e=0;e<p.popupTemplate?.expressionInfos.length;e++){let r=p.popupTemplate.expressionInfos[e],n=a.createArcadeProfile("popup");try{let t=await(await a.createArcadeExecutor(r.expression,n)).executeAsync({$feature:o,$layer:p,$map:f});(t!==null||t!=="")&&(s[`{expression/${r.name}}`.toUpperCase()]=t)}catch(t){console.error(t);continue}}return p.popupTemplate?.fieldInfos&&p.fields.forEach(e=>{let r=o.attributes[e.name],n=(p?.popupTemplate?.fieldInfos||[]).find(m=>m.fieldName.toLowerCase()===e.name.toLowerCase()),t=i(r,e.type,e?.domain,n?.format,u);s[`{${e.name.toUpperCase()}}`]=t??r}),l?.replace(/{.*?}/g,e=>s[e.toUpperCase()]!=null?s[e.toUpperCase()]:"")}_removeTags(o){return o==null||o===""?"":o.toString().replace(/(<([^>]+)>)/gi,"")}};return c},"arcade","intl",a)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{a as h}from"./4T7P5RXF.js";import{a as d}from"./M5MQY5WC.js";import{b as r}from"./HW7HHHMK.js";import{F as i,G as l,H as c,h as n,i as s,r as a}from"./46DQNAMV.js";var g=n`*[tabindex]:focus-visible{outline:2px solid var(--calcite-color-brand);outline-offset:2px}.panel-bg-white{--calcite-panel-background-color: var(--calcite-color-foreground-1)}calcite-loader{--calcite-loader-spacing: var(--calcite-spacing-md)}.loader-text{margin-top:var(--calcite-spacing-sm);margin-bottom:var(--calcite-spacing-xxxl);text-align:center;font-size:var(--calcite-font-size-relative-base);color:var(--calcite-color-text-1)}.carousel-style{height:120px;display:flex;align-items:center}`,o=class extends c{constructor(){super(),this.deploymentProgress=0,this.open=!1,this.isWaitingForCard=!1,this._isInCancelConfirmation=!1,this._showCancelConfirmation=!1,this._showIsCancelling=!1,this._translations=d({name:"solution-deploying-dialog",blocking:!0}),this._carouselKey=0,this._deployingDialogRef=i(),this._carouselRef=i(),this._carouselMessages=[],this._confirmUnload=!1,this.deployingDialogOpened=a(),this.deploymentProcessCancelled=a(),this.listenOn(window,"beforeunload",e=>{(this._confirmUnload||this._showIsCancelling)&&(e.preventDefault(),e.returnValue=!0)})}static{this.properties={abortController:0,card:0,deploymentProgress:9,open:5,isWaitingForCard:5,_isInCancelConfirmation:16,_showCancelConfirmation:16,_showIsCancelling:16,_translations:16,_carouselKey:16}}static{this.styles=g}close(){this._showCancelConfirmation=!1,this._showIsCancelling=!1,this.isWaitingForCard=!1;let e=this._deployingDialogRef.value;e&&(e.open=!1),this.open=!1}confirmCancel(){let e=this._deployingDialogRef.value;e&&(e.open=!0,e.closeDisabled=!0,this._isInCancelConfirmation=!0,this._showIsCancelling=!1),this._showCancelConfirmation=!0}cancelDeployment(){this._isInCancelConfirmation&&this.abortController&&(this.deploymentProcessCancelled.emit(),this.abortController.abort(),this._showIsCancelling=!0,this._showCancelConfirmation=!1)}async load(){}render(){return s`<calcite-dialog close-disabled .heading=${this._translations.title.replace("{{solution}}",this.card?.title??"")} escape-disabled modal width=m .open=${this.open} @calciteDialogBeforeClose=${e=>{e.preventDefault(),this._confirmUnload=!1}} @calciteDialogOpen=${()=>this._onDialogOpen()} outside-close-disabled ${l(this._deployingDialogRef)}>${this._showCancelConfirmation?this.renderCancelModal():this._showIsCancelling?this.renderCancellingModal():s`<calcite-panel class="panel-bg-white">${this.isWaitingForCard?s`<calcite-loader .label=${this._translations.deploymentInProgress} scale=l type=indeterminate></calcite-loader><div class="loader-text" tabindex=0>${this._translations.deploymentInProgress}</div>`:s`<calcite-loader .label=${this._translations.deploymentInProgress} scale=l type=determinate-value .value=${this.deploymentProgress}></calcite-loader><div class="loader-text" tabindex=0>${this._translations.deploymentInProgress}</div>`}<div class="carousel-style">${h(this._carouselKey,s`<calcite-carousel .label=${this._translations.newsAndFeatures} arrow-type=inline ${l(this._carouselRef)}>${this.renderCarouselItems()}</calcite-carousel>`)}</div></calcite-panel>`}${!this._showCancelConfirmation&&!this._showIsCancelling&&s`<calcite-button appearance=outline @click=${this.confirmCancel} slot=footer-end>${this._translations.cancel}</calcite-button>`||""}${this._showCancelConfirmation&&s`<calcite-button kind=brand @click=${()=>{this._isInCancelConfirmation=!1,this._showCancelConfirmation=!1}} slot=footer-end>${this._translations.continueDeployment}</calcite-button><calcite-button appearance=outline @click=${this.cancelDeployment} slot=footer-end>${this._translations.cancelDeploymentButton}</calcite-button>`||""}</calcite-dialog>`}renderCarouselItems(){let e=[];return this._carouselMessages.forEach((t,p)=>{e.push(s`<calcite-carousel-item .label=${`carousel-item-${p}`}><calcite-label layout=inline scale=m>${t.icon&&s`<calcite-icon .icon=${t.icon} class="padding-end-0-5"></calcite-icon>`||""}<span .innerHTML=${this._processCarouselMessage(t)??""} tabindex=0></span></calcite-label></calcite-carousel-item>`)}),e}_getCarouselMessages(){let e=this._translations.carousel,t=[{message:e.stockMessage1,icon:"question"},{message:e.stockMessage2,icon:"model"},{message:e.stockMessage3,icon:"lightbulb"},{message:e.stockMessage4,icon:"information"},{message:e.stockMessage5,icon:"speech-bubbles"},{message:e.stockMessage6,icon:"information"}];return t.sort(()=>Math.random()-.5),t}_processCarouselMessage(e){let t=e.message||"";return t.includes("{{url}}")&&e.url&&(t=t.replace("{{url}}",e.url)),t}renderCancelModal(){return s`<calcite-panel class="panel-bg-white"><div tabindex=0>${this._translations.deploymentCancelMessage}</div></calcite-panel>`}renderCancellingModal(){return s`<calcite-panel class="panel-bg-white"><calcite-loader .label=${this._translations.cancelCurrentDeployment}></calcite-loader><div class="loader-text" tabindex=0>${this._translations.cancelCurrentDeployment}</div></calcite-panel>`}_onDialogOpen(){this._confirmUnload=!0,this._carouselKey++,this._translations.carousel&&(this._carouselMessages=this._getCarouselMessages()),this.deployingDialogOpened.emit(),setTimeout(()=>{let e=this._carouselRef.value;e&&e.play()},100)}};r("solution-deploying-dialog",o);export{o as a};
2
+ import{a as h}from"./4T7P5RXF.js";import{a as d}from"./DV233ITZ.js";import{b as r}from"./EIQZRLWQ.js";import{F as i,G as l,H as c,h as n,i as s,r as a}from"./46DQNAMV.js";var g=n`*[tabindex]:focus-visible{outline:2px solid var(--calcite-color-brand);outline-offset:2px}.panel-bg-white{--calcite-panel-background-color: var(--calcite-color-foreground-1)}calcite-loader{--calcite-loader-spacing: var(--calcite-spacing-md)}.loader-text{margin-top:var(--calcite-spacing-sm);margin-bottom:var(--calcite-spacing-xxxl);text-align:center;font-size:var(--calcite-font-size-relative-base);color:var(--calcite-color-text-1)}.carousel-style{height:120px;display:flex;align-items:center}`,o=class extends c{constructor(){super(),this.deploymentProgress=0,this.open=!1,this.isWaitingForCard=!1,this._isInCancelConfirmation=!1,this._showCancelConfirmation=!1,this._showIsCancelling=!1,this._translations=d({name:"solution-deploying-dialog",blocking:!0}),this._carouselKey=0,this._deployingDialogRef=i(),this._carouselRef=i(),this._carouselMessages=[],this._confirmUnload=!1,this.deployingDialogOpened=a(),this.deploymentProcessCancelled=a(),this.listenOn(window,"beforeunload",e=>{(this._confirmUnload||this._showIsCancelling)&&(e.preventDefault(),e.returnValue=!0)})}static{this.properties={abortController:0,card:0,deploymentProgress:9,open:5,isWaitingForCard:5,_isInCancelConfirmation:16,_showCancelConfirmation:16,_showIsCancelling:16,_translations:16,_carouselKey:16}}static{this.styles=g}close(){this._showCancelConfirmation=!1,this._showIsCancelling=!1,this.isWaitingForCard=!1;let e=this._deployingDialogRef.value;e&&(e.open=!1),this.open=!1}confirmCancel(){let e=this._deployingDialogRef.value;e&&(e.open=!0,e.closeDisabled=!0,this._isInCancelConfirmation=!0,this._showIsCancelling=!1),this._showCancelConfirmation=!0}cancelDeployment(){this._isInCancelConfirmation&&this.abortController&&(this.deploymentProcessCancelled.emit(),this.abortController.abort(),this._showIsCancelling=!0,this._showCancelConfirmation=!1)}async load(){}render(){return s`<calcite-dialog close-disabled .heading=${this._translations.title.replace("{{solution}}",this.card?.title??"")} escape-disabled modal width=m .open=${this.open} @calciteDialogBeforeClose=${e=>{e.preventDefault(),this._confirmUnload=!1}} @calciteDialogOpen=${()=>this._onDialogOpen()} outside-close-disabled ${l(this._deployingDialogRef)}>${this._showCancelConfirmation?this.renderCancelModal():this._showIsCancelling?this.renderCancellingModal():s`<calcite-panel class="panel-bg-white">${this.isWaitingForCard?s`<calcite-loader .label=${this._translations.deploymentInProgress} scale=l type=indeterminate></calcite-loader><div class="loader-text" tabindex=0>${this._translations.deploymentInProgress}</div>`:s`<calcite-loader .label=${this._translations.deploymentInProgress} scale=l type=determinate-value .value=${this.deploymentProgress}></calcite-loader><div class="loader-text" tabindex=0>${this._translations.deploymentInProgress}</div>`}<div class="carousel-style">${h(this._carouselKey,s`<calcite-carousel .label=${this._translations.newsAndFeatures} arrow-type=inline ${l(this._carouselRef)}>${this.renderCarouselItems()}</calcite-carousel>`)}</div></calcite-panel>`}${!this._showCancelConfirmation&&!this._showIsCancelling&&s`<calcite-button appearance=outline @click=${this.confirmCancel} slot=footer-end>${this._translations.cancel}</calcite-button>`||""}${this._showCancelConfirmation&&s`<calcite-button kind=brand @click=${()=>{this._isInCancelConfirmation=!1,this._showCancelConfirmation=!1}} slot=footer-end>${this._translations.continueDeployment}</calcite-button><calcite-button appearance=outline @click=${this.cancelDeployment} slot=footer-end>${this._translations.cancelDeploymentButton}</calcite-button>`||""}</calcite-dialog>`}renderCarouselItems(){let e=[];return this._carouselMessages.forEach((t,p)=>{e.push(s`<calcite-carousel-item .label=${`carousel-item-${p}`}><calcite-label layout=inline scale=m>${t.icon&&s`<calcite-icon .icon=${t.icon} class="padding-end-0-5"></calcite-icon>`||""}<span .innerHTML=${this._processCarouselMessage(t)??""} tabindex=0></span></calcite-label></calcite-carousel-item>`)}),e}_getCarouselMessages(){let e=this._translations.carousel,t=[{message:e.stockMessage1,icon:"question"},{message:e.stockMessage2,icon:"model"},{message:e.stockMessage3,icon:"lightbulb"},{message:e.stockMessage4,icon:"information"},{message:e.stockMessage5,icon:"speech-bubbles"},{message:e.stockMessage6,icon:"information"}];return t.sort(()=>Math.random()-.5),t}_processCarouselMessage(e){let t=e.message||"";return t.includes("{{url}}")&&e.url&&(t=t.replace("{{url}}",e.url)),t}renderCancelModal(){return s`<calcite-panel class="panel-bg-white"><div tabindex=0>${this._translations.deploymentCancelMessage}</div></calcite-panel>`}renderCancellingModal(){return s`<calcite-panel class="panel-bg-white"><calcite-loader .label=${this._translations.cancelCurrentDeployment}></calcite-loader><div class="loader-text" tabindex=0>${this._translations.cancelCurrentDeployment}</div></calcite-panel>`}_onDialogOpen(){this._confirmUnload=!0,this._carouselKey++,this._translations.carousel&&(this._carouselMessages=this._getCarouselMessages()),this.deployingDialogOpened.emit(),setTimeout(()=>{let e=this._carouselRef.value;e&&e.play()},100)}};r("solution-deploying-dialog",o);export{o as a};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import b from"./KDIUYXBA.js";import a from"./UUYUTETH.js";import{b as g}from"./HW7HHHMK.js";import{F as c,G as p,H as m,h as u,i as n,r as h,u as _}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([C,F,,{f:b}])=>{var f=u`@layer{:host{display:block}.buttons-container{align-items:center;display:flex;padding:4px;color:var(--calcite-color-text-1)!important;background-color:var(--calcite-color-foreground-1)!important;border-block-start:1px solid var(--calcite-color-border-3);border-block-end:1px solid var(--calcite-color-border-3)}}`,k=class extends m{constructor(){super(...arguments),this.enableSnapping=!1,this.graphics=[],this.showUserImageInCommentsList=!1,this.showFullCommentTitle=!0,this._likeFieldAvailable=!1,this._likeCount=0,this._disLikeCount=0,this._dislikeFieldAvailable=!1,this._commentsAvailable=!1,this._isLikeBtnClicked=!1,this._isDislikeBtnClicked=!1,this._relatedFeaturesOIDs=[],this._updating=!1,this._infoCard=c(),this._commentsList=c(),this._likeField="",this._dislikeField="",this._validFieldTypes=["small-integer","integer","big-integer","single","long"],this.relatedTableId="",this.loadingStatus=h(),this.commentClick=h(),this.commentSelect=h(),this.addComment=h(),this.likeOrDislikeClicked=h(),this.featureSelectionChange=h()}static{this.properties={enableSnapping:5,mapView:0,graphics:0,reportingOptions:0,layerItemsHash:0,showUserImageInCommentsList:5,showFullCommentTitle:5,_likeFieldAvailable:16,_likeCount:16,_disLikeCount:16,_dislikeFieldAvailable:16,_commentsAvailable:16,_isLikeBtnClicked:16,_isDislikeBtnClicked:16,_relatedFeaturesOIDs:16,_updating:16}}static{this.styles=f}static{this.shadowRootOptions=_}willUpdate(i){i.has("graphics")&&this.graphicsWatchHandler()}async graphicsWatchHandler(){await this.getCompleteGraphic(this.graphics[0]),this.checkLikeDislikeFields(),await this.processComments()}async refresh(i){i&&await this.getCompleteGraphic(i),await this.processComments(),i&&this.isLikeDislikeConfigured(i.layer)?this.graphics.length>1&&this.checkLikeDislikeFields():(this._likeFieldAvailable=!1,this._dislikeFieldAvailable=!1)}async back(){this._infoCard.value&&this._infoCard.value.back()}async next(){this._infoCard.value&&this._infoCard.value.next()}async toggleListView(){this._infoCard.value&&this._infoCard.value.toggleListView()}async load(){await this.getCompleteGraphic(this.graphics[0]),this.checkLikeDislikeFields(),await this.processComments()}render(){let i=this._relatedFeaturesOIDs?.length>0?`objectId in(${this._relatedFeaturesOIDs})`:"1=0";return n`<calcite-panel><info-card .enableSnapping=${this.enableSnapping} .graphics=${this.graphics} .mapView=${this.mapView} @selectionChanged=${e=>{this.featureSelectionChange.emit(e.detail)}} position=relative ${p(this._infoCard)}></info-card>${(this._likeFieldAvailable||this._dislikeFieldAvailable||this._commentsAvailable)&&n`<div class="buttons-container">${this._commentsAvailable&&n`<calcite-button appearance=transparent icon-end=speech-bubble kind=neutral @click=${()=>{this.addComment.emit()}} scale=m>${this._relatedFeaturesOIDs.length}</calcite-button>`||""}${this._likeFieldAvailable&&n`<calcite-button appearance=transparent icon-end=thumbs-up .kind=${this._isLikeBtnClicked?"brand":"neutral"} .loading=${this._updating} @click=${this.onLikeButtonClick} scale=m>${this._likeCount??this._selectedGraphic?.attributes[this._likeField]??0}</calcite-button>`||""}${this._dislikeFieldAvailable&&n`<calcite-button appearance=transparent icon-end=thumbs-down .kind=${this._isDislikeBtnClicked?"brand":"neutral"} .loading=${this._updating} @click=${this.onDislikeButtonClick} scale=m>${this._disLikeCount??this._selectedGraphic?.attributes[this._dislikeField]??0}</calcite-button>`||""}</div>`||""}${this.relatedTableId&&this._commentsAvailable&&n`<feature-list class="height-full" .mapView=${this.mapView} @featureClick=${()=>{this.commentClick.emit()}} @featureSelect=${e=>{this.commentSelect.emit(e.detail)}} page-size=5 .selectedLayerId=${this.relatedTableId} .showFullTitle=${this.showFullCommentTitle} .showUserImageInList=${this.showUserImageInCommentsList} text-size=small .whereClause=${i} ${p(this._commentsList)}></feature-list>`||""}</calcite-panel>`}async getCompleteGraphic(i){if(i){let e=i.layer,t=e.createQuery(),l=Number(i.getObjectId());if(!Number.isNaN(l)){t.objectIds=[l];let s=await e.queryFeatures(t);this._selectedGraphic=s.features[0]}}}async processComments(){let i=this._selectedGraphic?.layer;if(this.reportingOptions&&this.reportingOptions[i.id]&&this.reportingOptions[i.id].comment&&i?.relationships&&i.relationships?.length>0){let e=this.mapView&&await b(this.mapView),t=null,l=null;if(i?.relationships?.some(s=>{let a=e?.filter(r=>i.url===r.url&&r.layerId===s.relatedTableId);return a&&a.length>0?(t=a[0],l=s.id,!0):!1}),this.relatedTableId=t?.id??"",this.relatedTableId){let s=this._selectedGraphic?.attributes[i?.objectIdField],a=new F({objectIds:[s],outFields:["*"],relationshipId:l}),r=a&&await i.queryRelatedFeatures(a).catch(d=>{console.error(d)}),o=[];r&&r[s]&&r[s].features.forEach(d=>{o.push(d.attributes[t.objectIdField])}),this._relatedFeaturesOIDs=o,this._commentsAvailable=!0}else this._relatedFeaturesOIDs=[],this._commentsAvailable=!1}else this._relatedFeaturesOIDs=[],this._commentsAvailable=!1,this.relatedTableId=""}isLikeDislikeConfigured(i){let e=!1,t=!1;if(this.reportingOptions&&i&&this.reportingOptions[i.id]){if(!this.reportingOptions[i.id].like&&!this.reportingOptions[i.id].dislike)return!1;let l=this.reportingOptions[i.id].likeField,s=this.reportingOptions[i.id].dislikeField;if(!l&&!s)return!1;i.fields.forEach(a=>{this._validFieldTypes.indexOf(a.type)>-1&&this.layerItemsHash&&this.reportingOptions&&this.layerItemsHash[i.id].supportsUpdate&&(a.name===l&&this.reportingOptions[i.id].like?e=!0:a.name===s&&this.reportingOptions[i.id].dislike&&(t=!0))})}return e||t}checkLikeDislikeFields(){this._likeFieldAvailable=!1,this._dislikeFieldAvailable=!1,this._isLikeBtnClicked=!1,this._isDislikeBtnClicked=!1,this._likeCount=0,this._disLikeCount=0;let i=this._selectedGraphic?.layer;if(this.reportingOptions&&i&&this.reportingOptions[i?.id]){if(this._likeField=this.reportingOptions[i.id].likeField||"",this._dislikeField=this.reportingOptions[i.id].dislikeField||"",!this._likeField&&!this._dislikeField)return;i.fields.forEach(e=>{this._validFieldTypes.indexOf(e.type)>-1&&this.layerItemsHash&&this.reportingOptions&&this.layerItemsHash[i.id].supportsUpdate&&(e.name===this._likeField&&this.reportingOptions[i.id].like?(this._likeFieldAvailable=!0,this._likeCount=this._selectedGraphic?.attributes[e.name]||0):e.name===this._dislikeField&&this.reportingOptions[i.id].dislike&&(this._dislikeFieldAvailable=!0,this._disLikeCount=this._selectedGraphic?.attributes[e.name]||0))}),this.getFromLocalStorage()}}onLikeButtonClick(){this._isDislikeBtnClicked&&this._selectedGraphic?.layer&&this.reportingOptions&&this.reportingOptions[this._selectedGraphic.layer.id].dislike&&this.onDislikeButtonClick(),this._isLikeBtnClicked=!this._isLikeBtnClicked,this._isLikeBtnClicked?this._likeCount++:this._likeCount--,this.updateFeaturesLikeDislikeField(this._likeField,this._isLikeBtnClicked)}onDislikeButtonClick(){this._isLikeBtnClicked&&this._selectedGraphic?.layer&&this.reportingOptions&&this.reportingOptions[this._selectedGraphic.layer.id].like&&this.onLikeButtonClick(),this._isDislikeBtnClicked=!this._isDislikeBtnClicked,this._isDislikeBtnClicked?this._disLikeCount++:this._disLikeCount--,this.updateFeaturesLikeDislikeField(this._dislikeField,this._isDislikeBtnClicked)}async updateFeaturesLikeDislikeField(i,e){let t={},l=this._selectedGraphic?.layer;this._updating=!0;let s=this._selectedGraphic;if(s){s.attributes[i]=Number(s.attributes[i])+(e?1:-1),t[l.objectIdField]=s.attributes[l.objectIdField],t[i]=s.attributes[i];let a=new C;if(a){a.attributes=t;let r={updateFeatures:[a]};await l.applyEdits(r).then(()=>{this._selectedGraphic=s,this.setInLocalStorage(),this._updating=!1,this.likeOrDislikeClicked.emit()},o=>{this._updating=!1,console.log(o)})}}}getFromLocalStorage(){let i=this._selectedGraphic?.layer&&this._selectedGraphic.layer.id,e=i?.toString()&&localStorage[i];if(e){let t=JSON.parse(e).filter(l=>l.id===this._selectedGraphic?.getObjectId());t.length>0&&(this._isLikeBtnClicked=t[0].like,this._isDislikeBtnClicked=t[0].dislike)}}setInLocalStorage(){let i=this._selectedGraphic?.layer&&this._selectedGraphic.layer.id,e=i?.toString()&&localStorage[i],t=[];if(e){t=JSON.parse(e);let l=t.findIndex(s=>s.id===this._selectedGraphic?.getObjectId());l>=0&&t.splice(l,1)}t.push({id:this._selectedGraphic?.getObjectId(),like:this._isLikeBtnClicked&&this._likeCount!==0,dislike:this._isDislikeBtnClicked&&this._disLikeCount!==0}),i?.toString()&&localStorage.setItem(i.toString(),JSON.stringify(t))}};g("feature-details",k);return k},"Graphic","rest/support/RelationshipQuery",a,b)
2
+ import b from"./KDIUYXBA.js";import a from"./UUYUTETH.js";import{b as g}from"./EIQZRLWQ.js";import{F as c,G as p,H as m,h as u,i as n,r as h,u as _}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([C,F,,{f:b}])=>{var f=u`@layer{:host{display:block}.buttons-container{align-items:center;display:flex;padding:4px;color:var(--calcite-color-text-1)!important;background-color:var(--calcite-color-foreground-1)!important;border-block-start:1px solid var(--calcite-color-border-3);border-block-end:1px solid var(--calcite-color-border-3)}}`,k=class extends m{constructor(){super(...arguments),this.enableSnapping=!1,this.graphics=[],this.showUserImageInCommentsList=!1,this.showFullCommentTitle=!0,this._likeFieldAvailable=!1,this._likeCount=0,this._disLikeCount=0,this._dislikeFieldAvailable=!1,this._commentsAvailable=!1,this._isLikeBtnClicked=!1,this._isDislikeBtnClicked=!1,this._relatedFeaturesOIDs=[],this._updating=!1,this._infoCard=c(),this._commentsList=c(),this._likeField="",this._dislikeField="",this._validFieldTypes=["small-integer","integer","big-integer","single","long"],this.relatedTableId="",this.loadingStatus=h(),this.commentClick=h(),this.commentSelect=h(),this.addComment=h(),this.likeOrDislikeClicked=h(),this.featureSelectionChange=h()}static{this.properties={enableSnapping:5,mapView:0,graphics:0,reportingOptions:0,layerItemsHash:0,showUserImageInCommentsList:5,showFullCommentTitle:5,_likeFieldAvailable:16,_likeCount:16,_disLikeCount:16,_dislikeFieldAvailable:16,_commentsAvailable:16,_isLikeBtnClicked:16,_isDislikeBtnClicked:16,_relatedFeaturesOIDs:16,_updating:16}}static{this.styles=f}static{this.shadowRootOptions=_}willUpdate(i){i.has("graphics")&&this.graphicsWatchHandler()}async graphicsWatchHandler(){await this.getCompleteGraphic(this.graphics[0]),this.checkLikeDislikeFields(),await this.processComments()}async refresh(i){i&&await this.getCompleteGraphic(i),await this.processComments(),i&&this.isLikeDislikeConfigured(i.layer)?this.graphics.length>1&&this.checkLikeDislikeFields():(this._likeFieldAvailable=!1,this._dislikeFieldAvailable=!1)}async back(){this._infoCard.value&&this._infoCard.value.back()}async next(){this._infoCard.value&&this._infoCard.value.next()}async toggleListView(){this._infoCard.value&&this._infoCard.value.toggleListView()}async load(){await this.getCompleteGraphic(this.graphics[0]),this.checkLikeDislikeFields(),await this.processComments()}render(){let i=this._relatedFeaturesOIDs?.length>0?`objectId in(${this._relatedFeaturesOIDs})`:"1=0";return n`<calcite-panel><info-card .enableSnapping=${this.enableSnapping} .graphics=${this.graphics} .mapView=${this.mapView} @selectionChanged=${e=>{this.featureSelectionChange.emit(e.detail)}} position=relative ${p(this._infoCard)}></info-card>${(this._likeFieldAvailable||this._dislikeFieldAvailable||this._commentsAvailable)&&n`<div class="buttons-container">${this._commentsAvailable&&n`<calcite-button appearance=transparent icon-end=speech-bubble kind=neutral @click=${()=>{this.addComment.emit()}} scale=m>${this._relatedFeaturesOIDs.length}</calcite-button>`||""}${this._likeFieldAvailable&&n`<calcite-button appearance=transparent icon-end=thumbs-up .kind=${this._isLikeBtnClicked?"brand":"neutral"} .loading=${this._updating} @click=${this.onLikeButtonClick} scale=m>${this._likeCount??this._selectedGraphic?.attributes[this._likeField]??0}</calcite-button>`||""}${this._dislikeFieldAvailable&&n`<calcite-button appearance=transparent icon-end=thumbs-down .kind=${this._isDislikeBtnClicked?"brand":"neutral"} .loading=${this._updating} @click=${this.onDislikeButtonClick} scale=m>${this._disLikeCount??this._selectedGraphic?.attributes[this._dislikeField]??0}</calcite-button>`||""}</div>`||""}${this.relatedTableId&&this._commentsAvailable&&n`<feature-list class="height-full" .mapView=${this.mapView} @featureClick=${()=>{this.commentClick.emit()}} @featureSelect=${e=>{this.commentSelect.emit(e.detail)}} page-size=5 .selectedLayerId=${this.relatedTableId} .showFullTitle=${this.showFullCommentTitle} .showUserImageInList=${this.showUserImageInCommentsList} text-size=small .whereClause=${i} ${p(this._commentsList)}></feature-list>`||""}</calcite-panel>`}async getCompleteGraphic(i){if(i){let e=i.layer,t=e.createQuery(),l=Number(i.getObjectId());if(!Number.isNaN(l)){t.objectIds=[l];let s=await e.queryFeatures(t);this._selectedGraphic=s.features[0]}}}async processComments(){let i=this._selectedGraphic?.layer;if(this.reportingOptions&&this.reportingOptions[i.id]&&this.reportingOptions[i.id].comment&&i?.relationships&&i.relationships?.length>0){let e=this.mapView&&await b(this.mapView),t=null,l=null;if(i?.relationships?.some(s=>{let a=e?.filter(r=>i.url===r.url&&r.layerId===s.relatedTableId);return a&&a.length>0?(t=a[0],l=s.id,!0):!1}),this.relatedTableId=t?.id??"",this.relatedTableId){let s=this._selectedGraphic?.attributes[i?.objectIdField],a=new F({objectIds:[s],outFields:["*"],relationshipId:l}),r=a&&await i.queryRelatedFeatures(a).catch(d=>{console.error(d)}),o=[];r&&r[s]&&r[s].features.forEach(d=>{o.push(d.attributes[t.objectIdField])}),this._relatedFeaturesOIDs=o,this._commentsAvailable=!0}else this._relatedFeaturesOIDs=[],this._commentsAvailable=!1}else this._relatedFeaturesOIDs=[],this._commentsAvailable=!1,this.relatedTableId=""}isLikeDislikeConfigured(i){let e=!1,t=!1;if(this.reportingOptions&&i&&this.reportingOptions[i.id]){if(!this.reportingOptions[i.id].like&&!this.reportingOptions[i.id].dislike)return!1;let l=this.reportingOptions[i.id].likeField,s=this.reportingOptions[i.id].dislikeField;if(!l&&!s)return!1;i.fields.forEach(a=>{this._validFieldTypes.indexOf(a.type)>-1&&this.layerItemsHash&&this.reportingOptions&&this.layerItemsHash[i.id].supportsUpdate&&(a.name===l&&this.reportingOptions[i.id].like?e=!0:a.name===s&&this.reportingOptions[i.id].dislike&&(t=!0))})}return e||t}checkLikeDislikeFields(){this._likeFieldAvailable=!1,this._dislikeFieldAvailable=!1,this._isLikeBtnClicked=!1,this._isDislikeBtnClicked=!1,this._likeCount=0,this._disLikeCount=0;let i=this._selectedGraphic?.layer;if(this.reportingOptions&&i&&this.reportingOptions[i?.id]){if(this._likeField=this.reportingOptions[i.id].likeField||"",this._dislikeField=this.reportingOptions[i.id].dislikeField||"",!this._likeField&&!this._dislikeField)return;i.fields.forEach(e=>{this._validFieldTypes.indexOf(e.type)>-1&&this.layerItemsHash&&this.reportingOptions&&this.layerItemsHash[i.id].supportsUpdate&&(e.name===this._likeField&&this.reportingOptions[i.id].like?(this._likeFieldAvailable=!0,this._likeCount=this._selectedGraphic?.attributes[e.name]||0):e.name===this._dislikeField&&this.reportingOptions[i.id].dislike&&(this._dislikeFieldAvailable=!0,this._disLikeCount=this._selectedGraphic?.attributes[e.name]||0))}),this.getFromLocalStorage()}}onLikeButtonClick(){this._isDislikeBtnClicked&&this._selectedGraphic?.layer&&this.reportingOptions&&this.reportingOptions[this._selectedGraphic.layer.id].dislike&&this.onDislikeButtonClick(),this._isLikeBtnClicked=!this._isLikeBtnClicked,this._isLikeBtnClicked?this._likeCount++:this._likeCount--,this.updateFeaturesLikeDislikeField(this._likeField,this._isLikeBtnClicked)}onDislikeButtonClick(){this._isLikeBtnClicked&&this._selectedGraphic?.layer&&this.reportingOptions&&this.reportingOptions[this._selectedGraphic.layer.id].like&&this.onLikeButtonClick(),this._isDislikeBtnClicked=!this._isDislikeBtnClicked,this._isDislikeBtnClicked?this._disLikeCount++:this._disLikeCount--,this.updateFeaturesLikeDislikeField(this._dislikeField,this._isDislikeBtnClicked)}async updateFeaturesLikeDislikeField(i,e){let t={},l=this._selectedGraphic?.layer;this._updating=!0;let s=this._selectedGraphic;if(s){s.attributes[i]=Number(s.attributes[i])+(e?1:-1),t[l.objectIdField]=s.attributes[l.objectIdField],t[i]=s.attributes[i];let a=new C;if(a){a.attributes=t;let r={updateFeatures:[a]};await l.applyEdits(r).then(()=>{this._selectedGraphic=s,this.setInLocalStorage(),this._updating=!1,this.likeOrDislikeClicked.emit()},o=>{this._updating=!1,console.log(o)})}}}getFromLocalStorage(){let i=this._selectedGraphic?.layer&&this._selectedGraphic.layer.id,e=i?.toString()&&localStorage[i];if(e){let t=JSON.parse(e).filter(l=>l.id===this._selectedGraphic?.getObjectId());t.length>0&&(this._isLikeBtnClicked=t[0].like,this._isDislikeBtnClicked=t[0].dislike)}}setInLocalStorage(){let i=this._selectedGraphic?.layer&&this._selectedGraphic.layer.id,e=i?.toString()&&localStorage[i],t=[];if(e){t=JSON.parse(e);let l=t.findIndex(s=>s.id===this._selectedGraphic?.getObjectId());l>=0&&t.splice(l,1)}t.push({id:this._selectedGraphic?.getObjectId(),like:this._isLikeBtnClicked&&this._likeCount!==0,dislike:this._isDislikeBtnClicked&&this._disLikeCount!==0}),i?.toString()&&localStorage.setItem(i.toString(),JSON.stringify(t))}};g("feature-details",k);return k},"Graphic","rest/support/RelationshipQuery",a,b)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{c as i}from"./HW7HHHMK.js";function l(r,t){let a=n(r,t),e=i("assets/item-icons/");return a==="group"?`${e}/${a}16.png`:`${e}/${a}16.svg`}function n(r,t){let a=r.toLowerCase(),e=t||[],s=e.includes("Hosted Service");switch(a.trim()){case"360 vr experience":return"360vr";case"3dtiles package":return"3dtileslayerpackage";case"3dtiles service":return e.includes("3DObject")?"3dobjecttileslayer":e.includes("IntegratedMesh")?"integratedmeshtileslayer":"3dobjecttileslayer";case"feature service":case"feature collection":case"kml":case"wfs":if(e.includes("IndoorPositioningDataService"))return"indoorpositioningdataservice";let c=e.includes("Spatiotemporal");return e.includes("Table")?c?"spatiotemporaltable":"table":e.includes("Route Layer")?"routelayer":e.includes("Markup")?"markup":c?"spatiotemporal":e.includes("UtilityNetwork")?"utilitynetwork":s?"featureshosted":"features";case"group":return"group";case"group layer":return e.includes("Map")?"layergroup2d":e.includes("Scene")?"layergroup3d":"layergroup";case"wmts":return"maptiles";case"map service":case"wms":return s||e.includes("Tiled")?"maptiles":"mapimages";case"scene service":return e.includes("Line")?"sceneweblayerline":e.includes("3DObject")?"sceneweblayermultipatch":e.includes("Point")?"sceneweblayerpoint":e.includes("IntegratedMesh")?"sceneweblayermesh":e.includes("PointCloud")?"sceneweblayerpointcloud":e.includes("Polygon")?"sceneweblayerpolygon":e.includes("Building")?"sceneweblayerbuilding":e.includes("Voxel")?"sceneweblayervoxel":"sceneweblayer";case"image service":return e.includes("Elevation 3D Layer")?"elevationlayer":e.includes("Tiled Imagery")?"tiledimagerylayer":"imagery";case"stream service":return"streamlayer";case"video service":return e.includes("Live Stream")?"livestreamvideolayer":"mediaservice";case"vector tile service":return"vectortile";case"datastore catalog service":return"datastorecollection";case"geocoding service":return"geocodeservice";case"geoprocessing service":return e.includes("Web Tool")?"tool":"layers";case"geodata service":return"geodataservice";case"web map":case"cityengine web scene":return"maps";case"web scene":return e.includes("ViewingMode-Local")?"webscenelocal":"websceneglobal";case"application":case"web mapping application":case"mobile application":case"operation view":case"desktop application":return e.includes("configurableApp")?"instantapps":"apps";case"map document":case"map package":case"published map":case"scene document":case"globe document":case"basemap package":case"mobile basemap package":case"mobile map package":case"project package":case"project template":case"pro map":case"layout":return"mapsgray";case"layer":return e.includes("ArcGIS Pro")?"mapsgray":"layersgray";case"explorer map":return e.indexOf("Explorer Document")?"mapsgray":e.includes("Explorer Mapping Application")?"datafilesgray":"mapsgray";case"pro presentation":return"propresentation";case"api key":return"key";case"csv":return"csv";case"shapefile":return"shapefile";case"csv collection":return"csvcollection";case"media layer":return"medialayer";case"microsoft excel":return"excel";case"microsoft powerpoint":return"powerpoint";case"microsoft word":return"word";case"pdf":return"pdf";case"sqlite geodatabase":return"sqlite";case"administrative report":return"report";case"image":return"image";case"cad drawing":return"cad";case"service definition":case"geojson":case"netcdf":return"data";case"explorer add in":case"desktop add in":case"windows viewer add in":case"windows viewer configuration":return"appsgray";case"arcgis pro add in":case"arcgis pro configuration":return"addindesktop";case"rule package":case"file geodatabase":case"kml collection":case"windows mobile package":case"map template":case"desktop application template":case"gml":case"arcpad package":case"code sample":case"document link":case"earth configuration":case"operations dashboard add in":case"rules package":case"workflow manager package":return"datafilesgray";case"form":return e.includes("Survey123")?"survey":"datafilesgray";case"network analysis service":case"geometry service":case"geoprocessing package":case"locator package":case"geoprocessing sample":case"workflow manager service":return"toolsgray";case"layer package":case"explorer layer":return"layersgray";case"scene package":return"scenepackage";case"mobile scene package":return"mobilescenepackage";case"tile package":case"compact tile package":return"tilepackage";case"task file":return"taskfile";case"report template":return"reporttemplate";case"statistical data collection":return"statisticaldatacollection";case"analysis model":return"geoprocessingmodel";case"insights workbook":return"workbook";case"insights model":return"insightsmodel";case"insights page":return"insightspage";case"insights theme":return"insightstheme";case"hub initiative":return"hubinitiative";case"hub page":return"hubpage";case"hub event":return"hubevent";case"hub site application":return"hubsite";case"hub project":return"hubproject";case"relational database connection":return"relationaldatabaseconnection";case"image collection":return"imagecollection";case"style":return e.includes("Dictionary")?"dictionarystyle":"style";case"desktop style":return"desktopstyle";case"dashboard":return"dashboard";case"raster function template":return"rasterprocessingtemplate";case"vector tile package":return"vectortilepackage";case"ortho mapping project":return"orthomappingproject";case"ortho mapping template":return"orthomappingtemplate";case"solution":return"solutions";case"geopackage":return"geopackage";case"deep learning package":return"deeplearningpackage";case"real time analytic":return"realtimeanalytics";case"big data analytic":return"bigdataanalytics";case"feed":return"feed";case"excalibur imagery project":return"excaliburimageryproject";case"notebook":return"notebook";case"reality mapping project":return"realitymappingproject";case"storymap":return e.includes("storymaptemplate")?"storymapstemplate":e.includes("storymapcollection")?"storymapcollection":e.includes("storymapbriefing")?"storymapbriefing":"storymap";case"survey123 add in":return"survey123addin";case"mission":return"mission";case"mission report":return"missionreport";case"quickcapture project":return"quickcaptureproject";case"pro report":return"proreport";case"urban model":return"urbanmodel";case"urban project":return"urbanproject";case"web experience":return"experiencebuilder";case"web experience template":return"webexperiencetemplate";case"experience builder widget":return"experiencebuilderwidget";case"experience builder widget package":return"experiencebuilderwidgetpackage";case"workflow":return"workflow";case"insights script":return"insightsscript";case"kernel gateway connection":return"kernelgatewayconnection";case"hub initiative template":return"hubinitiativetemplate";case"storymap theme":return"storymaptheme";case"knowledge graph":return"knowledgegraph";case"knowledge studio project":return"knowledgestudio";case"knowledge graph layer":return"knowledgegraphlayer";case"native application":return"nativeapp";case"native application installer":return"nativeappinstaller";case"web link chart":return"linkchart";case"knowledge graph web investigation":return"investigation";case"ogcfeatureserver":return"features";case"pro project":return"proproject";case"insights workbook package":return"insightsworkbookpackage";case"apache parquet":return"apacheparquet";case"notebook code snippets":case"notebook code snippet library":return"notebookcodesnippets";case"suitability model":return"suitabilitymodel";case"esri classifier definition":return"classifierdefinition";case"esri classification schema":return"classificationschema";case"insights data engineering workbook":return"dataengineeringworkbook";case"insights data engineering model":return"dataengineeringmodel";case"deep learning studio project":return"deeplearningproject";case"data store":return"datastore";case"data pipeline":return"datapipeline";default:return e.includes("Document")?"datafilesgray":a.includes("service")?"layers":"maps"}}export{l as a};
2
+ import{c as i}from"./EIQZRLWQ.js";function l(r,t){let a=n(r,t),e=i("assets/item-icons/");return a==="group"?`${e}/${a}16.png`:`${e}/${a}16.svg`}function n(r,t){let a=r.toLowerCase(),e=t||[],s=e.includes("Hosted Service");switch(a.trim()){case"360 vr experience":return"360vr";case"3dtiles package":return"3dtileslayerpackage";case"3dtiles service":return e.includes("3DObject")?"3dobjecttileslayer":e.includes("IntegratedMesh")?"integratedmeshtileslayer":"3dobjecttileslayer";case"feature service":case"feature collection":case"kml":case"wfs":if(e.includes("IndoorPositioningDataService"))return"indoorpositioningdataservice";let c=e.includes("Spatiotemporal");return e.includes("Table")?c?"spatiotemporaltable":"table":e.includes("Route Layer")?"routelayer":e.includes("Markup")?"markup":c?"spatiotemporal":e.includes("UtilityNetwork")?"utilitynetwork":s?"featureshosted":"features";case"group":return"group";case"group layer":return e.includes("Map")?"layergroup2d":e.includes("Scene")?"layergroup3d":"layergroup";case"wmts":return"maptiles";case"map service":case"wms":return s||e.includes("Tiled")?"maptiles":"mapimages";case"scene service":return e.includes("Line")?"sceneweblayerline":e.includes("3DObject")?"sceneweblayermultipatch":e.includes("Point")?"sceneweblayerpoint":e.includes("IntegratedMesh")?"sceneweblayermesh":e.includes("PointCloud")?"sceneweblayerpointcloud":e.includes("Polygon")?"sceneweblayerpolygon":e.includes("Building")?"sceneweblayerbuilding":e.includes("Voxel")?"sceneweblayervoxel":"sceneweblayer";case"image service":return e.includes("Elevation 3D Layer")?"elevationlayer":e.includes("Tiled Imagery")?"tiledimagerylayer":"imagery";case"stream service":return"streamlayer";case"video service":return e.includes("Live Stream")?"livestreamvideolayer":"mediaservice";case"vector tile service":return"vectortile";case"datastore catalog service":return"datastorecollection";case"geocoding service":return"geocodeservice";case"geoprocessing service":return e.includes("Web Tool")?"tool":"layers";case"geodata service":return"geodataservice";case"web map":case"cityengine web scene":return"maps";case"web scene":return e.includes("ViewingMode-Local")?"webscenelocal":"websceneglobal";case"application":case"web mapping application":case"mobile application":case"operation view":case"desktop application":return e.includes("configurableApp")?"instantapps":"apps";case"map document":case"map package":case"published map":case"scene document":case"globe document":case"basemap package":case"mobile basemap package":case"mobile map package":case"project package":case"project template":case"pro map":case"layout":return"mapsgray";case"layer":return e.includes("ArcGIS Pro")?"mapsgray":"layersgray";case"explorer map":return e.indexOf("Explorer Document")?"mapsgray":e.includes("Explorer Mapping Application")?"datafilesgray":"mapsgray";case"pro presentation":return"propresentation";case"api key":return"key";case"csv":return"csv";case"shapefile":return"shapefile";case"csv collection":return"csvcollection";case"media layer":return"medialayer";case"microsoft excel":return"excel";case"microsoft powerpoint":return"powerpoint";case"microsoft word":return"word";case"pdf":return"pdf";case"sqlite geodatabase":return"sqlite";case"administrative report":return"report";case"image":return"image";case"cad drawing":return"cad";case"service definition":case"geojson":case"netcdf":return"data";case"explorer add in":case"desktop add in":case"windows viewer add in":case"windows viewer configuration":return"appsgray";case"arcgis pro add in":case"arcgis pro configuration":return"addindesktop";case"rule package":case"file geodatabase":case"kml collection":case"windows mobile package":case"map template":case"desktop application template":case"gml":case"arcpad package":case"code sample":case"document link":case"earth configuration":case"operations dashboard add in":case"rules package":case"workflow manager package":return"datafilesgray";case"form":return e.includes("Survey123")?"survey":"datafilesgray";case"network analysis service":case"geometry service":case"geoprocessing package":case"locator package":case"geoprocessing sample":case"workflow manager service":return"toolsgray";case"layer package":case"explorer layer":return"layersgray";case"scene package":return"scenepackage";case"mobile scene package":return"mobilescenepackage";case"tile package":case"compact tile package":return"tilepackage";case"task file":return"taskfile";case"report template":return"reporttemplate";case"statistical data collection":return"statisticaldatacollection";case"analysis model":return"geoprocessingmodel";case"insights workbook":return"workbook";case"insights model":return"insightsmodel";case"insights page":return"insightspage";case"insights theme":return"insightstheme";case"hub initiative":return"hubinitiative";case"hub page":return"hubpage";case"hub event":return"hubevent";case"hub site application":return"hubsite";case"hub project":return"hubproject";case"relational database connection":return"relationaldatabaseconnection";case"image collection":return"imagecollection";case"style":return e.includes("Dictionary")?"dictionarystyle":"style";case"desktop style":return"desktopstyle";case"dashboard":return"dashboard";case"raster function template":return"rasterprocessingtemplate";case"vector tile package":return"vectortilepackage";case"ortho mapping project":return"orthomappingproject";case"ortho mapping template":return"orthomappingtemplate";case"solution":return"solutions";case"geopackage":return"geopackage";case"deep learning package":return"deeplearningpackage";case"real time analytic":return"realtimeanalytics";case"big data analytic":return"bigdataanalytics";case"feed":return"feed";case"excalibur imagery project":return"excaliburimageryproject";case"notebook":return"notebook";case"reality mapping project":return"realitymappingproject";case"storymap":return e.includes("storymaptemplate")?"storymapstemplate":e.includes("storymapcollection")?"storymapcollection":e.includes("storymapbriefing")?"storymapbriefing":"storymap";case"survey123 add in":return"survey123addin";case"mission":return"mission";case"mission report":return"missionreport";case"quickcapture project":return"quickcaptureproject";case"pro report":return"proreport";case"urban model":return"urbanmodel";case"urban project":return"urbanproject";case"web experience":return"experiencebuilder";case"web experience template":return"webexperiencetemplate";case"experience builder widget":return"experiencebuilderwidget";case"experience builder widget package":return"experiencebuilderwidgetpackage";case"workflow":return"workflow";case"insights script":return"insightsscript";case"kernel gateway connection":return"kernelgatewayconnection";case"hub initiative template":return"hubinitiativetemplate";case"storymap theme":return"storymaptheme";case"knowledge graph":return"knowledgegraph";case"knowledge studio project":return"knowledgestudio";case"knowledge graph layer":return"knowledgegraphlayer";case"native application":return"nativeapp";case"native application installer":return"nativeappinstaller";case"web link chart":return"linkchart";case"knowledge graph web investigation":return"investigation";case"ogcfeatureserver":return"features";case"pro project":return"proproject";case"insights workbook package":return"insightsworkbookpackage";case"apache parquet":return"apacheparquet";case"notebook code snippets":case"notebook code snippet library":return"notebookcodesnippets";case"suitability model":return"suitabilitymodel";case"esri classifier definition":return"classifierdefinition";case"esri classification schema":return"classificationschema";case"insights data engineering workbook":return"dataengineeringworkbook";case"insights data engineering model":return"dataengineeringmodel";case"deep learning studio project":return"deeplearningproject";case"data store":return"datastore";case"data pipeline":return"datapipeline";default:return e.includes("Document")?"datafilesgray":a.includes("service")?"layers":"maps"}}export{l as a};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import b from"./SIUGRN4Q.js";import a from"./O24ZIQLV.js";import{b as f}from"./PZ4L77M5.js";import"./JE7L7M3J.js";import{a as u}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 m}from"./HW7HHHMK.js";import{H as h,J as p,L as o,h as n,i as t,r as d}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([{K:x,b:g,t:b},{f:v}])=>{var S=n`calcite-card{height:100%;padding-bottom:2px;border:2px solid transparent;transition:border-color .1s ease;box-sizing:border-box}@media(max-width:400px){calcite-card{width:100%}}calcite-card:hover img{-webkit-filter:brightness(30%);filter:brightness(30%);-webkit-transition:all .1s ease;-moz-transition:all .1s ease;-o-transition:all .1s ease;-ms-transition:all .1s ease;transition:all .1s ease}calcite-card:hover .hover-text{opacity:1;color:#fff}calcite-card:hover{border-color:var(--calcite-color-brand);cursor:pointer}.chip-status{--calcite-chip-icon-color: var(--calcite-color-brand);cursor:pointer}.chip-deployed{--calcite-chip-icon-color: var(--calcite-color-status-success)}.hover-text{transition:.1s ease;opacity:0;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);text-align:center;display:flex;flex-direction:row;align-items:center;height:100%;font-size:1.2rem}.font-color-text-2{--calcite-label-text-color: var(--calcite-color-text-2)}.font-line-height{line-height:1.4}.font-size-size--1{font-size:var(--calcite-font-size--1)}.header-line-height{--calcite-label-margin-bottom: 0;margin-top:.5rem;margin-bottom:.7rem}.info-icon{--calcite-icon-color: var(--calcite-color-text-inverse);padding-inline-end:.3rem}.card-image-wrap{flex:0 0 auto}.card-image-wrap{width:100%;position:relative;margin-bottom:0;-webkit-box-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto}.card-image{width:100%;display:block}video,img{max-width:100%;height:auto}img{overflow-clip-margin:content-box;overflow:clip}a{text-decoration:none;color:inherit;outline:0;padding:0;margin:0;display:inherit;height:100%}`,l=class extends h{constructor(){super(...arguments),this.referrerSolutionId="",this.referrerSolutionTitle="",this.referrerSolutionVersion="",this.source="all-solutions",this._translations=u({name:"solution-details-card",blocking:!0}),this._configContextConsumer=f({context:g,subscribe:!0}),this.detailsCardSelected=d()}static{this.properties={card:0,referrerSolutionId:1,referrerSolutionTitle:1,referrerSolutionVersion:1,source:1,_translations:16}}static{this.styles=S}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}render(){let e=v(this.card.title);return t`<a href=${e??o} @click=${this._anchorClick} tabindex=-1 .title=${`${this._translations.arcgisSolutions} | ${this.card.title}`}>${this._renderCard()}</a>`}_anchorClick(e){e.preventDefault()}_cardSelected(){if(this.source==="you-may-also-like"){let e=[this.referrerSolutionTitle,this.referrerSolutionId,this.referrerSolutionVersion,this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||""];this._telemetry?.logEvent({category:x.SOLUTION_DETAILS,action:"Related Solution",dimensions:e})}this.detailsCardSelected.emit(this.card)}_renderChips(e){let r=e.includes("deployed"),y=e.filter(i=>i!=="deployed"),a=[];return y.forEach(i=>{let $="chip-status",c=`solution-details-card-chip-${i}`,_=i==="new"?"star":"mega-phone",s=i==="new"?this._translations.newSolution:this._translations.updated;a.push(t`<calcite-chip class=${p($)} .icon=${_} id=${c??o} .label=${s} .value=${s} scale=s></calcite-chip><calcite-tooltip .referenceElement=${c}><span>${s}</span></calcite-tooltip>`)}),r&&a.push(t`<calcite-chip class="chip-deployed" icon=check-circle id=solution-details-card-chip-deployed .label=${this._translations.deployed} .value=${this._translations.deployed} scale=s></calcite-chip><calcite-tooltip reference-element=solution-details-card-chip-deployed><span>${this._translations.deployed}</span></calcite-tooltip>`),a}_renderCard(){let e=this.card;return t`<calcite-card .label=${e.snippet} @click=${this._cardSelected} @keydown=${r=>b(r,()=>this._cardSelected())}><div class="card-image-wrap" slot=thumbnail><img alt=${e.title??o} class="thumbnail card-image" src=${e.thumbnailUrl??o}><div class="hover-text">${this._translations.viewDetails}</div></div><calcite-label slot=heading class="header-line-height" scale=l>${e.title}</calcite-label><p slot=description class="font-color-text-2 font-line-height font-size-size--1">${e.snippet}</p>${e.chips&&e.chips.length>0?t`<div slot=footer-end style="display: flex; gap: 0.5rem; justify-content: flex-end;">${this._renderChips(e.chips)}</div>`:void 0}<div slot=footer-start></div></calcite-card>`}};m("solution-details-card",l);return l},a,b)
2
+ import b from"./TAZIMIFF.js";import a from"./5QSIKX2L.js";import{b as f}from"./PZ4L77M5.js";import"./JE7L7M3J.js";import{a as u}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 h,J as p,L as o,h as n,i as t,r as d}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([{K:x,b:g,t:b},{f:v}])=>{var S=n`calcite-card{height:100%;padding-bottom:2px;border:2px solid transparent;transition:border-color .1s ease;box-sizing:border-box}@media(max-width:400px){calcite-card{width:100%}}calcite-card:hover img{-webkit-filter:brightness(30%);filter:brightness(30%);-webkit-transition:all .1s ease;-moz-transition:all .1s ease;-o-transition:all .1s ease;-ms-transition:all .1s ease;transition:all .1s ease}calcite-card:hover .hover-text{opacity:1;color:#fff}calcite-card:hover{border-color:var(--calcite-color-brand);cursor:pointer}.chip-status{--calcite-chip-icon-color: var(--calcite-color-brand);cursor:pointer}.chip-deployed{--calcite-chip-icon-color: var(--calcite-color-status-success)}.hover-text{transition:.1s ease;opacity:0;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);text-align:center;display:flex;flex-direction:row;align-items:center;height:100%;font-size:1.2rem}.font-color-text-2{--calcite-label-text-color: var(--calcite-color-text-2)}.font-line-height{line-height:1.4}.font-size-size--1{font-size:var(--calcite-font-size--1)}.header-line-height{--calcite-label-margin-bottom: 0;margin-top:.5rem;margin-bottom:.7rem}.info-icon{--calcite-icon-color: var(--calcite-color-text-inverse);padding-inline-end:.3rem}.card-image-wrap{flex:0 0 auto}.card-image-wrap{width:100%;position:relative;margin-bottom:0;-webkit-box-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto}.card-image{width:100%;display:block}video,img{max-width:100%;height:auto}img{overflow-clip-margin:content-box;overflow:clip}a{text-decoration:none;color:inherit;outline:0;padding:0;margin:0;display:inherit;height:100%}`,l=class extends h{constructor(){super(...arguments),this.referrerSolutionId="",this.referrerSolutionTitle="",this.referrerSolutionVersion="",this.source="all-solutions",this._translations=u({name:"solution-details-card",blocking:!0}),this._configContextConsumer=f({context:g,subscribe:!0}),this.detailsCardSelected=d()}static{this.properties={card:0,referrerSolutionId:1,referrerSolutionTitle:1,referrerSolutionVersion:1,source:1,_translations:16}}static{this.styles=S}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}render(){let e=v(this.card.title);return t`<a href=${e??o} @click=${this._anchorClick} tabindex=-1 .title=${`${this._translations.arcgisSolutions} | ${this.card.title}`}>${this._renderCard()}</a>`}_anchorClick(e){e.preventDefault()}_cardSelected(){if(this.source==="you-may-also-like"){let e=[this.referrerSolutionTitle,this.referrerSolutionId,this.referrerSolutionVersion,this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||""];this._telemetry?.logEvent({category:x.SOLUTION_DETAILS,action:"Related Solution",dimensions:e})}this.detailsCardSelected.emit(this.card)}_renderChips(e){let r=e.includes("deployed"),y=e.filter(i=>i!=="deployed"),a=[];return y.forEach(i=>{let $="chip-status",c=`solution-details-card-chip-${i}`,_=i==="new"?"star":"mega-phone",s=i==="new"?this._translations.newSolution:this._translations.updated;a.push(t`<calcite-chip class=${p($)} .icon=${_} id=${c??o} .label=${s} .value=${s} scale=s></calcite-chip><calcite-tooltip .referenceElement=${c}><span>${s}</span></calcite-tooltip>`)}),r&&a.push(t`<calcite-chip class="chip-deployed" icon=check-circle id=solution-details-card-chip-deployed .label=${this._translations.deployed} .value=${this._translations.deployed} scale=s></calcite-chip><calcite-tooltip reference-element=solution-details-card-chip-deployed><span>${this._translations.deployed}</span></calcite-tooltip>`),a}_renderCard(){let e=this.card;return t`<calcite-card .label=${e.snippet} @click=${this._cardSelected} @keydown=${r=>b(r,()=>this._cardSelected())}><div class="card-image-wrap" slot=thumbnail><img alt=${e.title??o} class="thumbnail card-image" src=${e.thumbnailUrl??o}><div class="hover-text">${this._translations.viewDetails}</div></div><calcite-label slot=heading class="header-line-height" scale=l>${e.title}</calcite-label><p slot=description class="font-color-text-2 font-line-height font-size-size--1">${e.snippet}</p>${e.chips&&e.chips.length>0?t`<div slot=footer-end style="display: flex; gap: 0.5rem; justify-content: flex-end;">${this._renderChips(e.chips)}</div>`:void 0}<div slot=footer-start></div></calcite-card>`}};m("solution-details-card",l);return l},a,b)