VisualVariable.js 1.9 KB

12345
  1. /*
  2. All material copyright ESRI, All Rights Reserved, unless otherwise specified.
  3. See https://js.arcgis.com/4.24/esri/copyright.txt for details.
  4. */
  5. import{_ as e}from"../../chunks/tslib.es6.js";import{JSONMap as r}from"../../core/jsonMap.js";import{JSONSupport as o}from"../../core/JSONSupport.js";import t from"../../core/Logger.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import{cast as i}from"../../core/accessorSupport/decorators/cast.js";import{subclass as p}from"../../core/accessorSupport/decorators/subclass.js";import{ensureString as l}from"../../core/accessorSupport/ensureType.js";import n from"./support/VisualVariableLegendOptions.js";const a=t.getLogger("esri.renderers.visualVariables.VisualVariable"),u=new r({colorInfo:"color",transparencyInfo:"opacity",rotationInfo:"rotation",sizeInfo:"size"});let c=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?(a.error(".field: field must be a string value"),null):l(e)}get arcadeRequired(){return!!this.valueExpression}clone(){}getAttributeHash(){return`${this.type}-${this.field}-${this.valueExpression}`}};e([s()],c.prototype,"index",void 0),e([s({type:u.apiValues,readOnly:!0,json:{read:u.read,write:u.write}})],c.prototype,"type",void 0),e([s({type:String,json:{write:!0}})],c.prototype,"field",void 0),e([i("field")],c.prototype,"castField",null),e([s({type:String,json:{write:!0}})],c.prototype,"valueExpression",void 0),e([s({type:String,json:{write:!0}})],c.prototype,"valueExpressionTitle",void 0),e([s({readOnly:!0})],c.prototype,"arcadeRequired",null),e([s({type:n,json:{write:!0}})],c.prototype,"legendOptions",void 0),c=e([p("esri.renderers.visualVariables.VisualVariable")],c);const d=c;export{d as default};