@arcgis/map-components 5.1.0-next.52 → 5.1.0-next.53

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/map-components",
3
- "version": "5.1.0-next.52",
3
+ "version": "5.1.0-next.53",
4
4
  "description": "ArcGIS Map Components",
5
5
  "keywords": [
6
6
  "2D",
@@ -46,9 +46,9 @@
46
46
  "lit": "^3.3.0",
47
47
  "lodash-es": "^4.17.23",
48
48
  "tslib": "^2.8.1",
49
- "@arcgis/common-components": "5.1.0-next.52",
50
- "@arcgis/toolkit": "5.1.0-next.52",
51
- "@arcgis/lumina": "5.1.0-next.52"
49
+ "@arcgis/common-components": "5.1.0-next.53",
50
+ "@arcgis/lumina": "5.1.0-next.53",
51
+ "@arcgis/toolkit": "5.1.0-next.53"
52
52
  },
53
53
  "peerDependencies": {
54
54
  "@arcgis/core": "^5.1.0-next",
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as v}from"./SVVJHTPA.js";import"./55IJQTCC.js";import"./7DOI3267.js";import"./EHZW6UXL.js";import{O as h,P as g,U as p,a as u,b as l,x as m}from"./MDRC374Z.js";import"./3TTFCHAA.js";export default $arcgis.t(([b,{locationToAddress:f},{substitute:$},{watch:_}])=>{var R=u`.coordinates{font-size:var(--calcite-font-size-sm);color:var(--calcite-color-text-3);padding-inline-start:var(--calcite-spacing-md);padding-block-end:var(--calcite-spacing-sm)}`,C={coordinates:"coordinates"},c=class extends h{constructor(){super(...arguments),this.messages=v(),this._abortController=null,this._results=null,this.headingLevel=3,this.portal=b.getDefault(),this.arcgisReverseGeocodeResultsChange=m()}static{this.properties={_abortController:16,_results:16,headingLevel:9,portal:0,location:0,messageOverrides:0,reverseGeocodeResults:32}}static{this.styles=R}get reverseGeocodeResults(){return this._results}async destroy(){await this.manager.destroy(),this._cancelQueries()}loaded(){this.manager.onLifecycle(()=>[_(()=>[this.portal,this.location],()=>void this._update(),{initial:!0}),_(()=>this._results,()=>{this.arcgisReverseGeocodeResultsChange.emit()})])}_cancelQueries(){this._abortController?.abort(),this._abortController=null}async _update(){let{location:e,messages:t}=this;if(this._cancelQueries(),!e){this._results=null;return}let s=new AbortController,a=s.signal;this._abortController=s,await this.portal?.load({signal:a});let i=this.portal?.helperServices?.geocode?.filter(o=>o.reverseGeocode??!0);if(!i){this._results=null;return}let r=i.map(async o=>await f(o.url,{location:e},{signal:a})),n=await Promise.allSettled(r);this._abortController=null,this._results=i.map((o,d)=>({name:o.name??t?.untitledService??"",address:(n[d].status==="fulfilled"?n[d].value.address:null)??t?.noResultsFound??"",url:o.url}))}_renderMoreResults(e){let{messages:t}=this;return!this._abortController&&e?.length?l`<calcite-block collapsible .headingLevel=${this.headingLevel} .heading=${$(t?.showMoreResults??"",{count:e.length})}><calcite-list display-mode=flat interaction-mode=static selection-mode=none .label=${t?.moreResults??""}>${e?.map(s=>l`<calcite-list-item .label=${s.name} .description=${s.address}></calcite-list-item>`)}</calcite-list></calcite-block>`:null}render(){let{_abortController:e,location:t,_results:s,messages:a}=this;if(!t)return null;let i=s?.slice(),r=i?.shift(),n=l`<div class=${g(C.coordinates)} slot=content-bottom>${`${t.latitude?.toFixed(6)}, ${t.longitude?.toFixed(6)}`}</div>`;return l`<calcite-list .loading=${!!e} display-mode=flat interaction-mode=static selection-mode=none .label=${a.label??""}>${r?l`<calcite-list-item .label=${r.name} .description=${r.address}>${n}</calcite-list-item>`:e?null:l`<calcite-list-item .label=${a.noResultsFound??""}>${n}</calcite-list-item>`}</calcite-list>${this._renderMoreResults(i)}`}};p("arcgis-reverse-geocode-list",c);return c},"portal/Portal","rest/locator","intl","core/reactiveUtils")