UNPKG

@arcgis/core

Version:

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

6 lines (5 loc) 4.88 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 t}from"../../core/jsonMap.js";import i from"../../core/JSONSupport.js";import{clone as r}from"../../core/lang.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import{cast as l}from"../../core/accessorSupport/decorators/cast.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import n from"./AuthoringInfoSizeStop.js";var p;const a=new t({percentTotal:"percent-of-total",ratio:"ratio",percent:"percent"}),u=new t({sizeInfo:"size",colorInfo:"color",transparencyInfo:"opacity",rotationInfo:"rotation"}),y={key:e=>"number"==typeof e?"number":"string",typeMap:{number:Number,string:String},base:null},m=["high-to-low","above-and-below","centered-on","extremes"],c=[...new Set([...["high-to-low","above-and-below","centered-on","extremes","above","below"],...["high-to-low","above-and-below","above","below","reference-size","spike"]])],S=["seconds","minutes","hours","days","months","years"],h=["circle","diamond","hexagon-flat","hexagon-pointy","square"],d=["triangle-closed-outline","triangle-gradient-fill-closed","triangle-gradient-fill-closed-outline","triangle-gradient-fill-open","triangle-gradient-fill-open-outline","triangle-open-outline","triangle-solid-fill-closed","triangle-solid-fill-closed-outline","triangle-solid-fill-open","triangle-solid-fill-open-outline"];let f=p=class extends i{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||"spike"===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)}get spikeSymbolStyle(){return"spike"===this.theme?this._get("spikeSymbolStyle"):null}set spikeSymbolStyle(e){this._set("spikeSymbolStyle",e)}castStartTime(e){return"string"==typeof e||"number"==typeof e?e:null}get sizeStops(){return"reference-size"===this.theme||"spike"===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 p({endTime:this.endTime,field:this.field,maxSliderValue:this.maxSliderValue,minSliderValue:this.minSliderValue,normalizationField:this.normalizationField,referenceSizeScale:this.referenceSizeScale,referenceSizeSymbolStyle:this.referenceSizeSymbolStyle,spikeSymbolStyle:this.spikeSymbolStyle,sizeStops:r(this.sizeStops),startTime:this.startTime,style:this.style,theme:this.theme,type:this.type,units:this.units})}};e([o({types:y,json:{write:!0}})],f.prototype,"endTime",void 0),e([l("endTime")],f.prototype,"castEndTime",null),e([o({type:String,json:{write:!0}})],f.prototype,"field",void 0),e([o({type:Number,json:{write:!0}})],f.prototype,"maxSliderValue",void 0),e([o({type:Number,json:{write:!0}})],f.prototype,"minSliderValue",void 0),e([o({type:String,json:{origins:{"web-scene":{write:!1}},write:!0}})],f.prototype,"normalizationField",null),e([o({type:Number,value:null,json:{origins:{"web-scene":{write:!1}},write:!0}})],f.prototype,"referenceSizeScale",null),e([o({type:h,value:null,json:{origins:{"web-scene":{write:!1}},write:!0}})],f.prototype,"referenceSizeSymbolStyle",null),e([o({type:d,value:null,json:{origins:{"web-scene":{write:!1}},write:!0}})],f.prototype,"spikeSymbolStyle",null),e([o({types:y,json:{write:!0}})],f.prototype,"startTime",void 0),e([l("startTime")],f.prototype,"castStartTime",null),e([o({type:[n],json:{origins:{"web-scene":{write:!1}},write:!0}})],f.prototype,"sizeStops",null),e([o({type:a.apiValues,value:null,json:{type:a.jsonValues,read:a.read,write:a.write}})],f.prototype,"style",null),e([o({type:c,value:null,json:{type:c,origins:{"web-scene":{type:m,write:{writer:(e,t)=>{m.includes(e)&&(t.theme=e)}}}},write:!0}})],f.prototype,"theme",null),e([o({type:u.apiValues,json:{type:u.jsonValues,read:u.read,write:u.write}})],f.prototype,"type",void 0),e([o({type:S,json:{type:S,write:!0}})],f.prototype,"units",void 0),f=p=e([s("esri.renderers.support.AuthoringInfoVisualVariable")],f);const g=f;export{g as default};