@arcgis/map-components
Version:
ArcGIS Map Components
5 lines (4 loc) • 1.79 kB
JavaScript
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.32/esri/copyright.txt for details.
v4.32.13 */
import{a as f}from"./NYXWVKGC.js";import{a as w}from"./QKQNYHUC.js";import{a}from"./KWBN5CHV.js";import{d as v}from"./JM4XJJFL.js";import"./AX2MGWNF.js";import{A as h,B as d,C as o,E as g,G as p,a as l,g as c,q as n,r as m,s as i}from"./NIZJVZRG.js";var u=await $arcgis.l("widgets/Home/HomeViewModel");var y=m` {arcgis-home{display:block}}`,M={base:"esri-home"},$=f(u),r=class extends d{constructor(){super(...arguments),this.messages=w(),this.viewModel=$(this),this.autoDestroyDisabled=!1,this.goToOverride=this.viewModel.goToOverride,this.icon="home",this.position="top-left",this.state=this.viewModel.state,this.viewpoint=this.viewModel.viewpoint,this.arcgisGo=v(()=>this.viewModel,"go"),this.arcgisPropertyChange=n()("state"),this.arcgisReady=h()}static{this.properties={autoDestroyDisabled:5,goToOverride:0,icon:3,label:1,messageOverrides:0,position:3,referenceElement:1,state:3,viewpoint:0}}static{this.shadowRootOptions=c}static{this.styles=y}async cancelGo(){this.viewModel.cancelGo()}async destroy(){await this.manager.destroy()}async go(){this.viewModel.go()}_go(){let{viewModel:e}=this;e.state==="going-home"?e.cancelGo():e.go()}render(){let{messages:e,icon:b}=this,t=this.viewModel?.state,s=t==="going-home";return i`<div class=${o(l(M.base,a.widget))}><calcite-button class=${o(a.widgetButton)} .disabled=${t==="disabled"} .iconStart=${s?void 0:b??void 0} kind=neutral .label=${e.componentLabel} =${this._go} .scale=${s?"s":"m"} title=${(t==="going-home"?e.cancel:e.title)??g}>${s?i`<calcite-loader inline label></calcite-loader>`:null}</calcite-button></div>`}};p("arcgis-home",r);export{r as ArcgisHome};