@vertigis/arcgis-extensions 49.9.0 → 50.0.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 (351) hide show
  1. package/AppConfig.schema.json +23 -6
  2. package/Hyperlink.d.ts +3 -1
  3. package/Hyperlink.js +1 -1
  4. package/data/ArcGISServiceTableExtension.js +1 -1
  5. package/data/Feature.d.ts +1 -3
  6. package/data/Feature.js +1 -1
  7. package/data/FeatureSet.d.ts +40 -2
  8. package/data/FeatureSet.js +1 -1
  9. package/data/FeatureSettings.js +1 -1
  10. package/data/FeatureSourceBase.d.ts +22 -27
  11. package/data/FeatureSourceBase.js +1 -1
  12. package/data/FieldExtension.d.ts +0 -3
  13. package/data/FieldExtension.js +1 -1
  14. package/data/PopupContentExtension.js +1 -1
  15. package/data/Schema.js +1 -1
  16. package/data/_Relationship.d.ts +1 -2
  17. package/data/_TableExtension.d.ts +1 -1
  18. package/data/_TableExtension.js +1 -1
  19. package/docs/html/assets/highlight.css +38 -10
  20. package/docs/html/assets/navigation.js +1 -1
  21. package/docs/html/assets/search.js +1 -1
  22. package/docs/html/classes/Entity.EntityBase.html +12 -74
  23. package/docs/html/classes/Hyperlink.Hyperlink.html +10 -72
  24. package/docs/html/classes/LanguageResources.LanguageResources.html +36 -30
  25. package/docs/html/classes/data_ArcGISServiceTableExtension.ArcGISServiceTableExtension.html +35 -97
  26. package/docs/html/classes/data_Attachment.Attachment.html +12 -74
  27. package/docs/html/classes/data_Feature.Feature.html +16 -76
  28. package/docs/html/classes/data_FeatureList.FeatureList.html +73 -17
  29. package/docs/html/classes/data_FeatureSet.FeatureSet.html +39 -33
  30. package/docs/html/classes/data_FeatureSettings.FeatureSettings.html +11 -71
  31. package/docs/html/classes/data_FeatureSourceBase.FeatureSourceBase.html +35 -98
  32. package/docs/html/classes/data_FeatureSourceBase.RelationshipCollection.html +72 -16
  33. package/docs/html/classes/data_FeatureStream.FeatureStream.html +13 -75
  34. package/docs/html/classes/data_FieldExtension.FieldExtension.html +13 -75
  35. package/docs/html/classes/data_PopupContentExtension.PopupContentExtension.html +13 -75
  36. package/docs/html/classes/data_RelationshipBase.RelationshipBase.html +37 -31
  37. package/docs/html/classes/data_Schema.Schema.html +13 -73
  38. package/docs/html/classes/data_TaskSettings.TaskSettings.html +12 -72
  39. package/docs/html/classes/data__TableExtension.TableExtension.html +34 -96
  40. package/docs/html/classes/data__TableExtension.TableFeatureSettings.html +11 -71
  41. package/docs/html/classes/data__TableExtension.TableSchema.html +15 -75
  42. package/docs/html/classes/layer_preset_LayerPreset.LayerPreset.html +14 -76
  43. package/docs/html/classes/layer_preset_LayerPresetSettings.LayerPresetSetting.html +36 -30
  44. package/docs/html/classes/mapping_ArcGISSublayerExtension.ArcGISSublayerExtension.html +35 -97
  45. package/docs/html/classes/mapping_ArcGISSublayerExtension.ArcGISSublayerRelationshipCollection.html +72 -16
  46. package/docs/html/classes/mapping_BasemapExtension.BasemapExtension.html +14 -76
  47. package/docs/html/classes/mapping_Bookmark.Bookmark.html +12 -74
  48. package/docs/html/classes/mapping_BuildingComponentSublayerExtension.BuildingComponentSublayerExtension.html +35 -97
  49. package/docs/html/classes/mapping_BuildingComponentSublayerExtension.BuildingComponentSublayerSchema.html +13 -73
  50. package/docs/html/classes/mapping_BuildingGroupSublayerExtension.BuildingGroupSublayerExtension.html +35 -97
  51. package/docs/html/classes/mapping_BuildingGroupSublayerExtension.BuildingGroupSublayerSchema.html +13 -73
  52. package/docs/html/classes/mapping_BuildingSceneLayerExtension.BuildingSceneLayerExtension.html +35 -97
  53. package/docs/html/classes/mapping_BuildingSceneLayerExtension.BuildingSceneLayerReadOnlySchema.html +13 -73
  54. package/docs/html/classes/mapping_BuildingSublayerExtension.BuildingSublayerExtension.html +35 -97
  55. package/docs/html/classes/mapping_BuildingSublayerExtension.BuildingSublayerFeatureSettings.html +11 -53
  56. package/docs/html/classes/mapping_BuildingSublayerExtension.BuildingSublayerSchema.html +13 -73
  57. package/docs/html/classes/mapping_CSVLayerExtension.CSVLayerExtension.html +35 -97
  58. package/docs/html/classes/mapping_ElevationLayerExtension.ElevationLayerExtension.html +35 -97
  59. package/docs/html/classes/mapping_FeatureCollectionLayerExtension.FeatureCollectionLayerExtension.html +35 -97
  60. package/docs/html/classes/mapping_FeatureLayerExtension.FeatureLayerExtension.html +35 -97
  61. package/docs/html/classes/mapping_FeatureLayerExtensionBase.FeatureLayerExtensionBase.html +35 -97
  62. package/docs/html/classes/mapping_FeatureLayerExtensionBase.FeatureLayerReadOnlySchema.html +13 -73
  63. package/docs/html/classes/mapping_FeatureLayerExtensionBase.FeatureLayerSchema.html +13 -73
  64. package/docs/html/classes/mapping_GeoJSONLayerExtension.GeoJSONLayerExtension.html +35 -97
  65. package/docs/html/classes/mapping_GeoRSSLayerExtension.GeoRSSLayerExtension.html +35 -97
  66. package/docs/html/classes/mapping_GraphicsLayerExtension.GraphicsLayerExtension.html +35 -97
  67. package/docs/html/classes/mapping_GroundExtension.GroundExtension.html +13 -75
  68. package/docs/html/classes/mapping_GroupLayerExtension.GroupLayerExtension.html +35 -97
  69. package/docs/html/classes/mapping_GroupLayerExtension.GroupLayerExtensionCollection.html +74 -23
  70. package/docs/html/classes/mapping_ImageryLayerExtension.ImageryLayerExtension.html +35 -97
  71. package/docs/html/classes/mapping_ImageryTileLayerExtension.ImageryTileLayerExtension.html +35 -97
  72. package/docs/html/classes/mapping_IntegratedMeshLayerExtension.IntegratedMeshLayerExtension.html +35 -97
  73. package/docs/html/classes/mapping_KMLLayerExtension.KMLLayerExtension.html +35 -97
  74. package/docs/html/classes/mapping_KMLSublayerExtension.KMLSublayerExtension.html +35 -97
  75. package/docs/html/classes/mapping_MapConstraints.MapConstraints.html +12 -72
  76. package/docs/html/classes/mapping_MapExtension.MapExtension.html +13 -75
  77. package/docs/html/classes/mapping_MapImageLayerExtension.MapImageLayerExtension.html +35 -97
  78. package/docs/html/classes/mapping_MapImageSublayerExtension.MapImageSublayerExtension.html +35 -97
  79. package/docs/html/classes/mapping_MapNotesLayerExtension.MapNotesLayerExtension.html +35 -97
  80. package/docs/html/classes/mapping_MapNotesSublayerExtension.MapNotesSublayerExtension.html +35 -97
  81. package/docs/html/classes/mapping_MapNotesSublayerExtension.MapNotesSublayerExtensionSchema.html +13 -73
  82. package/docs/html/classes/mapping_MediaLayerExtension.MediaLayerExtension.html +35 -97
  83. package/docs/html/classes/mapping_OpenStreetMapLayerExtension.OpenStreetMapLayerExtension.html +35 -97
  84. package/docs/html/classes/mapping_PointCloudLayerExtension.PointCloudLayerExtension.html +35 -97
  85. package/docs/html/classes/mapping_RouteLayerExtension.RouteLayerExtension.html +35 -97
  86. package/docs/html/classes/mapping_RouteLayerExtension.RouteLayerExtensionSchema.html +13 -73
  87. package/docs/html/classes/mapping_SceneLayerExtension.SceneLayerExtension.html +35 -97
  88. package/docs/html/classes/mapping_StreamLayerExtension.StreamLayerExtension.html +35 -97
  89. package/docs/html/classes/mapping_StreamLayerExtension.StreamLayerSchema.html +13 -73
  90. package/docs/html/classes/mapping_SubtypeGroupLayerExtension.SubtypeGroupLayerExtension.html +35 -97
  91. package/docs/html/classes/mapping_SubtypeGroupLayerExtension.SubtypeGroupLayerRelationshipCollection.html +72 -16
  92. package/docs/html/classes/mapping_SubtypeGroupLayerExtension.SubtypeGroupLayerSchema.html +13 -73
  93. package/docs/html/classes/mapping_SubtypeSublayerExtension.SubtypeSublayerExtension.html +35 -97
  94. package/docs/html/classes/mapping_SubtypeSublayerExtension.SubtypeSublayerRelationshipCollection.html +72 -16
  95. package/docs/html/classes/mapping_SubtypeSublayerExtension.SubtypeSublayerSchema.html +13 -73
  96. package/docs/html/classes/mapping_TileLayerExtension.TileLayerExtension.html +35 -97
  97. package/docs/html/classes/mapping_TileSublayerExtension.TileSublayerExtension.html +35 -97
  98. package/docs/html/classes/mapping_UnsupportedLayerExtension.UnsupportedLayerExtension.html +35 -97
  99. package/docs/html/classes/mapping_VectorTileLayerExtension.VectorTileLayerExtension.html +35 -97
  100. package/docs/html/classes/mapping_WFSLayerExtension.WFSLayerExtension.html +35 -97
  101. package/docs/html/classes/mapping_WMSLayerExtension.WMSLayerExtension.html +35 -97
  102. package/docs/html/classes/mapping_WMSSublayerExtension.WMSSublayerExtension.html +35 -97
  103. package/docs/html/classes/mapping_WMTSLayerExtension.WMTSLayerExtension.html +35 -97
  104. package/docs/html/classes/mapping_WebTileLayerExtension.WebTileLayerExtension.html +35 -97
  105. package/docs/html/classes/mapping__LayerExtension.LayerExtension.html +35 -97
  106. package/docs/html/classes/mapping__LayerExtension.LayerExtensionReadOnlySchema.html +13 -73
  107. package/docs/html/classes/mapping__LayerExtension.LayerExtensionSchema.html +13 -73
  108. package/docs/html/classes/mapping__LayerExtensionCollectionImpl.LayerExtensionCollectionImpl.html +74 -23
  109. package/docs/html/classes/mapping__SublayerExtension.SubSublayerExtensionCollection.html +74 -23
  110. package/docs/html/classes/mapping__SublayerExtension.SublayerExtension.html +35 -97
  111. package/docs/html/classes/mapping__SublayerExtension.SublayerSchema.html +13 -73
  112. package/docs/html/classes/mapping_support_ArrayWrappedCollection.ArrayWrappedCollection.html +72 -16
  113. package/docs/html/classes/mapping_support_LayerListSettings.ExtensionBaseLayerListSettings.html +9 -71
  114. package/docs/html/classes/mapping_support_LayerListSettings.LayerListSettings.html +10 -72
  115. package/docs/html/classes/mapping_support__LayerExtensionCollection.LayerExtensionCollectionBase.html +77 -26
  116. package/docs/html/classes/mapping_support__SublayerExtensionCollection.SublayerExtensionCollectionBase.html +77 -26
  117. package/docs/html/classes/menus_Menu.Menu.html +13 -75
  118. package/docs/html/classes/menus_MenuItem.MenuItem.html +13 -75
  119. package/docs/html/classes/support_FormatSettings.FormatSettings.html +12 -72
  120. package/docs/html/classes/support_InitializableBase.InitializableBase.html +21 -83
  121. package/docs/html/classes/support_InitializableCollectionProxy.InitializableCollectionProxy.html +73 -17
  122. package/docs/html/classes/support_Observable.Observable.html +27 -26
  123. package/docs/html/classes/support_ReadOnlyInitializableCollection.ReadOnlyInitializableCollection.html +73 -17
  124. package/docs/html/classes/support_Serializable.SerializableBase.html +38 -32
  125. package/docs/html/classes/support_Settings.Settings.html +15 -75
  126. package/docs/html/classes/support__ArcGISRelationshipCollection.ArcGISRelationshipCollection.html +72 -16
  127. package/docs/html/classes/support_observableUtils.ObservableMixin.html +3 -0
  128. package/docs/html/classes/tasks_geocoding_ArcGISGeocoder.ArcGISGeocoder.html +35 -97
  129. package/docs/html/classes/tasks_geocoding_Geocoder.Geocoder.html +33 -95
  130. package/docs/html/classes/tasks_identify_IdentifyService.IdentifyService.html +11 -73
  131. package/docs/html/classes/tasks_query_ArcGISRelationship.ArcGISRelationship.html +36 -30
  132. package/docs/html/classes/tasks_query_QueryBasedRelationship.QueryBasedRelationship.html +36 -30
  133. package/docs/html/classes/tasks_query_QueryService.QueryService.html +11 -73
  134. package/docs/html/classes/tasks_search_SearchService.SearchService.html +12 -74
  135. package/docs/html/classes/utilities_CaseInsensitiveObservableMap.CaseInsensitiveObservableMap.html +24 -27
  136. package/docs/html/classes/utilities_CollectionProxy.CollectionProxy.html +73 -17
  137. package/docs/html/classes/utilities_CopyOnWriteCollection.CopyOnWriteCollection.html +72 -16
  138. package/docs/html/classes/utilities_MapTransformCollection.MapTransformCollection.html +72 -16
  139. package/docs/html/classes/utilities_ObservableMap.ObservableMap.html +26 -32
  140. package/docs/html/classes/utilities_ObservableSet.ObservableSet.html +38 -32
  141. package/docs/html/classes/utilities_ObservableWeakSet.ObservableWeakSet.html +44 -42
  142. package/docs/html/classes/utilities_ReadOnlyCollection.ReadOnlyCollection.html +72 -16
  143. package/docs/html/classes/utilities_ReadOnlyMap.ReadOnlyMap.html +23 -29
  144. package/docs/html/classes/utilities_format_date.DateFormatter.html +37 -31
  145. package/docs/html/classes/utilities_format_number.NumberFormatter.html +37 -31
  146. package/docs/html/classes/utilities_format_time.TimeFormatter.html +37 -31
  147. package/docs/html/functions/support_Observable.deprecatedGetPropertyPath.html +7 -0
  148. package/docs/html/functions/support_Observable.deprecatedNotifyChange.html +5 -0
  149. package/docs/html/functions/support_Observable.deprecatedSet.html +9 -0
  150. package/docs/html/functions/support_Observable.deprecatedWatch.html +9 -0
  151. package/docs/html/functions/support_Observable.deprecatedWatchProperty.html +14 -0
  152. package/docs/html/functions/support_Observable.getPropertyByPath.html +3 -2
  153. package/docs/html/functions/support_observableUtils.createIHandle.html +8 -0
  154. package/docs/html/functions/support_observableUtils.notifyChange.html +8 -0
  155. package/docs/html/functions/support_observableUtils.observable-1.html +31 -0
  156. package/docs/html/functions/support_observableUtils.onWatch.html +14 -0
  157. package/docs/html/functions/support_observableUtils.once.html +11 -0
  158. package/docs/html/functions/support_observableUtils.watch.html +24 -0
  159. package/docs/html/functions/support_observableUtils.watchEach.html +33 -0
  160. package/docs/html/functions/support_observableUtils.watchEvent.html +12 -0
  161. package/docs/html/functions/support_observableUtils.when.html +9 -0
  162. package/docs/html/functions/support_observableUtils.whenOnce.html +9 -0
  163. package/docs/html/functions/utilities_checkArg.checkArg.html +1 -1
  164. package/docs/html/functions/utilities_watch.onCollectionPropertyChange.html +6 -1
  165. package/docs/html/functions/utilities_watch.watchCollectionPropertyEach.html +5 -4
  166. package/docs/html/functions/utilities_watch.watchEach.html +8 -6
  167. package/docs/html/hierarchy.html +1 -1
  168. package/docs/html/interfaces/data_ArcGISServiceTableExtension.ArcGISServiceTableExtensionProperties.html +1 -1
  169. package/docs/html/interfaces/data_Feature.PresentableAttributes.html +24 -30
  170. package/docs/html/interfaces/data_Schema.SchemaProperties.html +2 -2
  171. package/docs/html/interfaces/data__Relationship.Relationship-1.html +35 -29
  172. package/docs/html/interfaces/data__TableExtension.TableExtensionProperties.html +1 -1
  173. package/docs/html/interfaces/json_AnnotationLayerJson.AnnotationLayerJson.html +2 -2
  174. package/docs/html/interfaces/json_BasemapLayerJson.BasemapLayerJsonBase.html +2 -2
  175. package/docs/html/interfaces/json_BingLayerJson.BingLayerJson.html +2 -2
  176. package/docs/html/interfaces/json_BuildingSceneLayerJson.BuildingSceneLayerJson.html +2 -2
  177. package/docs/html/interfaces/json_CSVLayerJson.CSVLayerJson.html +2 -2
  178. package/docs/html/interfaces/json_FeatureLayerJson.FeatureLayerJson.html +2 -2
  179. package/docs/html/interfaces/json_GeoJSONLayerJson.GeoJSONLayerJson.html +2 -2
  180. package/docs/html/interfaces/json_GeoRSSLayerJson.GeoRSSLayerJson.html +2 -2
  181. package/docs/html/interfaces/json_GroupLayerJson.GroupLayerJson.html +2 -2
  182. package/docs/html/interfaces/json_ImageServiceLayerJson.ImageServiceLayerJson.html +2 -2
  183. package/docs/html/interfaces/json_ImageServiceVectorLayerJson.ImageServiceVectorLayerJson.html +2 -2
  184. package/docs/html/interfaces/json_IntegratedMeshLayerJson.IntegratedMeshLayerJson.html +2 -2
  185. package/docs/html/interfaces/json_ItemJson.ItemJson.html +2 -2
  186. package/docs/html/interfaces/json_KMLLayerJson.KMLLayerJson.html +2 -2
  187. package/docs/html/interfaces/json_LayerJson.LayerJsonBase.html +2 -2
  188. package/docs/html/interfaces/json_MapServiceLayerJson.MapServiceLayerJson.html +2 -2
  189. package/docs/html/interfaces/json_MediaLayerJson.MediaLayerJson.html +2 -2
  190. package/docs/html/interfaces/json_OpenStreetMapLayerJson.OpenStreetMapLayerJson.html +2 -2
  191. package/docs/html/interfaces/json_OperationalLayerJson.OperationalLayerJsonBase.html +2 -2
  192. package/docs/html/interfaces/json_PointCloudLayerJson.PointCloudLayerJson.html +2 -2
  193. package/docs/html/interfaces/json_RasterDataElevationLayerJson.RasterDataElevationLayerJson.html +2 -2
  194. package/docs/html/interfaces/json_SceneLayerJson.SceneLayerJson.html +2 -2
  195. package/docs/html/interfaces/json_StreamLayerJson.StreamLayerJson.html +2 -2
  196. package/docs/html/interfaces/json_SubtypeGroupLayerJson.SubtypeGroupLayerJson.html +2 -2
  197. package/docs/html/interfaces/json_SubtypeGroupLayerJson.SubtypeSubtypeGroupLayerJson.html +2 -2
  198. package/docs/html/interfaces/json_SubtypeSublayerJson.SubtypeSublayerJson.html +2 -2
  199. package/docs/html/interfaces/json_TiledElevationServiceLayerJson.TiledElevationServiceLayerJson.html +2 -2
  200. package/docs/html/interfaces/json_TiledImageServiceLayerJson.TiledImageServiceLayerJson.html +2 -2
  201. package/docs/html/interfaces/json_TiledMapServiceLayerJson.TiledMapServiceLayerJson.html +2 -2
  202. package/docs/html/interfaces/json_VectorTileLayerJson.VectorTileLayerJson.html +2 -2
  203. package/docs/html/interfaces/json_WFSLayerJson.WFSLayerJson.html +2 -2
  204. package/docs/html/interfaces/json_WMSLayerJson.WMSLayerJson.html +2 -2
  205. package/docs/html/interfaces/json_WebTileLayerJson.WebTileLayerJson.html +2 -2
  206. package/docs/html/interfaces/mapping_ArcGISSublayerExtension.ArcGISSublayerExtensionProperties.html +1 -1
  207. package/docs/html/interfaces/mapping_BuildingComponentSublayerExtension.BuildingComponentSublayerExtensionProperties.html +1 -1
  208. package/docs/html/interfaces/mapping_BuildingGroupSublayerExtension.BuildingGroupSublayerExtensionProperties.html +1 -1
  209. package/docs/html/interfaces/mapping_BuildingSceneLayerExtension.BuildingSceneLayerExtensionProperties.html +1 -1
  210. package/docs/html/interfaces/mapping_BuildingSceneLayerExtension.BuildingSceneLayerProperties.html +2 -2
  211. package/docs/html/interfaces/mapping_BuildingSublayerExtension.BuildingSublayerExtensionProperties.html +1 -1
  212. package/docs/html/interfaces/mapping_CSVLayerExtension.CSVLayerExtensionProperties.html +1 -1
  213. package/docs/html/interfaces/mapping_ElevationLayerExtension.ElevationLayerExtensionProperties.html +1 -1
  214. package/docs/html/interfaces/mapping_FeatureLayerExtension.FeatureLayerExtensionProperties.html +1 -1
  215. package/docs/html/interfaces/mapping_FeatureLayerExtension.FeatureLayerProperties.html +2 -2
  216. package/docs/html/interfaces/mapping_FeatureLayerExtensionBase.FeatureLayerBaseProperties.html +2 -2
  217. package/docs/html/interfaces/mapping_FeatureLayerExtensionBase.FeatureLayerExtensionBaseProperties.html +1 -1
  218. package/docs/html/interfaces/mapping_GeoJSONLayerExtension.GeoJSONLayerExtensionProperties.html +1 -1
  219. package/docs/html/interfaces/mapping_GeoRSSLayerExtension.GeoRSSLayerExtensionProperties.html +1 -1
  220. package/docs/html/interfaces/mapping_GraphicsLayerExtension.GraphicsLayerExtensionProperties.html +1 -1
  221. package/docs/html/interfaces/mapping_GroupLayerExtension.GroupLayerExtensionProperties.html +1 -1
  222. package/docs/html/interfaces/mapping_ImageryLayerExtension.ImageryLayerExtensionProperties.html +1 -1
  223. package/docs/html/interfaces/mapping_ImageryTileLayerExtension.ImageryTileLayerExtensionProperties.html +1 -1
  224. package/docs/html/interfaces/mapping_IntegratedMeshLayerExtension.IntegratedMeshLayerExtensionProperties.html +1 -1
  225. package/docs/html/interfaces/mapping_KMLLayerExtension.KMLLayerExtensionProperties.html +1 -1
  226. package/docs/html/interfaces/mapping_KMLSublayerExtension.KMLSublayerExtensionProperties.html +1 -1
  227. package/docs/html/interfaces/mapping_MapExtension.MapExtensionProperties.html +3 -3
  228. package/docs/html/interfaces/mapping_MapImageLayerExtension.MapImageLayerExtensionProperties.html +4 -4
  229. package/docs/html/interfaces/mapping_MapImageSublayerExtension.MapImageSublayerExtensionProperties.html +1 -1
  230. package/docs/html/interfaces/mapping_MapNotesLayerExtension.MapNotesLayerExtensionProperties.html +1 -1
  231. package/docs/html/interfaces/mapping_MapNotesSublayerExtension.MapNotesSublayerExtensionProperties.html +1 -1
  232. package/docs/html/interfaces/mapping_MediaLayerExtension.MediaLayerExtensionProperties.html +1 -1
  233. package/docs/html/interfaces/mapping_OpenStreetMapLayerExtension.OpenStreetMapLayerExtensionProperties.html +1 -1
  234. package/docs/html/interfaces/mapping_PointCloudLayerExtension.PointCloudLayerExtensionProperties.html +1 -1
  235. package/docs/html/interfaces/mapping_PointCloudLayerExtension.PointCloudLayerProperties.html +2 -2
  236. package/docs/html/interfaces/mapping_RouteLayerExtension.RouteLayerExtensionProperties.html +1 -1
  237. package/docs/html/interfaces/mapping_SceneLayerExtension.SceneLayerExtensionProperties.html +1 -1
  238. package/docs/html/interfaces/mapping_StreamLayerExtension.StreamLayerExtensionProperties.html +1 -1
  239. package/docs/html/interfaces/mapping_SubtypeGroupLayerExtension.SubtypeGroupLayerExtensionProperties.html +1 -1
  240. package/docs/html/interfaces/mapping_SubtypeSublayerExtension.SubtypeSublayerExtensionProperties.html +1 -1
  241. package/docs/html/interfaces/mapping_TileLayerExtension.TileLayerExtensionProperties.html +1 -1
  242. package/docs/html/interfaces/mapping_TileSublayerExtension.TileSublayerExtensionProperties.html +1 -1
  243. package/docs/html/interfaces/mapping_VectorTileLayerExtension.VectorTileLayerExtensionProperties.html +1 -1
  244. package/docs/html/interfaces/mapping_WFSLayerExtension.WFSLayerExtensionProperties.html +1 -1
  245. package/docs/html/interfaces/mapping_WMSLayerExtension.WMSLayerExtensionProperties.html +1 -1
  246. package/docs/html/interfaces/mapping_WMSSublayerExtension.WMSSublayerExtensionProperties.html +1 -1
  247. package/docs/html/interfaces/mapping_WMTSLayerExtension.WMTSLayerExtensionProperties.html +1 -1
  248. package/docs/html/interfaces/mapping_WebTileLayerExtension.WebTileLayerExtensionProperties.html +1 -1
  249. package/docs/html/interfaces/mapping__LayerExtension.LayerExtensionProperties.html +1 -1
  250. package/docs/html/interfaces/mapping__SublayerExtension.SublayerExtensionProperties.html +1 -1
  251. package/docs/html/interfaces/mapping_support_ArrayWrappedCollection.ArrayWrappedCollectionProperties.html +3 -3
  252. package/docs/html/interfaces/support_InitializableBase.Initializable.html +1 -1
  253. package/docs/html/interfaces/support_Observable.IDeprecatedObservable.html +57 -0
  254. package/docs/html/interfaces/support_Serializable.Serializable.html +60 -5
  255. package/docs/html/interfaces/support_esri.SublayerLike.html +2 -29
  256. package/docs/html/interfaces/support_observableUtils.IHandle.html +9 -0
  257. package/docs/html/interfaces/support_observableUtils.WatchEachOptions.html +29 -0
  258. package/docs/html/interfaces/support_observableUtils.WatchOptions.html +26 -0
  259. package/docs/html/interfaces/utilities_collection.AfterItemChangeEvent.html +4 -0
  260. package/docs/html/modules/support_Observable.html +8 -2
  261. package/docs/html/modules/support_esri.html +4 -3
  262. package/docs/html/modules/support_observableUtils.html +20 -0
  263. package/docs/html/modules/utilities_ObservableWeakSet.html +1 -1
  264. package/docs/html/modules/utilities_collection.html +1 -0
  265. package/docs/html/modules/utilities_watch.html +4 -4
  266. package/docs/html/modules.html +1 -0
  267. package/docs/html/types/support_esri.CollectionAfterEvent.html +1 -0
  268. package/docs/html/types/support_esri.CollectionAfterItemEvent.html +1 -1
  269. package/docs/html/types/support_esri.CollectionEvent.html +1 -0
  270. package/docs/html/types/support_esri.CollectionItemEvent.html +1 -0
  271. package/docs/html/types/support_observableUtils.Observable.html +5 -0
  272. package/docs/html/types/support_observableUtils.ObservablePropertyPath.html +9 -0
  273. package/docs/html/types/support_observableUtils.TargetTypeFromPath.html +14 -0
  274. package/docs/html/types/support_observableUtils.ValueTypeFromPath.html +14 -0
  275. package/docs/html/types/support_observableUtils.WhenOptions.html +7 -0
  276. package/docs/html/types/utilities_watch.WatchCallback.html +3 -0
  277. package/docs/html/variables/version.version.html +1 -1
  278. package/layer-preset/LayerPreset.js +1 -1
  279. package/mapping/ArcGISSublayerExtension.js +1 -1
  280. package/mapping/BasemapExtension.d.ts +1 -1
  281. package/mapping/BasemapExtension.js +1 -1
  282. package/mapping/BuildingComponentSublayerExtension.js +1 -1
  283. package/mapping/CSVLayerExtension.js +1 -1
  284. package/mapping/FeatureLayerExtension.js +1 -1
  285. package/mapping/FeatureLayerExtensionBase.js +1 -1
  286. package/mapping/GeoJSONLayerExtension.js +1 -1
  287. package/mapping/GeoRSSLayerExtension.js +1 -1
  288. package/mapping/GraphicsLayerExtension.js +1 -1
  289. package/mapping/GroundExtension.js +1 -1
  290. package/mapping/GroupLayerExtension.js +1 -1
  291. package/mapping/ImageryLayerExtension.js +1 -1
  292. package/mapping/KMLLayerExtension.js +1 -1
  293. package/mapping/MapExtension.d.ts +1 -1
  294. package/mapping/MapExtension.js +1 -1
  295. package/mapping/MapNotesSublayerExtension.js +1 -1
  296. package/mapping/PointCloudLayerExtension.js +1 -1
  297. package/mapping/RouteLayerExtension.js +1 -1
  298. package/mapping/SceneLayerExtension.js +1 -1
  299. package/mapping/StreamLayerExtension.js +1 -1
  300. package/mapping/SubtypeGroupLayerExtension.js +1 -1
  301. package/mapping/SubtypeSublayerExtension.js +1 -1
  302. package/mapping/WFSLayerExtension.js +1 -1
  303. package/mapping/WMTSLayerExtension.js +1 -1
  304. package/mapping/_LayerExtension.js +1 -1
  305. package/mapping/_SublayerExtension.d.ts +1 -1
  306. package/mapping/_SublayerExtension.js +1 -1
  307. package/mapping/support/ArrayWrappedCollection.d.ts +3 -3
  308. package/mapping/support/ArrayWrappedCollection.js +1 -1
  309. package/mapping/support/LayerListSettings.d.ts +3 -1
  310. package/mapping/support/LayerListSettings.js +1 -1
  311. package/mapping/support/PopupTemplateFeatureSettings.js +1 -1
  312. package/mapping/support/_LayerExtensionCollection.d.ts +19 -4
  313. package/mapping/support/_LayerExtensionCollection.js +1 -1
  314. package/mapping/support/_SublayerExtensionCollection.d.ts +19 -4
  315. package/mapping/support/_SublayerExtensionCollection.js +1 -1
  316. package/package.json +1 -1
  317. package/portal/BuildingSceneLayer.js +1 -1
  318. package/portal/SubtypeGroupLayer.js +1 -1
  319. package/portal/WMSLayer.js +1 -1
  320. package/support/InitializableBase.d.ts +12 -3
  321. package/support/InitializableBase.js +1 -1
  322. package/support/InitializeError.js +1 -1
  323. package/support/Observable.d.ts +164 -14
  324. package/support/Observable.js +1 -1
  325. package/support/Serializable.d.ts +40 -3
  326. package/support/Serializable.js +1 -1
  327. package/support/Settings.d.ts +6 -7
  328. package/support/Settings.js +1 -1
  329. package/support/esri.d.ts +6 -52
  330. package/support/observableUtils.d.ts +560 -0
  331. package/support/observableUtils.js +1 -0
  332. package/tasks/geocoding/ArcGISGeocoder.js +1 -1
  333. package/tasks/query/ClientSideQueryProvider.js +1 -1
  334. package/utilities/CollectionProxy.d.ts +54 -23
  335. package/utilities/CollectionProxy.js +1 -1
  336. package/utilities/MapTransformCollection.js +1 -1
  337. package/utilities/ObservableMap.d.ts +35 -4
  338. package/utilities/ObservableMap.js +1 -1
  339. package/utilities/ObservableSet.d.ts +44 -3
  340. package/utilities/ObservableSet.js +1 -1
  341. package/utilities/ObservableWeakSet.d.ts +3 -0
  342. package/utilities/ReadOnlyMap.d.ts +15 -2
  343. package/utilities/ReadOnlyMap.js +1 -1
  344. package/utilities/collection.d.ts +9 -0
  345. package/utilities/collection.js +1 -1
  346. package/utilities/watch.d.ts +25 -7
  347. package/utilities/watch.js +1 -1
  348. package/version.d.ts +1 -1
  349. package/version.js +1 -1
  350. package/docs/html/interfaces/support_esri.AccessorLike.html +0 -29
  351. package/docs/html/types/support_esri.WatchCallback.html +0 -3
@@ -2,12 +2,13 @@ import type Collection from "@arcgis/core/core/Collection";
2
2
  import type { FailureMode } from "../FailureMode.js";
3
3
  import type { EventCallback } from "../support/esri.js";
4
4
  import { InitializeError } from "./InitializeError.js";
5
- import type { PropertyDefs } from "./Serializable.js";
5
+ import type { PropertyDefs, SerializeMode } from "./Serializable.js";
6
6
  import { SerializableBase } from "./Serializable.js";
7
+ import type { ObservableMixin } from "./observableUtils.js";
7
8
  /**
8
9
  * Represents an item that can be initialized.
9
10
  */
10
- export interface Initializable {
11
+ export interface Initializable extends ObservableMixin {
11
12
  /**
12
13
  * Indicates if the item has been initialized.
13
14
  */
@@ -57,10 +58,11 @@ export interface InitializableBaseProperties {
57
58
  */
58
59
  failureMode?: FailureMode;
59
60
  }
61
+ declare const InitializableBase_base: (abstract new (_properties?: InitializableBaseProperties) => SerializableBase<InitializableBaseProperties>) & (abstract new (...args: any[]) => ObservableMixin);
60
62
  /**
61
63
  * A base class that contains logic for initializing items.
62
64
  */
63
- export declare abstract class InitializableBase<TProperties extends InitializableBaseProperties = InitializableBaseProperties> extends SerializableBase<TProperties> implements Initializable {
65
+ export declare abstract class InitializableBase<TProperties extends InitializableBaseProperties = InitializableBaseProperties> extends InitializableBase_base implements Initializable {
64
66
  /**
65
67
  * See {@link support/InitializableBase!Initializable.isInitialized}.
66
68
  */
@@ -96,6 +98,12 @@ export declare abstract class InitializableBase<TProperties extends Initializabl
96
98
  destroy(): Promise<void>;
97
99
  on(name: string | string[], callback: EventCallback<any>): IHandle;
98
100
  emit(name: string, event: unknown): boolean;
101
+ toJSON(serializeMode?: SerializeMode): TProperties;
102
+ assignProperties(properties: Partial<TProperties>): void;
103
+ assignPropertiesAsync(properties: Partial<TProperties>): Promise<void>;
104
+ getDefaults(): TProperties;
105
+ getDefault<K extends keyof TProperties>(key: K): TProperties[K];
106
+ getSerializableProperties(serializeMode?: SerializeMode): PropertyDefs<TProperties>;
99
107
  protected _getSerializableProperties(): PropertyDefs<TProperties>;
100
108
  /**
101
109
  * Called to perform initialization of the
@@ -146,3 +154,4 @@ export interface InitializeCollectionOptions {
146
154
  * thrown by collection items with failureMode "warn".
147
155
  */
148
156
  export declare function initializeCollection<T extends InitializableBase = InitializableBase>(collection: Collection<T>, options?: InitializeCollectionOptions): Promise<void>;
157
+ export {};
@@ -1 +1 @@
1
- import{getLogger as i}from"../utilities/log.js";import{parallelEach as e}from"../utilities/promise.js";import{InitializeError as t}from"./InitializeError.js";import{SerializableBase as r}from"./Serializable.js";export class InitializableBase extends r{get isInitialized(){return this._isInitialized}get isDestroyed(){return this._isDestroyed}get failureMode(){return this._failureMode}set failureMode(i){this._failureMode=i}_isInitialized=!1;_isDestroyed=!1;_initializePromise;_destroyPromise;_failureMode="warn";async initialize(){return void 0===this._initializePromise&&(this._initializePromise=(async()=>{try{await this.finishAssignProperties(),await this._onInitialize(),await this._initializeChildren(),await this._postInitialize()}catch(i){throw i instanceof Error?(this._initializePromise=void 0,new t(this.failureMode,i,this)):i}this._isInitialized=!0,this.notifyChange("isInitialized")})()),this._initializePromise}async destroy(){return void 0===this._destroyPromise&&(this._destroyPromise=(async()=>{try{await this._onDestroy()}catch(i){throw this._destroyPromise=void 0,i}this._isDestroyed=!0,this.notifyChange("isDestroyed")})()),this._destroyPromise}on(i,e){return super.on(i,e)}emit(i,e){return super.emit(i,e)}_getSerializableProperties(){return{...super._getSerializableProperties(),failureMode:{serializeModes:["initial"],default:"warn"}}}async _onInitialize(){}async _postInitialize(){}async _onDestroy(){}async _initializeChildren(){await e(this._initializableChildCollections(),(i=>initializeCollection(i,{target:this,onInitializeWarning:i=>this.emit("initializeWarning",i)})))}*_initializableChildCollections(){}}const s={onInitializeWarning:()=>{}};export async function initializeCollection(r,a=s){const{onInitializeWarning:n,target:o}=a;await e(r.toArray(),(async e=>{const r=e.on("initializeWarning",n);try{await e.initialize()}catch(r){const s=r instanceof t?r:new t(e.failureMode,r,e);if("error"===s.failureMode)throw s;"warn"===s.failureMode&&i("geocortex.api.support.InitializeBase").warn({message:"Error attempting to initialize child item: {0}.",error:s},s.error.message);n({error:s,target:o})}finally{r.remove()}}))}
1
+ import{getLogger as i}from"../utilities/log.js";import{parallelEach as e}from"../utilities/promise.js";import{InitializeError as t}from"./InitializeError.js";import{SerializableBase as r}from"./Serializable.js";import{notifyChange as s,observable as a}from"./observableUtils.js";export class InitializableBase extends(a(r)){get isInitialized(){return this._isInitialized}get isDestroyed(){return this._isDestroyed}get failureMode(){return this._failureMode}set failureMode(i){this._failureMode=i}_isInitialized=!1;_isDestroyed=!1;_initializePromise;_destroyPromise;_failureMode="warn";async initialize(){return void 0===this._initializePromise&&(this._initializePromise=(async()=>{try{await this.finishAssignProperties(),await this._onInitialize(),await this._initializeChildren(),await this._postInitialize()}catch(i){throw i instanceof Error?(this._initializePromise=void 0,new t(this.failureMode,i,this)):i}this._isInitialized=!0,s(this,"isInitialized")})()),this._initializePromise}async destroy(){return void 0===this._destroyPromise&&(this._destroyPromise=(async()=>{try{await this._onDestroy()}catch(i){throw this._destroyPromise=void 0,i}this._isDestroyed=!0,s(this,"isDestroyed")})()),this._destroyPromise}on(i,e){return super.on(i,e)}emit(i,e){return super.emit(i,e)}toJSON(i="all"){return super.toJSON(i)}assignProperties(i){super.assignProperties(i)}assignPropertiesAsync(i){return super.assignPropertiesAsync(i)}getDefaults(){return super.getDefaults()}getDefault(i){return super.getDefault(i)}getSerializableProperties(i){return super.getSerializableProperties(i)}_getSerializableProperties(){return{...super._getSerializableProperties(),failureMode:{serializeModes:["initial"],default:"warn"}}}async _onInitialize(){}async _postInitialize(){}async _onDestroy(){}async _initializeChildren(){await e(this._initializableChildCollections(),(i=>initializeCollection(i,{target:this,onInitializeWarning:i=>this.emit("initializeWarning",i)})))}*_initializableChildCollections(){}}const n={onInitializeWarning:()=>{}};export async function initializeCollection(r,s=n){const{onInitializeWarning:a,target:o}=s;await e(r.toArray(),(async e=>{const r=e.on("initializeWarning",a);try{await e.initialize()}catch(r){const s=r instanceof t?r:new t(e.failureMode,r,e);if("error"===s.failureMode)throw s;"warn"===s.failureMode&&i("geocortex.api.support.InitializeBase").warn({message:"Error attempting to initialize child item: {0}.",error:s},s.error.message);a({error:s,target:o})}finally{r.remove()}}))}
@@ -1 +1 @@
1
- import{format as r}from"../utilities/format/string.js";export class InitializeError extends Error{failureMode;error;target;constructor(i,t,e,o,...s){super(r(o||"Failed to initialize item: {0}.",...o?s:[t])),this.name="InitializeError",this.failureMode=i,this.error=t,this.target=e}}
1
+ import{format as r}from"../utilities/format/string.js";export class InitializeError extends Error{failureMode;error;target;constructor(i,t,e,o,...s){super(r(o||"Failed to initialize item: {0}.",...o?s:[t])),this.name="InitializeError",this.failureMode=i,this.error=t,this.cause=t,this.target=e}}
@@ -1,13 +1,19 @@
1
1
  import Evented from "@arcgis/core/core/Evented";
2
- import type { AccessorLike, WatchCallback } from "./esri.js";
2
+ import type { WatchCallback } from "../utilities/watch.js";
3
+ import { type ObservableMixin } from "./observableUtils.js";
4
+ declare const Observable_base: typeof Evented & (abstract new (...args: any[]) => ObservableMixin);
3
5
  /**
4
6
  * An object whose properties can be observed for changes.
7
+ *
8
+ * @deprecated See {@link support/observableUtils!observable} instead.
5
9
  */
6
- export declare class Observable extends Evented implements AccessorLike {
10
+ export declare class Observable extends Observable_base {
7
11
  constructor();
8
12
  /**
9
13
  * Watches for property changes.
10
14
  *
15
+ * @deprecated See {@link support/observableUtils!observable} and
16
+ * {@link support/observableUtils!watch} instead.
11
17
  * @param path The property (or list of properties) to watch for changes.
12
18
  * @param callback The callback to invoke when the property has changed.
13
19
  * This callback will always be invoked _asynchronously_.
@@ -18,6 +24,7 @@ export declare class Observable extends Evented implements AccessorLike {
18
24
  /**
19
25
  * Gets the value of a property.
20
26
  *
27
+ * @deprecated This function is deprecated. Access the property directly.
21
28
  * @param propertyPath The name of the property to get. It can also be a
22
29
  * path to a property deeper in the instance, for example "foo.bar.baz".
23
30
  * If a property in the path doesn't exist, then the result will be
@@ -28,6 +35,7 @@ export declare class Observable extends Evented implements AccessorLike {
28
35
  /**
29
36
  * Sets the value of a property.
30
37
  *
38
+ * @deprecated This function is deprecated. Access the property directly.
31
39
  * @param propertyPath The name of the property to set. It can also be a
32
40
  * path to a property deeper in the instance, for example "foo.bar.baz".
33
41
  * If a property along the way doesn't exist, then nothing will be set.
@@ -37,6 +45,7 @@ export declare class Observable extends Evented implements AccessorLike {
37
45
  /**
38
46
  * Sets the values of one or more properties.
39
47
  *
48
+ * @deprecated This function is deprecated. Access the property directly.
40
49
  * @param properties An object containing key/value pairs of properties to
41
50
  * set.
42
51
  */
@@ -45,6 +54,8 @@ export declare class Observable extends Evented implements AccessorLike {
45
54
  * Indicates that the given property might have changed, causing observers
46
55
  * to be notified if it did.
47
56
  *
57
+ * @deprecated See {@link support/observableUtils!observable} and
58
+ * {@link support/observableUtils!notifyChange} instead.
48
59
  * @param propertyKey The property that changed (or might have changed).
49
60
  */
50
61
  notifyChange(propertyKey: keyof this): void;
@@ -54,6 +65,8 @@ export declare class Observable extends Evented implements AccessorLike {
54
65
  * instead of watch(), which will automatically take care of handling
55
66
  * multiple properties and nesting.
56
67
  *
68
+ * @deprecated See {@link support/observableUtils!observable} and
69
+ * {@link support/observableUtils!watch} instead.
57
70
  * @param propertyKey The root of the property path, e.g. "foo" in
58
71
  * "foo.bar.baz" or "foo".
59
72
  * @param subpath The remainder of the property path, e.g. "bar.baz" in
@@ -65,18 +78,6 @@ export declare class Observable extends Evented implements AccessorLike {
65
78
  * future tick.
66
79
  */
67
80
  protected _watchProperty(propertyKey: keyof this, subpath: string, callback: WatchCallback, sync: boolean): IHandle;
68
- /**
69
- * Indicates that the given property has changed, causing observers to be
70
- * notified.
71
- *
72
- * @deprecated This function is no longer supported. Use `notifyChange()`
73
- * instead. The `force=true` behavior is no longer possible.
74
- * @param property The property that changed.
75
- * @param force Whether to always invoke the callback, even if the value
76
- * hasn't changed. NO LONGER SUPPORTED. This will always effectively be
77
- * `false`.
78
- */
79
- protected _notifyChange(property: keyof this, force?: boolean): void;
80
81
  }
81
82
  /**
82
83
  * Gets the value of a property by specifying a path.
@@ -84,9 +85,158 @@ export declare class Observable extends Evented implements AccessorLike {
84
85
  * This is equivalent to the `get()` method on an Accessor-like object, only it
85
86
  * can be used on any object.
86
87
  *
88
+ * @deprecated This function is deprecated. Access the property directly.
87
89
  * @param object The object to read.
88
90
  * @param path The name of the property to get. It can also be a path to a
89
91
  * property deeper in the instance, for example "foo.bar.baz". If a property
90
92
  * in the path doesn't exist, then the result will be undefined.
91
93
  */
92
94
  export declare function getPropertyByPath<T = unknown>(object: object, path: string): T;
95
+ /**
96
+ * @deprecated See {@link support/observableUtils!observable} instead.
97
+ */
98
+ export interface IDeprecatedObservable {
99
+ /**
100
+ * Watches for property changes.
101
+ *
102
+ * @deprecated See {@link support/observableUtils!observable} and
103
+ * {@link support/observableUtils!watch} instead.
104
+ * @param path The property (or list of properties) to watch for changes.
105
+ * @param callback The callback to invoke when the property has changed.
106
+ * This callback will always be invoked _asynchronously_.
107
+ * @param sync Whether to invoke the callback synchronously. The default is
108
+ * false.
109
+ */
110
+ watch(path: string | string[], callback: WatchCallback, sync?: boolean): IHandle;
111
+ /**
112
+ * Gets the value of a property.
113
+ *
114
+ * @deprecated This function is deprecated. Access the property directly.
115
+ * @param propertyPath The name of the property to get. It can also be a
116
+ * path to a property deeper in the instance, for example "foo.bar.baz".
117
+ * If a property in the path doesn't exist, then the result will be
118
+ * undefined.
119
+ */
120
+ get<T>(propertyPath: string): T;
121
+ /**
122
+ * Gets the value of a property.
123
+ *
124
+ * @deprecated This function is deprecated. Access the property directly.
125
+ * @param propertyPath The name of the property to get. It can also be a
126
+ * path to a property deeper in the instance, for example "foo.bar.baz".
127
+ * If a property in the path doesn't exist, then the result will be
128
+ * undefined.
129
+ */
130
+ get(propertyPath: string): any;
131
+ /**
132
+ * Sets the value of a property.
133
+ *
134
+ * @deprecated This function is deprecated. Access the property directly.
135
+ * @param propertyPath The name of the property to set. It can also be a
136
+ * path to a property deeper in the instance, for example "foo.bar.baz".
137
+ * If a property along the way doesn't exist, then nothing will be set.
138
+ * @param value The new value to set on the property.
139
+ */
140
+ set<T>(propertyPath: string, value: T): this;
141
+ /**
142
+ * Sets the values of one or more properties.
143
+ *
144
+ * @deprecated This function is deprecated. Access the property directly.
145
+ * @param properties An object containing key/value pairs of properties to
146
+ * set.
147
+ */
148
+ set(properties: HashMap<any>): this;
149
+ /**
150
+ * Indicates that the given property might have changed, causing observers
151
+ * to be notified if it did.
152
+ *
153
+ * @deprecated See {@link support/observableUtils!observable} and
154
+ * {@link support/observableUtils!notifyChange} instead.
155
+ * @param propertyKey The property that changed (or might have changed).
156
+ */
157
+ notifyChange(propertyKey: keyof this): void;
158
+ /**
159
+ * Implements the watch() behavior for a single property. Subclasses that
160
+ * need specialized watch handling should generally override this function
161
+ * instead of watch(), which will automatically take care of handling
162
+ * multiple properties and nesting.
163
+ *
164
+ * @deprecated See {@link support/observableUtils!observable} and
165
+ * {@link support/observableUtils!watch} instead.
166
+ * @param propertyKey The root of the property path, e.g. "foo" in
167
+ * "foo.bar.baz" or "foo".
168
+ * @param subpath The remainder of the property path, e.g. "bar.baz" in
169
+ * "foo.bar.baz" or "" in "foo". The implementation of watch() takes care
170
+ * of monitoring the subpath for changes.
171
+ * @param callback The callback to invoke.
172
+ * @param sync If true, the callback will be invoked synchronously on the
173
+ * same tick that the property changed. Otherwise, it will be invoked in a
174
+ * future tick.
175
+ */
176
+ _watchProperty(propertyKey: keyof this, subpath: string, callback: WatchCallback, sync: boolean): IHandle;
177
+ }
178
+ /**
179
+ * Helper function to use with {@link support/Observable!IDeprecatedObservable}
180
+ * to implement watch on classes that no longer inherit from Observable.
181
+ *
182
+ * @deprecated
183
+ * @param obj The object to watch.
184
+ * @param path The property (or list of properties) to watch for changes.
185
+ * @param callback The callback to invoke when the property has changed. This
186
+ * callback will always be invoked _asynchronously_.
187
+ * @param sync Whether to invoke the callback synchronously. The default is
188
+ * false.
189
+ */
190
+ export declare function deprecatedWatch(obj: ObservableMixin, path: string | string[], callback: WatchCallback, sync?: boolean): IHandle;
191
+ /**
192
+ * Helper function to use with {@link support/Observable!IDeprecatedObservable}
193
+ * to implement notifyChange on classes that no longer inherit from Observable.
194
+ *
195
+ * @deprecated
196
+ * @param obj The object with the property to notify on.
197
+ * @param propertyKey The property that changed (or might have changed).
198
+ */
199
+ export declare function deprecatedNotifyChange<T extends ObservableMixin>(obj: T, propertyKey: keyof T): void;
200
+ /**
201
+ * Helper function to use with {@link support/Observable!IDeprecatedObservable}
202
+ * to implement set on classes that no longer inherit from Observable.
203
+ *
204
+ * @deprecated
205
+ * @param obj The object to set the property on.
206
+ * @param pathOrProperties An object containing key/value pairs of properties to
207
+ * set or the name of the property to set. It can also be a path to a property
208
+ * deeper in the instance, for example "foo.bar.baz". If a property along the
209
+ * way doesn't exist, then nothing will be set.
210
+ * @param value The new value to set on the property.
211
+ */
212
+ export declare function deprecatedSet<T>(obj: T, pathOrProperties: string | HashMap<unknown>, value?: unknown): T;
213
+ /**
214
+ * Helper function to use with {@link support/Observable!IDeprecatedObservable}
215
+ * to implement get on classes that no longer inherit from Observable.
216
+ *
217
+ * @deprecated
218
+ * @param obj The object to read.
219
+ * @param propertyPath The name of the property to get. It can also be a path to
220
+ * a property deeper in the instance, for example "foo.bar.baz". If a property
221
+ * in the path doesn't exist, then the result will be undefined.
222
+ */
223
+ export declare function deprecatedGetPropertyPath<T>(obj: object, propertyPath: string): T;
224
+ /**
225
+ * Helper function to use with {@link support/Observable!IDeprecatedObservable}
226
+ * to implement _watchProperty on classes that no longer inherit from
227
+ * Observable.
228
+ *
229
+ * @deprecated
230
+ * @param obj The object to watch.
231
+ * @param propertyKey The root of the property path, e.g. "foo" in "foo.bar.baz"
232
+ * or "foo".
233
+ * @param subpath The remainder of the property path, e.g. "bar.baz" in
234
+ * "foo.bar.baz" or "" in "foo". The implementation of watch() takes care of
235
+ * monitoring the subpath for changes.
236
+ * @param callback The callback to invoke.
237
+ * @param sync If true, the callback will be invoked synchronously on the same
238
+ * tick that the property changed. Otherwise, it will be invoked in a future
239
+ * tick.
240
+ */
241
+ export declare function deprecatedWatchProperty<T extends ObservableMixin>(obj: T, propertyKey: keyof T, subpath: string, callback: WatchCallback, sync?: boolean): IHandle;
242
+ export {};
@@ -1 +1 @@
1
- import t from"@arcgis/core/core/Evented";import{Property as e}from"@arcgis/core/core/accessorSupport/Property";import{trackAccess as o}from"@arcgis/core/core/accessorSupport/tracking";const r=new WeakMap;class s extends e{invalidated=!0;_oldValue;get oldValue(){return this._oldValue}set oldValue(t){this._oldValue=t,this.invalidated=!1}constructor(t){super(t,{})}onInvalidated(){this.invalidated=!0,super.onInvalidated()}}export class Observable extends t{constructor(){super();const t=new Map,e=new Proxy(this,{get(e,r,i){let n=t.get(r);return n||(n=new s(String(r)),t.set(r,n)),o(n),Reflect.get(e,r,i)},set(e,o,r,s){Reflect.set(e,o,r,s);const i=t.get(o);if(i){if(!i.invalidated&&r===i.oldValue)return!0;i.invalidate(),i.oldValue=r,i.commit()}return!0}});return r.set(e,t),e}watch(t,e,o=!1){const r=[].concat(t),s=[];for(const t of r){const[r,i]=t.split(/\.(.*)/);if(i?.length){let n;const a=this[r];a&&"function"==typeof a.watch&&(n=a.watch(i,((o,r)=>{e(o,r,t,this)}),o));const l=this._watchProperty(r,i,((r,s)=>{n&&n.remove(),r&&"function"==typeof r.watch&&(n=r.watch(i,((o,r)=>{e(o,r,t,this)}),o));const a="object"==typeof s?getPropertyByPath(s,i):void 0,l=this.get(t);e(l,a,t,this)}),o);s.push({remove:()=>{l.remove(),n&&n.remove()}})}else s.push(this._watchProperty(r,"",e,o))}return{remove:()=>{for(const t of s)t.remove()}}}get(t){return getPropertyByPath(this,t)}set(t,e){if(!t)return this;if("string"==typeof t){const o=t.split(".");let r=this;for(;r&&"object"==typeof r&&o.length>1;)r=r[o.shift()];r&&"object"==typeof r&&(r[o[0]]=e)}else for(const e of Object.keys(t))this.set(e,t[e]);return this}notifyChange(t){const e=r.get(this).get(t);e&&(e.invalidate(),e.commit())}_watchProperty(t,e,o,a){const l=a?new i:new n;l.callback=o,l.oldValue=this[t];const c=r.get(this);let h=c.get(t);h||(h=new s(String(t)),c.set(t,h)),l.property=h,l.target=this;const d=h.observe(l);return{remove:()=>{l.removed=!0,d.remove()}}}_notifyChange(t,e=!1){console.warn("Observable._notifyChange() is deprecated and will be removed in a future update. Use notifyChange() instead."),this.notifyChange(t)}}export function getPropertyByPath(t,e){if(!e)return;const o=e.split(".");let r=t;for(;r&&"object"==typeof r&&o.length;)r=r[o.shift()];return o.length?void 0:r}class i{oldValue;callback;property;target;removed=!1;onInvalidated(){}onCommitted(){const{target:t}=this,{propertyName:e}=this.property,o=t[e];this.oldValue===o||this.removed||(this.callback(o,this.oldValue,e,t),this.oldValue=o)}}class n{oldValue;callback;property;target;removed=!1;_notifyPending=!1;onInvalidated(){}onCommitted(){this._notifyPending||(this._notifyPending=!0,queueMicrotask((()=>{this._notifyPending=!1;const{target:t}=this,{propertyName:e}=this.property,o=t[e];this.oldValue===o||this.removed||(this.callback(o,this.oldValue,e,t),this.oldValue=o)})))}}
1
+ import e from"@arcgis/core/core/Evented";import{notifyChange as t,observable as r,watch as o,createIHandle as s}from"./observableUtils.js";export class Observable extends(r(e)){constructor(){super(),console.warn("[Observable]: The Observable class is deprecated and will be removed in a future release. For watch functionality use the observable mixin from @vertigis/arcgis-extensions/support/observableUtils instead. For events, use @arcgis/core/core/Evented instead. You can combine both by using the observable mixin with @arcgis/core/core/Evented `extends observable(Evented)`.")}watch(e,t,r=!1){return deprecatedWatch(this,e,t,r)}get(e){return getPropertyByPath(this,e)}set(e,t){if(!e)return this;if("string"==typeof e){const r=e.split(".");let o=this;for(;o&&"object"==typeof o&&r.length>1;)o=o[r.shift()];o&&"object"==typeof o&&(o[r[0]]=t)}else for(const t of Object.keys(e))this.set(t,e[t]);return this}notifyChange(e){t(this,e)}_watchProperty(e,t,r,o){return deprecatedWatchProperty(this,e,t,r,o)}}export function getPropertyByPath(e,t){if(!t)return;const r=t.split(".");let o=e;for(;o&&"object"==typeof o&&r.length;)o=o[r.shift()];return r.length?void 0:o}export function deprecatedWatch(e,t,n,i){if(console.warn("[Observable]: The watch method is deprecated and will be removed in a future release. See @vertigis/arcgis-extensions/support/observableUtils instead."),!("__isObservable"in e)){let t=Object.getPrototypeOf(e);const o=Object.getPrototypeOf(r().prototype);for(;t;){const e=Object.getPrototypeOf(t);if(e===Object.prototype)break;if(t=e,e===o)break}t!==o&&Object.setPrototypeOf(t,r().prototype);const s=new(r());Object.assign(e,s)}const a=[],c=Array.isArray(t)?t:[t];for(const t of c)a.push(o(e,t,((e,r,o)=>{n(e,r,t,o)}),{sync:i}));return s(a)}export function deprecatedNotifyChange(e,r){console.warn("[Observable]: The notifyChange method is deprecated and will be removed in a future release. See @vertigis/arcgis-extensions/support/observableUtils instead."),"__isObservable"in e&&!e.__isObservable||t(e,r)}export function deprecatedSet(e,t,r){if(!t)return e;if("string"==typeof t){const o=t.split(".");let s=e;for(;s&&"object"==typeof s&&o.length>1;)s=s[o.shift()];s&&"object"==typeof s&&(s[o[0]]=r)}else for(const r of Object.keys(t))deprecatedSet(e,r,t[r]);return e}export function deprecatedGetPropertyPath(e,t){return getPropertyByPath(e,t)}export function deprecatedWatchProperty(e,t,r,o,s){console.warn("[Observable]: The _watchProperty method is deprecated and will be removed in a future release. See @vertigis/arcgis-extensions/support/observableUtils instead.");return deprecatedWatch(e,`${t.toString()}.${r}`,o,s)}
@@ -1,4 +1,6 @@
1
- import { Observable } from "./Observable.js";
1
+ import Evented from "@arcgis/core/core/Evented.js";
2
+ import type { WatchCallback } from "../utilities/watch.js";
3
+ import { type IDeprecatedObservable } from "./Observable.js";
2
4
  /**
3
5
  * A class that can take in initial property values in its constructor.
4
6
  */
@@ -6,7 +8,7 @@ export type SerializableClass<P, T extends SerializableBase<P>> = new (propertie
6
8
  /**
7
9
  * An object that can be serialized to/from plain JSON.
8
10
  */
9
- export interface Serializable<TProperties> {
11
+ export interface Serializable<TProperties> extends IDeprecatedObservable {
10
12
  /**
11
13
  * Returns a serializable representation of the item.
12
14
  *
@@ -60,7 +62,7 @@ export interface Serializable<TProperties> {
60
62
  * Default implementation of a {@link Serializable} that supports observability
61
63
  * and serialization.
62
64
  */
63
- export declare abstract class SerializableBase<TProperties> extends Observable implements Serializable<TProperties> {
65
+ export declare abstract class SerializableBase<TProperties> extends Evented implements Serializable<TProperties>, IDeprecatedObservable {
64
66
  private readonly _assignPropertiesPromises;
65
67
  constructor(_properties?: TProperties);
66
68
  /**
@@ -94,6 +96,41 @@ export declare abstract class SerializableBase<TProperties> extends Observable i
94
96
  * @inheritDoc
95
97
  */
96
98
  getDefault<K extends keyof TProperties>(key: K): TProperties[K];
99
+ /**
100
+ * @deprecated
101
+ * @inheritdoc
102
+ */
103
+ set<T>(propertyPath: string, value: T): this;
104
+ /**
105
+ * @deprecated
106
+ * @inheritdoc
107
+ */
108
+ set(properties: HashMap<any>): this;
109
+ /**
110
+ * @deprecated
111
+ * @inheritdoc
112
+ */
113
+ get<T>(propertyPath: string): T;
114
+ /**
115
+ * @deprecated
116
+ * @inheritdoc
117
+ */
118
+ get(propertyPath: string): any;
119
+ /**
120
+ * @deprecated
121
+ * @inheritdoc
122
+ */
123
+ watch(path: string | string[], callback: WatchCallback, sync?: boolean): IHandle;
124
+ /**
125
+ * @deprecated
126
+ * @inheritdoc
127
+ */
128
+ notifyChange(propertyKey: keyof this): void;
129
+ /**
130
+ * @deprecated
131
+ * @inheritdoc
132
+ */
133
+ _watchProperty(propertyKey: keyof this, subpath: string, callback: WatchCallback, sync: boolean): IHandle;
97
134
  /**
98
135
  * The property keys and their metadata that are used to implement
99
136
  * serializing and deserializing the class instance.
@@ -1 +1 @@
1
- import e from"safe-stable-stringify";import{filter as t,isPlainObject as r,map as i,objectKeys as s}from"../utilities/object.js";import{Observable as o}from"./Observable.js";const n=new WeakSet;export class SerializableBase extends o{_assignPropertiesPromises=[];constructor(e){if(super(),!n.has(this.constructor))throw new Error(`Class "${this.constructor.name}" must be marked as "@serializable" since it extends ${SerializableBase.name} (make sure it is the _last_ decorator on the class).`)}toJSON(e="all"){return filterJSONProperties(this._getSerializableProperties(),this,e)}assignProperties(e){const t=a(this._getSerializableProperties(),this,e,!0);this._assignPropertiesPromises.push(t),(async()=>{try{await t}finally{this._assignPropertiesPromises.splice(this._assignPropertiesPromises.indexOf(t),1)}})()}async assignPropertiesAsync(e){await this.finishAssignProperties();const t=assignPropertiesAsync(this._getSerializableProperties(),this,e);this._assignPropertiesPromises.push(t);try{await t}finally{this._assignPropertiesPromises.splice(this._assignPropertiesPromises.indexOf(t),1)}}async finishAssignProperties(){await Promise.all(this._assignPropertiesPromises)}getSerializableProperties(e="all"){return getSerializableProperties(this._getSerializableProperties(),e)}getDefaults(){return getDefaults(this._getSerializableProperties())}getDefault(e){return this.getDefaults()[e]}_getSerializableProperties(){return{}}_toPropertyDef(e){return toPropertyDef(e)}}export function serializable(e){if(!isSerializable(e.prototype))throw new Error(`Class "${e.name}" is marked as @serializable but does not implement 'Serializable'.`);class t extends e{constructor(e,...r){super(e,...r),this.constructor===t&&this.assignProperties({...this.getDefaults(),...e})}}return n.add(t),t}export function shouldExcludeDefaults(e){return"initial"===e||"project"===e}export function filterJSONProperties(t,r,i){let o=i;"initial"!==o&&"initial-with-defaults"!==o&&"preferences"!==o&&"project"!==o&&(o="all");const n={},a=getSerializableProperties(t,o);for(const t of s(a)){const i=a[t],s=l(t,i,r,o);if(shouldExcludeDefaults(o)){let r=!1;r=i.hasOwnProperty("default")?e(s)===e(i.default):i.isDefault?i.isDefault(s,o):isDefault(s),r||(n[t]=s)}else n[t]=s}if(!shouldExcludeDefaults(o)&&"preferences"!==o||!isDefault(n))return n}export function assignProperties(e,t,r){r&&a(e,t,r,!0)}export function assignPropertiesAsync(e,t,r){return a(e,t,r)}function a(e,t,i,s=!1){if(!i)return Promise.resolve();const o=[];return Object.keys(e).forEach((n=>{const a=e[n];if(i.hasOwnProperty(n)&&(Array.isArray(e[n])||!1!==a.deserialize))try{const e=i[n]??void 0;if(a?.deserialize){const t=a.deserialize(e);t&&o.push(t)}else"object"!=typeof t[n]||!t[n]||!r(e)&&void 0!==e||s||"function"!=typeof t[n].assignPropertiesAsync?"object"==typeof t[n]&&t[n]&&(r(e)||void 0===e)&&"function"==typeof t[n].assignProperties?t[n].assignProperties(e):t[n]=e:o.push(t[n].assignPropertiesAsync(e))}catch(e){if(s)throw e;o.push(Promise.reject(e))}})),Promise.all(o).then()}export function getDefaults(e){const t={},r=s(e).filter((t=>"object"==typeof e[t]));for(const i of r){const r=e[i];r.hasOwnProperty("default")&&(t[i]=r.default)}return t}export function getDefault(e,t){return getDefaults(e)[t]}export function isDefault(e){if(null==e)return!0;if(e.constructor===Object){if(!Object.keys(e).length)return!0}return!(!Array.isArray(e)||e.length)}function l(e,t,r,i){const s=t?.serialize?t.serialize(i):r[e];if(s&&"function"==typeof s.toItemUri)return s.toItemUri();if(s&&"function"==typeof s.toJSON)return s.toJSON(i);if(Array.isArray(s))return s.map(((e,t)=>l(t,void 0,s,i)));if(s&&"function"==typeof s.toArray){const e=s.toArray();return e.map(((t,r)=>l(r,void 0,e,i)))}if(s&&"object"==typeof s){const e={};for(const t of Object.keys(s))e[t]=l(t,void 0,s,i);return e}return t?.serialize?s:r[e]}export function toPropertyDef(e){const t={serializeModes:[]};return"string"==typeof e?{...t,serializeModes:[e]}:Array.isArray(e)?{...t,serializeModes:e}:{...t,...e}}export function isSerializable(e){return["assignProperties","getDefaults","getSerializableProperties","toJSON"].every((t=>"function"==typeof e[t]))}export function getSerializableProperties(e,r="all"){const s=i(e,(e=>toPropertyDef(e))),o=t(s,(e=>function(e,t){if(!1===t.serialize)return!1;const r="initial-with-defaults"===e?"initial":e;return"all"===e||t.serializeModes?.includes(r)}(r,e)));return o}
1
+ import e from"@arcgis/core/core/Evented.js";import t from"safe-stable-stringify";import{filter as r,isPlainObject as i,map as s,objectKeys as o}from"../utilities/object.js";import{deprecatedGetPropertyPath as n,deprecatedNotifyChange as a,deprecatedSet as l,deprecatedWatch as f,deprecatedWatchProperty as u}from"./Observable.js";const c=new WeakSet;export class SerializableBase extends e{_assignPropertiesPromises=[];constructor(e){if(super(),!c.has(this.constructor))throw new Error(`Class "${this.constructor.name}" must be marked as "@serializable" since it extends ${SerializableBase.name} (make sure it is the _last_ decorator on the class).`)}toJSON(e="all"){return filterJSONProperties(this._getSerializableProperties(),this,e)}assignProperties(e){const t=p(this._getSerializableProperties(),this,e,!0);this._assignPropertiesPromises.push(t),(async()=>{try{await t}finally{this._assignPropertiesPromises.splice(this._assignPropertiesPromises.indexOf(t),1)}})()}async assignPropertiesAsync(e){await this.finishAssignProperties();const t=assignPropertiesAsync(this._getSerializableProperties(),this,e);this._assignPropertiesPromises.push(t);try{await t}finally{this._assignPropertiesPromises.splice(this._assignPropertiesPromises.indexOf(t),1)}}async finishAssignProperties(){await Promise.all(this._assignPropertiesPromises)}getSerializableProperties(e="all"){return getSerializableProperties(this._getSerializableProperties(),e)}getDefaults(){return getDefaults(this._getSerializableProperties())}getDefault(e){return this.getDefaults()[e]}set(e,t){return l(this,e,t)}get(e){return n(this,e)}watch(e,t,r){return f(this,e,t,r)}notifyChange(e){a(this,e)}_watchProperty(e,t,r,i){return u(this,e,t,r,i)}_getSerializableProperties(){return{}}_toPropertyDef(e){return toPropertyDef(e)}}export function serializable(e){if(!isSerializable(e.prototype))throw new Error(`Class "${e.name}" is marked as @serializable but does not implement 'Serializable'.`);class t extends e{constructor(e,...r){super(e,...r),this.constructor===t&&this.assignProperties({...this.getDefaults(),...e})}}return c.add(t),t}export function shouldExcludeDefaults(e){return"initial"===e||"project"===e}export function filterJSONProperties(e,r,i){let s=i;"initial"!==s&&"initial-with-defaults"!==s&&"preferences"!==s&&"project"!==s&&(s="all");const n={},a=getSerializableProperties(e,s);for(const e of o(a)){const i=a[e],o=h(e,i,r,s);if(shouldExcludeDefaults(s)){let r=!1;r=i.hasOwnProperty("default")?t(o)===t(i.default):i.isDefault?i.isDefault(o,s):isDefault(o),r||(n[e]=o)}else n[e]=o}if(!shouldExcludeDefaults(s)&&"preferences"!==s||!isDefault(n))return n}export function assignProperties(e,t,r){r&&p(e,t,r,!0)}export function assignPropertiesAsync(e,t,r){return p(e,t,r)}function p(e,t,r,s=!1){if(!r)return Promise.resolve();const o=[];return Object.keys(e).forEach((n=>{const a=e[n];if(r.hasOwnProperty(n)&&(Array.isArray(e[n])||!1!==a.deserialize))try{const e=r[n]??void 0;if(a?.deserialize){const t=a.deserialize(e);t&&o.push(t)}else"object"!=typeof t[n]||!t[n]||!i(e)&&void 0!==e||s||"function"!=typeof t[n].assignPropertiesAsync?"object"==typeof t[n]&&t[n]&&(i(e)||void 0===e)&&"function"==typeof t[n].assignProperties?t[n].assignProperties(e):t[n]=e:o.push(t[n].assignPropertiesAsync(e))}catch(e){if(s)throw e;o.push(Promise.reject(e))}})),Promise.all(o).then()}export function getDefaults(e){const t={},r=o(e).filter((t=>"object"==typeof e[t]));for(const i of r){const r=e[i];r.hasOwnProperty("default")&&(t[i]=r.default)}return t}export function getDefault(e,t){return getDefaults(e)[t]}export function isDefault(e){if(null==e)return!0;if(e.constructor===Object){if(!Object.keys(e).length)return!0}return!(!Array.isArray(e)||e.length)}function h(e,t,r,i){const s=t?.serialize?t.serialize(i):r[e];if(s&&"function"==typeof s.toItemUri)return s.toItemUri();if(s&&"function"==typeof s.toJSON)return s.toJSON(i);if(Array.isArray(s))return s.map(((e,t)=>h(t,void 0,s,i)));if(s&&"function"==typeof s.toArray){const e=s.toArray();return e.map(((t,r)=>h(r,void 0,e,i)))}if(s&&"object"==typeof s){const e={};for(const t of Object.keys(s))e[t]=h(t,void 0,s,i);return e}return t?.serialize?s:r[e]}export function toPropertyDef(e){const t={serializeModes:[]};return"string"==typeof e?{...t,serializeModes:[e]}:Array.isArray(e)?{...t,serializeModes:e}:{...t,...e}}export function isSerializable(e){return["assignProperties","getDefaults","getSerializableProperties","toJSON"].every((t=>"function"==typeof e[t]))}export function getSerializableProperties(e,t="all"){const i=s(e,(e=>toPropertyDef(e))),o=r(i,(e=>function(e,t){if(!1===t.serialize)return!1;const r="initial-with-defaults"===e?"initial":e;return"all"===e||t.serializeModes?.includes(r)}(t,e)));return o}
@@ -1,19 +1,19 @@
1
1
  import Collection from "@arcgis/core/core/Collection";
2
2
  import type { SerializeMode } from "./Serializable.js";
3
3
  import { SerializableBase } from "./Serializable.js";
4
- import type { WatchCallback } from "./esri.js";
4
+ declare const Settings_base: (abstract new (_properties?: unknown) => SerializableBase<unknown>) & (abstract new (...args: any[]) => import("./observableUtils.js").ObservableMixin);
5
5
  /**
6
6
  * Helper class for implementing a collection of settings that can be inherited
7
7
  * at runtime from a parent collection of settings. Setting a value locally will
8
8
  * override the inherited setting.
9
9
  */
10
- export declare abstract class Settings<TProperties> extends SerializableBase<TProperties> {
10
+ export declare abstract class Settings<TProperties> extends Settings_base {
11
11
  private _parent;
12
+ private _parentHandle;
12
13
  /**
13
14
  * Locally overridden setting values, keyed by setting name.
14
15
  */
15
16
  private _overrides;
16
- private _settingObservers;
17
17
  /**
18
18
  * The parent settings that these settings will inherit from.
19
19
  */
@@ -44,7 +44,6 @@ export declare abstract class Settings<TProperties> extends SerializableBase<TPr
44
44
  isModified(setting: keyof this): boolean;
45
45
  toJSON(serializeMode?: SerializeMode): TProperties;
46
46
  getDefaults(): TProperties;
47
- protected _watchProperty(property: keyof this, subpath: string, callback: WatchCallback, sync: boolean): IHandle;
48
47
  /**
49
48
  * Gets the value for a setting.
50
49
  *
@@ -79,7 +78,7 @@ export declare abstract class Settings<TProperties> extends SerializableBase<TPr
79
78
  *
80
79
  * @param parent The parent settings to inherit from.
81
80
  */
82
- protected _setParent(parent: this): void;
83
- private _watchParent;
84
- private _unwatchParent;
81
+ protected _setParent(parent: this | undefined): void;
82
+ private _notifySettingChange;
85
83
  }
84
+ export {};
@@ -1 +1 @@
1
- import e from"@arcgis/core/core/Collection";import{CopyOnWriteCollection as t}from"../utilities/CopyOnWriteCollection.js";import{every as i}from"../utilities/iterable.js";import{objectKeys as s}from"../utilities/object.js";import{isDefault as r,SerializableBase as n,shouldExcludeDefaults as o}from"./Serializable.js";export class Settings extends n{_parent;_overrides;_settingObservers;get parent(){return this._parent}set parent(e){this._setParent(e)}reset(e){if(this._overrides)if(e){if(this.parent&&this._settingObservers)for(const e of this._settingObservers)this._watchParent(e);this._overrides.delete(e),this.notifyChange(e)}else{const e=[...this._overrides.keys()];this._overrides.clear();for(const t of e){if(this.parent&&this._settingObservers)for(const e of this._settingObservers)this._watchParent(e);this.notifyChange(t)}}}isModified(e){if(!this._overrides)return!1;if(e){if(!this._overrides.has(e))return!1;const i=this._overrides.get(e);return i instanceof t?i.isModified:!(i instanceof Settings)||i.isModified()}return!i(this._overrides.values(),(e=>e instanceof t&&!e.isModified||e instanceof Settings&&!e.isModified()))}toJSON(e="all"){if(!this._overrides?.size&&"initial-with-defaults"!==e)return o(e)?void 0:{};const t=super.toJSON(e);if(t&&"initial-with-defaults"!==e)for(const e of s(t))this.isModified(e)||delete t[e];return o(e)&&r(t)?void 0:t}getDefaults(){return{}}_watchProperty(e,t,i,s){const r={path:`${String(e)}${t?`.${t}`:""}`,handle:super._watchProperty(e,t,i,s),callback:i,remove:()=>{r.handle.remove(),r.parentHandle&&r.parentHandle.remove(),this._settingObservers.delete(r)}};return!this.isModified(e)&&this.parent&&this._watchParent(r),this._settingObservers=this._settingObservers??new Set,this._settingObservers.add(r),r}_getSetting(e,t){return this._overrides?.has(e)?this._overrides.get(e):this.parent?this.parent[e]:t}_getCollectionSetting(i){if(!this._overrides?.has(i)){const s=this.parent?this.parent[i]:new e;this._overrides=this._overrides??new Map,this._overrides.set(i,new t(s))}return this._overrides.get(i)}_getNestedSettings(e,t){if(!this._overrides?.has(e)){const i=t();this.parent&&(i.parent=this.parent[e]),this._overrides=this._overrides||new Map,this._overrides.set(e,i)}return this._overrides.get(e)}_setSetting(e,t){if(!this.isModified(e)&&this.parent&&this._settingObservers)for(const t of this._settingObservers)t.path===e&&this._unwatchParent(t);this._overrides=this._overrides??new Map,this._overrides.set(e,t)}_setParent(i){if(this._parent===i||null==this._parent&&null==i)return;const s=this._parent;if(this._parent=i,null!=this._settingObservers)for(const e of this._settingObservers)null!=s&&(e.parentHandle?.remove(),e.parentHandle=void 0),null!=i&&(this.isModified(e.path)||(e.parentHandle=i.watch(e.path,((t,i,s)=>{e.callback(t,i,s,this)})))),this.notifyChange(e.path);if(this._overrides)for(const[s,r]of this._overrides)r instanceof t?r.originalCollection=i?i.get(s):new e:r instanceof Settings&&(r.parent=i?i.get(s):void 0)}_watchParent(e){e.parentHandle||(e.parentHandle=this.parent.watch(e.path,((t,i,s)=>{e.callback(t,i,s,this)})))}_unwatchParent(e){e.parentHandle&&(e.parentHandle.remove(),e.parentHandle=void 0)}}
1
+ import e from"@arcgis/core/core/Collection";import{CopyOnWriteCollection as t}from"../utilities/CopyOnWriteCollection.js";import{every as i}from"../utilities/iterable.js";import{objectKeys as s}from"../utilities/object.js";import{isDefault as r,SerializableBase as n,shouldExcludeDefaults as o}from"./Serializable.js";import{notifyChange as a,observable as h}from"./observableUtils.js";export class Settings extends(h(n)){_parent;_parentHandle;_overrides;get parent(){return this._parent}set parent(e){this._setParent(e)}reset(e){if(this._overrides)if(e)this._overrides.delete(e),this._notifySettingChange(e);else{const e=[...this._overrides.keys()];this._overrides.clear();for(const t of e)this._notifySettingChange(t)}}isModified(e){if(!this._overrides)return!1;if(e){if(!this._overrides.has(e))return!1;const i=this._overrides.get(e);return i instanceof t?i.isModified:!(i instanceof Settings)||i.isModified()}return!i(this._overrides.values(),(e=>e instanceof t&&!e.isModified||e instanceof Settings&&!e.isModified()))}toJSON(e="all"){if(!this._overrides?.size&&"initial-with-defaults"!==e)return o(e)?void 0:{};const t=super.toJSON(e);if(t&&"initial-with-defaults"!==e)for(const e of s(t))this.isModified(e)||delete t[e];return o(e)&&r(t)?void 0:t}getDefaults(){return{}}_getSetting(e,t){return this._overrides?.has(e)?this._overrides.get(e):this.parent?this.parent[e]:t}_getCollectionSetting(i){if(!this._overrides?.has(i)){const s=this.parent?this.parent[i]:new e;null==this._overrides&&(this._overrides=new Map),this._overrides.set(i,new t(s))}return this._overrides.get(i)}_getNestedSettings(e,t){if(!this._overrides?.has(e)){const i=t();this.parent&&(i.parent=this.parent[e]),null==this._overrides&&(this._overrides=new Map),this._overrides.set(e,i)}return this._overrides.get(e)}_setSetting(e,t){null==this._overrides&&(this._overrides=new Map),this._overrides.set(e,t),this._notifySettingChange(e)}_setParent(i){if(this._parent!==i&&(null!=this._parent||null!=i)){if(null!=this._parentHandle&&(this._parentHandle.remove(),this._parentHandle=void 0),this._parent=i,null!=this._parent){const e=new WeakRef(this),t=this._parent.on("property-change",(i=>{const s=e.deref();null!=s?s._notifySettingChange(i.property):t.remove()}));this._parentHandle=t}if(this._overrides)for(const[s,r]of this._overrides)r instanceof t?r.originalCollection=i?i[s]:new e:r instanceof Settings&&(r.parent=i?i[s]:void 0);a(this)}}_notifySettingChange(e){this.emit("property-change",{property:e}),a(this,e)}}
package/support/esri.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import type Accessor from "@arcgis/core/core/Accessor";
1
2
  import Collection from "@arcgis/core/core/Collection";
2
3
  import Evented from "@arcgis/core/core/Evented";
3
4
  import type Layer from "@arcgis/core/layers/Layer";
@@ -22,11 +23,14 @@ export type CIMPolygonSymbol = __esri.CIMPolygonSymbol;
22
23
  export type CIMSymbolReference = __esri.CIMSymbolReference;
23
24
  export type CollectionAfterAddEventHandler<T> = __esri.CollectionAfterAddEventHandler<T>;
24
25
  export type CollectionAfterChangesEventHandler = __esri.CollectionAfterChangesEventHandler;
25
- export type CollectionAfterItemEvent = __esri.CollectionAfterItemEvent;
26
26
  export type CollectionAfterRemoveEventHandler<T> = __esri.CollectionAfterRemoveEventHandler<T>;
27
27
  export type CollectionBeforeAddEventHandler<T> = __esri.CollectionBeforeAddEventHandler<T>;
28
28
  export type CollectionBeforeChangesEventHandler = __esri.CollectionBeforeChangesEventHandler;
29
29
  export type CollectionBeforeRemoveEventHandler<T> = __esri.CollectionBeforeRemoveEventHandler<T>;
30
+ export type CollectionEvent = __esri.CollectionEvent;
31
+ export type CollectionItemEvent<T> = __esri.CollectionItemEvent<T>;
32
+ export type CollectionAfterItemEvent<T> = __esri.CollectionAfterItemEvent<T>;
33
+ export type CollectionAfterEvent = __esri.CollectionAfterEvent;
30
34
  export type CollectionChangeEvent<T> = __esri.CollectionChangeEvent<T>;
31
35
  export type CollectionChangeEventHandler<T> = __esri.CollectionChangeEventHandler<T>;
32
36
  export type CSVLayerCapabilities = __esri.CSVLayerCapabilities;
@@ -147,56 +151,6 @@ export type VisibilityMode = __esri.GroupLayer["visibilityMode"];
147
151
  export type ListMode = __esri.Layer["listMode"];
148
152
  export type DrawingTool = __esri.FeatureTemplate["drawingTool"];
149
153
  export type PortalItemType = "Web Map" | "Web Scene" | "Feature Service" | "Map Service" | "Image Service" | "KML" | "Feature Collection" | "Vector Tile Service" | "Scene Service" | "Stream Service" | "WMTS" | "WMS";
150
- /**
151
- * A callback that gets invoked by {@link AccessorLike.watch} to notify observers
152
- * about property changes.
153
- */
154
- export type WatchCallback<T = any, U = any> = (newValue: T, oldValue: T, propertyName: string, target: U) => void;
155
- /**
156
- * An object that supports Accessor-style observability.
157
- */
158
- export interface AccessorLike {
159
- /**
160
- * Gets the value of a property denoted by the given path.
161
- *
162
- * @param propertyPath The name of the property to get. It can also be a
163
- * path to a property deeper in the instance, for example "foo.bar.baz".
164
- * If a property in the path doesn't exist, then the result will be
165
- * undefined.
166
- */
167
- get<T = unknown>(propertyPath: string): T;
168
- /**
169
- * Sets the value of a property denoted by the given path.
170
- *
171
- * @param propertyPath The name of the property to set. It can also be a
172
- * path to a property deeper in the instance, for example "foo.bar.baz".
173
- * If a property along the way doesn't exist, then nothing will be set.
174
- * @param value The value to set.
175
- */
176
- set<T>(propertyPath: string, value: T): this;
177
- /**
178
- * Sets the values of several properties.
179
- *
180
- * @param props On object with key/value pairs denoting the paths and values
181
- * to set.
182
- */
183
- set(props: HashMap<unknown>): this;
184
- /**
185
- * Watches a property for changes.
186
- *
187
- * @param path The property path to watch, which can be the name of a
188
- * property, or a path like "a.b.c" that will be traversed. In the latter
189
- * case the watch handler will be invoked any time that any of the
190
- * intermediate properties change.
191
- * @param callback The callback to invoke when the property changes.
192
- * @param sync Whether to invoke the callback synchronously. The default is
193
- * `false` (will be invoked on a future tick from the one that changed the
194
- * value). Async generally performs better as the callback is only invoked
195
- * once for the final value if the property is changed multiple times in a
196
- * tick.
197
- */
198
- watch(path: string | string[], callback: WatchCallback, sync?: boolean): IHandle;
199
- }
200
154
  /**
201
155
  * Raised when items are added, removed, or moved from a Collection.
202
156
  */
@@ -245,7 +199,7 @@ export type ItemCompareCallback<T> = (firstItem: T, secondItem: T) => number;
245
199
  /**
246
200
  * Base interface for Esri sublayer classes.
247
201
  */
248
- export interface SublayerLike extends AccessorLike {
202
+ export interface SublayerLike extends Accessor {
249
203
  /**
250
204
  * The unique ID for the sublayer.
251
205
  */