UNPKG

@doegis/core

Version:

DOE GIS API

3 lines (1 loc) 2.69 kB
import{_ as e}from"../../chunks/tslib.es6.js";import{JSONMap as t}from"../../core/jsonMap.js";import{JSONSupport as r}from"../../core/JSONSupport.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import{cast as s}from"../../core/accessorSupport/decorators/cast.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";var n;const l=new t({percentTotal:"percent-of-total",ratio:"ratio",percent:"percent"}),p=new t({sizeInfo:"size",colorInfo:"color",transparencyInfo:"opacity",rotationInfo:"rotation"}),a={key:e=>"number"==typeof e?"number":"string",typeMap:{number:Number,string:String},base:null},u=["high-to-low","above-and-below","centered-on","extremes"],m=[...new Set([...["high-to-low","above-and-below","centered-on","extremes","90-10","above","below"],...["high-to-low","above-and-below","90-10","above","below"]])],y=["seconds","minutes","hours","days","months","years"];let d=n=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}castStartTime(e){return"string"==typeof e||"number"==typeof e?e:null}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 n({endTime:this.endTime,field:this.field,maxSliderValue:this.maxSliderValue,minSliderValue:this.minSliderValue,startTime:this.startTime,style:this.style,theme:this.theme,type:this.type,units:this.units})}};e([o({types:a,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({types:a,json:{write:!0}})],d.prototype,"startTime",void 0),e([s("startTime")],d.prototype,"castStartTime",null),e([o({type:l.apiValues,value:null,json:{type:l.jsonValues,read:l.read,write:l.write}})],d.prototype,"style",null),e([o({type:m,value:null,json:{type:m,origins:{"web-scene":{type:u,write:{writer:(e,t)=>{u.includes(e)&&(t.theme=e)}}}},write:!0}})],d.prototype,"theme",null),e([o({type:p.apiValues,json:{type:p.jsonValues,read:p.read,write:p.write}})],d.prototype,"type",void 0),e([o({type:y,json:{type:y,write:!0}})],d.prototype,"units",void 0),d=n=e([i("esri.renderers.support.AuthoringInfoVisualVariable")],d);const h=d;export{h as default};