@arcgis/core 5.0.0-next.70 → 5.0.0-next.71
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/analysis/Dimension/types.d.ts +5 -1
- package/analysis/DistanceMeasurementAnalysis.d.ts +22 -3
- package/analysis/ElevationProfile/types.d.ts +10 -2
- package/analysis/ShadowCast/DiscreteOptions.d.ts +4 -0
- package/analysis/ShadowCast/MinDurationOptions.d.ts +7 -0
- package/analysis/ShadowCast/TotalDurationOptions.d.ts +4 -0
- package/analysis/ShadowCastAnalysis.d.ts +51 -8
- package/analysis/Slice/types.d.ts +5 -1
- package/analysis/VolumeMeasurement/types.d.ts +5 -1
- package/analysis/VolumeMeasurement/volumeMeasurementConfiguration.js +1 -1
- package/analysis/types.d.ts +39 -7
- package/applications/Components/QuantityFormatter.js +1 -1
- package/applications/Components/imageryUtils.d.ts +2 -2
- package/applications/Components/testUtils.d.ts +2 -0
- package/applications/KnowledgeStudio/dataModelVisualization.d.ts +1 -0
- package/applications/KnowledgeStudio/generalSdkInternalAccess.d.ts +59 -13
- package/applications/KnowledgeStudio/generalSharedKgUtils.d.ts +1 -1
- package/applications/PortalApp/layerUtils.d.ts +1 -0
- package/applications/Urban/LineImagePattern3D.d.ts +2 -0
- package/applications/Urban/imagePatternUtils.d.ts +4 -0
- package/arcade.d.ts +20 -11
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/1b284a6f32effe28aafc.js +1 -0
- package/assets/esri/core/workers/chunks/1bd5b421152fb0f46aa5.js +37 -0
- package/assets/esri/core/workers/chunks/{2e2c47f8a80ee9234350.js → 1d8fc0239c907ff5d1e8.js} +1 -1
- package/assets/esri/core/workers/chunks/{244006d4b0547d574401.js → 25abbe1663e18e677dc2.js} +143 -140
- package/assets/esri/core/workers/chunks/{c448540065690cac0744.js → 6087d5dc40bb62ec48c8.js} +1 -1
- package/assets/esri/core/workers/chunks/{866477acdf03b8a40bc9.js → bd1d159dce4094694c93.js} +1 -1
- package/assets/esri/core/workers/chunks/{401ce5cb98fa14c1a725.js → d8a7004c399d539aed09.js} +1 -1
- package/assets/esri/core/workers/chunks/{8d6641d0f7c93f83c414.js → db9c7182847e8f96ffe3.js} +1 -1
- package/assets/esri/core/workers/chunks/{6c9dac4a869742cc2718.js → e246b256347a281c13fd.js} +1 -1
- package/assets/esri/core/workers/chunks/{a10c6dd3bb8b3602de68.js → ee175fd4ec706f7878c0.js} +1 -1
- package/assets/esri/core/workers/chunks/f65b27fc0bc2f242aac7.js +1 -0
- package/assets/esri/core/workers/chunks/{5dd5be91038df8902dc4.js → f7dfbf24859f4ac2421b.js} +1 -1
- package/config.js +1 -1
- package/core/Version.d.ts +11 -2
- package/core/accessorSupport/types.d.ts +35 -5
- package/core/quantityFormatUtils.js +1 -1
- package/core/sql/types.d.ts +226 -31
- package/core/types.d.ts +24 -4
- package/editing/sharedTemplates/types.d.ts +1 -0
- package/editing/types.d.ts +2 -0
- package/effects/types.d.ts +1 -0
- package/form/ExpressionInfo.d.ts +1 -1
- package/form/FormTemplate.d.ts +4 -4
- package/form/elements/GroupElement.d.ts +1 -1
- package/form/elements/RelationshipElement.d.ts +3 -3
- package/form/elements/inputs/attachments/AttachmentInput.d.ts +2 -1
- package/form/elements/inputs/attachments/AudioInput.d.ts +1 -0
- package/form/elements/inputs/attachments/DocumentInput.d.ts +1 -0
- package/form/elements/inputs/attachments/ImageInput.d.ts +1 -0
- package/form/elements/inputs/attachments/Input.d.ts +5 -1
- package/form/elements/inputs/attachments/SignatureInput.d.ts +1 -0
- package/form/elements/inputs/attachments/VideoInput.d.ts +1 -0
- package/form/elements/inputs/attachments/types.d.ts +12 -3
- package/form/elements/inputs.d.ts +2 -2
- package/form/types.d.ts +3 -0
- package/geometry/geometryEngineTypes.d.ts +49 -9
- package/geometry/operators/types.d.ts +29 -4
- package/geometry/support/MeshVertexAttributes.d.ts +21 -2
- package/geometry/support/meshUtils/types.d.ts +126 -18
- package/geometry/types.d.ts +37 -6
- package/ground/NavigationConstraint.d.ts +3 -0
- package/identity/IdentityManagerBase.d.ts +153 -27
- package/interfaces.d.ts +27 -27
- package/intl/date.d.ts +5 -0
- package/intl/locale.d.ts +1 -0
- package/intl/messages.d.ts +12 -2
- package/intl/number.d.ts +5 -0
- package/intl/substitute.d.ts +28 -5
- package/intl/t9n.d.ts +13 -2
- package/kernel.js +1 -1
- package/layers/GaussianSplatLayer.d.ts +87 -6
- package/layers/ImageryTileLayer.d.ts +8 -8
- package/layers/LinkChartLayer.d.ts +1 -1
- package/layers/buildingSublayers/utils.d.ts +1 -0
- package/layers/effects/types.d.ts +12 -2
- package/layers/graphics/editingSupport.d.ts +202 -38
- package/layers/graphics/sources/ParquetSource.d.ts +23 -4
- package/layers/knowledgeGraph/IdTypePair.d.ts +15 -3
- package/layers/knowledgeGraph/KnowledgeGraphLayerDataManager.d.ts +61 -9
- package/layers/knowledgeGraph/LayoutMode.d.ts +1 -0
- package/layers/knowledgeGraph/dataModelVisualizationUtils.d.ts +6 -0
- package/layers/media/types.d.ts +25 -4
- package/layers/mixins/ArcGISImageService.d.ts +8 -9
- package/layers/mixins/ArcGISMapService.d.ts +5 -1
- package/layers/mixins/EditBusLayer.d.ts +3 -5
- package/layers/mixins/ImageryTileMixin.d.ts +2 -4
- package/layers/mixins/RasterJobHandlerMixin.js +1 -1
- package/layers/mixins/ScaleRange.d.ts +11 -2
- package/layers/mixins/properties/ILayerWithGetFeatureTitle.d.ts +11 -2
- package/layers/mixins/properties/ILayerWithGetField.d.ts +6 -1
- package/layers/ogc/ogcFeatureUtils.d.ts +2 -0
- package/layers/ogc/types.d.ts +55 -10
- package/layers/ogc/wcsUtils.d.ts +1 -0
- package/layers/ogc/wfsUtils.d.ts +8 -17
- package/layers/orientedImagery/core/ElevationSourceDefinitions.d.ts +6 -1
- package/layers/orientedImagery/transformations/types.d.ts +117 -21
- package/layers/orientedImagery/types.d.ts +37 -6
- package/layers/pointCloudFilters/typeUtils.d.ts +1 -0
- package/layers/raster/datasets/TIFFRaster.js +1 -1
- package/layers/raster/datasets/pixelReader.d.ts +2 -0
- package/layers/raster/datasets/types.d.ts +1 -0
- package/layers/raster/datasets/wcsCapabilitiesParser.d.ts +86 -17
- package/layers/raster/datasets/wcsCoverageParser.d.ts +601 -115
- package/layers/raster/formats/ImageCanvasDecoder.js +1 -1
- package/layers/raster/formats/JpgPlus.js +1 -1
- package/layers/raster/formats/RasterCodec.js +1 -1
- package/layers/raster/formats/Raw.js +1 -1
- package/layers/raster/formats/TiffDecoder.js +1 -1
- package/layers/raster/functions/changeDetectionUtils.d.ts +1 -0
- package/layers/raster/functions/creators/createAppearenceFunctions.d.ts +82 -15
- package/layers/raster/functions/creators/createBandIndexFunctions.d.ts +380 -70
- package/layers/raster/functions/creators/createChangeFunctions.d.ts +11 -2
- package/layers/raster/functions/creators/createConversionFunctions.d.ts +18 -3
- package/layers/raster/functions/creators/createDataManagementFunctions.d.ts +179 -35
- package/layers/raster/functions/creators/createLocalFunctions.d.ts +47 -9
- package/layers/raster/functions/creators/createMultiRasterAnalysisFunctions.d.ts +47 -9
- package/layers/raster/functions/creators/createStatisticsFunctions.d.ts +42 -8
- package/layers/raster/functions/creators/createSurfaceFunctions.d.ts +72 -11
- package/layers/raster/functions/focalStatUtils.d.ts +1 -0
- package/layers/raster/functions/rasterProjectionHelper.js +1 -1
- package/layers/raster/functions/types.d.ts +29 -5
- package/layers/raster/types.d.ts +498 -6
- package/layers/support/BuildingFilterBlock.d.ts +19 -3
- package/layers/support/BuildingFilterMode.d.ts +1 -0
- package/layers/support/BuildingFilterModeSolid.d.ts +7 -1
- package/layers/support/BuildingFilterModeWireFrame.d.ts +17 -3
- package/layers/support/BuildingFilterModeXRay.d.ts +7 -1
- package/layers/support/CodedValue.d.ts +16 -3
- package/layers/support/ControlPoint.d.ts +17 -3
- package/layers/support/EditFieldsInfo.d.ts +21 -4
- package/layers/support/EditingCapabilities.d.ts +36 -7
- package/layers/support/ElevationTileData.d.ts +25 -5
- package/layers/support/FieldFormat.d.ts +1 -0
- package/layers/support/GeoreferenceBase.d.ts +1 -0
- package/layers/support/KMLMapImage.d.ts +13 -2
- package/layers/support/LabelExpressionInfo.d.ts +9 -1
- package/layers/support/MosaicRule.d.ts +41 -1
- package/layers/support/ParquetGeometryEncodingLocation.d.ts +13 -2
- package/layers/support/ParquetGeometryEncodingWkb.d.ts +7 -0
- package/layers/support/PixelBlock.d.ts +9 -4
- package/layers/support/PurgeOptions.d.ts +15 -2
- package/layers/support/RasterInfo.d.ts +1 -2
- package/layers/support/RasterJobHandler.js +1 -1
- package/layers/support/RasterWorker.js +1 -1
- package/layers/support/SpriteSource.d.ts +28 -6
- package/layers/support/rasterFunctionConstants.d.ts +39 -0
- package/layers/support/types.d.ts +420 -225
- package/layers/types.d.ts +771 -196
- package/layers/video/types.d.ts +72 -14
- package/layers/voxel/VoxelColorStop.d.ts +17 -3
- package/layers/voxel/VoxelFormat.d.ts +15 -2
- package/layers/voxel/VoxelIsosurface.d.ts +17 -2
- package/layers/voxel/VoxelOpacityStop.d.ts +8 -1
- package/layers/voxel/VoxelRangeFilter.d.ts +12 -2
- package/layers/voxel/VoxelUniqueValue.d.ts +19 -3
- package/layers/wms/types.d.ts +104 -19
- package/layers/wmts/types.d.ts +1 -0
- package/linkChart/ChronologicalLayoutSettings.d.ts +1 -1
- package/linkChart/OrganicLayoutSettings.d.ts +1 -1
- package/linkChart/types.d.ts +2 -0
- package/networks/UtilityNetworkTraceAnalysis.d.ts +61 -10
- package/networks/support/jsonTypes.d.ts +373 -71
- package/networks/support/typeUtils.d.ts +10 -0
- package/networks/support/utils.d.ts +30 -6
- package/package.json +1 -1
- package/popup/content/types.d.ts +1 -0
- package/popup/types.d.ts +33 -5
- package/portal/jsonTypes.d.ts +231 -39
- package/portal/support/resourceUtils.d.ts +49 -9
- package/portal/types.d.ts +98 -14
- package/renderers/FlowRenderer.js +1 -1
- package/renderers/RasterStretchRenderer.d.ts +1 -1
- package/renderers/support/AuthoringInfoClassBreakInfo.d.ts +4 -0
- package/renderers/support/AuthoringInfoFieldInfo.d.ts +15 -2
- package/renderers/support/DotDensityLegendOptions.d.ts +4 -0
- package/renderers/support/HeatmapLegendOptions.d.ts +8 -0
- package/renderers/support/OthersCategory.d.ts +6 -0
- package/renderers/support/RendererLegendOptions.d.ts +14 -2
- package/renderers/support/pointCloud/ColorClassBreakInfo.d.ts +13 -1
- package/renderers/support/pointCloud/ColorModulation.d.ts +6 -0
- package/renderers/support/pointCloud/ColorUniqueValueInfo.d.ts +19 -3
- package/renderers/support/pointCloud/PointSizeAlgorithm.d.ts +1 -0
- package/renderers/support/pointCloud/PointSizeFixedSizeAlgorithm.d.ts +14 -2
- package/renderers/support/pointCloud/PointSizeSplatAlgorithm.d.ts +9 -1
- package/renderers/support/pointCloud/types.d.ts +7 -1
- package/renderers/support/raster/types.d.ts +22 -2
- package/renderers/support/types.d.ts +29 -2
- package/renderers/types.d.ts +47 -4
- package/renderers/visualVariables/support/SizeVariableLegendOptions.d.ts +4 -0
- package/renderers/visualVariables/support/VisualVariableLegendOptions.d.ts +9 -1
- package/request/types.d.ts +152 -24
- package/rest/featureService/types.d.ts +423 -77
- package/rest/geometryService/types.d.ts +23 -1
- package/rest/imageService.d.ts +5 -5
- package/rest/knowledgeGraph/DataModel.d.ts +2 -2
- package/rest/knowledgeGraph/GraphAnyValue.d.ts +1 -0
- package/rest/knowledgeGraph/GraphDataModelSingletonOperationResult.d.ts +12 -2
- package/rest/knowledgeGraph/GraphDeleteNamedTypeResult.d.ts +1 -1
- package/rest/knowledgeGraph/GraphDeletePropertyResult.d.ts +1 -1
- package/rest/knowledgeGraph/GraphQuery.d.ts +1 -1
- package/rest/knowledgeGraph/GraphSearch.d.ts +3 -3
- package/rest/knowledgeGraph/GraphSearchStreaming.d.ts +3 -3
- package/rest/knowledgeGraph/SearchIndex.d.ts +1 -1
- package/rest/knowledgeGraph/toolService/findPaths/CIMFilteredFindPathsPathFilter.d.ts +3 -3
- package/rest/knowledgeGraph/toolService/findPaths/CIMFilteredFindPathsResultJSON.d.ts +151 -29
- package/rest/knowledgeGraph/toolService/findPaths/CIMKGTraversalDirection.d.ts +1 -1
- package/rest/knowledgeGraph/wasmInterface/KnowledgeWasmInterface.d.ts +1 -0
- package/rest/knowledgeGraph/wasmInterface/WasmDataModelWrapperInterfaces.d.ts +9 -0
- package/rest/knowledgeGraphService.d.ts +4 -4
- package/rest/lastMileDelivery/types.d.ts +5 -0
- package/rest/layerSources/DynamicDataLayer.d.ts +12 -0
- package/rest/layerSources/DynamicMapLayer.d.ts +14 -2
- package/rest/layerSources/JoinTableDataSource.d.ts +21 -2
- package/rest/layerSources/QueryTableDataSource.d.ts +32 -5
- package/rest/layerSources/RasterDataSource.d.ts +17 -3
- package/rest/layerSources/TableDataSource.d.ts +22 -4
- package/rest/networks/circuits/support/ExportCircuitsParameters.d.ts +8 -1
- package/rest/networks/circuits/support/QueryCircuitsParameters.d.ts +18 -3
- package/rest/networks/support/QueryNamedTraceConfigurationsParameters.d.ts +22 -4
- package/rest/query/support/AttachmentInfo.d.ts +1 -1
- package/rest/support/AddressToLocationsParameters.d.ts +39 -3
- package/rest/support/AddressesToLocationsParameters.d.ts +14 -0
- package/rest/support/BaseImageMeasureResultValue.d.ts +21 -4
- package/rest/support/DirectionsString.d.ts +16 -3
- package/rest/support/ImageMeasureResultAngleValue.d.ts +12 -2
- package/rest/support/ImageMeasureResultAreaValue.d.ts +12 -2
- package/rest/support/ImageMeasureResultLengthValue.d.ts +12 -2
- package/rest/support/LocateSetting.d.ts +12 -2
- package/rest/support/LocateSettingBase.d.ts +14 -2
- package/rest/support/LocateSettingSource.d.ts +12 -2
- package/rest/support/LocateSettings.d.ts +22 -4
- package/rest/support/LocateSettingsOverrides.d.ts +42 -8
- package/rest/support/LocationToAddressParameters.d.ts +7 -0
- package/rest/support/NetworkAttribute.d.ts +11 -2
- package/rest/support/NetworkServiceDescription.d.ts +20 -4
- package/rest/support/QuantizationParameters.d.ts +9 -0
- package/rest/support/SuggestLocationsParameters.d.ts +10 -0
- package/rest/support/SuggestionCandidate.d.ts +14 -2
- package/rest/support/types.d.ts +53 -3
- package/rest/types.d.ts +50 -5
- package/rest/versionManagement/gdbVersion/support/AlterVersionParameters.d.ts +22 -4
- package/rest/versionManagement/gdbVersion/support/PostResult.d.ts +6 -1
- package/rest/versionManagement/gdbVersion/support/ReconcileParameters.d.ts +10 -1
- package/rest/versionManagement/gdbVersion/support/ReconcileResult.d.ts +8 -1
- package/rest/versionManagement/support/CreateVersionParameters.d.ts +13 -2
- package/rest/versionManagement/support/GetVersionInfosParameters.d.ts +8 -1
- package/smartMapping/heuristics/types.d.ts +50 -6
- package/smartMapping/popup/types.d.ts +29 -5
- package/smartMapping/raster/renderers/types.d.ts +12 -1
- package/smartMapping/raster/support/adapters/types.d.ts +1 -0
- package/smartMapping/renderers/color.d.ts +9 -3
- package/smartMapping/renderers/dotDensity.d.ts +3 -1
- package/smartMapping/renderers/heatmap.d.ts +3 -1
- package/smartMapping/renderers/location.d.ts +3 -1
- package/smartMapping/renderers/opacity.d.ts +3 -1
- package/smartMapping/renderers/pieChart.d.ts +3 -1
- package/smartMapping/renderers/predominance.d.ts +3 -1
- package/smartMapping/renderers/relationship.d.ts +3 -1
- package/smartMapping/renderers/size.d.ts +23 -7
- package/smartMapping/renderers/support/rendererUtils.d.ts +3 -1
- package/smartMapping/renderers/type.d.ts +3 -1
- package/smartMapping/renderers/univariateColorSize.d.ts +3 -1
- package/smartMapping/statistics/types.d.ts +16 -4
- package/smartMapping/symbology/type.d.ts +5 -1
- package/smartMapping/symbology/types.d.ts +1303 -241
- package/smartMapping/types.d.ts +5 -0
- package/statistics/types.d.ts +13 -2
- package/support/revision.js +1 -1
- package/symbols/callouts/LineCallout3DBorder.d.ts +4 -0
- package/symbols/cim/types.d.ts +764 -111
- package/symbols/patterns/LinePattern3D.d.ts +1 -0
- package/symbols/patterns/Pattern3D.d.ts +1 -0
- package/symbols/support/IconSymbol3DLayerResource.d.ts +7 -0
- package/symbols/support/ObjectSymbol3DLayerResource.d.ts +7 -0
- package/symbols/support/OccludedVisibility.d.ts +3 -0
- package/symbols/support/Symbol3DAnchorPosition2D.d.ts +4 -0
- package/symbols/support/Symbol3DAnchorPosition3D.d.ts +5 -0
- package/symbols/support/Symbol3DFillMaterial.d.ts +4 -0
- package/symbols/support/Symbol3DHalo.d.ts +10 -0
- package/symbols/support/Symbol3DIconOutline.d.ts +10 -0
- package/symbols/support/Symbol3DMaterial.d.ts +6 -0
- package/symbols/support/Symbol3DOutline.d.ts +21 -2
- package/symbols/support/Symbol3DTextBackground.d.ts +12 -2
- package/symbols/support/symbolUtils.d.ts +5 -1
- package/symbols/support/types.d.ts +4 -0
- package/symbols/types.d.ts +67 -7
- package/tables/AttributeTableTemplate.d.ts +2 -2
- package/tables/elements/AttributeTableAttachmentElement.d.ts +1 -1
- package/tables/elements/AttributeTableElement.d.ts +2 -2
- package/tables/elements/AttributeTableFieldElement.d.ts +1 -1
- package/tables/elements/AttributeTableGroupElement.d.ts +1 -1
- package/tables/elements/AttributeTableRelationshipElement.d.ts +1 -1
- package/tables/support/FieldOrder.d.ts +16 -3
- package/tables/support/tablesUtils.d.ts +1 -0
- package/time/types.d.ts +4 -0
- package/versionManagement/VersionManagementService.d.ts +3 -6
- package/versionManagement/VersionManager.d.ts +126 -23
- package/versionManagement/VersioningState.d.ts +1 -1
- package/versionManagement/support/jsonTypes.d.ts +152 -30
- package/versionManagement/support/type.d.ts +2 -0
- package/versionManagement/versionAdapters/types.d.ts +25 -5
- package/views/2d/MapViewConstraints.d.ts +37 -5
- package/views/2d/analysis/AnalysisView2D.d.ts +5 -1
- package/views/2d/analysis/AreaMeasurementAnalysisView2D.d.ts +28 -4
- package/views/2d/analysis/DistanceMeasurementAnalysisView2D.d.ts +28 -4
- package/views/2d/analysis/types.d.ts +5 -1
- package/views/2d/engine/flow/BrushFlow.js +1 -1
- package/views/2d/engine/flow/FlowDisplayObject.js +1 -1
- package/views/2d/engine/flow/FlowStrategy.js +1 -1
- package/views/2d/engine/flow/FlowView2D.js +1 -1
- package/views/2d/engine/flow/ProcessingTimeEstimate.js +5 -0
- package/views/2d/engine/flow/animatedValues.js +5 -0
- package/views/2d/engine/flow/dataUtils.js +1 -1
- package/views/2d/engine/flow/flowPathsIO.js +5 -0
- package/views/2d/engine/flow/styles/AFlowResources.js +5 -0
- 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/flow/utils.js +1 -1
- package/views/2d/engine/vectorTiles/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/support/MediaLayerInteractionOptions.d.ts +1 -0
- package/views/2d/layers/types.d.ts +1 -0
- package/views/2d/types.d.ts +93 -6
- package/views/3d/analysis/AnalysisView3D.d.ts +5 -1
- package/views/3d/analysis/DirectLineMeasurement/types.d.ts +24 -4
- package/views/3d/analysis/LineOfSight/types.d.ts +1 -0
- package/views/3d/analysis/ShadowCastAnalysisView3D.d.ts +19 -3
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/types.d.ts +5 -1
- package/views/3d/analysis/types.d.ts +25 -3
- package/views/3d/constraints/AltitudeConstraint.d.ts +5 -0
- package/views/3d/constraints/ClipDistanceConstraint.d.ts +13 -2
- package/views/3d/constraints/Constraints.d.ts +26 -4
- package/views/3d/constraints/TiltConstraint.d.ts +5 -0
- package/views/3d/environment/SceneViewEnvironment.d.ts +9 -0
- package/views/3d/environment/types.d.ts +3 -0
- package/views/3d/layers/ImageryLayerView3D.js +1 -1
- package/views/3d/layers/support/MediaLayerInteractionOptions.d.ts +15 -2
- package/views/3d/layers/support/MediaLayerInteractionReshapeOptions.d.ts +3 -0
- package/views/3d/types.d.ts +52 -0
- package/views/3d/webgl/ManagedColorAttachment.d.ts +2 -0
- package/views/3d/webgl/ManagedDepthAttachment.d.ts +2 -0
- package/views/3d/webgl/ManagedFBO.d.ts +4 -0
- package/views/3d/webgl/ManagedFBOAttachment.d.ts +1 -0
- package/views/3d/webgl/ManagedFBOResource.d.ts +5 -0
- package/views/3d/webgl/types.d.ts +32 -6
- package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +20 -22
- package/views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js +9 -5
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/TerrainTexture.glsl.js +8 -6
- package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +9 -8
- package/views/MapViewOrSceneView.d.ts +1 -0
- package/views/SceneView.d.ts +59 -0
- package/views/SceneView.js +1 -1
- package/views/View.d.ts +2 -2
- package/views/View2D.d.ts +37 -0
- package/views/View2D.js +1 -1
- package/views/Viewport2DMixin.d.ts +9 -6
- package/views/analysis/AnalysisView.d.ts +2 -0
- package/views/analysis/AreaMeasurement/types.d.ts +18 -3
- package/views/analysis/DistanceMeasurement/types.d.ts +13 -2
- package/views/analysis/types.d.ts +7 -1
- package/views/animation/easing.js +1 -1
- package/views/animation/types.d.ts +3 -4
- package/views/draw/CursorUpdateEvent.d.ts +24 -4
- package/views/draw/DrawAction.d.ts +4 -6
- package/views/draw/DrawCompleteEvent.d.ts +18 -3
- package/views/draw/VertexAddEvent.d.ts +19 -3
- package/views/draw/VertexRemoveEvent.d.ts +19 -3
- package/views/draw/types.d.ts +4 -0
- package/views/input/types.d.ts +371 -57
- package/views/interactive/sketch/SketchTooltipVisibleElements.d.ts +19 -1
- package/views/interactive/sketch/Units.d.ts +5 -0
- package/views/interactive/tooltip/types.d.ts +2 -0
- package/views/layers/HighlightLayerViewMixin.d.ts +59 -1
- package/views/layers/HighlightLayerViewMixin.js +1 -1
- package/views/layers/ImageryLayerViewMixin.d.ts +60 -2
- package/views/layers/ImageryTileLayerViewMixin.d.ts +2 -0
- package/views/layers/LayerView.d.ts +6 -0
- package/views/layers/MediaLayerViewMixin.d.ts +8 -1
- package/views/layers/types.d.ts +3 -0
- package/views/navigation/types.d.ts +6 -1
- package/views/support/AttributionItem.d.ts +10 -2
- package/views/types.d.ts +306 -53
- package/views/ui/types.d.ts +42 -6
- package/webdoc/Widgets.d.ts +26 -5
- package/webdoc/geotriggersInfo/support/typeUtils.d.ts +3 -0
- package/webdoc/support/SlideThumbnail.d.ts +4 -0
- package/webdoc/support/types.d.ts +11 -2
- package/webdoc/support/webdocSaveUtils.d.ts +6 -0
- package/webdoc/widgets/FloorFilter.d.ts +25 -4
- package/webmap/Version.d.ts +1 -0
- package/webscene/Version.d.ts +1 -0
- package/webscene/support/Description.d.ts +3 -0
- package/webscene/support/SlideEnvironment.d.ts +6 -0
- package/webscene/support/SlideGround.d.ts +7 -1
- package/webscene/support/SlideVisibleLayer.d.ts +5 -0
- package/webscene/support/Title.d.ts +3 -0
- package/widgets/Attachments/types.d.ts +32 -6
- package/widgets/BasemapGallery/types.d.ts +3 -0
- package/widgets/BasemapLayerList/BasemapLayerListVisibleElements.d.ts +14 -0
- package/widgets/BasemapLayerList/types.d.ts +1 -0
- package/widgets/BatchAttributeForm/VisibleElements.d.ts +7 -1
- package/widgets/BatchAttributeForm/inputs/SingleFeatureInput.d.ts +2 -0
- package/widgets/BatchAttributeForm/inputs/TextElementInput.d.ts +14 -2
- package/widgets/BatchAttributeForm/inputs/types.d.ts +2 -0
- package/widgets/BatchAttributeForm/types.d.ts +75 -14
- package/widgets/BatchAttributeForm.d.ts +2 -2
- package/widgets/Bookmarks/BookmarksVisibleElements.d.ts +30 -9
- package/widgets/Bookmarks/types.d.ts +32 -10
- package/widgets/CatalogLayerList/CatalogLayerListVisibleElements.d.ts +11 -0
- package/widgets/CatalogLayerList/types.d.ts +1 -0
- package/widgets/Daylight/VisibleElements.d.ts +11 -1
- package/widgets/Daylight/types.d.ts +8 -2
- package/widgets/DirectionalPad/VisibleElements.d.ts +6 -0
- package/widgets/DirectionalPad/types.d.ts +13 -2
- package/widgets/Directions/DirectionsVisibleElements.d.ts +8 -0
- package/widgets/Editor/CreateFeaturesWorkflowData.d.ts +3 -3
- package/widgets/Editor/EditorViewModel.d.ts +2 -3
- package/widgets/Editor/Edits.d.ts +1 -2
- package/widgets/Editor/SplitFeatureWorkflow.d.ts +2 -2
- package/widgets/Editor/VisibleElements.d.ts +46 -13
- package/widgets/Editor/support/EditorEditingCapabilities.d.ts +46 -9
- package/widgets/Editor/types.d.ts +149 -24
- package/widgets/ElevationProfile/ElevationProfileVisibleElements.d.ts +13 -1
- package/widgets/ElevationProfile/types.d.ts +87 -14
- package/widgets/Expand.d.ts +2 -2
- package/widgets/Feature/types.d.ts +105 -18
- package/widgets/FeatureForm/GroupInput.d.ts +1 -1
- package/widgets/FeatureForm/RelationshipInput.d.ts +1 -1
- package/widgets/FeatureForm/TextElementInput.d.ts +3 -5
- package/widgets/FeatureForm/UtilityNetworkAssociationInput.d.ts +1 -1
- package/widgets/FeatureForm/VisibleElements.d.ts +7 -1
- package/widgets/FeatureForm/types.d.ts +3 -0
- package/widgets/FeatureForm.d.ts +1 -1
- package/widgets/FeatureTable/ColumnMenuVisibleElements.d.ts +4 -0
- package/widgets/FeatureTable/FeatureTableViewModel.d.ts +14 -4
- package/widgets/FeatureTable/Grid/Column.d.ts +1 -1
- package/widgets/FeatureTable/Grid/GridViewModel.d.ts +2 -0
- package/widgets/FeatureTable/Grid/types.d.ts +137 -24
- package/widgets/FeatureTable/TableMenuVisibleElements.d.ts +10 -0
- package/widgets/FeatureTable/VisibleElements.d.ts +16 -2
- package/widgets/FeatureTable/support/ColumnTemplateBase.d.ts +1 -1
- package/widgets/FeatureTable/support/types.d.ts +155 -27
- package/widgets/FeatureTable.d.ts +3 -3
- package/widgets/FeatureTemplates/VisibleElements.d.ts +4 -0
- package/widgets/FeatureTemplates/types.d.ts +17 -2
- package/widgets/Features/FeaturesVisibleElements.d.ts +12 -0
- package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
- package/widgets/Histogram/types.d.ts +14 -2
- package/widgets/HistogramRangeSlider/types.d.ts +1 -0
- package/widgets/LayerList/LayerListVisibleElements.d.ts +10 -0
- package/widgets/LayerList/types.d.ts +8 -0
- package/widgets/Legend/styles/card/CardView.d.ts +13 -2
- package/widgets/Legend/styles/classic/ClassicView.d.ts +11 -2
- package/widgets/Measurement/types.d.ts +3 -0
- package/widgets/OrientedImageryViewer/types.d.ts +15 -3
- package/widgets/Popup/PopupVisibleElements.d.ts +11 -0
- package/widgets/Popup/types.d.ts +64 -7
- package/widgets/Print/FileLink.d.ts +36 -6
- package/widgets/Print/types.d.ts +77 -13
- package/widgets/ScaleRangeSlider/types.d.ts +4 -0
- package/widgets/ScaleRangeSlider.d.ts +5 -1
- package/widgets/ShadowCast/ShadowCastVisibleElements.d.ts +15 -1
- package/widgets/ShadowCast/types.d.ts +8 -2
- package/widgets/Sketch/CreateToolVisibilityMap.d.ts +19 -4
- package/widgets/Sketch/SelectionToolVisibilityMap.d.ts +4 -0
- package/widgets/Sketch/VisibleElements.d.ts +38 -6
- package/widgets/Sketch/types.d.ts +364 -60
- package/widgets/Slider/types.d.ts +249 -46
- package/widgets/Swipe/types.d.ts +6 -0
- package/widgets/TableList/TableListVisibleElements.d.ts +11 -0
- package/widgets/TableList/types.d.ts +5 -0
- package/widgets/TimeSlider/types.d.ts +45 -7
- package/widgets/Track/types.d.ts +4 -1
- package/widgets/UtilityNetworkAssociations/VisibleElements.d.ts +23 -4
- package/widgets/UtilityNetworkAssociations/VisibleElementsSettingsPane.d.ts +7 -0
- package/widgets/UtilityNetworkTrace/types.d.ts +26 -5
- package/widgets/ValuePicker/ValuePickerBaseComponent.d.ts +2 -0
- package/widgets/ValuePicker/ValuePickerSliderVisibleElements.d.ts +7 -1
- package/widgets/ValuePicker/ValuePickerVisibleElements.d.ts +9 -1
- package/widgets/ValuePicker/types.d.ts +8 -0
- package/widgets/Weather/VisibleElements.d.ts +6 -1
- package/widgets/Weather/types.d.ts +1 -0
- package/widgets/smartMapping/types.d.ts +63 -6
- package/widgets/support/GridControls/VisibleElements.d.ts +11 -0
- package/widgets/support/GridControls/types.d.ts +1 -0
- package/widgets/support/SnappingControls/VisibleElements.d.ts +26 -4
- package/widgets/support/forms/types.d.ts +2 -0
- package/widgets/support/types.d.ts +19 -3
- package/widgets/types.d.ts +549 -89
- package/assets/esri/core/workers/chunks/329b10897c6965948b84.js +0 -1
- package/assets/esri/core/workers/chunks/35593a9790818b689455.js +0 -1
- package/assets/esri/core/workers/chunks/98d68b145226e7527c84.js +0 -33
- package/views/2d/engine/flow/FlowDisplayData.js +0 -5
|
@@ -24,29 +24,65 @@ import type { FieldValue } from "../../../layers/support/fieldUtils.js";
|
|
|
24
24
|
import type { ObjectId } from "../../../views/types.js";
|
|
25
25
|
import type { CellValue, Direction } from "../Grid/types.js";
|
|
26
26
|
|
|
27
|
+
/** @since 5.0 */
|
|
27
28
|
export interface FieldValueFormatFunctionParameters extends FormatFunctionParameters {}
|
|
28
29
|
|
|
30
|
+
/** @since 5.0 */
|
|
29
31
|
export interface FormatFunctionParameters {
|
|
30
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* _(Since 4.31)_ A reference to attachments for the associated feature.
|
|
34
|
+
*
|
|
35
|
+
* @since 5.0
|
|
36
|
+
*/
|
|
31
37
|
attachments?: AttachmentInfo[] | null;
|
|
32
|
-
/**
|
|
38
|
+
/**
|
|
39
|
+
* A reference to this specific Column.
|
|
40
|
+
*
|
|
41
|
+
* @since 5.0
|
|
42
|
+
*/
|
|
33
43
|
column: Column;
|
|
34
|
-
/**
|
|
44
|
+
/**
|
|
45
|
+
* A reference to the feature represented by the associated row.
|
|
46
|
+
*
|
|
47
|
+
* @since 5.0
|
|
48
|
+
*/
|
|
35
49
|
feature: Graphic;
|
|
36
|
-
/**
|
|
50
|
+
/**
|
|
51
|
+
* The field associated with the column.
|
|
52
|
+
*
|
|
53
|
+
* @since 5.0
|
|
54
|
+
*/
|
|
37
55
|
field?: Field | null;
|
|
38
|
-
/**
|
|
56
|
+
/**
|
|
57
|
+
* Index of the associated row being rendered.
|
|
58
|
+
*
|
|
59
|
+
* @since 5.0
|
|
60
|
+
*/
|
|
39
61
|
index: number;
|
|
40
|
-
/**
|
|
62
|
+
/**
|
|
63
|
+
* _(Since 4.31)_ A reference to related records for the associated feature.
|
|
64
|
+
*
|
|
65
|
+
* @since 5.0
|
|
66
|
+
*/
|
|
41
67
|
relatedRecords?: RelatedRecordInfo[] | null;
|
|
42
|
-
/**
|
|
68
|
+
/**
|
|
69
|
+
* Current projected value of the cell.
|
|
70
|
+
*
|
|
71
|
+
* @since 5.0
|
|
72
|
+
*/
|
|
43
73
|
value: CellValue;
|
|
44
|
-
/**
|
|
74
|
+
/**
|
|
75
|
+
* _(Since 4.31)_ Virtual index of the associated row being rendered. Unlike `index`, a row's `virtualIndex` changes as the table scrolls. The first row in the DOM has a `virtualIndex` of 0. As rows are added/removed from the DOM, the virtual index adjusts before it renders. This can help with performance when rendering large datasets.
|
|
76
|
+
*
|
|
77
|
+
* @since 5.0
|
|
78
|
+
*/
|
|
45
79
|
virtualIndex: number;
|
|
46
80
|
}
|
|
47
81
|
|
|
82
|
+
/** @since 5.0 */
|
|
48
83
|
export type FeatureTableSupportedLayer = CatalogFootprintLayer | CSVLayer | FeatureLayer | GeoJSONLayer | ImageryLayer | KnowledgeGraphSublayer | SceneLayer | WFSLayer | OrientedImageryLayer | ParquetLayer | Sublayer;
|
|
49
84
|
|
|
85
|
+
/** @since 5.0 */
|
|
50
86
|
export type FeatureTableSupportedColumn = Column;
|
|
51
87
|
|
|
52
88
|
/**
|
|
@@ -54,6 +90,7 @@ export type FeatureTableSupportedColumn = Column;
|
|
|
54
90
|
*
|
|
55
91
|
* @param params - An object containing information about the associated row and feature.
|
|
56
92
|
* @returns Formatted content to be displayed in the cell.
|
|
93
|
+
* @since 5.0
|
|
57
94
|
*/
|
|
58
95
|
export type FormatFunction = (params: FormatFunctionParameters) => CellValue | HTMLElement;
|
|
59
96
|
|
|
@@ -62,46 +99,72 @@ export type FormatFunction = (params: FormatFunctionParameters) => CellValue | H
|
|
|
62
99
|
*
|
|
63
100
|
* @param params - An object containing information about the associated row and feature.
|
|
64
101
|
* @returns Formatted content to be displayed in the cell.
|
|
102
|
+
* @since 5.0
|
|
65
103
|
*/
|
|
66
104
|
export type FieldValueFormatFunction = (params: FieldValueFormatFunctionParameters) => FieldValue | HTMLElement;
|
|
67
105
|
|
|
106
|
+
/** @since 5.0 */
|
|
68
107
|
export type FeatureTableSupportedFilters = GeometryFilter | SelectionFilter;
|
|
69
108
|
|
|
70
109
|
/**
|
|
71
110
|
* Use this for spatial filtering, it is the [Geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Geometry.html) used to filter out data within the table.
|
|
72
111
|
*
|
|
112
|
+
* @since 5.0
|
|
73
113
|
* @see [FeatureTableViewModel#filterGeometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-FeatureTableViewModel.html#filterGeometry)
|
|
74
114
|
* @see [FeatureTableViewModel#activeFilters](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-FeatureTableViewModel.html#activeFilters)
|
|
75
115
|
* @see [Sample - FeatureTable using a map](https://developers.arcgis.com/javascript/latest/sample-code/widgets-featuretable-map/)
|
|
76
116
|
*/
|
|
77
117
|
export interface GeometryFilter extends TableFilter {
|
|
78
|
-
/**
|
|
118
|
+
/**
|
|
119
|
+
* The geometry used to filter out the table's data.
|
|
120
|
+
*
|
|
121
|
+
* @since 5.0
|
|
122
|
+
*/
|
|
79
123
|
geometry: GeometryUnion;
|
|
80
|
-
/**
|
|
124
|
+
/**
|
|
125
|
+
* The type of the filter used. This will always read as `"geometry"`.
|
|
126
|
+
*
|
|
127
|
+
* @since 5.0
|
|
128
|
+
*/
|
|
81
129
|
type: "geometry";
|
|
82
130
|
}
|
|
83
131
|
|
|
84
132
|
/**
|
|
85
133
|
* Use this for selecting rows within the table based off of their object ID.
|
|
86
134
|
*
|
|
135
|
+
* @since 5.0
|
|
87
136
|
* @see [FeatureTableViewModel#filterBySelection()](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-FeatureTableViewModel.html#filterBySelection)
|
|
88
137
|
* @see [FeatureTableViewModel#activeFilters](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-FeatureTableViewModel.html#activeFilters)
|
|
89
138
|
*/
|
|
90
139
|
export interface SelectionFilter extends TableFilter {
|
|
91
|
-
/**
|
|
140
|
+
/**
|
|
141
|
+
* An array of numbers indicating the row's object IDs.
|
|
142
|
+
*
|
|
143
|
+
* @since 5.0
|
|
144
|
+
*/
|
|
92
145
|
objectIds: ObjectId[];
|
|
93
|
-
/**
|
|
146
|
+
/**
|
|
147
|
+
* The type of the filter used. This will always read as `"selection"`.
|
|
148
|
+
*
|
|
149
|
+
* @since 5.0
|
|
150
|
+
*/
|
|
94
151
|
type: "selection";
|
|
95
152
|
}
|
|
96
153
|
|
|
154
|
+
/** @since 5.0 */
|
|
97
155
|
export interface TableFilter {
|
|
98
|
-
/**
|
|
156
|
+
/**
|
|
157
|
+
* The type of the filter used.
|
|
158
|
+
*
|
|
159
|
+
* @since 5.0
|
|
160
|
+
*/
|
|
99
161
|
type: string;
|
|
100
162
|
}
|
|
101
163
|
|
|
102
164
|
/**
|
|
103
165
|
* An array of objects containing a column's name and sort direction. This is used in conjunction with [FeatureTableViewModel#activeSortOrders](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-FeatureTableViewModel.html#activeSortOrders) to help retain a column's sort order while querying.
|
|
104
166
|
*
|
|
167
|
+
* @since 5.0
|
|
105
168
|
* @see [FeatureTableViewModel#activeSortOrders](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-FeatureTableViewModel.html#activeSortOrders)
|
|
106
169
|
*/
|
|
107
170
|
export interface ColumnSortOrder {
|
|
@@ -113,18 +176,37 @@ export interface ColumnSortOrder {
|
|
|
113
176
|
* asc | Sorts the column in ascending order.
|
|
114
177
|
* desc | Sorts the column in descending order.
|
|
115
178
|
* null | No sort is applied to the column.
|
|
179
|
+
*
|
|
180
|
+
* @since 5.0
|
|
116
181
|
*/
|
|
117
182
|
direction: Direction;
|
|
118
|
-
/**
|
|
183
|
+
/**
|
|
184
|
+
* The field name as defined by the layer. Set this property to indicate which column to sort. This should match the field name as defined at the feature service level.
|
|
185
|
+
*
|
|
186
|
+
* @since 5.0
|
|
187
|
+
*/
|
|
119
188
|
fieldName: string;
|
|
120
189
|
}
|
|
121
190
|
|
|
191
|
+
/** @since 5.0 */
|
|
122
192
|
export interface ActionColumnCallbackParameters {
|
|
123
|
-
/**
|
|
193
|
+
/**
|
|
194
|
+
* A reference to the associated feature.
|
|
195
|
+
*
|
|
196
|
+
* @since 5.0
|
|
197
|
+
*/
|
|
124
198
|
feature: Graphic;
|
|
125
|
-
/**
|
|
199
|
+
/**
|
|
200
|
+
* The index of the associated row.
|
|
201
|
+
*
|
|
202
|
+
* @since 5.0
|
|
203
|
+
*/
|
|
126
204
|
index: number;
|
|
127
|
-
/**
|
|
205
|
+
/**
|
|
206
|
+
* A reference to the interaction event.
|
|
207
|
+
*
|
|
208
|
+
* @since 5.0
|
|
209
|
+
*/
|
|
128
210
|
native: MouseEvent | KeyboardEvent;
|
|
129
211
|
}
|
|
130
212
|
|
|
@@ -132,12 +214,14 @@ export interface ActionColumnCallbackParameters {
|
|
|
132
214
|
* Function called when an action is clicked or pressed.
|
|
133
215
|
*
|
|
134
216
|
* @param params - An object containing information about the associated row and feature.
|
|
217
|
+
* @since 5.0
|
|
135
218
|
*/
|
|
136
219
|
export type ActionColumnCallback = (params: ActionColumnCallbackParameters) => void;
|
|
137
220
|
|
|
138
221
|
/**
|
|
139
222
|
* Configuration for the [FeatureTable's actionColumn](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#actionColumn).
|
|
140
223
|
*
|
|
224
|
+
* @since 5.0
|
|
141
225
|
* @example
|
|
142
226
|
* // The following snippet demonstrates how to configure an action column that adds a button to each row which allows the user to zoom to the associated row's feature within the view.
|
|
143
227
|
* featureTable.viewModel.actionColumnConfig = {
|
|
@@ -149,22 +233,51 @@ export type ActionColumnCallback = (params: ActionColumnCallbackParameters) => v
|
|
|
149
233
|
* }
|
|
150
234
|
*/
|
|
151
235
|
export interface ActionColumnConfig {
|
|
152
|
-
/**
|
|
236
|
+
/**
|
|
237
|
+
* Callback function invoked when the action is clicked or activated via the keyboard.
|
|
238
|
+
*
|
|
239
|
+
* @since 5.0
|
|
240
|
+
*/
|
|
153
241
|
callback: ActionColumnCallback;
|
|
154
|
-
/**
|
|
242
|
+
/**
|
|
243
|
+
* Indicates if a specific action should be conditionally disabled.
|
|
244
|
+
*
|
|
245
|
+
* @since 5.0
|
|
246
|
+
*/
|
|
155
247
|
disabled?: ActionColumnDisabledFunction | boolean;
|
|
156
|
-
/**
|
|
248
|
+
/**
|
|
249
|
+
* Indicates the column should be frozen to the end of the table.
|
|
250
|
+
*
|
|
251
|
+
* @since 5.0
|
|
252
|
+
*/
|
|
157
253
|
frozenToEnd?: boolean;
|
|
158
|
-
/**
|
|
254
|
+
/**
|
|
255
|
+
* The string value indicating the [Calcite icon](https://developers.arcgis.com/calcite-design-system/icons/) displayed for the action.
|
|
256
|
+
*
|
|
257
|
+
* @since 5.0
|
|
258
|
+
*/
|
|
159
259
|
icon?: Icon["icon"];
|
|
160
|
-
/**
|
|
260
|
+
/**
|
|
261
|
+
* The accessible label to display when hovering over the action.
|
|
262
|
+
*
|
|
263
|
+
* @since 5.0
|
|
264
|
+
*/
|
|
161
265
|
label: string;
|
|
162
266
|
}
|
|
163
267
|
|
|
268
|
+
/** @since 5.0 */
|
|
164
269
|
export interface ActionColumnDisabledParameters {
|
|
165
|
-
/**
|
|
270
|
+
/**
|
|
271
|
+
* The feature to use when determining if the action should be disabled.
|
|
272
|
+
*
|
|
273
|
+
* @since 5.0
|
|
274
|
+
*/
|
|
166
275
|
feature: Graphic;
|
|
167
|
-
/**
|
|
276
|
+
/**
|
|
277
|
+
* The row's index position when determining if the action should be disabled.
|
|
278
|
+
*
|
|
279
|
+
* @since 5.0
|
|
280
|
+
*/
|
|
168
281
|
index: number;
|
|
169
282
|
}
|
|
170
283
|
|
|
@@ -173,17 +286,32 @@ export interface ActionColumnDisabledParameters {
|
|
|
173
286
|
*
|
|
174
287
|
* @param params - An object containing information about an associated row and feature.
|
|
175
288
|
* @returns Indicates whether the action should be disabled.
|
|
289
|
+
* @since 5.0
|
|
176
290
|
*/
|
|
177
291
|
export type ActionColumnDisabledFunction = (params: ActionColumnDisabledParameters) => boolean;
|
|
178
292
|
|
|
179
|
-
/**
|
|
293
|
+
/**
|
|
294
|
+
* The related records for the associated feature used in the [Columns's](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-Grid-Column.html#formatFunction) and [FieldColumn's](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-support-types.html#FieldValueFormatFunction) `formatFunction`.
|
|
295
|
+
*
|
|
296
|
+
* @since 5.0
|
|
297
|
+
*/
|
|
180
298
|
export interface RelatedRecordInfo {
|
|
181
|
-
/**
|
|
299
|
+
/**
|
|
300
|
+
* The number of related records associated with the feature.
|
|
301
|
+
*
|
|
302
|
+
* @since 5.0
|
|
303
|
+
*/
|
|
182
304
|
count: number;
|
|
183
|
-
/**
|
|
305
|
+
/**
|
|
306
|
+
* The ID of the relationship defined in the data source.
|
|
307
|
+
*
|
|
308
|
+
* @since 5.0
|
|
309
|
+
*/
|
|
184
310
|
relationshipId: number;
|
|
185
311
|
}
|
|
186
312
|
|
|
313
|
+
/** @since 5.0 */
|
|
187
314
|
export type SupportedColumnTemplates = ColumnTemplate | FieldColumnTemplate | GroupColumnTemplate | AttachmentsColumnTemplate | RelationshipColumnTemplate;
|
|
188
315
|
|
|
316
|
+
/** @since 5.0 */
|
|
189
317
|
export type GroupColumnSupportedTemplates = Exclude<SupportedColumnTemplates, GroupColumnTemplate>;
|
|
@@ -414,7 +414,7 @@ export interface FeatureTableEvents extends FeatureTableViewModelEvents {}
|
|
|
414
414
|
* ```
|
|
415
415
|
* 
|
|
416
416
|
*
|
|
417
|
-
* Additionally, selection and highlight behavior can be enhanced using the feature table's [events](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#FeatureTableEvents). These events are designed to listen for cell interaction and include: [@cell-click](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#event-cell-click),
|
|
417
|
+
* Additionally, selection and highlight behavior can be enhanced using the feature table's [events](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#FeatureTableEvents). These events are designed to listen for cell interaction and include: [@cell-click](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#event-cell-click), [@cell-keydown](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#event-cell-keydown), [@cell-pointerout](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#event-cell-pointerout), and [@cell-pointerover](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#event-cell-pointerover). The latter two events are especially useful for tasks such as highlighting a feature in the view while hovering over a cell, all doing so without requiring the end-user to select the row. For example, these events can be used to display cell information in a tooltip that is attached to the mouse cursor.
|
|
418
418
|
*
|
|
419
419
|
* > In short, the [highlightIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#highlightIds) property is used to control and synchronize selections between the FeatureTable and other components of the SDK, whereas [rowHighlightIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#rowHighlightIds) is for adding a highlight to some rows, based on some other interaction within the application. It allows the ability to select specific rows based on actions performed in the application, such as hovering over a feature on the map or applying a filter through another widget.
|
|
420
420
|
*
|
|
@@ -432,7 +432,7 @@ export interface FeatureTableEvents extends FeatureTableViewModelEvents {}
|
|
|
432
432
|
* * **Filtering by time**- To achieve this, configure the [timeExtent](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#timeExtent) property to a time extent. Once configured, the table will exclusively show rows corresponding to features that are within the defined time extent.
|
|
433
433
|
* **Filtering by selection and geometry**- This is accomplished by setting both the [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#objectIds) and [filterGeometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#filterGeometry) properties. When set, the table will only display rows for features that match the corresponding object ID and and intersect the geometry.
|
|
434
434
|
*
|
|
435
|
-
* It is possible to control sort order individually per column or on multiple columns. The latter is accomplished by setting the [multiSortEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#multiSortEnabled) property to `true`. When set, the table will allow sorting on multiple columns. The table's [sortColumn()](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#sortColumn) method is used to sort columns. This method takes the field name and sort order as parameters. The sort order can be set to either `asc` or `desc`. The priority of columns and their sort order can be set using
|
|
435
|
+
* It is possible to control sort order individually per column or on multiple columns. The latter is accomplished by setting the [multiSortEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#multiSortEnabled) property to `true`. When set, the table will allow sorting on multiple columns. The table's [sortColumn()](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#sortColumn) method is used to sort columns. This method takes the field name and sort order as parameters. The sort order can be set to either `asc` or `desc`. The priority of columns and their sort order can be set using [FieldColumnTemplate#initialSortPriority](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-support-FieldColumnTemplate.html#initialSortPriority). This property is used to set the initial sort priority for a column.
|
|
436
436
|
*
|
|
437
437
|
* > [!WARNING]
|
|
438
438
|
* >
|
|
@@ -721,7 +721,7 @@ export default class FeatureTable extends Widget<FeatureTableProperties> {
|
|
|
721
721
|
*/
|
|
722
722
|
get activeFilters(): Collection<FeatureTableSupportedFilters>;
|
|
723
723
|
/**
|
|
724
|
-
* Use this read-only property if needing to query features while retaining a column's sort order. It returns an array of [ColumnSortOrder](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-support-types.html#ColumnSortOrder) which contains a column's name and its sort direction. The sort priority is honored in the returned [ColumnSortOrder](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-support-types.html#ColumnSortOrder) if [multiSortEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#multiSortEnabled) is `true` with a set
|
|
724
|
+
* Use this read-only property if needing to query features while retaining a column's sort order. It returns an array of [ColumnSortOrder](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-support-types.html#ColumnSortOrder) which contains a column's name and its sort direction. The sort priority is honored in the returned [ColumnSortOrder](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-support-types.html#ColumnSortOrder) if [multiSortEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#multiSortEnabled) is `true` with a set [FieldColumnTemplate#initialSortPriority](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-support-FieldColumnTemplate.html#initialSortPriority).
|
|
725
725
|
*
|
|
726
726
|
* @default []
|
|
727
727
|
* @since 4.25
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
import type Accessor from "../../core/Accessor.js";
|
|
2
2
|
|
|
3
|
+
/** @since 5.0 */
|
|
3
4
|
export interface VisibleElementsProperties extends Partial<Pick<VisibleElements, "filter">> {}
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* The visible elements that are displayed within the widget.
|
|
7
8
|
* This provides the ability to turn individual elements of the widget's display on/off.
|
|
9
|
+
*
|
|
10
|
+
* @since 5.0
|
|
8
11
|
*/
|
|
9
12
|
export default abstract class VisibleElements extends Accessor {
|
|
10
13
|
/**
|
|
11
14
|
* Indicates whether the [templates filter](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates.html#visibleElements) displays.
|
|
12
15
|
*
|
|
13
16
|
* @default true
|
|
17
|
+
* @since 5.0
|
|
14
18
|
*/
|
|
15
19
|
accessor filter: boolean;
|
|
16
20
|
}
|
|
@@ -11,6 +11,7 @@ import type { LayerWithFeatureTemplatesUnion } from "../../layers/types.js";
|
|
|
11
11
|
* @returns Groups consist of a group `key` and `label`. These are shown in the UI. If both
|
|
12
12
|
* the `key` and `label` are identical, return a `string`. Otherwise, return an `object` with
|
|
13
13
|
* `key/name` properties. This gives finer control of the groups.
|
|
14
|
+
* @since 5.0
|
|
14
15
|
* @example
|
|
15
16
|
* // This example shows using a function to check if
|
|
16
17
|
* // the layer title contains the word 'military'. If so,
|
|
@@ -51,13 +52,23 @@ import type { LayerWithFeatureTemplatesUnion } from "../../layers/types.js";
|
|
|
51
52
|
*/
|
|
52
53
|
export type GroupByFunction<T = any> = (grouping: GroupByFunctionGrouping) => object;
|
|
53
54
|
|
|
55
|
+
/** @since 5.0 */
|
|
54
56
|
export interface GroupByFunctionGrouping {
|
|
55
|
-
/**
|
|
57
|
+
/**
|
|
58
|
+
* [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) instance referenced in [FeatureTemplates#layers](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates.html#layers) property.
|
|
59
|
+
*
|
|
60
|
+
* @since 5.0
|
|
61
|
+
*/
|
|
56
62
|
layer: LayerWithFeatureTemplatesUnion;
|
|
57
|
-
/**
|
|
63
|
+
/**
|
|
64
|
+
* [FeatureTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-FeatureTemplate.html) associated with the `layer`.
|
|
65
|
+
*
|
|
66
|
+
* @since 5.0
|
|
67
|
+
*/
|
|
58
68
|
template: AnyEditingTemplateInfo;
|
|
59
69
|
}
|
|
60
70
|
|
|
71
|
+
/** @since 5.0 */
|
|
61
72
|
export type GroupByType = "none" | "layer" | "geometry" | GroupByFunction;
|
|
62
73
|
|
|
63
74
|
/**
|
|
@@ -70,6 +81,7 @@ export type GroupByType = "none" | "layer" | "geometry" | GroupByFunction;
|
|
|
70
81
|
* @returns Function is a predicate, to test each element of the array.
|
|
71
82
|
* Return `true` to keep [item](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates-TemplateItem.html) in the template widget, otherwise, `false`
|
|
72
83
|
* to remove it.
|
|
84
|
+
* @since 5.0
|
|
73
85
|
* @example
|
|
74
86
|
* // Filter and display templates only if their labels contain the word `Street`
|
|
75
87
|
* function myFilterFunction(filter) {
|
|
@@ -89,10 +101,13 @@ export type GroupByType = "none" | "layer" | "geometry" | GroupByFunction;
|
|
|
89
101
|
*/
|
|
90
102
|
export type Filter = (filterName: FilterFilterName) => boolean;
|
|
91
103
|
|
|
104
|
+
/** @since 5.0 */
|
|
92
105
|
export interface FilterFilterName {
|
|
93
106
|
/**
|
|
94
107
|
* The [name](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates-TemplateItem.html#label)
|
|
95
108
|
* of the [template item](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates-TemplateItem.html) to filter.
|
|
109
|
+
*
|
|
110
|
+
* @since 5.0
|
|
96
111
|
*/
|
|
97
112
|
label?: string | null;
|
|
98
113
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type Accessor from "../../core/Accessor.js";
|
|
2
2
|
|
|
3
|
+
/** @since 5.0 */
|
|
3
4
|
export interface FeaturesVisibleElementsProperties extends Partial<Pick<FeaturesVisibleElements, "actionBar" | "closeButton" | "collapseButton" | "featureListLayerTitle" | "featureMenuHeading" | "featureNavigation" | "flow" | "heading" | "spinner">> {}
|
|
4
5
|
|
|
5
6
|
/**
|
|
@@ -8,24 +9,29 @@ export interface FeaturesVisibleElementsProperties extends Partial<Pick<Features
|
|
|
8
9
|
* Disabling all `visibleElements` on the Features widget allows the look and feel of the [Feature](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html) widget, while supporting related record browsing and clustering.
|
|
9
10
|
*
|
|
10
11
|
* 
|
|
12
|
+
*
|
|
13
|
+
* @since 5.0
|
|
11
14
|
*/
|
|
12
15
|
export default abstract class FeaturesVisibleElements extends Accessor {
|
|
13
16
|
/**
|
|
14
17
|
* Indicates whether to display the action bar that holds the feature's [FeaturesViewModel#actions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Features-FeaturesViewModel.html#actions) will be displayed.
|
|
15
18
|
*
|
|
16
19
|
* @default true
|
|
20
|
+
* @since 5.0
|
|
17
21
|
*/
|
|
18
22
|
accessor actionBar: boolean;
|
|
19
23
|
/**
|
|
20
24
|
* Indicates whether to display a close button on the widget dialog.
|
|
21
25
|
*
|
|
22
26
|
* @default true
|
|
27
|
+
* @since 5.0
|
|
23
28
|
*/
|
|
24
29
|
accessor closeButton: boolean;
|
|
25
30
|
/**
|
|
26
31
|
* **Since 4.28.** Indicates whether to display the collapse button on the widget dialog.
|
|
27
32
|
*
|
|
28
33
|
* @default false
|
|
34
|
+
* @since 5.0
|
|
29
35
|
*/
|
|
30
36
|
accessor collapseButton: boolean;
|
|
31
37
|
/**
|
|
@@ -34,18 +40,21 @@ export default abstract class FeaturesVisibleElements extends Accessor {
|
|
|
34
40
|
* 
|
|
35
41
|
*
|
|
36
42
|
* @default true
|
|
43
|
+
* @since 5.0
|
|
37
44
|
*/
|
|
38
45
|
accessor featureListLayerTitle: boolean;
|
|
39
46
|
/**
|
|
40
47
|
* **Since 4.32.** Indicates whether to display a heading and description on the widget feature menu list.
|
|
41
48
|
*
|
|
42
49
|
* @default true
|
|
50
|
+
* @since 5.0
|
|
43
51
|
*/
|
|
44
52
|
accessor featureMenuHeading: boolean;
|
|
45
53
|
/**
|
|
46
54
|
* Indicates whether pagination for feature navigation will be displayed. This allows the user to scroll through various [selected features](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Features.html#features) using pagination arrows.
|
|
47
55
|
*
|
|
48
56
|
* @default true
|
|
57
|
+
* @since 5.0
|
|
49
58
|
*/
|
|
50
59
|
accessor featureNavigation: boolean;
|
|
51
60
|
/**
|
|
@@ -55,18 +64,21 @@ export default abstract class FeaturesVisibleElements extends Accessor {
|
|
|
55
64
|
* To place the widget into an existing Calcite flow component, set this property to `false`.
|
|
56
65
|
*
|
|
57
66
|
* @default true
|
|
67
|
+
* @since 5.0
|
|
58
68
|
*/
|
|
59
69
|
accessor flow: boolean;
|
|
60
70
|
/**
|
|
61
71
|
* Indicates whether to display the widget heading.
|
|
62
72
|
*
|
|
63
73
|
* @default true
|
|
74
|
+
* @since 5.0
|
|
64
75
|
*/
|
|
65
76
|
accessor heading: boolean;
|
|
66
77
|
/**
|
|
67
78
|
* Indicates whether to display the widget's loading spinner.
|
|
68
79
|
*
|
|
69
80
|
* @default true
|
|
81
|
+
* @since 5.0
|
|
70
82
|
*/
|
|
71
83
|
accessor spinner: boolean;
|
|
72
84
|
}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import t from"../../core/Accessor.js";import{createTask as i}from"../../core/asyncUtils.js";import l from"../../core/Collection.js";import s from"../../core/Error.js";import{throwIfAborted as r}from"../../core/promiseUtils.js";import{watch as o,initial as a,syncAndInitial as n}from"../../core/reactiveUtils.js";import{Milliseconds as h}from"../../core/time.js";import{property as d,subclass as c}from"../../core/accessorSupport/decorators.js";import u from"../../webdoc/Widgets.js";import f from"../../webdoc/widgets/FloorFilter.js";import{isWebMap as p}from"../../webmap/utils.js";import{GoTo as y}from"../support/GoTo.js";function v(e){return"esri.WebScene"===e.declaredClass}let m=class extends(y(t)){constructor(e){super(e),this.filterMenuOpen=!1,this.filterMenuType="site",this.filterMode="base-floors",this.levelsExpanded=!0,this.searchTerm=null,this.view=null,this._updateFloorFilterTask=null,this._viewHeightBreakpoint=null,this._viewWidthBreakpoint=null}initialize(){this.addHandles([o(()=>this.view?.map,e=>{null!=this._updateFloorFilterTask&&(this._updateFloorFilterTask.abort(),this._updateFloorFilterTask=null),this._updateFloorFilterTask=i(async t=>{await this._updateFloorFilterFromMap(e),r(t),this._setInitialViewState(e)})},a),o(()=>this.view,(e,t)=>{this._unregisterWidget(t),this._registerWidget(e),this._watchSearchResults(e)},n),o(()=>this.view?.widthBreakpoint??null,e=>{this._viewWidthBreakpoint=e}),o(()=>this.view?.heightBreakpoint??null,e=>{this._viewHeightBreakpoint=e})])}destroy(){this._unregisterWidget(this.view),this.view=null,null!=this._updateFloorFilterTask&&(this._updateFloorFilterTask.abort(),this._updateFloorFilterTask=null)}set enabled(e){this._callOverride("enabled",e)}set facility(e){if(e&&this._isOverridden("facility")){const t=this.getFacility(e);this.hasMultipleSites&&(this.site=t?.siteId||null)}this._callOverride("facility",e)}set filterFeatures(e){this._callOverride("filterFeatures",e)}set filterLayers(e){this._callOverride("filterLayers",e)}get hasFacilities(){return null!=this.filterLayers?.facilityLayer&&this.filterFeatures?.facilities?.facilitiesInfo?.length>0}get hasLevels(){return null!=this.filterLayers?.levelLayer&&this.filterFeatures?.levels?.levelsInfo?.length>0}get hasMultipleSites(){return null!=this.filterLayers?.siteLayer&&this.filterFeatures?.sites?.sitesInfo?.length>1}get isNormalMode(){let e=!0;const t=this._viewWidthBreakpoint;return"xsmall"!==this._viewHeightBreakpoint&&"xsmall"!==t||(e=!1),e}set level(e){if(!e)return this._callOverride("level",e),this.facility=null,this.site=null,void this.setFloors(null);let t=null,i=null;const l=e?.split("--");if(l?.length>1&&"all"===l[0]?(i=l[1],t={id:e,facilityId:i,shortName:null,longName:null,levelNumber:null,verticalOrder:null}):(t=this.getLevel(e),i=t?.facilityId??null),this.level!==e||this.isNormalMode||this.levelsExpanded)t&&this.hasFacilities&&this.hasLevels?(this.facility=i,this.hasMultipleSites&&(this.site=this.getFacility(i)?.siteId||null),this.setFloors(t)):this._isOverridden("level")&&(this.facility=null,this.site=null,this.hasMultipleSites&&(this.filterMenuType="site"),this.setFloors(null)),this._callOverride("level",e);else{const e=this.getFacilityLevels(i);e?.length>1&&(this.levelsExpanded=!0)}}set longNames(e){this._callOverride("longNames",e)}set minimized(e){this._callOverride("minimized",e)}set pinnedLevels(e){this._callOverride("pinnedLevels",e)}get selectedVerticalOrder(){if(p(this.view?.map)){const e=this.view.map.resourceInfo;return e?.widgets?.floorFilter?.selectedVerticalOrder??null}return null}set site(e){this._callOverride("site",e)}get state(){return this.view&&this.filterFeatures&&this.hasFacilities&&this.hasLevels?"ready":this.view&&!this.filterFeatures?"loading":"disabled"}get useVerticalOrder(){if(p(this.view?.map)){const e=this.view.map.resourceInfo;return e?.widgets?.floorFilter?.useVerticalOrder??!1}return!1}filterFacilities(e){let t=e;this.searchTerm&&(this.searchTerm=this.searchTerm.trim(),t=e.filter(e=>{const{name:t}=e;return t.toLowerCase().includes(this.searchTerm?.toLowerCase())})),this.site&&(t=t.filter(e=>e.siteId===this.site));return t.sort((e,t)=>{const i=e.name,l=t.name;return i.localeCompare(l,void 0,{sensitivity:"base"})})}filterSites(e){let t=e;this.searchTerm&&(this.searchTerm=this.searchTerm.trim(),t=e.filter(e=>{const{name:t}=e;return t.toLowerCase().includes(this.searchTerm?.toLowerCase())}));return t.sort((e,t)=>{const i=e.name,l=t.name;return i.localeCompare(l,void 0,{sensitivity:"base"})})}getBaseLevel(e){const t=this.filterFeatures?.levels?.levelsInfo;let i=null;if(e){const{id:l}=e;if(t&&t.length>0&&(t.forEach(e=>{0===e.verticalOrder&&e.facilityId===l&&(i=e)}),!i)){let e=null;t.forEach(t=>{t.facilityId===l&&(e?(t.verticalOrder??0)>=0?null!=e.verticalOrder&&(e.verticalOrder<0||(t.verticalOrder??0)<e.verticalOrder)&&(e=t):null!=e.verticalOrder&&null!=t.verticalOrder&&e.verticalOrder<0&&t.verticalOrder>e.verticalOrder&&(e=t):e=t)}),e&&(i=e)}}return i}getFacility(e){return this.filterFeatures?.facilities?.facilitiesInfo?.find(t=>t.id===e)??null}getFacilityLevels(e){if(!e||!this.filterFeatures?.levels?.levelsInfo)return[];return this.filterFeatures.levels.levelsInfo.filter(t=>t.facilityId===e).sort((e,t)=>{const i=e.verticalOrder??0,l=t.verticalOrder??0;return i>l?-1:i===l?0:1})}getLevel(e){return this.filterFeatures?.levels?.levelsInfo?.find(t=>t.id===e)??null}getSite(e){return this.filterFeatures?.sites?.sitesInfo?.find(t=>t.id===e)??null}goTo(e){const{view:t}=this;if(!t||!e)return;const{geometry:i}=e;i&&i.extent&&this.callGoTo({target:i.extent,options:{duration:h(1e3),easing:"quad-in-out"}})}setFloors(e){const{view:t}=this;t&&(t?.map?.allLayers?.forEach(e=>{"feature"===e.type&&this._computeViewAllModeFloors(e)}),t.floors=new l(this._computeFloors(e)))}updateWebDocument(e){if(p(e)){const t=new f({enabled:this.enabled,longNames:this.longNames,minimized:this.minimized,pinnedLevels:this.pinnedLevels,site:this.site??null,facility:this.facility??null,level:this.level??null,useVerticalOrder:this.useVerticalOrder,selectedVerticalOrder:this.selectedVerticalOrder});e.widgets?e.widgets.floorFilter=t:e.widgets=new u({floorFilter:t})}}_computeFloors(e){if("single-floor"===this.filterMode)this._computeSingleFloor(e);else if("base-floors"===this.filterMode)return"3d"===this.view?.type?this._computeBaseFloors3D(e):this._computeBaseFloors(e);return this._computeEmptyFloors()}_computeSingleFloor(e){if(!e)return this._computeEmptyFloors();const t=[];if("all"===e?.id){this.getFacilityLevels(e.facilityId).forEach(e=>{e.id&&t.push(e.id)})}else e&&t.push(e.id);return t}_computeBaseFloors(e){const t=this.filterFeatures?.levels?.levelsInfo;if(!t?.length)return this._computeEmptyFloors();const i=[];if("all"===e?.id){this.getFacilityLevels(e.facilityId).forEach(e=>{e.id&&i.push(e.id)})}else e&&i.push(e.id);const l=e?.facilityId,s=e?.verticalOrder,r=(e,t)=>{0===e&&i.push(t)};return t.forEach(e=>{const{id:t,facilityId:o,verticalOrder:a}=e;l||i.includes(t)?o===l||i.includes(t)||(this.useVerticalOrder?a===s&&i.push(t):r(a,t)):r(a,t)}),i}_computeBaseFloors3D(e){const t=this.filterFeatures?.levels?.levelsInfo;if(!t?.length)return this._computeEmptyFloors();const i=[],l=e?.id.split("--")??[];if(l?.length>1&&"all"===l[0]){this.getFacilityLevels(e?.facilityId).forEach(e=>{e.id&&i.push(e.id)})}else e&&i.push(e.id);const s=e?.facilityId;return t.forEach(e=>{const{id:t,facilityId:l}=e;(s||i.includes(t))&&(l===s||i.includes(t))||i.push(t)}),i}_computeEmptyFloors(){return[]}async _setFilterLayers(){const{view:e}=this;if(e&&!this._isOverridden("filterLayers")){if(!p(e.map)&&!v(e.map))throw new s("floorfilter:unsupported-map","Map must be a webmap or webscene");{const t=e.map,i=t?.allLayers;if(i?.items?.length>0){const e={siteLayer:null,facilityLayer:null,levelLayer:null},l=t.floorInfo?.siteLayer?.layerId,s=t.floorInfo?.facilityLayer?.layerId,r=t.floorInfo?.levelLayer?.layerId,o=t.floorInfo?.siteLayer?.sublayerId||t.floorInfo?.facilityLayer?.sublayerId||t.floorInfo?.levelLayer?.sublayerId;if(!s||!r)return;const a=i.items.filter(e=>"feature"===e.type||"scene"===e.type),n=i.items.filter(e=>"map-image"===e.type);if(n?.length>0&&o){await Promise.all(n.map(e=>e.load()));const i=t.floorInfo?.siteLayer?.sublayerId,o=t.floorInfo?.facilityLayer?.sublayerId,a=t.floorInfo?.levelLayer?.sublayerId;n.forEach(t=>{const n=t.id,h=t?.allSublayers,d=h?.items;(n===l||n===s||n===r)&&d?.length>0&&h.items.forEach(t=>{const s=t.id;n===l&&s===i?e.siteLayer=t:s===o?e.facilityLayer=t:s===a&&(e.levelLayer=t)})})}a?.length>0&&a.forEach(t=>{const i=t.id;i===l?e.siteLayer=t:i===s?e.facilityLayer=t:i===r&&(e.levelLayer=t)}),this.filterLayers=e}}}}async _getFilterFeatures(){if(this._isOverridden("filterFeatures"))return this.filterFeatures;const[e,t,i]=await Promise.all([this._getSites(),this._getFacilities(),this._getLevels()]);return{sites:e,facilities:t,levels:i}}async _getSites(){const e={sitesInfo:[]},{filterLayers:t,view:i}=this,l=i?.map,{siteLayer:s}=t;if(!s||!l?.floorInfo?.siteLayer)return e;const r=s.createQuery();r.returnGeometry=!0,r.outFields=["*"],r.returnZ=!0,"type"in s&&"scene"===s.type&&(r.multipatchOption="xyFootprint");const{siteIdField:o,nameField:a}=l.floorInfo.siteLayer,n=await s.queryFeatures(r);if(n?.features?.length>0){const t=n.features,i=s?.fieldsIndex.get(o)?.name||o,l=s?.fieldsIndex.get(a)?.name||a;null!=i&&null!=l&&t.forEach(t=>{const s=t.attributes,r=t.geometry,o=s[i],a=s[l];o&&a&&e.sitesInfo.push({id:o,name:a,geometry:r})})}return e}async _getFacilities(){const{filterLayers:e,view:t}=this,i=t?.map,{facilityLayer:l}=e,s={facilitiesInfo:[]};if(!l||!i?.floorInfo?.facilityLayer)return s;const r=l.createQuery();r.returnGeometry=!0,r.outFields=["*"],r.returnZ=!0,"type"in l&&"scene"===l.type&&(r.multipatchOption="xyFootprint");const{facilityIdField:o,siteIdField:a,nameField:n}=i.floorInfo.facilityLayer,h=await l.queryFeatures(r);if(h?.features?.length>0){const e=h.features,t=l?.fieldsIndex.get(o)?.name||o,i=l?.fieldsIndex.get(a)?.name||a,r=l?.fieldsIndex.get(n)?.name||n;t&&i&&r&&e.forEach(e=>{const l=e.attributes,o=e.geometry,a=l[t],n=l[i],h=l[r];a&&h&&s.facilitiesInfo.push({id:a,siteId:n,name:h,geometry:o})})}return s}async _getLevels(){const{filterLayers:e,view:t}=this,i=t?.map,{levelLayer:l}=e,s={levelsInfo:[]};if(!l||!i?.floorInfo?.levelLayer)return s;const r=l.createQuery();r.returnGeometry=!0,r.outFields=["*"],r.returnZ=!0;const{levelIdField:o,facilityIdField:a,longNameField:n,shortNameField:h,levelNumberField:d,verticalOrderField:c}=i.floorInfo.levelLayer,u=await l.queryFeatures(r);if(u?.features?.length>0){const e=u.features,t=l?.fieldsIndex.get(o)?.name||o,i=l?.fieldsIndex.get(a)?.name||a,r=l?.fieldsIndex.get(n)?.name||n,f=l?.fieldsIndex.get(h)?.name||h,p=l?.fieldsIndex.get(d)?.name||d,y=l?.fieldsIndex.get(c)?.name||c;t&&i&&r&&f&&p&&y&&e.forEach(e=>{const l=e.attributes,o=l[t],a=l[i],n=l[r],h=l[f],d=l[p],c=l[y];o&&a&&n&&h&&"number"==typeof d&&"number"==typeof c&&s.levelsInfo.push({id:o,facilityId:a,longName:n,shortName:h,levelNumber:d,verticalOrder:c})})}return s}_registerWidget(e){const t=e?.persistableViewModels.includes(this);t||e?.persistableViewModels.add(this)}_unregisterWidget(e){e?.persistableViewModels.remove(this)}_watchSearchResults(e){e?.on("select-result-floor",e=>{const t=this.getLevel(e);t&&this.level!==e&&(this.level=e,this.setFloors(t))})}async _setInitialViewState(e){if(this.view)try{await this.view.when(),await this._setFilterLayers();const t=await this._getFilterFeatures();if(!t)return;if(this.filterFeatures=t,!this.hasFacilities||!this.hasLevels)return void console.error("Facilities and Levels are required for the Floor Filter widget");if(this.hasMultipleSites||(this.filterMenuType="facility"),this.facility&&this.level){this.filterMenuType="facility";const e=this.getFacility(this.facility),t=this.getLevel(this.level);this.site||(this.site=e?.siteId||void 0),this.setFloors(t)}else if(this.facility&&!this.level){this.filterMenuType="facility";const e=this.getFacility(this.facility),t=this.getBaseLevel(e);this.site||(this.site=e?.siteId||void 0),this.level=t?.id||void 0,this.setFloors(t)}else if(!this.facility&&this.level){this.filterMenuType="facility";const e=this.getLevel(this.level),t=this.getFacility(e?.facilityId);this.facility=t?.id||void 0,this.site||(this.site=t?.siteId||void 0),this.setFloors(e)}else if(!this.site||this.facility||this.level){if(!e||!p(e))return void this.setFloors(null);const t=e?.widgets?.floorFilter;if(!t)return void this.setFloors(null);t.site&&!this.site&&(this.site=t.site,this.filterMenuType="facility"),this.setFloors(null)}else this.filterMenuType="site",this.setFloors(null)}catch(t){console.error("Couldn't retrieve sites, facilities, and levels",t)}}_callOverride(e,t){this._override(e,t)}async _updateFloorFilterFromMap(e){if(!e||!p(e))return;const t=e?.widgets?.floorFilter;t&&(this._isOverridden("enabled")||(this.enabled=t.enabled),this._isOverridden("longNames")||(this.longNames=t.longNames),this._isOverridden("minimized")||(this.minimized=t.minimized),this._isOverridden("pinnedLevels")||(this.pinnedLevels=t.pinnedLevels),this._isOverridden("site")||(this.site=t.site),this._isOverridden("facility")||(this.facility=t.facility),this._isOverridden("level")||(this.level=t.level))}_computeViewAllModeFloors(e){const{filterFeatures:t}=this;if(e.floorInfo?.viewAllMode&&this.hasLevels&&this.hasFacilities&&"base-floors"===this.filterMode){const{level:i,facility:s}=this,r=[];t.levels.levelsInfo.forEach(e=>{const{id:t,facilityId:l}=e;s&&l===s?i&&t===i&&r.push(t):r.push(t)}),e.floorInfo.viewAllLevelIds=new l(r)}}};e([d({value:!1})],m.prototype,"enabled",null),e([d({value:void 0})],m.prototype,"facility",null),e([d({value:null})],m.prototype,"filterFeatures",null),e([d({value:null})],m.prototype,"filterLayers",null),e([d()],m.prototype,"filterMenuOpen",void 0),e([d()],m.prototype,"filterMenuType",void 0),e([d()],m.prototype,"filterMode",void 0),e([d()],m.prototype,"hasFacilities",null),e([d()],m.prototype,"hasLevels",null),e([d()],m.prototype,"hasMultipleSites",null),e([d({readOnly:!0})],m.prototype,"isNormalMode",null),e([d({value:void 0})],m.prototype,"level",null),e([d({value:!1})],m.prototype,"longNames",null),e([d()],m.prototype,"levelsExpanded",void 0),e([d({value:!1})],m.prototype,"minimized",null),e([d({value:!1})],m.prototype,"pinnedLevels",null),e([d()],m.prototype,"searchTerm",void 0),e([d({readOnly:!0})],m.prototype,"selectedVerticalOrder",null),e([d({value:void 0})],m.prototype,"site",null),e([d({readOnly:!0})],m.prototype,"state",null),e([d({readOnly:!0,value:!1})],m.prototype,"useVerticalOrder",null),e([d()],m.prototype,"view",void 0),e([d()],m.prototype,"_viewHeightBreakpoint",void 0),e([d()],m.prototype,"_viewWidthBreakpoint",void 0),e([d()],m.prototype,"updateWebDocument",null),m=e([c("esri.widgets.FloorFilter.FloorFilterViewModel")],m);const F=m;export{F as default};
|
|
5
|
+
import{__decorate as e}from"tslib";import t from"../../core/Accessor.js";import{createTask as i}from"../../core/asyncUtils.js";import l from"../../core/Collection.js";import s from"../../core/Error.js";import{throwIfAborted as r}from"../../core/promiseUtils.js";import{watch as o,initial as a,syncAndInitial as n}from"../../core/reactiveUtils.js";import{Milliseconds as h}from"../../core/time.js";import{property as d,subclass as c}from"../../core/accessorSupport/decorators.js";import u from"../../webdoc/Widgets.js";import f from"../../webdoc/widgets/FloorFilter.js";import{isWebMap as p}from"../../webmap/utils.js";import{GoTo as y}from"../support/GoTo.js";function v(e){return"esri.WebScene"===e.declaredClass}let m=class extends(y(t)){constructor(e){super(e),this.filterMenuOpen=!1,this.filterMenuType="site",this.filterMode="base-floors",this.levelsExpanded=!0,this.searchTerm=null,this.view=null,this._updateFloorFilterTask=null,this._viewHeightBreakpoint=null,this._viewWidthBreakpoint=null}initialize(){this.addHandles([o(()=>this.view?.map,e=>{null!=this._updateFloorFilterTask&&(this._updateFloorFilterTask.abort(),this._updateFloorFilterTask=null),this._updateFloorFilterTask=i(async t=>{await this._updateFloorFilterFromMap(e),r(t),this._setInitialViewState(e)})},a),o(()=>this.view,(e,t)=>{this._unregisterWidget(t),this._registerWidget(e),this._watchSearchResults(e)},n),o(()=>this.view?.widthBreakpoint??null,e=>{this._viewWidthBreakpoint=e}),o(()=>this.view?.heightBreakpoint??null,e=>{this._viewHeightBreakpoint=e})])}destroy(){this._unregisterWidget(this.view),this.view=null,null!=this._updateFloorFilterTask&&(this._updateFloorFilterTask.abort(),this._updateFloorFilterTask=null)}set enabled(e){this._callOverride("enabled",e)}set facility(e){if(e&&this._isOverridden("facility")){const t=this.getFacility(e);this.hasMultipleSites&&(this.site=t?.siteId||null)}this._callOverride("facility",e)}set filterFeatures(e){this._callOverride("filterFeatures",e)}set filterLayers(e){this._callOverride("filterLayers",e)}get hasFacilities(){return null!=this.filterLayers?.facilityLayer&&this.filterFeatures?.facilities?.facilitiesInfo?.length>0}get hasLevels(){return null!=this.filterLayers?.levelLayer&&this.filterFeatures?.levels?.levelsInfo?.length>0}get hasMultipleSites(){return null!=this.filterLayers?.siteLayer&&this.filterFeatures?.sites?.sitesInfo?.length>1}get isNormalMode(){let e=!0;const t=this._viewWidthBreakpoint;return"xsmall"!==this._viewHeightBreakpoint&&"xsmall"!==t||(e=!1),e}set level(e){if(!e)return this._callOverride("level",e),this.facility=null,this.site=null,void this.setFloors(null);let t=null,i=null;const l=e?.split("--");if(l?.length>1&&"all"===l[0]?(i=l[1],t={id:e,facilityId:i,shortName:null,longName:null,levelNumber:null,verticalOrder:null}):(t=this.getLevel(e),i=t?.facilityId??null),this.level!==e||this.isNormalMode||this.levelsExpanded)t&&this.hasFacilities&&this.hasLevels?(this.facility=i,this.hasMultipleSites&&(this.site=this.getFacility(i)?.siteId||null),this.setFloors(t)):this._isOverridden("level")&&(this.facility=null,this.site=null,this.hasMultipleSites&&(this.filterMenuType="site"),this.setFloors(null)),this._callOverride("level",e);else{const e=this.getFacilityLevels(i);e?.length>1&&(this.levelsExpanded=!0)}}set longNames(e){this._callOverride("longNames",e)}set minimized(e){this._callOverride("minimized",e)}set pinnedLevels(e){this._callOverride("pinnedLevels",e)}get selectedVerticalOrder(){if(p(this.view?.map)){const e=this.view.map.resourceInfo;return e?.widgets?.floorFilter?.selectedVerticalOrder??null}return null}set site(e){this._callOverride("site",e)}get state(){return this.view&&this.filterFeatures&&this.hasFacilities&&this.hasLevels?"ready":this.view&&!this.filterFeatures?"loading":"disabled"}get useVerticalOrder(){if(p(this.view?.map)){const e=this.view.map.resourceInfo;return e?.widgets?.floorFilter?.useVerticalOrder??!1}return!1}filterFacilities(e){let t=e;this.searchTerm&&(this.searchTerm=this.searchTerm.trim(),t=e.filter(e=>{const{name:t}=e;return t.toLowerCase().includes(this.searchTerm?.toLowerCase())})),this.site&&(t=t.filter(e=>e.siteId===this.site));return t.sort((e,t)=>{const i=e.name,l=t.name;return i.localeCompare(l,void 0,{sensitivity:"base"})})}filterSites(e){let t=e;this.searchTerm&&(this.searchTerm=this.searchTerm.trim(),t=e.filter(e=>{const{name:t}=e;return t.toLowerCase().includes(this.searchTerm?.toLowerCase())}));return t.sort((e,t)=>{const i=e.name,l=t.name;return i.localeCompare(l,void 0,{sensitivity:"base"})})}getBaseLevel(e){const t=this.filterFeatures?.levels?.levelsInfo;let i=null;if(e){const{id:l}=e;if(t&&t.length>0&&(t.forEach(e=>{0===e.verticalOrder&&e.facilityId===l&&(i=e)}),!i)){let e=null;t.forEach(t=>{t.facilityId===l&&(e?(t.verticalOrder??0)>=0?null!=e.verticalOrder&&(e.verticalOrder<0||(t.verticalOrder??0)<e.verticalOrder)&&(e=t):null!=e.verticalOrder&&null!=t.verticalOrder&&e.verticalOrder<0&&t.verticalOrder>e.verticalOrder&&(e=t):e=t)}),e&&(i=e)}}return i}getFacility(e){return this.filterFeatures?.facilities?.facilitiesInfo?.find(t=>t.id===e)??null}getFacilityLevels(e){if(!e||!this.filterFeatures?.levels?.levelsInfo)return[];return this.filterFeatures.levels.levelsInfo.filter(t=>t.facilityId===e).sort((e,t)=>{const i=e.verticalOrder??0,l=t.verticalOrder??0;return i>l?-1:i===l?0:1})}getLevel(e){return this.filterFeatures?.levels?.levelsInfo?.find(t=>t.id===e)??null}getSite(e){return this.filterFeatures?.sites?.sitesInfo?.find(t=>t.id===e)??null}goTo(e){const{view:t}=this;if(!t||!e)return;const{geometry:i}=e;i&&i.extent&&this.callGoTo({target:i.extent,options:{duration:h(1e3),easing:"quad-in-out-coast"}})}setFloors(e){const{view:t}=this;t&&(t?.map?.allLayers?.forEach(e=>{"feature"===e.type&&this._computeViewAllModeFloors(e)}),t.floors=new l(this._computeFloors(e)))}updateWebDocument(e){if(p(e)){const t=new f({enabled:this.enabled,longNames:this.longNames,minimized:this.minimized,pinnedLevels:this.pinnedLevels,site:this.site??null,facility:this.facility??null,level:this.level??null,useVerticalOrder:this.useVerticalOrder,selectedVerticalOrder:this.selectedVerticalOrder});e.widgets?e.widgets.floorFilter=t:e.widgets=new u({floorFilter:t})}}_computeFloors(e){if("single-floor"===this.filterMode)this._computeSingleFloor(e);else if("base-floors"===this.filterMode)return"3d"===this.view?.type?this._computeBaseFloors3D(e):this._computeBaseFloors(e);return this._computeEmptyFloors()}_computeSingleFloor(e){if(!e)return this._computeEmptyFloors();const t=[];if("all"===e?.id){this.getFacilityLevels(e.facilityId).forEach(e=>{e.id&&t.push(e.id)})}else e&&t.push(e.id);return t}_computeBaseFloors(e){const t=this.filterFeatures?.levels?.levelsInfo;if(!t?.length)return this._computeEmptyFloors();const i=[];if("all"===e?.id){this.getFacilityLevels(e.facilityId).forEach(e=>{e.id&&i.push(e.id)})}else e&&i.push(e.id);const l=e?.facilityId,s=e?.verticalOrder,r=(e,t)=>{0===e&&i.push(t)};return t.forEach(e=>{const{id:t,facilityId:o,verticalOrder:a}=e;l||i.includes(t)?o===l||i.includes(t)||(this.useVerticalOrder?a===s&&i.push(t):r(a,t)):r(a,t)}),i}_computeBaseFloors3D(e){const t=this.filterFeatures?.levels?.levelsInfo;if(!t?.length)return this._computeEmptyFloors();const i=[],l=e?.id.split("--")??[];if(l?.length>1&&"all"===l[0]){this.getFacilityLevels(e?.facilityId).forEach(e=>{e.id&&i.push(e.id)})}else e&&i.push(e.id);const s=e?.facilityId;return t.forEach(e=>{const{id:t,facilityId:l}=e;(s||i.includes(t))&&(l===s||i.includes(t))||i.push(t)}),i}_computeEmptyFloors(){return[]}async _setFilterLayers(){const{view:e}=this;if(e&&!this._isOverridden("filterLayers")){if(!p(e.map)&&!v(e.map))throw new s("floorfilter:unsupported-map","Map must be a webmap or webscene");{const t=e.map,i=t?.allLayers;if(i?.items?.length>0){const e={siteLayer:null,facilityLayer:null,levelLayer:null},l=t.floorInfo?.siteLayer?.layerId,s=t.floorInfo?.facilityLayer?.layerId,r=t.floorInfo?.levelLayer?.layerId,o=t.floorInfo?.siteLayer?.sublayerId||t.floorInfo?.facilityLayer?.sublayerId||t.floorInfo?.levelLayer?.sublayerId;if(!s||!r)return;const a=i.items.filter(e=>"feature"===e.type||"scene"===e.type),n=i.items.filter(e=>"map-image"===e.type);if(n?.length>0&&o){await Promise.all(n.map(e=>e.load()));const i=t.floorInfo?.siteLayer?.sublayerId,o=t.floorInfo?.facilityLayer?.sublayerId,a=t.floorInfo?.levelLayer?.sublayerId;n.forEach(t=>{const n=t.id,h=t?.allSublayers,d=h?.items;(n===l||n===s||n===r)&&d?.length>0&&h.items.forEach(t=>{const s=t.id;n===l&&s===i?e.siteLayer=t:s===o?e.facilityLayer=t:s===a&&(e.levelLayer=t)})})}a?.length>0&&a.forEach(t=>{const i=t.id;i===l?e.siteLayer=t:i===s?e.facilityLayer=t:i===r&&(e.levelLayer=t)}),this.filterLayers=e}}}}async _getFilterFeatures(){if(this._isOverridden("filterFeatures"))return this.filterFeatures;const[e,t,i]=await Promise.all([this._getSites(),this._getFacilities(),this._getLevels()]);return{sites:e,facilities:t,levels:i}}async _getSites(){const e={sitesInfo:[]},{filterLayers:t,view:i}=this,l=i?.map,{siteLayer:s}=t;if(!s||!l?.floorInfo?.siteLayer)return e;const r=s.createQuery();r.returnGeometry=!0,r.outFields=["*"],r.returnZ=!0,"type"in s&&"scene"===s.type&&(r.multipatchOption="xyFootprint");const{siteIdField:o,nameField:a}=l.floorInfo.siteLayer,n=await s.queryFeatures(r);if(n?.features?.length>0){const t=n.features,i=s?.fieldsIndex.get(o)?.name||o,l=s?.fieldsIndex.get(a)?.name||a;null!=i&&null!=l&&t.forEach(t=>{const s=t.attributes,r=t.geometry,o=s[i],a=s[l];o&&a&&e.sitesInfo.push({id:o,name:a,geometry:r})})}return e}async _getFacilities(){const{filterLayers:e,view:t}=this,i=t?.map,{facilityLayer:l}=e,s={facilitiesInfo:[]};if(!l||!i?.floorInfo?.facilityLayer)return s;const r=l.createQuery();r.returnGeometry=!0,r.outFields=["*"],r.returnZ=!0,"type"in l&&"scene"===l.type&&(r.multipatchOption="xyFootprint");const{facilityIdField:o,siteIdField:a,nameField:n}=i.floorInfo.facilityLayer,h=await l.queryFeatures(r);if(h?.features?.length>0){const e=h.features,t=l?.fieldsIndex.get(o)?.name||o,i=l?.fieldsIndex.get(a)?.name||a,r=l?.fieldsIndex.get(n)?.name||n;t&&i&&r&&e.forEach(e=>{const l=e.attributes,o=e.geometry,a=l[t],n=l[i],h=l[r];a&&h&&s.facilitiesInfo.push({id:a,siteId:n,name:h,geometry:o})})}return s}async _getLevels(){const{filterLayers:e,view:t}=this,i=t?.map,{levelLayer:l}=e,s={levelsInfo:[]};if(!l||!i?.floorInfo?.levelLayer)return s;const r=l.createQuery();r.returnGeometry=!0,r.outFields=["*"],r.returnZ=!0;const{levelIdField:o,facilityIdField:a,longNameField:n,shortNameField:h,levelNumberField:d,verticalOrderField:c}=i.floorInfo.levelLayer,u=await l.queryFeatures(r);if(u?.features?.length>0){const e=u.features,t=l?.fieldsIndex.get(o)?.name||o,i=l?.fieldsIndex.get(a)?.name||a,r=l?.fieldsIndex.get(n)?.name||n,f=l?.fieldsIndex.get(h)?.name||h,p=l?.fieldsIndex.get(d)?.name||d,y=l?.fieldsIndex.get(c)?.name||c;t&&i&&r&&f&&p&&y&&e.forEach(e=>{const l=e.attributes,o=l[t],a=l[i],n=l[r],h=l[f],d=l[p],c=l[y];o&&a&&n&&h&&"number"==typeof d&&"number"==typeof c&&s.levelsInfo.push({id:o,facilityId:a,longName:n,shortName:h,levelNumber:d,verticalOrder:c})})}return s}_registerWidget(e){const t=e?.persistableViewModels.includes(this);t||e?.persistableViewModels.add(this)}_unregisterWidget(e){e?.persistableViewModels.remove(this)}_watchSearchResults(e){e?.on("select-result-floor",e=>{const t=this.getLevel(e);t&&this.level!==e&&(this.level=e,this.setFloors(t))})}async _setInitialViewState(e){if(this.view)try{await this.view.when(),await this._setFilterLayers();const t=await this._getFilterFeatures();if(!t)return;if(this.filterFeatures=t,!this.hasFacilities||!this.hasLevels)return void console.error("Facilities and Levels are required for the Floor Filter widget");if(this.hasMultipleSites||(this.filterMenuType="facility"),this.facility&&this.level){this.filterMenuType="facility";const e=this.getFacility(this.facility),t=this.getLevel(this.level);this.site||(this.site=e?.siteId||void 0),this.setFloors(t)}else if(this.facility&&!this.level){this.filterMenuType="facility";const e=this.getFacility(this.facility),t=this.getBaseLevel(e);this.site||(this.site=e?.siteId||void 0),this.level=t?.id||void 0,this.setFloors(t)}else if(!this.facility&&this.level){this.filterMenuType="facility";const e=this.getLevel(this.level),t=this.getFacility(e?.facilityId);this.facility=t?.id||void 0,this.site||(this.site=t?.siteId||void 0),this.setFloors(e)}else if(!this.site||this.facility||this.level){if(!e||!p(e))return void this.setFloors(null);const t=e?.widgets?.floorFilter;if(!t)return void this.setFloors(null);t.site&&!this.site&&(this.site=t.site,this.filterMenuType="facility"),this.setFloors(null)}else this.filterMenuType="site",this.setFloors(null)}catch(t){console.error("Couldn't retrieve sites, facilities, and levels",t)}}_callOverride(e,t){this._override(e,t)}async _updateFloorFilterFromMap(e){if(!e||!p(e))return;const t=e?.widgets?.floorFilter;t&&(this._isOverridden("enabled")||(this.enabled=t.enabled),this._isOverridden("longNames")||(this.longNames=t.longNames),this._isOverridden("minimized")||(this.minimized=t.minimized),this._isOverridden("pinnedLevels")||(this.pinnedLevels=t.pinnedLevels),this._isOverridden("site")||(this.site=t.site),this._isOverridden("facility")||(this.facility=t.facility),this._isOverridden("level")||(this.level=t.level))}_computeViewAllModeFloors(e){const{filterFeatures:t}=this;if(e.floorInfo?.viewAllMode&&this.hasLevels&&this.hasFacilities&&"base-floors"===this.filterMode){const{level:i,facility:s}=this,r=[];t.levels.levelsInfo.forEach(e=>{const{id:t,facilityId:l}=e;s&&l===s?i&&t===i&&r.push(t):r.push(t)}),e.floorInfo.viewAllLevelIds=new l(r)}}};e([d({value:!1})],m.prototype,"enabled",null),e([d({value:void 0})],m.prototype,"facility",null),e([d({value:null})],m.prototype,"filterFeatures",null),e([d({value:null})],m.prototype,"filterLayers",null),e([d()],m.prototype,"filterMenuOpen",void 0),e([d()],m.prototype,"filterMenuType",void 0),e([d()],m.prototype,"filterMode",void 0),e([d()],m.prototype,"hasFacilities",null),e([d()],m.prototype,"hasLevels",null),e([d()],m.prototype,"hasMultipleSites",null),e([d({readOnly:!0})],m.prototype,"isNormalMode",null),e([d({value:void 0})],m.prototype,"level",null),e([d({value:!1})],m.prototype,"longNames",null),e([d()],m.prototype,"levelsExpanded",void 0),e([d({value:!1})],m.prototype,"minimized",null),e([d({value:!1})],m.prototype,"pinnedLevels",null),e([d()],m.prototype,"searchTerm",void 0),e([d({readOnly:!0})],m.prototype,"selectedVerticalOrder",null),e([d({value:void 0})],m.prototype,"site",null),e([d({readOnly:!0})],m.prototype,"state",null),e([d({readOnly:!0,value:!1})],m.prototype,"useVerticalOrder",null),e([d()],m.prototype,"view",void 0),e([d()],m.prototype,"_viewHeightBreakpoint",void 0),e([d()],m.prototype,"_viewWidthBreakpoint",void 0),e([d()],m.prototype,"updateWebDocument",null),m=e([c("esri.widgets.FloorFilter.FloorFilterViewModel")],m);const F=m;export{F as default};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
|
|
2
|
+
/** @since 5.0 */
|
|
2
3
|
export type HistogramState = "disabled" | "ready";
|
|
3
4
|
|
|
4
5
|
/**
|
|
@@ -9,6 +10,7 @@ export type HistogramState = "disabled" | "ready";
|
|
|
9
10
|
* @param index - The index of the histogram bar. This directly corresponds
|
|
10
11
|
* to the index of the associated [bin](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Histogram.html#bins).
|
|
11
12
|
* @param element - The histogram bar element to style.
|
|
13
|
+
* @since 5.0
|
|
12
14
|
*/
|
|
13
15
|
export type BarCreatedFunction = (index: number, element: SVGElement) => void;
|
|
14
16
|
|
|
@@ -22,12 +24,22 @@ export type BarCreatedFunction = (index: number, element: SVGElement) => void;
|
|
|
22
24
|
* @param labelElement - The SVG element representing the label
|
|
23
25
|
* rendered on the histogram for the associated line element.
|
|
24
26
|
* @param index - The index of the data line.
|
|
27
|
+
* @since 5.0
|
|
25
28
|
*/
|
|
26
29
|
export type DataLineCreatedFunction = (lineElement: SVGElement, labelElement?: SVGElement | null | undefined, index?: number | null | undefined) => void;
|
|
27
30
|
|
|
31
|
+
/** @since 5.0 */
|
|
28
32
|
export interface DataLineInfos {
|
|
29
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* The label associated with the line.
|
|
35
|
+
*
|
|
36
|
+
* @since 5.0
|
|
37
|
+
*/
|
|
30
38
|
label?: string | number | null;
|
|
31
|
-
/**
|
|
39
|
+
/**
|
|
40
|
+
* The value on the data axis of the histogram where a line will be rendered.
|
|
41
|
+
*
|
|
42
|
+
* @since 5.0
|
|
43
|
+
*/
|
|
32
44
|
value: number;
|
|
33
45
|
}
|