@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
3 lines (2 loc) • 1.63 kB
JavaScript
/* COPYRIGHT Esri - https://js.arcgis.com/5.0.19/LICENSE.txt */
import{__decorate as e}from"tslib";import{JSONMap as r}from"../../core/jsonMap.js";import{JSONSupport as t}from"../../core/JSONSupport.js";import o from"../../core/Logger.js";import{property as i,cast as s,subclass as n}from"../../core/accessorSupport/decorators.js";import{ensureString as p}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 t{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?(o.getLogger(this).error(".field: field must be a string value"),null):p(e)}get arcadeRequired(){return!!this.valueExpression}clone(){}getAttributeHash(){return`${this.type}-${this.field}-${this.valueExpression}`}};e([i()],u.prototype,"index",void 0),e([i({type:a.apiValues,readOnly:!0,json:{read:a.read,write:{writer:a.write,isRequired:!0}}})],u.prototype,"type",void 0),e([i({type:String,json:{write:!0}})],u.prototype,"field",void 0),e([s("field")],u.prototype,"castField",null),e([i({type:String,json:{write:!0}})],u.prototype,"valueExpression",void 0),e([i({type:String,json:{write:!0}})],u.prototype,"valueExpressionTitle",void 0),e([i({readOnly:!0})],u.prototype,"arcadeRequired",null),e([i({type:l,json:{write:!0}})],u.prototype,"legendOptions",void 0),u=e([n("esri.renderers.visualVariables.VisualVariable")],u);export{u as default};