Types
import type { LayerInfo, CreationInfo, EditorLayerUnion, State, AttachmentsProperties } from "@arcgis/core/widgets/Editor/types.js";

Type definitions

LayerInfo

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

Configurations used for setting the layer's editable preferences within the Editor.

layer

Property
Type
EditorLayerUnion
Since
ArcGIS Maps SDK for JavaScript 5.0

The associated layer containing the fields to edit.

formTemplate

Property
Type
FormTemplate | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

A template that defines the feature's form content. Use this when setting the fields for editing.

enabled

Property
Type
boolean | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

Indicates whether to enable editing on the layer.

Default value
true

addEnabled

Property
Type
boolean | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

Indicates whether to enable the ability to create new features.

Default value
true

updateEnabled

Property
Type
boolean | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

Indicates whether to enable the ability to update existing features.

Default value
true

deleteEnabled

Property
Type
boolean | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

Indicates whether to enable the ability to delete features.

Default value
true

geometryUpdatesEnabled

Property
Type
boolean | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

Indicates whether to enable or disable geometry updates.

Default value
true

attributeUpdatesEnabled

Property
Type
boolean | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

Indicates whether to enable or disable attribute updates from the feature's form.

Default value
true

attachmentsOnCreateEnabled

Property
Type
boolean | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

(Since 4.26) Indicates whether to enable or disable attachments while creating features. Support for this is dependent upon whether this operation is supported on the FeatureLayer.capabilities.operations.

Default value
true

attachmentsOnUpdateEnabled

Property
Type
boolean | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

(Since 4.26) Indicates whether to enable or disable attachments while updating existing features. Support for this is dependent upon whether update or delete operations are supported on the FeatureLayer.capabilities.

The Editor will not display attachment file names if it is displaying image types. These images must have resize support within its corresponding FeatureLayer.capabilities, ie. FeatureLayer.capabilities.attachment.supportsResize is true. Attachment types, other than images, will display an icon and its corresponding file name.

Default value
true

CreationInfo

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

This object provides required and optional properties needed when creating a new feature.

layer

Property
Type
EditorLayerUnion
Since
ArcGIS Maps SDK for JavaScript 5.0

The associated layer for newly-created feature.

geometryToPlace

Property
Type
Mesh | null | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

The associated Mesh geometry for the newly-created feature. This property is only applicable when editing scene layers.

initialFeature

Property
Type
Graphic | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

The initial feature used when you begin creating features.

maxFeatures

Property
Type
number | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

The maximum amount of feature to create in one batch editing operation.

template

Property
Type
FeatureTemplate | SharedTemplateMetadata | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

The associated feature template used to create new features.

EditorLayerUnion

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

State

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0
Type
"add-association-select-layer" | "add-association-select-feature" | "add-association-create-association" | "adding-attachment" | "awaiting-feature-creation-info" | "awaiting-feature-to-create" | "awaiting-feature-to-update" | "awaiting-update-feature-candidate" | "choosing-key-feature" | "creating-features" | "disabled" | "drawing-splitter-geometry" | "editing-attributes" | "editing-attachment" | "editing-existing-feature" | "editing-features" | "ready" | "reviewing-features" | "viewing-selection-list"

AttachmentsProperties

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0
Supertypes
Partial<Pick<Attachments, "displayType" | "capabilities">>

FeatureFormProperties

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0
Supertypes
Partial<Pick<FeatureForm, "groupDisplay">>

FeatureTemplatesProperties

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0
Supertypes
Partial<Pick<FeatureTemplates, "groupBy" | "visibleElements" | "enableListScroll">>

SketchProperties

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0
Supertypes
Partial<Pick<SketchViewModel, "defaultUpdateOptions" | "pointSymbol" | "polygonSymbol" | "polylineSymbol" | "updateOnGraphicClick">>

SupportingWidgetDefaults

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

Set this to customize any supporting Editor widget's default behavior. Specific properties can be adjusted in the Attachments, FeatureForm, and FeatureTemplates widgets. In addition, it is possible to update specific properties within the SketchViewModel.

attachments

Property
Type
AttachmentsProperties | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

An object containing properties specific for customizing the Attachments widget.

featureForm

Property
Type
FeatureFormProperties | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

An object containing properties specific for customizing the FeatureForm widget.

featureTemplates

Property
Type
FeatureTemplatesProperties | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

An object containing properties specific for customizing the FeatureTemplates widget.

sketch

Property
Type
SketchProperties | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

An object containing properties specific for customizing the Sketch widget.

FailedOperation

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

error

readonly Property
Type
EsriError
Since
ArcGIS Maps SDK for JavaScript 5.0

The read-only error message.

CreateFeaturesWorkflowStep

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0
Supertypes
Extract<State‚ "awaiting-feature-creation-info" | "creating-features" | "adding-attachment" | "editing-attachment">

CreateFeatureState

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0
Type
"create-new" | "update-pending"

MergeFeaturesWorkflowStep

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0
Type
"choosing-key-feature"

UpdateFeaturesWorkflowStep

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0
Type
"editing-features"

SplitFeatureWorkflowStep

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0
Type
"drawing-splitter-geometry" | "reviewing-features"

UpdateWorkflowStep

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0
Supertypes
Extract<State‚ "awaiting-feature-to-update" | "awaiting-update-feature-candidate" | "editing-existing-feature" | "adding-attachment" | "editing-attachment">

CancelWorkflowOptions

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

error

Property
Type
EsriError | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

The returned Error object.

force

Property
Type
boolean | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

Indicates whether to force cancel the active workflow.

emitCancelEvent

Property
Type
boolean | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

Indicates whether to display a prompt indicating canceling the active workflow.

FeatureInfo

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

This object provides information required when updating a set of features.

layer

Property
Type
EditorLayerUnion
Since
ArcGIS Maps SDK for JavaScript 5.0

The layer containing features.

objectIds

Property
Type
ObjectId[]
Since
ArcGIS Maps SDK for JavaScript 5.0

The object identifiers for features being edited

EditorSketchEventBase

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

layer

Property
Type
EditorLayerUnion
Since
ArcGIS Maps SDK for JavaScript 5.0

The layer currently being edited.

EditorSketchCreateEvent

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

type

Property
Type
"sketch-create"
Since
ArcGIS Maps SDK for JavaScript 5.0

detail

Property
Type
SketchViewModelEvents["create"]
Since
ArcGIS Maps SDK for JavaScript 5.0

Detailed information returned within the "sketch-create" event.

EditorSketchUpdateEvent

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

type

Property
Type
"sketch-update"
Since
ArcGIS Maps SDK for JavaScript 5.0

detail

Property
Type
SketchViewModelEvents["update"]
Since
ArcGIS Maps SDK for JavaScript 5.0

Detailed information returned within the "sketch-update" event.

SplitterGeometry

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

SplitterGeometryType

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0
Type
"point" | "polyline" | "polygon"