UNPKG

@arcgis/core

Version:

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

6 lines (5 loc) 1.34 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 o}from"../../chunks/tslib.es6.js";import r from"../../core/Error.js";import{property as e}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as t}from"../../core/accessorSupport/decorators/subclass.js";import s from"../../views/interactive/sketch/SketchOptions.js";import a from"./UpdateRecordWorkflowData.js";import{whenEditorLayerView as i}from"./workflowUtils.js";var p;let n=p=class extends a{constructor(o){super(o),this.sketchOptions=null,this.snappingManager=null}static async create(o){const{feature:e,snappingManager:t,viewModel:a}=o,n=o.sketchOptions??new s,{view:c}=a;if(!c)throw new r("editor:cannot-create-workflow-data","The provided EditorViewModel does not have an associated view");const d=await i(c,e.layer??e.sourceLayer);return new p({...p._makeConstructorProps(o),layerView:d,sketchOptions:n,snappingManager:t})}};o([e()],n.prototype,"layerView",void 0),o([e({constructOnly:!0})],n.prototype,"sketchOptions",void 0),o([e()],n.prototype,"snappingManager",void 0),n=p=o([t("esri.widgets.Editor.UpdateFeatureWorkflowData")],n);const c=n;export{c as default};