@esri/solutions-components 5.1.13 → 5.1.14
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/{BP5ZQTYK.js → 2A7FDE6T.js} +1 -1
- package/dist/cdn/{4QXIKPGO.js → 2CIYQPV2.js} +1 -1
- package/dist/cdn/{ODJ7OCZ6.js → 2WXIVPKA.js} +1 -1
- package/dist/cdn/{WPDKKXGG.js → 3CQUAISD.js} +1 -1
- package/dist/cdn/{XIUOFNHN.js → 3JF7PWPA.js} +1 -1
- package/dist/cdn/{WQUCBG6T.js → 4ESJPQUS.js} +1 -1
- package/dist/cdn/{URV3LNEF.js → 4QGYS5DL.js} +1 -1
- package/dist/cdn/{J2HB6QQJ.js → 5AGI2QC2.js} +1 -1
- package/dist/cdn/{BPZVE5D3.js → 5DMFGBJJ.js} +1 -1
- package/dist/cdn/{FTK634CB.js → 5DZ55HIG.js} +1 -1
- package/dist/cdn/{OIGQMEOA.js → 5O6454VY.js} +1 -1
- package/dist/cdn/{AHGIIRD2.js → 5O6E2RIA.js} +1 -1
- package/dist/cdn/{76MTNIFR.js → 5OMXJXRL.js} +1 -1
- package/dist/cdn/{M6KMGWHY.js → 64DMFXX3.js} +118 -118
- package/dist/cdn/{DASTXYVJ.js → 65VKA5R3.js} +1 -1
- package/dist/cdn/{QQL4IXXC.js → 6A4MHJFZ.js} +1 -1
- package/dist/cdn/{SRUCCYYK.js → 6MQWDLJ6.js} +1 -1
- package/dist/cdn/{ZSTTH25D.js → 6RHFFYNC.js} +1 -1
- package/dist/cdn/{L3DICS7J.js → 7IN2LLKR.js} +1 -1
- package/dist/cdn/{AKGLWV53.js → 7LP2DUHS.js} +1 -1
- package/dist/cdn/{PGY6VBLA.js → 7SZY3VBD.js} +1 -1
- package/dist/cdn/{LT6TNRF6.js → 7ZZNR4FQ.js} +1 -1
- package/dist/cdn/{SYKVEYMY.js → ABPXUFXN.js} +1 -1
- package/dist/cdn/{EGBJGHKB.js → AIUJXRA5.js} +1 -1
- package/dist/cdn/{HWD4BGMW.js → AONULVO2.js} +1 -1
- package/dist/cdn/{U26OIB2P.js → AQ2USXUY.js} +1 -1
- package/dist/cdn/{WZSXP6GC.js → BA3J7L5N.js} +1 -1
- package/dist/cdn/{NT2KAJ24.js → BAVVBOOM.js} +1 -1
- package/dist/cdn/{WQ5UIZ6O.js → BDVFJJR4.js} +1 -1
- package/dist/cdn/{6VUGQJW4.js → BOA6VQK6.js} +1 -1
- package/dist/cdn/BPHZAC66.js +2 -0
- package/dist/cdn/{NISCRPTA.js → CNNBPMQT.js} +1 -1
- package/dist/cdn/{TCPO7PEE.js → CNV2ZCFA.js} +1 -1
- package/dist/cdn/{3562Z3EC.js → COEHM4BJ.js} +1 -1
- package/dist/cdn/{EXPBVOCZ.js → COJMQQT5.js} +1 -1
- package/dist/cdn/{DZ6PL4HK.js → COKMQSEA.js} +1 -1
- package/dist/cdn/{2EEHG5XR.js → CPWYI2FO.js} +1 -1
- package/dist/cdn/{GDBULXEH.js → D65S424V.js} +1 -1
- package/dist/cdn/{UZVU2CPJ.js → DERWSE25.js} +1 -1
- package/dist/cdn/{NTFCCNHZ.js → DMMSPGOK.js} +1 -1
- package/dist/cdn/{X5HRQ34A.js → ECJQJ4BY.js} +1 -1
- package/dist/cdn/{WB4DH4SS.js → F5EJPIW4.js} +1 -1
- package/dist/cdn/{XYGCPNIM.js → FLPXST7W.js} +1 -1
- package/dist/cdn/{OQUU2BPX.js → FPF7E4SX.js} +1 -1
- package/dist/cdn/{YTIFVDAA.js → FX2C3BL4.js} +1 -1
- package/dist/cdn/{DP6WOAWH.js → G2OBSHPX.js} +1 -1
- package/dist/cdn/{PHCPY4ZR.js → GEEQWXOZ.js} +1 -1
- package/dist/cdn/{R2UFZXIQ.js → GWLE7PJQ.js} +1 -1
- package/dist/cdn/{CEQ7OSXE.js → H3QX6XOJ.js} +1 -1
- package/dist/cdn/{3Q6BLEUW.js → HBB7AS7K.js} +1 -1
- package/dist/cdn/{YCHAOPMX.js → HW4LYJUR.js} +1 -1
- package/dist/cdn/{AO6C3Y72.js → IBSFJBIL.js} +1 -1
- package/dist/cdn/{K64MB7UB.js → IDJHBEJC.js} +1 -1
- package/dist/cdn/{U2J33BNN.js → ILEHAZV2.js} +1 -1
- package/dist/cdn/{DUFBYCNV.js → IYZ2PDYK.js} +1 -1
- package/dist/cdn/{KMN7UYCS.js → JNZBNQ3F.js} +1 -1
- package/dist/cdn/JRUIRTL7.js +2 -0
- package/dist/cdn/JU2Q5KMI.js +358 -0
- package/dist/cdn/{KXJZZIT3.js → JXERXJF5.js} +1 -1
- package/dist/cdn/{Q5USRVF5.js → K3ALRIQF.js} +1 -1
- package/dist/cdn/{XT7FRIZE.js → KC3LIHE2.js} +1 -1
- package/dist/cdn/{IHC3D35G.js → KF64ALRP.js} +1 -1
- package/dist/cdn/{7MHXB6MA.js → KJTTBON2.js} +1 -1
- package/dist/cdn/{LQHZEFT7.js → KN2PNGQX.js} +1 -1
- package/dist/cdn/{TBPIA7X3.js → KOIHVAUY.js} +1 -1
- package/dist/cdn/{YKWVEXEV.js → L5DQOHD5.js} +1 -1
- package/dist/cdn/{7NRAPL4U.js → LGJMYSGU.js} +1 -1
- package/dist/cdn/{7TAWNPBZ.js → LX3ZJGZ3.js} +1 -1
- package/dist/cdn/{MPOW6X2Q.js → M6CYGIKU.js} +1 -1
- package/dist/cdn/{AK6SGWFY.js → MBZESGLB.js} +1 -1
- package/dist/cdn/{YRN3GNV2.js → MECI4R4R.js} +1 -1
- package/dist/cdn/{TM3HQUQN.js → MXLUHQFQ.js} +1 -1
- package/dist/cdn/{ZNNM4VOZ.js → NF77ALHM.js} +1 -1
- package/dist/cdn/{WDSHKWCQ.js → O37KXBBH.js} +1 -1
- package/dist/cdn/{QAVOSU5J.js → O3FK6QQ2.js} +1 -1
- package/dist/cdn/{WFFDEQ3T.js → O62JG2Y6.js} +1 -1
- package/dist/cdn/{SSE3OV4D.js → OJH4NUGT.js} +1 -1
- package/dist/cdn/{YZCNLWCK.js → OQMMSCLX.js} +1 -1
- package/dist/cdn/{E33FRS3A.js → OZVQRDTO.js} +1 -1
- package/dist/cdn/{E7C4ISUJ.js → P3YHSJCB.js} +1 -1
- package/dist/cdn/{2PTMXOMF.js → PHGSNNMQ.js} +1 -1
- package/dist/cdn/{H3NTIWHD.js → QBPJLGAM.js} +1 -1
- package/dist/cdn/{TWCRSSGO.js → QLTSABSA.js} +1 -1
- package/dist/cdn/{2GXKCJ2T.js → QMUSSZL2.js} +1 -1
- package/dist/cdn/{5Z4SUP7T.js → QNGGDSZS.js} +1 -1
- package/dist/cdn/{ZGEPGEKV.js → QPMXVWMP.js} +1 -1
- package/dist/cdn/{FETSFCBL.js → QPQKALNN.js} +1 -1
- package/dist/cdn/{UK7FBP7U.js → RD7MZ7SN.js} +1 -1
- package/dist/cdn/{T5H5QDAS.js → RGOUIRT7.js} +1 -1
- package/dist/cdn/{CL3AYK25.js → RI7U6FA5.js} +1 -1
- package/dist/cdn/{N63JOPKM.js → RPLXKWJA.js} +1 -1
- package/dist/cdn/{NYLOU7ZM.js → RSJVFZPY.js} +1 -1
- package/dist/cdn/{CTCWANBA.js → RUPNX57X.js} +1 -1
- package/dist/cdn/{HXRZFGOY.js → RX2VR5KK.js} +1 -1
- package/dist/cdn/{ZDXFFQJI.js → SEBM4AAA.js} +1 -1
- package/dist/cdn/{2S26J4GF.js → SNRLIWGC.js} +1 -1
- package/dist/cdn/{BOTOPHKQ.js → SOELU2Q6.js} +1 -1
- package/dist/cdn/{VINK2SLZ.js → SONZCBAV.js} +1 -1
- package/dist/cdn/{MCHVWDD7.js → SSNO5VHY.js} +1 -1
- package/dist/cdn/{Z7SEICRM.js → ST2WEDFS.js} +1 -1
- package/dist/cdn/{3ADRLEU7.js → SV2XM7U2.js} +1 -1
- package/dist/cdn/{7QSOGNZM.js → SYHEO472.js} +1 -1
- package/dist/cdn/{FM47F4IP.js → SZYWQAVW.js} +1 -1
- package/dist/cdn/{3BNJMNCD.js → T5DCIH4Q.js} +1 -1
- package/dist/cdn/{7Q5LNER7.js → T6F3TWF6.js} +1 -1
- package/dist/cdn/{JLQOOJFJ.js → T7JWS4CF.js} +1 -1
- package/dist/cdn/{YQI2AE2N.js → TBB4KG37.js} +1 -1
- package/dist/cdn/{3DWPAQFI.js → TRNQ5OTY.js} +1 -1
- package/dist/cdn/{3VP33LM6.js → TTXN5R4E.js} +1 -1
- package/dist/cdn/{6R6R4TFH.js → U4D4YJ7L.js} +1 -1
- package/dist/cdn/{6OHUYDZC.js → UK5XQCTX.js} +1 -1
- package/dist/cdn/{WRO2YCVL.js → UNN6SVUI.js} +1 -1
- package/dist/cdn/{UNGZMOQE.js → VCKCRMSD.js} +1 -1
- package/dist/cdn/{RFKW5BFU.js → VM2LS6TR.js} +1 -1
- package/dist/cdn/{AZJ5EUBD.js → VNWIFVKC.js} +1 -1
- package/dist/cdn/{YMJF3GAO.js → VW4UJ7IY.js} +1 -1
- package/dist/cdn/{5DFDXWTM.js → VWNMKVMJ.js} +1 -1
- package/dist/cdn/{KIGTSUFO.js → VYOCZUVH.js} +1 -1
- package/dist/cdn/{7ESYN6XO.js → W6GIBBBE.js} +1 -1
- package/dist/cdn/{S2E4VZKV.js → WCFHQRWL.js} +1 -1
- package/dist/cdn/{2MNK2M2M.js → WMXP3LPH.js} +1 -1
- package/dist/cdn/{QCME7YYI.js → WQUZG2NJ.js} +1 -1
- package/dist/cdn/{QCLWTDIC.js → WVRDKKBC.js} +1 -1
- package/dist/cdn/{LJTZPQQH.js → X3YWKGD7.js} +1 -1
- package/dist/cdn/{NFLDV2BR.js → XGUD7O6G.js} +1 -1
- package/dist/cdn/{JH2LBLK4.js → XRQNNWH3.js} +1 -1
- package/dist/cdn/{LFBK5LL3.js → Y2Y7HUJR.js} +1 -1
- package/dist/cdn/{COSMV4TW.js → YEER3LD7.js} +1 -1
- package/dist/cdn/{S5QUASO4.js → YEMYE6JK.js} +1 -1
- package/dist/cdn/{DQHGHZDB.js → YGVATVII.js} +1 -1
- package/dist/cdn/{2W2FGE2Q.js → YR6F4HW7.js} +1 -1
- package/dist/cdn/{2VVUA5HG.js → Z4LGN5M5.js} +1 -1
- package/dist/cdn/{PFI2WBBU.js → ZFPRM3GK.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/runtime.js +1 -1
- package/dist/components/solutions-deploy-app/customElement.js +3 -3
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/solutions-components_commit.txt +9 -6
- package/package.json +1 -1
- package/dist/cdn/JGPIG5MJ.js +0 -358
- package/dist/cdn/VQ7WZGV2.js +0 -2
- package/dist/cdn/XXE533EC.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as S}from"./PPFEO3UH.js";import{a as _}from"./BOTOPHKQ.js";import{b as L}from"./CTCWANBA.js";import{d as w}from"./QMAV4UTN.js";import"./Y2AUIXNK.js";import{F as l,G as o,H as v,h as y,i as c,q as p}from"./T3EPRHTT.js";import"./EXBEKVP5.js";export default $arcgis.t(([b,B,V,k,{execute:A},{formatNumber:D,prefersRTL:x,getLocale:I,convertNumberFormatToIntlOptions:O},E,R,u,U,z,C])=>{var F=y`:host{--default-width: 375px;--width: var(--default-width);--padding: 10px;--border-style: 1px solid var(--calcite-color-border-1);--calcite-icon-color: var(--calcite-color-text-3);display:block;background:var(--background-color, var(--calcite-color-foreground-1));color:var(--calcite-color-text-1);font-size:var(--calcite-font-size--1);box-sizing:border-box}::slotted(arcgis-sketch),::slotted(arcgis-search){display:flex;justify-content:center;align-items:center}::slotted(arcgis-sketch){--calcite-action-bar-shadow: none;--calcite-action-bar-corner-radius: none;--calcite-action-group-border-color: var(--calcite-color-border-1)}::slotted(arcgis-search){width:100%;padding:var(--padding)}[hidden]{display:none}[role=dialog]{width:var(--width);>*{padding-inline:var(--padding)}}header calcite-input-message{margin-block-end:var(--calcite-spacing-lg)}h2{color:inherit;font-size:inherit;font-weight:var(--calcite-font-weight-medium);line-height:1;margin-block:var(--padding);padding-block-end:var(--calcite-spacing-md);border-bottom:var(--calcite-border-width-sm) solid var(--calcite-color-border-1)}.border-bottom{height:1px;border-bottom:var(--border-style)}calcite-label:first-of-type span{padding-block-start:var(--padding)}.buffer-labels-label{margin-block:var(--padding);>span{display:flex;justify-content:space-between;width:100%}}.main-buttons-wrapper{display:flex;flex-direction:column;gap:var(--padding);padding-block:var(--padding)}`,T=O({places:1,digitSeparator:!0});function P({bufferDistance:s,bufferGraphic:e,bufferUnit:t,unitsAbbrLookup:i,view:a}){try{let n=W(s,t,i),r=j(n,a.type==="3d"),h=q(e.geometry);return new k({symbol:r,geometry:h})}catch(n){console.error(String(n))}}function W(s,e,t){let i=t[e],a=D(s,T);return x(I())?`${i} ${a}`:`${a} ${i}`}function j(s,e){return e?new R({verticalOffset:{screenLength:40,maxWorldLength:60,minWorldLength:20},symbolLayers:[new E({font:{size:12,family:"sans-serif"},text:s,halo:{color:[0,0,0],size:1},material:{color:"white"},size:12})]}):new V({color:"white",haloColor:"black",haloSize:"1px",text:s,xoffset:0,yoffset:30,font:{size:12,family:"sans-serif"}})}function q(s){try{return A(s)}catch(e){console.error(String(e))}}var d={style:"solid",color:[100,100,100,.5],outline:{color:[255,255,255,255],width:1.5}};function M(s,e){return new z({geometry:s,symbol:e})}async function $({graphic:s,distance:e,unit:t,isGeodesic:i}){i&&!u.isLoaded()&&await u.load();let a=i?u:U;try{let n={unit:t},r=a.execute(s.geometry,e,n);if(!r)throw new Error("buffer failed");return r}catch(n){console.error(String(n))}}async function N({graphic:s,unit:e,isGeodesic:t,distanceValues:i}){let a=0,n=s,r=[];for(;a<i.length;){let h=i[a],f=await $({graphic:s,distance:h,unit:e,isGeodesic:t});if(!f)continue;let m=C.execute(f,n.geometry);m&&r.push(m),n=M(f,s.symbol),a++}return r}function G(s){let e=s?.assignedElements?.({flatten:!0});if(e?.length)return e.at(0)}var J=["meters","kilometers","miles","yards","feet","us-feet"],g=class extends v{constructor(){super(),this._messages=_({name:"instant-apps-buffer",blocking:!0}),this.#t=l(),this.#e=l(),this.#s=l(),this.#a=l(),this.#r=l(),this.inputMethod="select-feature",this.bufferLabelsVisible=!1,this.inputGraphics=[],this.bufferUnit="miles",this.bufferInputStep=1,this.bufferDistance=1,this.bufferMinDistance=.1,this.bufferMaxDistance=1e6,this.geodesicBufferEnabled=!1,this.bufferColor=d.color,this.bufferStyle=d.style,this.bufferOutlineColor=d.outline.color,this.bufferOutlineWidth=d.outline.width,this.elevationInfoMode="on-the-ground",this.arcgisPropertyChange=w()("inputMethod","inputGraphics"),this.arcgisBufferCreate=p(),this.arcgisBufferClear=p(),this.bufferLayer=new b({title:"buffer-graphics",listMode:"hide"}),this.bufferLabelsLayer=new b({title:"buffer-graphics-labels",visible:this.bufferLabelsVisible,listMode:"hide"}),this.miscGraphicsLayer=new b({title:"misc-graphics",listMode:"hide"}),this.listen("calciteRadioButtonGroupChange",this._handleBufferInputChange),this.listen("arcgisCreate",this._handleArcgisSketchEventCreate),this.listen("arcgisDelete",this._handleArcgisSketchEventDelete),this.listen("arcgisSearchClear",this._handleArcgisSearchClear),this.listen("arcgisSelectResult",this._handleArcgisSearchSelect),this.listen("arcgisPropertyChange",this._onArcgisPropertyChange)}static{this.properties={inputMethod:131,bufferLayer:0,bufferLabelsLayer:0,miscGraphicsLayer:0,bufferLabelsVisible:135,inputGraphics:0,view:0,sources:0,bufferUnit:131,bufferInputStep:139,bufferDistance:139,distanceValuesSorted:32,bufferMinDistance:139,bufferMaxDistance:139,geodesicBufferEnabled:135,readyToBuffer:32,bufferColor:0,bufferStyle:1,bufferOutlineColor:0,bufferOutlineWidth:9,bufferGraphicSymbol:32,elevationInfoMode:1}}static{this.styles=F}#t;#e;#s;#a;#r;get#i(){let e=this.#a.value;return G(e)}get#n(){let e=this.#r.value;return G(e)}get distanceValuesSorted(){return this.#s.value?.distanceValuesSorted||[]}get readyToBuffer(){return!!this.view&&!!this.bufferLayer&&!!this.inputGraphics?.length&&!!this.distanceValuesSorted?.length}get bufferGraphicSymbol(){let e=typeof this.bufferOutlineWidth=="number"&&this.bufferOutlineWidth>0,t=typeof this.bufferOutlineColor<"u"&&e;return new B({color:this.bufferColor,style:this.bufferStyle,outline:t?{color:this.bufferOutlineColor,width:this.bufferOutlineWidth}:null})}async clearBufferLayer(){this._clearBufferLayer()}async setFocus(){this.#t.value&&await this.#t.value.setFocus()}async setSelectionInput(e){let t=e.clone();this.inputMethod="select-feature",await this.updateComplete,await this.#e.value?.componentOnReady(),this.miscGraphicsLayer?.add(t),this.#e.value?.selectionManager?.add(this.miscGraphicsLayer,[t]),await this.updateComplete,await new Promise(i=>window.requestAnimationFrame(i)),this.inputGraphics=[t]}async setAddedBufferDistance(){let e=this.#s.value;await e.componentOnReady(),e.clearDistanceValues(),await e.updateComplete,e.bufferDistance=this.bufferDistance,e.maybeAddDistanceValue()}async cancelActiveSelection(){let e=this.#e.value;e&&e.toolbarState==="active"&&(await e.componentOnReady(),e.selectionToolbarViewModel?.cancel(),e.enabledTool=null)}async cancelSketchAction(){let e=this.#i;e&&e.state==="active"&&(await e.componentOnReady(),await e.cancel())}willUpdate(e){this.view&&this.view.type==="3d"&&(e.has("view")||e.has("elevationInfoMode"))&&(this.bufferLayer.elevationInfo={mode:this.elevationInfoMode}),e.has("bufferLabelsVisible")&&this.bufferLabelsLayer&&(this.bufferLabelsLayer.visible=this.bufferLabelsVisible),e.has("view")&&this.view&&this.view!==e.get("view")&&this.view.when().then(()=>{this.view.map&&!this.view.map.layers.includes(this.miscGraphicsLayer)&&this.view.map.add(this.miscGraphicsLayer)}),e.has("sources")&&this.sources&&(this.sources?.includes(this.miscGraphicsLayer)||this.sources.add(this.miscGraphicsLayer))}_handleBufferInputChange(){let e=(this.#t.value.shadowRoot?.querySelector("calcite-radio-button-group")).selectedItem.value;this.inputMethod=e}_handleArcgisSketchEventCreate(e){e.detail.state==="complete"&&this._assignInputGraphicsFromArcgisSketch()}_handleArcgisSketchEventDelete(e){this._assignInputGraphicsFromArcgisSketch()}_assignInputGraphicsFromArcgisSketch(){this.#i&&(this.inputGraphics=[...this.#i?.layer?.graphics?.toArray()??[]])}async _handleArcgisSearchSelect(){let e=this.#n.resultGraphic;e&&(this.inputGraphics=[e.clone()])}_handleArcgisSearchClear(){this.inputGraphics=[]}async _handleSelectionChange(e){this._getSelectedGraphics(),this._maybeClearMiscGraphicsOnDeselect(e)}async _getSelectedGraphics(){let e=await this.#e.value.getSelectedFeatures(),t=[];for(let i of e)t=[...t,...i.data.features];this.inputGraphics=t}_maybeClearMiscGraphicsOnDeselect(e){if(!e.detail?.changes?.length)return;let{changes:t}=e.detail;t.some(({removed:i,layer:a})=>i?.length&&a===this.miscGraphicsLayer)&&this._clearMiscGraphicsLayer()}_clearMiscGraphicsLayer(){this.miscGraphicsLayer?.graphics?.removeAll()}_onLabelsSwitchChange(e){this.bufferLabelsVisible=e.target.checked}_clearBufferLayer(){this.bufferLayer?.removeAll()}_clearBufferLabelsLayer(){this.bufferLabelsLayer?.removeAll()}async _onCreateBufferClick(){this._handleBufferValidation(),await this._bufferInputGraphics()}_handleBufferValidation(){this._handleBufferInputValidation(),this._handleBufferDistanceValidation()}_handleBufferInputValidation(){let e=this.#t.value;e&&(this.inputGraphics.length?e.showErrorMessage=!1:e.showErrorMessage=!0)}_handleBufferDistanceValidation(){let e=this.#s.value;e&&(this.distanceValuesSorted.length?e.showMissingDistanceValueErrorMessage=!1:e.showMissingDistanceValueErrorMessage=!0)}_clearAllGraphics(){this.inputGraphics=[],this._clearBufferLayer(),this._clearBufferLabelsLayer(),this._clearMiscGraphicsLayer(),this.#e?.value?.clearSelection?.(),this.#n?.clear?.(),this.#i?.cancel?.(),this.#i?.delete?.(),this.#i?.layer?.removeAll?.(),this.arcgisBufferClear.emit()}_onArcgisPropertyChange(e){e.detail.name==="inputGraphics"&&this.inputGraphics.length&&this._handleBufferInputValidation()}_onBufferUnitChange(e){let t=e.target.value;this.bufferUnit=t}async _bufferInputGraphics(){if(!this.readyToBuffer)return;this.view.map?.layers.includes(this.bufferLayer)?this.bufferLayer.removeAll():this.view.map.add(this.bufferLayer),this.view.map?.layers.includes(this.bufferLabelsLayer)?this.bufferLabelsLayer.removeAll():this.view.map.add(this.bufferLabelsLayer);let e=[];for(let a of this.inputGraphics){let n={graphic:a,unit:this.bufferUnit,isGeodesic:this.geodesicBufferEnabled},r;this.distanceValuesSorted.length>1&&(r=N({...n,distanceValues:this.distanceValuesSorted})),this.distanceValuesSorted?.length===1&&(r=$({...n,distance:this.distanceValuesSorted[0]})),e.push(r)}let t=this.bufferGraphicSymbol,i=await Promise.all(e).catch(a=>console.error(String(a)));if(i&&i?.length){let a=i.flat().filter(r=>!!r).map(r=>M(r,t)),n=a.map((r,h)=>{let f=this.distanceValuesSorted[h%this.distanceValuesSorted.length];return P({bufferGraphic:r,bufferDistance:f,bufferUnit:this.bufferUnit,view:this.view,unitsAbbrLookup:this._messages.unitsAbbr})});this.bufferLayer.addMany(a),this.bufferLabelsLayer.addMany(n),this.arcgisBufferCreate.emit()}}_renderInputMethod(){return this.inputMethod==="select-feature"?c`<instant-apps-selection-toolbar .view=${this.view} .sources=${this.sources} @selectionChange=${this._handleSelectionChange} continuous-selection-enabled selection-operation-type=add ${o(this.#e)}></instant-apps-selection-toolbar>`:this.inputMethod==="draw-graphic"?c`<slot name=arcgis-sketch ${o(this.#a)}></slot>`:this.inputMethod==="search-location"?c`<slot name=arcgis-search ${o(this.#r)}></slot>`:null}render(){return c`<div role=dialog aria-labelledby=buffer-title><header><h2 id=buffer-title>${this._messages.title}</h2><calcite-input-message icon=information>${this._messages.labels.helpText}</calcite-input-message></header><instant-apps-buffer-input-radiogroup .labels=${this._messages.inputRadioButtonLabels} .selectedValue=${this.inputMethod} ${o(this.#t)}></instant-apps-buffer-input-radiogroup>${this._renderInputMethod()}<instant-apps-buffer-distance-manager .bufferDistance=${this.bufferDistance} .bufferInputStep=${this.bufferInputStep} .bufferMinDistance=${this.bufferMinDistance} .bufferMaxDistance=${this.bufferMaxDistance} .labels=${this._messages.labels} ${o(this.#s)}></instant-apps-buffer-distance-manager><calcite-label><span>${this._messages.labels.unit}</span><calcite-select .label=${this._messages.labels.unit} @calciteSelectChange=${this._onBufferUnitChange}>${S(J,e=>e,e=>c`<calcite-option .value=${e} .selected=${this.bufferUnit===e}>${this._messages.units[e]}</calcite-option>`)}</calcite-select></calcite-label><calcite-label class="buffer-labels-label" layout=inline><span><span>${this._messages.labels.showDistanceLabel}</span><calcite-switch .checked=${this.bufferLabelsVisible} @calciteSwitchChange=${this._onLabelsSwitchChange}></calcite-switch></span></calcite-label><div class="main-buttons-wrapper"><calcite-button @click=${this._onCreateBufferClick}>${this._messages.labels.draw}</calcite-button><calcite-button appearance=outline @click=${this._clearAllGraphics}>${this._messages.labels.clear}</calcite-button></div></div>`}};L("instant-apps-buffer",g);return g},"layers/GraphicsLayer","symbols/SimpleFillSymbol","symbols/TextSymbol","Graphic","geometry/operators/labelPointOperator","intl","symbols/TextSymbol3DLayer","symbols/PointSymbol3D","geometry/operators/geodesicBufferOperator","geometry/operators/bufferOperator","Graphic","geometry/operators/differenceOperator")
|
|
2
|
+
import{a as S}from"./PPFEO3UH.js";import{a as _}from"./SOELU2Q6.js";import{b as L}from"./RUPNX57X.js";import{d as w}from"./QMAV4UTN.js";import"./Y2AUIXNK.js";import{F as l,G as o,H as v,h as y,i as c,q as p}from"./T3EPRHTT.js";import"./EXBEKVP5.js";export default $arcgis.t(([b,B,V,k,{execute:A},{formatNumber:D,prefersRTL:x,getLocale:I,convertNumberFormatToIntlOptions:O},E,R,u,U,z,C])=>{var F=y`:host{--default-width: 375px;--width: var(--default-width);--padding: 10px;--border-style: 1px solid var(--calcite-color-border-1);--calcite-icon-color: var(--calcite-color-text-3);display:block;background:var(--background-color, var(--calcite-color-foreground-1));color:var(--calcite-color-text-1);font-size:var(--calcite-font-size--1);box-sizing:border-box}::slotted(arcgis-sketch),::slotted(arcgis-search){display:flex;justify-content:center;align-items:center}::slotted(arcgis-sketch){--calcite-action-bar-shadow: none;--calcite-action-bar-corner-radius: none;--calcite-action-group-border-color: var(--calcite-color-border-1)}::slotted(arcgis-search){width:100%;padding:var(--padding)}[hidden]{display:none}[role=dialog]{width:var(--width);>*{padding-inline:var(--padding)}}header calcite-input-message{margin-block-end:var(--calcite-spacing-lg)}h2{color:inherit;font-size:inherit;font-weight:var(--calcite-font-weight-medium);line-height:1;margin-block:var(--padding);padding-block-end:var(--calcite-spacing-md);border-bottom:var(--calcite-border-width-sm) solid var(--calcite-color-border-1)}.border-bottom{height:1px;border-bottom:var(--border-style)}calcite-label:first-of-type span{padding-block-start:var(--padding)}.buffer-labels-label{margin-block:var(--padding);>span{display:flex;justify-content:space-between;width:100%}}.main-buttons-wrapper{display:flex;flex-direction:column;gap:var(--padding);padding-block:var(--padding)}`,T=O({places:1,digitSeparator:!0});function P({bufferDistance:s,bufferGraphic:e,bufferUnit:t,unitsAbbrLookup:i,view:a}){try{let n=W(s,t,i),r=j(n,a.type==="3d"),h=q(e.geometry);return new k({symbol:r,geometry:h})}catch(n){console.error(String(n))}}function W(s,e,t){let i=t[e],a=D(s,T);return x(I())?`${i} ${a}`:`${a} ${i}`}function j(s,e){return e?new R({verticalOffset:{screenLength:40,maxWorldLength:60,minWorldLength:20},symbolLayers:[new E({font:{size:12,family:"sans-serif"},text:s,halo:{color:[0,0,0],size:1},material:{color:"white"},size:12})]}):new V({color:"white",haloColor:"black",haloSize:"1px",text:s,xoffset:0,yoffset:30,font:{size:12,family:"sans-serif"}})}function q(s){try{return A(s)}catch(e){console.error(String(e))}}var d={style:"solid",color:[100,100,100,.5],outline:{color:[255,255,255,255],width:1.5}};function M(s,e){return new z({geometry:s,symbol:e})}async function $({graphic:s,distance:e,unit:t,isGeodesic:i}){i&&!u.isLoaded()&&await u.load();let a=i?u:U;try{let n={unit:t},r=a.execute(s.geometry,e,n);if(!r)throw new Error("buffer failed");return r}catch(n){console.error(String(n))}}async function N({graphic:s,unit:e,isGeodesic:t,distanceValues:i}){let a=0,n=s,r=[];for(;a<i.length;){let h=i[a],f=await $({graphic:s,distance:h,unit:e,isGeodesic:t});if(!f)continue;let m=C.execute(f,n.geometry);m&&r.push(m),n=M(f,s.symbol),a++}return r}function G(s){let e=s?.assignedElements?.({flatten:!0});if(e?.length)return e.at(0)}var J=["meters","kilometers","miles","yards","feet","us-feet"],g=class extends v{constructor(){super(),this._messages=_({name:"instant-apps-buffer",blocking:!0}),this.#t=l(),this.#e=l(),this.#s=l(),this.#a=l(),this.#r=l(),this.inputMethod="select-feature",this.bufferLabelsVisible=!1,this.inputGraphics=[],this.bufferUnit="miles",this.bufferInputStep=1,this.bufferDistance=1,this.bufferMinDistance=.1,this.bufferMaxDistance=1e6,this.geodesicBufferEnabled=!1,this.bufferColor=d.color,this.bufferStyle=d.style,this.bufferOutlineColor=d.outline.color,this.bufferOutlineWidth=d.outline.width,this.elevationInfoMode="on-the-ground",this.arcgisPropertyChange=w()("inputMethod","inputGraphics"),this.arcgisBufferCreate=p(),this.arcgisBufferClear=p(),this.bufferLayer=new b({title:"buffer-graphics",listMode:"hide"}),this.bufferLabelsLayer=new b({title:"buffer-graphics-labels",visible:this.bufferLabelsVisible,listMode:"hide"}),this.miscGraphicsLayer=new b({title:"misc-graphics",listMode:"hide"}),this.listen("calciteRadioButtonGroupChange",this._handleBufferInputChange),this.listen("arcgisCreate",this._handleArcgisSketchEventCreate),this.listen("arcgisDelete",this._handleArcgisSketchEventDelete),this.listen("arcgisSearchClear",this._handleArcgisSearchClear),this.listen("arcgisSelectResult",this._handleArcgisSearchSelect),this.listen("arcgisPropertyChange",this._onArcgisPropertyChange)}static{this.properties={inputMethod:131,bufferLayer:0,bufferLabelsLayer:0,miscGraphicsLayer:0,bufferLabelsVisible:135,inputGraphics:0,view:0,sources:0,bufferUnit:131,bufferInputStep:139,bufferDistance:139,distanceValuesSorted:32,bufferMinDistance:139,bufferMaxDistance:139,geodesicBufferEnabled:135,readyToBuffer:32,bufferColor:0,bufferStyle:1,bufferOutlineColor:0,bufferOutlineWidth:9,bufferGraphicSymbol:32,elevationInfoMode:1}}static{this.styles=F}#t;#e;#s;#a;#r;get#i(){let e=this.#a.value;return G(e)}get#n(){let e=this.#r.value;return G(e)}get distanceValuesSorted(){return this.#s.value?.distanceValuesSorted||[]}get readyToBuffer(){return!!this.view&&!!this.bufferLayer&&!!this.inputGraphics?.length&&!!this.distanceValuesSorted?.length}get bufferGraphicSymbol(){let e=typeof this.bufferOutlineWidth=="number"&&this.bufferOutlineWidth>0,t=typeof this.bufferOutlineColor<"u"&&e;return new B({color:this.bufferColor,style:this.bufferStyle,outline:t?{color:this.bufferOutlineColor,width:this.bufferOutlineWidth}:null})}async clearBufferLayer(){this._clearBufferLayer()}async setFocus(){this.#t.value&&await this.#t.value.setFocus()}async setSelectionInput(e){let t=e.clone();this.inputMethod="select-feature",await this.updateComplete,await this.#e.value?.componentOnReady(),this.miscGraphicsLayer?.add(t),this.#e.value?.selectionManager?.add(this.miscGraphicsLayer,[t]),await this.updateComplete,await new Promise(i=>window.requestAnimationFrame(i)),this.inputGraphics=[t]}async setAddedBufferDistance(){let e=this.#s.value;await e.componentOnReady(),e.clearDistanceValues(),await e.updateComplete,e.bufferDistance=this.bufferDistance,e.maybeAddDistanceValue()}async cancelActiveSelection(){let e=this.#e.value;e&&e.toolbarState==="active"&&(await e.componentOnReady(),e.selectionToolbarViewModel?.cancel(),e.enabledTool=null)}async cancelSketchAction(){let e=this.#i;e&&e.state==="active"&&(await e.componentOnReady(),await e.cancel())}willUpdate(e){this.view&&this.view.type==="3d"&&(e.has("view")||e.has("elevationInfoMode"))&&(this.bufferLayer.elevationInfo={mode:this.elevationInfoMode}),e.has("bufferLabelsVisible")&&this.bufferLabelsLayer&&(this.bufferLabelsLayer.visible=this.bufferLabelsVisible),e.has("view")&&this.view&&this.view!==e.get("view")&&this.view.when().then(()=>{this.view.map&&!this.view.map.layers.includes(this.miscGraphicsLayer)&&this.view.map.add(this.miscGraphicsLayer)}),e.has("sources")&&this.sources&&(this.sources?.includes(this.miscGraphicsLayer)||this.sources.add(this.miscGraphicsLayer))}_handleBufferInputChange(){let e=(this.#t.value.shadowRoot?.querySelector("calcite-radio-button-group")).selectedItem.value;this.inputMethod=e}_handleArcgisSketchEventCreate(e){e.detail.state==="complete"&&this._assignInputGraphicsFromArcgisSketch()}_handleArcgisSketchEventDelete(e){this._assignInputGraphicsFromArcgisSketch()}_assignInputGraphicsFromArcgisSketch(){this.#i&&(this.inputGraphics=[...this.#i?.layer?.graphics?.toArray()??[]])}async _handleArcgisSearchSelect(){let e=this.#n.resultGraphic;e&&(this.inputGraphics=[e.clone()])}_handleArcgisSearchClear(){this.inputGraphics=[]}async _handleSelectionChange(e){this._getSelectedGraphics(),this._maybeClearMiscGraphicsOnDeselect(e)}async _getSelectedGraphics(){let e=await this.#e.value.getSelectedFeatures(),t=[];for(let i of e)t=[...t,...i.data.features];this.inputGraphics=t}_maybeClearMiscGraphicsOnDeselect(e){if(!e.detail?.changes?.length)return;let{changes:t}=e.detail;t.some(({removed:i,layer:a})=>i?.length&&a===this.miscGraphicsLayer)&&this._clearMiscGraphicsLayer()}_clearMiscGraphicsLayer(){this.miscGraphicsLayer?.graphics?.removeAll()}_onLabelsSwitchChange(e){this.bufferLabelsVisible=e.target.checked}_clearBufferLayer(){this.bufferLayer?.removeAll()}_clearBufferLabelsLayer(){this.bufferLabelsLayer?.removeAll()}async _onCreateBufferClick(){this._handleBufferValidation(),await this._bufferInputGraphics()}_handleBufferValidation(){this._handleBufferInputValidation(),this._handleBufferDistanceValidation()}_handleBufferInputValidation(){let e=this.#t.value;e&&(this.inputGraphics.length?e.showErrorMessage=!1:e.showErrorMessage=!0)}_handleBufferDistanceValidation(){let e=this.#s.value;e&&(this.distanceValuesSorted.length?e.showMissingDistanceValueErrorMessage=!1:e.showMissingDistanceValueErrorMessage=!0)}_clearAllGraphics(){this.inputGraphics=[],this._clearBufferLayer(),this._clearBufferLabelsLayer(),this._clearMiscGraphicsLayer(),this.#e?.value?.clearSelection?.(),this.#n?.clear?.(),this.#i?.cancel?.(),this.#i?.delete?.(),this.#i?.layer?.removeAll?.(),this.arcgisBufferClear.emit()}_onArcgisPropertyChange(e){e.detail.name==="inputGraphics"&&this.inputGraphics.length&&this._handleBufferInputValidation()}_onBufferUnitChange(e){let t=e.target.value;this.bufferUnit=t}async _bufferInputGraphics(){if(!this.readyToBuffer)return;this.view.map?.layers.includes(this.bufferLayer)?this.bufferLayer.removeAll():this.view.map.add(this.bufferLayer),this.view.map?.layers.includes(this.bufferLabelsLayer)?this.bufferLabelsLayer.removeAll():this.view.map.add(this.bufferLabelsLayer);let e=[];for(let a of this.inputGraphics){let n={graphic:a,unit:this.bufferUnit,isGeodesic:this.geodesicBufferEnabled},r;this.distanceValuesSorted.length>1&&(r=N({...n,distanceValues:this.distanceValuesSorted})),this.distanceValuesSorted?.length===1&&(r=$({...n,distance:this.distanceValuesSorted[0]})),e.push(r)}let t=this.bufferGraphicSymbol,i=await Promise.all(e).catch(a=>console.error(String(a)));if(i&&i?.length){let a=i.flat().filter(r=>!!r).map(r=>M(r,t)),n=a.map((r,h)=>{let f=this.distanceValuesSorted[h%this.distanceValuesSorted.length];return P({bufferGraphic:r,bufferDistance:f,bufferUnit:this.bufferUnit,view:this.view,unitsAbbrLookup:this._messages.unitsAbbr})});this.bufferLayer.addMany(a),this.bufferLabelsLayer.addMany(n),this.arcgisBufferCreate.emit()}}_renderInputMethod(){return this.inputMethod==="select-feature"?c`<instant-apps-selection-toolbar .view=${this.view} .sources=${this.sources} @selectionChange=${this._handleSelectionChange} continuous-selection-enabled selection-operation-type=add ${o(this.#e)}></instant-apps-selection-toolbar>`:this.inputMethod==="draw-graphic"?c`<slot name=arcgis-sketch ${o(this.#a)}></slot>`:this.inputMethod==="search-location"?c`<slot name=arcgis-search ${o(this.#r)}></slot>`:null}render(){return c`<div role=dialog aria-labelledby=buffer-title><header><h2 id=buffer-title>${this._messages.title}</h2><calcite-input-message icon=information>${this._messages.labels.helpText}</calcite-input-message></header><instant-apps-buffer-input-radiogroup .labels=${this._messages.inputRadioButtonLabels} .selectedValue=${this.inputMethod} ${o(this.#t)}></instant-apps-buffer-input-radiogroup>${this._renderInputMethod()}<instant-apps-buffer-distance-manager .bufferDistance=${this.bufferDistance} .bufferInputStep=${this.bufferInputStep} .bufferMinDistance=${this.bufferMinDistance} .bufferMaxDistance=${this.bufferMaxDistance} .labels=${this._messages.labels} ${o(this.#s)}></instant-apps-buffer-distance-manager><calcite-label><span>${this._messages.labels.unit}</span><calcite-select .label=${this._messages.labels.unit} @calciteSelectChange=${this._onBufferUnitChange}>${S(J,e=>e,e=>c`<calcite-option .value=${e} .selected=${this.bufferUnit===e}>${this._messages.units[e]}</calcite-option>`)}</calcite-select></calcite-label><calcite-label class="buffer-labels-label" layout=inline><span><span>${this._messages.labels.showDistanceLabel}</span><calcite-switch .checked=${this.bufferLabelsVisible} @calciteSwitchChange=${this._onLabelsSwitchChange}></calcite-switch></span></calcite-label><div class="main-buttons-wrapper"><calcite-button @click=${this._onCreateBufferClick}>${this._messages.labels.draw}</calcite-button><calcite-button appearance=outline @click=${this._clearAllGraphics}>${this._messages.labels.clear}</calcite-button></div></div>`}};L("instant-apps-buffer",g);return g},"layers/GraphicsLayer","symbols/SimpleFillSymbol","symbols/TextSymbol","Graphic","geometry/operators/labelPointOperator","intl","symbols/TextSymbol3DLayer","symbols/PointSymbol3D","geometry/operators/geodesicBufferOperator","geometry/operators/bufferOperator","Graphic","geometry/operators/differenceOperator")
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as r,b as p}from"./
|
|
2
|
+
import{a as r,b as p}from"./AONULVO2.js";import{b as n}from"./QPMXVWMP.js";import{H as o,L as t,h as e,i as s}from"./T3EPRHTT.js";import"./EXBEKVP5.js";var y=e`.item-type-icon{@apply block h-4 pointer-events-none;margin-top:.15em!important;min-width:16px;fill:currentColor;transform:rotate(360deg)}.item-type-icon-margin{@apply m-inline-end-1.5;}`,i=class extends o{constructor(){super(...arguments),this.isPortal=!1,this.type="",this.typeKeywords=[],this.designType=""}static{this.properties={isPortal:5,type:1,typeKeywords:0,designType:1}}static{this.styles=y}render(){let a=this.designType?r(this.designType):p(this.type,this.typeKeywords),m=this.designType||this.type;return s`<div title=${m??t}><img alt aria-hidden=true class="item-type-icon item-type-icon-margin" height=16 src=${a??t} width=16></div>`}};n("solution-item-icon",i);export{i as SolutionItemIcon};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{b as c}from"./
|
|
2
|
+
import{b as c}from"./QPMXVWMP.js";import{F as s,G as a,H as r,K as l,h as t,i as e}from"./T3EPRHTT.js";import"./EXBEKVP5.js";var y=t`:host{display:block}`,i=class extends r{constructor(){super(...arguments),this.layerListRef=s(),this.visibilityIcon="eyeball"}static{this.properties={mapView:0,layerListRef:0,visibilityIcon:1}}static{this.styles=y}willUpdate(o){o.has("visibilityIcon")&&this.visibilityIconWatchHandler()}async visibilityIconWatchHandler(){this.layerListRef.value&&(this.layerListRef.value.visibilityAppearance=this.visibilityIcon==="checkbox"?"checkbox":"default")}render(){return this.mapView&&e`<arcgis-layer-list style=${l(document.dir==="rtl"?"direction: rtl;":"direction: ltr;")} auto-destroy-disabled .view=${this.mapView} .visibilityAppearance=${this.visibilityIcon==="checkbox"?"checkbox":"default"} ${a(this.layerListRef)}></arcgis-layer-list>`||""}};c("layer-list-widget",i);export{i as LayerListWidget};
|