@vertigis/viewer-spec 46.0.0 → 46.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,6 +6,7 @@ import { BasemapOperations } from "./basemap.js";
6
6
  import { ChartOperations } from "./charts.js";
7
7
  import { DebugConsoleOperations } from "./debugConsole.js";
8
8
  import { DrawingOperations } from "./drawing.js";
9
+ import { EditOperations } from "./edit.js";
9
10
  import { FileOperations } from "./file.js";
10
11
  import { GeocodeOperations } from "./geocode.js";
11
12
  import { GeolocationOperations } from "./geolocation.js";
@@ -30,6 +31,7 @@ export declare class Operations extends OperationRegistry {
30
31
  readonly app: AppOperations;
31
32
  readonly basemap: BasemapOperations;
32
33
  readonly charts: ChartOperations;
34
+ readonly edit: EditOperations;
33
35
  readonly drawing: DrawingOperations;
34
36
  readonly file: FileOperations;
35
37
  readonly geocode: GeocodeOperations;
@@ -1 +1 @@
1
- import{OperationRegistry}from"../OperationRegistry.js";import{AppOperations}from"./app.js";import{ArcadeOperations}from"./arcade.js";import{AuthOperations}from"./auth.js";import{BasemapOperations}from"./basemap.js";import{ChartOperations}from"./charts.js";import{DebugConsoleOperations}from"./debugConsole.js";import{DrawingOperations}from"./drawing.js";import{FileOperations}from"./file.js";import{GeocodeOperations}from"./geocode.js";import{GeolocationOperations}from"./geolocation.js";import{GeometryOperations}from"./geometry.js";import{HighlightsOperations}from"./highlights.js";import{KpiOperations}from"./kpi.js";import{LogViewerOperations}from"./logViewer.js";import{MapOperations}from"./map.js";import{MeasurementOperations}from"./measurement.js";import{MessagingOperations}from"./messaging.js";import{NetworkOperations}from"./network.js";import{OfflineOperations}from"./offline.js";import{ResultsOperations}from"./results.js";import{SketchingOperations}from"./sketching.js";import{SystemOperations}from"./system.js";import{TasksOperations}from"./tasks.js";import{UIOperations}from"./ui.js";import{ViewerOperations}from"./viewer.js";export class Operations extends OperationRegistry{constructor(){super(...arguments),this.arcade=new ArcadeOperations(this._messages),this.auth=new AuthOperations(this._messages),this.app=new AppOperations(this._messages),this.basemap=new BasemapOperations(this._messages),this.charts=new ChartOperations(this._messages),this.drawing=new DrawingOperations(this._messages),this.file=new FileOperations(this._messages),this.geocode=new GeocodeOperations(this._messages),this.geolocation=new GeolocationOperations(this._messages),this.geometry=new GeometryOperations(this._messages),this.highlights=new HighlightsOperations(this._messages),this.kpi=new KpiOperations(this._messages),this.logViewer=new LogViewerOperations(this._messages),this.map=new MapOperations(this._messages),this.measurement=new MeasurementOperations(this._messages),this.messaging=new MessagingOperations(this._messages),this.network=new NetworkOperations(this._messages),this.offline=new OfflineOperations(this._messages),this.sketching=new SketchingOperations(this._messages),this.system=new SystemOperations(this._messages),this.results=new ResultsOperations(this._messages),this.tasks=new TasksOperations(this._messages),this.ui=new UIOperations(this._messages),this.viewer=new ViewerOperations(this._messages),this.debugConsole=new DebugConsoleOperations(this._messages)}}
1
+ import{OperationRegistry}from"../OperationRegistry.js";import{AppOperations}from"./app.js";import{ArcadeOperations}from"./arcade.js";import{AuthOperations}from"./auth.js";import{BasemapOperations}from"./basemap.js";import{ChartOperations}from"./charts.js";import{DebugConsoleOperations}from"./debugConsole.js";import{DrawingOperations}from"./drawing.js";import{EditOperations}from"./edit.js";import{FileOperations}from"./file.js";import{GeocodeOperations}from"./geocode.js";import{GeolocationOperations}from"./geolocation.js";import{GeometryOperations}from"./geometry.js";import{HighlightsOperations}from"./highlights.js";import{KpiOperations}from"./kpi.js";import{LogViewerOperations}from"./logViewer.js";import{MapOperations}from"./map.js";import{MeasurementOperations}from"./measurement.js";import{MessagingOperations}from"./messaging.js";import{NetworkOperations}from"./network.js";import{OfflineOperations}from"./offline.js";import{ResultsOperations}from"./results.js";import{SketchingOperations}from"./sketching.js";import{SystemOperations}from"./system.js";import{TasksOperations}from"./tasks.js";import{UIOperations}from"./ui.js";import{ViewerOperations}from"./viewer.js";export class Operations extends OperationRegistry{constructor(){super(...arguments),this.arcade=new ArcadeOperations(this._messages),this.auth=new AuthOperations(this._messages),this.app=new AppOperations(this._messages),this.basemap=new BasemapOperations(this._messages),this.charts=new ChartOperations(this._messages),this.edit=new EditOperations(this._messages),this.drawing=new DrawingOperations(this._messages),this.file=new FileOperations(this._messages),this.geocode=new GeocodeOperations(this._messages),this.geolocation=new GeolocationOperations(this._messages),this.geometry=new GeometryOperations(this._messages),this.highlights=new HighlightsOperations(this._messages),this.kpi=new KpiOperations(this._messages),this.logViewer=new LogViewerOperations(this._messages),this.map=new MapOperations(this._messages),this.measurement=new MeasurementOperations(this._messages),this.messaging=new MessagingOperations(this._messages),this.network=new NetworkOperations(this._messages),this.offline=new OfflineOperations(this._messages),this.sketching=new SketchingOperations(this._messages),this.system=new SystemOperations(this._messages),this.results=new ResultsOperations(this._messages),this.tasks=new TasksOperations(this._messages),this.ui=new UIOperations(this._messages),this.viewer=new ViewerOperations(this._messages),this.debugConsole=new DebugConsoleOperations(this._messages)}}
@@ -57,6 +57,18 @@ export declare class AppCommands extends CommandRegistry {
57
57
  * @mobileOnly
58
58
  */
59
59
  get refresh(): Command;
60
+ /**
61
+ * Adds the currently loaded app to the user's Favorites collection.
62
+ *
63
+ * @mobileOnly
64
+ */
65
+ get favorite(): Command;
66
+ /**
67
+ * Removes the currently loaded app from the user's Favorites collection.
68
+ *
69
+ * @mobileOnly
70
+ */
71
+ get unfavorite(): Command;
60
72
  /**
61
73
  * Loads a project's app config and updates the application's current state,
62
74
  * accordingly. If more than one file is provided, only the first will be
@@ -1 +1 @@
1
- import{CommandRegistry}from"../CommandRegistry.js";import{EventRegistry}from"../EventRegistry.js";import{OperationRegistry}from"../OperationRegistry.js";export class AppCommands extends CommandRegistry{get goToAppSelector(){return this._messages.command("app.go-to-app-selector")}get refresh(){return this._messages.command("app.refresh")}get loadProject(){return this._messages.command("app.load-project")}}export class AppEvents extends EventRegistry{constructor(){super(...arguments),this.custom=new AppCustomEvents(this._messages),this.generic=new AppGenericEvents(this._messages)}get activated(){return this._messages.event("app.activated")}get backgrounded(){return this._messages.event("app.backgrounded")}get specificAppStarted(){return this._messages.event("app.specific-app-started")}get interrupted(){return this._messages.event("app.interrupted")}}export class AppCustomEvents extends EventRegistry{get started(){return this._messages.event("app.custom.started")}}export class AppGenericEvents extends EventRegistry{get started(){return this._messages.event("app.generic.started")}get appsListed(){return this._messages.event("app.generic.apps-listed")}}export class AppOperations extends OperationRegistry{get getVersion(){return this._messages.operation("app.get-version")}get createProject(){return this._messages.operation("app.create-project")}}
1
+ import{CommandRegistry}from"../CommandRegistry.js";import{EventRegistry}from"../EventRegistry.js";import{OperationRegistry}from"../OperationRegistry.js";export class AppCommands extends CommandRegistry{get goToAppSelector(){return this._messages.command("app.go-to-app-selector")}get refresh(){return this._messages.command("app.refresh")}get favorite(){return this._messages.command("app.favorite")}get unfavorite(){return this._messages.command("app.unfavorite")}get loadProject(){return this._messages.command("app.load-project")}}export class AppEvents extends EventRegistry{constructor(){super(...arguments),this.custom=new AppCustomEvents(this._messages),this.generic=new AppGenericEvents(this._messages)}get activated(){return this._messages.event("app.activated")}get backgrounded(){return this._messages.event("app.backgrounded")}get specificAppStarted(){return this._messages.event("app.specific-app-started")}get interrupted(){return this._messages.event("app.interrupted")}}export class AppCustomEvents extends EventRegistry{get started(){return this._messages.event("app.custom.started")}}export class AppGenericEvents extends EventRegistry{get started(){return this._messages.event("app.generic.started")}get appsListed(){return this._messages.event("app.generic.apps-listed")}}export class AppOperations extends OperationRegistry{get getVersion(){return this._messages.operation("app.get-version")}get createProject(){return this._messages.operation("app.create-project")}}
@@ -5,7 +5,10 @@ import type { Command } from "../Command.js";
5
5
  import { CommandRegistry } from "../CommandRegistry.js";
6
6
  import type { Event } from "../Event.js";
7
7
  import { EventRegistry } from "../EventRegistry.js";
8
- import type { MapsLike } from "../common.js";
8
+ import type { Operation } from "../Operation.js";
9
+ import { OperationRegistry } from "../OperationRegistry.js";
10
+ import type { HasFeatures, HasGeometry, HasLayers, HasMaps, HasUITarget, MapsLike } from "../common.js";
11
+ import type { EditGeometryOptions } from "./sketching.js";
9
12
  /**
10
13
  * Arguments for the "edit.add-attachment" command.
11
14
  */
@@ -44,6 +47,85 @@ export interface AttachmentEventArgs {
44
47
  */
45
48
  attachment: Attachment;
46
49
  }
50
+ /**
51
+ * Options for editing operations that display a UI.
52
+ */
53
+ export interface EditUIOptions {
54
+ /**
55
+ * Whether to show UI notifications.
56
+ */
57
+ showNotifications?: boolean;
58
+ /**
59
+ * The orientation of the template picker.
60
+ */
61
+ orientation?: "horizontal" | "vertical";
62
+ /**
63
+ * Whether to show titles on the template picker.
64
+ */
65
+ showTitles?: boolean;
66
+ }
67
+ /**
68
+ * A collection of options common to interactive feature editing sessions. Web
69
+ * only.
70
+ */
71
+ export interface EditOptions {
72
+ /**
73
+ * Whether to allow editing of feature geometry.
74
+ */
75
+ editGeometry?: boolean;
76
+ /**
77
+ * Whether to allow editing of feature attributes.
78
+ */
79
+ editAttributes?: boolean;
80
+ /**
81
+ * Whether to allow editing of feature attachments.
82
+ */
83
+ editAttachments?: boolean;
84
+ /**
85
+ * Options for the geometry editing session.
86
+ */
87
+ editGeometryOptions?: EditGeometryOptions;
88
+ }
89
+ /**
90
+ * Arguments for the "edit.create-feature" operation. Also may be supplied to
91
+ * augment an interactive editing session. A valid feature layer is required.
92
+ * The geometry is required for non-tabular features. Web only.
93
+ */
94
+ export interface CreateFeatureArgs extends HasGeometry, HasLayers, HasMaps, EditUIOptions {
95
+ /**
96
+ * A collection of attributes to apply to the new feature.
97
+ */
98
+ featureAttributes?: Record<string, unknown>;
99
+ /**
100
+ * The template to use as a starting point for this feature. Requires a
101
+ * layer. The default or first template will be used if not set.
102
+ */
103
+ templateName?: string;
104
+ }
105
+ /**
106
+ * Arguments for the "edit.display-add-features" command. Web only.
107
+ */
108
+ export interface DisplayAddFeatureArgs extends CreateFeatureArgs, HasMaps, HasUITarget, EditOptions, EditUIOptions {
109
+ }
110
+ /**
111
+ * Arguments for the "edit.display-update-features" operation. Web only.
112
+ */
113
+ export interface DisplayUpdateFeatureArgs extends EditCommandArgs, HasGeometry, HasMaps, EditOptions {
114
+ /**
115
+ * A collection of attributes to automatically apply to the updated feature.
116
+ */
117
+ featureAttributes?: Record<string, unknown>;
118
+ }
119
+ /**
120
+ * Arguments for the "edit.add-features", "edit.update-features" and
121
+ * "edit.delete-features" commands. Web only.
122
+ */
123
+ export interface EditCommandArgs extends HasFeatures {
124
+ /**
125
+ * Whether to show UI notifications.
126
+ */
127
+ showNotifications?: boolean;
128
+ }
47
129
  export declare class EditCommands extends CommandRegistry {
48
130
  /**
49
131
  * Create and add an attachment to a provided feature, using the given
@@ -53,35 +135,38 @@ export declare class EditCommands extends CommandRegistry {
53
135
  */
54
136
  get addAttachment(): Command<AddAttachmentArgs>;
55
137
  /**
56
- * Adds a feature to a particular layer.
57
- *
58
- * @mobileOnly
138
+ * Adds a feature to a particular layer. `Feature[]` and
139
+ * `EditCommandArgs` are not supported on Mobile.
59
140
  */
60
- get addFeature(): Command<Feature>;
141
+ get addFeature(): Command<Feature | Feature[] | EditCommandArgs>;
61
142
  /**
62
143
  * Deletes the given feature or features from their feature sources.
63
- *
64
- * @mobileOnly
144
+ * `EditCommandArgs` is not supported on Mobile.
65
145
  */
66
- get deleteFeatures(): Command<Feature | Feature[]>;
146
+ get deleteFeatures(): Command<Feature | Feature[] | EditCommandArgs>;
67
147
  /**
68
- * Display a form for adding a feature.
69
- *
70
- * @mobileOnly
148
+ * Display a form for adding a feature. `DisplayAddFeatureArgs` is not
149
+ * supported on Mobile.
71
150
  */
72
- get displayAddFeature(): Command<FeatureSource>;
151
+ get displayAddFeature(): Command<FeatureSource | DisplayAddFeatureArgs>;
73
152
  /**
74
- * Display a form for updating a feature.
75
- *
76
- * @mobileOnly
153
+ * Display a form for updating a feature. `DisplayUpdateFeatureArgs` is not
154
+ * supported on Mobile.
77
155
  */
78
- get displayUpdateFeature(): Command<Feature>;
156
+ get displayUpdateFeature(): Command<Feature | DisplayUpdateFeatureArgs>;
157
+ /**
158
+ * Updates a feature. `Feature[]` and `EditCommandArgs` are not
159
+ * supported on Mobile.
160
+ */
161
+ get updateFeature(): Command<Feature | Feature[] | EditCommandArgs>;
162
+ }
163
+ export declare class EditOperations extends OperationRegistry {
79
164
  /**
80
- * Updates a feature.
165
+ * Creates a new `Feature` for the supplied layer from the supplied data.
81
166
  *
82
- * @mobileOnly
167
+ * @webOnly
83
168
  */
84
- get updateFeature(): Command<Feature>;
169
+ get createFeature(): Operation<CreateFeatureArgs, HasFeatures>;
85
170
  }
86
171
  export declare class EditEvents extends EventRegistry {
87
172
  /**
@@ -104,20 +189,14 @@ export declare class EditEvents extends EventRegistry {
104
189
  get attachmentDeleted(): Event<AttachmentEventArgs>;
105
190
  /**
106
191
  * Raised when a feature is added.
107
- *
108
- * @mobileOnly
109
192
  */
110
193
  get featureAdded(): Event<Feature>;
111
194
  /**
112
195
  * Raised when a feature is deleted.
113
- *
114
- * @mobileOnly
115
196
  */
116
197
  get featureDeleted(): Event<Feature>;
117
198
  /**
118
199
  * Raised when a feature is updated.
119
- *
120
- * @mobileOnly
121
200
  */
122
201
  get featureUpdated(): Event<Feature>;
123
202
  }
@@ -1 +1 @@
1
- import{CommandRegistry}from"../CommandRegistry.js";import{EventRegistry}from"../EventRegistry.js";export class EditCommands extends CommandRegistry{get addAttachment(){return this._messages.command("edit.add-attachment")}get addFeature(){return this._messages.command("edit.add-feature")}get deleteFeatures(){return this._messages.command("edit.delete-features")}get displayAddFeature(){return this._messages.command("edit.display-add-feature")}get displayUpdateFeature(){return this._messages.command("edit.display-update-feature")}get updateFeature(){return this._messages.command("edit.update-feature")}}export class EditEvents extends EventRegistry{get attachmentAdded(){return this._messages.event("edit.attachment-added")}get attachmentUpdated(){return this._messages.event("edit.attachment-updated")}get attachmentDeleted(){return this._messages.event("edit.attachment-deleted")}get featureAdded(){return this._messages.event("edit.feature-added")}get featureDeleted(){return this._messages.event("edit.feature-deleted")}get featureUpdated(){return this._messages.event("edit.feature-updated")}}
1
+ import{CommandRegistry}from"../CommandRegistry.js";import{EventRegistry}from"../EventRegistry.js";import{OperationRegistry}from"../OperationRegistry.js";export class EditCommands extends CommandRegistry{get addAttachment(){return this._messages.command("edit.add-attachment")}get addFeature(){return this._messages.command("edit.add-feature")}get deleteFeatures(){return this._messages.command("edit.delete-features")}get displayAddFeature(){return this._messages.command("edit.display-add-feature")}get displayUpdateFeature(){return this._messages.command("edit.display-update-feature")}get updateFeature(){return this._messages.command("edit.update-feature")}}export class EditOperations extends OperationRegistry{get createFeature(){return this._messages.operation("edit.create-feature")}}export class EditEvents extends EventRegistry{get attachmentAdded(){return this._messages.event("edit.attachment-added")}get attachmentUpdated(){return this._messages.event("edit.attachment-updated")}get attachmentDeleted(){return this._messages.event("edit.attachment-deleted")}get featureAdded(){return this._messages.event("edit.feature-added")}get featureDeleted(){return this._messages.event("edit.feature-deleted")}get featureUpdated(){return this._messages.event("edit.feature-updated")}}
@@ -2,7 +2,7 @@ import type { Command } from "../Command.js";
2
2
  import { CommandRegistry } from "../CommandRegistry.js";
3
3
  import type { Operation } from "../Operation.js";
4
4
  import { OperationRegistry } from "../OperationRegistry.js";
5
- import type { Blob, File, HasUITarget } from "../common.js";
5
+ import type { Blob, File, HasFeatures, HasGeometry, HasLayers, HasMaps, HasUITarget } from "../common.js";
6
6
  /**
7
7
  * Arguments for the system.download-file operation.
8
8
  */
@@ -40,6 +40,24 @@ export interface ReadFileArgs extends HasUITarget {
40
40
  */
41
41
  promptMessage?: string;
42
42
  }
43
+ /**
44
+ * Well-known location-based tokens that can be used in the system.open-url
45
+ * command arguments. Location.Map.ZoomLevel is not supported by Mobile; the
46
+ * supported levels and their associated numeric values can be found here:
47
+ * https://developers.arcgis.com/documentation/mapping-apis-and-services/reference/zoom-levels-and-scale/.
48
+ */
49
+ export declare type LocationToken = "Location.Geolocation.Latitude" | "Location.Geolocation.Longitude" | "Location.Feature.Latitude" | "Location.Feature.Longitude" | "Location.Map.Center.Latitude" | "Location.Map.Center.Longitude" | "Location.Map.Scale" | "Location.Map.ZoomLevel" | "Location.Map.TopLeft.Latitude" | "Location.Map.TopLeft.Longitude" | "Location.Map.TopRight.Latitude" | "Location.Map.TopRight.Longitude" | "Location.Map.BottomLeft.Latitude" | "Location.Map.BottomLeft.Longitude" | "Location.Map.BottomRight.Latitude" | "Location.Map.BottomRight.Longitude";
50
+ /**
51
+ * Well-known layer-based tokens that can be used in the system.open-url command
52
+ * arguments. NOTE: Not all layer types support extents, urls, min/max scales,
53
+ * and/or min/max zoom levels.
54
+ */
55
+ export declare type LayerToken = "Layer.Extent.TopLeft.Latitude" | "Layer.Extent.TopLeft.Longitude" | "Layer.Extent.TopRight.Latitude" | "Layer.Extent.TopRight.Longitude" | "Layer.Extent.BottomLeft.Latitude" | "Layer.Extent.BottomLeft.Longitude" | "Layer.Extent.BottomRight.Latitude" | "Layer.Extent.BottomRight.Longitude" | "Layer.Extent.MaxScale" | "Layer.Extent.MinScale" | "Layer.Extent.MaxZoomLevel" | "Layer.Extent.MinZoomLevel" | "Layer.ID" | "Layer.Title" | "Layer.URL";
56
+ /**
57
+ * VertiGIS Studio Web's arguments for the system.open-url command.
58
+ */
59
+ export interface WebOpenUrlArgs extends Omit<OpenUrlArgs, "context">, HasMaps, HasFeatures, HasGeometry, HasLayers {
60
+ }
43
61
  /**
44
62
  * Arguments for the system.open-url command.
45
63
  */
@@ -79,19 +97,22 @@ export declare class SystemCommands extends CommandRegistry {
79
97
  get downloadFile(): Command<DownloadArgs | Record<string, unknown> | string>;
80
98
  /**
81
99
  * Opens a URL, either in the system browser or whatever app is appropriate
82
- * for the scheme of the URL. If the context is a {@link Features}, then the
83
- * URL may contain substitution tokens in the format {FIELD_NAME} where
84
- * FIELD_NAME is the name of a field in the first feature in the context. In
85
- * this case, the {FIELD_NAME} is substituted with value of the FIELD_NAME
86
- * field from the feature feature in the {@link Features}, e.g.
100
+ * for the scheme of the URL. If {@link Features} are included as context,
101
+ * then the URL may contain substitution tokens in the format {FIELD_NAME}
102
+ * where FIELD_NAME is the name of a field in the first feature in the
103
+ * context. In this case, the {FIELD_NAME} is substituted with value of the
104
+ * FIELD_NAME field from the feature feature in the {@link Features}, e.g.
87
105
  * https://www.google.com/search?q={NAME}, where the value of the NAME field
88
106
  * in the first feature from the context is 'Jasper National Park' would
89
107
  * produce the result https://www.google.com/search?q=Jasper National Park.
90
- * Zero to many substitution tokens may be included.
108
+ * Zero to many substitution tokens may be included. If maps are included as
109
+ * context, {@link LocationToken} can be used to access properties on the
110
+ * first map's view. In Web, if both layers and maps are included as
111
+ * context, then {@link LayerToken} can be used to access properties on the
112
+ * first layer.
91
113
  *
92
- * @mobileOnly
93
114
  */
94
- get openUrl(): Command<OpenUrlArgs | string>;
115
+ get openUrl(): Command<OpenUrlArgs | WebOpenUrlArgs | string>;
95
116
  /**
96
117
  * Allows to control if the screen should be kept on. Passing true as parameter
97
118
  * will keep the screen on, ignoring possible system settings for screen timeouts.
@@ -82,7 +82,7 @@ export interface DisplayNotificationArgs {
82
82
  */
83
83
  message: TranslatableText;
84
84
  /**
85
- * The position of the notification on the screen.
85
+ * The position of the notification on the screen. Web only.
86
86
  */
87
87
  position?: Position;
88
88
  /**