@vertigis/arcgis-extensions 39.0.0 → 39.0.1
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 +6 -6
- package/Entity.d.ts +2 -1
- package/Hyperlink.d.ts +2 -1
- package/LanguageResources.d.ts +2 -1
- package/data/ArcGISServiceTableExtension.d.ts +7 -6
- package/data/ArcGISServiceTableExtension.js +1 -1
- package/data/Attachment.d.ts +3 -2
- package/data/Feature.d.ts +10 -7
- package/data/Feature.js +1 -1
- package/data/FeatureList.d.ts +5 -4
- package/data/FeatureSet.d.ts +8 -5
- package/data/FeatureSettings.d.ts +9 -6
- package/data/FeatureSettings.js +1 -1
- package/data/FeatureSource.d.ts +1 -1
- package/data/FeatureSourceBase.d.ts +10 -6
- package/data/FeatureSourceBase.js +1 -1
- package/data/FeatureStream.d.ts +3 -2
- package/data/FieldExtension.d.ts +6 -4
- package/data/FieldExtension.js +1 -1
- package/data/PopupContentExtension.d.ts +5 -4
- package/data/PopupContentExtension.js +1 -1
- package/data/Relationship.d.ts +2 -1
- package/data/Schema.d.ts +7 -6
- package/data/Schema.js +1 -1
- package/data/Table.d.ts +1 -1
- package/data/TableExtension.d.ts +2 -1
- package/data/TaskSettings.d.ts +1 -1
- package/data/_TableExtension.d.ts +5 -4
- package/data/support/attachments.d.ts +1 -1
- package/declarations/arcgis-js-api-extensions/index.d.ts +2 -0
- package/docs/html/assets/search.js +1 -1
- package/docs/html/classes/Entity.EntityBase.html +2 -2
- package/docs/html/classes/Hyperlink.Hyperlink.html +2 -2
- package/docs/html/classes/LanguageResources.LanguageResources.html +2 -2
- package/docs/html/classes/data_ArcGISServiceTableExtension.ArcGISServiceTableExtension.html +2 -2
- package/docs/html/classes/data_Attachment.Attachment.html +2 -2
- package/docs/html/classes/data_FeatureList.FeatureList.html +2 -2
- package/docs/html/classes/data_FeatureSet.FeatureSet.html +2 -2
- package/docs/html/classes/data_FeatureSourceBase.FeatureSourceBase.html +2 -2
- package/docs/html/classes/data_FeatureSourceBase.RelationshipCollection.html +2 -2
- package/docs/html/classes/data_FeatureStream.FeatureStream.html +3 -3
- package/docs/html/classes/data_FieldExtension.FieldExtension.html +2 -2
- package/docs/html/classes/data_PopupContentExtension.PopupContentExtension.html +2 -2
- package/docs/html/classes/data_RelationshipBase.RelationshipBase.html +2 -2
- package/docs/html/classes/data__TableExtension.TableExtension.html +2 -2
- package/docs/html/classes/layer_preset_LayerPreset.LayerPreset.html +2 -2
- package/docs/html/classes/layer_preset_LayerPresetSettings.LayerPresetSetting.html +2 -2
- package/docs/html/classes/mapping_ArcGISSublayerExtension.ArcGISSublayerExtension.html +2 -2
- package/docs/html/classes/mapping_ArcGISSublayerExtension.ArcGISSublayerRelationshipCollection.html +2 -2
- package/docs/html/classes/mapping_BasemapExtension.BasemapExtension.html +2 -2
- package/docs/html/classes/mapping_Bookmark.Bookmark.html +2 -2
- package/docs/html/classes/mapping_BuildingComponentSublayerExtension.BuildingComponentSublayerExtension.html +2 -2
- package/docs/html/classes/mapping_BuildingGroupSublayerExtension.BuildingGroupSublayerExtension.html +2 -2
- package/docs/html/classes/mapping_BuildingSceneLayerExtension.BuildingSceneLayerExtension.html +2 -2
- package/docs/html/classes/mapping_BuildingSublayerExtension.BuildingSublayerExtension.html +2 -2
- package/docs/html/classes/mapping_CSVLayerExtension.CSVLayerExtension.html +2 -2
- package/docs/html/classes/mapping_ElevationLayerExtension.ElevationLayerExtension.html +2 -2
- package/docs/html/classes/mapping_FeatureCollectionLayerExtension.FeatureCollectionLayerExtension.html +2 -2
- package/docs/html/classes/mapping_FeatureLayerExtension.FeatureLayerExtension.html +2 -2
- package/docs/html/classes/mapping_FeatureLayerExtensionBase.FeatureLayerExtensionBase.html +2 -2
- package/docs/html/classes/mapping_GeoJSONLayerExtension.GeoJSONLayerExtension.html +2 -2
- package/docs/html/classes/mapping_GeoRSSLayerExtension.GeoRSSLayerExtension.html +2 -2
- package/docs/html/classes/mapping_GraphicsLayerExtension.GraphicsLayerExtension.html +2 -2
- package/docs/html/classes/mapping_GroundExtension.GroundExtension.html +2 -2
- package/docs/html/classes/mapping_GroupLayerExtension.GroupLayerExtension.html +2 -2
- package/docs/html/classes/mapping_GroupLayerExtension.GroupLayerExtensionCollection.html +2 -2
- package/docs/html/classes/mapping_ImageryLayerExtension.ImageryLayerExtension.html +2 -2
- package/docs/html/classes/mapping_ImageryTileLayerExtension.ImageryTileLayerExtension.html +2 -2
- package/docs/html/classes/mapping_IntegratedMeshLayerExtension.IntegratedMeshLayerExtension.html +2 -2
- package/docs/html/classes/mapping_KMLLayerExtension.KMLLayerExtension.html +2 -2
- package/docs/html/classes/mapping_KMLSublayerExtension.KMLSublayerExtension.html +2 -2
- package/docs/html/classes/mapping_MapExtension.MapExtension.html +2 -2
- package/docs/html/classes/mapping_MapImageLayerExtension.MapImageLayerExtension.html +2 -2
- package/docs/html/classes/mapping_MapImageSublayerExtension.MapImageSublayerExtension.html +2 -2
- package/docs/html/classes/mapping_OpenStreetMapLayerExtension.OpenStreetMapLayerExtension.html +2 -2
- package/docs/html/classes/mapping_PointCloudLayerExtension.PointCloudLayerExtension.html +2 -2
- package/docs/html/classes/mapping_SceneLayerExtension.SceneLayerExtension.html +2 -2
- package/docs/html/classes/mapping_StreamLayerExtension.StreamLayerExtension.html +2 -2
- package/docs/html/classes/mapping_SubtypeGroupLayerExtension.SubtypeGroupLayerExtension.html +2 -2
- package/docs/html/classes/mapping_SubtypeGroupLayerExtension.SubtypeGroupLayerRelationshipCollection.html +2 -2
- package/docs/html/classes/mapping_SubtypeSublayerExtension.SubtypeSublayerExtension.html +2 -2
- package/docs/html/classes/mapping_SubtypeSublayerExtension.SubtypeSublayerRelationshipCollection.html +2 -2
- package/docs/html/classes/mapping_TileLayerExtension.TileLayerExtension.html +2 -2
- package/docs/html/classes/mapping_TileSublayerExtension.TileSublayerExtension.html +2 -2
- package/docs/html/classes/mapping_UnsupportedLayerExtension.UnsupportedLayerExtension.html +2 -2
- package/docs/html/classes/mapping_VectorTileLayerExtension.VectorTileLayerExtension.html +2 -2
- package/docs/html/classes/mapping_WMSLayerExtension.WMSLayerExtension.html +2 -2
- package/docs/html/classes/mapping_WMSSublayerExtension.WMSSublayerExtension.html +2 -2
- package/docs/html/classes/mapping_WMTSLayerExtension.WMTSLayerExtension.html +2 -2
- package/docs/html/classes/mapping_WMTSSublayerExtension.WMTSSublayerExtension.html +2 -2
- package/docs/html/classes/mapping_WebTileLayerExtension.WebTileLayerExtension.html +2 -2
- package/docs/html/classes/mapping__LayerExtension.LayerExtension.html +2 -2
- package/docs/html/classes/mapping__SublayerExtension.SubSublayerExtensionCollection.html +2 -2
- package/docs/html/classes/mapping__SublayerExtension.SublayerExtension.html +2 -2
- package/docs/html/classes/mapping_support_ArrayWrappedCollection.ArrayWrappedCollection.html +2 -2
- package/docs/html/classes/mapping_support_LayerListSettings.ExtensionBaseLayerListSettings.html +2 -2
- package/docs/html/classes/mapping_support_LayerListSettings.LayerListSettings.html +2 -2
- package/docs/html/classes/mapping_support__LayerExtensionCollection.LayerExtensionCollectionBase.html +2 -2
- package/docs/html/classes/mapping_support__SublayerExtensionCollection.SublayerExtensionCollectionBase.html +2 -2
- package/docs/html/classes/menus_Menu.Menu.html +3 -3
- package/docs/html/classes/menus_MenuItem.MenuItem.html +3 -3
- package/docs/html/classes/support_InitializableBase.InitializableBase.html +2 -2
- package/docs/html/classes/support_InitializableCollectionProxy.InitializableCollectionProxy.html +2 -2
- package/docs/html/classes/support_Observable.Observable.html +2 -2
- package/docs/html/classes/support_ReadOnlyInitializableCollection.ReadOnlyInitializableCollection.html +2 -2
- package/docs/html/classes/support_Serializable.SerializableBase.html +2 -2
- package/docs/html/classes/support__ArcGISRelationshipCollection.ArcGISRelationshipCollection.html +2 -2
- package/docs/html/classes/tasks_geocoding_ArcGISGeocoder.ArcGISGeocoder.html +2 -2
- package/docs/html/classes/tasks_geocoding_Geocoder.Geocoder.html +2 -2
- package/docs/html/classes/tasks_query_ArcGISRelationship.ArcGISRelationship.html +2 -2
- package/docs/html/classes/tasks_query_QueryBasedRelationship.QueryBasedRelationship.html +2 -2
- package/docs/html/classes/utilities_CollectionProxy.CollectionProxy.html +2 -2
- package/docs/html/classes/utilities_CopyOnWriteCollection.CopyOnWriteCollection.html +2 -2
- package/docs/html/classes/utilities_MapTransformCollection.MapTransformCollection.html +2 -2
- package/docs/html/classes/utilities_ObservableMap.ObservableMap.html +2 -2
- package/docs/html/classes/utilities_ObservableSet.ObservableSet.html +2 -2
- package/docs/html/classes/utilities_ObservableWeakSet.ObservableWeakSet.html +2 -2
- package/docs/html/classes/utilities_ReadOnlyCollection.ReadOnlyCollection.html +2 -2
- package/docs/html/classes/utilities_ReadOnlyMap.ReadOnlyMap.html +2 -2
- package/docs/html/classes/utilities_asyncIterable.AsyncQueue.html +1 -1
- package/docs/html/classes/utilities_date.DateFormatter.html +2 -2
- package/docs/html/classes/utilities_number.NumberFormatter.html +2 -2
- package/docs/html/functions/utilities__ogc.getEpsgCode.html +4 -7
- package/docs/html/functions/utilities__ogc.getGmlNS.html +6 -9
- package/docs/html/functions/utilities__ogc.inferGmlVersion.html +6 -9
- package/docs/html/functions/utilities__ogc.isGmlNamespace.html +4 -7
- package/docs/html/functions/utilities__ogc.ogcSrsToEsriSr.html +4 -7
- package/docs/html/functions/utilities_collection.compare.html +1 -0
- package/docs/html/functions/utilities_collection.compareAsync.html +1 -0
- package/docs/html/functions/utilities_field.isNumericFieldType.html +2 -0
- package/docs/html/interfaces/data_Feature.PresentableAttributes.html +2 -2
- package/docs/html/interfaces/data__Relationship.Relationship-1.html +2 -2
- package/docs/html/modules/data_Schema.html +18 -10
- package/docs/html/modules/support_esri.html +5 -1
- package/docs/html/modules/utilities__ogc.html +9 -12
- package/docs/html/modules/utilities_collection.html +5 -0
- package/docs/html/modules/utilities_field.html +7 -0
- package/docs/html/types/support_esri.BuildingComponentSublayerCapabilities.html +3 -1
- package/docs/html/types/support_esri.BuildingComponentSublayerCapabilitiesData.html +3 -1
- package/docs/html/types/support_esri.BuildingSceneSublayerType.html +3 -1
- package/docs/html/types/support_esri.CSVLayerCapabilities.html +3 -1
- package/docs/html/types/support_esri.ChangeEventCallback.html +3 -1
- package/docs/html/types/support_esri.ChartMediaInfo.html +3 -1
- package/docs/html/types/support_esri.DateFormat.html +3 -1
- package/docs/html/types/support_esri.DistanceUnit.html +3 -1
- package/docs/html/types/support_esri.Domain.html +3 -1
- package/docs/html/types/support_esri.DomainType.html +3 -1
- package/docs/html/types/support_esri.DrawingTool.html +3 -1
- package/docs/html/types/support_esri.EditsResult.html +3 -1
- package/docs/html/types/support_esri.ElevationLayerProperties.html +3 -1
- package/docs/html/types/support_esri.ElevationMode.html +3 -1
- package/docs/html/types/support_esri.EsriError.html +3 -1
- package/docs/html/types/support_esri.EsriErrorDetails.html +3 -1
- package/docs/html/types/support_esri.EventCallback.html +3 -1
- package/docs/html/types/support_esri.EventHandler.html +3 -1
- package/docs/html/types/support_esri.FeatureEditResult.html +3 -1
- package/docs/html/types/support_esri.FeatureLayerApplyEdits.html +3 -1
- package/docs/html/types/support_esri.FeatureLayerCapabilities.html +3 -1
- package/docs/html/types/support_esri.FeatureLayerElevationInfo.html +3 -1
- package/docs/html/types/support_esri.FeatureLayerProperties.html +3 -1
- package/docs/html/types/support_esri.FieldProperties.html +3 -1
- package/docs/html/types/support_esri.FieldType.html +3 -1
- package/docs/html/types/support_esri.GeometryType.html +3 -1
- package/docs/html/types/support_esri.GraphicHit.html +3 -1
- package/docs/html/types/support_esri.ImageryLayerProperties.html +3 -1
- package/docs/html/types/support_esri.IntegratedMeshLayerProperties.html +3 -1
- package/docs/html/types/support_esri.ItemCallback.html +3 -1
- package/docs/html/types/support_esri.ItemCompareCallback.html +3 -1
- package/docs/html/types/support_esri.ItemMapCallback.html +3 -1
- package/docs/html/types/support_esri.ItemReduceCallback.html +3 -1
- package/docs/html/types/support_esri.ItemTestCallback.html +3 -1
- package/docs/html/types/support_esri.LabelPlacement.html +3 -1
- package/docs/html/types/support_esri.LayerViewCreateEvent.html +3 -1
- package/docs/html/types/support_esri.LayerViewDestroyEvent.html +3 -1
- package/docs/html/types/support_esri.ListMode.html +3 -1
- package/docs/html/types/support_esri.LoadStatus.html +3 -1
- package/docs/html/types/support_esri.MapImageLayerProperties.html +3 -1
- package/docs/html/types/support_esri.MediaType.html +3 -1
- package/docs/html/types/support_esri.MosaicMethodType.html +3 -1
- package/docs/html/types/support_esri.MosaicOperationType.html +3 -1
- package/docs/html/types/support_esri.NavigationConstraintType.html +3 -1
- package/docs/html/types/support_esri.OpenStreetMapLayerProperties.html +3 -1
- package/docs/html/types/support_esri.OutputPixelType.html +3 -1
- package/docs/html/types/support_esri.PointCloudLayerProperties.html +3 -1
- package/docs/html/types/support_esri.PopupTemplateProperties.html +3 -1
- package/docs/html/types/support_esri.PortalItemProperties.html +3 -1
- package/docs/html/types/support_esri.PortalItemType.html +3 -1
- package/docs/html/types/support_esri.PresentationProperties.html +3 -1
- package/docs/html/types/support_esri.RasterFunctionProperties.html +3 -1
- package/docs/html/types/support_esri.RasterInfo.html +3 -1
- package/docs/html/types/support_esri.RelationshipQueryProperties.html +3 -1
- package/docs/html/types/support_esri.RelationshipRole.html +3 -1
- package/docs/html/types/support_esri.RequestOptions.html +3 -1
- package/docs/html/types/support_esri.SceneLayerProperties.html +3 -1
- package/docs/html/types/support_esri.SceneViewGraphicHit.html +3 -1
- package/docs/html/types/support_esri.SceneViewHitTestResult.html +3 -1
- package/docs/html/types/support_esri.SimpleFillSymbolStyle.html +3 -1
- package/docs/html/types/support_esri.SlideVisibleLayers.html +3 -1
- package/docs/html/types/support_esri.StreamLayerProperties.html +3 -1
- package/docs/html/types/support_esri.SymbolType.html +3 -1
- package/docs/html/types/support_esri.TileLayerProperties.html +3 -1
- package/docs/html/types/support_esri.TimeIntervalUnits.html +3 -1
- package/docs/html/types/support_esri.VectorTileLayerProperties.html +3 -1
- package/docs/html/types/support_esri.VisibilityMode.html +3 -1
- package/docs/html/types/support_esri.WatchCallback.html +3 -1
- package/docs/html/types/support_esri.WebMapProperties.html +3 -1
- package/docs/html/types/support_esri.WebMapTimeSliderObject.html +3 -1
- package/docs/html/types/support_esri.WebMapWidgetsObject.html +3 -1
- package/docs/html/types/support_esri.WebSceneProperties.html +3 -1
- package/docs/html/types/support_esri.WebTileLayerProperties.html +3 -1
- package/docs/html/types/support_esri.locatorAddressToLocationsParams.html +3 -1
- package/docs/html/types/support_esri.locatorAddressesToLocationsParams.html +3 -1
- package/docs/html/types/support_esri.locatorSuggestLocationsParams.html +3 -1
- package/docs/html/{functions/utilities__ogc.isWfsNamespace.html → types/utilities__ogc.GmlVersion.html} +14 -28
- package/docs/html/{functions/utilities__ogc.isFesNamespace.html → types/utilities__ogc.WfsVersion.html} +14 -28
- package/docs/html/variables/support_esri.Collection.html +687 -0
- package/docs/html/variables/support_esri.Evented.html +687 -0
- package/docs/html/variables/support_esri.wellKnownBasemapTitles.html +3 -1
- package/docs/html/variables/utilities__ogc.webMercatorAliases.html +4 -7
- package/docs/html/variables/utilities_collection.Collection.html +602 -0
- package/docs/html/variables/{data_Schema.fieldWithArcadeXRegex.html → utilities_field.fieldWithArcadeXRegex.html} +7 -10
- package/docs/html/variables/{data_Schema.fieldWithRelationshipRegex.html → utilities_field.fieldWithRelationshipRegex.html} +7 -10
- package/docs/html/variables/version.version.html +1 -1
- package/layer-preset/LayerPreset.d.ts +6 -4
- package/layer-preset/LayerPreset.js +1 -1
- package/layer-preset/LayerPresetSettings.d.ts +2 -1
- package/mapping/ArcGISSublayerExtension.d.ts +8 -6
- package/mapping/ArcGISSublayerExtension.js +1 -1
- package/mapping/BasemapExtension.d.ts +8 -6
- package/mapping/BasemapExtension.js +1 -1
- package/mapping/Bookmark.d.ts +3 -2
- package/mapping/BuildingComponentSublayerExtension.d.ts +6 -4
- package/mapping/BuildingGroupSublayerExtension.d.ts +5 -3
- package/mapping/BuildingSceneLayerExtension.d.ts +3 -2
- package/mapping/BuildingSublayerExtension.d.ts +2 -1
- package/mapping/CSVLayerExtension.d.ts +3 -2
- package/mapping/ElevationLayerExtension.d.ts +3 -2
- package/mapping/FeatureCollectionLayerExtension.d.ts +3 -2
- package/mapping/FeatureLayerExtension.d.ts +6 -5
- package/mapping/FeatureLayerExtension.js +1 -1
- package/mapping/FeatureLayerExtensionBase.d.ts +4 -3
- package/mapping/GeoJSONLayerExtension.d.ts +3 -2
- package/mapping/GeoRSSLayerExtension.d.ts +3 -2
- package/mapping/GeoRSSLayerExtension.js +1 -1
- package/mapping/GraphicsLayerExtension.d.ts +4 -3
- package/mapping/GroundExtension.d.ts +8 -6
- package/mapping/GroupLayerExtension.d.ts +5 -4
- package/mapping/GroupLayerExtension.js +1 -1
- package/mapping/ImageryLayerExtension.d.ts +3 -2
- package/mapping/ImageryTileLayerExtension.d.ts +3 -2
- package/mapping/IntegratedMeshLayerExtension.d.ts +3 -2
- package/mapping/KMLLayerExtension.d.ts +5 -3
- package/mapping/KMLSublayerExtension.d.ts +2 -1
- package/mapping/LayerExtension.d.ts +4 -2
- package/mapping/MapConstraints.d.ts +1 -1
- package/mapping/MapExtension.d.ts +27 -16
- package/mapping/MapExtension.js +1 -1
- package/mapping/MapImageLayerExtension.d.ts +5 -3
- package/mapping/MapImageSublayerExtension.d.ts +2 -1
- package/mapping/OpenStreetMapLayerExtension.d.ts +3 -2
- package/mapping/PointCloudLayerExtension.d.ts +3 -2
- package/mapping/SceneLayerExtension.d.ts +3 -2
- package/mapping/StreamLayerExtension.d.ts +3 -2
- package/mapping/SublayerExtension.d.ts +4 -2
- package/mapping/SubtypeGroupLayerExtension.d.ts +8 -6
- package/mapping/SubtypeGroupLayerExtension.js +1 -1
- package/mapping/SubtypeSublayerExtension.d.ts +7 -5
- package/mapping/SubtypeSublayerExtension.js +1 -1
- package/mapping/TileLayerExtension.d.ts +5 -3
- package/mapping/TileSublayerExtension.d.ts +3 -2
- package/mapping/UnsupportedLayerExtension.d.ts +2 -1
- package/mapping/VectorTileLayerExtension.d.ts +3 -2
- package/mapping/WMSLayerExtension.d.ts +5 -3
- package/mapping/WMSSublayerExtension.d.ts +2 -1
- package/mapping/WMTSLayerExtension.d.ts +5 -3
- package/mapping/WMTSSublayerExtension.d.ts +3 -2
- package/mapping/WebTileLayerExtension.d.ts +3 -2
- package/mapping/_LayerExtension.d.ts +11 -9
- package/mapping/_LayerExtension.js +1 -1
- package/mapping/_SublayerExtension.d.ts +9 -6
- package/mapping/convert.d.ts +3 -2
- package/mapping/convert.js +1 -1
- package/mapping/support/DefaultLayerExtensionFactory.js +1 -1
- package/mapping/support/LayerListSettings.d.ts +2 -1
- package/mapping/support/WfsCapabilities.d.ts +1 -1
- package/mapping/support/_LayerExtensionCollection.d.ts +5 -3
- package/mapping/support/_LayerExtensionCollection.js +1 -1
- package/mapping/support/_SublayerExtensionCollection.d.ts +5 -3
- package/mapping/support/_SublayerExtensionCollection.js +1 -1
- package/menus/Menu.d.ts +6 -4
- package/menus/Menu.js +1 -1
- package/menus/MenuItem.d.ts +5 -3
- package/menus/MenuItem.js +1 -1
- package/package.json +10 -11
- package/portal/Feature.d.ts +2 -2
- package/portal/FeatureLayer.js +1 -1
- package/portal/LayerBase.d.ts +2 -1
- package/portal/WebMap.d.ts +1 -1
- package/portal/WebMap.js +1 -1
- package/portal/_LayerBase.d.ts +1 -1
- package/support/FormatSettings.d.ts +1 -1
- package/support/InitializableBase.d.ts +3 -2
- package/support/InitializableCollectionProxy.d.ts +1 -1
- package/support/Observable.d.ts +4 -3
- package/support/Observable.js +1 -1
- package/support/Settings.d.ts +4 -2
- package/support/Settings.js +1 -1
- package/support/_ArcGISRelationshipCollection.d.ts +2 -2
- package/support/_ArcGISRelationshipCollection.js +1 -1
- package/support/_graphicsQuery.js +1 -1
- package/support/esri.d.ts +9 -1
- package/support/esri.js +1 -1
- package/tasks/geocoding/ArcGISGeocoder.d.ts +6 -5
- package/tasks/geocoding/ArcGISGeocoder.js +1 -1
- package/tasks/geocoding/Geocoder.d.ts +4 -2
- package/tasks/geocoding/utilities.js +1 -1
- package/tasks/identify/CSVLayerClientSideQueryIdentifyProvider.d.ts +1 -1
- package/tasks/identify/ClientSideIdentifyProvider.d.ts +1 -1
- package/tasks/identify/GeoJSONLayerClientSideQueryIdentifyProvider.d.ts +1 -1
- package/tasks/identify/HitTestIdentifyProvider.d.ts +1 -1
- package/tasks/identify/IdentifyService.d.ts +1 -1
- package/tasks/identify/IdentifyService.js +1 -1
- package/tasks/identify/SceneLayerClientSideIdentifyProvider.d.ts +2 -1
- package/tasks/identify/StreamLayerClientSideQueryIdentifyProvider.d.ts +2 -1
- package/tasks/identify/SubtypeSublayerClientSideIdentifyProvider.d.ts +2 -1
- package/tasks/identify/WMSSublayerIdentifyProvider.d.ts +1 -1
- package/tasks/identify/WMSSublayerIdentifyProvider.js +1 -1
- package/tasks/query/ArcGISRelationship.d.ts +4 -3
- package/tasks/query/BuildingComponentSublayerClientSideQueryProvider.d.ts +2 -1
- package/tasks/query/ClientSideQueryProvider.d.ts +1 -1
- package/tasks/query/QueryBasedRelationship.d.ts +1 -1
- package/tasks/query/QueryService.d.ts +1 -1
- package/tasks/query/QueryService.js +1 -1
- package/tasks/query/SceneLayerClientSideQueryProvider.d.ts +2 -1
- package/tasks/query/StreamLayerClientSideQueryProvider.d.ts +2 -1
- package/tasks/search/ArcGISGeocoderSearchProvider.d.ts +1 -1
- package/tasks/search/GeocoderSearchProvider.d.ts +1 -1
- package/tasks/search/QuerySearchProvider.d.ts +1 -1
- package/tasks/search/SearchService.d.ts +2 -2
- package/tasks/search/SearchService.js +1 -1
- package/utilities/CollectionProxy.d.ts +2 -1
- package/utilities/CopyOnWriteCollection.d.ts +1 -1
- package/utilities/CopyOnWriteCollection.js +1 -1
- package/utilities/MapTransformCollection.d.ts +1 -1
- package/utilities/_layers.d.ts +1 -1
- package/utilities/_layers.js +1 -1
- package/utilities/_ogc.d.ts +4 -34
- package/utilities/_ogc.js +1 -1
- package/utilities/arcade.d.ts +1 -1
- package/utilities/arcade.js +1 -1
- package/utilities/collection.d.ts +9 -3
- package/utilities/collection.js +1 -1
- package/utilities/date.d.ts +2 -1
- package/utilities/field.d.ts +2 -0
- package/utilities/field.js +1 -1
- package/utilities/geometry.d.ts +1 -1
- package/utilities/geometry.js +1 -1
- package/utilities/iterable.d.ts +2 -1
- package/utilities/number.d.ts +2 -1
- package/utilities/string.d.ts +1 -1
- package/utilities/string.js +1 -1
- package/utilities/watch.d.ts +4 -2
- package/utilities/watch.js +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/docs/html/enums/utilities__ogc.GmlVersions.html +0 -633
- package/docs/html/enums/utilities__ogc.WfsVersions.html +0 -623
- package/docs/html/functions/utilities__ogc.esriSrMatchesOgcSrs.html +0 -624
package/AppConfig.schema.json
CHANGED
|
@@ -1475,10 +1475,10 @@
|
|
|
1475
1475
|
"$ref": "#/definitions/esri.webmap.Item.Item"
|
|
1476
1476
|
},
|
|
1477
1477
|
{
|
|
1478
|
-
"$ref": "#/definitions/
|
|
1478
|
+
"$ref": "#/definitions/Uri"
|
|
1479
1479
|
},
|
|
1480
1480
|
{
|
|
1481
|
-
"$ref": "#/definitions/
|
|
1481
|
+
"$ref": "#/definitions/PortalUri"
|
|
1482
1482
|
},
|
|
1483
1483
|
{
|
|
1484
1484
|
"type": "string"
|
|
@@ -1922,13 +1922,13 @@
|
|
|
1922
1922
|
"$ref": "#/definitions/esri.webmap.Item.Item"
|
|
1923
1923
|
},
|
|
1924
1924
|
{
|
|
1925
|
-
"$ref": "#/definitions/
|
|
1925
|
+
"$ref": "#/definitions/esri.webmap.WebMap.WebMap"
|
|
1926
1926
|
},
|
|
1927
1927
|
{
|
|
1928
1928
|
"$ref": "#/definitions/Uri"
|
|
1929
1929
|
},
|
|
1930
1930
|
{
|
|
1931
|
-
"$ref": "#/definitions/
|
|
1931
|
+
"$ref": "#/definitions/PortalUri"
|
|
1932
1932
|
},
|
|
1933
1933
|
{
|
|
1934
1934
|
"type": "string"
|
|
@@ -1945,13 +1945,13 @@
|
|
|
1945
1945
|
"$ref": "#/definitions/esri.webmap.Item.Item"
|
|
1946
1946
|
},
|
|
1947
1947
|
{
|
|
1948
|
-
"$ref": "#/definitions/
|
|
1948
|
+
"$ref": "#/definitions/esri.webmap.WebScene.WebScene"
|
|
1949
1949
|
},
|
|
1950
1950
|
{
|
|
1951
1951
|
"$ref": "#/definitions/Uri"
|
|
1952
1952
|
},
|
|
1953
1953
|
{
|
|
1954
|
-
"$ref": "#/definitions/
|
|
1954
|
+
"$ref": "#/definitions/PortalUri"
|
|
1955
1955
|
},
|
|
1956
1956
|
{
|
|
1957
1957
|
"type": "string"
|
package/Entity.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { InitializableBaseProperties } from "./support/InitializableBase.js";
|
|
2
|
+
import { InitializableBase } from "./support/InitializableBase.js";
|
|
2
3
|
import type { PropertyDefs } from "./support/Serializable.js";
|
|
3
4
|
import { generateUuid as generateId } from "./utilities/uuid.js";
|
|
4
5
|
export { generateId };
|
package/Hyperlink.d.ts
CHANGED
package/LanguageResources.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Entity, EntityProperties } from "./Entity.js";
|
|
2
|
-
import { PropertyDefs
|
|
2
|
+
import type { PropertyDefs } from "./support/Serializable.js";
|
|
3
|
+
import { SerializableBase } from "./support/Serializable.js";
|
|
3
4
|
import { ObservableMap } from "./utilities/ObservableMap.js";
|
|
4
5
|
/**
|
|
5
6
|
* Properties that can be passed into the constructor for
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
+
import Collection from "@arcgis/core/core/Collection";
|
|
1
2
|
import type FeatureLayer from "@arcgis/core/layers/FeatureLayer";
|
|
2
|
-
import { Attachment, AttachmentProperties } from "../data/Attachment.js";
|
|
3
|
-
import { ArcGISRequestHelper } from "../support/ArcGISRequestHelper.js";
|
|
4
|
-
import { PropertyDefs } from "../support/Serializable.js";
|
|
5
|
-
import {
|
|
6
|
-
import { Feature } from "./Feature.js";
|
|
3
|
+
import type { Attachment, AttachmentProperties } from "../data/Attachment.js";
|
|
4
|
+
import type { ArcGISRequestHelper } from "../support/ArcGISRequestHelper.js";
|
|
5
|
+
import type { PropertyDefs } from "../support/Serializable.js";
|
|
6
|
+
import type { Feature } from "./Feature.js";
|
|
7
7
|
import type { FeatureSettings } from "./FeatureSettings.js";
|
|
8
8
|
import type { FeatureReadOptions, FeatureWriteOptions } from "./FeatureSource.js";
|
|
9
9
|
import type { QuerySourceCapabilities } from "./QuerySourceCapabilities.js";
|
|
10
10
|
import type { Schema } from "./Schema.js";
|
|
11
11
|
import type { Relationship } from "./_Relationship.js";
|
|
12
|
-
import {
|
|
12
|
+
import type { TableExtensionProperties, TableProperties } from "./_TableExtension.js";
|
|
13
|
+
import { TableExtension } from "./_TableExtension.js";
|
|
13
14
|
/**
|
|
14
15
|
* Properties that can be passed into the constructor for
|
|
15
16
|
* {@link ArcGISServiceTableExtension}.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__decorate as e}from"tslib";import t from"@arcgis/core/rest/support/AttachmentQuery.js";import{InvalidOperationError as
|
|
1
|
+
import{__decorate as e}from"tslib";import t from"@arcgis/core/core/Collection";import r from"@arcgis/core/rest/support/AttachmentQuery.js";import{InvalidOperationError as s}from"../InvalidOperationError.js";import{toAttachment as a}from"../data/Attachment.js";import{FeatureSaveError as i}from"../data/FeatureSaveError.js";import{PopupTemplateFeatureSettings as l}from"../mapping/support/PopupTemplateFeatureSettings.js";import{getGlobalIdField as o,isGlobalIdUsed as n}from"../mapping/support/layers.js";import{DefaultArcGISRequestHelper as u}from"../support/ArcGISRequestHelper.js";import{cancelify as p}from"../support/Cancellable.js";import{serializable as c}from"../support/Serializable.js";import{ArcGISRelationshipCollection as d}from"../support/_ArcGISRelationshipCollection.js";import{executeQuery as h}from"../support/_query.js";import{ReadOnlyCollection as m}from"../utilities/ReadOnlyCollection.js";import{isArcGISServiceTableExtension as b}from"../utilities/extensions.js";import{isFeatureLayer as f,isMapImageSublayer as y,isSubtypeGroupLayer as _}from"../utilities/layers.js";import{isNumeric as w,parse as g}from"../utilities/number.js";import{toGraphic as F}from"./Feature.js";import{TableExtension as E,TableSchema as I}from"./_TableExtension.js";import{addAttachment as j,deleteAttachments as v,supportsAttachmentEditing as R}from"./support/attachments.js";let T=class extends E{get requestHelper(){return this._requestHelper||(this._requestHelper=new u),this._requestHelper}set requestHelper(e){this._requestHelper=e}get capabilities(){const e=R(this.table);return this.table?.capabilities?.operations?{...this.table.capabilities.operations,supportsAttachmentEditing:e}:{...super.capabilities,supportsAttachmentEditing:e}}get table(){return super.table}async _getAttachments(e){if(!this.table?.capabilities?.data?.supportsAttachment)return[];const t=+e.primaryKey,s=new r({objectIds:[t]}),i=await this.table.queryAttachments(s);return i?.[t]?.length?i[t].map((e=>a(e,e.url))):[]}async _addAttachment(e,t){return j(e,this.table,t,{attachmentTypes:this.attachmentTypes})}async _deleteAttachments(e,t){return v(e,this.table,t)}get _layerUrl(){return w(this.table.layerId)?`${this.table.url}/${this.table.layerId}`:this.table.url}_getFeatures(e,t){const r=this.table.createQuery();return r.objectIds=e.map((e=>g(e))),r.where=void 0,r.outFields=t.outFields,r.returnGeometry=t.returnGeometry,h(r,this,this.table,t.cancelToken)}async _addFeatures(e,t){const r=Array.from(e);if(0===r.length)return;const s=await this._applyEdits({addFeatures:r.map(F),updateFeatures:[],deleteFeatures:[]});if(!s.addFeatureResults||s.addFeatureResults.length!==r.length)throw new i("Received malformed response from server while saving feature(s).");let a;if(s.addFeatureResults.forEach(((e,t)=>{const{objectId:s,globalId:l,error:n}=e,u=r[t];if(n){a=a||new i("Errors encountered when adding features.");const{title:r}=u;a.errors.set(`${r}-${t}`,new Error(`Failed to add feature '${r}'. ${e.error.name} : ${e.error.message}`))}else{const{primaryKeyField:e}=u.schema;u.attributes.set(e,s);const t=o(this.table);t&&l&&u.attributes.set(t,l)}})),a)throw a}async _updateFeatures(e,t){const r=Array.from(e);if(0===r.length)return;const s=await this._applyEdits({addFeatures:[],updateFeatures:r.map(F),deleteFeatures:[]});if(!s.updateFeatureResults||s.updateFeatureResults.length!==r.length)throw new i("Received malformed response from server while saving feature(s).");let a;if(s.updateFeatureResults.forEach(((e,t)=>{if(e.error){a=a||new i("Errors encountered when updating features.");const{primaryKey:s}=r[t];a.errors.set(s,new Error(`Failed to update feature with id ${s}. ${e.error.message}`))}})),a)throw a}async _deleteFeatures(e,t){if(0===e.length)return;const r=await this._applyEdits({addFeatures:[],updateFeatures:[],deleteFeatures:e.map((e=>({objectId:e})))});if(!r.deleteFeatureResults)throw new i("Received malformed response from server while saving feature(s).");let s;if(r.deleteFeatureResults.forEach(((t,r)=>{if(t.error){s=s||new i("Errors encountered when deleting features.");const a=e[r];s.errors.set(a,new Error(`Failed to delete feature with id ${a}. ${t.error.message}`))}})),s)throw s}async _onInitialize(){await super._onInitialize(),await this.relationships.initialize()}_isSupportedTable(e){return!e.loaded||e.isTable}_createFeatureSettings(){return new A(this)}_createRelationships(){return new $(this)}_createSchema(){return new x(this)}_getSerializableProperties(){const e=super._getSerializableProperties();return{...e,attachmentTypes:["initial"],table:{...this._toPropertyDef(e.table),default:{$tableType:"ArcGISServiceTable"}},requestHelper:{serialize:!1}}}async _applyEdits(e,t={}){const r=n(this.table,e),s=this.table.applyEdits(e,{globalIdUsed:r}),a=await p(s,t.cancelToken);if(!a)throw new i("Received malformed response from server while saving feature(s).");return a}};T=e([c],T);export{T as ArcGISServiceTableExtension};class S extends m{constructor(e){if(super(),e.table)this._onTableResolved(e.table);else{this._collection=new t;const r=e.watch("table",(()=>{this._onTableResolved(e.table),r.remove()}),!0)}}_onTableResolved(e){this._collection=new t(e.types)}}let x=class extends I{constructor(e){super(e),this._typeCollection=new S(e),this._bindSettingToTableProperty("displayField"),this._bindSettingToTableProperty("typeIdField")}get types(){return this._typeCollection}_setSetting(e,t){if(this._tableBindings.has(e))throw new s("This schema property is read-only.");super._setSetting(e,t)}_createFieldCollection(){return new m(super._createFieldCollection())}};x=e([c],x);let A=class extends l{};A=e([c],A);class $ extends d{get _sourceUrl(){if(this._source.table?.url)return w(this._source.table.layerId)?`${this._source.table.url}/${this._source.table.layerId}`:this._source.table.url}get _sourceLayerId(){return this._source.table?.layerId}_findRelatedSource(e){if(!this._source.mapExtension||!this._source.table||!this._source.table.url)return;const t=this._source.mapExtension.tableExtensions.initializedItems.find((t=>b(t)&&t.table.url===this._source.table.url&&t.table.layerId===e));if(t)return t;for(const t of this._source.mapExtension.allLayerExtensions.initializedItems.toArray()){const r=t.allSublayerExtensions.initializedItems.find((t=>y(t.sublayer)&&t.sublayer.layer.url===this._source.table.url&&t.sublayer.id===e));if(r)return r}return this._source.mapExtension.allLayerExtensions.initializedItems.find((t=>(f(t.layer)||_(t.layer))&&t.layer.url===this._source.table.url&&t.layer.layerId===e))}}
|
package/data/Attachment.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { EntityProperties } from "../Entity.js";
|
|
2
|
+
import { EntityBase } from "../Entity.js";
|
|
3
|
+
import type { PropertyDefs } from "../support/Serializable.js";
|
|
3
4
|
/**
|
|
4
5
|
* An attachment info object from an ArcGIS server.
|
|
5
6
|
*/
|
package/data/Feature.d.ts
CHANGED
|
@@ -1,21 +1,24 @@
|
|
|
1
1
|
import Graphic from "@arcgis/core/Graphic";
|
|
2
|
+
import Collection from "@arcgis/core/core/Collection";
|
|
2
3
|
import type Geometry from "@arcgis/core/geometry/Geometry";
|
|
3
4
|
import type FeatureType from "@arcgis/core/layers/support/FeatureType";
|
|
4
|
-
import {
|
|
5
|
+
import type { EntityBaseProperties } from "../Entity.js";
|
|
6
|
+
import { EntityBase } from "../Entity.js";
|
|
5
7
|
import { Hyperlink } from "../Hyperlink.js";
|
|
6
|
-
import { Geometry as PortalGeometry } from "../portal/Geometry.js";
|
|
8
|
+
import type { Geometry as PortalGeometry } from "../portal/Geometry.js";
|
|
7
9
|
import type { CancelToken } from "../support/Cancellable.js";
|
|
8
|
-
import { PropertyDefs } from "../support/Serializable.js";
|
|
10
|
+
import type { PropertyDefs } from "../support/Serializable.js";
|
|
9
11
|
import type { WatchCallback } from "../support/esri.js";
|
|
10
12
|
import { ObservableMap } from "../utilities/ObservableMap.js";
|
|
11
13
|
import { ReadOnlyMap } from "../utilities/ReadOnlyMap.js";
|
|
12
|
-
import {
|
|
13
|
-
import { FormatOptions as FormatOptionsBase } from "../utilities/string.js";
|
|
14
|
+
import type { FormatOptions as FormatOptionsBase } from "../utilities/string.js";
|
|
14
15
|
import type { Attachment, AttachmentProperties } from "./Attachment.js";
|
|
15
16
|
import type { FeatureSet } from "./FeatureSet.js";
|
|
16
|
-
import {
|
|
17
|
+
import type { FeatureSettingsProperties } from "./FeatureSettings.js";
|
|
18
|
+
import { FeatureSettings } from "./FeatureSettings.js";
|
|
17
19
|
import type { FeatureSource } from "./FeatureSource.js";
|
|
18
|
-
import {
|
|
20
|
+
import type { SchemaProperties } from "./Schema.js";
|
|
21
|
+
import { Schema } from "./Schema.js";
|
|
19
22
|
import type { Relationship } from "./_Relationship.js";
|
|
20
23
|
/**
|
|
21
24
|
* The name of a special attribute that will be added to search or geocode
|
package/data/Feature.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__decorate as e}from"tslib";import t from"@arcgis/core/Graphic";import*as s from"@arcgis/core/arcade/arcade";import{EntityBase as i}from"../Entity.js";import{Hyperlink as r}from"../Hyperlink.js";import{InvalidOperationError as a}from"../InvalidOperationError.js";import{ItemType as o}from"../ItemType.js";import{toEsriApiGeometry as n,toPortalGeometry as h}from"../portal/Geometry.js";import{serializable as l}from"../support/Serializable.js";import{MapTransformCollection as p}from"../utilities/MapTransformCollection.js";import{ObservableMap as u}from"../utilities/ObservableMap.js";import{ReadOnlyMap as c}from"../utilities/ReadOnlyMap.js";import{arcadeScriptUsesGeometry as m,isArcadeScriptAsync as f,runArcadeExpression as d,runAsyncArcadeExpression as g}from"../utilities/arcade.js";import{flatten as y,groupBy as _}from"../utilities/array.js";import{checkArg as b}from"../utilities/checkArg.js";import{Collection as x,compare as w}from"../utilities/collection.js";import{parse as F,esriFormatToGeocortexFormat as v}from"../utilities/date.js";import{isCodedValueDomain as I}from"../utilities/esri.js";import{some as z,map as E,concat as A,forEach as S,find as j}from"../utilities/iterable.js";import{getLogger as T}from"../utilities/log.js";import{parse as k,NumberFormat as R}from"../utilities/number.js";import{map as C}from"../utilities/promise.js";import{format as M}from"../utilities/string.js";import{onCollectionPropertyChange as O}from"../utilities/watch.js";import{FeatureSettings as N}from"./FeatureSettings.js";import{fieldWithArcadeXRegex as P,fieldWithRelationshipRegex as V,Schema as D}from"./Schema.js";const $=T("geocortex.api.data.Feature");export const SCORE_FIELD="_score";export const SCORE_FIELD_ORIGINAL="_score_original";let U=class extends i{get geometry(){return this._geometry}set geometry(e){this.notifyChange("geometryType"),this._geometry=n(e),this.schema.spatialReference=this._geometry?.spatialReference}get geometryType(){return this.geometry?this.geometry.type:void 0}get source(){return this._source}set source(e){this._source&&this.settings.parent===this._source.featureSettings&&(this.settings.parent=void 0),this._source&&this.schema.parent===this._source.schema&&(this.schema.parent=void 0),this._source=e,this.settings.parent||(this.settings.parent=e?e.featureSettings:void 0),this.schema.parent||(this.schema.parent=e?e.schema:void 0),this.notifyChange("attachmentsInitialized"),this.notifyChange("relatedFeaturesInitialized")}get primaryKey(){const e=this.attributes.get(this.schema.primaryKeyField);return null!=e?`${e}`:void 0}get hasGlobalId(){return!!this.schema.fields.find((e=>"global-id"===e.type))}get globalId(){const e=this.schema.fields.find((e=>"global-id"===e.type));return e?this.attributes.get(e.name):void 0}set globalId(e){const t=this.schema.fields.find((e=>"global-id"===e.type));if(!t)throw new a("Cannot set global ID on feature -- no global ID field.");this.attributes.set(t.name,e)}get presentableAttributes(){return this._presentableAttributes=this._presentableAttributes||new H(this),this._presentableAttributes}get title(){return this.format(this._title||"")}get description(){return this.format(this._description)}get hyperlinks(){return this._hyperlinks||(this._hyperlinks=new X(this))}get relatedFeatures(){return this._relatedFeatures}get type(){if(this.schema.typeIdField&&this.attributes.has(this.schema.typeIdField)){const e=this.attributes.get(this.schema.typeIdField);return this.schema.types.find((t=>t.id===e))}}get attachmentsInitialized(){return!this.source||this._attachmentsInitialized}get relatedFeaturesInitialized(){return!this.source||this.source.relationships.every((e=>this._initializedRelationships.has(e)))}get expressionsInitialized(){return!this.settings.popupTemplate?.expressionInfos?.length||this._expressionsInitialized}get _hydrationStatus(){return this._featureHydrationStatus?this._featureHydrationStatus:this.source?.capabilities?.supportsQuery&&1===this.attributes.size&&void 0!==this.primaryKey?"dehydrated":"hydrated"}set _hydrationStatus(e){this._featureHydrationStatus=e}get _key(){return`${this.source?.id}//${this.primaryKey??this.globalId??this.id}`}get _title(){let e;return this.settings.popupTemplate&&(e="function"==typeof this.settings.popupTemplate.title?this.settings.popupTemplate.title():this.settings.popupTemplate.title),e||this.schema.displayField&&this.presentableAttributes.get(this.schema.displayField)||""}get _description(){if(this.settings.popupTemplate?.content){if("string"==typeof this.settings.popupTemplate.content)return this.settings.popupTemplate.content;if(Array.isArray(this.settings.popupTemplate.content)){const e=this.settings.popupTemplate.content.find((e=>"text"===e.type));if(e)return e.text}}return""}constructor(e){super(e),this._itemType=o.FEATURE,this._expressionFieldValues=new u,this._expressionValuesUpdatePending=!1,this._attachmentsInitialized=!1,this._expressionsInitialized=!1,this._initializedRelationships=new WeakSet,this.settings=new N,this.settings._setFeature(this),this.schema=new D,this.schema._featureSettings=this.settings,this.attachments=new x,this.attributes=new u,this._relatedFeatures=new u,this.expressionFieldValues=new K(this._expressionFieldValues,this),O(this,"source.relationships",(()=>{this.notifyChange("relatedFeaturesInitialized")}),!0),this.settings.watch("popupTemplate",((e,t)=>{e!==t&&(this._expressionsInitialized=!1,this.notifyChange("expressionsInitialized"))}),!0)}format(e,...t){let s="string"==typeof e?{format:e}:e;b("options",s).isNotMissing();const{format:i}=s;b("format",i).isNotMissing();let r=s.format.replace(B,J);return r=r.replace(Z,((e,t,i,r,a)=>ee(this,t||i,r,{...s,format:a?`{0:${a}}`:"{0}"}))),r=r.replace(W,"{{"),s={...s},s.format=r,M(s,...t)}clearExpressionInfos(){this._expressionFieldValues.clear()}async fetchExpressionInfos(e=!1){const{expressionInfos:t}=this.settings.popupTemplate??{};if(t){if(await Promise.all(t.map((async e=>{try{const t=this.source?.layer??this.source?.sublayer;let s=this.source?.mapExtension;if(!s){const e=this.source?.layerExtension;s=e?.mapExtension}this._expressionFieldValues.set(e.name,await g(e.expression,{layer:t,map:s?.map,feature:this,spatialReference:this.schema.spatialReference}))}catch(t){t instanceof Error&&$.error({message:"Error evaluating expression '{0}': {1}.",error:t},e.name,t.message),this._expressionFieldValues.set(e.name,q)}}))),e)return this.attributes.on("change",(async e=>{this._expressionValuesUpdatePending||(this._expressionValuesUpdatePending=!0,setTimeout((async()=>{this._expressionValuesUpdatePending=!1,await this.fetchExpressionInfos()}),0))}));this._expressionsInitialized=!0,this.notifyChange("expressionsInitialized")}}async fetchRelatedFeatures(e,t){if(!this.source)return;let s=[];if(e){const t=new Set(Array.isArray(e)?e:[e]);for(const e of t){const t="string"==typeof e?this.source.relationships.find((t=>t.id===e)):e;if(!t||!this.source.relationships.includes(t))throw new a("Relationship not found in feature source.");s.push(t)}}else s=this.source.relationships.toArray();const i=await C(s,(async e=>[e,await(async()=>{const s=await e.getRelatedFeatures(this,t);return this._initializedRelationships.add(e),s})()]));for(const e of i)this._relatedFeatures.set(e[0],e[1]);this.notifyChange("relatedFeaturesInitialized")}async fetchAttachments(){if(this.source){const e=await this.source.getAttachments(this);w(this.attachments,e,{equals:(e,t)=>e.id===t.id,onMissing:(e,t)=>this.attachments.remove(e),onNew:(e,t)=>{this.attachments.add(e)},onMatch:(e,t,s,i)=>{this.attachments.splice(s,1,t)}}),this._attachmentsInitialized=!0,this.notifyChange("attachmentsInitialized")}}async addAttachment(e){return this.source?.addAttachment(this,e)}async deleteAttachments(e){return this.source?.deleteAttachments(this,e)}_getSerializableProperties(){return{...super._getSerializableProperties(),attributes:{serializeModes:["project"],serialize:e=>{const t={};if("project"===e&&this.primaryKey&&this.source?.capabilities.supportsQuery)t[this.schema.primaryKeyField]=this.primaryKey;else for(const[e,s]of this.attributes.entries())t[e]=s;return t},deserialize:e=>{if(this.attributes.clear(),e instanceof Map)e.forEach(((e,t)=>{this.attributes.set(t,e)}));else for(const[t,s]of Object.entries(e))this.attributes.set(t,s)}},geometry:{serializeModes:["project"],serialize:e=>"project"===e&&this.source?.capabilities.supportsQuery?this.getDefault("geometry"):h(this.geometry),deserialize:e=>this.geometry=n(e)},settings:{serializeModes:["project"],serialize:e=>"project"===e&&this.source?.capabilities.supportsQuery?this.getDefault("settings"):this.settings.toJSON(e)},schema:{serializeModes:["project"],serialize:e=>"project"===e&&this.source?.capabilities.supportsQuery?this.getDefault("schema"):this.schema.toJSON(e)},source:["project"]}}_watchProperty(e,t,s,i){if("title"===e||"description"===e){const r=super._watchProperty(e,t,s,i),a="title"===e?"settings.popupTemplate.title":"settings.popupTemplate.content",o=this.watch(a,(()=>{this.notifyChange(e)})),n=this.presentableAttributes.on("change",(()=>{this.notifyChange(e)}));return{remove(){r.remove(),o.remove(),n.remove()}}}return super._watchProperty(e,t,s,i)}async _onInitialize(){const e=this._findRelationshipIds(this._title,this._description),t=this.source?this.source.relationships.map((e=>e.id)).toArray():[],s=[];for(const i of e)t.includes(i)?s.push(this.fetchRelatedFeatures(i)):$.error("Could not find relationship '{0}' referenced in feature title or description.",i);await Promise.all(s)}_findRelationshipIds(...e){const t=[];for(const s of e){let e;const i=s.replace(B,J);for(;e=Q.exec(i),null!==e;){const s=e[0];t.includes(s)||t.push(e[1])}}return t}};U=e([l],U);export{U as Feature};export function toFeature(e,t){const s=new U(t);if(e.attributes)for(const t of Object.keys(e.attributes))s.attributes.set(t,e.attributes[t]);return s.geometry=e.geometry,e.popupTemplate&&(s.settings.popupTemplate=e.popupTemplate),s}export function toGraphic(e){const s=new t;s.attributes={};for(const t of e.attributes.keys())s.attributes[t]=e.attributes.get(t);return e.source?.layer&&(s.layer=e.source?.layer),s.geometry=e.geometry,e.settings.popupTemplate&&(s.popupTemplate=e.settings.popupTemplate),s}const L="Presentable attributes are read-only.",G="Feature hyperlinks are read-only. Modify the feature's hyperlink templates instead.";class K extends c{constructor(e,t){super(e),this._feature=t}get(e){if(!super.has(e)){const{spatialReference:t}=this._feature.schema,i=this._feature.settings.popupTemplate?.expressionInfos?.find((t=>t.name===e));if(!i)return;(async()=>{try{if(f(i.expression,t)){const s=this._feature.source?.layer??this._feature.source?.sublayer;let r=this._feature.source?.mapExtension;if(!r){const e=this._feature.source?.layerExtension;r=e?.mapExtension}this._originalMap.set(e,await g(i.expression,{feature:this._feature,layer:s,map:r?.map,spatialReference:t}))}else m(i.expression,t)&&await s.enableGeometrySupport(),this._originalMap.set(e,d(i.expression,{feature:this._feature,spatialReference:t}))}catch(t){t instanceof Error&&$.error({message:"Error evaluating expression '{0}': {1}.",error:t},e,t.message),this._originalMap.set(e,q)}})()}return super.get(e)}}class H extends c{get size(){return this._feature.attributes.size+this._feature.schema.fields._expressionFieldsLength}constructor(e){super(new u),this._feature=e}clear(){throw new a(L)}delete(e){throw new a(L)}forEach(e,t){b("callback",e).isNotMissing();for(const s of this.keys())e.call(t,this.get(s),s,this)}get(e){const t=this._getFieldExtensionFormat(e);return this._formatAttribute(e,t)}has(e){return z(this.keys(),(t=>t===e))}set(...e){throw new a(L)}*entries(){yield*E(this.keys(),(e=>[e,this.get(e)]))}*keys(){const e=this._feature.schema.fields.expressionFields.map((e=>e.name)),t=[];this._feature.source?.relationships&&this._feature.source.relationships.filter((e=>"one-to-one"===e.cardinality||"many-to-one"===e.cardinality)).forEach((e=>t.push(...e.relatedSource.schema.fields.map((t=>`relationships/${e.id}/${t.name}`)).toArray()))),yield*A(this._feature.attributes.keys(),e.toArray(),t)}*values(){yield*E(this.keys(),(e=>this.get(e)))}[(Symbol.toStringTag,Symbol.iterator)](){return this.entries()}toJSON(){return Array.from(this.entries())}on(e,t){if(b("callback",t).isNotMissing(),!this._numObservers){const e=new Map,t=new Set,s=()=>{t.forEach((e=>e.remove())),t.clear()},i=()=>{const t={added:Array.from(this.entries()).filter((t=>t[1]!==e.get(t[0]))),removed:Array.from(e.entries()).filter((e=>!this.has(e[0])||e[1]!==this.get(e[0]))),target:this};(t.added.length||t.removed.length)&&(this.emit("change",t),r())},r=()=>{e.clear(),s(),S(this.keys(),(s=>{const r=this._getFieldExtension(s);let a="{0}";if(r){const e=r.watch("format",(()=>{i()}));t.add(e),r.format&&(a=r.format)}e.set(s,this._formatAttribute(s,a))}))};r();const a=this._feature.attributes.on("change",(()=>{i()})),o=this._feature.schema.fieldExtensions.on("change",(()=>{i()})),n=this._feature.settings.formatSettings.watch(["numberFormat","dateFormat","locale"],(()=>{i()})),h=this._feature.expressionFieldValues.on("change",(()=>{i()})),l=this._feature.schema.fields.on("change",(e=>{(e.added?.some((e=>null!==e.name.match(P)))||e.removed?.some((e=>null!==e.name.match(P))))&&i()})),p=this._feature.settings.watch("popupTemplate",(()=>{i()}));this._onAllObserversRemoved=()=>{h.remove(),a.remove(),o.remove(),l.remove(),n.remove(),p.remove(),e.clear(),s()}}const s=super.on("change",t);return this._numObservers++,{remove:()=>{s.remove(),this._numObservers--,this._numObservers||this._onAllObserversRemoved()}}}watch(e,t){if("size"===e){const e=this._feature.attributes.watch("size",((e,s)=>{t(e+this._feature.schema.fields._expressionFieldsLength,s+this._feature.schema.fields._expressionFieldsLength,"size",this)})),s=this._feature.schema.fields.watch("_expressionFieldsLength",((e,s)=>{t(e+this._feature.attributes.size,s+this._feature.attributes.size,"size",this)}));return{remove:()=>{e.remove(),s.remove()}}}return super.watch(e,t)}_getFieldExtension(e){const t=this._feature.schema.findFieldByName(e);if(t)return this._feature.schema.fieldExtensions.forField(t)}_getFieldExtensionFormat(e){const t=this._getFieldExtension(e);return t?t.format:"{0}"}_formatAttribute(e,t){const s=e.match(P),i=e.match(V);if(s)return ee(this._feature,"expression",s[1],{format:t});if(i){const[,e,s]=i;return ee(this._feature,e,s,{format:t})}return ee(this._feature,void 0,e,{format:t})}}const Z=/\{(?:relationships[\\/](\w\w*)[\\/])?(?:(expression)[\\/])?([_a-zA-ZÀ-ÖØ-öø-ÿ][._a-zA-ZÀ-ÖØ-öø-ÿ0-9]*)(?::([^}]*))?\}/g,Q=/\{relationships\/(\w\w*)[\\/]([^}]*)\}/g,B=/{{/g,J="\0MAGIC\0",W=new RegExp(J,"g"),q="#INVALID";class X extends p{constructor(e){super(e.settings.hyperlinkTemplates,(e=>this._getHyperlink(e))),this._feature=e}_getHyperlink(e){return this._hyperlinks=this._hyperlinks||new WeakMap,this._hyperlinks.has(e)||this._hyperlinks.set(e,new Y(this._feature,e)),this._hyperlinks.get(e)}}let Y=class extends r{get url(){return this._template.url?this._feature.format(this._template.url):this._template.url}set url(e){throw new a(G)}get text(){return this._template.text?this._feature.format(this._template.text):this._template.text}set text(e){throw new a(G)}get iconUrl(){return this._template.iconUrl?this._feature.format(this._template.iconUrl):this._template.iconUrl}set iconUrl(e){throw new a(G)}get target(){return this._template.target?this._feature.format(this._template.target):this._template.target}set target(e){throw new a(G)}get tooltip(){return this._template.tooltip?this._feature.format(this._template.tooltip):this._template.tooltip}set tooltip(e){throw new a(G)}constructor(e,t){super(t.toJSON()),this._feature=e,this._template=t}_watchProperty(e,t,s,i){const r=super._watchProperty(e,t,s,i),a=this._template.watch(e,(()=>{this.notifyChange(e)})),o=this._feature.presentableAttributes.on("change",(()=>{this.notifyChange(e)})),n=this._feature.relatedFeatures.on("change",(()=>{this.notifyChange(e)}));return{remove:()=>{r.remove(),a.remove(),o.remove(),n.remove()}}}_getSerializableProperties(){return{}}};function ee(e,t,s,i={format:"{0}"}){if("expression"!==t){if(t){const r=j(e.relatedFeatures.keys(),(e=>e.id===t));if(!r)return $.debug("Could not resolve related field '{0}/{1}",t,s),q;const a=Array.from(e.relatedFeatures.get(r));return"many-to-one"===r.cardinality||"one-to-one"===r.cardinality?a.length<1?($.debug("Could not resolve related field '{0}/{1}",t,s),q):te(a[0],s,i):a.map((e=>te(e,s,i))).filter((e=>""!==e)).join(",")}return te(e,s,i)}if(!e.settings.popupTemplate?.expressionInfos?.find((e=>e.name===s)))return $.debug("Could not find expression '{0}'.",s),q;try{const t=e.expressionFieldValues.get(s)??i.defaultExpressionValue??"",r=e.schema.findFieldByName(`expression/${s}`);let a=i;if(r){const t=e.schema.fieldExtensions.forField(r);a=re(e,s,ie(t.formatSettings),a)}return se(e,t,a)}catch(e){if(e instanceof Error)return $.error({message:"Error evaluating expression '{0}': {1}.",error:e},s,e.message),q;throw e}}function te(e,t,s){let i=e.attributes.get(t);if(null==i)return"";const r=e.schema.findFieldByName(t);let a={format:"{0}"};const o=e.type?.domains?.[t];if(t===e.schema.typeIdField)i=e.type?e.type.name:i;else if(I(o)){const e=o.codedValues.find((e=>`${e.code}`==`${i.toString()}`));i=e?e.name:i}else if(r)if(I(r.domain)){const e=r.domain.codedValues.find((e=>`${e.code}`==`${i.toString()}`));e&&(i=e.name)}else{switch(r.type){case"integer":case"small-integer":case"single":case"double":i=k(i);break;case"date":i=F({timeZone:e.schema.timeZone},i);break;default:i=`${i.toString()}`}const t=e.schema.fieldExtensions.forField(r);t&&(a=ie(t.formatSettings))}return se(e,i,re(e,t,a,s))}function se(e,t,s){let i=s;if("number"==typeof t||t instanceof Date){i={...ie(e.settings.formatSettings),...s}}return"{0}"===i.format&&"string"==typeof t?t:M(i,t)}function ie(e){return{format:"{0}",dateFormat:e.dateFormat,numberFormat:e.numberFormat,currency:e.currency,fractionalDigits:e.fractionalDigits,locale:e.locale,timeZone:e.timeZone}}function re(e,t,s,i){const{popupTemplate:r}=e.settings,a=r?.fieldInfos?r.fieldInfos.find((e=>e.fieldName===t)):void 0,o=a?a.format:void 0;let n;return o&&(n={format:"{0}",numberFormat:o.digitSeparator?R.NUMBER:R.FIXED_POINT,dateFormat:v(o.dateFormat),fractionalDigits:o.places}),{...n,...s,...i}}Y=e([l],Y);export async function resolveRelatedFeatures(e){const t=_(e,(e=>e.source));await Promise.all(y([...t.keys()].map((e=>e.relationships.toArray()))).map((e=>(async e=>{[...(await e.getAllRelatedFeatures(t.get(e.source))).entries()].forEach((([t,s])=>{t.relatedFeatures.set(e,s)}))})(e))))}
|
|
1
|
+
import{__decorate as e}from"tslib";import t from"@arcgis/core/Graphic";import s from"@arcgis/core/core/Collection";import{EntityBase as i}from"../Entity.js";import{Hyperlink as r}from"../Hyperlink.js";import{InvalidOperationError as a}from"../InvalidOperationError.js";import{ItemType as o}from"../ItemType.js";import{toEsriApiGeometry as n,toPortalGeometry as h}from"../portal/Geometry.js";import{serializable as l}from"../support/Serializable.js";import{MapTransformCollection as p}from"../utilities/MapTransformCollection.js";import{ObservableMap as u}from"../utilities/ObservableMap.js";import{ReadOnlyMap as c}from"../utilities/ReadOnlyMap.js";import{flatten as m,groupBy as f}from"../utilities/array.js";import{checkArg as d}from"../utilities/checkArg.js";import{compare as g}from"../utilities/collection.js";import{parse as y,esriFormatToGeocortexFormat as _}from"../utilities/date.js";import{isCodedValueDomain as b}from"../utilities/esri.js";import{fieldWithArcadeXRegex as x,fieldWithRelationshipRegex as w}from"../utilities/field.js";import{some as F,map as v,concat as I,forEach as z,find as A}from"../utilities/iterable.js";import{getLogger as E}from"../utilities/log.js";import{parse as S,NumberFormat as j}from"../utilities/number.js";import{map as T}from"../utilities/promise.js";import{format as k}from"../utilities/string.js";import{onCollectionPropertyChange as R}from"../utilities/watch.js";import{FeatureSettings as C}from"./FeatureSettings.js";import{Schema as M}from"./Schema.js";const O=E("geocortex.api.data.Feature");export const SCORE_FIELD="_score";export const SCORE_FIELD_ORIGINAL="_score_original";let N=class extends i{get geometry(){return this._geometry}set geometry(e){this.notifyChange("geometryType"),this._geometry=n(e),this.schema.spatialReference=this._geometry?.spatialReference}get geometryType(){return this.geometry?this.geometry.type:void 0}get source(){return this._source}set source(e){this._source&&this.settings.parent===this._source.featureSettings&&(this.settings.parent=void 0),this._source&&this.schema.parent===this._source.schema&&(this.schema.parent=void 0),this._source=e,this.settings.parent||(this.settings.parent=e?e.featureSettings:void 0),this.schema.parent||(this.schema.parent=e?e.schema:void 0),this.notifyChange("attachmentsInitialized"),this.notifyChange("relatedFeaturesInitialized")}get primaryKey(){const e=this.attributes.get(this.schema.primaryKeyField);return null!=e?`${e}`:void 0}get hasGlobalId(){return!!this.schema.fields.find((e=>"global-id"===e.type))}get globalId(){const e=this.schema.fields.find((e=>"global-id"===e.type));return e?this.attributes.get(e.name):void 0}set globalId(e){const t=this.schema.fields.find((e=>"global-id"===e.type));if(!t)throw new a("Cannot set global ID on feature -- no global ID field.");this.attributes.set(t.name,e)}get presentableAttributes(){return this._presentableAttributes=this._presentableAttributes||new U(this),this._presentableAttributes}get title(){return this.format(this._title||"")}get description(){return this.format(this._description)}get hyperlinks(){return this._hyperlinks||(this._hyperlinks=new Q(this))}get relatedFeatures(){return this._relatedFeatures}get type(){if(this.schema.typeIdField&&this.attributes.has(this.schema.typeIdField)){const e=this.attributes.get(this.schema.typeIdField);return this.schema.types.find((t=>t.id===e))}}get attachmentsInitialized(){return!this.source||this._attachmentsInitialized}get relatedFeaturesInitialized(){return!this.source||this.source.relationships.every((e=>this._initializedRelationships.has(e)))}get expressionsInitialized(){return!this.settings.popupTemplate?.expressionInfos?.length||this._expressionsInitialized}get _hydrationStatus(){return this._featureHydrationStatus?this._featureHydrationStatus:this.source?.capabilities?.supportsQuery&&1===this.attributes.size&&void 0!==this.primaryKey?"dehydrated":"hydrated"}set _hydrationStatus(e){this._featureHydrationStatus=e}get _key(){return`${this.source?.id}//${this.primaryKey??this.globalId??this.id}`}get _title(){let e;return this.settings.popupTemplate&&(e="function"==typeof this.settings.popupTemplate.title?this.settings.popupTemplate.title():this.settings.popupTemplate.title),e||this.schema.displayField&&this.presentableAttributes.get(this.schema.displayField)||""}get _description(){if(this.settings.popupTemplate?.content){if("string"==typeof this.settings.popupTemplate.content)return this.settings.popupTemplate.content;if(Array.isArray(this.settings.popupTemplate.content)){const e=this.settings.popupTemplate.content.find((e=>"text"===e.type));if(e)return e.text}}return""}constructor(e){super(e),this._itemType=o.FEATURE,this._expressionFieldValues=new u,this._expressionValuesUpdatePending=!1,this._attachmentsInitialized=!1,this._expressionsInitialized=!1,this._initializedRelationships=new WeakSet,this.settings=new C,this.settings._setFeature(this),this.schema=new M,this.schema._featureSettings=this.settings,this.attachments=new s,this.attributes=new u,this._relatedFeatures=new u,this.expressionFieldValues=new D(this._expressionFieldValues,this),R(this,"source.relationships",(()=>{this.notifyChange("relatedFeaturesInitialized")}),!0),this.settings.watch("popupTemplate",((e,t)=>{e!==t&&(this._expressionsInitialized=!1,this.notifyChange("expressionsInitialized"))}),!0)}format(e,...t){let s="string"==typeof e?{format:e}:e;d("options",s).isNotMissing();const{format:i}=s;d("format",i).isNotMissing();let r=s.format.replace(L,K);return r=r.replace($,((e,t,i,r,a)=>J(this,t||i,r,{...s,format:a?`{0:${a}}`:"{0}"}))),r=r.replace(H,"{{"),s={...s},s.format=r,k(s,...t)}clearExpressionInfos(){this._expressionFieldValues.clear()}async fetchExpressionInfos(e=!1){const{expressionInfos:t}=this.settings.popupTemplate??{};if(!t)return;const{runAsyncArcadeExpression:s}=await import("../utilities/arcade.js");if(await Promise.all(t.map((async e=>{try{const t=this.source?.layer??this.source?.sublayer;let i=this.source?.mapExtension;if(!i){const e=this.source?.layerExtension;i=e?.mapExtension}this._expressionFieldValues.set(e.name,await s(e.expression,{layer:t,map:i?.map,feature:this,spatialReference:this.schema.spatialReference}))}catch(t){t instanceof Error&&O.error({message:"Error evaluating expression '{0}': {1}.",error:t},e.name,t.message),this._expressionFieldValues.set(e.name,Z)}}))),e)return this.attributes.on("change",(async e=>{this._expressionValuesUpdatePending||(this._expressionValuesUpdatePending=!0,setTimeout((async()=>{this._expressionValuesUpdatePending=!1,await this.fetchExpressionInfos()}),0))}));this._expressionsInitialized=!0,this.notifyChange("expressionsInitialized")}async fetchRelatedFeatures(e,t){if(!this.source)return;let s=[];if(e){const t=new Set(Array.isArray(e)?e:[e]);for(const e of t){const t="string"==typeof e?this.source.relationships.find((t=>t.id===e)):e;if(!t||!this.source.relationships.includes(t))throw new a("Relationship not found in feature source.");s.push(t)}}else s=this.source.relationships.toArray();const i=await T(s,(async e=>[e,await(async()=>{const s=await e.getRelatedFeatures(this,t);return this._initializedRelationships.add(e),s})()]));for(const e of i)this._relatedFeatures.set(e[0],e[1]);this.notifyChange("relatedFeaturesInitialized")}async fetchAttachments(){if(this.source){const e=await this.source.getAttachments(this);g(this.attachments,e,{equals:(e,t)=>e.id===t.id,onMissing:(e,t)=>this.attachments.remove(e),onNew:(e,t)=>{this.attachments.add(e)},onMatch:(e,t,s,i)=>{this.attachments.splice(s,1,t)}}),this._attachmentsInitialized=!0,this.notifyChange("attachmentsInitialized")}}async addAttachment(e){return this.source?.addAttachment(this,e)}async deleteAttachments(e){return this.source?.deleteAttachments(this,e)}_getSerializableProperties(){return{...super._getSerializableProperties(),attributes:{serializeModes:["project"],serialize:e=>{const t={};if("project"===e&&this.primaryKey&&this.source?.capabilities.supportsQuery)t[this.schema.primaryKeyField]=this.primaryKey;else for(const[e,s]of this.attributes.entries())t[e]=s;return t},deserialize:e=>{if(this.attributes.clear(),e instanceof Map)e.forEach(((e,t)=>{this.attributes.set(t,e)}));else for(const[t,s]of Object.entries(e))this.attributes.set(t,s)}},geometry:{serializeModes:["project"],serialize:e=>"project"===e&&this.source?.capabilities.supportsQuery?this.getDefault("geometry"):h(this.geometry),deserialize:e=>this.geometry=n(e)},settings:{serializeModes:["project"],serialize:e=>"project"===e&&this.source?.capabilities.supportsQuery?this.getDefault("settings"):this.settings.toJSON(e)},schema:{serializeModes:["project"],serialize:e=>"project"===e&&this.source?.capabilities.supportsQuery?this.getDefault("schema"):this.schema.toJSON(e)},source:["project"]}}_watchProperty(e,t,s,i){if("title"===e||"description"===e){const r=super._watchProperty(e,t,s,i),a="title"===e?"settings.popupTemplate.title":"settings.popupTemplate.content",o=this.watch(a,(()=>{this.notifyChange(e)})),n=this.presentableAttributes.on("change",(()=>{this.notifyChange(e)}));return{remove(){r.remove(),o.remove(),n.remove()}}}return super._watchProperty(e,t,s,i)}async _onInitialize(){const e=this._findRelationshipIds(this._title,this._description),t=this.source?this.source.relationships.map((e=>e.id)).toArray():[],s=[];for(const i of e)t.includes(i)?s.push(this.fetchRelatedFeatures(i)):O.error("Could not find relationship '{0}' referenced in feature title or description.",i);await Promise.all(s)}_findRelationshipIds(...e){const t=[];for(const s of e){let e;const i=s.replace(L,K);for(;e=G.exec(i),null!==e;){const s=e[0];t.includes(s)||t.push(e[1])}}return t}};N=e([l],N);export{N as Feature};export function toFeature(e,t){const s=new N(t);if(e.attributes)for(const t of Object.keys(e.attributes))s.attributes.set(t,e.attributes[t]);return s.geometry=e.geometry,e.popupTemplate&&(s.settings.popupTemplate=e.popupTemplate),s}export function toGraphic(e){const s=new t;s.attributes={};for(const t of e.attributes.keys())s.attributes[t]=e.attributes.get(t);return e.source?.layer&&(s.layer=e.source?.layer),s.geometry=e.geometry,e.settings.popupTemplate&&(s.popupTemplate=e.settings.popupTemplate),s}const P="Presentable attributes are read-only.",V="Feature hyperlinks are read-only. Modify the feature's hyperlink templates instead.";class D extends c{constructor(e,t){super(e),this._feature=t}get(e){if(!super.has(e)){const{spatialReference:t}=this._feature.schema,s=this._feature.settings.popupTemplate?.expressionInfos?.find((t=>t.name===e));if(!s)return;(async()=>{const{isArcadeScriptAsync:i,runAsyncArcadeExpression:r,arcadeScriptUsesGeometry:a,runArcadeExpression:o}=await import("../utilities/arcade.js");try{if(i(s.expression,t)){const i=this._feature.source?.layer??this._feature.source?.sublayer;let a=this._feature.source?.mapExtension;if(!a){const e=this._feature.source?.layerExtension;a=e?.mapExtension}this._originalMap.set(e,await r(s.expression,{feature:this._feature,layer:i,map:a?.map,spatialReference:t}))}else{if(a(s.expression,t)){const{enableGeometrySupport:e}=await import("@arcgis/core/arcade/arcade");await e()}this._originalMap.set(e,o(s.expression,{feature:this._feature,spatialReference:t}))}}catch(t){t instanceof Error&&O.error({message:"Error evaluating expression '{0}': {1}.",error:t},e,t.message),this._originalMap.set(e,Z)}})()}return super.get(e)}}class U extends c{get size(){return this._feature.attributes.size+this._feature.schema.fields._expressionFieldsLength}constructor(e){super(new u),this._feature=e}clear(){throw new a(P)}delete(e){throw new a(P)}forEach(e,t){d("callback",e).isNotMissing();for(const s of this.keys())e.call(t,this.get(s),s,this)}get(e){const t=this._getFieldExtensionFormat(e);return this._formatAttribute(e,t)}has(e){return F(this.keys(),(t=>t===e))}set(...e){throw new a(P)}*entries(){yield*v(this.keys(),(e=>[e,this.get(e)]))}*keys(){const e=this._feature.schema.fields.expressionFields.map((e=>e.name)),t=[];this._feature.source?.relationships&&this._feature.source.relationships.filter((e=>"one-to-one"===e.cardinality||"many-to-one"===e.cardinality)).forEach((e=>t.push(...e.relatedSource.schema.fields.map((t=>`relationships/${e.id}/${t.name}`)).toArray()))),yield*I(this._feature.attributes.keys(),e.toArray(),t)}*values(){yield*v(this.keys(),(e=>this.get(e)))}[(Symbol.toStringTag,Symbol.iterator)](){return this.entries()}toJSON(){return Array.from(this.entries())}on(e,t){if(d("callback",t).isNotMissing(),!this._numObservers){const e=new Map,t=new Set,s=()=>{t.forEach((e=>e.remove())),t.clear()},i=()=>{const t={added:Array.from(this.entries()).filter((t=>t[1]!==e.get(t[0]))),removed:Array.from(e.entries()).filter((e=>!this.has(e[0])||e[1]!==this.get(e[0]))),target:this};(t.added.length||t.removed.length)&&(this.emit("change",t),r())},r=()=>{e.clear(),s(),z(this.keys(),(s=>{const r=this._getFieldExtension(s);let a="{0}";if(r){const e=r.watch("format",(()=>{i()}));t.add(e),r.format&&(a=r.format)}e.set(s,this._formatAttribute(s,a))}))};r();const a=this._feature.attributes.on("change",(()=>{i()})),o=this._feature.schema.fieldExtensions.on("change",(()=>{i()})),n=this._feature.settings.formatSettings.watch(["numberFormat","dateFormat","locale"],(()=>{i()})),h=this._feature.expressionFieldValues.on("change",(()=>{i()})),l=this._feature.schema.fields.on("change",(e=>{(e.added?.some((e=>null!==e.name.match(x)))||e.removed?.some((e=>null!==e.name.match(x))))&&i()})),p=this._feature.settings.watch("popupTemplate",(()=>{i()}));this._onAllObserversRemoved=()=>{h.remove(),a.remove(),o.remove(),l.remove(),n.remove(),p.remove(),e.clear(),s()}}const s=super.on("change",t);return this._numObservers++,{remove:()=>{s.remove(),this._numObservers--,this._numObservers||this._onAllObserversRemoved()}}}watch(e,t){if("size"===e){const e=this._feature.attributes.watch("size",((e,s)=>{t(e+this._feature.schema.fields._expressionFieldsLength,s+this._feature.schema.fields._expressionFieldsLength,"size",this)})),s=this._feature.schema.fields.watch("_expressionFieldsLength",((e,s)=>{t(e+this._feature.attributes.size,s+this._feature.attributes.size,"size",this)}));return{remove:()=>{e.remove(),s.remove()}}}return super.watch(e,t)}_getFieldExtension(e){const t=this._feature.schema.findFieldByName(e);if(t)return this._feature.schema.fieldExtensions.forField(t)}_getFieldExtensionFormat(e){const t=this._getFieldExtension(e);return t?t.format:"{0}"}_formatAttribute(e,t){const s=e.match(x),i=e.match(w);if(s)return J(this._feature,"expression",s[1],{format:t});if(i){const[,e,s]=i;return J(this._feature,e,s,{format:t})}return J(this._feature,void 0,e,{format:t})}}const $=/\{(?:relationships[\\/](\w\w*)[\\/])?(?:(expression)[\\/])?([_a-zA-ZÀ-ÖØ-öø-ÿ][._a-zA-ZÀ-ÖØ-öø-ÿ0-9]*)(?::([^}]*))?\}/g,G=/\{relationships\/(\w\w*)[\\/]([^}]*)\}/g,L=/{{/g,K="\0MAGIC\0",H=new RegExp(K,"g"),Z="#INVALID";class Q extends p{constructor(e){super(e.settings.hyperlinkTemplates,(e=>this._getHyperlink(e))),this._feature=e}_getHyperlink(e){return this._hyperlinks=this._hyperlinks||new WeakMap,this._hyperlinks.has(e)||this._hyperlinks.set(e,new B(this._feature,e)),this._hyperlinks.get(e)}}let B=class extends r{get url(){return this._template.url?this._feature.format(this._template.url):this._template.url}set url(e){throw new a(V)}get text(){return this._template.text?this._feature.format(this._template.text):this._template.text}set text(e){throw new a(V)}get iconUrl(){return this._template.iconUrl?this._feature.format(this._template.iconUrl):this._template.iconUrl}set iconUrl(e){throw new a(V)}get target(){return this._template.target?this._feature.format(this._template.target):this._template.target}set target(e){throw new a(V)}get tooltip(){return this._template.tooltip?this._feature.format(this._template.tooltip):this._template.tooltip}set tooltip(e){throw new a(V)}constructor(e,t){super(t.toJSON()),this._feature=e,this._template=t}_watchProperty(e,t,s,i){const r=super._watchProperty(e,t,s,i),a=this._template.watch(e,(()=>{this.notifyChange(e)})),o=this._feature.presentableAttributes.on("change",(()=>{this.notifyChange(e)})),n=this._feature.relatedFeatures.on("change",(()=>{this.notifyChange(e)}));return{remove:()=>{r.remove(),a.remove(),o.remove(),n.remove()}}}_getSerializableProperties(){return{}}};function J(e,t,s,i={format:"{0}"}){if("expression"!==t){if(t){const r=A(e.relatedFeatures.keys(),(e=>e.id===t));if(!r)return O.debug("Could not resolve related field '{0}/{1}",t,s),Z;const a=Array.from(e.relatedFeatures.get(r));return"many-to-one"===r.cardinality||"one-to-one"===r.cardinality?a.length<1?(O.debug("Could not resolve related field '{0}/{1}",t,s),Z):W(a[0],s,i):a.map((e=>W(e,s,i))).filter((e=>""!==e)).join(",")}return W(e,s,i)}if(!e.settings.popupTemplate?.expressionInfos?.find((e=>e.name===s)))return O.debug("Could not find expression '{0}'.",s),Z;try{const t=e.expressionFieldValues.get(s)??i.defaultExpressionValue??"",r=e.schema.findFieldByName(`expression/${s}`);let a=i;if(r){const t=e.schema.fieldExtensions.forField(r);a=Y(e,s,X(t.formatSettings),a)}return q(e,t,a)}catch(e){if(e instanceof Error)return O.error({message:"Error evaluating expression '{0}': {1}.",error:e},s,e.message),Z;throw e}}function W(e,t,s){let i=e.attributes.get(t);if(null==i)return"";const r=e.schema.findFieldByName(t);let a={format:"{0}"};const o=e.type?.domains?.[t];if(t===e.schema.typeIdField)i=e.type?e.type.name:i;else if(b(o)){const e=o.codedValues.find((e=>`${e.code}`==`${i.toString()}`));i=e?e.name:i}else if(r)if(b(r.domain)){const e=r.domain.codedValues.find((e=>`${e.code}`==`${i.toString()}`));e&&(i=e.name)}else{switch(r.type){case"integer":case"small-integer":case"single":case"double":i=S(i);break;case"date":i=y({timeZone:e.schema.timeZone},i);break;default:i=`${i.toString()}`}const t=e.schema.fieldExtensions.forField(r);t&&(a=X(t.formatSettings))}return q(e,i,Y(e,t,a,s))}function q(e,t,s){let i=s;if("number"==typeof t||t instanceof Date){i={...X(e.settings.formatSettings),...s}}return"{0}"===i.format&&"string"==typeof t?t:k(i,t)}function X(e){return{format:"{0}",dateFormat:e.dateFormat,numberFormat:e.numberFormat,currency:e.currency,fractionalDigits:e.fractionalDigits,locale:e.locale,timeZone:e.timeZone}}function Y(e,t,s,i){const{popupTemplate:r}=e.settings,a=r?.fieldInfos?r.fieldInfos.find((e=>e.fieldName===t)):void 0,o=a?a.format:void 0;let n;return o&&(n={format:"{0}",numberFormat:o.digitSeparator?j.NUMBER:j.FIXED_POINT,dateFormat:_(o.dateFormat),fractionalDigits:o.places}),{...n,...s,...i}}B=e([l],B);export async function resolveRelatedFeatures(e){const t=f(e,(e=>e.source));await Promise.all(m([...t.keys()].map((e=>e.relationships.toArray()))).map((e=>(async e=>{[...(await e.getAllRelatedFeatures(t.get(e.source))).entries()].forEach((([t,s])=>{t.relatedFeatures.set(e,s)}))})(e))))}
|
package/data/FeatureList.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { Entity, EntityProperties } from "../Entity.js";
|
|
2
|
-
import { PropertyDefs, Serializable, SerializeMode } from "../support/Serializable.js";
|
|
1
|
+
import type { Entity, EntityProperties } from "../Entity.js";
|
|
2
|
+
import type { PropertyDefs, Serializable, SerializeMode } from "../support/Serializable.js";
|
|
3
3
|
import { ReadOnlyCollection } from "../utilities/ReadOnlyCollection.js";
|
|
4
|
-
import { ChangeEvent } from "../utilities/collection.js";
|
|
4
|
+
import type { ChangeEvent } from "../utilities/collection.js";
|
|
5
5
|
import type { Feature, FeatureProperties } from "./Feature.js";
|
|
6
|
-
import {
|
|
6
|
+
import type { FeatureSetProperties } from "./FeatureSet.js";
|
|
7
|
+
import { FeatureSet } from "./FeatureSet.js";
|
|
7
8
|
/**
|
|
8
9
|
* Compares two features for the purposes of sorting.
|
|
9
10
|
*/
|
package/data/FeatureSet.d.ts
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import { Entity, EntityProperties } from "../Entity.js";
|
|
1
|
+
import type { Entity, EntityProperties } from "../Entity.js";
|
|
2
2
|
import { Observable } from "../support/Observable.js";
|
|
3
|
-
import { PropertyDefs, Serializable, SerializeMode } from "../support/Serializable.js";
|
|
3
|
+
import type { PropertyDefs, Serializable, SerializeMode } from "../support/Serializable.js";
|
|
4
4
|
import type { ChangeEvent } from "../support/esri.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import type { FeatureProperties } from "./Feature.js";
|
|
6
|
+
import { Feature } from "./Feature.js";
|
|
7
|
+
import type { FeatureSettingsProperties } from "./FeatureSettings.js";
|
|
8
|
+
import { FeatureSettings } from "./FeatureSettings.js";
|
|
7
9
|
import type { FeatureSource } from "./FeatureSource.js";
|
|
8
|
-
import {
|
|
10
|
+
import type { SchemaProperties } from "./Schema.js";
|
|
11
|
+
import { Schema } from "./Schema.js";
|
|
9
12
|
/**
|
|
10
13
|
* Properties that can be passed into the constructor for
|
|
11
14
|
* {@link data/FeatureSet!FeatureSet}.
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import PopupTemplate from "@arcgis/core/PopupTemplate";
|
|
2
|
+
import type Collection from "@arcgis/core/core/Collection";
|
|
2
3
|
import type SpatialReference from "@arcgis/core/geometry/SpatialReference";
|
|
3
4
|
import type Content from "@arcgis/core/popup/content/Content.js";
|
|
4
|
-
import {
|
|
5
|
+
import type { HyperlinkProperties } from "../Hyperlink.js";
|
|
6
|
+
import { Hyperlink } from "../Hyperlink.js";
|
|
5
7
|
import { PopupInfo as PopupInfoJson } from "../portal/PopupInfo.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
8
|
+
import type { FormatSettingsProperties } from "../support/FormatSettings.js";
|
|
9
|
+
import { FormatSettings } from "../support/FormatSettings.js";
|
|
10
|
+
import type { InitializableCollection } from "../support/InitializableCollectionProxy.js";
|
|
11
|
+
import type { PropertyDefs, SerializeMode } from "../support/Serializable.js";
|
|
9
12
|
import { Settings } from "../support/Settings.js";
|
|
10
|
-
import type { Collection } from "../utilities/collection.js";
|
|
11
13
|
import type { Feature } from "./Feature.js";
|
|
12
14
|
import type { FeatureSource } from "./FeatureSource.js";
|
|
13
|
-
import {
|
|
15
|
+
import type { PopupContentExtensionProperties } from "./PopupContentExtension.js";
|
|
16
|
+
import { PopupContentExtension } from "./PopupContentExtension.js";
|
|
14
17
|
/**
|
|
15
18
|
* Properties that can be passed into the constructor for
|
|
16
19
|
* {@link data/FeatureSettings!FeatureSettings}.
|
package/data/FeatureSettings.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__decorate as t}from"tslib";import e from"@arcgis/core/PopupTemplate";import{Hyperlink as i}from"../Hyperlink.js";import{isPopupContentExtension as n}from"../ItemType.js";import{ArrayWrappedCollection as o}from"../mapping/support/ArrayWrappedCollection.js";import{PopupInfo as s}from"../portal/PopupInfo.js";import{FormatSettings as r}from"../support/FormatSettings.js";import{InitializableCollectionProxy as p}from"../support/InitializableCollectionProxy.js";import{filterJSONProperties as a,isDefault as u,serializable as l,shouldExcludeDefaults as h}from"../support/Serializable.js";import{Settings as f}from"../support/Settings.js";import{compare as m}from"../utilities/array.js";import{checkArg as
|
|
1
|
+
import{__decorate as t}from"tslib";import e from"@arcgis/core/PopupTemplate";import{Hyperlink as i}from"../Hyperlink.js";import{isPopupContentExtension as n}from"../ItemType.js";import{ArrayWrappedCollection as o}from"../mapping/support/ArrayWrappedCollection.js";import{PopupInfo as s}from"../portal/PopupInfo.js";import{FormatSettings as r}from"../support/FormatSettings.js";import{InitializableCollectionProxy as p}from"../support/InitializableCollectionProxy.js";import{filterJSONProperties as a,isDefault as u,serializable as l,shouldExcludeDefaults as h}from"../support/Serializable.js";import{Settings as f}from"../support/Settings.js";import{compare as m}from"../utilities/array.js";import{checkArg as d}from"../utilities/checkArg.js";import{getAllFieldInfos as c,getAllReferencedFieldNames as _,isPopupTemplate as g}from"../utilities/esri.js";import{fieldWithArcadeXRegex as S,fieldWithRelationshipRegex as C}from"../utilities/field.js";import{isQueryBasedRelationship as y}from"../utilities/relationships.js";import{onCollectionPropertyChange as T}from"../utilities/watch.js";import{PopupContentExtension as x,_popupContentExtensionMap as z}from"./PopupContentExtension.js";let E=class extends f{get _popupContent(){return this._popupContentCollection}get hyperlinkTemplates(){return this._getCollectionSetting("hyperlinkTemplates")}get popupTemplate(){return this._getSetting("popupTemplate")}set popupTemplate(t){let e;e=t instanceof Object&&!g(t)?s.toEsriApiPopupTemplate(t):t;const i=this?._feature?.schema?.createPopupTemplate()??this?._featureSource?.schema?.createPopupTemplate();e&&i&&(e.content=e.content??i.content,e.fieldInfos=e.fieldInfos??i.fieldInfos),this._setSetting("popupTemplate",e),this._isDefaultPopupTemplate=!1}get formatSettings(){return this._getNestedSettings("formatSettings",(()=>new r))}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}constructor(t){super(t),this._isDefaultPopupTemplate=!1,this._popupContentCollection=this._createPopupContentCollection(),this.popupContentExtensions=new v(this)}get _defaultOutFields(){const t=c(this.popupTemplate),e=this.featureSource?.schema?.primaryKeyField;if(t&&e){const i=new Set;i.add(e);const n=this.featureSource.schema.fields.toArray().map((t=>t.name)),o=_(this.popupTemplate),s=t.filter((t=>t.visible||t.isEditable&&this.featureSource.capabilities.supportsEditing)).map((t=>t.fieldName)).concat(...o).filter((t=>n.includes(t)));return this._featureSource.relationships.forEach((t=>{y(t)&&s.push(t.keyField)})),s.filter((t=>!(t.match(S)||t.match(C)))).forEach((t=>i.add(t))),Array.from(i.values())}return["*"]}_setFeatureSource(t){this._featureSource=t,this.notifyChange("featureSource")}_setFeature(t){this._feature=t,this.notifyChange("feature")}toJSON(t="all"){const e=a(this._getSerializableProperties(),this,t)||{},i=e.popupContentExtensions?.filter((t=>!this.parent?.popupContentExtensions?.some((e=>e.id===t.id))));if(e)for(const t of Object.keys(e))this.isModified(t)||delete e[t];if(i?.length&&(e.popupContentExtensions=i),!h(t)||!u(e))return e}_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 i?t:new i(t))})),this.hyperlinkTemplates.toArray().forEach((e=>{const i=this.hyperlinkTemplates.indexOf(e),n=t.findIndex((t=>this._hyperlinksAreEquivalent(t,e)));n<0?this.hyperlinkTemplates.removeAt(i):n!==i&&this.hyperlinkTemplates.reorder(e,n)}))}},popupTemplate:{serialize:!1},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&&m(this.popupContentExtensions,t,{onNew:(t,e)=>{this.popupContentExtensions.add(n(t)?t:new x(t),e)},onMatch:(t,e,i,o)=>{n(e)||t.assignProperties(e),i!==o&&this.popupContentExtensions.reorder(t,o)},onMissing:t=>{this.popupContentExtensions.remove(t)},equals:(t,e)=>n(e)?e===t||e.id===t.id:!(!e?.content||!x.matchesRef(this.popupContentExtensions.toArray(),this.popupContentExtensions.indexOf(t),e.content))||t.id===e.id})}}}}_hyperlinksAreEquivalent(t,e){if(t===e)return!0;const i=t=>t||"";return i(t.text)===i(e.text)&&i(t.url)===i(e.url)&&i(t.iconUrl)===i(e.iconUrl)&&i(t.target)===i(e.target)&&i(t.tooltip)===i(e.tooltip)}};E=t([l],E);export{E as FeatureSettings};class v extends p{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}constructor(t){super(),this._uninitializedPopupContentExtensions=new Set,this._featureSettings=t,T(this._featureSettings,"_popupContent",(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)})),t.watch("_popupContent.length",(()=>this.notifyChange("length")))}forContent(t){if(d("content",t).isNotMissing(),this._featureSettings._popupContent.includes(t))return this._forContent(t)}add(t,i){if(d("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=z.get(t.content);if(z.set(t.content,t),e&&e!==t&&this._onRemoved(e),this._featureSettings._popupContent.includes(t.content))if(void 0===i){const i={added:[t],moved:[],removed:e?[e]:[],target:this};this.emit("change",i)}else this._featureSettings._popupContent.reorder(t.content,i);else this._featureSettings._popupContent.add(t.content,i)}else{this._uninitializedPopupContentExtensions.add(t);const e={added:[t],moved:[],removed:[],target:this};this.emit("change",e)}return this._onAdded(t),this}removeAt(t){const i=this.getItemAt(t);if(void 0!==i){if(this._popupTemplateIsInherited&&(this._featureSettings.popupTemplate=new e({content:this._featureSettings._popupContent.toArray()})),this._uninitializedPopupContentExtensions.has(i)){this._uninitializedPopupContentExtensions.delete(i);const t={added:[],moved:[],removed:[i],target:this};this.emit("change",t)}else this._featureSettings._popupContent.remove(i.content);return this._onRemoved(i),i}}reorder(t,i){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,i),t}sort(t){return this._popupTemplateIsInherited&&(this._featureSettings.popupTemplate=new e({content:this._featureSettings._popupContent.toArray()})),this._featureSettings._popupContent.sort(((e,i)=>t(this._forContent(e),this._forContent(i)))),this}_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&&(z.set(t.content,t),this._uninitializedPopupContentExtensions.delete(t));if(!z.has(t)){const e=new x({content:t});z.set(t,e),e._setFeatureSettings(this._featureSettings),this._onAdded(e)}return z.get(t)}}
|
package/data/FeatureSource.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type Collection from "@arcgis/core/core/Collection";
|
|
1
2
|
import type Extent from "@arcgis/core/geometry/Extent";
|
|
2
3
|
import type { Entity } from "../Entity.js";
|
|
3
4
|
import type { Hyperlink, HyperlinkProperties } from "../Hyperlink.js";
|
|
@@ -6,7 +7,6 @@ import type { Action } from "../support/Action.js";
|
|
|
6
7
|
import type { CancelToken } from "../support/Cancellable.js";
|
|
7
8
|
import type { Initializable } from "../support/InitializableBase.js";
|
|
8
9
|
import type { QueryService } from "../tasks/query/QueryService.js";
|
|
9
|
-
import type { Collection } from "../utilities/collection.js";
|
|
10
10
|
import type { Attachment, AttachmentProperties } from "./Attachment.js";
|
|
11
11
|
import type { Capabilities } from "./Capabilities.js";
|
|
12
12
|
import type { Feature } from "./Feature.js";
|
|
@@ -1,21 +1,25 @@
|
|
|
1
|
+
import Collection from "@arcgis/core/core/Collection";
|
|
1
2
|
import type Extent from "@arcgis/core/geometry/Extent";
|
|
2
|
-
import {
|
|
3
|
+
import type { EntityBaseProperties } from "../Entity.js";
|
|
4
|
+
import { EntityBase } from "../Entity.js";
|
|
3
5
|
import { Hyperlink } from "../Hyperlink.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
+
import type { FeatureSource, FeatureSourceProperties, FeatureWriteOptions } from "../data/FeatureSource.js";
|
|
7
|
+
import { FeatureReadOptions } from "../data/FeatureSource.js";
|
|
8
|
+
import type { MenuProperties } from "../menus/Menu.js";
|
|
9
|
+
import { Menu } from "../menus/Menu.js";
|
|
6
10
|
import type { Action } from "../support/Action.js";
|
|
7
|
-
import { InitializableBase } from "../support/InitializableBase.js";
|
|
11
|
+
import type { InitializableBase } from "../support/InitializableBase.js";
|
|
8
12
|
import type { PropertyDefs } from "../support/Serializable.js";
|
|
9
13
|
import type { QueryService } from "../tasks/query/QueryService.js";
|
|
10
14
|
import { CollectionProxy } from "../utilities/CollectionProxy.js";
|
|
11
|
-
import { Collection } from "../utilities/collection.js";
|
|
12
15
|
import type { Attachment, AttachmentProperties } from "./Attachment.js";
|
|
13
16
|
import type { Capabilities } from "./Capabilities.js";
|
|
14
17
|
import type { Feature } from "./Feature.js";
|
|
15
18
|
import { FeatureSettings } from "./FeatureSettings.js";
|
|
16
19
|
import { Schema } from "./Schema.js";
|
|
17
20
|
import { TaskSettings } from "./TaskSettings.js";
|
|
18
|
-
import {
|
|
21
|
+
import type { RelationshipProperties } from "./_Relationship.js";
|
|
22
|
+
import { Relationship } from "./_Relationship.js";
|
|
19
23
|
/**
|
|
20
24
|
* Properties that can be passed into the constructor for
|
|
21
25
|
* {@link data/FeatureSourceBase!FeatureSourceBase}.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"@arcgis/core/popup/content/TextContent.js";import{ArgumentError as
|
|
1
|
+
import t from"@arcgis/core/core/Collection";import e from"@arcgis/core/popup/content/TextContent.js";import{ArgumentError as i}from"../ArgumentError.js";import{EntityBase as s}from"../Entity.js";import{Hyperlink as r}from"../Hyperlink.js";import{InvalidOperationError as a}from"../InvalidOperationError.js";import{isMenu as n,isRelationship as o}from"../ItemType.js";import{NotFoundError as u}from"../NotFoundError.js";import{FeatureReadOptions as c}from"../data/FeatureSource.js";import{Menu as h}from"../menus/Menu.js";import{initializeCollection as l}from"../support/InitializableBase.js";import{CollectionProxy as p}from"../utilities/CollectionProxy.js";import{first as d}from"../utilities/asyncIterable.js";import{checkArg as m}from"../utilities/checkArg.js";import{compare as f}from"../utilities/collection.js";import{getLogger as g}from"../utilities/log.js";import{FeatureSettings as w}from"./FeatureSettings.js";import{Schema as y}from"./Schema.js";import{TaskSettings as _}from"./TaskSettings.js";import{Relationship as S}from"./_Relationship.js";const A="Adding features is not supported.",F="Updating features is not supported.",z="Deleting features is not supported.",j=Object.freeze({supportsAdd:!1,supportsUpdate:!1,supportsDelete:!1,supportsEditing:!1,supportsAttachmentEditing:!1}),M=g("FeatureSourceBase");export class FeatureSourceBase extends s{get featureActions(){return this._featureActions}set featureActions(t){this._featureActions=t,t&&this.isInitialized&&!t.isInitialized&&(async()=>{try{await t.initialize()}catch(t){t instanceof Error&&M.error({message:"An error occurred while initializing feature action menu.",error:t})}})()}get capabilities(){return this._capabilities()}constructor(t){super(t),this.featureSettings=this._createAndSetupFeatureSettings(),this.taskSettings=this._createTaskSettings(),this.schema=this._createAndSetupSchema(),this.relationships=this._createRelationships(),this.hyperlinks=this._createHyperlinks()}getFullExtent(){}async getAttachments(t){return m("feature",t).isNotMissing(),await this.initialize(),this._getAttachments(t)}async addAttachment(t,e){if(m("feature",t).isNotMissing(),m("attachment",e).isNotMissing(),t.source&&t.source!==this)throw new i("feature",`Cannot add an attachment to a feature not of this source (${this.title??this.id})`);return await this.initialize(),this._addAttachment(t,e)}async deleteAttachments(t,e){if(m("feature",t).isNotMissing(),m("attachmentIds",e).isNotMissing(),t.source&&t.source!==this)throw new i("feature",`Cannot delete attachments from a feature not of this source (${this.title??this.id})`);await this.initialize(),await this._deleteAttachments(t,e)}async getFeature(t,e){m("id",t).isNotMissing();const i=this.getFeatures([t],e),s=await d(i);if(!s)throw new u("No feature exists with ID '{0}'.",t);return s}getFeatures(t,e){m("ids",t).isNotMissing();const i=this;return async function*(){await i.initialize(),yield*i._getFeatures(t,{...c.DEFAULTS,...c.fromFeatureSource(i),...e})}()}async addFeature(t,e){m("feature",t).isNotMissing(),await this.addFeatures([t])}async addFeatures(t,e){if(m("features",t).isNotMissing(),await this.initialize(),!this.capabilities.supportsAdd)throw new a(A);await this._addFeatures(t,e)}async updateFeature(t,e){m("feature",t).isNotMissing(),await this.updateFeatures([t])}async updateFeatures(t,e){if(m("features",t).isNotMissing(),await this.initialize(),!this.capabilities.supportsUpdate)throw new a(F);await this._updateFeatures(t,e)}async deleteFeature(t,e){m("feature",t).isNotMissing(),await this.deleteFeatures([t])}async deleteFeatures(t,e){if(m("features",t).isNotMissing(),await this.initialize(),!this.capabilities.supportsDelete)throw new a(z);const i=[];for(const e of t)i.push("string"==typeof e?e:e.primaryKey);await this._deleteFeatures(i,e)}_getSerializableProperties(){return{...super._getSerializableProperties(),featureSettings:{serializeModes:["initial"],isDefault:t=>{if(!t)return!0;if(t.constructor===Object){if(!Object.keys(t).length)return!0}return!1}},taskSettings:"initial",onAddFeature:"initial",onEditFeature:"initial",schema:"initial",relationships:{serializeModes:["initial"],serialize:t=>this.relationships?this.relationships.filter((t=>"ArcGISRelationship"!==t.relationshipType)).toArray():[],deserialize:t=>{f(this.relationships,t,{onNew:t=>{o(t)?this.relationships.add(t):this.relationships.add(S.create(t))},onMatch:(t,e)=>{o(t)&&t.assignProperties({title:e.title})},onMissing:t=>{"ArcGISRelationship"!==t.relationshipType&&this.relationships.remove(t)},equals:(t,e)=>t.id===e.id})},default:[]},hyperlinks:{serialize:!1,deserialize:t=>{this.hyperlinks.removeAll(),this.hyperlinks.addMany(t.map((t=>t instanceof r?t:new r(t))))}},featureActions:{serializeModes:["initial"],deserialize:t=>{t?n(t)?this.featureActions=t:this.featureActions?this.featureActions.assignProperties(t):this.featureActions=h.create(t):this.featureActions=void 0}}}}*_initializableChildCollections(){yield*super._initializableChildCollections(),yield this.schema.fieldExtensions}async _onInitialize(){await super._onInitialize(),this.featureActions&&await this.featureActions.initialize()}async _postInitialize(){await super._postInitialize(),this.featureSettings.popupTemplate||(this.featureSettings.popupTemplate=this.schema.createPopupTemplate(),this.featureSettings._isDefaultPopupTemplate=!0);const{popupTemplate:t}=this.featureSettings;"function"==typeof t.content&&(t.content=t.content()),t.content=await t.content,"string"==typeof t.content&&(t.content=[new e({text:t.content})]),!t.title&&this.schema.displayField&&(t.title=`{${this.schema.displayField}}`),await l(this.featureSettings.popupContentExtensions,{target:this,onInitializeWarning:t=>this.emit("initializeWarning",t)}),await Promise.all(this.relationships.toArray().map((t=>t.relatedSource?.initialize())))}_createSchema(){return new y}_createFeatureSettings(){return new w}_createTaskSettings(){return new _}_createRelationships(){return new RelationshipCollection(this)}_createHyperlinks(){return new t}async _getAttachments(t){return[]}async _addAttachment(t,e){throw new a("Adding attachments is not supported.")}async _deleteAttachments(t,e){throw new a("Deleting attachments is not supported.")}_getFeatures(t,e){const{primaryKeyField:i}=this.schema;if(this.queryService&&i){const s=t.map((t=>`${i} = ${t}`)).join(" OR ");return this.queryService.query(this,s,e)}throw new a("Querying features is not supported.")}_addFeatures(t,e){throw new a(A)}_updateFeatures(t,e){throw new a(F)}_deleteFeatures(t,e){throw new a(z)}_capabilities(){return j}_isRelationship(t){return"function"==typeof t.getRelatedFeatures}_createAndSetupSchema(){const t=this._createSchema();return t._featureSettings=this.featureSettings,t}_createAndSetupFeatureSettings(){const t=this._createFeatureSettings();return t._setFeatureSource(this),t}}export class RelationshipCollection extends p{constructor(e){super(new t),this._source=e}add(t,e){return m("relationship",t).isNotMissing(),t.source&&t.source.relationships.remove(t),o(t)&&t._setSource(this._source),super.add(t,e)}removeAt(t){const e=super.removeAt(t);return o(e)&&e._setSource(void 0),e}}
|
package/data/FeatureStream.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { EntityProperties } from "../Entity.js";
|
|
2
|
+
import { EntityBase } from "../Entity.js";
|
|
3
|
+
import type { PropertyDefs } from "../support/Serializable.js";
|
|
3
4
|
import type { Feature } from "./Feature.js";
|
|
4
5
|
import { FeatureSet } from "./FeatureSet.js";
|
|
5
6
|
/**
|
package/data/FieldExtension.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import EsriField from "@arcgis/core/layers/support/Field";
|
|
2
2
|
import type FieldInfo from "@arcgis/core/popup/FieldInfo";
|
|
3
|
-
import {
|
|
3
|
+
import type { EntityBaseProperties } from "../Entity.js";
|
|
4
|
+
import { EntityBase } from "../Entity.js";
|
|
4
5
|
import { Field as PortalField } from "../portal/Field.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import type { FormatSettingsProperties } from "../support/FormatSettings.js";
|
|
7
|
+
import { FormatSettings } from "../support/FormatSettings.js";
|
|
8
|
+
import type { PropertyDefs } from "../support/Serializable.js";
|
|
9
|
+
import type { Schema } from "./Schema.js";
|
|
8
10
|
/**
|
|
9
11
|
* Properties that extend the ArcGis portal representation of a Field.
|
|
10
12
|
*/
|
package/data/FieldExtension.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e;import{__decorate as i}from"tslib";import t from"@arcgis/core/layers/support/Field";import{EntityBase as s}from"../Entity.js";import{InvalidOperationError as r}from"../InvalidOperationError.js";import{isFieldExtension as o,ItemType as
|
|
1
|
+
var e;import{__decorate as i}from"tslib";import t from"@arcgis/core/layers/support/Field";import{EntityBase as s}from"../Entity.js";import{InvalidOperationError as r}from"../InvalidOperationError.js";import{isFieldExtension as o,ItemType as f}from"../ItemType.js";import{Field as a}from"../portal/Field.js";import{FormatSettings as d}from"../support/FormatSettings.js";import{serializable as n}from"../support/Serializable.js";import{esriFormatToGeocortexFormat as l}from"../utilities/date.js";import{isField as h}from"../utilities/esri.js";import{fieldWithArcadeXRegex as m}from"../utilities/field.js";import{NumberFormat as p}from"../utilities/number.js";import{deepClone as _}from"../utilities/object.js";export const _fieldExtensionMap=new WeakMap;let c=e=class extends s{get field(){return this._field}get schema(){return this._schema}get fieldInfo(){if(this._fieldInfo)return this._fieldInfo;if(!this.field?.name)return;const e=this._schema?._featureSettings?.popupTemplate,i=e?.fieldInfos||[];return this._fieldInfo=i.find((e=>e.fieldName===this.field.name)),this._fieldInfo}constructor(e){super(e),this.format="{0}",this.formatSettings=new F(this),this.searchable=!0,this._itemType=f.FIELD_EXTENSION;const{field:i}=e??{};h(i)?this._setField(i):"string"==typeof i?this._deferredFieldProperties={$ref:i}:i?i.$ref?this._deferredFieldProperties=i:this._setField(a.toEsriApiField(i)):this._setField(new t),this.watch("_schema.featureSource",(()=>this.notifyChange("fieldInfo"))),this.watch("_schema._featureSettings",(e=>{this.formatSettings.parent=e?e.formatSettings:void 0}),!0)}static matchesRef(e,i){return o(e)?(e.field?.name??e._deferredFieldProperties?.$ref)===i.$ref:e.name===i.$ref}_setSchema(e){this._schema=e,this._resolveField(),this.notifyChange("schema"),this.notifyChange("fieldInfo")}_resolveField(){if(this._field||!this._deferredFieldProperties||!this._schema)return;const i=this._schema.fields.find((i=>e.matchesRef(i,this._deferredFieldProperties)));i&&(this._setField(i),this.assignProperties({field:this._deferredFieldProperties}),this._originalRef=this._deferredFieldProperties.$ref,delete this._deferredFieldProperties,_fieldExtensionMap.set(i,this))}_getSerializableProperties(){return{...super._getSerializableProperties(),field:{serializeModes:["initial"],serialize:()=>this.field?this._originalRef?{$ref:this._originalRef}:this._schema?.fields.includes(this._field)&&this.field.name?{$ref:this.field.name}:a.fromEsriApiField(this.field):this._deferredFieldProperties?_(this._deferredFieldProperties):void 0,deserialize:e=>{if(h(e)){if(e!==this.field)throw new Error("Property 'field' is read-only.")}else e&&this.field&&a.applyToEsriApiField(e,this.field)}},searchable:{serializeModes:["initial"],isDefault:e=>e!==this._isArcadeExpressionField},format:{serializeModes:["initial"],default:"{0}"},formatSettings:"initial"}}async _onInitialize(){if(this._resolveField(),!this._field){const e=this._deferredFieldProperties.$ref;throw this._schema?new r(`Field not found with name: ${e}. Field does not exist.`):new r(`Field not found with name: ${e}. Field does not have a parent schema.`)}}_setField(e){this._field=e,this._isArcadeExpressionField&&(this.searchable=!1),this.notifyChange("field"),this.notifyChange("fieldInfo")}get _isArcadeExpressionField(){return!!this._field&&!!this._field.name&&!!this._field.name.match(m)}};c=e=i([n],c);export{c as FieldExtension};let F=class extends d{constructor(e,i){super(i),this.fieldExtension=e,e.watch("fieldInfo.format.places",(()=>this.notifyChange("fractionalDigits"))),e.watch("fieldInfo.format.digitSeparator",(()=>this.notifyChange("numberFormat"))),e.watch("fieldInfo.format.dateFormat",(()=>this.notifyChange("dateFormat")))}get fractionalDigits(){const e=this.fieldExtension.fieldInfo?.format?.places;return!this.isModified("fractionalDigits")&&this.useFieldInfo&&e?e:this._getSetting("fractionalDigits")}set fractionalDigits(e){this._setSetting("fractionalDigits",e)}get numberFormat(){const e=this.fieldExtension.fieldInfo?.format?.digitSeparator;return!this.isModified("numberFormat")&&this.useFieldInfo&&e?e?p.NUMBER:p.FIXED_POINT:this._getSetting("numberFormat")}set numberFormat(e){this._setSetting("numberFormat",e)}get dateFormat(){const e=this.fieldExtension.fieldInfo?.format?.dateFormat;return!this.isModified("dateFormat")&&this.useFieldInfo&&e?l(e):this._getSetting("dateFormat")}set dateFormat(e){this._setSetting("dateFormat",e)}};F=i([n],F);
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import Collection from "@arcgis/core/core/Collection";
|
|
1
2
|
import Content from "@arcgis/core/popup/content/Content.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import type { EntityBaseProperties } from "../Entity.js";
|
|
4
|
+
import { EntityBase } from "../Entity.js";
|
|
5
|
+
import type { PopupElement } from "../portal/PopupInfo.js";
|
|
6
|
+
import type { PropertyDefs } from "../support/Serializable.js";
|
|
6
7
|
import type { FeatureSettings } from "./FeatureSettings.js";
|
|
7
8
|
/**
|
|
8
9
|
* Properties that can be passed into the constructor for
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var t;import{__decorate as e}from"tslib";import i from"@arcgis/core/popup/content/Content.js";import{EntityBase as
|
|
1
|
+
var t;import{__decorate as e}from"tslib";import i from"@arcgis/core/core/Collection";import n from"@arcgis/core/popup/content/Content.js";import{EntityBase as r}from"../Entity.js";import{InvalidOperationError as s}from"../InvalidOperationError.js";import{ItemType as o}from"../ItemType.js";import{PopupContent as p}from"../portal/PopupInfo.js";import{serializable as a}from"../support/Serializable.js";import{compare as f}from"../utilities/array.js";import{isCustomContent as d,isExpressionContent as u,isPopupContent as h,isTextContent as l}from"../utilities/esri.js";import{deepClone as m}from"../utilities/object.js";export const _popupContentExtensionMap=new WeakMap;let _=t=class extends r{get content(){return this._content}get featureSettings(){return this._featureSettings}get _index(){return Array.isArray(this.featureSettings.popupTemplate?.content)?this.featureSettings.popupTemplate.content.indexOf(this.content):-1}constructor(t){super(t),this.summaryHiddenFields=new i,this._itemType=o.POPUP_CONTENT_EXTENSION;const{content:e,visibleInSummary:r}=t??{};h(e)?this._setContent(e):"string"==typeof e?this._deferredContentProperties={$ref:e}:e?e.$ref?this._deferredContentProperties=e:this._setContent(p.toEsriApiPopupContent(e)):this._setContent(new n),this.visibleInSummary=r??this._getDefaultSummaryVisibility()}static matchesRef(e,i,n){const r=e.map(((e,i)=>c(e,e instanceof t?e._index:i))),s=r[i],{type:o,index:p,title:a,text:f}=n.$ref;if(o!==s.type)return!1;if("text"===o&&f===s.text)return!0;if(a&&a===s.title)return!0;if("number"==typeof p&&p===s.index)return!0;return 1===r.map(((t,e)=>t.type===o?t.index:void 0)).filter((t=>"number"==typeof t)).length}_setFeatureSettings(t){this._featureSettings=t,this._resolveContent(),this.notifyChange("featureSettings")}_resolveContent(){if(this._content||!this._deferredContentProperties||!this._featureSettings)return;const e=this._featureSettings._popupContent.find(((e,i)=>t.matchesRef(this.featureSettings._popupContent.toArray(),i,this._deferredContentProperties)));e&&(this._setContent(e),this.assignProperties({content:this._deferredContentProperties}),this._originalRef={...this._deferredContentProperties.$ref},delete this._deferredContentProperties,_popupContentExtensionMap.set(e,this))}_getSerializableProperties(){return{...super._getSerializableProperties(),content:{serializeModes:["initial"],serialize:()=>this.content?this._originalRef?{$ref:this._originalRef}:this._featureSettings?._popupContent.includes(this._content)?{$ref:c(this.content,this._index)}:p.fromEsriApiPopupContent(this.content):this._deferredContentProperties?m(this._deferredContentProperties):void 0,deserialize:t=>{if(h(t)){if(t!==this.content)throw new Error("Property 'popupContent' is read-only.")}else t&&this.content&&p.applyToEsriApiPopupContent(t,this.content)}},visibleInSummary:{serializeModes:["initial"],isDefault:(t,e)=>t===this._getDefaultSummaryVisibility()},summaryHiddenFields:{serializeModes:["initial"],serialize:()=>this.summaryHiddenFields.toArray(),deserialize:t=>{f(this.summaryHiddenFields,t,{onMatch:(t,e,i,n)=>{this.summaryHiddenFields.reorder(t,n)},onMissing:t=>this.summaryHiddenFields.remove(t),onNew:t=>{this.summaryHiddenFields.add(t)}})}}}}async _onInitialize(){if(this._resolveContent(),!this._content){const t=this._deferredContentProperties.$ref;throw this._featureSettings?new s(`PopupContent not found with reference: ${JSON.stringify(t)}. PopupContent does not exist.`):new s(`PopupContent not found with reference: ${JSON.stringify(t)}. PopupContent does not have a parent featureSettings.`)}}_setContent(t){this._content=t,this.notifyChange("content")}_getDefaultSummaryVisibility(){return"text"===(this.content?.type??this._deferredContentProperties?.type??this._deferredContentProperties?.$ref?.type)}};_=t=e([a],_);export{_ as PopupContentExtension};function c(t,e){const i=t instanceof _?t.content:t;if(!i)return t._deferredContentProperties?.$ref;const n={type:i.type};return e>=0&&(n.index=e),u(i)?n.title=i.expressionInfo.title:l(i)?n.text=i.text:d(i)||(n.title=i.title),n}
|
package/data/Relationship.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { Relationship } from "./_Relationship.js";
|
|
2
|
+
export type { Cardinality, RelationshipProperties, RelationshipType } from "./_Relationship.js";
|