UNPKG

@arcgis/core

Version:

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

6 lines (5 loc) 1.45 kB
/* All material copyright ESRI, All Rights Reserved, unless otherwise specified. See https://js.arcgis.com/4.32/esri/copyright.txt for details. */ import{_ as t}from"../../../chunks/tslib.es6.js";import o from"../../../core/Accessor.js";import{watch as e}from"../../../core/reactiveUtils.js";import{property as s}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as r}from"../../../core/accessorSupport/decorators/subclass.js";let i=class extends o{constructor(t){super(t),this.attachmentId=null,this.attachmentInfos=[],this.candidates=null,this.error=null,this.form=null,this.mode="list",this.objectId=null}initialize(){this.addHandles([e((()=>this.objectId),(()=>this.reset())),e((()=>this.candidates),(()=>{this.error=null})),e((()=>this.attachmentInfos.length),(t=>{0===t&&(this.mode="file")}))])}onEditComplete(){this.attachmentId=null,this.candidates=null,this.mode="list"}reset(){this.attachmentId=null,this.candidates=null,this.error=null}};t([s()],i.prototype,"attachmentId",void 0),t([s()],i.prototype,"attachmentInfos",void 0),t([s()],i.prototype,"candidates",void 0),t([s()],i.prototype,"error",void 0),t([s()],i.prototype,"form",void 0),t([s()],i.prototype,"mode",void 0),t([s()],i.prototype,"objectId",void 0),i=t([r("esri.widgets.FeatureTable.support.AttachmentsViewOptions")],i);const a=i;export{a as default};