@arcgis/core 5.0.0-next.6 → 5.0.0-next.8
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/applications/KnowledgeStudio/resourceSerializationUtils.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{8f56f298e7c1a283f407.js → 0030d68d9edf42b4af57.js} +1 -1
- package/assets/esri/core/workers/chunks/01d460398f3ba6767a37.js +1 -0
- package/assets/esri/core/workers/chunks/{17d5f8dba6ebb1184506.js → 042cd64e1f4eb326c30f.js} +1 -1
- package/assets/esri/core/workers/chunks/05429f9d292a7a714309.js +316 -0
- package/assets/esri/core/workers/chunks/{66db5f77e09d25e33951.js → 063905fbf9a0c6586949.js} +1 -1
- package/assets/esri/core/workers/chunks/{9486032af3e934d85582.js → 0a5d74414dd02a2fb8e1.js} +1 -1
- package/assets/esri/core/workers/chunks/{3815ffa13e7b439bca6e.js → 0d5212f59e9b62c16164.js} +1 -1
- package/assets/esri/core/workers/chunks/{73487b9d85e726e9c012.js → 1257c37bf04d39c27b62.js} +1 -1
- package/assets/esri/core/workers/chunks/{398f356b11fd33bd3831.js → 136a7d781dad05a7463b.js} +1 -1
- package/assets/esri/core/workers/chunks/{1e4e7aedf4b779241a02.js → 15c7c10ff9ac63f0e792.js} +1 -1
- package/assets/esri/core/workers/chunks/17784cf16fa91504b9ea.js +1 -0
- package/assets/esri/core/workers/chunks/{a395373e3173e6458a56.js → 1ab37e13947d0e2e4181.js} +1 -1
- package/assets/esri/core/workers/chunks/{f03635ddf56e2ef90e4c.js → 1d06fcae4c2f02fb1c95.js} +1 -1
- package/assets/esri/core/workers/chunks/{020c8913d8e35d63080b.js → 1d15d1b20dc10fde6def.js} +1 -1
- package/assets/esri/core/workers/chunks/1dfca37f95f2b968aa54.js +1 -0
- package/assets/esri/core/workers/chunks/20975513be0a3a1da286.js +1 -0
- package/assets/esri/core/workers/chunks/{285762ff92d5388b6024.js → 2166238a7ad63a2d43c7.js} +1 -1
- package/assets/esri/core/workers/chunks/{620a94b54be3ed78350d.js → 22ca80f491e070b2a5e7.js} +1 -1
- package/assets/esri/core/workers/chunks/{88074189fa10c335370b.js → 24cd7b84cd0f3de4bff2.js} +1 -1
- package/assets/esri/core/workers/chunks/{9fac5a12e878cd745354.js → 28020063048e644f17a5.js} +1 -1
- package/assets/esri/core/workers/chunks/{95c594a87b732f5c4979.js → 2a8dff8521e1e6a10cf6.js} +1 -1
- package/assets/esri/core/workers/chunks/{7e43c105f1cfc44b7bd0.js → 2fa01bd3f3608616fd7f.js} +1 -1
- package/assets/esri/core/workers/chunks/30e220f4f843681a4cdd.js +1 -0
- package/assets/esri/core/workers/chunks/{5d3661d1fe46dd29aae9.js → 311b564e44ae637c960d.js} +1 -1
- package/assets/esri/core/workers/chunks/31c7ce65e16f7858400f.js +1 -0
- package/assets/esri/core/workers/chunks/{8a314b3790313e6dc5db.js → 333b62dad3811cff0f14.js} +1 -1
- package/assets/esri/core/workers/chunks/36d067c8d03d7a894f5f.js +1 -0
- package/assets/esri/core/workers/chunks/{e31192ae920e3e19b6aa.js → 37c1f155da14de91565a.js} +1 -1
- package/assets/esri/core/workers/chunks/{aa54b6f2aba6952af149.js → 38cc18fd93c18815ded0.js} +1 -1
- package/assets/esri/core/workers/chunks/{c55c096669677321a227.js → 38cd3648932bf2534b0f.js} +1 -1
- package/assets/esri/core/workers/chunks/{ac26e3e77df4302f47a2.js → 3afb83f5de033dda89ec.js} +1 -1
- package/assets/esri/core/workers/chunks/{f5e47eea8720ba84665b.js → 3c07aa2015ab1dff5f7b.js} +1 -1
- package/assets/esri/core/workers/chunks/{e9311386f58f3cb95c22.js → 42a1e71d09e8583a7327.js} +1 -1
- package/assets/esri/core/workers/chunks/443dfe7029ec208f670c.js +1 -0
- package/assets/esri/core/workers/chunks/{b75930d60449eceb0f1c.js → 4baf6f6e7ddedb25f806.js} +1 -1
- package/assets/esri/core/workers/chunks/{bb5484b5eeacc9ad2ceb.js → 4d0cbf9584446f411a37.js} +1 -1
- package/assets/esri/core/workers/chunks/{17103e6542aae53c7301.js → 4e3e27673d0671fc2b58.js} +1 -1
- package/assets/esri/core/workers/chunks/{5fc7b61f467f1d60a284.js → 51ab2acac4ecc1ca9c34.js} +1 -1
- package/assets/esri/core/workers/chunks/{fc4417d1260b717a9385.js → 52282f767bd0e99ddca0.js} +1 -1
- package/assets/esri/core/workers/chunks/{fc06014fb484fc8c697e.js → 53654edd766d9b4ef750.js} +1 -1
- package/assets/esri/core/workers/chunks/{90f8b4bda28af43ea019.js → 538f509d7fc8337d37ac.js} +1 -1
- package/assets/esri/core/workers/chunks/{ed8a85efbd90241512bb.js → 588533c3abe876f20f62.js} +1 -1
- package/assets/esri/core/workers/chunks/{c8733cd621105afab2ac.js → 59d3cac32ad6dad941dc.js} +1 -1
- package/assets/esri/core/workers/chunks/{72846fb9c87c6642daf0.js → 5e2ce34def5e053913b2.js} +1 -1
- package/assets/esri/core/workers/chunks/{8c056eac35d05d9524b7.js → 5f29422a051311ef9b3c.js} +1 -1
- package/assets/esri/core/workers/chunks/5f402b3c00bc4afc77b2.js +1 -0
- package/assets/esri/core/workers/chunks/{ff35a077ac6776469805.js → 61d970ed75c2c358b1e9.js} +1 -1
- package/assets/esri/core/workers/chunks/{7a6a96edc892d7060b7d.js → 629127877042ad784ad2.js} +1 -1
- package/assets/esri/core/workers/chunks/{fd2efd1d1cf9d95a87e6.js → 63a6f3e70d2b6ea57e40.js} +1 -1
- package/assets/esri/core/workers/chunks/{90b2b43b8b54c9a1ec35.js → 664ae441617afe4b17ec.js} +1 -1
- package/assets/esri/core/workers/chunks/{c4e4da69969499a89a2c.js → 695cdef5057e5461078a.js} +1 -1
- package/assets/esri/core/workers/chunks/{4c5a7249a311070d8f43.js → 6af18d7a0d314d7c1756.js} +1 -1
- package/assets/esri/core/workers/chunks/{f35aaa04cca676c2d3f8.js → 6b59f94040c7d2f6728a.js} +1 -1
- package/assets/esri/core/workers/chunks/{811d4c46c75cf6a63e78.js → 6bb7dbc46787b8e34bd9.js} +1 -1
- package/assets/esri/core/workers/chunks/6d9f2b113d6bde936a04.js +1 -0
- package/assets/esri/core/workers/chunks/{5132ca68e8c7af111a47.js → 6e22b02a9715c10578d0.js} +1 -1
- package/assets/esri/core/workers/chunks/{cd1930f08e1fc8b30b14.js → 6ee2f0f708494102a493.js} +1 -1
- package/assets/esri/core/workers/chunks/{f0e0a63962784acb4ba1.js → 6f0aec7428021e440ac9.js} +1 -1
- package/assets/esri/core/workers/chunks/{deb2854bb7d082a26f52.js → 7005d956c990a04ee8b2.js} +1 -1
- package/assets/esri/core/workers/chunks/{a3991ae8caa713d4ddcd.js → 731f7b552dde0fb325cd.js} +1 -1
- package/assets/esri/core/workers/chunks/{464d42bebb365287808d.js → 773f2c6c9d38db76dfed.js} +1 -1
- package/assets/esri/core/workers/chunks/{3f3d492f1093b7832aab.js → 7803495f8862d9025bcd.js} +1 -1
- package/assets/esri/core/workers/chunks/78694ad8229347903f41.js +1 -0
- package/assets/esri/core/workers/chunks/7e4c14d4502e3f06d94b.js +1 -0
- package/assets/esri/core/workers/chunks/{7544316a75dbd981aea6.js → 86cb097deec50b0da3f3.js} +1 -1
- package/assets/esri/core/workers/chunks/8a40ed2ee4b032822c30.js +1 -0
- package/assets/esri/core/workers/chunks/{09de8be660174a229efb.js → 8cbb28476151a37ae958.js} +1 -1
- package/assets/esri/core/workers/chunks/{62a49cfd9a2508950e9f.js → 8fedfd33c37172dba6bf.js} +1 -1
- package/assets/esri/core/workers/chunks/90cbd627d4113db3b686.js +1 -0
- package/assets/esri/core/workers/chunks/91aa1157da32f650983b.js +1 -0
- package/assets/esri/core/workers/chunks/{e7638b9ab6674bc8a18f.js → 91dfd29e2dba200eab09.js} +1 -1
- package/assets/esri/core/workers/chunks/{794748fd1edc29a621cd.js → 9698f36c143953a975d4.js} +1 -1
- package/assets/esri/core/workers/chunks/98584902c9db6faa3e4d.js +1 -0
- package/assets/esri/core/workers/chunks/9e5e05d6430712b0b1bc.js +1 -0
- package/assets/esri/core/workers/chunks/{6f4bd0ee85e7e5a74340.js → a31635a6366347dcef0f.js} +1 -1
- package/assets/esri/core/workers/chunks/a6ee40dfc471d6612f3c.js +1 -0
- package/assets/esri/core/workers/chunks/{ccc0da0e01f023c8aa1f.js → a876d6159ca120c1567e.js} +1 -1
- package/assets/esri/core/workers/chunks/{a4db5c9a90107e097df8.js → af47272aaaef0ea57e71.js} +1 -1
- package/assets/esri/core/workers/chunks/{d1fe816b6990918c13c7.js → afc13d5b842275db7dbc.js} +1 -1
- package/assets/esri/core/workers/chunks/aff8e40a641c6822af1d.js +1 -0
- package/assets/esri/core/workers/chunks/{22d6b8102e75bdef204c.js → b0365cbc3d2a41969e3b.js} +1 -1
- package/assets/esri/core/workers/chunks/{79968c183135281d2a6f.js → b3613a38178cad2ebc82.js} +1 -1
- package/assets/esri/core/workers/chunks/b548910e820d731ffe8a.js +1 -0
- package/assets/esri/core/workers/chunks/{5bd36dbf46c25bd961c8.js → b708792c84620b73c847.js} +1 -1
- package/assets/esri/core/workers/chunks/c29486c4eeb3e72effff.js +1 -0
- package/assets/esri/core/workers/chunks/{2b94623cabc6ae0f86ce.js → c37f7756d48ff9af2656.js} +1 -1
- package/assets/esri/core/workers/chunks/{1c52999a6392370844a6.js → c4090a60d149a5962179.js} +1 -1
- package/assets/esri/core/workers/chunks/{73c1d43070b4fe1e5c1e.js → c8e686efe344a33a0258.js} +1 -1
- package/assets/esri/core/workers/chunks/{6bb5158de43c4b59107f.js → c9b16fd41cd59d452522.js} +1 -1
- package/assets/esri/core/workers/chunks/ce98416437cc1a89d8ea.js +1 -0
- package/assets/esri/core/workers/chunks/{279366e6b743f9680603.js → cfff044859e6e6dcc75d.js} +1 -1
- package/assets/esri/core/workers/chunks/d07f911d40bf05fc0306.js +1 -0
- package/assets/esri/core/workers/chunks/{8833c3d168951be4bf20.js → d0d79dd3e88eecf5c314.js} +1 -1
- package/assets/esri/core/workers/chunks/{76ae1702fecc7ad7017c.js → d1e97cce5047f1791e22.js} +1 -1
- package/assets/esri/core/workers/chunks/{17acde0245ecd956306c.js → d233cc33497a663450f9.js} +1 -1
- package/assets/esri/core/workers/chunks/{36fe6b8228e622407ec2.js → d8793eead02491136841.js} +1 -1
- package/assets/esri/core/workers/chunks/{dedc4583b5f32a278124.js → d88f2fe680b8d5603ef8.js} +1 -1
- package/assets/esri/core/workers/chunks/{4d599008e1ea42321b37.js → da24ad57747714ac5eda.js} +1 -1
- package/assets/esri/core/workers/chunks/{facb3886714222772ab2.js → ddfd01bb9ba8577c3ffc.js} +1 -1
- package/assets/esri/core/workers/chunks/{50d9f69d5255af4b29bb.js → df5afa06c6deb6b40109.js} +1 -1
- package/assets/esri/core/workers/chunks/e25c4b4a03270d48f408.js +1 -0
- package/assets/esri/core/workers/chunks/e3294318daf1192b8319.js +1 -0
- package/assets/esri/core/workers/chunks/{da573ecc68e6aa8f6da9.js → e767f83f9e2de6650f80.js} +1 -1
- package/assets/esri/core/workers/chunks/e9d4cae2144974489d6e.js +1 -0
- package/assets/esri/core/workers/chunks/{91df8638b8b904e6d8c5.js → ead8d0cbcebd12dbfad7.js} +1 -1
- package/assets/esri/core/workers/chunks/{f9324e88c359c03f35aa.js → eb9c166db0db6fa60e95.js} +1 -1
- package/assets/esri/core/workers/chunks/{8ffd4710d168c2fcfd96.js → ebf23b46db56aaa88841.js} +1 -1
- package/assets/esri/core/workers/chunks/{bc241c7735e4efba734a.js → f34e3fa0c5b28531e289.js} +1 -1
- package/assets/esri/core/workers/chunks/f64037a88ab03662dc2a.js +1 -0
- package/assets/esri/core/workers/chunks/{d97fadbc69e055d183a0.js → f77f4bd6a577b92cf66f.js} +1 -1
- package/assets/esri/core/workers/chunks/{16d66770ef841564ee3f.js → f89c90f98c85667b0ebc.js} +1 -1
- package/assets/esri/core/workers/chunks/{4c4227b0ea21a5e429ab.js → fb192de7e4fa152342bb.js} +1 -1
- package/assets/esri/core/workers/chunks/fbd8d2f61f8a15bcf3db.js +1 -0
- package/assets/esri/core/workers/chunks/{2f78861afe0e9037dd8d.js → fe49321dca22dc60d105.js} +1 -1
- package/assets/esri/core/workers/chunks/{fe77ae6cf232a7a3298e.js → fef45bc59c71f88c60b5.js} +1 -1
- package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
- package/chunks/MultiPathImpl.js +1 -1
- package/chunks/Point2D.js +1 -1
- package/chunks/UnitFactory.js +1 -1
- package/config.js +1 -1
- package/core/QueueProcessor.js +1 -1
- package/core/SetUtils.js +1 -1
- package/core/has.js +1 -1
- package/geometry/operators/gx/operatorOffset.js +1 -1
- package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
- package/identity/Credential.js +1 -1
- package/identity/IdentityManager.js +1 -1
- package/identity/IdentityManagerBase.js +1 -1
- package/interfaces.d.ts +67 -27
- package/kernel.js +1 -1
- package/layers/FeatureLayer.js +1 -1
- package/layers/SceneLayer.js +1 -1
- package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/graphics/sources/connections/GeoEventConnection.js +1 -1
- package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
- package/layers/orientedImagery/core/ExposurePoint.js +1 -1
- package/layers/support/fieldConfigUtils.js +1 -1
- package/layers/support/rasterDatasets/pixelReader.js +1 -1
- package/layers/support/source/DataLayerSource.js +1 -1
- package/package.json +3 -3
- package/popup/FieldInfo.js +1 -1
- package/processRequest.js +5 -0
- package/request.js +1 -1
- package/requestConfig.js +5 -0
- package/requestQueue.js +5 -0
- package/rest/query/executeForCount.js +1 -1
- package/rest/query/executeForExtent.js +1 -1
- package/rest/query/executeForIds.js +1 -1
- package/rest/query/executeQueryJSON.js +1 -1
- package/rest/query/executeQueryPBF.js +1 -1
- package/rest/query/operations/query.js +1 -1
- package/rest/support/BaseImageMeasureResultValue.js +5 -0
- package/rest/support/ImageAreaResult.js +1 -1
- package/rest/support/ImageDistanceResult.js +1 -1
- package/rest/support/ImageHeightResult.js +1 -1
- package/rest/support/ImageMeasureResultAngleValue.js +5 -0
- package/rest/support/ImageMeasureResultAreaValue.js +5 -0
- package/rest/support/ImageMeasureResultLengthValue.js +5 -0
- package/rest/support/ImageWithType.js +5 -0
- package/rest/support/imageMeasureUtils.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles2D.js +1 -1
- package/views/2d/layers/FeatureLayerView2D.js +1 -1
- package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
- package/views/2d/layers/features/schema/SourceSchema.js +1 -1
- package/views/2d/layers/features/sources/FeatureSource.js +1 -1
- package/views/2d/layers/features/sources/strategies/AFeatureLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/ALoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/ParquetSnapshotLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/ParquetTileLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/Overrides.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/SourceChunkStore.js +1 -1
- package/views/{3d/support/ImageWithType.js → 2d/layers/features/sources/strategies/constants.js} +1 -1
- package/views/2d/layers/features/sources/strategies/support/queryAdapters.js +1 -1
- package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/volumeMeasurementErrors.js +1 -1
- package/views/3d/glTF/DefaultLoadingContext.js +1 -1
- package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js +1 -1
- package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
- package/views/3d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles3D.js +1 -1
- package/views/3d/layers/ElevationLayerView3D.js +1 -1
- package/views/3d/layers/FeatureLayerViewBase3D.js +1 -1
- package/views/3d/layers/PointCloudLayerView3D.js +1 -1
- package/views/3d/layers/graphics/FeatureGraphics3DGraphicsPipeline.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbolCreationContext.js +1 -1
- package/views/3d/layers/graphics/ObjectResourceCache.js +1 -1
- package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
- package/views/3d/layers/graphics/pipeline/Feature3DPipeline.js +1 -1
- package/views/3d/layers/graphics/pipeline/fetching/Tile3DFetcher.js +1 -1
- package/views/3d/layers/graphics/wosrLoader.js +1 -1
- package/views/3d/layers/i3s/I3SDataRequester.js +5 -0
- package/views/3d/layers/i3s/I3SIndex.js +1 -1
- package/views/3d/layers/i3s/I3SNodeLoader.js +1 -1
- package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
- package/views/3d/layers/support/FeatureTile.js +1 -1
- package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
- package/views/3d/layers/support/MediaLayerInteractionOptions.js +1 -1
- package/views/3d/layers/support/MediaLayerInteractionReshapeOptions.js +5 -0
- package/views/3d/layers/support/SampledGeometryMaxDistanceRatio.js +5 -0
- package/views/3d/layers/support/featureTileQuery3D.js +1 -1
- package/views/3d/layers/support/fetchTile.js +1 -1
- package/views/3d/support/ResourceController.js +1 -1
- package/views/3d/support/SharedSymbolResources.js +1 -1
- package/views/3d/support/StreamTextureCollection.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
- package/views/3d/webgl-engine/lighting/SceneLighting.js +1 -1
- package/views/3d/webgl-engine/shaders/AnimatedLine.glsl.js +6 -0
- package/views/SceneView.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileTool.js +1 -1
- package/views/analysis/ElevationProfile/elevationProfileGeometryUtils.js +1 -1
- package/views/draw/MultipointDrawAction.js +1 -1
- package/views/draw/PointDrawAction.js +1 -1
- package/views/draw/PolygonDrawAction.js +1 -1
- package/views/draw/PolylineDrawAction.js +1 -1
- package/views/draw/SegmentDrawAction.js +1 -1
- package/views/draw/input/CursorUpdateEvents.js +5 -0
- package/views/draw/input/DrawCompleteEvent.js +5 -0
- package/views/draw/input/VertexAddEvent.js +5 -0
- package/views/draw/input/VertexRemoveEvent.js +5 -0
- package/views/draw/input/VertexUpdateEvent.js +5 -0
- package/views/interactive/editGeometry/CheckpointingEditGeometryOperations.js +5 -0
- package/views/interactive/editGeometry/EditGeometry.js +1 -1
- package/views/interactive/editGeometry/operations/ReplayableAppendVertex.js +5 -0
- package/views/interactive/snapping/featureSources/FeatureServiceSnappingSource.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorkerHandle.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTileStore.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiledFetcher.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTilesSimple.js +1 -1
- package/webscene/spec-certification/api.js +1 -1
- package/widgets/CoordinateConversion/CoordinateConversionViewModel.js +1 -1
- package/widgets/CoordinateConversion.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/sketch/TriangulatedMeasurementAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/galleryUtils.js +1 -1
- package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
- package/widgets/PanoramicViewer/PanoramicZoomManager.js +1 -1
- package/widgets/PanoramicViewer/support/PanoramicMeshManager.js +1 -1
- package/widgets/PanoramicViewer/support/PanoramicTileNode.js +1 -1
- package/widgets/PanoramicViewer/support/PanoramicTilePyramid.js +1 -1
- package/widgets/PanoramicViewer/support/getVisibleTiles.js +5 -0
- package/widgets/Sketch/CreateToolVisibilityMap.js +5 -0
- package/widgets/Sketch/SelectionToolVisibilityMap.js +5 -0
- package/widgets/Sketch/VisibleElements.js +1 -1
- package/widgets/Sketch.js +1 -1
- package/assets/esri/core/workers/chunks/02e69f0c63d97661da60.js +0 -1
- package/assets/esri/core/workers/chunks/05eee334d58a0b9f6316.js +0 -1
- package/assets/esri/core/workers/chunks/087973e7c4fea5fcfa5e.js +0 -1
- package/assets/esri/core/workers/chunks/326a76a4e80269d4029d.js +0 -1
- package/assets/esri/core/workers/chunks/377a66034e7c1bad5599.js +0 -1
- package/assets/esri/core/workers/chunks/4442817beb7a76c95770.js +0 -1
- package/assets/esri/core/workers/chunks/459a67928bde4a62b6a4.js +0 -1
- package/assets/esri/core/workers/chunks/53bd8996e8812f1ad7b2.js +0 -1
- package/assets/esri/core/workers/chunks/557960763695abee4a83.js +0 -1
- package/assets/esri/core/workers/chunks/6201356f7f91e5c06425.js +0 -1
- package/assets/esri/core/workers/chunks/6c3b99209d542efa64d4.js +0 -1
- package/assets/esri/core/workers/chunks/7413e582bc2b16af6a0f.js +0 -1
- package/assets/esri/core/workers/chunks/7461124454bfb4fb6474.js +0 -1
- package/assets/esri/core/workers/chunks/75bf27271a31e26e1b21.js +0 -1
- package/assets/esri/core/workers/chunks/7aaaebbabee27690283c.js +0 -1
- package/assets/esri/core/workers/chunks/7c4a63aeead2505d6f02.js +0 -1
- package/assets/esri/core/workers/chunks/90250e9239c173aace88.js +0 -1
- package/assets/esri/core/workers/chunks/9786f91455350eaae493.js +0 -1
- package/assets/esri/core/workers/chunks/99859dce1925b406ccd0.js +0 -1
- package/assets/esri/core/workers/chunks/9c5cbf8810f37b1a4718.js +0 -1
- package/assets/esri/core/workers/chunks/9e8dceef4c961f56940d.js +0 -1
- package/assets/esri/core/workers/chunks/a06bac9b8f9e18874de8.js +0 -316
- package/assets/esri/core/workers/chunks/a712cdff78fc826acd8c.js +0 -1
- package/assets/esri/core/workers/chunks/d305a21666b1ed5bf33d.js +0 -1
- package/assets/esri/core/workers/chunks/d40f57f9fc47f9a9f97c.js +0 -1
- package/assets/esri/core/workers/chunks/e82f5437bd66779c6740.js +0 -1
- package/assets/esri/core/workers/chunks/f4d0ae6be1b3984228d0.js +0 -1
- package/assets/esri/core/workers/chunks/f6c8beb60f6d29945a2e.js +0 -1
- package/assets/esri/core/workers/chunks/f746e3f7ebff2bbdf333.js +0 -1
- package/views/3d/layers/i3s/I3SStreamDataController.js +0 -5
- package/views/3d/support/StreamDataLoader.js +0 -5
- package/views/3d/support/StreamDataRequester.js +0 -5
- package/views/3d/support/downloadSlots.js +0 -5
- package/views/draw/input/DrawEvents.js +0 -5
package/interfaces.d.ts
CHANGED
|
@@ -3289,14 +3289,23 @@ declare namespace __esri {
|
|
|
3289
3289
|
}
|
|
3290
3290
|
|
|
3291
3291
|
interface resourceSerializationUtils {
|
|
3292
|
-
fetchAndConvertSerializedKnowledgeIdMap(idCollectionsUrl: string, generateAllSublayers?: boolean): Promise<InclusionModeDefinitionOptimizedGeometry>;
|
|
3293
|
-
fetchAndConvertSerializedLinkChart(serializedResourceURLs: SerializedResourceURLs): Promise<InclusionModeDefinitionOptimizedGeometry>;
|
|
3292
|
+
fetchAndConvertSerializedKnowledgeIdMap(idCollectionsUrl: string, generateAllSublayers?: boolean, options?: resourceSerializationUtilsGeneralOptions): Promise<InclusionModeDefinitionOptimizedGeometry>;
|
|
3293
|
+
fetchAndConvertSerializedLinkChart(serializedResourceURLs: SerializedResourceURLs, options?: resourceSerializationUtilsGeneralOptions): Promise<InclusionModeDefinitionOptimizedGeometry>;
|
|
3294
3294
|
serializeInclusionDefinitionToAllPbf(inclusionDefinition: InclusionModeDefinitionOptimizedGeometry, kg: KnowledgeGraph, endpointMap: globalThis.Map<string, string[]>): Promise<SerializedFeatureCollections>;
|
|
3295
3295
|
serializeInclusionDefinitionToIdCollectionsMapPbf(inclusionDefinition: InclusionModeDefinitionOptimizedGeometry): Promise<Uint8Array>;
|
|
3296
3296
|
}
|
|
3297
3297
|
|
|
3298
3298
|
export const resourceSerializationUtils: resourceSerializationUtils;
|
|
3299
3299
|
|
|
3300
|
+
/**
|
|
3301
|
+
* Note: reserved for internal use only, this is not part of the stable public API.
|
|
3302
|
+
*
|
|
3303
|
+
* General options for web link chart methods.
|
|
3304
|
+
*/
|
|
3305
|
+
export interface resourceSerializationUtilsGeneralOptions {
|
|
3306
|
+
signal?: AbortSignal | nullish;
|
|
3307
|
+
}
|
|
3308
|
+
|
|
3300
3309
|
export interface SerializedFeatureCollections {
|
|
3301
3310
|
entitiesFC: Uint8Array;
|
|
3302
3311
|
relationshipsFC: Uint8Array;
|
|
@@ -19908,12 +19917,6 @@ declare namespace __esri {
|
|
|
19908
19917
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#datesInUnknownTimezone Read more...}
|
|
19909
19918
|
*/
|
|
19910
19919
|
declare readonly datesInUnknownTimezone: FeatureLayerBase["datesInUnknownTimezone"];
|
|
19911
|
-
/**
|
|
19912
|
-
* An array of default field configuration objects that define the display properties of fields.
|
|
19913
|
-
*
|
|
19914
|
-
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#defaultFieldConfigurations Read more...}
|
|
19915
|
-
*/
|
|
19916
|
-
readonly defaultFieldConfigurations: FieldConfiguration[] | nullish;
|
|
19917
19920
|
/**
|
|
19918
19921
|
* The SQL where clause used to filter features on the client.
|
|
19919
19922
|
*
|
|
@@ -20454,6 +20457,12 @@ declare namespace __esri {
|
|
|
20454
20457
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#clone Read more...}
|
|
20455
20458
|
*/
|
|
20456
20459
|
clone(): this;
|
|
20460
|
+
/**
|
|
20461
|
+
* Creates default field configuration objects that define the display properties of fields.
|
|
20462
|
+
*
|
|
20463
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#createFieldConfigurations Read more...}
|
|
20464
|
+
*/
|
|
20465
|
+
createFieldConfigurations(): FieldConfiguration[] | nullish;
|
|
20457
20466
|
/**
|
|
20458
20467
|
* Creates a popup template for the layer, populated with all the fields of the layer.
|
|
20459
20468
|
*
|
|
@@ -36095,7 +36104,7 @@ declare namespace __esri {
|
|
|
36095
36104
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-FieldsIndex.html#dateFields Read more...}
|
|
36096
36105
|
*/
|
|
36097
36106
|
dateFields: Field[] | any[];
|
|
36098
|
-
constructor(
|
|
36107
|
+
constructor(fields?: any);
|
|
36099
36108
|
/**
|
|
36100
36109
|
* Returns a field with the specified field name.
|
|
36101
36110
|
*
|
|
@@ -36670,6 +36679,13 @@ declare namespace __esri {
|
|
|
36670
36679
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html#repeatLabel Read more...}
|
|
36671
36680
|
*/
|
|
36672
36681
|
repeatLabel: boolean;
|
|
36682
|
+
/**
|
|
36683
|
+
* Indicates whether to use domain names if the fields in the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html#labelExpression labelExpression}
|
|
36684
|
+
* or {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html#labelExpressionInfo labelExpressionInfo} have domains.
|
|
36685
|
+
*
|
|
36686
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html#useCodedValues Read more...}
|
|
36687
|
+
*/
|
|
36688
|
+
useCodedValues: boolean;
|
|
36673
36689
|
/**
|
|
36674
36690
|
* A SQL where clause used to determine the features to which the label class should be applied.
|
|
36675
36691
|
*
|
|
@@ -36824,6 +36840,13 @@ declare namespace __esri {
|
|
|
36824
36840
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html#symbol Read more...}
|
|
36825
36841
|
*/
|
|
36826
36842
|
symbol?: (TextSymbolProperties & { type: "text" }) | (LabelSymbol3DProperties & { type: "label-3d" });
|
|
36843
|
+
/**
|
|
36844
|
+
* Indicates whether to use domain names if the fields in the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html#labelExpression labelExpression}
|
|
36845
|
+
* or {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html#labelExpressionInfo labelExpressionInfo} have domains.
|
|
36846
|
+
*
|
|
36847
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html#useCodedValues Read more...}
|
|
36848
|
+
*/
|
|
36849
|
+
useCodedValues?: boolean;
|
|
36827
36850
|
/**
|
|
36828
36851
|
* A SQL where clause used to determine the features to which the label class should be applied.
|
|
36829
36852
|
*
|
|
@@ -62895,9 +62918,11 @@ declare namespace __esri {
|
|
|
62895
62918
|
/**
|
|
62896
62919
|
* Triggers the loading of the feature service instance and fetches all layers and tables.
|
|
62897
62920
|
*
|
|
62921
|
+
* @param options Additional options.
|
|
62922
|
+
*
|
|
62898
62923
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-featureService-FeatureService.html#fetchAllLayersAndTables Read more...}
|
|
62899
62924
|
*/
|
|
62900
|
-
fetchAllLayersAndTables(): Promise<ServiceContents>;
|
|
62925
|
+
fetchAllLayersAndTables(options?: FeatureServiceFetchAllLayersAndTablesOptions | nullish): Promise<ServiceContents>;
|
|
62901
62926
|
/**
|
|
62902
62927
|
* `isFulfilled()` may be used to verify if creating an instance of the class is fulfilled (either resolved or rejected).
|
|
62903
62928
|
*
|
|
@@ -62972,6 +62997,10 @@ declare namespace __esri {
|
|
|
62972
62997
|
usePreviousEditMoment?: boolean;
|
|
62973
62998
|
}
|
|
62974
62999
|
|
|
63000
|
+
export interface FeatureServiceFetchAllLayersAndTablesOptions {
|
|
63001
|
+
signal?: AbortSignal | nullish;
|
|
63002
|
+
}
|
|
63003
|
+
|
|
62975
63004
|
export interface FeatureServiceLoadOptions {
|
|
62976
63005
|
signal?: AbortSignal | nullish;
|
|
62977
63006
|
}
|
|
@@ -96395,8 +96424,7 @@ declare namespace __esri {
|
|
|
96395
96424
|
*
|
|
96396
96425
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-analysis-VolumeMeasurement-VolumeMeasurementError.html#VolumeMeasurementErrorName Read more...}
|
|
96397
96426
|
*/
|
|
96398
|
-
export type VolumeMeasurementErrorName = | "
|
|
96399
|
-
| "distance-too-far"
|
|
96427
|
+
export type VolumeMeasurementErrorName = | "distance-too-far"
|
|
96400
96428
|
| "distance-too-close"
|
|
96401
96429
|
| "perimeter-too-large"
|
|
96402
96430
|
| "unsupported-coordinate-system"
|
|
@@ -113636,7 +113664,7 @@ declare namespace __esri {
|
|
|
113636
113664
|
*/
|
|
113637
113665
|
declare goToOverride: GoTo["goToOverride"];
|
|
113638
113666
|
/**
|
|
113639
|
-
* Describes the current mode
|
|
113667
|
+
* Describes the current mode.
|
|
113640
113668
|
*
|
|
113641
113669
|
* @default "live"
|
|
113642
113670
|
*
|
|
@@ -113653,7 +113681,7 @@ declare namespace __esri {
|
|
|
113653
113681
|
readonly state: "ready" | "loading" | "disabled";
|
|
113654
113682
|
/**
|
|
113655
113683
|
* If this property is set to `true`, sessionStorage or localStorage (depending on {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#storageType storageType})
|
|
113656
|
-
* will be used to hydrate and persist the CoordinateConversion
|
|
113684
|
+
* will be used to hydrate and persist the CoordinateConversion's state.
|
|
113657
113685
|
*
|
|
113658
113686
|
* @default true
|
|
113659
113687
|
*
|
|
@@ -113661,7 +113689,7 @@ declare namespace __esri {
|
|
|
113661
113689
|
*/
|
|
113662
113690
|
storageEnabled: boolean;
|
|
113663
113691
|
/**
|
|
113664
|
-
* This property determines whether sessionStorage or localStorage will be used to store
|
|
113692
|
+
* This property determines whether sessionStorage or localStorage will be used to store state.
|
|
113665
113693
|
*
|
|
113666
113694
|
* @default "session"
|
|
113667
113695
|
*
|
|
@@ -113682,14 +113710,14 @@ declare namespace __esri {
|
|
|
113682
113710
|
constructor(properties?: CoordinateConversionViewModelProperties);
|
|
113683
113711
|
/**
|
|
113684
113712
|
* A {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html Collection} containing every {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Conversion.html Conversion}
|
|
113685
|
-
* that
|
|
113713
|
+
* that is currently displaying.
|
|
113686
113714
|
*
|
|
113687
113715
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#conversions Read more...}
|
|
113688
113716
|
*/
|
|
113689
113717
|
get conversions(): Collection<Conversion>;
|
|
113690
113718
|
set conversions(value: CollectionProperties<ConversionProperties>);
|
|
113691
113719
|
/**
|
|
113692
|
-
* Describes the location of the coordinates currently displayed
|
|
113720
|
+
* Describes the location of the coordinates currently displayed as a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html Point}.
|
|
113693
113721
|
*
|
|
113694
113722
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#currentLocation Read more...}
|
|
113695
113723
|
*/
|
|
@@ -113697,14 +113725,14 @@ declare namespace __esri {
|
|
|
113697
113725
|
set currentLocation(value: PointProperties | nullish);
|
|
113698
113726
|
/**
|
|
113699
113727
|
* A {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html Collection} containing every {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html Format}
|
|
113700
|
-
* that
|
|
113728
|
+
* that is capable of displaying.
|
|
113701
113729
|
*
|
|
113702
113730
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#formats Read more...}
|
|
113703
113731
|
*/
|
|
113704
113732
|
get formats(): Collection<Format>;
|
|
113705
113733
|
set formats(value: CollectionProperties<FormatProperties>);
|
|
113706
113734
|
/**
|
|
113707
|
-
* This symbol is used to visualize the location currently
|
|
113735
|
+
* This symbol is used to visualize the location currently, when `capture` mode
|
|
113708
113736
|
* is active.
|
|
113709
113737
|
*
|
|
113710
113738
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#locationSymbol Read more...}
|
|
@@ -113784,20 +113812,20 @@ declare namespace __esri {
|
|
|
113784
113812
|
interface CoordinateConversionViewModelProperties extends GoToProperties {
|
|
113785
113813
|
/**
|
|
113786
113814
|
* A {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html Collection} containing every {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Conversion.html Conversion}
|
|
113787
|
-
* that
|
|
113815
|
+
* that is currently displaying.
|
|
113788
113816
|
*
|
|
113789
113817
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#conversions Read more...}
|
|
113790
113818
|
*/
|
|
113791
113819
|
conversions?: CollectionProperties<ConversionProperties>;
|
|
113792
113820
|
/**
|
|
113793
|
-
* Describes the location of the coordinates currently displayed
|
|
113821
|
+
* Describes the location of the coordinates currently displayed as a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html Point}.
|
|
113794
113822
|
*
|
|
113795
113823
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#currentLocation Read more...}
|
|
113796
113824
|
*/
|
|
113797
113825
|
currentLocation?: PointProperties | nullish;
|
|
113798
113826
|
/**
|
|
113799
113827
|
* A {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html Collection} containing every {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html Format}
|
|
113800
|
-
* that
|
|
113828
|
+
* that is capable of displaying.
|
|
113801
113829
|
*
|
|
113802
113830
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#formats Read more...}
|
|
113803
113831
|
*/
|
|
@@ -113811,7 +113839,7 @@ declare namespace __esri {
|
|
|
113811
113839
|
*/
|
|
113812
113840
|
goToOverride?: GoToProperties["goToOverride"];
|
|
113813
113841
|
/**
|
|
113814
|
-
* This symbol is used to visualize the location currently
|
|
113842
|
+
* This symbol is used to visualize the location currently, when `capture` mode
|
|
113815
113843
|
* is active.
|
|
113816
113844
|
*
|
|
113817
113845
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#locationSymbol Read more...}
|
|
@@ -113821,20 +113849,20 @@ declare namespace __esri {
|
|
|
113821
113849
|
| (PointSymbol3DProperties & { type: "point-3d" })
|
|
113822
113850
|
| (CIMSymbolProperties & { type: "cim" });
|
|
113823
113851
|
/**
|
|
113824
|
-
* Describes the current mode
|
|
113852
|
+
* Describes the current mode.
|
|
113825
113853
|
*
|
|
113826
113854
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#mode Read more...}
|
|
113827
113855
|
*/
|
|
113828
113856
|
mode?: "live" | "capture";
|
|
113829
113857
|
/**
|
|
113830
113858
|
* If this property is set to `true`, sessionStorage or localStorage (depending on {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#storageType storageType})
|
|
113831
|
-
* will be used to hydrate and persist the CoordinateConversion
|
|
113859
|
+
* will be used to hydrate and persist the CoordinateConversion's state.
|
|
113832
113860
|
*
|
|
113833
113861
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#storageEnabled Read more...}
|
|
113834
113862
|
*/
|
|
113835
113863
|
storageEnabled?: boolean;
|
|
113836
113864
|
/**
|
|
113837
|
-
* This property determines whether sessionStorage or localStorage will be used to store
|
|
113865
|
+
* This property determines whether sessionStorage or localStorage will be used to store state.
|
|
113838
113866
|
*
|
|
113839
113867
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-CoordinateConversionViewModel.html#storageType Read more...}
|
|
113840
113868
|
*/
|
|
@@ -132497,9 +132525,13 @@ declare namespace __esri {
|
|
|
132497
132525
|
zoomScale?: number | nullish;
|
|
132498
132526
|
}
|
|
132499
132527
|
|
|
132500
|
-
export type GetResultsHandler = (
|
|
132528
|
+
export type GetResultsHandler = (
|
|
132529
|
+
params: GetResultsHandlerParams,
|
|
132530
|
+
options?: GetResultsHandlerOptions,
|
|
132531
|
+
) => Promise<SearchSearchResult[] | nullish>;
|
|
132501
132532
|
export type GetSuggestionsParameters = (
|
|
132502
132533
|
params: GetSuggestionsParametersParams,
|
|
132534
|
+
options?: GetSuggestionsParametersOptions,
|
|
132503
132535
|
) => Promise<SearchSuggestResult[] | nullish>;
|
|
132504
132536
|
|
|
132505
132537
|
export interface SearchSourceFilter {
|
|
@@ -132507,6 +132539,10 @@ declare namespace __esri {
|
|
|
132507
132539
|
geometry?: GeometryUnion;
|
|
132508
132540
|
}
|
|
132509
132541
|
|
|
132542
|
+
export interface GetResultsHandlerOptions {
|
|
132543
|
+
signal?: AbortSignal | nullish;
|
|
132544
|
+
}
|
|
132545
|
+
|
|
132510
132546
|
export interface GetResultsHandlerParams {
|
|
132511
132547
|
exactMatch?: boolean;
|
|
132512
132548
|
location?: Point;
|
|
@@ -132517,6 +132553,10 @@ declare namespace __esri {
|
|
|
132517
132553
|
view?: MapView | SceneView;
|
|
132518
132554
|
}
|
|
132519
132555
|
|
|
132556
|
+
export interface GetSuggestionsParametersOptions {
|
|
132557
|
+
signal?: AbortSignal | nullish;
|
|
132558
|
+
}
|
|
132559
|
+
|
|
132520
132560
|
export interface GetSuggestionsParametersParams {
|
|
132521
132561
|
suggestTerm: string;
|
|
132522
132562
|
maxSuggestions?: number;
|
package/kernel.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 has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.0";let s,r=e;function i(o){s=o}function t(e){const r=s?.findCredential(e);return r?.token?o(e,"token",r.token):e}r="5.0.0-next.
|
|
5
|
+
import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.0";let s,r=e;function i(o){s=o}function t(e){const r=s?.findCredential(e);return r?.token?o(e,"token",r.token):e}r="5.0.0-next.8",has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,r as fullVersion,s as id,i as setId,e as version};
|
package/layers/FeatureLayer.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"../PopupTemplate.js";import r from"../request.js";import{ClonableMixin as i}from"../core/Clonable.js";import o from"../core/Collection.js";import s from"../core/Error.js";import{clone as a}from"../core/lang.js";import n from"../core/Logger.js";import{destroyMaybe as l}from"../core/maybe.js";import{MultiOriginJSONMixin as p}from"../core/MultiOriginJSONSupport.js";import{setDeepValue as u}from"../core/object.js";import{debounce as d,throwIfAbortError as y,whenOrAbort as c}from"../core/promiseUtils.js";import{sqlAnd as m}from"../core/sql.js";import{property as f}from"../core/accessorSupport/decorators/property.js";import{cast as h}from"../core/accessorSupport/decorators/cast.js";import{reader as b}from"../core/accessorSupport/decorators/reader.js";import{subclass as g}from"../core/accessorSupport/decorators/subclass.js";import{writer as w}from"../core/accessorSupport/decorators/writer.js";import{excludeTables as v}from"../core/accessorSupport/layerContainerType.js";import F from"../form/FormTemplate.js";import T from"../geometry/SpatialReference.js";import j from"../graphic/FeatureGraphicOrigin.js";import S from"./Layer.js";import{MemorySource as I}from"./graphics/sources/MemorySource.js";import{APIKeyMixin as E}from"./mixins/APIKeyMixin.js";import{ArcGISService as L}from"./mixins/ArcGISService.js";import{BlendLayer as D}from"./mixins/BlendLayer.js";import{CustomParametersMixin as C}from"./mixins/CustomParametersMixin.js";import{DisplayFilteredLayer as _}from"./mixins/DisplayFilteredLayer.js";import{EditBusLayer as P}from"./mixins/EditBusLayer.js";import{FeatureEffectLayer as x}from"./mixins/FeatureEffectLayer.js";import{FeatureLayerBase as O}from"./mixins/FeatureLayerBase.js";import{FeatureReductionLayer as q}from"./mixins/FeatureReductionLayer.js";import{OperationalLayer as M}from"./mixins/OperationalLayer.js";import{OrderedLayer as A}from"./mixins/OrderedLayer.js";import{PortalLayer as Q}from"./mixins/PortalLayer.js";import{PublishableLayer as R}from"./mixins/PublishableLayer.js";import{RefreshableLayer as U}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as V}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as N}from"./mixins/TemporalLayer.js";import{TrackableLayer as B}from"./mixins/TrackableLayer.js";import{titleFromUrlAndName as G,parse as J,cleanTitle as $}from"./support/arcgisLayerUrl.js";import{attributeTableTemplate as W,id as Z,labelsVisible as H,opacityDrawingInfo as z,legendEnabled as k,listMode as K,popupEnabled as X,screenSizePerspectiveEnabled as Y}from"./support/commonProperties.js";import{ensureLayerCredential as ee,computeEffectiveEditingEnabled as te,readGlobalIdField as re,readObjectIdField as ie,createDefaultRenderer as oe,addAttachment as se,updateAttachment as ae,applyEdits as ne,uploadAssets as le,createQuery as pe,deleteAttachments as ue,fetchRecomputedExtents as de,getFeatureType as ye,getFieldDomain as ce,queryAttachments as me,queryObjectIds as fe,queryFeatureCount as he,queryExtent as be,queryRelatedFeatures as ge,queryRelatedFeaturesCount as we,validateBinsQuery as ve,hasDataChanged as Fe,geometryTypeKebabDict as Te}from"./support/featureLayerUtils.js";import je from"./support/FeatureTemplate.js";import Se from"./support/FeatureType.js";import Ie from"./support/FieldConfiguration.js";import{popupTemplateWithFieldConfigurations as Ee,fieldConfigurationsFromPopupTemplate as Le,fieldConfigurationsFromFields as De}from"./support/fieldConfigUtils.js";import{defineFieldProperties as Ce}from"./support/fieldProperties.js";import{fixRendererFields as _e,fixTimeInfoFields as Pe}from"./support/fieldUtils.js";import xe from"./support/LabelClass.js";import{reader as Oe}from"./support/labelingInfo.js";import{getFeatureLayerCapabilities as qe}from"./support/serviceCapabilitiesUtils.js";import Me from"./support/TimeInfo.js";import Ae from"./support/TitleCreator.js";import{serviceSupportsSpatialReference as Qe}from"./support/versionUtils.js";import{DataLayerSource as Re}from"./support/source/DataLayerSource.js";import{read as Ue}from"../renderers/support/jsonUtils.js";import{loadStyleRenderer as Ve}from"../renderers/support/styleUtils.js";import{webSceneRendererTypes as Ne,rendererTypes as Be}from"../renderers/support/typeUtils.js";import Ge from"../rest/support/FeatureSet.js";import Je from"../rest/support/Query.js";import{isNumber as $e}from"../support/guards.js";import{createPopupTemplate as We}from"../support/popupUtils.js";import{symbolTypes as Ze}from"../symbols/support/typeUtils.js";import{opacityToTransparency as He}from"../webdoc/support/opacityUtils.js";const ze="FeatureLayer";function ke(e,t){return new s("layer:unsupported",`Layer (${e.title}, ${e.id}) of type '${e.declaredClass}' ${t}`,{layer:e})}function Ke(e){return e&&e instanceof o}const Xe=Ce();function Ye(e,t,r){const i=!!r?.writeLayerSchema;return{enabled:i,ignoreOrigin:i}}let et=class extends(O(q(x(R(P(_(D(A(N(B(V(U(L(M(Q(p(C(E(i(S)))))))))))))))))))){constructor(...e){super(...e),this.attributeTableTemplate=null,this.charts=null,this.copyright=null,this.displayField=null,this.dynamicDataSource=null,this.fields=null,this.fieldsIndex=null,this.formTemplate=null,this.fullExtent=null,this.geometryType=null,this.graphicOrigin=new j(this),this.hasM=void 0,this.hasZ=void 0,this.infoFor3D=null,this.isTable=!1,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.objectIdField=null,this.operationalLayerType="ArcGISFeatureLayer",this.outFields=null,this.path=null,this.popupEnabled=!0,this.popupTemplate=null,this.resourceInfo=null,this.screenSizePerspectiveEnabled=!0,this.spatialReference=T.WGS84,this.subtypeCode=null,this.supportedSourceTypes=new Set(["Feature Layer","Oriented Imagery Layer","Table","Catalog Layer"]),this.templates=null,this.timeInfo=null,this.title=null,this.sublayerTitleMode="item-title",this.type="feature",this.typeIdField=null,this.types=null,this.visible=!0,this._debouncedSaveOperations=d(async(e,t,r)=>{const{save:i,saveAs:o}=await import("./save/featureLayerUtils.js");switch(e){case 0:return i(this,t);case 1:return o(this,r,t)}})}destroy(){this.source?.destroy()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;if(this.portalItem?.loaded&&this.source)return this.addResolvingPromise(this.createGraphicsSource(t).then(e=>this.initLayerProperties(e))),Promise.resolve(this);const r=this.loadFromPortal({supportedTypes:["Feature Service","Feature Collection","Scene Service"]},e).catch(y).then(async()=>{if(this.url&&null==this.layerId&&/FeatureServer|MapServer\/*$/i.test(this.url)){const e=await this._fetchFirstValidLayerId(t);null!=e&&(this.layerId=e)}if(!this.url&&!this._hasMemorySource())throw new s("feature-layer:missing-url-or-source","Feature layer must be created with either a url or a source");return this.initLayerProperties(await this.createGraphicsSource(t))}).then(()=>ee(this,"load",e));return this.addResolvingPromise(r),Promise.resolve(this)}get _titleCreator(){const e=this._get("_titleCreator");return l(e),new Ae({fieldsIndex:this.fieldsIndex,objectIdField:this.objectIdField,fields:this.fields,displayField:this.displayField,effectivePopupTemplate:this.popupTemplate??this.defaultPopupTemplate})}readCapabilities(e,t){return t=t.layerDefinition||t,qe(t,this.url)}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("dynamicDataSource"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("gdbVersion"),this.commitProperty("historicMoment"),this.commitProperty("returnZ"),this.commitProperty("capabilities"),this.commitProperty("returnM"),(this._get("createQueryVersion")??0)+1}get editingEnabled(){return!(this.loaded&&!this.capabilities?.operations.supportsEditing)&&(this._isOverridden("editingEnabled")?this._get("editingEnabled"):this._hasMemorySource()||this.userHasEditingPrivileges)}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}readEditingEnabled(e,t){return this._readEditingEnabled(t,!1)}readEditingEnabledFromWebMap(e,t,r){return this._readEditingEnabled(t,!0,r)}writeEditingEnabled(e,t){this._writeEditingEnabled(e,t,!1)}writeEditingEnabledToWebMap(e,t,r,i){this._writeEditingEnabled(e,t,!0,i)}get effectiveEditingEnabled(){return te(this)}get featureTitleFields(){return[...this._titleCreator.requiredFields]}set fieldConfigurations(e){if(this._hasMemorySource())return;if(this._override("fieldConfigurations",e),!this.loaded)return;const t=Ee(this,e);t&&this._set("popupTemplate",t)}get fieldConfigurations(){if(!this._hasMemorySource())return this._isOverridden("fieldConfigurations")?this._get("fieldConfigurations"):Le(this)||null}get defaultFieldConfigurations(){return De(this)}readIsTable(e,t){return"Table"===(t=t?.layerDefinition??t).type||!t.geometryType}writeIsTable(e,t,r,i){i?.writeLayerSchema&&u(r,e?"Table":"Feature Layer",t)}readGlobalIdField(e,t){return re(t.layerDefinition||t)}readObjectIdField(e,t){return ie(t.layerDefinition||t)}writePopupTemplate(e,t,r,i){e&&(t[r]=e.toJSON({...i,writeFieldFormat:!i?.writeLayerSchema}))}get defaultPopupTemplate(){return this.createPopupTemplate()}set renderer(e){_e(e,this.fieldsIndex),this._set("renderer",e)}readRenderer(e,t,r){t=t.layerDefinition||t;const i=t.drawingInfo?.renderer;if(i){const e=Ue(i,t,r)??void 0;return e||n.getLogger(this).error("Failed to create renderer",{rendererDefinition:t.drawingInfo.renderer,layer:this,context:r}),e}return oe(t,r)}set source(e){const t=this._get("source");t!==e&&(Ke(t)&&this._resetMemorySource(t),Ke(e)&&this._initMemorySource(e),this._set("source",e))}castSource(e){return e?Array.isArray(e)||e instanceof o?new I({layer:this,items:e}):e:null}readSource(e,t){const r=Ge.fromJSON(t.featureSet);return new I({layer:this,items:r?.features??[]})}readTemplates(e,t){const r=t.editFieldsInfo,i=r?.creatorField,o=r?.editorField;return e=e?.map(e=>je.fromJSON(e)),this._fixTemplates(e,i),this._fixTemplates(e,o),e}readTitle(e,t){const r=t.layerDefinition?.name??t.name,i=t.title||t.layerDefinition?.title;if(r){const e=this.portalItem?.title;if("item-title"===this.sublayerTitleMode)return this.url?G(this.url,r):r;let t=r;if(!t&&this.url){const e=J(this.url);null!=e&&(t=e.title)}if(!t)return;return"item-title-and-service-name"===this.sublayerTitleMode&&e&&e!==t&&(t=e+" - "+t),$(t)}if("item-title"===this.sublayerTitleMode&&i)return i}readTitleFromWebMap(e,t){return t.title||t.layerDefinition?.name}readTypeIdField(e,t){let r=(t=t.layerDefinition||t).typeIdField;if(r&&t.fields){r=r.toLowerCase();const e=t.fields.find(e=>e.name.toLowerCase()===r);e&&(r=e.name)}return r}readTypes(e,t){e=(t=t.layerDefinition||t).types;const r=t.editFieldsInfo,i=r?.creatorField,o=r?.editorField;return e?.map(e=>(e=Se.fromJSON(e),this._fixTemplates(e.templates,i),this._fixTemplates(e.templates,o),e))}readVisible(e,t){return null!=t.layerDefinition?.defaultVisibility?!!t.layerDefinition.defaultVisibility:null!=t.visibility?!!t.visibility:void 0}async addAttachment(e,t){const r=await se(this,e,t,ze);return this.lastEditsEventDate=new Date,r}async updateAttachment(e,t,r){const i=await ae(this,e,t,r,ze);return this.lastEditsEventDate=new Date,i}async applyEdits(e,t){return ne(this,e,t)}async uploadAssets(e,t){return le(this,e,t)}createPopupTemplate(e){return We(this,e)}async createGraphicsSource(e){if(this._hasMemorySource()&&this.source)return this.source.load({signal:e});const{default:t}=await c(import("./graphics/sources/FeatureLayerSource.js"),e);return new t({layer:this,supportedSourceTypes:this.supportedSourceTypes}).load({signal:e})}createQuery(){const e=pe(this);e.dynamicDataSource=this.dynamicDataSource;const t=null!=this.subtypeCode?`${this.subtypeField} = ${this.subtypeCode}`:null,r=m(this.definitionExpression,t);return e.where=r||"1=1",e}async deleteAttachments(e,t){const r=await ue(this,e,t,ze);return this.lastEditsEventDate=new Date,r}async fetchRecomputedExtents(e){return de(this,e,ze)}async getFeatureTitle(e,t){return this._titleCreator.getTitle(this,e,t)}async getFeatureTitles(e,t){return this._titleCreator.getTitles(this,e,t)}getFeatureType(e){return ye(this.types,this.typeIdField,e)}getFieldAlias(e){const t=this.getField(e);if(t)return this.getFieldConfiguration(t.name)?.alias||t.alias}getFieldConfiguration(e){return e=e.toLowerCase(),this.fieldConfigurations?.find(t=>t.name.toLowerCase()===e)}getFieldDomain(e,t){return ce(this,e,t,this.getField(e)?.domain??null)}async queryAttachments(e,t){return me(this,e,t,ze)}async queryFeatures(e,t){const r=await this.load(),i=await r.source.queryFeatures(Je.from(e)??r.createQuery(),t),o=this.graphicOrigin;if(i?.features)for(const s of i.features)s.layer=s.sourceLayer=r,s.origin=o;return i}async queryObjectIds(e,t){return await fe(this,e,t,ze)}async queryFeatureCount(e,t){return he(this,e,t,ze)}async queryExtent(e,t){return be(this,e,t,ze)}async queryRelatedFeatures(e,t){return ge(this,e,t,ze)}async queryRelatedFeaturesCount(e,t){return we(this,e,t,ze)}async queryPivot(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryPivot||!i?.operations?.supportsQueryPivot)throw new s(ze,"Layer source does not support queryPivot capability");const o=await import("../rest/support/PivotQuery.js"),a=await r.queryPivot(o.default.from(e),t);if(a?.features)for(const s of a.features)s.layer=s.sourceLayer=this;return a}async queryTopFeatures(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryTopFeatures||!i?.query?.supportsTopFeaturesQuery)throw new s(ze,"Layer source does not support queryTopFeatures capability");const o=await import("../rest/support/TopFeaturesQuery.js"),a=await r.queryTopFeatures(o.default.from(e),t);if(a?.features)for(const s of a.features)s.layer=s.sourceLayer=this;return a}async queryAttributeBins(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryAttributeBins)throw new s(ze,"Layer source does not support queryAttributeBins capability");ve(e,i,ze);const o=await import("../rest/support/AttributeBinsQuery.js"),a=await r.queryAttributeBins(o.default.from(e),t);if(a.features)for(const s of a.features)s.layer=s.sourceLayer=this;return a}async queryTopObjectIds(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryTopObjectIds||!i?.query.supportsTopFeaturesQuery)throw new s(ze,"Layer source does not support queryTopObjectIds capability");const o=await import("../rest/support/TopFeaturesQuery.js");return(await r.queryTopObjectIds(o.default.from(e),t)).filter($e)}async queryTopFeaturesExtent(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryTopExtents||!i?.query?.supportsTopFeaturesQuery)throw new s(ze,"Layer source does not support queryTopExtents capability");const o=await import("../rest/support/TopFeaturesQuery.js");return r.queryTopExtents(o.default.from(e),t)}async queryTopFeatureCount(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryTopCount||!i?.query?.supportsTopFeaturesQuery)throw new s(ze,"Layer source does not support queryFeatureCount capability");const o=await import("../rest/support/TopFeaturesQuery.js");return r.queryTopCount(o.default.from(e),t)}read(e,t){const r=e.featureCollection;if((r||"Feature Collection"===e.type)&&(this.resourceInfo=e),r){const{layers:e,showLegend:i}=r;1===e?.length&&(super.read(e[0],t),null!=i&&super.read({showLegend:i},t))}super.read(e,t),t&&"service"===t.origin&&(this.revert(["objectIdField","fields","timeInfo","dateFieldsTimeZone"],"service"),this.spatialReference||this.revert(["spatialReference"],"service"))}write(e,t){t={...t,origin:t?.origin??void 0,writeLayerSchema:t?.writeLayerSchema??this._hasMemorySource()};const{origin:r,layerContainerType:i,messages:o}=t;if(this.dynamicDataSource)return o?.push(ke(this,"using a dynamic data source cannot be written to web scenes, web maps and feature service items")),null;if(this.isTable){if(("web-map"===r||"web-scene"===r)&&"tables"!==i)return o?.push(ke(this,`a table source can only be written to tables, not ${i}`)),null;if(this._hasMemorySource())return o?.push(ke(this,"using an in-memory table source cannot be written to web scenes and web maps")),null}else if(this.loaded&&("web-map"===r||"web-scene"===r)&&"tables"===i)return o?.push(ke(this,"using a non-table source cannot be written to tables in web maps or web scenes")),null;return super.write(e,t)}clone(){if(this._hasMemorySource())throw new s(ze,`FeatureLayer (title: ${this.title}, id: ${this.id}) created using in-memory source cannot be cloned`);return super.clone()}serviceSupportsSpatialReference(e){return!!this.loaded&&("memory"===this.source?.type||Qe(this,e))}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}_readEditingEnabled(e,t,r){let i=e.layerDefinition?.capabilities;return i?this._hasEditingCapability(i):(i=e.capabilities,t&&"web-map"===r?.origin&&!this._hasMemorySource()&&i?this._hasEditingCapability(i):void 0)}_hasEditingCapability(e){return e.toLowerCase().split(",").map(e=>e.trim()).includes("editing")}_writeEditingEnabled(e,t,r,i){if(!e){const e=this.capabilities?.operations?.supportsSync?"Query,Sync":"Query";u("layerDefinition.capabilities",e,t),r&&!i?.writeLayerSchema&&(t.capabilities=e)}}_fetchFirstValidLayerId(e){return r(this.url??"",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e}).then(e=>{const t=e.data;if(t)return this.applyPreferredHost(t),this.findFirstValidLayerId(t)})}async initLayerProperties(e){return this._set("source",e),e.sourceJSON&&(this.sourceJSON=e.sourceJSON,this.read(e.sourceJSON,{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl})),this._verifySource(),this._verifyFields(),_e(this.renderer,this.fieldsIndex),Pe(this.timeInfo,this.fieldsIndex),this._hasMemorySource()&&"mesh"===this.geometryType&&(this.capabilities.query.supportsReturnMesh=!0),Ve(this,{origin:"service"})}async hasDataChanged(){return Fe(this)}async fetchPublishingStatus(){const e=this.source;return e?.fetchPublishingStatus?e.fetchPublishingStatus():"unavailable"}_verifyFields(){const e=this.parsedUrl?.path??"undefined";this.objectIdField||console.log("FeatureLayer: 'objectIdField' property is not defined (url: "+e+")"),this.isTable||this._hasMemorySource()||-1!==e.search(/\/FeatureServer\//i)||this.fields?.some(e=>"geometry"===e.type)||console.log("FeatureLayer: unable to find field of type 'geometry' in the layer 'fields' list. If you are using a map service layer, features will not have geometry (url: "+e+")")}_fixTemplates(e,t){e&&e.forEach(e=>{const r=e.prototype?.attributes;r&&t&&delete r[t]})}_verifySource(){if(this._hasMemorySource()){if(this.url)throw new s("feature-layer:mixed-source-and-url","FeatureLayer cannot be created with both an in-memory source and a url")}else if(!this.url)throw new s("feature-layer:source-or-url-required","FeatureLayer requires either a url, a valid portal item or a source")}_initMemorySource(e){e.forEach(e=>{e.layer=this,e.sourceLayer=this}),this.addHandles([e.on("after-add",e=>{e.item.layer=this,e.item.sourceLayer=this}),e.on("after-remove",e=>{e.item.layer=null,e.item.sourceLayer=null})],"fl-source")}_resetMemorySource(e){e.forEach(e=>{e.layer=null,e.sourceLayer=null}),this.removeHandles("fl-source")}_hasMemorySource(){return!(this.url||!this.source)}findFirstValidLayerId(e){return Array.isArray(e.layers)&&e.layers.length>0?e.layers[0].id:Array.isArray(e.tables)&&e.tables.length>0?e.tables[0].id:void 0}};e([f({clonable:!1,readOnly:!0})],et.prototype,"_titleCreator",null),e([f(W)],et.prototype,"attributeTableTemplate",void 0),e([b("service","capabilities")],et.prototype,"readCapabilities",null),e([f({json:{origins:{"web-scene":{write:!1}},write:!0}})],et.prototype,"charts",void 0),e([f({readOnly:!0})],et.prototype,"createQueryVersion",null),e([f({json:{read:{source:"layerDefinition.copyrightText"}}})],et.prototype,"copyright",void 0),e([f({json:{read:{source:"layerDefinition.displayField"}}})],et.prototype,"displayField",void 0),e([f({types:Ze,readOnly:!0})],et.prototype,"defaultSymbol",void 0),e([f({type:Re})],et.prototype,"dynamicDataSource",void 0),e([f({type:Boolean})],et.prototype,"editingEnabled",null),e([b(["portal-item","web-scene"],"editingEnabled",["layerDefinition.capabilities"])],et.prototype,"readEditingEnabled",null),e([b("web-map","editingEnabled",["capabilities","layerDefinition.capabilities"])],et.prototype,"readEditingEnabledFromWebMap",null),e([w(["portal-item","web-scene"],"editingEnabled",{"layerDefinition.capabilities":{type:String}})],et.prototype,"writeEditingEnabled",null),e([w("web-map","editingEnabled",{capabilities:{type:String},"layerDefinition.capabilities":{type:String}})],et.prototype,"writeEditingEnabledToWebMap",null),e([f({readOnly:!0})],et.prototype,"effectiveEditingEnabled",null),e([f({clonable:!1,readOnly:!0})],et.prototype,"featureTitleFields",null),e([f({type:[Ie],json:{name:"layerDefinition.fieldConfigurations",write:{overridePolicy:(e,t,r)=>({enabled:!r?.writeLayerSchema})}}})],et.prototype,"fieldConfigurations",null),e([f({readOnly:!0})],et.prototype,"defaultFieldConfigurations",null),e([f({...Xe.fields,json:{read:{source:"layerDefinition.fields"},origins:{service:{name:"fields"},"web-map":{write:{target:"layerDefinition.fields",overridePolicy:Ye}}}}})],et.prototype,"fields",void 0),e([f(Xe.fieldsIndex)],et.prototype,"fieldsIndex",void 0),e([f({type:F,json:{name:"formInfo",write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],et.prototype,"formTemplate",void 0),e([f({json:{read:{source:"layerDefinition.extent"}}})],et.prototype,"fullExtent",void 0),e([f({json:{origins:{"web-map":{write:{target:"layerDefinition.geometryType",overridePolicy:Ye,writer(e,t,r){const i=e?Te.toJSON(e):null;i&&u(r,i,t)}}}},read:{source:"layerDefinition.geometryType",reader:Te.read}}})],et.prototype,"geometryType",void 0),e([f({readOnly:!0,clonable:!1})],et.prototype,"graphicOrigin",void 0),e([f({json:{read:{source:"layerDefinition.hasM"}}})],et.prototype,"hasM",void 0),e([f({json:{read:{source:"layerDefinition.hasZ"}}})],et.prototype,"hasZ",void 0),e([f(Z)],et.prototype,"id",void 0),e([f({readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],et.prototype,"infoFor3D",void 0),e([f({json:{origins:{"web-map":{write:{target:"layerDefinition.type"}}}}})],et.prototype,"isTable",void 0),e([b("service","isTable",["type","geometryType"]),b("isTable",["layerDefinition.type","layerDefinition.geometryType"])],et.prototype,"readIsTable",null),e([w("web-map","isTable")],et.prototype,"writeIsTable",null),e([f(H)],et.prototype,"labelsVisible",void 0),e([f({type:[xe],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:Oe,write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:Oe,write:{layerContainerTypes:v}}})],et.prototype,"labelingInfo",void 0),e([f((()=>{const e=a(z);return e.json.origins["portal-item"]={write:{target:"layerDefinition.drawingInfo.transparency",writer(e,t,r){u(r,He(e),t)}}},e})())],et.prototype,"opacity",void 0),e([f(k)],et.prototype,"legendEnabled",void 0),e([f({type:["show","hide"],json:(()=>{const e=a(K.json);return e.origins["portal-item"]={read:!1,write:!1},e})()})],et.prototype,"listMode",void 0),e([b("globalIdField",["layerDefinition.globalIdField","layerDefinition.fields"])],et.prototype,"readGlobalIdField",null),e([f({json:{origins:{"web-map":{write:{target:"layerDefinition.objectIdField",overridePolicy:Ye}}}}})],et.prototype,"objectIdField",void 0),e([b("objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"])],et.prototype,"readObjectIdField",null),e([f({type:["ArcGISFeatureLayer"],json:{write:{target:"layerType",ignoreOrigin:!0,layerContainerTypes:v}}})],et.prototype,"operationalLayerType",void 0),e([f(Xe.outFields)],et.prototype,"outFields",void 0),e([f({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],et.prototype,"path",void 0),e([f(X)],et.prototype,"popupEnabled",void 0),e([f({type:t,json:{name:"popupInfo",write:!0}})],et.prototype,"popupTemplate",void 0),e([w("popupTemplate")],et.prototype,"writePopupTemplate",null),e([f({readOnly:!0})],et.prototype,"defaultPopupTemplate",null),e([f({types:Be,json:{origins:{service:{write:{target:"drawingInfo.renderer",enabled:!1}},"web-scene":{types:Ne,name:"layerDefinition.drawingInfo.renderer",write:{layerContainerTypes:v,overridePolicy:(e,t,r)=>({ignoreOrigin:r?.writeLayerSchema,layerContainerTypes:v})}}},write:{target:"layerDefinition.drawingInfo.renderer",overridePolicy:(e,t,r)=>({ignoreOrigin:r?.writeLayerSchema,layerContainerTypes:v})}}})],et.prototype,"renderer",null),e([b("service","renderer",["drawingInfo.renderer","defaultSymbol"]),b("renderer",["layerDefinition.drawingInfo.renderer","layerDefinition.defaultSymbol"])],et.prototype,"readRenderer",null),e([f()],et.prototype,"resourceInfo",void 0),e([f((()=>{const e=a(Y);return e.json.origins["portal-item"]={read:!1,write:!1},e})())],et.prototype,"screenSizePerspectiveEnabled",void 0),e([f({clonable:!1})],et.prototype,"source",null),e([h("source")],et.prototype,"castSource",null),e([b("portal-item","source",["featureSet"]),b("web-map","source",["featureSet"])],et.prototype,"readSource",null),e([f({json:{read:{source:"layerDefinition.extent.spatialReference"}}})],et.prototype,"spatialReference",void 0),e([f({type:Number})],et.prototype,"subtypeCode",void 0),e([f({type:[je]})],et.prototype,"templates",void 0),e([b("templates",["editFieldsInfo","creatorField","editorField","templates"])],et.prototype,"readTemplates",null),e([f({type:Me})],et.prototype,"timeInfo",void 0),e([f()],et.prototype,"title",void 0),e([b("service","title",["name"]),b("portal-item","title",["layerDefinition.title","layerDefinition.name","title"])],et.prototype,"readTitle",null),e([b("web-map","title",["layerDefinition.name","title"])],et.prototype,"readTitleFromWebMap",null),e([f({type:String})],et.prototype,"sublayerTitleMode",void 0),e([f({json:{read:!1}})],et.prototype,"type",void 0),e([f({type:String})],et.prototype,"typeIdField",void 0),e([b("service","typeIdField"),b("typeIdField",["layerDefinition.typeIdField"])],et.prototype,"readTypeIdField",null),e([f({type:[Se]})],et.prototype,"types",void 0),e([b("service","types",["types"]),b("types",["layerDefinition.types"])],et.prototype,"readTypes",null),e([f({type:Boolean,json:{origins:{"portal-item":{write:{target:"layerDefinition.defaultVisibility",layerContainerTypes:v}}}}})],et.prototype,"visible",void 0),e([b("portal-item","visible",["visibility","layerDefinition.defaultVisibility"])],et.prototype,"readVisible",null),et=e([g("esri.layers.FeatureLayer")],et);export{et as default};
|
|
5
|
+
import{__decorate as e}from"tslib";import t from"../PopupTemplate.js";import r from"../request.js";import{ClonableMixin as i}from"../core/Clonable.js";import o from"../core/Collection.js";import s from"../core/Error.js";import{clone as a}from"../core/lang.js";import n from"../core/Logger.js";import{destroyMaybe as l}from"../core/maybe.js";import{MultiOriginJSONMixin as p}from"../core/MultiOriginJSONSupport.js";import{setDeepValue as u}from"../core/object.js";import{debounce as d,throwIfAbortError as y,whenOrAbort as c}from"../core/promiseUtils.js";import{sqlAnd as m}from"../core/sql.js";import{property as f}from"../core/accessorSupport/decorators/property.js";import{cast as h}from"../core/accessorSupport/decorators/cast.js";import{reader as b}from"../core/accessorSupport/decorators/reader.js";import{subclass as g}from"../core/accessorSupport/decorators/subclass.js";import{writer as w}from"../core/accessorSupport/decorators/writer.js";import{excludeTables as v}from"../core/accessorSupport/layerContainerType.js";import F from"../form/FormTemplate.js";import T from"../geometry/SpatialReference.js";import j from"../graphic/FeatureGraphicOrigin.js";import S from"./Layer.js";import{MemorySource as I}from"./graphics/sources/MemorySource.js";import{APIKeyMixin as E}from"./mixins/APIKeyMixin.js";import{ArcGISService as L}from"./mixins/ArcGISService.js";import{BlendLayer as D}from"./mixins/BlendLayer.js";import{CustomParametersMixin as C}from"./mixins/CustomParametersMixin.js";import{DisplayFilteredLayer as _}from"./mixins/DisplayFilteredLayer.js";import{EditBusLayer as P}from"./mixins/EditBusLayer.js";import{FeatureEffectLayer as x}from"./mixins/FeatureEffectLayer.js";import{FeatureLayerBase as O}from"./mixins/FeatureLayerBase.js";import{FeatureReductionLayer as q}from"./mixins/FeatureReductionLayer.js";import{OperationalLayer as M}from"./mixins/OperationalLayer.js";import{OrderedLayer as A}from"./mixins/OrderedLayer.js";import{PortalLayer as Q}from"./mixins/PortalLayer.js";import{PublishableLayer as R}from"./mixins/PublishableLayer.js";import{RefreshableLayer as U}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as V}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as N}from"./mixins/TemporalLayer.js";import{TrackableLayer as B}from"./mixins/TrackableLayer.js";import{titleFromUrlAndName as G,parse as J,cleanTitle as $}from"./support/arcgisLayerUrl.js";import{attributeTableTemplate as W,id as Z,labelsVisible as H,opacityDrawingInfo as z,legendEnabled as k,listMode as K,popupEnabled as X,screenSizePerspectiveEnabled as Y}from"./support/commonProperties.js";import{ensureLayerCredential as ee,computeEffectiveEditingEnabled as te,readGlobalIdField as re,readObjectIdField as ie,createDefaultRenderer as oe,addAttachment as se,updateAttachment as ae,applyEdits as ne,uploadAssets as le,createQuery as pe,deleteAttachments as ue,fetchRecomputedExtents as de,getFeatureType as ye,getFieldDomain as ce,queryAttachments as me,queryObjectIds as fe,queryFeatureCount as he,queryExtent as be,queryRelatedFeatures as ge,queryRelatedFeaturesCount as we,validateBinsQuery as ve,hasDataChanged as Fe,geometryTypeKebabDict as Te}from"./support/featureLayerUtils.js";import je from"./support/FeatureTemplate.js";import Se from"./support/FeatureType.js";import Ie from"./support/FieldConfiguration.js";import{popupTemplateWithFieldConfigurations as Ee,fieldConfigurationsFromPopupTemplate as Le,fieldConfigurationsFromFields as De}from"./support/fieldConfigUtils.js";import{defineFieldProperties as Ce}from"./support/fieldProperties.js";import{fixRendererFields as _e,fixTimeInfoFields as Pe}from"./support/fieldUtils.js";import xe from"./support/LabelClass.js";import{reader as Oe}from"./support/labelingInfo.js";import{getFeatureLayerCapabilities as qe}from"./support/serviceCapabilitiesUtils.js";import Me from"./support/TimeInfo.js";import Ae from"./support/TitleCreator.js";import{serviceSupportsSpatialReference as Qe}from"./support/versionUtils.js";import{DataLayerSource as Re}from"./support/source/DataLayerSource.js";import{read as Ue}from"../renderers/support/jsonUtils.js";import{loadStyleRenderer as Ve}from"../renderers/support/styleUtils.js";import{webSceneRendererTypes as Ne,rendererTypes as Be}from"../renderers/support/typeUtils.js";import Ge from"../rest/support/FeatureSet.js";import Je from"../rest/support/Query.js";import{isNumber as $e}from"../support/guards.js";import{createPopupTemplate as We}from"../support/popupUtils.js";import{symbolTypes as Ze}from"../symbols/support/typeUtils.js";import{opacityToTransparency as He}from"../webdoc/support/opacityUtils.js";const ze="FeatureLayer";function ke(e,t){return new s("layer:unsupported",`Layer (${e.title}, ${e.id}) of type '${e.declaredClass}' ${t}`,{layer:e})}function Ke(e){return e&&e instanceof o}const Xe=Ce();function Ye(e,t,r){const i=!!r?.writeLayerSchema;return{enabled:i,ignoreOrigin:i}}let et=class extends(O(q(x(R(P(_(D(A(N(B(V(U(L(M(Q(p(C(E(i(S)))))))))))))))))))){constructor(...e){super(...e),this.attributeTableTemplate=null,this.charts=null,this.copyright=null,this.displayField=null,this.dynamicDataSource=null,this.fields=null,this.fieldsIndex=null,this.formTemplate=null,this.fullExtent=null,this.geometryType=null,this.graphicOrigin=new j(this),this.hasM=void 0,this.hasZ=void 0,this.infoFor3D=null,this.isTable=!1,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.objectIdField=null,this.operationalLayerType="ArcGISFeatureLayer",this.outFields=null,this.path=null,this.popupEnabled=!0,this.popupTemplate=null,this.resourceInfo=null,this.screenSizePerspectiveEnabled=!0,this.spatialReference=T.WGS84,this.subtypeCode=null,this.supportedSourceTypes=new Set(["Feature Layer","Oriented Imagery Layer","Table","Catalog Layer"]),this.templates=null,this.timeInfo=null,this.title=null,this.sublayerTitleMode="item-title",this.type="feature",this.typeIdField=null,this.types=null,this.visible=!0,this._debouncedSaveOperations=d(async(e,t,r)=>{const{save:i,saveAs:o}=await import("./save/featureLayerUtils.js");switch(e){case 0:return i(this,t);case 1:return o(this,r,t)}})}destroy(){this.source?.destroy()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;if(this.portalItem?.loaded&&this.source)return this.addResolvingPromise(this.createGraphicsSource(t).then(e=>this.initLayerProperties(e))),Promise.resolve(this);const r=this.loadFromPortal({supportedTypes:["Feature Service","Feature Collection","Scene Service"]},e).catch(y).then(async()=>{if(this.url&&null==this.layerId&&/FeatureServer|MapServer\/*$/i.test(this.url)){const e=await this._fetchFirstValidLayerId(t);null!=e&&(this.layerId=e)}if(!this.url&&!this._hasMemorySource())throw new s("feature-layer:missing-url-or-source","Feature layer must be created with either a url or a source");return this.initLayerProperties(await this.createGraphicsSource(t))}).then(()=>ee(this,"load",e));return this.addResolvingPromise(r),Promise.resolve(this)}get _titleCreator(){const e=this._get("_titleCreator");return l(e),new Ae({fieldsIndex:this.fieldsIndex,objectIdField:this.objectIdField,fields:this.fields,displayField:this.displayField,effectivePopupTemplate:this.popupTemplate??this.defaultPopupTemplate})}readCapabilities(e,t){return t=t.layerDefinition||t,qe(t,this.url)}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("dynamicDataSource"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("gdbVersion"),this.commitProperty("historicMoment"),this.commitProperty("returnZ"),this.commitProperty("capabilities"),this.commitProperty("returnM"),(this._get("createQueryVersion")??0)+1}get editingEnabled(){return!(this.loaded&&!this.capabilities?.operations.supportsEditing)&&(this._isOverridden("editingEnabled")?this._get("editingEnabled"):this._hasMemorySource()||this.userHasEditingPrivileges)}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}readEditingEnabled(e,t){return this._readEditingEnabled(t,!1)}readEditingEnabledFromWebMap(e,t,r){return this._readEditingEnabled(t,!0,r)}writeEditingEnabled(e,t){this._writeEditingEnabled(e,t,!1)}writeEditingEnabledToWebMap(e,t,r,i){this._writeEditingEnabled(e,t,!0,i)}get effectiveEditingEnabled(){return te(this)}get featureTitleFields(){return[...this._titleCreator.requiredFields]}set fieldConfigurations(e){if(this._hasMemorySource())return;if(this._override("fieldConfigurations",e),!this.loaded)return;const t=Ee(this,e);t&&this._set("popupTemplate",t)}get fieldConfigurations(){if(!this._hasMemorySource())return this._isOverridden("fieldConfigurations")?this._get("fieldConfigurations"):Le(this)||null}readIsTable(e,t){return"Table"===(t=t?.layerDefinition??t).type||!t.geometryType}writeIsTable(e,t,r,i){i?.writeLayerSchema&&u(r,e?"Table":"Feature Layer",t)}readGlobalIdField(e,t){return re(t.layerDefinition||t)}readObjectIdField(e,t){return ie(t.layerDefinition||t)}writePopupTemplate(e,t,r,i){e&&(t[r]=e.toJSON({...i,writeFieldFormat:!i?.writeLayerSchema}))}get defaultPopupTemplate(){return this.createPopupTemplate()}set renderer(e){_e(e,this.fieldsIndex),this._set("renderer",e)}readRenderer(e,t,r){t=t.layerDefinition||t;const i=t.drawingInfo?.renderer;if(i){const e=Ue(i,t,r)??void 0;return e||n.getLogger(this).error("Failed to create renderer",{rendererDefinition:t.drawingInfo.renderer,layer:this,context:r}),e}return oe(t,r)}set source(e){const t=this._get("source");t!==e&&(Ke(t)&&this._resetMemorySource(t),Ke(e)&&this._initMemorySource(e),this._set("source",e))}castSource(e){return e?Array.isArray(e)||e instanceof o?new I({layer:this,items:e}):e:null}readSource(e,t){const r=Ge.fromJSON(t.featureSet);return new I({layer:this,items:r?.features??[]})}readTemplates(e,t){const r=t.editFieldsInfo,i=r?.creatorField,o=r?.editorField;return e=e?.map(e=>je.fromJSON(e)),this._fixTemplates(e,i),this._fixTemplates(e,o),e}readTitle(e,t){const r=t.layerDefinition?.name??t.name,i=t.title||t.layerDefinition?.title;if(r){const e=this.portalItem?.title;if("item-title"===this.sublayerTitleMode)return this.url?G(this.url,r):r;let t=r;if(!t&&this.url){const e=J(this.url);null!=e&&(t=e.title)}if(!t)return;return"item-title-and-service-name"===this.sublayerTitleMode&&e&&e!==t&&(t=e+" - "+t),$(t)}if("item-title"===this.sublayerTitleMode&&i)return i}readTitleFromWebMap(e,t){return t.title||t.layerDefinition?.name}readTypeIdField(e,t){let r=(t=t.layerDefinition||t).typeIdField;if(r&&t.fields){r=r.toLowerCase();const e=t.fields.find(e=>e.name.toLowerCase()===r);e&&(r=e.name)}return r}readTypes(e,t){e=(t=t.layerDefinition||t).types;const r=t.editFieldsInfo,i=r?.creatorField,o=r?.editorField;return e?.map(e=>(e=Se.fromJSON(e),this._fixTemplates(e.templates,i),this._fixTemplates(e.templates,o),e))}readVisible(e,t){return null!=t.layerDefinition?.defaultVisibility?!!t.layerDefinition.defaultVisibility:null!=t.visibility?!!t.visibility:void 0}async addAttachment(e,t){const r=await se(this,e,t,ze);return this.lastEditsEventDate=new Date,r}async updateAttachment(e,t,r){const i=await ae(this,e,t,r,ze);return this.lastEditsEventDate=new Date,i}async applyEdits(e,t){return ne(this,e,t)}async uploadAssets(e,t){return le(this,e,t)}createFieldConfigurations(){return De(this)}createPopupTemplate(e){return We(this,e)}async createGraphicsSource(e){if(this._hasMemorySource()&&this.source)return this.source.load({signal:e});const{default:t}=await c(import("./graphics/sources/FeatureLayerSource.js"),e);return new t({layer:this,supportedSourceTypes:this.supportedSourceTypes}).load({signal:e})}createQuery(){const e=pe(this);e.dynamicDataSource=this.dynamicDataSource;const t=null!=this.subtypeCode?`${this.subtypeField} = ${this.subtypeCode}`:null,r=m(this.definitionExpression,t);return e.where=r||"1=1",e}async deleteAttachments(e,t){const r=await ue(this,e,t,ze);return this.lastEditsEventDate=new Date,r}async fetchRecomputedExtents(e){return de(this,e,ze)}async getFeatureTitle(e,t){return this._titleCreator.getTitle(this,e,t)}async getFeatureTitles(e,t){return this._titleCreator.getTitles(this,e,t)}getFeatureType(e){return ye(this.types,this.typeIdField,e)}getFieldAlias(e){const t=this.getField(e);if(t)return this.getFieldConfiguration(t.name)?.alias||t.alias}getFieldConfiguration(e){return e=e.toLowerCase(),this.fieldConfigurations?.find(t=>t.name.toLowerCase()===e)}getFieldDomain(e,t){return ce(this,e,t,this.getField(e)?.domain??null)}async queryAttachments(e,t){return me(this,e,t,ze)}async queryFeatures(e,t){const r=await this.load(),i=await r.source.queryFeatures(Je.from(e)??r.createQuery(),t),o=this.graphicOrigin;if(i?.features)for(const s of i.features)s.layer=s.sourceLayer=r,s.origin=o;return i}async queryObjectIds(e,t){return await fe(this,e,t,ze)}async queryFeatureCount(e,t){return he(this,e,t,ze)}async queryExtent(e,t){return be(this,e,t,ze)}async queryRelatedFeatures(e,t){return ge(this,e,t,ze)}async queryRelatedFeaturesCount(e,t){return we(this,e,t,ze)}async queryPivot(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryPivot||!i?.operations?.supportsQueryPivot)throw new s(ze,"Layer source does not support queryPivot capability");const o=await import("../rest/support/PivotQuery.js"),a=await r.queryPivot(o.default.from(e),t);if(a?.features)for(const s of a.features)s.layer=s.sourceLayer=this;return a}async queryTopFeatures(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryTopFeatures||!i?.query?.supportsTopFeaturesQuery)throw new s(ze,"Layer source does not support queryTopFeatures capability");const o=await import("../rest/support/TopFeaturesQuery.js"),a=await r.queryTopFeatures(o.default.from(e),t);if(a?.features)for(const s of a.features)s.layer=s.sourceLayer=this;return a}async queryAttributeBins(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryAttributeBins)throw new s(ze,"Layer source does not support queryAttributeBins capability");ve(e,i,ze);const o=await import("../rest/support/AttributeBinsQuery.js"),a=await r.queryAttributeBins(o.default.from(e),t);if(a.features)for(const s of a.features)s.layer=s.sourceLayer=this;return a}async queryTopObjectIds(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryTopObjectIds||!i?.query.supportsTopFeaturesQuery)throw new s(ze,"Layer source does not support queryTopObjectIds capability");const o=await import("../rest/support/TopFeaturesQuery.js");return(await r.queryTopObjectIds(o.default.from(e),t)).filter($e)}async queryTopFeaturesExtent(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryTopExtents||!i?.query?.supportsTopFeaturesQuery)throw new s(ze,"Layer source does not support queryTopExtents capability");const o=await import("../rest/support/TopFeaturesQuery.js");return r.queryTopExtents(o.default.from(e),t)}async queryTopFeatureCount(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryTopCount||!i?.query?.supportsTopFeaturesQuery)throw new s(ze,"Layer source does not support queryFeatureCount capability");const o=await import("../rest/support/TopFeaturesQuery.js");return r.queryTopCount(o.default.from(e),t)}read(e,t){const r=e.featureCollection;if((r||"Feature Collection"===e.type)&&(this.resourceInfo=e),r){const{layers:e,showLegend:i}=r;1===e?.length&&(super.read(e[0],t),null!=i&&super.read({showLegend:i},t))}super.read(e,t),t&&"service"===t.origin&&(this.revert(["objectIdField","fields","timeInfo","dateFieldsTimeZone"],"service"),this.spatialReference||this.revert(["spatialReference"],"service"))}write(e,t){t={...t,origin:t?.origin??void 0,writeLayerSchema:t?.writeLayerSchema??this._hasMemorySource()};const{origin:r,layerContainerType:i,messages:o}=t;if(this.dynamicDataSource)return o?.push(ke(this,"using a dynamic data source cannot be written to web scenes, web maps and feature service items")),null;if(this.isTable){if(("web-map"===r||"web-scene"===r)&&"tables"!==i)return o?.push(ke(this,`a table source can only be written to tables, not ${i}`)),null;if(this._hasMemorySource())return o?.push(ke(this,"using an in-memory table source cannot be written to web scenes and web maps")),null}else if(this.loaded&&("web-map"===r||"web-scene"===r)&&"tables"===i)return o?.push(ke(this,"using a non-table source cannot be written to tables in web maps or web scenes")),null;return super.write(e,t)}clone(){if(this._hasMemorySource())throw new s(ze,`FeatureLayer (title: ${this.title}, id: ${this.id}) created using in-memory source cannot be cloned`);return super.clone()}serviceSupportsSpatialReference(e){return!!this.loaded&&("memory"===this.source?.type||Qe(this,e))}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}_readEditingEnabled(e,t,r){let i=e.layerDefinition?.capabilities;return i?this._hasEditingCapability(i):(i=e.capabilities,t&&"web-map"===r?.origin&&!this._hasMemorySource()&&i?this._hasEditingCapability(i):void 0)}_hasEditingCapability(e){return e.toLowerCase().split(",").map(e=>e.trim()).includes("editing")}_writeEditingEnabled(e,t,r,i){if(!e){const e=this.capabilities?.operations?.supportsSync?"Query,Sync":"Query";u("layerDefinition.capabilities",e,t),r&&!i?.writeLayerSchema&&(t.capabilities=e)}}_fetchFirstValidLayerId(e){return r(this.url??"",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e}).then(e=>{const t=e.data;if(t)return this.applyPreferredHost(t),this.findFirstValidLayerId(t)})}async initLayerProperties(e){return this._set("source",e),e.sourceJSON&&(this.sourceJSON=e.sourceJSON,this.read(e.sourceJSON,{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl})),this._verifySource(),this._verifyFields(),_e(this.renderer,this.fieldsIndex),Pe(this.timeInfo,this.fieldsIndex),this._hasMemorySource()&&"mesh"===this.geometryType&&(this.capabilities.query.supportsReturnMesh=!0),Ve(this,{origin:"service"})}async hasDataChanged(){return Fe(this)}async fetchPublishingStatus(){const e=this.source;return e?.fetchPublishingStatus?e.fetchPublishingStatus():"unavailable"}_verifyFields(){const e=this.parsedUrl?.path??"undefined";this.objectIdField||console.log("FeatureLayer: 'objectIdField' property is not defined (url: "+e+")"),this.isTable||this._hasMemorySource()||-1!==e.search(/\/FeatureServer\//i)||this.fields?.some(e=>"geometry"===e.type)||console.log("FeatureLayer: unable to find field of type 'geometry' in the layer 'fields' list. If you are using a map service layer, features will not have geometry (url: "+e+")")}_fixTemplates(e,t){e&&e.forEach(e=>{const r=e.prototype?.attributes;r&&t&&delete r[t]})}_verifySource(){if(this._hasMemorySource()){if(this.url)throw new s("feature-layer:mixed-source-and-url","FeatureLayer cannot be created with both an in-memory source and a url")}else if(!this.url)throw new s("feature-layer:source-or-url-required","FeatureLayer requires either a url, a valid portal item or a source")}_initMemorySource(e){e.forEach(e=>{e.layer=this,e.sourceLayer=this}),this.addHandles([e.on("after-add",e=>{e.item.layer=this,e.item.sourceLayer=this}),e.on("after-remove",e=>{e.item.layer=null,e.item.sourceLayer=null})],"fl-source")}_resetMemorySource(e){e.forEach(e=>{e.layer=null,e.sourceLayer=null}),this.removeHandles("fl-source")}_hasMemorySource(){return!(this.url||!this.source)}findFirstValidLayerId(e){return Array.isArray(e.layers)&&e.layers.length>0?e.layers[0].id:Array.isArray(e.tables)&&e.tables.length>0?e.tables[0].id:void 0}};e([f({clonable:!1,readOnly:!0})],et.prototype,"_titleCreator",null),e([f(W)],et.prototype,"attributeTableTemplate",void 0),e([b("service","capabilities")],et.prototype,"readCapabilities",null),e([f({json:{origins:{"web-scene":{write:!1}},write:!0}})],et.prototype,"charts",void 0),e([f({readOnly:!0})],et.prototype,"createQueryVersion",null),e([f({json:{read:{source:"layerDefinition.copyrightText"}}})],et.prototype,"copyright",void 0),e([f({json:{read:{source:"layerDefinition.displayField"}}})],et.prototype,"displayField",void 0),e([f({types:Ze,readOnly:!0})],et.prototype,"defaultSymbol",void 0),e([f({type:Re})],et.prototype,"dynamicDataSource",void 0),e([f({type:Boolean})],et.prototype,"editingEnabled",null),e([b(["portal-item","web-scene"],"editingEnabled",["layerDefinition.capabilities"])],et.prototype,"readEditingEnabled",null),e([b("web-map","editingEnabled",["capabilities","layerDefinition.capabilities"])],et.prototype,"readEditingEnabledFromWebMap",null),e([w(["portal-item","web-scene"],"editingEnabled",{"layerDefinition.capabilities":{type:String}})],et.prototype,"writeEditingEnabled",null),e([w("web-map","editingEnabled",{capabilities:{type:String},"layerDefinition.capabilities":{type:String}})],et.prototype,"writeEditingEnabledToWebMap",null),e([f({readOnly:!0})],et.prototype,"effectiveEditingEnabled",null),e([f({clonable:!1,readOnly:!0})],et.prototype,"featureTitleFields",null),e([f({type:[Ie],json:{name:"layerDefinition.fieldConfigurations",write:{overridePolicy(e,t,r){return{enabled:!r?.writeLayerSchema,ignoreOrigin:1===this.originIdOf(t)}}}}})],et.prototype,"fieldConfigurations",null),e([f({...Xe.fields,json:{read:{source:"layerDefinition.fields"},origins:{service:{name:"fields"},"web-map":{write:{target:"layerDefinition.fields",overridePolicy:Ye}}}}})],et.prototype,"fields",void 0),e([f(Xe.fieldsIndex)],et.prototype,"fieldsIndex",void 0),e([f({type:F,json:{name:"formInfo",write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],et.prototype,"formTemplate",void 0),e([f({json:{read:{source:"layerDefinition.extent"}}})],et.prototype,"fullExtent",void 0),e([f({json:{origins:{"web-map":{write:{target:"layerDefinition.geometryType",overridePolicy:Ye,writer(e,t,r){const i=e?Te.toJSON(e):null;i&&u(r,i,t)}}}},read:{source:"layerDefinition.geometryType",reader:Te.read}}})],et.prototype,"geometryType",void 0),e([f({readOnly:!0,clonable:!1})],et.prototype,"graphicOrigin",void 0),e([f({json:{read:{source:"layerDefinition.hasM"}}})],et.prototype,"hasM",void 0),e([f({json:{read:{source:"layerDefinition.hasZ"}}})],et.prototype,"hasZ",void 0),e([f(Z)],et.prototype,"id",void 0),e([f({readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],et.prototype,"infoFor3D",void 0),e([f({json:{origins:{"web-map":{write:{target:"layerDefinition.type"}}}}})],et.prototype,"isTable",void 0),e([b("service","isTable",["type","geometryType"]),b("isTable",["layerDefinition.type","layerDefinition.geometryType"])],et.prototype,"readIsTable",null),e([w("web-map","isTable")],et.prototype,"writeIsTable",null),e([f(H)],et.prototype,"labelsVisible",void 0),e([f({type:[xe],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:Oe,write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:Oe,write:{layerContainerTypes:v}}})],et.prototype,"labelingInfo",void 0),e([f((()=>{const e=a(z);return e.json.origins["portal-item"]={write:{target:"layerDefinition.drawingInfo.transparency",writer(e,t,r){u(r,He(e),t)}}},e})())],et.prototype,"opacity",void 0),e([f(k)],et.prototype,"legendEnabled",void 0),e([f({type:["show","hide"],json:(()=>{const e=a(K.json);return e.origins["portal-item"]={read:!1,write:!1},e})()})],et.prototype,"listMode",void 0),e([b("globalIdField",["layerDefinition.globalIdField","layerDefinition.fields"])],et.prototype,"readGlobalIdField",null),e([f({json:{origins:{"web-map":{write:{target:"layerDefinition.objectIdField",overridePolicy:Ye}}}}})],et.prototype,"objectIdField",void 0),e([b("objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"])],et.prototype,"readObjectIdField",null),e([f({type:["ArcGISFeatureLayer"],json:{write:{target:"layerType",ignoreOrigin:!0,layerContainerTypes:v}}})],et.prototype,"operationalLayerType",void 0),e([f(Xe.outFields)],et.prototype,"outFields",void 0),e([f({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],et.prototype,"path",void 0),e([f(X)],et.prototype,"popupEnabled",void 0),e([f({type:t,json:{name:"popupInfo",write:!0}})],et.prototype,"popupTemplate",void 0),e([w("popupTemplate")],et.prototype,"writePopupTemplate",null),e([f({readOnly:!0})],et.prototype,"defaultPopupTemplate",null),e([f({types:Be,json:{origins:{service:{write:{target:"drawingInfo.renderer",enabled:!1}},"web-scene":{types:Ne,name:"layerDefinition.drawingInfo.renderer",write:{layerContainerTypes:v,overridePolicy:(e,t,r)=>({ignoreOrigin:r?.writeLayerSchema,layerContainerTypes:v})}}},write:{target:"layerDefinition.drawingInfo.renderer",overridePolicy:(e,t,r)=>({ignoreOrigin:r?.writeLayerSchema,layerContainerTypes:v})}}})],et.prototype,"renderer",null),e([b("service","renderer",["drawingInfo.renderer","defaultSymbol"]),b("renderer",["layerDefinition.drawingInfo.renderer","layerDefinition.defaultSymbol"])],et.prototype,"readRenderer",null),e([f()],et.prototype,"resourceInfo",void 0),e([f((()=>{const e=a(Y);return e.json.origins["portal-item"]={read:!1,write:!1},e})())],et.prototype,"screenSizePerspectiveEnabled",void 0),e([f({clonable:!1})],et.prototype,"source",null),e([h("source")],et.prototype,"castSource",null),e([b("portal-item","source",["featureSet"]),b("web-map","source",["featureSet"])],et.prototype,"readSource",null),e([f({json:{read:{source:"layerDefinition.extent.spatialReference"}}})],et.prototype,"spatialReference",void 0),e([f({type:Number})],et.prototype,"subtypeCode",void 0),e([f({type:[je]})],et.prototype,"templates",void 0),e([b("templates",["editFieldsInfo","creatorField","editorField","templates"])],et.prototype,"readTemplates",null),e([f({type:Me})],et.prototype,"timeInfo",void 0),e([f()],et.prototype,"title",void 0),e([b("service","title",["name"]),b("portal-item","title",["layerDefinition.title","layerDefinition.name","title"])],et.prototype,"readTitle",null),e([b("web-map","title",["layerDefinition.name","title"])],et.prototype,"readTitleFromWebMap",null),e([f({type:String})],et.prototype,"sublayerTitleMode",void 0),e([f({json:{read:!1}})],et.prototype,"type",void 0),e([f({type:String})],et.prototype,"typeIdField",void 0),e([b("service","typeIdField"),b("typeIdField",["layerDefinition.typeIdField"])],et.prototype,"readTypeIdField",null),e([f({type:[Se]})],et.prototype,"types",void 0),e([b("service","types",["types"]),b("types",["layerDefinition.types"])],et.prototype,"readTypes",null),e([f({type:Boolean,json:{origins:{"portal-item":{write:{target:"layerDefinition.defaultVisibility",layerContainerTypes:v}}}}})],et.prototype,"visible",void 0),e([b("portal-item","visible",["visibility","layerDefinition.defaultVisibility"])],et.prototype,"readVisible",null),et=e([g("esri.layers.FeatureLayer")],et);export{et as default};
|
package/layers/SceneLayer.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"../Graphic.js";import r from"../PopupTemplate.js";import{ClonableMixin as i}from"../core/Clonable.js";import s from"../core/Collection.js";import{deprecated as o}from"../core/deprecate.js";import a from"../core/Error.js";import{abortHandle as n}from"../core/handleUtils.js";import l from"../core/Logger.js";import{destroyMaybe as p}from"../core/maybe.js";import{MultiOriginJSONMixin as d}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as y,isAbortError as u,throwIfNotAbortError as c}from"../core/promiseUtils.js";import{whenOnce as h}from"../core/reactiveUtils.js";import{property as f}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{getProperties as m}from"../core/accessorSupport/utils.js";import{reader as g}from"../core/accessorSupport/decorators/reader.js";import{subclass as v}from"../core/accessorSupport/decorators/subclass.js";import b from"../geometry/Point.js";import w from"../graphic/SceneGraphicOrigin.js";import L from"./Layer.js";import{NoModelError as I,MultipleModelsError as j}from"./graphics/sources/support/uploadAssetErrors.js";import{APIKeyMixin as F}from"./mixins/APIKeyMixin.js";import{ArcGISService as S}from"./mixins/ArcGISService.js";import{CustomParametersMixin as O}from"./mixins/CustomParametersMixin.js";import{EditBusLayer as _}from"./mixins/EditBusLayer.js";import{OperationalLayer as P}from"./mixins/OperationalLayer.js";import{PortalLayer as T}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as A}from"./mixins/ScaleRangeLayer.js";import{SceneService as x}from"./mixins/SceneService.js";import{useViewTimeProperty as E}from"./mixins/TemporalLayer.js";import{TemporalSceneLayer as D}from"./mixins/TemporalSceneLayer.js";import{isHostedAgolService as U}from"./support/arcgisLayerUrl.js";import{findAssociatedFeatureService as R}from"./support/associatedFeatureServiceUtils.js";import{zeroCapabilities as q}from"./support/capabilities.js";import{elevationInfo as C,labelsVisible as G,legendEnabled as N,popupEnabled as Q,attributeTableTemplate as V,screenSizePerspectiveEnabled as M}from"./support/commonProperties.js";import{getFieldDomain as k,computeEffectiveEditingEnabled as K,getGlobalIdToObjectIdMap as $}from"./support/featureLayerUtils.js";import{FeatureReduction as H}from"./support/FeatureReduction.js";import z from"./support/FeatureReductionSelection.js";import{defineFieldProperties as W}from"./support/fieldProperties.js";import Z from"./support/FieldsIndex.js";import{fixRendererFields as B,unpackFieldNames as J}from"./support/fieldUtils.js";import{I3SNodePageDefinition as X,I3SMaterialDefinition as Y,I3STextureSetDefinition as ee,I3SGeometryDefinition as te}from"./support/I3SLayerDefinitions.js";import{isFileEditFormat as re,isFileSupported as ie}from"./support/infoFor3D.js";import se from"./support/LabelClass.js";import{reader as oe}from"./support/labelingInfo.js";import ae from"./support/LayerFloorInfo.js";import{layerLookupMap as ne}from"./support/lazyLayerLoader.js";import{getMeshTransformForMetersToSpatialReference as le}from"./support/meshSpatialReferenceScaleUtils.js";import{RangeInfo as pe}from"./support/RangeInfo.js";import de from"./support/SceneFilter.js";import{cacheIsOutOfSync as ye}from"./support/sceneLayerCacheUtils.js";import{fetchStatistics as ue}from"./support/sceneLayerStatistics.js";import{loadStyleRenderer as ce}from"../renderers/support/styleUtils.js";import{webSceneRendererTypes as he}from"../renderers/support/typeUtils.js";import fe from"../rest/support/Query.js";import{logInvalidElevationInfoWarning as me,elevationModeUnsupportedMessage as ge,featureExpressionUnsupportedMessage as ve}from"../support/elevationInfoUtils.js";import{createPopupTemplate as be}from"../support/popupUtils.js";import{extractZipFiles as we}from"../support/zipUtils.js";import{queryAttributesFromCachedAttributesId as Le}from"../views/3d/layers/i3s/I3SUtil.js";import{getRequiredFields as Ie,getFetchPopupTemplate as je}from"../views/layers/support/popupUtils.js";import{transparencyToOpacity as Fe}from"../webdoc/support/opacityUtils.js";const Se=new Set(["3DObject","Point"]),Oe=W();let _e=class extends(D(_(x(S(P(T(A(d(O(F(i(L)))))))))))){constructor(...e){super(...e),this.featureReduction=null,this.rangeInfos=null,this.operationalLayerType="ArcGISSceneServiceLayer",this.type="scene",this.fields=null,this.graphicOrigin=new w(this),this.floorInfo=null,this.outFields=null,this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.excludeObjectIds=new s,this.definitionExpression=null,this.filter=null,this.path=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.priority=null,this.semantic=null,this.cachedDrawingInfo={color:!1},this.popupEnabled=!0,this.popupTemplate=null,this.attributeTableTemplate=null,this.objectIdField=null,this.globalIdField=null,this._fieldUsageInfo={},this.screenSizePerspectiveEnabled=!0,this.serviceItemId=void 0}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._set("renderer",null),this.associatedLayer=p(this.associatedLayer)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getField(e)?.domain??null;return this.associatedLayer?k(this.associatedLayer,e,t,r):r}getFeatureType(e){return e&&this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return this.associatedLayer?.types??[]}get typeIdField(){return this.associatedLayer?.typeIdField??null}get templates(){return this.associatedLayer?.templates??null}get formTemplate(){return this.associatedLayer?.formTemplate??null}get fieldsIndex(){return new Z(this.fields)}readNodePages(e,t,r){return"Point"===t.layerType&&(e=t.pointNodePages),null==e||"object"!=typeof e?null:X.fromJSON(e,r)}set elevationInfo(e){this._set("elevationInfo",e),this.loaded&&this._validateElevationInfo()}get effectiveCapabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.effectiveCapabilities)}get effectiveEditingEnabled(){return null!=this.associatedLayer&&K(this.associatedLayer)}get geometryType(){return Te[this.profile]||"mesh"}set renderer(e){B(e,this.fieldsIndex),this._set("renderer",e)}readCachedDrawingInfo(e){return null!=e&&"object"==typeof e||(e={}),null==e.color&&(e.color=!1),e}get capabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.capabilities)}_capabilitiesFromAssociatedFeatureLayer(e){e=null!=e?e:q;const{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsRollbackOnFailure:s,supportsUploadWithItemId:o,supportsGeometryUpdate:a,supportsReturnServiceEditsInSourceSpatialReference:n},data:{supportsZ:l,supportsM:p,isVersioned:d,supportsAttachment:y},operations:{supportsEditing:u,supportsAdd:c,supportsUpdate:h,supportsDelete:f,supportsQuery:m,supportsQueryAttachments:g,supportsAsyncConvert3D:v}}=e,b=e.operations.supportsChangeTracking,w=!!this.associatedLayer?.infoFor3D;return{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsReturnServiceEditsInSourceSpatialReference:n,supportsRollbackOnFailure:s,supportsGeometryUpdate:w&&a,supportsUploadWithItemId:o},data:{supportsAttachment:y,supportsZ:l,supportsM:p,isVersioned:d},operations:{supportsQuery:m,supportsQueryAttachments:g,supportsEditing:u&&b,supportsAdd:w&&c&&b,supportsDelete:w&&f&&b,supportsUpdate:h&&b,supportsAsyncConvert3D:v}}}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.associatedLayer?.editingEnabled??!1}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get infoFor3D(){return this.associatedLayer?.infoFor3D??null}get relationships(){return this.associatedLayer?.relationships}get defaultPopupTemplate(){return this.associatedLayer||this.attributeStorageInfo?this.createPopupTemplate():null}readObjectIdField(e,t){return!e&&t.fields&&t.fields.some(t=>("esriFieldTypeOID"===t.type&&(e=t.name),!!e)),e||void 0}readGlobalIdField(e,t){return!e&&t.fields&&t.fields.some(t=>("esriFieldTypeGlobalID"===t.type&&(e=t.name),!!e)),e||void 0}get displayField(){return this.associatedLayer?.displayField??null}readProfile(e,t){const r=t.store.profile;return null!=r&&Pe[r]?Pe[r]:(l.getLogger(this).error("Unknown or missing profile",{profile:r,layer:this}),"mesh-pyramids")}get useViewTime(){return this.associatedLayer?.useViewTime??!0}set useViewTime(e){this._override("useViewTime",e)}load(e){return this.addResolvingPromise(this._load(e)),Promise.resolve(this)}async _load(e){const t=null!=e?e.signal:null;await this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(y),await this._fetchService(t),await Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages,t),this._setAssociatedFeatureLayer(t),this._loadFilterGeometries()]),this._validateElevationInfo(),this._applyAssociatedLayerOverrides(),this._populateFieldUsageInfo(),await this.loadTimeInfoFromService(e),await ce(this,{origin:"service"},t),B(this.renderer,this.fieldsIndex),await this.finishLoadEditablePortalLayer(e)}async beforeSave(){null!=this.filter&&(this.filter=this.filter.clone(),await this.load())}async _loadFilterGeometries(){if(this.filter)try{await this.filter.loadGeometries(this.spatialReference)}catch(e){l.getLogger(this).error("#_loadFilterGeometries()",this,"Failed to load filter geometries. Geometry filter will not be applied for this layer.",{error:e}),this.filter=null}}createQuery(){const e=new fe;return"mesh"===this.geometryType?this.capabilities.query.supportsReturnMesh&&(e.returnGeometry=!0):(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e.outFields=["*"],e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryExtent(e||this.createQuery(),t))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatureCount(e||this.createQuery(),t))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatures(e||this.createQuery(),t)).then(e=>{if(e?.features)for(const t of e.features)t.layer=this,t.sourceLayer=this,t.origin=this.graphicOrigin;return e})}async queryRelatedFeatures(e,t){if(await this.load(),!this.associatedLayer)throw new a("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeatures(e,t)}async queryRelatedFeaturesCount(e,t){if(await this.load(),!this.associatedLayer)throw new a("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeaturesCount(e,t)}async queryCachedAttributes(e,t){const r=J(this.fieldsIndex,await Ie(this,je(this)));return Le(this.parsedUrl?.path??"",this.attributeStorageInfo??[],e,t,r,this.apiKey,this.customParameters)}async queryCachedFeature(e,r){const i=await this.queryCachedAttributes(e,[r]);if(!i||0===i.length)throw new a("scenelayer:feature-not-in-cached-data","Feature not found in cached data");const s=new t;return s.attributes=i[0],s.layer=this,s.sourceLayer=this,s.origin=this.graphicOrigin,s}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryObjectIds(e||this.createQuery(),t))}queryAttachments(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryAttachments(e,t))}getFieldUsageInfo(e){const t={supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1};return this.loaded?this._fieldUsageInfo[e]||t:(l.getLogger(this).error("#getFieldUsageInfo()","Unavailable until layer is loaded"),t)}createPopupTemplate(e){return be(this,e)}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return e?.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),!this.associatedLayer)throw new a("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new a("scenelayer:query-not-available","SceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}hasCachedStatistics(e){return null!=this.statisticsInfo&&this.statisticsInfo.some(t=>t.name===e)}async queryCachedStatistics(e,t){return await this.load(t),await this.fetchStatistics(e,t)}async saveAs(e,t){return this._debouncedSaveOperations(1,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"};return this._debouncedSaveOperations(0,e)}async applyEdits(e,t){const{applyEdits:r}=await import("./graphics/editingSupport.js");let i=t;await this.load();const s=this.associatedLayer;if(!s)throw new a(`${this.type}-layer:not-editable`,"Service is not editable");await s.load();const{globalIdField:o}=s,n=!!s.infoFor3D,l=i?.globalIdUsed??!0;if(n&&null==o)throw new a(`${this.type}-layer:not-editable`,"Valid globalIdField expected on editable SceneLayer");if(n&&!l)throw new a(`${this.type}-layer:globalid-required`,"globalIdUsed must not be false for SceneLayer editing as globalIds are required.");return U(s.url)&&n&&null!=e.deleteFeatures&&null!=o&&(i={...i,globalIdToObjectId:await $(s,e.deleteFeatures,o)}),r(this,s.source,e,i)}async uploadAssets(e,t){if(await this.load(),null==this.associatedLayer)throw new a(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),this.associatedLayer.uploadAssets(e,t)}async convertMesh(e,t){t??={},null!=t.location&&o(l.getLogger(this),"The 'location' option of convertMesh() has been deprecated in favour of 'origin'.",{version:"4.34",replacement:"origin",warnOnce:!0});const r=e=>{throw l.getLogger(this).error(".convertMesh()",e.message),e};await this.load(),this.infoFor3D||r(new a("invalid:layer","SceneLayer has no capability for mesh conversion"));const i=await this.extractAndFilterFiles(e),s=i.reduce((e,t)=>re(this.infoFor3D,t)?e+1:e,0);0===s&&r(new I),s>1&&r(new j);const n=this.spatialReference,p=t.origin??t.location,d=p??t.defaultOrigin??new b({x:0,y:0,z:0,spatialReference:n}),y=d.spatialReference.isGeographic?"local":"georeferenced",{default:u}=await import("../geometry/Mesh.js"),c=u.createWithExternalSource(d,{type:"client",files:i},{vertexSpace:y,transform:le(d.spatialReference),unitConversionDisabled:!0}),[h]=await this.uploadAssets([c],{...t,useAssetOrigin:!p});return h}async extractAndFilterFiles(e){await this.load();const t=this.infoFor3D;if(!t)return e;return(await we(e)).filter(e=>ie(t,e))}validateLayer(e){if(e.layerType&&!Se.has(e.layerType))throw new a("scenelayer:layer-type-not-supported","SceneLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new a("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});if(this.version.major>2)throw new a("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});function t(e,t){let r=!1,i=!1;if(null==e)r=!0,i=!0;else{const s=t&&t.isGeographic;switch(e){case"east-north-up":case"earth-centered":r=!0,i=s;break;case"vertex-reference-frame":r=!0,i=!s;break;default:r=!1}}if(!r)throw new a("scenelayer:unsupported-normal-reference-frame","Normal reference frame is invalid.");if(!i)throw new a("scenelayer:incompatible-normal-reference-frame","Normal reference frame is incompatible with layer spatial reference.")}t(this.normalReferenceFrame,this.spatialReference)}_getTypeKeywords(){const e=[];if("points"===this.profile)e.push("Point");else{if("mesh-pyramids"!==this.profile)throw new a("scenelayer:unknown-profile","SceneLayer:save() encountered an unknown SceneLayer profile: "+this.profile);e.push("3DObject")}return e}_populateFieldUsageInfo(){if(this._fieldUsageInfo={},this.fields)for(const e of this.fields){const t=!!this.attributeStorageInfo?.some(t=>t.name===e.name),r=!!this.associatedLayer?.fields?.some(t=>t&&e.name===t.name),i={supportsLabelingInfo:t,supportsRenderer:t,supportsPopupTemplate:t||r,supportsLayerQuery:r};this._fieldUsageInfo[e.name]=i}}_applyAssociatedLayerOverrides(){this._applyAssociatedLayerFieldsOverrides(),this._applyAssociatedLayerPropertyOverrides(),this._applyAssociatedLayerExtentOverride(),this._applyAssociatedLayerPrivileges()}_applyAssociatedLayerFieldsOverrides(){if(!this.associatedLayer?.fields)return;let e=null;for(const t of this.associatedLayer.fields){const r=this.getField(t.name);r?(!r.domain&&t.domain&&(r.domain=t.domain.clone()),r.editable=t.editable,r.nullable=t.nullable,r.length=t.length):(e||(e=this.fields?this.fields.slice():[]),e.push(t.clone()))}e&&this._set("fields",e)}_applyAssociatedLayerPropertyOverrides(){if(!this.associatedLayer)return;const e=["popupTemplate","popupEnabled","attributeTableTemplate"],t=m(this);for(let r=0;r<e.length;r++){const i=e[r],s=this.originIdOf(i),o=this.associatedLayer.originIdOf(i);s<o&&(2===o||3===o)&&t.setAtOrigin(i,this.associatedLayer[i],o)}}_applyAssociatedLayerExtentOverride(){const e=this.associatedLayer?.getAtOrigin("fullExtent","service");if(null==this.associatedLayer?.infoFor3D||!e||!U(this.associatedLayer?.url)||!ye(this))return;m(this).setAtOrigin("fullExtent",e.clone(),2)}_applyAssociatedLayerPrivileges(){const e=this.associatedLayer;e&&(this._set("userHasEditingPrivileges",e.userHasEditingPrivileges),this._set("userHasFullEditingPrivileges",e.userHasFullEditingPrivileges),this._set("userHasUpdateItemPrivileges",e.userHasUpdateItemPrivileges))}async _setAssociatedFeatureLayer(e){if(["mesh-pyramids","points"].includes(this.profile))try{const{serverUrl:t,layerId:r,portalItem:i}=await R(`${this.url}/layers/${this.layerId}`,{sceneLayerItem:this.portalItem,customParameters:this.customParameters,apiKey:this.apiKey,signal:e}),s=await ne.FeatureLayer();this.associatedLayer=new s({url:t,customParameters:this.customParameters,layerId:r,portalItem:i}),await this.associatedLayer.load()}catch(t){u(t)||this._logWarningOnPopupEnabled()}}async _logWarningOnPopupEnabled(){const e=new AbortController;this.addHandles(n(e));try{await h(()=>this.popupEnabled&&null!=this.popupTemplate,e.signal)}catch(r){return void c(r)}const t=`this SceneLayer: ${this.title}`;null==this.attributeStorageInfo?l.getLogger(this).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${t}`):l.getLogger(this).info(`Associated FeatureLayer could not be loaded. Falling back to binary attributes for Popups on ${t}`)}_validateElevationInfo(){const e=this.elevationInfo;"mesh-pyramids"===this.profile&&me(l.getLogger(this),ge("Mesh scene layers","relative-to-scene",e)),me(l.getLogger(this),ve("Scene layers",e))}async fetchStatistics(e,t){return await ue({fieldName:e,statisticsInfo:this.statisticsInfo,errorContext:"scenelayer",fieldsIndex:this.fieldsIndex,path:this.parsedUrl?.path??"",customParameters:this.customParameters,apiKey:this.apiKey,signal:t?.signal})}};e([f({types:{key:"type",base:H,typeMap:{selection:z}},json:{origins:{"web-scene":{name:"layerDefinition.featureReduction",write:{allowNull:!0}},"portal-item":{name:"layerDefinition.featureReduction",write:{allowNull:!0}}}}})],_e.prototype,"featureReduction",void 0),e([f({type:[pe],json:{read:!1,origins:{"web-scene":{name:"layerDefinition.rangeInfos",write:!0},"portal-item":{name:"layerDefinition.rangeInfos",write:!0}}},clonable:!1})],_e.prototype,"rangeInfos",void 0),e([f({json:{read:!1}})],_e.prototype,"associatedLayer",void 0),e([f({type:["show","hide"]})],_e.prototype,"listMode",void 0),e([f({type:["ArcGISSceneServiceLayer"]})],_e.prototype,"operationalLayerType",void 0),e([f({json:{read:!1},readOnly:!0})],_e.prototype,"type",void 0),e([f({...Oe.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],_e.prototype,"fields",void 0),e([f()],_e.prototype,"types",null),e([f()],_e.prototype,"typeIdField",null),e([f()],_e.prototype,"templates",null),e([f()],_e.prototype,"formTemplate",null),e([f({readOnly:!0})],_e.prototype,"graphicOrigin",void 0),e([f({readOnly:!0,clonable:!1})],_e.prototype,"fieldsIndex",null),e([f({type:ae,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"}}})],_e.prototype,"floorInfo",void 0),e([f(Oe.outFields)],_e.prototype,"outFields",void 0),e([f({type:X,readOnly:!0,json:{read:!1},clonable:!1})],_e.prototype,"nodePages",void 0),e([g("service","nodePages",["nodePages","pointNodePages"])],_e.prototype,"readNodePages",null),e([f({type:[Y],readOnly:!0,clonable:!1})],_e.prototype,"materialDefinitions",void 0),e([f({type:[ee],readOnly:!0,clonable:!1})],_e.prototype,"textureSetDefinitions",void 0),e([f({type:[te],readOnly:!0,clonable:!1})],_e.prototype,"geometryDefinitions",void 0),e([f({readOnly:!0})],_e.prototype,"serviceUpdateTimeStamp",void 0),e([f({readOnly:!0})],_e.prototype,"attributeStorageInfo",void 0),e([f({readOnly:!0})],_e.prototype,"statisticsInfo",void 0),e([f({type:s.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.excludeObjectIds",write:{enabled:!0}}})],_e.prototype,"excludeObjectIds",void 0),e([f({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],_e.prototype,"definitionExpression",void 0),e([f({type:de,json:{name:"layerDefinition.polygonFilter",write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],_e.prototype,"filter",void 0),e([f({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],_e.prototype,"path",void 0),e([f(C)],_e.prototype,"elevationInfo",null),e([f({readOnly:!0,json:{read:!1}})],_e.prototype,"effectiveCapabilities",null),e([f({readOnly:!0})],_e.prototype,"effectiveEditingEnabled",null),e([f({type:String})],_e.prototype,"geometryType",null),e([f(G)],_e.prototype,"labelsVisible",void 0),e([f({type:[se],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:{reader:oe},write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:oe},write:!0}})],_e.prototype,"labelingInfo",void 0),e([f(N)],_e.prototype,"legendEnabled",void 0),e([f({type:Number,json:{origins:{"web-document":{default:1,write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}},read:{source:["opacity","layerDefinition.drawingInfo.transparency"],reader(e,t){if("number"==typeof e&&e>=0&&e<=1)return e;const r=t.layerDefinition?.drawingInfo?.transparency;return void 0!==r?Fe(r):void 0}}},"portal-item":{write:!0},service:{read:!1}}}})],_e.prototype,"opacity",void 0),e([f({type:["Low","High"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],_e.prototype,"priority",void 0),e([f({type:["Labels"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],_e.prototype,"semantic",void 0),e([f({types:he,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],_e.prototype,"renderer",null),e([f({json:{read:!1}})],_e.prototype,"cachedDrawingInfo",void 0),e([g("service","cachedDrawingInfo")],_e.prototype,"readCachedDrawingInfo",null),e([f({readOnly:!0,json:{read:!1}})],_e.prototype,"capabilities",null),e([f({type:Boolean,json:{read:!1}})],_e.prototype,"editingEnabled",null),e([f({readOnly:!0,json:{write:!1,read:!1}})],_e.prototype,"infoFor3D",null),e([f({readOnly:!0,json:{write:!1,read:!1}})],_e.prototype,"relationships",null),e([f(Q)],_e.prototype,"popupEnabled",void 0),e([f({type:r,json:{name:"popupInfo",write:!0}})],_e.prototype,"popupTemplate",void 0),e([f({readOnly:!0,json:{read:!1}})],_e.prototype,"defaultPopupTemplate",null),e([f(V)],_e.prototype,"attributeTableTemplate",void 0),e([f({type:String,json:{read:!1}})],_e.prototype,"objectIdField",void 0),e([g("service","objectIdField",["objectIdField","fields"])],_e.prototype,"readObjectIdField",null),e([f({type:String,json:{read:!1}})],_e.prototype,"globalIdField",void 0),e([g("service","globalIdField",["globalIdField","fields"])],_e.prototype,"readGlobalIdField",null),e([f({readOnly:!0,type:String,json:{read:!1}})],_e.prototype,"displayField",null),e([f({type:String,json:{read:!1}})],_e.prototype,"profile",void 0),e([g("service","profile",["store.profile"])],_e.prototype,"readProfile",null),e([f({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],_e.prototype,"normalReferenceFrame",void 0),e([f(M)],_e.prototype,"screenSizePerspectiveEnabled",void 0),e([f({json:{read:!1,origins:{service:{read:!0}}}})],_e.prototype,"serviceItemId",void 0),e([f(E)],_e.prototype,"useViewTime",null),_e=e([v("esri.layers.SceneLayer")],_e);const Pe={"mesh-pyramids":"mesh-pyramids",meshpyramids:"mesh-pyramids","features-meshes":"mesh-pyramids",points:"points","features-points":"points",lines:"lines","features-lines":"lines",polygons:"polygons","features-polygons":"polygons"},Te={"mesh-pyramids":"mesh",points:"point"},Ae=_e;export{Ae as default};
|
|
5
|
+
import{__decorate as e}from"tslib";import t from"../Graphic.js";import r from"../PopupTemplate.js";import{ClonableMixin as i}from"../core/Clonable.js";import s from"../core/Collection.js";import{deprecated as o}from"../core/deprecate.js";import a from"../core/Error.js";import{abortHandle as n}from"../core/handleUtils.js";import l from"../core/Logger.js";import{destroyMaybe as p}from"../core/maybe.js";import{MultiOriginJSONMixin as d}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as y,throwIfAborted as u,isAbortError as c,throwIfNotAbortError as h}from"../core/promiseUtils.js";import{whenOnce as f}from"../core/reactiveUtils.js";import{property as m}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{getProperties as g}from"../core/accessorSupport/utils.js";import{reader as v}from"../core/accessorSupport/decorators/reader.js";import{subclass as b}from"../core/accessorSupport/decorators/subclass.js";import w from"../geometry/Point.js";import{projectWithZConversion as L}from"../geometry/projectionUtils.js";import I from"../graphic/SceneGraphicOrigin.js";import j from"./Layer.js";import{NoModelError as F,MultipleModelsError as S}from"./graphics/sources/support/uploadAssetErrors.js";import{APIKeyMixin as O}from"./mixins/APIKeyMixin.js";import{ArcGISService as _}from"./mixins/ArcGISService.js";import{CustomParametersMixin as P}from"./mixins/CustomParametersMixin.js";import{EditBusLayer as T}from"./mixins/EditBusLayer.js";import{OperationalLayer as A}from"./mixins/OperationalLayer.js";import{PortalLayer as x}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as E}from"./mixins/ScaleRangeLayer.js";import{SceneService as D}from"./mixins/SceneService.js";import{useViewTimeProperty as U}from"./mixins/TemporalLayer.js";import{TemporalSceneLayer as R}from"./mixins/TemporalSceneLayer.js";import{isHostedAgolService as q}from"./support/arcgisLayerUrl.js";import{findAssociatedFeatureService as C}from"./support/associatedFeatureServiceUtils.js";import{zeroCapabilities as G}from"./support/capabilities.js";import{elevationInfo as N,labelsVisible as Q,legendEnabled as V,popupEnabled as M,attributeTableTemplate as k,screenSizePerspectiveEnabled as K}from"./support/commonProperties.js";import{getFieldDomain as $,computeEffectiveEditingEnabled as H,getGlobalIdToObjectIdMap as z}from"./support/featureLayerUtils.js";import{FeatureReduction as W}from"./support/FeatureReduction.js";import Z from"./support/FeatureReductionSelection.js";import{defineFieldProperties as B}from"./support/fieldProperties.js";import J from"./support/FieldsIndex.js";import{fixRendererFields as X,unpackFieldNames as Y}from"./support/fieldUtils.js";import{I3SNodePageDefinition as ee,I3SMaterialDefinition as te,I3STextureSetDefinition as re,I3SGeometryDefinition as ie}from"./support/I3SLayerDefinitions.js";import{isFileEditFormat as se,isFileSupported as oe}from"./support/infoFor3D.js";import ae from"./support/LabelClass.js";import{reader as ne}from"./support/labelingInfo.js";import le from"./support/LayerFloorInfo.js";import{layerLookupMap as pe}from"./support/lazyLayerLoader.js";import{getMeshTransformForMetersToSpatialReference as de}from"./support/meshSpatialReferenceScaleUtils.js";import{RangeInfo as ye}from"./support/RangeInfo.js";import ue from"./support/SceneFilter.js";import{cacheIsOutOfSync as ce}from"./support/sceneLayerCacheUtils.js";import{fetchStatistics as he}from"./support/sceneLayerStatistics.js";import{loadStyleRenderer as fe}from"../renderers/support/styleUtils.js";import{webSceneRendererTypes as me}from"../renderers/support/typeUtils.js";import ge from"../rest/support/Query.js";import{logInvalidElevationInfoWarning as ve,elevationModeUnsupportedMessage as be,featureExpressionUnsupportedMessage as we}from"../support/elevationInfoUtils.js";import{createPopupTemplate as Le}from"../support/popupUtils.js";import{extractZipFiles as Ie}from"../support/zipUtils.js";import{queryAttributesFromCachedAttributesId as je}from"../views/3d/layers/i3s/I3SUtil.js";import{getRequiredFields as Fe,getFetchPopupTemplate as Se}from"../views/layers/support/popupUtils.js";import{transparencyToOpacity as Oe}from"../webdoc/support/opacityUtils.js";const _e=new Set(["3DObject","Point"]),Pe=B();let Te=class extends(R(T(D(_(A(x(E(d(P(O(i(j)))))))))))){constructor(...e){super(...e),this.featureReduction=null,this.rangeInfos=null,this.operationalLayerType="ArcGISSceneServiceLayer",this.type="scene",this.fields=null,this.graphicOrigin=new I(this),this.floorInfo=null,this.outFields=null,this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.excludeObjectIds=new s,this.definitionExpression=null,this.filter=null,this.path=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.priority=null,this.semantic=null,this.cachedDrawingInfo={color:!1},this.popupEnabled=!0,this.popupTemplate=null,this.attributeTableTemplate=null,this.objectIdField=null,this.globalIdField=null,this._fieldUsageInfo={},this.screenSizePerspectiveEnabled=!0,this.serviceItemId=void 0}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._set("renderer",null),this.associatedLayer=p(this.associatedLayer)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getField(e)?.domain??null;return this.associatedLayer?$(this.associatedLayer,e,t,r):r}getFeatureType(e){return e&&this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return this.associatedLayer?.types??[]}get typeIdField(){return this.associatedLayer?.typeIdField??null}get templates(){return this.associatedLayer?.templates??null}get formTemplate(){return this.associatedLayer?.formTemplate??null}get fieldsIndex(){return new J(this.fields)}readNodePages(e,t,r){return"Point"===t.layerType&&(e=t.pointNodePages),null==e||"object"!=typeof e?null:ee.fromJSON(e,r)}set elevationInfo(e){this._set("elevationInfo",e),this.loaded&&this._validateElevationInfo()}get effectiveCapabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.effectiveCapabilities)}get effectiveEditingEnabled(){return null!=this.associatedLayer&&H(this.associatedLayer)}get geometryType(){return xe[this.profile]||"mesh"}set renderer(e){X(e,this.fieldsIndex),this._set("renderer",e)}readCachedDrawingInfo(e){return null!=e&&"object"==typeof e||(e={}),null==e.color&&(e.color=!1),e}get capabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.capabilities)}_capabilitiesFromAssociatedFeatureLayer(e){e=null!=e?e:G;const{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsRollbackOnFailure:s,supportsUploadWithItemId:o,supportsGeometryUpdate:a,supportsReturnServiceEditsInSourceSpatialReference:n},data:{supportsZ:l,supportsM:p,isVersioned:d,supportsAttachment:y},operations:{supportsEditing:u,supportsAdd:c,supportsUpdate:h,supportsDelete:f,supportsQuery:m,supportsQueryAttachments:g,supportsAsyncConvert3D:v}}=e,b=e.operations.supportsChangeTracking,w=!!this.associatedLayer?.infoFor3D;return{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsReturnServiceEditsInSourceSpatialReference:n,supportsRollbackOnFailure:s,supportsGeometryUpdate:w&&a,supportsUploadWithItemId:o},data:{supportsAttachment:y,supportsZ:l,supportsM:p,isVersioned:d},operations:{supportsQuery:m,supportsQueryAttachments:g,supportsEditing:u&&b,supportsAdd:w&&c&&b,supportsDelete:w&&f&&b,supportsUpdate:h&&b,supportsAsyncConvert3D:v}}}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.associatedLayer?.editingEnabled??!1}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get infoFor3D(){return this.associatedLayer?.infoFor3D??null}get relationships(){return this.associatedLayer?.relationships}get defaultPopupTemplate(){return this.associatedLayer||this.attributeStorageInfo?this.createPopupTemplate():null}readObjectIdField(e,t){return!e&&t.fields&&t.fields.some(t=>("esriFieldTypeOID"===t.type&&(e=t.name),!!e)),e||void 0}readGlobalIdField(e,t){return!e&&t.fields&&t.fields.some(t=>("esriFieldTypeGlobalID"===t.type&&(e=t.name),!!e)),e||void 0}get displayField(){return this.associatedLayer?.displayField??null}readProfile(e,t){const r=t.store.profile;return null!=r&&Ae[r]?Ae[r]:(l.getLogger(this).error("Unknown or missing profile",{profile:r,layer:this}),"mesh-pyramids")}get useViewTime(){return this.associatedLayer?.useViewTime??!0}set useViewTime(e){this._override("useViewTime",e)}load(e){return this.addResolvingPromise(this._load(e)),Promise.resolve(this)}async _load(e){const t=null!=e?e.signal:null;await this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(y),await this._fetchService(t),await Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages,t),this._setAssociatedFeatureLayer(t),this._loadFilterGeometries()]),this._validateElevationInfo(),this._applyAssociatedLayerOverrides(),this._populateFieldUsageInfo(),await this.loadTimeInfoFromService(e),await fe(this,{origin:"service"},t),X(this.renderer,this.fieldsIndex),await this.finishLoadEditablePortalLayer(e)}async beforeSave(){null!=this.filter&&(this.filter=this.filter.clone(),await this.load())}async _loadFilterGeometries(){if(this.filter)try{await this.filter.loadGeometries(this.spatialReference)}catch(e){l.getLogger(this).error("#_loadFilterGeometries()",this,"Failed to load filter geometries. Geometry filter will not be applied for this layer.",{error:e}),this.filter=null}}createQuery(){const e=new ge;return"mesh"===this.geometryType?this.capabilities.query.supportsReturnMesh&&(e.returnGeometry=!0):(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e.outFields=["*"],e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryExtent(e||this.createQuery(),t))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatureCount(e||this.createQuery(),t))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatures(e||this.createQuery(),t)).then(e=>{if(e?.features)for(const t of e.features)t.layer=this,t.sourceLayer=this,t.origin=this.graphicOrigin;return e})}async queryRelatedFeatures(e,t){if(await this.load(),!this.associatedLayer)throw new a("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeatures(e,t)}async queryRelatedFeaturesCount(e,t){if(await this.load(),!this.associatedLayer)throw new a("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeaturesCount(e,t)}async queryCachedAttributes(e,t){const r=Y(this.fieldsIndex,await Fe(this,Se(this)));return je(this.parsedUrl?.path??"",this.attributeStorageInfo??[],e,t,r,this.apiKey,this.customParameters)}async queryCachedFeature(e,r){const i=await this.queryCachedAttributes(e,[r]);if(!i||0===i.length)throw new a("scenelayer:feature-not-in-cached-data","Feature not found in cached data");const s=new t;return s.attributes=i[0],s.layer=this,s.sourceLayer=this,s.origin=this.graphicOrigin,s}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryObjectIds(e||this.createQuery(),t))}queryAttachments(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryAttachments(e,t))}getFieldUsageInfo(e){const t={supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1};return this.loaded?this._fieldUsageInfo[e]||t:(l.getLogger(this).error("#getFieldUsageInfo()","Unavailable until layer is loaded"),t)}createPopupTemplate(e){return Le(this,e)}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return e?.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),!this.associatedLayer)throw new a("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new a("scenelayer:query-not-available","SceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}hasCachedStatistics(e){return null!=this.statisticsInfo&&this.statisticsInfo.some(t=>t.name===e)}async queryCachedStatistics(e,t){return await this.load(t),await this.fetchStatistics(e,t)}async saveAs(e,t){return this._debouncedSaveOperations(1,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"};return this._debouncedSaveOperations(0,e)}async applyEdits(e,t){const{applyEdits:r}=await import("./graphics/editingSupport.js");let i=t;await this.load();const s=this.associatedLayer;if(!s)throw new a(`${this.type}-layer:not-editable`,"Service is not editable");await s.load();const{globalIdField:o}=s,n=!!s.infoFor3D,l=i?.globalIdUsed??!0;if(n&&null==o)throw new a(`${this.type}-layer:not-editable`,"Valid globalIdField expected on editable SceneLayer");if(n&&!l)throw new a(`${this.type}-layer:globalid-required`,"globalIdUsed must not be false for SceneLayer editing as globalIds are required.");return q(s.url)&&n&&null!=e.deleteFeatures&&null!=o&&(i={...i,globalIdToObjectId:await z(s,e.deleteFeatures,o)}),r(this,s.source,e,i)}async uploadAssets(e,t){if(await this.load(),null==this.associatedLayer)throw new a(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),this.associatedLayer.uploadAssets(e,t)}async convertMesh(e,t){t??={},null!=t.location&&o(l.getLogger(this),"The 'location' option of convertMesh() has been deprecated in favour of 'origin'.",{version:"4.34",replacement:"origin",warnOnce:!0});const r=e=>{throw l.getLogger(this).error(".convertMesh()",e.message),e};await this.load(t),this.infoFor3D||r(new a("invalid:layer","SceneLayer has no capability for mesh conversion"));const i=await this.extractAndFilterFiles(e);u(t);const s=i.reduce((e,t)=>se(this.infoFor3D,t)?e+1:e,0);0===s&&r(new F),s>1&&r(new S);const n=this.spatialReference,p=t.origin??t.location,d=await L(p??t.defaultOrigin??new w({x:0,y:0,z:0,spatialReference:n}),n,t),y=d.spatialReference.isGeographic?"local":"georeferenced",{default:c}=await import("../geometry/Mesh.js");u(t);const h=c.createWithExternalSource(d,{type:"client",files:i},{vertexSpace:y,transform:de(d.spatialReference),unitConversionDisabled:!0}),[f]=await this.uploadAssets([h],{...t,useAssetOrigin:!p});return f}async extractAndFilterFiles(e){await this.load();const t=this.infoFor3D;if(!t)return e;return(await Ie(e)).filter(e=>oe(t,e))}validateLayer(e){if(e.layerType&&!_e.has(e.layerType))throw new a("scenelayer:layer-type-not-supported","SceneLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new a("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});if(this.version.major>2)throw new a("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});function t(e,t){let r=!1,i=!1;if(null==e)r=!0,i=!0;else{const s=t&&t.isGeographic;switch(e){case"east-north-up":case"earth-centered":r=!0,i=s;break;case"vertex-reference-frame":r=!0,i=!s;break;default:r=!1}}if(!r)throw new a("scenelayer:unsupported-normal-reference-frame","Normal reference frame is invalid.");if(!i)throw new a("scenelayer:incompatible-normal-reference-frame","Normal reference frame is incompatible with layer spatial reference.")}t(this.normalReferenceFrame,this.spatialReference)}_getTypeKeywords(){const e=[];if("points"===this.profile)e.push("Point");else{if("mesh-pyramids"!==this.profile)throw new a("scenelayer:unknown-profile","SceneLayer:save() encountered an unknown SceneLayer profile: "+this.profile);e.push("3DObject")}return e}_populateFieldUsageInfo(){if(this._fieldUsageInfo={},this.fields)for(const e of this.fields){const t=!!this.attributeStorageInfo?.some(t=>t.name===e.name),r=!!this.associatedLayer?.fields?.some(t=>t&&e.name===t.name),i={supportsLabelingInfo:t,supportsRenderer:t,supportsPopupTemplate:t||r,supportsLayerQuery:r};this._fieldUsageInfo[e.name]=i}}_applyAssociatedLayerOverrides(){this._applyAssociatedLayerFieldsOverrides(),this._applyAssociatedLayerPropertyOverrides(),this._applyAssociatedLayerExtentOverride(),this._applyAssociatedLayerPrivileges()}_applyAssociatedLayerFieldsOverrides(){if(!this.associatedLayer?.fields)return;let e=null;for(const t of this.associatedLayer.fields){const r=this.getField(t.name);r?(!r.domain&&t.domain&&(r.domain=t.domain.clone()),r.editable=t.editable,r.nullable=t.nullable,r.length=t.length):(e||(e=this.fields?this.fields.slice():[]),e.push(t.clone()))}e&&this._set("fields",e)}_applyAssociatedLayerPropertyOverrides(){if(!this.associatedLayer)return;const e=["popupTemplate","popupEnabled","attributeTableTemplate"],t=g(this);for(let r=0;r<e.length;r++){const i=e[r],s=this.originIdOf(i),o=this.associatedLayer.originIdOf(i);s<o&&(2===o||3===o)&&t.setAtOrigin(i,this.associatedLayer[i],o)}}_applyAssociatedLayerExtentOverride(){const e=this.associatedLayer?.getAtOrigin("fullExtent","service");if(null==this.associatedLayer?.infoFor3D||!e||!q(this.associatedLayer?.url)||!ce(this))return;g(this).setAtOrigin("fullExtent",e.clone(),2)}_applyAssociatedLayerPrivileges(){const e=this.associatedLayer;e&&(this._set("userHasEditingPrivileges",e.userHasEditingPrivileges),this._set("userHasFullEditingPrivileges",e.userHasFullEditingPrivileges),this._set("userHasUpdateItemPrivileges",e.userHasUpdateItemPrivileges))}async _setAssociatedFeatureLayer(e){if(["mesh-pyramids","points"].includes(this.profile))try{const{serverUrl:t,layerId:r,portalItem:i}=await C(`${this.url}/layers/${this.layerId}`,{sceneLayerItem:this.portalItem,customParameters:this.customParameters,apiKey:this.apiKey,signal:e}),s=await pe.FeatureLayer();this.associatedLayer=new s({url:t,customParameters:this.customParameters,layerId:r,portalItem:i}),await this.associatedLayer.load()}catch(t){c(t)||this._logWarningOnPopupEnabled()}}async _logWarningOnPopupEnabled(){const e=new AbortController;this.addHandles(n(e));try{await f(()=>this.popupEnabled&&null!=this.popupTemplate,e.signal)}catch(r){return void h(r)}const t=`this SceneLayer: ${this.title}`;null==this.attributeStorageInfo?l.getLogger(this).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${t}`):l.getLogger(this).info(`Associated FeatureLayer could not be loaded. Falling back to binary attributes for Popups on ${t}`)}_validateElevationInfo(){const e=this.elevationInfo;"mesh-pyramids"===this.profile&&ve(l.getLogger(this),be("Mesh scene layers","relative-to-scene",e)),ve(l.getLogger(this),we("Scene layers",e))}async fetchStatistics(e,t){return await he({fieldName:e,statisticsInfo:this.statisticsInfo,errorContext:"scenelayer",fieldsIndex:this.fieldsIndex,path:this.parsedUrl?.path??"",customParameters:this.customParameters,apiKey:this.apiKey,signal:t?.signal})}};e([m({types:{key:"type",base:W,typeMap:{selection:Z}},json:{origins:{"web-scene":{name:"layerDefinition.featureReduction",write:{allowNull:!0}},"portal-item":{name:"layerDefinition.featureReduction",write:{allowNull:!0}}}}})],Te.prototype,"featureReduction",void 0),e([m({type:[ye],json:{read:!1,origins:{"web-scene":{name:"layerDefinition.rangeInfos",write:!0},"portal-item":{name:"layerDefinition.rangeInfos",write:!0}}},clonable:!1})],Te.prototype,"rangeInfos",void 0),e([m({json:{read:!1}})],Te.prototype,"associatedLayer",void 0),e([m({type:["show","hide"]})],Te.prototype,"listMode",void 0),e([m({type:["ArcGISSceneServiceLayer"]})],Te.prototype,"operationalLayerType",void 0),e([m({json:{read:!1},readOnly:!0})],Te.prototype,"type",void 0),e([m({...Pe.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Te.prototype,"fields",void 0),e([m()],Te.prototype,"types",null),e([m()],Te.prototype,"typeIdField",null),e([m()],Te.prototype,"templates",null),e([m()],Te.prototype,"formTemplate",null),e([m({readOnly:!0})],Te.prototype,"graphicOrigin",void 0),e([m({readOnly:!0,clonable:!1})],Te.prototype,"fieldsIndex",null),e([m({type:le,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"}}})],Te.prototype,"floorInfo",void 0),e([m(Pe.outFields)],Te.prototype,"outFields",void 0),e([m({type:ee,readOnly:!0,json:{read:!1},clonable:!1})],Te.prototype,"nodePages",void 0),e([v("service","nodePages",["nodePages","pointNodePages"])],Te.prototype,"readNodePages",null),e([m({type:[te],readOnly:!0,clonable:!1})],Te.prototype,"materialDefinitions",void 0),e([m({type:[re],readOnly:!0,clonable:!1})],Te.prototype,"textureSetDefinitions",void 0),e([m({type:[ie],readOnly:!0,clonable:!1})],Te.prototype,"geometryDefinitions",void 0),e([m({readOnly:!0})],Te.prototype,"serviceUpdateTimeStamp",void 0),e([m({readOnly:!0})],Te.prototype,"attributeStorageInfo",void 0),e([m({readOnly:!0})],Te.prototype,"statisticsInfo",void 0),e([m({type:s.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.excludeObjectIds",write:{enabled:!0}}})],Te.prototype,"excludeObjectIds",void 0),e([m({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],Te.prototype,"definitionExpression",void 0),e([m({type:ue,json:{name:"layerDefinition.polygonFilter",write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],Te.prototype,"filter",void 0),e([m({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],Te.prototype,"path",void 0),e([m(N)],Te.prototype,"elevationInfo",null),e([m({readOnly:!0,json:{read:!1}})],Te.prototype,"effectiveCapabilities",null),e([m({readOnly:!0})],Te.prototype,"effectiveEditingEnabled",null),e([m({type:String})],Te.prototype,"geometryType",null),e([m(Q)],Te.prototype,"labelsVisible",void 0),e([m({type:[ae],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:{reader:ne},write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:ne},write:!0}})],Te.prototype,"labelingInfo",void 0),e([m(V)],Te.prototype,"legendEnabled",void 0),e([m({type:Number,json:{origins:{"web-document":{default:1,write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}},read:{source:["opacity","layerDefinition.drawingInfo.transparency"],reader(e,t){if("number"==typeof e&&e>=0&&e<=1)return e;const r=t.layerDefinition?.drawingInfo?.transparency;return void 0!==r?Oe(r):void 0}}},"portal-item":{write:!0},service:{read:!1}}}})],Te.prototype,"opacity",void 0),e([m({type:["Low","High"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Te.prototype,"priority",void 0),e([m({type:["Labels"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Te.prototype,"semantic",void 0),e([m({types:me,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],Te.prototype,"renderer",null),e([m({json:{read:!1}})],Te.prototype,"cachedDrawingInfo",void 0),e([v("service","cachedDrawingInfo")],Te.prototype,"readCachedDrawingInfo",null),e([m({readOnly:!0,json:{read:!1}})],Te.prototype,"capabilities",null),e([m({type:Boolean,json:{read:!1}})],Te.prototype,"editingEnabled",null),e([m({readOnly:!0,json:{write:!1,read:!1}})],Te.prototype,"infoFor3D",null),e([m({readOnly:!0,json:{write:!1,read:!1}})],Te.prototype,"relationships",null),e([m(M)],Te.prototype,"popupEnabled",void 0),e([m({type:r,json:{name:"popupInfo",write:!0}})],Te.prototype,"popupTemplate",void 0),e([m({readOnly:!0,json:{read:!1}})],Te.prototype,"defaultPopupTemplate",null),e([m(k)],Te.prototype,"attributeTableTemplate",void 0),e([m({type:String,json:{read:!1}})],Te.prototype,"objectIdField",void 0),e([v("service","objectIdField",["objectIdField","fields"])],Te.prototype,"readObjectIdField",null),e([m({type:String,json:{read:!1}})],Te.prototype,"globalIdField",void 0),e([v("service","globalIdField",["globalIdField","fields"])],Te.prototype,"readGlobalIdField",null),e([m({readOnly:!0,type:String,json:{read:!1}})],Te.prototype,"displayField",null),e([m({type:String,json:{read:!1}})],Te.prototype,"profile",void 0),e([v("service","profile",["store.profile"])],Te.prototype,"readProfile",null),e([m({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],Te.prototype,"normalReferenceFrame",void 0),e([m(K)],Te.prototype,"screenSizePerspectiveEnabled",void 0),e([m({json:{read:!1,origins:{service:{read:!0}}}})],Te.prototype,"serviceItemId",void 0),e([m(U)],Te.prototype,"useViewTime",null),Te=e([b("esri.layers.SceneLayer")],Te);const Ae={"mesh-pyramids":"mesh-pyramids",meshpyramids:"mesh-pyramids","features-meshes":"mesh-pyramids",points:"points","features-points":"points",lines:"lines","features-lines":"lines",polygons:"polygons","features-polygons":"polygons"},xe={"mesh-pyramids":"mesh",points:"point"},Ee=Te;export{Ee as default};
|