Skip to content
ESM
import "@arcgis/map-components/components/arcgis-version-management";
Inheritance:
ArcgisVersionManagementPublicLitElement
Since
ArcGIS Maps SDK for JavaScript 4.29

The Version Management component allows users to view available versions, change versions, delete versions, and alter versions. The View will update to match the features on the selected version. To learn more about version management please visit the versioning guide doc.

The Version Management component does not support proxied feature services or feature services that utilize stored credentials.

Note: Sign in to access the data in this sample, U/P: viewer01/I68VGU^nMurF

Demo

Properties

allowEditingDisabled

Property
Type
boolean
Attribute
allow-editing-disabled
Default value
false

autoDestroyDisabled

Property
Type
boolean

If true, the component will not be destroyed automatically when it is disconnected from the document. This is useful when you want to move the component to a different place on the page, or temporarily hide it. If this is set, make sure to call the destroy() method when you are done to prevent memory leaks.

Attribute
auto-destroy-disabled
Default value
false

closable

reflected Property
Type
boolean
Attribute
closable
Default value
false

icon

Property
Type
string | undefined

Icon which represents the component. Typically used when the component is controlled by another component (e.g. by the Expand component).

See also
Attribute
icon

initialVersionInfos

Property
Type
InitialVersionInfo[]

The initialVersionInfos property enables users to initialize the Version Management component with a predefined set of versions. By providing an array of InitialVersionInfo, the component displays a specified version for each feature service upon initialization.

label

reflected Property
Type
string | undefined
Attribute
label

messageOverrides

Property
Type
Record<string, unknown> | undefined

Replace localized message strings with your own strings.

Note: Individual message keys may change between releases.

mode

Property
Type
string | undefined
Attribute
mode

pageSize

Property
Type
number

Specifies the number of versions displayed on each page of the Version Management component.

Attribute
page-size
Default value
5

referenceElement

Property
Type
ArcgisReferenceElement | string | undefined

By assigning the id attribute of the Map or Scene component to this property, you can position a child component anywhere in the DOM while still maintaining a connection to the Map or Scene.

See also
Attribute
reference-element

state

readonly Property
Type
VersionManagerState
Since
ArcGIS Maps SDK for JavaScript 5.0

The current state of the component.

versioningStates

Property
Type
Collection<VersioningState>
Since
ArcGIS Maps SDK for JavaScript 5.0

This class provides functionality for managing versions in a versioned geodatabase. In the event that the Version Management component is destroyed, the VersioningStates can be utilized to maintain the current state of the Version Management component. The Version Management component can be reinitialized using a Collection<VersioningState>, or a predefined Collection<VersioningState> can be provided during the initial instantiation of the Version Management component.

view

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

This property defines the target MapView.

Methods

MethodSignature
componentOnReady
inherited
componentOnReady(): Promise<this>
destroy(): Promise<void>

componentOnReady

inherited Method
Signature
componentOnReady (): Promise<this>
Inherited from: PublicLitElement

Creates a promise that resolves once the component is fully loaded.

Returns
Promise<this>
Example
const arcgisVersionManagement = document.querySelector("arcgis-version-management");
document.body.append(arcgisVersionManagement);
await arcgisVersionManagement.componentOnReady();
console.log("arcgis-version-management is ready to go!");

destroy

Method
Signature
destroy (): Promise<void>

Permanently destroy the component.

Returns
Promise<void>

Events

arcgisReady

Event
arcgisReady: CustomEvent<void>

Emitted when the component associated with a map or scene view is ready to be interacted with.

bubbles composed cancelable

arcgisVersioningStateChanged

Event
arcgisVersioningStateChanged: CustomEvent<VersioningStateEvent>
bubbles composed cancelable