@arcgis/core 5.0.0-next.66 → 5.0.0-next.68
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 +4 -4
- package/Map.d.ts +1 -1
- package/WebDocument2D.d.ts +2 -3
- package/WebScene.d.ts +2 -3
- package/analysis/ElevationProfile/ElevationProfileLineViewOptions.d.ts +9 -6
- package/analysis/ElevationProfile/ElevationProfileLineViewOptions.js +1 -1
- package/applications/Components/QuantityFormatter.d.ts +14 -1
- package/applications/Components/SelectionOperation.d.ts +45 -9
- package/applications/Components/SketchTooltipControls.d.ts +31 -6
- package/applications/Components/actionUtils.d.ts +1 -0
- package/applications/Components/analysisUtils.d.ts +98 -26
- package/applications/Components/arcadeEditorUtils.d.ts +3 -0
- package/applications/Components/arcadeFeatureUtils.d.ts +34 -6
- package/applications/Components/baUtils.d.ts +8 -8
- package/applications/Components/basemapUtils.d.ts +2 -0
- package/applications/Components/drawUtils.d.ts +6 -1
- package/applications/Components/featureUtils.d.ts +9 -0
- package/applications/Components/fontUtils.d.ts +2 -0
- package/applications/Components/formatUtils.d.ts +2 -0
- package/applications/Components/getDefaultUnits.d.ts +2 -0
- package/applications/Components/imageryUtils.d.ts +135 -27
- package/applications/Components/layerOriginUtils.d.ts +5 -0
- package/applications/Components/layersEffectsJsonUtils.d.ts +2 -0
- package/applications/Components/previewSymbol2D.d.ts +2 -0
- package/applications/Components/reactiveUtils.d.ts +13 -9
- package/applications/Components/sanitizerUtils.d.ts +2 -0
- package/applications/Components/stringUtils.d.ts +5 -0
- package/applications/Components/styleUtils.d.ts +2 -0
- package/applications/Components/svgUtils.d.ts +4 -0
- package/applications/Components/testUtils.d.ts +3 -0
- package/applications/Components/viewUtils.d.ts +2 -0
- package/applications/Components/webStyleSymbolUtils.d.ts +2 -0
- package/applications/Excalibur/videoViewUtils.d.ts +19 -3
- package/applications/ExperienceBuilder/sketchUtils.d.ts +10 -1
- package/applications/KnowledgeStudio/dataModelVisualization.d.ts +2 -0
- package/applications/KnowledgeStudio/generalSdkInternalAccess.d.ts +33 -4
- package/applications/KnowledgeStudio/generalSharedKgUtils.d.ts +73 -10
- package/applications/KnowledgeStudio/layerInternalAccessUtils.d.ts +12 -1
- package/applications/KnowledgeStudio/reshape.d.ts +144 -28
- package/applications/KnowledgeStudio/resourceSerializationUtils.d.ts +17 -3
- package/applications/MapViewer/layerUtils.d.ts +2 -0
- package/applications/MapViewer/mediaUtils.d.ts +42 -8
- package/applications/MapViewer/templateUtils.d.ts +78 -16
- package/applications/PortalApp/layerUtils.d.ts +2 -0
- package/applications/SceneViewer/colorUtils.d.ts +2 -0
- package/applications/SceneViewer/devEnvironmentUtils.d.ts +3 -0
- package/applications/SceneViewer/layerUtils.d.ts +5 -3
- package/applications/SceneViewer/sceneViewerUtils.d.ts +52 -5
- package/applications/SceneViewer/symbolUtils.d.ts +2 -0
- package/applications/Urban/LineImagePattern3D.d.ts +8 -2
- package/applications/Urban/imagePatternUtils.d.ts +10 -2
- package/applications/Urban/meshUtils.d.ts +2 -0
- package/applications/WebEditor/sketchUtils.d.ts +24 -4
- 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/components/assets/icon/fileEsl16.json +1 -0
- package/assets/components/assets/icon/fileEsl24.json +1 -0
- package/assets/components/assets/icon/fileEsl32.json +1 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- 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/04958494022f82dca473.js +1 -0
- package/assets/esri/core/workers/chunks/0b7bbdc0d71ee6721751.js +2 -0
- package/assets/esri/core/workers/chunks/{5909a0e763fddc3542e7.js.LICENSE.txt → 0b7bbdc0d71ee6721751.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/0f8149fdcf0adeca268e.js +1 -0
- package/assets/esri/core/workers/chunks/{aa7a1705266eec353cb6.js → 0fc22ad791d3ec0a9c5e.js} +1 -1
- package/assets/esri/core/workers/chunks/10e474d664b20adcd917.js +1 -0
- package/assets/esri/core/workers/chunks/12f9a55253084a910b2e.js +1 -0
- package/assets/esri/core/workers/chunks/14dedd80fb797303f91f.js +1 -0
- package/assets/esri/core/workers/chunks/1a6d2f525dd30d08cf9b.js +1 -0
- package/assets/esri/core/workers/chunks/{81d89107ff82604a3ea0.js → 1b445981fbc8373f4dd8.js} +1 -1
- package/assets/esri/core/workers/chunks/{6ba3c2b9f699d94d62b8.js → 1ec1a1997b5577619040.js} +1 -1
- package/assets/esri/core/workers/chunks/204d738c8b651314ae64.js +1 -0
- package/assets/esri/core/workers/chunks/2085084324cd5a81783f.js +1 -0
- package/assets/esri/core/workers/chunks/{e95821a199e10b389e29.js → 25f3ee666f545a7a7993.js} +2 -2
- package/assets/esri/core/workers/chunks/{e95821a199e10b389e29.js.LICENSE.txt → 25f3ee666f545a7a7993.js.LICENSE.txt} +1 -1
- 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/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/36ecf951c0c7dad84b69.js +1 -0
- package/assets/esri/core/workers/chunks/37002a46f03a9fc5f644.js.LICENSE.txt +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/43e2c1d72cd9c8beed2f.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/45a9cd722e98dd1548ae.js +1 -0
- package/assets/esri/core/workers/chunks/4a060147d25929680ec8.js +1 -0
- package/assets/esri/core/workers/chunks/4bcd74951477e8977ba1.js +1 -0
- package/assets/esri/core/workers/chunks/4d0eaeb4cd6cd55e25fd.js +1 -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/59a45533e96cedf1c480.js +1 -0
- package/assets/esri/core/workers/chunks/{c2aeecd27e004c6cd7e1.js → 5b9f2aa3ba1bf12c3240.js} +2 -2
- package/assets/esri/core/workers/chunks/{c2aeecd27e004c6cd7e1.js.LICENSE.txt → 5b9f2aa3ba1bf12c3240.js.LICENSE.txt} +1 -1
- 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/61801bb8c7be8fe77086.js +1 -0
- package/assets/esri/core/workers/chunks/679cd6424e0e2d7f372b.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/6be530ab81291745485b.js.LICENSE.txt +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/73c416ae0ec5a1815591.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/75fd2ef1236a9364ca7f.js +1 -0
- package/assets/esri/core/workers/chunks/{23b623637126f8411a30.js → 7aec07f2482934259d12.js} +1 -1
- package/assets/esri/core/workers/chunks/7be9bbae23895d1cfa92.js +1 -0
- package/assets/esri/core/workers/chunks/{741d170187e58e81584d.js → 7d744554d14057d9b2b1.js} +1 -1
- 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/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/98f4b44eca91c42ca08e.js +1 -0
- package/assets/esri/core/workers/chunks/9ccabf8142fb5de4d3e2.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{dd99b77a7c0a052507bb.js → 9d88b4ba8e511da64583.js} +3 -3
- 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/aeb524eded012217a865.js +1 -0
- package/assets/esri/core/workers/chunks/b2a1e5e9182b643909eb.js +316 -0
- package/assets/esri/core/workers/chunks/{ac6f002cfad42e60de8f.js → b48033645091c91e0d88.js} +1 -1
- package/assets/esri/core/workers/chunks/b8988771bfa4e785ebd6.js +1 -0
- 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/c042269586921e337be9.js +1 -0
- package/assets/esri/core/workers/chunks/c623918e289a09905cd1.js +1 -0
- package/assets/esri/core/workers/chunks/c7391b0b5a9c916a53f7.js +1 -0
- package/assets/esri/core/workers/chunks/{ac83c2999a3d2ffb4356.js → c7838ac0db8570a2d2c1.js} +1 -1
- package/assets/esri/core/workers/chunks/c91ef3814e7f024043cf.js +1 -0
- package/assets/esri/core/workers/chunks/{43d28c6509c21b8917a8.js → ca7523c14d81c470e92e.js} +1 -1
- package/assets/esri/core/workers/chunks/cd2708fb7636b3ace229.js +1 -0
- package/assets/esri/core/workers/chunks/{310f3268582e61cd86da.js → d21480925a8bc9c7de96.js} +1 -1
- 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/d9ca754f51b9812bb179.js +1 -0
- package/assets/esri/core/workers/chunks/d9ef0b3341e2744d8f2f.js +1 -0
- package/assets/esri/core/workers/chunks/df4a0af329ce94a47a7b.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/e5aac523c37d906eece6.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/{f351007cdcd0938d3b6c.js → eeb24a4ab4993f1f4e8e.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/f25bebd2b6eb0d0f6626.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/f95e488d2b86e320624f.js +1 -0
- package/assets/esri/core/workers/chunks/{bfc063d4431bfa162160.js → fd09f38fb4d99bf34988.js} +1 -1
- package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
- package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
- package/assets/esri/libs/text/pkg/bundle_bg.wasm +0 -0
- package/chunks/boundedPlane.js +1 -1
- package/chunks/bundle2.js +5 -0
- package/config.js +1 -1
- package/copyright.txt +70 -1
- package/core/BidiText.js +1 -1
- package/core/accessorSupport/ensureType.js +1 -1
- package/core/compilerUtils.js +1 -1
- package/core/typedArrayUtil.js +1 -1
- package/core/units.js +1 -1
- package/core/workers/loaderConfig.js +1 -1
- package/editing/sharedTemplates/SharedTemplate.js +1 -1
- package/geometry/support/FloatArray.js +1 -1
- package/geometry/support/Indices.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/rotate.js +1 -1
- package/interfaces.d.ts +23 -24
- package/kernel.js +1 -1
- package/layers/BingMapsLayer.d.ts +2 -3
- package/layers/BuildingSceneLayer.d.ts +3 -5
- package/layers/CatalogLayer.d.ts +2 -4
- package/layers/DimensionLayer.d.ts +2 -3
- package/layers/ElevationLayer.d.ts +2 -4
- package/layers/FeatureLayer.d.ts +2 -4
- package/layers/GaussianSplatLayer.d.ts +1 -3
- package/layers/GeoJSONLayer.d.ts +2 -3
- package/layers/GeoRSSLayer.d.ts +2 -3
- package/layers/GroupLayer.d.ts +2 -3
- package/layers/ImageryLayer.d.ts +2 -5
- package/layers/ImageryTileLayer.d.ts +3 -7
- package/layers/IntegratedMesh3DTilesLayer.d.ts +2 -4
- package/layers/IntegratedMeshLayer.d.ts +2 -4
- package/layers/KMLLayer.d.ts +2 -3
- package/layers/KnowledgeGraphLayer.d.ts +2 -4
- package/layers/LineOfSightLayer.d.ts +2 -3
- package/layers/LinkChartLayer.d.ts +2 -3
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/MapImageLayer.d.ts +2 -4
- package/layers/MapNotesLayer.d.ts +2 -3
- package/layers/MediaLayer.d.ts +3 -4
- package/layers/OGCFeatureLayer.d.ts +2 -3
- package/layers/ParquetLayer.d.ts +2 -3
- package/layers/PointCloudLayer.d.ts +2 -4
- package/layers/RouteLayer.d.ts +2 -3
- package/layers/SceneLayer.d.ts +2 -4
- package/layers/StreamLayer.d.ts +2 -4
- package/layers/SubtypeGroupLayer.d.ts +2 -4
- package/layers/TileLayer.d.ts +2 -4
- package/layers/UnknownLayer.d.ts +2 -3
- package/layers/UnsupportedLayer.d.ts +2 -3
- package/layers/VectorTileLayer.d.ts +2 -4
- package/layers/VideoLayer.d.ts +8 -9
- package/layers/ViewshedLayer.d.ts +2 -3
- package/layers/VoxelLayer.d.ts +2 -4
- package/layers/WCSLayer.d.ts +2 -4
- package/layers/WFSLayer.d.ts +2 -3
- package/layers/WMSLayer.d.ts +5 -6
- package/layers/WMTSLayer.d.ts +4 -5
- package/layers/WebTileLayer.d.ts +2 -3
- package/layers/buildingSublayers/BuildingGroupSublayer.d.ts +1 -1
- package/layers/buildingSublayers/BuildingSublayer.d.ts +3 -3
- package/layers/buildingSublayers/BuildingSublayer.js +1 -1
- package/layers/catalog/CatalogDynamicGroupLayer.d.ts +2 -3
- package/layers/catalog/CatalogFootprintLayer.d.ts +2 -3
- package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/graphics/data/QueryEngineResult.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/knowledgeGraph/KnowledgeGraphSublayer.d.ts +4 -6
- package/layers/{support/media.d.ts → media/types.d.ts} +9 -9
- package/layers/mixins/ArcGISImageService.d.ts +1 -1
- package/layers/mixins/ImageryTileMixin.d.ts +1 -1
- package/layers/orientedImagery/transformations/rectifyMapPoint.js +1 -1
- package/layers/raster/datasets/wcsCoverageParser.d.ts +1 -1
- package/layers/raster/functions/changeDetectionUtils.js +1 -1
- package/layers/raster/functions/creators/createLocalFunctions.d.ts +1 -1
- 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/raster/functions/types.d.ts +1 -1
- package/layers/{support/RasterTypes.d.ts → raster/types.d.ts} +2 -2
- package/layers/save/featureLayerUtils.js +1 -1
- package/layers/support/ElevationQuery.d.ts +2 -2
- package/layers/support/ElevationSampler.js +1 -1
- package/layers/support/FeatureType.d.ts +2 -2
- package/layers/support/Field.d.ts +2 -3
- package/layers/support/FieldConfiguration.d.ts +1 -1
- package/layers/support/ImageElement.d.ts +3 -3
- package/layers/support/LocalMediaElementSource.d.ts +1 -1
- package/layers/support/MediaElementBase.d.ts +4 -7
- package/layers/support/PixelBlock.d.ts +1 -1
- package/layers/support/RasterFunction.d.ts +1 -1
- package/layers/support/RasterInfo.d.ts +1 -1
- package/layers/support/Sublayer.d.ts +2 -3
- package/layers/support/Subtype.d.ts +2 -2
- package/layers/support/SubtypeSublayer.d.ts +2 -3
- package/layers/support/SubtypeSublayer.js +1 -1
- package/layers/support/VideoElement.d.ts +2 -2
- package/layers/support/WMSSublayer.d.ts +6 -6
- package/layers/support/WMSSublayer.js +1 -1
- package/layers/support/domains.js +1 -1
- package/layers/support/rasterFunctionUtils.d.ts +1 -1
- package/layers/support/tiles3DUtils.js +1 -1
- package/layers/support/types.d.ts +33 -1
- package/layers/types.d.ts +17 -2
- package/layers/wmts/types.d.ts +2 -0
- package/libs/text/loadTextModule.js +5 -0
- package/linkChart/LinkChartProperties.d.ts +4 -6
- package/linkChart/LinkChartProperties.js +1 -1
- package/networks/Network.d.ts +2 -4
- package/networks/support/NamedTraceConfiguration.d.ts +3 -3
- package/networks/support/NamedTraceConfiguration.js +1 -1
- package/networks/support/TopologyValidationJobInfo.js +1 -1
- package/networks/support/TraceJobInfo.js +1 -1
- package/package.json +3 -3
- package/popup/FieldInfo.d.ts +1 -1
- package/renderers/support/RasterSymbolizer.js +1 -1
- package/renderers/support/rendererConversion.js +1 -1
- package/renderers/visualVariables/support/visualVariableUtils.js +1 -1
- package/request/process.js +1 -1
- package/rest/geometryService/types.d.ts +59 -0
- package/rest/geometryService.d.ts +3 -5
- package/rest/query/operations/pbfDehydratedFeatureSet.js +1 -1
- package/rest/query/operations/query.js +1 -1
- package/rest/query/support/AttachmentInfo.d.ts +2 -2
- package/rest/support/AlgorithmicColorRamp.d.ts +2 -2
- package/rest/support/BinParametersBase.d.ts +2 -2
- package/rest/support/BinParametersBase.js +1 -1
- package/rest/support/DateBinTimeInterval.d.ts +1 -1
- package/rest/support/GeneralizeParameters.d.ts +1 -1
- package/rest/support/ImageSampleParameters.d.ts +1 -1
- package/rest/support/JobInfo.js +1 -1
- package/rest/support/PrintTemplate.d.ts +4 -6
- package/rest/support/ServiceAreaParameters.js +1 -1
- package/rest/support/types.d.ts +17 -1
- package/smartMapping/heuristics/sizeRange.js +1 -1
- package/smartMapping/renderers/support/utils.js +1 -1
- package/smartMapping/statistics/support/statsWorker.js +1 -1
- package/smartMapping/statistics/support/utils.js +1 -1
- 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/adapters/support/utils.js +1 -1
- package/smartMapping/support/utils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/WebStyleSymbol.d.ts +0 -24
- package/symbols/WebStyleSymbol.js +1 -1
- 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/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/engine/imagery/RasterVFDisplayObject.js +1 -1
- package/views/2d/engine/vectorTiles/VectorTile.js +1 -1
- package/views/2d/engine/vectorTiles/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/engine/webgl/GlyphMosaic.js +1 -1
- package/views/2d/engine/webgl/GlyphSDFCreator.js +5 -0
- package/views/2d/engine/webgl/GlyphSource.js +1 -1
- package/views/2d/engine/webgl/TextureManager.js +1 -1
- package/views/2d/engine/webgl/TextureUploadManager.js +1 -1
- package/views/2d/engine/webgl/definitions.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/constants.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.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 +3 -6
- package/views/2d/layers/BaseLayerViewGL2D.d.ts +3 -6
- package/views/2d/layers/FeatureLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/features/sources/strategies/support/queryAdapters.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderPBF.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/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/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/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/I3SMeshView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/PointCloudLayerView3D.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/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/buffer/glUtil.js +1 -1
- package/views/3d/support/engineContent/sdfPrimitives.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/ComponentObjectCollection.js +1 -1
- package/views/3d/webgl-engine/collections/Component/IntersectionGeometry.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentData.glsl.js +8 -8
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.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/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/ManagedTexture.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeProcessingWorker.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeWorkerHandle.js +1 -1
- 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/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/VideoView.d.ts +2 -3
- package/views/VideoView.js +1 -1
- package/views/View2D.d.ts +2 -3
- 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/draw/Draw.js +1 -1
- package/views/input/ViewEvents.js +1 -1
- package/views/interactive/editGeometry/EditGeometry.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/MediaLayerViewMixin.d.ts +1 -1
- package/views/support/PromiseQueue.js +1 -1
- package/views/support/screenUtils.js +1 -1
- package/views/support/screenshotUtils.js +1 -1
- package/views/types.d.ts +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/applicationProperties/SearchLayerField.d.ts +1 -1
- package/webdoc/applicationProperties/SearchTableField.d.ts +1 -1
- package/webscene/Slide.d.ts +2 -2
- package/webscene/spec-certification/api.js +1 -1
- package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
- package/widgets/BatchAttributeForm/inputs/FieldInput.d.ts +1 -1
- package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
- package/widgets/BatchAttributeForm/templates/support/hashElementTemplate.js +1 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/Editor/components/PendingFeatureList.js +1 -1
- package/widgets/Editor/components/workflowAdapters/pendingFeatureList/{CreateFeaturesWorkflowPendingFeatureListAdapter.ts.js → CreateFeaturesWorkflowPendingFeatureListAdapter.js} +1 -1
- package/widgets/Editor/types.d.ts +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Feature.d.ts +3 -5
- package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
- package/widgets/FeatureForm/FieldInput.d.ts +2 -2
- package/widgets/FeatureForm/featureFormUtils.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/FeatureTemplates/FeatureTemplatesViewModel.d.ts +1 -1
- package/widgets/FeatureTemplates/TemplateItem.d.ts +1 -1
- package/widgets/FeatureTemplates/types.d.ts +1 -1
- package/widgets/Features.d.ts +3 -5
- package/widgets/Print/CustomTemplate.d.ts +3 -4
- package/widgets/Print/TemplateOptions.d.ts +3 -4
- package/widgets/Print/types.d.ts +3 -4
- package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
- package/widgets/Sketch/support/OperationHandle.js +1 -1
- package/widgets/TimeSlider.js +1 -1
- package/widgets/VideoPlayer/VideoPlayerViewModel.d.ts +1 -1
- package/widgets/support/SelectionList/GroupLayerItem.js +1 -1
- package/widgets/support/dateUtils.js +1 -1
- package/assets/esri/core/workers/chunks/0099f4729c94c779ba35.js +0 -1
- package/assets/esri/core/workers/chunks/058fb2cd6387acfd458c.js +0 -1
- package/assets/esri/core/workers/chunks/0ae018098906d6a88904.js +0 -1
- package/assets/esri/core/workers/chunks/0dc3a04ce717b7ddd957.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/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/1ab98591d2f2bc604505.js +0 -1
- package/assets/esri/core/workers/chunks/1b838638e66e82d76cf3.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/22dd5cecc7e2d4d0baf8.js +0 -316
- 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/2a6231db5ee6cbfd59a5.js +0 -1
- package/assets/esri/core/workers/chunks/3371935a4fd6346d3a17.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/45b898367b6224dda46f.js +0 -1
- package/assets/esri/core/workers/chunks/4785cd108e2dec6e1697.js +0 -1
- package/assets/esri/core/workers/chunks/4d6d962d25aa836f53ee.js +0 -1
- package/assets/esri/core/workers/chunks/4f33a2ecb154a2c2449c.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/5909a0e763fddc3542e7.js +0 -2
- package/assets/esri/core/workers/chunks/5cee6c3ff23fb93f857a.js +0 -1
- package/assets/esri/core/workers/chunks/600e2e6b51e2fb9c598c.js +0 -1
- package/assets/esri/core/workers/chunks/6035daa65fc3ebf86515.js +0 -1
- package/assets/esri/core/workers/chunks/63b8cd7d5cafbaeed894.js +0 -1
- package/assets/esri/core/workers/chunks/6cb44cd319cb6c2539c8.js +0 -1
- package/assets/esri/core/workers/chunks/7033fa18b7dd7bd3e49c.js +0 -1
- package/assets/esri/core/workers/chunks/7306b5b66e738a281d83.js +0 -1
- package/assets/esri/core/workers/chunks/7694abe44d55dae8872d.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/964de713042f52d71e42.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/ad92427bf597a6e0a299.js +0 -1
- package/assets/esri/core/workers/chunks/b25a131c04092c3ab75d.js +0 -1
- package/assets/esri/core/workers/chunks/b285de471ca90f38ec25.js +0 -1
- package/assets/esri/core/workers/chunks/b8f83a272fc41765031d.js +0 -1
- package/assets/esri/core/workers/chunks/b9909264cfea68d5f2a1.js +0 -1
- package/assets/esri/core/workers/chunks/bb08359610a41e304b55.js +0 -1
- package/assets/esri/core/workers/chunks/bcf612eabe7577540953.js +0 -1
- package/assets/esri/core/workers/chunks/bfbbcaa1fb04f17fc869.js +0 -1
- package/assets/esri/core/workers/chunks/c02b09f16241db233103.js +0 -1
- package/assets/esri/core/workers/chunks/c3007b916ba933137709.js +0 -1
- package/assets/esri/core/workers/chunks/cc5c1887e6d7079e5fe3.js +0 -1
- package/assets/esri/core/workers/chunks/ce8f075c814a8378c00c.js +0 -1
- package/assets/esri/core/workers/chunks/cfe1506a443fc84a0b91.js +0 -1
- package/assets/esri/core/workers/chunks/d30cfc5fa302cc08d862.js +0 -1
- package/assets/esri/core/workers/chunks/d723619579cc8f5ef2cd.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/e69255e38ff200dda14b.js +0 -1
- package/assets/esri/core/workers/chunks/e705d041f6c1632bfbcc.js +0 -1
- package/assets/esri/core/workers/chunks/e85da52d9cc7d9396872.js +0 -1
- package/assets/esri/core/workers/chunks/ee186ddbb1eb5144a790.js +0 -1
- package/assets/esri/core/workers/chunks/f9370830051865a3435b.js +0 -1
- package/core/MultiOriginJSONSupport.d.ts +0 -13
- package/core/NumericIdentifiable.d.ts +0 -6
- package/core/ReadOnlyMultiOriginJSONSupport.d.ts +0 -6
- package/core/WriteableMultiOriginJSONMixin.d.ts +0 -6
- package/layers/knowledgeGraph/KnowledgeGraphSublayerBase.d.ts +0 -6
- package/layers/mixins/ArcGISService.d.ts +0 -6
- package/layers/mixins/RasterJobHandlerMixin.d.ts +0 -6
- package/layers/support/RasterFunctionProperties.d.ts +0 -2
- package/layers/support/domains.d.ts +0 -5
- package/layers/support/editableLayers.d.ts +0 -11
- package/layers/support/exifUtils.d.ts +0 -21
- package/layers/support/fieldFormatUtils.d.ts +0 -4
- package/layers/support/fieldType.d.ts +0 -2
- package/layers/support/layerUtils.d.ts +0 -4
- package/layers/support/wmtsUtils.d.ts +0 -2
- package/layers/video/videoUtils.d.ts +0 -5
- package/rest/geometryService/cut.d.ts +0 -7
- package/rest/geometryService/fromGeoCoordinateString.d.ts +0 -28
- package/rest/geometryService/toGeoCoordinateString.d.ts +0 -25
- package/rest/operations/generalize.d.ts +0 -3
- package/rest/support/DateBinUtils.d.ts +0 -2
- package/rest/support/colorRamps.d.ts +0 -6
- package/rest/support/fileFormat.d.ts +0 -4
- package/rest/support/layoutTemplate.d.ts +0 -2
- package/rest/support/reportTemplate.d.ts +0 -2
- package/views/2d/layers/LayerView2D.d.ts +0 -6
- package/views/Viewport2DBaseMixin.d.ts +0 -6
- package/views/analysis/ElevationProfile/ElevationProfileHoveredPointVisualization.js +0 -5
- package/views/layers/RefreshableLayerView.d.ts +0 -6
- package/widgets/Feature/support/FeatureContentMixin.d.ts +0 -6
- /package/layers/video/{IVideoController.d.ts → types.d.ts} +0 -0
- /package/layers/{support/wmsUtils.d.ts → wms/types.d.ts} +0 -0
|
@@ -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 t}from"tslib";import e from"../../request.js";import
|
|
5
|
+
import{__decorate as t}from"tslib";import e from"../../request.js";import{strict as s}from"../../core/jsonMap.js";import{createAbortError as r}from"../../core/promiseUtils.js";import{property as o,subclass as i}from"../../core/accessorSupport/decorators.js";import a from"../../rest/networks/support/ValidateNetworkTopologyResult.js";import{enumeration as n}from"../../core/accessorSupport/decorators/enumeration.js";const l=s()({Pending:"job-waiting",InProgress:"job-executing",Completed:"job-succeeded"});let d=class extends a{constructor(t){super(t),this.statusUrl=null,this.status=null,this.submissionTime=null,this.lastUpdatedTime=null,this._timer=void 0}destroy(){clearInterval(this._timer)}async checkJobStatus(t){const s={...t,query:{f:"json"}},{data:r}=await e(this.statusUrl,s);return this.read(r),this.editsResolver&&this.editsResolver.resolve({edits:null,addedFeatures:[],updatedFeatures:[],deletedFeatures:[],addedAttachments:[],updatedAttachments:[],deletedAttachments:[],exceededTransferLimit:!0,historicMoment:null}),this}async waitForJobCompletion(t={}){const{interval:e=1e3,statusCallback:s}=t;return new Promise((t,o)=>{this._clearTimer();const i=setInterval(()=>{this._timer||o(r()),this.checkJobStatus().then(e=>{const{status:r}=e;switch(this.status=r,r){case"job-succeeded":this._clearTimer(),t(this);break;case"job-waiting":case"job-executing":s&&s(this)}},t=>{this._clearTimer(),o(t)})},e);this._timer=i})}_clearTimer(){clearInterval(this._timer),this._timer=void 0}};t([o()],d.prototype,"editsResolver",void 0),t([o({type:String,json:{write:!0}})],d.prototype,"statusUrl",void 0),t([n(l)],d.prototype,"status",void 0),t([o({type:Date,json:{type:Number,write:{writer:(t,e)=>{e.submissionTime=t?t.getTime():null}}}})],d.prototype,"submissionTime",void 0),t([o({type:Date,json:{type:Number,write:{writer:(t,e)=>{e.lastUpdatedTime=t?t.getTime():null}}}})],d.prototype,"lastUpdatedTime",void 0),d=t([i("esri.networks.support.TopologyValidationJobInfo")],d);const c=d;export{c 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 t}from"tslib";import e from"../../request.js";import
|
|
5
|
+
import{__decorate as t}from"tslib";import e from"../../request.js";import{strict as s}from"../../core/jsonMap.js";import{createAbortError as r}from"../../core/promiseUtils.js";import{property as i,subclass as o}from"../../core/accessorSupport/decorators.js";import a from"../../rest/networks/support/TraceResult.js";import{enumeration as c}from"../../core/accessorSupport/decorators/enumeration.js";const n=s()({Pending:"job-waiting",InProgress:"job-executing",Completed:"job-succeeded"});let m=class extends a{constructor(t){super(t),this.statusUrl=null,this.status=null,this.submissionTime=null,this.lastUpdatedTime=null,this._timer=void 0}destroy(){clearInterval(this._timer)}async checkJobStatus(t){const s={...t,query:{f:"json"}},{data:r}=await e(this.statusUrl,s),i=r.traceResults?{...r.traceResults,...r}:r;return this.read(i),this}async waitForJobCompletion(t={}){const{interval:e=1e3,statusCallback:s}=t;return new Promise((t,i)=>{this._clearTimer();const o=setInterval(()=>{this._timer||i(r()),this.checkJobStatus().then(e=>{const{status:r}=e;switch(this.status=r,r){case"job-succeeded":this._clearTimer(),t(this);break;case"job-waiting":case"job-executing":s&&s(this)}},t=>{this._clearTimer(),i(t)})},e);this._timer=o})}_clearTimer(){clearInterval(this._timer),this._timer=void 0}};t([i({type:String,json:{write:!0}})],m.prototype,"statusUrl",void 0),t([c(n)],m.prototype,"status",void 0),t([i({type:Date,json:{type:Number,write:{writer:(t,e)=>{e.submissionTime=t?t.getTime():null}}}})],m.prototype,"submissionTime",void 0),t([i({type:Date,json:{type:Number,write:{writer:(t,e)=>{e.lastUpdatedTime=t?t.getTime():null}}}})],m.prototype,"lastUpdatedTime",void 0),m=t([o("esri.networks.support.TraceJobInfo")],m);export{m as default};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/core",
|
|
3
|
-
"version": "5.0.0-next.
|
|
3
|
+
"version": "5.0.0-next.68",
|
|
4
4
|
"homepage": "https://js.arcgis.com",
|
|
5
5
|
"description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
|
|
6
6
|
"keywords": [
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"license": "SEE LICENSE IN copyright.txt",
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@amcharts/amcharts5": "~5.14.4",
|
|
22
|
-
"@arcgis/toolkit": "^5.0.0-next.
|
|
22
|
+
"@arcgis/toolkit": "^5.0.0-next.90",
|
|
23
23
|
"@esri/arcgis-html-sanitizer": "~4.1.0",
|
|
24
|
-
"@esri/calcite-components": "^5.0.0-next.
|
|
24
|
+
"@esri/calcite-components": "^5.0.0-next.28",
|
|
25
25
|
"@vaadin/grid": "~24.9.6",
|
|
26
26
|
"@zip.js/zip.js": "~2.8.11",
|
|
27
27
|
"luxon": "~3.7.2",
|
package/popup/FieldInfo.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type FieldInfoFormat from "./support/FieldInfoFormat.js";
|
|
2
2
|
import type { ClonableMixin, ClonableMixinProperties } from "../core/Clonable.js";
|
|
3
3
|
import type { JSONSupport, JSONSupportMixinProperties } from "../core/JSONSupport.js";
|
|
4
|
-
import type { FieldFormatUnion } from "../layers/support/
|
|
4
|
+
import type { FieldFormatUnion } from "../layers/support/types.js";
|
|
5
5
|
import type { NumberFieldFormatProperties } from "../layers/support/NumberFieldFormat.js";
|
|
6
6
|
import type { DateTimeFieldFormatProperties } from "../layers/support/DateTimeFieldFormat.js";
|
|
7
7
|
import type { FieldInfoFormatProperties } from "./support/FieldInfoFormat.js";
|
|
@@ -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"../../core/has.js";import{JSONSupport as t}from"../../core/JSONSupport.js";import r from"../../core/Logger.js";import{property as s,subclass as a}from"../../core/accessorSupport/decorators.js";import{getPixelValueRange as o}from"../../layers/raster/formats/pixelRangeUtils.js";import{colorize as n,remapColor as i,lookupPixels as l,createColormapLUT as u,isValidPixelBlock as c}from"../../layers/raster/functions/pixelUtils.js";import{stretch as p,getStretchCutoff as d,isStandardU8Histogram as m,createStretchLUT as h,computeGammaValues as f,createHistogramEqualizationLUT as b}from"../../layers/raster/functions/stretchUtils.js";import{hillshade as g,tintHillshade as y,calculateHillshadeParams as x}from"../../layers/raster/functions/surfaceUtils.js";import S from"../../layers/support/RasterInfo.js";import{convertColorRampToColormap as R,createHsvMap as I}from"./colorRampUtils.js";import{isUVRendererSupported as C,isColormapSupportedByWebGL as k,isColormapRendererSupported as L,isShadedReliefRendererSupported as _}from"./rasterRendererChecks.js";let O=class extends t{constructor(e){super(e),this.lookup={rendererJSON:{}},this.canRenderInWebGL=!1}bind(){const{rendererJSON:e}=this;if(!e)return{success:!1};let t;switch(this.lookup={rendererJSON:{}},e.type){case"uniqueValue":t=this._updateUVRenderer(e);break;case"rasterColormap":t=this._updateColormapRenderer(e);break;case"rasterStretch":t=this._updateStretchRenderer(e);break;case"classBreaks":t=this._updateClassBreaksRenderer(e);break;case"rasterShadedRelief":t=this._updateShadedReliefRenderer(e);break;case"vectorField":t=this._updateVectorFieldRenderer();break;case"flowRenderer":t=this._updateFlowRenderer()}return t}symbolize(e){let t=e?.pixelBlock;if(!T(t))return t;if(e.simpleStretchParams&&"rasterStretch"===this.rendererJSON.type)return this.simpleStretch(t,e.simpleStretchParams);try{let r;switch(t.pixels.length>3&&(t=t.extractBands(e.bandIds??[0,1,2])),this.rendererJSON.type){case"uniqueValue":case"rasterColormap":r=this._symbolizeColormap(t);break;case"classBreaks":r=this._symbolizeClassBreaks(t);break;case"rasterStretch":r=this._symbolizeStretch(t,e.bandIds);break;case"rasterShadedRelief":{const s=e.extent,a=s.spatialReference.isGeographic,o={x:(s.xmax-s.xmin)/t.width,y:(s.ymax-s.ymin)/t.height};r=this._symbolizeShadedRelief(t,{isGCS:a,resolution:o});break}}return r}catch(s){return r.getLogger(this).error("symbolize",s.message),t}}simpleStretch(e,t){if(!T(e))return e;try{return e.pixels.length>3&&(e=e.extractBands([0,1,2])),p(e,{...t,isRenderer:!0})}catch(s){return r.getLogger(this).error("symbolize",s.message),e}}generateWebGLParameters(e){const{rendererJSON:t}=this;switch(t.type){case"uniqueValue":case"rasterColormap":case"classBreaks":return this._generateColormapWebGLParams("classBreaks"===t.type);case"rasterStretch":return this._generateStretchWebGLParams(e.pixelBlock,t,e.bandIds);case"rasterShadedRelief":return this._generateShadedReliefWebGLParams(t,e.isGCS,e.resolution??void 0);case"vectorField":return this._generateVectorFieldWebGLParams(t);default:return null}}_isLUTChanged(e){const t=this.lookup.rendererJSON;if(!t)return!0;const{rendererJSON:r}=this;if("colorRamp"in r&&r.colorRamp){const s=r.colorRamp;if(e)return JSON.stringify(s)!==JSON.stringify(t.colorRamp)}return JSON.stringify(r)!==JSON.stringify(t)}_symbolizeColormap(e){if(this._isLUTChanged()){if(!this.bind().success)return e}return n(e,this.lookup.colormapLut)}_symbolizeClassBreaks(e){const{canUseIndexedLUT:t}=this._analyzeClassBreaks(this.rendererJSON);if(this._isLUTChanged()){if(!this.bind().success)return e}return t?n(e,this.lookup.colormapLut):i(e,this.lookup.remapLut??[])}_symbolizeStretch(e,t){if(!e)return null;const{rasterInfo:r,lookup:s}=this,{pixelType:a,bandCount:o}=r,i=this.rendererJSON,u=["u8","u16","s8","s16"].includes(a);let c;const{dra:f}=i,{gamma:b}=s;if(f&&(t=null),"histogramEqualization"===i.stretchType){const a=f?null:s.histogramLut,o=d(i,{rasterInfo:r,pixelBlock:e,bandIds:t,returnHistogramLut:!a}),n="u8"===r.pixelType&&!f&&m(r.histograms?.[0])?e:p(e,{...o,gamma:b,isRenderer:!0});c=l(n,{lut:f?o.histogramLut:t?.length?t.map(e=>a[e]):a,offset:0})}else if(u){let n;if(f){const s=d(i,{rasterInfo:r,pixelBlock:e,bandIds:t});n=h({pixelType:a,...s,gamma:b,rounding:"floor"})}else{if(this._isLUTChanged()){if(!this.bind().success)return e}n=s.stretchLut}if(!n)return e;o>1&&null!=t&&t.length===e?.pixels.length&&n.lut.length===o&&(n={lut:t.map(e=>n.lut[e]),offset:n.offset}),c=l(e,n)}else{const s=d(i,{rasterInfo:r,pixelBlock:e,bandIds:t});c=p(e,{...s,gamma:b,isRenderer:!0})}if(i.colorRamp){if(this._isLUTChanged(!0)){if(!this.bind().success)return e}c=n(c,s.colormapLut)}return c}_symbolizeShadedRelief(e,t){const r=this.rendererJSON,s={...r,...t},a=g(e,s);if(!r.colorRamp)return a;if(this._isLUTChanged(!0)){if(!this.bind().success)return a}const{hsvMap:o}=this.lookup;if(!o)return a;const n=this.rasterInfo.statistics?.[0]??{min:0,max:8e3};return y(a,e,o,n),a}_isVectorFieldData(){const{bandCount:e,dataType:t}=this.rasterInfo;return 2===e&&("vector-magdir"===t||"vector-uv"===t)}_updateVectorFieldRenderer(){return this._isVectorFieldData()?{success:!0}:{success:!1,error:`Unsupported data type "${this.rasterInfo.dataType}"; VectorFieldRenderer only supports "vector-magdir" and "vector-uv".`}}_updateFlowRenderer(){return this._isVectorFieldData()?{success:!0}:{success:!1,error:`Unsupported data type "${this.rasterInfo.dataType}"; FlowRenderer only supports "vector-magdir" and "vector-uv".`}}_updateUVRenderer(e){const{bandCount:t,attributeTable:r,pixelType:s}=this.rasterInfo,a=e.field1;if(!a)return{success:!1,error:"Unsupported renderer; missing UniqueValueRenderer.field."};const o=e.defaultSymbol,n=1===t&&["u8","s8"].includes(s);if(!C(this.rasterInfo,a)&&!n)return{success:!1,error:"Unsupported data; UniqueValueRenderer is only supported on single band data with a valid raster attribute table."};const i=[];if(null!=r){const t=r.fields.find(e=>"value"===e.name.toLowerCase());if(!t)return{success:!1,error:"Unsupported data; the data's raster attribute table does not have a value field."};r.features.forEach(r=>{const s=e.uniqueValueInfos?.find(e=>String(e.value)===String(r.attributes[a])),n=s?.symbol?.color;n?i.push([r.attributes[t.name]].concat(n)):o&&i.push([r.attributes[t.name]].concat(o.color))})}else{if("value"!==a.toLowerCase())return{success:!1,error:'Unsupported renderer; UniqueValueRenderer.field must be "Value" when raster attribute table is not available.'};e.uniqueValueInfos?.forEach(e=>{const t=e?.symbol?.color;t?i.push([parseInt(""+e.value,10)].concat(t)):o&&i.push([parseInt(""+e.value,10)].concat(o?.color))})}if(0===i.length)return{success:!1,error:"Invalid UniqueValueRenderer. Cannot find matching records in the raster attribute table."};const l=u({colormap:i});return this.lookup={rendererJSON:e,colormapLut:l},this.canRenderInWebGL=k(l?.indexedColormap),{success:!0}}_updateColormapRenderer(e){if(!L(this.rasterInfo))return{success:!1,error:"Unsupported data; the data source does not have a colormap."};const t=e.colormapInfos.map(e=>[e.value].concat(e.color)).sort((e,t)=>e[0]-t[0]);if(!t||0===t.length)return{success:!1,error:"Unsupported renderer; ColormapRenderer must have meaningful colormapInfos."};const r=u({colormap:t});return this.lookup={rendererJSON:e,colormapLut:r},this.canRenderInWebGL=k(r?.indexedColormap),{success:!0}}_updateShadedReliefRenderer(e){if(!_(this.rasterInfo))return{success:!1,error:`Unsupported data type "${this.rasterInfo.dataType}"; ShadedReliefRenderer only supports "elevation", or single band float/s16 data.`};if(e.colorRamp){const t=R(e.colorRamp,{interpolateAlpha:!0}),r=u({colormap:t}),s=I(r.indexedColormap);this.lookup={rendererJSON:e,colormapLut:r,hsvMap:s}}else this.lookup={rendererJSON:e};return this.canRenderInWebGL=!0,{success:!0}}_analyzeClassBreaks(e){const{attributeTable:t,pixelType:r}=this.rasterInfo,s=t?.fields.find(e=>"value"===e.name.toLowerCase()),a=t?.fields.find(t=>t.name.toLowerCase()===e.field.toLowerCase()),o=null!=s&&null!==a;return{canUseIndexedLUT:["u8","u16","s8","s16"].includes(r)||o,tableValueField:s,tableBreakField:a}}_updateClassBreaksRenderer(e){const{attributeTable:t}=this.rasterInfo,{canUseIndexedLUT:r,tableValueField:s,tableBreakField:a}=this._analyzeClassBreaks(e),n=e.classBreakInfos;if(!n?.length)return{success:!1,error:"Unsupported renderer; missing or invalid ClassBreaksRenderer.classBreakInfos."};const i=n.sort((e,t)=>e.classMaxValue-t.classMaxValue),l=i[i.length-1];let c=e.minValue;if(!r){const t=[];for(let e=0;e<i.length;e++)t.push({value:i[e].classMinValue??c,mappedColor:i[e].symbol.color}),c=i[e].classMaxValue;return t.push({value:l.classMaxValue,mappedColor:l.symbol.color}),this.lookup={rendererJSON:e,remapLut:t},this.canRenderInWebGL=!1,{success:!0}}const p=[];if(null!=t&&null!=s&&null!==a&&s!==a){const r=s.name,o=a.name,n=i[i.length-1],{classMaxValue:l}=n;c=e.minValue;for(const e of t.features){const t=e.attributes[r],s=e.attributes[o],a=s===l?n:s<c?null:i.find(({classMaxValue:e})=>e>s);a&&p.push([t].concat(a.symbol.color))}}else{const[t,r]=o(this.rasterInfo.pixelType);c=Math.max(t,Math.floor(e.minValue));for(let e=0;e<i.length;e++){const t=i[e],s=Math.min(r,Math.ceil(t.classMaxValue));for(let e=c;e<s;e++)p.push([e].concat(t.symbol.color));c=s}l.classMaxValue!==c&&c!==r||p.push([c].concat(l.symbol.color))}const d=u({colormap:p,fillUnspecified:!1});return this.lookup={rendererJSON:e,colormapLut:d},this.canRenderInWebGL=k(d?.indexedColormap),{success:!0}}_updateStretchRenderer(e){let{stretchType:t,dra:r}=e;if(!("none"===t||e.statistics?.length||v(this.rasterInfo.statistics)||r))return{success:!1,error:"Unsupported renderer; StretchRenderer.customStatistics is required when dynamic range adjustment is not used."};const s=e.histograms||this.rasterInfo.histograms;!V(e.stretchType)||s?.length||r||(t="minMax");const{computeGamma:a,useGamma:o,colorRamp:n}=e;let{gamma:i}=e;if(o&&a&&!i?.length){const t=e.statistics?.length?e.statistics:this.rasterInfo.statistics;i=f(this.rasterInfo.pixelType,t)}const l=this.rasterInfo.pixelType,c=!r&&["u8","u16","s8","s16"].includes(l);if("histogramEqualization"===t){const t=s.map(e=>b(e));this.lookup={rendererJSON:e,histogramLut:t}}else if(c){const t=d(e,{rasterInfo:this.rasterInfo}),r=h({pixelType:l,...t,gamma:o?i:null,rounding:"floor"});this.lookup={rendererJSON:e,stretchLut:r}}else this.lookup={rendererJSON:e};if(n&&!U(n)){const t=R(n,{interpolateAlpha:!0});this.lookup.colormapLut=u({colormap:t}),this.lookup.rendererJSON=e}return this.lookup.gamma=o&&i?.length?i:null,this.canRenderInWebGL="histogramEqualization"!==t,{success:!0}}_generateColormapWebGLParams(e){const{indexedColormap:t,offset:r}=this.lookup.colormapLut||{};return{colormap:t,colormapOffset:r,isClassBreaks:e,type:"lut"}}_generateStretchWebGLParams(e,t,r){const{colormapLut:s}=this.lookup,a=t.colorRamp?s?.indexedColormap:null,o=t.colorRamp?s?.offset:null;"histogramEqualization"===t.stretchType&&(t={...t,stretchType:"minMax"});const{gamma:n}=this.lookup,i=!(!t.useGamma||!n?.some(e=>1!==e));let l=0;null!=e&&(l=e.getPlaneCount(),2===l&&((e=e.clone()).statistics=[e.statistics[0]],e.pixels=[e.pixels[0]]));const{bandCount:u}=this.rasterInfo,c=Math.min(3,r?.length||l||u,u),p=a||i?1:255,m=new Float32Array(c);if(i&&n)for(let d=0;d<c;d++)n[d]>1?n[d]>2?m[d]=6.5+(n[d]-2)**2.5:m[d]=6.5+100*(2-n[d])**4:m[d]=1;const h=i&&n?[n[0],n[1]??n[0],n[2]??n[0]]:[1,1,1],f=i?[m[0],m[1]??m[0],m[2]??m[0]]:[1,1,1];if(t.dra&&null==e&&("minMax"===t.stretchType||"standardDeviation"===t.stretchType))return{bandCount:c,minOutput:(t.min??0)/p,maxOutput:(t.max??255)/p,minCutOff:[0,0,0],maxCutOff:[1,1,1],factor:[1,1,1],useGamma:i,gamma:h,gammaCorrection:f,colormap:a,colormapOffset:o,stretchType:t.stretchType,dynamicRangeAdjustment:t.dra,numberOfStandardDeviations:t.numberOfStandardDeviations??2,type:"stretch"};const{minCutOff:b,maxCutOff:g,minOutput:y,maxOutput:x}=d(t,{rasterInfo:this.rasterInfo,pixelBlock:e,bandIds:r});1===b.length&&(b[2]=b[1]=b[0]),1===g.length&&(g[2]=g[1]=g[0]);const S=g.map((e,t)=>g[t]===b[t]?0:(x-y)/(g[t]-b[t])/p);return{bandCount:c,minOutput:y/p,maxOutput:x/p,minCutOff:b,maxCutOff:g,factor:S,useGamma:i,gamma:h,gammaCorrection:f,colormap:a,colormapOffset:o,stretchType:t.stretchType,type:"stretch"}}_generateShadedReliefWebGLParams(e,t=!1,r={x:0,y:0}){const{colormapLut:s}=this.lookup,a=e.colorRamp?s?.indexedColormap:null,o=e.colorRamp?s?.offset:null,n={...e,isGCS:t,resolution:r},i=x(n),l=this.rasterInfo.statistics?.[0];return{...i,minValue:l?.min??0,maxValue:l?.max??8e3,hillshadeType:"traditional"===e.hillshadeType?0:1,type:"hillshade",colormap:a,colormapOffset:o}}_generateVectorFieldWebGLParams(e){const{style:t,inputUnit:r,outputUnit:s,visualVariables:a,symbolTileSize:o,flowRepresentation:n}=e,i=this.rasterInfo.statistics?.[0].min??0,l=this.rasterInfo.statistics?.[0].max??50,u=a?.find(e=>"sizeInfo"===e.type)??{maxDataValue:l,maxSize:.8*o,minDataValue:i,minSize:.2*o},c=u.minDataValue??i,p=u.maxDataValue??l,d=null!=u.maxSize&&null!=u.minSize?[u.minSize/o,u.maxSize/o]:[.2,.8];if("wind_speed"===t){const e=(d[0]+d[1])/2;d[0]=d[1]=e}const m=null!=c&&null!=p?[c,p]:null;let h=null;if("classified_arrow"===t)if(null!=c&&null!=p&&null!=u){h=[];const e=(u.maxDataValue-u.minDataValue)/5;for(let t=0;t<6;t++)h.push(u.minDataValue+e*t)}else h=[0,1e-6,3.5,7,10.5,14];const f="flow_to"===n===("ocean_current_kn"===t||"ocean_current_m"===t)?0:Math.PI,b=a?.find(e=>"rotationInfo"===e.type);return{breakValues:h,dataRange:m,inputUnit:r,outputUnit:s,symbolTileSize:o,symbolPercentRange:d,style:t||"single_arrow",rotation:f,rotationType:this.rasterInfo.storageInfo?.tileInfo&&"vector-uv"===this.rasterInfo.dataType?"geographic":b?.rotationType||e.rotationType,type:"vectorField"}}};function V(e){return"percentClip"===e||"histogramEqualization"===e}function v(e){return null!=e&&e.length>0&&null!=e[0].min&&null!=e[0].max}function T(e){return c(e)&&0!==e.validPixelCount}function U(e){return"algorithmic"===e.type&&["0,0,0,255","0,0,0"].includes(e.fromColor.join(","))&&["255,255,255,255","255,255,255"].includes(e.toColor.join(","))}e([s({json:{write:!0}})],O.prototype,"rendererJSON",void 0),e([s({type:S,json:{write:!0}})],O.prototype,"rasterInfo",void 0),e([s({json:{write:!0}})],O.prototype,"lookup",void 0),e([s()],O.prototype,"canRenderInWebGL",void 0),O=e([a("esri.renderers.support.RasterSymbolizer")],O);export{O as default};
|
|
5
|
+
import{__decorate as e}from"tslib";import{JSONSupport as t}from"../../core/JSONSupport.js";import r from"../../core/Logger.js";import{property as s,subclass as a}from"../../core/accessorSupport/decorators.js";import{getPixelValueRange as o}from"../../layers/raster/formats/pixelRangeUtils.js";import{colorize as n,remapColor as i,lookupPixels as l,createColormapLUT as u,isValidPixelBlock as c}from"../../layers/raster/functions/pixelUtils.js";import{stretch as p,getStretchCutoff as d,isStandardU8Histogram as m,createStretchLUT as h,computeGammaValues as f,createHistogramEqualizationLUT as b}from"../../layers/raster/functions/stretchUtils.js";import{hillshade as g,tintHillshade as y,calculateHillshadeParams as x}from"../../layers/raster/functions/surfaceUtils.js";import S from"../../layers/support/RasterInfo.js";import{convertColorRampToColormap as R,createHsvMap as I}from"./colorRampUtils.js";import{isUVRendererSupported as C,isColormapSupportedByWebGL as k,isColormapRendererSupported as L,isShadedReliefRendererSupported as _}from"./rasterRendererChecks.js";let O=class extends t{constructor(e){super(e),this.lookup={rendererJSON:{}},this.canRenderInWebGL=!1}bind(){const{rendererJSON:e}=this;if(!e)return{success:!1};let t;switch(this.lookup={rendererJSON:{}},e.type){case"uniqueValue":t=this._updateUVRenderer(e);break;case"rasterColormap":t=this._updateColormapRenderer(e);break;case"rasterStretch":t=this._updateStretchRenderer(e);break;case"classBreaks":t=this._updateClassBreaksRenderer(e);break;case"rasterShadedRelief":t=this._updateShadedReliefRenderer(e);break;case"vectorField":t=this._updateVectorFieldRenderer();break;case"flowRenderer":t=this._updateFlowRenderer()}return t}symbolize(e){let t=e?.pixelBlock;if(!T(t))return t;if(e.simpleStretchParams&&"rasterStretch"===this.rendererJSON.type)return this.simpleStretch(t,e.simpleStretchParams);try{let r;switch(t.pixels.length>3&&(t=t.extractBands(e.bandIds??[0,1,2])),this.rendererJSON.type){case"uniqueValue":case"rasterColormap":r=this._symbolizeColormap(t);break;case"classBreaks":r=this._symbolizeClassBreaks(t);break;case"rasterStretch":r=this._symbolizeStretch(t,e.bandIds);break;case"rasterShadedRelief":{const s=e.extent,a=s.spatialReference.isGeographic,o={x:(s.xmax-s.xmin)/t.width,y:(s.ymax-s.ymin)/t.height};r=this._symbolizeShadedRelief(t,{isGCS:a,resolution:o});break}}return r}catch(s){return r.getLogger(this).error("symbolize",s.message),t}}simpleStretch(e,t){if(!T(e))return e;try{return e.pixels.length>3&&(e=e.extractBands([0,1,2])),p(e,{...t,isRenderer:!0})}catch(s){return r.getLogger(this).error("symbolize",s.message),e}}generateWebGLParameters(e){const{rendererJSON:t}=this;switch(t.type){case"uniqueValue":case"rasterColormap":case"classBreaks":return this._generateColormapWebGLParams("classBreaks"===t.type);case"rasterStretch":return this._generateStretchWebGLParams(e.pixelBlock,t,e.bandIds);case"rasterShadedRelief":return this._generateShadedReliefWebGLParams(t,e.isGCS,e.resolution??void 0);case"vectorField":return this._generateVectorFieldWebGLParams(t);default:return null}}_isLUTChanged(e){const t=this.lookup.rendererJSON;if(!t)return!0;const{rendererJSON:r}=this;if("colorRamp"in r&&r.colorRamp){const s=r.colorRamp;if(e)return JSON.stringify(s)!==JSON.stringify(t.colorRamp)}return JSON.stringify(r)!==JSON.stringify(t)}_symbolizeColormap(e){if(this._isLUTChanged()){if(!this.bind().success)return e}return n(e,this.lookup.colormapLut)}_symbolizeClassBreaks(e){const{canUseIndexedLUT:t}=this._analyzeClassBreaks(this.rendererJSON);if(this._isLUTChanged()){if(!this.bind().success)return e}return t?n(e,this.lookup.colormapLut):i(e,this.lookup.remapLut??[])}_symbolizeStretch(e,t){if(!e)return null;const{rasterInfo:r,lookup:s}=this,{pixelType:a,bandCount:o}=r,i=this.rendererJSON,u=["u8","u16","s8","s16"].includes(a);let c;const{dra:f}=i,{gamma:b}=s;if(f&&(t=null),"histogramEqualization"===i.stretchType){const a=f?null:s.histogramLut,o=d(i,{rasterInfo:r,pixelBlock:e,bandIds:t,returnHistogramLut:!a}),n="u8"===r.pixelType&&!f&&m(r.histograms?.[0])?e:p(e,{...o,gamma:b,isRenderer:!0});c=l(n,{lut:f?o.histogramLut:t?.length?t.map(e=>a[e]):a,offset:0})}else if(u){let n;if(f){const s=d(i,{rasterInfo:r,pixelBlock:e,bandIds:t});n=h({pixelType:a,...s,gamma:b,rounding:"floor"})}else{if(this._isLUTChanged()){if(!this.bind().success)return e}n=s.stretchLut}if(!n)return e;o>1&&null!=t&&t.length===e?.pixels.length&&n.lut.length===o&&(n={lut:t.map(e=>n.lut[e]),offset:n.offset}),c=l(e,n)}else{const s=d(i,{rasterInfo:r,pixelBlock:e,bandIds:t});c=p(e,{...s,gamma:b,isRenderer:!0})}if(i.colorRamp){if(this._isLUTChanged(!0)){if(!this.bind().success)return e}c=n(c,s.colormapLut)}return c}_symbolizeShadedRelief(e,t){const r=this.rendererJSON,s={...r,...t},a=g(e,s);if(!r.colorRamp)return a;if(this._isLUTChanged(!0)){if(!this.bind().success)return a}const{hsvMap:o}=this.lookup;if(!o)return a;const n=this.rasterInfo.statistics?.[0]??{min:0,max:8e3};return y(a,e,o,n),a}_isVectorFieldData(){const{bandCount:e,dataType:t}=this.rasterInfo;return 2===e&&("vector-magdir"===t||"vector-uv"===t)}_updateVectorFieldRenderer(){return this._isVectorFieldData()?{success:!0}:{success:!1,error:`Unsupported data type "${this.rasterInfo.dataType}"; VectorFieldRenderer only supports "vector-magdir" and "vector-uv".`}}_updateFlowRenderer(){return this._isVectorFieldData()?{success:!0}:{success:!1,error:`Unsupported data type "${this.rasterInfo.dataType}"; FlowRenderer only supports "vector-magdir" and "vector-uv".`}}_updateUVRenderer(e){const{bandCount:t,attributeTable:r,pixelType:s}=this.rasterInfo,a=e.field1;if(!a)return{success:!1,error:"Unsupported renderer; missing UniqueValueRenderer.field."};const o=e.defaultSymbol,n=1===t&&["u8","s8"].includes(s);if(!C(this.rasterInfo,a)&&!n)return{success:!1,error:"Unsupported data; UniqueValueRenderer is only supported on single band data with a valid raster attribute table."};const i=[];if(null!=r){const t=r.fields.find(e=>"value"===e.name.toLowerCase());if(!t)return{success:!1,error:"Unsupported data; the data's raster attribute table does not have a value field."};r.features.forEach(r=>{const s=e.uniqueValueInfos?.find(e=>String(e.value)===String(r.attributes[a])),n=s?.symbol?.color;n?i.push([r.attributes[t.name]].concat(n)):o&&i.push([r.attributes[t.name]].concat(o.color))})}else{if("value"!==a.toLowerCase())return{success:!1,error:'Unsupported renderer; UniqueValueRenderer.field must be "Value" when raster attribute table is not available.'};e.uniqueValueInfos?.forEach(e=>{const t=e?.symbol?.color;t?i.push([parseInt(""+e.value,10)].concat(t)):o&&i.push([parseInt(""+e.value,10)].concat(o?.color))})}if(0===i.length)return{success:!1,error:"Invalid UniqueValueRenderer. Cannot find matching records in the raster attribute table."};const l=u({colormap:i});return this.lookup={rendererJSON:e,colormapLut:l},this.canRenderInWebGL=k(l?.indexedColormap),{success:!0}}_updateColormapRenderer(e){if(!L(this.rasterInfo))return{success:!1,error:"Unsupported data; the data source does not have a colormap."};const t=e.colormapInfos.map(e=>[e.value].concat(e.color)).sort((e,t)=>e[0]-t[0]);if(!t||0===t.length)return{success:!1,error:"Unsupported renderer; ColormapRenderer must have meaningful colormapInfos."};const r=u({colormap:t});return this.lookup={rendererJSON:e,colormapLut:r},this.canRenderInWebGL=k(r?.indexedColormap),{success:!0}}_updateShadedReliefRenderer(e){if(!_(this.rasterInfo))return{success:!1,error:`Unsupported data type "${this.rasterInfo.dataType}"; ShadedReliefRenderer only supports "elevation", or single band float/s16 data.`};if(e.colorRamp){const t=R(e.colorRamp,{interpolateAlpha:!0}),r=u({colormap:t}),s=I(r.indexedColormap);this.lookup={rendererJSON:e,colormapLut:r,hsvMap:s}}else this.lookup={rendererJSON:e};return this.canRenderInWebGL=!0,{success:!0}}_analyzeClassBreaks(e){const{attributeTable:t,pixelType:r}=this.rasterInfo,s=t?.fields.find(e=>"value"===e.name.toLowerCase()),a=t?.fields.find(t=>t.name.toLowerCase()===e.field.toLowerCase()),o=null!=s&&null!==a;return{canUseIndexedLUT:["u8","u16","s8","s16"].includes(r)||o,tableValueField:s,tableBreakField:a}}_updateClassBreaksRenderer(e){const{attributeTable:t}=this.rasterInfo,{canUseIndexedLUT:r,tableValueField:s,tableBreakField:a}=this._analyzeClassBreaks(e),n=e.classBreakInfos;if(!n?.length)return{success:!1,error:"Unsupported renderer; missing or invalid ClassBreaksRenderer.classBreakInfos."};const i=n.sort((e,t)=>e.classMaxValue-t.classMaxValue),l=i[i.length-1];let c=e.minValue;if(!r){const t=[];for(let e=0;e<i.length;e++)t.push({value:i[e].classMinValue??c,mappedColor:i[e].symbol.color}),c=i[e].classMaxValue;return t.push({value:l.classMaxValue,mappedColor:l.symbol.color}),this.lookup={rendererJSON:e,remapLut:t},this.canRenderInWebGL=!1,{success:!0}}const p=[];if(null!=t&&null!=s&&null!==a&&s!==a){const r=s.name,o=a.name,n=i[i.length-1],{classMaxValue:l}=n;c=e.minValue;for(const e of t.features){const t=e.attributes[r],s=e.attributes[o],a=s===l?n:s<c?null:i.find(({classMaxValue:e})=>e>s);a&&p.push([t].concat(a.symbol.color))}}else{const[t,r]=o(this.rasterInfo.pixelType);c=Math.max(t,Math.floor(e.minValue));for(let e=0;e<i.length;e++){const t=i[e],s=Math.min(r,Math.ceil(t.classMaxValue));for(let e=c;e<s;e++)p.push([e].concat(t.symbol.color));c=s}l.classMaxValue!==c&&c!==r||p.push([c].concat(l.symbol.color))}const d=u({colormap:p,fillUnspecified:!1});return this.lookup={rendererJSON:e,colormapLut:d},this.canRenderInWebGL=k(d?.indexedColormap),{success:!0}}_updateStretchRenderer(e){let{stretchType:t,dra:r}=e;if(!("none"===t||e.statistics?.length||v(this.rasterInfo.statistics)||r))return{success:!1,error:"Unsupported renderer; StretchRenderer.customStatistics is required when dynamic range adjustment is not used."};const s=e.histograms||this.rasterInfo.histograms;!V(e.stretchType)||s?.length||r||(t="minMax");const{computeGamma:a,useGamma:o,colorRamp:n}=e;let{gamma:i}=e;if(o&&a&&!i?.length){const t=e.statistics?.length?e.statistics:this.rasterInfo.statistics;i=f(this.rasterInfo.pixelType,t)}const l=this.rasterInfo.pixelType,c=!r&&["u8","u16","s8","s16"].includes(l);if("histogramEqualization"===t){const t=s.map(e=>b(e));this.lookup={rendererJSON:e,histogramLut:t}}else if(c){const t=d(e,{rasterInfo:this.rasterInfo}),r=h({pixelType:l,...t,gamma:o?i:null,rounding:"floor"});this.lookup={rendererJSON:e,stretchLut:r}}else this.lookup={rendererJSON:e};if(n&&!U(n)){const t=R(n,{interpolateAlpha:!0});this.lookup.colormapLut=u({colormap:t}),this.lookup.rendererJSON=e}return this.lookup.gamma=o&&i?.length?i:null,this.canRenderInWebGL="histogramEqualization"!==t,{success:!0}}_generateColormapWebGLParams(e){const{indexedColormap:t,offset:r}=this.lookup.colormapLut||{};return{colormap:t,colormapOffset:r,isClassBreaks:e,type:"lut"}}_generateStretchWebGLParams(e,t,r){const{colormapLut:s}=this.lookup,a=t.colorRamp?s?.indexedColormap:null,o=t.colorRamp?s?.offset:null;"histogramEqualization"===t.stretchType&&(t={...t,stretchType:"minMax"});const{gamma:n}=this.lookup,i=!(!t.useGamma||!n?.some(e=>1!==e));let l=0;null!=e&&(l=e.getPlaneCount(),2===l&&((e=e.clone()).statistics=[e.statistics[0]],e.pixels=[e.pixels[0]]));const{bandCount:u}=this.rasterInfo,c=Math.min(3,r?.length||l||u,u),p=a||i?1:255,m=new Float32Array(c);if(i&&n)for(let d=0;d<c;d++)n[d]>1?n[d]>2?m[d]=6.5+(n[d]-2)**2.5:m[d]=6.5+100*(2-n[d])**4:m[d]=1;const h=i&&n?[n[0],n[1]??n[0],n[2]??n[0]]:[1,1,1],f=i?[m[0],m[1]??m[0],m[2]??m[0]]:[1,1,1];if(t.dra&&null==e&&("minMax"===t.stretchType||"standardDeviation"===t.stretchType))return{bandCount:c,minOutput:(t.min??0)/p,maxOutput:(t.max??255)/p,minCutOff:[0,0,0],maxCutOff:[1,1,1],factor:[1,1,1],useGamma:i,gamma:h,gammaCorrection:f,colormap:a,colormapOffset:o,stretchType:t.stretchType,dynamicRangeAdjustment:t.dra,numberOfStandardDeviations:t.numberOfStandardDeviations??2,type:"stretch"};const{minCutOff:b,maxCutOff:g,minOutput:y,maxOutput:x}=d(t,{rasterInfo:this.rasterInfo,pixelBlock:e,bandIds:r});1===b.length&&(b[2]=b[1]=b[0]),1===g.length&&(g[2]=g[1]=g[0]);const S=g.map((e,t)=>g[t]===b[t]?0:(x-y)/(g[t]-b[t])/p);return{bandCount:c,minOutput:y/p,maxOutput:x/p,minCutOff:b,maxCutOff:g,factor:S,useGamma:i,gamma:h,gammaCorrection:f,colormap:a,colormapOffset:o,stretchType:t.stretchType,type:"stretch"}}_generateShadedReliefWebGLParams(e,t=!1,r={x:0,y:0}){const{colormapLut:s}=this.lookup,a=e.colorRamp?s?.indexedColormap:null,o=e.colorRamp?s?.offset:null,n={...e,isGCS:t,resolution:r},i=x(n),l=this.rasterInfo.statistics?.[0];return{...i,minValue:l?.min??0,maxValue:l?.max??8e3,hillshadeType:"traditional"===e.hillshadeType?0:1,type:"hillshade",colormap:a,colormapOffset:o}}_generateVectorFieldWebGLParams(e){const{style:t,inputUnit:r,outputUnit:s,visualVariables:a,symbolTileSize:o,flowRepresentation:n}=e,i=this.rasterInfo.statistics?.[0].min??0,l=this.rasterInfo.statistics?.[0].max??50,u=a?.find(e=>"sizeInfo"===e.type)??{maxDataValue:l,maxSize:.8*o,minDataValue:i,minSize:.2*o},c=u.minDataValue??i,p=u.maxDataValue??l,d=null!=u.maxSize&&null!=u.minSize?[u.minSize/o,u.maxSize/o]:[.2,.8];if("wind_speed"===t){const e=(d[0]+d[1])/2;d[0]=d[1]=e}const m=null!=c&&null!=p?[c,p]:null;let h=null;if("classified_arrow"===t)if(null!=c&&null!=p&&null!=u){h=[];const e=(u.maxDataValue-u.minDataValue)/5;for(let t=0;t<6;t++)h.push(u.minDataValue+e*t)}else h=[0,1e-6,3.5,7,10.5,14];const f="flow_to"===n===("ocean_current_kn"===t||"ocean_current_m"===t)?0:Math.PI,b=a?.find(e=>"rotationInfo"===e.type);return{breakValues:h,dataRange:m,inputUnit:r,outputUnit:s,symbolTileSize:o,symbolPercentRange:d,style:t||"single_arrow",rotation:f,rotationType:this.rasterInfo.storageInfo?.tileInfo&&"vector-uv"===this.rasterInfo.dataType?"geographic":b?.rotationType||e.rotationType,type:"vectorField"}}};function V(e){return"percentClip"===e||"histogramEqualization"===e}function v(e){return null!=e&&e.length>0&&null!=e[0].min&&null!=e[0].max}function T(e){return c(e)&&0!==e.validPixelCount}function U(e){return"algorithmic"===e.type&&["0,0,0,255","0,0,0"].includes(e.fromColor.join(","))&&["255,255,255,255","255,255,255"].includes(e.toColor.join(","))}e([s({json:{write:!0}})],O.prototype,"rendererJSON",void 0),e([s({type:S,json:{write:!0}})],O.prototype,"rasterInfo",void 0),e([s({json:{write:!0}})],O.prototype,"lookup",void 0),e([s()],O.prototype,"canRenderInWebGL",void 0),O=e([a("esri.renderers.support.RasterSymbolizer")],O);export{O 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{isSome as r}from"../../core/arrayUtils.js";import
|
|
5
|
+
import{isSome as r}from"../../core/arrayUtils.js";import e from"../../core/Error.js";import{defaultTo3DOptions as n,to3D as o}from"../../symbols/support/symbolConversion.js";function t(r){return null==r||"simple"===r.type||"unique-value"===r.type||"class-breaks"===r.type||"dictionary"===r.type||"heatmap"===r.type}function s(r,n){if(null==r)return null;if(!t(r))return new e("renderer-conversion-3d:unsupported-renderer",`Unsupported renderer of type '${r.type}'`,{renderer:r});switch(r.type){case"simple":return u(r,n);case"unique-value":return a(r,n);case"class-breaks":return i(r,n);case"dictionary":case"heatmap":return null}return null}function l(r,n){if(!n)return null;if(Array.isArray(n)||(n=[n]),n.length>0){const o=n.map(r=>r.details.symbol.type||r.details.symbol.declaredClass).filter(r=>!!r);o.sort();const t=new Array;return o.forEach((r,e)=>{0!==e&&r===o[e-1]||t.push(r)}),new e("renderer-conversion-3d:unsupported-symbols",`Renderer contains symbols (${t.join(", ")}) which are not supported in 3D`,{renderer:r,symbolErrors:n})}return null}function u(r,e){const t={...n,...e,cimFallbackEnabled:!0};return l(r,o(r.symbol,t).error)}function a(e,t){const s={...n,...t,cimFallbackEnabled:!0},u=e.uniqueValueInfos?.map(r=>o(r.symbol,s).error).filter(r),a=o(e.defaultSymbol,s);return a.error&&u?.unshift(a.error),l(e,u)}function i(e,t){const s={...n,...t,cimFallbackEnabled:!0},u=e.classBreakInfos.map(r=>o(r.symbol,s).error).filter(r),a=o(e.defaultSymbol,s);return a.error&&u.unshift(a.error),l(e,u)}export{t as isSupportedRenderer3D,s as validateTo3D};
|
|
@@ -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"../../../Color.js";import n from"../../../Graphic.js";import
|
|
5
|
+
import e from"../../../Color.js";import n from"../../../Graphic.js";import a from"../../../core/Logger.js";import{meterIn as i}from"../../support/lengthUtils.js";import{isValidNumber as t,isSizeVariable as r}from"./sizeVariableUtils.js";const l=()=>a.getLogger("esri.renderers.visualVariables.support.visualVariableUtils"),s=e=>l().warn(`The visualVariable should be an instance of esri.renderers.visualVariables.${e}`),o=()=>l().error("Use of arcade expressions requires an arcade context"),c=new n,u=Math.PI,f=/^\s*(return\s+)?\$view\.scale\s*(;)?\s*$/i;function p(n,a,i){const r="visualVariables"in n?n.visualVariables?.find(e=>"color"===e.type):n;if(!r)return;if("esri.renderers.visualVariables.ColorVariable"!==r.declaredClass)return void s("ColorVariable");const l="number"==typeof a,c=l?null:a,u=c?.attributes;let f=l?a:null;const p=r.field,{ipData:d,hasExpression:v}=r.cache;let m=r.cache.compiledFunc;if(!p&&!v){const e=r.stops;return e&&e[0]&&e[0].color}if("number"!=typeof f)if(v){if(null==i?.arcade)return void o();const e={viewingMode:i.viewingMode,scale:i.scale,spatialReference:i.spatialReference},n=i.arcade.arcadeUtils,a=n.getViewInfo(e),t=n.createExecContext(c,a,i.timeZone);if(!m){const e=n.createSyntaxTree(r.valueExpression);m=n.createFunction(e),r.cache.compiledFunc=m}f=n.executeFunction(m,t)}else u&&(f=u[p]);const h=r.normalizationField,b=null!=u&&null!=h?parseFloat(u[h]):void 0;if(null!=f&&(!h||l||!isNaN(b)&&0!==b)){t(b)&&!l&&(f/=b);const n=D(f,d);if(n){const a=n[0],t=n[1],l=a===t?r.stops[a].color:e.blendColors(r.stops[a].color,r.stops[t].color,n[2],null!=i?i.color:void 0);return new e(l)}}}function d(e,n,a){const i="visualVariables"in e?e.visualVariables?.find(e=>"opacity"===e.type):e;if(!i)return;if("esri.renderers.visualVariables.OpacityVariable"!==i.declaredClass)return void s("OpacityVariable");const r="number"==typeof n,l=r?null:n,c=l?.attributes;let u=r?n:null;const f=i.field,{ipData:p,hasExpression:d}=i.cache;let v=i.cache.compiledFunc;if(!f&&!d){const e=i.stops;return e&&e[0]&&e[0].opacity}if("number"!=typeof u)if(d){if(null==a?.arcade)return void o();const e={viewingMode:a.viewingMode,scale:a.scale,spatialReference:a.spatialReference},n=a.arcade.arcadeUtils,t=n.getViewInfo(e),r=n.createExecContext(l,t,a.timeZone);if(!v){const e=n.createSyntaxTree(i.valueExpression);v=n.createFunction(e),i.cache.compiledFunc=v}u=n.executeFunction(v,r)}else c&&(u=c[f]);const m=i.normalizationField,h=null!=c&&null!=m?parseFloat(c[m]):void 0;if(null!=u&&(!m||r||!isNaN(h)&&0!==h)){t(h)&&!r&&(u/=h);const e=D(u,p);if(e){const n=e[0],a=e[1];if(n===a)return i.stops[n].opacity;{const t=i.stops[n].opacity;return t+(i.stops[a].opacity-t)*e[2]}}}}function v(e,n,a){const i="visualVariables"in e?e.visualVariables?.find(e=>"rotation"===e.type):e;if(!i)return;if("esri.renderers.visualVariables.RotationVariable"!==i.declaredClass)return void s("RotationVariable");const t=i.axis||"heading",r="heading"===t&&"arithmetic"===i.rotationType?90:0,l="heading"===t&&"arithmetic"===i.rotationType?-1:1,c="number"==typeof n?null:n,u=c?.attributes,f=i.field,{hasExpression:p}=i.cache;let d=i.cache.compiledFunc,v=null;if(!f&&!p)return v;if(p){if(null==a?.arcade)return void o();const e={viewingMode:a.viewingMode,scale:a.scale,spatialReference:a.spatialReference},n=a.arcade.arcadeUtils,t=n.getViewInfo(e),r=n.createExecContext(c,t,a.timeZone);if(!d){const e=n.createSyntaxTree(i.valueExpression);d=n.createFunction(e),i.cache.compiledFunc=d}v=n.executeFunction(d,r)}else u&&(v=u[f]);return v="number"!=typeof v||isNaN(v)?null:r+l*v,v}function m(e,n,a){const i="number"==typeof n,r=i?null:n,l=r?.attributes;let s=i?n:null;const{isScaleDriven:c}=e.cache;let u=e.cache.compiledFunc;if(c){const n=null!=a?a.scale:void 0,i=null!=a?a.view:void 0;s=null==n||"3d"===i?h(e):n}else if(!i)switch(e.inputValueType){case"expression":{if(null==a?.arcade)return void o();const n={viewingMode:a.viewingMode,scale:a.scale,spatialReference:a.spatialReference},i=a.arcade.arcadeUtils,t=i.getViewInfo(n),l=i.createExecContext(r,t,a.timeZone);if(!u){const n=i.createSyntaxTree(e.valueExpression);u=i.createFunction(n),e.cache.compiledFunc=u}s=i.executeFunction(u,l);break}case"field":l&&(s=l[e.field]);break;case"unknown":s=null}if(!t(s))return null;if(i||!e.normalizationField)return s;const f=l?parseFloat(l[e.normalizationField]):null;return t(f)&&0!==f?s/f:null}function h(e){let n=null,a=null;const i=e.stops;return i?(n=i[0].value,a=i[i.length-1].value):(n=e.minDataValue||0,a=e.maxDataValue||0),(n+a)/2}function b(e,n,a){const i="visualVariables"in e?e.visualVariables?.find(e=>"size"===e.type):e;if(!i)return;if("esri.renderers.visualVariables.SizeVariable"!==i.declaredClass)return void s("SizeVariable");const t=M(m(i,n,a),i,n,a,i.cache.ipData);return null==t||isNaN(t)?void 0:t}function V(e,n,a){return null==e?null:r(e)?b(e,n,a):t(e)?e:null}function x(e,n,a){return t(a)&&e>a?a:t(n)&&e<n?n:e}function y(e,n,a,i){const t=V(n.minSize,a,i)||n.minDataValue;return null==e&&null==t?null:(e??0)+(t??0)}function w(e,n,a){const i=e.stops;let t=i?.length&&i[0].size;return null==t&&(t=e.minSize),V(t,n,a)}function g(e,n,a,i){const t=V(n.minSize,a,i);if(null==e)return t;const{minDataValue:r,maxDataValue:l}=n;if(null==r||null==l)return null;const s=(e-r)/(l-r),o=V(n.maxSize,a,i),c=null!=i?i.shape:void 0;if(e<=r)return t;if(e>=l)return o;if(null==t||null==o)return null;if("area"===n.scaleBy&&c){const e="circle"===c,n=e?u*(t/2)**2:t*t,a=n+s*((e?u*(o/2)**2:o*o)-n);return e?2*Math.sqrt(a/u):Math.sqrt(a)}return t+s*(o-t)}function z(e,n,a,i){const t=V(n.minSize,a,i);if(null==e||null==t)return t;const r=null!=i?i.shape:void 0,{minDataValue:l}=n;if(null==l)return null;const s=e/l,o=V(n.maxSize,a,i);let c=null;return c="circle"===r?2*Math.sqrt(s*(t/2)**2):"square"===r||"diamond"===r||"image"===r?Math.sqrt(s*t**2):s*t,x(c,t,o)}function F(e,n,a,i,t){if(null==e)return null;const[r,l,s]=D(e,t);if(r===l)return V(n.stops?.[r].size,a,i);{const e=V(n.stops?.[r].size,a,i),t=V(n.stops?.[l].size,a,i);return null==e||null==t?null:e+(t-e)*s}}function S(e,n,a,t){const r=(t?.resolution??1)*i[n.valueUnit],l=V(n.minSize,a,t),s=V(n.maxSize,a,t),{valueRepresentation:o}=n;if(null==e)return l;let c=null;return c="area"===o?2*Math.sqrt(e/u)/r:"radius"===o||"distance"===o?2*e/r:e/r,x(c,l,s)}function E(e){return e}function M(e,n,a,i,t){switch(n.transformationType){case"additive":return y(e,n,a,i);case"constant":return w(n,a,i);case"clamped-linear":return g(e,n,a,i);case"proportional":return z(e,n,a,i);case"stops":return F(e,n,a,i,t);case"real-world-size":return S(e,n,a,i);case"identity":return E(e);case"unknown":return null}}function k(e,n,a){const{isScaleDriven:i}=e.cache;if(!(i&&"3d"===a||n))return null;const t={scale:n,view:a};let r=V(e.minSize,c,t),l=V(e.maxSize,c,t);if(null!=r||null!=l){if(r>l){const e=l;l=r,r=e}return{minSize:r,maxSize:l}}}function C(e,n,a){if(!e.visualVariables)return;const i=[],t=[],r=[],l=[],s=[];for(const o of e.visualVariables)switch(o.type){case"color":t.push(o);break;case"opacity":r.push(o);break;case"rotation":s.push(o);break;case"size":l.push(o)}return t.forEach(e=>{const t=p(e,n,a);i.push({variable:e,value:t})}),r.forEach(e=>{const t=d(e,n,a);i.push({variable:e,value:t})}),s.forEach(e=>{const t=v(e,n,a);i.push({variable:e,value:t})}),l.forEach(e=>{const t=b(e,n,a);i.push({variable:e,value:t})}),i}function D(e,n){if(!n)return;let a=0,i=n.length-1;return n.some((n,t)=>e<n?(i=t,!0):(a=t,!1)),[a,i,(e-n[a])/(n[i]-n[a])]}function R(e,n,a){const i=["proportional","proportional","proportional"];for(const t of e){const e=t.useSymbolValue?"symbol-value":b(t,n,a)??"proportional";switch(t.axis){case"width":i[0]=e;break;case"depth":i[1]=e;break;case"height":i[2]=e;break;case"width-and-depth":i[0]=e,i[1]=e;break;case"all":case void 0:case null:i[0]=e,i[1]=e,i[2]=e;break;default:t.axis}}return i}export{R as getAllSizes,p as getColor,d as getOpacity,v as getRotationAngle,b as getSize,M as getSizeForValue,V as getSizeFromNumberOrVariable,k as getSizeRangeAtScale,C as getVisualVariableValues,f as viewScaleRE};
|
package/request/process.js
CHANGED
|
@@ -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"../config.js";import{id as t}from"../kernel.js";import r from"../core/Error.js";import has from"../core/has.js";import{clone as s}from"../core/lang.js";import{createAbortError as o,isAbortError as a,isAborted as n}from"../core/promiseUtils.js";import{isTrustedServer as i,getOrigin as l,isBlobProtocol as u,isDataProtocol as c,toHTTPS as d,objectToQuery as m,getProxyRule as p,getProxyUrl as f,addQueryParameters as h,hasSameOrigin as y,addProxyRule as g,getAppUrl as w}from"../core/urlUtils.js";import{isSecureProxyService as b}from"../portal/support/urlUtils.js";import{requestConfig as T}from"./config.js";import{registerNoCorsDomains as k,isNoCorsRequestRequired as q,sendNoCorsRequest as S}from"./cors.js";import{getImageType as O,ImageWithType as C}from"./ImageWithType.js";import{loadImage as x}from"./loadImage.js";import{setPreferredHost as j,getPreferredUrl as v}from"./preferredHosts.js";import{getApiKey as L}from"../support/apiKeyUtils.js";const E="FormData"in globalThis,U=new Set([499,498,403,401]),A=new Set(["COM_0056","COM_0057","SB_0008"]),P=[/\/arcgis\/tokens/i,/\/sharing(\/rest)?\/generatetoken/i,/\/rest\/info/i];async function H(r){let s,o;await I(r);try{do{[s,o]=await D(r)}while(!await _(r,s,o))}catch(u){const e=z("request:server",u,r.parameters,s);throw e.details.ssl=r.useSSL,r.interceptor?.error?.(e),e}const a=r.parameters.url;if(o)if(/\/sharing\/rest\/(accounts|portals)\/self/i.test(a)){if(!r.hasToken&&!r.credentialToken&&o.user?.username&&!i(a)){const t=l(a,!0);t&&e.request.trustedServers.push(t)}Array.isArray(o.authorizedCrossOriginNoCorsDomains)&&k(o.authorizedCrossOriginNoCorsDomains)}else{"json"===(r.parameters.requestOptions.responseType||"json")&&j(a,o)}const n=r.credential;if(n&&t){const e=t.findServerInfo(n.server);let r=e?.owningSystemUrl;if(r){r=r.replace(/\/?$/,"/sharing");const e=t.findCredential(r,n.userId);e&&-1===t._getIdenticalSvcIdx(r,e)&&e.resources.unshift(r)}}return{data:o,getAllHeaders:s?()=>Array.from(s.headers):J,getHeader:s?e=>s.headers.get(e):J,httpStatus:s?.status??200,requestOptions:r.parameters.requestOptions,ssl:r.useSSL,url:r.parameters.url}}async function I(r){const s=r.parameters.url,o=r.parameters.requestOptions,a=r.controller.signal,i=o.body;let l=null,u=null;if(E&&"HTMLFormElement"in globalThis&&(i instanceof FormData?l=i:i instanceof HTMLFormElement&&(l=new FormData(i))),"string"==typeof i&&(u=i),r.fetchOptions={cache:o.cacheBust?"no-cache":"default",credentials:"same-origin",headers:o.headers||{},keepalive:o.keepAlive??!1,method:"head"===o.method?"HEAD":"GET",mode:"cors",priority:o.priority??e.request.priority,redirect:"follow",signal:a},(l||u)&&(r.fetchOptions.body=l||u),(T.isForeignWorker||"anonymous"===o.authMode)&&(r.useIdentity=!1),r.hasToken=!!(/token=/i.test(s)||o.query?.token||l?.get("token")),!r.hasToken){const e=L(s);e&&(o.query??={},o.query.token=e,r.hasToken=!0)}if(r.useIdentity&&!r.hasToken&&!r.credential&&!r.credentialToken&&!B(s)&&!n(a)){let e;"immediate"===o.authMode?(await N(),e=await t.getCredential(s,{signal:a})):"no-prompt"===o.authMode?(await N(),e=await t.getCredential(s,{prompt:!1,signal:a}).catch(()=>{})):t&&(e=t.findCredential(s)),e&&(r.credential=e,r.credentialToken=e.token,r.useSSL=!!e.ssl)}}async function D(r){let s=r.parameters.url,a=v(s);const n=r.parameters.requestOptions,k=r.fetchOptions??{},x=u(s)||c(s),j=n.responseType??"json",L="image"===j&&n.imageWithType,U=x?0:null!=n.timeout?n.timeout:e.request.timeout;let A=!1;if(!x){r.useSSL&&(s=d(s));let o={...n.query};r.credentialToken&&(o.token=r.credentialToken);let l=m(o);has("esri-url-encodes-apostrophe")&&(l=l.replaceAll("'","%27"));const u=a.length+1+l.length;let c;A="delete"===n.method||"post"===n.method||"put"===n.method||!!n.body||u>e.request.maxUrlLength;const g=n.useProxy||!!p(s);if(g){const t=f(s);c=t.path,!A&&c.length+1+u>e.request.maxUrlLength&&(A=!0),t.query&&(o={...t.query,...o})}if("HEAD"===k.method&&(A||g)){if(A){if(u>e.request.maxUrlLength)throw z("request:invalid-parameters",new Error("URL exceeds maximum length"),r.parameters);throw z("request:invalid-parameters",new Error("cannot use POST request when method is 'head'"),r.parameters)}if(g)throw z("request:invalid-parameters",new Error("cannot use proxy when method is 'head'"),r.parameters)}if(A?(k.method="delete"===n.method?"DELETE":"put"===n.method?"PUT":"POST",n.body?s=h(s,o):(k.body=m(o),k.headers||(k.headers={}),k.headers["Content-Type"]="application/x-www-form-urlencoded")):s=h(s,o),g&&(r.useProxy=!0,s=`${c}?${s}`),o.token&&E&&k.body instanceof FormData&&!b(s)&&k.body.set("token",o.token),n.hasOwnProperty("withCredentials"))r.withCredentials=n.withCredentials;else if(!y(s,w()))if(i(s))r.withCredentials=!0;else if(t){const e=t.findServerInfo(s);e?.webTierAuth&&(r.withCredentials=!0)}r.withCredentials&&(k.credentials="include",q(s)&&await S(A?h(s,o):s)),a=v(s)}let P,H,I=0,N=!1;U>0&&(I=setTimeout(()=>{N=!0,r.controller.abort()},U));try{if("native-request-init"===n.responseType)H=k,H.url=a,n.signal?H.signal=n.signal:delete H.signal;else if("image"!==n.responseType||"default"!==k.cache||k.keepalive||"GET"!==k.method||A||$(n.headers)||!x&&!r.useProxy&&e.request.proxyUrl&&!R(s)){if(await(T.beforeFetch?.(s,k)),P=await fetch(a,k),await(T.afterFetch?.(P)),r.useProxy||F(s),"native"===n.responseType)H=P;else if("HEAD"!==k.method)if(P.ok){switch(j){case"array-buffer":H=await P.arrayBuffer();break;case"blob":H=await P.blob();break;case"image":H=await(L?P.arrayBuffer():P.blob());break;default:H=await P.text()}if(I&&(clearTimeout(I),I=0),"json"===j||"xml"===j||"document"===j)if(H)switch(j){case"json":H=JSON.parse(H);break;case"xml":H=W(H,"application/xml");break;case"document":H=W(H,"text/html")}else H=null;if(H){if("array-buffer"===j||"blob"===j)
|
|
5
|
+
import e from"../config.js";import{id as t}from"../kernel.js";import r from"../core/Error.js";import has from"../core/has.js";import{clone as s}from"../core/lang.js";import{createAbortError as o,isAbortError as a,isAborted as n}from"../core/promiseUtils.js";import{isTrustedServer as i,getOrigin as l,isBlobProtocol as u,isDataProtocol as c,toHTTPS as d,objectToQuery as m,getProxyRule as p,getProxyUrl as f,addQueryParameters as h,hasSameOrigin as y,addProxyRule as g,getAppUrl as w}from"../core/urlUtils.js";import{isSecureProxyService as b}from"../portal/support/urlUtils.js";import{requestConfig as T}from"./config.js";import{registerNoCorsDomains as k,isNoCorsRequestRequired as q,sendNoCorsRequest as S}from"./cors.js";import{getImageType as O,ImageWithType as C}from"./ImageWithType.js";import{loadImage as x}from"./loadImage.js";import{setPreferredHost as j,getPreferredUrl as v}from"./preferredHosts.js";import{getApiKey as L}from"../support/apiKeyUtils.js";const E="FormData"in globalThis,U=new Set([499,498,403,401]),A=new Set(["COM_0056","COM_0057","SB_0008"]),P=[/\/arcgis\/tokens/i,/\/sharing(\/rest)?\/generatetoken/i,/\/rest\/info/i];async function H(r){let s,o;await I(r);try{do{[s,o]=await D(r)}while(!await _(r,s,o))}catch(u){const e=z("request:server",u,r.parameters,s);throw e.details.ssl=r.useSSL,r.interceptor?.error?.(e),e}const a=r.parameters.url;if(o)if(/\/sharing\/rest\/(accounts|portals)\/self/i.test(a)){if(!r.hasToken&&!r.credentialToken&&o.user?.username&&!i(a)){const t=l(a,!0);t&&e.request.trustedServers.push(t)}Array.isArray(o.authorizedCrossOriginNoCorsDomains)&&k(o.authorizedCrossOriginNoCorsDomains)}else{"json"===(r.parameters.requestOptions.responseType||"json")&&j(a,o)}const n=r.credential;if(n&&t){const e=t.findServerInfo(n.server);let r=e?.owningSystemUrl;if(r){r=r.replace(/\/?$/,"/sharing");const e=t.findCredential(r,n.userId);e&&-1===t._getIdenticalSvcIdx(r,e)&&e.resources.unshift(r)}}return{data:o,getAllHeaders:s?()=>Array.from(s.headers):J,getHeader:s?e=>s.headers.get(e):J,httpStatus:s?.status??200,requestOptions:r.parameters.requestOptions,ssl:r.useSSL,url:r.parameters.url}}async function I(r){const s=r.parameters.url,o=r.parameters.requestOptions,a=r.controller.signal,i=o.body;let l=null,u=null;if(E&&"HTMLFormElement"in globalThis&&(i instanceof FormData?l=i:i instanceof HTMLFormElement&&(l=new FormData(i))),"string"==typeof i&&(u=i),r.fetchOptions={cache:o.cacheBust?"no-cache":"default",credentials:"same-origin",headers:o.headers||{},keepalive:o.keepAlive??!1,method:"head"===o.method?"HEAD":"GET",mode:"cors",priority:o.priority??e.request.priority,redirect:"follow",signal:a},(l||u)&&(r.fetchOptions.body=l||u),(T.isForeignWorker||"anonymous"===o.authMode)&&(r.useIdentity=!1),r.hasToken=!!(/token=/i.test(s)||o.query?.token||l?.get("token")),!r.hasToken){const e=L(s);e&&(o.query??={},o.query.token=e,r.hasToken=!0)}if(r.useIdentity&&!r.hasToken&&!r.credential&&!r.credentialToken&&!B(s)&&!n(a)){let e;"immediate"===o.authMode?(await N(),e=await t.getCredential(s,{signal:a})):"no-prompt"===o.authMode?(await N(),e=await t.getCredential(s,{prompt:!1,signal:a}).catch(()=>{})):t&&(e=t.findCredential(s)),e&&(r.credential=e,r.credentialToken=e.token,r.useSSL=!!e.ssl)}}async function D(r){let s=r.parameters.url,a=v(s);const n=r.parameters.requestOptions,k=r.fetchOptions??{},x=u(s)||c(s),j=n.responseType??"json",L="image"===j&&n.imageWithType,U=x?0:null!=n.timeout?n.timeout:e.request.timeout;let A=!1;if(!x){r.useSSL&&(s=d(s));let o={...n.query};r.credentialToken&&(o.token=r.credentialToken);let l=m(o);has("esri-url-encodes-apostrophe")&&(l=l.replaceAll("'","%27"));const u=a.length+1+l.length;let c;A="delete"===n.method||"post"===n.method||"put"===n.method||!!n.body||u>e.request.maxUrlLength;const g=n.useProxy||!!p(s);if(g){const t=f(s);c=t.path,!A&&c.length+1+u>e.request.maxUrlLength&&(A=!0),t.query&&(o={...t.query,...o})}if("HEAD"===k.method&&(A||g)){if(A){if(u>e.request.maxUrlLength)throw z("request:invalid-parameters",new Error("URL exceeds maximum length"),r.parameters);throw z("request:invalid-parameters",new Error("cannot use POST request when method is 'head'"),r.parameters)}if(g)throw z("request:invalid-parameters",new Error("cannot use proxy when method is 'head'"),r.parameters)}if(A?(k.method="delete"===n.method?"DELETE":"put"===n.method?"PUT":"POST",n.body?s=h(s,o):(k.body=m(o),k.headers||(k.headers={}),k.headers["Content-Type"]="application/x-www-form-urlencoded")):s=h(s,o),g&&(r.useProxy=!0,s=`${c}?${s}`),o.token&&E&&k.body instanceof FormData&&!b(s)&&k.body.set("token",o.token),n.hasOwnProperty("withCredentials"))r.withCredentials=n.withCredentials;else if(!y(s,w()))if(i(s))r.withCredentials=!0;else if(t){const e=t.findServerInfo(s);e?.webTierAuth&&(r.withCredentials=!0)}r.withCredentials&&(k.credentials="include",q(s)&&await S(A?h(s,o):s)),a=v(s)}let P,H,I=0,N=!1;U>0&&(I=setTimeout(()=>{N=!0,r.controller.abort()},U));try{if("native-request-init"===n.responseType)H=k,H.url=a,n.signal?H.signal=n.signal:delete H.signal;else if("image"!==n.responseType||"default"!==k.cache||k.keepalive||"GET"!==k.method||A||$(n.headers)||!x&&!r.useProxy&&e.request.proxyUrl&&!R(s)){if(await(T.beforeFetch?.(s,k)),P=await fetch(a,k),await(T.afterFetch?.(P)),r.useProxy||F(s),"native"===n.responseType)H=P;else if("HEAD"!==k.method)if(P.ok){switch(j){case"array-buffer":H=await P.arrayBuffer();break;case"blob":H=await P.blob();break;case"image":H=await(L?P.arrayBuffer():P.blob());break;default:H=await P.text()}if(I&&(clearTimeout(I),I=0),"json"===j||"xml"===j||"document"===j)if(H)switch(j){case"json":H=JSON.parse(H);break;case"xml":H=W(H,"application/xml");break;case"document":H=W(H,"text/html")}else H=null;if(H){if(("array-buffer"===j||"blob"===j)&&H["blob"===j?"size":"byteLength"]<=750)try{const e=await new Response(H).json();e.error&&(H=e)}catch{}if(L&&H instanceof ArrayBuffer){const e=O(H);if("unknown"===e)return n.responseType="image",await D(r);H=await P.blob(),H=await M(URL.createObjectURL(H),r,!0),H=new C(H,e)}"image"===j&&H instanceof Blob&&(H=await M(URL.createObjectURL(H),r,!0))}}else{H=await P.text();try{H=JSON.parse(H)}catch{}}}else H=await M(a,r)}catch(B){if("AbortError"===B.name){if(N)throw X();throw o("Request canceled")}if(!(!P&&B instanceof TypeError&&e.request.proxyUrl)||n.body||"delete"===n.method||"head"===n.method||"post"===n.method||"put"===n.method||r.useProxy||R(s))throw B;r.redoRequest=!0,g({proxyUrl:e.request.proxyUrl,urlPrefix:l(s)??""})}finally{I&&clearTimeout(I)}return[P,H]}function M(t,r,s=!1){const o=r.controller.signal,a=new Image;return r.withCredentials?a.crossOrigin="use-credentials":a.crossOrigin="anonymous",a.alt="",a.fetchPriority=e.request.priority,a.src=t,x(a,t,s,o)}function F(e){const t=l(e);t&&!T.corsServers.includes(t)&&T.corsServers.push(t)}function R(e){const t=l(e);return!t||t.endsWith(".arcgis.com")||T.corsServers.includes(t)||i(t)}async function N(){t||await import("../identity/IdentityManager.js")}function B(e){return P.some(t=>t.test(e))}function $(e){if(e)for(const t of Object.getOwnPropertyNames(e))if(e[t])return!0;return!1}function W(e,t){let r;try{r=(new DOMParser).parseFromString(e,t)}catch{}if(!r||r.getElementsByTagName("parsererror").length)throw new SyntaxError("XML Parse error");return r}async function _(e,r,s){if(e.redoRequest)return e.redoRequest=!1,!1;const o=e.parameters.requestOptions;if(!r||"native"===o.responseType||"native-request-init"===o.responseType)return!0;let a,n;if(s&&(s.error&&"object"==typeof s.error?a=s.error:"error"===s.status&&Array.isArray(s.messages)&&(a={...s},a[G]=s,a.details=s.messages)),!a&&!r.ok)throw a=new Error(`Unable to load ${r.url} status: ${r.status}`),a[G]=s,a;let i,l=null;a&&(n=Number(a.code),l=a.hasOwnProperty("subcode")?Number(a.subcode):null,i=a.messageCode,i=i?.toUpperCase());const u=o.authMode;if(403===n&&(4===l||a.message?.toLowerCase().includes("ssl")&&!a.message.toLowerCase().includes("permission"))){if(!e.useSSL)return e.useSSL=!0,!1}else if(!e.hasToken&&e.useIdentity&&("no-prompt"!==u||498===n)&&void 0!==n&&U.has(n)&&!B(e.parameters.url)&&(403!==n||(!i||!A.has(i))&&(null==l||2===l&&e.credentialToken))){await N();try{const r=await t.getCredential(e.parameters.url,{error:z("request:server",a,e.parameters),credential:e.credential,prompt:"no-prompt"!==u,signal:e.controller.signal,token:e.credentialToken});return e.credential=r,e.credentialToken=r.token,e.useSSL=e.useSSL||r.ssl,!1}catch(c){if("no-prompt"===u)return e.credential=void 0,e.credentialToken=void 0,!1;a=c}}if(a)throw a;return!0}function z(e,t,n,i){let l;const u={url:n.url,requestOptions:n.requestOptions,getAllHeaders:J,getHeader:J,ssl:!1};if(t instanceof r)return t.details?(t.details=s(t.details),t.details.url=n.url,t.details.requestOptions=n.requestOptions):t.details=u,t;if(t){const e=i&&(()=>Array.from(i.headers)),r=i&&(e=>i.headers.get(e)),s=i?.status,o=t.message;o&&(l=o),e&&r&&(u.getAllHeaders=e,u.getHeader=r),u.httpStatus=(null!=t.httpCode?t.httpCode:t.code)||s||0,u.subCode=t.subcode,u.messageCode=t.messageCode,"string"==typeof t.details?(u.messages=[t.details],l??=t.details):(u.messages=t.details,l??=u.messages?.[0]),u.raw=G in t?t[G]:t}return l??="Error",a(t)?o():new r(e,l,u)}const G=Symbol(),J=()=>null,K="Timeout exceeded";function X(){return new Error(K)}function Q(e){return"object"==typeof e&&!!e&&"message"in e&&e.message===K}export{z as createRequestError,Q as isTimeoutError,H as processRequest};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type Polygon from "../../geometry/Polygon.js";
|
|
2
|
+
import type Polyline from "../../geometry/Polyline.js";
|
|
3
|
+
import type SpatialReference from "../../geometry/SpatialReference.js";
|
|
4
|
+
|
|
5
|
+
export interface CutResult<T extends Polygon | Polyline> {
|
|
6
|
+
cutIndexes: number[];
|
|
7
|
+
geometries: T[];
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export type ConversionType = "mgrs" | "usng" | "utm" | "geo-ref" | "gars" | "dms" | "ddm" | "dd";
|
|
11
|
+
|
|
12
|
+
export interface FromGeoCoordinateStringParameters {
|
|
13
|
+
/**
|
|
14
|
+
* Conversion options for mgrs and utm conversion types. See
|
|
15
|
+
* the [ArcGIS REST API documentation](https://developers.arcgis.com/rest/services-reference/to-geocoordinatestring.htm)
|
|
16
|
+
* for valid conversion modes and their descriptions.
|
|
17
|
+
*/
|
|
18
|
+
conversionMode?: string;
|
|
19
|
+
/**
|
|
20
|
+
* The conversion type of the input strings.
|
|
21
|
+
*
|
|
22
|
+
* @default mrgs
|
|
23
|
+
*/
|
|
24
|
+
conversionType?: ConversionType;
|
|
25
|
+
/**
|
|
26
|
+
* The spatial reference (or WKID of the spatial reference)
|
|
27
|
+
* of the XY-coordinates to be converted.
|
|
28
|
+
*/
|
|
29
|
+
sr?: SpatialReference | string | number;
|
|
30
|
+
/**
|
|
31
|
+
* An array of formatted strings as specified by `conversionType`.
|
|
32
|
+
* Example: `["01N AA 66021 00000" , "11S NT 00000 62155" , "31U BT 94071 65288"]`
|
|
33
|
+
*/
|
|
34
|
+
strings: string[];
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface ToGeoCoordinateStringParameters extends Omit<FromGeoCoordinateStringParameters, "strings"> {
|
|
38
|
+
/**
|
|
39
|
+
* If `true`, then spaces are added between components of the string. The
|
|
40
|
+
* `addSpaces` parameter applies only to conversion types `mgrs`, `usng` and `utm`. The default value for `mgrs` is `false`
|
|
41
|
+
* , while the default value for both `usng` and `utm` is `true`.
|
|
42
|
+
*/
|
|
43
|
+
addSpaces?: boolean;
|
|
44
|
+
/** An array of XY-coordinates (in JSON format) to be converted. */
|
|
45
|
+
coordinates: number[][];
|
|
46
|
+
/**
|
|
47
|
+
* The number of digits to output for each of the numerical portions in the string.
|
|
48
|
+
* The default value depends of `conversionType`. See the [ArcGIS REST API documentation](https://developers.arcgis.com/rest/services-reference/from-geocoordinatestring.htm) for default values.
|
|
49
|
+
*/
|
|
50
|
+
numOfDigits?: number;
|
|
51
|
+
/**
|
|
52
|
+
* If `true`, then numeric portions of the string are rounded to the nearest whole magnitude
|
|
53
|
+
* as specified by `numOfDigits`. Otherwise, numeric portions of the string are truncated. The rounding parameter applies
|
|
54
|
+
* only to conversion types `mgrs`, `usng` and `geo-ref`.
|
|
55
|
+
*
|
|
56
|
+
* @default true
|
|
57
|
+
*/
|
|
58
|
+
rounding?: boolean;
|
|
59
|
+
}
|
|
@@ -27,9 +27,7 @@ import type RelationParameters from "./support/RelationParameters.js";
|
|
|
27
27
|
import type TrimExtendParameters from "./support/TrimExtendParameters.js";
|
|
28
28
|
import type { GeometryWithoutMeshUnion, GeometryUnion } from "../geometry/types.js";
|
|
29
29
|
import type { RequestOptions } from "../request/types.js";
|
|
30
|
-
import type { CutResult } from "./geometryService/
|
|
31
|
-
import type { GeomServiceFromGeoCoordinateStringParameters } from "./geometryService/fromGeoCoordinateString.js";
|
|
32
|
-
import type { GeomServiceToGeoCoordinateStringParameters } from "./geometryService/toGeoCoordinateString.js";
|
|
30
|
+
import type { CutResult, FromGeoCoordinateStringParameters, ToGeoCoordinateStringParameters } from "./geometryService/types.js";
|
|
33
31
|
|
|
34
32
|
/**
|
|
35
33
|
* Computes the area and length for the input [polygons](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html).
|
|
@@ -253,7 +251,7 @@ export function distance(url: string, parameters: DistanceParameters, requestOpt
|
|
|
253
251
|
* console.log(error);
|
|
254
252
|
* });
|
|
255
253
|
*/
|
|
256
|
-
export function fromGeoCoordinateString(url: string, parameters:
|
|
254
|
+
export function fromGeoCoordinateString(url: string, parameters: FromGeoCoordinateStringParameters, requestOptions?: RequestOptions): Promise<number[][]>;
|
|
257
255
|
|
|
258
256
|
/**
|
|
259
257
|
* Generalizes the input geometries using the Douglas-Peucker algorithm.
|
|
@@ -487,7 +485,7 @@ export function simplify<T extends GeometryUnion>(url: string, geometries: T[],
|
|
|
487
485
|
* // response.strings[2] = "31U BT 94071081 65288255"
|
|
488
486
|
* });
|
|
489
487
|
*/
|
|
490
|
-
export function toGeoCoordinateString(url: string, parameters:
|
|
488
|
+
export function toGeoCoordinateString(url: string, parameters: ToGeoCoordinateStringParameters, requestOptions?: RequestOptions): Promise<string[]>;
|
|
491
489
|
|
|
492
490
|
/**
|
|
493
491
|
* Trims or extends the input polylines using the user specified guide polyline. When trimming features,
|
|
@@ -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{
|
|
5
|
+
import{generateUID as t}from"../../../core/uid.js";import e from"../../../geometry/SpatialReference.js";import{getGeometryZScaler as r}from"../../../geometry/support/zscale.js";import{DehydratedFeatureSetClass as s,removeLargeStringAttributes as i,DehydratedFeatureClass as o}from"../../../layers/graphics/dehydratedFeatures.js";import{unquantizeOptimizedGeometryInPlace as n,convertToGeometry as a}from"../../../layers/graphics/featureConversionUtils.js";import h from"../../../layers/support/Field.js";function u(t,e){return e}function l(t,e,r,s){switch(r){case 0:return m(t,e+s,0);case 1:return"lowerLeft"===t.originPosition?m(t,e+s,1):y(t,e+s,1)}}function p(t,e,r,s){return 2===r?m(t,e,2):l(t,e,r,s)}function d(t,e,r,s){return 2===r?m(t,e,3):l(t,e,r,s)}function c(t,e,r,s){return 3===r?m(t,e,3):p(t,e,r,s)}function m({translate:t,scale:e},r,s){return t[s]+r*e[s]}function y({translate:t,scale:e},r,s){return t[s]-r*e[s]}class f{constructor(t){this._options=t,this.geometryTypes=["point","multipoint","polyline","polygon"],this._previousCoordinate=[0,0],this._transform=null,this._applyTransform=u,this._lengths=[],this._currentLengthIndex=0,this._toAddInCurrentPath=0,this._vertexDimension=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,this._attributesConstructor=class{},this._missingAttributes=[]}get missingAttributes(){return this._missingAttributes}createFeatureResult(){return new s}finishFeatureResult(t){if(this._options.applyTransform&&(t.transform=null),this._attributesConstructor=class{},this._coordinateBuffer=null,this._lengths.length=0,!t.hasZ)return;const e=r(t.geometryType,this._options.sourceSpatialReference,t.spatialReference);if(null!=e)for(const r of t.features)e(r.geometry)}createSpatialReference(){return new e}addField(t,e){t.fields.push(h.fromJSON(e));const r=t.fields.map(t=>t.name);this._attributesConstructor=function(){for(const t of r)this[t]=null}}addFeature(t,e){const r=this._options.maxStringAttributeLength,s=this._options.maxStringAttributeFields;i(e.attributes,s,r,r=>{const s=e.attributes[t.objectIdFieldName];null!=s&&this._missingAttributes.push({objectId:s,attribute:r})}),t.features.push(e)}addQueryGeometry(t,e){const{queryGeometry:r,queryGeometryType:s}=e,i=r.justXY();this._transform&&n(i,this._transform);const o=a(i,s,!1,!1);switch(s){case"esriGeometryPoint":o.type="point";break;case"esriGeometryPolygon":o.type="polygon";break;case"esriGeometryPolyline":o.type="polyline";break;case"esriGeometryMultipoint":o.type="multipoint"}t.queryGeometryType=s,t.queryGeometry=o}prepareFeatures(t){switch(this._transform=t.transform??null,this._options.applyTransform&&t.transform&&(this._applyTransform=this._deriveApplyTransform(t)),this._vertexDimension=2,t.hasZ&&this._vertexDimension++,t.hasM&&this._vertexDimension++,t.geometryType){case"point":this.addCoordinate=(t,e,r)=>this.addCoordinatePoint(t,e,r),this.createGeometry=t=>this.createPointGeometry(t);break;case"polygon":this.addCoordinate=(t,e,r)=>this._addCoordinatePolygon(t,e,r),this.createGeometry=t=>this._createPolygonGeometry(t);break;case"polyline":this.addCoordinate=(t,e,r)=>this._addCoordinatePolyline(t,e,r),this.createGeometry=t=>this._createPolylineGeometry(t);break;case"multipoint":this.addCoordinate=(t,e,r)=>this._addCoordinateMultipoint(t,e,r),this.createGeometry=t=>this._createMultipointGeometry(t);break;case"mesh":case"extent":break;default:t.geometryType}}createFeature(){return this._lengths.length=0,this._currentLengthIndex=0,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0,new o(t(),null,new this._attributesConstructor)}allocateCoordinates(){const t=this._lengths.reduce((t,e)=>t+e,0);this._coordinateBuffer=new Float64Array(t*this._vertexDimension),this._coordinateBufferPtr=0}addLength(t,e){0===this._lengths.length&&(this._toAddInCurrentPath=e),this._lengths.push(e)}createPointGeometry(t){const e={type:"point",x:0,y:0,spatialReference:t.spatialReference,hasZ:!!t.hasZ,hasM:!!t.hasM};return e.hasZ&&(e.z=0),e.hasM&&(e.m=0),e}addCoordinatePoint(t,e,r){const s=this._transform?this._applyTransform(this._transform,e,r,0):e;if(null!=s)switch(r){case 0:t.x=s;break;case 1:t.y=s;break;case 2:t.hasZ?t.z=s:t.m=s;break;case 3:t.m=s}}_transformPathLikeValue(t,e){let r=0;return e<=1&&(r=this._previousCoordinate[e],this._previousCoordinate[e]+=t),this._transform?this._applyTransform(this._transform,t,e,r):t}_addCoordinatePolyline(t,e,r){this._dehydratedAddPointsCoordinate(t.paths,e,r)}_addCoordinatePolygon(t,e,r){this._dehydratedAddPointsCoordinate(t.rings,e,r)}_addCoordinateMultipoint(t,e,r){0===r&&t.points.push([]);const s=this._transformPathLikeValue(e,r);t.points[t.points.length-1].push(s)}_createPolygonGeometry(t){return{type:"polygon",rings:[[]],spatialReference:t.spatialReference,hasZ:!!t.hasZ,hasM:!!t.hasM}}_createPolylineGeometry(t){return{type:"polyline",paths:[[]],spatialReference:t.spatialReference,hasZ:!!t.hasZ,hasM:!!t.hasM}}_createMultipointGeometry(t){return{type:"multipoint",points:[],spatialReference:t.spatialReference,hasZ:!!t.hasZ,hasM:!!t.hasM}}_dehydratedAddPointsCoordinate(t,e,r){0===r&&0===this._toAddInCurrentPath--&&(t.push([]),this._toAddInCurrentPath=this._lengths[++this._currentLengthIndex]-1,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0);const s=this._transformPathLikeValue(e,r),i=t[t.length-1],o=this._coordinateBuffer;if(o){if(0===r){const t=this._coordinateBufferPtr*Float64Array.BYTES_PER_ELEMENT;i.push(new Float64Array(o.buffer,t,this._vertexDimension))}o[this._coordinateBufferPtr++]=s}}_deriveApplyTransform(t){const{hasZ:e,hasM:r}=t;return e&&r?c:e?p:r?d:l}}export{f as DehydratedFeatureSetParserContext};
|
|
@@ -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 t from"../../../request.js";import{urlToObject as n,join as r}from"../../../core/urlUtils.js";import{normalizeCentralMeridian as e}from"../../../geometry/support/normalizeUtils.js";import{mapParameters as o}from"../../operations/urlUtils.js";import{parsePBFFeatureQuery as s}from"./pbfQueryUtils.js";import{queryLikeToQueryStringParameters as u}from"./queryUtils.js";import{applyFeatureSetZUnitScaling as i}from"./queryZScale.js";const c="Layer does not support extent calculation.";function a(t,n,r){return u(t,n,r)}async function y(t,n,r,e,o){const s=n.timeExtent?.isEmpty?{features:[]}:await d(t,n,"json",e,void 0,o);return i(n,r,s),s}async function l(t,n,r,e,o){if(n.timeExtent?.isEmpty)return r.createFeatureResult();const u=await f(t,n,e,o);return s(u,r)}function f(t,n,r,e){return d(t,n,"pbf",r,void 0,e)}function m(t,n,r,e){return n.timeExtent?.isEmpty?Promise.resolve({objectIds:[]}):d(t,n,"json",r,{returnIdsOnly:!0},e)}async function p(t,n,r,e){return n.timeExtent?.isEmpty?0:(await d(t,n,"json",r,{returnIdsOnly:!0,returnCountOnly:!0},e)).count}async function O(t,n,r){if(n.timeExtent?.isEmpty)return{count:0,extent:null};const e=await d(t,n,"json",r,{returnExtentOnly:!0,returnCountOnly:!0});if(e.hasOwnProperty("extent"))return e;const o="string"==typeof t?t:t.path;if(/\/imageserver\/?$/i.test(o)&&e.hasOwnProperty("count")){const o=await d(t,n,"json",r,{returnExtentOnly:!0});return{count:e.count,extent:o.extent}}if(e.features)throw new Error(c);if(e.hasOwnProperty("count"))throw new Error(c);return e}function j(t,n){if(!t.returnIdsOnly||!n.uniqueIdFields)return t;const r={...t,returnUniqueIdsOnly:!0};return delete r.returnIdsOnly,r}async function d(n,r,e,o={},s={},u={}){const i=await w(n,r,e,o,s,u),c="json"===e?"json":"array-buffer";return t(i.url,{responseType:c,...i.options}).then(({data:t})=>t)}async function w(t,s,u,i,c={},y={}){const l="string"==typeof t?n(t):t,f=s.geometry?[s.geometry]:[],m=await e(f,null,{signal:i.signal}),p=m?.[0];if(null!=p){const t=s.clone();t.geometry=p.clone(),s=t}const O=o({...l.query,f:u,...j(c,y),...a(s,c,y)});return i={...i,query:{...O,...i.query}},new E(r(l.path,x(s,c)?"query3d":"query"),i)}class E{constructor(t,n){this.url=t,this.options=n}}function x(t,n){return null!=t.formatOf3DObjects&&!(n.returnCountOnly||n.returnExtentOnly||n.returnIdsOnly)}export{E as RunQueryParameters,y as executeQuery,p as executeQueryForCount,O as executeQueryForExtent,m as executeQueryForIds,l as executeQueryPBF,f as executeQueryPBFBuffer,a as queryToQueryStringParameters,d as runQuery};
|
|
5
|
+
import t from"../../../request.js";import{urlToObject as n,join as r}from"../../../core/urlUtils.js";import{normalizeCentralMeridian as e}from"../../../geometry/support/normalizeUtils.js";import{mapParameters as o}from"../../operations/urlUtils.js";import{parsePBFFeatureQuery as s}from"./pbfQueryUtils.js";import{queryLikeToQueryStringParameters as u}from"./queryUtils.js";import{applyFeatureSetZUnitScaling as i}from"./queryZScale.js";const c="Layer does not support extent calculation.";function a(t,n,r){return u(t,n,r)}async function y(t,n,r,e,o){const s=n.timeExtent?.isEmpty?{features:[]}:await d(t,n,"json",e,void 0,o);return i(n,r,s),s}async function l(t,n,r,e,o){if(n.timeExtent?.isEmpty)return r.createFeatureResult();const u=await f(t,n,e,o);return s(u,r)}function f(t,n,r,e){return d(t,n,"pbf",r,void 0,e)}function m(t,n,r,e){return n.timeExtent?.isEmpty?Promise.resolve({objectIds:[]}):d(t,n,"json",r,{returnIdsOnly:!0},e)}async function p(t,n,r,e){return n.timeExtent?.isEmpty?0:(await d(t,n,"json",r,{returnIdsOnly:!0,returnCountOnly:!0},e)).count}async function O(t,n,r){if(n.timeExtent?.isEmpty)return{count:0,extent:null};const e=await d(t,n,"json",r,{returnExtentOnly:!0,returnCountOnly:!0});if(e.hasOwnProperty("extent"))return e;const o="string"==typeof t?t:t.path;if(/\/imageserver\/?$/i.test(o)&&e.hasOwnProperty("count")){const o=await d(t,n,"json",r,{returnExtentOnly:!0});return{count:e.count,extent:o.extent}}if(e.features)throw new Error(c);if(e.hasOwnProperty("count"))throw new Error(c);return e}function j(t,n){if(!t.returnIdsOnly||!n.uniqueIdFields)return t;const r={...t,returnUniqueIdsOnly:!0};return delete r.returnIdsOnly,r}async function d(n,r,e,o={},s={},u={}){const i=await w(n,r,e,o,s,u),c="json"===e?"json":"array-buffer";return t(i.url,{responseType:c,...i.options}).then(({data:t})=>t)}async function w(t,s,u,i,c={},y={}){const l="string"==typeof t?n(t):t,f=s.geometry?[s.geometry]:[],m=await e(f,null,{signal:i.signal}),p=m?.[0];if(null!=p){const t=s.clone();t.geometry=p.clone(),s=t}const O=o({...l.query,f:u,...j(c,y),...a(s,c,y)});return i={...i,query:{...O,...i.query}},new E(r(l.path,x(s,c)?"query3d":"query"),i)}class E{constructor(t,n){this.url=t,this.options=n}}function x(t,n){return null!=t.formatOf3DObjects&&!(n.returnCountOnly||n.returnExtentOnly||n.returnIdsOnly)}export{E as RunQueryParameters,y as executeQuery,p as executeQueryForCount,O as executeQueryForExtent,m as executeQueryForIds,l as executeQueryPBF,f as executeQueryPBFBuffer,w as getQueryParameters,a as queryToQueryStringParameters,d as runQuery};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { JSONSupport, JSONSupportMixinProperties } from "../../../core/JSONSupport.js";
|
|
2
|
-
import type { ExifInfo } from "../../../layers/support/
|
|
2
|
+
import type { ExifInfo } from "../../../layers/support/types.js";
|
|
3
3
|
import type { ObjectId } from "../../../views/types.js";
|
|
4
4
|
|
|
5
5
|
export interface AttachmentInfoProperties extends JSONSupportMixinProperties, Partial<Pick<AttachmentInfo, "contentType" | "exifInfo" | "globalId" | "id" | "keywords" | "name" | "parentGlobalId" | "parentObjectId" | "size" | "url">> {}
|
|
@@ -40,7 +40,7 @@ export default class AttachmentInfo extends JSONSupport {
|
|
|
40
40
|
* for more information on supported attachment types.
|
|
41
41
|
*/
|
|
42
42
|
accessor contentType: string;
|
|
43
|
-
/** An array of
|
|
43
|
+
/** An array of {@link layers/support/exifUtils!ExifInfo} for the attachment. */
|
|
44
44
|
accessor exifInfo: ExifInfo[] | null | undefined;
|
|
45
45
|
/** The global identifier for the attachment. */
|
|
46
46
|
accessor globalId: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type Color from "../../Color.js";
|
|
2
2
|
import type ColorRamp from "./ColorRamp.js";
|
|
3
3
|
import type { ColorRampProperties } from "./ColorRamp.js";
|
|
4
|
-
import type {
|
|
4
|
+
import type { ColorRampAlgorithmType } from "./types.js";
|
|
5
5
|
import type { ColorLike } from "../../Color.js";
|
|
6
6
|
|
|
7
7
|
export interface AlgorithmicColorRampProperties extends ColorRampProperties, Partial<Pick<AlgorithmicColorRamp, "algorithm">> {
|
|
@@ -38,7 +38,7 @@ export default class AlgorithmicColorRamp extends ColorRamp {
|
|
|
38
38
|
* lab-lch | The hue, saturation, value (hsv) algorithm is a linear traverse of colors between pairs: Color 1 H to Color 2 H, Color 1 S to Color 2 S, and Color 1 V to Color 2 V.
|
|
39
39
|
* hsv | The lab-lch algorithm is very similar to the cie-lab but does not seek the shortest path between colors.
|
|
40
40
|
*/
|
|
41
|
-
algorithm?:
|
|
41
|
+
algorithm?: ColorRampAlgorithmType | null;
|
|
42
42
|
/** The first color in the color ramp. */
|
|
43
43
|
get fromColor(): Color;
|
|
44
44
|
set fromColor(value: ColorLike);
|
|
@@ -57,7 +57,7 @@ export interface BinParametersBaseProperties extends JSONSupportMixinProperties,
|
|
|
57
57
|
stackBy?: AttributeBinsGroupingProperties | null;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
export type
|
|
60
|
+
export type BinParameterFieldType = "small-integer" | "integer" | "single" | "double" | "long" | "date" | "date-only" | "time-only" | "timestamp-offset";
|
|
61
61
|
|
|
62
62
|
/**
|
|
63
63
|
* Mixin for binning parameters.
|
|
@@ -109,7 +109,7 @@ export default abstract class BinParametersBase extends BinParametersBaseSupercl
|
|
|
109
109
|
* })
|
|
110
110
|
* });
|
|
111
111
|
*/
|
|
112
|
-
expressionValueType?:
|
|
112
|
+
expressionValueType?: BinParameterFieldType | null;
|
|
113
113
|
/**
|
|
114
114
|
* The field name used to calculate the bins. The [expression](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-BinParametersBase.html#expression) property cannot be set when this property is set.
|
|
115
115
|
*
|
|
@@ -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{ClonableMixin as t}from"../../core/Clonable.js";import{JSONMap as
|
|
5
|
+
import{__decorate as e}from"tslib";import{ClonableMixin as t}from"../../core/Clonable.js";import{JSONMap as o}from"../../core/jsonMap.js";import{JSONSupport as r}from"../../core/JSONSupport.js";import{property as s,subclass as i}from"../../core/accessorSupport/decorators.js";import l from"./AttributeBinsGrouping.js";import{enumeration as p}from"../../core/accessorSupport/decorators/enumeration.js";const n=new o({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeDate:"date",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"}),y=new o({naturalLog:"natural-log",squareRoot:"square-root"});let a=class extends(t(r)){constructor(e){super(e),this.expression=null,this.expressionValueType=null,this.field=null,this.firstDayOfWeek=null,this.hideUpperBound=null,this.splitBy=null,this.stackBy=null,this.transformation=null}};e([s({type:String,json:{name:"onExpression.value",write:!0}})],a.prototype,"expression",void 0),e([p(n,{name:"onExpression.valueType"})],a.prototype,"expressionValueType",void 0),e([s({type:String,json:{name:"onField",write:!0}})],a.prototype,"field",void 0),e([s({type:Number,json:{write:!0}})],a.prototype,"firstDayOfWeek",void 0),e([s({type:Boolean,json:{write:!0}})],a.prototype,"hideUpperBound",void 0),e([s({type:l,json:{write:{overridePolicy(){return{enabled:null!=this.splitBy?.value||null!=this.splitBy?.type}}}}})],a.prototype,"splitBy",void 0),e([s({type:l,json:{write:{target:{stackBy:{type:l},jsonStyle:{type:String}},writer:(e,t)=>{e&&(t.stackBy=e.toJSON(),null!=e.responseType&&(t.jsonStyle=e.responseType))},overridePolicy(){return{enabled:null!=this.stackBy?.value||null!=this.stackBy?.type}}},read:{source:["stackBy","jsonStyle"],reader:(e,t)=>l.fromJSON({...t.stackBy,responseType:t.jsonStyle})}}})],a.prototype,"stackBy",void 0),e([p(y)],a.prototype,"transformation",void 0),a=e([i("esri.rest.support.BinParametersBase")],a);export{a as default};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ClonableMixin, ClonableMixinProperties } from "../../core/Clonable.js";
|
|
2
2
|
import type { JSONSupport, JSONSupportMixinProperties } from "../../core/JSONSupport.js";
|
|
3
|
-
import type { DateBinTimeUnit } from "./
|
|
3
|
+
import type { DateBinTimeUnit } from "./types.js";
|
|
4
4
|
|
|
5
5
|
export interface DateBinTimeIntervalProperties extends JSONSupportMixinProperties, ClonableMixinProperties, Partial<Pick<DateBinTimeInterval, "unit" | "value">> {}
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { JSONSupport, JSONSupportMixinProperties } from "../../core/JSONSupport.js";
|
|
2
2
|
import type { GeometryUnion } from "../../geometry/types.js";
|
|
3
|
-
import type { DeviationUnit } from "
|
|
3
|
+
import type { DeviationUnit } from "./types.js";
|
|
4
4
|
|
|
5
5
|
export interface GeneralizeParametersProperties extends JSONSupportMixinProperties, Partial<Pick<GeneralizeParameters, "deviationUnit" | "geometries" | "maxDeviation">> {}
|
|
6
6
|
|
|
@@ -6,7 +6,7 @@ import type Polyline from "../../geometry/Polyline.js";
|
|
|
6
6
|
import type MosaicRule from "../../layers/support/MosaicRule.js";
|
|
7
7
|
import type TimeExtent from "../../time/TimeExtent.js";
|
|
8
8
|
import type { JSONSupport, JSONSupportMixinProperties } from "../../core/JSONSupport.js";
|
|
9
|
-
import type { RasterInterpolation } from "../../layers/
|
|
9
|
+
import type { RasterInterpolation } from "../../layers/raster/types.js";
|
|
10
10
|
import type { PolygonProperties } from "../../geometry/Polygon.js";
|
|
11
11
|
import type { ExtentProperties } from "../../geometry/Extent.js";
|
|
12
12
|
import type { PolylineProperties } from "../../geometry/Polyline.js";
|
package/rest/support/JobInfo.js
CHANGED
|
@@ -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"../../request.js";import
|
|
5
|
+
import{__decorate as e}from"tslib";import t from"../../request.js";import{strict as o}from"../../core/jsonMap.js";import{JSONSupport as s}from"../../core/JSONSupport.js";import{onAbort as r,createAbortError as i}from"../../core/promiseUtils.js";import{property as a,subclass as c}from"../../core/accessorSupport/decorators.js";import{parseUrl as n}from"../utils.js";import l from"../geoprocessor/GPOptions.js";import{gpEncode as u,decode as b}from"../geoprocessor/utils.js";import m from"./GPMessage.js";import{enumeration as j}from"../../core/accessorSupport/decorators/enumeration.js";var p;const h=o()({esriJobCancelled:"job-cancelled",esriJobCancelling:"job-cancelling",esriJobDeleted:"job-deleted",esriJobDeleting:"job-deleting",esriJobTimedOut:"job-timed-out",esriJobExecuting:"job-executing",esriJobFailed:"job-failed",esriJobNew:"job-new",esriJobSubmitted:"job-submitted",esriJobSucceeded:"job-succeeded",esriJobWaiting:"job-waiting"},{ignoreUnknown:!1}),d=1e3;let g=class extends s{static{p=this}constructor(e){super(e),this.jobId=null,this.jobStatus=null,this.messages=null,this.progress=null,this.requestOptions=null,this.sourceUrl=null,this._cancelJobTimer=void 0,this._jobCompletionTimer=void 0}async cancelJob(e){const{jobId:o,sourceUrl:s}=this,{path:a}=n(s),c={...this.requestOptions,...e,query:{f:"json"}},l=`${a}/jobs/${o}/cancel`,{data:u}=await t(l,c),{messages:b,jobStatus:m,progress:j}=p.fromJSON(u);return this.set({messages:b,jobStatus:m,progress:j}),"job-cancelled"===m?this:new Promise((t,o)=>{r(c.signal,()=>{this.clearCancelJobTimer(),o(i())}),this.clearCancelJobTimer();const s=()=>{this._cancelJobTimer||o(i()),this.checkJobStatus(e).then(({jobStatus:e})=>{switch(e){case"job-cancelling":default:this._cancelJobTimer=setTimeout(s,d);break;case"job-deleted":case"job-deleting":case"job-executing":case"job-failed":case"job-new":case"job-submitted":case"job-succeeded":case"job-timed-out":case"job-waiting":o(this);break;case"job-cancelled":t(this)}}).catch(e=>{o(e)})};this._cancelJobTimer=setTimeout(s,d)})}destroy(){clearInterval(this._cancelJobTimer),clearInterval(this._jobCompletionTimer)}async checkJobStatus(e){const{path:o}=n(this.sourceUrl),s={...this.requestOptions,...e,query:{...e?.query,f:"json"}},r=`${o}/jobs/${this.jobId}`,{data:i}=await t(r,s),{messages:a,jobStatus:c,progress:l}=p.fromJSON(i);return this.set({messages:a,jobStatus:c,progress:l}),this}async fetchResultData(e,o,s){o=l.from(o||{});const{returnColumnName:r,returnFeatureCollection:i,returnM:a,returnZ:c,outSpatialReference:m}=o,{path:j}=n(this.sourceUrl),p={returnColumnName:r||null,returnFeatureCollection:i||null,returnM:a||null,returnZ:c||null,outSR:m,returnType:"data",f:"json",...s?.query},h=u(p,null),d={...this.requestOptions,...s,query:h},g=`${j}/jobs/${this.jobId}/results/${e}`,{data:J}=await t(g,d);return b(J)}async fetchResultImage(e,o,s){const{path:r}=n(this.sourceUrl),i={...o.toJSON(),f:"json"},a=u(i),c={...this.requestOptions,...s,query:a},l=`${r}/jobs/${this.jobId}/results/${e}`,{data:m}=await t(l,c);return b(m)}async fetchResultMapImageLayer(){const{path:e}=n(this.sourceUrl),t=e.indexOf("/GPServer/"),o=`${e.slice(0,Math.max(0,t))}/MapServer/jobs/${this.jobId}`;return new(0,(await import("../../layers/MapImageLayer.js")).default)({url:o})}async waitForJobCompletion(e={}){const{interval:t=d,signal:o,statusCallback:s,apiKey:a}=e;return new Promise((e,c)=>{r(o,()=>{this.clearJobCompletionTimer(),c(i())}),this.clearJobCompletionTimer();const n=()=>{this._jobCompletionTimer||c(i()),this.checkJobStatus({query:{token:a}}).then(({jobStatus:o})=>{switch(o){case"job-succeeded":e(this);break;case"job-executing":case"job-new":case"job-submitted":case"job-waiting":s&&s(this),this._jobCompletionTimer=setTimeout(n,t);break;case"job-cancelled":case"job-cancelling":case"job-deleted":case"job-deleting":case"job-failed":case"job-timed-out":c(this);break;default:this._jobCompletionTimer=setTimeout(n,t)}}).catch(e=>{c(e)})};this._jobCompletionTimer=setTimeout(n,t)})}clearCancelJobTimer(){clearTimeout(this._cancelJobTimer),this._cancelJobTimer=void 0}clearJobCompletionTimer(){clearTimeout(this._jobCompletionTimer),this._jobCompletionTimer=void 0}};e([a()],g.prototype,"jobId",void 0),e([j(h,{ignoreUnknown:!1})],g.prototype,"jobStatus",void 0),e([a({type:[m]})],g.prototype,"messages",void 0),e([a()],g.prototype,"progress",void 0),e([a()],g.prototype,"requestOptions",void 0),e([a({json:{write:!0}})],g.prototype,"sourceUrl",void 0),g=p=e([c("esri.rest.support.JobInfo")],g);export{g as default};
|