import "@arcgis/map-components/components/arcgis-version-management";
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
Property | Attribute | Type |
---|---|---|
allow-editing-disabled | boolean | |
auto-destroy-disabled | boolean | |
closable | boolean | |
icon | string | |
| Array<{
url: string;
name: string;
}> | |
label | string | |
| Record<string, unknown> | |
mode | string | |
page-size | number | |
position | "bottom-leading" | "bottom-left" | "bottom-right" | "bottom-trailing" | "manual" | "top-leading" | "top-left" | "top-right" | "top-trailing" | |
reference-element | ||
state readonly | state | "disabled" | "executing" | "failed" | "loading" | "ready" | "success" |
|
allowEditingDisabled
allowEditingDisabled: boolean
- Attribute
- allow-editing-disabled
- Default value
- false
autoDestroyDisabled
autoDestroyDisabled: 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
initialVersionInfos
initialVersionInfos: Array<{
url: string;
name: string;
}>
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.
messageOverrides
messageOverrides: Record<string, unknown>
Replace localized message strings with your own strings.
Note: Individual message keys may change between releases.
pageSize
pageSize: number
Specifies the number of versions displayed on each page of the Version Management component.
- Attribute
- page-size
- Default value
- 5
position
position: "bottom-leading" | "bottom-left" | "bottom-right" | "bottom-trailing" | "manual" | "top-leading" | "top-left" | "top-right" | "top-trailing"
- Attribute
- position
- Default value
- "top-right"
referenceElement
referenceElement: HTMLArcgisLinkChartElement | HTMLArcgisMapElement | HTMLArcgisSceneElement | string
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.
- Attribute
- reference-element
state
state: "disabled" | "executing" | "failed" | "loading" | "ready" | "success"
The current state of the component.
- Attribute
- state
versioningStates
versioningStates: Collection<VersioningState>
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.
Slots
Events
Event | Type |
---|---|
CustomEvent<void> | |
VersioningStateEvent |
arcgisReady
arcgisReady: CustomEvent<void>
Emitted when the component associated with a map or scene view is is ready to be interacted with.
Events triggered on this element will be propagated to their outermost elements.
The event is composable and will propagate across the shadow DOM into the standard DOM.
The event's default behavior can be canceled, allowing for custom behavior to be implemented instead.
arcgisVersioningStateChanged
arcgisVersioningStateChanged: VersioningStateEvent
Events triggered on this element will be propagated to their outermost elements.
The event is composable and will propagate across the shadow DOM into the standard DOM.
The event's default behavior can be canceled, allowing for custom behavior to be implemented instead.
Methods
Method | Signature |
---|---|
componentOnReady(): Promise<void> | |
destroy(): Promise<void> |
componentOnReady
componentOnReady(): Promise<void>
Create a promise that resolves once component is fully loaded.
Example
const arcgisVersionManagement = document.querySelector("arcgis-version-management");
document.body.append(arcgisVersionManagement);
await arcgisVersionManagement.componentOnReady();
console.log("arcgis-version-management is ready to go!");
- Returns
- Promise<void>