@vertigis/arcgis-extensions 38.0.5 → 38.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.
Files changed (748) hide show
  1. package/AccessDeniedError.js +1 -1
  2. package/AppConfig.schema.json +35 -39
  3. package/ArgumentMissingError.js +1 -1
  4. package/ArgumentOutOfRangeError.js +1 -1
  5. package/Entity.js +1 -1
  6. package/FailureMode.d.ts +1 -1
  7. package/Hyperlink.js +1 -1
  8. package/LanguageResources.d.ts +1 -3
  9. package/LanguageResources.js +1 -1
  10. package/NotFoundError.js +1 -1
  11. package/PortalUri.js +1 -1
  12. package/data/ArcGISServiceTableExtension.js +1 -1
  13. package/data/Attachment.js +1 -1
  14. package/data/Feature.js +1 -1
  15. package/data/FeatureList.d.ts +3 -3
  16. package/data/FeatureList.js +1 -1
  17. package/data/FeatureSaveError.js +1 -1
  18. package/data/FeatureSet.js +1 -1
  19. package/data/FeatureSettings.js +1 -1
  20. package/data/FeatureSourceBase.js +1 -1
  21. package/data/FeatureStream.js +1 -1
  22. package/data/FieldExtension.js +1 -1
  23. package/data/PopupContentExtension.js +1 -1
  24. package/data/Relationship.js +1 -1
  25. package/data/RelationshipBase.js +1 -1
  26. package/data/Schema.js +1 -1
  27. package/data/Table.js +1 -1
  28. package/data/TableExtension.js +1 -1
  29. package/data/TaskSettings.js +1 -1
  30. package/data/_Relationship.d.ts +3 -3
  31. package/data/_Relationship.js +1 -1
  32. package/data/_TableExtension.js +1 -1
  33. package/data/convert.js +1 -1
  34. package/data/support/DefaultRelationshipFactory.js +1 -1
  35. package/data/support/DefaultTableExtensionFactory.js +1 -1
  36. package/data/support/attachments.js +1 -1
  37. package/docs/html/assets/main.js +56 -52
  38. package/docs/html/assets/search.js +1 -1
  39. package/docs/html/assets/style.css +23 -0
  40. package/docs/html/classes/data_FeatureSet.FeatureSet.html +2 -2
  41. package/docs/html/classes/data_FeatureStream.FeatureStream.html +1 -1
  42. package/docs/html/classes/utilities_ObservableMap.ObservableMap.html +2 -2
  43. package/docs/html/classes/utilities_ObservableSet.ObservableSet.html +2 -2
  44. package/docs/html/classes/utilities_ObservableWeakSet.ObservableWeakSet.html +1 -1
  45. package/docs/html/classes/utilities_asyncIterable.AsyncQueue.html +1 -1
  46. package/docs/html/classes/utilities_date.DateFormatter.html +1 -1
  47. package/docs/html/classes/utilities_string.StringFormatter.html +6 -24
  48. package/docs/html/functions/utilities_string.format.html +2 -18
  49. package/docs/html/interfaces/LanguageResources.LanguageResourcesProperties.html +2 -7
  50. package/docs/html/interfaces/data_support_attachments.AttachmentEnabledLayer.html +4 -6
  51. package/docs/html/interfaces/mapping_BuildingSceneLayerExtension.BuildingSceneLayerProperties.html +1 -1
  52. package/docs/html/interfaces/mapping_FeatureLayerExtension.FeatureLayerProperties.html +1 -1
  53. package/docs/html/interfaces/mapping_FeatureLayerExtensionBase.FeatureLayerBaseProperties.html +1 -1
  54. package/docs/html/interfaces/mapping_PointCloudLayerExtension.PointCloudLayerProperties.html +1 -1
  55. package/docs/html/interfaces/portal_ApplicationProperties.ApplicationProperties.html +15 -12
  56. package/docs/html/interfaces/portal_Background.ColorBackground.html +3 -2
  57. package/docs/html/interfaces/portal_BaseMap.BaseMap-1.html +2 -1
  58. package/docs/html/interfaces/portal_BaseMapLayer.BaseMapLayerBase.html +2 -1
  59. package/docs/html/interfaces/portal_BingLayer.BingLayer.html +2 -1
  60. package/docs/html/interfaces/portal_Bookmark.Bookmark.html +2 -1
  61. package/docs/html/interfaces/portal_BuildingSceneLayer.BuildingSceneLayer-1.html +1 -1
  62. package/docs/html/interfaces/portal_CIMSymbol.CIMSymbol.html +2 -1
  63. package/docs/html/interfaces/portal_CSVLayer.CSVLayer-1.html +3 -2
  64. package/docs/html/interfaces/portal_Camera.Camera-1.html +2 -1
  65. package/docs/html/interfaces/portal_ClassBreaksRenderer.ClassBreakInfo.html +2 -1
  66. package/docs/html/interfaces/portal_ClassBreaksRenderer.ClassBreaksRenderer.html +2 -1
  67. package/docs/html/interfaces/portal_CodedValueDomain.CodedValue.html +1 -1
  68. package/docs/html/interfaces/portal_CodedValueDomain.CodedValueDomain-1.html +1 -1
  69. package/docs/html/interfaces/portal_ColorClassBreakInfo.ColorClassBreakInfo.html +2 -1
  70. package/docs/html/interfaces/portal_ColorUniqueValueInfos.ColorUniqueValueInfos.html +2 -1
  71. package/docs/html/interfaces/portal_DataSource.DataSourceBase.html +2 -2
  72. package/docs/html/interfaces/portal_DefinitionEditor.DefinitionEditor.html +2 -1
  73. package/docs/html/interfaces/portal_DefinitionEditor.Input.html +1 -1
  74. package/docs/html/interfaces/portal_DefinitionEditor.Parameter.html +1 -1
  75. package/docs/html/interfaces/portal_DrawingInfo.DrawingInfo-1.html +2 -1
  76. package/docs/html/interfaces/portal_DynamicDataLayer.DynamicDataLayer.html +2 -2
  77. package/docs/html/interfaces/portal_DynamicMapLayer.DynamicMapLayer.html +1 -1
  78. package/docs/html/interfaces/portal_ElevationInfo.ElevationInfo-1.html +1 -1
  79. package/docs/html/interfaces/portal_ElevationLayer.ElevationLayer-1.html +3 -2
  80. package/docs/html/interfaces/portal_Environment.Environment-1.html +2 -1
  81. package/docs/html/interfaces/portal_Extent.Extent.html +1 -1
  82. package/docs/html/interfaces/portal_ExtrudeSymbol3DLayer.ExtrudeSymbol3DLayer.html +2 -1
  83. package/docs/html/interfaces/portal_Feature.Feature-1.html +2 -1
  84. package/docs/html/interfaces/portal_FeatureCollection.FeatureCollection.html +2 -1
  85. package/docs/html/interfaces/portal_FeatureLayer.FeatureLayer-1.html +3 -2
  86. package/docs/html/interfaces/portal_FeatureSet.FeatureSet.html +2 -1
  87. package/docs/html/interfaces/portal_Field.Field-1.html +1 -1
  88. package/docs/html/interfaces/portal_FieldInfo.FieldInfo.html +2 -1
  89. package/docs/html/interfaces/portal_FillSymbol3DLayer.FillSymbol3DLayer.html +2 -1
  90. package/docs/html/interfaces/portal_FormInfo.FormAttachmentElement.html +1 -1
  91. package/docs/html/interfaces/portal_FormInfo.FormBarcodeScannerInput.html +1 -1
  92. package/docs/html/interfaces/portal_FormInfo.FormComboBoxInput.html +1 -1
  93. package/docs/html/interfaces/portal_FormInfo.FormDateTimePickerInput.html +1 -1
  94. package/docs/html/interfaces/portal_FormInfo.FormExpressionInfo.html +1 -1
  95. package/docs/html/interfaces/portal_FormInfo.FormFieldElement.html +1 -1
  96. package/docs/html/interfaces/portal_FormInfo.FormGroupElement.html +1 -1
  97. package/docs/html/interfaces/portal_FormInfo.FormInfo-1.html +1 -1
  98. package/docs/html/interfaces/portal_FormInfo.FormRadioButtonsInput.html +1 -1
  99. package/docs/html/interfaces/portal_FormInfo.FormRelationshipElement.html +1 -1
  100. package/docs/html/interfaces/portal_FormInfo.FormSwitchInput.html +1 -1
  101. package/docs/html/interfaces/portal_FormInfo.FormTextAreaInput.html +1 -1
  102. package/docs/html/interfaces/portal_FormInfo.FormTextBoxInput.html +1 -1
  103. package/docs/html/interfaces/portal_Format.Format.html +2 -1
  104. package/docs/html/interfaces/portal_GeoRSSLayer.GeoRSSLayer-1.html +3 -2
  105. package/docs/html/interfaces/portal_GroupLayer.GroupLayer-1.html +3 -2
  106. package/docs/html/interfaces/portal_HeatmapRenderer.ColorStop.html +2 -1
  107. package/docs/html/interfaces/portal_HeatmapRenderer.HeatmapRenderer.html +2 -1
  108. package/docs/html/interfaces/portal_IconSymbol3DLayer.IconSymbol3DLayer.html +2 -1
  109. package/docs/html/interfaces/portal_ImageServiceLayer.ImageServiceLayer-1.html +3 -2
  110. package/docs/html/interfaces/portal_ImageServiceVectorLayer.ImageServiceVectorLayer.html +3 -2
  111. package/docs/html/interfaces/portal_InheritedDomain.InheritedDomain-1.html +1 -1
  112. package/docs/html/interfaces/portal_InitialState.InitialState-1.html +2 -1
  113. package/docs/html/interfaces/portal_IntegratedMeshLayer.IntegratedMeshLayer-1.html +3 -2
  114. package/docs/html/interfaces/portal_Item.Item-1.html +3 -2
  115. package/docs/html/interfaces/portal_JoinTableDataSource.JoinTableDataSource.html +2 -2
  116. package/docs/html/interfaces/portal_KMLLayer.KMLLayer-1.html +3 -2
  117. package/docs/html/interfaces/portal_LabelSymbol3D.LabelSymbol3D.html +2 -1
  118. package/docs/html/interfaces/portal_LabelingInfo.LabelingInfo-1.html +3 -2
  119. package/docs/html/interfaces/portal_Layer.Layer-1.html +1 -1
  120. package/docs/html/interfaces/portal_LayerDefinition.FieldOverride.html +1 -1
  121. package/docs/html/interfaces/portal_LayerDefinition.LayerDefinition-1.html +4 -3
  122. package/docs/html/interfaces/portal_LayerDefinition.LayerTimeInfo.html +2 -2
  123. package/docs/html/interfaces/portal_Lighting.SunLighting.html +2 -1
  124. package/docs/html/interfaces/portal_Lighting.VirtualLighting.html +2 -1
  125. package/docs/html/interfaces/portal_LineSymbol3D.LineSymbol3D.html +2 -1
  126. package/docs/html/interfaces/portal_LineSymbol3DLayer.LineSymbol3DLayer.html +2 -1
  127. package/docs/html/interfaces/portal_LocationInfo.LocationInfo.html +2 -1
  128. package/docs/html/interfaces/portal_MapFloorInfo.FacilityLayerInfo.html +1 -1
  129. package/docs/html/interfaces/portal_MapFloorInfo.LevelLayerInfo.html +1 -1
  130. package/docs/html/interfaces/portal_MapFloorInfo.MapFloorInfo-1.html +1 -1
  131. package/docs/html/interfaces/portal_MapFloorInfo.SiteLayerInfo.html +1 -1
  132. package/docs/html/interfaces/portal_MapRangeInfo.MapRangeInfo.html +2 -1
  133. package/docs/html/interfaces/portal_MapServiceLayer.MapServiceLayer-1.html +3 -2
  134. package/docs/html/interfaces/portal_MeshSymbol3D.MeshSymbol3D.html +2 -1
  135. package/docs/html/interfaces/portal_MosaicRule.MosaicRule-1.html +2 -1
  136. package/docs/html/interfaces/portal_Multipoint.Multipoint.html +1 -1
  137. package/docs/html/interfaces/portal_ObjectSymbol3DLayer.ObjectSymbol3DLayer.html +2 -1
  138. package/docs/html/interfaces/portal_OpenStreetMapLayer.OpenStreetMapLayer-1.html +2 -1
  139. package/docs/html/interfaces/portal_OperationalLayer.OperationalLayerBase.html +1 -1
  140. package/docs/html/interfaces/portal_PathSymbol3DLayer.PathSymbol3DLayer.html +2 -1
  141. package/docs/html/interfaces/portal_PictureFillSymbol.PictureFillSymbol.html +2 -1
  142. package/docs/html/interfaces/portal_PictureMarkerSymbol.PictureMarkerSymbol.html +2 -1
  143. package/docs/html/interfaces/portal_Point.Point.html +2 -1
  144. package/docs/html/interfaces/portal_PointCloudBitfieldFilter.PointCloudBitfieldFilter.html +2 -1
  145. package/docs/html/interfaces/portal_PointCloudClassBreaksRenderer.PointCloudClassBreaksRenderer.html +4 -2
  146. package/docs/html/interfaces/portal_PointCloudFixedSizeAlgorithm.PointCloudFixedSizeAlgorithm.html +2 -1
  147. package/docs/html/interfaces/portal_PointCloudLayer.PointCloudLayer-1.html +3 -2
  148. package/docs/html/interfaces/portal_PointCloudRGBRenderer.PointCloudRGBRenderer.html +4 -2
  149. package/docs/html/interfaces/portal_PointCloudRenderer.PointCloudRendererBase.html +4 -2
  150. package/docs/html/interfaces/portal_PointCloudReturnFilter.PointCloudReturnFilter.html +2 -1
  151. package/docs/html/interfaces/portal_PointCloudSplatAlgorithm.PointCloudSplatAlgorithm.html +2 -1
  152. package/docs/html/interfaces/portal_PointCloudStretchRenderer.PointCloudStretchRenderer.html +4 -2
  153. package/docs/html/interfaces/portal_PointCloudUniqueValueRenderer.PointCloudUniqueValueRenderer.html +4 -2
  154. package/docs/html/interfaces/portal_PointCloudValueFilter.PointCloudValueFilter.html +2 -1
  155. package/docs/html/interfaces/portal_PointSymbol3D.PointSymbol3D.html +3 -2
  156. package/docs/html/interfaces/portal_Polygon.Polygon.html +1 -1
  157. package/docs/html/interfaces/portal_PolygonSymbol3D.PolygonSymbol3D.html +2 -1
  158. package/docs/html/interfaces/portal_Polyline.Polyline.html +1 -1
  159. package/docs/html/interfaces/portal_PopupExpressionInfo.PopupExpressionInfo.html +2 -1
  160. package/docs/html/interfaces/portal_PopupInfo.OrderByFields.html +2 -1
  161. package/docs/html/interfaces/portal_PopupInfo.RelatedRecordsInfo.html +2 -1
  162. package/docs/html/interfaces/portal_PredominanceRenderer.PredominanceRenderer.html +2 -1
  163. package/docs/html/interfaces/portal_Presentation.Presentation-1.html +2 -1
  164. package/docs/html/interfaces/portal_QueryTableDataSource.QueryTableDataSource.html +2 -2
  165. package/docs/html/interfaces/portal_RangeDomain.RangeDomain-1.html +1 -1
  166. package/docs/html/interfaces/portal_RangeInfo.RangeInfo.html +2 -1
  167. package/docs/html/interfaces/portal_RasterDataSource.RasterDataSource.html +2 -2
  168. package/docs/html/interfaces/portal_Renderer.AuthoringInfo.html +2 -1
  169. package/docs/html/interfaces/portal_Renderer.ColorRamp.html +1 -1
  170. package/docs/html/interfaces/portal_Renderer.RendererBase.html +2 -1
  171. package/docs/html/interfaces/portal_RenderingRule.RenderingRule-1.html +3 -2
  172. package/docs/html/interfaces/portal_SceneLayer.SceneLayer-1.html +3 -2
  173. package/docs/html/interfaces/portal_SimpleFillSymbol.SimpleFillSymbol.html +2 -1
  174. package/docs/html/interfaces/portal_SimpleLineSymbol.SimpleLineSymbol.html +2 -1
  175. package/docs/html/interfaces/portal_SimpleMarkerSymbol.SimpleMarkerSymbol.html +2 -1
  176. package/docs/html/interfaces/portal_SimpleRenderer.SimpleRenderer.html +2 -1
  177. package/docs/html/interfaces/portal_Slide.Slide-1.html +4 -4
  178. package/docs/html/interfaces/portal_SpatialReference.SpatialReference-1.html +2 -1
  179. package/docs/html/interfaces/portal_StreamLayer.StreamLayer-1.html +2 -2
  180. package/docs/html/interfaces/portal_StyleSymbolReference.StyleSymbolReference.html +2 -1
  181. package/docs/html/interfaces/portal_SubtypeGroupLayer.SubtypeGroupLayer-1.html +3 -2
  182. package/docs/html/interfaces/portal_SubtypeGroupLayer.SubtypeSubtypeGroupLayer.html +2 -2
  183. package/docs/html/interfaces/portal_SubtypeSublayer.SubtypeSublayer-1.html +3 -2
  184. package/docs/html/interfaces/portal_Symbol.Font.html +1 -1
  185. package/docs/html/interfaces/portal_Symbol3D.Material.html +2 -1
  186. package/docs/html/interfaces/portal_Symbol3D.Outline.html +2 -1
  187. package/docs/html/interfaces/portal_Symbol3D.ResourceIconSymbol.html +2 -1
  188. package/docs/html/interfaces/portal_Symbol3D.ResourceObjectSymbol.html +2 -1
  189. package/docs/html/interfaces/portal_Table.Table.html +1 -1
  190. package/docs/html/interfaces/portal_TableDataSource.TableDataSource.html +2 -2
  191. package/docs/html/interfaces/portal_Template.Template-1.html +2 -1
  192. package/docs/html/interfaces/portal_TemporalRenderer.TemporalRenderer.html +2 -1
  193. package/docs/html/interfaces/portal_TextSymbol.TextSymbol.html +2 -1
  194. package/docs/html/interfaces/portal_TextSymbol3DLayer.TextSymbol3DLayer.html +2 -1
  195. package/docs/html/interfaces/portal_TileInfo.TileInfo-1.html +3 -2
  196. package/docs/html/interfaces/portal_TiledImageServiceLayer.TiledImageServiceLayer-1.html +3 -2
  197. package/docs/html/interfaces/portal_TiledMapServiceLayer.TiledMapServiceLayer-1.html +4 -3
  198. package/docs/html/interfaces/portal_Type.Type-1.html +3 -8
  199. package/docs/html/interfaces/portal_UniqueValueFromStyle.UniqueValueFromStyle.html +2 -1
  200. package/docs/html/interfaces/portal_UniqueValueRenderer.UniqueValueInfo.html +2 -1
  201. package/docs/html/interfaces/portal_UniqueValueRenderer.UniqueValueRenderer.html +2 -1
  202. package/docs/html/interfaces/portal_UtilityNetwork.TraceConfiguration.html +1 -1
  203. package/docs/html/interfaces/portal_UtilityNetwork.UtilityNetwork-1.html +1 -1
  204. package/docs/html/interfaces/portal_Value.Value.html +1 -1
  205. package/docs/html/interfaces/portal_VectorTileLayer.VectorTileLayer-1.html +3 -2
  206. package/docs/html/interfaces/portal_VerticalOffset.VerticalOffset.html +1 -1
  207. package/docs/html/interfaces/portal_Viewpoint.Viewpoint-1.html +2 -1
  208. package/docs/html/interfaces/portal_VisualVariable.ColorInfo.html +3 -2
  209. package/docs/html/interfaces/portal_VisualVariable.RotationInfo.html +3 -2
  210. package/docs/html/interfaces/portal_VisualVariable.Size.html +2 -1
  211. package/docs/html/interfaces/portal_VisualVariable.SizeInfo.html +3 -2
  212. package/docs/html/interfaces/portal_VisualVariable.TransparencyInfo.html +2 -1
  213. package/docs/html/interfaces/portal_VisualVariable.VisualVariableBase.html +1 -1
  214. package/docs/html/interfaces/portal_WMSLayer.WMSLayer-1.html +3 -2
  215. package/docs/html/interfaces/portal_WMSSublayer.WMSSublayer-1.html +2 -1
  216. package/docs/html/interfaces/portal_WMTSInfo.WMTSInfo-1.html +1 -1
  217. package/docs/html/interfaces/portal_Weather.CloudyWeather.html +2 -1
  218. package/docs/html/interfaces/portal_Weather.FoggyWeather.html +2 -1
  219. package/docs/html/interfaces/portal_Weather.RainyWeather.html +2 -1
  220. package/docs/html/interfaces/portal_Weather.SnowyWeather.html +2 -1
  221. package/docs/html/interfaces/portal_Weather.SunnyWeather.html +2 -1
  222. package/docs/html/interfaces/portal_WebMap.WebMap-1.html +3 -3
  223. package/docs/html/interfaces/portal_WebScene.WebScene-1.html +5 -3
  224. package/docs/html/interfaces/portal_WebSceneBaseMap.WebSceneBaseMap-1.html +2 -1
  225. package/docs/html/interfaces/portal_WebTileLayer.WebTileLayer-1.html +3 -2
  226. package/docs/html/interfaces/portal_Widgets.FloorFilter.html +1 -1
  227. package/docs/html/interfaces/portal_Widgets.Range.html +1 -1
  228. package/docs/html/interfaces/portal_Widgets.TimeSlider.html +3 -2
  229. package/docs/html/interfaces/portal_Widgets.Widgets.html +2 -1
  230. package/docs/html/interfaces/support_Serializable.PropertyDef.html +2 -2
  231. package/docs/html/interfaces/tasks_identify_IdentifyOptions.IdentifyOptions-1.html +2 -2
  232. package/docs/html/interfaces/tasks_search_SearchOptions.SearchOptions-1.html +2 -2
  233. package/docs/html/interfaces/utilities_array.CompareOptions.html +8 -8
  234. package/docs/html/interfaces/utilities_geometry.GeographicTransformationJson.html +1 -1
  235. package/docs/html/types/portal_DataSource.DataSource.html +1 -0
  236. package/docs/html/types/portal_Domain.Domain-1.html +2 -1
  237. package/docs/html/types/portal_Geometry.Geometry.html +1 -1
  238. package/docs/html/types/portal_PointCloudFilter.PointCloudFilter.html +2 -1
  239. package/docs/html/types/portal_Symbol.Color.html +1 -1
  240. package/docs/html/types/portal_Symbol.Symbol.html +1 -1
  241. package/docs/html/types/portal_Symbol3D.Symbol3D.html +2 -1
  242. package/docs/html/types/portal_VisualVariable.VisualVariable.html +2 -1
  243. package/docs/html/variables/mapping_BasemapExtension.defaultBasemapExtensionFactory.html +2 -2
  244. package/docs/html/variables/version.version.html +1 -1
  245. package/forked-libs/dbf/src/fields.js +1 -1
  246. package/forked-libs/dbf/src/structure.js +1 -1
  247. package/forked-libs/shp-write/src/download.js +1 -1
  248. package/forked-libs/shp-write/src/fields.js +1 -1
  249. package/forked-libs/shp-write/src/geojson.js +1 -1
  250. package/forked-libs/shp-write/src/multipoint.js +1 -1
  251. package/forked-libs/shp-write/src/points.js +1 -1
  252. package/forked-libs/shp-write/src/poly.js +1 -1
  253. package/forked-libs/shp-write/src/write.js +1 -1
  254. package/forked-libs/shp-write/src/zip.js +1 -1
  255. package/layer-preset/LayerPreset.d.ts +1 -1
  256. package/layer-preset/LayerPreset.js +1 -1
  257. package/layer-preset/LayerPresetSettings.d.ts +1 -1
  258. package/layer-preset/LayerPresetSettings.js +1 -1
  259. package/locale/_registry.js +1 -1
  260. package/locale/af.js +1 -1
  261. package/locale/ar-MA.js +1 -1
  262. package/locale/ar-SA.js +1 -1
  263. package/locale/ar-TN.js +1 -1
  264. package/locale/ar.js +1 -1
  265. package/locale/az.js +1 -1
  266. package/locale/be.js +1 -1
  267. package/locale/bg.js +1 -1
  268. package/locale/bn.js +1 -1
  269. package/locale/bs.js +1 -1
  270. package/locale/ca.js +1 -1
  271. package/locale/cs.js +1 -1
  272. package/locale/cv.js +1 -1
  273. package/locale/cy.js +1 -1
  274. package/locale/da.js +1 -1
  275. package/locale/de-AT.js +1 -1
  276. package/locale/de.js +1 -1
  277. package/locale/el.js +1 -1
  278. package/locale/en-AU.js +1 -1
  279. package/locale/en-CA.js +1 -1
  280. package/locale/en-GB.js +1 -1
  281. package/locale/en.js +1 -1
  282. package/locale/es.js +1 -1
  283. package/locale/et.js +1 -1
  284. package/locale/eu.js +1 -1
  285. package/locale/fa.js +1 -1
  286. package/locale/fi.js +1 -1
  287. package/locale/fo.js +1 -1
  288. package/locale/fr-CA.js +1 -1
  289. package/locale/fr.js +1 -1
  290. package/locale/gl.js +1 -1
  291. package/locale/he.js +1 -1
  292. package/locale/hi.js +1 -1
  293. package/locale/hr.js +1 -1
  294. package/locale/hu.js +1 -1
  295. package/locale/hy.js +1 -1
  296. package/locale/id.js +1 -1
  297. package/locale/inv.js +1 -1
  298. package/locale/is.js +1 -1
  299. package/locale/it.js +1 -1
  300. package/locale/ja.js +1 -1
  301. package/locale/ka.js +1 -1
  302. package/locale/km.js +1 -1
  303. package/locale/ko.js +1 -1
  304. package/locale/language.js +1 -1
  305. package/locale/lt.js +1 -1
  306. package/locale/lv.js +1 -1
  307. package/locale/mk.js +1 -1
  308. package/locale/ml.js +1 -1
  309. package/locale/mr.js +1 -1
  310. package/locale/ms-MY.js +1 -1
  311. package/locale/ms.js +1 -1
  312. package/locale/my.js +1 -1
  313. package/locale/nb.js +1 -1
  314. package/locale/ne.js +1 -1
  315. package/locale/nl.js +1 -1
  316. package/locale/nn.js +1 -1
  317. package/locale/no.js +1 -1
  318. package/locale/pl.js +1 -1
  319. package/locale/pt-BR.js +1 -1
  320. package/locale/pt.js +1 -1
  321. package/locale/ro.js +1 -1
  322. package/locale/ru.js +1 -1
  323. package/locale/si.js +1 -1
  324. package/locale/sk.js +1 -1
  325. package/locale/sl.js +1 -1
  326. package/locale/sq.js +1 -1
  327. package/locale/sr-Cyrl.js +1 -1
  328. package/locale/sr-ME.js +1 -1
  329. package/locale/sr.js +1 -1
  330. package/locale/sv.js +1 -1
  331. package/locale/ta.js +1 -1
  332. package/locale/th.js +1 -1
  333. package/locale/tl.js +1 -1
  334. package/locale/tr.js +1 -1
  335. package/locale/tzm-Latn.js +1 -1
  336. package/locale/tzm.js +1 -1
  337. package/locale/uk.js +1 -1
  338. package/locale/uz.js +1 -1
  339. package/locale/vi.js +1 -1
  340. package/locale/zh-TW.js +1 -1
  341. package/locale/zh.js +1 -1
  342. package/locale.js +1 -1
  343. package/mapping/ArcGISSublayerExtension.js +1 -1
  344. package/mapping/BasemapExtension.js +1 -1
  345. package/mapping/Bookmark.d.ts +1 -1
  346. package/mapping/Bookmark.js +1 -1
  347. package/mapping/BuildingComponentSublayerExtension.js +1 -1
  348. package/mapping/BuildingGroupSublayerExtension.js +1 -1
  349. package/mapping/BuildingSceneLayerExtension.js +1 -1
  350. package/mapping/BuildingSublayerExtension.js +1 -1
  351. package/mapping/CSVLayerExtension.js +1 -1
  352. package/mapping/ElevationLayerExtension.js +1 -1
  353. package/mapping/FeatureCollectionLayerExtension.js +1 -1
  354. package/mapping/FeatureLayerExtension.js +1 -1
  355. package/mapping/FeatureLayerExtensionBase.js +1 -1
  356. package/mapping/GeoRSSLayerExtension.js +1 -1
  357. package/mapping/GraphicsLayerExtension.js +1 -1
  358. package/mapping/GroundExtension.d.ts +1 -1
  359. package/mapping/GroundExtension.js +1 -1
  360. package/mapping/GroupLayerExtension.js +1 -1
  361. package/mapping/ImageryLayerExtension.js +1 -1
  362. package/mapping/ImageryTileLayerExtension.js +1 -1
  363. package/mapping/IntegratedMeshLayerExtension.js +1 -1
  364. package/mapping/KMLLayerExtension.js +1 -1
  365. package/mapping/KMLSublayerExtension.js +1 -1
  366. package/mapping/LayerExtension.js +1 -1
  367. package/mapping/MapConstraints.js +1 -1
  368. package/mapping/MapExtension.d.ts +5 -5
  369. package/mapping/MapExtension.js +1 -1
  370. package/mapping/MapImageLayerExtension.d.ts +1 -1
  371. package/mapping/MapImageLayerExtension.js +1 -1
  372. package/mapping/MapImageSublayerExtension.js +1 -1
  373. package/mapping/OpenStreetMapLayerExtension.js +1 -1
  374. package/mapping/PointCloudLayerExtension.js +1 -1
  375. package/mapping/SceneLayerExtension.js +1 -1
  376. package/mapping/StreamLayerExtension.js +1 -1
  377. package/mapping/SublayerExtension.js +1 -1
  378. package/mapping/SubtypeGroupLayerExtension.js +1 -1
  379. package/mapping/SubtypeSublayerExtension.js +1 -1
  380. package/mapping/TileLayerExtension.js +1 -1
  381. package/mapping/TileSublayerExtension.js +1 -1
  382. package/mapping/UnsupportedLayerExtension.js +1 -1
  383. package/mapping/VectorTileLayerExtension.js +1 -1
  384. package/mapping/WMSLayerExtension.js +1 -1
  385. package/mapping/WMSSublayerExtension.js +1 -1
  386. package/mapping/WMTSLayerExtension.js +1 -1
  387. package/mapping/WMTSSublayerExtension.js +1 -1
  388. package/mapping/WebTileLayerExtension.js +1 -1
  389. package/mapping/_LayerExtension.d.ts +1 -1
  390. package/mapping/_LayerExtension.js +1 -1
  391. package/mapping/_SublayerExtension.d.ts +1 -1
  392. package/mapping/_SublayerExtension.js +1 -1
  393. package/mapping/convert.js +1 -1
  394. package/mapping/support/ArrayWrappedCollection.js +1 -1
  395. package/mapping/support/DefaultLayerExtensionFactory.js +1 -1
  396. package/mapping/support/DefaultSublayerExtensionFactory.js +1 -1
  397. package/mapping/support/LayerListSettings.js +1 -1
  398. package/mapping/support/PopupTemplateFeatureSettings.js +1 -1
  399. package/mapping/support/WfsCapabilities.js +1 -1
  400. package/mapping/support/WfsFeatureType.js +1 -1
  401. package/mapping/support/_LayerExtensionCollection.js +1 -1
  402. package/mapping/support/_SublayerExtensionCollection.js +1 -1
  403. package/mapping/support/_kml.js +1 -1
  404. package/mapping/support/ogc.js +1 -1
  405. package/menus/Menu.js +1 -1
  406. package/menus/MenuItem.js +1 -1
  407. package/package.json +36 -35
  408. package/portal/ApplicationProperties.d.ts +16 -13
  409. package/portal/Background.d.ts +3 -2
  410. package/portal/Background.js +1 -1
  411. package/portal/BaseMap.d.ts +1 -0
  412. package/portal/BaseMap.js +1 -1
  413. package/portal/BaseMapLayer.d.ts +3 -2
  414. package/portal/BingLayer.d.ts +1 -0
  415. package/portal/Bookmark.d.ts +1 -0
  416. package/portal/BuildingSceneLayer.d.ts +1 -1
  417. package/portal/BuildingSceneLayer.js +1 -1
  418. package/portal/BuildingSceneSublayer.js +1 -1
  419. package/portal/CIMSymbol.d.ts +1 -0
  420. package/portal/CSVLayer.d.ts +1 -0
  421. package/portal/CSVLayer.js +1 -1
  422. package/portal/Camera.d.ts +1 -0
  423. package/portal/Camera.js +1 -1
  424. package/portal/ClassBreaksRenderer.d.ts +4 -2
  425. package/portal/CodedValueDomain.d.ts +2 -2
  426. package/portal/CodedValueDomain.js +1 -1
  427. package/portal/ColorClassBreakInfo.d.ts +1 -0
  428. package/portal/ColorUniqueValueInfos.d.ts +1 -0
  429. package/portal/DataSource.d.ts +5 -4
  430. package/portal/DefinitionEditor.d.ts +3 -2
  431. package/portal/Domain.d.ts +3 -2
  432. package/portal/Domain.js +1 -1
  433. package/portal/DrawingInfo.d.ts +1 -0
  434. package/portal/DrawingInfo.js +1 -1
  435. package/portal/DynamicDataLayer.d.ts +2 -2
  436. package/portal/DynamicMapLayer.d.ts +1 -1
  437. package/portal/Edges.d.ts +1 -1
  438. package/portal/Edges.js +1 -1
  439. package/portal/Effect.d.ts +2 -2
  440. package/portal/ElevationInfo.d.ts +2 -2
  441. package/portal/ElevationInfo.js +1 -1
  442. package/portal/ElevationLayer.d.ts +1 -0
  443. package/portal/ElevationLayer.js +1 -1
  444. package/portal/Environment.d.ts +1 -0
  445. package/portal/Environment.js +1 -1
  446. package/portal/Extent.d.ts +1 -1
  447. package/portal/ExtrudeSymbol3DLayer.d.ts +1 -0
  448. package/portal/Feature.d.ts +1 -0
  449. package/portal/Feature.js +1 -1
  450. package/portal/FeatureCollection.d.ts +1 -0
  451. package/portal/FeatureLayer.d.ts +2 -1
  452. package/portal/FeatureLayer.js +1 -1
  453. package/portal/FeatureReduction.d.ts +1 -1
  454. package/portal/FeatureReduction.js +1 -1
  455. package/portal/FeatureSet.d.ts +1 -0
  456. package/portal/Field.d.ts +2 -2
  457. package/portal/Field.js +1 -1
  458. package/portal/FieldInfo.d.ts +2 -1
  459. package/portal/FillSymbol3DLayer.d.ts +1 -0
  460. package/portal/FormInfo.d.ts +13 -13
  461. package/portal/FormInfo.js +1 -1
  462. package/portal/Format.d.ts +2 -1
  463. package/portal/GeoRSSLayer.d.ts +1 -0
  464. package/portal/GeoRSSLayer.js +1 -1
  465. package/portal/Geometry.d.ts +3 -3
  466. package/portal/Geometry.js +1 -1
  467. package/portal/Ground.d.ts +1 -1
  468. package/portal/Ground.js +1 -1
  469. package/portal/GroupLayer.d.ts +2 -1
  470. package/portal/GroupLayer.js +1 -1
  471. package/portal/HeatmapRenderer.d.ts +2 -0
  472. package/portal/IconSymbol3DLayer.d.ts +1 -0
  473. package/portal/ImageServiceLayer.d.ts +1 -0
  474. package/portal/ImageServiceLayer.js +1 -1
  475. package/portal/ImageServiceVectorLayer.d.ts +1 -0
  476. package/portal/InheritedDomain.d.ts +1 -1
  477. package/portal/InheritedDomain.js +1 -1
  478. package/portal/InitialState.d.ts +1 -0
  479. package/portal/InitialState.js +1 -1
  480. package/portal/IntegratedMeshLayer.d.ts +1 -0
  481. package/portal/IntegratedMeshLayer.js +1 -1
  482. package/portal/Item.d.ts +2 -1
  483. package/portal/Item.js +1 -1
  484. package/portal/JoinTableDataSource.d.ts +2 -2
  485. package/portal/KMLLayer.d.ts +1 -0
  486. package/portal/KMLLayer.js +1 -1
  487. package/portal/LabelSymbol3D.d.ts +1 -0
  488. package/portal/LabelingInfo.d.ts +3 -2
  489. package/portal/LabelingInfo.js +1 -1
  490. package/portal/Layer.d.ts +1 -1
  491. package/portal/Layer.js +1 -1
  492. package/portal/LayerBase.js +1 -1
  493. package/portal/LayerDefinition.d.ts +8 -7
  494. package/portal/LayerDefinition.js +1 -1
  495. package/portal/Lighting.d.ts +3 -1
  496. package/portal/Lighting.js +1 -1
  497. package/portal/LineSymbol3D.d.ts +1 -0
  498. package/portal/LineSymbol3DLayer.d.ts +1 -0
  499. package/portal/LocationInfo.d.ts +1 -0
  500. package/portal/MapFloorInfo.d.ts +4 -4
  501. package/portal/MapFloorInfo.js +1 -1
  502. package/portal/MapRangeInfo.d.ts +1 -0
  503. package/portal/MapServiceLayer.d.ts +1 -0
  504. package/portal/MapServiceLayer.js +1 -1
  505. package/portal/MediaInfo.d.ts +1 -1
  506. package/portal/MediaInfo.js +1 -1
  507. package/portal/MeshSymbol3D.d.ts +1 -0
  508. package/portal/MosaicRule.d.ts +3 -2
  509. package/portal/MosaicRule.js +1 -1
  510. package/portal/Multipoint.d.ts +1 -1
  511. package/portal/ObjectSymbol3DLayer.d.ts +1 -0
  512. package/portal/OpenStreetMapLayer.d.ts +1 -0
  513. package/portal/OpenStreetMapLayer.js +1 -1
  514. package/portal/OperationalLayer.d.ts +3 -3
  515. package/portal/PathSymbol3DLayer.d.ts +1 -0
  516. package/portal/PictureFillSymbol.d.ts +1 -0
  517. package/portal/PictureMarkerSymbol.d.ts +1 -0
  518. package/portal/Point.d.ts +2 -1
  519. package/portal/PointCloudBitfieldFilter.d.ts +1 -0
  520. package/portal/PointCloudClassBreaksRenderer.d.ts +1 -0
  521. package/portal/PointCloudFilter.d.ts +2 -1
  522. package/portal/PointCloudFixedSizeAlgorithm.d.ts +1 -0
  523. package/portal/PointCloudLayer.d.ts +1 -0
  524. package/portal/PointCloudLayer.js +1 -1
  525. package/portal/PointCloudRGBRenderer.d.ts +1 -0
  526. package/portal/PointCloudRenderer.d.ts +3 -1
  527. package/portal/PointCloudRenderer.js +1 -1
  528. package/portal/PointCloudReturnFilter.d.ts +1 -0
  529. package/portal/PointCloudSplatAlgorithm.d.ts +1 -0
  530. package/portal/PointCloudStretchRenderer.d.ts +1 -0
  531. package/portal/PointCloudUniqueValueRenderer.d.ts +1 -0
  532. package/portal/PointCloudValueFilter.d.ts +1 -0
  533. package/portal/PointSymbol3D.d.ts +2 -1
  534. package/portal/Polygon.d.ts +1 -1
  535. package/portal/PolygonSymbol3D.d.ts +1 -0
  536. package/portal/Polyline.d.ts +1 -1
  537. package/portal/PopupExpressionInfo.d.ts +2 -1
  538. package/portal/PopupInfo.d.ts +3 -1
  539. package/portal/PopupInfo.js +1 -1
  540. package/portal/PredominanceRenderer.d.ts +1 -0
  541. package/portal/Presentation.d.ts +1 -0
  542. package/portal/Presentation.js +1 -1
  543. package/portal/QueryTableDataSource.d.ts +1 -1
  544. package/portal/RangeDomain.d.ts +1 -1
  545. package/portal/RangeDomain.js +1 -1
  546. package/portal/RangeInfo.d.ts +1 -0
  547. package/portal/RasterDataSource.d.ts +1 -1
  548. package/portal/Renderer.d.ts +8 -6
  549. package/portal/Renderer.js +1 -1
  550. package/portal/RenderingRule.d.ts +3 -2
  551. package/portal/RenderingRule.js +1 -1
  552. package/portal/SceneLayer.d.ts +1 -0
  553. package/portal/SceneLayer.js +1 -1
  554. package/portal/SimpleFillSymbol.d.ts +2 -1
  555. package/portal/SimpleLineSymbol.d.ts +2 -1
  556. package/portal/SimpleMarkerSymbol.d.ts +2 -1
  557. package/portal/SimpleRenderer.d.ts +1 -0
  558. package/portal/Slide.d.ts +4 -4
  559. package/portal/Slide.js +1 -1
  560. package/portal/SpatialReference.d.ts +1 -0
  561. package/portal/SpatialReference.js +1 -1
  562. package/portal/StreamLayer.d.ts +1 -1
  563. package/portal/StreamLayer.js +1 -1
  564. package/portal/StyleSymbolReference.d.ts +1 -0
  565. package/portal/SubtypeGroupLayer.d.ts +3 -2
  566. package/portal/SubtypeGroupLayer.js +1 -1
  567. package/portal/SubtypeSublayer.d.ts +1 -0
  568. package/portal/SubtypeSublayer.js +1 -1
  569. package/portal/Symbol.d.ts +11 -11
  570. package/portal/Symbol.js +1 -1
  571. package/portal/Symbol3D.d.ts +7 -2
  572. package/portal/Table.d.ts +3 -3
  573. package/portal/Table.js +1 -1
  574. package/portal/TableDataSource.d.ts +1 -1
  575. package/portal/Template.d.ts +2 -1
  576. package/portal/Template.js +1 -1
  577. package/portal/TemporalRenderer.d.ts +1 -0
  578. package/portal/TextSymbol.d.ts +1 -0
  579. package/portal/TextSymbol3DLayer.d.ts +1 -0
  580. package/portal/TileInfo.d.ts +2 -1
  581. package/portal/TileInfo.js +1 -1
  582. package/portal/TiledImageServiceLayer.d.ts +1 -0
  583. package/portal/TiledImageServiceLayer.js +1 -1
  584. package/portal/TiledMapServiceLayer.d.ts +2 -1
  585. package/portal/TiledMapServiceLayer.js +1 -1
  586. package/portal/Type.d.ts +2 -4
  587. package/portal/Type.js +1 -1
  588. package/portal/UniqueValueFromStyle.d.ts +1 -0
  589. package/portal/UniqueValueRenderer.d.ts +2 -0
  590. package/portal/UtilityNetwork.d.ts +2 -2
  591. package/portal/UtilityNetwork.js +1 -1
  592. package/portal/Value.d.ts +1 -1
  593. package/portal/VectorFieldRenderer.d.ts +1 -1
  594. package/portal/VectorTileLayer.d.ts +1 -0
  595. package/portal/VectorTileLayer.js +1 -1
  596. package/portal/VerticalOffset.d.ts +1 -1
  597. package/portal/Viewpoint.d.ts +1 -0
  598. package/portal/Viewpoint.js +1 -1
  599. package/portal/VisualVariable.d.ts +10 -4
  600. package/portal/WMSLayer.d.ts +1 -0
  601. package/portal/WMSLayer.js +1 -1
  602. package/portal/WMSSublayer.d.ts +1 -0
  603. package/portal/WMSSublayer.js +1 -1
  604. package/portal/WMTSInfo.d.ts +1 -1
  605. package/portal/WMTSInfo.js +1 -1
  606. package/portal/Weather.d.ts +6 -1
  607. package/portal/Weather.js +1 -1
  608. package/portal/WebMap.d.ts +3 -3
  609. package/portal/WebMap.js +1 -1
  610. package/portal/WebScene.d.ts +3 -1
  611. package/portal/WebScene.js +1 -1
  612. package/portal/WebSceneBaseMap.d.ts +1 -0
  613. package/portal/WebSceneBaseMap.js +1 -1
  614. package/portal/WebTileLayer.d.ts +1 -0
  615. package/portal/WebTileLayer.js +1 -1
  616. package/portal/Widgets.d.ts +6 -4
  617. package/portal/Widgets.js +1 -1
  618. package/portal/_LayerBase.d.ts +2 -2
  619. package/portal/_layerHelper.js +1 -1
  620. package/portal/_utils.js +1 -1
  621. package/support/Action.d.ts +4 -4
  622. package/support/ArcGISRequestHelper.js +1 -1
  623. package/support/Cancellable.d.ts +1 -1
  624. package/support/Cancellable.js +1 -1
  625. package/support/FormatSettings.js +1 -1
  626. package/support/InitializableBase.d.ts +1 -1
  627. package/support/InitializableBase.js +1 -1
  628. package/support/InitializableCollectionProxy.js +1 -1
  629. package/support/InitializeError.js +1 -1
  630. package/support/Observable.js +1 -1
  631. package/support/ReadOnlyInitializableCollection.js +1 -1
  632. package/support/Serializable.d.ts +4 -4
  633. package/support/Serializable.js +1 -1
  634. package/support/Settings.js +1 -1
  635. package/support/_ArcGISRelationshipCollection.js +1 -1
  636. package/support/_esriInternal.js +1 -1
  637. package/support/_graphicsQuery.js +1 -1
  638. package/support/_query.js +1 -1
  639. package/support/_requestCache.js +1 -1
  640. package/support/_restApiJson.d.ts +1 -1
  641. package/support/esri.d.ts +76 -76
  642. package/support/esri.js +1 -1
  643. package/tasks/geocoding/ArcGISGeocoder.js +1 -1
  644. package/tasks/geocoding/Geocoder.d.ts +1 -1
  645. package/tasks/geocoding/Geocoder.js +1 -1
  646. package/tasks/geocoding/utilities.js +1 -1
  647. package/tasks/identify/ArcGISSublayerQueryIdentifyProvider.js +1 -1
  648. package/tasks/identify/BuildingComponentSublayerClientSideIdentifyProvider.js +1 -1
  649. package/tasks/identify/BuildingComponentSublayerHitTestIdentifyProvider.js +1 -1
  650. package/tasks/identify/CSVLayer3DHitTestIdentifyProvider.js +1 -1
  651. package/tasks/identify/CSVLayerClientSideQueryIdentifyProvider.js +1 -1
  652. package/tasks/identify/ClientSideIdentifyProvider.d.ts +2 -2
  653. package/tasks/identify/ClientSideIdentifyProvider.js +1 -1
  654. package/tasks/identify/FeatureLayer3DHitTestIdentifyProvider.js +1 -1
  655. package/tasks/identify/FeatureLayerClientSideIdentifyProvider.js +1 -1
  656. package/tasks/identify/FeatureLayerQueryIdentifyProvider.js +1 -1
  657. package/tasks/identify/GeoRSSLayerIdentifyProvider.js +1 -1
  658. package/tasks/identify/GraphicsLayerQueryIdentifyProvider.js +1 -1
  659. package/tasks/identify/HitTestIdentifyProvider.d.ts +2 -2
  660. package/tasks/identify/HitTestIdentifyProvider.js +1 -1
  661. package/tasks/identify/IdentifyError.js +1 -1
  662. package/tasks/identify/IdentifyProviderBase.js +1 -1
  663. package/tasks/identify/IdentifyService.js +1 -1
  664. package/tasks/identify/ImageryLayerIdentifyProvider.js +1 -1
  665. package/tasks/identify/KMLLayerQueryIdentifyProvider.js +1 -1
  666. package/tasks/identify/PointCloudLayerHitTestIdentifyProvider.js +1 -1
  667. package/tasks/identify/SceneLayerClientSideIdentifyProvider.js +1 -1
  668. package/tasks/identify/SceneLayerHitTestIdentifyProvider.js +1 -1
  669. package/tasks/identify/SceneLayerQueryIdentifyProvider.js +1 -1
  670. package/tasks/identify/StreamLayerClientSideQueryIdentifyProvider.js +1 -1
  671. package/tasks/identify/StreamLayerQueryIdentifyProvider.js +1 -1
  672. package/tasks/identify/SubtypeSublayerClientSideIdentifyProvider.js +1 -1
  673. package/tasks/identify/SubtypeSublayerQueryIdentifyProvider.js +1 -1
  674. package/tasks/identify/WMSSublayerIdentifyProvider.js +1 -1
  675. package/tasks/query/ArcGISRelationship.js +1 -1
  676. package/tasks/query/ArcGISServiceTableQueryProvider.js +1 -1
  677. package/tasks/query/ArcGISSublayerQueryProvider.js +1 -1
  678. package/tasks/query/BuildingComponentSublayerClientSideQueryProvider.js +1 -1
  679. package/tasks/query/CSVLayerClientSideQueryProvider.js +1 -1
  680. package/tasks/query/CSVLayerQueryProvider.js +1 -1
  681. package/tasks/query/ClientSideQueryProvider.d.ts +2 -2
  682. package/tasks/query/ClientSideQueryProvider.js +1 -1
  683. package/tasks/query/FeatureLayerQueryProvider.js +1 -1
  684. package/tasks/query/GeoRSSLayerQueryProvider.js +1 -1
  685. package/tasks/query/GraphicsLayerQueryProvider.js +1 -1
  686. package/tasks/query/ImageryLayerQueryProvider.js +1 -1
  687. package/tasks/query/KMLLayerQueryProvider.js +1 -1
  688. package/tasks/query/QueryBasedRelationship.js +1 -1
  689. package/tasks/query/QueryError.js +1 -1
  690. package/tasks/query/QueryProviderBase.js +1 -1
  691. package/tasks/query/QueryService.js +1 -1
  692. package/tasks/query/SceneLayerClientSideQueryProvider.js +1 -1
  693. package/tasks/query/SceneLayerQueryProvider.js +1 -1
  694. package/tasks/query/StreamLayerClientSideQueryProvider.js +1 -1
  695. package/tasks/query/StreamLayerQueryProvider.js +1 -1
  696. package/tasks/query/SubtypeSublayerQueryProvider.js +1 -1
  697. package/tasks/search/ArcGISGeocoderSearchProvider.js +1 -1
  698. package/tasks/search/GeocoderSearchProvider.js +1 -1
  699. package/tasks/search/QuerySearchProvider.js +1 -1
  700. package/tasks/search/SearchError.js +1 -1
  701. package/tasks/search/SearchProviderBase.js +1 -1
  702. package/tasks/search/SearchService.js +1 -1
  703. package/tasks/search/_utilities.js +1 -1
  704. package/utilities/CollectionProxy.js +1 -1
  705. package/utilities/CopyOnWriteCollection.js +1 -1
  706. package/utilities/GeometryServiceError.js +1 -1
  707. package/utilities/MapTransformCollection.js +1 -1
  708. package/utilities/ObservableMap.js +1 -1
  709. package/utilities/ObservableSet.js +1 -1
  710. package/utilities/ObservableWeakSet.js +1 -1
  711. package/utilities/ReadOnlyCollection.js +1 -1
  712. package/utilities/ReadOnlyMap.js +1 -1
  713. package/utilities/_layers.js +1 -1
  714. package/utilities/_ogc.js +1 -1
  715. package/utilities/arcade.js +1 -1
  716. package/utilities/array.js +1 -1
  717. package/utilities/asyncIterable.d.ts +1 -1
  718. package/utilities/asyncIterable.js +1 -1
  719. package/utilities/basemaps.js +1 -1
  720. package/utilities/checkArg.js +1 -1
  721. package/utilities/collection.js +1 -1
  722. package/utilities/date.js +1 -1
  723. package/utilities/esri.js +1 -1
  724. package/utilities/extensions.js +1 -1
  725. package/utilities/geometry.d.ts +2 -2
  726. package/utilities/geometry.js +1 -1
  727. package/utilities/iterable.js +1 -1
  728. package/utilities/log.d.ts +1 -1
  729. package/utilities/log.js +1 -1
  730. package/utilities/mapping.js +1 -1
  731. package/utilities/math.js +1 -1
  732. package/utilities/number.js +1 -1
  733. package/utilities/object.js +1 -1
  734. package/utilities/portal.d.ts +3 -3
  735. package/utilities/portal.js +1 -1
  736. package/utilities/promise.d.ts +1 -1
  737. package/utilities/promise.js +1 -1
  738. package/utilities/query.js +1 -1
  739. package/utilities/relationships.js +1 -1
  740. package/utilities/scaleRanges.d.ts +1 -1
  741. package/utilities/set.js +1 -1
  742. package/utilities/string.d.ts +6 -21
  743. package/utilities/string.js +1 -1
  744. package/utilities/symbol.js +1 -1
  745. package/utilities/uri.js +1 -1
  746. package/utilities/watch.js +1 -1
  747. package/version.d.ts +1 -1
  748. package/version.js +1 -1
@@ -1 +1 @@
1
- import{format}from"./utilities/string.js";export class AccessDeniedError extends Error{constructor(r,...e){super(r&&format(r,...e)||"Access denied."),this.name="AccessDeniedError"}}
1
+ import{format as r}from"./utilities/string.js";export class AccessDeniedError extends Error{constructor(e,...s){super(e&&r(e,...s)||"Access denied."),this.name="AccessDeniedError"}}
@@ -1219,11 +1219,7 @@
1219
1219
  "type": "string"
1220
1220
  },
1221
1221
  "values": {
1222
- "additionalProperties": {
1223
- "type": "string"
1224
- },
1225
- "description": "The set of localized strings, indexed by unique key.",
1226
- "type": "object"
1222
+ "description": "The set of localized strings, indexed by unique key."
1227
1223
  }
1228
1224
  },
1229
1225
  "type": "object"
@@ -3366,16 +3362,16 @@
3366
3362
  "esri.Viewing": {},
3367
3363
  "esri.Viewpoint": {},
3368
3364
  "esri.webmap.BingLayer.BingLayer": {
3369
- "description": "Indicates if working with Microsoft Bing layers. There are three layer types\nassociated with Bing Layers: BingMapsAerial, BingMapsRoad, and\nBingMapsHybrid.{@linkhttps://developers.arcgis.com/web-map-specification/objects/bingLayer/}."
3365
+ "description": "Indicates if working with Microsoft Bing layers. There are three layer types\nassociated with Bing Layers: BingMapsAerial, BingMapsRoad, and\nBingMapsHybrid.\n\nSee{@linkhttps://developers.arcgis.com/web-map-specification/objects/bingLayer/}."
3370
3366
  },
3371
3367
  "esri.webmap.CodedValueDomain.CodedValue": {
3372
- "description": "A set of valid coded values with unique names.{@linkhttps://developers.arcgis.com/web-map-specification/objects/codedValue/}{@linkhttps://developers.arcgis.com/web-scene-specification/objects/codedValue_domain/}."
3368
+ "description": "A set of valid coded values with unique names. See{@linkhttps://developers.arcgis.com/web-map-specification/objects/codedValue/}{@linkhttps://developers.arcgis.com/web-scene-specification/objects/codedValue_domain/}."
3373
3369
  },
3374
3370
  "esri.webmap.CodedValueDomain.CodedValueDomain": {
3375
- "description": "Coded value domain specifies an explicit set of valid values for a field.\nEach valid value is assigned a unique name.{@linkhttps://developers.arcgis.com/web-map-specification/objects/codedValue_domain/}."
3371
+ "description": "Coded value domain specifies an explicit set of valid values for a field.\nEach valid value is assigned a unique name. See{@linkhttps://developers.arcgis.com/web-map-specification/objects/codedValue_domain/}."
3376
3372
  },
3377
3373
  "esri.webmap.DefinitionEditor.DefinitionEditor": {
3378
- "description": "The definitionEditor stores interactive filters at the same level as\nlayerDefinition.{@linkhttps://developers.arcgis.com/web-map-specification/objects/definitionEditor/}{@linkhttps://developers.arcgis.com/web-scene-specification/objects/definitionEditor/}."
3374
+ "description": "The definitionEditor stores interactive filters at the same level as\nlayerDefinition.\n\nSee{@linkhttps://developers.arcgis.com/web-map-specification/objects/definitionEditor/}{@linkhttps://developers.arcgis.com/web-scene-specification/objects/definitionEditor/}."
3379
3375
  },
3380
3376
  "esri.webmap.Effect.BloomEffectFunction": {
3381
3377
  "description": "An Effect Function for the bloom effect."
@@ -3414,34 +3410,34 @@
3414
3410
  "description": "An Effect Function for the sepia effect."
3415
3411
  },
3416
3412
  "esri.webmap.ElevationLayer.ElevationLayer": {
3417
- "description": "ElevationLayer is a tile layer used for rendering elevation in web scenes. A\ndefault world elevation layer can be added to the map by setting the map's\nground property to world-elevation.{@linkhttps://developers.arcgis.com/web-scene-specification/objects/elevationLayer/}."
3413
+ "description": "ElevationLayer is a tile layer used for rendering elevation in web scenes. A\ndefault world elevation layer can be added to the map by setting the map's\nground property to world-elevation.\n\nSee{@linkhttps://developers.arcgis.com/web-scene-specification/objects/elevationLayer/}."
3418
3414
  },
3419
3415
  "esri.webmap.Extent.Extent": {
3420
- "description": "This object defines the bounding geometry given the lower-left and\nupper-right corners of the bounding box. A spatial reference is also\nrequired.{@linkhttps://developers.arcgis.com/web-map-specification/objects/envelope_geometry/}{@linkhttps://developers.arcgis.com/web-map-specification/objects/extent/}{@linkhttps://developers.arcgis.com/web-scene-specification/objects/extent/}."
3416
+ "description": "This object defines the bounding geometry given the lower-left and\nupper-right corners of the bounding box. A spatial reference is also\nrequired. See{@linkhttps://developers.arcgis.com/web-map-specification/objects/envelope_geometry/}{@linkhttps://developers.arcgis.com/web-map-specification/objects/extent/}{@linkhttps://developers.arcgis.com/web-scene-specification/objects/extent/}."
3421
3417
  },
3422
3418
  "esri.webmap.Field.Field": {
3423
- "description": "Contains information about an attribute field. This field could come from a\nfeature collection or a single layer in a map service. Used in\nlayerDefinition.{@linkhttps://developers.arcgis.com/web-map-specification/objects/field/}{@linkhttps://developers.arcgis.com/web-scene-specification/objects/field/}."
3419
+ "description": "Contains information about an attribute field. This field could come from a\nfeature collection or a single layer in a map service. Used in\nlayerDefinition.\n\nSee{@linkhttps://developers.arcgis.com/web-map-specification/objects/field/}{@linkhttps://developers.arcgis.com/web-scene-specification/objects/field/}."
3424
3420
  },
3425
3421
  "esri.webmap.Field.FieldType": {
3426
3422
  "description": "The type of the Field."
3427
3423
  },
3428
3424
  "esri.webmap.FieldInfo.FieldInfo": {
3429
- "description": "Defines how a field in the dataset participates (or does not participate) in\na pop-up window.{@linkhttps://developers.arcgis.com/web-map-specification/objects/fieldInfo/}{@linkhttps://developers.arcgis.com/web-scene-specification/objects/fieldInfo/}."
3425
+ "description": "Defines how a field in the dataset participates (or does not participate) in\na pop-up window.\n\nSee{@linkhttps://developers.arcgis.com/web-map-specification/objects/fieldInfo/}{@linkhttps://developers.arcgis.com/web-scene-specification/objects/fieldInfo/}."
3430
3426
  },
3431
3427
  "esri.webmap.FormInfo.FormInfo": {
3432
- "description": "Defines the form configuration when a user edits a feature.{@linkhttps://developers.arcgis.com/web-map-specification/objects/formInfo/}."
3428
+ "description": "Defines the form configuration when a user edits a feature. See{@linkhttps://developers.arcgis.com/web-map-specification/objects/formInfo/}."
3433
3429
  },
3434
3430
  "esri.webmap.ImageServiceLayer.ImageServiceLayer": {
3435
- "description": "An image service provides access to raster data through a web service.\nMultiple rasters can be served as one image service through mosaic dataset\ntechnology, dynamically processed and mosaiced on the fly. An image service\nsupports accessing both the mosaicked image and its catalog, as well as\nindividual rasters in the catalog. Also, image services can be cached (tiled)\nor uncached (dynamic). This object specifically details properties within\nuncached image services.{@linkhttps://developers.arcgis.com/web-map-specification/objects/imageServiceLayer/}{@linkhttps://developers.arcgis.com/web-scene-specification/objects/imageServiceLayer/}."
3431
+ "description": "An image service provides access to raster data through a web service.\nMultiple rasters can be served as one image service through mosaic dataset\ntechnology, dynamically processed and mosaiced on the fly. An image service\nsupports accessing both the mosaicked image and its catalog, as well as\nindividual rasters in the catalog. Also, image services can be cached (tiled)\nor uncached (dynamic). This object specifically details properties within\nuncached image services.\n\nSee{@linkhttps://developers.arcgis.com/web-map-specification/objects/imageServiceLayer/}{@linkhttps://developers.arcgis.com/web-scene-specification/objects/imageServiceLayer/}."
3436
3432
  },
3437
3433
  "esri.webmap.ImageServiceVectorLayer.ImageServiceVectorLayer": {
3438
- "description": "The imageServiceVectorLayer displays pixel values as vectors. To do this, the\nimage service layer must be a two-band raster in which one band holds\nmagnitude values and one band holds direction values. The\nimageServiceVectorLayer also supports time-enabled data.{@linkhttps://developers.arcgis.com/web-map-specification/objects/imageServiceVectorLayer/}."
3434
+ "description": "The imageServiceVectorLayer displays pixel values as vectors. To do this, the\nimage service layer must be a two-band raster in which one band holds\nmagnitude values and one band holds direction values. The\nimageServiceVectorLayer also supports time-enabled data.\n\nSee{@linkhttps://developers.arcgis.com/web-map-specification/objects/imageServiceVectorLayer/}."
3439
3435
  },
3440
3436
  "esri.webmap.InheritedDomain.InheritedDomain": {
3441
- "description": "This domain applies to domains on subtypes. It implies that the domain for a\nfield at the subtype level is the same as the domain for the field at the\nlayer level.{@linkhttps://developers.arcgis.com/web-map-specification/objects/inherited_domain/}{@linkhttps://developers.arcgis.com/web-scene-specification/objects/inherited_domain/}."
3437
+ "description": "This domain applies to domains on subtypes. It implies that the domain for a\nfield at the subtype level is the same as the domain for the field at the\nlayer level. See{@linkhttps://developers.arcgis.com/web-map-specification/objects/inherited_domain/}{@linkhttps://developers.arcgis.com/web-scene-specification/objects/inherited_domain/}."
3442
3438
  },
3443
3439
  "esri.webmap.Item.Item": {
3444
- "description": "An item (a unit of content) in the portal. Each item has a unique identifier\nand a well known URL that is independent of the user owning the item. An item\ncan have associated binary or textual data that's available via the item data\nresource. For example, an item of type Map Package returns the actual bits\ncorresponding to the map package via the item data resource. The numViews is\nincremented when an item is opened.{@linkhttp://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Item/02r30000007w000000/}.",
3440
+ "description": "An item (a unit of content) in the portal. Each item has a unique identifier\nand a well known URL that is independent of the user owning the item. An item\ncan have associated binary or textual data that's available via the item data\nresource. For example, an item of type Map Package returns the actual bits\ncorresponding to the map package via the item data resource. The numViews is\nincremented when an item is opened.\n\nSee{@linkhttp://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Item/02r30000007w000000/}.",
3445
3441
  "properties": {
3446
3442
  "$portal": {
3447
3443
  "description": "The portal to load the item from.",
@@ -3648,7 +3644,7 @@
3648
3644
  "type": "string"
3649
3645
  },
3650
3646
  "type": {
3651
- "description": "The GIS content type of this item. Example types include Web Map, Map\nService, Shapefile, and Web Mapping Application.{@linkhttp://resources.arcgis.com/en/help/arcgis-rest-api/index.html#//02r3000000ms000000}.",
3647
+ "description": "The GIS content type of this item. Example types include Web Map, Map\nService, Shapefile, and Web Mapping Application. See{@linkhttp://resources.arcgis.com/en/help/arcgis-rest-api/index.html#//02r3000000ms000000}.",
3652
3648
  "type": "string"
3653
3649
  },
3654
3650
  "typeKeywords": {
@@ -3669,34 +3665,34 @@
3669
3665
  "type": "object"
3670
3666
  },
3671
3667
  "esri.webmap.LayerDefinition.LayerDefinition": {
3672
- "description": "The LayerDefinition object defines the attribute schema and drawing\ninformation for a layer drawn using client-side graphics. This could include\na feature collection, a CSV file referenced through the web, or a single\nlayer in an ArcGIS map service. Also used for dynamic layers.{@linkhttps://developers.arcgis.com/web-map-specification/objects/layerDefinition/}{@linkhttps://developers.arcgis.com/web-scene-specification/objects/layerDefinition/}."
3668
+ "description": "The LayerDefinition object defines the attribute schema and drawing\ninformation for a layer drawn using client-side graphics. This could include\na feature collection, a CSV file referenced through the web, or a single\nlayer in an ArcGIS map service. Also used for dynamic layers.\n\nSee{@linkhttps://developers.arcgis.com/web-map-specification/objects/layerDefinition/}{@linkhttps://developers.arcgis.com/web-scene-specification/objects/layerDefinition/}."
3673
3669
  },
3674
3670
  "esri.webmap.MapServiceLayer.MapServiceLayer": {
3675
- "description": "ArcGIS web maps are designed to work with web services hosted on ArcGIS\nServer and ArcGIS Online, in addition to other types of servers. Map services\ncan be cached (tiled) or uncached (dynamic). This object specifically details\nproperties within uncached map services.{@linkhttps://developers.arcgis.com/web-map-specification/objects/mapServiceLayer/}{@linkhttps://developers.arcgis.com/web-scene-specification/objects/mapServiceLayer/}."
3671
+ "description": "ArcGIS web maps are designed to work with web services hosted on ArcGIS\nServer and ArcGIS Online, in addition to other types of servers. Map services\ncan be cached (tiled) or uncached (dynamic). This object specifically details\nproperties within uncached map services.\n\nSee{@linkhttps://developers.arcgis.com/web-map-specification/objects/mapServiceLayer/}{@linkhttps://developers.arcgis.com/web-scene-specification/objects/mapServiceLayer/}."
3676
3672
  },
3677
3673
  "esri.webmap.MediaInfo.MediaInfo": {
3678
3674
  "description": "Defines an image or a chart to be displayed in a pop-up window. See\nhttps://developers.arcgis.com/web-map-specification/objects/mediaInfo/ and\nhttps://developers.arcgis.com/web-scene-specification/objects/mediaInfo/."
3679
3675
  },
3680
3676
  "esri.webmap.Multipoint.Multipoint": {
3681
- "description": "Contains an array of points, along with a spatial reference field.{@linkhttps://developers.arcgis.com/web-map-specification/objects/multipoint_geometry/}{@linkhttps://developers.arcgis.com/web-scene-specification/objects/multipoint_geometry/}."
3677
+ "description": "Contains an array of points, along with a spatial reference field. See{@linkhttps://developers.arcgis.com/web-map-specification/objects/multipoint_geometry/}{@linkhttps://developers.arcgis.com/web-scene-specification/objects/multipoint_geometry/}."
3682
3678
  },
3683
3679
  "esri.webmap.OpenStreetMapLayer.OpenStreetMapLayer": {
3684
- "description": "Allows use of OpenStreetMap data for use in basemaps only.{@linkhttps://developers.arcgis.com/web-map-specification/objects/openStreetMapLayer/}{@linkhttps://developers.arcgis.com/web-scene-specification/objects/openStreetMapLayer/}Note: In the JavaScript API, open street map derived from Web tile layer."
3680
+ "description": "Allows use of OpenStreetMap data for use in basemaps only.\n\nSee{@linkhttps://developers.arcgis.com/web-map-specification/objects/openStreetMapLayer/}{@linkhttps://developers.arcgis.com/web-scene-specification/objects/openStreetMapLayer/}Note: In the JavaScript API, open street map derived from Web tile layer."
3685
3681
  },
3686
3682
  "esri.webmap.Point.Point": {
3687
- "description": "Defines the JSON formats of the point and spatial reference objects.{@linkhttps://developers.arcgis.com/web-map-specification/objects/point_geometry/}.{@linkhttps://developers.arcgis.com/web-map-specification/objects/point_geometry/}."
3683
+ "description": "Defines the JSON formats of the point and spatial reference objects. See{@linkhttps://developers.arcgis.com/web-map-specification/objects/point_geometry/}.\nSee{@linkhttps://developers.arcgis.com/web-map-specification/objects/point_geometry/}."
3688
3684
  },
3689
3685
  "esri.webmap.Polygon.Polygon": {
3690
- "description": "A polygon contains an array of rings and a spatial reference.{@linkhttps://developers.arcgis.com/web-map-specification/objects/polygon_geometry/}{@linkhttps://developers.arcgis.com/web-scene-specification/objects/polygon_geometry/}."
3686
+ "description": "A polygon contains an array of rings and a spatial reference. See{@linkhttps://developers.arcgis.com/web-map-specification/objects/polygon_geometry/}{@linkhttps://developers.arcgis.com/web-scene-specification/objects/polygon_geometry/}."
3691
3687
  },
3692
3688
  "esri.webmap.Polyline.Polyline": {
3693
- "description": "Contains an array of paths and a spatialReference.{@linkhttps://developers.arcgis.com/web-map-specification/objects/polyline_geometry/}{@linkhttps://developers.arcgis.com/web-scene-specification/objects/polyline_geometry/}."
3689
+ "description": "Contains an array of paths and a spatialReference. See{@linkhttps://developers.arcgis.com/web-map-specification/objects/polyline_geometry/}{@linkhttps://developers.arcgis.com/web-scene-specification/objects/polyline_geometry/}."
3694
3690
  },
3695
3691
  "esri.webmap.PopupExpressionInfo.PopupExpressionInfo": {
3696
- "description": "Arcade expression added to the pop-up.{@linkhttps://developers.arcgis.com/web-map-specification/objects/popupExpressionInfo/}."
3692
+ "description": "Arcade expression added to the pop-up.\n\nSee{@linkhttps://developers.arcgis.com/web-map-specification/objects/popupExpressionInfo/}."
3697
3693
  },
3698
3694
  "esri.webmap.PopupInfo.OrderByFields": {
3699
- "description": "Object indicating the field display order for the related records and whether\nthey should be sorted in ascending or descending order.{@linkhttps://developers.arcgis.com/web-map-specification/objects/orderByFields/}{@linkhttps://developers.arcgis.com/web-scene-specification/objects/orderByFields/}."
3695
+ "description": "Object indicating the field display order for the related records and whether\nthey should be sorted in ascending or descending order.\n\nSee{@linkhttps://developers.arcgis.com/web-map-specification/objects/orderByFields/}{@linkhttps://developers.arcgis.com/web-scene-specification/objects/orderByFields/}."
3700
3696
  },
3701
3697
  "esri.webmap.PopupInfo.PopupElement": {
3702
3698
  "description": "Popup elements allow users to author popups, using multiple elements such as\ntabular views, string description, media (charts and images), and attachments\nof the attributes and control the order in which they appear. Specifically,\npopupElements do the following: 1) provide the ability to explicitly add a\nfield/ value table in addition to a description, 2) allow adding multiple\ndescription elements, and 3) allow a user to author and consume elements of a\npopup in the order of their choosing.\n\nEach popupElement has a type property. This string value indicates the type\nof popupElement used.\n\nSee https://developers.arcgis.com/web-map-specification/objects/popupElement/\nand\nhttps://developers.arcgis.com/web-scene-specification/objects/popupElement/."
@@ -3708,37 +3704,37 @@
3708
3704
  "description": "Defines the look and feel of pop-up windows when users click or query a\nfeature.\n\nSee https://developers.arcgis.com/web-map-specification/objects/popupInfo/\nand\nhttps://developers.arcgis.com/web-scene-specification/objects/popupInfo/."
3709
3705
  },
3710
3706
  "esri.webmap.RangeDomain.RangeDomain": {
3711
- "description": "Range domain specifies a range of valid values for a field.{@linkhttps://developers.arcgis.com/web-map-specification/objects/range_domain/}{@linkhttps://developers.arcgis.com/web-scene-specification/objects/range_domain/}."
3707
+ "description": "Range domain specifies a range of valid values for a field. See{@linkhttps://developers.arcgis.com/web-map-specification/objects/range_domain/}{@linkhttps://developers.arcgis.com/web-scene-specification/objects/range_domain/}."
3712
3708
  },
3713
3709
  "esri.webmap.SpatialReference.SpatialReference": {
3714
- "description": "The spatialReference object is located at the top level of the web map JSON\nhierarchy. In addition to this, it is also available within the\noperationalLayer and basemap objects.\n\nMany predefined spatial references have already been defined and are\navailable for use. A spatial reference can be defined using a well-known ID\n(WKID) or well-known text (WKT). The default tolerance and resolution values\nfor the associated coordinate system are used.\n\nAll operational layers in the map are drawn or requested in the spatial\nreference of the basemap layers.\n\nThe basemap defines the map spatial reference and tiling scheme.\n\nEach basemapLayer must be in the same spatial reference and tiling scheme.\n\nFor additional information on working with spatial references, and their\nassociated WKIDs, please refer to the ArcGIS REST API documentation which\ndiscusses this.{@linkhttps://developers.arcgis.com/web-map-specification/objects/spatialReference/}{@linkhttps://developers.arcgis.com/web-scene-specification/objects/spatialReference/}."
3710
+ "description": "The spatialReference object is located at the top level of the web map JSON\nhierarchy. In addition to this, it is also available within the\noperationalLayer and basemap objects.\n\nMany predefined spatial references have already been defined and are\navailable for use. A spatial reference can be defined using a well-known ID\n(WKID) or well-known text (WKT). The default tolerance and resolution values\nfor the associated coordinate system are used.\n\nAll operational layers in the map are drawn or requested in the spatial\nreference of the basemap layers.\n\nThe basemap defines the map spatial reference and tiling scheme.\n\nEach basemapLayer must be in the same spatial reference and tiling scheme.\n\nFor additional information on working with spatial references, and their\nassociated WKIDs, please refer to the ArcGIS REST API documentation which\ndiscusses this.\n\nSee{@linkhttps://developers.arcgis.com/web-map-specification/objects/spatialReference/}{@linkhttps://developers.arcgis.com/web-scene-specification/objects/spatialReference/}."
3715
3711
  },
3716
3712
  "esri.webmap.TiledImageServiceLayer.TiledImageServiceLayer": {
3717
- "description": "An ArcGIS Tiled Image Service layer displays map content from an ArcGIS\nServer Image service that has been cached (tiled).{@linkhttps://developers.arcgis.com/web-map-specification/objects/tiledImageServiceLayer/}{@linkhttps://developers.arcgis.com/web-scene-specification/objects/tiledImageServiceLayer/}."
3713
+ "description": "An ArcGIS Tiled Image Service layer displays map content from an ArcGIS\nServer Image service that has been cached (tiled).\n\nSee{@linkhttps://developers.arcgis.com/web-map-specification/objects/tiledImageServiceLayer/}{@linkhttps://developers.arcgis.com/web-scene-specification/objects/tiledImageServiceLayer/}."
3718
3714
  },
3719
3715
  "esri.webmap.TiledMapServiceLayer.TiledMapServiceLayer": {
3720
- "description": "An ArcGIS Tiled Map Service layer displays map content from an ArcGIS Server\nMap service that has been cached (tiled).{@linkhttps://developers.arcgis.com/web-map-specification/objects/tiledMapServiceLayer/}{@linkhttps://developers.arcgis.com/web-scene-specification/objects/tiledMapServiceLayer/}."
3716
+ "description": "An ArcGIS Tiled Map Service layer displays map content from an ArcGIS Server\nMap service that has been cached (tiled).\n\nSee{@linkhttps://developers.arcgis.com/web-map-specification/objects/tiledMapServiceLayer/}{@linkhttps://developers.arcgis.com/web-scene-specification/objects/tiledMapServiceLayer/}."
3721
3717
  },
3722
3718
  "esri.webmap.Type.Type": {
3723
- "description": "Types contain information about the combinations of attributes allowed for\nfeatures in the dataset. Each feature in the dataset can have a type,\nindicated in its typeIdField, which is used in LayerDefinition.{@linkhttps://developers.arcgis.com/web-map-specification/objects/type/}{@linkhttps://developers.arcgis.com/web-scene-specification/objects/type/}."
3719
+ "description": "Types contain information about the combinations of attributes allowed for\nfeatures in the dataset. Each feature in the dataset can have a type,\nindicated in its typeIdField, which is used in LayerDefinition.\n\nSee{@linkhttps://developers.arcgis.com/web-map-specification/objects/type/}{@linkhttps://developers.arcgis.com/web-scene-specification/objects/type/}."
3724
3720
  },
3725
3721
  "esri.webmap.VectorTileLayer.VectorTileLayer": {
3726
- "description": "A vector tile layer references a set of web-accessible vector tiles and the\ncorresponding style for how those tiles should be drawn.{@linkhttps://developers.arcgis.com/web-map-specification/objects/vectorTileLayer/}{@linkhttps://developers.arcgis.com/web-scene-specification/objects/vectorTileLayer/}."
3722
+ "description": "A vector tile layer references a set of web-accessible vector tiles and the\ncorresponding style for how those tiles should be drawn.\n\nSee{@linkhttps://developers.arcgis.com/web-map-specification/objects/vectorTileLayer/}{@linkhttps://developers.arcgis.com/web-scene-specification/objects/vectorTileLayer/}."
3727
3723
  },
3728
3724
  "esri.webmap.Viewpoint.Viewpoint": {
3729
- "description": "Describes a point of view for a 2D or 3D view. In a 2D view, the viewpoint is\ndetermined using a center point and scale value. In a 3D view, it is\ndetermined using a camera position. The Viewpoint can be bookmarked for later\nuse, or used for navigation purposes.{@linkhttps://developers.arcgis.com/web-map-specification/objects/viewpoint/}{@linkhttps://developers.arcgis.com/web-scene-specification/objects/viewpoint/}."
3725
+ "description": "Describes a point of view for a 2D or 3D view. In a 2D view, the viewpoint is\ndetermined using a center point and scale value. In a 3D view, it is\ndetermined using a camera position. The Viewpoint can be bookmarked for later\nuse, or used for navigation purposes.\n\nSee{@linkhttps://developers.arcgis.com/web-map-specification/objects/viewpoint/}{@linkhttps://developers.arcgis.com/web-scene-specification/objects/viewpoint/}."
3730
3726
  },
3731
3727
  "esri.webmap.WMSLayer.WMSLayer": {
3732
- "description": "A layer consuming a Web Map Service (WMS). The WMS specification is an\ninternational specification for serving and consuming dynamic maps on the\nweb. For additional information on publishing WMS services, please see the\nArcGIS Server help.{@linkhttps://developers.arcgis.com/web-map-specification/objects/wmsLayer/}."
3728
+ "description": "A layer consuming a Web Map Service (WMS). The WMS specification is an\ninternational specification for serving and consuming dynamic maps on the\nweb. For additional information on publishing WMS services, please see the\nArcGIS Server help.\n\nSee{@linkhttps://developers.arcgis.com/web-map-specification/objects/wmsLayer/}."
3733
3729
  },
3734
3730
  "esri.webmap.WebMap.WebMap": {
3735
- "description": "The web map data lists the basemap, operational layers, and bookmarks to be\nused in the web map. It also contains information about popup windows and\nlayer styling overrides to be used in the web map. A version property allows\nyou to supply the version of the web map JSON format being used.\n\nPart of the Esri web map specification. See{@linkhttp://resources.arcgis.com/en/help/arcgis-web-map-json/}.{@linkhttps://developers.arcgis.com/web-map-specification/objects/webmap/}."
3731
+ "description": "The web map data lists the basemap, operational layers, and bookmarks to be\nused in the web map. It also contains information about popup windows and\nlayer styling overrides to be used in the web map. A version property allows\nyou to supply the version of the web map JSON format being used.\n\nPart of the Esri web map specification. See{@linkhttp://resources.arcgis.com/en/help/arcgis-web-map-json/}. See{@linkhttps://developers.arcgis.com/web-map-specification/objects/webmap/}."
3736
3732
  },
3737
3733
  "esri.webmap.WebScene.WebScene": {
3738
- "description": "An Esri web scene.\n\nThe web scene is the core element of 3D mapping across the ArcGIS platform.\nIt defines the content, style, environment, and slides of your scene and it\ncan be shared across multiple ArcGIS web and desktop applications. Web scenes\ncan be created, published, and consumed in ArcGIS Pro and ArcGIS Online with\nthe Scene Viewer. The web scene is saved as a JSON document that can be\nconsumed by the ArcGIS API for JavaScript via the WebScene class to easily\ncreate compelling 3D applications.{@linkhttps://developers.arcgis.com/web-scene-specification/objects/webscene/}."
3734
+ "description": "An Esri web scene.\n\nThe web scene is the core element of 3D mapping across the ArcGIS platform.\nIt defines the content, style, environment, and slides of your scene and it\ncan be shared across multiple ArcGIS web and desktop applications. Web scenes\ncan be created, published, and consumed in ArcGIS Pro and ArcGIS Online with\nthe Scene Viewer. The web scene is saved as a JSON document that can be\nconsumed by the ArcGIS API for JavaScript via the WebScene class to easily\ncreate compelling 3D applications.\n\nSee{@linkhttps://developers.arcgis.com/web-scene-specification/objects/webscene/}."
3739
3735
  },
3740
3736
  "esri.webmap.WebTileLayer.WebTileLayer": {
3741
- "description": "A tile layer is a derived from a set of web-accessible tiles which reside on\na server. The tiles are accessed by a direct URL request from the web\nbrowser. Because the tiles in a tile layer are not available as a service,\nthey must be in a specific format for a web app such as the ArcGIS.com map\nviewer to display the layer on a map.{@linkhttps://developers.arcgis.com/web-map-specification/objects/tiledLayer/}{@linkhttps://developers.arcgis.com/web-scene-specification/objects/tiledLayer/}."
3737
+ "description": "A tile layer is a derived from a set of web-accessible tiles which reside on\na server. The tiles are accessed by a direct URL request from the web\nbrowser. Because the tiles in a tile layer are not available as a service,\nthey must be in a specific format for a web app such as the ArcGIS.com map\nviewer to display the layer on a map.\n\nSee{@linkhttps://developers.arcgis.com/web-map-specification/objects/tiledLayer/}{@linkhttps://developers.arcgis.com/web-scene-specification/objects/tiledLayer/}."
3742
3738
  },
3743
3739
  "esri.webmap._LayerBase.BlendMode": {
3744
3740
  "description": "Options for blending layers."
@@ -1 +1 @@
1
- import{ArgumentError}from"./ArgumentError.js";export class ArgumentMissingError extends ArgumentError{constructor(r,e){super(e||`Parameter '${r}' is required.`),this.name="ArgumentMissingError"}}
1
+ import{ArgumentError as r}from"./ArgumentError.js";export class ArgumentMissingError extends r{constructor(r,e){super(e||`Parameter '${r}' is required.`),this.name="ArgumentMissingError"}}
@@ -1 +1 @@
1
- import{ArgumentError}from"./ArgumentError.js";export class ArgumentOutOfRangeError extends ArgumentError{constructor(r,e){super(e||`Parameter '${r}' is out of range.`),this.name="ArgumentOutOfRangeError"}}
1
+ import{ArgumentError as r}from"./ArgumentError.js";export class ArgumentOutOfRangeError extends r{constructor(r,e){super(e||`Parameter '${r}' is out of range.`),this.name="ArgumentOutOfRangeError"}}
package/Entity.js CHANGED
@@ -1 +1 @@
1
- import{InitializableBase}from"./support/InitializableBase.js";import{generateUuid as generateId}from"./utilities/uuid.js";export{generateId};export class EntityBase extends InitializableBase{constructor(e){super(e),e&&(this._id=e.id)}get id(){return this._id||(this._id=generateId()),this._id}get itemType(){return this._itemType}toItemUri(){return`item://${encodeURIComponent(this.itemType)}/${encodeURIComponent(this.id)}`}_getSerializableProperties(){return{...super._getSerializableProperties(),id:{serializeModes:["initial","project"],deserialize:!1}}}}
1
+ import{InitializableBase as e}from"./support/InitializableBase.js";import{generateUuid as i}from"./utilities/uuid.js";export{i as generateId};export class EntityBase extends e{get id(){return this._id||(this._id=i()),this._id}get itemType(){return this._itemType}constructor(e){super(e),e&&(this._id=e.id)}toItemUri(){return`item://${encodeURIComponent(this.itemType)}/${encodeURIComponent(this.id)}`}_getSerializableProperties(){return{...super._getSerializableProperties(),id:{serializeModes:["initial","project"],deserialize:!1}}}}
package/FailureMode.d.ts CHANGED
@@ -2,4 +2,4 @@
2
2
  * Possible modes of failure when there is an error resolving or initializing an
3
3
  * item.
4
4
  */
5
- export declare type FailureMode = "error" | "warn" | "ignore";
5
+ export type FailureMode = "error" | "warn" | "ignore";
package/Hyperlink.js CHANGED
@@ -1 +1 @@
1
- import{__decorate}from"tslib";import{serializable,SerializableBase}from"./support/Serializable.js";import{checkArg}from"./utilities/checkArg.js";let Hyperlink=class extends SerializableBase{constructor(t){checkArg("properties",t).isNotMissing(),checkArg("properties.url",t.url).isNotMissing(),checkArg("properties.text",t.text).isNotMissing(),super(t)}get url(){return this._url}set url(t){this._url=t}get text(){return this._text}set text(t){this._text=t}get iconUrl(){return this._iconUrl}set iconUrl(t){this._iconUrl=t}get target(){return this._target}set target(t){this._target=t}get tooltip(){return this._tooltip}set tooltip(t){this._tooltip=t}_getSerializableProperties(){return{...super._getSerializableProperties(),url:"initial",text:"initial",iconUrl:"initial",target:"initial",tooltip:"initial"}}};Hyperlink=__decorate([serializable],Hyperlink);export{Hyperlink};
1
+ import{__decorate as t}from"tslib";import{serializable as i,SerializableBase as r}from"./support/Serializable.js";import{checkArg as e}from"./utilities/checkArg.js";let s=class extends r{get url(){return this._url}set url(t){this._url=t}get text(){return this._text}set text(t){this._text=t}get iconUrl(){return this._iconUrl}set iconUrl(t){this._iconUrl=t}get target(){return this._target}set target(t){this._target=t}get tooltip(){return this._tooltip}set tooltip(t){this._tooltip=t}constructor(t){e("properties",t).isNotMissing(),e("properties.url",t.url).isNotMissing(),e("properties.text",t.text).isNotMissing(),super(t)}_getSerializableProperties(){return{...super._getSerializableProperties(),url:"initial",text:"initial",iconUrl:"initial",target:"initial",tooltip:"initial"}}};s=t([i],s);export{s as Hyperlink};
@@ -13,9 +13,7 @@ export interface LanguageResourcesProperties extends EntityProperties {
13
13
  /**
14
14
  * The set of localized strings, indexed by unique key.
15
15
  */
16
- values?: {
17
- [key: string]: string;
18
- };
16
+ values?: Record<string, string>;
19
17
  }
20
18
  /**
21
19
  * A localized set of string resources.
@@ -1 +1 @@
1
- import{__decorate}from"tslib";import{ItemType}from"./ItemType.js";import{INVARIANT}from"./locale.js";import{serializable,SerializableBase}from"./support/Serializable.js";import{ObservableMap}from"./utilities/ObservableMap.js";import{generateUuid}from"./utilities/uuid.js";let LanguageResources=class extends SerializableBase{constructor(e){super(e),this._locale=INVARIANT,this._values=new ObservableMap,this._id=e?.id,e?.locale&&(this._locale=e.locale)}get id(){return this._id||(this._id=generateUuid()),this._id}get locale(){return this._locale}get values(){return this._values}get itemType(){return ItemType.LANGUAGE_RESOURCES}toItemUri(){return`item://${encodeURIComponent(this.itemType)}/${encodeURIComponent(this.id)}`}_getSerializableProperties(){return{...super._getSerializableProperties(),id:{serializeModes:["initial"],deserialize:!1},locale:{serializeModes:["initial"],deserialize:!1},values:{serializeModes:["initial"],serialize:()=>{const e={};for(const[i,s]of this.values.entries())e[i]=s;return e},deserialize:e=>{this._values.clear();for(const i of Object.keys(e))this._values.set(i,e[i])}}}}};LanguageResources=__decorate([serializable],LanguageResources);export{LanguageResources};
1
+ import{__decorate as e}from"tslib";import{ItemType as i}from"./ItemType.js";import{INVARIANT as t}from"./locale.js";import{serializable as s,SerializableBase as r}from"./support/Serializable.js";import{ObservableMap as l}from"./utilities/ObservableMap.js";import{generateUuid as o}from"./utilities/uuid.js";let a=class extends r{get id(){return this._id||(this._id=o()),this._id}get locale(){return this._locale}get values(){return this._values}get itemType(){return i.LANGUAGE_RESOURCES}constructor(e){super(e),this._locale=t,this._values=new l,this._id=e?.id,e?.locale&&(this._locale=e.locale)}toItemUri(){return`item://${encodeURIComponent(this.itemType)}/${encodeURIComponent(this.id)}`}_getSerializableProperties(){return{...super._getSerializableProperties(),id:{serializeModes:["initial"],deserialize:!1},locale:{serializeModes:["initial"],deserialize:!1},values:{serializeModes:["initial"],serialize:()=>{const e={};for(const[i,t]of this.values.entries())e[i]=t;return e},deserialize:e=>{this._values.clear();for(const i of Object.keys(e))this._values.set(i,e[i])}}}}};a=e([s],a);export{a as LanguageResources};
package/NotFoundError.js CHANGED
@@ -1 +1 @@
1
- import{format}from"./utilities/string.js";export class NotFoundError extends Error{constructor(r,...o){super(r&&format(r,...o)||"The requested resource does not exist or could not be found."),this.name="NotFoundError"}}
1
+ import{format as r}from"./utilities/string.js";export class NotFoundError extends Error{constructor(o,...e){super(o&&r(o,...e)||"The requested resource does not exist or could not be found."),this.name="NotFoundError"}}
package/PortalUri.js CHANGED
@@ -1 +1 @@
1
- import PortalItem from"@arcgis/core/portal/PortalItem";import{config}from"./config.js";import{checkArg}from"./utilities/checkArg.js";import{load}from"./utilities/esri.js";import{Uri}from"./utilities/uri.js";const portalUriPattern=/^portal:\/\/(?:([-\w][-.\w]*)\/)?([a-fA-F0-9]{32})$/;export class PortalUri{constructor(t){t&&this._parseUri(t)}toPortalItem(){const t=new PortalItem({id:this.itemId});if(this.portalId){if(!config.portals.has(this.portalId))throw new Error(`Portal with ID ${this.portalId} must be configured through @vertigis/arcgis-extensions/config.`);t.portal=config.portals.get(this.portalId)}return t}toString(){return this.portalId?`portal://${this.portalId}/${this.itemId}`:`portal://${this.itemId}`}toFullyQualifiedUri(t){const r=new PortalUri(this.toString());return r.portalId||(r.portalId=t),r}async fetchData(t){const r=this.toPortalItem();return await load(r),r.fetchData(t)}_parseUri(t){const r=t.match(portalUriPattern);if(!r)throw new Error("Invalid portal item URI.");this.itemId=r[2].toLowerCase(),this.portalId=r[1]||void 0}}export function isPortalUri(t){return"string"==typeof t&&!!t.match(portalUriPattern)}export function isFullyQualifiedPortalUri(t){const r=new Uri(t);return isPortalUri(t)&&""!==r.path&&""!==r.host}export function toFullyQualifiedPortalUri(t,r){return checkArg("uri",t).isNotMissing().isNotEmpty(),new PortalUri(t).toFullyQualifiedUri(r).toString()}
1
+ import t from"@arcgis/core/portal/PortalItem";import{config as r}from"./config.js";import{checkArg as i}from"./utilities/checkArg.js";import{load as o}from"./utilities/esri.js";import{Uri as s}from"./utilities/uri.js";const a=/^portal:\/\/(?:([-\w][-.\w]*)\/)?([a-fA-F0-9]{32})$/;export class PortalUri{constructor(t){t&&this._parseUri(t)}toPortalItem(){const i=new t({id:this.itemId});if(this.portalId){if(!r.portals.has(this.portalId))throw new Error(`Portal with ID ${this.portalId} must be configured through @vertigis/arcgis-extensions/config.`);i.portal=r.portals.get(this.portalId)}return i}toString(){return this.portalId?`portal://${this.portalId}/${this.itemId}`:`portal://${this.itemId}`}toFullyQualifiedUri(t){const r=new PortalUri(this.toString());return r.portalId||(r.portalId=t),r}async fetchData(t){const r=this.toPortalItem();return await o(r),r.fetchData(t)}_parseUri(t){const r=t.match(a);if(!r)throw new Error("Invalid portal item URI.");this.itemId=r[2].toLowerCase(),this.portalId=r[1]||void 0}}export function isPortalUri(t){return"string"==typeof t&&!!t.match(a)}export function isFullyQualifiedPortalUri(t){const r=new s(t);return isPortalUri(t)&&""!==r.path&&""!==r.host}export function toFullyQualifiedPortalUri(t,r){return i("uri",t).isNotMissing().isNotEmpty(),new PortalUri(t).toFullyQualifiedUri(r).toString()}
@@ -1 +1 @@
1
- import{__decorate}from"tslib";import AttachmentQuery from"@arcgis/core/rest/support/AttachmentQuery.js";import{InvalidOperationError}from"../InvalidOperationError.js";import{toAttachment}from"../data/Attachment.js";import{FeatureSaveError}from"../data/FeatureSaveError.js";import{PopupTemplateFeatureSettings}from"../mapping/support/PopupTemplateFeatureSettings.js";import{getGlobalIdField,isGlobalIdUsed}from"../mapping/support/layers.js";import{DefaultArcGISRequestHelper}from"../support/ArcGISRequestHelper.js";import{cancelify}from"../support/Cancellable.js";import{serializable}from"../support/Serializable.js";import{ArcGISRelationshipCollection}from"../support/_ArcGISRelationshipCollection.js";import{executeQuery}from"../support/_query.js";import{ReadOnlyCollection}from"../utilities/ReadOnlyCollection.js";import{Collection}from"../utilities/collection.js";import{isArcGISServiceTableExtension}from"../utilities/extensions.js";import{isFeatureLayer,isMapImageSublayer,isSubtypeGroupLayer}from"../utilities/layers.js";import{isNumeric,parse}from"../utilities/number.js";import{toGraphic}from"./Feature.js";import{TableExtension,TableSchema}from"./_TableExtension.js";import{addAttachment,deleteAttachments,supportsAttachmentEditing as layerSupportsAttachmentEditing}from"./support/attachments.js";const ERR_SCHEMA_READ_ONLY="This schema property is read-only.";let ArcGISServiceTableExtension=class extends TableExtension{get requestHelper(){return this._requestHelper||(this._requestHelper=new DefaultArcGISRequestHelper),this._requestHelper}set requestHelper(e){this._requestHelper=e}get capabilities(){const e=layerSupportsAttachmentEditing(this.table);return this.table?.capabilities?.operations?{...this.table.capabilities.operations,supportsAttachmentEditing:e}:{...super.capabilities,supportsAttachmentEditing:e}}get table(){return super.table}async _getAttachments(e){if(!this.table?.capabilities?.data?.supportsAttachment)return[];const t=+e.primaryKey,r=new AttachmentQuery({objectIds:[t]}),a=await this.table.queryAttachments(r);return a?.[t]?.length?a[t].map((e=>toAttachment(e,e.url))):[]}async _addAttachment(e,t){return addAttachment(e,this.table,t,{attachmentTypes:this.attachmentTypes})}async _deleteAttachments(e,t){return deleteAttachments(e,this.table,t)}get _layerUrl(){return isNumeric(this.table.layerId)?`${this.table.url}/${this.table.layerId}`:this.table.url}_getFeatures(e,t){const r=this.table.createQuery();return r.objectIds=e.map((e=>parse(e))),r.where=void 0,r.outFields=t.outFields,r.returnGeometry=t.returnGeometry,executeQuery(r,this,this.table,t.cancelToken)}async _addFeatures(e,t){const r=Array.from(e);if(0===r.length)return;const a=await this._applyEdits({addFeatures:r.map(toGraphic),updateFeatures:[],deleteFeatures:[]});if(!a.addFeatureResults||a.addFeatureResults.length!==r.length)throw new FeatureSaveError("Received malformed response from server while saving feature(s).");let s;if(a.addFeatureResults.forEach(((e,t)=>{const{objectId:a,globalId:i,error:l}=e,o=r[t];if(l){s=s||new FeatureSaveError("Errors encountered when adding features.");const{title:r}=o;s.errors.set(`${r}-${t}`,new Error(`Failed to add feature '${r}'. ${e.error.name} : ${e.error.message}`))}else{const{primaryKeyField:e}=o.schema;o.attributes.set(e,a);const t=getGlobalIdField(this.table);t&&i&&o.attributes.set(t,i)}})),s)throw s}async _updateFeatures(e,t){const r=Array.from(e);if(0===r.length)return;const a=await this._applyEdits({addFeatures:[],updateFeatures:r.map(toGraphic),deleteFeatures:[]});if(!a.updateFeatureResults||a.updateFeatureResults.length!==r.length)throw new FeatureSaveError("Received malformed response from server while saving feature(s).");let s;if(a.updateFeatureResults.forEach(((e,t)=>{if(e.error){s=s||new FeatureSaveError("Errors encountered when updating features.");const{primaryKey:a}=r[t];s.errors.set(a,new Error(`Failed to update feature with id ${a}. ${e.error.message}`))}})),s)throw s}async _deleteFeatures(e,t){if(0===e.length)return;const r=await this._applyEdits({addFeatures:[],updateFeatures:[],deleteFeatures:e.map((e=>({objectId:e})))});if(!r.deleteFeatureResults)throw new FeatureSaveError("Received malformed response from server while saving feature(s).");let a;if(r.deleteFeatureResults.forEach(((t,r)=>{if(t.error){a=a||new FeatureSaveError("Errors encountered when deleting features.");const s=e[r];a.errors.set(s,new Error(`Failed to delete feature with id ${s}. ${t.error.message}`))}})),a)throw a}async _onInitialize(){await super._onInitialize(),await this.relationships.initialize()}_isSupportedTable(e){return!e.loaded||e.isTable}_createFeatureSettings(){return new ArcGISServiceTableFeatureSettings(this)}_createRelationships(){return new RelationshipCollection(this)}_createSchema(){return new ArcGISServiceTableSchema(this)}_getSerializableProperties(){const e=super._getSerializableProperties();return{...e,attachmentTypes:["initial"],table:{...this._toPropertyDef(e.table),default:{$tableType:"ArcGISServiceTable"}},requestHelper:{serialize:!1}}}async _applyEdits(e,t={}){const r=isGlobalIdUsed(this.table,e),a=this.table.applyEdits(e,{globalIdUsed:r}),s=await cancelify(a,t.cancelToken);if(!s)throw new FeatureSaveError("Received malformed response from server while saving feature(s).");return s}};ArcGISServiceTableExtension=__decorate([serializable],ArcGISServiceTableExtension);export{ArcGISServiceTableExtension};class TypeCollection extends ReadOnlyCollection{constructor(e){if(super(),e.table)this._onTableResolved(e.table);else{this._collection=new Collection;const t=e.watch("table",(()=>{this._onTableResolved(e.table),t.remove()}),!0)}}_onTableResolved(e){this._collection=new Collection(e.types)}}let ArcGISServiceTableSchema=class extends TableSchema{constructor(e){super(e),this._typeCollection=new TypeCollection(e),this._bindSettingToTableProperty("displayField"),this._bindSettingToTableProperty("typeIdField")}get types(){return this._typeCollection}_setSetting(e,t){if(this._tableBindings.has(e))throw new InvalidOperationError(ERR_SCHEMA_READ_ONLY);super._setSetting(e,t)}_createFieldCollection(){return new ReadOnlyCollection(super._createFieldCollection())}};ArcGISServiceTableSchema=__decorate([serializable],ArcGISServiceTableSchema);let ArcGISServiceTableFeatureSettings=class extends PopupTemplateFeatureSettings{};ArcGISServiceTableFeatureSettings=__decorate([serializable],ArcGISServiceTableFeatureSettings);class RelationshipCollection extends ArcGISRelationshipCollection{get _sourceUrl(){if(this._source.table&&this._source.table.url)return isNumeric(this._source.table.layerId)?`${this._source.table.url}/${this._source.table.layerId}`:this._source.table.url}get _sourceLayerId(){return this._source.table?.layerId}_findRelatedSource(e){if(!this._source.mapExtension||!this._source.table||!this._source.table.url)return;const t=this._source.mapExtension.tableExtensions.initializedItems.find((t=>isArcGISServiceTableExtension(t)&&t.table.url===this._source.table.url&&t.table.layerId===e));if(t)return t;for(const t of this._source.mapExtension.allLayerExtensions.initializedItems.toArray()){const r=t.allSublayerExtensions.initializedItems.find((t=>isMapImageSublayer(t.sublayer)&&t.sublayer.layer.url===this._source.table.url&&t.sublayer.id===e));if(r)return r}return this._source.mapExtension.allLayerExtensions.initializedItems.find((t=>(isFeatureLayer(t.layer)||isSubtypeGroupLayer(t.layer))&&t.layer.url===this._source.table.url&&t.layer.layerId===e))}}
1
+ import{__decorate as e}from"tslib";import t from"@arcgis/core/rest/support/AttachmentQuery.js";import{InvalidOperationError as r}from"../InvalidOperationError.js";import{toAttachment as s}from"../data/Attachment.js";import{FeatureSaveError as a}from"../data/FeatureSaveError.js";import{PopupTemplateFeatureSettings as i}from"../mapping/support/PopupTemplateFeatureSettings.js";import{getGlobalIdField as l,isGlobalIdUsed as o}from"../mapping/support/layers.js";import{DefaultArcGISRequestHelper as n}from"../support/ArcGISRequestHelper.js";import{cancelify as u}from"../support/Cancellable.js";import{serializable as p}from"../support/Serializable.js";import{ArcGISRelationshipCollection as c}from"../support/_ArcGISRelationshipCollection.js";import{executeQuery as d}from"../support/_query.js";import{ReadOnlyCollection as h}from"../utilities/ReadOnlyCollection.js";import{Collection as m}from"../utilities/collection.js";import{isArcGISServiceTableExtension as b}from"../utilities/extensions.js";import{isFeatureLayer as f,isMapImageSublayer as y,isSubtypeGroupLayer as _}from"../utilities/layers.js";import{isNumeric as w,parse as g}from"../utilities/number.js";import{toGraphic as F}from"./Feature.js";import{TableExtension as E,TableSchema as I}from"./_TableExtension.js";import{addAttachment as j,deleteAttachments as v,supportsAttachmentEditing as R}from"./support/attachments.js";let T=class extends E{get requestHelper(){return this._requestHelper||(this._requestHelper=new n),this._requestHelper}set requestHelper(e){this._requestHelper=e}get capabilities(){const e=R(this.table);return this.table?.capabilities?.operations?{...this.table.capabilities.operations,supportsAttachmentEditing:e}:{...super.capabilities,supportsAttachmentEditing:e}}get table(){return super.table}async _getAttachments(e){if(!this.table?.capabilities?.data?.supportsAttachment)return[];const r=+e.primaryKey,a=new t({objectIds:[r]}),i=await this.table.queryAttachments(a);return i?.[r]?.length?i[r].map((e=>s(e,e.url))):[]}async _addAttachment(e,t){return j(e,this.table,t,{attachmentTypes:this.attachmentTypes})}async _deleteAttachments(e,t){return v(e,this.table,t)}get _layerUrl(){return w(this.table.layerId)?`${this.table.url}/${this.table.layerId}`:this.table.url}_getFeatures(e,t){const r=this.table.createQuery();return r.objectIds=e.map((e=>g(e))),r.where=void 0,r.outFields=t.outFields,r.returnGeometry=t.returnGeometry,d(r,this,this.table,t.cancelToken)}async _addFeatures(e,t){const r=Array.from(e);if(0===r.length)return;const s=await this._applyEdits({addFeatures:r.map(F),updateFeatures:[],deleteFeatures:[]});if(!s.addFeatureResults||s.addFeatureResults.length!==r.length)throw new a("Received malformed response from server while saving feature(s).");let i;if(s.addFeatureResults.forEach(((e,t)=>{const{objectId:s,globalId:o,error:n}=e,u=r[t];if(n){i=i||new a("Errors encountered when adding features.");const{title:r}=u;i.errors.set(`${r}-${t}`,new Error(`Failed to add feature '${r}'. ${e.error.name} : ${e.error.message}`))}else{const{primaryKeyField:e}=u.schema;u.attributes.set(e,s);const t=l(this.table);t&&o&&u.attributes.set(t,o)}})),i)throw i}async _updateFeatures(e,t){const r=Array.from(e);if(0===r.length)return;const s=await this._applyEdits({addFeatures:[],updateFeatures:r.map(F),deleteFeatures:[]});if(!s.updateFeatureResults||s.updateFeatureResults.length!==r.length)throw new a("Received malformed response from server while saving feature(s).");let i;if(s.updateFeatureResults.forEach(((e,t)=>{if(e.error){i=i||new a("Errors encountered when updating features.");const{primaryKey:s}=r[t];i.errors.set(s,new Error(`Failed to update feature with id ${s}. ${e.error.message}`))}})),i)throw i}async _deleteFeatures(e,t){if(0===e.length)return;const r=await this._applyEdits({addFeatures:[],updateFeatures:[],deleteFeatures:e.map((e=>({objectId:e})))});if(!r.deleteFeatureResults)throw new a("Received malformed response from server while saving feature(s).");let s;if(r.deleteFeatureResults.forEach(((t,r)=>{if(t.error){s=s||new a("Errors encountered when deleting features.");const i=e[r];s.errors.set(i,new Error(`Failed to delete feature with id ${i}. ${t.error.message}`))}})),s)throw s}async _onInitialize(){await super._onInitialize(),await this.relationships.initialize()}_isSupportedTable(e){return!e.loaded||e.isTable}_createFeatureSettings(){return new A(this)}_createRelationships(){return new $(this)}_createSchema(){return new x(this)}_getSerializableProperties(){const e=super._getSerializableProperties();return{...e,attachmentTypes:["initial"],table:{...this._toPropertyDef(e.table),default:{$tableType:"ArcGISServiceTable"}},requestHelper:{serialize:!1}}}async _applyEdits(e,t={}){const r=o(this.table,e),s=this.table.applyEdits(e,{globalIdUsed:r}),i=await u(s,t.cancelToken);if(!i)throw new a("Received malformed response from server while saving feature(s).");return i}};T=e([p],T);export{T as ArcGISServiceTableExtension};class S extends h{constructor(e){if(super(),e.table)this._onTableResolved(e.table);else{this._collection=new m;const t=e.watch("table",(()=>{this._onTableResolved(e.table),t.remove()}),!0)}}_onTableResolved(e){this._collection=new m(e.types)}}let x=class extends I{constructor(e){super(e),this._typeCollection=new S(e),this._bindSettingToTableProperty("displayField"),this._bindSettingToTableProperty("typeIdField")}get types(){return this._typeCollection}_setSetting(e,t){if(this._tableBindings.has(e))throw new r("This schema property is read-only.");super._setSetting(e,t)}_createFieldCollection(){return new h(super._createFieldCollection())}};x=e([p],x);let A=class extends i{};A=e([p],A);class $ extends c{get _sourceUrl(){if(this._source.table?.url)return w(this._source.table.layerId)?`${this._source.table.url}/${this._source.table.layerId}`:this._source.table.url}get _sourceLayerId(){return this._source.table?.layerId}_findRelatedSource(e){if(!this._source.mapExtension||!this._source.table||!this._source.table.url)return;const t=this._source.mapExtension.tableExtensions.initializedItems.find((t=>b(t)&&t.table.url===this._source.table.url&&t.table.layerId===e));if(t)return t;for(const t of this._source.mapExtension.allLayerExtensions.initializedItems.toArray()){const r=t.allSublayerExtensions.initializedItems.find((t=>y(t.sublayer)&&t.sublayer.layer.url===this._source.table.url&&t.sublayer.id===e));if(r)return r}return this._source.mapExtension.allLayerExtensions.initializedItems.find((t=>(f(t.layer)||_(t.layer))&&t.layer.url===this._source.table.url&&t.layer.layerId===e))}}
@@ -1 +1 @@
1
- import{__decorate}from"tslib";import{EntityBase}from"../Entity.js";import{ItemType}from"../ItemType.js";import{serializable}from"../support/Serializable.js";let Attachment=class extends EntityBase{constructor(){super(...arguments),this._itemType=ItemType.ATTACHMENT}_getSerializableProperties(){return{...super._getSerializableProperties(),url:"initial",contentType:"initial",size:"initial",title:"initial"}}};Attachment=__decorate([serializable],Attachment);export{Attachment};export function toAttachment(t,e){return new Attachment({id:t.id.toString(),contentType:t.contentType,size:t.size,title:t.name,url:t.url??`${e}/${t.id}`})}
1
+ import{__decorate as t}from"tslib";import{EntityBase as e}from"../Entity.js";import{ItemType as i}from"../ItemType.js";import{serializable as r}from"../support/Serializable.js";let n=class extends e{constructor(){super(...arguments),this._itemType=i.ATTACHMENT}_getSerializableProperties(){return{...super._getSerializableProperties(),url:"initial",contentType:"initial",size:"initial",title:"initial"}}};n=t([r],n);export{n as Attachment};export function toAttachment(t,e){return new n({id:t.id.toString(),contentType:t.contentType,size:t.size,title:t.name,url:t.url??`${e}/${t.id}`})}
package/data/Feature.js CHANGED
@@ -1 +1 @@
1
- import{__decorate}from"tslib";import Graphic from"@arcgis/core/Graphic";import*as Arcade from"@arcgis/core/arcade/arcade";import{EntityBase}from"../Entity.js";import{Hyperlink}from"../Hyperlink.js";import{InvalidOperationError}from"../InvalidOperationError.js";import{ItemType}from"../ItemType.js";import{toEsriApiGeometry,toPortalGeometry}from"../portal/Geometry.js";import{serializable}from"../support/Serializable.js";import{MapTransformCollection}from"../utilities/MapTransformCollection.js";import{ObservableMap}from"../utilities/ObservableMap.js";import{ReadOnlyMap}from"../utilities/ReadOnlyMap.js";import{arcadeScriptUsesGeometry,isArcadeScriptAsync,runArcadeExpression,runAsyncArcadeExpression}from"../utilities/arcade.js";import{flatten,groupBy}from"../utilities/array.js";import{checkArg}from"../utilities/checkArg.js";import{Collection,compare}from"../utilities/collection.js";import{parse as parseDate,esriFormatToGeocortexFormat}from"../utilities/date.js";import{isCodedValueDomain}from"../utilities/esri.js";import{some,map as mapIterable,concat,forEach,find}from"../utilities/iterable.js";import{getLogger}from"../utilities/log.js";import{parse as parseNumber,NumberFormat}from"../utilities/number.js";import{map as promiseMap}from"../utilities/promise.js";import{format as formatString}from"../utilities/string.js";import{onCollectionPropertyChange}from"../utilities/watch.js";import{FeatureSettings}from"./FeatureSettings.js";import{fieldWithArcadeXRegex,fieldWithRelationshipRegex,Schema}from"./Schema.js";const log=getLogger("geocortex.api.data.Feature");export const SCORE_FIELD="_score";export const SCORE_FIELD_ORIGINAL="_score_original";let Feature=class extends EntityBase{constructor(e){super(e),this._itemType=ItemType.FEATURE,this._expressionFieldValues=new ObservableMap,this._expressionValuesUpdatePending=!1,this._attachmentsInitialized=!1,this._expressionsInitialized=!1,this._initializedRelationships=new WeakSet,this.settings=new FeatureSettings,this.settings._setFeature(this),this.schema=new Schema,this.schema._featureSettings=this.settings,this.attachments=new Collection,this.attributes=new ObservableMap,this._relatedFeatures=new ObservableMap,this.expressionFieldValues=new ExpressionFieldsValuesImpl(this._expressionFieldValues,this),onCollectionPropertyChange(this,"source.relationships",(()=>{this.notifyChange("relatedFeaturesInitialized")}),!0),this.settings.watch("popupTemplate",((e,t)=>{e!==t&&(this._expressionsInitialized=!1,this.notifyChange("expressionsInitialized"))}),!0)}get geometry(){return this._geometry}set geometry(e){this.notifyChange("geometryType"),this._geometry=toEsriApiGeometry(e),this.schema.spatialReference=this._geometry?.spatialReference}get geometryType(){return this.geometry?this.geometry.type:void 0}get source(){return this._source}set source(e){this._source&&this.settings.parent===this._source.featureSettings&&(this.settings.parent=void 0),this._source&&this.schema.parent===this._source.schema&&(this.schema.parent=void 0),this._source=e,this.settings.parent||(this.settings.parent=e?e.featureSettings:void 0),this.schema.parent||(this.schema.parent=e?e.schema:void 0),this.notifyChange("attachmentsInitialized"),this.notifyChange("relatedFeaturesInitialized")}get primaryKey(){const e=this.attributes.get(this.schema.primaryKeyField);return null!=e?`${e}`:void 0}get hasGlobalId(){return!!this.schema.fields.find((e=>"global-id"===e.type))}get globalId(){const e=this.schema.fields.find((e=>"global-id"===e.type));return e?this.attributes.get(e.name):void 0}set globalId(e){const t=this.schema.fields.find((e=>"global-id"===e.type));if(!t)throw new InvalidOperationError("Cannot set global ID on feature -- no global ID field.");this.attributes.set(t.name,e)}get presentableAttributes(){return this._presentableAttributes=this._presentableAttributes||new PresentableAttributesImpl(this),this._presentableAttributes}get title(){return this.format(this._title||"")}get description(){return this.format(this._description)}get hyperlinks(){return this._hyperlinks||(this._hyperlinks=new HyperlinksCollection(this))}get relatedFeatures(){return this._relatedFeatures}get type(){if(this.schema.typeIdField&&this.attributes.has(this.schema.typeIdField)){const e=this.attributes.get(this.schema.typeIdField);return this.schema.types.find((t=>t.id===e))}}get attachmentsInitialized(){return!this.source||this._attachmentsInitialized}get relatedFeaturesInitialized(){return!this.source||this.source.relationships.every((e=>this._initializedRelationships.has(e)))}get expressionsInitialized(){return!this.settings.popupTemplate||!this.settings.popupTemplate.expressionInfos?.length||this._expressionsInitialized}get _hydrationStatus(){return this._featureHydrationStatus?this._featureHydrationStatus:this.source?.capabilities?.supportsQuery&&1===this.attributes.size&&void 0!==this.primaryKey?"dehydrated":"hydrated"}set _hydrationStatus(e){this._featureHydrationStatus=e}get _key(){return`${this.source?.id}//${this.primaryKey??this.globalId??this.id}`}get _title(){let e;return this.settings.popupTemplate&&(e="function"==typeof this.settings.popupTemplate.title?this.settings.popupTemplate.title():this.settings.popupTemplate.title),e||this.schema.displayField&&this.presentableAttributes.get(this.schema.displayField)||""}get _description(){if(this.settings.popupTemplate?.content){if("string"==typeof this.settings.popupTemplate.content)return this.settings.popupTemplate.content;if(Array.isArray(this.settings.popupTemplate.content)){const e=this.settings.popupTemplate.content.find((e=>"text"===e.type));if(e)return e.text}}return""}format(e,...t){let s="string"==typeof e?{format:e}:e;checkArg("options",s).isNotMissing();const{format:i}=s;checkArg("format",i).isNotMissing();let r=s.format.replace(escapedBraceRegex,escapedBracePlaceholder);return r=r.replace(fieldTokenRegex,((e,t,i,r,a)=>formatAttribute(this,t||i,r,{...s,format:a?`{0:${a}}`:"{0}"}))),r=r.replace(escapedBracePlaceholderRegex,"{{"),s={...s},s.format=r,formatString(s,...t)}clearExpressionInfos(){this._expressionFieldValues.clear()}async fetchExpressionInfos(e=!1){const{expressionInfos:t}=this.settings.popupTemplate??{};if(t){if(await Promise.all(t.map((async e=>{try{const t=this.source?.layer??this.source?.sublayer;let s=this.source?.mapExtension;if(!s){const e=this.source?.layerExtension;s=e?.mapExtension}this._expressionFieldValues.set(e.name,await runAsyncArcadeExpression(e.expression,{layer:t,map:s?.map,feature:this,spatialReference:this.schema.spatialReference}))}catch(t){t instanceof Error&&log.error({message:"Error evaluating expression '{0}': {1}.",error:t},e.name,t.message),this._expressionFieldValues.set(e.name,invalidRelationshipOrExpression)}}))),e)return this.attributes.on("change",(async e=>{this._expressionValuesUpdatePending||(this._expressionValuesUpdatePending=!0,setTimeout((async()=>{this._expressionValuesUpdatePending=!1,await this.fetchExpressionInfos()}),0))}));this._expressionsInitialized=!0,this.notifyChange("expressionsInitialized")}}async fetchRelatedFeatures(e,t){if(!this.source)return;let s=[];if(e){const t=new Set(Array.isArray(e)?e:[e]);for(const e of t){const t="string"==typeof e?this.source.relationships.find((t=>t.id===e)):e;if(!t||!this.source.relationships.includes(t))throw new InvalidOperationError("Relationship not found in feature source.");s.push(t)}}else s=this.source.relationships.toArray();const i=await promiseMap(s,(async e=>[e,await(async()=>{const s=await e.getRelatedFeatures(this,t);return this._initializedRelationships.add(e),s})()]));for(const e of i)this._relatedFeatures.set(e[0],e[1]);this.notifyChange("relatedFeaturesInitialized")}async fetchAttachments(){if(this.source){const e=await this.source.getAttachments(this);compare(this.attachments,e,{equals:(e,t)=>e.id===t.id,onMissing:(e,t)=>this.attachments.remove(e),onNew:(e,t)=>{this.attachments.add(e)},onMatch:(e,t,s,i)=>{this.attachments.splice(s,1,t)}}),this._attachmentsInitialized=!0,this.notifyChange("attachmentsInitialized")}}async addAttachment(e){return this.source?.addAttachment(this,e)}async deleteAttachments(e){return this.source?.deleteAttachments(this,e)}_getSerializableProperties(){return{...super._getSerializableProperties(),attributes:{serializeModes:["project"],serialize:e=>{const t={};if("project"===e&&this.primaryKey&&this.source?.capabilities.supportsQuery)t[this.schema.primaryKeyField]=this.primaryKey;else for(const[e,s]of this.attributes.entries())t[e]=s;return t},deserialize:e=>{if(this.attributes.clear(),e instanceof Map)e.forEach(((e,t)=>{this.attributes.set(t,e)}));else for(const[t,s]of Object.entries(e))this.attributes.set(t,s)}},geometry:{serializeModes:["project"],serialize:e=>"project"===e&&this.source?.capabilities.supportsQuery?this.getDefault("geometry"):toPortalGeometry(this.geometry),deserialize:e=>this.geometry=toEsriApiGeometry(e)},settings:{serializeModes:["project"],serialize:e=>"project"===e&&this.source?.capabilities.supportsQuery?this.getDefault("settings"):this.settings.toJSON(e)},schema:{serializeModes:["project"],serialize:e=>"project"===e&&this.source?.capabilities.supportsQuery?this.getDefault("schema"):this.schema.toJSON(e)},source:["project"]}}_watchProperty(e,t,s,i){if("title"===e||"description"===e){const r=super._watchProperty(e,t,s,i),a="title"===e?"settings.popupTemplate.title":"settings.popupTemplate.content",o=this.watch(a,(()=>{this.notifyChange(e)})),n=this.presentableAttributes.on("change",(()=>{this.notifyChange(e)}));return{remove(){r.remove(),o.remove(),n.remove()}}}return super._watchProperty(e,t,s,i)}async _onInitialize(){const e=this._findRelationshipIds(this._title,this._description),t=this.source?this.source.relationships.map((e=>e.id)).toArray():[],s=[];for(const i of e)t.includes(i)?s.push(this.fetchRelatedFeatures(i)):log.error("Could not find relationship '{0}' referenced in feature title or description.",i);await Promise.all(s)}_findRelationshipIds(...e){const t=[];for(const s of e){let e;const i=s.replace(escapedBraceRegex,escapedBracePlaceholder);for(;e=relationshipIdRegex.exec(i),null!==e;){const s=e[0];t.includes(s)||t.push(e[1])}}return t}};Feature=__decorate([serializable],Feature);export{Feature};export function toFeature(e,t){const s=new Feature(t);if(e.attributes)for(const t of Object.keys(e.attributes))s.attributes.set(t,e.attributes[t]);return s.geometry=e.geometry,e.popupTemplate&&(s.settings.popupTemplate=e.popupTemplate),s}export function toGraphic(e){const t=new Graphic;t.attributes={};for(const s of e.attributes.keys())t.attributes[s]=e.attributes.get(s);return e.source?.layer&&(t.layer=e.source?.layer),t.geometry=e.geometry,e.settings.popupTemplate&&(t.popupTemplate=e.settings.popupTemplate),t}const ERR_PRESENTABLE_ATTRIBUTES_READONLY="Presentable attributes are read-only.",ERR_HYPERLINK_READONLY="Feature hyperlinks are read-only. Modify the feature's hyperlink templates instead.";class ExpressionFieldsValuesImpl extends ReadOnlyMap{constructor(e,t){super(e),this._feature=t}get(e){if(!super.has(e)){const{spatialReference:t}=this._feature.schema,s=this._feature.settings.popupTemplate?.expressionInfos?.find((t=>t.name===e));if(!s)return;(async()=>{try{if(isArcadeScriptAsync(s.expression,t)){const i=this._feature.source?.layer??this._feature.source?.sublayer;let r=this._feature.source?.mapExtension;if(!r){const e=this._feature.source?.layerExtension;r=e?.mapExtension}this._originalMap.set(e,await runAsyncArcadeExpression(s.expression,{feature:this._feature,layer:i,map:r?.map,spatialReference:t}))}else arcadeScriptUsesGeometry(s.expression,t)&&await Arcade.enableGeometrySupport(),this._originalMap.set(e,runArcadeExpression(s.expression,{feature:this._feature,spatialReference:t}))}catch(t){t instanceof Error&&log.error({message:"Error evaluating expression '{0}': {1}.",error:t},e,t.message),this._originalMap.set(e,invalidRelationshipOrExpression)}})()}return super.get(e)}}class PresentableAttributesImpl extends ReadOnlyMap{constructor(e){super(new ObservableMap),this._feature=e}get size(){return this._feature.attributes.size+this._feature.schema.fields._expressionFieldsLength}clear(){throw new InvalidOperationError(ERR_PRESENTABLE_ATTRIBUTES_READONLY)}delete(e){throw new InvalidOperationError(ERR_PRESENTABLE_ATTRIBUTES_READONLY)}forEach(e,t){checkArg("callback",e).isNotMissing();for(const s of this.keys())e.call(t,this.get(s),s,this)}get(e){const t=this._getFieldExtensionFormat(e);return this._formatAttribute(e,t)}has(e){return some(this.keys(),(t=>t===e))}set(...e){throw new InvalidOperationError(ERR_PRESENTABLE_ATTRIBUTES_READONLY)}*entries(){yield*mapIterable(this.keys(),(e=>[e,this.get(e)]))}*keys(){const e=this._feature.schema.fields.expressionFields.map((e=>e.name)),t=[];this._feature.source?.relationships&&this._feature.source.relationships.filter((e=>"one-to-one"===e.cardinality||"many-to-one"===e.cardinality)).forEach((e=>t.push(...e.relatedSource.schema.fields.map((t=>`relationships/${e.id}/${t.name}`)).toArray()))),yield*concat(this._feature.attributes.keys(),e.toArray(),t)}*values(){yield*mapIterable(this.keys(),(e=>this.get(e)))}[(Symbol.toStringTag,Symbol.iterator)](){return this.entries()}toJSON(){return Array.from(this.entries())}on(e,t){if(checkArg("callback",t).isNotMissing(),!this._numObservers){const e=new Map,t=new Set,s=()=>{t.forEach((e=>e.remove())),t.clear()},i=()=>{const t={added:Array.from(this.entries()).filter((t=>t[1]!==e.get(t[0]))),removed:Array.from(e.entries()).filter((e=>!this.has(e[0])||e[1]!==this.get(e[0]))),target:this};(t.added.length||t.removed.length)&&(this.emit("change",t),r())},r=()=>{e.clear(),s(),forEach(this.keys(),(s=>{const r=this._getFieldExtension(s);let a="{0}";if(r){const e=r.watch("format",(()=>{i()}));t.add(e),r.format&&(a=r.format)}e.set(s,this._formatAttribute(s,a))}))};r();const a=this._feature.attributes.on("change",(()=>{i()})),o=this._feature.schema.fieldExtensions.on("change",(()=>{i()})),n=this._feature.settings.formatSettings.watch(["numberFormat","dateFormat","locale"],(()=>{i()})),l=this._feature.expressionFieldValues.on("change",(()=>{i()})),p=this._feature.schema.fields.on("change",(e=>{(e.added?.some((e=>null!==e.name.match(fieldWithArcadeXRegex)))||e.removed?.some((e=>null!==e.name.match(fieldWithArcadeXRegex))))&&i()})),h=this._feature.settings.watch("popupTemplate",(()=>{i()}));this._onAllObserversRemoved=()=>{l.remove(),a.remove(),o.remove(),p.remove(),n.remove(),h.remove(),e.clear(),s()}}const s=super.on("change",t);return this._numObservers++,{remove:()=>{s.remove(),this._numObservers--,this._numObservers||this._onAllObserversRemoved()}}}watch(e,t){if("size"===e){const e=this._feature.attributes.watch("size",((e,s)=>{t(e+this._feature.schema.fields._expressionFieldsLength,s+this._feature.schema.fields._expressionFieldsLength,"size",this)})),s=this._feature.schema.fields.watch("_expressionFieldsLength",((e,s)=>{t(e+this._feature.attributes.size,s+this._feature.attributes.size,"size",this)}));return{remove:()=>{e.remove(),s.remove()}}}return super.watch(e,t)}_getFieldExtension(e){const t=this._feature.schema.findFieldByName(e);if(t)return this._feature.schema.fieldExtensions.forField(t)}_getFieldExtensionFormat(e){const t=this._getFieldExtension(e);return t?t.format:"{0}"}_formatAttribute(e,t){const s=e.match(fieldWithArcadeXRegex),i=e.match(fieldWithRelationshipRegex);if(s)return formatAttribute(this._feature,"expression",s[1],{format:t});if(i){const[,e,s]=i;return formatAttribute(this._feature,e,s,{format:t})}return formatAttribute(this._feature,void 0,e,{format:t})}}const fieldTokenRegex=/\{(?:relationships[\\/](\w\w*)[\\/])?(?:(expression)[\\/])?([a-zA-Z][.\w]*)(?::([^}]*))?\}/g,relationshipIdRegex=/\{relationships\/(\w\w*)[\\/]([^}]*)\}/g,escapedBraceRegex=/{{/g,escapedBracePlaceholder="\0MAGIC\0",escapedBracePlaceholderRegex=new RegExp(escapedBracePlaceholder,"g"),invalidRelationshipOrExpression="#INVALID";class HyperlinksCollection extends MapTransformCollection{constructor(e){super(e.settings.hyperlinkTemplates,(e=>this._getHyperlink(e))),this._feature=e}_getHyperlink(e){return this._hyperlinks=this._hyperlinks||new WeakMap,this._hyperlinks.has(e)||this._hyperlinks.set(e,new FeatureHyperlink(this._feature,e)),this._hyperlinks.get(e)}}let FeatureHyperlink=class extends Hyperlink{constructor(e,t){super(t.toJSON()),this._feature=e,this._template=t}get url(){return this._template.url?this._feature.format(this._template.url):this._template.url}set url(e){throw new InvalidOperationError(ERR_HYPERLINK_READONLY)}get text(){return this._template.text?this._feature.format(this._template.text):this._template.text}set text(e){throw new InvalidOperationError(ERR_HYPERLINK_READONLY)}get iconUrl(){return this._template.iconUrl?this._feature.format(this._template.iconUrl):this._template.iconUrl}set iconUrl(e){throw new InvalidOperationError(ERR_HYPERLINK_READONLY)}get target(){return this._template.target?this._feature.format(this._template.target):this._template.target}set target(e){throw new InvalidOperationError(ERR_HYPERLINK_READONLY)}get tooltip(){return this._template.tooltip?this._feature.format(this._template.tooltip):this._template.tooltip}set tooltip(e){throw new InvalidOperationError(ERR_HYPERLINK_READONLY)}_watchProperty(e,t,s,i){const r=super._watchProperty(e,t,s,i),a=this._template.watch(e,(()=>{this.notifyChange(e)})),o=this._feature.presentableAttributes.on("change",(()=>{this.notifyChange(e)})),n=this._feature.relatedFeatures.on("change",(()=>{this._notifyChange(e)}));return{remove:()=>{r.remove(),a.remove(),o.remove(),n.remove()}}}_getSerializableProperties(){return{}}};function formatAttribute(e,t,s,i={format:"{0}"}){if("expression"!==t){if(t){const r=find(e.relatedFeatures.keys(),(e=>e.id===t));if(!r)return log.debug("Could not resolve related field '{0}/{1}",t,s),invalidRelationshipOrExpression;const a=Array.from(e.relatedFeatures.get(r));return"many-to-one"===r.cardinality||"one-to-one"===r.cardinality?a.length<1?(log.debug("Could not resolve related field '{0}/{1}",t,s),invalidRelationshipOrExpression):formatAttributeValue(a[0],s,i):a.map((e=>formatAttributeValue(e,s,i))).filter((e=>""!==e)).join(",")}return formatAttributeValue(e,s,i)}if(!e.settings.popupTemplate?.expressionInfos?.find((e=>e.name===s)))return log.debug("Could not find expression '{0}'.",s),invalidRelationshipOrExpression;try{const t=e.expressionFieldValues.get(s)??i.defaultExpressionValue??"",r=e.schema.findFieldByName(`expression/${s}`);let a=i;if(r){const t=e.schema.fieldExtensions.forField(r);a=formatOptionsForField(e,s,formatOptionsFromSettings(t.formatSettings),a)}return formatValue(e,t,a)}catch(e){if(e instanceof Error)return log.error({message:"Error evaluating expression '{0}': {1}.",error:e},s,e.message),invalidRelationshipOrExpression;throw e}}function formatAttributeValue(e,t,s){let i=e.attributes.get(t);if(null==i)return"";const r=e.schema.findFieldByName(t);let a={format:"{0}"};const o=e.type?.domains?.[t];if(t===e.schema.typeIdField)i=e.type?e.type.name:i;else if(isCodedValueDomain(o)){const e=o.codedValues.find((e=>`${e.code}`==`${i.toString()}`));i=e?e.name:i}else if(r)if(isCodedValueDomain(r.domain)){const e=r.domain.codedValues.find((e=>`${e.code}`==`${i.toString()}`));e&&(i=e.name)}else{switch(r.type){case"integer":case"small-integer":case"single":case"double":i=parseNumber(i);break;case"date":i=parseDate({timeZone:e.schema.timeZone},i);break;default:i=`${i.toString()}`}a=formatOptionsFromSettings(e.schema.fieldExtensions.forField(r).formatSettings)}return formatValue(e,i,formatOptionsForField(e,t,a,s))}function formatValue(e,t,s){let i=s;if("number"==typeof t||t instanceof Date){i={...formatOptionsFromSettings(e.settings.formatSettings),...s}}return"{0}"===i.format&&"string"==typeof t?t:formatString(i,t)}function formatOptionsFromSettings(e){return{format:"{0}",dateFormat:e.dateFormat,numberFormat:e.numberFormat,currency:e.currency,fractionalDigits:e.fractionalDigits,locale:e.locale,timeZone:e.timeZone}}function formatOptionsForField(e,t,s,i){const{popupTemplate:r}=e.settings,a=r?.fieldInfos?r.fieldInfos.find((e=>e.fieldName===t)):void 0,o=a?a.format:void 0;let n;return o&&(n={format:"{0}",numberFormat:o.digitSeparator?NumberFormat.NUMBER:NumberFormat.FIXED_POINT,dateFormat:esriFormatToGeocortexFormat(o.dateFormat),fractionalDigits:o.places}),{...n,...s,...i}}FeatureHyperlink=__decorate([serializable],FeatureHyperlink);export async function resolveRelatedFeatures(e){const t=groupBy(e,(e=>e.source));await Promise.all(flatten([...t.keys()].map((e=>e.relationships.toArray()))).map((e=>(async e=>{[...(await e.getAllRelatedFeatures(t.get(e.source))).entries()].forEach((([t,s])=>{t.relatedFeatures.set(e,s)}))})(e))))}
1
+ import{__decorate as e}from"tslib";import t from"@arcgis/core/Graphic";import*as s from"@arcgis/core/arcade/arcade";import{EntityBase as i}from"../Entity.js";import{Hyperlink as r}from"../Hyperlink.js";import{InvalidOperationError as a}from"../InvalidOperationError.js";import{ItemType as o}from"../ItemType.js";import{toEsriApiGeometry as n,toPortalGeometry as h}from"../portal/Geometry.js";import{serializable as l}from"../support/Serializable.js";import{MapTransformCollection as p}from"../utilities/MapTransformCollection.js";import{ObservableMap as u}from"../utilities/ObservableMap.js";import{ReadOnlyMap as c}from"../utilities/ReadOnlyMap.js";import{arcadeScriptUsesGeometry as m,isArcadeScriptAsync as f,runArcadeExpression as d,runAsyncArcadeExpression as g}from"../utilities/arcade.js";import{flatten as y,groupBy as _}from"../utilities/array.js";import{checkArg as b}from"../utilities/checkArg.js";import{Collection as x,compare as w}from"../utilities/collection.js";import{parse as F,esriFormatToGeocortexFormat as v}from"../utilities/date.js";import{isCodedValueDomain as I}from"../utilities/esri.js";import{some as z,map as E,concat as A,forEach as S,find as j}from"../utilities/iterable.js";import{getLogger as T}from"../utilities/log.js";import{parse as k,NumberFormat as R}from"../utilities/number.js";import{map as C}from"../utilities/promise.js";import{format as M}from"../utilities/string.js";import{onCollectionPropertyChange as O}from"../utilities/watch.js";import{FeatureSettings as N}from"./FeatureSettings.js";import{fieldWithArcadeXRegex as P,fieldWithRelationshipRegex as V,Schema as D}from"./Schema.js";const $=T("geocortex.api.data.Feature");export const SCORE_FIELD="_score";export const SCORE_FIELD_ORIGINAL="_score_original";let U=class extends i{get geometry(){return this._geometry}set geometry(e){this.notifyChange("geometryType"),this._geometry=n(e),this.schema.spatialReference=this._geometry?.spatialReference}get geometryType(){return this.geometry?this.geometry.type:void 0}get source(){return this._source}set source(e){this._source&&this.settings.parent===this._source.featureSettings&&(this.settings.parent=void 0),this._source&&this.schema.parent===this._source.schema&&(this.schema.parent=void 0),this._source=e,this.settings.parent||(this.settings.parent=e?e.featureSettings:void 0),this.schema.parent||(this.schema.parent=e?e.schema:void 0),this.notifyChange("attachmentsInitialized"),this.notifyChange("relatedFeaturesInitialized")}get primaryKey(){const e=this.attributes.get(this.schema.primaryKeyField);return null!=e?`${e}`:void 0}get hasGlobalId(){return!!this.schema.fields.find((e=>"global-id"===e.type))}get globalId(){const e=this.schema.fields.find((e=>"global-id"===e.type));return e?this.attributes.get(e.name):void 0}set globalId(e){const t=this.schema.fields.find((e=>"global-id"===e.type));if(!t)throw new a("Cannot set global ID on feature -- no global ID field.");this.attributes.set(t.name,e)}get presentableAttributes(){return this._presentableAttributes=this._presentableAttributes||new H(this),this._presentableAttributes}get title(){return this.format(this._title||"")}get description(){return this.format(this._description)}get hyperlinks(){return this._hyperlinks||(this._hyperlinks=new X(this))}get relatedFeatures(){return this._relatedFeatures}get type(){if(this.schema.typeIdField&&this.attributes.has(this.schema.typeIdField)){const e=this.attributes.get(this.schema.typeIdField);return this.schema.types.find((t=>t.id===e))}}get attachmentsInitialized(){return!this.source||this._attachmentsInitialized}get relatedFeaturesInitialized(){return!this.source||this.source.relationships.every((e=>this._initializedRelationships.has(e)))}get expressionsInitialized(){return!this.settings.popupTemplate?.expressionInfos?.length||this._expressionsInitialized}get _hydrationStatus(){return this._featureHydrationStatus?this._featureHydrationStatus:this.source?.capabilities?.supportsQuery&&1===this.attributes.size&&void 0!==this.primaryKey?"dehydrated":"hydrated"}set _hydrationStatus(e){this._featureHydrationStatus=e}get _key(){return`${this.source?.id}//${this.primaryKey??this.globalId??this.id}`}get _title(){let e;return this.settings.popupTemplate&&(e="function"==typeof this.settings.popupTemplate.title?this.settings.popupTemplate.title():this.settings.popupTemplate.title),e||this.schema.displayField&&this.presentableAttributes.get(this.schema.displayField)||""}get _description(){if(this.settings.popupTemplate?.content){if("string"==typeof this.settings.popupTemplate.content)return this.settings.popupTemplate.content;if(Array.isArray(this.settings.popupTemplate.content)){const e=this.settings.popupTemplate.content.find((e=>"text"===e.type));if(e)return e.text}}return""}constructor(e){super(e),this._itemType=o.FEATURE,this._expressionFieldValues=new u,this._expressionValuesUpdatePending=!1,this._attachmentsInitialized=!1,this._expressionsInitialized=!1,this._initializedRelationships=new WeakSet,this.settings=new N,this.settings._setFeature(this),this.schema=new D,this.schema._featureSettings=this.settings,this.attachments=new x,this.attributes=new u,this._relatedFeatures=new u,this.expressionFieldValues=new K(this._expressionFieldValues,this),O(this,"source.relationships",(()=>{this.notifyChange("relatedFeaturesInitialized")}),!0),this.settings.watch("popupTemplate",((e,t)=>{e!==t&&(this._expressionsInitialized=!1,this.notifyChange("expressionsInitialized"))}),!0)}format(e,...t){let s="string"==typeof e?{format:e}:e;b("options",s).isNotMissing();const{format:i}=s;b("format",i).isNotMissing();let r=s.format.replace(B,J);return r=r.replace(Q,((e,t,i,r,a)=>ee(this,t||i,r,{...s,format:a?`{0:${a}}`:"{0}"}))),r=r.replace(W,"{{"),s={...s},s.format=r,M(s,...t)}clearExpressionInfos(){this._expressionFieldValues.clear()}async fetchExpressionInfos(e=!1){const{expressionInfos:t}=this.settings.popupTemplate??{};if(t){if(await Promise.all(t.map((async e=>{try{const t=this.source?.layer??this.source?.sublayer;let s=this.source?.mapExtension;if(!s){const e=this.source?.layerExtension;s=e?.mapExtension}this._expressionFieldValues.set(e.name,await g(e.expression,{layer:t,map:s?.map,feature:this,spatialReference:this.schema.spatialReference}))}catch(t){t instanceof Error&&$.error({message:"Error evaluating expression '{0}': {1}.",error:t},e.name,t.message),this._expressionFieldValues.set(e.name,q)}}))),e)return this.attributes.on("change",(async e=>{this._expressionValuesUpdatePending||(this._expressionValuesUpdatePending=!0,setTimeout((async()=>{this._expressionValuesUpdatePending=!1,await this.fetchExpressionInfos()}),0))}));this._expressionsInitialized=!0,this.notifyChange("expressionsInitialized")}}async fetchRelatedFeatures(e,t){if(!this.source)return;let s=[];if(e){const t=new Set(Array.isArray(e)?e:[e]);for(const e of t){const t="string"==typeof e?this.source.relationships.find((t=>t.id===e)):e;if(!t||!this.source.relationships.includes(t))throw new a("Relationship not found in feature source.");s.push(t)}}else s=this.source.relationships.toArray();const i=await C(s,(async e=>[e,await(async()=>{const s=await e.getRelatedFeatures(this,t);return this._initializedRelationships.add(e),s})()]));for(const e of i)this._relatedFeatures.set(e[0],e[1]);this.notifyChange("relatedFeaturesInitialized")}async fetchAttachments(){if(this.source){const e=await this.source.getAttachments(this);w(this.attachments,e,{equals:(e,t)=>e.id===t.id,onMissing:(e,t)=>this.attachments.remove(e),onNew:(e,t)=>{this.attachments.add(e)},onMatch:(e,t,s,i)=>{this.attachments.splice(s,1,t)}}),this._attachmentsInitialized=!0,this.notifyChange("attachmentsInitialized")}}async addAttachment(e){return this.source?.addAttachment(this,e)}async deleteAttachments(e){return this.source?.deleteAttachments(this,e)}_getSerializableProperties(){return{...super._getSerializableProperties(),attributes:{serializeModes:["project"],serialize:e=>{const t={};if("project"===e&&this.primaryKey&&this.source?.capabilities.supportsQuery)t[this.schema.primaryKeyField]=this.primaryKey;else for(const[e,s]of this.attributes.entries())t[e]=s;return t},deserialize:e=>{if(this.attributes.clear(),e instanceof Map)e.forEach(((e,t)=>{this.attributes.set(t,e)}));else for(const[t,s]of Object.entries(e))this.attributes.set(t,s)}},geometry:{serializeModes:["project"],serialize:e=>"project"===e&&this.source?.capabilities.supportsQuery?this.getDefault("geometry"):h(this.geometry),deserialize:e=>this.geometry=n(e)},settings:{serializeModes:["project"],serialize:e=>"project"===e&&this.source?.capabilities.supportsQuery?this.getDefault("settings"):this.settings.toJSON(e)},schema:{serializeModes:["project"],serialize:e=>"project"===e&&this.source?.capabilities.supportsQuery?this.getDefault("schema"):this.schema.toJSON(e)},source:["project"]}}_watchProperty(e,t,s,i){if("title"===e||"description"===e){const r=super._watchProperty(e,t,s,i),a="title"===e?"settings.popupTemplate.title":"settings.popupTemplate.content",o=this.watch(a,(()=>{this.notifyChange(e)})),n=this.presentableAttributes.on("change",(()=>{this.notifyChange(e)}));return{remove(){r.remove(),o.remove(),n.remove()}}}return super._watchProperty(e,t,s,i)}async _onInitialize(){const e=this._findRelationshipIds(this._title,this._description),t=this.source?this.source.relationships.map((e=>e.id)).toArray():[],s=[];for(const i of e)t.includes(i)?s.push(this.fetchRelatedFeatures(i)):$.error("Could not find relationship '{0}' referenced in feature title or description.",i);await Promise.all(s)}_findRelationshipIds(...e){const t=[];for(const s of e){let e;const i=s.replace(B,J);for(;e=Z.exec(i),null!==e;){const s=e[0];t.includes(s)||t.push(e[1])}}return t}};U=e([l],U);export{U as Feature};export function toFeature(e,t){const s=new U(t);if(e.attributes)for(const t of Object.keys(e.attributes))s.attributes.set(t,e.attributes[t]);return s.geometry=e.geometry,e.popupTemplate&&(s.settings.popupTemplate=e.popupTemplate),s}export function toGraphic(e){const s=new t;s.attributes={};for(const t of e.attributes.keys())s.attributes[t]=e.attributes.get(t);return e.source?.layer&&(s.layer=e.source?.layer),s.geometry=e.geometry,e.settings.popupTemplate&&(s.popupTemplate=e.settings.popupTemplate),s}const L="Presentable attributes are read-only.",G="Feature hyperlinks are read-only. Modify the feature's hyperlink templates instead.";class K extends c{constructor(e,t){super(e),this._feature=t}get(e){if(!super.has(e)){const{spatialReference:t}=this._feature.schema,i=this._feature.settings.popupTemplate?.expressionInfos?.find((t=>t.name===e));if(!i)return;(async()=>{try{if(f(i.expression,t)){const s=this._feature.source?.layer??this._feature.source?.sublayer;let r=this._feature.source?.mapExtension;if(!r){const e=this._feature.source?.layerExtension;r=e?.mapExtension}this._originalMap.set(e,await g(i.expression,{feature:this._feature,layer:s,map:r?.map,spatialReference:t}))}else m(i.expression,t)&&await s.enableGeometrySupport(),this._originalMap.set(e,d(i.expression,{feature:this._feature,spatialReference:t}))}catch(t){t instanceof Error&&$.error({message:"Error evaluating expression '{0}': {1}.",error:t},e,t.message),this._originalMap.set(e,q)}})()}return super.get(e)}}class H extends c{get size(){return this._feature.attributes.size+this._feature.schema.fields._expressionFieldsLength}constructor(e){super(new u),this._feature=e}clear(){throw new a(L)}delete(e){throw new a(L)}forEach(e,t){b("callback",e).isNotMissing();for(const s of this.keys())e.call(t,this.get(s),s,this)}get(e){const t=this._getFieldExtensionFormat(e);return this._formatAttribute(e,t)}has(e){return z(this.keys(),(t=>t===e))}set(...e){throw new a(L)}*entries(){yield*E(this.keys(),(e=>[e,this.get(e)]))}*keys(){const e=this._feature.schema.fields.expressionFields.map((e=>e.name)),t=[];this._feature.source?.relationships&&this._feature.source.relationships.filter((e=>"one-to-one"===e.cardinality||"many-to-one"===e.cardinality)).forEach((e=>t.push(...e.relatedSource.schema.fields.map((t=>`relationships/${e.id}/${t.name}`)).toArray()))),yield*A(this._feature.attributes.keys(),e.toArray(),t)}*values(){yield*E(this.keys(),(e=>this.get(e)))}[(Symbol.toStringTag,Symbol.iterator)](){return this.entries()}toJSON(){return Array.from(this.entries())}on(e,t){if(b("callback",t).isNotMissing(),!this._numObservers){const e=new Map,t=new Set,s=()=>{t.forEach((e=>e.remove())),t.clear()},i=()=>{const t={added:Array.from(this.entries()).filter((t=>t[1]!==e.get(t[0]))),removed:Array.from(e.entries()).filter((e=>!this.has(e[0])||e[1]!==this.get(e[0]))),target:this};(t.added.length||t.removed.length)&&(this.emit("change",t),r())},r=()=>{e.clear(),s(),S(this.keys(),(s=>{const r=this._getFieldExtension(s);let a="{0}";if(r){const e=r.watch("format",(()=>{i()}));t.add(e),r.format&&(a=r.format)}e.set(s,this._formatAttribute(s,a))}))};r();const a=this._feature.attributes.on("change",(()=>{i()})),o=this._feature.schema.fieldExtensions.on("change",(()=>{i()})),n=this._feature.settings.formatSettings.watch(["numberFormat","dateFormat","locale"],(()=>{i()})),h=this._feature.expressionFieldValues.on("change",(()=>{i()})),l=this._feature.schema.fields.on("change",(e=>{(e.added?.some((e=>null!==e.name.match(P)))||e.removed?.some((e=>null!==e.name.match(P))))&&i()})),p=this._feature.settings.watch("popupTemplate",(()=>{i()}));this._onAllObserversRemoved=()=>{h.remove(),a.remove(),o.remove(),l.remove(),n.remove(),p.remove(),e.clear(),s()}}const s=super.on("change",t);return this._numObservers++,{remove:()=>{s.remove(),this._numObservers--,this._numObservers||this._onAllObserversRemoved()}}}watch(e,t){if("size"===e){const e=this._feature.attributes.watch("size",((e,s)=>{t(e+this._feature.schema.fields._expressionFieldsLength,s+this._feature.schema.fields._expressionFieldsLength,"size",this)})),s=this._feature.schema.fields.watch("_expressionFieldsLength",((e,s)=>{t(e+this._feature.attributes.size,s+this._feature.attributes.size,"size",this)}));return{remove:()=>{e.remove(),s.remove()}}}return super.watch(e,t)}_getFieldExtension(e){const t=this._feature.schema.findFieldByName(e);if(t)return this._feature.schema.fieldExtensions.forField(t)}_getFieldExtensionFormat(e){const t=this._getFieldExtension(e);return t?t.format:"{0}"}_formatAttribute(e,t){const s=e.match(P),i=e.match(V);if(s)return ee(this._feature,"expression",s[1],{format:t});if(i){const[,e,s]=i;return ee(this._feature,e,s,{format:t})}return ee(this._feature,void 0,e,{format:t})}}const Q=/\{(?:relationships[\\/](\w\w*)[\\/])?(?:(expression)[\\/])?([a-zA-Z][.\w]*)(?::([^}]*))?\}/g,Z=/\{relationships\/(\w\w*)[\\/]([^}]*)\}/g,B=/{{/g,J="\0MAGIC\0",W=new RegExp(J,"g"),q="#INVALID";class X extends p{constructor(e){super(e.settings.hyperlinkTemplates,(e=>this._getHyperlink(e))),this._feature=e}_getHyperlink(e){return this._hyperlinks=this._hyperlinks||new WeakMap,this._hyperlinks.has(e)||this._hyperlinks.set(e,new Y(this._feature,e)),this._hyperlinks.get(e)}}let Y=class extends r{get url(){return this._template.url?this._feature.format(this._template.url):this._template.url}set url(e){throw new a(G)}get text(){return this._template.text?this._feature.format(this._template.text):this._template.text}set text(e){throw new a(G)}get iconUrl(){return this._template.iconUrl?this._feature.format(this._template.iconUrl):this._template.iconUrl}set iconUrl(e){throw new a(G)}get target(){return this._template.target?this._feature.format(this._template.target):this._template.target}set target(e){throw new a(G)}get tooltip(){return this._template.tooltip?this._feature.format(this._template.tooltip):this._template.tooltip}set tooltip(e){throw new a(G)}constructor(e,t){super(t.toJSON()),this._feature=e,this._template=t}_watchProperty(e,t,s,i){const r=super._watchProperty(e,t,s,i),a=this._template.watch(e,(()=>{this.notifyChange(e)})),o=this._feature.presentableAttributes.on("change",(()=>{this.notifyChange(e)})),n=this._feature.relatedFeatures.on("change",(()=>{this._notifyChange(e)}));return{remove:()=>{r.remove(),a.remove(),o.remove(),n.remove()}}}_getSerializableProperties(){return{}}};function ee(e,t,s,i={format:"{0}"}){if("expression"!==t){if(t){const r=j(e.relatedFeatures.keys(),(e=>e.id===t));if(!r)return $.debug("Could not resolve related field '{0}/{1}",t,s),q;const a=Array.from(e.relatedFeatures.get(r));return"many-to-one"===r.cardinality||"one-to-one"===r.cardinality?a.length<1?($.debug("Could not resolve related field '{0}/{1}",t,s),q):te(a[0],s,i):a.map((e=>te(e,s,i))).filter((e=>""!==e)).join(",")}return te(e,s,i)}if(!e.settings.popupTemplate?.expressionInfos?.find((e=>e.name===s)))return $.debug("Could not find expression '{0}'.",s),q;try{const t=e.expressionFieldValues.get(s)??i.defaultExpressionValue??"",r=e.schema.findFieldByName(`expression/${s}`);let a=i;if(r){const t=e.schema.fieldExtensions.forField(r);a=re(e,s,ie(t.formatSettings),a)}return se(e,t,a)}catch(e){if(e instanceof Error)return $.error({message:"Error evaluating expression '{0}': {1}.",error:e},s,e.message),q;throw e}}function te(e,t,s){let i=e.attributes.get(t);if(null==i)return"";const r=e.schema.findFieldByName(t);let a={format:"{0}"};const o=e.type?.domains?.[t];if(t===e.schema.typeIdField)i=e.type?e.type.name:i;else if(I(o)){const e=o.codedValues.find((e=>`${e.code}`==`${i.toString()}`));i=e?e.name:i}else if(r)if(I(r.domain)){const e=r.domain.codedValues.find((e=>`${e.code}`==`${i.toString()}`));e&&(i=e.name)}else{switch(r.type){case"integer":case"small-integer":case"single":case"double":i=k(i);break;case"date":i=F({timeZone:e.schema.timeZone},i);break;default:i=`${i.toString()}`}a=ie(e.schema.fieldExtensions.forField(r).formatSettings)}return se(e,i,re(e,t,a,s))}function se(e,t,s){let i=s;if("number"==typeof t||t instanceof Date){i={...ie(e.settings.formatSettings),...s}}return"{0}"===i.format&&"string"==typeof t?t:M(i,t)}function ie(e){return{format:"{0}",dateFormat:e.dateFormat,numberFormat:e.numberFormat,currency:e.currency,fractionalDigits:e.fractionalDigits,locale:e.locale,timeZone:e.timeZone}}function re(e,t,s,i){const{popupTemplate:r}=e.settings,a=r?.fieldInfos?r.fieldInfos.find((e=>e.fieldName===t)):void 0,o=a?a.format:void 0;let n;return o&&(n={format:"{0}",numberFormat:o.digitSeparator?R.NUMBER:R.FIXED_POINT,dateFormat:v(o.dateFormat),fractionalDigits:o.places}),{...n,...s,...i}}Y=e([l],Y);export async function resolveRelatedFeatures(e){const t=_(e,(e=>e.source));await Promise.all(y([...t.keys()].map((e=>e.relationships.toArray()))).map((e=>(async e=>{[...(await e.getAllRelatedFeatures(t.get(e.source))).entries()].forEach((([t,s])=>{t.relatedFeatures.set(e,s)}))})(e))))}
@@ -7,15 +7,15 @@ import { FeatureSet, FeatureSetProperties } from "./FeatureSet.js";
7
7
  /**
8
8
  * Compares two features for the purposes of sorting.
9
9
  */
10
- export declare type FeatureCompareFunction = (f1: Feature, f2: Feature) => number;
10
+ export type FeatureCompareFunction = (f1: Feature, f2: Feature) => number;
11
11
  /**
12
12
  * Predicate used for filtering features.
13
13
  */
14
- export declare type FeaturePredicate = (f: Feature) => boolean;
14
+ export type FeaturePredicate = (f: Feature) => boolean;
15
15
  /**
16
16
  * The direction to sort in.
17
17
  */
18
- export declare type SortDirection =
18
+ export type SortDirection =
19
19
  /**
20
20
  * Sort from smallest to largest. For example, from A to Z.
21
21
  */
@@ -1 +1 @@
1
- import{__decorate}from"tslib";import Field from"@arcgis/core/layers/support/Field";import{ArgumentError}from"../ArgumentError.js";import{generateId}from"../Entity.js";import{isFeatureSet,ItemType}from"../ItemType.js";import{assignProperties,filterJSONProperties,getDefaults,getSerializableProperties,serializable}from"../support/Serializable.js";import{getSearchableValue}from"../tasks/search/_utilities.js";import{ReadOnlyCollection}from"../utilities/ReadOnlyCollection.js";import{Collection}from"../utilities/collection.js";import{parse as parseDate}from"../utilities/date.js";import{isCodedValueDomain}from"../utilities/esri.js";import{parse as parseNumber}from"../utilities/number.js";import{escapeRegExp}from"../utilities/string.js";import{FeatureSet}from"./FeatureSet.js";let FeatureList=class extends ReadOnlyCollection{constructor(e){if(super(new Collection),this.id=e?.id??generateId(),isFeatureSet(e))this.featureSet=e;else if(e){const t=e;Array.isArray(t.featureSet)?this.featureSet=new FeatureSet({features:t.featureSet}):isFeatureSet(t.featureSet)?this.featureSet=t.featureSet:this.featureSet=new FeatureSet(t.featureSet)}else this.featureSet=new FeatureSet;for(const e of this.featureSet)this._collection.add(e);this.featureSet.on("change",(e=>this._onFeatureSetChange(e)))}get itemType(){return ItemType.FEATURE_LIST}toItemUri(){return`item://${encodeURIComponent(ItemType.FEATURE_LIST)}/${encodeURIComponent(this.id)}`}assignProperties(e){assignProperties(this._getSerializableProperties(),this,e)}toJSON(e="all"){return filterJSONProperties(this._getSerializableProperties(),this,e)}getDefaults(){return getDefaults(this._getSerializableProperties())}getDefault(e){return this.getDefaults()[e]}sort(e){if("function"==typeof e)this._sortFunc=e;else if(Array.isArray(e))this._sortFunc=this._createSortFunc(e);else if("object"==typeof e&&e.field)this._sortFunc=this._createSortFunc([e]);else{if("string"!=typeof e)throw new ArgumentError("criteria","Invalid sort criteria.");this._sortFunc=this._createSortFunc([{field:e}])}return this._sortFunc=this._stabilizeSortFunc(this._sortFunc),this._sort(this._sortFunc),this.emit("change",{moved:this._collection.toArray(),target:this}),this}applyFilter(e){if(e)if("function"==typeof e)this._filterFunc=e;else if(Array.isArray(e))this._filterFunc=this._createFilterFunc(e);else if("object"==typeof e&&e.field)this._filterFunc=this._createFilterFunc([e]);else{if("string"!=typeof e)throw new ArgumentError("criteria","Invalid filter criteria.");{const t=this.featureSet.schema.fieldExtensions.initializedItems.filter((e=>e.searchable)).map((t=>({field:t.field.name,match:e}))).toArray();this._filterFunc=this._createFilterFunc(t)}}else delete this._filterFunc;const t=new Set,i=[],r=[];let s=0;for(;s<this._collection.length;){const e=this._collection.getItemAt(s);this._filterFunc&&!this._filterFunc(e)?(i.push(e),this._collection.removeAt(s)):(t.add(e),s++)}for(const e of this.featureSet)t.has(e)||this._filterFunc&&!this._filterFunc(e)||(this._collection.add(e),r.push(e));this._sortFunc&&r.length&&(r.length<=10?this._insertionSort(this._sortFunc):this._sort(this._sortFunc)),(r.length||i.length)&&this.emit("change",{added:r,removed:i,target:this})}removeFilter(){this.applyFilter(void 0)}getSerializableProperties(e="all"){return getSerializableProperties(this._getSerializableProperties(),e)}_getSerializableProperties(){return{title:["project"],featureSet:{serializeModes:["project"],deserialize:e=>{isFeatureSet(e)?this.featureSet.assignProperties({title:e.title,features:[...e]}):Array.isArray(e)?this.featureSet.assignProperties({features:e}):this.featureSet.assignProperties(e)}}}}_onFeatureSetChange(e){if(e.removed?.length&&this._collection.removeMany(e.removed),e.added?.length){const t=this._filterFunc?e.added.filter(this._filterFunc):e.added;t.length&&(this._collection.addMany(t),this._sortFunc&&(t.length<=10?this._insertionSort(this._sortFunc):this._sort(this._sortFunc)))}}_createSortFunc(e){return(t,i)=>{for(let r of e){if("string"==typeof r&&(r={field:r}),!r.field)throw new ArgumentError("criteria","Invalid sort criteria.");const e=this._getField(r.field),s=this._getSortValue(t,e),o=this._getSortValue(i,e);let a="string"==typeof s?s.localeCompare(o):s-o;if("desc"===r.direction&&(a*=-1),0!==a)return a}return 0}}_stabilizeSortFunc(e){return(t,i)=>{const r=e(t,i);return 0===r?this._collection.indexOf(t)-this._collection.indexOf(i):r}}_createFilterFunc(e){const t=new Map;for(const i of e){if(!i.field)throw new ArgumentError("criteria","Invalid sort criteria.");if(!i.match)continue;const e=this._getField(i.field),r=this._getFilterRegex(i.match,e);t.set(e.name,r)}return t.size?e=>{for(const i of t.keys()){const r=this._getField(i),s=getSearchableValue(e,r),o=t.get(i);let a=o[0];if(o.length>1&&"string"!==r.type&&isCodedValueDomain(e.type?.domains?.[r.name])&&(a=o[1]),a.exec(s))return!0}return!1}:()=>!0}_getSortValue(e,t){if(isCodedValueDomain(e.type?.domains?.[t.name])||isCodedValueDomain(t.domain))return e.presentableAttributes.get(t.name);switch(t.type){case"integer":case"small-integer":case"double":case"single":case"oid":{const i=e.attributes.get(t.name);return null==i||isNaN(i)?Number.MIN_VALUE:parseNumber(i)}case"date":{const i=parseDate(e.attributes.get(t.name)).getTime();return isNaN(i)?0:i}default:return e.presentableAttributes.get(t.name)??""}}_getFilterRegex(e,t){if(t.domain&&"coded-value"===t.domain.type)return[new RegExp(`${escapeRegExp(e)}`,"i")];switch(t.type){case"integer":case"small-integer":case"double":case"single":case"oid":{const i=new RegExp(`(^|${SEPARATOR})${escapeRegExp(e)}`,"i");return this.featureSet.schema.types.some((e=>isCodedValueDomain(e.domains?.[t.name])))?[i,new RegExp(`${escapeRegExp(e)}`,"i")]:[i]}default:return[new RegExp(`${escapeRegExp(e)}`,"i")]}}_getField(e){let t=this.featureSet.schema.findFieldByName(e);return t||(t=new Field({name:e,type:this._inferFieldType(e),editable:!1}),this.featureSet.schema.fields.add(t)),t}_inferFieldType(e){for(const t of this.featureSet.values()){const i=t.attributes.get(e);if(null!=i)return"number"==typeof i?"double":i instanceof Date?"date":"string"}return"string"}_sort(e){this._collection._items.sort(e)}_insertionSort(e){const t=this._collection._items;for(let i=1;i<this.length;i++){const r=t[i];let s=i-1;for(;s>=0&&e(t[s],r)>0;)t[s+1]=t[s],s--;t[s+1]=r}}};FeatureList=__decorate([serializable],FeatureList);export{FeatureList};const SEPARATOR="\t";
1
+ import{__decorate as e}from"tslib";import t from"@arcgis/core/layers/support/Field";import{ArgumentError as i}from"../ArgumentError.js";import{generateId as r}from"../Entity.js";import{isFeatureSet as s,ItemType as n}from"../ItemType.js";import{assignProperties as o,filterJSONProperties as a,getDefaults as l,getSerializableProperties as c,serializable as u}from"../support/Serializable.js";import{getSearchableValue as f}from"../tasks/search/_utilities.js";import{ReadOnlyCollection as h}from"../utilities/ReadOnlyCollection.js";import{Collection as d}from"../utilities/collection.js";import{parse as m}from"../utilities/date.js";import{isCodedValueDomain as _}from"../utilities/esri.js";import{parse as p}from"../utilities/number.js";import{escapeRegExp as g}from"../utilities/string.js";import{FeatureSet as F}from"./FeatureSet.js";let S=class extends h{get itemType(){return n.FEATURE_LIST}constructor(e){if(super(new d),this.id=e?.id??r(),s(e))this.featureSet=e;else if(e){const t=e;Array.isArray(t.featureSet)?this.featureSet=new F({features:t.featureSet}):s(t.featureSet)?this.featureSet=t.featureSet:this.featureSet=new F(t.featureSet)}else this.featureSet=new F;for(const e of this.featureSet)this._collection.add(e);this.featureSet.on("change",(e=>this._onFeatureSetChange(e)))}toItemUri(){return`item://${encodeURIComponent(n.FEATURE_LIST)}/${encodeURIComponent(this.id)}`}assignProperties(e){o(this._getSerializableProperties(),this,e)}toJSON(e="all"){return a(this._getSerializableProperties(),this,e)}getDefaults(){return l(this._getSerializableProperties())}getDefault(e){return this.getDefaults()[e]}sort(e){if("function"==typeof e)this._sortFunc=e;else if(Array.isArray(e))this._sortFunc=this._createSortFunc(e);else if("object"==typeof e&&e.field)this._sortFunc=this._createSortFunc([e]);else{if("string"!=typeof e)throw new i("criteria","Invalid sort criteria.");this._sortFunc=this._createSortFunc([{field:e}])}return this._sortFunc=this._stabilizeSortFunc(this._sortFunc),this._sort(this._sortFunc),this.emit("change",{moved:this._collection.toArray(),target:this}),this}applyFilter(e){if(e)if("function"==typeof e)this._filterFunc=e;else if(Array.isArray(e))this._filterFunc=this._createFilterFunc(e);else if("object"==typeof e&&e.field)this._filterFunc=this._createFilterFunc([e]);else{if("string"!=typeof e)throw new i("criteria","Invalid filter criteria.");{const t=this.featureSet.schema.fieldExtensions.initializedItems.filter((e=>e.searchable)).map((t=>({field:t.field.name,match:e}))).toArray();this._filterFunc=this._createFilterFunc(t)}}else delete this._filterFunc;const t=new Set,r=[],s=[];let n=0;for(;n<this._collection.length;){const e=this._collection.getItemAt(n);this._filterFunc&&!this._filterFunc(e)?(r.push(e),this._collection.removeAt(n)):(t.add(e),n++)}for(const e of this.featureSet)t.has(e)||this._filterFunc&&!this._filterFunc(e)||(this._collection.add(e),s.push(e));this._sortFunc&&s.length&&(s.length<=10?this._insertionSort(this._sortFunc):this._sort(this._sortFunc)),(s.length||r.length)&&this.emit("change",{added:s,removed:r,target:this})}removeFilter(){this.applyFilter(void 0)}getSerializableProperties(e="all"){return c(this._getSerializableProperties(),e)}_getSerializableProperties(){return{title:["project"],featureSet:{serializeModes:["project"],deserialize:e=>{s(e)?this.featureSet.assignProperties({title:e.title,features:[...e]}):Array.isArray(e)?this.featureSet.assignProperties({features:e}):this.featureSet.assignProperties(e)}}}}_onFeatureSetChange(e){if(e.removed?.length&&this._collection.removeMany(e.removed),e.added?.length){const t=this._filterFunc?e.added.filter(this._filterFunc):e.added;t.length&&(this._collection.addMany(t),this._sortFunc&&(t.length<=10?this._insertionSort(this._sortFunc):this._sort(this._sortFunc)))}}_createSortFunc(e){return(t,r)=>{for(let s of e){if("string"==typeof s&&(s={field:s}),!s.field)throw new i("criteria","Invalid sort criteria.");const e=this._getField(s.field),n=this._getSortValue(t,e),o=this._getSortValue(r,e);let a="string"==typeof n?n.localeCompare(o):n-o;if("desc"===s.direction&&(a*=-1),0!==a)return a}return 0}}_stabilizeSortFunc(e){return(t,i)=>{const r=e(t,i);return 0===r?this._collection.indexOf(t)-this._collection.indexOf(i):r}}_createFilterFunc(e){const t=new Map;for(const r of e){if(!r.field)throw new i("criteria","Invalid sort criteria.");if(!r.match)continue;const e=this._getField(r.field),s=this._getFilterRegex(r.match,e);t.set(e.name,s)}return t.size?e=>{for(const i of t.keys()){const r=this._getField(i),s=f(e,r),n=t.get(i);let o=n[0];if(n.length>1&&"string"!==r.type&&_(e.type?.domains?.[r.name])&&(o=n[1]),o.exec(s))return!0}return!1}:()=>!0}_getSortValue(e,t){if(_(e.type?.domains?.[t.name])||_(t.domain))return e.presentableAttributes.get(t.name);switch(t.type){case"integer":case"small-integer":case"double":case"single":case"oid":{const i=e.attributes.get(t.name);return null==i||isNaN(i)?Number.MIN_VALUE:p(i)}case"date":{const i=m(e.attributes.get(t.name)).getTime();return isNaN(i)?0:i}default:return e.presentableAttributes.get(t.name)??""}}_getFilterRegex(e,t){if(t.domain&&"coded-value"===t.domain.type)return[new RegExp(`${g(e)}`,"i")];switch(t.type){case"integer":case"small-integer":case"double":case"single":case"oid":{const i=new RegExp(`(^|${y})${g(e)}`,"i");return this.featureSet.schema.types.some((e=>_(e.domains?.[t.name])))?[i,new RegExp(`${g(e)}`,"i")]:[i]}default:return[new RegExp(`${g(e)}`,"i")]}}_getField(e){let i=this.featureSet.schema.findFieldByName(e);return i||(i=new t({name:e,type:this._inferFieldType(e),editable:!1}),this.featureSet.schema.fields.add(i)),i}_inferFieldType(e){for(const t of this.featureSet.values()){const i=t.attributes.get(e);if(null!=i)return"number"==typeof i?"double":i instanceof Date?"date":"string"}return"string"}_sort(e){this._collection._items.sort(e)}_insertionSort(e){const t=this._collection._items;for(let i=1;i<this.length;i++){const r=t[i];let s=i-1;for(;s>=0&&e(t[s],r)>0;)t[s+1]=t[s],s--;t[s+1]=r}}};S=e([u],S);export{S as FeatureList};const y="\t";
@@ -1 +1 @@
1
- import{format}from"../utilities/string.js";export class FeatureSaveError extends Error{constructor(r,...e){super(r&&format(r,...e)||"One or more features could not be saved."),this.name="FeatureSaveError",this.errors=new Map}}
1
+ import{format as r}from"../utilities/string.js";export class FeatureSaveError extends Error{constructor(e,...t){super(e&&r(e,...t)||"One or more features could not be saved."),this.name="FeatureSaveError",this.errors=new Map}}
@@ -1 +1 @@
1
- var FeatureSet_1;import{__decorate}from"tslib";import Collection from"@arcgis/core/core/Collection";import{generateId}from"../Entity.js";import{isFeature,ItemType}from"../ItemType.js";import{Observable}from"../support/Observable.js";import{assignProperties,filterJSONProperties,getDefaults,getSerializableProperties,serializable}from"../support/Serializable.js";import{ObservableMap}from"../utilities/ObservableMap.js";import{groupBy}from"../utilities/array.js";import{toArray,from,empty}from"../utilities/asyncIterable.js";import{compare,find}from"../utilities/iterable.js";import{getLogger}from"../utilities/log.js";import{watchEach}from"../utilities/watch.js";import{Feature}from"./Feature.js";import{FeatureSettings}from"./FeatureSettings.js";import{Schema}from"./Schema.js";const log=getLogger("feature-set");let FeatureSet=FeatureSet_1=class extends Observable{constructor(e){super(),this.settings=new FeatureSettings,this.schema=new Schema,this._rehydratingFeatureCount=0,this._rehydratingFeatures=new Collection,this._features=new ObservableMap,this.schema._featureSettings=this.settings,this.id=e?.id??generateId(),watchEach(this._rehydratingFeatures,"_featureHydrationStatus",((e,t,r,s)=>{if(this._rehydratingFeatureCount--,!this._rehydratingFeatureCount){const e=this._rehydratingFeatures.toArray();this.addMany(e),this.emit("feature-hydration-complete",e)}})),this.on("dehydrated-features-added",(async e=>{this._rehydratingFeatures.addMany(e);const t=groupBy(e,(e=>e.source)),r=groupBy(await toArray(from([...t.entries()].map((([e,t])=>{let r;try{r=e?.getFeatures(t.map((e=>e.primaryKey)).filter((e=>!!e)))??empty()}catch(t){r=empty(),log.error({error:t,message:`Failed to hydrate features from source '${e?.title??e?.id}`})}return r})))),(e=>e.source));[...t.entries()].forEach((([e,t])=>{const s=r.get(e);t.forEach((e=>{const t=s?.find((t=>t.primaryKey===e.primaryKey));t&&(e.geometry=t.geometry,[...t.attributes.entries()].forEach((([t,r])=>{e.attributes.set(t,r)}))),e._hydrationStatus=void 0}))}))})),this.assignProperties(e)}get size(){return this._features.size}get source(){return this._source}set source(e){this._source&&this.settings.parent===this._source.featureSettings&&(this.settings.parent=void 0),this._source&&this.schema.parent===this._source.schema&&(this.schema.parent=void 0),this._source=e,this.settings.parent||(this.settings.parent=e?e.featureSettings:void 0),this.schema.parent||(this.schema.parent=e?e.schema:void 0)}get itemType(){return ItemType.FEATURE_SET}static async fromFeatureStream(e,t){const r=new FeatureSet_1(t);for await(const t of e)r.add(t);return r}on(e,t){return super.on(e,t)}assignProperties(e){assignProperties(this._getSerializableProperties(),this,e)}has(e){return this._features.has(e._key)}entries(){return[...this._features].map((([e,t])=>[t,t]))[Symbol.iterator]()}keys(){return this._features.values()}values(){return this._features.values()}toJSON(e="all"){return filterJSONProperties(this._getSerializableProperties(),this,e)}toItemUri(){return`item://${encodeURIComponent(ItemType.FEATURE_SET)}/${encodeURIComponent(this.id)}`}add(e){return this._add(e)}addMany(e){const t=[],r=[];for(const s of e){const e=this._features.get(s._key);s!==e&&(this._add(s,!1),t.push(s),e&&r.push(e))}return t.length&&(this.notifyChange("size"),this.emit("change",{added:t,removed:r,moved:[],target:this})),this}clear(){const e=Array.from(this.values());this._features.clear(),this.notifyChange("size"),this.emit("change",{added:[],removed:e,moved:[],target:this})}delete(e){return this._delete(e)}deleteMany(e){const t=[];for(const r of e){const e=this._features.get(r._key);this._delete(r,!1)&&t.push(e)}return t.length&&(this.notifyChange("size"),this.emit("change",{added:[],removed:t,moved:[],target:this})),!!t.length}forEach(e,t){this._features.forEach((t=>e(t,t,this)),t)}findById(e){return find(this,(t=>t.id===e))}findByPrimaryKey(e){return find(this,(t=>t.primaryKey===e))}getSerializableProperties(e="all"){return getSerializableProperties(this._getSerializableProperties(),e)}getDefaults(){return getDefaults(this._getSerializableProperties())}getDefault(e){return this.getDefaults()[e]}[(Symbol.toStringTag,Symbol.iterator)](){return this._features.values()[Symbol.iterator]()}_add(e,t=!0){const r=this._features.get(e._key);return r&&r!==e&&this._delete(r,!1),this._features.set(e._key,e),t&&r!==e&&(this.notifyChange("size"),this.emit("change",{added:[e],removed:r?[r]:[],moved:[],target:this})),this.source&&!e.source&&(e.source=this.source),e.schema.parent||(e.schema.parent=this.schema),e.settings.parent||(e.settings.parent=this.settings),this}_delete(e,t=!0){if(!this.has(e))return!1;const r=this._features.get(e._key);return this._features.delete(e._key),t&&(this.notifyChange("size"),this.emit("change",{added:[],removed:[r],moved:[],target:this})),e.schema.parent===this.schema&&(e.schema.parent=void 0),e.settings.parent===this.settings&&(e.settings.parent=void 0),!0}_getSerializableProperties(){return{id:["project"],features:{serializeModes:["project"],serialize:()=>[...this],deserialize:e=>{const t=[],r=[];compare(this._rehydratingFeatures.concat([...this]),e,{onNew:e=>{if(isFeature(e))"dehydrated"===e._hydrationStatus?(e._hydrationStatus="rehydrating",this._rehydratingFeatureCount++,t.push(e)):"rehydrating"===e._hydrationStatus?(this._rehydratingFeatureCount++,this._rehydratingFeatures.push(e)):(r.push(e),this.add(e));else{const t=new Feature(e);r.push(t),this.add(t)}},onMatch:(e,r)=>{isFeature(r)?"dehydrated"===e._hydrationStatus?(e._hydrationStatus="rehydrating",this._rehydratingFeatureCount++,t.push(e)):e!==r&&this.add(r):e.assignProperties(r)},onMissing:e=>{this.delete(e)},equals:(e,t)=>isFeature(t)?e._key===t._key:e.id===t.id}),t.length?this.emit("dehydrated-features-added",t):this._rehydratingFeatureCount||this.emit("feature-hydration-complete",r)}},title:["project"],source:[],schema:[],settings:[]}}};FeatureSet=FeatureSet_1=__decorate([serializable],FeatureSet);export{FeatureSet};
1
+ var e;import{__decorate as t}from"tslib";import r from"@arcgis/core/core/Collection";import{generateId as s}from"../Entity.js";import{isFeature as i,ItemType as a}from"../ItemType.js";import{Observable as h}from"../support/Observable.js";import{assignProperties as n,filterJSONProperties as o,getDefaults as u,getSerializableProperties as d,serializable as m}from"../support/Serializable.js";import{ObservableMap as c}from"../utilities/ObservableMap.js";import{groupBy as g}from"../utilities/array.js";import{toArray as y,from as l,empty as p}from"../utilities/asyncIterable.js";import{compare as f,find as _}from"../utilities/iterable.js";import{getLogger as S}from"../utilities/log.js";import{watchEach as v}from"../utilities/watch.js";import{Feature as b}from"./Feature.js";import{FeatureSettings as F}from"./FeatureSettings.js";import{Schema as z}from"./Schema.js";const j=S("feature-set");let C=e=class extends h{get size(){return this._features.size}get source(){return this._source}set source(e){this._source&&this.settings.parent===this._source.featureSettings&&(this.settings.parent=void 0),this._source&&this.schema.parent===this._source.schema&&(this.schema.parent=void 0),this._source=e,this.settings.parent||(this.settings.parent=e?e.featureSettings:void 0),this.schema.parent||(this.schema.parent=e?e.schema:void 0)}get itemType(){return a.FEATURE_SET}constructor(e){super(),this.settings=new F,this.schema=new z,this._rehydratingFeatureCount=0,this._rehydratingFeatures=new r,this._features=new c,this.schema._featureSettings=this.settings,this.id=e?.id??s(),v(this._rehydratingFeatures,"_featureHydrationStatus",((e,t,r,s)=>{if(this._rehydratingFeatureCount--,!this._rehydratingFeatureCount){const e=this._rehydratingFeatures.toArray();this.addMany(e),this.emit("feature-hydration-complete",e)}})),this.on("dehydrated-features-added",(async e=>{this._rehydratingFeatures.addMany(e);const t=g(e,(e=>e.source)),r=g(await y(l([...t.entries()].map((([e,t])=>{let r;try{r=e?.getFeatures(t.map((e=>e.primaryKey)).filter((e=>!!e)))??p()}catch(t){r=p(),j.error({error:t,message:`Failed to hydrate features from source '${e?.title??e?.id}`})}return r})))),(e=>e.source));[...t.entries()].forEach((([e,t])=>{const s=r.get(e);t.forEach((e=>{const t=s?.find((t=>t.primaryKey===e.primaryKey));t&&(e.geometry=t.geometry,[...t.attributes.entries()].forEach((([t,r])=>{e.attributes.set(t,r)}))),e._hydrationStatus=void 0}))}))})),this.assignProperties(e)}static async fromFeatureStream(t,r){const s=new e(r);for await(const e of t)s.add(e);return s}on(e,t){return super.on(e,t)}assignProperties(e){n(this._getSerializableProperties(),this,e)}has(e){return this._features.has(e._key)}entries(){return[...this._features].map((([e,t])=>[t,t]))[Symbol.iterator]()}keys(){return this._features.values()}values(){return this._features.values()}toJSON(e="all"){return o(this._getSerializableProperties(),this,e)}toItemUri(){return`item://${encodeURIComponent(a.FEATURE_SET)}/${encodeURIComponent(this.id)}`}add(e){return this._add(e)}addMany(e){const t=[],r=[];for(const s of e){const e=this._features.get(s._key);s!==e&&(this._add(s,!1),t.push(s),e&&r.push(e))}return t.length&&(this.notifyChange("size"),this.emit("change",{added:t,removed:r,moved:[],target:this})),this}clear(){const e=Array.from(this.values());this._features.clear(),this.notifyChange("size"),this.emit("change",{added:[],removed:e,moved:[],target:this})}delete(e){return this._delete(e)}deleteMany(e){const t=[];for(const r of e){const e=this._features.get(r._key);this._delete(r,!1)&&t.push(e)}return t.length&&(this.notifyChange("size"),this.emit("change",{added:[],removed:t,moved:[],target:this})),!!t.length}forEach(e,t){this._features.forEach((t=>e(t,t,this)),t)}findById(e){return _(this,(t=>t.id===e))}findByPrimaryKey(e){return _(this,(t=>t.primaryKey===e))}getSerializableProperties(e="all"){return d(this._getSerializableProperties(),e)}getDefaults(){return u(this._getSerializableProperties())}getDefault(e){return this.getDefaults()[e]}[(Symbol.toStringTag,Symbol.iterator)](){return this._features.values()[Symbol.iterator]()}_add(e,t=!0){const r=this._features.get(e._key);return r&&r!==e&&this._delete(r,!1),this._features.set(e._key,e),t&&r!==e&&(this.notifyChange("size"),this.emit("change",{added:[e],removed:r?[r]:[],moved:[],target:this})),this.source&&!e.source&&(e.source=this.source),e.schema.parent||(e.schema.parent=this.schema),e.settings.parent||(e.settings.parent=this.settings),this}_delete(e,t=!0){if(!this.has(e))return!1;const r=this._features.get(e._key);return this._features.delete(e._key),t&&(this.notifyChange("size"),this.emit("change",{added:[],removed:[r],moved:[],target:this})),e.schema.parent===this.schema&&(e.schema.parent=void 0),e.settings.parent===this.settings&&(e.settings.parent=void 0),!0}_getSerializableProperties(){return{id:["project"],features:{serializeModes:["project"],serialize:()=>[...this],deserialize:e=>{const t=[],r=[];f(this._rehydratingFeatures.concat([...this]),e,{onNew:e=>{if(i(e))"dehydrated"===e._hydrationStatus?(e._hydrationStatus="rehydrating",this._rehydratingFeatureCount++,t.push(e)):"rehydrating"===e._hydrationStatus?(this._rehydratingFeatureCount++,this._rehydratingFeatures.push(e)):(r.push(e),this.add(e));else{const t=new b(e);r.push(t),this.add(t)}},onMatch:(e,r)=>{i(r)?"dehydrated"===e._hydrationStatus?(e._hydrationStatus="rehydrating",this._rehydratingFeatureCount++,t.push(e)):e!==r&&this.add(r):e.assignProperties(r)},onMissing:e=>{this.delete(e)},equals:(e,t)=>i(t)?e._key===t._key:e.id===t.id}),t.length?this.emit("dehydrated-features-added",t):this._rehydratingFeatureCount||this.emit("feature-hydration-complete",r)}},title:["project"],source:[],schema:[],settings:[]}}};C=e=t([m],C);export{C as FeatureSet};