@vertigis/arcgis-extensions 48.4.0 → 48.5.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.
Files changed (183) hide show
  1. package/AppConfig.schema.json +29 -21
  2. package/data/FeatureSettings.js +1 -1
  3. package/data/_TableExtension.d.ts +1 -1
  4. package/docs/html/assets/navigation.js +1 -1
  5. package/docs/html/assets/search.js +1 -1
  6. package/docs/html/classes/data__TableExtension.TableSchema.html +2 -2
  7. package/docs/html/classes/tasks_identify_WMSSublayerIdentifyProvider.WMSSublayerIdentifyProvider.html +2 -2
  8. package/docs/html/classes/utilities_ObservableSet.ObservableSet.html +1 -1
  9. package/docs/html/classes/utilities_ObservableWeakSet.ObservableWeakSet.html +1 -1
  10. package/docs/html/classes/utilities_log.ConsoleLogger.html +7 -7
  11. package/docs/html/classes/utilities_log.LoggerBase.html +7 -7
  12. package/docs/html/functions/utilities__gml.esriToGml.html +2 -2
  13. package/docs/html/functions/utilities__layers.getEquivalencyTypeForLayers.html +1 -0
  14. package/docs/html/functions/utilities__layers.getLayerUrl.html +2 -2
  15. package/docs/html/functions/utilities_geometry.buffer.html +5 -5
  16. package/docs/html/functions/utilities_geometry.esriToGml.html +2 -2
  17. package/docs/html/functions/utilities_iterable.find.html +2 -2
  18. package/docs/html/functions/utilities_iterable.first.html +2 -2
  19. package/docs/html/functions/utilities_mapping.getMapSpatialReference.html +2 -2
  20. package/docs/html/functions/utilities_object.deepSearchAndTransform.html +6 -4
  21. package/docs/html/functions/utilities_object.deepSearchAndTransformAsync.html +6 -4
  22. package/docs/html/functions/utilities_object.getPropertyDescriptor.html +2 -2
  23. package/docs/html/functions/utilities_object.isEmpty.html +1 -1
  24. package/docs/html/functions/utilities_object.map.html +1 -1
  25. package/docs/html/functions/utilities_object.toJSON.html +1 -1
  26. package/docs/html/functions/utilities_portal.getPortalItemHtmlUrl.html +2 -2
  27. package/docs/html/functions/utilities_portal.toPortalItem.html +4 -1
  28. package/docs/html/functions/utilities_set.find.html +2 -2
  29. package/docs/html/hierarchy.html +1 -1
  30. package/docs/html/interfaces/data_FieldExtension.FieldProperties.html +4 -2
  31. package/docs/html/interfaces/json_AnnotationLayerJson.AnnotationLayerJson.html +2 -2
  32. package/docs/html/interfaces/json_BasemapLayerJson.BasemapLayerJsonBase.html +2 -2
  33. package/docs/html/interfaces/json_BingLayerJson.BingLayerJson.html +2 -2
  34. package/docs/html/interfaces/json_BuildingSceneLayerJson.BuildingSceneLayerJson.html +2 -2
  35. package/docs/html/interfaces/json_CSVLayerJson.CSVLayerJson.html +2 -2
  36. package/docs/html/interfaces/json_FeatureLayerJson.FeatureLayerJson.html +5 -3
  37. package/docs/html/interfaces/json_FeatureSetJson.FeatureSetJson.html +4 -2
  38. package/docs/html/interfaces/json_FieldJson.FieldJson.html +4 -2
  39. package/docs/html/interfaces/json_GeoJSONLayerJson.GeoJSONLayerJson.html +2 -2
  40. package/docs/html/interfaces/json_GeoRSSLayerJson.GeoRSSLayerJson.html +2 -2
  41. package/docs/html/interfaces/json_GroupLayerJson.GroupLayerJson.html +2 -2
  42. package/docs/html/interfaces/json_ImageServiceLayerJson.ImageServiceLayerJson.html +2 -2
  43. package/docs/html/interfaces/json_ImageServiceVectorLayerJson.ImageServiceVectorLayerJson.html +2 -2
  44. package/docs/html/interfaces/json_IntegratedMeshLayerJson.IntegratedMeshLayerJson.html +2 -2
  45. package/docs/html/interfaces/json_ItemJson.ItemJson.html +5 -2
  46. package/docs/html/interfaces/json_KMLLayerJson.KMLLayerJson.html +2 -2
  47. package/docs/html/interfaces/json_LayerDefinitionJson.LayerDefinitionJson.html +2 -2
  48. package/docs/html/interfaces/json_LayerJson.LayerJsonBase.html +2 -2
  49. package/docs/html/interfaces/json_MapServiceLayerJson.MapServiceLayerJson.html +2 -2
  50. package/docs/html/interfaces/json_OpenStreetMapLayerJson.OpenStreetMapLayerJson.html +2 -2
  51. package/docs/html/interfaces/json_OperationalLayerJson.OperationalLayerJsonBase.html +2 -2
  52. package/docs/html/interfaces/json_PointCloudLayerJson.PointCloudLayerJson.html +2 -2
  53. package/docs/html/interfaces/json_RasterDataElevationLayerJson.RasterDataElevationLayerJson.html +2 -2
  54. package/docs/html/interfaces/json_SceneLayerJson.SceneLayerJson.html +2 -2
  55. package/docs/html/interfaces/json_StreamLayerJson.StreamLayerJson.html +6 -4
  56. package/docs/html/interfaces/json_SubtypeGroupLayerJson.SubtypeGroupLayerJson.html +10 -5
  57. package/docs/html/interfaces/json_SubtypeGroupLayerJson.SubtypeSubtypeGroupLayerJson.html +10 -5
  58. package/docs/html/interfaces/json_SubtypeSublayerJson.SubtypeSublayerJson.html +9 -6
  59. package/docs/html/interfaces/json_SymbolJson.TextSymbolJson.html +2 -2
  60. package/docs/html/interfaces/json_TiledElevationServiceLayerJson.TiledElevationServiceLayerJson.html +2 -2
  61. package/docs/html/interfaces/json_TiledImageServiceLayerJson.TiledImageServiceLayerJson.html +2 -2
  62. package/docs/html/interfaces/json_TiledMapServiceLayerJson.TiledMapServiceLayerJson.html +2 -2
  63. package/docs/html/interfaces/json_VectorTileLayerJson.VectorTileLayerJson.html +2 -2
  64. package/docs/html/interfaces/json_WFSLayerJson.WFSLayerJson.html +2 -2
  65. package/docs/html/interfaces/json_WMSLayerJson.WMSLayerJson.html +2 -2
  66. package/docs/html/interfaces/json_WebTileLayerJson.TileInfoJson.html +2 -2
  67. package/docs/html/interfaces/json_WebTileLayerJson.WebTileLayerJson.html +2 -2
  68. package/docs/html/interfaces/mapping_BuildingSceneLayerExtension.BuildingSceneLayerProperties.html +2 -2
  69. package/docs/html/interfaces/mapping_FeatureLayerExtension.FeatureLayerProperties.html +6 -4
  70. package/docs/html/interfaces/mapping_FeatureLayerExtensionBase.FeatureLayerBaseProperties.html +6 -4
  71. package/docs/html/interfaces/mapping_MapImageLayerExtension.MapImageLayerExtensionProperties.html +3 -3
  72. package/docs/html/interfaces/mapping_PointCloudLayerExtension.PointCloudLayerProperties.html +2 -2
  73. package/docs/html/interfaces/utilities_format_FormatSettings.FormatSettings.html +1 -1
  74. package/docs/html/interfaces/utilities_log.LogMessageOptions.html +30 -0
  75. package/docs/html/interfaces/utilities_log.LogMessageResourceOptions.html +33 -0
  76. package/docs/html/interfaces/utilities_log.Logger.html +8 -8
  77. package/docs/html/modules/utilities_log.html +3 -1
  78. package/docs/html/types/utilities_log.LogOptions.html +2 -0
  79. package/docs/html/variables/version.version.html +1 -1
  80. package/json/AnnotationLayerJson.d.ts +7 -7
  81. package/json/BasemapJson.d.ts +4 -4
  82. package/json/BasemapJson.js +1 -1
  83. package/json/BasemapLayerJson.d.ts +1 -1
  84. package/json/BingLayerJson.d.ts +1 -1
  85. package/json/BuildingSceneLayerJson.d.ts +18 -18
  86. package/json/BuildingSceneSublayerJson.d.ts +8 -8
  87. package/json/CSVLayerJson.d.ts +12 -12
  88. package/json/DefinitionEditorJson.d.ts +9 -9
  89. package/json/DrawingInfoJson.d.ts +29 -29
  90. package/json/EnvironmentJson.d.ts +19 -19
  91. package/json/FeatureCollectionJson.d.ts +1 -1
  92. package/json/FeatureJson.d.ts +4 -4
  93. package/json/FeatureJson.js +1 -1
  94. package/json/FeatureLayerJson.d.ts +20 -16
  95. package/json/FeatureLayerJson.js +1 -1
  96. package/json/FeatureSetJson.d.ts +5 -0
  97. package/json/FieldJson.d.ts +11 -7
  98. package/json/FormInfoJson.d.ts +48 -48
  99. package/json/GeoJSONLayerJson.d.ts +6 -6
  100. package/json/GeoRSSLayerJson.d.ts +4 -4
  101. package/json/GeometryJson.d.ts +12 -12
  102. package/json/GroundJson.d.ts +4 -4
  103. package/json/GroupLayerJson.d.ts +3 -3
  104. package/json/ImageServiceLayerJson.d.ts +20 -20
  105. package/json/ImageServiceVectorLayerJson.d.ts +6 -6
  106. package/json/IntegratedMeshLayerJson.d.ts +2 -2
  107. package/json/ItemJson.d.ts +51 -46
  108. package/json/KMLLayerJson.d.ts +3 -3
  109. package/json/LayerDefinitionJson.d.ts +102 -102
  110. package/json/LayerJson.d.ts +21 -21
  111. package/json/LayerJson.js +1 -1
  112. package/json/MapServiceLayerJson.d.ts +6 -6
  113. package/json/MosaicRuleJson.d.ts +14 -14
  114. package/json/OpenStreetMapLayerJson.d.ts +1 -1
  115. package/json/OperationalLayerJson.d.ts +2 -2
  116. package/json/PointCloudLayerJson.d.ts +4 -4
  117. package/json/PopupInfoJson.d.ts +47 -47
  118. package/json/RasterDataElevationLayerJson.d.ts +1 -1
  119. package/json/RendererJson.d.ts +113 -113
  120. package/json/SceneLayerJson.d.ts +7 -7
  121. package/json/SpatialReferenceJson.d.ts +5 -5
  122. package/json/SublayerJson.d.ts +17 -17
  123. package/json/SublayerJson.js +1 -1
  124. package/json/SubtypeGroupLayerJson.d.ts +14 -5
  125. package/json/SubtypeSublayerJson.d.ts +13 -8
  126. package/json/SymbolJson.d.ts +122 -122
  127. package/json/TableJson.d.ts +10 -10
  128. package/json/TableJson.js +1 -1
  129. package/json/TemplateJson.d.ts +4 -4
  130. package/json/TiledElevationServiceLayerJson.d.ts +3 -3
  131. package/json/TiledImageServiceLayerJson.d.ts +3 -3
  132. package/json/TiledMapServiceLayerJson.d.ts +12 -12
  133. package/json/TypeJson.d.ts +4 -4
  134. package/json/VectorTileLayerJson.d.ts +4 -4
  135. package/json/ViewpointJson.d.ts +6 -6
  136. package/json/WFSLayerJson.d.ts +16 -16
  137. package/json/WMSLayerJson.d.ts +16 -16
  138. package/json/WMSSublayerJson.d.ts +5 -5
  139. package/json/WebMapJson.d.ts +134 -133
  140. package/json/WebMapJson.js +1 -1
  141. package/json/WebSceneJson.d.ts +6 -6
  142. package/json/WebTileLayerJson.d.ts +26 -26
  143. package/mapping/ImageryLayerExtension.js +1 -1
  144. package/mapping/MapExtension.js +1 -1
  145. package/package.json +1 -1
  146. package/tasks/identify/WMSLayerFeatureInfoIdentifyProvider.js +1 -1
  147. package/tasks/identify/WMSSublayerIdentifyProvider.d.ts +3 -2
  148. package/tasks/identify/WMSSublayerIdentifyProvider.js +1 -1
  149. package/utilities/ObservableSet.d.ts +1 -1
  150. package/utilities/ObservableSet.js +1 -1
  151. package/utilities/ObservableWeakSet.d.ts +1 -1
  152. package/utilities/ObservableWeakSet.js +1 -1
  153. package/utilities/_gml.d.ts +1 -1
  154. package/utilities/_gml.js +1 -1
  155. package/utilities/_layers.d.ts +5 -3
  156. package/utilities/_layers.js +1 -1
  157. package/utilities/_wkt.js +1 -1
  158. package/utilities/array.js +1 -1
  159. package/utilities/asyncIterable.js +1 -1
  160. package/utilities/checkArg.js +1 -1
  161. package/utilities/esri.js +1 -1
  162. package/utilities/format/date.d.ts +8 -8
  163. package/utilities/format/date.js +1 -1
  164. package/utilities/format/number.d.ts +9 -9
  165. package/utilities/format/number.js +1 -1
  166. package/utilities/format/string.d.ts +12 -12
  167. package/utilities/format/string.js +1 -1
  168. package/utilities/geometry.d.ts +4 -3
  169. package/utilities/geometry.js +1 -1
  170. package/utilities/iterable.d.ts +2 -2
  171. package/utilities/log.d.ts +26 -7
  172. package/utilities/log.js +1 -1
  173. package/utilities/mapping.d.ts +1 -1
  174. package/utilities/mapping.js +1 -1
  175. package/utilities/object.d.ts +10 -6
  176. package/utilities/object.js +1 -1
  177. package/utilities/portal.d.ts +4 -1
  178. package/utilities/portal.js +1 -1
  179. package/utilities/query.js +1 -1
  180. package/utilities/set.d.ts +1 -1
  181. package/version.d.ts +1 -1
  182. package/version.js +1 -1
  183. package/docs/html/interfaces/utilities_log.LogOptions.html +0 -33
@@ -41,59 +41,59 @@ export interface LayerJsonBase {
41
41
  * Blend modes are used to blend layers together to create an interesting
42
42
  * effect in a layer, or even to produce what seems like a new layer.
43
43
  */
44
- blendMode?: "average" | "color-burn" | "color-dodge" | "color" | "darken" | "destination-atop" | "destination-in" | "destination-out" | "destination-over" | "difference" | "exclusion" | "hard-light" | "hue" | "invert" | "lighten" | "lighter" | "luminosity" | "minus" | "multiply" | "normal" | "overlay" | "plus" | "reflect" | "saturation" | "screen" | "soft-light" | "source-atop" | "source-in" | "source-out" | "vivid-light" | "xor";
44
+ blendMode?: "average" | "color-burn" | "color-dodge" | "color" | "darken" | "destination-atop" | "destination-in" | "destination-out" | "destination-over" | "difference" | "exclusion" | "hard-light" | "hue" | "invert" | "lighten" | "lighter" | "luminosity" | "minus" | "multiply" | "normal" | "overlay" | "plus" | "reflect" | "saturation" | "screen" | "soft-light" | "source-atop" | "source-in" | "source-out" | "vivid-light" | "xor" | null;
45
45
  /**
46
46
  * Effect provides various filter functions to achieve different visual
47
47
  * effects similar to how image filters (photo apps) work.
48
48
  */
49
- effect?: EffectJson;
49
+ effect?: EffectJson | null;
50
50
  /**
51
51
  * A unique identifying string for the layer.
52
52
  */
53
- id?: string;
53
+ id?: string | null;
54
54
  /**
55
55
  * Type of the layer.
56
56
  */
57
- layerType?: LayerJsonType;
57
+ layerType?: LayerJsonType | null;
58
58
  /**
59
59
  * A number representing the maximum scale at which the layer will be
60
60
  * visible. The number is the scale's denominator; thus, a value of 2400
61
61
  * represents a scale of 1/2,400. A value of 0 indicates that the layer will
62
62
  * be visible no matter how far you zoom in.
63
63
  */
64
- maxScale?: number;
64
+ maxScale?: number | null;
65
65
  /**
66
66
  * A number representing the minimum scale at which the layer will be
67
67
  * visible. The number is the scale's denominator; thus, a value of 2400
68
68
  * represents a scale of 1/2,400.
69
69
  */
70
- minScale?: number;
70
+ minScale?: number | null;
71
71
  /**
72
72
  * The degree of transparency applied to the layer on the client side, where
73
73
  * 0 is full transparency and 1 is no transparency.
74
74
  */
75
- opacity?: number;
75
+ opacity?: number | null;
76
76
  /**
77
77
  * Indicates whether to allow map authors the ability to control what layers
78
78
  * should be shown in a client's legend.
79
79
  */
80
- showLegend?: boolean;
80
+ showLegend?: boolean | null;
81
81
  /**
82
82
  * A user-friendly title for the layer that can be used in a table of
83
83
  * contents. If this is not included, then a title is derived from the
84
84
  * service.
85
85
  */
86
- title?: string;
86
+ title?: string | null;
87
87
  /**
88
88
  * (Deprecated, use layerType instead.) If the layer is referenced through a
89
89
  * URL, but is not an ArcGIS web service, then this parameter can be
90
90
  * supplied to denote the layer type.
91
91
  */
92
- type?: LegacyOperationalLayerJsonType | LegacyBasemapLayerJsonType;
92
+ type?: LegacyOperationalLayerJsonType | LegacyBasemapLayerJsonType | null;
93
93
  /**
94
94
  * Determines whether the layer is initially visible in the web map.
95
95
  */
96
- visibility?: boolean;
96
+ visibility?: boolean | null;
97
97
  }
98
98
  /**
99
99
  * Constants for the layerType property of service layers. This field and its
@@ -140,7 +140,7 @@ export interface HueRotateEffectFunctionJson {
140
140
  * input unchanged. A positive hue rotation increases the hue value, while a
141
141
  * negative one decreases the hue value.
142
142
  */
143
- angle?: number;
143
+ angle?: number | null;
144
144
  /**
145
145
  * Effect type.
146
146
  */
@@ -154,7 +154,7 @@ export interface BlurEffectFunctionJson {
154
154
  * The radius of the blur in points. It defines the value of the standard
155
155
  * deviation to the Gaussian function. Negative values are not allowed.
156
156
  */
157
- radius?: number;
157
+ radius?: number | null;
158
158
  /**
159
159
  * Effect type.
160
160
  */
@@ -168,21 +168,21 @@ export interface DropShadowEffectFunctionJson {
168
168
  * The radius of the blur in points. It defines the value of the standard
169
169
  * deviation to the Gaussian function.
170
170
  */
171
- blurRadius?: number;
171
+ blurRadius?: number | null;
172
172
  /**
173
173
  * Color is represented as a four-element array. The four elements represent
174
174
  * values for red, green, blue, and alpha in that order. Values range from 0
175
175
  * through 255.
176
176
  */
177
- color?: ColorJson;
177
+ color?: ColorJson | null;
178
178
  /**
179
179
  * The distance of the shadow on the x-axis in points.
180
180
  */
181
- xoffset?: number;
181
+ xoffset?: number | null;
182
182
  /**
183
183
  * The distance of the shadow on the y-axis in points.
184
184
  */
185
- yoffset?: number;
185
+ yoffset?: number | null;
186
186
  /**
187
187
  * Effect type.
188
188
  */
@@ -259,17 +259,17 @@ export interface BloomEffectFunctionJson {
259
259
  * Determines the radius of the blur. Negative values are not allowed.
260
260
  * Leaves the pixels inside the radius untouched.
261
261
  */
262
- radius?: number;
262
+ radius?: number | null;
263
263
  /**
264
264
  * The intensity of the bloom effect. The higher the value, the brighter the
265
265
  * glow. Negative values are not allowed.
266
266
  */
267
- strength?: number;
267
+ strength?: number | null;
268
268
  /**
269
269
  * The minimum color luminosity for a pixel to bloom, where at 0 all pixels
270
270
  * bloom and 1 only the pixels with 100% luminosity colors bloom.
271
271
  */
272
- threshold?: number;
272
+ threshold?: number | null;
273
273
  /**
274
274
  * Effect type.
275
275
  */
@@ -282,7 +282,7 @@ interface GenericEffectFunctionJson {
282
282
  * applies the effect at 100%. Brightness, contrast, and saturate can accept
283
283
  * amount above 1. Negative values are not allowed.
284
284
  */
285
- amount?: number;
285
+ amount?: number | null;
286
286
  /**
287
287
  * Effect type.
288
288
  */
package/json/LayerJson.js CHANGED
@@ -1 +1 @@
1
- import e from"@arcgis/core/core/Collection.js";import{isBingMapsLayer as r,isBuildingSceneLayer as t,isCSVLayer as i,isElevationLayer as a,isFeatureLayer as o,isGeoJSONLayer as n,isGeoRssLayer as s,isGraphicsLayer as y,isGroupLayer as l,isImageryLayer as p,isImageryTileLayer as f,isIntegratedMeshLayer as u,isKMLLayer as c,isMapImageLayer as d,isMapNotesLayer as m,isOpenStreetMapLayer as S,isPointCloudLayer as L,isRouteLayer as g,isSceneLayer as T,isStreamLayer as w,isSubtypeGroupLayer as b,isTiledImageServiceLayer as G,isTileLayer as I,isVectorTileLayer as J,isWebTileLayer as M,isWFSLayer as v,isWMSLayer as h,isWMTSLayer as j,layersAreEquivalent as A}from"../utilities/_layers.js";import{compareAsync as O,groupBy as C}from"../utilities/array.js";import{isBasemap as D,isGround as N,isMap as x,isWebMap as P,isWebScene as B}from"../utilities/mapping.js";import{graphicToJson as F}from"./FeatureJson.js";import{geometryTypeToJson as W}from"./GeometryJson.js";export async function jsonToLayer(e){if("WFS"===e.layerType){const r=new((await import("@arcgis/core/layers/WFSLayer.js")).default);return r.read(e,{origin:"web-map"}),r}if("WMS"===e.layerType){const r=new((await import("@arcgis/core/layers/WMSLayer.js")).default);return r.read(e,{origin:"web-map"}),r}return(await import("../portal/LayerBase.js")).LayerBase.toEsriApiLayer(e)}export async function applyJsonToLayer(e,r){if(!e||!Object.keys(e).some((e=>"$ref"!==e&&"layerType"!==e)))return;if(v(r)||h(r))return void r.read(e,{origin:"web-map"});const{applyToEsriApiLayer:t}=(await import("../portal/LayerBase.js")).LayerBase;if(l(r)){const{layers:i,...a}=e;await t(a,r),await applyJsonToLayers(i,r.layers)}else await t(e,r)}export async function applyJsonToLayers(e,r){await O(r,e,{onNew:async(e,t)=>{r.add(await jsonToLayer(e),t)},onMatch:async(e,t,i,a)=>{i!==a&&r.reorder(e,a),await applyJsonToLayer(t,e)},onMissing:e=>{r.remove(e)},equals:(e,r)=>A(e,r)})}export const layerToParentJsonCache={lookup:void 0};export function layerToJson(r){const t=e=>e?"GroupLayer"===e.layerType?[e,...e.layers?.flatMap(t)??[]]:[e]:[],{parent:i}=r;let a;const n=(e,r)=>{const{lookup:t}=layerToParentJsonCache;if(!t?.has(e)){const i=r();return t?.set(e,i),i}return t.get(e)};try{if(l(i)){const e=layerToJson(i);a=t(e)?.find((e=>e.id===r.id))}else if(P(i)||B(i)){const e=n(i,(()=>i.toJSON()));a=e.operationalLayers?.flatMap(t)?.find((e=>e.id===r.id))}else if(N(i)){const e=n(i,(()=>i.toJSON()));a=e.layers?.find((e=>e.id===r.id))}else if(D(i)){const e=n(i,(()=>i.toJSON()));a=e.baseMapLayers?.find((e=>e.id===r.id))}}catch{}if(!a){if(y(r))return function(e){const r={id:e.id,title:e.title,layerType:"ArcGISFeatureLayer",visibility:e.visible,opacity:e.opacity,listMode:e.listMode,featureCollection:{layers:[]}},t=C(e.graphics.toArray(),(e=>W(e.geometry.type))),i="graphic-id";for(const[a,o]of t.entries())r.featureCollection.layers.push({layerDefinition:{geometryType:a,name:k(a)},featureSet:{features:o.map((r=>({geometry:r.geometry.toJSON(),attributes:{...r.attributes,[i]:e.graphics.indexOf(r)},symbol:r.symbol?.toJSON(),popupInfo:r.popupTemplate?.toJSON()}))),geometryType:a}});return r}(r);if(o(r)&&e.isCollection(r.source))return function(e){const r=e.write({},{layerContainerType:"operational-layers",origin:"web-map"}),t={featureSet:{features:e.source.map(F).toArray(),geometryType:W(e.geometryType)}};return t.layerDefinition=r.layerDefinition??{},delete r.layerDefinition,t.layerDefinition.geometryType=W(e.geometryType),t.layerDefinition.objectIdField=e.objectIdField,t.layerDefinition.hasZ=!0,t.layerDefinition.elevationInfo=e.elevationInfo?.write(),t.popupInfo=r.popupInfo,delete r.popupInfo,t.layerDefinition.fields=e.fields.map((e=>e.toJSON())),t.layerDefinition.extent=e.fullExtent?.toJSON(),r.featureCollection={layers:[t],showLegend:e.legendEnabled},r}(r);a=r.write({},{layerContainerType:"operational-layers",origin:B(E(r))?"web-scene":"web-map"})}return a}function E(e){let{parent:r}=e;for(;r?.parent;)r=r.parent;return x(r)?r:void 0}function k(e){switch(e){case"esriGeometryPoint":return"Points";case"esriGeometryMultipoint":return"Multipoints";case"esriGeometryPolyline":return"Polylines";case"esriGeometryEnvelope":case"esriGeometryPolygon":return"Polygons";default:return"Unknown Geometry"}}export function getLayerJsonType(e){if(i(e))return"CSV";if(w(e))return"ArcGISStreamLayer";if(o(e)||y(e)||m(e)||g(e))return"ArcGISFeatureLayer";if(n(e))return"GeoJSON";if(s(e))return"GeoRSS";if(p(e))return"ArcGISImageServiceLayer";if(f(e))return"ArcGISTiledImageServiceLayer";if(c(e))return"KML";if(d(e))return"ArcGISMapServiceLayer";if(S(e))return"OpenStreetMap";if(M(e))return"WebTiledLayer";if(J(e))return"VectorTileLayer";if(G(e))return"ArcGISTiledImageServiceLayer";if(I(e))return"ArcGISTiledMapServiceLayer";if(a(e))return"ArcGISTiledElevationServiceLayer";if(T(e))return"ArcGISSceneServiceLayer";if(L(e))return"PointCloudLayer";if(u(e))return"IntegratedMeshLayer";if(l(e))return"GroupLayer";if(v(e))return"WFS";if(h(e))return"WMS";if(j(e))return"WebTiledLayer";if(t(e))return"BuildingSceneLayer";if(b(e))return"SubtypeGroupLayer";if(r(e))switch(e.style){case"aerial":return"BingMapsAerial";case"road":return"BingMapsRoad";case"hybrid":return"BingMapsHybrid"}}
1
+ import e from"@arcgis/core/core/Collection.js";import{isBingMapsLayer as r,isBuildingSceneLayer as t,isCSVLayer as i,isElevationLayer as a,isFeatureLayer as o,isGeoJSONLayer as n,isGeoRssLayer as s,isGraphicsLayer as y,isGroupLayer as l,isImageryLayer as p,isImageryTileLayer as f,isIntegratedMeshLayer as u,isKMLLayer as c,isMapImageLayer as d,isMapNotesLayer as m,isOpenStreetMapLayer as S,isPointCloudLayer as L,isRouteLayer as g,isSceneLayer as T,isStreamLayer as w,isSubtypeGroupLayer as b,isTiledImageServiceLayer as G,isTileLayer as I,isVectorTileLayer as J,isWebTileLayer as M,isWFSLayer as v,isWMSLayer as h,isWMTSLayer as j,layersAreEquivalent as A}from"../utilities/_layers.js";import{compareAsync as O,groupBy as C}from"../utilities/array.js";import{isBasemap as D,isGround as N,isMap as x,isWebMap as P,isWebScene as B}from"../utilities/mapping.js";import{graphicToJson as F}from"./FeatureJson.js";import{geometryTypeToJson as W}from"./GeometryJson.js";export async function jsonToLayer(e){if("WFS"===e.layerType){const r=new((await import("@arcgis/core/layers/WFSLayer.js")).default);return r.read(e,{origin:"web-map"}),r}if("WMS"===e.layerType){const r=new((await import("@arcgis/core/layers/WMSLayer.js")).default);return r.read(e,{origin:"web-map"}),r}return(await import("../portal/LayerBase.js")).LayerBase.toEsriApiLayer(e)}export async function applyJsonToLayer(e,r){if(!e||!Object.keys(e).some((e=>"$ref"!==e&&"layerType"!==e)))return;if(v(r)||h(r))return void r.read(e,{origin:"web-map"});const{applyToEsriApiLayer:t}=(await import("../portal/LayerBase.js")).LayerBase;if(l(r)){const{layers:i,...a}=e;await t(a,r),await applyJsonToLayers(i??[],r.layers)}else await t(e,r)}export async function applyJsonToLayers(e,r){await O(r,e,{onNew:async(e,t)=>{r.add(await jsonToLayer(e),t)},onMatch:async(e,t,i,a)=>{i!==a&&r.reorder(e,a),await applyJsonToLayer(t,e)},onMissing:e=>{r.remove(e)},equals:(e,r)=>A(e,r)})}export const layerToParentJsonCache={lookup:void 0};export function layerToJson(r){const t=e=>e?"GroupLayer"===e.layerType?[e,...e.layers?.flatMap(t)??[]]:[e]:[],{parent:i}=r;let a;const n=(e,r)=>{const{lookup:t}=layerToParentJsonCache;if(!t?.has(e)){const i=r();return t?.set(e,i),i}return t.get(e)};try{if(l(i)){const e=layerToJson(i);a=t(e)?.find((e=>e.id===r.id))}else if(P(i)||B(i)){const e=n(i,(()=>i.toJSON()));a=e.operationalLayers?.flatMap(t)?.find((e=>e.id===r.id))}else if(N(i)){const e=n(i,(()=>i.toJSON()));a=e.layers?.find((e=>e.id===r.id))}else if(D(i)){const e=n(i,(()=>i.toJSON()));a=e.baseMapLayers?.find((e=>e.id===r.id))}}catch{}if(!a){if(y(r))return function(e){const r={id:e.id,title:e.title,layerType:"ArcGISFeatureLayer",visibility:e.visible,opacity:e.opacity,listMode:e.listMode,featureCollection:{layers:[]}},t=C(e.graphics.toArray(),(e=>W(e.geometry.type))),i="graphic-id";for(const[a,o]of t.entries())r.featureCollection.layers.push({layerDefinition:{geometryType:a,name:k(a)},featureSet:{features:o.map((r=>({geometry:r.geometry.toJSON(),attributes:{...r.attributes,[i]:e.graphics.indexOf(r)},symbol:r.symbol?.toJSON(),popupInfo:r.popupTemplate?.toJSON()}))),geometryType:a}});return r}(r);if(o(r)&&e.isCollection(r.source))return function(e){const r=e.write({},{layerContainerType:"operational-layers",origin:"web-map"}),t={featureSet:{features:e.source.map(F).toArray(),geometryType:W(e.geometryType)}};return t.layerDefinition=r.layerDefinition??{},delete r.layerDefinition,t.layerDefinition.geometryType=W(e.geometryType),t.layerDefinition.objectIdField=e.objectIdField,t.layerDefinition.hasZ=!0,t.layerDefinition.elevationInfo=e.elevationInfo?.write(),t.popupInfo=r.popupInfo,delete r.popupInfo,t.layerDefinition.fields=e.fields.map((e=>e.toJSON())),t.layerDefinition.extent=e.fullExtent?.toJSON(),r.featureCollection={layers:[t],showLegend:e.legendEnabled},r}(r);a=r.write({},{layerContainerType:"operational-layers",origin:B(E(r))?"web-scene":"web-map"})}return a}function E(e){let{parent:r}=e;for(;r?.parent;)r=r.parent;return x(r)?r:void 0}function k(e){switch(e){case"esriGeometryPoint":return"Points";case"esriGeometryMultipoint":return"Multipoints";case"esriGeometryPolyline":return"Polylines";case"esriGeometryEnvelope":case"esriGeometryPolygon":return"Polygons";default:return"Unknown Geometry"}}export function getLayerJsonType(e){if(i(e))return"CSV";if(w(e))return"ArcGISStreamLayer";if(o(e)||y(e)||m(e)||g(e))return"ArcGISFeatureLayer";if(n(e))return"GeoJSON";if(s(e))return"GeoRSS";if(p(e))return"ArcGISImageServiceLayer";if(f(e))return"ArcGISTiledImageServiceLayer";if(c(e))return"KML";if(d(e))return"ArcGISMapServiceLayer";if(S(e))return"OpenStreetMap";if(M(e))return"WebTiledLayer";if(J(e))return"VectorTileLayer";if(G(e))return"ArcGISTiledImageServiceLayer";if(I(e))return"ArcGISTiledMapServiceLayer";if(a(e))return"ArcGISTiledElevationServiceLayer";if(T(e))return"ArcGISSceneServiceLayer";if(L(e))return"PointCloudLayer";if(u(e))return"IntegratedMeshLayer";if(l(e))return"GroupLayer";if(v(e))return"WFS";if(h(e))return"WMS";if(j(e))return"WebTiledLayer";if(t(e))return"BuildingSceneLayer";if(b(e))return"SubtypeGroupLayer";if(r(e))switch(e.style){case"aerial":return"BingMapsAerial";case"road":return"BingMapsRoad";case"hybrid":return"BingMapsHybrid"}}
@@ -16,7 +16,7 @@ export interface MapServiceLayerJson extends OperationalLayerJsonBase, BasemapLa
16
16
  * A sequence of custom parameters appended to the URL of all requests
17
17
  * related to supporting ArcGIS layer types.
18
18
  */
19
- customParameters?: Record<string, unknown>;
19
+ customParameters?: Record<string, unknown> | null;
20
20
  /**
21
21
  * Type of the layer.
22
22
  */
@@ -25,26 +25,26 @@ export interface MapServiceLayerJson extends OperationalLayerJsonBase, BasemapLa
25
25
  * Optional string containing the item ID of the service if it's registered
26
26
  * on ArcGIS Online or your organization's portal.
27
27
  */
28
- itemId?: string;
28
+ itemId?: string | null;
29
29
  /**
30
30
  * An array of layer objects defining the styling, geometry, and attribute
31
31
  * information for the features.
32
32
  */
33
- layers?: SublayerJson[];
33
+ layers?: SublayerJson[] | null;
34
34
  /**
35
35
  * This property is applicable to layers that support time. If 'true',
36
36
  * timeAnimation is enabled.
37
37
  */
38
- timeAnimation?: boolean;
38
+ timeAnimation?: boolean | null;
39
39
  /**
40
40
  * The URL to the layer.
41
41
  */
42
- url?: string;
42
+ url?: string | null;
43
43
  /**
44
44
  * An array of layers that should appear visible. Used with ArcGIS map
45
45
  * services that are not tiled in addition to WMS layers. Array of items of
46
46
  * the following types: Number With ArcGIS map services, the array contains
47
47
  * integers of the index positions of each visible layer.
48
48
  */
49
- visibleLayers?: number[];
49
+ visibleLayers?: number[] | null;
50
50
  }
@@ -13,31 +13,31 @@ export interface MosaicRuleJson {
13
13
  /**
14
14
  * Indicates whether the sort should be ascending.
15
15
  */
16
- ascending?: boolean;
16
+ ascending?: boolean | null;
17
17
  /**
18
18
  * A list that defines a subset of rasters used in the mosaic, be aware that
19
19
  * the rasters may not be visible at all scales.
20
20
  */
21
- fids?: number[];
21
+ fids?: number[] | null;
22
22
  /**
23
23
  * The rendering rule applies on items before mosaicing.
24
24
  */
25
- itemRenderingRule?: string;
25
+ itemRenderingRule?: string | null;
26
26
  /**
27
27
  * Lock a few rasters in the image service. Used together with
28
28
  * esriMosaicLockRaster.
29
29
  */
30
- lockRasterIds?: number[];
30
+ lockRasterIds?: number[] | null;
31
31
  /**
32
32
  * The mosaic method determines how the selected rasters are ordered.
33
33
  */
34
- mosaicMethod?: "esriMosaicNone" | "esriMosaicCenter" | "esriMosaicNadir" | "esriMosaicViewPoint" | "esriMosaicAttribute" | "esriMosaicLockRaster" | "esriMosaicNorthwest" | "esriMosaicSeamline";
34
+ mosaicMethod?: "esriMosaicNone" | "esriMosaicCenter" | "esriMosaicNadir" | "esriMosaicViewPoint" | "esriMosaicAttribute" | "esriMosaicLockRaster" | "esriMosaicNorthwest" | "esriMosaicSeamline" | null;
35
35
  /**
36
36
  * Use the mosaic operation to resolve overlap pixel values: from first or
37
37
  * last raster, use the min, max or mean of the pixel values, or blend
38
38
  * them.
39
39
  */
40
- mosaicOperation?: "MT_FIRST" | "MT_LAST" | "MT_MIN" | "MT_MAX" | "MT_MEAN" | "MT_BLEND" | "MT_SUM";
40
+ mosaicOperation?: "MT_FIRST" | "MT_LAST" | "MT_MIN" | "MT_MAX" | "MT_MEAN" | "MT_BLEND" | "MT_SUM" | null;
41
41
  /**
42
42
  * Definition of multidimensional variables.
43
43
  *
@@ -50,24 +50,24 @@ export interface MosaicRuleJson {
50
50
  /**
51
51
  * Type of dimension being used (ex. StdTime).
52
52
  */
53
- dimensionName?: string;
53
+ dimensionName?: string | null;
54
54
  /**
55
55
  * Is slice?
56
56
  */
57
- isSlice?: boolean;
57
+ isSlice?: boolean | null;
58
58
  /**
59
59
  * Numerical array of associated values.
60
60
  */
61
- values?: number[];
61
+ values?: number[] | null;
62
62
  /**
63
63
  * Name of the variable.
64
64
  */
65
- variableName?: string;
66
- }[];
65
+ variableName?: string | null;
66
+ }[] | null;
67
67
  /**
68
68
  * The field name used together with esriMosaicAttribute method.
69
69
  */
70
- sortField?: string;
70
+ sortField?: string | null;
71
71
  /**
72
72
  * The base sort value used together with esriMosaicAttribute method and
73
73
  * sortField parameter.
@@ -76,10 +76,10 @@ export interface MosaicRuleJson {
76
76
  /**
77
77
  * Use a view point along with esriMosaicViewpoint.
78
78
  */
79
- viewpoint?: PointJson;
79
+ viewpoint?: PointJson | null;
80
80
  /**
81
81
  * Use a where clause to define a subset of rasters used in the mosaic, be
82
82
  * aware that the rasters may not be visible at all scales.
83
83
  */
84
- where?: string;
84
+ where?: string | null;
85
85
  }
@@ -16,5 +16,5 @@ export interface OpenStreetMapLayerJson extends BasemapLayerJsonBase {
16
16
  * Optional string containing the item ID of the service if it's registered
17
17
  * on ArcGIS Online or your organization's portal.
18
18
  */
19
- itemId?: string;
19
+ itemId?: string | null;
20
20
  }
@@ -33,7 +33,7 @@ export interface OperationalLayerJsonBase extends LayerJsonBase {
33
33
  * Indicates how the layer should display in the table of contents. The
34
34
  * known values are listed below. See {@link support/esri!ListMode}.
35
35
  */
36
- listMode?: ListMode;
36
+ listMode?: ListMode | null;
37
37
  /**
38
38
  * When the refresh interval is set on a layer, the client must refresh that
39
39
  * layer only, not the entire web map. The default value is '0', meaning the
@@ -45,7 +45,7 @@ export interface OperationalLayerJsonBase extends LayerJsonBase {
45
45
  * Content page. See
46
46
  * {@link https://doc.arcgis.com/en/arcgis-online/create-maps/set-refresh-interval.htm}.
47
47
  */
48
- refreshInterval?: number;
48
+ refreshInterval?: number | null;
49
49
  }
50
50
  /**
51
51
  * An operational layer in a web map/scene.
@@ -16,12 +16,12 @@ export interface PointCloudLayerJson extends OperationalLayerJsonBase {
16
16
  * Indicates whether to allow a client to ignore popups defined by the
17
17
  * service item.
18
18
  */
19
- disablePopup?: boolean;
19
+ disablePopup?: boolean | null;
20
20
  /**
21
21
  * A layerDefinition object defining the attribute schema and drawing
22
22
  * information for the layer.
23
23
  */
24
- layerDefinition?: LayerDefinitionJson;
24
+ layerDefinition?: LayerDefinitionJson | null;
25
25
  /**
26
26
  * The type of layer.
27
27
  */
@@ -30,9 +30,9 @@ export interface PointCloudLayerJson extends OperationalLayerJsonBase {
30
30
  * A PopupInfo object defining the content of pop-up windows when you click
31
31
  * or query a feature.
32
32
  */
33
- popupInfo?: PopupInfoJson;
33
+ popupInfo?: PopupInfoJson | null;
34
34
  /**
35
35
  * URL to the ArcGIS Server Image Service.
36
36
  */
37
- url?: string;
37
+ url?: string | null;
38
38
  }
@@ -12,43 +12,43 @@ export interface PopupInfoJson {
12
12
  * A string that appears in the body of the pop-up window as a description.
13
13
  * This can contain a field name enclosed in `{}`, such as `{DETAILS}`.
14
14
  */
15
- description?: string;
15
+ description?: string | null;
16
16
  /**
17
17
  * List of Arcade expressions added to the pop-up.
18
18
  */
19
- expressionInfos?: PopupExpressionInfoJson[];
19
+ expressionInfos?: PopupExpressionInfoJson[] | null;
20
20
  /**
21
21
  * An array of {@link FieldInfoJson} objects defining how each field in the
22
22
  * dataset participates (or does not participate) in the pop-up window. The
23
23
  * order of the array is the order that fields are shown in the pop-up
24
24
  * window.
25
25
  */
26
- fieldInfos?: FieldInfoJson[];
26
+ fieldInfos?: FieldInfoJson[] | null;
27
27
  /**
28
28
  * Array of various mediaInfo to display. Can be of type image, piechart,
29
29
  * barchart, columnchart, or linechart. The order given is the order in
30
30
  * which is displays.
31
31
  */
32
- mediaInfos?: MediaInfoJson[];
32
+ mediaInfos?: MediaInfoJson[] | null;
33
33
  /**
34
34
  * An array of popupElement objects that represent an ordered list of popup
35
35
  * elements.
36
36
  */
37
- popupElements?: PopupElementJson[];
37
+ popupElements?: PopupElementJson[] | null;
38
38
  /**
39
39
  * Indicates whether to enable related records if they exist on a layer.
40
40
  */
41
- relatedRecordsInfo?: RelatedRecordsInfoJson;
41
+ relatedRecordsInfo?: RelatedRecordsInfoJson | null;
42
42
  /**
43
43
  * Determines whether attachments will be loaded for feature layers that
44
44
  * have attachments.
45
45
  */
46
- showAttachments?: boolean;
46
+ showAttachments?: boolean | null;
47
47
  /**
48
48
  * Appears at the top of the pop-up window as a title. This can contain a
49
49
  * field name enclosed in `{}`, such as `{NAME}`.
50
50
  */
51
- title?: string;
51
+ title?: string | null;
52
52
  }
53
53
  /**
54
54
  * Popup elements allow users to author popups, using multiple elements such as
@@ -74,29 +74,29 @@ export interface PopupElementJson {
74
74
  * arcade expression itself. This property allows passing arcade derived
75
75
  * attribute values into fields or media elements.
76
76
  */
77
- attributes?: Record<string, unknown>;
77
+ attributes?: Record<string, unknown> | null;
78
78
  /**
79
79
  * An optional string value describing the element in detail. This property
80
80
  * does not apply when the type is text or expression.
81
81
  */
82
- description?: string;
82
+ description?: string | null;
83
83
  /**
84
84
  * This property applies to elements of type relationship. An integer that
85
85
  * indicates the maximum number of records to display.
86
86
  */
87
- displayCount?: number;
87
+ displayCount?: number | null;
88
88
  /**
89
89
  * This property applies to elements of type attachments and relationship. A
90
90
  * string value indicating how to display the attachment. Possible values
91
91
  * are, 'preview', and 'list' for attachments types, and 'list' for
92
92
  * relationship types. If list is specified, attachments show as links.
93
93
  */
94
- displayType?: string;
94
+ displayType?: string | null;
95
95
  /**
96
96
  * This property applies to elements of type expression. An Arcade
97
97
  * expression that defines the pop-up element content.
98
98
  */
99
- expressionInfo?: PopupExpressionInfoJson;
99
+ expressionInfo?: PopupExpressionInfoJson | null;
100
100
  /**
101
101
  * This property applies to elements of type fields. It is an array of
102
102
  * popupInfo.fieldInfo objects representing a field/value pair displayed as
@@ -104,42 +104,42 @@ export interface PopupElementJson {
104
104
  * provided, the popupElement will display whatever is specified directly in
105
105
  * the popupInfo.fieldInfos property.
106
106
  */
107
- fieldInfos?: FieldInfoJson[];
107
+ fieldInfos?: FieldInfoJson[] | null;
108
108
  /**
109
109
  * This property applies to elements of type media. An array of
110
110
  * popupInfo.mediaInfo objects representing an image or chart for display.
111
111
  * If no mediaInfos property is provided, the popupElement will display
112
112
  * whatever is specified in the popupInfo.mediaInfo property.
113
113
  */
114
- mediaInfos?: MediaInfoJson[];
114
+ mediaInfos?: MediaInfoJson[] | null;
115
115
  /**
116
116
  * This property applies to elements of type relationship. Array of
117
117
  * orderByFields objects indicating the field display order for the related
118
118
  * records and whether they should be sorted in ascending 'asc' or
119
119
  * descending 'desc' order.
120
120
  */
121
- orderByFields?: OrderByFieldsJson[];
121
+ orderByFields?: OrderByFieldsJson[] | null;
122
122
  /**
123
123
  * This property applies to elements of type relationship. The id of the
124
124
  * relationship as defined in the feature layer definition.
125
125
  */
126
- relationshipId?: number;
126
+ relationshipId?: number | null;
127
127
  /**
128
128
  * This property applies to elements of type text. This is string value
129
129
  * indicating the text to be displayed within the popupElement. If no text
130
130
  * property is provided, the popupElement will display whatever is specified
131
131
  * in the popupInfo.description property.
132
132
  */
133
- text?: string;
133
+ text?: string | null;
134
134
  /**
135
135
  * An optional string value indicating what the element represents. This
136
136
  * property does not apply when the type is text or expression.
137
137
  */
138
- title?: string;
138
+ title?: string | null;
139
139
  /**
140
140
  * String value indicating which element to use.
141
141
  */
142
- type?: "attachments" | "fields" | "media" | "text" | "expression" | "relationship";
142
+ type?: "attachments" | "fields" | "media" | "text" | "expression" | "relationship" | null;
143
143
  }
144
144
  /**
145
145
  * Converts a popup element JSON object to its appropriate ArcGIS API type.
@@ -161,7 +161,7 @@ export interface RelatedRecordsInfoJson {
161
161
  * related records and whether they should be sorted in ascending 'asc' or
162
162
  * descending 'desc' order.
163
163
  */
164
- orderByFields?: OrderByFieldsJson[];
164
+ orderByFields?: OrderByFieldsJson[] | null;
165
165
  /**
166
166
  * Required boolean value indicating whether to display related records. If
167
167
  * true, client should const the user navigate to the related records.
@@ -184,12 +184,12 @@ export interface OrderByFieldsJson {
184
184
  * The attribute value of the field selected that will drive the sorting of
185
185
  * related records.
186
186
  */
187
- field?: string;
187
+ field?: string | null;
188
188
  /**
189
189
  * Set the ascending (asc) or descending (desc) sort order of the returned
190
190
  * related records.
191
191
  */
192
- order?: string;
192
+ order?: string | null;
193
193
  }
194
194
  /**
195
195
  * Defines how a field in the dataset participates (or does not participate) in
@@ -208,30 +208,30 @@ export interface FieldInfoJson {
208
208
  * A format object used with numerical or date fields to provide more detail
209
209
  * about how the value should be displayed in a web map pop-up window.
210
210
  */
211
- format?: FormatJson;
211
+ format?: FormatJson | null;
212
212
  /**
213
213
  * Determines whether users can edit this field.
214
214
  */
215
- isEditable?: boolean;
215
+ isEditable?: boolean | null;
216
216
  /**
217
217
  * The field alias. This can be overridden by the web map author.
218
218
  */
219
- label?: string;
219
+ label?: string | null;
220
220
  /**
221
221
  * The type of input box editors will see when editing the field. Applies
222
222
  * only to string fields.
223
223
  */
224
- stringFieldOption?: "textbox" | "textarea" | "richtext";
224
+ stringFieldOption?: "textbox" | "textarea" | "richtext" | null;
225
225
  /**
226
226
  * Provides an editing hint for editors of the field. This string could
227
227
  * provide a short description of the field and how editors should format or
228
228
  * supply its value.
229
229
  */
230
- tooltip?: string;
230
+ tooltip?: string | null;
231
231
  /**
232
232
  * Determines whether the field is visible in the pop-up window.
233
233
  */
234
- visible?: boolean;
234
+ visible?: boolean | null;
235
235
  }
236
236
  /**
237
237
  * The format object can be used with numerical or date fields to provide more
@@ -246,20 +246,20 @@ export interface FormatJson {
246
246
  * A string used with date fields to specify how the date should appear in
247
247
  * pop-up windows.
248
248
  */
249
- dateFormat?: DateFormatJsonType;
249
+ dateFormat?: DateFormatJsonType | null;
250
250
  /**
251
251
  * A Boolean used with numerical fields. A value of true allows the number
252
252
  * to have a digit (or thousands) separator when the value appears in pop-up
253
253
  * windows. Depending on the locale, this separator is a decimal point or a
254
254
  * comma. A value of false means that no separator will be used.
255
255
  */
256
- digitSeparator?: boolean;
256
+ digitSeparator?: boolean | null;
257
257
  /**
258
258
  * An integer used with numerical fields to specify the number of supported
259
259
  * decimal places that should appear in pop-up windows. Any places beyond
260
260
  * this value are rounded.
261
261
  */
262
- places?: number;
262
+ places?: number | null;
263
263
  }
264
264
  /**
265
265
  * Possible date formats for {@link FormatJson.dateFormat}.
@@ -278,12 +278,12 @@ export interface MediaInfoJson {
278
278
  /**
279
279
  * A string providing the alternate text for the media.
280
280
  */
281
- altText?: string;
281
+ altText?: string | null;
282
282
  /**
283
283
  * A caption describing the media. This can contain a field name enclosed in
284
284
  * `{}`, such as `{IMAGE_CAPTION}`.
285
285
  */
286
- caption?: string;
286
+ caption?: string | null;
287
287
  /**
288
288
  * Refresh interval of the layer in minutes. Non-zero value indicates
289
289
  * automatic layer refresh at the specified interval. Value of 0 indicates
@@ -291,21 +291,21 @@ export interface MediaInfoJson {
291
291
  * equivalent to having a value of 0. Only applicable when type is set to
292
292
  * image.
293
293
  */
294
- refreshInterval?: number;
294
+ refreshInterval?: number | null;
295
295
  /**
296
296
  * A title for the media. This can contain a field name enclosed in `{}`,
297
297
  * such as `{IMAGE_TITLE}`.
298
298
  */
299
- title?: string;
299
+ title?: string | null;
300
300
  /**
301
301
  * Defines the type of media. One of the {@link MediaJsonType} constants.
302
302
  */
303
- type?: string;
303
+ type?: string | null;
304
304
  /**
305
305
  * Contains information about how the image should be retrieved or how the
306
306
  * chart should be constructed.
307
307
  */
308
- value?: ValueJson;
308
+ value?: ValueJson | null;
309
309
  }
310
310
  /**
311
311
  * The value object contains information for pop-up windows about how images
@@ -318,29 +318,29 @@ export interface ValueJson {
318
318
  /**
319
319
  * Used with charts. An array of field names to display in the chart.
320
320
  */
321
- fields?: string[];
321
+ fields?: string[] | null;
322
322
  /**
323
323
  * Used with images. A string containing a URL to be launched in a browser
324
324
  * when a user clicks the image.
325
325
  */
326
- linkURL?: string;
326
+ linkURL?: string | null;
327
327
  /**
328
328
  * Used with charts. An optional string containing the name of a field. The
329
329
  * values of all fields in the chart will be normalized (divided) by the
330
330
  * value of this field.
331
331
  */
332
- normalizeField?: string;
332
+ normalizeField?: string | null;
333
333
  /**
334
334
  * Used with images. The URL to the image.
335
335
  */
336
- sourceURL?: string;
336
+ sourceURL?: string | null;
337
337
  /**
338
338
  * String value indicating the tooltip for a chart specified from another
339
339
  * field. This field is needed when related records are not sued. It is used
340
340
  * for showing tooltips from another field in the same layer or related
341
341
  * layer/table.
342
342
  */
343
- tooltipField?: string;
343
+ tooltipField?: string | null;
344
344
  }
345
345
  /**
346
346
  * Arcade expression added to the pop-up.
@@ -352,11 +352,11 @@ export interface PopupExpressionInfoJson {
352
352
  /**
353
353
  * The Arcade expression.
354
354
  */
355
- expression?: string;
355
+ expression?: string | null;
356
356
  /**
357
357
  * Unique identifier for the expression.
358
358
  */
359
- name?: string;
359
+ name?: string | null;
360
360
  /**
361
361
  * Return type of the Arcade expression, can be number or string. Defaults
362
362
  * to string value. Number values are assumed to be double. This can be
@@ -366,9 +366,9 @@ export interface PopupExpressionInfoJson {
366
366
  * contexts. For example, numeric fields in numeric contexts such as
367
367
  * charts.
368
368
  */
369
- returnType?: "string" | "number";
369
+ returnType?: "string" | "number" | null;
370
370
  /**
371
371
  * Title of the expression.
372
372
  */
373
- title?: string;
373
+ title?: string | null;
374
374
  }