UNPKG

@arcgis/core

Version:

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

6 lines (5 loc) 1.49 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 r}from"../../chunks/tslib.es6.js";import e from"../../core/JSONSupport.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{reader as s}from"../../core/accessorSupport/decorators/reader.js";import{subclass as t}from"../../core/accessorSupport/decorators/subclass.js";import{writer as i}from"../../core/accessorSupport/decorators/writer.js";import{convertTemplatedStringToArcade as p}from"./labelUtils.js";var l;let n=class extends e{constructor(){super(...arguments),this.expression=null,this.title=null,this.value=null}static{l=this}readExpression(r,e){return e.value?p(e.value):r}writeExpression(r,e,o){null!=this.value&&(r=p(this.value)),null!=r&&(e[o]=r)}clone(){return new l({expression:this.expression,title:this.title,value:this.value})}};r([o({type:String,json:{write:{writerEnsuresNonNull:!0}}})],n.prototype,"expression",void 0),r([s("expression",["expression","value"])],n.prototype,"readExpression",null),r([i("expression")],n.prototype,"writeExpression",null),r([o({type:String,json:{write:!0,origins:{"web-scene":{write:!1}}}})],n.prototype,"title",void 0),r([o({json:{read:!1,write:!1}})],n.prototype,"value",void 0),n=l=r([t("esri.layers.support.LabelExpressionInfo")],n);export{n as default};