UNPKG

@arcgis/core

Version:

ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API

6 lines (5 loc) 1.74 kB
/* All material copyright ESRI, All Rights Reserved, unless otherwise specified. See https://js.arcgis.com/4.33/esri/copyright.txt for details. */ import{_ as e}from"../../../chunks/tslib.es6.js";import{property as t}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as s}from"../../../core/accessorSupport/decorators/subclass.js";import o from"../../Widget.js";import{labelCss as r}from"./css.js";import{loadCalciteComponents as i}from"../../support/componentsUtils.js";import"../../support/widgetUtils.js";import{tsx as l}from"../../support/jsxFactory.js";const c={clearLevel:"",selectLevel:""};let a=class extends o{constructor(e,t){super(e,t),this.level=null,this.active=!1,this.hovering=!1,this.onClear=()=>{}}loadDependencies(){return i({fab:()=>import("@esri/calcite-components/dist/components/calcite-fab")})}render(){const e=this.messages??c;if(null==this.level)return l("div",{class:r.empty,title:e.selectLevel},e.selectLevel);const t=e.clearLevel;return l("div",{"aria-label":t,bind:this,class:this.classes(r.base,{[r.active]:this.active,[r.hover]:this.hovering}),onclick:this.onClear,title:t},l("span",null,this.level),l("calcite-fab",{appearance:"outline-fill",class:r.clearButton,disabled:!this.active,icon:"x",key:"clear-button",kind:"neutral",onclick:this.onClear,scale:"s"}))}};e([t()],a.prototype,"level",void 0),e([t({nonNullable:!0})],a.prototype,"active",void 0),e([t({nonNullable:!0})],a.prototype,"hovering",void 0),e([t()],a.prototype,"messages",void 0),e([t({nonNullable:!0})],a.prototype,"onClear",void 0),a=e([s("esri.widgets.BuildingExplorer.BuildingLevelPicker.Label")],a);export{a as Label};