@vertigis/viewer-spec 46.1.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.
@@ -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
  /**
@@ -822,7 +822,7 @@
822
822
  },
823
823
  "position": {
824
824
  "$ref": "Position",
825
- "description": "The position of the notification on the screen."
825
+ "description": "The position of the notification on the screen. Web only."
826
826
  },
827
827
  "title": {
828
828
  "description": "The notification title - only shown for system notifications. Mobile only.",
@@ -1579,6 +1579,27 @@
1579
1579
  ],
1580
1580
  "type": "string"
1581
1581
  },
1582
+ "OpenUrlArgs": {
1583
+ "additionalProperties": false,
1584
+ "description": "Arguments for the system.open-url command.",
1585
+ "properties": {
1586
+ "context": {
1587
+ "description": "An object containing arguments that this command was originally executed with. This property is populated automatically when using a bound action. The URL will be the configured value, and the context is automatically populated as the argument that was passed into the execute method when the command was executed in context."
1588
+ },
1589
+ "numberFormatterLocale": {
1590
+ "description": "The locale to use for number token substitution. Accepts a valid locale code (example: \"en\", \"fr\" or \"de-AT\"), or \"device\" or \"invariant\" which will use the device's current culture or the invariant culture, respectively. Default is invariant culture.",
1591
+ "type": "string"
1592
+ },
1593
+ "url": {
1594
+ "description": "The URL to open.",
1595
+ "type": "string"
1596
+ }
1597
+ },
1598
+ "required": [
1599
+ "url"
1600
+ ],
1601
+ "type": "object"
1602
+ },
1582
1603
  "Results": {
1583
1604
  "additionalProperties": false,
1584
1605
  "description": "Feature results from an operation.",
@@ -2106,6 +2127,40 @@
2106
2127
  ],
2107
2128
  "type": "object"
2108
2129
  },
2130
+ "WebOpenUrlArgs": {
2131
+ "additionalProperties": false,
2132
+ "description": "VertiGIS Studio Web's arguments for the system.open-url command.",
2133
+ "properties": {
2134
+ "features": {
2135
+ "$ref": "#/definitions/FeaturesLike",
2136
+ "description": "Features to use for the command/operation."
2137
+ },
2138
+ "geometry": {
2139
+ "$ref": "#/definitions/GeometryLike",
2140
+ "description": "The geometry to use for the command/operation."
2141
+ },
2142
+ "layers": {
2143
+ "$ref": "#/definitions/LayersLike",
2144
+ "description": "Layer(s) to use for the command/operation."
2145
+ },
2146
+ "maps": {
2147
+ "$ref": "MapsLike",
2148
+ "description": "Map(s) to use for the command/operation."
2149
+ },
2150
+ "numberFormatterLocale": {
2151
+ "description": "The locale to use for number token substitution. Accepts a valid locale code (example: \"en\", \"fr\" or \"de-AT\"), or \"device\" or \"invariant\" which will use the device's current culture or the invariant culture, respectively. Default is invariant culture.",
2152
+ "type": "string"
2153
+ },
2154
+ "url": {
2155
+ "description": "The URL to open.",
2156
+ "type": "string"
2157
+ }
2158
+ },
2159
+ "required": [
2160
+ "url"
2161
+ ],
2162
+ "type": "object"
2163
+ },
2109
2164
  "ZoomToViewpointArgs": {
2110
2165
  "additionalProperties": false,
2111
2166
  "description": "Arguments for the map.zoom-to-viewpoint command.",
@@ -11665,6 +11720,25 @@
11665
11720
  "sketching.undo:input": {
11666
11721
  "$ref": "#/definitions/HasMaps"
11667
11722
  },
11723
+ "system.open-url": {
11724
+ "description": "Opens a URL, either in the system browser or whatever app is appropriate for the scheme of the URL. If {@link Features} are included as context, then the URL may contain substitution tokens in the format {FIELD_NAME} where FIELD_NAME is the name of a field in the first feature in the context. In this case, the {FIELD_NAME} is substituted with value of the FIELD_NAME field from the feature feature in the {@link Features}, e.g. https://www.google.com/search?q={NAME}, where the value of the NAME field in the first feature from the context is 'Jasper National Park' would produce the result https://www.google.com/search?q=Jasper National Park. Zero to many substitution tokens may be included. If maps are included as context, {@link LocationToken} can be used to access properties on the first map's view. In Web, if both layers and maps are included as context, then {@link LayerToken} can be used to access properties on the first layer.",
11725
+ "enum": [
11726
+ "system.open-url"
11727
+ ]
11728
+ },
11729
+ "system.open-url:input": {
11730
+ "anyOf": [
11731
+ {
11732
+ "$ref": "#/definitions/WebOpenUrlArgs"
11733
+ },
11734
+ {
11735
+ "$ref": "#/definitions/OpenUrlArgs"
11736
+ },
11737
+ {
11738
+ "type": "string"
11739
+ }
11740
+ ]
11741
+ },
11668
11742
  "tasks.identify": {
11669
11743
  "description": "Returns features that intersect a given geometry.",
11670
11744
  "enum": [
@@ -12457,6 +12531,22 @@
12457
12531
  ],
12458
12532
  "type": "object"
12459
12533
  },
12534
+ {
12535
+ "additionalProperties": false,
12536
+ "properties": {
12537
+ "arguments": {
12538
+ "$ref": "#/definitions/system.open-url:input"
12539
+ },
12540
+ "name": {
12541
+ "$ref": "#/definitions/system.open-url"
12542
+ }
12543
+ },
12544
+ "required": [
12545
+ "name",
12546
+ "arguments"
12547
+ ],
12548
+ "type": "object"
12549
+ },
12460
12550
  {
12461
12551
  "additionalProperties": false,
12462
12552
  "properties": {
@@ -12688,6 +12778,9 @@
12688
12778
  {
12689
12779
  "$ref": "#/definitions/sketching.undo"
12690
12780
  },
12781
+ {
12782
+ "$ref": "#/definitions/system.open-url"
12783
+ },
12691
12784
  {
12692
12785
  "$ref": "#/definitions/ui.activate"
12693
12786
  },
@@ -1051,7 +1051,7 @@
1051
1051
  },
1052
1052
  "position": {
1053
1053
  "$ref": "Position",
1054
- "description": "The position of the notification on the screen."
1054
+ "description": "The position of the notification on the screen. Web only."
1055
1055
  },
1056
1056
  "title": {
1057
1057
  "description": "The notification title - only shown for system notifications. Mobile only.",
@@ -2223,7 +2223,7 @@
2223
2223
  "description": "An object containing arguments that this command was originally executed with. This property is populated automatically when using a bound action. The URL will be the configured value, and the context is automatically populated as the argument that was passed into the execute method when the command was executed in context."
2224
2224
  },
2225
2225
  "numberFormatterLocale": {
2226
- "description": "The locale to use for number token substitution. Accepts a valid locale code (example: \"en\", \"fr\" or \"de-AT\"), or \"device\" or \"invariant\" which will use the device's current culture or the invariant culture, respectively. Default is invariant culture.",
2226
+ "description": "The locale to use for number token substitution. Accepts a valid locale code (example: \"en\", \"fr\" or \"de-AT\"), or \"device\" or \"invariant\" which will use the device's current culture or the invariant culture, respectively. Default is invariant culture.",
2227
2227
  "type": "string"
2228
2228
  },
2229
2229
  "url": {
@@ -3006,6 +3006,40 @@
3006
3006
  ],
3007
3007
  "type": "object"
3008
3008
  },
3009
+ "WebOpenUrlArgs": {
3010
+ "additionalProperties": false,
3011
+ "description": "VertiGIS Studio Web's arguments for the system.open-url command.",
3012
+ "properties": {
3013
+ "features": {
3014
+ "$ref": "#/definitions/FeaturesLike",
3015
+ "description": "Features to use for the command/operation."
3016
+ },
3017
+ "geometry": {
3018
+ "$ref": "#/definitions/GeometryLike",
3019
+ "description": "The geometry to use for the command/operation."
3020
+ },
3021
+ "layers": {
3022
+ "$ref": "#/definitions/LayersLike",
3023
+ "description": "Layer(s) to use for the command/operation."
3024
+ },
3025
+ "maps": {
3026
+ "$ref": "MapsLike",
3027
+ "description": "Map(s) to use for the command/operation."
3028
+ },
3029
+ "numberFormatterLocale": {
3030
+ "description": "The locale to use for number token substitution. Accepts a valid locale code (example: \"en\", \"fr\" or \"de-AT\"), or \"device\" or \"invariant\" which will use the device's current culture or the invariant culture, respectively. Default is invariant culture.",
3031
+ "type": "string"
3032
+ },
3033
+ "url": {
3034
+ "description": "The URL to open.",
3035
+ "type": "string"
3036
+ }
3037
+ },
3038
+ "required": [
3039
+ "url"
3040
+ ],
3041
+ "type": "object"
3042
+ },
3009
3043
  "ZoomToViewpointArgs": {
3010
3044
  "additionalProperties": false,
3011
3045
  "description": "Arguments for the map.zoom-to-viewpoint command.",
@@ -13578,13 +13612,16 @@
13578
13612
  "type": "boolean"
13579
13613
  },
13580
13614
  "system.open-url": {
13581
- "description": "Opens a URL, either in the system browser or whatever app is appropriate for the scheme of the URL. If the context is a {@link Features}, then the URL may contain substitution tokens in the format {FIELD_NAME} where FIELD_NAME is the name of a field in the first feature in the context. In this case, the {FIELD_NAME} is substituted with value of the FIELD_NAME field from the feature feature in the {@link Features}, e.g. https://www.google.com/search?q={NAME}, where the value of the NAME field in the first feature from the context is 'Jasper National Park' would produce the result https://www.google.com/search?q=Jasper National Park. Zero to many substitution tokens may be included.",
13615
+ "description": "Opens a URL, either in the system browser or whatever app is appropriate for the scheme of the URL. If {@link Features} are included as context, then the URL may contain substitution tokens in the format {FIELD_NAME} where FIELD_NAME is the name of a field in the first feature in the context. In this case, the {FIELD_NAME} is substituted with value of the FIELD_NAME field from the feature feature in the {@link Features}, e.g. https://www.google.com/search?q={NAME}, where the value of the NAME field in the first feature from the context is 'Jasper National Park' would produce the result https://www.google.com/search?q=Jasper National Park. Zero to many substitution tokens may be included. If maps are included as context, {@link LocationToken} can be used to access properties on the first map's view. In Web, if both layers and maps are included as context, then {@link LayerToken} can be used to access properties on the first layer.",
13582
13616
  "enum": [
13583
13617
  "system.open-url"
13584
13618
  ]
13585
13619
  },
13586
13620
  "system.open-url:input": {
13587
13621
  "anyOf": [
13622
+ {
13623
+ "$ref": "#/definitions/WebOpenUrlArgs"
13624
+ },
13588
13625
  {
13589
13626
  "$ref": "#/definitions/OpenUrlArgs"
13590
13627
  },
@@ -1484,7 +1484,7 @@
1484
1484
  },
1485
1485
  "position": {
1486
1486
  "$ref": "Position",
1487
- "description": "The position of the notification on the screen."
1487
+ "description": "The position of the notification on the screen. Web only."
1488
1488
  },
1489
1489
  "title": {
1490
1490
  "description": "The notification title - only shown for system notifications. Mobile only.",
@@ -3591,6 +3591,27 @@
3591
3591
  ],
3592
3592
  "type": "string"
3593
3593
  },
3594
+ "OpenUrlArgs": {
3595
+ "additionalProperties": false,
3596
+ "description": "Arguments for the system.open-url command.",
3597
+ "properties": {
3598
+ "context": {
3599
+ "description": "An object containing arguments that this command was originally executed with. This property is populated automatically when using a bound action. The URL will be the configured value, and the context is automatically populated as the argument that was passed into the execute method when the command was executed in context."
3600
+ },
3601
+ "numberFormatterLocale": {
3602
+ "description": "The locale to use for number token substitution. Accepts a valid locale code (example: \"en\", \"fr\" or \"de-AT\"), or \"device\" or \"invariant\" which will use the device's current culture or the invariant culture, respectively. Default is invariant culture.",
3603
+ "type": "string"
3604
+ },
3605
+ "url": {
3606
+ "description": "The URL to open.",
3607
+ "type": "string"
3608
+ }
3609
+ },
3610
+ "required": [
3611
+ "url"
3612
+ ],
3613
+ "type": "object"
3614
+ },
3594
3615
  "Orientation": {
3595
3616
  "description": "An orientation for the layout.",
3596
3617
  "enum": [
@@ -5303,6 +5324,40 @@
5303
5324
  ],
5304
5325
  "type": "object"
5305
5326
  },
5327
+ "WebOpenUrlArgs": {
5328
+ "additionalProperties": false,
5329
+ "description": "VertiGIS Studio Web's arguments for the system.open-url command.",
5330
+ "properties": {
5331
+ "features": {
5332
+ "$ref": "#/definitions/FeaturesLike",
5333
+ "description": "Features to use for the command/operation."
5334
+ },
5335
+ "geometry": {
5336
+ "$ref": "#/definitions/GeometryLike",
5337
+ "description": "The geometry to use for the command/operation."
5338
+ },
5339
+ "layers": {
5340
+ "$ref": "#/definitions/LayersLike",
5341
+ "description": "Layer(s) to use for the command/operation."
5342
+ },
5343
+ "maps": {
5344
+ "$ref": "MapsLike",
5345
+ "description": "Map(s) to use for the command/operation."
5346
+ },
5347
+ "numberFormatterLocale": {
5348
+ "description": "The locale to use for number token substitution. Accepts a valid locale code (example: \"en\", \"fr\" or \"de-AT\"), or \"device\" or \"invariant\" which will use the device's current culture or the invariant culture, respectively. Default is invariant culture.",
5349
+ "type": "string"
5350
+ },
5351
+ "url": {
5352
+ "description": "The URL to open.",
5353
+ "type": "string"
5354
+ }
5355
+ },
5356
+ "required": [
5357
+ "url"
5358
+ ],
5359
+ "type": "object"
5360
+ },
5306
5361
  "ZoomToLayerArgs": {
5307
5362
  "additionalProperties": false,
5308
5363
  "description": "Arguments for the map.zoom-to-layer-extent and map.zoom-to-layer-visible-scale commands.",
@@ -17509,6 +17564,25 @@
17509
17564
  "system.get-sharing-link:output": {
17510
17565
  "type": "string"
17511
17566
  },
17567
+ "system.open-url": {
17568
+ "description": "Opens a URL, either in the system browser or whatever app is appropriate for the scheme of the URL. If {@link Features} are included as context, then the URL may contain substitution tokens in the format {FIELD_NAME} where FIELD_NAME is the name of a field in the first feature in the context. In this case, the {FIELD_NAME} is substituted with value of the FIELD_NAME field from the feature feature in the {@link Features}, e.g. https://www.google.com/search?q={NAME}, where the value of the NAME field in the first feature from the context is 'Jasper National Park' would produce the result https://www.google.com/search?q=Jasper National Park. Zero to many substitution tokens may be included. If maps are included as context, {@link LocationToken} can be used to access properties on the first map's view. In Web, if both layers and maps are included as context, then {@link LayerToken} can be used to access properties on the first layer.",
17569
+ "enum": [
17570
+ "system.open-url"
17571
+ ]
17572
+ },
17573
+ "system.open-url:input": {
17574
+ "anyOf": [
17575
+ {
17576
+ "$ref": "#/definitions/WebOpenUrlArgs"
17577
+ },
17578
+ {
17579
+ "$ref": "#/definitions/OpenUrlArgs"
17580
+ },
17581
+ {
17582
+ "type": "string"
17583
+ }
17584
+ ]
17585
+ },
17512
17586
  "system.read-file": {
17513
17587
  "description": "Initiates a file read, using the native browser file input.",
17514
17588
  "enum": [
@@ -19577,6 +19651,22 @@
19577
19651
  ],
19578
19652
  "type": "object"
19579
19653
  },
19654
+ {
19655
+ "additionalProperties": false,
19656
+ "properties": {
19657
+ "arguments": {
19658
+ "$ref": "#/definitions/system.open-url:input"
19659
+ },
19660
+ "name": {
19661
+ "$ref": "#/definitions/system.open-url"
19662
+ }
19663
+ },
19664
+ "required": [
19665
+ "name",
19666
+ "arguments"
19667
+ ],
19668
+ "type": "object"
19669
+ },
19580
19670
  {
19581
19671
  "additionalProperties": false,
19582
19672
  "properties": {
@@ -20145,6 +20235,9 @@
20145
20235
  {
20146
20236
  "$ref": "#/definitions/system.download-file"
20147
20237
  },
20238
+ {
20239
+ "$ref": "#/definitions/system.open-url"
20240
+ },
20148
20241
  {
20149
20242
  "$ref": "#/definitions/ui.activate"
20150
20243
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vertigis/viewer-spec",
3
- "version": "46.1.0",
3
+ "version": "46.2.0",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "description": "VertiGIS Viewer Specification",
6
6
  "type": "module",
@@ -34,7 +34,7 @@
34
34
  },
35
35
  "author": "VertiGIS Ltd.",
36
36
  "peerDependencies": {
37
- "@vertigis/arcgis-extensions": ">= 34.2.2 < 35.0.0"
37
+ "@vertigis/arcgis-extensions": ">= 34.2.3 < 35.0.0"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@arcgis/core": "4.21.2",
package/version.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * The current version of the Geocortex Viewer Specification.
3
3
  */
4
- export declare const version = "46.1.0";
4
+ export declare const version = "46.2.0";
package/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * The current version of the Geocortex Viewer Specification.
3
3
  */
4
- export const version = "46.1.0";
4
+ export const version = "46.2.0";