UNPKG

@arcgis/core

Version:

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

6 lines (5 loc) 2.15 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 o}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 e}from"../../../core/accessorSupport/decorators/subclass.js";import{get as s}from"../../../core/accessorSupport/get.js";import n from"../../Widget.js";import{loadCalciteComponents as i}from"../../support/componentsUtils.js";import{tsx as c}from"../../support/jsxFactory.js";const r={point:()=>[p("pin","point","draw.point"),p("line","polyline","draw.polyline"),p("polygon","polygon","draw.polygon")],polyline:()=>[p("line","polyline","draw.polyline")],polygon:()=>[p("polygon","polygon","draw.polygon")]};let a=class extends n{constructor(o){super(o),this.messages=null,this.type=null}loadDependencies(){return i({"action-pad":()=>import("@esri/calcite-components/dist/components/calcite-action-pad"),"action-group":()=>import("@esri/calcite-components/dist/components/calcite-action-group"),action:()=>import("@esri/calcite-components/dist/components/calcite-action")})}static{this.vnodeSelector="calcite-action-pad"}render(){const{messages:o,type:t}=this,e=l(t);return c("calcite-action-pad",{expandDisabled:!0,layout:"horizontal",position:"start"},e.map((({icon:t,messageKey:e,action:n})=>{const i=s(o,e);return c("calcite-action-group",null,c("calcite-action",{alignment:"center",bind:this,"data-action":n,icon:t,onclick:this.onAction,text:i,title:i}))})))}};function p(o,t,e){return{icon:o,messageKey:e,action:`draw-${t}`}}function l(o){return[{icon:"cursor",messageKey:"selectFeature",action:"select-feature"},...r[o]?.()??[],{icon:"save",messageKey:"save",action:"save"},{icon:"trash",messageKey:"delete",action:"delete-feature"}]}o([t()],a.prototype,"messages",void 0),o([t()],a.prototype,"onAction",void 0),o([t()],a.prototype,"type",void 0),a=o([e("esri.widgets.OrientedImageryViewer.components.SketchTools")],a);const m=a;export{m as default};