@vertigis/arcgis-extensions 52.2.0 → 53.1.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.
- package/AppConfig.schema.json +1969 -329
- package/data/Feature.d.ts +1 -1
- package/data/FeatureList.d.ts +1 -1
- package/data/FeatureList.js +1 -1
- package/data/FeatureSet.d.ts +27 -4
- package/data/FeatureSet.js +1 -1
- package/data/FeatureSettings.d.ts +6 -1
- package/data/FeatureSettings.js +1 -1
- package/data/Schema.d.ts +32 -2
- package/data/Schema.js +1 -1
- package/data/TaskSettings.d.ts +6 -1
- package/data/_TableExtension.d.ts +1 -1
- package/data/convert.d.ts +6 -2
- package/data/convert.js +1 -1
- package/data/support/_dxfConverters.d.ts +2 -1
- package/data/support/_dxfFunctions.d.ts +2 -1
- package/declarations/arcgis-js-api-extensions/index.d.ts +2 -217
- package/declarations/arcgis-js-api-extensions/modules.d.ts +99 -0
- package/docs/html/assets/highlight.css +16 -16
- package/docs/html/assets/navigation.js +1 -1
- package/docs/html/assets/search.js +1 -1
- package/docs/html/classes/Entity.EntityBase.html +7 -10
- package/docs/html/classes/data_ArcGISServiceTableExtension.ArcGISServiceTableExtension.html +7 -10
- package/docs/html/classes/data_Attachment.Attachment.html +7 -10
- package/docs/html/classes/data_Feature.Feature.html +7 -10
- package/docs/html/classes/data_FeatureList.FeatureList.html +56 -28
- package/docs/html/classes/data_FeatureSet.FeatureSet.html +6 -5
- package/docs/html/classes/data_FeatureSettings.FeatureSettings.html +6 -3
- package/docs/html/classes/data_FeatureSourceBase.FeatureSourceBase.html +7 -10
- package/docs/html/classes/data_FeatureSourceBase.RelationshipCollection.html +53 -25
- package/docs/html/classes/data_FeatureStream.FeatureStream.html +7 -10
- package/docs/html/classes/data_FieldExtension.FieldExtension.html +7 -10
- package/docs/html/classes/data_PopupContentExtension.PopupContentExtension.html +7 -10
- package/docs/html/classes/data_RelationshipBase.RelationshipBase.html +7 -10
- package/docs/html/classes/data_Schema.Schema.html +6 -3
- package/docs/html/classes/data_TaskSettings.TaskSettings.html +5 -2
- package/docs/html/classes/data__TableExtension.TableExtension.html +7 -10
- package/docs/html/classes/data__TableExtension.TableFeatureSettings.html +6 -3
- package/docs/html/classes/data__TableExtension.TableSchema.html +7 -4
- package/docs/html/classes/data_support__dxfConverters.DxfEntityProcessor.html +2 -2
- package/docs/html/classes/layer_preset_LayerPreset.LayerPreset.html +7 -10
- package/docs/html/classes/mapping_ArcGISSublayerExtension.ArcGISSublayerExtension.html +12 -15
- package/docs/html/classes/mapping_ArcGISSublayerExtension.ArcGISSublayerRelationshipCollection.html +54 -26
- package/docs/html/classes/mapping_BasemapExtension.BasemapExtension.html +8 -11
- package/docs/html/classes/mapping_Bookmark.Bookmark.html +7 -10
- package/docs/html/classes/mapping_BuildingComponentSublayerExtension.BuildingComponentSublayerExtension.html +12 -15
- package/docs/html/classes/mapping_BuildingComponentSublayerExtension.BuildingComponentSublayerSchema.html +5 -2
- package/docs/html/classes/mapping_BuildingGroupSublayerExtension.BuildingGroupSublayerExtension.html +12 -15
- package/docs/html/classes/mapping_BuildingGroupSublayerExtension.BuildingGroupSublayerSchema.html +5 -2
- package/docs/html/classes/mapping_BuildingSceneLayerExtension.BuildingSceneLayerExtension.html +14 -17
- package/docs/html/classes/mapping_BuildingSceneLayerExtension.BuildingSceneLayerReadOnlySchema.html +5 -2
- package/docs/html/classes/mapping_BuildingSublayerExtension.BuildingSublayerExtension.html +12 -15
- package/docs/html/classes/mapping_BuildingSublayerExtension.BuildingSublayerFeatureSettings.html +5 -2
- package/docs/html/classes/mapping_BuildingSublayerExtension.BuildingSublayerSchema.html +5 -2
- package/docs/html/classes/mapping_CSVLayerExtension.CSVLayerExtension.html +12 -15
- package/docs/html/classes/mapping_ElevationLayerExtension.ElevationLayerExtension.html +14 -17
- package/docs/html/classes/mapping_FeatureCollectionLayerExtension.FeatureCollectionLayerExtension.html +14 -17
- package/docs/html/classes/mapping_FeatureLayerExtension.FeatureLayerExtension.html +12 -15
- package/docs/html/classes/mapping_FeatureLayerExtensionBase.FeatureLayerExtensionBase.html +14 -17
- package/docs/html/classes/mapping_FeatureLayerExtensionBase.FeatureLayerReadOnlySchema.html +5 -2
- package/docs/html/classes/mapping_FeatureLayerExtensionBase.FeatureLayerSchema.html +5 -2
- package/docs/html/classes/mapping_GeoJSONLayerExtension.GeoJSONLayerExtension.html +12 -15
- package/docs/html/classes/mapping_GeoRSSLayerExtension.GeoRSSLayerExtension.html +14 -17
- package/docs/html/classes/mapping_GraphicsLayerExtension.GraphicsLayerExtension.html +14 -17
- package/docs/html/classes/mapping_GroundExtension.GroundExtension.html +8 -11
- package/docs/html/classes/mapping_GroupLayerExtension.GroupLayerExtension.html +15 -18
- package/docs/html/classes/mapping_GroupLayerExtension.GroupLayerExtensionCollection.html +76 -25
- package/docs/html/classes/mapping_ImageryLayerExtension.ImageryLayerExtension.html +14 -17
- package/docs/html/classes/mapping_ImageryTileLayerExtension.ImageryTileLayerExtension.html +14 -17
- package/docs/html/classes/mapping_IntegratedMeshLayerExtension.IntegratedMeshLayerExtension.html +14 -17
- package/docs/html/classes/mapping_KMLLayerExtension.KMLLayerExtension.html +14 -17
- package/docs/html/classes/mapping_KMLSublayerExtension.KMLSublayerExtension.html +12 -15
- package/docs/html/classes/mapping_MapConstraints.MapConstraints.html +5 -2
- package/docs/html/classes/mapping_MapExtension.MapExtension.html +7 -10
- package/docs/html/classes/mapping_MapImageLayerExtension.MapImageLayerExtension.html +14 -17
- package/docs/html/classes/mapping_MapImageSublayerExtension.MapImageSublayerExtension.html +12 -15
- package/docs/html/classes/mapping_MapNotesLayerExtension.MapNotesLayerExtension.html +14 -17
- package/docs/html/classes/mapping_MapNotesSublayerExtension.MapNotesSublayerExtension.html +12 -15
- package/docs/html/classes/mapping_MapNotesSublayerExtension.MapNotesSublayerExtensionSchema.html +5 -2
- package/docs/html/classes/mapping_MediaLayerExtension.MediaLayerExtension.html +14 -17
- package/docs/html/classes/mapping_OpenStreetMapLayerExtension.OpenStreetMapLayerExtension.html +14 -17
- package/docs/html/classes/mapping_PointCloudLayerExtension.PointCloudLayerExtension.html +14 -17
- package/docs/html/classes/mapping_RouteLayerExtension.RouteLayerExtension.html +14 -17
- package/docs/html/classes/mapping_RouteLayerExtension.RouteLayerExtensionSchema.html +5 -2
- package/docs/html/classes/mapping_SceneLayerExtension.SceneLayerExtension.html +14 -17
- package/docs/html/classes/mapping_StreamLayerExtension.StreamLayerExtension.html +14 -17
- package/docs/html/classes/mapping_StreamLayerExtension.StreamLayerSchema.html +5 -2
- package/docs/html/classes/mapping_SubtypeGroupLayerExtension.SubtypeGroupLayerExtension.html +14 -17
- package/docs/html/classes/mapping_SubtypeGroupLayerExtension.SubtypeGroupLayerRelationshipCollection.html +54 -26
- package/docs/html/classes/mapping_SubtypeGroupLayerExtension.SubtypeGroupLayerSchema.html +5 -2
- package/docs/html/classes/mapping_SubtypeSublayerExtension.SubtypeSublayerExtension.html +12 -15
- package/docs/html/classes/mapping_SubtypeSublayerExtension.SubtypeSublayerRelationshipCollection.html +54 -26
- package/docs/html/classes/mapping_SubtypeSublayerExtension.SubtypeSublayerSchema.html +5 -2
- package/docs/html/classes/mapping_TileLayerExtension.TileLayerExtension.html +14 -17
- package/docs/html/classes/mapping_TileSublayerExtension.TileSublayerExtension.html +12 -15
- package/docs/html/classes/mapping_UnsupportedLayerExtension.UnsupportedLayerExtension.html +14 -17
- package/docs/html/classes/mapping_VectorTileLayerExtension.VectorTileLayerExtension.html +14 -17
- package/docs/html/classes/mapping_WFSLayerExtension.WFSLayerExtension.html +14 -17
- package/docs/html/classes/mapping_WMSLayerExtension.WMSLayerExtension.html +14 -17
- package/docs/html/classes/mapping_WMSSublayerExtension.WMSSublayerExtension.html +12 -15
- package/docs/html/classes/mapping_WMTSLayerExtension.WMTSLayerExtension.html +14 -17
- package/docs/html/classes/mapping_WebTileLayerExtension.WebTileLayerExtension.html +14 -17
- package/docs/html/classes/mapping__LayerExtension.LayerExtension.html +14 -17
- package/docs/html/classes/mapping__LayerExtension.LayerExtensionReadOnlySchema.html +5 -2
- package/docs/html/classes/mapping__LayerExtension.LayerExtensionSchema.html +5 -2
- package/docs/html/classes/mapping__LayerExtensionCollectionImpl.LayerExtensionCollectionImpl.html +76 -25
- package/docs/html/classes/mapping__SublayerExtension.SubSublayerExtensionCollection.html +76 -25
- package/docs/html/classes/mapping__SublayerExtension.SublayerExtension.html +12 -15
- package/docs/html/classes/mapping__SublayerExtension.SublayerSchema.html +5 -2
- package/docs/html/classes/mapping_support_ArrayWrappedCollection.ArrayWrappedCollection.html +53 -25
- package/docs/html/classes/mapping_support__LayerExtensionCollection.LayerExtensionCollectionBase.html +76 -25
- package/docs/html/classes/mapping_support__SublayerExtensionCollection.SublayerExtensionCollectionBase.html +76 -25
- package/docs/html/classes/menus_Menu.Menu.html +7 -10
- package/docs/html/classes/menus_MenuItem.MenuItem.html +7 -10
- package/docs/html/classes/support_FormatSettings.FormatSettings.html +5 -2
- package/docs/html/classes/support_InitializableBase.InitializableBase.html +6 -9
- package/docs/html/classes/support_InitializableCollectionProxy.InitializableCollectionProxy.html +53 -25
- package/docs/html/classes/support_ReadOnlyInitializableCollection.ReadOnlyInitializableCollection.html +53 -25
- package/docs/html/classes/support_Settings.Settings.html +5 -2
- package/docs/html/classes/support__ArcGISRelationshipCollection.ArcGISRelationshipCollection.html +54 -26
- package/docs/html/classes/tasks_geocoding_ArcGISGeocoder.ArcGISGeocoder.html +7 -10
- package/docs/html/classes/tasks_geocoding_Geocoder.Geocoder.html +7 -10
- package/docs/html/classes/tasks_identify_IdentifyService.IdentifyService.html +7 -10
- package/docs/html/classes/tasks_identify_WMSLayerFeatureInfoIdentifyProvider.WMSLayerFeatureInfoIdentifyProvider.html +2 -2
- package/docs/html/classes/tasks_query_ArcGISRelationship.ArcGISRelationship.html +7 -10
- package/docs/html/classes/tasks_query_QueryBasedRelationship.QueryBasedRelationship.html +7 -10
- package/docs/html/classes/tasks_query_QueryService.QueryService.html +8 -11
- package/docs/html/classes/tasks_query_SubtypeSublayerQueryProvider.SubtypeSublayerQueryProvider.html +2 -2
- package/docs/html/classes/tasks_search_SearchService.SearchService.html +8 -11
- package/docs/html/classes/utilities_CaseInsensitiveObservableMap.CaseInsensitiveObservableMap.html +6 -5
- package/docs/html/classes/utilities_CollectionProxy.CollectionProxy.html +56 -29
- package/docs/html/classes/utilities_CopyOnWriteCollection.CopyOnWriteCollection.html +53 -25
- package/docs/html/classes/utilities_MapTransformCollection.MapTransformCollection.html +53 -25
- package/docs/html/classes/utilities_ObservableMap.ObservableMap.html +6 -5
- package/docs/html/classes/utilities_ObservableSet.ObservableSet.html +6 -5
- package/docs/html/classes/utilities_ReadOnlyCollection.ReadOnlyCollection.html +53 -25
- package/docs/html/classes/utilities_ReadOnlyMap.ReadOnlyMap.html +35 -9
- package/docs/html/classes/utilities__ReferenceCountedHandle.default.html +2 -2
- package/docs/html/functions/data_convert.getDefaultSymbol.html +2 -2
- package/docs/html/functions/data_convert.parseKMLSymbol.html +2 -2
- package/docs/html/functions/mapping_support_LayerListSettings.fromLayerListMode.html +1 -1
- package/docs/html/functions/support_observableUtils.observable-1.html +3 -3
- package/docs/html/functions/support_observableUtils.onWatch.html +1 -1
- package/docs/html/functions/support_observableUtils.watch.html +1 -1
- package/docs/html/functions/support_observableUtils.watchEach.html +1 -1
- package/docs/html/functions/support_observableUtils.watchEvent.html +3 -3
- package/docs/html/functions/utilities_checkArg.checkArg.html +1 -1
- package/docs/html/functions/utilities_renderers.isClassBreaksRenderer.html +1 -1
- package/docs/html/functions/utilities_renderers.isDictionaryRenderer.html +1 -1
- package/docs/html/functions/utilities_renderers.isDotDensityRenderer.html +1 -1
- package/docs/html/functions/utilities_renderers.isHeatMapRenderer.html +1 -1
- package/docs/html/functions/utilities_renderers.isRenderer.html +2 -2
- package/docs/html/functions/utilities_renderers.isSimpleRenderer.html +1 -1
- package/docs/html/functions/utilities_renderers.isUniqueValueRenderer.html +1 -1
- package/docs/html/functions/utilities_symbol.isPolygonGeometrySymbol.html +2 -2
- package/docs/html/functions/utilities_watch.onCollectionPropertyChange.html +3 -3
- package/docs/html/functions/utilities_watch.onEach.html +4 -4
- package/docs/html/functions/utilities_watch.onOnce.html +5 -5
- package/docs/html/hierarchy.html +1 -1
- package/docs/html/interfaces/data_Feature.PresentableAttributes.html +36 -10
- package/docs/html/interfaces/data_FeatureSet.FeatureSetEvents.html +12 -0
- package/docs/html/interfaces/data_PopupContentExtension.ContentProperties.html +2 -2
- package/docs/html/interfaces/data_Schema.FieldCollection.html +1 -1
- package/docs/html/interfaces/data_Schema.SchemaEvents.html +16 -0
- package/docs/html/interfaces/data_support__dxfInterfaces.IDxfJsonComponentContext.html +2 -2
- package/docs/html/interfaces/data_support_attachments.AttachmentEnabledLayer.html +19 -6
- package/docs/html/interfaces/json_AnnotationLayerJson.AnnotationLayerJson.html +2 -2
- package/docs/html/interfaces/json_BuildingSceneLayerJson.BuildingSceneLayerJson.html +2 -2
- package/docs/html/interfaces/json_BuildingSceneSublayerJson.BuildingSceneSublayerJson.html +2 -2
- package/docs/html/interfaces/json_CSVLayerJson.CSVLayerJson.html +2 -2
- package/docs/html/interfaces/json_EnvironmentJson.SnowyWeatherJson.html +2 -2
- package/docs/html/interfaces/json_FeatureLayerJson.FeatureLayerJson.html +2 -2
- package/docs/html/interfaces/json_GeoJSONLayerJson.GeoJSONLayerJson.html +2 -2
- package/docs/html/interfaces/json_GeoRSSLayerJson.GeoRSSLayerJson.html +2 -2
- package/docs/html/interfaces/json_GroupLayerJson.GroupLayerJson.html +2 -2
- package/docs/html/interfaces/json_ImageServiceLayerJson.ImageServiceLayerJson.html +2 -2
- package/docs/html/interfaces/json_ImageServiceVectorLayerJson.ImageServiceVectorLayerJson.html +2 -2
- package/docs/html/interfaces/json_IntegratedMeshLayerJson.IntegratedMeshLayerJson.html +2 -2
- package/docs/html/interfaces/json_KMLLayerJson.KMLLayerJson.html +2 -2
- package/docs/html/interfaces/json_MapServiceLayerJson.MapServiceLayerJson.html +2 -2
- package/docs/html/interfaces/json_MediaLayerJson.MediaLayerJson.html +2 -2
- package/docs/html/interfaces/json_OperationalLayerJson.OperationalLayerJsonBase.html +2 -2
- package/docs/html/interfaces/json_PointCloudLayerJson.PointCloudLayerJson.html +2 -2
- package/docs/html/interfaces/json_PopupInfoJson.PopupElementJson.html +2 -2
- package/docs/html/interfaces/json_RasterDataElevationLayerJson.RasterDataElevationLayerJson.html +2 -2
- package/docs/html/interfaces/json_RendererJson.SizeInfoJson.html +2 -2
- package/docs/html/interfaces/json_SceneLayerJson.SceneLayerJson.html +2 -2
- package/docs/html/interfaces/json_StreamLayerJson.StreamLayerJson.html +2 -2
- package/docs/html/interfaces/json_SubtypeGroupLayerJson.SubtypeGroupLayerJson.html +2 -2
- package/docs/html/interfaces/json_SubtypeGroupLayerJson.SubtypeSubtypeGroupLayerJson.html +2 -2
- package/docs/html/interfaces/json_SubtypeSublayerJson.SubtypeSublayerJson.html +2 -2
- package/docs/html/interfaces/json_TiledElevationServiceLayerJson.TiledElevationServiceLayerJson.html +2 -2
- package/docs/html/interfaces/json_TiledImageServiceLayerJson.TiledImageServiceLayerJson.html +2 -2
- package/docs/html/interfaces/json_TiledMapServiceLayerJson.TiledMapServiceLayerJson.html +2 -2
- package/docs/html/interfaces/json_VectorTileLayerJson.VectorTileLayerJson.html +2 -2
- package/docs/html/interfaces/json_WFSLayerJson.WFSLayerJson.html +2 -2
- package/docs/html/interfaces/json_WMSLayerJson.WMSLayerJson.html +2 -2
- package/docs/html/interfaces/json_WebSceneJson.HeightModelInfoJson.html +2 -2
- package/docs/html/interfaces/json_WebTileLayerJson.WebTileLayerJson.html +2 -2
- package/docs/html/interfaces/mapping_ArcGISSublayerExtension.ArcGISSublayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_BuildingComponentSublayerExtension.BuildingComponentSublayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_BuildingGroupSublayerExtension.BuildingGroupSublayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_BuildingSceneLayerExtension.BuildingSceneLayerExtensionProperties.html +3 -3
- package/docs/html/interfaces/mapping_BuildingSceneLayerExtension.BuildingSceneLayerProperties.html +2 -2
- package/docs/html/interfaces/mapping_BuildingSublayerExtension.BuildingSublayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_BuildingSublayerExtension.BuildingSublayerProperties.html +2 -2
- package/docs/html/interfaces/mapping_CSVLayerExtension.CSVLayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_ElevationLayerExtension.ElevationLayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_FeatureLayerExtension.FeatureLayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_FeatureLayerExtension.FeatureLayerProperties.html +2 -2
- package/docs/html/interfaces/mapping_FeatureLayerExtensionBase.FeatureLayerBaseProperties.html +2 -2
- package/docs/html/interfaces/mapping_FeatureLayerExtensionBase.FeatureLayerExtensionBaseProperties.html +2 -2
- package/docs/html/interfaces/mapping_GeoJSONLayerExtension.GeoJSONLayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_GeoRSSLayerExtension.GeoRSSLayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_GraphicsLayerExtension.GraphicsLayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_GroupLayerExtension.GroupLayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_ImageryLayerExtension.ImageryLayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_ImageryTileLayerExtension.ImageryTileLayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_IntegratedMeshLayerExtension.IntegratedMeshLayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_KMLLayerExtension.KMLLayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_KMLSublayerExtension.KMLSublayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_MapExtension.MapExtensionEvents.html +14 -0
- package/docs/html/interfaces/mapping_MapImageLayerExtension.MapImageLayerExtensionProperties.html +4 -4
- package/docs/html/interfaces/mapping_MapImageSublayerExtension.MapImageSublayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_MapNotesLayerExtension.MapNotesLayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_MapNotesSublayerExtension.MapNotesSublayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_MediaLayerExtension.MediaLayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_OpenStreetMapLayerExtension.OpenStreetMapLayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_PointCloudLayerExtension.PointCloudLayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_PointCloudLayerExtension.PointCloudLayerProperties.html +2 -2
- package/docs/html/interfaces/mapping_RouteLayerExtension.RouteLayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_SceneLayerExtension.SceneLayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_StreamLayerExtension.StreamLayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_SubtypeGroupLayerExtension.SubtypeGroupLayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_SubtypeSublayerExtension.SubtypeSublayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_TileLayerExtension.TileLayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_TileSublayerExtension.TileSublayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_VectorTileLayerExtension.VectorTileLayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_WFSLayerExtension.WFSLayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_WMSLayerExtension.WMSLayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_WMSSublayerExtension.WMSSublayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_WMTSLayerExtension.WMTSLayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_WebTileLayerExtension.WebTileLayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping__LayerExtension.LayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping__SublayerExtension.SublayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/support_ArcGISRequestHelper.ArcGISRequestHelperResponse.html +1 -1
- package/docs/html/interfaces/support_ArcGISRequestHelper.ArcGISRequestOptions.html +2 -2
- package/docs/html/interfaces/support_InitializableBase.InitializableBaseEvents.html +7 -0
- package/docs/html/interfaces/support_InitializableCollectionProxy.InitializableCollection.html +1 -1
- package/docs/html/interfaces/support_Settings.SettingsEvents.html +7 -0
- package/docs/html/interfaces/support_esri.ChangeEvent.html +5 -5
- package/docs/html/interfaces/support_esri.LayerWithSublayers.html +1 -1
- package/docs/html/interfaces/support_esri.SublayerLike.html +2 -2
- package/docs/html/interfaces/support_observableUtils.WatchEachOptions.html +3 -3
- package/docs/html/interfaces/support_observableUtils.WatchOptions.html +3 -3
- package/docs/html/interfaces/utilities_ObservableMap.MapAfterItemEvent.html +4 -0
- package/docs/html/interfaces/utilities_ObservableMap.MapEvents.html +10 -0
- package/docs/html/interfaces/utilities_ObservableSet.SetAfterItemEvent.html +4 -0
- package/docs/html/interfaces/utilities_ObservableSet.SetChangeEvent.html +10 -0
- package/docs/html/interfaces/utilities_ObservableSet.SetEvents.html +10 -0
- package/docs/html/interfaces/utilities__layers.LayerWithLegendEnabledProperty.html +1 -1
- package/docs/html/interfaces/utilities__layers.TimeAwareLayer.html +1 -1
- package/docs/html/interfaces/utilities_collection.AfterItemChangeEvent.html +1 -1
- package/docs/html/modules/data_FeatureSet.html +2 -1
- package/docs/html/modules/data_Schema.html +1 -0
- package/docs/html/modules/data_convert.html +1 -0
- package/docs/html/modules/mapping_MapExtension.html +2 -1
- package/docs/html/modules/support_InitializableBase.html +1 -0
- package/docs/html/modules/support_Settings.html +1 -0
- package/docs/html/modules/support_esri.html +1 -6
- package/docs/html/modules/support_observableUtils.html +2 -1
- package/docs/html/modules/utilities_ObservableMap.html +3 -1
- package/docs/html/modules/utilities_ObservableSet.html +3 -0
- package/docs/html/types/data_convert.SimpleSymbol.html +2 -0
- package/docs/html/types/json_SymbolJson.ColorJson.html +1 -1
- package/docs/html/types/support_observableUtils.EventTarget.html +2 -0
- package/docs/html/types/support_observableUtils.WhenOptions.html +1 -1
- package/docs/html/variables/support_esri.Collection.html +1 -1
- package/docs/html/variables/version.version.html +1 -1
- package/json/SymbolJson.d.ts +1 -1
- package/mapping/ArcGISSublayerExtension.d.ts +2 -2
- package/mapping/BasemapExtension.d.ts +2 -1
- package/mapping/BuildingComponentSublayerExtension.d.ts +2 -2
- package/mapping/BuildingSceneLayerExtension.d.ts +2 -2
- package/mapping/CSVLayerExtension.d.ts +1 -1
- package/mapping/FeatureLayerExtension.d.ts +1 -1
- package/mapping/FeatureLayerExtensionBase.d.ts +2 -2
- package/mapping/GeoJSONLayerExtension.d.ts +1 -1
- package/mapping/GroundExtension.d.ts +2 -1
- package/mapping/MapExtension.d.ts +24 -4
- package/mapping/MapExtension.js +1 -1
- package/mapping/SceneLayerExtension.d.ts +2 -2
- package/mapping/StreamLayerExtension.d.ts +2 -2
- package/mapping/SubtypeSublayerExtension.d.ts +3 -3
- package/mapping/WFSLayerExtension.d.ts +2 -2
- package/mapping/_LayerExtension.d.ts +6 -5
- package/mapping/_LayerExtension.js +1 -1
- package/mapping/_SublayerExtension.d.ts +4 -2
- package/mapping/support/_LayerExtensionCollection.d.ts +3 -9
- package/mapping/support/_LayerExtensionCollection.js +1 -1
- package/mapping/support/_SublayerExtensionCollection.d.ts +4 -9
- package/mapping/support/_SublayerExtensionCollection.js +1 -1
- package/mapping/support/featureService.js +1 -1
- package/package.json +2 -2
- package/portal/CSVLayer.d.ts +1 -1
- package/portal/ElevationInfo.d.ts +4 -3
- package/portal/ElevationInfo.js +1 -1
- package/portal/LabelingInfo.js +1 -1
- package/portal/LayerDefinition.js +1 -1
- package/portal/MapServiceLayer.js +1 -1
- package/portal/Slide.js +1 -1
- package/portal/SubtypeGroupLayer.d.ts +2 -2
- package/portal/Symbol.d.ts +1 -1
- package/portal/Symbol.js +1 -1
- package/portal/TiledMapServiceLayer.d.ts +1 -1
- package/portal/TiledMapServiceLayer.js +1 -1
- package/portal/WMSLayer.d.ts +4 -3
- package/portal/WMTSInfo.d.ts +2 -2
- package/portal/WebMap.js +1 -1
- package/support/ArcGISRequestHelper.d.ts +2 -2
- package/support/FormatSettings.d.ts +6 -1
- package/support/InitializableBase.d.ts +17 -2
- package/support/InitializableBase.js +1 -1
- package/support/Serializable.d.ts +1 -1
- package/support/Serializable.js +1 -1
- package/support/Settings.d.ts +19 -0
- package/support/_esriInternal.d.ts +1 -3
- package/support/_esriInternal.js +1 -1
- package/support/esri.d.ts +2 -7
- package/support/observableUtils.d.ts +8 -8
- package/support/observableUtils.js +1 -1
- package/tasks/identify/ArcGISSublayerIdentifyProvider.d.ts +1 -1
- package/tasks/identify/BuildingComponentSublayerHitTestIdentifyProvider.d.ts +1 -1
- package/tasks/identify/CSVLayer3DHitTestIdentifyProvider.d.ts +1 -1
- package/tasks/identify/CSVLayerClientSideQueryIdentifyProvider.d.ts +1 -1
- package/tasks/identify/FeatureLayer3DHitTestIdentifyProvider.d.ts +1 -1
- package/tasks/identify/FeatureLayerClientSideIdentifyProvider.d.ts +1 -1
- package/tasks/identify/FeatureLayerQueryIdentifyProvider.d.ts +1 -1
- package/tasks/identify/GeoJSONLayer3DHitTestIdentifyProvider.d.ts +1 -1
- package/tasks/identify/GeoJSONLayerClientSideQueryIdentifyProvider.d.ts +1 -1
- package/tasks/identify/GeoRSSLayerIdentifyProvider.d.ts +1 -1
- package/tasks/identify/GraphicsLayerQueryIdentifyProvider.d.ts +1 -1
- package/tasks/identify/HitTestIdentifyProvider.d.ts +1 -1
- package/tasks/identify/IdentifyProviderBase.d.ts +1 -1
- package/tasks/identify/IdentifyService.d.ts +1 -1
- package/tasks/identify/ImageryLayerIdentifyProvider.d.ts +1 -1
- package/tasks/identify/KMLLayerQueryIdentifyProvider.d.ts +1 -1
- package/tasks/identify/MapNotesSublayerQueryIdentifyProvider.d.ts +1 -1
- package/tasks/identify/PointCloudLayerHitTestIdentifyProvider.d.ts +1 -1
- package/tasks/identify/RouteLayerQueryIdentifyProvider.d.ts +1 -1
- package/tasks/identify/SceneLayerHitTestIdentifyProvider.d.ts +1 -1
- package/tasks/identify/SceneLayerQueryIdentifyProvider.d.ts +1 -1
- package/tasks/identify/SubtypeSublayerQueryIdentifyProvider.d.ts +1 -1
- package/tasks/identify/WMSLayerFeatureInfoIdentifyProvider.d.ts +1 -1
- package/tasks/identify/WMSSublayerIdentifyProvider.d.ts +1 -1
- package/tasks/query/QueryOptions.d.ts +1 -1
- package/tasks/query/SubtypeSublayerQueryProvider.d.ts +3 -2
- package/tasks/search/SearchOptions.d.ts +1 -1
- package/tasks/search/support/_querySearchProviderUtils.d.ts +1 -1
- package/utilities/CollectionProxy.d.ts +30 -22
- package/utilities/CollectionProxy.js +1 -1
- package/utilities/MapTransformCollection.js +1 -1
- package/utilities/ObservableMap.d.ts +30 -6
- package/utilities/ObservableMap.js +1 -1
- package/utilities/ObservableSet.d.ts +52 -7
- package/utilities/ObservableSet.js +1 -1
- package/utilities/ReadOnlyMap.d.ts +10 -8
- package/utilities/_ReferenceCountedHandle.d.ts +3 -2
- package/utilities/_geoJson.d.ts +1 -1
- package/utilities/_gml.d.ts +1 -1
- package/utilities/_project.d.ts +1 -1
- package/utilities/_wkt.d.ts +1 -1
- package/utilities/collection.d.ts +2 -1
- package/utilities/esri.d.ts +1 -1
- package/utilities/geometry.d.ts +1 -1
- package/utilities/query.d.ts +1 -1
- package/utilities/renderers.d.ts +8 -8
- package/utilities/symbol.d.ts +2 -2
- package/utilities/watch.d.ts +6 -6
- package/utilities/watch.js +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/docs/html/types/support_esri.BuildingComponentSublayerCapabilities.html +0 -1
- package/docs/html/types/support_esri.BuildingComponentSublayerCapabilitiesData.html +0 -1
- package/docs/html/types/support_esri.CollectionAfterChangesEventHandler.html +0 -1
- package/docs/html/types/support_esri.CollectionBeforeChangesEventHandler.html +0 -1
- package/docs/html/types/support_esri.FeatureLayerElevationInfo.html +0 -1
package/data/Feature.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Graphic from "@arcgis/core/Graphic";
|
|
2
2
|
import Collection from "@arcgis/core/core/Collection";
|
|
3
|
+
import type { GeometryUnion } from "@arcgis/core/geometry/types.js";
|
|
3
4
|
import type FeatureType from "@arcgis/core/layers/support/FeatureType";
|
|
4
|
-
import type { GeometryUnion } from "@arcgis/core/unionTypes.js";
|
|
5
5
|
import type { EntityBaseProperties } from "../Entity.js";
|
|
6
6
|
import { EntityBase } from "../Entity.js";
|
|
7
7
|
import { Hyperlink } from "../Hyperlink.js";
|
package/data/FeatureList.d.ts
CHANGED
|
@@ -155,7 +155,7 @@ export declare class FeatureList extends ReadOnlyCollection<Feature> implements
|
|
|
155
155
|
*
|
|
156
156
|
* @param event The change event.
|
|
157
157
|
*/
|
|
158
|
-
protected _onFeatureSetChange(event: ChangeEvent<Feature>): void;
|
|
158
|
+
protected _onFeatureSetChange(event: ChangeEvent<Feature, FeatureSet>): void;
|
|
159
159
|
private _createSortFunc;
|
|
160
160
|
private _stabilizeSortFunc;
|
|
161
161
|
private _createFilterFunc;
|
package/data/FeatureList.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__decorate as e}from"tslib";import t from"@arcgis/core/core/Collection.js";import i from"@arcgis/core/layers/support/Field";import{ArgumentError as r}from"../ArgumentError.js";import{generateId as s}from"../Entity.js";import{isFeatureSet as n,ItemType as o}from"../ItemType.js";import{assignProperties as a,assignPropertiesAsync as l,filterJSONProperties as c,getDefaults as u,getSerializableProperties as f,serializable as h}from"../support/Serializable.js";import{getSearchableValue as m}from"../tasks/search/_utilities.js";import{ReadOnlyCollection as d}from"../utilities/ReadOnlyCollection.js";import{isCodedValueDomain as g}from"../utilities/esri.js";import{parse as _}from"../utilities/format/date.js";import{parse as p}from"../utilities/format/number.js";import{parse as F}from"../utilities/format/time.js";import{escapeRegExp as S}from"../utilities/string.js";import{FeatureSet as y}from"./FeatureSet.js";let b=class extends d{id;title;featureSet;_sortFunc;_filterFunc;get itemType(){return o.FEATURE_LIST}constructor(e){if(super(new t),this.id=e?.id??s(),n(e))this.featureSet=e;else if(e){const t=e;Array.isArray(t.featureSet)?this.featureSet=new y({features:t.featureSet}):n(t.featureSet)?this.featureSet=t.featureSet:this.featureSet=new y(t.featureSet)}else this.featureSet=new y;for(const e of this.featureSet)this._collection.add(e);this.featureSet.on("change",(e=>this._onFeatureSetChange(e)))}toItemUri(){return`item://${encodeURIComponent(o.FEATURE_LIST)}/${encodeURIComponent(this.id)}`}assignProperties(e){a(this._getSerializableProperties(),this,e)}async assignPropertiesAsync(e){return l(this._getSerializableProperties(),this,e)}async finishAssignProperties(){}toJSON(e="all"){return c(this._getSerializableProperties(),this,e)}getDefaults(){return u(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 r("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(),
|
|
1
|
+
import{__decorate as e}from"tslib";import t from"@arcgis/core/core/Collection.js";import i from"@arcgis/core/layers/support/Field";import{ArgumentError as r}from"../ArgumentError.js";import{generateId as s}from"../Entity.js";import{isFeatureSet as n,ItemType as o}from"../ItemType.js";import{assignProperties as a,assignPropertiesAsync as l,filterJSONProperties as c,getDefaults as u,getSerializableProperties as f,serializable as h}from"../support/Serializable.js";import{getSearchableValue as m}from"../tasks/search/_utilities.js";import{ReadOnlyCollection as d}from"../utilities/ReadOnlyCollection.js";import{isCodedValueDomain as g}from"../utilities/esri.js";import{parse as _}from"../utilities/format/date.js";import{parse as p}from"../utilities/format/number.js";import{parse as F}from"../utilities/format/time.js";import{escapeRegExp as S}from"../utilities/string.js";import{FeatureSet as y}from"./FeatureSet.js";let b=class extends d{id;title;featureSet;_sortFunc;_filterFunc;get itemType(){return o.FEATURE_LIST}constructor(e){if(super(new t),this.id=e?.id??s(),n(e))this.featureSet=e;else if(e){const t=e;Array.isArray(t.featureSet)?this.featureSet=new y({features:t.featureSet}):n(t.featureSet)?this.featureSet=t.featureSet:this.featureSet=new y(t.featureSet)}else this.featureSet=new y;for(const e of this.featureSet)this._collection.add(e);this.featureSet.on("change",(e=>this._onFeatureSetChange(e)))}toItemUri(){return`item://${encodeURIComponent(o.FEATURE_LIST)}/${encodeURIComponent(this.id)}`}assignProperties(e){a(this._getSerializableProperties(),this,e)}async assignPropertiesAsync(e){return l(this._getSerializableProperties(),this,e)}async finishAssignProperties(){}toJSON(e="all"){return c(this._getSerializableProperties(),this,e)}getDefaults(){return u(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 r("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(),added:[],removed:[]}),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 r("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=[],s=[];let n=0;for(;n<this._collection.length;){const e=this._collection.getItemAt(n);this._filterFunc&&!this._filterFunc(e)?(i.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||i.length)&&this.emit("change",{added:s,removed:i,moved:[]})}removeFilter(){this.applyFilter(void 0)}getSerializableProperties(e="all"){return f(this._getSerializableProperties(),e)}_getSerializableProperties(){return{title:["project"],featureSet:{serializeModes:["project"],deserialize:e=>{n(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 s of e){if("string"==typeof s&&(s={field:s}),!s.field)throw new r("criteria","Invalid sort criteria.");const e=this._getField(s.field),n=this._getSortValue(t,e),o=this._getSortValue(i,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 i of e){if(!i.field)throw new r("criteria","Invalid sort criteria.");if(!i.match)continue;const e=this._getField(i.field),s=this._getFilterRegex(i.match,e);t.set(e.name,s)}return t.size?e=>{for(const i of t.keys()){const r=this._getField(i),s=m(e,r),n=t.get(i);let o=n[0];if(n.length>1&&"string"!==r.type&&g(e.type?.domains?.[r.name])&&(o=n[1]),o.exec(s))return!0}return!1}:()=>!0}_getSortValue(e,t){if(g(e.type?.domains?.[t.name])||g(t.domain))return e.presentableAttributes.get(t.name);switch(t.type){case"integer":case"small-integer":case"big-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=_(e.attributes.get(t.name)).getTime();return isNaN(i)?0:i}case"timestamp-offset":case"date-only":{const i=_({},e.attributes.get(t.name)).getTime();return isNaN(i)?0:i}case"time-only":{const i=F(e.attributes.get(t.name)).toDate().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(`${S(e)}`,"i")];switch(t.type){case"integer":case"small-integer":case"big-integer":case"double":case"single":case"oid":{const i=new RegExp(`(^|${w})${S(e)}`,"i");return this.featureSet.schema.types.some((e=>g(e.domains?.[t.name])))?[i,new RegExp(`${S(e)}`,"i")]:[i]}default:return[new RegExp(`${S(e)}`,"i")]}}_getField(e){let t=this.featureSet.schema.findFieldByName(e);return t||(t=new i({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}}};b=e([h],b);export{b as FeatureList};const w="\t";
|
package/data/FeatureSet.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Evented from "@arcgis/core/core/Evented.js";
|
|
1
|
+
import { Evented } from "@arcgis/core/core/Evented.js";
|
|
2
2
|
import type { Entity, EntityProperties } from "../Entity.js";
|
|
3
3
|
import type { PropertyDefs, Serializable, SerializeMode } from "../support/Serializable.js";
|
|
4
4
|
import type { ChangeEvent } from "../support/esri.js";
|
|
@@ -9,6 +9,27 @@ import { FeatureSettings } from "./FeatureSettings.js";
|
|
|
9
9
|
import type { FeatureSource } from "./FeatureSource.js";
|
|
10
10
|
import type { SchemaProperties } from "./Schema.js";
|
|
11
11
|
import { Schema } from "./Schema.js";
|
|
12
|
+
/**
|
|
13
|
+
* Events emitted by the {@link data/FeatureSet!FeatureSet} class.
|
|
14
|
+
*/
|
|
15
|
+
export interface FeatureSetEvents {
|
|
16
|
+
/**
|
|
17
|
+
* Emitted when one or more dehydrated features are added to the set. This
|
|
18
|
+
* can occur when deserializing a feature set from a project, or when
|
|
19
|
+
* features with a source are added to the set without geometry.
|
|
20
|
+
*/
|
|
21
|
+
"dehydrated-features-added": Feature[];
|
|
22
|
+
/**
|
|
23
|
+
* Emitted after one or more dehydrated features have been hydrated.
|
|
24
|
+
*/
|
|
25
|
+
"feature-hydration-complete": Feature[];
|
|
26
|
+
/**
|
|
27
|
+
* Emitted when the features in the set have changed. The event contains
|
|
28
|
+
* arrays of added, removed, and moved features, as well as a reference to
|
|
29
|
+
* the set itself.
|
|
30
|
+
*/
|
|
31
|
+
change: ChangeEvent<Feature, FeatureSet>;
|
|
32
|
+
}
|
|
12
33
|
/**
|
|
13
34
|
* Properties that can be passed into the constructor for
|
|
14
35
|
* {@link data/FeatureSet!FeatureSet}.
|
|
@@ -40,6 +61,11 @@ declare const FeatureSet_base: typeof Evented & (abstract new (...args: any[]) =
|
|
|
40
61
|
* A set of features that share a common schema.
|
|
41
62
|
*/
|
|
42
63
|
export declare class FeatureSet extends FeatureSet_base implements Entity, Serializable<FeatureSetProperties>, Set<Feature> {
|
|
64
|
+
/**
|
|
65
|
+
* @deprecated Do not directly reference this property. Use EventNames and
|
|
66
|
+
* EventTypes helpers from @arcgis/core/Evented.
|
|
67
|
+
*/
|
|
68
|
+
"@eventTypes": FeatureSetEvents;
|
|
43
69
|
/**
|
|
44
70
|
* Used by Object.toString().
|
|
45
71
|
*/
|
|
@@ -85,9 +111,6 @@ export declare class FeatureSet extends FeatureSet_base implements Entity, Seria
|
|
|
85
111
|
* @param properties Optional properties for the new feature set.
|
|
86
112
|
*/
|
|
87
113
|
static fromFeatureStream(features: AsyncIterable<Feature>, properties?: FeatureSetProperties): Promise<FeatureSet>;
|
|
88
|
-
on(name: "dehydrated-features-added", callback: (dehydratedFeatures: Feature[]) => void): IHandle;
|
|
89
|
-
on(name: "feature-hydration-complete", callback: (hydratedFeatures: Feature[]) => void): IHandle;
|
|
90
|
-
on(name: "change", callback: (event: ChangeEvent<Feature>) => void): IHandle;
|
|
91
114
|
/**
|
|
92
115
|
* Sets the values of this object's properties.
|
|
93
116
|
*
|
package/data/FeatureSet.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e;import{__decorate as t}from"tslib";import r from"@arcgis/core/core/Collection";import s
|
|
1
|
+
var e;import{__decorate as t}from"tslib";import r from"@arcgis/core/core/Collection";import{Evented as s}from"@arcgis/core/core/Evented.js";import{generateId as i}from"../Entity.js";import{isFeature as a,ItemType as h}from"../ItemType.js";import{assignProperties as o,assignPropertiesAsync as n,filterJSONProperties as u,getDefaults as d,getSerializableProperties as c,serializable as m}from"../support/Serializable.js";import{notifyChange as g,observable as l,watchEach as y}from"../support/observableUtils.js";import{ObservableMap as p}from"../utilities/ObservableMap.js";import{groupBy as _}from"../utilities/array.js";import{toArray as f,from as S,empty as v}from"../utilities/asyncIterable.js";import{compare as b,find as F}from"../utilities/iterable.js";import{getLogger as z}from"../utilities/log.js";import{Feature as j}from"./Feature.js";import{FeatureSettings as E}from"./FeatureSettings.js";import{Schema as P}from"./Schema.js";const k=z("feature-set");let C=e=class extends(l(s)){[Symbol.toStringTag];id;title;get size(){return this._features.size}get source(){return this._source}set source(e){this._source===e||null==this._source&&null==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))}settings=new E;schema=new P;get itemType(){return h.FEATURE_SET}_source;_rehydratingFeatureCount=0;_rehydratingFeatures=new r;_features=new p;constructor(e){super(),this.schema._featureSettings=this.settings,this.id=e?.id??i(),y(this._rehydratingFeatures,"[]._hydrationStatus",(()=>{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=_(e,(e=>e.source)),r=_(await f(S([...t.entries()].map((([e,t])=>{let r;try{r=e?.getFeatures(t.map((e=>e.primaryKey)).filter((e=>!!e)))??v()}catch(t){r=v(),k.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}assignProperties(e){o(this._getSerializableProperties(),this,e)}async assignPropertiesAsync(e){return n(this._getSerializableProperties(),this,e)}async finishAssignProperties(){}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 u(this._getSerializableProperties(),this,e)}toItemUri(){return`item://${encodeURIComponent(h.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&&(g(this,"size"),this.emit("change",{added:t,removed:r,moved:[],target:this})),this}clear(){const e=Array.from(this.values());this._features.clear(),g(this,"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&&(g(this,"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 F(this,(t=>t.id===e))}findByPrimaryKey(e){return F(this,(t=>t.primaryKey===e))}getSerializableProperties(e="all"){return c(this._getSerializableProperties(),e)}getDefaults(){return d(this._getSerializableProperties())}getDefault(e){return this.getDefaults()[e]}[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&&(g(this,"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&&(g(this,"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=[];b(this._rehydratingFeatures.concat([...this]),e,{onNew:e=>{if(a(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 j(e);r.push(t),this.add(t)}},onMatch:(e,r)=>{a(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)=>a(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};
|
|
@@ -9,7 +9,7 @@ import type { FormatSettingsProperties } from "../support/FormatSettings.js";
|
|
|
9
9
|
import { FormatSettings } from "../support/FormatSettings.js";
|
|
10
10
|
import type { InitializableCollection } from "../support/InitializableCollectionProxy.js";
|
|
11
11
|
import type { PropertyDefs, SerializeMode } from "../support/Serializable.js";
|
|
12
|
-
import { Settings } from "../support/Settings.js";
|
|
12
|
+
import { Settings, type SettingsEvents } from "../support/Settings.js";
|
|
13
13
|
import type { Feature } from "./Feature.js";
|
|
14
14
|
import type { FeatureSource } from "./FeatureSource.js";
|
|
15
15
|
import type { PopupContentExtensionProperties } from "./PopupContentExtension.js";
|
|
@@ -74,6 +74,11 @@ export interface FeatureSettingsProperties {
|
|
|
74
74
|
* Settings that pertain to features.
|
|
75
75
|
*/
|
|
76
76
|
export declare class FeatureSettings extends Settings<FeatureSettingsProperties> {
|
|
77
|
+
/**
|
|
78
|
+
* @deprecated Do not directly reference this property. Use EventNames and
|
|
79
|
+
* EventTypes helpers from @arcgis/core/Evented.
|
|
80
|
+
*/
|
|
81
|
+
"@eventTypes": SettingsEvents<FeatureSettings>;
|
|
77
82
|
/**
|
|
78
83
|
* The PopupContentExtensions associated with each popupContent of the
|
|
79
84
|
* schema.
|
package/data/FeatureSettings.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__decorate as t}from"tslib";import e from"@arcgis/core/PopupTemplate";import{Hyperlink as n}from"../Hyperlink.js";import{isPopupContentExtension as i}from"../ItemType.js";import{ArrayWrappedCollection as o}from"../mapping/support/ArrayWrappedCollection.js";import{FormatSettings as s}from"../support/FormatSettings.js";import{InitializableCollectionProxy as r}from"../support/InitializableCollectionProxy.js";import{filterJSONProperties as p,isDefault as a,serializable as u,shouldExcludeDefaults as h}from"../support/Serializable.js";import{Settings as l}from"../support/Settings.js";import{createIHandle as d,notifyChange as f,onWatch as m,watch as c}from"../support/observableUtils.js";import g from"../utilities/_ReferenceCountedHandle.js";import{compare as _}from"../utilities/array.js";import{checkArg as S}from"../utilities/checkArg.js";import{getAllFieldInfos as C,getAllReferencedFieldNames as y,isPopupTemplate as v}from"../utilities/esri.js";import{isArcadeExpressionField as A,isRelationshipField as T}from"../utilities/field.js";import{objectKeys as x}from"../utilities/object.js";import{isQueryBasedRelationship as P}from"../utilities/relationships.js";import{PopupContentExtension as z,_popupContentExtensionMap as w}from"./PopupContentExtension.js";let E=class extends l{popupContentExtensions;_isDefaultPopupTemplate=!1;_popupContentCollection;get _popupContent(){return null==this._popupContentCollection&&(this._popupContentCollection=this._createPopupContentCollection()),this._popupContentCollection}get hyperlinkTemplates(){return this._getCollectionSetting("hyperlinkTemplates")}get popupTemplate(){return this._getSetting("popupTemplate")}set popupTemplate(t){let n;n=t instanceof Object&&!v(t)?e.fromJSON(t):t;const i=this?._feature?.schema?.createPopupTemplate()??this?._featureSource?.schema?.createPopupTemplate();n&&i&&(n.content=n.content??i.content,n.fieldInfos=n.fieldInfos??i.fieldInfos),this._setSetting("popupTemplate",n),this._isDefaultPopupTemplate=!1,this.featureSource?.schema?.fieldExtensions.toArray().forEach((t=>{t._clearFieldInfoCache()}))}get showRelatedRecordsWhenUnconfigured(){return this._getSetting("showRelatedRecordsWhenUnconfigured",!0)}set showRelatedRecordsWhenUnconfigured(t){this._setSetting("showRelatedRecordsWhenUnconfigured",t)}get formatSettings(){return this._getNestedSettings("formatSettings",(()=>new s))}get returnGeometry(){return this._getSetting("returnGeometry",!0)}set returnGeometry(t){this._setSetting("returnGeometry",t)}get outFields(){return this._getSetting("outFields",this._defaultOutFields)}set outFields(t){this._setSetting("outFields",t)}get outSpatialReference(){return this._getSetting("outSpatialReference")}set outSpatialReference(t){this._setSetting("outSpatialReference",t)}get maxAllowableOffset(){return this._getSetting("maxAllowableOffset")}set maxAllowableOffset(t){this._setSetting("maxAllowableOffset",t)}get zoomScale(){return this._getSetting("zoomScale")}set zoomScale(t){this._setSetting("zoomScale",t)}get zoomFactor(){const t=this._feature?this._feature.schema:this._featureSource?.schema,e=t&&"point"===t.geometryType?void 0:1.5;return this._getSetting("zoomFactor",e)}set zoomFactor(t){this._setSetting("zoomFactor",t)}get featureSource(){return this._featureSource}get feature(){return this._feature}_featureSource;_feature;constructor(t){super(t),this.popupContentExtensions=new b(this)}get _defaultOutFields(){if(null==this.popupTemplate)return["*"];const t=C(this.popupTemplate),e=this.featureSource?.schema?.primaryKeyField;if(!t||!e)return["*"];const n=new Set([e]),i=new Map;this.featureSource.schema.fields.forEach((t=>{i.set(t.name.toLowerCase(),t.name)}));const o=new Set([...y(this.popupTemplate),...this.hyperlinkTemplates.toArray().flatMap((t=>t.getReferencedFields()))]);this._featureSource.relationships.forEach((t=>{P(t)&&o.add(t.keyField)}));const s=this.featureSource?.schema?.typeIdField;s&&o.add(s);const r=t.reduce(((t,e)=>((e.visible||e.isEditable&&this.featureSource.capabilities.supportsEditing)&&t.push(e.fieldName),t)),[]),p=new Set([...r,...o]);for(const t of p){if(A(t)||T(t))continue;const e=i.get(t.toLowerCase());e&&n.add(e)}return Array.from(n)}_setFeatureSource(t){this._featureSource=t,f(this,"featureSource")}_setFeature(t){this._feature=t,f(this,"feature")}toJSON(t="all"){const e=p(this._getSerializableProperties(),this,t)||{},n=e.popupContentExtensions?.filter((t=>{const e=this.parent;return!e?.popupContentExtensions?.some((e=>e.id===t.id))}));if(e)for(const t of x(e))this.isModified(t)||delete e[t];if(n?.length&&(e.popupContentExtensions=n),!h(t)||!a(e))return e}_hasSettingIncludingAncestor(t){return"outFields"===t||super._hasSettingIncludingAncestor(t)}_createPopupContentCollection(){return new o({parent:this,targetProperty:"popupTemplate",arrayProperty:"content"})}_getSerializableProperties(){return{hyperlinkTemplates:{serializeModes:["initial"],deserialize:t=>{t.forEach((t=>{this.hyperlinkTemplates.find((e=>this._hyperlinksAreEquivalent(e,t)))||this.hyperlinkTemplates.add(t instanceof n?t:new n(t))})),this.hyperlinkTemplates.toArray().forEach((e=>{const n=this.hyperlinkTemplates.indexOf(e),i=t.findIndex((t=>this._hyperlinksAreEquivalent(t,e)));i<0?this.hyperlinkTemplates.removeAt(n):i!==n&&this.hyperlinkTemplates.reorder(e,i)}))}},popupTemplate:{serializeModes:["project"],isDefault:()=>!this._isDefaultPopupTemplate},showRelatedRecordsWhenUnconfigured:{serializeModes:["initial"],default:!0},formatSettings:"initial",outFields:{serializeModes:["initial"],serialize:()=>this.isModified("outFields")?this.outFields:void 0},returnGeometry:{serializeModes:["initial"],default:!0},outSpatialReference:"initial",maxAllowableOffset:"initial",zoomScale:"initial",zoomFactor:{serializeModes:["initial"],isDefault:t=>{const e=this._feature?this._feature.schema:this._featureSource?.schema;return t===(e&&"point"===e.geometryType?void 0:1.5)}},popupContentExtensions:{serializeModes:["initial"],serialize:t=>this.popupContentExtensions.map((e=>e.toJSON(t))).filter((t=>!(t&&2===Object.keys(t).length&&t.id&&t.content))).toArray(),deserialize:t=>{t&&_(this.popupContentExtensions,t,{onNew:(t,e)=>{this.popupContentExtensions.add(i(t)?t:new z(t),e)},onMatch:(t,e,n,o)=>{i(e)||t.assignProperties(e),n!==o&&this.popupContentExtensions.reorder(t,o)},onMissing:t=>{this.popupContentExtensions.remove(t)},equals:(t,e)=>{if(!e)return!1;if(i(e))return e===t||e.id===t.id;const n=this.popupContentExtensions.indexOf(t);if(e.content&&n>-1){const t=this.popupContentExtensions.toArray();return z.matchesRef(t,n,e.content)}return t.id===e.id}})}}}}_hyperlinksAreEquivalent(t,e){if(t===e)return!0;const n=t=>t||"";return n(t.text)===n(e.text)&&n(t.url)===n(e.url)&&n(t.iconUrl)===n(e.iconUrl)&&n(t.target)===n(e.target)&&n(t.tooltip)===n(e.tooltip)}};E=t([u],E);export{E as FeatureSettings};class b extends r{get _collection(){return this._featureSettings._popupContent.map((t=>this._forContent(t))).concat(Array.from(this._uninitializedPopupContentExtensions))}get _popupTemplateIsInherited(){return this._featureSettings.parent&&this._featureSettings.popupTemplate===this._featureSettings.parent.popupTemplate}_featureSettings;_uninitializedPopupContentExtensions=new Set;_onChangePopupContentHandle=new g((()=>this._featureSettings._popupContent.on("change",(t=>{const e={added:(t.added||[]).map((t=>this._forContent(t))),moved:(t.moved||[]).map((t=>this._forContent(t))),removed:(t.removed||[]).map((t=>this._forContent(t))),target:this};this.emit("change",e)}))));_onBeforeAddPopupContentHandle=new g((()=>this._featureSettings._popupContent.on("before-add",(t=>{this.emit("before-add",{...t,item:this._forContent(t.item),target:this})}))));_onBeforeRemovePopupContentHandle=new g((()=>this._featureSettings._popupContent.on("before-remove",(t=>{this.emit("before-remove",{...t,item:this._forContent(t.item),target:this})}))));_onBeforeChangesPopupContentHandle=new g((()=>this._featureSettings._popupContent.on("before-changes",(t=>{this.emit("before-changes",{...t,target:this})}))));_onAfterAddPopupContentHandle=new g((()=>this._featureSettings._popupContent.on("after-add",(t=>{this.emit("after-add",{...t,item:this._forContent(t.item),target:this})}))));_onAfterRemovePopupContentHandle=new g((()=>this._featureSettings._popupContent.on("after-remove",(t=>{this.emit("after-remove",{...t,item:this._forContent(t.item),target:this})}))));_onAfterChangesPopupContentHandle=new g((()=>this._featureSettings._popupContent.on("after-changes",(t=>{this.emit("after-changes",{...t,target:this})}))));constructor(t){super(),this._featureSettings=t,m(this,"length",(()=>c(this._featureSettings,"_popupContent.length",(()=>f(this,"length")),{sync:!0})))}forContent(t){if(S("content",t).isNotMissing(),this._featureSettings._popupContent.includes(t))return this._forContent(t)}add(t,n){if(S("contentX",t).isNotMissing(),this._popupTemplateIsInherited&&(this._featureSettings.popupTemplate=new e({content:this._featureSettings._popupContent.toArray()})),t.featureSettings&&t.featureSettings.popupContentExtensions.remove(t),t._setFeatureSettings(this._featureSettings),t.content){const e=w.get(t.content);if(w.set(t.content,t),e&&e!==t&&this._onRemoved(e),this._featureSettings._popupContent.includes(t.content))if(void 0===n){const n={added:[t],moved:[],removed:e?[e]:[],target:this};this.emit("change",n),this.emit("after-add",{item:t,target:this}),this.emit("after-changes",{target:this}),f(this,"length")}else this._featureSettings._popupContent.reorder(t.content,n);else this._featureSettings._popupContent.add(t.content,n)}else{this._uninitializedPopupContentExtensions.add(t);const e={added:[t],moved:[],removed:[],target:this};this.emit("change",e),this.emit("after-add",{item:t,target:this}),this.emit("after-changes",{target:this}),f(this,"length")}return this._onAdded(t),this}removeAt(t){const n=this.getItemAt(t);if(void 0!==n){if(this._popupTemplateIsInherited&&(this._featureSettings.popupTemplate=new e({content:this._featureSettings._popupContent.toArray()})),this._uninitializedPopupContentExtensions.has(n)){this._uninitializedPopupContentExtensions.delete(n);const t={added:[],moved:[],removed:[n],target:this};this.emit("change",t),this.emit("after-remove",{item:n,target:this}),this.emit("after-changes",{target:this}),f(this,"length")}else this._featureSettings._popupContent.remove(n.content);return this._onRemoved(n),n}}reorder(t,n){if(t&&this._featureSettings._popupContent.includes(t.content))return this._popupTemplateIsInherited&&(this._featureSettings.popupTemplate=new e({content:this._featureSettings._popupContent.toArray()})),this._featureSettings._popupContent.reorder(t.content,n),t}sort(t){return this._popupTemplateIsInherited&&(this._featureSettings.popupTemplate=new e({content:this._featureSettings._popupContent.toArray()})),this._featureSettings._popupContent.sort(((e,n)=>t(this._forContent(e),this._forContent(n)))),this}on(t,e){const n=[];return"change"===t?n.push(this._onChangePopupContentHandle.add()):"before-add"===t?n.push(this._onBeforeAddPopupContentHandle.add()):"before-remove"===t?n.push(this._onBeforeRemovePopupContentHandle.add()):"before-changes"===t?n.push(this._onBeforeChangesPopupContentHandle.add()):"after-add"===t?n.push(this._onAfterAddPopupContentHandle.add()):"after-remove"===t?n.push(this._onAfterRemovePopupContentHandle.add()):"after-changes"===t&&n.push(this._onAfterChangesPopupContentHandle.add()),n.push(super.on(t,e)),d(n)}_itemIsInitialized(t){return super._itemIsInitialized(t)&&!!t.content}_onAdded(t){}_onRemoved(t){t.featureSettings===this._featureSettings&&t._setFeatureSettings(void 0)}_forContent(t){if(this._uninitializedPopupContentExtensions.size)for(const t of this._uninitializedPopupContentExtensions)t._resolveContent(),t.content&&(w.set(t.content,t),this._uninitializedPopupContentExtensions.delete(t));if(!w.has(t)){const e=new z({content:t});w.set(t,e),e._setFeatureSettings(this._featureSettings),this._onAdded(e)}return w.get(t)}}
|
|
1
|
+
import{__decorate as e}from"tslib";import t from"@arcgis/core/PopupTemplate";import{Hyperlink as n}from"../Hyperlink.js";import{isPopupContentExtension as i}from"../ItemType.js";import{ArrayWrappedCollection as o}from"../mapping/support/ArrayWrappedCollection.js";import{FormatSettings as s}from"../support/FormatSettings.js";import{InitializableCollectionProxy as r}from"../support/InitializableCollectionProxy.js";import{filterJSONProperties as p,isDefault as a,serializable as u,shouldExcludeDefaults as h}from"../support/Serializable.js";import{Settings as l}from"../support/Settings.js";import{createIHandle as f,notifyChange as d,onWatch as m,watch as c}from"../support/observableUtils.js";import _ from"../utilities/_ReferenceCountedHandle.js";import{compare as g}from"../utilities/array.js";import{checkArg as C}from"../utilities/checkArg.js";import{getAllFieldInfos as S,getAllReferencedFieldNames as y,isPopupTemplate as v}from"../utilities/esri.js";import{isArcadeExpressionField as A,isRelationshipField as T}from"../utilities/field.js";import{objectKeys as x}from"../utilities/object.js";import{isQueryBasedRelationship as P}from"../utilities/relationships.js";import{PopupContentExtension as z,_popupContentExtensionMap as w}from"./PopupContentExtension.js";let E=class extends l{popupContentExtensions;_isDefaultPopupTemplate=!1;_popupContentCollection;get _popupContent(){return null==this._popupContentCollection&&(this._popupContentCollection=this._createPopupContentCollection()),this._popupContentCollection}get hyperlinkTemplates(){return this._getCollectionSetting("hyperlinkTemplates")}get popupTemplate(){return this._getSetting("popupTemplate")}set popupTemplate(e){let n;n=e instanceof Object&&!v(e)?t.fromJSON(e):e;const i=this?._feature?.schema?.createPopupTemplate()??this?._featureSource?.schema?.createPopupTemplate();n&&i&&(n.content=n.content??i.content,n.fieldInfos=n.fieldInfos??i.fieldInfos),this._setSetting("popupTemplate",n),this._isDefaultPopupTemplate=!1,this.featureSource?.schema?.fieldExtensions.toArray().forEach((e=>{e._clearFieldInfoCache()}))}get showRelatedRecordsWhenUnconfigured(){return this._getSetting("showRelatedRecordsWhenUnconfigured",!0)}set showRelatedRecordsWhenUnconfigured(e){this._setSetting("showRelatedRecordsWhenUnconfigured",e)}get formatSettings(){return this._getNestedSettings("formatSettings",(()=>new s))}get returnGeometry(){return this._getSetting("returnGeometry",!0)}set returnGeometry(e){this._setSetting("returnGeometry",e)}get outFields(){return this._getSetting("outFields",this._defaultOutFields)}set outFields(e){this._setSetting("outFields",e)}get outSpatialReference(){return this._getSetting("outSpatialReference")}set outSpatialReference(e){this._setSetting("outSpatialReference",e)}get maxAllowableOffset(){return this._getSetting("maxAllowableOffset")}set maxAllowableOffset(e){this._setSetting("maxAllowableOffset",e)}get zoomScale(){return this._getSetting("zoomScale")}set zoomScale(e){this._setSetting("zoomScale",e)}get zoomFactor(){const e=this._feature?this._feature.schema:this._featureSource?.schema,t=e&&"point"===e.geometryType?void 0:1.5;return this._getSetting("zoomFactor",t)}set zoomFactor(e){this._setSetting("zoomFactor",e)}get featureSource(){return this._featureSource}get feature(){return this._feature}_featureSource;_feature;constructor(e){super(e),this.popupContentExtensions=new b(this)}get _defaultOutFields(){if(null==this.popupTemplate)return["*"];const e=S(this.popupTemplate),t=this.featureSource?.schema?.primaryKeyField;if(!e||!t)return["*"];const n=new Set([t]),i=new Map;this.featureSource.schema.fields.forEach((e=>{i.set(e.name.toLowerCase(),e.name)}));const o=new Set([...y(this.popupTemplate),...this.hyperlinkTemplates.toArray().flatMap((e=>e.getReferencedFields()))]);this._featureSource.relationships.forEach((e=>{P(e)&&o.add(e.keyField)}));const s=this.featureSource?.schema?.typeIdField;s&&o.add(s);const r=e.reduce(((e,t)=>((t.visible||t.isEditable&&this.featureSource.capabilities.supportsEditing)&&e.push(t.fieldName),e)),[]),p=new Set([...r,...o]);for(const e of p){if(A(e)||T(e))continue;const t=i.get(e.toLowerCase());t&&n.add(t)}return Array.from(n)}_setFeatureSource(e){this._featureSource=e,d(this,"featureSource")}_setFeature(e){this._feature=e,d(this,"feature")}toJSON(e="all"){const t=p(this._getSerializableProperties(),this,e)||{},n=t.popupContentExtensions?.filter((e=>{const t=this.parent;return!t?.popupContentExtensions?.some((t=>t.id===e.id))}));if(t)for(const e of x(t))this.isModified(e)||delete t[e];if(n?.length&&(t.popupContentExtensions=n),!h(e)||!a(t))return t}_hasSettingIncludingAncestor(e){return"outFields"===e||super._hasSettingIncludingAncestor(e)}_createPopupContentCollection(){return new o({parent:this,targetProperty:"popupTemplate",arrayProperty:"content"})}_getSerializableProperties(){return{hyperlinkTemplates:{serializeModes:["initial"],deserialize:e=>{e.forEach((e=>{this.hyperlinkTemplates.find((t=>this._hyperlinksAreEquivalent(t,e)))||this.hyperlinkTemplates.add(e instanceof n?e:new n(e))})),this.hyperlinkTemplates.toArray().forEach((t=>{const n=this.hyperlinkTemplates.indexOf(t),i=e.findIndex((e=>this._hyperlinksAreEquivalent(e,t)));i<0?this.hyperlinkTemplates.removeAt(n):i!==n&&this.hyperlinkTemplates.reorder(t,i)}))}},popupTemplate:{serializeModes:["project"],isDefault:()=>!this._isDefaultPopupTemplate},showRelatedRecordsWhenUnconfigured:{serializeModes:["initial"],default:!0},formatSettings:"initial",outFields:{serializeModes:["initial"],serialize:()=>this.isModified("outFields")?this.outFields:void 0},returnGeometry:{serializeModes:["initial"],default:!0},outSpatialReference:"initial",maxAllowableOffset:"initial",zoomScale:"initial",zoomFactor:{serializeModes:["initial"],isDefault:e=>{const t=this._feature?this._feature.schema:this._featureSource?.schema;return e===(t&&"point"===t.geometryType?void 0:1.5)}},popupContentExtensions:{serializeModes:["initial"],serialize:e=>this.popupContentExtensions.map((t=>t.toJSON(e))).filter((e=>!(e&&2===Object.keys(e).length&&e.id&&e.content))).toArray(),deserialize:e=>{e&&g(this.popupContentExtensions,e,{onNew:(e,t)=>{this.popupContentExtensions.add(i(e)?e:new z(e),t)},onMatch:(e,t,n,o)=>{i(t)||e.assignProperties(t),n!==o&&this.popupContentExtensions.reorder(e,o)},onMissing:e=>{this.popupContentExtensions.remove(e)},equals:(e,t)=>{if(!t)return!1;if(i(t))return t===e||t.id===e.id;const n=this.popupContentExtensions.indexOf(e);if(t.content&&n>-1){const e=this.popupContentExtensions.toArray();return z.matchesRef(e,n,t.content)}return e.id===t.id}})}}}}_hyperlinksAreEquivalent(e,t){if(e===t)return!0;const n=e=>e||"";return n(e.text)===n(t.text)&&n(e.url)===n(t.url)&&n(e.iconUrl)===n(t.iconUrl)&&n(e.target)===n(t.target)&&n(e.tooltip)===n(t.tooltip)}};E=e([u],E);export{E as FeatureSettings};class b extends r{get _collection(){return this._featureSettings._popupContent.map((e=>this._forContent(e))).concat(Array.from(this._uninitializedPopupContentExtensions))}get _popupTemplateIsInherited(){return this._featureSettings.parent&&this._featureSettings.popupTemplate===this._featureSettings.parent.popupTemplate}_featureSettings;_uninitializedPopupContentExtensions=new Set;_onChangePopupContentHandle=new _((()=>this._featureSettings._popupContent.on("change",(e=>{const t={added:(e.added||[]).map((e=>this._forContent(e))),moved:(e.moved||[]).map((e=>this._forContent(e))),removed:(e.removed||[]).map((e=>this._forContent(e))),target:this};this.emit("change",t)}))));_onBeforeAddPopupContentHandle=new _((()=>this._featureSettings._popupContent.on("before-add",(e=>{this.emit("before-add",{...e,item:this._forContent(e.item)})}))));_onBeforeRemovePopupContentHandle=new _((()=>this._featureSettings._popupContent.on("before-remove",(e=>{this.emit("before-remove",{...e,item:this._forContent(e.item)})}))));_onBeforeChangesPopupContentHandle=new _((()=>this._featureSettings._popupContent.on("before-changes",(e=>{this.emit("before-changes",{...e,item:this._forContent(e.item)})}))));_onAfterAddPopupContentHandle=new _((()=>this._featureSettings._popupContent.on("after-add",(e=>{this.emit("after-add",{...e,item:this._forContent(e.item)})}))));_onAfterRemovePopupContentHandle=new _((()=>this._featureSettings._popupContent.on("after-remove",(e=>{this.emit("after-remove",{...e,item:this._forContent(e.item)})}))));_onAfterChangesPopupContentHandle=new _((()=>this._featureSettings._popupContent.on("after-changes",(e=>{this.emit("after-changes",{...e})}))));constructor(e){super(),this._featureSettings=e,m(this,"length",(()=>c(this._featureSettings,"_popupContent.length",(()=>d(this,"length")),{sync:!0})))}forContent(e){if(C("content",e).isNotMissing(),this._featureSettings._popupContent.includes(e))return this._forContent(e)}add(e,n){if(C("contentX",e).isNotMissing(),this._popupTemplateIsInherited&&(this._featureSettings.popupTemplate=new t({content:this._featureSettings._popupContent.toArray()})),e.featureSettings&&e.featureSettings.popupContentExtensions.remove(e),e._setFeatureSettings(this._featureSettings),e.content){const t=w.get(e.content);if(w.set(e.content,e),t&&t!==e&&this._onRemoved(t),this._featureSettings._popupContent.includes(e.content))if(void 0===n){const n={added:[e],moved:[],removed:t?[t]:[],target:this};this.emit("change",n),this.emit("after-add",{item:e}),this.emit("after-changes",{target:this}),d(this,"length")}else this._featureSettings._popupContent.reorder(e.content,n);else this._featureSettings._popupContent.add(e.content,n)}else{this._uninitializedPopupContentExtensions.add(e);const t={added:[e],moved:[],removed:[],target:this};this.emit("change",t),this.emit("after-add",{item:e}),this.emit("after-changes",{target:this}),d(this,"length")}return this._onAdded(e),this}removeAt(e){const n=this.getItemAt(e);if(void 0!==n){if(this._popupTemplateIsInherited&&(this._featureSettings.popupTemplate=new t({content:this._featureSettings._popupContent.toArray()})),this._uninitializedPopupContentExtensions.has(n)){this._uninitializedPopupContentExtensions.delete(n);const e={added:[],moved:[],removed:[n],target:this};this.emit("change",e),this.emit("after-remove",{item:n}),this.emit("after-changes",{target:this}),d(this,"length")}else this._featureSettings._popupContent.remove(n.content);return this._onRemoved(n),n}}reorder(e,n){if(e&&this._featureSettings._popupContent.includes(e.content))return this._popupTemplateIsInherited&&(this._featureSettings.popupTemplate=new t({content:this._featureSettings._popupContent.toArray()})),this._featureSettings._popupContent.reorder(e.content,n),e}sort(e){return this._popupTemplateIsInherited&&(this._featureSettings.popupTemplate=new t({content:this._featureSettings._popupContent.toArray()})),this._featureSettings._popupContent.sort(((t,n)=>e(this._forContent(t),this._forContent(n)))),this}on(e,t){const n=[];return"change"===e?n.push(this._onChangePopupContentHandle.add()):"before-add"===e?n.push(this._onBeforeAddPopupContentHandle.add()):"before-remove"===e?n.push(this._onBeforeRemovePopupContentHandle.add()):"before-changes"===e?n.push(this._onBeforeChangesPopupContentHandle.add()):"after-add"===e?n.push(this._onAfterAddPopupContentHandle.add()):"after-remove"===e?n.push(this._onAfterRemovePopupContentHandle.add()):"after-changes"===e&&n.push(this._onAfterChangesPopupContentHandle.add()),n.push(super.on(e,t)),f(n)}_itemIsInitialized(e){return super._itemIsInitialized(e)&&!!e.content}_onAdded(e){}_onRemoved(e){e.featureSettings===this._featureSettings&&e._setFeatureSettings(void 0)}_forContent(e){if(this._uninitializedPopupContentExtensions.size)for(const e of this._uninitializedPopupContentExtensions)e._resolveContent(),e.content&&(w.set(e.content,e),this._uninitializedPopupContentExtensions.delete(e));if(!w.has(e)){const t=new z({content:e});w.set(e,t),t._setFeatureSettings(this._featureSettings),this._onAdded(t)}return w.get(e)}}
|
package/data/Schema.d.ts
CHANGED
|
@@ -9,8 +9,8 @@ import { type GeometryJsonType } from "../json/GeometryJson.js";
|
|
|
9
9
|
import type { TypeJson } from "../json/TypeJson.js";
|
|
10
10
|
import type { InitializableCollection } from "../support/InitializableCollectionProxy.js";
|
|
11
11
|
import type { PropertyDefs, SerializeMode } from "../support/Serializable.js";
|
|
12
|
-
import { Settings } from "../support/Settings.js";
|
|
13
|
-
import type { GeometryType } from "../support/esri.js";
|
|
12
|
+
import { Settings, type SettingsEvents } from "../support/Settings.js";
|
|
13
|
+
import type { CollectionAfterAddEventHandler, CollectionAfterRemoveEventHandler, CollectionBeforeAddEventHandler, CollectionBeforeRemoveEventHandler, CollectionChangeEventHandler, GeometryType } from "../support/esri.js";
|
|
14
14
|
import { fieldWithArcadeXRegex, fieldWithRelationshipRegex } from "../utilities/field.js";
|
|
15
15
|
import type { FieldExtensionProperties } from "./FieldExtension.js";
|
|
16
16
|
import { FieldExtension } from "./FieldExtension.js";
|
|
@@ -77,10 +77,40 @@ export interface SchemaProperties {
|
|
|
77
77
|
*/
|
|
78
78
|
types?: (TypeJson | FeatureType)[];
|
|
79
79
|
}
|
|
80
|
+
/**
|
|
81
|
+
* Events emitted by the {@link data/Schema!Schema} class.
|
|
82
|
+
*/
|
|
83
|
+
export interface SchemaEvents extends SettingsEvents<SchemaProperties> {
|
|
84
|
+
/**
|
|
85
|
+
* Emitted after a field extension is added to the collection.
|
|
86
|
+
*/
|
|
87
|
+
"after-add": CollectionAfterAddEventHandler<FieldExtension>;
|
|
88
|
+
/**
|
|
89
|
+
* Emitted after a field extension is removed from the collection.
|
|
90
|
+
*/
|
|
91
|
+
"after-remove": CollectionAfterRemoveEventHandler<FieldExtension>;
|
|
92
|
+
/**
|
|
93
|
+
* Emitted before a field extension is added to the collection.
|
|
94
|
+
*/
|
|
95
|
+
"before-add": CollectionBeforeAddEventHandler<FieldExtension>;
|
|
96
|
+
/**
|
|
97
|
+
* Emitted before a field extension is removed from the collection.
|
|
98
|
+
*/
|
|
99
|
+
"before-remove": CollectionBeforeRemoveEventHandler<FieldExtension>;
|
|
100
|
+
/**
|
|
101
|
+
* Emitted when a field extension in the collection changes.
|
|
102
|
+
*/
|
|
103
|
+
change: CollectionChangeEventHandler<FieldExtension>;
|
|
104
|
+
}
|
|
80
105
|
/**
|
|
81
106
|
* Metadata about features, such as fields, domains, geometry type, etc.
|
|
82
107
|
*/
|
|
83
108
|
export declare class Schema extends Settings<SchemaProperties> {
|
|
109
|
+
/**
|
|
110
|
+
* @deprecated Do not directly reference this property. Use EventNames and
|
|
111
|
+
* EventTypes helpers from @arcgis/core/Evented.
|
|
112
|
+
*/
|
|
113
|
+
"@eventTypes": SchemaEvents;
|
|
84
114
|
/**
|
|
85
115
|
* The field extensions associated with each field of the schema.
|
|
86
116
|
*/
|
package/data/Schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e;import{__decorate as i}from"tslib";import t from"@arcgis/core/PopupTemplate";import s from"@arcgis/core/core/Collection";import o from"@arcgis/core/layers/support/FeatureType";import l from"@arcgis/core/layers/support/Field";import n from"@arcgis/core/popup/FieldInfo";import{InvalidOperationError as r}from"../InvalidOperationError.js";import{isFieldExtension as d}from"../ItemType.js";import{jsonToGeometryType as a}from"../json/GeometryJson.js";import{InitializableCollectionProxy as h}from"../support/InitializableCollectionProxy.js";import{filterJSONProperties as m,isDefault as f,serializable as p,shouldExcludeDefaults as c}from"../support/Serializable.js";import{Settings as _}from"../support/Settings.js";import{createIHandle as u,notifyChange as g,onWatch as F,watch as y}from"../support/observableUtils.js";import{CaseInsensitiveObservableMap as x}from"../utilities/CaseInsensitiveObservableMap.js";import{CollectionProxy as v}from"../utilities/CollectionProxy.js";import{ReadOnlyCollection as b}from"../utilities/ReadOnlyCollection.js";import S from"../utilities/_ReferenceCountedHandle.js";import{checkArg as T}from"../utilities/checkArg.js";import{compare as I}from"../utilities/collection.js";import{isFeatureType as w,isField as z}from"../utilities/esri.js";import{fieldWithArcadeXRegex as N,fieldWithRelationshipRegex as E,getArcadeExpressionFromField as A}from"../utilities/field.js";import{isValidTimeZone as j,ERR_TIME_ZONE_INVALID as C}from"../utilities/format/date.js";import{objectKeys as M}from"../utilities/object.js";import{caseInsensitiveEquals as R}from"../utilities/string.js";import{_fieldExtensionMap as H,FieldExtension as O}from"./FieldExtension.js";const B=new Map;B.set("objectid","oid"),B.set("oid","oid"),B.set("fid","oid"),B.set("shape","geometry"),B.set("shape__length","double"),B.set("shape_length","double"),B.set("shape__area","double"),B.set("shape_area","double"),B.set("area","double"),B.set("perimeter","double"),B.set("length","double"),B.set("fnode_","double"),B.set("tnode_","double"),B.set("lpoly_","double"),B.set("rpoly_","double"),B.set("cover_","integer"),B.set("cover_id","integer"),B.set("idtic","integer"),B.set("xtic","double"),B.set("ytic","double"),B.set("xmin","double"),B.set("ymin","double"),B.set("xmax","double"),B.set("ymax","double"),B.set("arc_","double"),B.set("subclass_","integer"),B.set("subclass_id","integer"),B.set("routelink","integer"),B.set("arclink","integer"),B.set("f_meas","double"),B.set("t_meas","double"),B.set("f_pos","double"),B.set("t_pos","double"),B.set("f_meas","double"),B.set("globalid","global-id"),B.set("guid","guid");export{N as fieldWithArcadeXRegex,E as fieldWithRelationshipRegex};const P=new WeakMap;let Z=e=class extends _{fieldExtensions;fields;get spatialReference(){return this._getSetting("spatialReference")}set spatialReference(e){this._setSetting("spatialReference",e)}get primaryKeyField(){const e=this._getSetting("primaryKeyField");if(!e){const e=this.fields.filter((e=>"oid"===e.type));if(1===e.length)return e.getItemAt(0).name}return e}set primaryKeyField(e){this._setSetting("primaryKeyField",e)}get displayField(){return this._getSetting("displayField",this.primaryKeyField)}set displayField(e){!this._featureSettings?.popupTemplate||this._featureSettings.popupTemplate.title&&this._featureSettings.popupTemplate.title!==`{${this.displayField}}`||(this._featureSettings.popupTemplate.title=`{${e}}`),this._setSetting("displayField",e)}get geometryType(){return this._getSetting("geometryType")}set geometryType(e){this._setSetting("geometryType",e)}get hasGeometry(){return void 0!==this.geometryType&&null!==this.geometryType}get timeZone(){return this._getSetting("timeZone","UTC")}set timeZone(e){T("timeZone",e).satisfies((e=>j(e)),C(e)),this._setSetting("timeZone",e)}get typeIdField(){return this._getSetting("typeIdField")}set typeIdField(e){this._setSetting("typeIdField",e)}get types(){return this._getCollectionSetting("types")}get _fields(){return this._getCollectionSetting("_fields")}_featureSettings;_alwaysSerializeFieldExtensions;constructor(e){super(e),this.fieldExtensions=new K(this),this.fields=new J(this)}static createFieldInfoFromField(e){let i=!0;const t=e.name.toLowerCase();return("oid"===e.type||"geometry"===e.type||B.has(t)&&B.get(t)===e.type)&&(i=!1),new n({visible:i,fieldName:e.name,format:void 0,label:e.alias,stringFieldOption:void 0,tooltip:void 0,isEditable:e.editable})}findFieldByName(e){return this.fields.findFieldByName(e)}toJSON(e="all"){const i=m(this._getSerializableProperties(),this,e)||{};let t=i.fieldExtensions;this.parent&&(t=t?.filter((e=>{const i=this.parent;return!i?.fieldExtensions?.some((i=>i.id===e.id))})));const{fields:s}=i;if(i)for(const e of M(i))this.isModified(e)||delete i[e];if(s&&(i.fields=s),t?.length&&(i.fieldExtensions=t),!c(e)||!f(i))return i}createPopupTemplate(){const e=this.createAllFieldInfos();return new t({fieldInfos:e,content:[{type:"fields"},{type:"attachments"}]})}createAllFieldInfos(){return this.fields.toArray().filter((e=>!!e.name)).map((i=>e.createFieldInfoFromField(i)))}_getSerializableProperties(){return{geometryType:{serialize:!1,deserialize:e=>{this.geometryType=e?a(e):void 0}},spatialReference:{serialize:!1},primaryKeyField:{serialize:!1},displayField:{serialize:!1},typeIdField:{serialize:!1},fields:{serializeModes:["initial","project"],serialize:()=>this.isModified("_fields")?this.fields.toArray().map((e=>e.toJSON())):void 0,deserialize:e=>{if(!e)return;const i=e.map((e=>z(e)?e:l.fromJSON(e)));I(this.fields,i,{onNew:(e,i)=>{this.fields.add(e,i)},onMatch:(e,i,t,s)=>{e!==i&&(e.alias=i.alias,e.editable=i.editable,e.length=i.length,e.nullable=i.nullable,e.type=i.type),t!==s&&this.fields.reorder(e,s)},onMissing:e=>{this.fields.remove(e)},equals:(e,i)=>R(e.name,i.name)})}},fieldExtensions:{serializeModes:["initial"],serialize:e=>this.fieldExtensions.toArray().map((i=>i.toJSON(e))).filter((e=>this._alwaysSerializeFieldExtensions||!(e&&2===Object.keys(e).length&&e.id&&e.field))),deserialize:e=>{e&&I(this.fieldExtensions,e,{onNew:(e,i)=>{this.fieldExtensions.add(d(e)?e:new O(e),i)},onMatch:(e,i,t,s)=>{d(i)||e.assignProperties(i),t!==s&&this.fieldExtensions.reorder(e,s)},onMissing:e=>{this._alwaysSerializeFieldExtensions&&this.fieldExtensions.remove(e)},equals:(e,i)=>d(i)?i===e:!(!i?.field||!O.matchesRef(e,i.field))||e.id===i.id})}},types:{serialize:!1,deserialize:e=>{if(!e)return;const i=e.map((e=>w(e)||!e?e:o.fromJSON(e)));I(this.types,i,{onNew:(e,i)=>{this.types.add(e,i)},onMatch:(e,i,t,s)=>{e!==i&&(e.name=i.name,e.templates=i.templates?[...i.templates]:[],e.domains=i.domains),t!==s&&this.types.reorder(e,s)},onMissing:e=>{this.types.remove(e)},equals:(e,i)=>e.id===i.id})}},timeZone:{serialize:!1,deserialize:e=>{e&&(this.timeZone=e)}}}}};Z=e=i([p],Z);export{Z as Schema};class J extends v{_schema;_fieldNameToField=new x;_expressionFields=new s;_expressionFieldsReadOnly=new b(this._expressionFields);get _expressionFieldsLength(){return this.expressionFields.length}get expressionFields(){return this._expressionFieldsReadOnly}get _popupTemplate(){return this._schema._featureSettings?this._schema._featureSettings.popupTemplate:void 0}constructor(e){super(new s),this._schema=e,F(this,"length",(()=>y(this._schema,"_fields.length",(()=>g(this,"length")),{sync:!0})));const i=[];y(this._schema,"_fields",(e=>{for(const e of i)e.remove();if(null!=e){i.push(e.on("after-add",(i=>{this._collection.add(i.item,e.indexOf(i.item)),this._fieldNameToField.set(i.item.name,i.item)})),e.on("after-remove",(e=>{this._collection.remove(e.item),this._fieldNameToField.delete(e.item.name)})));for(const i of this._collection)e.includes(i)||(this._collection.remove(i),this._fieldNameToField.delete(i.name));for(const i of e)this._collection.includes(i)||(this._collection.add(i),this._fieldNameToField.set(i.name,i))}else for(const e of this._collection.filter((e=>!this._expressionFields.includes(e))))this._collection.remove(e),this._fieldNameToField.delete(e.name)}),{sync:!0,initial:!0}),this._generateExpressionFields(),y(this._schema,"_featureSettings.popupTemplate.fieldInfos",(()=>{this._generateExpressionFields()}),{sync:!0}),y(this._schema,"_featureSettings.popupTemplate.expressionInfos",(()=>{this._generateExpressionFields()}),{sync:!0})}clone(){return new J(this._schema)}add(e,i){T("field",e).isNotMissing();const t=A(e.name);if(t){if(!this._popupTemplate)throw new r("Cannot create a field that references an arcade expression without a feature source and popup template.");const i=this._popupTemplate.expressionInfos.find((e=>R(e.name,t)));if(!i)throw new r("Cannot create a field that references a non-existent arcade expression.");this._popupTemplate.fieldInfos||(this._popupTemplate.fieldInfos=[]);let s=this._popupTemplate.fieldInfos.find((i=>R(i.fieldName,e.name)));s||(s=new n({fieldName:e.name,label:i.title}),this._popupTemplate.fieldInfos.push(s));const o=P.get(s);P.set(s,e),null!=this._expressionFields&&(this._expressionFields.remove(o),this._expressionFields.includes(e)||(this._expressionFields.add(e),this._collection.add(e),this._fieldNameToField.set(e.name,e))),g(this,"_expressionFieldsLength")}else this._schema._fields.add(e,i);return this}removeAt(e){T("index",e).isNotMissing();const i=this.getItemAt(e);if(!i)return;if(A(i.name)){const e=this._popupTemplate.fieldInfos.findIndex((e=>R(e.fieldName,i.name)));this._popupTemplate.fieldInfos.splice(e,1),this._expressionFields.remove(i),this._collection.remove(i),this._fieldNameToField.delete(i.name),g(this,"_expressionFieldsLength")}else this._schema._fields.remove(i);return i}reorder(e,i){if(e&&this._schema._fields.includes(e))return this._schema._fields.reorder(e,i),this._collection.reorder(e,i),e}sort(e){return this._schema._fields.sort(e),this._collection.sort(((i,t)=>this._expressionFields.includes(i)&&this._expressionFields.includes(t)?0:this._expressionFields.includes(i)?1:this._expressionFields.includes(t)?-1:e(i,t))),this}findFieldByName(e){return this._fieldNameToField.get(e)}_generateExpressionFields(){if(!this._popupTemplate?.fieldInfos||!this._popupTemplate?.expressionInfos){for(const e of this._expressionFields)this._collection.remove(e),this._fieldNameToField.delete(e.name);return void this._expressionFields.removeAll()}const e=this._expressionFields.slice();for(const i of this._popupTemplate.fieldInfos){const t=A(i.fieldName);if(null==t)continue;const s=this._popupTemplate.expressionInfos.find((e=>R(e.name,t)));if(null==s)continue;let o=P.get(i);null==o&&(o=new l({name:i.fieldName,alias:i.label||s.title||i.fieldName,type:"number"===s.returnType?"double":"string",editable:!1})),this._expressionFields.includes(o)?e.remove(o):(P.set(i,o),this._expressionFields.add(o),this._collection.add(o),this._fieldNameToField.set(o.name,o),e.remove(o))}for(const i of e)this._expressionFields.remove(i),this._collection.remove(i),this._fieldNameToField.delete(i.name)}}class K extends h{get _collection(){return this._schema.fields.map((e=>this._forField(e))).concat(Array.from(this._uninitializedFieldExtensions))}_schema;_uninitializedFieldExtensions=new Set;_onChangeSchemaFieldsHandle=new S((()=>this._schema.fields.on("change",(e=>{const i={added:(e.added||[]).map((e=>this._forField(e))),moved:(e.moved||[]).map((e=>this._forField(e))),removed:(e.removed||[]).map((e=>this._forField(e))),target:this};this.emit("change",i)}))));_onBeforeAddSchemaFieldsHandle=new S((()=>this._schema.fields.on("before-add",(e=>{this.emit("before-add",{...e,item:this._forField(e.item),target:this})}))));_onBeforeRemoveSchemaFieldsHandle=new S((()=>this._schema.fields.on("before-remove",(e=>{this.emit("before-remove",{...e,item:this._forField(e.item),target:this})}))));_onBeforeChangesSchemaFieldsHandle=new S((()=>this._schema.fields.on("before-changes",(e=>{this.emit("before-changes",{...e,target:this})}))));_onAfterAddSchemaFieldsHandle=new S((()=>this._schema.fields.on("after-add",(e=>{this.emit("after-add",{...e,item:this._forField(e.item),target:this})}))));_onAfterRemoveSchemaFieldsHandle=new S((()=>this._schema.fields.on("after-remove",(e=>{this.emit("after-remove",{...e,item:this._forField(e.item),target:this})}))));_onAfterChangesSchemaFieldsHandle=new S((()=>this._schema.fields.on("after-changes",(e=>{this.emit("after-changes",{...e,target:this})}))));constructor(e){super(),this._schema=e,F(this,"length",(()=>y(this._schema.fields,"length",(()=>g(this,"length")),{sync:!0})))}forField(e){if(T("field",e).isNotMissing(),this._schema.fields.includes(e))return this._forField(e)}add(e,i){if(T("fieldX",e).isNotMissing(),e.schema&&e.schema.fieldExtensions.remove(e),e._setSchema(this._schema),e.field){const t=H.get(e.field);if(H.set(e.field,e),t&&t!==e&&this._onRemoved(t),this._schema.fields.includes(e.field))if(void 0===i){const i={added:[e],moved:[],removed:t?[t]:[],target:this};this.emit("change",i),this.emit("after-add",{item:e,target:this}),this.emit("after-changes",{target:this})}else this._schema.fields.reorder(e.field,i);else this._schema.fields.add(e.field,i)}else{this._uninitializedFieldExtensions.add(e);const i={added:[e],moved:[],removed:[],target:this};this.emit("change",i),this.emit("after-add",{item:e,target:this}),this.emit("after-changes",{target:this})}return this._onAdded(e),this}removeAt(e){const i=this.getItemAt(e);if(void 0!==i){if(this._uninitializedFieldExtensions.has(i)){this._uninitializedFieldExtensions.delete(i);const e={added:[],moved:[],removed:[i],target:this};this.emit("change",e),this.emit("after-remove",{item:i,target:this}),this.emit("after-changes",{target:this})}else this._schema.fields.remove(i.field);return this._onRemoved(i),i}}reorder(e,i){if(e&&this._schema.fields.includes(e.field))return this._schema.fields.reorder(e.field,i),e}sort(e){return this._schema.fields.sort(((i,t)=>e(this._forField(i),this._forField(t)))),this}on(e,i){const t=[];return"change"===e?t.push(this._onChangeSchemaFieldsHandle.add()):"before-add"===e?t.push(this._onBeforeAddSchemaFieldsHandle.add()):"before-remove"===e?t.push(this._onBeforeRemoveSchemaFieldsHandle.add()):"before-changes"===e?t.push(this._onBeforeChangesSchemaFieldsHandle.add()):"after-add"===e?t.push(this._onAfterAddSchemaFieldsHandle.add()):"after-remove"===e?t.push(this._onAfterRemoveSchemaFieldsHandle.add()):"after-changes"===e&&t.push(this._onAfterChangesSchemaFieldsHandle.add()),t.push(super.on(e,i)),u(t)}_itemIsInitialized(e){return super._itemIsInitialized(e)&&!!e.field}_onAdded(e){}_onRemoved(e){e.schema===this._schema&&e._setSchema(void 0)}_forField(e){if(this._uninitializedFieldExtensions.size)for(const e of this._uninitializedFieldExtensions)e._resolveField(),e.field&&(H.set(e.field,e),this._uninitializedFieldExtensions.delete(e));if(!H.has(e)){const i=new O({field:e});H.set(e,i),i._setSchema(this._schema),this._onAdded(i),i.initialize()}return H.get(e)}}
|
|
1
|
+
var e;import{__decorate as i}from"tslib";import t from"@arcgis/core/PopupTemplate";import s from"@arcgis/core/core/Collection";import o from"@arcgis/core/layers/support/FeatureType";import l from"@arcgis/core/layers/support/Field";import n from"@arcgis/core/popup/FieldInfo";import{InvalidOperationError as d}from"../InvalidOperationError.js";import{isFieldExtension as r}from"../ItemType.js";import{jsonToGeometryType as a}from"../json/GeometryJson.js";import{InitializableCollectionProxy as h}from"../support/InitializableCollectionProxy.js";import{filterJSONProperties as m,isDefault as f,serializable as p,shouldExcludeDefaults as c}from"../support/Serializable.js";import{Settings as _}from"../support/Settings.js";import{createIHandle as u,notifyChange as g,onWatch as F,watch as y}from"../support/observableUtils.js";import{CaseInsensitiveObservableMap as x}from"../utilities/CaseInsensitiveObservableMap.js";import{CollectionProxy as v}from"../utilities/CollectionProxy.js";import{ReadOnlyCollection as b}from"../utilities/ReadOnlyCollection.js";import S from"../utilities/_ReferenceCountedHandle.js";import{checkArg as T}from"../utilities/checkArg.js";import{compare as I}from"../utilities/collection.js";import{isFeatureType as w,isField as z}from"../utilities/esri.js";import{fieldWithArcadeXRegex as N,fieldWithRelationshipRegex as E,getArcadeExpressionFromField as A}from"../utilities/field.js";import{isValidTimeZone as j,ERR_TIME_ZONE_INVALID as C}from"../utilities/format/date.js";import{objectKeys as M}from"../utilities/object.js";import{caseInsensitiveEquals as R}from"../utilities/string.js";import{_fieldExtensionMap as H,FieldExtension as O}from"./FieldExtension.js";const B=new Map;B.set("objectid","oid"),B.set("oid","oid"),B.set("fid","oid"),B.set("shape","geometry"),B.set("shape__length","double"),B.set("shape_length","double"),B.set("shape__area","double"),B.set("shape_area","double"),B.set("area","double"),B.set("perimeter","double"),B.set("length","double"),B.set("fnode_","double"),B.set("tnode_","double"),B.set("lpoly_","double"),B.set("rpoly_","double"),B.set("cover_","integer"),B.set("cover_id","integer"),B.set("idtic","integer"),B.set("xtic","double"),B.set("ytic","double"),B.set("xmin","double"),B.set("ymin","double"),B.set("xmax","double"),B.set("ymax","double"),B.set("arc_","double"),B.set("subclass_","integer"),B.set("subclass_id","integer"),B.set("routelink","integer"),B.set("arclink","integer"),B.set("f_meas","double"),B.set("t_meas","double"),B.set("f_pos","double"),B.set("t_pos","double"),B.set("f_meas","double"),B.set("globalid","global-id"),B.set("guid","guid");export{N as fieldWithArcadeXRegex,E as fieldWithRelationshipRegex};const P=new WeakMap;let Z=e=class extends _{fieldExtensions;fields;get spatialReference(){return this._getSetting("spatialReference")}set spatialReference(e){this._setSetting("spatialReference",e)}get primaryKeyField(){const e=this._getSetting("primaryKeyField");if(!e){const e=this.fields.filter((e=>"oid"===e.type));if(1===e.length)return e.getItemAt(0).name}return e}set primaryKeyField(e){this._setSetting("primaryKeyField",e)}get displayField(){return this._getSetting("displayField",this.primaryKeyField)}set displayField(e){!this._featureSettings?.popupTemplate||this._featureSettings.popupTemplate.title&&this._featureSettings.popupTemplate.title!==`{${this.displayField}}`||(this._featureSettings.popupTemplate.title=`{${e}}`),this._setSetting("displayField",e)}get geometryType(){return this._getSetting("geometryType")}set geometryType(e){this._setSetting("geometryType",e)}get hasGeometry(){return void 0!==this.geometryType&&null!==this.geometryType}get timeZone(){return this._getSetting("timeZone","UTC")}set timeZone(e){T("timeZone",e).satisfies((e=>j(e)),C(e)),this._setSetting("timeZone",e)}get typeIdField(){return this._getSetting("typeIdField")}set typeIdField(e){this._setSetting("typeIdField",e)}get types(){return this._getCollectionSetting("types")}get _fields(){return this._getCollectionSetting("_fields")}_featureSettings;_alwaysSerializeFieldExtensions;constructor(e){super(e),this.fieldExtensions=new K(this),this.fields=new J(this)}static createFieldInfoFromField(e){let i=!0;const t=e.name.toLowerCase();return("oid"===e.type||"geometry"===e.type||B.has(t)&&B.get(t)===e.type)&&(i=!1),new n({visible:i,fieldName:e.name,format:void 0,label:e.alias,stringFieldOption:void 0,tooltip:void 0,isEditable:e.editable})}findFieldByName(e){return this.fields.findFieldByName(e)}toJSON(e="all"){const i=m(this._getSerializableProperties(),this,e)||{};let t=i.fieldExtensions;this.parent&&(t=t?.filter((e=>{const i=this.parent;return!i?.fieldExtensions?.some((i=>i.id===e.id))})));const{fields:s}=i;if(i)for(const e of M(i))this.isModified(e)||delete i[e];if(s&&(i.fields=s),t?.length&&(i.fieldExtensions=t),!c(e)||!f(i))return i}createPopupTemplate(){const e=this.createAllFieldInfos();return new t({fieldInfos:e,content:[{type:"fields"},{type:"attachments"}]})}createAllFieldInfos(){return this.fields.toArray().filter((e=>!!e.name)).map((i=>e.createFieldInfoFromField(i)))}_getSerializableProperties(){return{geometryType:{serialize:!1,deserialize:e=>{this.geometryType=e?a(e):void 0}},spatialReference:{serialize:!1},primaryKeyField:{serialize:!1},displayField:{serialize:!1},typeIdField:{serialize:!1},fields:{serializeModes:["initial","project"],serialize:()=>this.isModified("_fields")?this.fields.toArray().map((e=>e.toJSON())):void 0,deserialize:e=>{if(!e)return;const i=e.map((e=>z(e)?e:l.fromJSON(e)));I(this.fields,i,{onNew:(e,i)=>{this.fields.add(e,i)},onMatch:(e,i,t,s)=>{e!==i&&(e.alias=i.alias,e.editable=i.editable,e.length=i.length,e.nullable=i.nullable,e.type=i.type),t!==s&&this.fields.reorder(e,s)},onMissing:e=>{this.fields.remove(e)},equals:(e,i)=>R(e.name,i.name)})}},fieldExtensions:{serializeModes:["initial"],serialize:e=>this.fieldExtensions.toArray().map((i=>i.toJSON(e))).filter((e=>this._alwaysSerializeFieldExtensions||!(e&&2===Object.keys(e).length&&e.id&&e.field))),deserialize:e=>{e&&I(this.fieldExtensions,e,{onNew:(e,i)=>{this.fieldExtensions.add(r(e)?e:new O(e),i)},onMatch:(e,i,t,s)=>{r(i)||e.assignProperties(i),t!==s&&this.fieldExtensions.reorder(e,s)},onMissing:e=>{this._alwaysSerializeFieldExtensions&&this.fieldExtensions.remove(e)},equals:(e,i)=>r(i)?i===e:!(!i?.field||!O.matchesRef(e,i.field))||e.id===i.id})}},types:{serialize:!1,deserialize:e=>{if(!e)return;const i=e.map((e=>w(e)||!e?e:o.fromJSON(e)));I(this.types,i,{onNew:(e,i)=>{this.types.add(e,i)},onMatch:(e,i,t,s)=>{e!==i&&(e.name=i.name,e.templates=i.templates?[...i.templates]:[],e.domains=i.domains),t!==s&&this.types.reorder(e,s)},onMissing:e=>{this.types.remove(e)},equals:(e,i)=>e.id===i.id})}},timeZone:{serialize:!1,deserialize:e=>{e&&(this.timeZone=e)}}}}};Z=e=i([p],Z);export{Z as Schema};class J extends v{_schema;_fieldNameToField=new x;_expressionFields=new s;_expressionFieldsReadOnly=new b(this._expressionFields);get _expressionFieldsLength(){return this.expressionFields.length}get expressionFields(){return this._expressionFieldsReadOnly}get _popupTemplate(){return this._schema._featureSettings?this._schema._featureSettings.popupTemplate:void 0}constructor(e){super(new s),this._schema=e,F(this,"length",(()=>y(this._schema,"_fields.length",(()=>g(this,"length")),{sync:!0})));const i=[];y(this._schema,"_fields",(e=>{for(const e of i)e.remove();if(null!=e){i.push(e.on("after-add",(i=>{this._collection.add(i.item,e.indexOf(i.item)),this._fieldNameToField.set(i.item.name,i.item)})),e.on("after-remove",(e=>{this._collection.remove(e.item),this._fieldNameToField.delete(e.item.name)})));for(const i of this._collection)e.includes(i)||(this._collection.remove(i),this._fieldNameToField.delete(i.name));for(const i of e)this._collection.includes(i)||(this._collection.add(i),this._fieldNameToField.set(i.name,i))}else for(const e of this._collection.filter((e=>!this._expressionFields.includes(e))))this._collection.remove(e),this._fieldNameToField.delete(e.name)}),{sync:!0,initial:!0}),this._generateExpressionFields(),y(this._schema,"_featureSettings.popupTemplate.fieldInfos",(()=>{this._generateExpressionFields()}),{sync:!0}),y(this._schema,"_featureSettings.popupTemplate.expressionInfos",(()=>{this._generateExpressionFields()}),{sync:!0})}clone(){return new J(this._schema)}add(e,i){T("field",e).isNotMissing();const t=A(e.name);if(t){if(!this._popupTemplate)throw new d("Cannot create a field that references an arcade expression without a feature source and popup template.");const i=this._popupTemplate.expressionInfos.find((e=>R(e.name,t)));if(!i)throw new d("Cannot create a field that references a non-existent arcade expression.");this._popupTemplate.fieldInfos||(this._popupTemplate.fieldInfos=[]);let s=this._popupTemplate.fieldInfos.find((i=>R(i.fieldName,e.name)));s||(s=new n({fieldName:e.name,label:i.title}),this._popupTemplate.fieldInfos.push(s));const o=P.get(s);P.set(s,e),null!=this._expressionFields&&(this._expressionFields.remove(o),this._expressionFields.includes(e)||(this._expressionFields.add(e),this._collection.add(e),this._fieldNameToField.set(e.name,e))),g(this,"_expressionFieldsLength")}else this._schema._fields.add(e,i);return this}removeAt(e){T("index",e).isNotMissing();const i=this.getItemAt(e);if(!i)return;if(A(i.name)){const e=this._popupTemplate.fieldInfos.findIndex((e=>R(e.fieldName,i.name)));this._popupTemplate.fieldInfos.splice(e,1),this._expressionFields.remove(i),this._collection.remove(i),this._fieldNameToField.delete(i.name),g(this,"_expressionFieldsLength")}else this._schema._fields.remove(i);return i}reorder(e,i){if(e&&this._schema._fields.includes(e))return this._schema._fields.reorder(e,i),this._collection.reorder(e,i),e}sort(e){return this._schema._fields.sort(e),this._collection.sort(((i,t)=>this._expressionFields.includes(i)&&this._expressionFields.includes(t)?0:this._expressionFields.includes(i)?1:this._expressionFields.includes(t)?-1:e(i,t))),this}findFieldByName(e){return this._fieldNameToField.get(e)}_generateExpressionFields(){if(!this._popupTemplate?.fieldInfos||!this._popupTemplate?.expressionInfos){for(const e of this._expressionFields)this._collection.remove(e),this._fieldNameToField.delete(e.name);return void this._expressionFields.removeAll()}const e=this._expressionFields.slice();for(const i of this._popupTemplate.fieldInfos){const t=A(i.fieldName);if(null==t)continue;const s=this._popupTemplate.expressionInfos.find((e=>R(e.name,t)));if(null==s)continue;let o=P.get(i);null==o&&(o=new l({name:i.fieldName,alias:i.label||s.title||i.fieldName,type:"number"===s.returnType?"double":"string",editable:!1})),this._expressionFields.includes(o)?e.remove(o):(P.set(i,o),this._expressionFields.add(o),this._collection.add(o),this._fieldNameToField.set(o.name,o),e.remove(o))}for(const i of e)this._expressionFields.remove(i),this._collection.remove(i),this._fieldNameToField.delete(i.name)}}class K extends h{get _collection(){return this._schema.fields.map((e=>this._forField(e))).concat(Array.from(this._uninitializedFieldExtensions))}_schema;_uninitializedFieldExtensions=new Set;_onChangeSchemaFieldsHandle=new S((()=>this._schema.fields.on("change",(e=>{const i={added:(e.added||[]).map((e=>this._forField(e))),moved:(e.moved||[]).map((e=>this._forField(e))),removed:(e.removed||[]).map((e=>this._forField(e))),target:this};this.emit("change",i)}))));_onBeforeAddSchemaFieldsHandle=new S((()=>this._schema.fields.on("before-add",(e=>{this.emit("before-add",{...e,item:this._forField(e.item)})}))));_onBeforeRemoveSchemaFieldsHandle=new S((()=>this._schema.fields.on("before-remove",(e=>{this.emit("before-remove",{...e,item:this._forField(e.item)})}))));_onBeforeChangesSchemaFieldsHandle=new S((()=>this._schema.fields.on("before-changes",(e=>{this.emit("before-changes",{...e,item:this._forField(e.item)})}))));_onAfterAddSchemaFieldsHandle=new S((()=>this._schema.fields.on("after-add",(e=>{this.emit("after-add",{...e,item:this._forField(e.item)})}))));_onAfterRemoveSchemaFieldsHandle=new S((()=>this._schema.fields.on("after-remove",(e=>{this.emit("after-remove",{...e,item:this._forField(e.item)})}))));_onAfterChangesSchemaFieldsHandle=new S((()=>this._schema.fields.on("after-changes",(e=>{this.emit("after-changes",{...e,target:this})}))));constructor(e){super(),this._schema=e,F(this,"length",(()=>y(this._schema.fields,"length",(()=>g(this,"length")),{sync:!0})))}forField(e){if(T("field",e).isNotMissing(),this._schema.fields.includes(e))return this._forField(e)}add(e,i){if(T("fieldX",e).isNotMissing(),e.schema&&e.schema.fieldExtensions.remove(e),e._setSchema(this._schema),e.field){const t=H.get(e.field);if(H.set(e.field,e),t&&t!==e&&this._onRemoved(t),this._schema.fields.includes(e.field))if(void 0===i){const i={added:[e],moved:[],removed:t?[t]:[],target:this};this.emit("change",i),this.emit("after-add",{item:e}),this.emit("after-changes",{})}else this._schema.fields.reorder(e.field,i);else this._schema.fields.add(e.field,i)}else{this._uninitializedFieldExtensions.add(e);const i={added:[e],moved:[],removed:[],target:this};this.emit("change",i),this.emit("after-add",{item:e}),this.emit("after-changes",{})}return this._onAdded(e),this}removeAt(e){const i=this.getItemAt(e);if(void 0!==i){if(this._uninitializedFieldExtensions.has(i)){this._uninitializedFieldExtensions.delete(i);const e={added:[],moved:[],removed:[i],target:this};this.emit("change",e),this.emit("after-remove",{item:i}),this.emit("after-changes",{})}else this._schema.fields.remove(i.field);return this._onRemoved(i),i}}reorder(e,i){if(e&&this._schema.fields.includes(e.field))return this._schema.fields.reorder(e.field,i),e}sort(e){return this._schema.fields.sort(((i,t)=>e(this._forField(i),this._forField(t)))),this}on(e,i){const t=[];return"change"===e?t.push(this._onChangeSchemaFieldsHandle.add()):"before-add"===e?t.push(this._onBeforeAddSchemaFieldsHandle.add()):"before-remove"===e?t.push(this._onBeforeRemoveSchemaFieldsHandle.add()):"before-changes"===e?t.push(this._onBeforeChangesSchemaFieldsHandle.add()):"after-add"===e?t.push(this._onAfterAddSchemaFieldsHandle.add()):"after-remove"===e?t.push(this._onAfterRemoveSchemaFieldsHandle.add()):"after-changes"===e&&t.push(this._onAfterChangesSchemaFieldsHandle.add()),t.push(super.on(e,i)),u(t)}_itemIsInitialized(e){return super._itemIsInitialized(e)&&!!e.field}_onAdded(e){}_onRemoved(e){e.schema===this._schema&&e._setSchema(void 0)}_forField(e){if(this._uninitializedFieldExtensions.size)for(const e of this._uninitializedFieldExtensions)e._resolveField(),e.field&&(H.set(e.field,e),this._uninitializedFieldExtensions.delete(e));if(!H.has(e)){const i=new O({field:e});H.set(e,i),i._setSchema(this._schema),this._onAdded(i),i.initialize()}return H.get(e)}}
|
package/data/TaskSettings.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PropertyDefs } from "../support/Serializable.js";
|
|
2
|
-
import { Settings } from "../support/Settings.js";
|
|
2
|
+
import { Settings, type SettingsEvents } from "../support/Settings.js";
|
|
3
3
|
/**
|
|
4
4
|
* Properties that can be passed into the constructor for
|
|
5
5
|
* {@link data/TaskSettings!TaskSettings}.
|
|
@@ -47,6 +47,11 @@ export interface TaskSettingsProperties {
|
|
|
47
47
|
* that are performed on a map.
|
|
48
48
|
*/
|
|
49
49
|
export declare class TaskSettings extends Settings<TaskSettingsProperties> {
|
|
50
|
+
/**
|
|
51
|
+
* @deprecated Do not directly reference this property. Use EventNames and
|
|
52
|
+
* EventTypes helpers from @arcgis/core/Evented.
|
|
53
|
+
*/
|
|
54
|
+
"@eventTypes": SettingsEvents<TaskSettings>;
|
|
50
55
|
/**
|
|
51
56
|
* Determines whether the feature source is included when exporting the map.
|
|
52
57
|
* True by default.
|
|
@@ -125,7 +125,7 @@ export declare class TableSchema extends Schema {
|
|
|
125
125
|
/**
|
|
126
126
|
* Maps schema properties to equivalent properties on the table.
|
|
127
127
|
*/
|
|
128
|
-
protected readonly _tableBindings: Map<keyof this, "listMode" | "title" | "url" | "id" | "gdbVersion" | "
|
|
128
|
+
protected readonly _tableBindings: Map<keyof this, "listMode" | "title" | "url" | "id" | "gdbVersion" | "@eventTypes" | "set" | "emit" | "hasEventListener" | "on" | "addHandles" | "destroy" | "hasHandles" | "removeHandles" | "watch" | "clone" | "fields" | "outFields" | "hasM" | "hasZ" | "popupTemplate" | "labelingInfo" | "renderer" | "opacity" | "spatialReference" | "mode" | "elevationInfo" | "visible" | "refreshInterval" | "labelsVisible" | "maxScale" | "popupEnabled" | "floorInfo" | "source" | "sourceJSON" | "objectIdField" | "geometryType" | "types" | "templates" | "orderBy" | "definitionExpression" | "minScale" | "timeInfo" | "featureReduction" | "globalIdField" | "createPopupTemplate" | "createQuery" | "getField" | "getFieldDomain" | "queryExtent" | "queryFeatureCount" | "queryFeatures" | "queryObjectIds" | "getAtOrigin" | "originOf" | "revertAllToOrigin" | "revertToOrigin" | "isFulfilled" | "isRejected" | "isResolved" | "when" | "cancelLoad" | "load" | "fullExtent" | "parent" | "persistenceEnabled" | "visibilityTimeExtent" | "createLayerView" | "fetchAttributionData" | "customParameters" | "blendMode" | "legendEnabled" | "apiKey" | "save" | "saveAs" | "portalItem" | "copyright" | "layerId" | "effect" | "queryAttributeBins" | "refresh" | "timeExtent" | "timeOffset" | "useViewTime" | "dateFieldsTimeZone" | "displayField" | "historicMoment" | "returnM" | "returnZ" | "displayFilterEnabled" | "displayFilterInfo" | "formTemplate" | "attributeTableTemplate" | "screenSizePerspectiveEnabled" | "trackInfo" | "featureEffect" | "typeIdField" | "editingEnabled" | "addAttachment" | "applyEdits" | "deleteAttachments" | "queryAttachments" | "queryRelatedFeatures" | "queryRelatedFeaturesCount" | "updateAttachment" | "queryTopFeatures" | "charts" | "dynamicDataSource" | "fieldConfigurations" | "createFieldConfigurations" | "getFeatureTitle" | "getFeatureType" | "getFieldAlias" | "getFieldConfiguration" | "queryTopFeatureCount" | "queryTopFeaturesExtent" | "queryTopObjectIds">;
|
|
129
129
|
/**
|
|
130
130
|
* The collection of fields.
|
|
131
131
|
*/
|
package/data/convert.d.ts
CHANGED
|
@@ -10,6 +10,10 @@ import type { GeometryType } from "../support/esri.js";
|
|
|
10
10
|
import { DateFormat, NumberFormat, TimeFormat } from "../utilities/format/formats.js";
|
|
11
11
|
import { FeatureSet } from "./FeatureSet.js";
|
|
12
12
|
import type { IDxfJsonComponentContext } from "./support/_dxfInterfaces.js";
|
|
13
|
+
/**
|
|
14
|
+
* A union of simple fill, line, and marker symbols.
|
|
15
|
+
*/
|
|
16
|
+
export type SimpleSymbol = SimpleFillSymbol | SimpleLineSymbol | SimpleMarkerSymbol;
|
|
13
17
|
export declare const FIELD_NAME_REGEX: RegExp;
|
|
14
18
|
/**
|
|
15
19
|
* Data for a cell in a table.
|
|
@@ -392,7 +396,7 @@ export declare function parseKMLCoordinates(coordinates: string): {
|
|
|
392
396
|
* default symbol in case there is no style element.
|
|
393
397
|
* @param index The index used to alternate symbol colors between features.
|
|
394
398
|
*/
|
|
395
|
-
export declare function parseKMLSymbol(style: Element | undefined, geometryType: GeometryType, index: number): PictureMarkerSymbol |
|
|
399
|
+
export declare function parseKMLSymbol(style: Element | undefined, geometryType: GeometryType, index: number): PictureMarkerSymbol | SimpleSymbol;
|
|
396
400
|
/**
|
|
397
401
|
* Converts a {@link data/FeatureSet!FeatureSet } to a zipped shapefile blob.
|
|
398
402
|
*
|
|
@@ -439,5 +443,5 @@ export declare function shapefileToFeatureSet(shapefileData: Blob, options?: Fro
|
|
|
439
443
|
* @param colorIndex The index used to alternate symbol colors.
|
|
440
444
|
* @param geometryType The geometry type used to return the appropriate symbol.
|
|
441
445
|
*/
|
|
442
|
-
export declare function getDefaultSymbol(colorIndex: number, geometryType: GeometryType):
|
|
446
|
+
export declare function getDefaultSymbol(colorIndex: number, geometryType: GeometryType): SimpleSymbol | MeshSymbol3D | undefined;
|
|
443
447
|
export {};
|