UNPKG

@arcgis/core

Version:

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

6 lines (5 loc) 1.84 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{JSONMap as r}from"../../core/jsonMap.js";import o from"../../core/JSONSupport.js";import t from"../../core/Logger.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import{cast as i}from"../../core/accessorSupport/decorators/cast.js";import{subclass as p}from"../../core/accessorSupport/decorators/subclass.js";import{ensureString as n}from"../../core/accessorSupport/ensureType.js";import l from"./support/VisualVariableLegendOptions.js";const a=new r({colorInfo:"color",transparencyInfo:"opacity",rotationInfo:"rotation",sizeInfo:"size"});let u=class extends o{constructor(e){super(e),this.index=null,this.type=null,this.field=null,this.valueExpression=null,this.valueExpressionTitle=null,this.legendOptions=null}castField(e){return null==e?e:"function"==typeof e?(t.getLogger(this).error(".field: field must be a string value"),null):n(e)}get arcadeRequired(){return!!this.valueExpression}clone(){}getAttributeHash(){return`${this.type}-${this.field}-${this.valueExpression}`}};e([s()],u.prototype,"index",void 0),e([s({type:a.apiValues,readOnly:!0,json:{read:a.read,write:{writer:a.write,isRequired:!0}}})],u.prototype,"type",void 0),e([s({type:String,json:{write:!0}})],u.prototype,"field",void 0),e([i("field")],u.prototype,"castField",null),e([s({type:String,json:{write:!0}})],u.prototype,"valueExpression",void 0),e([s({type:String,json:{write:!0}})],u.prototype,"valueExpressionTitle",void 0),e([s({readOnly:!0})],u.prototype,"arcadeRequired",null),e([s({type:l,json:{write:!0}})],u.prototype,"legendOptions",void 0),u=e([p("esri.renderers.visualVariables.VisualVariable")],u);export{u as default};