@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
6 lines (5 loc) • 1.78 kB
JavaScript
/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
*/
import{_ as t}from"../../chunks/tslib.es6.js";import e from"../../Graphic.js";import r 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 p}from"../../core/accessorSupport/decorators/subclass.js";import{writer as i}from"../../core/accessorSupport/decorators/writer.js";import{typeKebabDictionary as a}from"../../geometry/support/typeUtils.js";let u=class extends r{constructor(t){super(t),this.displayFieldName=null,this.feature=null,this.foundFieldName=null,this.layerId=null,this.layerName=null,this.value=void 0}readFeature(t,r){const o={attributes:{}};return r.attributes&&(o.attributes=r.attributes),r.geometry&&(o.geometry=r.geometry),e.fromJSON(o)}writeFeature(t,e){if(!t)return;const{attributes:r,geometry:o}=t;r&&(e.attributes={...r}),null!=o&&(e.geometry=o.toJSON(),e.geometryType=a.toJSON(o.type))}};t([o({type:String,json:{write:!0}})],u.prototype,"displayFieldName",void 0),t([o({type:e})],u.prototype,"feature",void 0),t([s("feature",["attributes","geometry"])],u.prototype,"readFeature",null),t([i("feature")],u.prototype,"writeFeature",null),t([o({type:String,json:{write:!0}})],u.prototype,"foundFieldName",void 0),t([o({type:Number,json:{write:!0}})],u.prototype,"layerId",void 0),t([o({type:String,json:{write:!0}})],u.prototype,"layerName",void 0),t([o({json:{write:!0}})],u.prototype,"value",void 0),u=t([p("esri.rest.support.FindResult")],u);const m=u;export{m as default};