UNPKG

@arcgis/core

Version:

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

6 lines (5 loc) 4.21 kB
/* All material copyright ESRI, All Rights Reserved, unless otherwise specified. See https://js.arcgis.com/4.32/esri/copyright.txt for details. */ import{_ as e}from"../../chunks/tslib.es6.js";import{JSONMap as t}from"../../core/jsonMap.js";import r from"../../core/JSONSupport.js";import{clone as i}from"../../core/lang.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import{cast as s}from"../../core/accessorSupport/decorators/cast.js";import{subclass as n}from"../../core/accessorSupport/decorators/subclass.js";import l from"./AuthoringInfoSizeStop.js";var a;const p=new t({percentTotal:"percent-of-total",ratio:"ratio",percent:"percent"}),u=new t({sizeInfo:"size",colorInfo:"color",transparencyInfo:"opacity",rotationInfo:"rotation"}),m={key:e=>"number"==typeof e?"number":"string",typeMap:{number:Number,string:String},base:null},c=["high-to-low","above-and-below","centered-on","extremes"],y=[...new Set([...["high-to-low","above-and-below","centered-on","extremes","above","below"],...["high-to-low","above-and-below","above","below","reference-size"]])],h=["seconds","minutes","hours","days","months","years"],S=["circle","diamond","hexagon-flat","hexagon-pointy","square"];let d=a=class extends r{constructor(e){super(e),this.endTime=null,this.field=null,this.maxSliderValue=null,this.minSliderValue=null,this.startTime=null,this.type=null,this.units=null}castEndTime(e){return"string"==typeof e||"number"==typeof e?e:null}get normalizationField(){return"reference-size"===this.theme?this._get("normalizationField"):null}set normalizationField(e){this._set("normalizationField",e)}get referenceSizeScale(){return"reference-size"===this.theme?this._get("referenceSizeScale"):null}set referenceSizeScale(e){this._set("referenceSizeScale",e)}get referenceSizeSymbolStyle(){return"reference-size"===this.theme?this._get("referenceSizeSymbolStyle"):null}set referenceSizeSymbolStyle(e){this._set("referenceSizeSymbolStyle",e)}castStartTime(e){return"string"==typeof e||"number"==typeof e?e:null}get sizeStops(){return"reference-size"===this.theme?this._get("sizeStops"):null}set sizeStops(e){this._set("sizeStops",e)}get style(){return"color"===this.type?this._get("style"):null}set style(e){this._set("style",e)}get theme(){return"color"===this.type||"size"===this.type?this._get("theme")||"high-to-low":null}set theme(e){this._set("theme",e)}clone(){return new a({endTime:this.endTime,field:this.field,maxSliderValue:this.maxSliderValue,minSliderValue:this.minSliderValue,normalizationField:this.normalizationField,referenceSizeScale:this.referenceSizeScale,referenceSizeSymbolStyle:this.referenceSizeSymbolStyle,sizeStops:i(this.sizeStops),startTime:this.startTime,style:this.style,theme:this.theme,type:this.type,units:this.units})}};e([o({types:m,json:{write:!0}})],d.prototype,"endTime",void 0),e([s("endTime")],d.prototype,"castEndTime",null),e([o({type:String,json:{write:!0}})],d.prototype,"field",void 0),e([o({type:Number,json:{write:!0}})],d.prototype,"maxSliderValue",void 0),e([o({type:Number,json:{write:!0}})],d.prototype,"minSliderValue",void 0),e([o({type:String,json:{origins:{"web-scene":{write:!1}},write:!0}})],d.prototype,"normalizationField",null),e([o({type:Number,value:null,json:{origins:{"web-scene":{write:!1}},write:!0}})],d.prototype,"referenceSizeScale",null),e([o({type:S,value:null,json:{origins:{"web-scene":{write:!1}},write:!0}})],d.prototype,"referenceSizeSymbolStyle",null),e([o({types:m,json:{write:!0}})],d.prototype,"startTime",void 0),e([s("startTime")],d.prototype,"castStartTime",null),e([o({type:[l],json:{origins:{"web-scene":{write:!1}},write:!0}})],d.prototype,"sizeStops",null),e([o({type:p.apiValues,value:null,json:{type:p.jsonValues,read:p.read,write:p.write}})],d.prototype,"style",null),e([o({type:y,value:null,json:{type:y,origins:{"web-scene":{type:c,write:{writer:(e,t)=>{c.includes(e)&&(t.theme=e)}}}},write:!0}})],d.prototype,"theme",null),e([o({type:u.apiValues,json:{type:u.jsonValues,read:u.read,write:u.write}})],d.prototype,"type",void 0),e([o({type:h,json:{type:h,write:!0}})],d.prototype,"units",void 0),d=a=e([n("esri.renderers.support.AuthoringInfoVisualVariable")],d);const f=d;export{f as default};