UNPKG

@arcgis/core

Version:

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

6 lines (5 loc) 1.58 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 t}from"../../chunks/tslib.es6.js";import r from"../../core/Accessor.js";import{createObservableProxy as e}from"../../core/proxy.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import{valuesAreEquivalent as i}from"../support/forms/formUtils.js";let a=class extends r{constructor(t){super(t),this.userChangesHaveMadeInvalid=!1,this.original=t.source.clone();const r=t.source.attributes??{},o=e({...r});this.attributes=o;const s=t.source.cloneShallow();s.attributes=o,this.plainGraphic=s}get geometry(){return this.plainGraphic.geometry}set geometry(t){this.plainGraphic.geometry=t}get layer(){return this.source.sourceLayer??this.source.layer}attributeHasChanged(t){return!i(this.attributes[t],this.original.attributes?.[t])}getAttribute(t){return this.attributes[t]??null}setAttribute(t,r){this.attributes[t]=r}};t([o()],a.prototype,"attributes",void 0),t([o()],a.prototype,"geometry",null),t([o()],a.prototype,"plainGraphic",void 0),t([o()],a.prototype,"layer",null),t([o({constructOnly:!0})],a.prototype,"original",void 0),t([o({constructOnly:!0})],a.prototype,"source",void 0),t([o()],a.prototype,"userChangesHaveMadeInvalid",void 0),a=t([s("esri.widgets.BatchAttributeForm.ReactiveGraphic")],a);export{a as ReactiveGraphic};