@arcgis/core 5.0.0-next.67 → 5.0.0-next.69
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/Ground.d.ts +3 -4
- package/WebDocument2D.d.ts +1 -1
- package/WebLinkChart.d.ts +2 -0
- package/analysis/ElevationProfile/ElevationProfileLineQuery.d.ts +3 -4
- package/analysis/ElevationProfile/ElevationProfileLineViewOptions.d.ts +9 -6
- package/analysis/ElevationProfile/ElevationProfileLineViewOptions.js +1 -1
- package/analysis/types.d.ts +1 -0
- package/applications/Components/analysisUtils.d.ts +1 -3
- package/applications/Components/arcadeFeatureUtils.d.ts +1 -1
- package/applications/ExperienceBuilder/sketchUtils.d.ts +2 -2
- package/applications/KnowledgeStudio/reshape.d.ts +2 -2
- package/applications/SceneViewer/sceneViewerUtils.d.ts +11 -0
- package/applications/SceneViewer/sceneViewerUtils.js +1 -1
- package/arcade/arcadeAsyncRuntime.js +1 -1
- package/arcade/arcadeCompiler.js +1 -1
- package/arcade/arcadeRuntime.js +1 -1
- package/arcade/batchExec.js +1 -1
- package/arcade/compilerUtils.js +1 -1
- package/arcade/featureset/actions/SpatialFilter.js +1 -1
- package/arcade/geometry/unitConversion.js +1 -1
- package/arcade/treeAnalysis.js +1 -1
- package/arcade.js +1 -1
- package/assets/esri/core/libs/libtess/libtess-f32.wasm +0 -0
- package/assets/esri/core/libs/libtess/libtess-f64.wasm +0 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/01d7542d85a453384cf1.js +1 -0
- package/assets/esri/core/workers/chunks/{251eb6e00f99a816d55c.js → 0326314947734b8e640a.js} +1 -1
- package/assets/esri/core/workers/chunks/04176244b0a3539c9681.js +1 -0
- package/assets/esri/core/workers/chunks/{168ec8fca2702617a543.js → 09dfec3e097ebbef6a89.js} +1 -1
- package/assets/esri/core/workers/chunks/{942fad4ec96295672ce8.js → 10e474d664b20adcd917.js} +1 -1
- package/assets/esri/core/workers/chunks/12f9a55253084a910b2e.js +1 -0
- package/assets/esri/core/workers/chunks/{0629087bd5bb8048493e.js → 14dedd80fb797303f91f.js} +1 -1
- package/assets/esri/core/workers/chunks/{81d89107ff82604a3ea0.js → 1b445981fbc8373f4dd8.js} +1 -1
- package/assets/esri/core/workers/chunks/{794960ec36e11f4416c2.js → 1d1e25bb61eeeee8ee94.js} +1 -1
- package/assets/esri/core/workers/chunks/{6ba3c2b9f699d94d62b8.js → 1ec1a1997b5577619040.js} +1 -1
- package/assets/esri/core/workers/chunks/2085084324cd5a81783f.js +1 -0
- package/assets/esri/core/workers/chunks/2c2c0f66cffc521df736.js +1 -0
- package/assets/esri/core/workers/chunks/2dd347aa2a061d536e69.js +1 -0
- package/assets/esri/core/workers/chunks/2dfa7abf2d39fa5a3874.js +1 -0
- package/assets/esri/core/workers/chunks/{6cb44cd319cb6c2539c8.js → 2e2c47f8a80ee9234350.js} +1 -1
- package/assets/esri/core/workers/chunks/322085d63719da6e443c.js +1 -0
- package/assets/esri/core/workers/chunks/{76086517591d0eb35156.js → 34a2e0462eb05986cdd1.js} +1 -1
- package/assets/esri/core/workers/chunks/{a6dcd13c792b6538ac50.js → 35593a9790818b689455.js} +1 -1
- package/assets/esri/core/workers/chunks/3a04153ca9d8e4f01185.js +1 -0
- package/assets/esri/core/workers/chunks/{4e9a8fce55cad841c731.js → 3b25f5d9c8f78bb6e011.js} +1 -1
- package/assets/esri/core/workers/chunks/3e7ea06b342e33bc48a5.js +1 -0
- package/assets/esri/core/workers/chunks/3ed317900f0edf635508.js +1 -0
- package/assets/esri/core/workers/chunks/401ce5cb98fa14c1a725.js +1 -0
- package/assets/esri/core/workers/chunks/4319b89cfa02894a8cae.js +1 -0
- package/assets/esri/core/workers/chunks/{7bed14d9bcd7fc5e2eec.js → 4bcd74951477e8977ba1.js} +1 -1
- package/assets/esri/core/workers/chunks/4c04c54330b693892cfc.js +314 -0
- package/assets/esri/core/workers/chunks/{687d2b761dc5b5cf0c31.js → 4d4d71d24c1a9cb342b8.js} +1 -1
- package/assets/esri/core/workers/chunks/4fa230dc6e5e87b0dec1.js +1 -0
- package/assets/esri/core/workers/chunks/50f03813fba4b752ca9f.js +1 -0
- package/assets/esri/core/workers/chunks/{abc236e99b52be1c83b9.js → 52a14266fe239b95c5ce.js} +1 -1
- package/assets/esri/core/workers/chunks/53b5c77832df7df4d4e3.js +1 -0
- package/assets/esri/core/workers/chunks/{34178ace79e8dea3567d.js → 562cddaf63985e53ee6e.js} +1 -1
- package/assets/esri/core/workers/chunks/563933a84fc9b0e021f6.js +1 -0
- package/assets/esri/core/workers/chunks/58b3a776ef129f7f86dc.js +1 -0
- package/assets/esri/core/workers/chunks/58e8d41dcc450e6427c9.js +1 -0
- package/assets/esri/core/workers/chunks/{6599cc702a46f81a5634.js → 5dd5be91038df8902dc4.js} +1 -1
- package/assets/esri/core/workers/chunks/{49a1b7f700b8a42de817.js → 60c7f896f2246a8aa6d7.js} +19 -19
- package/assets/esri/core/workers/chunks/60f363ee2add089e8f0b.js +1 -0
- package/assets/esri/core/workers/chunks/68074a484d7f9bc713c0.js +1 -0
- package/assets/esri/core/workers/chunks/6acfa51b81e6f4255118.js +1 -0
- package/assets/esri/core/workers/chunks/{3fe7be535affae31de7e.js → 6b85a8776ec2beff63cb.js} +1 -1
- package/assets/esri/core/workers/chunks/{0dc3a04ce717b7ddd957.js → 6c9dac4a869742cc2718.js} +1 -1
- package/assets/esri/core/workers/chunks/6df484faf54e90a6cc77.js +1 -0
- package/assets/esri/core/workers/chunks/6ea6ad894ac634aa4391.js +1 -0
- package/assets/esri/core/workers/chunks/6f8098f9fe233833245a.js +1 -0
- package/assets/esri/core/workers/chunks/75fd2ef1236a9364ca7f.js +1 -0
- package/assets/esri/core/workers/chunks/7be9bbae23895d1cfa92.js +1 -0
- package/assets/esri/core/workers/chunks/7ea48661f1087d06aa41.js +1 -0
- package/assets/esri/core/workers/chunks/{47e5149765beee46f208.js → 7ee68f67f9cc48a328f0.js} +1 -1
- package/assets/esri/core/workers/chunks/{e5aac523c37d906eece6.js → 827277e5da652bcecaf2.js} +1 -1
- package/assets/esri/core/workers/chunks/866477acdf03b8a40bc9.js +1 -0
- package/assets/esri/core/workers/chunks/8e83c133b201b9b61e70.js +1 -0
- package/assets/esri/core/workers/chunks/9086a4933d3d3d9ffa72.js +1 -0
- package/assets/esri/core/workers/chunks/94174d40de39dbe7d0bf.js +1 -0
- package/assets/esri/core/workers/chunks/{dd99b77a7c0a052507bb.js → 9d88b4ba8e511da64583.js} +3 -3
- package/assets/esri/core/workers/chunks/9f34cf024231f574009c.js +1 -0
- package/assets/esri/core/workers/chunks/{e705d041f6c1632bfbcc.js → a10c6dd3bb8b3602de68.js} +1 -1
- package/assets/esri/core/workers/chunks/a64cd02ca959d511101c.js +1 -0
- package/assets/esri/core/workers/chunks/a808be466812db51813d.js +1 -0
- package/assets/esri/core/workers/chunks/{6b4a24248182245167ca.js → a931515a2569713e743b.js} +1 -1
- package/assets/esri/core/workers/chunks/a95e28ade258b144cbb5.js +1 -0
- package/assets/esri/core/workers/chunks/adc68e2c6d2698a52bfe.js +1 -0
- package/assets/esri/core/workers/chunks/{0f8149fdcf0adeca268e.js → b28e0b89603d8b03f9e1.js} +1 -1
- package/assets/esri/core/workers/chunks/b5e4a36784d598ae6679.js +1 -0
- package/assets/esri/core/workers/chunks/{204d738c8b651314ae64.js → b899b4e7979c13b99526.js} +1 -1
- package/assets/esri/core/workers/chunks/bb4574a87ca21e719f0d.js +1 -0
- package/assets/esri/core/workers/chunks/{07639f406b71bb49ffd6.js → bdbb5b33f0f49661bf6d.js} +1 -1
- package/assets/esri/core/workers/chunks/bf05164b7a3e4f31e9db.js +1 -0
- package/assets/esri/core/workers/chunks/c042269586921e337be9.js +1 -0
- package/assets/esri/core/workers/chunks/c7391b0b5a9c916a53f7.js +1 -0
- package/assets/esri/core/workers/chunks/{43d28c6509c21b8917a8.js → ca7523c14d81c470e92e.js} +1 -1
- package/assets/esri/core/workers/chunks/d0ae8752419d5b761190.js +1 -0
- package/assets/esri/core/workers/chunks/d445e9399fe4ca3d2a50.js +1 -0
- package/assets/esri/core/workers/chunks/d7683a95775c9f401a7e.js +1 -0
- package/assets/esri/core/workers/chunks/{9d6945cda99d14af83ac.js → d7d9656b990ce8be2152.js} +1 -1
- package/assets/esri/core/workers/chunks/dbfb00fb28b8b9f687a1.js +1 -0
- package/assets/esri/core/workers/chunks/df4a0af329ce94a47a7b.js +1 -0
- package/assets/esri/core/workers/chunks/e071b912539304564b69.js +1 -0
- package/assets/esri/core/workers/chunks/e10d6e511921394474ca.js +1 -0
- package/assets/esri/core/workers/chunks/e4b6aa8f67c2bd285020.js +1 -0
- package/assets/esri/core/workers/chunks/e6ca02f98f855024f74b.js +1 -0
- package/assets/esri/core/workers/chunks/{892157696e8f9e38c472.js → e6e837e43b9348050832.js} +1 -1
- package/assets/esri/core/workers/chunks/{d3325ed8d224e2350db7.js → e8a3ad00936f2ccaf362.js} +1 -1
- package/assets/esri/core/workers/chunks/ef7063ee790d2d64d4b2.js +1 -0
- package/assets/esri/core/workers/chunks/{b65fcfde62d49de1fa54.js → ef977be20a647aeded0a.js} +1 -1
- package/assets/esri/core/workers/chunks/efb631371b6bb3f043bb.js +1 -0
- package/assets/esri/core/workers/chunks/{0f5693541111fcae0c2f.js → f0914715e90e43466f8c.js} +1 -1
- package/assets/esri/core/workers/chunks/{ab71865b94022e78035c.js → f92845eb7df1804fcd6d.js} +1 -1
- package/assets/esri/core/workers/chunks/{bfc063d4431bfa162160.js → fd09f38fb4d99bf34988.js} +1 -1
- package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +108 -0
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/GaussianSplat.glsl.js +2 -2
- package/chunks/GaussianSplatDepthComposition.glsl.js +4 -5
- package/chunks/HUDMaterial.glsl.js +45 -47
- package/chunks/LineMarker.glsl.js +33 -34
- package/chunks/PointRenderer.glsl.js +6 -6
- package/chunks/RibbonLine.glsl.js +62 -54
- package/chunks/boundedPlane.js +1 -1
- package/chunks/libtess-f32.js +1 -1
- package/chunks/libtess-f64.js +1 -1
- package/config.js +1 -1
- package/core/Collection.d.ts +3 -2
- package/core/Identifiable.d.ts +1 -3
- package/core/accessorSupport/ensureType.js +1 -1
- package/core/accessorSupport/types.d.ts +0 -8
- package/core/compilerUtils.js +1 -1
- package/core/promiseUtils.d.ts +1 -1
- package/core/reactiveUtils.d.ts +2 -2
- package/core/typedArrayUtil.js +1 -1
- package/core/units.d.ts +8 -2
- package/core/units.js +1 -1
- package/core/workers/loaderConfig.js +1 -1
- package/editing/sharedTemplates/SharedTemplate.js +1 -1
- package/geometry/HeightModelInfo.d.ts +3 -3
- package/geometry/SpatialReference.d.ts +2 -2
- package/geometry/libtess.js +1 -1
- package/geometry/support/MeshTexture.js +1 -1
- package/geometry/support/aaBoundingRect.js +1 -1
- package/geometry/support/boundedPlane.js +1 -1
- package/geometry/support/heightModelInfoUtils.js +1 -1
- package/geometry/support/meshUtils/External.js +1 -1
- package/geometry/support/meshUtils/exporters/gltf/imageutils.js +1 -1
- package/geometry/support/meshUtils/loadExternal.js +1 -1
- package/geometry/support/meshUtils/types.d.ts +2 -2
- package/geometry/support/rotate.js +1 -1
- package/geometry/types.d.ts +2 -0
- package/identity/IdentityManagerBase.d.ts +4 -4
- package/interfaces.d.ts +2937 -2955
- package/kernel.js +1 -1
- package/layers/BaseElevationLayer.d.ts +3 -4
- package/layers/BuildingSceneLayer.d.ts +1 -1
- package/layers/ElevationLayer.d.ts +3 -4
- package/layers/FeatureLayer.d.ts +12 -11
- package/layers/FeatureLayer.js +1 -1
- package/layers/GroupLayer.d.ts +3 -3
- package/layers/ImageryLayer.d.ts +3 -3
- package/layers/ImageryTileLayer.d.ts +3 -4
- package/layers/Layer.d.ts +4 -4
- package/layers/LineOfSightLayer.d.ts +1 -1
- package/layers/LinkChartLayer.js +1 -1
- package/layers/MapImageLayer.d.ts +7 -8
- package/layers/MediaLayer.d.ts +3 -3
- package/layers/OrientedImageryLayer.d.ts +3 -3
- package/layers/ParquetLayer.d.ts +1 -1
- package/layers/ParquetLayer.js +1 -1
- package/layers/RouteLayer.d.ts +2 -3
- package/layers/SceneLayer.d.ts +167 -3
- package/layers/SceneLayer.js +1 -1
- package/layers/StreamLayer.d.ts +3 -3
- package/layers/SubtypeGroupLayer.d.ts +3 -3
- package/layers/WCSLayer.d.ts +3 -3
- package/layers/buildingSublayers/BuildingGroupSublayer.d.ts +1 -1
- package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/graphics/dehydratedFeatureComparison.js +1 -1
- package/layers/graphics/dehydratedFeatures.js +1 -1
- package/layers/graphics/hydratedFeatures.js +1 -1
- package/layers/graphics/sources/ParquetSource.d.ts +1 -1
- package/layers/graphics/sources/support/QueryTask.js +1 -1
- package/layers/mixins/SceneService.d.ts +2 -2
- package/layers/orientedImagery/queries.js +1 -1
- package/layers/orientedImagery/transformations/imageToWorld.d.ts +2 -2
- package/layers/orientedImagery/transformations/rectifyMapPoint.js +1 -1
- package/layers/orientedImagery/transformations/types.d.ts +1 -1
- package/layers/raster/datasets/pixelReader.d.ts +1 -7
- package/layers/raster/functions/changeDetectionUtils.js +1 -1
- package/layers/raster/functions/creators/createBandIndexFunctions.d.ts +29 -29
- package/layers/raster/functions/customBandIndexUtils.js +1 -1
- package/layers/raster/functions/focalStatUtils.js +1 -1
- package/layers/raster/functions/pixelTransformUtils.js +1 -1
- package/layers/save/featureLayerUtils.js +1 -1
- package/layers/support/BuildingFilterMode.d.ts +3 -1
- package/layers/support/BuildingFilterMode.js +1 -1
- package/layers/support/BuildingFilterModeSolid.js +1 -1
- package/layers/support/BuildingFilterModeWireFrame.js +1 -1
- package/layers/support/BuildingFilterModeXRay.js +1 -1
- package/layers/support/CodedValue.d.ts +1 -1
- package/layers/support/ControlPoint.d.ts +6 -20
- package/layers/support/ControlPointsGeoreference.d.ts +2 -1
- package/layers/support/ElevationSampler.d.ts +2 -2
- package/layers/support/ElevationSampler.js +1 -1
- package/layers/support/FeatureReductionBinning.d.ts +4 -4
- package/layers/support/FeatureReductionBinning.js +1 -1
- package/layers/support/FeatureReductionSelection.d.ts +3 -3
- package/layers/support/FeatureReductionSelection.js +1 -1
- package/layers/support/Field.d.ts +1 -2
- package/layers/support/ParquetGeometryEncodingLocation.d.ts +6 -4
- package/layers/support/ParquetGeometryEncodingLocation.js +1 -1
- package/layers/support/ParquetGeometryEncodingWkb.d.ts +6 -4
- package/layers/support/ParquetGeometryEncodingWkb.js +1 -1
- package/layers/support/PixelBlock.d.ts +11 -3
- package/layers/support/RangeDomain.d.ts +2 -1
- package/layers/support/SceneServiceTimeInfo.js +5 -0
- package/layers/support/SpriteSource.d.ts +1 -0
- package/layers/support/Sublayer.d.ts +17 -16
- package/layers/support/Sublayer.js +1 -1
- package/layers/support/SubtypeSublayer.js +1 -1
- package/layers/support/domains.js +1 -1
- package/layers/support/featureReductionUtils.js +1 -1
- package/layers/support/rasterFunctionUtils.d.ts +30 -30
- package/layers/support/types.d.ts +101 -1
- package/layers/types.d.ts +12 -1
- package/layers/wms/types.d.ts +0 -4
- package/networks/CircuitManager.d.ts +5 -5
- package/networks/Network.d.ts +5 -5
- package/networks/UtilityNetwork.d.ts +2 -2
- package/networks/support/TopologyValidationJobInfo.js +1 -1
- package/networks/support/TraceJobInfo.js +1 -1
- package/package.json +2 -2
- package/popup/content/types.d.ts +1 -3
- package/portal/PortalItem.d.ts +8 -8
- package/portal/PortalItemResource.d.ts +2 -2
- package/portal/PortalUser.d.ts +3 -3
- package/portal/support/resourceUtils.d.ts +3 -3
- package/portal/types.d.ts +6 -6
- package/renderers/support/RasterSymbolizer.js +1 -1
- package/renderers/support/pointCloud/types.d.ts +1 -0
- package/renderers/support/raster/types.d.ts +1 -0
- package/renderers/support/rendererConversion.js +1 -1
- package/renderers/types.d.ts +2 -0
- package/renderers/visualVariables/support/visualVariableUtils.js +1 -1
- package/rest/knowledgeGraph/wasmInterface/WasmDataModelWrapperInterfaces.d.ts +0 -2
- package/rest/layerSources/DynamicDataLayer.d.ts +102 -0
- package/rest/layerSources/DynamicDataLayer.js +5 -0
- package/{layers/support/source/MapLayerSource.d.ts → rest/layerSources/DynamicMapLayer.d.ts} +4 -4
- package/rest/layerSources/DynamicMapLayer.js +5 -0
- package/rest/layerSources/JoinTableDataSource.d.ts +75 -0
- package/rest/layerSources/JoinTableDataSource.js +5 -0
- package/{layers/support/source → rest/layerSources}/QueryTableDataSource.d.ts +8 -7
- package/rest/layerSources/QueryTableDataSource.js +5 -0
- package/{layers/support/source → rest/layerSources}/RasterDataSource.d.ts +2 -2
- package/rest/layerSources/RasterDataSource.js +5 -0
- package/{layers/support/source → rest/layerSources}/TableDataSource.d.ts +2 -2
- package/rest/layerSources/TableDataSource.js +5 -0
- package/rest/layerSources/utils.js +5 -0
- package/rest/print.js +1 -1
- package/rest/query/executeQuery.js +1 -1
- package/rest/query/operations/pbfDehydratedFeatureSet.js +1 -1
- package/rest/support/JobInfo.js +1 -1
- package/rest/support/Query.js +1 -1
- package/rest/support/RelationshipQuery.js +1 -1
- package/rest/support/ServiceAreaParameters.js +1 -1
- package/rest/support/types.d.ts +0 -4
- package/smartMapping/heuristics/binLevel.d.ts +2 -2
- package/smartMapping/heuristics/scaleRange.d.ts +2 -2
- package/smartMapping/heuristics/sizeRange.d.ts +2 -2
- package/smartMapping/heuristics/sizeRange.js +1 -1
- package/smartMapping/heuristics/types.d.ts +3 -3
- package/smartMapping/labels/bins.d.ts +2 -2
- package/smartMapping/labels/clusters.d.ts +2 -2
- package/smartMapping/renderers/color.d.ts +14 -14
- package/smartMapping/renderers/dotDensity.d.ts +2 -2
- package/smartMapping/renderers/heatmap.d.ts +4 -4
- package/smartMapping/renderers/location.d.ts +2 -2
- package/smartMapping/renderers/opacity.d.ts +2 -2
- package/smartMapping/renderers/pieChart.d.ts +4 -4
- package/smartMapping/renderers/predominance.d.ts +2 -2
- package/smartMapping/renderers/relationship.d.ts +4 -4
- package/smartMapping/renderers/size.d.ts +15 -15
- package/smartMapping/renderers/support/rendererUtils.d.ts +2 -2
- package/smartMapping/renderers/support/utils.js +1 -1
- package/smartMapping/renderers/type.d.ts +4 -4
- package/smartMapping/renderers/univariateColorSize.d.ts +4 -4
- package/smartMapping/statistics/classBreaks.d.ts +2 -2
- package/smartMapping/statistics/heatmapStatistics.d.ts +2 -2
- package/smartMapping/statistics/histogram.d.ts +2 -2
- package/smartMapping/statistics/predominantCategories.d.ts +2 -2
- package/smartMapping/statistics/summaryStatistics.d.ts +2 -2
- package/smartMapping/statistics/summaryStatisticsForAge.d.ts +2 -2
- package/smartMapping/statistics/support/ageUtils.d.ts +2 -2
- package/smartMapping/statistics/support/statsWorker.js +1 -1
- package/smartMapping/statistics/support/utils.js +1 -1
- package/smartMapping/statistics/types.d.ts +7 -7
- package/smartMapping/statistics/uniqueValues.d.ts +2 -2
- package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
- package/smartMapping/support/adapters/InMemoryLayerAdapter.js +1 -1
- package/smartMapping/support/adapters/support/histogramUtils.js +1 -1
- package/smartMapping/support/utils.js +1 -1
- package/smartMapping/symbology/color.d.ts +8 -8
- package/smartMapping/symbology/dotDensity.d.ts +6 -6
- package/smartMapping/symbology/flow.d.ts +6 -6
- package/smartMapping/symbology/heatmap.d.ts +6 -6
- package/smartMapping/symbology/location.d.ts +2 -2
- package/smartMapping/symbology/pieChart.d.ts +6 -6
- package/smartMapping/symbology/predominance.d.ts +6 -6
- package/smartMapping/symbology/relationship.d.ts +6 -6
- package/smartMapping/symbology/size.d.ts +2 -2
- package/smartMapping/symbology/support/colorRamps.d.ts +2 -2
- package/smartMapping/symbology/type.d.ts +6 -6
- package/support/popupUtils.d.ts +2 -2
- package/support/revision.js +1 -1
- package/symbols/LineSymbol3D.d.ts +2 -2
- package/symbols/PointSymbol3D.d.ts +2 -2
- package/symbols/PolygonSymbol3D.d.ts +2 -2
- package/symbols/patterns/LinePattern3D.d.ts +8 -0
- package/symbols/patterns/LineStylePattern3D.d.ts +1 -2
- package/symbols/patterns/Pattern3D.d.ts +9 -0
- package/symbols/patterns/StylePattern3D.d.ts +1 -2
- package/symbols/support/ElevationInfo.d.ts +2 -2
- package/symbols/support/IconSymbol3DLayerResource.d.ts +1 -1
- package/symbols/support/defaults.js +1 -1
- package/symbols/support/defaults3D.js +1 -1
- package/symbols/support/previewSymbol3D.js +1 -1
- package/symbols/support/symbolLayerUtils3D.js +1 -1
- package/symbols/support/symbolUtils.js +1 -1
- package/symbols/support/utils.js +1 -1
- package/symbols/types.d.ts +7 -0
- package/unionTypes.d.ts +13 -13
- package/views/2d/analysis/ElevationProfile/ElevationProfileLineVisualization2D.js +1 -1
- package/views/2d/analysis/ElevationProfileAnalysisView2D.d.ts +16 -11
- package/views/2d/analysis/ElevationProfileAnalysisView2D.js +1 -1
- package/views/2d/analysis/types.d.ts +1 -0
- package/views/2d/engine/imagery/RasterVFDisplayObject.js +1 -1
- package/views/2d/engine/vectorTiles/VectorTile.js +1 -1
- package/views/2d/engine/webgl/TextureUploadManager.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/input/handlers/DoubleTapDragZoom.js +1 -1
- package/views/2d/input/handlers/KeyZoom.js +1 -1
- package/views/2d/layers/BaseLayerView2D.d.ts +0 -5
- package/views/2d/layers/FeatureLayerView2D.js +1 -1
- package/views/2d/layers/StreamLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/features/Processor.js +1 -1
- package/views/2d/layers/support/MediaLayerInteractionOptions.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/utils.js +1 -1
- package/views/3d/analysis/Dimension/lengthDimensionConstraintUtils.js +1 -1
- package/views/3d/analysis/ElevationProfile/ElevationProfileLineVisualization3D.js +1 -1
- package/views/3d/analysis/ElevationProfileAnalysisView3D.d.ts +16 -11
- package/views/3d/analysis/ElevationProfileAnalysisView3D.js +1 -1
- package/views/3d/analysis/LineOfSightAnalysisView3D.d.ts +0 -2
- package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementTool.js +1 -1
- package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +1 -1
- package/views/3d/analysis/types.d.ts +1 -0
- package/views/3d/camera/constraintUtils/tilt.js +1 -1
- package/views/3d/environment/CloudsParameters.js +1 -1
- package/views/3d/environment/CloudsRenderer.js +1 -1
- package/views/3d/environment/SceneViewEnvironment.js +1 -1
- package/views/3d/environment/SunLighting.d.ts +1 -3
- package/views/3d/glTF/internal/Resource.js +1 -1
- package/views/3d/glTF/internal/fillDefaults.js +1 -1
- package/views/3d/interactive/Manipulator3D.js +1 -1
- package/views/3d/interactive/SnappingVisualizer3D.js +1 -1
- package/views/3d/interactive/editingTools/isSupportedObjectUtils.js +1 -1
- package/views/3d/interactive/editingTools/move/isSupportedObject.js +1 -1
- package/views/3d/interactive/editingTools/transform/isSupportedGraphic.js +1 -1
- package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
- package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/LabelInfo.js +1 -1
- package/views/3d/layers/graphics/defaultSymbolComplexity.js +1 -1
- package/views/3d/layers/graphics/lineUtils.js +1 -1
- package/views/3d/layers/graphics/pipeline/rendering/FeaturePipelineRenderManager.js +1 -1
- package/views/3d/layers/graphics/pipeline/symbolization/primitiveObjectUtils.js +1 -1
- package/views/3d/layers/graphics/primitiveObjectSymbolUtils.js +1 -1
- package/views/3d/layers/i3s/BuildingFilterUtil.js +1 -1
- package/views/3d/layers/i3s/I3SIntersectionHandler.js +1 -1
- package/views/3d/layers/i3s/I3SNode.js +1 -1
- package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
- package/views/3d/layers/i3s/PointCloudWorkerUtil.js +1 -1
- package/views/3d/layers/i3s/SphereCone.js +5 -0
- package/views/3d/layers/support/FastSymbolUpdates.js +1 -1
- package/views/3d/layers/support/MediaLayerInteractionOptions.d.ts +4 -0
- package/views/3d/layers/support/edgeUtils.js +1 -1
- package/views/3d/layers/support/featureReference.js +1 -1
- package/views/3d/layers/support/featureTileQuery3D.js +1 -1
- package/views/3d/layers/support/patternUtils.js +1 -1
- package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
- package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
- package/views/3d/support/FrustumExtentIntersection.js +1 -1
- package/views/3d/support/QualityProfile.js +1 -1
- package/views/3d/support/QualitySettings.js +1 -1
- package/views/3d/support/buffer/glUtil.js +1 -1
- package/views/3d/support/engineContent/sdfPrimitives.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatFadeTexture.js +1 -1
- package/views/3d/support/viewpointUtils.js +1 -1
- package/views/3d/terrain/isTerrainSurfaceLayer.js +1 -1
- package/views/3d/webgl/RenderNode.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentData.glsl.js +8 -8
- package/views/3d/webgl-engine/collections/Component/Transform.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBufferFields.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js +4 -4
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeFragmentNormals.glsl.js +6 -6
- package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/Normals.glsl.js +5 -5
- package/views/3d/webgl-engine/core/shaderLibrary/shading/PositionOutsideClipSpace.js +5 -0
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/TileBackground.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/util/BlendModes.glsl.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/LocalOriginManager.js +1 -1
- package/views/3d/webgl-engine/lib/ManagedTexture.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/LegacyTransform.js +5 -0
- package/views/3d/webgl-engine/materials/lineStippleUtils.js +1 -1
- package/views/3d/webgl-engine/shaders/CompositingTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplat.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarker.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/PointRenderer.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/LineAmplitude.glsl.js +4 -4
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/LineOffset.glsl.js +8 -8
- package/views/SceneView.js +1 -1
- package/views/VideoView.js +1 -1
- package/views/View.js +1 -1
- package/views/View2D.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileController.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileIndicatorPointVisualization.js +5 -0
- package/views/analysis/ElevationProfile/ElevationProfileLineComputation.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileResult.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileTool.js +1 -1
- package/views/analysis/ElevationProfile/constants.js +1 -1
- package/views/analysis/types.d.ts +4 -0
- package/views/draw/Draw.js +1 -1
- package/views/input/ViewEvents.js +1 -1
- package/views/input/types.d.ts +2 -4
- package/views/interactive/editGeometry/EditGeometry.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiledFetcher.js +1 -1
- package/views/interactive/snapping/featureSources/snappingCandidateElevationAlignment.js +1 -1
- package/views/interactive/snapping/featureSources/snappingCandidateElevationFilter.js +1 -1
- package/views/interactive/snapping/featureSources/symbologySnappingCandidates.js +1 -1
- package/views/layers/CatalogLayerView.d.ts +1 -4
- package/views/layers/DimensionLayerView.d.ts +4 -6
- package/views/layers/DimensionLayerViewMixin.d.ts +0 -97
- package/views/layers/LineOfSightLayerView.d.ts +4 -6
- package/views/layers/LineOfSightLayerViewMixin.d.ts +0 -77
- package/views/layers/StreamLayerView.d.ts +31 -2
- package/views/support/PromiseQueue.js +1 -1
- package/views/support/WebAssemblyRequirements.js +5 -0
- package/views/support/WebGLRequirements.js +1 -1
- package/views/support/screenUtils.js +1 -1
- package/views/support/screenshotUtils.js +1 -1
- package/views/webgl/FramebufferObject.js +1 -1
- package/views/webgl/Uniform.js +1 -1
- package/views/webgl/Util.js +1 -1
- package/webdoc/support/SlideThumbnail.d.ts +6 -3
- package/webdoc/support/SlideThumbnail.js +1 -1
- package/webscene/Slide.d.ts +2 -2
- package/webscene/spec-certification/api.js +1 -1
- package/widgets/AreaMeasurement2D/AreaMeasurement2DViewModel.d.ts +2 -2
- package/widgets/AreaMeasurement2D/AreaMeasurement2DViewModel.js +1 -1
- package/widgets/AreaMeasurement3D/AreaMeasurement3DViewModel.d.ts +2 -2
- package/widgets/AreaMeasurement3D/AreaMeasurement3DViewModel.js +1 -1
- package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
- package/widgets/BatchAttributeForm/inputs/InputBase.js +1 -1
- package/widgets/BatchAttributeForm/inputs/TextElementInput.d.ts +7 -0
- package/widgets/BatchAttributeForm/inputs/TextElementInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/support/textInputElementUtils.js +5 -0
- package/widgets/BatchAttributeForm/templates/TextElementTemplate.js +1 -1
- package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
- package/widgets/BatchAttributeForm/templates/support/hashElementTemplate.js +1 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/DirectLineMeasurement3D/DirectLineMeasurement3DViewModel.d.ts +2 -2
- package/widgets/DirectLineMeasurement3D/DirectLineMeasurement3DViewModel.js +1 -1
- package/widgets/Directions/DirectionsViewModel.d.ts +20 -4
- package/widgets/Directions/DirectionsViewModel.js +1 -1
- package/widgets/Directions.d.ts +2 -3
- package/widgets/DistanceMeasurement2D/DistanceMeasurement2DViewModel.d.ts +2 -2
- package/widgets/DistanceMeasurement2D/DistanceMeasurement2DViewModel.js +1 -1
- package/widgets/Editor/EditorViewModel.d.ts +2 -2
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.d.ts +2 -2
- package/widgets/ElevationProfile/support/HoveredPoints.js +1 -1
- package/widgets/ElevationProfile/types.d.ts +3 -4
- package/widgets/Feature/support/arcadeFeatureUtils.js +1 -1
- package/widgets/Feature/types.d.ts +1 -5
- package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
- package/widgets/FeatureForm/featureFormUtils.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/FeatureTable/Grid/types.d.ts +0 -2
- package/widgets/FeatureTable/support/types.d.ts +8 -8
- package/widgets/Features/FeaturesViewModel.d.ts +3 -3
- package/widgets/Features/FeaturesViewModel.js +1 -1
- package/widgets/LineOfSight/LineOfSightViewModel.d.ts +2 -2
- package/widgets/LineOfSight/LineOfSightViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/navigation/queries.js +1 -1
- package/widgets/Popup/types.d.ts +0 -2
- package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
- package/widgets/ShadowCast/ShadowCastVisibleElements.d.ts +2 -0
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/Sketch/support/OperationHandle.js +1 -1
- package/widgets/Sketch/types.d.ts +2 -2
- package/widgets/Slice/SliceViewModel.d.ts +2 -2
- package/widgets/Slice/SliceViewModel.js +1 -1
- package/widgets/Spinner/SpinnerViewModel.js +1 -1
- package/widgets/TimeSlider.js +1 -1
- package/widgets/support/AnalysisViewModelMixin.js +5 -0
- package/widgets/support/AnchorElementViewModel.js +1 -1
- package/widgets/support/InteractiveToolViewModelMixin.js +5 -0
- package/widgets/support/SelectionList/GroupLayerItem.js +1 -1
- package/widgets/support/dateUtils.js +1 -1
- package/assets/esri/core/workers/chunks/055fdc5134d54174444d.js +0 -316
- package/assets/esri/core/workers/chunks/058fb2cd6387acfd458c.js +0 -1
- package/assets/esri/core/workers/chunks/08359ae020238a565955.js +0 -1
- package/assets/esri/core/workers/chunks/0ae018098906d6a88904.js +0 -1
- package/assets/esri/core/workers/chunks/0cd3acfbf9ee991bdab4.js +0 -1
- package/assets/esri/core/workers/chunks/0e5cd0cf6ab7cb37d723.js +0 -1
- package/assets/esri/core/workers/chunks/0ee407b8db5c07a00d82.js +0 -1
- package/assets/esri/core/workers/chunks/10373885604655f673df.js +0 -1
- package/assets/esri/core/workers/chunks/119822a646834c1cebc0.js +0 -1
- package/assets/esri/core/workers/chunks/13d61d34e55c80e4ecdf.js +0 -1
- package/assets/esri/core/workers/chunks/17dea03fc4eb414f0022.js +0 -1
- package/assets/esri/core/workers/chunks/1967239713b58dccfd81.js +0 -1
- package/assets/esri/core/workers/chunks/1c350a2c4014146dbcd9.js +0 -1
- package/assets/esri/core/workers/chunks/2266a8f2c2ec37c19bb4.js +0 -1
- package/assets/esri/core/workers/chunks/226acd251ad7d7ee3b57.js +0 -1
- package/assets/esri/core/workers/chunks/22b07c54a5fcc27771b0.js +0 -1
- package/assets/esri/core/workers/chunks/22ca80f491e070b2a5e7.js +0 -1
- package/assets/esri/core/workers/chunks/2402d305a77fef4694a0.js +0 -1
- package/assets/esri/core/workers/chunks/27f096c434f049b8df01.js +0 -1
- package/assets/esri/core/workers/chunks/3371935a4fd6346d3a17.js +0 -1
- package/assets/esri/core/workers/chunks/3c3d311b88f5400951ef.js +0 -1
- package/assets/esri/core/workers/chunks/3c4f8597f602779174f1.js +0 -1
- package/assets/esri/core/workers/chunks/3da53c017f9c5d2d778a.js +0 -1
- package/assets/esri/core/workers/chunks/4773a358832f87963766.js +0 -1
- package/assets/esri/core/workers/chunks/492515860198f38dd698.js +0 -1
- package/assets/esri/core/workers/chunks/4f33a2ecb154a2c2449c.js +0 -1
- package/assets/esri/core/workers/chunks/4f6f181ee83b4d484518.js +0 -1
- package/assets/esri/core/workers/chunks/52726458f590e726d52c.js +0 -1
- package/assets/esri/core/workers/chunks/536c492fdda30f2f1288.js +0 -1
- package/assets/esri/core/workers/chunks/600e2e6b51e2fb9c598c.js +0 -1
- package/assets/esri/core/workers/chunks/62b28f73f814413c10fc.js +0 -1
- package/assets/esri/core/workers/chunks/63b8cd7d5cafbaeed894.js +0 -1
- package/assets/esri/core/workers/chunks/6925f09d44cc38480d53.js +0 -1
- package/assets/esri/core/workers/chunks/7f4fa2f2e85863d3cfb9.js +0 -1
- package/assets/esri/core/workers/chunks/8f4c480c418eba299c2b.js +0 -1
- package/assets/esri/core/workers/chunks/990341f7c47bd656c782.js +0 -1
- package/assets/esri/core/workers/chunks/a3836f6a93924ee4816e.js +0 -1
- package/assets/esri/core/workers/chunks/ab520fd1ae917daf07d8.js +0 -1
- package/assets/esri/core/workers/chunks/acc7ff44bfcb5c195114.js +0 -1
- package/assets/esri/core/workers/chunks/b25a131c04092c3ab75d.js +0 -1
- package/assets/esri/core/workers/chunks/b7960ab9a9da7f88184c.js +0 -1
- package/assets/esri/core/workers/chunks/b9909264cfea68d5f2a1.js +0 -1
- package/assets/esri/core/workers/chunks/ba7f57788847cc0f68df.js +0 -1
- package/assets/esri/core/workers/chunks/bb08359610a41e304b55.js +0 -1
- package/assets/esri/core/workers/chunks/bf06250be7a7a36306b1.js +0 -1
- package/assets/esri/core/workers/chunks/bfbbcaa1fb04f17fc869.js +0 -1
- package/assets/esri/core/workers/chunks/d30cfc5fa302cc08d862.js +0 -1
- package/assets/esri/core/workers/chunks/d75adfd4acb3c92accc9.js +0 -1
- package/assets/esri/core/workers/chunks/da99fd0d3106dd357743.js +0 -1
- package/assets/esri/core/workers/chunks/de71db3b0fb947b13c97.js +0 -1
- package/assets/esri/core/workers/chunks/dfbbead4c24d13682891.js +0 -1
- package/assets/esri/core/workers/chunks/e4ba850e8344ac2c5fc0.js +0 -1
- package/assets/esri/core/workers/chunks/f7d93aae350796b88562.js +0 -1
- package/assets/esri/core/workers/chunks/f9370830051865a3435b.js +0 -1
- package/layers/mixins/TemporalSceneLayer.d.ts +0 -177
- package/layers/mixins/TemporalSceneLayer.js +0 -5
- package/layers/mixins/properties/ILayerWithSave.d.ts +0 -11
- package/layers/support/ContingencyConstraintViolation.d.ts +0 -2
- package/layers/support/ContingentValue.d.ts +0 -2
- package/layers/support/ContingentValuesResult.d.ts +0 -2
- package/layers/support/ElevationQuery.d.ts +0 -35
- package/layers/support/ElevationQueryContext.d.ts +0 -37
- package/layers/support/FeatureReduction.d.ts +0 -3
- package/layers/support/FeatureReduction.js +0 -5
- package/layers/support/FieldGroup.d.ts +0 -2
- package/layers/support/FieldValueType.d.ts +0 -2
- package/layers/support/I3SLayer.d.ts +0 -9
- package/layers/support/ParquetGeometryEncodingBase.d.ts +0 -9
- package/layers/support/ParquetGeometryEncodingBase.js +0 -5
- package/layers/support/SimpleBandStatistics.d.ts +0 -10
- package/layers/support/source/DataLayerSource.d.ts +0 -171
- package/layers/support/source/DataLayerSource.js +0 -5
- package/layers/support/source/MapLayerSource.js +0 -5
- package/layers/support/source/QueryTableDataSource.js +0 -5
- package/layers/support/source/RasterDataSource.js +0 -5
- package/layers/support/source/TableDataSource.js +0 -5
- package/layers/support/source/types.d.ts +0 -4
- package/views/2d/layers/features/FeaturePipelineWorkerProxy.d.ts +0 -32
- package/views/3d/webgl-engine/shaders/GaussianSplatColorTechnique.js +0 -5
- package/views/3d/webgl-engine/shaders/GaussianSplatCompositionTechniqueConfiguration.js +0 -5
- package/views/3d/webgl-engine/shaders/GaussianSplatDepthTechnique.js +0 -5
- package/views/analysis/ElevationProfile/ElevationProfileHoveredPointVisualization.js +0 -5
- package/widgets/support/AnalysisViewModel.d.ts +0 -5
- package/widgets/support/AnalysisViewModel.js +0 -5
- package/widgets/support/AnchorElementViewModel.d.ts +0 -3
- package/widgets/support/InteractiveToolViewModel.d.ts +0 -4
- package/widgets/support/InteractiveToolViewModel.js +0 -5
- /package/webdoc/support/{thumbnailUtils.d.ts → types.d.ts} +0 -0
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
*
|
|
13
13
|
* @since 4.2
|
|
14
14
|
*/
|
|
15
|
-
import type {
|
|
15
|
+
import type { ClassBreaksParameters, ClassBreaksResult } from "./types.js";
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* Generates class breaks for an input field (or expression) of a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) based
|
|
@@ -33,4 +33,4 @@ import type { ClassBreaksParams, ClassBreaksResult } from "./types.js";
|
|
|
33
33
|
* let breakInfos = response.classBreakInfos;
|
|
34
34
|
* });
|
|
35
35
|
*/
|
|
36
|
-
export default function classBreaks(parameters:
|
|
36
|
+
export default function classBreaks(parameters: ClassBreaksParameters): Promise<ClassBreaksResult>;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*
|
|
14
14
|
* @since 4.8
|
|
15
15
|
*/
|
|
16
|
-
import type {
|
|
16
|
+
import type { HeatmapStatisticsParameters, HeatmapStatisticsResult } from "./types.js";
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* Returns an object containing various statistics describing the intensity values
|
|
@@ -30,4 +30,4 @@ import type { HeatmapStatisticsParams, HeatmapStatisticsResult } from "./types.j
|
|
|
30
30
|
* // `stats` contains statistics used to construct a heatmap renderer
|
|
31
31
|
* });
|
|
32
32
|
*/
|
|
33
|
-
export default function heatmapStatistics(parameters:
|
|
33
|
+
export default function heatmapStatistics(parameters: HeatmapStatisticsParameters): Promise<HeatmapStatisticsResult>;
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*
|
|
16
16
|
* @since 4.2
|
|
17
17
|
*/
|
|
18
|
-
import type {
|
|
18
|
+
import type { HistogramParameters, HistogramResult } from "./types.js";
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* Generates a histogram for data returned from a `field` in a given `layer`.
|
|
@@ -45,4 +45,4 @@ import type { HistogramParams, HistogramResult } from "./types.js";
|
|
|
45
45
|
* const histogramWidget = Histogram.fromHistogramResult(histogramResult);
|
|
46
46
|
* });
|
|
47
47
|
*/
|
|
48
|
-
export default function histogram(parameters:
|
|
48
|
+
export default function histogram(parameters: HistogramParameters): Promise<HistogramResult>;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*
|
|
5
5
|
* @since 4.13
|
|
6
6
|
*/
|
|
7
|
-
import type {
|
|
7
|
+
import type { PredominantCategoriesParameters, PredominantCategoriesResult } from "./types.js";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Determines predominant categories for a layer based on a given set of competing numeric fields and returns
|
|
@@ -21,4 +21,4 @@ import type { PredominantCategoriesParams, PredominantCategoriesResult } from ".
|
|
|
21
21
|
* console.log(stats.predominantCategoryInfos);
|
|
22
22
|
* });
|
|
23
23
|
*/
|
|
24
|
-
export default function predominantCategories(parameters:
|
|
24
|
+
export default function predominantCategories(parameters: PredominantCategoriesParameters): Promise<PredominantCategoriesResult>;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*
|
|
14
14
|
* @since 4.2
|
|
15
15
|
*/
|
|
16
|
-
import type {
|
|
16
|
+
import type { SummaryStatisticsParameters, SummaryStatisticsResult } from "./types.js";
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* Returns an object containing statistics describing a set of values returned
|
|
@@ -40,4 +40,4 @@ import type { SummaryStatisticsParams, SummaryStatisticsResult } from "./types.j
|
|
|
40
40
|
* histogramWidget.average = stats.avg;
|
|
41
41
|
* });
|
|
42
42
|
*/
|
|
43
|
-
export default function summaryStatistics(parameters:
|
|
43
|
+
export default function summaryStatistics(parameters: SummaryStatisticsParameters): Promise<SummaryStatisticsResult>;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @see [colorRendererCreator.createAgeRenderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-smartMapping-renderers-color.html#createAgeRenderer)
|
|
6
6
|
* @see [sizeRendererCreator.createAgeRenderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-smartMapping-renderers-size.html#createAgeRenderer)
|
|
7
7
|
*/
|
|
8
|
-
import type {
|
|
8
|
+
import type { SummaryStatisticsForAgeParameters, SummaryStatisticsResult } from "./types.js";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Returns an object containing various statistics describing an age value (e.g.
|
|
@@ -24,4 +24,4 @@ import type { SummaryStatisticsForAgeParams, SummaryStatisticsResult } from "./t
|
|
|
24
24
|
* console.log(`Average age of open incidents in days: ${stats.avg}`);
|
|
25
25
|
* });
|
|
26
26
|
*/
|
|
27
|
-
export default function summaryStatisticsForAge(parameters:
|
|
27
|
+
export default function summaryStatisticsForAge(parameters: SummaryStatisticsForAgeParameters): Promise<SummaryStatisticsResult>;
|
|
@@ -25,9 +25,9 @@ import type { SmartMappingTimeUnit, SupportedLayer } from "../../types.js";
|
|
|
25
25
|
*
|
|
26
26
|
* console.log(`value expression: ${ageExpressions.valueExpression}`);
|
|
27
27
|
*/
|
|
28
|
-
export function getAgeExpressions(params:
|
|
28
|
+
export function getAgeExpressions(params: AgeExpressionsParameters): AgeExpressionsResult;
|
|
29
29
|
|
|
30
|
-
export interface
|
|
30
|
+
export interface AgeExpressionsParameters {
|
|
31
31
|
/**
|
|
32
32
|
* The end time for the age calculation. This can be a field name or a date
|
|
33
33
|
* value, such as `Date.now()`. If a `Date` is provided, then the `startTime` parameter must be a field name.
|
|
@@ -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{getDataValues as i,quantizeFeatures as
|
|
5
|
+
import{getDataValues as i,quantizeFeatures as e,calculateHeatmapStats as a}from"./utils.js";import{calculateStringStatistics as n,calculateStatistics as t,processSummaryStatisticsResult as o,calculateUniqueValuesCount as l,createUVResult as s,calculateClassBreaks as r,resolveCBResult as m,calculateHistogram as u,isNullCountSupported as f}from"../../../statistics/utils.js";async function d(e){const{attribute:a,features:l}=e,{normalizationType:s,normalizationField:r,minValue:m,maxValue:u,fieldType:d,outStatisticTypes:p}=a,c=await i({field:a.field,valueExpression:a.valueExpression,normalizationType:s,normalizationField:r,normalizationTotal:a.normalizationTotal,viewInfoParams:a.viewInfoParams,timeZone:a.timeZone,fieldInfos:a.fieldInfos},l),v=f({normalizationType:s,normalizationField:r,minValue:m,maxValue:u}),z={value:.5,fieldType:d},T="esriFieldTypeString"===d?n({values:c,supportsNullCount:v,percentileParams:z,outStatisticTypes:p}):t({values:c,minValue:m,maxValue:u,useSampleStdDev:!s,supportsNullCount:v,percentileParams:z,outStatisticTypes:p});return o(T,p,"esriFieldTypeDate"===d)}async function p(e){const{attribute:a,features:n}=e,t=await i({field:a.field,field2:a.field2,field3:a.field3,fieldDelimiter:a.fieldDelimiter,valueExpression:a.valueExpression,viewInfoParams:a.viewInfoParams,timeZone:a.timeZone,fieldInfos:a.fieldInfos},n,!1),o=l(t);return s(o,a.domains,a.returnAllCodedValues,a.fieldDelimiter)}async function c(e){const{attribute:a,features:n}=e,{field:t,normalizationType:o,normalizationField:l,normalizationTotal:s,classificationMethod:u}=a,f=await i({field:t,valueExpression:a.valueExpression,normalizationType:o,normalizationField:l,normalizationTotal:s,viewInfoParams:a.viewInfoParams,timeZone:a.timeZone,fieldInfos:a.fieldInfos},n),d=r(f,{field:t,normalizationType:o,normalizationField:l,normalizationTotal:s,classificationMethod:u,standardDeviationInterval:a.standardDeviationInterval,numClasses:a.numClasses,minValue:a.minValue,maxValue:a.maxValue});return m(d,u)}async function v(e){const{attribute:a,features:n}=e,{field:t,normalizationType:o,normalizationField:l,normalizationTotal:s,classificationMethod:r}=a,m=await i({field:t,valueExpression:a.valueExpression,sqlExpression:a.sqlExpression,normalizationType:o,normalizationField:l,normalizationTotal:s,viewInfoParams:a.viewInfoParams,timeZone:a.timeZone,fieldInfos:a.fieldInfos},n);return u(m,{field:t,normalizationType:o,normalizationField:l,normalizationTotal:s,classificationMethod:r,standardDeviationInterval:a.standardDeviationInterval,numBins:a.numBins,minValue:a.minValue,maxValue:a.maxValue})}async function z(i){const{attribute:n,features:t}=i,{field:o,radius:l,transform:s,spatialReference:r}=n,m=n.size??[0,0],u=e(t??[],s,r,m);return a(u,l??void 0,o,m[0],m[1])}export{c as classBreaks,z as heatmapStatistics,v as histogram,d as summaryStatistics,p as uniqueValues};
|
|
@@ -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 e from"../../../core/Error.js";import{pt2px as t}from"../../../core/screenUtils.js";import{millisecondsPerTimeUnit as n}from"../../../core/timeUtils.js";import
|
|
5
|
+
import e from"../../../core/Error.js";import{pt2px as t}from"../../../core/screenUtils.js";import{millisecondsPerTimeUnit as n}from"../../../core/timeUtils.js";import o from"../../../geometry/Point.js";import r from"../../../geometry/SpatialReference.js";import{quantizePoint as i}from"../../../geometry/support/quantizationUtils.js";import{isWrappable as s,getInfo as l}from"../../../geometry/support/spatialReferenceUtils.js";import a from"../../../layers/support/FieldsIndex.js";import{isTimeOnlyField as u,isNumericField as f,numericTypes as c}from"../../../layers/support/fieldUtils.js";import{createValueFunction as m,evaluateDensityKernel as p}from"../../../renderers/support/heatmapUtils.js";import{isAnyDateField as d,getWhereClause as h}from"../../support/utils.js";import{processNullValue as y,getNormalizedValue as $}from"../../../statistics/utils.js";import{loadArcade as g}from"../../../support/loadArcade.js";let j=null;const w=/^(?<hh>([01][0-9])|(2[0-3])):(?<mm>[0-5][0-9])(:(?<ss>[0-5][0-9]))?(\.(?<ms>\d+))?$/;function x(e,t,n){return e.x<0?e.x+=t:e.x>n&&(e.x-=t),e}function b(e,t,n,r){const a=s(n)?l(n):null,u=a?Math.round((a.valid[1]-a.valid[0])/t.scale[0]):null;return e.map(e=>{const n=new o(e.geometry);return i(t,n,n),e.geometry=a?x(n,u??0,r[0]):n,e})}function I(e,n=18,o,r,i){const s=new Float64Array(r*i);n=Math.round(t(n));let l=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;const u=m(o);for(const{geometry:t,attributes:f}of e){const{x:e,y:o}=t,c=Math.max(0,e-n),m=Math.max(0,o-n),d=Math.min(i,o+n),h=Math.min(r,e+n),y=+u(f);for(let t=m;t<d;t++)for(let i=c;i<h;i++){const u=t*r+i,f=p(i-e,t-o,n)*y,c=s[u]+=f;l=Math.min(l,c),a=Math.max(a,c)}}return{min:l,max:a}}function F(e){const t=w.exec(e);if(!t)return null;const{hh:o,mm:r,ss:i,ms:s}=t.groups;return Number(o)*n.hours+Number(r)*n.minutes+Number(i)*n.seconds+Number(s||0)}async function N(e,t,n=!0){if(!t)return[];const{field:o,field2:i,field3:s,fieldDelimiter:l,sqlExpression:f,fieldInfos:c,timeZone:m}=e,p=o&&c?.find(e=>e.name.toLowerCase()===o.toLowerCase()),w=!!p&&u(p),x=!!p&&d(p),b=e.valueExpression,I=e.normalizationType,N=e.normalizationField,E=e.normalizationTotal,v=[],U=e.viewInfoParams;let M=null,T=null;if(b){if(!j){const{arcadeUtils:e}=await g();j=e}j.hasGeometryOperations(b)&&await j.enableGeometryOperations(),M=j.createFunction(b),T=U?j.getViewInfo({viewingMode:U.viewingMode,scale:U.scale,spatialReference:new r(U.spatialReference)}):null}const z=e.fieldInfos,O=!(t[0]&&"declaredClass"in t[0]&&"esri.Graphic"===t[0].declaredClass)&&z?{fields:z}:null;for await(const r of t){const e=r.attributes;let t;if(f){const e=await h(f,new a(z));e&&(t=e.calculateValue(r.attributes))}else if(b){const e=O?Object.assign({},r,{layer:O}):r,n=j.createExecContext(e,T,m);t=j.executeFunction(M,n)}else e&&(t=e[o],i?(t=`${y(t)}${l}${y(e[i])}`,s&&(t=`${t}${l}${y(e[s])}`)):"string"==typeof t&&n&&(x?t=t?new Date(t).getTime():null:w&&(t=t?F(t):null)));if(I&&"number"==typeof t&&isFinite(t)){const n=e&&parseFloat(e[N]);t=$(t,I,n,E)}v.push(t)}return v}function E(e){const t=e.field,n=e.normalizationType,o=e.normalizationField;let r;return"field"===n?r="(NOT "+o+" = 0)":"log"!==n&&"natural-log"!==n&&"square-root"!==n||(r=`(${t} > 0)`),r}function v(e,t,n){const o=null!=t?e+" >= "+t:"",r=null!=n?e+" <= "+n:"";let i="";return i=o&&r?T(o,r):o||r,i?"("+i+")":""}function U(t,n,o,r){let i;return n?n.name!==t.objectIdField&&r.includes(n.type)||(i=new e(o,"'field' should be one of these types: "+r.join(","))):i=new e(o,"'field' is not defined in the layer schema"),i}function M(t,n,o){let r;return n?n.name!==t.objectIdField&&f(n)||(r=new e(o,"'field' should be one of these numeric types: "+c.join(","))):r=new e(o,"'field' is not defined in the layer schema"),r}function T(e,t){let n=null!=e?e:"";return null!=t&&t&&(n=n?"("+n+") AND ("+t+")":t),n}function z(t,n){if(t&&"intersects"!==t.spatialRelationship)return new e(n,"Only 'intersects' spatialRelationship is supported for featureFilter")}function O(t,n,o){const r=R({layer:t,fields:n});if(r.length)return new e(o,"Unknown fields: "+r.join(", ")+". You can only use fields defined in the layer schema");const i=V({layer:t,fields:n});return i.length?new e(o,"Unsupported fields: "+i.join(", ")+". You can only use fields that can be fetched i.e. AdapterFieldUsageInfo.supportsStatistics must be true"):void 0}function R(e){const t=e.layer;return e.fields.filter(e=>!t.getField(e))}function V(e){const t=e.layer;return e.fields.filter(e=>{const n=t.getFieldUsageInfo(e);return!n||!n.supportsStatistics})}function q(e,t,n){const o=[],r=[],i=[],s=[],l=[];e.forEach((e,t)=>{const a=e.field?"field":"expression",u=e.field||e.valueExpression;e.field?(l.push(u),r.push(`var ${a}${t} = Number($feature["${u}"]);`)):(o.push(`function getValueForExpr${t}() {\n ${u} \n}`),r.push(`var ${a}${t} = Number(getValueForExpr${t}());`)),n||i.push(`${a}${t} = IIf(${a}${t} < 0, 0, ${a}${t});`),s.push(`${a}${t}`)});const a=o.length?null:l.reduce((e,t)=>`${e} + ${t}`);let u=null;t||n?t?n||a&&(u=`(( ${a} ) >= 0)`):a&&(u=`(( ${a} ) <> 0)`):a&&(u=`(( ${a} ) > 0)`);return{valueExpression:[o.length?o.join("\n"):"",r.join("\n"),i.join("\n"),`var total = ${s.join(" + ")};`,"return total;"].filter(Boolean).join("\n\n"),sqlExpression:a,sqlWhere:u}}export{I as calculateHeatmapStats,N as getDataValues,v as getRangeExpr,E as getSQLFilterForNormalization,q as getSumOfAttributesExpr,T as mergeWhereClauses,b as quantizeFeatures,F as timeOnlyToMilliseconds,O as verifyBasicFieldValidity,U as verifyFieldType,z as verifyFilterValidity,M as verifyNumericField};
|
|
@@ -46,7 +46,7 @@ export interface HistogramBin {
|
|
|
46
46
|
minValue: number;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
export interface
|
|
49
|
+
export interface SummaryStatisticsParameters extends AbortOptions {
|
|
50
50
|
/**
|
|
51
51
|
* A subset of features for which to calculate the statistics.
|
|
52
52
|
*
|
|
@@ -162,7 +162,7 @@ export interface SummaryStatisticsResult {
|
|
|
162
162
|
variance?: number | null;
|
|
163
163
|
}
|
|
164
164
|
|
|
165
|
-
export interface
|
|
165
|
+
export interface ClassBreaksParameters extends AbortOptions {
|
|
166
166
|
/**
|
|
167
167
|
* The method for classifying the data. See the table below
|
|
168
168
|
* for a list of possible values.
|
|
@@ -295,7 +295,7 @@ export interface ClassBreak {
|
|
|
295
295
|
minValue: number;
|
|
296
296
|
}
|
|
297
297
|
|
|
298
|
-
export interface
|
|
298
|
+
export interface HistogramParameters extends AbortOptions {
|
|
299
299
|
/**
|
|
300
300
|
* The method for classifying the data. See the table below
|
|
301
301
|
* for a list of possible values.
|
|
@@ -411,7 +411,7 @@ export interface HistogramParams extends AbortOptions {
|
|
|
411
411
|
view?: MapViewOrSceneView | null;
|
|
412
412
|
}
|
|
413
413
|
|
|
414
|
-
export interface
|
|
414
|
+
export interface UniqueValuesParameters extends AbortOptions {
|
|
415
415
|
/**
|
|
416
416
|
* A subset of features for which to generate the unique values.
|
|
417
417
|
*
|
|
@@ -505,7 +505,7 @@ export interface UniqueValueCountInfo {
|
|
|
505
505
|
value?: string | number | null;
|
|
506
506
|
}
|
|
507
507
|
|
|
508
|
-
export interface
|
|
508
|
+
export interface HeatmapStatisticsParameters extends AbortOptions {
|
|
509
509
|
/** The name of the numeric field for which the statistics will be generated. */
|
|
510
510
|
field?: string | null;
|
|
511
511
|
/** The layer from which to generate statistics for the pixel intensity values and a given `field` if provided. */
|
|
@@ -527,7 +527,7 @@ export interface HeatmapStatisticsResult {
|
|
|
527
527
|
min?: number | null;
|
|
528
528
|
}
|
|
529
529
|
|
|
530
|
-
export interface
|
|
530
|
+
export interface PredominantCategoriesParameters extends AbortOptions {
|
|
531
531
|
/**
|
|
532
532
|
* An array of numeric fields from which to determine predominant categories.
|
|
533
533
|
* The fields must all be number fields and they must be competing or complementary (e.g. population totals
|
|
@@ -554,7 +554,7 @@ export interface PredominantCategoriesResult {
|
|
|
554
554
|
predominantCategoryInfos: UniqueValueCountInfo[];
|
|
555
555
|
}
|
|
556
556
|
|
|
557
|
-
export interface
|
|
557
|
+
export interface SummaryStatisticsForAgeParameters extends AbortOptions {
|
|
558
558
|
/**
|
|
559
559
|
* The end time for the age calculation. This can be a field name or a date
|
|
560
560
|
* value, such as `Date.now()`. If a `Date` is provided, then the `startTime` parameter must be a field name.
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*
|
|
12
12
|
* @since 4.4
|
|
13
13
|
*/
|
|
14
|
-
import type { UniqueValuesResult,
|
|
14
|
+
import type { UniqueValuesResult, UniqueValuesParameters } from "./types.js";
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Returns an object containing an array of unique values queried from a given field
|
|
@@ -36,4 +36,4 @@ import type { UniqueValuesResult, UniqueValuesParams } from "./types.js";
|
|
|
36
36
|
* });
|
|
37
37
|
* });
|
|
38
38
|
*/
|
|
39
|
-
export default function uniqueValues(parameters:
|
|
39
|
+
export default function uniqueValues(parameters: UniqueValuesParameters): Promise<UniqueValuesResult>;
|
|
@@ -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"../../../Graphic.js";import{pickRandom as i}from"../../../core/arrayUtils.js";import s from"../../../core/Error.js";import{throwIfAborted as r}from"../../../core/promiseUtils.js";import{property as a,subclass as n}from"../../../core/accessorSupport/decorators.js";import{isHostedAgolService as o}from"../../../layers/support/arcgisLayerUrl.js";import{isTimeOnlyField as l,isNumericField as u}from"../../../layers/support/fieldUtils.js";import{generateRenderer as c}from"../../../rest/generateRenderer.js";import m from"../../../rest/support/GenerateRendererParameters.js";import h from"../../../rest/support/PivotQuery.js";import p from"../../../rest/support/StatisticDefinition.js";import d from"../../../rest/support/UniqueValueDefinition.js";import y from"../../../rest/support/UnPivotDefinition.js";import{getArcadeForPredominantCategory as f,getSQLForPredominantCategoryName as F}from"../../statistics/support/predominanceUtils.js";import{mergeWhereClauses as S,getRangeExpr as w,getSQLFilterForNormalization as g}from"../../statistics/support/utils.js";import{WorkerClient as v}from"../../statistics/support/WorkerClient.js";import{isAnyDateField as _,isIntegerField as x,castIntegerFieldToFloat as q,fieldDelimiter as V}from"../utils.js";import E from"./InMemoryLayerAdapter.js";import{getQueryParamsForExpr as b,getDataRange as z,getAttributeBinsQuery as L,processQueryAttributeBinsResult as Q,binParamsFromGenRend as T}from"./support/histogramUtils.js";import{ensureFeaturesJSON as j,getSummaryStatsQuery as N,getSummaryStatisticsFromFeatureSet as B,getSummaryStatsQueryForFields as M,getSummaryStatsPivotQuery as $,getUVQuery as O,getUniqueValuesFromFeatureSet as C,defaultNumBins as P,updateQueryWithFeatureFilter as R,getHistogramFromFeatureSet as I,getFieldExpr as k,getDomainsForFields as A,getBins as U,getPredominantCategoriesFromUVInfos as D,getMissingFields as G}from"./support/utils.js";import{processSummaryStatisticsResult as J,createUVResult as W,getEqualIntervalBins as H,createClassBreaksDefinition as Z,resolveCBResult as K}from"../../../statistics/utils.js";import{getScaleToResolutionFactor as X}from"../../../views/2d/viewpointUtils.js";const Y=5,ee=2e4,te=4e5;let ie=class extends E{constructor(){super(...arguments),this.adapterName="feature-layer-adapter"}_isStatsSupportedOnService(){const e=this.layer;if(!e.capabilities?.query?.supportsStatistics||"multipatch"===this.geometryType&&!o(e.url)&&e.version<10.5)throw new s(`${this.adapterName}:not-supported`,"Layer does not support statistics query");return Promise.resolve()}_fetchFeaturesFromService(e,t){return this.layer.queryFeatures(e,{signal:t}).then(e=>e.features)}_fetchFeaturesJSONFromService(e,t){return this._fetchFeaturesFromService(e,t).then(j)}_summaryStatsFromGenRend(e){const t=e.normalizationType,i=e.normalizationField;return this.classBreaks({field:e.field,numClasses:Y,classificationMethod:"standard-deviation",standardDeviationInterval:.25,normalizationType:t,normalizationField:"field"===t?i:void 0,minValue:e.minValue,maxValue:e.maxValue,filter:e.filter,signal:e.signal}).then(t=>{let i,s,r;if(t.classBreakInfos?.some(e=>(e.hasAvg&&(i=e),!!i)),i){const e=i.maxValue-i.minValue;s=i.minValue+e/2,r=4*e}const a={min:t.minValue,max:t.maxValue,avg:s,stddev:r};return J(a,e.outStatisticTypes)})}async _summaryStatsFromServiceQuery(e,t){await this._isStatsSupportedOnService(),"percent-of-total"===e.normalizationType&&(e.normalizationTotal=await this._getNormalizationTotal(e.field,e.normalizationType,e.filter));const i=_(t)||l(t),s="capabilities"in this.layer?this.layer.capabilities:null,r=N(this,e,t,s?.query?.supportsPercentileStatistics??!1),a=await this.layer.queryFeatures(r,{signal:e.signal}),n=B(a,i);return J(n,e.outStatisticTypes)}async _summaryStatsForFieldsBasic(e){const{outStatisticTypes:t,fields:i}=e,s=50,r=[];for(let o=0;o<i.length;o+=s){const t=i.slice(o,o+s),a=M(this,e,t);r.push(this.layer.queryFeatures(a,{signal:e.signal}))}const a=(await Promise.all(r)).flatMap(e=>e.features).map(e=>e.attributes).reduce((e,t)=>Object.assign(e,t),{}),n={};for(const o in a){const e=o.match(/^(\w+)_value_/);if(null==a[o]||!e)continue;switch(e[1]){case"min":n.min=null==n.min?a[o]:Math.min(n.min,a[o]);break;case"max":n.max=null==n.max?a[o]:Math.max(n.max,a[o]);break;case"sum":n.sum=(n.sum||0)+a[o];break;case"count":n.count=(n.count||0)+a[o]}}return J(n,t)}async _summaryStatsForFieldsAdvanced(e,t){const{outStatisticTypes:i,fields:s}=e,r=i?.exclude?.includes("variance")||i?.include&&!i.include.includes("variance"),a=i?.exclude?.includes("stddev")||i?.include&&!i.include.includes("stddev");if(null==t.sum||!t.count||r&&a)return t;t.avg=t.sum/t.count;const n=50,o=[];for(let u=0;u<s.length;u+=n){const i=s.slice(u,u+n),r=M(this,e,i);r.outStatistics=[];for(const e of i){const i=`sumOfSquares_${e}`,s=`(power(${x(this.layer,e)?q(e):e} - ${t.avg}, 2))`,a=new p({statisticType:"sum",onStatisticField:s,outStatisticFieldName:i});r.outStatistics.push(a)}o.push(this.layer.queryFeatures(r,{signal:e.signal}))}const l=(await Promise.all(o)).reduce((e,t)=>e+Object.values(t.features[0].attributes).reduce((e,t)=>e+t,0),0);return t.variance=l/(t.count-1),t.stddev=Math.sqrt(t.variance),J(t,i)}async _summaryStatsForFields(e){const t=await this._summaryStatsForFieldsBasic(e);return this._summaryStatsForFieldsAdvanced(e,t)}async _summaryStatsUsingQueryPivot(e){await this._isStatsSupportedOnService();const t="capabilities"in this.layer?this.layer.capabilities:null,i=$(this,e,t?.query?.supportsPercentileStatistics??!1),s=await this.layer.queryPivot(i,{signal:e.signal}),r=B(s,!1);return J(r,e.outStatisticTypes)}_uvFromGenRenderer(e,t){const i=e.field??void 0,s=new d({attributeField:i}),r=new m({classificationDefinition:s});return this.generateRenderer(r,e.signal).then(e=>{const t={},s=this.getField(i);return e.uniqueValues.forEach(e=>{let i=e.value;null!=i&&""!==i&&("string"!=typeof i||""!==i.trim()&&"<null>"!==i.toLowerCase())||(i=null),null==t[i]?t[i]={count:e.count,data:u(s)&&i?Number(i):i}:t[i].count=t[i].count+e.count}),{count:t}}).then(i=>W(i,[t],e.returnAllCodedValues))}async _uvFromServiceQuery(e,t){return this._isStatsSupportedOnService().then(()=>this.layer.queryFeatures(O(this,e),{signal:e.signal})).then(t=>C(t,{layer:this,field:e.field,field2:e.field2,field3:e.field3,fieldDelimiter:V,view:e.view,signal:e.signal})).then(i=>W(i,t,e.returnAllCodedValues,V))}_getNormalizationTotal(e,t,i,s){return e&&"percent-of-total"===t?this.summaryStatistics({field:e,outStatisticTypes:{include:["sum"]},filter:i,signal:s}).then(e=>e.sum):Promise.resolve(null)}_histogramForExpr(e){return this._getNormalizationTotal(e.field,e.normalizationType,e.filter,e.signal).then(t=>{const i=b(e,this,t);return z(i,this,e.minValue,e.maxValue).then(s=>{const r=s.min,a=s.max;if(null==r||null==a)return{bins:[],minValue:r,maxValue:a,normalizationTotal:t};const n=e.numBins||P,o=H(r,a,n),l=se(i.sqlExpression,o,null!=e.minValue&&null!=e.maxValue),u=new p({statisticType:"count",outStatisticFieldName:"countOFExpr",onStatisticField:"1"}),c=this.layer.createQuery();return c.where=S(c.where,i.sqlWhere),c.sqlFormat="standard",c.outStatistics=[u],c.groupByFieldsForStatistics=[l],c.orderByFields=[l],R(c,e.filter),this._isStatsSupportedOnService().then(()=>this.layer.queryFeatures(c,{signal:i.signal})).then(e=>I(e,r,a,n,t))})})}async _histogramForFields(e){const{min:t,max:i}=await z({fields:e.fields,sqlWhere:e.sqlWhere,filter:e.filter,signal:e.signal},this,e.minValue,e.maxValue);if(null==t||null==i)return{bins:[],minValue:t,maxValue:i};const s="newField",r=e.numBins||P,a=se(s,H(t,i,r),null!=e.minValue&&null!=e.maxValue),n=new p({statisticType:"count",outStatisticFieldName:"countOFExpr",onStatisticField:s}),o=new h,{where:l,timeExtent:u}=this.createQuery();return o.where=S(l,e.sqlWhere),o.outPivots=[new y({sourceFields:e.fields,valueFieldName:s})],o.outStatistics=[n],o.groupByFieldsForStatistics=[a],o.orderByFields=[a],o.timeExtent=u,R(o,e.filter),this._isStatsSupportedOnService().then(()=>this.layer.queryPivot(o,{signal:e.signal})).then(e=>I(e,t,i,r))}async _histogramFromQueryAttributeBins(e){const{field:t,normalizationType:i,filter:s,signal:r}=e,a=await this._getNormalizationTotal(t,i,s,r),{query:n,min:o,max:l}=await L(e,this,a,this.createQuery());if(!n)return{bins:[],minValue:o,maxValue:l,normalizationTotal:a};const u=await this.layer.queryAttributeBins(n,{signal:r});return Q(u,t?this.getField(t):null,{minValue:o,maxValue:l,normalizationTotal:a})}_classBreaksFromGenRend(e){const{field:t,normalizationType:i,normalizationField:s,normalizationTotal:r,signal:a}=e,n=g({field:t,normalizationType:i,normalizationField:s}),o=k({field:t,normalizationType:i,normalizationField:s,normalizationTotal:r,layer:this}),l=w(o,e.minValue,e.maxValue),u=Z({field:t,normalizationType:i,normalizationField:s,classificationMethod:e.classificationMethod,standardDeviationInterval:e.standardDeviationInterval,breakCount:e.numClasses||Y}),c=new m({classificationDefinition:u});return c.where=S(n,l),this.generateRenderer(c,a).then(t=>K(t,e.classificationMethod))}async summaryStatistics(e){const{field:t,fields:i,normalizationType:a,valueExpression:n,sqlExpression:o,view:u,features:c,useFeaturesInView:m}=e,h=t?this.getField(t):null,p=_(h)||l(h),d=n&&!(o&&this.supportsSQLExpression),y=this._hasLocalSource||c||m,f="3d"===u?.type;if(i?.length){const t={...e,fields:i};if(!this.layer.capabilities?.operations?.supportsQueryPivot)return await this._summaryStatsForFields(t);try{return await this._summaryStatsUsingQueryPivot(t)}catch{return await this._summaryStatsForFields(t)}}if(y||d)return d||c||m||f||this._hasLocalSource&&!this.layer.capabilities.query.supportsStatistics?this._summaryStatsFromMemory(e,h):this._summaryStatsFromClientQuery(e,h);if(!this.supportsSQLExpression&&(p||o||"natural-log"===a||"square-root"===a))throw new s(`${this.adapterName}:not-supported`,"Layer does not support standardized SQL expression for queries");return(a&&!this.supportsSQLExpression?this._summaryStatsFromGenRend(e):this._summaryStatsFromServiceQuery(e,h)).catch(()=>(r(e.signal),this._summaryStatsFromMemory(e,h)))}async uniqueValues(e){const{valueExpression:t,sqlExpression:i,features:s,useFeaturesInView:a,signal:n}=e,o=t&&!(i&&this.supportsSQLExpression),l=this._hasLocalSource||s||a||o,u=e.view,c="3d"===u?.type,m=await A(e,this);return l?o||s||a||c||this._hasLocalSource&&!this.layer.capabilities.query.supportsStatistics?this._uvFromMemory(e,m):this._uvFromClientQuery(e,m):this._uvFromServiceQuery(e,m).catch(t=>(r(n),!e.field||e.field2||e.field3||e.filter?t:this._uvFromGenRenderer(e,m[0]))).catch(()=>(r(n),c?this._uvFromMemory(e,m):this._uvFromClientQuery(e,m)))}async histogram(e){const{field:t,normalizationType:i,normalizationField:a,classificationMethod:n,view:o,filter:u,signal:c}=e,m=t?this.getField(t):null,h=_(m)||l(m),p=e.valueExpression||e.sqlExpression,d=e.valueExpression&&!(e.sqlExpression&&this.supportsSQLExpression),y=this._hasLocalSource||e.features||e.useFeaturesInView||d,f=this.supportsSQLExpression,F=!n||"equal-interval"===n,S=e.minValue,g=e.maxValue,v=null!=S&&null!=g,x=e.numBins||P;if(e.fields?.length){if(!f)throw new s(`${this.adapterName}:not-supported`,"Layer does not support standardized SQL expression for queries");if(!this.layer.capabilities?.operations?.supportsQueryPivot)throw new s(`${this.adapterName}:not-supported`,"Layer does not support pivot queries");return this._histogramForFields(e)}if(y)return this._histogramFromMemory(e);if(this.layer.capabilities?.operations?.supportsQueryBins&&e.useQueryAttributeBins)try{return await this._histogramFromQueryAttributeBins(e)}catch{return r(c),this._histogramFromQueryAttributeBinsFromMemory(e)}if((p||f)&&F){if(!f&&(p||"natural-log"===i||"square-root"===i))throw new s(`${this.adapterName}:not-supported`,"Layer does not support standardized SQL expression for queries");return this._histogramForExpr(e)}if(h&&F)throw new s(`${this.adapterName}:not-supported`,"Normalization and date field are not allowed when layer does not support standardized SQL expression for queries");return i||!F?T(e,this).then(r=>{if(!v)return U(this,r,t,x,o,u,c);if(S>r.max||g<r.min)throw new s(`${this.adapterName}:insufficient-data`,"Range defined by 'minValue' and 'maxValue' does not intersect available data range of the field");if(F)return U(this,{min:S,max:g,sqlExpr:r.sqlExpr,excludeZerosExpr:r.excludeZerosExpr},t,x,o,u,c);{const s={field:t,normalizationType:i,normalizationField:a,normalizationTotal:r.normTotal,layer:this},n=k(s),l=w(n,S,g);return T(e,this,l).then(e=>U(this,e,t,x,o,u,c))}}):this._histogramForField(e)}async classBreaks(e){const t=!1!==e.analyzeData,i=this._hasLocalSource||e.features||e.useFeaturesInView||e.valueExpression||e.filter;if(t&&i)return this._classBreaksFromMemory(e);return(t?this._classBreaksFromGenRend(e):this._classBreaksFromInterpolation(e)).catch(()=>(r(e.signal),this._classBreaksFromMemory(e)))}async queryFeatureCount(e){if(this._hasLocalSource)throw new s(`${this.adapterName}:not-supported`,"Layer does not support count query");const t=this.layer,i=t.createQuery();return i.where=S(i.where,e.whereClause),R(i,e.filter),t.queryFeatureCount(i,{signal:e.signal})}async generateRenderer(e,t){const i=this.layer;if(this._hasLocalSource||i.version<10.1)throw new s(`${this.adapterName}:not-supported`,"Layer does not support generateRenderer operation (requires ArcGIS Server version 10.1+)");const r=i.createQuery();return e.where=S(e.where,r.where),c(i.parsedUrl?.path??"",{source:i.dynamicDataSource??void 0,gdbVersion:i.gdbVersion??void 0},e,{signal:t})}async predominantCategories(e){if(!this._hasLocalSource&&!this.supportsSQLExpression)throw new s(`${this.adapterName}:not-supported`,"Layer does not support advanced SQL expressions and standardized queries");const{fields:t,view:i,signal:r,filter:a}=e,n=f(t),o=F(t),l=i&&this._hasLocalSource?await this._uvFromMemory({valueExpression:n,view:i,signal:r,filter:a}):await this._uvFromServiceQuery({sqlExpression:o.expression,valueExpression:n,signal:r,filter:a});return D(l.uniqueValueInfos,t)}async getSampleFeatures(e,s){const{view:a,requiredFields:n,returnGeometry:o,filter:l,signal:u}=e,c=e.sampleSize;if(null==c||0===c)return[];const m=this.layer.createQuery(),h=1,p="json"===s;m.outSpatialReference=a?.spatialReference,m.returnGeometry=!!o,m.outFields=n,R(m,l);let d=[],y=!1;if(a)try{const r=await a.whenLayerView(this.layer);if(y=!G(this,n,r).length,y){if(c>=1&&!e.filter&&"getSampleFeatures"in r){await this._waitForLayerViewUpdate(r);const e=await r.getSampleFeatures({minFeatureCount:c,sampleSize:c});if(null!=e)return p?e:e.map(e=>t.fromJSON(e))}if(d=await this._fetchFeaturesFromMemory(r,m,u,s),d.length>=c&&c>0)return i(d,c,h)}}catch(f){r(u)}try{if(this._hasLocalSource)return y?d:p?await this._fetchFeaturesJSONFromService(m,u):await this._fetchFeaturesFromService(m,u);const t=await this.queryFeatureCount({view:a,filter:l,signal:u}),s=this.layer.capabilities.query.maxRecordCount;let r=-1===c?t:c;if(r=s&&r>s?s:r,t<=d.length||d.length>=s)return d;if(m.maxAllowableOffset=e.resolution||(a?a.extent.width/a.width/a.scale:X(this.layer.spatialReference))*te,t<=r)return p?await this._fetchFeaturesJSONFromService(m,u):await this._fetchFeaturesFromService(m,u);if(t<=ee){const e=this.layer.createQuery();R(e,l);const t=await this.layer.queryObjectIds();return m.objectIds=i(t,r,h),p?await this._fetchFeaturesJSONFromService(m,u):await this._fetchFeaturesFromService(m,u)}return this.layer.capabilities?.query?.supportsPagination&&(m.num=Math.min(r,ee)),p?await this._fetchFeaturesJSONFromService(m,u):await this._fetchFeaturesFromService(m,u)}catch(f){return r(u),d}}load(e){const t=this.layer.load(e).then(async t=>{this.geometryType=t.geometryType,this.objectIdField=t.objectIdField,this.supportsSQLExpression=t.capabilities?.query?.supportsSqlExpression,this._hasLocalSource="parquet"===t.type||!t.url&&!!t.source,this.hasQueryEngine=this._hasLocalSource,this.minScale=t.minScale,this.maxScale=t.maxScale,this.fullExtent=t.fullExtent,this.workerClient=v.getInstance(),await this.workerClient.open(e.signal)});return this.addResolvingPromise(t),Promise.resolve(this)}};function se(e,t,i){const s=[],r=t.length;return t.forEach((t,a)=>{const[n,o]=t;let l=null;l=0!==a||i?a!==r-1||i?S(`${e} >= ${n}`,`${e} ${a===r-1?" <= ":" < "} ${o}`):`${e} >= ${n}`:`${e} < ${o}`,s.push("WHEN ("+l+") THEN "+(a+1))}),["CASE",s.join(" "),"ELSE 0","END"].join(" ")}e([a({readOnly:!0})],ie.prototype,"adapterName",void 0),e([a({constructOnly:!0})],ie.prototype,"layer",void 0),ie=e([n("esri.smartMapping.support.adapters.FeatureLayerAdapter")],ie);export{ie as default};
|
|
5
|
+
import{__decorate as e}from"tslib";import t from"../../../Graphic.js";import{pickRandom as i}from"../../../core/arrayUtils.js";import s from"../../../core/Error.js";import{throwIfAborted as r}from"../../../core/promiseUtils.js";import{property as a,subclass as n}from"../../../core/accessorSupport/decorators.js";import{isHostedAgolService as o}from"../../../layers/support/arcgisLayerUrl.js";import{isTimeOnlyField as l,isNumericField as u}from"../../../layers/support/fieldUtils.js";import{generateRenderer as c}from"../../../rest/generateRenderer.js";import m from"../../../rest/support/GenerateRendererParameters.js";import h from"../../../rest/support/PivotQuery.js";import p from"../../../rest/support/StatisticDefinition.js";import d from"../../../rest/support/UniqueValueDefinition.js";import y from"../../../rest/support/UnPivotDefinition.js";import{getArcadeForPredominantCategory as f,getSQLForPredominantCategoryName as F}from"../../statistics/support/predominanceUtils.js";import{mergeWhereClauses as S,getRangeExpr as w,getSQLFilterForNormalization as g}from"../../statistics/support/utils.js";import{WorkerClient as v}from"../../statistics/support/WorkerClient.js";import{isAnyDateField as _,isIntegerField as x,castIntegerFieldToFloat as q,fieldDelimiter as V}from"../utils.js";import E from"./InMemoryLayerAdapter.js";import{getQueryParamsForExpr as b,getDataRange as z,getAttributeBinsQuery as L,processQueryAttributeBinsResult as Q,binParamsFromGenRend as T}from"./support/histogramUtils.js";import{ensureFeaturesJSON as j,getSummaryStatsQuery as N,getSummaryStatisticsFromFeatureSet as B,getSummaryStatsQueryForFields as M,getSummaryStatsPivotQuery as $,getUVQuery as O,getUniqueValuesFromFeatureSet as C,defaultNumBins as P,updateQueryWithFeatureFilter as R,getHistogramFromFeatureSet as I,getFieldExpr as A,getDomainsForFields as k,getBins as U,getPredominantCategoriesFromUVInfos as D,getMissingFields as G}from"./support/utils.js";import{processSummaryStatisticsResult as J,createUVResult as W,getEqualIntervalBins as H,createClassBreaksDefinition as Z,resolveCBResult as K}from"../../../statistics/utils.js";import{getScaleToResolutionFactor as X}from"../../../views/2d/viewpointUtils.js";const Y=5,ee=2e4,te=4e5;let ie=class extends E{constructor(){super(...arguments),this.adapterName="feature-layer-adapter"}_isStatsSupportedOnService(){const e=this.layer;if(!e.capabilities?.query?.supportsStatistics||"multipatch"===this.geometryType&&!o(e.url)&&e.version<10.5)throw new s(`${this.adapterName}:not-supported`,"Layer does not support statistics query");return Promise.resolve()}_fetchFeaturesFromService(e,t){return this.layer.queryFeatures(e,{signal:t}).then(e=>e.features)}_fetchFeaturesJSONFromService(e,t){return this._fetchFeaturesFromService(e,t).then(j)}_summaryStatsFromGenRend(e){const t=e.normalizationType,i=e.normalizationField;return this.classBreaks({field:e.field,numClasses:Y,classificationMethod:"standard-deviation",standardDeviationInterval:.25,normalizationType:t,normalizationField:"field"===t?i:void 0,minValue:e.minValue,maxValue:e.maxValue,filter:e.filter,signal:e.signal}).then(t=>{let i,s,r;if(t.classBreakInfos?.some(e=>(e.hasAvg&&(i=e),!!i)),i){const e=i.maxValue-i.minValue;s=i.minValue+e/2,r=4*e}const a={min:t.minValue,max:t.maxValue,avg:s,stddev:r};return J(a,e.outStatisticTypes)})}async _summaryStatsFromServiceQuery(e,t){await this._isStatsSupportedOnService(),"percent-of-total"===e.normalizationType&&(e.normalizationTotal=await this._getNormalizationTotal(e.field,e.normalizationType,e.filter));const i=_(t)||l(t),s="capabilities"in this.layer?this.layer.capabilities:null,r=N(this,e,t,s?.query?.supportsPercentileStatistics??!1),a=await this.layer.queryFeatures(r,{signal:e.signal}),n=B(a,i);return J(n,e.outStatisticTypes)}async _summaryStatsForFieldsBasic(e){const{outStatisticTypes:t,fields:i}=e,s=50,r=[];for(let o=0;o<i.length;o+=s){const t=i.slice(o,o+s),a=M(this,e,t);r.push(this.layer.queryFeatures(a,{signal:e.signal}))}const a=(await Promise.all(r)).flatMap(e=>e.features).map(e=>e.attributes).reduce((e,t)=>Object.assign(e,t),{}),n={};for(const o in a){const e=o.match(/^(\w+)_value_/);if(null==a[o]||!e)continue;switch(e[1]){case"min":n.min=null==n.min?a[o]:Math.min(n.min,a[o]);break;case"max":n.max=null==n.max?a[o]:Math.max(n.max,a[o]);break;case"sum":n.sum=(n.sum||0)+a[o];break;case"count":n.count=(n.count||0)+a[o]}}return J(n,t)}async _summaryStatsForFieldsAdvanced(e,t){const{outStatisticTypes:i,fields:s}=e,r=i?.exclude?.includes("variance")||i?.include&&!i.include.includes("variance"),a=i?.exclude?.includes("stddev")||i?.include&&!i.include.includes("stddev");if(null==t.sum||!t.count||r&&a)return t;t.avg=t.sum/t.count;const n=50,o=[];for(let u=0;u<s.length;u+=n){const i=s.slice(u,u+n),r=M(this,e,i);r.outStatistics=[];for(const e of i){const i=`sumOfSquares_${e}`,s=`(power(${x(this.layer,e)?q(e):e} - ${t.avg}, 2))`,a=new p({statisticType:"sum",onStatisticField:s,outStatisticFieldName:i});r.outStatistics.push(a)}o.push(this.layer.queryFeatures(r,{signal:e.signal}))}const l=(await Promise.all(o)).reduce((e,t)=>e+Object.values(t.features[0].attributes).reduce((e,t)=>e+t,0),0);return t.variance=l/(t.count-1),t.stddev=Math.sqrt(t.variance),J(t,i)}async _summaryStatsForFields(e){const t=await this._summaryStatsForFieldsBasic(e);return this._summaryStatsForFieldsAdvanced(e,t)}async _summaryStatsUsingQueryPivot(e){await this._isStatsSupportedOnService();const t="capabilities"in this.layer?this.layer.capabilities:null,i=$(this,e,t?.query?.supportsPercentileStatistics??!1),s=await this.layer.queryPivot(i,{signal:e.signal}),r=B(s,!1);return J(r,e.outStatisticTypes)}_uvFromGenRenderer(e,t){const i=e.field??void 0,s=new d({attributeField:i}),r=new m({classificationDefinition:s});return this.generateRenderer(r,e.signal).then(e=>{const t={},s=this.getField(i);return e.uniqueValues.forEach(e=>{let i=e.value;null!=i&&""!==i&&("string"!=typeof i||""!==i.trim()&&"<null>"!==i.toLowerCase())||(i=null),null==t[i]?t[i]={count:e.count,data:u(s)&&i?Number(i):i}:t[i].count=t[i].count+e.count}),{count:t}}).then(i=>W(i,[t],e.returnAllCodedValues))}async _uvFromServiceQuery(e,t){return this._isStatsSupportedOnService().then(()=>this.layer.queryFeatures(O(this,e),{signal:e.signal})).then(t=>C(t,{layer:this,field:e.field,field2:e.field2,field3:e.field3,fieldDelimiter:V,view:e.view,signal:e.signal})).then(i=>W(i,t,e.returnAllCodedValues,V))}_getNormalizationTotal(e,t,i,s){return e&&"percent-of-total"===t?this.summaryStatistics({field:e,outStatisticTypes:{include:["sum"]},filter:i,signal:s}).then(e=>e.sum):Promise.resolve(null)}_histogramForExpr(e){return this._getNormalizationTotal(e.field,e.normalizationType,e.filter,e.signal).then(t=>{const i=b(e,this,t);return z(i,this,e.minValue,e.maxValue).then(s=>{const r=s.min,a=s.max;if(null==r||null==a)return{bins:[],minValue:r,maxValue:a,normalizationTotal:t};const n=e.numBins||P,o=H(r,a,n),l=se(i.sqlExpression,o,null!=e.minValue&&null!=e.maxValue),u=new p({statisticType:"count",outStatisticFieldName:"countOFExpr",onStatisticField:"1"}),c=this.layer.createQuery();return c.where=S(c.where,i.sqlWhere),c.sqlFormat="standard",c.outStatistics=[u],c.groupByFieldsForStatistics=[l],c.orderByFields=[l],R(c,e.filter),this._isStatsSupportedOnService().then(()=>this.layer.queryFeatures(c,{signal:i.signal})).then(e=>I(e,r,a,n,t))})})}async _histogramForFields(e){const{min:t,max:i}=await z({fields:e.fields,sqlWhere:e.sqlWhere,filter:e.filter,signal:e.signal},this,e.minValue,e.maxValue);if(null==t||null==i)return{bins:[],minValue:t,maxValue:i};const s="newField",r=e.numBins||P,a=se(s,H(t,i,r),null!=e.minValue&&null!=e.maxValue),n=new p({statisticType:"count",outStatisticFieldName:"countOFExpr",onStatisticField:s}),o=new h,{where:l,timeExtent:u}=this.createQuery();return o.where=S(l,e.sqlWhere),o.outPivots=[new y({sourceFields:e.fields,valueFieldName:s})],o.outStatistics=[n],o.groupByFieldsForStatistics=[a],o.orderByFields=[a],o.timeExtent=u,R(o,e.filter),this._isStatsSupportedOnService().then(()=>this.layer.queryPivot(o,{signal:e.signal})).then(e=>I(e,t,i,r))}async _histogramFromQueryAttributeBins(e){const{field:t,normalizationType:i,filter:s,signal:r}=e,a=await this._getNormalizationTotal(t,i,s,r),{query:n,min:o,max:l}=await L(e,this,a,this.createQuery());if(!n)return{bins:[],minValue:o,maxValue:l,normalizationTotal:a};const u=await this.layer.queryAttributeBins(n,{signal:r});return Q(u,t?this.getField(t):null,{minValue:o,maxValue:l,normalizationTotal:a})}_classBreaksFromGenRend(e){const{field:t,normalizationType:i,normalizationField:s,normalizationTotal:r,signal:a}=e,n=g({field:t,normalizationType:i,normalizationField:s}),o=A({field:t,normalizationType:i,normalizationField:s,normalizationTotal:r,layer:this}),l=w(o,e.minValue,e.maxValue),u=Z({field:t,normalizationType:i,normalizationField:s,classificationMethod:e.classificationMethod,standardDeviationInterval:e.standardDeviationInterval,breakCount:e.numClasses||Y}),c=new m({classificationDefinition:u});return c.where=S(n,l),this.generateRenderer(c,a).then(t=>K(t,e.classificationMethod))}async summaryStatistics(e){const{field:t,fields:i,normalizationType:a,valueExpression:n,sqlExpression:o,view:u,features:c,useFeaturesInView:m}=e,h=t?this.getField(t):null,p=_(h)||l(h),d=n&&!(o&&this.supportsSQLExpression),y=this._hasLocalSource||c||m,f="3d"===u?.type;if(i?.length){const t={...e,fields:i};if(!this.layer.capabilities?.operations?.supportsQueryPivot)return await this._summaryStatsForFields(t);try{return await this._summaryStatsUsingQueryPivot(t)}catch{return await this._summaryStatsForFields(t)}}if(y||d)return d||c||m||f||this._hasLocalSource&&!this.layer.capabilities.query.supportsStatistics?this._summaryStatsFromMemory(e,h):this._summaryStatsFromClientQuery(e,h);if(!this.supportsSQLExpression&&(p||o||"natural-log"===a||"square-root"===a))throw new s(`${this.adapterName}:not-supported`,"Layer does not support standardized SQL expression for queries");return(a&&!this.supportsSQLExpression?this._summaryStatsFromGenRend(e):this._summaryStatsFromServiceQuery(e,h)).catch(()=>(r(e.signal),this._summaryStatsFromMemory(e,h)))}async uniqueValues(e){const{valueExpression:t,sqlExpression:i,features:s,useFeaturesInView:a,signal:n}=e,o=t&&!(i&&this.supportsSQLExpression),l=this._hasLocalSource||s||a||o,u=e.view,c="3d"===u?.type,m=await k(e,this);return l?o||s||a||c||this._hasLocalSource&&!this.layer.capabilities.query.supportsStatistics?this._uvFromMemory(e,m):this._uvFromClientQuery(e,m):this._uvFromServiceQuery(e,m).catch(t=>(r(n),!e.field||e.field2||e.field3||e.filter?t:this._uvFromGenRenderer(e,m[0]))).catch(()=>(r(n),c?this._uvFromMemory(e,m):this._uvFromClientQuery(e,m)))}async histogram(e){const{field:t,normalizationType:i,normalizationField:a,classificationMethod:n,view:o,filter:u,signal:c}=e,m=t?this.getField(t):null,h=_(m)||l(m),p=e.valueExpression||e.sqlExpression,d=e.valueExpression&&!(e.sqlExpression&&this.supportsSQLExpression),y=this._hasLocalSource||e.features||e.useFeaturesInView||d,f=this.supportsSQLExpression,F=!n||"equal-interval"===n,S=e.minValue,g=e.maxValue,v=null!=S&&null!=g,x=e.numBins||P;if(e.fields?.length){if(!f)throw new s(`${this.adapterName}:not-supported`,"Layer does not support standardized SQL expression for queries");if(!this.layer.capabilities?.operations?.supportsQueryPivot)throw new s(`${this.adapterName}:not-supported`,"Layer does not support pivot queries");return this._histogramForFields(e)}if(this.layer.capabilities?.operations?.supportsQueryBins&&e.useQueryAttributeBins){if(y)return this._histogramFromQueryAttributeBinsFromMemory(e);try{return await this._histogramFromQueryAttributeBins(e)}catch{return r(c),this._histogramFromQueryAttributeBinsFromMemory(e)}}if(y)return this._histogramFromMemory(e);if((p||f)&&F){if(!f&&(p||"natural-log"===i||"square-root"===i))throw new s(`${this.adapterName}:not-supported`,"Layer does not support standardized SQL expression for queries");return this._histogramForExpr(e)}if(h&&F)throw new s(`${this.adapterName}:not-supported`,"Normalization and date field are not allowed when layer does not support standardized SQL expression for queries");return i||!F?T(e,this).then(r=>{if(!v)return U(this,r,t,x,o,u,c);if(S>r.max||g<r.min)throw new s(`${this.adapterName}:insufficient-data`,"Range defined by 'minValue' and 'maxValue' does not intersect available data range of the field");if(F)return U(this,{min:S,max:g,sqlExpr:r.sqlExpr,excludeZerosExpr:r.excludeZerosExpr},t,x,o,u,c);{const s={field:t,normalizationType:i,normalizationField:a,normalizationTotal:r.normTotal,layer:this},n=A(s),l=w(n,S,g);return T(e,this,l).then(e=>U(this,e,t,x,o,u,c))}}):this._histogramForField(e)}async classBreaks(e){const t=!1!==e.analyzeData,i=this._hasLocalSource||e.features||e.useFeaturesInView||e.valueExpression||e.filter;if(t&&i)return this._classBreaksFromMemory(e);return(t?this._classBreaksFromGenRend(e):this._classBreaksFromInterpolation(e)).catch(()=>(r(e.signal),this._classBreaksFromMemory(e)))}async queryFeatureCount(e){if(this._hasLocalSource)throw new s(`${this.adapterName}:not-supported`,"Layer does not support count query");const t=this.layer,i=t.createQuery();return i.where=S(i.where,e.whereClause),R(i,e.filter),t.queryFeatureCount(i,{signal:e.signal})}async generateRenderer(e,t){const i=this.layer;if(this._hasLocalSource||i.version<10.1)throw new s(`${this.adapterName}:not-supported`,"Layer does not support generateRenderer operation (requires ArcGIS Server version 10.1+)");const r=i.createQuery();return e.where=S(e.where,r.where),c(i.parsedUrl?.path??"",{source:i.dynamicDataSource??void 0,gdbVersion:i.gdbVersion??void 0},e,{signal:t})}async predominantCategories(e){if(!this._hasLocalSource&&!this.supportsSQLExpression)throw new s(`${this.adapterName}:not-supported`,"Layer does not support advanced SQL expressions and standardized queries");const{fields:t,view:i,signal:r,filter:a}=e,n=f(t),o=F(t),l=i&&this._hasLocalSource?await this._uvFromMemory({valueExpression:n,view:i,signal:r,filter:a}):await this._uvFromServiceQuery({sqlExpression:o.expression,valueExpression:n,signal:r,filter:a});return D(l.uniqueValueInfos,t)}async getSampleFeatures(e,s){const{view:a,requiredFields:n,returnGeometry:o,filter:l,signal:u}=e,c=e.sampleSize;if(null==c||0===c)return[];const m=this.layer.createQuery(),h=1,p="json"===s;m.outSpatialReference=a?.spatialReference,m.returnGeometry=!!o,m.outFields=n,R(m,l);let d=[],y=!1;if(a)try{const r=await a.whenLayerView(this.layer);if(y=!G(this,n,r).length,y){if(c>=1&&!e.filter&&"getSampleFeatures"in r){await this._waitForLayerViewUpdate(r);const e=await r.getSampleFeatures({minFeatureCount:c,sampleSize:c});if(null!=e)return p?e:e.map(e=>t.fromJSON(e))}if(d=await this._fetchFeaturesFromMemory(r,m,u,s),d.length>=c&&c>0)return i(d,c,h)}}catch(f){r(u)}try{if(this._hasLocalSource)return y?d:p?await this._fetchFeaturesJSONFromService(m,u):await this._fetchFeaturesFromService(m,u);const t=await this.queryFeatureCount({view:a,filter:l,signal:u}),s=this.layer.capabilities.query.maxRecordCount;let r=-1===c?t:c;if(r=s&&r>s?s:r,t<=d.length||d.length>=s)return d;if(m.maxAllowableOffset=e.resolution||(a?a.extent.width/a.width/a.scale:X(this.layer.spatialReference))*te,t<=r)return p?await this._fetchFeaturesJSONFromService(m,u):await this._fetchFeaturesFromService(m,u);if(t<=ee){const e=this.layer.createQuery();R(e,l);const t=await this.layer.queryObjectIds();return m.objectIds=i(t,r,h),p?await this._fetchFeaturesJSONFromService(m,u):await this._fetchFeaturesFromService(m,u)}return this.layer.capabilities?.query?.supportsPagination&&(m.num=Math.min(r,ee)),p?await this._fetchFeaturesJSONFromService(m,u):await this._fetchFeaturesFromService(m,u)}catch(f){return r(u),d}}load(e){const t=this.layer.load(e).then(async t=>{this.geometryType=t.geometryType,this.objectIdField=t.objectIdField,this.supportsSQLExpression=t.capabilities?.query?.supportsSqlExpression,this._hasLocalSource="parquet"===t.type||!t.url&&!!t.source,this.hasQueryEngine=this._hasLocalSource,this.minScale=t.minScale,this.maxScale=t.maxScale,this.fullExtent=t.fullExtent,this.workerClient=v.getInstance(),await this.workerClient.open(e.signal)});return this.addResolvingPromise(t),Promise.resolve(this)}};function se(e,t,i){const s=[],r=t.length;return t.forEach((t,a)=>{const[n,o]=t;let l=null;l=0!==a||i?a!==r-1||i?S(`${e} >= ${n}`,`${e} ${a===r-1?" <= ":" < "} ${o}`):`${e} >= ${n}`:`${e} < ${o}`,s.push("WHEN ("+l+") THEN "+(a+1))}),["CASE",s.join(" "),"ELSE 0","END"].join(" ")}e([a({readOnly:!0})],ie.prototype,"adapterName",void 0),e([a({constructOnly:!0})],ie.prototype,"layer",void 0),ie=e([n("esri.smartMapping.support.adapters.FeatureLayerAdapter")],ie);export{ie as default};
|
|
@@ -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{pickRandom as t}from"../../../core/arrayUtils.js";import r from"../../../core/Error.js";import a from"../../../core/Logger.js";import{assertIsSome as i}from"../../../core/maybe.js";import{timeout as s,throwIfAborted as o}from"../../../core/promiseUtils.js";import{whenOnce as n}from"../../../core/reactiveUtils.js";import{property as l,subclass as u}from"../../../core/accessorSupport/decorators.js";import{toQuantizationTransform as m}from"../../../geometry/support/quantizationUtils.js";import{kebabDict as p}from"../../../layers/support/fieldType.js";import{isTimeOnlyField as y}from"../../../layers/support/fieldUtils.js";import c from"../../../rest/support/QuantizationParameters.js";import{getArcadeForPredominantCategory as f}from"../../statistics/support/predominanceUtils.js";import{summaryStatistics as d,uniqueValues as h,histogram as w,classBreaks as g,heatmapStatistics as F}from"../../statistics/support/statsWorker.js";import{mergeWhereClauses as S}from"../../statistics/support/utils.js";import{WorkerClient as v}from"../../statistics/support/WorkerClient.js";import{getFieldsList as q,isAnyDateField as V,fieldDelimiter as x}from"../utils.js";import _ from"./LayerAdapter.js";import{getHistogramAttributeDefinition as z,getAttributeBinsQuery as T,processQueryAttributeBinsResult as N}from"./support/histogramUtils.js";import{ensureFeaturesJSON as M,getSummaryStatsQuery as L,getSummaryStatisticsFromFeatureSet as C,getViewInfoParams as E,getMissingFields as j,updateQueryWithFeatureFilter as b,getUVQuery as k,getUniqueValuesFromFeatureSet as I,getBins as O,getDomainsForFields as Q,getPredominantCategoriesFromUVInfos as J}from"./support/utils.js";import{processSummaryStatisticsResult as B,createUVResult as P,resolveCBResult as U}from"../../../statistics/utils.js";import{loadArcade as A}from"../../../support/loadArcade.js";const $=5;let G=null,R=class extends _{constructor(){super(...arguments),this._hasLocalSource=!1,this.adapterName="in-memory-layer-adapter"}destroy(){this.workerClient?.destroy()}async _waitForLayerViewUpdate(e){if(!e)throw new r(`${this.adapterName}:insufficient-data`,"layerView is required to fetch the features");const t=new AbortController,i=n(()=>!e.updating,t.signal);await s(i,5e3,t).catch(e=>{throw a.getLogger(this).warn("LayerView is taking too long to update. Aborting fetch from layerView."),e})}async _fetchFeatureSetFromMemory(e,t,a){const i=this.layer;if(this._hasLocalSource&&"queryFeatures"in i)return i.queryFeatures(e);if(!t)throw new r(`${this.adapterName}:insufficient-data`,"view is required to fetch the features from layerView");const s=await t.whenLayerView(this.layer);return await this._waitForLayerViewUpdate(s),s.queryFeatures(e,{signal:a})}async _fetchFeaturesFromMemory(e,t,a,i){const s=this.layer,o="json"===i;if(this._hasLocalSource&&"queryFeatures"in s){const e=await s.queryFeatures(t);return o?M(e.features):e.features}if(await this._waitForLayerViewUpdate(e),o&&"queryFeaturesJSON"in e&&e.queryFeaturesJSON){const{features:r}=await e.queryFeaturesJSON(t,{signal:a});return r}if(!("queryFeatures"in e))throw new r(`${this.adapterName}:not-supported`,"'queryFeatures' is not supported on the layerView");const n=await e.queryFeatures(t,{signal:a});return o?M(n.features):n.features}_fetchFeaturesForStats(e,t){return q({field:e.field,field2:e.field2,field3:e.field3,normalizationField:e.normalizationField,valueExpression:e.valueExpression}).then(r=>this.getSampleFeatures({sampleSize:-1,view:e.view,returnGeometry:e.returnGeometry,filter:e.filter,requiredFields:r,signal:e.signal},t))}async _summaryStatsFromClientQuery(e,t){const{view:r,signal:a}=e,i=L(this,e,t),s=await this._fetchFeatureSetFromMemory(i,r,a),o=C(s,V(t)||y(t));return B(o,e.outStatisticTypes)}async _getNormalizationTotalFromMemory(e,t,a){const{featuresJSON:i,graphics:s,layerView:o,query:n}=t,l={include:["sum"]},u=(!i&&!s&&o&&"querySummaryStatistics"in o?await o.querySummaryStatistics(n,{field:e},{signal:a}):i?await this.workerClient.summaryStatistics({field:e,outStatisticTypes:l},i):await d({attribute:{field:e,outStatisticTypes:l},features:s??[]})).sum;if(null==u)throw new r(`${this.adapterName}:invalid`,"invalid normalizationTotal");return u}async _summaryStatsFromMemory(e,t){const{view:r,field:a,valueExpression:i,normalizationType:s,signal:o}=e,n={field:a,valueExpression:i,normalizationType:s,normalizationField:e.normalizationField,normalizationTotal:e.normalizationTotal,minValue:e.minValue,maxValue:e.maxValue,outStatisticTypes:e.outStatisticTypes},{featuresJSON:l,graphics:u,layerView:m,query:y,fieldInfos:c}=await this._processStatsFromMemoryParams({...e,layerViewFunc:"querySummaryStatistics"});return i&&r&&(l||u)&&(n.fieldType=t?.type?p.toJSON(t.type):null,n.viewInfoParams=E(r),n.timeZone=r.timeZone,n.fieldInfos=c),"percent-of-total"===s&&null==e.normalizationTotal&&(n.normalizationTotal=await this._getNormalizationTotalFromMemory(a,{featuresJSON:l,graphics:u,layerView:m,query:y},o)),!l&&!u&&m&&"querySummaryStatistics"in m?m.querySummaryStatistics(y,n,{signal:o}):l?this.workerClient.summaryStatistics(n,l):d({attribute:n,features:u})}async _getFilteredFeatures(e,t){let r=e;const a=t?.geometry;if("intersects"===t?.spatialRelationship&&a){const t=await import("../../../geometry/operators/intersectionOperator.js");r=e.filter(({geometry:e})=>!(!e||!t.execute(e,a)))}return e.length&&"declaredClass"in e[0]&&"esri.Graphic"===e[0].declaredClass?{graphics:r}:{featuresJSON:r}}async _processStatsFromMemoryParams(e){const{features:t,filter:r}=e;if(t?.length)return this._getFilteredFeatures(t,r);const{view:a,field:i,field2:s,field3:o,normalizationField:n,valueExpression:l,layerViewFunc:u,signal:m}=e;let p=e.returnGeometry;if(null==p&&l){if(!G){const{arcadeUtils:e}=await A();G=e}const e=G.hasGeometryOperations(l);e&&await G.enableGeometryOperations(),p=e}let y=null,c=null,f=null,d=null,h=null;if(a)try{const e="subtype-sublayer"===this.layer.type?this.layer.parent:this.layer;y=await a.whenLayerView(e),c=null!=u&&null!=y&&u in y&&"function"==typeof y[u]}catch{c=!1}if(c)try{await this._waitForLayerViewUpdate(y);const e=await q({field:i,field2:s,field3:o,normalizationField:n,valueExpression:l});j(this,e,y).length?c=!1:(f=this.layer.createQuery(),f.outFields=e,f.returnGeometry=!1,b(f,r)),y.suspended&&(c=!1)}catch{c=!1}return c||(d=await this._fetchFeaturesForStats({field:i,field2:s,field3:o,valueExpression:l,normalizationField:n,returnGeometry:p,filter:r,view:a,signal:m},"json"),h=(await q({valueExpression:l})).map(e=>this.getField(e)?.toJSON()).filter(Boolean)),{layerView:y,query:f,featuresJSON:d,fieldInfos:h}}async _uvFromClientQuery(e,t){const{view:r,signal:a}=e,i=k(this,e),s=await this._fetchFeatureSetFromMemory(i,r,a),o=await I(s,{layer:this,field:e.field,field2:e.field2,field3:e.field3,fieldDelimiter:x,view:e.view,signal:e.signal});return P(o,t,e.returnAllCodedValues,x)}async _uvFromMemory(e,t){const{view:r,field:a,valueExpression:i,returnAllCodedValues:s,signal:o}=e,{featuresJSON:n,graphics:l,layerView:u,query:m,fieldInfos:p}=await this._processStatsFromMemoryParams({...e,layerViewFunc:"queryUniqueValues"}),y={field:a,field2:e.field2,field3:e.field3,fieldDelimiter:x,valueExpression:i,domains:t,returnAllCodedValues:s};return i&&r&&(n||l)&&(y.viewInfoParams=E(r),y.timeZone=r.timeZone,y.fieldInfos=p),!n&&!l&&u&&"queryUniqueValues"in u?u.queryUniqueValues(m,y,{signal:o}):n?this.workerClient.uniqueValues(y,n):h({attribute:y,features:l})}_histogramForField(e){let t=null;return t=null!=e.minValue&&null!=e.maxValue?Promise.resolve({min:e.minValue,max:e.maxValue}):this.summaryStatistics({...e,outStatisticTypes:{include:["min","max","count"]}}).then(e=>{if(!e.count)throw new r(`${this.adapterName}:insufficient-data`,"Either the layer has no features or none of the features have data for the field");return{min:e.min,max:e.max}}),t.then(t=>O(this,{min:t.min,max:t.max},e.field,e.numBins??void 0,e.view,e.filter,e.signal))}async _histogramFromQueryAttributeBinsFromMemory(e){const{field:t,normalizationType:r,signal:a}=e,i=await this._processStatsFromMemoryParams({...e,layerViewFunc:"queryAttributeBins"}),{featuresJSON:s,graphics:o,layerView:n,query:l}=i,u="percent-of-total"===r?e.normalizationTotal??await this._getNormalizationTotalFromMemory(t,i,a):void 0;if(!n||!("queryAttributeBins"in n)||s||o){const t=z(e,i,u);return s?this.workerClient.histogram(t,s):w({attribute:t,features:o})}const{query:m,min:p,max:y}=await T(e,this,u,l);if(!m)return{bins:[],minValue:p,maxValue:y,normalizationTotal:u};const c=await n.queryAttributeBins(m,{signal:a});return N(c,t?this.getField(t):null,{minValue:p,maxValue:y,normalizationTotal:u})}async _histogramFromMemory(e){const{field:t,signal:r}=e,a=await this._processStatsFromMemoryParams({...e,layerViewFunc:"queryHistogram"}),{featuresJSON:i,graphics:s,layerView:o,query:n}=a,l="percent-of-total"===e.normalizationType?e.normalizationTotal??await this._getNormalizationTotalFromMemory(t,a,r):void 0,u=z(e,a,l);return!i&&!s&&o&&"queryHistogram"in o?o.queryHistogram(n,u,{signal:r}):i?this.workerClient.histogram(u,i):w({attribute:u,features:s})}_classBreaksFromInterpolation(e){const{minValue:t,maxValue:r}=e,a=e.numClasses||$,i=[],s=(r-t)/a;for(let l=0;l<a;l++){const e=t+l*s;i.push({minValue:e,maxValue:e+s})}i[a-1].maxValue=r;const o={classBreaks:i,normalizationTotal:e.normalizationTotal},n=U(o,e.classificationMethod);return Promise.resolve(n)}async _classBreaksFromMemory(e){const{view:t,field:r,valueExpression:a,signal:i}=e,{featuresJSON:s,graphics:o,layerView:n,query:l,fieldInfos:u}=await this._processStatsFromMemoryParams({...e,layerViewFunc:"queryClassBreaks"}),m={field:r,valueExpression:a,normalizationType:e.normalizationType,normalizationField:e.normalizationField,normalizationTotal:e.normalizationTotal,minValue:e.minValue,maxValue:e.maxValue,standardDeviationInterval:e.standardDeviationInterval,classificationMethod:e.classificationMethod,numClasses:e.numClasses};return a&&t&&(s||o)&&(m.viewInfoParams=E(t),m.timeZone=t.timeZone,m.fieldInfos=u),"percent-of-total"===e.normalizationType&&null==e.normalizationTotal&&(m.normalizationTotal=await this._getNormalizationTotalFromMemory(r,{featuresJSON:s,graphics:o,layerView:n,query:l},i)),!s&&!o&&n&&"queryClassBreaks"in n?n.queryClassBreaks(l,m,{signal:i}):s?this.workerClient.classBreaks(m,s):g({attribute:m,features:o})}async _heatmapStatsFromMemory(e){const{view:t,field:r,radius:a,signal:s}=e;i(t,"InMemoryLayerAdapter: must have a view");try{const r=await t.whenLayerView(this.layer);if("queryHeatmapStatistics"in r&&!r.updating&&!e.filter)return await r.queryHeatmapStatistics({field:e.field,radius:e.radius})}catch{o(s)}const{featuresJSON:n,graphics:l}=await this._processStatsFromMemoryParams({...e,returnGeometry:!0}),u=new c({extent:t.extent,tolerance:"2d"===t.type?t.state.resolution:t.pixelSizeAt?.(t.center)}),p={field:r,radius:a,transform:m(u),spatialReference:t.spatialReference?.toJSON(),size:t.size};return n?.length||l?.length?n?this.workerClient.heatmapStatistics(p,n):F({attribute:p,features:l}):{min:null,max:null}}getField(e=""){return this.layer.getField(e)}getFieldUsageInfo(e){return this.getField(e)?{supportsLabelingInfo:!0,supportsRenderer:!0,supportsPopupTemplate:!0,supportsLayerQuery:!0,supportsStatistics:!0}:null}getFieldDomain(e,t){return this.layer.getFieldDomain(e,t)}createQuery(){return this.layer.createQuery()}async summaryStatistics(e){const{field:t,valueExpression:a,sqlExpression:i,features:s,view:o}=e,n=t?this.getField(t):null,l=!!a,u="3d"===o?.type;if(!a&&i&&!this.supportsSQLExpression)throw new r(`${this.adapterName}:not-supported`,"Layer does not support standardized SQL expression for queries");return l||s||u?this._summaryStatsFromMemory(e,n):this._summaryStatsFromClientQuery(e,n)}async uniqueValues(e){const{valueExpression:t,sqlExpression:a,features:i,view:s}=e,o=await Q(e,this),n=!!t,l="3d"===s?.type;if(!t&&a&&!this.supportsSQLExpression)throw new r(`${this.adapterName}:not-supported`,"Layer does not support standardized SQL expression for queries");return n||i||l?this._uvFromMemory(e,o):this._uvFromClientQuery(e,o)}async histogram(e){const{features:t,valueExpression:a,normalizationType:i,sqlExpression:s}=e,o=t||!!a;if(!a&&s&&!this.supportsSQLExpression)throw new r(`${this.adapterName}:not-supported`,"Layer does not support standardized SQL expression for queries");return o||i?this._histogramFromMemory(e):this._histogramForField(e)}async classBreaks(e){return!1!==e.analyzeData?this._classBreaksFromMemory(e):this._classBreaksFromInterpolation(e)}async queryFeatureCount(e){const{whereClause:t,view:a,signal:i}=e;if(!a)throw new r(`${this.adapterName}:insufficient-data`,"view is required to fetch the features from layerView");const s=this.layer.createQuery();s.where=S(s.where,t);const o=await a.whenLayerView(this.layer);return await n(()=>!o.updating,i),o.queryFeatureCount(s,{signal:i})}async generateRenderer(e,t){throw new r(`${this.adapterName}:not-supported`,"Layer does not support generateRenderer operation")}async predominantCategories(e){const{fields:t,view:r,signal:a,filter:i}=e,s=f(t),o=await this._uvFromMemory({valueExpression:s,view:r,signal:a,filter:i});return J(o.uniqueValueInfos,t)}async heatmapStatistics(e){return this._heatmapStatsFromMemory(e)}async getSampleFeatures(e,a){const{view:i,sampleSize:s,requiredFields:o,returnGeometry:n,filter:l,signal:u}=e,m=this.layer.createQuery(),p=1;if(m.outSpatialReference=i?.spatialReference,m.returnGeometry=!!n,m.outFields=o,b(m,l),!i)throw new r(`${this.adapterName}:not-supported`,"view is required to get sample features for Layer");const y=await i.whenLayerView(this.layer);if(j(this,o,y).length)throw new r(`${this.adapterName}:not-supported`,"Required fields need to be passed in the outFields for Layer");const c=await this._fetchFeaturesFromMemory(y,m,u,a),f=null!=s&&s>0&&s<=c.length?s:c.length;return t(c,f,p)}load(e){const t=this.layer.load(e).then(async t=>{this.geometryType=t.geometryType,this.objectIdField=t.objectIdField,this.supportsSQLExpression="stream"===t.type||!!t.capabilities?.query?.supportsSqlExpression,this.minScale=t.minScale,this.maxScale=t.maxScale,this.fullExtent="fullExtent"in t?t.fullExtent:t.parent?.fullExtent,this._hasLocalSource=!1,this.hasQueryEngine=!0,this.workerClient=v.getInstance(),await this.workerClient.open(e.signal)});return this.addResolvingPromise(t),Promise.resolve(this)}};e([l({readOnly:!0})],R.prototype,"adapterName",void 0),e([l({constructOnly:!0})],R.prototype,"layer",void 0),R=e([u("esri.smartMapping.support.adapters.InMemoryLayerAdapter")],R);export{R as default};
|
|
5
|
+
import{__decorate as e}from"tslib";import{pickRandom as t}from"../../../core/arrayUtils.js";import r from"../../../core/Error.js";import a from"../../../core/Logger.js";import{assertIsSome as i}from"../../../core/maybe.js";import{timeout as s,throwIfAborted as o}from"../../../core/promiseUtils.js";import{whenOnce as n}from"../../../core/reactiveUtils.js";import{property as l,subclass as u}from"../../../core/accessorSupport/decorators.js";import{toQuantizationTransform as m}from"../../../geometry/support/quantizationUtils.js";import{kebabDict as p}from"../../../layers/support/fieldType.js";import{isTimeOnlyField as y}from"../../../layers/support/fieldUtils.js";import f from"../../../rest/support/QuantizationParameters.js";import{getArcadeForPredominantCategory as c}from"../../statistics/support/predominanceUtils.js";import{summaryStatistics as d,uniqueValues as h,histogram as w,classBreaks as g,heatmapStatistics as F}from"../../statistics/support/statsWorker.js";import{mergeWhereClauses as S}from"../../statistics/support/utils.js";import{WorkerClient as q}from"../../statistics/support/WorkerClient.js";import{getFieldsList as v,isAnyDateField as x,getWhereClause as V,fieldDelimiter as _}from"../utils.js";import z from"./LayerAdapter.js";import{getHistogramAttributeDefinition as T,getAttributeBinsQuery as N,processQueryAttributeBinsResult as M}from"./support/histogramUtils.js";import{ensureFeaturesJSON as L,getSummaryStatsQuery as E,getSummaryStatisticsFromFeatureSet as C,getViewInfoParams as j,getMissingFields as b,updateQueryWithFeatureFilter as I,getUVQuery as k,getUniqueValuesFromFeatureSet as O,getBins as Q,getDomainsForFields as J,getPredominantCategoriesFromUVInfos as B}from"./support/utils.js";import{processSummaryStatisticsResult as P,createUVResult as U,resolveCBResult as A}from"../../../statistics/utils.js";import{loadArcade as $}from"../../../support/loadArcade.js";const G=5;let R=null,D=class extends z{constructor(){super(...arguments),this._hasLocalSource=!1,this.adapterName="in-memory-layer-adapter"}destroy(){this.workerClient?.destroy()}async _waitForLayerViewUpdate(e){if(!e)throw new r(`${this.adapterName}:insufficient-data`,"layerView is required to fetch the features");const t=new AbortController,i=n(()=>!e.updating,t.signal);await s(i,5e3,t).catch(e=>{throw a.getLogger(this).warn("LayerView is taking too long to update. Aborting fetch from layerView."),e})}async _fetchFeatureSetFromMemory(e,t,a){const i=this.layer;if(this._hasLocalSource&&"queryFeatures"in i)return i.queryFeatures(e);if(!t)throw new r(`${this.adapterName}:insufficient-data`,"view is required to fetch the features from layerView");const s=await t.whenLayerView(this.layer);return await this._waitForLayerViewUpdate(s),s.queryFeatures(e,{signal:a})}async _fetchFeaturesFromMemory(e,t,a,i){const s=this.layer,o="json"===i;if(this._hasLocalSource&&"queryFeatures"in s){const e=await s.queryFeatures(t);return o?L(e.features):e.features}if(await this._waitForLayerViewUpdate(e),o&&"queryFeaturesJSON"in e&&e.queryFeaturesJSON){const{features:r}=await e.queryFeaturesJSON(t,{signal:a});return r}if(!("queryFeatures"in e))throw new r(`${this.adapterName}:not-supported`,"'queryFeatures' is not supported on the layerView");const n=await e.queryFeatures(t,{signal:a});return o?L(n.features):n.features}_fetchFeaturesForStats(e,t){return v({field:e.field,field2:e.field2,field3:e.field3,normalizationField:e.normalizationField,valueExpression:e.valueExpression,fields:e.fields}).then(r=>this.getSampleFeatures({sampleSize:-1,view:e.view,returnGeometry:e.returnGeometry,filter:e.filter,requiredFields:r,signal:e.signal},t))}async _summaryStatsFromClientQuery(e,t){const{view:r,signal:a}=e,i=E(this,e,t),s=await this._fetchFeatureSetFromMemory(i,r,a),o=C(s,x(t)||y(t));return P(o,e.outStatisticTypes)}async _getNormalizationTotalFromMemory(e,t,a){const{featuresJSON:i,graphics:s,layerView:o,query:n}=t,l={include:["sum"]},u=(!i&&!s&&o&&"querySummaryStatistics"in o?await o.querySummaryStatistics(n,{field:e},{signal:a}):i?await this.workerClient.summaryStatistics({field:e,outStatisticTypes:l},i):await d({attribute:{field:e,outStatisticTypes:l},features:s??[]})).sum;if(null==u)throw new r(`${this.adapterName}:invalid`,"invalid normalizationTotal");return u}async _summaryStatsFromMemory(e,t){const{view:r,field:a,valueExpression:i,normalizationType:s,signal:o}=e,n={field:a,valueExpression:i,normalizationType:s,normalizationField:e.normalizationField,normalizationTotal:e.normalizationTotal,minValue:e.minValue,maxValue:e.maxValue,outStatisticTypes:e.outStatisticTypes},{featuresJSON:l,graphics:u,layerView:m,query:y,fieldInfos:f}=await this._processStatsFromMemoryParams({...e,layerViewFunc:"querySummaryStatistics"});return i&&r&&(l||u)&&(n.fieldType=t?.type?p.toJSON(t.type):null,n.viewInfoParams=j(r),n.timeZone=r.timeZone,n.fieldInfos=f),"percent-of-total"===s&&null==e.normalizationTotal&&(n.normalizationTotal=await this._getNormalizationTotalFromMemory(a,{featuresJSON:l,graphics:u,layerView:m,query:y},o)),!l&&!u&&m&&"querySummaryStatistics"in m?m.querySummaryStatistics(y,n,{signal:o}):l?this.workerClient.summaryStatistics(n,l):d({attribute:n,features:u})}async _getFilteredFeatures(e,t){let r=e;const a=t?.geometry;if("intersects"===t?.spatialRelationship&&a){const t=await import("../../../geometry/operators/intersectionOperator.js");r=e.filter(({geometry:e})=>!(!e||!t.execute(e,a)))}return e.length&&"declaredClass"in e[0]&&"esri.Graphic"===e[0].declaredClass?{graphics:r}:{featuresJSON:r}}async _processStatsFromMemoryParams(e){const{features:t,filter:r}=e;if(t?.length)return this._getFilteredFeatures(t,r);const{view:a,field:i,field2:s,field3:o,normalizationField:n,valueExpression:l,sqlExpression:u,layerViewFunc:m,signal:p}=e;let y=e.returnGeometry;if(null==y&&l){if(!R){const{arcadeUtils:e}=await $();R=e}const e=R.hasGeometryOperations(l);e&&await R.enableGeometryOperations(),y=e}let f=null,c=null,d=null,h=null,w=null;if(a)try{const e="subtype-sublayer"===this.layer.type?this.layer.parent:this.layer;f=await a.whenLayerView(e),c=null!=m&&null!=f&&m in f&&"function"==typeof f[m]}catch{c=!1}if(c)try{await this._waitForLayerViewUpdate(f);const e=u?await V(u,this.layer.fieldsIndex):null,t=e?.fieldNames,a=await v({field:i,field2:s,field3:o,normalizationField:n,valueExpression:l,fields:t});b(this,a,f).length?c=!1:(d=this.layer.createQuery(),d.outFields=a,d.returnGeometry=!1,I(d,r)),f.suspended&&(c=!1)}catch{c=!1}if(!c){const e=u?await V(u,this.layer.fieldsIndex):null,t=e?.fieldNames;h=await this._fetchFeaturesForStats({field:i,field2:s,field3:o,fields:t,valueExpression:l,normalizationField:n,returnGeometry:y,filter:r,view:a,signal:p},"json"),w=(await v({valueExpression:l})).map(e=>this.getField(e)?.toJSON()).filter(Boolean)}return{layerView:f,query:d,featuresJSON:h,fieldInfos:w}}async _uvFromClientQuery(e,t){const{view:r,signal:a}=e,i=k(this,e),s=await this._fetchFeatureSetFromMemory(i,r,a),o=await O(s,{layer:this,field:e.field,field2:e.field2,field3:e.field3,fieldDelimiter:_,view:e.view,signal:e.signal});return U(o,t,e.returnAllCodedValues,_)}async _uvFromMemory(e,t){const{view:r,field:a,valueExpression:i,returnAllCodedValues:s,signal:o}=e,{featuresJSON:n,graphics:l,layerView:u,query:m,fieldInfos:p}=await this._processStatsFromMemoryParams({...e,layerViewFunc:"queryUniqueValues"}),y={field:a,field2:e.field2,field3:e.field3,fieldDelimiter:_,valueExpression:i,domains:t,returnAllCodedValues:s};return i&&r&&(n||l)&&(y.viewInfoParams=j(r),y.timeZone=r.timeZone,y.fieldInfos=p),!n&&!l&&u&&"queryUniqueValues"in u?u.queryUniqueValues(m,y,{signal:o}):n?this.workerClient.uniqueValues(y,n):h({attribute:y,features:l})}_histogramForField(e){let t=null;return t=null!=e.minValue&&null!=e.maxValue?Promise.resolve({min:e.minValue,max:e.maxValue}):this.summaryStatistics({...e,outStatisticTypes:{include:["min","max","count"]}}).then(e=>{if(!e.count)throw new r(`${this.adapterName}:insufficient-data`,"Either the layer has no features or none of the features have data for the field");return{min:e.min,max:e.max}}),t.then(t=>Q(this,{min:t.min,max:t.max},e.field,e.numBins??void 0,e.view,e.filter,e.signal))}async _histogramFromQueryAttributeBinsFromMemory(e){const{field:t,normalizationType:r,signal:a}=e,i=await this._processStatsFromMemoryParams({...e,layerViewFunc:"queryAttributeBins"}),{featuresJSON:s,graphics:o,layerView:n,query:l}=i,u="percent-of-total"===r?e.normalizationTotal??await this._getNormalizationTotalFromMemory(t,i,a):void 0;if(!n||!("queryAttributeBins"in n)||s||o){const t=T(e,i,u);return s?this.workerClient.histogram(t,s):w({attribute:t,features:o})}const{query:m,min:p,max:y}=await N(e,this,u,l);if(!m)return{bins:[],minValue:p,maxValue:y,normalizationTotal:u};const f=await n.queryAttributeBins(m,{signal:a});return M(f,t?this.getField(t):null,{minValue:p,maxValue:y,normalizationTotal:u})}async _histogramFromMemory(e){const{field:t,signal:r}=e,a=await this._processStatsFromMemoryParams({...e,layerViewFunc:"queryHistogram"}),{featuresJSON:i,graphics:s,layerView:o,query:n}=a,l="percent-of-total"===e.normalizationType?e.normalizationTotal??await this._getNormalizationTotalFromMemory(t,a,r):void 0,u=T(e,a,l);return!i&&!s&&o&&"queryHistogram"in o?o.queryHistogram(n,u,{signal:r}):i?this.workerClient.histogram(u,i):w({attribute:u,features:s})}_classBreaksFromInterpolation(e){const{minValue:t,maxValue:r}=e,a=e.numClasses||G,i=[],s=(r-t)/a;for(let l=0;l<a;l++){const e=t+l*s;i.push({minValue:e,maxValue:e+s})}i[a-1].maxValue=r;const o={classBreaks:i,normalizationTotal:e.normalizationTotal},n=A(o,e.classificationMethod);return Promise.resolve(n)}async _classBreaksFromMemory(e){const{view:t,field:r,valueExpression:a,signal:i}=e,{featuresJSON:s,graphics:o,layerView:n,query:l,fieldInfos:u}=await this._processStatsFromMemoryParams({...e,layerViewFunc:"queryClassBreaks"}),m={field:r,valueExpression:a,normalizationType:e.normalizationType,normalizationField:e.normalizationField,normalizationTotal:e.normalizationTotal,minValue:e.minValue,maxValue:e.maxValue,standardDeviationInterval:e.standardDeviationInterval,classificationMethod:e.classificationMethod,numClasses:e.numClasses};return a&&t&&(s||o)&&(m.viewInfoParams=j(t),m.timeZone=t.timeZone,m.fieldInfos=u),"percent-of-total"===e.normalizationType&&null==e.normalizationTotal&&(m.normalizationTotal=await this._getNormalizationTotalFromMemory(r,{featuresJSON:s,graphics:o,layerView:n,query:l},i)),!s&&!o&&n&&"queryClassBreaks"in n?n.queryClassBreaks(l,m,{signal:i}):s?this.workerClient.classBreaks(m,s):g({attribute:m,features:o})}async _heatmapStatsFromMemory(e){const{view:t,field:r,radius:a,signal:s}=e;i(t,"InMemoryLayerAdapter: must have a view");try{const r=await t.whenLayerView(this.layer);if("queryHeatmapStatistics"in r&&!r.updating&&!e.filter)return await r.queryHeatmapStatistics({field:e.field,radius:e.radius})}catch{o(s)}const{featuresJSON:n,graphics:l}=await this._processStatsFromMemoryParams({...e,returnGeometry:!0}),u=new f({extent:t.extent,tolerance:"2d"===t.type?t.state.resolution:t.pixelSizeAt?.(t.center)}),p={field:r,radius:a,transform:m(u),spatialReference:t.spatialReference?.toJSON(),size:t.size};return n?.length||l?.length?n?this.workerClient.heatmapStatistics(p,n):F({attribute:p,features:l}):{min:null,max:null}}getField(e=""){return this.layer.getField(e)}getFieldUsageInfo(e){return this.getField(e)?{supportsLabelingInfo:!0,supportsRenderer:!0,supportsPopupTemplate:!0,supportsLayerQuery:!0,supportsStatistics:!0}:null}getFieldDomain(e,t){return this.layer.getFieldDomain(e,t)}createQuery(){return this.layer.createQuery()}async summaryStatistics(e){const{field:t,valueExpression:a,sqlExpression:i,features:s,view:o}=e,n=t?this.getField(t):null,l=!!a,u="3d"===o?.type;if(!a&&i&&!this.supportsSQLExpression)throw new r(`${this.adapterName}:not-supported`,"Layer does not support standardized SQL expression for queries");return l||s||u?this._summaryStatsFromMemory(e,n):this._summaryStatsFromClientQuery(e,n)}async uniqueValues(e){const{valueExpression:t,sqlExpression:a,features:i,view:s}=e,o=await J(e,this),n=!!t,l="3d"===s?.type;if(!t&&a&&!this.supportsSQLExpression)throw new r(`${this.adapterName}:not-supported`,"Layer does not support standardized SQL expression for queries");return n||i||l?this._uvFromMemory(e,o):this._uvFromClientQuery(e,o)}async histogram(e){const{features:t,valueExpression:a,normalizationType:i,sqlExpression:s}=e,o=t||!!a;if(!a&&s&&!this.supportsSQLExpression)throw new r(`${this.adapterName}:not-supported`,"Layer does not support standardized SQL expression for queries");return o||i?this._histogramFromMemory(e):this._histogramForField(e)}async classBreaks(e){return!1!==e.analyzeData?this._classBreaksFromMemory(e):this._classBreaksFromInterpolation(e)}async queryFeatureCount(e){const{whereClause:t,view:a,signal:i}=e;if(!a)throw new r(`${this.adapterName}:insufficient-data`,"view is required to fetch the features from layerView");const s=this.layer.createQuery();s.where=S(s.where,t);const o=await a.whenLayerView(this.layer);return await n(()=>!o.updating,i),o.queryFeatureCount(s,{signal:i})}async generateRenderer(e,t){throw new r(`${this.adapterName}:not-supported`,"Layer does not support generateRenderer operation")}async predominantCategories(e){const{fields:t,view:r,signal:a,filter:i}=e,s=c(t),o=await this._uvFromMemory({valueExpression:s,view:r,signal:a,filter:i});return B(o.uniqueValueInfos,t)}async heatmapStatistics(e){return this._heatmapStatsFromMemory(e)}async getSampleFeatures(e,a){const{view:i,sampleSize:s,requiredFields:o,returnGeometry:n,filter:l,signal:u}=e,m=this.layer.createQuery(),p=1;if(m.outSpatialReference=i?.spatialReference,m.returnGeometry=!!n,m.outFields=o,I(m,l),!i)throw new r(`${this.adapterName}:not-supported`,"view is required to get sample features for Layer");const y=await i.whenLayerView(this.layer);if(b(this,o,y).length)throw new r(`${this.adapterName}:not-supported`,"Required fields need to be passed in the outFields for Layer");const f=await this._fetchFeaturesFromMemory(y,m,u,a),c=null!=s&&s>0&&s<=f.length?s:f.length;return t(f,c,p)}load(e){const t=this.layer.load(e).then(async t=>{this.geometryType=t.geometryType,this.objectIdField=t.objectIdField,this.supportsSQLExpression="stream"===t.type||!!t.capabilities?.query?.supportsSqlExpression,this.minScale=t.minScale,this.maxScale=t.maxScale,this.fullExtent="fullExtent"in t?t.fullExtent:t.parent?.fullExtent,this._hasLocalSource=!1,this.hasQueryEngine=!0,this.workerClient=q.getInstance(),await this.workerClient.open(e.signal)});return this.addResolvingPromise(t),Promise.resolve(this)}};e([l({readOnly:!0})],D.prototype,"adapterName",void 0),e([l({constructOnly:!0})],D.prototype,"layer",void 0),D=e([u("esri.smartMapping.support.adapters.InMemoryLayerAdapter")],D);export{D as default};
|
|
@@ -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 e from"../../../../core/Error.js";import{resolveTimeZone as i}from"../../../../intl/date.js";import{isTimeOnlyField as n,isDateField as t,isTimestampOffsetField as a,isDateOnlyField as r}from"../../../../layers/support/fieldUtils.js";import o from"../../../../rest/support/AttributeBinsQuery.js";import l from"../../../../rest/support/AutoIntervalBinParameters.js";import s from"../../../../rest/support/DateBinParameters.js";import
|
|
5
|
+
import e from"../../../../core/Error.js";import{resolveTimeZone as i}from"../../../../intl/date.js";import{isTimeOnlyField as n,isDateField as t,isTimestampOffsetField as a,isDateOnlyField as r}from"../../../../layers/support/fieldUtils.js";import o from"../../../../rest/support/AttributeBinsQuery.js";import l from"../../../../rest/support/AutoIntervalBinParameters.js";import s from"../../../../rest/support/DateBinParameters.js";import u from"../../../../rest/support/FixedBoundariesBinParameters.js";import m from"../../../../rest/support/FixedIntervalBinParameters.js";import d from"../../../../rest/support/GenerateRendererParameters.js";import p from"../../../../rest/support/StatisticDefinition.js";import{getSQLFilterForNormalization as f,mergeWhereClauses as c,getRangeExpr as y}from"../../../statistics/support/utils.js";import{isAnyDateField as x}from"../../utils.js";import{getSQLExpressionForDateOrTimeField as z,getFieldExpr as v,updateQueryWithFeatureFilter as T,defaultNumBins as w,generateBinParams as h,getViewInfoParams as F}from"./utils.js";import{createClassBreaksDefinition as V}from"../../../../statistics/utils.js";const B="countOFExpr",E="lowerBoundary",q="upperBoundary";function b(e,i,t){const a=e.valueExpression||e.sqlExpression,r=e.signal;if(!a){const{field:a,normalizationType:o,normalizationField:l}=e,s=a?i.getField(a):null,u=x(s)||n(s),m={field:a,normalizationType:o,normalizationField:l,normalizationTotal:t,layer:i};return{sqlExpression:u?z(i,s):v(m),sqlWhere:u?null:e.sqlWhere||f({field:a,normalizationType:o,normalizationField:l}),filter:e.filter,signal:r}}return{valueExpression:e.valueExpression,sqlExpression:e.sqlExpression,sqlWhere:e.sqlWhere,filter:e.filter,signal:r}}async function j(e,i,n){const{field:t,normalizationType:a,normalizationField:r,signal:o}=e,l=f({field:t,normalizationType:a,normalizationField:r}),s=new d({classificationDefinition:V({field:t,normalizationType:a,normalizationField:r,classificationMethod:e.classificationMethod,standardDeviationInterval:e.standardDeviationInterval,definedInterval:e.definedInterval,breakCount:e.numBins||w}),where:c(l,n)});return i.generateRenderer(s,o).then(e=>{const{normalizationTotal:n,classBreaks:o}=e;return h({field:t,normalizationType:a,normalizationField:r,normalizationTotal:n,classBreaks:o,where:l,layer:i})})}async function I(i,t,a,o,d){const{field:p,sqlExpression:f,normalizationField:c,classificationMethod:x,normalizationType:z}=i,T=p?t.getField(p):null,h=n(T),F=r(T)||h,V=i.numBins||w;if(F){if(z||x)throw new e(`${t.adapterName}:not-supported`,"NormalizationType and classificationMethod are not supported for date-only and time-only fields");const i=(o-a)/V/1e3,n=i/86400;return new s({field:p,expression:f,expressionValueType:f?"double":void 0,interval:{unit:h?"seconds":"days",value:Math.ceil(h?i:n)},start:a,end:o})}if("defined-interval"===x)return new m({field:p,expression:f,expressionValueType:f?"double":void 0,normalizationField:c,normalizationTotal:d,normalizationType:z,interval:i.definedInterval??Math.ceil((o-a)/V),start:z?null:a,end:z?null:o,normalizationMinValue:z?a:null,normalizationMaxValue:z?o:null});if("manual"===x)throw new e(`${t.adapterName}:not-supported`,"Layer does not support manual classificationMethod");if("natural-breaks"===x||"quantile"===x||"standard-deviation"===x){const n=v({field:p,normalizationField:c,normalizationTotal:d,normalizationType:z,layer:t}),r=null!==i.minValue&&null!==i.maxValue?y(n,i.minValue,i.maxValue):void 0,o=await j(i,t,r);if(!o.intervals)throw new e(`${t.adapterName}:invalid`,"Invalid intervals returned from generate renderer");const l=[a,...o.intervals.map(e=>e[1])];return new u({field:z?null:p,expression:z?n:f,expressionValueType:f?"double":void 0,boundaries:l})}return new l({field:p,normalizationField:c,normalizationTotal:d,normalizationType:z,expression:f,expressionValueType:f?"double":void 0,numBins:V,start:z?null:a,end:z?null:o,normalizationMinValue:z?a:null,normalizationMaxValue:z?o:null})}function M(e,i,n,t){return null!=n&&null!=t?Promise.resolve({min:n,max:t}):i.summaryStatistics({...e,outStatisticTypes:{include:["min","max"]}}).then(e=>({min:e.min,max:e.max}))}async function g(e,n,r,l){const{field:s,minValue:u,maxValue:m,filter:d,view:f}=e,y=s?n.getField(s):null,x=t(y)||a(y),z=b(e,n,r),{min:v,max:w}=await M(z,n,u,m);if(null==v||null==w)return{query:null,min:v,max:w};const h=new p({statisticType:"count",outStatisticFieldName:B,onStatisticField:"1"}),{where:F,timeExtent:V}=l||{},E=c(F,z.sqlWhere),q="lowerBoundary",j="upperBoundary",g=new o({binParameters:await I(e,n,v,w,r),outStatistics:[h],binOrder:e.sortOrder,where:E,timeExtent:V,lowerBoundaryAlias:q,upperBoundaryAlias:j,outTimeZone:f?.timeZone&&x?i(f.timeZone):null});return T(g,d),{query:g,min:v,max:w}}function D(e,i=!1){if("string"!=typeof e)return e;return(i?new Date(`1970-01-01T${e}Z`):new Date(e)).getTime()}function P(e,i,t){const a=n(i);return{...t,bins:e.features.map(e=>({minValue:D(e.attributes[E],a),maxValue:D(e.attributes[q],a),count:e.attributes[B]}))}}function S(e,i,n){const{valueExpression:t,view:a}=e,{featuresJSON:r,graphics:o,fieldInfos:l}=i,s={field:e.field,valueExpression:t,sqlExpression:e.sqlExpression,normalizationType:e.normalizationType,normalizationField:e.normalizationField,normalizationTotal:n,minValue:e.minValue,maxValue:e.maxValue,standardDeviationInterval:e.standardDeviationInterval,classificationMethod:e.classificationMethod,numBins:e.numBins};return t&&a&&(r||o)&&(s.viewInfoParams=F(a),s.timeZone=a.timeZone,s.fieldInfos=l),s}export{j as binParamsFromGenRend,D as formatHistogramBinValue,g as getAttributeBinsQuery,M as getDataRange,S as getHistogramAttributeDefinition,b as getQueryParamsForExpr,P as processQueryAttributeBinsResult};
|
|
@@ -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{convertDateTimeFieldFormatToIntlOptions as t,formatDate as e,convertDateFormatToIntlOptions as n,formatTimestamp as
|
|
5
|
+
import{convertDateTimeFieldFormatToIntlOptions as t,formatDate as e,convertDateFormatToIntlOptions as n,formatTimestamp as r,formatTimeOnly as o,formatDateOnly as i}from"../../intl/date.js";import{isDateField as s,isDateOnlyField as a,isTimestampOffsetField as l}from"../../layers/support/fieldUtils.js";import{getWellKnownBasemapId as u}from"../../support/basemapUtils.js";import{loadArcade as f}from"../../support/loadArcade.js";import{utc as m}from"../../time/constants.js";import{getTimeZoneFormattingOptions as d}from"../../time/timeZoneUtils.js";const c=",",p={light:["streets","gray","topo","terrain","oceans","osm","gray-vector","streets-vector","topo-vector","streets-relief-vector","streets-navigation-vector","topo-3d","navigation-3d","streets-3d","osm-3d","gray-3d"],dark:["satellite","hybrid","dark-gray","dark-gray-vector","streets-night-vector","navigation-dark-3d","streets-dark-3d","dark-gray-3d"]},g="percent-of-total",y="field",h={exclude:["median"]},v={years:365,months:30,days:1,hours:1/24,minutes:1/1440,seconds:1/86400,milliseconds:1/864e5},T=new Set(["integer","small-integer"]);let Z,$=null;const w=["date","date-only","timestamp-offset"];function C(t){return s(t)||a(t)||l(t)}async function U(t,e){if(!t)return null;if(!Z){const t=await import("../../core/sql/WhereClauseCache.js").then(t=>t.WhereClauseCache);Z=new t(50,500)}return Z.get(t,e)}async function F(t){const{field:e,field2:n,field3:r,normalizationField:o,valueExpression:i,fields:s}=t;let a=[];if(i){if(!$){const{arcadeUtils:t}=await f();$=t}a=$.extractFieldNames(i)}return e&&a.push(e),n&&a.push(n),r&&a.push(r),o&&a.push(o),s&&a.push(...s),a}function S(t){let e=t.normalizationType;return e||(t.normalizationField?e=y:null!=t.normalizationTotal&&(e=g)),e??void 0}function j(t){return String(t).padStart(2,"0")}function k(t,e,n){let r;if("date"===e||"number"===e){"number"===e&&(t=new Date(t));r=`TIMESTAMP'${n?t.getFullYear():t.getUTCFullYear()}-${j((n?t.getMonth():t.getUTCMonth())+1)}-${j(n?t.getDate():t.getUTCDate())} ${j(n?t.getHours():t.getUTCHours())}:${j(n?t.getMinutes():t.getUTCMinutes())}:${j(n?t.getSeconds():t.getUTCSeconds())}'`}else r=t;return r}function D(t,e,n,r){const{hasQueryEngine:o}=t,i=`(${k(n,b(t,n),o)} - ${k(e,b(t,e),o)})`;let s=v[r],a="/";s<1&&(s=1/s,a="*");return{sqlExpression:1===s?i:`(${i} ${a} ${s})`,sqlWhere:null}}function b(t,e){if(e instanceof Date)return"date";if("number"==typeof e)return"number";if("string"==typeof e){const n=t.getField(e);if("<now>"===e.toLowerCase())return;if(s(n))return"field"}}function M(t,e=p){for(const n in e)if(e[n].includes(t))return n}function N(t,e,n=!0){let r=null;return t&&("string"==typeof t?e.includes(t)&&(r=t):r=u(t)),n?r||"gray":r}function x(t,e){const n=e&&t.getField(e);return!!n&&T.has(n.type)}function z(t){return`cast(${t} as float)`}function E(s,a){const{format:l,fieldFormat:u,timeZoneOptions:f,fieldType:c}=a??{},p=u?t(u):null;let g,y;if(f&&({timeZone:g,timeZoneName:y}=d(f.layerTimeZone,f.datesInUnknownTimezone,f.viewTimeZone,p||n(l||"short-date-short-time"),c)),"string"==typeof s&&isNaN(Date.parse("time-only"===c?`1970-01-01T${s}Z`:s)))return s;switch(c){case"date-only":{const t=p||n(l||"short-date");return"string"==typeof s?i(s,{...t}):e(s,{...t,timeZone:m})}case"time-only":{const t=p||n(l||"short-time");return"string"==typeof s?o(s,t):e(s,{...t,timeZone:m})}case"timestamp-offset":{if(!g&&"string"==typeof s&&new Date(s).toISOString()!==s)return s;const t=l||p||f?p||n(l||"short-date-short-time"):void 0,o=t?{...t,timeZone:g,timeZoneName:y}:void 0;return"string"==typeof s?r(s,o):e(s,o)}default:{const t=l||p||f?p||n(l||"short-date-short-time"):void 0;return e("string"==typeof s?new Date(s):s,t?{...t,timeZone:g,timeZoneName:y}:void 0)}}}export{z as castIntegerFieldToFloat,w as dateTypes,p as defaultBasemapGroups,h as defaultStatisticTypes,c as fieldDelimiter,E as formatAnyDate,M as getBasemapGroup,N as getBasemapId,D as getDateDiffSQL,b as getDateType,F as getFieldsList,S as getNormalizationType,U as getWhereClause,C as isAnyDateField,x as isIntegerField,v as unitValueInDays};
|
|
@@ -41,7 +41,7 @@ export function getThemes(basemap?: Basemap | string | null | undefined): Theme[
|
|
|
41
41
|
* // the best default scheme for the layer, basemap, and theme
|
|
42
42
|
* let primaryScheme = schemes.primaryScheme;
|
|
43
43
|
*/
|
|
44
|
-
export function getSchemes(params:
|
|
44
|
+
export function getSchemes(params: GetSchemesParameters): ColorSchemes | null | undefined;
|
|
45
45
|
|
|
46
46
|
/**
|
|
47
47
|
* Returns a color scheme with the provided name.
|
|
@@ -59,7 +59,7 @@ export function getSchemes(params: GetSchemesParams): ColorSchemes | null | unde
|
|
|
59
59
|
* name: "Red Extremes 1"
|
|
60
60
|
* });
|
|
61
61
|
*/
|
|
62
|
-
export function getSchemeByName(params:
|
|
62
|
+
export function getSchemeByName(params: GetSchemesByNameParameters): ColorScheme | null | undefined;
|
|
63
63
|
|
|
64
64
|
/**
|
|
65
65
|
* Returns an array of color schemes with the provided tags. These schemes define symbol properties for
|
|
@@ -78,7 +78,7 @@ export function getSchemeByName(params: GetSchemesByNameParams): ColorScheme | n
|
|
|
78
78
|
* includedTags: [ "reds", "colorblind-friendly" ]
|
|
79
79
|
* });
|
|
80
80
|
*/
|
|
81
|
-
export function getSchemesByTag(params:
|
|
81
|
+
export function getSchemesByTag(params: GetSchemesByTagParameters): ColorScheme[];
|
|
82
82
|
|
|
83
83
|
/**
|
|
84
84
|
* Clones a color scheme object.
|
|
@@ -113,9 +113,9 @@ export function flipColors(scheme: ColorScheme): ColorScheme;
|
|
|
113
113
|
* given colors.
|
|
114
114
|
* @since 4.9
|
|
115
115
|
*/
|
|
116
|
-
export function getMatchingSchemes(params:
|
|
116
|
+
export function getMatchingSchemes(params: GetMatchingSchemesParameters): ColorScheme[];
|
|
117
117
|
|
|
118
|
-
export interface
|
|
118
|
+
export interface GetMatchingSchemesParameters {
|
|
119
119
|
/** An array of colors used to match with schemes for the given theme. */
|
|
120
120
|
colors: Color[];
|
|
121
121
|
/** The geometry type of the layer for which the color scheme will be applied. */
|
|
@@ -131,7 +131,7 @@ export interface GetMatchingSchemesParams {
|
|
|
131
131
|
worldScale?: boolean;
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
-
export interface
|
|
134
|
+
export interface GetSchemesParameters {
|
|
135
135
|
/**
|
|
136
136
|
* The Esri basemap to pair with the visualization. This
|
|
137
137
|
* value indicates the best symbol colors for visualizing features against the given basemap. If you have a
|
|
@@ -171,12 +171,12 @@ export interface GetSchemesParams {
|
|
|
171
171
|
worldScale?: boolean | null;
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
-
export interface
|
|
174
|
+
export interface GetSchemesByNameParameters extends GetSchemesParameters {
|
|
175
175
|
/** The name of the scheme to retrieve. */
|
|
176
176
|
name: string;
|
|
177
177
|
}
|
|
178
178
|
|
|
179
|
-
export interface
|
|
179
|
+
export interface GetSchemesByTagParameters extends GetSchemesParameters {
|
|
180
180
|
/**
|
|
181
181
|
* When provided, only schemes missing all the provided tags will be returned.
|
|
182
182
|
*
|
|
@@ -26,7 +26,7 @@ import type { DotDensityScheme, DotDensitySchemes, BasemapTheme } from "./types.
|
|
|
26
26
|
* // the best default scheme for the layer and basemap
|
|
27
27
|
* const primaryScheme = schemes.primaryScheme;
|
|
28
28
|
*/
|
|
29
|
-
export function getSchemes(params:
|
|
29
|
+
export function getSchemes(params: GetSchemesParameters): DotDensitySchemes | null | undefined;
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
32
|
* Returns a dot density scheme with the provided name.
|
|
@@ -43,7 +43,7 @@ export function getSchemes(params: GetSchemesParams): DotDensitySchemes | null |
|
|
|
43
43
|
* name: "Galaxy Berries"
|
|
44
44
|
* });
|
|
45
45
|
*/
|
|
46
|
-
export function getSchemeByName(params:
|
|
46
|
+
export function getSchemeByName(params: GetSchemesByNameParameters): DotDensityScheme | null | undefined;
|
|
47
47
|
|
|
48
48
|
/**
|
|
49
49
|
* Returns an array of dot density schemes with the provided tags. These schemes define symbol properties for
|
|
@@ -61,7 +61,7 @@ export function getSchemeByName(params: GetSchemesByNameParams): DotDensitySchem
|
|
|
61
61
|
* includedTags: [ "reds", "dot-density" ]
|
|
62
62
|
* });
|
|
63
63
|
*/
|
|
64
|
-
export function getSchemesByTag(params:
|
|
64
|
+
export function getSchemesByTag(params: GetSchemesByTagParameters): DotDensityScheme[];
|
|
65
65
|
|
|
66
66
|
/**
|
|
67
67
|
* Clones a dot density scheme object.
|
|
@@ -74,7 +74,7 @@ export function getSchemesByTag(params: GetSchemesByTagParams): DotDensityScheme
|
|
|
74
74
|
*/
|
|
75
75
|
export function cloneScheme(scheme: DotDensityScheme | null | undefined): DotDensityScheme | null | undefined;
|
|
76
76
|
|
|
77
|
-
export interface
|
|
77
|
+
export interface GetSchemesParameters {
|
|
78
78
|
/**
|
|
79
79
|
* The Esri basemap to pair with the visualization. This
|
|
80
80
|
* value indicates the best symbol colors for visualizing features against the given basemap. If you have a
|
|
@@ -92,12 +92,12 @@ export interface GetSchemesParams {
|
|
|
92
92
|
numColors: number;
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
export interface
|
|
95
|
+
export interface GetSchemesByNameParameters extends GetSchemesParameters {
|
|
96
96
|
/** The name of the scheme to retrieve. */
|
|
97
97
|
name: string;
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
export interface
|
|
100
|
+
export interface GetSchemesByTagParameters extends GetSchemesParameters {
|
|
101
101
|
/**
|
|
102
102
|
* When provided, only schemes missing all the provided tags will be returned.
|
|
103
103
|
*
|