@arcgis/core 5.1.0-next.63 → 5.1.0-next.65
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/Camera.d.ts +1 -1
- package/Ground.d.ts +7 -7
- package/PopupTemplate.d.ts +8 -8
- package/WebDocument2D.js +1 -1
- package/WebScene.d.ts +1 -1
- package/WebScene.js +1 -1
- package/analysis/AreaMeasurementAnalysis.d.ts +1 -1
- package/analysis/DirectLineMeasurementAnalysis.d.ts +1 -1
- package/analysis/LengthDimension.d.ts +4 -4
- package/analysis/ShadowCastAnalysis.d.ts +3 -3
- package/analysis/SliceAnalysis.d.ts +1 -1
- package/analysis/SlicePlane.d.ts +1 -1
- package/applications/Components/featureUtils.d.ts +24 -0
- package/applications/Components/featureUtils.js +1 -1
- package/arcade/geometry/wkt.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{8166ad6bbd7d7a8f91cf.js → 0f3b8a08f843a080af0d.js} +1 -1
- package/assets/esri/core/workers/chunks/{354351ab3fc79dedf9a8.js → 4eca871ca51a59f6540a.js} +1 -1
- package/assets/esri/core/workers/chunks/7e97684e851274efd11f.js +1 -0
- package/assets/esri/core/workers/chunks/86f1aa2c108f5224d8b5.js +1 -0
- package/assets/esri/core/workers/chunks/b8acb6c2538053c01cc6.js +1 -0
- package/assets/esri/core/workers/chunks/d9d69cf2496ebe76eade.js +1 -0
- package/assets/esri/core/workers/chunks/{6c72dbd5275bffde1583.js → e622a23034f055de8b55.js} +1 -1
- package/assets/esri/core/workers/chunks/ec9d5dcf2a0a11c85341.js +1 -0
- package/config.js +1 -1
- package/effects/FocusAreas.d.ts +1 -1
- package/form/elements/FieldElement.d.ts +1 -1
- package/form/elements/GroupElement.d.ts +1 -1
- package/form/elements/TextElement.d.ts +1 -1
- package/form/elements/inputs/ComboBoxInput.d.ts +1 -1
- package/form/elements/inputs/RadioButtonsInput.d.ts +1 -1
- package/form/elements/inputs/SwitchInput.d.ts +1 -1
- package/geometry/Mesh.d.ts +7 -7
- package/geometry/operators/alphaShapeOperator.d.ts +1 -1
- package/geometry/operators/areaOperator.d.ts +1 -1
- package/geometry/operators/bufferOperator.d.ts +1 -1
- package/geometry/operators/centroidOperator.d.ts +1 -1
- package/geometry/operators/clipOperator.d.ts +1 -1
- package/geometry/operators/containsOperator.d.ts +1 -1
- package/geometry/operators/convexHullOperator.d.ts +1 -1
- package/geometry/operators/crossesOperator.d.ts +1 -1
- package/geometry/operators/cutOperator.d.ts +1 -1
- package/geometry/operators/densifyOperator.d.ts +1 -1
- package/geometry/operators/differenceOperator.d.ts +1 -1
- package/geometry/operators/disjointOperator.d.ts +1 -1
- package/geometry/operators/distanceOperator.d.ts +1 -1
- package/geometry/operators/generalizeOperator.d.ts +1 -1
- package/geometry/operators/geodesicProximityOperator.d.ts +1 -1
- package/geometry/operators/geodeticDistanceOperator.d.ts +1 -1
- package/geometry/operators/geodeticUtilsOperator.d.ts +2 -2
- package/geometry/operators/graphicBufferOperator.d.ts +1 -1
- package/geometry/operators/intersectionOperator.d.ts +1 -1
- package/geometry/operators/intersectsOperator.d.ts +1 -1
- package/geometry/operators/isNearOperator.d.ts +1 -1
- package/geometry/operators/lengthOperator.d.ts +1 -1
- package/geometry/operators/locateBetweenOperator.d.ts +1 -1
- package/geometry/operators/multiPartToSinglePartOperator.d.ts +1 -1
- package/geometry/operators/offsetOperator.d.ts +5 -5
- package/geometry/operators/overlapsOperator.d.ts +1 -1
- package/geometry/operators/proximityOperator.d.ts +1 -1
- package/geometry/operators/simplifyOGCOperator.d.ts +1 -1
- package/geometry/operators/simplifyOperator.d.ts +1 -1
- package/geometry/operators/support/Transformation.d.ts +6 -6
- package/geometry/operators/symmetricDifferenceOperator.d.ts +1 -1
- package/geometry/operators/touchesOperator.d.ts +1 -1
- package/geometry/operators/unionOperator.d.ts +1 -1
- package/geometry/operators/withinOperator.d.ts +1 -1
- package/geometry/support/MeshMaterialMetallicRoughness.d.ts +1 -1
- package/geometry/support/vcsData.js +2 -0
- package/geometry/support/vcsLookup.js +2 -0
- package/kernel.js +1 -1
- package/layers/BuildingSceneLayer.d.ts +4 -4
- package/layers/CSVLayer.d.ts +2 -2
- package/layers/CatalogLayer.d.ts +2 -2
- package/layers/ElevationLayer.d.ts +1 -1
- package/layers/FeatureLayer.d.ts +2 -2
- package/layers/GeoJSONLayer.d.ts +2 -2
- package/layers/GeoRSSLayer.d.ts +1 -1
- package/layers/GraphicsLayer.d.ts +2 -2
- package/layers/ImageryLayer.d.ts +3 -3
- package/layers/ImageryTileLayer.d.ts +2 -2
- package/layers/IntegratedMesh3DTilesLayer.d.ts +6 -6
- package/layers/IntegratedMeshLayer.d.ts +7 -7
- package/layers/MapImageLayer.d.ts +1 -1
- package/layers/MediaLayer.d.ts +1 -1
- package/layers/OGCFeatureLayer.d.ts +2 -2
- package/layers/PointCloudLayer.d.ts +1 -1
- package/layers/SceneLayer.d.ts +9 -9
- package/layers/StreamLayer.d.ts +2 -2
- package/layers/VectorTileLayer.d.ts +2 -2
- package/layers/VideoLayer.d.ts +1 -1
- package/layers/VoxelLayer.d.ts +8 -8
- package/layers/WFSLayer.d.ts +6 -6
- package/layers/catalog/CatalogFootprintLayer.d.ts +1 -1
- package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
- package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/mixins/BlendLayer.d.ts +6 -6
- package/layers/pointCloudFilters/PointCloudReturnFilter.d.ts +1 -1
- package/layers/pointCloudFilters/PointCloudValueFilter.d.ts +1 -1
- package/layers/support/DimensionalDefinition.d.ts +2 -2
- package/layers/support/FeatureEffect.d.ts +4 -4
- package/layers/support/FeatureFilter.d.ts +17 -17
- package/layers/support/FeatureReductionBinning.d.ts +1 -1
- package/layers/support/FeatureReductionCluster.d.ts +9 -9
- package/layers/support/FeatureReductionSelection.d.ts +1 -1
- package/layers/support/LabelClass.d.ts +2 -2
- package/layers/support/RasterFunction.d.ts +1 -1
- package/layers/support/SceneFilter.d.ts +2 -2
- package/layers/support/SceneModification.d.ts +3 -3
- package/layers/support/capabilities.js +1 -1
- package/layers/support/featureLayerUtils.js +1 -1
- package/layers/support/serviceCapabilitiesUtils.js +1 -1
- package/layers/types.d.ts +6 -0
- package/package.json +1 -1
- package/popup/Feature.d.ts +6 -6
- package/popup/Feature.js +1 -1
- package/popup/Features.d.ts +3 -14
- package/popup/Features.js +1 -1
- package/popup/content/AttachmentsContent.d.ts +1 -1
- package/popup/content/BarChartMediaInfo.d.ts +1 -1
- package/popup/content/ColumnChartMediaInfo.d.ts +1 -1
- package/popup/content/FieldsContent.d.ts +1 -1
- package/popup/content/ImageMediaInfo.d.ts +1 -1
- package/popup/content/LineChartMediaInfo.d.ts +1 -1
- package/popup/content/MediaContent.d.ts +1 -1
- package/popup/content/PieChartMediaInfo.d.ts +1 -1
- package/popup/content/RelationshipContent.d.ts +1 -1
- package/popup/content/TextContent.d.ts +1 -1
- package/popup/support/featureUtils.js +1 -1
- package/popup/types.d.ts +193 -8
- package/portal/schemas/definitions.js +1 -1
- package/renderers/ClassBreaksRenderer.d.ts +1 -1
- package/renderers/DictionaryRenderer.d.ts +1 -1
- package/renderers/DotDensityRenderer.d.ts +3 -3
- package/renderers/FlowRenderer.d.ts +5 -5
- package/renderers/HeatmapRenderer.d.ts +3 -3
- package/renderers/PieChartRenderer.d.ts +1 -1
- package/renderers/RasterShadedReliefRenderer.d.ts +1 -1
- package/renderers/Renderer.d.ts +4 -4
- package/renderers/SimpleRenderer.d.ts +2 -2
- package/renderers/UniqueValueRenderer.d.ts +2 -2
- package/renderers/VectorFieldRenderer.d.ts +1 -1
- package/renderers/mixins/VisualVariablesMixin.d.ts +12 -12
- package/renderers/visualVariables/ColorVariable.d.ts +1 -1
- package/renderers/visualVariables/OpacityVariable.d.ts +1 -1
- package/renderers/visualVariables/RotationVariable.d.ts +1 -1
- package/renderers/visualVariables/SizeVariable.d.ts +1 -1
- package/renderers/visualVariables/VisualVariable.d.ts +1 -1
- package/rest/query/support/AttachmentInfo.d.ts +1 -1
- package/rest/support/AttributeBinsQuery.d.ts +8 -8
- package/rest/support/AutoIntervalBinParameters.d.ts +1 -1
- package/rest/support/DateBinParameters.d.ts +1 -1
- package/rest/support/FixedBoundariesBinParameters.d.ts +1 -1
- package/rest/support/FixedIntervalBinParameters.d.ts +1 -1
- package/rest/support/Query.d.ts +8 -8
- package/rest/support/TopFeaturesQuery.d.ts +8 -8
- package/smartMapping/labels/clusters.d.ts +1 -1
- package/smartMapping/popup/clusters.d.ts +2 -2
- package/smartMapping/popup/templates.d.ts +1 -1
- package/smartMapping/raster/renderers/flow.d.ts +2 -2
- package/smartMapping/renderers/color.d.ts +12 -12
- package/smartMapping/renderers/predominance.d.ts +3 -3
- package/smartMapping/renderers/relationship.d.ts +15 -15
- package/smartMapping/renderers/univariateColorSize.d.ts +4 -4
- package/smartMapping/symbology/color.d.ts +4 -4
- package/smartMapping/symbology/flow.d.ts +2 -2
- package/smartMapping/symbology/types.d.ts +18 -18
- package/support/actions/ActionButton.d.ts +1 -1
- package/support/revision.js +1 -1
- package/symbols/CIMSymbol.d.ts +1 -1
- package/symbols/ExtrudeSymbol3DLayer.d.ts +1 -1
- package/symbols/FillSymbol3DLayer.d.ts +3 -3
- package/symbols/IconSymbol3DLayer.d.ts +1 -1
- package/symbols/LabelSymbol3D.d.ts +2 -2
- package/symbols/LineStyleMarker3D.d.ts +7 -7
- package/symbols/LineSymbol3D.d.ts +2 -2
- package/symbols/LineSymbol3DLayer.d.ts +7 -7
- package/symbols/LineSymbolMarker.d.ts +6 -6
- package/symbols/MarkerSymbol.d.ts +1 -1
- package/symbols/MeshSymbol3D.d.ts +2 -2
- package/symbols/ObjectSymbol3DLayer.d.ts +1 -1
- package/symbols/PathSymbol3DLayer.d.ts +14 -14
- package/symbols/PictureFillSymbol.d.ts +1 -1
- package/symbols/PictureMarkerSymbol.d.ts +1 -1
- package/symbols/PointSymbol3D.d.ts +3 -3
- package/symbols/PolygonSymbol3D.d.ts +5 -5
- package/symbols/SimpleFillSymbol.d.ts +8 -8
- package/symbols/SimpleLineSymbol.d.ts +20 -20
- package/symbols/SimpleMarkerSymbol.d.ts +7 -7
- package/symbols/Symbol3DLayer.d.ts +16 -16
- package/symbols/TextSymbol.d.ts +1 -1
- package/symbols/TextSymbol3DLayer.d.ts +1 -1
- package/symbols/WaterSymbol3DLayer.d.ts +3 -3
- package/symbols/WebStyleSymbol.d.ts +12 -12
- package/symbols/callouts/Callout3D.d.ts +1 -1
- package/symbols/callouts/LineCallout3D.d.ts +3 -3
- package/symbols/cim/types.d.ts +23 -23
- package/symbols/edges/Edges3D.d.ts +1 -1
- package/symbols/edges/SolidEdges3D.d.ts +1 -1
- package/symbols/patterns/LineStylePattern3D.d.ts +11 -11
- package/symbols/patterns/StylePattern3D.d.ts +8 -8
- package/symbols/support/ElevationInfo.d.ts +2 -2
- package/symbols/support/IconSymbol3DLayerResource.d.ts +6 -6
- package/symbols/support/ObjectSymbol3DLayerResource.d.ts +7 -7
- package/symbols/support/Symbol3DEmissive.d.ts +2 -2
- package/symbols/support/Symbol3DVerticalOffset.d.ts +2 -2
- package/views/2d/engine/flow/FlowStrategy.js +1 -1
- package/views/2d/engine/flow/styles/Imagery.js +1 -1
- package/views/2d/engine/flow/styles/Particles.js +1 -1
- package/views/2d/engine/flow/styles/Stack.js +1 -1
- package/views/2d/engine/flow/styles/Streamlines.js +1 -1
- package/views/2d/engine/vectorTiles/style/StyleLayer.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/BaseLayerViewGL2D.d.ts +1 -1
- package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
- package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
- package/views/2d/types.d.ts +3 -3
- package/views/3d/FocusAreasView.js +1 -1
- package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
- package/views/3d/environment/CloudyWeather.d.ts +1 -1
- package/views/3d/environment/Environment.d.ts +4 -4
- package/views/3d/environment/FoggyWeather.d.ts +1 -1
- package/views/3d/environment/RainyWeather.d.ts +1 -1
- package/views/3d/environment/SnowyWeather.d.ts +1 -1
- package/views/3d/environment/SunLighting.d.ts +1 -1
- package/views/3d/environment/SunnyWeather.d.ts +1 -1
- package/views/3d/environment/VirtualLighting.d.ts +1 -1
- package/views/3d/layers/graphics/extrudeUtils.js +1 -1
- package/views/3d/support/renderInfoUtils/polygon.js +1 -1
- package/views/3d/webgl/RenderNode.d.ts +2 -2
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
- package/views/3d/webgl-engine/lib/CutFillComputationRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/CutFillVisualizationRenderNode.js +1 -1
- package/views/3d/webgl.d.ts +1 -1
- package/views/Magnifier.d.ts +3 -3
- package/views/MapView.d.ts +7 -7
- package/views/SceneView.d.ts +16 -16
- package/views/View.d.ts +17 -3
- package/views/View.js +1 -1
- package/views/interactive/sketch/SketchLabelOptions.d.ts +1 -1
- package/views/interactive/sketch/SketchTooltipOptions.d.ts +1 -1
- package/views/interactive/snapping/SnappingOptions.d.ts +7 -7
- package/views/layers/LineOfSightLayerView.d.ts +3 -2
- package/views/support/HighlightOptions.d.ts +1 -1
- package/views/types.d.ts +59 -2
- package/views/ui/DefaultUI.d.ts +2 -2
- package/webscene/Environment.d.ts +10 -10
- package/webscene/Glow.d.ts +1 -1
- package/webscene/background/ColorBackground.d.ts +1 -1
- package/widgets/AreaMeasurement2D.d.ts +1 -1
- package/widgets/AreaMeasurement3D.d.ts +2 -2
- package/widgets/Attachments.d.ts +1 -1
- package/widgets/Attribution.d.ts +1 -1
- package/widgets/BasemapGallery.d.ts +1 -1
- package/widgets/BasemapLayerList.d.ts +3 -3
- package/widgets/BasemapToggle.d.ts +1 -1
- package/widgets/Bookmarks/BookmarksVisibleElements.d.ts +1 -1
- package/widgets/Bookmarks.d.ts +2 -2
- package/widgets/BuildingExplorer.d.ts +1 -1
- package/widgets/CatalogLayerList.d.ts +3 -3
- package/widgets/Compass.d.ts +2 -2
- package/widgets/CoordinateConversion.d.ts +1 -1
- package/widgets/Daylight.d.ts +5 -5
- package/widgets/DirectLineMeasurement3D.d.ts +2 -2
- package/widgets/Directions.d.ts +4 -4
- package/widgets/DistanceMeasurement2D.d.ts +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.d.ts +1 -1
- package/widgets/Editor.d.ts +8 -8
- package/widgets/ElevationProfile/ElevationProfileLineGround.d.ts +1 -1
- package/widgets/ElevationProfile/ElevationProfileLineInput.d.ts +1 -1
- package/widgets/ElevationProfile/ElevationProfileLineView.d.ts +1 -1
- package/widgets/ElevationProfile.d.ts +3 -3
- package/widgets/Expand.d.ts +1 -1
- package/widgets/FeatureForm.d.ts +1 -1
- package/widgets/FeatureTable/ActionColumn.d.ts +2 -2
- package/widgets/FeatureTable/AttachmentsColumn.d.ts +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.d.ts +3 -3
- package/widgets/FeatureTable/Grid/GroupColumn.d.ts +1 -1
- package/widgets/FeatureTable/RelationshipColumn.d.ts +1 -1
- package/widgets/FeatureTable/VisibleElements.d.ts +1 -1
- package/widgets/FeatureTable.d.ts +10 -10
- package/widgets/FeatureTemplates/FeatureTemplatesViewModel.d.ts +5 -5
- package/widgets/FeatureTemplates.d.ts +8 -8
- package/widgets/Features/FeaturesViewModel.d.ts +2 -2
- package/widgets/Features/FeaturesVisibleElements.d.ts +2 -2
- package/widgets/Features.d.ts +1 -1
- package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
- package/widgets/FloorFilter.d.ts +2 -2
- package/widgets/Histogram.d.ts +2 -2
- package/widgets/HistogramRangeSlider.d.ts +1 -1
- package/widgets/Home.d.ts +1 -1
- package/widgets/LayerList/ListItemPanel.d.ts +1 -1
- package/widgets/LayerList.d.ts +4 -4
- package/widgets/Legend.d.ts +8 -8
- package/widgets/LineOfSight.d.ts +1 -1
- package/widgets/Locate.d.ts +2 -2
- package/widgets/Measurement.d.ts +1 -1
- package/widgets/NavigationToggle/NavigationToggleViewModel.d.ts +1 -1
- package/widgets/NavigationToggle.d.ts +3 -3
- package/widgets/Popup/PopupVisibleElements.d.ts +2 -2
- package/widgets/Popup.d.ts +5 -5
- package/widgets/Print/CustomTemplate.d.ts +1 -1
- package/widgets/Print/TemplateOptions.d.ts +4 -4
- package/widgets/ScaleRangeSlider.d.ts +1 -1
- package/widgets/Search/SearchViewModel.d.ts +4 -4
- package/widgets/Search.d.ts +5 -5
- package/widgets/ShadowCast.d.ts +3 -3
- package/widgets/Sketch/SketchViewModel.d.ts +39 -39
- package/widgets/Sketch.d.ts +43 -43
- package/widgets/Slice.d.ts +2 -2
- package/widgets/Slider/SliderViewModel.d.ts +2 -2
- package/widgets/Slider.d.ts +9 -9
- package/widgets/Swipe/SwipeViewModel.d.ts +1 -1
- package/widgets/Swipe.d.ts +2 -2
- package/widgets/TableList/ListItemPanel.d.ts +1 -1
- package/widgets/TableList.d.ts +1 -1
- package/widgets/TimeSlider/TimeSliderViewModel.d.ts +10 -10
- package/widgets/TimeSlider/TimeSliderViewModel.js +1 -1
- package/widgets/TimeSlider/types.d.ts +1 -1
- package/widgets/TimeSlider.d.ts +13 -13
- package/widgets/Track.d.ts +2 -2
- package/widgets/UtilityNetworkAssociations.d.ts +3 -3
- package/widgets/UtilityNetworkTrace.d.ts +4 -4
- package/widgets/UtilityNetworkValidateTopology.d.ts +1 -1
- package/widgets/ValuePicker.d.ts +5 -5
- package/widgets/VideoPlayer.d.ts +1 -1
- package/widgets/smartMapping/ClassedColorSlider.d.ts +1 -1
- package/widgets/smartMapping/ClassedSizeSlider.d.ts +1 -1
- package/widgets/smartMapping/ColorSizeSlider.d.ts +2 -2
- package/widgets/smartMapping/ColorSlider.d.ts +1 -1
- package/widgets/smartMapping/HeatmapSlider.d.ts +1 -1
- package/widgets/smartMapping/OpacitySlider.d.ts +1 -1
- package/widgets/smartMapping/SizeSlider.d.ts +1 -1
- package/widgets/smartMapping/SmartMappingSliderBase.d.ts +4 -4
- package/widgets/smartMapping/SmartMappingSliderViewModel.d.ts +6 -6
- package/widgets/support/GridControls.d.ts +1 -1
- package/widgets/support/SnappingControls/VisibleElements.d.ts +1 -1
- package/widgets/support/SnappingControls.d.ts +6 -6
- package/assets/esri/core/workers/chunks/2aaeaf022af8493281dc.js +0 -1
- package/assets/esri/core/workers/chunks/2d92ba11781a3cfc3a78.js +0 -1
- package/assets/esri/core/workers/chunks/5c6e5f22450dd0583074.js +0 -1
- package/assets/esri/core/workers/chunks/75f7c1f600c4051bc905.js +0 -1
- package/assets/esri/core/workers/chunks/ee8cd91c27e9cdfc3b2e.js +0 -1
|
@@ -237,7 +237,7 @@ export interface FeatureReductionClusterProperties extends Partial<Pick<FeatureR
|
|
|
237
237
|
* };
|
|
238
238
|
* ```
|
|
239
239
|
*
|
|
240
|
-
* [](https://developers.arcgis.com/javascript/latest/sample-code/featurereduction-cluster/)
|
|
241
241
|
*
|
|
242
242
|
* ### Clusters by predominant type
|
|
243
243
|
*
|
|
@@ -260,7 +260,7 @@ export interface FeatureReductionClusterProperties extends Partial<Pick<FeatureR
|
|
|
260
260
|
* };
|
|
261
261
|
* ```
|
|
262
262
|
*
|
|
263
|
-
* [](https://developers.arcgis.com/javascript/latest/sample-code/featurereduction-cluster-filter/)
|
|
264
264
|
*
|
|
265
265
|
* ### Clusters with visual variables
|
|
266
266
|
*
|
|
@@ -300,7 +300,7 @@ export interface FeatureReductionClusterProperties extends Partial<Pick<FeatureR
|
|
|
300
300
|
* };
|
|
301
301
|
* ```
|
|
302
302
|
*
|
|
303
|
-
* [](https://developers.arcgis.com/javascript/latest/sample-code/featurereduction-cluster-visualvariables/)
|
|
304
304
|
*
|
|
305
305
|
* @see [clusterPopupTemplateCreator](https://developers.arcgis.com/javascript/latest/references/core/smartMapping/popup/clusters/)
|
|
306
306
|
* @see [Arcade Feature Reduction Popup Profile](https://developers.arcgis.com/javascript/latest/arcade/#feature-reduction-popup)
|
|
@@ -571,7 +571,7 @@ export interface FeatureReductionClusterProperties extends Partial<Pick<FeatureR
|
|
|
571
571
|
*
|
|
572
572
|
* Display all points | Display clustered features
|
|
573
573
|
* ---------------------|-------------------
|
|
574
|
-
* [](https://developers.arcgis.com/javascript/latest/sample-code/featurereduction-cluster/) | [](https://developers.arcgis.com/javascript/latest/sample-code/featurereduction-cluster/)
|
|
575
575
|
*
|
|
576
576
|
* ### Visual Variables
|
|
577
577
|
*
|
|
@@ -584,7 +584,7 @@ export interface FeatureReductionClusterProperties extends Partial<Pick<FeatureR
|
|
|
584
584
|
*
|
|
585
585
|
* Display all points | Display clustered features
|
|
586
586
|
* ---------------------|-------------------
|
|
587
|
-
* [](https://developers.arcgis.com/javascript/latest/sample-code/featurereduction-cluster-visualvariables/) | [](https://developers.arcgis.com/javascript/latest/sample-code/featurereduction-cluster-visualvariables/)
|
|
588
588
|
*
|
|
589
589
|
* ### Unique Value Renderer
|
|
590
590
|
*
|
|
@@ -596,7 +596,7 @@ export interface FeatureReductionClusterProperties extends Partial<Pick<FeatureR
|
|
|
596
596
|
*
|
|
597
597
|
* Display all points | Display clustered features
|
|
598
598
|
* ---------------------|-------------------
|
|
599
|
-
* [](https://developers.arcgis.com/javascript/latest/sample-code/featurereduction-cluster-filter/) | [](https://developers.arcgis.com/javascript/latest/sample-code/featurereduction-cluster-filter/)
|
|
600
600
|
*
|
|
601
601
|
* </details>
|
|
602
602
|
*
|
|
@@ -906,7 +906,7 @@ export default class FeatureReductionCluster extends FeatureReductionClusterSupe
|
|
|
906
906
|
* };
|
|
907
907
|
* ```
|
|
908
908
|
*
|
|
909
|
-
* [](https://developers.arcgis.com/javascript/latest/sample-code/featurereduction-cluster/)
|
|
910
910
|
*
|
|
911
911
|
* ### Clusters by predominant type
|
|
912
912
|
*
|
|
@@ -929,7 +929,7 @@ export default class FeatureReductionCluster extends FeatureReductionClusterSupe
|
|
|
929
929
|
* };
|
|
930
930
|
* ```
|
|
931
931
|
*
|
|
932
|
-
* [](https://developers.arcgis.com/javascript/latest/sample-code/featurereduction-cluster-filter/)
|
|
933
933
|
*
|
|
934
934
|
* ### Clusters with visual variables
|
|
935
935
|
*
|
|
@@ -969,7 +969,7 @@ export default class FeatureReductionCluster extends FeatureReductionClusterSupe
|
|
|
969
969
|
* };
|
|
970
970
|
* ```
|
|
971
971
|
*
|
|
972
|
-
* [](https://developers.arcgis.com/javascript/latest/sample-code/featurereduction-cluster-visualvariables/)
|
|
973
973
|
*
|
|
974
974
|
* @see [clusterPopupTemplateCreator](https://developers.arcgis.com/javascript/latest/references/core/smartMapping/popup/clusters/)
|
|
975
975
|
* @see [Arcade Feature Reduction Popup Profile](https://developers.arcgis.com/javascript/latest/arcade/#feature-reduction-popup)
|
|
@@ -7,7 +7,7 @@ export interface FeatureReductionSelectionProperties {}
|
|
|
7
7
|
* intersect on screen. Labeling also respects this option and hides labels
|
|
8
8
|
* that would otherwise overlap with the features of this layer.
|
|
9
9
|
*
|
|
10
|
-
* 
|
|
11
11
|
*
|
|
12
12
|
* > [!WARNING]
|
|
13
13
|
* >
|
|
@@ -173,7 +173,7 @@ export default class LabelClass extends JSONSupport {
|
|
|
173
173
|
*
|
|
174
174
|
* static (default) | none
|
|
175
175
|
* -----------------|------
|
|
176
|
-
*  | 
|
|
177
177
|
*
|
|
178
178
|
* When labeling clusters (or even sparsely distributed features) with small labels, it may be preferable to allow
|
|
179
179
|
* labels to slightly overlap since the information is still legible and doesn't significantly occlude the visualization.
|
|
@@ -181,7 +181,7 @@ export default class LabelClass extends JSONSupport {
|
|
|
181
181
|
*
|
|
182
182
|
* static (default) | none
|
|
183
183
|
* -----------------|------
|
|
184
|
-
*  | 
|
|
185
185
|
*
|
|
186
186
|
* </details>
|
|
187
187
|
*
|
|
@@ -10,7 +10,7 @@ export interface RasterFunctionProperties extends Partial<Pick<RasterFunction, "
|
|
|
10
10
|
* for a list of functions and their [arguments](https://developers.arcgis.com/javascript/latest/references/core/layers/support/RasterFunction/#functionArguments). The following image shows a landcover ImageryLayer rendered with two chained
|
|
11
11
|
* client-side raster functions used to reclass pixel values (Remap) and assign each pixel a new color (Colormap).
|
|
12
12
|
*
|
|
13
|
-
* [](https://developers.arcgis.com/javascript/latest/sample-code/layers-imagery-rasterfunction/)
|
|
14
14
|
*
|
|
15
15
|
* Chaining raster functions is accomplished by setting the Raster argument in the [functionArguments](https://developers.arcgis.com/javascript/latest/references/core/layers/support/RasterFunction/#functionArguments) property to another
|
|
16
16
|
* defined raster function. See example below on chaining a Remap raster function with a Colormap.
|
|
@@ -55,8 +55,8 @@ export default class SceneFilter extends JSONSupport {
|
|
|
55
55
|
*
|
|
56
56
|
* Illustration | Modification | Description
|
|
57
57
|
* ------|------------|--------
|
|
58
|
-
* <img src="https://developers.arcgis.com/javascript/latest/assets/references/core/layers/modification-clip.
|
|
59
|
-
* <img src="https://developers.arcgis.com/javascript/latest/assets/references/core/layers/modification-mask.
|
|
58
|
+
* <img src="https://developers.arcgis.com/javascript/latest/assets/references/core/layers/modification-clip.avif" alt="filter-type-disjoint" style="width:100px;"/>| <b>disjoint</b> - removes selected area | Remove portions of the scene layer. Use a polygon and don't draw the parts inside that polygon. For example to add another layer which shows a new development for that part of the city.
|
|
59
|
+
* <img src="https://developers.arcgis.com/javascript/latest/assets/references/core/layers/modification-mask.avif" alt="filter-type-contains" style="width:100px;"/> | <b>contains</b> - displays only selected area | Define an area of interest. Use a polygon and draw only parts of the scene layer inside that polygon. For example, to show only a portion of a scene layer within the boundaries of a city.
|
|
60
60
|
*
|
|
61
61
|
* @default "disjoint"
|
|
62
62
|
* @see [SceneLayer.filter](https://developers.arcgis.com/javascript/latest/references/core/layers/SceneLayer/#filter)
|
|
@@ -61,9 +61,9 @@ export default class SceneModification extends JSONSupport {
|
|
|
61
61
|
*
|
|
62
62
|
* Illustration | Modification | Description
|
|
63
63
|
* ------|------------|--------
|
|
64
|
-
* <img src="https://developers.arcgis.com/javascript/latest/assets/references/core/layers/modification-clip.
|
|
65
|
-
* <img src="https://developers.arcgis.com/javascript/latest/assets/references/core/layers/modification-mask.
|
|
66
|
-
* <img src="https://developers.arcgis.com/javascript/latest/assets/references/core/layers/modification-replace.
|
|
64
|
+
* <img src="https://developers.arcgis.com/javascript/latest/assets/references/core/layers/modification-clip.avif" alt="modification-type-clip" style="width:100px;"/>| <b>clip</b> - removes selected area | Clip-out portions of the integrated mesh to see features below. For example, utility work on gas or water lines in an area. Planners can create a scene in which the integrated mesh is clipped out at a site to expose the water or gas lines below it.
|
|
65
|
+
* <img src="https://developers.arcgis.com/javascript/latest/assets/references/core/layers/modification-mask.avif" alt="modification-type-mask" style="width:100px;"/> | <b>mask</b> - displays only selected area | Define an area of interest. Use a polygon and draw only parts of the integrated mesh inside that polygon. For example, if you want to show only a portion of an integrated mesh within the boundaries of a city.
|
|
66
|
+
* <img src="https://developers.arcgis.com/javascript/latest/assets/references/core/layers/modification-replace.avif" alt="modification-type-replace" style="width:100px;"/> | <b>replace</b> - flattens selected area |Replace an area of an integrated mesh based on a 3D polygon. For example, to add constructed buildings, flatten the integrated mesh at the footprint of a building so the new building can be visualized. Create different scenarios of the new construction area and share the scenarios as a web scene to discuss with stakeholders. The integrated mesh flattens to the minimum z-vertex of the modification polygon.
|
|
67
67
|
*
|
|
68
68
|
* @default "clip"
|
|
69
69
|
* @see [IntegratedMeshLayer.modifications](https://developers.arcgis.com/javascript/latest/references/core/layers/IntegratedMeshLayer/#modifications)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
const s={supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportsStackBy:!1,supportsSplitBy:!1,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!1,supportedStatistics:void 0,supportedNormalizationTypes:void 0},t={analytics:{supportsCacheHint:!1},attachment:{supportsContentType:!1,supportsExifInfo:!1,supportsKeywords:!1,supportsName:!1,supportsSize:!1,supportsCacheHint:!1,supportsOrderByFields:!1,supportsResize:!1,supportsTypeWildcard:!1},data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!1,supportsZ:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsTrueCurveUpdate:!1,supportsTrueCurveUpdateByTrueCurveClientsOnly:!0,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsAsyncApplyEdits:!1,zDefault:void 0},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryBins:!1,supportsQueryPivot:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:s,query:{maxRecordCount:0,maxRecordCountFactor:0,maxUniqueIDCount:0,relativeTimeBinWindow:0,standardMaxRecordCount:0,standardMaxRecordCountNoGeometry:0,supportsCacheHint:!1,supportsCentroid:!1,supportsCentroidOnDegeneratedQuantizedGeometry:!1,supportsCompactGeometry:!1,supportsCurrentUser:!1,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsFormatPBFWithCurves:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPaginationOnAggregatedQueries:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsSqlExpression:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsTrueCurve:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsStatistics:!1,tileMaxRecordCount:0}};export{t as zeroCapabilities,s as zeroQueryBins};
|
|
2
|
+
const s={supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportsStackBy:!1,supportsSplitBy:!1,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!1,supportedStatistics:void 0,supportedNormalizationTypes:void 0},t={analytics:{supportsCacheHint:!1},attachment:{supportsContentType:!1,supportsExifInfo:!1,supportsKeywords:!1,supportsName:!1,supportsSize:!1,supportsCacheHint:!1,supportsOrderByFields:!1,supportsResize:!1,supportsTypeWildcard:!1,supportsCountOnly:!1},data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!1,supportsZ:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsTrueCurveUpdate:!1,supportsTrueCurveUpdateByTrueCurveClientsOnly:!0,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsAsyncApplyEdits:!1,zDefault:void 0},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryBins:!1,supportsQueryPivot:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:s,query:{maxRecordCount:0,maxRecordCountFactor:0,maxUniqueIDCount:0,relativeTimeBinWindow:0,standardMaxRecordCount:0,standardMaxRecordCountNoGeometry:0,supportsCacheHint:!1,supportsCentroid:!1,supportsCentroidOnDegeneratedQuantizedGeometry:!1,supportsCompactGeometry:!1,supportsCurrentUser:!1,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsFormatPBFWithCurves:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPaginationOnAggregatedQueries:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsSqlExpression:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsTrueCurve:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsStatistics:!1,tileMaxRecordCount:0}};export{t as zeroCapabilities,s as zeroQueryBins};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{id as e}from"../../kernel.js";import{resultOrAbort as t}from"../../core/asyncUtils.js";import r from"../../core/Error.js";import{JSONMap as n}from"../../core/jsonMap.js";import{parseWhereClause as o}from"../../core/sql.js";import{normalizeGlobalID as i}from"../../core/uuid.js";import{createTypeReader as s}from"../../core/accessorSupport/extensions/serializableProperty/reader.js";import{isHostedAgolService as a}from"./arcgisLayerUrl.js";import u from"./CodedValue.js";import c from"./CodedValueDomain.js";import{queryAllJSON as l}from"./featureQueryAll.js";import{isStringField as p,isIntegerField as d}from"./fieldUtils.js";import{isLayerWithFeatureCapabilities as f,getOwningPortalUrl as y}from"./layerUtils.js";import m from"../../renderers/SimpleRenderer.js";import h from"../../renderers/UniqueValueRenderer.js";import w from"../../rest/support/AttachmentQuery.js";import{normalizationTypeJsonMap as b}from"../../rest/support/NormalizationBinParametersMixin.js";import g from"../../rest/support/Query.js";import I from"../../rest/support/RelationshipQuery.js";import{symbolTypesRenderer as j}from"../../symbols/support/typeUtils.js";const F=new n({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryMultiPatch:"multipatch"});async function x(e,t,n,o){const i=await J(e);if(await P(e,t,o),!i.addAttachment)throw new r(o,"Layer source does not support addAttachment capability");return i.addAttachment(t,n)}function P(e,t,n){const{attributes:o}=t,{objectIdField:i}=e;return e.capabilities?.data?.supportsAttachment?t?o?i&&o[i]?Promise.resolve():Promise.reject(new r(n,`feature is missing the identifying attribute ${i}`)):Promise.reject(new r(n,"'attributes' are required on a feature to query attachments")):Promise.reject(new r(n,"A feature is required to add/delete/update attachments")):Promise.reject(new r(n,"this layer doesn't support attachments"))}async function q(e,t,n,o,i){const s=await J(e);if(await P(e,t,i),!s.updateAttachment)throw new r(i,"Layer source does not support updateAttachment capability");return s.updateAttachment(t,n,o)}async function S(e,t,r){const{applyEdits:n}=await import("../graphics/editingSupport.js"),o=await e.load();let i=r;const{url:s,type:u,globalIdField:c}=o;return"feature"===u&&a(s)&&o.infoFor3D&&null!=t.deleteFeatures&&null!=c&&(i={...i,globalIdToObjectId:await oe(o,t.deleteFeatures,c)}),n(o,o.source,t,i)}async function v(e,t,r){const{uploadAssets:n}=await import("../graphics/editingSupport.js"),o=await e.load();return n(o,o.source,t,r)}async function L(e,t,n,o){const i=await J(e);if(await P(e,t,o),!i.deleteAttachments)throw new r(o,"Layer source does not support deleteAttachments capability");return i.deleteAttachments(t,n)}async function O(e,t,n){const o=(await e.load({signal:t?.signal})).source;if(!o.fetchRecomputedExtents)throw new r(n,"Layer source does not support fetchUpdates capability");return o.fetchRecomputedExtents(t)}async function A(e,t,n,o){let i=w.from(t);await e.load();const s=e.source,a=e.capabilities;if(!a?.data?.supportsAttachment)throw new r(o,"this layer doesn't support attachments");const{attachmentTypes:u,objectIds:c,globalIds:l,num:p,size:d,start:f,where:y}=i;if(!a?.operations?.supportsQueryAttachments){if(u?.length>0||l?.length>0||d?.length>0||p||f||y)throw new r(o,"when 'capabilities.operations.supportsQueryAttachments' is false, only objectIds is supported",i)}if(!(c?.length||l?.length||y))throw new r(o,"'objectIds', 'globalIds', or 'where' are required to perform attachment query",i);if(!s.queryAttachments)throw new r(o,"Layer source does not support queryAttachments capability",i);return!a?.attachment?.supportsOrderByFields&&i.orderByFields?.length&&(i=i.clone(),i.orderByFields=null),s.queryAttachments(i)}async function E(e,t,n,o){const i=await J(e);if(!i.queryObjectIds)throw new r(o,"Layer source does not support queryObjectIds capability");return i.queryObjectIds(g.from(t)??e.createQuery(),n)}async function D(e,t,n,o){const i=await J(e);if(!i.queryFeatureCount)throw new r(o,"Layer source does not support queryFeatureCount capability");return i.queryFeatureCount(g.from(t)??e.createQuery(),n)}async function T(e,t,n,o){const i=await J(e);if(!i.queryExtent)throw new r(o,"Layer source does not support queryExtent capability");return i.queryExtent(g.from(t)??e.createQuery(),n)}async function C(e,t,n,o){const i=await J(e);if(!i.queryRelatedFeatures)throw new r(o,"Layer source does not support queryRelatedFeatures capability");return i.queryRelatedFeatures(I.from(t),n)}async function B(e,t,n,o){const i=await J(e);if(!i.queryRelatedFeaturesCount)throw new r(o,"Layer source does not support queryRelatedFeaturesCount capability");return i.queryRelatedFeaturesCount(I.from(t),n)}async function R(e){const t=e.source;if(t?.refresh)try{const{dataChanged:r,updates:n}=await t.refresh();if(null!=n&&(e.sourceJSON={...e.sourceJSON,...n},e.read(n,{origin:"service",url:e.parsedUrl})),r)return!0}catch{}if(e.definitionExpression)try{return(await o(e.definitionExpression,e.fieldsIndex)).hasDateFunctions}catch{}return!1}function M(e){const t=new g;t.historicMoment=e.historicMoment,t.gdbVersion=e.gdbVersion,t.returnGeometry=!0,t.outFields=["*"],t.multipatchOption="multipatch"===e.geometryType?"xyFootprint":null;const r=e.capabilities?.query;r&&(t.compactGeometryEnabled=r.supportsCompactGeometry,t.defaultSpatialReferenceEnabled=r.supportsDefaultSpatialReference);const n=e.capabilities?.data;n?.supportsZ&&null!=e.returnZ&&(t.returnZ=e.returnZ),n?.supportsM&&null!=e.returnM&&(t.returnM=e.returnM);const{timeOffset:o,timeExtent:i}=e;return t.timeExtent=null!=o&&null!=i?i.offset(-o.value,o.unit):i||null,t}function k(e){const{globalIdField:t,fields:r}=e;if(t)return t;if(r)for(const n of r)if("esriFieldTypeGlobalID"===n.type)return n.name}function z(e){const{objectIdField:t,fields:r}=e;if(t)return t;if(r)for(const n of r)if("esriFieldTypeOID"===n.type)return n.name}function N(e){return e.currentVersion?e.currentVersion:e.hasOwnProperty("capabilities")||e.hasOwnProperty("drawingInfo")||e.hasOwnProperty("hasAttachments")||e.hasOwnProperty("htmlPopupType")||e.hasOwnProperty("relationships")||e.hasOwnProperty("timeInfo")||e.hasOwnProperty("typeIdField")||e.hasOwnProperty("types")?10:9.3}function U(e,t,r,n){const o=r?.feature,i=!!e.subtypes?.length;if(i&&!r?.excludeImpliedDomains){const r=V(e,t);if(r)return r}const s=i&&Q(e,o);if(s){const e=s?.domains?.[t];return"inherited"===e?.type?n:e}const a=ie(e.types,e.typeIdField,o);if(a){const e=a.domains&&a.domains[t];if(e&&"inherited"!==e?.type)return e}if(n)return n;if(!r?.excludeImpliedDomains){const r=G(e,t);if(r)return r}return null}function Q(e,t){const{subtypes:r,subtypeField:n}=e;if(!t?.attributes||!r?.length||!n)return null;const o=t.attributes[n];return null==o?null:r.find(e=>e.code===o)}function V(e,t){const{fieldsIndex:r,subtypeField:n}=e,{name:o,type:i}=r.get(t)??{};if(!o)return null;if((n&&r.get(n)?.name)===o&&e.subtypes?.length){const t=e.subtypes.map(e=>new u({code:$(e.code,i),name:e.name}));if(t?.length)return new c({codedValues:t})}return null}function G(e,t){const{fieldsIndex:r}=e,{name:n,type:o}=r.get(t)??{};if(!n)return null;if(("typeIdField"in e?r.get(e.typeIdField)?.name:null)===n&&"types"in e&&e.types?.length){const t=e.types.map(e=>new u({code:$(e.id,o),name:e.name}));return new c({codedValues:t})}return null}function $(e,t){return t?p({type:t})&&"number"==typeof e?`${e}`:d({type:t})&&"string"==typeof e?Number.parseInt(e,10):e:e}async function J(e){return(await e.load()).source}async function Z(t,r){if(!e)return;const n=e.findCredential(t);if(n)return n.userId;let o;try{const n=await y(t,r);n&&(o=await e.checkSignInStatus(`${n}/sharing`))}catch(i){}return o?o.userId:null}async function H(t,r){if(!e)return;if(e.findCredential(t))return;let n;try{const o=await y(t,r);o&&(n=await e.checkSignInStatus(`${o}/sharing`))}catch(o){}if(n)try{const n=null!=r?r.signal:null;await e.getCredential(t,{signal:n})}catch(o){}}async function W(e,t,r){const n=e.parsedUrl?.path;n&&e.authenticationTriggerEvent===t&&await H(n,r)}async function _(e){const t=e.parsedUrl?.path;t&&K(e)&&await H(t)}function K(e){return X(e)&&("serviceDefinitionExpression"in e&&Y(e.serviceDefinitionExpression)||"definitionExpression"in e&&Y(e.definitionExpression))}function X(e){return!(!f(e)||!e.capabilities?.query.supportsCurrentUser)}function Y(e){return!!e?.toLowerCase().includes("current_user")}function ee(e){return!se(e)&&(e.userHasUpdateItemPrivileges||e.editingEnabled)}const te=s({types:j});function re(e,t){if(e.defaultSymbol)return e.types?.length?new h({defaultSymbol:te(e.defaultSymbol,e,t),field:e.typeIdField,uniqueValueInfos:e.types.map(e=>({id:e.id,symbol:te(e.symbol,e,t)}))}):new m({symbol:te(e.defaultSymbol,e,t)})}function ne(e){let t=e.sourceJSON?.cacheMaxAge;if(!t)return!1;const r=e.editingInfo?.lastEditDate?.getTime();return null==r||(t*=1e3,Date.now()-r<t)}async function oe(e,r,n){if(null==r)return null;const o=[],{objectIdField:s}=e;if(r.forEach(e=>{let t=null;if("attributes"in e){const{attributes:r}=e;t={globalId:r[n],objectId:null!=r[s]&&-1!==r[s]?r[s]:null}}else t={globalId:e.globalId,objectId:null!=e.objectId&&-1!==e.objectId?e.objectId:null};null!=t.globalId&&(null!=t.objectId&&-1!==t.objectId||o.push(t.globalId))}),0===o.length)return null;const a=e.createQuery();a.where=o.map(e=>`${n}='${e}'`).join(" OR "),a.returnGeometry=!1,a.outFields=[s,n],a.cacheHint=!1;const u=await t(l(e,a));if(!u.ok)return null;const c=new Map,p=u.value.features;for(const t of p){const e=t.attributes[n],r=t.attributes[s];null!=e&&null!=r&&-1!==r&&c.set(i(e),r)}return c}function ie(e,t,r){if(!t||!r||!e)return null;const n=r.getAttribute(t);return null==n?null:e.find(e=>{const{id:t}=e;return null!=t&&t.toString()===n.toString()})??null}function se(e){return e.sourceJSON?.isMultiServicesView||ae(e)}function ae(e){return!!e.sourceJSON?.capabilities?.toLowerCase().split(",").map(e=>e.trim()).includes("map")}function ue(e,t,n){const o=t?.queryAttributeBins;if(!t?.operations?.supportsQueryBins||!o)throw new r(n,"Layer source does not support binning");switch(e.binParameters?.type){case"auto-interval":if(!o.supportsAutoInterval)throw new r(n,"Layer source does not support auto-interval binning");if(e.binParameters.normalizationType&&(!o.supportsNormalization||!ce(e.binParameters.normalizationType,o.supportedNormalizationTypes)))throw new r(n,"Layer source does not support normalization binning");break;case"date":if(!o.supportsDate)throw new r(n,"Layer source does not support date binning");if(e.binParameters.snapToData&&!o.supportsSnapToData)throw new r(n,"Layer source does not support snapToData binning");if(e.binParameters.returnFullIntervalBin&&!o.supportsReturnFullIntervalBin)throw new r(n,"Layer source does not support returnFullIntervalBin binning");break;case"fixed-boundaries":if(!o.supportsFixedBoundaries)throw new r(n,"Layer source does not support fixed-boundaries binning");break;case"fixed-interval":if(!o.supportsFixedInterval)throw new r(n,"Layer source does not support fixed-interval binning");if(e.binParameters.normalizationType&&(!o.supportsNormalization||!ce(e.binParameters.normalizationType,o.supportedNormalizationTypes)))throw new r(n,"Layer source does not support normalization binning")}if(e.binParameters?.stackBy&&!o.supportsStackBy)throw new r(n,"Layer source does not support stackBy binning");if(e.binParameters?.splitBy&&!o.supportsSplitBy)throw new r(n,"Layer source does not support splitBy binning");if(e.binParameters?.firstDayOfWeek&&!o.supportsFirstDayOfWeek)throw new r(n,"Layer source does not support firstDayOfWeek binning");const i=o?.supportedStatistics;if(e.outStatistics&&i){const t=new Map([["count","count"],["sum","sum"],["min","min"],["max","max"],["avg","avg"],["stddev","stddev"],["var","var"],["percentile-continuous","percentileContinuous"],["percentile-discrete","percentileDiscrete"],["centroid-aggregate","centroid"],["convex-hull-aggregate","convexHull"],["envelope-aggregate","envelope"]]);for(const{statisticType:o}of e.outStatistics){const e=t.get(o);if(e&&!i[e])throw new r(n,`Layer source does not support ${o} statistic type`)}}}function ce(e,t){return null!=e&&!!t?.[b.toJSON(e)]}export{x as addAttachment,S as applyEdits,_ as checkServiceCurrentUserSupport,V as computeDomainFromSubtypes,G as computeDomainFromTypes,ee as computeEffectiveEditingEnabled,re as createDefaultRenderer,M as createQuery,L as deleteAttachments,H as ensureCredentialIfSignedIn,W as ensureLayerCredential,O as fetchRecomputedExtents,F as geometryTypeKebabDict,Q as getFeatureSubtype,ie as getFeatureType,U as getFieldDomain,oe as getGlobalIdToObjectIdMap,Z as getSignedInUser,Y as hasCurrentUser,R as hasDataChanged,ne as isLayerCacheStale,A as queryAttachments,T as queryExtent,D as queryFeatureCount,E as queryObjectIds,C as queryRelatedFeatures,B as queryRelatedFeaturesCount,k as readGlobalIdField,z as readObjectIdField,N as readVersion,se as supportsQueryOnly,q as updateAttachment,v as uploadAssets,ue as validateBinsQuery};
|
|
2
|
+
import{id as e}from"../../kernel.js";import{resultOrAbort as t}from"../../core/asyncUtils.js";import r from"../../core/Error.js";import{JSONMap as n}from"../../core/jsonMap.js";import o from"../../core/Logger.js";import{parseWhereClause as i}from"../../core/sql.js";import{normalizeGlobalID as s}from"../../core/uuid.js";import{createTypeReader as a}from"../../core/accessorSupport/extensions/serializableProperty/reader.js";import{isHostedAgolService as u}from"./arcgisLayerUrl.js";import c from"./CodedValue.js";import l from"./CodedValueDomain.js";import{queryAllJSON as p}from"./featureQueryAll.js";import{isStringField as d,isIntegerField as f}from"./fieldUtils.js";import{isLayerWithFeatureCapabilities as y,getOwningPortalUrl as m}from"./layerUtils.js";import h from"../../renderers/SimpleRenderer.js";import w from"../../renderers/UniqueValueRenderer.js";import b from"../../rest/support/AttachmentQuery.js";import{normalizationTypeJsonMap as g}from"../../rest/support/NormalizationBinParametersMixin.js";import I from"../../rest/support/Query.js";import j from"../../rest/support/RelationshipQuery.js";import{symbolTypesRenderer as F}from"../../symbols/support/typeUtils.js";const x=()=>o.getLogger("esri.layers.support.featureLayerUtils"),P=new n({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryMultiPatch:"multipatch"});async function S(e,t,n,o){const i=await W(e);if(await q(e,t,o),!i.addAttachment)throw new r(o,"Layer source does not support addAttachment capability");return i.addAttachment(t,n)}function q(e,t,n){const{attributes:o}=t,{objectIdField:i}=e;return e.capabilities?.data?.supportsAttachment?t?o?i&&o[i]?Promise.resolve():Promise.reject(new r(n,`feature is missing the identifying attribute ${i}`)):Promise.reject(new r(n,"'attributes' are required on a feature to query attachments")):Promise.reject(new r(n,"A feature is required to add/delete/update attachments")):Promise.reject(new r(n,"this layer doesn't support attachments"))}async function v(e,t,n,o,i){const s=await W(e);if(await q(e,t,i),!s.updateAttachment)throw new r(i,"Layer source does not support updateAttachment capability");return s.updateAttachment(t,n,o)}async function L(e,t,r){const{applyEdits:n}=await import("../graphics/editingSupport.js"),o=await e.load();let i=r;const{url:s,type:a,globalIdField:c}=o;return"feature"===a&&u(s)&&o.infoFor3D&&null!=t.deleteFeatures&&null!=c&&(i={...i,globalIdToObjectId:await ae(o,t.deleteFeatures,c)}),n(o,o.source,t,i)}async function O(e,t,r){const{uploadAssets:n}=await import("../graphics/editingSupport.js"),o=await e.load();return n(o,o.source,t,r)}async function A(e,t,n,o){const i=await W(e);if(await q(e,t,o),!i.deleteAttachments)throw new r(o,"Layer source does not support deleteAttachments capability");return i.deleteAttachments(t,n)}async function E(e,t,n){const o=(await e.load({signal:t?.signal})).source;if(!o.fetchRecomputedExtents)throw new r(n,"Layer source does not support fetchUpdates capability");return o.fetchRecomputedExtents(t)}async function D(e,t,n,o){let i=b.from(t);await e.load();const s=e.source,a=e.capabilities;if(!a?.data?.supportsAttachment)throw new r(o,"this layer doesn't support attachments");const{attachmentTypes:u,objectIds:c,globalIds:l,num:p,size:d,start:f,where:y}=i;if(!a?.operations?.supportsQueryAttachments){if(u?.length>0||l?.length>0||d?.length>0||p||f||y)throw new r(o,"when 'capabilities.operations.supportsQueryAttachments' is false, only objectIds is supported",i)}if(!(c?.length||l?.length||y))throw new r(o,"'objectIds', 'globalIds', or 'where' are required to perform attachment query",i);if(!s.queryAttachments)throw new r(o,"Layer source does not support queryAttachments capability",i);return!a?.attachment?.supportsOrderByFields&&i.orderByFields?.length&&(i=i.clone(),i.orderByFields=null),s.queryAttachments(i)}async function T(e,t,n,o){const i=await W(e);if(!i.queryObjectIds)throw new r(o,"Layer source does not support queryObjectIds capability");return i.queryObjectIds(I.from(t)??e.createQuery(),n)}async function C(e,t,n,o){const i=await W(e);if(!i.queryFeatureCount)throw new r(o,"Layer source does not support queryFeatureCount capability");return i.queryFeatureCount(I.from(t)??e.createQuery(),n)}async function B(e,t,n,o){const i=await W(e);if(!i.queryExtent)throw new r(o,"Layer source does not support queryExtent capability");return i.queryExtent(I.from(t)??e.createQuery(),n)}async function R(e,t,n,o){const i=await W(e);if(!i.queryRelatedFeatures)throw new r(o,"Layer source does not support queryRelatedFeatures capability");return i.queryRelatedFeatures(j.from(t),n)}async function M(e,t,n,o){const i=await W(e);if(!i.queryRelatedFeaturesCount)throw new r(o,"Layer source does not support queryRelatedFeaturesCount capability");return i.queryRelatedFeaturesCount(j.from(t),n)}async function k(e){const t=e.source;if(t?.refresh)try{const{dataChanged:r,updates:n}=await t.refresh();if(null!=n&&(e.sourceJSON={...e.sourceJSON,...n},e.read(n,{origin:"service",url:e.parsedUrl})),r)return!0}catch{}if(e.definitionExpression)try{return(await i(e.definitionExpression,e.fieldsIndex)).hasDateFunctions}catch{}return!1}function z(e){const t=new I;t.historicMoment=e.historicMoment,t.gdbVersion=e.gdbVersion,t.returnGeometry=!0,t.outFields=["*"],t.multipatchOption="multipatch"===e.geometryType?"xyFootprint":null;const r=e.capabilities?.query;r&&(t.compactGeometryEnabled=r.supportsCompactGeometry,t.defaultSpatialReferenceEnabled=r.supportsDefaultSpatialReference);const n=e.capabilities?.data;n?.supportsZ&&null!=e.returnZ&&(t.returnZ=e.returnZ),n?.supportsM&&null!=e.returnM&&(t.returnM=e.returnM);const{timeOffset:o,timeExtent:i}=e;return t.timeExtent=null!=o&&null!=i?i.offset(-o.value,o.unit):i||null,t}function U(e){const{globalIdField:t,fields:r}=e;if(t)return t;if(r)for(const n of r)if("esriFieldTypeGlobalID"===n.type)return n.name}function N(e){const{objectIdField:t,fields:r}=e;if(t)return t;if(r)for(const n of r)if("esriFieldTypeOID"===n.type)return n.name}function Q(e){return e.currentVersion?e.currentVersion:e.hasOwnProperty("capabilities")||e.hasOwnProperty("drawingInfo")||e.hasOwnProperty("hasAttachments")||e.hasOwnProperty("htmlPopupType")||e.hasOwnProperty("relationships")||e.hasOwnProperty("timeInfo")||e.hasOwnProperty("typeIdField")||e.hasOwnProperty("types")?10:9.3}function V(e,t,r,n){const o=r?.feature,i=!!e.subtypes?.length;if(i&&!r?.excludeImpliedDomains){const r=$(e,t);if(r)return r}const s=i&&G(e,o);if(s){const e=s?.domains?.[t];return"inherited"===e?.type?n:e}const a=ue(e.types,e.typeIdField,o);if(a){const e=a.domains&&a.domains[t];if(e&&"inherited"!==e?.type)return e}if(n)return n;if(!r?.excludeImpliedDomains){const r=J(e,t);if(r)return r}return null}function G(e,t){const{subtypes:r,subtypeField:n}=e;if(!t?.attributes||!r?.length||!n)return null;const o=t.attributes[n];return null==o?null:r.find(e=>e.code===o)}function $(e,t){const{fieldsIndex:r,subtypeField:n}=e,{name:o,type:i}=r.get(t)??{};if(!o)return null;if((n&&r.get(n)?.name)===o&&e.subtypes?.length){const t=e.subtypes.map(e=>new c({code:H(e.code,i),name:e.name}));if(t?.length)return new l({codedValues:t})}return null}function J(e,t){const{fieldsIndex:r}=e,{name:n,type:o}=r.get(t)??{};if(!n)return null;if(("typeIdField"in e?r.get(e.typeIdField)?.name:null)===n&&"types"in e&&e.types?.length&&Z(e.types)){const t=e.types?.map(e=>new c({code:H(e.id,o),name:e.name}));return new l({codedValues:t})}return null}function Z(e){const t=new Set,r=new Set;for(const n of e){if(t.has(n.id)||r.has(n.name))return!1;t.add(n.id),r.add(n.name)}return!0}function H(e,t){return t?d({type:t})&&"number"==typeof e?`${e}`:f({type:t})&&"string"==typeof e?Number.parseInt(e,10):e:e}async function W(e){return(await e.load()).source}async function _(t,r){if(!e)return;const n=e.findCredential(t);if(n)return n.userId;let o;try{const n=await m(t,r);n&&(o=await e.checkSignInStatus(`${n}/sharing`))}catch(i){}return o?o.userId:null}async function K(t,r){if(!e)return;if(e.findCredential(t))return;let n;try{const o=await m(t,r);o&&(n=await e.checkSignInStatus(`${o}/sharing`))}catch(o){}if(n)try{const n=null!=r?r.signal:null;await e.getCredential(t,{signal:n})}catch(o){}}async function X(e,t,r){const n=e.parsedUrl?.path;n&&e.authenticationTriggerEvent===t&&await K(n,r)}async function Y(e){const t=e.parsedUrl?.path;t&&ee(e)&&await K(t)}function ee(e){return te(e)&&("serviceDefinitionExpression"in e&&re(e.serviceDefinitionExpression)||"definitionExpression"in e&&re(e.definitionExpression))}function te(e){return!(!y(e)||!e.capabilities?.query.supportsCurrentUser)}function re(e){return!!e?.toLowerCase().includes("current_user")}function ne(e){return!ce(e)&&(e.userHasUpdateItemPrivileges||e.editingEnabled)}const oe=a({types:F});function ie(e,t){if(e.defaultSymbol)return e.types?.length?new w({defaultSymbol:oe(e.defaultSymbol,e,t),field:e.typeIdField,uniqueValueInfos:e.types.map(e=>({id:e.id,symbol:oe(e.symbol,e,t)}))}):new h({symbol:oe(e.defaultSymbol,e,t)})}function se(e){let t=e.sourceJSON?.cacheMaxAge;if(!t)return!1;const r=e.editingInfo?.lastEditDate?.getTime();return null==r||(t*=1e3,Date.now()-r<t)}async function ae(e,r,n){if(null==r)return null;const o=[],{objectIdField:i}=e;if(r.forEach(e=>{let t=null;if("attributes"in e){const{attributes:r}=e;t={globalId:r[n],objectId:null!=r[i]&&-1!==r[i]?r[i]:null}}else t={globalId:e.globalId,objectId:null!=e.objectId&&-1!==e.objectId?e.objectId:null};null!=t.globalId&&(null!=t.objectId&&-1!==t.objectId||o.push(t.globalId))}),0===o.length)return null;const a=e.createQuery();a.where=o.map(e=>`${n}='${e}'`).join(" OR "),a.returnGeometry=!1,a.outFields=[i,n],a.cacheHint=!1;const u=await t(p(e,a));if(!u.ok)return null;const c=new Map,l=u.value.features;for(const t of l){const e=t.attributes[n],r=t.attributes[i];null!=e&&null!=r&&-1!==r&&c.set(s(e),r)}return c}function ue(e,t,r){if(!t||!r||!e)return null;const n=r.getAttribute(t);if(null==n)return null;const o=e.filter(e=>{const{id:t}=e;return null!=t&&t.toString()===n.toString()});return o.length>1&&x().warn("getFeatureType",`Cannot unambiguously determine feature type because multiple types have the id ${n}.`),o[0]??null}function ce(e){return e.sourceJSON?.isMultiServicesView||le(e)}function le(e){return!!e.sourceJSON?.capabilities?.toLowerCase().split(",").map(e=>e.trim()).includes("map")}function pe(e,t,n){const o=t?.queryAttributeBins;if(!t?.operations?.supportsQueryBins||!o)throw new r(n,"Layer source does not support binning");switch(e.binParameters?.type){case"auto-interval":if(!o.supportsAutoInterval)throw new r(n,"Layer source does not support auto-interval binning");if(e.binParameters.normalizationType&&(!o.supportsNormalization||!de(e.binParameters.normalizationType,o.supportedNormalizationTypes)))throw new r(n,"Layer source does not support normalization binning");break;case"date":if(!o.supportsDate)throw new r(n,"Layer source does not support date binning");if(e.binParameters.snapToData&&!o.supportsSnapToData)throw new r(n,"Layer source does not support snapToData binning");if(e.binParameters.returnFullIntervalBin&&!o.supportsReturnFullIntervalBin)throw new r(n,"Layer source does not support returnFullIntervalBin binning");break;case"fixed-boundaries":if(!o.supportsFixedBoundaries)throw new r(n,"Layer source does not support fixed-boundaries binning");break;case"fixed-interval":if(!o.supportsFixedInterval)throw new r(n,"Layer source does not support fixed-interval binning");if(e.binParameters.normalizationType&&(!o.supportsNormalization||!de(e.binParameters.normalizationType,o.supportedNormalizationTypes)))throw new r(n,"Layer source does not support normalization binning")}if(e.binParameters?.stackBy&&!o.supportsStackBy)throw new r(n,"Layer source does not support stackBy binning");if(e.binParameters?.splitBy&&!o.supportsSplitBy)throw new r(n,"Layer source does not support splitBy binning");if(e.binParameters?.firstDayOfWeek&&!o.supportsFirstDayOfWeek)throw new r(n,"Layer source does not support firstDayOfWeek binning");const i=o?.supportedStatistics;if(e.outStatistics&&i){const t=new Map([["count","count"],["sum","sum"],["min","min"],["max","max"],["avg","avg"],["stddev","stddev"],["var","var"],["percentile-continuous","percentileContinuous"],["percentile-discrete","percentileDiscrete"],["centroid-aggregate","centroid"],["convex-hull-aggregate","convexHull"],["envelope-aggregate","envelope"]]);for(const{statisticType:o}of e.outStatistics){const e=t.get(o);if(e&&!i[e])throw new r(n,`Layer source does not support ${o} statistic type`)}}}function de(e,t){return null!=e&&!!t?.[g.toJSON(e)]}export{S as addAttachment,L as applyEdits,Y as checkServiceCurrentUserSupport,$ as computeDomainFromSubtypes,J as computeDomainFromTypes,ne as computeEffectiveEditingEnabled,ie as createDefaultRenderer,z as createQuery,A as deleteAttachments,K as ensureCredentialIfSignedIn,X as ensureLayerCredential,E as fetchRecomputedExtents,P as geometryTypeKebabDict,G as getFeatureSubtype,ue as getFeatureType,V as getFieldDomain,ae as getGlobalIdToObjectIdMap,_ as getSignedInUser,re as hasCurrentUser,k as hasDataChanged,se as isLayerCacheStale,D as queryAttachments,B as queryExtent,C as queryFeatureCount,T as queryObjectIds,R as queryRelatedFeatures,M as queryRelatedFeaturesCount,U as readGlobalIdField,N as readObjectIdField,Q as readVersion,ce as supportsQueryOnly,Z as typesHaveUniqueIdsAndNames,v as updateAttachment,O as uploadAssets,pe as validateBinsQuery};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{isSome as t}from"../../core/arrayUtils.js";import has from"../../core/has.js";import{curveTypeDict as e}from"../../geometry/support/typeUtils.js";import{isHostedAgolService as s,parse as r}from"./arcgisLayerUrl.js";import{getGltfQueryFormat as p}from"./infoFor3D.js";import{getRelativeTimeQueryBinWindowSize as o}from"./relativeTimeQueryUtils.js";import{readNumber as u,readBoolean as i}from"../../rest/support/jsonUtils.js";const a={name:"supportsName",size:"supportsSize",contentType:"supportsContentType",keywords:"supportsKeywords",exifInfo:"supportsExifInfo"},n=["cubic-bezier","circular-arc","elliptic-arc"];function c(t){const e=t?.supportedSpatialAggregationStatistics?.map(t=>t.toLowerCase());return{envelope:!!e?.includes("envelopeaggregate"),centroid:!!e?.includes("centroidaggregate"),convexHull:!!e?.includes("convexhullaggregate")}}function d(t,e){const s=t?.supportedOperationsWithCacheHint?.map(t=>t.toLowerCase());return!!s?.includes(e.toLowerCase())}function l(t){const e=t?.supportedStatisticTypes?.map(t=>t.toLowerCase());return{count:!!e?.includes("count"),sum:!!e?.includes("sum"),min:!!e?.includes("min"),max:!!e?.includes("max"),avg:!!e?.includes("avg"),var:!!e?.includes("var"),stddev:!!e?.includes("stddev"),percentileContinuous:!!e?.includes("percentile_cont"),percentileDiscrete:!!e?.includes("percentile_disc"),envelope:!!e?.includes("envelopeaggregate"),centroid:!!e?.includes("centroidaggregate"),convexHull:!!e?.includes("convexhullaggregate")}}function y(t){const e=t?.supportedNormalizationTypes?.map(t=>t.toLowerCase());return{field:!!e?.includes("field"),log:!!e?.includes("log"),naturalLog:!!e?.includes("naturallog"),percentOfTotal:!!e?.includes("percentoftotal"),squareRoot:!!e?.includes("squareroot")}}function m(t){if(!has("featurelayer-pbf-true-curves"))return!1;return(t.supportedTrueCurvePbfFeatureEncodings??[]).includes("esriDefault")}function C(t,e){return{analytics:v(t),attachment:g(t),data:f(t),metadata:h(t),operations:Q(t.capabilities,t,e),query:A(t,e),queryAttributeBins:x(t),queryRelated:S(t),queryTopFeatures:T(t),editing:F(t)}}function v(t){return{supportsCacheHint:d(t.advancedQueryCapabilities,"queryAnalytics")}}function g(t){const e=t.attachmentProperties,s={supportsName:!1,supportsSize:!1,supportsContentType:!1,supportsKeywords:!1,supportsExifInfo:!1,supportsCacheHint:d(t.advancedQueryCapabilities,"queryAttachments"),supportsOrderByFields:i(t.advancedQueryCapabilities,"supportsQueryAttachmentOrderByFields",!1),supportsResize:i(t,"supportsAttachmentsResizing",!1),supportsTypeWildcard:i(t.advancedQueryCapabilities,"supportsQueryAttachmentWithTypeWildcard",!1)};return e&&Array.isArray(e)&&e.forEach(t=>{const e=a[t.name];e&&(s[e]=!!t.isEnabled)}),s}function f(t){const e=i(t.advancedQueryCapabilities,"supportsTrueCurve",!1);return{isVersioned:i(t,"isDataVersioned",!1),isBranchVersioned:i(t,"isDataBranchVersioned",!1),supportsAttachment:i(t,"hasAttachments",!1),supportsM:i(t,"hasM",!1),supportsTrueCurve:e,supportedCurveTypes:R(t,e),supportsZ:i(t,"hasZ",!1)}}function h(t){return{supportsAdvancedFieldProperties:i(t,"supportsFieldDescriptionProperty",!1)}}function Q(t,e,p){const o=s(p),u=t?.toLowerCase().split(",").map(t=>t.trim())??[],a=p?r(p):null,n=u.includes("MapServer"===a?.serverType?"data":"query"),c=u.includes("editing")&&!e.datesInUnknownTimezone&&!(!0===e.uniqueIdInfo?.OIDFieldContainsHashValue);let d=c&&u.includes("create"),l=c&&u.includes("delete"),y=c&&u.includes("update");const m=u.includes("changetracking"),C=e.advancedQueryCapabilities;let v=i(e,"supportsExceedsLimitStatistics",!1);if(!o){i(C,"supportsUseEstimateForExceedsLimit",!1)||(v=!1)}return c&&!(d||l||y)&&(d=l=y=!0),{supportsCalculate:i(e,"supportsCalculate",!1),supportsTruncate:i(e,"supportsTruncate",!1),supportsValidateSql:i(e,"supportsValidateSql",!1),supportsAdd:d,supportsDelete:l,supportsEditing:c,supportsChangeTracking:m,supportsQuery:n,supportsQueryAnalytics:i(C,"supportsQueryAnalytic",!1),supportsQueryAttachments:i(C,"supportsQueryAttachments",!1),supportsQueryBins:i(C,"supportsQueryBins",!1)||!!e.queryBinsCapabilities,supportsQueryPivot:i(C,"supportsQueryPivot",!1),supportsQueryTopFeatures:i(C,"supportsTopFeaturesQuery",!1),supportsResizeAttachments:i(e,"supportsAttachmentsResizing",!1),supportsSync:u.includes("sync"),supportsUpdate:y,supportsExceedsLimitStatistics:v,supportsAsyncConvert3D:i(e,"supportsAsyncConvert3D",!1)}}function A(t,e){const r=t.advancedQueryCapabilities,a=t.ownershipBasedAccessControlForFeatures,n=t.archivingInfo,l=t.currentVersion,y=o(e,t.cacheMaxAge),C=e?.includes("MapServer"),v=!C||l>=has("mapserver-pbf-version-support"),g=s(e),f=new Set((t.supportedQueryFormats??"").split(",").map(t=>t.toLowerCase().trim())),h=v&&m(t);return{maxRecordCount:u(t,"maxRecordCount",void 0),maxRecordCountFactor:u(t,"maxRecordCountFactor",void 0),maxUniqueIDCount:u(t,"maxUniqueIDCount",void 0),relativeTimeBinWindow:y,standardMaxRecordCount:u(t,"standardMaxRecordCount",void 0),standardMaxRecordCountNoGeometry:u(t,"standardMaxRecordCountNoGeometry",void 0),supportedSpatialAggregationStatistics:c(r),supportsCacheHint:i(r,"supportsQueryWithCacheHint",!1)||d(r,"query"),supportsCentroid:i(r,"supportsReturningGeometryCentroid",!1),supportsCentroidOnDegeneratedQuantizedGeometry:g||null==e,supportsCompactGeometry:g,supportsCurrentUser:i(r,"supportsCurrentUserQueries",!1),supportsDefaultSpatialReference:i(r,"supportsDefaultSR",!1),supportsDegeneratedQuantizedGeometry:i(r,"supportsDegeneratedQuantizedGeometry",!1),supportsDisjointSpatialRelationship:i(r,"supportsDisjointSpatialRel",!1),supportsDistance:i(r,"supportsQueryWithDistance",!1),supportsDistinct:i(r,"supportsDistinct",t.supportsAdvancedQueries),supportsExtent:i(r,"supportsReturningQueryExtent",!1),supportsFormatPBF:v&&f.has("pbf"),supportsFormatPBFWithCurves:h,supportsFullTextSearch:i(r,"supportsFullTextSearch",!1),supportsGeometryProperties:i(r,"supportsReturningGeometryProperties",!1),supportsHavingClause:i(r,"supportsHavingClause",!1),supportsHistoricMoment:i(n,"supportsQueryWithHistoricMoment",!1),supportsMaxRecordCountFactor:i(r,"supportsMaxRecordCountFactor",!1),supportsOrderBy:i(r,"supportsOrderBy",t.supportsAdvancedQueries),supportsPagination:i(r,"supportsPagination",!1),supportsPaginationOnAggregatedQueries:i(r,"supportsPaginationOnAggregatedQueries",!1),supportsPercentileStatistics:i(r,"supportsPercentileStatistics",!1),supportsQuantization:i(t,"supportsCoordinatesQuantization",!1),supportsQuantizationEditMode:i(t,"supportsQuantizationEditMode",!1),supportsQueryByAnonymous:i(a,"allowAnonymousToQuery",!0),supportsQueryByOthers:i(a,"allowOthersToQuery",!0),supportsQueryGeometry:i(t,"supportsReturningQueryGeometry",!1),supportsResultType:i(r,"supportsQueryWithResultType",!1),supportsReturnMesh:!!p(t.infoFor3D),supportsSpatialAggregationStatistics:i(r,"supportsSpatialAggregationStatistics",!1),supportsSqlExpression:i(r,"supportsSqlExpression",!1),supportsStandardizedQueriesOnly:i(t,"useStandardizedQueries",!1),supportsStatistics:i(r,"supportsStatistics",t.supportsStatistics),supportsTopFeaturesQuery:i(r,"supportsTopFeaturesQuery",!1),supportsTrueCurve:i(r,"supportsTrueCurve",!1),tileMaxRecordCount:u(t,"tileMaxRecordCount",void 0)}}function S(t){const e=t.advancedQueryCapabilities,s=i(e,"supportsAdvancedQueryRelated",!1);return{supportsPagination:i(e,"supportsQueryRelatedPagination",!1),supportsCount:s,supportsOrderBy:s,supportsCacheHint:d(e,"queryRelated")}}function T(t){return{supportsCacheHint:d(t.advancedQueryCapabilities,"queryTopFilter")}}function x(t){const e=t?t.queryBinsCapabilities:void 0;return{supportsDate:i(e,"supportsDateBin",!1),supportsFixedInterval:i(e,"supportsFixedIntervalBin",!1),supportsAutoInterval:i(e,"supportsAutoIntervalBin",!1),supportsFixedBoundaries:i(e,"supportsFixedBoundariesBin",!1),supportsStackBy:i(e,"supportsStackBy",!1),supportsSplitBy:i(e,"supportsSplitBy",!1),supportsSnapToData:i(e,"supportsSnapToData",!1),supportsReturnFullIntervalBin:i(e,"supportsReturnFullIntervalBin",!1),supportsFirstDayOfWeek:i(e,"supportsFirstDayOfWeek",!1),supportsNormalization:i(e,"supportsNormalization",!1),supportedStatistics:l(e),supportedNormalizationTypes:y(e)}}function F(t){const e=t.ownershipBasedAccessControlForFeatures,s=t?t.advancedEditingCapabilities:void 0;return{supportsGeometryUpdate:i(t,"allowGeometryUpdates",!0),supportsGlobalId:i(t,"supportsApplyEditsWithGlobalIds",!1),supportsReturnServiceEditsInSourceSpatialReference:i(t,"supportsReturnServiceEditsInSourceSR",!1),supportsRollbackOnFailure:i(t,"supportsRollbackOnFailureParameter",!1),supportsTrueCurveUpdate:i(t,"allowTrueCurvesUpdates",!0),supportsTrueCurveUpdateByTrueCurveClientsOnly:i(t,"onlyAllowTrueCurveUpdatesByTrueCurveClients",!0),supportsUpdateWithoutM:i(t,"allowUpdateWithoutMValues",!1),supportsUploadWithItemId:i(t,"supportsAttachmentsByUploadId",!1),supportsDeleteByAnonymous:i(e,"allowAnonymousToDelete",!0),supportsDeleteByOthers:i(e,"allowOthersToDelete",!0),supportsUpdateByAnonymous:i(e,"allowAnonymousToUpdate",!0),supportsUpdateByOthers:i(e,"allowOthersToUpdate",!0),supportsAsyncApplyEdits:i(s,"supportsAsyncApplyEdits",!1),zDefault:u(t,"zDefault",void 0)}}function R(s,r){const p=s.supportedCurveTypes??s.advancedQueryCapabilities?.supportedCurveTypes;return Array.isArray(p)?p.map(t=>e.fromJSON(t)).filter(t):r?n:[]}function B(t){return{operations:{supportsAppend:i(t,"supportsAppend",!1),supportsCoverageQuery:t?.playbackInfo?.klv["0601"]??!1,supportsExportClip:i(t,"supportsExportClip",!1),supportsExportFrameset:i(t,"supportsExportFrameset",!1),supportsMensuration:i(t,"supportsMensuration",!1),supportsPreviews:i(t,"supportsPreviews",!1),supportsUpdate:i(t,"supportsUpdate",!1)}}}export{n as allCurveTypes,C as getFeatureLayerCapabilities,B as getVideoLayerCapabilities};
|
|
2
|
+
import{isSome as t}from"../../core/arrayUtils.js";import has from"../../core/has.js";import{curveTypeDict as e}from"../../geometry/support/typeUtils.js";import{isHostedAgolService as s,parse as r}from"./arcgisLayerUrl.js";import{getGltfQueryFormat as p}from"./infoFor3D.js";import{getRelativeTimeQueryBinWindowSize as o}from"./relativeTimeQueryUtils.js";import{readNumber as u,readBoolean as i}from"../../rest/support/jsonUtils.js";const a={name:"supportsName",size:"supportsSize",contentType:"supportsContentType",keywords:"supportsKeywords",exifInfo:"supportsExifInfo"},n=["cubic-bezier","circular-arc","elliptic-arc"];function c(t){const e=t?.supportedSpatialAggregationStatistics?.map(t=>t.toLowerCase());return{envelope:!!e?.includes("envelopeaggregate"),centroid:!!e?.includes("centroidaggregate"),convexHull:!!e?.includes("convexhullaggregate")}}function d(t,e){const s=t?.supportedOperationsWithCacheHint?.map(t=>t.toLowerCase());return!!s?.includes(e.toLowerCase())}function l(t){const e=t?.supportedStatisticTypes?.map(t=>t.toLowerCase());return{count:!!e?.includes("count"),sum:!!e?.includes("sum"),min:!!e?.includes("min"),max:!!e?.includes("max"),avg:!!e?.includes("avg"),var:!!e?.includes("var"),stddev:!!e?.includes("stddev"),percentileContinuous:!!e?.includes("percentile_cont"),percentileDiscrete:!!e?.includes("percentile_disc"),envelope:!!e?.includes("envelopeaggregate"),centroid:!!e?.includes("centroidaggregate"),convexHull:!!e?.includes("convexhullaggregate")}}function y(t){const e=t?.supportedNormalizationTypes?.map(t=>t.toLowerCase());return{field:!!e?.includes("field"),log:!!e?.includes("log"),naturalLog:!!e?.includes("naturallog"),percentOfTotal:!!e?.includes("percentoftotal"),squareRoot:!!e?.includes("squareroot")}}function m(t){if(!has("featurelayer-pbf-true-curves"))return!1;return(t.supportedTrueCurvePbfFeatureEncodings??[]).includes("esriDefault")}function C(t,e){return{analytics:v(t),attachment:g(t),data:f(t),metadata:h(t),operations:Q(t.capabilities,t,e),query:A(t,e),queryAttributeBins:x(t),queryRelated:S(t),queryTopFeatures:T(t),editing:F(t)}}function v(t){return{supportsCacheHint:d(t.advancedQueryCapabilities,"queryAnalytics")}}function g(t){const e=t.attachmentProperties,s={supportsName:!1,supportsSize:!1,supportsContentType:!1,supportsKeywords:!1,supportsExifInfo:!1,supportsCacheHint:d(t.advancedQueryCapabilities,"queryAttachments"),supportsOrderByFields:i(t.advancedQueryCapabilities,"supportsQueryAttachmentOrderByFields",!1),supportsResize:i(t,"supportsAttachmentsResizing",!1),supportsTypeWildcard:i(t.advancedQueryCapabilities,"supportsQueryAttachmentWithTypeWildcard",!1),supportsCountOnly:i(t.advancedQueryCapabilities,"supportsQueryAttachmentsCountOnly",!1)};return e&&Array.isArray(e)&&e.forEach(t=>{const e=a[t.name];e&&(s[e]=!!t.isEnabled)}),s}function f(t){const e=i(t.advancedQueryCapabilities,"supportsTrueCurve",!1);return{isVersioned:i(t,"isDataVersioned",!1),isBranchVersioned:i(t,"isDataBranchVersioned",!1),supportsAttachment:i(t,"hasAttachments",!1),supportsM:i(t,"hasM",!1),supportsTrueCurve:e,supportedCurveTypes:R(t,e),supportsZ:i(t,"hasZ",!1)}}function h(t){return{supportsAdvancedFieldProperties:i(t,"supportsFieldDescriptionProperty",!1)}}function Q(t,e,p){const o=s(p),u=t?.toLowerCase().split(",").map(t=>t.trim())??[],a=p?r(p):null,n=u.includes("MapServer"===a?.serverType?"data":"query"),c=u.includes("editing")&&!e.datesInUnknownTimezone&&!(!0===e.uniqueIdInfo?.OIDFieldContainsHashValue);let d=c&&u.includes("create"),l=c&&u.includes("delete"),y=c&&u.includes("update");const m=u.includes("changetracking"),C=e.advancedQueryCapabilities;let v=i(e,"supportsExceedsLimitStatistics",!1);if(!o){i(C,"supportsUseEstimateForExceedsLimit",!1)||(v=!1)}return c&&!(d||l||y)&&(d=l=y=!0),{supportsCalculate:i(e,"supportsCalculate",!1),supportsTruncate:i(e,"supportsTruncate",!1),supportsValidateSql:i(e,"supportsValidateSql",!1),supportsAdd:d,supportsDelete:l,supportsEditing:c,supportsChangeTracking:m,supportsQuery:n,supportsQueryAnalytics:i(C,"supportsQueryAnalytic",!1),supportsQueryAttachments:i(C,"supportsQueryAttachments",!1),supportsQueryBins:i(C,"supportsQueryBins",!1)||!!e.queryBinsCapabilities,supportsQueryPivot:i(C,"supportsQueryPivot",!1),supportsQueryTopFeatures:i(C,"supportsTopFeaturesQuery",!1),supportsResizeAttachments:i(e,"supportsAttachmentsResizing",!1),supportsSync:u.includes("sync"),supportsUpdate:y,supportsExceedsLimitStatistics:v,supportsAsyncConvert3D:i(e,"supportsAsyncConvert3D",!1)}}function A(t,e){const r=t.advancedQueryCapabilities,a=t.ownershipBasedAccessControlForFeatures,n=t.archivingInfo,l=t.currentVersion,y=o(e,t.cacheMaxAge),C=e?.includes("MapServer"),v=!C||l>=has("mapserver-pbf-version-support"),g=s(e),f=new Set((t.supportedQueryFormats??"").split(",").map(t=>t.toLowerCase().trim())),h=v&&m(t);return{maxRecordCount:u(t,"maxRecordCount",void 0),maxRecordCountFactor:u(t,"maxRecordCountFactor",void 0),maxUniqueIDCount:u(t,"maxUniqueIDCount",void 0),relativeTimeBinWindow:y,standardMaxRecordCount:u(t,"standardMaxRecordCount",void 0),standardMaxRecordCountNoGeometry:u(t,"standardMaxRecordCountNoGeometry",void 0),supportedSpatialAggregationStatistics:c(r),supportsCacheHint:i(r,"supportsQueryWithCacheHint",!1)||d(r,"query"),supportsCentroid:i(r,"supportsReturningGeometryCentroid",!1),supportsCentroidOnDegeneratedQuantizedGeometry:g||null==e,supportsCompactGeometry:g,supportsCurrentUser:i(r,"supportsCurrentUserQueries",!1),supportsDefaultSpatialReference:i(r,"supportsDefaultSR",!1),supportsDegeneratedQuantizedGeometry:i(r,"supportsDegeneratedQuantizedGeometry",!1),supportsDisjointSpatialRelationship:i(r,"supportsDisjointSpatialRel",!1),supportsDistance:i(r,"supportsQueryWithDistance",!1),supportsDistinct:i(r,"supportsDistinct",t.supportsAdvancedQueries),supportsExtent:i(r,"supportsReturningQueryExtent",!1),supportsFormatPBF:v&&f.has("pbf"),supportsFormatPBFWithCurves:h,supportsFullTextSearch:i(r,"supportsFullTextSearch",!1),supportsGeometryProperties:i(r,"supportsReturningGeometryProperties",!1),supportsHavingClause:i(r,"supportsHavingClause",!1),supportsHistoricMoment:i(n,"supportsQueryWithHistoricMoment",!1),supportsMaxRecordCountFactor:i(r,"supportsMaxRecordCountFactor",!1),supportsOrderBy:i(r,"supportsOrderBy",t.supportsAdvancedQueries),supportsPagination:i(r,"supportsPagination",!1),supportsPaginationOnAggregatedQueries:i(r,"supportsPaginationOnAggregatedQueries",!1),supportsPercentileStatistics:i(r,"supportsPercentileStatistics",!1),supportsQuantization:i(t,"supportsCoordinatesQuantization",!1),supportsQuantizationEditMode:i(t,"supportsQuantizationEditMode",!1),supportsQueryByAnonymous:i(a,"allowAnonymousToQuery",!0),supportsQueryByOthers:i(a,"allowOthersToQuery",!0),supportsQueryGeometry:i(t,"supportsReturningQueryGeometry",!1),supportsResultType:i(r,"supportsQueryWithResultType",!1),supportsReturnMesh:!!p(t.infoFor3D),supportsSpatialAggregationStatistics:i(r,"supportsSpatialAggregationStatistics",!1),supportsSqlExpression:i(r,"supportsSqlExpression",!1),supportsStandardizedQueriesOnly:i(t,"useStandardizedQueries",!1),supportsStatistics:i(r,"supportsStatistics",t.supportsStatistics),supportsTopFeaturesQuery:i(r,"supportsTopFeaturesQuery",!1),supportsTrueCurve:i(r,"supportsTrueCurve",!1),tileMaxRecordCount:u(t,"tileMaxRecordCount",void 0)}}function S(t){const e=t.advancedQueryCapabilities,s=i(e,"supportsAdvancedQueryRelated",!1);return{supportsPagination:i(e,"supportsQueryRelatedPagination",!1),supportsCount:s,supportsOrderBy:s,supportsCacheHint:d(e,"queryRelated")}}function T(t){return{supportsCacheHint:d(t.advancedQueryCapabilities,"queryTopFilter")}}function x(t){const e=t?t.queryBinsCapabilities:void 0;return{supportsDate:i(e,"supportsDateBin",!1),supportsFixedInterval:i(e,"supportsFixedIntervalBin",!1),supportsAutoInterval:i(e,"supportsAutoIntervalBin",!1),supportsFixedBoundaries:i(e,"supportsFixedBoundariesBin",!1),supportsStackBy:i(e,"supportsStackBy",!1),supportsSplitBy:i(e,"supportsSplitBy",!1),supportsSnapToData:i(e,"supportsSnapToData",!1),supportsReturnFullIntervalBin:i(e,"supportsReturnFullIntervalBin",!1),supportsFirstDayOfWeek:i(e,"supportsFirstDayOfWeek",!1),supportsNormalization:i(e,"supportsNormalization",!1),supportedStatistics:l(e),supportedNormalizationTypes:y(e)}}function F(t){const e=t.ownershipBasedAccessControlForFeatures,s=t?t.advancedEditingCapabilities:void 0;return{supportsGeometryUpdate:i(t,"allowGeometryUpdates",!0),supportsGlobalId:i(t,"supportsApplyEditsWithGlobalIds",!1),supportsReturnServiceEditsInSourceSpatialReference:i(t,"supportsReturnServiceEditsInSourceSR",!1),supportsRollbackOnFailure:i(t,"supportsRollbackOnFailureParameter",!1),supportsTrueCurveUpdate:i(t,"allowTrueCurvesUpdates",!0),supportsTrueCurveUpdateByTrueCurveClientsOnly:i(t,"onlyAllowTrueCurveUpdatesByTrueCurveClients",!0),supportsUpdateWithoutM:i(t,"allowUpdateWithoutMValues",!1),supportsUploadWithItemId:i(t,"supportsAttachmentsByUploadId",!1),supportsDeleteByAnonymous:i(e,"allowAnonymousToDelete",!0),supportsDeleteByOthers:i(e,"allowOthersToDelete",!0),supportsUpdateByAnonymous:i(e,"allowAnonymousToUpdate",!0),supportsUpdateByOthers:i(e,"allowOthersToUpdate",!0),supportsAsyncApplyEdits:i(s,"supportsAsyncApplyEdits",!1),zDefault:u(t,"zDefault",void 0)}}function R(s,r){const p=s.supportedCurveTypes??s.advancedQueryCapabilities?.supportedCurveTypes;return Array.isArray(p)?p.map(t=>e.fromJSON(t)).filter(t):r?n:[]}function B(t){return{operations:{supportsAppend:i(t,"supportsAppend",!1),supportsCoverageQuery:t?.playbackInfo?.klv["0601"]??!1,supportsExportClip:i(t,"supportsExportClip",!1),supportsExportFrameset:i(t,"supportsExportFrameset",!1),supportsMensuration:i(t,"supportsMensuration",!1),supportsPreviews:i(t,"supportsPreviews",!1),supportsUpdate:i(t,"supportsUpdate",!1)}}}export{n as allCurveTypes,C as getFeatureLayerCapabilities,B as getVideoLayerCapabilities};
|
package/layers/types.d.ts
CHANGED
|
@@ -695,6 +695,12 @@ export interface AttachmentCapabilities {
|
|
|
695
695
|
* @since 5.0
|
|
696
696
|
*/
|
|
697
697
|
supportsTypeWildcard: boolean;
|
|
698
|
+
/**
|
|
699
|
+
* Indicates if the layer supports querying only the count of attachments for features.
|
|
700
|
+
*
|
|
701
|
+
* @since 5.1
|
|
702
|
+
*/
|
|
703
|
+
supportsCountOnly: boolean;
|
|
698
704
|
}
|
|
699
705
|
|
|
700
706
|
/**
|
package/package.json
CHANGED
package/popup/Feature.d.ts
CHANGED
|
@@ -151,6 +151,12 @@ export default class Feature extends FeatureSuperclass {
|
|
|
151
151
|
*/
|
|
152
152
|
get graphic(): Graphic | null | undefined;
|
|
153
153
|
set graphic(value: GraphicProperties | null | undefined);
|
|
154
|
+
/**
|
|
155
|
+
* The heading for the feature.
|
|
156
|
+
*
|
|
157
|
+
* @default ""
|
|
158
|
+
*/
|
|
159
|
+
get heading(): string;
|
|
154
160
|
/** Indicates whether the current [graphic](#graphic) resides in a non-spatial table. */
|
|
155
161
|
get isFeatureFromTable(): boolean;
|
|
156
162
|
/**
|
|
@@ -217,12 +223,6 @@ export default class Feature extends FeatureSuperclass {
|
|
|
217
223
|
*/
|
|
218
224
|
get timeZone(): TimeZone;
|
|
219
225
|
set timeZone(value: TimeZone | null | undefined);
|
|
220
|
-
/**
|
|
221
|
-
* The title for the feature.
|
|
222
|
-
*
|
|
223
|
-
* @default ""
|
|
224
|
-
*/
|
|
225
|
-
get title(): string;
|
|
226
226
|
/**
|
|
227
227
|
* A reference to the [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/) or [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/).
|
|
228
228
|
*
|
package/popup/Feature.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as t}from"tslib";import e from"../Graphic.js";import{FeatureSetQueryInterceptor as i}from"../arcade/featureset/support/FeatureSetQueryInterceptor.js";import r from"../core/Accessor.js";import{isSome as s}from"../core/arrayUtils.js";import{createTask as o}from"../core/asyncUtils.js";import{IdentifiableMixin as a}from"../core/Identifiable.js";import n from"../core/Logger.js";import{abortMaybe as l}from"../core/maybe.js";import{eachAlways as p,isAbortError as h,throwIfAborted as c}from"../core/promiseUtils.js";import{watch as u,initial as d,when as f}from"../core/reactiveUtils.js";import{throttle as m}from"../core/throttle.js";import{property as g,subclass as y}from"../core/accessorSupport/decorators.js";import _ from"../geometry/Point.js";import b from"../geometry/SpatialReference.js";import{getGraphicLayer as v}from"../graphic/graphicOriginUtils.js";import T from"./content/TextContent.js";import{compileExpressionInfos as I,formatArcadeValue as A}from"./support/arcadeFeatureUtils.js";import x from"./support/FeatureAbilities.js";import{preLayerQueryCallback as C,preRequestCallback as E,createFieldInfoMap as w,getAllFieldInfos as F,querySourceLayer as k,queryUpdatedFeature as j,isRelatableFeatureSupportedLayer as P,isAssociatedFeatureSupportedLayer as R,formatEditInfo as O,substituteFieldsInLinksAndAttributes as M,graphicCallback as Z,formatAttributes as U,isRelatedField as L}from"./support/featureUtils.js";import{queryLayerInfos as N,queryRelatedFeatures as S,setRelatedFeatures as G,getRelatedFieldInfo as q,createRelatedInfo as H,updateRelatedInfo as z}from"./support/relatedFeatureUtils.js";import{system as B}from"../time/constants.js";var Q;const D=1;let J=class extends(a(r)){static{Q=this}constructor(t){super(t),this._error=null,this._graphicChangedTask=null,this._evaluateExpressionAttributesTask=null,this._expressionAttributes=null,this._graphicExpressionAttributes=null,this.abilities=new x,this.content=null,this.description=null,this.defaultPopupTemplateEnabled=!1,this.formattedAttributes=null,this.graphic=null,this.lastEditInfo=null,this.location=null,this.relatedInfos=new Map,this.title="",this.view=null,this._graphicChangedThrottled=m(this._graphicChanged,()=>this.notifyChange("waitingForContent"),D,this),this._isAllowedContentType=t=>{const{abilities:e}=this;return"attachments"===t.type&&!!e.attachmentsContent||"custom"===t.type&&!!e.customContent||"fields"===t.type&&!!e.fieldsContent||"media"===t.type&&!!e.mediaContent||"text"===t.type&&!!e.textContent||"expression"===t.type&&!!e.expressionContent||"relationship"===t.type&&!!e.relationshipContent||"utility-network-associations"===t.type&&!!e.utilityNetworkAssociationsContent},this._evaluateExpressionAttributesThrottled=m(this._evaluateExpressionAttributes,()=>this.notifyChange("waitingForContent"),D,this),this.addHandles([u(()=>[this._effectivePopupTemplate,this.abilities.attachmentsContent,this.abilities.chartAnimation,this.abilities.customContent,this.abilities.expressionContent,this.abilities.fieldsContent,this.abilities.mediaContent,this.abilities.relationshipContent,this.abilities.textContent,this.abilities.utilityNetworkAssociationsContent,this.graphic,this.timeZone],()=>this._graphicChangedThrottled(),d),f(()=>{if(!this._graphicChangedTask?.finished||null==this._graphicChangedTask.value)return null;const t=this._graphicChangedTask.value,e=t?.expressionInfos?.dependencies;return[t,e?.has("view-scale")?this.view?.scale:null,e?.has("view-time-extent")?this.view?.timeExtent?.start:null,e?.has("view-time-extent")?this.view?.timeExtent?.end:null]},([t])=>this._evaluateExpressionAttributesThrottled(t))])}initialize(){this.addHandles([this._graphicChangedThrottled,this._evaluateExpressionAttributesThrottled])}destroy(){this._clear(),this._graphicChangedTask=l(this._graphicChangedTask),this._evaluateExpressionAttributesTask=l(this._evaluateExpressionAttributesTask),this._error=null,this.graphic=null,this.relatedInfos.clear()}static{this.interceptor=new i(C,E)}get _effectivePopupTemplate(){return null!=this.graphic?this.graphic.getEffectivePopupTemplate(this.defaultPopupTemplateEnabled):null}get _fieldInfoMap(){return w(F(this._effectivePopupTemplate),this._layer)}get _layer(){const{graphic:t}=this;return t?v(t):void 0}get isFeatureFromTable(){return this._layer?.isTable||!1}get state(){return this.graphic?this._error?"error":this.waitingForContent?"loading":"ready":"disabled"}get spatialReference(){return this.view?.spatialReference??null}set spatialReference(t){this._override("spatialReference",t)}get timeZone(){return this.view?.timeZone??B}set timeZone(t){this._overrideIfSome("timeZone",t)}get map(){return this.view?.map||null}set map(t){this._override("map",t)}get waitingForContent(){const{_graphicChangedThrottled:t,_evaluateExpressionAttributesThrottled:e,_graphicChangedTask:i,_evaluateExpressionAttributesTask:r}=this;return t.hasPendingUpdates()||e.hasPendingUpdates()||null!=i&&!i.finished||null!=r&&!r.finished}async updateGeometry(){const{graphic:t,spatialReference:e,_layer:i}=this;await(i?.load());const r=i?.objectIdField;if(!r||!t||!i)return;const s=t?.attributes?.[r];if(null==s)return;const o=[s];if(!t.geometry){const r=await k({layer:i,graphic:t,outFields:[],objectIds:o,returnGeometry:!0,spatialReference:e}),s=r?.geometry;s&&(t.geometry=s)}}_clear(){this._set("title",""),this._set("content",null),this._set("formattedAttributes",null)}_graphicChanged(){this._evaluateExpressionAttributesTask=l(this._evaluateExpressionAttributesTask),this._graphicChangedTask=l(this._graphicChangedTask),this._graphicChangedTask=o(async t=>{this._error=null,this._clear();const{graphic:e}=this;try{if(!e)return null;const{_layer:i,_effectivePopupTemplate:r}=this,s=this.spatialReference;await j({graphic:e,popupTemplate:r,layer:i,spatialReference:s},{signal:t});const[{value:o},{value:a}]=await p([this._getContent(),this._getTitle()]),[,{value:n}]=await p([this._checkForRelatedFeatures({signal:t}),I(r?.expressionInfos,e)]);return{expressionInfos:n,content:o,title:a}}catch(i){throw h(i)||(this._error=i,n.getLogger(this).error("error","The popupTemplate could not be displayed for this feature.",{error:i,graphic:e,popupTemplate:this._effectivePopupTemplate})),i}})}_compileContentElement(t){return"relationship"===t.type?P(this._layer)?t:void 0:"utility-network-associations"===t.type?R(this._layer)?t:void 0:t}_compileContent(t){if(this.graphic)return Array.isArray(t)?t.filter(this._isAllowedContentType).map(t=>this._compileContentElement(t)).filter(s):"string"==typeof t?new T({text:t}).text:t}_compileLastEditInfo(){const{_effectivePopupTemplate:t,_layer:e,graphic:i,timeZone:r}=this;if(!t)return;const{lastEditInfoEnabled:s}=t,o=e?.editFieldsInfo;return s&&o?O(o,i?.attributes,r,e):void 0}_compileTitle(t){const{_fieldInfoMap:e,_layer:i,graphic:r,_expressionAttributes:s}=this,o=r?.attributes??{},a=this.formattedAttributes?.global??{};return M({attributes:o,fieldInfoMap:e,globalAttributes:a,expressionAttributes:s,layer:i,text:t})}async _getTitle(){const{_effectivePopupTemplate:t,graphic:e}=this;return e?Z({type:"title",value:t?.title,event:{graphic:e}}):null}async _getContent(){const{_effectivePopupTemplate:t,graphic:e}=this;return e?Z({type:"content",value:t?.content,event:{graphic:e}}):null}_evaluateExpressionAttributes({title:t,content:e,expressionInfos:i}){this._evaluateExpressionAttributesTask=l(this._evaluateExpressionAttributesTask),this._evaluateExpressionAttributesTask=o(async r=>{const{graphic:s,map:o,view:a,spatialReference:l,location:p}=this;try{if(!s)return;let n;if(null!=i){const t=[];for(const[e,n]of i.expressions.entries())null!=n?t.push(n.evaluate({graphic:s,interceptor:Q.interceptor,location:p,map:o,options:{signal:r},spatialReference:l,view:a}).then(t=>[e,"string"==typeof t?A(t):t]).catch(()=>[e,void 0])):t.push(Promise.resolve([e,void 0]));n=Object.fromEntries(await Promise.all(t)),c(r)}this._expressionAttributes=n,this._graphicExpressionAttributes={...s.attributes,...n},this._set("formattedAttributes",this._createFormattedAttributes(e)),this._set("title",this._compileTitle(t)),this._set("lastEditInfo",this._compileLastEditInfo()||null),this._set("content",this._compileContent(e)||null)}catch(u){h(u)||(this._error=u,n.getLogger(this).error("error","The popupTemplate could not be displayed for this feature.",{error:u,graphic:s,popupTemplate:this._effectivePopupTemplate}))}})}_createMediaFormattedAttributes({contentElement:t,contentElementIndex:e,formattedAttributes:i}){const{_effectivePopupTemplate:r,graphic:s,relatedInfos:o,_layer:a,_fieldInfoMap:n,_graphicExpressionAttributes:l,timeZone:p}=this;i.content[e]=U({attributes:{...l,...t.attributes},fieldInfoMap:n,fieldInfos:r?.fieldInfos,graphic:s,layer:a,relatedInfos:o,timeZone:p})}_createFieldsFormattedAttributes({contentElement:t,contentElementIndex:e,formattedAttributes:i}){if(t.fieldInfos){const{graphic:r,relatedInfos:s,_layer:o,_fieldInfoMap:a,_graphicExpressionAttributes:n,timeZone:l}=this;i.content[e]=U({attributes:{...n,...t.attributes},fieldInfoMap:a,fieldInfos:t.fieldInfos,graphic:r,isContentFieldInfos:!0,layer:o,relatedInfos:s,timeZone:l})}}_createFormattedAttributes(t){const{_effectivePopupTemplate:e,graphic:i,relatedInfos:r,_layer:s,_fieldInfoMap:o,_graphicExpressionAttributes:a,timeZone:n}=this,l=e?.fieldInfos,p={global:U({attributes:a,fieldInfoMap:o,fieldInfos:l,graphic:i,layer:s,relatedInfos:r,timeZone:n}),content:[]};return Array.isArray(t)&&t.forEach((t,e)=>{"fields"===t.type&&this._createFieldsFormattedAttributes({contentElement:t,contentElementIndex:e,formattedAttributes:p}),"media"===t.type&&this._createMediaFormattedAttributes({contentElement:t,contentElementIndex:e,formattedAttributes:p})}),p}_checkForRelatedFeatures(t){const{graphic:e,_effectivePopupTemplate:i}=this;return this._queryRelatedInfos(e,F(i),t)}async _queryRelatedInfos(t,e,i){const{relatedInfos:r,_layer:s}=this;r.clear();const o=null!=s?.associatedLayer?await(s?.associatedLayer.load(i)):s;if(!o||!t)return;const a=e.filter(t=>!!t.fieldName&&L(t.fieldName));if(!a?.length)return;e.forEach(t=>this._configureRelatedInfo(t,o));const n=await N({relatedInfos:r,layer:o},i);Object.keys(n).forEach(t=>{const e=r.get(t.toString()),i=n[t]?.value;e&&i&&(e.layerInfo=i.data)});const l=await S({graphic:t,relatedInfos:r,layer:o},i);Object.keys(l).forEach(t=>{G(l[t]?.value,r.get(t.toString()))})}_configureRelatedInfo(t,e){const{relatedInfos:i}=this,r=q(t.fieldName||"");if(!r)return;const{layerId:s,fieldName:o}=r;if(!s)return;const a=i.get(s.toString())||H(s,e);a&&(z({relatedInfo:a,fieldName:o,fieldInfo:t}),this.relatedInfos.set(s,a))}};t([g()],J.prototype,"_error",void 0),t([g()],J.prototype,"_graphicChangedTask",void 0),t([g()],J.prototype,"_evaluateExpressionAttributesTask",void 0),t([g({readOnly:!0})],J.prototype,"_effectivePopupTemplate",null),t([g({readOnly:!0})],J.prototype,"_fieldInfoMap",null),t([g({readOnly:!0})],J.prototype,"_layer",null),t([g({type:x})],J.prototype,"abilities",void 0),t([g({readOnly:!0})],J.prototype,"content",void 0),t([g()],J.prototype,"description",void 0),t([g({type:Boolean})],J.prototype,"defaultPopupTemplateEnabled",void 0),t([g({readOnly:!0})],J.prototype,"isFeatureFromTable",null),t([g({readOnly:!0})],J.prototype,"state",null),t([g({readOnly:!0})],J.prototype,"formattedAttributes",void 0),t([g({type:e})],J.prototype,"graphic",void 0),t([g({readOnly:!0})],J.prototype,"lastEditInfo",void 0),t([g({type:_})],J.prototype,"location",void 0),t([g({readOnly:!0})],J.prototype,"relatedInfos",void 0),t([g({type:b})],J.prototype,"spatialReference",null),t([g()],J.prototype,"timeZone",null),t([g({readOnly:!0})],J.prototype,"title",void 0),t([g()],J.prototype,"map",null),t([g({readOnly:!0})],J.prototype,"waitingForContent",null),t([g()],J.prototype,"view",void 0),J=Q=t([y("esri.popup.Feature")],J);const K=J;export{K as default};
|
|
2
|
+
import{__decorate as t}from"tslib";import e from"../Graphic.js";import{FeatureSetQueryInterceptor as i}from"../arcade/featureset/support/FeatureSetQueryInterceptor.js";import r from"../core/Accessor.js";import{isSome as s}from"../core/arrayUtils.js";import{createTask as o}from"../core/asyncUtils.js";import{IdentifiableMixin as a}from"../core/Identifiable.js";import n from"../core/Logger.js";import{abortMaybe as l}from"../core/maybe.js";import{eachAlways as p,isAbortError as h,throwIfAborted as c}from"../core/promiseUtils.js";import{watch as u,initial as d,when as f}from"../core/reactiveUtils.js";import{throttle as m}from"../core/throttle.js";import{property as g,subclass as y}from"../core/accessorSupport/decorators.js";import _ from"../geometry/Point.js";import b from"../geometry/SpatialReference.js";import{getGraphicLayer as v}from"../graphic/graphicOriginUtils.js";import T from"./content/TextContent.js";import{compileExpressionInfos as I,formatArcadeValue as A}from"./support/arcadeFeatureUtils.js";import x from"./support/FeatureAbilities.js";import{preLayerQueryCallback as C,preRequestCallback as E,createFieldInfoMap as w,getAllFieldInfos as F,querySourceLayer as k,queryUpdatedFeature as j,isRelatableFeatureSupportedLayer as P,isAssociatedFeatureSupportedLayer as R,formatEditInfo as O,substituteFieldsInLinksAndAttributes as M,graphicCallback as Z,formatAttributes as U,isRelatedField as L}from"./support/featureUtils.js";import{queryLayerInfos as N,queryRelatedFeatures as S,setRelatedFeatures as H,getRelatedFieldInfo as G,createRelatedInfo as q,updateRelatedInfo as z}from"./support/relatedFeatureUtils.js";import{system as B}from"../time/constants.js";var Q;const D=1;let J=class extends(a(r)){static{Q=this}constructor(t){super(t),this._error=null,this._graphicChangedTask=null,this._evaluateExpressionAttributesTask=null,this._expressionAttributes=null,this._graphicExpressionAttributes=null,this.abilities=new x,this.content=null,this.description=null,this.defaultPopupTemplateEnabled=!1,this.formattedAttributes=null,this.graphic=null,this.lastEditInfo=null,this.location=null,this.relatedInfos=new Map,this.heading="",this.view=null,this._graphicChangedThrottled=m(this._graphicChanged,()=>this.notifyChange("waitingForContent"),D,this),this._isAllowedContentType=t=>{const{abilities:e}=this;return"attachments"===t.type&&!!e.attachmentsContent||"custom"===t.type&&!!e.customContent||"fields"===t.type&&!!e.fieldsContent||"media"===t.type&&!!e.mediaContent||"text"===t.type&&!!e.textContent||"expression"===t.type&&!!e.expressionContent||"relationship"===t.type&&!!e.relationshipContent||"utility-network-associations"===t.type&&!!e.utilityNetworkAssociationsContent},this._evaluateExpressionAttributesThrottled=m(this._evaluateExpressionAttributes,()=>this.notifyChange("waitingForContent"),D,this),this.addHandles([u(()=>[this._effectivePopupTemplate,this.abilities.attachmentsContent,this.abilities.chartAnimation,this.abilities.customContent,this.abilities.expressionContent,this.abilities.fieldsContent,this.abilities.mediaContent,this.abilities.relationshipContent,this.abilities.textContent,this.abilities.utilityNetworkAssociationsContent,this.graphic,this.timeZone],()=>this._graphicChangedThrottled(),d),f(()=>{if(!this._graphicChangedTask?.finished||null==this._graphicChangedTask.value)return null;const t=this._graphicChangedTask.value,e=t?.expressionInfos?.dependencies;return[t,e?.has("view-scale")?this.view?.scale:null,e?.has("view-time-extent")?this.view?.timeExtent?.start:null,e?.has("view-time-extent")?this.view?.timeExtent?.end:null]},([t])=>this._evaluateExpressionAttributesThrottled(t))])}initialize(){this.addHandles([this._graphicChangedThrottled,this._evaluateExpressionAttributesThrottled])}destroy(){this._clear(),this._graphicChangedTask=l(this._graphicChangedTask),this._evaluateExpressionAttributesTask=l(this._evaluateExpressionAttributesTask),this._error=null,this.graphic=null,this.relatedInfos.clear()}static{this.interceptor=new i(C,E)}get _effectivePopupTemplate(){return null!=this.graphic?this.graphic.getEffectivePopupTemplate(this.defaultPopupTemplateEnabled):null}get _fieldInfoMap(){return w(F(this._effectivePopupTemplate),this._layer)}get _layer(){const{graphic:t}=this;return t?v(t):void 0}get isFeatureFromTable(){return this._layer?.isTable||!1}get state(){return this.graphic?this._error?"error":this.waitingForContent?"loading":"ready":"disabled"}get spatialReference(){return this.view?.spatialReference??null}set spatialReference(t){this._override("spatialReference",t)}get timeZone(){return this.view?.timeZone??B}set timeZone(t){this._overrideIfSome("timeZone",t)}get map(){return this.view?.map||null}set map(t){this._override("map",t)}get waitingForContent(){const{_graphicChangedThrottled:t,_evaluateExpressionAttributesThrottled:e,_graphicChangedTask:i,_evaluateExpressionAttributesTask:r}=this;return t.hasPendingUpdates()||e.hasPendingUpdates()||null!=i&&!i.finished||null!=r&&!r.finished}async updateGeometry(){const{graphic:t,spatialReference:e,_layer:i}=this;await(i?.load());const r=i?.objectIdField;if(!r||!t||!i)return;const s=t?.attributes?.[r];if(null==s)return;const o=[s];if(!t.geometry){const r=await k({layer:i,graphic:t,outFields:[],objectIds:o,returnGeometry:!0,spatialReference:e}),s=r?.geometry;s&&(t.geometry=s)}}_clear(){this._set("heading",""),this._set("content",null),this._set("formattedAttributes",null)}_graphicChanged(){this._evaluateExpressionAttributesTask=l(this._evaluateExpressionAttributesTask),this._graphicChangedTask=l(this._graphicChangedTask),this._graphicChangedTask=o(async t=>{this._error=null,this._clear();const{graphic:e}=this;try{if(!e)return null;const{_layer:i,_effectivePopupTemplate:r}=this,s=this.spatialReference;await j({graphic:e,popupTemplate:r,layer:i,spatialReference:s},{signal:t});const[{value:o},{value:a}]=await p([this._getContent(),this._getTitle()]),[,{value:n}]=await p([this._checkForRelatedFeatures({signal:t}),I(r?.expressionInfos,e)]);return{expressionInfos:n,content:o,heading:a}}catch(i){throw h(i)||(this._error=i,n.getLogger(this).error("error","The popupTemplate could not be displayed for this feature.",{error:i,graphic:e,popupTemplate:this._effectivePopupTemplate})),i}})}_compileContentElement(t){return"relationship"===t.type?P(this._layer)?t:void 0:"utility-network-associations"===t.type?R(this._layer)?t:void 0:t}_compileContent(t){if(this.graphic)return Array.isArray(t)?t.filter(this._isAllowedContentType).map(t=>this._compileContentElement(t)).filter(s):"string"==typeof t?new T({text:t}).text:t}_compileLastEditInfo(){const{_effectivePopupTemplate:t,_layer:e,graphic:i,timeZone:r}=this;if(!t)return;const{lastEditInfoEnabled:s}=t,o=e?.editFieldsInfo;return s&&o?O(o,i?.attributes,r,e):void 0}_compileHeading(t){const{_fieldInfoMap:e,_layer:i,graphic:r,_expressionAttributes:s}=this,o=r?.attributes??{},a=this.formattedAttributes?.global??{};return M({attributes:o,fieldInfoMap:e,globalAttributes:a,expressionAttributes:s,layer:i,text:t})}async _getTitle(){const{_effectivePopupTemplate:t,graphic:e}=this;return e?Z({type:"title",value:t?.title,event:{graphic:e}}):null}async _getContent(){const{_effectivePopupTemplate:t,graphic:e}=this;return e?Z({type:"content",value:t?.content,event:{graphic:e}}):null}_evaluateExpressionAttributes({heading:t,content:e,expressionInfos:i}){this._evaluateExpressionAttributesTask=l(this._evaluateExpressionAttributesTask),this._evaluateExpressionAttributesTask=o(async r=>{const{graphic:s,map:o,view:a,spatialReference:l,location:p}=this;try{if(!s)return;let n;if(null!=i){const t=[];for(const[e,n]of i.expressions.entries())null!=n?t.push(n.evaluate({graphic:s,interceptor:Q.interceptor,location:p,map:o,options:{signal:r},spatialReference:l,view:a}).then(t=>[e,"string"==typeof t?A(t):t]).catch(()=>[e,void 0])):t.push(Promise.resolve([e,void 0]));n=Object.fromEntries(await Promise.all(t)),c(r)}this._expressionAttributes=n,this._graphicExpressionAttributes={...s.attributes,...n},this._set("formattedAttributes",this._createFormattedAttributes(e)),this._set("heading",this._compileHeading(t)),this._set("lastEditInfo",this._compileLastEditInfo()||null),this._set("content",this._compileContent(e)||null)}catch(u){h(u)||(this._error=u,n.getLogger(this).error("error","The popupTemplate could not be displayed for this feature.",{error:u,graphic:s,popupTemplate:this._effectivePopupTemplate}))}})}_createMediaFormattedAttributes({contentElement:t,contentElementIndex:e,formattedAttributes:i}){const{_effectivePopupTemplate:r,graphic:s,relatedInfos:o,_layer:a,_fieldInfoMap:n,_graphicExpressionAttributes:l,timeZone:p}=this;i.content[e]=U({attributes:{...l,...t.attributes},fieldInfoMap:n,fieldInfos:r?.fieldInfos,graphic:s,layer:a,relatedInfos:o,timeZone:p})}_createFieldsFormattedAttributes({contentElement:t,contentElementIndex:e,formattedAttributes:i}){if(t.fieldInfos){const{graphic:r,relatedInfos:s,_layer:o,_fieldInfoMap:a,_graphicExpressionAttributes:n,timeZone:l}=this;i.content[e]=U({attributes:{...n,...t.attributes},fieldInfoMap:a,fieldInfos:t.fieldInfos,graphic:r,isContentFieldInfos:!0,layer:o,relatedInfos:s,timeZone:l})}}_createFormattedAttributes(t){const{_effectivePopupTemplate:e,graphic:i,relatedInfos:r,_layer:s,_fieldInfoMap:o,_graphicExpressionAttributes:a,timeZone:n}=this,l=e?.fieldInfos,p={global:U({attributes:a,fieldInfoMap:o,fieldInfos:l,graphic:i,layer:s,relatedInfos:r,timeZone:n}),content:[]};return Array.isArray(t)&&t.forEach((t,e)=>{"fields"===t.type&&this._createFieldsFormattedAttributes({contentElement:t,contentElementIndex:e,formattedAttributes:p}),"media"===t.type&&this._createMediaFormattedAttributes({contentElement:t,contentElementIndex:e,formattedAttributes:p})}),p}_checkForRelatedFeatures(t){const{graphic:e,_effectivePopupTemplate:i}=this;return this._queryRelatedInfos(e,F(i),t)}async _queryRelatedInfos(t,e,i){const{relatedInfos:r,_layer:s}=this;r.clear();const o=null!=s?.associatedLayer?await(s?.associatedLayer.load(i)):s;if(!o||!t)return;const a=e.filter(t=>!!t.fieldName&&L(t.fieldName));if(!a?.length)return;e.forEach(t=>this._configureRelatedInfo(t,o));const n=await N({relatedInfos:r,layer:o},i);Object.keys(n).forEach(t=>{const e=r.get(t.toString()),i=n[t]?.value;e&&i&&(e.layerInfo=i.data)});const l=await S({graphic:t,relatedInfos:r,layer:o},i);Object.keys(l).forEach(t=>{H(l[t]?.value,r.get(t.toString()))})}_configureRelatedInfo(t,e){const{relatedInfos:i}=this,r=G(t.fieldName||"");if(!r)return;const{layerId:s,fieldName:o}=r;if(!s)return;const a=i.get(s.toString())||q(s,e);a&&(z({relatedInfo:a,fieldName:o,fieldInfo:t}),this.relatedInfos.set(s,a))}};t([g()],J.prototype,"_error",void 0),t([g()],J.prototype,"_graphicChangedTask",void 0),t([g()],J.prototype,"_evaluateExpressionAttributesTask",void 0),t([g({readOnly:!0})],J.prototype,"_effectivePopupTemplate",null),t([g({readOnly:!0})],J.prototype,"_fieldInfoMap",null),t([g({readOnly:!0})],J.prototype,"_layer",null),t([g({type:x})],J.prototype,"abilities",void 0),t([g({readOnly:!0})],J.prototype,"content",void 0),t([g()],J.prototype,"description",void 0),t([g({type:Boolean})],J.prototype,"defaultPopupTemplateEnabled",void 0),t([g({readOnly:!0})],J.prototype,"isFeatureFromTable",null),t([g({readOnly:!0})],J.prototype,"state",null),t([g({readOnly:!0})],J.prototype,"formattedAttributes",void 0),t([g({type:e})],J.prototype,"graphic",void 0),t([g({readOnly:!0})],J.prototype,"lastEditInfo",void 0),t([g({type:_})],J.prototype,"location",void 0),t([g({readOnly:!0})],J.prototype,"relatedInfos",void 0),t([g({type:b})],J.prototype,"spatialReference",null),t([g()],J.prototype,"timeZone",null),t([g({readOnly:!0})],J.prototype,"heading",void 0),t([g()],J.prototype,"map",null),t([g({readOnly:!0})],J.prototype,"waitingForContent",null),t([g()],J.prototype,"view",void 0),J=Q=t([y("esri.popup.Feature")],J);const K=J;export{K as default};
|
package/popup/Features.d.ts
CHANGED
|
@@ -21,11 +21,11 @@ import type { ReadonlyArrayOrCollection } from "../core/Collection.js";
|
|
|
21
21
|
import type { FeatureAbilitiesProperties } from "./support/FeatureAbilities.js";
|
|
22
22
|
import type { PointProperties } from "../geometry/Point.js";
|
|
23
23
|
|
|
24
|
-
export interface FeaturesProperties extends GoToProperties, Partial<Pick<Features, "activeFeature" | "browseClusterEnabled" | "content" | "defaultPopupTemplateEnabled" | "
|
|
24
|
+
export interface FeaturesProperties extends GoToProperties, Partial<Pick<Features, "activeFeature" | "browseClusterEnabled" | "content" | "defaultPopupTemplateEnabled" | "featurePage" | "features" | "featuresPerPage" | "heading" | "highlightEnabled" | "includeDefaultActions" | "initialDisplayMode" | "map" | "open" | "promises" | "selectedFeatureIndex" | "updateLocationEnabled" | "view" | "zoomFactor">> {
|
|
25
25
|
/**
|
|
26
26
|
* [Collection](https://developers.arcgis.com/javascript/latest/references/core/core/Collection/) of [action](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionButton/) or [action toggle](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionToggle/) objects.
|
|
27
27
|
* Each action may be executed by clicking the icon or image symbolizing them.
|
|
28
|
-
* By default, every popup and Features widget has a `Zoom To` action styled with a magnifying glass icon .
|
|
29
29
|
* When this icon is clicked, the view zooms in four LODs and centers on the selected feature.
|
|
30
30
|
*
|
|
31
31
|
* You may remove this default action by setting [includeDefaultActions](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#includeDefaultActions) to `false`, or by setting the
|
|
@@ -216,7 +216,7 @@ export default class Features extends FeaturesSuperclass {
|
|
|
216
216
|
/**
|
|
217
217
|
* [Collection](https://developers.arcgis.com/javascript/latest/references/core/core/Collection/) of [action](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionButton/) or [action toggle](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionToggle/) objects.
|
|
218
218
|
* Each action may be executed by clicking the icon or image symbolizing them.
|
|
219
|
-
* By default, every popup and Features widget has a `Zoom To` action styled with a magnifying glass icon .
|
|
220
220
|
* When this icon is clicked, the view zooms in four LODs and centers on the selected feature.
|
|
221
221
|
*
|
|
222
222
|
* You may remove this default action by setting [includeDefaultActions](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#includeDefaultActions) to `false`, or by setting the
|
|
@@ -333,17 +333,6 @@ export default class Features extends FeaturesSuperclass {
|
|
|
333
333
|
set featureItemAbilities(value: FeatureAbilitiesProperties | null | undefined);
|
|
334
334
|
/** An array of [Feature](https://developers.arcgis.com/javascript/latest/references/core/popup/Feature/) item view model(s). */
|
|
335
335
|
get featureItems(): Feature[];
|
|
336
|
-
/**
|
|
337
|
-
* This property enables showing the list of features.
|
|
338
|
-
* Setting this to `true` allows the user to scroll through the list of features.
|
|
339
|
-
* This value will only be honored if [initialDisplayMode](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#initialDisplayMode) is set to `feature`.
|
|
340
|
-
*
|
|
341
|
-
* @default false
|
|
342
|
-
* @since 4.32
|
|
343
|
-
*/
|
|
344
|
-
accessor featureMenuOpen: boolean;
|
|
345
|
-
/** The title to display on the widget while viewing the feature menu. */
|
|
346
|
-
accessor featureMenuTitle: string | null | undefined;
|
|
347
336
|
/**
|
|
348
337
|
* The current page number in the feature browsing menu. If the feature menu is not open, this value is `null`.
|
|
349
338
|
* This value is dependent on the [featuresPerPage](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#featuresPerPage).
|
package/popup/Features.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../Graphic.js";import{isSome as i}from"../core/arrayUtils.js";import s from"../core/Error.js";import{EventedAccessor as r}from"../core/Evented.js";import o from"../core/Logger.js";import{abortMaybe as n}from"../core/maybe.js";import{debounce as a,isAbortError as l}from"../core/promiseUtils.js";import u from"../core/ReactiveSet.js";import{watch as h,when as c,sync as p}from"../core/reactiveUtils.js";import{addMany as d}from"../core/SetUtils.js";import{property as g,subclass as m}from"../core/accessorSupport/decorators.js";import f from"../geometry/Point.js";import{initializeProjection as y,project as _}from"../geometry/projectionUtils.js";import F from"../geometry/SpatialReference.js";import{geographicToWebMercator as w}from"../geometry/support/webMercatorUtils.js";import{getGraphicLayer as v}from"../graphic/graphicOriginUtils.js";import{fallbackObjectIDAttribute as C}from"../layers/LayerConstants.js";import b from"./Feature.js";import I from"./support/FeatureAbilities.js";import P from"../symbols/SimpleFillSymbol.js";import{getDisplayedSymbol as A}from"../symbols/support/symbolUtils.js";import{system as L}from"../time/constants.js";import{highlightsSupported as j}from"../views/support/layerViewUtils.js";import{ActionsCollection as E,zoomToClusteredFeatures as x,browseClusteredFeatures as R,zoomToFeature as O}from"../widgets/Popup/actions.js";import{isClusterFeature as U,removeClusteredFeaturesForBrowsing as T,displayClusterExtent as S,browseAggregateFeatures as B,getSelectedTarget as H}from"../widgets/Popup/actionUtils.js";import{GoTo as M}from"../widgets/support/GoTo.js";const G="location-scale-handle",V=()=>[O.clone()],Z=()=>[x.clone(),R.clone()];let D=null;function z(e,t){switch(e){case"building-scene":case"map-image":case"tile":case"imagery":return!0;case"imagery-tile":return"2d"===t;default:return!1}}let N=class extends(M(r)){constructor(e){super(e),this._pendingPromises=new u,this._fetchFeaturesController=null,this._centerAtLocationController=null,this._locationUpdateController=null,this._highlightPromises={"highlight-active-feature":null,"highlight-selected-feature":null},this._selectedClusterFeature=null,this.actions=new E,this.activeFeature=null,this.browseClusterEnabled=!1,this.defaultPopupTemplateEnabled=!1,this.featurePage=null,this.featuresPerPage=20,this.featureMenuOpen=!1,this.featureMenuTitle=null,this.featureItemAbilities=null,this.featureItems=[],this.highlightEnabled=!0,this.includeDefaultActions=!0,this.initialDisplayMode="feature",this.selectedClusterBoundaryFeature=new t({symbol:new P({outline:{width:1.5,color:"cyan"},style:"none"})}),this.heading=null,this.updateLocationEnabled=!1,this.view=null,this.open=!1,this.zoomFactor=4,this._debouncedLocationUpdate=a(async e=>{this._cancelLocationUpdate();const t=new AbortController,{signal:i}=t;this._locationUpdateController=t,await this._locationUpdate(e,{signal:i}).catch(()=>{}).finally(()=>{this._locationUpdateController===t&&(this._locationUpdateController=null)})})}initialize(){this.addHandles([h(()=>[this.highlightEnabled,this.selectedFeature,this.open,this.view],()=>this._highlightSelectedFeature()),h(()=>[this.highlightEnabled,this.activeFeature,this.open,this.view],()=>this._highlightActiveFeature()),h(()=>this.location,e=>this._locationChange(e)),h(()=>this.selectedFeature,e=>this._selectedFeatureChange(e)),h(()=>[this.selectedFeatureIndex,this.featureCount,this.featuresPerPage],()=>this._selectedFeatureIndexChange()),h(()=>[this.featurePage,this.selectedFeatureIndex,this.featureCount,this.featuresPerPage,this.featureItems],()=>this._setGraphicOnFeatureItems()),h(()=>this.featureItems,()=>this._featureItemsChange()),h(()=>[this.featureItemAbilities?.attachmentsContent,this.featureItemAbilities?.chartAnimation,this.featureItemAbilities?.customContent,this.featureItemAbilities?.expressionContent,this.featureItemAbilities?.fieldsContent,this.featureItemAbilities?.mediaContent,this.featureItemAbilities?.relationshipContent,this.featureItemAbilities?.textContent,this.featureItemAbilities?.utilityNetworkAssociationsContent,this.features,this.map,this.spatialReference,this.timeZone],()=>this._updateFeatureItems()),c(()=>!this.waitingForResult,()=>this._waitingForResultChange(),p),h(()=>this.view?.scale,()=>this._viewScaleChange()),c(()=>!this.open,()=>this.browseClusterEnabled=!1),h(()=>this.browseClusterEnabled,e=>e?this.enableClusterBrowsing():this.disableClusterBrowsing())])}destroy(){this._cancelLocationUpdate(),this._cancelFetchingFeatures(),this._cancelCenterAtLocation(),this._clearBrowsedClusterGraphics(),this._pendingPromises.clear(),this.browseClusterEnabled=!1,this.view=null,this.map=null,this.spatialReference=null,this.timeZone=null}get active(){return this.open&&!this.waitingForResult}get allActions(){const e=this._get("allActions")||new E;e.removeAll();const{actions:t,defaultActions:s,defaultPopupTemplateEnabled:r,includeDefaultActions:o,selectedFeature:n}=this,a=o?s.concat(t):t,l=n&&("function"==typeof n.getEffectivePopupTemplate&&n.getEffectivePopupTemplate(r)||n.popupTemplate),u=l?.actions,h=l?.overwriteActions?u:u?.concat(a)??a;return h?.filter(i).forEach(t=>e.add(t)),e}set content(e){this.promises=[],this._set("content",e)}get defaultActions(){const e=this._get("defaultActions")||new E;return e.removeAll(),e.addMany(U(this.selectedFeature)?Z():V()),e}get featureCount(){return this.features.length}set features(e){if(this._get("features")===e)return;const t=e||[];this._set("features",t);const{pendingPromisesCount:i,promiseCount:s,selectedFeatureIndex:r}=this,o=s&&t.length;"list"!==this.initialDisplayMode?o&&i&&-1===r?this.selectedFeatureIndex=0:o&&-1!==r||(this.selectedFeatureIndex=t.length?0:-1):(!o||o&&i===s)&&(this.selectedFeatureIndex=-1)}set location(e){let t=e;const i=this.spatialReference?.isWebMercator,s=e?.spatialReference?.isWGS84;s&&i&&(t=w(e)),this._set("location",t)}get map(){return this.view?.map??null}set map(e){this._override("map",e)}get pendingPromisesCount(){return this._pendingPromises.size}get promiseCount(){return this.promises.length}get promises(){return this._get("promises")||[]}set promises(e){this._get("promises")!==e&&(this._pendingPromises.clear(),this.features=[],Array.isArray(e)&&e.length?(this._set("promises",e),e=e.slice(),d(this._pendingPromises,e),e.reduce((e,t)=>e.finally(()=>t.then(e=>{this._pendingPromises.has(t)&&this._updateFeatures(e)}).finally(()=>this._pendingPromises.delete(t)).catch(()=>{})),Promise.resolve())):this._set("promises",[]))}get selectedFeature(){const{features:e,selectedFeatureIndex:t}=this;if(-1===t)return null;return e[t]||null}get selectedFeatureIndex(){const e=this._get("selectedFeatureIndex");return"number"==typeof e?e:-1}set selectedFeatureIndex(e){const{featureCount:t}=this;(isNaN(e)||e<0||!t)&&(e=-1),this.activeFeature=null,this._set("selectedFeatureIndex",e)}get selectedFeatureItem(){return this.featureItems[this.selectedFeatureIndex]||null}get spatialReference(){return this.view?.spatialReference??null}set spatialReference(e){this._override("spatialReference",e)}get state(){const{view:e,map:t}=this;return e?e.ready?"ready":"disabled":t?"ready":"disabled"}get timeZone(){return this.view?.timeZone??L}set timeZone(e){this._overrideIfSome("timeZone",e)}get waitingForContents(){return this.featureItems.some(e=>e.waitingForContent)}get waitingForResult(){return(!!this._fetchFeaturesController||this.pendingPromisesCount>0)&&0===this.featureCount}zoomTo(e){return this.callGoTo(e)}clear(){this.set({promises:[],features:[],content:null,heading:null,location:null,activeFeature:null})}fetchFeatures(e,t){const{view:i}=this;if(!i||!e)throw new s("fetch-features:invalid-screenpoint-or-view","Cannot fetch features without a screenPoint and view.",{screenPoint:e,view:i});return i.fetchPopupFeatures(e,{pointerType:t?.event?.pointerType,defaultPopupTemplateEnabled:this.defaultPopupTemplateEnabled,signal:t?.signal})}next(){return this.selectedFeatureIndex=this._getRoundRobinIndex(this.selectedFeatureIndex+1,this.featureCount),this}previous(){return this.selectedFeatureIndex=this._getRoundRobinIndex(this.selectedFeatureIndex-1,this.featureCount),this}disableClusterBrowsing(){T(this),this._clearBrowsedClusterGraphics()}async enableClusterBrowsing(){const{view:e,selectedFeature:t}=this;"2d"===e?.type?U(t)?(await S(this),await B(this)):o.getLogger(this).warn("enableClusterBrowsing:invalid-selectedFeature: Selected feature must represent an aggregate/cluster graphic.",t):o.getLogger(this).warn("enableClusterBrowsing:invalid-view: View must be 2d MapView.",t)}async handleViewClick(e){return this._fetchFeaturesAndOpen(e)}_centerAtLocation(){const{view:e}=this,t=H(this);this._cancelCenterAtLocation();const i=new AbortController,{signal:r}=i;return this._centerAtLocationController=i,t&&e?this.callGoTo({target:{target:t,scale:e.scale},options:{signal:r}}).catch(e=>{l(e)||o.getLogger(this).error(e)}):Promise.reject(new s("center-at-location:invalid-target-or-view","Cannot center at a location without a target and view.",{target:t,view:e}))}_getRoundRobinIndex(e,t){return(e+t)%t}_clearBrowsedClusterGraphics(){const e=[this.selectedClusterBoundaryFeature,this._selectedClusterFeature].filter(i);this.view?.graphics?.removeMany(e),this._selectedClusterFeature=null,this.selectedClusterBoundaryFeature.geometry=null}_viewScaleChange(){if(U(this.selectedFeature))return this.browseClusterEnabled=!1,this.open=!1,void this.clear();this.browseClusterEnabled&&(this.features=this.selectedFeature?[this.selectedFeature]:[])}_locationChange(e){const{selectedFeature:t,updateLocationEnabled:i,view:s}=this;s&&!this._locationUpdateController&&i&&e&&(!t||t.geometry)&&this._centerAtLocation()}_selectedFeatureIndexChange(){this.featurePage=this.featureCount>0?Math.floor(this.selectedFeatureIndex/this.featuresPerPage)+1:null}_featureItemsChange(){this.featurePage=this.featureCount>0?1:null}_setGraphicOnFeatureItems(){const{features:e,featureCount:t,featurePage:i,featuresPerPage:s,featureItems:r}=this;if(null==i)return;const o=((i-1)*s+t)%t,n=o+s;r.slice(o,n).forEach((t,i)=>{t&&(t.graphic??=e[o+i])})}async _selectedFeatureChange(e){const{location:t,updateLocationEnabled:i,view:s}=this;if(!e||!s)return;if(this.browseClusterEnabled){if(this._selectedClusterFeature&&(s.graphics.remove(this._selectedClusterFeature),this._selectedClusterFeature=null),U(e))return;return e.symbol=await A(e),this._selectedClusterFeature=e,void s.graphics.add(this._selectedClusterFeature)}const r=v(e)?.type;if("map-image"!==r&&"imagery"!==r&&"imagery-tile"!==r||(e.symbol=await A(e)),(i||!t)&&e.geometry){if("point"===e.geometry.type)return void(this.location=e.geometry);const t=await import("../geometry/operators/labelPointOperator.js");return void(this.location=t.execute(e.geometry))}if(i&&!e.geometry){await this._centerAtLocation();const e=s.center?.clone();e&&(this.location=e)}}_waitingForResultChange(){!this.featureCount&&this.promises&&(this.open=!1)}_destroyFeatureItems(){this.featureItems.forEach(e=>e&&!e.destroyed&&e.destroy()),this._set("featureItems",[])}_updateFeatureItems(){const e=this.selectedFeature,t=this.features,i=this.featureItems,s=this.view,r=this.spatialReference,o=this.map,n=this.timeZone,a=this.location,l=this.featureItemAbilities??new I;if(U(t[0])||(this.browseClusterEnabled=!1),!t?.length)return void this._destroyFeatureItems();const u=i.slice(),h=[];t.forEach((t,i)=>{if(!t)return;const c=u.findIndex(e=>e?.graphic===t);if(-1!==c){const e=u[c];u.splice(c,1),e.abilities=l,h[i]=e}else{const u=new b({abilities:l,defaultPopupTemplateEnabled:this.defaultPopupTemplateEnabled,spatialReference:r,graphic:t===e?t:null,location:a,map:o,view:s,timeZone:n});h[i]=u}}),u.forEach(e=>e&&!e.destroyed&&e.destroy()),this._set("featureItems",h)}async _getScreenPoint(e,t){const{spatialReference:i,view:s}=this;if(!s)return null;await s.when();const r=e?.spatialReference;return r&&i?(await y(r,i,null,t),s.toScreen(e)):null}_cancelCenterAtLocation(){this._centerAtLocationController=n(this._centerAtLocationController)}_cancelFetchingFeatures(){this._fetchFeaturesController=n(this._fetchFeaturesController)}async _projectScreenPointAndFetchFeatures({mapPoint:e,screenPoint:t,event:i,signal:s}){return this.fetchFeatures(t??await this._getScreenPoint(e??this.location,{signal:s}),{signal:s,event:i})}_fetchFeaturesWithController({mapPoint:e,screenPoint:t,event:i}){this._cancelFetchingFeatures();const s=new AbortController,{signal:r}=s;this._fetchFeaturesController=s;const o=this._projectScreenPointAndFetchFeatures({mapPoint:e,screenPoint:t,signal:r,event:i});return o.catch(()=>{}).finally(()=>{this._fetchFeaturesController===s&&(this._fetchFeaturesController=null)}),o}async _fetchFeaturesAndOpen(e){const{mapPoint:t,screenPoint:i}=e;this.removeHandles(G),this.addHandles([h(()=>this.view?.scale,()=>this._debouncedLocationUpdate(t).catch(e=>{l(e)||o.getLogger(this).error(e)})),c(()=>!this.open,()=>{this.removeHandles(G)},{once:!0})],G);const{pendingFeatures:s}=await this._fetchFeaturesWithController({mapPoint:t,screenPoint:i,event:e});return{location:t??void 0,promises:s}}async _locationUpdate(e,t){const{spatialReference:i}=this,s=this.selectedFeature?.geometry?.type,r=this.location??e;if(s&&"mesh"!==s&&i&&r&&this.selectedFeature){if("point"===s){const e=await import("../geometry/operators/labelPointOperator.js");return void(this.location=e.execute(this.selectedFeature.geometry))}try{const e=this.selectedFeature;let s=e.geometry;const o=this._getHighlightLayer(e),n=e.getObjectId();if(!o||!this.view)return;if(n){const e=this.view?.allLayerViews.find(e=>e.layer.uid===o.uid);if(!e||!("queryFeatures"in e))return;const r=e.createQuery();r.outSpatialReference=i,r.objectIds=[n],r.returnGeometry=!0;const{features:a}=await e.queryFeatures(r,t);s=a[0]?.geometry}if(!s||"mesh"===s.type)return;s=_(s,i),D??=await Promise.all([import("../geometry/operators/intersectsOperator.js"),import("../geometry/operators/proximityOperator.js")]);const[a,l]=D;if(!a.execute(s,r)){const t=l.getNearestCoordinate(s,r).coordinate??r;this.selectedFeature===e&&(this.location=t)}}catch(n){l(n)||o.getLogger(this).error(n)}}}_cancelLocationUpdate(){this._locationUpdateController=n(this._locationUpdateController)}async _getLayerView(e,t){return await e.when(),e.whenLayerView(t)}_getHighlightLayer(e){const t=v(e),{layer:i}=e;return t&&"layer"in t&&t.layer?t.layer:"map-notes"===t?.type||"subtype-group"===t?.type?t:i??t}_getHighlightLayerView(e,t){return"subtype-sublayer"===t.type&&t.parent&&this._mapIncludesLayer(t.parent)?this._getLayerView(e,t.parent):t&&this._mapIncludesLayer(t)?this._getLayerView(e,t):null}_getHighlightTarget(e,t,i){if(z(t.type,i))return e;const s=e.getObjectId();if(null!=s)return s;const r="imagery"===t.type?void 0:"objectIdField"in t?t.objectIdField||C:null,o=e.attributes;return o&&r&&o[r]||e}_mapIncludesLayer(e){return!!this.map?.allLayers?.includes(e)}async _highlightFeature(e,t){this.removeHandles(e);const i=this[t];if(!i)return;const{highlightEnabled:s,view:r,open:o}=this;if(!r||!s||!o)return;const n=this._getHighlightLayer(i);if(!n)return;const a=this._getHighlightLayerView(r,n);if(!a)return;this._highlightPromises[e]=a;const l=await a;if(!(l&&j(l)&&this._highlightPromises[e]===a&&this[t]&&this.highlightEnabled))return;const u=l.highlight(this._getHighlightTarget(i,n,r.type));this.addHandles(u,e)}async _highlightActiveFeature(){return this._highlightFeature("highlight-active-feature","activeFeature")}async _highlightSelectedFeature(){return this._highlightFeature("highlight-selected-feature","selectedFeature")}_updateFeatures(e){const{features:t}=this,i=e.filter(e=>!t.includes(e));i?.length&&(this.features=t.concat(i))}};e([g()],N.prototype,"_fetchFeaturesController",void 0),e([g({type:E})],N.prototype,"actions",void 0),e([g({readOnly:!0})],N.prototype,"active",null),e([g()],N.prototype,"activeFeature",void 0),e([g({readOnly:!0})],N.prototype,"allActions",null),e([g()],N.prototype,"browseClusterEnabled",void 0),e([g({value:null})],N.prototype,"content",null),e([g({type:E,readOnly:!0})],N.prototype,"defaultActions",null),e([g({type:Boolean})],N.prototype,"defaultPopupTemplateEnabled",void 0),e([g({readOnly:!0})],N.prototype,"featureCount",null),e([g()],N.prototype,"featurePage",void 0),e([g({value:[]})],N.prototype,"features",null),e([g()],N.prototype,"featuresPerPage",void 0),e([g()],N.prototype,"featureMenuOpen",void 0),e([g()],N.prototype,"featureMenuTitle",void 0),e([g({type:I})],N.prototype,"featureItemAbilities",void 0),e([g({readOnly:!0})],N.prototype,"featureItems",void 0),e([g()],N.prototype,"highlightEnabled",void 0),e([g()],N.prototype,"includeDefaultActions",void 0),e([g()],N.prototype,"initialDisplayMode",void 0),e([g({type:f})],N.prototype,"location",null),e([g()],N.prototype,"map",null),e([g({readOnly:!0})],N.prototype,"pendingPromisesCount",null),e([g({readOnly:!0})],N.prototype,"promiseCount",null),e([g()],N.prototype,"promises",null),e([g({readOnly:!0})],N.prototype,"selectedClusterBoundaryFeature",void 0),e([g({value:null,readOnly:!0})],N.prototype,"selectedFeature",null),e([g({value:-1})],N.prototype,"selectedFeatureIndex",null),e([g({readOnly:!0})],N.prototype,"selectedFeatureItem",null),e([g({type:F})],N.prototype,"spatialReference",null),e([g({readOnly:!0})],N.prototype,"state",null),e([g()],N.prototype,"timeZone",null),e([g()],N.prototype,"heading",void 0),e([g()],N.prototype,"updateLocationEnabled",void 0),e([g()],N.prototype,"view",void 0),e([g()],N.prototype,"open",void 0),e([g({readOnly:!0})],N.prototype,"waitingForContents",null),e([g({readOnly:!0})],N.prototype,"waitingForResult",null),e([g()],N.prototype,"zoomFactor",void 0),N=e([m("esri.popup.Features")],N);const W=N;export{W as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../Graphic.js";import{isSome as i}from"../core/arrayUtils.js";import s from"../core/Error.js";import{EventedAccessor as r}from"../core/Evented.js";import o from"../core/Logger.js";import{abortMaybe as n}from"../core/maybe.js";import{debounce as a,isAbortError as l}from"../core/promiseUtils.js";import u from"../core/ReactiveSet.js";import{watch as h,when as c,sync as p}from"../core/reactiveUtils.js";import{addMany as d}from"../core/SetUtils.js";import{property as g,subclass as m}from"../core/accessorSupport/decorators.js";import f from"../geometry/Point.js";import{initializeProjection as y,project as _}from"../geometry/projectionUtils.js";import F from"../geometry/SpatialReference.js";import{geographicToWebMercator as w}from"../geometry/support/webMercatorUtils.js";import{getGraphicLayer as v}from"../graphic/graphicOriginUtils.js";import{fallbackObjectIDAttribute as C}from"../layers/LayerConstants.js";import b from"./Feature.js";import I from"./support/FeatureAbilities.js";import P from"../symbols/SimpleFillSymbol.js";import{getDisplayedSymbol as A}from"../symbols/support/symbolUtils.js";import{system as L}from"../time/constants.js";import{highlightsSupported as j}from"../views/support/layerViewUtils.js";import{ActionsCollection as E,zoomToClusteredFeatures as x,browseClusteredFeatures as R,zoomToFeature as O}from"../widgets/Popup/actions.js";import{isClusterFeature as U,removeClusteredFeaturesForBrowsing as S,displayClusterExtent as T,browseAggregateFeatures as B,getSelectedTarget as H}from"../widgets/Popup/actionUtils.js";import{GoTo as G}from"../widgets/support/GoTo.js";const M="location-scale-handle",V=()=>[O.clone()],Z=()=>[x.clone(),R.clone()];let D=null;function z(e,t){switch(e){case"building-scene":case"map-image":case"tile":case"imagery":return!0;case"imagery-tile":return"2d"===t;default:return!1}}let N=class extends(G(r)){constructor(e){super(e),this._pendingPromises=new u,this._fetchFeaturesController=null,this._centerAtLocationController=null,this._locationUpdateController=null,this._highlightPromises={"highlight-active-feature":null,"highlight-selected-feature":null},this._selectedClusterFeature=null,this.actions=new E,this.activeFeature=null,this.browseClusterEnabled=!1,this.defaultPopupTemplateEnabled=!1,this.featurePage=null,this.featuresPerPage=20,this.featureMenuOpen=!1,this.featureItemAbilities=null,this.featureItems=[],this.highlightEnabled=!0,this.includeDefaultActions=!0,this.initialDisplayMode="feature",this.selectedClusterBoundaryFeature=new t({symbol:new P({outline:{width:1.5,color:"cyan"},style:"none"})}),this.heading=null,this.updateLocationEnabled=!1,this.view=null,this.open=!1,this.zoomFactor=4,this._debouncedLocationUpdate=a(async e=>{this._cancelLocationUpdate();const t=new AbortController,{signal:i}=t;this._locationUpdateController=t,await this._locationUpdate(e,{signal:i}).catch(()=>{}).finally(()=>{this._locationUpdateController===t&&(this._locationUpdateController=null)})})}initialize(){this.addHandles([h(()=>[this.highlightEnabled,this.selectedFeature,this.open,this.view],()=>this._highlightSelectedFeature()),h(()=>[this.highlightEnabled,this.activeFeature,this.open,this.view],()=>this._highlightActiveFeature()),h(()=>this.location,e=>this._locationChange(e)),h(()=>this.selectedFeature,e=>this._selectedFeatureChange(e)),h(()=>[this.selectedFeatureIndex,this.featureCount,this.featuresPerPage],()=>this._selectedFeatureIndexChange()),h(()=>[this.featurePage,this.selectedFeatureIndex,this.featureCount,this.featuresPerPage,this.featureItems],()=>this._setGraphicOnFeatureItems()),h(()=>this.featureItems,()=>this._featureItemsChange()),h(()=>[this.featureItemAbilities?.attachmentsContent,this.featureItemAbilities?.chartAnimation,this.featureItemAbilities?.customContent,this.featureItemAbilities?.expressionContent,this.featureItemAbilities?.fieldsContent,this.featureItemAbilities?.mediaContent,this.featureItemAbilities?.relationshipContent,this.featureItemAbilities?.textContent,this.featureItemAbilities?.utilityNetworkAssociationsContent,this.features,this.map,this.spatialReference,this.timeZone],()=>this._updateFeatureItems()),c(()=>!this.waitingForResult,()=>this._waitingForResultChange(),p),h(()=>this.view?.scale,()=>this._viewScaleChange()),c(()=>!this.open,()=>this.browseClusterEnabled=!1),h(()=>this.browseClusterEnabled,e=>e?this.enableClusterBrowsing():this.disableClusterBrowsing())])}destroy(){this._cancelLocationUpdate(),this._cancelFetchingFeatures(),this._cancelCenterAtLocation(),this._clearBrowsedClusterGraphics(),this._pendingPromises.clear(),this.browseClusterEnabled=!1,this.view=null,this.map=null,this.spatialReference=null,this.timeZone=null}get active(){return this.open&&!this.waitingForResult}get allActions(){const e=this._get("allActions")||new E;e.removeAll();const{actions:t,defaultActions:s,defaultPopupTemplateEnabled:r,includeDefaultActions:o,selectedFeature:n}=this,a=o?s.concat(t):t,l=n&&("function"==typeof n.getEffectivePopupTemplate&&n.getEffectivePopupTemplate(r)||n.popupTemplate),u=l?.actions,h=l?.overwriteActions?u:u?.concat(a)??a;return h?.filter(i).forEach(t=>e.add(t)),e}set content(e){this.promises=[],this._set("content",e)}get defaultActions(){const e=this._get("defaultActions")||new E;return e.removeAll(),e.addMany(U(this.selectedFeature)?Z():V()),e}get featureCount(){return this.features.length}set features(e){if(this._get("features")===e)return;const t=e||[];this._set("features",t);const{pendingPromisesCount:i,promiseCount:s,selectedFeatureIndex:r}=this,o=s&&t.length;"list"!==this.initialDisplayMode?o&&i&&-1===r?this.selectedFeatureIndex=0:o&&-1!==r||(this.selectedFeatureIndex=t.length?0:-1):(!o||o&&i===s)&&(this.selectedFeatureIndex=-1)}set location(e){let t=e;const i=this.spatialReference?.isWebMercator,s=e?.spatialReference?.isWGS84;s&&i&&(t=w(e)),this._set("location",t)}get map(){return this.view?.map??null}set map(e){this._override("map",e)}get pendingPromisesCount(){return this._pendingPromises.size}get promiseCount(){return this.promises.length}get promises(){return this._get("promises")||[]}set promises(e){this._get("promises")!==e&&(this._pendingPromises.clear(),this.features=[],Array.isArray(e)&&e.length?(this._set("promises",e),e=e.slice(),d(this._pendingPromises,e),e.reduce((e,t)=>e.finally(()=>t.then(e=>{this._pendingPromises.has(t)&&this._updateFeatures(e)}).finally(()=>this._pendingPromises.delete(t)).catch(()=>{})),Promise.resolve())):this._set("promises",[]))}get selectedFeature(){const{features:e,selectedFeatureIndex:t}=this;if(-1===t)return null;return e[t]||null}get selectedFeatureIndex(){const e=this._get("selectedFeatureIndex");return"number"==typeof e?e:-1}set selectedFeatureIndex(e){const{featureCount:t}=this;(isNaN(e)||e<0||!t)&&(e=-1),this.activeFeature=null,this._set("selectedFeatureIndex",e)}get selectedFeatureItem(){return this.featureItems[this.selectedFeatureIndex]||null}get spatialReference(){return this.view?.spatialReference??null}set spatialReference(e){this._override("spatialReference",e)}get state(){const{view:e,map:t}=this;return e?e.ready?"ready":"disabled":t?"ready":"disabled"}get timeZone(){return this.view?.timeZone??L}set timeZone(e){this._overrideIfSome("timeZone",e)}get waitingForContents(){return this.featureItems.some(e=>e.waitingForContent)}get waitingForResult(){return(!!this._fetchFeaturesController||this.pendingPromisesCount>0)&&0===this.featureCount}zoomTo(e){return this.callGoTo(e)}clear(){this.set({promises:[],features:[],content:null,heading:null,location:null,activeFeature:null})}fetchFeatures(e,t){const{view:i}=this;if(!i||!e)throw new s("fetch-features:invalid-screenpoint-or-view","Cannot fetch features without a screenPoint and view.",{screenPoint:e,view:i});return i.fetchPopupFeatures(e,{pointerType:t?.event?.pointerType,defaultPopupTemplateEnabled:this.defaultPopupTemplateEnabled,signal:t?.signal})}next(){return this.selectedFeatureIndex=this._getRoundRobinIndex(this.selectedFeatureIndex+1,this.featureCount),this}previous(){return this.selectedFeatureIndex=this._getRoundRobinIndex(this.selectedFeatureIndex-1,this.featureCount),this}disableClusterBrowsing(){S(this),this._clearBrowsedClusterGraphics()}async enableClusterBrowsing(){const{view:e,selectedFeature:t}=this;"2d"===e?.type?U(t)?(await T(this),await B(this)):o.getLogger(this).warn("enableClusterBrowsing:invalid-selectedFeature: Selected feature must represent an aggregate/cluster graphic.",t):o.getLogger(this).warn("enableClusterBrowsing:invalid-view: View must be 2d MapView.",t)}async handleViewClick(e){return this._fetchFeaturesAndOpen(e)}_centerAtLocation(){const{view:e}=this,t=H(this);this._cancelCenterAtLocation();const i=new AbortController,{signal:r}=i;return this._centerAtLocationController=i,t&&e?this.callGoTo({target:{target:t,scale:e.scale},options:{signal:r}}).catch(e=>{l(e)||o.getLogger(this).error(e)}):Promise.reject(new s("center-at-location:invalid-target-or-view","Cannot center at a location without a target and view.",{target:t,view:e}))}_getRoundRobinIndex(e,t){return(e+t)%t}_clearBrowsedClusterGraphics(){const e=[this.selectedClusterBoundaryFeature,this._selectedClusterFeature].filter(i);this.view?.graphics?.removeMany(e),this._selectedClusterFeature=null,this.selectedClusterBoundaryFeature.geometry=null}_viewScaleChange(){if(U(this.selectedFeature))return this.browseClusterEnabled=!1,this.open=!1,void this.clear();this.browseClusterEnabled&&(this.features=this.selectedFeature?[this.selectedFeature]:[])}_locationChange(e){const{selectedFeature:t,updateLocationEnabled:i,view:s}=this;s&&!this._locationUpdateController&&i&&e&&(!t||t.geometry)&&this._centerAtLocation()}_selectedFeatureIndexChange(){this.featurePage=this.featureCount>0?Math.floor(this.selectedFeatureIndex/this.featuresPerPage)+1:null}_featureItemsChange(){this.featurePage=this.featureCount>0?1:null}_setGraphicOnFeatureItems(){const{features:e,featureCount:t,featurePage:i,featuresPerPage:s,featureItems:r}=this;if(null==i)return;const o=((i-1)*s+t)%t,n=o+s;r.slice(o,n).forEach((t,i)=>{t&&(t.graphic??=e[o+i])})}async _selectedFeatureChange(e){const{location:t,updateLocationEnabled:i,view:s}=this;if(!e||!s)return;if(this.browseClusterEnabled){if(this._selectedClusterFeature&&(s.graphics.remove(this._selectedClusterFeature),this._selectedClusterFeature=null),U(e))return;return e.symbol=await A(e),this._selectedClusterFeature=e,void s.graphics.add(this._selectedClusterFeature)}const r=v(e)?.type;if("map-image"!==r&&"imagery"!==r&&"imagery-tile"!==r||(e.symbol=await A(e)),(i||!t)&&e.geometry){if("point"===e.geometry.type)return void(this.location=e.geometry);const t=await import("../geometry/operators/labelPointOperator.js");return void(this.location=t.execute(e.geometry))}if(i&&!e.geometry){await this._centerAtLocation();const e=s.center?.clone();e&&(this.location=e)}}_waitingForResultChange(){!this.featureCount&&this.promises&&(this.open=!1)}_destroyFeatureItems(){this.featureItems.forEach(e=>e&&!e.destroyed&&e.destroy()),this._set("featureItems",[])}_updateFeatureItems(){const e=this.selectedFeature,t=this.features,i=this.featureItems,s=this.view,r=this.spatialReference,o=this.map,n=this.timeZone,a=this.location,l=this.featureItemAbilities??new I;if(U(t[0])||(this.browseClusterEnabled=!1),!t?.length)return void this._destroyFeatureItems();const u=i.slice(),h=[];t.forEach((t,i)=>{if(!t)return;const c=u.findIndex(e=>e?.graphic===t);if(-1!==c){const e=u[c];u.splice(c,1),e.abilities=l,h[i]=e}else{const u=new b({abilities:l,defaultPopupTemplateEnabled:this.defaultPopupTemplateEnabled,spatialReference:r,graphic:t===e?t:null,location:a,map:o,view:s,timeZone:n});h[i]=u}}),u.forEach(e=>e&&!e.destroyed&&e.destroy()),this._set("featureItems",h)}async _getScreenPoint(e,t){const{spatialReference:i,view:s}=this;if(!s)return null;await s.when();const r=e?.spatialReference;return r&&i?(await y(r,i,null,t),s.toScreen(e)):null}_cancelCenterAtLocation(){this._centerAtLocationController=n(this._centerAtLocationController)}_cancelFetchingFeatures(){this._fetchFeaturesController=n(this._fetchFeaturesController)}async _projectScreenPointAndFetchFeatures({mapPoint:e,screenPoint:t,event:i,signal:s}){return this.fetchFeatures(t??await this._getScreenPoint(e??this.location,{signal:s}),{signal:s,event:i})}_fetchFeaturesWithController({mapPoint:e,screenPoint:t,event:i}){this._cancelFetchingFeatures();const s=new AbortController,{signal:r}=s;this._fetchFeaturesController=s;const o=this._projectScreenPointAndFetchFeatures({mapPoint:e,screenPoint:t,signal:r,event:i});return o.catch(()=>{}).finally(()=>{this._fetchFeaturesController===s&&(this._fetchFeaturesController=null)}),o}async _fetchFeaturesAndOpen(e){const{mapPoint:t,screenPoint:i}=e;this.removeHandles(M),this.addHandles([h(()=>this.view?.scale,()=>this._debouncedLocationUpdate(t).catch(e=>{l(e)||o.getLogger(this).error(e)})),c(()=>!this.open,()=>{this.removeHandles(M)},{once:!0})],M);const{pendingFeatures:s}=await this._fetchFeaturesWithController({mapPoint:t,screenPoint:i,event:e});return{location:t??void 0,promises:s}}async _locationUpdate(e,t){const{spatialReference:i}=this,s=this.selectedFeature?.geometry?.type,r=this.location??e;if(s&&"mesh"!==s&&i&&r&&this.selectedFeature){if("point"===s){const e=await import("../geometry/operators/labelPointOperator.js");return void(this.location=e.execute(this.selectedFeature.geometry))}try{const e=this.selectedFeature;let s=e.geometry;const o=this._getHighlightLayer(e),n=e.getObjectId();if(!o||!this.view)return;if(n){const e=this.view?.allLayerViews.find(e=>e.layer.uid===o.uid);if(!e||!("queryFeatures"in e))return;const r=e.createQuery();r.outSpatialReference=i,r.objectIds=[n],r.returnGeometry=!0;const{features:a}=await e.queryFeatures(r,t);s=a[0]?.geometry}if(!s||"mesh"===s.type)return;s=_(s,i),D??=await Promise.all([import("../geometry/operators/intersectsOperator.js"),import("../geometry/operators/proximityOperator.js")]);const[a,l]=D;if(!a.execute(s,r)){const t=l.getNearestCoordinate(s,r).coordinate??r;this.selectedFeature===e&&(this.location=t)}}catch(n){l(n)||o.getLogger(this).error(n)}}}_cancelLocationUpdate(){this._locationUpdateController=n(this._locationUpdateController)}async _getLayerView(e,t){return await e.when(),e.whenLayerView(t)}_getHighlightLayer(e){const t=v(e),{layer:i}=e;return t&&"layer"in t&&t.layer?t.layer:"map-notes"===t?.type||"subtype-group"===t?.type?t:i??t}_getHighlightLayerView(e,t){return"subtype-sublayer"===t.type&&t.parent&&this._mapIncludesLayer(t.parent)?this._getLayerView(e,t.parent):t&&this._mapIncludesLayer(t)?this._getLayerView(e,t):null}_getHighlightTarget(e,t,i){if(z(t.type,i))return e;const s=e.getObjectId();if(null!=s)return s;const r="imagery"===t.type?void 0:"objectIdField"in t?t.objectIdField||C:null,o=e.attributes;return o&&r&&o[r]||e}_mapIncludesLayer(e){return!!this.map?.allLayers?.includes(e)}async _highlightFeature(e,t){this.removeHandles(e);const i=this[t];if(!i)return;const{highlightEnabled:s,view:r,open:o}=this;if(!r||!s||!o)return;const n=this._getHighlightLayer(i);if(!n)return;const a=this._getHighlightLayerView(r,n);if(!a)return;this._highlightPromises[e]=a;const l=await a;if(!(l&&j(l)&&this._highlightPromises[e]===a&&this[t]&&this.highlightEnabled))return;const u=l.highlight(this._getHighlightTarget(i,n,r.type));this.addHandles(u,e)}async _highlightActiveFeature(){return this._highlightFeature("highlight-active-feature","activeFeature")}async _highlightSelectedFeature(){return this._highlightFeature("highlight-selected-feature","selectedFeature")}_updateFeatures(e){const{features:t}=this,i=e.filter(e=>!t.includes(e));i?.length&&(this.features=t.concat(i))}};e([g()],N.prototype,"_fetchFeaturesController",void 0),e([g({type:E})],N.prototype,"actions",void 0),e([g({readOnly:!0})],N.prototype,"active",null),e([g()],N.prototype,"activeFeature",void 0),e([g({readOnly:!0})],N.prototype,"allActions",null),e([g()],N.prototype,"browseClusterEnabled",void 0),e([g({value:null})],N.prototype,"content",null),e([g({type:E,readOnly:!0})],N.prototype,"defaultActions",null),e([g({type:Boolean})],N.prototype,"defaultPopupTemplateEnabled",void 0),e([g({readOnly:!0})],N.prototype,"featureCount",null),e([g()],N.prototype,"featurePage",void 0),e([g({value:[]})],N.prototype,"features",null),e([g()],N.prototype,"featuresPerPage",void 0),e([g()],N.prototype,"featureMenuOpen",void 0),e([g({type:I})],N.prototype,"featureItemAbilities",void 0),e([g({readOnly:!0})],N.prototype,"featureItems",void 0),e([g()],N.prototype,"highlightEnabled",void 0),e([g()],N.prototype,"includeDefaultActions",void 0),e([g()],N.prototype,"initialDisplayMode",void 0),e([g({type:f})],N.prototype,"location",null),e([g()],N.prototype,"map",null),e([g({readOnly:!0})],N.prototype,"pendingPromisesCount",null),e([g({readOnly:!0})],N.prototype,"promiseCount",null),e([g()],N.prototype,"promises",null),e([g({readOnly:!0})],N.prototype,"selectedClusterBoundaryFeature",void 0),e([g({value:null,readOnly:!0})],N.prototype,"selectedFeature",null),e([g({value:-1})],N.prototype,"selectedFeatureIndex",null),e([g({readOnly:!0})],N.prototype,"selectedFeatureItem",null),e([g({type:F})],N.prototype,"spatialReference",null),e([g({readOnly:!0})],N.prototype,"state",null),e([g()],N.prototype,"timeZone",null),e([g()],N.prototype,"heading",void 0),e([g()],N.prototype,"updateLocationEnabled",void 0),e([g()],N.prototype,"view",void 0),e([g()],N.prototype,"open",void 0),e([g({readOnly:!0})],N.prototype,"waitingForContents",null),e([g({readOnly:!0})],N.prototype,"waitingForResult",null),e([g()],N.prototype,"zoomFactor",void 0),N=e([m("esri.popup.Features")],N);const W=N;export{W as default};
|
|
@@ -28,7 +28,7 @@ export interface AttachmentsContentProperties extends BaseContentProperties, Par
|
|
|
28
28
|
*
|
|
29
29
|
* | Preview view | List view |
|
|
30
30
|
* | ---- | ---- |
|
|
31
|
-
* | |  |
|
|
32
32
|
*
|
|
33
33
|
* @since 4.11
|
|
34
34
|
* @see [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/)
|
|
@@ -6,7 +6,7 @@ export interface BarChartMediaInfoProperties extends ChartMediaInfoProperties {}
|
|
|
6
6
|
/**
|
|
7
7
|
* A `BarChartMediaInfo` is a type of chart media element that represents a bar chart displayed within a popup.
|
|
8
8
|
*
|
|
9
|
-
* 
|
|
10
10
|
*
|
|
11
11
|
* @since 4.11
|
|
12
12
|
* @see [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/)
|