@vertigis/viewer-spec 45.2.0 → 46.2.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.
@@ -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.
@@ -1,5 +1,5 @@
1
1
  import type { UIDensity } from "../../app-config/common/BrandingModelProperties.js";
2
- import type { TranslateOptions } from "../../app-config/common/TranslatableText.js";
2
+ import type { TranslatableText, TranslateOptions } from "../../app-config/common/TranslatableText.js";
3
3
  import type { Command } from "../Command.js";
4
4
  import { CommandRegistry } from "../CommandRegistry.js";
5
5
  import type { Event } from "../Event.js";
@@ -77,11 +77,12 @@ export interface DisplayNotificationArgs {
77
77
  */
78
78
  category?: NotificationCategory;
79
79
  /**
80
- * The message to be displayed in the notification.
80
+ * The message to be displayed in the notification. Mobile only supports a
81
+ * string for this property.
81
82
  */
82
- message: string;
83
+ message: TranslatableText;
83
84
  /**
84
- * The position of the notification on the screen.
85
+ * The position of the notification on the screen. Web only.
85
86
  */
86
87
  position?: Position;
87
88
  /**