@esri/solutions-components 5.1.0-next.26 → 5.1.0-next.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/{N7OY2PSZ.js → 2P2JRBNM.js} +1 -1
- package/dist/cdn/{NYUVCFEV.js → 2PMK3DJF.js} +1 -1
- package/dist/cdn/{4DFGN2VE.js → 2TDD4AWX.js} +1 -1
- package/dist/cdn/{7DHQVMKX.js → 3KSR7IOU.js} +1 -1
- package/dist/cdn/{S423P2GA.js → 3YQ3LN5J.js} +1 -1
- package/dist/cdn/{6NE73ZT3.js → 45KRLZNR.js} +1 -1
- package/dist/cdn/{NDGFJPG7.js → 4652XKVL.js} +1 -1
- package/dist/cdn/{V5PIAPEA.js → 4ANWYTKX.js} +1 -1
- package/dist/cdn/{GJFVHF5H.js → 4YJEQSFO.js} +1 -1
- package/dist/cdn/{6G7RA3PN.js → 5BAV55JO.js} +1 -1
- package/dist/cdn/{6UXP2Q63.js → 5V7A6E22.js} +1 -1
- package/dist/cdn/{7SLUGAMA.js → 6ITAU5WA.js} +1 -1
- package/dist/cdn/{QMD2WK5F.js → 6KOKLS2W.js} +1 -1
- package/dist/cdn/{FXHBHZKG.js → 6LRELQFJ.js} +1 -1
- package/dist/cdn/{K5JYHCQ7.js → 6O7SXEOR.js} +1 -1
- package/dist/cdn/{TP5EQUBD.js → 6SBFYKDO.js} +1 -1
- package/dist/cdn/{EIVJQY2S.js → 6X7TONQA.js} +1 -1
- package/dist/cdn/{MFJF6OXL.js → 7ATJP4H7.js} +1 -1
- package/dist/cdn/{FFDZB5TW.js → 7WMPOI2D.js} +1 -1
- package/dist/cdn/{ZCGIQK3H.js → A3MPUIYQ.js} +1 -1
- package/dist/cdn/{ASTBVDA3.js → A75LOABR.js} +1 -1
- package/dist/cdn/{F7DLM4RF.js → AGK4AXFX.js} +1 -1
- package/dist/cdn/{57DOBXD6.js → AM2DV5FK.js} +1 -1
- package/dist/cdn/{EDVUYJ5Q.js → AQX4LQLD.js} +1 -1
- package/dist/cdn/{R3KUBISH.js → BDENYZEG.js} +1 -1
- package/dist/cdn/{4NALIU6Y.js → BFC3V3IE.js} +1 -1
- package/dist/cdn/{MWVSVTGT.js → BGT55URG.js} +1 -1
- package/dist/cdn/{NZS3YVIT.js → BQ5WKU6S.js} +1 -1
- package/dist/cdn/{2B6VLP3A.js → BUN734I7.js} +1 -1
- package/dist/cdn/C22EGSM6.js +2 -0
- package/dist/cdn/{K7XOFXRK.js → CDV7UUL5.js} +1 -1
- package/dist/cdn/{2H7KJUZG.js → CJ4P6J7C.js} +1 -1
- package/dist/cdn/{DJFFGBHM.js → CLSXOECQ.js} +1 -1
- package/dist/cdn/{T2WSMUVL.js → CS4IGHMC.js} +1 -1
- package/dist/cdn/{JCDM3IJE.js → CUY7MQY5.js} +1 -1
- package/dist/cdn/{RTG3SBDS.js → CY4C4VZP.js} +1 -1
- package/dist/cdn/{LCWLPXAF.js → D46ACA6D.js} +1 -1
- package/dist/cdn/{PUCQJ7PY.js → DBNF3MJK.js} +1 -1
- package/dist/cdn/{DLBZRD4H.js → DPD6UBKD.js} +1 -1
- package/dist/cdn/{ZDQANIMG.js → E4UKEVGP.js} +1 -1
- package/dist/cdn/{P65BBQ5T.js → E5VUML6C.js} +1 -1
- package/dist/cdn/{P4FX4W2X.js → E6WWQDDM.js} +1 -1
- package/dist/cdn/{D4QQZVLI.js → EJAZTI6O.js} +1 -1
- package/dist/cdn/EKVDYGK2.js +2 -0
- package/dist/cdn/EPQ6J23O.js +7 -0
- package/dist/cdn/{IMPGTDMV.js → EQURPCQ2.js} +1 -1
- package/dist/cdn/{P4KZ6OZF.js → F2JKSZOE.js} +1 -1
- package/dist/cdn/F2YGRNTN.js +2 -0
- package/dist/cdn/{UF67SSGX.js → FEMACR5Y.js} +1 -1
- package/dist/cdn/{XC7LLCVS.js → FG6ODB3X.js} +1 -1
- package/dist/cdn/{NDUAEC62.js → FLLZBDVI.js} +1 -1
- package/dist/cdn/{N2KU5PYY.js → FLQFNPOP.js} +1 -1
- package/dist/cdn/{SENL26AU.js → FOFNYI3V.js} +1 -1
- package/dist/cdn/{UY2AFOXQ.js → FRE445LD.js} +1 -1
- package/dist/cdn/{EBU4JF4W.js → G4FOQX6X.js} +1 -1
- package/dist/cdn/{PJH3H7LZ.js → G5YR3YZQ.js} +1 -1
- package/dist/cdn/{OMURSGFL.js → GAACGZBE.js} +1 -1
- package/dist/cdn/{HGEF25RL.js → GBTCFOFN.js} +1 -1
- package/dist/cdn/{VDEFBT2N.js → GFW4PBUK.js} +1 -1
- package/dist/cdn/{I5PBBAVM.js → GJ6WYTEI.js} +1 -1
- package/dist/cdn/{QNNQGJS4.js → GLRPUU2V.js} +1 -1
- package/dist/cdn/{IKN5RLJ4.js → GNVWXRLD.js} +1 -1
- package/dist/cdn/{NGCFEPQE.js → GSF5ZZMH.js} +2 -2
- package/dist/cdn/HAET3BAD.js +2 -0
- package/dist/cdn/HOVTBV7I.js +2 -0
- package/dist/cdn/{QQSP7HQH.js → I5RNBPZI.js} +1 -1
- package/dist/cdn/{RF7NG5JX.js → IFWNDFJA.js} +1 -1
- package/dist/cdn/INWDOVSJ.js +2 -0
- package/dist/cdn/IR6AJOBB.js +2 -0
- package/dist/cdn/{AKDP6MCB.js → IUFEMLQM.js} +1 -1
- package/dist/cdn/{KRFYU445.js → IXXKN5ZI.js} +1 -1
- package/dist/cdn/{AA7X6GKH.js → JA3R6YUV.js} +1 -1
- package/dist/cdn/{LDHJGX5G.js → JEQXVAQH.js} +1 -1
- package/dist/cdn/{EC6NYTSJ.js → JMDRBVRT.js} +1 -1
- package/dist/cdn/{36HEIJAI.js → JNRZGJ5J.js} +1 -1
- package/dist/cdn/{ATVUAP2X.js → JTAEOL7D.js} +1 -1
- package/dist/cdn/{N2ROUAUM.js → JXSSMPRV.js} +1 -1
- package/dist/cdn/JZHP22BA.js +2 -0
- package/dist/cdn/{JK75TUSP.js → K2OB67JG.js} +1 -1
- package/dist/cdn/{UQ3MLIHV.js → K5ULSEDV.js} +1 -1
- package/dist/cdn/K6H5LUII.js +2 -0
- package/dist/cdn/KN36REDP.js +2 -0
- package/dist/cdn/L34HBOOV.js +2 -0
- package/dist/cdn/{JYLXH6OM.js → L6QPBIO3.js} +1 -1
- package/dist/cdn/{SXD7ZWLW.js → LDO52PG7.js} +1 -1
- package/dist/cdn/{NLTK53B2.js → LVQAS4DN.js} +1 -1
- package/dist/cdn/{4GZBBPZQ.js → M7GCQN63.js} +1 -1
- package/dist/cdn/{OC2DD3AB.js → MACN5YNL.js} +1 -1
- package/dist/cdn/{GN6MDWLZ.js → MDFVVTRI.js} +1 -1
- package/dist/cdn/{XYFIAJPT.js → MMQLDIE7.js} +1 -1
- package/dist/cdn/NFRTFOHF.js +2 -0
- package/dist/cdn/{POE2XE6Y.js → NIFRYAFS.js} +1 -1
- package/dist/cdn/{ACF2RXCB.js → NUYS5PGC.js} +1 -1
- package/dist/cdn/{RNTJMF4O.js → O4JG6O2G.js} +1 -1
- package/dist/cdn/{ULCILXSA.js → ODZNJZG5.js} +1 -1
- package/dist/cdn/{JLYGSQEC.js → OUHPCCIT.js} +1 -1
- package/dist/cdn/{LPNQJBCN.js → PWAT4NDG.js} +1 -1
- package/dist/cdn/{XVRRQMOP.js → Q2IHGYKB.js} +1 -1
- package/dist/cdn/{XTUL7OCR.js → QKETH7B7.js} +1 -1
- package/dist/cdn/{GTD4LCLX.js → QSUXQICI.js} +1 -1
- package/dist/cdn/{LD2NUKM3.js → QXGDMWPW.js} +1 -1
- package/dist/cdn/{U4MNIZYO.js → R33D5PLS.js} +1 -1
- package/dist/cdn/{OMIISLTG.js → RBVTHO3G.js} +1 -1
- package/dist/cdn/{57JYZYF5.js → RP36BC5U.js} +1 -1
- package/dist/cdn/{BEGKM3ZM.js → RQ2LHC5I.js} +1 -1
- package/dist/cdn/{J33ST6ZG.js → RVKS24LF.js} +1 -1
- package/dist/cdn/{3AQ7U2PF.js → SDJWXDEO.js} +1 -1
- package/dist/cdn/{VRE7NUZ2.js → SEKKCZV5.js} +1 -1
- package/dist/cdn/{FRWN4Q5V.js → SRHO3QX6.js} +1 -1
- package/dist/cdn/{7YIQXDUF.js → THSRTNBE.js} +1 -1
- package/dist/cdn/{SZRONHSX.js → TLJX3G56.js} +1 -1
- package/dist/cdn/{NWTG35WX.js → TOU5OHUQ.js} +1 -1
- package/dist/cdn/U4HQWOBP.js +2 -0
- package/dist/cdn/{NNCQFR7K.js → UCQAWNYS.js} +1 -1
- package/dist/cdn/{5KD4GK7Y.js → UEJPBHBF.js} +1 -1
- package/dist/cdn/{RTPXDRZ7.js → UNA43DT6.js} +1 -1
- package/dist/cdn/{27G6RESZ.js → UQ575IJB.js} +1 -1
- package/dist/cdn/{YMOLIY64.js → VBZWNY3Y.js} +1 -1
- package/dist/cdn/{DZLVEIWW.js → VLY57LH7.js} +1 -1
- package/dist/cdn/{G5MDCRT6.js → VYZIBDWY.js} +1 -1
- package/dist/cdn/{DIDOZ4J6.js → WH2NFOMH.js} +5 -5
- package/dist/cdn/WJ72IM7D.js +2 -0
- package/dist/cdn/{DQ4POWIJ.js → WQTF5JT3.js} +1 -1
- package/dist/cdn/WUVRAE6I.js +2 -0
- package/dist/cdn/{7ZMHT4SH.js → WYEVMPYJ.js} +1 -1
- package/dist/cdn/X7AHXETC.js +2 -0
- package/dist/cdn/{5PUFVAJH.js → XAMESELG.js} +1 -1
- package/dist/cdn/XEC2PGQN.js +2 -0
- package/dist/cdn/XSNGR44R.js +2 -0
- package/dist/cdn/{USM62FP5.js → YBUQ5RAC.js} +3 -3
- package/dist/cdn/YLO37ZJE.js +339 -0
- package/dist/cdn/{E57JPXDR.js → YXIY7D32.js} +1 -1
- package/dist/cdn/Z2IT4SME.js +2 -0
- package/dist/cdn/Z4P77LNN.js +2 -0
- package/dist/cdn/{FZ7WJ3YG.js → Z576IK7H.js} +1 -1
- package/dist/cdn/{QI5LXFA7.js → ZBRNLRN2.js} +1 -1
- package/dist/cdn/{CWEEG5MA.js → ZJZBSHOM.js} +1 -1
- package/dist/cdn/{NM3YBQUM.js → ZLMQHBVI.js} +1 -1
- package/dist/cdn/{SIUUQBL4.js → ZLNJRKMA.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/_commonjsHelpers.js +7 -0
- package/dist/chunks/solutions-deploy-app-nav.js +1 -1
- package/dist/components/arcgis-solutions-assistant/customElement.d.ts +1 -74
- package/dist/components/arcgis-solutions-assistant/customElement.js +44786 -1515
- package/dist/components/arcgis-solutions-assistant/index.js +3 -6
- package/dist/components/consent-manager/customElement.js +154 -156
- package/dist/components/create-feature/customElement.js +1 -1
- package/dist/components/layer-table/customElement.js +1 -1
- package/dist/components/solution-details-panel/customElement.js +1 -1
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/loader.js +1 -1
- package/dist/solutions-components_commit.txt +8 -5
- package/package.json +2 -1
- package/dist/cdn/27JLIL6T.js +0 -2
- package/dist/cdn/45ZS4SG7.js +0 -2
- package/dist/cdn/7J2VRW7S.js +0 -2
- package/dist/cdn/ALB3HUJ2.js +0 -2
- package/dist/cdn/BPSXSDMN.js +0 -2
- package/dist/cdn/DIKAKOU5.js +0 -2
- package/dist/cdn/EGFXSDFS.js +0 -2
- package/dist/cdn/HBPD3T7H.js +0 -2
- package/dist/cdn/ITULTY6G.js +0 -2
- package/dist/cdn/KWCJDOZU.js +0 -2
- package/dist/cdn/QZ3GHISD.js +0 -2
- package/dist/cdn/STEJOS7Q.js +0 -2
- package/dist/cdn/TRJ6EQRD.js +0 -2
- package/dist/cdn/U3LEZXNT.js +0 -2
- package/dist/cdn/UYYMXFYQ.js +0 -2
- package/dist/cdn/V3S3BZEP.js +0 -2
- package/dist/cdn/VLZNUN6G.js +0 -174
- package/dist/cdn/WMPUJYLT.js +0 -2
- package/dist/cdn/XBR2PGVO.js +0 -7
- package/dist/cdn/XCILPMDZ.js +0 -2
- package/dist/cdn/XTDFTH5X.js +0 -2
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import{A,B as D,C as y,k as P,v as k,w,x as V,y as m,z as h}from"./F2JKSZOE.js";var b=(s,f,c)=>{let p=new Map;for(let e=f;e<=c;e++)p.set(s[e],e);return p},I=w(class extends V{constructor(s){if(super(s),s.type!==k.CHILD)throw Error("repeat() can only be used in text expressions")}dt(s,f,c){let p;c===void 0?c=f:f!==void 0&&(p=f);let e=[],n=[],o=0;for(let a of s)e[o]=p?p(a,o):o,n[o]=c(a,o),o++;return{values:n,keys:e}}render(s,f,c){return this.dt(s,f,c).values}update(s,[f,c,p]){let e=D(s),{values:n,keys:o}=this.dt(f,c,p);if(!Array.isArray(e))return this.ut=o,n;let a=this.ut??=[],u=[],v,g,t=0,l=e.length-1,r=0,i=n.length-1;for(;t<=l&&r<=i;)if(e[t]===null)t++;else if(e[l]===null)l--;else if(a[t]===o[r])u[r]=h(e[t],n[r]),t++,r++;else if(a[l]===o[i])u[i]=h(e[l],n[i]),l--,i--;else if(a[t]===o[i])u[i]=h(e[t],n[i]),m(s,u[i+1],e[t]),t++,i--;else if(a[l]===o[r])u[r]=h(e[l],n[r]),m(s,e[t],e[l]),l--,r++;else if(v===void 0&&(v=b(o,r,i),g=b(a,t,l)),v.has(a[t]))if(v.has(a[l])){let d=g.get(o[r]),x=d!==void 0?e[d]:null;if(x===null){let C=m(s,e[t]);h(C,n[r]),u[r]=C}else u[r]=h(x,n[r]),m(s,e[t],x),e[d]=null;r++}else y(e[l]),l--;else y(e[t]),t++;for(;r<=i;){let d=m(s,u[i+1]);h(d,n[r]),u[r++]=d}for(;t<=l;){let d=e[t++];d!==null&&y(d)}return this.ut=o,A(s,u),P}});export{I as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as W}from"./3AQ7U2PF.js";import"./DIKAKOU5.js";import"./S423P2GA.js";import{b as T}from"./NDUAEC62.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"./P4KZ6OZF.js";import"./QPIMTXPL.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"./SDJWXDEO.js";import"./INWDOVSJ.js";import"./3YQ3LN5J.js";import{b as T}from"./FLLZBDVI.js";import{E as h,F as n,G as b,I as a,h as u,i as r,l as _,q as y}from"./F2JKSZOE.js";import"./QPIMTXPL.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")
|